@dreamboard-games/sdk 0.4.0-alpha.0 → 0.4.0-alpha.2
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 +8 -1
- package/REFERENCE.md +1849 -379
- package/dist/{ResourceCounter-BTXklCEZ.d.ts → ResourceCounter-BuiNstXs.d.ts} +5 -1
- package/dist/{ThemeProvider-DvMl17Ny.d.ts → ThemeProvider-B1sIoBlX.d.ts} +1 -1
- package/dist/attributes-DbvyMbXw.d.ts +68 -0
- package/dist/authoring/index.d.ts +66 -0
- package/dist/authoring/index.js +560 -0
- package/dist/authoring/index.js.map +1 -0
- package/dist/browser-interaction.d.ts +246 -44
- package/dist/browser-interaction.js +14 -1
- package/dist/{chunk-Q5O7GPVY.js → chunk-45FI6XII.js} +630 -375
- package/dist/chunk-45FI6XII.js.map +1 -0
- package/dist/{chunk-4G7552LO.js → chunk-6JQFGSLD.js} +216 -47
- package/dist/chunk-6JQFGSLD.js.map +1 -0
- package/dist/{chunk-NBAEEHAU.js → chunk-CP35NPPY.js} +5926 -5266
- package/dist/chunk-CP35NPPY.js.map +1 -0
- package/dist/{chunk-2LDZ5C3T.js → chunk-FWVV2X74.js} +2 -2
- package/dist/{chunk-MNKDSGIA.js → chunk-HWJS3VOJ.js} +6 -2
- package/dist/chunk-HWJS3VOJ.js.map +1 -0
- package/dist/chunk-K5ZRJTZZ.js +328 -0
- package/dist/chunk-K5ZRJTZZ.js.map +1 -0
- package/dist/{chunk-U5KBV2BA.js → chunk-N6ZDIMRB.js} +444 -223
- package/dist/chunk-N6ZDIMRB.js.map +1 -0
- package/dist/chunk-O6M6PN4E.js +1225 -0
- package/dist/chunk-O6M6PN4E.js.map +1 -0
- package/dist/chunk-PF7L4BMG.js +117 -0
- package/dist/chunk-PF7L4BMG.js.map +1 -0
- package/dist/{chunk-P7F4L2FF.js → chunk-WOWFONLZ.js} +609 -1287
- package/dist/chunk-WOWFONLZ.js.map +1 -0
- package/dist/{chunk-QLG6VEMW.js → chunk-WUIVY2KE.js} +318 -21
- package/dist/chunk-WUIVY2KE.js.map +1 -0
- package/dist/chunk-ZAS2SENW.js +12 -0
- package/dist/chunk-ZAS2SENW.js.map +1 -0
- package/dist/codegen.d.ts +11 -1
- package/dist/codegen.js +1 -1
- package/dist/{components-DaIqi9QM.d.ts → components-BbWPnZCF.d.ts} +37 -70
- package/dist/{hex-board-view-UCUjMALd.d.ts → hex-board-view-Kz9Q_zsv.d.ts} +1 -1
- package/dist/index.js +2 -1
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -1
- package/dist/player-state-Cqpyeql0.d.ts +371 -0
- package/dist/protocol-BP193lva.d.ts +267 -0
- package/dist/reducer/advanced.d.ts +2 -2
- package/dist/reducer/advanced.js +1 -1
- package/dist/reducer-contract.js +1 -1
- package/dist/reducer.d.ts +7 -7
- package/dist/reducer.js +190 -183
- package/dist/reducer.js.map +1 -1
- package/dist/runtime/primitives.d.ts +10 -9
- package/dist/runtime/primitives.js +9 -6
- package/dist/runtime/runtime-api.d.ts +2 -2
- package/dist/runtime/workspace-contract.d.ts +28 -76
- package/dist/runtime/workspace-contract.js +7 -5
- package/dist/runtime-api-BJharVaj.d.ts +198 -0
- package/dist/runtime-api-C6aWo9c0.d.ts +95 -0
- package/dist/runtime-json-CQ9QbLZ5.d.ts +5 -0
- package/dist/runtime.d.ts +80 -11
- package/dist/runtime.js +89 -445
- package/dist/runtime.js.map +1 -1
- package/dist/testing.d.ts +643 -22
- package/dist/testing.js +1371 -76
- package/dist/testing.js.map +1 -1
- package/dist/types-CYeN0wLK.d.ts +29 -0
- package/dist/{attributes-BeRyboMS.d.ts → types-DJj5MJkl.d.ts} +32 -55
- package/dist/types.d.ts +14 -7
- package/dist/ui/components.d.ts +4 -5
- package/dist/ui/components.js +19 -1
- package/dist/ui/player-state.d.ts +2 -365
- package/dist/ui/plugin-styles.css +1 -1
- package/dist/{ui-contract-BUC6iS3s.d.ts → ui-contract-CY7cxsCC.d.ts} +17 -26
- package/dist/ui.d.ts +8 -13
- package/dist/ui.js +20 -2
- package/dist/{views-B0hlW6IT.d.ts → views-fn2RuXOx.d.ts} +59 -44
- package/package.json +28 -4
- package/dist/chunk-4G7552LO.js.map +0 -1
- package/dist/chunk-MNKDSGIA.js.map +0 -1
- package/dist/chunk-NBAEEHAU.js.map +0 -1
- package/dist/chunk-P7F4L2FF.js.map +0 -1
- package/dist/chunk-Q5O7GPVY.js.map +0 -1
- package/dist/chunk-QLG6VEMW.js.map +0 -1
- package/dist/chunk-U5KBV2BA.js.map +0 -1
- package/dist/hex-color-MhOyuY-o.d.ts +0 -8
- package/dist/runtime-api-BXd70c2e.d.ts +0 -490
- /package/dist/{chunk-2LDZ5C3T.js.map → chunk-FWVV2X74.js.map} +0 -0
|
@@ -28,6 +28,10 @@ declare function useRegisterMobileHand(hand: MobileHandRegistration): void;
|
|
|
28
28
|
* the breakpoint with a CSS media query. Returns `false` outside `<UI.Root>`.
|
|
29
29
|
*/
|
|
30
30
|
declare function useMobileHandTrayActive(): boolean;
|
|
31
|
+
declare function useOverlayInsets(): {
|
|
32
|
+
bottom: number;
|
|
33
|
+
};
|
|
34
|
+
declare function useRegisterBottomOverlayInset(id: string, height: number): void;
|
|
31
35
|
|
|
32
36
|
type ResourceId = string;
|
|
33
37
|
interface ResourceDisplayConfig<Resource extends string = ResourceId> {
|
|
@@ -99,4 +103,4 @@ declare const ResourceCounter: {
|
|
|
99
103
|
Label: typeof ResourceCounterLabel;
|
|
100
104
|
};
|
|
101
105
|
|
|
102
|
-
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,
|
|
106
|
+
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, useOverlayInsets as o, useRegisterBottomOverlayInset as p, useRegisterMobileHand as q, useMobileHandTrayActive as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { $ as Theme, a1 as ThemeOverride } from './hex-board-view-
|
|
3
|
+
import { $ as Theme, a1 as ThemeOverride } from './hex-board-view-Kz9Q_zsv.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The set of preset theme ids ships in `@dreamboard-games/sdk/ui`. Authors
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { q as BrowserInteractionIntent, i as BrowserInteractionCandidateState, h as BrowserInteractionActuatorKind, K as BrowserInteractionSurfaceEffect, k as BrowserInteractionEffectPattern, w as BrowserInteractionPreparationTarget, z as BrowserInteractionReadiness, V as GameplayBrowserInteractionIntent, X as GameplaySemanticEffect, Y as GameplaySemanticEffectPattern } from './types-DJj5MJkl.js';
|
|
2
|
+
|
|
3
|
+
type BrowserInteractionAttributeMap = Record<string, string | boolean>;
|
|
4
|
+
interface BrowserInteractionRootAttributesInput {
|
|
5
|
+
readonly surface: string;
|
|
6
|
+
readonly scopeId: string;
|
|
7
|
+
readonly interactionKey: string;
|
|
8
|
+
readonly interactionId: string;
|
|
9
|
+
readonly descriptorDigest?: string;
|
|
10
|
+
readonly draftDigest?: string;
|
|
11
|
+
readonly readiness: BrowserInteractionReadiness;
|
|
12
|
+
}
|
|
13
|
+
interface BrowserInteractionActuatorAttributesInput {
|
|
14
|
+
readonly surface: string;
|
|
15
|
+
readonly scopeId: string;
|
|
16
|
+
readonly interactionKey: string;
|
|
17
|
+
readonly interactionId: string;
|
|
18
|
+
readonly descriptorDigest?: string;
|
|
19
|
+
readonly draftDigest?: string;
|
|
20
|
+
readonly intent: BrowserInteractionIntent;
|
|
21
|
+
readonly inputKey?: string;
|
|
22
|
+
readonly candidateValue?: unknown;
|
|
23
|
+
readonly candidateState?: BrowserInteractionCandidateState;
|
|
24
|
+
readonly enabled?: boolean;
|
|
25
|
+
readonly actuatorKind: BrowserInteractionActuatorKind;
|
|
26
|
+
readonly actuatorId?: string;
|
|
27
|
+
readonly semanticEffects?: readonly BrowserInteractionSurfaceEffect[];
|
|
28
|
+
readonly acceptedEffectPatterns?: readonly BrowserInteractionEffectPattern[];
|
|
29
|
+
readonly preparationPatterns?: readonly BrowserInteractionEffectPattern[];
|
|
30
|
+
readonly prepares?: BrowserInteractionPreparationTarget;
|
|
31
|
+
}
|
|
32
|
+
interface BrowserInteractionPointerTargetAttributesInput {
|
|
33
|
+
readonly surface: string;
|
|
34
|
+
readonly scopeId: string;
|
|
35
|
+
readonly interactionKey: string;
|
|
36
|
+
readonly interactionId: string;
|
|
37
|
+
readonly descriptorDigest?: string;
|
|
38
|
+
readonly targetId: string;
|
|
39
|
+
readonly enabled?: boolean;
|
|
40
|
+
readonly acceptedEffectPatterns: readonly BrowserInteractionEffectPattern[];
|
|
41
|
+
}
|
|
42
|
+
declare function createBrowserInteractionRootAttributes(input: BrowserInteractionRootAttributesInput): BrowserInteractionAttributeMap;
|
|
43
|
+
declare function createBrowserInteractionActuatorAttributes(input: BrowserInteractionActuatorAttributesInput): BrowserInteractionAttributeMap;
|
|
44
|
+
declare function createBrowserInteractionPointerTargetAttributes(input: BrowserInteractionPointerTargetAttributesInput): BrowserInteractionAttributeMap;
|
|
45
|
+
type GameplayInteractionRootAttributesInput = Omit<BrowserInteractionRootAttributesInput, "surface">;
|
|
46
|
+
type GameplayActuatorAttributesInput = Omit<BrowserInteractionActuatorAttributesInput, "surface" | "intent" | "semanticEffects" | "acceptedEffectPatterns" | "preparationPatterns"> & {
|
|
47
|
+
readonly intent: GameplayBrowserInteractionIntent;
|
|
48
|
+
readonly semanticEffects?: readonly GameplaySemanticEffect[];
|
|
49
|
+
readonly acceptedEffectPatterns?: readonly GameplaySemanticEffectPattern[];
|
|
50
|
+
readonly preparationPatterns?: readonly GameplaySemanticEffectPattern[];
|
|
51
|
+
};
|
|
52
|
+
type GameplayPointerTargetAttributesInput = Omit<BrowserInteractionPointerTargetAttributesInput, "surface" | "acceptedEffectPatterns"> & {
|
|
53
|
+
readonly acceptedEffectPatterns: readonly GameplaySemanticEffectPattern[];
|
|
54
|
+
};
|
|
55
|
+
declare function createGameplayInteractionRootAttributes(input: GameplayInteractionRootAttributesInput): BrowserInteractionAttributeMap;
|
|
56
|
+
declare function createGameplayActuatorAttributes(input: GameplayActuatorAttributesInput): BrowserInteractionAttributeMap;
|
|
57
|
+
declare function createGameplayPointerTargetAttributes(input: GameplayPointerTargetAttributesInput): BrowserInteractionAttributeMap;
|
|
58
|
+
declare function createBrowserInteractionActuatorKey(input: {
|
|
59
|
+
readonly surface: string;
|
|
60
|
+
readonly scopeId: string;
|
|
61
|
+
readonly interactionKey: string;
|
|
62
|
+
readonly intent: BrowserInteractionIntent;
|
|
63
|
+
readonly inputKey?: string;
|
|
64
|
+
readonly candidateValueKey?: string;
|
|
65
|
+
readonly actuatorKind: BrowserInteractionActuatorKind;
|
|
66
|
+
}): string;
|
|
67
|
+
|
|
68
|
+
export { type BrowserInteractionActuatorAttributesInput as B, type GameplayActuatorAttributesInput as G, type BrowserInteractionAttributeMap as a, type BrowserInteractionPointerTargetAttributesInput as b, type BrowserInteractionRootAttributesInput as c, type GameplayInteractionRootAttributesInput as d, type GameplayPointerTargetAttributesInput as e, createBrowserInteractionActuatorAttributes as f, createBrowserInteractionActuatorKey as g, createBrowserInteractionPointerTargetAttributes as h, createBrowserInteractionRootAttributes as i, createGameplayActuatorAttributes as j, createGameplayInteractionRootAttributes as k, createGameplayPointerTargetAttributes as l };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { JsonValue, GameTopologyManifest } from '../types.js';
|
|
2
|
+
|
|
3
|
+
type GeneratedAuthoringMetadataV1 = {
|
|
4
|
+
sdkVersion: string;
|
|
5
|
+
codegenVersion: string;
|
|
6
|
+
manifestSchemaVersion: number;
|
|
7
|
+
generatedArtifactSchemaVersion: number;
|
|
8
|
+
};
|
|
9
|
+
type AuthoringValidationResultV1 = {
|
|
10
|
+
valid: boolean;
|
|
11
|
+
errors: readonly string[];
|
|
12
|
+
warnings: readonly string[];
|
|
13
|
+
};
|
|
14
|
+
type GeneratedArtifactV1 = {
|
|
15
|
+
path: string;
|
|
16
|
+
ownership: "authoritative" | "seed" | "derived-test";
|
|
17
|
+
content: string;
|
|
18
|
+
contentSha256: string;
|
|
19
|
+
};
|
|
20
|
+
type GeneratedPathPatternV1 = {
|
|
21
|
+
prefix: string;
|
|
22
|
+
suffix: string;
|
|
23
|
+
};
|
|
24
|
+
type GenerateTestArtifactsInputV1 = {
|
|
25
|
+
manifest: GameTopologyManifest;
|
|
26
|
+
};
|
|
27
|
+
type AuthoringManifestConformanceCaseV1 = {
|
|
28
|
+
id: string;
|
|
29
|
+
manifest: JsonValue;
|
|
30
|
+
expected: {
|
|
31
|
+
valid: true;
|
|
32
|
+
transportValid: true;
|
|
33
|
+
materializedSha256: string;
|
|
34
|
+
} | {
|
|
35
|
+
valid: false;
|
|
36
|
+
transportValid: boolean;
|
|
37
|
+
diagnosticCodes: readonly string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
type ProjectAuthoringAdapterV1 = {
|
|
41
|
+
protocolVersion: 1;
|
|
42
|
+
metadata: GeneratedAuthoringMetadataV1;
|
|
43
|
+
generatedPaths: readonly string[];
|
|
44
|
+
generatedPathPatterns: readonly GeneratedPathPatternV1[];
|
|
45
|
+
manifestConformanceCases: readonly AuthoringManifestConformanceCaseV1[];
|
|
46
|
+
validateManifest(manifest: unknown): AuthoringValidationResultV1;
|
|
47
|
+
materializeManifest(manifest: unknown): JsonValue;
|
|
48
|
+
generateWorkspaceArtifacts(manifest: unknown): readonly GeneratedArtifactV1[];
|
|
49
|
+
generateTestArtifacts(input: GenerateTestArtifactsInputV1): readonly GeneratedArtifactV1[];
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
declare function diagnosticCodesForValidationErrors(errors: readonly string[]): readonly string[];
|
|
53
|
+
|
|
54
|
+
declare function validateManifest(manifest: unknown): AuthoringValidationResultV1;
|
|
55
|
+
declare function materializeManifest(manifest: unknown): JsonValue;
|
|
56
|
+
declare function generateWorkspaceArtifacts(manifest: unknown): readonly GeneratedArtifactV1[];
|
|
57
|
+
declare function generateTestArtifacts(input: GenerateTestArtifactsInputV1): readonly GeneratedArtifactV1[];
|
|
58
|
+
declare const GENERATED_WORKSPACE_PATHS: readonly [...string[], "test/generated/base-state.json"];
|
|
59
|
+
declare const GENERATED_WORKSPACE_PATH_PATTERNS: {
|
|
60
|
+
prefix: string;
|
|
61
|
+
suffix: string;
|
|
62
|
+
}[];
|
|
63
|
+
declare const MANIFEST_CONFORMANCE_CASES: readonly AuthoringManifestConformanceCaseV1[];
|
|
64
|
+
declare const projectAuthoringAdapter: ProjectAuthoringAdapterV1;
|
|
65
|
+
|
|
66
|
+
export { type AuthoringManifestConformanceCaseV1, type AuthoringValidationResultV1, GENERATED_WORKSPACE_PATHS, GENERATED_WORKSPACE_PATH_PATTERNS, type GenerateTestArtifactsInputV1, type GeneratedArtifactV1, type GeneratedAuthoringMetadataV1, type GeneratedPathPatternV1, MANIFEST_CONFORMANCE_CASES, type ProjectAuthoringAdapterV1, diagnosticCodesForValidationErrors, generateTestArtifacts, generateWorkspaceArtifacts, materializeManifest, projectAuthoringAdapter, validateManifest };
|