mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-27 18:12:05 -07:00
refactor: split shared type entrypoints
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
|
||||
export const CORE_DEFAULT_CONFIG: Pick<
|
||||
ResolvedConfig,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
|
||||
export const IMMERSION_DEFAULT_CONFIG: Pick<ResolvedConfig, 'immersionTracking'> = {
|
||||
immersionTracking: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
|
||||
export const INTEGRATIONS_DEFAULT_CONFIG: Pick<
|
||||
ResolvedConfig,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types.js';
|
||||
import { ResolvedConfig } from '../../types/config.js';
|
||||
|
||||
export const STATS_DEFAULT_CONFIG: Pick<ResolvedConfig, 'stats'> = {
|
||||
stats: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
|
||||
export const SUBTITLE_DEFAULT_CONFIG: Pick<ResolvedConfig, 'subtitleStyle' | 'subtitleSidebar'> = {
|
||||
subtitleStyle: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
import { ConfigOptionRegistryEntry } from './shared';
|
||||
|
||||
export function buildCoreConfigOptionRegistry(
|
||||
@@ -263,7 +263,8 @@ export function buildCoreConfigOptionRegistry(
|
||||
{
|
||||
path: `controller.bindings.${binding.id}.axisIndex`,
|
||||
kind: 'number' as const,
|
||||
defaultValue: binding.defaultValue.kind === 'axis' ? binding.defaultValue.axisIndex : undefined,
|
||||
defaultValue:
|
||||
binding.defaultValue.kind === 'axis' ? binding.defaultValue.axisIndex : undefined,
|
||||
description: 'Raw axis index captured for this discrete controller action.',
|
||||
},
|
||||
{
|
||||
@@ -293,7 +294,8 @@ export function buildCoreConfigOptionRegistry(
|
||||
{
|
||||
path: `controller.bindings.${binding.id}.axisIndex`,
|
||||
kind: 'number' as const,
|
||||
defaultValue: binding.defaultValue.kind === 'axis' ? binding.defaultValue.axisIndex : undefined,
|
||||
defaultValue:
|
||||
binding.defaultValue.kind === 'axis' ? binding.defaultValue.axisIndex : undefined,
|
||||
description: 'Raw axis index captured for this analog controller action.',
|
||||
},
|
||||
{
|
||||
@@ -302,7 +304,8 @@ export function buildCoreConfigOptionRegistry(
|
||||
enumValues: ['none', 'horizontal', 'vertical'],
|
||||
defaultValue:
|
||||
binding.defaultValue.kind === 'axis' ? binding.defaultValue.dpadFallback : undefined,
|
||||
description: 'Optional D-pad fallback used when this analog controller action should also read D-pad input.',
|
||||
description:
|
||||
'Optional D-pad fallback used when this analog controller action should also read D-pad input.',
|
||||
},
|
||||
]),
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
import { ConfigOptionRegistryEntry } from './shared';
|
||||
|
||||
export function buildImmersionConfigOptionRegistry(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
import { ConfigOptionRegistryEntry, RuntimeOptionRegistryEntry } from './shared';
|
||||
|
||||
export function buildIntegrationConfigOptionRegistry(
|
||||
@@ -369,13 +369,15 @@ export function buildIntegrationConfigOptionRegistry(
|
||||
path: 'youtubeSubgen.whisperBin',
|
||||
kind: 'string',
|
||||
defaultValue: defaultConfig.youtubeSubgen.whisperBin,
|
||||
description: 'Legacy compatibility path kept for external subtitle fallback tools; not used by default.',
|
||||
description:
|
||||
'Legacy compatibility path kept for external subtitle fallback tools; not used by default.',
|
||||
},
|
||||
{
|
||||
path: 'youtubeSubgen.whisperModel',
|
||||
kind: 'string',
|
||||
defaultValue: defaultConfig.youtubeSubgen.whisperModel,
|
||||
description: 'Legacy compatibility model path kept for external subtitle fallback tooling; not used by default.',
|
||||
description:
|
||||
'Legacy compatibility model path kept for external subtitle fallback tooling; not used by default.',
|
||||
},
|
||||
{
|
||||
path: 'youtubeSubgen.whisperVadModel',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types.js';
|
||||
import { ResolvedConfig } from '../../types/config.js';
|
||||
import { ConfigOptionRegistryEntry } from './shared.js';
|
||||
|
||||
export function buildStatsConfigOptionRegistry(
|
||||
@@ -15,7 +15,8 @@ export function buildStatsConfigOptionRegistry(
|
||||
path: 'stats.markWatchedKey',
|
||||
kind: 'string',
|
||||
defaultValue: defaultConfig.stats.markWatchedKey,
|
||||
description: 'Key code to mark the current video as watched and advance to the next playlist entry.',
|
||||
description:
|
||||
'Key code to mark the current video as watched and advance to the next playlist entry.',
|
||||
},
|
||||
{
|
||||
path: 'stats.serverPort',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
import { ConfigOptionRegistryEntry } from './shared';
|
||||
|
||||
export function buildSubtitleConfigOptionRegistry(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ResolvedConfig } from '../../types';
|
||||
import { ResolvedConfig } from '../../types/config';
|
||||
import { RuntimeOptionRegistryEntry } from './shared';
|
||||
|
||||
export function buildRuntimeOptionRegistry(
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import {
|
||||
AnkiConnectConfig,
|
||||
ResolvedConfig,
|
||||
import type { AnkiConnectConfig } from '../../types/anki';
|
||||
import type { ResolvedConfig } from '../../types/config';
|
||||
import type {
|
||||
RuntimeOptionId,
|
||||
RuntimeOptionScope,
|
||||
RuntimeOptionValue,
|
||||
RuntimeOptionValueType,
|
||||
} from '../../types';
|
||||
} from '../../types/runtime-options';
|
||||
|
||||
export type ConfigValueKind = 'boolean' | 'number' | 'string' | 'enum' | 'array' | 'object';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user