@almadar/ui 5.110.0 → 5.112.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/dist/GameAudioProvider-CPGwD49P.d.cts +151 -0
- package/dist/GameAudioProvider-CPGwD49P.d.ts +151 -0
- package/dist/TraitProvider-YkK6tXDw.d.cts +236 -0
- package/dist/TraitProvider-YkK6tXDw.d.ts +236 -0
- package/dist/{providers/UISlotContext.d.ts → UISlotContext-C1FsU9GB.d.ts} +14 -10
- package/dist/UISlotContext-D8_SoDsD.d.cts +79 -0
- package/dist/UserContext-bziZwgFL.d.cts +278 -0
- package/dist/UserContext-bziZwgFL.d.ts +278 -0
- package/dist/avl/index.cjs +126 -29
- package/dist/avl/index.js +128 -31
- package/dist/avl-schema-parser-DKRm-nyh.d.cts +611 -0
- package/dist/avl-schema-parser-DKRm-nyh.d.ts +611 -0
- package/dist/cn-BbPvQLHt.d.cts +294 -0
- package/dist/cn-BbPvQLHt.d.ts +294 -0
- package/dist/components/index.cjs +56 -18
- package/dist/components/index.d.cts +11224 -0
- package/dist/components/index.d.ts +11224 -6
- package/dist/components/index.js +56 -18
- package/dist/{lib/themeTokens.d.ts → context/index.d.cts} +13 -4
- package/dist/context/index.d.ts +62 -9
- package/dist/{types/event-bus-types.d.ts → event-bus-types-Bl78kokd.d.cts} +7 -6
- package/dist/event-bus-types-Bl78kokd.d.ts +65 -0
- package/dist/hooks/index.d.cts +995 -0
- package/dist/hooks/index.d.ts +994 -32
- package/dist/lib/drawable/three/index.cjs +317 -178
- package/dist/lib/drawable/three/index.d.cts +1484 -0
- package/dist/lib/drawable/three/index.d.ts +1483 -38
- package/dist/lib/drawable/three/index.js +161 -22
- package/dist/lib/index.cjs +8 -0
- package/dist/lib/index.d.cts +504 -0
- package/dist/lib/index.d.ts +503 -18
- package/dist/lib/index.js +8 -1
- package/dist/locales/index.d.cts +22 -0
- package/dist/locales/index.d.ts +7 -5
- package/dist/offline-executor-aRuNznZx.d.cts +520 -0
- package/dist/offline-executor-aRuNznZx.d.ts +520 -0
- package/dist/providers/index.cjs +56 -18
- package/dist/providers/index.d.cts +428 -0
- package/dist/providers/index.d.ts +427 -26
- package/dist/providers/index.js +56 -18
- package/dist/renderer/index.cjs +1 -1
- package/dist/renderer/index.d.cts +343 -0
- package/dist/renderer/index.d.ts +337 -22
- package/dist/renderer/index.js +1 -1
- package/dist/runtime/index.cjs +126 -29
- package/dist/runtime/index.d.cts +426 -0
- package/dist/runtime/index.d.ts +421 -16
- package/dist/runtime/index.js +128 -31
- package/dist/useEventBus-CQWyAWpK.d.ts +65 -0
- package/dist/useEventBus-Ckr4wqW3.d.cts +65 -0
- package/dist/{hooks/useUISlots.d.ts → useUISlots-BesZYMks.d.cts} +16 -14
- package/dist/useUISlots-BesZYMks.d.ts +216 -0
- package/package.json +13 -13
- package/dist/avl/index.d.cts +0 -1853
- package/dist/avl/index.d.ts +0 -64
- package/dist/components/avl/atoms/Avl3DLabel.d.ts +0 -23
- package/dist/components/avl/atoms/Avl3DTooltip.d.ts +0 -25
- package/dist/components/avl/atoms/AvlApplication.d.ts +0 -8
- package/dist/components/avl/atoms/AvlBinding.d.ts +0 -12
- package/dist/components/avl/atoms/AvlBindingRef.d.ts +0 -7
- package/dist/components/avl/atoms/AvlEffect.d.ts +0 -10
- package/dist/components/avl/atoms/AvlEntity.d.ts +0 -9
- package/dist/components/avl/atoms/AvlEvent.d.ts +0 -7
- package/dist/components/avl/atoms/AvlField.d.ts +0 -10
- package/dist/components/avl/atoms/AvlFieldType.d.ts +0 -8
- package/dist/components/avl/atoms/AvlGuard.d.ts +0 -7
- package/dist/components/avl/atoms/AvlLiteral.d.ts +0 -7
- package/dist/components/avl/atoms/AvlOperator.d.ts +0 -8
- package/dist/components/avl/atoms/AvlOrbital.d.ts +0 -11
- package/dist/components/avl/atoms/AvlPage.d.ts +0 -7
- package/dist/components/avl/atoms/AvlPersistence.d.ts +0 -8
- package/dist/components/avl/atoms/AvlSExpr.d.ts +0 -8
- package/dist/components/avl/atoms/AvlState.d.ts +0 -15
- package/dist/components/avl/atoms/AvlTrait.d.ts +0 -13
- package/dist/components/avl/atoms/AvlTransition.d.ts +0 -18
- package/dist/components/avl/atoms/index.d.ts +0 -24
- package/dist/components/avl/hooks/useCanvasDnd.d.ts +0 -155
- package/dist/components/avl/lib/avl-3d-layout.d.ts +0 -116
- package/dist/components/avl/lib/avl-behavior-compose-converter.d.ts +0 -55
- package/dist/components/avl/lib/avl-elk-layout.d.ts +0 -55
- package/dist/components/avl/lib/avl-flow-converter.d.ts +0 -17
- package/dist/components/avl/lib/avl-layout.d.ts +0 -32
- package/dist/components/avl/lib/avl-preview-converter.d.ts +0 -71
- package/dist/components/avl/lib/avl-schema-parser.d.ts +0 -128
- package/dist/components/avl/lib/avl-story-schemas.d.ts +0 -34
- package/dist/components/avl/lib/avl-zoom-band.d.ts +0 -19
- package/dist/components/avl/lib/avl-zoom-state.d.ts +0 -72
- package/dist/components/avl/lib/derive-edit-focus.d.ts +0 -8
- package/dist/components/avl/lib/wire-validation.d.ts +0 -30
- package/dist/components/avl/molecules/Avl3DCrossWire.d.ts +0 -22
- package/dist/components/avl/molecules/Avl3DEntityCore.d.ts +0 -26
- package/dist/components/avl/molecules/Avl3DExprTree.d.ts +0 -21
- package/dist/components/avl/molecules/Avl3DOrbitalNode.d.ts +0 -29
- package/dist/components/avl/molecules/Avl3DStateNode.d.ts +0 -34
- package/dist/components/avl/molecules/Avl3DTransitionArc.d.ts +0 -38
- package/dist/components/avl/molecules/AvlBackwardEdge.d.ts +0 -8
- package/dist/components/avl/molecules/AvlBehaviorGlyph.d.ts +0 -61
- package/dist/components/avl/molecules/AvlBindingEdge.d.ts +0 -9
- package/dist/components/avl/molecules/AvlClosedCircuit.d.ts +0 -20
- package/dist/components/avl/molecules/AvlEmitListen.d.ts +0 -16
- package/dist/components/avl/molecules/AvlEventWireEdge.d.ts +0 -15
- package/dist/components/avl/molecules/AvlExprTree.d.ts +0 -13
- package/dist/components/avl/molecules/AvlOrbitalNode.d.ts +0 -12
- package/dist/components/avl/molecules/AvlOrbitalUnit.d.ts +0 -20
- package/dist/components/avl/molecules/AvlPageEdge.d.ts +0 -8
- package/dist/components/avl/molecules/AvlSlotMap.d.ts +0 -18
- package/dist/components/avl/molecules/AvlStateMachine.d.ts +0 -22
- package/dist/components/avl/molecules/AvlSwimLane.d.ts +0 -10
- package/dist/components/avl/molecules/AvlTransitionEdge.d.ts +0 -17
- package/dist/components/avl/molecules/AvlTransitionLane.d.ts +0 -18
- package/dist/components/avl/molecules/BehaviorComposeNode.d.ts +0 -13
- package/dist/components/avl/molecules/BehaviorView.d.ts +0 -12
- package/dist/components/avl/molecules/DetailView.d.ts +0 -13
- package/dist/components/avl/molecules/EventFlowEdge.d.ts +0 -13
- package/dist/components/avl/molecules/MiniStateMachine.d.ts +0 -14
- package/dist/components/avl/molecules/ModuleCard.d.ts +0 -22
- package/dist/components/avl/molecules/OrbPreviewNode.d.ts +0 -38
- package/dist/components/avl/molecules/SystemNode.d.ts +0 -12
- package/dist/components/avl/molecules/TraitCardNode.d.ts +0 -33
- package/dist/components/avl/molecules/index.d.ts +0 -38
- package/dist/components/avl/organisms/Avl3DApplicationScene.d.ts +0 -19
- package/dist/components/avl/organisms/Avl3DEffects.d.ts +0 -18
- package/dist/components/avl/organisms/Avl3DOrbitalScene.d.ts +0 -23
- package/dist/components/avl/organisms/Avl3DTraitScene.d.ts +0 -19
- package/dist/components/avl/organisms/Avl3DTransitionScene.d.ts +0 -17
- package/dist/components/avl/organisms/Avl3DViewer.d.ts +0 -40
- package/dist/components/avl/organisms/AvlClickTarget.d.ts +0 -31
- package/dist/components/avl/organisms/AvlCosmicZoom.d.ts +0 -41
- package/dist/components/avl/organisms/AvlLegend.d.ts +0 -15
- package/dist/components/avl/organisms/AvlOrbitalsCosmicZoom.d.ts +0 -54
- package/dist/components/avl/organisms/AvlTraitScene.d.ts +0 -17
- package/dist/components/avl/organisms/AvlTransitionDetail.d.ts +0 -20
- package/dist/components/avl/organisms/AvlTransitionScene.d.ts +0 -13
- package/dist/components/avl/organisms/FlowCanvas.d.ts +0 -134
- package/dist/components/avl/organisms/OrbInspector.d.ts +0 -45
- package/dist/components/avl/organisms/ZoomBreadcrumb.d.ts +0 -16
- package/dist/components/avl/organisms/ZoomLegend.d.ts +0 -10
- package/dist/components/avl/organisms/index.d.ts +0 -19
- package/dist/components/avl/providers/avl-3d-context.d.ts +0 -32
- package/dist/components/avl/types/avl-atom-types.d.ts +0 -53
- package/dist/components/avl/types/avl-behavior-compose-types.d.ts +0 -120
- package/dist/components/avl/types/avl-canvas-types.d.ts +0 -39
- package/dist/components/avl/types/avl-preview-types.d.ts +0 -240
- package/dist/components/core/atoms/Aside.d.ts +0 -15
- package/dist/components/core/atoms/AtlasImage.d.ts +0 -58
- package/dist/components/core/atoms/Avatar.d.ts +0 -61
- package/dist/components/core/atoms/Badge.d.ts +0 -29
- package/dist/components/core/atoms/Box.d.ts +0 -68
- package/dist/components/core/atoms/Button.d.ts +0 -33
- package/dist/components/core/atoms/Card.d.ts +0 -34
- package/dist/components/core/atoms/Center.d.ts +0 -33
- package/dist/components/core/atoms/Checkbox.d.ts +0 -14
- package/dist/components/core/atoms/ConditionalWrapper.d.ts +0 -69
- package/dist/components/core/atoms/ConfettiEffect.d.ts +0 -19
- package/dist/components/core/atoms/DayCell.d.ts +0 -22
- package/dist/components/core/atoms/Dialog.d.ts +0 -18
- package/dist/components/core/atoms/Divider.d.ts +0 -29
- package/dist/components/core/atoms/FilterPill.d.ts +0 -30
- package/dist/components/core/atoms/FlipContainer.d.ts +0 -21
- package/dist/components/core/atoms/GameIcon.d.ts +0 -19
- package/dist/components/core/atoms/Icon.d.ts +0 -57
- package/dist/components/core/atoms/InfiniteScrollSentinel.d.ts +0 -24
- package/dist/components/core/atoms/Input.d.ts +0 -39
- package/dist/components/core/atoms/Label.d.ts +0 -12
- package/dist/components/core/atoms/LawReferenceTooltip.d.ts +0 -48
- package/dist/components/core/atoms/Overlay.d.ts +0 -17
- package/dist/components/core/atoms/ProgressBar.d.ts +0 -63
- package/dist/components/core/atoms/Radio.d.ts +0 -35
- package/dist/components/core/atoms/RangeSlider.d.ts +0 -34
- package/dist/components/core/atoms/SectionHeader.d.ts +0 -14
- package/dist/components/core/atoms/Select.d.ts +0 -49
- package/dist/components/core/atoms/Spacer.d.ts +0 -25
- package/dist/components/core/atoms/Sparkline.d.ts +0 -30
- package/dist/components/core/atoms/Spinner.d.ts +0 -10
- package/dist/components/core/atoms/Stack.d.ts +0 -67
- package/dist/components/core/atoms/StatusDot.d.ts +0 -16
- package/dist/components/core/atoms/Switch.d.ts +0 -12
- package/dist/components/core/atoms/TextHighlight.d.ts +0 -54
- package/dist/components/core/atoms/Textarea.d.ts +0 -17
- package/dist/components/core/atoms/ThemeToggle.d.ts +0 -33
- package/dist/components/core/atoms/TimeSlotCell.d.ts +0 -23
- package/dist/components/core/atoms/TraitFrame.d.ts +0 -54
- package/dist/components/core/atoms/TrendIndicator.d.ts +0 -20
- package/dist/components/core/atoms/TypewriterText.d.ts +0 -20
- package/dist/components/core/atoms/Typography.d.ts +0 -39
- package/dist/components/core/atoms/index.d.ts +0 -52
- package/dist/components/core/atoms/svg/SvgBranch.d.ts +0 -16
- package/dist/components/core/atoms/svg/SvgConnection.d.ts +0 -17
- package/dist/components/core/atoms/svg/SvgFlow.d.ts +0 -14
- package/dist/components/core/atoms/svg/SvgGrid.d.ts +0 -18
- package/dist/components/core/atoms/svg/SvgLobe.d.ts +0 -17
- package/dist/components/core/atoms/svg/SvgMesh.d.ts +0 -16
- package/dist/components/core/atoms/svg/SvgMorph.d.ts +0 -15
- package/dist/components/core/atoms/svg/SvgNode.d.ts +0 -16
- package/dist/components/core/atoms/svg/SvgPulse.d.ts +0 -16
- package/dist/components/core/atoms/svg/SvgRing.d.ts +0 -17
- package/dist/components/core/atoms/svg/SvgShield.d.ts +0 -15
- package/dist/components/core/atoms/svg/SvgStack.d.ts +0 -17
- package/dist/components/core/atoms/svg/index.d.ts +0 -12
- package/dist/components/core/atoms/types.d.ts +0 -47
- package/dist/components/core/molecules/Accordion.d.ts +0 -71
- package/dist/components/core/molecules/ActivationBlock.d.ts +0 -22
- package/dist/components/core/molecules/Alert.d.ts +0 -25
- package/dist/components/core/molecules/AnimatedCounter.d.ts +0 -18
- package/dist/components/core/molecules/AssetPicker.d.ts +0 -21
- package/dist/components/core/molecules/BloomQuizBlock.d.ts +0 -25
- package/dist/components/core/molecules/BranchingLogicBuilder.d.ts +0 -33
- package/dist/components/core/molecules/Breadcrumb.d.ts +0 -55
- package/dist/components/core/molecules/ButtonGroup.d.ts +0 -77
- package/dist/components/core/molecules/CalendarGrid.d.ts +0 -61
- package/dist/components/core/molecules/Card.d.ts +0 -58
- package/dist/components/core/molecules/Carousel.d.ts +0 -42
- package/dist/components/core/molecules/Chart.d.ts +0 -106
- package/dist/components/core/molecules/ChartLegend.d.ts +0 -20
- package/dist/components/core/molecules/Coachmark.d.ts +0 -47
- package/dist/components/core/molecules/ConfirmDialog.d.ts +0 -49
- package/dist/components/core/molecules/ConnectionBlock.d.ts +0 -18
- package/dist/components/core/molecules/Container.d.ts +0 -30
- package/dist/components/core/molecules/ContentRenderer.d.ts +0 -23
- package/dist/components/core/molecules/DataGrid.d.ts +0 -117
- package/dist/components/core/molecules/DataList.d.ts +0 -129
- package/dist/components/core/molecules/DateRangePicker.d.ts +0 -56
- package/dist/components/core/molecules/DateRangeSelector.d.ts +0 -21
- package/dist/components/core/molecules/DocBreadcrumb.d.ts +0 -20
- package/dist/components/core/molecules/DocPagination.d.ts +0 -21
- package/dist/components/core/molecules/DocSearch.d.ts +0 -22
- package/dist/components/core/molecules/DocSidebar.d.ts +0 -24
- package/dist/components/core/molecules/DocTOC.d.ts +0 -24
- package/dist/components/core/molecules/DocumentViewer.d.ts +0 -61
- package/dist/components/core/molecules/Drawer.d.ts +0 -47
- package/dist/components/core/molecules/EdgeDecoration.d.ts +0 -36
- package/dist/components/core/molecules/EmptyState.d.ts +0 -29
- package/dist/components/core/molecules/ErrorBoundary.d.ts +0 -54
- package/dist/components/core/molecules/ErrorState.d.ts +0 -14
- package/dist/components/core/molecules/FeatureGrid.d.ts +0 -19
- package/dist/components/core/molecules/FileTree.d.ts +0 -37
- package/dist/components/core/molecules/FilterGroup.d.ts +0 -61
- package/dist/components/core/molecules/Flex.d.ts +0 -43
- package/dist/components/core/molecules/FlipCard.d.ts +0 -24
- package/dist/components/core/molecules/FloatingActionButton.d.ts +0 -83
- package/dist/components/core/molecules/FormField.d.ts +0 -16
- package/dist/components/core/molecules/FormSection.d.ts +0 -39
- package/dist/components/core/molecules/FormSectionHeader.d.ts +0 -31
- package/dist/components/core/molecules/GradientDivider.d.ts +0 -15
- package/dist/components/core/molecules/GraphCanvas.d.ts +0 -83
- package/dist/components/core/molecules/GraphView.d.ts +0 -45
- package/dist/components/core/molecules/Grid.d.ts +0 -54
- package/dist/components/core/molecules/GridPicker.d.ts +0 -44
- package/dist/components/core/molecules/Header.d.ts +0 -113
- package/dist/components/core/molecules/IconPicker.d.ts +0 -18
- package/dist/components/core/molecules/InputGroup.d.ts +0 -24
- package/dist/components/core/molecules/JazariStateMachine.d.ts +0 -34
- package/dist/components/core/molecules/JsonTreeEditor.d.ts +0 -13
- package/dist/components/core/molecules/Lightbox.d.ts +0 -26
- package/dist/components/core/molecules/LikertScale.d.ts +0 -34
- package/dist/components/core/molecules/LineChart.d.ts +0 -35
- package/dist/components/core/molecules/LoadingState.d.ts +0 -7
- package/dist/components/core/molecules/MapView.d.ts +0 -87
- package/dist/components/core/molecules/MatrixQuestion.d.ts +0 -35
- package/dist/components/core/molecules/Menu.d.ts +0 -44
- package/dist/components/core/molecules/Meter.d.ts +0 -52
- package/dist/components/core/molecules/Modal.d.ts +0 -36
- package/dist/components/core/molecules/Navigation.d.ts +0 -67
- package/dist/components/core/molecules/NodeSlotEditor.d.ts +0 -17
- package/dist/components/core/molecules/NumberStepper.d.ts +0 -28
- package/dist/components/core/molecules/OnboardingSpotlight.d.ts +0 -27
- package/dist/components/core/molecules/OptionConstraintGroup.d.ts +0 -44
- package/dist/components/core/molecules/OrbitalVisualization.d.ts +0 -48
- package/dist/components/core/molecules/PageHeader.d.ts +0 -60
- package/dist/components/core/molecules/Pagination.d.ts +0 -71
- package/dist/components/core/molecules/Popover.d.ts +0 -39
- package/dist/components/core/molecules/PositionedCanvas.d.ts +0 -40
- package/dist/components/core/molecules/ProgressDots.d.ts +0 -24
- package/dist/components/core/molecules/PropertyInspector.d.ts +0 -38
- package/dist/components/core/molecules/PullToRefresh.d.ts +0 -22
- package/dist/components/core/molecules/QrScanner.d.ts +0 -24
- package/dist/components/core/molecules/QuizBlock.d.ts +0 -20
- package/dist/components/core/molecules/ReflectionBlock.d.ts +0 -23
- package/dist/components/core/molecules/RelationSelect.d.ts +0 -48
- package/dist/components/core/molecules/RepeatableFormSection.d.ts +0 -60
- package/dist/components/core/molecules/ReplyTree.d.ts +0 -46
- package/dist/components/core/molecules/RichBlockEditor.d.ts +0 -43
- package/dist/components/core/molecules/ScaledDiagram.d.ts +0 -20
- package/dist/components/core/molecules/SearchInput.d.ts +0 -60
- package/dist/components/core/molecules/Section.d.ts +0 -43
- package/dist/components/core/molecules/SidePanel.d.ts +0 -53
- package/dist/components/core/molecules/Sidebar.d.ts +0 -72
- package/dist/components/core/molecules/SignaturePad.d.ts +0 -46
- package/dist/components/core/molecules/SimpleGrid.d.ts +0 -27
- package/dist/components/core/molecules/Skeleton.d.ts +0 -35
- package/dist/components/core/molecules/SocialProof.d.ts +0 -25
- package/dist/components/core/molecules/SortableList.d.ts +0 -19
- package/dist/components/core/molecules/Split.d.ts +0 -41
- package/dist/components/core/molecules/StarRating.d.ts +0 -27
- package/dist/components/core/molecules/StatDisplay.d.ts +0 -58
- package/dist/components/core/molecules/SwipeableRow.d.ts +0 -26
- package/dist/components/core/molecules/TableView.d.ts +0 -111
- package/dist/components/core/molecules/Tabs.d.ts +0 -60
- package/dist/components/core/molecules/TagInput.d.ts +0 -52
- package/dist/components/core/molecules/Toast.d.ts +0 -36
- package/dist/components/core/molecules/Tooltip.d.ts +0 -25
- package/dist/components/core/molecules/UploadDropZone.d.ts +0 -28
- package/dist/components/core/molecules/VersionDiff.d.ts +0 -62
- package/dist/components/core/molecules/ViolationAlert.d.ts +0 -46
- package/dist/components/core/molecules/VoteStack.d.ts +0 -35
- package/dist/components/core/molecules/WizardContainer.d.ts +0 -166
- package/dist/components/core/molecules/WizardNavigation.d.ts +0 -61
- package/dist/components/core/molecules/WizardProgress.d.ts +0 -45
- package/dist/components/core/molecules/index.d.ts +0 -138
- package/dist/components/core/molecules/lessonSegmentUtils.d.ts +0 -18
- package/dist/components/core/molecules/markdown/CodeBlock.d.ts +0 -108
- package/dist/components/core/molecules/markdown/MarkdownContent.d.ts +0 -26
- package/dist/components/core/molecules/markdown/index.d.ts +0 -2
- package/dist/components/core/molecules/parseLessonSegments.d.ts +0 -44
- package/dist/components/core/molecules/useDataDnd.d.ts +0 -63
- package/dist/components/core/organisms/CardGrid.d.ts +0 -84
- package/dist/components/core/organisms/ChatBar.d.ts +0 -31
- package/dist/components/core/organisms/CodeRunnerPanel.d.ts +0 -42
- package/dist/components/core/organisms/ComponentPatterns.d.ts +0 -185
- package/dist/components/core/organisms/CustomPattern.d.ts +0 -105
- package/dist/components/core/organisms/DataTable.d.ts +0 -79
- package/dist/components/core/organisms/DetailPanel.d.ts +0 -80
- package/dist/components/core/organisms/DrawerSlot.d.ts +0 -42
- package/dist/components/core/organisms/Form.d.ts +0 -214
- package/dist/components/core/organisms/LayoutPatterns.d.ts +0 -108
- package/dist/components/core/organisms/List.d.ts +0 -81
- package/dist/components/core/organisms/MasterDetail.d.ts +0 -35
- package/dist/components/core/organisms/MediaGallery.d.ts +0 -63
- package/dist/components/core/organisms/ModalSlot.d.ts +0 -38
- package/dist/components/core/organisms/NotifyListener.d.ts +0 -15
- package/dist/components/core/organisms/SegmentRenderer.d.ts +0 -38
- package/dist/components/core/organisms/StatCard.d.ts +0 -65
- package/dist/components/core/organisms/StateMachineView.d.ts +0 -45
- package/dist/components/core/organisms/SubagentTracePanel.d.ts +0 -50
- package/dist/components/core/organisms/Timeline.d.ts +0 -71
- package/dist/components/core/organisms/ToastSlot.d.ts +0 -41
- package/dist/components/core/organisms/UISlotRenderer.d.ts +0 -116
- package/dist/components/core/organisms/book/index.d.ts +0 -7
- package/dist/components/core/organisms/book/types.d.ts +0 -62
- package/dist/components/core/organisms/component-registry.generated.d.ts +0 -9
- package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +0 -29
- package/dist/components/core/organisms/debug/WalkMinimap.d.ts +0 -17
- package/dist/components/core/organisms/debug/hooks/useDebugData.d.ts +0 -25
- package/dist/components/core/organisms/debug/index.d.ts +0 -13
- package/dist/components/core/organisms/debug/tabs/EntitiesTab.d.ts +0 -14
- package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +0 -18
- package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +0 -14
- package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +0 -14
- package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +0 -20
- package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +0 -14
- package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +0 -14
- package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +0 -19
- package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +0 -17
- package/dist/components/core/organisms/index.d.ts +0 -33
- package/dist/components/core/organisms/layout/DashboardGrid.d.ts +0 -33
- package/dist/components/core/organisms/layout/MasterDetailLayout.d.ts +0 -32
- package/dist/components/core/organisms/layout/SplitPane.d.ts +0 -34
- package/dist/components/core/organisms/layout/TabbedContainer.d.ts +0 -42
- package/dist/components/core/organisms/layout/index.d.ts +0 -9
- package/dist/components/core/organisms/marketing-types.d.ts +0 -8
- package/dist/components/core/organisms/trace-edit-focus.d.ts +0 -14
- package/dist/components/core/organisms/types.d.ts +0 -72
- package/dist/components/core/templates/CounterTemplate.d.ts +0 -51
- package/dist/components/core/templates/DashboardLayout.d.ts +0 -110
- package/dist/components/core/templates/GenericAppTemplate.d.ts +0 -24
- package/dist/components/core/templates/index.d.ts +0 -10
- package/dist/components/core/templates/types.d.ts +0 -35
- package/dist/components/game/atoms/ChoiceButton.d.ts +0 -29
- package/dist/components/game/atoms/ControlButton.d.ts +0 -35
- package/dist/components/game/atoms/DialogueBubble.d.ts +0 -26
- package/dist/components/game/atoms/DrawShape.d.ts +0 -50
- package/dist/components/game/atoms/DrawSprite.d.ts +0 -47
- package/dist/components/game/atoms/DrawText.d.ts +0 -31
- package/dist/components/game/atoms/GameAudioToggle.d.ts +0 -34
- package/dist/components/game/atoms/HealthBar.d.ts +0 -32
- package/dist/components/game/atoms/MiniMap.d.ts +0 -40
- package/dist/components/game/atoms/ScoreDisplay.d.ts +0 -25
- package/dist/components/game/atoms/StateIndicator.d.ts +0 -29
- package/dist/components/game/atoms/TimerDisplay.d.ts +0 -22
- package/dist/components/game/molecules/ActionPalette.d.ts +0 -34
- package/dist/components/game/molecules/ActionTile.d.ts +0 -30
- package/dist/components/game/molecules/Canvas.d.ts +0 -96
- package/dist/components/game/molecules/Canvas2D.d.ts +0 -120
- package/dist/components/game/molecules/ControlGrid.d.ts +0 -49
- package/dist/components/game/molecules/DrawShapeLayer.d.ts +0 -19
- package/dist/components/game/molecules/DrawSpriteLayer.d.ts +0 -21
- package/dist/components/game/molecules/DrawTextLayer.d.ts +0 -22
- package/dist/components/game/molecules/GameHud.d.ts +0 -52
- package/dist/components/game/molecules/GameMenu.d.ts +0 -42
- package/dist/components/game/molecules/SequenceBar.d.ts +0 -51
- package/dist/components/game/molecules/StatBadge.d.ts +0 -39
- package/dist/components/game/molecules/StateGraph.d.ts +0 -38
- package/dist/components/game/molecules/StateJsonView.d.ts +0 -37
- package/dist/components/game/molecules/StateNode.d.ts +0 -31
- package/dist/components/game/molecules/TraitSlot.d.ts +0 -99
- package/dist/components/game/molecules/TraitStateViewer.d.ts +0 -52
- package/dist/components/game/molecules/TransitionArrow.d.ts +0 -31
- package/dist/components/game/molecules/index.d.ts +0 -39
- package/dist/components/game/patterns.d.ts +0 -20
- package/dist/components/game/templates/GameShell.d.ts +0 -35
- package/dist/components/learning/atoms/LearningCanvas.d.ts +0 -80
- package/dist/components/learning/molecules/AlgorithmCanvas.d.ts +0 -58
- package/dist/components/learning/molecules/BiologyCanvas.d.ts +0 -47
- package/dist/components/learning/molecules/ChemistryCanvas.d.ts +0 -55
- package/dist/components/learning/molecules/MathCanvas.d.ts +0 -61
- package/dist/components/learning/molecules/PhysicsCanvas.d.ts +0 -54
- package/dist/components/marketing/atoms/AnimatedCounter.d.ts +0 -20
- package/dist/components/marketing/atoms/AnimatedGraphic.d.ts +0 -32
- package/dist/components/marketing/atoms/AnimatedReveal.d.ts +0 -26
- package/dist/components/marketing/atoms/ContentSection.d.ts +0 -16
- package/dist/components/marketing/atoms/MarketingStatCard.d.ts +0 -13
- package/dist/components/marketing/atoms/PatternTile.d.ts +0 -41
- package/dist/components/marketing/molecules/ArticleSection.d.ts +0 -18
- package/dist/components/marketing/molecules/CTABanner.d.ts +0 -26
- package/dist/components/marketing/molecules/CaseStudyCard.d.ts +0 -24
- package/dist/components/marketing/molecules/CommunityLinks.d.ts +0 -28
- package/dist/components/marketing/molecules/FeatureCard.d.ts +0 -26
- package/dist/components/marketing/molecules/GeometricPattern.d.ts +0 -33
- package/dist/components/marketing/molecules/HeroSection.d.ts +0 -28
- package/dist/components/marketing/molecules/InstallBox.d.ts +0 -16
- package/dist/components/marketing/molecules/MarketingFooter.d.ts +0 -29
- package/dist/components/marketing/molecules/PricingCard.d.ts +0 -19
- package/dist/components/marketing/molecules/PricingGrid.d.ts +0 -13
- package/dist/components/marketing/molecules/PullQuote.d.ts +0 -14
- package/dist/components/marketing/molecules/ServiceCatalog.d.ts +0 -19
- package/dist/components/marketing/molecules/ShowcaseCard.d.ts +0 -18
- package/dist/components/marketing/molecules/SplitSection.d.ts +0 -19
- package/dist/components/marketing/molecules/StatsGrid.d.ts +0 -18
- package/dist/components/marketing/molecules/StepFlow.d.ts +0 -21
- package/dist/components/marketing/molecules/TagCloud.d.ts +0 -18
- package/dist/components/marketing/molecules/TeamCard.d.ts +0 -19
- package/dist/components/marketing/organisms/CaseStudyOrganism.d.ts +0 -29
- package/dist/components/marketing/organisms/FeatureGridOrganism.d.ts +0 -30
- package/dist/components/marketing/organisms/HeroOrganism.d.ts +0 -42
- package/dist/components/marketing/organisms/PricingOrganism.d.ts +0 -33
- package/dist/components/marketing/organisms/ShowcaseOrganism.d.ts +0 -34
- package/dist/components/marketing/organisms/StatsOrganism.d.ts +0 -23
- package/dist/components/marketing/organisms/StepFlowOrganism.d.ts +0 -29
- package/dist/components/marketing/organisms/TeamOrganism.d.ts +0 -28
- package/dist/components/marketing/organisms/book/BookChapterView.d.ts +0 -21
- package/dist/components/marketing/organisms/book/BookCoverPage.d.ts +0 -21
- package/dist/components/marketing/organisms/book/BookNavBar.d.ts +0 -19
- package/dist/components/marketing/organisms/book/BookTableOfContents.d.ts +0 -20
- package/dist/components/marketing/organisms/book/BookViewer.d.ts +0 -31
- package/dist/components/marketing/templates/AboutPageTemplate.d.ts +0 -53
- package/dist/components/marketing/templates/AuthLayout.d.ts +0 -15
- package/dist/components/marketing/templates/FeatureDetailPageTemplate.d.ts +0 -37
- package/dist/components/marketing/templates/LandingPageTemplate.d.ts +0 -70
- package/dist/components/marketing/templates/PricingPageTemplate.d.ts +0 -44
- package/dist/hooks/useAgentChat.d.ts +0 -105
- package/dist/hooks/useAlmadarDndCollision.d.ts +0 -34
- package/dist/hooks/useAuthContext.d.ts +0 -25
- package/dist/hooks/useCamera.d.ts +0 -57
- package/dist/hooks/useCanvasGestures.d.ts +0 -44
- package/dist/hooks/useClientEffects.d.ts +0 -88
- package/dist/hooks/useCompile.d.ts +0 -18
- package/dist/hooks/useDeepAgentGeneration.d.ts +0 -46
- package/dist/hooks/useDragReorder.d.ts +0 -26
- package/dist/hooks/useDraggable.d.ts +0 -25
- package/dist/hooks/useDropZone.d.ts +0 -23
- package/dist/hooks/useEventBus.d.ts +0 -99
- package/dist/hooks/useExtensions.d.ts +0 -32
- package/dist/hooks/useFileEditor.d.ts +0 -32
- package/dist/hooks/useFileSystem.d.ts +0 -50
- package/dist/hooks/useGameAudio.d.ts +0 -47
- package/dist/hooks/useGitHub.d.ts +0 -58
- package/dist/hooks/useImageCache.d.ts +0 -16
- package/dist/hooks/useInfiniteScroll.d.ts +0 -13
- package/dist/hooks/useLongPress.d.ts +0 -16
- package/dist/hooks/useOrbitalHistory.d.ts +0 -39
- package/dist/hooks/usePreview.d.ts +0 -57
- package/dist/hooks/usePullToRefresh.d.ts +0 -25
- package/dist/hooks/useQuerySingleton.d.ts +0 -79
- package/dist/hooks/useRenderInterpolation.d.ts +0 -33
- package/dist/hooks/useResolvedSchema.d.ts +0 -45
- package/dist/hooks/useSharedEntityStore.d.ts +0 -53
- package/dist/hooks/useSwipeGesture.d.ts +0 -26
- package/dist/hooks/useTapReveal.d.ts +0 -32
- package/dist/hooks/useTraitStateMachine.d.ts +0 -136
- package/dist/hooks/useTranslate.d.ts +0 -35
- package/dist/hooks/useUIEvents.d.ts +0 -41
- package/dist/hooks/useUnitSpriteAtlas.d.ts +0 -24
- package/dist/hooks/useValidation.d.ts +0 -46
- package/dist/lib/api-client.d.ts +0 -43
- package/dist/lib/atlasSlice.d.ts +0 -58
- package/dist/lib/boardEntity.d.ts +0 -44
- package/dist/lib/client-effect-executor.d.ts +0 -57
- package/dist/lib/cn.d.ts +0 -6
- package/dist/lib/createClientEffectHandlers.d.ts +0 -42
- package/dist/lib/data-resolver.d.ts +0 -55
- package/dist/lib/debug.d.ts +0 -36
- package/dist/lib/debugRegistry.d.ts +0 -30
- package/dist/lib/debugUtils.d.ts +0 -27
- package/dist/lib/drawable/contract.d.ts +0 -68
- package/dist/lib/drawable/hitTest.d.ts +0 -23
- package/dist/lib/drawable/paintDispatch.d.ts +0 -22
- package/dist/lib/drawable/projector.d.ts +0 -14
- package/dist/lib/drawable/projector3d.d.ts +0 -20
- package/dist/lib/drawable/three/Camera3D.d.ts +0 -60
- package/dist/lib/drawable/three/Canvas3DErrorBoundary.d.ts +0 -51
- package/dist/lib/drawable/three/Canvas3DHost.d.ts +0 -178
- package/dist/lib/drawable/three/Canvas3DLoadingState.d.ts +0 -44
- package/dist/lib/drawable/three/Drawable3D.d.ts +0 -20
- package/dist/lib/drawable/three/GameCamera3D.d.ts +0 -16
- package/dist/lib/drawable/three/Lighting3D.d.ts +0 -55
- package/dist/lib/drawable/three/ModelLoader.d.ts +0 -52
- package/dist/lib/drawable/three/Scene3D.d.ts +0 -37
- package/dist/lib/drawable/three/game3dTheme.d.ts +0 -14
- package/dist/lib/drawable/three/hooks/useAssetLoader.d.ts +0 -58
- package/dist/lib/drawable/three/hooks/useGameCanvas3DEvents.d.ts +0 -124
- package/dist/lib/drawable/three/hooks/useRaycaster.d.ts +0 -86
- package/dist/lib/drawable/three/hooks/useSceneGraph.d.ts +0 -67
- package/dist/lib/drawable/three/hooks/useThree.d.ts +0 -58
- package/dist/lib/drawable/three/lib/AssetLoader.d.ts +0 -80
- package/dist/lib/drawable/three/lib/culling.d.ts +0 -134
- package/dist/lib/drawable/three/lib/grid3D.d.ts +0 -154
- package/dist/lib/drawable/three/mesh3d.d.ts +0 -28
- package/dist/lib/editorUtils.d.ts +0 -114
- package/dist/lib/embedded-traits.d.ts +0 -39
- package/dist/lib/entityDebug.d.ts +0 -39
- package/dist/lib/fn-form-lambda.d.ts +0 -27
- package/dist/lib/game.d.ts +0 -92
- package/dist/lib/gameShared.d.ts +0 -18
- package/dist/lib/getNestedValue.d.ts +0 -34
- package/dist/lib/guardRegistry.d.ts +0 -33
- package/dist/lib/iconFamily.d.ts +0 -41
- package/dist/lib/imageCache.d.ts +0 -9
- package/dist/lib/init.d.ts +0 -14
- package/dist/lib/isometric.d.ts +0 -121
- package/dist/lib/isometricTypes.d.ts +0 -141
- package/dist/lib/jazari/index.d.ts +0 -5
- package/dist/lib/jazari/layout.d.ts +0 -31
- package/dist/lib/jazari/svg-paths.d.ts +0 -61
- package/dist/lib/jazari/types.d.ts +0 -91
- package/dist/lib/makeAsset.d.ts +0 -5
- package/dist/lib/mechanics.d.ts +0 -4
- package/dist/lib/offline-executor.d.ts +0 -239
- package/dist/lib/orbitalsByTrait.d.ts +0 -34
- package/dist/lib/painter2d.d.ts +0 -81
- package/dist/lib/parseContentSegments.d.ts +0 -42
- package/dist/lib/pattern-resolver.d.ts +0 -88
- package/dist/lib/perf.d.ts +0 -32
- package/dist/lib/physicsPresets.d.ts +0 -4
- package/dist/lib/physicsTypes.d.ts +0 -43
- package/dist/lib/prepareSchemaForPreview.d.ts +0 -71
- package/dist/lib/puzzleObject.d.ts +0 -41
- package/dist/lib/slot-definitions.d.ts +0 -33
- package/dist/lib/spriteAnimation.d.ts +0 -85
- package/dist/lib/spriteAnimationTypes.d.ts +0 -72
- package/dist/lib/spriteSheetConstants.d.ts +0 -16
- package/dist/lib/tickRegistry.d.ts +0 -40
- package/dist/lib/trait-binding-resolver.d.ts +0 -57
- package/dist/lib/traitRegistry.d.ts +0 -34
- package/dist/lib/verificationRegistry.d.ts +0 -91
- package/dist/lib/visualizer/browser.d.ts +0 -48
- package/dist/lib/visualizer/index.d.ts +0 -144
- package/dist/lib/webPainter2d.d.ts +0 -7
- package/dist/lib/wrapCallbackForEvent.d.ts +0 -16
- package/dist/marketing/index.d.cts +0 -1067
- package/dist/marketing/index.d.ts +0 -72
- package/dist/providers/CurrentPagePathContext.d.ts +0 -9
- package/dist/providers/DesignThemeContext.d.ts +0 -21
- package/dist/providers/EntitySchemaContext.d.ts +0 -81
- package/dist/providers/EventBusProvider.d.ts +0 -47
- package/dist/providers/GameAudioProvider.d.ts +0 -53
- package/dist/providers/OfflineModeProvider.d.ts +0 -79
- package/dist/providers/OrbitalProvider.d.ts +0 -110
- package/dist/providers/OrbitalThemeProvider.d.ts +0 -37
- package/dist/providers/SelectionProvider.d.ts +0 -82
- package/dist/providers/ServerBridge.d.ts +0 -102
- package/dist/providers/ThemeContext.d.ts +0 -104
- package/dist/providers/TraitProvider.d.ts +0 -53
- package/dist/providers/TraitScopeProvider.d.ts +0 -43
- package/dist/providers/UserContext.d.ts +0 -112
- package/dist/providers/VerificationProvider.d.ts +0 -64
- package/dist/providers/navigation.d.ts +0 -142
- package/dist/runtime/BrowserPlayground.d.ts +0 -34
- package/dist/runtime/OrbPreview.d.ts +0 -84
- package/dist/scripts/audit-tailwind-safelist.d.ts +0 -27
- package/dist/scripts/generate-design-system.d.ts +0 -29
- package/dist/scripts/generate-theme-from-schema.d.ts +0 -10
- package/dist/scripts/generate.d.ts +0 -12
- package/dist/scripts/suggest-components.d.ts +0 -31
- package/dist/scripts/types.d.ts +0 -129
- package/dist/tsup.config.d.ts +0 -3
- package/dist/types/renderer-types.d.ts +0 -146
- package/dist/types/runtime-types.d.ts +0 -21
- package/dist/types/slot-types.d.ts +0 -49
- package/dist/vitest.config.d.ts +0 -2
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { ReactNode, ReactElement } from 'react';
|
|
3
|
+
import { ThemeRef, FieldValue } from '@almadar/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Unified ThemeContext - Single provider for theme and color mode
|
|
7
|
+
*
|
|
8
|
+
* Combines design theme selection (ocean, wireframe, etc.) with
|
|
9
|
+
* color mode (light/dark) into a single, simple system.
|
|
10
|
+
*
|
|
11
|
+
* Uses a single data attribute: data-theme="ocean-light" or data-theme="ocean-dark"
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** Color mode preference */
|
|
17
|
+
type ColorMode = "light" | "dark" | "system";
|
|
18
|
+
/** Resolved color mode (what's actually applied) */
|
|
19
|
+
type ResolvedMode = "light" | "dark";
|
|
20
|
+
/** Theme definition */
|
|
21
|
+
interface UIThemeDefinition {
|
|
22
|
+
/** Theme identifier (e.g., "ocean", "wireframe") */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Display name for UI (e.g., "Ocean Blue") */
|
|
25
|
+
displayName?: string;
|
|
26
|
+
/** Whether this theme has light mode styles */
|
|
27
|
+
hasLightMode?: boolean;
|
|
28
|
+
/** Whether this theme has dark mode styles */
|
|
29
|
+
hasDarkMode?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Built-in themes available in the design system */
|
|
32
|
+
declare const BUILT_IN_THEMES: UIThemeDefinition[];
|
|
33
|
+
/** Theme context value */
|
|
34
|
+
interface ThemeContextValue {
|
|
35
|
+
/** Current theme name */
|
|
36
|
+
theme: string;
|
|
37
|
+
/** Current color mode setting (may be 'system') */
|
|
38
|
+
mode: ColorMode;
|
|
39
|
+
/** Resolved color mode (always 'light' or 'dark') */
|
|
40
|
+
resolvedMode: ResolvedMode;
|
|
41
|
+
/** Set the theme */
|
|
42
|
+
setTheme: (theme: string) => void;
|
|
43
|
+
/** Set the color mode */
|
|
44
|
+
setMode: (mode: ColorMode) => void;
|
|
45
|
+
/** Toggle between light and dark modes */
|
|
46
|
+
toggleMode: () => void;
|
|
47
|
+
/** Available themes */
|
|
48
|
+
availableThemes: UIThemeDefinition[];
|
|
49
|
+
/** The full theme string applied to data-theme (e.g., "ocean-light") */
|
|
50
|
+
appliedTheme: string;
|
|
51
|
+
}
|
|
52
|
+
declare const ThemeContext: React__default.Context<ThemeContextValue | undefined>;
|
|
53
|
+
interface ThemeProviderProps {
|
|
54
|
+
children: React__default.ReactNode;
|
|
55
|
+
/** Available themes (will be merged with built-in themes) */
|
|
56
|
+
themes?: readonly UIThemeDefinition[] | UIThemeDefinition[];
|
|
57
|
+
/** Default theme name */
|
|
58
|
+
defaultTheme?: string;
|
|
59
|
+
/** Default color mode */
|
|
60
|
+
defaultMode?: ColorMode;
|
|
61
|
+
/** Optional target element ref — when provided, theme attributes are applied to this element instead of document.documentElement */
|
|
62
|
+
targetRef?: React__default.RefObject<HTMLElement>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Unified ThemeProvider component
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* // Basic usage with built-in themes
|
|
70
|
+
* <ThemeProvider defaultTheme="wireframe" defaultMode="light">
|
|
71
|
+
* <App />
|
|
72
|
+
* </ThemeProvider>
|
|
73
|
+
*
|
|
74
|
+
* // With custom themes from orbital schema
|
|
75
|
+
* import { THEMES } from './generated/theme-manifest';
|
|
76
|
+
* <ThemeProvider themes={THEMES} defaultTheme="ocean" defaultMode="system">
|
|
77
|
+
* <App />
|
|
78
|
+
* </ThemeProvider>
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
82
|
+
/**
|
|
83
|
+
* Hook for accessing theme context
|
|
84
|
+
*
|
|
85
|
+
* @returns Theme context value
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```tsx
|
|
89
|
+
* const { theme, resolvedMode, toggleMode, setTheme } = useTheme();
|
|
90
|
+
*
|
|
91
|
+
* // Toggle dark mode
|
|
92
|
+
* <button onClick={toggleMode}>
|
|
93
|
+
* {resolvedMode === 'dark' ? 'Light' : 'Dark'}
|
|
94
|
+
* </button>
|
|
95
|
+
*
|
|
96
|
+
* // Change theme
|
|
97
|
+
* <select value={theme} onChange={(e) => setTheme(e.target.value)}>
|
|
98
|
+
* {availableThemes.map(t => (
|
|
99
|
+
* <option key={t.name} value={t.name}>{t.displayName || t.name}</option>
|
|
100
|
+
* ))}
|
|
101
|
+
* </select>
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
declare function useTheme(): ThemeContextValue;
|
|
105
|
+
type DesignTheme = UIThemeDefinition;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* OrbitalThemeProvider — runtime application of `OrbitalDefinition.theme`.
|
|
109
|
+
*
|
|
110
|
+
* Wraps an orbital's rendered subtree in a wrapping `<div>` that sets the
|
|
111
|
+
* CSS variables derived from `theme.tokens` (and `variants.dark` when the
|
|
112
|
+
* resolved color mode is dark). Inline custom-property declarations on the
|
|
113
|
+
* wrapper override any `[data-theme]` selector rule for the same variable
|
|
114
|
+
* within the subtree, while letting unset variables cascade from the parent.
|
|
115
|
+
*
|
|
116
|
+
* Mapping is delegated to `themeTokensToCssVars`, which mirrors the Rust
|
|
117
|
+
* compiler's `generate_tokens_css`. Compile-time and runtime produce the
|
|
118
|
+
* same CSS variable map for the same `ThemeDefinition` input, so a Studio
|
|
119
|
+
* Design System edit and an `orbital compile` of the same schema render
|
|
120
|
+
* identically.
|
|
121
|
+
*
|
|
122
|
+
* No-op when:
|
|
123
|
+
* - `theme` is `undefined` (orbital declares no theme — parent cascades)
|
|
124
|
+
* - `theme` is a string ref that didn't get inlined upstream
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```tsx
|
|
128
|
+
* <OrbitalThemeProvider theme={orbital.theme}>
|
|
129
|
+
* <UISlotRenderer />
|
|
130
|
+
* </OrbitalThemeProvider>
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
interface OrbitalThemeProviderProps {
|
|
135
|
+
/** The `OrbitalDefinition.theme` value (inline definition or string ref). */
|
|
136
|
+
theme?: ThemeRef;
|
|
137
|
+
children: ReactNode;
|
|
138
|
+
}
|
|
139
|
+
declare function OrbitalThemeProvider({ theme, children }: OrbitalThemeProviderProps): ReactElement;
|
|
140
|
+
declare namespace OrbitalThemeProvider {
|
|
141
|
+
var displayName: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated Use ThemeProvider from ThemeContext instead
|
|
146
|
+
*/
|
|
147
|
+
declare const DesignThemeProvider: React.FC<ThemeProviderProps>;
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Use useTheme from ThemeContext instead
|
|
150
|
+
*
|
|
151
|
+
* This wrapper provides backward compatibility with the old API.
|
|
152
|
+
*/
|
|
153
|
+
declare function useDesignTheme(): {
|
|
154
|
+
designTheme: string;
|
|
155
|
+
setDesignTheme: (theme: string) => void;
|
|
156
|
+
availableThemes: string[];
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
declare const CurrentPagePathContext: React__default.Context<string | undefined>;
|
|
160
|
+
interface CurrentPagePathProviderProps {
|
|
161
|
+
value: string | undefined;
|
|
162
|
+
children: React__default.ReactNode;
|
|
163
|
+
}
|
|
164
|
+
declare const CurrentPagePathProvider: React__default.FC<CurrentPagePathProviderProps>;
|
|
165
|
+
declare const useCurrentPagePath: () => string | undefined;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* UserContext
|
|
169
|
+
*
|
|
170
|
+
* React context for providing user data throughout the application.
|
|
171
|
+
* Enables @user bindings in S-expressions for role-based UI and permissions.
|
|
172
|
+
*
|
|
173
|
+
* Usage:
|
|
174
|
+
* ```tsx
|
|
175
|
+
* // In App.tsx or layout
|
|
176
|
+
* <UserProvider user={{ id: '123', role: 'admin', permissions: ['read', 'write'] }}>
|
|
177
|
+
* <App />
|
|
178
|
+
* </UserProvider>
|
|
179
|
+
*
|
|
180
|
+
* // In components - access via hook
|
|
181
|
+
* const { user, hasRole, hasPermission } = useUser();
|
|
182
|
+
* if (hasRole('admin')) { ... }
|
|
183
|
+
* if (hasPermission('delete')) { ... }
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
186
|
+
* @packageDocumentation
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* User data for @user bindings.
|
|
191
|
+
* Matches UserContext type from evaluator/context.ts
|
|
192
|
+
*/
|
|
193
|
+
interface UserData {
|
|
194
|
+
/** User's unique ID */
|
|
195
|
+
id: string;
|
|
196
|
+
/** User's email */
|
|
197
|
+
email?: string;
|
|
198
|
+
/** User's display name */
|
|
199
|
+
name?: string;
|
|
200
|
+
/** User's role (for RBAC) */
|
|
201
|
+
role?: string;
|
|
202
|
+
/** User's permissions */
|
|
203
|
+
permissions?: string[];
|
|
204
|
+
/** Additional custom profile fields */
|
|
205
|
+
[key: string]: FieldValue | undefined;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* User context value.
|
|
209
|
+
*/
|
|
210
|
+
interface UserContextValue {
|
|
211
|
+
/** Current user data (null if not logged in) */
|
|
212
|
+
user: UserData | null;
|
|
213
|
+
/** Check if user is logged in */
|
|
214
|
+
isLoggedIn: boolean;
|
|
215
|
+
/** Check if user has a specific role */
|
|
216
|
+
hasRole: (role: string) => boolean;
|
|
217
|
+
/** Check if user has a specific permission */
|
|
218
|
+
hasPermission: (permission: string) => boolean;
|
|
219
|
+
/** Check if user has any of the specified roles */
|
|
220
|
+
hasAnyRole: (roles: string[]) => boolean;
|
|
221
|
+
/** Check if user has all of the specified permissions */
|
|
222
|
+
hasAllPermissions: (permissions: string[]) => boolean;
|
|
223
|
+
/** Get a user field by path (for @user.field bindings) */
|
|
224
|
+
getUserField: (path: string) => FieldValue | undefined;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Anonymous user for when no user is logged in.
|
|
228
|
+
*/
|
|
229
|
+
declare const ANONYMOUS_USER: UserData;
|
|
230
|
+
declare const UserContext: React__default.Context<UserContextValue | null>;
|
|
231
|
+
interface UserProviderProps {
|
|
232
|
+
/** User data (null if not logged in) */
|
|
233
|
+
user?: UserData | null;
|
|
234
|
+
/** Children to render */
|
|
235
|
+
children: React__default.ReactNode;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Provider component that provides user context to the application.
|
|
239
|
+
*
|
|
240
|
+
* Provides RBAC helpers and field access for @user bindings.
|
|
241
|
+
*/
|
|
242
|
+
declare function UserProvider({ user, children, }: UserProviderProps): React__default.ReactElement;
|
|
243
|
+
/**
|
|
244
|
+
* Hook to access the user context.
|
|
245
|
+
*
|
|
246
|
+
* Returns default values if used outside of UserProvider (for resilience).
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```tsx
|
|
250
|
+
* function AdminPanel() {
|
|
251
|
+
* const { user, hasRole, hasPermission } = useUser();
|
|
252
|
+
*
|
|
253
|
+
* if (!hasRole('admin') && !hasPermission('admin:access')) {
|
|
254
|
+
* return <AccessDenied />;
|
|
255
|
+
* }
|
|
256
|
+
*
|
|
257
|
+
* return <div>Welcome, {user?.name}</div>;
|
|
258
|
+
* }
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
declare function useUser(): UserContextValue;
|
|
262
|
+
/**
|
|
263
|
+
* Hook to check if user has a specific role.
|
|
264
|
+
* Convenience wrapper around useUser().hasRole().
|
|
265
|
+
*/
|
|
266
|
+
declare function useHasRole(role: string): boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Hook to check if user has a specific permission.
|
|
269
|
+
* Convenience wrapper around useUser().hasPermission().
|
|
270
|
+
*/
|
|
271
|
+
declare function useHasPermission(permission: string): boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Hook to get user data for @user bindings in S-expressions.
|
|
274
|
+
* Returns the user data object compatible with EvaluationContext.user
|
|
275
|
+
*/
|
|
276
|
+
declare function useUserForEvaluation(): UserData | undefined;
|
|
277
|
+
|
|
278
|
+
export { ANONYMOUS_USER as A, BUILT_IN_THEMES as B, type ColorMode as C, type DesignTheme as D, OrbitalThemeProvider as O, type ResolvedMode as R, ThemeContext as T, type UIThemeDefinition as U, CurrentPagePathContext as a, CurrentPagePathProvider as b, type CurrentPagePathProviderProps as c, DesignThemeProvider as d, type OrbitalThemeProviderProps as e, ThemeProvider as f, type ThemeProviderProps as g, UserContext as h, type UserContextValue as i, type UserData as j, UserProvider as k, type UserProviderProps as l, useDesignTheme as m, useHasPermission as n, useHasRole as o, useTheme as p, useUser as q, useUserForEvaluation as r, useCurrentPagePath as u };
|
package/dist/avl/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ var core = require('@almadar/core');
|
|
|
39
39
|
var core$1 = require('@dnd-kit/core');
|
|
40
40
|
var sortable = require('@dnd-kit/sortable');
|
|
41
41
|
var utilities = require('@dnd-kit/utilities');
|
|
42
|
-
var patterns = require('@almadar/patterns');
|
|
42
|
+
var patterns = require('@almadar/core/patterns');
|
|
43
43
|
var OrbitalServerRuntime = require('@almadar/runtime/OrbitalServerRuntime');
|
|
44
44
|
var runtime = require('@almadar/runtime');
|
|
45
45
|
|
|
@@ -11162,6 +11162,13 @@ function bindCanvasCapture(captureFn) {
|
|
|
11162
11162
|
window.__orbitalVerification.captureFrame = captureFn;
|
|
11163
11163
|
}
|
|
11164
11164
|
}
|
|
11165
|
+
function bindLastDrawables(getDrawables) {
|
|
11166
|
+
if (typeof window === "undefined") return;
|
|
11167
|
+
exposeOnWindow();
|
|
11168
|
+
if (window.__orbitalVerification) {
|
|
11169
|
+
window.__orbitalVerification.getLastDrawables = getDrawables;
|
|
11170
|
+
}
|
|
11171
|
+
}
|
|
11165
11172
|
function updateAssetStatus(url, status) {
|
|
11166
11173
|
if (typeof window === "undefined") return;
|
|
11167
11174
|
exposeOnWindow();
|
|
@@ -12567,8 +12574,12 @@ var init_MiniMap = __esm({
|
|
|
12567
12574
|
MiniMap.displayName = "MiniMap";
|
|
12568
12575
|
}
|
|
12569
12576
|
});
|
|
12570
|
-
function useCamera() {
|
|
12571
|
-
const cameraRef = React90.useRef({
|
|
12577
|
+
function useCamera(initial) {
|
|
12578
|
+
const cameraRef = React90.useRef({
|
|
12579
|
+
x: initial?.x ?? 0,
|
|
12580
|
+
y: initial?.y ?? 0,
|
|
12581
|
+
zoom: initial?.zoom ?? 1
|
|
12582
|
+
});
|
|
12572
12583
|
const targetCameraRef = React90.useRef(null);
|
|
12573
12584
|
const isDraggingRef = React90.useRef(false);
|
|
12574
12585
|
const dragDistanceRef = React90.useRef(0);
|
|
@@ -13006,8 +13017,9 @@ var init_DrawSprite = __esm({
|
|
|
13006
13017
|
if (!r2) return;
|
|
13007
13018
|
src = { x: r2.sx, y: r2.sy, w: r2.sw, h: r2.sh };
|
|
13008
13019
|
}
|
|
13009
|
-
const
|
|
13010
|
-
const
|
|
13020
|
+
const tw = dctx.projector.tileWidth;
|
|
13021
|
+
const w = node.width !== void 0 ? node.width * tw : src ? src.w : tex.width;
|
|
13022
|
+
const h = node.height !== void 0 ? node.height * tw : src ? src.h : tex.height;
|
|
13011
13023
|
const anchor = node.anchor ?? "top-left";
|
|
13012
13024
|
const p = dctx.projector.anchorPoint(node.position, anchor);
|
|
13013
13025
|
const dx = anchor === "top-left" ? p.x : p.x - w / 2;
|
|
@@ -13054,27 +13066,30 @@ var init_DrawShape = __esm({
|
|
|
13054
13066
|
}
|
|
13055
13067
|
case "rect": {
|
|
13056
13068
|
const p = dctx.projector.anchorPoint(node.position, node.anchor ?? "top-left");
|
|
13057
|
-
const
|
|
13058
|
-
const
|
|
13059
|
-
const
|
|
13060
|
-
const
|
|
13069
|
+
const tw = dctx.projector.tileWidth;
|
|
13070
|
+
const x = p.x + (node.offsetX ?? 0) * tw;
|
|
13071
|
+
const y = p.y + (node.offsetY ?? 0) * tw;
|
|
13072
|
+
const w = (node.width ?? 0) * tw;
|
|
13073
|
+
const h = (node.height ?? 0) * tw;
|
|
13061
13074
|
if (node.fill) painter.fillRect(x, y, w, h, node.fill);
|
|
13062
13075
|
if (node.stroke) painter.strokeRect(x, y, w, h, node.stroke, node.strokeWidth ?? 1);
|
|
13063
13076
|
break;
|
|
13064
13077
|
}
|
|
13065
13078
|
case "ellipse": {
|
|
13066
13079
|
const p = dctx.projector.anchorPoint(node.position, node.anchor ?? "ground");
|
|
13067
|
-
const
|
|
13068
|
-
const
|
|
13069
|
-
const
|
|
13070
|
-
const
|
|
13080
|
+
const tw = dctx.projector.tileWidth;
|
|
13081
|
+
const cx = p.x + (node.offsetX ?? 0) * tw;
|
|
13082
|
+
const cy = p.y + (node.offsetY ?? 0) * tw;
|
|
13083
|
+
const rx = (node.radiusX ?? 0) * tw;
|
|
13084
|
+
const ry = (node.radiusY ?? rx) * tw;
|
|
13071
13085
|
if (node.fill) painter.fillEllipse(cx, cy, rx, ry, node.fill);
|
|
13072
13086
|
if (node.stroke) painter.strokeEllipse(cx, cy, rx, ry, node.stroke, node.strokeWidth ?? 1);
|
|
13073
13087
|
break;
|
|
13074
13088
|
}
|
|
13075
13089
|
case "poly": {
|
|
13076
13090
|
const base = dctx.projector.project(node.position);
|
|
13077
|
-
const
|
|
13091
|
+
const tw = dctx.projector.tileWidth;
|
|
13092
|
+
const pts = (node.points ?? []).map((pt) => ({ x: base.x + pt.x * tw, y: base.y + pt.y * tw }));
|
|
13078
13093
|
if (node.fill) painter.fillPoly(pts, node.fill);
|
|
13079
13094
|
if (node.stroke) painter.strokePoly(pts, node.stroke, node.strokeWidth ?? 1, true);
|
|
13080
13095
|
break;
|
|
@@ -13240,9 +13255,17 @@ function Canvas2D({
|
|
|
13240
13255
|
scale = 0.4,
|
|
13241
13256
|
showMinimap = true,
|
|
13242
13257
|
followTarget,
|
|
13258
|
+
cameraPos,
|
|
13243
13259
|
bgColor
|
|
13244
13260
|
}) {
|
|
13261
|
+
const layerSummaries = drawables?.map((d) => {
|
|
13262
|
+
if (!d || typeof d !== "object") return d;
|
|
13263
|
+
const rec = d;
|
|
13264
|
+
return { type: rec.type, itemsLen: Array.isArray(rec.items) ? rec.items.length : void 0, firstItem: Array.isArray(rec.items) ? rec.items[0] : void 0 };
|
|
13265
|
+
});
|
|
13266
|
+
console.error("[debug:Canvas2D] " + JSON.stringify({ projection, scale, cameraMode: camera, cameraPos, drawablesCount: drawables?.length, layerSummaries }));
|
|
13245
13267
|
const backgroundImage = normalizeBackdrop(backgroundImageRaw);
|
|
13268
|
+
const instanceId = React90.useMemo(() => Math.random().toString(36).slice(2, 8), []);
|
|
13246
13269
|
const isFree = projection === "free";
|
|
13247
13270
|
const squareGrid = projection === "flat" || isFree || projection === "side";
|
|
13248
13271
|
const layout = projection === "side" ? "free" : projection;
|
|
@@ -13305,10 +13328,12 @@ function Canvas2D({
|
|
|
13305
13328
|
const canvas = canvasRef.current;
|
|
13306
13329
|
if (!canvas) return;
|
|
13307
13330
|
bindCanvasCapture(() => canvas.toDataURL("image/png"));
|
|
13331
|
+
bindLastDrawables(() => drawables ?? null);
|
|
13308
13332
|
return () => {
|
|
13309
13333
|
bindCanvasCapture(() => null);
|
|
13334
|
+
bindLastDrawables(() => null);
|
|
13310
13335
|
};
|
|
13311
|
-
}, []);
|
|
13336
|
+
}, [drawables]);
|
|
13312
13337
|
const enableCamera = camera === "pan-zoom";
|
|
13313
13338
|
const {
|
|
13314
13339
|
cameraRef,
|
|
@@ -13322,8 +13347,8 @@ function Canvas2D({
|
|
|
13322
13347
|
zoomAtPoint,
|
|
13323
13348
|
screenToWorld,
|
|
13324
13349
|
lerpToTarget
|
|
13325
|
-
} = useCamera();
|
|
13326
|
-
const [, setAtlasVersion] = React90.useState(0);
|
|
13350
|
+
} = useCamera({ zoom: scale });
|
|
13351
|
+
const [atlasVersion, setAtlasVersion] = React90.useState(0);
|
|
13327
13352
|
const bumpAtlas = React90.useCallback(() => setAtlasVersion((v) => v + 1), []);
|
|
13328
13353
|
const miniMapTiles = React90.useMemo(() => {
|
|
13329
13354
|
if (!showMinimap) return [];
|
|
@@ -13368,6 +13393,14 @@ function Canvas2D({
|
|
|
13368
13393
|
}
|
|
13369
13394
|
if (!drawables || drawables.length === 0) return;
|
|
13370
13395
|
const cam = cameraRef.current;
|
|
13396
|
+
if (cameraPos && dragDistance() === 0) {
|
|
13397
|
+
const p = projector.anchorPoint(cameraPos, "center");
|
|
13398
|
+
cam.x = p.x - viewportSize.width / 2;
|
|
13399
|
+
cam.y = p.y - viewportSize.height / 2;
|
|
13400
|
+
}
|
|
13401
|
+
const containerRect = containerRef.current?.getBoundingClientRect();
|
|
13402
|
+
const canvasRect = canvas.getBoundingClientRect();
|
|
13403
|
+
console.error("[debug:Canvas2D:draw:" + instanceId + "] " + JSON.stringify({ viewportSize, baseOffsetX, cam: { x: cam.x, y: cam.y, zoom: cam.zoom }, cameraPos, containerRect: containerRect ? { width: containerRect.width, height: containerRect.height } : null, canvasRect: canvasRect ? { width: canvasRect.width, height: canvasRect.height } : null }));
|
|
13371
13404
|
const painter = createWebPainter(ctx, bumpAtlas);
|
|
13372
13405
|
painter.save();
|
|
13373
13406
|
painter.translate(viewportSize.width / 2, viewportSize.height / 2);
|
|
@@ -13391,6 +13424,9 @@ function Canvas2D({
|
|
|
13391
13424
|
React90.useEffect(() => {
|
|
13392
13425
|
draw();
|
|
13393
13426
|
}, [_imagePendingCount, draw]);
|
|
13427
|
+
React90.useEffect(() => {
|
|
13428
|
+
draw();
|
|
13429
|
+
}, [atlasVersion, draw]);
|
|
13394
13430
|
React90.useEffect(() => {
|
|
13395
13431
|
if (camera !== "follow" || !followTarget) return;
|
|
13396
13432
|
let running = true;
|
|
@@ -13635,6 +13671,7 @@ function Canvas({
|
|
|
13635
13671
|
keyMap,
|
|
13636
13672
|
keyUpMap
|
|
13637
13673
|
}) {
|
|
13674
|
+
console.error("[debug:Canvas] " + JSON.stringify({ mode, drawablesCount: drawables?.length, projection, camera }));
|
|
13638
13675
|
const zoom = camera?.zoom;
|
|
13639
13676
|
if (mode === "3d") {
|
|
13640
13677
|
const props3d = {
|
|
@@ -13674,6 +13711,7 @@ function Canvas({
|
|
|
13674
13711
|
camera: to2DCamera(camera?.mode),
|
|
13675
13712
|
...zoom !== void 0 ? { scale: zoom } : {},
|
|
13676
13713
|
...camera?.target !== void 0 ? { followTarget: camera.target } : {},
|
|
13714
|
+
...camera?.pos !== void 0 ? { cameraPos: camera.pos } : {},
|
|
13677
13715
|
showMinimap,
|
|
13678
13716
|
backgroundImage,
|
|
13679
13717
|
...backgroundColor !== void 0 ? { bgColor: backgroundColor } : {},
|
|
@@ -46185,7 +46223,7 @@ function SlotContentRenderer({
|
|
|
46185
46223
|
const childrenConfig = content.props.children;
|
|
46186
46224
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
46187
46225
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
46188
|
-
const isDrawHost = patterns.
|
|
46226
|
+
const isDrawHost = patterns.isDrawHostPattern(content.pattern);
|
|
46189
46227
|
const myPath = patternPath ?? "root";
|
|
46190
46228
|
const renderedChildren = hasChildren && !isDrawHost ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
46191
46229
|
slot: content.slot,
|
|
@@ -50208,6 +50246,14 @@ function effectsCallOp(effects, ops) {
|
|
|
50208
50246
|
}
|
|
50209
50247
|
return false;
|
|
50210
50248
|
}
|
|
50249
|
+
function classifySharedTick(tick) {
|
|
50250
|
+
const writes = effectsCallOp(tick.effects, SHARED_ENTITY_WRITE_OPS);
|
|
50251
|
+
const renders = effectsCallOp(tick.effects, SHARED_ENTITY_RENDER_OPS);
|
|
50252
|
+
if (writes && renders) return "both";
|
|
50253
|
+
if (writes) return "writer";
|
|
50254
|
+
if (renders) return "renderer";
|
|
50255
|
+
return "neither";
|
|
50256
|
+
}
|
|
50211
50257
|
function createSharedEntityWriter(binding, tick, traitStatesRef, emit) {
|
|
50212
50258
|
return (scratch) => {
|
|
50213
50259
|
const traitName = binding.trait.name;
|
|
@@ -50217,7 +50263,7 @@ function createSharedEntityWriter(binding, tick, traitStatesRef, emit) {
|
|
|
50217
50263
|
const writes = [];
|
|
50218
50264
|
const ctx = evaluator.createMinimalContext(scratchEntity, {}, currentState);
|
|
50219
50265
|
const declaredDefaults = runtime.collectDeclaredConfigDefaults(binding.trait);
|
|
50220
|
-
const callSiteConfig = binding
|
|
50266
|
+
const callSiteConfig = getBindingConfig(binding);
|
|
50221
50267
|
if (declaredDefaults || callSiteConfig) {
|
|
50222
50268
|
ctx.config = { ...declaredDefaults ?? {}, ...callSiteConfig ?? {} };
|
|
50223
50269
|
}
|
|
@@ -50239,7 +50285,25 @@ function createSharedEntityWriter(binding, tick, traitStatesRef, emit) {
|
|
|
50239
50285
|
return writes;
|
|
50240
50286
|
};
|
|
50241
50287
|
}
|
|
50288
|
+
function getBindingConfig(binding) {
|
|
50289
|
+
const raw = binding.config;
|
|
50290
|
+
const normalized = runtime.normalizeCallSiteConfigToValues(raw);
|
|
50291
|
+
console.log("[debug:getBindingConfig]", binding.trait.name, "raw keys=", raw ? Object.keys(raw) : "undefined", "has tiles=", raw ? "tiles" in raw : false);
|
|
50292
|
+
return normalized;
|
|
50293
|
+
}
|
|
50294
|
+
function evalFieldDefault(value) {
|
|
50295
|
+
if (!Array.isArray(value) || value.length === 0) return value;
|
|
50296
|
+
const head = value[0];
|
|
50297
|
+
const isSExpr = typeof head === "string" && (head.includes("/") || head === "let" || head === "if" || head === "lambda");
|
|
50298
|
+
if (!isSExpr) return value;
|
|
50299
|
+
try {
|
|
50300
|
+
return evaluator.evaluate(value, evaluator.createMinimalContext({}, {}, ""));
|
|
50301
|
+
} catch {
|
|
50302
|
+
return value;
|
|
50303
|
+
}
|
|
50304
|
+
}
|
|
50242
50305
|
function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
50306
|
+
console.log("[debug:useTraitStateMachine] start, traitBindings count=", traitBindings.length, "names=", traitBindings.map((b) => b.trait.name).join(","));
|
|
50243
50307
|
const eventBus = useEventBus();
|
|
50244
50308
|
const { entities } = providers.useEntitySchema();
|
|
50245
50309
|
const traitConfigsByName = options?.traitConfigsByName;
|
|
@@ -50259,7 +50323,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50259
50323
|
let defaults;
|
|
50260
50324
|
for (const field of entityDef.fields) {
|
|
50261
50325
|
if (field.default !== void 0) {
|
|
50262
|
-
|
|
50326
|
+
const evaluated = evalFieldDefault(field.default);
|
|
50327
|
+
if (field.name === "tiles") {
|
|
50328
|
+
console.log(`[debug:seed] ${linkedEntityName}.tiles seed type=`, typeof evaluated, Array.isArray(evaluated) ? "len=" + evaluated?.length : "", "head=", Array.isArray(evaluated) && evaluated.length > 0 ? JSON.stringify(evaluated[0]).slice(0, 80) : "n/a");
|
|
50329
|
+
}
|
|
50330
|
+
(defaults ?? (defaults = {}))[field.name] = evaluated;
|
|
50263
50331
|
}
|
|
50264
50332
|
}
|
|
50265
50333
|
group = { storeKey, entityName: linkedEntityName, writerBindings: [], renderBindings: [], defaults };
|
|
@@ -50272,7 +50340,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50272
50340
|
return groups;
|
|
50273
50341
|
}, [traitBindings, entities, orbitalsByTrait]);
|
|
50274
50342
|
for (const group of sharedGroups.values()) {
|
|
50275
|
-
if (group.defaults)
|
|
50343
|
+
if (group.defaults) {
|
|
50344
|
+
sharedEntityStore.seed(group.storeKey, group.defaults);
|
|
50345
|
+
console.log("[debug:shared-seed]", group.storeKey, "writers=", group.writerBindings.map((b) => b.trait.name).join(","), "renderers=", group.renderBindings.map((b) => b.trait.name).join(","), "defaults.tiles=", Array.isArray(group.defaults.tiles) ? group.defaults.tiles.length : group.defaults.tiles);
|
|
50346
|
+
}
|
|
50276
50347
|
}
|
|
50277
50348
|
const sharedKeyByTraitNameRef = React90.useRef(/* @__PURE__ */ new Map());
|
|
50278
50349
|
React90.useEffect(() => {
|
|
@@ -50282,12 +50353,13 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50282
50353
|
for (const binding of group.renderBindings) map.set(binding.trait.name, group.storeKey);
|
|
50283
50354
|
}
|
|
50284
50355
|
sharedKeyByTraitNameRef.current = map;
|
|
50356
|
+
console.log("[debug:shared-map]", Array.from(map.entries()).map(([k, v]) => `${k}->${v}`).join(","));
|
|
50285
50357
|
}, [sharedGroups]);
|
|
50286
50358
|
const manager = React90.useMemo(() => {
|
|
50287
50359
|
const traitDefs = traitBindings.map(toTraitDefinition);
|
|
50288
50360
|
const m = new runtime.StateMachineManager(traitDefs);
|
|
50289
50361
|
for (const binding of traitBindings) {
|
|
50290
|
-
const cfg = binding
|
|
50362
|
+
const cfg = getBindingConfig(binding) ?? traitConfigsByName?.[binding.trait.name];
|
|
50291
50363
|
if (cfg !== void 0) {
|
|
50292
50364
|
m.setTraitConfig(binding.trait.name, cfg);
|
|
50293
50365
|
}
|
|
@@ -50470,6 +50542,9 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50470
50542
|
const linkedEntity = binding.linkedEntity || "";
|
|
50471
50543
|
const entityId = payload?.entityId;
|
|
50472
50544
|
const sharedKey = sharedKeyByTraitNameRef.current.get(traitName);
|
|
50545
|
+
if (traitName === "Hero" || traitName === "Authority") {
|
|
50546
|
+
console.log(`[debug:executeTransitionEffects] ${traitName} sharedKey=`, sharedKey, "store tiles=", sharedKey ? sharedEntityStore.getSnapshot(sharedKey).tiles?.length : "n/a");
|
|
50547
|
+
}
|
|
50473
50548
|
let liveEntity;
|
|
50474
50549
|
if (sharedKey !== void 0) {
|
|
50475
50550
|
liveEntity = { ...sharedEntityStore.getSnapshot(sharedKey) };
|
|
@@ -50493,6 +50568,13 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50493
50568
|
eventBus,
|
|
50494
50569
|
slotSetter: {
|
|
50495
50570
|
addPattern: (slot, pattern, props) => {
|
|
50571
|
+
if (traitName === "Hero" && slot === "main" && props && typeof props === "object") {
|
|
50572
|
+
const canvasChild = Array.isArray(props.children) ? props.children[0] : null;
|
|
50573
|
+
const grandChildren = canvasChild && typeof canvasChild === "object" ? canvasChild.children : null;
|
|
50574
|
+
const firstLayer = Array.isArray(grandChildren) && grandChildren.length > 0 ? grandChildren[0] : null;
|
|
50575
|
+
const firstLayerItems = firstLayer && typeof firstLayer === "object" ? firstLayer.items : null;
|
|
50576
|
+
console.log(`[debug:render-ui] ${traitName} slot=${slot} canvasChild=`, canvasChild ? canvasChild.type : "none", "firstLayerItems=", Array.isArray(firstLayerItems) ? firstLayerItems.length : firstLayerItems);
|
|
50577
|
+
}
|
|
50496
50578
|
const existing = pendingSlots.get(slot) || [];
|
|
50497
50579
|
existing.push({ pattern, props: props || {} });
|
|
50498
50580
|
pendingSlots.set(slot, existing);
|
|
@@ -50524,7 +50606,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50524
50606
|
state: previousState
|
|
50525
50607
|
};
|
|
50526
50608
|
const sharedDeclared = runtime.collectDeclaredConfigDefaults(binding.trait);
|
|
50527
|
-
const sharedCallSite = binding
|
|
50609
|
+
const sharedCallSite = getBindingConfig(binding);
|
|
50528
50610
|
if (sharedDeclared || sharedCallSite) {
|
|
50529
50611
|
sharedBindings.config = {
|
|
50530
50612
|
...sharedDeclared ?? {},
|
|
@@ -50575,13 +50657,16 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50575
50657
|
state: previousState
|
|
50576
50658
|
};
|
|
50577
50659
|
const declaredDefaults = runtime.collectDeclaredConfigDefaults(binding.trait);
|
|
50578
|
-
const callSiteConfig = binding
|
|
50660
|
+
const callSiteConfig = getBindingConfig(binding);
|
|
50579
50661
|
if (declaredDefaults || callSiteConfig) {
|
|
50580
50662
|
bindingCtx.config = {
|
|
50581
50663
|
...declaredDefaults ?? {},
|
|
50582
50664
|
...callSiteConfig ?? {}
|
|
50583
50665
|
};
|
|
50584
50666
|
}
|
|
50667
|
+
if (traitName === "Authority" || traitName === "Hero") {
|
|
50668
|
+
console.log(`[debug:executeTransitionEffects] ${traitName} config tiles type=`, typeof bindingCtx.config?.tiles, Array.isArray(bindingCtx.config?.tiles) ? "len=" + bindingCtx.config?.tiles?.length : "", "keys=", bindingCtx.config ? Object.keys(bindingCtx.config) : "none");
|
|
50669
|
+
}
|
|
50585
50670
|
const effectContext = {
|
|
50586
50671
|
traitName,
|
|
50587
50672
|
state: previousState,
|
|
@@ -50598,9 +50683,15 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50598
50683
|
baseEmit(event, eventPayload, source);
|
|
50599
50684
|
}
|
|
50600
50685
|
};
|
|
50686
|
+
if (traitName === "Hero") {
|
|
50687
|
+
console.log(`[debug:executeTransitionEffects] ${traitName} effects count=${effects.length} hasRenderUI=${typeof handlers.renderUI === "function"} effect heads=${effects.map((e) => Array.isArray(e) ? String(e[0]) : "??").join(",")}`);
|
|
50688
|
+
}
|
|
50601
50689
|
const executor = new runtime.EffectExecutor({ handlers: trackingHandlers, bindings: bindingCtx, context: effectContext });
|
|
50602
50690
|
try {
|
|
50603
50691
|
await executor.executeAll(effects);
|
|
50692
|
+
if (traitName === "Authority" || traitName === "Hero") {
|
|
50693
|
+
console.log(`[debug:executeTransitionEffects] ${traitName} after executeAll liveEntity.tiles type=`, typeof liveEntity.tiles, Array.isArray(liveEntity.tiles) ? "len=" + liveEntity.tiles?.length : "", "firstTilePos=", Array.isArray(liveEntity.tiles) && liveEntity.tiles.length > 0 ? JSON.stringify(liveEntity.tiles[0]).slice(0, 120) : "n/a");
|
|
50694
|
+
}
|
|
50604
50695
|
if (sharedKey !== void 0) {
|
|
50605
50696
|
sharedEntityStore.commit(sharedKey, liveEntity);
|
|
50606
50697
|
}
|
|
@@ -50651,8 +50742,9 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50651
50742
|
payload: {},
|
|
50652
50743
|
state: currentState
|
|
50653
50744
|
};
|
|
50654
|
-
|
|
50655
|
-
|
|
50745
|
+
const bindingCfg = getBindingConfig(binding);
|
|
50746
|
+
if (bindingCfg) {
|
|
50747
|
+
guardCtx.config = bindingCfg;
|
|
50656
50748
|
}
|
|
50657
50749
|
const passed = evaluator.evaluateGuard(
|
|
50658
50750
|
tick.guard,
|
|
@@ -50679,12 +50771,14 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50679
50771
|
}, [eventBus]);
|
|
50680
50772
|
React90.useEffect(() => {
|
|
50681
50773
|
const scheduler = runtime.createTickScheduler();
|
|
50682
|
-
const
|
|
50774
|
+
const pureWriterTickKeys = /* @__PURE__ */ new Set();
|
|
50683
50775
|
for (const group of sharedGroups.values()) {
|
|
50684
50776
|
const ticksByInterval = /* @__PURE__ */ new Map();
|
|
50685
50777
|
for (const binding of group.writerBindings) {
|
|
50686
|
-
writerTraitNames.add(binding.trait.name);
|
|
50687
50778
|
for (const tick of binding.trait.ticks ?? []) {
|
|
50779
|
+
const classification = classifySharedTick(tick);
|
|
50780
|
+
if (classification !== "writer") continue;
|
|
50781
|
+
pureWriterTickKeys.add(`${binding.trait.name}::${tick.name}`);
|
|
50688
50782
|
const intervalKey = String(tick.interval);
|
|
50689
50783
|
const entries = ticksByInterval.get(intervalKey) ?? [];
|
|
50690
50784
|
entries.push({ binding, tick });
|
|
@@ -50711,8 +50805,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
50711
50805
|
}
|
|
50712
50806
|
}
|
|
50713
50807
|
for (const binding of traitBindings) {
|
|
50714
|
-
if (writerTraitNames.has(binding.trait.name)) continue;
|
|
50715
50808
|
for (const tick of binding.trait.ticks ?? []) {
|
|
50809
|
+
const sharedKey = sharedKeyByTraitNameRef.current.get(binding.trait.name);
|
|
50810
|
+
if (sharedKey !== void 0 && pureWriterTickKeys.has(`${binding.trait.name}::${tick.name}`)) {
|
|
50811
|
+
continue;
|
|
50812
|
+
}
|
|
50716
50813
|
if (tick.interval === "frame") {
|
|
50717
50814
|
scheduler.add(0, () => runTickEffects(tick, binding));
|
|
50718
50815
|
} else if (typeof tick.interval === "number") {
|