likec4 1.46.4 → 1.47.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/__app__/src/ProjectsOverview.js +16 -0
- package/__app__/src/likec4.js +1301 -502
- package/__app__/src/main.js +249 -219
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +2690 -2349
- package/__app__/src/webcomponent.js +1 -1
- package/config/schema.json +3 -1
- package/dist/cli/index.mjs +339 -339
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +13 -4
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +1 -0
- package/dist/shared/likec4.CDVXAxDx.mjs +3573 -0
- package/dist/shared/likec4.CRP-WAuw.mjs +330 -0
- package/dist/shared/likec4.CXTvqtC-.mjs +207 -0
- package/dist/shared/{likec4.6kvTI22o.d.mts → likec4.DqDU0qex.d.mts} +648 -57
- package/dist/shared/{likec4.DobqFzmV.d.mts → likec4.iedqayBZ.d.mts} +6958 -11665
- package/dist/vite-plugin/index.d.mts +3 -3
- package/dist/vite-plugin/index.mjs +1 -1
- package/package.json +17 -20
- package/react/index.d.ts +41 -5
- package/react/index.js +1441 -497
- package/vite-plugin-modules.d.ts +8 -0
- package/dist/shared/likec4.BJupup6Q.mjs +0 -4211
- package/dist/shared/likec4.DASl7M77.mjs +0 -183
- package/dist/shared/likec4.DwZEQeLv.mjs +0 -272
package/__app__/src/likec4.js
CHANGED
|
@@ -2,12 +2,12 @@ import { forwardRef, createElement, useContext, createContext, memo as memo$1, u
|
|
|
2
2
|
import { vector, BBox as BBox$2 } from "@likec4/core/geometry";
|
|
3
3
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
import { B as Background$1, a as BackgroundVariant, d as deepEqual, u as useFirstMountState, b as useCustomCompareEffect, s as shallowEqual, c as
|
|
5
|
+
import { B as Background$1, a as BackgroundVariant, d as deepEqual, u as useFirstMountState, b as useCustomCompareEffect, s as shallowEqual, c as useStore, e as useStoreApi, f as useReactFlow, t, g as e, h as t$1, i as Bezier, j as getNodeDimensions, n, k as useMantineColorScheme, l as index, m as e$1, o as t$2, p as t$3, q as createSafeContext$1, r as atom, v as useIsomorphicLayoutEffect, w as useSyncedRef, x as t$4, y as e$2, z as t$5, A as createTheme, T as Tooltip$6, P as Portal, M as MantineContext, C as MantineProvider, D as useMantineStyleNonce, L as LazyMotion, E as domMax, F as MotionConfig, G as e$3, H as t$6, I as t$7, J as t$8, K as t$9, N as useId$1, O as ErrorBoundary$1, Q as ThemeIcon, R as Text, S as ScrollAreaAutosize, U as Button, V as useSelector, W as setup, X as emit, Y as assertEvent, Z as assign, _ as raise, $ as t$a, a0 as n$1, a1 as t$b, a2 as n$2, a3 as e$4, a4 as fromCallback, a5 as getHotkeyHandler, a6 as enqueueActions, a7 as r, a8 as sendTo, a9 as log, aa as fromPromise, ab as getViewportForBounds, ac as getNodesBounds, ad as getEdgePosition, ae as t$c, af as t$d, ag as e$5, ah as t$e, ai as t$f, aj as n$3, ak as dagre, al as t$g, am as t$h, an as t$i, ao as cancel, ap as applyEdgeChanges, aq as applyNodeChanges, ar as e$6, as as stopChild, at as spawnChild, au as e$7, av as not, aw as t$j, ax as e$8, ay as ActionIcon, az as MotionButton, aA as MotionDiv, aB as Breadcrumbs, aC as Menu, aD as UnstyledButton, aE as SegmentedControl, aF as Divider$2, aG as AnimatePresence, aH as useHover, aI as Popover, aJ as PopoverTarget, aK as PopoverDropdown, aL as Box$1, aM as FloatingIndicator, aN as Flex, aO as useDebouncedCallback, aP as useUncontrolled, aQ as clampUseMovePosition, aR as useMove, aS as useMergedRef, aT as TooltipGroup, aU as useDebouncedValue, aV as EdgeLabelRenderer, aW as e$9, aX as useDebouncedState, aY as NodeToolbar, aZ as Position, a_ as Handle, a$ as Badge, b0 as CopyButton, b1 as HoverCard, b2 as HoverCardTarget, b3 as HoverCardDropdown, b4 as Notification, b5 as isMacOs, b6 as NavLink, b7 as ColorSwatch, b8 as Space, b9 as Stack, ba as CheckIcon, bb as rem, bc as useUpdateEffect$1, bd as Slider, be as Paper, bf as MenuTarget, bg as MenuDropdown, bh as MenuItem, bi as useFocusTrap, bj as useReducedMotionConfig, bk as useTimeoutEffect, bl as m, bm as ReactRemoveScroll, bn as useThrottledCallback, bo as Input, bp as createScopedKeydownHandler, bq as t$k, br as Highlight, bs as useMountEffect, bt as e$a, bu as useActorRef, bv as LayoutGroup, bw as useTree, bx as Alert, by as Tree, bz as Group, bA as getBezierPath, bB as ReactFlowProvider, bC as useStateHistory, bD as useRafEffect, bE as Panel, bF as Anchor, bG as Pill, bH as useViewportSize, bI as useSessionStorage, bJ as t$l, bK as useDragControls, bL as useMotionValue, bM as CloseButton, bN as ActionIconGroup, bO as Tabs, bP as TabsList, bQ as TabsTab, bR as TabsPanel, bS as ScrollArea, bT as useCallbackRef$1, bU as animate, bV as e$b, bW as VisuallyHidden, bX as n$4, bY as useWindowEvent, bZ as FocusTrap, b_ as Title$1, b$ as useFocusWithin, c0 as useCombobox, c1 as ComboboxOption, c2 as Combobox, c3 as ComboboxTarget, c4 as ComboboxDropdown, c5 as ComboboxOptions, c6 as ComboboxEmpty, c7 as useHotkeys, c8 as Grid, c9 as GridCol, ca as autoUpdate, cb as computePosition, cc as offset, cd as autoPlacement, ce as size, cf as hide, cg as useLocalStorage, ch as Card, ci as n$5, cj as useRerender, ck as d3line, cl as curveCatmullRomOpen, cm as getSmoothStepPath, cn as r$1, co as produce, cp as useTimeout, cq as useDebouncedCallback$1, cr as useCustomCompareMemo, cs as setAutoFreeze, ct as castDraft, cu as n$6, cv as t$m, cw as nodeToRect$1, cx as and, cy as or, cz as e$c, cA as t$n, cB as toRgba, cC as t$o, cD as mix, cE as toHex, cF as scale, cG as e$d, cH as t$p, cI as stagger, cJ as motionValue, cK as mapValue, cL as styleEffect, cM as isValidMotionProp } from "./vendors.js";
|
|
6
6
|
import { nonexhaustive, BBox, isTagColorSpecified, Queue, GroupElementKind, nonNullable as nonNullable$1, invariant as invariant$1, isStepEdgeId, extractStep, RichText as RichText$1, ancestorsFqn, nameFromFqn, isAncestor as isAncestor$1, DefaultMap as DefaultMap$1, whereOperatorAsPredicate, getParallelStepsPrefix } from "@likec4/core";
|
|
7
7
|
import { DefaultTagColors, LikeC4Styles as LikeC4Styles$1, ElementShapes } from "@likec4/core/styles";
|
|
8
|
-
import { invariant, nonNullable, nonexhaustive as nonexhaustive$1, toArray, ifind, DefaultMap, delay, ifirst, ifilter, compareNaturalHierarchically, compareNatural, isAncestor, sortParentsFirst, nameFromFqn as nameFromFqn$1, isome } from "@likec4/core/utils";
|
|
9
8
|
import { computeRelationshipsView, treeFromElements } from "@likec4/core/compute-view/relationships";
|
|
10
9
|
import { BBox as BBox$1, preferSummary, exact, ensureSizes, RichText } from "@likec4/core/types";
|
|
10
|
+
import { invariant, nonNullable, nonexhaustive as nonexhaustive$1, toArray, ifind, DefaultMap, delay, ifirst, ifilter, compareNaturalHierarchically, compareNatural, isAncestor, sortParentsFirst, nameFromFqn as nameFromFqn$1, isome } from "@likec4/core/utils";
|
|
11
11
|
import { extractViewTitleFromPath, VIEW_FOLDERS_SEPARATOR, normalizeViewPath, modelConnection } from "@likec4/core/model";
|
|
12
12
|
function isObject(value) {
|
|
13
13
|
return typeof value == "object" && value != null && !Array.isArray(value);
|
|
@@ -192,7 +192,7 @@ function normalizeHTMLProps(props) {
|
|
|
192
192
|
return Object.fromEntries(Object.entries(props).map(([key2, value]) => [convert(key2), value]));
|
|
193
193
|
}
|
|
194
194
|
normalizeHTMLProps.keys = htmlProps;
|
|
195
|
-
const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,base", conditions = new Set(conditionsStr.split(",")), conditionRegex = /^@|&|&$/;
|
|
195
|
+
const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_shapeBucket,_shapeDocument,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,base", conditions = new Set(conditionsStr.split(",")), conditionRegex = /^@|&|&$/;
|
|
196
196
|
function isCondition(value) {
|
|
197
197
|
return conditions.has(value) || conditionRegex.test(value);
|
|
198
198
|
}
|
|
@@ -370,22 +370,23 @@ const createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
|
370
370
|
);
|
|
371
371
|
return Component.displayName = `${iconNamePascal}`, Component;
|
|
372
372
|
};
|
|
373
|
-
const __iconNode$
|
|
374
|
-
const __iconNode$
|
|
375
|
-
const __iconNode$
|
|
376
|
-
const __iconNode$
|
|
377
|
-
const __iconNode$
|
|
378
|
-
const __iconNode$
|
|
379
|
-
const __iconNode$
|
|
380
|
-
const __iconNode$
|
|
381
|
-
const __iconNode$
|
|
382
|
-
const __iconNode$
|
|
383
|
-
const __iconNode$
|
|
384
|
-
const __iconNode$
|
|
385
|
-
const __iconNode$
|
|
386
|
-
const __iconNode$
|
|
387
|
-
const __iconNode$
|
|
388
|
-
const __iconNode$
|
|
373
|
+
const __iconNode$S = [["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" }]], IconAlertTriangle = createReactComponent("outline", "alert-triangle", "AlertTriangle", __iconNode$S);
|
|
374
|
+
const __iconNode$R = [["path", { d: "M7 7l10 10", key: "svg-0" }], ["path", { d: "M17 8l0 9l-9 0", key: "svg-1" }]], IconArrowDownRight = createReactComponent("outline", "arrow-down-right", "ArrowDownRight", __iconNode$R);
|
|
375
|
+
const __iconNode$Q = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M5 12l6 6", key: "svg-1" }], ["path", { d: "M5 12l6 -6", key: "svg-2" }]], IconArrowLeft = createReactComponent("outline", "arrow-left", "ArrowLeft", __iconNode$Q);
|
|
376
|
+
const __iconNode$P = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], IconArrowRight = createReactComponent("outline", "arrow-right", "ArrowRight", __iconNode$P);
|
|
377
|
+
const __iconNode$O = [["path", { d: "M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11", key: "svg-0" }]], IconBolt = createReactComponent("outline", "bolt", "Bolt", __iconNode$O);
|
|
378
|
+
const __iconNode$N = [["path", { d: "M4 8h16", key: "svg-0" }], ["path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z", key: "svg-1" }], ["path", { d: "M8 4v4", key: "svg-2" }]], IconBrowser = createReactComponent("outline", "browser", "Browser", __iconNode$N);
|
|
379
|
+
const __iconNode$M = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], IconCheck = createReactComponent("outline", "check", "Check", __iconNode$M);
|
|
380
|
+
const __iconNode$L = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode$L);
|
|
381
|
+
const __iconNode$K = [["path", { d: "M15 6l-6 6l6 6", key: "svg-0" }]], IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode$K);
|
|
382
|
+
const __iconNode$J = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode$J);
|
|
383
|
+
const __iconNode$I = [["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" }]], IconCopy = createReactComponent("outline", "copy", "Copy", __iconNode$I);
|
|
384
|
+
const __iconNode$H = [["path", { d: "M12 6m-7 0a7 3 0 1 0 14 0a7 3 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M5 6v12c0 1.657 3.134 3 7 3s7 -1.343 7 -3v-12", key: "svg-1" }]], IconCylinder = createReactComponent("outline", "cylinder", "Cylinder", __iconNode$H);
|
|
385
|
+
const __iconNode$G = [["path", { d: "M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z", key: "svg-0" }], ["path", { d: "M11 4h2", key: "svg-1" }], ["path", { d: "M12 17v.01", key: "svg-2" }]], IconDeviceMobile = createReactComponent("outline", "device-mobile", "DeviceMobile", __iconNode$G);
|
|
386
|
+
const __iconNode$F = [["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" }]], IconExternalLink = createReactComponent("outline", "external-link", "ExternalLink", __iconNode$F);
|
|
387
|
+
const __iconNode$E = [["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" }]], IconFileCode = createReactComponent("outline", "file-code", "FileCode", __iconNode$E);
|
|
388
|
+
const __iconNode$D = [["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" }]], IconFileSymlink = createReactComponent("outline", "file-symlink", "FileSymlink", __iconNode$D);
|
|
389
|
+
const __iconNode$C = [["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: "M9 9l1 0", key: "svg-2" }], ["path", { d: "M9 13l6 0", key: "svg-3" }], ["path", { d: "M9 17l6 0", key: "svg-4" }]], IconFileText = createReactComponent("outline", "file-text", "FileText", __iconNode$C);
|
|
389
390
|
const __iconNode$B = [["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" }]], IconFocusCentered = createReactComponent("outline", "focus-centered", "FocusCentered", __iconNode$B);
|
|
390
391
|
const __iconNode$A = [["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" }]], IconFolderOpen = createReactComponent("outline", "folder-open", "FolderOpen", __iconNode$A);
|
|
391
392
|
const __iconNode$z = [["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" }]], IconHelpCircle = createReactComponent("outline", "help-circle", "HelpCircle", __iconNode$z);
|
|
@@ -459,7 +460,9 @@ const ShapeIcons = {
|
|
|
459
460
|
person: IconUser,
|
|
460
461
|
queue: IconReorder,
|
|
461
462
|
rectangle: IconRectangularPrism,
|
|
462
|
-
storage: IconCylinder
|
|
463
|
+
storage: IconCylinder,
|
|
464
|
+
bucket: IconCylinder,
|
|
465
|
+
document: IconFileText
|
|
463
466
|
};
|
|
464
467
|
function IconOrShapeRenderer({
|
|
465
468
|
element,
|
|
@@ -880,7 +883,7 @@ function useIsReducedGraphics() {
|
|
|
880
883
|
const isReduced = useContext(ReduceGraphicsModeCtx);
|
|
881
884
|
return isReduced === null && console.warn("ReduceGraphicsMode is not provided"), isReduced ?? !1;
|
|
882
885
|
}
|
|
883
|
-
const [PanningAtomSafeCtx, usePanningAtom] = createSafeContext(
|
|
886
|
+
const [PanningAtomSafeCtx, usePanningAtom] = createSafeContext$1(
|
|
884
887
|
"PanningAtomSafeCtx is not provided"
|
|
885
888
|
);
|
|
886
889
|
function RootContainer({
|
|
@@ -918,7 +921,7 @@ const defaultHandlers = {
|
|
|
918
921
|
onEdgeContextMenu: null,
|
|
919
922
|
onCanvasClick: null,
|
|
920
923
|
onCanvasDblClick: null,
|
|
921
|
-
|
|
924
|
+
onLogoClick: null,
|
|
922
925
|
onOpenSource: null,
|
|
923
926
|
onInitialized: null,
|
|
924
927
|
onLayoutTypeChange: null
|
|
@@ -1117,8 +1120,8 @@ function useOptionalLikeC4EditorPort() {
|
|
|
1117
1120
|
function useId() {
|
|
1118
1121
|
return useId$1().replace("mantine-", "likec4-");
|
|
1119
1122
|
}
|
|
1120
|
-
var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,WebkitTextFillColor,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,textStyle,layerStyle,animationStyle", userGenerated = userGeneratedStr.split(","), cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical", allCssProperties = cssPropertiesStr.split(",").concat(userGenerated), properties = new Map(allCssProperties.map((prop) => [prop, !0])), cssPropertySelectorRegex = /&|@/, isCssProperty = /* @__PURE__ */ memo((prop) => properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop));
|
|
1121
|
-
const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop), composeShouldForwardProps = (tag,
|
|
1123
|
+
var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,WebkitTextFillColor,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_shapeBucket,_shapeDocument,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,textStyle,layerStyle,animationStyle", userGenerated = userGeneratedStr.split(","), cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical", allCssProperties = cssPropertiesStr.split(",").concat(userGenerated), properties = new Map(allCssProperties.map((prop) => [prop, !0])), cssPropertySelectorRegex = /&|@/, isCssProperty = /* @__PURE__ */ memo((prop) => properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop));
|
|
1124
|
+
const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop), composeShouldForwardProps = (tag, shouldForwardProp2) => tag.__shouldForwardProps__ && shouldForwardProp2 ? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp2(propName) : shouldForwardProp2, composeCvaFn = (cvaA, cvaB) => {
|
|
1122
1125
|
if (cvaA && !cvaB) return cvaA;
|
|
1123
1126
|
if (!cvaA && cvaB) return cvaB;
|
|
1124
1127
|
if (cvaA.__cva__ && cvaB.__cva__ || cvaA.__recipe__ && cvaB.__recipe__) return cvaA.merge(cvaB);
|
|
@@ -1126,10 +1129,10 @@ const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(pr
|
|
|
1126
1129
|
throw TypeError.captureStackTrace?.(error), error;
|
|
1127
1130
|
}, getDisplayName = (Component) => typeof Component == "string" ? Component : Component?.displayName || Component?.name || "Component";
|
|
1128
1131
|
function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
1129
|
-
const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva), forwardFn = options.shouldForwardProp || defaultShouldForwardProp,
|
|
1132
|
+
const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva), forwardFn = options.shouldForwardProp || defaultShouldForwardProp, shouldForwardProp2 = (prop) => options.forwardProps?.includes(prop) ? !0 : forwardFn(prop, cvaFn.variantKeys), defaultProps = Object.assign(
|
|
1130
1133
|
options.dataAttr && configOrCva.__name__ ? { "data-recipe": configOrCva.__name__ } : {},
|
|
1131
1134
|
options.defaultProps
|
|
1132
|
-
), __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn), __shouldForwardProps__ = composeShouldForwardProps(Dynamic,
|
|
1135
|
+
), __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn), __shouldForwardProps__ = composeShouldForwardProps(Dynamic, shouldForwardProp2), __base__ = Dynamic.__base__ || Dynamic, StyledComponent = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
1133
1136
|
const { as: Element = __base__, unstyled, children, ...restProps } = props, combinedProps = useMemo(() => Object.assign({}, defaultProps, restProps), [restProps]), [htmlProps2, forwardedProps, variantProps, styleProps, elementProps] = useMemo(() => splitProps(combinedProps, normalizeHTMLProps.keys, __shouldForwardProps__, __cvaFn__.variantKeys, isCssProperty), [combinedProps]);
|
|
1134
1137
|
function recipeClass() {
|
|
1135
1138
|
const { css: cssStyles, ...propStyles } = styleProps, compoundVariantStyles = __cvaFn__.__getCompoundVariantCss__?.(variantProps);
|
|
@@ -1154,7 +1157,7 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
|
1154
1157
|
className: classes2()
|
|
1155
1158
|
}, children ?? combinedProps.children);
|
|
1156
1159
|
}), name = getDisplayName(__base__);
|
|
1157
|
-
return StyledComponent.displayName = `styled.${name}`, StyledComponent.__cva__ = __cvaFn__, StyledComponent.__base__ = __base__, StyledComponent.__shouldForwardProps__ =
|
|
1160
|
+
return StyledComponent.displayName = `styled.${name}`, StyledComponent.__cva__ = __cvaFn__, StyledComponent.__base__ = __base__, StyledComponent.__shouldForwardProps__ = shouldForwardProp2, StyledComponent;
|
|
1158
1161
|
}
|
|
1159
1162
|
function createJsxFactory() {
|
|
1160
1163
|
const cache = /* @__PURE__ */ new Map();
|
|
@@ -1167,7 +1170,68 @@ function createJsxFactory() {
|
|
|
1167
1170
|
}
|
|
1168
1171
|
});
|
|
1169
1172
|
}
|
|
1170
|
-
const styled = /* @__PURE__ */ createJsxFactory()
|
|
1173
|
+
const styled = /* @__PURE__ */ createJsxFactory();
|
|
1174
|
+
function createSafeContext(contextName) {
|
|
1175
|
+
const Context = createContext(void 0);
|
|
1176
|
+
return [Context, (componentName, slot) => {
|
|
1177
|
+
const context2 = useContext(Context);
|
|
1178
|
+
if (context2 === void 0) {
|
|
1179
|
+
const componentInfo = componentName ? `Component "${componentName}"` : "A component", slotInfo = slot ? ` (slot: "${slot}")` : "";
|
|
1180
|
+
throw new Error(
|
|
1181
|
+
`${componentInfo}${slotInfo} cannot access ${contextName} because it's missing its Provider.`
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
return context2;
|
|
1185
|
+
}];
|
|
1186
|
+
}
|
|
1187
|
+
function createStyleContext(recipe) {
|
|
1188
|
+
const isConfigRecipe = "__recipe__" in recipe, recipeName = isConfigRecipe && recipe.__name__ ? recipe.__name__ : void 0, contextName = recipeName ? `createStyleContext("${recipeName}")` : "createStyleContext", [StyleContext, useStyleContext] = createSafeContext(contextName), svaFn = isConfigRecipe ? recipe : sva(recipe.config), getResolvedProps = (props, slotStyles) => {
|
|
1189
|
+
const { unstyled, ...restProps } = props;
|
|
1190
|
+
return unstyled ? restProps : isConfigRecipe ? { ...restProps, className: cx(slotStyles, restProps.className) } : { ...slotStyles, ...restProps };
|
|
1191
|
+
};
|
|
1192
|
+
return {
|
|
1193
|
+
withRootProvider: (Component, options) => {
|
|
1194
|
+
const WithRootProvider = (props) => {
|
|
1195
|
+
const [variantProps, otherProps] = svaFn.splitVariantProps(props), slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps);
|
|
1196
|
+
slotStyles._classNameMap = svaFn.classNameMap;
|
|
1197
|
+
const mergedProps = options?.defaultProps ? { ...options.defaultProps, ...otherProps } : otherProps;
|
|
1198
|
+
return createElement(StyleContext.Provider, {
|
|
1199
|
+
value: slotStyles,
|
|
1200
|
+
children: createElement(Component, mergedProps)
|
|
1201
|
+
});
|
|
1202
|
+
}, componentName = getDisplayName(Component);
|
|
1203
|
+
return WithRootProvider.displayName = `withRootProvider(${componentName})`, WithRootProvider;
|
|
1204
|
+
},
|
|
1205
|
+
withProvider: (Component, slot, options) => {
|
|
1206
|
+
const StyledComponent = styled(Component, {}, options), WithProvider = forwardRef((props, ref) => {
|
|
1207
|
+
const [variantProps, restProps] = svaFn.splitVariantProps(props), slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps);
|
|
1208
|
+
slotStyles._classNameMap = svaFn.classNameMap;
|
|
1209
|
+
const propsWithClass = { ...restProps, className: restProps.className ?? options?.defaultProps?.className }, resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot]);
|
|
1210
|
+
return createElement(StyleContext.Provider, {
|
|
1211
|
+
value: slotStyles,
|
|
1212
|
+
children: createElement(StyledComponent, {
|
|
1213
|
+
...resolvedProps,
|
|
1214
|
+
className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
|
|
1215
|
+
ref
|
|
1216
|
+
})
|
|
1217
|
+
});
|
|
1218
|
+
}), componentName = getDisplayName(Component);
|
|
1219
|
+
return WithProvider.displayName = `withProvider(${componentName})`, WithProvider;
|
|
1220
|
+
},
|
|
1221
|
+
withContext: (Component, slot, options) => {
|
|
1222
|
+
const StyledComponent = styled(Component, {}, options), componentName = getDisplayName(Component), WithContext = forwardRef((props, ref) => {
|
|
1223
|
+
const slotStyles = useStyleContext(componentName, slot), propsWithClass = { ...props, className: props.className ?? options?.defaultProps?.className }, resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot]);
|
|
1224
|
+
return createElement(StyledComponent, {
|
|
1225
|
+
...resolvedProps,
|
|
1226
|
+
className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
|
|
1227
|
+
ref
|
|
1228
|
+
});
|
|
1229
|
+
});
|
|
1230
|
+
return WithContext.displayName = `withContext(${componentName})`, WithContext;
|
|
1231
|
+
}
|
|
1232
|
+
};
|
|
1233
|
+
}
|
|
1234
|
+
const boxConfig = {
|
|
1171
1235
|
transform(props) {
|
|
1172
1236
|
return props;
|
|
1173
1237
|
}
|
|
@@ -1232,8 +1296,8 @@ const HStack = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
|
1232
1296
|
}, getContainerStyle = (styles = {}) => {
|
|
1233
1297
|
const _styles = getPatternStyles(containerConfig, styles);
|
|
1234
1298
|
return containerConfig.transform(_styles, patternFns);
|
|
1235
|
-
}, container$
|
|
1236
|
-
container$
|
|
1299
|
+
}, container$3 = (styles) => css(getContainerStyle(styles));
|
|
1300
|
+
container$3.raw = getContainerStyle;
|
|
1237
1301
|
const bleedConfig = {
|
|
1238
1302
|
transform(props, { map, isCssUnit: isCssUnit2, isCssVar: isCssVar2 }) {
|
|
1239
1303
|
const { inline, block, ...rest } = props, valueFn = (v) => isCssUnit2(v) || isCssVar2(v) ? v : `token(spacing.${v}, ${v})`;
|
|
@@ -1685,7 +1749,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1685
1749
|
return system.get("diagram");
|
|
1686
1750
|
}, getDiagramContext = function(system) {
|
|
1687
1751
|
return system.get("diagram").getSnapshot().context;
|
|
1688
|
-
}, raiseSync = () => machine$
|
|
1752
|
+
}, raiseSync = () => machine$4.raise({ type: "sync" }, { delay: 200, id: "sync" }), cancelSync = () => machine$4.cancel("sync"), reschedule = (delay2 = 50) => machine$4.raise(({ event }) => event, { delay: delay2 }), isLayoutChange = (change) => change.op === "reset-manual-layout" || change.op === "save-view-snapshot", withoutSnapshotChanges = n$2(e$4(isLayoutChange)), saveStateBeforeEdit = () => machine$4.assign(({ system }) => {
|
|
1689
1753
|
const parentContext = getDiagramContext(system);
|
|
1690
1754
|
return {
|
|
1691
1755
|
beforeEditing: {
|
|
@@ -1709,11 +1773,11 @@ const diagramActorRef$1 = function(system) {
|
|
|
1709
1773
|
synched: !1
|
|
1710
1774
|
}
|
|
1711
1775
|
};
|
|
1712
|
-
}), startEditing$1 = () => machine$
|
|
1776
|
+
}), startEditing$1 = () => machine$4.enqueueActions(({ enqueue, event }) => {
|
|
1713
1777
|
enqueue(saveStateBeforeEdit()), event.type === "edit.start" && enqueue.assign({
|
|
1714
1778
|
editing: event.subject
|
|
1715
1779
|
});
|
|
1716
|
-
}), stopHotkey = () => machine$
|
|
1780
|
+
}), stopHotkey = () => machine$4.stopChild("hotkey"), ensureHotKey = () => machine$4.enqueueActions(({ check, enqueue, self }) => {
|
|
1717
1781
|
const hasUndo = check("can undo"), hotkey = self.getSnapshot().children.hotkey;
|
|
1718
1782
|
if (!hasUndo && hotkey) {
|
|
1719
1783
|
enqueue.stopChild(hotkey);
|
|
@@ -1722,7 +1786,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1722
1786
|
hasUndo && !hotkey && enqueue.spawnChild("hotkey", {
|
|
1723
1787
|
id: "hotkey"
|
|
1724
1788
|
});
|
|
1725
|
-
}), pushHistory = () => machine$
|
|
1789
|
+
}), pushHistory = () => machine$4.assign(({ context: context2 }) => {
|
|
1726
1790
|
const snapshot = context2.beforeEditing;
|
|
1727
1791
|
return snapshot ? {
|
|
1728
1792
|
beforeEditing: null,
|
|
@@ -1734,7 +1798,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1734
1798
|
} : {
|
|
1735
1799
|
editing: null
|
|
1736
1800
|
};
|
|
1737
|
-
}), stopEditing$1 = () => machine$
|
|
1801
|
+
}), stopEditing$1 = () => machine$4.enqueueActions(({ event, enqueue }) => {
|
|
1738
1802
|
if (event.type === "edit.finish" && event.wasChanged) {
|
|
1739
1803
|
enqueue(pushHistory()), enqueue(raiseSync());
|
|
1740
1804
|
return;
|
|
@@ -1743,7 +1807,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1743
1807
|
beforeEditing: null,
|
|
1744
1808
|
editing: null
|
|
1745
1809
|
});
|
|
1746
|
-
}), markHistoryAsSynched = () => machine$
|
|
1810
|
+
}), markHistoryAsSynched = () => machine$4.assign(({ context: context2 }) => ({
|
|
1747
1811
|
beforeEditing: context2.beforeEditing && context2.beforeEditing.synched === !1 ? {
|
|
1748
1812
|
...context2.beforeEditing,
|
|
1749
1813
|
synched: !0
|
|
@@ -1752,11 +1816,11 @@ const diagramActorRef$1 = function(system) {
|
|
|
1752
1816
|
...i,
|
|
1753
1817
|
synched: !0
|
|
1754
1818
|
}))
|
|
1755
|
-
})), popHistory = () => machine$
|
|
1819
|
+
})), popHistory = () => machine$4.assign(({ context: context2 }) => context2.history.length <= 1 ? {
|
|
1756
1820
|
history: []
|
|
1757
1821
|
} : {
|
|
1758
1822
|
history: context2.history.slice(0, context2.history.length - 1)
|
|
1759
|
-
}), undo = () => machine$
|
|
1823
|
+
}), undo = () => machine$4.enqueueActions(({ context: context2, enqueue, system }) => {
|
|
1760
1824
|
const lastHistoryItem = t$b(context2.history);
|
|
1761
1825
|
if (!lastHistoryItem)
|
|
1762
1826
|
return;
|
|
@@ -1771,7 +1835,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1771
1835
|
}), enqueue.assign({
|
|
1772
1836
|
pendingChanges: []
|
|
1773
1837
|
}), lastHistoryItem.synched ? enqueue.raise({ type: "change", change: lastHistoryItem.change }, { delay: 50 }) : enqueue(raiseSync());
|
|
1774
|
-
}), addSnapshotToPendingChanges = () => machine$
|
|
1838
|
+
}), addSnapshotToPendingChanges = () => machine$4.assign(({ context: context2, system }) => {
|
|
1775
1839
|
const parentContext = getDiagramContext(system), change = createViewChange(parentContext);
|
|
1776
1840
|
return {
|
|
1777
1841
|
pendingChanges: [
|
|
@@ -1801,7 +1865,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1801
1865
|
}
|
|
1802
1866
|
), diagramActorRef = function(params) {
|
|
1803
1867
|
return params.system.get("diagram");
|
|
1804
|
-
}, machine$
|
|
1868
|
+
}, machine$4 = setup({
|
|
1805
1869
|
delays: {
|
|
1806
1870
|
"350ms": 350,
|
|
1807
1871
|
waitBeforeSync: 2e3
|
|
@@ -1822,7 +1886,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1822
1886
|
pending: { target: "#pending" },
|
|
1823
1887
|
applyLatestToManual: { target: "#applyLatestToManual" },
|
|
1824
1888
|
executeChanges: { target: "#executeChanges" }
|
|
1825
|
-
}, idle$1 = machine$
|
|
1889
|
+
}, idle$1 = machine$4.createStateConfig({
|
|
1826
1890
|
id: "idle",
|
|
1827
1891
|
on: {
|
|
1828
1892
|
sync: {
|
|
@@ -1832,7 +1896,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1832
1896
|
...to.editing
|
|
1833
1897
|
}
|
|
1834
1898
|
}
|
|
1835
|
-
}), editing = machine$
|
|
1899
|
+
}), editing = machine$4.createStateConfig({
|
|
1836
1900
|
id: "editing",
|
|
1837
1901
|
tags: "pending",
|
|
1838
1902
|
entry: [
|
|
@@ -1853,7 +1917,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1853
1917
|
...to.idle
|
|
1854
1918
|
}
|
|
1855
1919
|
}
|
|
1856
|
-
}), pending = machine$
|
|
1920
|
+
}), pending = machine$4.createStateConfig({
|
|
1857
1921
|
id: "pending",
|
|
1858
1922
|
tags: ["pending"],
|
|
1859
1923
|
entry: ensureHotKey(),
|
|
@@ -1878,13 +1942,13 @@ const diagramActorRef$1 = function(system) {
|
|
|
1878
1942
|
...to.executeChanges
|
|
1879
1943
|
}
|
|
1880
1944
|
}
|
|
1881
|
-
}), afterEdit = machine$
|
|
1945
|
+
}), afterEdit = machine$4.createStateConfig({
|
|
1882
1946
|
id: "afterEdit",
|
|
1883
1947
|
always: [
|
|
1884
1948
|
{ guard: "has pending", ...to.pending },
|
|
1885
1949
|
{ ...to.idle }
|
|
1886
1950
|
]
|
|
1887
|
-
}), applyLatestToManual = machine$
|
|
1951
|
+
}), applyLatestToManual = machine$4.createStateConfig({
|
|
1888
1952
|
id: "applyLatestToManual",
|
|
1889
1953
|
entry: [
|
|
1890
1954
|
cancelSync(),
|
|
@@ -1952,7 +2016,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
1952
2016
|
}
|
|
1953
2017
|
}
|
|
1954
2018
|
}
|
|
1955
|
-
}), executeChanges = machine$
|
|
2019
|
+
}), executeChanges = machine$4.createStateConfig({
|
|
1956
2020
|
id: "executeChanges",
|
|
1957
2021
|
entry: [
|
|
1958
2022
|
assign(({ event, context: context2 }) => {
|
|
@@ -2009,7 +2073,7 @@ const diagramActorRef$1 = function(system) {
|
|
|
2009
2073
|
actions: reschedule()
|
|
2010
2074
|
}
|
|
2011
2075
|
}
|
|
2012
|
-
}), _editorActorLogic = machine$
|
|
2076
|
+
}), _editorActorLogic = machine$4.createMachine({
|
|
2013
2077
|
id: "editor",
|
|
2014
2078
|
context: ({ input: input2 }) => ({
|
|
2015
2079
|
viewId: input2.viewId,
|
|
@@ -2822,7 +2886,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
2822
2886
|
return updateXYData();
|
|
2823
2887
|
const duration = 300;
|
|
2824
2888
|
return xyflow2.setCenter(currentSubjectCenter.x, currentSubjectCenter.y, { zoom, duration, interpolate: "smooth" }), await delay(duration), await xyflow2.setCenter(nextSubjectCenter.x, nextSubjectCenter.y, { zoom }), updateXYData();
|
|
2825
|
-
}), machine$
|
|
2889
|
+
}), machine$3 = setup({
|
|
2826
2890
|
actors: {
|
|
2827
2891
|
layouter
|
|
2828
2892
|
},
|
|
@@ -2831,13 +2895,13 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
2831
2895
|
isReady: ({ context: context2 }) => context2.xyflow !== null && context2.xystore !== null && context2.layouted !== null,
|
|
2832
2896
|
anotherSubject: ({ context: context2, event }) => event.type === "update.view" ? context2.layouted?.subject !== event.layouted.subject : !1
|
|
2833
2897
|
}
|
|
2834
|
-
}), xyflowInit = () => machine$
|
|
2898
|
+
}), xyflowInit = () => machine$3.assign(({ event }) => (assertEvent(event, "xyflow.init"), {
|
|
2835
2899
|
xyflow: event.instance,
|
|
2836
2900
|
xystore: event.store
|
|
2837
|
-
})), updateView$
|
|
2901
|
+
})), updateView$2 = () => machine$3.assign(({ event }) => (assertEvent(event, "update.view"), {
|
|
2838
2902
|
layouted: event.layouted,
|
|
2839
2903
|
...viewToNodesEdge(event.layouted)
|
|
2840
|
-
})), xyflowUpdateNodeInternals = () => machine$
|
|
2904
|
+
})), xyflowUpdateNodeInternals = () => machine$3.createAction(({ context: context2 }) => {
|
|
2841
2905
|
invariant(context2.xystore, "xystore is not initialized");
|
|
2842
2906
|
const { domNode, updateNodeInternals } = context2.xystore.getState(), nodeIds = new Set(context2.xyedges.flatMap((e2) => [e2.source, e2.target]));
|
|
2843
2907
|
if (nodeIds.size === 0 || !domNode)
|
|
@@ -2848,7 +2912,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
2848
2912
|
nodeId && nodeIds.has(nodeId) && updates.set(nodeId, { id: nodeId, nodeElement, force: !0 });
|
|
2849
2913
|
}
|
|
2850
2914
|
updateNodeInternals(updates, { triggerFitView: !1 });
|
|
2851
|
-
}), xyflowFitDiagram = (params) => machine$
|
|
2915
|
+
}), xyflowFitDiagram = (params) => machine$3.createAction(({ context: context2, event }) => {
|
|
2852
2916
|
params ??= event.type === "fitDiagram" ? event : {};
|
|
2853
2917
|
let { duration, bounds } = params ?? {};
|
|
2854
2918
|
duration ??= 450;
|
|
@@ -2867,22 +2931,22 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
2867
2931
|
padding: ViewPadding$1,
|
|
2868
2932
|
...duration > 0 && { duration, interpolate: "smooth" }
|
|
2869
2933
|
}).catch(console.error);
|
|
2870
|
-
}), xyflowApplyNodeChanges = () => machine$
|
|
2934
|
+
}), xyflowApplyNodeChanges$1 = () => machine$3.assign(({ context: context2, event }) => (assertEvent(event, "xyflow.applyNodeChanges"), {
|
|
2871
2935
|
xynodes: applyNodeChanges(event.changes, context2.xynodes)
|
|
2872
|
-
})), xyflowApplyEdgeChanges = () => machine$
|
|
2936
|
+
})), xyflowApplyEdgeChanges$1 = () => machine$3.assign(({ context: context2, event }) => (assertEvent(event, "xyflow.applyEdgeChanges"), {
|
|
2873
2937
|
xyedges: applyEdgeChanges(event.changes, context2.xyedges)
|
|
2874
|
-
})), openRelationshipSource = () => machine$
|
|
2938
|
+
})), openRelationshipSource = () => machine$3.enqueueActions(({ system, event }) => {
|
|
2875
2939
|
if (event.type !== "xyflow.edgeClick")
|
|
2876
2940
|
return;
|
|
2877
2941
|
const diagramActor = typedSystem(system).diagramActorRef, relations = event.edge.data.relations;
|
|
2878
2942
|
t$1(relations, 1) && diagramActor.send({ type: "open.source", relation: relations[0] });
|
|
2879
|
-
}), dispose = () => machine$
|
|
2943
|
+
}), dispose$1 = () => machine$3.assign({
|
|
2880
2944
|
xyflow: null,
|
|
2881
2945
|
layouted: null,
|
|
2882
2946
|
xystore: null,
|
|
2883
2947
|
xyedges: [],
|
|
2884
2948
|
xynodes: []
|
|
2885
|
-
}), _relationshipsBrowserLogic = machine$
|
|
2949
|
+
}), _relationshipsBrowserLogic = machine$3.createMachine({
|
|
2886
2950
|
id: "relationships-browser",
|
|
2887
2951
|
context: ({ input: input2 }) => ({
|
|
2888
2952
|
subject: input2.subject,
|
|
@@ -2901,10 +2965,10 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
2901
2965
|
initial: "initializing",
|
|
2902
2966
|
on: {
|
|
2903
2967
|
"xyflow.applyNodeChanges": {
|
|
2904
|
-
actions: xyflowApplyNodeChanges()
|
|
2968
|
+
actions: xyflowApplyNodeChanges$1()
|
|
2905
2969
|
},
|
|
2906
2970
|
"xyflow.applyEdgeChanges": {
|
|
2907
|
-
actions: xyflowApplyEdgeChanges()
|
|
2971
|
+
actions: xyflowApplyEdgeChanges$1()
|
|
2908
2972
|
}
|
|
2909
2973
|
},
|
|
2910
2974
|
states: {
|
|
@@ -2915,7 +2979,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
2915
2979
|
target: "isReady"
|
|
2916
2980
|
},
|
|
2917
2981
|
"update.view": {
|
|
2918
|
-
actions: updateView$
|
|
2982
|
+
actions: updateView$2(),
|
|
2919
2983
|
target: "isReady"
|
|
2920
2984
|
},
|
|
2921
2985
|
stop: "closed",
|
|
@@ -2979,7 +3043,7 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
2979
3043
|
actions: xyflowFitDiagram()
|
|
2980
3044
|
},
|
|
2981
3045
|
"update.view": {
|
|
2982
|
-
actions: updateView$
|
|
3046
|
+
actions: updateView$2(),
|
|
2983
3047
|
target: ".layouting"
|
|
2984
3048
|
},
|
|
2985
3049
|
"change.scope": {
|
|
@@ -3098,10 +3162,10 @@ const findRootSubject = (nodes) => nodes.find(
|
|
|
3098
3162
|
closed: {
|
|
3099
3163
|
id: "closed",
|
|
3100
3164
|
type: "final",
|
|
3101
|
-
entry: dispose()
|
|
3165
|
+
entry: dispose$1()
|
|
3102
3166
|
}
|
|
3103
3167
|
},
|
|
3104
|
-
exit: dispose()
|
|
3168
|
+
exit: dispose$1()
|
|
3105
3169
|
}), relationshipsBrowserLogic = _relationshipsBrowserLogic, _elementDetailsLogic = setup({
|
|
3106
3170
|
actors: {
|
|
3107
3171
|
relationshipsBrowserLogic
|
|
@@ -3180,53 +3244,46 @@ function layoutResultToXYFlow(layout) {
|
|
|
3180
3244
|
parentId: parent.id
|
|
3181
3245
|
}
|
|
3182
3246
|
}, fqn2 = node2.modelRef, navigateTo = { navigateTo: node2.navigateTo ?? null };
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
...navigateTo
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
);
|
|
3203
|
-
break;
|
|
3247
|
+
!0 === isCompound ? xynodes.push(
|
|
3248
|
+
{
|
|
3249
|
+
...base,
|
|
3250
|
+
type: "compound",
|
|
3251
|
+
data: {
|
|
3252
|
+
id,
|
|
3253
|
+
column: node2.column,
|
|
3254
|
+
title: node2.title,
|
|
3255
|
+
color: node2.color,
|
|
3256
|
+
style: node2.style,
|
|
3257
|
+
depth: node2.depth ?? 0,
|
|
3258
|
+
icon: node2.icon ?? "none",
|
|
3259
|
+
ports: node2.ports,
|
|
3260
|
+
fqn: fqn2,
|
|
3261
|
+
...navigateTo
|
|
3262
|
+
}
|
|
3204
3263
|
}
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
);
|
|
3229
|
-
}
|
|
3264
|
+
) : xynodes.push(
|
|
3265
|
+
{
|
|
3266
|
+
...base,
|
|
3267
|
+
type: "element",
|
|
3268
|
+
data: {
|
|
3269
|
+
id,
|
|
3270
|
+
column: node2.column,
|
|
3271
|
+
fqn: fqn2,
|
|
3272
|
+
title: node2.title,
|
|
3273
|
+
technology: node2.technology,
|
|
3274
|
+
description: node2.description ?? null,
|
|
3275
|
+
height: node2.height,
|
|
3276
|
+
width: node2.width,
|
|
3277
|
+
color: node2.color,
|
|
3278
|
+
shape: node2.shape,
|
|
3279
|
+
icon: node2.icon ?? "none",
|
|
3280
|
+
ports: node2.ports,
|
|
3281
|
+
style: node2.style,
|
|
3282
|
+
tags: node2.tags,
|
|
3283
|
+
...navigateTo
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
);
|
|
3230
3287
|
}
|
|
3231
3288
|
for (const {
|
|
3232
3289
|
source,
|
|
@@ -3521,7 +3578,7 @@ const ViewPadding = {
|
|
|
3521
3578
|
return document.body.addEventListener("keydown", handler, { capture: !0 }), () => {
|
|
3522
3579
|
document.body.removeEventListener("keydown", handler, { capture: !0 });
|
|
3523
3580
|
};
|
|
3524
|
-
}), machine$
|
|
3581
|
+
}), machine$2 = setup({
|
|
3525
3582
|
actors: {
|
|
3526
3583
|
relationshipDetails: relationshipDetailsLogic,
|
|
3527
3584
|
elementDetails: elementDetailsLogic,
|
|
@@ -3534,14 +3591,14 @@ const ViewPadding = {
|
|
|
3534
3591
|
"last: is relationshipDetails?": ({ context: context2 }) => t$b(context2.overlays)?.type === "relationshipDetails",
|
|
3535
3592
|
"last: is relationshipsBrowser?": ({ context: context2 }) => t$b(context2.overlays)?.type === "relationshipsBrowser"
|
|
3536
3593
|
}
|
|
3537
|
-
}), closeLastOverlay = () => machine$
|
|
3594
|
+
}), closeLastOverlay = () => machine$2.enqueueActions(({ context: context2, enqueue }) => {
|
|
3538
3595
|
if (context2.overlays.length === 0)
|
|
3539
3596
|
return;
|
|
3540
3597
|
const lastOverlay = t$b(context2.overlays)?.id;
|
|
3541
3598
|
lastOverlay && (enqueue.sendTo(lastOverlay, { type: "close" }), enqueue.stopChild(lastOverlay), enqueue.assign({
|
|
3542
3599
|
overlays: context2.overlays.filter((o) => o.id !== lastOverlay)
|
|
3543
3600
|
}));
|
|
3544
|
-
}), closeSpecificOverlay = () => machine$
|
|
3601
|
+
}), closeSpecificOverlay = () => machine$2.enqueueActions(({ context: context2, enqueue, event }) => {
|
|
3545
3602
|
assertEvent(event, "close");
|
|
3546
3603
|
const actorId = event.actorId;
|
|
3547
3604
|
if (!e$7(actorId))
|
|
@@ -3550,11 +3607,11 @@ const ViewPadding = {
|
|
|
3550
3607
|
toClose && (enqueue.sendTo(toClose, { type: "close" }), enqueue.stopChild(toClose), enqueue.assign({
|
|
3551
3608
|
overlays: context2.overlays.filter((o) => o.id !== toClose)
|
|
3552
3609
|
}));
|
|
3553
|
-
}), closeAllOverlays$1 = () => machine$
|
|
3610
|
+
}), closeAllOverlays$1 = () => machine$2.enqueueActions(({ context: context2, enqueue }) => {
|
|
3554
3611
|
for (const { id } of t$j(context2.overlays))
|
|
3555
3612
|
enqueue.sendTo(id, { type: "close" }), enqueue.stopChild(id);
|
|
3556
3613
|
enqueue.assign({ overlays: [] });
|
|
3557
|
-
}), openElementDetails$1 = () => machine$
|
|
3614
|
+
}), openElementDetails$1 = () => machine$2.enqueueActions(({ context: context2, enqueue, event }) => {
|
|
3558
3615
|
if (assertEvent(event, "open.elementDetails"), context2.overlays.some((o) => o.type === "elementDetails" && o.subject === event.subject))
|
|
3559
3616
|
return;
|
|
3560
3617
|
const id = `elementDetails-${context2.seq}`;
|
|
@@ -3573,7 +3630,7 @@ const ViewPadding = {
|
|
|
3573
3630
|
}
|
|
3574
3631
|
]
|
|
3575
3632
|
});
|
|
3576
|
-
}), openRelationshipDetails = () => machine$
|
|
3633
|
+
}), openRelationshipDetails = () => machine$2.enqueueActions(({ context: context2, enqueue, event }) => {
|
|
3577
3634
|
assertEvent(event, "open.relationshipDetails");
|
|
3578
3635
|
const currentOverlay = t$b(context2.overlays);
|
|
3579
3636
|
if (currentOverlay?.type === "relationshipDetails") {
|
|
@@ -3598,7 +3655,7 @@ const ViewPadding = {
|
|
|
3598
3655
|
}
|
|
3599
3656
|
]
|
|
3600
3657
|
});
|
|
3601
|
-
}), openRelationshipsBrowser = () => machine$
|
|
3658
|
+
}), openRelationshipsBrowser = () => machine$2.enqueueActions(({ context: context2, enqueue, event }) => {
|
|
3602
3659
|
assertEvent(event, "open.relationshipsBrowser");
|
|
3603
3660
|
const currentOverlay = t$b(context2.overlays);
|
|
3604
3661
|
if (currentOverlay?.type === "relationshipsBrowser") {
|
|
@@ -3625,7 +3682,7 @@ const ViewPadding = {
|
|
|
3625
3682
|
}
|
|
3626
3683
|
]
|
|
3627
3684
|
});
|
|
3628
|
-
}), openOverlay$1 = () => machine$
|
|
3685
|
+
}), openOverlay$1 = () => machine$2.enqueueActions(({ enqueue, event }) => {
|
|
3629
3686
|
switch (assertEvent(event, [
|
|
3630
3687
|
"open.elementDetails",
|
|
3631
3688
|
"open.relationshipDetails",
|
|
@@ -3641,11 +3698,11 @@ const ViewPadding = {
|
|
|
3641
3698
|
enqueue(openRelationshipsBrowser());
|
|
3642
3699
|
break;
|
|
3643
3700
|
}
|
|
3644
|
-
}), listenToEsc = () => machine$
|
|
3701
|
+
}), listenToEsc = () => machine$2.spawnChild("hotkey", {
|
|
3645
3702
|
id: "hotkey"
|
|
3646
|
-
}), stopListeningToEsc = () => machine$
|
|
3703
|
+
}), stopListeningToEsc = () => machine$2.stopChild("hotkey"), checkState = () => machine$2.enqueueActions(({ enqueue, context: context2 }) => {
|
|
3647
3704
|
context2.overlays.length === 0 && enqueue.raise({ type: "close" });
|
|
3648
|
-
}), _overlaysActorLogic = machine$
|
|
3705
|
+
}), _overlaysActorLogic = machine$2.createMachine({
|
|
3649
3706
|
id: "overlays",
|
|
3650
3707
|
context: () => ({
|
|
3651
3708
|
seq: 1,
|
|
@@ -3817,7 +3874,7 @@ const ViewPadding = {
|
|
|
3817
3874
|
enableCompareWithLatest,
|
|
3818
3875
|
enableReadOnly
|
|
3819
3876
|
};
|
|
3820
|
-
}, isReadOnly = (context2) => deriveToggledFeatures(context2).enableReadOnly, machine = setup({
|
|
3877
|
+
}, isReadOnly = (context2) => deriveToggledFeatures(context2).enableReadOnly, machine$1 = setup({
|
|
3821
3878
|
actors: {
|
|
3822
3879
|
hotkeyActorLogic,
|
|
3823
3880
|
overlaysActorLogic,
|
|
@@ -4094,7 +4151,7 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
|
4094
4151
|
"middlePoint",
|
|
4095
4152
|
"likec4-edge__middlePoint"
|
|
4096
4153
|
]
|
|
4097
|
-
], edgePathSlotFns = /* @__PURE__ */ edgePathSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, edgePathDefaultVariants, getSlotCompoundVariant(edgePathCompoundVariants, slotName))]), edgePathFn = memo((props = {}) => Object.fromEntries(edgePathSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))), edgePathVariantKeys = [], getVariantProps$
|
|
4154
|
+
], edgePathSlotFns = /* @__PURE__ */ edgePathSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, edgePathDefaultVariants, getSlotCompoundVariant(edgePathCompoundVariants, slotName))]), edgePathFn = memo((props = {}) => Object.fromEntries(edgePathSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))), edgePathVariantKeys = [], getVariantProps$2 = (variants) => ({ ...edgePathDefaultVariants, ...compact(variants) }), edgePath = /* @__PURE__ */ Object.assign(edgePathFn, {
|
|
4098
4155
|
__recipe__: !1,
|
|
4099
4156
|
__name__: "edgePath",
|
|
4100
4157
|
raw: (props) => props,
|
|
@@ -4104,7 +4161,21 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
|
4104
4161
|
splitVariantProps(props) {
|
|
4105
4162
|
return splitProps(props, edgePathVariantKeys);
|
|
4106
4163
|
},
|
|
4107
|
-
getVariantProps: getVariantProps$
|
|
4164
|
+
getVariantProps: getVariantProps$2
|
|
4165
|
+
}), elementNodeFn = /* @__PURE__ */ createRecipe("likec4-element-node", {}, []), elementNodeVariantMap = {}, elementNodeVariantKeys = Object.keys(elementNodeVariantMap), elementNode = /* @__PURE__ */ Object.assign(memo(elementNodeFn.recipeFn), {
|
|
4166
|
+
__recipe__: !0,
|
|
4167
|
+
__name__: "elementNode",
|
|
4168
|
+
__getCompoundVariantCss__: elementNodeFn.__getCompoundVariantCss__,
|
|
4169
|
+
raw: (props) => props,
|
|
4170
|
+
variantKeys: elementNodeVariantKeys,
|
|
4171
|
+
variantMap: elementNodeVariantMap,
|
|
4172
|
+
merge(recipe) {
|
|
4173
|
+
return mergeRecipes(this, recipe);
|
|
4174
|
+
},
|
|
4175
|
+
splitVariantProps(props) {
|
|
4176
|
+
return splitProps(props, elementNodeVariantKeys);
|
|
4177
|
+
},
|
|
4178
|
+
getVariantProps: elementNodeFn.getVariantProps
|
|
4108
4179
|
}), elementNodeDataFn = /* @__PURE__ */ createRecipe("likec4-element-node-data", {}, []), elementNodeDataVariantMap = {}, elementNodeDataVariantKeys = Object.keys(elementNodeDataVariantMap), elementNodeData = /* @__PURE__ */ Object.assign(memo(elementNodeDataFn.recipeFn), {
|
|
4109
4180
|
__recipe__: !0,
|
|
4110
4181
|
__name__: "elementNodeData",
|
|
@@ -4119,10 +4190,32 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
|
4119
4190
|
return splitProps(props, elementNodeDataVariantKeys);
|
|
4120
4191
|
},
|
|
4121
4192
|
getVariantProps: elementNodeDataFn.getVariantProps
|
|
4122
|
-
}), elementShapeRecipeFn = /* @__PURE__ */ createRecipe("likec4-element-shape", {
|
|
4193
|
+
}), elementShapeRecipeFn = /* @__PURE__ */ createRecipe("likec4-element-shape", {
|
|
4194
|
+
withBorder: !1
|
|
4195
|
+
}, [
|
|
4196
|
+
{
|
|
4197
|
+
shapetype: "html",
|
|
4198
|
+
withBorder: !0,
|
|
4199
|
+
css: {
|
|
4200
|
+
"&": {
|
|
4201
|
+
borderStyle: "solid",
|
|
4202
|
+
borderWidth: "3px",
|
|
4203
|
+
borderColor: "var(--likec4-palette-stroke)",
|
|
4204
|
+
"--likec4-outline-size": "6px"
|
|
4205
|
+
},
|
|
4206
|
+
"& .likec4-shape-outline": {
|
|
4207
|
+
borderRadius: "10px"
|
|
4208
|
+
}
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
]), elementShapeRecipeVariantMap = {
|
|
4123
4212
|
shapetype: [
|
|
4124
4213
|
"html",
|
|
4125
4214
|
"svg"
|
|
4215
|
+
],
|
|
4216
|
+
withBorder: [
|
|
4217
|
+
"true",
|
|
4218
|
+
"false"
|
|
4126
4219
|
]
|
|
4127
4220
|
}, elementShapeRecipeVariantKeys = Object.keys(elementShapeRecipeVariantMap), elementShapeRecipe = /* @__PURE__ */ Object.assign(memo(elementShapeRecipeFn.recipeFn), {
|
|
4128
4221
|
__recipe__: !0,
|
|
@@ -4273,7 +4366,7 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
|
4273
4366
|
]
|
|
4274
4367
|
], navigationLinkSlotFns = /* @__PURE__ */ navigationLinkSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, navigationLinkDefaultVariants, getSlotCompoundVariant(navigationLinkCompoundVariants, slotName))]), navigationLinkFn = memo((props = {}) => Object.fromEntries(navigationLinkSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))), navigationLinkVariantKeys = [
|
|
4275
4368
|
"truncateLabel"
|
|
4276
|
-
], getVariantProps = (variants) => ({ ...navigationLinkDefaultVariants, ...compact(variants) }), navigationLink = /* @__PURE__ */ Object.assign(navigationLinkFn, {
|
|
4369
|
+
], getVariantProps$1 = (variants) => ({ ...navigationLinkDefaultVariants, ...compact(variants) }), navigationLink = /* @__PURE__ */ Object.assign(navigationLinkFn, {
|
|
4277
4370
|
__recipe__: !1,
|
|
4278
4371
|
__name__: "navigationLink",
|
|
4279
4372
|
raw: (props) => props,
|
|
@@ -4288,6 +4381,47 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
|
4288
4381
|
splitVariantProps(props) {
|
|
4289
4382
|
return splitProps(props, navigationLinkVariantKeys);
|
|
4290
4383
|
},
|
|
4384
|
+
getVariantProps: getVariantProps$1
|
|
4385
|
+
}), navigationPanelDefaultVariants = {
|
|
4386
|
+
size: "md"
|
|
4387
|
+
}, navigationPanelCompoundVariants = [], navigationPanelSlotNames = [
|
|
4388
|
+
[
|
|
4389
|
+
"root",
|
|
4390
|
+
"likec4-navigation-panel__root"
|
|
4391
|
+
],
|
|
4392
|
+
[
|
|
4393
|
+
"body",
|
|
4394
|
+
"likec4-navigation-panel__body"
|
|
4395
|
+
],
|
|
4396
|
+
[
|
|
4397
|
+
"logo",
|
|
4398
|
+
"likec4-navigation-panel__logo"
|
|
4399
|
+
],
|
|
4400
|
+
[
|
|
4401
|
+
"label",
|
|
4402
|
+
"likec4-navigation-panel__label"
|
|
4403
|
+
],
|
|
4404
|
+
[
|
|
4405
|
+
"dropdown",
|
|
4406
|
+
"likec4-navigation-panel__dropdown"
|
|
4407
|
+
]
|
|
4408
|
+
], navigationPanelSlotFns = /* @__PURE__ */ navigationPanelSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, navigationPanelDefaultVariants, getSlotCompoundVariant(navigationPanelCompoundVariants, slotName))]), navigationPanelFn = memo((props = {}) => Object.fromEntries(navigationPanelSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))), navigationPanelVariantKeys = [
|
|
4409
|
+
"size"
|
|
4410
|
+
], getVariantProps = (variants) => ({ ...navigationPanelDefaultVariants, ...compact(variants) }), navigationPanel = /* @__PURE__ */ Object.assign(navigationPanelFn, {
|
|
4411
|
+
__recipe__: !1,
|
|
4412
|
+
__name__: "navigationPanel",
|
|
4413
|
+
raw: (props) => props,
|
|
4414
|
+
classNameMap: {},
|
|
4415
|
+
variantKeys: navigationPanelVariantKeys,
|
|
4416
|
+
variantMap: {
|
|
4417
|
+
size: [
|
|
4418
|
+
"md",
|
|
4419
|
+
"lg"
|
|
4420
|
+
]
|
|
4421
|
+
},
|
|
4422
|
+
splitVariantProps(props) {
|
|
4423
|
+
return splitProps(props, navigationPanelVariantKeys);
|
|
4424
|
+
},
|
|
4291
4425
|
getVariantProps
|
|
4292
4426
|
}), Tooltip$5 = Tooltip$6.withProps({
|
|
4293
4427
|
color: "dark",
|
|
@@ -4620,7 +4754,7 @@ const autolayoutButton = css({
|
|
|
4620
4754
|
borderColor: "mantine.colors.gray[5]",
|
|
4621
4755
|
borderRadius: 3,
|
|
4622
4756
|
transform: "translate(-50%, -50%)"
|
|
4623
|
-
}), selector$
|
|
4757
|
+
}), selector$7 = (state) => ({
|
|
4624
4758
|
viewId: state.view.id,
|
|
4625
4759
|
isManualLayout: state.view._layout === "manual",
|
|
4626
4760
|
autoLayout: state.view.autoLayout
|
|
@@ -4629,7 +4763,7 @@ const autolayoutButton = css({
|
|
|
4629
4763
|
autoLayout,
|
|
4630
4764
|
viewId,
|
|
4631
4765
|
isManualLayout
|
|
4632
|
-
} = useDiagramContext(selector$
|
|
4766
|
+
} = useDiagramContext(selector$7), { ref, hovered: isSpacingHovered } = useHover(), setControlRef = (name) => (node2) => {
|
|
4633
4767
|
controlsRefs[name] = node2, setControlsRefs(controlsRefs);
|
|
4634
4768
|
}, setAutoLayout = (direction) => (event) => {
|
|
4635
4769
|
event.stopPropagation(), diagram.fitDiagram(), diagram.triggerChange({
|
|
@@ -4944,92 +5078,7 @@ function useNavigationActor() {
|
|
|
4944
5078
|
closeDropdown: () => actorRef.send({ type: "dropdown.dismiss" })
|
|
4945
5079
|
}), [actorRef]);
|
|
4946
5080
|
}
|
|
4947
|
-
const
|
|
4948
|
-
(props, ref) => /* @__PURE__ */ jsxs("svg", { ref, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 222 56", ...props, children: [
|
|
4949
|
-
/* @__PURE__ */ jsx(
|
|
4950
|
-
"path",
|
|
4951
|
-
{
|
|
4952
|
-
fill: "#5E98AF",
|
|
4953
|
-
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
4954
|
-
}
|
|
4955
|
-
),
|
|
4956
|
-
/* @__PURE__ */ jsx(
|
|
4957
|
-
"path",
|
|
4958
|
-
{
|
|
4959
|
-
className: css({
|
|
4960
|
-
fill: "[#FCFBF7]",
|
|
4961
|
-
_light: {
|
|
4962
|
-
fill: "[#222221]"
|
|
4963
|
-
}
|
|
4964
|
-
}),
|
|
4965
|
-
d: "M71.61 12.08c-.06 3.61.3 29.95.23 31.87 0 1.8 0 3.6.06 5.41 0 .3.18.58.47.58 4.1.18 8.13-.17 12.22-.11 1.34.05 2.69 0 3.97 0 1.29-.06 1.4-.59 1.35-1.63-.06-1.63-.06-3.08-.06-4.65-.06-.82-.53-1.11-1.23-1.11-2.4.06-4.8-.06-7.19.06-.4.06-.82.06-1.23.06-.7-.06-.87-.24-.93-1v-.86c-.18-4.83.17-9.83.17-14.66-.06-4.07 0-7.73-.06-11.34 0-1.57 0-3.14-.05-4.65-.06-.93 0-1.92-.24-2.85-.11-.35-.29-.81-.7-.81h-5.5c-.93 0-1.22.64-1.28 1.57v4.12ZM103.81 35c-.17-6.63-.1-13.67-.05-20.24 0-2.04-.12-4.25-.12-6.28 0-2.21-.87-2.1-2.04-2.15-1.7-.06-2.46-.06-4.15-.06-1.11-.06-1.58.23-1.58 1.34 0 5.7-.18 21.8-.12 24.13.06 2.33.3 12.91.18 15.24-.06.81 0 1.62.06 2.44.05.29.23.58.7.58 1.93-.12 3.74-.12 5.67-.17.7-.06 1.28-.24 1.58-1 .05-.4-.12-11.04-.12-13.83Zm13.92 4.47c0-2.03-.3-7.56-.23-8.72 0-.17.11-.4.17-.4.12 0 .35.11.41.17 1.87 2.44 10.64 19.36 11.7 19.42.28.06.58.06.87.06 1.99-.12 3.74 0 5.73 0 2.04 0 .7-1.98.35-2.5-.53-.76-7.48-13.14-7.9-13.9-1.16-1.98-2.16-4.13-3.32-6.05-.12-.23-.24-.58-.18-.81.12-.7.3-1.34.59-1.98a93.18 93.18 0 0 1 4.55-8.14c1.88-2.97 2.93-4.83 4.45-7.5.35-.64.58-1.34.82-2.1.05-.29-.18-.58-.53-.58-1.11-.05-5.15 0-6.43 0-.59 0-1.17.12-1.46.64-.76 1.46-8.6 15.7-9.35 16.98-.06.12-.24.18-.41.18 0 0-.12-.18-.12-.3-.06-3.25.53-13.9.4-16.04-.05-1.28-.28-1.4-1.57-1.46-1.4-.05-3.33-.05-4.73-.05-1.3 0-1.4.7-1.58 1.62-.06.18-.06 5.64-.06 8.09 0 3.54-.3 25.76.11 32.8 0 .7.18 1.1.77 1.1 1.57-.12 3.91 0 5.49 0 1.11 0 1.29-.12 1.29-1.98 0-2.5.23-4.77.23-7.85 0-.23-.06-.46-.06-.7Zm25.66-1.4h-.06c0 1.46-.05 2.97 0 4.49.06 1.86.18 3.72.3 5.58 0 .64.17.81.76.93 1.22.29 2.4.35 3.62.35 3.16-.12 6.31.11 9.47 0 1.29-.06 1.87.06 3.16-.18 1.17-.23 1.58-.87 1.58-2.61-.12-1.1-.06-1.57-.06-2.91 0-1.92-1.35-2.56-2.52-2.5-.81.06-4.73-.06-6.31-.06-2.63.06-2.22.4-2.22-2.33 0-2.2.06-5.05.06-7.32 0-1.22.11-1.63 1.28-1.63h7.31c1.17.17 1.99-.64 1.99-1.86 0-1.22.12-1.28.12-2.5l-.18-1.75c-.12-.99-.47-1.33-1.46-1.33-.64 0-1.29.05-1.93.11-2.52.18-3.68-.17-6.14 0-.82 0-.93-.11-1-.87-.23-2.27 0-4.77.24-7.04.06-.93.3-1.1 1.17-1.16l8.24-.06c1.11-.11 1.46-.06 1.4-1.16-.11-1.69.06-3.43-.11-5.12-.12-.93-.41-1.1-1.46-1.1-1.76.05-2.17.05-3.92.17-1.75.06-8.77.06-10.46.06-2.46 0-2.63-.18-2.7 2.8-.1 2.32-.05 4.7-.05 7.09 0 4.07-.23 18.66-.12 21.92Zm47.76-24.82c.06-1.92 0-3.5 0-5.35 0-2.15-3.92-1.92-5.32-1.86a18.95 18.95 0 0 0-15.08 9.77c-.82 1.57-1.4 3.2-1.81 4.88a34 34 0 0 0-.59 12.15c.41 3.78 1.4 7.56 3.74 10.59 4.04 5.3 11.46 7.15 17.83 6.16.3-.06.59-.11.82-.29.18-.11.35-.35.35-.58l.18-3.31c.06-1.05 0-1 0-2.04 0-1.4-2.93-.35-4.74-.35-1.75 0-3.62-.06-5.2-.87-2.8-1.57-4.38-4.71-5.26-7.68-1-3.2-1.23-6.63-.64-9.88.7-4.25 2.74-9.13 7.25-10.59 2.57-.87 5.31-.58 7.89-.29.35.06.58-.17.58-.46Zm26.77 15.3c.06-2.5 0-14.84 0-18.38.06-.82 0-1.63-.11-2.45-.06-.99-.24-1.28-1.29-1.33h-4.44c-.82 0-1.35.4-1.82 1.27-1.34 3.2-10.75 24.02-12.15 26.58-.53.99-1 1.63-1 2.68v4.24c0 .76-.06 1.28 1.23 1.28l11.1-.06c1.47 0 1.47.3 1.47 1.1 0 .88-.12 4.9-.12 5.3 0 .58.12 1.16 1.23 1.16h5.08c1.23 0 1.23-.7 1.23-2.03.06-1.17-.06-3.5-.06-4.66 0-.93.18-.98 1.76-.98 1.22 0 1.75-.12 1.75-.88.06-1.57 0-2.67 0-4.42 0-1.04-.93-.98-2.92-.98-.65 0-.7-.18-.7-1.05-.12-1.8-.24-4.6-.24-6.4Zm-7.25-5.94c-.05.7-.11 10.82-.11 12.27-.06.81-.24 1.05-1 1.1-1.93.06-3.85.06-5.78.06-.47 0-.65-.4-.41-.87.23-.4 4.85-11.57 6.13-14.48.18-.17.24-.35.41-.52.18-.12.41-.18.59-.23.06 0 .23.29.23.46 0 .76-.06 1.51-.06 2.21Z"
|
|
4966
|
-
}
|
|
4967
|
-
)
|
|
4968
|
-
] })
|
|
4969
|
-
), LogoIcon = forwardRef(
|
|
4970
|
-
(props, ref) => /* @__PURE__ */ jsx("svg", { ref, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 56 56", ...props, children: /* @__PURE__ */ jsx(
|
|
4971
|
-
"path",
|
|
4972
|
-
{
|
|
4973
|
-
fill: "#5E98AF",
|
|
4974
|
-
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
4975
|
-
}
|
|
4976
|
-
) })
|
|
4977
|
-
), BurgerButton = () => {
|
|
4978
|
-
const actor = useNavigationActor(), { onBurgerMenuClick } = useDiagramEventHandlers();
|
|
4979
|
-
return /* @__PURE__ */ jsx(MotionDiv, { layout: "position", children: /* @__PURE__ */ jsxs(
|
|
4980
|
-
UnstyledButton,
|
|
4981
|
-
{
|
|
4982
|
-
onMouseEnter: () => {
|
|
4983
|
-
actor.send({ type: "breadcrumbs.mouseEnter.root" });
|
|
4984
|
-
},
|
|
4985
|
-
onMouseLeave: () => {
|
|
4986
|
-
actor.send({ type: "breadcrumbs.mouseLeave.root" });
|
|
4987
|
-
},
|
|
4988
|
-
onClick: (e2) => {
|
|
4989
|
-
e2.stopPropagation(), onBurgerMenuClick && actor.isOpened() && setTimeout(() => {
|
|
4990
|
-
onBurgerMenuClick();
|
|
4991
|
-
}, 100), actor.send({ type: "breadcrumbs.click.root" });
|
|
4992
|
-
},
|
|
4993
|
-
className: cx(
|
|
4994
|
-
"mantine-active",
|
|
4995
|
-
hstack({
|
|
4996
|
-
padding: "0.5",
|
|
4997
|
-
// _active: {
|
|
4998
|
-
// transform: 'translateY(1px)',
|
|
4999
|
-
// },
|
|
5000
|
-
width: {
|
|
5001
|
-
base: "[20px]",
|
|
5002
|
-
"@/md": "[64px]"
|
|
5003
|
-
}
|
|
5004
|
-
})
|
|
5005
|
-
),
|
|
5006
|
-
children: [
|
|
5007
|
-
/* @__PURE__ */ jsx(
|
|
5008
|
-
Logo,
|
|
5009
|
-
{
|
|
5010
|
-
className: css({
|
|
5011
|
-
display: {
|
|
5012
|
-
base: "none",
|
|
5013
|
-
"@/md": "block"
|
|
5014
|
-
}
|
|
5015
|
-
})
|
|
5016
|
-
}
|
|
5017
|
-
),
|
|
5018
|
-
/* @__PURE__ */ jsx(
|
|
5019
|
-
LogoIcon,
|
|
5020
|
-
{
|
|
5021
|
-
className: css({
|
|
5022
|
-
display: {
|
|
5023
|
-
base: "block",
|
|
5024
|
-
"@/md": "none"
|
|
5025
|
-
}
|
|
5026
|
-
})
|
|
5027
|
-
}
|
|
5028
|
-
)
|
|
5029
|
-
]
|
|
5030
|
-
}
|
|
5031
|
-
) });
|
|
5032
|
-
}, compoundActionBtn = cva({
|
|
5081
|
+
const compoundActionBtn = cva({
|
|
5033
5082
|
base: {
|
|
5034
5083
|
transitionDuration: "normal"
|
|
5035
5084
|
},
|
|
@@ -5664,7 +5713,7 @@ const EdgePath = forwardRef(({
|
|
|
5664
5713
|
] });
|
|
5665
5714
|
});
|
|
5666
5715
|
EdgePath.displayName = "EdgePath";
|
|
5667
|
-
const container$
|
|
5716
|
+
const container$2 = hstack({
|
|
5668
5717
|
position: "absolute",
|
|
5669
5718
|
zIndex: 1,
|
|
5670
5719
|
justifyContent: "center",
|
|
@@ -5688,7 +5737,7 @@ function ElementActionButtons({
|
|
|
5688
5737
|
return buttons.length ? /* @__PURE__ */ jsx(
|
|
5689
5738
|
Box,
|
|
5690
5739
|
{
|
|
5691
|
-
className: container$
|
|
5740
|
+
className: container$2,
|
|
5692
5741
|
style: {
|
|
5693
5742
|
top: "calc(100% - 30px)",
|
|
5694
5743
|
transform: "translateX(-50%)",
|
|
@@ -5773,7 +5822,7 @@ const Markdown = forwardRef(({
|
|
|
5773
5822
|
);
|
|
5774
5823
|
});
|
|
5775
5824
|
Markdown.displayName = "Markdown";
|
|
5776
|
-
const Root = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5825
|
+
const Root$1 = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5777
5826
|
"div",
|
|
5778
5827
|
{
|
|
5779
5828
|
...props,
|
|
@@ -5856,7 +5905,7 @@ const Root = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
|
5856
5905
|
});
|
|
5857
5906
|
function ElementData({ iconSize: iconSize2, data }) {
|
|
5858
5907
|
return /* @__PURE__ */ jsxs(
|
|
5859
|
-
Root,
|
|
5908
|
+
Root$1,
|
|
5860
5909
|
{
|
|
5861
5910
|
style: e$9(iconSize2) ? {
|
|
5862
5911
|
// @ts-ignore
|
|
@@ -5873,13 +5922,13 @@ function ElementData({ iconSize: iconSize2, data }) {
|
|
|
5873
5922
|
}
|
|
5874
5923
|
);
|
|
5875
5924
|
}
|
|
5876
|
-
ElementData.Root = Root;
|
|
5925
|
+
ElementData.Root = Root$1;
|
|
5877
5926
|
ElementData.Icon = Icon;
|
|
5878
5927
|
ElementData.Content = Content;
|
|
5879
5928
|
ElementData.Title = Title;
|
|
5880
5929
|
ElementData.Technology = Technology;
|
|
5881
5930
|
ElementData.Description = Description;
|
|
5882
|
-
const container$
|
|
5931
|
+
const container$1 = css({
|
|
5883
5932
|
position: "absolute",
|
|
5884
5933
|
top: "0.5",
|
|
5885
5934
|
right: "0.5",
|
|
@@ -5912,7 +5961,7 @@ function ElementDetailsButton({
|
|
|
5912
5961
|
icon: icon2,
|
|
5913
5962
|
onClick
|
|
5914
5963
|
}) {
|
|
5915
|
-
return /* @__PURE__ */ jsx(Box, { className: cx(container$
|
|
5964
|
+
return /* @__PURE__ */ jsx(Box, { className: cx(container$1, "details-button"), children: /* @__PURE__ */ jsx(
|
|
5916
5965
|
ActionIcon,
|
|
5917
5966
|
{
|
|
5918
5967
|
className: cx("nodrag nopan", actionBtn({ variant: "transparent" })),
|
|
@@ -5940,41 +5989,7 @@ function ElementDetailsButton({
|
|
|
5940
5989
|
}
|
|
5941
5990
|
) });
|
|
5942
5991
|
}
|
|
5943
|
-
const
|
|
5944
|
-
position: "relative",
|
|
5945
|
-
width: "full",
|
|
5946
|
-
height: "full",
|
|
5947
|
-
padding: "0",
|
|
5948
|
-
margin: "0",
|
|
5949
|
-
display: "flex",
|
|
5950
|
-
alignItems: "center",
|
|
5951
|
-
justifyContent: "center",
|
|
5952
|
-
pointerEvents: "none",
|
|
5953
|
-
_focusVisible: {
|
|
5954
|
-
outline: "none"
|
|
5955
|
-
},
|
|
5956
|
-
_whenSelectable: {
|
|
5957
|
-
pointerEvents: "all",
|
|
5958
|
-
_before: {
|
|
5959
|
-
content: '" "',
|
|
5960
|
-
position: "absolute",
|
|
5961
|
-
top: "[calc(100% - 4px)]",
|
|
5962
|
-
left: "0",
|
|
5963
|
-
width: "full",
|
|
5964
|
-
height: "24px",
|
|
5965
|
-
background: "transparent",
|
|
5966
|
-
pointerEvents: "all"
|
|
5967
|
-
}
|
|
5968
|
-
},
|
|
5969
|
-
_reduceGraphicsOnPan: {
|
|
5970
|
-
_before: {
|
|
5971
|
-
display: "none"
|
|
5972
|
-
}
|
|
5973
|
-
},
|
|
5974
|
-
":where(.react-flow__node.selectable:not(.dragging)) &": {
|
|
5975
|
-
cursor: "pointer"
|
|
5976
|
-
}
|
|
5977
|
-
}), ElementNodeContainer = forwardRef(({
|
|
5992
|
+
const ElementNodeContainer = forwardRef(({
|
|
5978
5993
|
nodeProps: {
|
|
5979
5994
|
selected = !1,
|
|
5980
5995
|
selectable = !1,
|
|
@@ -6008,9 +6023,8 @@ const container$1 = css({
|
|
|
6008
6023
|
{
|
|
6009
6024
|
ref,
|
|
6010
6025
|
className: cx(
|
|
6011
|
-
|
|
6026
|
+
elementNode(),
|
|
6012
6027
|
"group",
|
|
6013
|
-
"likec4-element-node",
|
|
6014
6028
|
className
|
|
6015
6029
|
),
|
|
6016
6030
|
initial: !1,
|
|
@@ -6038,7 +6052,7 @@ const container$1 = css({
|
|
|
6038
6052
|
);
|
|
6039
6053
|
});
|
|
6040
6054
|
ElementNodeContainer.displayName = "ElementNodeContainer";
|
|
6041
|
-
function cylinderSVGPath(diameter, height, tilt = 0.
|
|
6055
|
+
function cylinderSVGPath(diameter, height, tilt = 0.07) {
|
|
6042
6056
|
const radius = Math.round(diameter / 2), rx = radius, ry = roundDpr(tilt * radius), tiltAdjustedHeight = height - 2 * ry;
|
|
6043
6057
|
return {
|
|
6044
6058
|
path: ` M ${diameter},${ry}
|
|
@@ -6052,6 +6066,36 @@ function cylinderSVGPath(diameter, height, tilt = 0.065) {
|
|
|
6052
6066
|
rx
|
|
6053
6067
|
};
|
|
6054
6068
|
}
|
|
6069
|
+
function docSVGPath(width, height) {
|
|
6070
|
+
const waveHeight = height / 8, baseY = roundDpr(height - waveHeight / 2), amplitude = roundDpr(height / 6), radius = 6;
|
|
6071
|
+
return {
|
|
6072
|
+
path: `
|
|
6073
|
+
M 0 ${baseY}
|
|
6074
|
+
V ${radius}
|
|
6075
|
+
Q 0 0 ${radius} 0
|
|
6076
|
+
H ${width - radius}
|
|
6077
|
+
Q ${width} 0 ${width} ${radius}
|
|
6078
|
+
V ${baseY}
|
|
6079
|
+
C ${roundDpr(width * 0.75)} ${baseY + amplitude}, ${roundDpr(width * 0.5)} ${baseY - amplitude}, 0 ${baseY}
|
|
6080
|
+
`.replace(/\s+/g, " ").trim()
|
|
6081
|
+
};
|
|
6082
|
+
}
|
|
6083
|
+
function bucketSVGPath(width, height) {
|
|
6084
|
+
const cx2 = width / 2, topRx = roundDpr(cx2), topRy = roundDpr(Math.min(height / 8, topRx * 0.08)), bottomRx = roundDpr(topRx * 0.8), bottomRy = roundDpr(topRy * 1.05), topY = topRy, bottomY = height - bottomRy, leftBottomX = cx2 - bottomRx;
|
|
6085
|
+
return {
|
|
6086
|
+
path: `
|
|
6087
|
+
M ${width},${topY}
|
|
6088
|
+
a ${topRx},${topRy} 0,0,0 ${-width} 0
|
|
6089
|
+
L ${leftBottomX},${bottomY}
|
|
6090
|
+
a ${bottomRx},${bottomRy} 0,0,0 ${bottomRx * 2} 0
|
|
6091
|
+
Z
|
|
6092
|
+
`.replace(/\s+/g, " ").trim(),
|
|
6093
|
+
topRx,
|
|
6094
|
+
topRy,
|
|
6095
|
+
bottomRx,
|
|
6096
|
+
bottomRy
|
|
6097
|
+
};
|
|
6098
|
+
}
|
|
6055
6099
|
function queueSVGPath(width, height, tilt = 0.185) {
|
|
6056
6100
|
const diameter = height, ry = Math.round(diameter / 2), rx = roundDpr(diameter / 2 * tilt), tiltAdjustedWidth = width - 2 * rx;
|
|
6057
6101
|
return {
|
|
@@ -6089,6 +6133,17 @@ function ShapeSvg({ shape, w, h }) {
|
|
|
6089
6133
|
/* @__PURE__ */ jsx("rect", { x: 33, y: 12, width: w - 44, height: h - 24, rx: 5 })
|
|
6090
6134
|
] })
|
|
6091
6135
|
] });
|
|
6136
|
+
case "document": {
|
|
6137
|
+
const { path } = docSVGPath(w, h);
|
|
6138
|
+
return /* @__PURE__ */ jsx(
|
|
6139
|
+
"path",
|
|
6140
|
+
{
|
|
6141
|
+
d: path,
|
|
6142
|
+
"data-likec4-fill": "fill",
|
|
6143
|
+
strokeWidth: 2
|
|
6144
|
+
}
|
|
6145
|
+
);
|
|
6146
|
+
}
|
|
6092
6147
|
case "browser":
|
|
6093
6148
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6094
6149
|
/* @__PURE__ */ jsx(
|
|
@@ -6146,12 +6201,39 @@ function ShapeSvg({ shape, w, h }) {
|
|
|
6146
6201
|
/* @__PURE__ */ jsx("ellipse", { cx: rx, cy: ry, ry: ry - 0.75, rx, "data-likec4-fill": "mix-stroke", strokeWidth: 2 })
|
|
6147
6202
|
] });
|
|
6148
6203
|
}
|
|
6204
|
+
case "bucket": {
|
|
6205
|
+
const { path, topRx, topRy } = bucketSVGPath(w, h);
|
|
6206
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6207
|
+
/* @__PURE__ */ jsx("path", { d: path, strokeWidth: 2 }),
|
|
6208
|
+
/* @__PURE__ */ jsx(
|
|
6209
|
+
"ellipse",
|
|
6210
|
+
{
|
|
6211
|
+
cx: w / 2,
|
|
6212
|
+
cy: topRy,
|
|
6213
|
+
rx: topRx,
|
|
6214
|
+
ry: topRy,
|
|
6215
|
+
"data-likec4-fill": "mix-stroke",
|
|
6216
|
+
strokeWidth: 2
|
|
6217
|
+
}
|
|
6218
|
+
)
|
|
6219
|
+
] });
|
|
6220
|
+
}
|
|
6149
6221
|
case "storage":
|
|
6150
6222
|
case "cylinder": {
|
|
6151
6223
|
const { path, rx, ry } = cylinderSVGPath(w, h);
|
|
6152
6224
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6153
6225
|
/* @__PURE__ */ jsx("path", { d: path, strokeWidth: 2 }),
|
|
6154
|
-
/* @__PURE__ */ jsx(
|
|
6226
|
+
/* @__PURE__ */ jsx(
|
|
6227
|
+
"ellipse",
|
|
6228
|
+
{
|
|
6229
|
+
cx: rx,
|
|
6230
|
+
cy: ry,
|
|
6231
|
+
ry,
|
|
6232
|
+
rx: rx - 0.75,
|
|
6233
|
+
"data-likec4-fill": "mix-stroke",
|
|
6234
|
+
strokeWidth: 2
|
|
6235
|
+
}
|
|
6236
|
+
)
|
|
6155
6237
|
] });
|
|
6156
6238
|
}
|
|
6157
6239
|
default:
|
|
@@ -6161,12 +6243,18 @@ function ShapeSvg({ shape, w, h }) {
|
|
|
6161
6243
|
function ShapeSvgOutline({ shape, w, h }) {
|
|
6162
6244
|
let svg;
|
|
6163
6245
|
switch (shape) {
|
|
6246
|
+
case "bucket":
|
|
6247
|
+
svg = /* @__PURE__ */ jsx("g", { transform: "translate(-3 -3)", children: /* @__PURE__ */ jsx("path", { d: bucketSVGPath(w + 6, h + 6).path }) });
|
|
6248
|
+
break;
|
|
6164
6249
|
case "queue":
|
|
6165
|
-
svg = /* @__PURE__ */ jsx("path", { d: queueSVGPath(w, h).path });
|
|
6250
|
+
svg = /* @__PURE__ */ jsx("g", { transform: "translate(-3 -3)", children: /* @__PURE__ */ jsx("path", { d: queueSVGPath(w + 6, h + 6).path }) });
|
|
6251
|
+
break;
|
|
6252
|
+
case "document":
|
|
6253
|
+
svg = /* @__PURE__ */ jsx("g", { transform: "translate(-3 -3)", children: /* @__PURE__ */ jsx("path", { d: docSVGPath(w + 6, h + 6).path }) });
|
|
6166
6254
|
break;
|
|
6167
6255
|
case "storage":
|
|
6168
6256
|
case "cylinder": {
|
|
6169
|
-
svg = /* @__PURE__ */ jsx("path", { d: cylinderSVGPath(w, h).path });
|
|
6257
|
+
svg = /* @__PURE__ */ jsx("g", { transform: "translate(-3 -3)", children: /* @__PURE__ */ jsx("path", { d: cylinderSVGPath(w + 6, h + 6).path }) });
|
|
6170
6258
|
break;
|
|
6171
6259
|
}
|
|
6172
6260
|
default: {
|
|
@@ -6185,31 +6273,32 @@ function ShapeSvgOutline({ shape, w, h }) {
|
|
|
6185
6273
|
}
|
|
6186
6274
|
return /* @__PURE__ */ jsx("g", { className: "likec4-shape-outline", children: svg });
|
|
6187
6275
|
}
|
|
6188
|
-
function ShapeHtml({ multiple, withOutLine }) {
|
|
6189
|
-
return /* @__PURE__ */ jsxs(
|
|
6190
|
-
"div",
|
|
6191
|
-
{
|
|
6192
|
-
className: elementShapeRecipe({
|
|
6193
|
-
shapetype: "html"
|
|
6194
|
-
}),
|
|
6195
|
-
children: [
|
|
6196
|
-
multiple && /* @__PURE__ */ jsx("div", { className: "likec4-shape-multiple" }),
|
|
6197
|
-
withOutLine && /* @__PURE__ */ jsx("div", { className: "likec4-shape-outline" })
|
|
6198
|
-
]
|
|
6199
|
-
}
|
|
6200
|
-
);
|
|
6201
|
-
}
|
|
6202
6276
|
function ElementShape({ data, width, height, showSeletionOutline = !0 }) {
|
|
6203
6277
|
let w = width && width > 10 ? width : data.width, h = height && height > 10 ? height : data.height;
|
|
6204
|
-
const isMultiple = data.style?.multiple ?? !1;
|
|
6278
|
+
const isMultiple = data.style?.multiple ?? !1, borderStyle = data.style?.border ?? "none", withBorder = borderStyle !== "none";
|
|
6205
6279
|
if (data.shape === "rectangle")
|
|
6206
|
-
return /* @__PURE__ */
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6280
|
+
return /* @__PURE__ */ jsxs(
|
|
6281
|
+
"div",
|
|
6282
|
+
{
|
|
6283
|
+
style: {
|
|
6284
|
+
borderStyle
|
|
6285
|
+
},
|
|
6286
|
+
className: elementShapeRecipe({
|
|
6287
|
+
shapetype: "html",
|
|
6288
|
+
withBorder
|
|
6289
|
+
}),
|
|
6290
|
+
children: [
|
|
6291
|
+
isMultiple && /* @__PURE__ */ jsx("div", { className: "likec4-shape-multiple" }),
|
|
6292
|
+
showSeletionOutline && /* @__PURE__ */ jsx("div", { className: "likec4-shape-outline" })
|
|
6293
|
+
]
|
|
6294
|
+
}
|
|
6295
|
+
);
|
|
6296
|
+
const className = elementShapeRecipe({
|
|
6297
|
+
shapetype: "svg"
|
|
6298
|
+
});
|
|
6299
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6300
|
+
isMultiple && /* @__PURE__ */ jsx("svg", { className, "data-likec4-shape-multiple": "true", viewBox: `0 0 ${w} ${h}`, children: /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h }) }),
|
|
6301
|
+
/* @__PURE__ */ jsxs("svg", { className, viewBox: `0 0 ${w} ${h}`, children: [
|
|
6213
6302
|
showSeletionOutline && /* @__PURE__ */ jsx(ShapeSvgOutline, { shape: data.shape, w, h }),
|
|
6214
6303
|
/* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h })
|
|
6215
6304
|
] })
|
|
@@ -6503,7 +6592,7 @@ const positions = [Position.Top, Position.Right, Position.Bottom, Position.Left]
|
|
|
6503
6592
|
}
|
|
6504
6593
|
);
|
|
6505
6594
|
}
|
|
6506
|
-
), selector$
|
|
6595
|
+
), selector$6 = ({ context: context2 }) => {
|
|
6507
6596
|
const view = context2.view;
|
|
6508
6597
|
return {
|
|
6509
6598
|
id: view.id,
|
|
@@ -6513,7 +6602,7 @@ const positions = [Position.Top, Position.Right, Position.Bottom, Position.Left]
|
|
|
6513
6602
|
links: view.links ?? []
|
|
6514
6603
|
};
|
|
6515
6604
|
}, DetailsControls = (props) => {
|
|
6516
|
-
const [opened, setOpened] = useState(!1), data = useNavigationActorSnapshot(selector$
|
|
6605
|
+
const [opened, setOpened] = useState(!1), data = useNavigationActorSnapshot(selector$6, deepEqual), portalProps = useMantinePortalProps();
|
|
6517
6606
|
return /* @__PURE__ */ jsxs(
|
|
6518
6607
|
Popover,
|
|
6519
6608
|
{
|
|
@@ -6802,7 +6891,92 @@ const positions = [Position.Top, Position.Right, Position.Bottom, Position.Left]
|
|
|
6802
6891
|
) });
|
|
6803
6892
|
});
|
|
6804
6893
|
LayoutWarning.displayName = "ManualLayoutWarning";
|
|
6805
|
-
const
|
|
6894
|
+
const Logo$1 = forwardRef(
|
|
6895
|
+
(props, ref) => /* @__PURE__ */ jsxs("svg", { ref, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 222 56", ...props, children: [
|
|
6896
|
+
/* @__PURE__ */ jsx(
|
|
6897
|
+
"path",
|
|
6898
|
+
{
|
|
6899
|
+
fill: "#5E98AF",
|
|
6900
|
+
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
6901
|
+
}
|
|
6902
|
+
),
|
|
6903
|
+
/* @__PURE__ */ jsx(
|
|
6904
|
+
"path",
|
|
6905
|
+
{
|
|
6906
|
+
className: css({
|
|
6907
|
+
fill: "[#FCFBF7]",
|
|
6908
|
+
_light: {
|
|
6909
|
+
fill: "[#222221]"
|
|
6910
|
+
}
|
|
6911
|
+
}),
|
|
6912
|
+
d: "M71.61 12.08c-.06 3.61.3 29.95.23 31.87 0 1.8 0 3.6.06 5.41 0 .3.18.58.47.58 4.1.18 8.13-.17 12.22-.11 1.34.05 2.69 0 3.97 0 1.29-.06 1.4-.59 1.35-1.63-.06-1.63-.06-3.08-.06-4.65-.06-.82-.53-1.11-1.23-1.11-2.4.06-4.8-.06-7.19.06-.4.06-.82.06-1.23.06-.7-.06-.87-.24-.93-1v-.86c-.18-4.83.17-9.83.17-14.66-.06-4.07 0-7.73-.06-11.34 0-1.57 0-3.14-.05-4.65-.06-.93 0-1.92-.24-2.85-.11-.35-.29-.81-.7-.81h-5.5c-.93 0-1.22.64-1.28 1.57v4.12ZM103.81 35c-.17-6.63-.1-13.67-.05-20.24 0-2.04-.12-4.25-.12-6.28 0-2.21-.87-2.1-2.04-2.15-1.7-.06-2.46-.06-4.15-.06-1.11-.06-1.58.23-1.58 1.34 0 5.7-.18 21.8-.12 24.13.06 2.33.3 12.91.18 15.24-.06.81 0 1.62.06 2.44.05.29.23.58.7.58 1.93-.12 3.74-.12 5.67-.17.7-.06 1.28-.24 1.58-1 .05-.4-.12-11.04-.12-13.83Zm13.92 4.47c0-2.03-.3-7.56-.23-8.72 0-.17.11-.4.17-.4.12 0 .35.11.41.17 1.87 2.44 10.64 19.36 11.7 19.42.28.06.58.06.87.06 1.99-.12 3.74 0 5.73 0 2.04 0 .7-1.98.35-2.5-.53-.76-7.48-13.14-7.9-13.9-1.16-1.98-2.16-4.13-3.32-6.05-.12-.23-.24-.58-.18-.81.12-.7.3-1.34.59-1.98a93.18 93.18 0 0 1 4.55-8.14c1.88-2.97 2.93-4.83 4.45-7.5.35-.64.58-1.34.82-2.1.05-.29-.18-.58-.53-.58-1.11-.05-5.15 0-6.43 0-.59 0-1.17.12-1.46.64-.76 1.46-8.6 15.7-9.35 16.98-.06.12-.24.18-.41.18 0 0-.12-.18-.12-.3-.06-3.25.53-13.9.4-16.04-.05-1.28-.28-1.4-1.57-1.46-1.4-.05-3.33-.05-4.73-.05-1.3 0-1.4.7-1.58 1.62-.06.18-.06 5.64-.06 8.09 0 3.54-.3 25.76.11 32.8 0 .7.18 1.1.77 1.1 1.57-.12 3.91 0 5.49 0 1.11 0 1.29-.12 1.29-1.98 0-2.5.23-4.77.23-7.85 0-.23-.06-.46-.06-.7Zm25.66-1.4h-.06c0 1.46-.05 2.97 0 4.49.06 1.86.18 3.72.3 5.58 0 .64.17.81.76.93 1.22.29 2.4.35 3.62.35 3.16-.12 6.31.11 9.47 0 1.29-.06 1.87.06 3.16-.18 1.17-.23 1.58-.87 1.58-2.61-.12-1.1-.06-1.57-.06-2.91 0-1.92-1.35-2.56-2.52-2.5-.81.06-4.73-.06-6.31-.06-2.63.06-2.22.4-2.22-2.33 0-2.2.06-5.05.06-7.32 0-1.22.11-1.63 1.28-1.63h7.31c1.17.17 1.99-.64 1.99-1.86 0-1.22.12-1.28.12-2.5l-.18-1.75c-.12-.99-.47-1.33-1.46-1.33-.64 0-1.29.05-1.93.11-2.52.18-3.68-.17-6.14 0-.82 0-.93-.11-1-.87-.23-2.27 0-4.77.24-7.04.06-.93.3-1.1 1.17-1.16l8.24-.06c1.11-.11 1.46-.06 1.4-1.16-.11-1.69.06-3.43-.11-5.12-.12-.93-.41-1.1-1.46-1.1-1.76.05-2.17.05-3.92.17-1.75.06-8.77.06-10.46.06-2.46 0-2.63-.18-2.7 2.8-.1 2.32-.05 4.7-.05 7.09 0 4.07-.23 18.66-.12 21.92Zm47.76-24.82c.06-1.92 0-3.5 0-5.35 0-2.15-3.92-1.92-5.32-1.86a18.95 18.95 0 0 0-15.08 9.77c-.82 1.57-1.4 3.2-1.81 4.88a34 34 0 0 0-.59 12.15c.41 3.78 1.4 7.56 3.74 10.59 4.04 5.3 11.46 7.15 17.83 6.16.3-.06.59-.11.82-.29.18-.11.35-.35.35-.58l.18-3.31c.06-1.05 0-1 0-2.04 0-1.4-2.93-.35-4.74-.35-1.75 0-3.62-.06-5.2-.87-2.8-1.57-4.38-4.71-5.26-7.68-1-3.2-1.23-6.63-.64-9.88.7-4.25 2.74-9.13 7.25-10.59 2.57-.87 5.31-.58 7.89-.29.35.06.58-.17.58-.46Zm26.77 15.3c.06-2.5 0-14.84 0-18.38.06-.82 0-1.63-.11-2.45-.06-.99-.24-1.28-1.29-1.33h-4.44c-.82 0-1.35.4-1.82 1.27-1.34 3.2-10.75 24.02-12.15 26.58-.53.99-1 1.63-1 2.68v4.24c0 .76-.06 1.28 1.23 1.28l11.1-.06c1.47 0 1.47.3 1.47 1.1 0 .88-.12 4.9-.12 5.3 0 .58.12 1.16 1.23 1.16h5.08c1.23 0 1.23-.7 1.23-2.03.06-1.17-.06-3.5-.06-4.66 0-.93.18-.98 1.76-.98 1.22 0 1.75-.12 1.75-.88.06-1.57 0-2.67 0-4.42 0-1.04-.93-.98-2.92-.98-.65 0-.7-.18-.7-1.05-.12-1.8-.24-4.6-.24-6.4Zm-7.25-5.94c-.05.7-.11 10.82-.11 12.27-.06.81-.24 1.05-1 1.1-1.93.06-3.85.06-5.78.06-.47 0-.65-.4-.41-.87.23-.4 4.85-11.57 6.13-14.48.18-.17.24-.35.41-.52.18-.12.41-.18.59-.23.06 0 .23.29.23.46 0 .76-.06 1.51-.06 2.21Z"
|
|
6913
|
+
}
|
|
6914
|
+
)
|
|
6915
|
+
] })
|
|
6916
|
+
), LogoIcon = forwardRef(
|
|
6917
|
+
(props, ref) => /* @__PURE__ */ jsx("svg", { ref, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 56 56", ...props, children: /* @__PURE__ */ jsx(
|
|
6918
|
+
"path",
|
|
6919
|
+
{
|
|
6920
|
+
fill: "#5E98AF",
|
|
6921
|
+
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
6922
|
+
}
|
|
6923
|
+
) })
|
|
6924
|
+
), LogoButton$1 = () => {
|
|
6925
|
+
const actor = useNavigationActor(), { onLogoClick } = useDiagramEventHandlers();
|
|
6926
|
+
return /* @__PURE__ */ jsx(MotionDiv, { layout: "position", children: /* @__PURE__ */ jsxs(
|
|
6927
|
+
UnstyledButton,
|
|
6928
|
+
{
|
|
6929
|
+
onMouseEnter: () => {
|
|
6930
|
+
actor.send({ type: "breadcrumbs.mouseEnter.root" });
|
|
6931
|
+
},
|
|
6932
|
+
onMouseLeave: () => {
|
|
6933
|
+
actor.send({ type: "breadcrumbs.mouseLeave.root" });
|
|
6934
|
+
},
|
|
6935
|
+
onClick: (e2) => {
|
|
6936
|
+
e2.stopPropagation(), onLogoClick && actor.isOpened() && setTimeout(() => {
|
|
6937
|
+
onLogoClick();
|
|
6938
|
+
}, 100), actor.send({ type: "breadcrumbs.click.root" });
|
|
6939
|
+
},
|
|
6940
|
+
className: cx(
|
|
6941
|
+
"mantine-active",
|
|
6942
|
+
hstack({
|
|
6943
|
+
padding: "0.5",
|
|
6944
|
+
// _active: {
|
|
6945
|
+
// transform: 'translateY(1px)',
|
|
6946
|
+
// },
|
|
6947
|
+
width: {
|
|
6948
|
+
base: "[20px]",
|
|
6949
|
+
"@/md": "[64px]"
|
|
6950
|
+
}
|
|
6951
|
+
})
|
|
6952
|
+
),
|
|
6953
|
+
children: [
|
|
6954
|
+
/* @__PURE__ */ jsx(
|
|
6955
|
+
Logo$1,
|
|
6956
|
+
{
|
|
6957
|
+
className: css({
|
|
6958
|
+
display: {
|
|
6959
|
+
base: "none",
|
|
6960
|
+
"@/md": "block"
|
|
6961
|
+
}
|
|
6962
|
+
})
|
|
6963
|
+
}
|
|
6964
|
+
),
|
|
6965
|
+
/* @__PURE__ */ jsx(
|
|
6966
|
+
LogoIcon,
|
|
6967
|
+
{
|
|
6968
|
+
className: css({
|
|
6969
|
+
display: {
|
|
6970
|
+
base: "block",
|
|
6971
|
+
"@/md": "none"
|
|
6972
|
+
}
|
|
6973
|
+
})
|
|
6974
|
+
}
|
|
6975
|
+
)
|
|
6976
|
+
]
|
|
6977
|
+
}
|
|
6978
|
+
) });
|
|
6979
|
+
}, NavigationButtons = () => {
|
|
6806
6980
|
const diagram = useDiagram(), {
|
|
6807
6981
|
hasStepBack,
|
|
6808
6982
|
hasStepForward
|
|
@@ -6900,7 +7074,7 @@ const NavigationButtons = () => {
|
|
|
6900
7074
|
) });
|
|
6901
7075
|
});
|
|
6902
7076
|
SearchControl.displayName = "SearchControl";
|
|
6903
|
-
const selector$
|
|
7077
|
+
const selector$5 = (ctx) => {
|
|
6904
7078
|
const comparingLatest = deriveToggledFeatures(ctx).enableCompareWithLatest && !!ctx.view.drifts && ctx.view._layout === "auto", sequenceLayoutActive = ctx.view._type === "dynamic" && ctx.dynamicViewVariant === "sequence", noActiveWalkthrough = !e$8(ctx.activeWalkthrough);
|
|
6905
7079
|
return {
|
|
6906
7080
|
visible: ctx.features.enableEditor && noActiveWalkthrough,
|
|
@@ -6908,7 +7082,7 @@ const selector$4 = (ctx) => {
|
|
|
6908
7082
|
isReadOnly: ctx.toggledFeatures.enableReadOnly ?? !1
|
|
6909
7083
|
};
|
|
6910
7084
|
}, ToggleReadonly = () => {
|
|
6911
|
-
const { visible, disabled, isReadOnly: isReadOnly2 } = useDiagramContext(selector$
|
|
7085
|
+
const { visible, disabled, isReadOnly: isReadOnly2 } = useDiagramContext(selector$5), diagram = useDiagram();
|
|
6912
7086
|
return /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: visible && /* @__PURE__ */ jsxs(
|
|
6913
7087
|
UnstyledButton,
|
|
6914
7088
|
{
|
|
@@ -6992,8 +7166,14 @@ function useLikeC4Projects() {
|
|
|
6992
7166
|
const ctx = useContext(LikeC4ProjectsContext);
|
|
6993
7167
|
return ctx ? ctx.projects : emptyProjects;
|
|
6994
7168
|
}
|
|
6995
|
-
const emptyOnProjectChange = () => {
|
|
6996
|
-
},
|
|
7169
|
+
const emptyOnProjectChange = (id) => {
|
|
7170
|
+
console.warn(`Triggered callback to change project to ${id}, but no <LikeC4ProjectsProvider/> found`);
|
|
7171
|
+
};
|
|
7172
|
+
function useChangeLikeC4Project() {
|
|
7173
|
+
const ctx = useContext(LikeC4ProjectsContext);
|
|
7174
|
+
return ctx ? ctx.onProjectChange : emptyOnProjectChange;
|
|
7175
|
+
}
|
|
7176
|
+
const emptyContext = {
|
|
6997
7177
|
projects: emptyProjects,
|
|
6998
7178
|
onProjectChange: emptyOnProjectChange
|
|
6999
7179
|
};
|
|
@@ -7007,9 +7187,7 @@ function useLikeC4ProjectId() {
|
|
|
7007
7187
|
return ctx.projectId;
|
|
7008
7188
|
}
|
|
7009
7189
|
function useLikeC4Styles() {
|
|
7010
|
-
const
|
|
7011
|
-
model || console.error("No LikeC4ModelContext found");
|
|
7012
|
-
const $styles = model?.$styles ?? LikeC4Styles$1.DEFAULT, [styles, setStyles] = useState($styles);
|
|
7190
|
+
const $styles = useContext(LikeC4ModelContext)?.$styles ?? LikeC4Styles$1.DEFAULT, [styles, setStyles] = useState($styles);
|
|
7013
7191
|
return useEffect(() => {
|
|
7014
7192
|
setStyles((current) => current.equals($styles) ? current : $styles);
|
|
7015
7193
|
}, [$styles]), styles;
|
|
@@ -7310,7 +7488,7 @@ const selectBreadcrumbs = ({ context: context2 }) => {
|
|
|
7310
7488
|
"view-title"
|
|
7311
7489
|
);
|
|
7312
7490
|
return /* @__PURE__ */ jsxs(AnimatePresence, { propagate: !0, mode: "popLayout", children: [
|
|
7313
|
-
/* @__PURE__ */ jsx(
|
|
7491
|
+
/* @__PURE__ */ jsx(LogoButton$1, {}, "logo-button"),
|
|
7314
7492
|
enableNavigationButtons && /* @__PURE__ */ jsx(NavigationButtons, {}, "nav-buttons"),
|
|
7315
7493
|
/* @__PURE__ */ jsxs(
|
|
7316
7494
|
MotionDiv,
|
|
@@ -7479,7 +7657,7 @@ function BrowseRelationshipsButton({ fqn: fqn2 }) {
|
|
|
7479
7657
|
return /* @__PURE__ */ jsx(Tooltip$3, { label: "Browse relationships", children: /* @__PURE__ */ jsx(
|
|
7480
7658
|
ActionIcon,
|
|
7481
7659
|
{
|
|
7482
|
-
size: "
|
|
7660
|
+
size: "md",
|
|
7483
7661
|
variant: "subtle",
|
|
7484
7662
|
color: "gray",
|
|
7485
7663
|
onClick: (e2) => {
|
|
@@ -7490,8 +7668,8 @@ function BrowseRelationshipsButton({ fqn: fqn2 }) {
|
|
|
7490
7668
|
{
|
|
7491
7669
|
stroke: 2,
|
|
7492
7670
|
style: {
|
|
7493
|
-
width: "
|
|
7494
|
-
height: "
|
|
7671
|
+
width: "65%",
|
|
7672
|
+
height: "65%"
|
|
7495
7673
|
}
|
|
7496
7674
|
}
|
|
7497
7675
|
)
|
|
@@ -7503,7 +7681,7 @@ function GoToSourceButton(props) {
|
|
|
7503
7681
|
return onOpenSource ? /* @__PURE__ */ jsx(Tooltip$3, { label: "Open source", children: /* @__PURE__ */ jsx(
|
|
7504
7682
|
ActionIcon,
|
|
7505
7683
|
{
|
|
7506
|
-
size: "
|
|
7684
|
+
size: "md",
|
|
7507
7685
|
variant: "subtle",
|
|
7508
7686
|
color: "gray",
|
|
7509
7687
|
onClick: (e2) => {
|
|
@@ -7513,10 +7691,44 @@ function GoToSourceButton(props) {
|
|
|
7513
7691
|
deployment: props.deploymentId
|
|
7514
7692
|
});
|
|
7515
7693
|
},
|
|
7516
|
-
children: /* @__PURE__ */ jsx(IconFileSymlink, { stroke: 1.8, style: { width: "
|
|
7694
|
+
children: /* @__PURE__ */ jsx(IconFileSymlink, { stroke: 1.8, style: { width: "65%" } })
|
|
7517
7695
|
}
|
|
7518
7696
|
) }) : null;
|
|
7519
7697
|
}
|
|
7698
|
+
function BorderStyleOption({
|
|
7699
|
+
elementBorderStyle = "none",
|
|
7700
|
+
onChange
|
|
7701
|
+
}) {
|
|
7702
|
+
const [value, setValue] = useState(elementBorderStyle);
|
|
7703
|
+
return useEffect(() => {
|
|
7704
|
+
setValue(elementBorderStyle);
|
|
7705
|
+
}, [elementBorderStyle]), /* @__PURE__ */ jsx(
|
|
7706
|
+
SegmentedControl,
|
|
7707
|
+
{
|
|
7708
|
+
size: "xs",
|
|
7709
|
+
fz: 9,
|
|
7710
|
+
fullWidth: !0,
|
|
7711
|
+
withItemsBorders: !1,
|
|
7712
|
+
value,
|
|
7713
|
+
onChange: (v) => {
|
|
7714
|
+
const border = v;
|
|
7715
|
+
setValue(border), onChange({ border });
|
|
7716
|
+
},
|
|
7717
|
+
styles: {
|
|
7718
|
+
label: {
|
|
7719
|
+
paddingTop: 2,
|
|
7720
|
+
paddingBottom: 2
|
|
7721
|
+
}
|
|
7722
|
+
},
|
|
7723
|
+
data: [
|
|
7724
|
+
{ label: "Solid", value: "solid" },
|
|
7725
|
+
{ label: "Dashed", value: "dashed" },
|
|
7726
|
+
{ label: "Dotted", value: "dotted" },
|
|
7727
|
+
{ label: "None", value: "none" }
|
|
7728
|
+
]
|
|
7729
|
+
}
|
|
7730
|
+
);
|
|
7731
|
+
}
|
|
7520
7732
|
const SemanticColors = [
|
|
7521
7733
|
"primary",
|
|
7522
7734
|
"secondary",
|
|
@@ -7535,16 +7747,16 @@ function ColorButton({
|
|
|
7535
7747
|
Popover,
|
|
7536
7748
|
{
|
|
7537
7749
|
clickOutsideEvents: ["pointerdown", "mousedown", "click"],
|
|
7538
|
-
position: "
|
|
7750
|
+
position: "top-start",
|
|
7539
7751
|
offset: 2,
|
|
7540
7752
|
withinPortal: !1,
|
|
7541
7753
|
...props,
|
|
7542
7754
|
children: [
|
|
7543
|
-
/* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Button, { variant: "subtle", color: "gray", size: "
|
|
7755
|
+
/* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Button, { variant: "subtle", color: "gray", size: "xs", px: 6, children: /* @__PURE__ */ jsx(
|
|
7544
7756
|
ColorSwatch,
|
|
7545
7757
|
{
|
|
7546
7758
|
color: theme.colors[elementColor].elements.fill,
|
|
7547
|
-
size:
|
|
7759
|
+
size: 16,
|
|
7548
7760
|
withShadow: !0,
|
|
7549
7761
|
style: { color: "#fff", cursor: "pointer" }
|
|
7550
7762
|
}
|
|
@@ -7676,7 +7888,7 @@ const toolbarTitle = css({
|
|
|
7676
7888
|
textOverflow: "ellipsis",
|
|
7677
7889
|
overflow: "hidden",
|
|
7678
7890
|
whiteSpace: "nowrap"
|
|
7679
|
-
}),
|
|
7891
|
+
}), selectSelectedNodesCount = (context2) => context2.xynodes.filter((x) => x.selected).length, useSelectedNodesCount = () => useDiagramContext(selectSelectedNodesCount);
|
|
7680
7892
|
function Toolbar({ title: title2, children, nodeProps, ...props }) {
|
|
7681
7893
|
const selectedNodesCount = useSelectedNodesCount(), {
|
|
7682
7894
|
selected = !1,
|
|
@@ -7708,9 +7920,9 @@ function Toolbar({ title: title2, children, nodeProps, ...props }) {
|
|
|
7708
7920
|
onClick: stopPropagation,
|
|
7709
7921
|
onDoubleClick: stopPropagation,
|
|
7710
7922
|
withBorder: !0,
|
|
7711
|
-
children: /* @__PURE__ */ jsxs(
|
|
7712
|
-
/* @__PURE__ */ jsx(Box
|
|
7713
|
-
/* @__PURE__ */ jsx(
|
|
7923
|
+
children: /* @__PURE__ */ jsxs(VStack, { gap: "2", children: [
|
|
7924
|
+
/* @__PURE__ */ jsx(Box, { px: "1", children: /* @__PURE__ */ jsx(Text, { className: toolbarTitle, children: title2 }) }),
|
|
7925
|
+
/* @__PURE__ */ jsx(HStack, { gap: "1", children })
|
|
7714
7926
|
] })
|
|
7715
7927
|
}
|
|
7716
7928
|
)
|
|
@@ -7824,44 +8036,12 @@ function CompoundDeploymentToolbar(props) {
|
|
|
7824
8036
|
}
|
|
7825
8037
|
);
|
|
7826
8038
|
}
|
|
7827
|
-
function BorderStyleOption({
|
|
7828
|
-
elementBorderStyle = "dashed",
|
|
7829
|
-
onChange
|
|
7830
|
-
}) {
|
|
7831
|
-
const [value, setValue] = useState(elementBorderStyle);
|
|
7832
|
-
return useEffect(() => {
|
|
7833
|
-
setValue(elementBorderStyle);
|
|
7834
|
-
}, [elementBorderStyle]), /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(
|
|
7835
|
-
SegmentedControl,
|
|
7836
|
-
{
|
|
7837
|
-
size: "xs",
|
|
7838
|
-
fullWidth: !0,
|
|
7839
|
-
withItemsBorders: !1,
|
|
7840
|
-
value,
|
|
7841
|
-
onChange: (v) => {
|
|
7842
|
-
const border = v;
|
|
7843
|
-
setValue(border), onChange({ border });
|
|
7844
|
-
},
|
|
7845
|
-
styles: {
|
|
7846
|
-
label: {
|
|
7847
|
-
paddingTop: "0.5",
|
|
7848
|
-
paddingBottom: "0.5"
|
|
7849
|
-
}
|
|
7850
|
-
},
|
|
7851
|
-
data: [
|
|
7852
|
-
{ label: "Solid", value: "solid" },
|
|
7853
|
-
{ label: "Dashed", value: "dashed" },
|
|
7854
|
-
{ label: "Dotted", value: "dotted" },
|
|
7855
|
-
{ label: "None", value: "none" }
|
|
7856
|
-
]
|
|
7857
|
-
}
|
|
7858
|
-
) });
|
|
7859
|
-
}
|
|
7860
8039
|
function ElementToolbar(props) {
|
|
7861
8040
|
const { enableVscode, enableRelationshipBrowser } = useEnabledFeatures(), {
|
|
7862
8041
|
data: {
|
|
7863
8042
|
shape,
|
|
7864
|
-
modelFqn
|
|
8043
|
+
modelFqn,
|
|
8044
|
+
style
|
|
7865
8045
|
}
|
|
7866
8046
|
} = props, { elementColor, onColorPreview, onChange } = useHandlers(modelFqn, props);
|
|
7867
8047
|
return /* @__PURE__ */ jsxs(
|
|
@@ -7871,6 +8051,14 @@ function ElementToolbar(props) {
|
|
|
7871
8051
|
title: modelFqn,
|
|
7872
8052
|
align: "start",
|
|
7873
8053
|
children: [
|
|
8054
|
+
/* @__PURE__ */ jsx(
|
|
8055
|
+
ColorButton,
|
|
8056
|
+
{
|
|
8057
|
+
elementColor,
|
|
8058
|
+
onColorPreview,
|
|
8059
|
+
onChange
|
|
8060
|
+
}
|
|
8061
|
+
),
|
|
7874
8062
|
/* @__PURE__ */ jsx(
|
|
7875
8063
|
ElementShapeButton,
|
|
7876
8064
|
{
|
|
@@ -7879,12 +8067,10 @@ function ElementToolbar(props) {
|
|
|
7879
8067
|
}
|
|
7880
8068
|
),
|
|
7881
8069
|
/* @__PURE__ */ jsx(
|
|
7882
|
-
|
|
8070
|
+
BorderStyleOption,
|
|
7883
8071
|
{
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
onChange,
|
|
7887
|
-
position: "right-end"
|
|
8072
|
+
elementBorderStyle: style?.border ?? "none",
|
|
8073
|
+
onChange
|
|
7888
8074
|
}
|
|
7889
8075
|
),
|
|
7890
8076
|
enableVscode && /* @__PURE__ */ jsx(GoToSourceButton, { elementId: modelFqn }),
|
|
@@ -7898,7 +8084,8 @@ function DeploymentElementToolbar(props) {
|
|
|
7898
8084
|
data: {
|
|
7899
8085
|
shape,
|
|
7900
8086
|
deploymentFqn,
|
|
7901
|
-
modelFqn
|
|
8087
|
+
modelFqn,
|
|
8088
|
+
style
|
|
7902
8089
|
}
|
|
7903
8090
|
} = props, { elementColor, onColorPreview, onChange } = useHandlers(deploymentFqn, props);
|
|
7904
8091
|
return /* @__PURE__ */ jsxs(
|
|
@@ -7908,6 +8095,14 @@ function DeploymentElementToolbar(props) {
|
|
|
7908
8095
|
title: deploymentFqn,
|
|
7909
8096
|
align: "start",
|
|
7910
8097
|
children: [
|
|
8098
|
+
/* @__PURE__ */ jsx(
|
|
8099
|
+
ColorButton,
|
|
8100
|
+
{
|
|
8101
|
+
elementColor,
|
|
8102
|
+
onColorPreview,
|
|
8103
|
+
onChange
|
|
8104
|
+
}
|
|
8105
|
+
),
|
|
7911
8106
|
/* @__PURE__ */ jsx(
|
|
7912
8107
|
ElementShapeButton,
|
|
7913
8108
|
{
|
|
@@ -7916,12 +8111,10 @@ function DeploymentElementToolbar(props) {
|
|
|
7916
8111
|
}
|
|
7917
8112
|
),
|
|
7918
8113
|
/* @__PURE__ */ jsx(
|
|
7919
|
-
|
|
8114
|
+
BorderStyleOption,
|
|
7920
8115
|
{
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
onChange,
|
|
7924
|
-
position: "right-end"
|
|
8116
|
+
elementBorderStyle: style?.border ?? "none",
|
|
8117
|
+
onChange
|
|
7925
8118
|
}
|
|
7926
8119
|
),
|
|
7927
8120
|
enableVscode && /* @__PURE__ */ jsx(GoToSourceButton, { deploymentId: deploymentFqn }),
|
|
@@ -7958,7 +8151,8 @@ function ElementShapeButton({
|
|
|
7958
8151
|
{
|
|
7959
8152
|
variant: "light",
|
|
7960
8153
|
color: "gray",
|
|
7961
|
-
size: "
|
|
8154
|
+
size: "xs",
|
|
8155
|
+
px: 8,
|
|
7962
8156
|
rightSection: /* @__PURE__ */ jsx(IconSelector, { size: 12 }),
|
|
7963
8157
|
children: elementShape
|
|
7964
8158
|
}
|
|
@@ -8925,7 +9119,7 @@ const WalkthroughPanel = memo$1(() => {
|
|
|
8925
9119
|
)
|
|
8926
9120
|
}
|
|
8927
9121
|
) });
|
|
8928
|
-
}), NavigationPanel = memo$1(() => {
|
|
9122
|
+
}), NavigationPanel$1 = memo$1(() => {
|
|
8929
9123
|
const diagram = useDiagram(), view = useCurrentView(), viewModel = useOptionalCurrentViewModel(), actorRef = useActorRef(
|
|
8930
9124
|
navigationPanelActorLogic,
|
|
8931
9125
|
{
|
|
@@ -8980,7 +9174,7 @@ const WalkthroughPanel = memo$1(() => {
|
|
|
8980
9174
|
}
|
|
8981
9175
|
);
|
|
8982
9176
|
});
|
|
8983
|
-
NavigationPanel.displayName = "NavigationPanel";
|
|
9177
|
+
NavigationPanel$1.displayName = "NavigationPanel";
|
|
8984
9178
|
const NavigationPanelImpl = ({ actor }) => {
|
|
8985
9179
|
const opened = useSelector(actor, (s) => s.hasTag("active")), portalProps = useMantinePortalProps();
|
|
8986
9180
|
return /* @__PURE__ */ jsxs(
|
|
@@ -9737,7 +9931,7 @@ function useRelationshipsBrowser() {
|
|
|
9737
9931
|
}
|
|
9738
9932
|
}), [actor]);
|
|
9739
9933
|
}
|
|
9740
|
-
const RelationshipEdge$
|
|
9934
|
+
const RelationshipEdge$3 = memoEdge((props) => {
|
|
9741
9935
|
const browser = useRelationshipsBrowser(), { enableNavigateTo } = useEnabledFeatures(), {
|
|
9742
9936
|
data: {
|
|
9743
9937
|
navigateTo,
|
|
@@ -9748,7 +9942,6 @@ const RelationshipEdge$2 = memoEdge((props) => {
|
|
|
9748
9942
|
...props,
|
|
9749
9943
|
data: {
|
|
9750
9944
|
...props.data,
|
|
9751
|
-
line: "solid",
|
|
9752
9945
|
color: "amber"
|
|
9753
9946
|
}
|
|
9754
9947
|
} : props;
|
|
@@ -10174,12 +10367,12 @@ const node = css({
|
|
|
10174
10367
|
) })
|
|
10175
10368
|
] })
|
|
10176
10369
|
] });
|
|
10177
|
-
}), nodeTypes$
|
|
10370
|
+
}), nodeTypes$2 = {
|
|
10178
10371
|
element: ElementNode$1,
|
|
10179
10372
|
compound: CompoundNode$1,
|
|
10180
10373
|
empty: EmptyNode
|
|
10181
|
-
}, edgeTypes$
|
|
10182
|
-
relationship: RelationshipEdge$
|
|
10374
|
+
}, edgeTypes$3 = {
|
|
10375
|
+
relationship: RelationshipEdge$3
|
|
10183
10376
|
};
|
|
10184
10377
|
function RelationshipsBrowser({ actorRef }) {
|
|
10185
10378
|
const initialRef = useRef(null);
|
|
@@ -10188,18 +10381,18 @@ function RelationshipsBrowser({ actorRef }) {
|
|
|
10188
10381
|
initialEdges: []
|
|
10189
10382
|
}), /* @__PURE__ */ jsx(RelationshipsBrowserActorContext.Provider, { value: actorRef, children: /* @__PURE__ */ jsx(ReactFlowProvider, { ...initialRef.current, children: /* @__PURE__ */ jsx(LayoutGroup, { id: actorRef.sessionId, inherit: !1, children: /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(RelationshipsBrowserXYFlow, {}) }) }) }) });
|
|
10190
10383
|
}
|
|
10191
|
-
const selector$
|
|
10384
|
+
const selector$4 = (state) => ({
|
|
10192
10385
|
isActive: state.hasTag("active"),
|
|
10193
10386
|
nodes: state.context.xynodes,
|
|
10194
10387
|
edges: state.context.xyedges
|
|
10195
|
-
}), selectorEq = (a, b) => a.isActive === b.isActive && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges), RelationshipsBrowserXYFlow = memo$1(() => {
|
|
10388
|
+
}), selectorEq$1 = (a, b) => a.isActive === b.isActive && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges), RelationshipsBrowserXYFlow = memo$1(() => {
|
|
10196
10389
|
const browser = useRelationshipsBrowser(), {
|
|
10197
10390
|
isActive,
|
|
10198
10391
|
nodes,
|
|
10199
10392
|
edges
|
|
10200
10393
|
} = useRelationshipsBrowserState(
|
|
10201
|
-
selector$
|
|
10202
|
-
selectorEq
|
|
10394
|
+
selector$4,
|
|
10395
|
+
selectorEq$1
|
|
10203
10396
|
);
|
|
10204
10397
|
return /* @__PURE__ */ jsx(
|
|
10205
10398
|
BaseXYFlow,
|
|
@@ -10211,8 +10404,8 @@ const selector$3 = (state) => ({
|
|
|
10211
10404
|
isActive ? "initialized" : "not-initialized",
|
|
10212
10405
|
"relationships-browser"
|
|
10213
10406
|
),
|
|
10214
|
-
nodeTypes: nodeTypes$
|
|
10215
|
-
edgeTypes: edgeTypes$
|
|
10407
|
+
nodeTypes: nodeTypes$2,
|
|
10408
|
+
edgeTypes: edgeTypes$3,
|
|
10216
10409
|
fitView: !1,
|
|
10217
10410
|
onNodeClick: useCallbackRef((_e, node2) => {
|
|
10218
10411
|
_e.stopPropagation(), browser.send({ type: "xyflow.nodeClick", node: node2 });
|
|
@@ -11096,7 +11289,7 @@ function ElementMetata({
|
|
|
11096
11289
|
)
|
|
11097
11290
|
] }) });
|
|
11098
11291
|
}
|
|
11099
|
-
const selector$
|
|
11292
|
+
const selector$3 = (s) => ({
|
|
11100
11293
|
viewId: s.context.currentView.id,
|
|
11101
11294
|
fromNode: s.context.initiatedFrom.node,
|
|
11102
11295
|
rectFromNode: s.context.initiatedFrom.clientRect,
|
|
@@ -11108,7 +11301,7 @@ function ElementDetails({
|
|
|
11108
11301
|
}) {
|
|
11109
11302
|
const props = useSelector(
|
|
11110
11303
|
actorRef,
|
|
11111
|
-
selector$
|
|
11304
|
+
selector$3,
|
|
11112
11305
|
shallowEqual
|
|
11113
11306
|
);
|
|
11114
11307
|
return /* @__PURE__ */ jsx(ElementDetailsActorContext.Provider, { value: actorRef, children: /* @__PURE__ */ jsx(
|
|
@@ -11205,7 +11398,7 @@ function computeRelationshipDetailsViewData({
|
|
|
11205
11398
|
relationships
|
|
11206
11399
|
};
|
|
11207
11400
|
}
|
|
11208
|
-
const RelationshipEdge$
|
|
11401
|
+
const RelationshipEdge$2 = memoEdge((props) => {
|
|
11209
11402
|
const { enableNavigateTo } = useEnabledFeatures(), {
|
|
11210
11403
|
data: { navigateTo }
|
|
11211
11404
|
} = props, [svgPath, labelX, labelY] = getBezierPath(props), diagram = useDiagram();
|
|
@@ -11793,11 +11986,11 @@ const scrollArea$1 = css({
|
|
|
11793
11986
|
]
|
|
11794
11987
|
}
|
|
11795
11988
|
);
|
|
11796
|
-
}, nodeTypes = {
|
|
11989
|
+
}, nodeTypes$1 = {
|
|
11797
11990
|
element: ElementNode,
|
|
11798
11991
|
compound: CompoundNode
|
|
11799
|
-
}, edgeTypes$
|
|
11800
|
-
relationship: RelationshipEdge$
|
|
11992
|
+
}, edgeTypes$2 = {
|
|
11993
|
+
relationship: RelationshipEdge$2
|
|
11801
11994
|
};
|
|
11802
11995
|
function RelationshipDetails({ actorRef }) {
|
|
11803
11996
|
const initialRef = useRef(null);
|
|
@@ -11837,7 +12030,7 @@ const selectSubject = (state) => ({
|
|
|
11837
12030
|
}, [store, instance.viewportInitialized, actor]), useEffect(() => {
|
|
11838
12031
|
data !== null && actor.send({ type: "update.layoutData", data });
|
|
11839
12032
|
}, [data, actor]), null;
|
|
11840
|
-
}), selector$
|
|
12033
|
+
}), selector$2 = ({ context: context2 }) => ({
|
|
11841
12034
|
// subject: context.subject,
|
|
11842
12035
|
// view: state.context.view,
|
|
11843
12036
|
initialized: context2.initialized.xydata && context2.initialized.xyflow,
|
|
@@ -11848,7 +12041,7 @@ const selectSubject = (state) => ({
|
|
|
11848
12041
|
initialized,
|
|
11849
12042
|
nodes,
|
|
11850
12043
|
edges
|
|
11851
|
-
} = useRelationshipDetailsState(selector$
|
|
12044
|
+
} = useRelationshipDetailsState(selector$2, deepEqual);
|
|
11852
12045
|
return /* @__PURE__ */ jsxs(
|
|
11853
12046
|
BaseXYFlow,
|
|
11854
12047
|
{
|
|
@@ -11859,8 +12052,8 @@ const selectSubject = (state) => ({
|
|
|
11859
12052
|
initialized ? "initialized" : "not-initialized",
|
|
11860
12053
|
"likec4-relationship-details"
|
|
11861
12054
|
),
|
|
11862
|
-
nodeTypes,
|
|
11863
|
-
edgeTypes: edgeTypes$
|
|
12055
|
+
nodeTypes: nodeTypes$1,
|
|
12056
|
+
edgeTypes: edgeTypes$2,
|
|
11864
12057
|
onNodesChange: useCallbackRef$1((changes) => {
|
|
11865
12058
|
browser.send({ type: "xyflow.applyNodeChanges", changes });
|
|
11866
12059
|
}),
|
|
@@ -12061,7 +12254,7 @@ function Overlays({ overlaysActorRef }) {
|
|
|
12061
12254
|
});
|
|
12062
12255
|
return /* @__PURE__ */ jsx(DiagramFeatures.Overlays, { children: /* @__PURE__ */ jsx(ErrorBoundary, { onReset: () => overlaysActorRef.send({ type: "close.all" }), children: /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: overlaysReact }) }) }) });
|
|
12063
12256
|
}
|
|
12064
|
-
const [SearchActorContext, useSearchActor] = createSafeContext("SearchActorContext"), selectSearchValue = (s) => s.context.searchValue;
|
|
12257
|
+
const [SearchActorContext, useSearchActor] = createSafeContext$1("SearchActorContext"), selectSearchValue = (s) => s.context.searchValue;
|
|
12065
12258
|
function useSearch() {
|
|
12066
12259
|
const searchActorRef = useSearchActor(), searchValue = useSelector(searchActorRef, selectSearchValue), updateSearch = useCallback((search) => {
|
|
12067
12260
|
searchActorRef.send({ type: "change.search", search });
|
|
@@ -12238,7 +12431,7 @@ const buttonFocused = css.raw({
|
|
|
12238
12431
|
outline: "none",
|
|
12239
12432
|
marginBottom: "2"
|
|
12240
12433
|
}), treeRoot = css(
|
|
12241
|
-
container$
|
|
12434
|
+
container$3.raw({
|
|
12242
12435
|
containerName: "likec4-tree"
|
|
12243
12436
|
}),
|
|
12244
12437
|
{
|
|
@@ -12480,8 +12673,8 @@ const btn = buttonsva(), ElementsColumn = memo$1(() => {
|
|
|
12480
12673
|
byid,
|
|
12481
12674
|
roots: roots.sort(sortByLabel)
|
|
12482
12675
|
};
|
|
12483
|
-
}, [model, search]),
|
|
12484
|
-
return data.all.length === 0 ? /* @__PURE__ */ jsx(NothingFound, {}) : /* @__PURE__ */ jsx(ElementsTree, { data, handleClick });
|
|
12676
|
+
}, [model, search]), handleClick2 = useHandleElementSelection();
|
|
12677
|
+
return data.all.length === 0 ? /* @__PURE__ */ jsx(NothingFound, {}) : /* @__PURE__ */ jsx(ElementsTree, { data, handleClick: handleClick2 });
|
|
12485
12678
|
}), setHoveredNode = () => {
|
|
12486
12679
|
};
|
|
12487
12680
|
function ElementsTree({
|
|
@@ -12490,7 +12683,7 @@ function ElementsTree({
|
|
|
12490
12683
|
byid,
|
|
12491
12684
|
roots
|
|
12492
12685
|
},
|
|
12493
|
-
handleClick
|
|
12686
|
+
handleClick: handleClick2
|
|
12494
12687
|
}) {
|
|
12495
12688
|
const tree = useTree({
|
|
12496
12689
|
multiple: !1
|
|
@@ -12516,7 +12709,7 @@ function ElementsTree({
|
|
|
12516
12709
|
return;
|
|
12517
12710
|
}
|
|
12518
12711
|
if (e2.key === " " || e2.key === "Enter") {
|
|
12519
|
-
stopAndPrevent$1(e2),
|
|
12712
|
+
stopAndPrevent$1(e2), handleClick2(node2.element);
|
|
12520
12713
|
return;
|
|
12521
12714
|
}
|
|
12522
12715
|
}
|
|
@@ -12551,7 +12744,7 @@ function ElementTreeNode({ node: node2, elementProps, hasChildren, expanded }) {
|
|
|
12551
12744
|
icon: element.icon
|
|
12552
12745
|
},
|
|
12553
12746
|
className: cx(btn.icon, elementIcon)
|
|
12554
|
-
}), views = [...element.views()],
|
|
12747
|
+
}), views = [...element.views()], handleClick2 = useHandleElementSelection(), key2 = `@tree.${node2.value}`;
|
|
12555
12748
|
return /* @__PURE__ */ jsxs(MotionDiv, { layoutId: key2, ...elementProps, children: [
|
|
12556
12749
|
/* @__PURE__ */ jsx(
|
|
12557
12750
|
ActionIcon,
|
|
@@ -12586,7 +12779,7 @@ function ElementTreeNode({ node: node2, elementProps, hasChildren, expanded }) {
|
|
|
12586
12779
|
className: cx(btn.root, "group", "likec4-element-button"),
|
|
12587
12780
|
...views.length > 0 && {
|
|
12588
12781
|
onClick: (e2) => {
|
|
12589
|
-
(!hasChildren || expanded) && (e2.stopPropagation(),
|
|
12782
|
+
(!hasChildren || expanded) && (e2.stopPropagation(), handleClick2(element));
|
|
12590
12783
|
}
|
|
12591
12784
|
},
|
|
12592
12785
|
children: [
|
|
@@ -13540,12 +13733,12 @@ const RelationshipPopover = memo$1(() => {
|
|
|
13540
13733
|
}
|
|
13541
13734
|
),
|
|
13542
13735
|
direct.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13543
|
-
/* @__PURE__ */ jsx(Label, { children: "DIRECT RELATIONSHIPS" }),
|
|
13736
|
+
/* @__PURE__ */ jsx(Label$1, { children: "DIRECT RELATIONSHIPS" }),
|
|
13544
13737
|
direct.map(renderRelationship)
|
|
13545
13738
|
] }),
|
|
13546
13739
|
nested.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13547
13740
|
/* @__PURE__ */ jsx(
|
|
13548
|
-
Label,
|
|
13741
|
+
Label$1,
|
|
13549
13742
|
{
|
|
13550
13743
|
css: {
|
|
13551
13744
|
mt: direct.length > 0 ? "2" : "0"
|
|
@@ -13726,15 +13919,15 @@ const RelationshipPopover = memo$1(() => {
|
|
|
13726
13919
|
)
|
|
13727
13920
|
] }),
|
|
13728
13921
|
r2.kind && /* @__PURE__ */ jsxs(HStack, { gap: "2", children: [
|
|
13729
|
-
/* @__PURE__ */ jsx(Label, { children: "kind" }),
|
|
13922
|
+
/* @__PURE__ */ jsx(Label$1, { children: "kind" }),
|
|
13730
13923
|
/* @__PURE__ */ jsx(Text, { size: "xs", className: css({ userSelect: "all" }), children: r2.kind })
|
|
13731
13924
|
] }),
|
|
13732
13925
|
r2.technology && /* @__PURE__ */ jsxs(HStack, { gap: "2", children: [
|
|
13733
|
-
/* @__PURE__ */ jsx(Label, { children: "technology" }),
|
|
13926
|
+
/* @__PURE__ */ jsx(Label$1, { children: "technology" }),
|
|
13734
13927
|
/* @__PURE__ */ jsx(Text, { size: "xs", className: css({ userSelect: "all" }), children: r2.technology })
|
|
13735
13928
|
] }),
|
|
13736
13929
|
r2.summary.nonEmpty && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13737
|
-
/* @__PURE__ */ jsx(Label, { children: "description" }),
|
|
13930
|
+
/* @__PURE__ */ jsx(Label$1, { children: "description" }),
|
|
13738
13931
|
/* @__PURE__ */ jsx(
|
|
13739
13932
|
Box,
|
|
13740
13933
|
{
|
|
@@ -13752,13 +13945,13 @@ const RelationshipPopover = memo$1(() => {
|
|
|
13752
13945
|
)
|
|
13753
13946
|
] }),
|
|
13754
13947
|
links.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13755
|
-
/* @__PURE__ */ jsx(Label, { children: "links" }),
|
|
13948
|
+
/* @__PURE__ */ jsx(Label$1, { children: "links" }),
|
|
13756
13949
|
/* @__PURE__ */ jsx(HStack, { gap: "1", flexWrap: "wrap", children: links.map((link) => /* @__PURE__ */ jsx(Link, { size: "sm", value: link }, link.url)) })
|
|
13757
13950
|
] })
|
|
13758
13951
|
]
|
|
13759
13952
|
}
|
|
13760
13953
|
);
|
|
13761
|
-
}), Label = styled("div", {
|
|
13954
|
+
}), Label$1 = styled("div", {
|
|
13762
13955
|
base: {
|
|
13763
13956
|
display: "block",
|
|
13764
13957
|
fontSize: "xxs",
|
|
@@ -14000,14 +14193,14 @@ const shapeBadge = css({
|
|
|
14000
14193
|
)
|
|
14001
14194
|
}
|
|
14002
14195
|
);
|
|
14003
|
-
}, selector = (s) => ({
|
|
14196
|
+
}, selector$1 = (s) => ({
|
|
14004
14197
|
id: s.view.id,
|
|
14005
14198
|
notations: s.view.notation?.nodes ?? []
|
|
14006
14199
|
}), NotationPanel = memo$1(() => {
|
|
14007
14200
|
const height = useXYStore((s) => s.height), {
|
|
14008
14201
|
id,
|
|
14009
14202
|
notations
|
|
14010
|
-
} = useDiagramContext(selector), [isCollapsed, setCollapsed] = useLocalStorage({
|
|
14203
|
+
} = useDiagramContext(selector$1), [isCollapsed, setCollapsed] = useLocalStorage({
|
|
14011
14204
|
key: "notation-webview-collapsed",
|
|
14012
14205
|
defaultValue: !0
|
|
14013
14206
|
}), hasNotations = notations.length > 0, portalProps = useMantinePortalProps();
|
|
@@ -14132,7 +14325,7 @@ const shapeBadge = css({
|
|
|
14132
14325
|
console.warn("DiagramUI: resetting error boundary and rerendering..."), rerender();
|
|
14133
14326
|
}, []);
|
|
14134
14327
|
return /* @__PURE__ */ jsxs(ErrorBoundary, { onReset: handleReset, children: [
|
|
14135
|
-
enableControls && /* @__PURE__ */ jsx(NavigationPanel, {}),
|
|
14328
|
+
enableControls && /* @__PURE__ */ jsx(NavigationPanel$1, {}),
|
|
14136
14329
|
overlaysActorRef && /* @__PURE__ */ jsx(Overlays, { overlaysActorRef }),
|
|
14137
14330
|
enableNotations && /* @__PURE__ */ jsx(NotationPanel, {}),
|
|
14138
14331
|
enableSearch && searchActorRef && /* @__PURE__ */ jsx(Search, { searchActorRef }),
|
|
@@ -14302,7 +14495,7 @@ const getEdgeCenter = (path) => {
|
|
|
14302
14495
|
x: Math.round(dompoint.x),
|
|
14303
14496
|
y: Math.round(dompoint.y)
|
|
14304
14497
|
};
|
|
14305
|
-
}, RelationshipEdge = memoEdge((props) => {
|
|
14498
|
+
}, RelationshipEdge$1 = memoEdge((props) => {
|
|
14306
14499
|
const [isControlPointDragging, setIsControlPointDragging] = useState(!1), isControlPointDraggingRef = useRef(isControlPointDragging);
|
|
14307
14500
|
isControlPointDraggingRef.current = isControlPointDragging;
|
|
14308
14501
|
const xyflow2 = useXYFlow(), diagram = useDiagram(), {
|
|
@@ -14460,7 +14653,7 @@ const getEdgeCenter = (path) => {
|
|
|
14460
14653
|
)
|
|
14461
14654
|
] });
|
|
14462
14655
|
});
|
|
14463
|
-
RelationshipEdge.displayName = "RelationshipEdge";
|
|
14656
|
+
RelationshipEdge$1.displayName = "RelationshipEdge";
|
|
14464
14657
|
function ControlPoints({
|
|
14465
14658
|
isControlPointDragging,
|
|
14466
14659
|
edgeProps,
|
|
@@ -14638,7 +14831,7 @@ const BuiltinNodes = {
|
|
|
14638
14831
|
SequenceActorNode,
|
|
14639
14832
|
SequenceParallelArea
|
|
14640
14833
|
}, BuiltinEdges = {
|
|
14641
|
-
RelationshipEdge,
|
|
14834
|
+
RelationshipEdge: RelationshipEdge$1,
|
|
14642
14835
|
SequenceStepEdge
|
|
14643
14836
|
};
|
|
14644
14837
|
class Rect {
|
|
@@ -14929,7 +15122,7 @@ function useLayoutConstraints() {
|
|
|
14929
15122
|
}
|
|
14930
15123
|
}), [xystore, diagram]);
|
|
14931
15124
|
}
|
|
14932
|
-
const edgeTypes = {
|
|
15125
|
+
const edgeTypes$1 = {
|
|
14933
15126
|
relationship: BuiltinEdges.RelationshipEdge,
|
|
14934
15127
|
"seq-step": BuiltinEdges.SequenceStepEdge
|
|
14935
15128
|
}, builtinNodes = {
|
|
@@ -15027,7 +15220,7 @@ function LikeC4DiagramXYFlow({
|
|
|
15027
15220
|
edges,
|
|
15028
15221
|
className: cx(initialized ? "initialized" : "not-initialized"),
|
|
15029
15222
|
nodeTypes: nodeTypes2,
|
|
15030
|
-
edgeTypes,
|
|
15223
|
+
edgeTypes: edgeTypes$1,
|
|
15031
15224
|
onNodesChange: useCallbackRef((changes) => {
|
|
15032
15225
|
diagram.send({ type: "xyflow.applyNodeChanges", changes });
|
|
15033
15226
|
}),
|
|
@@ -15091,6 +15284,7 @@ function LikeC4DiagramXYFlow({
|
|
|
15091
15284
|
nodesDraggable,
|
|
15092
15285
|
nodesSelectable,
|
|
15093
15286
|
elevateEdgesOnSelect: !enableReadOnly,
|
|
15287
|
+
zIndexMode: "manual",
|
|
15094
15288
|
...nodesDraggable && layoutConstraints,
|
|
15095
15289
|
...props,
|
|
15096
15290
|
...reactFlowProps,
|
|
@@ -16117,7 +16311,7 @@ function getAligner(mode) {
|
|
|
16117
16311
|
nonexhaustive(mode);
|
|
16118
16312
|
}
|
|
16119
16313
|
}
|
|
16120
|
-
const setViewport = (params) => machine.createAction(({ context: context2, event }) => {
|
|
16314
|
+
const setViewport = (params) => machine$1.createAction(({ context: context2, event }) => {
|
|
16121
16315
|
let viewport, duration;
|
|
16122
16316
|
params ? (viewport = params.viewport, duration = params.duration) : (assertEvent(event, "xyflow.setViewport"), viewport = event.viewport, duration = event.duration), duration = duration ?? 400;
|
|
16123
16317
|
const { panZoom } = nonNullable$1(context2.xystore).getState(), animationProps = duration > 0 ? { duration, interpolate: "smooth" } : void 0;
|
|
@@ -16128,7 +16322,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16128
16322
|
}, animationProps).catch((err) => {
|
|
16129
16323
|
console.error("Error during fitDiagram panZoom setViewport", { err });
|
|
16130
16324
|
});
|
|
16131
|
-
}), fitDiagram = (params) => machine.enqueueActions(({ context: context2, event, enqueue }) => {
|
|
16325
|
+
}), fitDiagram$1 = (params) => machine$1.enqueueActions(({ context: context2, event, enqueue }) => {
|
|
16132
16326
|
let bounds = context2.view.bounds, duration;
|
|
16133
16327
|
params ? (bounds = params.bounds ?? context2.view.bounds, duration = params.duration) : event.type === "xyflow.fitDiagram" && (bounds = event.bounds ?? context2.view.bounds, duration = event.duration, enqueue.assign({
|
|
16134
16328
|
viewportChangedManually: !1
|
|
@@ -16146,7 +16340,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16146
16340
|
panZoom?.setViewport(viewport, animationProps).catch((err) => {
|
|
16147
16341
|
console.error("Error during fitDiagram panZoom setViewport", { err });
|
|
16148
16342
|
});
|
|
16149
|
-
}), fitFocusedBounds = () => machine.createAction(({ context: context2 }) => {
|
|
16343
|
+
}), fitFocusedBounds = () => machine$1.createAction(({ context: context2 }) => {
|
|
16150
16344
|
const isActiveSequenceWalkthrough = !!context2.activeWalkthrough && context2.dynamicViewVariant === "sequence", { bounds, duration = 450 } = isActiveSequenceWalkthrough ? activeSequenceBounds({ context: context2 }) : focusedBounds({ context: context2 }), { width, height, panZoom, transform } = nonNullable$1(context2.xystore).getState(), maxZoom = Math.max(1, transform[2]), viewport = getViewportForBounds(
|
|
16151
16345
|
bounds,
|
|
16152
16346
|
width,
|
|
@@ -16162,7 +16356,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16162
16356
|
});
|
|
16163
16357
|
}), DEFAULT_DELAY = 30, raiseSetViewport = (params) => {
|
|
16164
16358
|
const { delay: delay2 = DEFAULT_DELAY, ...rest } = params ?? {};
|
|
16165
|
-
return machine.raise(
|
|
16359
|
+
return machine$1.raise(
|
|
16166
16360
|
{
|
|
16167
16361
|
type: "xyflow.setViewport",
|
|
16168
16362
|
...rest
|
|
@@ -16172,9 +16366,9 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16172
16366
|
delay: delay2
|
|
16173
16367
|
}
|
|
16174
16368
|
);
|
|
16175
|
-
}, cancelFitDiagram = () => machine.cancel("fitDiagram"), raiseFitDiagram = (params) => {
|
|
16369
|
+
}, cancelFitDiagram$1 = () => machine$1.cancel("fitDiagram"), raiseFitDiagram$1 = (params) => {
|
|
16176
16370
|
const { delay: delay2 = DEFAULT_DELAY, ...rest } = params ?? {};
|
|
16177
|
-
return machine.raise(
|
|
16371
|
+
return machine$1.raise(
|
|
16178
16372
|
{
|
|
16179
16373
|
type: "xyflow.fitDiagram",
|
|
16180
16374
|
...rest
|
|
@@ -16184,28 +16378,28 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16184
16378
|
delay: delay2
|
|
16185
16379
|
}
|
|
16186
16380
|
);
|
|
16187
|
-
}, raiseUpdateView = (view) => machine.raise(({ context: context2 }) => ({
|
|
16381
|
+
}, raiseUpdateView = (view) => machine$1.raise(({ context: context2 }) => ({
|
|
16188
16382
|
type: "update.view",
|
|
16189
16383
|
view: context2.view
|
|
16190
|
-
}), { delay: DEFAULT_DELAY }), assignViewportBefore = (viewport) => machine.assign(({ context: context2 }) => ({
|
|
16384
|
+
}), { delay: DEFAULT_DELAY }), assignViewportBefore = (viewport) => machine$1.assign(({ context: context2 }) => ({
|
|
16191
16385
|
// We can assign
|
|
16192
16386
|
viewportBefore: {
|
|
16193
16387
|
wasChangedManually: context2.viewportChangedManually,
|
|
16194
16388
|
value: { ...context2.viewport }
|
|
16195
16389
|
}
|
|
16196
|
-
})), returnViewportBefore = (params) => machine.enqueueActions(({ enqueue, context: { viewportBefore } }) => {
|
|
16197
|
-
enqueue(cancelFitDiagram()), viewportBefore ? (enqueue.assign({
|
|
16390
|
+
})), returnViewportBefore = (params) => machine$1.enqueueActions(({ enqueue, context: { viewportBefore } }) => {
|
|
16391
|
+
enqueue(cancelFitDiagram$1()), viewportBefore ? (enqueue.assign({
|
|
16198
16392
|
viewportChangedManually: viewportBefore.wasChangedManually,
|
|
16199
16393
|
viewportBefore: null
|
|
16200
|
-
}), params && params.delay === 0 ? enqueue(setViewport({ viewport: viewportBefore.value, ...params })) : enqueue(raiseSetViewport({ viewport: viewportBefore.value, ...params }))) : params && params.delay === 0 ? enqueue(fitDiagram({ ...params })) : enqueue(raiseFitDiagram({ ...params }));
|
|
16201
|
-
}), disableCompareWithLatest = () => machine.assign(({ context: context2 }) => ({
|
|
16394
|
+
}), params && params.delay === 0 ? enqueue(setViewport({ viewport: viewportBefore.value, ...params })) : enqueue(raiseSetViewport({ viewport: viewportBefore.value, ...params }))) : params && params.delay === 0 ? enqueue(fitDiagram$1({ ...params })) : enqueue(raiseFitDiagram$1({ ...params }));
|
|
16395
|
+
}), disableCompareWithLatest = () => machine$1.assign(({ context: context2 }) => ({
|
|
16202
16396
|
toggledFeatures: {
|
|
16203
16397
|
...context2.toggledFeatures,
|
|
16204
16398
|
enableCompareWithLatest: !1
|
|
16205
16399
|
},
|
|
16206
16400
|
viewportOnAutoLayout: null,
|
|
16207
16401
|
viewportOnManualLayout: null
|
|
16208
|
-
})), onEdgeDoubleClick = () => machine.assign(({ context: context2, event }) => {
|
|
16402
|
+
})), onEdgeDoubleClick = () => machine$1.assign(({ context: context2, event }) => {
|
|
16209
16403
|
if (assertEvent(event, "xyflow.edgeDoubleClick"), !event.edge.data.controlPoints)
|
|
16210
16404
|
return {};
|
|
16211
16405
|
const { nodeLookup } = context2.xystore.getState();
|
|
@@ -16226,7 +16420,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16226
16420
|
return e2;
|
|
16227
16421
|
})
|
|
16228
16422
|
};
|
|
16229
|
-
}), assignLastClickedNode = () => machine.assign(({ context: context2, event }) => {
|
|
16423
|
+
}), assignLastClickedNode = () => machine$1.assign(({ context: context2, event }) => {
|
|
16230
16424
|
assertEvent(event, "xyflow.nodeClick");
|
|
16231
16425
|
const { lastClickedNode } = context2;
|
|
16232
16426
|
return !lastClickedNode || lastClickedNode.id !== event.node.id ? {
|
|
@@ -16242,7 +16436,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16242
16436
|
timestamp: Date.now()
|
|
16243
16437
|
}
|
|
16244
16438
|
};
|
|
16245
|
-
}), assignFocusedNode = () => machine.assign(({ event }) => {
|
|
16439
|
+
}), assignFocusedNode = () => machine$1.assign(({ event }) => {
|
|
16246
16440
|
let focusedNode, autoUnfocusTimer = !1;
|
|
16247
16441
|
switch (event.type) {
|
|
16248
16442
|
case "xyflow.nodeClick":
|
|
@@ -16258,11 +16452,11 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16258
16452
|
focusedNode,
|
|
16259
16453
|
autoUnfocusTimer
|
|
16260
16454
|
};
|
|
16261
|
-
}), resetLastClickedNode = () => machine.assign(() => ({
|
|
16455
|
+
}), resetLastClickedNode = () => machine$1.assign(() => ({
|
|
16262
16456
|
lastClickedNode: null
|
|
16263
|
-
})), updateFeatures = () => machine.assign(({ event }) => (assertEvent(event, "update.features"), {
|
|
16457
|
+
})), updateFeatures = () => machine$1.assign(({ event }) => (assertEvent(event, "update.features"), {
|
|
16264
16458
|
features: { ...event.features }
|
|
16265
|
-
})), updateInputs = () => machine.assign(({ event }) => (assertEvent(event, "update.inputs"), { ...event.inputs })), assignXYDataFromView = (view) => machine.assign(({ context: context2, event }) => {
|
|
16459
|
+
})), updateInputs = () => machine$1.assign(({ event }) => (assertEvent(event, "update.inputs"), { ...event.inputs })), assignXYDataFromView = (view) => machine$1.assign(({ context: context2, event }) => {
|
|
16266
16460
|
let xydata;
|
|
16267
16461
|
assertEvent(event, "update.view"), xydata = "xynodes" in event ? event : convertToXYFlow({
|
|
16268
16462
|
dynamicViewVariant: context2.dynamicViewVariant,
|
|
@@ -16283,50 +16477,50 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16283
16477
|
};
|
|
16284
16478
|
}
|
|
16285
16479
|
return update;
|
|
16286
|
-
}), focusOnNodesAndEdges = () => machine.enqueueActions(({ context: context2, enqueue }) => {
|
|
16480
|
+
}), focusOnNodesAndEdges = () => machine$1.enqueueActions(({ context: context2, enqueue }) => {
|
|
16287
16481
|
const next = focusNodesEdges(context2);
|
|
16288
16482
|
next ? enqueue.assign(next) : enqueue.raise({ type: "key.esc" });
|
|
16289
|
-
}), undimEverything = () => machine.assign(({ context: context2 }) => ({
|
|
16483
|
+
}), undimEverything = () => machine$1.assign(({ context: context2 }) => ({
|
|
16290
16484
|
xynodes: context2.xynodes.map(Base.setDimmed(!1)),
|
|
16291
16485
|
xyedges: context2.xyedges.map(Base.setData({
|
|
16292
16486
|
dimmed: !1,
|
|
16293
16487
|
active: !1
|
|
16294
16488
|
}))
|
|
16295
|
-
})), assignDynamicViewVariant = () => machine.assign(({ event }) => (assertEvent(event, "switch.dynamicViewVariant"), {
|
|
16489
|
+
})), assignDynamicViewVariant = () => machine$1.assign(({ event }) => (assertEvent(event, "switch.dynamicViewVariant"), {
|
|
16296
16490
|
dynamicViewVariant: event.variant
|
|
16297
|
-
})), onNodeMouseEnter = (params) => machine.assign(({ context: context2, event }) => {
|
|
16491
|
+
})), onNodeMouseEnter = (params) => machine$1.assign(({ context: context2, event }) => {
|
|
16298
16492
|
let node2 = params?.node;
|
|
16299
16493
|
return node2 || (assertEvent(event, "xyflow.nodeMouseEnter"), node2 = event.node), {
|
|
16300
16494
|
xynodes: context2.xynodes.map((n2) => n2.id === node2.id ? Base.setHovered(n2, !0) : n2)
|
|
16301
16495
|
};
|
|
16302
|
-
}), onNodeMouseLeave = (params) => machine.assign(({ context: context2, event }) => {
|
|
16496
|
+
}), onNodeMouseLeave = (params) => machine$1.assign(({ context: context2, event }) => {
|
|
16303
16497
|
let node2 = params?.node;
|
|
16304
16498
|
return node2 || (assertEvent(event, "xyflow.nodeMouseLeave"), node2 = event.node), {
|
|
16305
16499
|
xynodes: context2.xynodes.map((n2) => n2.id === node2.id ? Base.setHovered(n2, !1) : n2)
|
|
16306
16500
|
};
|
|
16307
|
-
}), emitPaneClick = () => machine.emit(() => ({
|
|
16501
|
+
}), emitPaneClick = () => machine$1.emit(() => ({
|
|
16308
16502
|
type: "paneClick"
|
|
16309
|
-
})), emitOpenSource = (params) => machine.emit(({ event }) => params ? {
|
|
16503
|
+
})), emitOpenSource = (params) => machine$1.emit(({ event }) => params ? {
|
|
16310
16504
|
type: "openSource",
|
|
16311
16505
|
params
|
|
16312
16506
|
} : (assertEvent(event, "open.source"), {
|
|
16313
16507
|
type: "openSource",
|
|
16314
16508
|
params: event
|
|
16315
|
-
})), emitInitialized = () => machine.emit(({ context: context2 }) => (invariant$1(context2.xyflow, "XYFlow instance not found"), {
|
|
16509
|
+
})), emitInitialized = () => machine$1.emit(({ context: context2 }) => (invariant$1(context2.xyflow, "XYFlow instance not found"), {
|
|
16316
16510
|
type: "initialized",
|
|
16317
16511
|
instance: context2.xyflow
|
|
16318
|
-
})), emitNodeClick = () => machine.emit(({ context: context2, event }) => (assertEvent(event, "xyflow.nodeClick"), {
|
|
16512
|
+
})), emitNodeClick = () => machine$1.emit(({ context: context2, event }) => (assertEvent(event, "xyflow.nodeClick"), {
|
|
16319
16513
|
type: "nodeClick",
|
|
16320
16514
|
node: nonNullable$1(findDiagramNode(context2, event.node.id), `Node ${event.node.id} not found in diagram`),
|
|
16321
16515
|
xynode: event.node
|
|
16322
|
-
})), emitNavigateTo = (params) => machine.emit(({ context: context2 }) => ({
|
|
16516
|
+
})), emitNavigateTo = (params) => machine$1.emit(({ context: context2 }) => ({
|
|
16323
16517
|
type: "navigateTo",
|
|
16324
16518
|
viewId: params?.viewId ?? nonNullable$1(context2.lastOnNavigate, "Invalid state, lastOnNavigate is null").toView
|
|
16325
|
-
})), emitEdgeClick = () => machine.emit(({ context: context2, event }) => (assertEvent(event, "xyflow.edgeClick"), {
|
|
16519
|
+
})), emitEdgeClick = () => machine$1.emit(({ context: context2, event }) => (assertEvent(event, "xyflow.edgeClick"), {
|
|
16326
16520
|
type: "edgeClick",
|
|
16327
16521
|
edge: nonNullable$1(findDiagramEdge(context2, event.edge.id), `Edge ${event.edge.id} not found in diagram`),
|
|
16328
16522
|
xyedge: event.edge
|
|
16329
|
-
})), triggerChange = (viewChange) => machine.enqueueActions(({ event, enqueue }) => {
|
|
16523
|
+
})), triggerChange = (viewChange) => machine$1.enqueueActions(({ event, enqueue }) => {
|
|
16330
16524
|
let change = viewChange;
|
|
16331
16525
|
change || (assertEvent(event, "trigger.change"), change = event.change), enqueue.assign({
|
|
16332
16526
|
viewportChangedManually: !0
|
|
@@ -16337,7 +16531,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16337
16531
|
change
|
|
16338
16532
|
}
|
|
16339
16533
|
);
|
|
16340
|
-
}), emitOnLayoutTypeChange = () => machine.enqueueActions(({ event, system, context: context2, enqueue }) => {
|
|
16534
|
+
}), emitOnLayoutTypeChange = () => machine$1.enqueueActions(({ event, system, context: context2, enqueue }) => {
|
|
16341
16535
|
if (!context2.features.enableCompareWithLatest) {
|
|
16342
16536
|
console.warn("Layout type cannot be changed while CompareWithLatest feature is disabled");
|
|
16343
16537
|
return;
|
|
@@ -16363,7 +16557,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16363
16557
|
type: "onLayoutTypeChange",
|
|
16364
16558
|
layoutType: nextLayoutType
|
|
16365
16559
|
});
|
|
16366
|
-
}), layoutAlign = (params) => machine.createAction(({ context: context2, event }) => {
|
|
16560
|
+
}), layoutAlign = (params) => machine$1.createAction(({ context: context2, event }) => {
|
|
16367
16561
|
let mode;
|
|
16368
16562
|
assertEvent(event, "layout.align"), mode = event.mode;
|
|
16369
16563
|
const xystore = nonNullable$1(context2.xystore, "xystore is not initialized"), { nodeLookup, parentLookup } = xystore.getState(), nodesToAlign = [...new Set(nodeLookup.values().filter((n2) => n2.selected).map((n2) => n2.id)).difference(new Set(parentLookup.keys()))];
|
|
@@ -16382,7 +16576,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16382
16576
|
...aligner.applyPosition(toNodeRect(node2))
|
|
16383
16577
|
};
|
|
16384
16578
|
constraints.updateXYFlow();
|
|
16385
|
-
}), resetEdgesControlPoints = () => machine.assign(({ context: context2 }) => {
|
|
16579
|
+
}), resetEdgesControlPoints = () => machine$1.assign(({ context: context2 }) => {
|
|
16386
16580
|
const { nodeLookup } = context2.xystore.getState();
|
|
16387
16581
|
return {
|
|
16388
16582
|
xyedges: context2.xyedges.map((edge) => {
|
|
@@ -16400,16 +16594,16 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16400
16594
|
};
|
|
16401
16595
|
})
|
|
16402
16596
|
};
|
|
16403
|
-
}), notationsHighlight = () => machine.assign(({ context: context2, event }) => {
|
|
16597
|
+
}), notationsHighlight = () => machine$1.assign(({ context: context2, event }) => {
|
|
16404
16598
|
assertEvent(event, "notations.highlight");
|
|
16405
16599
|
const { notation, kind } = event, targetKinds = kind ? [kind] : notation.kinds, shouldHighlight = (node2) => node2.notation === notation.title && node2.shape === notation.shape && node2.color === notation.color && targetKinds.includes(node2.kind), xynodes = context2.xynodes.map((n2) => {
|
|
16406
16600
|
const node2 = findDiagramNode(context2, n2.id), highlighted = node2 && shouldHighlight(node2);
|
|
16407
16601
|
return Base.setDimmed(n2, highlighted ? !1 : "immediate");
|
|
16408
16602
|
}), xyedges = context2.xyedges.map((edge) => Base.setDimmed(edge, !0));
|
|
16409
16603
|
return { xynodes, xyedges };
|
|
16410
|
-
}), tagHighlight = () => machine.assign(({ context: context2, event }) => (assertEvent(event, "tag.highlight"), {
|
|
16604
|
+
}), tagHighlight = () => machine$1.assign(({ context: context2, event }) => (assertEvent(event, "tag.highlight"), {
|
|
16411
16605
|
xynodes: context2.xynodes.map((n2) => n2.data.tags?.includes(event.tag) ? Base.setDimmed(n2, !1) : Base.setDimmed(n2, !0))
|
|
16412
|
-
})), assignToggledFeatures = () => machine.assign(({ context: context2, event }) => {
|
|
16606
|
+
})), assignToggledFeatures = () => machine$1.assign(({ context: context2, event }) => {
|
|
16413
16607
|
assertEvent(event, "toggle.feature");
|
|
16414
16608
|
const currentValue = context2.toggledFeatures[`enable${event.feature}`] ?? context2.features[`enable${event.feature}`], nextValue = event.forceValue ?? !currentValue;
|
|
16415
16609
|
return {
|
|
@@ -16418,20 +16612,20 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16418
16612
|
[`enable${event.feature}`]: nextValue
|
|
16419
16613
|
}
|
|
16420
16614
|
};
|
|
16421
|
-
}), closeSearch = () => machine.sendTo(
|
|
16615
|
+
}), closeSearch = () => machine$1.sendTo(
|
|
16422
16616
|
typedSystem.searchActor,
|
|
16423
16617
|
{
|
|
16424
16618
|
type: "close"
|
|
16425
16619
|
}
|
|
16426
|
-
), closeAllOverlays = () => machine.sendTo(
|
|
16620
|
+
), closeAllOverlays = () => machine$1.sendTo(
|
|
16427
16621
|
typedSystem.overlaysActor,
|
|
16428
16622
|
{
|
|
16429
16623
|
type: "close.all"
|
|
16430
16624
|
}
|
|
16431
|
-
), stopEditorActor = () => machine.enqueueActions(({ enqueue, system }) => {
|
|
16625
|
+
), stopEditorActor = () => machine$1.enqueueActions(({ enqueue, system }) => {
|
|
16432
16626
|
const actor = typedSystem(system).editorActorRef;
|
|
16433
16627
|
actor && enqueue.stopChild(actor);
|
|
16434
|
-
}), ensureEditorActor = () => machine.enqueueActions(({ enqueue, context: context2, system, check }) => {
|
|
16628
|
+
}), ensureEditorActor = () => machine$1.enqueueActions(({ enqueue, context: context2, system, check }) => {
|
|
16435
16629
|
const hasEditor = check("enabled: Editor"), editor = typedSystem(system).editorActorRef;
|
|
16436
16630
|
if (!hasEditor && editor) {
|
|
16437
16631
|
enqueue.stopChild(editor);
|
|
@@ -16445,29 +16639,29 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16445
16639
|
},
|
|
16446
16640
|
syncSnapshot: !0
|
|
16447
16641
|
});
|
|
16448
|
-
}), startEditing = (subject = "node") => machine.sendTo(
|
|
16642
|
+
}), startEditing = (subject = "node") => machine$1.sendTo(
|
|
16449
16643
|
typedSystem.editorActor,
|
|
16450
16644
|
{
|
|
16451
16645
|
type: "edit.start",
|
|
16452
16646
|
subject
|
|
16453
16647
|
}
|
|
16454
|
-
), sendSynced = () => machine.sendTo(
|
|
16648
|
+
), sendSynced = () => machine$1.sendTo(
|
|
16455
16649
|
typedSystem.editorActor,
|
|
16456
16650
|
{
|
|
16457
16651
|
type: "synced"
|
|
16458
16652
|
}
|
|
16459
|
-
), stopEditing = (wasChanged = !0) => machine.sendTo(
|
|
16653
|
+
), stopEditing = (wasChanged = !0) => machine$1.sendTo(
|
|
16460
16654
|
typedSystem.editorActor,
|
|
16461
16655
|
{
|
|
16462
16656
|
type: "edit.finish",
|
|
16463
16657
|
wasChanged
|
|
16464
16658
|
}
|
|
16465
|
-
), cancelEditing = () => machine.sendTo(
|
|
16659
|
+
), cancelEditing = () => machine$1.sendTo(
|
|
16466
16660
|
typedSystem.editorActor,
|
|
16467
16661
|
{
|
|
16468
16662
|
type: "cancel"
|
|
16469
16663
|
}
|
|
16470
|
-
), hasModelFqn = (node2) => "modelFqn" in node2.data && e$8(node2.data.modelFqn), openElementDetails = (params) => machine.enqueueActions(({ context: context2, event, enqueue }) => {
|
|
16664
|
+
), hasModelFqn = (node2) => "modelFqn" in node2.data && e$8(node2.data.modelFqn), openElementDetails = (params) => machine$1.enqueueActions(({ context: context2, event, enqueue }) => {
|
|
16471
16665
|
let initiatedFrom = null, fromNodeId, subject;
|
|
16472
16666
|
switch (!0) {
|
|
16473
16667
|
case event.type === "xyflow.nodeClick": {
|
|
@@ -16518,7 +16712,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16518
16712
|
...initiatedFrom && { initiatedFrom }
|
|
16519
16713
|
}
|
|
16520
16714
|
);
|
|
16521
|
-
}), openOverlay = () => machine.enqueueActions(({ context: context2, event, enqueue, check }) => {
|
|
16715
|
+
}), openOverlay = () => machine$1.enqueueActions(({ context: context2, event, enqueue, check }) => {
|
|
16522
16716
|
if (assertEvent(event, ["open.relationshipsBrowser", "open.relationshipDetails", "open.elementDetails"]), !check("enabled: Overlays")) {
|
|
16523
16717
|
console.warn("Overlays feature is disabled");
|
|
16524
16718
|
return;
|
|
@@ -16557,12 +16751,12 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16557
16751
|
default:
|
|
16558
16752
|
nonexhaustive(event);
|
|
16559
16753
|
}
|
|
16560
|
-
}), openSourceOfFocusedOrLastClickedNode = () => machine.enqueueActions(({ context: context2, enqueue }) => {
|
|
16754
|
+
}), openSourceOfFocusedOrLastClickedNode = () => machine$1.enqueueActions(({ context: context2, enqueue }) => {
|
|
16561
16755
|
const nodeId = context2.focusedNode ?? context2.lastClickedNode?.id;
|
|
16562
16756
|
if (!nodeId || !context2.features.enableVscode) return;
|
|
16563
16757
|
const diagramNode = findDiagramNode(context2, nodeId);
|
|
16564
16758
|
diagramNode && (diagramNode.deploymentRef ? enqueue.raise({ type: "open.source", deployment: diagramNode.deploymentRef }) : diagramNode.modelRef && enqueue.raise({ type: "open.source", element: diagramNode.modelRef }));
|
|
16565
|
-
}), ensureOverlaysActor = () => machine.enqueueActions(({ enqueue, check, system }) => {
|
|
16759
|
+
}), ensureOverlaysActor = () => machine$1.enqueueActions(({ enqueue, check, system }) => {
|
|
16566
16760
|
const enableOverlays = check("enabled: Overlays"), hasRunning = typedSystem(system).overlaysActorRef;
|
|
16567
16761
|
if (enableOverlays && !hasRunning) {
|
|
16568
16762
|
enqueue.spawnChild("overlaysActorLogic", { id: "overlays", systemId: "overlays" });
|
|
@@ -16571,7 +16765,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16571
16765
|
!enableOverlays && hasRunning && (enqueue.sendTo(hasRunning, {
|
|
16572
16766
|
type: "close.all"
|
|
16573
16767
|
}), enqueue.stopChild("overlays"));
|
|
16574
|
-
}), ensureSearchActor = () => machine.enqueueActions(({ enqueue, context: { features: { enableSearch } }, system }) => {
|
|
16768
|
+
}), ensureSearchActor = () => machine$1.enqueueActions(({ enqueue, context: { features: { enableSearch } }, system }) => {
|
|
16575
16769
|
const hasRunning = typedSystem(system).searchActorRef;
|
|
16576
16770
|
if (enableSearch && !hasRunning) {
|
|
16577
16771
|
enqueue.spawnChild("searchActorLogic", { id: "search", systemId: "search" });
|
|
@@ -16580,7 +16774,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16580
16774
|
!enableSearch && hasRunning && (enqueue.sendTo(hasRunning, {
|
|
16581
16775
|
type: "close"
|
|
16582
16776
|
}), enqueue.stopChild("search"));
|
|
16583
|
-
}), onEdgeMouseEnter = () => machine.enqueueActions(({ enqueue, context: context2, event }) => {
|
|
16777
|
+
}), onEdgeMouseEnter = () => machine$1.enqueueActions(({ enqueue, context: context2, event }) => {
|
|
16584
16778
|
assertEvent(event, "xyflow.edgeMouseEnter");
|
|
16585
16779
|
let edge = event.edge;
|
|
16586
16780
|
enqueue.assign({
|
|
@@ -16590,7 +16784,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16590
16784
|
edge,
|
|
16591
16785
|
event: event.event
|
|
16592
16786
|
});
|
|
16593
|
-
}), onEdgeMouseLeave = () => machine.enqueueActions(({ enqueue, context: context2, event }) => {
|
|
16787
|
+
}), onEdgeMouseLeave = () => machine$1.enqueueActions(({ enqueue, context: context2, event }) => {
|
|
16594
16788
|
assertEvent(event, "xyflow.edgeMouseLeave");
|
|
16595
16789
|
let edge = event.edge;
|
|
16596
16790
|
enqueue.assign({
|
|
@@ -16600,9 +16794,9 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16600
16794
|
edge,
|
|
16601
16795
|
event: event.event
|
|
16602
16796
|
});
|
|
16603
|
-
}), startHotKeyActor = () => machine.spawnChild("hotkeyActorLogic", { id: "hotkey" }), stopHotKeyActor = () => machine.stopChild("hotkey"), AUTO_UNFOCUS_DELAY = 3e3, startAutoUnfocusTimer = () => machine.enqueueActions(({ context: context2, enqueue }) => {
|
|
16797
|
+
}), startHotKeyActor = () => machine$1.spawnChild("hotkeyActorLogic", { id: "hotkey" }), stopHotKeyActor = () => machine$1.stopChild("hotkey"), AUTO_UNFOCUS_DELAY = 3e3, startAutoUnfocusTimer = () => machine$1.enqueueActions(({ context: context2, enqueue }) => {
|
|
16604
16798
|
context2.autoUnfocusTimer && AUTO_UNFOCUS_DELAY > 0 && enqueue.raise({ type: "focus.autoUnfocus" }, { delay: AUTO_UNFOCUS_DELAY, id: "autoUnfocusTimer" });
|
|
16605
|
-
}), cancelAutoUnfocusTimer = () => machine.cancel("autoUnfocusTimer"), handleNavigate = () => machine.enqueueActions(({ enqueue, context: context2, event }) => {
|
|
16799
|
+
}), cancelAutoUnfocusTimer = () => machine$1.cancel("autoUnfocusTimer"), handleNavigate = () => machine$1.enqueueActions(({ enqueue, context: context2, event }) => {
|
|
16606
16800
|
assertEvent(event, ["navigate.to", "navigate.back", "navigate.forward"]);
|
|
16607
16801
|
const {
|
|
16608
16802
|
view,
|
|
@@ -16667,7 +16861,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16667
16861
|
default:
|
|
16668
16862
|
nonexhaustive(event);
|
|
16669
16863
|
}
|
|
16670
|
-
}), updateView = () => machine.enqueueActions(
|
|
16864
|
+
}), updateView$1 = () => machine$1.enqueueActions(
|
|
16671
16865
|
({ enqueue, event, context: context2 }) => {
|
|
16672
16866
|
if (event.type !== "update.view") {
|
|
16673
16867
|
console.warn(`Ignoring unexpected event type: ${event.type} in action 'update.view'`);
|
|
@@ -16702,11 +16896,11 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16702
16896
|
return;
|
|
16703
16897
|
}
|
|
16704
16898
|
}
|
|
16705
|
-
recenter = recenter || nextView._type === "dynamic" && context2.view._type === "dynamic" && nextView.variant !== context2.view.variant, recenter = recenter || context2.toggledFeatures.enableCompareWithLatest === !0 && !!nextView._layout && context2.view._layout !== nextView._layout, recenter && (enqueue(cancelFitDiagram()), enqueue(raiseFitDiagram({
|
|
16899
|
+
recenter = recenter || nextView._type === "dynamic" && context2.view._type === "dynamic" && nextView.variant !== context2.view.variant, recenter = recenter || context2.toggledFeatures.enableCompareWithLatest === !0 && !!nextView._layout && context2.view._layout !== nextView._layout, recenter && (enqueue(cancelFitDiagram$1()), enqueue(raiseFitDiagram$1({
|
|
16706
16900
|
bounds: event.view.bounds
|
|
16707
16901
|
})));
|
|
16708
16902
|
}
|
|
16709
|
-
), initializing = machine.createStateConfig({
|
|
16903
|
+
), initializing = machine$1.createStateConfig({
|
|
16710
16904
|
on: {
|
|
16711
16905
|
"xyflow.init": {
|
|
16712
16906
|
actions: assign(({ context: context2, event }) => ({
|
|
@@ -16731,11 +16925,11 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16731
16925
|
target: "isReady"
|
|
16732
16926
|
}
|
|
16733
16927
|
}
|
|
16734
|
-
}), isReady = machine.createStateConfig({
|
|
16928
|
+
}), isReady = machine$1.createStateConfig({
|
|
16735
16929
|
always: [{
|
|
16736
16930
|
guard: "isReady",
|
|
16737
16931
|
actions: [
|
|
16738
|
-
fitDiagram({ duration: 0 }),
|
|
16932
|
+
fitDiagram$1({ duration: 0 }),
|
|
16739
16933
|
assign(({ context: context2 }) => ({
|
|
16740
16934
|
navigationHistory: {
|
|
16741
16935
|
currentIndex: 0,
|
|
@@ -16752,7 +16946,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16752
16946
|
}, {
|
|
16753
16947
|
target: "initializing"
|
|
16754
16948
|
}]
|
|
16755
|
-
}), handleBrowserForwardBackward = () => machine.assign(({ context: context2, event }) => {
|
|
16949
|
+
}), handleBrowserForwardBackward = () => machine$1.assign(({ context: context2, event }) => {
|
|
16756
16950
|
assertEvent(event, "update.view");
|
|
16757
16951
|
let {
|
|
16758
16952
|
lastOnNavigate,
|
|
@@ -16794,12 +16988,12 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16794
16988
|
};
|
|
16795
16989
|
}
|
|
16796
16990
|
return {};
|
|
16797
|
-
}), navigating = machine.createStateConfig({
|
|
16991
|
+
}), navigating = machine$1.createStateConfig({
|
|
16798
16992
|
id: targetState.navigating.slice(1),
|
|
16799
16993
|
always: {
|
|
16800
16994
|
target: targetState.idle,
|
|
16801
16995
|
actions: [
|
|
16802
|
-
cancelFitDiagram(),
|
|
16996
|
+
cancelFitDiagram$1(),
|
|
16803
16997
|
handleBrowserForwardBackward(),
|
|
16804
16998
|
disableCompareWithLatest(),
|
|
16805
16999
|
enqueueActions(({ enqueue, context: context2, event }) => {
|
|
@@ -16904,16 +17098,16 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16904
17098
|
type: "focus.node",
|
|
16905
17099
|
nodeId: nodeToFocus.id,
|
|
16906
17100
|
autoUnfocus: !0
|
|
16907
|
-
}, { delay: 150 }) : enqueue(raiseFitDiagram({
|
|
17101
|
+
}, { delay: 150 }) : enqueue(raiseFitDiagram$1({
|
|
16908
17102
|
delay: 100
|
|
16909
17103
|
}));
|
|
16910
17104
|
})
|
|
16911
17105
|
]
|
|
16912
17106
|
}
|
|
16913
|
-
}), focused = machine.createStateConfig({
|
|
17107
|
+
}), focused = machine$1.createStateConfig({
|
|
16914
17108
|
id: targetState.focused.slice(1),
|
|
16915
17109
|
entry: [
|
|
16916
|
-
cancelFitDiagram(),
|
|
17110
|
+
cancelFitDiagram$1(),
|
|
16917
17111
|
focusOnNodesAndEdges(),
|
|
16918
17112
|
assignViewportBefore(),
|
|
16919
17113
|
openSourceOfFocusedOrLastClickedNode(),
|
|
@@ -16994,12 +17188,12 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
16994
17188
|
"update.view": {
|
|
16995
17189
|
guard: "is same view",
|
|
16996
17190
|
actions: [
|
|
16997
|
-
updateView(),
|
|
17191
|
+
updateView$1(),
|
|
16998
17192
|
focusOnNodesAndEdges()
|
|
16999
17193
|
]
|
|
17000
17194
|
}
|
|
17001
17195
|
}
|
|
17002
|
-
}), idle = machine.createStateConfig({
|
|
17196
|
+
}), idle = machine$1.createStateConfig({
|
|
17003
17197
|
id: targetState.idle.slice(1),
|
|
17004
17198
|
on: {
|
|
17005
17199
|
"xyflow.nodeClick": [
|
|
@@ -17055,7 +17249,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17055
17249
|
actions: [
|
|
17056
17250
|
resetLastClickedNode(),
|
|
17057
17251
|
enqueueActions(({ context: context2, enqueue, check }) => {
|
|
17058
|
-
check("enabled: FitView") && enqueue(fitDiagram()), enqueue(
|
|
17252
|
+
check("enabled: FitView") && enqueue(fitDiagram$1()), enqueue(
|
|
17059
17253
|
emitOpenSource({ view: context2.view.id })
|
|
17060
17254
|
);
|
|
17061
17255
|
})
|
|
@@ -17092,10 +17286,10 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17092
17286
|
]
|
|
17093
17287
|
}
|
|
17094
17288
|
}
|
|
17095
|
-
}), printing = machine.createStateConfig({
|
|
17289
|
+
}), printing = machine$1.createStateConfig({
|
|
17096
17290
|
id: targetState.printing.slice(1),
|
|
17097
17291
|
entry: [
|
|
17098
|
-
cancelFitDiagram(),
|
|
17292
|
+
cancelFitDiagram$1(),
|
|
17099
17293
|
assignViewportBefore(),
|
|
17100
17294
|
enqueueActions(({ enqueue, context: context2 }) => {
|
|
17101
17295
|
const bounds = context2.view.bounds, OFFSET = 16;
|
|
@@ -17124,7 +17318,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17124
17318
|
]
|
|
17125
17319
|
}
|
|
17126
17320
|
}
|
|
17127
|
-
}), updateActiveWalkthroughState = () => machine.enqueueActions(({ context: context2, enqueue }) => {
|
|
17321
|
+
}), updateActiveWalkthroughState = () => machine$1.enqueueActions(({ context: context2, enqueue }) => {
|
|
17128
17322
|
const { activeWalkthrough } = context2;
|
|
17129
17323
|
if (!activeWalkthrough) {
|
|
17130
17324
|
console.warn("Active walkthrough is null"), enqueue.raise({ type: "walkthrough.end" });
|
|
@@ -17151,26 +17345,26 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17151
17345
|
}) : Base.setDimmed(node2, dimmed);
|
|
17152
17346
|
})
|
|
17153
17347
|
});
|
|
17154
|
-
}), emitWalkthroughStarted = () => machine.emit(({ context: context2 }) => {
|
|
17348
|
+
}), emitWalkthroughStarted = () => machine$1.emit(({ context: context2 }) => {
|
|
17155
17349
|
const edge = context2.xyedges.find((x) => x.id === context2.activeWalkthrough?.stepId);
|
|
17156
17350
|
return invariant$1(edge, "Invalid walkthrough state"), {
|
|
17157
17351
|
type: "walkthroughStarted",
|
|
17158
17352
|
edge
|
|
17159
17353
|
};
|
|
17160
|
-
}), emitWalkthroughStopped = () => machine.emit(() => ({
|
|
17354
|
+
}), emitWalkthroughStopped = () => machine$1.emit(() => ({
|
|
17161
17355
|
type: "walkthroughStopped"
|
|
17162
|
-
})), emitWalkthroughStep = () => machine.emit(({ context: context2 }) => {
|
|
17356
|
+
})), emitWalkthroughStep = () => machine$1.emit(({ context: context2 }) => {
|
|
17163
17357
|
const edge = context2.xyedges.find((x) => x.id === context2.activeWalkthrough?.stepId);
|
|
17164
17358
|
return invariant$1(edge, "Invalid walkthrough state"), {
|
|
17165
17359
|
type: "walkthroughStep",
|
|
17166
17360
|
edge
|
|
17167
17361
|
};
|
|
17168
|
-
}), walkthrough = machine.createStateConfig({
|
|
17362
|
+
}), walkthrough = machine$1.createStateConfig({
|
|
17169
17363
|
id: targetState.walkthrough.slice(1),
|
|
17170
17364
|
entry: [
|
|
17171
17365
|
startHotKeyActor(),
|
|
17172
17366
|
cancelEditing(),
|
|
17173
|
-
cancelFitDiagram(),
|
|
17367
|
+
cancelFitDiagram$1(),
|
|
17174
17368
|
assignViewportBefore(),
|
|
17175
17369
|
assign({
|
|
17176
17370
|
activeWalkthrough: ({ context: context2, event }) => {
|
|
@@ -17262,7 +17456,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17262
17456
|
"update.view": {
|
|
17263
17457
|
guard: "is same view",
|
|
17264
17458
|
actions: [
|
|
17265
|
-
updateView(),
|
|
17459
|
+
updateView$1(),
|
|
17266
17460
|
updateActiveWalkthroughState()
|
|
17267
17461
|
]
|
|
17268
17462
|
},
|
|
@@ -17273,7 +17467,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17273
17467
|
target: targetState.idle
|
|
17274
17468
|
}
|
|
17275
17469
|
}
|
|
17276
|
-
}), ready = machine.createStateConfig({
|
|
17470
|
+
}), ready = machine$1.createStateConfig({
|
|
17277
17471
|
initial: "idle",
|
|
17278
17472
|
entry: [
|
|
17279
17473
|
spawnChild("mediaPrintActorLogic", { id: "mediaPrint" }),
|
|
@@ -17282,7 +17476,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17282
17476
|
ensureSearchActor()
|
|
17283
17477
|
],
|
|
17284
17478
|
exit: [
|
|
17285
|
-
cancelFitDiagram(),
|
|
17479
|
+
cancelFitDiagram$1(),
|
|
17286
17480
|
stopChild("mediaPrint"),
|
|
17287
17481
|
closeAllOverlays(),
|
|
17288
17482
|
closeSearch(),
|
|
@@ -17327,8 +17521,8 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17327
17521
|
"xyflow.resized": {
|
|
17328
17522
|
guard: ({ context: context2 }) => context2.features.enableFitView && !context2.viewportChangedManually,
|
|
17329
17523
|
actions: [
|
|
17330
|
-
cancelFitDiagram(),
|
|
17331
|
-
raiseFitDiagram({ delay: 200 })
|
|
17524
|
+
cancelFitDiagram$1(),
|
|
17525
|
+
raiseFitDiagram$1({ delay: 200 })
|
|
17332
17526
|
]
|
|
17333
17527
|
},
|
|
17334
17528
|
"open.elementDetails": {
|
|
@@ -17424,7 +17618,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17424
17618
|
},
|
|
17425
17619
|
"xyflow.fitDiagram": {
|
|
17426
17620
|
guard: "enabled: FitView",
|
|
17427
|
-
actions: fitDiagram()
|
|
17621
|
+
actions: fitDiagram$1()
|
|
17428
17622
|
},
|
|
17429
17623
|
"xyflow.setViewport": {
|
|
17430
17624
|
actions: setViewport()
|
|
@@ -17437,26 +17631,26 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17437
17631
|
},
|
|
17438
17632
|
// Otherwise, just update the view in place
|
|
17439
17633
|
{
|
|
17440
|
-
actions: updateView()
|
|
17634
|
+
actions: updateView$1()
|
|
17441
17635
|
}
|
|
17442
17636
|
],
|
|
17443
17637
|
"media.print.on": {
|
|
17444
17638
|
target: targetState.printing
|
|
17445
17639
|
}
|
|
17446
17640
|
}
|
|
17447
|
-
}), key = "likec4:diagram:toggledFeatures", DiagramToggledFeaturesPersistence = {
|
|
17641
|
+
}), key$1 = "likec4:diagram:toggledFeatures", DiagramToggledFeaturesPersistence = {
|
|
17448
17642
|
read() {
|
|
17449
17643
|
try {
|
|
17450
|
-
let fromStorage = sessionStorage.getItem(key);
|
|
17644
|
+
let fromStorage = sessionStorage.getItem(key$1);
|
|
17451
17645
|
return fromStorage ? JSON.parse(fromStorage) : null;
|
|
17452
17646
|
} catch (e2) {
|
|
17453
|
-
return console.error(`Error reading fromStorage ${key}:`, e2), null;
|
|
17647
|
+
return console.error(`Error reading fromStorage ${key$1}:`, e2), null;
|
|
17454
17648
|
}
|
|
17455
17649
|
},
|
|
17456
17650
|
write(toggledFeatures) {
|
|
17457
|
-
return sessionStorage.setItem(key, JSON.stringify(t$2(toggledFeatures, e$c))), toggledFeatures;
|
|
17651
|
+
return sessionStorage.setItem(key$1, JSON.stringify(t$2(toggledFeatures, e$c))), toggledFeatures;
|
|
17458
17652
|
}
|
|
17459
|
-
}, _diagramMachine = machine.createMachine({
|
|
17653
|
+
}, _diagramMachine = machine$1.createMachine({
|
|
17460
17654
|
initial: "initializing",
|
|
17461
17655
|
context: ({ input: input2 }) => ({
|
|
17462
17656
|
...input2,
|
|
@@ -17498,7 +17692,7 @@ const setViewport = (params) => machine.createAction(({ context: context2, event
|
|
|
17498
17692
|
type: "final",
|
|
17499
17693
|
entry: [
|
|
17500
17694
|
stopEditorActor(),
|
|
17501
|
-
cancelFitDiagram(),
|
|
17695
|
+
cancelFitDiagram$1(),
|
|
17502
17696
|
stopChild("hotkey"),
|
|
17503
17697
|
stopChild("overlays"),
|
|
17504
17698
|
stopChild("search"),
|
|
@@ -17762,7 +17956,7 @@ function LikeC4Diagram({
|
|
|
17762
17956
|
onNodeClick,
|
|
17763
17957
|
onNodeContextMenu,
|
|
17764
17958
|
onOpenSource,
|
|
17765
|
-
|
|
17959
|
+
onLogoClick,
|
|
17766
17960
|
onLayoutTypeChange,
|
|
17767
17961
|
onInitialized,
|
|
17768
17962
|
view,
|
|
@@ -17849,7 +18043,7 @@ function LikeC4Diagram({
|
|
|
17849
18043
|
onNodeClick,
|
|
17850
18044
|
onNodeContextMenu,
|
|
17851
18045
|
onOpenSource,
|
|
17852
|
-
|
|
18046
|
+
onLogoClick,
|
|
17853
18047
|
onInitialized,
|
|
17854
18048
|
onLayoutTypeChange
|
|
17855
18049
|
},
|
|
@@ -17964,6 +18158,609 @@ function StaticLikeC4Diagram({
|
|
|
17964
18158
|
}
|
|
17965
18159
|
);
|
|
17966
18160
|
}
|
|
18161
|
+
function layoutedProjectsViewToXYFlow(view) {
|
|
18162
|
+
return {
|
|
18163
|
+
xynodes: t$a(view.nodes, projectNodeToXY),
|
|
18164
|
+
xyedges: t$a(view.edges, projectEdgeToXY)
|
|
18165
|
+
};
|
|
18166
|
+
}
|
|
18167
|
+
function projectNodeToXY({ id, x, y, width, height, ...node2 }) {
|
|
18168
|
+
return {
|
|
18169
|
+
id,
|
|
18170
|
+
position: { x, y },
|
|
18171
|
+
type: "project",
|
|
18172
|
+
initialWidth: width,
|
|
18173
|
+
initialHeight: height,
|
|
18174
|
+
draggable: !1,
|
|
18175
|
+
deletable: !1,
|
|
18176
|
+
zIndex: ZIndexes.Element,
|
|
18177
|
+
style: {
|
|
18178
|
+
width,
|
|
18179
|
+
height
|
|
18180
|
+
},
|
|
18181
|
+
data: {
|
|
18182
|
+
id,
|
|
18183
|
+
width,
|
|
18184
|
+
height,
|
|
18185
|
+
...node2
|
|
18186
|
+
}
|
|
18187
|
+
};
|
|
18188
|
+
}
|
|
18189
|
+
function projectEdgeToXY({ id, source, target, ...edge }) {
|
|
18190
|
+
return {
|
|
18191
|
+
id,
|
|
18192
|
+
source,
|
|
18193
|
+
target,
|
|
18194
|
+
type: "relationship",
|
|
18195
|
+
zIndex: ZIndexes.Edge,
|
|
18196
|
+
deletable: !1,
|
|
18197
|
+
data: {
|
|
18198
|
+
id,
|
|
18199
|
+
technology: null,
|
|
18200
|
+
labelBBox: null,
|
|
18201
|
+
...edge
|
|
18202
|
+
}
|
|
18203
|
+
};
|
|
18204
|
+
}
|
|
18205
|
+
const key = "likec4:projects-overview:lastViewport", ProjectsOverviewViewportPersistence = {
|
|
18206
|
+
read() {
|
|
18207
|
+
try {
|
|
18208
|
+
let fromStorage = sessionStorage.getItem(key);
|
|
18209
|
+
return fromStorage ? JSON.parse(fromStorage) : null;
|
|
18210
|
+
} catch (e2) {
|
|
18211
|
+
return console.error(`Error reading fromStorage ${key}:`, e2), null;
|
|
18212
|
+
}
|
|
18213
|
+
},
|
|
18214
|
+
write(viewport) {
|
|
18215
|
+
if (!viewport) {
|
|
18216
|
+
sessionStorage.removeItem(key);
|
|
18217
|
+
return;
|
|
18218
|
+
}
|
|
18219
|
+
sessionStorage.setItem(key, JSON.stringify(viewport));
|
|
18220
|
+
}
|
|
18221
|
+
}, machine = setup({
|
|
18222
|
+
guards: {
|
|
18223
|
+
isReady: ({ context: context2 }) => context2.initialized.xydata && context2.initialized.xyflow && !!context2.xystore && !!context2.xyflow,
|
|
18224
|
+
"click: selected node": ({ event }) => (assertEvent(event, ["xyflow.click.node"]), event.node.selected === !0)
|
|
18225
|
+
}
|
|
18226
|
+
}), updateView = () => machine.assign(({ event }) => {
|
|
18227
|
+
assertEvent(event, "update.view");
|
|
18228
|
+
const { xynodes, xyedges } = layoutedProjectsViewToXYFlow(event.view);
|
|
18229
|
+
return {
|
|
18230
|
+
view: event.view,
|
|
18231
|
+
xynodes,
|
|
18232
|
+
xyedges
|
|
18233
|
+
};
|
|
18234
|
+
}), xyflowApplyNodeChanges = () => machine.assign(({ context: context2, event }) => (assertEvent(event, "xyflow.applyNodeChanges"), {
|
|
18235
|
+
xynodes: applyNodeChanges(event.changes, context2.xynodes)
|
|
18236
|
+
})), xyflowApplyEdgeChanges = () => machine.assign(({ context: context2, event }) => (assertEvent(event, "xyflow.applyEdgeChanges"), {
|
|
18237
|
+
xyedges: applyEdgeChanges(event.changes, context2.xyedges)
|
|
18238
|
+
})), onMouseEnterOrLeave = () => machine.assign(({ context: context2, event }) => {
|
|
18239
|
+
assertEvent(event, [
|
|
18240
|
+
"xyflow.mouse.enter.edge",
|
|
18241
|
+
"xyflow.mouse.leave.edge",
|
|
18242
|
+
"xyflow.mouse.enter.node",
|
|
18243
|
+
"xyflow.mouse.leave.node"
|
|
18244
|
+
]);
|
|
18245
|
+
const isEnter = event.type.startsWith("xyflow.mouse.enter");
|
|
18246
|
+
switch (event.type) {
|
|
18247
|
+
case "xyflow.mouse.enter.edge":
|
|
18248
|
+
case "xyflow.mouse.leave.edge": {
|
|
18249
|
+
const edgeId = event.edge.id;
|
|
18250
|
+
return {
|
|
18251
|
+
xyedges: context2.xyedges.map((e2) => e2.id === edgeId ? Base.setHovered(e2, isEnter) : e2)
|
|
18252
|
+
};
|
|
18253
|
+
}
|
|
18254
|
+
case "xyflow.mouse.enter.node":
|
|
18255
|
+
case "xyflow.mouse.leave.node": {
|
|
18256
|
+
const nodeId = event.node.id;
|
|
18257
|
+
return {
|
|
18258
|
+
xynodes: context2.xynodes.map((n2) => n2.id === nodeId ? Base.setHovered(n2, isEnter) : n2)
|
|
18259
|
+
};
|
|
18260
|
+
}
|
|
18261
|
+
default:
|
|
18262
|
+
nonexhaustive(event);
|
|
18263
|
+
}
|
|
18264
|
+
}), saveViewport = () => machine.createAction(({ context: context2 }) => {
|
|
18265
|
+
const xyflow2 = context2.xyflow;
|
|
18266
|
+
xyflow2 && ProjectsOverviewViewportPersistence.write(xyflow2.getViewport());
|
|
18267
|
+
}), handleClick = () => machine.enqueueActions(({ event, enqueue }) => {
|
|
18268
|
+
if (event.type === "xyflow.click.double") {
|
|
18269
|
+
enqueue(cancelFitDiagram()), enqueue(raiseFitDiagram());
|
|
18270
|
+
return;
|
|
18271
|
+
}
|
|
18272
|
+
if (event.type === "xyflow.click.pane") {
|
|
18273
|
+
enqueue(cancelFitDiagram());
|
|
18274
|
+
return;
|
|
18275
|
+
}
|
|
18276
|
+
console.warn("Unknown event", event);
|
|
18277
|
+
}), cancelFitDiagram = () => machine.cancel("fitDiagram"), raiseFitDiagram = (params) => {
|
|
18278
|
+
const { delay: delay2 = 30, ...rest } = {};
|
|
18279
|
+
return machine.raise(
|
|
18280
|
+
{
|
|
18281
|
+
type: "xyflow.fitDiagram",
|
|
18282
|
+
...rest
|
|
18283
|
+
},
|
|
18284
|
+
{
|
|
18285
|
+
id: "fitDiagram",
|
|
18286
|
+
delay: delay2
|
|
18287
|
+
}
|
|
18288
|
+
);
|
|
18289
|
+
}, fitDiagram = (params) => machine.enqueueActions(({ context: context2, event, enqueue }) => {
|
|
18290
|
+
enqueue(cancelFitDiagram());
|
|
18291
|
+
let bounds = context2.view.bounds, duration;
|
|
18292
|
+
params ? (bounds = params.bounds ?? context2.view.bounds, duration = params.duration) : event.type === "xyflow.fitDiagram" && (bounds = event.bounds ?? context2.view.bounds, duration = event.duration), duration ??= 450;
|
|
18293
|
+
const { width, height, panZoom, transform } = nonNullable$1(context2.xystore).getState(), maxZoom = Math.max(1, transform[2]), viewport = getViewportForBounds(
|
|
18294
|
+
bounds,
|
|
18295
|
+
width,
|
|
18296
|
+
height,
|
|
18297
|
+
MinZoom,
|
|
18298
|
+
maxZoom,
|
|
18299
|
+
context2.fitViewPadding
|
|
18300
|
+
);
|
|
18301
|
+
viewport.x = Math.round(viewport.x), viewport.y = Math.round(viewport.y);
|
|
18302
|
+
const animationProps = duration > 0 ? { duration, interpolate: "smooth" } : void 0;
|
|
18303
|
+
panZoom?.setViewport(viewport, animationProps).catch((err) => {
|
|
18304
|
+
console.error("Error during fitDiagram panZoom setViewport", { err });
|
|
18305
|
+
}), ProjectsOverviewViewportPersistence.write(null);
|
|
18306
|
+
}), restoreViewport = () => machine.enqueueActions(({ context: context2, enqueue }) => {
|
|
18307
|
+
const viewport = ProjectsOverviewViewportPersistence.read();
|
|
18308
|
+
if (viewport) {
|
|
18309
|
+
nonNullable$1(context2.xyflow).setViewport(viewport, {
|
|
18310
|
+
duration: 0
|
|
18311
|
+
});
|
|
18312
|
+
return;
|
|
18313
|
+
}
|
|
18314
|
+
enqueue(fitDiagram({ duration: 0 }));
|
|
18315
|
+
}), dispose = () => machine.assign({
|
|
18316
|
+
xyflow: null,
|
|
18317
|
+
xystore: null,
|
|
18318
|
+
initialized: {
|
|
18319
|
+
xyflow: !1,
|
|
18320
|
+
xydata: !1
|
|
18321
|
+
},
|
|
18322
|
+
xyedges: [],
|
|
18323
|
+
xynodes: []
|
|
18324
|
+
}), assignNavigateTo = () => machine.assign(({ event, context: context2 }) => {
|
|
18325
|
+
let navigateTo;
|
|
18326
|
+
switch (event.type) {
|
|
18327
|
+
case "xyflow.click.node": {
|
|
18328
|
+
navigateTo = event.node;
|
|
18329
|
+
break;
|
|
18330
|
+
}
|
|
18331
|
+
case "navigate.to": {
|
|
18332
|
+
navigateTo = nonNullable$1(context2.xynodes.find((n2) => n2.id === event.fromNode), `Node ${event.fromNode} not found`);
|
|
18333
|
+
break;
|
|
18334
|
+
}
|
|
18335
|
+
default:
|
|
18336
|
+
return console.warn(`Unexpected event ${event.type} in assignNavigateTo`), {};
|
|
18337
|
+
}
|
|
18338
|
+
return {
|
|
18339
|
+
navigateTo
|
|
18340
|
+
};
|
|
18341
|
+
}), _projectOverviewLogic = machine.createMachine({
|
|
18342
|
+
id: "projects-overview",
|
|
18343
|
+
context: ({ input: input2 }) => ({
|
|
18344
|
+
...input2,
|
|
18345
|
+
initialized: {
|
|
18346
|
+
xydata: !1,
|
|
18347
|
+
xyflow: !1
|
|
18348
|
+
},
|
|
18349
|
+
xyflow: null,
|
|
18350
|
+
xystore: null,
|
|
18351
|
+
xynodes: [],
|
|
18352
|
+
xyedges: []
|
|
18353
|
+
}),
|
|
18354
|
+
initial: "init",
|
|
18355
|
+
on: {
|
|
18356
|
+
close: {
|
|
18357
|
+
target: ".closed"
|
|
18358
|
+
}
|
|
18359
|
+
},
|
|
18360
|
+
states: {
|
|
18361
|
+
init: {
|
|
18362
|
+
on: {
|
|
18363
|
+
"update.view": {
|
|
18364
|
+
actions: [
|
|
18365
|
+
updateView(),
|
|
18366
|
+
assign(({ context: context2 }) => ({
|
|
18367
|
+
initialized: {
|
|
18368
|
+
...context2.initialized,
|
|
18369
|
+
xydata: !0
|
|
18370
|
+
}
|
|
18371
|
+
}))
|
|
18372
|
+
],
|
|
18373
|
+
target: "isReady"
|
|
18374
|
+
},
|
|
18375
|
+
"xyflow.init": {
|
|
18376
|
+
actions: [
|
|
18377
|
+
assign(({ context: context2, event }) => ({
|
|
18378
|
+
initialized: {
|
|
18379
|
+
...context2.initialized,
|
|
18380
|
+
xyflow: !0
|
|
18381
|
+
},
|
|
18382
|
+
xyflow: event.xyflow,
|
|
18383
|
+
xystore: event.xystore
|
|
18384
|
+
}))
|
|
18385
|
+
],
|
|
18386
|
+
target: "isReady"
|
|
18387
|
+
}
|
|
18388
|
+
}
|
|
18389
|
+
},
|
|
18390
|
+
isReady: {
|
|
18391
|
+
always: [{
|
|
18392
|
+
guard: "isReady",
|
|
18393
|
+
target: "active"
|
|
18394
|
+
}, {
|
|
18395
|
+
target: "init"
|
|
18396
|
+
}]
|
|
18397
|
+
},
|
|
18398
|
+
active: {
|
|
18399
|
+
tags: "active",
|
|
18400
|
+
entry: [
|
|
18401
|
+
restoreViewport()
|
|
18402
|
+
],
|
|
18403
|
+
on: {
|
|
18404
|
+
"navigate.to": {
|
|
18405
|
+
actions: assignNavigateTo(),
|
|
18406
|
+
target: "navigate"
|
|
18407
|
+
},
|
|
18408
|
+
"xyflow.applyNodeChanges": {
|
|
18409
|
+
actions: xyflowApplyNodeChanges()
|
|
18410
|
+
},
|
|
18411
|
+
"xyflow.applyEdgeChanges": {
|
|
18412
|
+
actions: xyflowApplyEdgeChanges()
|
|
18413
|
+
},
|
|
18414
|
+
"xyflow.mouse.*": {
|
|
18415
|
+
actions: onMouseEnterOrLeave()
|
|
18416
|
+
},
|
|
18417
|
+
"xyflow.click.node": [
|
|
18418
|
+
{
|
|
18419
|
+
guard: "click: selected node",
|
|
18420
|
+
actions: assignNavigateTo(),
|
|
18421
|
+
target: "navigate"
|
|
18422
|
+
}
|
|
18423
|
+
],
|
|
18424
|
+
"xyflow.click.*": {
|
|
18425
|
+
actions: handleClick()
|
|
18426
|
+
},
|
|
18427
|
+
"xyflow.fitDiagram": {
|
|
18428
|
+
actions: fitDiagram()
|
|
18429
|
+
},
|
|
18430
|
+
"update.view": {
|
|
18431
|
+
actions: updateView()
|
|
18432
|
+
}
|
|
18433
|
+
}
|
|
18434
|
+
},
|
|
18435
|
+
navigate: {
|
|
18436
|
+
tags: "active",
|
|
18437
|
+
entry: [
|
|
18438
|
+
cancelFitDiagram(),
|
|
18439
|
+
saveViewport(),
|
|
18440
|
+
assign({
|
|
18441
|
+
xyedges: []
|
|
18442
|
+
}),
|
|
18443
|
+
({ context: { navigateTo, xyflow: xyflow2, xystore }, self }) => {
|
|
18444
|
+
invariant$1(xyflow2 && navigateTo, "Invalid state, xyflow is undefined");
|
|
18445
|
+
const { width, domNode } = nonNullable$1(xystore).getState(), nextZoom = t(
|
|
18446
|
+
Math.min(
|
|
18447
|
+
width * 2 / 3 / navigateTo.data.width
|
|
18448
|
+
// (height - 200) / (navigateTo.data.height),
|
|
18449
|
+
),
|
|
18450
|
+
{ min: MinZoom, max: 2.5 }
|
|
18451
|
+
), next = {
|
|
18452
|
+
x: Math.round(
|
|
18453
|
+
-nextZoom * navigateTo.position.x + (width - nextZoom * navigateTo.data.width) / 2
|
|
18454
|
+
),
|
|
18455
|
+
y: Math.round(-nextZoom * navigateTo.position.y) + 50
|
|
18456
|
+
}, current = xyflow2.getViewport(), otherNodes = domNode.querySelectorAll(
|
|
18457
|
+
`.react-flow__node-project:not([data-id="${navigateTo.id}"]) > *`
|
|
18458
|
+
), otherNodesAnimation = animate(otherNodes, {
|
|
18459
|
+
opacity: 0,
|
|
18460
|
+
scale: 0.9
|
|
18461
|
+
}, {
|
|
18462
|
+
visualDuration: 0.25,
|
|
18463
|
+
delay: stagger(0.08, { from: "center" })
|
|
18464
|
+
}), v = motionValue(1), transform = mapValue(
|
|
18465
|
+
v,
|
|
18466
|
+
[1, 0],
|
|
18467
|
+
[
|
|
18468
|
+
`translate(${current.x}px, ${current.y}px) scale(${current.zoom})`,
|
|
18469
|
+
`translate(${next.x}px, ${next.y}px) scale(${nextZoom})`
|
|
18470
|
+
]
|
|
18471
|
+
), cancelViewportAnimation = styleEffect(
|
|
18472
|
+
domNode.querySelector(".xyflow__viewport"),
|
|
18473
|
+
{ transform }
|
|
18474
|
+
), cancelOpacityAnimation = styleEffect(
|
|
18475
|
+
domNode.querySelector(`.react-flow__node-project:is([data-id="${navigateTo.id}"]) > *`),
|
|
18476
|
+
{ opacity: v }
|
|
18477
|
+
), targetAnimation = animate(
|
|
18478
|
+
v,
|
|
18479
|
+
0,
|
|
18480
|
+
{
|
|
18481
|
+
delay: otherNodes.length > 3 ? 0.25 : 0,
|
|
18482
|
+
type: "spring",
|
|
18483
|
+
stiffness: 350,
|
|
18484
|
+
damping: 40,
|
|
18485
|
+
mass: 1.5,
|
|
18486
|
+
visualDuration: 0.55
|
|
18487
|
+
}
|
|
18488
|
+
);
|
|
18489
|
+
Promise.race([
|
|
18490
|
+
targetAnimation.finished,
|
|
18491
|
+
sleep(750)
|
|
18492
|
+
]).then(() => {
|
|
18493
|
+
cancelViewportAnimation(), cancelOpacityAnimation(), targetAnimation.stop(), otherNodesAnimation.stop(), self.send({
|
|
18494
|
+
type: "emit.navigate.to",
|
|
18495
|
+
projectId: navigateTo.data.projectId
|
|
18496
|
+
});
|
|
18497
|
+
});
|
|
18498
|
+
}
|
|
18499
|
+
],
|
|
18500
|
+
on: {
|
|
18501
|
+
"emit.navigate.to": {
|
|
18502
|
+
actions: emit(({ event }) => ({
|
|
18503
|
+
...event,
|
|
18504
|
+
type: "navigate.to"
|
|
18505
|
+
}))
|
|
18506
|
+
}
|
|
18507
|
+
}
|
|
18508
|
+
},
|
|
18509
|
+
closed: {
|
|
18510
|
+
id: "closed",
|
|
18511
|
+
type: "final",
|
|
18512
|
+
entry: dispose()
|
|
18513
|
+
}
|
|
18514
|
+
}
|
|
18515
|
+
}), projectOverviewLogic = _projectOverviewLogic;
|
|
18516
|
+
function sleep(ms) {
|
|
18517
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
18518
|
+
}
|
|
18519
|
+
const ProjectsOverviewActorContext = createContext(null);
|
|
18520
|
+
function useProjectsOverviewActor() {
|
|
18521
|
+
return nonNullable$1(useContext(ProjectsOverviewActorContext), "No ProjectsOverviewActorContext");
|
|
18522
|
+
}
|
|
18523
|
+
const { withProvider, withContext } = createStyleContext(navigationPanel), shouldForwardProp = (prop, variantKeys) => isValidMotionProp(prop) || !variantKeys.includes(prop) && !isCssProperty(prop), LogoButton = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
18524
|
+
"button",
|
|
18525
|
+
{
|
|
18526
|
+
...props,
|
|
18527
|
+
ref,
|
|
18528
|
+
className: cx(
|
|
18529
|
+
"mantine-active",
|
|
18530
|
+
className
|
|
18531
|
+
),
|
|
18532
|
+
children: [
|
|
18533
|
+
/* @__PURE__ */ jsx("div", {}),
|
|
18534
|
+
/* @__PURE__ */ jsx(
|
|
18535
|
+
Logo$1,
|
|
18536
|
+
{
|
|
18537
|
+
className: css({
|
|
18538
|
+
display: {
|
|
18539
|
+
base: "none",
|
|
18540
|
+
"@/md": "block"
|
|
18541
|
+
}
|
|
18542
|
+
})
|
|
18543
|
+
}
|
|
18544
|
+
),
|
|
18545
|
+
/* @__PURE__ */ jsx(
|
|
18546
|
+
Logo$1,
|
|
18547
|
+
{
|
|
18548
|
+
className: css({
|
|
18549
|
+
display: {
|
|
18550
|
+
base: "block",
|
|
18551
|
+
"@/md": "none"
|
|
18552
|
+
}
|
|
18553
|
+
})
|
|
18554
|
+
}
|
|
18555
|
+
)
|
|
18556
|
+
]
|
|
18557
|
+
}
|
|
18558
|
+
)), Root = withProvider(MotionDiv, "root", {
|
|
18559
|
+
shouldForwardProp
|
|
18560
|
+
}), Body = withContext(MotionDiv, "body", {
|
|
18561
|
+
shouldForwardProp
|
|
18562
|
+
}), Logo = withContext(LogoButton, "logo"), Label = withContext(MotionDiv, "label", {
|
|
18563
|
+
shouldForwardProp
|
|
18564
|
+
});
|
|
18565
|
+
withContext(MotionDiv, "dropdown", {
|
|
18566
|
+
shouldForwardProp
|
|
18567
|
+
});
|
|
18568
|
+
const NavigationPanel = {
|
|
18569
|
+
Root,
|
|
18570
|
+
Body,
|
|
18571
|
+
Logo,
|
|
18572
|
+
Label
|
|
18573
|
+
}, ProjectsOverviewPanel = () => /* @__PURE__ */ jsx(NavigationPanel.Root, { size: "lg", children: /* @__PURE__ */ jsxs(NavigationPanel.Body, { children: [
|
|
18574
|
+
/* @__PURE__ */ jsx(NavigationPanel.Logo, {}),
|
|
18575
|
+
/* @__PURE__ */ jsx(NavigationPanel.Label, { children: "Projects Overview" })
|
|
18576
|
+
] }) }), RelationshipEdge = memoEdge((edgeProps) => {
|
|
18577
|
+
const path = bezierPath(edgeProps.data.points);
|
|
18578
|
+
return /* @__PURE__ */ jsxs(EdgeContainer, { ...edgeProps, children: [
|
|
18579
|
+
/* @__PURE__ */ jsx(
|
|
18580
|
+
EdgePath,
|
|
18581
|
+
{
|
|
18582
|
+
edgeProps,
|
|
18583
|
+
svgPath: path
|
|
18584
|
+
}
|
|
18585
|
+
),
|
|
18586
|
+
/* @__PURE__ */ jsx(EdgeLabelContainer, { edgeProps, children: /* @__PURE__ */ jsx(EdgeLabel, { edgeProps }) })
|
|
18587
|
+
] });
|
|
18588
|
+
});
|
|
18589
|
+
function ProjectNode(props) {
|
|
18590
|
+
const actor = useProjectsOverviewActor(), navigateTo = useCallbackRef$1((e2) => {
|
|
18591
|
+
e2.stopPropagation(), actor.send({ type: "navigate.to", fromNode: props.data.id, projectId: props.data.projectId });
|
|
18592
|
+
});
|
|
18593
|
+
return /* @__PURE__ */ jsxs(
|
|
18594
|
+
ElementNodeContainer,
|
|
18595
|
+
{
|
|
18596
|
+
layout: !0,
|
|
18597
|
+
nodeProps: props,
|
|
18598
|
+
children: [
|
|
18599
|
+
/* @__PURE__ */ jsx(ElementShape, { ...props }),
|
|
18600
|
+
/* @__PURE__ */ jsx(ElementData, { ...props }),
|
|
18601
|
+
/* @__PURE__ */ jsx(
|
|
18602
|
+
ElementActionButtons,
|
|
18603
|
+
{
|
|
18604
|
+
...props,
|
|
18605
|
+
buttons: [
|
|
18606
|
+
{
|
|
18607
|
+
key: "navigate",
|
|
18608
|
+
icon: /* @__PURE__ */ jsx(IconZoomScan, {}),
|
|
18609
|
+
onClick: navigateTo
|
|
18610
|
+
}
|
|
18611
|
+
]
|
|
18612
|
+
}
|
|
18613
|
+
),
|
|
18614
|
+
/* @__PURE__ */ jsx(DefaultHandles, {})
|
|
18615
|
+
]
|
|
18616
|
+
},
|
|
18617
|
+
props.id
|
|
18618
|
+
);
|
|
18619
|
+
}
|
|
18620
|
+
function useProjectsOverviewState(selector3, compare2 = shallowEqual) {
|
|
18621
|
+
const actor = useProjectsOverviewActor();
|
|
18622
|
+
return useSelector(actor, selector3, compare2);
|
|
18623
|
+
}
|
|
18624
|
+
function useProjectsOverviewXYStoreApi() {
|
|
18625
|
+
return useStoreApi();
|
|
18626
|
+
}
|
|
18627
|
+
const nodeTypes = {
|
|
18628
|
+
project: ProjectNode
|
|
18629
|
+
}, edgeTypes = {
|
|
18630
|
+
relationship: RelationshipEdge
|
|
18631
|
+
}, selector = (state) => ({
|
|
18632
|
+
isActive: state.hasTag("active"),
|
|
18633
|
+
nodes: state.context.xynodes,
|
|
18634
|
+
edges: state.context.xyedges
|
|
18635
|
+
}), selectorEq = (a, b) => a.isActive === b.isActive && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges), ProjectsOverviewXY = memo$1(({
|
|
18636
|
+
background = "dots",
|
|
18637
|
+
...props
|
|
18638
|
+
}) => {
|
|
18639
|
+
const actorRef = useProjectsOverviewActor(), {
|
|
18640
|
+
isActive,
|
|
18641
|
+
nodes,
|
|
18642
|
+
edges
|
|
18643
|
+
} = useProjectsOverviewState(
|
|
18644
|
+
selector,
|
|
18645
|
+
selectorEq
|
|
18646
|
+
), xystore = useProjectsOverviewXYStoreApi();
|
|
18647
|
+
return /* @__PURE__ */ jsx(
|
|
18648
|
+
BaseXYFlow,
|
|
18649
|
+
{
|
|
18650
|
+
nodes,
|
|
18651
|
+
edges,
|
|
18652
|
+
className: cx(
|
|
18653
|
+
isActive ? "initialized" : "not-initialized",
|
|
18654
|
+
"projects-overview"
|
|
18655
|
+
),
|
|
18656
|
+
nodeTypes,
|
|
18657
|
+
edgeTypes,
|
|
18658
|
+
fitView: !1,
|
|
18659
|
+
onNodeClick: useCallbackRef((_e, node2) => {
|
|
18660
|
+
_e.stopPropagation(), actorRef.send({ type: "xyflow.click.node", node: node2 });
|
|
18661
|
+
}),
|
|
18662
|
+
onEdgeClick: useCallbackRef((_e, edge) => {
|
|
18663
|
+
_e.stopPropagation(), actorRef.send({ type: "xyflow.click.edge", edge });
|
|
18664
|
+
}),
|
|
18665
|
+
onPaneClick: useCallbackRef((_e) => {
|
|
18666
|
+
_e.stopPropagation(), actorRef.send({ type: "xyflow.click.pane" });
|
|
18667
|
+
}),
|
|
18668
|
+
onDoubleClick: useCallbackRef((_e) => {
|
|
18669
|
+
_e.stopPropagation(), actorRef.send({ type: "xyflow.click.double" });
|
|
18670
|
+
}),
|
|
18671
|
+
onNodesChange: useCallbackRef((changes) => {
|
|
18672
|
+
actorRef.send({ type: "xyflow.applyNodeChanges", changes });
|
|
18673
|
+
}),
|
|
18674
|
+
onEdgesChange: useCallbackRef((changes) => {
|
|
18675
|
+
actorRef.send({ type: "xyflow.applyEdgeChanges", changes });
|
|
18676
|
+
}),
|
|
18677
|
+
onEdgeMouseEnter: useCallbackRef((event, edge) => {
|
|
18678
|
+
actorRef.send({ type: "xyflow.mouse.enter.edge", edge, event });
|
|
18679
|
+
}),
|
|
18680
|
+
onEdgeMouseLeave: useCallbackRef((event, edge) => {
|
|
18681
|
+
actorRef.send({ type: "xyflow.mouse.leave.edge", edge, event });
|
|
18682
|
+
}),
|
|
18683
|
+
onNodeMouseEnter: useCallbackRef((event, node2) => {
|
|
18684
|
+
actorRef.send({ type: "xyflow.mouse.enter.node", node: node2 });
|
|
18685
|
+
}),
|
|
18686
|
+
onNodeMouseLeave: useCallbackRef((event, node2) => {
|
|
18687
|
+
actorRef.send({ type: "xyflow.mouse.leave.node", node: node2 });
|
|
18688
|
+
}),
|
|
18689
|
+
onInit: useCallbackRef((xyflow2) => {
|
|
18690
|
+
actorRef.send({ type: "xyflow.init", xyflow: xyflow2, xystore });
|
|
18691
|
+
}),
|
|
18692
|
+
nodesDraggable: !1,
|
|
18693
|
+
nodesSelectable: !0,
|
|
18694
|
+
pannable: !0,
|
|
18695
|
+
zoomable: !0,
|
|
18696
|
+
background,
|
|
18697
|
+
...props
|
|
18698
|
+
}
|
|
18699
|
+
);
|
|
18700
|
+
});
|
|
18701
|
+
ProjectsOverviewXY.displayName = "ProjectsOverviewXY";
|
|
18702
|
+
function ProjectsOverview({
|
|
18703
|
+
view,
|
|
18704
|
+
onNavigateToProject,
|
|
18705
|
+
fitViewPadding = {
|
|
18706
|
+
top: "50px",
|
|
18707
|
+
bottom: "32px",
|
|
18708
|
+
left: "32px",
|
|
18709
|
+
right: "32px"
|
|
18710
|
+
},
|
|
18711
|
+
...props
|
|
18712
|
+
}) {
|
|
18713
|
+
const actorRef = useActorRef(
|
|
18714
|
+
projectOverviewLogic,
|
|
18715
|
+
{
|
|
18716
|
+
input: { view, fitViewPadding }
|
|
18717
|
+
}
|
|
18718
|
+
);
|
|
18719
|
+
useEffect(() => {
|
|
18720
|
+
actorRef.send({ type: "update.view", view });
|
|
18721
|
+
}, [actorRef, view]);
|
|
18722
|
+
const onNavigateToProjectRef = useSyncedRef(onNavigateToProject);
|
|
18723
|
+
useEffect(() => {
|
|
18724
|
+
const subs = [
|
|
18725
|
+
actorRef.on("navigate.to", ({ projectId }) => {
|
|
18726
|
+
onNavigateToProjectRef.current?.(projectId);
|
|
18727
|
+
})
|
|
18728
|
+
];
|
|
18729
|
+
return () => {
|
|
18730
|
+
subs.forEach((sub) => sub.unsubscribe());
|
|
18731
|
+
};
|
|
18732
|
+
}, [actorRef]);
|
|
18733
|
+
const bounds = view.bounds, initialRef = useRef({
|
|
18734
|
+
initialNodes: [],
|
|
18735
|
+
initialEdges: [],
|
|
18736
|
+
initialWidth: bounds.width,
|
|
18737
|
+
initialHeight: bounds.height,
|
|
18738
|
+
fitView: !1
|
|
18739
|
+
});
|
|
18740
|
+
return /* @__PURE__ */ jsx(ProjectsOverviewActorContext.Provider, { value: actorRef, children: /* @__PURE__ */ jsxs(ReactFlowProvider, { ...initialRef.current, children: [
|
|
18741
|
+
/* @__PURE__ */ jsx(LayoutGroup, { id: actorRef.sessionId, inherit: !1, children: /* @__PURE__ */ jsx(ProjectsOverviewXY, { ...props }) }),
|
|
18742
|
+
/* @__PURE__ */ jsx(ProjectsOverviewPanel, {})
|
|
18743
|
+
] }) });
|
|
18744
|
+
}
|
|
18745
|
+
function LikeC4ProjectsOverview({
|
|
18746
|
+
view,
|
|
18747
|
+
className,
|
|
18748
|
+
onNavigateToProject,
|
|
18749
|
+
...props
|
|
18750
|
+
}) {
|
|
18751
|
+
const onChangeLikeC4Project = useChangeLikeC4Project(), id = useId();
|
|
18752
|
+
return onNavigateToProject ??= onChangeLikeC4Project, /* @__PURE__ */ jsx(EnsureMantine, { children: /* @__PURE__ */ jsxs(FramerMotionConfig, { children: [
|
|
18753
|
+
/* @__PURE__ */ jsx(LikeC4Styles, { id }),
|
|
18754
|
+
/* @__PURE__ */ jsx(RootContainer, { id, className, children: /* @__PURE__ */ jsx(
|
|
18755
|
+
ProjectsOverview,
|
|
18756
|
+
{
|
|
18757
|
+
view,
|
|
18758
|
+
onNavigateToProject,
|
|
18759
|
+
...props
|
|
18760
|
+
}
|
|
18761
|
+
) })
|
|
18762
|
+
] }) });
|
|
18763
|
+
}
|
|
17967
18764
|
export {
|
|
17968
18765
|
Box as B,
|
|
17969
18766
|
IconRendererProvider as I,
|
|
@@ -17971,18 +18768,18 @@ export {
|
|
|
17971
18768
|
Markdown as M,
|
|
17972
18769
|
StaticLikeC4Diagram as S,
|
|
17973
18770
|
LikeC4ModelProvider as a,
|
|
17974
|
-
|
|
18771
|
+
useLikeC4Model as b,
|
|
17975
18772
|
css as c,
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
18773
|
+
IconStarFilled as d,
|
|
18774
|
+
IconStack2 as e,
|
|
18775
|
+
IconLayoutDashboard as f,
|
|
18776
|
+
IconFileCode as g,
|
|
18777
|
+
IconFolderOpen as h,
|
|
18778
|
+
IconFolderFilled as i,
|
|
18779
|
+
IconArrowLeft as j,
|
|
18780
|
+
IconMoonStars as k,
|
|
18781
|
+
IconSun as l,
|
|
18782
|
+
useLikeC4Projects as m,
|
|
17986
18783
|
IconChevronDown as n,
|
|
17987
18784
|
IconAlertTriangle as o,
|
|
17988
18785
|
IconCheck as p,
|
|
@@ -17990,8 +18787,10 @@ export {
|
|
|
17990
18787
|
IconExternalLink as r,
|
|
17991
18788
|
IconShare as s,
|
|
17992
18789
|
pickViewBounds as t,
|
|
17993
|
-
|
|
18790
|
+
useUpdateEffect as u,
|
|
17994
18791
|
LikeC4Diagram as v,
|
|
17995
|
-
|
|
17996
|
-
|
|
18792
|
+
useDiagramContext as w,
|
|
18793
|
+
LikeC4EditorProvider as x,
|
|
18794
|
+
useChangeLikeC4Project as y,
|
|
18795
|
+
LikeC4ProjectsOverview as z
|
|
17997
18796
|
};
|