@almadar/ui 5.111.0 → 5.113.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 +137 -18
- package/dist/avl/index.js +139 -20
- package/dist/avl-schema-parser-B8Onmfsu.d.cts +393 -0
- package/dist/avl-schema-parser-B8Onmfsu.d.ts +393 -0
- package/dist/cn-BkQrMR01.d.cts +295 -0
- package/dist/cn-CTEFm9PC.d.ts +295 -0
- package/dist/components/index.cjs +33 -6
- package/dist/components/index.d.cts +11225 -0
- package/dist/components/index.d.ts +11225 -6
- package/dist/components/index.js +33 -6
- 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 +11 -24
- package/dist/lib/drawable/three/index.d.cts +1485 -0
- package/dist/lib/drawable/three/index.d.ts +1484 -38
- package/dist/lib/drawable/three/index.js +11 -24
- package/dist/lib/index.d.cts +505 -0
- package/dist/lib/index.d.ts +504 -18
- 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/paintDispatch-DR942knx.d.cts +221 -0
- package/dist/paintDispatch-DR942knx.d.ts +221 -0
- package/dist/providers/index.cjs +33 -6
- package/dist/providers/index.d.cts +428 -0
- package/dist/providers/index.d.ts +427 -26
- package/dist/providers/index.js +33 -6
- 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 +137 -18
- package/dist/runtime/index.d.cts +426 -0
- package/dist/runtime/index.d.ts +421 -16
- package/dist/runtime/index.js +139 -20
- 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 +11 -11
- 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 -97
- 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
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Camera3D
|
|
3
|
-
*
|
|
4
|
-
* Three.js camera component with orbit controls.
|
|
5
|
-
* Supports isometric, perspective, and top-down camera modes.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import * as THREE from 'three';
|
|
11
|
-
export type CameraMode = 'isometric' | 'perspective' | 'top-down';
|
|
12
|
-
export interface Camera3DProps {
|
|
13
|
-
/** Camera mode */
|
|
14
|
-
mode?: CameraMode;
|
|
15
|
-
/** Initial camera position */
|
|
16
|
-
position?: [number, number, number];
|
|
17
|
-
/** Target to look at */
|
|
18
|
-
target?: [number, number, number];
|
|
19
|
-
/** Zoom level */
|
|
20
|
-
zoom?: number;
|
|
21
|
-
/** Field of view (perspective mode only) */
|
|
22
|
-
fov?: number;
|
|
23
|
-
/** Enable orbit controls */
|
|
24
|
-
enableOrbit?: boolean;
|
|
25
|
-
/** Minimum zoom distance */
|
|
26
|
-
minDistance?: number;
|
|
27
|
-
/** Maximum zoom distance */
|
|
28
|
-
maxDistance?: number;
|
|
29
|
-
/** Called when camera changes */
|
|
30
|
-
onChange?: (camera: THREE.Camera) => void;
|
|
31
|
-
}
|
|
32
|
-
export interface Camera3DHandle {
|
|
33
|
-
/** Get current camera */
|
|
34
|
-
getCamera: () => THREE.Camera;
|
|
35
|
-
/** Set camera position */
|
|
36
|
-
setPosition: (x: number, y: number, z: number) => void;
|
|
37
|
-
/** Look at target */
|
|
38
|
-
lookAt: (x: number, y: number, z: number) => void;
|
|
39
|
-
/** Reset to initial position */
|
|
40
|
-
reset: () => void;
|
|
41
|
-
/** Get current view bounds */
|
|
42
|
-
getViewBounds: () => {
|
|
43
|
-
min: THREE.Vector3;
|
|
44
|
-
max: THREE.Vector3;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Camera3D Component
|
|
49
|
-
*
|
|
50
|
-
* Configurable camera with orbit controls and multiple modes.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```tsx
|
|
54
|
-
* <Canvas>
|
|
55
|
-
* <Camera3D mode="isometric" position={[10, 10, 10]} target={[0, 0, 0]} />
|
|
56
|
-
* </Canvas>
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
export declare const Camera3D: React.ForwardRefExoticComponent<Camera3DProps & React.RefAttributes<Camera3DHandle>>;
|
|
60
|
-
export default Camera3D;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas3DErrorBoundary
|
|
3
|
-
*
|
|
4
|
-
* Error boundary for 3D canvas components.
|
|
5
|
-
* Catches Three.js and React Three Fiber errors gracefully.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import { Component, type ReactNode, type ErrorInfo } from 'react';
|
|
10
|
-
import './Canvas3DErrorBoundary.css';
|
|
11
|
-
export interface Canvas3DErrorBoundaryProps {
|
|
12
|
-
/** Child components */
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
/** Custom fallback component */
|
|
15
|
-
fallback?: ReactNode;
|
|
16
|
-
/** Error callback */
|
|
17
|
-
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
18
|
-
/** Reset callback */
|
|
19
|
-
onReset?: () => void;
|
|
20
|
-
}
|
|
21
|
-
export interface Canvas3DErrorBoundaryState {
|
|
22
|
-
/** Whether an error has occurred */
|
|
23
|
-
hasError: boolean;
|
|
24
|
-
/** The error that occurred */
|
|
25
|
-
error: Error | null;
|
|
26
|
-
/** Error info from React */
|
|
27
|
-
errorInfo: ErrorInfo | null;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Canvas3DErrorBoundary Component
|
|
31
|
-
*
|
|
32
|
-
* Catches errors in 3D canvas and displays a user-friendly fallback.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```tsx
|
|
36
|
-
* <Canvas3DErrorBoundary
|
|
37
|
-
* onError={(error) => console.error('3D Error:', error)}
|
|
38
|
-
* onReset={() => console.log('Resetting...')}
|
|
39
|
-
* >
|
|
40
|
-
* <GameCanvas3D {...props} />
|
|
41
|
-
* </Canvas3DErrorBoundary>
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare class Canvas3DErrorBoundary extends Component<Canvas3DErrorBoundaryProps, Canvas3DErrorBoundaryState> {
|
|
45
|
-
constructor(props: Canvas3DErrorBoundaryProps);
|
|
46
|
-
static getDerivedStateFromError(error: Error): Canvas3DErrorBoundaryState;
|
|
47
|
-
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
48
|
-
handleReset: () => void;
|
|
49
|
-
render(): ReactNode;
|
|
50
|
-
}
|
|
51
|
-
export default Canvas3DErrorBoundary;
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas3DHost — the thin 3D draw-host: the `canvas` host's 3D painter backend
|
|
3
|
-
* (the R3F "vessel" behind the neutral drawables), the exact 3D analogue of the
|
|
4
|
-
* 2D `Painter2D` seam. Reached only via the lazy `@almadar/ui/.../game/three`
|
|
5
|
-
* subpath so three.js never enters a 2D bundle.
|
|
6
|
-
*
|
|
7
|
-
* The 3D twin of Canvas2D: the board authors a `drawables` list (the neutral
|
|
8
|
-
* `draw-*` children) and this host maps each descriptor through `Drawable3D` to a
|
|
9
|
-
* three.js mesh (a raw descriptor NEVER reaches `<group>{children}` — R3F throws).
|
|
10
|
-
* It owns NO game data — tiles, units, features, selection, health bars and labels
|
|
11
|
-
* are all `draw-*` children composed in `.lolo`, not props here. Only view state
|
|
12
|
-
* (camera, error boundary) is local.
|
|
13
|
-
*
|
|
14
|
-
* Camera: `isometric`/`perspective`/`top-down` frame the scene bounds (derived from
|
|
15
|
-
* the drawn descriptors); `follow`/`chase` track the neutral core `Camera.target`
|
|
16
|
-
* (forwarded as `followTarget`), falling back to the scene centre.
|
|
17
|
-
*
|
|
18
|
-
* Interaction: keyboard maps to semantic events (device-agnostic input). Pointer
|
|
19
|
-
* click/hover on neutral drawables needs a per-entity id + a scene-space raycast
|
|
20
|
-
* the descriptors don't yet carry — that hit-test is a tracked fork
|
|
21
|
-
* (docs/Almadar_Std_Game_V2_PLAN.md); the click/hover event props are accepted but
|
|
22
|
-
* not yet emitted from a raycast.
|
|
23
|
-
*
|
|
24
|
-
* @packageDocumentation
|
|
25
|
-
*/
|
|
26
|
-
import React from 'react';
|
|
27
|
-
import type { EventEmit, Asset, ScenePos } from '@almadar/core';
|
|
28
|
-
import * as THREE from 'three';
|
|
29
|
-
import type { DrawableNode } from '../paintDispatch';
|
|
30
|
-
import type { IsometricTile, IsometricUnit, IsometricFeature } from '../../isometricTypes';
|
|
31
|
-
import './Canvas3DHost.css';
|
|
32
|
-
export type { IsometricTile, IsometricUnit, IsometricFeature };
|
|
33
|
-
/** Camera mode for 3D view.
|
|
34
|
-
* - `follow` tracks `followTarget` (the neutral `Camera.target`) from a fixed offset.
|
|
35
|
-
* - `chase` sits behind + above the target. */
|
|
36
|
-
export type CameraMode = 'isometric' | 'perspective' | 'top-down' | 'follow' | 'chase';
|
|
37
|
-
/** Per-role model manifest (retained type export; the thin host no longer resolves
|
|
38
|
-
* models from a manifest — a `draw-sprite` carries its own `Asset`). */
|
|
39
|
-
export interface GameCanvas3DAssetManifest {
|
|
40
|
-
terrains?: Record<string, Asset>;
|
|
41
|
-
units?: Record<string, Asset>;
|
|
42
|
-
features?: Record<string, Asset>;
|
|
43
|
-
effects?: Record<string, Asset>;
|
|
44
|
-
}
|
|
45
|
-
/** Map orientation */
|
|
46
|
-
export type MapOrientation = 'standard' | 'rotated';
|
|
47
|
-
/** Overlay control */
|
|
48
|
-
export type OverlayControl = 'default' | 'hidden' | 'minimap';
|
|
49
|
-
/** Props for GameCanvas3D component */
|
|
50
|
-
export interface Canvas3DHostProps {
|
|
51
|
-
/** Additional CSS classes */
|
|
52
|
-
className?: string;
|
|
53
|
-
/** Children to render inside the 3D canvas (e.g., physics objects, custom meshes) */
|
|
54
|
-
children?: React.ReactNode;
|
|
55
|
-
/** Neutral drawable descriptors — the same `children` vocabulary as Canvas2D. The
|
|
56
|
-
* host maps each through `Drawable3D` to a mesh. */
|
|
57
|
-
drawables?: DrawableNode[];
|
|
58
|
-
/** Loading state indicator */
|
|
59
|
-
isLoading?: boolean;
|
|
60
|
-
/** Error state */
|
|
61
|
-
error?: string | null;
|
|
62
|
-
/** Fog of war data (accepted for API parity; presentation-only). */
|
|
63
|
-
fogOfWar?: boolean[][];
|
|
64
|
-
/** Map orientation (data attribute). */
|
|
65
|
-
orientation?: MapOrientation;
|
|
66
|
-
/** Camera mode */
|
|
67
|
-
cameraMode?: CameraMode;
|
|
68
|
-
/** Follow-camera target in scene space (the neutral core `Camera.target`). */
|
|
69
|
-
followTarget?: ScenePos;
|
|
70
|
-
/** Show grid */
|
|
71
|
-
showGrid?: boolean;
|
|
72
|
-
/** Show coordinates overlay (accepted for API parity). */
|
|
73
|
-
showCoordinates?: boolean;
|
|
74
|
-
/** Show tile information (accepted for API parity). */
|
|
75
|
-
showTileInfo?: boolean;
|
|
76
|
-
/** Overlay control mode (data attribute). */
|
|
77
|
-
overlay?: OverlayControl;
|
|
78
|
-
/** Enable shadows */
|
|
79
|
-
shadows?: boolean;
|
|
80
|
-
/** Background color */
|
|
81
|
-
backgroundColor?: string;
|
|
82
|
-
/** Declarative event: tile click. Emitted from a ground-plane raycast → scene cell
|
|
83
|
-
* `{ x, z }` (the FSM validates the cell). `tileId` is optional — the neutral host
|
|
84
|
-
* has no per-tile id, and the board FSMs key off the coordinate. */
|
|
85
|
-
tileClickEvent?: EventEmit<{
|
|
86
|
-
x: number;
|
|
87
|
-
z: number;
|
|
88
|
-
tileId?: string;
|
|
89
|
-
type?: string;
|
|
90
|
-
terrain?: string;
|
|
91
|
-
elevation?: number;
|
|
92
|
-
}>;
|
|
93
|
-
/** Declarative event: unit click. Emitted `{ unitId, x, z }` when the raycast lands on a
|
|
94
|
-
* cell whose descriptor carries an `id` (a tagged unit sprite). */
|
|
95
|
-
unitClickEvent?: EventEmit<{
|
|
96
|
-
unitId: string;
|
|
97
|
-
x: number;
|
|
98
|
-
z: number;
|
|
99
|
-
unitType?: string;
|
|
100
|
-
name?: string;
|
|
101
|
-
team?: string;
|
|
102
|
-
faction?: string;
|
|
103
|
-
health?: number;
|
|
104
|
-
maxHealth?: number;
|
|
105
|
-
}>;
|
|
106
|
-
/** Declarative event: feature click. Accepted; not yet emitted (see `tileClickEvent`). */
|
|
107
|
-
featureClickEvent?: EventEmit<{
|
|
108
|
-
featureId: string;
|
|
109
|
-
x: number;
|
|
110
|
-
z: number;
|
|
111
|
-
type?: string;
|
|
112
|
-
elevation?: number;
|
|
113
|
-
}>;
|
|
114
|
-
/** Declarative event: canvas (background) click. */
|
|
115
|
-
canvasClickEvent?: EventEmit<{
|
|
116
|
-
clientX: number;
|
|
117
|
-
clientY: number;
|
|
118
|
-
button: number;
|
|
119
|
-
}>;
|
|
120
|
-
/** Declarative event: tile hover. Accepted; not yet emitted (see `tileClickEvent`). */
|
|
121
|
-
tileHoverEvent?: EventEmit<{
|
|
122
|
-
tileId: string;
|
|
123
|
-
x: number;
|
|
124
|
-
z: number;
|
|
125
|
-
type?: string;
|
|
126
|
-
}>;
|
|
127
|
-
/** Declarative event: tile leave. */
|
|
128
|
-
tileLeaveEvent?: EventEmit<Record<string, never>>;
|
|
129
|
-
/** Declarative event: unit animation. */
|
|
130
|
-
unitAnimationEvent?: EventEmit<{
|
|
131
|
-
unitId: string;
|
|
132
|
-
state: string;
|
|
133
|
-
timestamp: number;
|
|
134
|
-
}>;
|
|
135
|
-
/** Declarative event: camera change. */
|
|
136
|
-
cameraChangeEvent?: EventEmit<{
|
|
137
|
-
position: {
|
|
138
|
-
x: number;
|
|
139
|
-
y: number;
|
|
140
|
-
z: number;
|
|
141
|
-
};
|
|
142
|
-
timestamp: number;
|
|
143
|
-
}>;
|
|
144
|
-
/** Loading message */
|
|
145
|
-
loadingMessage?: string;
|
|
146
|
-
/** Unit draw-size multiplier (accepted for API parity; sizing is drawable-authored). */
|
|
147
|
-
unitScale?: number;
|
|
148
|
-
/** Board zoom (accepted for API parity; 3D zoom is camera-driven, not group-scaled). */
|
|
149
|
-
scale?: number;
|
|
150
|
-
/** Maps a keydown `e.code` → the board's SEMANTIC event (device-agnostic input). */
|
|
151
|
-
keyMap?: Record<string, string>;
|
|
152
|
-
/** Maps a keyup `e.code` → the board's SEMANTIC event. */
|
|
153
|
-
keyUpMap?: Record<string, string>;
|
|
154
|
-
/** Side-view world size in pixels (accepted for API parity). */
|
|
155
|
-
worldWidth?: number;
|
|
156
|
-
/** Side-view world size in pixels (accepted for API parity). */
|
|
157
|
-
worldHeight?: number;
|
|
158
|
-
/** Pixel→world-unit divisor for side view (accepted for API parity). */
|
|
159
|
-
pixelsPerUnit?: number;
|
|
160
|
-
}
|
|
161
|
-
/** Imperative handle for GameCanvas3D */
|
|
162
|
-
export interface Canvas3DHostHandle {
|
|
163
|
-
/** Get current camera position */
|
|
164
|
-
getCameraPosition: () => THREE.Vector3 | null;
|
|
165
|
-
/** Set camera position */
|
|
166
|
-
setCameraPosition: (x: number, y: number, z: number) => void;
|
|
167
|
-
/** Look at a specific point */
|
|
168
|
-
lookAt: (x: number, y: number, z: number) => void;
|
|
169
|
-
/** Reset camera to default position */
|
|
170
|
-
resetCamera: () => void;
|
|
171
|
-
/** Take a screenshot */
|
|
172
|
-
screenshot: () => string | null;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Canvas3DHost — thin 3D draw-host. Walks `drawables` through `Drawable3D`.
|
|
176
|
-
*/
|
|
177
|
-
export declare const Canvas3DHost: React.ForwardRefExoticComponent<Canvas3DHostProps & React.RefAttributes<Canvas3DHostHandle>>;
|
|
178
|
-
export default Canvas3DHost;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas3DLoadingState
|
|
3
|
-
*
|
|
4
|
-
* Loading state component for 3D canvas with progress indicator.
|
|
5
|
-
* Displays asset loading progress and estimated time remaining.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import './Canvas3DLoadingState.css';
|
|
11
|
-
export interface Canvas3DLoadingStateProps {
|
|
12
|
-
/** Current loading progress (0-100) */
|
|
13
|
-
progress?: number;
|
|
14
|
-
/** Number of assets loaded */
|
|
15
|
-
loaded?: number;
|
|
16
|
-
/** Total assets to load */
|
|
17
|
-
total?: number;
|
|
18
|
-
/** Loading message */
|
|
19
|
-
message?: string;
|
|
20
|
-
/** Secondary details message */
|
|
21
|
-
details?: string;
|
|
22
|
-
/** Whether to show spinner */
|
|
23
|
-
showSpinner?: boolean;
|
|
24
|
-
/** Custom className */
|
|
25
|
-
className?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Canvas3DLoadingState Component
|
|
29
|
-
*
|
|
30
|
-
* Displays loading progress for 3D assets.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```tsx
|
|
34
|
-
* <Canvas3DLoadingState
|
|
35
|
-
* progress={65}
|
|
36
|
-
* loaded={13}
|
|
37
|
-
* total={20}
|
|
38
|
-
* message="Loading 3D models..."
|
|
39
|
-
* details="character-knight.glb"
|
|
40
|
-
* />
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
export declare function Canvas3DLoadingState({ progress, loaded, total, message, details, showSpinner, className, }: Canvas3DLoadingStateProps): React.JSX.Element;
|
|
44
|
-
export default Canvas3DLoadingState;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Drawable3D — the R3F dispatcher for neutral drawable descriptors.
|
|
3
|
-
*
|
|
4
|
-
* The 3D twin of `paintDrawable`: given ONE descriptor, it renders the matching
|
|
5
|
-
* R3F element (mesh/billboard). ⚠ R3F throws if a plain descriptor object reaches
|
|
6
|
-
* `<group>{children}` — the host must ALWAYS map descriptors through THIS
|
|
7
|
-
* component first, never pass raw `DrawableNode`s as children. Consumes the same
|
|
8
|
-
* `DrawSpriteProps`/`DrawShapeProps`/`DrawTextProps` descriptors as the 2D paint
|
|
9
|
-
* dispatch — that is what makes canvas-2d and canvas-3d the same `children`
|
|
10
|
-
* interface.
|
|
11
|
-
*/
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import type { Projector3D } from '../projector3d';
|
|
14
|
-
import type { DrawableNode } from '../paintDispatch';
|
|
15
|
-
export interface Drawable3DProps {
|
|
16
|
-
node: DrawableNode;
|
|
17
|
-
projector: Projector3D;
|
|
18
|
-
}
|
|
19
|
-
export declare function Drawable3D({ node, projector }: Drawable3DProps): React.JSX.Element | null;
|
|
20
|
-
export default Drawable3D;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** Reports the live camera position on every change (imperative handle integration). */
|
|
2
|
-
export declare function CameraController3D({ onCameraChange, }: {
|
|
3
|
-
onCameraChange?: (pos: {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
z: number;
|
|
7
|
-
}) => void;
|
|
8
|
-
}): null;
|
|
9
|
-
/**
|
|
10
|
-
* Camera that smooth-tracks a world-space target (side-view player or selected unit).
|
|
11
|
-
* OrbitControls is disabled while following — the camera is authoritative.
|
|
12
|
-
*/
|
|
13
|
-
export declare function FollowCamera3D({ target, offset, }: {
|
|
14
|
-
target: [number, number, number];
|
|
15
|
-
offset: [number, number, number];
|
|
16
|
-
}): null;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lighting3D
|
|
3
|
-
*
|
|
4
|
-
* Default lighting setup for 3D game scenes.
|
|
5
|
-
* Includes ambient, directional, and optional point lights.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export interface Lighting3DProps {
|
|
11
|
-
/** Ambient light intensity */
|
|
12
|
-
ambientIntensity?: number;
|
|
13
|
-
/** Ambient light color */
|
|
14
|
-
ambientColor?: string;
|
|
15
|
-
/** Directional light intensity */
|
|
16
|
-
directionalIntensity?: number;
|
|
17
|
-
/** Directional light color */
|
|
18
|
-
directionalColor?: string;
|
|
19
|
-
/** Directional light position */
|
|
20
|
-
directionalPosition?: [number, number, number];
|
|
21
|
-
/** Enable shadows */
|
|
22
|
-
shadows?: boolean;
|
|
23
|
-
/** Shadow map size */
|
|
24
|
-
shadowMapSize?: number;
|
|
25
|
-
/** Shadow camera size (orthographic half-extent) */
|
|
26
|
-
shadowCameraSize?: number;
|
|
27
|
-
/** Shadow depth bias — reduces shadow acne */
|
|
28
|
-
shadowBias?: number;
|
|
29
|
-
/** Shadow normal bias — reduces acne on angled faces (undefined = three.js default 0) */
|
|
30
|
-
shadowNormalBias?: number;
|
|
31
|
-
/** Shadow camera near plane */
|
|
32
|
-
shadowCameraNear?: number;
|
|
33
|
-
/** Shadow camera far plane */
|
|
34
|
-
shadowCameraFar?: number;
|
|
35
|
-
/** Show helper for directional light */
|
|
36
|
-
showHelpers?: boolean;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Lighting3D Component
|
|
40
|
-
*
|
|
41
|
-
* Pre-configured lighting setup for game scenes.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```tsx
|
|
45
|
-
* <Canvas>
|
|
46
|
-
* <Lighting3D
|
|
47
|
-
* ambientIntensity={0.6}
|
|
48
|
-
* directionalIntensity={1.0}
|
|
49
|
-
* shadows={true}
|
|
50
|
-
* />
|
|
51
|
-
* </Canvas>
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export declare function Lighting3D({ ambientIntensity, ambientColor, directionalIntensity, directionalColor, directionalPosition, shadows, shadowMapSize, shadowCameraSize, shadowBias, shadowNormalBias, shadowCameraNear, shadowCameraFar, showHelpers, }: Lighting3DProps): React.JSX.Element;
|
|
55
|
-
export default Lighting3D;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ModelLoader Component
|
|
3
|
-
*
|
|
4
|
-
* React Three Fiber component for loading and displaying GLB/GLTF models from URLs.
|
|
5
|
-
* Handles loading states and errors without requiring React Suspense.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export interface ModelLoaderProps {
|
|
11
|
-
/** URL to the GLB/GLTF model */
|
|
12
|
-
url: string;
|
|
13
|
-
/** Position [x, y, z] */
|
|
14
|
-
position?: [number, number, number];
|
|
15
|
-
/** Scale - either a single number or [x, y, z] */
|
|
16
|
-
scale?: number | [number, number, number];
|
|
17
|
-
/** Rotation in degrees [x, y, z] */
|
|
18
|
-
rotation?: [number, number, number];
|
|
19
|
-
/** Whether the model is selected */
|
|
20
|
-
isSelected?: boolean;
|
|
21
|
-
/** Whether the model is hovered */
|
|
22
|
-
isHovered?: boolean;
|
|
23
|
-
/** Click handler */
|
|
24
|
-
onClick?: () => void;
|
|
25
|
-
/** Hover handler */
|
|
26
|
-
onHover?: (hovered: boolean) => void;
|
|
27
|
-
/** Fallback geometry type */
|
|
28
|
-
fallbackGeometry?: 'box' | 'sphere' | 'cylinder' | 'none';
|
|
29
|
-
/**
|
|
30
|
-
* Named GLB animation clip to play (e.g. "idle", "walk") — the LOLO state machine
|
|
31
|
-
* drives this from the unit's `animation` field. Matched case-insensitively; an
|
|
32
|
-
* unknown or absent name leaves the model static (bind pose).
|
|
33
|
-
*/
|
|
34
|
-
animation?: string;
|
|
35
|
-
/** Multiply the model's material colors by this CSS color (per-instance; e.g. team tint). */
|
|
36
|
-
tint?: string;
|
|
37
|
-
/** Enable shadows */
|
|
38
|
-
castShadow?: boolean;
|
|
39
|
-
/** Receive shadows */
|
|
40
|
-
receiveShadow?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Base path for shared resources (textures, materials).
|
|
43
|
-
* If not provided, auto-detected from the URL by looking for a `/3d/` segment.
|
|
44
|
-
* E.g. "https://host/3d/" so that "Textures/colormap.png" resolves correctly.
|
|
45
|
-
*/
|
|
46
|
-
resourceBasePath?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* ModelLoader component for rendering GLB models in React Three Fiber
|
|
50
|
-
*/
|
|
51
|
-
export declare function ModelLoader({ url, position, scale, rotation, isSelected, isHovered, onClick, onHover, fallbackGeometry, castShadow, receiveShadow, resourceBasePath, animation, tint, }: ModelLoaderProps): React.JSX.Element;
|
|
52
|
-
export default ModelLoader;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scene3D
|
|
3
|
-
*
|
|
4
|
-
* Three.js scene wrapper component for React Three Fiber.
|
|
5
|
-
* Manages the scene environment, fog, and background.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export interface Scene3DProps {
|
|
11
|
-
/** Background color or URL */
|
|
12
|
-
background?: string;
|
|
13
|
-
/** Fog configuration */
|
|
14
|
-
fog?: {
|
|
15
|
-
color: string;
|
|
16
|
-
near: number;
|
|
17
|
-
far: number;
|
|
18
|
-
};
|
|
19
|
-
/** Children to render in scene */
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Scene3D Component
|
|
24
|
-
*
|
|
25
|
-
* Manages Three.js scene settings like background and fog.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* <Canvas>
|
|
30
|
-
* <Scene3D background="#1a1a2e" fog={{ color: '#1a1a2e', near: 10, far: 50 }}>
|
|
31
|
-
* <GameObjects />
|
|
32
|
-
* </Scene3D>
|
|
33
|
-
* </Canvas>
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export declare function Scene3D({ background, fog, children }: Scene3DProps): React.JSX.Element;
|
|
37
|
-
export default Scene3D;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* game3dTheme — DEFAULT palette constants for the 3D draw-host (`Canvas3DHost`).
|
|
3
|
-
* No React deps — pure constants. Only the grid + background defaults remain live;
|
|
4
|
-
* every per-item color/size comes from the drawable descriptors that `.lolo` computes.
|
|
5
|
-
*
|
|
6
|
-
* @packageDocumentation
|
|
7
|
-
*/
|
|
8
|
-
/** Grid line colors for the drei `<Grid>`. */
|
|
9
|
-
export declare const GRID_COLORS_3D: {
|
|
10
|
-
cell: string;
|
|
11
|
-
section: string;
|
|
12
|
-
};
|
|
13
|
-
/** Default scene background (Canvas3DHostProps.backgroundColor default). */
|
|
14
|
-
export declare const DEFAULT_BACKGROUND_3D = "#1a1a2e";
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { AssetLoader, LoadedModel } from '../lib/AssetLoader';
|
|
3
|
-
export interface UseAssetLoaderOptions {
|
|
4
|
-
/** URLs to preload on mount */
|
|
5
|
-
preloadUrls?: string[];
|
|
6
|
-
/** Asset loader instance (uses singleton if not provided) */
|
|
7
|
-
loader?: AssetLoader;
|
|
8
|
-
}
|
|
9
|
-
export interface AssetLoadingState {
|
|
10
|
-
/** Whether assets are currently loading */
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
/** Loading progress (0-100) */
|
|
13
|
-
progress: number;
|
|
14
|
-
/** Number of loaded assets */
|
|
15
|
-
loaded: number;
|
|
16
|
-
/** Total assets to load */
|
|
17
|
-
total: number;
|
|
18
|
-
/** Any loading errors */
|
|
19
|
-
errors: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface UseAssetLoaderReturn extends AssetLoadingState {
|
|
22
|
-
/** Load a single model */
|
|
23
|
-
loadModel: (url: string) => Promise<LoadedModel>;
|
|
24
|
-
/** Load a single OBJ model */
|
|
25
|
-
loadOBJ: (url: string) => Promise<THREE.Group>;
|
|
26
|
-
/** Load a single texture */
|
|
27
|
-
loadTexture: (url: string) => Promise<THREE.Texture>;
|
|
28
|
-
/** Preload multiple assets */
|
|
29
|
-
preload: (urls: string[]) => Promise<void>;
|
|
30
|
-
/** Check if model is cached */
|
|
31
|
-
hasModel: (url: string) => boolean;
|
|
32
|
-
/** Check if texture is cached */
|
|
33
|
-
hasTexture: (url: string) => boolean;
|
|
34
|
-
/** Get cached model */
|
|
35
|
-
getModel: (url: string) => LoadedModel | undefined;
|
|
36
|
-
/** Get cached texture */
|
|
37
|
-
getTexture: (url: string) => THREE.Texture | undefined;
|
|
38
|
-
/** Clear all caches */
|
|
39
|
-
clearCache: () => void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Hook for managing 3D asset loading in React components
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```tsx
|
|
46
|
-
* const { loadModel, isLoading, progress } = useAssetLoader({
|
|
47
|
-
* preloadUrls: ['/assets/model.glb']
|
|
48
|
-
* });
|
|
49
|
-
*
|
|
50
|
-
* useEffect(() => {
|
|
51
|
-
* loadModel('/assets/character.glb').then((model) => {
|
|
52
|
-
* scene.add(model.scene);
|
|
53
|
-
* });
|
|
54
|
-
* }, []);
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
export declare function useAssetLoader(options?: UseAssetLoaderOptions): UseAssetLoaderReturn;
|
|
58
|
-
export default useAssetLoader;
|