@almadar/ui 2.14.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-M7MOIE46.js → chunk-4KP6IZEQ.js} +1 -1
- package/dist/{chunk-SKWPSQHQ.js → chunk-YPY74G7F.js} +16 -8
- package/dist/components/atoms/AnimatedCounter.d.ts +20 -0
- package/dist/components/atoms/Avatar.d.ts +58 -0
- package/dist/components/atoms/Badge.d.ts +14 -0
- package/dist/components/atoms/Box.d.ts +57 -0
- package/dist/components/atoms/Button.d.ts +24 -0
- package/dist/components/atoms/Card.d.ts +18 -0
- package/dist/components/atoms/Center.d.ts +33 -0
- package/dist/components/atoms/Checkbox.d.ts +9 -0
- package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
- package/dist/components/atoms/ConfettiEffect.d.ts +19 -0
- package/dist/components/atoms/DayCell.d.ts +21 -0
- package/dist/components/atoms/Divider.d.ts +29 -0
- package/dist/components/atoms/FlipContainer.d.ts +21 -0
- package/dist/components/atoms/Icon.d.ts +39 -0
- package/dist/components/atoms/InfiniteScrollSentinel.d.ts +23 -0
- package/dist/components/atoms/Input.d.ts +26 -0
- package/dist/components/atoms/Label.d.ts +5 -0
- package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
- package/dist/components/atoms/Overlay.d.ts +16 -0
- package/dist/components/atoms/ProgressBar.d.ts +63 -0
- package/dist/components/atoms/Radio.d.ts +26 -0
- package/dist/components/atoms/RangeSlider.d.ts +31 -0
- package/dist/components/atoms/Select.d.ts +12 -0
- package/dist/components/atoms/Spacer.d.ts +25 -0
- package/dist/components/atoms/Spinner.d.ts +6 -0
- package/dist/components/atoms/Stack.d.ts +66 -0
- package/dist/components/atoms/StatusDot.d.ts +14 -0
- package/dist/components/atoms/Switch.d.ts +12 -0
- package/dist/components/atoms/TextHighlight.d.ts +53 -0
- package/dist/components/atoms/Textarea.d.ts +5 -0
- package/dist/components/atoms/ThemeSelector.d.ts +21 -0
- package/dist/components/atoms/ThemeToggle.d.ts +33 -0
- package/dist/components/atoms/TimeSlotCell.d.ts +23 -0
- package/dist/components/atoms/TrendIndicator.d.ts +18 -0
- package/dist/components/atoms/TypewriterText.d.ts +20 -0
- package/dist/components/atoms/Typography.d.ts +57 -0
- package/dist/components/atoms/game/ActionButton.d.ts +25 -0
- package/dist/components/atoms/game/ChoiceButton.d.ts +18 -0
- package/dist/components/atoms/game/ComboCounter.d.ts +16 -0
- package/dist/components/atoms/game/ControlButton.d.ts +31 -0
- package/dist/components/atoms/game/DamageNumber.d.ts +14 -0
- package/dist/components/atoms/game/DialogueBubble.d.ts +16 -0
- package/dist/components/atoms/game/HealthBar.d.ts +18 -0
- package/dist/components/atoms/game/ItemSlot.d.ts +25 -0
- package/dist/components/atoms/game/MiniMap.d.ts +36 -0
- package/dist/components/atoms/game/ResourceCounter.d.ts +21 -0
- package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
- package/dist/components/atoms/game/Sprite.d.ts +63 -0
- package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
- package/dist/components/atoms/game/StatusEffect.d.ts +21 -0
- package/dist/components/atoms/game/TimerDisplay.d.ts +18 -0
- package/dist/components/atoms/game/TurnIndicator.d.ts +18 -0
- package/dist/components/atoms/game/WaypointMarker.d.ts +19 -0
- package/dist/components/atoms/game/XPBar.d.ts +20 -0
- package/dist/components/atoms/game/index.d.ts +25 -0
- package/dist/components/atoms/index.d.ts +37 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +2 -2
- package/dist/components/molecules/Accordion.d.ts +67 -0
- package/dist/components/molecules/Alert.d.ts +24 -0
- package/dist/components/molecules/Breadcrumb.d.ts +55 -0
- package/dist/components/molecules/ButtonGroup.d.ts +67 -0
- package/dist/components/molecules/CalendarGrid.d.ts +43 -0
- package/dist/components/molecules/Card.d.ts +56 -0
- package/dist/components/molecules/Carousel.d.ts +31 -0
- package/dist/components/molecules/ChartLegend.d.ts +20 -0
- package/dist/components/molecules/Container.d.ts +30 -0
- package/dist/components/molecules/DataGrid.d.ts +75 -0
- package/dist/components/molecules/DataList.d.ts +95 -0
- package/dist/components/molecules/DateRangeSelector.d.ts +22 -0
- package/dist/components/molecules/Drawer.d.ts +46 -0
- package/dist/components/molecules/EmptyState.d.ts +25 -0
- package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
- package/dist/components/molecules/ErrorState.d.ts +13 -0
- package/dist/components/molecules/FilterGroup.d.ts +54 -0
- package/dist/components/molecules/Flex.d.ts +43 -0
- package/dist/components/molecules/FlipCard.d.ts +25 -0
- package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
- package/dist/components/molecules/FormField.d.ts +16 -0
- package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
- package/dist/components/molecules/GraphView.d.ts +45 -0
- package/dist/components/molecules/Grid.d.ts +54 -0
- package/dist/components/molecules/InputGroup.d.ts +24 -0
- package/dist/components/molecules/Lightbox.d.ts +25 -0
- package/dist/components/molecules/LineChart.d.ts +33 -0
- package/dist/components/molecules/LoadingState.d.ts +7 -0
- package/dist/components/molecules/MapView.d.ts +40 -0
- package/dist/components/molecules/Menu.d.ts +40 -0
- package/dist/components/molecules/Meter.d.ts +51 -0
- package/dist/components/molecules/Modal.d.ts +28 -0
- package/dist/components/molecules/NumberStepper.d.ts +27 -0
- package/dist/components/molecules/Pagination.d.ts +66 -0
- package/dist/components/molecules/Popover.d.ts +39 -0
- package/dist/components/molecules/ProgressDots.d.ts +24 -0
- package/dist/components/molecules/PullToRefresh.d.ts +21 -0
- package/dist/components/molecules/QuizBlock.d.ts +20 -0
- package/dist/components/molecules/RelationSelect.d.ts +48 -0
- package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
- package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
- package/dist/components/molecules/SearchInput.d.ts +60 -0
- package/dist/components/molecules/SidePanel.d.ts +47 -0
- package/dist/components/molecules/SimpleGrid.d.ts +27 -0
- package/dist/components/molecules/Skeleton.d.ts +35 -0
- package/dist/components/molecules/SortableList.d.ts +17 -0
- package/dist/components/molecules/StarRating.d.ts +26 -0
- package/dist/components/molecules/StatDisplay.d.ts +37 -0
- package/dist/components/molecules/SwipeableRow.d.ts +24 -0
- package/dist/components/molecules/Tabs.d.ts +45 -0
- package/dist/components/molecules/Toast.d.ts +35 -0
- package/dist/components/molecules/Tooltip.d.ts +25 -0
- package/dist/components/molecules/UploadDropZone.d.ts +26 -0
- package/dist/components/molecules/ViolationAlert.d.ts +49 -0
- package/dist/components/molecules/WizardNavigation.d.ts +51 -0
- package/dist/components/molecules/WizardProgress.d.ts +42 -0
- package/dist/components/molecules/game/ActionButtons.d.ts +34 -0
- package/dist/components/molecules/game/CombatLog.d.ts +30 -0
- package/dist/components/molecules/game/CraftingRecipe.d.ts +33 -0
- package/dist/components/molecules/game/DPad.d.ts +22 -0
- package/dist/components/molecules/game/DialogueBox.d.ts +78 -0
- package/dist/components/molecules/game/EnemyPlate.d.ts +27 -0
- package/dist/components/molecules/game/GameCanvas2D.d.ts +18 -0
- package/dist/components/molecules/game/GameHud.d.ts +49 -0
- package/dist/components/molecules/game/GameMenu.d.ts +43 -0
- package/dist/components/molecules/game/GameOverScreen.d.ts +56 -0
- package/dist/components/molecules/game/HealthPanel.d.ts +27 -0
- package/dist/components/molecules/game/InventoryGrid.d.ts +30 -0
- package/dist/components/molecules/game/InventoryPanel.d.ts +67 -0
- package/dist/components/molecules/game/IsometricCanvas.d.ts +127 -0
- package/dist/components/molecules/game/PlatformerCanvas.d.ts +52 -0
- package/dist/components/molecules/game/PowerupSlots.d.ts +23 -0
- package/dist/components/molecules/game/QuestTracker.d.ts +20 -0
- package/dist/components/molecules/game/ResourceBar.d.ts +23 -0
- package/dist/components/molecules/game/ScoreBoard.d.ts +18 -0
- package/dist/components/molecules/game/StatBadge.d.ts +27 -0
- package/dist/components/molecules/game/TurnPanel.d.ts +29 -0
- package/dist/components/molecules/game/UnitCommandBar.d.ts +25 -0
- package/dist/components/molecules/game/index.d.ts +30 -0
- package/dist/components/molecules/index.d.ts +59 -0
- package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
- package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
- package/dist/components/molecules/markdown/index.d.ts +2 -0
- package/dist/components/organisms/CardGrid.d.ts +80 -0
- package/dist/components/organisms/Chart.d.ts +59 -0
- package/dist/components/organisms/CodeViewer.d.ts +67 -0
- package/dist/components/organisms/ComponentPatterns.d.ts +453 -0
- package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
- package/dist/components/organisms/ContentRenderer.d.ts +23 -0
- package/dist/components/organisms/CustomPattern.d.ts +104 -0
- package/dist/components/organisms/DataTable.d.ts +67 -0
- package/dist/components/organisms/DetailPanel.d.ts +78 -0
- package/dist/components/organisms/DocumentViewer.d.ts +60 -0
- package/dist/components/organisms/DrawerSlot.d.ts +39 -0
- package/dist/components/organisms/Form.d.ts +206 -0
- package/dist/components/organisms/FormSection.d.ts +41 -0
- package/dist/components/organisms/GraphCanvas.d.ts +69 -0
- package/dist/components/organisms/Header.d.ts +110 -0
- package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
- package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
- package/dist/components/organisms/List.d.ts +78 -0
- package/dist/components/organisms/MasterDetail.d.ts +32 -0
- package/dist/components/organisms/MediaGallery.d.ts +57 -0
- package/dist/components/organisms/Meter.d.ts +58 -0
- package/dist/components/organisms/ModalSlot.d.ts +35 -0
- package/dist/components/organisms/Navigation.d.ts +68 -0
- package/dist/components/organisms/NotifyListener.d.ts +15 -0
- package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
- package/dist/components/organisms/PageHeader.d.ts +59 -0
- package/dist/components/organisms/Section.d.ts +44 -0
- package/dist/components/organisms/Sidebar.d.ts +63 -0
- package/dist/components/organisms/SignaturePad.d.ts +44 -0
- package/dist/components/organisms/Split.d.ts +42 -0
- package/dist/components/organisms/StatCard.d.ts +62 -0
- package/dist/components/organisms/StateMachineView.d.ts +36 -0
- package/dist/components/organisms/Table.d.ts +99 -0
- package/dist/components/organisms/Timeline.d.ts +49 -0
- package/dist/components/organisms/ToastSlot.d.ts +38 -0
- package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
- package/dist/components/organisms/WizardContainer.d.ts +160 -0
- package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
- package/dist/components/organisms/book/BookCoverPage.d.ts +20 -0
- package/dist/components/organisms/book/BookNavBar.d.ts +19 -0
- package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
- package/dist/components/organisms/book/BookViewer.d.ts +28 -0
- package/dist/components/organisms/book/index.d.ts +7 -0
- package/dist/components/organisms/book/types.d.ts +77 -0
- package/dist/components/organisms/component-registry.generated.d.ts +9 -0
- package/dist/components/organisms/debug/RuntimeDebugger.d.ts +19 -0
- package/dist/components/organisms/debug/hooks/useDebugData.d.ts +25 -0
- package/dist/components/organisms/debug/index.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/EntitiesTab.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/EventDispatcherTab.d.ts +16 -0
- package/dist/components/organisms/debug/tabs/EventFlowTab.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/GuardsPanel.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/ServerBridgeTab.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/TicksTab.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/TraitsTab.d.ts +13 -0
- package/dist/components/organisms/debug/tabs/TransitionTimeline.d.ts +9 -0
- package/dist/components/organisms/debug/tabs/VerificationTab.d.ts +10 -0
- package/dist/components/organisms/game/BattleBoard.d.ts +175 -0
- package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
- package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
- package/dist/components/organisms/game/CombatLog.d.ts +2 -0
- package/dist/components/organisms/game/DialogueBox.d.ts +2 -0
- package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
- package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
- package/dist/components/organisms/game/GameCanvas3D.d.ts +181 -0
- package/dist/components/organisms/game/GameHud.d.ts +2 -0
- package/dist/components/organisms/game/GameMenu.d.ts +2 -0
- package/dist/components/organisms/game/GameOverScreen.d.ts +2 -0
- package/dist/components/organisms/game/InventoryPanel.d.ts +2 -0
- package/dist/components/organisms/game/IsometricCanvas.d.ts +3 -0
- package/dist/components/organisms/game/PlatformerCanvas.d.ts +2 -0
- package/dist/components/organisms/game/TraitSlot.d.ts +90 -0
- package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
- package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
- package/dist/components/organisms/game/WorldMapBoard.d.ts +156 -0
- package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
- package/dist/components/organisms/game/editor/index.d.ts +9 -0
- package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
- package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
- package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
- package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
- package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
- package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
- package/dist/components/organisms/game/index.d.ts +52 -0
- package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
- package/dist/components/organisms/game/physics-sim/SimulationCanvas.d.ts +20 -0
- package/dist/components/organisms/game/physics-sim/SimulationControls.d.ts +28 -0
- package/dist/components/organisms/game/physics-sim/SimulationGraph.d.ts +25 -0
- package/dist/components/organisms/game/physics-sim/index.d.ts +7 -0
- package/dist/components/organisms/game/physics-sim/presets/index.d.ts +4 -0
- package/dist/components/organisms/game/physics-sim/presets/mechanics.d.ts +4 -0
- package/dist/components/organisms/game/physics-sim/presets/types.d.ts +43 -0
- package/dist/components/organisms/game/puzzles/builder/BuilderBoard.d.ts +52 -0
- package/dist/components/organisms/game/puzzles/builder/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/classifier/ClassifierBoard.d.ts +53 -0
- package/dist/components/organisms/game/puzzles/classifier/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/debugger/DebuggerBoard.d.ts +45 -0
- package/dist/components/organisms/game/puzzles/debugger/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/event-handler/EventHandlerBoard.d.ts +55 -0
- package/dist/components/organisms/game/puzzles/event-handler/EventLog.d.ts +31 -0
- package/dist/components/organisms/game/puzzles/event-handler/ObjectRulePanel.d.ts +45 -0
- package/dist/components/organisms/game/puzzles/event-handler/RuleEditor.d.ts +41 -0
- package/dist/components/organisms/game/puzzles/event-handler/index.d.ts +8 -0
- package/dist/components/organisms/game/puzzles/negotiator/NegotiatorBoard.d.ts +54 -0
- package/dist/components/organisms/game/puzzles/negotiator/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/sequencer/ActionPalette.d.ts +34 -0
- package/dist/components/organisms/game/puzzles/sequencer/ActionTile.d.ts +30 -0
- package/dist/components/organisms/game/puzzles/sequencer/SequenceBar.d.ts +41 -0
- package/dist/components/organisms/game/puzzles/sequencer/SequencerBoard.d.ts +72 -0
- package/dist/components/organisms/game/puzzles/sequencer/index.d.ts +8 -0
- package/dist/components/organisms/game/puzzles/simulator/SimulatorBoard.d.ts +54 -0
- package/dist/components/organisms/game/puzzles/simulator/index.d.ts +2 -0
- package/dist/components/organisms/game/puzzles/state-architect/CodeView.d.ts +24 -0
- package/dist/components/organisms/game/puzzles/state-architect/StateArchitectBoard.d.ts +76 -0
- package/dist/components/organisms/game/puzzles/state-architect/StateNode.d.ts +33 -0
- package/dist/components/organisms/game/puzzles/state-architect/TransitionArrow.d.ts +36 -0
- package/dist/components/organisms/game/puzzles/state-architect/VariablePanel.d.ts +28 -0
- package/dist/components/organisms/game/puzzles/state-architect/index.d.ts +10 -0
- package/dist/components/organisms/game/three/Camera3D.d.ts +60 -0
- package/dist/components/organisms/game/three/Lighting3D.d.ts +47 -0
- package/dist/components/organisms/game/three/Scene3D.d.ts +37 -0
- package/dist/components/organisms/game/three/components/Canvas3DErrorBoundary.d.ts +51 -0
- package/dist/components/organisms/game/three/components/Canvas3DLoadingState.d.ts +44 -0
- package/dist/components/organisms/game/three/components/ModelLoader.d.ts +44 -0
- package/dist/components/organisms/game/three/components/PhysicsObject3D.d.ts +74 -0
- package/dist/components/organisms/game/three/components/index.d.ts +10 -0
- package/dist/components/organisms/game/three/hooks/useAssetLoader.d.ts +58 -0
- package/dist/components/organisms/game/three/hooks/useGameCanvas3DEvents.d.ts +79 -0
- package/dist/components/organisms/game/three/hooks/useRaycaster.d.ts +86 -0
- package/dist/components/organisms/game/three/hooks/useSceneGraph.d.ts +66 -0
- package/dist/components/organisms/game/three/hooks/useThree.d.ts +58 -0
- package/dist/components/organisms/game/three/index.d.ts +23 -0
- package/dist/components/organisms/game/three/loaders/AssetLoader.d.ts +80 -0
- package/dist/components/organisms/game/three/renderers/FeatureRenderer.d.ts +44 -0
- package/dist/components/organisms/game/three/renderers/FeatureRenderer3D.d.ts +44 -0
- package/dist/components/organisms/game/three/renderers/TileRenderer.d.ts +57 -0
- package/dist/components/organisms/game/three/renderers/UnitRenderer.d.ts +46 -0
- package/dist/components/organisms/game/three/renderers/index.d.ts +11 -0
- package/dist/components/organisms/game/three/utils/culling.d.ts +134 -0
- package/dist/components/organisms/game/three/utils/grid3D.d.ts +154 -0
- package/dist/components/organisms/game/types/effects.d.ts +253 -0
- package/dist/components/organisms/game/types/game.d.ts +92 -0
- package/dist/components/organisms/game/types/isometric.d.ts +109 -0
- package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
- package/dist/components/organisms/game/useCanvasEffects.d.ts +26 -0
- package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
- package/dist/components/organisms/game/utils/combatEffects.d.ts +64 -0
- package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
- package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
- package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
- package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
- package/dist/components/organisms/index.d.ts +38 -0
- package/dist/components/organisms/layout/DashboardGrid.d.ts +35 -0
- package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
- package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
- package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
- package/dist/components/organisms/layout/index.d.ts +9 -0
- package/dist/components/organisms/types.d.ts +63 -0
- package/dist/components/templates/AuthLayout.d.ts +14 -0
- package/dist/components/templates/BattleTemplate.d.ts +25 -0
- package/dist/components/templates/CastleTemplate.d.ts +23 -0
- package/dist/components/templates/CounterTemplate.d.ts +44 -0
- package/dist/components/templates/DashboardLayout.d.ts +34 -0
- package/dist/components/templates/GameCanvas3DBattleTemplate.d.ts +96 -0
- package/dist/components/templates/GameCanvas3DCastleTemplate.d.ts +90 -0
- package/dist/components/templates/GameCanvas3DWorldMapTemplate.d.ts +96 -0
- package/dist/components/templates/GameShell.d.ts +34 -0
- package/dist/components/templates/GameTemplate.d.ts +36 -0
- package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
- package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
- package/dist/components/templates/index.d.ts +10 -0
- package/dist/components/templates/types.d.ts +22 -0
- package/dist/context/DesignThemeContext.d.ts +21 -0
- package/dist/context/ThemeContext.d.ts +104 -0
- package/dist/context/UISlotContext.d.ts +75 -0
- package/dist/context/UserContext.d.ts +111 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/hooks/event-bus-types.d.ts +71 -0
- package/dist/hooks/index.d.ts +31 -0
- package/dist/hooks/useAgentChat.d.ts +104 -0
- package/dist/hooks/useAuthContext.d.ts +25 -0
- package/dist/hooks/useCompile.d.ts +22 -0
- package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
- package/dist/hooks/useDragReorder.d.ts +26 -0
- package/dist/hooks/useEntities.d.ts +52 -0
- package/dist/hooks/useEntityData.d.ts +155 -0
- package/dist/hooks/useEntityMutations.d.ts +80 -0
- package/dist/hooks/useEventBus.d.ts +96 -0
- package/dist/hooks/useExtensions.d.ts +32 -0
- package/dist/hooks/useFileEditor.d.ts +32 -0
- package/dist/hooks/useFileSystem.d.ts +40 -0
- package/dist/hooks/useGitHub.d.ts +58 -0
- package/dist/hooks/useInfiniteScroll.d.ts +13 -0
- package/dist/hooks/useLongPress.d.ts +16 -0
- package/dist/hooks/useOrbitalHistory.d.ts +39 -0
- package/dist/hooks/useOrbitalMutations.d.ts +95 -0
- package/dist/hooks/usePinchZoom.d.ts +22 -0
- package/dist/hooks/usePreview.d.ts +57 -0
- package/dist/hooks/usePullToRefresh.d.ts +25 -0
- package/dist/hooks/useQuerySingleton.d.ts +78 -0
- package/dist/hooks/useResolvedEntity.d.ts +32 -0
- package/dist/hooks/useSwipeGesture.d.ts +26 -0
- package/dist/hooks/useTranslate.d.ts +35 -0
- package/dist/hooks/useUIEvents.d.ts +35 -0
- package/dist/hooks/useUISlots.d.ts +84 -0
- package/dist/hooks/useValidation.d.ts +46 -0
- package/dist/lib/api-client.d.ts +42 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/debug.d.ts +43 -0
- package/dist/lib/debugRegistry.d.ts +29 -0
- package/dist/lib/debugUtils.d.ts +27 -0
- package/dist/lib/entityDebug.d.ts +38 -0
- package/dist/lib/getNestedValue.d.ts +33 -0
- package/dist/lib/guardRegistry.d.ts +32 -0
- package/dist/lib/index.d.ts +18 -0
- package/dist/lib/jazari/index.d.ts +5 -0
- package/dist/lib/jazari/layout.d.ts +30 -0
- package/dist/lib/jazari/svg-paths.d.ts +61 -0
- package/dist/lib/jazari/types.d.ts +91 -0
- package/dist/lib/parseContentSegments.d.ts +41 -0
- package/dist/lib/tickRegistry.d.ts +40 -0
- package/dist/lib/traitRegistry.d.ts +34 -0
- package/dist/lib/verificationRegistry.d.ts +138 -0
- package/dist/lib/visualizer/browser.d.ts +47 -0
- package/dist/lib/visualizer/index.d.ts +143 -0
- package/dist/locales/index.d.ts +20 -0
- package/dist/providers/EventBusProvider.d.ts +60 -0
- package/dist/providers/FetchedDataProvider.d.ts +105 -0
- package/dist/providers/OfflineModeProvider.d.ts +79 -0
- package/dist/providers/OrbitalProvider.d.ts +101 -0
- package/dist/providers/SelectionProvider.d.ts +81 -0
- package/dist/providers/VerificationProvider.d.ts +63 -0
- package/dist/providers/index.d.ts +17 -0
- package/dist/providers/index.js +2 -2
- package/dist/renderer/client-effect-executor.d.ts +68 -0
- package/dist/renderer/data-resolver.d.ts +68 -0
- package/dist/renderer/index.d.ts +28 -0
- package/dist/renderer/init.d.ts +14 -0
- package/dist/renderer/navigation.d.ts +142 -0
- package/dist/renderer/offline-executor.d.ts +238 -0
- package/dist/renderer/pattern-resolver.d.ts +91 -0
- package/dist/renderer/slot-definitions.d.ts +45 -0
- package/dist/renderer/types.d.ts +160 -0
- package/dist/renderer/useClientEffects.d.ts +88 -0
- package/dist/runtime/EntitySchemaContext.d.ts +40 -0
- package/dist/runtime/TraitProvider.d.ts +52 -0
- package/dist/runtime/createClientEffectHandlers.d.ts +23 -0
- package/dist/runtime/index.d.ts +15 -0
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/types.d.ts +10 -0
- package/dist/runtime/ui/SlotsContext.d.ts +71 -0
- package/dist/runtime/useResolvedSchema.d.ts +45 -0
- package/dist/runtime/useTraitStateMachine.d.ts +48 -0
- package/dist/scripts/generate-design-system.d.ts +29 -0
- package/dist/scripts/generate-theme-from-schema.d.ts +10 -0
- package/dist/scripts/generate.d.ts +12 -0
- package/dist/scripts/suggest-components.d.ts +31 -0
- package/dist/scripts/types.d.ts +129 -0
- package/dist/stores/entityStore.d.ts +99 -0
- package/dist/stores/filtering.d.ts +51 -0
- package/dist/stores/index.d.ts +7 -0
- package/dist/tsup.config.d.ts +2 -0
- package/dist/vitest.config.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { KFlowEvent, EventListener, Unsubscribe, EventBusContextType } from './event-bus-types';
|
|
2
|
+
export type { KFlowEvent, EventListener, Unsubscribe, EventBusContextType };
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
__kflowEventBus?: EventBusContextType | null;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Global event bus reference for bridging between packages.
|
|
10
|
+
*
|
|
11
|
+
* Uses window-level global to enable cross-package communication.
|
|
12
|
+
* This allows @almadar/ui components to emit events to the same bus
|
|
13
|
+
* that the consuming app's trait state machine listens to.
|
|
14
|
+
*
|
|
15
|
+
* When the EventBusProvider mounts, it sets window.__kflowEventBus.
|
|
16
|
+
* Components in any package can then use this shared event bus.
|
|
17
|
+
*
|
|
18
|
+
* SSR Safety: All window access is guarded by `typeof window !== 'undefined'`.
|
|
19
|
+
* React Compiler Safety: The global bus reference is set once at provider mount
|
|
20
|
+
* and is stable — no render-path side effects. In practice, the React context
|
|
21
|
+
* path (priority 1) is used in real apps; the window global (priority 2) is
|
|
22
|
+
* only reached when no EventBusProvider is in the tree (e.g., Storybook).
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Set the global event bus reference.
|
|
26
|
+
* Called by EventBusProvider when it mounts.
|
|
27
|
+
*
|
|
28
|
+
* @param bus - The event bus context to set as global, or null to clear
|
|
29
|
+
*/
|
|
30
|
+
export declare function setGlobalEventBus(bus: EventBusContextType | null): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get the global event bus reference.
|
|
33
|
+
*
|
|
34
|
+
* @returns The global event bus if set, null otherwise
|
|
35
|
+
*/
|
|
36
|
+
export declare function getGlobalEventBus(): EventBusContextType | null;
|
|
37
|
+
/**
|
|
38
|
+
* Hook for accessing the event bus.
|
|
39
|
+
*
|
|
40
|
+
* Uses EventBusProvider context if available, otherwise falls back to
|
|
41
|
+
* a simple in-memory event bus (for design system / Storybook).
|
|
42
|
+
*
|
|
43
|
+
* @returns Event bus instance with emit, on, once, and hasListeners methods
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const eventBus = useEventBus();
|
|
48
|
+
*
|
|
49
|
+
* // Emit an event
|
|
50
|
+
* eventBus.emit('UI:CLICK', { id: '123' });
|
|
51
|
+
*
|
|
52
|
+
* // Subscribe to an event
|
|
53
|
+
* useEffect(() => {
|
|
54
|
+
* return eventBus.on('UI:CLICK', (event) => {
|
|
55
|
+
* console.log('Clicked:', event.payload);
|
|
56
|
+
* });
|
|
57
|
+
* }, []);
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function useEventBus(): EventBusContextType;
|
|
61
|
+
/**
|
|
62
|
+
* Hook for subscribing to a specific event.
|
|
63
|
+
* Automatically cleans up subscription on unmount.
|
|
64
|
+
*
|
|
65
|
+
* @param event - Event name to subscribe to
|
|
66
|
+
* @param handler - Event handler function
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* useEventListener('UI:CLICK', (event) => {
|
|
71
|
+
* console.log('Clicked:', event.payload);
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function useEventListener(event: string, handler: EventListener): void;
|
|
76
|
+
/**
|
|
77
|
+
* Alias for useEventListener for backward compatibility
|
|
78
|
+
*/
|
|
79
|
+
export declare const useEventSubscription: typeof useEventListener;
|
|
80
|
+
/**
|
|
81
|
+
* Hook for emitting events.
|
|
82
|
+
* Returns a memoized emit function.
|
|
83
|
+
*
|
|
84
|
+
* @returns Function to emit events
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* const emit = useEmitEvent();
|
|
89
|
+
*
|
|
90
|
+
* const handleClick = () => {
|
|
91
|
+
* emit('UI:CLICK', { id: '123' });
|
|
92
|
+
* };
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare function useEmitEvent(): (type: string, payload?: Record<string, unknown>) => void;
|
|
96
|
+
export default useEventBus;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Extension {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
loaded: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ExtensionEntry {
|
|
8
|
+
file: string;
|
|
9
|
+
language?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ExtensionManifest {
|
|
12
|
+
languages: Record<string, {
|
|
13
|
+
extensions: string[];
|
|
14
|
+
icon?: string;
|
|
15
|
+
color?: string;
|
|
16
|
+
}>;
|
|
17
|
+
extensions: ExtensionEntry[];
|
|
18
|
+
}
|
|
19
|
+
export interface UseExtensionsOptions {
|
|
20
|
+
appId: string;
|
|
21
|
+
loadOnMount?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface UseExtensionsResult {
|
|
24
|
+
extensions: Extension[];
|
|
25
|
+
manifest: ExtensionManifest;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
error: string | null;
|
|
28
|
+
loadExtension: (extensionId: string) => Promise<void>;
|
|
29
|
+
loadExtensions: () => Promise<void>;
|
|
30
|
+
getExtensionForFile: (filename: string) => Extension | null;
|
|
31
|
+
}
|
|
32
|
+
export declare function useExtensions(options: UseExtensionsOptions): UseExtensionsResult;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { UseExtensionsResult } from './useExtensions';
|
|
2
|
+
import type { UseFileSystemResult } from './useFileSystem';
|
|
3
|
+
import type { OrbitalSchema } from '@almadar/core';
|
|
4
|
+
export interface OpenFile {
|
|
5
|
+
path: string;
|
|
6
|
+
content: string;
|
|
7
|
+
isDirty: boolean;
|
|
8
|
+
language?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UseFileEditorOptions {
|
|
11
|
+
extensions: UseExtensionsResult;
|
|
12
|
+
fileSystem: UseFileSystemResult;
|
|
13
|
+
onSchemaUpdate?: (schema: OrbitalSchema) => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export interface FileEditResult {
|
|
16
|
+
success: boolean;
|
|
17
|
+
action?: 'updated_schema' | 'converted_extension' | 'saved_extension' | 'saved';
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface UseFileEditorResult {
|
|
21
|
+
openFiles: OpenFile[];
|
|
22
|
+
activeFile: OpenFile | null;
|
|
23
|
+
isSaving: boolean;
|
|
24
|
+
openFile: (path: string) => Promise<void>;
|
|
25
|
+
closeFile: (path: string) => void;
|
|
26
|
+
setActiveFile: (path: string) => void;
|
|
27
|
+
updateFileContent: (path: string, content: string) => void;
|
|
28
|
+
handleFileEdit: (path: string, content: string) => Promise<FileEditResult>;
|
|
29
|
+
saveFile: (path: string) => Promise<void>;
|
|
30
|
+
saveAllFiles: () => Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export declare function useFileEditor(options: UseFileEditorOptions): UseFileEditorResult;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface FileNode {
|
|
2
|
+
path: string;
|
|
3
|
+
name: string;
|
|
4
|
+
type: 'file' | 'directory';
|
|
5
|
+
children?: FileNode[];
|
|
6
|
+
}
|
|
7
|
+
export type FileSystemStatus = 'idle' | 'booting' | 'ready' | 'running' | 'error';
|
|
8
|
+
export interface FileSystemFile {
|
|
9
|
+
path: string;
|
|
10
|
+
content: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectedFile {
|
|
13
|
+
path: string;
|
|
14
|
+
content: string;
|
|
15
|
+
language?: string;
|
|
16
|
+
isDirty?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface UseFileSystemResult {
|
|
19
|
+
status: FileSystemStatus;
|
|
20
|
+
error: string | null;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
files: FileNode[];
|
|
23
|
+
selectedFile: SelectedFile | null;
|
|
24
|
+
selectedPath: string | null;
|
|
25
|
+
previewUrl: string | null;
|
|
26
|
+
boot: () => Promise<void>;
|
|
27
|
+
mountFiles: (files: FileSystemFile[] | Record<string, unknown>) => Promise<void>;
|
|
28
|
+
readFile: (path: string) => Promise<string>;
|
|
29
|
+
writeFile: (path: string, content: string) => Promise<void>;
|
|
30
|
+
selectFile: (path: string) => Promise<void>;
|
|
31
|
+
updateContent: (pathOrContent: string, content?: string) => void;
|
|
32
|
+
updateSelectedContent: (content: string) => void;
|
|
33
|
+
refreshTree: () => Promise<void>;
|
|
34
|
+
runCommand: (command: string) => Promise<{
|
|
35
|
+
exitCode: number;
|
|
36
|
+
output: string;
|
|
37
|
+
}>;
|
|
38
|
+
startDevServer: () => Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export declare function useFileSystem(): UseFileSystemResult;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub connection status
|
|
3
|
+
*/
|
|
4
|
+
export interface GitHubStatus {
|
|
5
|
+
connected: boolean;
|
|
6
|
+
username?: string;
|
|
7
|
+
avatarUrl?: string;
|
|
8
|
+
scopes?: string[];
|
|
9
|
+
connectedAt?: number;
|
|
10
|
+
lastUsedAt?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* GitHub repository
|
|
14
|
+
*/
|
|
15
|
+
export interface GitHubRepo {
|
|
16
|
+
id: number;
|
|
17
|
+
name: string;
|
|
18
|
+
fullName: string;
|
|
19
|
+
owner: string;
|
|
20
|
+
isPrivate: boolean;
|
|
21
|
+
description: string | null;
|
|
22
|
+
defaultBranch: string;
|
|
23
|
+
url: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Hook to get GitHub connection status
|
|
27
|
+
*/
|
|
28
|
+
export declare function useGitHubStatus(): import("@tanstack/react-query").UseQueryResult<GitHubStatus, Error>;
|
|
29
|
+
/**
|
|
30
|
+
* Hook to connect GitHub (initiate OAuth flow)
|
|
31
|
+
*/
|
|
32
|
+
export declare function useConnectGitHub(): {
|
|
33
|
+
connectGitHub: () => void;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Hook to disconnect GitHub
|
|
37
|
+
*/
|
|
38
|
+
export declare function useDisconnectGitHub(): import("@tanstack/react-query").UseMutationResult<unknown, Error, void, unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* Hook to list GitHub repositories
|
|
41
|
+
*/
|
|
42
|
+
export declare function useGitHubRepos(page?: number, perPage?: number): import("@tanstack/react-query").UseQueryResult<{
|
|
43
|
+
repos: GitHubRepo[];
|
|
44
|
+
page: number;
|
|
45
|
+
perPage: number;
|
|
46
|
+
}, Error>;
|
|
47
|
+
/**
|
|
48
|
+
* Hook to get repository details
|
|
49
|
+
*/
|
|
50
|
+
export declare function useGitHubRepo(owner: string, repo: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
51
|
+
repo: GitHubRepo;
|
|
52
|
+
}, Error>;
|
|
53
|
+
/**
|
|
54
|
+
* Hook to list repository branches
|
|
55
|
+
*/
|
|
56
|
+
export declare function useGitHubBranches(owner: string, repo: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
57
|
+
branches: string[];
|
|
58
|
+
}, Error>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface InfiniteScrollOptions {
|
|
2
|
+
/** Root margin for IntersectionObserver (default: "200px") */
|
|
3
|
+
rootMargin?: string;
|
|
4
|
+
/** Whether more items are available to load */
|
|
5
|
+
hasMore?: boolean;
|
|
6
|
+
/** Whether a load is currently in progress */
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface InfiniteScrollResult {
|
|
10
|
+
/** Ref to attach to the sentinel element */
|
|
11
|
+
sentinelRef: React.RefCallback<HTMLElement>;
|
|
12
|
+
}
|
|
13
|
+
export declare function useInfiniteScroll(onLoadMore: () => void, options?: InfiniteScrollOptions): InfiniteScrollResult;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface LongPressOptions {
|
|
3
|
+
/** Hold duration in ms before triggering (default: 500) */
|
|
4
|
+
duration?: number;
|
|
5
|
+
/** Movement tolerance in px before canceling (default: 10) */
|
|
6
|
+
moveThreshold?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface LongPressHandlers {
|
|
9
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
10
|
+
onPointerMove: (e: React.PointerEvent) => void;
|
|
11
|
+
onPointerUp: () => void;
|
|
12
|
+
onPointerCancel: () => void;
|
|
13
|
+
/** Whether the long press is currently active (held down, timer running) */
|
|
14
|
+
isPressed: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function useLongPress(onLongPress: () => void, options?: LongPressOptions): LongPressHandlers;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { OrbitalSchema } from '@almadar/core';
|
|
2
|
+
export interface ChangeSummary {
|
|
3
|
+
added: number;
|
|
4
|
+
modified: number;
|
|
5
|
+
removed: number;
|
|
6
|
+
}
|
|
7
|
+
export interface HistoryTimelineItem {
|
|
8
|
+
id: string;
|
|
9
|
+
type: 'changeset' | 'snapshot';
|
|
10
|
+
version: number;
|
|
11
|
+
timestamp: number;
|
|
12
|
+
description: string;
|
|
13
|
+
source?: string;
|
|
14
|
+
summary?: ChangeSummary;
|
|
15
|
+
reason?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RevertResult {
|
|
18
|
+
success: boolean;
|
|
19
|
+
error?: string;
|
|
20
|
+
restoredSchema?: OrbitalSchema;
|
|
21
|
+
}
|
|
22
|
+
export interface UseOrbitalHistoryOptions {
|
|
23
|
+
appId: string | null;
|
|
24
|
+
/** Firebase auth token for authenticated API requests */
|
|
25
|
+
authToken?: string | null;
|
|
26
|
+
/** User ID for x-user-id header (required for Firestore path) */
|
|
27
|
+
userId?: string | null;
|
|
28
|
+
onHistoryChange?: (timeline: HistoryTimelineItem[]) => void;
|
|
29
|
+
onRevertSuccess?: (restoredSchema: OrbitalSchema) => void;
|
|
30
|
+
}
|
|
31
|
+
export interface UseOrbitalHistoryResult {
|
|
32
|
+
timeline: HistoryTimelineItem[];
|
|
33
|
+
currentVersion: number;
|
|
34
|
+
isLoading: boolean;
|
|
35
|
+
error: string | null;
|
|
36
|
+
revertToSnapshot: (snapshotId: string) => Promise<RevertResult>;
|
|
37
|
+
refresh: () => Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export declare function useOrbitalHistory(options: UseOrbitalHistoryOptions): UseOrbitalHistoryResult;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useOrbitalMutations - Event-based entity mutations via orbital events route
|
|
3
|
+
*
|
|
4
|
+
* This hook provides entity mutations that go through the orbital events route
|
|
5
|
+
* instead of direct CRUD API calls. This ensures all mutations:
|
|
6
|
+
* 1. Go through trait state machines
|
|
7
|
+
* 2. Enforce guards
|
|
8
|
+
* 3. Execute all trait effects (including persist)
|
|
9
|
+
*
|
|
10
|
+
* This is the Phase 7 replacement for direct CRUD mutations.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const { createEntity, updateEntity, deleteEntity } = useOrbitalMutations('Task', 'TaskManager');
|
|
15
|
+
*
|
|
16
|
+
* // Create - sends ENTITY_CREATE event to orbital
|
|
17
|
+
* await createEntity({ title: 'New Task', status: 'pending' });
|
|
18
|
+
*
|
|
19
|
+
* // Update - sends ENTITY_UPDATE event to orbital
|
|
20
|
+
* await updateEntity(taskId, { status: 'completed' });
|
|
21
|
+
*
|
|
22
|
+
* // Delete - sends ENTITY_DELETE event to orbital
|
|
23
|
+
* await deleteEntity(taskId);
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @packageDocumentation
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Standard events for entity mutations
|
|
30
|
+
* These are handled by orbitals with CRUD-capable traits
|
|
31
|
+
*/
|
|
32
|
+
export declare const ENTITY_EVENTS: {
|
|
33
|
+
readonly CREATE: "ENTITY_CREATE";
|
|
34
|
+
readonly UPDATE: "ENTITY_UPDATE";
|
|
35
|
+
readonly DELETE: "ENTITY_DELETE";
|
|
36
|
+
};
|
|
37
|
+
export interface OrbitalEventPayload {
|
|
38
|
+
event: string;
|
|
39
|
+
payload?: Record<string, unknown>;
|
|
40
|
+
entityId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface OrbitalEventResponse {
|
|
43
|
+
success: boolean;
|
|
44
|
+
transitioned: boolean;
|
|
45
|
+
states: Record<string, string>;
|
|
46
|
+
emittedEvents: Array<{
|
|
47
|
+
event: string;
|
|
48
|
+
payload?: unknown;
|
|
49
|
+
}>;
|
|
50
|
+
error?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Hook for event-based entity mutations via orbital events route
|
|
54
|
+
*
|
|
55
|
+
* @param entityName - The entity type name (for cache invalidation)
|
|
56
|
+
* @param orbitalName - The orbital to send events to
|
|
57
|
+
* @param options - Optional configuration
|
|
58
|
+
*/
|
|
59
|
+
export declare function useOrbitalMutations(entityName: string, orbitalName: string, options?: {
|
|
60
|
+
/** Custom event names for create/update/delete */
|
|
61
|
+
events?: {
|
|
62
|
+
create?: string;
|
|
63
|
+
update?: string;
|
|
64
|
+
delete?: string;
|
|
65
|
+
};
|
|
66
|
+
/** Enable debug logging */
|
|
67
|
+
debug?: boolean;
|
|
68
|
+
}): {
|
|
69
|
+
createEntity: (data: Record<string, unknown>) => Promise<OrbitalEventResponse>;
|
|
70
|
+
updateEntity: (id: string | undefined, data: Record<string, unknown>) => Promise<OrbitalEventResponse | undefined>;
|
|
71
|
+
deleteEntity: (id: string | undefined) => Promise<OrbitalEventResponse | undefined>;
|
|
72
|
+
createMutation: import("@tanstack/react-query").UseMutationResult<OrbitalEventResponse, Error, Record<string, unknown>, unknown>;
|
|
73
|
+
updateMutation: import("@tanstack/react-query").UseMutationResult<OrbitalEventResponse, Error, {
|
|
74
|
+
id: string;
|
|
75
|
+
data: Record<string, unknown>;
|
|
76
|
+
}, unknown>;
|
|
77
|
+
deleteMutation: import("@tanstack/react-query").UseMutationResult<OrbitalEventResponse, Error, string, unknown>;
|
|
78
|
+
isCreating: boolean;
|
|
79
|
+
isUpdating: boolean;
|
|
80
|
+
isDeleting: boolean;
|
|
81
|
+
isMutating: boolean;
|
|
82
|
+
createError: Error | null;
|
|
83
|
+
updateError: Error | null;
|
|
84
|
+
deleteError: Error | null;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Send a custom event to an orbital
|
|
88
|
+
* For non-CRUD operations that go through trait state machines
|
|
89
|
+
*/
|
|
90
|
+
export declare function useSendOrbitalEvent(orbitalName: string): {
|
|
91
|
+
sendEvent: (event: string, payload?: Record<string, unknown>, entityId?: string) => Promise<OrbitalEventResponse>;
|
|
92
|
+
isPending: boolean;
|
|
93
|
+
error: Error | null;
|
|
94
|
+
data: OrbitalEventResponse | undefined;
|
|
95
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface PinchZoomResult {
|
|
3
|
+
/** Current zoom scale (1 = no zoom) */
|
|
4
|
+
scale: number;
|
|
5
|
+
/** Whether a pinch gesture is active */
|
|
6
|
+
isPinching: boolean;
|
|
7
|
+
/** Props to spread on the zoomable container */
|
|
8
|
+
gestureProps: {
|
|
9
|
+
onTouchStart: (e: React.TouchEvent) => void;
|
|
10
|
+
onTouchMove: (e: React.TouchEvent) => void;
|
|
11
|
+
onTouchEnd: () => void;
|
|
12
|
+
};
|
|
13
|
+
/** Reset zoom to 1 */
|
|
14
|
+
resetZoom: () => void;
|
|
15
|
+
}
|
|
16
|
+
export interface PinchZoomOptions {
|
|
17
|
+
/** Minimum zoom scale (default: 0.5) */
|
|
18
|
+
minScale?: number;
|
|
19
|
+
/** Maximum zoom scale (default: 4) */
|
|
20
|
+
maxScale?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function usePinchZoom(options?: PinchZoomOptions): PinchZoomResult;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { OrbitalSchema } from '@almadar/core';
|
|
2
|
+
export interface PreviewApp {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
status: 'loading' | 'ready' | 'error';
|
|
6
|
+
schema?: OrbitalSchema;
|
|
7
|
+
graphView: {
|
|
8
|
+
version: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface Notification {
|
|
12
|
+
id: string;
|
|
13
|
+
type: 'info' | 'warning' | 'error' | 'success';
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
read?: boolean;
|
|
18
|
+
actionLabel?: string;
|
|
19
|
+
onAction?: () => void;
|
|
20
|
+
autoDismiss?: boolean;
|
|
21
|
+
dismissAfter?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface NotificationsState {
|
|
24
|
+
notifications: Notification[];
|
|
25
|
+
isPanelOpen: boolean;
|
|
26
|
+
closePanel: () => void;
|
|
27
|
+
dismissNotification: (id: string) => void;
|
|
28
|
+
markAsRead: (id: string) => void;
|
|
29
|
+
clearAll: () => void;
|
|
30
|
+
}
|
|
31
|
+
export interface ErrorToast {
|
|
32
|
+
message: string;
|
|
33
|
+
}
|
|
34
|
+
export interface UsePreviewResult {
|
|
35
|
+
previewUrl: string | null;
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
error: string | null;
|
|
38
|
+
loadError: string | null;
|
|
39
|
+
app: PreviewApp | null;
|
|
40
|
+
isFullscreen: boolean;
|
|
41
|
+
isExecutingEvent: boolean;
|
|
42
|
+
errorToast: ErrorToast | null;
|
|
43
|
+
currentStateName: string | null;
|
|
44
|
+
notifications: NotificationsState;
|
|
45
|
+
startPreview: () => Promise<void>;
|
|
46
|
+
stopPreview: () => Promise<void>;
|
|
47
|
+
refresh: () => Promise<void>;
|
|
48
|
+
handleRefresh: () => Promise<void>;
|
|
49
|
+
handleReset: () => Promise<void>;
|
|
50
|
+
toggleFullscreen: () => void;
|
|
51
|
+
setErrorToast: (toast: ErrorToast | null) => void;
|
|
52
|
+
dismissErrorToast: () => void;
|
|
53
|
+
}
|
|
54
|
+
export interface UsePreviewOptions {
|
|
55
|
+
appId?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function usePreview(options?: UsePreviewOptions): UsePreviewResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface PullToRefreshOptions {
|
|
3
|
+
/** Distance in px to pull before triggering refresh (default: 60) */
|
|
4
|
+
threshold?: number;
|
|
5
|
+
/** Maximum pull distance in px (default: 120) */
|
|
6
|
+
maxPull?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PullToRefreshResult {
|
|
9
|
+
/** Current pull distance in px */
|
|
10
|
+
pullDistance: number;
|
|
11
|
+
/** Whether the user is actively pulling */
|
|
12
|
+
isPulling: boolean;
|
|
13
|
+
/** Whether a refresh was triggered and is in progress */
|
|
14
|
+
isRefreshing: boolean;
|
|
15
|
+
/** Props to spread on the scrollable container */
|
|
16
|
+
containerProps: {
|
|
17
|
+
onTouchStart: (e: React.TouchEvent) => void;
|
|
18
|
+
onTouchMove: (e: React.TouchEvent) => void;
|
|
19
|
+
onTouchEnd: () => void;
|
|
20
|
+
style: React.CSSProperties;
|
|
21
|
+
};
|
|
22
|
+
/** Call this when the refresh operation completes */
|
|
23
|
+
endRefresh: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function usePullToRefresh(onRefresh: () => void, options?: PullToRefreshOptions): PullToRefreshResult;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query state for filters and search
|
|
3
|
+
*/
|
|
4
|
+
export interface QueryState {
|
|
5
|
+
search?: string;
|
|
6
|
+
filters?: Record<string, unknown>;
|
|
7
|
+
sortField?: string;
|
|
8
|
+
sortDirection?: 'asc' | 'desc';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Query singleton entity reference
|
|
12
|
+
*/
|
|
13
|
+
export interface QuerySingletonEntity {
|
|
14
|
+
name: string;
|
|
15
|
+
fields: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Query singleton result type
|
|
19
|
+
*/
|
|
20
|
+
export interface QuerySingletonResult {
|
|
21
|
+
state: QueryState;
|
|
22
|
+
setState: (state: Partial<QueryState>) => void;
|
|
23
|
+
reset: () => void;
|
|
24
|
+
}
|
|
25
|
+
export interface QuerySingletonState {
|
|
26
|
+
/** Current search term */
|
|
27
|
+
search: string;
|
|
28
|
+
/** Set search term */
|
|
29
|
+
setSearch: (value: string) => void;
|
|
30
|
+
/** Current filters */
|
|
31
|
+
filters: Record<string, unknown>;
|
|
32
|
+
/** Set a filter value */
|
|
33
|
+
setFilter: (key: string, value: unknown) => void;
|
|
34
|
+
/** Clear all filters */
|
|
35
|
+
clearFilters: () => void;
|
|
36
|
+
/** Current sort field */
|
|
37
|
+
sortField?: string;
|
|
38
|
+
/** Current sort direction */
|
|
39
|
+
sortDirection?: 'asc' | 'desc';
|
|
40
|
+
/** Set sort */
|
|
41
|
+
setSort: (field: string, direction: 'asc' | 'desc') => void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Hook for accessing a query singleton by name
|
|
45
|
+
*
|
|
46
|
+
* @param query - Query singleton name (e.g., "@TaskQuery")
|
|
47
|
+
* @returns Query singleton state or null if no query provided
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* const queryState = useQuerySingleton('@TaskQuery');
|
|
52
|
+
*
|
|
53
|
+
* // Use search state
|
|
54
|
+
* queryState?.search
|
|
55
|
+
* queryState?.setSearch('new search term')
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function useQuerySingleton(query?: string): QuerySingletonState | null;
|
|
59
|
+
/**
|
|
60
|
+
* Parse a query binding string to extract the query singleton name
|
|
61
|
+
*
|
|
62
|
+
* @param binding - Binding string like "@TaskQuery.search" or "@TaskQuery"
|
|
63
|
+
* @returns Object with query name and optional field path
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* parseQueryBinding('@TaskQuery.search')
|
|
68
|
+
* // { query: 'TaskQuery', field: 'search' }
|
|
69
|
+
*
|
|
70
|
+
* parseQueryBinding('@TaskQuery')
|
|
71
|
+
* // { query: 'TaskQuery', field: undefined }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function parseQueryBinding(binding: string): {
|
|
75
|
+
query: string;
|
|
76
|
+
field?: string;
|
|
77
|
+
};
|
|
78
|
+
export default useQuerySingleton;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ResolvedEntity<T> {
|
|
2
|
+
/** Resolved data array */
|
|
3
|
+
data: T[];
|
|
4
|
+
/** True when data was provided directly via props (not fetched) */
|
|
5
|
+
isLocal: boolean;
|
|
6
|
+
/** Loading state — always false for local data */
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
/** Error state — always null for local data */
|
|
9
|
+
error: Error | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Resolves entity data from either a direct `data` prop or an `entity` string.
|
|
13
|
+
*
|
|
14
|
+
* When `data` is provided, it is used directly (isLocal: true).
|
|
15
|
+
* When only `entity` (string) is provided, data is fetched via useEntityList.
|
|
16
|
+
* Direct `data` always takes precedence over auto-fetch.
|
|
17
|
+
*
|
|
18
|
+
* @param entity - Entity name string for auto-fetch, or undefined
|
|
19
|
+
* @param data - Direct data array from trait render-ui, or undefined
|
|
20
|
+
* @returns Normalized { data, isLocal, isLoading, error }
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* function MyOrganism({ entity, data, isLoading, error }: MyProps) {
|
|
25
|
+
* const resolved = useResolvedEntity<Item>(entity, data);
|
|
26
|
+
* // resolved.data is always T[] regardless of source
|
|
27
|
+
* // resolved.isLocal tells you if data came from props
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function useResolvedEntity<T = Record<string, unknown>>(entity: string | undefined, data: readonly T[] | T[] | undefined): ResolvedEntity<T>;
|
|
32
|
+
export default useResolvedEntity;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface SwipeGestureOptions {
|
|
2
|
+
/** Minimum distance in px to trigger a swipe (default: 50) */
|
|
3
|
+
threshold?: number;
|
|
4
|
+
/** Minimum velocity in px/ms to qualify (default: 0.3) */
|
|
5
|
+
velocityThreshold?: number;
|
|
6
|
+
/** Prevent default touch behavior during swipe (default: false) */
|
|
7
|
+
preventDefault?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SwipeGestureResult {
|
|
10
|
+
onSwipeLeft?: () => void;
|
|
11
|
+
onSwipeRight?: () => void;
|
|
12
|
+
onSwipeUp?: () => void;
|
|
13
|
+
onSwipeDown?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface SwipeHandlers {
|
|
16
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
17
|
+
onPointerMove: (e: React.PointerEvent) => void;
|
|
18
|
+
onPointerUp: (e: React.PointerEvent) => void;
|
|
19
|
+
onPointerCancel: (e: React.PointerEvent) => void;
|
|
20
|
+
/** Current horizontal offset during swipe (for animation) */
|
|
21
|
+
offsetX: number;
|
|
22
|
+
/** Whether a swipe gesture is in progress */
|
|
23
|
+
isSwiping: boolean;
|
|
24
|
+
}
|
|
25
|
+
import type React from 'react';
|
|
26
|
+
export declare function useSwipeGesture(callbacks: SwipeGestureResult, options?: SwipeGestureOptions): SwipeHandlers;
|