@likec4/diagram 1.47.0 → 1.49.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/LICENSE +1 -1
- package/README.md +8 -10
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +85 -81
- package/dist/LikeC4Diagram.props.d.ts +10 -6
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ModelProvider.js +2 -2
- package/dist/LikeC4ProjectsOverview.d.ts +3 -2
- package/dist/LikeC4ProjectsProvider.d.ts +2 -1
- package/dist/LikeC4ProjectsProvider.js +10 -8
- package/dist/LikeC4Styles.d.ts +3 -6
- package/dist/LikeC4Styles.js +44 -43
- package/dist/LikeC4View.d.ts +22 -1
- package/dist/LikeC4View.js +40 -25
- package/dist/ReactLikeC4.d.ts +13 -2
- package/dist/ReactLikeC4.js +8 -4
- package/dist/StaticLikeC4Diagram.d.ts +2 -1
- package/dist/StaticLikeC4Diagram.js +1 -0
- package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
- package/dist/_virtual/xstate-store-react.cjs.js +5 -0
- package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
- package/dist/adhoc-editor/EditorPanel.js +105 -0
- package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
- package/dist/adhoc-editor/ElementsTree.js +142 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +74 -0
- package/dist/adhoc-editor/components/Tree.d.ts +48 -0
- package/dist/adhoc-editor/components/Tree.js +296 -0
- package/dist/adhoc-editor/hooks.d.ts +14 -0
- package/dist/adhoc-editor/hooks.js +29 -0
- package/dist/adhoc-editor/index.d.ts +2 -0
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/state/ActorProvider.d.ts +5 -0
- package/dist/adhoc-editor/state/ActorProvider.js +40 -0
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/state/actor.editor.d.ts +56 -0
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/state/actor.js +16 -0
- package/dist/adhoc-editor/state/actor.layouter.d.ts +51 -0
- package/dist/adhoc-editor/state/actor.layouter.js +70 -0
- package/dist/adhoc-editor/state/actor.types.d.ts +63 -0
- package/dist/adhoc-editor/state/actor.types.js +29 -0
- package/dist/adhoc-editor/state/panel.d.ts +95 -0
- package/dist/adhoc-editor/state/panel.js +139 -0
- package/dist/adhoc-editor/state/utils.d.ts +17 -0
- package/dist/adhoc-editor/state/utils.js +32 -0
- package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
- package/dist/adhoc-editor/useElementsTree.js +130 -0
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
- package/dist/base/const.d.ts +2 -0
- package/dist/base/const.js +2 -1
- package/dist/base/updateEdges.js +26 -3
- package/dist/base/updateNodes.js +8 -5
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/Markdown.js +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +4 -2
- package/dist/base-primitives/NodeHandles.js +46 -19
- package/dist/base-primitives/compound/CompoundActionButton.js +28 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +24 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +11 -8
- package/dist/base-primitives/compound/CompoundTitle.js +1 -2
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +5 -2
- package/dist/base-primitives/edge/EdgeLabel.js +3 -4
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +17 -20
- package/dist/base-primitives/element/ElementActionButtons.js +57 -59
- package/dist/base-primitives/element/ElementData.d.ts +7 -7
- package/dist/base-primitives/element/ElementData.js +61 -48
- package/dist/base-primitives/element/ElementDetailsButton.js +48 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.js +24 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/base-primitives/element/ElementTags.d.ts +6 -2
- package/dist/base-primitives/element/ElementTags.js +55 -32
- package/dist/base-primitives/index.d.ts +1 -1
- package/dist/base-primitives/memoEdge.js +1 -1
- package/dist/base-primitives/memoNode.js +1 -1
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -26
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -19
- package/dist/components/ViewNotFound.d.ts +3 -3
- package/dist/components/ViewNotFound.js +30 -26
- package/dist/context/CurrentViewModelProvider.d.ts +2 -0
- package/dist/context/CurrentViewModelProvider.js +12 -0
- package/dist/context/DefaultMantineProvider.d.ts +2 -0
- package/dist/context/DefaultMantineProvider.js +75 -0
- package/dist/context/DiagramEventHandlers.d.ts +5 -5
- package/dist/context/DiagramEventHandlers.js +10 -4
- package/dist/context/DiagramFeatures.d.ts +8 -7
- package/dist/context/DiagramFeatures.js +16 -13
- package/dist/context/EnsureMantine.d.ts +0 -3
- package/dist/context/EnsureMantine.js +3 -4
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +19 -4
- package/dist/context/IconRenderer.js +52 -25
- package/dist/context/LikeC4ModelContext.d.ts +10 -5
- package/dist/context/LikeC4ModelContext.js +11 -3
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/LikeC4ProjectsContext.js +6 -2
- package/dist/context/RootContainerContext.d.ts +10 -3
- package/dist/context/RootContainerContext.js +8 -3
- package/dist/context/TagStylesContext.js +13 -5
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
- package/dist/editor/LikeC4EditorCallbacks.js +5 -0
- package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
- package/dist/editor/LikeC4EditorProvider.js +3 -3
- package/dist/editor/applyChangesToManualLayout.js +7 -6
- package/dist/editor/editorActor.actions.d.ts +25 -25
- package/dist/editor/editorActor.actions.js +22 -22
- package/dist/editor/editorActor.setup.d.ts +84 -0
- package/dist/editor/editorActor.setup.js +38 -0
- package/dist/editor/editorActor.states.d.ts +9 -0
- package/dist/editor/{editorActor.js → editorActor.states.js} +21 -72
- package/dist/editor/index.d.ts +4 -3
- package/dist/editor/useEditorActorLogic.d.ts +2 -565
- package/dist/editor/useEditorActorLogic.js +14 -21
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.d.ts +6 -0
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +8 -2
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +10 -4
- package/dist/hooks/useDiagramCompareLayout.d.ts +6 -6
- package/dist/hooks/useDiagramCompareLayout.js +1 -1
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +2 -2
- package/dist/hooks/useLikeC4Model.d.ts +6 -2
- package/dist/hooks/useLikeC4Model.js +7 -9
- package/dist/hooks/useLikeC4Project.d.ts +4 -6
- package/dist/hooks/useLikeC4Project.js +19 -31
- package/dist/hooks/useLikeC4Styles.js +3 -9
- package/dist/hooks/useMantinePortalProps.d.ts +1 -1
- package/dist/hooks/useMediaPrint.d.ts +0 -2
- package/dist/hooks/useOverlaysActor.js +4 -4
- package/dist/hooks/useSearchActor.js +4 -4
- package/dist/hooks/useSetState.d.ts +6 -1
- package/dist/hooks/useSetState.js +7 -4
- package/dist/hooks/useXYFlow.d.ts +7 -1
- package/dist/hooks/useXYFlow.js +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.js +1 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +29 -18
- package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
- package/dist/likec4diagram/convert-to-xyflow.js +2 -6
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +34 -37
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +52 -34
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +10 -6
- package/dist/likec4diagram/custom/nodes/nodes.js +30 -8
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +5 -4
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +14 -9
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +4 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +16 -36
- package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
- package/dist/likec4diagram/relationship-popover/components.js +39 -0
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +39 -66
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +16 -4
- package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
- package/dist/likec4diagram/state/diagram-api.js +15 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +92 -0
- package/dist/likec4diagram/state/machine.actions.js +127 -58
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +23 -2
- package/dist/likec4diagram/state/machine.actions.layout.js +68 -15
- package/dist/likec4diagram/state/machine.d.ts +1 -1
- package/dist/likec4diagram/state/machine.js +35 -31
- package/dist/likec4diagram/state/machine.setup.d.ts +40 -7
- package/dist/likec4diagram/state/machine.setup.js +13 -4
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
- package/dist/likec4diagram/state/machine.state.navigating.js +82 -50
- package/dist/likec4diagram/state/machine.state.ready.d.ts +565 -579
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
- package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
- package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
- package/dist/likec4diagram/state/machine.state.ready.js +89 -70
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
- package/dist/likec4diagram/state/types.d.ts +1 -1
- package/dist/likec4diagram/state/utils.d.ts +14 -14
- package/dist/likec4diagram/state/utils.js +12 -4
- package/dist/likec4diagram/types.d.ts +11 -3
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +126 -84
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +15 -8
- package/dist/navigationpanel/NavigationPanel.js +4 -3
- package/dist/navigationpanel/NavigationPanelControls.js +4 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +2 -3
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
- package/dist/navigationpanel/controls/DetailsControls.js +7 -7
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
- package/dist/navigationpanel/controls/LogoButton.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
- package/dist/navigationpanel/controls/SearchControl.js +8 -12
- package/dist/navigationpanel/controls/ToggleReadonly.js +5 -6
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +4 -4
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/styles.css.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +77 -77
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +15 -15
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +11 -12
- package/dist/overlays/element-details/TabPanelDeployments.js +8 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.js +10 -30
- package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
- package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +3 -2
- package/dist/overlays/overlaysActor.js +19 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.css.js +6 -6
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/compute.js +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationships-browser/layout.d.ts +1 -1
- package/dist/overlays/relationships-browser/layout.js +1 -1
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
- package/dist/projects-overview/ProjectsOverview.js +2 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
- package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
- package/dist/projects-overview/actor.d.ts +1 -1
- package/dist/projects-overview/actor.js +8 -31
- package/dist/projects-overview/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.js +1 -1
- package/dist/search/Search.d.ts +2 -4
- package/dist/search/Search.js +67 -44
- package/dist/search/components/ElementsColumn.css.js +6 -6
- package/dist/search/components/ElementsColumn.js +93 -60
- package/dist/search/components/PickView.d.ts +3 -1
- package/dist/search/components/PickView.js +12 -7
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +2 -2
- package/dist/search/components/ViewsColum.d.ts +2 -1
- package/dist/search/components/ViewsColum.js +39 -35
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +12 -12
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.d.ts +1 -6
- package/dist/search/hooks.js +15 -9
- package/dist/search/searchActor.d.ts +12 -2
- package/dist/search/searchActor.js +60 -4
- package/dist/shadowroot/ShadowRoot.d.ts +5 -2
- package/dist/shadowroot/ShadowRoot.js +25 -22
- package/dist/shadowroot/styles.css.d.ts +0 -2
- package/dist/shadowroot/styles.css.js +4 -36
- package/dist/styles-font.css2.js +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +10 -6
- package/dist/utils/xyflow.d.ts +27 -6
- package/dist/utils/xyflow.js +68 -23
- package/package.json +39 -37
- package/panda.buildinfo.json +226 -161
- package/styles-font.css +1 -1
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -51974
- package/bundle/package.json +0 -4
- package/dist/editor/__tests__/fixture.d.ts +0 -205
- package/dist/editor/editorActor.d.ts +0 -653
- package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
- package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
- package/dist/overlays/relationships-browser/custom/styles.css.d.ts +0 -1
- package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -35,15 +35,13 @@ You need to prepare it and wrap your diagram with`LikeC4ModelProvider` component
|
|
|
35
35
|
|
|
36
36
|
See [📖 Documentation](https://likec4.dev/tooling/react/#likec4modelprovider) for examples.
|
|
37
37
|
|
|
38
|
-
## Bundled version
|
|
39
|
-
|
|
40
|
-
The easiest way to use this package is the bundled version.\
|
|
41
|
-
Diagram renders inside shadow DOM and has its own styles.
|
|
42
|
-
|
|
43
38
|
### LikeC4View
|
|
44
39
|
|
|
40
|
+
The easiest way to use this package is the `LikeC4View` component.\
|
|
41
|
+
It renders inside shadow DOM and has its own styles.
|
|
42
|
+
|
|
45
43
|
```tsx
|
|
46
|
-
import { LikeC4ModelProvider, LikeC4View } from '@likec4/diagram
|
|
44
|
+
import { LikeC4ModelProvider, LikeC4View } from '@likec4/diagram'
|
|
47
45
|
/**
|
|
48
46
|
* See https://likec4.dev/tooling/react/#likec4modelprovider
|
|
49
47
|
*/
|
|
@@ -68,7 +66,7 @@ See [LikeC4ViewProps](./src/LikeC4View.tsx) for available props.
|
|
|
68
66
|
You may need to import icons, if you use built-in node renderers.
|
|
69
67
|
|
|
70
68
|
```tsx
|
|
71
|
-
import { type ElementIconRenderer, LikeC4, LikeC4ModelProvider, LikeC4View } from '@likec4/diagram
|
|
69
|
+
import { type ElementIconRenderer, LikeC4, LikeC4ModelProvider, LikeC4View } from '@likec4/diagram'
|
|
72
70
|
import { lazy, Suspense } from 'react'
|
|
73
71
|
|
|
74
72
|
// Better to lazy load icons, bundle is quite large at the moment
|
|
@@ -100,7 +98,7 @@ function App() {
|
|
|
100
98
|
Component works in most usecases, but if you need more - use `ReactLikeC4`:
|
|
101
99
|
|
|
102
100
|
```tsx
|
|
103
|
-
import { ReactLikeC4, LikeC4ModelProvider } from '@likec4/diagram
|
|
101
|
+
import { ReactLikeC4, LikeC4ModelProvider } from '@likec4/diagram'
|
|
104
102
|
|
|
105
103
|
function App() {
|
|
106
104
|
const [viewId, setViewId] = useState('index')
|
|
@@ -161,7 +159,7 @@ Here are the options:
|
|
|
161
159
|
> Layers order is important.
|
|
162
160
|
|
|
163
161
|
3. Font.\
|
|
164
|
-
LikeC4Diagram uses [`IBM Plex Sans`](https://fontsource.org/fonts/ibm-plex-sans) by default.\
|
|
162
|
+
LikeC4Diagram uses [`IBM Plex Sans Variable`](https://fontsource.org/fonts/ibm-plex-sans) by default.\
|
|
165
163
|
You can import it from [fontsource](https://fontsource.org/fonts/ibm-plex-sans) or any other CDN, bundle, or import:
|
|
166
164
|
|
|
167
165
|
```css
|
|
@@ -279,7 +277,7 @@ function App() {
|
|
|
279
277
|
### Custom node renderer
|
|
280
278
|
|
|
281
279
|
LikeC4Diagram can use custom node renderers.\
|
|
282
|
-
Compose custom nodes renderers using primitives from `@likec4/diagram/custom
|
|
280
|
+
Compose custom nodes renderers using primitives from `@likec4/diagram/custom`.\
|
|
283
281
|
See [customNodes.tsx](./src/custom/customNodes.tsx) for examples.
|
|
284
282
|
|
|
285
283
|
```tsx
|
package/dist/LikeC4Diagram.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Any } from '@likec4/core/types';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
4
|
import { LikeC4DiagramEventHandlers, LikeC4DiagramProperties } from './LikeC4Diagram.props';
|
|
4
5
|
export type LikeC4DiagramProps<A extends Any = Any> = PropsWithChildren<LikeC4DiagramProperties<A> & LikeC4DiagramEventHandlers<A>>;
|
|
5
6
|
/**
|
|
@@ -8,4 +9,4 @@ export type LikeC4DiagramProps<A extends Any = Any> = PropsWithChildren<LikeC4Di
|
|
|
8
9
|
*
|
|
9
10
|
* Use {@link ReactLikeC4} or {@link LikeC4View} for ready-to-use component
|
|
10
11
|
*/
|
|
11
|
-
export declare function LikeC4Diagram<A extends Any = Any>({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu, onOpenSource, onLogoClick, onLayoutTypeChange, onInitialized, view, className, controls, fitView, fitViewPadding: _fitViewPadding, pannable, zoomable, background, enableElementTags, enableFocusMode, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableCompareWithLatest, nodesSelectable, enableNotations, showNavigationButtons, enableDynamicViewWalkthrough, dynamicViewVariant, enableSearch, initialWidth, initialHeight, reduceGraphics, renderIcon, where, reactFlowProps, renderNodes, children, }: LikeC4DiagramProps<A>):
|
|
12
|
+
export declare function LikeC4Diagram<A extends Any = Any>({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu, onOpenSource, onLogoClick, onLayoutTypeChange, onInitialized, view, className, controls, fitView, fitViewPadding: _fitViewPadding, pannable, zoomable, background, enableElementTags, enableFocusMode, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableCompareWithLatest, nodesSelectable, enableNotations, showNavigationButtons, enableDynamicViewWalkthrough, dynamicViewVariant, enableSearch, enableNotes, initialWidth, initialHeight, reduceGraphics, renderIcon, where, reactFlowProps, renderNodes, children, }: LikeC4DiagramProps<A>): JSX.Element;
|
package/dist/LikeC4Diagram.js
CHANGED
|
@@ -2,17 +2,19 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useCustomCompareMemo } from '@react-hookz/web';
|
|
3
3
|
import { ReactFlowProvider } from '@xyflow/react';
|
|
4
4
|
import { deepEqual } from 'fast-equals';
|
|
5
|
-
import { useRef } from 'react';
|
|
6
|
-
import { isPlainObject, mapValues } from 'remeda';
|
|
5
|
+
import { useRef, Profiler } from 'react';
|
|
6
|
+
import { isEmptyish, isPlainObject, mapValues } from 'remeda';
|
|
7
7
|
import { RootContainer } from './components/RootContainer.js';
|
|
8
|
+
import { CurrentViewModelProvider } from './context/CurrentViewModelProvider.js';
|
|
8
9
|
import { TagStylesProvider } from './context/TagStylesContext.js';
|
|
9
10
|
import { useId } from './hooks/useId.js';
|
|
11
|
+
import { useOptionalLikeC4Model } from './context/LikeC4ModelContext.js';
|
|
10
12
|
import { LikeC4DiagramUI } from './likec4diagram/DiagramUI.js';
|
|
11
13
|
import { LikeC4DiagramXYFlow } from './likec4diagram/DiagramXYFlow.js';
|
|
12
14
|
import { DiagramActorProvider } from './likec4diagram/state/DiagramActorProvider.js';
|
|
13
15
|
import { LikeC4Styles } from './LikeC4Styles.js';
|
|
14
16
|
import { pickViewBounds } from './utils/view-bounds.js';
|
|
15
|
-
import {
|
|
17
|
+
import { useOptionalLikeC4Editor } from './editor/LikeC4EditorProvider.js';
|
|
16
18
|
import { MinZoom, MaxZoom, FitViewPaddings } from './base/const.js';
|
|
17
19
|
import { EnsureMantine } from './context/EnsureMantine.js';
|
|
18
20
|
import { FramerMotionConfig } from './context/FramerMotionConfig.js';
|
|
@@ -20,6 +22,8 @@ import { IconRendererProvider } from './context/IconRenderer.js';
|
|
|
20
22
|
import { DiagramFeatures } from './context/DiagramFeatures.js';
|
|
21
23
|
import { DiagramEventHandlers } from './context/DiagramEventHandlers.js';
|
|
22
24
|
|
|
25
|
+
const noop = () => {
|
|
26
|
+
};
|
|
23
27
|
function LikeC4Diagram({
|
|
24
28
|
onCanvasClick,
|
|
25
29
|
onCanvasContextMenu,
|
|
@@ -53,6 +57,7 @@ function LikeC4Diagram({
|
|
|
53
57
|
enableDynamicViewWalkthrough = false,
|
|
54
58
|
dynamicViewVariant,
|
|
55
59
|
enableSearch = false,
|
|
60
|
+
enableNotes = true,
|
|
56
61
|
initialWidth,
|
|
57
62
|
initialHeight,
|
|
58
63
|
reduceGraphics = "auto",
|
|
@@ -64,7 +69,10 @@ function LikeC4Diagram({
|
|
|
64
69
|
}) {
|
|
65
70
|
const id = useId();
|
|
66
71
|
const initialRef = useRef(null);
|
|
67
|
-
const
|
|
72
|
+
const optionalLikeC4Model = useOptionalLikeC4Model();
|
|
73
|
+
enableCompareWithLatest = enableCompareWithLatest && !!onLayoutTypeChange && !!optionalLikeC4Model && !isEmptyish(optionalLikeC4Model.$data.manualLayouts);
|
|
74
|
+
const hasLikeC4Model = !!optionalLikeC4Model;
|
|
75
|
+
const hasEditor = !!useOptionalLikeC4Editor();
|
|
68
76
|
const readonly = !hasEditor;
|
|
69
77
|
nodesSelectable ??= hasEditor || enableFocusMode || !!onNavigateTo || !!onNodeClick;
|
|
70
78
|
const bounds = pickViewBounds(view, dynamicViewVariant);
|
|
@@ -84,90 +92,86 @@ function LikeC4Diagram({
|
|
|
84
92
|
initialMinZoom: MinZoom
|
|
85
93
|
};
|
|
86
94
|
}
|
|
87
|
-
const isReducedGraphicsMode = reduceGraphics === "auto" ? pannable &&
|
|
88
|
-
return /* @__PURE__ */ jsx(EnsureMantine, { children: /* @__PURE__ */ jsx(
|
|
89
|
-
|
|
95
|
+
const isReducedGraphicsMode = reduceGraphics === "auto" ? pannable && view.bounds.width * view.bounds.height > 16e6 && view.nodes.some((n) => n.children?.length > 0) : reduceGraphics;
|
|
96
|
+
return /* @__PURE__ */ jsx(Profiler, { id: "LikeC4Diagram", onRender: noop, children: /* @__PURE__ */ jsx(EnsureMantine, { children: /* @__PURE__ */ jsx(FramerMotionConfig, { reducedMotion: isReducedGraphicsMode ? "always" : void 0, children: /* @__PURE__ */ jsx(IconRendererProvider, { value: renderIcon ?? null, children: /* @__PURE__ */ jsx(
|
|
97
|
+
DiagramFeatures,
|
|
90
98
|
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
features: {
|
|
100
|
+
enableFitView: fitView,
|
|
101
|
+
enableEditor: hasEditor,
|
|
102
|
+
enableReadOnly: readonly,
|
|
103
|
+
enableFocusMode,
|
|
104
|
+
enableNavigateTo: !!onNavigateTo,
|
|
105
|
+
enableElementDetails: enableElementDetails && hasLikeC4Model,
|
|
106
|
+
enableRelationshipDetails: enableRelationshipDetails && hasLikeC4Model,
|
|
107
|
+
enableRelationshipBrowser: enableRelationshipBrowser && hasLikeC4Model,
|
|
108
|
+
enableSearch: enableSearch && hasLikeC4Model,
|
|
109
|
+
enableNavigationButtons: showNavigationButtons && !!onNavigateTo,
|
|
110
|
+
enableDynamicViewWalkthrough: view._type === "dynamic" && enableDynamicViewWalkthrough,
|
|
111
|
+
enableNotations,
|
|
112
|
+
enableVscode: !!onOpenSource,
|
|
113
|
+
enableControls: controls,
|
|
114
|
+
enableElementTags,
|
|
115
|
+
enableCompareWithLatest,
|
|
116
|
+
enableNotes
|
|
117
|
+
},
|
|
118
|
+
children: /* @__PURE__ */ jsxs(
|
|
119
|
+
DiagramEventHandlers,
|
|
94
120
|
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
enableVscode: !!onOpenSource,
|
|
109
|
-
enableControls: controls,
|
|
110
|
-
enableElementTags,
|
|
111
|
-
enableCompareWithLatest: enableCompareWithLatest && !!onLayoutTypeChange
|
|
121
|
+
handlers: {
|
|
122
|
+
onCanvasClick,
|
|
123
|
+
onCanvasContextMenu,
|
|
124
|
+
onCanvasDblClick,
|
|
125
|
+
onEdgeClick,
|
|
126
|
+
onEdgeContextMenu,
|
|
127
|
+
onNavigateTo,
|
|
128
|
+
onNodeClick,
|
|
129
|
+
onNodeContextMenu,
|
|
130
|
+
onOpenSource,
|
|
131
|
+
onLogoClick,
|
|
132
|
+
onInitialized,
|
|
133
|
+
onLayoutTypeChange
|
|
112
134
|
},
|
|
113
|
-
children:
|
|
114
|
-
|
|
115
|
-
{
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
onNavigateTo,
|
|
123
|
-
onNodeClick,
|
|
124
|
-
onNodeContextMenu,
|
|
125
|
-
onOpenSource,
|
|
126
|
-
onLogoClick,
|
|
127
|
-
onInitialized,
|
|
128
|
-
onLayoutTypeChange
|
|
129
|
-
},
|
|
130
|
-
children: [
|
|
131
|
-
/* @__PURE__ */ jsx(LikeC4Styles, { id }),
|
|
132
|
-
/* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id}`, children: /* @__PURE__ */ jsx(RootContainer, { id, className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
|
|
133
|
-
ReactFlowProvider,
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ jsx(LikeC4Styles, { id }),
|
|
137
|
+
/* @__PURE__ */ jsx(TagStylesProvider, { rootSelector: `#${id}`, children: /* @__PURE__ */ jsx(RootContainer, { id, className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
|
|
138
|
+
ReactFlowProvider,
|
|
139
|
+
{
|
|
140
|
+
fitView,
|
|
141
|
+
...initialRef.current,
|
|
142
|
+
children: /* @__PURE__ */ jsx(
|
|
143
|
+
DiagramActorProvider,
|
|
134
144
|
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
/* @__PURE__ */ jsx(LikeC4DiagramUI, {})
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
)
|
|
145
|
+
id,
|
|
146
|
+
view,
|
|
147
|
+
zoomable,
|
|
148
|
+
pannable,
|
|
149
|
+
fitViewPadding,
|
|
150
|
+
nodesDraggable: hasEditor,
|
|
151
|
+
nodesSelectable,
|
|
152
|
+
where: where ?? null,
|
|
153
|
+
dynamicViewVariant,
|
|
154
|
+
children: /* @__PURE__ */ jsxs(CurrentViewModelProvider, { children: [
|
|
155
|
+
/* @__PURE__ */ jsx(
|
|
156
|
+
LikeC4DiagramXYFlow,
|
|
157
|
+
{
|
|
158
|
+
background,
|
|
159
|
+
reactFlowProps,
|
|
160
|
+
renderNodes,
|
|
161
|
+
children
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ jsx(LikeC4DiagramUI, {})
|
|
165
|
+
] })
|
|
162
166
|
}
|
|
163
|
-
)
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
) }) })
|
|
170
|
+
]
|
|
167
171
|
}
|
|
168
|
-
)
|
|
172
|
+
)
|
|
169
173
|
}
|
|
170
|
-
) });
|
|
174
|
+
) }) }) }) });
|
|
171
175
|
}
|
|
172
176
|
const toLiteralPaddingWithUnit = (value) => {
|
|
173
177
|
if (typeof value === "number") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DiagramEdge, DiagramNode, DynamicViewDisplayVariant, LayoutedView, LayoutType,
|
|
1
|
+
import { DiagramEdge, DiagramNode, DynamicViewDisplayVariant, LayoutedView, LayoutType, WhereOperator } from '@likec4/core/types';
|
|
2
2
|
import { ReactFlowProps } from '@xyflow/react';
|
|
3
3
|
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
4
4
|
import { CamelCasedProperties, SetRequired } from 'type-fest';
|
|
@@ -183,6 +183,12 @@ export interface LikeC4DiagramProperties<A extends Any = Unknown> {
|
|
|
183
183
|
* @default false
|
|
184
184
|
*/
|
|
185
185
|
enableElementTags?: boolean | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Display element notes, if they are present in the view
|
|
188
|
+
*
|
|
189
|
+
* @default true
|
|
190
|
+
*/
|
|
191
|
+
enableNotes?: boolean | undefined;
|
|
186
192
|
/**
|
|
187
193
|
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
188
194
|
* Enable it if you have a large or static view
|
|
@@ -194,6 +200,8 @@ export interface LikeC4DiagramProperties<A extends Any = Unknown> {
|
|
|
194
200
|
/**
|
|
195
201
|
* Render icon for an element, bundled or remote
|
|
196
202
|
* By default, if icon is http:// or https://, it will be rendered as an image
|
|
203
|
+
*
|
|
204
|
+
* Consider using `IconRendererProvider`
|
|
197
205
|
*/
|
|
198
206
|
renderIcon?: ElementIconRenderer | undefined;
|
|
199
207
|
/**
|
|
@@ -234,11 +242,7 @@ export type OnEdgeClick<A extends Any = Unknown> = (edge: DiagramEdge<A>, event:
|
|
|
234
242
|
* On pane/canvas click (not on any node or edge)
|
|
235
243
|
*/
|
|
236
244
|
export type OnCanvasClick = (event: ReactMouseEvent) => void;
|
|
237
|
-
export type OnCanvasContextMenu = (event: ReactMouseEvent
|
|
238
|
-
export type ChangeEvent = {
|
|
239
|
-
change: ViewChange;
|
|
240
|
-
};
|
|
241
|
-
export type OnChange = (event: ChangeEvent) => void;
|
|
245
|
+
export type OnCanvasContextMenu = (event: ReactMouseEvent) => void;
|
|
242
246
|
export type OnInitialized = (params: {
|
|
243
247
|
diagram: DiagramApi;
|
|
244
248
|
xyflow: XYFlowInstance;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LikeC4Model } from '@likec4/core/model';
|
|
2
|
-
import { aux } from '@likec4/core/types';
|
|
3
2
|
import { PropsWithChildren } from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
|
+
export interface LikeC4ModelProviderProps {
|
|
5
|
+
likec4model: LikeC4Model<any>;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Ensures LikeC4Model context
|
|
9
9
|
*/
|
|
10
|
-
export declare function LikeC4ModelProvider
|
|
10
|
+
export declare function LikeC4ModelProvider({ children, likec4model, }: PropsWithChildren<LikeC4ModelProviderProps>): JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { LikeC4ModelContextProvider } from './context/LikeC4ModelContext.js';
|
|
3
3
|
|
|
4
4
|
function LikeC4ModelProvider({
|
|
5
5
|
children,
|
|
6
6
|
likec4model
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
+
return /* @__PURE__ */ jsx(LikeC4ModelContextProvider, { value: likec4model, children });
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { LikeC4ModelProvider };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
1
2
|
import { Simplify } from 'type-fest';
|
|
2
3
|
import { ProjectsOverviewProps } from './projects-overview';
|
|
3
|
-
export type LikeC4ProjectsOverviewProps = Simplify<
|
|
4
|
+
export type LikeC4ProjectsOverviewProps = Simplify<ProjectsOverviewProps & {
|
|
4
5
|
className?: string;
|
|
5
6
|
onSelectProject?: ProjectsOverviewProps['onNavigateToProject'];
|
|
6
7
|
}>;
|
|
7
|
-
export declare function LikeC4ProjectsOverview({ view, className, onNavigateToProject, ...props }: LikeC4ProjectsOverviewProps):
|
|
8
|
+
export declare function LikeC4ProjectsOverview({ view, className, onNavigateToProject, ...props }: LikeC4ProjectsOverviewProps): JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LikeC4Project, ProjectId } from '@likec4/core/types';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
4
|
export interface LikeC4ProjectsProviderProps {
|
|
4
5
|
/**
|
|
5
6
|
* Projects to be used in the navigation panel.
|
|
@@ -14,4 +15,4 @@ export interface LikeC4ProjectsProviderProps {
|
|
|
14
15
|
/**
|
|
15
16
|
* Ensures LikeC4Projects context
|
|
16
17
|
*/
|
|
17
|
-
export declare function LikeC4ProjectsProvider({ children, projects, onProjectChange: _onProjectChange, }: PropsWithChildren<LikeC4ProjectsProviderProps>):
|
|
18
|
+
export declare function LikeC4ProjectsProvider({ children, projects, onProjectChange: _onProjectChange, }: PropsWithChildren<LikeC4ProjectsProviderProps>): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { deepEqual } from 'fast-equals';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { useOptionalProjectsContext, LikeC4ProjectsContextProvider } from './context/LikeC4ProjectsContext.js';
|
|
5
5
|
import { useCallbackRef } from './hooks/useCallbackRef.js';
|
|
6
6
|
|
|
7
7
|
function LikeC4ProjectsProvider({
|
|
@@ -9,18 +9,20 @@ function LikeC4ProjectsProvider({
|
|
|
9
9
|
projects,
|
|
10
10
|
onProjectChange: _onProjectChange
|
|
11
11
|
}) {
|
|
12
|
-
const outerScope =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const outerScope = useOptionalProjectsContext();
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (outerScope) {
|
|
15
|
+
console.warn("LikeC4ProjectsProvider should not be nested inside another one");
|
|
16
|
+
}
|
|
17
|
+
}, []);
|
|
16
18
|
const onProjectChange = useCallbackRef(_onProjectChange);
|
|
17
19
|
const [value, setValue] = useState(() => ({ projects, onProjectChange }));
|
|
18
20
|
useEffect(() => {
|
|
19
21
|
setValue((current) => {
|
|
20
|
-
return deepEqual(current.projects, projects) ? current : {
|
|
22
|
+
return deepEqual(current.projects, projects) ? current : { ...current, projects };
|
|
21
23
|
});
|
|
22
24
|
}, [projects]);
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
+
return /* @__PURE__ */ jsx(LikeC4ProjectsContextProvider, { value, children });
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export { LikeC4ProjectsProvider };
|
package/dist/LikeC4Styles.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
export declare function LikeC4Styles({ id }: {
|
|
3
3
|
id: string;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* @internal Memoized styles gives a performance boost during development
|
|
7
|
-
*/
|
|
4
|
+
}): JSX.Element;
|
package/dist/LikeC4Styles.js
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useMantineStyleNonce } from '@mantine/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useMemo, memo } from 'react';
|
|
4
|
+
import { pipe, entries, map, join } from 'remeda';
|
|
5
|
+
import { MAX_COMPOUND_DEPTH } from './base/const.js';
|
|
6
6
|
import { useLikeC4Styles } from './hooks/useLikeC4Styles.js';
|
|
7
7
|
|
|
8
8
|
const scheme = (scheme2) => `[data-mantine-color-scheme="${scheme2}"]`;
|
|
9
9
|
const whenDark = scheme("dark");
|
|
10
|
-
const MAX_DEPTH = 5;
|
|
11
10
|
const generateCompoundColors = (rootSelector, name, colors, depth) => {
|
|
12
|
-
const
|
|
13
|
-
scale(color, {
|
|
14
|
-
l: -22 - 5 * depth,
|
|
15
|
-
s: -10 - 6 * depth
|
|
16
|
-
})
|
|
17
|
-
);
|
|
18
|
-
const compoundLightColor = (color) => toHex(
|
|
19
|
-
scale(color, {
|
|
20
|
-
l: -20 - 3 * depth,
|
|
21
|
-
s: -3 - 6 * depth
|
|
22
|
-
})
|
|
23
|
-
);
|
|
24
|
-
const selector = `:where(${rootSelector} [data-likec4-color="${name}"][data-compound-depth="${depth}"])`;
|
|
11
|
+
const selector = `${rootSelector} :is([data-likec4-color="${name}"][data-compound-depth="${depth}"])`;
|
|
25
12
|
return `
|
|
26
13
|
${selector} {
|
|
27
|
-
--likec4-palette-fill: ${
|
|
28
|
-
--likec4-palette-stroke: ${
|
|
14
|
+
--likec4-palette-fill: ${colors.fill};
|
|
15
|
+
--likec4-palette-stroke: ${colors.stroke};
|
|
29
16
|
}
|
|
30
|
-
|
|
31
|
-
--likec4-palette-fill: ${compoundDarkColor(colors.elements.fill)};
|
|
32
|
-
--likec4-palette-stroke: ${compoundDarkColor(colors.elements.stroke)};
|
|
33
|
-
}
|
|
34
|
-
`.trim();
|
|
17
|
+
`;
|
|
35
18
|
};
|
|
36
|
-
function toStyle(
|
|
19
|
+
function toStyle(styles, params) {
|
|
20
|
+
const { rootSelector, name, colors } = params;
|
|
37
21
|
const { elements, relationships } = colors;
|
|
38
|
-
const selector =
|
|
22
|
+
const selector = `${rootSelector} :is([data-likec4-color=${name}])`;
|
|
39
23
|
return [
|
|
40
24
|
`
|
|
41
25
|
${selector} {
|
|
@@ -46,38 +30,55 @@ ${selector} {
|
|
|
46
30
|
--likec4-palette-relation-stroke: ${relationships.line};
|
|
47
31
|
--likec4-palette-relation-label: ${relationships.label};
|
|
48
32
|
--likec4-palette-relation-label-bg: ${relationships.labelBg};
|
|
49
|
-
--likec4-palette-relation-stroke-selected: ${
|
|
33
|
+
--likec4-palette-relation-stroke-selected: oklch(from ${relationships.line} calc(l - 0.15) c h);
|
|
50
34
|
}
|
|
51
35
|
${whenDark} ${selector} {
|
|
52
|
-
--likec4-palette-relation-stroke-selected: ${
|
|
36
|
+
--likec4-palette-relation-stroke-selected: oklch(from ${relationships.line} calc(l + 0.15) c h);
|
|
53
37
|
}
|
|
54
38
|
|
|
55
|
-
|
|
56
|
-
...
|
|
57
|
-
|
|
39
|
+
`,
|
|
40
|
+
...styles.colorsForCompounds(elements, MAX_COMPOUND_DEPTH).map(
|
|
41
|
+
(colors2, depth) => generateCompoundColors(rootSelector, name, colors2, depth + 1)
|
|
42
|
+
)
|
|
43
|
+
].map((s) => s.trim()).join("\n");
|
|
58
44
|
}
|
|
59
|
-
function generateBuiltInColorStyles(
|
|
45
|
+
function generateBuiltInColorStyles(styles, rootSelector) {
|
|
60
46
|
return pipe(
|
|
61
|
-
theme.colors,
|
|
47
|
+
styles.theme.colors,
|
|
62
48
|
entries(),
|
|
63
|
-
map(
|
|
49
|
+
map(
|
|
50
|
+
([name, colors]) => toStyle(styles, {
|
|
51
|
+
rootSelector,
|
|
52
|
+
name,
|
|
53
|
+
colors
|
|
54
|
+
})
|
|
55
|
+
),
|
|
64
56
|
join("\n")
|
|
65
57
|
);
|
|
66
58
|
}
|
|
67
|
-
|
|
59
|
+
function LikeC4Styles({ id }) {
|
|
68
60
|
const rootSelector = `#${id}`;
|
|
69
61
|
const nonce = useMantineStyleNonce()?.();
|
|
70
|
-
const
|
|
71
|
-
const colorsStyles = generateBuiltInColorStyles(rootSelector,
|
|
62
|
+
const $styles = useLikeC4Styles();
|
|
63
|
+
const colorsStyles = useMemo(() => generateBuiltInColorStyles($styles, rootSelector), [rootSelector, $styles]);
|
|
72
64
|
return /* @__PURE__ */ jsx(
|
|
73
|
-
|
|
65
|
+
MemoizedStyle,
|
|
74
66
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
nonce
|
|
67
|
+
id,
|
|
68
|
+
nonce,
|
|
69
|
+
colorsStyles
|
|
79
70
|
}
|
|
80
71
|
);
|
|
81
|
-
}
|
|
72
|
+
}
|
|
73
|
+
const MemoizedStyle = memo(({ id, nonce, colorsStyles }) => /* @__PURE__ */ jsx(
|
|
74
|
+
"style",
|
|
75
|
+
{
|
|
76
|
+
type: "text/css",
|
|
77
|
+
"data-likec4-colors": id,
|
|
78
|
+
dangerouslySetInnerHTML: { __html: colorsStyles },
|
|
79
|
+
nonce
|
|
80
|
+
}
|
|
81
|
+
));
|
|
82
|
+
MemoizedStyle.displayName = "MemoizedStyle";
|
|
82
83
|
|
|
83
84
|
export { LikeC4Styles };
|
package/dist/LikeC4View.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
3
|
import { ElementIconRenderer, NodeRenderers, OverrideReactFlowProps, PaddingWithUnit, ViewPadding } from './LikeC4Diagram.props';
|
|
3
4
|
import type * as t from '@likec4/core/types';
|
|
4
5
|
export interface LikeC4ViewProps<A extends t.aux.Any = t.aux.UnknownLayouted> {
|
|
@@ -6,6 +7,14 @@ export interface LikeC4ViewProps<A extends t.aux.Any = t.aux.UnknownLayouted> {
|
|
|
6
7
|
* View to display.
|
|
7
8
|
*/
|
|
8
9
|
viewId: t.aux.ViewId<A>;
|
|
10
|
+
/**
|
|
11
|
+
* Layout to display
|
|
12
|
+
* - `auto`: auto-layouted from the current sources
|
|
13
|
+
* - `manual`: manually layouted (if available, falls back to `auto`)
|
|
14
|
+
*
|
|
15
|
+
* @default 'manual'
|
|
16
|
+
*/
|
|
17
|
+
layoutType?: t.LayoutType | undefined;
|
|
9
18
|
/**
|
|
10
19
|
* Enable/disable panning
|
|
11
20
|
* @default false
|
|
@@ -128,6 +137,12 @@ export interface LikeC4ViewProps<A extends t.aux.Any = t.aux.UnknownLayouted> {
|
|
|
128
137
|
* @default enableRelationshipDetails
|
|
129
138
|
*/
|
|
130
139
|
enableRelationshipBrowser?: boolean | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Display element notes, if they are present in the view
|
|
142
|
+
*
|
|
143
|
+
* @default false
|
|
144
|
+
*/
|
|
145
|
+
enableNotes?: boolean | undefined;
|
|
131
146
|
/**
|
|
132
147
|
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
133
148
|
*
|
|
@@ -235,6 +250,12 @@ export interface LikeC4BrowserProps {
|
|
|
235
250
|
* @default true
|
|
236
251
|
*/
|
|
237
252
|
enableCompareWithLatest?: boolean | undefined;
|
|
253
|
+
/**
|
|
254
|
+
* Display element notes, if they are present in the view
|
|
255
|
+
*
|
|
256
|
+
* @default true
|
|
257
|
+
*/
|
|
258
|
+
enableNotes?: boolean | undefined;
|
|
238
259
|
/**
|
|
239
260
|
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
240
261
|
*
|
|
@@ -260,4 +281,4 @@ export interface LikeC4BrowserProps {
|
|
|
260
281
|
*
|
|
261
282
|
* Component is wrapped in ShadowRoot to isolate styles.
|
|
262
283
|
*/
|
|
263
|
-
export declare function LikeC4View<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, className, pannable, zoomable, keepAspectRatio, colorScheme, injectFontCss, controls, background, browser, showNavigationButtons, enableNotations, enableFocusMode, enableDynamicViewWalkthrough, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, reduceGraphics, mantineTheme, styleNonce, style, reactFlowProps, renderNodes, children, ...props }: LikeC4ViewProps<A>):
|
|
284
|
+
export declare function LikeC4View<A extends t.aux.Any = t.aux.UnknownLayouted>({ viewId, className, pannable, zoomable, keepAspectRatio, colorScheme, injectFontCss, controls, layoutType: initialLayoutType, background, browser, showNavigationButtons, enableNotations, enableFocusMode, enableDynamicViewWalkthrough, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableNotes, reduceGraphics, mantineTheme, styleNonce, style, reactFlowProps, renderNodes, children, ...props }: LikeC4ViewProps<A>): JSX.Element;
|