@likec4/diagram 1.59.4 → 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/custom/package.json +2 -2
- package/dist/LikeC4Diagram.d.mts +13 -0
- package/dist/LikeC4Diagram.mjs +174 -0
- package/dist/LikeC4Diagram.props.d.mts +295 -0
- package/dist/LikeC4MantineProvider.d.mts +25 -0
- package/dist/LikeC4MantineProvider.mjs +173 -0
- package/dist/LikeC4ModelProvider.d.mts +11 -0
- package/dist/LikeC4ModelProvider.mjs +16 -0
- package/dist/LikeC4ProjectsOverview.d.mts +10 -0
- package/dist/LikeC4ProjectsOverview.mjs +27 -0
- package/dist/LikeC4ProjectsProvider.d.mts +34 -0
- package/dist/LikeC4ProjectsProvider.mjs +36 -0
- package/dist/LikeC4Styles.d.mts +15 -0
- package/dist/LikeC4Styles.mjs +78 -0
- package/dist/LikeC4View.d.mts +285 -0
- package/dist/LikeC4View.mjs +154 -0
- package/dist/ReactLikeC4.d.mts +48 -0
- package/dist/ReactLikeC4.mjs +48 -0
- package/dist/StaticLikeC4Diagram.d.mts +12 -0
- package/dist/StaticLikeC4Diagram.mjs +39 -0
- package/dist/_virtual/_rolldown/runtime.mjs +21 -0
- package/dist/base/Background.mjs +31 -0
- package/dist/base/Base.d.mts +29 -0
- package/dist/base/Base.mjs +35 -0
- package/dist/base/BaseXYFlow.mjs +211 -0
- package/dist/base/const.d.mts +3 -0
- package/dist/base/const.mjs +22 -0
- package/dist/base/keyboardZoom.mjs +21 -0
- package/dist/base/types.d.mts +60 -0
- package/dist/base/updateEdges.mjs +35 -0
- package/dist/base/updateNodes.mjs +46 -0
- package/dist/base-primitives/Markdown.d.mts +34 -0
- package/dist/base-primitives/Markdown.mjs +48 -0
- package/dist/base-primitives/NodeHandles.d.mts +8 -0
- package/dist/base-primitives/NodeHandles.mjs +43 -0
- package/dist/base-primitives/compound/CompoundActionButton.d.mts +11 -0
- package/dist/base-primitives/compound/CompoundActionButton.mjs +56 -0
- package/dist/base-primitives/compound/CompoundDetailsButton.d.mts +11 -0
- package/dist/base-primitives/compound/CompoundDetailsButton.mjs +46 -0
- package/dist/base-primitives/compound/CompoundNodeContainer.d.mts +16 -0
- package/dist/base-primitives/compound/CompoundNodeContainer.mjs +48 -0
- package/dist/base-primitives/compound/CompoundTitle.d.mts +20 -0
- package/dist/base-primitives/compound/CompoundTitle.mjs +21 -0
- package/dist/base-primitives/compound/actionbtns.css.mjs +12 -0
- package/dist/base-primitives/edge/EdgeActionButton.d.mts +1 -0
- package/dist/base-primitives/edge/EdgeActionButton.mjs +22 -0
- package/dist/base-primitives/edge/EdgeContainer.d.mts +4 -0
- package/dist/base-primitives/edge/EdgeContainer.mjs +34 -0
- package/dist/base-primitives/edge/EdgeLabel.d.mts +5 -0
- package/dist/base-primitives/edge/EdgeLabel.mjs +46 -0
- package/dist/base-primitives/edge/EdgeLabelContainer.d.mts +4 -0
- package/dist/base-primitives/edge/EdgeLabelContainer.mjs +39 -0
- package/dist/base-primitives/edge/EdgeMarkers.d.mts +2 -0
- package/dist/base-primitives/edge/EdgeMarkers.mjs +162 -0
- package/dist/base-primitives/edge/EdgePath.d.mts +4 -0
- package/dist/base-primitives/edge/EdgePath.mjs +66 -0
- package/dist/base-primitives/element/ElementActionButtons.d.mts +44 -0
- package/dist/base-primitives/element/ElementActionButtons.mjs +99 -0
- package/dist/base-primitives/element/ElementData.d.mts +71 -0
- package/dist/base-primitives/element/ElementData.mjs +134 -0
- package/dist/base-primitives/element/ElementDetailsButton.d.mts +12 -0
- package/dist/base-primitives/element/ElementDetailsButton.mjs +86 -0
- package/dist/base-primitives/element/ElementNodeContainer.d.mts +22 -0
- package/dist/base-primitives/element/ElementNodeContainer.mjs +57 -0
- package/dist/base-primitives/element/ElementShape.d.mts +26 -0
- package/dist/base-primitives/element/ElementShape.mjs +474 -0
- package/dist/base-primitives/element/ElementTags.d.mts +22 -0
- package/dist/base-primitives/element/ElementTags.mjs +135 -0
- package/dist/base-primitives/index.d.mts +21 -0
- package/dist/base-primitives/memoEdge.d.mts +2 -0
- package/dist/base-primitives/memoEdge.mjs +16 -0
- package/dist/base-primitives/memoNode.d.mts +2 -0
- package/dist/components/EmptyBox.mjs +10 -0
- package/dist/components/ErrorFallback.d.mts +8 -0
- package/dist/components/ErrorFallback.mjs +120 -0
- package/dist/components/FloatingWindow.mjs +90 -0
- package/dist/components/GithubIcon.mjs +16 -0
- package/dist/components/Link.mjs +102 -0
- package/dist/components/Logo.d.mts +5 -0
- package/dist/components/Logo.mjs +34 -0
- package/dist/components/NavigationLink.mjs +18 -0
- package/dist/components/NavigationPanel.mjs +35 -0
- package/dist/components/PortalToContainer.d.mts +7 -0
- package/dist/components/PortalToContainer.mjs +20 -0
- package/dist/components/RootContainer.mjs +39 -0
- package/dist/components/SearchControl.css.mjs +68 -0
- package/dist/components/SearchControl.d.mts +5 -0
- package/dist/components/SearchControl.mjs +40 -0
- package/dist/components/ViewIcon.mjs +75 -0
- package/dist/components/ViewNotFound.mjs +28 -0
- 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 +16 -0
- package/dist/context/DiagramEventHandlers.mjs +47 -0
- package/dist/context/DiagramFeatures.d.mts +28 -0
- package/dist/context/DiagramFeatures.mjs +101 -0
- package/dist/context/EnsureMantine.mjs +17 -0
- package/dist/context/FramerMotionConfig.d.mts +9 -0
- package/dist/context/FramerMotionConfig.mjs +20 -0
- package/dist/context/IconRenderer.d.mts +22 -0
- package/dist/context/IconRenderer.mjs +179 -0
- package/dist/context/LikeC4ModelContext.d.mts +13 -0
- package/dist/context/LikeC4ModelContext.mjs +20 -0
- package/dist/context/LikeC4ProjectsContext.d.mts +7 -0
- package/dist/context/LikeC4ProjectsContext.mjs +11 -0
- package/dist/context/RootContainerContext.mjs +23 -0
- package/dist/context/TagStylesContext.d.mts +13 -0
- package/dist/context/TagStylesContext.mjs +66 -0
- package/dist/custom/builtins.d.mts +12 -0
- package/dist/custom/customNodes.d.mts +392 -0
- package/dist/custom/customNodes.mjs +620 -0
- package/dist/custom/index.d.mts +42 -0
- package/dist/custom/index.mjs +36 -0
- package/dist/custom/primitives.d.mts +14 -0
- 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 +42 -0
- package/dist/editor/LikeC4EditorCallbacks.mjs +11 -0
- package/dist/editor/LikeC4EditorProvider.d.mts +28 -0
- package/dist/editor/LikeC4EditorProvider.mjs +38 -0
- package/dist/editor/actor/actions.mjs +207 -0
- package/dist/editor/actor/hotkey.d.mts +6 -0
- package/dist/editor/actor/hotkey.mjs +28 -0
- package/dist/editor/actor/machine.d.mts +7 -0
- package/dist/editor/actor/machine.mjs +26 -0
- package/dist/editor/actor/setup.d.mts +58 -0
- package/dist/editor/actor/setup.mjs +43 -0
- package/dist/editor/actor/state.editor.mjs +57 -0
- package/dist/editor/actor/state.sync-queue.mjs +275 -0
- package/dist/editor/actor/types.d.mts +64 -0
- package/dist/editor/actor/types.mjs +6 -0
- package/dist/editor/applyChangesToManualLayout.mjs +168 -0
- package/dist/editor/index.d.mts +5 -0
- package/dist/editor/useEditorActorLogic.mjs +78 -0
- package/dist/hooks/safeContext.d.mts +109 -0
- package/dist/hooks/safeContext.mjs +73 -0
- package/dist/hooks/useCallbackRef.mjs +22 -0
- package/dist/hooks/useCurrentView.d.mts +12 -0
- package/dist/hooks/useCurrentView.mjs +31 -0
- package/dist/hooks/useCurrentViewModel.d.mts +10 -0
- package/dist/hooks/useCurrentViewModel.mjs +17 -0
- package/dist/hooks/useDiagram.d.mts +20 -0
- package/dist/hooks/useDiagram.mjs +60 -0
- package/dist/hooks/useDiagramCompareLayout.d.mts +52 -0
- package/dist/hooks/useDiagramCompareLayout.mjs +77 -0
- package/dist/hooks/useDiagramMarkdownRefActions.mjs +35 -0
- package/dist/hooks/useEdgeLabelFontLoader.mjs +29 -0
- package/dist/hooks/useEdgeTracks.mjs +90 -0
- package/dist/hooks/useEditorActor.mjs +26 -0
- package/dist/hooks/useId.mjs +10 -0
- package/dist/hooks/useLikeC4ElementsTree.mjs +29 -0
- package/dist/hooks/useLikeC4Model.d.mts +13 -0
- package/dist/hooks/useLikeC4Model.mjs +33 -0
- package/dist/hooks/useLikeC4Project.d.mts +27 -0
- package/dist/hooks/useLikeC4Project.mjs +57 -0
- package/dist/hooks/useLikeC4Styles.d.mts +3 -0
- package/dist/hooks/useLikeC4Styles.mjs +10 -0
- package/dist/hooks/useMantinePortalProps.mjs +14 -0
- package/dist/hooks/useSetState.mjs +25 -0
- package/dist/hooks/useUpdateEffect.d.mts +5 -0
- package/dist/hooks/useUpdateEffect.mjs +22 -0
- package/dist/hooks/useXYFlow.d.mts +10 -0
- package/dist/hooks/useXYFlow.mjs +27 -0
- package/dist/index.d.mts +35 -0
- package/dist/index.mjs +32 -0
- package/dist/likec4diagram/DiagramUI.mjs +59 -0
- package/dist/likec4diagram/DiagramXYFlow.mjs +287 -0
- package/dist/likec4diagram/convert-to-xyflow.mjs +59 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.mjs +27 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.mjs +450 -0
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.mjs +80 -0
- package/dist/likec4diagram/custom/edges/useControlPoints.mjs +40 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.mjs +40 -0
- package/dist/likec4diagram/custom/index.mjs +25 -0
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.mts +5 -0
- package/dist/likec4diagram/custom/nodes/CompoundActions.mjs +23 -0
- package/dist/likec4diagram/custom/nodes/ElementActions.d.mts +89 -0
- package/dist/likec4diagram/custom/nodes/ElementActions.mjs +146 -0
- package/dist/likec4diagram/custom/nodes/GraphElementNode.d.mts +6 -0
- package/dist/likec4diagram/custom/nodes/GraphElementNode.mjs +83 -0
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.mts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeDrifts.mjs +25 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.mjs +224 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.mts +4 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.mjs +152 -0
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.mts +3 -0
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.mjs +238 -0
- package/dist/likec4diagram/custom/nodes/index.d.mts +11 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.mts +21 -0
- package/dist/likec4diagram/custom/nodes/nodes.mjs +172 -0
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.mjs +159 -0
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.mts +4 -0
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.mjs +64 -0
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.mts +9 -0
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.mjs +116 -0
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.mts +9 -0
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.mjs +62 -0
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.mjs +105 -0
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.mjs +16 -0
- package/dist/likec4diagram/custom/nodes/toolbar/types.mjs +8 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.mjs +40 -0
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.mjs +541 -0
- package/dist/likec4diagram/relationship-popover/actor.mjs +119 -0
- package/dist/likec4diagram/relationship-popover/components.mjs +46 -0
- package/dist/likec4diagram/state/DiagramActorProvider.mjs +140 -0
- package/dist/likec4diagram/state/aligners.d.mts +5 -0
- package/dist/likec4diagram/state/aligners.mjs +293 -0
- package/dist/likec4diagram/state/assign.mjs +98 -0
- package/dist/likec4diagram/state/createViewChange.mjs +72 -0
- package/dist/likec4diagram/state/diagram-api.d.mts +190 -0
- package/dist/likec4diagram/state/diagram-api.mjs +386 -0
- package/dist/likec4diagram/state/hotkeyActor.d.mts +6 -0
- package/dist/likec4diagram/state/hotkeyActor.mjs +64 -0
- package/dist/likec4diagram/state/machine.actions.layout.mjs +175 -0
- package/dist/likec4diagram/state/machine.actions.mjs +837 -0
- package/dist/likec4diagram/state/machine.d.mts +166 -0
- package/dist/likec4diagram/state/machine.mjs +90 -0
- package/dist/likec4diagram/state/machine.setup.d.mts +380 -0
- package/dist/likec4diagram/state/machine.setup.mjs +197 -0
- package/dist/likec4diagram/state/machine.state.initializing.mjs +59 -0
- package/dist/likec4diagram/state/machine.state.navigating.mjs +202 -0
- package/dist/likec4diagram/state/machine.state.ready.comparing.mjs +63 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.mjs +79 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.mjs +111 -0
- package/dist/likec4diagram/state/machine.state.ready.mjs +154 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.mjs +41 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.mjs +261 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.mts +8 -0
- package/dist/likec4diagram/state/mediaPrintActor.mjs +23 -0
- package/dist/likec4diagram/state/persistence.mjs +31 -0
- package/dist/likec4diagram/state/types.d.mts +21 -0
- package/dist/likec4diagram/state/utils.mjs +168 -0
- package/dist/likec4diagram/types.d.mts +200 -0
- package/dist/likec4diagram/ui/FloatingSequenceActors.mjs +156 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.css.mjs +68 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.mjs +189 -0
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.mjs +82 -0
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.mjs +71 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.mjs +106 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.mjs +141 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.mjs +83 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.mjs +65 -0
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.mjs +53 -0
- package/dist/likec4diagram/ui/sequence-outline/StepRow.mjs +191 -0
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.mjs +90 -0
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.mjs +78 -0
- package/dist/likec4diagram/ui/sequence-outline/motion.mjs +21 -0
- package/dist/likec4diagram/ui/sequence-outline/presentation.mjs +86 -0
- package/dist/likec4diagram/ui/sequence-outline/tree.mjs +68 -0
- package/dist/likec4diagram/ui/sequence-outline/types.mjs +13 -0
- package/dist/likec4diagram/useLayoutConstraints.mjs +477 -0
- package/dist/likec4diagram/useNodeDragHandlers.mjs +28 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.mjs +282 -0
- package/dist/likec4diagram/xyflow-graph/graph-view-to-xy.mjs +175 -0
- package/dist/likec4diagram/xyflow-graph/useGraphForceSimulation.mjs +125 -0
- package/dist/likec4diagram/xyflow-props.mjs +25 -0
- package/dist/likec4diagram/xyflow-sequence/const.mjs +13 -0
- package/dist/likec4diagram/xyflow-sequence/layouter.mjs +565 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.mjs +288 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-view.mjs +145 -0
- package/dist/likec4diagram/xyflow-sequence/utils.mjs +96 -0
- package/dist/navigationpanel/ElementViewControls.mjs +50 -0
- package/dist/navigationpanel/NavigationPanel.mjs +95 -0
- package/dist/navigationpanel/NavigationPanelControls.mjs +93 -0
- package/dist/navigationpanel/NavigationPanelDropdown.mjs +378 -0
- package/dist/navigationpanel/_common.mjs +49 -0
- package/dist/navigationpanel/actor.actions.mjs +50 -0
- package/dist/navigationpanel/actor.d.mts +35 -0
- package/dist/navigationpanel/actor.mjs +96 -0
- package/dist/navigationpanel/actor.setup.d.mts +71 -0
- package/dist/navigationpanel/actor.setup.mjs +33 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.mjs +209 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.mjs +253 -0
- package/dist/navigationpanel/comparepanel/LayoutDriftFrame.mjs +57 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.mjs +32 -0
- package/dist/navigationpanel/controls/LayoutWarning.mjs +90 -0
- package/dist/navigationpanel/controls/LogoButton.mjs +32 -0
- package/dist/navigationpanel/controls/NavigationBreadcrumbs.mjs +110 -0
- package/dist/navigationpanel/controls/NavigationButtons.mjs +39 -0
- package/dist/navigationpanel/controls/OpenSource.mjs +27 -0
- package/dist/navigationpanel/controls/SearchControl.mjs +69 -0
- package/dist/navigationpanel/controls/ToggleReadonly.mjs +87 -0
- package/dist/navigationpanel/controls/ViewDetailsButton.mjs +121 -0
- package/dist/navigationpanel/dropdown/ProjectsMenu.mjs +118 -0
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.mjs +38 -0
- package/dist/navigationpanel/editorpanel/CenterCamera.mjs +20 -0
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.mjs +248 -0
- package/dist/navigationpanel/editorpanel/EditorPanel.mjs +64 -0
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.mjs +142 -0
- package/dist/navigationpanel/editorpanel/ToggleReadonly.mjs +23 -0
- package/dist/navigationpanel/editorpanel/_common.mjs +15 -0
- package/dist/navigationpanel/editorpanel/styles.mjs +57 -0
- package/dist/navigationpanel/hooks.mjs +31 -0
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.mjs +116 -0
- package/dist/navigationpanel/walkthrough/DynamicViewControls.mjs +80 -0
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.mjs +50 -0
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.mjs +80 -0
- package/dist/navigationpanel/windows/ViewDetailsWindow.mjs +389 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +37 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowFork.mjs +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowGuide.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.mjs +26 -0
- 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.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCornerDownRight.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.mjs +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.mjs +34 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.mjs +34 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.mjs +34 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.mjs +34 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.mjs +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.mjs +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.mjs +34 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRepeat.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRobot.mjs +50 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.mjs +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.mjs +26 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs +30 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +19 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs +38 -0
- package/dist/overlays/Overlays.mjs +112 -0
- package/dist/overlays/element-details/ElementDetails.mjs +26 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.mjs +266 -0
- package/dist/overlays/element-details/ElementDetailsCard.mjs +781 -0
- package/dist/overlays/element-details/MetadataValue.mjs +125 -0
- package/dist/overlays/element-details/PropertiesSplit.mjs +162 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.mjs +36 -0
- package/dist/overlays/element-details/TabPanelDeployments.mjs +191 -0
- package/dist/overlays/element-details/TabPanelRelationships.css.mjs +68 -0
- package/dist/overlays/element-details/TabPanelRelationships.mjs +162 -0
- package/dist/overlays/element-details/TabPanelStructure.css.mjs +29 -0
- package/dist/overlays/element-details/TabPanelStructure.mjs +95 -0
- package/dist/overlays/element-details/TabPanelViews.mjs +51 -0
- package/dist/overlays/element-details/actor.d.mts +33 -0
- package/dist/overlays/element-details/actor.mjs +68 -0
- package/dist/overlays/element-details/actorContext.mjs +16 -0
- package/dist/overlays/element-details/subject.d.mts +12 -0
- package/dist/overlays/element-details/subject.mjs +15 -0
- package/dist/overlays/hooks.mjs +6 -0
- package/dist/overlays/overlay/Overlay.d.mts +52 -0
- package/dist/overlays/overlay/Overlay.mjs +116 -0
- package/dist/overlays/overlaysActor.d.mts +56 -0
- package/dist/overlays/overlaysActor.mjs +250 -0
- package/dist/overlays/relationship-details/RelationshipDetails.mjs +294 -0
- package/dist/overlays/relationship-details/SelectEdge.css.mjs +76 -0
- package/dist/overlays/relationship-details/SelectEdge.mjs +150 -0
- package/dist/overlays/relationship-details/_types.d.mts +62 -0
- package/dist/overlays/relationship-details/actor.d.mts +107 -0
- package/dist/overlays/relationship-details/actor.mjs +250 -0
- package/dist/overlays/relationship-details/compute.d.mts +3 -0
- package/dist/overlays/relationship-details/compute.mjs +115 -0
- package/dist/overlays/relationship-details/custom/ElementActions.mjs +48 -0
- package/dist/overlays/relationship-details/custom/edgeTypes.mjs +42 -0
- package/dist/overlays/relationship-details/custom/nodeTypes.mjs +103 -0
- package/dist/overlays/relationship-details/hooks.mjs +53 -0
- package/dist/overlays/relationship-details/layout-to-xyflow.mjs +124 -0
- package/dist/overlays/relationship-details/layout.d.mts +25 -0
- package/dist/overlays/relationship-details/layout.mjs +313 -0
- package/dist/overlays/relationships-browser/RelationshipsBrowser.mjs +345 -0
- package/dist/overlays/relationships-browser/SelectElement.css.mjs +14 -0
- package/dist/overlays/relationships-browser/SelectElement.mjs +201 -0
- package/dist/overlays/relationships-browser/_types.d.mts +67 -0
- package/dist/overlays/relationships-browser/actor.d.mts +101 -0
- package/dist/overlays/relationships-browser/actor.mjs +378 -0
- package/dist/overlays/relationships-browser/const.mjs +9 -0
- package/dist/overlays/relationships-browser/custom/ElementActions.mjs +66 -0
- package/dist/overlays/relationships-browser/custom/EmptyNode.mjs +26 -0
- package/dist/overlays/relationships-browser/custom/edgeTypes.mjs +67 -0
- package/dist/overlays/relationships-browser/custom/nodeTypes.mjs +113 -0
- package/dist/overlays/relationships-browser/hooks.mjs +57 -0
- package/dist/overlays/relationships-browser/layout.d.mts +28 -0
- package/dist/overlays/relationships-browser/layout.mjs +477 -0
- package/dist/overlays/relationships-browser/useViewToNodesEdges.mjs +146 -0
- package/dist/overlays/types.d.mts +21 -0
- package/dist/projects-overview/ProjectsOverview.d.mts +13 -0
- package/dist/projects-overview/ProjectsOverview.mjs +60 -0
- package/dist/projects-overview/ProjectsOverviewXY.d.mts +12 -0
- package/dist/projects-overview/ProjectsOverviewXY.mjs +110 -0
- package/dist/projects-overview/actor.mjs +268 -0
- package/dist/projects-overview/context.mjs +12 -0
- package/dist/projects-overview/custom/edgeTypes.mjs +25 -0
- package/dist/projects-overview/custom/nodeTypes.mjs +42 -0
- package/dist/projects-overview/hooks.mjs +16 -0
- package/dist/projects-overview/index.d.mts +2 -0
- package/dist/projects-overview/layouted-to-xyflow.mjs +54 -0
- package/dist/projects-overview/panel/ProjectsOverviewPanel.mjs +10 -0
- package/dist/projects-overview/persistence.mjs +25 -0
- package/dist/search/Search.d.mts +9 -0
- package/dist/search/Search.mjs +202 -0
- package/dist/search/SearchContext.d.mts +21 -0
- package/dist/search/SearchContext.mjs +22 -0
- package/dist/search/XStateSearchAdapter.mjs +71 -0
- package/dist/search/components/ElementsColumn.css.mjs +53 -0
- package/dist/search/components/ElementsColumn.mjs +286 -0
- package/dist/search/components/PickView.mjs +119 -0
- package/dist/search/components/SearchByTags.mjs +80 -0
- package/dist/search/components/SearchInput.mjs +192 -0
- package/dist/search/components/ViewsColum.mjs +161 -0
- package/dist/search/components/ViewsColumn.css.mjs +18 -0
- package/dist/search/components/_shared.css.mjs +122 -0
- package/dist/search/components/styles.css.mjs +55 -0
- package/dist/search/components/utils.mjs +86 -0
- package/dist/search/fuzzy.mjs +27 -0
- package/dist/search/hooks.mjs +17 -0
- package/dist/search/metadata-search.mjs +32 -0
- package/dist/search/searchActor.d.mts +35 -0
- package/dist/search/searchActor.mjs +103 -0
- package/dist/shadowroot/ShadowRoot.mjs +206 -0
- package/dist/styles-font.css +1 -0
- package/dist/styles-font2.mjs +4 -0
- package/dist/styles-min.css +1 -0
- package/dist/styles-xyflow.css +1 -0
- package/dist/styles.css +1 -0
- package/dist/styles2.mjs +4 -0
- package/dist/utils/defineActors.d.mts +8 -0
- package/dist/utils/defineActors.mjs +14 -0
- package/dist/utils/edge-corners.mjs +125 -0
- package/dist/utils/edge-endpoints.mjs +41 -0
- package/dist/utils/edge-label.mjs +40 -0
- package/dist/utils/edge-path-through-label.mjs +51 -0
- package/dist/utils/edge-path.mjs +245 -0
- package/dist/utils/edge-tracks.mjs +140 -0
- package/dist/utils/filterProjects.d.mts +10 -0
- package/dist/utils/filterProjects.mjs +36 -0
- package/dist/utils/index.mjs +8 -0
- package/dist/utils/measure-edge-label.mjs +129 -0
- package/dist/utils/readableText.mjs +19 -0
- package/dist/utils/roundDpr.mjs +25 -0
- package/dist/utils/search-event.mjs +17 -0
- package/dist/utils/view-bounds.d.mts +8 -0
- package/dist/utils/view-bounds.mjs +56 -0
- package/dist/utils/view-routing.mjs +11 -0
- package/dist/utils/xyflow.mjs +173 -0
- package/dist/webcomponent/defineWebcomponent.d.mts +12 -0
- package/dist/webcomponent/defineWebcomponent.mjs +93 -0
- package/package.json +73 -66
- package/panda.buildinfo.json +223 -209
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
- package/dist/LikeC4Diagram.d.ts +0 -12
- package/dist/LikeC4Diagram.js +0 -170
- package/dist/LikeC4Diagram.props.d.ts +0 -293
- package/dist/LikeC4MantineProvider.d.ts +0 -24
- package/dist/LikeC4MantineProvider.js +0 -156
- package/dist/LikeC4ModelProvider.d.ts +0 -10
- package/dist/LikeC4ModelProvider.js +0 -15
- package/dist/LikeC4ProjectsOverview.d.ts +0 -8
- package/dist/LikeC4ProjectsOverview.js +0 -26
- package/dist/LikeC4ProjectsProvider.d.ts +0 -33
- package/dist/LikeC4ProjectsProvider.js +0 -35
- package/dist/LikeC4Styles.d.ts +0 -14
- package/dist/LikeC4Styles.js +0 -71
- package/dist/LikeC4View.d.ts +0 -284
- package/dist/LikeC4View.js +0 -151
- package/dist/ReactLikeC4.d.ts +0 -47
- package/dist/ReactLikeC4.js +0 -45
- package/dist/StaticLikeC4Diagram.d.ts +0 -11
- package/dist/StaticLikeC4Diagram.js +0 -38
- package/dist/_virtual/_rolldown/runtime.js +0 -17
- package/dist/base/Background.d.ts +0 -8
- package/dist/base/Background.js +0 -30
- package/dist/base/Base.d.ts +0 -29
- package/dist/base/Base.js +0 -34
- package/dist/base/BaseXYFlow.d.ts +0 -16
- package/dist/base/BaseXYFlow.js +0 -207
- package/dist/base/const.d.ts +0 -20
- package/dist/base/const.js +0 -22
- package/dist/base/index.d.ts +0 -7
- package/dist/base/keyboardZoom.d.ts +0 -3
- package/dist/base/keyboardZoom.js +0 -20
- package/dist/base/types.d.ts +0 -66
- package/dist/base/updateEdges.d.ts +0 -3
- package/dist/base/updateEdges.js +0 -34
- package/dist/base/updateNodes.d.ts +0 -17
- package/dist/base/updateNodes.js +0 -45
- package/dist/base-primitives/Markdown.d.ts +0 -59
- package/dist/base-primitives/Markdown.js +0 -35
- package/dist/base-primitives/NodeHandles.d.ts +0 -7
- package/dist/base-primitives/NodeHandles.js +0 -42
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +0 -10
- package/dist/base-primitives/compound/CompoundActionButton.js +0 -55
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +0 -10
- package/dist/base-primitives/compound/CompoundDetailsButton.js +0 -45
- package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +0 -15
- package/dist/base-primitives/compound/CompoundNodeContainer.js +0 -47
- package/dist/base-primitives/compound/CompoundTitle.d.ts +0 -19
- package/dist/base-primitives/compound/CompoundTitle.js +0 -20
- package/dist/base-primitives/compound/actionbtns.css.d.ts +0 -11
- package/dist/base-primitives/compound/actionbtns.css.js +0 -11
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +0 -8
- package/dist/base-primitives/edge/EdgeActionButton.js +0 -21
- package/dist/base-primitives/edge/EdgeContainer.d.ts +0 -11
- package/dist/base-primitives/edge/EdgeContainer.js +0 -33
- package/dist/base-primitives/edge/EdgeLabel.d.ts +0 -15
- package/dist/base-primitives/edge/EdgeLabel.js +0 -44
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +0 -19
- package/dist/base-primitives/edge/EdgeLabelContainer.js +0 -38
- package/dist/base-primitives/edge/EdgeMarkers.d.ts +0 -14
- package/dist/base-primitives/edge/EdgeMarkers.js +0 -161
- package/dist/base-primitives/edge/EdgePath.d.ts +0 -17
- package/dist/base-primitives/edge/EdgePath.js +0 -65
- package/dist/base-primitives/element/ElementActionButtons.d.ts +0 -43
- package/dist/base-primitives/element/ElementActionButtons.js +0 -98
- package/dist/base-primitives/element/ElementData.d.ts +0 -67
- package/dist/base-primitives/element/ElementData.js +0 -127
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +0 -11
- package/dist/base-primitives/element/ElementDetailsButton.js +0 -85
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +0 -22
- package/dist/base-primitives/element/ElementNodeContainer.js +0 -55
- package/dist/base-primitives/element/ElementShape.d.ts +0 -18
- package/dist/base-primitives/element/ElementShape.js +0 -367
- package/dist/base-primitives/element/ElementTags.d.ts +0 -21
- package/dist/base-primitives/element/ElementTags.js +0 -135
- package/dist/base-primitives/index.d.ts +0 -20
- package/dist/base-primitives/memoEdge.d.ts +0 -3
- package/dist/base-primitives/memoEdge.js +0 -15
- package/dist/base-primitives/memoNode.d.ts +0 -3
- package/dist/base-primitives/memoNode.js +0 -21
- package/dist/components/EmptyBox.d.ts +0 -3
- package/dist/components/EmptyBox.js +0 -9
- package/dist/components/ErrorFallback.d.ts +0 -3
- package/dist/components/ErrorFallback.js +0 -113
- package/dist/components/FloatingWindow.d.ts +0 -18
- package/dist/components/FloatingWindow.js +0 -89
- package/dist/components/GithubIcon.d.ts +0 -2
- package/dist/components/GithubIcon.js +0 -15
- package/dist/components/Link.d.ts +0 -6
- package/dist/components/Link.js +0 -100
- package/dist/components/Logo.d.ts +0 -5
- package/dist/components/Logo.js +0 -39
- package/dist/components/NavigationLink.d.ts +0 -6
- package/dist/components/NavigationLink.js +0 -17
- package/dist/components/NavigationPanel.d.ts +0 -11
- package/dist/components/NavigationPanel.js +0 -28
- package/dist/components/PortalToContainer.d.ts +0 -6
- package/dist/components/PortalToContainer.js +0 -19
- package/dist/components/RootContainer.d.ts +0 -6
- package/dist/components/RootContainer.js +0 -38
- package/dist/components/SearchControl.css.d.ts +0 -3
- package/dist/components/SearchControl.css.js +0 -67
- package/dist/components/SearchControl.d.ts +0 -5
- package/dist/components/SearchControl.js +0 -39
- package/dist/components/ViewIcon.d.ts +0 -11
- package/dist/components/ViewIcon.js +0 -71
- package/dist/components/ViewNotFound.d.ts +0 -5
- package/dist/components/ViewNotFound.js +0 -27
- package/dist/context/CurrentViewModelProvider.d.ts +0 -2
- package/dist/context/CurrentViewModelProvider.js +0 -15
- package/dist/context/DiagramEventHandlers.d.ts +0 -15
- package/dist/context/DiagramEventHandlers.js +0 -53
- package/dist/context/DiagramFeatures.d.ts +0 -53
- package/dist/context/DiagramFeatures.js +0 -93
- package/dist/context/EnsureMantine.d.ts +0 -4
- package/dist/context/EnsureMantine.js +0 -16
- package/dist/context/FramerMotionConfig.d.ts +0 -8
- package/dist/context/FramerMotionConfig.js +0 -19
- package/dist/context/IconRenderer.d.ts +0 -40
- package/dist/context/IconRenderer.js +0 -169
- package/dist/context/LikeC4ModelContext.d.ts +0 -15
- package/dist/context/LikeC4ModelContext.js +0 -19
- package/dist/context/LikeC4ProjectsContext.d.ts +0 -9
- package/dist/context/LikeC4ProjectsContext.js +0 -10
- package/dist/context/RootContainerContext.d.ts +0 -19
- package/dist/context/RootContainerContext.js +0 -22
- package/dist/context/TagStylesContext.d.ts +0 -15
- package/dist/context/TagStylesContext.js +0 -76
- package/dist/context/index.d.ts +0 -7
- package/dist/custom/builtins.d.ts +0 -1
- package/dist/custom/customNodes.d.ts +0 -233
- package/dist/custom/customNodes.js +0 -239
- package/dist/custom/hooks.d.ts +0 -11
- package/dist/custom/index.d.ts +0 -19
- package/dist/custom/index.js +0 -44
- package/dist/custom/primitives.d.ts +0 -1
- package/dist/editor/LikeC4EditorCallbacks.d.ts +0 -42
- package/dist/editor/LikeC4EditorCallbacks.js +0 -10
- package/dist/editor/LikeC4EditorProvider.d.ts +0 -34
- package/dist/editor/LikeC4EditorProvider.js +0 -37
- package/dist/editor/actor/actions.d.ts +0 -174
- package/dist/editor/actor/actions.js +0 -188
- package/dist/editor/actor/hotkey.d.ts +0 -7
- package/dist/editor/actor/hotkey.js +0 -27
- package/dist/editor/actor/machine.d.ts +0 -9
- package/dist/editor/actor/machine.js +0 -23
- package/dist/editor/actor/setup.d.ts +0 -70
- package/dist/editor/actor/setup.js +0 -42
- package/dist/editor/actor/state.editor.d.ts +0 -147
- package/dist/editor/actor/state.editor.js +0 -56
- package/dist/editor/actor/state.sync-queue.d.ts +0 -612
- package/dist/editor/actor/state.sync-queue.js +0 -273
- package/dist/editor/actor/types.d.ts +0 -64
- package/dist/editor/actor/types.js +0 -5
- package/dist/editor/applyChangesToManualLayout.d.ts +0 -8
- package/dist/editor/applyChangesToManualLayout.js +0 -167
- package/dist/editor/index.d.ts +0 -5
- package/dist/editor/useEditorActorLogic.d.ts +0 -8
- package/dist/editor/useEditorActorLogic.js +0 -74
- package/dist/hooks/index.d.ts +0 -14
- package/dist/hooks/safeContext.d.ts +0 -168
- package/dist/hooks/safeContext.js +0 -72
- package/dist/hooks/useCallbackRef.d.ts +0 -7
- package/dist/hooks/useCallbackRef.js +0 -21
- package/dist/hooks/useCurrentView.d.ts +0 -11
- package/dist/hooks/useCurrentView.js +0 -21
- package/dist/hooks/useCurrentViewModel.d.ts +0 -10
- package/dist/hooks/useCurrentViewModel.js +0 -16
- package/dist/hooks/useDiagram.d.ts +0 -42
- package/dist/hooks/useDiagram.js +0 -57
- package/dist/hooks/useDiagramCompareLayout.d.ts +0 -53
- package/dist/hooks/useDiagramCompareLayout.js +0 -84
- package/dist/hooks/useEditorActor.d.ts +0 -9
- package/dist/hooks/useEditorActor.js +0 -25
- package/dist/hooks/useId.d.ts +0 -1
- package/dist/hooks/useId.js +0 -9
- package/dist/hooks/useLikeC4ElementsTree.d.ts +0 -14
- package/dist/hooks/useLikeC4ElementsTree.js +0 -28
- package/dist/hooks/useLikeC4Model.d.ts +0 -12
- package/dist/hooks/useLikeC4Model.js +0 -32
- package/dist/hooks/useLikeC4Project.d.ts +0 -26
- package/dist/hooks/useLikeC4Project.js +0 -56
- package/dist/hooks/useLikeC4Styles.d.ts +0 -2
- package/dist/hooks/useLikeC4Styles.js +0 -9
- package/dist/hooks/useMantinePortalProps.d.ts +0 -9
- package/dist/hooks/useMantinePortalProps.js +0 -13
- package/dist/hooks/useMediaPrint.d.ts +0 -4
- package/dist/hooks/useOverlaysActor.d.ts +0 -2
- package/dist/hooks/useReducedGraphics.d.ts +0 -1
- package/dist/hooks/useSearchActor.d.ts +0 -2
- package/dist/hooks/useSetState.d.ts +0 -7
- package/dist/hooks/useSetState.js +0 -24
- package/dist/hooks/useUpdateEffect.d.ts +0 -4
- package/dist/hooks/useUpdateEffect.js +0 -21
- package/dist/hooks/useXYFlow.d.ts +0 -23
- package/dist/hooks/useXYFlow.js +0 -26
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -28
- package/dist/likec4diagram/DiagramUI.d.ts +0 -2
- package/dist/likec4diagram/DiagramUI.js +0 -54
- package/dist/likec4diagram/DiagramXYFlow.d.ts +0 -12
- package/dist/likec4diagram/DiagramXYFlow.js +0 -274
- package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -12
- package/dist/likec4diagram/convert-to-xyflow.js +0 -43
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +0 -6
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +0 -24
- package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +0 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +0 -401
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +0 -2
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +0 -79
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +0 -3
- package/dist/likec4diagram/custom/edges/edges.css.js +0 -48
- package/dist/likec4diagram/custom/edges/useControlPoints.d.ts +0 -8
- package/dist/likec4diagram/custom/edges/useControlPoints.js +0 -54
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +0 -10
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +0 -57
- package/dist/likec4diagram/custom/edges/utils.d.ts +0 -10
- package/dist/likec4diagram/custom/index.d.ts +0 -17
- package/dist/likec4diagram/custom/index.js +0 -22
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +0 -4
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +0 -22
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +0 -87
- package/dist/likec4diagram/custom/nodes/ElementActions.js +0 -144
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +0 -5
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +0 -22
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +0 -6
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +0 -224
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +0 -3
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +0 -151
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.ts +0 -2
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +0 -237
- package/dist/likec4diagram/custom/nodes/index.d.ts +0 -11
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +0 -19
- package/dist/likec4diagram/custom/nodes/nodes.js +0 -172
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +0 -22
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +0 -158
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +0 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +0 -63
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +0 -8
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +0 -114
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +0 -8
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +0 -62
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +0 -18
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +0 -103
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.d.ts +0 -1
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +0 -15
- package/dist/likec4diagram/custom/nodes/toolbar/types.d.ts +0 -5
- package/dist/likec4diagram/custom/nodes/toolbar/types.js +0 -8
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.d.ts +0 -8
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.js +0 -39
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +0 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +0 -522
- package/dist/likec4diagram/relationship-popover/actor.d.ts +0 -75
- package/dist/likec4diagram/relationship-popover/actor.js +0 -116
- package/dist/likec4diagram/relationship-popover/components.d.ts +0 -7
- package/dist/likec4diagram/relationship-popover/components.js +0 -45
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +0 -19
- package/dist/likec4diagram/state/DiagramActorProvider.js +0 -148
- package/dist/likec4diagram/state/aligners.d.ts +0 -45
- package/dist/likec4diagram/state/aligners.js +0 -292
- package/dist/likec4diagram/state/assign.d.ts +0 -26
- package/dist/likec4diagram/state/assign.js +0 -97
- package/dist/likec4diagram/state/createViewChange.d.ts +0 -3
- package/dist/likec4diagram/state/createViewChange.js +0 -71
- package/dist/likec4diagram/state/diagram-api.d.ts +0 -162
- package/dist/likec4diagram/state/diagram-api.js +0 -338
- package/dist/likec4diagram/state/hotkeyActor.d.ts +0 -7
- package/dist/likec4diagram/state/hotkeyActor.js +0 -56
- package/dist/likec4diagram/state/inspector.d.ts +0 -4
- package/dist/likec4diagram/state/machine.actions.d.ts +0 -2560
- package/dist/likec4diagram/state/machine.actions.js +0 -790
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +0 -579
- package/dist/likec4diagram/state/machine.actions.layout.js +0 -174
- package/dist/likec4diagram/state/machine.d.ts +0 -161
- package/dist/likec4diagram/state/machine.js +0 -79
- package/dist/likec4diagram/state/machine.setup.d.ts +0 -445
- package/dist/likec4diagram/state/machine.setup.js +0 -167
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +0 -208
- package/dist/likec4diagram/state/machine.state.initializing.js +0 -58
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +0 -14
- package/dist/likec4diagram/state/machine.state.navigating.js +0 -199
- package/dist/likec4diagram/state/machine.state.ready.d.ts +0 -4360
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +0 -696
- package/dist/likec4diagram/state/machine.state.ready.focused.js +0 -74
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +0 -585
- package/dist/likec4diagram/state/machine.state.ready.idle.js +0 -106
- package/dist/likec4diagram/state/machine.state.ready.js +0 -135
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +0 -128
- package/dist/likec4diagram/state/machine.state.ready.printing.js +0 -40
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +0 -944
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +0 -260
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +0 -12
- package/dist/likec4diagram/state/mediaPrintActor.js +0 -22
- package/dist/likec4diagram/state/persistence.d.ts +0 -5
- package/dist/likec4diagram/state/persistence.js +0 -22
- package/dist/likec4diagram/state/types.d.ts +0 -23
- package/dist/likec4diagram/state/utils.d.ts +0 -73
- package/dist/likec4diagram/state/utils.js +0 -166
- package/dist/likec4diagram/types.d.ts +0 -190
- package/dist/likec4diagram/ui/FloatingSequenceActors.d.ts +0 -6
- package/dist/likec4diagram/ui/FloatingSequenceActors.js +0 -156
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +0 -2
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +0 -61
- package/dist/likec4diagram/ui/index.d.ts +0 -4
- package/dist/likec4diagram/ui/notation/NotationPanel.css.d.ts +0 -7
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +0 -67
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +0 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +0 -187
- package/dist/likec4diagram/ui/notation/index.d.ts +0 -1
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.d.ts +0 -9
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.js +0 -81
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.d.ts +0 -11
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.js +0 -70
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.d.ts +0 -2
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.js +0 -106
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.d.ts +0 -2
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.js +0 -140
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.d.ts +0 -17
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.js +0 -83
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +0 -6
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +0 -64
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.d.ts +0 -8
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.js +0 -52
- package/dist/likec4diagram/ui/sequence-outline/StepRow.d.ts +0 -7
- package/dist/likec4diagram/ui/sequence-outline/StepRow.js +0 -190
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.d.ts +0 -238
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.js +0 -94
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.d.ts +0 -21
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.js +0 -71
- package/dist/likec4diagram/ui/sequence-outline/index.d.ts +0 -2
- package/dist/likec4diagram/ui/sequence-outline/motion.d.ts +0 -13
- package/dist/likec4diagram/ui/sequence-outline/motion.js +0 -21
- package/dist/likec4diagram/ui/sequence-outline/presentation.d.ts +0 -10
- package/dist/likec4diagram/ui/sequence-outline/presentation.js +0 -80
- package/dist/likec4diagram/ui/sequence-outline/tree.d.ts +0 -9
- package/dist/likec4diagram/ui/sequence-outline/tree.js +0 -67
- package/dist/likec4diagram/ui/sequence-outline/types.d.ts +0 -38
- package/dist/likec4diagram/ui/sequence-outline/types.js +0 -12
- package/dist/likec4diagram/useLayoutConstraints.d.ts +0 -54
- package/dist/likec4diagram/useLayoutConstraints.js +0 -409
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -18
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +0 -273
- package/dist/likec4diagram/xyflow-sequence/_types.d.ts +0 -91
- package/dist/likec4diagram/xyflow-sequence/const.d.ts +0 -17
- package/dist/likec4diagram/xyflow-sequence/const.js +0 -13
- package/dist/likec4diagram/xyflow-sequence/layouter.d.ts +0 -70
- package/dist/likec4diagram/xyflow-sequence/layouter.js +0 -564
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.d.ts +0 -17
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.js +0 -287
- package/dist/likec4diagram/xyflow-sequence/sequence-view.d.ts +0 -2
- package/dist/likec4diagram/xyflow-sequence/sequence-view.js +0 -144
- package/dist/likec4diagram/xyflow-sequence/utils.d.ts +0 -22
- package/dist/likec4diagram/xyflow-sequence/utils.js +0 -95
- package/dist/navigationpanel/NavigationPanel.d.ts +0 -5
- package/dist/navigationpanel/NavigationPanel.js +0 -121
- package/dist/navigationpanel/NavigationPanelControls.d.ts +0 -2
- package/dist/navigationpanel/NavigationPanelControls.js +0 -167
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +0 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +0 -372
- package/dist/navigationpanel/_common.d.ts +0 -9
- package/dist/navigationpanel/_common.js +0 -49
- package/dist/navigationpanel/actor.actions.d.ts +0 -19
- package/dist/navigationpanel/actor.actions.js +0 -46
- package/dist/navigationpanel/actor.d.ts +0 -38
- package/dist/navigationpanel/actor.js +0 -93
- package/dist/navigationpanel/actor.setup.d.ts +0 -98
- package/dist/navigationpanel/actor.setup.js +0 -32
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +0 -5
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +0 -66
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +0 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +0 -137
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +0 -1
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +0 -54
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +0 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +0 -220
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +0 -5
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +0 -35
- package/dist/navigationpanel/comparepanel/index.d.ts +0 -1
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +0 -2
- package/dist/navigationpanel/controls/LayoutWarning.js +0 -89
- package/dist/navigationpanel/controls/LogoButton.d.ts +0 -1
- package/dist/navigationpanel/controls/LogoButton.js +0 -48
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +0 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +0 -37
- package/dist/navigationpanel/controls/OpenSource.d.ts +0 -1
- package/dist/navigationpanel/controls/OpenSource.js +0 -26
- package/dist/navigationpanel/controls/SearchControl.d.ts +0 -1
- package/dist/navigationpanel/controls/SearchControl.js +0 -68
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +0 -4
- package/dist/navigationpanel/controls/ToggleReadonly.js +0 -69
- package/dist/navigationpanel/controls/ViewDetailsButton.d.ts +0 -5
- package/dist/navigationpanel/controls/ViewDetailsButton.js +0 -121
- package/dist/navigationpanel/controls/index.d.ts +0 -7
- package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +0 -2
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +0 -83
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.d.ts +0 -4
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.js +0 -37
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.js +0 -19
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +0 -188
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.js +0 -62
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +0 -4
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +0 -134
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +0 -22
- package/dist/navigationpanel/editorpanel/_common.d.ts +0 -3
- package/dist/navigationpanel/editorpanel/_common.js +0 -14
- package/dist/navigationpanel/editorpanel/index.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/styles.d.ts +0 -8
- package/dist/navigationpanel/editorpanel/styles.js +0 -55
- package/dist/navigationpanel/hooks.d.ts +0 -39
- package/dist/navigationpanel/hooks.js +0 -30
- package/dist/navigationpanel/index.d.ts +0 -1
- package/dist/navigationpanel/styles.css.d.ts +0 -16
- package/dist/navigationpanel/styles.css.js +0 -21
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +0 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +0 -113
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +0 -293
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +0 -80
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.d.ts +0 -1
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.js +0 -49
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.css.d.ts +0 -2
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +0 -2
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +0 -79
- package/dist/navigationpanel/walkthrough/index.d.ts +0 -2
- package/dist/navigationpanel/windows/ViewDetailsWindow.d.ts +0 -1
- package/dist/navigationpanel/windows/ViewDetailsWindow.js +0 -379
- package/dist/overlays/Overlays.d.ts +0 -6
- package/dist/overlays/Overlays.js +0 -111
- package/dist/overlays/element-details/ElementDetails.d.ts +0 -6
- package/dist/overlays/element-details/ElementDetails.js +0 -25
- package/dist/overlays/element-details/ElementDetailsCard.css.d.ts +0 -16
- package/dist/overlays/element-details/ElementDetailsCard.css.js +0 -218
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +0 -11
- package/dist/overlays/element-details/ElementDetailsCard.js +0 -528
- package/dist/overlays/element-details/MetadataValue.d.ts +0 -10
- package/dist/overlays/element-details/MetadataValue.js +0 -220
- package/dist/overlays/element-details/TabPanelDeployments.css.d.ts +0 -4
- package/dist/overlays/element-details/TabPanelDeployments.css.js +0 -35
- package/dist/overlays/element-details/TabPanelDeployments.d.ts +0 -7
- package/dist/overlays/element-details/TabPanelDeployments.js +0 -188
- package/dist/overlays/element-details/TabPanelRelationships.css.d.ts +0 -5
- package/dist/overlays/element-details/TabPanelRelationships.css.js +0 -67
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +0 -7
- package/dist/overlays/element-details/TabPanelRelationships.js +0 -159
- package/dist/overlays/element-details/TabPanelStructure.css.d.ts +0 -2
- package/dist/overlays/element-details/TabPanelStructure.css.js +0 -28
- package/dist/overlays/element-details/TabPanelStructure.d.ts +0 -25
- package/dist/overlays/element-details/TabPanelStructure.js +0 -94
- package/dist/overlays/element-details/actor.d.ts +0 -34
- package/dist/overlays/element-details/actor.js +0 -48
- package/dist/overlays/element-details/actorContext.d.ts +0 -7
- package/dist/overlays/element-details/actorContext.js +0 -15
- package/dist/overlays/hooks.d.ts +0 -30
- package/dist/overlays/hooks.js +0 -5
- package/dist/overlays/overlay/Overlay.d.ts +0 -51
- package/dist/overlays/overlay/Overlay.js +0 -115
- package/dist/overlays/overlaysActor.d.ts +0 -49
- package/dist/overlays/overlaysActor.js +0 -229
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
- package/dist/overlays/relationship-details/RelationshipDetails.js +0 -282
- package/dist/overlays/relationship-details/SelectEdge.css.d.ts +0 -8
- package/dist/overlays/relationship-details/SelectEdge.css.js +0 -75
- package/dist/overlays/relationship-details/SelectEdge.d.ts +0 -5
- package/dist/overlays/relationship-details/SelectEdge.js +0 -148
- package/dist/overlays/relationship-details/_types.d.ts +0 -57
- package/dist/overlays/relationship-details/actor.d.ts +0 -109
- package/dist/overlays/relationship-details/actor.js +0 -248
- package/dist/overlays/relationship-details/compute.d.ts +0 -13
- package/dist/overlays/relationship-details/compute.js +0 -114
- package/dist/overlays/relationship-details/custom/ElementActions.d.ts +0 -2
- package/dist/overlays/relationship-details/custom/ElementActions.js +0 -45
- package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +0 -3
- package/dist/overlays/relationship-details/custom/edgeTypes.js +0 -45
- package/dist/overlays/relationship-details/custom/index.d.ts +0 -2
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +0 -9
- package/dist/overlays/relationship-details/custom/nodeTypes.js +0 -99
- package/dist/overlays/relationship-details/custom/styles.css.d.ts +0 -1
- package/dist/overlays/relationship-details/hooks.d.ts +0 -40
- package/dist/overlays/relationship-details/hooks.js +0 -52
- package/dist/overlays/relationship-details/layout-to-xyflow.d.ts +0 -12
- package/dist/overlays/relationship-details/layout-to-xyflow.js +0 -122
- package/dist/overlays/relationship-details/layout.d.ts +0 -25
- package/dist/overlays/relationship-details/layout.js +0 -285
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -11
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +0 -339
- package/dist/overlays/relationships-browser/SelectElement.css.d.ts +0 -3
- package/dist/overlays/relationships-browser/SelectElement.css.js +0 -13
- package/dist/overlays/relationships-browser/SelectElement.d.ts +0 -2
- package/dist/overlays/relationships-browser/SelectElement.js +0 -199
- package/dist/overlays/relationships-browser/_types.d.ts +0 -64
- package/dist/overlays/relationships-browser/actor.d.ts +0 -113
- package/dist/overlays/relationships-browser/actor.js +0 -376
- package/dist/overlays/relationships-browser/const.d.ts +0 -6
- package/dist/overlays/relationships-browser/const.js +0 -9
- package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +0 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.js +0 -63
- package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +0 -2
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +0 -25
- package/dist/overlays/relationships-browser/custom/edgeTypes.d.ts +0 -3
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +0 -68
- package/dist/overlays/relationships-browser/custom/index.d.ts +0 -3
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +0 -9
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +0 -106
- package/dist/overlays/relationships-browser/hooks.d.ts +0 -18
- package/dist/overlays/relationships-browser/hooks.js +0 -56
- package/dist/overlays/relationships-browser/layout.d.ts +0 -29
- package/dist/overlays/relationships-browser/layout.js +0 -426
- package/dist/overlays/relationships-browser/useViewToNodesEdges.d.ts +0 -10
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -144
- package/dist/overlays/types.d.ts +0 -28
- package/dist/projects-overview/ProjectsOverview.d.ts +0 -13
- package/dist/projects-overview/ProjectsOverview.js +0 -59
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +0 -13
- package/dist/projects-overview/ProjectsOverviewXY.js +0 -109
- package/dist/projects-overview/_types.d.ts +0 -34
- package/dist/projects-overview/actor.d.ts +0 -115
- package/dist/projects-overview/actor.js +0 -266
- package/dist/projects-overview/context.d.ts +0 -4
- package/dist/projects-overview/context.js +0 -11
- package/dist/projects-overview/custom/edgeTypes.d.ts +0 -3
- package/dist/projects-overview/custom/edgeTypes.js +0 -24
- package/dist/projects-overview/custom/index.d.ts +0 -2
- package/dist/projects-overview/custom/nodeTypes.d.ts +0 -2
- package/dist/projects-overview/custom/nodeTypes.js +0 -41
- package/dist/projects-overview/custom/styles.css.d.ts +0 -1
- package/dist/projects-overview/hooks.d.ts +0 -5
- package/dist/projects-overview/hooks.js +0 -15
- package/dist/projects-overview/index.d.ts +0 -1
- package/dist/projects-overview/layouted-to-xyflow.d.ts +0 -6
- package/dist/projects-overview/layouted-to-xyflow.js +0 -53
- package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +0 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.js +0 -9
- package/dist/projects-overview/persistence.d.ts +0 -5
- package/dist/projects-overview/persistence.js +0 -24
- package/dist/search/Search.d.ts +0 -13
- package/dist/search/Search.js +0 -199
- package/dist/search/SearchContext.d.ts +0 -21
- package/dist/search/SearchContext.js +0 -21
- package/dist/search/XStateSearchAdapter.d.ts +0 -5
- package/dist/search/XStateSearchAdapter.js +0 -70
- package/dist/search/components/ElementsColumn.css.d.ts +0 -10
- package/dist/search/components/ElementsColumn.css.js +0 -52
- package/dist/search/components/ElementsColumn.d.ts +0 -2
- package/dist/search/components/ElementsColumn.js +0 -262
- package/dist/search/components/PickView.d.ts +0 -4
- package/dist/search/components/PickView.js +0 -118
- package/dist/search/components/SearchByTags.d.ts +0 -1
- package/dist/search/components/SearchByTags.js +0 -79
- package/dist/search/components/SearchInput.d.ts +0 -2
- package/dist/search/components/SearchInput.js +0 -191
- package/dist/search/components/ViewsColum.d.ts +0 -13
- package/dist/search/components/ViewsColum.js +0 -159
- package/dist/search/components/ViewsColumn.css.d.ts +0 -3
- package/dist/search/components/ViewsColumn.css.js +0 -15
- package/dist/search/components/_shared.css.d.ts +0 -4
- package/dist/search/components/_shared.css.js +0 -121
- package/dist/search/components/styles.css.d.ts +0 -6
- package/dist/search/components/styles.css.js +0 -54
- package/dist/search/components/utils.d.ts +0 -11
- package/dist/search/components/utils.js +0 -55
- package/dist/search/hooks.d.ts +0 -3
- package/dist/search/hooks.js +0 -16
- package/dist/search/searchActor.d.ts +0 -37
- package/dist/search/searchActor.js +0 -100
- package/dist/shadowroot/ShadowRoot.d.ts +0 -17
- package/dist/shadowroot/ShadowRoot.js +0 -197
- package/dist/shadowroot/index.d.ts +0 -1
- package/dist/styles-font2.js +0 -4
- package/dist/styles2.js +0 -4
- package/dist/utils/css.d.ts +0 -1
- package/dist/utils/defineActors.d.ts +0 -21
- package/dist/utils/defineActors.js +0 -13
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.js +0 -6
- package/dist/utils/readableText.d.ts +0 -11
- package/dist/utils/readableText.js +0 -18
- package/dist/utils/roundDpr.d.ts +0 -1
- package/dist/utils/roundDpr.js +0 -24
- package/dist/utils/view-bounds.d.ts +0 -9
- package/dist/utils/view-bounds.js +0 -55
- package/dist/utils/xyflow.d.ts +0 -88
- package/dist/utils/xyflow.js +0 -161
- 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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useCallbackRef } from "../../hooks/useCallbackRef.mjs";
|
|
3
|
+
import { parseMarkdownRefAnchor } from "./markdown-refs.mjs";
|
|
4
|
+
import { useId, useMemo, useRef } from "react";
|
|
5
|
+
import { useSyncedRef, useUnmountEffect } from "@react-hookz/web";
|
|
6
|
+
import { shallowEqual } from "fast-equals";
|
|
7
|
+
import { nonexhaustive } from "@likec4/core";
|
|
8
|
+
import { createAtom } from "@xstate/store";
|
|
9
|
+
|
|
10
|
+
// src/components/markdown/useMarkdownRefsInteractivity.tsx
|
|
11
|
+
const interactiveRefSelector = "[data-likec4-ref-state=\"link\"], [data-likec4-ref-state=\"missing\"]";
|
|
12
|
+
const inactiveRefState = {
|
|
13
|
+
element: null,
|
|
14
|
+
resolved: null,
|
|
15
|
+
opened: false
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Delegated event handlers for refs: one set of listeners on the Markdown block for all refs in it.
|
|
19
|
+
* Activates links on click and Enter, shows a preview card on hover and focus.
|
|
20
|
+
* Handlers from props are composed (called for events that are not ref activations).
|
|
21
|
+
*/
|
|
22
|
+
function useMarkdownRefsInteractivity(actions2, resolver3) {
|
|
23
|
+
const actionsRef = useSyncedRef(actions2);
|
|
24
|
+
const resolve = useCallbackRef(resolver3);
|
|
25
|
+
const previewId = useId();
|
|
26
|
+
const timer = useRef(void 0);
|
|
27
|
+
const interactivity = useMemo(() => {
|
|
28
|
+
const $active = createAtom(inactiveRefState, { compare: shallowEqual });
|
|
29
|
+
const $activeElement = createAtom(() => $active.get().element, { compare: (a, b) => a === b });
|
|
30
|
+
const $opened = createAtom(() => {
|
|
31
|
+
const state = $active.get();
|
|
32
|
+
return state.opened && state.element.isConnected;
|
|
33
|
+
});
|
|
34
|
+
let animationFrame = null;
|
|
35
|
+
const clearTimer = () => {
|
|
36
|
+
clearTimeout(timer.current);
|
|
37
|
+
if (animationFrame) {
|
|
38
|
+
cancelAnimationFrame(animationFrame);
|
|
39
|
+
animationFrame = null;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const open = (target, delay = 0) => {
|
|
43
|
+
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
44
|
+
animationFrame = requestAnimationFrame(() => {
|
|
45
|
+
animationFrame = null;
|
|
46
|
+
const element = closestRef(target, interactiveRefSelector);
|
|
47
|
+
if (!element) return;
|
|
48
|
+
clearTimer();
|
|
49
|
+
const state = $active.get();
|
|
50
|
+
if (state.opened && state.element === element) return;
|
|
51
|
+
const anchor = parseMarkdownRefAnchor(element);
|
|
52
|
+
const resolved = anchor ? resolve(anchor) : null;
|
|
53
|
+
if (!resolved || resolved.state === "text") return;
|
|
54
|
+
const show = () => $active.set((s) => ({
|
|
55
|
+
...s,
|
|
56
|
+
element,
|
|
57
|
+
resolved,
|
|
58
|
+
opened: true
|
|
59
|
+
}));
|
|
60
|
+
if (delay === 0 || state.opened) show();
|
|
61
|
+
else timer.current = setTimeout(show, delay);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const close = (delay = 0) => {
|
|
65
|
+
clearTimer();
|
|
66
|
+
const hide = () => $active.set((s) => ({
|
|
67
|
+
...s,
|
|
68
|
+
opened: false
|
|
69
|
+
}));
|
|
70
|
+
if (delay === 0) hide();
|
|
71
|
+
else timer.current = setTimeout(hide, delay);
|
|
72
|
+
};
|
|
73
|
+
const openRef = (resolved) => {
|
|
74
|
+
close();
|
|
75
|
+
switch (resolved.kind) {
|
|
76
|
+
case "element":
|
|
77
|
+
actionsRef.current?.openElement?.(resolved.fqn);
|
|
78
|
+
break;
|
|
79
|
+
case "view":
|
|
80
|
+
actionsRef.current?.openView?.(resolved.viewId);
|
|
81
|
+
break;
|
|
82
|
+
default: nonexhaustive(resolved);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* @returns true if the event activated a ref
|
|
87
|
+
*/
|
|
88
|
+
const activate = (e) => {
|
|
89
|
+
const element = closestRef(e.target, "[data-likec4-ref-state=\"link\"]");
|
|
90
|
+
const anchor = element ? parseMarkdownRefAnchor(element) : null;
|
|
91
|
+
const resolved = anchor ? resolve(anchor) : null;
|
|
92
|
+
if (resolved?.state !== "link") return false;
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
openRef(resolved);
|
|
96
|
+
return true;
|
|
97
|
+
};
|
|
98
|
+
const isInsidePreview = (node) => node instanceof Node && !!document.getElementById(previewId)?.contains(node);
|
|
99
|
+
return {
|
|
100
|
+
previewId,
|
|
101
|
+
$active,
|
|
102
|
+
$activeElement,
|
|
103
|
+
$opened,
|
|
104
|
+
open,
|
|
105
|
+
close,
|
|
106
|
+
openRef,
|
|
107
|
+
activate,
|
|
108
|
+
isInsidePreview,
|
|
109
|
+
clearTimer,
|
|
110
|
+
closestRef: (target) => closestRef(target, interactiveRefSelector),
|
|
111
|
+
reset: () => {
|
|
112
|
+
clearTimer();
|
|
113
|
+
$active.set(inactiveRefState);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}, [previewId]);
|
|
117
|
+
useUnmountEffect(interactivity.reset);
|
|
118
|
+
return interactivity;
|
|
119
|
+
}
|
|
120
|
+
function closestRef(target, selector) {
|
|
121
|
+
if (!(target instanceof Element)) return null;
|
|
122
|
+
const element = target.closest(selector);
|
|
123
|
+
return element instanceof HTMLElement ? element : null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { closestRef, interactiveRefSelector, useMarkdownRefsInteractivity };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
|
|
4
|
+
// src/context/ComparingLayoutsContext.tsx
|
|
5
|
+
const ComparingLayoutsContext = createContext(false);
|
|
6
|
+
/**
|
|
7
|
+
* Provides whether the diagram is comparing manual layout with the latest auto layout
|
|
8
|
+
* (diagram actor is in `ready.comparing` state).
|
|
9
|
+
*
|
|
10
|
+
* Provided once by the diagram actor provider, so that nodes and edges
|
|
11
|
+
* don't need to subscribe to the actor.
|
|
12
|
+
*/
|
|
13
|
+
const ComparingLayoutsProvider = ComparingLayoutsContext.Provider;
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if the diagram is comparing manual layout with the latest auto layout.
|
|
16
|
+
*
|
|
17
|
+
* Unlike `useEnabledFeatures().enableCompareWithLatest` (feature is available),
|
|
18
|
+
* this reflects whether comparing is active.
|
|
19
|
+
*/
|
|
20
|
+
function useIsComparingLayouts() {
|
|
21
|
+
return useContext(ComparingLayoutsContext);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { ComparingLayoutsProvider, useIsComparingLayouts };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useCurrentViewId } from "../hooks/useCurrentView.mjs";
|
|
3
|
+
import { CurrentViewModelContext, useOptionalLikeC4Model } from "./LikeC4ModelContext.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
// src/context/CurrentViewModelProvider.tsx
|
|
7
|
+
function CurrentViewModelProvider({ children }) {
|
|
8
|
+
const viewId = useCurrentViewId();
|
|
9
|
+
const viewmodel = useOptionalLikeC4Model()?.findView(viewId) ?? null;
|
|
10
|
+
return /* @__PURE__ */ jsx(CurrentViewModelContext, {
|
|
11
|
+
value: viewmodel,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { CurrentViewModelProvider };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { createContext, useContext, useMemo, useRef } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useSyncedRef } from "@react-hookz/web";
|
|
5
|
+
import { isFunction, keys, mapToObj } from "remeda";
|
|
6
|
+
|
|
7
|
+
// src/context/DiagramEventHandlers.tsx
|
|
8
|
+
const defaultHandlers = {
|
|
9
|
+
onNavigateTo: null,
|
|
10
|
+
onNodeClick: null,
|
|
11
|
+
onNodeContextMenu: null,
|
|
12
|
+
onCanvasContextMenu: null,
|
|
13
|
+
onEdgeClick: null,
|
|
14
|
+
onEdgeContextMenu: null,
|
|
15
|
+
onCanvasClick: null,
|
|
16
|
+
onCanvasDblClick: null,
|
|
17
|
+
onLogoClick: null,
|
|
18
|
+
onOpenSource: null,
|
|
19
|
+
onInitialized: null,
|
|
20
|
+
onLayoutTypeChange: null,
|
|
21
|
+
onRelationshipBrowserScopeChange: null
|
|
22
|
+
};
|
|
23
|
+
const HandlerNames = keys(defaultHandlers);
|
|
24
|
+
const DiagramEventHandlersReactContext = createContext({
|
|
25
|
+
...mapToObj(HandlerNames, (name) => [name, null]),
|
|
26
|
+
handlersRef: { current: defaultHandlers }
|
|
27
|
+
});
|
|
28
|
+
function DiagramEventHandlers({ handlers, children }) {
|
|
29
|
+
const handlersRef = useSyncedRef(handlers);
|
|
30
|
+
const deps = HandlerNames.map((name) => isFunction(handlers[name]) ? name : "-").join(",");
|
|
31
|
+
const value = useMemo(() => ({
|
|
32
|
+
...mapToObj(HandlerNames, (name) => {
|
|
33
|
+
if (isFunction(handlers[name])) return [name, (...args) => handlersRef.current[name]?.(...args)];
|
|
34
|
+
return [name, null];
|
|
35
|
+
}),
|
|
36
|
+
handlersRef
|
|
37
|
+
}), [handlersRef, deps]);
|
|
38
|
+
return /* @__PURE__ */ jsx(DiagramEventHandlersReactContext.Provider, {
|
|
39
|
+
value,
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function useDiagramEventHandlers() {
|
|
44
|
+
return useContext(DiagramEventHandlersReactContext);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { DiagramEventHandlers, useDiagramEventHandlers };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
|
+
import { JSX as JSX$1 } from "react/jsx-runtime";
|
|
4
|
+
import { ExclusiveUnion } from "@likec4/core/types";
|
|
5
|
+
declare const FeatureNames: readonly ["Controls", "Editor", "AISemanticLayout", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Notes", "Vscode", "ElementTags"];
|
|
6
|
+
export type FeatureName = typeof FeatureNames[number];
|
|
7
|
+
export type TogglableFeature = 'ReadOnly' & FeatureName;
|
|
8
|
+
export type EnabledFeatures = { [P in `enable${FeatureName}`]: boolean; };
|
|
9
|
+
export declare function useEnabledFeatures(): EnabledFeatures;
|
|
10
|
+
/**
|
|
11
|
+
* Renders children only if the specified feature is enabled
|
|
12
|
+
* @param feature Feature name
|
|
13
|
+
* @param and Additional AND condition
|
|
14
|
+
* @example
|
|
15
|
+
* <IfEnabled feature="ReadOnly" and={isSomething}>
|
|
16
|
+
* ...
|
|
17
|
+
* </IfEnabled>
|
|
18
|
+
*/
|
|
19
|
+
export declare function IfEnabled({ feature, children, and }: PropsWithChildren<{
|
|
20
|
+
feature: FeatureName;
|
|
21
|
+
and?: boolean;
|
|
22
|
+
}>): JSX$1.Element | null;
|
|
23
|
+
export declare function IfNotEnabled({ feature, children }: PropsWithChildren<{
|
|
24
|
+
feature: FeatureName;
|
|
25
|
+
}>): JSX$1.Element | null;
|
|
26
|
+
export declare function IfReadOnly({ children }: PropsWithChildren): JSX$1.Element | null;
|
|
27
|
+
export declare function IfNotReadOnly({ children }: PropsWithChildren): JSX$1.Element | null;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useSetState } from "../hooks/useSetState.mjs";
|
|
3
|
+
import { useUpdateEffect } from "../hooks/useUpdateEffect.mjs";
|
|
4
|
+
import { ComparingLayoutsProvider } from "./ComparingLayoutsContext.mjs";
|
|
5
|
+
import { createContext, useContext } from "react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
// src/context/DiagramFeatures.tsx
|
|
9
|
+
const DefaultFeatures = {
|
|
10
|
+
enableEditor: false,
|
|
11
|
+
/**
|
|
12
|
+
* Enabled if editor has `applySemanticLayout` method
|
|
13
|
+
*/
|
|
14
|
+
enableAISemanticLayout: false,
|
|
15
|
+
enableReadOnly: true,
|
|
16
|
+
enableCompareWithLatest: false,
|
|
17
|
+
enableControls: false,
|
|
18
|
+
enableDynamicViewWalkthrough: false,
|
|
19
|
+
enableElementDetails: false,
|
|
20
|
+
enableFocusMode: false,
|
|
21
|
+
enableNavigateTo: false,
|
|
22
|
+
enableNotations: false,
|
|
23
|
+
enableRelationshipBrowser: false,
|
|
24
|
+
enableRelationshipDetails: false,
|
|
25
|
+
enableSearch: false,
|
|
26
|
+
enableNavigationButtons: false,
|
|
27
|
+
enableFitView: false,
|
|
28
|
+
enableVscode: false,
|
|
29
|
+
enableElementTags: false,
|
|
30
|
+
enableNotes: false
|
|
31
|
+
};
|
|
32
|
+
const DiagramFeaturesContext = createContext(DefaultFeatures);
|
|
33
|
+
function DiagramFeatures({ children, features, overrides }) {
|
|
34
|
+
const outerScope = useContext(DiagramFeaturesContext);
|
|
35
|
+
const [scope, setScope] = useSetState(() => ({
|
|
36
|
+
...outerScope,
|
|
37
|
+
...features,
|
|
38
|
+
...overrides
|
|
39
|
+
}));
|
|
40
|
+
useUpdateEffect(() => {
|
|
41
|
+
setScope({
|
|
42
|
+
...outerScope,
|
|
43
|
+
...features,
|
|
44
|
+
...overrides
|
|
45
|
+
});
|
|
46
|
+
}, [
|
|
47
|
+
outerScope,
|
|
48
|
+
features,
|
|
49
|
+
overrides,
|
|
50
|
+
setScope
|
|
51
|
+
]);
|
|
52
|
+
return /* @__PURE__ */ jsx(DiagramFeaturesContext.Provider, {
|
|
53
|
+
value: scope,
|
|
54
|
+
children
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const overridesForOverlays = {
|
|
58
|
+
enableControls: false,
|
|
59
|
+
enableReadOnly: true,
|
|
60
|
+
enableAISemanticLayout: false,
|
|
61
|
+
enableCompareWithLatest: false
|
|
62
|
+
};
|
|
63
|
+
DiagramFeatures.Overlays = ({ children }) => {
|
|
64
|
+
return /* @__PURE__ */ jsx(DiagramFeatures, {
|
|
65
|
+
overrides: overridesForOverlays,
|
|
66
|
+
children: /* @__PURE__ */ jsx(ComparingLayoutsProvider, {
|
|
67
|
+
value: false,
|
|
68
|
+
children
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
function useEnabledFeatures() {
|
|
73
|
+
return useContext(DiagramFeaturesContext);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Renders children only if the specified feature is enabled
|
|
77
|
+
* @param feature Feature name
|
|
78
|
+
* @param and Additional AND condition
|
|
79
|
+
* @example
|
|
80
|
+
* <IfEnabled feature="ReadOnly" and={isSomething}>
|
|
81
|
+
* ...
|
|
82
|
+
* </IfEnabled>
|
|
83
|
+
*/
|
|
84
|
+
function IfEnabled({ feature, children, and = true }) {
|
|
85
|
+
const enabled = useEnabledFeatures()[`enable${feature}`] === true;
|
|
86
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: enabled && and ? children : null });
|
|
87
|
+
}
|
|
88
|
+
function IfNotEnabled({ feature, children }) {
|
|
89
|
+
const notEnabled = useEnabledFeatures()[`enable${feature}`] !== true;
|
|
90
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: notEnabled ? children : null });
|
|
91
|
+
}
|
|
92
|
+
function IfReadOnly({ children }) {
|
|
93
|
+
const isReadOnly = useEnabledFeatures().enableReadOnly === true;
|
|
94
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: isReadOnly ? children : null });
|
|
95
|
+
}
|
|
96
|
+
function IfNotReadOnly({ children }) {
|
|
97
|
+
const isReadOnly = useEnabledFeatures().enableReadOnly === true;
|
|
98
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: isReadOnly ? null : children });
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { DefaultFeatures, DiagramFeatures, IfEnabled, IfNotEnabled, IfNotReadOnly, IfReadOnly, useEnabledFeatures };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { LikeC4MantineProvider } from "../LikeC4MantineProvider.mjs";
|
|
3
|
+
import { useContext, useEffect } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
5
|
+
import { MantineContext } from "@mantine/core";
|
|
6
|
+
|
|
7
|
+
// src/context/EnsureMantine.tsx
|
|
8
|
+
function EnsureMantine({ children }) {
|
|
9
|
+
const mantineCtx = useContext(MantineContext);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!mantineCtx) console.warn("LikeC4Diagram must be a child of LikeC4MantineProvider");
|
|
12
|
+
}, []);
|
|
13
|
+
if (!mantineCtx) return /* @__PURE__ */ jsx(LikeC4MantineProvider, { children });
|
|
14
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { EnsureMantine };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
|
+
export declare function FramerMotionConfig({ reducedMotion, children }: PropsWithChildren<{
|
|
4
|
+
/**
|
|
5
|
+
* If true, will respect the device prefersReducedMotion setting by switching
|
|
6
|
+
* transform animations off.
|
|
7
|
+
*/
|
|
8
|
+
reducedMotion?: 'always' | 'never' | 'user' | undefined;
|
|
9
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMantineStyleNonce } from "@mantine/core";
|
|
4
|
+
import { LazyMotion, MotionConfig, domMax } from "motion/react";
|
|
5
|
+
|
|
6
|
+
// src/context/FramerMotionConfig.tsx
|
|
7
|
+
function FramerMotionConfig({ reducedMotion = "user", children }) {
|
|
8
|
+
const nonce = useMantineStyleNonce()?.();
|
|
9
|
+
return /* @__PURE__ */ jsx(LazyMotion, {
|
|
10
|
+
features: domMax,
|
|
11
|
+
strict: true,
|
|
12
|
+
children: /* @__PURE__ */ jsx(MotionConfig, {
|
|
13
|
+
reducedMotion,
|
|
14
|
+
...nonce && { nonce },
|
|
15
|
+
children
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { FramerMotionConfig };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { ElementIconRenderer, ElementIconRendererProps } from "../LikeC4Diagram.props.mjs";
|
|
3
|
+
import { CSSProperties, PropsWithChildren, ReactNode } from "react";
|
|
4
|
+
import { ElementShape } from "@likec4/core";
|
|
5
|
+
/**
|
|
6
|
+
* Provider for custom element icon renderers
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const MyIconRenderer: ElementIconRenderer = ({ node }) => {
|
|
11
|
+
* return <div>{node.title}</div>
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* <IconRendererProvider value={MyIconRenderer}>
|
|
15
|
+
* <LikeC4Diagram />
|
|
16
|
+
* </IconRendererProvider>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function IconRendererProvider({ value, children }: PropsWithChildren<{
|
|
20
|
+
value: ElementIconRenderer | null;
|
|
21
|
+
}>): import("react").JSX.Element;
|
|
22
|
+
export declare function DefaultIconRenderer({ node, ...props }: ElementIconRendererProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import IconBrowser from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.mjs";
|
|
3
|
+
import IconCylinder from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.mjs";
|
|
4
|
+
import IconDeviceMobile from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.mjs";
|
|
5
|
+
import IconFileText from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.mjs";
|
|
6
|
+
import IconRectangularPrism from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.mjs";
|
|
7
|
+
import IconReorder from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.mjs";
|
|
8
|
+
import IconRobot from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRobot.mjs";
|
|
9
|
+
import IconUser from "../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.mjs";
|
|
10
|
+
import { cx } from "@likec4/styles/css";
|
|
11
|
+
import { createContext, useContext, useMemo } from "react";
|
|
12
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
13
|
+
|
|
14
|
+
// src/context/IconRenderer.tsx
|
|
15
|
+
const IconRendererContext = createContext(null);
|
|
16
|
+
/**
|
|
17
|
+
* Provider for custom element icon renderers
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* const MyIconRenderer: ElementIconRenderer = ({ node }) => {
|
|
22
|
+
* return <div>{node.title}</div>
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* <IconRendererProvider value={MyIconRenderer}>
|
|
26
|
+
* <LikeC4Diagram />
|
|
27
|
+
* </IconRendererProvider>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
function IconRendererProvider({ value, children }) {
|
|
31
|
+
if (useContext(IconRendererContext)) return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
32
|
+
return /* @__PURE__ */ jsx(IconRendererContext.Provider, {
|
|
33
|
+
value,
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function IconRenderer({ element, className, style }) {
|
|
38
|
+
const RenderIcon = useContext(IconRendererContext);
|
|
39
|
+
if (!element || !element.icon || element.icon === "none") return null;
|
|
40
|
+
let icon;
|
|
41
|
+
switch (true) {
|
|
42
|
+
case element.icon.startsWith("data:image/svg+xml"):
|
|
43
|
+
icon = /* @__PURE__ */ jsx(SvgDataUrlIcon, {
|
|
44
|
+
dataUrl: element.icon,
|
|
45
|
+
alt: element.title
|
|
46
|
+
});
|
|
47
|
+
break;
|
|
48
|
+
case element.icon.startsWith("http://"):
|
|
49
|
+
case element.icon.startsWith("https://"):
|
|
50
|
+
case element.icon.startsWith("data:image"):
|
|
51
|
+
icon = /* @__PURE__ */ jsx("img", {
|
|
52
|
+
src: element.icon,
|
|
53
|
+
alt: element.title
|
|
54
|
+
});
|
|
55
|
+
break;
|
|
56
|
+
case !!RenderIcon:
|
|
57
|
+
icon = /* @__PURE__ */ jsx(RenderIcon, { node: element });
|
|
58
|
+
break;
|
|
59
|
+
default: icon = /* @__PURE__ */ jsx(DefaultIconRenderer, { node: element });
|
|
60
|
+
}
|
|
61
|
+
if (!icon) return null;
|
|
62
|
+
return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: cx(className, "likec4-element-icon"),
|
|
64
|
+
"data-likec4-icon": element.icon,
|
|
65
|
+
style,
|
|
66
|
+
children: icon
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const ShapeIcons = {
|
|
70
|
+
browser: IconBrowser,
|
|
71
|
+
cylinder: IconCylinder,
|
|
72
|
+
mobile: IconDeviceMobile,
|
|
73
|
+
person: IconUser,
|
|
74
|
+
queue: IconReorder,
|
|
75
|
+
rectangle: IconRectangularPrism,
|
|
76
|
+
storage: IconCylinder,
|
|
77
|
+
bucket: IconCylinder,
|
|
78
|
+
document: IconFileText,
|
|
79
|
+
component: IconRectangularPrism,
|
|
80
|
+
agent: IconRobot
|
|
81
|
+
};
|
|
82
|
+
function IconOrShapeRenderer({ element, className, style }) {
|
|
83
|
+
if (!element.icon || element.icon === "none") {
|
|
84
|
+
const ShapeIcon = ShapeIcons[element.shape];
|
|
85
|
+
return /* @__PURE__ */ jsx("div", {
|
|
86
|
+
className: cx(className, "likec4-shape-icon"),
|
|
87
|
+
style,
|
|
88
|
+
children: /* @__PURE__ */ jsx(ShapeIcon, {})
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return /* @__PURE__ */ jsx(IconRenderer, {
|
|
92
|
+
element,
|
|
93
|
+
className,
|
|
94
|
+
style
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function SvgDataUrlIcon({ dataUrl, alt }) {
|
|
98
|
+
if (!useMemo(() => hasCurrentColorReference(dataUrl), [dataUrl])) return /* @__PURE__ */ jsx("img", {
|
|
99
|
+
src: dataUrl,
|
|
100
|
+
alt
|
|
101
|
+
});
|
|
102
|
+
const maskUrl = `url(${JSON.stringify(dataUrl)})`;
|
|
103
|
+
return /* @__PURE__ */ jsx("span", {
|
|
104
|
+
role: alt ? "img" : void 0,
|
|
105
|
+
"aria-label": alt,
|
|
106
|
+
style: {
|
|
107
|
+
display: "inline-block",
|
|
108
|
+
width: "100%",
|
|
109
|
+
height: "100%",
|
|
110
|
+
backgroundColor: "currentColor",
|
|
111
|
+
maskImage: maskUrl,
|
|
112
|
+
maskRepeat: "no-repeat",
|
|
113
|
+
maskPosition: "center",
|
|
114
|
+
maskSize: "contain",
|
|
115
|
+
WebkitMaskImage: maskUrl,
|
|
116
|
+
WebkitMaskRepeat: "no-repeat",
|
|
117
|
+
WebkitMaskPosition: "center",
|
|
118
|
+
WebkitMaskSize: "contain"
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function hasCurrentColorReference(dataUrl) {
|
|
123
|
+
return /currentcolor/i.test(decodeSvgDataUrl(dataUrl) ?? "");
|
|
124
|
+
}
|
|
125
|
+
function decodeSvgDataUrl(dataUrl) {
|
|
126
|
+
if (!dataUrl.startsWith("data:image/svg+xml")) return null;
|
|
127
|
+
try {
|
|
128
|
+
const comma = dataUrl.indexOf(",");
|
|
129
|
+
if (comma === -1) return null;
|
|
130
|
+
const payload = dataUrl.slice(comma + 1);
|
|
131
|
+
if (dataUrl.slice(0, comma).endsWith(";base64")) return new TextDecoder().decode(Uint8Array.from(atob(payload), (c) => c.charCodeAt(0)));
|
|
132
|
+
try {
|
|
133
|
+
return decodeURIComponent(payload);
|
|
134
|
+
} catch {
|
|
135
|
+
return payload;
|
|
136
|
+
}
|
|
137
|
+
} catch {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const iconUrl = (group, name) => `https://icons.like-c4.dev/${encodeURIComponent(group)}/${encodeURIComponent(name)}.svg`;
|
|
142
|
+
function MaskedIcon({ name, group, ...props }) {
|
|
143
|
+
const url = iconUrl(group, name);
|
|
144
|
+
const style = {
|
|
145
|
+
display: "inline-block",
|
|
146
|
+
width: "100%",
|
|
147
|
+
height: "100%",
|
|
148
|
+
backgroundColor: "currentColor",
|
|
149
|
+
maskImage: `url("${url}")`,
|
|
150
|
+
maskRepeat: "no-repeat",
|
|
151
|
+
maskPosition: "center",
|
|
152
|
+
maskSize: "contain",
|
|
153
|
+
WebkitMaskImage: `url("${url}")`,
|
|
154
|
+
WebkitMaskRepeat: "no-repeat",
|
|
155
|
+
WebkitMaskPosition: "center",
|
|
156
|
+
WebkitMaskSize: "contain"
|
|
157
|
+
};
|
|
158
|
+
return /* @__PURE__ */ jsx("span", {
|
|
159
|
+
...props,
|
|
160
|
+
"aria-hidden": "true",
|
|
161
|
+
style
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function DefaultIconRenderer({ node, ...props }) {
|
|
165
|
+
if (!node.icon || node.icon === "none") return null;
|
|
166
|
+
const [group, name, ...rest] = node.icon.split(":");
|
|
167
|
+
if (!group || !name || rest.length > 0) return null;
|
|
168
|
+
if (group === "bootstrap" || group === "md") return /* @__PURE__ */ jsx(MaskedIcon, {
|
|
169
|
+
...props,
|
|
170
|
+
name,
|
|
171
|
+
group
|
|
172
|
+
});
|
|
173
|
+
return /* @__PURE__ */ jsx("img", {
|
|
174
|
+
...props,
|
|
175
|
+
src: iconUrl(group, name)
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { DefaultIconRenderer, IconOrShapeRenderer, IconRenderer, IconRendererProvider };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
|
+
import * as t from "@likec4/core/types";
|
|
4
|
+
import { LayoutedView } from "@likec4/core/types";
|
|
5
|
+
import { LikeC4Model, LikeC4ViewModel } from "@likec4/core/model";
|
|
6
|
+
type UnknownLayouted$1 = t.aux.UnknownLayouted;
|
|
7
|
+
export type CurrentViewModel = LikeC4ViewModel<UnknownLayouted$1, LayoutedView<UnknownLayouted$1>>;
|
|
8
|
+
/**
|
|
9
|
+
* @returns The LikeC4Model from context, or null if no LikeC4ModelProvider is found.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useOptionalLikeC4Model<A extends t.aux.Any = UnknownLayouted$1>(): LikeC4Model<A> | null;
|
|
12
|
+
export declare function useOptionalCurrentViewModel(): CurrentViewModel | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
// src/context/LikeC4ModelContext.tsx
|
|
6
|
+
const LikeC4ModelContext = createContext(null);
|
|
7
|
+
const LikeC4ModelContextProvider = LikeC4ModelContext.Provider;
|
|
8
|
+
const CurrentViewModelCtx = createContext(null);
|
|
9
|
+
const CurrentViewModelContext = CurrentViewModelCtx.Provider;
|
|
10
|
+
/**
|
|
11
|
+
* @returns The LikeC4Model from context, or null if no LikeC4ModelProvider is found.
|
|
12
|
+
*/
|
|
13
|
+
function useOptionalLikeC4Model() {
|
|
14
|
+
return useContext(LikeC4ModelContext);
|
|
15
|
+
}
|
|
16
|
+
function useOptionalCurrentViewModel() {
|
|
17
|
+
return useContext(CurrentViewModelCtx);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { CurrentViewModelContext, LikeC4ModelContextProvider, useOptionalCurrentViewModel, useOptionalLikeC4Model };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { LikeC4ProjectData } from "../LikeC4ProjectsProvider.mjs";
|
|
3
|
+
import { ProjectId } from "@likec4/core/types";
|
|
4
|
+
export type LikeC4ProjectsContext = {
|
|
5
|
+
projects: ReadonlyArray<LikeC4ProjectData>;
|
|
6
|
+
onProjectChange: (id: ProjectId) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
|
|
4
|
+
// src/context/LikeC4ProjectsContext.ts
|
|
5
|
+
const LikeC4ProjectsContext = createContext(null);
|
|
6
|
+
const LikeC4ProjectsContextProvider = LikeC4ProjectsContext.Provider;
|
|
7
|
+
function useOptionalProjectsContext() {
|
|
8
|
+
return useContext(LikeC4ProjectsContext);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { LikeC4ProjectsContextProvider, useOptionalProjectsContext };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { useStore } from "@nanostores/react";
|
|
4
|
+
|
|
5
|
+
// src/context/RootContainerContext.tsx
|
|
6
|
+
const RootContainerContext = createContext(null);
|
|
7
|
+
const RootContainerContextProvider = RootContainerContext.Provider;
|
|
8
|
+
function useRootContainerContext() {
|
|
9
|
+
return useContext(RootContainerContext);
|
|
10
|
+
}
|
|
11
|
+
function useRootContainer() {
|
|
12
|
+
const ctx = useRootContainerContext();
|
|
13
|
+
if (!ctx) throw new Error("useRootContainer must be used within a RootContainer");
|
|
14
|
+
return ctx;
|
|
15
|
+
}
|
|
16
|
+
function useRootContainerRef() {
|
|
17
|
+
return useRootContainer().ref;
|
|
18
|
+
}
|
|
19
|
+
function useRootContainerElement() {
|
|
20
|
+
return useRootContainer().ref.current;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { RootContainerContextProvider, useRootContainer, useRootContainerContext, useRootContainerElement, useRootContainerRef };
|