entangle-ui 0.9.0 → 0.11.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/CHANGELOG.md +766 -0
- package/README.md +8 -6
- package/dist/esm/assets/src/components/controls/FileTree/FileTree.css.ts.vanilla-YmktPvnr.css +48 -0
- package/dist/esm/assets/src/components/controls/Select/{Select.css.ts.vanilla-oZnFUorL.css → Select.css.ts.vanilla-Cpu2BvWL.css} +3 -0
- package/dist/esm/assets/src/components/controls/TreeView/{TreeNode.css.ts.vanilla-B_f8pUb8.css → TreeNode.css.ts.vanilla-DXPJRWZZ.css} +31 -24
- package/dist/esm/assets/src/components/editor/AssetBrowser/AssetBrowser.css.ts.vanilla-B2S4cEiY.css +262 -0
- package/dist/esm/assets/src/components/editor/Minimap/Minimap.css.ts.vanilla--rNdWQwy.css +133 -0
- package/dist/esm/assets/src/components/editor/NodeGraph/NodeGraph.css.ts.vanilla-ClF4YZvl.css +401 -0
- package/dist/esm/assets/src/components/editor/PropertyInspector/{PropertyPanel.css.ts.vanilla-RYv_XgOu.css → PropertyPanel.css.ts.vanilla-Dpr_k5I3.css} +4 -1
- package/dist/esm/assets/src/components/editor/PropertyInspector/{PropertyRow.css.ts.vanilla-C3YZnnHb.css → PropertyRow.css.ts.vanilla-pq1Uhd2a.css} +15 -8
- package/dist/esm/assets/src/components/editor/PropertyInspector/{PropertySection.css.ts.vanilla-DK12opZc.css → PropertySection.css.ts.vanilla-6MWWAqyd.css} +50 -32
- package/dist/esm/assets/src/components/editor/Timeline/Timeline.css.ts.vanilla-DDX6Zalo.css +203 -0
- package/dist/esm/assets/src/components/feedback/LogView/LogView.css.ts.vanilla-nB5ENOpw.css +312 -0
- package/dist/esm/assets/src/components/navigation/Menu/Menu.css.ts.vanilla-B5iVe5S2.css +88 -0
- package/dist/esm/assets/src/components/navigation/PathBar/PathBar.css.ts.vanilla-BIEzQQOf.css +10 -0
- package/dist/esm/assets/src/components/primitives/viewport/Viewport.css.ts.vanilla-CkFBJ7Vo.css +65 -0
- package/dist/esm/assets/src/components/shell/FloatingPanel/{FloatingPanel.css.ts.vanilla-1rIAXEFp.css → FloatingPanel.css.ts.vanilla-CRaeYJ2b.css} +20 -13
- package/dist/esm/assets/src/theme/{darkTheme.css.ts.vanilla-ab1WD4dr.css → darkTheme.css.ts.vanilla-BHZ3ecRn.css} +3 -3
- package/dist/esm/assets/src/theme/{lightTheme.css.ts.vanilla-OaRI_wIc.css → lightTheme.css.ts.vanilla-Ct6f9Iym.css} +3 -3
- package/dist/esm/components/Icons/AddIcon.js.map +1 -1
- package/dist/esm/components/Icons/AiChatIcon.js.map +1 -1
- package/dist/esm/components/Icons/AiSparklesIcon.js.map +1 -1
- package/dist/esm/components/Icons/ArchiveIcon.js.map +1 -1
- package/dist/esm/components/Icons/ArrowDownIcon.js.map +1 -1
- package/dist/esm/components/Icons/ArrowLeftIcon.js.map +1 -1
- package/dist/esm/components/Icons/ArrowRightIcon.js.map +1 -1
- package/dist/esm/components/Icons/ArrowUpIcon.js.map +1 -1
- package/dist/esm/components/Icons/BookmarkIcon.js.map +1 -1
- package/dist/esm/components/Icons/BugIcon.js.map +1 -1
- package/dist/esm/components/Icons/BuildingIcon.js.map +1 -1
- package/dist/esm/components/Icons/CalendarIcon.js.map +1 -1
- package/dist/esm/components/Icons/CameraIcon.js +31 -0
- package/dist/esm/components/Icons/CameraIcon.js.map +1 -0
- package/dist/esm/components/Icons/CheckIcon.js.map +1 -1
- package/dist/esm/components/Icons/ChevronDownIcon.js.map +1 -1
- package/dist/esm/components/Icons/ChevronLeftIcon.js.map +1 -1
- package/dist/esm/components/Icons/ChevronRightIcon.js.map +1 -1
- package/dist/esm/components/Icons/ChevronUpIcon.js.map +1 -1
- package/dist/esm/components/Icons/CircleIcon.js.map +1 -1
- package/dist/esm/components/Icons/ClockIcon.js.map +1 -1
- package/dist/esm/components/Icons/CloseIcon.js.map +1 -1
- package/dist/esm/components/Icons/CloudUploadIcon.js.map +1 -1
- package/dist/esm/components/Icons/CodeIcon.js.map +1 -1
- package/dist/esm/components/Icons/CopyIcon.js.map +1 -1
- package/dist/esm/components/Icons/CubeIcon.js +31 -0
- package/dist/esm/components/Icons/CubeIcon.js.map +1 -0
- package/dist/esm/components/Icons/CutIcon.js.map +1 -1
- package/dist/esm/components/Icons/DotsHorizontalIcon.js.map +1 -1
- package/dist/esm/components/Icons/DotsVerticalIcon.js.map +1 -1
- package/dist/esm/components/Icons/DownloadIcon.js.map +1 -1
- package/dist/esm/components/Icons/EditIcon.js.map +1 -1
- package/dist/esm/components/Icons/ErrorIcon.js.map +1 -1
- package/dist/esm/components/Icons/ExternalLinkIcon.js.map +1 -1
- package/dist/esm/components/Icons/EyeDropperIcon.js.map +1 -1
- package/dist/esm/components/Icons/EyeIcon.js.map +1 -1
- package/dist/esm/components/Icons/FileTextIcon.js.map +1 -1
- package/dist/esm/components/Icons/FilterIcon.js.map +1 -1
- package/dist/esm/components/Icons/FirstIcon.js.map +1 -1
- package/dist/esm/components/Icons/FolderCogIcon.js.map +1 -1
- package/dist/esm/components/Icons/FolderIcon.js.map +1 -1
- package/dist/esm/components/Icons/FolderOpenIcon.js +2 -2
- package/dist/esm/components/Icons/FolderOpenIcon.js.map +1 -1
- package/dist/esm/components/Icons/FullscreenIcon.js.map +1 -1
- package/dist/esm/components/Icons/GitBranchIcon.js.map +1 -1
- package/dist/esm/components/Icons/GridIcon.js.map +1 -1
- package/dist/esm/components/Icons/HeartIcon.js.map +1 -1
- package/dist/esm/components/Icons/HelpIcon.js.map +1 -1
- package/dist/esm/components/Icons/HomeIcon.js.map +1 -1
- package/dist/esm/components/Icons/ImageIcon.js +31 -0
- package/dist/esm/components/Icons/ImageIcon.js.map +1 -0
- package/dist/esm/components/Icons/InfoIcon.js.map +1 -1
- package/dist/esm/components/Icons/LastIcon.js.map +1 -1
- package/dist/esm/components/Icons/LinkIcon.js.map +1 -1
- package/dist/esm/components/Icons/ListIcon.js.map +1 -1
- package/dist/esm/components/Icons/LockIcon.js.map +1 -1
- package/dist/esm/components/Icons/MaximizeIcon.js.map +1 -1
- package/dist/esm/components/Icons/MenuIcon.js.map +1 -1
- package/dist/esm/components/Icons/MinimizeIcon.js.map +1 -1
- package/dist/esm/components/Icons/MinusIcon.js.map +1 -1
- package/dist/esm/components/Icons/OrbitIcon.js +31 -0
- package/dist/esm/components/Icons/OrbitIcon.js.map +1 -0
- package/dist/esm/components/Icons/PasteIcon.js.map +1 -1
- package/dist/esm/components/Icons/PauseIcon.js +2 -2
- package/dist/esm/components/Icons/PauseIcon.js.map +1 -1
- package/dist/esm/components/Icons/PinIcon.js.map +1 -1
- package/dist/esm/components/Icons/PlayIcon.js.map +1 -1
- package/dist/esm/components/Icons/RedoIcon.js.map +1 -1
- package/dist/esm/components/Icons/RefreshIcon.js.map +1 -1
- package/dist/esm/components/Icons/RobotIcon.js.map +1 -1
- package/dist/esm/components/Icons/RotateIcon.js +32 -0
- package/dist/esm/components/Icons/RotateIcon.js.map +1 -0
- package/dist/esm/components/Icons/SaveIcon.js.map +1 -1
- package/dist/esm/components/Icons/SearchIcon.js.map +1 -1
- package/dist/esm/components/Icons/SendIcon.js.map +1 -1
- package/dist/esm/components/Icons/SettingsIcon.js.map +1 -1
- package/dist/esm/components/Icons/SortIcon.js.map +1 -1
- package/dist/esm/components/Icons/SpinIcon.js +32 -0
- package/dist/esm/components/Icons/SpinIcon.js.map +1 -0
- package/dist/esm/components/Icons/StarIcon.js.map +1 -1
- package/dist/esm/components/Icons/StopIcon.js.map +1 -1
- package/dist/esm/components/Icons/SuccessIcon.js.map +1 -1
- package/dist/esm/components/Icons/TagIcon.js.map +1 -1
- package/dist/esm/components/Icons/TangentAlignedIcon.js.map +1 -1
- package/dist/esm/components/Icons/TangentAutoIcon.js.map +1 -1
- package/dist/esm/components/Icons/TangentFreeIcon.js.map +1 -1
- package/dist/esm/components/Icons/TangentLinearIcon.js.map +1 -1
- package/dist/esm/components/Icons/TangentMirroredIcon.js.map +1 -1
- package/dist/esm/components/Icons/TangentStepIcon.js.map +1 -1
- package/dist/esm/components/Icons/TerminalIcon.js.map +1 -1
- package/dist/esm/components/Icons/TrashIcon.js.map +1 -1
- package/dist/esm/components/Icons/UndoIcon.js.map +1 -1
- package/dist/esm/components/Icons/UnlinkIcon.js.map +1 -1
- package/dist/esm/components/Icons/UnlockIcon.js.map +1 -1
- package/dist/esm/components/Icons/UploadIcon.js.map +1 -1
- package/dist/esm/components/Icons/UserIcon.js.map +1 -1
- package/dist/esm/components/Icons/UsersIcon.js.map +1 -1
- package/dist/esm/components/Icons/WarningIcon.js.map +1 -1
- package/dist/esm/components/Icons/ZoomFitIcon.js +32 -0
- package/dist/esm/components/Icons/ZoomFitIcon.js.map +1 -0
- package/dist/esm/components/Icons/ZoomInIcon.js.map +1 -1
- package/dist/esm/components/Icons/ZoomOutIcon.js.map +1 -1
- package/dist/esm/components/controls/CartesianPicker/CartesianPicker.js +3 -3
- package/dist/esm/components/controls/CartesianPicker/CartesianPicker.js.map +1 -1
- package/dist/esm/components/controls/CartesianPicker/useCartesianInteraction.js +7 -5
- package/dist/esm/components/controls/CartesianPicker/useCartesianInteraction.js.map +1 -1
- package/dist/esm/components/controls/CartesianPicker/useCartesianRenderer.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/AlphaSlider.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/ColorArea.js +2 -2
- package/dist/esm/components/controls/ColorPicker/ColorArea.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/ColorInputs.js +16 -2
- package/dist/esm/components/controls/ColorPicker/ColorInputs.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/ColorPalette.js +3 -1
- package/dist/esm/components/controls/ColorPicker/ColorPalette.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/ColorPicker.js +6 -6
- package/dist/esm/components/controls/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/ColorPresets.js +3 -1
- package/dist/esm/components/controls/ColorPicker/ColorPresets.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/ColorSwatch.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/EyeDropper.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/HueSlider.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/colorUtils.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/palettes/material.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/palettes/professional.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/palettes/tailwind.js.map +1 -1
- package/dist/esm/components/controls/ColorPicker/useColor.js.map +1 -1
- package/dist/esm/components/controls/Combobox/Combobox.js +46 -23
- package/dist/esm/components/controls/Combobox/Combobox.js.map +1 -1
- package/dist/esm/components/controls/CurveEditor/CurveCanvas.js +11 -4
- package/dist/esm/components/controls/CurveEditor/CurveCanvas.js.map +1 -1
- package/dist/esm/components/controls/CurveEditor/CurveEditor.js +4 -4
- package/dist/esm/components/controls/CurveEditor/CurveEditor.js.map +1 -1
- package/dist/esm/components/controls/CurveEditor/CurveToolbar.js +7 -5
- package/dist/esm/components/controls/CurveEditor/CurveToolbar.js.map +1 -1
- package/dist/esm/components/controls/CurveEditor/curvePresets.js.map +1 -1
- package/dist/esm/components/controls/CurveEditor/curveUtils.js +13 -15
- package/dist/esm/components/controls/CurveEditor/curveUtils.js.map +1 -1
- package/dist/esm/components/controls/CurveEditor/useCurveInteraction.js +72 -50
- package/dist/esm/components/controls/CurveEditor/useCurveInteraction.js.map +1 -1
- package/dist/esm/components/controls/CurveEditor/useCurveRenderer.js +11 -3
- package/dist/esm/components/controls/CurveEditor/useCurveRenderer.js.map +1 -1
- package/dist/esm/components/controls/FileTree/FileTree.css.js +9 -0
- package/dist/esm/components/controls/FileTree/FileTree.css.js.map +1 -0
- package/dist/esm/components/controls/FileTree/FileTree.js +252 -0
- package/dist/esm/components/controls/FileTree/FileTree.js.map +1 -0
- package/dist/esm/components/controls/FileTree/fileTreeIcons.js +129 -0
- package/dist/esm/components/controls/FileTree/fileTreeIcons.js.map +1 -0
- package/dist/esm/components/controls/FileTree/fileTreeLabels.js +8 -0
- package/dist/esm/components/controls/FileTree/fileTreeLabels.js.map +1 -0
- package/dist/esm/components/controls/FileTree/useFileTreeDrop.js +115 -0
- package/dist/esm/components/controls/FileTree/useFileTreeDrop.js.map +1 -0
- package/dist/esm/components/controls/FileUploader/FileUploader.js +3 -6
- package/dist/esm/components/controls/FileUploader/FileUploader.js.map +1 -1
- package/dist/esm/components/controls/MultiSelect/MultiSelect.js +46 -15
- package/dist/esm/components/controls/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/controls/NumberInput/NumberInput.js +11 -4
- package/dist/esm/components/controls/NumberInput/NumberInput.js.map +1 -1
- package/dist/esm/components/controls/NumberInput/useNumberInput.js +6 -2
- package/dist/esm/components/controls/NumberInput/useNumberInput.js.map +1 -1
- package/dist/esm/components/controls/Select/Select.css.js +1 -1
- package/dist/esm/components/controls/Select/Select.js +44 -16
- package/dist/esm/components/controls/Select/Select.js.map +1 -1
- package/dist/esm/components/controls/Slider/Slider.js +6 -8
- package/dist/esm/components/controls/Slider/Slider.js.map +1 -1
- package/dist/esm/components/controls/TagInput/TagInput.js +4 -2
- package/dist/esm/components/controls/TagInput/TagInput.js.map +1 -1
- package/dist/esm/components/controls/TreeView/TreeNode.css.js +9 -8
- package/dist/esm/components/controls/TreeView/TreeNode.css.js.map +1 -1
- package/dist/esm/components/controls/TreeView/TreeNode.js +42 -7
- package/dist/esm/components/controls/TreeView/TreeNode.js.map +1 -1
- package/dist/esm/components/controls/TreeView/TreeView.js +18 -6
- package/dist/esm/components/controls/TreeView/TreeView.js.map +1 -1
- package/dist/esm/components/controls/TreeView/useTreeState.js +2 -6
- package/dist/esm/components/controls/TreeView/useTreeState.js.map +1 -1
- package/dist/esm/components/controls/VectorInput/VectorInput.js +13 -4
- package/dist/esm/components/controls/VectorInput/VectorInput.js.map +1 -1
- package/dist/esm/components/data/DataTable/DataTable.js +25 -8
- package/dist/esm/components/data/DataTable/DataTable.js.map +1 -1
- package/dist/esm/components/editor/AssetBrowser/AssetBrowser.css.js +46 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowser.css.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowser.js +254 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowser.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserAnnouncementLive.js +17 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserAnnouncementLive.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserBreadcrumbs.js +25 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserBreadcrumbs.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserContent.js +140 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserContent.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserContext.js +81 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserContext.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserContextMenu.js +123 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserContextMenu.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserDefaultMenus.js +136 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserDefaultMenus.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserGrid.js +137 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserGrid.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserGridItem.js +226 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserGridItem.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserList.js +189 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserList.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserRenameField.js +63 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserRenameField.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserSidebar.js +19 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserSidebar.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserStatusBar.js +24 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserStatusBar.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserStore.js +176 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserStore.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserSurface.js +120 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserSurface.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserToolbar.js +134 -0
- package/dist/esm/components/editor/AssetBrowser/AssetBrowserToolbar.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserFilter.js +90 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserFilter.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserFormat.js +32 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserFormat.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserGeometry.js +70 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserGeometry.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserKeyboard.js +62 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserKeyboard.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserLabels.js +52 -0
- package/dist/esm/components/editor/AssetBrowser/assetBrowserLabels.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/slots.js +18 -0
- package/dist/esm/components/editor/AssetBrowser/slots.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetBrowserAnnouncement.js +19 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetBrowserAnnouncement.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetBrowserHandle.js +70 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetBrowserHandle.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetBrowserViewState.js +108 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetBrowserViewState.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetDnd.js +192 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetDnd.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetGridKeyboardNav.js +91 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetGridKeyboardNav.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetGridVirtualizer.js +91 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetGridVirtualizer.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetMarqueeGesture.js +128 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetMarqueeGesture.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetMutationKeyboard.js +72 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetMutationKeyboard.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetMutations.js +141 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetMutations.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetNavigation.js +113 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetNavigation.js.map +1 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetSelectionController.js +174 -0
- package/dist/esm/components/editor/AssetBrowser/useAssetSelectionController.js.map +1 -0
- package/dist/esm/components/editor/ChatPanel/ChatActionBar.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatAttachment.js +8 -2
- package/dist/esm/components/editor/ChatPanel/ChatAttachment.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatBubble.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatCodeBlock.js +20 -4
- package/dist/esm/components/editor/ChatPanel/ChatCodeBlock.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatContextChip.js +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatContextChip.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatEmptyState.js +3 -1
- package/dist/esm/components/editor/ChatPanel/ChatEmptyState.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatIcons.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatInput.js +10 -3
- package/dist/esm/components/editor/ChatPanel/ChatInput.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatInputToolbar.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatMarkdownRenderer.js +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatMarkdownRenderer.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatMessage.js +10 -3
- package/dist/esm/components/editor/ChatPanel/ChatMessage.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatMessageList.js +5 -3
- package/dist/esm/components/editor/ChatPanel/ChatMessageList.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatPanel.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatToolCall.js +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatToolCall.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/ChatTypingIndicator.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/useChatInput.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/useChatMessages.js +7 -4
- package/dist/esm/components/editor/ChatPanel/useChatMessages.js.map +1 -1
- package/dist/esm/components/editor/ChatPanel/useChatScroll.js +6 -1
- package/dist/esm/components/editor/ChatPanel/useChatScroll.js.map +1 -1
- package/dist/esm/components/editor/Minimap/Minimap.css.js +18 -0
- package/dist/esm/components/editor/Minimap/Minimap.css.js.map +1 -0
- package/dist/esm/components/editor/Minimap/Minimap.js +257 -0
- package/dist/esm/components/editor/Minimap/Minimap.js.map +1 -0
- package/dist/esm/components/editor/Minimap/Minimap.types.js +11 -0
- package/dist/esm/components/editor/Minimap/Minimap.types.js.map +1 -0
- package/dist/esm/components/editor/Minimap/MinimapContext.js +48 -0
- package/dist/esm/components/editor/Minimap/MinimapContext.js.map +1 -0
- package/dist/esm/components/editor/Minimap/MinimapCorner.js +16 -0
- package/dist/esm/components/editor/Minimap/MinimapCorner.js.map +1 -0
- package/dist/esm/components/editor/Minimap/MinimapFooter.js +16 -0
- package/dist/esm/components/editor/Minimap/MinimapFooter.js.map +1 -0
- package/dist/esm/components/editor/Minimap/MinimapStore.js +166 -0
- package/dist/esm/components/editor/Minimap/MinimapStore.js.map +1 -0
- package/dist/esm/components/editor/Minimap/MinimapTitle.js +16 -0
- package/dist/esm/components/editor/Minimap/MinimapTitle.js.map +1 -0
- package/dist/esm/components/editor/Minimap/ViewportMinimap.js +69 -0
- package/dist/esm/components/editor/Minimap/ViewportMinimap.js.map +1 -0
- package/dist/esm/components/editor/Minimap/computeBoundsFromItems.js +65 -0
- package/dist/esm/components/editor/Minimap/computeBoundsFromItems.js.map +1 -0
- package/dist/esm/components/editor/Minimap/index.js +15 -0
- package/dist/esm/components/editor/Minimap/index.js.map +1 -0
- package/dist/esm/components/editor/Minimap/minimapCoords.js +105 -0
- package/dist/esm/components/editor/Minimap/minimapCoords.js.map +1 -0
- package/dist/esm/components/editor/Minimap/minimapDrawing.js +93 -0
- package/dist/esm/components/editor/Minimap/minimapDrawing.js.map +1 -0
- package/dist/esm/components/editor/Minimap/minimapHitTest.js +59 -0
- package/dist/esm/components/editor/Minimap/minimapHitTest.js.map +1 -0
- package/dist/esm/components/editor/Minimap/useMinimapGestures.js +299 -0
- package/dist/esm/components/editor/Minimap/useMinimapGestures.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraph.css.js +36 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraph.css.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraph.js +627 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraph.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraph.types.js +10 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraph.types.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphContext.js +54 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphContext.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphEdgeLabels.js +137 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphEdgeLabels.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphGroup.js +211 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphGroup.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphMinimap.js +122 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphMinimap.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNode.js +170 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNode.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeContext.js +21 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeContext.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeParts.js +56 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeParts.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeSection.js +59 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeSection.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeSectionContext.js +17 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphNodeSectionContext.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphPin.js +35 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphPin.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphPort.js +191 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphPort.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphPortVisual.js +46 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphPortVisual.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphSlots.js +50 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphSlots.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphSpawnPalette.js +70 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphSpawnPalette.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphStore.js +543 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphStore.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphToolbar.js +100 -0
- package/dist/esm/components/editor/NodeGraph/NodeGraphToolbar.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/createTypeMatchValidator.js +37 -0
- package/dist/esm/components/editor/NodeGraph/createTypeMatchValidator.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphActions.js +53 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphActions.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphDrawing.js +461 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphDrawing.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphIds.js +31 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphIds.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphMath.js +350 -0
- package/dist/esm/components/editor/NodeGraph/nodeGraphMath.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/sortSlots.js +69 -0
- package/dist/esm/components/editor/NodeGraph/sortSlots.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useDragGesture.js +63 -0
- package/dist/esm/components/editor/NodeGraph/useDragGesture.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraph.js +207 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraph.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphConnection.js +334 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphConnection.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphEdgeInteraction.js +137 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphEdgeInteraction.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphGroupDrag.js +392 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphGroupDrag.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphKeyboard.js +164 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphKeyboard.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphNodeDrag.js +234 -0
- package/dist/esm/components/editor/NodeGraph/useNodeGraphNodeDrag.js.map +1 -0
- package/dist/esm/components/editor/NodeGraph/useStoreSlice.js +49 -0
- package/dist/esm/components/editor/NodeGraph/useStoreSlice.js.map +1 -0
- package/dist/esm/components/editor/PropertyInspector/PropertyGroup.js +1 -1
- package/dist/esm/components/editor/PropertyInspector/PropertyGroup.js.map +1 -1
- package/dist/esm/components/editor/PropertyInspector/PropertyPanel.css.js +4 -3
- package/dist/esm/components/editor/PropertyInspector/PropertyPanel.css.js.map +1 -1
- package/dist/esm/components/editor/PropertyInspector/PropertyPanel.js +12 -7
- package/dist/esm/components/editor/PropertyInspector/PropertyPanel.js.map +1 -1
- package/dist/esm/components/editor/PropertyInspector/PropertyRow.css.js +7 -6
- package/dist/esm/components/editor/PropertyInspector/PropertyRow.css.js.map +1 -1
- package/dist/esm/components/editor/PropertyInspector/PropertyRow.js +21 -5
- package/dist/esm/components/editor/PropertyInspector/PropertyRow.js.map +1 -1
- package/dist/esm/components/editor/PropertyInspector/PropertySection.css.js +11 -10
- package/dist/esm/components/editor/PropertyInspector/PropertySection.css.js.map +1 -1
- package/dist/esm/components/editor/PropertyInspector/PropertySection.js +32 -11
- package/dist/esm/components/editor/PropertyInspector/PropertySection.js.map +1 -1
- package/dist/esm/components/editor/PropertyInspector/usePropertyUndo.js.map +1 -1
- package/dist/esm/components/editor/Timeline/Timeline.css.js +23 -0
- package/dist/esm/components/editor/Timeline/Timeline.css.js.map +1 -0
- package/dist/esm/components/editor/Timeline/Timeline.js +450 -0
- package/dist/esm/components/editor/Timeline/Timeline.js.map +1 -0
- package/dist/esm/components/editor/Timeline/Timeline.types.js +10 -0
- package/dist/esm/components/editor/Timeline/Timeline.types.js.map +1 -0
- package/dist/esm/components/editor/Timeline/TimelineContext.js +69 -0
- package/dist/esm/components/editor/Timeline/TimelineContext.js.map +1 -0
- package/dist/esm/components/editor/Timeline/TimelineFooter.js +16 -0
- package/dist/esm/components/editor/Timeline/TimelineFooter.js.map +1 -0
- package/dist/esm/components/editor/Timeline/TimelineMinimap.js +280 -0
- package/dist/esm/components/editor/Timeline/TimelineMinimap.js.map +1 -0
- package/dist/esm/components/editor/Timeline/TimelineStore.js +289 -0
- package/dist/esm/components/editor/Timeline/TimelineStore.js.map +1 -0
- package/dist/esm/components/editor/Timeline/TimelineToolbar.js +15 -0
- package/dist/esm/components/editor/Timeline/TimelineToolbar.js.map +1 -0
- package/dist/esm/components/editor/Timeline/TimelineTrackHeaders.js +142 -0
- package/dist/esm/components/editor/Timeline/TimelineTrackHeaders.js.map +1 -0
- package/dist/esm/components/editor/Timeline/TimelineTrackScale.js +18 -0
- package/dist/esm/components/editor/Timeline/TimelineTrackScale.js.map +1 -0
- package/dist/esm/components/editor/Timeline/index.js +18 -0
- package/dist/esm/components/editor/Timeline/index.js.map +1 -0
- package/dist/esm/components/editor/Timeline/timelineCoords.js +118 -0
- package/dist/esm/components/editor/Timeline/timelineCoords.js.map +1 -0
- package/dist/esm/components/editor/Timeline/timelineDrawing.js +390 -0
- package/dist/esm/components/editor/Timeline/timelineDrawing.js.map +1 -0
- package/dist/esm/components/editor/Timeline/timelineEdits.js +323 -0
- package/dist/esm/components/editor/Timeline/timelineEdits.js.map +1 -0
- package/dist/esm/components/editor/Timeline/timelineHitTest.js +153 -0
- package/dist/esm/components/editor/Timeline/timelineHitTest.js.map +1 -0
- package/dist/esm/components/editor/Timeline/timelineLayout.js +39 -0
- package/dist/esm/components/editor/Timeline/timelineLayout.js.map +1 -0
- package/dist/esm/components/editor/Timeline/timelineSelection.js +0 -0
- package/dist/esm/components/editor/Timeline/timelineSelection.js.map +1 -0
- package/dist/esm/components/editor/Timeline/useTimelineDraw.js +156 -0
- package/dist/esm/components/editor/Timeline/useTimelineDraw.js.map +1 -0
- package/dist/esm/components/editor/Timeline/useTimelineGestures.js +587 -0
- package/dist/esm/components/editor/Timeline/useTimelineGestures.js.map +1 -0
- package/dist/esm/components/editor/Timeline/useTimelinePlayback.js +85 -0
- package/dist/esm/components/editor/Timeline/useTimelinePlayback.js.map +1 -0
- package/dist/esm/components/editor/TransformControl/TransformControl.js +4 -4
- package/dist/esm/components/editor/TransformControl/TransformControl.js.map +1 -1
- package/dist/esm/components/editor/ViewportGizmo/ViewportGizmo.js +8 -4
- package/dist/esm/components/editor/ViewportGizmo/ViewportGizmo.js.map +1 -1
- package/dist/esm/components/editor/ViewportGizmo/gizmoMath.js +6 -2
- package/dist/esm/components/editor/ViewportGizmo/gizmoMath.js.map +1 -1
- package/dist/esm/components/editor/ViewportGizmo/useGizmoInteraction.js +8 -6
- package/dist/esm/components/editor/ViewportGizmo/useGizmoInteraction.js.map +1 -1
- package/dist/esm/components/editor/ViewportGizmo/useGizmoRenderer.js +1 -2
- package/dist/esm/components/editor/ViewportGizmo/useGizmoRenderer.js.map +1 -1
- package/dist/esm/components/feedback/Alert/Alert.js +8 -8
- package/dist/esm/components/feedback/Alert/Alert.js.map +1 -1
- package/dist/esm/components/feedback/Alert/AlertActions.js.map +1 -1
- package/dist/esm/components/feedback/Alert/AlertDescription.js.map +1 -1
- package/dist/esm/components/feedback/Alert/AlertTitle.js.map +1 -1
- package/dist/esm/components/feedback/CommandPalette/CommandPalette.js +32 -22
- package/dist/esm/components/feedback/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/esm/components/feedback/CommandPalette/fuzzySearch.js.map +1 -1
- package/dist/esm/components/feedback/CommandPalette/useRecentItems.js +3 -1
- package/dist/esm/components/feedback/CommandPalette/useRecentItems.js.map +1 -1
- package/dist/esm/components/feedback/Dialog/Dialog.js +6 -3
- package/dist/esm/components/feedback/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/feedback/Dialog/DialogBody.js.map +1 -1
- package/dist/esm/components/feedback/Dialog/DialogClose.js.map +1 -1
- package/dist/esm/components/feedback/Dialog/DialogFooter.js.map +1 -1
- package/dist/esm/components/feedback/Dialog/DialogHeader.js +1 -1
- package/dist/esm/components/feedback/Dialog/DialogHeader.js.map +1 -1
- package/dist/esm/components/feedback/Dialog/useDialogAnimation.js +10 -2
- package/dist/esm/components/feedback/Dialog/useDialogAnimation.js.map +1 -1
- package/dist/esm/components/feedback/Drawer/Drawer.js +4 -1
- package/dist/esm/components/feedback/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/feedback/Drawer/useDrawerAnimation.js +4 -0
- package/dist/esm/components/feedback/Drawer/useDrawerAnimation.js.map +1 -1
- package/dist/esm/components/feedback/EmptyState/EmptyState.js +1 -1
- package/dist/esm/components/feedback/EmptyState/EmptyState.js.map +1 -1
- package/dist/esm/components/feedback/LogView/LogView.css.js +35 -0
- package/dist/esm/components/feedback/LogView/LogView.css.js.map +1 -0
- package/dist/esm/components/feedback/LogView/LogView.js +297 -0
- package/dist/esm/components/feedback/LogView/LogView.js.map +1 -0
- package/dist/esm/components/feedback/LogView/LogViewBody.js +205 -0
- package/dist/esm/components/feedback/LogView/LogViewBody.js.map +1 -0
- package/dist/esm/components/feedback/LogView/LogViewContext.js +31 -0
- package/dist/esm/components/feedback/LogView/LogViewContext.js.map +1 -0
- package/dist/esm/components/feedback/LogView/LogViewParts.js +73 -0
- package/dist/esm/components/feedback/LogView/LogViewParts.js.map +1 -0
- package/dist/esm/components/feedback/LogView/LogViewStore.js +240 -0
- package/dist/esm/components/feedback/LogView/LogViewStore.js.map +1 -0
- package/dist/esm/components/feedback/LogView/logViewLabels.js +25 -0
- package/dist/esm/components/feedback/LogView/logViewLabels.js.map +1 -0
- package/dist/esm/components/feedback/LogView/logViewLevels.js +74 -0
- package/dist/esm/components/feedback/LogView/logViewLevels.js.map +1 -0
- package/dist/esm/components/feedback/LogView/logViewUtils.js +128 -0
- package/dist/esm/components/feedback/LogView/logViewUtils.js.map +1 -0
- package/dist/esm/components/feedback/LogView/useFollowTail.js +95 -0
- package/dist/esm/components/feedback/LogView/useFollowTail.js.map +1 -0
- package/dist/esm/components/feedback/LogView/useLogSelection.js +113 -0
- package/dist/esm/components/feedback/LogView/useLogSelection.js.map +1 -0
- package/dist/esm/components/feedback/ProgressBar/CircularProgress.js +1 -1
- package/dist/esm/components/feedback/ProgressBar/CircularProgress.js.map +1 -1
- package/dist/esm/components/feedback/ProgressBar/ProgressBar.js +1 -1
- package/dist/esm/components/feedback/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/esm/components/feedback/Skeleton/Skeleton.js +1 -1
- package/dist/esm/components/feedback/Skeleton/Skeleton.js.map +1 -1
- package/dist/esm/components/feedback/Skeleton/SkeletonGroup.js +1 -1
- package/dist/esm/components/feedback/Skeleton/SkeletonGroup.js.map +1 -1
- package/dist/esm/components/feedback/Skeleton/SkeletonLayout.js +1 -1
- package/dist/esm/components/feedback/Skeleton/SkeletonLayout.js.map +1 -1
- package/dist/esm/components/feedback/Spinner/Spinner.js +1 -1
- package/dist/esm/components/feedback/Spinner/Spinner.js.map +1 -1
- package/dist/esm/components/feedback/Stat/Stat.js.map +1 -1
- package/dist/esm/components/feedback/Toast/ToastContainer.js +1 -1
- package/dist/esm/components/feedback/Toast/ToastContainer.js.map +1 -1
- package/dist/esm/components/feedback/Toast/ToastItem.js +7 -3
- package/dist/esm/components/feedback/Toast/ToastItem.js.map +1 -1
- package/dist/esm/components/feedback/Toast/ToastProvider.js.map +1 -1
- package/dist/esm/components/feedback/Toast/useToast.js.map +1 -1
- package/dist/esm/components/form/FormHelperText.js.map +1 -1
- package/dist/esm/components/form/FormLabel.js.map +1 -1
- package/dist/esm/components/form/InputWrapper.js.map +1 -1
- package/dist/esm/components/layout/Accordion/Accordion.js +1 -1
- package/dist/esm/components/layout/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/layout/Accordion/AccordionContent.js +1 -1
- package/dist/esm/components/layout/Accordion/AccordionContent.js.map +1 -1
- package/dist/esm/components/layout/Accordion/AccordionItem.js +1 -1
- package/dist/esm/components/layout/Accordion/AccordionItem.js.map +1 -1
- package/dist/esm/components/layout/Accordion/AccordionTrigger.js +7 -2
- package/dist/esm/components/layout/Accordion/AccordionTrigger.js.map +1 -1
- package/dist/esm/components/layout/Card/Card.js +2 -2
- package/dist/esm/components/layout/Card/Card.js.map +1 -1
- package/dist/esm/components/layout/Divider/Divider.js.map +1 -1
- package/dist/esm/components/layout/Flex/Flex.js +1 -1
- package/dist/esm/components/layout/Flex/Flex.js.map +1 -1
- package/dist/esm/components/layout/Grid/Grid.js +1 -1
- package/dist/esm/components/layout/Grid/Grid.js.map +1 -1
- package/dist/esm/components/layout/ListItem/ListItem.js +1 -1
- package/dist/esm/components/layout/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/layout/PageHeader/PageHeader.js.map +1 -1
- package/dist/esm/components/layout/PanelSurface/PanelSurface.js +3 -3
- package/dist/esm/components/layout/PanelSurface/PanelSurface.js.map +1 -1
- package/dist/esm/components/layout/ScrollArea/ScrollArea.js +91 -23
- package/dist/esm/components/layout/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/components/layout/Spacer/Spacer.js.map +1 -1
- package/dist/esm/components/layout/SplitPane/SplitPane.js +29 -16
- package/dist/esm/components/layout/SplitPane/SplitPane.js.map +1 -1
- package/dist/esm/components/layout/SplitPane/SplitPanePanel.js.map +1 -1
- package/dist/esm/components/layout/Stack/Stack.js +1 -1
- package/dist/esm/components/layout/Stack/Stack.js.map +1 -1
- package/dist/esm/components/navigation/Breadcrumbs/BreadcrumbEllipsis.js +4 -0
- package/dist/esm/components/navigation/Breadcrumbs/BreadcrumbEllipsis.js.map +1 -1
- package/dist/esm/components/navigation/Breadcrumbs/BreadcrumbItem.js +6 -2
- package/dist/esm/components/navigation/Breadcrumbs/BreadcrumbItem.js.map +1 -1
- package/dist/esm/components/navigation/Breadcrumbs/BreadcrumbSeparator.js.map +1 -1
- package/dist/esm/components/navigation/Breadcrumbs/Breadcrumbs.js +13 -2
- package/dist/esm/components/navigation/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/esm/components/navigation/ContextMenu/ContextMenu.js +45 -39
- package/dist/esm/components/navigation/ContextMenu/ContextMenu.js.map +1 -1
- package/dist/esm/components/navigation/Menu/Menu.css.js +9 -12
- package/dist/esm/components/navigation/Menu/Menu.css.js.map +1 -1
- package/dist/esm/components/navigation/Menu/Menu.js +97 -63
- package/dist/esm/components/navigation/Menu/Menu.js.map +1 -1
- package/dist/esm/components/navigation/Menu/MenuGapContext.js +19 -0
- package/dist/esm/components/navigation/Menu/MenuGapContext.js.map +1 -0
- package/dist/esm/components/navigation/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/navigation/Pagination/usePagination.js.map +1 -1
- package/dist/esm/components/navigation/PathBar/PathBar.css.js +6 -0
- package/dist/esm/components/navigation/PathBar/PathBar.css.js.map +1 -0
- package/dist/esm/components/navigation/PathBar/PathBar.js +184 -0
- package/dist/esm/components/navigation/PathBar/PathBar.js.map +1 -0
- package/dist/esm/components/navigation/PathBar/PathBarSiblingMenu.js +151 -0
- package/dist/esm/components/navigation/PathBar/PathBarSiblingMenu.js.map +1 -0
- package/dist/esm/components/navigation/PathBar/pathUtils.js +118 -0
- package/dist/esm/components/navigation/PathBar/pathUtils.js.map +1 -0
- package/dist/esm/components/navigation/SegmentedControl/SegmentedControl.js +16 -6
- package/dist/esm/components/navigation/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/esm/components/navigation/SegmentedControl/SegmentedControlItem.js +1 -1
- package/dist/esm/components/navigation/SegmentedControl/SegmentedControlItem.js.map +1 -1
- package/dist/esm/components/navigation/Tabs/Tab.js +10 -3
- package/dist/esm/components/navigation/Tabs/Tab.js.map +1 -1
- package/dist/esm/components/navigation/Tabs/TabList.js +5 -2
- package/dist/esm/components/navigation/Tabs/TabList.js.map +1 -1
- package/dist/esm/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/esm/components/navigation/Tabs/TabPanel.js.map +1 -1
- package/dist/esm/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/primitives/Avatar/Avatar.js +11 -4
- package/dist/esm/components/primitives/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/primitives/Avatar/AvatarGroup.js +2 -2
- package/dist/esm/components/primitives/Avatar/AvatarGroup.js.map +1 -1
- package/dist/esm/components/primitives/Badge/Badge.js +10 -3
- package/dist/esm/components/primitives/Badge/Badge.js.map +1 -1
- package/dist/esm/components/primitives/Button/Button.js.map +1 -1
- package/dist/esm/components/primitives/Checkbox/Checkbox.js +6 -4
- package/dist/esm/components/primitives/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/primitives/Checkbox/CheckboxGroup.js +2 -2
- package/dist/esm/components/primitives/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/esm/components/primitives/Code/Code.js.map +1 -1
- package/dist/esm/components/primitives/Collapsible/Collapsible.js +2 -2
- package/dist/esm/components/primitives/Collapsible/Collapsible.js.map +1 -1
- package/dist/esm/components/primitives/HoverCard/HoverCard.js +5 -3
- package/dist/esm/components/primitives/HoverCard/HoverCard.js.map +1 -1
- package/dist/esm/components/primitives/Icon/Icon.js +1 -1
- package/dist/esm/components/primitives/Icon/Icon.js.map +1 -1
- package/dist/esm/components/primitives/IconButton/IconButton.js.map +1 -1
- package/dist/esm/components/primitives/Input/Input.js +1 -1
- package/dist/esm/components/primitives/Input/Input.js.map +1 -1
- package/dist/esm/components/primitives/Kbd/Kbd.js +1 -1
- package/dist/esm/components/primitives/Kbd/Kbd.js.map +1 -1
- package/dist/esm/components/primitives/Link/Link.js.map +1 -1
- package/dist/esm/components/primitives/Paper/Paper.js.map +1 -1
- package/dist/esm/components/primitives/Popover/Popover.js +1 -1
- package/dist/esm/components/primitives/Popover/Popover.js.map +1 -1
- package/dist/esm/components/primitives/Popover/PopoverClose.js +1 -1
- package/dist/esm/components/primitives/Popover/PopoverClose.js.map +1 -1
- package/dist/esm/components/primitives/Popover/PopoverContent.js +6 -4
- package/dist/esm/components/primitives/Popover/PopoverContent.js.map +1 -1
- package/dist/esm/components/primitives/Popover/PopoverTrigger.js.map +1 -1
- package/dist/esm/components/primitives/Radio/Radio.js +3 -3
- package/dist/esm/components/primitives/Radio/Radio.js.map +1 -1
- package/dist/esm/components/primitives/Radio/RadioGroup.js +2 -2
- package/dist/esm/components/primitives/Radio/RadioGroup.js.map +1 -1
- package/dist/esm/components/primitives/Switch/Switch.js +1 -1
- package/dist/esm/components/primitives/Switch/Switch.js.map +1 -1
- package/dist/esm/components/primitives/Text/Text.js.map +1 -1
- package/dist/esm/components/primitives/TextArea/TextArea.js +3 -4
- package/dist/esm/components/primitives/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/primitives/Tooltip/Arrow.js +1 -1
- package/dist/esm/components/primitives/Tooltip/Arrow.js.map +1 -1
- package/dist/esm/components/primitives/Tooltip/Tooltip.js +9 -7
- package/dist/esm/components/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/primitives/Tooltip/utils.js +1 -1
- package/dist/esm/components/primitives/Tooltip/utils.js.map +1 -1
- package/dist/esm/components/primitives/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/esm/components/primitives/canvas/CanvasContainer.js +1 -1
- package/dist/esm/components/primitives/canvas/CanvasContainer.js.map +1 -1
- package/dist/esm/components/primitives/canvas/canvasCoords.js.map +1 -1
- package/dist/esm/components/primitives/canvas/canvasDrawing.js +1 -1
- package/dist/esm/components/primitives/canvas/canvasDrawing.js.map +1 -1
- package/dist/esm/components/primitives/canvas/canvasTheme.js.map +1 -1
- package/dist/esm/components/primitives/canvas/useCanvasRenderer.js +8 -2
- package/dist/esm/components/primitives/canvas/useCanvasRenderer.js.map +1 -1
- package/dist/esm/components/primitives/viewport/Viewport.css.js +12 -0
- package/dist/esm/components/primitives/viewport/Viewport.css.js.map +1 -0
- package/dist/esm/components/primitives/viewport/Viewport.js +189 -0
- package/dist/esm/components/primitives/viewport/Viewport.js.map +1 -0
- package/dist/esm/components/primitives/viewport/ViewportContext.js +47 -0
- package/dist/esm/components/primitives/viewport/ViewportContext.js.map +1 -0
- package/dist/esm/components/primitives/viewport/ViewportLayer.js +113 -0
- package/dist/esm/components/primitives/viewport/ViewportLayer.js.map +1 -0
- package/dist/esm/components/primitives/viewport/ViewportOverlay.js +47 -0
- package/dist/esm/components/primitives/viewport/ViewportOverlay.js.map +1 -0
- package/dist/esm/components/primitives/viewport/ViewportStore.js +210 -0
- package/dist/esm/components/primitives/viewport/ViewportStore.js.map +1 -0
- package/dist/esm/components/primitives/viewport/ViewportWorld.js +38 -0
- package/dist/esm/components/primitives/viewport/ViewportWorld.js.map +1 -0
- package/dist/esm/components/primitives/viewport/useViewportGestures.js +333 -0
- package/dist/esm/components/primitives/viewport/useViewportGestures.js.map +1 -0
- package/dist/esm/components/primitives/viewport/viewportCoords.js +37 -0
- package/dist/esm/components/primitives/viewport/viewportCoords.js.map +1 -0
- package/dist/esm/components/primitives/viewport/viewportMath.js +77 -0
- package/dist/esm/components/primitives/viewport/viewportMath.js.map +1 -0
- package/dist/esm/components/shell/AppShell/AppShell.js +1 -1
- package/dist/esm/components/shell/AppShell/AppShell.js.map +1 -1
- package/dist/esm/components/shell/FloatingPanel/FloatingPanel.css.js +11 -10
- package/dist/esm/components/shell/FloatingPanel/FloatingPanel.css.js.map +1 -1
- package/dist/esm/components/shell/FloatingPanel/FloatingPanel.js +60 -24
- package/dist/esm/components/shell/FloatingPanel/FloatingPanel.js.map +1 -1
- package/dist/esm/components/shell/MenuBar/MenuBar.js +23 -16
- package/dist/esm/components/shell/MenuBar/MenuBar.js.map +1 -1
- package/dist/esm/components/shell/StatusBar/StatusBar.js.map +1 -1
- package/dist/esm/components/shell/Toolbar/Toolbar.js +4 -3
- package/dist/esm/components/shell/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/context/KeyboardContext.js.map +1 -1
- package/dist/esm/hooks/useBreakpoint/useBreakpoint.js +1 -1
- package/dist/esm/hooks/useBreakpoint/useBreakpoint.js.map +1 -1
- package/dist/esm/hooks/useClickOutside/useClickOutside.js +9 -9
- package/dist/esm/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/dist/esm/hooks/useClipboard/useClipboard.js +4 -0
- package/dist/esm/hooks/useClipboard/useClipboard.js.map +1 -1
- package/dist/esm/hooks/useControlledState/useControlledState.js.map +1 -1
- package/dist/esm/hooks/useDebounced/useDebouncedCallback.js +11 -6
- package/dist/esm/hooks/useDebounced/useDebouncedCallback.js.map +1 -1
- package/dist/esm/hooks/useDebounced/useDebouncedValue.js +16 -4
- package/dist/esm/hooks/useDebounced/useDebouncedValue.js.map +1 -1
- package/dist/esm/hooks/useDisclosure/useDisclosure.js.map +1 -1
- package/dist/esm/hooks/useEventCallback/useEventCallback.js +49 -0
- package/dist/esm/hooks/useEventCallback/useEventCallback.js.map +1 -0
- package/dist/esm/hooks/useFocusTrap/useFocusTrap.js.map +1 -1
- package/dist/esm/hooks/useHotkey/useHotkey.js +7 -12
- package/dist/esm/hooks/useHotkey/useHotkey.js.map +1 -1
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +2 -0
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -1
- package/dist/esm/hooks/useIsMounted/useIsMounted.js +43 -0
- package/dist/esm/hooks/useIsMounted/useIsMounted.js.map +1 -0
- package/dist/esm/hooks/useKeyboard/useKeyboard.js.map +1 -1
- package/dist/esm/hooks/useKeyboard/utils.js.map +1 -1
- package/dist/esm/hooks/useLatest/useLatest.js +31 -0
- package/dist/esm/hooks/useLatest/useLatest.js.map +1 -0
- package/dist/esm/hooks/useListboxNav/useListboxNav.js +29 -13
- package/dist/esm/hooks/useListboxNav/useListboxNav.js.map +1 -1
- package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +7 -1
- package/dist/esm/hooks/useMediaQuery/useMediaQuery.js.map +1 -1
- package/dist/esm/hooks/useMergedRef/useMergedRef.js +6 -1
- package/dist/esm/hooks/useMergedRef/useMergedRef.js.map +1 -1
- package/dist/esm/hooks/useNavigationHistory/useNavigationHistory.js +146 -0
- package/dist/esm/hooks/useNavigationHistory/useNavigationHistory.js.map +1 -0
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.js +6 -8
- package/dist/esm/hooks/useResizeObserver/useResizeObserver.js.map +1 -1
- package/dist/esm/hooks/useTheme/useTheme.js +6 -3
- package/dist/esm/hooks/useTheme/useTheme.js.map +1 -1
- package/dist/esm/hooks/useThrottledCallback/useThrottledCallback.js +9 -4
- package/dist/esm/hooks/useThrottledCallback/useThrottledCallback.js.map +1 -1
- package/dist/esm/index.js +63 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node_modules/tslib/tslib.es6.js +37 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/esm/styles.js +3 -0
- package/dist/esm/styles.js.map +1 -0
- package/dist/esm/theme/ThemeProvider.js +6 -4
- package/dist/esm/theme/ThemeProvider.js.map +1 -1
- package/dist/esm/theme/VanillaThemeProvider.js.map +1 -1
- package/dist/esm/theme/breakpoints.js.map +1 -1
- package/dist/esm/theme/contract.css.js +1 -1
- package/dist/esm/theme/createCustomTheme.js +2 -2
- package/dist/esm/theme/createCustomTheme.js.map +1 -1
- package/dist/esm/theme/createLightTheme.js.map +1 -1
- package/dist/esm/theme/darkTheme.css.js +2 -2
- package/dist/esm/theme/darkThemeValues.js +1 -1
- package/dist/esm/theme/darkThemeValues.js.map +1 -1
- package/dist/esm/theme/lightTheme.css.js +1 -1
- package/dist/esm/theme/lightThemeValues.js +1 -1
- package/dist/esm/theme/lightThemeValues.js.map +1 -1
- package/dist/esm/theme/themeContractData.js +4 -4
- package/dist/esm/theme/themeContractData.js.map +1 -1
- package/dist/esm/utils/cx.js.map +1 -1
- package/dist/esm/utils/devWarn.js +1 -1
- package/dist/esm/utils/devWarn.js.map +1 -1
- package/dist/esm/utils/mathExpression.js +1 -1
- package/dist/esm/utils/mathExpression.js.map +1 -1
- package/dist/esm/utils/mathUtils.js.map +1 -1
- package/dist/esm/utils/objects.js.map +1 -1
- package/dist/esm/utils/platform.js.map +1 -1
- package/dist/tokens/tokens.dark.css +1 -1
- package/dist/tokens/tokens.json +1 -1
- package/dist/tokens/tokens.light.css +1 -1
- package/dist/types/components/Icons/AddIcon.d.ts +1 -1
- package/dist/types/components/Icons/AiChatIcon.d.ts +1 -1
- package/dist/types/components/Icons/AiSparklesIcon.d.ts +1 -1
- package/dist/types/components/Icons/ArchiveIcon.d.ts +1 -1
- package/dist/types/components/Icons/ArrowDownIcon.d.ts +1 -1
- package/dist/types/components/Icons/ArrowLeftIcon.d.ts +1 -1
- package/dist/types/components/Icons/ArrowRightIcon.d.ts +1 -1
- package/dist/types/components/Icons/ArrowUpIcon.d.ts +1 -1
- package/dist/types/components/Icons/BookmarkIcon.d.ts +1 -1
- package/dist/types/components/Icons/BugIcon.d.ts +1 -1
- package/dist/types/components/Icons/BuildingIcon.d.ts +1 -1
- package/dist/types/components/Icons/CalendarIcon.d.ts +1 -1
- package/dist/types/components/Icons/CameraIcon.d.ts +34 -0
- package/dist/types/components/Icons/CheckIcon.d.ts +1 -1
- package/dist/types/components/Icons/ChevronDownIcon.d.ts +1 -1
- package/dist/types/components/Icons/ChevronLeftIcon.d.ts +1 -1
- package/dist/types/components/Icons/ChevronRightIcon.d.ts +1 -1
- package/dist/types/components/Icons/ChevronUpIcon.d.ts +1 -1
- package/dist/types/components/Icons/CircleIcon.d.ts +1 -1
- package/dist/types/components/Icons/ClockIcon.d.ts +1 -1
- package/dist/types/components/Icons/CloseIcon.d.ts +1 -1
- package/dist/types/components/Icons/CloudUploadIcon.d.ts +1 -1
- package/dist/types/components/Icons/CodeIcon.d.ts +1 -1
- package/dist/types/components/Icons/CopyIcon.d.ts +1 -1
- package/dist/types/components/Icons/CubeIcon.d.ts +34 -0
- package/dist/types/components/Icons/CutIcon.d.ts +1 -1
- package/dist/types/components/Icons/DotsHorizontalIcon.d.ts +1 -1
- package/dist/types/components/Icons/DotsVerticalIcon.d.ts +1 -1
- package/dist/types/components/Icons/DownloadIcon.d.ts +1 -1
- package/dist/types/components/Icons/EditIcon.d.ts +1 -1
- package/dist/types/components/Icons/ErrorIcon.d.ts +1 -1
- package/dist/types/components/Icons/ExternalLinkIcon.d.ts +1 -1
- package/dist/types/components/Icons/EyeDropperIcon.d.ts +1 -1
- package/dist/types/components/Icons/EyeIcon.d.ts +1 -1
- package/dist/types/components/Icons/FileTextIcon.d.ts +1 -1
- package/dist/types/components/Icons/FilterIcon.d.ts +1 -1
- package/dist/types/components/Icons/FirstIcon.d.ts +1 -1
- package/dist/types/components/Icons/FolderCogIcon.d.ts +1 -1
- package/dist/types/components/Icons/FolderIcon.d.ts +1 -1
- package/dist/types/components/Icons/FolderOpenIcon.d.ts +1 -1
- package/dist/types/components/Icons/FullscreenIcon.d.ts +1 -1
- package/dist/types/components/Icons/GitBranchIcon.d.ts +1 -1
- package/dist/types/components/Icons/GridIcon.d.ts +1 -1
- package/dist/types/components/Icons/HeartIcon.d.ts +1 -1
- package/dist/types/components/Icons/HelpIcon.d.ts +1 -1
- package/dist/types/components/Icons/HomeIcon.d.ts +1 -1
- package/dist/types/components/Icons/ImageIcon.d.ts +34 -0
- package/dist/types/components/Icons/InfoIcon.d.ts +1 -1
- package/dist/types/components/Icons/LastIcon.d.ts +1 -1
- package/dist/types/components/Icons/LinkIcon.d.ts +1 -1
- package/dist/types/components/Icons/ListIcon.d.ts +1 -1
- package/dist/types/components/Icons/LockIcon.d.ts +1 -1
- package/dist/types/components/Icons/MaximizeIcon.d.ts +1 -1
- package/dist/types/components/Icons/MenuIcon.d.ts +1 -1
- package/dist/types/components/Icons/MinimizeIcon.d.ts +1 -1
- package/dist/types/components/Icons/MinusIcon.d.ts +1 -1
- package/dist/types/components/Icons/OrbitIcon.d.ts +34 -0
- package/dist/types/components/Icons/PasteIcon.d.ts +1 -1
- package/dist/types/components/Icons/PauseIcon.d.ts +1 -1
- package/dist/types/components/Icons/PinIcon.d.ts +1 -1
- package/dist/types/components/Icons/PlayIcon.d.ts +1 -1
- package/dist/types/components/Icons/RedoIcon.d.ts +1 -1
- package/dist/types/components/Icons/RefreshIcon.d.ts +1 -1
- package/dist/types/components/Icons/RobotIcon.d.ts +1 -1
- package/dist/types/components/Icons/RotateIcon.d.ts +35 -0
- package/dist/types/components/Icons/SaveIcon.d.ts +1 -1
- package/dist/types/components/Icons/SearchIcon.d.ts +1 -1
- package/dist/types/components/Icons/SendIcon.d.ts +1 -1
- package/dist/types/components/Icons/SettingsIcon.d.ts +1 -1
- package/dist/types/components/Icons/SortIcon.d.ts +1 -1
- package/dist/types/components/Icons/SpinIcon.d.ts +35 -0
- package/dist/types/components/Icons/StarIcon.d.ts +1 -1
- package/dist/types/components/Icons/StopIcon.d.ts +1 -1
- package/dist/types/components/Icons/SuccessIcon.d.ts +1 -1
- package/dist/types/components/Icons/TagIcon.d.ts +1 -1
- package/dist/types/components/Icons/TangentAlignedIcon.d.ts +1 -1
- package/dist/types/components/Icons/TangentAutoIcon.d.ts +1 -1
- package/dist/types/components/Icons/TangentFreeIcon.d.ts +1 -1
- package/dist/types/components/Icons/TangentLinearIcon.d.ts +1 -1
- package/dist/types/components/Icons/TangentMirroredIcon.d.ts +1 -1
- package/dist/types/components/Icons/TangentStepIcon.d.ts +1 -1
- package/dist/types/components/Icons/TerminalIcon.d.ts +1 -1
- package/dist/types/components/Icons/TrashIcon.d.ts +1 -1
- package/dist/types/components/Icons/UndoIcon.d.ts +1 -1
- package/dist/types/components/Icons/UnlinkIcon.d.ts +1 -1
- package/dist/types/components/Icons/UnlockIcon.d.ts +1 -1
- package/dist/types/components/Icons/UploadIcon.d.ts +1 -1
- package/dist/types/components/Icons/UserIcon.d.ts +1 -1
- package/dist/types/components/Icons/UsersIcon.d.ts +1 -1
- package/dist/types/components/Icons/WarningIcon.d.ts +1 -1
- package/dist/types/components/Icons/ZoomFitIcon.d.ts +35 -0
- package/dist/types/components/Icons/ZoomInIcon.d.ts +1 -1
- package/dist/types/components/Icons/ZoomOutIcon.d.ts +1 -1
- package/dist/types/components/controls/CartesianPicker/CartesianPicker.types.d.ts +3 -3
- package/dist/types/components/controls/ColorPicker/ColorPicker.types.d.ts +2 -2
- package/dist/types/components/controls/ColorPicker/EyeDropper.d.ts +1 -1
- package/dist/types/components/controls/Combobox/Combobox.types.d.ts +1 -1
- package/dist/types/components/controls/CurveEditor/CurveEditor.types.d.ts +8 -58
- package/dist/types/components/controls/CurveEditor/curveUtils.d.ts +2 -1
- package/dist/types/components/controls/FileTree/FileTree.d.ts +34 -0
- package/dist/types/components/controls/FileTree/FileTree.types.d.ts +133 -0
- package/dist/types/components/controls/FileTree/fileTreeIcons.d.ts +29 -0
- package/dist/types/components/controls/FileTree/fileTreeLabels.d.ts +19 -0
- package/dist/types/components/controls/FileUploader/FileUploader.types.d.ts +2 -2
- package/dist/types/components/controls/MultiSelect/MultiSelect.types.d.ts +1 -1
- package/dist/types/components/controls/NumberInput/NumberInput.d.ts +2 -2
- package/dist/types/components/controls/Select/Select.d.ts +1 -1
- package/dist/types/components/controls/Select/Select.types.d.ts +45 -11
- package/dist/types/components/controls/Slider/Slider.d.ts +1 -1
- package/dist/types/components/controls/TagInput/TagInput.types.d.ts +2 -2
- package/dist/types/components/controls/TreeView/TreeView.d.ts +1 -1
- package/dist/types/components/controls/TreeView/TreeView.types.d.ts +24 -2
- package/dist/types/components/controls/VectorInput/VectorInput.types.d.ts +1 -1
- package/dist/types/components/data/DataTable/DataTable.types.d.ts +2 -2
- package/dist/types/components/editor/AssetBrowser/AssetBrowser.d.ts +13 -0
- package/dist/types/components/editor/AssetBrowser/AssetBrowser.types.d.ts +241 -0
- package/dist/types/components/editor/AssetBrowser/assetBrowserLabels.d.ts +70 -0
- package/dist/types/components/editor/ChatPanel/ChatMarkdownRenderer.types.d.ts +1 -1
- package/dist/types/components/editor/ChatPanel/ChatPanel.types.d.ts +2 -2
- package/dist/types/components/editor/Minimap/Minimap.d.ts +26 -0
- package/dist/types/components/editor/Minimap/Minimap.types.d.ts +249 -0
- package/dist/types/components/editor/Minimap/MinimapContext.d.ts +27 -0
- package/dist/types/components/editor/Minimap/MinimapCorner.d.ts +8 -0
- package/dist/types/components/editor/Minimap/MinimapFooter.d.ts +8 -0
- package/dist/types/components/editor/Minimap/MinimapStore.d.ts +17 -0
- package/dist/types/components/editor/Minimap/MinimapTitle.d.ts +8 -0
- package/dist/types/components/editor/Minimap/ViewportMinimap.d.ts +52 -0
- package/dist/types/components/editor/Minimap/computeBoundsFromItems.d.ts +13 -0
- package/dist/types/components/editor/Minimap/index.d.ts +13 -0
- package/dist/types/components/editor/NodeGraph/NodeGraph.d.ts +63 -0
- package/dist/types/components/editor/NodeGraph/NodeGraph.types.d.ts +568 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphContext.d.ts +30 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphNodeParts.d.ts +86 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphNodeSection.d.ts +47 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphPin.d.ts +57 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphPort.d.ts +30 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphPortVisual.d.ts +46 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphSlots.d.ts +16 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphStore.d.ts +256 -0
- package/dist/types/components/editor/NodeGraph/NodeGraphToolbar.d.ts +54 -0
- package/dist/types/components/editor/NodeGraph/createTypeMatchValidator.d.ts +43 -0
- package/dist/types/components/editor/NodeGraph/nodeGraphActions.d.ts +39 -0
- package/dist/types/components/editor/NodeGraph/nodeGraphIds.d.ts +16 -0
- package/dist/types/components/editor/NodeGraph/useNodeGraph.d.ts +103 -0
- package/dist/types/components/editor/PropertyInspector/PropertyInspector.types.d.ts +51 -5
- package/dist/types/components/editor/Timeline/Timeline.d.ts +18 -0
- package/dist/types/components/editor/Timeline/Timeline.types.d.ts +348 -0
- package/dist/types/components/editor/Timeline/TimelineContext.d.ts +51 -0
- package/dist/types/components/editor/Timeline/TimelineFooter.d.ts +8 -0
- package/dist/types/components/editor/Timeline/TimelineMinimap.d.ts +21 -0
- package/dist/types/components/editor/Timeline/TimelineStore.d.ts +41 -0
- package/dist/types/components/editor/Timeline/TimelineToolbar.d.ts +8 -0
- package/dist/types/components/editor/Timeline/TimelineTrackScale.d.ts +8 -0
- package/dist/types/components/editor/Timeline/index.d.ts +15 -0
- package/dist/types/components/editor/Timeline/timelineCoords.d.ts +7 -0
- package/dist/types/components/editor/Timeline/timelineEdits.d.ts +18 -0
- package/dist/types/components/editor/TransformControl/TransformControl.types.d.ts +2 -2
- package/dist/types/components/editor/ViewportGizmo/ViewportGizmo.types.d.ts +1 -1
- package/dist/types/components/feedback/Alert/Alert.d.ts +2 -2
- package/dist/types/components/feedback/Alert/Alert.types.d.ts +5 -5
- package/dist/types/components/feedback/CommandPalette/CommandPalette.types.d.ts +1 -3
- package/dist/types/components/feedback/Dialog/Dialog.types.d.ts +2 -2
- package/dist/types/components/feedback/Drawer/Drawer.types.d.ts +1 -1
- package/dist/types/components/feedback/EmptyState/EmptyState.types.d.ts +2 -2
- package/dist/types/components/feedback/LogView/LogView.d.ts +58 -0
- package/dist/types/components/feedback/LogView/LogView.types.d.ts +333 -0
- package/dist/types/components/feedback/LogView/LogViewBody.d.ts +15 -0
- package/dist/types/components/feedback/LogView/LogViewContext.d.ts +9 -0
- package/dist/types/components/feedback/LogView/LogViewParts.d.ts +35 -0
- package/dist/types/components/feedback/LogView/LogViewStore.d.ts +4 -0
- package/dist/types/components/feedback/LogView/logViewLabels.d.ts +9 -0
- package/dist/types/components/feedback/LogView/logViewUtils.d.ts +41 -0
- package/dist/types/components/feedback/ProgressBar/ProgressBar.types.d.ts +3 -3
- package/dist/types/components/feedback/Skeleton/Skeleton.types.d.ts +4 -4
- package/dist/types/components/feedback/Stat/Stat.types.d.ts +2 -2
- package/dist/types/components/feedback/Toast/Toast.types.d.ts +1 -1
- package/dist/types/components/form/FormHelperText.d.ts +2 -2
- package/dist/types/components/form/FormLabel.d.ts +1 -1
- package/dist/types/components/form/InputWrapper.d.ts +2 -2
- package/dist/types/components/layout/Accordion/Accordion.types.d.ts +2 -2
- package/dist/types/components/layout/Card/Card.types.d.ts +6 -6
- package/dist/types/components/layout/Divider/Divider.types.d.ts +2 -2
- package/dist/types/components/layout/Flex/Flex.d.ts +1 -1
- package/dist/types/components/layout/Grid/Grid.d.ts +1 -1
- package/dist/types/components/layout/ListItem/ListItem.types.d.ts +2 -2
- package/dist/types/components/layout/PageHeader/PageHeader.types.d.ts +1 -1
- package/dist/types/components/layout/PanelSurface/PanelSurface.types.d.ts +6 -6
- package/dist/types/components/layout/ScrollArea/ScrollArea.types.d.ts +2 -2
- package/dist/types/components/layout/Stack/Stack.d.ts +1 -1
- package/dist/types/components/navigation/Breadcrumbs/BreadcrumbItem.d.ts +1 -0
- package/dist/types/components/navigation/Breadcrumbs/Breadcrumbs.types.d.ts +7 -0
- package/dist/types/components/navigation/ContextMenu/ContextMenu.d.ts +18 -3
- package/dist/types/components/navigation/ContextMenu/ContextMenu.types.d.ts +55 -63
- package/dist/types/components/navigation/Menu/Menu.d.ts +38 -35
- package/dist/types/components/navigation/Menu/Menu.types.d.ts +190 -71
- package/dist/types/components/navigation/Pagination/Pagination.types.d.ts +1 -1
- package/dist/types/components/navigation/PathBar/PathBar.d.ts +31 -0
- package/dist/types/components/navigation/PathBar/PathBar.types.d.ts +79 -0
- package/dist/types/components/navigation/SegmentedControl/SegmentedControl.types.d.ts +3 -3
- package/dist/types/components/navigation/Tabs/Tabs.types.d.ts +2 -2
- package/dist/types/components/primitives/Avatar/Avatar.types.d.ts +2 -2
- package/dist/types/components/primitives/Badge/Badge.types.d.ts +1 -1
- package/dist/types/components/primitives/Button/Button.d.ts +2 -2
- package/dist/types/components/primitives/Checkbox/Checkbox.types.d.ts +2 -2
- package/dist/types/components/primitives/Code/Code.types.d.ts +1 -1
- package/dist/types/components/primitives/Collapsible/Collapsible.types.d.ts +2 -2
- package/dist/types/components/primitives/HoverCard/HoverCard.types.d.ts +3 -3
- package/dist/types/components/primitives/Icon/Icon.d.ts +2 -2
- package/dist/types/components/primitives/IconButton/IconButton.d.ts +1 -1
- package/dist/types/components/primitives/Input/Input.d.ts +1 -1
- package/dist/types/components/primitives/Kbd/Kbd.types.d.ts +1 -1
- package/dist/types/components/primitives/Link/Link.types.d.ts +1 -1
- package/dist/types/components/primitives/Popover/Popover.types.d.ts +2 -2
- package/dist/types/components/primitives/Radio/Radio.types.d.ts +3 -3
- package/dist/types/components/primitives/Switch/Switch.d.ts +1 -1
- package/dist/types/components/primitives/TextArea/TextArea.types.d.ts +1 -1
- package/dist/types/components/primitives/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/components/primitives/VisuallyHidden/VisuallyHidden.types.d.ts +1 -1
- package/dist/types/components/primitives/canvas/canvas.types.d.ts +16 -1
- package/dist/types/components/primitives/viewport/Viewport.d.ts +38 -0
- package/dist/types/components/primitives/viewport/Viewport.types.d.ts +257 -0
- package/dist/types/components/primitives/viewport/ViewportContext.d.ts +23 -0
- package/dist/types/components/primitives/viewport/ViewportLayer.d.ts +26 -0
- package/dist/types/components/primitives/viewport/ViewportOverlay.d.ts +27 -0
- package/dist/types/components/primitives/viewport/ViewportWorld.d.ts +25 -0
- package/dist/types/components/primitives/viewport/viewportCoords.d.ts +25 -0
- package/dist/types/components/primitives/viewport/viewportMath.d.ts +35 -0
- package/dist/types/components/shell/AppShell/AppShell.types.d.ts +2 -2
- package/dist/types/components/shell/FloatingPanel/FloatingPanel.types.d.ts +2 -2
- package/dist/types/components/shell/MenuBar/MenuBar.types.d.ts +5 -5
- package/dist/types/components/shell/StatusBar/StatusBar.types.d.ts +3 -3
- package/dist/types/components/shell/Toolbar/Toolbar.types.d.ts +5 -5
- package/dist/types/hooks/useDebounced/useDebouncedValue.d.ts +13 -4
- package/dist/types/hooks/useEventCallback/useEventCallback.d.ts +32 -0
- package/dist/types/hooks/useIsMounted/useIsMounted.d.ts +28 -0
- package/dist/types/hooks/useKeyboard/types.d.ts +1 -1
- package/dist/types/hooks/useLatest/useLatest.d.ts +23 -0
- package/dist/types/hooks/useResizeObserver/useResizeObserver.d.ts +3 -3
- package/dist/types/index.d.ts +71 -6
- package/dist/types/theme/ThemeProvider.d.ts +5 -3
- package/dist/types/theme/contract.css.d.ts +1 -1
- package/dist/types/theme/createCustomTheme.d.ts +1 -1
- package/dist/types/theme/darkThemeValues.d.ts +1 -1
- package/dist/types/theme/lightThemeValues.d.ts +1 -1
- package/dist/types/theme/themeContractData.d.ts +4 -4
- package/dist/types/theme-values.d.ts +1 -1
- package/dist/types/types/keyframe.d.ts +64 -0
- package/package.json +34 -18
- package/dist/esm/_virtual/_commonjsHelpers.js +0 -6
- package/dist/esm/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/esm/_virtual/cjs.js +0 -4
- package/dist/esm/_virtual/cjs.js.map +0 -1
- package/dist/esm/_virtual/cssesc.js +0 -8
- package/dist/esm/_virtual/cssesc.js.map +0 -1
- package/dist/esm/_virtual/picocolors.js +0 -8
- package/dist/esm/_virtual/picocolors.js.map +0 -1
- package/dist/esm/_virtual/picocolors2.js +0 -4
- package/dist/esm/_virtual/picocolors2.js.map +0 -1
- package/dist/esm/assets/src/components/navigation/Menu/Menu.css.ts.vanilla-DD0c5D10.css +0 -67
- package/dist/esm/components/navigation/ContextMenu/useContextMenuTarget.js +0 -53
- package/dist/esm/components/navigation/ContextMenu/useContextMenuTarget.js.map +0 -1
- package/dist/esm/components/navigation/Menu/Menu.helpers.js +0 -53
- package/dist/esm/components/navigation/Menu/Menu.helpers.js.map +0 -1
- package/dist/esm/components/navigation/Menu/useMenu.js +0 -88
- package/dist/esm/components/navigation/Menu/useMenu.js.map +0 -1
- package/dist/esm/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -56
- package/dist/esm/node_modules/@emotion/hash/dist/emotion-hash.esm.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/css/adapter/dist/vanilla-extract-css-adapter.esm.js +0 -46
- package/dist/esm/node_modules/@vanilla-extract/css/adapter/dist/vanilla-extract-css-adapter.esm.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/css/dist/taggedTemplateLiteral-10998315.esm.js +0 -13
- package/dist/esm/node_modules/@vanilla-extract/css/dist/taggedTemplateLiteral-10998315.esm.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/css/dist/transformCss-fd0786e1.esm.js +0 -962
- package/dist/esm/node_modules/@vanilla-extract/css/dist/transformCss-fd0786e1.esm.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js +0 -309
- package/dist/esm/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.esm.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.esm.js +0 -18
- package/dist/esm/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.esm.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.esm.js +0 -23
- package/dist/esm/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.esm.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/css/node_modules/lru-cache/dist/esm/index.js +0 -1543
- package/dist/esm/node_modules/@vanilla-extract/css/node_modules/lru-cache/dist/esm/index.js.map +0 -1
- package/dist/esm/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js +0 -38
- package/dist/esm/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js.map +0 -1
- package/dist/esm/node_modules/css-what/lib/es/parse.js +0 -424
- package/dist/esm/node_modules/css-what/lib/es/parse.js.map +0 -1
- package/dist/esm/node_modules/css-what/lib/es/types.js +0 -29
- package/dist/esm/node_modules/css-what/lib/es/types.js.map +0 -1
- package/dist/esm/node_modules/cssesc/cssesc.js +0 -120
- package/dist/esm/node_modules/cssesc/cssesc.js.map +0 -1
- package/dist/esm/node_modules/dedent/dist/dedent.js +0 -100
- package/dist/esm/node_modules/dedent/dist/dedent.js.map +0 -1
- package/dist/esm/node_modules/deep-object-diff/mjs/diff.js +0 -40
- package/dist/esm/node_modules/deep-object-diff/mjs/diff.js.map +0 -1
- package/dist/esm/node_modules/deep-object-diff/mjs/utils.js +0 -9
- package/dist/esm/node_modules/deep-object-diff/mjs/utils.js.map +0 -1
- package/dist/esm/node_modules/deepmerge/dist/cjs.js +0 -143
- package/dist/esm/node_modules/deepmerge/dist/cjs.js.map +0 -1
- package/dist/esm/node_modules/media-query-parser/dist/media-query-parser.esm.js +0 -1386
- package/dist/esm/node_modules/media-query-parser/dist/media-query-parser.esm.js.map +0 -1
- package/dist/esm/node_modules/modern-ahocorasick/dist/index.js +0 -102
- package/dist/esm/node_modules/modern-ahocorasick/dist/index.js.map +0 -1
- package/dist/esm/node_modules/picocolors/picocolors.js +0 -87
- package/dist/esm/node_modules/picocolors/picocolors.js.map +0 -1
- package/dist/types/components/navigation/ContextMenu/useContextMenuTarget.d.ts +0 -5
- package/dist/types/components/navigation/Menu/useMenu.d.ts +0 -16
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import React, { useRef, useMemo, useLayoutEffect, useImperativeHandle, useCallback, useEffect } from 'react';
|
|
4
|
+
import { resolveVarValue } from '../../primitives/canvas/canvasTheme.js';
|
|
5
|
+
import '../../../utils/devWarn.js';
|
|
6
|
+
import { useLatest } from '../../../hooks/useLatest/useLatest.js';
|
|
7
|
+
import '../../../hooks/useBreakpoint/useBreakpoint.js';
|
|
8
|
+
import { vars } from '../../../theme/contract.css.js';
|
|
9
|
+
import './../../../assets/src/theme/lightTheme.css.ts.vanilla-Ct6f9Iym.css';
|
|
10
|
+
import '@vanilla-extract/css';
|
|
11
|
+
import './../../../assets/src/theme/darkTheme.css.ts.vanilla-BHZ3ecRn.css';
|
|
12
|
+
import './../../../assets/src/theme/globalScrollbars.css.ts.vanilla-BAJwnUEJ.css';
|
|
13
|
+
import '../../../hooks/useNavigationHistory/useNavigationHistory.js';
|
|
14
|
+
import { cx } from '../../../utils/cx.js';
|
|
15
|
+
import { minimapShellStyle, titleInsideStyle, titleOutsideStyle, footerInsideStyle, footerOutsideStyle, cornerTopLeftStyle, cornerTopRightStyle, cornerBottomLeftStyle, cornerBottomRightStyle, minimapBodyStyle, minimapCanvasStyle, minimapOverlayLayerStyle, ariaLiveRegionStyle } from './Minimap.css.js';
|
|
16
|
+
import { MINIMAP_SLOT } from './Minimap.types.js';
|
|
17
|
+
import { MinimapStoreContext, useMinimapDragState } from './MinimapContext.js';
|
|
18
|
+
import { computeMinimapHeight } from './minimapCoords.js';
|
|
19
|
+
import { drawMinimap } from './minimapDrawing.js';
|
|
20
|
+
import { MinimapStore } from './MinimapStore.js';
|
|
21
|
+
import { useMinimapGestures } from './useMinimapGestures.js';
|
|
22
|
+
|
|
23
|
+
const DEFAULT_OUTSIDE_OVERLAY = 'rgba(0, 0, 0, 0.4)';
|
|
24
|
+
const DEFAULT_INTERACTIONS = {
|
|
25
|
+
click: true,
|
|
26
|
+
dragViewportRect: true,
|
|
27
|
+
dragFromEmpty: true,
|
|
28
|
+
};
|
|
29
|
+
const DISABLED_INTERACTIONS = {
|
|
30
|
+
click: false,
|
|
31
|
+
dragViewportRect: false,
|
|
32
|
+
dragFromEmpty: false,
|
|
33
|
+
};
|
|
34
|
+
function getSlotKind(el) {
|
|
35
|
+
const marker = el.type[MINIMAP_SLOT];
|
|
36
|
+
return marker ?? null;
|
|
37
|
+
}
|
|
38
|
+
function categorizeChildren(children) {
|
|
39
|
+
const slots = {
|
|
40
|
+
titleAbove: null,
|
|
41
|
+
titleInside: null,
|
|
42
|
+
footerBelow: null,
|
|
43
|
+
footerInside: null,
|
|
44
|
+
corners: {},
|
|
45
|
+
other: [],
|
|
46
|
+
};
|
|
47
|
+
React.Children.forEach(children, child => {
|
|
48
|
+
if (!React.isValidElement(child)) {
|
|
49
|
+
if (child !== null && child !== undefined && child !== false) {
|
|
50
|
+
slots.other.push(child);
|
|
51
|
+
}
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const kind = getSlotKind(child);
|
|
55
|
+
if (kind === null) {
|
|
56
|
+
// Dev warning: a child whose displayName looks like a Minimap slot
|
|
57
|
+
// (e.g. wrapped in React.memo) but lost the symbol marker.
|
|
58
|
+
if (process.env['NODE_ENV'] !== 'production') {
|
|
59
|
+
const displayName = child.type
|
|
60
|
+
?.displayName;
|
|
61
|
+
if (displayName?.startsWith('Minimap.')) {
|
|
62
|
+
console.warn(`[Minimap] child "${displayName}" looks like a slot subcomponent ` +
|
|
63
|
+
`but is missing the MINIMAP_SLOT symbol marker. It will render ` +
|
|
64
|
+
`as a free-form overlay. If you wrapped a slot subcomponent ` +
|
|
65
|
+
`(e.g. with React.memo), copy the symbol onto the wrapper.`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
slots.other.push(child);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const props = child.props;
|
|
72
|
+
if (kind === 'title') {
|
|
73
|
+
const placement = props.placement === 'top-inside' ? 'top-inside' : 'top-outside';
|
|
74
|
+
const node = (jsx("div", { className: cx(placement === 'top-inside' ? titleInsideStyle : titleOutsideStyle, props.className), style: props.style, children: props.children }));
|
|
75
|
+
if (placement === 'top-inside')
|
|
76
|
+
slots.titleInside = node;
|
|
77
|
+
else
|
|
78
|
+
slots.titleAbove = node;
|
|
79
|
+
}
|
|
80
|
+
else if (kind === 'footer') {
|
|
81
|
+
const placement = props.placement === 'bottom-inside'
|
|
82
|
+
? 'bottom-inside'
|
|
83
|
+
: 'bottom-outside';
|
|
84
|
+
const node = (jsx("div", { className: cx(placement === 'bottom-inside'
|
|
85
|
+
? footerInsideStyle
|
|
86
|
+
: footerOutsideStyle, props.className), style: props.style, children: props.children }));
|
|
87
|
+
if (placement === 'bottom-inside')
|
|
88
|
+
slots.footerInside = node;
|
|
89
|
+
else
|
|
90
|
+
slots.footerBelow = node;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
// kind is narrowed to 'corner' here (only remaining slot kind).
|
|
94
|
+
const side = props.side ?? 'top-right';
|
|
95
|
+
const cornerStyle = side === 'top-left'
|
|
96
|
+
? cornerTopLeftStyle
|
|
97
|
+
: side === 'top-right'
|
|
98
|
+
? cornerTopRightStyle
|
|
99
|
+
: side === 'bottom-left'
|
|
100
|
+
? cornerBottomLeftStyle
|
|
101
|
+
: cornerBottomRightStyle;
|
|
102
|
+
slots.corners[side] = (jsx("div", { className: cx(cornerStyle, props.className), style: props.style, children: props.children }));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return slots;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The interactive body that hosts canvas + overlay layer + pointer/keyboard
|
|
109
|
+
* handlers. Subscribes to the drag slice for its `data-dragging` attribute
|
|
110
|
+
* + aria-live announcement so neither lives in React state on the outer
|
|
111
|
+
* shell.
|
|
112
|
+
*/
|
|
113
|
+
function MinimapBody({ bodyRef, canvasRef, width, height, ariaLabel, disabled, handlers, overlayChildren, ariaLiveActive, }) {
|
|
114
|
+
const isDragging = useMinimapDragState();
|
|
115
|
+
return (
|
|
116
|
+
// The minimap body is a labelled landmark region that doubles as an
|
|
117
|
+
// interactive pan/zoom surface (focusable, with pointer + key handlers).
|
|
118
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
119
|
+
jsxs("div", { ref: bodyRef, className: minimapBodyStyle, "data-dragging": isDragging || undefined, "data-disabled": disabled || undefined, role: "region", "aria-label": ariaLabel, tabIndex: disabled ? -1 : 0, style: { width, height }, onPointerDown: handlers.onPointerDown, onPointerMove: handlers.onPointerMove, onPointerUp: handlers.onPointerUp, onPointerCancel: handlers.onPointerCancel, onPointerLeave: handlers.onPointerLeave, onKeyDown: handlers.onKeyDown, children: [jsx("canvas", { ref: canvasRef, className: minimapCanvasStyle, style: { width, height } }), jsx("div", { className: minimapOverlayLayerStyle, children: overlayChildren }), jsx("div", { className: ariaLiveRegionStyle, "aria-live": "polite", role: "status", children: ariaLiveActive && isDragging ? 'Panning viewport' : '' })] }));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Compact navigation widget for editor viewports. Renders a miniature of
|
|
123
|
+
* the world content alongside a draggable rectangle that mirrors the main
|
|
124
|
+
* viewport's visible region. Intended to be shared by NodeGraph, Timeline,
|
|
125
|
+
* and any custom 2D editor surface.
|
|
126
|
+
*
|
|
127
|
+
* Designed as a controlled primitive — pass the current `transform` /
|
|
128
|
+
* `viewportSize` from your `<Viewport>` and translate `onNavigate.worldPoint`
|
|
129
|
+
* into a `viewport.centerOn(...)` call.
|
|
130
|
+
*
|
|
131
|
+
* Children may include `<Minimap.Title>`, `<Minimap.Footer>`,
|
|
132
|
+
* `<Minimap.Corner>` slot subcomponents — any other nodes render as a
|
|
133
|
+
* free-form overlay layer above the canvas body. Children can read live
|
|
134
|
+
* state (hover position, hovered item id, transform) via
|
|
135
|
+
* `useMinimapContext()` / `useMinimapHover()` / `useMinimapGeometry()` /
|
|
136
|
+
* `useMinimapDragState()`.
|
|
137
|
+
*/
|
|
138
|
+
const Minimap = ({ items, worldBounds, transform, viewportSize, onNavigate, width = 200, minHeight = 60, maxHeight = 200, interactions = DEFAULT_INTERACTIONS, keyboardPanStep = 0.1, backgroundColor, defaultItemColor, viewportRectStroke, outsideOverlay = DEFAULT_OUTSIDE_OVERLAY, renderOverlay, disabled = false, ariaLabel = 'Minimap', className, style, testId, id, children, ref, ...rest }) => {
|
|
139
|
+
const bodyRef = useRef(null);
|
|
140
|
+
const canvasRef = useRef(null);
|
|
141
|
+
const height = useMemo(() => computeMinimapHeight(width, worldBounds, minHeight, maxHeight), [width, worldBounds, minHeight, maxHeight]);
|
|
142
|
+
const minimapSize = useMemo(() => ({ width, height }), [width, height]);
|
|
143
|
+
const interactionsConfig = useMemo(() => interactions === false
|
|
144
|
+
? DISABLED_INTERACTIONS
|
|
145
|
+
: {
|
|
146
|
+
click: interactions.click ?? true,
|
|
147
|
+
dragViewportRect: interactions.dragViewportRect ?? true,
|
|
148
|
+
dragFromEmpty: interactions.dragFromEmpty ?? true,
|
|
149
|
+
}, [interactions]);
|
|
150
|
+
// ── Store ──
|
|
151
|
+
const store = useMemo(() => new MinimapStore(), []);
|
|
152
|
+
useLayoutEffect(() => {
|
|
153
|
+
store.setGeometry({ transform, viewportSize, worldBounds, minimapSize });
|
|
154
|
+
}, [store, transform, viewportSize, worldBounds, minimapSize]);
|
|
155
|
+
useLayoutEffect(() => {
|
|
156
|
+
store.configureHandle({
|
|
157
|
+
focus: () => bodyRef.current?.focus(),
|
|
158
|
+
getElement: () => bodyRef.current,
|
|
159
|
+
});
|
|
160
|
+
}, [store]);
|
|
161
|
+
useImperativeHandle(ref, () => store.handle, [store]);
|
|
162
|
+
// ── Gestures ──
|
|
163
|
+
const { handlers } = useMinimapGestures({
|
|
164
|
+
containerRef: bodyRef,
|
|
165
|
+
store,
|
|
166
|
+
worldBounds,
|
|
167
|
+
transform,
|
|
168
|
+
viewportSize,
|
|
169
|
+
minimapSize,
|
|
170
|
+
items,
|
|
171
|
+
interactions: interactionsConfig,
|
|
172
|
+
keyboardPanStep,
|
|
173
|
+
disabled,
|
|
174
|
+
onNavigate,
|
|
175
|
+
});
|
|
176
|
+
// ── Draw — useLayoutEffect + scheduleDraw, theme resolved per-frame ──
|
|
177
|
+
const renderOverlayRef = useLatest(renderOverlay);
|
|
178
|
+
const itemsRef = useLatest(items);
|
|
179
|
+
const rafRef = useRef(0);
|
|
180
|
+
const scheduleDraw = useCallback(() => {
|
|
181
|
+
cancelAnimationFrame(rafRef.current);
|
|
182
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
183
|
+
const canvas = canvasRef.current;
|
|
184
|
+
if (!canvas)
|
|
185
|
+
return;
|
|
186
|
+
const ctx = canvas.getContext('2d');
|
|
187
|
+
if (!ctx)
|
|
188
|
+
return;
|
|
189
|
+
const dpr = typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1;
|
|
190
|
+
const targetW = Math.max(1, Math.round(width * dpr));
|
|
191
|
+
const targetH = Math.max(1, Math.round(height * dpr));
|
|
192
|
+
if (canvas.width !== targetW || canvas.height !== targetH) {
|
|
193
|
+
canvas.width = targetW;
|
|
194
|
+
canvas.height = targetH;
|
|
195
|
+
}
|
|
196
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
197
|
+
const colors = {
|
|
198
|
+
background: backgroundColor ??
|
|
199
|
+
resolveVarValue(canvas, vars.colors.background.secondary),
|
|
200
|
+
defaultItem: defaultItemColor ??
|
|
201
|
+
resolveVarValue(canvas, vars.colors.accent.primary),
|
|
202
|
+
viewportRectStroke: viewportRectStroke ??
|
|
203
|
+
resolveVarValue(canvas, vars.colors.accent.primary),
|
|
204
|
+
outsideOverlay,
|
|
205
|
+
};
|
|
206
|
+
drawMinimap({
|
|
207
|
+
ctx,
|
|
208
|
+
size: { width, height },
|
|
209
|
+
worldBounds,
|
|
210
|
+
transform,
|
|
211
|
+
viewportSize,
|
|
212
|
+
items: itemsRef.current,
|
|
213
|
+
colors,
|
|
214
|
+
renderOverlay: renderOverlayRef.current,
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
}, [
|
|
218
|
+
width,
|
|
219
|
+
height,
|
|
220
|
+
worldBounds,
|
|
221
|
+
transform,
|
|
222
|
+
viewportSize,
|
|
223
|
+
backgroundColor,
|
|
224
|
+
defaultItemColor,
|
|
225
|
+
viewportRectStroke,
|
|
226
|
+
outsideOverlay,
|
|
227
|
+
itemsRef,
|
|
228
|
+
renderOverlayRef,
|
|
229
|
+
]);
|
|
230
|
+
useLayoutEffect(() => {
|
|
231
|
+
scheduleDraw();
|
|
232
|
+
return () => {
|
|
233
|
+
cancelAnimationFrame(rafRef.current);
|
|
234
|
+
};
|
|
235
|
+
}, [scheduleDraw]);
|
|
236
|
+
// Redraw when DPR changes (e.g. dragging to a different display).
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
if (typeof window === 'undefined')
|
|
239
|
+
return;
|
|
240
|
+
const mq = window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
241
|
+
const handler = () => {
|
|
242
|
+
scheduleDraw();
|
|
243
|
+
};
|
|
244
|
+
mq.addEventListener('change', handler);
|
|
245
|
+
return () => {
|
|
246
|
+
mq.removeEventListener('change', handler);
|
|
247
|
+
};
|
|
248
|
+
}, [scheduleDraw]);
|
|
249
|
+
// ── Slots ──
|
|
250
|
+
const slots = useMemo(() => categorizeChildren(children), [children]);
|
|
251
|
+
const overlayChildren = (jsxs(Fragment, { children: [slots.titleInside, slots.footerInside, slots.corners['top-left'], slots.corners['top-right'], slots.corners['bottom-left'], slots.corners['bottom-right'], slots.other] }));
|
|
252
|
+
return (jsx(MinimapStoreContext.Provider, { value: store, children: jsxs("div", { className: cx(minimapShellStyle, className), "data-testid": testId, id: id, style: style, ...rest, children: [slots.titleAbove, jsx(MinimapBody, { bodyRef: bodyRef, canvasRef: canvasRef, width: width, height: height, ariaLabel: ariaLabel, disabled: disabled, handlers: handlers, overlayChildren: overlayChildren, ariaLiveActive: !disabled }), slots.footerBelow] }) }));
|
|
253
|
+
};
|
|
254
|
+
Minimap.displayName = 'Minimap';
|
|
255
|
+
|
|
256
|
+
export { Minimap };
|
|
257
|
+
//# sourceMappingURL=Minimap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Minimap.js","sources":["src/components/editor/Minimap/Minimap.tsx"],"sourcesContent":["'use client';\n\nimport React, {\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport { resolveVarValue } from '@/components/primitives/canvas/canvasTheme';\nimport { useLatest } from '@/hooks';\nimport { vars } from '@/theme/contract.css';\nimport { cx } from '@/utils/cx';\n\nimport {\n minimapShellStyle,\n minimapBodyStyle,\n minimapCanvasStyle,\n minimapOverlayLayerStyle,\n titleOutsideStyle,\n titleInsideStyle,\n footerOutsideStyle,\n footerInsideStyle,\n cornerTopLeftStyle,\n cornerTopRightStyle,\n cornerBottomLeftStyle,\n cornerBottomRightStyle,\n ariaLiveRegionStyle,\n} from './Minimap.css';\nimport { MINIMAP_SLOT } from './Minimap.types';\nimport { MinimapStoreContext, useMinimapDragState } from './MinimapContext';\nimport { computeMinimapHeight } from './minimapCoords';\nimport { drawMinimap } from './minimapDrawing';\nimport { MinimapStore } from './MinimapStore';\nimport { useMinimapGestures } from './useMinimapGestures';\n\nimport type {\n MinimapCornerSide,\n MinimapFooterPlacement,\n MinimapInteractionConfig,\n MinimapProps,\n MinimapSlotKind,\n MinimapSlotMarker,\n MinimapTitlePlacement,\n} from './Minimap.types';\nimport type { MinimapDrawColors } from './minimapDrawing';\n\nconst DEFAULT_OUTSIDE_OVERLAY = 'rgba(0, 0, 0, 0.4)';\n\nconst DEFAULT_INTERACTIONS: Required<MinimapInteractionConfig> = {\n click: true,\n dragViewportRect: true,\n dragFromEmpty: true,\n};\n\nconst DISABLED_INTERACTIONS: Required<MinimapInteractionConfig> = {\n click: false,\n dragViewportRect: false,\n dragFromEmpty: false,\n};\n\ninterface CategorizedSlots {\n titleAbove: React.ReactNode;\n titleInside: React.ReactNode;\n footerBelow: React.ReactNode;\n footerInside: React.ReactNode;\n corners: Partial<Record<MinimapCornerSide, React.ReactNode>>;\n other: React.ReactNode[];\n}\n\nfunction getSlotKind(el: React.ReactElement): MinimapSlotKind | null {\n const marker = (el.type as Partial<MinimapSlotMarker>)[MINIMAP_SLOT];\n return marker ?? null;\n}\n\nfunction categorizeChildren(children: React.ReactNode): CategorizedSlots {\n const slots: CategorizedSlots = {\n titleAbove: null,\n titleInside: null,\n footerBelow: null,\n footerInside: null,\n corners: {},\n other: [],\n };\n\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n if (child !== null && child !== undefined && child !== false) {\n slots.other.push(child);\n }\n return;\n }\n const kind = getSlotKind(child);\n if (kind === null) {\n // Dev warning: a child whose displayName looks like a Minimap slot\n // (e.g. wrapped in React.memo) but lost the symbol marker.\n if (process.env['NODE_ENV'] !== 'production') {\n const displayName = (child.type as { displayName?: string } | undefined)\n ?.displayName;\n if (displayName?.startsWith('Minimap.')) {\n console.warn(\n `[Minimap] child \"${displayName}\" looks like a slot subcomponent ` +\n `but is missing the MINIMAP_SLOT symbol marker. It will render ` +\n `as a free-form overlay. If you wrapped a slot subcomponent ` +\n `(e.g. with React.memo), copy the symbol onto the wrapper.`\n );\n }\n }\n slots.other.push(child);\n return;\n }\n\n const props = child.props as {\n children?: React.ReactNode;\n placement?: MinimapTitlePlacement | MinimapFooterPlacement;\n side?: MinimapCornerSide;\n className?: string;\n style?: React.CSSProperties;\n };\n\n if (kind === 'title') {\n const placement: MinimapTitlePlacement =\n props.placement === 'top-inside' ? 'top-inside' : 'top-outside';\n const node = (\n <div\n className={cx(\n placement === 'top-inside' ? titleInsideStyle : titleOutsideStyle,\n props.className\n )}\n style={props.style}\n >\n {props.children}\n </div>\n );\n if (placement === 'top-inside') slots.titleInside = node;\n else slots.titleAbove = node;\n } else if (kind === 'footer') {\n const placement: MinimapFooterPlacement =\n props.placement === 'bottom-inside'\n ? 'bottom-inside'\n : 'bottom-outside';\n const node = (\n <div\n className={cx(\n placement === 'bottom-inside'\n ? footerInsideStyle\n : footerOutsideStyle,\n props.className\n )}\n style={props.style}\n >\n {props.children}\n </div>\n );\n if (placement === 'bottom-inside') slots.footerInside = node;\n else slots.footerBelow = node;\n } else {\n // kind is narrowed to 'corner' here (only remaining slot kind).\n const side: MinimapCornerSide = props.side ?? 'top-right';\n const cornerStyle =\n side === 'top-left'\n ? cornerTopLeftStyle\n : side === 'top-right'\n ? cornerTopRightStyle\n : side === 'bottom-left'\n ? cornerBottomLeftStyle\n : cornerBottomRightStyle;\n slots.corners[side] = (\n <div className={cx(cornerStyle, props.className)} style={props.style}>\n {props.children}\n </div>\n );\n }\n });\n\n return slots;\n}\n\n/**\n * The interactive body that hosts canvas + overlay layer + pointer/keyboard\n * handlers. Subscribes to the drag slice for its `data-dragging` attribute\n * + aria-live announcement so neither lives in React state on the outer\n * shell.\n */\nfunction MinimapBody({\n bodyRef,\n canvasRef,\n width,\n height,\n ariaLabel,\n disabled,\n handlers,\n overlayChildren,\n ariaLiveActive,\n}: {\n bodyRef: React.RefObject<HTMLDivElement | null>;\n canvasRef: React.RefObject<HTMLCanvasElement | null>;\n width: number;\n height: number;\n ariaLabel: string;\n disabled: boolean;\n handlers: ReturnType<typeof useMinimapGestures>['handlers'];\n overlayChildren: React.ReactNode;\n ariaLiveActive: boolean;\n}): React.ReactElement {\n const isDragging = useMinimapDragState();\n return (\n // The minimap body is a labelled landmark region that doubles as an\n // interactive pan/zoom surface (focusable, with pointer + key handlers).\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <div\n ref={bodyRef}\n className={minimapBodyStyle}\n data-dragging={isDragging || undefined}\n data-disabled={disabled || undefined}\n role=\"region\"\n aria-label={ariaLabel}\n tabIndex={disabled ? -1 : 0}\n style={{ width, height }}\n onPointerDown={handlers.onPointerDown}\n onPointerMove={handlers.onPointerMove}\n onPointerUp={handlers.onPointerUp}\n onPointerCancel={handlers.onPointerCancel}\n onPointerLeave={handlers.onPointerLeave}\n onKeyDown={handlers.onKeyDown}\n >\n <canvas\n ref={canvasRef}\n className={minimapCanvasStyle}\n style={{ width, height }}\n />\n <div className={minimapOverlayLayerStyle}>{overlayChildren}</div>\n <div className={ariaLiveRegionStyle} aria-live=\"polite\" role=\"status\">\n {ariaLiveActive && isDragging ? 'Panning viewport' : ''}\n </div>\n </div>\n );\n}\n\n/**\n * Compact navigation widget for editor viewports. Renders a miniature of\n * the world content alongside a draggable rectangle that mirrors the main\n * viewport's visible region. Intended to be shared by NodeGraph, Timeline,\n * and any custom 2D editor surface.\n *\n * Designed as a controlled primitive — pass the current `transform` /\n * `viewportSize` from your `<Viewport>` and translate `onNavigate.worldPoint`\n * into a `viewport.centerOn(...)` call.\n *\n * Children may include `<Minimap.Title>`, `<Minimap.Footer>`,\n * `<Minimap.Corner>` slot subcomponents — any other nodes render as a\n * free-form overlay layer above the canvas body. Children can read live\n * state (hover position, hovered item id, transform) via\n * `useMinimapContext()` / `useMinimapHover()` / `useMinimapGeometry()` /\n * `useMinimapDragState()`.\n */\nexport const Minimap = ({\n items,\n worldBounds,\n transform,\n viewportSize,\n onNavigate,\n width = 200,\n minHeight = 60,\n maxHeight = 200,\n interactions = DEFAULT_INTERACTIONS,\n keyboardPanStep = 0.1,\n backgroundColor,\n defaultItemColor,\n viewportRectStroke,\n outsideOverlay = DEFAULT_OUTSIDE_OVERLAY,\n renderOverlay,\n disabled = false,\n ariaLabel = 'Minimap',\n className,\n style,\n testId,\n id,\n children,\n ref,\n ...rest\n}: MinimapProps): React.ReactElement => {\n const bodyRef = useRef<HTMLDivElement>(null);\n const canvasRef = useRef<HTMLCanvasElement>(null);\n\n const height = useMemo(\n () => computeMinimapHeight(width, worldBounds, minHeight, maxHeight),\n [width, worldBounds, minHeight, maxHeight]\n );\n const minimapSize = useMemo(() => ({ width, height }), [width, height]);\n\n const interactionsConfig = useMemo<Required<MinimapInteractionConfig>>(\n () =>\n interactions === false\n ? DISABLED_INTERACTIONS\n : {\n click: interactions.click ?? true,\n dragViewportRect: interactions.dragViewportRect ?? true,\n dragFromEmpty: interactions.dragFromEmpty ?? true,\n },\n [interactions]\n );\n\n // ── Store ──\n\n const store = useMemo(() => new MinimapStore(), []);\n\n useLayoutEffect(() => {\n store.setGeometry({ transform, viewportSize, worldBounds, minimapSize });\n }, [store, transform, viewportSize, worldBounds, minimapSize]);\n\n useLayoutEffect(() => {\n store.configureHandle({\n focus: () => bodyRef.current?.focus(),\n getElement: () => bodyRef.current,\n });\n }, [store]);\n\n useImperativeHandle(ref, () => store.handle, [store]);\n\n // ── Gestures ──\n\n const { handlers } = useMinimapGestures({\n containerRef: bodyRef,\n store,\n worldBounds,\n transform,\n viewportSize,\n minimapSize,\n items,\n interactions: interactionsConfig,\n keyboardPanStep,\n disabled,\n onNavigate,\n });\n\n // ── Draw — useLayoutEffect + scheduleDraw, theme resolved per-frame ──\n\n const renderOverlayRef = useLatest(renderOverlay);\n const itemsRef = useLatest(items);\n const rafRef = useRef<number>(0);\n\n const scheduleDraw = useCallback((): void => {\n cancelAnimationFrame(rafRef.current);\n rafRef.current = requestAnimationFrame(() => {\n const canvas = canvasRef.current;\n if (!canvas) return;\n const ctx = canvas.getContext('2d');\n if (!ctx) return;\n\n const dpr =\n typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1;\n const targetW = Math.max(1, Math.round(width * dpr));\n const targetH = Math.max(1, Math.round(height * dpr));\n if (canvas.width !== targetW || canvas.height !== targetH) {\n canvas.width = targetW;\n canvas.height = targetH;\n }\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n\n const colors: MinimapDrawColors = {\n background:\n backgroundColor ??\n resolveVarValue(canvas, vars.colors.background.secondary),\n defaultItem:\n defaultItemColor ??\n resolveVarValue(canvas, vars.colors.accent.primary),\n viewportRectStroke:\n viewportRectStroke ??\n resolveVarValue(canvas, vars.colors.accent.primary),\n outsideOverlay,\n };\n\n drawMinimap({\n ctx,\n size: { width, height },\n worldBounds,\n transform,\n viewportSize,\n items: itemsRef.current,\n colors,\n renderOverlay: renderOverlayRef.current,\n });\n });\n }, [\n width,\n height,\n worldBounds,\n transform,\n viewportSize,\n backgroundColor,\n defaultItemColor,\n viewportRectStroke,\n outsideOverlay,\n itemsRef,\n renderOverlayRef,\n ]);\n\n useLayoutEffect(() => {\n scheduleDraw();\n return () => {\n cancelAnimationFrame(rafRef.current);\n };\n }, [scheduleDraw]);\n\n // Redraw when DPR changes (e.g. dragging to a different display).\n useEffect(() => {\n if (typeof window === 'undefined') return;\n const mq = window.matchMedia(\n `(resolution: ${window.devicePixelRatio}dppx)`\n );\n const handler = (): void => {\n scheduleDraw();\n };\n mq.addEventListener('change', handler);\n return () => {\n mq.removeEventListener('change', handler);\n };\n }, [scheduleDraw]);\n\n // ── Slots ──\n\n const slots = useMemo(() => categorizeChildren(children), [children]);\n\n const overlayChildren = (\n <>\n {slots.titleInside}\n {slots.footerInside}\n {slots.corners['top-left']}\n {slots.corners['top-right']}\n {slots.corners['bottom-left']}\n {slots.corners['bottom-right']}\n {slots.other}\n </>\n );\n\n return (\n <MinimapStoreContext.Provider value={store}>\n <div\n className={cx(minimapShellStyle, className)}\n data-testid={testId}\n id={id}\n style={style}\n {...rest}\n >\n {slots.titleAbove}\n <MinimapBody\n bodyRef={bodyRef}\n canvasRef={canvasRef}\n width={width}\n height={height}\n ariaLabel={ariaLabel}\n disabled={disabled}\n handlers={handlers}\n overlayChildren={overlayChildren}\n ariaLiveActive={!disabled}\n />\n {slots.footerBelow}\n </div>\n </MinimapStoreContext.Provider>\n );\n};\n\nMinimap.displayName = 'Minimap';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiDA;AAEA;AACE;AACA;AACA;;AAGF;AACE;AACA;AACA;;AAYF;;;AAGA;AAEA;AACE;AACE;AACA;AACA;AACA;AACA;AACA;;;;AAKE;AACE;;;;AAIJ;AACA;;;;AAII;AACE;AACF;AACE;;;AAII;;;AAIR;;;AAIF;AAQA;AACE;AAEA;;AAWgC;;AAC3B;;AACA;AACL;AAEI;;;AAMI;AACA;;AAQ2B;;AAC9B;;;;AAGL;AACA;AAEI;;AAEE;;AAEE;;AAER;;AAMJ;AAEA;AACF;AAEA;;;;;AAKG;AACH;AAqBE;;;;;AAKE;AA2BJ;AAEA;;;;;;;;;;;;;;;;AAgBG;AACI;AA0BL;AACA;AAEA;;;AASM;AACA;AACI;AACA;AACA;AACD;;AAMT;;AAGE;AACF;;;;AAKI;AACD;AACH;AAEA;;AAIA;AACE;;;;;;;AAOA;;;;AAID;;AAID;AACA;AACA;AAEA;AACE;AACA;AACE;AACA;;;AAEA;;AAEA;AAEA;AACA;AACA;AACE;AACA;;AAEF;AAEA;AACE;;AAGA;;AAGA;;;;AAMF;;AAEE;;;;;;;AAOD;AACH;AACF;;;;;;;;;;;;AAYC;;AAGC;AACA;AACE;AACF;AACF;;;;;AAKE;;AAIE;AACF;AACA;AACA;AACE;AACF;AACF;;AAIA;;AAcA;AAyBF;AAEA;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ─── Slot markers ───
|
|
2
|
+
/**
|
|
3
|
+
* Symbol attached to `Minimap.Title` / `.Footer` / `.Corner` so the parent
|
|
4
|
+
* `<Minimap>` can identify slot children without relying on `displayName`
|
|
5
|
+
* (which gets clobbered by wrappers like `React.memo`, `React.forwardRef`,
|
|
6
|
+
* or Vanilla Extract recipes).
|
|
7
|
+
*/
|
|
8
|
+
const MINIMAP_SLOT = Symbol.for('etui.minimap.slot');
|
|
9
|
+
|
|
10
|
+
export { MINIMAP_SLOT };
|
|
11
|
+
//# sourceMappingURL=Minimap.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Minimap.types.js","sources":["src/components/editor/Minimap/Minimap.types.ts"],"sourcesContent":["import type { Point2D } from '@/components/primitives/canvas/canvas.types';\nimport type {\n ViewportTransform,\n ViewportSize,\n WorldRect,\n} from '@/components/primitives/viewport';\nimport type { BaseComponent } from '@/types/common';\nimport type { Prettify } from '@/types/utilities';\nimport type React from 'react';\n\n// ─── Drawing info ───\n\n/**\n * Helpers and current state passed to `renderOverlay` and to custom item\n * `draw` callbacks. Exposes the same world ↔ minimap math the built-in\n * shapes use, so consumer drawing stays aligned with everything else.\n */\nexport interface MinimapDrawInfo {\n /** Minimap size in CSS pixels (canvas already DPR-scaled). */\n minimapSize: ViewportSize;\n /** World rectangle this minimap maps from. */\n worldBounds: WorldRect;\n /** Current main-viewport transform (mirrored). */\n transform: ViewportTransform;\n /** Current main-viewport size in CSS pixels (mirrored). */\n viewportSize: ViewportSize;\n /** Uniform world → minimap scale (px per world unit). */\n scale: number;\n /** Letterbox offset applied when minimap aspect ≠ worldBounds aspect. */\n offset: Point2D;\n /** Map a world point to a minimap CSS-pixel point. */\n worldToMinimap: (point: Point2D) => Point2D;\n /** Inverse of `worldToMinimap`. */\n minimapToWorld: (point: Point2D) => Point2D;\n}\n\n// ─── Items ───\n\ninterface MinimapItemBase {\n /** Stable identity. Used for hover hit-testing and future selection support. */\n id: string;\n /** Override draw color for this item. Falls back to `defaultItemColor`. */\n color?: string;\n}\n\nexport interface MinimapRectItem extends MinimapItemBase {\n type: 'rect';\n /** Top-left X in world units. */\n x: number;\n /** Top-left Y in world units. */\n y: number;\n /** Width in world units. */\n width: number;\n /** Height in world units. */\n height: number;\n}\n\nexport interface MinimapCircleItem extends MinimapItemBase {\n type: 'circle';\n /** Center X in world units. */\n cx: number;\n /** Center Y in world units. */\n cy: number;\n /** Radius in world units. */\n r: number;\n}\n\nexport interface MinimapLineItem extends MinimapItemBase {\n type: 'line';\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n /** Stroke width in minimap CSS pixels (does not scale with content). @default 1 */\n lineWidth?: number;\n}\n\n/**\n * Caller-defined item. `draw` is invoked with the minimap canvas context\n * and a `MinimapDrawInfo` object containing world ↔ minimap helpers.\n * `bounds` (world coords) is used for hover hit-testing.\n */\nexport interface MinimapCustomItem extends MinimapItemBase {\n type: 'custom';\n bounds: WorldRect;\n draw: (ctx: CanvasRenderingContext2D, info: MinimapDrawInfo) => void;\n}\n\n/** Discriminated union of all minimap item shapes. */\nexport type MinimapItem =\n | MinimapRectItem\n | MinimapCircleItem\n | MinimapLineItem\n | MinimapCustomItem;\n\n// ─── Interactions ───\n\nexport type MinimapNavigatePhase = 'click' | 'drag-start' | 'drag' | 'drag-end';\n\n/**\n * Info passed to `onNavigate` for every navigation event.\n *\n * `worldPoint` is the world-space point the user wants at the center\n * of the main viewport — call `viewport.centerOn(info.worldPoint)`\n * (or update your transform accordingly) to satisfy the request.\n */\nexport interface MinimapNavigateInfo {\n worldPoint: Point2D;\n phase: MinimapNavigatePhase;\n}\n\n/** Fine-grained gesture toggles. Pass `false` to `interactions` to disable everything. */\nexport interface MinimapInteractionConfig {\n /** Tap outside the viewport rect → `phase: 'click'`. @default true */\n click?: boolean;\n /** Drag the viewport rect itself → `phase: 'drag-*'`. @default true */\n dragViewportRect?: boolean;\n /** Drag starting outside the rect → immediately jumps + pans. @default true */\n dragFromEmpty?: boolean;\n}\n\n// ─── Slot markers ───\n\n/**\n * Symbol attached to `Minimap.Title` / `.Footer` / `.Corner` so the parent\n * `<Minimap>` can identify slot children without relying on `displayName`\n * (which gets clobbered by wrappers like `React.memo`, `React.forwardRef`,\n * or Vanilla Extract recipes).\n */\nexport const MINIMAP_SLOT: unique symbol = Symbol.for('etui.minimap.slot');\n\nexport type MinimapSlotKind = 'title' | 'footer' | 'corner';\n\nexport interface MinimapSlotMarker {\n [MINIMAP_SLOT]: MinimapSlotKind;\n}\n\nexport type MinimapTitlePlacement = 'top-outside' | 'top-inside';\nexport type MinimapFooterPlacement = 'bottom-outside' | 'bottom-inside';\nexport type MinimapCornerSide =\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right';\n\n// ─── Imperative handle ───\n\n/**\n * Imperative handle exposed via `ref` on `<Minimap>` and `<ViewportMinimap>`.\n * Stable for the lifetime of the component.\n */\nexport interface MinimapHandle {\n /** Focus the minimap body so arrow keys start working. */\n focus(): void;\n /** Access the underlying body DOM element (the `role=\"region\"` div). */\n getElement(): HTMLDivElement | null;\n /** Convert a world-space point to minimap CSS-pixel coordinates. */\n worldToMinimap(point: Point2D): Point2D;\n /** Inverse of `worldToMinimap`. */\n minimapToWorld(point: Point2D): Point2D;\n}\n\n// ─── Props ───\n\nexport interface MinimapBaseProps extends Omit<\n BaseComponent,\n 'onChange' | 'ref'\n> {\n /** Items rendered as the content miniature. */\n items: ReadonlyArray<MinimapItem>;\n /**\n * World-space rectangle the minimap maps to. Use the exported\n * `computeBoundsFromItems(items, padding?)` helper if you don't already\n * track one yourself.\n */\n worldBounds: WorldRect;\n /** Current main-viewport transform — drives the viewport rect overlay. */\n transform: ViewportTransform;\n /** Current main-viewport size in CSS pixels — drives the viewport rect overlay. */\n viewportSize: ViewportSize;\n\n /**\n * Called when the user navigates via click, drag, or arrow keys.\n * `info.worldPoint` is the world-space point that should sit at the\n * center of the main viewport — pass it to `viewport.centerOn(...)`.\n */\n onNavigate?: (info: MinimapNavigateInfo) => void;\n\n /**\n * Minimap width in CSS pixels. Height is derived from `worldBounds`\n * aspect ratio and clamped to `[minHeight, maxHeight]`.\n * @default 200\n */\n width?: number;\n /** @default 60 */\n minHeight?: number;\n /** @default 200 */\n maxHeight?: number;\n\n /**\n * Gesture configuration. Pass `false` to disable all interactions.\n * @default { click: true, dragViewportRect: true, dragFromEmpty: true }\n */\n interactions?: MinimapInteractionConfig | false;\n\n /**\n * Keyboard pan step, as a fraction of the current main-viewport's\n * world-space extent per arrow-key press. Shift × 5.\n * @default 0.1\n */\n keyboardPanStep?: number;\n\n /** Override background color. Defaults to theme `--etui-color-bg-secondary`. */\n backgroundColor?: string;\n /** Default item color. Defaults to theme accent. */\n defaultItemColor?: string;\n /** Viewport-rect outline color. Defaults to theme accent. */\n viewportRectStroke?: string;\n /**\n * Dimmed overlay color covering the area outside the viewport rect.\n * @default 'rgba(0, 0, 0, 0.4)'\n */\n outsideOverlay?: string;\n\n /**\n * Custom canvas drawing pass executed after items and before the\n * viewport-rect shroud + outline. Use for backdrops, playheads, grid\n * overlays, selection regions — anything that should sit between items\n * and the viewport-rect chrome.\n */\n renderOverlay?: (\n ctx: CanvasRenderingContext2D,\n info: MinimapDrawInfo\n ) => void;\n\n /** Disable interactions and dim the minimap. @default false */\n disabled?: boolean;\n\n /** @default 'Minimap' */\n ariaLabel?: string;\n\n /**\n * Slot children. Pass `<Minimap.Title>`, `<Minimap.Footer>`,\n * `<Minimap.Corner>` subcomponents for chrome, or arbitrary nodes for\n * absolute overlays inside the canvas body. Children that aren't\n * recognised slot markers render as a free-form overlay layer.\n */\n children?: React.ReactNode;\n\n /** Imperative handle. */\n ref?: React.Ref<MinimapHandle>;\n}\n\nexport type MinimapProps = Prettify<MinimapBaseProps>;\n\n// ─── Subcomponent props ───\n\nexport interface MinimapTitleProps {\n children?: React.ReactNode;\n /** @default 'top-outside' */\n placement?: MinimapTitlePlacement;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport interface MinimapFooterProps {\n children?: React.ReactNode;\n /** @default 'bottom-outside' */\n placement?: MinimapFooterPlacement;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport interface MinimapCornerProps {\n children?: React.ReactNode;\n /** Which corner of the canvas body to anchor in. @default 'top-right' */\n side?: MinimapCornerSide;\n className?: string;\n style?: React.CSSProperties;\n}\n\n// ─── MinimapContext value ───\n\n/**\n * Live state available to children of a `<Minimap>` via `useMinimapContext()`.\n *\n * For perf-conscious consumers, prefer the per-slice hooks\n * (`useMinimapHover`, `useMinimapGeometry`, `useMinimapDragState`) — each\n * subscribes to a single slice and re-renders only when that slice\n * changes. `useMinimapContext()` re-renders on every store mutation.\n */\nexport interface MinimapContextValue {\n worldBounds: WorldRect;\n minimapSize: ViewportSize;\n transform: ViewportTransform;\n viewportSize: ViewportSize;\n /** Current pointer position in world coordinates, or null when not hovering. */\n hoverWorldPoint: Point2D | null;\n /** Id of the item currently under the pointer (hit-test), or null. */\n hoveredItemId: string | null;\n /** True during an active drag (rect or pan). */\n isDragging: boolean;\n /** Uniform world → minimap scale. */\n scale: number;\n /** Letterbox offset. */\n offset: Point2D;\n /** Same helpers exposed in `MinimapDrawInfo`, for symmetry. */\n worldToMinimap: (point: Point2D) => Point2D;\n minimapToWorld: (point: Point2D) => Point2D;\n}\n"],"names":[],"mappings":"AAyHA;AAEA;;;;;AAKG;AACI,MAAM,YAAY,GAAkB,MAAM,CAAC,GAAG,CAAC,mBAAmB;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useSyncExternalStore, useContext } from 'react';
|
|
3
|
+
|
|
4
|
+
const MinimapStoreContext = createContext(null);
|
|
5
|
+
function useMinimapStoreInternal() {
|
|
6
|
+
const store = useContext(MinimapStoreContext);
|
|
7
|
+
if (!store) {
|
|
8
|
+
throw new Error('useMinimap* hooks must be called inside a <Minimap> component');
|
|
9
|
+
}
|
|
10
|
+
return store;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Subscribe to **all** Minimap state. Convenient catch-all but re-renders
|
|
14
|
+
* on every store mutation. For perf-sensitive consumers, prefer the
|
|
15
|
+
* slice-specific hooks (`useMinimapHover`, `useMinimapGeometry`,
|
|
16
|
+
* `useMinimapDragState`).
|
|
17
|
+
*/
|
|
18
|
+
function useMinimapContext() {
|
|
19
|
+
const store = useMinimapStoreInternal();
|
|
20
|
+
return useSyncExternalStore(store.subscribe, store.getSnapshot);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Subscribe to the hover slice. Re-renders only when the pointer position
|
|
24
|
+
* or hovered item id changes.
|
|
25
|
+
*/
|
|
26
|
+
function useMinimapHover() {
|
|
27
|
+
const store = useMinimapStoreInternal();
|
|
28
|
+
return useSyncExternalStore(store.subscribeHover, store.getHover);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Subscribe to the geometry slice (transform / sizes / bounds). Re-renders
|
|
32
|
+
* only on geometry mutations.
|
|
33
|
+
*/
|
|
34
|
+
function useMinimapGeometry() {
|
|
35
|
+
const store = useMinimapStoreInternal();
|
|
36
|
+
return useSyncExternalStore(store.subscribeGeometry, store.getGeometry);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Subscribe to the drag slice — `true` while a pan/rect-drag gesture is
|
|
40
|
+
* in flight. Re-renders only on drag-state transitions.
|
|
41
|
+
*/
|
|
42
|
+
function useMinimapDragState() {
|
|
43
|
+
const store = useMinimapStoreInternal();
|
|
44
|
+
return useSyncExternalStore(store.subscribeDrag, store.getIsDragging);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { MinimapStoreContext, useMinimapContext, useMinimapDragState, useMinimapGeometry, useMinimapHover };
|
|
48
|
+
//# sourceMappingURL=MinimapContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinimapContext.js","sources":["src/components/editor/Minimap/MinimapContext.ts"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useSyncExternalStore } from 'react';\n\nimport type { MinimapContextValue } from './Minimap.types';\nimport type {\n MinimapGeometryState,\n MinimapHoverState,\n MinimapStore,\n} from './MinimapStore';\n\nexport const MinimapStoreContext = createContext<MinimapStore | null>(null);\n\nfunction useMinimapStoreInternal(): MinimapStore {\n const store = useContext(MinimapStoreContext);\n if (!store) {\n throw new Error(\n 'useMinimap* hooks must be called inside a <Minimap> component'\n );\n }\n return store;\n}\n\n/**\n * Subscribe to **all** Minimap state. Convenient catch-all but re-renders\n * on every store mutation. For perf-sensitive consumers, prefer the\n * slice-specific hooks (`useMinimapHover`, `useMinimapGeometry`,\n * `useMinimapDragState`).\n */\nexport function useMinimapContext(): MinimapContextValue {\n const store = useMinimapStoreInternal();\n return useSyncExternalStore(store.subscribe, store.getSnapshot);\n}\n\n/**\n * Subscribe to the hover slice. Re-renders only when the pointer position\n * or hovered item id changes.\n */\nexport function useMinimapHover(): MinimapHoverState {\n const store = useMinimapStoreInternal();\n return useSyncExternalStore(store.subscribeHover, store.getHover);\n}\n\n/**\n * Subscribe to the geometry slice (transform / sizes / bounds). Re-renders\n * only on geometry mutations.\n */\nexport function useMinimapGeometry(): MinimapGeometryState {\n const store = useMinimapStoreInternal();\n return useSyncExternalStore(store.subscribeGeometry, store.getGeometry);\n}\n\n/**\n * Subscribe to the drag slice — `true` while a pan/rect-drag gesture is\n * in flight. Re-renders only on drag-state transitions.\n */\nexport function useMinimapDragState(): boolean {\n const store = useMinimapStoreInternal();\n return useSyncExternalStore(store.subscribeDrag, store.getIsDragging);\n}\n"],"names":[],"mappings":";;;;AAaA;AACE;;AAEE;;AAIF;AACF;AAEA;;;;;AAKG;;AAED;;AAEF;AAEA;;;AAGG;;AAED;;AAEF;AAEA;;;AAGG;;AAED;;AAEF;AAEA;;;AAGG;;AAED;;AAEF;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MINIMAP_SLOT } from './Minimap.types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Small chrome block anchored in one of the four corners of the Minimap
|
|
5
|
+
* canvas body. Typical use cases: coordinate readouts, zoom-level chips,
|
|
6
|
+
* status badges. Picked out of `<Minimap>` children by the `MINIMAP_SLOT`
|
|
7
|
+
* symbol — does not render itself in place.
|
|
8
|
+
*/
|
|
9
|
+
const MinimapCornerImpl = () => null;
|
|
10
|
+
const MinimapCorner = Object.assign(MinimapCornerImpl, {
|
|
11
|
+
displayName: 'Minimap.Corner',
|
|
12
|
+
[MINIMAP_SLOT]: 'corner',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { MinimapCorner };
|
|
16
|
+
//# sourceMappingURL=MinimapCorner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinimapCorner.js","sources":["src/components/editor/Minimap/MinimapCorner.tsx"],"sourcesContent":["import { MINIMAP_SLOT } from './Minimap.types';\n\nimport type { MinimapCornerProps } from './Minimap.types';\n\n/**\n * Small chrome block anchored in one of the four corners of the Minimap\n * canvas body. Typical use cases: coordinate readouts, zoom-level chips,\n * status badges. Picked out of `<Minimap>` children by the `MINIMAP_SLOT`\n * symbol — does not render itself in place.\n */\nconst MinimapCornerImpl: (props: MinimapCornerProps) => null = () => null;\n\nexport const MinimapCorner = Object.assign(MinimapCornerImpl, {\n displayName: 'Minimap.Corner',\n [MINIMAP_SLOT]: 'corner' as const,\n});\n"],"names":[],"mappings":";;AAIA;;;;;AAKG;AACH,MAAM,iBAAiB,GAAwC,MAAM,IAAI;MAE5D,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;AAC5D,IAAA,WAAW,EAAE,gBAAgB;IAC7B,CAAC,YAAY,GAAG,QAAiB;AAClC,CAAA;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MINIMAP_SLOT } from './Minimap.types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Footer strip rendered below (or inside the bottom of) the Minimap
|
|
5
|
+
* canvas body. Picked out of `<Minimap>` children by the `MINIMAP_SLOT`
|
|
6
|
+
* symbol — does not render itself in place, so its tree position has no
|
|
7
|
+
* effect on its placement.
|
|
8
|
+
*/
|
|
9
|
+
const MinimapFooterImpl = () => null;
|
|
10
|
+
const MinimapFooter = Object.assign(MinimapFooterImpl, {
|
|
11
|
+
displayName: 'Minimap.Footer',
|
|
12
|
+
[MINIMAP_SLOT]: 'footer',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { MinimapFooter };
|
|
16
|
+
//# sourceMappingURL=MinimapFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinimapFooter.js","sources":["src/components/editor/Minimap/MinimapFooter.tsx"],"sourcesContent":["import { MINIMAP_SLOT } from './Minimap.types';\n\nimport type { MinimapFooterProps } from './Minimap.types';\n\n/**\n * Footer strip rendered below (or inside the bottom of) the Minimap\n * canvas body. Picked out of `<Minimap>` children by the `MINIMAP_SLOT`\n * symbol — does not render itself in place, so its tree position has no\n * effect on its placement.\n */\nconst MinimapFooterImpl: (props: MinimapFooterProps) => null = () => null;\n\nexport const MinimapFooter = Object.assign(MinimapFooterImpl, {\n displayName: 'Minimap.Footer',\n [MINIMAP_SLOT]: 'footer' as const,\n});\n"],"names":[],"mappings":";;AAIA;;;;;AAKG;AACH,MAAM,iBAAiB,GAAwC,MAAM,IAAI;MAE5D,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;AAC5D,IAAA,WAAW,EAAE,gBAAgB;IAC7B,CAAC,YAAY,GAAG,QAAiB;AAClC,CAAA;;;;"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { minimapToWorld, worldToMinimap, computeMinimapScale, computeMinimapOffset } from './minimapCoords.js';
|
|
2
|
+
|
|
3
|
+
const IDENTITY_TRANSFORM = { x: 0, y: 0, zoom: 1 };
|
|
4
|
+
const ZERO_SIZE = { width: 0, height: 0 };
|
|
5
|
+
const ZERO_RECT = { x: 0, y: 0, width: 0, height: 0 };
|
|
6
|
+
/**
|
|
7
|
+
* Single source of truth for Minimap runtime state — geometry, hover,
|
|
8
|
+
* drag. Designed for React's `useSyncExternalStore`: each slice has its
|
|
9
|
+
* own subscribe/get pair so subscribers re-render only when their slice
|
|
10
|
+
* changes (not on every store mutation).
|
|
11
|
+
*
|
|
12
|
+
* Wzorowane 1:1 na `primitives/viewport/ViewportStore.ts`.
|
|
13
|
+
*/
|
|
14
|
+
class MinimapStore {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.geometry = {
|
|
17
|
+
transform: IDENTITY_TRANSFORM,
|
|
18
|
+
viewportSize: ZERO_SIZE,
|
|
19
|
+
worldBounds: ZERO_RECT,
|
|
20
|
+
minimapSize: ZERO_SIZE,
|
|
21
|
+
};
|
|
22
|
+
this.hover = {
|
|
23
|
+
hoverWorldPoint: null,
|
|
24
|
+
hoveredItemId: null,
|
|
25
|
+
};
|
|
26
|
+
this.isDragging = false;
|
|
27
|
+
this.snapshot = this.computeSnapshot();
|
|
28
|
+
this.allListeners = new Set();
|
|
29
|
+
this.geometryListeners = new Set();
|
|
30
|
+
this.hoverListeners = new Set();
|
|
31
|
+
this.dragListeners = new Set();
|
|
32
|
+
// ── Public read API (arrow functions so they can be passed as callbacks) ──
|
|
33
|
+
this.getSnapshot = () => this.snapshot;
|
|
34
|
+
this.getGeometry = () => this.geometry;
|
|
35
|
+
this.getHover = () => this.hover;
|
|
36
|
+
this.getIsDragging = () => this.isDragging;
|
|
37
|
+
// ── Subscriptions ──
|
|
38
|
+
this.subscribe = (cb) => {
|
|
39
|
+
this.allListeners.add(cb);
|
|
40
|
+
return () => {
|
|
41
|
+
this.allListeners.delete(cb);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
this.subscribeGeometry = (cb) => {
|
|
45
|
+
this.geometryListeners.add(cb);
|
|
46
|
+
return () => {
|
|
47
|
+
this.geometryListeners.delete(cb);
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
this.subscribeHover = (cb) => {
|
|
51
|
+
this.hoverListeners.add(cb);
|
|
52
|
+
return () => {
|
|
53
|
+
this.hoverListeners.delete(cb);
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
this.subscribeDrag = (cb) => {
|
|
57
|
+
this.dragListeners.add(cb);
|
|
58
|
+
return () => {
|
|
59
|
+
this.dragListeners.delete(cb);
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
// ── Imperative handle ──
|
|
63
|
+
/**
|
|
64
|
+
* Stable handle whose methods proxy to the current store state. The
|
|
65
|
+
* handle reference is stable for the lifetime of the store.
|
|
66
|
+
*/
|
|
67
|
+
this.handle = {
|
|
68
|
+
focus: () => {
|
|
69
|
+
this.focusElement?.();
|
|
70
|
+
},
|
|
71
|
+
getElement: () => this.elementGetter?.() ?? null,
|
|
72
|
+
worldToMinimap: (p) => worldToMinimap(p, this.geometry.worldBounds, this.geometry.minimapSize),
|
|
73
|
+
minimapToWorld: (p) => minimapToWorld(p, this.geometry.worldBounds, this.geometry.minimapSize),
|
|
74
|
+
};
|
|
75
|
+
this.focusElement = null;
|
|
76
|
+
this.elementGetter = null;
|
|
77
|
+
}
|
|
78
|
+
// ── Mutators ──
|
|
79
|
+
setGeometry(partial) {
|
|
80
|
+
const next = {
|
|
81
|
+
transform: partial.transform ?? this.geometry.transform,
|
|
82
|
+
viewportSize: partial.viewportSize ?? this.geometry.viewportSize,
|
|
83
|
+
worldBounds: partial.worldBounds ?? this.geometry.worldBounds,
|
|
84
|
+
minimapSize: partial.minimapSize ?? this.geometry.minimapSize,
|
|
85
|
+
};
|
|
86
|
+
if (next.transform === this.geometry.transform &&
|
|
87
|
+
sizeEqual(next.viewportSize, this.geometry.viewportSize) &&
|
|
88
|
+
rectEqual(next.worldBounds, this.geometry.worldBounds) &&
|
|
89
|
+
sizeEqual(next.minimapSize, this.geometry.minimapSize)) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.geometry = next;
|
|
93
|
+
this.snapshot = this.computeSnapshot();
|
|
94
|
+
this.geometryListeners.forEach(cb => {
|
|
95
|
+
cb();
|
|
96
|
+
});
|
|
97
|
+
this.allListeners.forEach(cb => {
|
|
98
|
+
cb();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
setHover(next) {
|
|
102
|
+
if (hoverPointEqual(next.hoverWorldPoint, this.hover.hoverWorldPoint) &&
|
|
103
|
+
next.hoveredItemId === this.hover.hoveredItemId) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.hover = next;
|
|
107
|
+
this.snapshot = this.computeSnapshot();
|
|
108
|
+
this.hoverListeners.forEach(cb => {
|
|
109
|
+
cb();
|
|
110
|
+
});
|
|
111
|
+
this.allListeners.forEach(cb => {
|
|
112
|
+
cb();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
setIsDragging(next) {
|
|
116
|
+
if (next === this.isDragging)
|
|
117
|
+
return;
|
|
118
|
+
this.isDragging = next;
|
|
119
|
+
this.snapshot = this.computeSnapshot();
|
|
120
|
+
this.dragListeners.forEach(cb => {
|
|
121
|
+
cb();
|
|
122
|
+
});
|
|
123
|
+
this.allListeners.forEach(cb => {
|
|
124
|
+
cb();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/** Wired up by `Minimap.tsx` so the handle knows which element to act on. */
|
|
128
|
+
configureHandle(config) {
|
|
129
|
+
this.focusElement = config.focus;
|
|
130
|
+
this.elementGetter = config.getElement;
|
|
131
|
+
}
|
|
132
|
+
computeSnapshot() {
|
|
133
|
+
const { worldBounds, minimapSize, transform, viewportSize } = this.geometry;
|
|
134
|
+
const scale = computeMinimapScale(worldBounds, minimapSize);
|
|
135
|
+
const offset = computeMinimapOffset(worldBounds, minimapSize, scale);
|
|
136
|
+
return {
|
|
137
|
+
worldBounds,
|
|
138
|
+
minimapSize,
|
|
139
|
+
transform,
|
|
140
|
+
viewportSize,
|
|
141
|
+
hoverWorldPoint: this.hover.hoverWorldPoint,
|
|
142
|
+
hoveredItemId: this.hover.hoveredItemId,
|
|
143
|
+
isDragging: this.isDragging,
|
|
144
|
+
scale,
|
|
145
|
+
offset,
|
|
146
|
+
worldToMinimap: (p) => worldToMinimap(p, worldBounds, minimapSize),
|
|
147
|
+
minimapToWorld: (p) => minimapToWorld(p, worldBounds, minimapSize),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function sizeEqual(a, b) {
|
|
152
|
+
return a.width === b.width && a.height === b.height;
|
|
153
|
+
}
|
|
154
|
+
function rectEqual(a, b) {
|
|
155
|
+
return (a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height);
|
|
156
|
+
}
|
|
157
|
+
function hoverPointEqual(a, b) {
|
|
158
|
+
if (a === b)
|
|
159
|
+
return true;
|
|
160
|
+
if (!a || !b)
|
|
161
|
+
return false;
|
|
162
|
+
return a.x === b.x && a.y === b.y;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export { MinimapStore };
|
|
166
|
+
//# sourceMappingURL=MinimapStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinimapStore.js","sources":["src/components/editor/Minimap/MinimapStore.ts"],"sourcesContent":["import {\n computeMinimapOffset,\n computeMinimapScale,\n minimapToWorld as minimapToWorldFn,\n worldToMinimap as worldToMinimapFn,\n} from './minimapCoords';\n\nimport type { MinimapContextValue, MinimapHandle } from './Minimap.types';\nimport type { Point2D } from '@/components/primitives/canvas/canvas.types';\nimport type {\n ViewportSize,\n ViewportTransform,\n WorldRect,\n} from '@/components/primitives/viewport';\n\nconst IDENTITY_TRANSFORM: ViewportTransform = { x: 0, y: 0, zoom: 1 };\nconst ZERO_SIZE: ViewportSize = { width: 0, height: 0 };\nconst ZERO_RECT: WorldRect = { x: 0, y: 0, width: 0, height: 0 };\n\n/** Snapshot of the geometry slice — the data needed to position anything. */\nexport interface MinimapGeometryState {\n transform: ViewportTransform;\n viewportSize: ViewportSize;\n worldBounds: WorldRect;\n minimapSize: ViewportSize;\n}\n\n/** Snapshot of the hover slice. */\nexport interface MinimapHoverState {\n hoverWorldPoint: Point2D | null;\n hoveredItemId: string | null;\n}\n\n/**\n * Single source of truth for Minimap runtime state — geometry, hover,\n * drag. Designed for React's `useSyncExternalStore`: each slice has its\n * own subscribe/get pair so subscribers re-render only when their slice\n * changes (not on every store mutation).\n *\n * Wzorowane 1:1 na `primitives/viewport/ViewportStore.ts`.\n */\nexport class MinimapStore {\n private geometry: MinimapGeometryState = {\n transform: IDENTITY_TRANSFORM,\n viewportSize: ZERO_SIZE,\n worldBounds: ZERO_RECT,\n minimapSize: ZERO_SIZE,\n };\n private hover: MinimapHoverState = {\n hoverWorldPoint: null,\n hoveredItemId: null,\n };\n private isDragging = false;\n private snapshot: MinimapContextValue = this.computeSnapshot();\n\n private allListeners = new Set<() => void>();\n private geometryListeners = new Set<() => void>();\n private hoverListeners = new Set<() => void>();\n private dragListeners = new Set<() => void>();\n\n // ── Public read API (arrow functions so they can be passed as callbacks) ──\n\n getSnapshot = (): MinimapContextValue => this.snapshot;\n getGeometry = (): MinimapGeometryState => this.geometry;\n getHover = (): MinimapHoverState => this.hover;\n getIsDragging = (): boolean => this.isDragging;\n\n // ── Subscriptions ──\n\n subscribe = (cb: () => void): (() => void) => {\n this.allListeners.add(cb);\n return () => {\n this.allListeners.delete(cb);\n };\n };\n\n subscribeGeometry = (cb: () => void): (() => void) => {\n this.geometryListeners.add(cb);\n return () => {\n this.geometryListeners.delete(cb);\n };\n };\n\n subscribeHover = (cb: () => void): (() => void) => {\n this.hoverListeners.add(cb);\n return () => {\n this.hoverListeners.delete(cb);\n };\n };\n\n subscribeDrag = (cb: () => void): (() => void) => {\n this.dragListeners.add(cb);\n return () => {\n this.dragListeners.delete(cb);\n };\n };\n\n // ── Mutators ──\n\n setGeometry(partial: Partial<MinimapGeometryState>): void {\n const next: MinimapGeometryState = {\n transform: partial.transform ?? this.geometry.transform,\n viewportSize: partial.viewportSize ?? this.geometry.viewportSize,\n worldBounds: partial.worldBounds ?? this.geometry.worldBounds,\n minimapSize: partial.minimapSize ?? this.geometry.minimapSize,\n };\n if (\n next.transform === this.geometry.transform &&\n sizeEqual(next.viewportSize, this.geometry.viewportSize) &&\n rectEqual(next.worldBounds, this.geometry.worldBounds) &&\n sizeEqual(next.minimapSize, this.geometry.minimapSize)\n ) {\n return;\n }\n this.geometry = next;\n this.snapshot = this.computeSnapshot();\n this.geometryListeners.forEach(cb => {\n cb();\n });\n this.allListeners.forEach(cb => {\n cb();\n });\n }\n\n setHover(next: MinimapHoverState): void {\n if (\n hoverPointEqual(next.hoverWorldPoint, this.hover.hoverWorldPoint) &&\n next.hoveredItemId === this.hover.hoveredItemId\n ) {\n return;\n }\n this.hover = next;\n this.snapshot = this.computeSnapshot();\n this.hoverListeners.forEach(cb => {\n cb();\n });\n this.allListeners.forEach(cb => {\n cb();\n });\n }\n\n setIsDragging(next: boolean): void {\n if (next === this.isDragging) return;\n this.isDragging = next;\n this.snapshot = this.computeSnapshot();\n this.dragListeners.forEach(cb => {\n cb();\n });\n this.allListeners.forEach(cb => {\n cb();\n });\n }\n\n // ── Imperative handle ──\n\n /**\n * Stable handle whose methods proxy to the current store state. The\n * handle reference is stable for the lifetime of the store.\n */\n readonly handle: MinimapHandle = {\n focus: (): void => {\n this.focusElement?.();\n },\n getElement: (): HTMLDivElement | null => this.elementGetter?.() ?? null,\n worldToMinimap: (p: Point2D): Point2D =>\n worldToMinimapFn(p, this.geometry.worldBounds, this.geometry.minimapSize),\n minimapToWorld: (p: Point2D): Point2D =>\n minimapToWorldFn(p, this.geometry.worldBounds, this.geometry.minimapSize),\n };\n\n /** Wired up by `Minimap.tsx` so the handle knows which element to act on. */\n configureHandle(config: {\n focus: () => void;\n getElement: () => HTMLDivElement | null;\n }): void {\n this.focusElement = config.focus;\n this.elementGetter = config.getElement;\n }\n\n private focusElement: (() => void) | null = null;\n private elementGetter: (() => HTMLDivElement | null) | null = null;\n\n private computeSnapshot(): MinimapContextValue {\n const { worldBounds, minimapSize, transform, viewportSize } = this.geometry;\n const scale = computeMinimapScale(worldBounds, minimapSize);\n const offset = computeMinimapOffset(worldBounds, minimapSize, scale);\n return {\n worldBounds,\n minimapSize,\n transform,\n viewportSize,\n hoverWorldPoint: this.hover.hoverWorldPoint,\n hoveredItemId: this.hover.hoveredItemId,\n isDragging: this.isDragging,\n scale,\n offset,\n worldToMinimap: (p: Point2D): Point2D =>\n worldToMinimapFn(p, worldBounds, minimapSize),\n minimapToWorld: (p: Point2D): Point2D =>\n minimapToWorldFn(p, worldBounds, minimapSize),\n };\n }\n}\n\nfunction sizeEqual(a: ViewportSize, b: ViewportSize): boolean {\n return a.width === b.width && a.height === b.height;\n}\n\nfunction rectEqual(a: WorldRect, b: WorldRect): boolean {\n return (\n a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height\n );\n}\n\nfunction hoverPointEqual(a: Point2D | null, b: Point2D | null): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n return a.x === b.x && a.y === b.y;\n}\n"],"names":["worldToMinimapFn","minimapToWorldFn"],"mappings":";;AAeA,MAAM,kBAAkB,GAAsB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;AACrE,MAAM,SAAS,GAAiB,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;AACvD,MAAM,SAAS,GAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;AAgBhE;;;;;;;AAOG;MACU,YAAY,CAAA;AAAzB,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,QAAQ,GAAyB;AACvC,YAAA,SAAS,EAAE,kBAAkB;AAC7B,YAAA,YAAY,EAAE,SAAS;AACvB,YAAA,WAAW,EAAE,SAAS;AACtB,YAAA,WAAW,EAAE,SAAS;SACvB;AACO,QAAA,IAAA,CAAA,KAAK,GAAsB;AACjC,YAAA,eAAe,EAAE,IAAI;AACrB,YAAA,aAAa,EAAE,IAAI;SACpB;QACO,IAAA,CAAA,UAAU,GAAG,KAAK;AAClB,QAAA,IAAA,CAAA,QAAQ,GAAwB,IAAI,CAAC,eAAe,EAAE;AAEtD,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,GAAG,EAAc;AACpC,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,GAAG,EAAc;AACzC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,GAAG,EAAc;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAAc;;AAI7C,QAAA,IAAA,CAAA,WAAW,GAAG,MAA2B,IAAI,CAAC,QAAQ;AACtD,QAAA,IAAA,CAAA,WAAW,GAAG,MAA4B,IAAI,CAAC,QAAQ;AACvD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAyB,IAAI,CAAC,KAAK;AAC9C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAe,IAAI,CAAC,UAAU;;AAI9C,QAAA,IAAA,CAAA,SAAS,GAAG,CAAC,EAAc,KAAkB;AAC3C,YAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;AACzB,YAAA,OAAO,MAAK;AACV,gBAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;AAC9B,YAAA,CAAC;AACH,QAAA,CAAC;AAED,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,EAAc,KAAkB;AACnD,YAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;AAC9B,YAAA,OAAO,MAAK;AACV,gBAAA,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;AACnC,YAAA,CAAC;AACH,QAAA,CAAC;AAED,QAAA,IAAA,CAAA,cAAc,GAAG,CAAC,EAAc,KAAkB;AAChD,YAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;AAC3B,YAAA,OAAO,MAAK;AACV,gBAAA,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;AAChC,YAAA,CAAC;AACH,QAAA,CAAC;AAED,QAAA,IAAA,CAAA,aAAa,GAAG,CAAC,EAAc,KAAkB;AAC/C,YAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1B,YAAA,OAAO,MAAK;AACV,gBAAA,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;AAC/B,YAAA,CAAC;AACH,QAAA,CAAC;;AA4DD;;;AAGG;AACM,QAAA,IAAA,CAAA,MAAM,GAAkB;YAC/B,KAAK,EAAE,MAAW;AAChB,gBAAA,IAAI,CAAC,YAAY,IAAI;YACvB,CAAC;YACD,UAAU,EAAE,MAA6B,IAAI,CAAC,aAAa,IAAI,IAAI,IAAI;YACvE,cAAc,EAAE,CAAC,CAAU,KACzBA,cAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC3E,cAAc,EAAE,CAAC,CAAU,KACzBC,cAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;SAC5E;QAWO,IAAA,CAAA,YAAY,GAAwB,IAAI;QACxC,IAAA,CAAA,aAAa,GAAyC,IAAI;IAsBpE;;AAvGE,IAAA,WAAW,CAAC,OAAsC,EAAA;AAChD,QAAA,MAAM,IAAI,GAAyB;YACjC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS;YACvD,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY;YAChE,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW;YAC7D,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW;SAC9D;QACD,IACE,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,SAAS;YAC1C,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;YACxD,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;AACtD,YAAA,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EACtD;YACA;QACF;AACA,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACpB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE;AACtC,QAAA,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,IAAG;AAClC,YAAA,EAAE,EAAE;AACN,QAAA,CAAC,CAAC;AACF,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,IAAG;AAC7B,YAAA,EAAE,EAAE;AACN,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,QAAQ,CAAC,IAAuB,EAAA;QAC9B,IACE,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;YACjE,IAAI,CAAC,aAAa,KAAK,IAAI,CAAC,KAAK,CAAC,aAAa,EAC/C;YACA;QACF;AACA,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI;AACjB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE;AACtC,QAAA,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,IAAG;AAC/B,YAAA,EAAE,EAAE;AACN,QAAA,CAAC,CAAC;AACF,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,IAAG;AAC7B,YAAA,EAAE,EAAE;AACN,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,aAAa,CAAC,IAAa,EAAA;AACzB,QAAA,IAAI,IAAI,KAAK,IAAI,CAAC,UAAU;YAAE;AAC9B,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI;AACtB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,EAAE;AACtC,QAAA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,IAAG;AAC9B,YAAA,EAAE,EAAE;AACN,QAAA,CAAC,CAAC;AACF,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,IAAG;AAC7B,YAAA,EAAE,EAAE;AACN,QAAA,CAAC,CAAC;IACJ;;AAoBA,IAAA,eAAe,CAAC,MAGf,EAAA;AACC,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,KAAK;AAChC,QAAA,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,UAAU;IACxC;IAKQ,eAAe,GAAA;AACrB,QAAA,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,QAAQ;QAC3E,MAAM,KAAK,GAAG,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC;QAC3D,MAAM,MAAM,GAAG,oBAAoB,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,CAAC;QACpE,OAAO;YACL,WAAW;YACX,WAAW;YACX,SAAS;YACT,YAAY;AACZ,YAAA,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe;AAC3C,YAAA,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;YACvC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK;YACL,MAAM;AACN,YAAA,cAAc,EAAE,CAAC,CAAU,KACzBD,cAAgB,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC;AAC/C,YAAA,cAAc,EAAE,CAAC,CAAU,KACzBC,cAAgB,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC;SAChD;IACH;AACD;AAED,SAAS,SAAS,CAAC,CAAe,EAAE,CAAe,EAAA;AACjD,IAAA,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;AACrD;AAEA,SAAS,SAAS,CAAC,CAAY,EAAE,CAAY,EAAA;AAC3C,IAAA,QACE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;AAE9E;AAEA,SAAS,eAAe,CAAC,CAAiB,EAAE,CAAiB,EAAA;IAC3D,IAAI,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;AACxB,IAAA,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAAE,QAAA,OAAO,KAAK;AAC1B,IAAA,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MINIMAP_SLOT } from './Minimap.types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Title strip rendered above (or inside the top of) the Minimap canvas
|
|
5
|
+
* body. Picked out of `<Minimap>` children by the `MINIMAP_SLOT` symbol —
|
|
6
|
+
* does not render itself in place, so its tree position has no effect on
|
|
7
|
+
* its placement.
|
|
8
|
+
*/
|
|
9
|
+
const MinimapTitleImpl = () => null;
|
|
10
|
+
const MinimapTitle = Object.assign(MinimapTitleImpl, {
|
|
11
|
+
displayName: 'Minimap.Title',
|
|
12
|
+
[MINIMAP_SLOT]: 'title',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { MinimapTitle };
|
|
16
|
+
//# sourceMappingURL=MinimapTitle.js.map
|