likec4 1.59.4 → 1.61.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/README.md +2 -0
- package/__app__/codegen/react.mjs +4 -10
- package/__app__/codegen/webcomponent.mjs +6 -131
- package/__app__/index.html +15 -15
- package/__app__/src/aichat/index.mjs +11 -7
- package/__app__/src/chunks/AIChat.mjs +1355 -739
- package/__app__/src/chunks/ErrorComponent.mjs +444 -0
- package/__app__/src/chunks/Header.mjs +269 -0
- package/__app__/src/chunks/ViewReact.mjs +438 -0
- package/__app__/src/chunks/find.mjs +38 -0
- package/__app__/src/chunks/hooks.mjs +158 -472
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +340 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +11841 -1417
- package/__app__/src/chunks/libs/@tanstack.mjs +5110 -2404
- package/__app__/src/chunks/libs/fast-equals.mjs +507 -214
- package/__app__/src/chunks/libs/html-to-image.mjs +613 -0
- package/__app__/src/chunks/libs/nanostores.mjs +170 -0
- package/__app__/src/chunks/libs/react-resizable-panels.mjs +2792 -0
- package/__app__/src/chunks/react.mjs +22 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +16 -29
- package/__app__/src/chunks/router.mjs +106 -0
- package/__app__/src/chunks/scope.mjs +106 -0
- package/__app__/src/chunks/searchParams.mjs +29 -0
- package/__app__/src/chunks/single-index.mjs +465 -0
- package/__app__/src/chunks/styled-system.mjs +1826 -2528
- package/__app__/src/chunks/useAsync.mjs +69 -0
- package/__app__/src/chunks/useSyncedRef.mjs +16 -0
- package/__app__/src/components/ColorSchemeToggle.mjs +124 -0
- package/__app__/src/components/CopyToClipboard.mjs +53 -0
- package/__app__/src/components/ErrorComponent.mjs +1 -0
- package/__app__/src/components/NavigationPanel.mjs +63 -0
- package/__app__/src/components/NotFound.mjs +155 -0
- package/__app__/src/components/ViewOutlet.mjs +9 -0
- package/__app__/src/components/model-diff/CompareModelProvider.mjs +44 -0
- package/__app__/src/components/model-diff/ModelDiffPanel.mjs +179 -0
- package/__app__/src/components/model-diff/compare-model.mjs +76 -0
- package/__app__/src/components/model-diff/state.mjs +45 -0
- package/__app__/src/components/search/OverviewSearch.mjs +92 -0
- package/__app__/src/components/search/OverviewSearchAdapter.mjs +94 -0
- package/__app__/src/components/sidebar/DiagramTree.css.mjs +48 -0
- package/__app__/src/components/sidebar/DiagramsTree.mjs +304 -0
- package/__app__/src/components/sidebar/Drawer.mjs +178 -0
- package/__app__/src/components/sidebar/SidebarBurger.mjs +28 -0
- package/__app__/src/components/sidebar/data.mjs +94 -0
- package/__app__/src/components/sidebar/state.mjs +16 -0
- package/__app__/src/components/view-page/Header.mjs +1 -0
- package/__app__/src/components/view-page/SelectProject.mjs +258 -0
- package/__app__/src/components/view-page/ShareModal.mjs +111 -0
- package/__app__/src/components/view-page/share-modal/AlertLocalhost.mjs +31 -0
- package/__app__/src/components/view-page/share-modal/CopyButtonChild.mjs +36 -0
- package/__app__/src/components/view-page/share-modal/EmbedPanel.mjs +100 -0
- package/__app__/src/components/view-page/share-modal/WebcomponentsPanel.mjs +264 -0
- package/__app__/src/components/view-page/state.mjs +17 -0
- package/__app__/src/context/LikeC4CustomizationContext.mjs +26 -0
- package/__app__/src/context/LikeC4IconRendererContext.mjs +29 -0
- package/__app__/src/context/LikeC4ModelContext.mjs +34 -0
- package/__app__/src/context/LikeC4ProjectsContext.mjs +40 -0
- package/__app__/src/context/ModelDiffsContext.mjs +33 -0
- package/__app__/src/context/safeCtx.mjs +14 -0
- package/__app__/src/fonts.css +112 -1
- package/__app__/src/hooks.mjs +1 -0
- package/__app__/src/main.mjs +6 -29151
- package/__app__/src/pages/EmbedPage.mjs +93 -0
- package/__app__/src/pages/ExportPage.mjs +691 -0
- package/__app__/src/pages/ProjectsOverview.mjs +23 -0
- package/__app__/src/pages/ViewAsD2.mjs +105 -0
- package/__app__/src/pages/ViewAsDot.mjs +65 -0
- package/__app__/src/pages/ViewAsMmd.mjs +109 -0
- package/__app__/src/pages/ViewAsPuml.mjs +105 -0
- package/__app__/src/pages/ViewEditor.mjs +220 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/pages/export-layout.mjs +95 -0
- package/__app__/src/pages/export-page-params.mjs +9 -0
- package/__app__/src/pages/styles.css.mjs +23 -0
- package/__app__/src/routeTree.gen.mjs +105 -0
- package/__app__/src/router.mjs +1 -0
- package/__app__/src/routes/__root.mjs +65 -0
- package/__app__/src/routes/index.css.mjs +29 -0
- package/__app__/src/routes/index.mjs +32 -0
- package/__app__/src/routes/project._projectId/-components.mjs +100 -0
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +5 -0
- package/__app__/src/routes/project._projectId/export._viewId.mjs +24 -0
- package/__app__/src/routes/project._projectId/index.mjs +14 -0
- package/__app__/src/routes/project._projectId/route.mjs +93 -0
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +34 -0
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +41 -0
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +7 -0
- package/__app__/src/routes/project._projectId/view._viewId.mjs +23 -0
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +39 -0
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +34 -0
- package/__app__/src/routes/projects.mjs +36 -0
- package/__app__/src/routes/single-index.mjs +1 -0
- package/__app__/src/routes/webcomponent._.mjs +94 -0
- package/__app__/src/style.css +18497 -1
- package/config/schema.json +146 -97
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +394 -238
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +25 -17
- package/dist/chunks/generate-likec4.mjs +5 -0
- package/dist/chunks/index.d.mts +255 -194
- package/dist/chunks/index2.d.mts +8246 -3610
- package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
- package/dist/chunks/libs/@chevrotain/gast.mjs +27 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +81 -9
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -4
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +2 -4
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +88 -36
- package/dist/chunks/libs/clone.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/fast-equals.mjs +1 -0
- package/dist/chunks/libs/fontkit.mjs +1 -0
- package/dist/chunks/libs/json5.mjs +4 -4
- package/dist/chunks/libs/langium.d.mts +6707 -6715
- package/dist/chunks/libs/langium.mjs +16 -24
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +1 -1
- package/dist/chunks/libs/pathe.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/node.mjs +111 -77
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +185 -166
- package/dist/cli/index.mjs +254 -1306
- package/dist/config/index.d.mts +66 -5
- package/dist/config/index.mjs +1 -1
- package/dist/generators/likec4.d.mts +6530 -0
- package/dist/generators/likec4.mjs +1 -0
- package/dist/index.d.mts +2 -4
- package/dist/model/index.d.mts +0 -7
- package/dist/vite-plugin/index.d.mts +83 -58
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +8 -0
- package/dist/vite-plugin/internal/index.d.mts +92 -17
- package/dist/vite-plugin/internal/index.mjs +225 -126
- package/generators/likec4/package.json +4 -0
- package/package.json +134 -122
- package/react/index.d.mts +7496 -26659
- package/react/index.mjs +533 -63936
- package/react/rolldown-runtime-CfRud99p.js +1 -0
- package/skills/likec4-dsl/SKILL.md +474 -0
- package/skills/likec4-dsl/evals/evals-public.json +207 -0
- package/skills/likec4-dsl/evals/grading-spec.json +603 -0
- package/skills/likec4-dsl/references/bridge-leanix-drawio.md +42 -0
- package/skills/likec4-dsl/references/cli.md +168 -0
- package/skills/likec4-dsl/references/configuration.md +266 -0
- package/skills/likec4-dsl/references/deployment.md +160 -0
- package/skills/likec4-dsl/references/diffs.md +52 -0
- package/skills/likec4-dsl/references/dynamic-views.md +455 -0
- package/skills/likec4-dsl/references/examples.md +370 -0
- package/skills/likec4-dsl/references/identifier-validity.md +90 -0
- package/skills/likec4-dsl/references/include-predicates-wildcards.md +180 -0
- package/skills/likec4-dsl/references/model.md +182 -0
- package/skills/likec4-dsl/references/predicates.md +123 -0
- package/skills/likec4-dsl/references/relationships-bidirectional.md +176 -0
- package/skills/likec4-dsl/references/specification.md +79 -0
- package/skills/likec4-dsl/references/style-tokens-colors.md +150 -0
- package/skills/likec4-dsl/references/troubleshooting.md +101 -0
- package/skills/likec4-dsl/references/views.md +329 -0
- package/vite-plugin-modules.d.ts +126 -51
- package/__app__/src/chunks/LikeC4Styles.mjs +0 -2306
- package/__app__/src/chunks/ProjectsOverview.mjs +0 -537
- package/__app__/src/chunks/es.mjs +0 -439
- package/__app__/src/chunks/libs/@floating-ui.mjs +0 -2532
- package/__app__/src/chunks/libs/@mantine.mjs +0 -13868
- package/__app__/src/chunks/libs/@xstate/react.mjs +0 -2015
- package/__app__/src/chunks/libs/@xyflow/react.mjs +0 -5367
- package/__app__/src/chunks/libs/bezier-js.mjs +0 -1007
- package/__app__/src/chunks/libs/d3.mjs +0 -2817
- package/__app__/src/chunks/libs/framer.mjs +0 -5926
- package/__app__/src/chunks/libs/zod.mjs +0 -3176
- package/dist/chunks/libs/@chevrotain/types.d.mts +0 -108
- package/dist/chunks/libs/picomatch.mjs +0 -1
- package/dist/chunks/libs/zod.d.mts +0 -3840
- package/dist/chunks/libs/zod.mjs +0 -65
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import "./rolldown-runtime.mjs";
|
|
2
|
+
import { _ as notFound, a as createFileRoute, s as Link } from "./libs/@tanstack.mjs";
|
|
3
|
+
import { f as css } from "./styled-system.mjs";
|
|
4
|
+
import { ColorSchemeToggle } from "../components/ColorSchemeToggle.mjs";
|
|
5
|
+
import { n as ErrorComponent } from "./ErrorComponent.mjs";
|
|
6
|
+
import { NavigationPanel } from "../components/NavigationPanel.mjs";
|
|
7
|
+
import { OverviewSearch } from "../components/search/OverviewSearch.mjs";
|
|
8
|
+
import { SidebarDrawer } from "../components/sidebar/Drawer.mjs";
|
|
9
|
+
import { SidebarDrawerOps } from "../components/sidebar/state.mjs";
|
|
10
|
+
import { ViewOutlet } from "../components/ViewOutlet.mjs";
|
|
11
|
+
import { LikeC4IconRendererContext } from "../context/LikeC4IconRendererContext.mjs";
|
|
12
|
+
import { LikeC4ModelContext } from "../context/LikeC4ModelContext.mjs";
|
|
13
|
+
import { ModelDiffsContext } from "../context/ModelDiffsContext.mjs";
|
|
14
|
+
import { i as useLikeC4Views, t as useCurrentProject } from "./hooks.mjs";
|
|
15
|
+
import { cardLink, previewBg } from "../routes/index.css.mjs";
|
|
16
|
+
import { useEffect, useState } from "react";
|
|
17
|
+
import { c } from "react/compiler-runtime";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { pageTitle } from "likec4:app-config";
|
|
20
|
+
import { Box, Burger, Card, Container, Group, SimpleGrid, Text } from "@mantine/core";
|
|
21
|
+
import { Markdown, StaticLikeC4Diagram } from "likec4/react";
|
|
22
|
+
import { useDocumentTitle, useInViewport } from "@mantine/hooks";
|
|
23
|
+
import { RichText } from "@likec4/core/types";
|
|
24
|
+
import { loadDiffs } from "likec4:diffs";
|
|
25
|
+
import { loadModel } from "likec4:model";
|
|
26
|
+
// ../../node_modules/.pnpm/remeda@2.52.0/node_modules/remeda/dist/randomInteger.js
|
|
27
|
+
function e(e, t) {
|
|
28
|
+
let n = Math.ceil(e);
|
|
29
|
+
let r = Math.floor(t);
|
|
30
|
+
if (r < n) throw RangeError(`randomInteger: The range [${e.toString()},${t.toString()}] contains no integer`);
|
|
31
|
+
return Math.floor(Math.random() * (r - n + 1) + n);
|
|
32
|
+
}
|
|
33
|
+
// src/filterLandingPageViews.ts
|
|
34
|
+
function filterLandingPageViews(views, filter) {
|
|
35
|
+
if (!filter) return views;
|
|
36
|
+
if ("include" in filter) return views.filter((view) => matchesAny(view, filter.include));
|
|
37
|
+
if ("exclude" in filter) return views.filter((view) => !matchesAny(view, filter.exclude));
|
|
38
|
+
return views;
|
|
39
|
+
}
|
|
40
|
+
function matchesAny(view, patterns) {
|
|
41
|
+
return patterns.some((pattern) => {
|
|
42
|
+
if (pattern.startsWith("#")) {
|
|
43
|
+
const tag = pattern.slice(1);
|
|
44
|
+
return view.tags?.some((t) => t === tag) ?? false;
|
|
45
|
+
}
|
|
46
|
+
return view.id === pattern;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// src/routes/single-index.tsx
|
|
50
|
+
var Route = createFileRoute("/single-index")({
|
|
51
|
+
staleTime: Infinity,
|
|
52
|
+
loader: async ({ context }) => {
|
|
53
|
+
const projectId = context.projectId;
|
|
54
|
+
const [data, { $diffs }] = await Promise.all([loadModel(projectId), loadDiffs(projectId)]);
|
|
55
|
+
if (!data.$likec4data.value) throw notFound();
|
|
56
|
+
return {
|
|
57
|
+
$likec4model: data.$likec4model,
|
|
58
|
+
$diffs,
|
|
59
|
+
projectId
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
component: RouteComponent,
|
|
63
|
+
errorComponent: ErrorComponent
|
|
64
|
+
});
|
|
65
|
+
function RouteComponent() {
|
|
66
|
+
const $ = c(9);
|
|
67
|
+
const { $likec4model, $diffs, projectId } = Route.useLoaderData();
|
|
68
|
+
let t0;
|
|
69
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
70
|
+
t0 = /* @__PURE__ */ jsx(SingleIndexPage, {});
|
|
71
|
+
$[0] = t0;
|
|
72
|
+
} else t0 = $[0];
|
|
73
|
+
let t1;
|
|
74
|
+
if ($[1] !== $diffs) {
|
|
75
|
+
t1 = /* @__PURE__ */ jsx(ModelDiffsContext, {
|
|
76
|
+
diffs: $diffs,
|
|
77
|
+
children: t0
|
|
78
|
+
});
|
|
79
|
+
$[1] = $diffs;
|
|
80
|
+
$[2] = t1;
|
|
81
|
+
} else t1 = $[2];
|
|
82
|
+
let t2;
|
|
83
|
+
if ($[3] !== $likec4model || $[4] !== t1) {
|
|
84
|
+
t2 = /* @__PURE__ */ jsx(LikeC4ModelContext, {
|
|
85
|
+
likec4model: $likec4model,
|
|
86
|
+
children: t1
|
|
87
|
+
});
|
|
88
|
+
$[3] = $likec4model;
|
|
89
|
+
$[4] = t1;
|
|
90
|
+
$[5] = t2;
|
|
91
|
+
} else t2 = $[5];
|
|
92
|
+
let t3;
|
|
93
|
+
if ($[6] !== projectId || $[7] !== t2) {
|
|
94
|
+
t3 = /* @__PURE__ */ jsx(ViewOutlet, { children: /* @__PURE__ */ jsx(LikeC4IconRendererContext, {
|
|
95
|
+
projectId,
|
|
96
|
+
children: t2
|
|
97
|
+
}) });
|
|
98
|
+
$[6] = projectId;
|
|
99
|
+
$[7] = t2;
|
|
100
|
+
$[8] = t3;
|
|
101
|
+
} else t3 = $[8];
|
|
102
|
+
return t3;
|
|
103
|
+
}
|
|
104
|
+
function SingleIndexPage() {
|
|
105
|
+
const $ = c(40);
|
|
106
|
+
const allViews = useLikeC4Views();
|
|
107
|
+
const { landingPage, title: projectTitle } = useCurrentProject();
|
|
108
|
+
useDocumentTitle(projectTitle ?? pageTitle);
|
|
109
|
+
let T0;
|
|
110
|
+
let T1;
|
|
111
|
+
let t0;
|
|
112
|
+
let t1;
|
|
113
|
+
let t2;
|
|
114
|
+
let t3;
|
|
115
|
+
let t4;
|
|
116
|
+
let t5;
|
|
117
|
+
let t6;
|
|
118
|
+
let t7;
|
|
119
|
+
let t8;
|
|
120
|
+
if ($[0] !== allViews || $[1] !== landingPage) {
|
|
121
|
+
const views = filterLandingPageViews(allViews, landingPage);
|
|
122
|
+
T1 = Container;
|
|
123
|
+
t6 = "xl";
|
|
124
|
+
let t9;
|
|
125
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
126
|
+
t7 = /* @__PURE__ */ jsx(SidebarDrawer, {});
|
|
127
|
+
t9 = css({
|
|
128
|
+
containerName: "likec4-root",
|
|
129
|
+
containerType: "inline-size",
|
|
130
|
+
display: "flex",
|
|
131
|
+
alignItems: "flex-start",
|
|
132
|
+
justifyContent: "space-between",
|
|
133
|
+
padding: "xs",
|
|
134
|
+
gap: "xs",
|
|
135
|
+
position: "sticky",
|
|
136
|
+
top: "0",
|
|
137
|
+
zIndex: "[10]",
|
|
138
|
+
backgroundColor: "likec4.panel.bg/85",
|
|
139
|
+
backdropFilter: "[blur(8px)]"
|
|
140
|
+
});
|
|
141
|
+
$[13] = t7;
|
|
142
|
+
$[14] = t9;
|
|
143
|
+
} else {
|
|
144
|
+
t7 = $[13];
|
|
145
|
+
t9 = $[14];
|
|
146
|
+
}
|
|
147
|
+
let t10;
|
|
148
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
149
|
+
t10 = {
|
|
150
|
+
position: "relative",
|
|
151
|
+
width: "max-content",
|
|
152
|
+
margin: "0"
|
|
153
|
+
};
|
|
154
|
+
$[15] = t10;
|
|
155
|
+
} else t10 = $[15];
|
|
156
|
+
let t11;
|
|
157
|
+
let t12;
|
|
158
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
159
|
+
t11 = /* @__PURE__ */ jsx("div", {
|
|
160
|
+
style: {
|
|
161
|
+
width: 0,
|
|
162
|
+
height: 36
|
|
163
|
+
},
|
|
164
|
+
"aria-hidden": true
|
|
165
|
+
});
|
|
166
|
+
t12 = /* @__PURE__ */ jsx(Burger, {
|
|
167
|
+
size: "sm",
|
|
168
|
+
onClick: SidebarDrawerOps.open,
|
|
169
|
+
"aria-label": "Toggle navigation"
|
|
170
|
+
});
|
|
171
|
+
$[16] = t11;
|
|
172
|
+
$[17] = t12;
|
|
173
|
+
} else {
|
|
174
|
+
t11 = $[16];
|
|
175
|
+
t12 = $[17];
|
|
176
|
+
}
|
|
177
|
+
let t13;
|
|
178
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
179
|
+
t13 = /* @__PURE__ */ jsx(NavigationPanel.Root, {
|
|
180
|
+
css: t10,
|
|
181
|
+
children: /* @__PURE__ */ jsxs(NavigationPanel.Body, { children: [
|
|
182
|
+
t11,
|
|
183
|
+
t12,
|
|
184
|
+
/* @__PURE__ */ jsx(NavigationPanel.Logo, {
|
|
185
|
+
css: { flexShrink: 0 },
|
|
186
|
+
onClick: _temp
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ jsx(OverviewSearch, {})
|
|
189
|
+
] })
|
|
190
|
+
});
|
|
191
|
+
$[18] = t13;
|
|
192
|
+
} else t13 = $[18];
|
|
193
|
+
let t14;
|
|
194
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
195
|
+
t14 = {
|
|
196
|
+
position: "relative",
|
|
197
|
+
margin: "0"
|
|
198
|
+
};
|
|
199
|
+
$[19] = t14;
|
|
200
|
+
} else t14 = $[19];
|
|
201
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
202
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
203
|
+
className: t9,
|
|
204
|
+
children: [t13, /* @__PURE__ */ jsx(NavigationPanel.Root, {
|
|
205
|
+
panelPosition: "right",
|
|
206
|
+
css: t14,
|
|
207
|
+
children: /* @__PURE__ */ jsx(NavigationPanel.Body, { children: /* @__PURE__ */ jsx("div", {
|
|
208
|
+
style: {
|
|
209
|
+
display: "flex",
|
|
210
|
+
alignItems: "center",
|
|
211
|
+
minHeight: 36
|
|
212
|
+
},
|
|
213
|
+
children: /* @__PURE__ */ jsx(ColorSchemeToggle, {})
|
|
214
|
+
}) })
|
|
215
|
+
})]
|
|
216
|
+
});
|
|
217
|
+
$[20] = t8;
|
|
218
|
+
} else t8 = $[20];
|
|
219
|
+
T0 = SimpleGrid;
|
|
220
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
221
|
+
t0 = {
|
|
222
|
+
base: "md",
|
|
223
|
+
sm: "md"
|
|
224
|
+
};
|
|
225
|
+
t1 = {
|
|
226
|
+
base: "sm",
|
|
227
|
+
sm: "sm"
|
|
228
|
+
};
|
|
229
|
+
t2 = {
|
|
230
|
+
base: 1,
|
|
231
|
+
sm: 2,
|
|
232
|
+
md: 3,
|
|
233
|
+
xl: 4
|
|
234
|
+
};
|
|
235
|
+
t3 = {
|
|
236
|
+
base: 10,
|
|
237
|
+
sm: "xl"
|
|
238
|
+
};
|
|
239
|
+
t4 = {
|
|
240
|
+
base: "md",
|
|
241
|
+
sm: "xl"
|
|
242
|
+
};
|
|
243
|
+
$[21] = t0;
|
|
244
|
+
$[22] = t1;
|
|
245
|
+
$[23] = t2;
|
|
246
|
+
$[24] = t3;
|
|
247
|
+
$[25] = t4;
|
|
248
|
+
} else {
|
|
249
|
+
t0 = $[21];
|
|
250
|
+
t1 = $[22];
|
|
251
|
+
t2 = $[23];
|
|
252
|
+
t3 = $[24];
|
|
253
|
+
t4 = $[25];
|
|
254
|
+
}
|
|
255
|
+
t5 = views.map(_temp2);
|
|
256
|
+
$[0] = allViews;
|
|
257
|
+
$[1] = landingPage;
|
|
258
|
+
$[2] = T0;
|
|
259
|
+
$[3] = T1;
|
|
260
|
+
$[4] = t0;
|
|
261
|
+
$[5] = t1;
|
|
262
|
+
$[6] = t2;
|
|
263
|
+
$[7] = t3;
|
|
264
|
+
$[8] = t4;
|
|
265
|
+
$[9] = t5;
|
|
266
|
+
$[10] = t6;
|
|
267
|
+
$[11] = t7;
|
|
268
|
+
$[12] = t8;
|
|
269
|
+
} else {
|
|
270
|
+
T0 = $[2];
|
|
271
|
+
T1 = $[3];
|
|
272
|
+
t0 = $[4];
|
|
273
|
+
t1 = $[5];
|
|
274
|
+
t2 = $[6];
|
|
275
|
+
t3 = $[7];
|
|
276
|
+
t4 = $[8];
|
|
277
|
+
t5 = $[9];
|
|
278
|
+
t6 = $[10];
|
|
279
|
+
t7 = $[11];
|
|
280
|
+
t8 = $[12];
|
|
281
|
+
}
|
|
282
|
+
let t9;
|
|
283
|
+
if ($[26] !== T0 || $[27] !== t0 || $[28] !== t1 || $[29] !== t2 || $[30] !== t3 || $[31] !== t4 || $[32] !== t5) {
|
|
284
|
+
t9 = /* @__PURE__ */ jsx(T0, {
|
|
285
|
+
p: t0,
|
|
286
|
+
pt: t1,
|
|
287
|
+
cols: t2,
|
|
288
|
+
spacing: t3,
|
|
289
|
+
verticalSpacing: t4,
|
|
290
|
+
children: t5
|
|
291
|
+
});
|
|
292
|
+
$[26] = T0;
|
|
293
|
+
$[27] = t0;
|
|
294
|
+
$[28] = t1;
|
|
295
|
+
$[29] = t2;
|
|
296
|
+
$[30] = t3;
|
|
297
|
+
$[31] = t4;
|
|
298
|
+
$[32] = t5;
|
|
299
|
+
$[33] = t9;
|
|
300
|
+
} else t9 = $[33];
|
|
301
|
+
let t10;
|
|
302
|
+
if ($[34] !== T1 || $[35] !== t6 || $[36] !== t7 || $[37] !== t8 || $[38] !== t9) {
|
|
303
|
+
t10 = /* @__PURE__ */ jsxs(T1, {
|
|
304
|
+
size: t6,
|
|
305
|
+
children: [
|
|
306
|
+
t7,
|
|
307
|
+
t8,
|
|
308
|
+
t9
|
|
309
|
+
]
|
|
310
|
+
});
|
|
311
|
+
$[34] = T1;
|
|
312
|
+
$[35] = t6;
|
|
313
|
+
$[36] = t7;
|
|
314
|
+
$[37] = t8;
|
|
315
|
+
$[38] = t9;
|
|
316
|
+
$[39] = t10;
|
|
317
|
+
} else t10 = $[39];
|
|
318
|
+
return t10;
|
|
319
|
+
}
|
|
320
|
+
function _temp2(v) {
|
|
321
|
+
return /* @__PURE__ */ jsx(ViewCard, { view: v }, v.id);
|
|
322
|
+
}
|
|
323
|
+
function _temp() {
|
|
324
|
+
return window.scrollTo({
|
|
325
|
+
top: 0,
|
|
326
|
+
behavior: "smooth"
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function ViewCard(t0) {
|
|
330
|
+
const $ = c(26);
|
|
331
|
+
const { view } = t0;
|
|
332
|
+
const [visible, setVisible] = useState(false);
|
|
333
|
+
const { ref, inViewport } = useInViewport();
|
|
334
|
+
const { projectId } = Route.useLoaderData();
|
|
335
|
+
let t1;
|
|
336
|
+
let t2;
|
|
337
|
+
if ($[0] !== inViewport || $[1] !== visible) {
|
|
338
|
+
t1 = () => {
|
|
339
|
+
if (!inViewport || visible) return;
|
|
340
|
+
const tm = setTimeout(() => setVisible(true), e(30, 80));
|
|
341
|
+
return () => clearTimeout(tm);
|
|
342
|
+
};
|
|
343
|
+
t2 = [inViewport, visible];
|
|
344
|
+
$[0] = inViewport;
|
|
345
|
+
$[1] = visible;
|
|
346
|
+
$[2] = t1;
|
|
347
|
+
$[3] = t2;
|
|
348
|
+
} else {
|
|
349
|
+
t1 = $[2];
|
|
350
|
+
t2 = $[3];
|
|
351
|
+
}
|
|
352
|
+
useEffect(t1, t2);
|
|
353
|
+
let t3;
|
|
354
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
355
|
+
t3 = { height: 200 };
|
|
356
|
+
$[4] = t3;
|
|
357
|
+
} else t3 = $[4];
|
|
358
|
+
let t4;
|
|
359
|
+
if ($[5] !== view || $[6] !== visible) {
|
|
360
|
+
t4 = visible && /* @__PURE__ */ jsx(StaticLikeC4Diagram, {
|
|
361
|
+
background: "transparent",
|
|
362
|
+
view,
|
|
363
|
+
fitView: true,
|
|
364
|
+
fitViewPadding: "4px",
|
|
365
|
+
reduceGraphics: true
|
|
366
|
+
});
|
|
367
|
+
$[5] = view;
|
|
368
|
+
$[6] = visible;
|
|
369
|
+
$[7] = t4;
|
|
370
|
+
} else t4 = $[7];
|
|
371
|
+
let t5;
|
|
372
|
+
if ($[8] !== t4) {
|
|
373
|
+
t5 = /* @__PURE__ */ jsx(Card.Section, { children: /* @__PURE__ */ jsx(Box, {
|
|
374
|
+
className: previewBg,
|
|
375
|
+
style: t3,
|
|
376
|
+
children: t4
|
|
377
|
+
}) });
|
|
378
|
+
$[8] = t4;
|
|
379
|
+
$[9] = t5;
|
|
380
|
+
} else t5 = $[9];
|
|
381
|
+
const t6 = view.title ?? view.id;
|
|
382
|
+
let t7;
|
|
383
|
+
if ($[10] !== t6) {
|
|
384
|
+
t7 = /* @__PURE__ */ jsx(Group, {
|
|
385
|
+
justify: "space-between",
|
|
386
|
+
mt: "md",
|
|
387
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
388
|
+
fw: 500,
|
|
389
|
+
children: t6
|
|
390
|
+
})
|
|
391
|
+
});
|
|
392
|
+
$[10] = t6;
|
|
393
|
+
$[11] = t7;
|
|
394
|
+
} else t7 = $[11];
|
|
395
|
+
let t8;
|
|
396
|
+
if ($[12] !== view.description) {
|
|
397
|
+
t8 = RichText.from(view.description);
|
|
398
|
+
$[12] = view.description;
|
|
399
|
+
$[13] = t8;
|
|
400
|
+
} else t8 = $[13];
|
|
401
|
+
let t9;
|
|
402
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
403
|
+
t9 = css({
|
|
404
|
+
lineClamp: 3,
|
|
405
|
+
mt: "1",
|
|
406
|
+
transition: "fast",
|
|
407
|
+
opacity: {
|
|
408
|
+
base: "0.8",
|
|
409
|
+
_groupHover: "1"
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
$[14] = t9;
|
|
413
|
+
} else t9 = $[14];
|
|
414
|
+
let t10;
|
|
415
|
+
if ($[15] !== t8) {
|
|
416
|
+
t10 = /* @__PURE__ */ jsx(Markdown, {
|
|
417
|
+
value: t8,
|
|
418
|
+
textScale: .75,
|
|
419
|
+
emptyText: "No description",
|
|
420
|
+
className: t9
|
|
421
|
+
});
|
|
422
|
+
$[15] = t8;
|
|
423
|
+
$[16] = t10;
|
|
424
|
+
} else t10 = $[16];
|
|
425
|
+
let t11;
|
|
426
|
+
if ($[17] !== projectId || $[18] !== view.id) {
|
|
427
|
+
t11 = /* @__PURE__ */ jsx(Link, {
|
|
428
|
+
to: "/project/$projectId/view/$viewId/",
|
|
429
|
+
params: {
|
|
430
|
+
projectId,
|
|
431
|
+
viewId: view.id
|
|
432
|
+
},
|
|
433
|
+
search: true,
|
|
434
|
+
className: cardLink
|
|
435
|
+
});
|
|
436
|
+
$[17] = projectId;
|
|
437
|
+
$[18] = view.id;
|
|
438
|
+
$[19] = t11;
|
|
439
|
+
} else t11 = $[19];
|
|
440
|
+
let t12;
|
|
441
|
+
if ($[20] !== ref || $[21] !== t10 || $[22] !== t11 || $[23] !== t5 || $[24] !== t7) {
|
|
442
|
+
t12 = /* @__PURE__ */ jsxs(Card, {
|
|
443
|
+
ref,
|
|
444
|
+
shadow: "xs",
|
|
445
|
+
padding: "lg",
|
|
446
|
+
radius: "sm",
|
|
447
|
+
className: "group",
|
|
448
|
+
withBorder: true,
|
|
449
|
+
children: [
|
|
450
|
+
t5,
|
|
451
|
+
t7,
|
|
452
|
+
t10,
|
|
453
|
+
t11
|
|
454
|
+
]
|
|
455
|
+
});
|
|
456
|
+
$[20] = ref;
|
|
457
|
+
$[21] = t10;
|
|
458
|
+
$[22] = t11;
|
|
459
|
+
$[23] = t5;
|
|
460
|
+
$[24] = t7;
|
|
461
|
+
$[25] = t12;
|
|
462
|
+
} else t12 = $[25];
|
|
463
|
+
return t12;
|
|
464
|
+
}
|
|
465
|
+
export { Route as t };
|