@dreamboard-games/sdk 0.2.0
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/LICENSE.md +96 -0
- package/README.md +12 -0
- package/dist/HandView-ncJIVLhN.d.ts +193 -0
- package/dist/ResourceCounter-CTREyF73.d.ts +102 -0
- package/dist/ThemeProvider-fy0_QzgO.d.ts +99 -0
- package/dist/bundle-TIZcw8LB.d.ts +281 -0
- package/dist/cards-Sl3b40Mv.d.ts +13 -0
- package/dist/chunk-7YAHLYBR.js +481 -0
- package/dist/chunk-7YAHLYBR.js.map +1 -0
- package/dist/chunk-FDNZTDD6.js +8085 -0
- package/dist/chunk-FDNZTDD6.js.map +1 -0
- package/dist/chunk-GKKBPPSW.js +598 -0
- package/dist/chunk-GKKBPPSW.js.map +1 -0
- package/dist/chunk-I46YJSOD.js +1 -0
- package/dist/chunk-I46YJSOD.js.map +1 -0
- package/dist/chunk-KAELH4KC.js +104 -0
- package/dist/chunk-KAELH4KC.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-T3ZKNUZ7.js +1 -0
- package/dist/chunk-T3ZKNUZ7.js.map +1 -0
- package/dist/chunk-T52J5RMF.js +1 -0
- package/dist/chunk-T52J5RMF.js.map +1 -0
- package/dist/chunk-TDSWKVZ4.js +5401 -0
- package/dist/chunk-TDSWKVZ4.js.map +1 -0
- package/dist/chunk-U5C6BONG.js +34 -0
- package/dist/chunk-U5C6BONG.js.map +1 -0
- package/dist/chunk-VDXOF4FW.js +69 -0
- package/dist/chunk-VDXOF4FW.js.map +1 -0
- package/dist/chunk-VFTAA4WO.js +115 -0
- package/dist/chunk-VFTAA4WO.js.map +1 -0
- package/dist/chunk-WN74KVNY.js +17 -0
- package/dist/chunk-WN74KVNY.js.map +1 -0
- package/dist/chunk-WYPQ3GG5.js +10990 -0
- package/dist/chunk-WYPQ3GG5.js.map +1 -0
- package/dist/components-D5ZRE2Hl.d.ts +1451 -0
- package/dist/generated/runtime/primitives.d.ts +12 -0
- package/dist/generated/runtime/primitives.js +180 -0
- package/dist/generated/runtime/primitives.js.map +1 -0
- package/dist/generated/runtime-api.d.ts +3 -0
- package/dist/generated/runtime-api.js +2 -0
- package/dist/generated/runtime-api.js.map +1 -0
- package/dist/generated/runtime.d.ts +14 -0
- package/dist/generated/runtime.js +18 -0
- package/dist/generated/runtime.js.map +1 -0
- package/dist/generated/workspace-contract.d.ts +14 -0
- package/dist/generated/workspace-contract.js +14 -0
- package/dist/generated/workspace-contract.js.map +1 -0
- package/dist/hex-board-view-D_07hO6O.d.ts +933 -0
- package/dist/hex-color-MhOyuY-o.d.ts +8 -0
- package/dist/index-BwqPQtBu.d.ts +1433 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/reducer-bundle-abi.d.ts +1083 -0
- package/dist/infrastructure/reducer-bundle-abi.js +14 -0
- package/dist/infrastructure/reducer-bundle-abi.js.map +1 -0
- package/dist/infrastructure/workspace-codegen.d.ts +53 -0
- package/dist/infrastructure/workspace-codegen.js +44 -0
- package/dist/infrastructure/workspace-codegen.js.map +1 -0
- package/dist/manifest-contract-BNHVGFtU.d.ts +9 -0
- package/dist/package-set.d.ts +13 -0
- package/dist/package-set.js +12 -0
- package/dist/package-set.js.map +1 -0
- package/dist/primitive-props-DpKs-GCr.d.ts +11 -0
- package/dist/reducer.d.ts +3786 -0
- package/dist/reducer.js +8131 -0
- package/dist/reducer.js.map +1 -0
- package/dist/runtime/primitives.d.ts +226 -0
- package/dist/runtime/primitives.js +180 -0
- package/dist/runtime/primitives.js.map +1 -0
- package/dist/runtime/types/runtime-api.d.ts +1 -0
- package/dist/runtime/types/runtime-api.js +2 -0
- package/dist/runtime/types/runtime-api.js.map +1 -0
- package/dist/runtime/workspace-contract.d.ts +172 -0
- package/dist/runtime/workspace-contract.js +14 -0
- package/dist/runtime/workspace-contract.js.map +1 -0
- package/dist/runtime-api-3dshj6kK.d.ts +101 -0
- package/dist/runtime-api-DWxvTr-O.d.ts +379 -0
- package/dist/runtime.d.ts +58 -0
- package/dist/runtime.js +13 -0
- package/dist/runtime.js.map +1 -0
- package/dist/slots-1GPGihk8.d.ts +8 -0
- package/dist/testing.d.ts +149 -0
- package/dist/testing.js +513 -0
- package/dist/testing.js.map +1 -0
- package/dist/types.d.ts +496 -0
- package/dist/types.js +28 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/components.d.ts +16 -0
- package/dist/ui/components.js +192 -0
- package/dist/ui/components.js.map +1 -0
- package/dist/ui/defaults.d.ts +19 -0
- package/dist/ui/defaults.js +104 -0
- package/dist/ui/defaults.js.map +1 -0
- package/dist/ui/plugin-styles.css +250 -0
- package/dist/ui/types/player-state.d.ts +365 -0
- package/dist/ui/types/player-state.js +1 -0
- package/dist/ui/types/player-state.js.map +1 -0
- package/dist/ui-contract-iQfTtUSL.d.ts +1161 -0
- package/dist/ui.d.ts +320 -0
- package/dist/ui.js +253 -0
- package/dist/ui.js.map +1 -0
- package/package.json +199 -0
- package/src/generated/reducer-contract/builders.ts +90 -0
- package/src/generated/reducer-contract/version.ts +9 -0
- package/src/generated/reducer-contract/wire.ts +100 -0
- package/src/generated/reducer-contract/zod.ts +101 -0
- package/src/generated/runtime/primitives.ts +2 -0
- package/src/generated/runtime-api.ts +5 -0
- package/src/generated/runtime.ts +35 -0
- package/src/generated/workspace-contract.ts +2 -0
- package/src/index.ts +7 -0
- package/src/infrastructure/reducer-bundle-abi.ts +8 -0
- package/src/infrastructure/reducer-contract/bundle.ts +37 -0
- package/src/infrastructure/workspace-codegen/hex-geometry.ts +69 -0
- package/src/infrastructure/workspace-codegen/index.ts +64 -0
- package/src/infrastructure/workspace-codegen/manifest-contract.ts +6632 -0
- package/src/infrastructure/workspace-codegen/manifest-validation.ts +795 -0
- package/src/infrastructure/workspace-codegen/ownership.ts +131 -0
- package/src/infrastructure/workspace-codegen/preset-card-sets.ts +169 -0
- package/src/infrastructure/workspace-codegen/seeds.ts +1705 -0
- package/src/infrastructure/workspace-codegen.ts +1 -0
- package/src/package-set.ts +19 -0
- package/src/reducer/authoring/contract.ts +157 -0
- package/src/reducer/authoring/effect.ts +224 -0
- package/src/reducer/authoring/game.ts +23 -0
- package/src/reducer/authoring/interaction.ts +98 -0
- package/src/reducer/authoring/phase.ts +300 -0
- package/src/reducer/authoring/types.ts +70 -0
- package/src/reducer/authoring/validation.ts +382 -0
- package/src/reducer/authoring/view-stage.ts +68 -0
- package/src/reducer/authoring.ts +29 -0
- package/src/reducer/bundle/ingress-bundle.ts +491 -0
- package/src/reducer/bundle/trusted/engine-instruction-resolver.ts +254 -0
- package/src/reducer/bundle/trusted/flow-instruction-resolver.ts +73 -0
- package/src/reducer/bundle/trusted/instruction-runner.ts +414 -0
- package/src/reducer/bundle/trusted/interaction-authorization.ts +137 -0
- package/src/reducer/bundle/trusted/interaction-collectors.ts +859 -0
- package/src/reducer/bundle/trusted/interaction-decision.ts +747 -0
- package/src/reducer/bundle/trusted/interaction-resolver.ts +95 -0
- package/src/reducer/bundle/trusted/interaction-types.ts +171 -0
- package/src/reducer/bundle/trusted/lifecycle-runner.ts +427 -0
- package/src/reducer/bundle/trusted/projection-builder.ts +356 -0
- package/src/reducer/bundle/trusted/projection-context.ts +39 -0
- package/src/reducer/bundle/trusted/rng-sampler.ts +150 -0
- package/src/reducer/bundle/trusted/runtime-registry.ts +120 -0
- package/src/reducer/bundle/trusted/runtime-scope.ts +336 -0
- package/src/reducer/bundle/trusted/simultaneous-player.ts +97 -0
- package/src/reducer/bundle/trusted/stage-resolver.ts +87 -0
- package/src/reducer/bundle/trusted/static-projection.ts +116 -0
- package/src/reducer/bundle/trusted/trusted-runtime-args.ts +97 -0
- package/src/reducer/bundle/trusted/trusted-runtime-result.ts +39 -0
- package/src/reducer/bundle/trusted/trusted-setup-profiles.ts +43 -0
- package/src/reducer/bundle/trusted/trusted-state-codec.ts +48 -0
- package/src/reducer/bundle/trusted-bundle.ts +97 -0
- package/src/reducer/bundle/types.ts +171 -0
- package/src/reducer/bundle.ts +2 -0
- package/src/reducer/client-param-schemas.ts +57 -0
- package/src/reducer/compose.ts +34 -0
- package/src/reducer/core/runtime-input.ts +30 -0
- package/src/reducer/core/runtime-instruction.ts +59 -0
- package/src/reducer/core/types.ts +62 -0
- package/src/reducer/definition-index.ts +277 -0
- package/src/reducer/derived.ts +106 -0
- package/src/reducer/effects.ts +92 -0
- package/src/reducer/engine/runtime-instruction-engine.ts +155 -0
- package/src/reducer/ingress/decode-runtime-input.ts +7 -0
- package/src/reducer/ingress/decode-session-state.ts +9 -0
- package/src/reducer/ingress/encode-session-state.ts +6 -0
- package/src/reducer/ingress/input-codec.ts +18 -0
- package/src/reducer/ingress/phase-schemas.ts +62 -0
- package/src/reducer/ingress/raw-types.ts +107 -0
- package/src/reducer/ingress/runtime-codec.ts +14 -0
- package/src/reducer/ingress/runtime-payload.ts +13 -0
- package/src/reducer/ingress/session-codec.ts +392 -0
- package/src/reducer/ingress/types.ts +6 -0
- package/src/reducer/inputs/boardInput.ts +217 -0
- package/src/reducer/inputs/boardTarget.ts +190 -0
- package/src/reducer/inputs/cardInput.ts +86 -0
- package/src/reducer/inputs/cardTarget.ts +101 -0
- package/src/reducer/inputs/choiceTarget.ts +104 -0
- package/src/reducer/inputs/defineInputs.ts +71 -0
- package/src/reducer/inputs/formInput.ts +809 -0
- package/src/reducer/inputs/many.ts +120 -0
- package/src/reducer/inputs/promptInput.ts +87 -0
- package/src/reducer/inputs/rngInput.ts +58 -0
- package/src/reducer/inputs/targetRule.ts +123 -0
- package/src/reducer/inputs.ts +41 -0
- package/src/reducer/model/definition.ts +1072 -0
- package/src/reducer/model/extract.ts +745 -0
- package/src/reducer/model/manifest.ts +570 -0
- package/src/reducer/model/queries.ts +641 -0
- package/src/reducer/model/runtime.ts +264 -0
- package/src/reducer/model/spec.ts +1386 -0
- package/src/reducer/model/table.ts +260 -0
- package/src/reducer/model.ts +7 -0
- package/src/reducer/ops.ts +1034 -0
- package/src/reducer/parse-utils.ts +28 -0
- package/src/reducer/per-player.ts +422 -0
- package/src/reducer/rng.ts +69 -0
- package/src/reducer/schema-helpers.ts +185 -0
- package/src/reducer/setup-bootstrap-helpers.ts +171 -0
- package/src/reducer/setup-bootstrap.ts +481 -0
- package/src/reducer/table-ops.ts +2671 -0
- package/src/reducer/table-queries.ts +372 -0
- package/src/reducer/transaction.ts +120 -0
- package/src/reducer.ts +314 -0
- package/src/runtime/primitives.ts +1 -0
- package/src/runtime/types/runtime-api.ts +1 -0
- package/src/runtime/workspace-contract.ts +32 -0
- package/src/runtime-internal/components/InteractionForm.tsx +1309 -0
- package/src/runtime-internal/components/PluginRuntime.tsx +103 -0
- package/src/runtime-internal/components/board/target-layer.ts +70 -0
- package/src/runtime-internal/context/ClientParamSchemaContext.tsx +44 -0
- package/src/runtime-internal/context/InteractionDraftContext.tsx +279 -0
- package/src/runtime-internal/context/PluginSessionContext.tsx +47 -0
- package/src/runtime-internal/context/PluginStateContext.tsx +262 -0
- package/src/runtime-internal/context/RuntimeContext.tsx +96 -0
- package/src/runtime-internal/defaults/components.tsx +409 -0
- package/src/runtime-internal/defaults/index.ts +11 -0
- package/src/runtime-internal/errors/ValidationError.ts +29 -0
- package/src/runtime-internal/hooks/useActivePlayers.ts +33 -0
- package/src/runtime-internal/hooks/useBoardInteractions.ts +665 -0
- package/src/runtime-internal/hooks/useGameSelector.ts +105 -0
- package/src/runtime-internal/hooks/useGameView.ts +9 -0
- package/src/runtime-internal/hooks/useInteractionByKey.ts +354 -0
- package/src/runtime-internal/hooks/useInteractionHandle.ts +438 -0
- package/src/runtime-internal/hooks/useIsMyTurn.ts +20 -0
- package/src/runtime-internal/hooks/useLobby.ts +76 -0
- package/src/runtime-internal/hooks/useMe.ts +48 -0
- package/src/runtime-internal/hooks/usePlayerInfo.ts +28 -0
- package/src/runtime-internal/hooks/usePlayerTurnOrder.ts +23 -0
- package/src/runtime-internal/hooks/usePluginRuntime.ts +147 -0
- package/src/runtime-internal/hooks/useSeatInbox.ts +61 -0
- package/src/runtime-internal/hooks/useSimultaneousPhase.ts +10 -0
- package/src/runtime-internal/index.ts +42 -0
- package/src/runtime-internal/internal.ts +43 -0
- package/src/runtime-internal/plugin-styles.css +250 -0
- package/src/runtime-internal/primitives/board.tsx +459 -0
- package/src/runtime-internal/primitives/dialog-lifecycle.ts +58 -0
- package/src/runtime-internal/primitives/dice.tsx +79 -0
- package/src/runtime-internal/primitives/game-ui-provider.tsx +35 -0
- package/src/runtime-internal/primitives/game.tsx +387 -0
- package/src/runtime-internal/primitives/hand-intent-adapter.ts +147 -0
- package/src/runtime-internal/primitives/hand-surface.tsx +594 -0
- package/src/runtime-internal/primitives/index.ts +196 -0
- package/src/runtime-internal/primitives/interaction-form-binding.tsx +56 -0
- package/src/runtime-internal/primitives/interaction-submit.ts +90 -0
- package/src/runtime-internal/primitives/interaction.tsx +987 -0
- package/src/runtime-internal/primitives/phase.tsx +43 -0
- package/src/runtime-internal/primitives/player-roster.tsx +302 -0
- package/src/runtime-internal/primitives/primitive-props.tsx +101 -0
- package/src/runtime-internal/primitives/prompt.tsx +255 -0
- package/src/runtime-internal/primitives/ui.tsx +60 -0
- package/src/runtime-internal/primitives/zone.tsx +791 -0
- package/src/runtime-internal/reducer.ts +30 -0
- package/src/runtime-internal/runtime/createPluginRuntimeAPI.ts +605 -0
- package/src/runtime-internal/types/plugin-state.ts +508 -0
- package/src/runtime-internal/types/reducer-state.ts +24 -0
- package/src/runtime-internal/types/runtime-api.ts +114 -0
- package/src/runtime-internal/ui-contract.ts +519 -0
- package/src/runtime-internal/utils/card-intent-adapter.ts +546 -0
- package/src/runtime-internal/utils/interaction-inputs.ts +492 -0
- package/src/runtime-internal/utils/interaction-labels.ts +23 -0
- package/src/runtime-internal/utils/interaction-router.ts +273 -0
- package/src/runtime-internal/utils/interaction-status.ts +74 -0
- package/src/runtime-internal/workspace-contract.ts +1170 -0
- package/src/runtime.ts +34 -0
- package/src/testing/create-expect-api.ts +352 -0
- package/src/testing/create-test-runtime.ts +381 -0
- package/src/testing/definitions.ts +127 -0
- package/src/testing/index.ts +3 -0
- package/src/testing.ts +1 -0
- package/src/type-stubs/manifest-contract.d.ts +42 -0
- package/src/type-stubs/manifest-contract.js +72 -0
- package/src/type-stubs/ui-contract.d.ts +5 -0
- package/src/type-stubs/ui-contract.js +1 -0
- package/src/types/authoring-card-properties.type-test.ts +266 -0
- package/src/types/authoring.ts +1282 -0
- package/src/types/cards.ts +19 -0
- package/src/types/contracts.ts +1550 -0
- package/src/types/generated-helpers.ts +35 -0
- package/src/types/index.ts +147 -0
- package/src/types/slots.ts +11 -0
- package/src/types.ts +1 -0
- package/src/ui/components/ActionButton.tsx +97 -0
- package/src/ui/components/ActionPanel.tsx +315 -0
- package/src/ui/components/Card.tsx +378 -0
- package/src/ui/components/CardDragSurface.tsx +1076 -0
- package/src/ui/components/ChromeSuppressionContext.tsx +70 -0
- package/src/ui/components/CostDisplay.tsx +145 -0
- package/src/ui/components/DiceRoller.tsx +581 -0
- package/src/ui/components/Drawer.tsx +180 -0
- package/src/ui/components/ErrorBoundary.tsx +275 -0
- package/src/ui/components/GameEndDisplay.tsx +398 -0
- package/src/ui/components/GameSkeleton.tsx +260 -0
- package/src/ui/components/Hand.tsx +468 -0
- package/src/ui/components/HandDock.tsx +299 -0
- package/src/ui/components/HandView.tsx +441 -0
- package/src/ui/components/MobileHandTray.tsx +381 -0
- package/src/ui/components/MoreActions.tsx +143 -0
- package/src/ui/components/PhaseIndicator.tsx +341 -0
- package/src/ui/components/PlayArea.tsx +146 -0
- package/src/ui/components/PrimaryActionButton.tsx +336 -0
- package/src/ui/components/PrimaryButton.tsx +45 -0
- package/src/ui/components/ResourceCounter.tsx +270 -0
- package/src/ui/components/StagingZone.tsx +134 -0
- package/src/ui/components/ThemedButton.tsx +113 -0
- package/src/ui/components/Toast.tsx +264 -0
- package/src/ui/components/board/HexGrid.tsx +1294 -0
- package/src/ui/components/board/NetworkGraph.tsx +476 -0
- package/src/ui/components/board/SlotSystem.tsx +388 -0
- package/src/ui/components/board/SquareGrid.tsx +1165 -0
- package/src/ui/components/board/TrackBoard.tsx +496 -0
- package/src/ui/components/board/ZoneMap.tsx +448 -0
- package/src/ui/components/board/hex-board-view.ts +123 -0
- package/src/ui/components/board/index.ts +142 -0
- package/src/ui/components/board/interaction-accessibility.ts +21 -0
- package/src/ui/components/board/target-layer.ts +66 -0
- package/src/ui/components/card-render-content.type-test.ts +27 -0
- package/src/ui/components/hand-layout-math.ts +163 -0
- package/src/ui/components/hand-pointer-engine.ts +413 -0
- package/src/ui/components/index.ts +245 -0
- package/src/ui/components.ts +1 -0
- package/src/ui/defaults/components.tsx +106 -0
- package/src/ui/defaults/index.ts +8 -0
- package/src/ui/defaults.ts +1 -0
- package/src/ui/errors/ValidationError.ts +29 -0
- package/src/ui/helpers/cards.ts +19 -0
- package/src/ui/helpers/track-board.ts +211 -0
- package/src/ui/hooks/useBoardTopology.ts +316 -0
- package/src/ui/hooks/useCards.ts +10 -0
- package/src/ui/hooks/useHandCardPointer.ts +381 -0
- package/src/ui/hooks/useHandLayout.ts +378 -0
- package/src/ui/hooks/useHandPresentation.ts +121 -0
- package/src/ui/hooks/useHexBoard.ts +74 -0
- package/src/ui/hooks/useHexGrid.ts +185 -0
- package/src/ui/hooks/useIsMobile.ts +35 -0
- package/src/ui/hooks/usePanZoom.ts +278 -0
- package/src/ui/hooks/useSquareBoard.ts +124 -0
- package/src/ui/hooks/useSquareGrid.ts +328 -0
- package/src/ui/index.ts +98 -0
- package/src/ui/internal/ui/alert.tsx +51 -0
- package/src/ui/internal/ui/button.tsx +58 -0
- package/src/ui/internal/ui/dialog.tsx +134 -0
- package/src/ui/internal/ui/input.tsx +21 -0
- package/src/ui/internal/ui/label.tsx +21 -0
- package/src/ui/internal/ui/select.tsx +129 -0
- package/src/ui/internal/ui/tooltip.tsx +54 -0
- package/src/ui/internal/ui/utils.ts +5 -0
- package/src/ui/plugin-styles.css +250 -0
- package/src/ui/primitives/dialog-lifecycle.ts +58 -0
- package/src/ui/primitives/dice.tsx +79 -0
- package/src/ui/primitives/primitive-props.tsx +101 -0
- package/src/ui/theme/ThemeProvider.tsx +252 -0
- package/src/ui/theme/board.ts +61 -0
- package/src/ui/theme/css-vars.ts +105 -0
- package/src/ui/theme/derive.ts +240 -0
- package/src/ui/theme/index.ts +61 -0
- package/src/ui/theme/presets/arcade.ts +261 -0
- package/src/ui/theme/presets/studio.ts +261 -0
- package/src/ui/theme/presets/tabletop.ts +266 -0
- package/src/ui/theme/tokens.ts +392 -0
- package/src/ui/types/hex-color.ts +20 -0
- package/src/ui/types/player-state.ts +463 -0
- package/src/ui/types/tiled-board.ts +785 -0
- package/src/ui/types/visual-state.ts +137 -0
- package/src/ui.ts +1 -0
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { bm as TrackSpace, bl as TrackPiece } from './components-D5ZRE2Hl.js';
|
|
2
|
+
export { A as ActionButton, a as ActionButtonProps, b as ActionGroup, c as ActionGroupProps, d as ActionPanel, e as ActionPanelProps, B as ButtonSize, f as ButtonVariant, C as CardDragSurface, g as CardDragSurfaceContextValue, h as CardDragSurfaceController, i as CardDragSurfaceProps, j as CardDropTargetView, k as CardDropTargetViewProps, l as CardFace, m as CardFaceProps, n as CardPositionProps, o as CardSize, p as ChromeSuppressionProvider, q as CostDisplay, r as CostDisplayProps, D as DefaultChessPiece, s as DefaultChessPieceProps, t as DefaultEmptySlot, u as DefaultEmptySlotProps, v as DefaultGridCell, w as DefaultGridCellProps, x as DefaultGridPiece, y as DefaultGridPieceProps, z as DefaultNetworkEdge, E as DefaultNetworkEdgeProps, F as DefaultNetworkNode, G as DefaultNetworkNodeProps, H as DefaultNetworkPiece, I as DefaultNetworkPieceProps, J as DefaultSlotItem, K as DefaultSlotItemProps, L as DefaultSlotOccupant, M as DefaultSlotOccupantProps, N as DefaultTrackConnection, O as DefaultTrackConnectionProps, P as DefaultTrackJump, Q as DefaultTrackJumpProps, R as DefaultTrackPiece, S as DefaultTrackPieceProps, T as DefaultTrackSpace, U as DefaultTrackSpaceProps, V as DefaultZone, W as DefaultZonePiece, X as DefaultZonePieceProps, Y as DefaultZonePieces, Z as DefaultZonePiecesProps, _ as DefaultZoneProps, $ as Dialog, a0 as DialogClose, a1 as DialogContent, a2 as DialogDescription, a3 as DialogFooter, a4 as DialogHeader, a5 as DialogOverlay, a6 as DialogPortal, a7 as DialogTitle, a8 as DialogTrigger, a9 as DiceRoller, aa as DiceRollerProps, ab as DragPhase, ac as Drawer, ad as DrawerClose, ae as DrawerContent, af as DrawerDescription, ag as DrawerFooter, ah as DrawerHeader, ai as DrawerOverlay, aj as DrawerPortal, ak as DrawerTitle, al as DrawerTrigger, am as ErrorBoundary, an as ErrorBoundaryProps, ao as GameEndDisplay, ap as GameEndDisplayProps, aq as GameSkeleton, ar as GameSkeletonProps, as as Hand, at as HandDock, au as HandDockMode, av as HandDockPlacement, aw as HandDockPresentation, ax as HandDockProps, ay as HandDockToggleContext, az as HandLayout, aA as HandProps, aB as Input, aC as InteractiveSquareEdge, aD as InteractiveSquareVertex, aE as Label, aF as MoreActions, aG as MoreActionsProps, aH as NetworkEdge, aI as NetworkGraph, aJ as NetworkGraphProps, aK as NetworkNode, aL as NetworkPiece, aM as PhaseIndicator, aN as PhaseIndicatorProps, aO as PlayArea, aP as PlayAreaProps, aQ as PlayerScore, aR as PrimaryActionAttention, aS as PrimaryActionButton, aT as PrimaryActionButtonProps, aU as PrimaryButton, aV as PrimaryButtonProps, aW as ResourceDefinition, aX as Select, aY as SelectContent, aZ as SelectItem, a_ as SelectTrigger, a$ as SlotDefinition, b0 as SlotOccupant, b1 as SlotSystem, b2 as SlotSystemProps, b3 as SquareEdgePosition, b4 as SquareGrid, b5 as SquareGridBoardProps, b6 as SquareGridProps, b7 as SquareVertexPosition, b8 as StagingZone, b9 as StagingZoneProps, ba as ThemedButton, bb as ThemedButtonProps, bc as Toast, bd as ToastActions, be as ToastActionsProps, bf as ToastActionsValue, bg as ToastNotification, bh as ToastProvider, bi as ToastType, bj as TrackBoard, bk as TrackBoardProps, bn as UseHandLayoutOptions, bo as UseHandLayoutReturn, bp as ZoneDefinition, bq as ZoneHighlightType, br as ZoneMap, bs as ZoneMapProps, bt as ZonePiece, bu as ZoneShape, bv as buttonStyle, bw as chipStyle, bx as intentForVariant, by as motionDuration, bz as playerColor, bA as surfaceStyle, bB as toAlgebraic, bC as toNumeric, bD as useCardDragSurface, bE as useChromeSuppression, bF as useHandLayout } from './components-D5ZRE2Hl.js';
|
|
3
|
+
import { _ as Theme } from './hex-board-view-D_07hO6O.js';
|
|
4
|
+
export { A as AnyHexBoardInput, a as AnySquareBoardInput, b as AuthoredHexBoardInput, c as AuthoredSquareBoardInput, B as BoardEdgeIdOf, d as BoardSpaceIdOf, e as BoardVertexIdOf, C as ColorRamp, f as ComponentTokens, D as DefaultHexEdge, g as DefaultHexEdgeProps, h as DefaultHexTile, i as DefaultHexTileProps, j as DefaultHexVertex, k as DefaultHexVertexProps, E as EdgePosition, l as Elevation, F as FoundationColor, G as GeneratedHexBoardInput, m as GeneratedHexSpaceStateLike, n as GeneratedSquareBoardInput, o as GeneratedSquareSpaceStateLike, p as GeneratedTiledEdgeStateLike, q as GeneratedTiledVertexStateLike, H as HexBoardInput, r as HexBoardView, s as HexBoardViewTile, t as HexGrid, u as HexGridBoardProps, v as HexGridProps, w as HexOrientation, x as HexTileGeometry, I as IntentColor, y as InteractiveHexEdge, z as InteractiveHexVertex, J as InteractiveTargetLayer, K as InteractiveTargetRenderState, M as Motion, N as NormalizedHexBoard, L as NormalizedHexEdgeOf, O as NormalizedHexTileOf, P as NormalizedHexVertexOf, Q as NormalizedSquareBoard, R as NormalizedSquareCellOf, S as NormalizedSquareEdgeOf, T as NormalizedSquarePieceOf, U as NormalizedSquareVertexOf, V as PlayerColor, W as Radius, X as SemanticColor, Y as Space, Z as SquareBoardInput, $ as ThemeMeta, a0 as ThemeOverride, a1 as Typography, a2 as createHexBoardView, a3 as hexUtils, a4 as mergeTheme, a5 as normalizeHexBoardInput, a6 as normalizeSquareBoardInput } from './hex-board-view-D_07hO6O.js';
|
|
5
|
+
export { T as ThemeContextValue, a as ThemePresetId, b as ThemeProvider, c as ThemeProviderProps, g as getThemePreset, r as resolveTheme, u as useTheme, d as useThemeCssVars } from './ThemeProvider-fy0_QzgO.js';
|
|
6
|
+
import { CSSProperties } from 'react';
|
|
7
|
+
export { C as CardDropTargetVisualState, a as CardIntent, H as HandInteractionPolicy, b as HandLayoutKind, c as HandLayoutPolicy, d as HandView, e as HandViewProps, I as InteractionVisualState, T as TargetIntent, f as dropTargetVisualStateDataAttributes, v as visualStateDataAttributes } from './HandView-ncJIVLhN.js';
|
|
8
|
+
export { B as BoundResourceCounterRootProps, H as HandRole, M as MobileHandRegistration, a as MobileHandTrayProvider, R as ResourceCounter, b as ResourceCounterComponents, c as ResourceCounterCount, d as ResourceCounterIcon, e as ResourceCounterItem, f as ResourceCounterItemState, g as ResourceCounterLabel, h as ResourceCounterPartProps, i as ResourceCounterProps, j as ResourceCounterRoot, k as ResourceCounterRootProps, l as ResourceDisplayConfig, m as ResourceIconProps, n as createResourceCounter, u as useMobileHandTrayActive, o as useRegisterMobileHand } from './ResourceCounter-CTREyF73.js';
|
|
9
|
+
export { BoardBaseId, BoardId, BoardKindStates, BoardRef, BoardStates, CardId, CardIdsByDeckId, CardProperties, DeckId, DiceStates, DieId, DieState, EdgeTypeId, GameState, HexBoardState, HexEdgeState, HexTileState, HexVertexState, NetworkBoardState, NetworkEdgeState, NetworkNodeState, NetworkPieceState, PerPlayer, PerPlayerBoardRef, PieceId, PieceTypeId, Player, PlayerId, SharedBoardRef, SpaceId, SpaceTypeId, SquareBoardState, SquareCellState, SquareEdgeState, SquarePieceState, SquareVertexState, TrackBoardState, TrackPieceState, TrackSpaceState, VertexTypeId } from './ui/types/player-state.js';
|
|
10
|
+
export { C as CardCollection, V as ViewCard } from './cards-Sl3b40Mv.js';
|
|
11
|
+
export { V as ViewSlotOccupant } from './slots-1GPGihk8.js';
|
|
12
|
+
export { H as HexColor, h as hexColor, i as isHexColor, p as parseHexColor } from './hex-color-MhOyuY-o.js';
|
|
13
|
+
import 'react/jsx-runtime';
|
|
14
|
+
import 'framer-motion';
|
|
15
|
+
import 'vaul';
|
|
16
|
+
import '@radix-ui/react-dialog';
|
|
17
|
+
import '@radix-ui/react-label';
|
|
18
|
+
import '@radix-ui/react-select';
|
|
19
|
+
import './primitive-props-DpKs-GCr.js';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* usePanZoom hook - Unified pan and zoom gestures using @use-gesture/react
|
|
23
|
+
*
|
|
24
|
+
* Provides a declarative API for pan and zoom interactions on board components.
|
|
25
|
+
* Works with both SVG (via viewBox) and HTML (via CSS transforms) elements.
|
|
26
|
+
*
|
|
27
|
+
* Features:
|
|
28
|
+
* - Single finger/mouse drag for panning
|
|
29
|
+
* - Pinch-to-zoom on touch devices
|
|
30
|
+
* - Mouse wheel zoom on desktop
|
|
31
|
+
* - Configurable zoom limits
|
|
32
|
+
* - Optional momentum/inertia
|
|
33
|
+
*
|
|
34
|
+
* @example SVG usage (NetworkGraph, HexGrid, etc.)
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const { transform, bind, resetTransform } = usePanZoom({
|
|
37
|
+
* enabled: enablePanZoom,
|
|
38
|
+
* minZoom: 0.5,
|
|
39
|
+
* maxZoom: 3,
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* // Apply to viewBox calculation
|
|
43
|
+
* const viewBoxWidth = contentWidth / transform.zoom;
|
|
44
|
+
* const viewBoxX = baseX - transform.pan.x;
|
|
45
|
+
*
|
|
46
|
+
* <svg {...bind()} style={{ touchAction: 'none' }}>
|
|
47
|
+
* ...
|
|
48
|
+
* </svg>
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @example HTML usage (SlotSystem, etc.)
|
|
52
|
+
* ```tsx
|
|
53
|
+
* const { transform, bind, style } = usePanZoom({
|
|
54
|
+
* enabled: enablePanZoom,
|
|
55
|
+
* mode: 'css',
|
|
56
|
+
* });
|
|
57
|
+
*
|
|
58
|
+
* <div {...bind()} style={{ ...style, touchAction: 'none' }}>
|
|
59
|
+
* ...
|
|
60
|
+
* </div>
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
interface PanZoomTransform {
|
|
64
|
+
/** Current zoom level (1 = 100%) */
|
|
65
|
+
zoom: number;
|
|
66
|
+
/** Current pan offset */
|
|
67
|
+
pan: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
interface UsePanZoomOptions {
|
|
73
|
+
/** Whether pan/zoom is enabled */
|
|
74
|
+
enabled?: boolean;
|
|
75
|
+
/** Initial zoom level */
|
|
76
|
+
initialZoom?: number;
|
|
77
|
+
/** Minimum zoom level */
|
|
78
|
+
minZoom?: number;
|
|
79
|
+
/** Maximum zoom level */
|
|
80
|
+
maxZoom?: number;
|
|
81
|
+
/** Initial pan offset */
|
|
82
|
+
initialPan?: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
};
|
|
86
|
+
/** Transform mode: 'viewbox' for SVG, 'css' for HTML elements */
|
|
87
|
+
mode?: "viewbox" | "css";
|
|
88
|
+
/** Zoom sensitivity for wheel events (default: 0.002) */
|
|
89
|
+
wheelSensitivity?: number;
|
|
90
|
+
/** Called when transform changes */
|
|
91
|
+
onTransformChange?: (transform: PanZoomTransform) => void;
|
|
92
|
+
}
|
|
93
|
+
/** Type for gesture bind function that returns props to spread on element
|
|
94
|
+
* Note: We omit ref from the return type to avoid conflicts with explicit refs on elements.
|
|
95
|
+
* The gesture library handles its own internal ref binding.
|
|
96
|
+
*/
|
|
97
|
+
type GestureBindFunction = () => Omit<React.HTMLAttributes<Element>, "ref">;
|
|
98
|
+
interface UsePanZoomReturn {
|
|
99
|
+
/** Current transform state */
|
|
100
|
+
transform: PanZoomTransform;
|
|
101
|
+
/** Gesture handlers to spread on the target element - always returns spreadable props */
|
|
102
|
+
bind: GestureBindFunction;
|
|
103
|
+
/** Reset transform to initial values */
|
|
104
|
+
resetTransform: () => void;
|
|
105
|
+
/** Set zoom programmatically */
|
|
106
|
+
setZoom: (zoom: number) => void;
|
|
107
|
+
/** Set pan programmatically */
|
|
108
|
+
setPan: (pan: {
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
}) => void;
|
|
112
|
+
/** CSS transform style (for mode: 'css') */
|
|
113
|
+
style: React.CSSProperties;
|
|
114
|
+
/** Whether currently dragging/panning */
|
|
115
|
+
isDragging: boolean;
|
|
116
|
+
/** Whether currently pinching */
|
|
117
|
+
isPinching: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Hook for pan and zoom gestures on board components
|
|
121
|
+
*/
|
|
122
|
+
declare function usePanZoom(options?: UsePanZoomOptions): UsePanZoomReturn;
|
|
123
|
+
/**
|
|
124
|
+
* Helper to calculate SVG viewBox with pan/zoom applied
|
|
125
|
+
*/
|
|
126
|
+
declare function calculateViewBox(bounds: {
|
|
127
|
+
minX: number;
|
|
128
|
+
minY: number;
|
|
129
|
+
width: number;
|
|
130
|
+
height: number;
|
|
131
|
+
}, transform: PanZoomTransform): string;
|
|
132
|
+
|
|
133
|
+
interface GenericBoardSpaceLike<SpaceIdValue extends string = string, Fields = Record<string, unknown>> {
|
|
134
|
+
id: SpaceIdValue;
|
|
135
|
+
name?: string | null;
|
|
136
|
+
typeId?: string | null;
|
|
137
|
+
fields: Fields;
|
|
138
|
+
}
|
|
139
|
+
interface GenericBoardRelationLike<SpaceIdValue extends string = string> {
|
|
140
|
+
fromSpaceId: SpaceIdValue;
|
|
141
|
+
toSpaceId: SpaceIdValue;
|
|
142
|
+
directed: boolean;
|
|
143
|
+
}
|
|
144
|
+
interface GenericBoardLike<BoardIdValue extends string = string, SpaceIdValue extends string = string, SpaceFields = Record<string, unknown>> {
|
|
145
|
+
id: BoardIdValue;
|
|
146
|
+
spaces: Readonly<Record<SpaceIdValue, GenericBoardSpaceLike<SpaceIdValue, SpaceFields>>>;
|
|
147
|
+
relations?: ReadonlyArray<GenericBoardRelationLike<SpaceIdValue>>;
|
|
148
|
+
}
|
|
149
|
+
interface TrackBoardPieceLike<PieceIdValue extends string = string, SpaceIdValue extends string = string, OwnerIdValue extends string = string, Fields = unknown> {
|
|
150
|
+
id: PieceIdValue;
|
|
151
|
+
spaceId: SpaceIdValue;
|
|
152
|
+
owner: OwnerIdValue;
|
|
153
|
+
typeId?: string | null;
|
|
154
|
+
fields?: Fields;
|
|
155
|
+
}
|
|
156
|
+
type BoardSpaceOf<TBoard extends GenericBoardLike> = TBoard["spaces"][keyof TBoard["spaces"]];
|
|
157
|
+
type SpaceIdOf<TBoard extends GenericBoardLike> = BoardSpaceOf<TBoard> extends {
|
|
158
|
+
id: infer Id extends string;
|
|
159
|
+
} ? Id : never;
|
|
160
|
+
type SpaceFieldsOf<TBoard extends GenericBoardLike> = BoardSpaceOf<TBoard> extends {
|
|
161
|
+
fields: infer Fields;
|
|
162
|
+
} ? Fields : never;
|
|
163
|
+
type PieceIdOf<TPiece extends TrackBoardPieceLike> = TPiece extends {
|
|
164
|
+
id: infer Id extends string;
|
|
165
|
+
} ? Id : never;
|
|
166
|
+
type PieceOwnerOf<TPiece extends TrackBoardPieceLike> = TPiece extends {
|
|
167
|
+
owner: infer Owner extends string;
|
|
168
|
+
} ? Owner : never;
|
|
169
|
+
type PieceFieldsOf<TPiece extends TrackBoardPieceLike> = TPiece extends {
|
|
170
|
+
fields?: infer Fields;
|
|
171
|
+
} ? Fields : never;
|
|
172
|
+
type TrackLayout = {
|
|
173
|
+
type: "linear";
|
|
174
|
+
axis?: "x" | "y";
|
|
175
|
+
spacing?: number;
|
|
176
|
+
origin?: {
|
|
177
|
+
x: number;
|
|
178
|
+
y: number;
|
|
179
|
+
};
|
|
180
|
+
} | {
|
|
181
|
+
type: "circular";
|
|
182
|
+
center: {
|
|
183
|
+
x: number;
|
|
184
|
+
y: number;
|
|
185
|
+
};
|
|
186
|
+
radius: number;
|
|
187
|
+
startAngleDeg?: number;
|
|
188
|
+
clockwise?: boolean;
|
|
189
|
+
};
|
|
190
|
+
type PositionOptions<TBoard extends GenericBoardLike> = {
|
|
191
|
+
getPosition: (space: BoardSpaceOf<TBoard>, index: number, spaces: ReadonlyArray<BoardSpaceOf<TBoard>>) => {
|
|
192
|
+
x: number;
|
|
193
|
+
y: number;
|
|
194
|
+
};
|
|
195
|
+
layout?: never;
|
|
196
|
+
} | {
|
|
197
|
+
getPosition?: never;
|
|
198
|
+
layout: TrackLayout;
|
|
199
|
+
};
|
|
200
|
+
type ToTrackBoardDataOptions<TBoard extends GenericBoardLike, TPiece extends TrackBoardPieceLike<string, SpaceIdOf<TBoard>, string, unknown>> = PositionOptions<TBoard> & {
|
|
201
|
+
pieces?: readonly TPiece[];
|
|
202
|
+
getNextSpaces?: (space: BoardSpaceOf<TBoard>, board: TBoard) => ReadonlyArray<SpaceIdOf<TBoard>> | undefined;
|
|
203
|
+
getJumpTo?: (space: BoardSpaceOf<TBoard>, board: TBoard) => SpaceIdOf<TBoard> | undefined;
|
|
204
|
+
};
|
|
205
|
+
declare function toTrackBoardData<TBoard extends GenericBoardLike, TPiece extends TrackBoardPieceLike<string, SpaceIdOf<TBoard>, string, unknown>>(board: TBoard, options: ToTrackBoardDataOptions<TBoard, TPiece>): {
|
|
206
|
+
spaces: Array<TrackSpace<SpaceIdOf<TBoard>, SpaceFieldsOf<TBoard>>>;
|
|
207
|
+
pieces: Array<TrackPiece<PieceIdOf<TPiece>, SpaceIdOf<TBoard>, PieceOwnerOf<TPiece>, PieceFieldsOf<TPiece>>>;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Hook to detect if the user is on a mobile/small screen device
|
|
212
|
+
* @param breakpoint - The width threshold in pixels (default: 768)
|
|
213
|
+
* @returns boolean indicating if the screen is mobile-sized
|
|
214
|
+
*/
|
|
215
|
+
declare function useIsMobile(breakpoint?: number): boolean;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* `tabletop` — the default Dreamboard theme.
|
|
219
|
+
*
|
|
220
|
+
* Visual identity: warm paper backgrounds, deep ink-blue brand,
|
|
221
|
+
* confident type, rounded but disciplined corners. Designed to feel
|
|
222
|
+
* like a polished hobby-game client (Splendor digital, modern Catan
|
|
223
|
+
* apps) without leaning into a specific game's IP.
|
|
224
|
+
*
|
|
225
|
+
* Picked deliberately for the default: a board game UI sitting on
|
|
226
|
+
* cool grey or pure white reads as "spreadsheet"; warm parchment
|
|
227
|
+
* cues "play" without sliding into kitsch.
|
|
228
|
+
*/
|
|
229
|
+
declare const tabletopTheme: Theme;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* `arcade` — high-contrast neon theme for fast/competitive games.
|
|
233
|
+
*
|
|
234
|
+
* Visual identity: deep slate background, electric cyan/magenta
|
|
235
|
+
* intents, square-ish corners, sharp drop shadows. Designed to evoke
|
|
236
|
+
* action games and to keep critical CTAs popping at a glance.
|
|
237
|
+
*/
|
|
238
|
+
declare const arcadeTheme: Theme;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* `studio` — clean monochrome theme for prototypes and design reviews.
|
|
242
|
+
*
|
|
243
|
+
* Visual identity: pure white surfaces, near-black text, single brand
|
|
244
|
+
* accent, generous whitespace. Designed for screenshot-friendly demos
|
|
245
|
+
* and games where the board art does the storytelling.
|
|
246
|
+
*/
|
|
247
|
+
declare const studioTheme: Theme;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Walk the theme tree and produce a flat `{ "--db-...": value }` map.
|
|
251
|
+
* Arrays are walked positionally with a 1-based index (so
|
|
252
|
+
* `theme.player[0]` → `--db-player-1-...`).
|
|
253
|
+
*/
|
|
254
|
+
declare function themeToCssVars(theme: Theme): CSSProperties;
|
|
255
|
+
/**
|
|
256
|
+
* Build a `var(--db-...)` reference for a token path.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```ts
|
|
260
|
+
* cssVar("semantic", "intent", "primary", "solid")
|
|
261
|
+
* // => "var(--db-semantic-intent-primary-solid)"
|
|
262
|
+
* cssVar("player", 1, "solid")
|
|
263
|
+
* // => "var(--db-player-1-solid)"
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
declare function cssVar(...path: Array<string | number>): string;
|
|
267
|
+
/**
|
|
268
|
+
* Convenience for declaring a `var(--db-...)` with an inline fallback.
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```ts
|
|
272
|
+
* cssVarOr("transparent", "semantic", "border", "default")
|
|
273
|
+
* // => "var(--db-semantic-border-default, transparent)"
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
declare function cssVarOr(fallback: string, ...path: Array<string | number>): string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Board theming helpers.
|
|
280
|
+
*
|
|
281
|
+
* The SDK's board renderers (`<HexGrid>`, `<SquareGrid>`,
|
|
282
|
+
* `<NetworkGraph>`, `<ZoneMap>`, `<TrackBoard>`, `<SlotSystem>`) need a
|
|
283
|
+
* tiny but consistent set of visual tokens — frame border, frame fill,
|
|
284
|
+
* eligible-target hint, and active hover ring — so authors don't have
|
|
285
|
+
* to re-pick colours per board. {@link useBoardTheme} exposes those
|
|
286
|
+
* tokens, derived from the active {@link Theme}.
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Resolved board tokens consumed by board renderers and per-tile
|
|
291
|
+
* default renderers. All values are CSS-ready strings.
|
|
292
|
+
*/
|
|
293
|
+
interface BoardTheme {
|
|
294
|
+
/** Border drawn around the board's outer frame. */
|
|
295
|
+
readonly frameBorder: string;
|
|
296
|
+
/** Background painted under the tile renderer (visible at tile gaps). */
|
|
297
|
+
readonly frameBackground: string;
|
|
298
|
+
/** Hover-state ring drawn over an interactive target. */
|
|
299
|
+
readonly hoverRing: string;
|
|
300
|
+
/** Idle hint colour for an eligible-but-unhovered target. */
|
|
301
|
+
readonly eligibleHint: string;
|
|
302
|
+
/** Border drawn on inactive tiles (matches semantic.border.default). */
|
|
303
|
+
readonly tileBorder: string;
|
|
304
|
+
/** Subtle dotted border for non-interactive scaffolding (e.g. ports). */
|
|
305
|
+
readonly tileBorderSubtle: string;
|
|
306
|
+
/** Foreground used for board labels (numbers, port ratios). */
|
|
307
|
+
readonly tileText: string;
|
|
308
|
+
/** Recommended ring stroke width in px for hover/eligible markers. */
|
|
309
|
+
readonly ringWidth: number;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Derive a {@link BoardTheme} from the active theme. Memoised on the
|
|
313
|
+
* theme reference so consumers can pass it straight to a board's
|
|
314
|
+
* `defaultTileProps` / `defaultEdgeProps` slots.
|
|
315
|
+
*/
|
|
316
|
+
declare function useBoardTheme(): BoardTheme;
|
|
317
|
+
/** Standalone derivation for renderers that already hold a {@link Theme}. */
|
|
318
|
+
declare function deriveBoardTheme(theme: Theme): BoardTheme;
|
|
319
|
+
|
|
320
|
+
export { type BoardTheme, type PanZoomTransform, Theme, TrackPiece, TrackSpace, type UsePanZoomOptions, type UsePanZoomReturn, arcadeTheme, calculateViewBox, cssVar, cssVarOr, deriveBoardTheme, studioTheme, tabletopTheme, themeToCssVars, toTrackBoardData, useBoardTheme, useIsMobile, usePanZoom };
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deriveBoardTheme,
|
|
3
|
+
hexColor,
|
|
4
|
+
isHexColor,
|
|
5
|
+
parseHexColor,
|
|
6
|
+
toTrackBoardData,
|
|
7
|
+
useBoardTheme
|
|
8
|
+
} from "./chunk-KAELH4KC.js";
|
|
9
|
+
import {
|
|
10
|
+
ActionButton,
|
|
11
|
+
ActionGroup,
|
|
12
|
+
ActionPanel,
|
|
13
|
+
CardDragSurface,
|
|
14
|
+
CardDropTargetView,
|
|
15
|
+
CardFace,
|
|
16
|
+
ChromeSuppressionProvider,
|
|
17
|
+
CostDisplay,
|
|
18
|
+
DefaultChessPiece,
|
|
19
|
+
DefaultEmptySlot,
|
|
20
|
+
DefaultGridCell,
|
|
21
|
+
DefaultGridPiece,
|
|
22
|
+
DefaultHexEdge,
|
|
23
|
+
DefaultHexTile,
|
|
24
|
+
DefaultHexVertex,
|
|
25
|
+
DefaultNetworkEdge,
|
|
26
|
+
DefaultNetworkNode,
|
|
27
|
+
DefaultNetworkPiece,
|
|
28
|
+
DefaultSlotItem,
|
|
29
|
+
DefaultSlotOccupant,
|
|
30
|
+
DefaultTrackConnection,
|
|
31
|
+
DefaultTrackJump,
|
|
32
|
+
DefaultTrackPiece,
|
|
33
|
+
DefaultTrackSpace,
|
|
34
|
+
DefaultZone,
|
|
35
|
+
DefaultZonePiece,
|
|
36
|
+
DefaultZonePieces,
|
|
37
|
+
Dialog,
|
|
38
|
+
DialogClose,
|
|
39
|
+
DialogContent,
|
|
40
|
+
DialogDescription,
|
|
41
|
+
DialogFooter,
|
|
42
|
+
DialogHeader,
|
|
43
|
+
DialogOverlay,
|
|
44
|
+
DialogPortal,
|
|
45
|
+
DialogTitle,
|
|
46
|
+
DialogTrigger,
|
|
47
|
+
DiceRoller,
|
|
48
|
+
Drawer,
|
|
49
|
+
DrawerClose,
|
|
50
|
+
DrawerContent,
|
|
51
|
+
DrawerDescription,
|
|
52
|
+
DrawerFooter,
|
|
53
|
+
DrawerHeader,
|
|
54
|
+
DrawerOverlay,
|
|
55
|
+
DrawerPortal,
|
|
56
|
+
DrawerTitle,
|
|
57
|
+
DrawerTrigger,
|
|
58
|
+
ErrorBoundary,
|
|
59
|
+
GameEndDisplay,
|
|
60
|
+
GameSkeleton,
|
|
61
|
+
Hand,
|
|
62
|
+
HandDock,
|
|
63
|
+
HandView,
|
|
64
|
+
HexGrid,
|
|
65
|
+
Input,
|
|
66
|
+
Label,
|
|
67
|
+
MobileHandTrayProvider,
|
|
68
|
+
MoreActions,
|
|
69
|
+
NetworkGraph,
|
|
70
|
+
PhaseIndicator,
|
|
71
|
+
PlayArea,
|
|
72
|
+
PrimaryActionButton,
|
|
73
|
+
PrimaryButton,
|
|
74
|
+
ResourceCounter,
|
|
75
|
+
ResourceCounterCount,
|
|
76
|
+
ResourceCounterIcon,
|
|
77
|
+
ResourceCounterItem,
|
|
78
|
+
ResourceCounterLabel,
|
|
79
|
+
ResourceCounterRoot,
|
|
80
|
+
Select,
|
|
81
|
+
SelectContent,
|
|
82
|
+
SelectItem,
|
|
83
|
+
SelectTrigger,
|
|
84
|
+
SlotSystem,
|
|
85
|
+
SquareGrid,
|
|
86
|
+
StagingZone,
|
|
87
|
+
ThemeProvider,
|
|
88
|
+
ThemedButton,
|
|
89
|
+
Toast,
|
|
90
|
+
ToastActions,
|
|
91
|
+
ToastProvider,
|
|
92
|
+
TrackBoard,
|
|
93
|
+
ZoneMap,
|
|
94
|
+
arcadeTheme,
|
|
95
|
+
buttonStyle,
|
|
96
|
+
calculateViewBox,
|
|
97
|
+
chipStyle,
|
|
98
|
+
createHexBoardView,
|
|
99
|
+
createResourceCounter,
|
|
100
|
+
cssVar,
|
|
101
|
+
cssVarOr,
|
|
102
|
+
dropTargetVisualStateDataAttributes,
|
|
103
|
+
getThemePreset,
|
|
104
|
+
hexUtils,
|
|
105
|
+
intentForVariant,
|
|
106
|
+
mergeTheme,
|
|
107
|
+
motionDuration,
|
|
108
|
+
normalizeHexBoardInput,
|
|
109
|
+
normalizeSquareBoardInput,
|
|
110
|
+
playerColor,
|
|
111
|
+
resolveTheme,
|
|
112
|
+
studioTheme,
|
|
113
|
+
surfaceStyle,
|
|
114
|
+
tabletopTheme,
|
|
115
|
+
themeToCssVars,
|
|
116
|
+
toAlgebraic,
|
|
117
|
+
toNumeric,
|
|
118
|
+
useCardDragSurface,
|
|
119
|
+
useChromeSuppression,
|
|
120
|
+
useIsMobile,
|
|
121
|
+
useMobileHandTrayActive,
|
|
122
|
+
useRegisterMobileHand,
|
|
123
|
+
useTheme,
|
|
124
|
+
useThemeCssVars,
|
|
125
|
+
visualStateDataAttributes
|
|
126
|
+
} from "./chunk-WYPQ3GG5.js";
|
|
127
|
+
import "./chunk-VDXOF4FW.js";
|
|
128
|
+
import "./chunk-PZ5AY32C.js";
|
|
129
|
+
export {
|
|
130
|
+
ActionButton,
|
|
131
|
+
ActionGroup,
|
|
132
|
+
ActionPanel,
|
|
133
|
+
CardDragSurface,
|
|
134
|
+
CardDropTargetView,
|
|
135
|
+
CardFace,
|
|
136
|
+
ChromeSuppressionProvider,
|
|
137
|
+
CostDisplay,
|
|
138
|
+
DefaultChessPiece,
|
|
139
|
+
DefaultEmptySlot,
|
|
140
|
+
DefaultGridCell,
|
|
141
|
+
DefaultGridPiece,
|
|
142
|
+
DefaultHexEdge,
|
|
143
|
+
DefaultHexTile,
|
|
144
|
+
DefaultHexVertex,
|
|
145
|
+
DefaultNetworkEdge,
|
|
146
|
+
DefaultNetworkNode,
|
|
147
|
+
DefaultNetworkPiece,
|
|
148
|
+
DefaultSlotItem,
|
|
149
|
+
DefaultSlotOccupant,
|
|
150
|
+
DefaultTrackConnection,
|
|
151
|
+
DefaultTrackJump,
|
|
152
|
+
DefaultTrackPiece,
|
|
153
|
+
DefaultTrackSpace,
|
|
154
|
+
DefaultZone,
|
|
155
|
+
DefaultZonePiece,
|
|
156
|
+
DefaultZonePieces,
|
|
157
|
+
Dialog,
|
|
158
|
+
DialogClose,
|
|
159
|
+
DialogContent,
|
|
160
|
+
DialogDescription,
|
|
161
|
+
DialogFooter,
|
|
162
|
+
DialogHeader,
|
|
163
|
+
DialogOverlay,
|
|
164
|
+
DialogPortal,
|
|
165
|
+
DialogTitle,
|
|
166
|
+
DialogTrigger,
|
|
167
|
+
DiceRoller,
|
|
168
|
+
Drawer,
|
|
169
|
+
DrawerClose,
|
|
170
|
+
DrawerContent,
|
|
171
|
+
DrawerDescription,
|
|
172
|
+
DrawerFooter,
|
|
173
|
+
DrawerHeader,
|
|
174
|
+
DrawerOverlay,
|
|
175
|
+
DrawerPortal,
|
|
176
|
+
DrawerTitle,
|
|
177
|
+
DrawerTrigger,
|
|
178
|
+
ErrorBoundary,
|
|
179
|
+
GameEndDisplay,
|
|
180
|
+
GameSkeleton,
|
|
181
|
+
Hand,
|
|
182
|
+
HandDock,
|
|
183
|
+
HandView,
|
|
184
|
+
HexGrid,
|
|
185
|
+
Input,
|
|
186
|
+
Label,
|
|
187
|
+
MobileHandTrayProvider,
|
|
188
|
+
MoreActions,
|
|
189
|
+
NetworkGraph,
|
|
190
|
+
PhaseIndicator,
|
|
191
|
+
PlayArea,
|
|
192
|
+
PrimaryActionButton,
|
|
193
|
+
PrimaryButton,
|
|
194
|
+
ResourceCounter,
|
|
195
|
+
ResourceCounterCount,
|
|
196
|
+
ResourceCounterIcon,
|
|
197
|
+
ResourceCounterItem,
|
|
198
|
+
ResourceCounterLabel,
|
|
199
|
+
ResourceCounterRoot,
|
|
200
|
+
Select,
|
|
201
|
+
SelectContent,
|
|
202
|
+
SelectItem,
|
|
203
|
+
SelectTrigger,
|
|
204
|
+
SlotSystem,
|
|
205
|
+
SquareGrid,
|
|
206
|
+
StagingZone,
|
|
207
|
+
ThemeProvider,
|
|
208
|
+
ThemedButton,
|
|
209
|
+
Toast,
|
|
210
|
+
ToastActions,
|
|
211
|
+
ToastProvider,
|
|
212
|
+
TrackBoard,
|
|
213
|
+
ZoneMap,
|
|
214
|
+
arcadeTheme,
|
|
215
|
+
buttonStyle,
|
|
216
|
+
calculateViewBox,
|
|
217
|
+
chipStyle,
|
|
218
|
+
createHexBoardView,
|
|
219
|
+
createResourceCounter,
|
|
220
|
+
cssVar,
|
|
221
|
+
cssVarOr,
|
|
222
|
+
deriveBoardTheme,
|
|
223
|
+
dropTargetVisualStateDataAttributes,
|
|
224
|
+
getThemePreset,
|
|
225
|
+
hexColor,
|
|
226
|
+
hexUtils,
|
|
227
|
+
intentForVariant,
|
|
228
|
+
isHexColor,
|
|
229
|
+
mergeTheme,
|
|
230
|
+
motionDuration,
|
|
231
|
+
normalizeHexBoardInput,
|
|
232
|
+
normalizeSquareBoardInput,
|
|
233
|
+
parseHexColor,
|
|
234
|
+
playerColor,
|
|
235
|
+
resolveTheme,
|
|
236
|
+
studioTheme,
|
|
237
|
+
surfaceStyle,
|
|
238
|
+
tabletopTheme,
|
|
239
|
+
themeToCssVars,
|
|
240
|
+
toAlgebraic,
|
|
241
|
+
toNumeric,
|
|
242
|
+
toTrackBoardData,
|
|
243
|
+
useBoardTheme,
|
|
244
|
+
useCardDragSurface,
|
|
245
|
+
useChromeSuppression,
|
|
246
|
+
useIsMobile,
|
|
247
|
+
useMobileHandTrayActive,
|
|
248
|
+
useRegisterMobileHand,
|
|
249
|
+
useTheme,
|
|
250
|
+
useThemeCssVars,
|
|
251
|
+
visualStateDataAttributes
|
|
252
|
+
};
|
|
253
|
+
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|