Reorganize client items into per-item folders
This commit is contained in:
@@ -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],
|
||||
},
|
||||
};
|
||||
|
||||
2
client/src/items/types/clock/index.ts
Normal file
2
client/src/items/types/clock/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { clockDefinition, CLOCK_TIME_ZONE_OPTIONS } from './definition';
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
2
client/src/items/types/dice/index.ts
Normal file
2
client/src/items/types/dice/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { diceDefinition } from './definition';
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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'],
|
||||
},
|
||||
};
|
||||
|
||||
3
client/src/items/types/piano/index.ts
Normal file
3
client/src/items/types/piano/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export { pianoDefinition } from './definition';
|
||||
export { PianoController } from './runtime';
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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],
|
||||
},
|
||||
};
|
||||
|
||||
2
client/src/items/types/radioStation/index.ts
Normal file
2
client/src/items/types/radioStation/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { radioStationDefinition } from './definition';
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
2
client/src/items/types/wheel/index.ts
Normal file
2
client/src/items/types/wheel/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { wheelDefinition } from './definition';
|
||||
|
||||
@@ -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),
|
||||
},
|
||||
};
|
||||
|
||||
2
client/src/items/types/widget/index.ts
Normal file
2
client/src/items/types/widget/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { widgetDefinition } from './definition';
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user