@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
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { bh as ZoneCardRenderItem } from '../ui-contract-GTUPkf8z.js';
|
|
2
|
-
export { B as Board, a as BoardEdgeTarget, b as BoardEdgeTargetProps, c as BoardGridInteractionFilter, d as BoardHexGrid, e as BoardHexGridInteractionFilter, f as BoardHexGridInteractions, g as BoardHexGridProps, h as BoardHexView, i as BoardHexViewProps, j as BoardRoot, k as BoardRootProps, l as BoardSpaceTarget, m as BoardSpaceTargetProps, n as BoardSquareGrid, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, q as BoardState, r as BoardStateProps, s as BoardTarget, t as BoardTargetExtraInputs, u as BoardTargetProps, v as BoardVertexTarget, w as BoardVertexTargetProps, D as Dice, x as DiceComponents, y as DiceRoot, z as DiceRootProps, A as DiceState, C as DiceValue, E as DiceValues, F as DiceValuesProps, H as Game, I as GameActiveActionState, J as GameChrome, K as GameChromeProps, L as GameChromeState, M as GameMeState, N as GamePendingInputState, O as GamePlayer, P as GamePlayerEntry, Q as GamePlayersState, R as GameRenderState, S as GameRoot, T as GameRootProps, U as GameTurnState, V as GameViewport, W as GameViewportProps, X as Interaction, Y as InteractionCardInput, Z as InteractionCardInputProps, _ as InteractionCardInputRenderState, $ as InteractionDescription, a0 as InteractionDialog, a1 as InteractionDialogProps, a2 as InteractionDialogRenderState, a3 as InteractionDialogState, a4 as InteractionFieldPrimitiveProps, a5 as InteractionFormPrimitive, a6 as InteractionFormPrimitiveProps, a7 as InteractionInput, a8 as InteractionInputProps, a9 as InteractionLabel, aa as InteractionPartProps, ab as InteractionRoot, ac as InteractionRootProps, ad as InteractionRoute, ae as InteractionRoutes, af as InteractionRoutesMap, ag as InteractionRoutesProps, ah as InteractionState, ai as InteractionStateProps, aj as InteractionStateSnapshot, ak as InteractionSubmit, al as InteractionSubmitProps, am as InteractionSwitch, an as InteractionSwitchProps, ao as InteractionSwitchRenderState, ap as InteractionSwitchRouteMap, aq as InteractionTrigger, ar as InteractionTriggerProps, as as InteractionUnavailableMessage, at as InteractionValidationMessage, au as Phase, av as PhaseFallback, aw as PhaseRouteMap, ax as PhaseSwitch, ay as PhaseSwitchProps, az as PlayerRoster, aA as PlayerRosterBadge, aB as PlayerRosterBadges, aC as PlayerRosterComponents, aD as PlayerRosterEmpty, aE as PlayerRosterEntry, aF as PlayerRosterList, aG as PlayerRosterListProps, aH as PlayerRosterName, aI as PlayerRosterPartProps, aJ as PlayerRosterRoot, aK as PlayerRosterRootProps, aL as PlayerRosterScore, aM as Prompt, aN as PromptDialog, aO as PromptDialogProps, aP as PromptDialogRenderState, aQ as PromptDialogState, aR as PromptInbox, aS as PromptInboxEmpty, aT as PromptInboxItems, aU as PromptInboxItemsProps, aV as PromptInboxRoot, aW as PromptMessage, aX as PromptOption, aY as PromptOptionProps, aZ as PromptOptionRenderItem, a_ as PromptOptions, a$ as PromptOptionsProps, b0 as PromptRoot, b1 as PromptRootProps, b2 as PromptTitle, b4 as UI, b6 as UIRoot, b7 as UIRootProps, b8 as UseZoneCardsOptions, b9 as UseZoneCardsResult, ba as Zone, bb as ZoneCardAction, bc as ZoneCardActionExtraInputs, bd as ZoneCardActionProps, be as ZoneCardActionResult, bf as ZoneCardAt, bg as ZoneCardAtProps, bi as ZoneItem, bj as ZoneItemProps, bk as ZoneList, bl as ZoneListProps, bm as ZonePileCards, bn as ZonePileCardsProps, bo as ZonePileContextValue, bp as ZonePileCount, bq as ZonePileCountProps, br as ZonePileDescription, bs as ZonePileDescriptionProps, bt as ZonePileLabel, bu as ZonePileLabelProps, bv as ZonePileRoot, bw as ZonePileRootProps, bx as ZonePileTrigger, by as ZonePileTriggerProps, bz as ZoneRoot, bA as ZoneRootProps, bB as ZoneTopCard, bC as ZoneTopCardProps, bD as createZoneCardRenderItem, bE as normalizeDiceState, bF as useBoardPrimitiveContext, bG as useDicePrimitiveContext, bH as useGameActionError, bI as useInteractionPrimitiveContext, bJ as useOptionalZonePrimitiveContext, bK as useResolvedCardTargetValue, bL as useZoneCardContext, bM as useZoneCards, bN as useZonePileContext, bO as useZonePrimitiveContext } from '../ui-contract-GTUPkf8z.js';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { ReactNode } from 'react';
|
|
5
|
-
import { f as CardIntent, P as InteractionVisualState, C as CardDropTargetVisualState } from '../hex-board-view-aKkblDp6.js';
|
|
6
|
-
import { a as HandLayoutKind, b as HandLayoutPolicy, H as HandInteractionPolicy } from '../HandView-Bi2lxzQP.js';
|
|
7
|
-
import { b as InteractionDescriptor } from '../runtime-api-Bz5pwNU_.js';
|
|
8
|
-
export { P as PrimitiveCommonProps, a as PrimitiveDataAttributes, c as composeEventHandlers, r as renderPrimitive } from '../primitive-props-BNHDkgd7.js';
|
|
9
|
-
import '../ThemeProvider-CElaL2ik.js';
|
|
10
|
-
import '../types.js';
|
|
11
|
-
import '../attributes-DbvyMbXw.js';
|
|
12
|
-
import '../types-DJj5MJkl.js';
|
|
13
|
-
import '../player-state-Cqpyeql0.js';
|
|
14
|
-
import './protocol-dYgafTYY.js';
|
|
15
|
-
|
|
16
|
-
interface InteractionDraftReadiness {
|
|
17
|
-
values: Record<string, unknown>;
|
|
18
|
-
missingInputs: readonly string[];
|
|
19
|
-
readyFrontier: readonly string[];
|
|
20
|
-
blockedInputs: readonly string[];
|
|
21
|
-
fieldErrors: Partial<Record<string, readonly string[]>>;
|
|
22
|
-
ready: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type RuntimeDropTargetKind = "card" | "space" | "edge" | "vertex" | "tile";
|
|
26
|
-
type CardIntentResult = {
|
|
27
|
-
status: "ignored";
|
|
28
|
-
reason: CardIntentIgnoredReason;
|
|
29
|
-
} | {
|
|
30
|
-
status: "pending";
|
|
31
|
-
descriptor: InteractionDescriptor;
|
|
32
|
-
readiness: InteractionDraftReadiness;
|
|
33
|
-
params: Record<string, unknown>;
|
|
34
|
-
} | {
|
|
35
|
-
status: "submitted";
|
|
36
|
-
descriptor: InteractionDescriptor;
|
|
37
|
-
readiness: InteractionDraftReadiness;
|
|
38
|
-
params: Record<string, unknown>;
|
|
39
|
-
} | {
|
|
40
|
-
status: "submitting";
|
|
41
|
-
descriptor: InteractionDescriptor;
|
|
42
|
-
readiness: InteractionDraftReadiness;
|
|
43
|
-
params: Record<string, unknown>;
|
|
44
|
-
} | {
|
|
45
|
-
status: "error";
|
|
46
|
-
descriptor: InteractionDescriptor;
|
|
47
|
-
error: unknown;
|
|
48
|
-
};
|
|
49
|
-
type CardIntentIgnoredReason = "no-descriptor" | "interaction-unavailable" | "no-card-input" | "card-not-eligible" | "drop-target-not-decodable" | "drop-target-input-unknown" | "drop-target-not-eligible" | "ambiguous-drop" | "already-submitting";
|
|
50
|
-
|
|
51
|
-
type RuntimeCardIntentResult = CardIntentResult;
|
|
52
|
-
/**
|
|
53
|
-
* Author-facing card intent. Mirrors the SDK shape, but for `drop` intents
|
|
54
|
-
* `targetId` is the manifest id (e.g. `"hex-a"`) — the runtime adapter
|
|
55
|
-
* decodes the opaque SDK target id before invoking author callbacks. This
|
|
56
|
-
* matches the type the generated `hand.Hand` facade declares.
|
|
57
|
-
*/
|
|
58
|
-
type AuthoredCardIntent = {
|
|
59
|
-
type: "activate";
|
|
60
|
-
cardId: string;
|
|
61
|
-
source: "tap" | "keyboard";
|
|
62
|
-
} | {
|
|
63
|
-
type: "previewStart";
|
|
64
|
-
cardId: string;
|
|
65
|
-
} | {
|
|
66
|
-
type: "previewEnd";
|
|
67
|
-
cardId: string;
|
|
68
|
-
} | {
|
|
69
|
-
type: "drop";
|
|
70
|
-
cardId: string;
|
|
71
|
-
targetId: string;
|
|
72
|
-
source: "pointer" | "keyboard";
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Translate a raw SDK `CardIntent` into the author-facing
|
|
76
|
-
* `AuthoredCardIntent` shape. For drop intents the opaque encoded
|
|
77
|
-
* `targetId` is decoded into its manifest value; non-decodable target
|
|
78
|
-
* ids fall through unchanged so authors can detect and ignore them.
|
|
79
|
-
*/
|
|
80
|
-
declare function decodeAuthoredCardIntent(intent: CardIntent): AuthoredCardIntent;
|
|
81
|
-
interface UseCardIntentAdapterOptions {
|
|
82
|
-
/** Zone the hand is rendering. Used for snapshot lookup. */
|
|
83
|
-
zone: string;
|
|
84
|
-
/**
|
|
85
|
-
* Optional hook for the host to react to the runtime classification of an
|
|
86
|
-
* intent. Useful for confirmation animations or analytics. The intent is
|
|
87
|
-
* already routed by the time this fires. Receives the decoded
|
|
88
|
-
* authored-shape intent so `targetId` is the manifest id, not the SDK
|
|
89
|
-
* opaque encoding.
|
|
90
|
-
*/
|
|
91
|
-
onResult?: (intent: AuthoredCardIntent, result: RuntimeCardIntentResult) => void;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Bind SDK card intent emission to the canonical runtime collector pipeline.
|
|
95
|
-
*
|
|
96
|
-
* The returned callback accepts the SDK `CardIntent` shape unchanged. The
|
|
97
|
-
* adapter looks up the descriptor for the originating card, atomically
|
|
98
|
-
* applies the card and any decoded drop-target inputs, and routes
|
|
99
|
-
* pending/submitting/submitted classifications through the runtime API.
|
|
100
|
-
*
|
|
101
|
-
* Preview intents are forwarded to the optional `onResult` callback as
|
|
102
|
-
* `ignored` results so authors can attach analytics without owning the
|
|
103
|
-
* routing logic themselves.
|
|
104
|
-
*/
|
|
105
|
-
declare function useCardIntentAdapter({ zone, onResult, }: UseCardIntentAdapterOptions): (intent: CardIntent) => Promise<RuntimeCardIntentResult>;
|
|
106
|
-
|
|
107
|
-
interface RuntimeDropTarget {
|
|
108
|
-
/** Stable opaque id; runtime adapter encodes the inputKey + value here. */
|
|
109
|
-
targetId: string;
|
|
110
|
-
/** Plain text label used by the SDK live-region announcements. */
|
|
111
|
-
label: string;
|
|
112
|
-
/** Optional `CardDropTargetVisualState` overrides. */
|
|
113
|
-
visualState?: CardDropTargetVisualState;
|
|
114
|
-
/** Visible content inside the drop target. */
|
|
115
|
-
render: (state: CardDropTargetVisualState) => ReactNode;
|
|
116
|
-
/** ARIA role override. Defaults to "button". */
|
|
117
|
-
role?: string;
|
|
118
|
-
/** Extra container className. */
|
|
119
|
-
className?: string;
|
|
120
|
-
/** Order hint for keyboard traversal. */
|
|
121
|
-
order?: number;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Per-hand summary projected alongside the card list. Authors can render
|
|
125
|
-
* counts ("3 of 5 selected") without re-deriving selection state.
|
|
126
|
-
*/
|
|
127
|
-
interface HandSelectionSummary {
|
|
128
|
-
/** How many cards in this hand are part of the active many-select draft. */
|
|
129
|
-
selectedCount: number;
|
|
130
|
-
/** Card ids currently in the many-select draft, in iteration order. */
|
|
131
|
-
selectedIds: readonly string[];
|
|
132
|
-
/**
|
|
133
|
-
* Whether at least one descriptor in this zone has form-side validation
|
|
134
|
-
* errors against the current draft. Authors can use this to render an
|
|
135
|
-
* inline hint without inspecting individual fields.
|
|
136
|
-
*/
|
|
137
|
-
hasInvalidSelection: boolean;
|
|
138
|
-
}
|
|
139
|
-
interface HandSurfaceViewProps<Card extends ZoneCardRenderItem> {
|
|
140
|
-
zone: string;
|
|
141
|
-
cards: readonly Card[];
|
|
142
|
-
/** Visual surface for a single card. */
|
|
143
|
-
renderCard: (card: Card, state: InteractionVisualState, index: number) => ReactNode;
|
|
144
|
-
/**
|
|
145
|
-
* Render-safe slot for selection summary content. Fires during render with
|
|
146
|
-
* the latest projected summary so authors can compose count chrome inline.
|
|
147
|
-
* The returned node is hoisted above the hand region. Use this for visible
|
|
148
|
-
* UI; use `onSelectionSummary` only for analytics or external state mirrors
|
|
149
|
-
* that need an effect.
|
|
150
|
-
*/
|
|
151
|
-
summarySlot?: (summary: HandSelectionSummary) => ReactNode;
|
|
152
|
-
/**
|
|
153
|
-
* Optional selection summary observer. Invoked from a layout effect so
|
|
154
|
-
* consumers may safely call `setState` in response. Use `summarySlot` for
|
|
155
|
-
* inline rendering instead — that path avoids effect-timing surprises.
|
|
156
|
-
*/
|
|
157
|
-
onSelectionSummary?: (summary: HandSelectionSummary) => void;
|
|
158
|
-
/**
|
|
159
|
-
* Render-safe slot for the hand's commit/action chrome. Receives the same
|
|
160
|
-
* live summary as `summarySlot`. Rendered below the hand inline on desktop
|
|
161
|
-
* and pinned as a sticky footer inside the mobile dock, so the action stays
|
|
162
|
-
* reachable while the hand is docked.
|
|
163
|
-
*/
|
|
164
|
-
actionsSlot?: (summary: HandSelectionSummary) => ReactNode;
|
|
165
|
-
/** Layout policy forwarded to the SDK HandView. */
|
|
166
|
-
layout?: HandLayoutKind | HandLayoutPolicy;
|
|
167
|
-
/** Mobile interaction policy. Defaults to `direct-activate`. */
|
|
168
|
-
mobileInteraction?: HandInteractionPolicy;
|
|
169
|
-
/**
|
|
170
|
-
* Drop targets to render around the hand. When provided, the hand renders
|
|
171
|
-
* inside a `CardDragSurface` so SDK `drop` intents arrive with an opaque
|
|
172
|
-
* target id that the runtime adapter can decode.
|
|
173
|
-
*/
|
|
174
|
-
dropTargets?: readonly RuntimeDropTarget[];
|
|
175
|
-
/**
|
|
176
|
-
* Optional outer chrome around the drop targets, when `dropTargets` is
|
|
177
|
-
* provided. Defaults to a flex row above the hand.
|
|
178
|
-
*/
|
|
179
|
-
renderDropTargets?: (children: ReactNode) => ReactNode;
|
|
180
|
-
/** Card width hint forwarded to the SDK HandView. */
|
|
181
|
-
cardSize?: "sm" | "md" | "lg";
|
|
182
|
-
/** Extra empty-state slot. */
|
|
183
|
-
renderEmpty?: () => ReactNode;
|
|
184
|
-
/** ARIA label for the hand region. */
|
|
185
|
-
ariaLabel?: string;
|
|
186
|
-
/**
|
|
187
|
-
* Optional analytics hook. Receives the decoded authored intent (so
|
|
188
|
-
* `targetId` is the manifest value, not the SDK opaque encoding) plus
|
|
189
|
-
* the runtime classification.
|
|
190
|
-
*/
|
|
191
|
-
onIntentRouted?: (intent: AuthoredCardIntent, result: RuntimeCardIntentResult) => void;
|
|
192
|
-
className?: string;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Generated hand presentation entry point.
|
|
196
|
-
*
|
|
197
|
-
* Lives in `ui-runtime` because it owns:
|
|
198
|
-
*
|
|
199
|
-
* - mapping descriptor/draft state into SDK `InteractionVisualState`
|
|
200
|
-
* - hiding selected cards from the visible hand layout while the runtime keeps
|
|
201
|
-
* the actual zone snapshot intact
|
|
202
|
-
* - forwarding SDK `CardIntent` through the canonical collector adapter
|
|
203
|
-
*
|
|
204
|
-
* The component is intentionally Dreamboard-aware. The presentational
|
|
205
|
-
* pieces (`HandView`, `CardDragSurface`, `CardDropTargetView`) come from
|
|
206
|
-
* `@dreamboard-games/sdk/ui` and stay descriptor/draft unaware.
|
|
207
|
-
*/
|
|
208
|
-
declare function HandSurfaceView<Card extends ZoneCardRenderItem>({ zone, cards, renderCard, layout, mobileInteraction, dropTargets, renderDropTargets, cardSize, renderEmpty, ariaLabel, onIntentRouted, onSelectionSummary, summarySlot, actionsSlot, className, }: HandSurfaceViewProps<Card>): react_jsx_runtime.JSX.Element;
|
|
209
|
-
interface HandStagingViewProps {
|
|
210
|
-
/** Zone whose many-select collection this stages. */
|
|
211
|
-
zone: string;
|
|
212
|
-
/** Visual for a staged card. */
|
|
213
|
-
renderCard: (card: ZoneCardRenderItem) => ReactNode;
|
|
214
|
-
/** Custom empty-slot content. */
|
|
215
|
-
renderEmptySlot?: (index: number) => ReactNode;
|
|
216
|
-
/** Heading above the slots. */
|
|
217
|
-
label?: ReactNode;
|
|
218
|
-
cardSize?: "sm" | "md" | "lg";
|
|
219
|
-
ariaLabel?: string;
|
|
220
|
-
className?: string;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Dreamboard-aware staging surface for a many-select card collection (e.g. the
|
|
224
|
-
* cards you've chosen to pass). Projects the live draft into a fixed,
|
|
225
|
-
* always-visible row of slots (empty placeholders until something is staged);
|
|
226
|
-
* tapping a staged card routes an `activate` intent, which toggles it back out
|
|
227
|
-
* of the collection so it returns to the hand. Adds no draft logic — the
|
|
228
|
-
* presentational layout/theming lives in the SDK `StagingZone`.
|
|
229
|
-
*
|
|
230
|
-
* Renders nothing when the zone has no active many-select collection and
|
|
231
|
-
* nothing staged, so authors can mount it unconditionally.
|
|
232
|
-
*/
|
|
233
|
-
declare function HandStagingView({ zone, renderCard, renderEmptySlot, label, cardSize, ariaLabel, className, }: HandStagingViewProps): react_jsx_runtime.JSX.Element | null;
|
|
234
|
-
/**
|
|
235
|
-
* Convenience helper for builders of generated hand surfaces. Encodes a
|
|
236
|
-
* typed target kind plus value into the opaque `targetId` that the SDK
|
|
237
|
-
* presents to its drop pipeline. The runtime adapter resolves the kind to
|
|
238
|
-
* the matching descriptor input at drop time, so authors never need to
|
|
239
|
-
* know collector input names. Generated typed targets call this internally.
|
|
240
|
-
*/
|
|
241
|
-
declare function dropTargetIdFor(kind: RuntimeDropTargetKind, value: string): string;
|
|
242
|
-
/**
|
|
243
|
-
* Determine whether any descriptor in the available list expects a board or
|
|
244
|
-
* card destination input alongside a card target. Used by generated facades
|
|
245
|
-
* to decide whether to mount a drag surface even before the author wires
|
|
246
|
-
* dropTargets.
|
|
247
|
-
*/
|
|
248
|
-
declare function descriptorsHaveDestinationInput(availableInteractions: readonly InteractionDescriptor[]): boolean;
|
|
249
|
-
|
|
250
|
-
export { type AuthoredCardIntent, HandStagingView, type HandStagingViewProps, HandSurfaceView, type HandSurfaceViewProps, type RuntimeCardIntentResult, type RuntimeDropTarget, type UseCardIntentAdapterOptions, ZoneCardRenderItem, decodeAuthoredCardIntent, descriptorsHaveDestinationInput, dropTargetIdFor, useCardIntentAdapter };
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Board,
|
|
3
|
-
BoardEdgeTarget,
|
|
4
|
-
BoardHexGrid,
|
|
5
|
-
BoardHexView,
|
|
6
|
-
BoardRoot,
|
|
7
|
-
BoardSpaceTarget,
|
|
8
|
-
BoardSquareGrid,
|
|
9
|
-
BoardState,
|
|
10
|
-
BoardTarget,
|
|
11
|
-
BoardVertexTarget,
|
|
12
|
-
Dice,
|
|
13
|
-
DiceRoot,
|
|
14
|
-
DiceValues,
|
|
15
|
-
Game,
|
|
16
|
-
GameChrome,
|
|
17
|
-
GameRoot,
|
|
18
|
-
GameViewport,
|
|
19
|
-
HandStagingView,
|
|
20
|
-
HandSurfaceView,
|
|
21
|
-
Interaction,
|
|
22
|
-
InteractionCardInput,
|
|
23
|
-
InteractionDescription,
|
|
24
|
-
InteractionDialog,
|
|
25
|
-
InteractionFormPrimitive,
|
|
26
|
-
InteractionInput,
|
|
27
|
-
InteractionLabel,
|
|
28
|
-
InteractionRoot,
|
|
29
|
-
InteractionRoutes,
|
|
30
|
-
InteractionState,
|
|
31
|
-
InteractionSubmit,
|
|
32
|
-
InteractionSwitch,
|
|
33
|
-
InteractionTrigger,
|
|
34
|
-
InteractionUnavailableMessage,
|
|
35
|
-
InteractionValidationMessage,
|
|
36
|
-
Phase,
|
|
37
|
-
PhaseSwitch,
|
|
38
|
-
PlayerRoster,
|
|
39
|
-
PlayerRosterBadges,
|
|
40
|
-
PlayerRosterEmpty,
|
|
41
|
-
PlayerRosterList,
|
|
42
|
-
PlayerRosterName,
|
|
43
|
-
PlayerRosterRoot,
|
|
44
|
-
PlayerRosterScore,
|
|
45
|
-
Prompt,
|
|
46
|
-
PromptDialog,
|
|
47
|
-
PromptInbox,
|
|
48
|
-
PromptInboxEmpty,
|
|
49
|
-
PromptInboxItems,
|
|
50
|
-
PromptInboxRoot,
|
|
51
|
-
PromptMessage,
|
|
52
|
-
PromptOption,
|
|
53
|
-
PromptOptions,
|
|
54
|
-
PromptRoot,
|
|
55
|
-
PromptTitle,
|
|
56
|
-
UI,
|
|
57
|
-
UIRoot,
|
|
58
|
-
Zone,
|
|
59
|
-
ZoneCardAction,
|
|
60
|
-
ZoneCardAt,
|
|
61
|
-
ZoneItem,
|
|
62
|
-
ZoneList,
|
|
63
|
-
ZonePileCards,
|
|
64
|
-
ZonePileCount,
|
|
65
|
-
ZonePileDescription,
|
|
66
|
-
ZonePileLabel,
|
|
67
|
-
ZonePileRoot,
|
|
68
|
-
ZonePileTrigger,
|
|
69
|
-
ZoneRoot,
|
|
70
|
-
ZoneTopCard,
|
|
71
|
-
createZoneCardRenderItem,
|
|
72
|
-
decodeAuthoredCardIntent,
|
|
73
|
-
descriptorsHaveDestinationInput,
|
|
74
|
-
dropTargetIdFor,
|
|
75
|
-
normalizeDiceState,
|
|
76
|
-
useBoardPrimitiveContext,
|
|
77
|
-
useCardIntentAdapter,
|
|
78
|
-
useDicePrimitiveContext,
|
|
79
|
-
useGameActionError,
|
|
80
|
-
useInteractionPrimitiveContext,
|
|
81
|
-
useOptionalZonePrimitiveContext,
|
|
82
|
-
useResolvedCardTargetValue,
|
|
83
|
-
useZoneCardContext,
|
|
84
|
-
useZoneCards,
|
|
85
|
-
useZonePileContext,
|
|
86
|
-
useZonePrimitiveContext
|
|
87
|
-
} from "../chunk-LR3ZTWQF.js";
|
|
88
|
-
import "../chunk-T3ZKNUZ7.js";
|
|
89
|
-
import "../chunk-GDPKTBUR.js";
|
|
90
|
-
import "../chunk-3SKDNDPG.js";
|
|
91
|
-
import "../chunk-32PFKDV7.js";
|
|
92
|
-
import {
|
|
93
|
-
composeEventHandlers,
|
|
94
|
-
renderPrimitive
|
|
95
|
-
} from "../chunk-VDXOF4FW.js";
|
|
96
|
-
import "../chunk-WHR5UW3F.js";
|
|
97
|
-
import "../chunk-VCDWP5VL.js";
|
|
98
|
-
import "../chunk-PF7L4BMG.js";
|
|
99
|
-
import "../chunk-PZ5AY32C.js";
|
|
100
|
-
export {
|
|
101
|
-
Board,
|
|
102
|
-
BoardEdgeTarget,
|
|
103
|
-
BoardHexGrid,
|
|
104
|
-
BoardHexView,
|
|
105
|
-
BoardRoot,
|
|
106
|
-
BoardSpaceTarget,
|
|
107
|
-
BoardSquareGrid,
|
|
108
|
-
BoardState,
|
|
109
|
-
BoardTarget,
|
|
110
|
-
BoardVertexTarget,
|
|
111
|
-
Dice,
|
|
112
|
-
DiceRoot,
|
|
113
|
-
DiceValues,
|
|
114
|
-
Game,
|
|
115
|
-
GameChrome,
|
|
116
|
-
GameRoot,
|
|
117
|
-
GameViewport,
|
|
118
|
-
HandStagingView,
|
|
119
|
-
HandSurfaceView,
|
|
120
|
-
Interaction,
|
|
121
|
-
InteractionCardInput,
|
|
122
|
-
InteractionDescription,
|
|
123
|
-
InteractionDialog,
|
|
124
|
-
InteractionFormPrimitive,
|
|
125
|
-
InteractionInput,
|
|
126
|
-
InteractionLabel,
|
|
127
|
-
InteractionRoot,
|
|
128
|
-
InteractionRoutes,
|
|
129
|
-
InteractionState,
|
|
130
|
-
InteractionSubmit,
|
|
131
|
-
InteractionSwitch,
|
|
132
|
-
InteractionTrigger,
|
|
133
|
-
InteractionUnavailableMessage,
|
|
134
|
-
InteractionValidationMessage,
|
|
135
|
-
Phase,
|
|
136
|
-
PhaseSwitch,
|
|
137
|
-
PlayerRoster,
|
|
138
|
-
PlayerRosterBadges,
|
|
139
|
-
PlayerRosterEmpty,
|
|
140
|
-
PlayerRosterList,
|
|
141
|
-
PlayerRosterName,
|
|
142
|
-
PlayerRosterRoot,
|
|
143
|
-
PlayerRosterScore,
|
|
144
|
-
Prompt,
|
|
145
|
-
PromptDialog,
|
|
146
|
-
PromptInbox,
|
|
147
|
-
PromptInboxEmpty,
|
|
148
|
-
PromptInboxItems,
|
|
149
|
-
PromptInboxRoot,
|
|
150
|
-
PromptMessage,
|
|
151
|
-
PromptOption,
|
|
152
|
-
PromptOptions,
|
|
153
|
-
PromptRoot,
|
|
154
|
-
PromptTitle,
|
|
155
|
-
UI,
|
|
156
|
-
UIRoot,
|
|
157
|
-
Zone,
|
|
158
|
-
ZoneCardAction,
|
|
159
|
-
ZoneCardAt,
|
|
160
|
-
ZoneItem,
|
|
161
|
-
ZoneList,
|
|
162
|
-
ZonePileCards,
|
|
163
|
-
ZonePileCount,
|
|
164
|
-
ZonePileDescription,
|
|
165
|
-
ZonePileLabel,
|
|
166
|
-
ZonePileRoot,
|
|
167
|
-
ZonePileTrigger,
|
|
168
|
-
ZoneRoot,
|
|
169
|
-
ZoneTopCard,
|
|
170
|
-
composeEventHandlers,
|
|
171
|
-
createZoneCardRenderItem,
|
|
172
|
-
decodeAuthoredCardIntent,
|
|
173
|
-
descriptorsHaveDestinationInput,
|
|
174
|
-
dropTargetIdFor,
|
|
175
|
-
normalizeDiceState,
|
|
176
|
-
renderPrimitive,
|
|
177
|
-
useBoardPrimitiveContext,
|
|
178
|
-
useCardIntentAdapter,
|
|
179
|
-
useDicePrimitiveContext,
|
|
180
|
-
useGameActionError,
|
|
181
|
-
useInteractionPrimitiveContext,
|
|
182
|
-
useOptionalZonePrimitiveContext,
|
|
183
|
-
useResolvedCardTargetValue,
|
|
184
|
-
useZoneCardContext,
|
|
185
|
-
useZoneCards,
|
|
186
|
-
useZonePileContext,
|
|
187
|
-
useZonePrimitiveContext
|
|
188
|
-
};
|
|
189
|
-
//# sourceMappingURL=primitives.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=runtime-api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|