@likec4/diagram 1.57.0 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LikeC4Diagram.js +1 -1
- package/dist/LikeC4Diagram.props.d.ts +1 -1
- package/dist/LikeC4Styles.js +1 -1
- package/dist/LikeC4View.js +2 -2
- package/dist/ReactLikeC4.d.ts +1 -1
- package/dist/base/Base.d.ts +3 -2
- package/dist/base/Base.js +14 -26
- package/dist/base/BaseXYFlow.d.ts +2 -1
- package/dist/base/BaseXYFlow.js +63 -4
- package/dist/base/keyboardZoom.d.ts +3 -0
- package/dist/base/keyboardZoom.js +20 -0
- package/dist/base/updateEdges.js +7 -16
- package/dist/base/updateNodes.js +3 -9
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundActionButton.js +5 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.js +5 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundTitle.d.ts +7 -1
- package/dist/base-primitives/compound/CompoundTitle.js +2 -1
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +2 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +4 -2
- package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -0
- package/dist/base-primitives/edge/EdgeLabel.js +2 -5
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
- package/dist/base-primitives/element/ElementActionButtons.d.ts +2 -1
- package/dist/base-primitives/element/ElementActionButtons.js +4 -1
- package/dist/base-primitives/element/ElementData.d.ts +4 -2
- package/dist/base-primitives/element/ElementData.js +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.js +5 -2
- package/dist/base-primitives/element/ElementNodeContainer.js +1 -1
- package/dist/base-primitives/element/ElementShape.d.ts +1 -1
- package/dist/base-primitives/element/ElementShape.js +3 -0
- package/dist/base-primitives/element/ElementTags.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.js +1 -3
- package/dist/components/ErrorFallback.d.ts +2 -2
- package/dist/components/ErrorFallback.js +3 -5
- package/dist/components/Link.js +6 -6
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +1 -1
- package/dist/components/PortalToContainer.d.ts +1 -1
- package/dist/components/RootContainer.d.ts +1 -1
- package/dist/components/SearchControl.css.js +11 -11
- package/dist/components/SearchControl.d.ts +2 -2
- package/dist/components/ViewNotFound.d.ts +2 -2
- package/dist/context/CurrentViewModelProvider.d.ts +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +1 -1
- package/dist/context/DiagramEventHandlers.d.ts +1 -1
- package/dist/context/EnsureMantine.d.ts +1 -1
- package/dist/context/FramerMotionConfig.d.ts +3 -3
- package/dist/context/FramerMotionConfig.js +2 -2
- package/dist/context/IconRenderer.d.ts +2 -2
- package/dist/context/IconRenderer.js +32 -12
- package/dist/context/LikeC4ModelContext.d.ts +1 -1
- package/dist/context/TagStylesContext.d.ts +4 -3
- package/dist/context/TagStylesContext.js +20 -22
- package/dist/custom/index.d.ts +1 -0
- package/dist/custom/index.js +3 -2
- package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
- package/dist/editor/actor/actions.d.ts +74 -15
- package/dist/editor/actor/actions.js +91 -25
- package/dist/editor/actor/hotkey.d.ts +1 -1
- package/dist/editor/actor/hotkey.js +7 -0
- package/dist/editor/actor/machine.d.ts +4 -6
- package/dist/editor/actor/machine.js +1 -0
- package/dist/editor/actor/setup.d.ts +25 -4
- package/dist/editor/actor/setup.js +8 -6
- package/dist/editor/actor/state.editor.d.ts +64 -14
- package/dist/editor/actor/state.editor.js +12 -11
- package/dist/editor/actor/state.sync-queue.d.ts +283 -91
- package/dist/editor/actor/state.sync-queue.js +93 -56
- package/dist/editor/actor/types.d.ts +6 -1
- package/dist/editor/actor/types.js +1 -1
- package/dist/editor/useEditorActorLogic.js +14 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/safeContext.d.ts +156 -3
- package/dist/hooks/safeContext.js +60 -12
- package/dist/hooks/useCurrentViewModel.js +1 -1
- package/dist/hooks/useDiagram.d.ts +8 -0
- package/dist/hooks/useDiagram.js +9 -2
- package/dist/hooks/useEditorActor.d.ts +5 -0
- package/dist/hooks/useEditorActor.js +4 -3
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- package/dist/hooks/useLikeC4Model.js +1 -1
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +5 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/likec4diagram/DiagramUI.d.ts +1 -1
- package/dist/likec4diagram/DiagramUI.js +19 -6
- package/dist/likec4diagram/DiagramXYFlow.js +54 -17
- package/dist/likec4diagram/convert-to-xyflow.d.ts +3 -5
- package/dist/likec4diagram/convert-to-xyflow.js +29 -10
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +140 -18
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +11 -4
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/edges.css.js +6 -2
- package/dist/likec4diagram/custom/index.d.ts +2 -1
- package/dist/likec4diagram/custom/index.js +5 -3
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +1 -0
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +4 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.js +13 -3
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +0 -4
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +32 -19
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.ts +2 -0
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +234 -0
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
- package/dist/likec4diagram/custom/nodes/nodes.js +20 -5
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +15 -14
- package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.js +11 -20
- package/dist/likec4diagram/state/aligners.js +1 -1
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/assign.js +1 -1
- package/dist/likec4diagram/state/createViewChange.js +2 -1
- package/dist/likec4diagram/state/diagram-api.d.ts +18 -10
- package/dist/likec4diagram/state/diagram-api.js +333 -229
- package/dist/likec4diagram/state/machine.actions.d.ts +1026 -332
- package/dist/likec4diagram/state/machine.actions.js +118 -46
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +123 -51
- package/dist/likec4diagram/state/machine.actions.layout.js +40 -33
- package/dist/likec4diagram/state/machine.d.ts +154 -16
- package/dist/likec4diagram/state/machine.js +5 -41
- package/dist/likec4diagram/state/machine.setup.d.ts +84 -19
- package/dist/likec4diagram/state/machine.setup.js +65 -12
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +59 -33
- package/dist/likec4diagram/state/machine.state.navigating.js +7 -3
- package/dist/likec4diagram/state/machine.state.ready.d.ts +1540 -476
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +294 -53
- package/dist/likec4diagram/state/machine.state.ready.focused.js +3 -3
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +264 -73
- package/dist/likec4diagram/state/machine.state.ready.idle.js +31 -6
- package/dist/likec4diagram/state/machine.state.ready.js +22 -16
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +23 -9
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +288 -84
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +135 -66
- package/dist/likec4diagram/state/types.d.ts +4 -2
- package/dist/likec4diagram/state/utils.d.ts +7 -0
- package/dist/likec4diagram/state/utils.js +36 -34
- package/dist/likec4diagram/types.d.ts +49 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.d.ts +6 -0
- package/dist/likec4diagram/ui/FloatingSequenceActors.js +155 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +2 -2
- package/dist/likec4diagram/ui/index.d.ts +2 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -5
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +519 -0
- package/dist/likec4diagram/ui/sequence-outline/state.d.ts +36 -0
- package/dist/likec4diagram/ui/sequence-outline/state.js +55 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +1 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +116 -62
- package/dist/likec4diagram/xyflow-sequence/_types.d.ts +55 -5
- package/dist/likec4diagram/xyflow-sequence/const.d.ts +5 -5
- package/dist/likec4diagram/xyflow-sequence/const.js +4 -4
- package/dist/likec4diagram/xyflow-sequence/layouter.d.ts +30 -6
- package/dist/likec4diagram/xyflow-sequence/layouter.js +561 -0
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.d.ts → sequence-view-to-xy.d.ts} +8 -2
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.js → sequence-view-to-xy.js} +112 -14
- package/dist/likec4diagram/xyflow-sequence/sequence-view.d.ts +2 -7
- package/dist/likec4diagram/xyflow-sequence/sequence-view.js +144 -0
- package/dist/likec4diagram/xyflow-sequence/utils.d.ts +9 -1
- package/dist/likec4diagram/xyflow-sequence/utils.js +96 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +5 -2
- package/dist/navigationpanel/NavigationPanel.js +58 -59
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +47 -40
- package/dist/navigationpanel/_common.d.ts +2 -2
- package/dist/navigationpanel/_common.js +2 -2
- package/dist/navigationpanel/actor.actions.d.ts +19 -0
- package/dist/navigationpanel/actor.actions.js +45 -0
- package/dist/navigationpanel/actor.d.ts +34 -96
- package/dist/navigationpanel/actor.js +21 -84
- package/dist/navigationpanel/actor.setup.d.ts +98 -0
- package/dist/navigationpanel/actor.setup.js +31 -0
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +4 -5
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.js +7 -8
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
- package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +8 -8
- package/dist/navigationpanel/hooks.d.ts +20 -5
- package/dist/navigationpanel/hooks.js +4 -18
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +2 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -5
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +23 -25
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +5 -5
- package/dist/overlays/Overlays.d.ts +4 -2
- package/dist/overlays/Overlays.js +10 -10
- package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetailsCard.css.js +17 -17
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
- package/dist/overlays/element-details/MetadataValue.js +15 -15
- package/dist/overlays/element-details/TabPanelDeployments.css.js +5 -5
- package/dist/overlays/element-details/TabPanelRelationships.css.js +11 -11
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
- package/dist/overlays/element-details/TabPanelRelationships.js +1 -1
- package/dist/overlays/element-details/TabPanelStructure.css.js +2 -2
- package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +2 -3
- package/dist/overlays/hooks.d.ts +28 -0
- package/dist/overlays/hooks.js +5 -0
- package/dist/overlays/overlay/Overlay.js +34 -25
- package/dist/overlays/overlaysActor.js +0 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
- package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationship-details/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
- package/dist/overlays/relationships-browser/actor.js +79 -78
- package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationships-browser/hooks.js +1 -1
- package/dist/overlays/relationships-browser/layout.js +2 -2
- package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
- package/dist/projects-overview/actor.js +4 -4
- package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
- package/dist/search/Search.d.ts +1 -1
- package/dist/search/Search.js +1 -1
- package/dist/search/XStateSearchAdapter.d.ts +1 -1
- package/dist/search/components/ElementsColumn.css.js +2 -2
- package/dist/search/components/ElementsColumn.d.ts +1 -1
- package/dist/search/components/PickView.d.ts +1 -1
- package/dist/search/components/SearchByTags.d.ts +1 -1
- package/dist/search/components/SearchInput.d.ts +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -3
- package/dist/search/components/ViewsColum.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +23 -23
- package/dist/search/components/styles.css.js +4 -4
- package/dist/shadowroot/ShadowRoot.d.ts +2 -3
- package/dist/shadowroot/ShadowRoot.js +95 -41
- package/dist/shadowroot/index.d.ts +1 -0
- package/dist/styles2.js +1 -1
- package/dist/utils/defineActors.d.ts +21 -0
- package/dist/utils/defineActors.js +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +5 -4
- package/dist/utils/readableText.d.ts +11 -0
- package/dist/utils/readableText.js +18 -0
- package/package.json +30 -43
- package/panda.buildinfo.json +271 -295
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
- package/adhoc-editor/package.json +0 -4
- package/dist/adhoc-editor/EditorPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorPanel.js +0 -106
- package/dist/adhoc-editor/ElementsTree.d.ts +0 -2
- package/dist/adhoc-editor/ElementsTree.js +0 -112
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +0 -4
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +0 -83
- package/dist/adhoc-editor/components/Tree.d.ts +0 -48
- package/dist/adhoc-editor/components/Tree.js +0 -213
- package/dist/adhoc-editor/hooks.d.ts +0 -14
- package/dist/adhoc-editor/hooks.js +0 -34
- package/dist/adhoc-editor/index.d.ts +0 -2
- package/dist/adhoc-editor/index.js +0 -2
- package/dist/adhoc-editor/state/ActorProvider.d.ts +0 -5
- package/dist/adhoc-editor/state/ActorProvider.js +0 -37
- package/dist/adhoc-editor/state/actor.d.ts +0 -13
- package/dist/adhoc-editor/state/actor.editor.d.ts +0 -56
- package/dist/adhoc-editor/state/actor.editor.js +0 -167
- package/dist/adhoc-editor/state/actor.js +0 -14
- package/dist/adhoc-editor/state/actor.layouter.d.ts +0 -51
- package/dist/adhoc-editor/state/actor.layouter.js +0 -54
- package/dist/adhoc-editor/state/actor.types.d.ts +0 -63
- package/dist/adhoc-editor/state/actor.types.js +0 -25
- package/dist/adhoc-editor/state/panel.d.ts +0 -95
- package/dist/adhoc-editor/state/panel.js +0 -124
- package/dist/adhoc-editor/state/utils.d.ts +0 -17
- package/dist/adhoc-editor/state/utils.js +0 -25
- package/dist/adhoc-editor/useElementsTree.d.ts +0 -18
- package/dist/adhoc-editor/useElementsTree.js +0 -98
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +0 -6
- package/dist/shadowroot/styles.css.d.ts +0 -12
- package/dist/shadowroot/styles.css.js +0 -59
|
@@ -17,6 +17,83 @@ import { assertEvent, assign, cancel, enqueueActions, fromPromise, raise, setup
|
|
|
17
17
|
* Root node in 'subjects' column
|
|
18
18
|
*/
|
|
19
19
|
var findRootSubject = (nodes) => nodes.find((n) => n.data.column === "subjects" && isNullish(n.parentId));
|
|
20
|
+
var layouter = fromPromise(async ({ input, self, signal }) => {
|
|
21
|
+
const { subjectId, navigateFromNode, xyflow, xystore, update } = input;
|
|
22
|
+
let { nodes: currentNodes, width, height } = xystore.getState();
|
|
23
|
+
const next = viewToNodesEdge(update);
|
|
24
|
+
const updateXYData = () => {
|
|
25
|
+
const { nodes, edges } = xystore.getState();
|
|
26
|
+
return {
|
|
27
|
+
xynodes: updateNodes(nodes, next.xynodes),
|
|
28
|
+
xyedges: updateEdges(edges, next.xyedges)
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const parent = nonNullable(self._parent);
|
|
32
|
+
let zoom = xyflow.getZoom();
|
|
33
|
+
const maxZoom = Math.max(zoom, 1);
|
|
34
|
+
const nextviewport = getViewportForBounds$1(update.bounds, width, height, MinZoom, maxZoom, ViewPadding);
|
|
35
|
+
const nextSubjectNode = next.xynodes.find((n) => n.type !== "empty" && n.data.column === "subjects" && n.data.fqn === subjectId) ?? findRootSubject(next.xynodes);
|
|
36
|
+
const currentSubjectNode = findRootSubject(currentNodes);
|
|
37
|
+
const existingNode = navigateFromNode ? currentNodes.find((n) => n.id === navigateFromNode) : currentNodes.find((n) => n.type !== "empty" && n.data.column !== "subjects" && n.data.fqn === subjectId);
|
|
38
|
+
if (!nextSubjectNode || !existingNode || nextSubjectNode.type === "empty" || !currentSubjectNode || nextSubjectNode.data.fqn === currentSubjectNode.data.fqn) {
|
|
39
|
+
await xyflow.setViewport(nextviewport);
|
|
40
|
+
return updateXYData();
|
|
41
|
+
}
|
|
42
|
+
const nextSubjectCenter = {
|
|
43
|
+
x: nextSubjectNode.position.x + (nextSubjectNode.initialWidth ?? 0) / 2,
|
|
44
|
+
y: nextSubjectNode.position.y + (nextSubjectNode.initialHeight ?? 0) / 2
|
|
45
|
+
};
|
|
46
|
+
const currentSubjectCenter = getNodeCenter(xyflow.getInternalNode(currentSubjectNode.id));
|
|
47
|
+
const nested = /* @__PURE__ */ new Set();
|
|
48
|
+
currentNodes.forEach((n) => {
|
|
49
|
+
if (n.id === existingNode.id) return;
|
|
50
|
+
if (n.data.column === "subjects") {
|
|
51
|
+
nested.add(n.id);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (n.parentId && (n.parentId === existingNode.id || nested.has(n.parentId))) nested.add(n.id);
|
|
55
|
+
});
|
|
56
|
+
currentNodes = updateNodes(currentNodes, currentNodes.flatMap((n) => {
|
|
57
|
+
if (nested.has(n.id)) return [];
|
|
58
|
+
if (n.id !== existingNode.id) return {
|
|
59
|
+
...n,
|
|
60
|
+
data: {
|
|
61
|
+
...n.data,
|
|
62
|
+
dimmed: n.data.column === "subjects" ? "immediate" : true
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
...omit(n, ["parentId"]),
|
|
67
|
+
position: {
|
|
68
|
+
x: currentSubjectCenter.x - n.initialWidth / 2,
|
|
69
|
+
y: currentSubjectCenter.y - n.initialHeight / 2
|
|
70
|
+
},
|
|
71
|
+
zIndex: ZIndexes.Max,
|
|
72
|
+
hidden: false,
|
|
73
|
+
data: {
|
|
74
|
+
...n.data,
|
|
75
|
+
dimmed: false
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}));
|
|
79
|
+
parent.send({
|
|
80
|
+
type: "update.xydata",
|
|
81
|
+
xynodes: currentNodes,
|
|
82
|
+
xyedges: []
|
|
83
|
+
});
|
|
84
|
+
await delay(120);
|
|
85
|
+
next.xynodes = next.xynodes.map(Base.setDimmed(false));
|
|
86
|
+
if (signal.aborted) return updateXYData();
|
|
87
|
+
const duration = 300;
|
|
88
|
+
xyflow.setCenter(currentSubjectCenter.x, currentSubjectCenter.y, {
|
|
89
|
+
zoom,
|
|
90
|
+
duration,
|
|
91
|
+
interpolate: "smooth"
|
|
92
|
+
});
|
|
93
|
+
await delay(duration);
|
|
94
|
+
await xyflow.setCenter(nextSubjectCenter.x, nextSubjectCenter.y, { zoom });
|
|
95
|
+
return updateXYData();
|
|
96
|
+
});
|
|
20
97
|
var machine = setup({
|
|
21
98
|
types: {
|
|
22
99
|
context: {},
|
|
@@ -25,83 +102,7 @@ var machine = setup({
|
|
|
25
102
|
input: {},
|
|
26
103
|
events: {}
|
|
27
104
|
},
|
|
28
|
-
actors: { layouter
|
|
29
|
-
const { subjectId, navigateFromNode, xyflow, xystore, update } = input;
|
|
30
|
-
let { nodes: currentNodes, width, height } = xystore.getState();
|
|
31
|
-
const next = viewToNodesEdge(update);
|
|
32
|
-
const updateXYData = () => {
|
|
33
|
-
const { nodes, edges } = xystore.getState();
|
|
34
|
-
return {
|
|
35
|
-
xynodes: updateNodes(nodes, next.xynodes),
|
|
36
|
-
xyedges: updateEdges(edges, next.xyedges)
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
const parent = nonNullable(self._parent);
|
|
40
|
-
let zoom = xyflow.getZoom();
|
|
41
|
-
const maxZoom = Math.max(zoom, 1);
|
|
42
|
-
const nextviewport = getViewportForBounds$1(update.bounds, width, height, MinZoom, maxZoom, ViewPadding);
|
|
43
|
-
const nextSubjectNode = next.xynodes.find((n) => n.type !== "empty" && n.data.column === "subjects" && n.data.fqn === subjectId) ?? findRootSubject(next.xynodes);
|
|
44
|
-
const currentSubjectNode = findRootSubject(currentNodes);
|
|
45
|
-
const existingNode = navigateFromNode ? currentNodes.find((n) => n.id === navigateFromNode) : currentNodes.find((n) => n.type !== "empty" && n.data.column !== "subjects" && n.data.fqn === subjectId);
|
|
46
|
-
if (!nextSubjectNode || !existingNode || nextSubjectNode.type === "empty" || !currentSubjectNode || nextSubjectNode.data.fqn === currentSubjectNode.data.fqn) {
|
|
47
|
-
await xyflow.setViewport(nextviewport);
|
|
48
|
-
return updateXYData();
|
|
49
|
-
}
|
|
50
|
-
const nextSubjectCenter = {
|
|
51
|
-
x: nextSubjectNode.position.x + (nextSubjectNode.initialWidth ?? 0) / 2,
|
|
52
|
-
y: nextSubjectNode.position.y + (nextSubjectNode.initialHeight ?? 0) / 2
|
|
53
|
-
};
|
|
54
|
-
const currentSubjectCenter = getNodeCenter(xyflow.getInternalNode(currentSubjectNode.id));
|
|
55
|
-
const nested = /* @__PURE__ */ new Set();
|
|
56
|
-
currentNodes.forEach((n) => {
|
|
57
|
-
if (n.id === existingNode.id) return;
|
|
58
|
-
if (n.data.column === "subjects") {
|
|
59
|
-
nested.add(n.id);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (n.parentId && (n.parentId === existingNode.id || nested.has(n.parentId))) nested.add(n.id);
|
|
63
|
-
});
|
|
64
|
-
currentNodes = updateNodes(currentNodes, currentNodes.flatMap((n) => {
|
|
65
|
-
if (nested.has(n.id)) return [];
|
|
66
|
-
if (n.id !== existingNode.id) return {
|
|
67
|
-
...n,
|
|
68
|
-
data: {
|
|
69
|
-
...n.data,
|
|
70
|
-
dimmed: n.data.column === "subjects" ? "immediate" : true
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
return {
|
|
74
|
-
...omit(n, ["parentId"]),
|
|
75
|
-
position: {
|
|
76
|
-
x: currentSubjectCenter.x - n.initialWidth / 2,
|
|
77
|
-
y: currentSubjectCenter.y - n.initialHeight / 2
|
|
78
|
-
},
|
|
79
|
-
zIndex: ZIndexes.Max,
|
|
80
|
-
hidden: false,
|
|
81
|
-
data: {
|
|
82
|
-
...n.data,
|
|
83
|
-
dimmed: false
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
}));
|
|
87
|
-
parent.send({
|
|
88
|
-
type: "update.xydata",
|
|
89
|
-
xynodes: currentNodes,
|
|
90
|
-
xyedges: []
|
|
91
|
-
});
|
|
92
|
-
await delay(120);
|
|
93
|
-
next.xynodes = next.xynodes.map(Base.setDimmed(false));
|
|
94
|
-
if (signal.aborted) return updateXYData();
|
|
95
|
-
const duration = 300;
|
|
96
|
-
xyflow.setCenter(currentSubjectCenter.x, currentSubjectCenter.y, {
|
|
97
|
-
zoom,
|
|
98
|
-
duration,
|
|
99
|
-
interpolate: "smooth"
|
|
100
|
-
});
|
|
101
|
-
await delay(duration);
|
|
102
|
-
await xyflow.setCenter(nextSubjectCenter.x, nextSubjectCenter.y, { zoom });
|
|
103
|
-
return updateXYData();
|
|
104
|
-
}) },
|
|
105
|
+
actors: { layouter },
|
|
105
106
|
guards: {
|
|
106
107
|
hasViewId: ({ context }) => context.viewId !== null,
|
|
107
108
|
isReady: ({ context }) => context.xyflow !== null && context.xystore !== null && context.layouted !== null,
|
|
@@ -371,4 +372,4 @@ var relationshipsBrowserLogic = machine.createMachine({
|
|
|
371
372
|
exit: dispose()
|
|
372
373
|
});
|
|
373
374
|
//#endregion
|
|
374
|
-
export { relationshipsBrowserLogic };
|
|
375
|
+
export { layouter, relationshipsBrowserLogic };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RelationshipsBrowserTypes as Types } from '../_types';
|
|
2
|
-
export declare const ElementActions: (props: Types.NodeProps<"element">) => import("react
|
|
2
|
+
export declare const ElementActions: (props: Types.NodeProps<"element">) => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RelationshipsBrowserTypes } from '../_types';
|
|
2
|
-
export declare function EmptyNode({ data: { column, }, }: RelationshipsBrowserTypes.NodeProps<'empty'>): import("react
|
|
2
|
+
export declare function EmptyNode({ data: { column, }, }: RelationshipsBrowserTypes.NodeProps<'empty'>): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseNodePropsWithData } from '../../../base';
|
|
2
2
|
import { RelationshipsBrowserTypes } from '../_types';
|
|
3
|
-
export declare function ElementNode(props: RelationshipsBrowserTypes.NodeProps<'element'>): import("react
|
|
4
|
-
export declare function CompoundNode(props: RelationshipsBrowserTypes.NodeProps<'compound'>): import("react
|
|
3
|
+
export declare function ElementNode(props: RelationshipsBrowserTypes.NodeProps<'element'>): import("react").JSX.Element;
|
|
4
|
+
export declare function CompoundNode(props: RelationshipsBrowserTypes.NodeProps<'compound'>): import("react").JSX.Element;
|
|
5
5
|
type ElementPortsProps = BaseNodePropsWithData<Pick<RelationshipsBrowserTypes.ElementNodeData, 'ports' | 'height'>>;
|
|
6
|
-
export declare const ElementPorts: ({ data: { ports, height: h } }: ElementPortsProps) => import("react
|
|
6
|
+
export declare const ElementPorts: ({ data: { ports, height: h } }: ElementPortsProps) => import("react").JSX.Element;
|
|
7
7
|
type CompoundPortsProps = BaseNodePropsWithData<Pick<RelationshipsBrowserTypes.CompoundNodeData, 'ports'>>;
|
|
8
|
-
export declare const CompoundPorts: ({ data }: CompoundPortsProps) => import("react
|
|
8
|
+
export declare const CompoundPorts: ({ data }: CompoundPortsProps) => import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -52,4 +52,4 @@ function useRelationshipsBrowser() {
|
|
|
52
52
|
}), [actor]);
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
|
-
export { RelationshipsBrowserActorContext, useRelationshipsBrowser, useRelationshipsBrowserState };
|
|
55
|
+
export { RelationshipsBrowserActorContext, useRelationshipsBrowser, useRelationshipsBrowserActor, useRelationshipsBrowserState };
|
|
@@ -3,9 +3,9 @@ import { useLikeC4Model } from "../../hooks/useLikeC4Model.js";
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { concat, filter, find, forEachObj, groupBy, map, mapToObj, omit, only, pipe, prop, reduce, sortBy, tap, unique } from "remeda";
|
|
5
5
|
import { DefaultMap, ifind, invariant, nonNullable, toArray } from "@likec4/core/utils";
|
|
6
|
+
import { exact, preferSummary } from "@likec4/core/types";
|
|
6
7
|
import { computeRelationshipsView, treeFromElements } from "@likec4/core/compute-view";
|
|
7
8
|
import dagre from "@dagrejs/dagre";
|
|
8
|
-
import { exact, preferSummary } from "@likec4/core/types";
|
|
9
9
|
//#region src/overlays/relationships-browser/layout.ts
|
|
10
10
|
/**
|
|
11
11
|
* All constants related to the layout
|
|
@@ -423,4 +423,4 @@ function useRelationshipsView(subject, viewId, scope) {
|
|
|
423
423
|
]);
|
|
424
424
|
}
|
|
425
425
|
//#endregion
|
|
426
|
-
export { LayoutRelationshipsViewResult, useRelationshipsView };
|
|
426
|
+
export { LayoutRelationshipsViewResult, layoutRelationshipsView, useRelationshipsView };
|
|
@@ -10,4 +10,4 @@ export type ProjectsOverviewProps = {
|
|
|
10
10
|
onNavigateToProject?: undefined | ((projectId: ProjectId) => void);
|
|
11
11
|
fitViewPadding?: ViewPadding | undefined;
|
|
12
12
|
} & ProjectsOverviewXYProps;
|
|
13
|
-
export declare function ProjectsOverview({ view, onNavigateToProject, fitViewPadding, ...props }: ProjectsOverviewProps): import("react
|
|
13
|
+
export declare function ProjectsOverview({ view, onNavigateToProject, fitViewPadding, ...props }: ProjectsOverviewProps): import("react").JSX.Element;
|
|
@@ -6,9 +6,9 @@ import { ProjectsOverviewViewportPersistence } from "./persistence.js";
|
|
|
6
6
|
import { applyEdgeChanges, applyNodeChanges, getViewportForBounds } from "@xyflow/react";
|
|
7
7
|
import { clamp } from "remeda";
|
|
8
8
|
import { invariant, nonNullable, nonexhaustive } from "@likec4/core";
|
|
9
|
-
import { assertEvent, setup } from "xstate";
|
|
10
9
|
import { animate, mapValue, motionValue, stagger, styleEffect } from "motion";
|
|
11
|
-
import {
|
|
10
|
+
import { assertEvent, setup } from "xstate";
|
|
11
|
+
import { assign as assign$1, emit } from "xstate/actions";
|
|
12
12
|
//#region src/projects-overview/actor.ts
|
|
13
13
|
var machine = setup({
|
|
14
14
|
types: {
|
|
@@ -247,7 +247,7 @@ var projectOverviewLogic = machine.createMachine({
|
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
249
|
],
|
|
250
|
-
on: { "emit.navigate.to": { actions: emit
|
|
250
|
+
on: { "emit.navigate.to": { actions: emit(({ event }) => ({
|
|
251
251
|
...event,
|
|
252
252
|
type: "navigate.to"
|
|
253
253
|
})) } }
|
|
@@ -263,4 +263,4 @@ function sleep(ms) {
|
|
|
263
263
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
264
264
|
}
|
|
265
265
|
//#endregion
|
|
266
|
-
export { projectOverviewLogic };
|
|
266
|
+
export { fitDiagram, onMouseEnterOrLeave, projectOverviewLogic, restoreViewport };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProjectsOverviewTypes } from '../_types';
|
|
2
|
-
export declare function ProjectNode(props: ProjectsOverviewTypes.NodeProps<'project'>): import("react
|
|
2
|
+
export declare function ProjectNode(props: ProjectsOverviewTypes.NodeProps<'project'>): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ProjectsOverviewPanel: () => import("react
|
|
1
|
+
export declare const ProjectsOverviewPanel: () => import("react").JSX.Element;
|
package/dist/search/Search.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const bodyCss: string;
|
|
|
5
5
|
export declare const scrollAreaCss: string;
|
|
6
6
|
export declare const Search: MemoExoticComponent<({ searchActorRef }: {
|
|
7
7
|
searchActorRef: SearchActorRef;
|
|
8
|
-
}) => import("react
|
|
8
|
+
}) => import("react").JSX.Element>;
|
|
9
9
|
/**
|
|
10
10
|
* The shared search panel content used by both diagram and overview search.
|
|
11
11
|
* Must be rendered inside a SearchContext.Provider.
|
package/dist/search/Search.js
CHANGED
|
@@ -194,4 +194,4 @@ var SearchPanelContent = forwardRef((_, ref) => {
|
|
|
194
194
|
});
|
|
195
195
|
SearchPanelContent.displayName = "SearchPanelContent";
|
|
196
196
|
//#endregion
|
|
197
|
-
export { Search, SearchPanelContent, bodyCss, dialogCss };
|
|
197
|
+
export { Search, SearchPanelContent, bodyCss, dialogCss, scrollAreaCss };
|
|
@@ -2,4 +2,4 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { SearchActorRef } from './searchActor';
|
|
3
3
|
export declare function XStateSearchAdapter({ searchActorRef, children, }: PropsWithChildren<{
|
|
4
4
|
searchActorRef: SearchActorRef;
|
|
5
|
-
}>): import("react
|
|
5
|
+
}>): import("react").JSX.Element;
|
|
@@ -32,8 +32,8 @@ var elementId = css({
|
|
|
32
32
|
whiteSpace: "nowrap",
|
|
33
33
|
padding: "[1px 5px]",
|
|
34
34
|
borderRadius: "sm",
|
|
35
|
-
background: `mantine.
|
|
36
|
-
_light: { background: `mantine.
|
|
35
|
+
background: `mantine.dark[9]/30`,
|
|
36
|
+
_light: { background: `mantine.gray[3]/20` }
|
|
37
37
|
});
|
|
38
38
|
var elementIcon = css({
|
|
39
39
|
["--likec4-icon-size"]: "24px",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MemoExoticComponent } from 'react';
|
|
2
|
-
export declare const ElementsColumn: MemoExoticComponent<() => import("react
|
|
2
|
+
export declare const ElementsColumn: MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function SearchByTags(): import("react
|
|
1
|
+
export declare function SearchByTags(): import("react").JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MemoExoticComponent } from 'react';
|
|
2
|
-
export declare const LikeC4SearchInput: MemoExoticComponent<() => import("react
|
|
2
|
+
export declare const LikeC4SearchInput: MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -2,12 +2,12 @@ import { LikeC4Model } from '@likec4/core/model';
|
|
|
2
2
|
import { Fqn } from '@likec4/core/types';
|
|
3
3
|
import { ElementProps, UnstyledButtonProps } from '@mantine/core';
|
|
4
4
|
import { MemoExoticComponent } from 'react';
|
|
5
|
-
export declare const NothingFound: () => import("react
|
|
6
|
-
export declare const ViewsColumn: MemoExoticComponent<() => import("react
|
|
5
|
+
export declare const NothingFound: () => import("react").JSX.Element;
|
|
6
|
+
export declare const ViewsColumn: MemoExoticComponent<() => import("react").JSX.Element>;
|
|
7
7
|
export declare function ViewButton({ className, view, loop, search, focusOnElement, currentViewId, ...props }: {
|
|
8
8
|
view: LikeC4Model.View;
|
|
9
9
|
currentViewId: string;
|
|
10
10
|
search: string;
|
|
11
11
|
loop?: boolean;
|
|
12
12
|
focusOnElement?: Fqn;
|
|
13
|
-
} & UnstyledButtonProps & ElementProps<'button'>): import("react
|
|
13
|
+
} & UnstyledButtonProps & ElementProps<'button'>): import("react").JSX.Element;
|
|
@@ -12,8 +12,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import { first } from "remeda";
|
|
13
13
|
import { Badge, Group, Highlight, Stack, ThemeIcon, UnstyledButton, VisuallyHidden, createScopedKeydownHandler } from "@mantine/core";
|
|
14
14
|
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
15
|
-
import * as m from "motion/react-m";
|
|
16
15
|
import { preferSummary } from "@likec4/core/types";
|
|
16
|
+
import * as m from "motion/react-m";
|
|
17
17
|
//#region src/search/components/ViewsColum.tsx
|
|
18
18
|
var NothingFound = () => /* @__PURE__ */ jsx(Box$1, {
|
|
19
19
|
className: emptyBoX,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SlotRecipeRuntimeFn, SlotRecipeVariantRecord } from '
|
|
1
|
+
import { SlotRecipeRuntimeFn, SlotRecipeVariantRecord } from '../../../styled-system/types';
|
|
2
2
|
export declare const focusable = "likec4-focusable";
|
|
3
3
|
export declare const emptyBoX: string;
|
|
4
4
|
export declare const buttonsva: SlotRecipeRuntimeFn<"title" | "description" | "icon" | "root" | "descriptionColor", SlotRecipeVariantRecord<"title" | "description" | "icon" | "root" | "descriptionColor">>;
|
|
@@ -2,14 +2,14 @@ import { css, sva } from "@likec4/styles/css";
|
|
|
2
2
|
//#region src/search/components/_shared.css.ts
|
|
3
3
|
var buttonFocused = css.raw({
|
|
4
4
|
outline: "none",
|
|
5
|
-
background: "mantine.
|
|
6
|
-
borderColor: "mantine.
|
|
5
|
+
background: "mantine.primary[8]",
|
|
6
|
+
borderColor: "mantine.primary[9]"
|
|
7
7
|
});
|
|
8
8
|
var _treenodefocus = ".mantine-Tree-node:focus > .mantine-Tree-label &";
|
|
9
9
|
var button = css.raw({
|
|
10
10
|
display: "flex",
|
|
11
11
|
width: "100%",
|
|
12
|
-
background: "
|
|
12
|
+
background: "surface.default",
|
|
13
13
|
rounded: "sm",
|
|
14
14
|
padding: `[12px 8px 12px 14px]`,
|
|
15
15
|
minHeight: "60px",
|
|
@@ -18,20 +18,20 @@ var button = css.raw({
|
|
|
18
18
|
borderColor: "default.border",
|
|
19
19
|
_hover: {
|
|
20
20
|
...buttonFocused,
|
|
21
|
-
borderColor: "mantine.
|
|
22
|
-
background: `mantine.
|
|
21
|
+
borderColor: "mantine.primary[9]",
|
|
22
|
+
background: `mantine.primary[8]/60`
|
|
23
23
|
},
|
|
24
24
|
_focus: buttonFocused,
|
|
25
25
|
[_treenodefocus]: buttonFocused,
|
|
26
26
|
_dark: {
|
|
27
27
|
borderColor: "transparent",
|
|
28
|
-
background: `mantine.
|
|
28
|
+
background: `mantine.dark[6]/80`
|
|
29
29
|
},
|
|
30
30
|
_light: {
|
|
31
|
-
background: `mantine.
|
|
31
|
+
background: `mantine.white/80`,
|
|
32
32
|
_hover: {
|
|
33
|
-
borderColor: "mantine.
|
|
34
|
-
backgroundColor: "mantine.
|
|
33
|
+
borderColor: "mantine.primary[6]",
|
|
34
|
+
backgroundColor: "mantine.primary[5]"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -40,11 +40,11 @@ var iconSize = { ref: "var(--likec4-icon-size, 24px)" };
|
|
|
40
40
|
var icon = css.raw({
|
|
41
41
|
color: {
|
|
42
42
|
base: "text.dimmed",
|
|
43
|
-
_light: "mantine.
|
|
44
|
-
_groupHover: "mantine.
|
|
45
|
-
_groupFocus: "mantine.
|
|
43
|
+
_light: "mantine.gray[5]",
|
|
44
|
+
_groupHover: "mantine.primary[0]",
|
|
45
|
+
_groupFocus: "mantine.primary[0]"
|
|
46
46
|
},
|
|
47
|
-
[_treenodefocus]: { color: "mantine.
|
|
47
|
+
[_treenodefocus]: { color: "mantine.primary[0]" },
|
|
48
48
|
flex: `0 0 ${iconSize.ref}`,
|
|
49
49
|
height: iconSize.ref,
|
|
50
50
|
width: iconSize.ref,
|
|
@@ -60,7 +60,7 @@ var icon = css.raw({
|
|
|
60
60
|
pointerEvents: "none"
|
|
61
61
|
},
|
|
62
62
|
[`& img`]: { objectFit: "contain" },
|
|
63
|
-
"&.likec4-shape-icon svg": { strokeWidth: 1.5 }
|
|
63
|
+
"&.likec4-shape-icon svg": { strokeWidth: "[1.5]" }
|
|
64
64
|
});
|
|
65
65
|
var title = css.raw({
|
|
66
66
|
fontSize: "16px",
|
|
@@ -68,19 +68,19 @@ var title = css.raw({
|
|
|
68
68
|
lineHeight: "1.1",
|
|
69
69
|
[`:where([data-disabled]) &`]: { opacity: .4 },
|
|
70
70
|
color: {
|
|
71
|
-
base: "mantine.
|
|
72
|
-
_light: "mantine.
|
|
71
|
+
base: "mantine.dark[1]",
|
|
72
|
+
_light: "mantine.gray[7]",
|
|
73
73
|
_groupHover: {
|
|
74
|
-
base: "mantine.
|
|
74
|
+
base: "mantine.primary[1]",
|
|
75
75
|
_light: "white"
|
|
76
76
|
},
|
|
77
77
|
_groupFocus: {
|
|
78
|
-
base: "mantine.
|
|
78
|
+
base: "mantine.primary[1]",
|
|
79
79
|
_light: "white"
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
[_treenodefocus]: { color: {
|
|
83
|
-
base: "mantine.
|
|
83
|
+
base: "mantine.primary[1]",
|
|
84
84
|
_light: "white"
|
|
85
85
|
} }
|
|
86
86
|
});
|
|
@@ -88,12 +88,12 @@ var descriptionColor = css.raw({
|
|
|
88
88
|
color: {
|
|
89
89
|
base: "text.dimmed",
|
|
90
90
|
_groupHover: {
|
|
91
|
-
base: "mantine.
|
|
92
|
-
_light: "mantine.
|
|
91
|
+
base: "mantine.primary[1]",
|
|
92
|
+
_light: "mantine.primary[0]"
|
|
93
93
|
},
|
|
94
|
-
_groupFocus: "mantine.
|
|
94
|
+
_groupFocus: "mantine.primary[0]"
|
|
95
95
|
},
|
|
96
|
-
[_treenodefocus]: { color: "mantine.
|
|
96
|
+
[_treenodefocus]: { color: "mantine.primary[0]" }
|
|
97
97
|
});
|
|
98
98
|
var description = css.raw(descriptionColor, {
|
|
99
99
|
marginTop: "1",
|
|
@@ -6,12 +6,12 @@ var input = css({
|
|
|
6
6
|
background: {
|
|
7
7
|
base: "transparent",
|
|
8
8
|
_focusWithin: {
|
|
9
|
-
base: `mantine.
|
|
10
|
-
_dark: `mantine.
|
|
9
|
+
base: `mantine.gray[4]/55 !important`,
|
|
10
|
+
_dark: `mantine.dark[5]/55 !important`
|
|
11
11
|
},
|
|
12
12
|
_groupHover: {
|
|
13
|
-
base: "mantine.
|
|
14
|
-
_dark: "mantine.
|
|
13
|
+
base: "mantine.gray[3]/35",
|
|
14
|
+
_dark: "mantine.dark[5]/35"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare function useShadowRoot(): ShadowRoot;
|
|
3
2
|
type ShadowRootProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
3
|
injectFontCss?: boolean | undefined;
|
|
5
|
-
styleNonce?: string | (() => string) | undefined;
|
|
4
|
+
styleNonce?: string | (() => string | undefined) | undefined;
|
|
6
5
|
colorScheme?: 'light' | 'dark' | undefined;
|
|
7
6
|
keepAspectRatio?: false | undefined | {
|
|
8
7
|
width: number;
|
|
@@ -14,5 +13,5 @@ type ShadowRootProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
14
13
|
*/
|
|
15
14
|
theme?: any;
|
|
16
15
|
};
|
|
17
|
-
export declare function ShadowRoot({ children, theme, injectFontCss, styleNonce, colorScheme: explicitColorScheme, keepAspectRatio, ...props }: ShadowRootProps): import("react
|
|
16
|
+
export declare function ShadowRoot({ children, theme, injectFontCss, styleNonce, colorScheme: explicitColorScheme, keepAspectRatio, ...props }: ShadowRootProps): import("react").JSX.Element;
|
|
18
17
|
export {};
|