@dreamboard-games/sdk 0.4.0-alpha.4 → 0.4.0-alpha.6
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/REFERENCE.md +1089 -123
- package/dist/{HandView-x8MhbhFl.d.ts → HandView-Bi2lxzQP.d.ts} +3 -3
- package/dist/{ThemeProvider-DRalAWzY.d.ts → ThemeProvider-CElaL2ik.d.ts} +1 -1
- package/dist/authoring/index.js +2 -2
- package/dist/browser-interaction.js +1 -1
- package/dist/{chunk-E3X552YM.js → chunk-2TRZSZGD.js} +1061 -425
- package/dist/chunk-2TRZSZGD.js.map +1 -0
- package/dist/{chunk-CP35NPPY.js → chunk-52DH7VQF.js} +61 -7
- package/dist/chunk-52DH7VQF.js.map +1 -0
- package/dist/{chunk-N6ZDIMRB.js → chunk-B2YBS3SG.js} +1 -1
- package/dist/chunk-B2YBS3SG.js.map +1 -0
- package/dist/{chunk-LKJLAGND.js → chunk-DDST4U2P.js} +2 -2
- package/dist/{chunk-SUMZ5OEH.js → chunk-HK3WN4U7.js} +2 -2
- package/dist/{chunk-SUMZ5OEH.js.map → chunk-HK3WN4U7.js.map} +1 -1
- package/dist/{chunk-QOFFRHZR.js → chunk-OV6JC2BM.js} +64 -28
- package/dist/chunk-OV6JC2BM.js.map +1 -0
- package/dist/{chunk-K5ZRJTZZ.js → chunk-PAPIAMYX.js} +6 -3
- package/dist/chunk-PAPIAMYX.js.map +1 -0
- package/dist/{chunk-TTISZQNI.js → chunk-SOBNI363.js} +39 -28
- package/dist/chunk-SOBNI363.js.map +1 -0
- package/dist/{chunk-Y6Y2YABD.js → chunk-TGMXBRKY.js} +22 -6
- package/dist/chunk-TGMXBRKY.js.map +1 -0
- package/dist/{chunk-XZ667T4K.js → chunk-UC2UXAC6.js} +2 -2
- package/dist/{chunk-O6M6PN4E.js → chunk-UUQNOGZV.js} +94 -53
- package/dist/chunk-UUQNOGZV.js.map +1 -0
- package/dist/{chunk-WUIVY2KE.js → chunk-WHR5UW3F.js} +1 -1
- package/dist/chunk-WHR5UW3F.js.map +1 -0
- package/dist/codegen.d.ts +13 -0
- package/dist/codegen.js +1 -1
- package/dist/{components-B7hFaEn_.d.ts → components-BTwSIjXj.d.ts} +77 -206
- package/dist/{hex-board-view-BFlWDb9k.d.ts → hex-board-view-aKkblDp6.d.ts} +180 -1
- package/dist/{index-gjxQichK.d.ts → index-CFTjJIXd.d.ts} +5 -4
- package/dist/{index.d-BL3bT5lt.d.ts → index.d-DMASeF6M.d.ts} +294 -27
- package/dist/index.js +2 -2
- package/dist/package-set.d.ts +2 -2
- package/dist/package-set.js +2 -2
- package/dist/{runtime-api-BJharVaj.d.ts → plugin-state-BRH3UiUp.d.ts} +19 -3
- package/dist/{protocol-BP193lva.d.ts → protocol-835hEGne.d.ts} +42 -1
- package/dist/reducer/advanced.d.ts +4 -2
- package/dist/reducer/advanced.js +1 -1
- package/dist/reducer-contract.d.ts +1 -1
- package/dist/reducer-contract.js +2 -2
- package/dist/reducer.d.ts +10 -4
- package/dist/reducer.js +317 -15
- package/dist/reducer.js.map +1 -1
- package/dist/runtime/primitives.d.ts +32 -7
- package/dist/runtime/primitives.js +9 -5
- package/dist/runtime/runtime-api.d.ts +1 -1
- package/dist/runtime/workspace-contract.d.ts +7 -7
- package/dist/runtime/workspace-contract.js +6 -6
- package/dist/runtime-Dkfm1x2r.d.ts +1670 -0
- package/dist/runtime.d.ts +10 -9
- package/dist/runtime.js +240 -16
- package/dist/runtime.js.map +1 -1
- package/dist/testing.d.ts +78 -15
- package/dist/testing.js +69 -8
- package/dist/testing.js.map +1 -1
- package/dist/{types-CYeN0wLK.d.ts → types-aI4V9CWe.d.ts} +5 -5
- package/dist/types.d.ts +13 -0
- package/dist/ui/components.d.ts +6 -3
- package/dist/ui/components.js +15 -3
- package/dist/ui/plugin-styles.css +2 -2
- package/dist/{ui-contract-B4NjRlvC.d.ts → ui-contract-Ue6SywvO.d.ts} +24 -10
- package/dist/ui.d.ts +9 -6
- package/dist/ui.js +16 -4
- package/dist/views-32rSsfeU.d.ts +1559 -0
- package/package.json +21 -20
- package/dist/chunk-CP35NPPY.js.map +0 -1
- package/dist/chunk-E3X552YM.js.map +0 -1
- package/dist/chunk-K5ZRJTZZ.js.map +0 -1
- package/dist/chunk-N6ZDIMRB.js.map +0 -1
- package/dist/chunk-O6M6PN4E.js.map +0 -1
- package/dist/chunk-QOFFRHZR.js.map +0 -1
- package/dist/chunk-TTISZQNI.js.map +0 -1
- package/dist/chunk-WUIVY2KE.js.map +0 -1
- package/dist/chunk-Y6Y2YABD.js.map +0 -1
- package/dist/views-fn2RuXOx.d.ts +0 -3168
- /package/dist/{chunk-LKJLAGND.js.map → chunk-DDST4U2P.js.map} +0 -0
- /package/dist/{chunk-XZ667T4K.js.map → chunk-UC2UXAC6.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as Board, a as BoardEdgeTarget, b as BoardEdgeTargetProps, c as
|
|
1
|
+
import { bh as ZoneCardRenderItem } from '../ui-contract-Ue6SywvO.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-Ue6SywvO.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
import { f as CardIntent,
|
|
6
|
-
import { a as HandLayoutKind, b as HandLayoutPolicy, H as HandInteractionPolicy } from '../HandView-
|
|
7
|
-
import {
|
|
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 '../plugin-state-BRH3UiUp.js';
|
|
8
8
|
export { P as PrimitiveCommonProps, a as PrimitiveDataAttributes, c as composeEventHandlers, r as renderPrimitive } from '../primitive-props-BNHDkgd7.js';
|
|
9
|
-
import '../ThemeProvider-
|
|
9
|
+
import '../ThemeProvider-CElaL2ik.js';
|
|
10
10
|
import '../types.js';
|
|
11
11
|
import '../attributes-DbvyMbXw.js';
|
|
12
12
|
import '../types-DJj5MJkl.js';
|
|
@@ -206,6 +206,31 @@ interface HandSurfaceViewProps<Card extends ZoneCardRenderItem> {
|
|
|
206
206
|
* `@dreamboard-games/sdk/ui` and stay descriptor/draft unaware.
|
|
207
207
|
*/
|
|
208
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;
|
|
209
234
|
/**
|
|
210
235
|
* Convenience helper for builders of generated hand surfaces. Encodes a
|
|
211
236
|
* typed target kind plus value into the opaque `targetId` that the SDK
|
|
@@ -222,4 +247,4 @@ declare function dropTargetIdFor(kind: RuntimeDropTargetKind, value: string): st
|
|
|
222
247
|
*/
|
|
223
248
|
declare function descriptorsHaveDestinationInput(availableInteractions: readonly InteractionDescriptor[]): boolean;
|
|
224
249
|
|
|
225
|
-
export { type AuthoredCardIntent, HandSurfaceView, type HandSurfaceViewProps, type RuntimeCardIntentResult, type RuntimeDropTarget, type UseCardIntentAdapterOptions, ZoneCardRenderItem, decodeAuthoredCardIntent, descriptorsHaveDestinationInput, dropTargetIdFor, useCardIntentAdapter };
|
|
250
|
+
export { type AuthoredCardIntent, HandStagingView, type HandStagingViewProps, HandSurfaceView, type HandSurfaceViewProps, type RuntimeCardIntentResult, type RuntimeDropTarget, type UseCardIntentAdapterOptions, ZoneCardRenderItem, decodeAuthoredCardIntent, descriptorsHaveDestinationInput, dropTargetIdFor, useCardIntentAdapter };
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
BoardHexView,
|
|
6
6
|
BoardRoot,
|
|
7
7
|
BoardSpaceTarget,
|
|
8
|
+
BoardSquareGrid,
|
|
8
9
|
BoardState,
|
|
9
10
|
BoardTarget,
|
|
10
11
|
BoardVertexTarget,
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
GameChrome,
|
|
16
17
|
GameRoot,
|
|
17
18
|
GameViewport,
|
|
19
|
+
HandStagingView,
|
|
18
20
|
HandSurfaceView,
|
|
19
21
|
Interaction,
|
|
20
22
|
InteractionCardInput,
|
|
@@ -82,16 +84,16 @@ import {
|
|
|
82
84
|
useZoneCards,
|
|
83
85
|
useZonePileContext,
|
|
84
86
|
useZonePrimitiveContext
|
|
85
|
-
} from "../chunk-
|
|
86
|
-
import "../chunk-
|
|
87
|
+
} from "../chunk-OV6JC2BM.js";
|
|
88
|
+
import "../chunk-UC2UXAC6.js";
|
|
87
89
|
import "../chunk-T3ZKNUZ7.js";
|
|
88
|
-
import "../chunk-
|
|
90
|
+
import "../chunk-2TRZSZGD.js";
|
|
89
91
|
import {
|
|
90
92
|
composeEventHandlers,
|
|
91
93
|
renderPrimitive
|
|
92
94
|
} from "../chunk-VDXOF4FW.js";
|
|
93
|
-
import "../chunk-
|
|
94
|
-
import "../chunk-
|
|
95
|
+
import "../chunk-UUQNOGZV.js";
|
|
96
|
+
import "../chunk-WHR5UW3F.js";
|
|
95
97
|
import "../chunk-PF7L4BMG.js";
|
|
96
98
|
import "../chunk-PZ5AY32C.js";
|
|
97
99
|
export {
|
|
@@ -101,6 +103,7 @@ export {
|
|
|
101
103
|
BoardHexView,
|
|
102
104
|
BoardRoot,
|
|
103
105
|
BoardSpaceTarget,
|
|
106
|
+
BoardSquareGrid,
|
|
104
107
|
BoardState,
|
|
105
108
|
BoardTarget,
|
|
106
109
|
BoardVertexTarget,
|
|
@@ -111,6 +114,7 @@ export {
|
|
|
111
114
|
GameChrome,
|
|
112
115
|
GameRoot,
|
|
113
116
|
GameViewport,
|
|
117
|
+
HandStagingView,
|
|
114
118
|
HandSurfaceView,
|
|
115
119
|
Interaction,
|
|
116
120
|
InteractionCardInput,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { a as PluginSessionState, R as RuntimeAPI, b as RuntimeDiagnosticEvent, c as RuntimeDiagnosticHandler, S as SubmissionError, V as ValidationResult } from '../runtime-api-C6aWo9c0.js';
|
|
2
|
-
export { Z as ZoneHandlesSnapshot } from '../
|
|
2
|
+
export { Z as ZoneHandlesSnapshot } from '../plugin-state-BRH3UiUp.js';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { C as ClientParamSchemaMap, D as DefineGameUIConfig, W as WorkspaceBoardSurface, a as WorkspaceBoardSurfaceDescriptor, b as WorkspaceBoardTargetInputSlot, c as WorkspaceCardCollectionSurface, d as WorkspaceCardCollectionSurfaceDescriptor, e as WorkspaceCardInputSlot, f as WorkspaceFormInputSlot, g as WorkspaceHandSurface, h as WorkspaceHandSurfaceDescriptor, i as WorkspaceInteractionFormDescriptor, j as WorkspaceInteractionFormsDescriptor, k as WorkspaceInteractionSlotComponent, l as WorkspacePileSurface, m as WorkspacePileSurfaceDescriptor, n as WorkspacePilesSurfaceDescriptor, o as WorkspaceSurfaceSpec, p as createWorkspaceUIContract } from '../index-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
export { C as ClientParamSchemaMap, D as DefineGameUIConfig, W as WorkspaceBoardSurface, a as WorkspaceBoardSurfaceDescriptor, b as WorkspaceBoardTargetInputSlot, c as WorkspaceCardCollectionSurface, d as WorkspaceCardCollectionSurfaceDescriptor, e as WorkspaceCardInputSlot, f as WorkspaceFormInputSlot, g as WorkspaceHandSurface, h as WorkspaceHandSurfaceDescriptor, i as WorkspaceInteractionFormDescriptor, j as WorkspaceInteractionFormsDescriptor, k as WorkspaceInteractionSlotComponent, l as WorkspacePileSurface, m as WorkspacePileSurfaceDescriptor, n as WorkspacePilesSurfaceDescriptor, o as WorkspaceSurfaceSpec, p as createWorkspaceUIContract } from '../index-CFTjJIXd.js';
|
|
2
|
+
import { a1 as InteractionDialogProps } from '../ui-contract-Ue6SywvO.js';
|
|
3
|
+
export { c as BoardGridInteractionFilter, g as BoardHexGridProps, i as BoardHexViewProps, m as BoardSpaceTargetProps, o as BoardSquareGridInteractionFilter, p as BoardSquareGridProps, G as DreamboardUI, M as GameMeState, Q as GamePlayersState, R as GameRenderState, U as GameTurnState, b3 as TypedGame, b5 as UIContract, b7 as UIRootProps, bh as ZoneCardRenderItem, bl as ZoneListProps } from '../ui-contract-Ue6SywvO.js';
|
|
4
4
|
export { b as ResourceCounterComponents } from '../ResourceCounter-BFxJknqp.js';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
import '../hex-board-view-
|
|
6
|
+
import '../hex-board-view-aKkblDp6.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '../player-state-Cqpyeql0.js';
|
|
9
9
|
import '../types.js';
|
|
10
|
-
import '../ThemeProvider-
|
|
11
|
-
import '../
|
|
12
|
-
import '../runtime-api-C6aWo9c0.js';
|
|
10
|
+
import '../ThemeProvider-CElaL2ik.js';
|
|
11
|
+
import '../plugin-state-BRH3UiUp.js';
|
|
13
12
|
import '../primitive-props-BNHDkgd7.js';
|
|
14
13
|
import '../attributes-DbvyMbXw.js';
|
|
15
14
|
import '../types-DJj5MJkl.js';
|
|
15
|
+
import '../runtime-api-C6aWo9c0.js';
|
|
16
16
|
|
|
17
17
|
interface WorkspaceInteractionFormDialogProps extends Omit<InteractionDialogProps, "children"> {
|
|
18
18
|
title: ReactNode;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkspaceUIContract
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-SOBNI363.js";
|
|
4
|
+
import "../chunk-OV6JC2BM.js";
|
|
5
|
+
import "../chunk-UC2UXAC6.js";
|
|
6
6
|
import "../chunk-T3ZKNUZ7.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-2TRZSZGD.js";
|
|
8
8
|
import "../chunk-VDXOF4FW.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-UUQNOGZV.js";
|
|
10
|
+
import "../chunk-WHR5UW3F.js";
|
|
11
11
|
import "../chunk-PF7L4BMG.js";
|
|
12
12
|
import "../chunk-PZ5AY32C.js";
|
|
13
13
|
export {
|