likec4 1.51.0 → 1.52.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 +1 -1
- package/__app__/src/likec4.js +261 -142
- package/__app__/src/routes/index.js +4 -2
- package/__app__/src/routes/projects.js +1 -1
- package/__app__/src/routes/single.js +432 -65
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +2038 -773
- package/__app__/src/webcomponent.js +1 -1
- package/config/schema.json +1 -1
- package/dist/THIRD-PARTY-LICENSES.md +22 -224
- package/dist/_chunks/filesystem.mjs +67 -68
- package/dist/_chunks/index2.d.mts +36 -4
- package/dist/_chunks/libs/@hono/mcp.mjs +9 -9
- package/dist/_chunks/libs/@hono/node-server.mjs +1 -1
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +13 -13
- package/dist/_chunks/libs/langium.mjs +1 -1
- package/dist/_chunks/src.mjs +1 -1
- package/dist/_chunks/src2.mjs +1 -1
- package/dist/cli/index.mjs +27 -26
- package/dist/index.d.mts +31 -0
- package/dist/index.mjs +1 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/package.json +20 -20
- package/react/index.d.mts +56 -2
- package/react/index.mjs +1558 -572
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +0 -1
- package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +0 -1
- package/dist/_chunks/libs/@smithy/util-base64.mjs +0 -1
package/__app__/src/likec4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef, createElement, useContext, createContext as createContext$1, memo as memo$1, useRef, useMemo, useCallback, useState, useEffect, Fragment as Fragment$1, useDeferredValue, useLayoutEffect, Suspense, Profiler } from "react";
|
|
2
2
|
import { BBox, vector, convertPoint } from "@likec4/core/geometry";
|
|
3
3
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
4
|
-
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 useStore$1, w as useSyncedRef, x as e$2, y as t$4, z as t$5, M as MantineProvider, A as createTheme, T as Tooltip$7, P as Portal, S as SegmentedControl, C as MantineContext, D as useMantineStyleNonce, L as LazyMotion, E as domMax, F as MotionConfig, G as useSelector, H as e$3, I as t$6, J as t$7, K as t$8, N as t$9, O as useId$1, Q as m, R as ThemeIcon, U as Text, V as ScrollAreaAutosize, W as Button, X as setup, Y as emit, Z as assign, _ as raise, $ as assertEvent, a0 as t$a, a1 as fromCallback, a2 as getHotkeyHandler, a3 as fromPromise, a4 as t$b, a5 as n$1, a6 as n$2, a7 as e$4, a8 as enqueueActions, a9 as r, aa as log, ab as sendTo, ac as getViewportForBounds, ad as getNodesBounds, ae as getEdgePosition, af as t$c, ag as t$d, ah as e$5, ai as t$e, aj as t$f, ak as n$3, al as dagre, am as t$g, an as t$h, ao as t$i, ap as cancel, aq as applyEdgeChanges, ar as applyNodeChanges, as as e$6, at as stopChild, au as spawnChild, av as e$7, aw as not, ax as t$j, ay as t$k, az as e$8, aA as ActionIcon, aB as MotionButton, aC as Breadcrumbs, aD as Menu, aE as UnstyledButton, aF as MotionDiv, aG as Divider$2, aH as useDebouncedCallback, aI as AnimatePresence, aJ as m$1, aK as stagger, aL as useIsMounted, aM as useHover, aN as Popover, aO as PopoverTarget, aP as PopoverDropdown, aQ as Box$1, aR as FloatingIndicator, aS as Flex$1, aT as useDebouncedCallback$1, aU as useUncontrolled, aV as clampUseMovePosition, aW as useMove, aX as useMergedRef, aY as TooltipGroup, aZ as useDebouncedValue, a_ as EdgeLabelRenderer, a$ as e$9, b0 as useDebouncedState, b1 as NodeToolbar, b2 as Position, b3 as Handle, b4 as Badge, b5 as CopyButton, b6 as HoverCard, b7 as HoverCardTarget, b8 as HoverCardDropdown, b9 as Notification, ba as isMacOs, bb as NavLink, bc as MenuTarget, bd as MenuDropdown, be as MenuItem, bf as useThrottledCallback, bg as Input, bh as rem, bi as t$l, bj as createScopedKeydownHandler, bk as Highlight, bl as useMountEffect, bm as e$a, bn as useActorRef, bo as LayoutGroup, bp as Stack, bq as useTree, br as Alert, bs as Tree$1, bt as Group, bu as getBezierPath, bv as ReactFlowProvider, bw as useStateHistory, bx as Panel, by as useClipboard, bz as Paper, bA as Anchor, bB as Pill, bC as useViewportSize, bD as useSessionStorage, bE as t$m, bF as useDragControls, bG as useMotionValue, bH as useTimeoutEffect, bI as ReactRemoveScroll, bJ as CloseButton, bK as ActionIconGroup, bL as Tabs, bM as TabsList, bN as TabsTab, bO as TabsPanel, bP as ScrollArea, bQ as useFocusTrap, bR as useReducedMotionConfig, bS as useCallbackRef$1, bT as animate, bU as e$b, bV as VisuallyHidden, bW as n$4, bX as useWindowEvent, bY as FocusTrap, bZ as Title$1, b_ as useFocusWithin, b$ as useCombobox, c0 as ComboboxOption, c1 as Combobox, c2 as ComboboxTarget, c3 as ComboboxDropdown, c4 as ComboboxOptions, c5 as ComboboxEmpty, c6 as
|
|
4
|
+
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 useStore$1, w as useSyncedRef, x as e$2, y as t$4, z as t$5, M as MantineProvider, A as createTheme, T as Tooltip$7, P as Portal, S as SegmentedControl, C as MantineContext, D as useMantineStyleNonce, L as LazyMotion, E as domMax, F as MotionConfig, G as useSelector, H as e$3, I as t$6, J as t$7, K as t$8, N as t$9, O as useId$1, Q as m, R as ThemeIcon, U as Text, V as ScrollAreaAutosize, W as Button, X as setup, Y as emit, Z as assign, _ as raise, $ as assertEvent, a0 as t$a, a1 as fromCallback, a2 as getHotkeyHandler, a3 as fromPromise, a4 as t$b, a5 as n$1, a6 as n$2, a7 as e$4, a8 as enqueueActions, a9 as r, aa as log, ab as sendTo, ac as getViewportForBounds, ad as getNodesBounds, ae as getEdgePosition, af as t$c, ag as t$d, ah as e$5, ai as t$e, aj as t$f, ak as n$3, al as dagre, am as t$g, an as t$h, ao as t$i, ap as cancel, aq as applyEdgeChanges, ar as applyNodeChanges, as as e$6, at as stopChild, au as spawnChild, av as e$7, aw as not, ax as t$j, ay as t$k, az as e$8, aA as ActionIcon, aB as MotionButton, aC as Breadcrumbs, aD as Menu, aE as UnstyledButton, aF as MotionDiv, aG as Divider$2, aH as useDebouncedCallback, aI as AnimatePresence, aJ as m$1, aK as stagger, aL as useIsMounted, aM as useHover, aN as Popover, aO as PopoverTarget, aP as PopoverDropdown, aQ as Box$1, aR as FloatingIndicator, aS as Flex$1, aT as useDebouncedCallback$1, aU as useUncontrolled, aV as clampUseMovePosition, aW as useMove, aX as useMergedRef, aY as TooltipGroup, aZ as useDebouncedValue, a_ as EdgeLabelRenderer, a$ as e$9, b0 as useDebouncedState, b1 as NodeToolbar, b2 as Position, b3 as Handle, b4 as Badge, b5 as CopyButton, b6 as HoverCard, b7 as HoverCardTarget, b8 as HoverCardDropdown, b9 as Notification, ba as isMacOs, bb as NavLink, bc as MenuTarget, bd as MenuDropdown, be as MenuItem, bf as useThrottledCallback, bg as Input, bh as rem, bi as t$l, bj as createScopedKeydownHandler, bk as Highlight, bl as useMountEffect, bm as e$a, bn as useActorRef, bo as LayoutGroup, bp as Stack, bq as useTree, br as Alert, bs as Tree$1, bt as Group, bu as getBezierPath, bv as ReactFlowProvider, bw as useStateHistory, bx as Panel, by as useClipboard, bz as Paper, bA as Anchor, bB as Pill, bC as useViewportSize, bD as useSessionStorage, bE as t$m, bF as useDragControls, bG as useMotionValue, bH as useTimeoutEffect, bI as ReactRemoveScroll, bJ as CloseButton, bK as ActionIconGroup, bL as Tabs, bM as TabsList, bN as TabsTab, bO as TabsPanel, bP as ScrollArea, bQ as useFocusTrap, bR as useReducedMotionConfig, bS as useCallbackRef$1, bT as animate, bU as e$b, bV as VisuallyHidden, bW as n$4, bX as useWindowEvent, bY as FocusTrap, bZ as Title$1, b_ as useFocusWithin, b$ as useCombobox, c0 as ComboboxOption, c1 as Combobox, c2 as ComboboxTarget, c3 as ComboboxDropdown, c4 as ComboboxOptions, c5 as ComboboxEmpty, c6 as Grid, c7 as GridCol, c8 as createEmptyActor, c9 as useHotkeys, ca as usePresence, cb as autoUpdate, cc as computePosition, cd as offset, ce as autoPlacement, cf as size, cg as hide, ch as useLocalStorage, ci as Card, cj as n$5, ck as useRerender, cl as d3line, cm as curveCatmullRomOpen, cn as useRafEffect, co as getSmoothStepPath, cp as e$c, cq as useDisclosure, cr as ViewportPortal, cs as ColorSwatch, ct as Space, cu as CheckIcon, cv as useUpdateEffect$1, cw as Slider, cx as r$1, cy as produce, cz as useTimeout, cA as useCustomCompareMemo, cB as setAutoFreeze, cC as castDraft, cD as n$6, cE as t$n, cF as nodeToRect$1, cG as and, cH as or, cI as e$d, cJ as e$e, cK as motionValue, cL as mapValue, cM as styleEffect, cN as isValidMotionProp, cO as collection, cP as useMachine, cQ as machine$6, cR as connect, cS as normalizeProps, cT as createStore, cU as shallowEqual$1, cV as useSelector$1, cW as mergeProps$1, cX as t$o } from "./vendors.js";
|
|
5
5
|
import { nonexhaustive, isTagColorSpecified, invariant as invariant$1, Queue, GroupElementKind, nonNullable as nonNullable$1, isStepEdgeId, extractStep, RichText as RichText$1, ancestorsFqn, nameFromFqn, isAncestor as isAncestor$1, hasProp, DefaultMap as DefaultMap$1, whereOperatorAsPredicate, isNonEmptyArray, BBox as BBox$1, exact as exact$1, getParallelStepsPrefix, ModelFqnExpr } from "@likec4/core";
|
|
6
6
|
import { invariant, nonNullable, nonexhaustive as nonexhaustive$1, toArray, ifind, DefaultMap, delay, ifirst, ifilter, compareNaturalHierarchically, compareNatural, isAncestor, sortParentsFirst, imap, stringHash, nameFromFqn as nameFromFqn$1, isome, difference, toSet, objectHash } from "@likec4/core/utils";
|
|
7
7
|
import { computeRelationshipsView, treeFromElements } from "@likec4/core/compute-view";
|
|
@@ -370,23 +370,25 @@ 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$
|
|
389
|
-
const __iconNode$
|
|
373
|
+
const __iconNode$T = [["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 0", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], IconAlertTriangle = createReactComponent("outline", "alert-triangle", "AlertTriangle", __iconNode$T);
|
|
374
|
+
const __iconNode$S = [["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$S);
|
|
375
|
+
const __iconNode$R = [["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$R);
|
|
376
|
+
const __iconNode$Q = [["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$Q);
|
|
377
|
+
const __iconNode$P = [["path", { d: "M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11", key: "svg-0" }]], IconBolt = createReactComponent("outline", "bolt", "Bolt", __iconNode$P);
|
|
378
|
+
const __iconNode$O = [["path", { d: "M4 8h16", key: "svg-0" }], ["path", { d: "M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12", key: "svg-1" }], ["path", { d: "M8 4v4", key: "svg-2" }]], IconBrowser = createReactComponent("outline", "browser", "Browser", __iconNode$O);
|
|
379
|
+
const __iconNode$N = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], IconCheck = createReactComponent("outline", "check", "Check", __iconNode$N);
|
|
380
|
+
const __iconNode$M = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode$M);
|
|
381
|
+
const __iconNode$L = [["path", { d: "M15 6l-6 6l6 6", key: "svg-0" }]], IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode$L);
|
|
382
|
+
const __iconNode$K = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode$K);
|
|
383
|
+
const __iconNode$J = [["path", { d: "M7 9.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.667l0 -8.666", 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$J);
|
|
384
|
+
const __iconNode$I = [["path", { d: "M5 6a7 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$I);
|
|
385
|
+
const __iconNode$H = [["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-14", 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$H);
|
|
386
|
+
const __iconNode$G = [["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$G);
|
|
387
|
+
const __iconNode$F = [["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 2", 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$F);
|
|
388
|
+
const __iconNode$E = [["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$E);
|
|
389
|
+
const __iconNode$D = [["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 2", 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$D);
|
|
390
|
+
const __iconNode$C = [["path", { d: "M11 12a1 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$C);
|
|
391
|
+
const __iconNode$B = [["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$B);
|
|
390
392
|
const __iconNode$A = [["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$A);
|
|
391
393
|
const __iconNode$z = [["path", { d: "M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -10", key: "svg-0" }], ["path", { d: "M7 10a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", key: "svg-1" }], ["path", { d: "M15 8l2 0", key: "svg-2" }], ["path", { d: "M15 12l2 0", key: "svg-3" }], ["path", { d: "M7 16l10 0", key: "svg-4" }]], IconId = createReactComponent("outline", "id", "Id", __iconNode$z);
|
|
392
394
|
const __iconNode$y = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 9h.01", key: "svg-1" }], ["path", { d: "M11 12h1v4h1", key: "svg-2" }]], IconInfoCircle = createReactComponent("outline", "info-circle", "InfoCircle", __iconNode$y);
|
|
@@ -7862,7 +7864,7 @@ const Logo$1 = forwardRef(
|
|
|
7862
7864
|
}
|
|
7863
7865
|
) }) : null;
|
|
7864
7866
|
};
|
|
7865
|
-
function SearchControl() {
|
|
7867
|
+
function SearchControl$1() {
|
|
7866
7868
|
const diagram = useDiagram(), isMac = isMacOs();
|
|
7867
7869
|
return /* @__PURE__ */ jsxs(
|
|
7868
7870
|
UnstyledButton,
|
|
@@ -8325,7 +8327,7 @@ const selectBreadcrumbs = ({ context: context2 }) => {
|
|
|
8325
8327
|
"actions"
|
|
8326
8328
|
),
|
|
8327
8329
|
enableDynamicViewWalkthrough && isDynamicView && /* @__PURE__ */ jsx(DynamicViewControls, {}, "dynamic-view-controls"),
|
|
8328
|
-
enableSearch && !enableCompareWithLatest && /* @__PURE__ */ jsx(SearchControl, {}, "search-control"),
|
|
8330
|
+
enableSearch && !enableCompareWithLatest && /* @__PURE__ */ jsx(SearchControl$1, {}, "search-control"),
|
|
8329
8331
|
/* @__PURE__ */ jsx(LayoutWarning, {}, "outdated-manual-layout-warning")
|
|
8330
8332
|
] });
|
|
8331
8333
|
});
|
|
@@ -9037,7 +9039,7 @@ const useElementDetailsActorRef = () => {
|
|
|
9037
9039
|
if (ctx === null)
|
|
9038
9040
|
throw new Error("ElementDetailsActorRef is not provided");
|
|
9039
9041
|
return ctx;
|
|
9040
|
-
}, backdropBlur$1 = "--_blur", backdropOpacity$1 = "--_opacity", dialog
|
|
9042
|
+
}, backdropBlur$1 = "--_blur", backdropOpacity$1 = "--_opacity", dialog = css({
|
|
9041
9043
|
boxSizing: "border-box",
|
|
9042
9044
|
margin: "0",
|
|
9043
9045
|
padding: "0",
|
|
@@ -10001,7 +10003,7 @@ const node = css({
|
|
|
10001
10003
|
color: "white"
|
|
10002
10004
|
}
|
|
10003
10005
|
}
|
|
10004
|
-
}), scrollArea$
|
|
10006
|
+
}), scrollArea$1 = css({
|
|
10005
10007
|
maxHeight: [
|
|
10006
10008
|
"70vh",
|
|
10007
10009
|
"calc(100cqh - 70px)"
|
|
@@ -10010,7 +10012,7 @@ const node = css({
|
|
|
10010
10012
|
__proto__: null,
|
|
10011
10013
|
label,
|
|
10012
10014
|
node,
|
|
10013
|
-
scrollArea: scrollArea$
|
|
10015
|
+
scrollArea: scrollArea$1
|
|
10014
10016
|
}, Symbol.toStringTag, { value: "Module" })), selector2$1 = (state) => {
|
|
10015
10017
|
const subjectExistsInScope = state.context.layouted?.subjectExistsInScope ?? !1;
|
|
10016
10018
|
return {
|
|
@@ -10030,14 +10032,14 @@ const node = css({
|
|
|
10030
10032
|
subjectExistsInScope,
|
|
10031
10033
|
enableSelectSubject,
|
|
10032
10034
|
enableChangeScope
|
|
10033
|
-
} = useRelationshipsBrowserState(selector2$1),
|
|
10035
|
+
} = useRelationshipsBrowserState(selector2$1), root2 = useRef(null), viewport = useRef(null), subject = useLikeC4Model().findElement(subjectId), data2 = useLikeC4ElementsTree(scope === "view" && viewId ? viewId : void 0), tree2 = useTree({
|
|
10034
10036
|
multiple: !1
|
|
10035
10037
|
});
|
|
10036
10038
|
return tree2.setHoveredNode = setHoveredNode$2, useEffect(() => {
|
|
10037
10039
|
ancestorsFqn(subjectId).reverse().forEach((id) => {
|
|
10038
10040
|
tree2.expand(id);
|
|
10039
10041
|
}), tree2.select(subjectId);
|
|
10040
|
-
}, [subjectId]), /* @__PURE__ */ jsxs(Group, { ref:
|
|
10042
|
+
}, [subjectId]), /* @__PURE__ */ jsxs(Group, { ref: root2, gap: "xs", pos: "relative", children: [
|
|
10041
10043
|
enableSelectSubject && /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
|
|
10042
10044
|
/* @__PURE__ */ jsx(
|
|
10043
10045
|
Box$1,
|
|
@@ -10074,7 +10076,7 @@ const node = css({
|
|
|
10074
10076
|
children: /* @__PURE__ */ jsx(Text, { fz: "xs", fw: "500", truncate: !0, children: subject?.title ?? "???" })
|
|
10075
10077
|
}
|
|
10076
10078
|
) }),
|
|
10077
|
-
/* @__PURE__ */ jsx(PopoverDropdown, { p: 0, miw: 250, maw: 400, children: /* @__PURE__ */ jsx(ScrollAreaAutosize, { scrollbars: "y", type: "never", viewportRef: viewport, className: scrollArea$
|
|
10079
|
+
/* @__PURE__ */ jsx(PopoverDropdown, { p: 0, miw: 250, maw: 400, children: /* @__PURE__ */ jsx(ScrollAreaAutosize, { scrollbars: "y", type: "never", viewportRef: viewport, className: scrollArea$1, children: /* @__PURE__ */ jsx(
|
|
10078
10080
|
Tree$1,
|
|
10079
10081
|
{
|
|
10080
10082
|
allowRangeSelection: !1,
|
|
@@ -10169,7 +10171,7 @@ const node = css({
|
|
|
10169
10171
|
position: "bottom-start",
|
|
10170
10172
|
disabled: subjectExistsInScope,
|
|
10171
10173
|
portalProps: {
|
|
10172
|
-
target:
|
|
10174
|
+
target: root2.current
|
|
10173
10175
|
},
|
|
10174
10176
|
children: /* @__PURE__ */ jsx(
|
|
10175
10177
|
SegmentedControl,
|
|
@@ -10835,7 +10837,7 @@ function ElementDetailsCard({
|
|
|
10835
10837
|
m$1.dialog,
|
|
10836
10838
|
{
|
|
10837
10839
|
ref,
|
|
10838
|
-
className: cx(dialog
|
|
10840
|
+
className: cx(dialog, ReactRemoveScroll.classNames.fullWidth),
|
|
10839
10841
|
layout: !0,
|
|
10840
10842
|
initial: {
|
|
10841
10843
|
[backdropBlur$1]: "0px",
|
|
@@ -11880,7 +11882,7 @@ css({
|
|
|
11880
11882
|
alignItems: "baseline",
|
|
11881
11883
|
justifyItems: "start"
|
|
11882
11884
|
});
|
|
11883
|
-
const scrollArea
|
|
11885
|
+
const scrollArea = css({
|
|
11884
11886
|
maxHeight: [
|
|
11885
11887
|
"70vh",
|
|
11886
11888
|
"calc(100cqh - 70px)"
|
|
@@ -11950,7 +11952,7 @@ const scrollArea$1 = css({
|
|
|
11950
11952
|
]
|
|
11951
11953
|
}
|
|
11952
11954
|
) }),
|
|
11953
|
-
/* @__PURE__ */ jsx(PopoverDropdown, { p: 0, miw: 250, maw: 400, children: /* @__PURE__ */ jsx(ScrollAreaAutosize, { className: scrollArea
|
|
11955
|
+
/* @__PURE__ */ jsx(PopoverDropdown, { p: 0, miw: 250, maw: 400, children: /* @__PURE__ */ jsx(ScrollAreaAutosize, { className: scrollArea, scrollbars: "y", type: "never", viewportRef: viewport, children: /* @__PURE__ */ jsx(Box$1, { className: edgeGrid, p: "xs", maw: 400, children: edges.map((e2) => /* @__PURE__ */ jsxs(
|
|
11954
11956
|
"div",
|
|
11955
11957
|
{
|
|
11956
11958
|
className: edgeRow,
|
|
@@ -12261,32 +12263,27 @@ const select$1 = (s) => s.children.search ?? null;
|
|
|
12261
12263
|
function useSearchActorRef() {
|
|
12262
12264
|
return useDiagramSnapshot(select$1, Object.is);
|
|
12263
12265
|
}
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12266
|
+
const SearchContext = createContext$1(null);
|
|
12267
|
+
function useSearchContext() {
|
|
12268
|
+
const ctx = useContext(SearchContext);
|
|
12269
|
+
if (!ctx)
|
|
12270
|
+
throw new Error("useSearchContext must be used within a SearchContext.Provider");
|
|
12271
|
+
return ctx;
|
|
12269
12272
|
}
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
const
|
|
12273
|
-
|
|
12274
|
-
}, [searchActorRef]);
|
|
12275
|
-
return [searchValue, updateSearch];
|
|
12273
|
+
function normalizeSearch(value) {
|
|
12274
|
+
if (value === "") return value;
|
|
12275
|
+
const v = value.trim().toLowerCase();
|
|
12276
|
+
return v.startsWith("#") && v.length <= 2 ? "" : v.length > 1 ? v : "";
|
|
12276
12277
|
}
|
|
12277
|
-
const selectNormalizedSearchValue = (s) => {
|
|
12278
|
-
let v = selectSearchValue(s);
|
|
12279
|
-
return v === "" ? v : (v = v.trim().toLowerCase(), v.startsWith("#") && v.length <= 2 ? "" : v.length > 1 ? v : "");
|
|
12280
|
-
};
|
|
12281
12278
|
function useNormalizedSearch() {
|
|
12282
|
-
const
|
|
12283
|
-
return useDeferredValue(
|
|
12279
|
+
const ctx = useSearchContext();
|
|
12280
|
+
return useDeferredValue(ctx.normalizedSearch);
|
|
12284
12281
|
}
|
|
12285
12282
|
function useUpdateSearch() {
|
|
12286
|
-
const
|
|
12283
|
+
const { setSearchValue } = useSearchContext();
|
|
12287
12284
|
return useCallback((search) => {
|
|
12288
|
-
|
|
12289
|
-
}, [
|
|
12285
|
+
setSearchValue(search);
|
|
12286
|
+
}, [setSearchValue]);
|
|
12290
12287
|
}
|
|
12291
12288
|
const buttonFocused = css.raw({
|
|
12292
12289
|
outline: "none",
|
|
@@ -12502,12 +12499,12 @@ function moveFocusToSearchInput(from) {
|
|
|
12502
12499
|
console.error("moveFocusToSearchInput: from is null or undefined");
|
|
12503
12500
|
return;
|
|
12504
12501
|
}
|
|
12505
|
-
const
|
|
12506
|
-
if (!e$2(
|
|
12502
|
+
const root2 = from.getRootNode();
|
|
12503
|
+
if (!e$2(root2.querySelector)) {
|
|
12507
12504
|
console.error("moveFocusToSearchInput: root.querySelector is not a function");
|
|
12508
12505
|
return;
|
|
12509
12506
|
}
|
|
12510
|
-
let input2 =
|
|
12507
|
+
let input2 = root2.querySelector("[data-likec4-search-input]");
|
|
12511
12508
|
if (input2) {
|
|
12512
12509
|
const length = input2.value.length;
|
|
12513
12510
|
input2.focus(), input2.setSelectionRange(length, length);
|
|
@@ -12518,18 +12515,18 @@ function focusToFirstFoundElement(from) {
|
|
|
12518
12515
|
console.error("focusToFirstFoundElement: from is null or undefined");
|
|
12519
12516
|
return;
|
|
12520
12517
|
}
|
|
12521
|
-
const
|
|
12522
|
-
if (!e$2(
|
|
12518
|
+
const root2 = from.getRootNode();
|
|
12519
|
+
if (!e$2(root2.querySelector)) {
|
|
12523
12520
|
console.error("focusToFirstFoundElement: root.querySelector is not a function");
|
|
12524
12521
|
return;
|
|
12525
12522
|
}
|
|
12526
|
-
|
|
12523
|
+
root2.querySelector(`[data-likec4-search] .${focusable}`)?.focus();
|
|
12527
12524
|
}
|
|
12528
12525
|
function queryAllFocusable(from, where, selector3 = `.${focusable}`) {
|
|
12529
12526
|
if (!from)
|
|
12530
12527
|
return console.error("queryAllFocusable: from is null or undefined"), [];
|
|
12531
|
-
const
|
|
12532
|
-
return e$2(
|
|
12528
|
+
const root2 = from.getRootNode();
|
|
12529
|
+
return e$2(root2.querySelectorAll) ? [...root2.querySelectorAll(`[data-likec4-search-${where}] ${selector3}`)] : (console.error("queryAllFocusable: root.querySelectorAll is not a function"), []);
|
|
12533
12530
|
}
|
|
12534
12531
|
const _viewBtn = "likec4-view-btn", viewButton = cx(
|
|
12535
12532
|
css({
|
|
@@ -12556,7 +12553,7 @@ css({
|
|
|
12556
12553
|
}
|
|
12557
12554
|
});
|
|
12558
12555
|
const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, children: "Nothing found" }), useFoundViews = () => {
|
|
12559
|
-
const currentViewId =
|
|
12556
|
+
const { currentViewId } = useSearchContext(), likec4model = useLikeC4Model(), search = useNormalizedSearch();
|
|
12560
12557
|
return useMemo(() => {
|
|
12561
12558
|
let views = [...likec4model.views()];
|
|
12562
12559
|
if (search)
|
|
@@ -12606,7 +12603,7 @@ const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, child
|
|
|
12606
12603
|
ViewButton,
|
|
12607
12604
|
{
|
|
12608
12605
|
view,
|
|
12609
|
-
currentViewId,
|
|
12606
|
+
currentViewId: currentViewId ?? "",
|
|
12610
12607
|
search,
|
|
12611
12608
|
tabIndex: i === 0 ? 0 : -1
|
|
12612
12609
|
}
|
|
@@ -12616,12 +12613,8 @@ const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, child
|
|
|
12616
12613
|
);
|
|
12617
12614
|
}), btn$1 = buttonsva();
|
|
12618
12615
|
function ViewButton({ className, view, loop = !1, search, focusOnElement, currentViewId, ...props }) {
|
|
12619
|
-
const
|
|
12620
|
-
|
|
12621
|
-
type: "navigate.to",
|
|
12622
|
-
viewId: nextViewId,
|
|
12623
|
-
focusOnElement
|
|
12624
|
-
});
|
|
12616
|
+
const ctx = useSearchContext(), nextViewId = view.id, isCurrentView = nextViewId === currentViewId, navigate = () => {
|
|
12617
|
+
ctx.navigateTo(nextViewId, focusOnElement);
|
|
12625
12618
|
};
|
|
12626
12619
|
return /* @__PURE__ */ jsxs(
|
|
12627
12620
|
UnstyledButton,
|
|
@@ -12711,7 +12704,7 @@ function useElementsColumnData() {
|
|
|
12711
12704
|
elements,
|
|
12712
12705
|
t$g((acc, treeItem) => {
|
|
12713
12706
|
treeItem.children = [], byid[treeItem.value] = treeItem;
|
|
12714
|
-
const parent = acc.all.findLast((
|
|
12707
|
+
const parent = acc.all.findLast((root2) => isAncestor(root2.value, treeItem.value));
|
|
12715
12708
|
return parent ? parent.children.push(treeItem) : acc.roots.push(treeItem), acc.all.push(treeItem), acc.hash = stringHash(acc.hash + treeItem.value), acc;
|
|
12716
12709
|
}, {
|
|
12717
12710
|
hash: "empty",
|
|
@@ -12877,21 +12870,17 @@ function ElementTreeNode({ node: node2, elementProps, hasChildren, expanded, han
|
|
|
12877
12870
|
] });
|
|
12878
12871
|
}
|
|
12879
12872
|
function useHandleElementSelection() {
|
|
12880
|
-
const
|
|
12873
|
+
const ctx = useSearchContext();
|
|
12881
12874
|
return useCallbackRef((element) => {
|
|
12882
12875
|
const views = [...element.views()];
|
|
12883
12876
|
if (views.length === 0)
|
|
12884
12877
|
return;
|
|
12885
12878
|
const elementFqn = element.id, onlyOneViewId = t$f(views)?.id;
|
|
12886
12879
|
if (!onlyOneViewId) {
|
|
12887
|
-
|
|
12880
|
+
ctx.openPickView(elementFqn);
|
|
12888
12881
|
return;
|
|
12889
12882
|
}
|
|
12890
|
-
|
|
12891
|
-
type: "navigate.to",
|
|
12892
|
-
viewId: onlyOneViewId,
|
|
12893
|
-
focusOnElement: elementFqn
|
|
12894
|
-
});
|
|
12883
|
+
ctx.navigateTo(onlyOneViewId, elementFqn);
|
|
12895
12884
|
});
|
|
12896
12885
|
}
|
|
12897
12886
|
const input = css({
|
|
@@ -12948,14 +12937,13 @@ css({
|
|
|
12948
12937
|
}
|
|
12949
12938
|
});
|
|
12950
12939
|
function PickView({
|
|
12951
|
-
searchActorRef,
|
|
12952
12940
|
elementFqn
|
|
12953
12941
|
}) {
|
|
12954
|
-
const
|
|
12942
|
+
const ctx = useSearchContext(), currentViewId = ctx.currentViewId ?? "", element = useLikeC4Model().element(elementFqn), scoped = [], others = [];
|
|
12955
12943
|
for (const view of element.views())
|
|
12956
12944
|
view.viewOf === element ? scoped.push(view) : others.push(view);
|
|
12957
12945
|
const closePickView = () => {
|
|
12958
|
-
|
|
12946
|
+
ctx.closePickView();
|
|
12959
12947
|
};
|
|
12960
12948
|
return useWindowEvent(
|
|
12961
12949
|
"keydown",
|
|
@@ -13137,7 +13125,7 @@ function startingWithKind(search) {
|
|
|
13137
13125
|
return search.match(/^(k|ki|kin|kind|kind:)$/) != null;
|
|
13138
13126
|
}
|
|
13139
13127
|
const SEARCH_PREFIXES = ["#", "kind:"], LikeC4SearchInput = memo$1(() => {
|
|
13140
|
-
const
|
|
13128
|
+
const searchCtx = useSearchContext(), likec4model = useLikeC4Model(), inputRef = useRef(null), { ref, focused: focused2 } = useFocusWithin(), { searchValue: search, setSearchValue: setSearch } = searchCtx, combobox = useCombobox({
|
|
13141
13129
|
scrollBehavior: "smooth",
|
|
13142
13130
|
loop: !1
|
|
13143
13131
|
});
|
|
@@ -13222,9 +13210,7 @@ const SEARCH_PREFIXES = ["#", "kind:"], LikeC4SearchInput = memo$1(() => {
|
|
|
13222
13210
|
Input.ClearButton,
|
|
13223
13211
|
{
|
|
13224
13212
|
onClick: (e2) => {
|
|
13225
|
-
e2.stopPropagation();
|
|
13226
|
-
const openedWithSearch = searchActorRef.getSnapshot().context.openedWithSearch;
|
|
13227
|
-
search === "" || search === openedWithSearch ? searchActorRef.send({ type: "close" }) : setSearch("");
|
|
13213
|
+
e2.stopPropagation(), search === "" || search === searchCtx.openedWithSearch ? searchCtx.close() : setSearch("");
|
|
13228
13214
|
}
|
|
13229
13215
|
}
|
|
13230
13216
|
),
|
|
@@ -13275,23 +13261,58 @@ const SEARCH_PREFIXES = ["#", "kind:"], LikeC4SearchInput = memo$1(() => {
|
|
|
13275
13261
|
]
|
|
13276
13262
|
}
|
|
13277
13263
|
);
|
|
13278
|
-
}),
|
|
13264
|
+
}), selectSearchValue = (s) => s.context.searchValue, selectPickViewFor = (s) => s.context.pickViewFor, selectOpenedWithSearch = (s) => s.context.openedWithSearch;
|
|
13265
|
+
function XStateSearchAdapter({
|
|
13266
|
+
searchActorRef,
|
|
13267
|
+
children
|
|
13268
|
+
}) {
|
|
13269
|
+
const searchValue = useSelector(searchActorRef, selectSearchValue), pickViewFor = useSelector(searchActorRef, selectPickViewFor), openedWithSearch = useSelector(searchActorRef, selectOpenedWithSearch), currentViewId = useCurrentViewId(), setSearchValue = useCallbackRef((search) => {
|
|
13270
|
+
searchActorRef.send({ type: "change.search", search });
|
|
13271
|
+
}), navigateTo = useCallbackRef((viewId, focusOnElement) => {
|
|
13272
|
+
searchActorRef.send({
|
|
13273
|
+
type: "navigate.to",
|
|
13274
|
+
viewId,
|
|
13275
|
+
focusOnElement
|
|
13276
|
+
});
|
|
13277
|
+
}), openPickView = useCallbackRef((elementFqn) => {
|
|
13278
|
+
searchActorRef.send({ type: "pickview.open", elementFqn });
|
|
13279
|
+
}), closePickView = useCallbackRef(() => {
|
|
13280
|
+
searchActorRef.send({ type: "pickview.close" });
|
|
13281
|
+
}), close = useCallbackRef(() => {
|
|
13282
|
+
searchActorRef.send({ type: "close" });
|
|
13283
|
+
}), value = useMemo(() => ({
|
|
13284
|
+
searchValue,
|
|
13285
|
+
setSearchValue,
|
|
13286
|
+
normalizedSearch: normalizeSearch(searchValue),
|
|
13287
|
+
navigateTo,
|
|
13288
|
+
openPickView,
|
|
13289
|
+
closePickView,
|
|
13290
|
+
pickViewFor,
|
|
13291
|
+
close,
|
|
13292
|
+
currentViewId,
|
|
13293
|
+
openedWithSearch
|
|
13294
|
+
}), [
|
|
13295
|
+
searchValue,
|
|
13296
|
+
pickViewFor,
|
|
13297
|
+
currentViewId,
|
|
13298
|
+
openedWithSearch,
|
|
13299
|
+
// stable refs from useCallbackRef — listed for exhaustive-deps lint rule
|
|
13300
|
+
setSearchValue,
|
|
13301
|
+
navigateTo,
|
|
13302
|
+
openPickView,
|
|
13303
|
+
closePickView,
|
|
13304
|
+
close
|
|
13305
|
+
]);
|
|
13306
|
+
return /* @__PURE__ */ jsx(SearchContext.Provider, { value, children });
|
|
13307
|
+
}
|
|
13308
|
+
const dialogCss = css({
|
|
13279
13309
|
backgroundColor: "[rgb(34 34 34 / var(--_opacity, 95%))]",
|
|
13280
13310
|
_light: {
|
|
13281
13311
|
backgroundColor: "[rgb(250 250 250 / var(--_opacity, 95%))]"
|
|
13282
13312
|
},
|
|
13283
13313
|
backdropFilter: "auto",
|
|
13284
13314
|
backdropBlur: "var(--_blur, 10px)"
|
|
13285
|
-
|
|
13286
|
-
// _light: `[rgb(255 255 255/ var(${backdropOpacity}))]`,
|
|
13287
|
-
// },
|
|
13288
|
-
}), body = css({
|
|
13289
|
-
// containerName: 'likec4-search',
|
|
13290
|
-
// containerType: 'size',
|
|
13291
|
-
// position: 'fixed',
|
|
13292
|
-
// zIndex: 901,
|
|
13293
|
-
// top: '0',
|
|
13294
|
-
// left: '0',
|
|
13315
|
+
}), bodyCss = css({
|
|
13295
13316
|
width: "100%",
|
|
13296
13317
|
height: "100%",
|
|
13297
13318
|
maxHeight: "100vh",
|
|
@@ -13305,11 +13326,7 @@ const SEARCH_PREFIXES = ["#", "kind:"], LikeC4SearchInput = memo$1(() => {
|
|
|
13305
13326
|
paddingRight: "md",
|
|
13306
13327
|
paddingBottom: "sm",
|
|
13307
13328
|
background: "transparent"
|
|
13308
|
-
|
|
13309
|
-
// _dark: `[rgb(34 34 34 / 0.95)]`,
|
|
13310
|
-
// _light: `[rgb(255 255 255/ 0.95)]`,
|
|
13311
|
-
// },
|
|
13312
|
-
}), scrollArea = css({
|
|
13329
|
+
}), scrollAreaCss = css({
|
|
13313
13330
|
height: [
|
|
13314
13331
|
"100%",
|
|
13315
13332
|
"100cqh"
|
|
@@ -13352,33 +13369,20 @@ const SEARCH_PREFIXES = ["#", "kind:"], LikeC4SearchInput = memo$1(() => {
|
|
|
13352
13369
|
opacity: 0.9
|
|
13353
13370
|
},
|
|
13354
13371
|
classes: {
|
|
13355
|
-
dialog,
|
|
13356
|
-
body
|
|
13372
|
+
dialog: dialogCss,
|
|
13373
|
+
body: bodyCss
|
|
13357
13374
|
},
|
|
13358
13375
|
openDelay: 0,
|
|
13359
13376
|
onClose: close,
|
|
13360
13377
|
"data-likec4-search": "true",
|
|
13361
|
-
children: /* @__PURE__ */ jsx(SearchOverlayBody, { searchActorRef })
|
|
13378
|
+
children: /* @__PURE__ */ jsx(XStateSearchAdapter, { searchActorRef, children: /* @__PURE__ */ jsx(SearchOverlayBody, { searchActorRef }) })
|
|
13362
13379
|
}
|
|
13363
13380
|
) });
|
|
13364
13381
|
});
|
|
13365
13382
|
Search.displayName = "Search";
|
|
13366
|
-
const
|
|
13367
|
-
const ref = useRef(null), pickViewFor =
|
|
13368
|
-
|
|
13369
|
-
e$8(searchActorRef.getSnapshot().context.openedWithSearch) && focusToFirstFoundElement(ref.current);
|
|
13370
|
-
}, 150);
|
|
13371
|
-
const [isPresent, safeToRemove] = usePresence();
|
|
13372
|
-
return useEffect(() => {
|
|
13373
|
-
if (!isPresent) {
|
|
13374
|
-
safeToRemove();
|
|
13375
|
-
try {
|
|
13376
|
-
searchActorRef.send({ type: "animation.presence.end" });
|
|
13377
|
-
} catch (e2) {
|
|
13378
|
-
console.debug("SearchOverlayBody: animation.presence.end failed", e2);
|
|
13379
|
-
}
|
|
13380
|
-
}
|
|
13381
|
-
}, [isPresent, searchActorRef, safeToRemove]), /* @__PURE__ */ jsxs(Box, { ref, display: "contents", children: [
|
|
13383
|
+
const SearchPanelContent = memo$1(() => {
|
|
13384
|
+
const ref = useRef(null), { pickViewFor } = useSearchContext();
|
|
13385
|
+
return /* @__PURE__ */ jsxs(Box, { ref, display: "contents", children: [
|
|
13382
13386
|
/* @__PURE__ */ jsx(
|
|
13383
13387
|
Group,
|
|
13384
13388
|
{
|
|
@@ -13411,7 +13415,7 @@ const selectPickViewFor = (s) => s.context.pickViewFor, SearchOverlayBody = memo
|
|
|
13411
13415
|
ScrollArea,
|
|
13412
13416
|
{
|
|
13413
13417
|
type: "scroll",
|
|
13414
|
-
className:
|
|
13418
|
+
className: scrollAreaCss,
|
|
13415
13419
|
pr: "xs",
|
|
13416
13420
|
scrollbars: "y",
|
|
13417
13421
|
children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-elements", children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(ElementsColumn, {}) }) })
|
|
@@ -13421,7 +13425,7 @@ const selectPickViewFor = (s) => s.context.pickViewFor, SearchOverlayBody = memo
|
|
|
13421
13425
|
ScrollArea,
|
|
13422
13426
|
{
|
|
13423
13427
|
type: "scroll",
|
|
13424
|
-
className:
|
|
13428
|
+
className: scrollAreaCss,
|
|
13425
13429
|
pr: "xs",
|
|
13426
13430
|
scrollbars: "y",
|
|
13427
13431
|
children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-views", children: /* @__PURE__ */ jsx(ViewsColumn, {}) }) })
|
|
@@ -13430,9 +13434,27 @@ const selectPickViewFor = (s) => s.context.pickViewFor, SearchOverlayBody = memo
|
|
|
13430
13434
|
]
|
|
13431
13435
|
}
|
|
13432
13436
|
),
|
|
13433
|
-
pickViewFor && /* @__PURE__ */ jsx(PickView, {
|
|
13437
|
+
pickViewFor && /* @__PURE__ */ jsx(PickView, { elementFqn: pickViewFor })
|
|
13434
13438
|
] });
|
|
13435
13439
|
});
|
|
13440
|
+
SearchPanelContent.displayName = "SearchPanelContent";
|
|
13441
|
+
const SearchOverlayBody = memo$1(function({ searchActorRef }) {
|
|
13442
|
+
const ref = useRef(null);
|
|
13443
|
+
useTimeoutEffect(() => {
|
|
13444
|
+
e$8(searchActorRef.getSnapshot().context.openedWithSearch) && focusToFirstFoundElement(ref.current);
|
|
13445
|
+
}, 150);
|
|
13446
|
+
const [isPresent, safeToRemove] = usePresence();
|
|
13447
|
+
return useEffect(() => {
|
|
13448
|
+
if (!isPresent) {
|
|
13449
|
+
safeToRemove();
|
|
13450
|
+
try {
|
|
13451
|
+
searchActorRef.send({ type: "animation.presence.end" });
|
|
13452
|
+
} catch (e2) {
|
|
13453
|
+
console.debug("SearchOverlayBody: animation.presence.end failed", e2);
|
|
13454
|
+
}
|
|
13455
|
+
}
|
|
13456
|
+
}, [isPresent, searchActorRef, safeToRemove]), /* @__PURE__ */ jsx(Box, { ref, display: "contents", children: /* @__PURE__ */ jsx(SearchPanelContent, {}) });
|
|
13457
|
+
});
|
|
13436
13458
|
function PortalToContainer({ children }) {
|
|
13437
13459
|
const ctx = useRootContainerContext();
|
|
13438
13460
|
if (!ctx)
|
|
@@ -20073,6 +20095,87 @@ function LikeC4ProjectsOverview({
|
|
|
20073
20095
|
) })
|
|
20074
20096
|
] }) });
|
|
20075
20097
|
}
|
|
20098
|
+
const root = css({
|
|
20099
|
+
height: "30px",
|
|
20100
|
+
paddingLeft: "sm",
|
|
20101
|
+
paddingRight: "1",
|
|
20102
|
+
borderRadius: "sm",
|
|
20103
|
+
// TODO
|
|
20104
|
+
// color: fallbackVar('var(--search-color)', 'mantine.colors.placeholder)',
|
|
20105
|
+
border: "1px solid",
|
|
20106
|
+
borderColor: {
|
|
20107
|
+
base: "default.border",
|
|
20108
|
+
_light: "mantine.colors.gray[4]",
|
|
20109
|
+
_dark: "mantine.colors.dark[4]",
|
|
20110
|
+
_hover: "default.border"
|
|
20111
|
+
},
|
|
20112
|
+
cursor: "pointer",
|
|
20113
|
+
background: {
|
|
20114
|
+
base: "default",
|
|
20115
|
+
_light: "white",
|
|
20116
|
+
_dark: "mantine.colors.dark[6]",
|
|
20117
|
+
_hover: "default.hover"
|
|
20118
|
+
},
|
|
20119
|
+
width: "100%",
|
|
20120
|
+
"& .tabler-icon": {
|
|
20121
|
+
color: "text"
|
|
20122
|
+
},
|
|
20123
|
+
transition: {
|
|
20124
|
+
base: "fast",
|
|
20125
|
+
_whenPanning: "none !important"
|
|
20126
|
+
},
|
|
20127
|
+
boxShadow: {
|
|
20128
|
+
base: "xs",
|
|
20129
|
+
_hover: "sm",
|
|
20130
|
+
_whenPanning: "none !important"
|
|
20131
|
+
}
|
|
20132
|
+
}), placeholder = css({
|
|
20133
|
+
fontSize: "sm",
|
|
20134
|
+
// mantine.fontSizes.sm,
|
|
20135
|
+
fontWeight: "medium",
|
|
20136
|
+
paddingRight: "2.5",
|
|
20137
|
+
// 10px
|
|
20138
|
+
color: "text.placeholder",
|
|
20139
|
+
flex: "1",
|
|
20140
|
+
sm: {
|
|
20141
|
+
paddingRight: "[30px]"
|
|
20142
|
+
},
|
|
20143
|
+
md: {
|
|
20144
|
+
paddingRight: "[50px]"
|
|
20145
|
+
}
|
|
20146
|
+
}), shortcut = css({
|
|
20147
|
+
fontSize: "11px",
|
|
20148
|
+
fontWeight: "bold",
|
|
20149
|
+
lineHeight: 1,
|
|
20150
|
+
padding: "[4px 7px]",
|
|
20151
|
+
borderRadius: "sm",
|
|
20152
|
+
border: "1px solid",
|
|
20153
|
+
transition: "fast",
|
|
20154
|
+
_light: {
|
|
20155
|
+
color: "mantine.colors.gray[7]",
|
|
20156
|
+
borderColor: "mantine.colors.gray[2]"
|
|
20157
|
+
},
|
|
20158
|
+
_dark: {
|
|
20159
|
+
color: "mantine.colors.dark[0]",
|
|
20160
|
+
borderColor: "mantine.colors.dark[7]"
|
|
20161
|
+
},
|
|
20162
|
+
backgroundColor: {
|
|
20163
|
+
_light: "mantine.colors.gray[2]/70",
|
|
20164
|
+
_dark: "mantine.colors.dark[8]/70",
|
|
20165
|
+
_groupHover: {
|
|
20166
|
+
_light: "mantine.colors.gray[2]",
|
|
20167
|
+
_dark: "mantine.colors.dark[8]"
|
|
20168
|
+
}
|
|
20169
|
+
}
|
|
20170
|
+
});
|
|
20171
|
+
function SearchControl({ className, ...others }) {
|
|
20172
|
+
const isMac = isMacOs();
|
|
20173
|
+
return /* @__PURE__ */ jsx(UnstyledButton, { ...others, className: cx("group", root, className), children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
20174
|
+
/* @__PURE__ */ jsx(IconSearch, { style: { width: "15px", height: "15px" }, stroke: 2 }),
|
|
20175
|
+
/* @__PURE__ */ jsx(Text, { component: "div", className: placeholder, children: "Search" }),
|
|
20176
|
+
/* @__PURE__ */ jsx(Text, { component: "div", className: shortcut, children: isMac ? "⌘ + K" : "Ctrl + K" })
|
|
20177
|
+
] }) });
|
|
20178
|
+
}
|
|
20076
20179
|
const statebtn = cva({
|
|
20077
20180
|
base: {
|
|
20078
20181
|
border: "none",
|
|
@@ -21082,35 +21185,51 @@ const LikeC4AdHocView = memo$1(({ id }) => {
|
|
|
21082
21185
|
}, [actorRef, diagram]), null;
|
|
21083
21186
|
});
|
|
21084
21187
|
export {
|
|
21188
|
+
IconAlertTriangle as A,
|
|
21085
21189
|
Box as B,
|
|
21190
|
+
IconCheck as C,
|
|
21191
|
+
IconCopy as D,
|
|
21192
|
+
IconExternalLink as E,
|
|
21193
|
+
FramerMotionConfig as F,
|
|
21194
|
+
IconShare as G,
|
|
21195
|
+
pickViewBounds as H,
|
|
21086
21196
|
IconRendererProvider as I,
|
|
21197
|
+
LikeC4Diagram as J,
|
|
21198
|
+
useDiagramContext as K,
|
|
21087
21199
|
LikeC4ProjectsProvider as L,
|
|
21088
21200
|
Markdown as M,
|
|
21089
|
-
|
|
21201
|
+
NavigationPanel as N,
|
|
21202
|
+
Overlay as O,
|
|
21203
|
+
useDiagram as P,
|
|
21204
|
+
useOnDiagramEvent as Q,
|
|
21205
|
+
LikeC4EditorProvider as R,
|
|
21206
|
+
SearchContext as S,
|
|
21207
|
+
useChangeLikeC4Project as T,
|
|
21208
|
+
LikeC4ProjectsOverview as U,
|
|
21090
21209
|
LikeC4ModelProvider as a,
|
|
21091
|
-
|
|
21210
|
+
IconMoonStars as b,
|
|
21092
21211
|
css as c,
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
|
|
21096
|
-
|
|
21097
|
-
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
|
|
21106
|
-
|
|
21107
|
-
|
|
21212
|
+
IconSun as d,
|
|
21213
|
+
SearchControl as e,
|
|
21214
|
+
bodyCss as f,
|
|
21215
|
+
dialogCss as g,
|
|
21216
|
+
SearchPanelContent as h,
|
|
21217
|
+
useLikeC4Model as i,
|
|
21218
|
+
StaticLikeC4Diagram as j,
|
|
21219
|
+
IconStarFilled as k,
|
|
21220
|
+
IconStack2 as l,
|
|
21221
|
+
IconLayoutDashboard as m,
|
|
21222
|
+
normalizeSearch as n,
|
|
21223
|
+
IconFileCode as o,
|
|
21224
|
+
IconFolderOpen as p,
|
|
21225
|
+
IconFolderFilled as q,
|
|
21226
|
+
IconArrowLeft as r,
|
|
21108
21227
|
styled as s,
|
|
21109
|
-
|
|
21228
|
+
LikeC4AdHocViewEditor as t,
|
|
21110
21229
|
useUpdateEffect as u,
|
|
21111
|
-
|
|
21112
|
-
|
|
21113
|
-
|
|
21114
|
-
|
|
21115
|
-
|
|
21230
|
+
createStyleContext as v,
|
|
21231
|
+
navigationPanel as w,
|
|
21232
|
+
isCssProperty as x,
|
|
21233
|
+
useLikeC4Projects as y,
|
|
21234
|
+
IconChevronDown as z
|
|
21116
21235
|
};
|