@dreamboard-games/sdk 0.5.0-alpha.2 → 0.5.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +462 -53
- package/dist/board-element-CqtxU5VZ.d.ts +13 -0
- package/dist/chunk-3RFGPBES.js +1792 -0
- package/dist/chunk-3RFGPBES.js.map +1 -0
- package/dist/chunk-CZRPUWCT.js +1602 -0
- package/dist/chunk-CZRPUWCT.js.map +1 -0
- package/dist/chunk-DMSXVMYY.js +7199 -0
- package/dist/chunk-DMSXVMYY.js.map +1 -0
- package/dist/chunk-U6R7FAH4.js +630 -0
- package/dist/chunk-U6R7FAH4.js.map +1 -0
- package/dist/chunk-YT3RPO5J.js +635 -0
- package/dist/chunk-YT3RPO5J.js.map +1 -0
- package/dist/diagnostics-ZAPEBlJP.d.ts +64 -0
- package/dist/extract-CwJWDrSD.d.ts +6850 -0
- package/dist/index.d.ts +5177 -1
- package/dist/index.js +1990 -6
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +158 -0
- package/dist/react.js +1119 -0
- package/dist/react.js.map +1 -0
- package/dist/reducer.d.ts +1028 -97
- package/dist/reducer.js +4892 -125
- package/dist/reducer.js.map +1 -1
- package/dist/shortcuts-B_RrufOM.d.ts +822 -0
- package/dist/testing.d.ts +529 -569
- package/dist/testing.js +2588 -934
- package/dist/testing.js.map +1 -1
- package/dist/types-BxXRINRF.d.ts +118 -0
- package/package.json +39 -144
- package/dist/HandView-Bi2lxzQP.d.ts +0 -79
- package/dist/ResourceCounter-BFxJknqp.d.ts +0 -98
- package/dist/ThemeProvider-CElaL2ik.d.ts +0 -99
- package/dist/attributes-DbvyMbXw.d.ts +0 -68
- package/dist/browser-interaction.d.ts +0 -910
- package/dist/browser-interaction.js +0 -119
- package/dist/browser-interaction.js.map +0 -1
- package/dist/chunk-32PFKDV7.js +0 -11705
- package/dist/chunk-32PFKDV7.js.map +0 -1
- package/dist/chunk-3BAD4VC2.js +0 -263
- package/dist/chunk-3BAD4VC2.js.map +0 -1
- package/dist/chunk-3SKDNDPG.js +0 -104
- package/dist/chunk-3SKDNDPG.js.map +0 -1
- package/dist/chunk-5YV2WHJ4.js +0 -25
- package/dist/chunk-5YV2WHJ4.js.map +0 -1
- package/dist/chunk-ANRB4XKA.js +0 -90
- package/dist/chunk-ANRB4XKA.js.map +0 -1
- package/dist/chunk-BI4G3PM2.js +0 -1864
- package/dist/chunk-BI4G3PM2.js.map +0 -1
- package/dist/chunk-EVCLTY4Q.js +0 -935
- package/dist/chunk-EVCLTY4Q.js.map +0 -1
- package/dist/chunk-GDPKTBUR.js +0 -564
- package/dist/chunk-GDPKTBUR.js.map +0 -1
- package/dist/chunk-H6VDGFL5.js +0 -2903
- package/dist/chunk-H6VDGFL5.js.map +0 -1
- package/dist/chunk-LR3ZTWQF.js +0 -5960
- package/dist/chunk-LR3ZTWQF.js.map +0 -1
- package/dist/chunk-PF7L4BMG.js +0 -117
- package/dist/chunk-PF7L4BMG.js.map +0 -1
- package/dist/chunk-PN5O6GG2.js +0 -32
- package/dist/chunk-PN5O6GG2.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-PZ5AY32C.js.map +0 -1
- package/dist/chunk-S2JEDVWH.js +0 -7165
- package/dist/chunk-S2JEDVWH.js.map +0 -1
- package/dist/chunk-T3ZKNUZ7.js +0 -1
- package/dist/chunk-T3ZKNUZ7.js.map +0 -1
- package/dist/chunk-UGH54WZ2.js +0 -223
- package/dist/chunk-UGH54WZ2.js.map +0 -1
- package/dist/chunk-VCDWP5VL.js +0 -746
- package/dist/chunk-VCDWP5VL.js.map +0 -1
- package/dist/chunk-VDXOF4FW.js +0 -69
- package/dist/chunk-VDXOF4FW.js.map +0 -1
- package/dist/chunk-WHR5UW3F.js +0 -1988
- package/dist/chunk-WHR5UW3F.js.map +0 -1
- package/dist/chunk-Y75CFE77.js +0 -17
- package/dist/chunk-Y75CFE77.js.map +0 -1
- package/dist/chunk-Z7QCREWI.js +0 -3435
- package/dist/chunk-Z7QCREWI.js.map +0 -1
- package/dist/chunk-ZZGN2ATS.js +0 -1941
- package/dist/chunk-ZZGN2ATS.js.map +0 -1
- package/dist/components-gAbIz7hK.d.ts +0 -1284
- package/dist/definitions-BgmV_GhC.d.ts +0 -300
- package/dist/diagnostics-DIi3ina7.d.ts +0 -50
- package/dist/digest.d.ts +0 -8
- package/dist/game-CsZScpcn.d.ts +0 -763
- package/dist/hex-board-view-aKkblDp6.d.ts +0 -1228
- package/dist/index-CcT9Q7N7.d.ts +0 -193
- package/dist/index.d-DjzoK7zn.d.ts +0 -2101
- package/dist/package-set.d.ts +0 -13
- package/dist/package-set.js +0 -12
- package/dist/package-set.js.map +0 -1
- package/dist/player-state-Cqpyeql0.d.ts +0 -371
- package/dist/plugin-runtime-contract.d.ts +0 -17
- package/dist/plugin-runtime-contract.js +0 -92
- package/dist/plugin-runtime-contract.js.map +0 -1
- package/dist/primitive-props-BNHDkgd7.d.ts +0 -16
- package/dist/protocol-dYgafTYY.d.ts +0 -314
- package/dist/reducer/advanced.d.ts +0 -82
- package/dist/reducer/advanced.js +0 -51
- package/dist/reducer/advanced.js.map +0 -1
- package/dist/reducer-contract.d.ts +0 -11
- package/dist/reducer-contract.js +0 -16
- package/dist/reducer-contract.js.map +0 -1
- package/dist/reference-games/index.d.ts +0 -31
- package/dist/reference-games/index.js +0 -48
- package/dist/reference-games/index.js.map +0 -1
- package/dist/runtime/primitives.d.ts +0 -250
- package/dist/runtime/primitives.js +0 -189
- package/dist/runtime/primitives.js.map +0 -1
- package/dist/runtime/runtime-api.d.ts +0 -2
- package/dist/runtime/runtime-api.js +0 -1
- package/dist/runtime/runtime-api.js.map +0 -1
- package/dist/runtime/workspace-contract.d.ts +0 -392
- package/dist/runtime/workspace-contract.js +0 -28
- package/dist/runtime/workspace-contract.js.map +0 -1
- package/dist/runtime-RJ5orDJU.d.ts +0 -1699
- package/dist/runtime-api-Bz5pwNU_.d.ts +0 -296
- package/dist/runtime-json-CQ9QbLZ5.d.ts +0 -5
- package/dist/runtime.d.ts +0 -83
- package/dist/runtime.js +0 -242
- package/dist/runtime.js.map +0 -1
- package/dist/schema.d.ts +0 -379
- package/dist/stale-contract-artifact-error-XLaweZtF.d.ts +0 -18
- package/dist/testing-compiler.d.ts +0 -37
- package/dist/testing-compiler.js +0 -272
- package/dist/testing-compiler.js.map +0 -1
- package/dist/testing-runtime.d.ts +0 -119
- package/dist/testing-runtime.js +0 -212
- package/dist/testing-runtime.js.map +0 -1
- package/dist/types-DJj5MJkl.d.ts +0 -256
- package/dist/types-DR7DoB1x.d.ts +0 -28
- package/dist/types-JWCYHmu7.d.ts +0 -122
- package/dist/types.d.ts +0 -1958
- package/dist/types.js +0 -14
- package/dist/types.js.map +0 -1
- package/dist/ui/components.d.ts +0 -17
- package/dist/ui/components.js +0 -216
- package/dist/ui/components.js.map +0 -1
- package/dist/ui/defaults.d.ts +0 -19
- package/dist/ui/defaults.js +0 -104
- package/dist/ui/defaults.js.map +0 -1
- package/dist/ui/player-state.d.ts +0 -2
- package/dist/ui/player-state.js +0 -1
- package/dist/ui/player-state.js.map +0 -1
- package/dist/ui/plugin-styles.css +0 -2
- package/dist/ui-contract-GTUPkf8z.d.ts +0 -1168
- package/dist/ui.d.ts +0 -317
- package/dist/ui.js +0 -277
- package/dist/ui.js.map +0 -1
- package/dist/views-BpuWcOyN.d.ts +0 -1641
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Store } from '@tanstack/store';
|
|
2
|
+
import { a1 as InteractionDescriptor$1, aw as ProjectedGameEvent, a$ as SimultaneousPhaseProjection, ay as ProjectedTile, bk as ViewCard, aY as SeatProjectionBundle, aP as RuntimeJson } from './extract-CwJWDrSD.js';
|
|
3
|
+
|
|
4
|
+
type PlayerId = string;
|
|
5
|
+
interface GameplayBasis {
|
|
6
|
+
readonly sessionId: string;
|
|
7
|
+
readonly version: number;
|
|
8
|
+
readonly actionSetVersion: string;
|
|
9
|
+
readonly perspectivePlayerId: PlayerId;
|
|
10
|
+
}
|
|
11
|
+
interface PluginPlayerSummary {
|
|
12
|
+
readonly playerId: PlayerId;
|
|
13
|
+
readonly displayName: string;
|
|
14
|
+
readonly color?: string;
|
|
15
|
+
}
|
|
16
|
+
interface PluginSessionDescriptor {
|
|
17
|
+
readonly sessionId: string;
|
|
18
|
+
/** Turn order is the order of this array. */
|
|
19
|
+
readonly players: readonly PluginPlayerSummary[];
|
|
20
|
+
/**
|
|
21
|
+
* Game image files by manifest path, such as `assets/cards/front.webp`.
|
|
22
|
+
* Sources replace card `frontImage` and `backImage` paths with object URLs.
|
|
23
|
+
*/
|
|
24
|
+
readonly assets?: Readonly<Record<string, Blob>>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type InteractionDescriptor<Interaction extends string = string> = Omit<InteractionDescriptor$1, "interactionKey"> & {
|
|
28
|
+
readonly interactionKey: Interaction;
|
|
29
|
+
};
|
|
30
|
+
type ActionInteractionDescriptor<Interaction extends string = string> = InteractionDescriptor<Interaction>;
|
|
31
|
+
interface ZoneHandlesSnapshot<Interaction extends string = string> {
|
|
32
|
+
readonly tiles: readonly ProjectedTile[];
|
|
33
|
+
readonly cardIds: readonly string[];
|
|
34
|
+
/** Complete views of the cards the seat can see, by card id. */
|
|
35
|
+
readonly cardViewsById: ReadonlyProjection<Record<string, ViewCard>>;
|
|
36
|
+
/** Back image paths of the cards hidden from the seat, by positional id. */
|
|
37
|
+
readonly cardBacksById: Readonly<Record<string, string>>;
|
|
38
|
+
readonly playableByCardId: Readonly<Record<string, readonly InteractionDescriptor<Interaction>[]>>;
|
|
39
|
+
}
|
|
40
|
+
type ReadonlyProjection<Value> = Value extends string | number | boolean | null | undefined ? Value : Value extends readonly (infer Item)[] ? readonly ReadonlyProjection<Item>[] : Value extends object ? {
|
|
41
|
+
readonly [Key in keyof Value]: ReadonlyProjection<Value[Key]>;
|
|
42
|
+
} : Value;
|
|
43
|
+
type SimultaneousPhaseSnapshot = ReadonlyProjection<SimultaneousPhaseProjection>;
|
|
44
|
+
|
|
45
|
+
interface PluginGameplayFrame<View = unknown, Phase extends string = string, Interaction extends string = string> {
|
|
46
|
+
/** Latest committed display-event batch admitted for this seat. Reading a snapshot does not replay notifications. */
|
|
47
|
+
readonly events: readonly ProjectedGameEvent[];
|
|
48
|
+
readonly basis: GameplayBasis;
|
|
49
|
+
readonly view: View | null;
|
|
50
|
+
readonly flow: {
|
|
51
|
+
readonly currentPhase: Phase | null;
|
|
52
|
+
readonly activePlayers: readonly PlayerId[];
|
|
53
|
+
readonly simultaneousPhase: SimultaneousPhaseSnapshot | null;
|
|
54
|
+
};
|
|
55
|
+
readonly availableInteractions: ReadonlyArray<InteractionDescriptor<Interaction>>;
|
|
56
|
+
readonly zones: Readonly<Record<string, Readonly<Record<string, ZoneHandlesSnapshot<Interaction>>>>>;
|
|
57
|
+
}
|
|
58
|
+
type ReducerSeatProjectionBundle = ReadonlyProjection<SeatProjectionBundle>;
|
|
59
|
+
|
|
60
|
+
interface SourceSnapshot {
|
|
61
|
+
readonly me: string;
|
|
62
|
+
readonly players: readonly PluginPlayerSummary[];
|
|
63
|
+
readonly frame: Omit<PluginGameplayFrame, "basis">;
|
|
64
|
+
readonly version: number;
|
|
65
|
+
}
|
|
66
|
+
type SubmitResult = {
|
|
67
|
+
readonly accepted: true;
|
|
68
|
+
} | {
|
|
69
|
+
readonly accepted: false;
|
|
70
|
+
readonly errorCode: string;
|
|
71
|
+
readonly message?: string;
|
|
72
|
+
};
|
|
73
|
+
interface SourceRequest {
|
|
74
|
+
readonly interactionId: string;
|
|
75
|
+
readonly operation: "submit" | "cancel";
|
|
76
|
+
readonly phase: "awaiting-result" | "awaiting-frame";
|
|
77
|
+
}
|
|
78
|
+
type SourceState = {
|
|
79
|
+
readonly connection: "connecting";
|
|
80
|
+
readonly snapshot: null;
|
|
81
|
+
readonly request: null;
|
|
82
|
+
readonly failure: null;
|
|
83
|
+
} | {
|
|
84
|
+
readonly connection: "ready";
|
|
85
|
+
readonly snapshot: SourceSnapshot;
|
|
86
|
+
readonly request: SourceRequest | null;
|
|
87
|
+
readonly failure: null;
|
|
88
|
+
} | {
|
|
89
|
+
readonly connection: "recovering";
|
|
90
|
+
readonly snapshot: SourceSnapshot | null;
|
|
91
|
+
readonly request: SourceRequest | null;
|
|
92
|
+
readonly failure: null;
|
|
93
|
+
} | {
|
|
94
|
+
readonly connection: "failed";
|
|
95
|
+
readonly snapshot: SourceSnapshot | null;
|
|
96
|
+
readonly request: null;
|
|
97
|
+
/** Terminal diagnostic, retained locally. */
|
|
98
|
+
readonly failure: Readonly<Error>;
|
|
99
|
+
} | {
|
|
100
|
+
readonly connection: "closed";
|
|
101
|
+
readonly snapshot: SourceSnapshot | null;
|
|
102
|
+
readonly request: null;
|
|
103
|
+
readonly failure: null;
|
|
104
|
+
};
|
|
105
|
+
interface GameSource {
|
|
106
|
+
readonly store: Pick<Store<SourceState>, "get" | "subscribe">;
|
|
107
|
+
dispose(): void;
|
|
108
|
+
}
|
|
109
|
+
interface CommandSource extends GameSource {
|
|
110
|
+
submit(interactionId: string, params: RuntimeJson): Promise<SubmitResult>;
|
|
111
|
+
cancel(interactionId: string): Promise<SubmitResult>;
|
|
112
|
+
}
|
|
113
|
+
/** Testing-owned sources can add local actions without widening hosted sources. */
|
|
114
|
+
interface ApplySource<Action, Result = void> extends GameSource {
|
|
115
|
+
apply(action: Action): Result;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type { ActionInteractionDescriptor as A, CommandSource as C, GameSource as G, InteractionDescriptor as I, PlayerId as P, ReducerSeatProjectionBundle as R, SimultaneousPhaseSnapshot as S, ZoneHandlesSnapshot as Z, ApplySource as a, GameplayBasis as b, PluginGameplayFrame as c, PluginPlayerSummary as d, PluginSessionDescriptor as e, SourceRequest as f, SourceSnapshot as g, SourceState as h, SubmitResult as i };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamboard-games/sdk",
|
|
3
|
-
"version": "0.5.0-alpha.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.0-alpha.21",
|
|
4
|
+
"description": "Typed headless game instances, reducer authoring, React integration and testing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -11,165 +11,54 @@
|
|
|
11
11
|
"import": "./dist/index.js",
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
-
"./package-set": {
|
|
15
|
-
"types": "./dist/package-set.d.ts",
|
|
16
|
-
"import": "./dist/package-set.js",
|
|
17
|
-
"default": "./dist/package-set.js"
|
|
18
|
-
},
|
|
19
|
-
"./plugin-runtime-contract": {
|
|
20
|
-
"types": "./dist/plugin-runtime-contract.d.ts",
|
|
21
|
-
"import": "./dist/plugin-runtime-contract.js",
|
|
22
|
-
"default": "./dist/plugin-runtime-contract.js"
|
|
23
|
-
},
|
|
24
|
-
"./reference-games": {
|
|
25
|
-
"types": "./dist/reference-games/index.d.ts",
|
|
26
|
-
"import": "./dist/reference-games/index.js",
|
|
27
|
-
"default": "./dist/reference-games/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./types": {
|
|
30
|
-
"types": "./dist/types.d.ts",
|
|
31
|
-
"import": "./dist/types.js",
|
|
32
|
-
"default": "./dist/types.js"
|
|
33
|
-
},
|
|
34
14
|
"./reducer": {
|
|
35
15
|
"types": "./dist/reducer.d.ts",
|
|
36
16
|
"import": "./dist/reducer.js",
|
|
37
17
|
"default": "./dist/reducer.js"
|
|
38
18
|
},
|
|
39
|
-
"./reducer/advanced": {
|
|
40
|
-
"types": "./dist/reducer/advanced.d.ts",
|
|
41
|
-
"import": "./dist/reducer/advanced.js",
|
|
42
|
-
"default": "./dist/reducer/advanced.js"
|
|
43
|
-
},
|
|
44
|
-
"./ui": {
|
|
45
|
-
"types": "./dist/ui.d.ts",
|
|
46
|
-
"import": "./dist/ui.js",
|
|
47
|
-
"default": "./dist/ui.js"
|
|
48
|
-
},
|
|
49
|
-
"./ui/components": {
|
|
50
|
-
"types": "./dist/ui/components.d.ts",
|
|
51
|
-
"import": "./dist/ui/components.js",
|
|
52
|
-
"default": "./dist/ui/components.js"
|
|
53
|
-
},
|
|
54
|
-
"./ui/defaults": {
|
|
55
|
-
"types": "./dist/ui/defaults.d.ts",
|
|
56
|
-
"import": "./dist/ui/defaults.js",
|
|
57
|
-
"default": "./dist/ui/defaults.js"
|
|
58
|
-
},
|
|
59
|
-
"./ui/player-state": {
|
|
60
|
-
"types": "./dist/ui/player-state.d.ts",
|
|
61
|
-
"import": "./dist/ui/player-state.js",
|
|
62
|
-
"default": "./dist/ui/player-state.js"
|
|
63
|
-
},
|
|
64
|
-
"./ui/plugin-styles.css": {
|
|
65
|
-
"default": "./dist/ui/plugin-styles.css"
|
|
66
|
-
},
|
|
67
|
-
"./runtime": {
|
|
68
|
-
"types": "./dist/runtime.d.ts",
|
|
69
|
-
"import": "./dist/runtime.js",
|
|
70
|
-
"default": "./dist/runtime.js"
|
|
71
|
-
},
|
|
72
|
-
"./runtime/primitives": {
|
|
73
|
-
"types": "./dist/runtime/primitives.d.ts",
|
|
74
|
-
"import": "./dist/runtime/primitives.js",
|
|
75
|
-
"default": "./dist/runtime/primitives.js"
|
|
76
|
-
},
|
|
77
|
-
"./runtime/workspace-contract": {
|
|
78
|
-
"types": "./dist/runtime/workspace-contract.d.ts",
|
|
79
|
-
"import": "./dist/runtime/workspace-contract.js",
|
|
80
|
-
"default": "./dist/runtime/workspace-contract.js"
|
|
81
|
-
},
|
|
82
|
-
"./runtime/runtime-api": {
|
|
83
|
-
"types": "./dist/runtime/runtime-api.d.ts",
|
|
84
|
-
"import": "./dist/runtime/runtime-api.js",
|
|
85
|
-
"default": "./dist/runtime/runtime-api.js"
|
|
86
|
-
},
|
|
87
|
-
"./reducer-contract": {
|
|
88
|
-
"types": "./dist/reducer-contract.d.ts",
|
|
89
|
-
"import": "./dist/reducer-contract.js",
|
|
90
|
-
"default": "./dist/reducer-contract.js"
|
|
91
|
-
},
|
|
92
19
|
"./testing": {
|
|
93
20
|
"types": "./dist/testing.d.ts",
|
|
94
21
|
"import": "./dist/testing.js",
|
|
95
22
|
"default": "./dist/testing.js"
|
|
96
23
|
},
|
|
97
|
-
"./
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"types": "./dist/testing-compiler.d.ts",
|
|
104
|
-
"import": "./dist/testing-compiler.js",
|
|
105
|
-
"default": "./dist/testing-compiler.js"
|
|
106
|
-
},
|
|
107
|
-
"./browser-interaction": {
|
|
108
|
-
"types": "./dist/browser-interaction.d.ts",
|
|
109
|
-
"import": "./dist/browser-interaction.js",
|
|
110
|
-
"default": "./dist/browser-interaction.js"
|
|
111
|
-
},
|
|
112
|
-
"./package.json": "./package.json"
|
|
24
|
+
"./package.json": "./package.json",
|
|
25
|
+
"./react": {
|
|
26
|
+
"types": "./dist/react.d.ts",
|
|
27
|
+
"import": "./dist/react.js",
|
|
28
|
+
"default": "./dist/react.js"
|
|
29
|
+
}
|
|
113
30
|
},
|
|
114
31
|
"files": [
|
|
115
32
|
"LICENSE.md",
|
|
116
33
|
"dist",
|
|
117
34
|
"README.md",
|
|
118
|
-
"!.turbo/**",
|
|
119
35
|
"!tsconfig.tsbuildinfo"
|
|
120
36
|
],
|
|
121
37
|
"dependencies": {
|
|
122
|
-
"@
|
|
123
|
-
"@
|
|
124
|
-
"
|
|
125
|
-
"@radix-ui/react-select": "^2.3.1",
|
|
126
|
-
"@radix-ui/react-slot": "^1.3.0",
|
|
127
|
-
"@radix-ui/react-tooltip": "^1.2.10",
|
|
128
|
-
"@noble/hashes": "^2.2.0",
|
|
129
|
-
"@use-gesture/react": "^10.3.1",
|
|
130
|
-
"clsx": "^2.1.1",
|
|
131
|
-
"esbuild": "^0.28.1",
|
|
132
|
-
"lucide-react": "^1.20.0",
|
|
133
|
-
"vaul": "^1.1.2",
|
|
134
|
-
"zustand": "^5.0.14"
|
|
38
|
+
"@noble/hashes": "2.4.0",
|
|
39
|
+
"@tanstack/store": "0.11.1",
|
|
40
|
+
"honeycomb-grid": "4.1.5"
|
|
135
41
|
},
|
|
136
42
|
"devDependencies": {
|
|
137
|
-
"@happy-dom/global-registrator": "
|
|
138
|
-
"@
|
|
139
|
-
"@
|
|
140
|
-
"@
|
|
141
|
-
"@
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"eslint": "^9.39.1",
|
|
151
|
-
"framer-motion": "^12.40.0",
|
|
152
|
-
"http-server": "^14.1.1",
|
|
153
|
-
"playwright": "1.60.0",
|
|
154
|
-
"react": "^19.2.0",
|
|
155
|
-
"react-dom": "^19.2.0",
|
|
156
|
-
"storybook": "^10.4.6",
|
|
157
|
-
"tailwindcss": "^4.3.1",
|
|
158
|
-
"tsup": "^8.5.0",
|
|
159
|
-
"typescript": "^5.9.3",
|
|
160
|
-
"vite": "8.0.16",
|
|
161
|
-
"vitest": "4.1.10",
|
|
162
|
-
"wait-on": "^8.0.1",
|
|
163
|
-
"zod": "4.4.3",
|
|
164
|
-
"@dreamboard-games/plugin-runtime-contract": "0.1.0",
|
|
165
|
-
"@dreamboard-games/sdk-types": "0.2.0",
|
|
166
|
-
"@dreamboard-games/reducer-contract": "0.5.0"
|
|
43
|
+
"@happy-dom/global-registrator": "20.14.5",
|
|
44
|
+
"@tanstack/react-store": "0.11.1",
|
|
45
|
+
"@types/node": "24.19.0",
|
|
46
|
+
"@types/react": "19.3.0",
|
|
47
|
+
"@types/react-dom": "19.3.0",
|
|
48
|
+
"esbuild": "0.28.2",
|
|
49
|
+
"eslint": "10.11.0",
|
|
50
|
+
"react": "19.3.0",
|
|
51
|
+
"react-dom": "19.3.0",
|
|
52
|
+
"tsup": "8.5.1",
|
|
53
|
+
"typescript": "6.0.3",
|
|
54
|
+
"vitest": "5.0.2",
|
|
55
|
+
"zod": "4.6.5"
|
|
167
56
|
},
|
|
168
57
|
"peerDependencies": {
|
|
169
|
-
"
|
|
58
|
+
"@tanstack/react-store": "0.11.1",
|
|
170
59
|
"react": "^19.0.0",
|
|
171
60
|
"react-dom": "^19.0.0",
|
|
172
|
-
"zod": "
|
|
61
|
+
"zod": "4.6.5"
|
|
173
62
|
},
|
|
174
63
|
"publishConfig": {
|
|
175
64
|
"access": "public"
|
|
@@ -189,15 +78,21 @@
|
|
|
189
78
|
"package-set"
|
|
190
79
|
],
|
|
191
80
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
81
|
+
"peerDependenciesMeta": {
|
|
82
|
+
"react": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"react-dom": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@tanstack/react-store": {
|
|
89
|
+
"optional": true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
192
92
|
"scripts": {
|
|
193
|
-
"build": "tsup
|
|
194
|
-
"typecheck": "tsc --noEmit && tsc -p tsconfig.testing-contract.json",
|
|
93
|
+
"build": "tsup",
|
|
94
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.testing-contract.json && tsc -p tsconfig.runtime-contract.json",
|
|
195
95
|
"lint": "eslint 'src/**/*.{ts,tsx}'",
|
|
196
|
-
"storybook": "storybook dev -p 6006 --host 127.0.0.1 --no-open",
|
|
197
|
-
"storybook:build": "storybook build -o storybook-static",
|
|
198
|
-
"storybook:test": "concurrently -k -s first -n storybook,test \"http-server storybook-static -p 6006 -s --silent\" \"wait-on tcp:6006 && test-storybook --url http://127.0.0.1:6006\"",
|
|
199
|
-
"storybook:test:visual": "playwright test --config .storybook/visual-runner.config.ts",
|
|
200
|
-
"storybook:test:visual:update": "playwright test --config .storybook/visual-runner.config.ts --update-snapshots",
|
|
201
96
|
"test": "vitest run src"
|
|
202
97
|
}
|
|
203
98
|
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode, CSSProperties } from 'react';
|
|
3
|
-
import { ViewCard } from './types.js';
|
|
4
|
-
import { P as InteractionVisualState, f as CardIntent } from './hex-board-view-aKkblDp6.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Pure layout math for the controlled `HandView`.
|
|
8
|
-
*
|
|
9
|
-
* The functions here are independent of React and DOM measurement so they can
|
|
10
|
-
* be unit-tested directly. {@link computeFanLayout} matches the algorithm
|
|
11
|
-
* documented in `docs/reference/ui-sdk-mobile-hand-and-card-interactions.md`,
|
|
12
|
-
* and {@link chooseHandLayoutMode} translates a measured container width and a
|
|
13
|
-
* caller policy into the actual presentation mode the hand should render.
|
|
14
|
-
*/
|
|
15
|
-
type HandPresentationMode = "fan" | "compressed-fan" | "strip" | "tray";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Deterministic pointer recognizer for the controlled hand view.
|
|
19
|
-
*
|
|
20
|
-
* The engine is independent from React: it consumes pointer events and a
|
|
21
|
-
* caller-supplied callbacks bag, and produces semantic gesture events. It
|
|
22
|
-
* owns no DOM, emits no `CardIntent`, and does not track the drag-lifecycle
|
|
23
|
-
* `phase` — that responsibility lives in `CardDragSurface`. The engine only
|
|
24
|
-
* recognizes `tap`, `previewStart`/`previewEnd`, `liftStart`/`liftMove`/
|
|
25
|
-
* `liftEnd`/`liftCancel`, and a `horizontalBrowse` informational signal.
|
|
26
|
-
*
|
|
27
|
-
* The thresholds match
|
|
28
|
-
* `docs/reference/ui-sdk-mobile-hand-and-card-interactions.md`:
|
|
29
|
-
*
|
|
30
|
-
* | Threshold | Default |
|
|
31
|
-
* | ------------------------- | ----------- |
|
|
32
|
-
* | Press preview delay | `220ms` |
|
|
33
|
-
* | Movement slop | `8px` |
|
|
34
|
-
* | Axis bias | `1.25` |
|
|
35
|
-
* | Drag lift distance | `28px` |
|
|
36
|
-
*
|
|
37
|
-
* Callers wire the engine's `handlePointerDown` / `handlePointerMove` /
|
|
38
|
-
* `handlePointerUp` / `handlePointerCancel` to the matching DOM events on
|
|
39
|
-
* each interactive card.
|
|
40
|
-
*/
|
|
41
|
-
type HandInteractionPolicy = "direct-activate" | "drag-to-target";
|
|
42
|
-
|
|
43
|
-
type HandLayoutKind = HandPresentationMode | "stack";
|
|
44
|
-
interface HandLayoutPolicy {
|
|
45
|
-
desktop?: HandLayoutKind;
|
|
46
|
-
mobile?: HandLayoutKind;
|
|
47
|
-
}
|
|
48
|
-
interface HandViewProps<CardData extends ViewCard = ViewCard> {
|
|
49
|
-
cards: readonly CardData[];
|
|
50
|
-
/**
|
|
51
|
-
* Layout policy. Pass a single layout kind to use the same layout in every
|
|
52
|
-
* viewport, or pass `{ desktop, mobile }` for a measured-width decision.
|
|
53
|
-
* Defaults to `{ desktop: "fan", mobile: "tray" }`.
|
|
54
|
-
*/
|
|
55
|
-
layout?: HandLayoutKind | HandLayoutPolicy;
|
|
56
|
-
/**
|
|
57
|
-
* Mobile interaction policy. Defaults to `direct-activate`. Use
|
|
58
|
-
* `drag-to-target` together with a surrounding `CardDragSurface` and one
|
|
59
|
-
* or more `CardDropTargetView` children.
|
|
60
|
-
*/
|
|
61
|
-
mobileInteraction?: HandInteractionPolicy;
|
|
62
|
-
/** Returns the controlled visual state for a card. */
|
|
63
|
-
stateForCard?: (card: CardData, index: number) => InteractionVisualState | undefined;
|
|
64
|
-
/** Visual surface renderer. */
|
|
65
|
-
renderCard: (card: CardData, state: InteractionVisualState, index: number) => ReactNode;
|
|
66
|
-
/** Generic UI intent callback. */
|
|
67
|
-
onCardIntent?: (intent: CardIntent<CardData["id"] & string>) => void;
|
|
68
|
-
/** Card width hint for fan geometry. */
|
|
69
|
-
cardSize?: "sm" | "md" | "lg";
|
|
70
|
-
/** Slot for the empty state. Defaults to nothing rendered. */
|
|
71
|
-
renderEmpty?: () => ReactNode;
|
|
72
|
-
/** ARIA label for the hand region. */
|
|
73
|
-
"aria-label"?: string;
|
|
74
|
-
className?: string;
|
|
75
|
-
style?: CSSProperties;
|
|
76
|
-
}
|
|
77
|
-
declare function HandView<CardData extends ViewCard = ViewCard>({ cards, layout, mobileInteraction, stateForCard, renderCard, onCardIntent, cardSize, renderEmpty, "aria-label": ariaLabel, className, style, }: HandViewProps<CardData>): react_jsx_runtime.JSX.Element;
|
|
78
|
-
|
|
79
|
-
export { type HandInteractionPolicy as H, type HandLayoutKind as a, type HandLayoutPolicy as b, HandView as c, type HandViewProps as d };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { ReactNode, HTMLAttributes, ComponentType, ReactElement } from 'react';
|
|
4
|
-
import { P as PrimitiveCommonProps } from './primitive-props-BNHDkgd7.js';
|
|
5
|
-
|
|
6
|
-
type HandRole = "primary" | "auxiliary" | "task";
|
|
7
|
-
interface MobileHandRegistration {
|
|
8
|
-
id: string;
|
|
9
|
-
zone: string;
|
|
10
|
-
label: string;
|
|
11
|
-
role: HandRole;
|
|
12
|
-
order?: number;
|
|
13
|
-
version: string;
|
|
14
|
-
count: number;
|
|
15
|
-
active: boolean;
|
|
16
|
-
autoOpen: boolean;
|
|
17
|
-
content: ReactNode;
|
|
18
|
-
}
|
|
19
|
-
declare function MobileHandTrayProvider({ children }: {
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
}): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare function useRegisterMobileHand(hand: MobileHandRegistration): void;
|
|
23
|
-
declare function useOverlayInsets(): {
|
|
24
|
-
bottom: number;
|
|
25
|
-
};
|
|
26
|
-
declare function useRegisterBottomOverlayInset(id: string, height: number): void;
|
|
27
|
-
|
|
28
|
-
type ResourceId = string;
|
|
29
|
-
interface ResourceDisplayConfig<Resource extends string = ResourceId> {
|
|
30
|
-
type: Resource;
|
|
31
|
-
label: string;
|
|
32
|
-
icon: ReactNode | ComponentType<{
|
|
33
|
-
className?: string;
|
|
34
|
-
strokeWidth?: number;
|
|
35
|
-
"aria-hidden"?: boolean | "true" | "false";
|
|
36
|
-
}>;
|
|
37
|
-
iconColor?: string;
|
|
38
|
-
bgColor?: string;
|
|
39
|
-
textColor?: string;
|
|
40
|
-
}
|
|
41
|
-
interface ResourceCounterItemState<Resource extends string = ResourceId> {
|
|
42
|
-
type: Resource;
|
|
43
|
-
label: string;
|
|
44
|
-
icon: ResourceDisplayConfig<Resource>["icon"];
|
|
45
|
-
iconColor?: string;
|
|
46
|
-
bgColor?: string;
|
|
47
|
-
textColor?: string;
|
|
48
|
-
count: number;
|
|
49
|
-
isZero: boolean;
|
|
50
|
-
interactive: boolean;
|
|
51
|
-
select: () => void;
|
|
52
|
-
renderIcon: (props?: ResourceIconProps) => ReactNode;
|
|
53
|
-
dataAttributes: {
|
|
54
|
-
"data-resource-id": Resource;
|
|
55
|
-
"data-resource-count": number;
|
|
56
|
-
"data-resource-zero": boolean | undefined;
|
|
57
|
-
"data-interactive": boolean | undefined;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
interface ResourceIconProps {
|
|
61
|
-
className?: string;
|
|
62
|
-
strokeWidth?: number;
|
|
63
|
-
"aria-hidden"?: boolean | "true" | "false";
|
|
64
|
-
}
|
|
65
|
-
type ResourceCounterRootProps<Resource extends string = ResourceId> = Omit<PrimitiveCommonProps, "children"> & Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
66
|
-
resources: ReadonlyArray<ResourceDisplayConfig<Resource>>;
|
|
67
|
-
counts: Partial<Record<Resource, number>>;
|
|
68
|
-
zero?: "show" | "hide";
|
|
69
|
-
onResourceClick?: (resourceType: Resource) => void;
|
|
70
|
-
children: ReactNode;
|
|
71
|
-
};
|
|
72
|
-
type BoundResourceCounterRootProps<Resource extends string = ResourceId> = Omit<ResourceCounterRootProps<Resource>, "resources">;
|
|
73
|
-
type ResourceCounterProps<Resource extends string = ResourceId> = ResourceCounterRootProps<Resource>;
|
|
74
|
-
type ResourceCounterPartProps<Resource extends string = ResourceId> = Omit<PrimitiveCommonProps, "children"> & Omit<HTMLAttributes<HTMLElement>, "children"> & {
|
|
75
|
-
children?: ReactNode | ((resource: ResourceCounterItemState<Resource>) => ReactNode);
|
|
76
|
-
};
|
|
77
|
-
declare function ResourceCounterRoot<Resource extends string = ResourceId>({ resources, counts, zero, onResourceClick, children, "aria-label": ariaLabel, ...props }: ResourceCounterRootProps<Resource>): ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
78
|
-
declare function ResourceCounterItem<Resource extends string = ResourceId>({ children, onClick, "aria-label": ariaLabel, ...props }: ResourceCounterPartProps<Resource>): ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
79
|
-
declare function ResourceCounterIcon<Resource extends string = ResourceId>({ className, strokeWidth, "aria-hidden": ariaHidden, }: ResourceIconProps): ReactNode;
|
|
80
|
-
declare function ResourceCounterCount<Resource extends string = ResourceId>({ children, ...props }: ResourceCounterPartProps<Resource>): ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
81
|
-
declare function ResourceCounterLabel<Resource extends string = ResourceId>({ children, ...props }: ResourceCounterPartProps<Resource>): ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
82
|
-
interface ResourceCounterComponents<Resource extends string = ResourceId> {
|
|
83
|
-
Root(props: BoundResourceCounterRootProps<Resource>): ReactElement;
|
|
84
|
-
Item(props: ResourceCounterPartProps<Resource>): ReactElement;
|
|
85
|
-
Icon(props: ResourceIconProps): ReactNode;
|
|
86
|
-
Count(props: ResourceCounterPartProps<Resource>): ReactElement;
|
|
87
|
-
Label(props: ResourceCounterPartProps<Resource>): ReactElement;
|
|
88
|
-
}
|
|
89
|
-
declare function createResourceCounter<Resource extends string>(resources: ReadonlyArray<ResourceDisplayConfig<Resource>>): ResourceCounterComponents<Resource>;
|
|
90
|
-
declare const ResourceCounter: {
|
|
91
|
-
Root: typeof ResourceCounterRoot;
|
|
92
|
-
Item: typeof ResourceCounterItem;
|
|
93
|
-
Icon: typeof ResourceCounterIcon;
|
|
94
|
-
Count: typeof ResourceCounterCount;
|
|
95
|
-
Label: typeof ResourceCounterLabel;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export { type BoundResourceCounterRootProps as B, type HandRole as H, type MobileHandRegistration as M, ResourceCounter as R, MobileHandTrayProvider as a, type ResourceCounterComponents as b, ResourceCounterCount as c, ResourceCounterIcon as d, ResourceCounterItem as e, type ResourceCounterItemState as f, ResourceCounterLabel as g, type ResourceCounterPartProps as h, type ResourceCounterProps as i, ResourceCounterRoot as j, type ResourceCounterRootProps as k, type ResourceDisplayConfig as l, type ResourceIconProps as m, createResourceCounter as n, useRegisterBottomOverlayInset as o, useRegisterMobileHand as p, useOverlayInsets as u };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { ag as Theme, ai as ThemeOverride } from './hex-board-view-aKkblDp6.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The set of preset theme ids ships in `@dreamboard-games/sdk/ui`. Authors
|
|
7
|
-
* may register additional ones by passing a fully-resolved {@link Theme}
|
|
8
|
-
* instead of an id.
|
|
9
|
-
*/
|
|
10
|
-
type ThemePresetId = "tabletop" | "arcade" | "studio";
|
|
11
|
-
/**
|
|
12
|
-
* Resolve a preset id (or a full theme) into a {@link Theme}.
|
|
13
|
-
*
|
|
14
|
-
* Used internally by {@link ThemeProvider}; exported so authors who
|
|
15
|
-
* compose at the call site (e.g. for a side-by-side preview) can do
|
|
16
|
-
* the same resolution without mounting a provider.
|
|
17
|
-
*/
|
|
18
|
-
declare function resolveTheme(input: ThemePresetId | Theme | undefined): Theme;
|
|
19
|
-
/** Look up a registered preset by id. Returns `undefined` if missing. */
|
|
20
|
-
declare function getThemePreset(id: ThemePresetId): Theme | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Subset returned by {@link useTheme} — the resolved theme plus a
|
|
23
|
-
* stable copy of its CSS-variable map so consumers can reuse it (for
|
|
24
|
-
* example, to apply tokens to a portal that escapes the provider).
|
|
25
|
-
*/
|
|
26
|
-
interface ThemeContextValue {
|
|
27
|
-
/** Fully resolved theme. */
|
|
28
|
-
readonly theme: Theme;
|
|
29
|
-
/** CSS-var map consumable as `style` on a wrapper. */
|
|
30
|
-
readonly cssVars: CSSProperties;
|
|
31
|
-
}
|
|
32
|
-
interface ThemeProviderProps {
|
|
33
|
-
/**
|
|
34
|
-
* Preset id, a full {@link Theme}, or omitted to use the `tabletop`
|
|
35
|
-
* default.
|
|
36
|
-
*/
|
|
37
|
-
theme?: ThemePresetId | Theme;
|
|
38
|
-
/**
|
|
39
|
-
* Deep-partial overrides merged onto the resolved base theme. Use
|
|
40
|
-
* for one-off tweaks (e.g. swapping the player palette per game)
|
|
41
|
-
* without writing a full theme.
|
|
42
|
-
*/
|
|
43
|
-
override?: ThemeOverride;
|
|
44
|
-
/**
|
|
45
|
-
* Render mode for reduced-motion enforcement.
|
|
46
|
-
*
|
|
47
|
-
* - `auto` (default): respect the user's OS-level preference via
|
|
48
|
-
* `prefers-reduced-motion: reduce`.
|
|
49
|
-
* - `force`: force `motion.reducedMotion = "true"` regardless of the
|
|
50
|
-
* OS preference (useful for screenshot CI).
|
|
51
|
-
* - `ignore`: never override motion (use only when the embedding
|
|
52
|
-
* shell already decides motion behaviour).
|
|
53
|
-
*/
|
|
54
|
-
reducedMotion?: "auto" | "force" | "ignore";
|
|
55
|
-
/**
|
|
56
|
-
* Where to mount the wrapper. `block` (default) renders a `div` and
|
|
57
|
-
* applies the CSS variables to it. `none` skips the wrapper entirely
|
|
58
|
-
* — only useful when the parent is already a Dreamboard provider and
|
|
59
|
-
* just needs to publish a different sub-tree (rare).
|
|
60
|
-
*/
|
|
61
|
-
as?: "block" | "none";
|
|
62
|
-
/** Extra style merged after the CSS-var map. */
|
|
63
|
-
style?: CSSProperties;
|
|
64
|
-
/** Extra className for the wrapper. */
|
|
65
|
-
className?: string;
|
|
66
|
-
children: ReactNode;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Mounts a Dreamboard theme. The provider:
|
|
70
|
-
*
|
|
71
|
-
* 1. Resolves the preset (or accepts a full theme).
|
|
72
|
-
* 2. Applies any deep-partial `override`.
|
|
73
|
-
* 3. Optionally clamps `motion.reducedMotion` to `"true"` based on the
|
|
74
|
-
* OS-level preference (or a forced override).
|
|
75
|
-
* 4. Serialises the resolved theme into CSS variables on a wrapper
|
|
76
|
-
* element so descendants can read tokens via `useTheme()` *or* via
|
|
77
|
-
* `var(--db-...)` references in their own CSS / Tailwind.
|
|
78
|
-
*
|
|
79
|
-
* Defaults such as `<GameLayout>` mount this for you with the configured
|
|
80
|
-
* theme; mount it manually only when you need a sub-tree to use a different
|
|
81
|
-
* theme (e.g. a dark sheet over a light layout).
|
|
82
|
-
*/
|
|
83
|
-
declare function ThemeProvider({ theme: themeInput, override, reducedMotion, as, style, className, children, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
84
|
-
/**
|
|
85
|
-
* Read the active {@link Theme} from a {@link ThemeProvider} ancestor.
|
|
86
|
-
*
|
|
87
|
-
* Falls back to the `tabletop` preset (with no overrides) when called
|
|
88
|
-
* outside a provider — components remain renderable in isolated tests
|
|
89
|
-
* and Storybook/Cosmos fixtures without a wrapping shell.
|
|
90
|
-
*/
|
|
91
|
-
declare function useTheme(): Theme;
|
|
92
|
-
/**
|
|
93
|
-
* Read the {@link CSSProperties} that publish the active theme as CSS
|
|
94
|
-
* variables. Useful when porting a theme into a portal or drawer that
|
|
95
|
-
* is rendered outside the provider's DOM subtree.
|
|
96
|
-
*/
|
|
97
|
-
declare function useThemeCssVars(): CSSProperties;
|
|
98
|
-
|
|
99
|
-
export { type ThemeContextValue as T, type ThemePresetId as a, ThemeProvider as b, type ThemeProviderProps as c, useThemeCssVars as d, getThemePreset as g, resolveTheme as r, useTheme as u };
|