@likec4/diagram 1.59.2 → 1.59.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -0
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +36 -21
- package/dist/LikeC4Diagram.props.d.ts +23 -0
- package/dist/LikeC4MantineProvider.d.ts +24 -0
- package/dist/LikeC4MantineProvider.js +156 -0
- package/dist/LikeC4ProjectsOverview.js +1 -1
- package/dist/LikeC4ProjectsProvider.d.ts +17 -2
- package/dist/LikeC4Styles.d.ts +13 -3
- package/dist/LikeC4Styles.js +10 -6
- package/dist/LikeC4View.js +2 -2
- package/dist/StaticLikeC4Diagram.d.ts +1 -1
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base/BaseXYFlow.js +19 -9
- package/dist/base/const.d.ts +1 -0
- package/dist/base/const.js +3 -1
- package/dist/base-primitives/Markdown.d.ts +3 -3
- package/dist/base-primitives/compound/CompoundNodeContainer.js +2 -3
- package/dist/base-primitives/compound/CompoundTitle.js +5 -4
- package/dist/base-primitives/compound/actionbtns.css.d.ts +3 -3
- package/dist/base-primitives/compound/actionbtns.css.js +3 -3
- package/dist/base-primitives/element/ElementData.js +6 -1
- package/dist/base-primitives/element/ElementShape.js +9 -10
- package/dist/base-primitives/element/ElementTags.d.ts +2 -2
- package/dist/base-primitives/element/ElementTags.js +5 -5
- package/dist/components/EmptyBox.d.ts +3 -0
- package/dist/components/EmptyBox.js +9 -0
- package/dist/components/ErrorFallback.js +7 -6
- package/dist/components/FloatingWindow.d.ts +18 -0
- package/dist/components/FloatingWindow.js +89 -0
- package/dist/components/Link.js +7 -7
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -6
- package/dist/components/SearchControl.css.js +10 -12
- package/dist/components/ViewIcon.d.ts +11 -0
- package/dist/components/ViewIcon.js +71 -0
- package/dist/context/CurrentViewModelProvider.js +2 -1
- package/dist/context/DiagramEventHandlers.js +4 -2
- package/dist/context/EnsureMantine.js +3 -3
- package/dist/context/IconRenderer.d.ts +2 -1
- package/dist/context/IconRenderer.js +78 -26
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/TagStylesContext.d.ts +11 -4
- package/dist/context/TagStylesContext.js +39 -27
- package/dist/custom/index.d.ts +3 -0
- package/dist/custom/index.js +7 -4
- package/dist/editor/LikeC4EditorCallbacks.d.ts +20 -1
- package/dist/editor/LikeC4EditorCallbacks.js +4 -1
- package/dist/editor/actor/setup.d.ts +1 -0
- package/dist/editor/actor/setup.js +17 -12
- package/dist/editor/actor/state.sync-queue.js +1 -0
- package/dist/editor/applyChangesToManualLayout.js +5 -2
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/useEditorActorLogic.js +10 -3
- package/dist/hooks/safeContext.d.ts +12 -4
- package/dist/hooks/safeContext.js +2 -2
- package/dist/hooks/useCurrentView.js +5 -5
- package/dist/hooks/useDiagram.js +3 -23
- package/dist/hooks/useDiagramCompareLayout.d.ts +16 -6
- package/dist/hooks/useDiagramCompareLayout.js +20 -17
- package/dist/hooks/useEditorActor.js +3 -5
- package/dist/hooks/useLikeC4Model.js +8 -3
- package/dist/hooks/useLikeC4Project.d.ts +4 -3
- package/dist/hooks/useOverlaysActor.d.ts +1 -1
- package/dist/hooks/useUpdateEffect.js +2 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +8 -6
- package/dist/likec4diagram/DiagramUI.js +4 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +6 -0
- package/dist/likec4diagram/DiagramXYFlow.js +33 -19
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +4 -4
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +2 -4
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +1 -3
- package/dist/likec4diagram/custom/edges/edges.css.js +13 -13
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +3 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +2 -2
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +4 -4
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +2 -2
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +8 -5
- package/dist/likec4diagram/custom/nodes/nodes.js +8 -5
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +9 -8
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +3 -2
- package/dist/likec4diagram/relationship-popover/components.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/components.js +6 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +7 -2
- package/dist/likec4diagram/state/DiagramActorProvider.js +20 -4
- package/dist/likec4diagram/state/assign.js +1 -1
- package/dist/likec4diagram/state/createViewChange.js +1 -6
- package/dist/likec4diagram/state/diagram-api.d.ts +2 -2
- package/dist/likec4diagram/state/diagram-api.js +3 -2
- package/dist/likec4diagram/state/machine.actions.js +15 -8
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +7 -5
- package/dist/likec4diagram/state/machine.setup.d.ts +10 -1
- package/dist/likec4diagram/state/machine.setup.js +15 -9
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +2 -26
- package/dist/likec4diagram/state/machine.state.initializing.js +9 -6
- package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
- package/dist/likec4diagram/state/machine.state.ready.d.ts +134 -3
- package/dist/likec4diagram/state/machine.state.ready.js +2 -1
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +106 -1
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +40 -7
- package/dist/likec4diagram/state/utils.d.ts +1 -1
- package/dist/likec4diagram/state/utils.js +7 -4
- package/dist/likec4diagram/ui/FloatingSequenceActors.js +2 -1
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +16 -10
- package/dist/likec4diagram/ui/index.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +13 -15
- package/dist/likec4diagram/ui/notation/NotationPanel.js +9 -9
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.d.ts +9 -0
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.js +81 -0
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.d.ts +11 -0
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.js +70 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.js +106 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.js +140 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.d.ts +17 -0
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.js +83 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +4 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +49 -525
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.d.ts +8 -0
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.js +52 -0
- package/dist/likec4diagram/ui/sequence-outline/StepRow.d.ts +7 -0
- package/dist/likec4diagram/ui/sequence-outline/StepRow.js +190 -0
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.d.ts +238 -0
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.js +94 -0
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.d.ts +21 -0
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.js +71 -0
- package/dist/likec4diagram/ui/sequence-outline/index.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/motion.d.ts +13 -0
- package/dist/likec4diagram/ui/sequence-outline/motion.js +21 -0
- package/dist/likec4diagram/ui/sequence-outline/presentation.d.ts +10 -0
- package/dist/likec4diagram/ui/sequence-outline/presentation.js +80 -0
- package/dist/likec4diagram/ui/sequence-outline/tree.d.ts +9 -0
- package/dist/likec4diagram/ui/sequence-outline/tree.js +67 -0
- package/dist/likec4diagram/ui/sequence-outline/{state.d.ts → types.d.ts} +4 -2
- package/dist/likec4diagram/ui/sequence-outline/types.js +12 -0
- package/dist/likec4diagram/useLayoutConstraints.js +13 -1
- package/dist/likec4diagram/xyflow-sequence/layouter.js +8 -10
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.js +1 -0
- package/dist/likec4diagram/xyflow-sequence/utils.js +0 -1
- package/dist/navigationpanel/NavigationPanel.js +45 -41
- package/dist/navigationpanel/NavigationPanelControls.js +102 -63
- package/dist/navigationpanel/NavigationPanelDropdown.js +52 -77
- package/dist/navigationpanel/_common.d.ts +6 -6
- package/dist/navigationpanel/_common.js +31 -42
- package/dist/navigationpanel/actor.actions.js +6 -5
- package/dist/navigationpanel/actor.js +2 -2
- package/dist/navigationpanel/actor.setup.d.ts +6 -6
- package/dist/navigationpanel/actor.setup.js +2 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -4
- package/dist/navigationpanel/comparepanel/ComparePanel.js +8 -10
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +11 -9
- package/dist/navigationpanel/controls/LayoutWarning.js +69 -72
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +8 -8
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.js +5 -8
- package/dist/navigationpanel/controls/SearchControl.js +24 -9
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +4 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +56 -76
- package/dist/navigationpanel/controls/ViewDetailsButton.d.ts +5 -0
- package/dist/navigationpanel/controls/ViewDetailsButton.js +121 -0
- package/dist/navigationpanel/controls/index.d.ts +1 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +27 -16
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.js +2 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +12 -10
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -0
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +19 -10
- package/dist/navigationpanel/editorpanel/styles.js +8 -15
- package/dist/navigationpanel/hooks.d.ts +6 -2
- package/dist/navigationpanel/styles.css.d.ts +2 -2
- package/dist/navigationpanel/styles.css.js +0 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -4
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +10 -39
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.d.ts +1 -0
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.js +49 -0
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +8 -8
- package/dist/navigationpanel/windows/ViewDetailsWindow.d.ts +1 -0
- package/dist/navigationpanel/windows/ViewDetailsWindow.js +379 -0
- package/dist/overlays/Overlays.js +29 -17
- package/dist/overlays/element-details/ElementDetailsCard.css.js +28 -36
- package/dist/overlays/element-details/ElementDetailsCard.js +3 -3
- package/dist/overlays/element-details/MetadataValue.js +18 -16
- package/dist/overlays/element-details/TabPanelDeployments.css.js +6 -14
- package/dist/overlays/element-details/TabPanelRelationships.css.js +8 -12
- package/dist/overlays/element-details/TabPanelStructure.css.js +4 -8
- package/dist/overlays/hooks.d.ts +3 -1
- package/dist/overlays/overlay/Overlay.js +8 -7
- package/dist/overlays/overlaysActor.js +20 -17
- package/dist/overlays/relationship-details/RelationshipDetails.js +2 -1
- package/dist/overlays/relationship-details/SelectEdge.css.js +14 -9
- package/dist/overlays/relationship-details/actor.js +1 -1
- package/dist/overlays/relationship-details/hooks.js +2 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +6 -0
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +15 -8
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -8
- package/dist/overlays/relationships-browser/SelectElement.js +5 -1
- package/dist/overlays/relationships-browser/actor.js +3 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.js +39 -38
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +7 -9
- package/dist/overlays/relationships-browser/hooks.js +2 -1
- package/dist/projects-overview/ProjectsOverview.js +8 -7
- package/dist/projects-overview/actor.js +1 -1
- package/dist/projects-overview/hooks.js +2 -1
- package/dist/search/Search.js +9 -7
- package/dist/search/components/ElementsColumn.css.js +6 -5
- package/dist/search/components/ElementsColumn.js +4 -3
- package/dist/search/components/SearchByTags.js +3 -3
- package/dist/search/components/ViewsColum.js +46 -43
- package/dist/search/components/ViewsColumn.css.js +4 -4
- package/dist/search/components/_shared.css.d.ts +2 -2
- package/dist/search/components/_shared.css.js +31 -46
- package/dist/search/components/styles.css.js +4 -4
- package/dist/search/hooks.js +2 -1
- package/dist/shadowroot/ShadowRoot.js +6 -5
- package/dist/styles2.js +1 -1
- package/dist/utils/index.js +3 -3
- package/package.json +29 -29
- package/panda.buildinfo.json +342 -299
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +0 -2
- package/dist/context/DefaultMantineProvider.js +0 -48
- package/dist/likec4diagram/ui/sequence-outline/state.js +0 -55
- package/dist/navigationpanel/controls/DetailsControls.d.ts +0 -2
- package/dist/navigationpanel/controls/DetailsControls.js +0 -223
|
@@ -1,539 +1,63 @@
|
|
|
1
1
|
import "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { selectDiagramContext, useDiagram, useDiagramSelector } from "../../../hooks/safeContext.js";
|
|
3
|
-
import { useOnDiagramEvent } from "../../../hooks/useDiagram.js";
|
|
4
|
-
import { Markdown } from "../../../base-primitives/Markdown.js";
|
|
5
2
|
import { PortalToContainer } from "../../../components/PortalToContainer.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { ActionIcon, Button, CloseButton, ScrollArea, Spoiler, Tooltip, Tree, useTree } from "@mantine/core";
|
|
14
|
-
import { AnimatePresence, m } from "motion/react";
|
|
15
|
-
import { Box as Box$1, HStack, Txt, VStack, styled } from "@likec4/styles/jsx";
|
|
3
|
+
import { SEQ_TRANSITION } from "./motion.js";
|
|
4
|
+
import { StoreProvider, useOutlinePanelWidth } from "./StoreProvider.js";
|
|
5
|
+
import { OutlineBody } from "./OutlineBody.js";
|
|
6
|
+
import { OutlineHeader } from "./OutlineHeader.js";
|
|
7
|
+
import { memo } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { AnimatePresence, LayoutGroup, MotionConfig, m } from "motion/react";
|
|
16
10
|
import { vstack } from "@likec4/styles/patterns";
|
|
17
|
-
import { extractViewTitleFromPath } from "@likec4/core/model";
|
|
18
11
|
//#region src/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.tsx
|
|
19
12
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
13
|
+
* Side panel shown while a dynamic view walkthrough is running: the view title and progress,
|
|
14
|
+
* the trail of fragments the current step sits in, and the outline of every step.
|
|
22
15
|
*/
|
|
23
|
-
var palette = {
|
|
24
|
-
loop: css({ colorPalette: "subflow.loop" }),
|
|
25
|
-
opt: css({ colorPalette: "subflow.opt" }),
|
|
26
|
-
par: css({ colorPalette: "subflow.par" }),
|
|
27
|
-
break: css({ colorPalette: "subflow.break" }),
|
|
28
|
-
alt: css({ colorPalette: "subflow.alt" }),
|
|
29
|
-
try: css({ colorPalette: "subflow.try" })
|
|
30
|
-
};
|
|
31
|
-
var flowPresentation = {
|
|
32
|
-
loop: {
|
|
33
|
-
paletteClass: palette.loop,
|
|
34
|
-
tag: "loop",
|
|
35
|
-
Icon: IconRepeat
|
|
36
|
-
},
|
|
37
|
-
opt: {
|
|
38
|
-
paletteClass: palette.opt,
|
|
39
|
-
tag: "opt",
|
|
40
|
-
Icon: IconArrowGuide
|
|
41
|
-
},
|
|
42
|
-
par: {
|
|
43
|
-
paletteClass: palette.par,
|
|
44
|
-
tag: "par",
|
|
45
|
-
Icon: IconArrowFork
|
|
46
|
-
},
|
|
47
|
-
break: {
|
|
48
|
-
paletteClass: palette.break,
|
|
49
|
-
tag: "break",
|
|
50
|
-
Icon: IconPlayerStop
|
|
51
|
-
},
|
|
52
|
-
alt: {
|
|
53
|
-
paletteClass: palette.alt,
|
|
54
|
-
tag: "alt",
|
|
55
|
-
Icon: IconArrowFork
|
|
56
|
-
},
|
|
57
|
-
"alt-when": {
|
|
58
|
-
paletteClass: palette.alt,
|
|
59
|
-
tag: "when",
|
|
60
|
-
Icon: IconCornerDownRight
|
|
61
|
-
},
|
|
62
|
-
"alt-else": {
|
|
63
|
-
paletteClass: palette.alt,
|
|
64
|
-
tag: "else",
|
|
65
|
-
Icon: IconCornerDownRight
|
|
66
|
-
},
|
|
67
|
-
"alt-if": {
|
|
68
|
-
paletteClass: palette.alt,
|
|
69
|
-
tag: "if",
|
|
70
|
-
Icon: IconCornerDownRight
|
|
71
|
-
},
|
|
72
|
-
try: {
|
|
73
|
-
paletteClass: palette.try,
|
|
74
|
-
tag: "try",
|
|
75
|
-
Icon: IconAlertTriangle
|
|
76
|
-
},
|
|
77
|
-
"try-block": {
|
|
78
|
-
paletteClass: palette.try,
|
|
79
|
-
tag: "block",
|
|
80
|
-
Icon: IconCornerDownRight
|
|
81
|
-
},
|
|
82
|
-
"try-catch": {
|
|
83
|
-
paletteClass: palette.break,
|
|
84
|
-
tag: "catch",
|
|
85
|
-
Icon: IconCornerDownRight
|
|
86
|
-
},
|
|
87
|
-
"try-finally": {
|
|
88
|
-
paletteClass: palette.break,
|
|
89
|
-
tag: "finally",
|
|
90
|
-
Icon: IconCornerDownRight
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
var SectionLabel = styled("div", { base: {
|
|
94
|
-
textStyle: "dimmed.xs",
|
|
95
|
-
fontWeight: "semibold",
|
|
96
|
-
letterSpacing: "wider",
|
|
97
|
-
textTransform: "uppercase",
|
|
98
|
-
userSelect: "none"
|
|
99
|
-
} });
|
|
100
|
-
/** Numeric step badge (e.g. `12`). */
|
|
101
|
-
var StepNum = styled("div", { base: {
|
|
102
|
-
flex: "none",
|
|
103
|
-
display: "flex",
|
|
104
|
-
alignItems: "center",
|
|
105
|
-
justifyContent: "center",
|
|
106
|
-
minWidth: "22px",
|
|
107
|
-
height: "18px",
|
|
108
|
-
paddingInline: "1",
|
|
109
|
-
rounded: "sm",
|
|
110
|
-
bg: "surface.sunken",
|
|
111
|
-
color: "text.dimmed",
|
|
112
|
-
fontSize: "[10px]",
|
|
113
|
-
fontWeight: "bold",
|
|
114
|
-
fontVariantNumeric: "tabular-nums",
|
|
115
|
-
userSelect: "none"
|
|
116
|
-
} });
|
|
117
|
-
/** Small pill tag for the sub-flow operator (`loop`, `par`, `try`, …). */
|
|
118
|
-
var FlowTag = styled("div", { base: {
|
|
119
|
-
flex: "none",
|
|
120
|
-
paddingInline: "1.5",
|
|
121
|
-
paddingBlock: "0.5",
|
|
122
|
-
rounded: "sm",
|
|
123
|
-
bg: "colorPalette.label",
|
|
124
|
-
color: "colorPalette.text",
|
|
125
|
-
fontSize: "[9px]",
|
|
126
|
-
fontWeight: "bold",
|
|
127
|
-
lineHeight: "xs",
|
|
128
|
-
letterSpacing: "tight",
|
|
129
|
-
textTransform: "uppercase",
|
|
130
|
-
userSelect: "none"
|
|
131
|
-
} });
|
|
132
|
-
var rowBase = css.raw({
|
|
133
|
-
display: "flex",
|
|
134
|
-
alignItems: "center",
|
|
135
|
-
gap: "2",
|
|
136
|
-
width: "100%",
|
|
137
|
-
paddingInline: "1.5",
|
|
138
|
-
paddingBlock: "1",
|
|
139
|
-
rounded: "md",
|
|
140
|
-
cursor: "pointer",
|
|
141
|
-
color: "text",
|
|
142
|
-
userSelect: "none",
|
|
143
|
-
transition: "background-color 120ms ease",
|
|
144
|
-
_hover: { bg: "surface.sunken/60" },
|
|
145
|
-
"&[data-selected=\"true\"]": {
|
|
146
|
-
bg: "mantine.primary.light",
|
|
147
|
-
color: "mantine.primary.lightColor"
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
var labelText = css.raw({
|
|
151
|
-
flex: "1",
|
|
152
|
-
minWidth: "0",
|
|
153
|
-
fontSize: "xs",
|
|
154
|
-
whiteSpace: "nowrap",
|
|
155
|
-
overflow: "hidden",
|
|
156
|
-
textOverflow: "ellipsis"
|
|
157
|
-
});
|
|
158
|
-
var LabelSpan = styled("span", { base: labelText });
|
|
159
|
-
/**
|
|
160
|
-
* Height of the leading step badge; also the line-height of the first label line
|
|
161
|
-
* so that a multiline label keeps its first line aligned with the badge/arrow.
|
|
162
|
-
*/
|
|
163
|
-
var rowLeadingHeight = "18px";
|
|
164
|
-
/** Groups the step badge and arrow so they stay centered against the first label line. */
|
|
165
|
-
var leadingIcons = css.raw({
|
|
166
|
-
flex: "none",
|
|
167
|
-
display: "flex",
|
|
168
|
-
alignItems: "center",
|
|
169
|
-
gap: "2",
|
|
170
|
-
height: rowLeadingHeight
|
|
171
|
-
});
|
|
172
|
-
var MultilineLabelSpan = styled("span", { base: css.raw({
|
|
173
|
-
flex: "1",
|
|
174
|
-
minWidth: "0",
|
|
175
|
-
fontSize: "xs",
|
|
176
|
-
lineHeight: rowLeadingHeight,
|
|
177
|
-
whiteSpace: "pre-line",
|
|
178
|
-
overflowWrap: "anywhere"
|
|
179
|
-
}) });
|
|
180
|
-
var selectFlow = selectDiagramContext((s) => {
|
|
181
|
-
const title = extractViewTitleFromPath(s.view.title ?? "Untitled");
|
|
182
|
-
const description = s.view.description;
|
|
183
|
-
const activeStep = s.activeWalkthrough?.stepId ?? null;
|
|
184
|
-
if (activeStep) return {
|
|
185
|
-
flow: isDynamicView(s.view) && hasProp(s.view, "flow") ? dynamicViewFlow(s.view) : null,
|
|
186
|
-
activeStep,
|
|
187
|
-
title,
|
|
188
|
-
description,
|
|
189
|
-
outlinePanelWidth: s.activeWalkthrough?.outlinePanelWidth ?? 0,
|
|
190
|
-
collapsed: s.collapsedSequenceFlows
|
|
191
|
-
};
|
|
192
|
-
return {
|
|
193
|
-
flow: null,
|
|
194
|
-
activeStep: null,
|
|
195
|
-
title,
|
|
196
|
-
description
|
|
197
|
-
};
|
|
198
|
-
});
|
|
199
16
|
var SequenceOutlinePanel = memo(() => {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
layerStyle: "likec4.panel",
|
|
210
|
-
rounded: "0",
|
|
211
|
-
gap: "0",
|
|
212
|
-
padding: "0",
|
|
213
|
-
pointerEvents: "all",
|
|
214
|
-
maxWidth: "85cqw",
|
|
215
|
-
height: "100cqh",
|
|
216
|
-
maxHeight: "100cqh",
|
|
217
|
-
cursor: "default",
|
|
218
|
-
overflow: "hidden"
|
|
219
|
-
}),
|
|
220
|
-
style: { width: props.outlinePanelWidth },
|
|
221
|
-
initial: {
|
|
222
|
-
opacity: .5,
|
|
223
|
-
translateX: -40
|
|
224
|
-
},
|
|
225
|
-
animate: {
|
|
226
|
-
opacity: 1,
|
|
227
|
-
translateX: 0
|
|
228
|
-
},
|
|
229
|
-
exit: {
|
|
230
|
-
opacity: 0,
|
|
231
|
-
translateX: -props.outlinePanelWidth
|
|
232
|
-
},
|
|
233
|
-
children: /* @__PURE__ */ jsx(SequenceOutlinePanelBody, {
|
|
234
|
-
title: props.title,
|
|
235
|
-
description: props.description,
|
|
236
|
-
activeStep: props.activeStep,
|
|
237
|
-
flow: props.flow,
|
|
238
|
-
collapsed: props.collapsed
|
|
239
|
-
})
|
|
240
|
-
})
|
|
241
|
-
}) });
|
|
17
|
+
return /* @__PURE__ */ jsx(StoreProvider, { children: /* @__PURE__ */ jsx(PortalToContainer, { children: /* @__PURE__ */ jsx(MotionConfig, {
|
|
18
|
+
transition: SEQ_TRANSITION,
|
|
19
|
+
children: /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
20
|
+
propagate: true,
|
|
21
|
+
mode: "popLayout",
|
|
22
|
+
anchorY: "top",
|
|
23
|
+
children: /* @__PURE__ */ jsxs(SequenceOutlinePanelShell, { children: [/* @__PURE__ */ jsx(OutlineHeader, {}), /* @__PURE__ */ jsx(OutlineBody, {})] })
|
|
24
|
+
}) })
|
|
25
|
+
}) }) });
|
|
242
26
|
});
|
|
243
27
|
SequenceOutlinePanel.displayName = "SequenceOutlinePanel";
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
gap: "2.5",
|
|
261
|
-
width: "100%",
|
|
262
|
-
paddingInline: "2.5",
|
|
263
|
-
paddingBlock: "2",
|
|
264
|
-
borderBottom: "1px solid {colors.likec4.panel.border}"
|
|
265
|
-
},
|
|
266
|
-
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
267
|
-
css: {
|
|
268
|
-
gap: "2.5",
|
|
269
|
-
alignItems: "center",
|
|
270
|
-
width: "100%",
|
|
271
|
-
padding: "0"
|
|
272
|
-
},
|
|
273
|
-
children: [
|
|
274
|
-
/* @__PURE__ */ jsx(Box$1, {
|
|
275
|
-
css: {
|
|
276
|
-
flex: "none",
|
|
277
|
-
display: "flex",
|
|
278
|
-
alignItems: "center",
|
|
279
|
-
justifyContent: "center",
|
|
280
|
-
boxSize: "20px",
|
|
281
|
-
rounded: "sm",
|
|
282
|
-
colorPalette: "subflow.loop",
|
|
283
|
-
bg: "colorPalette.label",
|
|
284
|
-
color: "colorPalette.text"
|
|
285
|
-
},
|
|
286
|
-
children: /* @__PURE__ */ jsx(IconDirectionSignFilled, { size: 14 })
|
|
287
|
-
}),
|
|
288
|
-
/* @__PURE__ */ jsxs(VStack, {
|
|
289
|
-
css: {
|
|
290
|
-
gap: "0",
|
|
291
|
-
alignItems: "stretch",
|
|
292
|
-
flex: "1",
|
|
293
|
-
minWidth: "0"
|
|
294
|
-
},
|
|
295
|
-
children: [/* @__PURE__ */ jsx(styled.div, {
|
|
296
|
-
css: {
|
|
297
|
-
fontSize: "sm",
|
|
298
|
-
fontWeight: "semibold",
|
|
299
|
-
color: "text",
|
|
300
|
-
whiteSpace: "nowrap",
|
|
301
|
-
overflow: "hidden",
|
|
302
|
-
textOverflow: "ellipsis"
|
|
303
|
-
},
|
|
304
|
-
children: title ?? "Sequence"
|
|
305
|
-
}), /* @__PURE__ */ jsxs(Txt, {
|
|
306
|
-
size: "xxs",
|
|
307
|
-
dimmed: true,
|
|
308
|
-
noUserSelect: true,
|
|
309
|
-
children: [
|
|
310
|
-
stepCount,
|
|
311
|
-
" ",
|
|
312
|
-
stepCount === 1 ? "step" : "steps"
|
|
313
|
-
]
|
|
314
|
-
})]
|
|
315
|
-
}),
|
|
316
|
-
/* @__PURE__ */ jsx(Box$1, {
|
|
317
|
-
css: {
|
|
318
|
-
flex: "none",
|
|
319
|
-
alignItems: "center",
|
|
320
|
-
justifyContent: "center"
|
|
321
|
-
},
|
|
322
|
-
children: /* @__PURE__ */ jsx(CloseButton, {
|
|
323
|
-
size: "sm",
|
|
324
|
-
onClick: () => diagram.stopWalkthrough()
|
|
325
|
-
})
|
|
326
|
-
})
|
|
327
|
-
]
|
|
328
|
-
}), description && /* @__PURE__ */ jsx(Spoiler, {
|
|
329
|
-
showLabel: /* @__PURE__ */ jsx(Txt, {
|
|
330
|
-
size: "xxs",
|
|
331
|
-
children: "show description"
|
|
332
|
-
}),
|
|
333
|
-
hideLabel: /* @__PURE__ */ jsx(Txt, {
|
|
334
|
-
size: "xxs",
|
|
335
|
-
children: "hide"
|
|
336
|
-
}),
|
|
337
|
-
maxHeight: 16,
|
|
338
|
-
children: /* @__PURE__ */ jsx(Markdown, {
|
|
339
|
-
value: RichText.from(description),
|
|
340
|
-
className: css({ color: "text.dimmed" }),
|
|
341
|
-
fontSize: "xxs"
|
|
342
|
-
})
|
|
343
|
-
})]
|
|
344
|
-
});
|
|
345
|
-
};
|
|
346
|
-
var OutlineBody = ({ activeStep, flow, collapsed }) => {
|
|
347
|
-
const diagram = useDiagram();
|
|
348
|
-
const treeData = useTreeData(flow, collapsed);
|
|
349
|
-
const initialExpandedState = useMemo(() => mapToObj(flowAncestors(activeStep), (id) => [id, true]), []);
|
|
350
|
-
const tree = useTree({
|
|
351
|
-
initialSelectedState: [activeStep],
|
|
352
|
-
initialExpandedState,
|
|
353
|
-
multiple: false,
|
|
354
|
-
onSelectedStateChange(selected) {
|
|
355
|
-
const step = only(selected);
|
|
356
|
-
if (step && flow.isStep(step)) diagram.walkthroughStep({ step });
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
useOnDiagramEvent("walkthroughStep", ({ stepId }) => {
|
|
360
|
-
if (!tree.selectedState.includes(stepId)) {
|
|
361
|
-
const ancestors = flowAncestors(stepId);
|
|
362
|
-
if (ancestors.length > 0) {
|
|
363
|
-
const expanded = { ...tree.expandedState };
|
|
364
|
-
for (const parent of ancestors) expanded[parent] = true;
|
|
365
|
-
tree.setExpandedState(expanded);
|
|
366
|
-
}
|
|
367
|
-
tree.setSelectedState([stepId]);
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
const allCollapsed = useMemo(() => Object.values(tree.expandedState).every((v) => !v), [tree.expandedState]);
|
|
371
|
-
const { prev, next } = flow.prevAndNext(activeStep, (flowId) => collapsed[flowId] ?? false);
|
|
372
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(HStack, {
|
|
373
|
-
css: {
|
|
374
|
-
justifyContent: "space-between",
|
|
375
|
-
alignItems: "center",
|
|
376
|
-
width: "100%",
|
|
377
|
-
paddingInline: "2.5",
|
|
378
|
-
paddingTop: "2",
|
|
379
|
-
paddingBottom: "1"
|
|
380
|
-
},
|
|
381
|
-
children: [
|
|
382
|
-
/* @__PURE__ */ jsx(SectionLabel, {
|
|
383
|
-
flex: "1",
|
|
384
|
-
children: "Outline"
|
|
385
|
-
}),
|
|
386
|
-
/* @__PURE__ */ jsx(Tooltip, {
|
|
387
|
-
label: allCollapsed ? "Expand all" : "Collapse all",
|
|
388
|
-
fz: "xs",
|
|
389
|
-
openDelay: 500,
|
|
390
|
-
withinPortal: false,
|
|
391
|
-
children: /* @__PURE__ */ jsx(ActionIcon, {
|
|
392
|
-
tabIndex: -1,
|
|
393
|
-
variant: "subtle",
|
|
394
|
-
size: "sm",
|
|
395
|
-
onClick: () => allCollapsed ? tree.expandAllNodes() : tree.collapseAllNodes(),
|
|
396
|
-
children: /* @__PURE__ */ jsx(IconListTree, { size: 14 })
|
|
397
|
-
})
|
|
398
|
-
}),
|
|
399
|
-
/* @__PURE__ */ jsx(Button, {
|
|
400
|
-
tabIndex: -1,
|
|
401
|
-
size: "compact-xs",
|
|
402
|
-
variant: "light",
|
|
403
|
-
className: css({ fontSize: "xxs" }),
|
|
404
|
-
leftSection: /* @__PURE__ */ jsx(IconPlayerSkipBackFilled, { size: 10 }),
|
|
405
|
-
onClick: () => prev && diagram.walkthroughStep({ step: prev }),
|
|
406
|
-
disabled: !prev,
|
|
407
|
-
children: "Back"
|
|
408
|
-
}),
|
|
409
|
-
/* @__PURE__ */ jsx(Button, {
|
|
410
|
-
tabIndex: -1,
|
|
411
|
-
size: "compact-xs",
|
|
412
|
-
variant: "light",
|
|
413
|
-
className: css({ fontSize: "xxs" }),
|
|
414
|
-
rightSection: /* @__PURE__ */ jsx(IconPlayerSkipForwardFilled, { size: 10 }),
|
|
415
|
-
onClick: () => next && diagram.walkthroughStep({ step: next }),
|
|
416
|
-
disabled: !next,
|
|
417
|
-
children: "Next"
|
|
418
|
-
})
|
|
419
|
-
]
|
|
420
|
-
}), /* @__PURE__ */ jsx(ScrollArea, {
|
|
421
|
-
type: "auto",
|
|
422
|
-
overscrollBehavior: "contain",
|
|
423
|
-
className: css({
|
|
424
|
-
flex: "1",
|
|
425
|
-
width: "100%",
|
|
426
|
-
minHeight: "0"
|
|
427
|
-
}),
|
|
428
|
-
children: /* @__PURE__ */ jsx(Tree, {
|
|
429
|
-
levelOffset: "var(--spacing-2\\.5)",
|
|
430
|
-
data: treeData,
|
|
431
|
-
tree,
|
|
432
|
-
selectOnClick: true,
|
|
433
|
-
classNames: { root: css({
|
|
434
|
-
paddingInline: "2",
|
|
435
|
-
paddingBottom: "3"
|
|
436
|
-
}) },
|
|
437
|
-
styles: { node: { paddingInlineStart: "var(--label-offset)" } },
|
|
438
|
-
renderNode: renderTreeNode
|
|
439
|
-
})
|
|
440
|
-
})] });
|
|
441
|
-
};
|
|
442
|
-
var renderTreeNode = ((payload) => {
|
|
443
|
-
return payload.node.nodeProps.type === "step" ? /* @__PURE__ */ jsx(StepRow, { ...payload }) : /* @__PURE__ */ jsx(FlowRow, { ...payload });
|
|
444
|
-
});
|
|
445
|
-
var StepRow = ({ node, elementProps, selected }) => {
|
|
446
|
-
const { stepnum, source, target, label, notes } = node.nodeProps;
|
|
447
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Box$1, {
|
|
448
|
-
...elementProps,
|
|
449
|
-
className: cx(elementProps.className, css(rowBase, { alignItems: "flex-start" })),
|
|
450
|
-
children: [/* @__PURE__ */ jsxs(Box$1, {
|
|
451
|
-
className: css(leadingIcons),
|
|
452
|
-
children: [/* @__PURE__ */ jsx(StepNum, { children: stepnum }), /* @__PURE__ */ jsx(IconArrowRight, {
|
|
453
|
-
size: 13,
|
|
454
|
-
className: css({
|
|
455
|
-
flex: "none",
|
|
456
|
-
color: "text.dimmed"
|
|
457
|
-
})
|
|
458
|
-
})]
|
|
459
|
-
}), label ? /* @__PURE__ */ jsx(MultilineLabelSpan, { children: label }) : /* @__PURE__ */ jsxs(HStack, {
|
|
460
|
-
css: {
|
|
461
|
-
gap: "1",
|
|
462
|
-
minWidth: "0",
|
|
463
|
-
flex: "1",
|
|
464
|
-
minHeight: rowLeadingHeight
|
|
465
|
-
},
|
|
466
|
-
children: [
|
|
467
|
-
/* @__PURE__ */ jsx(LabelSpan, {
|
|
468
|
-
css: {
|
|
469
|
-
flex: "none",
|
|
470
|
-
color: "text.dimmed"
|
|
471
|
-
},
|
|
472
|
-
children: source
|
|
473
|
-
}),
|
|
474
|
-
/* @__PURE__ */ jsx(IconArrowRight, {
|
|
475
|
-
size: 11,
|
|
476
|
-
className: css({
|
|
477
|
-
flex: "none",
|
|
478
|
-
color: "text.dimmed"
|
|
479
|
-
})
|
|
480
|
-
}),
|
|
481
|
-
/* @__PURE__ */ jsx(LabelSpan, { children: target })
|
|
482
|
-
]
|
|
483
|
-
})]
|
|
484
|
-
}), notes && /* @__PURE__ */ jsx(Markdown, {
|
|
485
|
-
value: RichText.from(notes),
|
|
486
|
-
fontSize: "sm",
|
|
487
|
-
textScale: .9,
|
|
488
|
-
className: css({
|
|
489
|
-
background: "surface.sunken",
|
|
490
|
-
border: "1px solid {colors.surface.sunken.border}",
|
|
491
|
-
rounded: "md",
|
|
28
|
+
var SequenceOutlinePanelShell = ({ children }) => {
|
|
29
|
+
const outlinePanelWidth = useOutlinePanelWidth();
|
|
30
|
+
return /* @__PURE__ */ jsx(m.div, {
|
|
31
|
+
layout: "position",
|
|
32
|
+
className: vstack({
|
|
33
|
+
position: "absolute",
|
|
34
|
+
top: "0",
|
|
35
|
+
left: "0",
|
|
36
|
+
layerStyle: "likec4.panel",
|
|
37
|
+
rounded: "0",
|
|
38
|
+
gap: "0",
|
|
39
|
+
padding: "0",
|
|
40
|
+
pointerEvents: "all",
|
|
41
|
+
maxWidth: "[85cqw]",
|
|
42
|
+
height: "100cqh",
|
|
43
|
+
maxHeight: "100cqh",
|
|
492
44
|
cursor: "default",
|
|
493
|
-
|
|
494
|
-
marginBlockEnd: "2",
|
|
495
|
-
paddingInline: "4",
|
|
496
|
-
paddingBlock: "2"
|
|
45
|
+
overflow: "hidden"
|
|
497
46
|
}),
|
|
498
|
-
style: {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
size: 14,
|
|
513
|
-
className: css({
|
|
514
|
-
flex: "none",
|
|
515
|
-
color: "text.dimmed",
|
|
516
|
-
transition: "transform 150ms ease",
|
|
517
|
-
"&[data-expanded=\"true\"]": { transform: "rotate(90deg)" }
|
|
518
|
-
}),
|
|
519
|
-
"data-expanded": expanded
|
|
520
|
-
}),
|
|
521
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
522
|
-
size: 14,
|
|
523
|
-
className: css({
|
|
524
|
-
flex: "none",
|
|
525
|
-
color: "colorPalette.text"
|
|
526
|
-
})
|
|
527
|
-
}),
|
|
528
|
-
/* @__PURE__ */ jsx(styled.span, {
|
|
529
|
-
css: {
|
|
530
|
-
...labelText,
|
|
531
|
-
fontWeight: "medium"
|
|
532
|
-
},
|
|
533
|
-
children: title ?? tag
|
|
534
|
-
}),
|
|
535
|
-
/* @__PURE__ */ jsx(FlowTag, { children: tag })
|
|
536
|
-
]
|
|
47
|
+
style: { width: outlinePanelWidth },
|
|
48
|
+
initial: {
|
|
49
|
+
opacity: .5,
|
|
50
|
+
translateX: -40
|
|
51
|
+
},
|
|
52
|
+
animate: {
|
|
53
|
+
opacity: 1,
|
|
54
|
+
translateX: 0
|
|
55
|
+
},
|
|
56
|
+
exit: {
|
|
57
|
+
opacity: 0,
|
|
58
|
+
translateX: -40
|
|
59
|
+
},
|
|
60
|
+
children
|
|
537
61
|
});
|
|
538
62
|
};
|
|
539
63
|
//#endregion
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** The step number pill. The active one carries the shared `layoutId`, so it travels between steps. */
|
|
3
|
+
export declare const StepBadge: ({ children, active }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
7
|
+
/** Marks a step that carries notes, without letting the note reflow the list. */
|
|
8
|
+
export declare const NotesDot: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { SEQ_BADGE_LAYOUT_ID, SEQ_TRANSITION } from "./motion.js";
|
|
3
|
+
import { css } from "@likec4/styles/css";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { m } from "motion/react";
|
|
6
|
+
import { Box } from "@likec4/styles/jsx";
|
|
7
|
+
//#region src/likec4diagram/ui/sequence-outline/StepBadge.tsx
|
|
8
|
+
var stepBadgeBase = css.raw({
|
|
9
|
+
flex: "none",
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center",
|
|
13
|
+
minWidth: "[20px]",
|
|
14
|
+
height: "[18px]",
|
|
15
|
+
paddingInline: "1",
|
|
16
|
+
rounded: "sm",
|
|
17
|
+
bg: "surface.sunken",
|
|
18
|
+
color: "text.dimmed",
|
|
19
|
+
fontSize: "[10px]",
|
|
20
|
+
fontWeight: "bold",
|
|
21
|
+
fontVariantNumeric: "tabular-nums",
|
|
22
|
+
userSelect: "none"
|
|
23
|
+
});
|
|
24
|
+
var stepBadgeActive = css.raw(stepBadgeBase, {
|
|
25
|
+
minWidth: "[22px]",
|
|
26
|
+
height: "[20px]",
|
|
27
|
+
background: "[linear-gradient(var(--seq-badge-bg), var(--seq-badge-bg)), {colors.likec4.panel.bg}]",
|
|
28
|
+
color: "[var(--seq-badge-fg)]",
|
|
29
|
+
fontSize: "[11px]"
|
|
30
|
+
});
|
|
31
|
+
/** The step number pill. The active one carries the shared `layoutId`, so it travels between steps. */
|
|
32
|
+
var StepBadge = ({ children, active }) => active ? /* @__PURE__ */ jsx(m.div, {
|
|
33
|
+
layoutId: SEQ_BADGE_LAYOUT_ID,
|
|
34
|
+
layout: "position",
|
|
35
|
+
transition: SEQ_TRANSITION,
|
|
36
|
+
className: css(stepBadgeActive),
|
|
37
|
+
children
|
|
38
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: css(stepBadgeBase),
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
/** Marks a step that carries notes, without letting the note reflow the list. */
|
|
43
|
+
var NotesDot = () => /* @__PURE__ */ jsx(Box, { css: {
|
|
44
|
+
flex: "none",
|
|
45
|
+
alignSelf: "flex-start",
|
|
46
|
+
boxSize: "[5px]",
|
|
47
|
+
marginTop: "[7px]",
|
|
48
|
+
rounded: "pill",
|
|
49
|
+
bg: "text.dimmed"
|
|
50
|
+
} });
|
|
51
|
+
//#endregion
|
|
52
|
+
export { NotesDot, StepBadge };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OutlineTreeNodeStep } from './types';
|
|
2
|
+
/** A step the walkthrough is not on: one line, clickable, recessed with its level. */
|
|
3
|
+
export declare function StepRow({ node, recession, active }: {
|
|
4
|
+
active: boolean;
|
|
5
|
+
node: OutlineTreeNodeStep;
|
|
6
|
+
recession: number;
|
|
7
|
+
}): import("react").JSX.Element;
|