@likec4/diagram 1.60.0 → 1.61.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/README.md +63 -11
- package/dist/LikeC4Diagram.d.mts +4 -6
- package/dist/LikeC4Diagram.mjs +13 -12
- package/dist/LikeC4Diagram.props.d.mts +5 -7
- package/dist/LikeC4MantineProvider.d.mts +1 -2
- package/dist/LikeC4MantineProvider.mjs +26 -11
- package/dist/LikeC4ModelProvider.d.mts +1 -3
- package/dist/LikeC4ModelProvider.mjs +1 -2
- package/dist/LikeC4ProjectsOverview.d.mts +1 -3
- package/dist/LikeC4ProjectsOverview.mjs +1 -2
- package/dist/LikeC4ProjectsProvider.d.mts +1 -2
- package/dist/LikeC4ProjectsProvider.mjs +2 -3
- package/dist/LikeC4Styles.d.mts +1 -2
- package/dist/LikeC4Styles.mjs +11 -6
- package/dist/LikeC4View.d.mts +3 -5
- package/dist/LikeC4View.mjs +12 -11
- package/dist/ReactLikeC4.d.mts +3 -5
- package/dist/ReactLikeC4.mjs +8 -7
- package/dist/StaticLikeC4Diagram.d.mts +1 -3
- package/dist/StaticLikeC4Diagram.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/base/Background.mjs +1 -2
- package/dist/base/Base.d.mts +1 -2
- package/dist/base/Base.mjs +1 -2
- package/dist/base/BaseXYFlow.mjs +12 -10
- package/dist/base/const.d.mts +1 -3
- package/dist/base/const.mjs +1 -2
- package/dist/base/keyboardZoom.mjs +1 -2
- package/dist/base/types.d.mts +2 -4
- package/dist/base/updateEdges.mjs +1 -2
- package/dist/base/updateNodes.mjs +1 -2
- package/dist/base-primitives/Markdown.d.mts +5 -5
- package/dist/base-primitives/Markdown.mjs +22 -11
- package/dist/base-primitives/NodeHandles.d.mts +1 -3
- package/dist/base-primitives/NodeHandles.mjs +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundDetailsButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundNodeContainer.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.mjs +1 -2
- package/dist/base-primitives/compound/CompoundTitle.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundTitle.mjs +1 -2
- package/dist/base-primitives/compound/actionbtns.css.mjs +1 -2
- package/dist/base-primitives/edge/EdgeActionButton.mjs +2 -3
- package/dist/base-primitives/edge/EdgeContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeLabel.mjs +3 -3
- package/dist/base-primitives/edge/EdgeLabelContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeMarkers.mjs +1 -2
- package/dist/base-primitives/edge/EdgePath.mjs +1 -2
- package/dist/base-primitives/element/ElementActionButtons.d.mts +1 -2
- package/dist/base-primitives/element/ElementActionButtons.mjs +2 -3
- package/dist/base-primitives/element/ElementData.d.mts +1 -2
- package/dist/base-primitives/element/ElementData.mjs +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.mts +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.mjs +2 -3
- package/dist/base-primitives/element/ElementNodeContainer.d.mts +1 -2
- package/dist/base-primitives/element/ElementNodeContainer.mjs +2 -3
- package/dist/base-primitives/element/ElementShape.d.mts +11 -6
- package/dist/base-primitives/element/ElementShape.mjs +10 -5
- package/dist/base-primitives/element/ElementTags.d.mts +6 -3
- package/dist/base-primitives/element/ElementTags.mjs +2 -4
- package/dist/base-primitives/index.d.mts +5 -5
- package/dist/base-primitives/memoEdge.d.mts +2 -6
- package/dist/base-primitives/memoEdge.mjs +1 -2
- package/dist/base-primitives/memoNode.d.mts +2 -6
- package/dist/components/EmptyBox.mjs +1 -2
- package/dist/components/ErrorFallback.d.mts +4 -3
- package/dist/components/ErrorFallback.mjs +61 -56
- package/dist/components/FloatingWindow.mjs +3 -4
- package/dist/components/GithubIcon.mjs +1 -2
- package/dist/components/Link.mjs +3 -4
- package/dist/components/Logo.d.mts +3 -5
- package/dist/components/Logo.mjs +28 -35
- package/dist/components/NavigationLink.mjs +1 -2
- package/dist/components/NavigationPanel.mjs +11 -11
- package/dist/components/PortalToContainer.d.mts +1 -3
- package/dist/components/PortalToContainer.mjs +1 -2
- package/dist/components/RootContainer.mjs +1 -2
- package/dist/components/SearchControl.css.mjs +1 -2
- package/dist/components/SearchControl.d.mts +1 -2
- package/dist/components/SearchControl.mjs +2 -3
- package/dist/components/ViewIcon.mjs +5 -6
- package/dist/components/ViewNotFound.mjs +1 -2
- package/dist/components/markdown/MarkdownWithRefs.mjs +268 -0
- package/dist/components/markdown/markdown-refs.mjs +145 -0
- package/dist/components/markdown/useMarkdownRefsInteractivity.mjs +126 -0
- package/dist/context/ComparingLayoutsContext.mjs +24 -0
- package/dist/context/CurrentViewModelProvider.mjs +1 -2
- package/dist/context/DiagramEventHandlers.mjs +3 -4
- package/dist/context/DiagramFeatures.d.mts +2 -3
- package/dist/context/DiagramFeatures.mjs +15 -9
- package/dist/context/EnsureMantine.mjs +1 -2
- package/dist/context/FramerMotionConfig.d.mts +1 -3
- package/dist/context/FramerMotionConfig.mjs +1 -2
- package/dist/context/IconRenderer.d.mts +1 -3
- package/dist/context/IconRenderer.mjs +14 -14
- package/dist/context/LikeC4ModelContext.d.mts +1 -2
- package/dist/context/LikeC4ModelContext.mjs +1 -2
- package/dist/context/LikeC4ProjectsContext.d.mts +1 -3
- package/dist/context/LikeC4ProjectsContext.mjs +1 -2
- package/dist/context/RootContainerContext.mjs +1 -2
- package/dist/context/TagStylesContext.d.mts +1 -2
- package/dist/context/TagStylesContext.mjs +7 -19
- package/dist/custom/builtins.d.mts +4 -1
- package/dist/custom/customNodes.d.mts +164 -7
- package/dist/custom/customNodes.mjs +387 -8
- package/dist/custom/index.d.mts +18 -30
- package/dist/custom/index.mjs +11 -19
- package/dist/custom/primitives.d.mts +3 -5
- package/dist/customization/CustomizationContext.d.mts +50 -0
- package/dist/customization/CustomizationContext.mjs +64 -0
- package/dist/customization/customizable.d.mts +32 -0
- package/dist/customization/customizable.mjs +75 -0
- package/dist/customization/customization-types.d.mts +40 -0
- package/dist/customization/customization-types.mjs +8 -0
- package/dist/customization/stableComponents.mjs +35 -0
- package/dist/editor/LikeC4EditorCallbacks.d.mts +1 -3
- package/dist/editor/LikeC4EditorCallbacks.mjs +1 -2
- package/dist/editor/LikeC4EditorProvider.d.mts +1 -3
- package/dist/editor/LikeC4EditorProvider.mjs +1 -2
- package/dist/editor/actor/actions.mjs +2 -3
- package/dist/editor/actor/hotkey.d.mts +1 -3
- package/dist/editor/actor/hotkey.mjs +1 -2
- package/dist/editor/actor/machine.d.mts +2 -4
- package/dist/editor/actor/machine.mjs +1 -2
- package/dist/editor/actor/setup.d.mts +1 -2
- package/dist/editor/actor/setup.mjs +1 -2
- package/dist/editor/actor/state.editor.mjs +2 -3
- package/dist/editor/actor/state.sync-queue.mjs +2 -3
- package/dist/editor/actor/types.d.mts +1 -3
- package/dist/editor/actor/types.mjs +1 -2
- package/dist/editor/applyChangesToManualLayout.mjs +1 -2
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/useEditorActorLogic.mjs +3 -4
- package/dist/hooks/safeContext.d.mts +16 -35
- package/dist/hooks/safeContext.mjs +1 -2
- package/dist/hooks/useCallbackRef.mjs +1 -2
- package/dist/hooks/useCurrentView.d.mts +1 -3
- package/dist/hooks/useCurrentView.mjs +1 -2
- package/dist/hooks/useCurrentViewModel.d.mts +0 -2
- package/dist/hooks/useCurrentViewModel.mjs +1 -2
- package/dist/hooks/useDiagram.d.mts +3 -12
- package/dist/hooks/useDiagram.mjs +11 -10
- package/dist/hooks/useDiagramCompareLayout.d.mts +2 -4
- package/dist/hooks/useDiagramCompareLayout.mjs +12 -21
- package/dist/hooks/useDiagramMarkdownRefActions.mjs +35 -0
- package/dist/hooks/useEdgeLabelFontLoader.mjs +29 -0
- package/dist/hooks/useEdgeTracks.mjs +2 -3
- package/dist/hooks/useEditorActor.mjs +1 -2
- package/dist/hooks/useId.mjs +1 -2
- package/dist/hooks/useLikeC4ElementsTree.mjs +1 -2
- package/dist/hooks/useLikeC4Model.d.mts +0 -2
- package/dist/hooks/useLikeC4Model.mjs +1 -2
- package/dist/hooks/useLikeC4Project.d.mts +2 -4
- package/dist/hooks/useLikeC4Project.mjs +1 -2
- package/dist/hooks/useLikeC4Styles.d.mts +1 -3
- package/dist/hooks/useLikeC4Styles.mjs +1 -2
- package/dist/hooks/useMantinePortalProps.mjs +1 -2
- package/dist/hooks/useSetState.mjs +1 -2
- package/dist/hooks/useUpdateEffect.d.mts +0 -2
- package/dist/hooks/useUpdateEffect.mjs +1 -2
- package/dist/hooks/useXYFlow.d.mts +1 -3
- package/dist/hooks/useXYFlow.mjs +1 -2
- package/dist/index.d.mts +20 -18
- package/dist/index.mjs +20 -18
- package/dist/likec4diagram/DiagramUI.mjs +14 -11
- package/dist/likec4diagram/DiagramXYFlow.mjs +34 -34
- package/dist/likec4diagram/convert-to-xyflow.mjs +7 -3
- package/dist/likec4diagram/custom/edges/EdgeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.mjs +18 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.mjs +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.mjs +2 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.mjs +2 -3
- package/dist/likec4diagram/custom/index.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.mts +1 -2
- package/dist/likec4diagram/custom/nodes/CompoundActions.mjs +2 -3
- package/dist/likec4diagram/custom/nodes/ElementActions.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/GraphElementNode.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/GraphElementNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/NodeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/nodes/NodeNotes.mjs +3 -5
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.mts +3 -1
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/index.d.mts +4 -4
- package/dist/likec4diagram/custom/nodes/nodes.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/nodes.mjs +19 -21
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.mjs +4 -6
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/types.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.mjs +29 -12
- package/dist/likec4diagram/relationship-popover/actor.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/components.mjs +1 -2
- package/dist/likec4diagram/state/DiagramActorProvider.mjs +22 -34
- package/dist/likec4diagram/state/aligners.d.mts +1 -3
- package/dist/likec4diagram/state/aligners.mjs +1 -2
- package/dist/likec4diagram/state/assign.mjs +3 -4
- package/dist/likec4diagram/state/createViewChange.mjs +1 -2
- package/dist/likec4diagram/state/diagram-api.d.mts +33 -16
- package/dist/likec4diagram/state/diagram-api.mjs +55 -31
- package/dist/likec4diagram/state/hotkeyActor.d.mts +1 -3
- package/dist/likec4diagram/state/hotkeyActor.mjs +12 -6
- package/dist/likec4diagram/state/machine.actions.layout.mjs +2 -3
- package/dist/likec4diagram/state/machine.actions.mjs +81 -44
- package/dist/likec4diagram/state/machine.d.mts +107 -15
- package/dist/likec4diagram/state/machine.mjs +3 -4
- package/dist/likec4diagram/state/machine.setup.d.mts +14 -10
- package/dist/likec4diagram/state/machine.setup.mjs +55 -28
- package/dist/likec4diagram/state/machine.state.initializing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.navigating.mjs +3 -6
- package/dist/likec4diagram/state/machine.state.ready.comparing.mjs +63 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.idle.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.mjs +8 -8
- package/dist/likec4diagram/state/machine.state.ready.printing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.mjs +5 -6
- package/dist/likec4diagram/state/mediaPrintActor.d.mts +1 -3
- package/dist/likec4diagram/state/mediaPrintActor.mjs +1 -2
- package/dist/likec4diagram/state/persistence.mjs +12 -5
- package/dist/likec4diagram/state/types.d.mts +1 -3
- package/dist/likec4diagram/state/utils.mjs +2 -3
- package/dist/likec4diagram/types.d.mts +1 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.mjs +5 -7
- package/dist/likec4diagram/ui/notation/NotationPanel.css.mjs +1 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.mjs +6 -7
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.mjs +3 -4
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.mjs +4 -7
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.mjs +4 -5
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.mjs +4 -6
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/StepRow.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.mjs +3 -9
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/motion.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/presentation.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/tree.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/types.mjs +1 -2
- package/dist/likec4diagram/useLayoutConstraints.mjs +5 -10
- package/dist/likec4diagram/useNodeDragHandlers.mjs +28 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.mjs +9 -2
- package/dist/likec4diagram/xyflow-graph/graph-view-to-xy.mjs +1 -2
- package/dist/likec4diagram/xyflow-graph/useGraphForceSimulation.mjs +3 -6
- package/dist/likec4diagram/xyflow-props.mjs +25 -0
- package/dist/likec4diagram/xyflow-sequence/const.mjs +1 -2
- package/dist/likec4diagram/xyflow-sequence/layouter.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/utils.mjs +1 -2
- package/dist/navigationpanel/ElementViewControls.mjs +6 -7
- package/dist/navigationpanel/NavigationPanel.mjs +38 -67
- package/dist/navigationpanel/NavigationPanelControls.mjs +35 -114
- package/dist/navigationpanel/NavigationPanelDropdown.mjs +37 -34
- package/dist/navigationpanel/_common.mjs +3 -4
- package/dist/navigationpanel/actor.actions.mjs +1 -2
- package/dist/navigationpanel/actor.d.mts +0 -2
- package/dist/navigationpanel/actor.mjs +2 -3
- package/dist/navigationpanel/actor.setup.d.mts +1 -3
- package/dist/navigationpanel/actor.setup.mjs +1 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.mjs +160 -90
- package/dist/navigationpanel/comparepanel/DriftsSummary.mjs +173 -142
- package/dist/{likec4diagram/ui → navigationpanel/comparepanel}/LayoutDriftFrame.mjs +6 -12
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.mjs +14 -19
- package/dist/navigationpanel/controls/LayoutWarning.mjs +3 -4
- package/dist/navigationpanel/controls/LogoButton.mjs +5 -23
- package/dist/navigationpanel/controls/NavigationBreadcrumbs.mjs +110 -0
- package/dist/navigationpanel/controls/NavigationButtons.mjs +3 -4
- package/dist/navigationpanel/controls/OpenSource.mjs +2 -3
- package/dist/navigationpanel/controls/SearchControl.mjs +2 -3
- package/dist/navigationpanel/controls/ToggleReadonly.mjs +36 -21
- package/dist/navigationpanel/controls/ViewDetailsButton.mjs +12 -15
- package/dist/navigationpanel/dropdown/ProjectsMenu.mjs +46 -13
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.mjs +3 -4
- package/dist/navigationpanel/editorpanel/CenterCamera.mjs +2 -3
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.mjs +3 -4
- package/dist/navigationpanel/editorpanel/EditorPanel.mjs +4 -4
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.mjs +11 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.mjs +2 -3
- package/dist/navigationpanel/editorpanel/_common.mjs +1 -2
- package/dist/navigationpanel/editorpanel/styles.mjs +1 -2
- package/dist/navigationpanel/hooks.mjs +1 -2
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.mjs +5 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.mjs +7 -9
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.mjs +1 -2
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.mjs +3 -4
- package/dist/navigationpanel/windows/ViewDetailsWindow.mjs +44 -38
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowFork.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowGuide.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.mjs +1 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCaretRightFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCornerDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRepeat.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRobot.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs +1 -2
- package/dist/overlays/Overlays.mjs +4 -5
- package/dist/overlays/element-details/ElementDetails.mjs +2 -3
- package/dist/overlays/element-details/ElementDetailsCard.css.mjs +148 -102
- package/dist/overlays/element-details/ElementDetailsCard.mjs +503 -256
- package/dist/overlays/element-details/MetadataValue.mjs +115 -222
- package/dist/overlays/element-details/PropertiesSplit.mjs +162 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelDeployments.mjs +5 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelRelationships.mjs +6 -7
- package/dist/overlays/element-details/TabPanelStructure.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelStructure.mjs +3 -4
- package/dist/overlays/element-details/TabPanelViews.mjs +51 -0
- package/dist/overlays/element-details/actor.d.mts +6 -7
- package/dist/overlays/element-details/actor.mjs +31 -15
- package/dist/overlays/element-details/actorContext.mjs +1 -2
- package/dist/overlays/element-details/subject.d.mts +12 -0
- package/dist/overlays/element-details/subject.mjs +15 -0
- package/dist/overlays/hooks.mjs +1 -2
- package/dist/overlays/overlay/Overlay.d.mts +1 -3
- package/dist/overlays/overlay/Overlay.mjs +4 -5
- package/dist/overlays/overlaysActor.d.mts +12 -5
- package/dist/overlays/overlaysActor.mjs +24 -6
- package/dist/overlays/relationship-details/RelationshipDetails.mjs +16 -8
- package/dist/overlays/relationship-details/SelectEdge.css.mjs +1 -2
- package/dist/overlays/relationship-details/SelectEdge.mjs +3 -4
- package/dist/overlays/relationship-details/_types.d.mts +6 -4
- package/dist/overlays/relationship-details/actor.d.mts +0 -2
- package/dist/overlays/relationship-details/actor.mjs +2 -3
- package/dist/overlays/relationship-details/compute.mjs +1 -2
- package/dist/overlays/relationship-details/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationship-details/custom/edgeTypes.mjs +8 -13
- package/dist/overlays/relationship-details/custom/nodeTypes.mjs +8 -6
- package/dist/overlays/relationship-details/hooks.mjs +1 -2
- package/dist/overlays/relationship-details/layout-to-xyflow.mjs +3 -3
- package/dist/overlays/relationship-details/layout.d.mts +1 -3
- package/dist/overlays/relationship-details/layout.mjs +39 -13
- package/dist/overlays/relationships-browser/RelationshipsBrowser.mjs +12 -13
- package/dist/overlays/relationships-browser/SelectElement.css.mjs +1 -2
- package/dist/overlays/relationships-browser/SelectElement.mjs +4 -5
- package/dist/overlays/relationships-browser/_types.d.mts +6 -4
- package/dist/overlays/relationships-browser/actor.d.mts +0 -2
- package/dist/overlays/relationships-browser/actor.mjs +4 -5
- package/dist/overlays/relationships-browser/const.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationships-browser/custom/EmptyNode.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/edgeTypes.mjs +14 -17
- package/dist/overlays/relationships-browser/custom/nodeTypes.mjs +12 -7
- package/dist/overlays/relationships-browser/hooks.mjs +1 -2
- package/dist/overlays/relationships-browser/layout.d.mts +1 -3
- package/dist/overlays/relationships-browser/layout.mjs +73 -24
- package/dist/overlays/relationships-browser/useViewToNodesEdges.mjs +2 -2
- package/dist/overlays/types.d.mts +5 -7
- package/dist/projects-overview/ProjectsOverview.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverview.mjs +1 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverviewXY.mjs +3 -4
- package/dist/projects-overview/actor.mjs +1 -2
- package/dist/projects-overview/context.mjs +1 -2
- package/dist/projects-overview/custom/edgeTypes.mjs +2 -3
- package/dist/projects-overview/custom/nodeTypes.mjs +3 -4
- package/dist/projects-overview/hooks.mjs +1 -2
- package/dist/projects-overview/layouted-to-xyflow.mjs +1 -2
- package/dist/projects-overview/panel/ProjectsOverviewPanel.mjs +1 -2
- package/dist/projects-overview/persistence.mjs +1 -2
- package/dist/search/Search.d.mts +1 -3
- package/dist/search/Search.mjs +13 -12
- package/dist/search/SearchContext.d.mts +1 -3
- package/dist/search/SearchContext.mjs +1 -2
- package/dist/search/XStateSearchAdapter.mjs +1 -2
- package/dist/search/components/ElementsColumn.css.mjs +1 -2
- package/dist/search/components/ElementsColumn.mjs +31 -9
- package/dist/search/components/PickView.mjs +3 -4
- package/dist/search/components/SearchByTags.mjs +3 -4
- package/dist/search/components/SearchInput.mjs +3 -4
- package/dist/search/components/ViewsColum.mjs +20 -20
- package/dist/search/components/ViewsColumn.css.mjs +1 -2
- package/dist/search/components/_shared.css.mjs +1 -2
- package/dist/search/components/styles.css.mjs +1 -2
- package/dist/search/components/utils.mjs +32 -3
- package/dist/search/fuzzy.mjs +27 -0
- package/dist/search/hooks.mjs +1 -2
- package/dist/search/metadata-search.mjs +32 -0
- package/dist/search/searchActor.d.mts +1 -3
- package/dist/search/searchActor.mjs +1 -2
- package/dist/shadowroot/ShadowRoot.mjs +8 -7
- package/dist/styles-font2.mjs +1 -2
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles2.mjs +2 -3
- package/dist/utils/defineActors.d.mts +1 -3
- package/dist/utils/defineActors.mjs +1 -2
- package/dist/utils/edge-corners.mjs +2 -3
- package/dist/utils/edge-endpoints.mjs +1 -2
- package/dist/utils/edge-label.mjs +1 -2
- package/dist/utils/edge-path-through-label.mjs +51 -0
- package/dist/utils/edge-path.mjs +1 -2
- package/dist/utils/edge-tracks.mjs +1 -2
- package/dist/utils/filterProjects.d.mts +10 -0
- package/dist/utils/filterProjects.mjs +36 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/measure-edge-label.mjs +129 -0
- package/dist/utils/readableText.mjs +1 -2
- package/dist/utils/roundDpr.mjs +1 -2
- package/dist/utils/search-event.mjs +17 -0
- package/dist/utils/view-bounds.d.mts +1 -3
- package/dist/utils/view-bounds.mjs +1 -2
- package/dist/utils/view-routing.mjs +1 -2
- package/dist/utils/xyflow.mjs +2 -3
- package/dist/webcomponent/defineWebcomponent.d.mts +12 -0
- package/dist/webcomponent/defineWebcomponent.mjs +93 -0
- package/package.json +29 -26
- package/panda.buildinfo.json +211 -208
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/memoNode.mjs +0 -23
- package/dist/context/DiagramEventHandlers.d.mts +0 -11
- package/dist/custom/hooks.d.mts +0 -17
- package/dist/hooks/useSetState.d.mts +0 -10
- package/dist/likec4diagram/custom/edges/edges.css.mjs +0 -50
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.mjs +0 -69
- package/dist/navigationpanel/comparepanel/ComparePanelControls.mjs +0 -56
- package/dist/navigationpanel/styles.css.mjs +0 -23
- package/src/styles-font.css +0 -114
- package/src/styles-min.css +0 -2
- package/src/styles-xyflow.css +0 -1
- package/src/styles.css +0 -3
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconChevronRight from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs";
|
|
3
3
|
import { IconOrShapeRenderer } from "../../context/IconRenderer.mjs";
|
|
4
4
|
import { useCallbackRef } from "../../hooks/useCallbackRef.mjs";
|
|
5
5
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { createFuzzySearch } from "../fuzzy.mjs";
|
|
7
7
|
import { useNormalizedSearch } from "../hooks.mjs";
|
|
8
|
+
import { METADATA_SEARCH_PREFIX, matchesMetadataSearch } from "../metadata-search.mjs";
|
|
9
|
+
import { useSearchContext } from "../SearchContext.mjs";
|
|
8
10
|
import { buttonsva, focusable } from "./_shared.css.mjs";
|
|
9
11
|
import { elementExpandIcon, elementIcon, elementId, elementTitleAndId, elementViewsCount, treeLabel, treeNode, treeRoot, treeSubtree } from "./ElementsColumn.css.mjs";
|
|
10
12
|
import { centerY, moveFocusToSearchInput, queryAllFocusable, stopAndPrevent } from "./utils.mjs";
|
|
@@ -18,7 +20,7 @@ import { ifilter, imap, isAncestor, nameFromFqn, stringHash, toArray } from "@li
|
|
|
18
20
|
import { Txt } from "@likec4/styles/jsx";
|
|
19
21
|
import * as m from "motion/react-m";
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
// src/search/components/ElementsColumn.tsx
|
|
22
24
|
function useElementsColumnData() {
|
|
23
25
|
const model = useLikeC4Model();
|
|
24
26
|
const allElements = useMemo(() => pipe(model.elements(), ifilter((i) => !i.imported), imap((element) => ({
|
|
@@ -29,6 +31,24 @@ function useElementsColumnData() {
|
|
|
29
31
|
children: [],
|
|
30
32
|
hasChildren: false
|
|
31
33
|
})), toArray()), [model]);
|
|
34
|
+
const fuzzy = useMemo(() => createFuzzySearch(allElements, [
|
|
35
|
+
{
|
|
36
|
+
name: "name",
|
|
37
|
+
getFn: ({ element }) => element.name
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "title",
|
|
41
|
+
getFn: ({ element }) => element.title
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "id",
|
|
45
|
+
getFn: ({ element }) => element.id
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "summary",
|
|
49
|
+
getFn: ({ element }) => element.summary.text ?? ""
|
|
50
|
+
}
|
|
51
|
+
]), [allElements]);
|
|
32
52
|
const search = useNormalizedSearch();
|
|
33
53
|
return useMemo(() => {
|
|
34
54
|
const searchTerms = search.split(".");
|
|
@@ -44,7 +64,8 @@ function useElementsColumnData() {
|
|
|
44
64
|
elements = filter(allElements, ({ element }) => {
|
|
45
65
|
return element.tags.some((tag) => tag.toLocaleLowerCase().includes(searchTag));
|
|
46
66
|
});
|
|
47
|
-
} else if (
|
|
67
|
+
} else if (search.startsWith("meta:")) elements = filter(allElements, ({ element }) => matchesMetadataSearch(element.metadata, search));
|
|
68
|
+
else if (hasAtLeast(searchTerms, 2)) {
|
|
48
69
|
const satisfies = (element) => {
|
|
49
70
|
const fqnParts = element.id.toLocaleLowerCase().split(".");
|
|
50
71
|
if (fqnParts.length < searchTerms.length) return false;
|
|
@@ -57,9 +78,7 @@ function useElementsColumnData() {
|
|
|
57
78
|
return false;
|
|
58
79
|
};
|
|
59
80
|
elements = filter(allElements, ({ element }) => satisfies(element));
|
|
60
|
-
} else elements =
|
|
61
|
-
return (element.title + " " + element.name + " " + (element.summary.md || "")).toLocaleLowerCase().includes(search);
|
|
62
|
-
});
|
|
81
|
+
} else elements = fuzzy(search);
|
|
63
82
|
const byid = {};
|
|
64
83
|
const { hash, all, roots } = pipe(elements, reduce((acc, treeItem) => {
|
|
65
84
|
treeItem.children = [];
|
|
@@ -85,7 +104,11 @@ function useElementsColumnData() {
|
|
|
85
104
|
roots,
|
|
86
105
|
searchTerms: hasAtLeast(searchTerms, 1) ? searchTerms : [search]
|
|
87
106
|
};
|
|
88
|
-
}, [
|
|
107
|
+
}, [
|
|
108
|
+
allElements,
|
|
109
|
+
fuzzy,
|
|
110
|
+
search
|
|
111
|
+
]);
|
|
89
112
|
}
|
|
90
113
|
const btn = buttonsva();
|
|
91
114
|
const ElementsColumn = memo(() => {
|
|
@@ -260,5 +283,4 @@ function useHandleElementSelection() {
|
|
|
260
283
|
});
|
|
261
284
|
}
|
|
262
285
|
|
|
263
|
-
//#endregion
|
|
264
286
|
export { ElementsColumn };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconX from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconX from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs";
|
|
3
3
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
4
4
|
import { useSearchContext } from "../SearchContext.mjs";
|
|
5
|
-
import { ViewButton } from "./ViewsColum.mjs";
|
|
6
5
|
import { pickview, pickviewBackdrop, pickviewGroup } from "./styles.css.mjs";
|
|
6
|
+
import { ViewButton } from "./ViewsColum.mjs";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { ActionIcon, FocusTrap, Group, ScrollAreaAutosize, Stack, Title } from "@mantine/core";
|
|
9
9
|
import { useCallbackRef, useWindowEvent } from "@mantine/hooks";
|
|
10
10
|
import * as m from "motion/react-m";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/search/components/PickView.tsx
|
|
13
13
|
function PickView({ elementFqn }) {
|
|
14
14
|
const ctx = useSearchContext();
|
|
15
15
|
const currentViewId = ctx.currentViewId ?? "";
|
|
@@ -116,5 +116,4 @@ function PickView({ elementFqn }) {
|
|
|
116
116
|
}, "pickview") })] });
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
//#endregion
|
|
120
119
|
export { PickView };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconX from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
3
|
-
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
2
|
+
import IconX from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs";
|
|
4
3
|
import { ElementTag } from "../../base-primitives/element/ElementTags.mjs";
|
|
4
|
+
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
5
5
|
import { useNormalizedSearch, useUpdateSearch } from "../hooks.mjs";
|
|
6
6
|
import { focusToFirstFoundElement, moveFocusToSearchInput } from "./utils.mjs";
|
|
7
7
|
import { css } from "@likec4/styles/css";
|
|
@@ -10,7 +10,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
import { Button } from "@mantine/core";
|
|
11
11
|
import { HStack } from "@likec4/styles/jsx";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/search/components/SearchByTags.tsx
|
|
14
14
|
function SearchByTags() {
|
|
15
15
|
const ref = useRef(null);
|
|
16
16
|
let tags = useLikeC4Model().tagsSortedByUsage;
|
|
@@ -77,5 +77,4 @@ function SearchByTags() {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
//#endregion
|
|
81
80
|
export { SearchByTags };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconSearch from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconSearch from "../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs";
|
|
3
3
|
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
4
4
|
import { useSearchContext } from "../SearchContext.mjs";
|
|
5
|
-
import { focusToFirstFoundElement, moveFocusToSearchInput, stopAndPrevent } from "./utils.mjs";
|
|
6
5
|
import { input } from "./styles.css.mjs";
|
|
6
|
+
import { focusToFirstFoundElement, moveFocusToSearchInput, stopAndPrevent } from "./utils.mjs";
|
|
7
7
|
import { memo, useRef } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { keys } from "remeda";
|
|
10
10
|
import { Combobox, ComboboxDropdown, ComboboxEmpty, ComboboxOption, ComboboxOptions, ComboboxTarget, Input, ScrollAreaAutosize, Text, rem, useCombobox } from "@mantine/core";
|
|
11
11
|
import { useFocusWithin, useMergedRef, useWindowEvent } from "@mantine/hooks";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/search/components/SearchInput.tsx
|
|
14
14
|
function startingWithKind(search) {
|
|
15
15
|
return search.match(/^(k|ki|kin|kind|kind:)$/) != null;
|
|
16
16
|
}
|
|
@@ -189,5 +189,4 @@ const LikeC4SearchInput = memo(() => {
|
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
191
|
|
|
192
|
-
//#endregion
|
|
193
192
|
export { LikeC4SearchInput };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
3
2
|
import { EmptyBox } from "../../components/EmptyBox.mjs";
|
|
4
3
|
import { ViewIcon } from "../../components/ViewIcon.mjs";
|
|
5
|
-
import {
|
|
4
|
+
import { useLikeC4Model } from "../../hooks/useLikeC4Model.mjs";
|
|
6
5
|
import { useNormalizedSearch } from "../hooks.mjs";
|
|
6
|
+
import { METADATA_SEARCH_PREFIX } from "../metadata-search.mjs";
|
|
7
|
+
import { useSearchContext } from "../SearchContext.mjs";
|
|
7
8
|
import { buttonsva, focusable } from "./_shared.css.mjs";
|
|
8
|
-
import { centerY, moveFocusToSearchInput, queryAllFocusable } from "./utils.mjs";
|
|
9
|
+
import { centerY, createViewSearch, moveFocusToSearchInput, queryAllFocusable, viewTitleWithFolder } from "./utils.mjs";
|
|
9
10
|
import { viewButton } from "./ViewsColumn.css.mjs";
|
|
10
11
|
import { cx } from "@likec4/styles/css";
|
|
11
12
|
import { memo, useMemo, useRef } from "react";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { first } from "remeda";
|
|
14
|
-
import { Badge, Group, Highlight,
|
|
15
|
+
import { Badge, Group, Highlight, ThemeIcon, UnstyledButton, VisuallyHidden, createScopedKeydownHandler } from "@mantine/core";
|
|
15
16
|
import { m } from "motion/react";
|
|
16
|
-
import { preferSummary } from "@likec4/core/types";
|
|
17
17
|
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
18
18
|
import { vstack } from "@likec4/styles/patterns";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// src/search/components/ViewsColum.tsx
|
|
21
21
|
const NothingFound = () => /* @__PURE__ */ jsx(EmptyBox, {
|
|
22
22
|
fullsize: true,
|
|
23
23
|
as: m.div,
|
|
@@ -27,18 +27,16 @@ const useFoundViews = () => {
|
|
|
27
27
|
const { currentViewId } = useSearchContext();
|
|
28
28
|
const likec4model = useLikeC4Model();
|
|
29
29
|
const search = useNormalizedSearch();
|
|
30
|
+
const allViews = useMemo(() => [...likec4model.views()], [likec4model]);
|
|
31
|
+
const fuzzy = useMemo(() => createViewSearch(allViews), [allViews]);
|
|
30
32
|
return useMemo(() => {
|
|
31
|
-
let views =
|
|
33
|
+
let views = allViews;
|
|
32
34
|
if (search) {
|
|
33
|
-
if (search.startsWith("kind:")) views = [];
|
|
34
|
-
else {
|
|
35
|
-
const searchTag = search.
|
|
36
|
-
views = views.filter((view) =>
|
|
37
|
-
|
|
38
|
-
const desc = preferSummary(view.$view)?.md || " ";
|
|
39
|
-
return `${view.id} ${view.title} ${desc}`.toLocaleLowerCase().includes(search);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
35
|
+
if (search.startsWith("kind:") || search.startsWith("meta:")) views = [];
|
|
36
|
+
else if (search.startsWith("#")) {
|
|
37
|
+
const searchTag = search.slice(1);
|
|
38
|
+
views = views.filter((view) => view.tags.some((tag) => tag.toLocaleLowerCase().includes(searchTag)));
|
|
39
|
+
} else views = fuzzy(search);
|
|
42
40
|
}
|
|
43
41
|
return [
|
|
44
42
|
views,
|
|
@@ -46,7 +44,8 @@ const useFoundViews = () => {
|
|
|
46
44
|
currentViewId
|
|
47
45
|
];
|
|
48
46
|
}, [
|
|
49
|
-
|
|
47
|
+
allViews,
|
|
48
|
+
fuzzy,
|
|
50
49
|
search,
|
|
51
50
|
currentViewId
|
|
52
51
|
]);
|
|
@@ -96,6 +95,7 @@ function ViewButton({ className, view, loop = false, search, focusOnElement, cur
|
|
|
96
95
|
const ctx = useSearchContext();
|
|
97
96
|
const nextViewId = view.id;
|
|
98
97
|
const isCurrentView = nextViewId === currentViewId;
|
|
98
|
+
const label = viewTitleWithFolder(view);
|
|
99
99
|
const navigate = () => {
|
|
100
100
|
ctx.navigateTo(nextViewId, focusOnElement);
|
|
101
101
|
};
|
|
@@ -138,8 +138,9 @@ function ViewButton({ className, view, loop = false, search, focusOnElement, cur
|
|
|
138
138
|
component: "div",
|
|
139
139
|
highlight: search,
|
|
140
140
|
className: btn.title,
|
|
141
|
-
lineClamp:
|
|
142
|
-
|
|
141
|
+
lineClamp: 2,
|
|
142
|
+
title: label,
|
|
143
|
+
children: label
|
|
143
144
|
}), isCurrentView && /* @__PURE__ */ jsx(Badge, {
|
|
144
145
|
size: "xs",
|
|
145
146
|
fz: 9,
|
|
@@ -157,5 +158,4 @@ function ViewButton({ className, view, loop = false, search, focusOnElement, cur
|
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
//#endregion
|
|
161
161
|
export { NothingFound, ViewButton, ViewsColumn };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { focusable } from "./_shared.css.mjs";
|
|
2
2
|
import { css, cx } from "@likec4/styles/css";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/search/components/ViewsColumn.css.ts
|
|
5
5
|
const _viewBtn = "likec4-view-btn";
|
|
6
6
|
const viewButton = cx(css({
|
|
7
7
|
flexWrap: "nowrap",
|
|
@@ -15,5 +15,4 @@ const viewButtonDescription = css({
|
|
|
15
15
|
[`:where(.likec4-view-btn[data-disabled]) &`]: { opacity: "0.85" }
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
//#endregion
|
|
19
18
|
export { viewButton };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, sva } from "@likec4/styles/css";
|
|
2
2
|
import { emptyBox } from "@likec4/styles/recipes";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/search/components/_shared.css.ts
|
|
5
5
|
const buttonFocused = css.raw({
|
|
6
6
|
outline: "none",
|
|
7
7
|
background: "likec4.accent.8",
|
|
@@ -119,5 +119,4 @@ const buttonsva = sva({
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
//#endregion
|
|
123
122
|
export { buttonsva, focusable };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { focusable } from "./_shared.css.mjs";
|
|
2
2
|
import { css } from "@likec4/styles/css";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/search/components/styles.css.ts
|
|
5
5
|
const input = css({
|
|
6
6
|
border: "transparent",
|
|
7
7
|
background: {
|
|
@@ -52,5 +52,4 @@ const scrollArea = css({
|
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
//#endregion
|
|
56
55
|
export { input, pickview, pickviewBackdrop, pickviewGroup };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { createFuzzySearch } from "../fuzzy.mjs";
|
|
2
3
|
import { focusable } from "./_shared.css.mjs";
|
|
3
4
|
import { isFunction } from "remeda";
|
|
5
|
+
import { preferSummary } from "@likec4/core/types";
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
// src/search/components/utils.ts
|
|
6
8
|
function stopAndPrevent(e) {
|
|
7
9
|
e.stopPropagation();
|
|
8
10
|
e.preventDefault();
|
|
@@ -52,6 +54,33 @@ function queryAllFocusable(from, where, selector = `.${focusable}`) {
|
|
|
52
54
|
}
|
|
53
55
|
return [...root.querySelectorAll(`[data-likec4-search-${where}] ${selector}`)];
|
|
54
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Title of the view prefixed with the folders it belongs to, e.g. `Folder 1 / Folder 2 / View`.
|
|
59
|
+
* Views at the root are returned as is.
|
|
60
|
+
*/
|
|
61
|
+
function viewTitleWithFolder(view) {
|
|
62
|
+
if (view.folder.isRoot) return view.titleOrUntitled;
|
|
63
|
+
return [...view.folder.breadcrumbs.map((folder) => folder.title), view.titleOrUntitled].join(" / ");
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Fuzzy search over the views (see `createFuzzySearch`): matches the view id, its title with the folder path,
|
|
67
|
+
* and its summary or description.
|
|
68
|
+
*/
|
|
69
|
+
function createViewSearch(views) {
|
|
70
|
+
return createFuzzySearch(views, [
|
|
71
|
+
{
|
|
72
|
+
name: "id",
|
|
73
|
+
getFn: (view) => view.id
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "title",
|
|
77
|
+
getFn: (view) => viewTitleWithFolder(view)
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "description",
|
|
81
|
+
getFn: (view) => preferSummary(view.$view)?.md ?? ""
|
|
82
|
+
}
|
|
83
|
+
]);
|
|
84
|
+
}
|
|
55
85
|
|
|
56
|
-
|
|
57
|
-
export { centerY, focusToFirstFoundElement, moveFocusToSearchInput, queryAllFocusable, stopAndPrevent };
|
|
86
|
+
export { centerY, createViewSearch, focusToFirstFoundElement, moveFocusToSearchInput, queryAllFocusable, stopAndPrevent, viewTitleWithFolder };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import Fuse from "fuse.js";
|
|
3
|
+
|
|
4
|
+
// src/search/fuzzy.ts
|
|
5
|
+
/**
|
|
6
|
+
* Fuzzy search over `items`, with the same settings as the `search-element` tool of the MCP server:
|
|
7
|
+
* a word still matches with a typo ("chekout" finds "checkout") and it may match any of the `keys`.
|
|
8
|
+
*
|
|
9
|
+
* The index is built once. The returned function takes a search string and gives back the items that
|
|
10
|
+
* match every word of it, in their original order (the callers build a tree from the result).
|
|
11
|
+
*/
|
|
12
|
+
function createFuzzySearch(items, keys) {
|
|
13
|
+
const fuse = new Fuse(items, {
|
|
14
|
+
useExtendedSearch: true,
|
|
15
|
+
ignoreLocation: true,
|
|
16
|
+
threshold: .2,
|
|
17
|
+
keys
|
|
18
|
+
});
|
|
19
|
+
return (search) => {
|
|
20
|
+
const words = search.match(/[\p{L}\p{M}\p{N}_]+/gu);
|
|
21
|
+
if (!words) return [];
|
|
22
|
+
const found = new Set(fuse.search({ $and: words.map((word) => ({ $or: keys.map((key) => ({ [key.name]: word })) })) }).map((result) => result.item));
|
|
23
|
+
return items.filter((item) => found.has(item));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { createFuzzySearch };
|
package/dist/search/hooks.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { useSearchContext } from "./SearchContext.mjs";
|
|
3
3
|
import { useCallback, useDeferredValue } from "react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/search/hooks.ts
|
|
6
6
|
function useNormalizedSearch() {
|
|
7
7
|
const ctx = useSearchContext();
|
|
8
8
|
return useDeferredValue(ctx.normalizedSearch);
|
|
@@ -14,5 +14,4 @@ function useUpdateSearch() {
|
|
|
14
14
|
}, [setSearchValue]);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
//#endregion
|
|
18
17
|
export { useNormalizedSearch, useUpdateSearch };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
|
|
3
|
+
// src/search/metadata-search.ts
|
|
4
|
+
const METADATA_SEARCH_PREFIX = "meta:";
|
|
5
|
+
/**
|
|
6
|
+
* Builds a search query that finds elements with the given metadata key,
|
|
7
|
+
* and optionally the given value: `meta:key` or `meta:key=value`.
|
|
8
|
+
*/
|
|
9
|
+
function metadataSearchQuery(key, value) {
|
|
10
|
+
return value === void 0 ? `${METADATA_SEARCH_PREFIX}${key}` : `${METADATA_SEARCH_PREFIX}${key}=${value}`;
|
|
11
|
+
}
|
|
12
|
+
function metadataValues(value) {
|
|
13
|
+
if (Array.isArray(value)) return value.map(String);
|
|
14
|
+
if (typeof value === "string") return value.includes("\n") ? value.split("\n").map((s) => s.trim()).filter(Boolean) : [value];
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Checks if metadata matches a normalized (lowercased) `meta:` search.
|
|
19
|
+
* - `meta:key` matches elements having a key that includes `key`
|
|
20
|
+
* - `meta:key=value` matches elements having exactly `key`, with any value that includes `value`
|
|
21
|
+
*/
|
|
22
|
+
function matchesMetadataSearch(metadata, normalizedSearch) {
|
|
23
|
+
const query = normalizedSearch.slice(5);
|
|
24
|
+
if (query === "") return Object.keys(metadata).length > 0;
|
|
25
|
+
const eq = query.indexOf("=");
|
|
26
|
+
if (eq < 0) return Object.keys(metadata).some((key) => key.toLowerCase().includes(query));
|
|
27
|
+
const searchKey = query.slice(0, eq).trim();
|
|
28
|
+
const searchValue = query.slice(eq + 1).trim();
|
|
29
|
+
return Object.entries(metadata).some(([key, value]) => key.toLowerCase() === searchKey && (searchValue === "" || metadataValues(value).some((v) => v.toLowerCase().includes(searchValue))));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { METADATA_SEARCH_PREFIX, matchesMetadataSearch, metadataSearchQuery };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { Fqn, ViewId } from "@likec4/core/types";
|
|
3
3
|
import { ActorRef, SnapshotFrom, StateMachine } from "xstate";
|
|
4
|
-
//#region src/search/searchActor.d.ts
|
|
5
4
|
export type SearchActorEvent = {
|
|
6
5
|
type: 'open';
|
|
7
6
|
search?: string | undefined;
|
|
@@ -33,5 +32,4 @@ export interface SearchContext {
|
|
|
33
32
|
}
|
|
34
33
|
export interface SearchActorLogic extends StateMachine<SearchContext, SearchActorEvent, {}, any, any, any, any, 'inactive' | 'opened' | 'pickView' | 'waitAnimationEnd', never, never, any, any, any, any> {}
|
|
35
34
|
export type SearchActorSnapshot = SnapshotFrom<SearchActorLogic>;
|
|
36
|
-
export interface SearchActorRef extends ActorRef<SearchActorSnapshot, SearchActorEvent> {}
|
|
37
|
-
//#endregion
|
|
35
|
+
export interface SearchActorRef extends ActorRef<SearchActorSnapshot, SearchActorEvent> {}
|
|
@@ -2,7 +2,7 @@ import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { typedSystem } from "../likec4diagram/state/utils.mjs";
|
|
3
3
|
import { assertEvent, assign, enqueueActions, setup } from "xstate";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/search/searchActor.ts
|
|
6
6
|
const _searchActorLogic = setup({
|
|
7
7
|
types: {
|
|
8
8
|
context: {},
|
|
@@ -100,5 +100,4 @@ const _searchActorLogic = setup({
|
|
|
100
100
|
});
|
|
101
101
|
const searchActorLogic = _searchActorLogic;
|
|
102
102
|
|
|
103
|
-
//#endregion
|
|
104
103
|
export { searchActorLogic };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { FramerMotionConfig } from "../context/FramerMotionConfig.mjs";
|
|
2
3
|
import { useCallbackRef as useCallbackRef$1 } from "../hooks/useCallbackRef.mjs";
|
|
4
|
+
import { useId as useId$2 } from "../hooks/useId.mjs";
|
|
3
5
|
import { LikeC4MantineProvider } from "../LikeC4MantineProvider.mjs";
|
|
4
|
-
import { FramerMotionConfig } from "../context/FramerMotionConfig.mjs";
|
|
5
|
-
import { useId as useId$1 } from "../hooks/useId.mjs";
|
|
6
6
|
import styles_font_default from "../styles-font2.mjs";
|
|
7
7
|
import styles_default from "../styles2.mjs";
|
|
8
8
|
import { memo, useEffectEvent, useInsertionEffect, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -11,7 +11,7 @@ import { first, isDefined, isFunction, isString, once } from "remeda";
|
|
|
11
11
|
import { useColorScheme, useMutationObserverTarget } from "@mantine/hooks";
|
|
12
12
|
import { createPortal } from "react-dom";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/shadowroot/ShadowRoot.tsx
|
|
15
15
|
function useShadowRootStyle(instanceId, keepAspectRatio = false) {
|
|
16
16
|
if (keepAspectRatio === false) return `
|
|
17
17
|
:where([data-likec4-instance="${instanceId}"]) {
|
|
@@ -66,7 +66,7 @@ function useInjectLikeC4Font(injectFontCss, styleNonce) {
|
|
|
66
66
|
}
|
|
67
67
|
function ShadowRoot({ children, theme, injectFontCss = true, styleNonce, colorScheme: explicitColorScheme, keepAspectRatio = false, ...props }) {
|
|
68
68
|
const colorScheme = useColorScheme$1(explicitColorScheme);
|
|
69
|
-
const id = useId$
|
|
69
|
+
const id = useId$2();
|
|
70
70
|
const cssstyle = useShadowRootStyle(id, keepAspectRatio);
|
|
71
71
|
const mantineRootRef = useRef(null);
|
|
72
72
|
useInjectLikeC4Font(injectFontCss, styleNonce);
|
|
@@ -168,8 +168,10 @@ function scopeStylesToShadowRoot(styles) {
|
|
|
168
168
|
*/
|
|
169
169
|
const shadowScopedCSS = once(() => {
|
|
170
170
|
const scoped = scopeStylesToShadowRoot(styles_default);
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
if (import.meta.env.DEV) {
|
|
172
|
+
console.log("Shadow root scoped CSS:");
|
|
173
|
+
console.log(scoped);
|
|
174
|
+
}
|
|
173
175
|
return scoped;
|
|
174
176
|
});
|
|
175
177
|
/**
|
|
@@ -201,5 +203,4 @@ function useColorScheme$1(explicit) {
|
|
|
201
203
|
}
|
|
202
204
|
__name(useColorScheme$1, "useColorScheme");
|
|
203
205
|
|
|
204
|
-
//#endregion
|
|
205
206
|
export { ShadowRoot };
|
package/dist/styles-font2.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/styles-font.css?inline
|
|
2
2
|
var styles_font_default = "@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans:vf@latest/latin-wght-normal.woff2)format(\"woff2-variations\");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans:vf@latest/cyrillic-wght-normal.woff2)format(\"woff2-variations\");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans:vf@latest/cyrillic-ext-wght-normal.woff2)format(\"woff2-variations\");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans:vf@latest/greek-wght-normal.woff2)format(\"woff2-variations\");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans:vf@latest/latin-ext-wght-normal.woff2)format(\"woff2-variations\");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans:vf@latest/vietnamese-wght-normal.woff2)format(\"woff2-variations\");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}\n";
|
|
3
3
|
|
|
4
|
-
//#endregion
|
|
5
4
|
export { styles_font_default as default };
|