likec4 1.32.1 → 1.33.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/fonts.css +1 -1
- package/__app__/src/main.js +522 -374
- package/__app__/src/style.css +1 -1
- package/dist/cli/index.mjs +539 -538
- package/dist/index.d.mts +1 -4
- package/dist/index.mjs +2 -2
- package/dist/shared/likec4.BeWJWU7_.mjs +1 -0
- package/dist/shared/likec4.Bo8Klpk_.mjs +2390 -0
- package/dist/shared/{likec4.CVzYPnDX.d.mts → likec4.Pysz93eX.d.mts} +11738 -1509
- package/dist/shared/likec4.qcW0JcqE.mjs +239 -0
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/index.mjs +2 -2
- package/dist/vite-plugin/internal.d.mts +417 -0
- package/dist/vite-plugin/internal.mjs +9 -0
- package/package.json +44 -42
- package/react/index.d.mts +71 -307
- package/react/index.mjs +30 -30
- package/vite-plugin-modules.d.ts +82 -2
- package/dist/shared/likec4.B20Ey-3l.mjs +0 -239
- package/dist/shared/likec4.CbTFhAsc.mjs +0 -2386
package/__app__/src/main.js
CHANGED
|
@@ -7,9 +7,8 @@ import ReactDOM__default, { createPortal, flushSync } from "react-dom";
|
|
|
7
7
|
import { ComponentName, useHashHistory, withOverviewGraph, krokiPumlSvgUrl, isDevelopment, krokiD2SvgUrl, basepath } from "./const.js";
|
|
8
8
|
import { projects, isSingleProject } from "likec4:projects";
|
|
9
9
|
import { $likec4model, $likec4data, IconRenderer as IconRenderer$1, projectId } from "likec4:single-project";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { DefaultShapeSize, DefaultTextSize, DefaultPaddingSize } from "@likec4/core/types";
|
|
10
|
+
import { isTagColorSpecified, invariant as invariant$2, hasAtLeast, nonexhaustive, isStepEdgeId, extractStep, nameFromFqn, nonNullable, defaultTheme, ElementShapes, toArray, RichText, ifind, DefaultMap, ancestorsFqn, isAncestor, sortParentsFirst, ifilter, Queue, whereOperatorAsPredicate, GroupElementKind, delay as delay$1, BBox, getParallelStepsPrefix, isDeploymentView, compareNatural as compareNatural$1, isDescendantOf } from "@likec4/core";
|
|
11
|
+
import { DefaultShapeSize, DefaultTextSize, DefaultPaddingSize, RichText as RichText$1 } from "@likec4/core/types";
|
|
13
12
|
import { computeRelationshipsView, treeFromElements as treeFromElements$1 } from "@likec4/core/compute-view/relationships";
|
|
14
13
|
import { compareNatural, ifind as ifind$1, DefaultMap as DefaultMap$1 } from "@likec4/core/utils";
|
|
15
14
|
import { modelConnection } from "@likec4/core/model";
|
|
@@ -743,26 +742,34 @@ function useCallbackRef(callback) {
|
|
|
743
742
|
}), useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
744
743
|
}
|
|
745
744
|
function useDebouncedCallback$1(callback, options) {
|
|
746
|
-
const delay2 = typeof options == "number" ?
|
|
747
|
-
|
|
748
|
-
useCallback(
|
|
745
|
+
const { delay: delay2, flushOnUnmount, leading } = typeof options == "number" ? { delay: options, flushOnUnmount: !1, leading: !1 } : options, handleCallback = useCallbackRef(callback), debounceTimerRef = useRef(0), lastCallback = useMemo(() => {
|
|
746
|
+
const currentCallback = Object.assign(
|
|
749
747
|
(...args) => {
|
|
750
|
-
|
|
751
|
-
|
|
748
|
+
window.clearTimeout(debounceTimerRef.current);
|
|
749
|
+
const isFirstCall = currentCallback._isFirstCall;
|
|
750
|
+
if (currentCallback._isFirstCall = !1, leading && isFirstCall) {
|
|
751
|
+
handleCallback(...args);
|
|
752
752
|
return;
|
|
753
753
|
}
|
|
754
|
+
function clearTimeoutAndLeadingRef() {
|
|
755
|
+
window.clearTimeout(debounceTimerRef.current), debounceTimerRef.current = 0, currentCallback._isFirstCall = !0;
|
|
756
|
+
}
|
|
754
757
|
const flush = () => {
|
|
755
|
-
debounceTimerRef.current !== 0 && (
|
|
758
|
+
debounceTimerRef.current !== 0 && (clearTimeoutAndLeadingRef(), handleCallback(...args));
|
|
759
|
+
}, cancel = () => {
|
|
760
|
+
clearTimeoutAndLeadingRef();
|
|
756
761
|
};
|
|
757
|
-
|
|
762
|
+
currentCallback.flush = flush, currentCallback.cancel = cancel, debounceTimerRef.current = window.setTimeout(flush, delay2);
|
|
758
763
|
},
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
764
|
+
{ flush: () => {
|
|
765
|
+
}, cancel: () => {
|
|
766
|
+
}, _isFirstCall: !0 }
|
|
767
|
+
);
|
|
768
|
+
return currentCallback;
|
|
769
|
+
}, [handleCallback, delay2, leading]);
|
|
763
770
|
return useEffect(
|
|
764
771
|
() => () => {
|
|
765
|
-
|
|
772
|
+
flushOnUnmount ? lastCallback.flush() : lastCallback.cancel();
|
|
766
773
|
},
|
|
767
774
|
[lastCallback, flushOnUnmount]
|
|
768
775
|
), lastCallback;
|
|
@@ -817,6 +824,19 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
|
817
824
|
function useColorScheme(initialValue, options) {
|
|
818
825
|
return useMediaQuery("(prefers-color-scheme: dark)", initialValue === "dark", options) ? "dark" : "light";
|
|
819
826
|
}
|
|
827
|
+
function useDebouncedState(defaultValue, wait, options = { leading: !1 }) {
|
|
828
|
+
const [value, setValue] = useState(defaultValue), timeoutRef = useRef(null), leadingRef = useRef(!0), clearTimeout2 = () => window.clearTimeout(timeoutRef.current);
|
|
829
|
+
useEffect(() => clearTimeout2, []);
|
|
830
|
+
const debouncedSetValue = useCallback(
|
|
831
|
+
(newValue) => {
|
|
832
|
+
clearTimeout2(), leadingRef.current && options.leading ? setValue(newValue) : timeoutRef.current = window.setTimeout(() => {
|
|
833
|
+
leadingRef.current = !0, setValue(newValue);
|
|
834
|
+
}, wait), leadingRef.current = !1;
|
|
835
|
+
},
|
|
836
|
+
[options.leading]
|
|
837
|
+
);
|
|
838
|
+
return [value, debouncedSetValue];
|
|
839
|
+
}
|
|
820
840
|
function useDebouncedValue(value, wait, options = { leading: !1 }) {
|
|
821
841
|
const [_value, setValue] = useState(value), mountedRef = useRef(!1), timeoutRef = useRef(null), cooldownRef = useRef(!1), cancel = () => window.clearTimeout(timeoutRef.current);
|
|
822
842
|
return useEffect(() => {
|
|
@@ -1214,8 +1234,9 @@ const keyNameMap = {
|
|
|
1214
1234
|
ArrowRight: "arrowright",
|
|
1215
1235
|
ArrowUp: "arrowup",
|
|
1216
1236
|
ArrowDown: "arrowdown",
|
|
1217
|
-
Escape: "
|
|
1218
|
-
Esc: "
|
|
1237
|
+
Escape: "escape",
|
|
1238
|
+
Esc: "escape",
|
|
1239
|
+
esc: "escape",
|
|
1219
1240
|
Enter: "enter",
|
|
1220
1241
|
Tab: "tab",
|
|
1221
1242
|
Backspace: "backspace",
|
|
@@ -1300,8 +1321,8 @@ function useHover$1() {
|
|
|
1300
1321
|
[handleMouseEnter, handleMouseLeave]
|
|
1301
1322
|
), hovered };
|
|
1302
1323
|
}
|
|
1303
|
-
function useDisclosure(
|
|
1304
|
-
const [opened, setOpened] = useState(
|
|
1324
|
+
function useDisclosure(initialState2 = !1, options = {}) {
|
|
1325
|
+
const [opened, setOpened] = useState(initialState2), open = useCallback(() => {
|
|
1305
1326
|
setOpened((isOpened) => isOpened || (options.onOpen?.(), !0));
|
|
1306
1327
|
}, [options.onOpen]), close = useCallback(() => {
|
|
1307
1328
|
setOpened((isOpened) => isOpened && (options.onClose?.(), !1));
|
|
@@ -1361,14 +1382,6 @@ function usePrevious$1(value) {
|
|
|
1361
1382
|
ref.current = value;
|
|
1362
1383
|
}, [value]), ref.current;
|
|
1363
1384
|
}
|
|
1364
|
-
function useInViewport() {
|
|
1365
|
-
const observer = useRef(null), [inViewport, setInViewport] = useState(!1);
|
|
1366
|
-
return { ref: useCallback((node2) => {
|
|
1367
|
-
typeof IntersectionObserver < "u" && (node2 && !observer.current ? observer.current = new IntersectionObserver(
|
|
1368
|
-
(entries) => setInViewport(entries.some((entry) => entry.isIntersecting))
|
|
1369
|
-
) : observer.current?.disconnect(), node2 ? observer.current?.observe(node2) : setInViewport(!1));
|
|
1370
|
-
}, []), inViewport };
|
|
1371
|
-
}
|
|
1372
1385
|
function useMutationObserver(callback, options, target) {
|
|
1373
1386
|
const observer = useRef(null), ref = useRef(null);
|
|
1374
1387
|
return useEffect(() => {
|
|
@@ -6838,7 +6851,7 @@ function getDefaultMiddlewares$1(middlewares) {
|
|
|
6838
6851
|
}
|
|
6839
6852
|
function getPopoverMiddlewares(options, getFloating, env) {
|
|
6840
6853
|
const middlewaresOptions = getDefaultMiddlewares$1(options.middlewares), middlewares = [offset$1(options.offset), hide()];
|
|
6841
|
-
return options.dropdownVisible && env !== "test" && (middlewaresOptions.flip = !1, middlewaresOptions.shift = !1), middlewaresOptions.shift && middlewares.push(
|
|
6854
|
+
return options.dropdownVisible && env !== "test" && options.preventPositionChangeWhenVisible && (middlewaresOptions.flip = !1, middlewaresOptions.shift = !1), middlewaresOptions.shift && middlewares.push(
|
|
6842
6855
|
shift(
|
|
6843
6856
|
typeof middlewaresOptions.shift == "boolean" ? { limiter: limitShift(), padding: 5 } : { limiter: limitShift(), padding: 5, ...middlewaresOptions.shift }
|
|
6844
6857
|
)
|
|
@@ -6869,9 +6882,11 @@ function usePopover(options) {
|
|
|
6869
6882
|
onChange: options.onChange
|
|
6870
6883
|
}), previouslyOpened = useRef(_opened), onClose = () => {
|
|
6871
6884
|
_opened && !options.disabled && setOpened(!1);
|
|
6872
|
-
}, onToggle = () =>
|
|
6885
|
+
}, onToggle = () => {
|
|
6886
|
+
options.disabled || setOpened(!_opened);
|
|
6887
|
+
}, floating = useFloating({
|
|
6873
6888
|
strategy: options.strategy,
|
|
6874
|
-
placement: options.positionRef.current,
|
|
6889
|
+
placement: options.preventPositionChangeWhenVisible ? options.positionRef.current : options.position,
|
|
6875
6890
|
middleware: getPopoverMiddlewares(options, () => floating, env),
|
|
6876
6891
|
whileElementsMounted: autoUpdate
|
|
6877
6892
|
});
|
|
@@ -6969,6 +6984,7 @@ function Popover(_props) {
|
|
|
6969
6984
|
withOverlay,
|
|
6970
6985
|
overlayProps,
|
|
6971
6986
|
hideDetached,
|
|
6987
|
+
preventPositionChangeWhenVisible,
|
|
6972
6988
|
...others
|
|
6973
6989
|
} = props2, getStyles2 = useStyles({
|
|
6974
6990
|
name: __staticSelector,
|
|
@@ -6999,7 +7015,8 @@ function Popover(_props) {
|
|
|
6999
7015
|
dropdownVisible,
|
|
7000
7016
|
setDropdownVisible,
|
|
7001
7017
|
positionRef,
|
|
7002
|
-
disabled
|
|
7018
|
+
disabled,
|
|
7019
|
+
preventPositionChangeWhenVisible
|
|
7003
7020
|
});
|
|
7004
7021
|
useClickOutside(
|
|
7005
7022
|
() => {
|
|
@@ -9323,6 +9340,7 @@ function Combobox(_props) {
|
|
|
9323
9340
|
Popover,
|
|
9324
9341
|
{
|
|
9325
9342
|
opened: store.dropdownOpened,
|
|
9343
|
+
preventPositionChangeWhenVisible: !0,
|
|
9326
9344
|
...others,
|
|
9327
9345
|
onChange: (_opened) => !_opened && onDropdownClose(),
|
|
9328
9346
|
withRoles: !1,
|
|
@@ -12646,7 +12664,7 @@ const defaultProps$8 = {
|
|
|
12646
12664
|
styles,
|
|
12647
12665
|
unstyled,
|
|
12648
12666
|
vars,
|
|
12649
|
-
initialState,
|
|
12667
|
+
initialState: initialState2,
|
|
12650
12668
|
maxHeight,
|
|
12651
12669
|
hideLabel,
|
|
12652
12670
|
showLabel,
|
|
@@ -12670,7 +12688,7 @@ const defaultProps$8 = {
|
|
|
12670
12688
|
varsResolver: varsResolver$5
|
|
12671
12689
|
}), _id = useId$2(id2), regionId = `${_id}-region`, [show, setShowState] = useUncontrolled({
|
|
12672
12690
|
value: expanded,
|
|
12673
|
-
defaultValue:
|
|
12691
|
+
defaultValue: initialState2,
|
|
12674
12692
|
finalValue: !1,
|
|
12675
12693
|
onChange: onExpandedChange
|
|
12676
12694
|
}), { ref: contentRef, height } = useElementSize(), spoilerMoreContent = show ? hideLabel : showLabel, spoiler = spoilerMoreContent !== null && maxHeight < height;
|
|
@@ -13192,7 +13210,7 @@ function TreeNode({
|
|
|
13192
13210
|
hasChildren: Array.isArray(node2.children) && node2.children.length > 0,
|
|
13193
13211
|
elementProps
|
|
13194
13212
|
}) : /* @__PURE__ */ jsx("div", { ...elementProps, children: node2.label }),
|
|
13195
|
-
controller.expandedState[node2.value] && nested.length > 0 && /* @__PURE__ */ jsx("ul",
|
|
13213
|
+
controller.expandedState[node2.value] && nested.length > 0 && /* @__PURE__ */ jsx(Box$1, { component: "ul", role: "group", ...getStyles2("subtree"), "data-level": level2, children: nested })
|
|
13196
13214
|
]
|
|
13197
13215
|
}
|
|
13198
13216
|
);
|
|
@@ -13255,14 +13273,14 @@ function isNodeIndeterminate(value, data, checkedState) {
|
|
|
13255
13273
|
return checkedState.length === 0 ? !1 : getAllCheckedNodes(data, checkedState).result.some((node2) => node2.value === value && node2.indeterminate);
|
|
13256
13274
|
}
|
|
13257
13275
|
const memoizedIsNodeIndeterminate = memoize(isNodeIndeterminate);
|
|
13258
|
-
function getInitialTreeExpandedState(
|
|
13276
|
+
function getInitialTreeExpandedState(initialState2, data, value, acc = {}) {
|
|
13259
13277
|
return data.forEach((node2) => {
|
|
13260
|
-
acc[node2.value] = node2.value in
|
|
13278
|
+
acc[node2.value] = node2.value in initialState2 ? initialState2[node2.value] : node2.value === value, Array.isArray(node2.children) && getInitialTreeExpandedState(initialState2, node2.children, value, acc);
|
|
13261
13279
|
}), acc;
|
|
13262
13280
|
}
|
|
13263
|
-
function getInitialCheckedState(
|
|
13281
|
+
function getInitialCheckedState(initialState2, data) {
|
|
13264
13282
|
const acc = [];
|
|
13265
|
-
return
|
|
13283
|
+
return initialState2.forEach((node2) => acc.push(...getChildrenNodesValues(node2, data))), Array.from(new Set(acc));
|
|
13266
13284
|
}
|
|
13267
13285
|
function useTree({
|
|
13268
13286
|
initialSelectedState = [],
|
|
@@ -13542,7 +13560,7 @@ function batch(fn) {
|
|
|
13542
13560
|
}
|
|
13543
13561
|
}
|
|
13544
13562
|
class Store {
|
|
13545
|
-
constructor(
|
|
13563
|
+
constructor(initialState2, options) {
|
|
13546
13564
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = (listener) => {
|
|
13547
13565
|
var _a, _b;
|
|
13548
13566
|
this.listeners.add(listener);
|
|
@@ -13553,7 +13571,7 @@ class Store {
|
|
|
13553
13571
|
}, this.setState = (updater) => {
|
|
13554
13572
|
var _a, _b, _c;
|
|
13555
13573
|
this.prevState = this.state, this.state = (_a = this.options) != null && _a.updateFn ? this.options.updateFn(this.prevState)(updater) : updater(this.prevState), (_c = (_b = this.options) == null ? void 0 : _b.onUpdate) == null || _c.call(_b), __flush(this);
|
|
13556
|
-
}, this.prevState =
|
|
13574
|
+
}, this.prevState = initialState2, this.state = initialState2, this.options = options;
|
|
13557
13575
|
}
|
|
13558
13576
|
}
|
|
13559
13577
|
class Derived {
|
|
@@ -22920,13 +22938,13 @@ function creator(name) {
|
|
|
22920
22938
|
}
|
|
22921
22939
|
function none() {
|
|
22922
22940
|
}
|
|
22923
|
-
function selector$
|
|
22941
|
+
function selector$q(selector3) {
|
|
22924
22942
|
return selector3 == null ? none : function() {
|
|
22925
22943
|
return this.querySelector(selector3);
|
|
22926
22944
|
};
|
|
22927
22945
|
}
|
|
22928
22946
|
function selection_select(select2) {
|
|
22929
|
-
typeof select2 != "function" && (select2 = selector$
|
|
22947
|
+
typeof select2 != "function" && (select2 = selector$q(select2));
|
|
22930
22948
|
for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j2 = 0; j2 < m2; ++j2)
|
|
22931
22949
|
for (var group = groups[j2], n2 = group.length, subgroup = subgroups[j2] = new Array(n2), node2, subnode, i2 = 0; i2 < n2; ++i2)
|
|
22932
22950
|
(node2 = group[i2]) && (subnode = select2.call(node2, node2.__data__, i2, group)) && ("__data__" in node2 && (subnode.__data__ = node2.__data__), subgroup[i2] = subnode);
|
|
@@ -23317,7 +23335,7 @@ function constantNull() {
|
|
|
23317
23335
|
return null;
|
|
23318
23336
|
}
|
|
23319
23337
|
function selection_insert(name, before) {
|
|
23320
|
-
var create2 = typeof name == "function" ? name : creator(name), select2 = before == null ? constantNull : typeof before == "function" ? before : selector$
|
|
23338
|
+
var create2 = typeof name == "function" ? name : creator(name), select2 = before == null ? constantNull : typeof before == "function" ? before : selector$q(before);
|
|
23321
23339
|
return this.select(function() {
|
|
23322
23340
|
return this.insertBefore(create2.apply(this, arguments), select2.apply(this, arguments) || null);
|
|
23323
23341
|
});
|
|
@@ -24471,7 +24489,7 @@ function transition_remove() {
|
|
|
24471
24489
|
}
|
|
24472
24490
|
function transition_select(select2) {
|
|
24473
24491
|
var name = this._name, id2 = this._id;
|
|
24474
|
-
typeof select2 != "function" && (select2 = selector$
|
|
24492
|
+
typeof select2 != "function" && (select2 = selector$q(select2));
|
|
24475
24493
|
for (var groups = this._groups, m2 = groups.length, subgroups = new Array(m2), j2 = 0; j2 < m2; ++j2)
|
|
24476
24494
|
for (var group = groups[j2], n2 = group.length, subgroup = subgroups[j2] = new Array(n2), node2, subnode, i2 = 0; i2 < n2; ++i2)
|
|
24477
24495
|
(node2 = group[i2]) && (subnode = select2.call(node2, node2.__data__, i2, group)) && ("__data__" in node2 && (subnode.__data__ = node2.__data__), subgroup[i2] = subnode, schedule(subgroup[i2], name, id2, i2, subgroup, get(node2, id2)));
|
|
@@ -26595,11 +26613,11 @@ const __vite_import_meta_env__ = {}, createStoreImpl = (createState2) => {
|
|
|
26595
26613
|
const previousState = state;
|
|
26596
26614
|
state = replace ?? (typeof nextState != "object" || nextState === null) ? nextState : Object.assign({}, state, nextState), listeners.forEach((listener) => listener(state, previousState));
|
|
26597
26615
|
}
|
|
26598
|
-
}, getState = () => state, api = { setState, getState, getInitialState: () =>
|
|
26616
|
+
}, getState = () => state, api = { setState, getState, getInitialState: () => initialState2, subscribe: (listener) => (listeners.add(listener), () => listeners.delete(listener)), destroy: () => {
|
|
26599
26617
|
(__vite_import_meta_env__ ? "production" : void 0) !== "production" && console.warn(
|
|
26600
26618
|
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
|
26601
26619
|
), listeners.clear();
|
|
26602
|
-
} },
|
|
26620
|
+
} }, initialState2 = state = createState2(setState, getState, api);
|
|
26603
26621
|
return api;
|
|
26604
26622
|
}, createStore$1 = (createState2) => createState2 ? createStoreImpl(createState2) : createStoreImpl, { useDebugValue } = React__default, { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports, identity = (arg) => arg;
|
|
26605
26623
|
function useStoreWithEqualityFn(api, selector3 = identity, equalityFn) {
|
|
@@ -28830,9 +28848,9 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
|
|
|
28830
28848
|
return jsx("div", { className: cc(["react-flow__resize-control", "nodrag", ...positionClassNames, variant, className]), ref: resizeControlRef, style: controlStyle, children: children2 });
|
|
28831
28849
|
}
|
|
28832
28850
|
memo$2(ResizeControl);
|
|
28833
|
-
const selector$
|
|
28851
|
+
const selector$p = (state) => state.domNode?.querySelector(".react-flow__renderer");
|
|
28834
28852
|
function NodeToolbarPortal({ children: children2 }) {
|
|
28835
|
-
const wrapperRef = useStore$1(selector$
|
|
28853
|
+
const wrapperRef = useStore$1(selector$p);
|
|
28836
28854
|
return wrapperRef ? createPortal(children2, wrapperRef) : null;
|
|
28837
28855
|
}
|
|
28838
28856
|
const nodeEqualityFn = (a2, b2) => a2?.internals.positionAbsolute.x !== b2?.internals.positionAbsolute.x || a2?.internals.positionAbsolute.y !== b2?.internals.positionAbsolute.y || a2?.measured.width !== b2?.measured.width || a2?.measured.height !== b2?.measured.height || a2?.selected !== b2?.selected || a2?.internals.z !== b2?.internals.z, nodesEqualityFn = (a2, b2) => {
|
|
@@ -32466,8 +32484,8 @@ ${err.message}`);
|
|
|
32466
32484
|
}
|
|
32467
32485
|
function getInitialStateNodesWithTheirAncestors(stateNode) {
|
|
32468
32486
|
const states = getInitialStateNodes(stateNode);
|
|
32469
|
-
for (const
|
|
32470
|
-
for (const ancestor of getProperAncestors(
|
|
32487
|
+
for (const initialState2 of states)
|
|
32488
|
+
for (const ancestor of getProperAncestors(initialState2, stateNode))
|
|
32471
32489
|
states.add(ancestor);
|
|
32472
32490
|
return states;
|
|
32473
32491
|
}
|
|
@@ -32731,8 +32749,8 @@ ${err.message}`);
|
|
|
32731
32749
|
addProperAncestorStatesToEnter(s2, stateNode.parent, statesToEnter, historyValue, statesForDefaultEntry);
|
|
32732
32750
|
}
|
|
32733
32751
|
else if (stateNode.type === "compound") {
|
|
32734
|
-
const [
|
|
32735
|
-
isHistoryNode(
|
|
32752
|
+
const [initialState2] = stateNode.initial.target;
|
|
32753
|
+
isHistoryNode(initialState2) || (statesToEnter.add(initialState2), statesForDefaultEntry.add(initialState2)), addDescendantStatesToEnter(initialState2, historyValue, statesForDefaultEntry, statesToEnter), addProperAncestorStatesToEnter(initialState2, stateNode, statesToEnter, historyValue, statesForDefaultEntry);
|
|
32736
32754
|
} else if (stateNode.type === "parallel")
|
|
32737
32755
|
for (const child of getChildren2(stateNode).filter((sn) => !isHistoryNode(sn)))
|
|
32738
32756
|
[...statesToEnter].some((s2) => isDescendant(s2, child)) || (isHistoryNode(child) || (statesToEnter.add(child), statesForDefaultEntry.add(child)), addDescendantStatesToEnter(child, historyValue, statesForDefaultEntry, statesToEnter));
|
|
@@ -34950,6 +34968,27 @@ const curveCatmullRomOpen = function custom4(alpha2) {
|
|
|
34950
34968
|
return splitProps(props2, likec4tagVariantKeys);
|
|
34951
34969
|
},
|
|
34952
34970
|
getVariantProps: likec4tagFn.getVariantProps
|
|
34971
|
+
}), markdownBlockFn = /* @__PURE__ */ createRecipe("likec4-markdown-block", {
|
|
34972
|
+
uselikec4palette: !1
|
|
34973
|
+
}, []), markdownBlockVariantMap = {
|
|
34974
|
+
uselikec4palette: [
|
|
34975
|
+
"true",
|
|
34976
|
+
"false"
|
|
34977
|
+
]
|
|
34978
|
+
}, markdownBlockVariantKeys = Object.keys(markdownBlockVariantMap), markdownBlock = /* @__PURE__ */ Object.assign(memo$1(markdownBlockFn.recipeFn), {
|
|
34979
|
+
__recipe__: !0,
|
|
34980
|
+
__name__: "markdownBlock",
|
|
34981
|
+
__getCompoundVariantCss__: markdownBlockFn.__getCompoundVariantCss__,
|
|
34982
|
+
raw: (props2) => props2,
|
|
34983
|
+
variantKeys: markdownBlockVariantKeys,
|
|
34984
|
+
variantMap: markdownBlockVariantMap,
|
|
34985
|
+
merge(recipe) {
|
|
34986
|
+
return mergeRecipes(this, recipe);
|
|
34987
|
+
},
|
|
34988
|
+
splitVariantProps(props2) {
|
|
34989
|
+
return splitProps(props2, markdownBlockVariantKeys);
|
|
34990
|
+
},
|
|
34991
|
+
getVariantProps: markdownBlockFn.getVariantProps
|
|
34953
34992
|
}), MotionButton = /* @__PURE__ */ createMinimalMotionComponent("button"), MotionDiv = /* @__PURE__ */ createMinimalMotionComponent("div"), compoundActionBtn = cva({
|
|
34954
34993
|
base: {
|
|
34955
34994
|
transitionDuration: "normal",
|
|
@@ -36603,140 +36642,157 @@ const ElementTag = forwardRef(
|
|
|
36603
36642
|
}
|
|
36604
36643
|
);
|
|
36605
36644
|
}
|
|
36606
|
-
), propsAreEqual = (prev, next) => prev.data.width === next.data.width && deepEqual(prev.data.tags, next.data.tags), ElementTags = memo$2(({ id: id2, data: { tags, width } }) => {
|
|
36607
|
-
const
|
|
36645
|
+
), propsAreEqual = (prev, next) => prev.data.width === next.data.width && deepEqual(prev.data.tags, next.data.tags) && (prev.data.hovered ?? !1) === (next.data.hovered ?? !1), ElementTags = memo$2(({ id: id2, data: { tags, width, hovered = !1 } }) => {
|
|
36646
|
+
const {
|
|
36647
|
+
hovered: isTagsBarHovered,
|
|
36648
|
+
ref: tagsBarRef
|
|
36649
|
+
} = useHover$1(), {
|
|
36650
|
+
hovered: isTagsToolbarHovered,
|
|
36651
|
+
ref: tagsToolbarRef
|
|
36652
|
+
} = useHover$1(), [isVisible, setVisible] = useDebouncedState(!1, hovered ? 120 : 300);
|
|
36653
|
+
useEffect(() => {
|
|
36654
|
+
setVisible((visibleNow) => visibleNow ? hovered || isTagsBarHovered || isTagsToolbarHovered : hovered && (isTagsBarHovered || isTagsToolbarHovered));
|
|
36655
|
+
}, [isTagsBarHovered, isTagsToolbarHovered, hovered]);
|
|
36656
|
+
const zoom2 = useCurrentZoom(), zoomIsLargeEnough = zoom2 > 1.2, diagram = useDiagram(), onHover = (tag) => {
|
|
36657
|
+
diagram.send({ type: "tag.highlight", tag });
|
|
36658
|
+
}, onLeave = useCallback(() => {
|
|
36659
|
+
diagram.send({ type: "tag.unhighlight" });
|
|
36660
|
+
}, []);
|
|
36608
36661
|
if (!tags || tags.length === 0)
|
|
36609
36662
|
return null;
|
|
36610
36663
|
const maxWidth = Math.max(Math.round(width * zoom2) - 10, 200);
|
|
36611
|
-
return /* @__PURE__ */ jsxs(
|
|
36612
|
-
|
|
36613
|
-
|
|
36614
|
-
|
|
36615
|
-
|
|
36616
|
-
|
|
36617
|
-
|
|
36618
|
-
|
|
36619
|
-
|
|
36620
|
-
|
|
36621
|
-
|
|
36622
|
-
|
|
36623
|
-
|
|
36624
|
-
|
|
36625
|
-
|
|
36626
|
-
|
|
36664
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
36665
|
+
/* @__PURE__ */ jsx(
|
|
36666
|
+
"div",
|
|
36667
|
+
{
|
|
36668
|
+
ref: tagsBarRef,
|
|
36669
|
+
className: cx(
|
|
36670
|
+
"likec4-element-tags",
|
|
36671
|
+
hstack({
|
|
36672
|
+
pointerEvents: "all",
|
|
36673
|
+
gap: 4,
|
|
36674
|
+
alignItems: "flex-end",
|
|
36675
|
+
justifyItems: "stretch",
|
|
36676
|
+
position: "absolute",
|
|
36677
|
+
width: "100%",
|
|
36678
|
+
bottom: 0,
|
|
36679
|
+
left: 0,
|
|
36680
|
+
padding: 4,
|
|
36681
|
+
_shapeCylinder: {
|
|
36682
|
+
bottom: 5
|
|
36683
|
+
},
|
|
36684
|
+
_shapeStorage: {
|
|
36685
|
+
bottom: 5
|
|
36686
|
+
},
|
|
36687
|
+
_shapeQueue: {
|
|
36688
|
+
bottom: 0,
|
|
36689
|
+
paddingLeft: 14
|
|
36690
|
+
}
|
|
36691
|
+
})
|
|
36692
|
+
),
|
|
36693
|
+
onClick: stopPropagation$1,
|
|
36694
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(
|
|
36695
|
+
Box,
|
|
36627
36696
|
{
|
|
36628
|
-
|
|
36629
|
-
|
|
36630
|
-
|
|
36631
|
-
|
|
36632
|
-
|
|
36633
|
-
|
|
36634
|
-
|
|
36635
|
-
|
|
36636
|
-
|
|
36637
|
-
|
|
36638
|
-
|
|
36639
|
-
|
|
36640
|
-
|
|
36641
|
-
bottom: 5
|
|
36642
|
-
},
|
|
36643
|
-
_shapeStorage: {
|
|
36644
|
-
bottom: 5
|
|
36645
|
-
},
|
|
36646
|
-
_shapeQueue: {
|
|
36647
|
-
bottom: 0,
|
|
36648
|
-
paddingLeft: 14
|
|
36649
|
-
}
|
|
36650
|
-
})
|
|
36651
|
-
),
|
|
36652
|
-
onClick: stopPropagation$1,
|
|
36653
|
-
children: tags.map((tag) => /* @__PURE__ */ jsx(
|
|
36654
|
-
Box,
|
|
36655
|
-
{
|
|
36656
|
-
"data-likec4-tag": tag,
|
|
36657
|
-
className: css({
|
|
36658
|
-
layerStyle: "likec4.tag",
|
|
36659
|
-
flex: 1,
|
|
36660
|
-
display: "flex",
|
|
36661
|
-
alignItems: "center",
|
|
36662
|
-
justifyContent: "center",
|
|
36663
|
-
maxWidth: 50,
|
|
36664
|
-
height: 5,
|
|
36665
|
-
_whenHovered: {
|
|
36666
|
-
height: 12,
|
|
36667
|
-
borderRadius: 4,
|
|
36668
|
-
transitionDelay: ".08s"
|
|
36669
|
-
},
|
|
36670
|
-
transition: "fast"
|
|
36671
|
-
})
|
|
36697
|
+
"data-likec4-tag": tag,
|
|
36698
|
+
className: css({
|
|
36699
|
+
layerStyle: "likec4.tag",
|
|
36700
|
+
flex: 1,
|
|
36701
|
+
display: "flex",
|
|
36702
|
+
alignItems: "center",
|
|
36703
|
+
justifyContent: "center",
|
|
36704
|
+
maxWidth: 50,
|
|
36705
|
+
height: 5,
|
|
36706
|
+
_whenHovered: {
|
|
36707
|
+
height: 12,
|
|
36708
|
+
borderRadius: 4,
|
|
36709
|
+
transitionDelay: ".08s"
|
|
36672
36710
|
},
|
|
36673
|
-
|
|
36674
|
-
)
|
|
36675
|
-
}
|
|
36676
|
-
|
|
36677
|
-
|
|
36678
|
-
|
|
36711
|
+
transition: "fast"
|
|
36712
|
+
})
|
|
36713
|
+
},
|
|
36714
|
+
id2 + "#" + tag
|
|
36715
|
+
))
|
|
36716
|
+
}
|
|
36717
|
+
),
|
|
36718
|
+
/* @__PURE__ */ jsx(NodeToolbar, { isVisible, align: "start", position: Position.Bottom, children: /* @__PURE__ */ jsx(
|
|
36719
|
+
HStack,
|
|
36720
|
+
{
|
|
36721
|
+
ref: tagsToolbarRef,
|
|
36722
|
+
css: {
|
|
36723
|
+
gap: 4,
|
|
36724
|
+
flexWrap: "wrap",
|
|
36725
|
+
pb: "sm",
|
|
36726
|
+
translate: "auto",
|
|
36727
|
+
x: -8,
|
|
36728
|
+
maxWidth
|
|
36729
|
+
},
|
|
36730
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(
|
|
36731
|
+
ElementTag,
|
|
36679
36732
|
{
|
|
36680
|
-
|
|
36681
|
-
w: "auto",
|
|
36682
|
-
maw: maxWidth,
|
|
36733
|
+
tag,
|
|
36683
36734
|
className: css({
|
|
36684
|
-
|
|
36685
|
-
|
|
36735
|
+
userSelect: "none",
|
|
36736
|
+
cursor: "pointer",
|
|
36737
|
+
...zoomIsLargeEnough && {
|
|
36738
|
+
fontSize: "lg",
|
|
36739
|
+
borderRadius: 4,
|
|
36740
|
+
px: 6
|
|
36741
|
+
}
|
|
36686
36742
|
}),
|
|
36687
|
-
|
|
36688
|
-
|
|
36689
|
-
|
|
36690
|
-
|
|
36691
|
-
|
|
36692
|
-
|
|
36743
|
+
onClick: (e2) => {
|
|
36744
|
+
e2.stopPropagation(), diagram.openSearch(`#${tag}`);
|
|
36745
|
+
},
|
|
36746
|
+
onMouseEnter: () => onHover(tag),
|
|
36747
|
+
onMouseLeave: onLeave
|
|
36748
|
+
},
|
|
36749
|
+
tag
|
|
36750
|
+
))
|
|
36751
|
+
}
|
|
36752
|
+
) })
|
|
36753
|
+
] });
|
|
36693
36754
|
}, propsAreEqual);
|
|
36694
36755
|
ElementTags.displayName = "ElementTags";
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36756
|
+
const MarkdownBlock = forwardRef(({
|
|
36757
|
+
value,
|
|
36758
|
+
textScale = 1,
|
|
36759
|
+
uselikec4palette = !1,
|
|
36760
|
+
hideIfEmpty = !1,
|
|
36761
|
+
emptyText = "no content",
|
|
36762
|
+
className,
|
|
36763
|
+
...props2
|
|
36764
|
+
}, ref) => {
|
|
36765
|
+
if (value.isEmpty && hideIfEmpty)
|
|
36766
|
+
return null;
|
|
36767
|
+
const content2 = value.nonEmpty ? { dangerouslySetInnerHTML: { __html: value.html } } : { children: /* @__PURE__ */ jsx(Text, { component: "span", fz: "xs", c: "dimmed", children: emptyText }) };
|
|
36701
36768
|
return /* @__PURE__ */ jsx(
|
|
36702
|
-
|
|
36769
|
+
Box,
|
|
36703
36770
|
{
|
|
36704
|
-
|
|
36705
|
-
|
|
36706
|
-
|
|
36707
|
-
|
|
36771
|
+
ref,
|
|
36772
|
+
...props2,
|
|
36773
|
+
className: cx(
|
|
36774
|
+
markdownBlock({
|
|
36775
|
+
uselikec4palette
|
|
36776
|
+
}),
|
|
36777
|
+
className
|
|
36778
|
+
),
|
|
36779
|
+
style: {
|
|
36780
|
+
// @ts-expect-error
|
|
36781
|
+
"--mantine-scale": textScale
|
|
36708
36782
|
},
|
|
36709
|
-
|
|
36710
|
-
ElementTag,
|
|
36711
|
-
{
|
|
36712
|
-
tag,
|
|
36713
|
-
className: css({
|
|
36714
|
-
userSelect: "none",
|
|
36715
|
-
cursor: "pointer",
|
|
36716
|
-
...zoomIsLargeEnough && {
|
|
36717
|
-
fontSize: "lg",
|
|
36718
|
-
borderRadius: 4,
|
|
36719
|
-
px: 6
|
|
36720
|
-
}
|
|
36721
|
-
}),
|
|
36722
|
-
onClick: (e2) => {
|
|
36723
|
-
e2.stopPropagation(), diagram.openSearch(`#${tag}`);
|
|
36724
|
-
},
|
|
36725
|
-
onMouseEnter: () => onHover(tag),
|
|
36726
|
-
onMouseLeave: onLeave
|
|
36727
|
-
},
|
|
36728
|
-
tag
|
|
36729
|
-
))
|
|
36783
|
+
...content2
|
|
36730
36784
|
}
|
|
36731
36785
|
);
|
|
36732
|
-
}
|
|
36786
|
+
});
|
|
36787
|
+
MarkdownBlock.displayName = "MarkdownBlock";
|
|
36733
36788
|
const iconSize$2 = "--icon-size", title$4 = css.raw({
|
|
36734
36789
|
textStyle: "likec4.node.primary",
|
|
36735
36790
|
flex: "0 0 auto",
|
|
36736
36791
|
textAlign: "center",
|
|
36737
36792
|
color: "likec4.palette.hiContrast"
|
|
36738
36793
|
}), description$2 = css.raw({
|
|
36739
|
-
|
|
36794
|
+
flexGrow: "0",
|
|
36795
|
+
flexShrink: "1",
|
|
36740
36796
|
textStyle: "likec4.node.secondary",
|
|
36741
36797
|
color: "likec4.palette.loContrast",
|
|
36742
36798
|
textAlign: "center",
|
|
@@ -36806,6 +36862,8 @@ const iconSize$2 = "--icon-size", title$4 = css.raw({
|
|
|
36806
36862
|
flex: "1",
|
|
36807
36863
|
height: "fit-content",
|
|
36808
36864
|
width: "fit-content",
|
|
36865
|
+
maxHeight: "100%",
|
|
36866
|
+
maxWidth: "100%",
|
|
36809
36867
|
margin: "0 auto",
|
|
36810
36868
|
display: "flex",
|
|
36811
36869
|
alignItems: "center",
|
|
@@ -36857,6 +36915,8 @@ const iconSize$2 = "--icon-size", title$4 = css.raw({
|
|
|
36857
36915
|
textContainer: {
|
|
36858
36916
|
height: "fit-content",
|
|
36859
36917
|
width: "fit-content",
|
|
36918
|
+
maxHeight: "100%",
|
|
36919
|
+
maxWidth: "100%",
|
|
36860
36920
|
flex: "0 1 auto",
|
|
36861
36921
|
display: "flex",
|
|
36862
36922
|
flexDirection: "column",
|
|
@@ -36926,7 +36986,7 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
|
|
|
36926
36986
|
className: elementIcon$2
|
|
36927
36987
|
}), classes2 = elementTitle({
|
|
36928
36988
|
hasIcon: n$5(elementIcon2),
|
|
36929
|
-
hasDescription:
|
|
36989
|
+
hasDescription: !!data.description?.nonEmpty,
|
|
36930
36990
|
hasTechnology: !n$1(data.technology ?? "")
|
|
36931
36991
|
}), size2 = nodeSizes(data.style).size, isSmOrXs = size2 === "sm" || size2 === "xs";
|
|
36932
36992
|
return /* @__PURE__ */ jsxs(
|
|
@@ -36946,7 +37006,7 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
|
|
|
36946
37006
|
/* @__PURE__ */ jsx(
|
|
36947
37007
|
Text,
|
|
36948
37008
|
{
|
|
36949
|
-
component: "
|
|
37009
|
+
component: "div",
|
|
36950
37010
|
className: cx(classes2.title, "likec4-element-title"),
|
|
36951
37011
|
lineClamp: isSmOrXs ? 2 : 3,
|
|
36952
37012
|
children: data.title
|
|
@@ -36961,12 +37021,14 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
|
|
|
36961
37021
|
}
|
|
36962
37022
|
),
|
|
36963
37023
|
data.description && /* @__PURE__ */ jsx(
|
|
36964
|
-
|
|
37024
|
+
MarkdownBlock,
|
|
36965
37025
|
{
|
|
36966
|
-
component: "div",
|
|
36967
37026
|
className: cx(classes2.description, "likec4-element-description"),
|
|
36968
|
-
|
|
36969
|
-
|
|
37027
|
+
value: data.description,
|
|
37028
|
+
uselikec4palette: !0,
|
|
37029
|
+
hideIfEmpty: !0,
|
|
37030
|
+
maxHeight: data.description.isMarkdown ? "8rem" : void 0,
|
|
37031
|
+
lineClamp: isSmOrXs ? 3 : 5
|
|
36970
37032
|
}
|
|
36971
37033
|
)
|
|
36972
37034
|
] })
|
|
@@ -37442,7 +37504,7 @@ const stopPropagation = (e2) => e2.stopPropagation(), Tooltip$4 = Tooltip$5.with
|
|
|
37442
37504
|
] })
|
|
37443
37505
|
] }),
|
|
37444
37506
|
/* @__PURE__ */ jsx(Box$1, { className: title$3, children: r2.title || "untitled" }),
|
|
37445
|
-
r2.description && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: r2.description }),
|
|
37507
|
+
r2.description.nonEmpty && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: r2.description.text }),
|
|
37446
37508
|
links.length > 0 && /* @__PURE__ */ jsx(
|
|
37447
37509
|
Stack,
|
|
37448
37510
|
{
|
|
@@ -38379,131 +38441,90 @@ const select = (s2) => s2.children.search ?? null;
|
|
|
38379
38441
|
function useSearchActorRef() {
|
|
38380
38442
|
return useDiagramActorSnapshot(select, Object.is);
|
|
38381
38443
|
}
|
|
38382
|
-
|
|
38383
|
-
|
|
38384
|
-
|
|
38385
|
-
|
|
38386
|
-
|
|
38387
|
-
|
|
38388
|
-
|
|
38389
|
-
|
|
38390
|
-
|
|
38391
|
-
|
|
38392
|
-
|
|
38393
|
-
|
|
38444
|
+
const ErrorBoundaryContext = createContext(null), initialState = {
|
|
38445
|
+
didCatch: !1,
|
|
38446
|
+
error: null
|
|
38447
|
+
};
|
|
38448
|
+
class ErrorBoundary extends Component {
|
|
38449
|
+
constructor(props2) {
|
|
38450
|
+
super(props2), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = initialState;
|
|
38451
|
+
}
|
|
38452
|
+
static getDerivedStateFromError(error) {
|
|
38453
|
+
return {
|
|
38454
|
+
didCatch: !0,
|
|
38455
|
+
error
|
|
38456
|
+
};
|
|
38457
|
+
}
|
|
38458
|
+
resetErrorBoundary() {
|
|
38459
|
+
const {
|
|
38460
|
+
error
|
|
38461
|
+
} = this.state;
|
|
38462
|
+
if (error !== null) {
|
|
38463
|
+
for (var _this$props$onReset, _this$props, _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
|
|
38464
|
+
args[_key] = arguments[_key];
|
|
38465
|
+
(_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 || _this$props$onReset.call(_this$props, {
|
|
38466
|
+
args,
|
|
38467
|
+
reason: "imperative-api"
|
|
38468
|
+
}), this.setState(initialState);
|
|
38394
38469
|
}
|
|
38395
|
-
|
|
38396
|
-
|
|
38397
|
-
|
|
38398
|
-
|
|
38470
|
+
}
|
|
38471
|
+
componentDidCatch(error, info) {
|
|
38472
|
+
var _this$props$onError, _this$props2;
|
|
38473
|
+
(_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 || _this$props$onError.call(_this$props2, error, info);
|
|
38474
|
+
}
|
|
38475
|
+
componentDidUpdate(prevProps, prevState) {
|
|
38476
|
+
const {
|
|
38477
|
+
didCatch
|
|
38478
|
+
} = this.state, {
|
|
38479
|
+
resetKeys
|
|
38480
|
+
} = this.props;
|
|
38481
|
+
if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
|
|
38482
|
+
var _this$props$onReset2, _this$props3;
|
|
38483
|
+
(_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 || _this$props$onReset2.call(_this$props3, {
|
|
38484
|
+
next: resetKeys,
|
|
38485
|
+
prev: prevProps.resetKeys,
|
|
38486
|
+
reason: "keys"
|
|
38487
|
+
}), this.setState(initialState);
|
|
38488
|
+
}
|
|
38489
|
+
}
|
|
38490
|
+
render() {
|
|
38491
|
+
const {
|
|
38492
|
+
children: children2,
|
|
38493
|
+
fallbackRender,
|
|
38494
|
+
FallbackComponent,
|
|
38495
|
+
fallback
|
|
38496
|
+
} = this.props, {
|
|
38497
|
+
didCatch,
|
|
38498
|
+
error
|
|
38499
|
+
} = this.state;
|
|
38500
|
+
let childToRender = children2;
|
|
38501
|
+
if (didCatch) {
|
|
38502
|
+
const props2 = {
|
|
38503
|
+
error,
|
|
38504
|
+
resetErrorBoundary: this.resetErrorBoundary
|
|
38399
38505
|
};
|
|
38506
|
+
if (typeof fallbackRender == "function")
|
|
38507
|
+
childToRender = fallbackRender(props2);
|
|
38508
|
+
else if (FallbackComponent)
|
|
38509
|
+
childToRender = createElement(FallbackComponent, props2);
|
|
38510
|
+
else if (fallback !== void 0)
|
|
38511
|
+
childToRender = fallback;
|
|
38512
|
+
else
|
|
38513
|
+
throw error;
|
|
38400
38514
|
}
|
|
38401
|
-
|
|
38402
|
-
|
|
38403
|
-
error
|
|
38404
|
-
} = this.state;
|
|
38405
|
-
if (error !== null) {
|
|
38406
|
-
for (var _this$props$onReset, _this$props, _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
|
|
38407
|
-
args[_key] = arguments[_key];
|
|
38408
|
-
(_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 || _this$props$onReset.call(_this$props, {
|
|
38409
|
-
args,
|
|
38410
|
-
reason: "imperative-api"
|
|
38411
|
-
}), this.setState(initialState);
|
|
38412
|
-
}
|
|
38413
|
-
}
|
|
38414
|
-
componentDidCatch(error, info) {
|
|
38415
|
-
var _this$props$onError, _this$props2;
|
|
38416
|
-
(_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 || _this$props$onError.call(_this$props2, error, info);
|
|
38417
|
-
}
|
|
38418
|
-
componentDidUpdate(prevProps, prevState) {
|
|
38419
|
-
const {
|
|
38420
|
-
didCatch
|
|
38421
|
-
} = this.state, {
|
|
38422
|
-
resetKeys
|
|
38423
|
-
} = this.props;
|
|
38424
|
-
if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
|
|
38425
|
-
var _this$props$onReset2, _this$props3;
|
|
38426
|
-
(_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 || _this$props$onReset2.call(_this$props3, {
|
|
38427
|
-
next: resetKeys,
|
|
38428
|
-
prev: prevProps.resetKeys,
|
|
38429
|
-
reason: "keys"
|
|
38430
|
-
}), this.setState(initialState);
|
|
38431
|
-
}
|
|
38432
|
-
}
|
|
38433
|
-
render() {
|
|
38434
|
-
const {
|
|
38435
|
-
children: children2,
|
|
38436
|
-
fallbackRender,
|
|
38437
|
-
FallbackComponent,
|
|
38438
|
-
fallback
|
|
38439
|
-
} = this.props, {
|
|
38515
|
+
return createElement(ErrorBoundaryContext.Provider, {
|
|
38516
|
+
value: {
|
|
38440
38517
|
didCatch,
|
|
38441
|
-
error
|
|
38442
|
-
} = this.state;
|
|
38443
|
-
let childToRender = children2;
|
|
38444
|
-
if (didCatch) {
|
|
38445
|
-
const props2 = {
|
|
38446
|
-
error,
|
|
38447
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
38448
|
-
};
|
|
38449
|
-
if (typeof fallbackRender == "function")
|
|
38450
|
-
childToRender = fallbackRender(props2);
|
|
38451
|
-
else if (FallbackComponent)
|
|
38452
|
-
childToRender = react.createElement(FallbackComponent, props2);
|
|
38453
|
-
else if (fallback !== void 0)
|
|
38454
|
-
childToRender = fallback;
|
|
38455
|
-
else
|
|
38456
|
-
throw error;
|
|
38457
|
-
}
|
|
38458
|
-
return react.createElement(ErrorBoundaryContext.Provider, {
|
|
38459
|
-
value: {
|
|
38460
|
-
didCatch,
|
|
38461
|
-
error,
|
|
38462
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
38463
|
-
}
|
|
38464
|
-
}, childToRender);
|
|
38465
|
-
}
|
|
38466
|
-
}
|
|
38467
|
-
function hasArrayChanged() {
|
|
38468
|
-
let a2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], b2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
38469
|
-
return a2.length !== b2.length || a2.some((item, index2) => !Object.is(item, b2[index2]));
|
|
38470
|
-
}
|
|
38471
|
-
function assertErrorBoundaryContext(value) {
|
|
38472
|
-
if (value == null || typeof value.didCatch != "boolean" || typeof value.resetErrorBoundary != "function")
|
|
38473
|
-
throw new Error("ErrorBoundaryContext not found");
|
|
38474
|
-
}
|
|
38475
|
-
function useErrorBoundary() {
|
|
38476
|
-
const context2 = react.useContext(ErrorBoundaryContext);
|
|
38477
|
-
assertErrorBoundaryContext(context2);
|
|
38478
|
-
const [state, setState] = react.useState({
|
|
38479
|
-
error: null,
|
|
38480
|
-
hasError: !1
|
|
38481
|
-
}), memoized = react.useMemo(() => ({
|
|
38482
|
-
resetBoundary: () => {
|
|
38483
|
-
context2.resetErrorBoundary(), setState({
|
|
38484
|
-
error: null,
|
|
38485
|
-
hasError: !1
|
|
38486
|
-
});
|
|
38487
|
-
},
|
|
38488
|
-
showBoundary: (error) => setState({
|
|
38489
38518
|
error,
|
|
38490
|
-
|
|
38491
|
-
}
|
|
38492
|
-
}
|
|
38493
|
-
if (state.hasError)
|
|
38494
|
-
throw state.error;
|
|
38495
|
-
return memoized;
|
|
38496
|
-
}
|
|
38497
|
-
function withErrorBoundary(component, errorBoundaryProps) {
|
|
38498
|
-
const Wrapped = react.forwardRef((props2, ref) => react.createElement(ErrorBoundary, errorBoundaryProps, react.createElement(component, {
|
|
38499
|
-
...props2,
|
|
38500
|
-
ref
|
|
38501
|
-
}))), name = component.displayName || component.name || "Unknown";
|
|
38502
|
-
return Wrapped.displayName = "withErrorBoundary(".concat(name, ")"), Wrapped;
|
|
38519
|
+
resetErrorBoundary: this.resetErrorBoundary
|
|
38520
|
+
}
|
|
38521
|
+
}, childToRender);
|
|
38503
38522
|
}
|
|
38504
|
-
return reactErrorBoundary_cjs.ErrorBoundary = ErrorBoundary, reactErrorBoundary_cjs.ErrorBoundaryContext = ErrorBoundaryContext, reactErrorBoundary_cjs.useErrorBoundary = useErrorBoundary, reactErrorBoundary_cjs.withErrorBoundary = withErrorBoundary, reactErrorBoundary_cjs;
|
|
38505
38523
|
}
|
|
38506
|
-
|
|
38524
|
+
function hasArrayChanged() {
|
|
38525
|
+
let a2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], b2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
38526
|
+
return a2.length !== b2.length || a2.some((item, index2) => !Object.is(item, b2[index2]));
|
|
38527
|
+
}
|
|
38507
38528
|
function ErrorFallback({ error, resetErrorBoundary }) {
|
|
38508
38529
|
const errorString = error instanceof Error ? error.message : "Unknown error";
|
|
38509
38530
|
return /* @__PURE__ */ jsx(Box, { pos: "fixed", top: 0, left: 0, w: "100%", p: 0, style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs(
|
|
@@ -38729,11 +38750,13 @@ const useElementDetailsActorRef = () => {
|
|
|
38729
38750
|
display: "grid",
|
|
38730
38751
|
gridTemplateColumns: "min-content 1fr",
|
|
38731
38752
|
gridAutoRows: "min-content max-content",
|
|
38732
|
-
gap: "[20px
|
|
38753
|
+
gap: "[24px 20px]",
|
|
38733
38754
|
alignItems: "baseline",
|
|
38734
38755
|
justifyItems: "stretch"
|
|
38735
38756
|
}), propertyLabel = css({
|
|
38736
|
-
justifySelf: "end"
|
|
38757
|
+
justifySelf: "end",
|
|
38758
|
+
textAlign: "right",
|
|
38759
|
+
userSelect: "none"
|
|
38737
38760
|
}), resizeHandle = css({
|
|
38738
38761
|
position: "absolute",
|
|
38739
38762
|
width: "14px",
|
|
@@ -41748,7 +41771,7 @@ function layoutRelationshipsView$1(data, scope) {
|
|
|
41748
41771
|
y: position.y,
|
|
41749
41772
|
position: [position.x, position.y],
|
|
41750
41773
|
title: "empty node",
|
|
41751
|
-
description:
|
|
41774
|
+
description: RichText.EMPTY,
|
|
41752
41775
|
technology: null,
|
|
41753
41776
|
tags: [],
|
|
41754
41777
|
links: [],
|
|
@@ -41787,7 +41810,7 @@ function layoutRelationshipsView$1(data, scope) {
|
|
|
41787
41810
|
y: position.y,
|
|
41788
41811
|
position: [position.x, position.y],
|
|
41789
41812
|
title: element.title,
|
|
41790
|
-
description: element.description,
|
|
41813
|
+
description: RichText.from(element.description),
|
|
41791
41814
|
technology: element.technology,
|
|
41792
41815
|
tags: [...element.tags],
|
|
41793
41816
|
links: null,
|
|
@@ -42096,7 +42119,7 @@ function RelationshipsBrowser({ actorRef }) {
|
|
|
42096
42119
|
initialEdges: []
|
|
42097
42120
|
}), /* @__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, {}) }) }) }) });
|
|
42098
42121
|
}
|
|
42099
|
-
const selector$
|
|
42122
|
+
const selector$5 = (state) => ({
|
|
42100
42123
|
isActive: state.hasTag("active"),
|
|
42101
42124
|
nodes: state.context.xynodes,
|
|
42102
42125
|
edges: state.context.xyedges
|
|
@@ -42106,7 +42129,7 @@ const selector$4 = (state) => ({
|
|
|
42106
42129
|
nodes,
|
|
42107
42130
|
edges
|
|
42108
42131
|
} = useRelationshipsBrowserState(
|
|
42109
|
-
selector$
|
|
42132
|
+
selector$5,
|
|
42110
42133
|
selectorEq
|
|
42111
42134
|
);
|
|
42112
42135
|
return /* @__PURE__ */ jsx(
|
|
@@ -42770,7 +42793,22 @@ function ElementDetailsCard({
|
|
|
42770
42793
|
/* @__PURE__ */ jsxs(Group, { align: "baseline", gap: "sm", wrap: "nowrap", children: [
|
|
42771
42794
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
42772
42795
|
/* @__PURE__ */ jsx(SmallLabel, { children: "kind" }),
|
|
42773
|
-
/* @__PURE__ */ jsx(
|
|
42796
|
+
/* @__PURE__ */ jsx(
|
|
42797
|
+
Badge,
|
|
42798
|
+
{
|
|
42799
|
+
radius: "sm",
|
|
42800
|
+
size: "sm",
|
|
42801
|
+
fw: 600,
|
|
42802
|
+
color: "gray",
|
|
42803
|
+
style: {
|
|
42804
|
+
cursor: "pointer"
|
|
42805
|
+
},
|
|
42806
|
+
onClick: (e2) => {
|
|
42807
|
+
e2.stopPropagation(), diagram.openSearch(`kind:${elementModel.kind}`);
|
|
42808
|
+
},
|
|
42809
|
+
children: elementModel.kind
|
|
42810
|
+
}
|
|
42811
|
+
)
|
|
42774
42812
|
] }),
|
|
42775
42813
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
42776
42814
|
/* @__PURE__ */ jsx(SmallLabel, { children: "tags" }),
|
|
@@ -42817,7 +42855,9 @@ function ElementDetailsCard({
|
|
|
42817
42855
|
variant: "default",
|
|
42818
42856
|
radius: "sm",
|
|
42819
42857
|
onClick: (e2) => {
|
|
42820
|
-
e2.stopPropagation()
|
|
42858
|
+
e2.stopPropagation(), diagram.openSource({
|
|
42859
|
+
element: elementModel.id
|
|
42860
|
+
});
|
|
42821
42861
|
},
|
|
42822
42862
|
children: /* @__PURE__ */ jsx(IconFileSymlink, { stroke: 1.8, style: { width: "62%" } })
|
|
42823
42863
|
}
|
|
@@ -42853,8 +42893,17 @@ function ElementDetailsCard({
|
|
|
42853
42893
|
},
|
|
42854
42894
|
children: [
|
|
42855
42895
|
/* @__PURE__ */ jsx(TabsList, { children: TABS.map((tab) => /* @__PURE__ */ jsx(TabsTab, { value: tab, children: tab }, tab)) }),
|
|
42856
|
-
/* @__PURE__ */ jsx(TabsPanel, { value: "Properties", children: /* @__PURE__ */ jsx(ScrollArea, { scrollbars: "y", type: "
|
|
42857
|
-
/* @__PURE__ */
|
|
42896
|
+
/* @__PURE__ */ jsx(TabsPanel, { value: "Properties", children: /* @__PURE__ */ jsx(ScrollArea, { scrollbars: "y", type: "scroll", offsetScrollbars: !0, children: /* @__PURE__ */ jsxs(Box$1, { className: propertiesGrid, pt: "xs", children: [
|
|
42897
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
42898
|
+
/* @__PURE__ */ jsx(PropertyLabel, { children: "description" }),
|
|
42899
|
+
/* @__PURE__ */ jsx(
|
|
42900
|
+
MarkdownBlock,
|
|
42901
|
+
{
|
|
42902
|
+
value: elementModel.description,
|
|
42903
|
+
emptyText: "no description"
|
|
42904
|
+
}
|
|
42905
|
+
)
|
|
42906
|
+
] }),
|
|
42858
42907
|
elementModel.technology && /* @__PURE__ */ jsx(ElementProperty, { title: "technology", children: elementModel.technology }),
|
|
42859
42908
|
elementModel.links.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
42860
42909
|
/* @__PURE__ */ jsx(PropertyLabel, { children: "links" }),
|
|
@@ -42929,10 +42978,7 @@ const ViewButton$1 = ({
|
|
|
42929
42978
|
onNavigateTo
|
|
42930
42979
|
}) => /* @__PURE__ */ jsx(UnstyledButton, { className: viewButton$1, onClick: (e2) => onNavigateTo(view.id, e2), children: /* @__PURE__ */ jsxs(Group, { gap: 6, align: "start", wrap: "nowrap", children: [
|
|
42931
42980
|
/* @__PURE__ */ jsx(ThemeIcon, { size: "sm", variant: "transparent", children: view._type === "deployment" ? /* @__PURE__ */ jsx(IconStack2, { stroke: 1.8 }) : /* @__PURE__ */ jsx(IconZoomScan, { stroke: 1.8 }) }),
|
|
42932
|
-
/* @__PURE__ */
|
|
42933
|
-
/* @__PURE__ */ jsx(Text, { component: "div", className: viewButtonTitle, lineClamp: 1, children: view.title || "untitled" }),
|
|
42934
|
-
view.description && /* @__PURE__ */ jsx(Text, { component: "div", mt: 2, fz: "xs", c: "dimmed", lh: 1.4, lineClamp: 1, children: view.description })
|
|
42935
|
-
] })
|
|
42981
|
+
/* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsx(Text, { component: "div", className: viewButtonTitle, lineClamp: 1, children: view.title || "untitled" }) })
|
|
42936
42982
|
] }) });
|
|
42937
42983
|
function ElementProperty({
|
|
42938
42984
|
title: title2,
|
|
@@ -42951,6 +42997,7 @@ function ElementProperty({
|
|
|
42951
42997
|
fz: "md",
|
|
42952
42998
|
style: {
|
|
42953
42999
|
whiteSpace: "preserve-breaks",
|
|
43000
|
+
userSelect: "all",
|
|
42954
43001
|
...style2
|
|
42955
43002
|
},
|
|
42956
43003
|
...props2,
|
|
@@ -42960,11 +43007,96 @@ function ElementProperty({
|
|
|
42960
43007
|
] });
|
|
42961
43008
|
}
|
|
42962
43009
|
function ElementMetata({
|
|
42963
|
-
value
|
|
43010
|
+
value: metadata
|
|
42964
43011
|
}) {
|
|
42965
43012
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
42966
43013
|
/* @__PURE__ */ jsx(PropertyLabel, { children: "metadata" }),
|
|
42967
|
-
/* @__PURE__ */ jsx(
|
|
43014
|
+
/* @__PURE__ */ jsx(
|
|
43015
|
+
Box$1,
|
|
43016
|
+
{
|
|
43017
|
+
className: css({
|
|
43018
|
+
flex: 1,
|
|
43019
|
+
display: "grid",
|
|
43020
|
+
gridTemplateColumns: "min-content 1fr",
|
|
43021
|
+
gridAutoRows: "min-content max-content",
|
|
43022
|
+
gap: "[4px 4px]",
|
|
43023
|
+
alignItems: "baseline",
|
|
43024
|
+
justifyItems: "stretch",
|
|
43025
|
+
paddingRight: "2xs"
|
|
43026
|
+
}),
|
|
43027
|
+
children: t$1(metadata).map(([key2, value]) => /* @__PURE__ */ jsxs(
|
|
43028
|
+
"div",
|
|
43029
|
+
{
|
|
43030
|
+
className: cx(
|
|
43031
|
+
"group",
|
|
43032
|
+
css({
|
|
43033
|
+
display: "contents"
|
|
43034
|
+
})
|
|
43035
|
+
),
|
|
43036
|
+
children: [
|
|
43037
|
+
/* @__PURE__ */ jsxs(
|
|
43038
|
+
"div",
|
|
43039
|
+
{
|
|
43040
|
+
className: css({
|
|
43041
|
+
fontSize: "sm",
|
|
43042
|
+
fontWeight: 500,
|
|
43043
|
+
justifySelf: "end",
|
|
43044
|
+
whiteSpace: "nowrap"
|
|
43045
|
+
}),
|
|
43046
|
+
children: [
|
|
43047
|
+
key2,
|
|
43048
|
+
":"
|
|
43049
|
+
]
|
|
43050
|
+
}
|
|
43051
|
+
),
|
|
43052
|
+
/* @__PURE__ */ jsx(
|
|
43053
|
+
"div",
|
|
43054
|
+
{
|
|
43055
|
+
className: css({}),
|
|
43056
|
+
children: /* @__PURE__ */ jsx(
|
|
43057
|
+
ScrollAreaAutosize,
|
|
43058
|
+
{
|
|
43059
|
+
type: "auto",
|
|
43060
|
+
mah: 200,
|
|
43061
|
+
overscrollBehavior: "none",
|
|
43062
|
+
className: css({
|
|
43063
|
+
transitionProperty: "all",
|
|
43064
|
+
transitionDuration: "fast",
|
|
43065
|
+
transitionTimingFunction: "inOut",
|
|
43066
|
+
rounded: "sm",
|
|
43067
|
+
color: "mantine.colors.gray[8]",
|
|
43068
|
+
_dark: {
|
|
43069
|
+
color: "mantine.colors.dark[1]"
|
|
43070
|
+
},
|
|
43071
|
+
_groupHover: {
|
|
43072
|
+
transitionTimingFunction: "out",
|
|
43073
|
+
color: "mantine.colors.defaultColor",
|
|
43074
|
+
background: "mantine.colors.defaultHover"
|
|
43075
|
+
}
|
|
43076
|
+
}),
|
|
43077
|
+
children: /* @__PURE__ */ jsx(
|
|
43078
|
+
"div",
|
|
43079
|
+
{
|
|
43080
|
+
className: css({
|
|
43081
|
+
fontSize: "sm",
|
|
43082
|
+
padding: "2xs",
|
|
43083
|
+
whiteSpace: "pre",
|
|
43084
|
+
fontFamily: "[var(--mantine-font-family-monospace)]",
|
|
43085
|
+
userSelect: "all"
|
|
43086
|
+
}),
|
|
43087
|
+
children: value
|
|
43088
|
+
}
|
|
43089
|
+
)
|
|
43090
|
+
}
|
|
43091
|
+
)
|
|
43092
|
+
}
|
|
43093
|
+
)
|
|
43094
|
+
]
|
|
43095
|
+
},
|
|
43096
|
+
key2
|
|
43097
|
+
))
|
|
43098
|
+
}
|
|
43099
|
+
)
|
|
42968
43100
|
] });
|
|
42969
43101
|
}
|
|
42970
43102
|
function ElementDetails({
|
|
@@ -43649,7 +43781,7 @@ function layoutRelationshipDetails(data, scope) {
|
|
|
43649
43781
|
y: position.y,
|
|
43650
43782
|
position: [position.x, position.y],
|
|
43651
43783
|
title: element.title,
|
|
43652
|
-
description: element.description,
|
|
43784
|
+
description: RichText.from(element.description),
|
|
43653
43785
|
technology: element.technology,
|
|
43654
43786
|
tags: [...element.tags],
|
|
43655
43787
|
links: null,
|
|
@@ -43931,7 +44063,7 @@ const selectSubject = (state) => ({
|
|
|
43931
44063
|
}, [store, instance.viewportInitialized, actor]), useEffect(() => {
|
|
43932
44064
|
data !== null && actor.send({ type: "update.layoutData", data });
|
|
43933
44065
|
}, [data, actor]), null;
|
|
43934
|
-
}), selector$
|
|
44066
|
+
}), selector$4 = ({ context: context2 }) => ({
|
|
43935
44067
|
// subject: context.subject,
|
|
43936
44068
|
// view: state.context.view,
|
|
43937
44069
|
initialized: context2.initialized.xydata && context2.initialized.xyflow,
|
|
@@ -43942,7 +44074,7 @@ const selectSubject = (state) => ({
|
|
|
43942
44074
|
initialized,
|
|
43943
44075
|
nodes,
|
|
43944
44076
|
edges
|
|
43945
|
-
} = useRelationshipDetailsState(selector$
|
|
44077
|
+
} = useRelationshipDetailsState(selector$4, deepEqual);
|
|
43946
44078
|
return /* @__PURE__ */ jsxs(
|
|
43947
44079
|
BaseXYFlow,
|
|
43948
44080
|
{
|
|
@@ -44143,7 +44275,7 @@ function Overlays({ overlaysActorRef }) {
|
|
|
44143
44275
|
nonexhaustive(overlay2);
|
|
44144
44276
|
}
|
|
44145
44277
|
});
|
|
44146
|
-
return /* @__PURE__ */ jsx(DiagramFeatures.Overlays, { children: /* @__PURE__ */ jsx(
|
|
44278
|
+
return /* @__PURE__ */ jsx(DiagramFeatures.Overlays, { children: /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: ErrorFallback, onReset: () => overlaysActorRef.send({ type: "close.all" }), children: /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, { children: overlaysReact }) }) }) });
|
|
44147
44279
|
}
|
|
44148
44280
|
const [SearchActorContext, useSearchActor] = createSafeContext("SearchActorContext"), selectSearchValue = (s2) => s2.context.searchValue;
|
|
44149
44281
|
function useSearch() {
|
|
@@ -44516,11 +44648,11 @@ function ViewButton({ className, view, loop = !1, search, ...props2 }) {
|
|
|
44516
44648
|
/* @__PURE__ */ jsx(
|
|
44517
44649
|
Highlight,
|
|
44518
44650
|
{
|
|
44519
|
-
highlight: view
|
|
44651
|
+
highlight: view.description.nonEmpty ? search : "",
|
|
44520
44652
|
component: "div",
|
|
44521
44653
|
className: btn$2.description,
|
|
44522
44654
|
lineClamp: 1,
|
|
44523
|
-
children: view
|
|
44655
|
+
children: view.description.text || "No description"
|
|
44524
44656
|
}
|
|
44525
44657
|
)
|
|
44526
44658
|
] })
|
|
@@ -44681,7 +44813,7 @@ function ElementTreeNode({ node: node2, elementProps, hasChildren, expanded }) {
|
|
|
44681
44813
|
}
|
|
44682
44814
|
) })
|
|
44683
44815
|
] }),
|
|
44684
|
-
/* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn$1.description, lineClamp: 1, children: element.description || "No description" })
|
|
44816
|
+
/* @__PURE__ */ jsx(Highlight, { component: "div", highlight: searchTerms, className: btn$1.description, lineClamp: 1, children: element.description.text || "No description" })
|
|
44685
44817
|
] }),
|
|
44686
44818
|
/* @__PURE__ */ jsx(Text, { component: "div", className: cx(elementViewsCount, btn$1.descriptionColor), fz: "xs", children: views.length === 0 ? "No views" : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
44687
44819
|
views.length,
|
|
@@ -45158,7 +45290,7 @@ function Search({ searchActorRef }) {
|
|
|
45158
45290
|
["mod+f", openSearch, {
|
|
45159
45291
|
preventDefault: !0
|
|
45160
45292
|
}]
|
|
45161
|
-
]), /* @__PURE__ */ jsx(SearchActorContext, { value: searchActorRef, children: /* @__PURE__ */ jsx(DiagramFeatures.Overlays, { children: /* @__PURE__ */ jsx(
|
|
45293
|
+
]), /* @__PURE__ */ jsx(SearchActorContext, { value: searchActorRef, children: /* @__PURE__ */ jsx(DiagramFeatures.Overlays, { children: /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: ErrorFallback, onReset: close, children: /* @__PURE__ */ jsx(AnimatePresence, { children: isOpened && /* @__PURE__ */ jsx(
|
|
45162
45294
|
Overlay,
|
|
45163
45295
|
{
|
|
45164
45296
|
fullscreen: !0,
|
|
@@ -45412,7 +45544,7 @@ const autolayoutButton = css({
|
|
|
45412
45544
|
borderColor: "mantine.colors.gray[5]",
|
|
45413
45545
|
borderRadius: 3,
|
|
45414
45546
|
transform: "translate(-50%, -50%)"
|
|
45415
|
-
}), selector$
|
|
45547
|
+
}), selector$3 = (state) => ({
|
|
45416
45548
|
viewId: state.view.id,
|
|
45417
45549
|
autoLayout: state.view.autoLayout
|
|
45418
45550
|
}), ChangeAutoLayoutButton = (props2) => {
|
|
@@ -45421,7 +45553,7 @@ const autolayoutButton = css({
|
|
|
45421
45553
|
} = useDiagramEventHandlers(), diagram = useDiagram(), [rootRef, setRootRef] = useState(null), [controlsRefs, setControlsRefs] = useState({}), {
|
|
45422
45554
|
autoLayout,
|
|
45423
45555
|
viewId
|
|
45424
|
-
} = useDiagramContext(selector$
|
|
45556
|
+
} = useDiagramContext(selector$3), { ref, hovered: isSpacingHovered } = useHover$1(), setControlRef = (name) => (node2) => {
|
|
45425
45557
|
controlsRefs[name] = node2, setControlsRefs(controlsRefs);
|
|
45426
45558
|
}, setAutoLayout = (direction) => (event) => {
|
|
45427
45559
|
event.stopPropagation(), onChange?.({
|
|
@@ -45738,11 +45870,11 @@ const autolayoutButton = css({
|
|
|
45738
45870
|
"forward"
|
|
45739
45871
|
)
|
|
45740
45872
|
] });
|
|
45741
|
-
}, selector$
|
|
45873
|
+
}, selector$2 = (state) => ({
|
|
45742
45874
|
visible: state.features.enableReadOnly !== !0,
|
|
45743
45875
|
isReadOnly: state.toggledFeatures.enableReadOnly ?? state.features.enableReadOnly
|
|
45744
45876
|
}), ToggleReadonly = () => {
|
|
45745
|
-
const { visible: visible2, isReadOnly } = useDiagramContext(selector$
|
|
45877
|
+
const { visible: visible2, isReadOnly } = useDiagramContext(selector$2), diagram = useDiagram();
|
|
45746
45878
|
return visible2 ? /* @__PURE__ */ jsx(Tooltip, { label: isReadOnly ? "Enable editing" : "Disable editing", children: /* @__PURE__ */ jsx(
|
|
45747
45879
|
ActionIcon,
|
|
45748
45880
|
{
|
|
@@ -45912,14 +46044,17 @@ const autolayoutButton = css({
|
|
|
45912
46044
|
color: "mantine.colors.gray[5]"
|
|
45913
46045
|
}
|
|
45914
46046
|
});
|
|
46047
|
+
function selector$1(context2) {
|
|
46048
|
+
return {
|
|
46049
|
+
id: context2.view.id,
|
|
46050
|
+
title: context2.view.title ?? "untitled",
|
|
46051
|
+
description: RichText$1.from(context2.view.description),
|
|
46052
|
+
links: context2.view.links,
|
|
46053
|
+
isNotActiveWalkthrough: context2.activeWalkthrough === null
|
|
46054
|
+
};
|
|
46055
|
+
}
|
|
45915
46056
|
function DiagramTitlePanel() {
|
|
45916
|
-
const { id: id2, title: title$12, description: description$12, links, isNotActiveWalkthrough } = useDiagramContext(
|
|
45917
|
-
id: s2.view.id,
|
|
45918
|
-
title: s2.view.title ?? "untitled",
|
|
45919
|
-
description: s2.view.description,
|
|
45920
|
-
links: s2.view.links,
|
|
45921
|
-
isNotActiveWalkthrough: s2.activeWalkthrough === null
|
|
45922
|
-
})), [isCollapsed, setCollapsed] = useLocalStorage({
|
|
46057
|
+
const { id: id2, title: title$12, description: description$12, links, isNotActiveWalkthrough } = useDiagramContext(selector$1), [isCollapsed, setCollapsed] = useLocalStorage({
|
|
45923
46058
|
key: "diagram-title-webview-collapsed",
|
|
45924
46059
|
defaultValue: !1
|
|
45925
46060
|
}), toggle = () => setCollapsed((v) => !v);
|
|
@@ -46013,24 +46148,23 @@ function DiagramTitlePanel() {
|
|
|
46013
46148
|
}
|
|
46014
46149
|
)
|
|
46015
46150
|
] }),
|
|
46016
|
-
description$12 && /* @__PURE__ */ jsx(
|
|
46151
|
+
description$12.nonEmpty && /* @__PURE__ */ jsx(
|
|
46017
46152
|
Spoiler,
|
|
46018
46153
|
{
|
|
46019
|
-
maxHeight:
|
|
46154
|
+
maxHeight: 60,
|
|
46020
46155
|
showLabel: /* @__PURE__ */ jsx(Button, { component: "div", color: "gray", variant: "light", fz: "10", size: "compact-xs", tabIndex: -1, children: "show more" }),
|
|
46021
46156
|
hideLabel: /* @__PURE__ */ jsx(Button, { component: "div", color: "gray", variant: "light", fz: "10", size: "compact-xs", tabIndex: -1, children: "hide" }),
|
|
46022
46157
|
children: /* @__PURE__ */ jsx(
|
|
46023
|
-
|
|
46158
|
+
MarkdownBlock,
|
|
46024
46159
|
{
|
|
46025
|
-
component: "div",
|
|
46026
|
-
size: "sm",
|
|
46027
46160
|
className: description,
|
|
46028
|
-
|
|
46161
|
+
textScale: 0.9,
|
|
46162
|
+
value: description$12
|
|
46029
46163
|
}
|
|
46030
46164
|
)
|
|
46031
46165
|
}
|
|
46032
46166
|
),
|
|
46033
|
-
|
|
46167
|
+
description$12.isEmpty && /* @__PURE__ */ jsx(
|
|
46034
46168
|
Text,
|
|
46035
46169
|
{
|
|
46036
46170
|
component: "div",
|
|
@@ -46893,7 +47027,7 @@ function viewToNodesEdge$1(opts) {
|
|
|
46893
47027
|
id: node2.id,
|
|
46894
47028
|
title: node2.title,
|
|
46895
47029
|
technology: node2.technology,
|
|
46896
|
-
description: node2.description,
|
|
47030
|
+
description: RichText.from(node2.description),
|
|
46897
47031
|
height: node2.height,
|
|
46898
47032
|
width: node2.width,
|
|
46899
47033
|
level: node2.level,
|
|
@@ -47677,7 +47811,7 @@ function layoutResultToXYFlow(layout2) {
|
|
|
47677
47811
|
fqn: fqn2,
|
|
47678
47812
|
title: node2.title,
|
|
47679
47813
|
technology: node2.technology,
|
|
47680
|
-
description: node2.description,
|
|
47814
|
+
description: RichText.from(node2.description),
|
|
47681
47815
|
height: node2.height,
|
|
47682
47816
|
width: node2.width,
|
|
47683
47817
|
color: node2.color,
|
|
@@ -47722,8 +47856,8 @@ function layoutResultToXYFlow(layout2) {
|
|
|
47722
47856
|
color: color2,
|
|
47723
47857
|
navigateTo,
|
|
47724
47858
|
line,
|
|
47725
|
-
|
|
47726
|
-
...
|
|
47859
|
+
description: RichText.from(description2),
|
|
47860
|
+
...technology2 && { technology: technology2 }
|
|
47727
47861
|
}
|
|
47728
47862
|
});
|
|
47729
47863
|
}
|
|
@@ -49172,7 +49306,7 @@ const _diagramMachine = xstate_cjsExports.setup({
|
|
|
49172
49306
|
};
|
|
49173
49307
|
}),
|
|
49174
49308
|
"tag.highlight": xstate_cjsExports.assign(({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "tag.highlight"), {
|
|
49175
|
-
xynodes: context2.xynodes.map((n2) => n2.data.tags?.includes(event.tag) ? setDimmed(n2, !1) : setDimmed(n2,
|
|
49309
|
+
xynodes: context2.xynodes.map((n2) => n2.data.tags?.includes(event.tag) ? setDimmed(n2, !1) : setDimmed(n2, !0))
|
|
49176
49310
|
})),
|
|
49177
49311
|
"undim everything": xstate_cjsExports.assign(({ context: context2 }) => ({
|
|
49178
49312
|
xynodes: context2.xynodes.map(setDimmed(!1)),
|
|
@@ -49789,7 +49923,10 @@ function findCorrespondingNode(context2, event) {
|
|
|
49789
49923
|
const fromNodeId = context2.lastOnNavigate?.fromNode, fromNode = fromNodeId && context2.view.nodes.find((n2) => n2.id === fromNodeId), fromRef = fromNode && nodeRef(fromNode), toNode = fromRef && event.view.nodes.find((n2) => nodeRef(n2) === fromRef);
|
|
49790
49924
|
return { fromNode, toNode };
|
|
49791
49925
|
}
|
|
49792
|
-
const diagramMachine = _diagramMachine, selectToggledFeatures = (state) => state.context.
|
|
49926
|
+
const diagramMachine = _diagramMachine, selectToggledFeatures = (state) => state.context.features.enableReadOnly ? {
|
|
49927
|
+
...state.context.toggledFeatures,
|
|
49928
|
+
enableReadOnly: !0
|
|
49929
|
+
} : state.context.toggledFeatures;
|
|
49793
49930
|
function DiagramActorProvider({
|
|
49794
49931
|
view,
|
|
49795
49932
|
zoomable,
|
|
@@ -50036,7 +50173,7 @@ function useLikeC4ModelDataAtom() {
|
|
|
50036
50173
|
return useContext(LikeC4ModelDataContext);
|
|
50037
50174
|
}
|
|
50038
50175
|
function LikeC4ModelContext({ likec4data, likec4model, children: children2 }) {
|
|
50039
|
-
const model =
|
|
50176
|
+
const model = useStore(likec4model);
|
|
50040
50177
|
return /* @__PURE__ */ jsx(LikeC4ModelDataContext.Provider, { value: likec4data, children: /* @__PURE__ */ jsx(LikeC4ModelProvider, { likec4model: model, children: children2 }) });
|
|
50041
50178
|
}
|
|
50042
50179
|
css({
|
|
@@ -50101,7 +50238,7 @@ const cssWebcomponentView = css({
|
|
|
50101
50238
|
component: RouteComponent$2
|
|
50102
50239
|
});
|
|
50103
50240
|
function RouteComponent$2() {
|
|
50104
|
-
return /* @__PURE__ */ jsx(Box$1, { className: cssViewOutlet, children: /* @__PURE__ */ jsx(
|
|
50241
|
+
return /* @__PURE__ */ jsx(Box$1, { className: cssViewOutlet, children: /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: Fallback$1, children: /* @__PURE__ */ jsx(
|
|
50105
50242
|
LikeC4ModelContext,
|
|
50106
50243
|
{
|
|
50107
50244
|
likec4data: $likec4data,
|
|
@@ -50162,53 +50299,63 @@ const previewBg = css({
|
|
|
50162
50299
|
});
|
|
50163
50300
|
function RouteComponent$1() {
|
|
50164
50301
|
useDocumentTitle("LikeC4");
|
|
50165
|
-
const views =
|
|
50166
|
-
return /* @__PURE__ */ jsx(
|
|
50302
|
+
const views = [...useLikeC4Model$1("layouted").views()];
|
|
50303
|
+
return /* @__PURE__ */ jsx(Container, { size: "xl", children: /* @__PURE__ */ jsx(
|
|
50167
50304
|
SimpleGrid,
|
|
50168
50305
|
{
|
|
50169
50306
|
p: { base: "md", sm: "xl" },
|
|
50170
|
-
cols: { base: 1, sm: 2, md: 3,
|
|
50307
|
+
cols: { base: 1, sm: 2, md: 3, xl: 4 },
|
|
50171
50308
|
spacing: { base: 10, sm: "xl" },
|
|
50172
50309
|
verticalSpacing: { base: "md", sm: "xl" },
|
|
50173
|
-
children: views.map((v) => /* @__PURE__ */ jsx(ViewCard, {
|
|
50310
|
+
children: views.map((v) => /* @__PURE__ */ jsx(ViewCard, { view: v }, v.id))
|
|
50174
50311
|
}
|
|
50175
|
-
);
|
|
50312
|
+
) });
|
|
50176
50313
|
}
|
|
50177
|
-
|
|
50178
|
-
const
|
|
50179
|
-
|
|
50180
|
-
|
|
50181
|
-
|
|
50182
|
-
return /* @__PURE__ */ jsxs(
|
|
50314
|
+
function ViewCard({ view }) {
|
|
50315
|
+
const [visible2, setVisible] = useState(!1);
|
|
50316
|
+
return useTimeoutEffect(() => {
|
|
50317
|
+
setVisible(!0);
|
|
50318
|
+
}, 100), /* @__PURE__ */ jsxs(
|
|
50183
50319
|
Card,
|
|
50184
50320
|
{
|
|
50185
50321
|
shadow: "xs",
|
|
50186
50322
|
padding: "lg",
|
|
50187
50323
|
radius: "sm",
|
|
50324
|
+
className: "group",
|
|
50188
50325
|
withBorder: !0,
|
|
50189
50326
|
children: [
|
|
50190
|
-
/* @__PURE__ */ jsx(Card.Section, { children: /* @__PURE__ */ jsx(
|
|
50191
|
-
|
|
50192
|
-
|
|
50193
|
-
|
|
50327
|
+
/* @__PURE__ */ jsx(Card.Section, { children: /* @__PURE__ */ jsx(Box$1, { className: previewBg, style: { height: 200 }, children: visible2 && /* @__PURE__ */ jsx(
|
|
50328
|
+
StaticLikeC4Diagram,
|
|
50329
|
+
{
|
|
50330
|
+
background: "transparent",
|
|
50331
|
+
view: view.$view,
|
|
50332
|
+
fitView: !0,
|
|
50333
|
+
fitViewPadding: "4px",
|
|
50334
|
+
reduceGraphics: !0
|
|
50335
|
+
}
|
|
50336
|
+
) }) }),
|
|
50337
|
+
/* @__PURE__ */ jsx(Group, { justify: "space-between", mt: "md", children: /* @__PURE__ */ jsx(Text, { fw: 500, children: view.title ?? view.id }) }),
|
|
50338
|
+
/* @__PURE__ */ jsx(
|
|
50339
|
+
MarkdownBlock,
|
|
50340
|
+
{
|
|
50341
|
+
value: view.description,
|
|
50342
|
+
textScale: 0.75,
|
|
50343
|
+
emptyText: "No description",
|
|
50344
|
+
lineClamp: 3,
|
|
50345
|
+
mt: "2",
|
|
50346
|
+
css: {
|
|
50347
|
+
transition: "fast",
|
|
50348
|
+
opacity: {
|
|
50349
|
+
base: 0.8,
|
|
50350
|
+
_groupHover: 1
|
|
50351
|
+
}
|
|
50352
|
+
}
|
|
50353
|
+
}
|
|
50354
|
+
),
|
|
50355
|
+
/* @__PURE__ */ jsx(Link$1, { to: "/view/$viewId/", params: { viewId: view.id }, search: !0, className: cardLink })
|
|
50194
50356
|
]
|
|
50195
50357
|
}
|
|
50196
50358
|
);
|
|
50197
|
-
});
|
|
50198
|
-
function DiagramPreview$1({ diagram }) {
|
|
50199
|
-
const { ref, inViewport } = useInViewport(), [visible2, setVisible] = useState(inViewport);
|
|
50200
|
-
return useLayoutEffect$1(() => {
|
|
50201
|
-
inViewport && !visible2 && setVisible(!0);
|
|
50202
|
-
}, [inViewport]), /* @__PURE__ */ jsx(Box$1, { ref, className: previewBg, style: { height: 175 }, children: visible2 && /* @__PURE__ */ jsx(
|
|
50203
|
-
StaticLikeC4Diagram,
|
|
50204
|
-
{
|
|
50205
|
-
background: "transparent",
|
|
50206
|
-
view: diagram,
|
|
50207
|
-
fitView: !0,
|
|
50208
|
-
fitViewPadding: "4px",
|
|
50209
|
-
reduceGraphics: !0
|
|
50210
|
-
}
|
|
50211
|
-
) });
|
|
50212
50359
|
}
|
|
50213
50360
|
const Route$h = createFileRoute("/project/$projectId")({
|
|
50214
50361
|
staleTime: 1 / 0,
|
|
@@ -50224,7 +50371,7 @@ const Route$h = createFileRoute("/project/$projectId")({
|
|
|
50224
50371
|
});
|
|
50225
50372
|
function RouteComponent() {
|
|
50226
50373
|
const { $likec4data: $likec4data2, $likec4model: $likec4model2, IconRenderer: IconRenderer2 } = Route$h.useLoaderData();
|
|
50227
|
-
return /* @__PURE__ */ jsx(Box$1, { className: cssViewOutlet, children: /* @__PURE__ */ jsx(
|
|
50374
|
+
return /* @__PURE__ */ jsx(Box$1, { className: cssViewOutlet, children: /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: Fallback$1, children: /* @__PURE__ */ jsx(LikeC4ModelContext, { likec4data: $likec4data2, likec4model: $likec4model2, children: /* @__PURE__ */ jsx(IconRendererProvider, { value: IconRenderer2, children: /* @__PURE__ */ jsx(Outlet, {}) }) }) }) });
|
|
50228
50375
|
}
|
|
50229
50376
|
const Route$g = createFileRoute("/project/$projectId/")({
|
|
50230
50377
|
component: () => {
|
|
@@ -51220,7 +51367,7 @@ function layoutRelationshipsView(data) {
|
|
|
51220
51367
|
x: position.x,
|
|
51221
51368
|
y: position.y,
|
|
51222
51369
|
title: element.title,
|
|
51223
|
-
description: element.description,
|
|
51370
|
+
description: element.description.$source,
|
|
51224
51371
|
technology: element.technology,
|
|
51225
51372
|
tags: element.tags,
|
|
51226
51373
|
links: null,
|
|
@@ -51940,9 +52087,10 @@ function updateCursor() {
|
|
|
51940
52087
|
constraintFlags |= flag;
|
|
51941
52088
|
}), intersectsHorizontal && intersectsVertical ? setGlobalCursorStyle("intersection", constraintFlags) : intersectsHorizontal ? setGlobalCursorStyle("horizontal", constraintFlags) : intersectsVertical ? setGlobalCursorStyle("vertical", constraintFlags) : resetGlobalCursorStyle();
|
|
51942
52089
|
}
|
|
51943
|
-
let listenersAbortController
|
|
52090
|
+
let listenersAbortController;
|
|
51944
52091
|
function updateListeners() {
|
|
51945
|
-
|
|
52092
|
+
var _listenersAbortContro;
|
|
52093
|
+
(_listenersAbortContro = listenersAbortController) === null || _listenersAbortContro === void 0 || _listenersAbortContro.abort(), listenersAbortController = new AbortController();
|
|
51946
52094
|
const options = {
|
|
51947
52095
|
capture: !0,
|
|
51948
52096
|
signal: listenersAbortController.signal
|