likec4 1.8.1 → 1.8.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/__app__/src/const.js +2 -0
- package/dist/__app__/src/main.js +34 -83
- package/dist/__app__/webcomponent/webcomponent.js +31 -84
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.mjs +4557 -1320
- package/dist/index.d.mts +16870 -0
- package/dist/index.d.ts +16870 -0
- package/dist/index.mjs +1 -0
- package/dist/shared/likec4.DNb51-HM.mjs +61920 -0
- package/package.json +13 -8
- package/react/index.mjs +32 -85
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Features:
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
14
|
> **Compatibility Note:**\
|
|
15
|
-
> LikeC4 requires [Node.js](https://nodejs.org/en/) version
|
|
15
|
+
> LikeC4 requires [Node.js](https://nodejs.org/en/) version 20+
|
|
16
16
|
|
|
17
17
|
### Local installation
|
|
18
18
|
|
|
@@ -154,6 +154,12 @@ likec4 codegen ts ...
|
|
|
154
154
|
> Output file should have `.ts` extension\
|
|
155
155
|
> By default, it generates `likec4.generated.ts` in current directory
|
|
156
156
|
|
|
157
|
+
## API Usage
|
|
158
|
+
|
|
159
|
+
LikeC4 model can be accessed
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
157
163
|
## Development
|
|
158
164
|
|
|
159
165
|
In root workspace:
|
package/dist/__app__/src/main.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createContext as createContext$1, useLayoutEffect as useLayoutEffect$1,
|
|
|
4
4
|
import { createRoot } from "react-dom/client";
|
|
5
5
|
import { L as Link, c as createRootRouteWithContext, S as ScrollRestoration, O as Outlet, u as useRouter, a as createFileRoute, b as useParams, d as useRouterState, i as isNotFound, n as notFound, R as RouterProvider, e as createRouter$1, f as createHashHistory, g as createBrowserHistory } from "./chunks/tanstack-router-ma6rQsdz.js";
|
|
6
6
|
import { C as Container, T as Title, a as Text$1, G as Group, B as Button, c as createTheme, M as MantineProvider, b as MantineContext, u as useHotkeys, d as clsx, e as Box, A as ActionIcon$2, H as HoverCard, f as HoverCardTarget, U as UnstyledButton, g as HoverCardDropdown, S as Stack, h as Anchor, i as CopyButton$1, j as useLocalStorage, k as Card, l as CardSection, m as Spoiler, n as ButtonGroup, o as Tooltip$2, p as ThemeIcon, P as Paper, q as Tabs, r as TabsList, s as TabsTab, t as TabsPanel, v as ScrollAreaAutosize, w as Badge, x as rem, D as Divider, y as Space, z as TooltipGroup, F as Flex, E as ColorSwatch, I as CheckIcon, J as Select, K as Slider, L as SegmentedControl, N as Popover, O as PopoverTarget, Q as PopoverDropdown, R as FloatingIndicator, V as Notification, W as Code, X as Center, Y as Image, Z as useMantineColorScheme, _ as SimpleGrid, $ as useTree, a0 as useComputedColorScheme, a1 as Tree, a2 as Drawer, a3 as ScrollArea, a4 as Alert, a5 as ModalRoot, a6 as ModalOverlay, a7 as ModalContent, a8 as ModalBody, a9 as useMantineTheme, aa as useMediaQuery, ab as useDisclosure, ac as Menu, ad as MenuTarget, ae as MenuDropdown, af as MenuLabel, ag as MenuItem, ah as LoadingOverlay, ai as useCallbackRef, aj as Burger, ak as Loader } from "./chunks/mantine-BYr8JSNL.js";
|
|
7
|
-
import { withOverviewGraph, ComponentName, basepath, useHashHistory } from "./const.js";
|
|
7
|
+
import { withOverviewGraph, ComponentName, isDevelopment, basepath, useHashHistory } from "./const.js";
|
|
8
8
|
import { useOverviewGraph } from "virtual:likec4/overview-graph";
|
|
9
9
|
import { u as useReactFlow, a as useStoreApi, b as useNodesData, c as useStore, d as createWithEqualityFn, e as applyNodeChanges, f as applyEdgeChanges, g as getViewportForBounds, h as getNodeDimensions, i as getBoundsOfRects, s as shallow$1, j as boxToRect, k as useStoreWithEqualityFn, E as EdgeLabelRenderer, H as Handle, P as Position, l as useOnViewportChange, m as index, n as useOnSelectionChange, B as Background, o as BackgroundVariant, C as Controls, R as ReactFlowProvider, p as BaseEdge, q as useNodesState, r as useEdgesState } from "./chunks/likec4-Blyd4UZO.js";
|
|
10
10
|
import { usePreviewUrl } from "virtual:likec4/previews";
|
|
@@ -216,46 +216,19 @@ const blue$1 = {
|
|
|
216
216
|
font: "Arial",
|
|
217
217
|
shadow: "#0a0a0a"
|
|
218
218
|
};
|
|
219
|
-
function
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
} instanceof Array && function(d3, b3) {
|
|
233
|
-
d3.__proto__ = b3;
|
|
234
|
-
} || function(d3, b3) {
|
|
235
|
-
for (var p2 in b3)
|
|
236
|
-
Object.prototype.hasOwnProperty.call(b3, p2) && (d3[p2] = b3[p2]);
|
|
237
|
-
}, _extendStatics(d2, b2);
|
|
238
|
-
};
|
|
239
|
-
return function(d2, b2) {
|
|
240
|
-
if (typeof b2 != "function" && b2 !== null) throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
241
|
-
_extendStatics(d2, b2);
|
|
242
|
-
function __() {
|
|
243
|
-
this.constructor = d2;
|
|
244
|
-
}
|
|
245
|
-
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
246
|
-
};
|
|
247
|
-
}(), CustomError = function(_super) {
|
|
248
|
-
__extends(CustomError2, _super);
|
|
249
|
-
function CustomError2(message, options) {
|
|
250
|
-
var _newTarget = this.constructor, _this = _super.call(this, message, options) || this;
|
|
251
|
-
return Object.defineProperty(_this, "name", {
|
|
252
|
-
value: _newTarget.name,
|
|
253
|
-
enumerable: !1,
|
|
254
|
-
configurable: !0
|
|
255
|
-
}), fixProto(_this, _newTarget.prototype), fixStack(_this), _this;
|
|
256
|
-
}
|
|
257
|
-
return CustomError2;
|
|
258
|
-
}(Error), s = { done: !1, hasNext: !1 };
|
|
219
|
+
function nonNullable(value, message) {
|
|
220
|
+
if (typeof value > "u" || value == null)
|
|
221
|
+
throw new Error(message ?? `Expected defined value, but received ${value}`);
|
|
222
|
+
return value;
|
|
223
|
+
}
|
|
224
|
+
function invariant$1(condition, message) {
|
|
225
|
+
if (!condition)
|
|
226
|
+
throw new Error(message ?? "Invariant failed");
|
|
227
|
+
}
|
|
228
|
+
function nonexhaustive(value) {
|
|
229
|
+
throw new Error(`NonExhaustive value: ${value}`);
|
|
230
|
+
}
|
|
231
|
+
var s = { done: !1, hasNext: !1 };
|
|
259
232
|
function u$6(t2, n2, a2) {
|
|
260
233
|
let o2 = (r2) => t2(r2, ...n2);
|
|
261
234
|
return a2 === void 0 ? o2 : Object.assign(o2, { lazy: a2, lazyArgs: n2 });
|
|
@@ -366,41 +339,6 @@ function u(...n2) {
|
|
|
366
339
|
return u$5(i, n2);
|
|
367
340
|
}
|
|
368
341
|
var i = (n2, { min: e2, max: r2 }) => e2 !== void 0 && n2 < e2 ? e2 : r2 !== void 0 && n2 > r2 ? r2 : n2;
|
|
369
|
-
function isString$1(value) {
|
|
370
|
-
return value != null && typeof value == "string";
|
|
371
|
-
}
|
|
372
|
-
class BaseError extends CustomError {
|
|
373
|
-
constructor(message, options) {
|
|
374
|
-
super(message, options), Object.defineProperty(this, "name", { value: "BaseError" });
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
class NullableError extends BaseError {
|
|
378
|
-
constructor(message, options) {
|
|
379
|
-
super(message, options), Object.defineProperty(this, "name", { value: "NullableError" });
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
class InvariantError extends BaseError {
|
|
383
|
-
constructor(message, options) {
|
|
384
|
-
super(message, options), Object.defineProperty(this, "name", { value: "InvariantError" });
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
function nonNullable(value, message) {
|
|
388
|
-
if (typeof value > "u" || value == null)
|
|
389
|
-
throw new NullableError(message ?? `Expected defined value, but received ${value}`);
|
|
390
|
-
return value;
|
|
391
|
-
}
|
|
392
|
-
function invariant$1(condition, message) {
|
|
393
|
-
if (!condition)
|
|
394
|
-
throw new InvariantError(message ?? "Invariant failed");
|
|
395
|
-
}
|
|
396
|
-
class NonExhaustiveError extends BaseError {
|
|
397
|
-
constructor(message, options) {
|
|
398
|
-
super(message, options), Object.defineProperty(this, "name", { value: "NonExhaustiveError" });
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
function nonexhaustive(value) {
|
|
402
|
-
throw new NonExhaustiveError(`NonExhaustive value: ${value}`);
|
|
403
|
-
}
|
|
404
342
|
const ElementShapes = [
|
|
405
343
|
"rectangle",
|
|
406
344
|
"person",
|
|
@@ -409,7 +347,15 @@ const ElementShapes = [
|
|
|
409
347
|
"cylinder",
|
|
410
348
|
"storage",
|
|
411
349
|
"queue"
|
|
412
|
-
]
|
|
350
|
+
];
|
|
351
|
+
function isString$1(value) {
|
|
352
|
+
return value != null && typeof value == "string";
|
|
353
|
+
}
|
|
354
|
+
function isAncestor(...args) {
|
|
355
|
+
const ancestor = isString$1(args[0]) ? args[0] : args[0].id;
|
|
356
|
+
return (isString$1(args[1]) ? args[1] : args[1].id).startsWith(ancestor + ".");
|
|
357
|
+
}
|
|
358
|
+
const isTagEqual = (operator) => "tag" in operator, isKindEqual = (operator) => "kind" in operator, isNotOperator = (operator) => "not" in operator, isAndOperator = (operator) => "and" in operator, isOrOperator = (operator) => "or" in operator;
|
|
413
359
|
function whereOperatorAsPredicate(operator) {
|
|
414
360
|
switch (!0) {
|
|
415
361
|
case isTagEqual(operator): {
|
|
@@ -466,10 +412,6 @@ function getBBoxCenter({
|
|
|
466
412
|
y: y2 + height / 2
|
|
467
413
|
};
|
|
468
414
|
}
|
|
469
|
-
function isAncestor(...args) {
|
|
470
|
-
const ancestor = isString$1(args[0]) ? args[0] : args[0].id;
|
|
471
|
-
return (isString$1(args[1]) ? args[1] : args[1].id).startsWith(ancestor + ".");
|
|
472
|
-
}
|
|
473
415
|
var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
474
416
|
function combineComparators(comparatorA, comparatorB) {
|
|
475
417
|
return function(a2, b2, state) {
|
|
@@ -5892,6 +5834,7 @@ function DiagramContextProvider({
|
|
|
5892
5834
|
}
|
|
5893
5835
|
);
|
|
5894
5836
|
}
|
|
5837
|
+
DiagramContextProvider.displayName = "DiagramContextProvider";
|
|
5895
5838
|
function useDiagramState(selector2, equalityFn) {
|
|
5896
5839
|
const store = useContext$1(DiagramContext);
|
|
5897
5840
|
if (store === null)
|
|
@@ -5910,6 +5853,7 @@ function EnsureMantine({ children }) {
|
|
|
5910
5853
|
throw new Error("LikeC4Diagram must be a child of MantineProvider");
|
|
5911
5854
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
5912
5855
|
}
|
|
5856
|
+
EnsureMantine.displayName = "EnsureMantine";
|
|
5913
5857
|
function selectXYFlowSize(state) {
|
|
5914
5858
|
return `${Math.round(state.width)}:${Math.round(state.height)}`;
|
|
5915
5859
|
}
|
|
@@ -9243,6 +9187,7 @@ function XYFlow({
|
|
|
9243
9187
|
}
|
|
9244
9188
|
);
|
|
9245
9189
|
}
|
|
9190
|
+
XYFlow.displayName = "XYFlow";
|
|
9246
9191
|
var container$2 = "_19ci0hj0", card$1 = "_19ci0hj1", title = "_19ci0hj2", description = "_19ci0hj3";
|
|
9247
9192
|
const selector$1 = (s2) => ({
|
|
9248
9193
|
id: s2.view.id,
|
|
@@ -9612,7 +9557,7 @@ function NotationPanel() {
|
|
|
9612
9557
|
defaultValue: !0
|
|
9613
9558
|
}), hasNotations = notations.length > 0, portalProps = target ? { portalProps: { target } } : { withinPortal: !1 };
|
|
9614
9559
|
return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
|
|
9615
|
-
!hasNotations && /* @__PURE__ */ jsx(
|
|
9560
|
+
!hasNotations && isVisible && /* @__PURE__ */ jsx(
|
|
9616
9561
|
m.div,
|
|
9617
9562
|
{
|
|
9618
9563
|
initial: { opacity: 0.75, translateX: "50%" },
|
|
@@ -9622,7 +9567,7 @@ function NotationPanel() {
|
|
|
9622
9567
|
opacity: 0.6
|
|
9623
9568
|
},
|
|
9624
9569
|
className: clsx("react-flow__panel", container),
|
|
9625
|
-
children: /* @__PURE__ */ jsx(Tooltip$2, { label: "
|
|
9570
|
+
children: /* @__PURE__ */ jsx(Tooltip$2, { label: "View has no notations", color: "orange", ...portalProps, children: /* @__PURE__ */ jsx(
|
|
9626
9571
|
ThemeIcon,
|
|
9627
9572
|
{
|
|
9628
9573
|
size: "xl",
|
|
@@ -10471,6 +10416,7 @@ function LikeC4Diagram({
|
|
|
10471
10416
|
}
|
|
10472
10417
|
) }) });
|
|
10473
10418
|
}
|
|
10419
|
+
LikeC4Diagram.displayName = "LikeC4Diagram";
|
|
10474
10420
|
const LikeC4DiagramInnerMemo = memo$1(function({
|
|
10475
10421
|
background,
|
|
10476
10422
|
controls,
|
|
@@ -10515,6 +10461,7 @@ const LikeC4DiagramInnerMemo = memo$1(function({
|
|
|
10515
10461
|
] })
|
|
10516
10462
|
] });
|
|
10517
10463
|
}, shallowEqual);
|
|
10464
|
+
LikeC4DiagramInnerMemo.displayName = "LikeC4DiagramInnerMemo";
|
|
10518
10465
|
function StaticLikeC4Diagram({
|
|
10519
10466
|
view,
|
|
10520
10467
|
fitView = !0,
|
|
@@ -11655,6 +11602,7 @@ function ViewReact() {
|
|
|
11655
11602
|
});
|
|
11656
11603
|
if (!view)
|
|
11657
11604
|
throw notFound();
|
|
11605
|
+
const hasNotations = (view.notation?.elements ?? []).length > 0;
|
|
11658
11606
|
return /* @__PURE__ */ jsx(
|
|
11659
11607
|
LikeC4Diagram,
|
|
11660
11608
|
{
|
|
@@ -11669,6 +11617,7 @@ function ViewReact() {
|
|
|
11669
11617
|
showNavigationButtons: !0,
|
|
11670
11618
|
enableDynamicViewWalkthrough: !0,
|
|
11671
11619
|
experimentalEdgeEditing: !1,
|
|
11620
|
+
showNotations: isDevelopment || hasNotations,
|
|
11672
11621
|
enableFocusMode: !0,
|
|
11673
11622
|
nodesDraggable: !1,
|
|
11674
11623
|
nodesSelectable: !1,
|
|
@@ -13239,6 +13188,7 @@ function ViewEditor() {
|
|
|
13239
13188
|
});
|
|
13240
13189
|
if (!view)
|
|
13241
13190
|
throw notFound();
|
|
13191
|
+
const hasNotations = (view.notation?.elements ?? []).length > 0;
|
|
13242
13192
|
return /* @__PURE__ */ jsx(
|
|
13243
13193
|
LikeC4Diagram,
|
|
13244
13194
|
{
|
|
@@ -13252,6 +13202,7 @@ function ViewEditor() {
|
|
|
13252
13202
|
showDiagramTitle: !0,
|
|
13253
13203
|
showElementLinks: !0,
|
|
13254
13204
|
showNavigationButtons: !0,
|
|
13205
|
+
showNotations: isDevelopment || hasNotations,
|
|
13255
13206
|
enableDynamicViewWalkthrough: !0,
|
|
13256
13207
|
enableFocusMode: !1,
|
|
13257
13208
|
onNavigateTo,
|
|
@@ -148,46 +148,18 @@ const ComponentName = {
|
|
|
148
148
|
font: "Arial",
|
|
149
149
|
shadow: "#0a0a0a"
|
|
150
150
|
};
|
|
151
|
-
function
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
__proto__: []
|
|
164
|
-
} instanceof Array && function(d3, b3) {
|
|
165
|
-
d3.__proto__ = b3;
|
|
166
|
-
} || function(d3, b3) {
|
|
167
|
-
for (var p2 in b3)
|
|
168
|
-
Object.prototype.hasOwnProperty.call(b3, p2) && (d3[p2] = b3[p2]);
|
|
169
|
-
}, _extendStatics(d2, b2);
|
|
170
|
-
};
|
|
171
|
-
return function(d2, b2) {
|
|
172
|
-
if (typeof b2 != "function" && b2 !== null) throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
173
|
-
_extendStatics(d2, b2);
|
|
174
|
-
function __() {
|
|
175
|
-
this.constructor = d2;
|
|
176
|
-
}
|
|
177
|
-
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
178
|
-
};
|
|
179
|
-
}(), CustomError = function(_super) {
|
|
180
|
-
__extends(CustomError2, _super);
|
|
181
|
-
function CustomError2(message, options) {
|
|
182
|
-
var _newTarget = this.constructor, _this = _super.call(this, message, options) || this;
|
|
183
|
-
return Object.defineProperty(_this, "name", {
|
|
184
|
-
value: _newTarget.name,
|
|
185
|
-
enumerable: !1,
|
|
186
|
-
configurable: !0
|
|
187
|
-
}), fixProto(_this, _newTarget.prototype), fixStack(_this), _this;
|
|
188
|
-
}
|
|
189
|
-
return CustomError2;
|
|
190
|
-
}(Error);
|
|
151
|
+
function nonNullable(value, message) {
|
|
152
|
+
if (typeof value > "u" || value == null)
|
|
153
|
+
throw new Error(message ?? `Expected defined value, but received ${value}`);
|
|
154
|
+
return value;
|
|
155
|
+
}
|
|
156
|
+
function invariant$1(condition, message) {
|
|
157
|
+
if (!condition)
|
|
158
|
+
throw new Error(message ?? "Invariant failed");
|
|
159
|
+
}
|
|
160
|
+
function nonexhaustive(value) {
|
|
161
|
+
throw new Error(`NonExhaustive value: ${value}`);
|
|
162
|
+
}
|
|
191
163
|
function u$7(t2, n2, a2) {
|
|
192
164
|
let o2 = (r2) => t2(r2, ...n2);
|
|
193
165
|
return a2 === void 0 ? o2 : Object.assign(o2, { lazy: a2, lazyArgs: n2 });
|
|
@@ -283,41 +255,6 @@ function u$2(...n2) {
|
|
|
283
255
|
return u$6(i, n2);
|
|
284
256
|
}
|
|
285
257
|
var i = (n2, { min: e2, max: r2 }) => e2 !== void 0 && n2 < e2 ? e2 : r2 !== void 0 && n2 > r2 ? r2 : n2;
|
|
286
|
-
function isString$1(value) {
|
|
287
|
-
return value != null && typeof value == "string";
|
|
288
|
-
}
|
|
289
|
-
class BaseError extends CustomError {
|
|
290
|
-
constructor(message, options) {
|
|
291
|
-
super(message, options), Object.defineProperty(this, "name", { value: "BaseError" });
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
class NullableError extends BaseError {
|
|
295
|
-
constructor(message, options) {
|
|
296
|
-
super(message, options), Object.defineProperty(this, "name", { value: "NullableError" });
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
class InvariantError extends BaseError {
|
|
300
|
-
constructor(message, options) {
|
|
301
|
-
super(message, options), Object.defineProperty(this, "name", { value: "InvariantError" });
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
function nonNullable(value, message) {
|
|
305
|
-
if (typeof value > "u" || value == null)
|
|
306
|
-
throw new NullableError(message ?? `Expected defined value, but received ${value}`);
|
|
307
|
-
return value;
|
|
308
|
-
}
|
|
309
|
-
function invariant$1(condition, message) {
|
|
310
|
-
if (!condition)
|
|
311
|
-
throw new InvariantError(message ?? "Invariant failed");
|
|
312
|
-
}
|
|
313
|
-
class NonExhaustiveError extends BaseError {
|
|
314
|
-
constructor(message, options) {
|
|
315
|
-
super(message, options), Object.defineProperty(this, "name", { value: "NonExhaustiveError" });
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
function nonexhaustive(value) {
|
|
319
|
-
throw new NonExhaustiveError(`NonExhaustive value: ${value}`);
|
|
320
|
-
}
|
|
321
258
|
const ElementShapes = [
|
|
322
259
|
"rectangle",
|
|
323
260
|
"person",
|
|
@@ -326,7 +263,15 @@ const ElementShapes = [
|
|
|
326
263
|
"cylinder",
|
|
327
264
|
"storage",
|
|
328
265
|
"queue"
|
|
329
|
-
]
|
|
266
|
+
];
|
|
267
|
+
function isString$1(value) {
|
|
268
|
+
return value != null && typeof value == "string";
|
|
269
|
+
}
|
|
270
|
+
function isAncestor(...args) {
|
|
271
|
+
const ancestor = isString$1(args[0]) ? args[0] : args[0].id;
|
|
272
|
+
return (isString$1(args[1]) ? args[1] : args[1].id).startsWith(ancestor + ".");
|
|
273
|
+
}
|
|
274
|
+
const isTagEqual = (operator) => "tag" in operator, isKindEqual = (operator) => "kind" in operator, isNotOperator = (operator) => "not" in operator, isAndOperator = (operator) => "and" in operator, isOrOperator = (operator) => "or" in operator;
|
|
330
275
|
function whereOperatorAsPredicate(operator) {
|
|
331
276
|
switch (!0) {
|
|
332
277
|
case isTagEqual(operator): {
|
|
@@ -383,10 +328,6 @@ function getBBoxCenter({
|
|
|
383
328
|
y: y2 + height / 2
|
|
384
329
|
};
|
|
385
330
|
}
|
|
386
|
-
function isAncestor(...args) {
|
|
387
|
-
const ancestor = isString$1(args[0]) ? args[0] : args[0].id;
|
|
388
|
-
return (isString$1(args[1]) ? args[1] : args[1].id).startsWith(ancestor + ".");
|
|
389
|
-
}
|
|
390
331
|
function cc(names) {
|
|
391
332
|
if (typeof names == "string" || typeof names == "number") return "" + names;
|
|
392
333
|
let out = "";
|
|
@@ -11737,6 +11678,7 @@ function DiagramContextProvider({
|
|
|
11737
11678
|
}
|
|
11738
11679
|
);
|
|
11739
11680
|
}
|
|
11681
|
+
DiagramContextProvider.displayName = "DiagramContextProvider";
|
|
11740
11682
|
function useDiagramState(selector2, equalityFn) {
|
|
11741
11683
|
const store = useContext(DiagramContext);
|
|
11742
11684
|
if (store === null)
|
|
@@ -22494,6 +22436,7 @@ function EnsureMantine({ children: children2 }) {
|
|
|
22494
22436
|
throw new Error("LikeC4Diagram must be a child of MantineProvider");
|
|
22495
22437
|
return /* @__PURE__ */ jsx(Fragment, { children: children2 });
|
|
22496
22438
|
}
|
|
22439
|
+
EnsureMantine.displayName = "EnsureMantine";
|
|
22497
22440
|
function selectXYFlowSize(state) {
|
|
22498
22441
|
return `${Math.round(state.width)}:${Math.round(state.height)}`;
|
|
22499
22442
|
}
|
|
@@ -25739,6 +25682,7 @@ function XYFlow({
|
|
|
25739
25682
|
}
|
|
25740
25683
|
);
|
|
25741
25684
|
}
|
|
25685
|
+
XYFlow.displayName = "XYFlow";
|
|
25742
25686
|
var container$2 = "_19ci0hj0", card$1 = "_19ci0hj1", title = "_19ci0hj2", description = "_19ci0hj3";
|
|
25743
25687
|
const selector$1 = (s) => ({
|
|
25744
25688
|
id: s.view.id,
|
|
@@ -26108,7 +26052,7 @@ function NotationPanel() {
|
|
|
26108
26052
|
defaultValue: !0
|
|
26109
26053
|
}), hasNotations = notations.length > 0, portalProps = target ? { portalProps: { target } } : { withinPortal: !1 };
|
|
26110
26054
|
return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
|
|
26111
|
-
!hasNotations && /* @__PURE__ */ jsx(
|
|
26055
|
+
!hasNotations && isVisible && /* @__PURE__ */ jsx(
|
|
26112
26056
|
m.div,
|
|
26113
26057
|
{
|
|
26114
26058
|
initial: { opacity: 0.75, translateX: "50%" },
|
|
@@ -26118,7 +26062,7 @@ function NotationPanel() {
|
|
|
26118
26062
|
opacity: 0.6
|
|
26119
26063
|
},
|
|
26120
26064
|
className: clsx("react-flow__panel", container),
|
|
26121
|
-
children: /* @__PURE__ */ jsx(Tooltip$2, { label: "
|
|
26065
|
+
children: /* @__PURE__ */ jsx(Tooltip$2, { label: "View has no notations", color: "orange", ...portalProps, children: /* @__PURE__ */ jsx(
|
|
26122
26066
|
ThemeIcon,
|
|
26123
26067
|
{
|
|
26124
26068
|
size: "xl",
|
|
@@ -26967,6 +26911,7 @@ function LikeC4Diagram({
|
|
|
26967
26911
|
}
|
|
26968
26912
|
) }) });
|
|
26969
26913
|
}
|
|
26914
|
+
LikeC4Diagram.displayName = "LikeC4Diagram";
|
|
26970
26915
|
const LikeC4DiagramInnerMemo = memo$1(function({
|
|
26971
26916
|
background,
|
|
26972
26917
|
controls,
|
|
@@ -27010,7 +26955,9 @@ const LikeC4DiagramInnerMemo = memo$1(function({
|
|
|
27010
26955
|
enableFocusMode && /* @__PURE__ */ jsx(SelectEdgesOnNodeFocus, {})
|
|
27011
26956
|
] })
|
|
27012
26957
|
] });
|
|
27013
|
-
}, shallowEqual)
|
|
26958
|
+
}, shallowEqual);
|
|
26959
|
+
LikeC4DiagramInnerMemo.displayName = "LikeC4DiagramInnerMemo";
|
|
26960
|
+
const RenderIcon = ({ node }) => {
|
|
27014
26961
|
const IconComponent = Icons[node.icon ?? ""];
|
|
27015
26962
|
return IconComponent ? /* @__PURE__ */ jsx(IconComponent, {}) : null;
|
|
27016
26963
|
}, fontCss = '@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-400-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-400-normal.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-500-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-500-normal.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:600;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-600-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-600-normal.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-ext-400-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-ext-400-normal.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-ext-500-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-ext-500-normal.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:600;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-ext-600-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-ext-600-normal.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-400-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-400-normal.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-500-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-500-normal.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:600;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-600-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/cyrillic-600-normal.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-ext-400-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-ext-400-normal.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-ext-500-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-ext-500-normal.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:600;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-ext-600-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-ext-600-normal.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}', bundledStyles = () => {
|
|
@@ -27065,7 +27012,7 @@ const BrowserModal = memo$1(({
|
|
|
27065
27012
|
}, []), useTimeoutEffect(() => {
|
|
27066
27013
|
setVisible(!0);
|
|
27067
27014
|
}, 20);
|
|
27068
|
-
const
|
|
27015
|
+
const hasNotations = (view.notation?.elements ?? []).length > 0;
|
|
27069
27016
|
return /* @__PURE__ */ jsx(
|
|
27070
27017
|
ModalRoot,
|
|
27071
27018
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|