likec4 1.60.0 → 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.
Files changed (157) hide show
  1. package/README.md +2 -0
  2. package/__app__/codegen/react.mjs +4 -10
  3. package/__app__/codegen/webcomponent.mjs +5 -208
  4. package/__app__/index.html +15 -15
  5. package/__app__/src/aichat/index.mjs +1 -2
  6. package/__app__/src/chunks/AIChat.mjs +292 -117
  7. package/__app__/src/chunks/ErrorComponent.mjs +444 -0
  8. package/__app__/src/chunks/Header.mjs +269 -0
  9. package/__app__/src/chunks/ViewReact.mjs +438 -0
  10. package/__app__/src/chunks/find.mjs +38 -0
  11. package/__app__/src/chunks/hooks.mjs +18 -541
  12. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +340 -0
  13. package/__app__/src/chunks/libs/@tanstack-ai.mjs +11101 -1797
  14. package/__app__/src/chunks/libs/@tanstack.mjs +4563 -3083
  15. package/__app__/src/chunks/libs/fast-equals.mjs +140 -71
  16. package/__app__/src/chunks/{es.mjs → libs/html-to-image.mjs} +16 -22
  17. package/__app__/src/chunks/libs/nanostores.mjs +4 -8
  18. package/__app__/src/chunks/libs/react-resizable-panels.mjs +2792 -0
  19. package/__app__/src/chunks/react.mjs +22 -0
  20. package/__app__/src/chunks/rolldown-runtime.mjs +3 -32
  21. package/__app__/src/chunks/router.mjs +106 -0
  22. package/__app__/src/chunks/scope.mjs +106 -0
  23. package/__app__/src/chunks/searchParams.mjs +29 -0
  24. package/__app__/src/chunks/single-index.mjs +465 -0
  25. package/__app__/src/chunks/styled-system.mjs +1916 -2946
  26. package/__app__/src/chunks/useAsync.mjs +69 -0
  27. package/__app__/src/chunks/useSyncedRef.mjs +16 -0
  28. package/__app__/src/components/ColorSchemeToggle.mjs +124 -0
  29. package/__app__/src/components/CopyToClipboard.mjs +53 -0
  30. package/__app__/src/components/ErrorComponent.mjs +1 -0
  31. package/__app__/src/components/NavigationPanel.mjs +63 -0
  32. package/__app__/src/components/NotFound.mjs +155 -0
  33. package/__app__/src/components/ViewOutlet.mjs +9 -0
  34. package/__app__/src/components/model-diff/CompareModelProvider.mjs +44 -0
  35. package/__app__/src/components/model-diff/ModelDiffPanel.mjs +179 -0
  36. package/__app__/src/components/model-diff/compare-model.mjs +76 -0
  37. package/__app__/src/components/model-diff/state.mjs +45 -0
  38. package/__app__/src/components/search/OverviewSearch.mjs +92 -0
  39. package/__app__/src/components/search/OverviewSearchAdapter.mjs +94 -0
  40. package/__app__/src/components/sidebar/DiagramTree.css.mjs +48 -0
  41. package/__app__/src/components/sidebar/DiagramsTree.mjs +304 -0
  42. package/__app__/src/components/sidebar/Drawer.mjs +178 -0
  43. package/__app__/src/components/sidebar/SidebarBurger.mjs +28 -0
  44. package/__app__/src/components/sidebar/data.mjs +94 -0
  45. package/__app__/src/components/sidebar/state.mjs +16 -0
  46. package/__app__/src/components/view-page/Header.mjs +1 -0
  47. package/__app__/src/components/view-page/SelectProject.mjs +258 -0
  48. package/__app__/src/components/view-page/ShareModal.mjs +111 -0
  49. package/__app__/src/components/view-page/share-modal/AlertLocalhost.mjs +31 -0
  50. package/__app__/src/components/view-page/share-modal/CopyButtonChild.mjs +36 -0
  51. package/__app__/src/components/view-page/share-modal/EmbedPanel.mjs +100 -0
  52. package/__app__/src/components/view-page/share-modal/WebcomponentsPanel.mjs +264 -0
  53. package/__app__/src/components/view-page/state.mjs +17 -0
  54. package/__app__/src/context/LikeC4CustomizationContext.mjs +26 -0
  55. package/__app__/src/context/LikeC4IconRendererContext.mjs +29 -0
  56. package/__app__/src/context/LikeC4ModelContext.mjs +34 -0
  57. package/__app__/src/context/LikeC4ProjectsContext.mjs +40 -0
  58. package/__app__/src/context/ModelDiffsContext.mjs +33 -0
  59. package/__app__/src/context/safeCtx.mjs +14 -0
  60. package/__app__/src/hooks.mjs +1 -0
  61. package/__app__/src/main.mjs +4 -48126
  62. package/__app__/src/pages/EmbedPage.mjs +93 -0
  63. package/__app__/src/pages/ExportPage.mjs +691 -0
  64. package/__app__/src/pages/ProjectsOverview.mjs +23 -0
  65. package/__app__/src/pages/ViewAsD2.mjs +105 -0
  66. package/__app__/src/pages/ViewAsDot.mjs +65 -0
  67. package/__app__/src/pages/ViewAsMmd.mjs +109 -0
  68. package/__app__/src/pages/ViewAsPuml.mjs +105 -0
  69. package/__app__/src/pages/ViewEditor.mjs +220 -0
  70. package/__app__/src/pages/ViewReact.mjs +1 -0
  71. package/__app__/src/pages/export-layout.mjs +95 -0
  72. package/__app__/src/pages/export-page-params.mjs +9 -0
  73. package/__app__/src/pages/styles.css.mjs +23 -0
  74. package/__app__/src/routeTree.gen.mjs +105 -0
  75. package/__app__/src/router.mjs +1 -0
  76. package/__app__/src/routes/__root.mjs +65 -0
  77. package/__app__/src/routes/index.css.mjs +29 -0
  78. package/__app__/src/routes/index.mjs +32 -0
  79. package/__app__/src/routes/project._projectId/-components.mjs +100 -0
  80. package/__app__/src/routes/project._projectId/embed._viewId.mjs +5 -0
  81. package/__app__/src/routes/project._projectId/export._viewId.mjs +24 -0
  82. package/__app__/src/routes/project._projectId/index.mjs +14 -0
  83. package/__app__/src/routes/project._projectId/route.mjs +93 -0
  84. package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +34 -0
  85. package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +41 -0
  86. package/__app__/src/routes/project._projectId/view._viewId.index.mjs +7 -0
  87. package/__app__/src/routes/project._projectId/view._viewId.mjs +23 -0
  88. package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +39 -0
  89. package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +34 -0
  90. package/__app__/src/routes/projects.mjs +36 -0
  91. package/__app__/src/routes/single-index.mjs +1 -0
  92. package/__app__/src/routes/webcomponent._.mjs +94 -0
  93. package/__app__/src/style.css +1156 -1147
  94. package/config/schema.json +26 -2
  95. package/dist/app/render-view-client.css +1 -1
  96. package/dist/app/render-view-client.js +375 -393
  97. package/dist/chunks/filenames.mjs +26 -20
  98. package/dist/chunks/generate-likec4.mjs +4 -4
  99. package/dist/chunks/index.d.mts +16 -15
  100. package/dist/chunks/index2.d.mts +7041 -3293
  101. package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
  102. package/dist/chunks/libs/@logtape/logtape.mjs +5 -5
  103. package/dist/chunks/libs/@ts-graphviz/common.d.mts +2 -4
  104. package/dist/chunks/libs/chevrotain.mjs +19 -19
  105. package/dist/chunks/libs/clone.mjs +1 -0
  106. package/dist/chunks/libs/eventemitter3.mjs +1 -1
  107. package/dist/chunks/libs/fast-equals.mjs +1 -0
  108. package/dist/chunks/libs/fontkit.mjs +1 -0
  109. package/dist/chunks/libs/langium.d.mts +80 -2933
  110. package/dist/chunks/libs/langium.mjs +6 -6
  111. package/dist/chunks/libs/pako.mjs +1 -1
  112. package/dist/chunks/libs/pathe.mjs +1 -1
  113. package/dist/chunks/libs/remeda.mjs +1 -1
  114. package/dist/chunks/node.mjs +110 -77
  115. package/dist/chunks/rolldown-runtime.mjs +1 -1
  116. package/dist/chunks/sequence-view.mjs +1 -1
  117. package/dist/chunks/vite-plugin.mjs +183 -164
  118. package/dist/cli/index.mjs +157 -101
  119. package/dist/config/index.d.mts +65 -4
  120. package/dist/config/index.mjs +1 -1
  121. package/dist/generators/likec4.d.mts +16 -64
  122. package/dist/index.d.mts +2 -4
  123. package/dist/model/index.d.mts +0 -10
  124. package/dist/vite-plugin/index.d.mts +83 -61
  125. package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +1 -2
  126. package/dist/vite-plugin/internal/index.d.mts +91 -17
  127. package/dist/vite-plugin/internal/index.mjs +156 -110
  128. package/package.json +60 -55
  129. package/react/index.d.mts +3010 -4014
  130. package/react/index.mjs +170 -171
  131. package/react/rolldown-runtime-CfRud99p.js +1 -0
  132. package/skills/likec4-dsl/SKILL.md +71 -25
  133. package/skills/likec4-dsl/evals/evals-public.json +5 -0
  134. package/skills/likec4-dsl/evals/grading-spec.json +15 -1
  135. package/skills/likec4-dsl/references/cli.md +39 -10
  136. package/skills/likec4-dsl/references/configuration.md +5 -5
  137. package/skills/likec4-dsl/references/diffs.md +52 -0
  138. package/skills/likec4-dsl/references/examples.md +2 -2
  139. package/skills/likec4-dsl/references/identifier-validity.md +31 -31
  140. package/skills/likec4-dsl/references/include-predicates-wildcards.md +16 -15
  141. package/skills/likec4-dsl/references/model.md +42 -11
  142. package/skills/likec4-dsl/references/specification.md +11 -7
  143. package/skills/likec4-dsl/references/troubleshooting.md +47 -42
  144. package/skills/likec4-dsl/references/views.md +2 -2
  145. package/vite-plugin-modules.d.ts +126 -51
  146. package/__app__/src/chunks/LikeC4Styles.mjs +0 -4522
  147. package/__app__/src/chunks/ProjectsOverview.mjs +0 -827
  148. package/__app__/src/chunks/libs/@floating-ui.mjs +0 -3286
  149. package/__app__/src/chunks/libs/@mantine.mjs +0 -17731
  150. package/__app__/src/chunks/libs/@xstate/react.mjs +0 -3471
  151. package/__app__/src/chunks/libs/@xyflow/react.mjs +0 -7927
  152. package/__app__/src/chunks/libs/bezier-js.mjs +0 -1593
  153. package/__app__/src/chunks/libs/d3.mjs +0 -4531
  154. package/__app__/src/chunks/libs/framer.mjs +0 -11331
  155. package/__app__/src/chunks/libs/zod.mjs +0 -5404
  156. package/dist/chunks/libs/@chevrotain/types.d.mts +0 -111
  157. package/react/rolldown-runtime-DnkiqaRY.js +0 -1
@@ -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 };