Reorganize client items into per-item folders

This commit is contained in:
Jage9
2026-02-24 02:07:18 -05:00
parent 43cf9316c0
commit cc33e24cd4
16 changed files with 28 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
import { type ItemTypeClientDefinition } from './shared';
import { type ItemTypeClientDefinition } from '../shared';
export const CLOCK_TIME_ZONE_OPTIONS = [
'America/Anchorage',
@@ -61,4 +61,3 @@ export const clockDefinition: ItemTypeClientDefinition = {
timeZone: [...CLOCK_TIME_ZONE_OPTIONS],
},
};

View File

@@ -0,0 +1,2 @@
export { clockDefinition, CLOCK_TIME_ZONE_OPTIONS } from './definition';

View File

@@ -1,4 +1,4 @@
import { type ItemTypeClientDefinition } from './shared';
import { type ItemTypeClientDefinition } from '../shared';
/** Default client-side UI definition for dice items. */
export const diceDefinition: ItemTypeClientDefinition = {
@@ -15,4 +15,3 @@ export const diceDefinition: ItemTypeClientDefinition = {
emitSoundTempo: 50,
},
};

View File

@@ -0,0 +1,2 @@
export { diceDefinition } from './definition';

View File

@@ -19,4 +19,3 @@ export const DEFAULT_ITEM_TYPE_DEFINITIONS: ItemTypeClientDefinition[] = [
/** Default add-item menu ordering derived from local item definitions. */
export const DEFAULT_ITEM_TYPE_SEQUENCE: ItemType[] = DEFAULT_ITEM_TYPE_DEFINITIONS.map((definition) => definition.type);

View File

@@ -1,5 +1,5 @@
import { PIANO_INSTRUMENT_OPTIONS } from '../../audio/pianoSynth';
import { type ItemTypeClientDefinition } from './shared';
import { PIANO_INSTRUMENT_OPTIONS } from '../../../audio/pianoSynth';
import { type ItemTypeClientDefinition } from '../shared';
/** Default client-side UI definition for piano items. */
export const pianoDefinition: ItemTypeClientDefinition = {
@@ -20,4 +20,3 @@ export const pianoDefinition: ItemTypeClientDefinition = {
voiceMode: ['poly', 'mono'],
},
};

View File

@@ -0,0 +1,3 @@
export { pianoDefinition } from './definition';
export { PianoController } from './runtime';

View File

@@ -3,9 +3,9 @@ import {
PIANO_INSTRUMENT_OPTIONS,
PianoSynth,
type PianoInstrumentId,
} from '../audio/pianoSynth';
import { type IncomingMessage, type OutgoingMessage } from '../network/protocol';
import { type GameMode, type WorldItem } from '../state/gameState';
} from '../../../audio/pianoSynth';
import { type IncomingMessage, type OutgoingMessage } from '../../../network/protocol';
import { type GameMode, type WorldItem } from '../../../state/gameState';
const PIANO_WHITE_KEY_MIDI_BY_CODE: Record<string, number> = {
KeyA: 60,
@@ -815,4 +815,3 @@ export class PianoController {
}
}
}

View File

@@ -1,6 +1,6 @@
import { RADIO_CHANNEL_OPTIONS } from '../../audio/radioStationRuntime';
import { EFFECT_SEQUENCE } from '../../audio/effects';
import { type ItemTypeClientDefinition } from './shared';
import { RADIO_CHANNEL_OPTIONS } from '../../../audio/radioStationRuntime';
import { EFFECT_SEQUENCE } from '../../../audio/effects';
import { type ItemTypeClientDefinition } from '../shared';
/** Default client-side UI definition for radio_station items. */
export const radioStationDefinition: ItemTypeClientDefinition = {
@@ -21,4 +21,3 @@ export const radioStationDefinition: ItemTypeClientDefinition = {
mediaChannel: [...RADIO_CHANNEL_OPTIONS],
},
};

View File

@@ -0,0 +1,2 @@
export { radioStationDefinition } from './definition';

View File

@@ -1,4 +1,4 @@
import { type ItemTypeClientDefinition } from './shared';
import { type ItemTypeClientDefinition } from '../shared';
/** Default client-side UI definition for wheel items. */
export const wheelDefinition: ItemTypeClientDefinition = {
@@ -15,4 +15,3 @@ export const wheelDefinition: ItemTypeClientDefinition = {
emitSoundTempo: 50,
},
};

View File

@@ -0,0 +1,2 @@
export { wheelDefinition } from './definition';

View File

@@ -1,5 +1,5 @@
import { EFFECT_SEQUENCE } from '../../audio/effects';
import { type ItemTypeClientDefinition } from './shared';
import { EFFECT_SEQUENCE } from '../../../audio/effects';
import { type ItemTypeClientDefinition } from '../shared';
/** Default client-side UI definition for widget items. */
export const widgetDefinition: ItemTypeClientDefinition = {
@@ -32,4 +32,3 @@ export const widgetDefinition: ItemTypeClientDefinition = {
emitEffect: EFFECT_SEQUENCE.map((effect) => effect.id),
},
};

View File

@@ -0,0 +1,2 @@
export { widgetDefinition } from './definition';

View File

@@ -57,7 +57,7 @@ import {
} from './items/itemRegistry';
import { createItemPropertyEditor } from './items/itemPropertyEditor';
import { createItemPropertyPresentation } from './items/itemPropertyPresentation';
import { PianoController } from './items/pianoController';
import { PianoController } from './items/types/piano';
import { NICKNAME_STORAGE_KEY, SettingsStore } from './settings/settingsStore';
import { runConnectFlow, runDisconnectFlow, type ConnectFlowDeps } from './session/connectionFlow';
import { MediaSession } from './session/mediaSession';