likec4 1.9.0 → 1.10.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/__app__/react/likec4.tsx +64 -12
- package/dist/__app__/src/chunks/{-index-overview-BAmvrzHU.js → -index-overview-DZ3H7kDb.js} +2 -2
- package/dist/__app__/src/chunks/{main-BZtdykGF.js → main-KEhBGhZ8.js} +1055 -820
- package/dist/__app__/src/chunks/{mantine-Bhi3pgTf.js → mantine-BnwtT_Nz.js} +54 -53
- package/dist/__app__/src/main.js +1 -1
- package/dist/__app__/src/style.css +1 -1
- package/dist/__app__/webcomponent/webcomponent.js +594 -389
- package/dist/cli/index.mjs +115 -74
- package/dist/index.d.mts +92 -61
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.BaYahRry.mjs +1221 -0
- package/package.json +13 -10
- package/react/index.d.ts +1064 -9
- package/react/index.mjs +902 -603
- package/react/style.css +1 -0
- package/dist/shared/likec4.D4BZc04H.mjs +0 -1219
- package/react/LikeC4Browser.css.d.ts +0 -4
- package/react/LikeC4Browser.d.ts +0 -31
- package/react/LikeC4ViewElement.d.ts +0 -56
- package/react/ShadowRoot.d.ts +0 -6
- package/react/ShadowRootMantineProvider.d.ts +0 -7
- package/react/styles.css.d.ts +0 -4
- package/react/styles.d.ts +0 -4
- package/react/types-filter.d.ts +0 -33
- package/react/types.d.ts +0 -76
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { createContext as createContext$1, useLayoutEffect as useLayoutEffect$1, useEffect as useEffect$1, useContext as useContext$1, useRef as useRef$1, useInsertionEffect, useCallback as useCallback$1, useMemo as useMemo$1, forwardRef as forwardRef$1, Fragment as Fragment$1, createElement as createElement$1, useId as useId$1, Children, isValidElement, useState as useState$1, memo as memo$1, Suspense, lazy, Component, StrictMode } from "react";
|
|
4
4
|
import { createRoot } from "react-dom/client";
|
|
5
5
|
import { L as Link, c as createRootRouteWithContext, S as ScrollRestoration, O as Outlet, a as createFileRoute, u as useRouter, b as useParams, d as useRouterState, i as isNotFound, n as notFound, R as RouterProvider, e as createRouter$1, f as createHashHistory, g as createBrowserHistory } from "./tanstack-router-Bc_WYOzY.js";
|
|
6
|
-
import { e as Container, f as Title, a as Text$1, G as Group, g as Button, h as createTheme, M as MantineProvider, i as MantineContext, j as useHotkeys, c as clsx, B as Box,
|
|
6
|
+
import { e as Container, f as Title, a as Text$1, G as Group, g as Button, h as createTheme, M as MantineProvider, i as MantineContext, j as useHotkeys, c as clsx, B as Box, k as Popover, l as PopoverTarget, m as PopoverDropdown, S as Stack, n as ScrollAreaAutosize, o as CloseButton, A as ActionIcon$2, H as HoverCard, p as HoverCardTarget, U as UnstyledButton, q as HoverCardDropdown, r as Anchor, s as CopyButton$1, t as useLocalStorage, C as Card, b as CardSection, v as Spoiler, w as Badge, x as ButtonGroup, y as Tooltip$2, T as ThemeIcon, P as Paper, z as Tabs, D as TabsList, E as TabsTab, F as TabsPanel, J as rem, K as Divider, L as Space, N as TooltipGroup, O as Flex, Q as ColorSwatch, R as CheckIcon, V as Select, W as Slider, X as SegmentedControl, Y as FloatingIndicator, Z as Notification, _ as Code, $ as SimpleGrid, u as useMantineColorScheme, a0 as useTree, a1 as useComputedColorScheme, a2 as Tree, a3 as Drawer, a4 as ScrollArea, a5 as Alert, a6 as ModalRoot, a7 as ModalOverlay, a8 as ModalContent, a9 as ModalBody, aa as useMantineTheme, ab as useMediaQuery, ac as useDisclosure, ad as Menu, ae as MenuTarget, af as MenuDropdown, ag as MenuLabel, ah as MenuItem, ai as LoadingOverlay, aj as useCallbackRef, ak as Burger, al as Loader } from "./mantine-BnwtT_Nz.js";
|
|
7
7
|
import { withOverviewGraph, ComponentName, isDevelopment, basepath, useHashHistory } from "../const.js";
|
|
8
8
|
import { d as useReactFlow, e as useStoreApi, f as useNodesData, g as useStore, h as createWithEqualityFn, j as applyNodeChanges, k as applyEdgeChanges, l as getViewportForBounds, m as getNodeDimensions, n as getBoundsOfRects, s as shallow$1, o as boxToRect, p as useStoreWithEqualityFn, E as EdgeLabelRenderer, H as Handle, P as Position, q as useOnViewportChange, i as index, r as useOnSelectionChange, b as Background, c as BackgroundVariant, C as Controls, R as ReactFlowProvider } from "./likec4-BqIZe8Y0.js";
|
|
9
9
|
import { useLikeC4Views, useLikeC4View } from "virtual:likec4/store";
|
|
@@ -29,6 +29,7 @@ function NotFound() {
|
|
|
29
29
|
] }) });
|
|
30
30
|
}
|
|
31
31
|
const theme = createTheme({
|
|
32
|
+
autoContrast: !0,
|
|
32
33
|
primaryColor: "indigo",
|
|
33
34
|
cursorType: "pointer",
|
|
34
35
|
fontFamily: "var(--likec4-app-font)",
|
|
@@ -3809,16 +3810,19 @@ function t$3(...n2) {
|
|
|
3809
3810
|
return u$5(Object.keys, n2);
|
|
3810
3811
|
}
|
|
3811
3812
|
function a$1(...e2) {
|
|
3812
|
-
return u$5(n$
|
|
3813
|
+
return u$5(n$3, e2);
|
|
3813
3814
|
}
|
|
3814
|
-
var n$
|
|
3815
|
+
var n$3 = (e2) => e2.at(-1);
|
|
3815
3816
|
function m(...a2) {
|
|
3816
3817
|
return u$5(o$2, a2, p);
|
|
3817
3818
|
}
|
|
3818
3819
|
var o$2 = (a2, e2) => a2.map(e2), p = (a2) => (e2, r2, t2) => ({ done: !1, hasNext: !0, next: a2(e2, r2, t2) });
|
|
3819
|
-
function n$
|
|
3820
|
+
function n$2(e2) {
|
|
3820
3821
|
return !!e2;
|
|
3821
3822
|
}
|
|
3823
|
+
function n$1(l2) {
|
|
3824
|
+
return l2 !== null;
|
|
3825
|
+
}
|
|
3822
3826
|
function l(n2) {
|
|
3823
3827
|
return n2 != null;
|
|
3824
3828
|
}
|
|
@@ -3912,16 +3916,16 @@ function whereOperatorAsPredicate(operator) {
|
|
|
3912
3916
|
nonexhaustive(operator);
|
|
3913
3917
|
}
|
|
3914
3918
|
}
|
|
3915
|
-
function StepEdgeId(step) {
|
|
3916
|
-
return `step-${String(step).padStart(3, "0")}`;
|
|
3917
|
-
}
|
|
3918
3919
|
function isStepEdgeId(id2) {
|
|
3919
3920
|
return id2.startsWith("step-");
|
|
3920
3921
|
}
|
|
3921
3922
|
function extractStep(id2) {
|
|
3922
3923
|
if (!isStepEdgeId(id2))
|
|
3923
3924
|
throw new Error(`Invalid step edge id: ${id2}`);
|
|
3924
|
-
return
|
|
3925
|
+
return parseFloat(id2.slice(5));
|
|
3926
|
+
}
|
|
3927
|
+
function getParallelStepsPrefix(id2) {
|
|
3928
|
+
return isStepEdgeId(id2) && id2.includes(".") ? id2.slice(0, id2.indexOf(".") + 1) : null;
|
|
3925
3929
|
}
|
|
3926
3930
|
function getBBoxCenter({
|
|
3927
3931
|
x: x2,
|
|
@@ -4050,7 +4054,6 @@ function useUpdateEffect(callback, deps, equalityFn, effectHook) {
|
|
|
4050
4054
|
const useXYFlow = useReactFlow, useXYNodesData = useNodesData;
|
|
4051
4055
|
function useXYStore(selector2, equalityFn) {
|
|
4052
4056
|
return useStore(
|
|
4053
|
-
// @ts-expect-error - types are not correct
|
|
4054
4057
|
selector2,
|
|
4055
4058
|
shallowEqual
|
|
4056
4059
|
);
|
|
@@ -5199,7 +5202,8 @@ function isSamePoint$1(a2, b2) {
|
|
|
5199
5202
|
return isClose(ax, bx) && isClose(ay, by);
|
|
5200
5203
|
}
|
|
5201
5204
|
function diagramViewToXYFlowData(view, opts) {
|
|
5202
|
-
|
|
5205
|
+
view.__;
|
|
5206
|
+
const xynodes = [], xyedges = [], nodeLookup = /* @__PURE__ */ new Map(), traverse = view.nodes.reduce(
|
|
5203
5207
|
(acc, node) => (nodeLookup.set(node.id, node), node.parent || acc.push({ node, parent: null }), acc),
|
|
5204
5208
|
new Array()
|
|
5205
5209
|
);
|
|
@@ -5264,7 +5268,6 @@ function diagramViewToXYFlowData(view, opts) {
|
|
|
5264
5268
|
data: {
|
|
5265
5269
|
edge,
|
|
5266
5270
|
controlPoints: edge.controlPoints || null,
|
|
5267
|
-
stepNum: isDynamicView ? extractStep(edge.id) : null,
|
|
5268
5271
|
label: edge.labelBBox ? {
|
|
5269
5272
|
bbox: edge.labelBBox,
|
|
5270
5273
|
text: edge.label ?? ""
|
|
@@ -5286,7 +5289,7 @@ const StringSet = Set, DEFAULT_PROPS = {
|
|
|
5286
5289
|
initialized: !1,
|
|
5287
5290
|
navigationHistoryIndex: 0,
|
|
5288
5291
|
viewportChanged: !1,
|
|
5289
|
-
|
|
5292
|
+
activeWalkthrough: null,
|
|
5290
5293
|
focusedNodeId: null,
|
|
5291
5294
|
hoveredNodeId: null,
|
|
5292
5295
|
hoveredEdgeId: null,
|
|
@@ -5345,7 +5348,7 @@ function createDiagramStore(props2) {
|
|
|
5345
5348
|
focusedNodeId,
|
|
5346
5349
|
lastClickedNodeId,
|
|
5347
5350
|
lastClickedEdgeId,
|
|
5348
|
-
|
|
5351
|
+
activeWalkthrough,
|
|
5349
5352
|
nodesDraggable,
|
|
5350
5353
|
nodesSelectable,
|
|
5351
5354
|
hoveredEdgeId,
|
|
@@ -5357,7 +5360,7 @@ function createDiagramStore(props2) {
|
|
|
5357
5360
|
const isSameView = current.id === nextView.id;
|
|
5358
5361
|
if (isSameView) {
|
|
5359
5362
|
const nodeIds = new StringSet(nextView.nodes.map((n2) => n2.id)), edgeIds = new StringSet(nextView.edges.map((e2) => e2.id));
|
|
5360
|
-
if (lastClickedNodeId && !nodeIds.has(lastClickedNodeId) && (lastClickedNodeId = null), hoveredNodeId && !nodeIds.has(hoveredNodeId) && (hoveredNodeId = null), focusedNodeId && !nodeIds.has(focusedNodeId) && (focusedNodeId = null), lastClickedEdgeId && !edgeIds.has(lastClickedEdgeId) && (lastClickedEdgeId = null), hoveredEdgeId && !edgeIds.has(hoveredEdgeId) && (hoveredEdgeId = null),
|
|
5363
|
+
if (lastClickedNodeId && !nodeIds.has(lastClickedNodeId) && (lastClickedNodeId = null), hoveredNodeId && !nodeIds.has(hoveredNodeId) && (hoveredNodeId = null), focusedNodeId && !nodeIds.has(focusedNodeId) && (focusedNodeId = null, dimmed2 = EmptyStringSet), lastClickedEdgeId && !edgeIds.has(lastClickedEdgeId) && (lastClickedEdgeId = null), hoveredEdgeId && !edgeIds.has(hoveredEdgeId) && (hoveredEdgeId = null), activeWalkthrough && !edgeIds.has(activeWalkthrough.stepId) && (activeWalkthrough = null, dimmed2 = EmptyStringSet), dimmed2.size > 0) {
|
|
5361
5364
|
let nextDimmed = new StringSet([...dimmed2].filter((id2) => nodeIds.has(id2) || edgeIds.has(id2)));
|
|
5362
5365
|
nextDimmed.size !== dimmed2.size && (dimmed2 = nextDimmed);
|
|
5363
5366
|
}
|
|
@@ -5396,7 +5399,7 @@ function createDiagramStore(props2) {
|
|
|
5396
5399
|
};
|
|
5397
5400
|
xystore.getState().panBy(diff), lastOnNavigate = null;
|
|
5398
5401
|
}
|
|
5399
|
-
lastClickedEdgeId = null, lastClickedNodeId = null, hoveredEdgeId = null, hoveredNodeId = null, focusedNodeId = null,
|
|
5402
|
+
lastClickedEdgeId = null, lastClickedNodeId = null, hoveredEdgeId = null, hoveredNodeId = null, focusedNodeId = null, activeWalkthrough = null, dimmed2 = EmptyStringSet;
|
|
5400
5403
|
}
|
|
5401
5404
|
const update = diagramViewToXYFlowData(nextView, {
|
|
5402
5405
|
where: whereFilter,
|
|
@@ -5424,7 +5427,7 @@ function createDiagramStore(props2) {
|
|
|
5424
5427
|
isDynamicView: nextView.__ === "dynamic",
|
|
5425
5428
|
viewSyncDebounceTimeout,
|
|
5426
5429
|
view: nextView,
|
|
5427
|
-
|
|
5430
|
+
activeWalkthrough,
|
|
5428
5431
|
lastOnNavigate,
|
|
5429
5432
|
lastClickedNodeId,
|
|
5430
5433
|
lastClickedEdgeId,
|
|
@@ -5451,7 +5454,7 @@ function createDiagramStore(props2) {
|
|
|
5451
5454
|
notDimmed.has(node.id) || dimmed2.add(node.id);
|
|
5452
5455
|
set(
|
|
5453
5456
|
{
|
|
5454
|
-
|
|
5457
|
+
activeWalkthrough: null,
|
|
5455
5458
|
focusedNodeId: nodeId,
|
|
5456
5459
|
dimmed: dimmed2
|
|
5457
5460
|
},
|
|
@@ -5474,14 +5477,14 @@ function createDiagramStore(props2) {
|
|
|
5474
5477
|
},
|
|
5475
5478
|
resetLastClicked: () => {
|
|
5476
5479
|
let {
|
|
5477
|
-
|
|
5480
|
+
activeWalkthrough,
|
|
5478
5481
|
focusedNodeId,
|
|
5479
5482
|
lastClickedNodeId,
|
|
5480
5483
|
lastClickedEdgeId
|
|
5481
5484
|
} = get();
|
|
5482
|
-
(
|
|
5485
|
+
(activeWalkthrough || focusedNodeId || lastClickedNodeId || lastClickedEdgeId) && set(
|
|
5483
5486
|
{
|
|
5484
|
-
|
|
5487
|
+
activeWalkthrough: null,
|
|
5485
5488
|
focusedNodeId: null,
|
|
5486
5489
|
lastClickedNodeId: null,
|
|
5487
5490
|
lastClickedEdgeId: null,
|
|
@@ -5648,8 +5651,7 @@ function createDiagramStore(props2) {
|
|
|
5648
5651
|
), onNavigateTo(
|
|
5649
5652
|
element.navigateTo,
|
|
5650
5653
|
event,
|
|
5651
|
-
element
|
|
5652
|
-
xynode
|
|
5654
|
+
element
|
|
5653
5655
|
);
|
|
5654
5656
|
},
|
|
5655
5657
|
goBack: () => {
|
|
@@ -5687,10 +5689,10 @@ function createDiagramStore(props2) {
|
|
|
5687
5689
|
), onNavigateTo(stepForward.viewId));
|
|
5688
5690
|
},
|
|
5689
5691
|
fitDiagram: (duration = 500) => {
|
|
5690
|
-
const { fitViewPadding, view, focusedNodeId,
|
|
5691
|
-
panZoom?.setViewport(viewport, { duration }), (focusedNodeId ??
|
|
5692
|
+
const { fitViewPadding, view, focusedNodeId, activeWalkthrough, xystore } = get(), { width, height, panZoom, transform } = xystore.getState(), bounds = view.bounds, maxZoom = Math.max(1, transform[2]), viewport = getViewportForBounds(bounds, width, height, MinZoom, maxZoom, fitViewPadding);
|
|
5693
|
+
panZoom?.setViewport(viewport, { duration }), (focusedNodeId ?? activeWalkthrough) !== null && set(
|
|
5692
5694
|
{
|
|
5693
|
-
|
|
5695
|
+
activeWalkthrough: null,
|
|
5694
5696
|
focusedNodeId: null,
|
|
5695
5697
|
dimmed: EmptyStringSet
|
|
5696
5698
|
},
|
|
@@ -5699,23 +5701,85 @@ function createDiagramStore(props2) {
|
|
|
5699
5701
|
);
|
|
5700
5702
|
},
|
|
5701
5703
|
nextDynamicStep: (increment = 1) => {
|
|
5702
|
-
const {
|
|
5703
|
-
|
|
5704
|
+
const { activeWalkthrough, xyedges: xyedges2, activateWalkthrough } = get(), stepId = activeWalkthrough?.stepId;
|
|
5705
|
+
let nextStep;
|
|
5706
|
+
if (stepId) {
|
|
5707
|
+
const nextIndex = xyedges2.findIndex(({ id: id2 }) => id2 === stepId) + increment;
|
|
5708
|
+
nextStep = xyedges2[nextIndex];
|
|
5709
|
+
} else
|
|
5710
|
+
nextStep = d(xyedges2);
|
|
5711
|
+
if (nextStep) {
|
|
5712
|
+
activateWalkthrough(nextStep.data.edge.id);
|
|
5713
|
+
return;
|
|
5714
|
+
}
|
|
5704
5715
|
},
|
|
5705
|
-
activateDynamicStep: (nextStep) => {
|
|
5706
|
-
|
|
5716
|
+
// activateDynamicStep: (nextStep: number) => {
|
|
5717
|
+
// const { isDynamicView, xyflow, xystore, fitViewPadding } = get()
|
|
5718
|
+
// invariant(isDynamicView, 'view is not dynamic')
|
|
5719
|
+
// const edgeId = StepEdgeId(nextStep)
|
|
5720
|
+
// const dimmed = new StringSet()
|
|
5721
|
+
// let edge: XYFlowEdge | null = null
|
|
5722
|
+
// for (const e of xyflow.getEdges()) {
|
|
5723
|
+
// if (e.id === edgeId) {
|
|
5724
|
+
// edge = e
|
|
5725
|
+
// continue
|
|
5726
|
+
// }
|
|
5727
|
+
// dimmed.add(e.id)
|
|
5728
|
+
// }
|
|
5729
|
+
// invariant(!!edge, `edge not found: ${edgeId}`)
|
|
5730
|
+
// const selected = [] as XYFlowNode[]
|
|
5731
|
+
// for (const n of xyflow.getNodes()) {
|
|
5732
|
+
// if (n.id === edge.source || n.id === edge.target) {
|
|
5733
|
+
// selected.push(n)
|
|
5734
|
+
// continue
|
|
5735
|
+
// }
|
|
5736
|
+
// dimmed.add(n.id)
|
|
5737
|
+
// }
|
|
5738
|
+
// const { fitView, transform } = xystore.getState()
|
|
5739
|
+
// fitView({
|
|
5740
|
+
// duration: 400,
|
|
5741
|
+
// includeHiddenNodes: true,
|
|
5742
|
+
// maxZoom: Math.max(1, transform[2]),
|
|
5743
|
+
// minZoom: MinZoom,
|
|
5744
|
+
// padding: Math.max(fitViewPadding, 0.2),
|
|
5745
|
+
// nodes: selected
|
|
5746
|
+
// })
|
|
5747
|
+
// set(
|
|
5748
|
+
// {
|
|
5749
|
+
// focusedNodeId: null,
|
|
5750
|
+
// activeDynamicViewStep: nextStep,
|
|
5751
|
+
// dimmed
|
|
5752
|
+
// },
|
|
5753
|
+
// noReplace,
|
|
5754
|
+
// 'activateDynamicStep'
|
|
5755
|
+
// )
|
|
5756
|
+
// },
|
|
5757
|
+
activateWalkthrough: (step) => {
|
|
5758
|
+
const stepId = typeof step == "string" ? step : step.data.edge.id;
|
|
5759
|
+
invariant(isStepEdgeId(stepId), `stepId ${stepId} is not a step edge id`);
|
|
5760
|
+
let {
|
|
5761
|
+
isDynamicView,
|
|
5762
|
+
xyflow,
|
|
5763
|
+
xyedges: xyedges2,
|
|
5764
|
+
xystore,
|
|
5765
|
+
fitViewPadding,
|
|
5766
|
+
activeWalkthrough
|
|
5767
|
+
} = get();
|
|
5707
5768
|
invariant(isDynamicView, "view is not dynamic");
|
|
5708
|
-
const
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
}
|
|
5717
|
-
|
|
5718
|
-
|
|
5769
|
+
const edge = typeof step == "string" ? xyedges2.find(({ id: id2 }) => id2 === stepId) : step;
|
|
5770
|
+
invariant(edge, `edge not found: ${stepId}`);
|
|
5771
|
+
const currentIndex = xyedges2.findIndex(({ id: id2 }) => id2 === stepId);
|
|
5772
|
+
activeWalkthrough = {
|
|
5773
|
+
stepId,
|
|
5774
|
+
hasPrevious: currentIndex > 0,
|
|
5775
|
+
hasNext: currentIndex < xyedges2.length - 1,
|
|
5776
|
+
parallelPrefix: getParallelStepsPrefix(stepId)
|
|
5777
|
+
};
|
|
5778
|
+
const dimmed2 = new StringSet(
|
|
5779
|
+
xyedges2.filter(
|
|
5780
|
+
({ id: id2 }) => id2 !== stepId && !(activeWalkthrough.parallelPrefix && id2.startsWith(activeWalkthrough.parallelPrefix))
|
|
5781
|
+
).map(({ id: id2 }) => id2)
|
|
5782
|
+
), selected = [];
|
|
5719
5783
|
for (const n2 of xyflow.getNodes()) {
|
|
5720
5784
|
if (n2.id === edge.source || n2.id === edge.target) {
|
|
5721
5785
|
selected.push(n2);
|
|
@@ -5734,22 +5798,22 @@ function createDiagramStore(props2) {
|
|
|
5734
5798
|
}), set(
|
|
5735
5799
|
{
|
|
5736
5800
|
focusedNodeId: null,
|
|
5737
|
-
|
|
5801
|
+
activeWalkthrough,
|
|
5738
5802
|
dimmed: dimmed2
|
|
5739
5803
|
},
|
|
5740
5804
|
noReplace,
|
|
5741
|
-
"
|
|
5805
|
+
"activateWalkthrough"
|
|
5742
5806
|
);
|
|
5743
5807
|
},
|
|
5744
|
-
|
|
5745
|
-
get().
|
|
5808
|
+
stopWalkthrough: () => {
|
|
5809
|
+
get().activeWalkthrough !== null && (set(
|
|
5746
5810
|
{
|
|
5747
|
-
|
|
5811
|
+
activeWalkthrough: null,
|
|
5748
5812
|
focusedNodeId: null,
|
|
5749
5813
|
dimmed: EmptyStringSet
|
|
5750
5814
|
},
|
|
5751
5815
|
noReplace,
|
|
5752
|
-
"
|
|
5816
|
+
"stopWalkthrough"
|
|
5753
5817
|
), get().fitDiagram());
|
|
5754
5818
|
},
|
|
5755
5819
|
onInit: (instance) => {
|
|
@@ -5887,28 +5951,33 @@ function FitViewOnViewportResize({ diagramApi }) {
|
|
|
5887
5951
|
focusedNodeId || prevDimensionsRef.current === dimensions || (prevDimensionsRef.current = dimensions, fitDiagram(250));
|
|
5888
5952
|
},
|
|
5889
5953
|
[dimensions, diagramApi],
|
|
5890
|
-
250
|
|
5891
|
-
1e3
|
|
5954
|
+
250
|
|
5892
5955
|
), null;
|
|
5893
5956
|
}
|
|
5894
|
-
function selector$
|
|
5957
|
+
function selector$3({ view, activeWalkthrough, viewportChanged, fitViewPadding }) {
|
|
5895
5958
|
return {
|
|
5896
5959
|
layoutId: view.id + "_" + view.autoLayout + "_" + fitViewPadding,
|
|
5960
|
+
isActiveWalkthrough: !!activeWalkthrough,
|
|
5897
5961
|
viewportNotMoved: !viewportChanged
|
|
5898
5962
|
};
|
|
5899
5963
|
}
|
|
5900
5964
|
function FitViewOnDiagramChange() {
|
|
5901
5965
|
const {
|
|
5902
5966
|
layoutId,
|
|
5967
|
+
isActiveWalkthrough,
|
|
5903
5968
|
viewportNotMoved
|
|
5904
|
-
} = useDiagramState(selector$
|
|
5969
|
+
} = useDiagramState(selector$3, shallowEqual), diagramApi = useDiagramStoreApi(), [currentLayoutId, setCurrent] = useState$1(layoutId), requiresFit = layoutId !== currentLayoutId;
|
|
5905
5970
|
return useDebouncedEffect(
|
|
5906
5971
|
() => {
|
|
5907
5972
|
layoutId !== currentLayoutId && (setCurrent(layoutId), diagramApi.getState().fitDiagram(450));
|
|
5908
5973
|
},
|
|
5909
5974
|
[requiresFit, diagramApi],
|
|
5910
5975
|
50
|
|
5911
|
-
), viewportNotMoved && !requiresFit ? /* @__PURE__ */ jsx(FitViewOnViewportResize, { diagramApi }) : null;
|
|
5976
|
+
), viewportNotMoved && !isActiveWalkthrough && !requiresFit ? /* @__PURE__ */ jsx(FitViewOnViewportResize, { diagramApi }) : null;
|
|
5977
|
+
}
|
|
5978
|
+
function useMantinePortalProps() {
|
|
5979
|
+
const target = useDiagramState((s2) => s2.getContainer());
|
|
5980
|
+
return useMemo$1(() => target ? { portalProps: { target } } : { withinPortal: !1 }, [target]);
|
|
5912
5981
|
}
|
|
5913
5982
|
function SelectEdgesOnNodeFocus() {
|
|
5914
5983
|
const diagramStore = useDiagramStoreApi(), focusedNodeId = useDiagramState((s2) => s2.focusedNodeId);
|
|
@@ -5977,241 +6046,497 @@ function SelectEdgesOnNodeFocus() {
|
|
|
5977
6046
|
] : []
|
|
5978
6047
|
), null;
|
|
5979
6048
|
}
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
writable: !1
|
|
5998
|
-
}), styles;
|
|
5999
|
-
}
|
|
6000
|
-
function constant(x2) {
|
|
6001
|
-
return function() {
|
|
6002
|
-
return x2;
|
|
6003
|
-
};
|
|
6004
|
-
}
|
|
6005
|
-
const epsilon$1 = 1e-12, pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon;
|
|
6006
|
-
function append(strings) {
|
|
6007
|
-
this._ += strings[0];
|
|
6008
|
-
for (let i2 = 1, n2 = strings.length; i2 < n2; ++i2)
|
|
6009
|
-
this._ += arguments[i2] + strings[i2];
|
|
6010
|
-
}
|
|
6011
|
-
function appendRound(digits) {
|
|
6012
|
-
let d2 = Math.floor(digits);
|
|
6013
|
-
if (!(d2 >= 0)) throw new Error(`invalid digits: ${digits}`);
|
|
6014
|
-
if (d2 > 15) return append;
|
|
6015
|
-
const k = 10 ** d2;
|
|
6016
|
-
return function(strings) {
|
|
6017
|
-
this._ += strings[0];
|
|
6018
|
-
for (let i2 = 1, n2 = strings.length; i2 < n2; ++i2)
|
|
6019
|
-
this._ += Math.round(arguments[i2] * k) / k + strings[i2];
|
|
6020
|
-
};
|
|
6021
|
-
}
|
|
6022
|
-
class Path {
|
|
6023
|
-
constructor(digits) {
|
|
6024
|
-
this._x0 = this._y0 = // start of current subpath
|
|
6025
|
-
this._x1 = this._y1 = null, this._ = "", this._append = digits == null ? append : appendRound(digits);
|
|
6026
|
-
}
|
|
6027
|
-
moveTo(x2, y2) {
|
|
6028
|
-
this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}`;
|
|
6029
|
-
}
|
|
6030
|
-
closePath() {
|
|
6031
|
-
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
6032
|
-
}
|
|
6033
|
-
lineTo(x2, y2) {
|
|
6034
|
-
this._append`L${this._x1 = +x2},${this._y1 = +y2}`;
|
|
6035
|
-
}
|
|
6036
|
-
quadraticCurveTo(x1, y1, x2, y2) {
|
|
6037
|
-
this._append`Q${+x1},${+y1},${this._x1 = +x2},${this._y1 = +y2}`;
|
|
6038
|
-
}
|
|
6039
|
-
bezierCurveTo(x1, y1, x2, y2, x3, y3) {
|
|
6040
|
-
this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x3},${this._y1 = +y3}`;
|
|
6041
|
-
}
|
|
6042
|
-
arcTo(x1, y1, x2, y2, r2) {
|
|
6043
|
-
if (x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r2 = +r2, r2 < 0) throw new Error(`negative radius: ${r2}`);
|
|
6044
|
-
let x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
|
|
6045
|
-
if (this._x1 === null)
|
|
6046
|
-
this._append`M${this._x1 = x1},${this._y1 = y1}`;
|
|
6047
|
-
else if (l01_2 > epsilon) if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r2)
|
|
6048
|
-
this._append`L${this._x1 = x1},${this._y1 = y1}`;
|
|
6049
|
-
else {
|
|
6050
|
-
let x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l2 = r2 * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l2 / l01, t21 = l2 / l21;
|
|
6051
|
-
Math.abs(t01 - 1) > epsilon && this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`, this._append`A${r2},${r2},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
|
|
6052
|
-
}
|
|
6053
|
-
}
|
|
6054
|
-
arc(x2, y2, r2, a0, a1, ccw) {
|
|
6055
|
-
if (x2 = +x2, y2 = +y2, r2 = +r2, ccw = !!ccw, r2 < 0) throw new Error(`negative radius: ${r2}`);
|
|
6056
|
-
let dx = r2 * Math.cos(a0), dy = r2 * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
|
|
6057
|
-
this._x1 === null ? this._append`M${x0},${y0}` : (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) && this._append`L${x0},${y0}`, r2 && (da < 0 && (da = da % tau + tau), da > tauEpsilon ? this._append`A${r2},${r2},0,1,${cw},${x2 - dx},${y2 - dy}A${r2},${r2},0,1,${cw},${this._x1 = x0},${this._y1 = y0}` : da > epsilon && this._append`A${r2},${r2},0,${+(da >= pi)},${cw},${this._x1 = x2 + r2 * Math.cos(a1)},${this._y1 = y2 + r2 * Math.sin(a1)}`);
|
|
6058
|
-
}
|
|
6059
|
-
rect(x2, y2, w, h) {
|
|
6060
|
-
this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}h${w = +w}v${+h}h${-w}Z`;
|
|
6061
|
-
}
|
|
6062
|
-
toString() {
|
|
6063
|
-
return this._;
|
|
6064
|
-
}
|
|
6065
|
-
}
|
|
6066
|
-
function withPath(shape) {
|
|
6067
|
-
let digits = 3;
|
|
6068
|
-
return shape.digits = function(_) {
|
|
6069
|
-
if (!arguments.length) return digits;
|
|
6070
|
-
if (_ == null)
|
|
6071
|
-
digits = null;
|
|
6072
|
-
else {
|
|
6073
|
-
const d2 = Math.floor(_);
|
|
6074
|
-
if (!(d2 >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
6075
|
-
digits = d2;
|
|
6076
|
-
}
|
|
6077
|
-
return shape;
|
|
6078
|
-
}, () => new Path(digits);
|
|
6079
|
-
}
|
|
6080
|
-
function array(x2) {
|
|
6081
|
-
return typeof x2 == "object" && "length" in x2 ? x2 : Array.from(x2);
|
|
6082
|
-
}
|
|
6083
|
-
function Linear(context) {
|
|
6084
|
-
this._context = context;
|
|
6085
|
-
}
|
|
6086
|
-
Linear.prototype = {
|
|
6087
|
-
areaStart: function() {
|
|
6088
|
-
this._line = 0;
|
|
6089
|
-
},
|
|
6090
|
-
areaEnd: function() {
|
|
6091
|
-
this._line = NaN;
|
|
6092
|
-
},
|
|
6093
|
-
lineStart: function() {
|
|
6094
|
-
this._point = 0;
|
|
6095
|
-
},
|
|
6096
|
-
lineEnd: function() {
|
|
6097
|
-
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
6049
|
+
/**
|
|
6050
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6051
|
+
*
|
|
6052
|
+
* This source code is licensed under the MIT license.
|
|
6053
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6054
|
+
*/
|
|
6055
|
+
var defaultAttributes = {
|
|
6056
|
+
outline: {
|
|
6057
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6058
|
+
width: 24,
|
|
6059
|
+
height: 24,
|
|
6060
|
+
viewBox: "0 0 24 24",
|
|
6061
|
+
fill: "none",
|
|
6062
|
+
stroke: "currentColor",
|
|
6063
|
+
strokeWidth: 2,
|
|
6064
|
+
strokeLinecap: "round",
|
|
6065
|
+
strokeLinejoin: "round"
|
|
6098
6066
|
},
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
default:
|
|
6107
|
-
this._context.lineTo(x2, y2);
|
|
6108
|
-
break;
|
|
6109
|
-
}
|
|
6067
|
+
filled: {
|
|
6068
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6069
|
+
width: 24,
|
|
6070
|
+
height: 24,
|
|
6071
|
+
viewBox: "0 0 24 24",
|
|
6072
|
+
fill: "currentColor",
|
|
6073
|
+
stroke: "none"
|
|
6110
6074
|
}
|
|
6111
6075
|
};
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
}
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
function point$1(that, x2, y2) {
|
|
6143
|
-
that._context.bezierCurveTo(
|
|
6144
|
-
that._x1 + that._k * (that._x2 - that._x0),
|
|
6145
|
-
that._y1 + that._k * (that._y2 - that._y0),
|
|
6146
|
-
that._x2 + that._k * (that._x1 - x2),
|
|
6147
|
-
that._y2 + that._k * (that._y1 - y2),
|
|
6148
|
-
that._x2,
|
|
6149
|
-
that._y2
|
|
6076
|
+
/**
|
|
6077
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6078
|
+
*
|
|
6079
|
+
* This source code is licensed under the MIT license.
|
|
6080
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6081
|
+
*/
|
|
6082
|
+
const createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
6083
|
+
const Component2 = forwardRef$1(
|
|
6084
|
+
({ color: color2 = "currentColor", size = 24, stroke = 2, title: title2, className, children, ...rest }, ref) => createElement$1(
|
|
6085
|
+
"svg",
|
|
6086
|
+
{
|
|
6087
|
+
ref,
|
|
6088
|
+
...defaultAttributes[type],
|
|
6089
|
+
width: size,
|
|
6090
|
+
height: size,
|
|
6091
|
+
className: ["tabler-icon", `tabler-icon-${iconName}`, className].join(" "),
|
|
6092
|
+
...type === "filled" ? {
|
|
6093
|
+
fill: color2
|
|
6094
|
+
} : {
|
|
6095
|
+
strokeWidth: stroke,
|
|
6096
|
+
stroke: color2
|
|
6097
|
+
},
|
|
6098
|
+
...rest
|
|
6099
|
+
},
|
|
6100
|
+
[
|
|
6101
|
+
title2 && createElement$1("title", { key: "svg-title" }, title2),
|
|
6102
|
+
...iconNode.map(([tag, attrs]) => createElement$1(tag, attrs)),
|
|
6103
|
+
...Array.isArray(children) ? children : [children]
|
|
6104
|
+
]
|
|
6105
|
+
)
|
|
6150
6106
|
);
|
|
6151
|
-
}
|
|
6152
|
-
function Cardinal(context, tension) {
|
|
6153
|
-
this._context = context, this._k = (1 - tension) / 6;
|
|
6154
|
-
}
|
|
6155
|
-
Cardinal.prototype = {
|
|
6156
|
-
areaStart: function() {
|
|
6157
|
-
this._line = 0;
|
|
6158
|
-
},
|
|
6159
|
-
areaEnd: function() {
|
|
6160
|
-
this._line = NaN;
|
|
6161
|
-
},
|
|
6162
|
-
lineStart: function() {
|
|
6163
|
-
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
|
|
6164
|
-
},
|
|
6165
|
-
lineEnd: function() {
|
|
6166
|
-
switch (this._point) {
|
|
6167
|
-
case 2:
|
|
6168
|
-
this._context.lineTo(this._x2, this._y2);
|
|
6169
|
-
break;
|
|
6170
|
-
case 3:
|
|
6171
|
-
point$1(this, this._x1, this._y1);
|
|
6172
|
-
break;
|
|
6173
|
-
}
|
|
6174
|
-
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
6175
|
-
},
|
|
6176
|
-
point: function(x2, y2) {
|
|
6177
|
-
switch (x2 = +x2, y2 = +y2, this._point) {
|
|
6178
|
-
case 0:
|
|
6179
|
-
this._point = 1, this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2);
|
|
6180
|
-
break;
|
|
6181
|
-
case 1:
|
|
6182
|
-
this._point = 2, this._x1 = x2, this._y1 = y2;
|
|
6183
|
-
break;
|
|
6184
|
-
case 2:
|
|
6185
|
-
this._point = 3;
|
|
6186
|
-
default:
|
|
6187
|
-
point$1(this, x2, y2);
|
|
6188
|
-
break;
|
|
6189
|
-
}
|
|
6190
|
-
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
6191
|
-
}
|
|
6107
|
+
return Component2.displayName = `${iconNamePascal}`, Component2;
|
|
6192
6108
|
};
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6109
|
+
/**
|
|
6110
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6111
|
+
*
|
|
6112
|
+
* This source code is licensed under the MIT license.
|
|
6113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6114
|
+
*/
|
|
6115
|
+
var IconAlertTriangle = createReactComponent("outline", "alert-triangle", "IconAlertTriangle", [["path", { d: "M12 9v4", key: "svg-0" }], ["path", { d: "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]]);
|
|
6116
|
+
/**
|
|
6117
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6118
|
+
*
|
|
6119
|
+
* This source code is licensed under the MIT license.
|
|
6120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6121
|
+
*/
|
|
6122
|
+
var IconArrowBigDownLines = createReactComponent("outline", "arrow-big-down-lines", "IconArrowBigDownLines", [["path", { d: "M15 12h3.586a1 1 0 0 1 .707 1.707l-6.586 6.586a1 1 0 0 1 -1.414 0l-6.586 -6.586a1 1 0 0 1 .707 -1.707h3.586v-3h6v3z", key: "svg-0" }], ["path", { d: "M15 3h-6", key: "svg-1" }], ["path", { d: "M15 6h-6", key: "svg-2" }]]);
|
|
6123
|
+
/**
|
|
6124
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6125
|
+
*
|
|
6126
|
+
* This source code is licensed under the MIT license.
|
|
6127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6128
|
+
*/
|
|
6129
|
+
var IconArrowDownRight = createReactComponent("outline", "arrow-down-right", "IconArrowDownRight", [["path", { d: "M7 7l10 10", key: "svg-0" }], ["path", { d: "M17 8l0 9l-9 0", key: "svg-1" }]]);
|
|
6130
|
+
/**
|
|
6131
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6132
|
+
*
|
|
6133
|
+
* This source code is licensed under the MIT license.
|
|
6134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6135
|
+
*/
|
|
6136
|
+
var IconArrowLeft = createReactComponent("outline", "arrow-left", "IconArrowLeft", [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M5 12l6 6", key: "svg-1" }], ["path", { d: "M5 12l6 -6", key: "svg-2" }]]);
|
|
6137
|
+
/**
|
|
6138
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6139
|
+
*
|
|
6140
|
+
* This source code is licensed under the MIT license.
|
|
6141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6142
|
+
*/
|
|
6143
|
+
var IconCheck = createReactComponent("outline", "check", "IconCheck", [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]]);
|
|
6144
|
+
/**
|
|
6145
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6146
|
+
*
|
|
6147
|
+
* This source code is licensed under the MIT license.
|
|
6148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6149
|
+
*/
|
|
6150
|
+
var IconChevronDown = createReactComponent("outline", "chevron-down", "IconChevronDown", [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]]);
|
|
6151
|
+
/**
|
|
6152
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6153
|
+
*
|
|
6154
|
+
* This source code is licensed under the MIT license.
|
|
6155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6156
|
+
*/
|
|
6157
|
+
var IconChevronLeft = createReactComponent("outline", "chevron-left", "IconChevronLeft", [["path", { d: "M15 6l-6 6l6 6", key: "svg-0" }]]);
|
|
6158
|
+
/**
|
|
6159
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6160
|
+
*
|
|
6161
|
+
* This source code is licensed under the MIT license.
|
|
6162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6163
|
+
*/
|
|
6164
|
+
var IconChevronRight = createReactComponent("outline", "chevron-right", "IconChevronRight", [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]]);
|
|
6165
|
+
/**
|
|
6166
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6167
|
+
*
|
|
6168
|
+
* This source code is licensed under the MIT license.
|
|
6169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6170
|
+
*/
|
|
6171
|
+
var IconCopy = createReactComponent("outline", "copy", "IconCopy", [["path", { d: "M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z", key: "svg-0" }], ["path", { d: "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1", key: "svg-1" }]]);
|
|
6172
|
+
/**
|
|
6173
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6174
|
+
*
|
|
6175
|
+
* This source code is licensed under the MIT license.
|
|
6176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6177
|
+
*/
|
|
6178
|
+
var IconExternalLink = createReactComponent("outline", "external-link", "IconExternalLink", [["path", { d: "M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6", key: "svg-0" }], ["path", { d: "M11 13l9 -9", key: "svg-1" }], ["path", { d: "M15 4h5v5", key: "svg-2" }]]);
|
|
6179
|
+
/**
|
|
6180
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6181
|
+
*
|
|
6182
|
+
* This source code is licensed under the MIT license.
|
|
6183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6184
|
+
*/
|
|
6185
|
+
var IconFileCode = createReactComponent("outline", "file-code", "IconFileCode", [["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }], ["path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z", key: "svg-1" }], ["path", { d: "M10 13l-1 2l1 2", key: "svg-2" }], ["path", { d: "M14 13l1 2l-1 2", key: "svg-3" }]]);
|
|
6186
|
+
/**
|
|
6187
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6188
|
+
*
|
|
6189
|
+
* This source code is licensed under the MIT license.
|
|
6190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6191
|
+
*/
|
|
6192
|
+
var IconFileSymlink = createReactComponent("outline", "file-symlink", "IconFileSymlink", [["path", { d: "M4 21v-4a3 3 0 0 1 3 -3h5", key: "svg-0" }], ["path", { d: "M9 17l3 -3l-3 -3", key: "svg-1" }], ["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-2" }], ["path", { d: "M5 11v-6a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-9.5", key: "svg-3" }]]);
|
|
6193
|
+
/**
|
|
6194
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6195
|
+
*
|
|
6196
|
+
* This source code is licensed under the MIT license.
|
|
6197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6198
|
+
*/
|
|
6199
|
+
var IconFocusCentered = createReactComponent("outline", "focus-centered", "IconFocusCentered", [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M4 8v-2a2 2 0 0 1 2 -2h2", key: "svg-1" }], ["path", { d: "M4 16v2a2 2 0 0 0 2 2h2", key: "svg-2" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "svg-3" }], ["path", { d: "M16 20h2a2 2 0 0 0 2 -2v-2", key: "svg-4" }]]);
|
|
6200
|
+
/**
|
|
6201
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6202
|
+
*
|
|
6203
|
+
* This source code is licensed under the MIT license.
|
|
6204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6205
|
+
*/
|
|
6206
|
+
var IconFolderOpen = createReactComponent("outline", "folder-open", "IconFolderOpen", [["path", { d: "M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2", key: "svg-0" }]]);
|
|
6207
|
+
/**
|
|
6208
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6209
|
+
*
|
|
6210
|
+
* This source code is licensed under the MIT license.
|
|
6211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6212
|
+
*/
|
|
6213
|
+
var IconHelpCircle = createReactComponent("outline", "help-circle", "IconHelpCircle", [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 16v.01", key: "svg-1" }], ["path", { d: "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", key: "svg-2" }]]);
|
|
6214
|
+
/**
|
|
6215
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6216
|
+
*
|
|
6217
|
+
* This source code is licensed under the MIT license.
|
|
6218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6219
|
+
*/
|
|
6220
|
+
var IconLayoutDashboard = createReactComponent("outline", "layout-dashboard", "IconLayoutDashboard", [["path", { d: "M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-0" }], ["path", { d: "M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-1" }], ["path", { d: "M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-2" }], ["path", { d: "M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-3" }]]);
|
|
6221
|
+
/**
|
|
6222
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6223
|
+
*
|
|
6224
|
+
* This source code is licensed under the MIT license.
|
|
6225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6226
|
+
*/
|
|
6227
|
+
var IconLink = createReactComponent("outline", "link", "IconLink", [["path", { d: "M9 15l6 -6", key: "svg-0" }], ["path", { d: "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464", key: "svg-1" }], ["path", { d: "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463", key: "svg-2" }]]);
|
|
6228
|
+
/**
|
|
6229
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6230
|
+
*
|
|
6231
|
+
* This source code is licensed under the MIT license.
|
|
6232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6233
|
+
*/
|
|
6234
|
+
var IconMenu2 = createReactComponent("outline", "menu-2", "IconMenu2", [["path", { d: "M4 6l16 0", key: "svg-0" }], ["path", { d: "M4 12l16 0", key: "svg-1" }], ["path", { d: "M4 18l16 0", key: "svg-2" }]]);
|
|
6235
|
+
/**
|
|
6236
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6237
|
+
*
|
|
6238
|
+
* This source code is licensed under the MIT license.
|
|
6239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6240
|
+
*/
|
|
6241
|
+
var IconMenu = createReactComponent("outline", "menu", "IconMenu", [["path", { d: "M4 8l16 0", key: "svg-0" }], ["path", { d: "M4 16l16 0", key: "svg-1" }]]);
|
|
6242
|
+
/**
|
|
6243
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6244
|
+
*
|
|
6245
|
+
* This source code is licensed under the MIT license.
|
|
6246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6247
|
+
*/
|
|
6248
|
+
var IconMoonStars = createReactComponent("outline", "moon-stars", "IconMoonStars", [["path", { d: "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z", key: "svg-0" }], ["path", { d: "M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2", key: "svg-1" }], ["path", { d: "M19 11h2m-1 -1v2", key: "svg-2" }]]);
|
|
6249
|
+
/**
|
|
6250
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6251
|
+
*
|
|
6252
|
+
* This source code is licensed under the MIT license.
|
|
6253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6254
|
+
*/
|
|
6255
|
+
var IconShare = createReactComponent("outline", "share", "IconShare", [["path", { d: "M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-0" }], ["path", { d: "M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-1" }], ["path", { d: "M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-2" }], ["path", { d: "M8.7 10.7l6.6 -3.4", key: "svg-3" }], ["path", { d: "M8.7 13.3l6.6 3.4", key: "svg-4" }]]);
|
|
6256
|
+
/**
|
|
6257
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6258
|
+
*
|
|
6259
|
+
* This source code is licensed under the MIT license.
|
|
6260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6261
|
+
*/
|
|
6262
|
+
var IconSun = createReactComponent("outline", "sun", "IconSun", [["path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }], ["path", { d: "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7", key: "svg-1" }]]);
|
|
6263
|
+
/**
|
|
6264
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6265
|
+
*
|
|
6266
|
+
* This source code is licensed under the MIT license.
|
|
6267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6268
|
+
*/
|
|
6269
|
+
var IconZoomScan = createReactComponent("outline", "zoom-scan", "IconZoomScan", [["path", { d: "M4 8v-2a2 2 0 0 1 2 -2h2", key: "svg-0" }], ["path", { d: "M4 16v2a2 2 0 0 0 2 2h2", key: "svg-1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "svg-2" }], ["path", { d: "M16 20h2a2 2 0 0 0 2 -2v-2", key: "svg-3" }], ["path", { d: "M8 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-4" }], ["path", { d: "M16 16l-2.5 -2.5", key: "svg-5" }]]);
|
|
6270
|
+
/**
|
|
6271
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6272
|
+
*
|
|
6273
|
+
* This source code is licensed under the MIT license.
|
|
6274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6275
|
+
*/
|
|
6276
|
+
var IconFolderFilled = createReactComponent("filled", "folder-filled", "IconFolderFilled", [["path", { d: "M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z", key: "svg-0" }]]);
|
|
6277
|
+
/**
|
|
6278
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6279
|
+
*
|
|
6280
|
+
* This source code is licensed under the MIT license.
|
|
6281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6282
|
+
*/
|
|
6283
|
+
var IconPlayerPlayFilled = createReactComponent("filled", "player-play-filled", "IconPlayerPlayFilled", [["path", { d: "M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z", key: "svg-0" }]]);
|
|
6284
|
+
/**
|
|
6285
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6286
|
+
*
|
|
6287
|
+
* This source code is licensed under the MIT license.
|
|
6288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6289
|
+
*/
|
|
6290
|
+
var IconPlayerSkipBackFilled = createReactComponent("filled", "player-skip-back-filled", "IconPlayerSkipBackFilled", [["path", { d: "M19.496 4.136l-12 7a1 1 0 0 0 0 1.728l12 7a1 1 0 0 0 1.504 -.864v-14a1 1 0 0 0 -1.504 -.864z", key: "svg-0" }], ["path", { d: "M4 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z", key: "svg-1" }]]);
|
|
6291
|
+
/**
|
|
6292
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6293
|
+
*
|
|
6294
|
+
* This source code is licensed under the MIT license.
|
|
6295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6296
|
+
*/
|
|
6297
|
+
var IconPlayerSkipForwardFilled = createReactComponent("filled", "player-skip-forward-filled", "IconPlayerSkipForwardFilled", [["path", { d: "M3 5v14a1 1 0 0 0 1.504 .864l12 -7a1 1 0 0 0 0 -1.728l-12 -7a1 1 0 0 0 -1.504 .864z", key: "svg-0" }], ["path", { d: "M20 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z", key: "svg-1" }]]);
|
|
6298
|
+
/**
|
|
6299
|
+
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6300
|
+
*
|
|
6301
|
+
* This source code is licensed under the MIT license.
|
|
6302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6303
|
+
*/
|
|
6304
|
+
var IconPlayerStopFilled = createReactComponent("filled", "player-stop-filled", "IconPlayerStopFilled", [["path", { d: "M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z", key: "svg-0" }]]);
|
|
6305
|
+
function getVarName(variable) {
|
|
6306
|
+
var matches = variable.match(/^var\((.*)\)$/);
|
|
6307
|
+
return matches ? matches[1] : variable;
|
|
6308
|
+
}
|
|
6309
|
+
function assignInlineVars(varsOrContract, tokens) {
|
|
6310
|
+
var styles = {};
|
|
6311
|
+
{
|
|
6312
|
+
var _vars = varsOrContract;
|
|
6313
|
+
for (var varName in _vars) {
|
|
6314
|
+
var value = _vars[varName];
|
|
6315
|
+
value != null && (styles[getVarName(varName)] = value);
|
|
6316
|
+
}
|
|
6196
6317
|
}
|
|
6197
|
-
return
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
}
|
|
6201
|
-
|
|
6202
|
-
|
|
6318
|
+
return Object.defineProperty(styles, "toString", {
|
|
6319
|
+
value: function() {
|
|
6320
|
+
return Object.keys(this).map((key) => "".concat(key, ":").concat(this[key])).join(";");
|
|
6321
|
+
},
|
|
6322
|
+
writable: !1
|
|
6323
|
+
}), styles;
|
|
6203
6324
|
}
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
}
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6325
|
+
function constant(x2) {
|
|
6326
|
+
return function() {
|
|
6327
|
+
return x2;
|
|
6328
|
+
};
|
|
6329
|
+
}
|
|
6330
|
+
const epsilon$1 = 1e-12, pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon;
|
|
6331
|
+
function append(strings) {
|
|
6332
|
+
this._ += strings[0];
|
|
6333
|
+
for (let i2 = 1, n2 = strings.length; i2 < n2; ++i2)
|
|
6334
|
+
this._ += arguments[i2] + strings[i2];
|
|
6335
|
+
}
|
|
6336
|
+
function appendRound(digits) {
|
|
6337
|
+
let d2 = Math.floor(digits);
|
|
6338
|
+
if (!(d2 >= 0)) throw new Error(`invalid digits: ${digits}`);
|
|
6339
|
+
if (d2 > 15) return append;
|
|
6340
|
+
const k = 10 ** d2;
|
|
6341
|
+
return function(strings) {
|
|
6342
|
+
this._ += strings[0];
|
|
6343
|
+
for (let i2 = 1, n2 = strings.length; i2 < n2; ++i2)
|
|
6344
|
+
this._ += Math.round(arguments[i2] * k) / k + strings[i2];
|
|
6345
|
+
};
|
|
6346
|
+
}
|
|
6347
|
+
class Path {
|
|
6348
|
+
constructor(digits) {
|
|
6349
|
+
this._x0 = this._y0 = // start of current subpath
|
|
6350
|
+
this._x1 = this._y1 = null, this._ = "", this._append = digits == null ? append : appendRound(digits);
|
|
6351
|
+
}
|
|
6352
|
+
moveTo(x2, y2) {
|
|
6353
|
+
this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}`;
|
|
6354
|
+
}
|
|
6355
|
+
closePath() {
|
|
6356
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
6357
|
+
}
|
|
6358
|
+
lineTo(x2, y2) {
|
|
6359
|
+
this._append`L${this._x1 = +x2},${this._y1 = +y2}`;
|
|
6360
|
+
}
|
|
6361
|
+
quadraticCurveTo(x1, y1, x2, y2) {
|
|
6362
|
+
this._append`Q${+x1},${+y1},${this._x1 = +x2},${this._y1 = +y2}`;
|
|
6363
|
+
}
|
|
6364
|
+
bezierCurveTo(x1, y1, x2, y2, x3, y3) {
|
|
6365
|
+
this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x3},${this._y1 = +y3}`;
|
|
6366
|
+
}
|
|
6367
|
+
arcTo(x1, y1, x2, y2, r2) {
|
|
6368
|
+
if (x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r2 = +r2, r2 < 0) throw new Error(`negative radius: ${r2}`);
|
|
6369
|
+
let x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
|
|
6370
|
+
if (this._x1 === null)
|
|
6371
|
+
this._append`M${this._x1 = x1},${this._y1 = y1}`;
|
|
6372
|
+
else if (l01_2 > epsilon) if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r2)
|
|
6373
|
+
this._append`L${this._x1 = x1},${this._y1 = y1}`;
|
|
6374
|
+
else {
|
|
6375
|
+
let x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l2 = r2 * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l2 / l01, t21 = l2 / l21;
|
|
6376
|
+
Math.abs(t01 - 1) > epsilon && this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`, this._append`A${r2},${r2},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
|
|
6377
|
+
}
|
|
6378
|
+
}
|
|
6379
|
+
arc(x2, y2, r2, a0, a1, ccw) {
|
|
6380
|
+
if (x2 = +x2, y2 = +y2, r2 = +r2, ccw = !!ccw, r2 < 0) throw new Error(`negative radius: ${r2}`);
|
|
6381
|
+
let dx = r2 * Math.cos(a0), dy = r2 * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
|
|
6382
|
+
this._x1 === null ? this._append`M${x0},${y0}` : (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) && this._append`L${x0},${y0}`, r2 && (da < 0 && (da = da % tau + tau), da > tauEpsilon ? this._append`A${r2},${r2},0,1,${cw},${x2 - dx},${y2 - dy}A${r2},${r2},0,1,${cw},${this._x1 = x0},${this._y1 = y0}` : da > epsilon && this._append`A${r2},${r2},0,${+(da >= pi)},${cw},${this._x1 = x2 + r2 * Math.cos(a1)},${this._y1 = y2 + r2 * Math.sin(a1)}`);
|
|
6383
|
+
}
|
|
6384
|
+
rect(x2, y2, w, h) {
|
|
6385
|
+
this._append`M${this._x0 = this._x1 = +x2},${this._y0 = this._y1 = +y2}h${w = +w}v${+h}h${-w}Z`;
|
|
6386
|
+
}
|
|
6387
|
+
toString() {
|
|
6388
|
+
return this._;
|
|
6389
|
+
}
|
|
6390
|
+
}
|
|
6391
|
+
function withPath(shape) {
|
|
6392
|
+
let digits = 3;
|
|
6393
|
+
return shape.digits = function(_) {
|
|
6394
|
+
if (!arguments.length) return digits;
|
|
6395
|
+
if (_ == null)
|
|
6396
|
+
digits = null;
|
|
6397
|
+
else {
|
|
6398
|
+
const d2 = Math.floor(_);
|
|
6399
|
+
if (!(d2 >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
6400
|
+
digits = d2;
|
|
6401
|
+
}
|
|
6402
|
+
return shape;
|
|
6403
|
+
}, () => new Path(digits);
|
|
6404
|
+
}
|
|
6405
|
+
function array(x2) {
|
|
6406
|
+
return typeof x2 == "object" && "length" in x2 ? x2 : Array.from(x2);
|
|
6407
|
+
}
|
|
6408
|
+
function Linear(context) {
|
|
6409
|
+
this._context = context;
|
|
6410
|
+
}
|
|
6411
|
+
Linear.prototype = {
|
|
6412
|
+
areaStart: function() {
|
|
6413
|
+
this._line = 0;
|
|
6414
|
+
},
|
|
6415
|
+
areaEnd: function() {
|
|
6416
|
+
this._line = NaN;
|
|
6417
|
+
},
|
|
6418
|
+
lineStart: function() {
|
|
6419
|
+
this._point = 0;
|
|
6420
|
+
},
|
|
6421
|
+
lineEnd: function() {
|
|
6422
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
6423
|
+
},
|
|
6424
|
+
point: function(x2, y2) {
|
|
6425
|
+
switch (x2 = +x2, y2 = +y2, this._point) {
|
|
6426
|
+
case 0:
|
|
6427
|
+
this._point = 1, this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2);
|
|
6428
|
+
break;
|
|
6429
|
+
case 1:
|
|
6430
|
+
this._point = 2;
|
|
6431
|
+
default:
|
|
6432
|
+
this._context.lineTo(x2, y2);
|
|
6433
|
+
break;
|
|
6434
|
+
}
|
|
6435
|
+
}
|
|
6436
|
+
};
|
|
6437
|
+
function curveLinear(context) {
|
|
6438
|
+
return new Linear(context);
|
|
6439
|
+
}
|
|
6440
|
+
function x(p2) {
|
|
6441
|
+
return p2[0];
|
|
6442
|
+
}
|
|
6443
|
+
function y(p2) {
|
|
6444
|
+
return p2[1];
|
|
6445
|
+
}
|
|
6446
|
+
function d3line(x$1, y$12) {
|
|
6447
|
+
var defined = constant(!0), context = null, curve2 = curveLinear, output = null, path = withPath(line);
|
|
6448
|
+
x$1 = typeof x$1 == "function" ? x$1 : x$1 === void 0 ? x : constant(x$1), y$12 = typeof y$12 == "function" ? y$12 : y$12 === void 0 ? y : constant(y$12);
|
|
6449
|
+
function line(data) {
|
|
6450
|
+
var i2, n2 = (data = array(data)).length, d2, defined0 = !1, buffer;
|
|
6451
|
+
for (context == null && (output = curve2(buffer = path())), i2 = 0; i2 <= n2; ++i2)
|
|
6452
|
+
!(i2 < n2 && defined(d2 = data[i2], i2, data)) === defined0 && ((defined0 = !defined0) ? output.lineStart() : output.lineEnd()), defined0 && output.point(+x$1(d2, i2, data), +y$12(d2, i2, data));
|
|
6453
|
+
if (buffer) return output = null, buffer + "" || null;
|
|
6454
|
+
}
|
|
6455
|
+
return line.x = function(_) {
|
|
6456
|
+
return arguments.length ? (x$1 = typeof _ == "function" ? _ : constant(+_), line) : x$1;
|
|
6457
|
+
}, line.y = function(_) {
|
|
6458
|
+
return arguments.length ? (y$12 = typeof _ == "function" ? _ : constant(+_), line) : y$12;
|
|
6459
|
+
}, line.defined = function(_) {
|
|
6460
|
+
return arguments.length ? (defined = typeof _ == "function" ? _ : constant(!!_), line) : defined;
|
|
6461
|
+
}, line.curve = function(_) {
|
|
6462
|
+
return arguments.length ? (curve2 = _, context != null && (output = curve2(context)), line) : curve2;
|
|
6463
|
+
}, line.context = function(_) {
|
|
6464
|
+
return arguments.length ? (_ == null ? context = output = null : output = curve2(context = _), line) : context;
|
|
6465
|
+
}, line;
|
|
6466
|
+
}
|
|
6467
|
+
function point$1(that, x2, y2) {
|
|
6468
|
+
that._context.bezierCurveTo(
|
|
6469
|
+
that._x1 + that._k * (that._x2 - that._x0),
|
|
6470
|
+
that._y1 + that._k * (that._y2 - that._y0),
|
|
6471
|
+
that._x2 + that._k * (that._x1 - x2),
|
|
6472
|
+
that._y2 + that._k * (that._y1 - y2),
|
|
6473
|
+
that._x2,
|
|
6474
|
+
that._y2
|
|
6475
|
+
);
|
|
6476
|
+
}
|
|
6477
|
+
function Cardinal(context, tension) {
|
|
6478
|
+
this._context = context, this._k = (1 - tension) / 6;
|
|
6479
|
+
}
|
|
6480
|
+
Cardinal.prototype = {
|
|
6481
|
+
areaStart: function() {
|
|
6482
|
+
this._line = 0;
|
|
6483
|
+
},
|
|
6484
|
+
areaEnd: function() {
|
|
6485
|
+
this._line = NaN;
|
|
6486
|
+
},
|
|
6487
|
+
lineStart: function() {
|
|
6488
|
+
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
|
|
6489
|
+
},
|
|
6490
|
+
lineEnd: function() {
|
|
6491
|
+
switch (this._point) {
|
|
6492
|
+
case 2:
|
|
6493
|
+
this._context.lineTo(this._x2, this._y2);
|
|
6494
|
+
break;
|
|
6495
|
+
case 3:
|
|
6496
|
+
point$1(this, this._x1, this._y1);
|
|
6497
|
+
break;
|
|
6498
|
+
}
|
|
6499
|
+
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
6500
|
+
},
|
|
6501
|
+
point: function(x2, y2) {
|
|
6502
|
+
switch (x2 = +x2, y2 = +y2, this._point) {
|
|
6503
|
+
case 0:
|
|
6504
|
+
this._point = 1, this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2);
|
|
6505
|
+
break;
|
|
6506
|
+
case 1:
|
|
6507
|
+
this._point = 2, this._x1 = x2, this._y1 = y2;
|
|
6508
|
+
break;
|
|
6509
|
+
case 2:
|
|
6510
|
+
this._point = 3;
|
|
6511
|
+
default:
|
|
6512
|
+
point$1(this, x2, y2);
|
|
6513
|
+
break;
|
|
6514
|
+
}
|
|
6515
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2, this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
6516
|
+
}
|
|
6517
|
+
};
|
|
6518
|
+
(function custom(tension) {
|
|
6519
|
+
function cardinal(context) {
|
|
6520
|
+
return new Cardinal(context, tension);
|
|
6521
|
+
}
|
|
6522
|
+
return cardinal.tension = function(tension2) {
|
|
6523
|
+
return custom(+tension2);
|
|
6524
|
+
}, cardinal;
|
|
6525
|
+
})(0);
|
|
6526
|
+
function CardinalOpen(context, tension) {
|
|
6527
|
+
this._context = context, this._k = (1 - tension) / 6;
|
|
6528
|
+
}
|
|
6529
|
+
CardinalOpen.prototype = {
|
|
6530
|
+
areaStart: function() {
|
|
6531
|
+
this._line = 0;
|
|
6532
|
+
},
|
|
6533
|
+
areaEnd: function() {
|
|
6534
|
+
this._line = NaN;
|
|
6535
|
+
},
|
|
6536
|
+
lineStart: function() {
|
|
6537
|
+
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
|
|
6538
|
+
},
|
|
6539
|
+
lineEnd: function() {
|
|
6215
6540
|
(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
|
|
6216
6541
|
},
|
|
6217
6542
|
point: function(x2, y2) {
|
|
@@ -6513,7 +6838,7 @@ const curveCatmullRomOpen = function custom4(alpha2) {
|
|
|
6513
6838
|
Dot,
|
|
6514
6839
|
ODot
|
|
6515
6840
|
};
|
|
6516
|
-
var container$5 = "yi2p6v1", dimmed$2 = "yi2p6v2", edgePathBg = "yi2p6v3", markerContext = "yi2p6v4", controlPoint = "yi2p6v5", controlDragging = "yi2p6v6", cssEdgePath = "yi2p6v8", stepEdgeNumber = "yi2p6v9", varLabelX = "var(--yi2p6va)", varLabelY = "var(--yi2p6vb)", edgeLabel = "yi2p6vd", edgeLabelText = "yi2p6ve";
|
|
6841
|
+
var container$5 = "yi2p6v1", dimmed$2 = "yi2p6v2", edgePathBg = "yi2p6v3", markerContext = "yi2p6v4", controlPoint = "yi2p6v5", controlDragging = "yi2p6v6", cssEdgePath = "yi2p6v8", stepEdgeNumber = "yi2p6v9", varLabelX = "var(--yi2p6va)", varLabelY = "var(--yi2p6vb)", edgeLabel = "yi2p6vd", edgeLabelText = "yi2p6ve", edgeNoteCloseButton = "yi2p6vf", edgeNoteText = "yi2p6vg", cssNavigateBtn$1 = "yi2p6vh", cssNavigateBtnIcon = "yi2p6vi";
|
|
6517
6842
|
function getNodeIntersectionFromCenterToPoint(intersectionNode, { x: x1, y: y1 }) {
|
|
6518
6843
|
const {
|
|
6519
6844
|
width: intersectionNodeWidth,
|
|
@@ -6557,7 +6882,7 @@ function bezierPath(bezierSpline) {
|
|
|
6557
6882
|
const isSame = (a2, b2) => Math.abs(a2 - b2) < 2.5, isSamePoint = (a2, b2) => {
|
|
6558
6883
|
const [ax, ay] = n(a2) ? a2 : [a2.x, a2.y], [bx, by] = n(b2) ? b2 : [b2.x, b2.y];
|
|
6559
6884
|
return isSame(ax, bx) && isSame(ay, by);
|
|
6560
|
-
}, sameControlPoints = (a2, b2) => a2 === b2 ? !0 : !a2 || !b2 || a2.length !== b2.length ? !1 : a2.every((ap, i2) => isSamePoint(ap, b2[i2])), isEqualProps$2 = (prev, next) => prev.id === next.id && deepEqual(prev.source, next.source) && deepEqual(prev.target, next.target) && deepEqual(prev.selected ?? !1, next.selected ?? !1) && isSame(prev.sourceX, next.sourceX) && isSame(prev.sourceY, next.sourceY) && isSame(prev.targetX, next.targetX) && isSame(prev.targetY, next.targetY) && deepEqual(prev.data.
|
|
6885
|
+
}, sameControlPoints = (a2, b2) => a2 === b2 ? !0 : !a2 || !b2 || a2.length !== b2.length ? !1 : a2.every((ap, i2) => isSamePoint(ap, b2[i2])), isEqualProps$2 = (prev, next) => prev.id === next.id && deepEqual(prev.source, next.source) && deepEqual(prev.target, next.target) && deepEqual(prev.selected ?? !1, next.selected ?? !1) && isSame(prev.sourceX, next.sourceX) && isSame(prev.sourceY, next.sourceY) && isSame(prev.targetX, next.targetX) && isSame(prev.targetY, next.targetY) && deepEqual(prev.data.label, next.data.label) && sameControlPoints(prev.data.controlPoints, next.data.controlPoints) && deepEqual(prev.data.edge, next.data.edge), curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y), RelationshipEdge = /* @__PURE__ */ memo$1(function({
|
|
6561
6886
|
id: id2,
|
|
6562
6887
|
data,
|
|
6563
6888
|
selected,
|
|
@@ -6570,13 +6895,26 @@ const isSame = (a2, b2) => Math.abs(a2 - b2) < 2.5, isSamePoint = (a2, b2) => {
|
|
|
6570
6895
|
target,
|
|
6571
6896
|
interactionWidth
|
|
6572
6897
|
}) {
|
|
6573
|
-
const [isControlPointDragging, setIsControlPointDragging] = useState$1(!1), diagramStore = useDiagramStoreApi(), xyflowStore = useXYStoreApi(), {
|
|
6574
|
-
|
|
6575
|
-
|
|
6898
|
+
const [isControlPointDragging, setIsControlPointDragging] = useState$1(!1), diagramStore = useDiagramStoreApi(), xyflowStore = useXYStoreApi(), {
|
|
6899
|
+
isFocusedNode,
|
|
6900
|
+
isActiveWalkthroughStep,
|
|
6901
|
+
isEdgePathEditable,
|
|
6902
|
+
isHovered,
|
|
6903
|
+
isDimmed,
|
|
6904
|
+
isActiveAsParallel,
|
|
6905
|
+
hasOnOpenSourceRelation,
|
|
6906
|
+
hasOnNavigateTo
|
|
6907
|
+
} = useDiagramState((s2) => ({
|
|
6908
|
+
isEdgePathEditable: s2.readonly !== !0 && s2.experimentalEdgeEditing === !0 && s2.focusedNodeId === null && s2.activeWalkthrough === null,
|
|
6909
|
+
isFocusedNode: s2.focusedNodeId === source || s2.focusedNodeId === target,
|
|
6910
|
+
isActiveWalkthroughStep: s2.activeWalkthrough?.stepId === data.edge.id,
|
|
6911
|
+
// If activeWalkthrough and this edge is part of the parallel group
|
|
6912
|
+
isActiveAsParallel: !!s2.activeWalkthrough?.parallelPrefix && id2.startsWith(s2.activeWalkthrough.parallelPrefix),
|
|
6576
6913
|
isHovered: s2.hoveredEdgeId === id2,
|
|
6577
6914
|
isDimmed: s2.dimmed.has(id2),
|
|
6578
|
-
|
|
6579
|
-
|
|
6915
|
+
hasOnOpenSourceRelation: !!s2.onOpenSourceRelation,
|
|
6916
|
+
hasOnNavigateTo: !!s2.onNavigateTo
|
|
6917
|
+
})), navigateTo = hasOnNavigateTo ? data.edge.navigateTo ?? null : null, isActive = isFocusedNode || isActiveWalkthroughStep, { nodeLookup, edgeLookup } = xyflowStore.getState(), sourceNode = nonNullable(nodeLookup.get(source), `source node ${source} not found`), targetNode = nonNullable(nodeLookup.get(target), `target node ${target} not found`), isModified = n$2(data.controlPoints) || !isSamePoint(sourceNode.internals.positionAbsolute, sourceNode.data.element.position) || !isSamePoint(targetNode.internals.positionAbsolute, targetNode.data.element.position), {
|
|
6580
6918
|
label,
|
|
6581
6919
|
edge: {
|
|
6582
6920
|
points: diagramEdgePoints,
|
|
@@ -6587,7 +6925,7 @@ const isSame = (a2, b2) => Math.abs(a2 - b2) < 2.5, isSamePoint = (a2, b2) => {
|
|
|
6587
6925
|
}
|
|
6588
6926
|
} = data;
|
|
6589
6927
|
let controlPoints = data.controlPoints ?? bezierControlPoints(data.edge);
|
|
6590
|
-
const isStepEdge = data.
|
|
6928
|
+
const isStepEdge = isStepEdgeId(data.edge.id), isDotted = line === "dotted", isDashed = isDotted || line === "dashed";
|
|
6591
6929
|
let strokeDasharray;
|
|
6592
6930
|
isDotted ? strokeDasharray = "1,8" : isDashed && (strokeDasharray = "8,10");
|
|
6593
6931
|
let labelX = labelBBox?.x ?? 0, labelY = labelBBox?.y ?? 0;
|
|
@@ -6681,408 +7019,242 @@ const isSame = (a2, b2) => Math.abs(a2 - b2) < 2.5, isSamePoint = (a2, b2) => {
|
|
|
6681
7019
|
once: !0,
|
|
6682
7020
|
capture: !0
|
|
6683
7021
|
});
|
|
6684
|
-
};
|
|
6685
|
-
let markerStartName = toMarker(diagramEdge.tail), markerEndName = toMarker(diagramEdge.head ?? "normal");
|
|
6686
|
-
diagramEdge.dir === "back" && ([markerStartName, markerEndName] = [markerEndName, markerStartName]);
|
|
6687
|
-
const MarkerStart = markerStartName ? EdgeMarkers[markerStartName] : null, MarkerEnd = markerEndName ? EdgeMarkers[markerEndName] : null, labelZIndex = 1 + (isHovered ? ZIndexes.Element : edgeLookup.get(id2).zIndex ?? ZIndexes.Edge), relationId = d(data.edge.relations), showOpenSourceRelation =
|
|
6688
|
-
return /* @__PURE__ */ jsxs(
|
|
6689
|
-
"g",
|
|
6690
|
-
{
|
|
6691
|
-
className: clsx(
|
|
6692
|
-
container$5,
|
|
6693
|
-
isDimmed && dimmed$2,
|
|
6694
|
-
isControlPointDragging && controlDragging
|
|
6695
|
-
),
|
|
6696
|
-
"data-likec4-color": color2,
|
|
6697
|
-
"data-edge-dir": diagramEdge.dir,
|
|
6698
|
-
"data-edge-active": isActive,
|
|
6699
|
-
"data-edge-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
},
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
*/
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
*
|
|
6921
|
-
* This source code is licensed under the MIT license.
|
|
6922
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6923
|
-
*/
|
|
6924
|
-
var IconCheck = createReactComponent("outline", "check", "IconCheck", [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]]);
|
|
6925
|
-
/**
|
|
6926
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6927
|
-
*
|
|
6928
|
-
* This source code is licensed under the MIT license.
|
|
6929
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6930
|
-
*/
|
|
6931
|
-
var IconChevronDown = createReactComponent("outline", "chevron-down", "IconChevronDown", [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]]);
|
|
6932
|
-
/**
|
|
6933
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6934
|
-
*
|
|
6935
|
-
* This source code is licensed under the MIT license.
|
|
6936
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6937
|
-
*/
|
|
6938
|
-
var IconChevronLeft = createReactComponent("outline", "chevron-left", "IconChevronLeft", [["path", { d: "M15 6l-6 6l6 6", key: "svg-0" }]]);
|
|
6939
|
-
/**
|
|
6940
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6941
|
-
*
|
|
6942
|
-
* This source code is licensed under the MIT license.
|
|
6943
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6944
|
-
*/
|
|
6945
|
-
var IconChevronRight = createReactComponent("outline", "chevron-right", "IconChevronRight", [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]]);
|
|
6946
|
-
/**
|
|
6947
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6948
|
-
*
|
|
6949
|
-
* This source code is licensed under the MIT license.
|
|
6950
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6951
|
-
*/
|
|
6952
|
-
var IconCopy = createReactComponent("outline", "copy", "IconCopy", [["path", { d: "M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z", key: "svg-0" }], ["path", { d: "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1", key: "svg-1" }]]);
|
|
6953
|
-
/**
|
|
6954
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6955
|
-
*
|
|
6956
|
-
* This source code is licensed under the MIT license.
|
|
6957
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6958
|
-
*/
|
|
6959
|
-
var IconExternalLink = createReactComponent("outline", "external-link", "IconExternalLink", [["path", { d: "M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6", key: "svg-0" }], ["path", { d: "M11 13l9 -9", key: "svg-1" }], ["path", { d: "M15 4h5v5", key: "svg-2" }]]);
|
|
6960
|
-
/**
|
|
6961
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6962
|
-
*
|
|
6963
|
-
* This source code is licensed under the MIT license.
|
|
6964
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6965
|
-
*/
|
|
6966
|
-
var IconFileCode = createReactComponent("outline", "file-code", "IconFileCode", [["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }], ["path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z", key: "svg-1" }], ["path", { d: "M10 13l-1 2l1 2", key: "svg-2" }], ["path", { d: "M14 13l1 2l-1 2", key: "svg-3" }]]);
|
|
6967
|
-
/**
|
|
6968
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6969
|
-
*
|
|
6970
|
-
* This source code is licensed under the MIT license.
|
|
6971
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6972
|
-
*/
|
|
6973
|
-
var IconFileSymlink = createReactComponent("outline", "file-symlink", "IconFileSymlink", [["path", { d: "M4 21v-4a3 3 0 0 1 3 -3h5", key: "svg-0" }], ["path", { d: "M9 17l3 -3l-3 -3", key: "svg-1" }], ["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-2" }], ["path", { d: "M5 11v-6a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-9.5", key: "svg-3" }]]);
|
|
6974
|
-
/**
|
|
6975
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6976
|
-
*
|
|
6977
|
-
* This source code is licensed under the MIT license.
|
|
6978
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6979
|
-
*/
|
|
6980
|
-
var IconFocusCentered = createReactComponent("outline", "focus-centered", "IconFocusCentered", [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M4 8v-2a2 2 0 0 1 2 -2h2", key: "svg-1" }], ["path", { d: "M4 16v2a2 2 0 0 0 2 2h2", key: "svg-2" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "svg-3" }], ["path", { d: "M16 20h2a2 2 0 0 0 2 -2v-2", key: "svg-4" }]]);
|
|
6981
|
-
/**
|
|
6982
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6983
|
-
*
|
|
6984
|
-
* This source code is licensed under the MIT license.
|
|
6985
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6986
|
-
*/
|
|
6987
|
-
var IconFolderOpen = createReactComponent("outline", "folder-open", "IconFolderOpen", [["path", { d: "M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2", key: "svg-0" }]]);
|
|
6988
|
-
/**
|
|
6989
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6990
|
-
*
|
|
6991
|
-
* This source code is licensed under the MIT license.
|
|
6992
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6993
|
-
*/
|
|
6994
|
-
var IconHelpCircle = createReactComponent("outline", "help-circle", "IconHelpCircle", [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 16v.01", key: "svg-1" }], ["path", { d: "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", key: "svg-2" }]]);
|
|
6995
|
-
/**
|
|
6996
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
6997
|
-
*
|
|
6998
|
-
* This source code is licensed under the MIT license.
|
|
6999
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7000
|
-
*/
|
|
7001
|
-
var IconLayoutDashboard = createReactComponent("outline", "layout-dashboard", "IconLayoutDashboard", [["path", { d: "M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-0" }], ["path", { d: "M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-1" }], ["path", { d: "M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-2" }], ["path", { d: "M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-3" }]]);
|
|
7002
|
-
/**
|
|
7003
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7004
|
-
*
|
|
7005
|
-
* This source code is licensed under the MIT license.
|
|
7006
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7007
|
-
*/
|
|
7008
|
-
var IconLink = createReactComponent("outline", "link", "IconLink", [["path", { d: "M9 15l6 -6", key: "svg-0" }], ["path", { d: "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464", key: "svg-1" }], ["path", { d: "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463", key: "svg-2" }]]);
|
|
7009
|
-
/**
|
|
7010
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7011
|
-
*
|
|
7012
|
-
* This source code is licensed under the MIT license.
|
|
7013
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7014
|
-
*/
|
|
7015
|
-
var IconMenu2 = createReactComponent("outline", "menu-2", "IconMenu2", [["path", { d: "M4 6l16 0", key: "svg-0" }], ["path", { d: "M4 12l16 0", key: "svg-1" }], ["path", { d: "M4 18l16 0", key: "svg-2" }]]);
|
|
7016
|
-
/**
|
|
7017
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7018
|
-
*
|
|
7019
|
-
* This source code is licensed under the MIT license.
|
|
7020
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7021
|
-
*/
|
|
7022
|
-
var IconMenu = createReactComponent("outline", "menu", "IconMenu", [["path", { d: "M4 8l16 0", key: "svg-0" }], ["path", { d: "M4 16l16 0", key: "svg-1" }]]);
|
|
7023
|
-
/**
|
|
7024
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7025
|
-
*
|
|
7026
|
-
* This source code is licensed under the MIT license.
|
|
7027
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7028
|
-
*/
|
|
7029
|
-
var IconMoonStars = createReactComponent("outline", "moon-stars", "IconMoonStars", [["path", { d: "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z", key: "svg-0" }], ["path", { d: "M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2", key: "svg-1" }], ["path", { d: "M19 11h2m-1 -1v2", key: "svg-2" }]]);
|
|
7030
|
-
/**
|
|
7031
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7032
|
-
*
|
|
7033
|
-
* This source code is licensed under the MIT license.
|
|
7034
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7035
|
-
*/
|
|
7036
|
-
var IconShare = createReactComponent("outline", "share", "IconShare", [["path", { d: "M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-0" }], ["path", { d: "M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-1" }], ["path", { d: "M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-2" }], ["path", { d: "M8.7 10.7l6.6 -3.4", key: "svg-3" }], ["path", { d: "M8.7 13.3l6.6 3.4", key: "svg-4" }]]);
|
|
7037
|
-
/**
|
|
7038
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7039
|
-
*
|
|
7040
|
-
* This source code is licensed under the MIT license.
|
|
7041
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7042
|
-
*/
|
|
7043
|
-
var IconSun = createReactComponent("outline", "sun", "IconSun", [["path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }], ["path", { d: "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7", key: "svg-1" }]]);
|
|
7044
|
-
/**
|
|
7045
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7046
|
-
*
|
|
7047
|
-
* This source code is licensed under the MIT license.
|
|
7048
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7049
|
-
*/
|
|
7050
|
-
var IconZoomScan = createReactComponent("outline", "zoom-scan", "IconZoomScan", [["path", { d: "M4 8v-2a2 2 0 0 1 2 -2h2", key: "svg-0" }], ["path", { d: "M4 16v2a2 2 0 0 0 2 2h2", key: "svg-1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "svg-2" }], ["path", { d: "M16 20h2a2 2 0 0 0 2 -2v-2", key: "svg-3" }], ["path", { d: "M8 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-4" }], ["path", { d: "M16 16l-2.5 -2.5", key: "svg-5" }]]);
|
|
7051
|
-
/**
|
|
7052
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7053
|
-
*
|
|
7054
|
-
* This source code is licensed under the MIT license.
|
|
7055
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7056
|
-
*/
|
|
7057
|
-
var IconFolderFilled = createReactComponent("filled", "folder-filled", "IconFolderFilled", [["path", { d: "M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z", key: "svg-0" }]]);
|
|
7058
|
-
/**
|
|
7059
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7060
|
-
*
|
|
7061
|
-
* This source code is licensed under the MIT license.
|
|
7062
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7063
|
-
*/
|
|
7064
|
-
var IconPlayerPlayFilled = createReactComponent("filled", "player-play-filled", "IconPlayerPlayFilled", [["path", { d: "M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z", key: "svg-0" }]]);
|
|
7065
|
-
/**
|
|
7066
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7067
|
-
*
|
|
7068
|
-
* This source code is licensed under the MIT license.
|
|
7069
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7070
|
-
*/
|
|
7071
|
-
var IconPlayerSkipBackFilled = createReactComponent("filled", "player-skip-back-filled", "IconPlayerSkipBackFilled", [["path", { d: "M19.496 4.136l-12 7a1 1 0 0 0 0 1.728l12 7a1 1 0 0 0 1.504 -.864v-14a1 1 0 0 0 -1.504 -.864z", key: "svg-0" }], ["path", { d: "M4 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z", key: "svg-1" }]]);
|
|
7072
|
-
/**
|
|
7073
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7074
|
-
*
|
|
7075
|
-
* This source code is licensed under the MIT license.
|
|
7076
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7077
|
-
*/
|
|
7078
|
-
var IconPlayerSkipForwardFilled = createReactComponent("filled", "player-skip-forward-filled", "IconPlayerSkipForwardFilled", [["path", { d: "M3 5v14a1 1 0 0 0 1.504 .864l12 -7a1 1 0 0 0 0 -1.728l-12 -7a1 1 0 0 0 -1.504 .864z", key: "svg-0" }], ["path", { d: "M20 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z", key: "svg-1" }]]);
|
|
7079
|
-
/**
|
|
7080
|
-
* @license @tabler/icons-react v3.14.0 - MIT
|
|
7081
|
-
*
|
|
7082
|
-
* This source code is licensed under the MIT license.
|
|
7083
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7084
|
-
*/
|
|
7085
|
-
var IconPlayerStopFilled = createReactComponent("filled", "player-stop-filled", "IconPlayerStopFilled", [["path", { d: "M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z", key: "svg-0" }]]);
|
|
7022
|
+
};
|
|
7023
|
+
let markerStartName = toMarker(diagramEdge.tail), markerEndName = toMarker(diagramEdge.head ?? "normal");
|
|
7024
|
+
diagramEdge.dir === "back" && ([markerStartName, markerEndName] = [markerEndName, markerStartName]);
|
|
7025
|
+
const MarkerStart = markerStartName ? EdgeMarkers[markerStartName] : null, MarkerEnd = markerEndName ? EdgeMarkers[markerEndName] : null, labelZIndex = 1 + (isHovered ? ZIndexes.Element : edgeLookup.get(id2).zIndex ?? ZIndexes.Edge), relationId = d(data.edge.relations), showOpenSourceRelation = hasOnOpenSourceRelation && relationId !== void 0;
|
|
7026
|
+
return /* @__PURE__ */ jsxs(
|
|
7027
|
+
"g",
|
|
7028
|
+
{
|
|
7029
|
+
className: clsx(
|
|
7030
|
+
container$5,
|
|
7031
|
+
isDimmed && dimmed$2,
|
|
7032
|
+
isControlPointDragging && controlDragging
|
|
7033
|
+
),
|
|
7034
|
+
"data-likec4-color": color2,
|
|
7035
|
+
"data-edge-dir": diagramEdge.dir,
|
|
7036
|
+
"data-edge-active": isActive,
|
|
7037
|
+
"data-edge-animated": isActive || isActiveAsParallel,
|
|
7038
|
+
"data-edge-hovered": isHovered,
|
|
7039
|
+
children: [
|
|
7040
|
+
/* @__PURE__ */ jsx(
|
|
7041
|
+
"path",
|
|
7042
|
+
{
|
|
7043
|
+
className: clsx("react-flow__edge-interaction"),
|
|
7044
|
+
d: edgePath,
|
|
7045
|
+
fill: "none",
|
|
7046
|
+
stroke: "transparent",
|
|
7047
|
+
strokeWidth: interactionWidth ?? 10
|
|
7048
|
+
}
|
|
7049
|
+
),
|
|
7050
|
+
/* @__PURE__ */ jsxs("g", { className: markerContext, children: [
|
|
7051
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
7052
|
+
MarkerStart && /* @__PURE__ */ jsx(MarkerStart, { id: "start" + id2 }),
|
|
7053
|
+
MarkerEnd && /* @__PURE__ */ jsx(MarkerEnd, { id: "end" + id2 })
|
|
7054
|
+
] }),
|
|
7055
|
+
/* @__PURE__ */ jsx(
|
|
7056
|
+
"path",
|
|
7057
|
+
{
|
|
7058
|
+
className: clsx("react-flow__edge-path", edgePathBg),
|
|
7059
|
+
d: edgePath,
|
|
7060
|
+
style,
|
|
7061
|
+
strokeLinecap: "round"
|
|
7062
|
+
}
|
|
7063
|
+
),
|
|
7064
|
+
/* @__PURE__ */ jsx(
|
|
7065
|
+
"path",
|
|
7066
|
+
{
|
|
7067
|
+
ref: svgPathRef,
|
|
7068
|
+
className: clsx("react-flow__edge-path", cssEdgePath),
|
|
7069
|
+
d: edgePath,
|
|
7070
|
+
style,
|
|
7071
|
+
strokeLinecap: "round",
|
|
7072
|
+
strokeDasharray,
|
|
7073
|
+
markerStart: MarkerStart ? `url(#start${id2})` : void 0,
|
|
7074
|
+
markerEnd: MarkerEnd ? `url(#end${id2})` : void 0
|
|
7075
|
+
}
|
|
7076
|
+
)
|
|
7077
|
+
] }),
|
|
7078
|
+
isEdgePathEditable && /* @__PURE__ */ jsx(
|
|
7079
|
+
"g",
|
|
7080
|
+
{
|
|
7081
|
+
onContextMenu: (e2) => {
|
|
7082
|
+
e2.preventDefault(), e2.stopPropagation();
|
|
7083
|
+
},
|
|
7084
|
+
children: controlPoints.map((p2, i2) => /* @__PURE__ */ jsx(
|
|
7085
|
+
"circle",
|
|
7086
|
+
{
|
|
7087
|
+
onPointerDown: (e2) => onControlPointerDown(i2, e2),
|
|
7088
|
+
className: controlPoint,
|
|
7089
|
+
cx: p2.x,
|
|
7090
|
+
cy: p2.y,
|
|
7091
|
+
r: 3
|
|
7092
|
+
},
|
|
7093
|
+
i2
|
|
7094
|
+
))
|
|
7095
|
+
}
|
|
7096
|
+
),
|
|
7097
|
+
(data.label || isStepEdge) && /* @__PURE__ */ jsx(
|
|
7098
|
+
EdgeLabel,
|
|
7099
|
+
{
|
|
7100
|
+
isDimmed,
|
|
7101
|
+
color: color2,
|
|
7102
|
+
isModified,
|
|
7103
|
+
labelX,
|
|
7104
|
+
labelY,
|
|
7105
|
+
navigateTo,
|
|
7106
|
+
isEdgePathEditable,
|
|
7107
|
+
selected: selected ?? !1,
|
|
7108
|
+
stepNum: isStepEdge ? extractStep(data.edge.id) : null,
|
|
7109
|
+
label: data.label,
|
|
7110
|
+
zIndex: labelZIndex,
|
|
7111
|
+
notes: isActiveWalkthroughStep ? data.edge.notes ?? null : null,
|
|
7112
|
+
isHovered,
|
|
7113
|
+
isActive,
|
|
7114
|
+
isStepEdge,
|
|
7115
|
+
onClick: showOpenSourceRelation && ((e2) => {
|
|
7116
|
+
e2.stopPropagation(), diagramStore.getState().onOpenSourceRelation?.(relationId);
|
|
7117
|
+
})
|
|
7118
|
+
}
|
|
7119
|
+
)
|
|
7120
|
+
]
|
|
7121
|
+
}
|
|
7122
|
+
);
|
|
7123
|
+
}, isEqualProps$2), EdgeLabel = ({
|
|
7124
|
+
isDimmed,
|
|
7125
|
+
color: color2,
|
|
7126
|
+
isModified,
|
|
7127
|
+
labelX,
|
|
7128
|
+
labelY,
|
|
7129
|
+
isEdgePathEditable,
|
|
7130
|
+
selected,
|
|
7131
|
+
navigateTo,
|
|
7132
|
+
label,
|
|
7133
|
+
notes,
|
|
7134
|
+
stepNum,
|
|
7135
|
+
isHovered,
|
|
7136
|
+
isActive,
|
|
7137
|
+
zIndex,
|
|
7138
|
+
onClick
|
|
7139
|
+
}) => {
|
|
7140
|
+
let labelBox = /* @__PURE__ */ jsxs(
|
|
7141
|
+
Box,
|
|
7142
|
+
{
|
|
7143
|
+
className: clsx([
|
|
7144
|
+
"nodrag nopan",
|
|
7145
|
+
container$5,
|
|
7146
|
+
edgeLabel,
|
|
7147
|
+
isDimmed && dimmed$2
|
|
7148
|
+
]),
|
|
7149
|
+
style: {
|
|
7150
|
+
...assignInlineVars({
|
|
7151
|
+
[varLabelX]: isModified ? `calc(${labelX}px - 10%)` : `${labelX}px`,
|
|
7152
|
+
[varLabelY]: isModified ? `${labelY - 5}px` : `${labelY}px`
|
|
7153
|
+
}),
|
|
7154
|
+
...isEdgePathEditable && selected && {
|
|
7155
|
+
pointerEvents: "none"
|
|
7156
|
+
},
|
|
7157
|
+
...label && {
|
|
7158
|
+
maxWidth: label.bbox.width + 18
|
|
7159
|
+
},
|
|
7160
|
+
zIndex
|
|
7161
|
+
},
|
|
7162
|
+
mod: {
|
|
7163
|
+
"data-likec4-color": color2,
|
|
7164
|
+
"data-edge-hovered": isHovered,
|
|
7165
|
+
"data-edge-active": isActive
|
|
7166
|
+
},
|
|
7167
|
+
onClick: onClick || void 0,
|
|
7168
|
+
children: [
|
|
7169
|
+
stepNum !== null && /* @__PURE__ */ jsx(Box, { className: stepEdgeNumber, children: stepNum }),
|
|
7170
|
+
n$2(label?.text) && /* @__PURE__ */ jsx(Box, { className: edgeLabelText, children: label.text }),
|
|
7171
|
+
navigateTo && !isDimmed && /* @__PURE__ */ jsx(NavigateToBtn$1, { viewId: navigateTo })
|
|
7172
|
+
]
|
|
7173
|
+
}
|
|
7174
|
+
);
|
|
7175
|
+
return n$2(notes) && (labelBox = /* @__PURE__ */ jsx(NotePopover, { notes, children: labelBox })), /* @__PURE__ */ jsx(EdgeLabelRenderer, { children: labelBox });
|
|
7176
|
+
}, NotePopover = ({ notes, children }) => {
|
|
7177
|
+
const {
|
|
7178
|
+
nextDynamicStep,
|
|
7179
|
+
hasNext,
|
|
7180
|
+
hasPrevious
|
|
7181
|
+
} = useDiagramState((s2) => ({
|
|
7182
|
+
nextDynamicStep: s2.nextDynamicStep,
|
|
7183
|
+
hasNext: s2.activeWalkthrough?.hasNext ?? !1,
|
|
7184
|
+
hasPrevious: s2.activeWalkthrough?.hasPrevious ?? !1
|
|
7185
|
+
})), [isOpened, setIsOpened] = useState$1(!1), portalProps = useMantinePortalProps();
|
|
7186
|
+
return useDebouncedEffect(
|
|
7187
|
+
() => {
|
|
7188
|
+
setIsOpened(!0);
|
|
7189
|
+
},
|
|
7190
|
+
[],
|
|
7191
|
+
300
|
|
7192
|
+
), /* @__PURE__ */ jsxs(
|
|
7193
|
+
Popover,
|
|
7194
|
+
{
|
|
7195
|
+
shadow: "xs",
|
|
7196
|
+
offset: 16,
|
|
7197
|
+
opened: isOpened,
|
|
7198
|
+
closeOnClickOutside: !1,
|
|
7199
|
+
...portalProps,
|
|
7200
|
+
children: [
|
|
7201
|
+
/* @__PURE__ */ jsx(PopoverTarget, { children }),
|
|
7202
|
+
/* @__PURE__ */ jsxs(
|
|
7203
|
+
PopoverDropdown,
|
|
7204
|
+
{
|
|
7205
|
+
component: Stack,
|
|
7206
|
+
p: "xs",
|
|
7207
|
+
onPointerDownCapture: (e2) => e2.stopPropagation(),
|
|
7208
|
+
onClick: (e2) => e2.stopPropagation(),
|
|
7209
|
+
onDoubleClick: (e2) => e2.stopPropagation(),
|
|
7210
|
+
children: [
|
|
7211
|
+
/* @__PURE__ */ jsx(ScrollAreaAutosize, { maw: 450, mah: 350, type: "scroll", mx: "auto", mt: 2, children: /* @__PURE__ */ jsx(Text$1, { component: "div", className: edgeNoteText, p: 4, children: notes }) }),
|
|
7212
|
+
/* @__PURE__ */ jsx(
|
|
7213
|
+
CloseButton,
|
|
7214
|
+
{
|
|
7215
|
+
size: "xs",
|
|
7216
|
+
className: edgeNoteCloseButton,
|
|
7217
|
+
onClick: () => setIsOpened(!1)
|
|
7218
|
+
}
|
|
7219
|
+
),
|
|
7220
|
+
(hasPrevious || hasNext) && /* @__PURE__ */ jsxs(Group, { gap: 0, justify: hasPrevious ? "flex-start" : "flex-end", children: [
|
|
7221
|
+
hasPrevious && /* @__PURE__ */ jsx(
|
|
7222
|
+
Button,
|
|
7223
|
+
{
|
|
7224
|
+
variant: "subtle",
|
|
7225
|
+
radius: "xs",
|
|
7226
|
+
size: "compact-xs",
|
|
7227
|
+
onClick: () => nextDynamicStep(-1),
|
|
7228
|
+
children: "back"
|
|
7229
|
+
}
|
|
7230
|
+
),
|
|
7231
|
+
hasNext && /* @__PURE__ */ jsx(Button, { variant: "subtle", radius: "xs", size: "compact-xs", onClick: () => nextDynamicStep(), children: "next" })
|
|
7232
|
+
] })
|
|
7233
|
+
]
|
|
7234
|
+
}
|
|
7235
|
+
)
|
|
7236
|
+
]
|
|
7237
|
+
}
|
|
7238
|
+
);
|
|
7239
|
+
};
|
|
7240
|
+
function NavigateToBtn$1({ viewId }) {
|
|
7241
|
+
const diagramApi = useDiagramStoreApi();
|
|
7242
|
+
return /* @__PURE__ */ jsx(
|
|
7243
|
+
ActionIcon$2,
|
|
7244
|
+
{
|
|
7245
|
+
className: clsx("nodrag nopan", cssNavigateBtn$1),
|
|
7246
|
+
size: "sm",
|
|
7247
|
+
radius: "sm",
|
|
7248
|
+
onPointerDownCapture: (e2) => e2.stopPropagation(),
|
|
7249
|
+
onClick: (event) => {
|
|
7250
|
+
event.stopPropagation(), diagramApi.getState().onNavigateTo?.(viewId, event);
|
|
7251
|
+
},
|
|
7252
|
+
role: "button",
|
|
7253
|
+
onDoubleClick: (event) => event.stopPropagation(),
|
|
7254
|
+
children: /* @__PURE__ */ jsx(IconZoomScan, { className: cssNavigateBtnIcon })
|
|
7255
|
+
}
|
|
7256
|
+
);
|
|
7257
|
+
}
|
|
7086
7258
|
function NavigateToBtn({ xynodeId, className }) {
|
|
7087
7259
|
const diagramApi = useDiagramStoreApi();
|
|
7088
7260
|
return /* @__PURE__ */ jsx(
|
|
@@ -7168,13 +7340,15 @@ const isEqualProps$1 = (prev, next) => prev.id === next.id && deepEqual(prev.dat
|
|
|
7168
7340
|
opacity < 1 && transparent,
|
|
7169
7341
|
"likec4-compound"
|
|
7170
7342
|
),
|
|
7171
|
-
style:
|
|
7172
|
-
...
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7343
|
+
style: {
|
|
7344
|
+
...opacity < 1 && {
|
|
7345
|
+
...assignInlineVars({
|
|
7346
|
+
[varBorderTransparency]: `${borderTransparency}%`,
|
|
7347
|
+
[varOpacity]: opacity.toFixed(2)
|
|
7348
|
+
}),
|
|
7349
|
+
borderStyle: style.border ?? "dashed"
|
|
7350
|
+
}
|
|
7351
|
+
},
|
|
7178
7352
|
children: /* @__PURE__ */ jsx(
|
|
7179
7353
|
Text$1,
|
|
7180
7354
|
{
|
|
@@ -7204,15 +7378,11 @@ const isEqualProps$1 = (prev, next) => prev.id === next.id && deepEqual(prev.dat
|
|
|
7204
7378
|
] });
|
|
7205
7379
|
}, isEqualProps$1);
|
|
7206
7380
|
var container$3 = "_14ylloj1", handleCenter = "_14ylloj2", containerAnimated = "_14ylloj3", dimmed = "_14ylloj4", indicator = "_14ylloj7", fillElementFill = "_14ylloj8", fillMixStroke = "_14ylloja", hasIcon = "_14yllojb", title$1 = "_14ylloje", description$1 = "_14yllojf", technology = "_14yllojg", elementDataContainer = "_14yllojh", elementTextData = "_14ylloji", elementIcon = "_14yllojj", cssShapeSvg = "_14yllojm", cssNavigateBtn = "_14yllojn", elementLink = "_1s87wm0", trigger = "_1s87wm1";
|
|
7207
|
-
const selector$3 = (s2) => {
|
|
7208
|
-
const target = s2.getContainer();
|
|
7209
|
-
return target ? { target } : null;
|
|
7210
|
-
};
|
|
7211
7381
|
function ElementLink({
|
|
7212
7382
|
element
|
|
7213
7383
|
}) {
|
|
7214
7384
|
invariant(element.links, "ElementLink: links are required");
|
|
7215
|
-
const id2 = useId$1(), portalProps =
|
|
7385
|
+
const id2 = useId$1(), portalProps = useMantinePortalProps();
|
|
7216
7386
|
return /* @__PURE__ */ jsx("div", { className: elementLink, "data-likec4-linkid": id2, children: /* @__PURE__ */ jsxs(
|
|
7217
7387
|
HoverCard,
|
|
7218
7388
|
{
|
|
@@ -7225,7 +7395,7 @@ function ElementLink({
|
|
|
7225
7395
|
transitionProps: {
|
|
7226
7396
|
transition: "pop"
|
|
7227
7397
|
},
|
|
7228
|
-
...portalProps
|
|
7398
|
+
...portalProps,
|
|
7229
7399
|
floatingStrategy: "fixed",
|
|
7230
7400
|
openDelay: 350,
|
|
7231
7401
|
closeDelay: 800,
|
|
@@ -7564,7 +7734,7 @@ const Text = Text$1.withProps({
|
|
|
7564
7734
|
{
|
|
7565
7735
|
className: clsx(
|
|
7566
7736
|
elementDataContainer,
|
|
7567
|
-
n$
|
|
7737
|
+
n$2(elementIcon2) && hasIcon,
|
|
7568
7738
|
"likec4-element"
|
|
7569
7739
|
),
|
|
7570
7740
|
children: [
|
|
@@ -8896,30 +9066,28 @@ function useXYFlowEvents() {
|
|
|
8896
9066
|
return;
|
|
8897
9067
|
const {
|
|
8898
9068
|
focusedNodeId,
|
|
8899
|
-
|
|
9069
|
+
activeWalkthrough,
|
|
8900
9070
|
fitDiagram,
|
|
8901
9071
|
onCanvasClick,
|
|
8902
9072
|
xystore,
|
|
8903
9073
|
resetLastClicked
|
|
8904
9074
|
} = diagramApi.getState();
|
|
8905
|
-
(focusedNodeId ??
|
|
9075
|
+
(focusedNodeId ?? activeWalkthrough) !== null && (fitDiagram(), onCanvasClick || event.stopPropagation()), resetLastClicked(), xystore.getState().resetSelectedElements(), onCanvasClick?.(event);
|
|
8906
9076
|
},
|
|
8907
9077
|
onNodeContextMenu: (event, xynode) => {
|
|
8908
|
-
diagramApi.getState().setLastClickedNode(xynode.id), diagramApi.getState().onNodeContextMenu?.(
|
|
8909
|
-
|
|
8910
|
-
xynode,
|
|
9078
|
+
diagramApi.getState().setLastClickedNode(xynode.id), diagramApi.getState().onNodeContextMenu?.(
|
|
9079
|
+
xynode.data.element,
|
|
8911
9080
|
event
|
|
8912
|
-
|
|
9081
|
+
);
|
|
8913
9082
|
},
|
|
8914
9083
|
onPaneContextMenu: (event) => {
|
|
8915
9084
|
diagramApi.getState().resetLastClicked(), diagramApi.getState().onCanvasContextMenu?.(event);
|
|
8916
9085
|
},
|
|
8917
9086
|
onEdgeContextMenu: (event, xyedge) => {
|
|
8918
|
-
diagramApi.getState().setLastClickedEdge(xyedge.id), diagramApi.getState().onEdgeContextMenu?.(
|
|
8919
|
-
|
|
8920
|
-
xyedge,
|
|
9087
|
+
diagramApi.getState().setLastClickedEdge(xyedge.id), diagramApi.getState().onEdgeContextMenu?.(
|
|
9088
|
+
xyedge.data.edge,
|
|
8921
9089
|
event
|
|
8922
|
-
|
|
9090
|
+
);
|
|
8923
9091
|
},
|
|
8924
9092
|
onNodeClick: (event, xynode) => {
|
|
8925
9093
|
const {
|
|
@@ -8957,11 +9125,10 @@ function useXYFlowEvents() {
|
|
|
8957
9125
|
}
|
|
8958
9126
|
!onNodeClick && stopPropagation && event.stopPropagation();
|
|
8959
9127
|
}
|
|
8960
|
-
lastClickTimestamp.current = Date.now(), onNodeClick?.(
|
|
8961
|
-
|
|
8962
|
-
xynode,
|
|
9128
|
+
lastClickTimestamp.current = Date.now(), onNodeClick?.(
|
|
9129
|
+
xynode.data.element,
|
|
8963
9130
|
event
|
|
8964
|
-
|
|
9131
|
+
);
|
|
8965
9132
|
},
|
|
8966
9133
|
onNodeDoubleClick: (event, xynode) => {
|
|
8967
9134
|
const {
|
|
@@ -8978,8 +9145,8 @@ function useXYFlowEvents() {
|
|
|
8978
9145
|
lastClickedEdgeId,
|
|
8979
9146
|
isDynamicView,
|
|
8980
9147
|
enableDynamicViewWalkthrough,
|
|
8981
|
-
|
|
8982
|
-
|
|
9148
|
+
activateWalkthrough,
|
|
9149
|
+
activeWalkthrough,
|
|
8983
9150
|
focusedNodeId,
|
|
8984
9151
|
xystore,
|
|
8985
9152
|
nodesSelectable,
|
|
@@ -8988,19 +9155,18 @@ function useXYFlowEvents() {
|
|
|
8988
9155
|
setLastClickedEdge
|
|
8989
9156
|
} = diagramApi.getState();
|
|
8990
9157
|
lastClickedEdgeId !== xyedge.id && setLastClickedEdge(xyedge.id);
|
|
8991
|
-
const isNotAFirstClick = lastClickedEdgeId === xyedge.id, isEdgeOfFocusedNode = n$
|
|
8992
|
-
if (isDynamicView && enableDynamicViewWalkthrough && (isEdgeOfFocusedNode || isNotAFirstClick || l(
|
|
8993
|
-
const nextStep =
|
|
8994
|
-
if (
|
|
8995
|
-
|
|
9158
|
+
const isNotAFirstClick = lastClickedEdgeId === xyedge.id, isEdgeOfFocusedNode = n$2(focusedNodeId) && (focusedNodeId === xyedge.source || focusedNodeId === xyedge.target);
|
|
9159
|
+
if (isDynamicView && enableDynamicViewWalkthrough && (isEdgeOfFocusedNode || isNotAFirstClick || l(activeWalkthrough))) {
|
|
9160
|
+
const nextStep = xyedge.data.edge.id;
|
|
9161
|
+
if (activeWalkthrough?.stepId !== nextStep) {
|
|
9162
|
+
activateWalkthrough(nextStep), event.stopPropagation();
|
|
8996
9163
|
return;
|
|
8997
9164
|
}
|
|
8998
9165
|
}
|
|
8999
|
-
isEdgeOfFocusedNode ? (focusOnNode(focusedNodeId === xyedge.source ? xyedge.target : xyedge.source), onEdgeClick || event.stopPropagation()) : nodesSelectable && (xystore.getState().addSelectedEdges([xyedge.id]), onEdgeClick || event.stopPropagation()), onEdgeClick?.(
|
|
9000
|
-
|
|
9001
|
-
xyedge,
|
|
9166
|
+
isEdgeOfFocusedNode ? (focusOnNode(focusedNodeId === xyedge.source ? xyedge.target : xyedge.source), onEdgeClick || event.stopPropagation()) : nodesSelectable && (xystore.getState().addSelectedEdges([xyedge.id]), onEdgeClick || event.stopPropagation()), onEdgeClick?.(
|
|
9167
|
+
xyedge.data.edge,
|
|
9002
9168
|
event
|
|
9003
|
-
|
|
9169
|
+
);
|
|
9004
9170
|
},
|
|
9005
9171
|
onEdgeDoubleClick: (event, xyedge) => {
|
|
9006
9172
|
diagramApi.getState().setLastClickedEdge(xyedge.id);
|
|
@@ -9009,12 +9175,12 @@ function useXYFlowEvents() {
|
|
|
9009
9175
|
isDynamicView,
|
|
9010
9176
|
enableDynamicViewWalkthrough,
|
|
9011
9177
|
focusOnNode,
|
|
9012
|
-
|
|
9013
|
-
|
|
9178
|
+
activeWalkthrough,
|
|
9179
|
+
activateWalkthrough
|
|
9014
9180
|
} = diagramApi.getState();
|
|
9015
9181
|
if (isDynamicView && enableDynamicViewWalkthrough) {
|
|
9016
|
-
const nextStep =
|
|
9017
|
-
|
|
9182
|
+
const nextStep = xyedge.data.edge.id;
|
|
9183
|
+
activeWalkthrough?.stepId !== nextStep && (activateWalkthrough(nextStep), event.stopPropagation());
|
|
9018
9184
|
return;
|
|
9019
9185
|
}
|
|
9020
9186
|
if (enableFocusMode) {
|
|
@@ -9355,19 +9521,23 @@ function DiagramTitlePanel() {
|
|
|
9355
9521
|
id2
|
|
9356
9522
|
) });
|
|
9357
9523
|
}
|
|
9358
|
-
var container$1 = "h3ljtj0", buttons = "h3ljtj1", btn = "h3ljtj3";
|
|
9524
|
+
var container$1 = "h3ljtj0", buttons = "h3ljtj1", btn = "h3ljtj3", parallelStateFrame = "h3ljtj4";
|
|
9359
9525
|
function DynamicViewWalkthrough() {
|
|
9360
9526
|
const isMobile = useXYStore((s2) => s2.width <= 750), {
|
|
9361
9527
|
nextDynamicStep,
|
|
9362
9528
|
stopDynamicView,
|
|
9363
|
-
|
|
9364
|
-
|
|
9529
|
+
isActive,
|
|
9530
|
+
isParallel,
|
|
9531
|
+
hasNext,
|
|
9532
|
+
hasPrevious
|
|
9365
9533
|
} = useDiagramState((s2) => ({
|
|
9366
9534
|
nextDynamicStep: s2.nextDynamicStep,
|
|
9367
|
-
stopDynamicView: s2.
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9535
|
+
stopDynamicView: s2.stopWalkthrough,
|
|
9536
|
+
isActive: n$1(s2.activeWalkthrough),
|
|
9537
|
+
isParallel: n$2(s2.activeWalkthrough?.parallelPrefix),
|
|
9538
|
+
hasNext: s2.activeWalkthrough?.hasNext ?? !1,
|
|
9539
|
+
hasPrevious: s2.activeWalkthrough?.hasPrevious ?? !1
|
|
9540
|
+
})), diagramApi = useDiagramStoreApi();
|
|
9371
9541
|
useHotkeys(
|
|
9372
9542
|
isActive ? [
|
|
9373
9543
|
["ArrowLeft", () => nextDynamicStep(-1)],
|
|
@@ -9384,65 +9554,104 @@ function DynamicViewWalkthrough() {
|
|
|
9384
9554
|
className: btn,
|
|
9385
9555
|
size: isMobile ? "compact-md" : "lg",
|
|
9386
9556
|
radius: isMobile ? "lg" : "xl"
|
|
9557
|
+
}, startWalkthrough = (e2) => {
|
|
9558
|
+
e2.stopPropagation();
|
|
9559
|
+
const {
|
|
9560
|
+
xyedges,
|
|
9561
|
+
activateWalkthrough
|
|
9562
|
+
} = diagramApi.getState(), firstEdge = nonNullable(d(xyedges), "expected at least one edge");
|
|
9563
|
+
activateWalkthrough(firstEdge.data.edge.id);
|
|
9387
9564
|
}, nextStep = (increment = 1) => (e2) => {
|
|
9388
9565
|
e2.stopPropagation(), nextDynamicStep(increment);
|
|
9389
9566
|
};
|
|
9390
|
-
return /* @__PURE__ */ jsxs(
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
),
|
|
9408
|
-
|
|
9409
|
-
|
|
9567
|
+
return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
|
|
9568
|
+
isParallel && /* @__PURE__ */ jsx(
|
|
9569
|
+
Box,
|
|
9570
|
+
{
|
|
9571
|
+
layout: !0,
|
|
9572
|
+
component: m$1.div,
|
|
9573
|
+
initial: { opacity: 0 },
|
|
9574
|
+
animate: { opacity: 1 },
|
|
9575
|
+
exit: { opacity: 0 },
|
|
9576
|
+
className: clsx("react-flow__panel", parallelStateFrame)
|
|
9577
|
+
},
|
|
9578
|
+
"parallel-frame"
|
|
9579
|
+
),
|
|
9580
|
+
/* @__PURE__ */ jsxs(
|
|
9581
|
+
Box,
|
|
9582
|
+
{
|
|
9583
|
+
className: clsx("react-flow__panel", container$1),
|
|
9584
|
+
onClick: (e2) => e2.stopPropagation(),
|
|
9585
|
+
onDoubleClick: (e2) => e2.stopPropagation(),
|
|
9586
|
+
children: [
|
|
9587
|
+
!isActive && /* @__PURE__ */ jsx(
|
|
9410
9588
|
Button,
|
|
9411
9589
|
{
|
|
9412
9590
|
...buttonProps,
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
onClick:
|
|
9416
|
-
|
|
9591
|
+
className: clsx(buttons, btn),
|
|
9592
|
+
rightSection: /* @__PURE__ */ jsx(IconPlayerPlayFilled, {}),
|
|
9593
|
+
onClick: startWalkthrough,
|
|
9594
|
+
px: "xl",
|
|
9595
|
+
children: "Start"
|
|
9417
9596
|
}
|
|
9418
9597
|
),
|
|
9419
|
-
/* @__PURE__ */
|
|
9420
|
-
|
|
9598
|
+
isParallel && /* @__PURE__ */ jsx(
|
|
9599
|
+
Badge,
|
|
9421
9600
|
{
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9601
|
+
component: m$1.div,
|
|
9602
|
+
initial: { opacity: 0.05, transform: "translateY(20px)" },
|
|
9603
|
+
animate: { opacity: 1, transform: "translateY(0)" },
|
|
9604
|
+
exit: {
|
|
9605
|
+
opacity: 0,
|
|
9606
|
+
transform: "translateY(20px)"
|
|
9426
9607
|
},
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9608
|
+
variant: "gradient",
|
|
9609
|
+
size: isMobile ? "xs" : "md",
|
|
9610
|
+
gradient: { from: "red", to: "orange", deg: 90 },
|
|
9611
|
+
radius: "sm",
|
|
9612
|
+
children: "parallel"
|
|
9613
|
+
},
|
|
9614
|
+
"parallel-badge"
|
|
9432
9615
|
),
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9616
|
+
isActive && /* @__PURE__ */ jsxs(ButtonGroup, { className: buttons, children: [
|
|
9617
|
+
/* @__PURE__ */ jsx(
|
|
9618
|
+
Button,
|
|
9619
|
+
{
|
|
9620
|
+
...buttonProps,
|
|
9621
|
+
pl: "lg",
|
|
9622
|
+
disabled: !hasPrevious,
|
|
9623
|
+
onClick: nextStep(-1),
|
|
9624
|
+
children: /* @__PURE__ */ jsx(IconPlayerSkipBackFilled, {})
|
|
9625
|
+
}
|
|
9626
|
+
),
|
|
9627
|
+
/* @__PURE__ */ jsxs(
|
|
9628
|
+
Button,
|
|
9629
|
+
{
|
|
9630
|
+
...buttonProps,
|
|
9631
|
+
px: hasNext ? "md" : "xl",
|
|
9632
|
+
onClick: (e2) => {
|
|
9633
|
+
e2.stopPropagation(), stopDynamicView();
|
|
9634
|
+
},
|
|
9635
|
+
children: [
|
|
9636
|
+
hasNext && /* @__PURE__ */ jsx(IconPlayerStopFilled, {}),
|
|
9637
|
+
!hasNext && "End"
|
|
9638
|
+
]
|
|
9639
|
+
}
|
|
9640
|
+
),
|
|
9641
|
+
hasNext && /* @__PURE__ */ jsx(
|
|
9642
|
+
Button,
|
|
9643
|
+
{
|
|
9644
|
+
...buttonProps,
|
|
9645
|
+
pr: "lg",
|
|
9646
|
+
onClick: nextStep(),
|
|
9647
|
+
children: /* @__PURE__ */ jsx(IconPlayerSkipForwardFilled, {})
|
|
9648
|
+
}
|
|
9649
|
+
)
|
|
9650
|
+
] })
|
|
9651
|
+
]
|
|
9652
|
+
}
|
|
9653
|
+
)
|
|
9654
|
+
] });
|
|
9446
9655
|
}
|
|
9447
9656
|
var container = "eaj0yq0", card = "eaj0yq1", tabPanel = "eaj0yq2", elementNotation = "eaj0yq3", shapeSvg = "eaj0yq4", shapeBadge = "eaj0yq5";
|
|
9448
9657
|
const ElementNotation = ({ value }) => {
|
|
@@ -9541,20 +9750,18 @@ const ElementNotation = ({ value }) => {
|
|
|
9541
9750
|
id: s2.view.id,
|
|
9542
9751
|
notations: s2.view.notation?.elements ?? [],
|
|
9543
9752
|
height: s2.xystore.getState().height,
|
|
9544
|
-
isVisible: e$3(s2.focusedNodeId ?? s2.
|
|
9545
|
-
target: s2.getContainer()
|
|
9753
|
+
isVisible: e$3(s2.focusedNodeId ?? s2.activeWalkthrough)
|
|
9546
9754
|
});
|
|
9547
9755
|
function NotationPanel() {
|
|
9548
9756
|
const {
|
|
9549
9757
|
id: id2,
|
|
9550
9758
|
notations,
|
|
9551
9759
|
isVisible,
|
|
9552
|
-
height
|
|
9553
|
-
target
|
|
9760
|
+
height
|
|
9554
9761
|
} = useDiagramState(selector), [isCollapsed, setCollapsed] = useLocalStorage({
|
|
9555
9762
|
key: "notation-panel-collapsed",
|
|
9556
9763
|
defaultValue: !0
|
|
9557
|
-
}), hasNotations = notations.length > 0, portalProps =
|
|
9764
|
+
}), hasNotations = notations.length > 0, portalProps = useMantinePortalProps();
|
|
9558
9765
|
return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
|
|
9559
9766
|
!hasNotations && isVisible && /* @__PURE__ */ jsx(
|
|
9560
9767
|
m$1.div,
|
|
@@ -9651,7 +9858,7 @@ function NotationPanel() {
|
|
|
9651
9858
|
{
|
|
9652
9859
|
viewportProps: {
|
|
9653
9860
|
style: {
|
|
9654
|
-
maxHeight:
|
|
9861
|
+
maxHeight: `min(40vh, ${Math.max(height - 60, 50)}px)`
|
|
9655
9862
|
}
|
|
9656
9863
|
},
|
|
9657
9864
|
children: /* @__PURE__ */ jsx(Stack, { gap: 0, children: notations.map((n2, i2) => /* @__PURE__ */ jsx(ElementNotation, { value: n2 }, i2)) })
|
|
@@ -9921,7 +10128,7 @@ var panel$1 = "_12rmdgk0";
|
|
|
9921
10128
|
function OptionsPanel() {
|
|
9922
10129
|
const { isFocused, viewId } = useDiagramState((s2) => ({
|
|
9923
10130
|
viewId: s2.view.id,
|
|
9924
|
-
isFocused: s2.focusedNodeId !== null || s2.
|
|
10131
|
+
isFocused: s2.focusedNodeId !== null || s2.activeWalkthrough !== null
|
|
9925
10132
|
})), [selected, setSelected] = useState$1({
|
|
9926
10133
|
nodes: [],
|
|
9927
10134
|
edges: []
|
|
@@ -10192,19 +10399,17 @@ const ActionIcon = ActionIcon$2.withProps({
|
|
|
10192
10399
|
showFitDiagram,
|
|
10193
10400
|
showLayoutDriftWarning,
|
|
10194
10401
|
showChangeAutoLayout,
|
|
10195
|
-
target,
|
|
10196
10402
|
showGoToSource
|
|
10197
10403
|
} = useDiagramState((s2) => {
|
|
10198
|
-
const isNotActive = s2.
|
|
10404
|
+
const isNotActive = s2.activeWalkthrough === null && s2.focusedNodeId === null;
|
|
10199
10405
|
return {
|
|
10200
10406
|
showNavigationButtons: !!s2.onBurgerMenuClick || s2.showNavigationButtons && !!s2.onNavigateTo,
|
|
10201
10407
|
showFitDiagram: s2.fitViewEnabled && s2.zoomable && s2.viewportChanged,
|
|
10202
10408
|
showLayoutDriftWarning: s2.readonly !== !0 && s2.view.hasLayoutDrift === !0 && isNotActive,
|
|
10203
10409
|
showChangeAutoLayout: s2.readonly !== !0 && !!s2.onChange && isNotActive,
|
|
10204
|
-
showGoToSource: !!s2.onOpenSourceView
|
|
10205
|
-
target: s2.getContainer()
|
|
10410
|
+
showGoToSource: !!s2.onOpenSourceView
|
|
10206
10411
|
};
|
|
10207
|
-
}), portalProps =
|
|
10412
|
+
}), portalProps = useMantinePortalProps();
|
|
10208
10413
|
return /* @__PURE__ */ jsxs(
|
|
10209
10414
|
Stack,
|
|
10210
10415
|
{
|
|
@@ -10251,7 +10456,7 @@ const ActionIcon = ActionIcon$2.withProps({
|
|
|
10251
10456
|
opacity: 0,
|
|
10252
10457
|
transform: "translateX(-30%)"
|
|
10253
10458
|
},
|
|
10254
|
-
children: /* @__PURE__ */ jsx(Tooltip$1, { label: "Center
|
|
10459
|
+
children: /* @__PURE__ */ jsx(Tooltip$1, { label: "Center camera", ...portalProps, children: /* @__PURE__ */ jsx(
|
|
10255
10460
|
ActionIcon$1,
|
|
10256
10461
|
{
|
|
10257
10462
|
className: "action-icon",
|
|
@@ -10288,7 +10493,7 @@ function XYFlowBackground({ background }) {
|
|
|
10288
10493
|
const { variant, ...rest } = background;
|
|
10289
10494
|
return /* @__PURE__ */ jsx(Background, { variant: literalToEnum(variant), ...rest });
|
|
10290
10495
|
}
|
|
10291
|
-
const XYFlowInner = memo$1(function({
|
|
10496
|
+
const XYFlowInner = /* @__PURE__ */ memo$1(function({
|
|
10292
10497
|
children,
|
|
10293
10498
|
background,
|
|
10294
10499
|
controls,
|
|
@@ -10305,7 +10510,7 @@ const XYFlowInner = memo$1(function({
|
|
|
10305
10510
|
isDynamicView: s2.isDynamicView,
|
|
10306
10511
|
readonly: s2.readonly,
|
|
10307
10512
|
enableDynamicViewWalkthrough: s2.enableDynamicViewWalkthrough,
|
|
10308
|
-
isDynamicViewActive: l(s2.
|
|
10513
|
+
isDynamicViewActive: l(s2.activeWalkthrough)
|
|
10309
10514
|
}));
|
|
10310
10515
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10311
10516
|
background !== "transparent" && background !== "solid" && /* @__PURE__ */ jsx(XYFlowBackground, { background }),
|
|
@@ -10419,7 +10624,7 @@ function LikeC4Diagram({
|
|
|
10419
10624
|
) }) });
|
|
10420
10625
|
}
|
|
10421
10626
|
LikeC4Diagram.displayName = "LikeC4Diagram";
|
|
10422
|
-
const LikeC4DiagramInnerMemo = memo$1(function({
|
|
10627
|
+
const LikeC4DiagramInnerMemo = /* @__PURE__ */ memo$1(function({
|
|
10423
10628
|
background,
|
|
10424
10629
|
controls,
|
|
10425
10630
|
showDiagramTitle
|
|
@@ -10556,7 +10761,7 @@ function DiagramPreview(props2) {
|
|
|
10556
10761
|
}
|
|
10557
10762
|
) });
|
|
10558
10763
|
}
|
|
10559
|
-
const OverviewGraph = /* @__PURE__ */ lazy(() => import("./-index-overview-
|
|
10764
|
+
const OverviewGraph = /* @__PURE__ */ lazy(() => import("./-index-overview-DZ3H7kDb.js"));
|
|
10560
10765
|
function WithOverviewGraph() {
|
|
10561
10766
|
return /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(OverviewGraph, {}) });
|
|
10562
10767
|
}
|
|
@@ -10729,7 +10934,7 @@ function buildDiagramTreeData(views) {
|
|
|
10729
10934
|
label: view.title ?? view.id,
|
|
10730
10935
|
type: "diagram",
|
|
10731
10936
|
children: []
|
|
10732
|
-
}), parent !== root2 && (parent.children.sort(compareTreeNodes), n$
|
|
10937
|
+
}), parent !== root2 && (parent.children.sort(compareTreeNodes), n$2(view.relativePath) && parent.type !== "file" && (parent.type = "file"));
|
|
10733
10938
|
}
|
|
10734
10939
|
return root2.children.sort(compareTreeNodes);
|
|
10735
10940
|
}
|
|
@@ -10740,17 +10945,18 @@ function useDiagramsTreeData() {
|
|
|
10740
10945
|
const isFile = (node) => isTreeNodeData(node) && node.type === "file", FolderIcon = ({ node, expanded }) => isFile(node) ? /* @__PURE__ */ jsx(ThemeIcon, { size: "sm", variant: "transparent", color: "indigo", children: /* @__PURE__ */ jsx(IconFileCode, { size: 16 }) }) : /* @__PURE__ */ jsx(ThemeIcon, { size: "sm", variant: "transparent", color: "violet", children: expanded ? /* @__PURE__ */ jsx(IconFolderOpen, { size: 16 }) : /* @__PURE__ */ jsx(IconFolderFilled, { size: 16 }) }), DiagramsTree = /* @__PURE__ */ memo$1(() => {
|
|
10741
10946
|
const data = useDiagramsTreeData(), { viewId } = useParams({
|
|
10742
10947
|
from: "/view/$viewId"
|
|
10743
|
-
}), diagram = useLikeC4View(viewId),
|
|
10744
|
-
if (diagram && n$1(diagram.relativePath)) {
|
|
10745
|
-
const segments = diagram.relativePath.split("/");
|
|
10746
|
-
let path = "@fs";
|
|
10747
|
-
for (const segment of segments)
|
|
10748
|
-
path += `/${segment}`, initialExpandedState[path] = !0;
|
|
10749
|
-
}
|
|
10750
|
-
const tree = useTree({
|
|
10751
|
-
initialExpandedState,
|
|
10948
|
+
}), diagram = useLikeC4View(viewId), tree = useTree({
|
|
10752
10949
|
multiple: !1
|
|
10753
|
-
}),
|
|
10950
|
+
}), relativePath = diagram?.relativePath ?? null;
|
|
10951
|
+
useEffect$1(() => {
|
|
10952
|
+
if (relativePath) {
|
|
10953
|
+
const segments = relativePath.split("/");
|
|
10954
|
+
let path = "@fs";
|
|
10955
|
+
for (const segment of segments)
|
|
10956
|
+
path += `/${segment}`, tree.expand(path);
|
|
10957
|
+
}
|
|
10958
|
+
}, [relativePath]);
|
|
10959
|
+
const theme2 = useComputedColorScheme();
|
|
10754
10960
|
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
10755
10961
|
Tree,
|
|
10756
10962
|
{
|
|
@@ -10806,6 +11012,7 @@ function SidebarDrawer() {
|
|
|
10806
11012
|
{
|
|
10807
11013
|
size: "sm",
|
|
10808
11014
|
opened,
|
|
11015
|
+
keepMounted: !0,
|
|
10809
11016
|
onClose: () => drawerOpenedAtom.set(!1),
|
|
10810
11017
|
title: /* @__PURE__ */ jsx(
|
|
10811
11018
|
Button,
|
|
@@ -10877,7 +11084,7 @@ const AlertLocalhost = () => /* @__PURE__ */ jsx(
|
|
|
10877
11084
|
`.trim();
|
|
10878
11085
|
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
10879
11086
|
code.includes("http://localhost") && /* @__PURE__ */ jsx(AlertLocalhost, {}),
|
|
10880
|
-
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { size: "sm", children: "
|
|
11087
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { size: "sm", children: "Embedded view is an iframe with a static diagram" }) }),
|
|
10881
11088
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
10882
11089
|
/* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
10883
11090
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { fw: "500", size: "sm", children: "HTML" }) }),
|
|
@@ -10999,7 +11206,7 @@ function ShareModal({
|
|
|
10999
11206
|
/* @__PURE__ */ jsxs(Tabs, { value: activeTab, onChange: (tab) => setActiveTab(tab ?? "webcomponent"), children: [
|
|
11000
11207
|
/* @__PURE__ */ jsxs(TabsList, { children: [
|
|
11001
11208
|
/* @__PURE__ */ jsx(TabsTab, { value: "webcomponent", children: "Webcomponent" }),
|
|
11002
|
-
/* @__PURE__ */ jsx(TabsTab, { value: "embed", children: "
|
|
11209
|
+
/* @__PURE__ */ jsx(TabsTab, { value: "embed", children: "Embedded" })
|
|
11003
11210
|
] }),
|
|
11004
11211
|
/* @__PURE__ */ jsx(TabsPanel, { value: "embed", pt: "md", children: /* @__PURE__ */ jsx(EmbedPanel, { diagram }) }),
|
|
11005
11212
|
/* @__PURE__ */ jsx(TabsPanel, { value: "webcomponent", pt: "md", children: /* @__PURE__ */ jsx(WebcomponentsPanel, { diagram }) })
|
|
@@ -13016,9 +13223,22 @@ const Route = createFileRoute("/view/$viewId/d2")({
|
|
|
13016
13223
|
throw notFound();
|
|
13017
13224
|
}
|
|
13018
13225
|
}
|
|
13019
|
-
})
|
|
13226
|
+
}), fetchFromKroki = async (d2) => await (await fetch("https://kroki.io/d2/svg", {
|
|
13227
|
+
method: "POST",
|
|
13228
|
+
cache: "force-cache",
|
|
13229
|
+
body: JSON.stringify({
|
|
13230
|
+
diagram_source: d2,
|
|
13231
|
+
// diagram_options: {
|
|
13232
|
+
// theme: 'colorblind-clear'
|
|
13233
|
+
// },
|
|
13234
|
+
output_format: "svg"
|
|
13235
|
+
}),
|
|
13236
|
+
headers: {
|
|
13237
|
+
"Content-Type": "application/json"
|
|
13238
|
+
}
|
|
13239
|
+
})).text();
|
|
13020
13240
|
function ViewAsD2() {
|
|
13021
|
-
const { source } = Route.useLoaderData();
|
|
13241
|
+
const { source } = Route.useLoaderData(), [krokiSvg, { execute }] = useAsync(fetchFromKroki, null);
|
|
13022
13242
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13023
13243
|
/* @__PURE__ */ jsxs(PanelGroup, { className: viewWithTopPadding, direction: "horizontal", autoSaveId: "viewAsD2", children: [
|
|
13024
13244
|
/* @__PURE__ */ jsx(Panel, { children: /* @__PURE__ */ jsxs(
|
|
@@ -13045,7 +13265,22 @@ function ViewAsD2() {
|
|
|
13045
13265
|
}
|
|
13046
13266
|
}
|
|
13047
13267
|
),
|
|
13048
|
-
/* @__PURE__ */ jsx(Panel, { children: /* @__PURE__ */
|
|
13268
|
+
/* @__PURE__ */ jsx(Panel, { children: /* @__PURE__ */ jsxs(ScrollArea, { h: "100%", children: [
|
|
13269
|
+
krokiSvg.status !== "success" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13270
|
+
/* @__PURE__ */ jsx(
|
|
13271
|
+
Button,
|
|
13272
|
+
{
|
|
13273
|
+
mt: "xs",
|
|
13274
|
+
variant: "light",
|
|
13275
|
+
disabled: krokiSvg.status === "loading",
|
|
13276
|
+
onClick: () => void execute(source),
|
|
13277
|
+
children: krokiSvg.status === "loading" ? "Loading..." : "Render with Kroki"
|
|
13278
|
+
}
|
|
13279
|
+
),
|
|
13280
|
+
krokiSvg.status === "error" && /* @__PURE__ */ jsx(Box, { children: krokiSvg.error?.message })
|
|
13281
|
+
] }),
|
|
13282
|
+
krokiSvg.status === "success" && /* @__PURE__ */ jsx(Box, { className: svgContainer, children: krokiSvg.result ? /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: krokiSvg.result } }) : /* @__PURE__ */ jsx(Box, { children: "Empty result" }) })
|
|
13283
|
+
] }) })
|
|
13049
13284
|
] }),
|
|
13050
13285
|
/* @__PURE__ */ jsx(
|
|
13051
13286
|
Box,
|