@contractspec/lib.example-shared-ui 6.0.6 → 6.0.10

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 (82) hide show
  1. package/.turbo/turbo-build.log +90 -84
  2. package/AGENTS.md +43 -25
  3. package/CHANGELOG.md +24 -0
  4. package/README.md +63 -35
  5. package/dist/EvolutionDashboard.js +9 -9
  6. package/dist/EvolutionSidebar.js +15 -15
  7. package/dist/LocalDataIndicator.js +3 -3
  8. package/dist/MarkdownView.d.ts +0 -7
  9. package/dist/MarkdownView.js +76 -172
  10. package/dist/PersonalizationInsights.js +12 -12
  11. package/dist/SaveToStudioButton.js +2 -2
  12. package/dist/SpecDrivenTemplateShell.d.ts +1 -1
  13. package/dist/SpecDrivenTemplateShell.js +10 -10
  14. package/dist/SpecEditorPanel.js +3 -3
  15. package/dist/TemplateShell.js +10 -10
  16. package/dist/browser/EvolutionDashboard.js +9 -9
  17. package/dist/browser/EvolutionSidebar.js +15 -15
  18. package/dist/browser/LocalDataIndicator.js +3 -3
  19. package/dist/browser/MarkdownView.js +76 -172
  20. package/dist/browser/PersonalizationInsights.js +12 -12
  21. package/dist/browser/SaveToStudioButton.js +2 -2
  22. package/dist/browser/SpecDrivenTemplateShell.js +10 -10
  23. package/dist/browser/SpecEditorPanel.js +3 -3
  24. package/dist/browser/TemplateShell.js +10 -10
  25. package/dist/browser/hooks/index.js +29 -29
  26. package/dist/browser/index.js +193 -286
  27. package/dist/browser/lib/component-registry.js +1 -1
  28. package/dist/browser/markdown/formatPresentationName.js +9 -0
  29. package/dist/browser/markdown/useMarkdownPresentation.js +65 -0
  30. package/dist/hooks/index.d.ts +3 -3
  31. package/dist/hooks/index.js +29 -29
  32. package/dist/index.d.ts +12 -11
  33. package/dist/index.js +193 -286
  34. package/dist/lib/component-registry.js +1 -1
  35. package/dist/markdown/formatPresentationName.d.ts +1 -0
  36. package/dist/markdown/formatPresentationName.js +10 -0
  37. package/dist/markdown/useMarkdownPresentation.d.ts +21 -0
  38. package/dist/markdown/useMarkdownPresentation.js +66 -0
  39. package/dist/node/EvolutionDashboard.js +9 -9
  40. package/dist/node/EvolutionSidebar.js +15 -15
  41. package/dist/node/LocalDataIndicator.js +3 -3
  42. package/dist/node/MarkdownView.js +76 -172
  43. package/dist/node/PersonalizationInsights.js +12 -12
  44. package/dist/node/SaveToStudioButton.js +2 -2
  45. package/dist/node/SpecDrivenTemplateShell.js +10 -10
  46. package/dist/node/SpecEditorPanel.js +3 -3
  47. package/dist/node/TemplateShell.js +10 -10
  48. package/dist/node/hooks/index.js +29 -29
  49. package/dist/node/index.js +193 -286
  50. package/dist/node/lib/component-registry.js +1 -1
  51. package/dist/node/markdown/formatPresentationName.js +9 -0
  52. package/dist/node/markdown/useMarkdownPresentation.js +65 -0
  53. package/dist/utils/index.d.ts +1 -1
  54. package/package.json +40 -13
  55. package/src/EvolutionDashboard.tsx +415 -415
  56. package/src/EvolutionSidebar.tsx +245 -245
  57. package/src/LocalDataIndicator.tsx +28 -28
  58. package/src/MarkdownView.tsx +119 -372
  59. package/src/OverlayContextProvider.tsx +272 -272
  60. package/src/PersonalizationInsights.tsx +232 -232
  61. package/src/SaveToStudioButton.tsx +51 -51
  62. package/src/SpecDrivenTemplateShell.tsx +59 -59
  63. package/src/SpecEditorPanel.tsx +138 -138
  64. package/src/TemplateShell.tsx +50 -50
  65. package/src/bundles/ExampleTemplateBundle.ts +78 -78
  66. package/src/hooks/index.ts +3 -3
  67. package/src/hooks/useBehaviorTracking.ts +252 -252
  68. package/src/hooks/useEvolution.ts +437 -437
  69. package/src/hooks/useRegistryTemplates.ts +42 -42
  70. package/src/hooks/useSpecContent.ts +214 -214
  71. package/src/hooks/useWorkflowComposer.ts +567 -567
  72. package/src/index.ts +12 -11
  73. package/src/lib/component-registry.tsx +40 -40
  74. package/src/lib/runtime-context.tsx +31 -31
  75. package/src/lib/types.ts +57 -57
  76. package/src/markdown/formatPresentationName.ts +9 -0
  77. package/src/markdown/useMarkdownPresentation.ts +107 -0
  78. package/src/overlay-types.ts +15 -15
  79. package/src/utils/fetchPresentationData.ts +13 -13
  80. package/src/utils/generateSpecFromTemplate.ts +29 -29
  81. package/src/utils/index.ts +1 -1
  82. package/tsconfig.json +8 -8
@@ -28,7 +28,7 @@ function LocalDataIndicator() {
28
28
  }
29
29
  };
30
30
  return /* @__PURE__ */ jsxDEV("div", {
31
- className: "border-border bg-muted/40 text-muted-foreground inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs",
31
+ className: "inline-flex items-center gap-2 rounded-full border border-border bg-muted/40 px-3 py-1 text-muted-foreground text-xs",
32
32
  children: [
33
33
  /* @__PURE__ */ jsxDEV(Shield, {
34
34
  className: "h-3.5 w-3.5 text-violet-400"
@@ -38,14 +38,14 @@ function LocalDataIndicator() {
38
38
  "Local runtime \xB7",
39
39
  " ",
40
40
  /* @__PURE__ */ jsxDEV("span", {
41
- className: "text-foreground font-semibold",
41
+ className: "font-semibold text-foreground",
42
42
  children: template.name
43
43
  }, undefined, false, undefined, this)
44
44
  ]
45
45
  }, undefined, true, undefined, this),
46
46
  /* @__PURE__ */ jsxDEV("button", {
47
47
  type: "button",
48
- className: "border-border text-muted-foreground hover:text-foreground inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-semibold",
48
+ className: "inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 font-semibold text-[11px] text-muted-foreground hover:text-foreground",
49
49
  onClick: handleReset,
50
50
  disabled: isResetting,
51
51
  children: [
@@ -10,10 +10,3 @@ export interface MarkdownViewProps {
10
10
  * It allows switching between available presentations for the template.
11
11
  */
12
12
  export declare function MarkdownView({ templateId: propTemplateId, presentationId, className, }: MarkdownViewProps): import("react/jsx-runtime").JSX.Element;
13
- /**
14
- * Simple markdown renderer using pre-formatted display
15
- * For production, consider using react-markdown or similar
16
- */
17
- export declare function MarkdownRenderer({ content }: {
18
- content: string;
19
- }): import("react/jsx-runtime").JSX.Element;
@@ -11,31 +11,24 @@ function useTemplateRuntime() {
11
11
  return context;
12
12
  }
13
13
 
14
- // src/MarkdownView.tsx
14
+ // src/markdown/formatPresentationName.ts
15
+ function formatPresentationName(name) {
16
+ const parts = name.split(".");
17
+ const lastPart = parts[parts.length - 1] ?? name;
18
+ return lastPart.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
19
+ }
20
+
21
+ // src/markdown/useMarkdownPresentation.ts
15
22
  import { useCallback, useEffect, useState } from "react";
16
- import {
17
- Button,
18
- ErrorState,
19
- LoaderBlock
20
- } from "@contractspec/lib.design-system";
21
- import { Card } from "@contractspec/lib.ui-kit-web/ui/card";
22
- import { Badge } from "@contractspec/lib.ui-kit-web/ui/badge";
23
- import { jsxDEV } from "react/jsx-dev-runtime";
24
23
  "use client";
25
- function MarkdownView({
26
- templateId: propTemplateId,
24
+ function useMarkdownPresentation({
25
+ engine,
26
+ fetchData,
27
27
  presentationId,
28
- className
28
+ presentations,
29
+ resolvePresentation,
30
+ templateId
29
31
  }) {
30
- const {
31
- engine,
32
- template,
33
- templateId: contextTemplateId,
34
- resolvePresentation,
35
- fetchData
36
- } = useTemplateRuntime();
37
- const templateId = propTemplateId ?? contextTemplateId;
38
- const presentations = template?.presentations ?? [];
39
32
  const [selectedPresentation, setSelectedPresentation] = useState("");
40
33
  const [markdownContent, setMarkdownContent] = useState("");
41
34
  const [loading, setLoading] = useState(false);
@@ -43,10 +36,16 @@ function MarkdownView({
43
36
  useEffect(() => {
44
37
  if (presentationId && presentations.includes(presentationId)) {
45
38
  setSelectedPresentation(presentationId);
46
- } else if (presentations.length > 0 && !selectedPresentation) {
39
+ return;
40
+ }
41
+ if (presentations.length === 0) {
42
+ setSelectedPresentation("");
43
+ return;
44
+ }
45
+ if (!presentations.includes(selectedPresentation)) {
47
46
  setSelectedPresentation(presentations[0] ?? "");
48
47
  }
49
- }, [presentationId, presentations, selectedPresentation]);
48
+ }, [presentationId, presentations, selectedPresentation, templateId]);
50
49
  const renderMarkdown = useCallback(async () => {
51
50
  if (!selectedPresentation || !engine)
52
51
  return;
@@ -68,16 +67,61 @@ function MarkdownView({
68
67
  } finally {
69
68
  setLoading(false);
70
69
  }
71
- }, [
70
+ }, [engine, fetchData, resolvePresentation, selectedPresentation]);
71
+ useEffect(() => {
72
+ renderMarkdown();
73
+ }, [renderMarkdown]);
74
+ return {
75
+ error,
76
+ loading,
77
+ markdownContent,
78
+ renderMarkdown,
72
79
  selectedPresentation,
73
- templateId,
80
+ setSelectedPresentation
81
+ };
82
+ }
83
+
84
+ // src/MarkdownView.tsx
85
+ import {
86
+ Button,
87
+ ErrorState,
88
+ LoaderBlock,
89
+ MarkdownRenderer
90
+ } from "@contractspec/lib.design-system";
91
+ import { Badge } from "@contractspec/lib.ui-kit-web/ui/badge";
92
+ import { Card } from "@contractspec/lib.ui-kit-web/ui/card";
93
+ import { useCallback as useCallback2 } from "react";
94
+ import { jsxDEV } from "react/jsx-dev-runtime";
95
+ "use client";
96
+ function MarkdownView({
97
+ templateId: propTemplateId,
98
+ presentationId,
99
+ className
100
+ }) {
101
+ const {
74
102
  engine,
103
+ template,
104
+ templateId: contextTemplateId,
75
105
  resolvePresentation,
76
106
  fetchData
77
- ]);
78
- useEffect(() => {
79
- renderMarkdown();
80
- }, [renderMarkdown]);
107
+ } = useTemplateRuntime();
108
+ const templateId = propTemplateId ?? contextTemplateId;
109
+ const presentations = template?.presentations ?? [];
110
+ const {
111
+ error,
112
+ loading,
113
+ markdownContent,
114
+ renderMarkdown,
115
+ selectedPresentation,
116
+ setSelectedPresentation
117
+ } = useMarkdownPresentation({
118
+ engine,
119
+ fetchData,
120
+ presentationId,
121
+ presentations,
122
+ resolvePresentation,
123
+ templateId
124
+ });
81
125
  if (!presentations.length) {
82
126
  return /* @__PURE__ */ jsxDEV(Card, {
83
127
  className,
@@ -90,7 +134,7 @@ function MarkdownView({
90
134
  }, undefined, false, undefined, this)
91
135
  }, undefined, false, undefined, this);
92
136
  }
93
- const handleCopy = useCallback(() => {
137
+ const handleCopy = useCallback2(() => {
94
138
  if (markdownContent) {
95
139
  navigator.clipboard.writeText(markdownContent);
96
140
  }
@@ -102,7 +146,7 @@ function MarkdownView({
102
146
  className: "mb-4 flex flex-wrap items-center gap-2",
103
147
  children: [
104
148
  /* @__PURE__ */ jsxDEV("span", {
105
- className: "text-muted-foreground text-sm font-medium",
149
+ className: "font-medium text-muted-foreground text-sm",
106
150
  children: "Presentation:"
107
151
  }, undefined, false, undefined, this),
108
152
  presentations.map((name) => /* @__PURE__ */ jsxDEV(Button, {
@@ -159,146 +203,6 @@ function MarkdownView({
159
203
  ]
160
204
  }, undefined, true, undefined, this);
161
205
  }
162
- function MarkdownRenderer({ content }) {
163
- const lines = content.split(`
164
- `);
165
- const rendered = [];
166
- let i = 0;
167
- while (i < lines.length) {
168
- const line = lines[i] ?? "";
169
- if (line.startsWith("|") && lines[i + 1]?.match(/^\|[\s-|]+\|$/)) {
170
- const tableLines = [line];
171
- i++;
172
- while (i < lines.length && (lines[i]?.startsWith("|") ?? false)) {
173
- tableLines.push(lines[i] ?? "");
174
- i++;
175
- }
176
- rendered.push(renderTable(tableLines, rendered.length));
177
- continue;
178
- }
179
- if (line.startsWith("# ")) {
180
- rendered.push(/* @__PURE__ */ jsxDEV("h1", {
181
- className: "mb-4 text-2xl font-bold",
182
- children: line.slice(2)
183
- }, i, false, undefined, this));
184
- } else if (line.startsWith("## ")) {
185
- rendered.push(/* @__PURE__ */ jsxDEV("h2", {
186
- className: "mt-6 mb-3 text-xl font-semibold",
187
- children: line.slice(3)
188
- }, i, false, undefined, this));
189
- } else if (line.startsWith("### ")) {
190
- rendered.push(/* @__PURE__ */ jsxDEV("h3", {
191
- className: "mt-4 mb-2 text-lg font-medium",
192
- children: line.slice(4)
193
- }, i, false, undefined, this));
194
- } else if (line.startsWith("> ")) {
195
- rendered.push(/* @__PURE__ */ jsxDEV("blockquote", {
196
- className: "text-muted-foreground my-2 border-l-4 border-violet-500/50 pl-4 italic",
197
- children: line.slice(2)
198
- }, i, false, undefined, this));
199
- } else if (line.startsWith("- ")) {
200
- rendered.push(/* @__PURE__ */ jsxDEV("li", {
201
- className: "ml-4 list-disc",
202
- children: formatInlineMarkdown(line.slice(2))
203
- }, i, false, undefined, this));
204
- } else if (line.startsWith("**") && line.includes(":**")) {
205
- const [label, ...rest] = line.split(":**");
206
- rendered.push(/* @__PURE__ */ jsxDEV("p", {
207
- className: "my-1",
208
- children: [
209
- /* @__PURE__ */ jsxDEV("strong", {
210
- children: [
211
- label?.slice(2),
212
- ":"
213
- ]
214
- }, undefined, true, undefined, this),
215
- rest.join(":**")
216
- ]
217
- }, i, true, undefined, this));
218
- } else if (line.startsWith("_") && line.endsWith("_")) {
219
- rendered.push(/* @__PURE__ */ jsxDEV("p", {
220
- className: "text-muted-foreground my-1 italic",
221
- children: line.slice(1, -1)
222
- }, i, false, undefined, this));
223
- } else if (!line.trim()) {
224
- rendered.push(/* @__PURE__ */ jsxDEV("div", {
225
- className: "h-2"
226
- }, i, false, undefined, this));
227
- } else {
228
- rendered.push(/* @__PURE__ */ jsxDEV("p", {
229
- className: "my-1",
230
- children: formatInlineMarkdown(line)
231
- }, i, false, undefined, this));
232
- }
233
- i++;
234
- }
235
- return /* @__PURE__ */ jsxDEV("div", {
236
- className: "prose prose-sm dark:prose-invert max-w-none",
237
- children: rendered
238
- }, undefined, false, undefined, this);
239
- }
240
- function renderTable(lines, keyPrefix) {
241
- if (lines.length < 2)
242
- return null;
243
- const parseRow = (row) => row.split("|").slice(1, -1).map((cell) => cell.trim());
244
- const headers = parseRow(lines[0] ?? "");
245
- const dataRows = lines.slice(2).map(parseRow);
246
- return /* @__PURE__ */ jsxDEV("div", {
247
- className: "my-4 overflow-x-auto",
248
- children: /* @__PURE__ */ jsxDEV("table", {
249
- className: "border-border min-w-full border-collapse border text-sm",
250
- children: [
251
- /* @__PURE__ */ jsxDEV("thead", {
252
- children: /* @__PURE__ */ jsxDEV("tr", {
253
- className: "bg-muted/50",
254
- children: headers.map((header, idx) => /* @__PURE__ */ jsxDEV("th", {
255
- className: "border-border border px-3 py-2 text-left font-semibold",
256
- children: header
257
- }, idx, false, undefined, this))
258
- }, undefined, false, undefined, this)
259
- }, undefined, false, undefined, this),
260
- /* @__PURE__ */ jsxDEV("tbody", {
261
- children: dataRows.map((row, rowIdx) => /* @__PURE__ */ jsxDEV("tr", {
262
- className: "hover:bg-muted/30",
263
- children: row.map((cell, cellIdx) => /* @__PURE__ */ jsxDEV("td", {
264
- className: "border-border border px-3 py-2",
265
- children: formatInlineMarkdown(cell)
266
- }, cellIdx, false, undefined, this))
267
- }, rowIdx, false, undefined, this))
268
- }, undefined, false, undefined, this)
269
- ]
270
- }, undefined, true, undefined, this)
271
- }, `table-${keyPrefix}`, false, undefined, this);
272
- }
273
- function formatInlineMarkdown(text) {
274
- const parts = text.split(/(\*\*[^*]+\*\*)/g);
275
- return parts.map((part, i) => {
276
- if (part.startsWith("**") && part.endsWith("**")) {
277
- return /* @__PURE__ */ jsxDEV("strong", {
278
- children: part.slice(2, -2)
279
- }, i, false, undefined, this);
280
- }
281
- if (part.includes("`")) {
282
- const codeParts = part.split(/(`[^`]+`)/g);
283
- return codeParts.map((cp, j) => {
284
- if (cp.startsWith("`") && cp.endsWith("`")) {
285
- return /* @__PURE__ */ jsxDEV("code", {
286
- className: "rounded bg-violet-500/10 px-1.5 py-0.5 font-mono text-sm",
287
- children: cp.slice(1, -1)
288
- }, `${i}-${j}`, false, undefined, this);
289
- }
290
- return cp;
291
- });
292
- }
293
- return part;
294
- });
295
- }
296
- function formatPresentationName(name) {
297
- const parts = name.split(".");
298
- const lastPart = parts[parts.length - 1] ?? name;
299
- return lastPart.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
300
- }
301
206
  export {
302
- MarkdownView,
303
- MarkdownRenderer
207
+ MarkdownView
304
208
  };
@@ -155,10 +155,10 @@ function generateRecommendations(featuresUsed, unusedFeatures, mostUsedModes, to
155
155
  }
156
156
 
157
157
  // src/PersonalizationInsights.tsx
158
- import { useCallback as useCallback2, useMemo as useMemo2, useState as useState2 } from "react";
159
158
  import { Button } from "@contractspec/lib.design-system";
160
- import { Card } from "@contractspec/lib.ui-kit-web/ui/card";
161
159
  import { Badge } from "@contractspec/lib.ui-kit-web/ui/badge";
160
+ import { Card } from "@contractspec/lib.ui-kit-web/ui/card";
161
+ import { useCallback as useCallback2, useMemo as useMemo2, useState as useState2 } from "react";
162
162
  import { jsxDEV } from "react/jsx-dev-runtime";
163
163
  "use client";
164
164
  function PersonalizationInsights({
@@ -207,7 +207,7 @@ function PersonalizationInsights({
207
207
  className: "overflow-hidden",
208
208
  children: [
209
209
  /* @__PURE__ */ jsxDEV("div", {
210
- className: "flex items-center justify-between border-b border-blue-500/20 bg-blue-500/5 px-4 py-3",
210
+ className: "flex items-center justify-between border-blue-500/20 border-b bg-blue-500/5 px-4 py-3",
211
211
  children: [
212
212
  /* @__PURE__ */ jsxDEV("div", {
213
213
  className: "flex items-center gap-2",
@@ -232,7 +232,7 @@ function PersonalizationInsights({
232
232
  }, undefined, false, undefined, this),
233
233
  onToggle && /* @__PURE__ */ jsxDEV("button", {
234
234
  onClick: onToggle,
235
- className: "text-muted-foreground hover:text-foreground p-1",
235
+ className: "p-1 text-muted-foreground hover:text-foreground",
236
236
  type: "button",
237
237
  title: "Collapse",
238
238
  children: "\u2715"
@@ -274,7 +274,7 @@ function PersonalizationInsights({
274
274
  className: "mb-4",
275
275
  children: [
276
276
  /* @__PURE__ */ jsxDEV("h4", {
277
- className: "mb-2 text-xs font-semibold text-blue-400 uppercase",
277
+ className: "mb-2 font-semibold text-blue-400 text-xs uppercase",
278
278
  children: "Recommendations"
279
279
  }, undefined, false, undefined, this),
280
280
  /* @__PURE__ */ jsxDEV("ul", {
@@ -298,7 +298,7 @@ function PersonalizationInsights({
298
298
  className: "mb-4",
299
299
  children: [
300
300
  /* @__PURE__ */ jsxDEV("h4", {
301
- className: "mb-2 text-xs font-semibold text-blue-400 uppercase",
301
+ className: "mb-2 font-semibold text-blue-400 text-xs uppercase",
302
302
  children: "Try These Features"
303
303
  }, undefined, false, undefined, this),
304
304
  /* @__PURE__ */ jsxDEV("div", {
@@ -315,7 +315,7 @@ function PersonalizationInsights({
315
315
  sessionStart
316
316
  }, undefined, false, undefined, this),
317
317
  /* @__PURE__ */ jsxDEV("div", {
318
- className: "mt-4 flex justify-end border-t border-blue-500/10 pt-4",
318
+ className: "mt-4 flex justify-end border-blue-500/10 border-t pt-4",
319
319
  children: /* @__PURE__ */ jsxDEV(Button, {
320
320
  variant: "ghost",
321
321
  size: "sm",
@@ -347,7 +347,7 @@ function StatCard({
347
347
  children: icon
348
348
  }, undefined, false, undefined, this),
349
349
  /* @__PURE__ */ jsxDEV("div", {
350
- className: "text-lg font-bold",
350
+ className: "font-bold text-lg",
351
351
  children: value
352
352
  }, undefined, false, undefined, this),
353
353
  /* @__PURE__ */ jsxDEV("div", {
@@ -362,12 +362,12 @@ function DetailedInsights({
362
362
  sessionStart
363
363
  }) {
364
364
  return /* @__PURE__ */ jsxDEV("div", {
365
- className: "mt-4 space-y-4 border-t border-blue-500/10 pt-4",
365
+ className: "mt-4 space-y-4 border-blue-500/10 border-t pt-4",
366
366
  children: [
367
367
  summary.mostUsedTemplates.length > 0 && /* @__PURE__ */ jsxDEV("div", {
368
368
  children: [
369
369
  /* @__PURE__ */ jsxDEV("h4", {
370
- className: "mb-2 text-xs font-semibold text-blue-400 uppercase",
370
+ className: "mb-2 font-semibold text-blue-400 text-xs uppercase",
371
371
  children: "Most Used Templates"
372
372
  }, undefined, false, undefined, this),
373
373
  /* @__PURE__ */ jsxDEV("div", {
@@ -393,7 +393,7 @@ function DetailedInsights({
393
393
  summary.mostUsedModes.length > 0 && /* @__PURE__ */ jsxDEV("div", {
394
394
  children: [
395
395
  /* @__PURE__ */ jsxDEV("h4", {
396
- className: "mb-2 text-xs font-semibold text-blue-400 uppercase",
396
+ className: "mb-2 font-semibold text-blue-400 text-xs uppercase",
397
397
  children: "Mode Usage"
398
398
  }, undefined, false, undefined, this),
399
399
  /* @__PURE__ */ jsxDEV("div", {
@@ -419,7 +419,7 @@ function DetailedInsights({
419
419
  /* @__PURE__ */ jsxDEV("div", {
420
420
  children: [
421
421
  /* @__PURE__ */ jsxDEV("h4", {
422
- className: "mb-2 text-xs font-semibold text-blue-400 uppercase",
422
+ className: "mb-2 font-semibold text-blue-400 text-xs uppercase",
423
423
  children: "Features Used"
424
424
  }, undefined, false, undefined, this),
425
425
  /* @__PURE__ */ jsxDEV("div", {
@@ -12,8 +12,8 @@ function useTemplateRuntime() {
12
12
  }
13
13
 
14
14
  // src/SaveToStudioButton.tsx
15
- import { useState } from "react";
16
15
  import { Sparkles } from "lucide-react";
16
+ import { useState } from "react";
17
17
  import { jsxDEV } from "react/jsx-dev-runtime";
18
18
  "use client";
19
19
  function SaveToStudioButton({
@@ -63,7 +63,7 @@ function SaveToStudioButton({
63
63
  children: error
64
64
  }, undefined, false, undefined, this) : null,
65
65
  status === "saved" ? /* @__PURE__ */ jsxDEV("p", {
66
- className: "text-xs text-emerald-400",
66
+ className: "text-emerald-400 text-xs",
67
67
  children: "Template sent to Studio."
68
68
  }, undefined, false, undefined, this) : null
69
69
  ]
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
1
  import type { ResolvedSurfacePlan } from '@contractspec/lib.surface-runtime/runtime/resolve-bundle';
2
+ import type { ReactNode } from 'react';
3
3
  import { type SaveToStudioButtonProps } from './SaveToStudioButton';
4
4
  export interface SpecDrivenTemplateShellProps {
5
5
  plan: ResolvedSurfacePlan;
@@ -28,7 +28,7 @@ function LocalDataIndicator() {
28
28
  }
29
29
  };
30
30
  return /* @__PURE__ */ jsxDEV("div", {
31
- className: "border-border bg-muted/40 text-muted-foreground inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs",
31
+ className: "inline-flex items-center gap-2 rounded-full border border-border bg-muted/40 px-3 py-1 text-muted-foreground text-xs",
32
32
  children: [
33
33
  /* @__PURE__ */ jsxDEV(Shield, {
34
34
  className: "h-3.5 w-3.5 text-violet-400"
@@ -38,14 +38,14 @@ function LocalDataIndicator() {
38
38
  "Local runtime \xB7",
39
39
  " ",
40
40
  /* @__PURE__ */ jsxDEV("span", {
41
- className: "text-foreground font-semibold",
41
+ className: "font-semibold text-foreground",
42
42
  children: template.name
43
43
  }, undefined, false, undefined, this)
44
44
  ]
45
45
  }, undefined, true, undefined, this),
46
46
  /* @__PURE__ */ jsxDEV("button", {
47
47
  type: "button",
48
- className: "border-border text-muted-foreground hover:text-foreground inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-semibold",
48
+ className: "inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 font-semibold text-[11px] text-muted-foreground hover:text-foreground",
49
49
  onClick: handleReset,
50
50
  disabled: isResetting,
51
51
  children: [
@@ -60,8 +60,8 @@ function LocalDataIndicator() {
60
60
  }
61
61
 
62
62
  // src/SaveToStudioButton.tsx
63
- import { useState as useState2 } from "react";
64
63
  import { Sparkles } from "lucide-react";
64
+ import { useState as useState2 } from "react";
65
65
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
66
66
  "use client";
67
67
  function SaveToStudioButton({
@@ -111,7 +111,7 @@ function SaveToStudioButton({
111
111
  children: error
112
112
  }, undefined, false, undefined, this) : null,
113
113
  status === "saved" ? /* @__PURE__ */ jsxDEV2("p", {
114
- className: "text-xs text-emerald-400",
114
+ className: "text-emerald-400 text-xs",
115
115
  children: "Template sent to Studio."
116
116
  }, undefined, false, undefined, this) : null
117
117
  ]
@@ -135,7 +135,7 @@ function SpecDrivenTemplateShell({
135
135
  children
136
136
  }) {
137
137
  const headerContent = /* @__PURE__ */ jsxDEV3("header", {
138
- className: "border-border bg-card rounded-2xl border p-6 shadow-sm",
138
+ className: "rounded-2xl border border-border bg-card p-6 shadow-sm",
139
139
  children: [
140
140
  /* @__PURE__ */ jsxDEV3("div", {
141
141
  className: "flex flex-wrap items-center justify-between gap-4",
@@ -143,15 +143,15 @@ function SpecDrivenTemplateShell({
143
143
  /* @__PURE__ */ jsxDEV3("div", {
144
144
  children: [
145
145
  /* @__PURE__ */ jsxDEV3("p", {
146
- className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase",
146
+ className: "font-semibold text-muted-foreground text-sm uppercase tracking-wide",
147
147
  children: "ContractSpec Templates"
148
148
  }, undefined, false, undefined, this),
149
149
  /* @__PURE__ */ jsxDEV3("h1", {
150
- className: "text-3xl font-bold",
150
+ className: "font-bold text-3xl",
151
151
  children: title
152
152
  }, undefined, false, undefined, this),
153
153
  description ? /* @__PURE__ */ jsxDEV3("p", {
154
- className: "text-muted-foreground mt-2 max-w-2xl text-sm",
154
+ className: "mt-2 max-w-2xl text-muted-foreground text-sm",
155
155
  children: description
156
156
  }, undefined, false, undefined, this) : null
157
157
  ]
@@ -182,7 +182,7 @@ function SpecDrivenTemplateShell({
182
182
  };
183
183
  if (sidebar != null) {
184
184
  slotContent.sidebar = /* @__PURE__ */ jsxDEV3("aside", {
185
- className: "border-border bg-card rounded-2xl border p-4",
185
+ className: "rounded-2xl border border-border bg-card p-4",
186
186
  children: sidebar
187
187
  }, undefined, false, undefined, this);
188
188
  }
@@ -577,9 +577,9 @@ function useSpecContent(templateId) {
577
577
  }
578
578
 
579
579
  // src/SpecEditorPanel.tsx
580
- import { useCallback as useCallback2, useEffect as useEffect2 } from "react";
581
580
  import { Button, LoaderBlock } from "@contractspec/lib.design-system";
582
581
  import { Badge } from "@contractspec/lib.ui-kit-web/ui/badge";
582
+ import { useCallback as useCallback2, useEffect as useEffect2 } from "react";
583
583
  import { jsxDEV } from "react/jsx-dev-runtime";
584
584
  "use client";
585
585
  function SpecEditorPanel({
@@ -683,7 +683,7 @@ function SpecEditorPanel({
683
683
  className: "rounded-lg border border-amber-500/50 bg-amber-500/10 p-3",
684
684
  children: [
685
685
  /* @__PURE__ */ jsxDEV("p", {
686
- className: "mb-2 text-xs font-semibold text-amber-400 uppercase",
686
+ className: "mb-2 font-semibold text-amber-400 text-xs uppercase",
687
687
  children: "Validation Issues"
688
688
  }, undefined, false, undefined, this),
689
689
  /* @__PURE__ */ jsxDEV("ul", {
@@ -701,7 +701,7 @@ function SpecEditorPanel({
701
701
  ]
702
702
  }, undefined, true, undefined, this),
703
703
  /* @__PURE__ */ jsxDEV("div", {
704
- className: "border-border bg-card rounded-2xl border p-4",
704
+ className: "rounded-2xl border border-border bg-card p-4",
705
705
  children: /* @__PURE__ */ jsxDEV(SpecEditor, {
706
706
  projectId: "sandbox",
707
707
  type: "CAPABILITY",
@@ -28,7 +28,7 @@ function LocalDataIndicator() {
28
28
  }
29
29
  };
30
30
  return /* @__PURE__ */ jsxDEV("div", {
31
- className: "border-border bg-muted/40 text-muted-foreground inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs",
31
+ className: "inline-flex items-center gap-2 rounded-full border border-border bg-muted/40 px-3 py-1 text-muted-foreground text-xs",
32
32
  children: [
33
33
  /* @__PURE__ */ jsxDEV(Shield, {
34
34
  className: "h-3.5 w-3.5 text-violet-400"
@@ -38,14 +38,14 @@ function LocalDataIndicator() {
38
38
  "Local runtime \xB7",
39
39
  " ",
40
40
  /* @__PURE__ */ jsxDEV("span", {
41
- className: "text-foreground font-semibold",
41
+ className: "font-semibold text-foreground",
42
42
  children: template.name
43
43
  }, undefined, false, undefined, this)
44
44
  ]
45
45
  }, undefined, true, undefined, this),
46
46
  /* @__PURE__ */ jsxDEV("button", {
47
47
  type: "button",
48
- className: "border-border text-muted-foreground hover:text-foreground inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-semibold",
48
+ className: "inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 font-semibold text-[11px] text-muted-foreground hover:text-foreground",
49
49
  onClick: handleReset,
50
50
  disabled: isResetting,
51
51
  children: [
@@ -60,8 +60,8 @@ function LocalDataIndicator() {
60
60
  }
61
61
 
62
62
  // src/SaveToStudioButton.tsx
63
- import { useState as useState2 } from "react";
64
63
  import { Sparkles } from "lucide-react";
64
+ import { useState as useState2 } from "react";
65
65
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
66
66
  "use client";
67
67
  function SaveToStudioButton({
@@ -111,7 +111,7 @@ function SaveToStudioButton({
111
111
  children: error
112
112
  }, undefined, false, undefined, this) : null,
113
113
  status === "saved" ? /* @__PURE__ */ jsxDEV2("p", {
114
- className: "text-xs text-emerald-400",
114
+ className: "text-emerald-400 text-xs",
115
115
  children: "Template sent to Studio."
116
116
  }, undefined, false, undefined, this) : null
117
117
  ]
@@ -132,7 +132,7 @@ var TemplateShell = ({
132
132
  className: "space-y-6",
133
133
  children: [
134
134
  /* @__PURE__ */ jsxDEV3("header", {
135
- className: "border-border bg-card rounded-2xl border p-6 shadow-sm",
135
+ className: "rounded-2xl border border-border bg-card p-6 shadow-sm",
136
136
  children: [
137
137
  /* @__PURE__ */ jsxDEV3("div", {
138
138
  className: "flex flex-wrap items-center justify-between gap-4",
@@ -140,15 +140,15 @@ var TemplateShell = ({
140
140
  /* @__PURE__ */ jsxDEV3("div", {
141
141
  children: [
142
142
  /* @__PURE__ */ jsxDEV3("p", {
143
- className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase",
143
+ className: "font-semibold text-muted-foreground text-sm uppercase tracking-wide",
144
144
  children: "ContractSpec Templates"
145
145
  }, undefined, false, undefined, this),
146
146
  /* @__PURE__ */ jsxDEV3("h1", {
147
- className: "text-3xl font-bold",
147
+ className: "font-bold text-3xl",
148
148
  children: title
149
149
  }, undefined, false, undefined, this),
150
150
  description ? /* @__PURE__ */ jsxDEV3("p", {
151
- className: "text-muted-foreground mt-2 max-w-2xl text-sm",
151
+ className: "mt-2 max-w-2xl text-muted-foreground text-sm",
152
152
  children: description
153
153
  }, undefined, false, undefined, this) : null
154
154
  ]
@@ -178,7 +178,7 @@ var TemplateShell = ({
178
178
  children
179
179
  }, undefined, false, undefined, this),
180
180
  sidebar ? /* @__PURE__ */ jsxDEV3("aside", {
181
- className: "border-border bg-card rounded-2xl border p-4",
181
+ className: "rounded-2xl border border-border bg-card p-4",
182
182
  children: sidebar
183
183
  }, undefined, false, undefined, this) : null
184
184
  ]