@almadar/ui 5.78.0 → 5.79.1
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/package.json +1 -1
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/avl/index.cjs +0 -64392
- package/dist/avl/index.css +0 -1252
- package/dist/avl/index.d.cts +0 -1853
- package/dist/avl/index.d.ts +0 -64
- package/dist/avl/index.js +0 -64280
- 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/Avatar.d.ts +0 -61
- package/dist/components/core/atoms/Badge.d.ts +0 -26
- package/dist/components/core/atoms/Box.d.ts +0 -66
- package/dist/components/core/atoms/Button.d.ts +0 -31
- 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/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 -50
- 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 -14
- package/dist/components/core/molecules/DocSearch.d.ts +0 -15
- 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 -33
- package/dist/components/core/molecules/LoadingState.d.ts +0 -7
- package/dist/components/core/molecules/MapView.d.ts +0 -70
- 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 -36
- 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 -58
- 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 -160
- 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 -137
- 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 -43
- 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 -75
- package/dist/components/core/organisms/DetailPanel.d.ts +0 -80
- package/dist/components/core/organisms/DrawerSlot.d.ts +0 -40
- 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 -36
- 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 -39
- 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 -20
- 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 -13
- package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +0 -17
- package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +0 -9
- package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +0 -9
- package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +0 -9
- package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +0 -13
- package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +0 -13
- package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +0 -9
- package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +0 -10
- 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 -44
- 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 -21
- package/dist/components/core/templates/types.d.ts +0 -35
- package/dist/components/game/2d/atoms/ActionButton.d.ts +0 -28
- package/dist/components/game/2d/atoms/ChoiceButton.d.ts +0 -24
- package/dist/components/game/2d/atoms/ComboCounter.d.ts +0 -19
- package/dist/components/game/2d/atoms/ControlButton.d.ts +0 -34
- package/dist/components/game/2d/atoms/DamageNumber.d.ts +0 -17
- package/dist/components/game/2d/atoms/DialogueBubble.d.ts +0 -17
- package/dist/components/game/2d/atoms/GameAudioToggle.d.ts +0 -29
- package/dist/components/game/2d/atoms/GameCard.d.ts +0 -26
- package/dist/components/game/2d/atoms/GameIcon.d.ts +0 -18
- package/dist/components/game/2d/atoms/HealthBar.d.ts +0 -26
- package/dist/components/game/2d/atoms/ItemSlot.d.ts +0 -28
- package/dist/components/game/2d/atoms/MiniMap.d.ts +0 -34
- package/dist/components/game/2d/atoms/ResourceCounter.d.ts +0 -25
- package/dist/components/game/2d/atoms/ScoreDisplay.d.ts +0 -24
- package/dist/components/game/2d/atoms/Sprite.d.ts +0 -52
- package/dist/components/game/2d/atoms/StateIndicator.d.ts +0 -29
- package/dist/components/game/2d/atoms/StatusEffect.d.ts +0 -24
- package/dist/components/game/2d/atoms/TimerDisplay.d.ts +0 -18
- package/dist/components/game/2d/atoms/TurnIndicator.d.ts +0 -21
- package/dist/components/game/2d/atoms/WaypointMarker.d.ts +0 -22
- package/dist/components/game/2d/molecules/Canvas2D.d.ts +0 -161
- package/dist/components/game/2d/molecules/ControlGrid.d.ts +0 -42
- package/dist/components/game/2d/molecules/GameHud.d.ts +0 -51
- package/dist/components/game/2d/molecules/GameMenu.d.ts +0 -44
- package/dist/components/game/2d/molecules/InventoryGrid.d.ts +0 -34
- package/dist/components/game/2d/molecules/ResourceBar.d.ts +0 -25
- package/dist/components/game/2d/molecules/StatBadge.d.ts +0 -38
- package/dist/components/game/2d/molecules/index.d.ts +0 -107
- package/dist/components/game/2d/organisms/ActionPalette.d.ts +0 -34
- package/dist/components/game/2d/organisms/ActionTile.d.ts +0 -30
- package/dist/components/game/2d/organisms/BattleBoard.d.ts +0 -132
- package/dist/components/game/2d/organisms/BoardgameBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/BuilderBoard.d.ts +0 -60
- package/dist/components/game/2d/organisms/CanvasEffect.d.ts +0 -70
- package/dist/components/game/2d/organisms/CardBattlerBoard.d.ts +0 -45
- package/dist/components/game/2d/organisms/CastleBoard.d.ts +0 -107
- package/dist/components/game/2d/organisms/CityBuilderBoard.d.ts +0 -62
- package/dist/components/game/2d/organisms/ClassifierBoard.d.ts +0 -66
- package/dist/components/game/2d/organisms/DebuggerBoard.d.ts +0 -61
- package/dist/components/game/2d/organisms/EventHandlerBoard.d.ts +0 -42
- package/dist/components/game/2d/organisms/EventLog.d.ts +0 -31
- package/dist/components/game/2d/organisms/FishingBoard.d.ts +0 -41
- package/dist/components/game/2d/organisms/HexStrategyBoard.d.ts +0 -44
- package/dist/components/game/2d/organisms/HolidayRunnerBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/MatchPuzzleBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/MinigolfBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/NegotiatorBoard.d.ts +0 -56
- package/dist/components/game/2d/organisms/ObjectRulePanel.d.ts +0 -27
- package/dist/components/game/2d/organisms/PinballBoard.d.ts +0 -43
- package/dist/components/game/2d/organisms/PirateBoard.d.ts +0 -44
- package/dist/components/game/2d/organisms/PlatformerBoard.d.ts +0 -46
- package/dist/components/game/2d/organisms/RacingBoard.d.ts +0 -44
- package/dist/components/game/2d/organisms/RoguelikeBoard.d.ts +0 -60
- package/dist/components/game/2d/organisms/RuleEditor.d.ts +0 -39
- package/dist/components/game/2d/organisms/SequenceBar.d.ts +0 -41
- package/dist/components/game/2d/organisms/SequencerBoard.d.ts +0 -65
- package/dist/components/game/2d/organisms/SimulationCanvas.d.ts +0 -27
- package/dist/components/game/2d/organisms/SimulationControls.d.ts +0 -34
- package/dist/components/game/2d/organisms/SimulationGraph.d.ts +0 -25
- package/dist/components/game/2d/organisms/SimulatorBoard.d.ts +0 -58
- package/dist/components/game/2d/organisms/SokobanBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/SpaceShmupBoard.d.ts +0 -44
- package/dist/components/game/2d/organisms/SpaceStationBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/SportsBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/StateArchitectBoard.d.ts +0 -61
- package/dist/components/game/2d/organisms/StateJsonView.d.ts +0 -17
- package/dist/components/game/2d/organisms/StateNode.d.ts +0 -31
- package/dist/components/game/2d/organisms/TanksBoard.d.ts +0 -37
- package/dist/components/game/2d/organisms/TopDownShooterBoard.d.ts +0 -63
- package/dist/components/game/2d/organisms/TowerDefenseBoard.d.ts +0 -85
- package/dist/components/game/2d/organisms/TraitSlot.d.ts +0 -96
- package/dist/components/game/2d/organisms/TraitStateViewer.d.ts +0 -54
- package/dist/components/game/2d/organisms/TransitionArrow.d.ts +0 -31
- package/dist/components/game/2d/organisms/UncontrolledBattleBoard.d.ts +0 -43
- package/dist/components/game/2d/organisms/VariablePanel.d.ts +0 -22
- package/dist/components/game/2d/organisms/VisualNovelBoard.d.ts +0 -44
- package/dist/components/game/2d/organisms/WorldMapBoard.d.ts +0 -155
- package/dist/components/game/2d/templates/BattleTemplate.d.ts +0 -34
- package/dist/components/game/2d/templates/CardBattlerTemplate.d.ts +0 -35
- package/dist/components/game/2d/templates/CastleTemplate.d.ts +0 -32
- package/dist/components/game/2d/templates/CityBuilderTemplate.d.ts +0 -40
- package/dist/components/game/2d/templates/GameShell.d.ts +0 -34
- package/dist/components/game/2d/templates/GameTemplate.d.ts +0 -32
- package/dist/components/game/2d/templates/PlatformerTemplate.d.ts +0 -27
- package/dist/components/game/2d/templates/RoguelikeTemplate.d.ts +0 -23
- package/dist/components/game/2d/templates/TopDownShooterTemplate.d.ts +0 -42
- package/dist/components/game/2d/templates/TowerDefenseTemplate.d.ts +0 -43
- package/dist/components/game/2d/templates/VisualNovelTemplate.d.ts +0 -28
- package/dist/components/game/2d/templates/WorldMapTemplate.d.ts +0 -38
- package/dist/components/game/3d/index.cjs +0 -7050
- package/dist/components/game/3d/index.css +0 -503
- package/dist/components/game/3d/index.d.ts +0 -13
- package/dist/components/game/3d/index.js +0 -6974
- package/dist/components/game/3d/molecules/Camera3D.d.ts +0 -60
- package/dist/components/game/3d/molecules/Canvas3D.d.ts +0 -45
- package/dist/components/game/3d/molecules/Canvas3DErrorBoundary.d.ts +0 -51
- package/dist/components/game/3d/molecules/Canvas3DLoadingState.d.ts +0 -44
- package/dist/components/game/3d/molecules/GameCanvas3D.d.ts +0 -226
- package/dist/components/game/3d/molecules/Lighting3D.d.ts +0 -47
- package/dist/components/game/3d/molecules/ModelLoader.d.ts +0 -44
- package/dist/components/game/3d/molecules/Scene3D.d.ts +0 -37
- package/dist/components/game/3d/molecules/index.d.ts +0 -36
- package/dist/components/game/3d/organisms/GameBoard3D.d.ts +0 -66
- package/dist/components/game/3d/patterns.d.ts +0 -20
- package/dist/components/game/3d/templates/GameCanvas3DBattleTemplate.d.ts +0 -82
- package/dist/components/game/3d/templates/GameCanvas3DCastleTemplate.d.ts +0 -87
- package/dist/components/game/3d/templates/GameCanvas3DWorldMapTemplate.d.ts +0 -95
- package/dist/components/game/shared/boardEntity.d.ts +0 -44
- package/dist/components/game/shared/canvasEffects.d.ts +0 -50
- package/dist/components/game/shared/combatPresets.d.ts +0 -15
- package/dist/components/game/shared/effects.d.ts +0 -253
- package/dist/components/game/shared/game.d.ts +0 -92
- package/dist/components/game/shared/hooks/useAssetLoader.d.ts +0 -58
- package/dist/components/game/shared/hooks/useBattleState.d.ts +0 -47
- package/dist/components/game/shared/hooks/useCamera.d.ts +0 -57
- package/dist/components/game/shared/hooks/useCanvasEffects.d.ts +0 -27
- package/dist/components/game/shared/hooks/useGameAudio.d.ts +0 -47
- package/dist/components/game/shared/hooks/useGameCanvas3DEvents.d.ts +0 -123
- package/dist/components/game/shared/hooks/useRaycaster.d.ts +0 -86
- package/dist/components/game/shared/hooks/useSceneGraph.d.ts +0 -67
- package/dist/components/game/shared/hooks/useThree.d.ts +0 -58
- package/dist/components/game/shared/hooks/useUnitSpriteAtlas.d.ts +0 -24
- package/dist/components/game/shared/index.d.ts +0 -21
- package/dist/components/game/shared/isometric.d.ts +0 -83
- package/dist/components/game/shared/isometricTypes.d.ts +0 -130
- package/dist/components/game/shared/lib/AssetLoader.d.ts +0 -80
- package/dist/components/game/shared/lib/culling.d.ts +0 -134
- package/dist/components/game/shared/lib/editorUtils.d.ts +0 -114
- package/dist/components/game/shared/lib/game3dAssetManifest.d.ts +0 -48
- package/dist/components/game/shared/lib/grid3D.d.ts +0 -154
- package/dist/components/game/shared/lib/mechanics.d.ts +0 -4
- package/dist/components/game/shared/lib/physicsPresets.d.ts +0 -4
- package/dist/components/game/shared/lib/physicsTypes.d.ts +0 -43
- package/dist/components/game/shared/lib/puzzleObject.d.ts +0 -32
- package/dist/components/game/shared/makeAsset.d.ts +0 -5
- package/dist/components/game/shared/providers/GameAudioProvider.d.ts +0 -53
- package/dist/components/game/shared/spriteAnimation.d.ts +0 -85
- package/dist/components/game/shared/spriteAnimationTypes.d.ts +0 -97
- package/dist/components/game/shared/spriteSheetConstants.d.ts +0 -16
- package/dist/components/game/shared/useImageCache.d.ts +0 -16
- package/dist/components/index.cjs +0 -57559
- package/dist/components/index.css +0 -1252
- package/dist/components/index.d.ts +0 -6
- package/dist/components/index.js +0 -57300
- package/dist/components/learning/atoms/LearningCanvas.d.ts +0 -80
- 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/context/index.cjs +0 -957
- package/dist/context/index.d.ts +0 -11
- package/dist/context/index.js +0 -899
- package/dist/hooks/index.cjs +0 -2778
- package/dist/hooks/index.d.ts +0 -32
- package/dist/hooks/index.js +0 -2738
- 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/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/useGitHub.d.ts +0 -58
- 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/useSwipeGesture.d.ts +0 -26
- package/dist/hooks/useTapReveal.d.ts +0 -32
- package/dist/hooks/useTraitStateMachine.d.ts +0 -105
- package/dist/hooks/useTranslate.d.ts +0 -35
- package/dist/hooks/useUIEvents.d.ts +0 -41
- package/dist/hooks/useUISlots.d.ts +0 -214
- package/dist/hooks/useValidation.d.ts +0 -46
- package/dist/lib/api-client.d.ts +0 -43
- 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/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/getNestedValue.d.ts +0 -34
- package/dist/lib/guardRegistry.d.ts +0 -33
- package/dist/lib/iconFamily.d.ts +0 -41
- package/dist/lib/index.cjs +0 -1616
- package/dist/lib/index.d.ts +0 -18
- package/dist/lib/index.js +0 -1524
- package/dist/lib/init.d.ts +0 -14
- 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/offline-executor.d.ts +0 -239
- package/dist/lib/orbitalsByTrait.d.ts +0 -34
- 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/prepareSchemaForPreview.d.ts +0 -71
- package/dist/lib/slot-definitions.d.ts +0 -33
- package/dist/lib/themeTokens.d.ts +0 -55
- 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/wrapCallbackForEvent.d.ts +0 -16
- package/dist/locales/index.cjs +0 -1761
- package/dist/locales/index.d.ts +0 -20
- package/dist/locales/index.js +0 -1757
- package/dist/marketing/index.cjs +0 -6966
- package/dist/marketing/index.d.cts +0 -1061
- package/dist/marketing/index.d.ts +0 -72
- package/dist/marketing/index.js +0 -6903
- 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/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/UISlotContext.d.ts +0 -75
- package/dist/providers/UserContext.d.ts +0 -112
- package/dist/providers/VerificationProvider.d.ts +0 -64
- package/dist/providers/index.cjs +0 -54649
- package/dist/providers/index.css +0 -1252
- package/dist/providers/index.d.ts +0 -25
- package/dist/providers/index.js +0 -54550
- package/dist/providers/navigation.d.ts +0 -142
- package/dist/renderer/index.cjs +0 -855
- package/dist/renderer/index.d.ts +0 -28
- package/dist/renderer/index.js +0 -766
- package/dist/runtime/BrowserPlayground.d.ts +0 -34
- package/dist/runtime/OrbPreview.d.ts +0 -84
- package/dist/runtime/index.cjs +0 -54826
- package/dist/runtime/index.css +0 -1252
- package/dist/runtime/index.d.ts +0 -21
- package/dist/runtime/index.js +0 -54729
- 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/event-bus-types.d.ts +0 -64
- 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
package/dist/hooks/index.cjs
DELETED
|
@@ -1,2778 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var react = require('react');
|
|
4
|
-
var logger = require('@almadar/logger');
|
|
5
|
-
var providers = require('@almadar/ui/providers');
|
|
6
|
-
var reactQuery = require('@tanstack/react-query');
|
|
7
|
-
|
|
8
|
-
var log = logger.createLogger("almadar:ui:orbital-history");
|
|
9
|
-
function useOrbitalHistory(options) {
|
|
10
|
-
const { appId, authToken, userId, onHistoryChange, onRevertSuccess } = options;
|
|
11
|
-
const getHeaders = react.useCallback(() => {
|
|
12
|
-
const headers = {
|
|
13
|
-
"Content-Type": "application/json"
|
|
14
|
-
};
|
|
15
|
-
if (authToken) {
|
|
16
|
-
headers["Authorization"] = `Bearer ${authToken}`;
|
|
17
|
-
}
|
|
18
|
-
if (userId) {
|
|
19
|
-
headers["x-user-id"] = userId;
|
|
20
|
-
}
|
|
21
|
-
return headers;
|
|
22
|
-
}, [authToken, userId]);
|
|
23
|
-
const [timeline, setTimeline] = react.useState([]);
|
|
24
|
-
const [currentVersion, setCurrentVersion] = react.useState(1);
|
|
25
|
-
const [isLoading, setIsLoading] = react.useState(false);
|
|
26
|
-
const [error, setError] = react.useState(null);
|
|
27
|
-
const refresh = react.useCallback(async () => {
|
|
28
|
-
if (!appId) return;
|
|
29
|
-
setIsLoading(true);
|
|
30
|
-
setError(null);
|
|
31
|
-
try {
|
|
32
|
-
const headers = getHeaders();
|
|
33
|
-
const [changesetsRes, snapshotsRes] = await Promise.all([
|
|
34
|
-
fetch(`/api/graphs/${appId}/history/changesets`, { headers }),
|
|
35
|
-
fetch(`/api/graphs/${appId}/history/snapshots`, { headers })
|
|
36
|
-
]);
|
|
37
|
-
if (!changesetsRes.ok) {
|
|
38
|
-
throw new Error(`Failed to fetch changesets: ${changesetsRes.status}`);
|
|
39
|
-
}
|
|
40
|
-
if (!snapshotsRes.ok) {
|
|
41
|
-
throw new Error(`Failed to fetch snapshots: ${snapshotsRes.status}`);
|
|
42
|
-
}
|
|
43
|
-
const changesetsData = await changesetsRes.json();
|
|
44
|
-
const snapshotsData = await snapshotsRes.json();
|
|
45
|
-
const changesetItems = (changesetsData.changesets || []).map((cs) => ({
|
|
46
|
-
id: cs.id,
|
|
47
|
-
type: "changeset",
|
|
48
|
-
version: cs.version,
|
|
49
|
-
timestamp: cs.timestamp,
|
|
50
|
-
description: `Version ${cs.version}`,
|
|
51
|
-
source: cs.source,
|
|
52
|
-
summary: cs.summary
|
|
53
|
-
}));
|
|
54
|
-
const snapshotItems = (snapshotsData.snapshots || []).map((snap) => ({
|
|
55
|
-
id: snap.id,
|
|
56
|
-
type: "snapshot",
|
|
57
|
-
version: snap.version,
|
|
58
|
-
timestamp: snap.timestamp,
|
|
59
|
-
description: snap.reason || `Snapshot v${snap.version}`,
|
|
60
|
-
reason: snap.reason
|
|
61
|
-
}));
|
|
62
|
-
const mergedTimeline = [...changesetItems, ...snapshotItems].sort(
|
|
63
|
-
(a, b) => b.timestamp - a.timestamp
|
|
64
|
-
);
|
|
65
|
-
setTimeline(mergedTimeline);
|
|
66
|
-
if (mergedTimeline.length > 0) {
|
|
67
|
-
setCurrentVersion(mergedTimeline[0].version);
|
|
68
|
-
}
|
|
69
|
-
} catch (err) {
|
|
70
|
-
log.error("Failed to load history", { error: err instanceof Error ? err : String(err) });
|
|
71
|
-
setError(err instanceof Error ? err.message : "Failed to load history");
|
|
72
|
-
} finally {
|
|
73
|
-
setIsLoading(false);
|
|
74
|
-
}
|
|
75
|
-
}, [appId, getHeaders]);
|
|
76
|
-
const revertToSnapshot = react.useCallback(async (snapshotId) => {
|
|
77
|
-
if (!appId) {
|
|
78
|
-
return { success: false, error: "No app ID provided" };
|
|
79
|
-
}
|
|
80
|
-
try {
|
|
81
|
-
const response = await fetch(`/api/graphs/${appId}/history/revert/${snapshotId}`, {
|
|
82
|
-
method: "POST",
|
|
83
|
-
headers: getHeaders()
|
|
84
|
-
});
|
|
85
|
-
if (!response.ok) {
|
|
86
|
-
const errorData = await response.json().catch(() => ({}));
|
|
87
|
-
throw new Error(errorData.error || `Failed to revert: ${response.status}`);
|
|
88
|
-
}
|
|
89
|
-
const data = await response.json();
|
|
90
|
-
if (data.success && data.schema) {
|
|
91
|
-
await refresh();
|
|
92
|
-
onRevertSuccess?.(data.schema);
|
|
93
|
-
return {
|
|
94
|
-
success: true,
|
|
95
|
-
restoredSchema: data.schema
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
success: false,
|
|
100
|
-
error: data.error || "Unknown error during revert"
|
|
101
|
-
};
|
|
102
|
-
} catch (err) {
|
|
103
|
-
log.error("Failed to revert", { error: err instanceof Error ? err : String(err) });
|
|
104
|
-
return {
|
|
105
|
-
success: false,
|
|
106
|
-
error: err instanceof Error ? err.message : "Failed to revert"
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}, [appId, getHeaders, refresh, onRevertSuccess]);
|
|
110
|
-
react.useEffect(() => {
|
|
111
|
-
if (appId && authToken && userId) {
|
|
112
|
-
refresh();
|
|
113
|
-
}
|
|
114
|
-
}, [appId, authToken, userId]);
|
|
115
|
-
react.useEffect(() => {
|
|
116
|
-
onHistoryChange?.(timeline);
|
|
117
|
-
}, [timeline]);
|
|
118
|
-
return {
|
|
119
|
-
timeline,
|
|
120
|
-
currentVersion,
|
|
121
|
-
isLoading,
|
|
122
|
-
error,
|
|
123
|
-
revertToSnapshot,
|
|
124
|
-
refresh
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
var log2 = logger.createLogger("almadar:ui:filesystem");
|
|
128
|
-
function useFileSystem() {
|
|
129
|
-
const [status, setStatus] = react.useState("idle");
|
|
130
|
-
const [error, setError] = react.useState(null);
|
|
131
|
-
const [isLoading, setIsLoading] = react.useState(false);
|
|
132
|
-
const [files, setFiles] = react.useState([]);
|
|
133
|
-
const [selectedFile, setSelectedFile] = react.useState(null);
|
|
134
|
-
const [selectedPath, setSelectedPath] = react.useState(null);
|
|
135
|
-
const [previewUrl, setPreviewUrl] = react.useState(null);
|
|
136
|
-
const [fileContents, setFileContents] = react.useState(/* @__PURE__ */ new Map());
|
|
137
|
-
const boot = react.useCallback(async () => {
|
|
138
|
-
setStatus("booting");
|
|
139
|
-
setError(null);
|
|
140
|
-
setIsLoading(true);
|
|
141
|
-
try {
|
|
142
|
-
log2.debug("Booting WebContainer");
|
|
143
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
144
|
-
setStatus("ready");
|
|
145
|
-
} catch (err) {
|
|
146
|
-
setError(err instanceof Error ? err.message : "Failed to boot");
|
|
147
|
-
setStatus("error");
|
|
148
|
-
} finally {
|
|
149
|
-
setIsLoading(false);
|
|
150
|
-
}
|
|
151
|
-
}, []);
|
|
152
|
-
const mountFiles = react.useCallback(async (filesToMount) => {
|
|
153
|
-
setIsLoading(true);
|
|
154
|
-
try {
|
|
155
|
-
let filesArray;
|
|
156
|
-
if (Array.isArray(filesToMount)) {
|
|
157
|
-
filesArray = filesToMount;
|
|
158
|
-
} else {
|
|
159
|
-
filesArray = [];
|
|
160
|
-
const flattenTree = (obj, basePath = "") => {
|
|
161
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
162
|
-
const path = basePath ? `${basePath}/${key}` : key;
|
|
163
|
-
if (value && "file" in value) {
|
|
164
|
-
filesArray.push({ path, content: value.file.contents || "" });
|
|
165
|
-
} else if (value && "directory" in value) {
|
|
166
|
-
flattenTree(value.directory, path);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
flattenTree(filesToMount);
|
|
171
|
-
}
|
|
172
|
-
const newContents = /* @__PURE__ */ new Map();
|
|
173
|
-
for (const file of filesArray) {
|
|
174
|
-
newContents.set(file.path, file.content);
|
|
175
|
-
}
|
|
176
|
-
setFileContents(newContents);
|
|
177
|
-
const newTree = [];
|
|
178
|
-
for (const file of filesArray) {
|
|
179
|
-
const parts = file.path.split("/").filter(Boolean);
|
|
180
|
-
let current = newTree;
|
|
181
|
-
for (let i = 0; i < parts.length; i++) {
|
|
182
|
-
const part = parts[i];
|
|
183
|
-
const isFile = i === parts.length - 1;
|
|
184
|
-
const currentPath = "/" + parts.slice(0, i + 1).join("/");
|
|
185
|
-
let node = current.find((n) => n.name === part);
|
|
186
|
-
if (!node) {
|
|
187
|
-
node = {
|
|
188
|
-
path: currentPath,
|
|
189
|
-
name: part,
|
|
190
|
-
type: isFile ? "file" : "directory",
|
|
191
|
-
children: isFile ? void 0 : []
|
|
192
|
-
};
|
|
193
|
-
current.push(node);
|
|
194
|
-
}
|
|
195
|
-
if (!isFile && node && node.children) {
|
|
196
|
-
current = node.children;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
setFiles(newTree);
|
|
201
|
-
setStatus("running");
|
|
202
|
-
} catch (err) {
|
|
203
|
-
log2.error("Failed to mount files", { error: err instanceof Error ? err : String(err) });
|
|
204
|
-
} finally {
|
|
205
|
-
setIsLoading(false);
|
|
206
|
-
}
|
|
207
|
-
}, []);
|
|
208
|
-
const readFile = react.useCallback(async (path) => {
|
|
209
|
-
return fileContents.get(path) || "";
|
|
210
|
-
}, [fileContents]);
|
|
211
|
-
const writeFile = react.useCallback(async (path, content) => {
|
|
212
|
-
setFileContents((prev) => {
|
|
213
|
-
const next = new Map(prev);
|
|
214
|
-
next.set(path, content);
|
|
215
|
-
return next;
|
|
216
|
-
});
|
|
217
|
-
}, []);
|
|
218
|
-
const selectFile = react.useCallback(async (path) => {
|
|
219
|
-
const content = fileContents.get(path) || "";
|
|
220
|
-
const ext = path.split(".").pop()?.toLowerCase() || "";
|
|
221
|
-
const languageMap = {
|
|
222
|
-
ts: "typescript",
|
|
223
|
-
tsx: "typescript",
|
|
224
|
-
js: "javascript",
|
|
225
|
-
jsx: "javascript",
|
|
226
|
-
json: "json",
|
|
227
|
-
md: "markdown",
|
|
228
|
-
css: "css",
|
|
229
|
-
html: "html",
|
|
230
|
-
orb: "json"
|
|
231
|
-
};
|
|
232
|
-
setSelectedPath(path);
|
|
233
|
-
setSelectedFile({
|
|
234
|
-
path,
|
|
235
|
-
content,
|
|
236
|
-
language: languageMap[ext] || "plaintext",
|
|
237
|
-
isDirty: false
|
|
238
|
-
});
|
|
239
|
-
}, [fileContents]);
|
|
240
|
-
const updateContent = react.useCallback((pathOrContent, contentArg) => {
|
|
241
|
-
const path = contentArg !== void 0 ? pathOrContent : selectedPath;
|
|
242
|
-
const content = contentArg !== void 0 ? contentArg : pathOrContent;
|
|
243
|
-
if (!path) {
|
|
244
|
-
log2.warn("updateContent called without path and no file selected");
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
setFileContents((prev) => {
|
|
248
|
-
const next = new Map(prev);
|
|
249
|
-
next.set(path, content);
|
|
250
|
-
return next;
|
|
251
|
-
});
|
|
252
|
-
if (selectedPath === path) {
|
|
253
|
-
setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
|
|
254
|
-
}
|
|
255
|
-
}, [selectedPath]);
|
|
256
|
-
const updateSelectedContent = react.useCallback((content) => {
|
|
257
|
-
setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
|
|
258
|
-
}, []);
|
|
259
|
-
const refreshTree = react.useCallback(async () => {
|
|
260
|
-
log2.debug("Refreshing tree");
|
|
261
|
-
}, []);
|
|
262
|
-
const runCommand = react.useCallback(async (command) => {
|
|
263
|
-
log2.debug("Running command", { command });
|
|
264
|
-
return { exitCode: 0, output: "" };
|
|
265
|
-
}, []);
|
|
266
|
-
const startDevServer = react.useCallback(async () => {
|
|
267
|
-
log2.debug("Starting dev server");
|
|
268
|
-
setPreviewUrl("http://localhost:5173");
|
|
269
|
-
}, []);
|
|
270
|
-
return {
|
|
271
|
-
status,
|
|
272
|
-
error,
|
|
273
|
-
isLoading,
|
|
274
|
-
files,
|
|
275
|
-
selectedFile,
|
|
276
|
-
selectedPath,
|
|
277
|
-
previewUrl,
|
|
278
|
-
boot,
|
|
279
|
-
mountFiles,
|
|
280
|
-
readFile,
|
|
281
|
-
writeFile,
|
|
282
|
-
selectFile,
|
|
283
|
-
updateContent,
|
|
284
|
-
updateSelectedContent,
|
|
285
|
-
refreshTree,
|
|
286
|
-
runCommand,
|
|
287
|
-
startDevServer
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
var log3 = logger.createLogger("almadar:ui:extensions");
|
|
291
|
-
var defaultManifest = {
|
|
292
|
-
languages: {
|
|
293
|
-
typescript: { extensions: [".ts", ".tsx"], icon: "ts", color: "#3178c6" },
|
|
294
|
-
javascript: { extensions: [".js", ".jsx"], icon: "js", color: "#f7df1e" },
|
|
295
|
-
json: { extensions: [".json", ".orb"], icon: "json", color: "#000000" },
|
|
296
|
-
css: { extensions: [".css"], icon: "css", color: "#264de4" },
|
|
297
|
-
html: { extensions: [".html"], icon: "html", color: "#e34c26" },
|
|
298
|
-
markdown: { extensions: [".md", ".mdx"], icon: "md", color: "#083fa1" }
|
|
299
|
-
},
|
|
300
|
-
extensions: []
|
|
301
|
-
};
|
|
302
|
-
function useExtensions(options) {
|
|
303
|
-
const { appId, loadOnMount = true } = options;
|
|
304
|
-
const [extensions, setExtensions] = react.useState([]);
|
|
305
|
-
const [manifest] = react.useState(defaultManifest);
|
|
306
|
-
const [isLoading, setIsLoading] = react.useState(false);
|
|
307
|
-
const [error, setError] = react.useState(null);
|
|
308
|
-
const loadExtension = react.useCallback(async (extensionId) => {
|
|
309
|
-
log3.debug("Loading extension", { extensionId });
|
|
310
|
-
}, []);
|
|
311
|
-
const loadExtensions = react.useCallback(async () => {
|
|
312
|
-
setIsLoading(true);
|
|
313
|
-
setError(null);
|
|
314
|
-
try {
|
|
315
|
-
const defaultExtensions = [
|
|
316
|
-
{ id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
|
|
317
|
-
{ id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
|
|
318
|
-
{ id: "json", name: "JSON", language: "json", loaded: true },
|
|
319
|
-
{ id: "css", name: "CSS", language: "css", loaded: true },
|
|
320
|
-
{ id: "html", name: "HTML", language: "html", loaded: true },
|
|
321
|
-
{ id: "markdown", name: "Markdown", language: "markdown", loaded: true }
|
|
322
|
-
];
|
|
323
|
-
setExtensions(defaultExtensions);
|
|
324
|
-
} catch (err) {
|
|
325
|
-
setError(err instanceof Error ? err.message : "Failed to load extensions");
|
|
326
|
-
} finally {
|
|
327
|
-
setIsLoading(false);
|
|
328
|
-
}
|
|
329
|
-
}, []);
|
|
330
|
-
const getExtensionForFile = react.useCallback((filename) => {
|
|
331
|
-
const ext = filename.split(".").pop()?.toLowerCase();
|
|
332
|
-
if (!ext) return null;
|
|
333
|
-
const languageMap = {
|
|
334
|
-
ts: "typescript",
|
|
335
|
-
tsx: "typescript",
|
|
336
|
-
js: "javascript",
|
|
337
|
-
jsx: "javascript",
|
|
338
|
-
json: "json",
|
|
339
|
-
md: "markdown",
|
|
340
|
-
css: "css",
|
|
341
|
-
html: "html",
|
|
342
|
-
orb: "json"
|
|
343
|
-
};
|
|
344
|
-
const language = languageMap[ext];
|
|
345
|
-
if (!language) return null;
|
|
346
|
-
return extensions.find((e) => e.language === language) || null;
|
|
347
|
-
}, [extensions]);
|
|
348
|
-
react.useEffect(() => {
|
|
349
|
-
if (!appId || !loadOnMount) return;
|
|
350
|
-
const loadExtensions2 = async () => {
|
|
351
|
-
setIsLoading(true);
|
|
352
|
-
setError(null);
|
|
353
|
-
try {
|
|
354
|
-
const defaultExtensions = [
|
|
355
|
-
{ id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
|
|
356
|
-
{ id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
|
|
357
|
-
{ id: "json", name: "JSON", language: "json", loaded: true },
|
|
358
|
-
{ id: "css", name: "CSS", language: "css", loaded: true },
|
|
359
|
-
{ id: "html", name: "HTML", language: "html", loaded: true },
|
|
360
|
-
{ id: "markdown", name: "Markdown", language: "markdown", loaded: true }
|
|
361
|
-
];
|
|
362
|
-
setExtensions(defaultExtensions);
|
|
363
|
-
} catch (err) {
|
|
364
|
-
setError(err instanceof Error ? err.message : "Failed to load extensions");
|
|
365
|
-
} finally {
|
|
366
|
-
setIsLoading(false);
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
loadExtensions2();
|
|
370
|
-
}, [appId, loadOnMount]);
|
|
371
|
-
return {
|
|
372
|
-
extensions,
|
|
373
|
-
manifest,
|
|
374
|
-
isLoading,
|
|
375
|
-
error,
|
|
376
|
-
loadExtension,
|
|
377
|
-
loadExtensions,
|
|
378
|
-
getExtensionForFile
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
var log4 = logger.createLogger("almadar:ui:file-editor");
|
|
382
|
-
function useFileEditor(options) {
|
|
383
|
-
const { extensions, fileSystem, onSchemaUpdate } = options;
|
|
384
|
-
const [openFiles, setOpenFiles] = react.useState([]);
|
|
385
|
-
const [activeFilePath, setActiveFilePath] = react.useState(null);
|
|
386
|
-
const [isSaving, setIsSaving] = react.useState(false);
|
|
387
|
-
const activeFile = openFiles.find((f) => f.path === activeFilePath) || null;
|
|
388
|
-
const openFile = react.useCallback(async (path) => {
|
|
389
|
-
const existing = openFiles.find((f) => f.path === path);
|
|
390
|
-
if (existing) {
|
|
391
|
-
setActiveFilePath(path);
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
try {
|
|
395
|
-
const content = await fileSystem.readFile(path);
|
|
396
|
-
const ext = extensions.getExtensionForFile(path);
|
|
397
|
-
const newFile = {
|
|
398
|
-
path,
|
|
399
|
-
content,
|
|
400
|
-
isDirty: false,
|
|
401
|
-
language: ext?.language
|
|
402
|
-
};
|
|
403
|
-
setOpenFiles((prev) => [...prev, newFile]);
|
|
404
|
-
setActiveFilePath(path);
|
|
405
|
-
} catch (err) {
|
|
406
|
-
log4.error("Failed to open file", { error: err instanceof Error ? err : String(err) });
|
|
407
|
-
}
|
|
408
|
-
}, [openFiles, fileSystem, extensions]);
|
|
409
|
-
const closeFile = react.useCallback((path) => {
|
|
410
|
-
setOpenFiles((prev) => prev.filter((f) => f.path !== path));
|
|
411
|
-
if (activeFilePath === path) {
|
|
412
|
-
const remaining = openFiles.filter((f) => f.path !== path);
|
|
413
|
-
setActiveFilePath(remaining.length > 0 ? remaining[0].path : null);
|
|
414
|
-
}
|
|
415
|
-
}, [activeFilePath, openFiles]);
|
|
416
|
-
const setActiveFile = react.useCallback((path) => {
|
|
417
|
-
setActiveFilePath(path);
|
|
418
|
-
}, []);
|
|
419
|
-
const updateFileContent = react.useCallback((path, content) => {
|
|
420
|
-
setOpenFiles(
|
|
421
|
-
(prev) => prev.map(
|
|
422
|
-
(f) => f.path === path ? { ...f, content, isDirty: true } : f
|
|
423
|
-
)
|
|
424
|
-
);
|
|
425
|
-
}, []);
|
|
426
|
-
const handleFileEdit = react.useCallback(async (path, content) => {
|
|
427
|
-
try {
|
|
428
|
-
await fileSystem.writeFile(path, content);
|
|
429
|
-
let action = "saved";
|
|
430
|
-
if (path.endsWith(".orb") || path.endsWith("schema.json")) {
|
|
431
|
-
try {
|
|
432
|
-
const schema = JSON.parse(content);
|
|
433
|
-
await onSchemaUpdate?.(schema);
|
|
434
|
-
action = "updated_schema";
|
|
435
|
-
} catch {
|
|
436
|
-
}
|
|
437
|
-
} else if (path.includes("/extensions/")) {
|
|
438
|
-
action = path.endsWith(".new") ? "converted_extension" : "saved_extension";
|
|
439
|
-
}
|
|
440
|
-
return { success: true, action };
|
|
441
|
-
} catch (err) {
|
|
442
|
-
return {
|
|
443
|
-
success: false,
|
|
444
|
-
error: err instanceof Error ? err.message : "Failed to save file"
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
}, [fileSystem, onSchemaUpdate]);
|
|
448
|
-
const saveFile = react.useCallback(async (path) => {
|
|
449
|
-
const file = openFiles.find((f) => f.path === path);
|
|
450
|
-
if (!file) return;
|
|
451
|
-
setIsSaving(true);
|
|
452
|
-
try {
|
|
453
|
-
await fileSystem.writeFile(path, file.content);
|
|
454
|
-
setOpenFiles(
|
|
455
|
-
(prev) => prev.map(
|
|
456
|
-
(f) => f.path === path ? { ...f, isDirty: false } : f
|
|
457
|
-
)
|
|
458
|
-
);
|
|
459
|
-
if (path.endsWith(".orb") || path.endsWith("schema.json")) {
|
|
460
|
-
try {
|
|
461
|
-
const schema = JSON.parse(file.content);
|
|
462
|
-
await onSchemaUpdate?.(schema);
|
|
463
|
-
} catch {
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
} catch (err) {
|
|
467
|
-
log4.error("Failed to save file", { error: err instanceof Error ? err : String(err) });
|
|
468
|
-
} finally {
|
|
469
|
-
setIsSaving(false);
|
|
470
|
-
}
|
|
471
|
-
}, [openFiles, fileSystem, onSchemaUpdate]);
|
|
472
|
-
const saveAllFiles = react.useCallback(async () => {
|
|
473
|
-
setIsSaving(true);
|
|
474
|
-
try {
|
|
475
|
-
const dirtyFiles = openFiles.filter((f) => f.isDirty);
|
|
476
|
-
for (const file of dirtyFiles) {
|
|
477
|
-
await saveFile(file.path);
|
|
478
|
-
}
|
|
479
|
-
} finally {
|
|
480
|
-
setIsSaving(false);
|
|
481
|
-
}
|
|
482
|
-
}, [openFiles, saveFile]);
|
|
483
|
-
return {
|
|
484
|
-
openFiles,
|
|
485
|
-
activeFile,
|
|
486
|
-
isSaving,
|
|
487
|
-
openFile,
|
|
488
|
-
closeFile,
|
|
489
|
-
setActiveFile,
|
|
490
|
-
updateFileContent,
|
|
491
|
-
handleFileEdit,
|
|
492
|
-
saveFile,
|
|
493
|
-
saveAllFiles
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
var log5 = logger.createLogger("almadar:ui:compile");
|
|
497
|
-
function useCompile() {
|
|
498
|
-
const [isCompiling, setIsCompiling] = react.useState(false);
|
|
499
|
-
const [stage, setStage] = react.useState("idle");
|
|
500
|
-
const [lastResult, setLastResult] = react.useState(null);
|
|
501
|
-
const [error, setError] = react.useState(null);
|
|
502
|
-
const compileSchema = react.useCallback(async (schema) => {
|
|
503
|
-
setIsCompiling(true);
|
|
504
|
-
setStage("compiling");
|
|
505
|
-
setError(null);
|
|
506
|
-
try {
|
|
507
|
-
log5.debug("Compiling schema", { name: schema.name });
|
|
508
|
-
const result = {
|
|
509
|
-
success: true,
|
|
510
|
-
files: []
|
|
511
|
-
};
|
|
512
|
-
setLastResult(result);
|
|
513
|
-
setStage("done");
|
|
514
|
-
return result;
|
|
515
|
-
} catch (err) {
|
|
516
|
-
const errorMessage = err instanceof Error ? err.message : "Compilation failed";
|
|
517
|
-
setError(errorMessage);
|
|
518
|
-
setStage("error");
|
|
519
|
-
setLastResult({ success: false, errors: [errorMessage] });
|
|
520
|
-
return null;
|
|
521
|
-
} finally {
|
|
522
|
-
setIsCompiling(false);
|
|
523
|
-
}
|
|
524
|
-
}, []);
|
|
525
|
-
return {
|
|
526
|
-
isCompiling,
|
|
527
|
-
stage,
|
|
528
|
-
lastResult,
|
|
529
|
-
error,
|
|
530
|
-
compileSchema
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
var log6 = logger.createLogger("almadar:ui:preview");
|
|
534
|
-
function usePreview(options) {
|
|
535
|
-
const [previewUrl, setPreviewUrl] = react.useState(null);
|
|
536
|
-
const [isLoading, setIsLoading] = react.useState(!!options?.appId);
|
|
537
|
-
const [error, setError] = react.useState(null);
|
|
538
|
-
const [loadError, setLoadError] = react.useState(null);
|
|
539
|
-
const [app, setApp] = react.useState(null);
|
|
540
|
-
const [isFullscreen, setIsFullscreen] = react.useState(false);
|
|
541
|
-
const [isExecutingEvent, setIsExecutingEvent] = react.useState(false);
|
|
542
|
-
const [errorToast, setErrorToast] = react.useState(null);
|
|
543
|
-
const [currentStateName, setCurrentStateName] = react.useState(null);
|
|
544
|
-
const [notificationsList, setNotificationsList] = react.useState([]);
|
|
545
|
-
const [isPanelOpen, setIsPanelOpen] = react.useState(false);
|
|
546
|
-
const notifications = react.useMemo(() => ({
|
|
547
|
-
notifications: notificationsList,
|
|
548
|
-
isPanelOpen,
|
|
549
|
-
closePanel: () => setIsPanelOpen(false),
|
|
550
|
-
dismissNotification: (id) => {
|
|
551
|
-
setNotificationsList((prev) => prev.filter((n) => n.id !== id));
|
|
552
|
-
},
|
|
553
|
-
markAsRead: (id) => {
|
|
554
|
-
setNotificationsList(
|
|
555
|
-
(prev) => prev.map((n) => n.id === id ? { ...n, read: true } : n)
|
|
556
|
-
);
|
|
557
|
-
},
|
|
558
|
-
clearAll: () => setNotificationsList([])
|
|
559
|
-
}), [notificationsList, isPanelOpen]);
|
|
560
|
-
react.useEffect(() => {
|
|
561
|
-
const appId = options?.appId;
|
|
562
|
-
if (!appId) {
|
|
563
|
-
setApp(null);
|
|
564
|
-
setIsLoading(false);
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
log6.debug("Setting up preview for app", { appId });
|
|
568
|
-
setPreviewUrl(`/api/orbitals/${appId}`);
|
|
569
|
-
setIsLoading(false);
|
|
570
|
-
}, [options?.appId]);
|
|
571
|
-
const startPreview = react.useCallback(async () => {
|
|
572
|
-
log6.debug("startPreview called");
|
|
573
|
-
}, []);
|
|
574
|
-
const stopPreview = react.useCallback(async () => {
|
|
575
|
-
setIsLoading(true);
|
|
576
|
-
try {
|
|
577
|
-
log6.debug("Stopping preview server");
|
|
578
|
-
setPreviewUrl(null);
|
|
579
|
-
setApp(null);
|
|
580
|
-
} finally {
|
|
581
|
-
setIsLoading(false);
|
|
582
|
-
}
|
|
583
|
-
}, []);
|
|
584
|
-
const refresh = react.useCallback(async () => {
|
|
585
|
-
if (!previewUrl) return;
|
|
586
|
-
log6.debug("Refreshing preview");
|
|
587
|
-
setPreviewUrl(`${previewUrl.split("?")[0]}?t=${Date.now()}`);
|
|
588
|
-
}, [previewUrl]);
|
|
589
|
-
const handleRefresh = react.useCallback(async () => {
|
|
590
|
-
log6.debug("Handle refresh");
|
|
591
|
-
await refresh();
|
|
592
|
-
}, [refresh]);
|
|
593
|
-
const handleReset = react.useCallback(async () => {
|
|
594
|
-
log6.debug("Resetting preview");
|
|
595
|
-
setError(null);
|
|
596
|
-
setLoadError(null);
|
|
597
|
-
setErrorToast(null);
|
|
598
|
-
setIsExecutingEvent(false);
|
|
599
|
-
setCurrentStateName(null);
|
|
600
|
-
}, []);
|
|
601
|
-
const toggleFullscreen = react.useCallback(() => {
|
|
602
|
-
setIsFullscreen((prev) => !prev);
|
|
603
|
-
}, []);
|
|
604
|
-
const dismissErrorToast = react.useCallback(() => {
|
|
605
|
-
setErrorToast(null);
|
|
606
|
-
}, []);
|
|
607
|
-
return {
|
|
608
|
-
previewUrl,
|
|
609
|
-
isLoading,
|
|
610
|
-
error,
|
|
611
|
-
loadError,
|
|
612
|
-
app,
|
|
613
|
-
isFullscreen,
|
|
614
|
-
isExecutingEvent,
|
|
615
|
-
errorToast,
|
|
616
|
-
currentStateName,
|
|
617
|
-
notifications,
|
|
618
|
-
startPreview,
|
|
619
|
-
stopPreview,
|
|
620
|
-
refresh,
|
|
621
|
-
handleRefresh,
|
|
622
|
-
handleReset,
|
|
623
|
-
toggleFullscreen,
|
|
624
|
-
setErrorToast,
|
|
625
|
-
dismissErrorToast
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
var log7 = logger.createLogger("almadar:ui:agent-chat");
|
|
629
|
-
function useAgentChat(options) {
|
|
630
|
-
const [messages, setMessages] = react.useState([]);
|
|
631
|
-
const [status, setStatus] = react.useState("idle");
|
|
632
|
-
const [activities, setActivities] = react.useState([]);
|
|
633
|
-
const [todos, setTodos] = react.useState([]);
|
|
634
|
-
const [schemaDiffs, setSchemaDiffs] = react.useState([]);
|
|
635
|
-
const [isLoading, setIsLoading] = react.useState(false);
|
|
636
|
-
const [error, setError] = react.useState(null);
|
|
637
|
-
const [threadId] = react.useState(null);
|
|
638
|
-
const [interrupt, setInterrupt] = react.useState(null);
|
|
639
|
-
const sendMessage = react.useCallback(async (content) => {
|
|
640
|
-
setIsLoading(true);
|
|
641
|
-
setStatus("running");
|
|
642
|
-
setError(null);
|
|
643
|
-
try {
|
|
644
|
-
const userMessage = {
|
|
645
|
-
id: Date.now().toString(),
|
|
646
|
-
role: "user",
|
|
647
|
-
content,
|
|
648
|
-
timestamp: Date.now()
|
|
649
|
-
};
|
|
650
|
-
setMessages((prev) => [...prev, userMessage]);
|
|
651
|
-
log7.debug("Sending message", { content });
|
|
652
|
-
const assistantMessage = {
|
|
653
|
-
id: (Date.now() + 1).toString(),
|
|
654
|
-
role: "assistant",
|
|
655
|
-
content: "Agent chat is not yet implemented.",
|
|
656
|
-
timestamp: Date.now()
|
|
657
|
-
};
|
|
658
|
-
setMessages((prev) => [...prev, assistantMessage]);
|
|
659
|
-
setStatus("idle");
|
|
660
|
-
options?.onComplete?.();
|
|
661
|
-
} catch (err) {
|
|
662
|
-
setError(err instanceof Error ? err.message : "Failed to send message");
|
|
663
|
-
setStatus("error");
|
|
664
|
-
} finally {
|
|
665
|
-
setIsLoading(false);
|
|
666
|
-
}
|
|
667
|
-
}, [options]);
|
|
668
|
-
const startGeneration = react.useCallback(async (skill, prompt, genOptions) => {
|
|
669
|
-
setStatus("running");
|
|
670
|
-
setIsLoading(true);
|
|
671
|
-
setError(null);
|
|
672
|
-
const skillName = Array.isArray(skill) ? skill[0] : skill;
|
|
673
|
-
try {
|
|
674
|
-
log7.debug("Starting generation", () => ({ skillName, prompt, genOptions: JSON.stringify(genOptions) }));
|
|
675
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
676
|
-
setStatus("complete");
|
|
677
|
-
options?.onComplete?.();
|
|
678
|
-
} catch (err) {
|
|
679
|
-
setError(err instanceof Error ? err.message : "Generation failed");
|
|
680
|
-
setStatus("error");
|
|
681
|
-
} finally {
|
|
682
|
-
setIsLoading(false);
|
|
683
|
-
}
|
|
684
|
-
}, [options]);
|
|
685
|
-
const continueConversation = react.useCallback(async (message) => {
|
|
686
|
-
log7.debug("Continue conversation", { message: Array.isArray(message) ? message : [message] });
|
|
687
|
-
}, []);
|
|
688
|
-
const resumeWithDecision = react.useCallback(async (decisions) => {
|
|
689
|
-
log7.debug("Resume with decision", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
|
|
690
|
-
setInterrupt(null);
|
|
691
|
-
}, []);
|
|
692
|
-
const cancel = react.useCallback(() => {
|
|
693
|
-
setStatus("idle");
|
|
694
|
-
setIsLoading(false);
|
|
695
|
-
setInterrupt(null);
|
|
696
|
-
}, []);
|
|
697
|
-
const clearMessages = react.useCallback(() => {
|
|
698
|
-
setMessages([]);
|
|
699
|
-
}, []);
|
|
700
|
-
const clearHistory = react.useCallback(() => {
|
|
701
|
-
setMessages([]);
|
|
702
|
-
setActivities([]);
|
|
703
|
-
setTodos([]);
|
|
704
|
-
setSchemaDiffs([]);
|
|
705
|
-
setError(null);
|
|
706
|
-
}, []);
|
|
707
|
-
return {
|
|
708
|
-
messages,
|
|
709
|
-
status,
|
|
710
|
-
activities,
|
|
711
|
-
todos,
|
|
712
|
-
schemaDiffs,
|
|
713
|
-
isLoading,
|
|
714
|
-
error,
|
|
715
|
-
threadId,
|
|
716
|
-
interrupt,
|
|
717
|
-
sendMessage,
|
|
718
|
-
startGeneration,
|
|
719
|
-
continueConversation,
|
|
720
|
-
resumeWithDecision,
|
|
721
|
-
cancel,
|
|
722
|
-
clearMessages,
|
|
723
|
-
clearHistory
|
|
724
|
-
};
|
|
725
|
-
}
|
|
726
|
-
var log8 = logger.createLogger("almadar:ui:validation");
|
|
727
|
-
function useValidation() {
|
|
728
|
-
const [result, setResult] = react.useState(null);
|
|
729
|
-
const [isValidating, setIsValidating] = react.useState(false);
|
|
730
|
-
const [error, setError] = react.useState(null);
|
|
731
|
-
const [stage, setStage] = react.useState("idle");
|
|
732
|
-
const [isFixing, setIsFixing] = react.useState(false);
|
|
733
|
-
const [progressMessage, setProgressMessage] = react.useState(null);
|
|
734
|
-
const validate = react.useCallback(async (appId) => {
|
|
735
|
-
setIsValidating(true);
|
|
736
|
-
setError(null);
|
|
737
|
-
setStage("validating");
|
|
738
|
-
setProgressMessage("Validating schema...");
|
|
739
|
-
try {
|
|
740
|
-
log8.debug("Validating app", { appId });
|
|
741
|
-
const validationResult = {
|
|
742
|
-
valid: true,
|
|
743
|
-
errors: [],
|
|
744
|
-
warnings: []
|
|
745
|
-
};
|
|
746
|
-
setResult(validationResult);
|
|
747
|
-
setStage("complete");
|
|
748
|
-
setProgressMessage(null);
|
|
749
|
-
return validationResult;
|
|
750
|
-
} catch (err) {
|
|
751
|
-
const errorMessage = err instanceof Error ? err.message : "Validation failed";
|
|
752
|
-
setError(errorMessage);
|
|
753
|
-
const failedResult = {
|
|
754
|
-
valid: false,
|
|
755
|
-
errors: [{ code: "VALIDATION_ERROR", message: errorMessage, severity: "error" }],
|
|
756
|
-
warnings: []
|
|
757
|
-
};
|
|
758
|
-
setResult(failedResult);
|
|
759
|
-
setStage("complete");
|
|
760
|
-
setProgressMessage(null);
|
|
761
|
-
return failedResult;
|
|
762
|
-
} finally {
|
|
763
|
-
setIsValidating(false);
|
|
764
|
-
}
|
|
765
|
-
}, []);
|
|
766
|
-
const clearResult = react.useCallback(() => {
|
|
767
|
-
setResult(null);
|
|
768
|
-
setError(null);
|
|
769
|
-
}, []);
|
|
770
|
-
const reset = react.useCallback(() => {
|
|
771
|
-
setResult(null);
|
|
772
|
-
setError(null);
|
|
773
|
-
setStage("idle");
|
|
774
|
-
setIsFixing(false);
|
|
775
|
-
setProgressMessage(null);
|
|
776
|
-
setIsValidating(false);
|
|
777
|
-
}, []);
|
|
778
|
-
return {
|
|
779
|
-
result,
|
|
780
|
-
isValidating,
|
|
781
|
-
error,
|
|
782
|
-
stage,
|
|
783
|
-
isFixing,
|
|
784
|
-
progressMessage,
|
|
785
|
-
errors: result?.errors ?? [],
|
|
786
|
-
warnings: result?.warnings ?? [],
|
|
787
|
-
isValid: result?.valid ?? false,
|
|
788
|
-
validate,
|
|
789
|
-
clearResult,
|
|
790
|
-
reset
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
var log9 = logger.createLogger("almadar:ui:deep-agent");
|
|
794
|
-
function useDeepAgentGeneration() {
|
|
795
|
-
const [requests, setRequests] = react.useState([]);
|
|
796
|
-
const [currentRequest, setCurrentRequest] = react.useState(null);
|
|
797
|
-
const [isGenerating, setIsGenerating] = react.useState(false);
|
|
798
|
-
const [isLoading, setIsLoading] = react.useState(false);
|
|
799
|
-
const [isComplete, setIsComplete] = react.useState(false);
|
|
800
|
-
const [progress, setProgress] = react.useState({ stage: "idle", percent: 0, message: "" });
|
|
801
|
-
const [error, setError] = react.useState(null);
|
|
802
|
-
const [interrupt, setInterrupt] = react.useState(null);
|
|
803
|
-
const generate = react.useCallback(async (prompt) => {
|
|
804
|
-
setIsGenerating(true);
|
|
805
|
-
setIsLoading(true);
|
|
806
|
-
setIsComplete(false);
|
|
807
|
-
setError(null);
|
|
808
|
-
setProgress({ stage: "starting", percent: 0, message: "Starting generation..." });
|
|
809
|
-
const request = {
|
|
810
|
-
id: Date.now().toString(),
|
|
811
|
-
prompt,
|
|
812
|
-
status: "running"
|
|
813
|
-
};
|
|
814
|
-
setCurrentRequest(request);
|
|
815
|
-
setRequests((prev) => [...prev, request]);
|
|
816
|
-
try {
|
|
817
|
-
log9.debug("Generating from prompt", { prompt });
|
|
818
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
819
|
-
request.status = "completed";
|
|
820
|
-
setCurrentRequest(request);
|
|
821
|
-
setIsComplete(true);
|
|
822
|
-
setProgress({ stage: "complete", percent: 100, message: "Generation complete" });
|
|
823
|
-
return null;
|
|
824
|
-
} catch (err) {
|
|
825
|
-
const errorMessage = err instanceof Error ? err.message : "Generation failed";
|
|
826
|
-
setError(errorMessage);
|
|
827
|
-
request.status = "failed";
|
|
828
|
-
request.error = errorMessage;
|
|
829
|
-
setCurrentRequest(request);
|
|
830
|
-
return null;
|
|
831
|
-
} finally {
|
|
832
|
-
setIsGenerating(false);
|
|
833
|
-
setIsLoading(false);
|
|
834
|
-
}
|
|
835
|
-
}, []);
|
|
836
|
-
const startGeneration = react.useCallback(async (skill, prompt, _options) => {
|
|
837
|
-
log9.debug("Starting generation with skill", { skill });
|
|
838
|
-
await generate(prompt);
|
|
839
|
-
}, [generate]);
|
|
840
|
-
const cancelGeneration = react.useCallback(() => {
|
|
841
|
-
if (currentRequest) {
|
|
842
|
-
currentRequest.status = "failed";
|
|
843
|
-
currentRequest.error = "Cancelled by user";
|
|
844
|
-
setCurrentRequest(null);
|
|
845
|
-
}
|
|
846
|
-
setIsGenerating(false);
|
|
847
|
-
setIsLoading(false);
|
|
848
|
-
setIsComplete(false);
|
|
849
|
-
setProgress({ stage: "idle", percent: 0, message: "" });
|
|
850
|
-
}, [currentRequest]);
|
|
851
|
-
const clearRequests = react.useCallback(() => {
|
|
852
|
-
setRequests([]);
|
|
853
|
-
setCurrentRequest(null);
|
|
854
|
-
setError(null);
|
|
855
|
-
setProgress({ stage: "idle", percent: 0, message: "" });
|
|
856
|
-
setIsComplete(false);
|
|
857
|
-
}, []);
|
|
858
|
-
const submitInterruptDecisions = react.useCallback((decisions) => {
|
|
859
|
-
log9.debug("Submitting interrupt decisions", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
|
|
860
|
-
setInterrupt(null);
|
|
861
|
-
}, []);
|
|
862
|
-
return {
|
|
863
|
-
requests,
|
|
864
|
-
currentRequest,
|
|
865
|
-
isGenerating,
|
|
866
|
-
isLoading,
|
|
867
|
-
isComplete,
|
|
868
|
-
progress,
|
|
869
|
-
error,
|
|
870
|
-
interrupt,
|
|
871
|
-
generate,
|
|
872
|
-
startGeneration,
|
|
873
|
-
cancelGeneration,
|
|
874
|
-
clearRequests,
|
|
875
|
-
submitInterruptDecisions
|
|
876
|
-
};
|
|
877
|
-
}
|
|
878
|
-
var log10 = logger.createLogger("almadar:eventbus");
|
|
879
|
-
var subLog = logger.createLogger("almadar:eventbus:subscribe");
|
|
880
|
-
var scopeLog = logger.createLogger("almadar:ui:trait-scope");
|
|
881
|
-
function getGlobalEventBus() {
|
|
882
|
-
if (typeof window !== "undefined") {
|
|
883
|
-
return window.__kflowEventBus ?? null;
|
|
884
|
-
}
|
|
885
|
-
return null;
|
|
886
|
-
}
|
|
887
|
-
var fallbackListeners = /* @__PURE__ */ new Map();
|
|
888
|
-
var fallbackAnyListeners = /* @__PURE__ */ new Set();
|
|
889
|
-
var fallbackEventBus = {
|
|
890
|
-
emit: (type, payload, source) => {
|
|
891
|
-
const event = {
|
|
892
|
-
type,
|
|
893
|
-
payload,
|
|
894
|
-
timestamp: Date.now(),
|
|
895
|
-
source
|
|
896
|
-
};
|
|
897
|
-
const handlers = fallbackListeners.get(type);
|
|
898
|
-
log10.debug("emit", { type, payloadKeys: payload ? Object.keys(payload).length : 0, listenerCount: (handlers?.size ?? 0) + fallbackAnyListeners.size });
|
|
899
|
-
if (handlers) {
|
|
900
|
-
handlers.forEach((handler) => {
|
|
901
|
-
try {
|
|
902
|
-
handler(event);
|
|
903
|
-
} catch (error) {
|
|
904
|
-
log10.error("Error in listener", { type, error: error instanceof Error ? error : String(error) });
|
|
905
|
-
}
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
fallbackAnyListeners.forEach((handler) => {
|
|
909
|
-
try {
|
|
910
|
-
handler(event);
|
|
911
|
-
} catch (error) {
|
|
912
|
-
log10.error("Error in onAny listener", { type, error: error instanceof Error ? error : String(error) });
|
|
913
|
-
}
|
|
914
|
-
});
|
|
915
|
-
},
|
|
916
|
-
on: (type, listener) => {
|
|
917
|
-
if (!fallbackListeners.has(type)) {
|
|
918
|
-
fallbackListeners.set(type, /* @__PURE__ */ new Set());
|
|
919
|
-
}
|
|
920
|
-
fallbackListeners.get(type).add(listener);
|
|
921
|
-
subLog.debug("subscribe", { type, totalListeners: fallbackListeners.get(type).size });
|
|
922
|
-
return () => {
|
|
923
|
-
const handlers = fallbackListeners.get(type);
|
|
924
|
-
if (handlers) {
|
|
925
|
-
handlers.delete(listener);
|
|
926
|
-
if (handlers.size === 0) {
|
|
927
|
-
fallbackListeners.delete(type);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
|
-
},
|
|
932
|
-
once: (type, listener) => {
|
|
933
|
-
const wrappedListener = (event) => {
|
|
934
|
-
fallbackListeners.get(type)?.delete(wrappedListener);
|
|
935
|
-
listener(event);
|
|
936
|
-
};
|
|
937
|
-
return fallbackEventBus.on(type, wrappedListener);
|
|
938
|
-
},
|
|
939
|
-
hasListeners: (type) => {
|
|
940
|
-
const handlers = fallbackListeners.get(type);
|
|
941
|
-
return handlers !== void 0 && handlers.size > 0;
|
|
942
|
-
},
|
|
943
|
-
onAny: (listener) => {
|
|
944
|
-
fallbackAnyListeners.add(listener);
|
|
945
|
-
subLog.debug("subscribe:any", { totalAnyListeners: fallbackAnyListeners.size });
|
|
946
|
-
return () => {
|
|
947
|
-
fallbackAnyListeners.delete(listener);
|
|
948
|
-
};
|
|
949
|
-
}
|
|
950
|
-
};
|
|
951
|
-
function useEventBus() {
|
|
952
|
-
const context = react.useContext(providers.EventBusContext);
|
|
953
|
-
const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
|
|
954
|
-
const scope = providers.useTraitScope();
|
|
955
|
-
return react.useMemo(() => {
|
|
956
|
-
if (!scope) {
|
|
957
|
-
return {
|
|
958
|
-
...baseBus,
|
|
959
|
-
emit: (type, payload, source) => {
|
|
960
|
-
if (typeof type === "string" && type.startsWith("UI:") && !type.slice(3).includes(".")) {
|
|
961
|
-
scopeLog.warn("emit:bare-key-no-scope", { type });
|
|
962
|
-
}
|
|
963
|
-
baseBus.emit(type, payload, source);
|
|
964
|
-
}
|
|
965
|
-
};
|
|
966
|
-
}
|
|
967
|
-
return {
|
|
968
|
-
...baseBus,
|
|
969
|
-
emit: (type, payload, source) => {
|
|
970
|
-
if (typeof type === "string" && type.startsWith("UI:")) {
|
|
971
|
-
const tail = type.slice(3);
|
|
972
|
-
const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
|
|
973
|
-
if (qualified !== type) {
|
|
974
|
-
scopeLog.info("emit:qualified", {
|
|
975
|
-
from: type,
|
|
976
|
-
to: qualified,
|
|
977
|
-
scopeOrbital: scope.orbital,
|
|
978
|
-
scopeTrait: scope.trait
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
baseBus.emit(qualified, payload, source);
|
|
982
|
-
return;
|
|
983
|
-
}
|
|
984
|
-
baseBus.emit(type, payload, source);
|
|
985
|
-
}
|
|
986
|
-
};
|
|
987
|
-
}, [baseBus, scope]);
|
|
988
|
-
}
|
|
989
|
-
function useEventListener(event, handler) {
|
|
990
|
-
const eventBus = useEventBus();
|
|
991
|
-
const handlerRef = react.useRef(handler);
|
|
992
|
-
handlerRef.current = handler;
|
|
993
|
-
react.useEffect(() => {
|
|
994
|
-
const wrappedHandler = (evt) => {
|
|
995
|
-
handlerRef.current(evt);
|
|
996
|
-
};
|
|
997
|
-
const unsub = eventBus.on(event, wrappedHandler);
|
|
998
|
-
return () => {
|
|
999
|
-
if (typeof unsub === "function") unsub();
|
|
1000
|
-
};
|
|
1001
|
-
}, [event, eventBus]);
|
|
1002
|
-
}
|
|
1003
|
-
function useEmitEvent() {
|
|
1004
|
-
const eventBus = useEventBus();
|
|
1005
|
-
return react.useCallback(
|
|
1006
|
-
(type, payload, source) => {
|
|
1007
|
-
eventBus.emit(type, payload, source);
|
|
1008
|
-
},
|
|
1009
|
-
[eventBus]
|
|
1010
|
-
);
|
|
1011
|
-
}
|
|
1012
|
-
var log11 = logger.createLogger("almadar:ui:ui-slots");
|
|
1013
|
-
var DEFAULT_SOURCE_KEY = "__default__";
|
|
1014
|
-
var MULTI_SOURCE_STACK_TRAIT = "__multi_source_stack__";
|
|
1015
|
-
var ALL_SLOTS = [
|
|
1016
|
-
"main",
|
|
1017
|
-
"sidebar",
|
|
1018
|
-
"modal",
|
|
1019
|
-
"drawer",
|
|
1020
|
-
"overlay",
|
|
1021
|
-
"center",
|
|
1022
|
-
"toast",
|
|
1023
|
-
"hud-top",
|
|
1024
|
-
"hud-bottom",
|
|
1025
|
-
"floating"
|
|
1026
|
-
];
|
|
1027
|
-
var DEFAULT_SLOTS = ALL_SLOTS.reduce(
|
|
1028
|
-
(acc, slot) => {
|
|
1029
|
-
acc[slot] = null;
|
|
1030
|
-
return acc;
|
|
1031
|
-
},
|
|
1032
|
-
{}
|
|
1033
|
-
);
|
|
1034
|
-
var DEFAULT_SOURCES = ALL_SLOTS.reduce(
|
|
1035
|
-
(acc, slot) => {
|
|
1036
|
-
acc[slot] = {};
|
|
1037
|
-
return acc;
|
|
1038
|
-
},
|
|
1039
|
-
{}
|
|
1040
|
-
);
|
|
1041
|
-
function aggregateSlot(sources) {
|
|
1042
|
-
if (!sources) return null;
|
|
1043
|
-
const entries = Object.entries(sources);
|
|
1044
|
-
if (entries.length === 0) return null;
|
|
1045
|
-
if (entries.length === 1) return entries[0][1];
|
|
1046
|
-
const children = entries.map(([, entry]) => ({
|
|
1047
|
-
type: entry.pattern,
|
|
1048
|
-
...entry.props
|
|
1049
|
-
}));
|
|
1050
|
-
const stackId = `slot-content-stack-${entries.map(([k]) => k).join("-")}`;
|
|
1051
|
-
return {
|
|
1052
|
-
id: stackId,
|
|
1053
|
-
pattern: "stack",
|
|
1054
|
-
props: {
|
|
1055
|
-
direction: "vertical",
|
|
1056
|
-
gap: "lg",
|
|
1057
|
-
children
|
|
1058
|
-
},
|
|
1059
|
-
priority: 0,
|
|
1060
|
-
animation: "fade",
|
|
1061
|
-
sourceTrait: MULTI_SOURCE_STACK_TRAIT
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
function useUISlotManager() {
|
|
1065
|
-
const [sources, setSources] = react.useState(DEFAULT_SOURCES);
|
|
1066
|
-
const subscribersRef = react.useRef(/* @__PURE__ */ new Set());
|
|
1067
|
-
const timersRef = react.useRef(/* @__PURE__ */ new Map());
|
|
1068
|
-
const traitIndexRef = react.useRef(/* @__PURE__ */ new Map());
|
|
1069
|
-
const traitSubscribersRef = react.useRef(/* @__PURE__ */ new Map());
|
|
1070
|
-
const slots = react.useMemo(() => {
|
|
1071
|
-
const out = { ...DEFAULT_SLOTS };
|
|
1072
|
-
for (const slot of ALL_SLOTS) {
|
|
1073
|
-
out[slot] = aggregateSlot(sources[slot]);
|
|
1074
|
-
}
|
|
1075
|
-
return out;
|
|
1076
|
-
}, [sources]);
|
|
1077
|
-
react.useEffect(() => {
|
|
1078
|
-
return () => {
|
|
1079
|
-
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
1080
|
-
timersRef.current.clear();
|
|
1081
|
-
};
|
|
1082
|
-
}, []);
|
|
1083
|
-
const notifySubscribers = react.useCallback((slot, content) => {
|
|
1084
|
-
subscribersRef.current.forEach((callback) => {
|
|
1085
|
-
try {
|
|
1086
|
-
callback(slot, content);
|
|
1087
|
-
} catch (error) {
|
|
1088
|
-
log11.error("Subscriber error", { error: error instanceof Error ? error : String(error) });
|
|
1089
|
-
}
|
|
1090
|
-
});
|
|
1091
|
-
}, []);
|
|
1092
|
-
const notifyTraitSubscribers = react.useCallback(
|
|
1093
|
-
(traitName, content) => {
|
|
1094
|
-
const subs = traitSubscribersRef.current.get(traitName);
|
|
1095
|
-
if (!subs) return;
|
|
1096
|
-
subs.forEach((callback) => {
|
|
1097
|
-
try {
|
|
1098
|
-
callback(content);
|
|
1099
|
-
} catch (error) {
|
|
1100
|
-
log11.error("Trait subscriber error", { traitName, error: error instanceof Error ? error : String(error) });
|
|
1101
|
-
}
|
|
1102
|
-
});
|
|
1103
|
-
},
|
|
1104
|
-
[]
|
|
1105
|
-
);
|
|
1106
|
-
const indexTraitRender = react.useCallback(
|
|
1107
|
-
(traitName, content) => {
|
|
1108
|
-
traitIndexRef.current.set(traitName, content);
|
|
1109
|
-
},
|
|
1110
|
-
[]
|
|
1111
|
-
);
|
|
1112
|
-
const unindexTrait = react.useCallback((traitName) => {
|
|
1113
|
-
traitIndexRef.current.delete(traitName);
|
|
1114
|
-
}, []);
|
|
1115
|
-
const render = react.useCallback(
|
|
1116
|
-
(config) => {
|
|
1117
|
-
const sourceKey = config.sourceTrait ?? DEFAULT_SOURCE_KEY;
|
|
1118
|
-
const id = `slot-content-${config.target}-${sourceKey}`;
|
|
1119
|
-
const content = {
|
|
1120
|
-
id,
|
|
1121
|
-
pattern: config.pattern,
|
|
1122
|
-
props: config.props ?? {},
|
|
1123
|
-
priority: config.priority ?? 0,
|
|
1124
|
-
animation: config.animation ?? "fade",
|
|
1125
|
-
onDismiss: config.onDismiss,
|
|
1126
|
-
sourceTrait: config.sourceTrait,
|
|
1127
|
-
slot: config.target,
|
|
1128
|
-
transitionEvent: config.transitionEvent,
|
|
1129
|
-
fromState: config.fromState,
|
|
1130
|
-
entity: config.entity
|
|
1131
|
-
};
|
|
1132
|
-
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
1133
|
-
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
1134
|
-
const prevTimer = timersRef.current.get(id);
|
|
1135
|
-
if (prevTimer) clearTimeout(prevTimer);
|
|
1136
|
-
const timer = setTimeout(() => {
|
|
1137
|
-
setSources((prev) => {
|
|
1138
|
-
const slotSources = prev[config.target];
|
|
1139
|
-
if (slotSources && slotSources[sourceKey] === content) {
|
|
1140
|
-
content.onDismiss?.();
|
|
1141
|
-
const next = { ...slotSources };
|
|
1142
|
-
delete next[sourceKey];
|
|
1143
|
-
const updated = { ...prev, [config.target]: next };
|
|
1144
|
-
notifySubscribers(config.target, aggregateSlot(next));
|
|
1145
|
-
return updated;
|
|
1146
|
-
}
|
|
1147
|
-
return prev;
|
|
1148
|
-
});
|
|
1149
|
-
timersRef.current.delete(id);
|
|
1150
|
-
}, config.autoDismissMs);
|
|
1151
|
-
timersRef.current.set(id, timer);
|
|
1152
|
-
}
|
|
1153
|
-
setSources((prev) => {
|
|
1154
|
-
const slotSources = prev[config.target] ?? {};
|
|
1155
|
-
const existing = slotSources[sourceKey];
|
|
1156
|
-
if (existing && existing.priority > content.priority) {
|
|
1157
|
-
log11.warn("Slot already has higher priority content", {
|
|
1158
|
-
slot: config.target,
|
|
1159
|
-
sourceKey,
|
|
1160
|
-
existingPriority: existing.priority,
|
|
1161
|
-
newPriority: content.priority
|
|
1162
|
-
});
|
|
1163
|
-
return prev;
|
|
1164
|
-
}
|
|
1165
|
-
const nextSources = {
|
|
1166
|
-
...slotSources,
|
|
1167
|
-
[sourceKey]: content
|
|
1168
|
-
};
|
|
1169
|
-
const nextAll = { ...prev, [config.target]: nextSources };
|
|
1170
|
-
if (content.sourceTrait) {
|
|
1171
|
-
indexTraitRender(content.sourceTrait, content);
|
|
1172
|
-
notifyTraitSubscribers(content.sourceTrait, content);
|
|
1173
|
-
}
|
|
1174
|
-
log11.info("slot:written", {
|
|
1175
|
-
slot: config.target,
|
|
1176
|
-
sourceKey,
|
|
1177
|
-
sourceTrait: content.sourceTrait,
|
|
1178
|
-
patternType: content.pattern,
|
|
1179
|
-
priority: content.priority
|
|
1180
|
-
});
|
|
1181
|
-
notifySubscribers(config.target, aggregateSlot(nextSources));
|
|
1182
|
-
return nextAll;
|
|
1183
|
-
});
|
|
1184
|
-
return id;
|
|
1185
|
-
},
|
|
1186
|
-
[notifySubscribers, notifyTraitSubscribers, indexTraitRender]
|
|
1187
|
-
);
|
|
1188
|
-
const clear = react.useCallback(
|
|
1189
|
-
(slot) => {
|
|
1190
|
-
setSources((prev) => {
|
|
1191
|
-
const slotSources = prev[slot];
|
|
1192
|
-
if (!slotSources || Object.keys(slotSources).length === 0) {
|
|
1193
|
-
return prev;
|
|
1194
|
-
}
|
|
1195
|
-
for (const content of Object.values(slotSources)) {
|
|
1196
|
-
const timer = timersRef.current.get(content.id);
|
|
1197
|
-
if (timer) {
|
|
1198
|
-
clearTimeout(timer);
|
|
1199
|
-
timersRef.current.delete(content.id);
|
|
1200
|
-
}
|
|
1201
|
-
content.onDismiss?.();
|
|
1202
|
-
if (content.sourceTrait) {
|
|
1203
|
-
unindexTrait(content.sourceTrait);
|
|
1204
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
notifySubscribers(slot, null);
|
|
1208
|
-
return { ...prev, [slot]: {} };
|
|
1209
|
-
});
|
|
1210
|
-
},
|
|
1211
|
-
[notifySubscribers, notifyTraitSubscribers, unindexTrait]
|
|
1212
|
-
);
|
|
1213
|
-
const clearBySource = react.useCallback(
|
|
1214
|
-
(slot, sourceTrait) => {
|
|
1215
|
-
const sourceKey = sourceTrait;
|
|
1216
|
-
setSources((prev) => {
|
|
1217
|
-
const slotSources = prev[slot];
|
|
1218
|
-
if (!slotSources || !(sourceKey in slotSources)) {
|
|
1219
|
-
log11.debug("slot:clear-noop", { slot, sourceTrait, reason: !slotSources ? "no-slot" : "no-source" });
|
|
1220
|
-
return prev;
|
|
1221
|
-
}
|
|
1222
|
-
const content = slotSources[sourceKey];
|
|
1223
|
-
const timer = timersRef.current.get(content.id);
|
|
1224
|
-
if (timer) {
|
|
1225
|
-
clearTimeout(timer);
|
|
1226
|
-
timersRef.current.delete(content.id);
|
|
1227
|
-
}
|
|
1228
|
-
content.onDismiss?.();
|
|
1229
|
-
if (content.sourceTrait) {
|
|
1230
|
-
unindexTrait(content.sourceTrait);
|
|
1231
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
1232
|
-
}
|
|
1233
|
-
const nextSources = { ...slotSources };
|
|
1234
|
-
delete nextSources[sourceKey];
|
|
1235
|
-
log11.info("slot:cleared", { slot, sourceTrait, lastPatternType: content.pattern });
|
|
1236
|
-
notifySubscribers(slot, aggregateSlot(nextSources));
|
|
1237
|
-
return { ...prev, [slot]: nextSources };
|
|
1238
|
-
});
|
|
1239
|
-
},
|
|
1240
|
-
[notifySubscribers, notifyTraitSubscribers, unindexTrait]
|
|
1241
|
-
);
|
|
1242
|
-
const clearById = react.useCallback(
|
|
1243
|
-
(id) => {
|
|
1244
|
-
setSources((prev) => {
|
|
1245
|
-
for (const slot of ALL_SLOTS) {
|
|
1246
|
-
const slotSources = prev[slot];
|
|
1247
|
-
if (!slotSources) continue;
|
|
1248
|
-
const matchKey = Object.keys(slotSources).find(
|
|
1249
|
-
(k) => slotSources[k].id === id
|
|
1250
|
-
);
|
|
1251
|
-
if (!matchKey) continue;
|
|
1252
|
-
const content = slotSources[matchKey];
|
|
1253
|
-
const timer = timersRef.current.get(id);
|
|
1254
|
-
if (timer) {
|
|
1255
|
-
clearTimeout(timer);
|
|
1256
|
-
timersRef.current.delete(id);
|
|
1257
|
-
}
|
|
1258
|
-
content.onDismiss?.();
|
|
1259
|
-
if (content.sourceTrait) {
|
|
1260
|
-
unindexTrait(content.sourceTrait);
|
|
1261
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
1262
|
-
}
|
|
1263
|
-
const nextSources = { ...slotSources };
|
|
1264
|
-
delete nextSources[matchKey];
|
|
1265
|
-
notifySubscribers(slot, aggregateSlot(nextSources));
|
|
1266
|
-
return { ...prev, [slot]: nextSources };
|
|
1267
|
-
}
|
|
1268
|
-
return prev;
|
|
1269
|
-
});
|
|
1270
|
-
},
|
|
1271
|
-
[notifySubscribers, notifyTraitSubscribers, unindexTrait]
|
|
1272
|
-
);
|
|
1273
|
-
const clearAll = react.useCallback(() => {
|
|
1274
|
-
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
1275
|
-
timersRef.current.clear();
|
|
1276
|
-
setSources((prev) => {
|
|
1277
|
-
for (const slot of ALL_SLOTS) {
|
|
1278
|
-
const slotSources = prev[slot];
|
|
1279
|
-
if (!slotSources) continue;
|
|
1280
|
-
for (const content of Object.values(slotSources)) {
|
|
1281
|
-
content.onDismiss?.();
|
|
1282
|
-
if (content.sourceTrait) {
|
|
1283
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
notifySubscribers(slot, null);
|
|
1287
|
-
}
|
|
1288
|
-
return DEFAULT_SOURCES;
|
|
1289
|
-
});
|
|
1290
|
-
traitIndexRef.current.clear();
|
|
1291
|
-
}, [notifySubscribers, notifyTraitSubscribers]);
|
|
1292
|
-
const subscribe = react.useCallback((callback) => {
|
|
1293
|
-
subscribersRef.current.add(callback);
|
|
1294
|
-
return () => {
|
|
1295
|
-
subscribersRef.current.delete(callback);
|
|
1296
|
-
};
|
|
1297
|
-
}, []);
|
|
1298
|
-
const hasContent = react.useCallback(
|
|
1299
|
-
(slot) => slots[slot] !== null,
|
|
1300
|
-
[slots]
|
|
1301
|
-
);
|
|
1302
|
-
const getContent = react.useCallback(
|
|
1303
|
-
(slot) => slots[slot] ?? null,
|
|
1304
|
-
[slots]
|
|
1305
|
-
);
|
|
1306
|
-
const getTraitContent = react.useCallback(
|
|
1307
|
-
(traitName) => traitIndexRef.current.get(traitName) ?? null,
|
|
1308
|
-
[]
|
|
1309
|
-
);
|
|
1310
|
-
const subscribeTrait = react.useCallback(
|
|
1311
|
-
(traitName, callback) => {
|
|
1312
|
-
let set = traitSubscribersRef.current.get(traitName);
|
|
1313
|
-
if (!set) {
|
|
1314
|
-
set = /* @__PURE__ */ new Set();
|
|
1315
|
-
traitSubscribersRef.current.set(traitName, set);
|
|
1316
|
-
}
|
|
1317
|
-
set.add(callback);
|
|
1318
|
-
return () => {
|
|
1319
|
-
const s = traitSubscribersRef.current.get(traitName);
|
|
1320
|
-
if (!s) return;
|
|
1321
|
-
s.delete(callback);
|
|
1322
|
-
if (s.size === 0) {
|
|
1323
|
-
traitSubscribersRef.current.delete(traitName);
|
|
1324
|
-
}
|
|
1325
|
-
};
|
|
1326
|
-
},
|
|
1327
|
-
[]
|
|
1328
|
-
);
|
|
1329
|
-
const updateTraitContent = react.useCallback(
|
|
1330
|
-
(traitName, content) => {
|
|
1331
|
-
const id = `slot-content-trait-${traitName}`;
|
|
1332
|
-
const fullContent = { ...content, id, sourceTrait: traitName };
|
|
1333
|
-
indexTraitRender(traitName, fullContent);
|
|
1334
|
-
notifyTraitSubscribers(traitName, fullContent);
|
|
1335
|
-
return id;
|
|
1336
|
-
},
|
|
1337
|
-
[indexTraitRender, notifyTraitSubscribers]
|
|
1338
|
-
);
|
|
1339
|
-
return {
|
|
1340
|
-
slots,
|
|
1341
|
-
render,
|
|
1342
|
-
clear,
|
|
1343
|
-
clearBySource,
|
|
1344
|
-
clearById,
|
|
1345
|
-
clearAll,
|
|
1346
|
-
subscribe,
|
|
1347
|
-
hasContent,
|
|
1348
|
-
getContent,
|
|
1349
|
-
getTraitContent,
|
|
1350
|
-
subscribeTrait,
|
|
1351
|
-
updateTraitContent
|
|
1352
|
-
};
|
|
1353
|
-
}
|
|
1354
|
-
var UI_PREFIX = "UI:";
|
|
1355
|
-
function useUIEvents(dispatch, traitName, validEvents, eventBusInstance) {
|
|
1356
|
-
const defaultEventBus = useEventBus();
|
|
1357
|
-
const eventBus = eventBusInstance ?? defaultEventBus;
|
|
1358
|
-
const validEventsKey = validEvents.slice().sort().join(",");
|
|
1359
|
-
const stableValidEvents = react.useMemo(
|
|
1360
|
-
() => validEvents,
|
|
1361
|
-
[validEventsKey]
|
|
1362
|
-
// intentional — validEventsKey is the stable dep
|
|
1363
|
-
);
|
|
1364
|
-
react.useEffect(() => {
|
|
1365
|
-
const unsubscribes = [];
|
|
1366
|
-
for (const smEvent of stableValidEvents) {
|
|
1367
|
-
const handler = (event) => {
|
|
1368
|
-
if (event.source && event.source.dispatched) {
|
|
1369
|
-
return;
|
|
1370
|
-
}
|
|
1371
|
-
dispatch(smEvent, event.payload);
|
|
1372
|
-
};
|
|
1373
|
-
unsubscribes.push(
|
|
1374
|
-
eventBus.on(`${UI_PREFIX}${traitName}.${smEvent}`, handler)
|
|
1375
|
-
);
|
|
1376
|
-
}
|
|
1377
|
-
return () => {
|
|
1378
|
-
for (const unsub of unsubscribes) {
|
|
1379
|
-
if (typeof unsub === "function") unsub();
|
|
1380
|
-
}
|
|
1381
|
-
};
|
|
1382
|
-
}, [eventBus, dispatch, traitName, stableValidEvents]);
|
|
1383
|
-
}
|
|
1384
|
-
function useTraitListens(dispatch, listens, eventBusInstance) {
|
|
1385
|
-
const defaultEventBus = useEventBus();
|
|
1386
|
-
const eventBus = eventBusInstance ?? defaultEventBus;
|
|
1387
|
-
const stableKey = listens.map((l) => `${l.sourceKey}->${l.trigger}`).sort().join("|");
|
|
1388
|
-
const stableListens = react.useMemo(
|
|
1389
|
-
() => listens,
|
|
1390
|
-
[stableKey]
|
|
1391
|
-
// intentional
|
|
1392
|
-
);
|
|
1393
|
-
react.useEffect(() => {
|
|
1394
|
-
const unsubscribes = [];
|
|
1395
|
-
for (const spec of stableListens) {
|
|
1396
|
-
const handler = (event) => {
|
|
1397
|
-
dispatch(spec.trigger, event.payload);
|
|
1398
|
-
};
|
|
1399
|
-
unsubscribes.push(eventBus.on(`${UI_PREFIX}${spec.sourceKey}`, handler));
|
|
1400
|
-
}
|
|
1401
|
-
return () => {
|
|
1402
|
-
for (const unsub of unsubscribes) {
|
|
1403
|
-
if (typeof unsub === "function") unsub();
|
|
1404
|
-
}
|
|
1405
|
-
};
|
|
1406
|
-
}, [eventBus, dispatch, stableListens]);
|
|
1407
|
-
}
|
|
1408
|
-
var queryStores = /* @__PURE__ */ new Map();
|
|
1409
|
-
function getOrCreateStore(query) {
|
|
1410
|
-
if (!queryStores.has(query)) {
|
|
1411
|
-
queryStores.set(query, {
|
|
1412
|
-
search: "",
|
|
1413
|
-
filters: {},
|
|
1414
|
-
sortField: void 0,
|
|
1415
|
-
sortDirection: void 0,
|
|
1416
|
-
listeners: /* @__PURE__ */ new Set()
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
return queryStores.get(query);
|
|
1420
|
-
}
|
|
1421
|
-
function useQuerySingleton(query) {
|
|
1422
|
-
const [, forceUpdate] = react.useState({});
|
|
1423
|
-
if (!query) {
|
|
1424
|
-
return null;
|
|
1425
|
-
}
|
|
1426
|
-
const store = react.useMemo(() => getOrCreateStore(query), [query]);
|
|
1427
|
-
react.useMemo(() => {
|
|
1428
|
-
const listener = () => forceUpdate({});
|
|
1429
|
-
store.listeners.add(listener);
|
|
1430
|
-
return () => {
|
|
1431
|
-
store.listeners.delete(listener);
|
|
1432
|
-
};
|
|
1433
|
-
}, [store]);
|
|
1434
|
-
const notifyListeners = react.useCallback(() => {
|
|
1435
|
-
store.listeners.forEach((listener) => listener());
|
|
1436
|
-
}, [store]);
|
|
1437
|
-
const setSearch = react.useCallback((value) => {
|
|
1438
|
-
store.search = value;
|
|
1439
|
-
notifyListeners();
|
|
1440
|
-
}, [store, notifyListeners]);
|
|
1441
|
-
const setFilter = react.useCallback((key, value) => {
|
|
1442
|
-
store.filters = { ...store.filters, [key]: value };
|
|
1443
|
-
notifyListeners();
|
|
1444
|
-
}, [store, notifyListeners]);
|
|
1445
|
-
const clearFilters = react.useCallback(() => {
|
|
1446
|
-
store.filters = {};
|
|
1447
|
-
store.search = "";
|
|
1448
|
-
notifyListeners();
|
|
1449
|
-
}, [store, notifyListeners]);
|
|
1450
|
-
const setSort = react.useCallback((field, direction) => {
|
|
1451
|
-
store.sortField = field;
|
|
1452
|
-
store.sortDirection = direction;
|
|
1453
|
-
notifyListeners();
|
|
1454
|
-
}, [store, notifyListeners]);
|
|
1455
|
-
return {
|
|
1456
|
-
search: store.search,
|
|
1457
|
-
setSearch,
|
|
1458
|
-
filters: store.filters,
|
|
1459
|
-
setFilter,
|
|
1460
|
-
clearFilters,
|
|
1461
|
-
sortField: store.sortField,
|
|
1462
|
-
sortDirection: store.sortDirection,
|
|
1463
|
-
setSort
|
|
1464
|
-
};
|
|
1465
|
-
}
|
|
1466
|
-
function parseQueryBinding(binding) {
|
|
1467
|
-
const cleaned = binding.startsWith("@") ? binding.slice(1) : binding;
|
|
1468
|
-
const parts = cleaned.split(".");
|
|
1469
|
-
return {
|
|
1470
|
-
query: parts[0],
|
|
1471
|
-
field: parts.length > 1 ? parts.slice(1).join(".") : void 0
|
|
1472
|
-
};
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
// locales/en.json
|
|
1476
|
-
var en_default = {
|
|
1477
|
-
$meta: {
|
|
1478
|
-
locale: "en",
|
|
1479
|
-
direction: "ltr"
|
|
1480
|
-
},
|
|
1481
|
-
"common.save": "Save",
|
|
1482
|
-
"common.cancel": "Cancel",
|
|
1483
|
-
"common.delete": "Delete",
|
|
1484
|
-
"common.close": "Close",
|
|
1485
|
-
"common.confirm": "Are you sure?",
|
|
1486
|
-
"common.create": "Create",
|
|
1487
|
-
"common.edit": "Edit",
|
|
1488
|
-
"common.view": "View",
|
|
1489
|
-
"common.add": "Add",
|
|
1490
|
-
"common.remove": "Remove",
|
|
1491
|
-
"common.search": "Search...",
|
|
1492
|
-
"common.filter": "Filter",
|
|
1493
|
-
"common.actions": "Actions",
|
|
1494
|
-
"common.yes": "Yes",
|
|
1495
|
-
"common.no": "No",
|
|
1496
|
-
"common.selected": "selected",
|
|
1497
|
-
"common.ok": "OK",
|
|
1498
|
-
"common.done": "Done",
|
|
1499
|
-
"common.apply": "Apply",
|
|
1500
|
-
"common.reset": "Reset",
|
|
1501
|
-
"common.refresh": "Refresh",
|
|
1502
|
-
"common.export": "Export",
|
|
1503
|
-
"common.import": "Import",
|
|
1504
|
-
"common.copy": "Copy",
|
|
1505
|
-
"common.settings": "Settings",
|
|
1506
|
-
"nav.previous": "Previous",
|
|
1507
|
-
"nav.next": "Next",
|
|
1508
|
-
"nav.back": "Back",
|
|
1509
|
-
"nav.home": "Home",
|
|
1510
|
-
"form.submit": "Submit",
|
|
1511
|
-
"form.saving": "Saving...",
|
|
1512
|
-
"form.required": "This field is required",
|
|
1513
|
-
"form.invalidEmail": "Enter a valid email address",
|
|
1514
|
-
"form.selectPlaceholder": "Select {{label}}...",
|
|
1515
|
-
"form.searchPlaceholder": "Search {{entity}}...",
|
|
1516
|
-
"table.empty.title": "No items found",
|
|
1517
|
-
"table.empty.description": "No items to display.",
|
|
1518
|
-
"table.search.placeholder": "Search...",
|
|
1519
|
-
"table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
|
|
1520
|
-
"table.pagination.page": "Page {{page}} of {{totalPages}}",
|
|
1521
|
-
"table.bulk.selected": "{{count}} selected",
|
|
1522
|
-
"table.loading": "Loading...",
|
|
1523
|
-
"status.loading": "Loading...",
|
|
1524
|
-
"status.scheduled": "Scheduled",
|
|
1525
|
-
"status.inProgress": "In Progress",
|
|
1526
|
-
"status.completed": "Completed",
|
|
1527
|
-
"status.cancelled": "Cancelled",
|
|
1528
|
-
"status.pending": "Pending",
|
|
1529
|
-
"status.active": "Active",
|
|
1530
|
-
"status.inactive": "Inactive",
|
|
1531
|
-
"status.draft": "Draft",
|
|
1532
|
-
"status.archived": "Archived",
|
|
1533
|
-
"error.generic": "Something went wrong",
|
|
1534
|
-
"error.retry": "Try again",
|
|
1535
|
-
"error.notFound": "Not found",
|
|
1536
|
-
"error.loadFailed": "Failed to load: {{message}}",
|
|
1537
|
-
"error.configMissing": "Configuration not found for: {{id}}",
|
|
1538
|
-
"common.loading": "Loading...",
|
|
1539
|
-
"common.showMore": "Show More",
|
|
1540
|
-
"common.showLess": "Show Less",
|
|
1541
|
-
"common.noResults": "No results found",
|
|
1542
|
-
"common.saveChanges": "Save Changes",
|
|
1543
|
-
"common.retry": "Retry",
|
|
1544
|
-
"common.open": "Open",
|
|
1545
|
-
"common.back": "Back",
|
|
1546
|
-
"empty.noItems": "No items",
|
|
1547
|
-
"empty.noData": "No data available",
|
|
1548
|
-
"empty.noItemsYet": "No items yet",
|
|
1549
|
-
"empty.noItemsAdded": "No items added yet",
|
|
1550
|
-
"empty.noOptionsFound": "No options found",
|
|
1551
|
-
"list.addItemPlaceholder": "Add new item...",
|
|
1552
|
-
"error.occurred": "An error occurred",
|
|
1553
|
-
"error.failedToLoad": "Failed to load data",
|
|
1554
|
-
"wizard.back": "Back",
|
|
1555
|
-
"wizard.next": "Next",
|
|
1556
|
-
"wizard.complete": "Complete",
|
|
1557
|
-
"wizard.stepOf": "Step {{current}} of {{total}}",
|
|
1558
|
-
"pagination.previous": "Previous",
|
|
1559
|
-
"pagination.next": "Next",
|
|
1560
|
-
"pagination.total": "Total:",
|
|
1561
|
-
"pagination.show": "Show:",
|
|
1562
|
-
"pagination.goTo": "Go to:",
|
|
1563
|
-
"pagination.go": "Go",
|
|
1564
|
-
"auth.signIn": "Sign in",
|
|
1565
|
-
"auth.signOut": "Sign out",
|
|
1566
|
-
"dialog.confirm": "Confirm",
|
|
1567
|
-
"dialog.cancel": "Cancel",
|
|
1568
|
-
"dialog.loading": "Loading...",
|
|
1569
|
-
"dialog.delete.title": "Delete {{item}}?",
|
|
1570
|
-
"dialog.delete.message": "This action cannot be undone.",
|
|
1571
|
-
"trait.availableActions": "Available Actions",
|
|
1572
|
-
"trait.transitions": "Transitions",
|
|
1573
|
-
"trait.availableNow": "Available now",
|
|
1574
|
-
"book.startReading": "Start Reading",
|
|
1575
|
-
"book.tableOfContents": "Table of Contents",
|
|
1576
|
-
"book.partNumber": "Part {{number}}",
|
|
1577
|
-
"book.print": "Print",
|
|
1578
|
-
"book.previousPage": "Previous page",
|
|
1579
|
-
"book.nextPage": "Next page",
|
|
1580
|
-
"quiz.showAnswer": "Show answer",
|
|
1581
|
-
"quiz.hideAnswer": "Hide answer",
|
|
1582
|
-
"aria.closeModal": "Close modal",
|
|
1583
|
-
"aria.closeToast": "Dismiss toast",
|
|
1584
|
-
"aria.closeAlert": "Dismiss alert",
|
|
1585
|
-
"aria.removeFilter": "Remove filter",
|
|
1586
|
-
"aria.closeDrawer": "Close drawer",
|
|
1587
|
-
"aria.closePanel": "Close panel",
|
|
1588
|
-
"aria.previousImage": "Previous image",
|
|
1589
|
-
"aria.nextImage": "Next image",
|
|
1590
|
-
"aria.dismiss": "Dismiss",
|
|
1591
|
-
"aria.previousSlide": "Previous slide",
|
|
1592
|
-
"aria.nextSlide": "Next slide",
|
|
1593
|
-
"aria.previousDays": "Previous days",
|
|
1594
|
-
"aria.nextDays": "Next days",
|
|
1595
|
-
"aria.decrease": "Decrease",
|
|
1596
|
-
"aria.increase": "Increase",
|
|
1597
|
-
"aria.breadcrumb": "Breadcrumb",
|
|
1598
|
-
"aria.tableOfContents": "Table of contents",
|
|
1599
|
-
"aria.docsSidebar": "Documentation sidebar",
|
|
1600
|
-
"aria.selectAllRows": "Select all rows",
|
|
1601
|
-
"aria.selectAll": "Select all",
|
|
1602
|
-
"aria.upvote": "Upvote",
|
|
1603
|
-
"aria.downvote": "Downvote",
|
|
1604
|
-
"aria.qrScanner": "QR scanner",
|
|
1605
|
-
"aria.mockScanDev": "Mock scan (dev)",
|
|
1606
|
-
"aria.openMenu": "Open menu",
|
|
1607
|
-
"aria.closeMenu": "Close menu",
|
|
1608
|
-
"aria.openSidebar": "Open sidebar",
|
|
1609
|
-
"sidebar.expand": "Expand sidebar",
|
|
1610
|
-
"sidebar.collapse": "Collapse sidebar",
|
|
1611
|
-
"sidebar.close": "Close sidebar",
|
|
1612
|
-
"loading.items": "Loading items...",
|
|
1613
|
-
"card.imageAlt": "Image",
|
|
1614
|
-
"canvas.emptyMessage": "No content",
|
|
1615
|
-
"canvas.errorTitle": "Canvas error",
|
|
1616
|
-
"book.noData": "No data",
|
|
1617
|
-
"common.notifications": "Notifications",
|
|
1618
|
-
"common.remaining": "{{count}} remaining",
|
|
1619
|
-
"error.somethingWentWrong": "Something went wrong",
|
|
1620
|
-
"error.loadingItems": "Loading items...",
|
|
1621
|
-
"error.noItemsFound": "No items found",
|
|
1622
|
-
"debug.noEntityData": "No entity data",
|
|
1623
|
-
"debug.noEntities": "No entities",
|
|
1624
|
-
"debug.noTicks": "No ticks registered",
|
|
1625
|
-
"debug.noActiveTraits": "No active traits",
|
|
1626
|
-
"debug.noGuardEvaluations": "No guard evaluations",
|
|
1627
|
-
"debug.noBridgeData": "No bridge data",
|
|
1628
|
-
"debug.status": "Status",
|
|
1629
|
-
"debug.eventsForwarded": "Events Forwarded (Client \u2192 Server)",
|
|
1630
|
-
"debug.eventsReceived": "Events Received (Server \u2192 Client)",
|
|
1631
|
-
"debug.lastHeartbeat": "Last Heartbeat",
|
|
1632
|
-
"debug.noEventsYet": "No events yet",
|
|
1633
|
-
"debug.noTransitionsRecorded": "No transitions recorded",
|
|
1634
|
-
"debug.noVerificationChecks": "No verification checks yet",
|
|
1635
|
-
"display.chartError": "Chart error",
|
|
1636
|
-
"display.codeViewerError": "Code viewer error",
|
|
1637
|
-
"display.noCode": "No code",
|
|
1638
|
-
"display.documentError": "Document error",
|
|
1639
|
-
"display.noDocument": "No document",
|
|
1640
|
-
"display.graphError": "Graph error",
|
|
1641
|
-
"display.noGraphData": "No graph data",
|
|
1642
|
-
"display.galleryError": "Gallery error",
|
|
1643
|
-
"display.noMedia": "No media",
|
|
1644
|
-
"display.meterError": "Meter error",
|
|
1645
|
-
"display.signaturePadError": "Signature pad error",
|
|
1646
|
-
"display.timelineError": "Timeline error",
|
|
1647
|
-
"display.noEvents": "No events",
|
|
1648
|
-
"template.features": "Features",
|
|
1649
|
-
"template.howItWorks": "How It Works",
|
|
1650
|
-
"template.showcase": "Showcase",
|
|
1651
|
-
"template.faq": "Frequently Asked Questions",
|
|
1652
|
-
"template.ourTeam": "Our Team",
|
|
1653
|
-
"template.caseStudies": "Case Studies",
|
|
1654
|
-
"richBlockEditor.toolbar.text": "Text",
|
|
1655
|
-
"richBlockEditor.toolbar.h1": "H1",
|
|
1656
|
-
"richBlockEditor.toolbar.h2": "H2",
|
|
1657
|
-
"richBlockEditor.toolbar.h3": "H3",
|
|
1658
|
-
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
1659
|
-
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
1660
|
-
"richBlockEditor.toolbar.quote": "Quote",
|
|
1661
|
-
"richBlockEditor.toolbar.code": "Code",
|
|
1662
|
-
"richBlockEditor.toolbar.divider": "Divider",
|
|
1663
|
-
"richBlockEditor.toolbar.image": "Image",
|
|
1664
|
-
"richBlockEditor.blockType.paragraph": "Text",
|
|
1665
|
-
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
1666
|
-
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
1667
|
-
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
1668
|
-
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
1669
|
-
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
1670
|
-
"richBlockEditor.blockType.quote": "Quote",
|
|
1671
|
-
"richBlockEditor.blockType.code": "Code",
|
|
1672
|
-
"richBlockEditor.blockType.divider": "Divider",
|
|
1673
|
-
"richBlockEditor.blockType.image": "Image",
|
|
1674
|
-
"richBlockEditor.blockActions": "Block actions",
|
|
1675
|
-
"richBlockEditor.duplicate": "Duplicate",
|
|
1676
|
-
"richBlockEditor.turnInto": "Turn into",
|
|
1677
|
-
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
1678
|
-
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
1679
|
-
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
1680
|
-
"richBlockEditor.placeholder.quote": "Quote",
|
|
1681
|
-
"richBlockEditor.placeholder.code": "Enter code",
|
|
1682
|
-
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
1683
|
-
"richBlockEditor.placeholder.listItem": "List item",
|
|
1684
|
-
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
1685
|
-
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
1686
|
-
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
1687
|
-
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
1688
|
-
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
1689
|
-
"richBlockEditor.aria.codeBlock": "Code block",
|
|
1690
|
-
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
1691
|
-
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
1692
|
-
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
1693
|
-
"richBlockEditor.aria.listItem": "List item",
|
|
1694
|
-
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
1695
|
-
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
1696
|
-
"richBlockEditor.embeddedImage": "Embedded image",
|
|
1697
|
-
"richBlockEditor.noImageUrl": "No image URL set",
|
|
1698
|
-
"richBlockEditor.addItem": "Add item",
|
|
1699
|
-
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
1700
|
-
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
1701
|
-
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
1702
|
-
"versionDiff.compare": "Compare",
|
|
1703
|
-
"versionDiff.to": "to",
|
|
1704
|
-
"versionDiff.beforeRevision": "Before revision",
|
|
1705
|
-
"versionDiff.afterRevision": "After revision",
|
|
1706
|
-
"versionDiff.switchToInline": "Switch to inline view",
|
|
1707
|
-
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
1708
|
-
"versionDiff.revert": "Revert",
|
|
1709
|
-
"versionDiff.byAuthor": " by {{author}}",
|
|
1710
|
-
"violationAlert.actionType.measure": "Corrective Measure",
|
|
1711
|
-
"violationAlert.actionType.admin": "Administrative Action",
|
|
1712
|
-
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
1713
|
-
"violationAlert.fallbackMessage": "Violation",
|
|
1714
|
-
"violationAlert.adminLabel": "Admin:",
|
|
1715
|
-
"violationAlert.penaltyLabel": "Penalty:",
|
|
1716
|
-
"violationAlert.goToField": "Go to field",
|
|
1717
|
-
"branchingLogic.title": "Branching logic",
|
|
1718
|
-
"branchingLogic.if": "If",
|
|
1719
|
-
"branchingLogic.goTo": "go to",
|
|
1720
|
-
"branchingLogic.rules": "Rules",
|
|
1721
|
-
"branchingLogic.logicGraph": "Logic graph",
|
|
1722
|
-
"branchingLogic.addRule": "Add rule",
|
|
1723
|
-
"branchingLogic.deleteRule": "Delete rule",
|
|
1724
|
-
"branchingLogic.endOfSurvey": "End of survey",
|
|
1725
|
-
"branchingLogic.brokenReference": "Broken reference",
|
|
1726
|
-
"branchingLogic.selectQuestion": "Select question",
|
|
1727
|
-
"branchingLogic.selectTarget": "Select target",
|
|
1728
|
-
"branchingLogic.selectValue": "Select value",
|
|
1729
|
-
"branchingLogic.addValue": "Add value",
|
|
1730
|
-
"branchingLogic.value": "Value",
|
|
1731
|
-
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
1732
|
-
"branchingLogic.operatorEquals": "equals",
|
|
1733
|
-
"branchingLogic.operatorNotEquals": "does not equal",
|
|
1734
|
-
"branchingLogic.operatorContains": "contains",
|
|
1735
|
-
"branchingLogic.operatorIn": "is one of",
|
|
1736
|
-
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
1737
|
-
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
1738
|
-
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
1739
|
-
"branchingLogic.brokenCount": "{{count}} broken",
|
|
1740
|
-
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
1741
|
-
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
1742
|
-
"filterGroup.filters": "Filters",
|
|
1743
|
-
"filterGroup.all": "All",
|
|
1744
|
-
"filterGroup.clear": "Clear",
|
|
1745
|
-
"filterGroup.clearAll": "Clear all",
|
|
1746
|
-
"filterGroup.from": "From",
|
|
1747
|
-
"filterGroup.to": "To",
|
|
1748
|
-
"filterGroup.allOf": "All {{label}}",
|
|
1749
|
-
"filterGroup.activeCount": "{{count}} active",
|
|
1750
|
-
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
1751
|
-
"debug.expression": "Expression",
|
|
1752
|
-
"debug.inputs": "Inputs",
|
|
1753
|
-
"debug.trait": "Trait",
|
|
1754
|
-
"debug.filterAll": "All",
|
|
1755
|
-
"debug.filterPassed": "Passed",
|
|
1756
|
-
"debug.filterFailed": "Failed",
|
|
1757
|
-
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
1758
|
-
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
1759
|
-
"debug.activeStates": "Active States",
|
|
1760
|
-
"debug.availableEvents": "Available Events",
|
|
1761
|
-
"debug.noTransitionsFromState": "No transitions from current state",
|
|
1762
|
-
"debug.guarded": "guarded",
|
|
1763
|
-
"debug.otherEvents": "Other Events (not available from current state)",
|
|
1764
|
-
"debug.recentTransitions": "Recent Transitions",
|
|
1765
|
-
"debug.transitionsCount": "{{count}} transitions",
|
|
1766
|
-
"debug.states": "States",
|
|
1767
|
-
"debug.transitions": "Transitions",
|
|
1768
|
-
"debug.guards": "Guards",
|
|
1769
|
-
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
1770
|
-
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
1771
|
-
"debug.singleton": "Singleton",
|
|
1772
|
-
"debug.singletonsCount": "Singletons ({{count}})",
|
|
1773
|
-
"debug.runtimeCount": "Runtime ({{count}})",
|
|
1774
|
-
"debug.moreEntities": "+{{count}} more entities",
|
|
1775
|
-
"debug.persistent": "Persistent",
|
|
1776
|
-
"debug.loadedCount": "{{count}} loaded",
|
|
1777
|
-
"debug.notLoaded": "not loaded",
|
|
1778
|
-
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
1779
|
-
"debug.allCount": "All ({{count}})",
|
|
1780
|
-
"debug.autoScroll": "Auto-scroll",
|
|
1781
|
-
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
1782
|
-
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
1783
|
-
"debug.guardLabel": "guard:",
|
|
1784
|
-
"debug.effectsCount": "{{count}} effects",
|
|
1785
|
-
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
1786
|
-
"debug.never": "Never",
|
|
1787
|
-
"debug.connected": "Connected",
|
|
1788
|
-
"debug.disconnected": "Disconnected",
|
|
1789
|
-
"debug.lastError": "Last Error",
|
|
1790
|
-
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
1791
|
-
"debug.server": "server",
|
|
1792
|
-
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
1793
|
-
"debug.emitLabel": "emit:",
|
|
1794
|
-
"debug.rowsCount": "{{count}} rows",
|
|
1795
|
-
"debug.serverResponse": "server response",
|
|
1796
|
-
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
1797
|
-
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
1798
|
-
"debug.failCount": "{{count}} fail",
|
|
1799
|
-
"debug.ok": "OK",
|
|
1800
|
-
"debug.localCount": "{{count}} local",
|
|
1801
|
-
"debug.serverCount": "{{count}} server",
|
|
1802
|
-
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
1803
|
-
"debug.tabDispatch": "Dispatch",
|
|
1804
|
-
"debug.tabVerify": "Verify",
|
|
1805
|
-
"debug.tabVerifyAlert": "Verify (!)",
|
|
1806
|
-
"debug.tabTimeline": "Timeline",
|
|
1807
|
-
"debug.tabBridge": "Bridge",
|
|
1808
|
-
"debug.tabTraits": "Traits",
|
|
1809
|
-
"debug.tabTicks": "Ticks",
|
|
1810
|
-
"debug.tabEntities": "Entities",
|
|
1811
|
-
"debug.tabEvents": "Events",
|
|
1812
|
-
"debug.tabGuards": "Guards",
|
|
1813
|
-
"debug.debugger": "Debugger",
|
|
1814
|
-
"debug.failedCount": "{{count}} failed",
|
|
1815
|
-
"debug.traitsCount": "{{count}} traits",
|
|
1816
|
-
"debug.idle": "Idle",
|
|
1817
|
-
"debug.openDebugger": "Open Debugger (`)",
|
|
1818
|
-
"debug.kflowVerifier": "KFlow Verifier",
|
|
1819
|
-
"debug.allPassing": "All passing",
|
|
1820
|
-
"debug.runtime": "Runtime",
|
|
1821
|
-
"debug.close": "Close (`)",
|
|
1822
|
-
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
1823
|
-
"replyTree.expandReplies": "Expand replies",
|
|
1824
|
-
"replyTree.collapseReplies": "Collapse replies",
|
|
1825
|
-
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
1826
|
-
"replyTree.replyTo": "Reply to {{author}}",
|
|
1827
|
-
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
1828
|
-
"replyTree.reply": "Reply",
|
|
1829
|
-
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
1830
|
-
"replyTree.flag": "Flag",
|
|
1831
|
-
"replyTree.send": "Send",
|
|
1832
|
-
"replyTree.continueThread": "Continue thread",
|
|
1833
|
-
"replyTree.noRepliesYet": "No replies yet.",
|
|
1834
|
-
"signaturePad.label": "Signature",
|
|
1835
|
-
"signaturePad.helperText": "Draw your signature above",
|
|
1836
|
-
"signaturePad.clear": "Clear",
|
|
1837
|
-
"signaturePad.confirm": "Confirm",
|
|
1838
|
-
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
1839
|
-
"qrScanner.paused": "Paused",
|
|
1840
|
-
"qrScanner.resumeScanning": "Resume scanning",
|
|
1841
|
-
"qrScanner.pauseScanning": "Pause scanning",
|
|
1842
|
-
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
1843
|
-
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
1844
|
-
"qrScanner.mockScan": "Mock Scan",
|
|
1845
|
-
"docSearch.placeholder": "Search documentation...",
|
|
1846
|
-
"stateMachine.loading": "Loading state machine\u2026",
|
|
1847
|
-
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
1848
|
-
"avl.trigger": "Trigger",
|
|
1849
|
-
"avl.guard": "Guard",
|
|
1850
|
-
"avl.effects": "Effects",
|
|
1851
|
-
"avl.props": "Props",
|
|
1852
|
-
"avl.entity": "Entity",
|
|
1853
|
-
"avl.traits": "Traits",
|
|
1854
|
-
"avl.transition": "Transition",
|
|
1855
|
-
"avl.onEntity": "on {{entity}}",
|
|
1856
|
-
"avl.linkedTo": "linked to {{entity}}",
|
|
1857
|
-
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
1858
|
-
"avl.zoomIn": "Zoom in",
|
|
1859
|
-
"avl.zoomOut": "Zoom out",
|
|
1860
|
-
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
1861
|
-
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
1862
|
-
"avl.noTraitData": "No trait data",
|
|
1863
|
-
"avl.computingLayout": "Computing layout...",
|
|
1864
|
-
"avl.noStateMachine": "No state machine",
|
|
1865
|
-
"avl.listensFor": "listens for {{event}}",
|
|
1866
|
-
"avl.emits": "emits {{event}}",
|
|
1867
|
-
"avl.pageLayout": "Page Layout",
|
|
1868
|
-
"avl.overlaySuffix": "(overlay)",
|
|
1869
|
-
"orbPreview.previewBadge": "Preview",
|
|
1870
|
-
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
1871
|
-
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
1872
|
-
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
1873
|
-
"orbPreview.noPreview": "No preview available",
|
|
1874
|
-
"orbPreview.screensCount": "{{count}} screens",
|
|
1875
|
-
"detailView.noTransitionData": "No transition data",
|
|
1876
|
-
"orbInspector.required": "req",
|
|
1877
|
-
"orbInspector.addField": "Add Field",
|
|
1878
|
-
"orbInspector.serviceMode": "Service Mode",
|
|
1879
|
-
"orbInspector.standalone": "Standalone",
|
|
1880
|
-
"orbInspector.embedded": "Embedded",
|
|
1881
|
-
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
1882
|
-
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
1883
|
-
"orbInspector.addEffect": "Add Effect",
|
|
1884
|
-
"orbInspector.guardExpression": "Guard expression",
|
|
1885
|
-
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
1886
|
-
"orbInspector.tokens": "Tokens",
|
|
1887
|
-
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
1888
|
-
"orbInspector.variant": "Variant",
|
|
1889
|
-
"orbInspector.size": "Size",
|
|
1890
|
-
"orbInspector.statesCount": "{{count}} states",
|
|
1891
|
-
"orbInspector.onEntity": " on {{entity}}",
|
|
1892
|
-
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
1893
|
-
"orbInspector.tokenGroup.colors": "Colors",
|
|
1894
|
-
"orbInspector.tokenGroup.radii": "Radii",
|
|
1895
|
-
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
1896
|
-
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
1897
|
-
"orbInspector.tab.inspector": "Inspector",
|
|
1898
|
-
"orbInspector.tab.styles": "Styles",
|
|
1899
|
-
"orbInspector.tab.code": "Code",
|
|
1900
|
-
"canvas.goBackToOverview": "Go back to overview",
|
|
1901
|
-
"canvas.overview": "Overview",
|
|
1902
|
-
"canvas.expanded": "Expanded",
|
|
1903
|
-
"canvas.modulesCount": "{{count}} modules",
|
|
1904
|
-
"canvas.screensCount": "{{count}} screens",
|
|
1905
|
-
"canvas.switchToView": "Switch to {{label}} view",
|
|
1906
|
-
"lawReference.viewFullText": "View full law text",
|
|
1907
|
-
"statCard.defaultLabel": "Stat",
|
|
1908
|
-
"statCard.vsLastPeriod": "vs last period",
|
|
1909
|
-
"mediaGallery.upload": "Upload",
|
|
1910
|
-
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
1911
|
-
"pagination.jumpPlaceholder": "Page",
|
|
1912
|
-
"table.selectRow": "Select row {{id}}",
|
|
1913
|
-
"card.selectItem": "Select {{item}}",
|
|
1914
|
-
"card.itemFallback": "item",
|
|
1915
|
-
"fileTree.noFiles": "No files",
|
|
1916
|
-
"masterDetail.selectItem": "Select an item to view details",
|
|
1917
|
-
"empty.createFirst": "Create your first item to get started.",
|
|
1918
|
-
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
1919
|
-
"upload.dropFilesHere": "Drop files here",
|
|
1920
|
-
"upload.accepted": "Accepted: {{accept}}",
|
|
1921
|
-
"upload.maxSize": "Max size: {{size}}",
|
|
1922
|
-
"upload.maxFiles": "Up to {{count}} files",
|
|
1923
|
-
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
1924
|
-
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
1925
|
-
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
1926
|
-
"optionConstraint.requiredOne": "Required, pick 1",
|
|
1927
|
-
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
1928
|
-
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
1929
|
-
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
1930
|
-
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
1931
|
-
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
1932
|
-
"optionConstraint.optional": "Optional",
|
|
1933
|
-
"optionConstraint.outOfStock": "Out of stock",
|
|
1934
|
-
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
1935
|
-
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
1936
|
-
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
1937
|
-
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
1938
|
-
"stateMachine.pinned": "Pinned",
|
|
1939
|
-
"stateMachine.eventCount": "{{count}} events",
|
|
1940
|
-
"stateMachine.externalEffects": "External Effects",
|
|
1941
|
-
"stateMachine.legend.initial": "Initial",
|
|
1942
|
-
"stateMachine.legend.final": "Final",
|
|
1943
|
-
"stateMachine.legend.state": "State",
|
|
1944
|
-
"stateMachine.legend.multiEvent": "Multi-event",
|
|
1945
|
-
"relationSelect.selectPlaceholder": "Select...",
|
|
1946
|
-
"battle.cancel": "Cancel",
|
|
1947
|
-
"battle.defeat": "Defeat",
|
|
1948
|
-
"battle.endTurn": "End Turn",
|
|
1949
|
-
"battle.playAgain": "Play Again",
|
|
1950
|
-
"battle.turnsPlayed": "Turns Played",
|
|
1951
|
-
"battle.victory": "Victory",
|
|
1952
|
-
"builder.allPlaced": "All placed",
|
|
1953
|
-
"builder.blueprint": "Blueprint",
|
|
1954
|
-
"builder.build": "Build",
|
|
1955
|
-
"builder.components": "Components",
|
|
1956
|
-
"builder.empty": "Empty",
|
|
1957
|
-
"builder.reset": "Reset",
|
|
1958
|
-
"builder.success": "Success",
|
|
1959
|
-
"classifier.allCorrect": "All correct!",
|
|
1960
|
-
"classifier.check": "Check",
|
|
1961
|
-
"classifier.correct": "correct",
|
|
1962
|
-
"classifier.itemsToSort": "Items to sort",
|
|
1963
|
-
"classifier.reset": "Reset",
|
|
1964
|
-
"common.error": "Error",
|
|
1965
|
-
"debugger.allFound": "All bugs found!",
|
|
1966
|
-
"debugger.bugsFound": "bugs found",
|
|
1967
|
-
"debugger.findBugs": "Find {{count}} bugs",
|
|
1968
|
-
"debugger.reset": "Reset",
|
|
1969
|
-
"debugger.submit": "Submit",
|
|
1970
|
-
"error.genericLoad": "Failed to load",
|
|
1971
|
-
"error.loadingData": "Loading data",
|
|
1972
|
-
"eventHandler.addRule": "Add Rule",
|
|
1973
|
-
"eventHandler.chainComplete": "Chain complete!",
|
|
1974
|
-
"eventHandler.clickObject": "Click objects",
|
|
1975
|
-
"eventHandler.eventLog": "Event Log",
|
|
1976
|
-
"eventHandler.heardEvent": "{{object}} heard {{event}} \u2192 {{action}}",
|
|
1977
|
-
"eventHandler.noEvents": "No events yet",
|
|
1978
|
-
"eventHandler.noListeners": "No listeners for {{event}}",
|
|
1979
|
-
"eventHandler.rules": "{{count}}/{{max}} rules",
|
|
1980
|
-
"eventHandler.simulationStarted": "Simulating: {{events}}",
|
|
1981
|
-
"eventHandler.state": "State",
|
|
1982
|
-
"eventHandler.then": "then",
|
|
1983
|
-
"eventHandler.when": "When",
|
|
1984
|
-
"game.goal": "Goal",
|
|
1985
|
-
"game.hint": "Hint",
|
|
1986
|
-
"game.play": "Play",
|
|
1987
|
-
"game.reset": "Reset",
|
|
1988
|
-
"game.runTests": "Run Tests",
|
|
1989
|
-
"negotiator.chooseAction": "Choose an action",
|
|
1990
|
-
"negotiator.failed": "Negotiation failed",
|
|
1991
|
-
"negotiator.finalScore": "Final score",
|
|
1992
|
-
"negotiator.history": "History",
|
|
1993
|
-
"negotiator.opponent": "Opponent",
|
|
1994
|
-
"negotiator.playAgain": "Play Again",
|
|
1995
|
-
"negotiator.round": "Round {{current}} of {{total}}",
|
|
1996
|
-
"negotiator.success": "Negotiation successful",
|
|
1997
|
-
"negotiator.target": "Target",
|
|
1998
|
-
"negotiator.you": "You",
|
|
1999
|
-
"platformer.level": "Level",
|
|
2000
|
-
"platformer.lost": "Game Over",
|
|
2001
|
-
"platformer.nextLevel": "Next Level",
|
|
2002
|
-
"platformer.noLives": "No lives left",
|
|
2003
|
-
"platformer.playAgain": "Play Again",
|
|
2004
|
-
"platformer.score": "Score",
|
|
2005
|
-
"platformer.won": "You won!",
|
|
2006
|
-
"puzzle.tryAgainButton": "Try Again",
|
|
2007
|
-
"roguelike.atk": "ATK",
|
|
2008
|
-
"roguelike.cleared": "Dungeon cleared! Depth reached: {{depth}}",
|
|
2009
|
-
"roguelike.defeat": "Defeated!",
|
|
2010
|
-
"roguelike.depth": "Depth",
|
|
2011
|
-
"roguelike.enemy": "Enemy",
|
|
2012
|
-
"roguelike.hp": "HP",
|
|
2013
|
-
"roguelike.phase": "Phase",
|
|
2014
|
-
"roguelike.playAgain": "Play Again",
|
|
2015
|
-
"roguelike.player": "Hero",
|
|
2016
|
-
"roguelike.victory": "Victory!",
|
|
2017
|
-
"sequencer.actions": "Actions",
|
|
2018
|
-
"sequencer.dragActions": "Drag actions here",
|
|
2019
|
-
"sequencer.levelComplete": "Level complete!",
|
|
2020
|
-
"sequencer.yourSequence": "Your sequence",
|
|
2021
|
-
"simulator.correct": "Correct",
|
|
2022
|
-
"simulator.incorrect": "Incorrect",
|
|
2023
|
-
"simulator.parameters": "Parameters",
|
|
2024
|
-
"simulator.reset": "Reset",
|
|
2025
|
-
"simulator.simulate": "Simulate",
|
|
2026
|
-
"simulator.target": "Target",
|
|
2027
|
-
"stateArchitect.addTransition": "Add transition from {{state}}",
|
|
2028
|
-
"stateArchitect.addTransitionPrompt": "Click target state",
|
|
2029
|
-
"stateArchitect.allPassed": "All tests passed!",
|
|
2030
|
-
"stateArchitect.clickTarget": "Click a target state (current: {{state}})",
|
|
2031
|
-
"stateArchitect.gotState": "Got state: {{state}}",
|
|
2032
|
-
"stateArchitect.graph": "Graph",
|
|
2033
|
-
"stateArchitect.hideJson": "Hide JSON",
|
|
2034
|
-
"stateArchitect.showJson": "Show JSON",
|
|
2035
|
-
"stateArchitect.testResults": "Test Results",
|
|
2036
|
-
"stateArchitect.transitions": "{{count}} transitions",
|
|
2037
|
-
"stateArchitect.variables": "Variables: {{name}}",
|
|
2038
|
-
"stateArchitect.viewCode": "View Code",
|
|
2039
|
-
"td.defeat": "Defeat",
|
|
2040
|
-
"td.gold": "Gold",
|
|
2041
|
-
"td.lives": "Lives",
|
|
2042
|
-
"td.livesReachedZero": "Your base was overrun",
|
|
2043
|
-
"td.placeTower": "Place tower",
|
|
2044
|
-
"td.playAgain": "Play Again",
|
|
2045
|
-
"td.startWave": "Start Wave",
|
|
2046
|
-
"td.survivedAllWaves": "Survived all waves!",
|
|
2047
|
-
"td.victory": "Victory!",
|
|
2048
|
-
"td.wave": "Wave",
|
|
2049
|
-
"td.waveInProgress": "Wave in progress\u2026"
|
|
2050
|
-
};
|
|
2051
|
-
|
|
2052
|
-
// hooks/useTranslate.ts
|
|
2053
|
-
var { $meta: _meta, ...coreMessages } = en_default;
|
|
2054
|
-
var coreLocale = coreMessages;
|
|
2055
|
-
var I18nContext = react.createContext({
|
|
2056
|
-
locale: "en",
|
|
2057
|
-
direction: "ltr",
|
|
2058
|
-
t: (key, params) => {
|
|
2059
|
-
let msg = coreLocale[key] ?? key;
|
|
2060
|
-
if (params) {
|
|
2061
|
-
for (const [k, v] of Object.entries(params)) {
|
|
2062
|
-
msg = msg.split(`{{${k}}}`).join(String(v));
|
|
2063
|
-
}
|
|
2064
|
-
}
|
|
2065
|
-
return msg;
|
|
2066
|
-
}
|
|
2067
|
-
});
|
|
2068
|
-
I18nContext.displayName = "I18nContext";
|
|
2069
|
-
var I18nProvider = I18nContext.Provider;
|
|
2070
|
-
function useTranslate() {
|
|
2071
|
-
return react.useContext(I18nContext);
|
|
2072
|
-
}
|
|
2073
|
-
function createTranslate(messages) {
|
|
2074
|
-
return (key, params) => {
|
|
2075
|
-
let msg = messages[key] ?? coreLocale[key] ?? key;
|
|
2076
|
-
if (params) {
|
|
2077
|
-
for (const [k, v] of Object.entries(params)) {
|
|
2078
|
-
msg = msg.split(`{{${k}}}`).join(String(v));
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
return msg;
|
|
2082
|
-
};
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
// hooks/useAuthContext.ts
|
|
2086
|
-
function useAuthContext() {
|
|
2087
|
-
return {
|
|
2088
|
-
user: null,
|
|
2089
|
-
loading: false,
|
|
2090
|
-
signIn: void 0,
|
|
2091
|
-
signOut: void 0
|
|
2092
|
-
};
|
|
2093
|
-
}
|
|
2094
|
-
function useSwipeGesture(callbacks, options = {}) {
|
|
2095
|
-
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
2096
|
-
const startX = react.useRef(0);
|
|
2097
|
-
const startY = react.useRef(0);
|
|
2098
|
-
const startTime = react.useRef(0);
|
|
2099
|
-
const currentX = react.useRef(0);
|
|
2100
|
-
const tracking = react.useRef(false);
|
|
2101
|
-
const offsetXRef = react.useRef(0);
|
|
2102
|
-
const isSwipingRef = react.useRef(false);
|
|
2103
|
-
const onPointerDown = react.useCallback((e) => {
|
|
2104
|
-
startX.current = e.clientX;
|
|
2105
|
-
startY.current = e.clientY;
|
|
2106
|
-
currentX.current = e.clientX;
|
|
2107
|
-
startTime.current = Date.now();
|
|
2108
|
-
tracking.current = true;
|
|
2109
|
-
isSwipingRef.current = false;
|
|
2110
|
-
offsetXRef.current = 0;
|
|
2111
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
2112
|
-
}, []);
|
|
2113
|
-
const onPointerMove = react.useCallback((e) => {
|
|
2114
|
-
if (!tracking.current) return;
|
|
2115
|
-
if (preventDefault) e.preventDefault();
|
|
2116
|
-
currentX.current = e.clientX;
|
|
2117
|
-
const dx = e.clientX - startX.current;
|
|
2118
|
-
const dy = e.clientY - startY.current;
|
|
2119
|
-
if (Math.abs(dx) > 10 && Math.abs(dx) > Math.abs(dy)) {
|
|
2120
|
-
isSwipingRef.current = true;
|
|
2121
|
-
offsetXRef.current = dx;
|
|
2122
|
-
}
|
|
2123
|
-
}, [preventDefault]);
|
|
2124
|
-
const onPointerUp = react.useCallback((e) => {
|
|
2125
|
-
if (!tracking.current) return;
|
|
2126
|
-
tracking.current = false;
|
|
2127
|
-
const dx = e.clientX - startX.current;
|
|
2128
|
-
const dy = e.clientY - startY.current;
|
|
2129
|
-
const elapsed = Date.now() - startTime.current;
|
|
2130
|
-
const velocity = Math.abs(dx) / Math.max(elapsed, 1);
|
|
2131
|
-
offsetXRef.current = 0;
|
|
2132
|
-
isSwipingRef.current = false;
|
|
2133
|
-
if (Math.abs(dx) < threshold && velocity < velocityThreshold) return;
|
|
2134
|
-
if (Math.abs(dx) > Math.abs(dy)) {
|
|
2135
|
-
if (dx < -threshold) callbacks.onSwipeLeft?.();
|
|
2136
|
-
else if (dx > threshold) callbacks.onSwipeRight?.();
|
|
2137
|
-
} else {
|
|
2138
|
-
if (dy < -threshold) callbacks.onSwipeUp?.();
|
|
2139
|
-
else if (dy > threshold) callbacks.onSwipeDown?.();
|
|
2140
|
-
}
|
|
2141
|
-
}, [threshold, velocityThreshold, callbacks]);
|
|
2142
|
-
const onPointerCancel = react.useCallback(() => {
|
|
2143
|
-
tracking.current = false;
|
|
2144
|
-
offsetXRef.current = 0;
|
|
2145
|
-
isSwipingRef.current = false;
|
|
2146
|
-
}, []);
|
|
2147
|
-
return {
|
|
2148
|
-
onPointerDown,
|
|
2149
|
-
onPointerMove,
|
|
2150
|
-
onPointerUp,
|
|
2151
|
-
onPointerCancel,
|
|
2152
|
-
offsetX: offsetXRef.current,
|
|
2153
|
-
isSwiping: isSwipingRef.current
|
|
2154
|
-
};
|
|
2155
|
-
}
|
|
2156
|
-
function useLongPress(onLongPress, options = {}) {
|
|
2157
|
-
const { duration = 500, moveThreshold = 10 } = options;
|
|
2158
|
-
const timerRef = react.useRef(null);
|
|
2159
|
-
const startPos = react.useRef({ x: 0, y: 0 });
|
|
2160
|
-
const isPressedRef = react.useRef(false);
|
|
2161
|
-
const firedRef = react.useRef(false);
|
|
2162
|
-
const cancel = react.useCallback(() => {
|
|
2163
|
-
if (timerRef.current) {
|
|
2164
|
-
clearTimeout(timerRef.current);
|
|
2165
|
-
timerRef.current = null;
|
|
2166
|
-
}
|
|
2167
|
-
isPressedRef.current = false;
|
|
2168
|
-
}, []);
|
|
2169
|
-
const onPointerDown = react.useCallback((e) => {
|
|
2170
|
-
firedRef.current = false;
|
|
2171
|
-
startPos.current = { x: e.clientX, y: e.clientY };
|
|
2172
|
-
isPressedRef.current = true;
|
|
2173
|
-
timerRef.current = setTimeout(() => {
|
|
2174
|
-
firedRef.current = true;
|
|
2175
|
-
isPressedRef.current = false;
|
|
2176
|
-
onLongPress();
|
|
2177
|
-
}, duration);
|
|
2178
|
-
}, [duration, onLongPress]);
|
|
2179
|
-
const onPointerMove = react.useCallback((e) => {
|
|
2180
|
-
if (!isPressedRef.current) return;
|
|
2181
|
-
const dx = e.clientX - startPos.current.x;
|
|
2182
|
-
const dy = e.clientY - startPos.current.y;
|
|
2183
|
-
if (Math.sqrt(dx * dx + dy * dy) > moveThreshold) {
|
|
2184
|
-
cancel();
|
|
2185
|
-
}
|
|
2186
|
-
}, [moveThreshold, cancel]);
|
|
2187
|
-
const onPointerUp = react.useCallback(() => {
|
|
2188
|
-
cancel();
|
|
2189
|
-
}, [cancel]);
|
|
2190
|
-
const onPointerCancel = react.useCallback(() => {
|
|
2191
|
-
cancel();
|
|
2192
|
-
}, [cancel]);
|
|
2193
|
-
return {
|
|
2194
|
-
onPointerDown,
|
|
2195
|
-
onPointerMove,
|
|
2196
|
-
onPointerUp,
|
|
2197
|
-
onPointerCancel,
|
|
2198
|
-
isPressed: isPressedRef.current
|
|
2199
|
-
};
|
|
2200
|
-
}
|
|
2201
|
-
function useDragReorder(initialItems, onReorder) {
|
|
2202
|
-
const [items, setItems] = react.useState(initialItems);
|
|
2203
|
-
const [dragIndex, setDragIndex] = react.useState(-1);
|
|
2204
|
-
const [dragOverIndex, setDragOverIndex] = react.useState(-1);
|
|
2205
|
-
const itemsRef = react.useRef(initialItems);
|
|
2206
|
-
if (initialItems !== itemsRef.current) {
|
|
2207
|
-
itemsRef.current = initialItems;
|
|
2208
|
-
setItems(initialItems);
|
|
2209
|
-
}
|
|
2210
|
-
const isDragging = dragIndex >= 0;
|
|
2211
|
-
const handleDragStart = react.useCallback((index) => (e) => {
|
|
2212
|
-
e.preventDefault();
|
|
2213
|
-
setDragIndex(index);
|
|
2214
|
-
setDragOverIndex(index);
|
|
2215
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
2216
|
-
}, []);
|
|
2217
|
-
const handleDragMove = react.useCallback((index) => (e) => {
|
|
2218
|
-
if (dragIndex < 0) return;
|
|
2219
|
-
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
2220
|
-
if (!target) return;
|
|
2221
|
-
let el = target;
|
|
2222
|
-
while (el && !el.dataset.dragIndex) {
|
|
2223
|
-
el = el.parentElement;
|
|
2224
|
-
}
|
|
2225
|
-
if (el?.dataset.dragIndex) {
|
|
2226
|
-
const overIndex = parseInt(el.dataset.dragIndex, 10);
|
|
2227
|
-
if (!isNaN(overIndex) && overIndex !== dragOverIndex) {
|
|
2228
|
-
setDragOverIndex(overIndex);
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
}, [dragIndex, dragOverIndex]);
|
|
2232
|
-
const handleDragEnd = react.useCallback(() => {
|
|
2233
|
-
if (dragIndex >= 0 && dragOverIndex >= 0 && dragIndex !== dragOverIndex) {
|
|
2234
|
-
const newItems = [...items];
|
|
2235
|
-
const [movedItem] = newItems.splice(dragIndex, 1);
|
|
2236
|
-
newItems.splice(dragOverIndex, 0, movedItem);
|
|
2237
|
-
setItems(newItems);
|
|
2238
|
-
onReorder(dragIndex, dragOverIndex, items[dragIndex]);
|
|
2239
|
-
}
|
|
2240
|
-
setDragIndex(-1);
|
|
2241
|
-
setDragOverIndex(-1);
|
|
2242
|
-
}, [dragIndex, dragOverIndex, items, onReorder]);
|
|
2243
|
-
const getDragHandleProps = react.useCallback((index) => ({
|
|
2244
|
-
onPointerDown: handleDragStart(index),
|
|
2245
|
-
style: { cursor: "grab", touchAction: "none" },
|
|
2246
|
-
"aria-grabbed": dragIndex === index,
|
|
2247
|
-
role: "button"
|
|
2248
|
-
}), [handleDragStart, dragIndex]);
|
|
2249
|
-
const getItemProps = react.useCallback((index) => ({
|
|
2250
|
-
onPointerMove: handleDragMove(index),
|
|
2251
|
-
onPointerUp: handleDragEnd,
|
|
2252
|
-
"aria-dropeffect": "move",
|
|
2253
|
-
"data-drag-index": String(index),
|
|
2254
|
-
style: {
|
|
2255
|
-
opacity: dragIndex === index ? 0.5 : 1,
|
|
2256
|
-
transition: isDragging ? "transform 150ms ease" : void 0,
|
|
2257
|
-
transform: isDragging && dragOverIndex >= 0 ? index === dragIndex ? "scale(1.02)" : index > dragIndex && index <= dragOverIndex ? "translateY(-100%)" : index < dragIndex && index >= dragOverIndex ? "translateY(100%)" : void 0 : void 0
|
|
2258
|
-
}
|
|
2259
|
-
}), [handleDragMove, handleDragEnd, dragIndex, dragOverIndex, isDragging]);
|
|
2260
|
-
return {
|
|
2261
|
-
items,
|
|
2262
|
-
dragIndex,
|
|
2263
|
-
dragOverIndex,
|
|
2264
|
-
isDragging,
|
|
2265
|
-
getDragHandleProps,
|
|
2266
|
-
getItemProps
|
|
2267
|
-
};
|
|
2268
|
-
}
|
|
2269
|
-
function useInfiniteScroll(onLoadMore, options = {}) {
|
|
2270
|
-
const { rootMargin = "200px", hasMore = true, isLoading = false } = options;
|
|
2271
|
-
const observerRef = react.useRef(null);
|
|
2272
|
-
const callbackRef = react.useRef(onLoadMore);
|
|
2273
|
-
callbackRef.current = onLoadMore;
|
|
2274
|
-
const hasMoreRef = react.useRef(hasMore);
|
|
2275
|
-
hasMoreRef.current = hasMore;
|
|
2276
|
-
const isLoadingRef = react.useRef(isLoading);
|
|
2277
|
-
isLoadingRef.current = isLoading;
|
|
2278
|
-
react.useEffect(() => {
|
|
2279
|
-
return () => {
|
|
2280
|
-
observerRef.current?.disconnect();
|
|
2281
|
-
};
|
|
2282
|
-
}, []);
|
|
2283
|
-
const sentinelRef = react.useCallback((node) => {
|
|
2284
|
-
observerRef.current?.disconnect();
|
|
2285
|
-
if (!node) return;
|
|
2286
|
-
observerRef.current = new IntersectionObserver(
|
|
2287
|
-
(entries) => {
|
|
2288
|
-
const entry = entries[0];
|
|
2289
|
-
if (entry.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
|
|
2290
|
-
callbackRef.current();
|
|
2291
|
-
}
|
|
2292
|
-
},
|
|
2293
|
-
{ rootMargin }
|
|
2294
|
-
);
|
|
2295
|
-
observerRef.current.observe(node);
|
|
2296
|
-
}, [rootMargin]);
|
|
2297
|
-
return { sentinelRef };
|
|
2298
|
-
}
|
|
2299
|
-
function usePullToRefresh(onRefresh, options = {}) {
|
|
2300
|
-
const { threshold = 60, maxPull = 120 } = options;
|
|
2301
|
-
const [pullDistance, setPullDistance] = react.useState(0);
|
|
2302
|
-
const [isPulling, setIsPulling] = react.useState(false);
|
|
2303
|
-
const [isRefreshing, setIsRefreshing] = react.useState(false);
|
|
2304
|
-
const startY = react.useRef(0);
|
|
2305
|
-
const scrollTopRef = react.useRef(0);
|
|
2306
|
-
const onTouchStart = react.useCallback((e) => {
|
|
2307
|
-
const container = e.currentTarget;
|
|
2308
|
-
scrollTopRef.current = container.scrollTop;
|
|
2309
|
-
if (scrollTopRef.current <= 0) {
|
|
2310
|
-
startY.current = e.touches[0].clientY;
|
|
2311
|
-
setIsPulling(true);
|
|
2312
|
-
}
|
|
2313
|
-
}, []);
|
|
2314
|
-
const onTouchMove = react.useCallback((e) => {
|
|
2315
|
-
if (!isPulling || isRefreshing) return;
|
|
2316
|
-
const container = e.currentTarget;
|
|
2317
|
-
if (container.scrollTop > 0) {
|
|
2318
|
-
setPullDistance(0);
|
|
2319
|
-
return;
|
|
2320
|
-
}
|
|
2321
|
-
const dy = e.touches[0].clientY - startY.current;
|
|
2322
|
-
if (dy > 0) {
|
|
2323
|
-
const distance = Math.min(dy * 0.5, maxPull);
|
|
2324
|
-
setPullDistance(distance);
|
|
2325
|
-
}
|
|
2326
|
-
}, [isPulling, isRefreshing, maxPull]);
|
|
2327
|
-
const onTouchEnd = react.useCallback(() => {
|
|
2328
|
-
if (!isPulling) return;
|
|
2329
|
-
setIsPulling(false);
|
|
2330
|
-
if (pullDistance >= threshold && !isRefreshing) {
|
|
2331
|
-
setIsRefreshing(true);
|
|
2332
|
-
setPullDistance(threshold);
|
|
2333
|
-
onRefresh();
|
|
2334
|
-
} else {
|
|
2335
|
-
setPullDistance(0);
|
|
2336
|
-
}
|
|
2337
|
-
}, [isPulling, pullDistance, threshold, isRefreshing, onRefresh]);
|
|
2338
|
-
const endRefresh = react.useCallback(() => {
|
|
2339
|
-
setIsRefreshing(false);
|
|
2340
|
-
setPullDistance(0);
|
|
2341
|
-
}, []);
|
|
2342
|
-
const containerProps = {
|
|
2343
|
-
onTouchStart,
|
|
2344
|
-
onTouchMove,
|
|
2345
|
-
onTouchEnd,
|
|
2346
|
-
style: {
|
|
2347
|
-
transform: pullDistance > 0 ? `translateY(${pullDistance}px)` : void 0,
|
|
2348
|
-
transition: isPulling ? "none" : "transform 300ms ease-out"
|
|
2349
|
-
}
|
|
2350
|
-
};
|
|
2351
|
-
return {
|
|
2352
|
-
pullDistance,
|
|
2353
|
-
isPulling,
|
|
2354
|
-
isRefreshing,
|
|
2355
|
-
containerProps,
|
|
2356
|
-
endRefresh
|
|
2357
|
-
};
|
|
2358
|
-
}
|
|
2359
|
-
function localPoint(canvas, clientX, clientY) {
|
|
2360
|
-
if (!canvas) return { x: clientX, y: clientY };
|
|
2361
|
-
const rect = canvas.getBoundingClientRect();
|
|
2362
|
-
return { x: clientX - rect.left, y: clientY - rect.top };
|
|
2363
|
-
}
|
|
2364
|
-
function useCanvasGestures(options) {
|
|
2365
|
-
const {
|
|
2366
|
-
canvasRef,
|
|
2367
|
-
enabled = true,
|
|
2368
|
-
wheelStep = 1.1,
|
|
2369
|
-
onPointerDown,
|
|
2370
|
-
onPointerMove,
|
|
2371
|
-
onPointerUp,
|
|
2372
|
-
onZoom,
|
|
2373
|
-
onPanDelta,
|
|
2374
|
-
onMultiTouchStart
|
|
2375
|
-
} = options;
|
|
2376
|
-
const pointers = react.useRef(/* @__PURE__ */ new Map());
|
|
2377
|
-
const pinch = react.useRef(null);
|
|
2378
|
-
const computePinch = react.useCallback(() => {
|
|
2379
|
-
const pts = [...pointers.current.values()];
|
|
2380
|
-
const dx = pts[1].x - pts[0].x;
|
|
2381
|
-
const dy = pts[1].y - pts[0].y;
|
|
2382
|
-
return {
|
|
2383
|
-
distance: Math.hypot(dx, dy) || 1,
|
|
2384
|
-
centroid: { x: (pts[0].x + pts[1].x) / 2, y: (pts[0].y + pts[1].y) / 2 }
|
|
2385
|
-
};
|
|
2386
|
-
}, []);
|
|
2387
|
-
const handlePointerDown = react.useCallback(
|
|
2388
|
-
(e) => {
|
|
2389
|
-
if (!enabled) return;
|
|
2390
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
2391
|
-
pointers.current.set(e.pointerId, localPoint(canvasRef.current, e.clientX, e.clientY));
|
|
2392
|
-
if (pointers.current.size === 2) {
|
|
2393
|
-
onMultiTouchStart?.();
|
|
2394
|
-
pinch.current = computePinch();
|
|
2395
|
-
} else if (pointers.current.size === 1) {
|
|
2396
|
-
onPointerDown?.(e);
|
|
2397
|
-
}
|
|
2398
|
-
},
|
|
2399
|
-
[enabled, canvasRef, onMultiTouchStart, computePinch, onPointerDown]
|
|
2400
|
-
);
|
|
2401
|
-
const handlePointerMove = react.useCallback(
|
|
2402
|
-
(e) => {
|
|
2403
|
-
if (!enabled) return;
|
|
2404
|
-
if (pointers.current.has(e.pointerId)) {
|
|
2405
|
-
pointers.current.set(e.pointerId, localPoint(canvasRef.current, e.clientX, e.clientY));
|
|
2406
|
-
}
|
|
2407
|
-
if (pointers.current.size >= 2 && pinch.current) {
|
|
2408
|
-
const next = computePinch();
|
|
2409
|
-
const prev = pinch.current;
|
|
2410
|
-
if (next.distance !== prev.distance) {
|
|
2411
|
-
onZoom?.(next.distance / prev.distance, next.centroid.x, next.centroid.y);
|
|
2412
|
-
}
|
|
2413
|
-
onPanDelta?.(next.centroid.x - prev.centroid.x, next.centroid.y - prev.centroid.y);
|
|
2414
|
-
pinch.current = next;
|
|
2415
|
-
return;
|
|
2416
|
-
}
|
|
2417
|
-
onPointerMove?.(e);
|
|
2418
|
-
},
|
|
2419
|
-
[enabled, canvasRef, computePinch, onZoom, onPanDelta, onPointerMove]
|
|
2420
|
-
);
|
|
2421
|
-
const endPointer = react.useCallback(
|
|
2422
|
-
(e, fireUp) => {
|
|
2423
|
-
const wasMulti = pointers.current.size >= 2;
|
|
2424
|
-
pointers.current.delete(e.pointerId);
|
|
2425
|
-
if (pointers.current.size < 2) pinch.current = null;
|
|
2426
|
-
if (wasMulti && pointers.current.size === 1) return;
|
|
2427
|
-
if (pointers.current.size === 0 && fireUp) onPointerUp?.(e);
|
|
2428
|
-
},
|
|
2429
|
-
[onPointerUp]
|
|
2430
|
-
);
|
|
2431
|
-
const handlePointerUp = react.useCallback(
|
|
2432
|
-
(e) => {
|
|
2433
|
-
if (!enabled) return;
|
|
2434
|
-
endPointer(e, true);
|
|
2435
|
-
},
|
|
2436
|
-
[enabled, endPointer]
|
|
2437
|
-
);
|
|
2438
|
-
const handlePointerCancel = react.useCallback(
|
|
2439
|
-
(e) => {
|
|
2440
|
-
if (!enabled) return;
|
|
2441
|
-
endPointer(e, false);
|
|
2442
|
-
},
|
|
2443
|
-
[enabled, endPointer]
|
|
2444
|
-
);
|
|
2445
|
-
const handleWheel = react.useCallback(
|
|
2446
|
-
(e) => {
|
|
2447
|
-
if (!enabled) return;
|
|
2448
|
-
e.preventDefault();
|
|
2449
|
-
const { x, y } = localPoint(canvasRef.current, e.clientX, e.clientY);
|
|
2450
|
-
onZoom?.(e.deltaY < 0 ? wheelStep : 1 / wheelStep, x, y);
|
|
2451
|
-
},
|
|
2452
|
-
[enabled, canvasRef, wheelStep, onZoom]
|
|
2453
|
-
);
|
|
2454
|
-
return {
|
|
2455
|
-
onPointerDown: handlePointerDown,
|
|
2456
|
-
onPointerMove: handlePointerMove,
|
|
2457
|
-
onPointerUp: handlePointerUp,
|
|
2458
|
-
onPointerCancel: handlePointerCancel,
|
|
2459
|
-
onWheel: handleWheel
|
|
2460
|
-
};
|
|
2461
|
-
}
|
|
2462
|
-
function useTapReveal(options = {}) {
|
|
2463
|
-
const { onReveal, onDismiss, refs, enabled = true } = options;
|
|
2464
|
-
const [revealed, setRevealed] = react.useState(false);
|
|
2465
|
-
const onRevealRef = react.useRef(onReveal);
|
|
2466
|
-
const onDismissRef = react.useRef(onDismiss);
|
|
2467
|
-
onRevealRef.current = onReveal;
|
|
2468
|
-
onDismissRef.current = onDismiss;
|
|
2469
|
-
const reveal = react.useCallback(() => {
|
|
2470
|
-
setRevealed((wasRevealed) => {
|
|
2471
|
-
if (!wasRevealed) onRevealRef.current?.();
|
|
2472
|
-
return true;
|
|
2473
|
-
});
|
|
2474
|
-
}, []);
|
|
2475
|
-
const dismiss = react.useCallback(() => {
|
|
2476
|
-
setRevealed((wasRevealed) => {
|
|
2477
|
-
if (wasRevealed) onDismissRef.current?.();
|
|
2478
|
-
return false;
|
|
2479
|
-
});
|
|
2480
|
-
}, []);
|
|
2481
|
-
const onPointerDown = react.useCallback(
|
|
2482
|
-
(e) => {
|
|
2483
|
-
if (!enabled || e.pointerType === "mouse") return;
|
|
2484
|
-
if (revealed) dismiss();
|
|
2485
|
-
else reveal();
|
|
2486
|
-
},
|
|
2487
|
-
[enabled, revealed, reveal, dismiss]
|
|
2488
|
-
);
|
|
2489
|
-
react.useEffect(() => {
|
|
2490
|
-
if (!revealed || typeof document === "undefined") return;
|
|
2491
|
-
const onDocDown = (ev) => {
|
|
2492
|
-
const target = ev.target;
|
|
2493
|
-
if (!(target instanceof Node)) return;
|
|
2494
|
-
const inside = (refs ?? []).some((r) => r.current?.contains(target));
|
|
2495
|
-
if (!inside) dismiss();
|
|
2496
|
-
};
|
|
2497
|
-
const id = setTimeout(() => document.addEventListener("pointerdown", onDocDown), 0);
|
|
2498
|
-
return () => {
|
|
2499
|
-
clearTimeout(id);
|
|
2500
|
-
document.removeEventListener("pointerdown", onDocDown);
|
|
2501
|
-
};
|
|
2502
|
-
}, [revealed, refs, dismiss]);
|
|
2503
|
-
return { revealed, triggerProps: { onPointerDown }, reveal, dismiss };
|
|
2504
|
-
}
|
|
2505
|
-
var ALMADAR_DND_MIME = "application/x-almadar-dnd";
|
|
2506
|
-
function useDraggable({ payload, disabled = false }) {
|
|
2507
|
-
const [isDragging, setIsDragging] = react.useState(false);
|
|
2508
|
-
const eventBus = useEventBus();
|
|
2509
|
-
const handleDragStart = react.useCallback(
|
|
2510
|
-
(e) => {
|
|
2511
|
-
if (disabled) {
|
|
2512
|
-
e.preventDefault();
|
|
2513
|
-
return;
|
|
2514
|
-
}
|
|
2515
|
-
e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
|
|
2516
|
-
e.dataTransfer.effectAllowed = "copy";
|
|
2517
|
-
setIsDragging(true);
|
|
2518
|
-
eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
|
|
2519
|
-
},
|
|
2520
|
-
[disabled, payload, eventBus]
|
|
2521
|
-
);
|
|
2522
|
-
const handleDragEnd = react.useCallback(
|
|
2523
|
-
(e) => {
|
|
2524
|
-
setIsDragging(false);
|
|
2525
|
-
eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
|
|
2526
|
-
},
|
|
2527
|
-
[payload, eventBus]
|
|
2528
|
-
);
|
|
2529
|
-
const dragProps = react.useMemo(
|
|
2530
|
-
() => ({
|
|
2531
|
-
draggable: !disabled,
|
|
2532
|
-
onDragStart: handleDragStart,
|
|
2533
|
-
onDragEnd: handleDragEnd,
|
|
2534
|
-
"aria-grabbed": isDragging
|
|
2535
|
-
}),
|
|
2536
|
-
[disabled, handleDragStart, handleDragEnd, isDragging]
|
|
2537
|
-
);
|
|
2538
|
-
return { dragProps, isDragging };
|
|
2539
|
-
}
|
|
2540
|
-
function parsePayload(e) {
|
|
2541
|
-
try {
|
|
2542
|
-
const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
|
|
2543
|
-
if (!raw) return null;
|
|
2544
|
-
const parsed = JSON.parse(raw);
|
|
2545
|
-
if (typeof parsed.kind !== "string" || !parsed.data) return null;
|
|
2546
|
-
return parsed;
|
|
2547
|
-
} catch {
|
|
2548
|
-
return null;
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
function hasAlmadarPayload(e) {
|
|
2552
|
-
return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
|
|
2553
|
-
}
|
|
2554
|
-
function useDropZone({ accepts, onDrop, disabled = false }) {
|
|
2555
|
-
const [isOver, setIsOver] = react.useState(false);
|
|
2556
|
-
const eventBus = useEventBus();
|
|
2557
|
-
const handleDragOver = react.useCallback(
|
|
2558
|
-
(e) => {
|
|
2559
|
-
if (disabled) return;
|
|
2560
|
-
if (!hasAlmadarPayload(e)) return;
|
|
2561
|
-
e.preventDefault();
|
|
2562
|
-
e.dataTransfer.dropEffect = "copy";
|
|
2563
|
-
setIsOver(true);
|
|
2564
|
-
},
|
|
2565
|
-
[disabled]
|
|
2566
|
-
);
|
|
2567
|
-
const handleDragLeave = react.useCallback(
|
|
2568
|
-
(e) => {
|
|
2569
|
-
setIsOver(false);
|
|
2570
|
-
},
|
|
2571
|
-
[]
|
|
2572
|
-
);
|
|
2573
|
-
const handleDrop = react.useCallback(
|
|
2574
|
-
(e) => {
|
|
2575
|
-
e.preventDefault();
|
|
2576
|
-
setIsOver(false);
|
|
2577
|
-
if (disabled) return;
|
|
2578
|
-
const payload = parsePayload(e);
|
|
2579
|
-
if (!payload) return;
|
|
2580
|
-
if (!accepts.includes(payload.kind)) return;
|
|
2581
|
-
const position = { x: e.clientX, y: e.clientY };
|
|
2582
|
-
onDrop(payload, position);
|
|
2583
|
-
eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
|
|
2584
|
-
},
|
|
2585
|
-
[disabled, accepts, onDrop, eventBus]
|
|
2586
|
-
);
|
|
2587
|
-
const dropProps = react.useMemo(
|
|
2588
|
-
() => ({
|
|
2589
|
-
onDragOver: handleDragOver,
|
|
2590
|
-
onDragLeave: handleDragLeave,
|
|
2591
|
-
onDrop: handleDrop
|
|
2592
|
-
}),
|
|
2593
|
-
[handleDragOver, handleDragLeave, handleDrop]
|
|
2594
|
-
);
|
|
2595
|
-
return { dropProps, isOver };
|
|
2596
|
-
}
|
|
2597
|
-
function useRenderInterpolation(options = {}) {
|
|
2598
|
-
const tickIntervalMs = options.tickIntervalMs ?? 1e3 / 30;
|
|
2599
|
-
const prevRef = react.useRef(null);
|
|
2600
|
-
const currRef = react.useRef(null);
|
|
2601
|
-
const rafRef = react.useRef(null);
|
|
2602
|
-
const onSnapshot = react.useCallback((entities) => {
|
|
2603
|
-
prevRef.current = currRef.current;
|
|
2604
|
-
currRef.current = { entities, arrivedAt: performance.now() };
|
|
2605
|
-
}, []);
|
|
2606
|
-
const getInterpolated = react.useCallback((now) => {
|
|
2607
|
-
const out = /* @__PURE__ */ new Map();
|
|
2608
|
-
const curr = currRef.current;
|
|
2609
|
-
if (!curr) return out;
|
|
2610
|
-
const prev = prevRef.current;
|
|
2611
|
-
if (!prev) {
|
|
2612
|
-
for (const e of curr.entities) out.set(e.id, { x: e.x, y: e.y });
|
|
2613
|
-
return out;
|
|
2614
|
-
}
|
|
2615
|
-
const rawAlpha = (now - curr.arrivedAt) / tickIntervalMs;
|
|
2616
|
-
const alpha = rawAlpha < 0 ? 0 : rawAlpha > 1 ? 1 : rawAlpha;
|
|
2617
|
-
const prevMap = /* @__PURE__ */ new Map();
|
|
2618
|
-
for (const e of prev.entities) prevMap.set(e.id, e);
|
|
2619
|
-
for (const c of curr.entities) {
|
|
2620
|
-
const p = prevMap.get(c.id);
|
|
2621
|
-
if (!p) {
|
|
2622
|
-
out.set(c.id, { x: c.x, y: c.y });
|
|
2623
|
-
} else {
|
|
2624
|
-
out.set(c.id, {
|
|
2625
|
-
x: p.x + (c.x - p.x) * alpha,
|
|
2626
|
-
y: p.y + (c.y - p.y) * alpha
|
|
2627
|
-
});
|
|
2628
|
-
}
|
|
2629
|
-
}
|
|
2630
|
-
return out;
|
|
2631
|
-
}, [tickIntervalMs]);
|
|
2632
|
-
const startLoop = react.useCallback(
|
|
2633
|
-
(draw) => {
|
|
2634
|
-
let active = true;
|
|
2635
|
-
const loop = () => {
|
|
2636
|
-
if (!active) return;
|
|
2637
|
-
try {
|
|
2638
|
-
draw(getInterpolated(performance.now()));
|
|
2639
|
-
} catch {
|
|
2640
|
-
}
|
|
2641
|
-
rafRef.current = requestAnimationFrame(loop);
|
|
2642
|
-
};
|
|
2643
|
-
rafRef.current = requestAnimationFrame(loop);
|
|
2644
|
-
return () => {
|
|
2645
|
-
active = false;
|
|
2646
|
-
if (rafRef.current !== null) {
|
|
2647
|
-
cancelAnimationFrame(rafRef.current);
|
|
2648
|
-
rafRef.current = null;
|
|
2649
|
-
}
|
|
2650
|
-
};
|
|
2651
|
-
},
|
|
2652
|
-
[getInterpolated]
|
|
2653
|
-
);
|
|
2654
|
-
react.useEffect(() => {
|
|
2655
|
-
return () => {
|
|
2656
|
-
if (rafRef.current !== null) {
|
|
2657
|
-
cancelAnimationFrame(rafRef.current);
|
|
2658
|
-
rafRef.current = null;
|
|
2659
|
-
}
|
|
2660
|
-
};
|
|
2661
|
-
}, []);
|
|
2662
|
-
return { onSnapshot, getInterpolated, startLoop };
|
|
2663
|
-
}
|
|
2664
|
-
var API_BASE = typeof process !== "undefined" && process.env?.VITE_API_URL ? process.env.VITE_API_URL : "http://localhost:3000";
|
|
2665
|
-
function getUserId() {
|
|
2666
|
-
return localStorage.getItem("userId") || "anonymous";
|
|
2667
|
-
}
|
|
2668
|
-
async function fetchWithAuth(endpoint, options) {
|
|
2669
|
-
const userId = getUserId();
|
|
2670
|
-
const response = await fetch(`${API_BASE}${endpoint}`, {
|
|
2671
|
-
...options,
|
|
2672
|
-
headers: {
|
|
2673
|
-
"Content-Type": "application/json",
|
|
2674
|
-
"x-user-id": userId,
|
|
2675
|
-
...options?.headers
|
|
2676
|
-
}
|
|
2677
|
-
});
|
|
2678
|
-
if (!response.ok) {
|
|
2679
|
-
const error = await response.json().catch(() => ({ error: response.statusText }));
|
|
2680
|
-
throw new Error(error.error || error.message || "Request failed");
|
|
2681
|
-
}
|
|
2682
|
-
return response.json();
|
|
2683
|
-
}
|
|
2684
|
-
function useGitHubStatus() {
|
|
2685
|
-
return reactQuery.useQuery({
|
|
2686
|
-
queryKey: ["github", "status"],
|
|
2687
|
-
queryFn: () => fetchWithAuth("/api/github/status"),
|
|
2688
|
-
staleTime: 6e4,
|
|
2689
|
-
// 1 minute
|
|
2690
|
-
retry: false
|
|
2691
|
-
});
|
|
2692
|
-
}
|
|
2693
|
-
function useConnectGitHub() {
|
|
2694
|
-
const connectGitHub = react.useCallback(() => {
|
|
2695
|
-
const userId = getUserId();
|
|
2696
|
-
const state = btoa(JSON.stringify({ userId, returnUrl: window.location.href }));
|
|
2697
|
-
window.location.href = `${API_BASE}/api/github/oauth/authorize?state=${state}`;
|
|
2698
|
-
}, []);
|
|
2699
|
-
return { connectGitHub };
|
|
2700
|
-
}
|
|
2701
|
-
function useDisconnectGitHub() {
|
|
2702
|
-
const queryClient = reactQuery.useQueryClient();
|
|
2703
|
-
return reactQuery.useMutation({
|
|
2704
|
-
mutationFn: () => fetchWithAuth("/api/github/disconnect", { method: "POST" }),
|
|
2705
|
-
onSuccess: () => {
|
|
2706
|
-
queryClient.invalidateQueries({ queryKey: ["github", "status"] });
|
|
2707
|
-
queryClient.removeQueries({ queryKey: ["github", "repos"] });
|
|
2708
|
-
}
|
|
2709
|
-
});
|
|
2710
|
-
}
|
|
2711
|
-
function useGitHubRepos(page = 1, perPage = 30) {
|
|
2712
|
-
return reactQuery.useQuery({
|
|
2713
|
-
queryKey: ["github", "repos", page, perPage],
|
|
2714
|
-
queryFn: () => fetchWithAuth(`/api/github/repos?page=${page}&per_page=${perPage}`),
|
|
2715
|
-
enabled: true,
|
|
2716
|
-
// Only fetch if user is connected
|
|
2717
|
-
staleTime: 3e5
|
|
2718
|
-
// 5 minutes
|
|
2719
|
-
});
|
|
2720
|
-
}
|
|
2721
|
-
function useGitHubRepo(owner, repo, enabled = true) {
|
|
2722
|
-
return reactQuery.useQuery({
|
|
2723
|
-
queryKey: ["github", "repo", owner, repo],
|
|
2724
|
-
queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}`),
|
|
2725
|
-
enabled: enabled && !!owner && !!repo,
|
|
2726
|
-
staleTime: 3e5
|
|
2727
|
-
// 5 minutes
|
|
2728
|
-
});
|
|
2729
|
-
}
|
|
2730
|
-
function useGitHubBranches(owner, repo, enabled = true) {
|
|
2731
|
-
return reactQuery.useQuery({
|
|
2732
|
-
queryKey: ["github", "branches", owner, repo],
|
|
2733
|
-
queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}/branches`),
|
|
2734
|
-
enabled: enabled && !!owner && !!repo,
|
|
2735
|
-
staleTime: 6e4
|
|
2736
|
-
// 1 minute
|
|
2737
|
-
});
|
|
2738
|
-
}
|
|
2739
|
-
|
|
2740
|
-
exports.ALMADAR_DND_MIME = ALMADAR_DND_MIME;
|
|
2741
|
-
exports.DEFAULT_SLOTS = DEFAULT_SLOTS;
|
|
2742
|
-
exports.I18nProvider = I18nProvider;
|
|
2743
|
-
exports.createTranslate = createTranslate;
|
|
2744
|
-
exports.parseQueryBinding = parseQueryBinding;
|
|
2745
|
-
exports.useAgentChat = useAgentChat;
|
|
2746
|
-
exports.useAuthContext = useAuthContext;
|
|
2747
|
-
exports.useCanvasGestures = useCanvasGestures;
|
|
2748
|
-
exports.useCompile = useCompile;
|
|
2749
|
-
exports.useConnectGitHub = useConnectGitHub;
|
|
2750
|
-
exports.useDeepAgentGeneration = useDeepAgentGeneration;
|
|
2751
|
-
exports.useDisconnectGitHub = useDisconnectGitHub;
|
|
2752
|
-
exports.useDragReorder = useDragReorder;
|
|
2753
|
-
exports.useDraggable = useDraggable;
|
|
2754
|
-
exports.useDropZone = useDropZone;
|
|
2755
|
-
exports.useEmitEvent = useEmitEvent;
|
|
2756
|
-
exports.useEventBus = useEventBus;
|
|
2757
|
-
exports.useEventListener = useEventListener;
|
|
2758
|
-
exports.useExtensions = useExtensions;
|
|
2759
|
-
exports.useFileEditor = useFileEditor;
|
|
2760
|
-
exports.useFileSystem = useFileSystem;
|
|
2761
|
-
exports.useGitHubBranches = useGitHubBranches;
|
|
2762
|
-
exports.useGitHubRepo = useGitHubRepo;
|
|
2763
|
-
exports.useGitHubRepos = useGitHubRepos;
|
|
2764
|
-
exports.useGitHubStatus = useGitHubStatus;
|
|
2765
|
-
exports.useInfiniteScroll = useInfiniteScroll;
|
|
2766
|
-
exports.useLongPress = useLongPress;
|
|
2767
|
-
exports.useOrbitalHistory = useOrbitalHistory;
|
|
2768
|
-
exports.usePreview = usePreview;
|
|
2769
|
-
exports.usePullToRefresh = usePullToRefresh;
|
|
2770
|
-
exports.useQuerySingleton = useQuerySingleton;
|
|
2771
|
-
exports.useRenderInterpolation = useRenderInterpolation;
|
|
2772
|
-
exports.useSwipeGesture = useSwipeGesture;
|
|
2773
|
-
exports.useTapReveal = useTapReveal;
|
|
2774
|
-
exports.useTraitListens = useTraitListens;
|
|
2775
|
-
exports.useTranslate = useTranslate;
|
|
2776
|
-
exports.useUIEvents = useUIEvents;
|
|
2777
|
-
exports.useUISlotManager = useUISlotManager;
|
|
2778
|
-
exports.useValidation = useValidation;
|