@servicetitan/json-render-react 0.3.1 → 0.3.2-anv-5204-4218c25

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/dist/index.js CHANGED
@@ -1,33 +1,33 @@
1
1
  import { AiMark as e, Alert as t, Badge as n, Button as r, Card as i, Checkbox as a, Chip as o, Divider as s, FieldLabel as c, Flex as l, Grid as u, Icon as d, Link as f, Listbox as ee, OverflowText as te, ProgressBar as ne, Radio as re, SkeletonRectangle as ie, SkeletonText as ae, Switch as oe, Text as p, TextField as se, Textarea as ce } from "@servicetitan/anvil2";
2
- import { Card as m, Dialog as le, Link as ue, Text as h } from "@servicetitan/carto-react-kit";
3
- import { IconChevronDown as de } from "@servicetitan/carto-react-kit/icons";
4
- import { Children as g, Component as fe, Fragment as pe, useEffect as _, useId as me, useMemo as v, useRef as y, useState as b } from "react";
2
+ import { Card as m, Dialog as le, GuidanceCard as ue, Link as de, Text as h } from "@servicetitan/carto-react-kit";
3
+ import { IconChevronDown as fe } from "@servicetitan/carto-react-kit/icons";
4
+ import { Children as g, Component as pe, Fragment as me, useEffect as _, useId as he, useMemo as v, useRef as y, useState as b } from "react";
5
5
  import { core as x } from "@servicetitan/anvil2/token";
6
- import { Fragment as he, jsx as S, jsxs as C } from "react/jsx-runtime";
6
+ import { Fragment as ge, jsx as S, jsxs as C } from "react/jsx-runtime";
7
7
  import { z as w } from "zod";
8
- import { DataTable as ge, createColumnHelper as _e } from "@servicetitan/anvil2/beta";
9
- import ve from "@servicetitan/anvil2/assets/icons/material/round/image.svg";
10
- import ye from "@servicetitan/anvil2/assets/icons/st/document_audio.svg";
11
- import be from "@servicetitan/anvil2/assets/icons/st/document_doc.svg";
12
- import xe from "@servicetitan/anvil2/assets/icons/st/document_form.svg";
13
- import Se from "@servicetitan/anvil2/assets/icons/st/document_other.svg";
14
- import Ce from "@servicetitan/anvil2/assets/icons/st/document_pdf.svg";
15
- import we from "@servicetitan/anvil2/assets/icons/st/document_spreadsheet.svg";
16
- import Te from "@servicetitan/anvil2/assets/icons/st/document_text.svg";
17
- import { primitive as Ee } from "@servicetitan/carto-react-kit/tokens";
18
- import { defineCatalog as T, getByPath as E, validateSpec as De } from "@json-render/core";
8
+ import { DataTable as _e, createColumnHelper as ve } from "@servicetitan/anvil2/beta";
9
+ import ye from "@servicetitan/anvil2/assets/icons/material/round/image.svg";
10
+ import be from "@servicetitan/anvil2/assets/icons/st/document_audio.svg";
11
+ import xe from "@servicetitan/anvil2/assets/icons/st/document_doc.svg";
12
+ import Se from "@servicetitan/anvil2/assets/icons/st/document_form.svg";
13
+ import Ce from "@servicetitan/anvil2/assets/icons/st/document_other.svg";
14
+ import we from "@servicetitan/anvil2/assets/icons/st/document_pdf.svg";
15
+ import Te from "@servicetitan/anvil2/assets/icons/st/document_spreadsheet.svg";
16
+ import Ee from "@servicetitan/anvil2/assets/icons/st/document_text.svg";
17
+ import { primitive as De } from "@servicetitan/carto-react-kit/tokens";
18
+ import { defineCatalog as T, getByPath as E, validateSpec as Oe } from "@json-render/core";
19
19
  import { schema as D } from "@json-render/react/schema";
20
- import { JSONUIProvider as Oe, Renderer as ke, createStateStore as Ae, defineRegistry as je, useStateStore as O } from "@json-render/react";
20
+ import { JSONUIProvider as ke, Renderer as Ae, createStateStore as je, defineRegistry as Me, useStateStore as O } from "@json-render/react";
21
21
  import * as k from "@amcharts/amcharts5";
22
22
  import * as A from "@amcharts/amcharts5/xy";
23
- import Me from "@amcharts/amcharts5/themes/Animated";
24
- import { ThemeCategorical as Ne, ThemeMonochrome as Pe, ThemeSemantic as Fe } from "@servicetitan/anvil2-ext-charts/am5";
25
- import Ie from "@servicetitan/anvil2/assets/icons/material/round/check_circle.svg";
26
- import Le from "@servicetitan/anvil2/assets/icons/material/round/radio_button_unchecked.svg";
27
- import Re from "@servicetitan/anvil2/assets/icons/st/in_progress.svg";
28
- import * as ze from "@amcharts/amcharts5/percent";
23
+ import Ne from "@amcharts/amcharts5/themes/Animated";
24
+ import { ThemeCategorical as Pe, ThemeMonochrome as Fe, ThemeSemantic as Ie } from "@servicetitan/anvil2-ext-charts/am5";
25
+ import Le from "@servicetitan/anvil2/assets/icons/material/round/check_circle.svg";
26
+ import Re from "@servicetitan/anvil2/assets/icons/material/round/radio_button_unchecked.svg";
27
+ import ze from "@servicetitan/anvil2/assets/icons/st/in_progress.svg";
28
+ import * as Be from "@amcharts/amcharts5/percent";
29
29
  //#region ../../node_modules/.pnpm/@vanilla-extract+recipes@0.5.7_@vanilla-extract+css@1.20.1/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js
30
- function Be(e, t) {
30
+ function Ve(e, t) {
31
31
  if (typeof e != "object" || !e) return e;
32
32
  var n = e[Symbol.toPrimitive];
33
33
  if (n !== void 0) {
@@ -37,19 +37,19 @@ function Be(e, t) {
37
37
  }
38
38
  return (t === "string" ? String : Number)(e);
39
39
  }
40
- function Ve(e) {
41
- var t = Be(e, "string");
40
+ function He(e) {
41
+ var t = Ve(e, "string");
42
42
  return typeof t == "symbol" ? t : String(t);
43
43
  }
44
- function He(e, t, n) {
45
- return t = Ve(t), t in e ? Object.defineProperty(e, t, {
44
+ function Ue(e, t, n) {
45
+ return t = He(t), t in e ? Object.defineProperty(e, t, {
46
46
  value: n,
47
47
  enumerable: !0,
48
48
  configurable: !0,
49
49
  writable: !0
50
50
  }) : e[t] = n, e;
51
51
  }
52
- function Ue(e, t) {
52
+ function We(e, t) {
53
53
  var n = Object.keys(e);
54
54
  if (Object.getOwnPropertySymbols) {
55
55
  var r = Object.getOwnPropertySymbols(e);
@@ -59,28 +59,28 @@ function Ue(e, t) {
59
59
  }
60
60
  return n;
61
61
  }
62
- function We(e) {
62
+ function Ge(e) {
63
63
  for (var t = 1; t < arguments.length; t++) {
64
64
  var n = arguments[t] == null ? {} : arguments[t];
65
- t % 2 ? Ue(Object(n), !0).forEach(function(t) {
66
- He(e, t, n[t]);
67
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ue(Object(n)).forEach(function(t) {
65
+ t % 2 ? We(Object(n), !0).forEach(function(t) {
66
+ Ue(e, t, n[t]);
67
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : We(Object(n)).forEach(function(t) {
68
68
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
69
69
  });
70
70
  }
71
71
  return e;
72
72
  }
73
- function Ge(e, t) {
73
+ function Ke(e, t) {
74
74
  var n = {};
75
75
  for (var r in e) n[r] = t(e[r], r);
76
76
  return n;
77
77
  }
78
- var Ke = (e, t, n) => {
78
+ var qe = (e, t, n) => {
79
79
  for (var r of Object.keys(e)) if (e[r] !== (t[r] ?? n[r])) return !1;
80
80
  return !0;
81
81
  }, j = (e) => {
82
82
  var t = (t) => {
83
- var n = e.defaultClassName, r = We(We({}, e.defaultVariants), t);
83
+ var n = e.defaultClassName, r = Ge(Ge({}, e.defaultVariants), t);
84
84
  for (var i in r) {
85
85
  var a = r[i] ?? e.defaultVariants[i];
86
86
  if (a != null) {
@@ -90,7 +90,7 @@ var Ke = (e, t, n) => {
90
90
  s && (n += " " + s);
91
91
  }
92
92
  }
93
- for (var [c, l] of e.compoundVariants) Ke(c, r, e.defaultVariants) && (n += " " + l);
93
+ for (var [c, l] of e.compoundVariants) qe(c, r, e.defaultVariants) && (n += " " + l);
94
94
  return n;
95
95
  };
96
96
  return t.variants = () => Object.keys(e.variantClassNames), t.classNames = {
@@ -98,10 +98,10 @@ var Ke = (e, t, n) => {
98
98
  return e.defaultClassName.split(" ")[0];
99
99
  },
100
100
  get variants() {
101
- return Ge(e.variantClassNames, (e) => Ge(e, (e) => e.split(" ")[0]));
101
+ return Ke(e.variantClassNames, (e) => Ke(e, (e) => e.split(" ")[0]));
102
102
  }
103
103
  }, t;
104
- }, qe = "_7hazmf0", Je = "_7hazmf1", Ye = "_7hazmf2", Xe = j({
104
+ }, Je = "_7hazmf0", Ye = "_7hazmf1", Xe = "_7hazmf2", Ze = j({
105
105
  defaultClassName: "_7hazmf3",
106
106
  variantClassNames: { expanded: {
107
107
  true: "_7hazmf4",
@@ -109,7 +109,7 @@ var Ke = (e, t, n) => {
109
109
  } },
110
110
  defaultVariants: { expanded: !1 },
111
111
  compoundVariants: []
112
- }), Ze = j({
112
+ }), Qe = j({
113
113
  defaultClassName: "_7hazmf6",
114
114
  variantClassNames: { expanded: {
115
115
  true: "_7hazmf7",
@@ -117,7 +117,7 @@ var Ke = (e, t, n) => {
117
117
  } },
118
118
  defaultVariants: { expanded: !1 },
119
119
  compoundVariants: []
120
- }), Qe = "_7hazmf9", $e = "_7hazmfa", et = "_7hazmfb", tt = j({
120
+ }), $e = "_7hazmf9", et = "_7hazmfa", tt = "_7hazmfb", nt = j({
121
121
  defaultClassName: "_7hazmfc",
122
122
  variantClassNames: { expanded: {
123
123
  true: "_7hazmfd",
@@ -131,17 +131,17 @@ var Ke = (e, t, n) => {
131
131
  "danger",
132
132
  "info",
133
133
  "neutral"
134
- ], nt = {
134
+ ], rt = {
135
135
  success: x.semantic.BackgroundColorSuccessSubdued.value,
136
136
  warning: x.semantic.BackgroundColorWarningSubdued.value,
137
137
  danger: x.semantic.BackgroundColorDangerSubdued.value,
138
138
  info: x.semantic.BackgroundColorPrimarySubdued.value,
139
139
  neutral: x.semantic.BackgroundColorSecondary.value
140
140
  };
141
- function rt(e = "neutral") {
142
- return nt[e];
141
+ function it(e = "neutral") {
142
+ return rt[e];
143
143
  }
144
- var it = {
144
+ var at = {
145
145
  success: x.semantic.BackgroundColorSuccess.value,
146
146
  warning: x.semantic.BackgroundColorWarning.value,
147
147
  danger: x.semantic.ForegroundColorDanger.value,
@@ -149,9 +149,9 @@ var it = {
149
149
  neutral: void 0
150
150
  };
151
151
  function N(e) {
152
- return it[e];
152
+ return at[e];
153
153
  }
154
- function at(e) {
154
+ function ot(e) {
155
155
  if (e == null || e === "") return null;
156
156
  if (typeof e == "object" && e && "label" in e) {
157
157
  let t = e;
@@ -170,7 +170,7 @@ function at(e) {
170
170
  }
171
171
  //#endregion
172
172
  //#region src/context/components/collapsible-card.tsx
173
- function ot({ badge: e }) {
173
+ function st({ badge: e }) {
174
174
  return typeof e == "number" ? /* @__PURE__ */ S(o, {
175
175
  label: String(e),
176
176
  size: "small",
@@ -178,18 +178,18 @@ function ot({ badge: e }) {
178
178
  }) : /* @__PURE__ */ S(o, {
179
179
  label: e.label,
180
180
  size: "small",
181
- color: rt(e.tone ?? "neutral"),
181
+ color: it(e.tone ?? "neutral"),
182
182
  style: { marginTop: "2px" }
183
183
  });
184
184
  }
185
- var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
186
- let [i, a] = b(n), [o, s] = b(n), c = me();
185
+ var ct = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
186
+ let [i, a] = b(n), [o, s] = b(n), c = he();
187
187
  return /* @__PURE__ */ S("div", {
188
- className: qe,
188
+ className: Je,
189
189
  children: /* @__PURE__ */ S(m, {
190
190
  padding: "base",
191
191
  content: /* @__PURE__ */ C("div", {
192
- className: Ye,
192
+ className: Xe,
193
193
  children: [/* @__PURE__ */ S(h, {
194
194
  variant: "headline",
195
195
  el: "h3",
@@ -204,25 +204,25 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
204
204
  return t && s(!0), t;
205
205
  });
206
206
  },
207
- className: Qe,
207
+ className: $e,
208
208
  children: [/* @__PURE__ */ C("span", {
209
- className: $e,
209
+ className: et,
210
210
  children: [/* @__PURE__ */ S("span", {
211
- className: et,
211
+ className: tt,
212
212
  children: e
213
- }), t == null ? null : /* @__PURE__ */ S(ot, { badge: t })]
214
- }), /* @__PURE__ */ S(de, { className: tt({ expanded: i }) })]
213
+ }), t == null ? null : /* @__PURE__ */ S(st, { badge: t })]
214
+ }), /* @__PURE__ */ S(fe, { className: nt({ expanded: i }) })]
215
215
  })
216
216
  }), /* @__PURE__ */ S("div", {
217
- className: Xe({ expanded: i }),
217
+ className: Ze({ expanded: i }),
218
218
  onTransitionEnd: (e) => {
219
219
  e.propertyName !== "grid-template-rows" || i || s(!1);
220
220
  },
221
221
  children: /* @__PURE__ */ S("div", {
222
- className: Ze({ expanded: i }),
222
+ className: Qe({ expanded: i }),
223
223
  children: /* @__PURE__ */ S("div", {
224
224
  id: c,
225
- className: Je,
225
+ className: Ye,
226
226
  "aria-hidden": !i,
227
227
  children: o ? r : null
228
228
  })
@@ -231,31 +231,31 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
231
231
  })
232
232
  })
233
233
  });
234
- }, ct = w.object({
234
+ }, lt = w.object({
235
235
  label: w.string(),
236
236
  tone: w.enum(M).optional()
237
- }), lt = w.union([w.number().int().nonnegative(), ct]), ut = {
237
+ }), ut = w.union([w.number().int().nonnegative(), lt]), dt = {
238
238
  props: w.object({
239
239
  title: w.string(),
240
240
  defaultExpanded: w.boolean().optional(),
241
- badge: lt.optional()
241
+ badge: ut.optional()
242
242
  }),
243
243
  slots: ["default"],
244
244
  description: "Collapsible card for the Context panel. Each card holds a single content component as its body. Optional badge shows a count (number) or status label ({ label, tone? }) in the card header. Use defaultExpanded: false to start collapsed."
245
- }, dt = ({ props: e, children: t }) => /* @__PURE__ */ S(st, {
245
+ }, ft = ({ props: e, children: t }) => /* @__PURE__ */ S(ct, {
246
246
  title: e.title,
247
247
  ...e.badge == null ? {} : { badge: e.badge },
248
248
  defaultExpanded: e.defaultExpanded ?? !0,
249
249
  children: t
250
- }), ft = w.object({
250
+ }), pt = w.object({
251
251
  label: w.string(),
252
252
  tone: w.enum(M).optional()
253
- }), pt = w.union([
253
+ }), mt = w.union([
254
254
  w.string(),
255
255
  w.number(),
256
256
  w.null(),
257
- ft
258
- ]), mt = w.object({
257
+ pt
258
+ ]), ht = w.object({
259
259
  key: w.string(),
260
260
  header: w.string(),
261
261
  type: w.enum([
@@ -265,10 +265,10 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
265
265
  "delta"
266
266
  ]).optional(),
267
267
  sortable: w.boolean().optional()
268
- }), ht = w.record(w.string(), pt).and(w.object({ id: w.string() })), gt = {
268
+ }), gt = w.record(w.string(), mt).and(w.object({ id: w.string() })), _t = {
269
269
  props: w.object({
270
- columns: w.array(mt),
271
- rows: w.array(ht),
270
+ columns: w.array(ht),
271
+ rows: w.array(gt),
272
272
  defaultSortedColumn: w.object({
273
273
  id: w.string(),
274
274
  desc: w.boolean().optional()
@@ -276,10 +276,10 @@ var st = ({ title: e, badge: t, defaultExpanded: n = !0, children: r }) => {
276
276
  }),
277
277
  slots: [],
278
278
  description: "Read-only DataTable for context cards. Column type: text (default), currency, chip, or delta. Chip cells: plain string (neutral tone) or { label, tone } where tone is success | warning | danger | info | neutral. Delta cells: signed string ('+5%', '-3%') or null — positive renders danger-red, negative renders success-green, null renders '–'. Rows must include id."
279
- }, _t = "_1b4fiav0", vt = "_1b4fiav1";
279
+ }, vt = "_1b4fiav0", yt = "_1b4fiav1";
280
280
  //#endregion
281
281
  //#region src/context/catalog/context-data-table.tsx
282
- function yt(e) {
282
+ function bt(e) {
283
283
  if (e == null || e === "" || e === "–" || e === "0" || e === "0%") return {
284
284
  text: "–",
285
285
  sign: "none"
@@ -296,27 +296,27 @@ function yt(e) {
296
296
  sign: "none"
297
297
  };
298
298
  }
299
- var bt = ({ props: e }) => /* @__PURE__ */ S("div", {
300
- className: _t,
301
- children: /* @__PURE__ */ S(ge, {
299
+ var xt = ({ props: e }) => /* @__PURE__ */ S("div", {
300
+ className: vt,
301
+ children: /* @__PURE__ */ S(_e, {
302
302
  columns: v(() => {
303
- let t = _e();
303
+ let t = ve();
304
304
  return e.columns.map((e) => t(e.key, {
305
305
  header: { label: e.header },
306
306
  ...e.sortable ? { sortable: !0 } : {},
307
307
  ...e.type === "currency" ? { type: "currency" } : {},
308
308
  ...e.type === "chip" ? { renderCell: (e) => {
309
- let t = at(e);
309
+ let t = ot(e);
310
310
  return t ? /* @__PURE__ */ S(o, {
311
311
  label: t.label,
312
312
  size: "small",
313
- color: rt(t.tone)
313
+ color: it(t.tone)
314
314
  }) : null;
315
315
  } } : {},
316
316
  ...e.type === "delta" ? { renderCell: (e) => {
317
- let { text: t, sign: n } = yt(e), r = n === "positive" ? N("danger") : n === "negative" ? N("success") : void 0;
317
+ let { text: t, sign: n } = bt(e), r = n === "positive" ? N("danger") : n === "negative" ? N("success") : void 0;
318
318
  return /* @__PURE__ */ S("span", {
319
- className: vt,
319
+ className: yt,
320
320
  style: r ? { color: r } : void 0,
321
321
  children: t
322
322
  });
@@ -330,58 +330,58 @@ var bt = ({ props: e }) => /* @__PURE__ */ S("div", {
330
330
  desc: e.defaultSortedColumn.desc ?? !1
331
331
  } } : {}
332
332
  })
333
- }), xt = w.object({
333
+ }), St = w.object({
334
334
  label: w.string(),
335
335
  url: w.string()
336
- }), St = {
337
- props: w.object({ items: w.array(xt) }),
336
+ }), Ct = {
337
+ props: w.object({ items: w.array(St) }),
338
338
  slots: [],
339
339
  description: "Vertical list of file attachments and documents. Each row shows a color-coded file-type icon (inferred from the extension: pdf, xlsx/csv, doc/docx, image, or generic) and the filename. Clicking a row opens a preview dialog. Image files render from url; other files show a large icon and a Download footer action. Use for Completed Forms and Attachments sections."
340
- }, Ct = "_1afcqze0", wt = "_1afcqze1", Tt = "_1afcqze2", Et = "_1afcqze3", Dt = "_1afcqze4", Ot = "_1afcqze5", kt = "_1afcqze6", At = "_1afcqze7", jt = "_1afcqze8";
340
+ }, wt = "_1afcqze0", Tt = "_1afcqze1", Et = "_1afcqze2", Dt = "_1afcqze3", Ot = "_1afcqze4", kt = "_1afcqze5", At = "_1afcqze6", jt = "_1afcqze7", Mt = "_1afcqze8";
341
341
  //#endregion
342
342
  //#region src/context/catalog/context-file-list.tsx
343
- function Mt(e) {
343
+ function Nt(e) {
344
344
  let t = e.toLowerCase();
345
345
  return t.endsWith(".pdf") ? "pdf" : /\.(xlsx|xls|csv|numbers)$/.test(t) ? "spreadsheet" : /\.(doc|docx|pages)$/.test(t) ? /form/i.test(t.replace(/\.[^.]+$/, "")) ? "form" : "doc" : /\.(txt|rtf|md)$/.test(t) ? "text" : /\.(mp3|wav|aac|m4a|flac|ogg)$/.test(t) ? "audio" : /\.(jpg|jpeg|png|gif|webp|heic|svg)$/.test(t) ? "image" : /form/i.test(t.replace(/\.[^.]+$/, "")) ? "form" : "generic";
346
346
  }
347
- var Nt = {
347
+ var Pt = {
348
348
  pdf: {
349
- svg: Ce,
349
+ svg: we,
350
350
  color: "#DC2626"
351
351
  },
352
352
  spreadsheet: {
353
- svg: we,
353
+ svg: Te,
354
354
  color: "#16A34A"
355
355
  },
356
356
  doc: {
357
- svg: be,
357
+ svg: xe,
358
358
  color: "#2563EB"
359
359
  },
360
360
  text: {
361
- svg: Te,
361
+ svg: Ee,
362
362
  color: "#6B7280"
363
363
  },
364
364
  form: {
365
- svg: xe,
365
+ svg: Se,
366
366
  color: "#2563EB"
367
367
  },
368
368
  audio: {
369
- svg: ye,
369
+ svg: be,
370
370
  color: "#6B7280"
371
371
  },
372
372
  image: {
373
- svg: ve,
373
+ svg: ye,
374
374
  color: "#374151"
375
375
  },
376
376
  generic: {
377
- svg: Se,
377
+ svg: Ce,
378
378
  color: "#6B7280"
379
379
  }
380
- }, Pt = { "--a2-mod-icon-font-size": "80px" };
381
- function Ft({ kind: e }) {
382
- let { svg: t, color: n } = Nt[e];
380
+ }, Ft = { "--a2-mod-icon-font-size": "80px" };
381
+ function It({ kind: e }) {
382
+ let { svg: t, color: n } = Pt[e];
383
383
  return /* @__PURE__ */ S("div", {
384
- className: Et,
384
+ className: Dt,
385
385
  "aria-hidden": "true",
386
386
  children: /* @__PURE__ */ S(d, {
387
387
  svg: t,
@@ -390,49 +390,49 @@ function Ft({ kind: e }) {
390
390
  })
391
391
  });
392
392
  }
393
- function It(e, t) {
393
+ function Lt(e, t) {
394
394
  let n = document.createElement("a");
395
395
  n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), n.remove();
396
396
  }
397
- function Lt({ label: e }) {
397
+ function Rt({ label: e }) {
398
398
  return /* @__PURE__ */ S(h, {
399
399
  variant: "body",
400
400
  size: "regular",
401
401
  text: e,
402
- className: jt
402
+ className: Mt
403
403
  });
404
404
  }
405
- function Rt({ item: e, kind: t }) {
406
- let { svg: n, color: r } = Nt[t];
405
+ function zt({ item: e, kind: t }) {
406
+ let { svg: n, color: r } = Pt[t];
407
407
  return /* @__PURE__ */ C("div", {
408
- className: Dt,
408
+ className: Ot,
409
409
  children: [/* @__PURE__ */ S("div", {
410
- className: Ot,
410
+ className: kt,
411
411
  children: t === "image" ? /* @__PURE__ */ S("img", {
412
412
  src: e.url,
413
413
  alt: e.label,
414
- className: kt
414
+ className: At
415
415
  }) : /* @__PURE__ */ S("div", {
416
- className: At,
416
+ className: jt,
417
417
  children: /* @__PURE__ */ S(d, {
418
418
  svg: n,
419
419
  color: r,
420
- style: Pt
420
+ style: Ft
421
421
  })
422
422
  })
423
- }), /* @__PURE__ */ S(Lt, { label: e.label })]
423
+ }), /* @__PURE__ */ S(Rt, { label: e.label })]
424
424
  });
425
425
  }
426
- function zt({ item: e, onPreview: t }) {
427
- let n = Mt(e.label);
426
+ function Bt({ item: e, onPreview: t }) {
427
+ let n = Nt(e.label);
428
428
  return /* @__PURE__ */ S(m, {
429
- className: wt,
429
+ className: Tt,
430
430
  padding: "snug",
431
431
  onPress: t,
432
432
  label: `Preview ${e.label}`,
433
433
  content: /* @__PURE__ */ C("div", {
434
- className: Tt,
435
- children: [/* @__PURE__ */ S(Ft, { kind: n }), /* @__PURE__ */ S(h, {
434
+ className: Et,
435
+ children: [/* @__PURE__ */ S(It, { kind: n }), /* @__PURE__ */ S(h, {
436
436
  variant: "body",
437
437
  size: "compact",
438
438
  text: e.label
@@ -440,14 +440,14 @@ function zt({ item: e, onPreview: t }) {
440
440
  })
441
441
  });
442
442
  }
443
- function Bt({ item: e }) {
444
- let [t, n] = b(!1), r = Mt(e.label);
445
- return /* @__PURE__ */ C(he, { children: [/* @__PURE__ */ S(zt, {
443
+ function Vt({ item: e }) {
444
+ let [t, n] = b(!1), r = Nt(e.label);
445
+ return /* @__PURE__ */ C(ge, { children: [/* @__PURE__ */ S(Bt, {
446
446
  item: e,
447
447
  onPreview: () => n(!0)
448
448
  }), /* @__PURE__ */ S(le, {
449
449
  title: "View Attachment",
450
- content: /* @__PURE__ */ S(Rt, {
450
+ content: /* @__PURE__ */ S(zt, {
451
451
  item: e,
452
452
  kind: r
453
453
  }),
@@ -455,14 +455,14 @@ function Bt({ item: e }) {
455
455
  onOpenChange: n,
456
456
  ...r === "image" ? {} : { primaryAction: {
457
457
  label: "Download",
458
- onPress: () => It(e.url, e.label)
458
+ onPress: () => Lt(e.url, e.label)
459
459
  } }
460
460
  })] });
461
461
  }
462
- var Vt = ({ props: e }) => /* @__PURE__ */ S("div", {
463
- className: Ct,
464
- children: e.items.map((e, t) => /* @__PURE__ */ S(Bt, { item: e }, `${e.label}-${t}`))
465
- }), Ht = w.object({
462
+ var Ht = ({ props: e }) => /* @__PURE__ */ S("div", {
463
+ className: wt,
464
+ children: e.items.map((e, t) => /* @__PURE__ */ S(Vt, { item: e }, `${e.label}-${t}`))
465
+ }), Ut = w.object({
466
466
  title: w.string(),
467
467
  identifier: w.string().optional(),
468
468
  identifierHref: w.string().optional(),
@@ -470,23 +470,23 @@ var Vt = ({ props: e }) => /* @__PURE__ */ S("div", {
470
470
  callout: w.string().optional(),
471
471
  calloutTone: w.enum(M).optional(),
472
472
  calloutLabel: w.string().optional()
473
- }), Ut = {
474
- props: w.object({ items: w.array(Ht) }),
473
+ }), Wt = {
474
+ props: w.object({ items: w.array(Ut) }),
475
475
  slots: [],
476
476
  description: "Flat list for timesheets and recent jobs. Each item has a required title, optional identifier link + meta on the left, and optional callout + calloutLabel on the right. For grouped procurement records with aligned columns, use ContextTabularList instead."
477
- }, Wt = "blgld0", Gt = "blgld1", Kt = "blgld2", qt = "blgld3", Jt = "blgld4", Yt = "blgld5", Xt = "blgld6", Zt = "blgld7";
477
+ }, Gt = "blgld0", Kt = "blgld1", qt = "blgld2", Jt = "blgld3", Yt = "blgld4", Xt = "blgld5", Zt = "blgld6", Qt = "blgld7";
478
478
  //#endregion
479
479
  //#region src/context/catalog/context-list.tsx
480
- function Qt({ item: e }) {
480
+ function $t({ item: e }) {
481
481
  let t = e.calloutTone ? N(e.calloutTone) : void 0, n = e.identifier, r = e.callout != null || e.calloutLabel != null;
482
482
  return /* @__PURE__ */ C("div", {
483
- className: qt,
483
+ className: Jt,
484
484
  children: [/* @__PURE__ */ C("div", {
485
- className: Jt,
485
+ className: Yt,
486
486
  children: [/* @__PURE__ */ C("div", {
487
- className: Yt,
487
+ className: Xt,
488
488
  children: [
489
- n && e.identifierHref ? /* @__PURE__ */ S(ue, {
489
+ n && e.identifierHref ? /* @__PURE__ */ S(de, {
490
490
  href: e.identifierHref,
491
491
  target: "_blank",
492
492
  text: n
@@ -497,7 +497,7 @@ function Qt({ item: e }) {
497
497
  }) : null,
498
498
  n ? /* @__PURE__ */ S("span", {
499
499
  "aria-hidden": "true",
500
- className: Xt
500
+ className: Zt
501
501
  }) : null,
502
502
  /* @__PURE__ */ S(h, {
503
503
  variant: "body",
@@ -509,10 +509,10 @@ function Qt({ item: e }) {
509
509
  variant: "body",
510
510
  size: "fine",
511
511
  text: e.meta,
512
- className: Gt
512
+ className: Kt
513
513
  }) : null]
514
514
  }), r ? /* @__PURE__ */ C("div", {
515
- className: Zt,
515
+ className: Qt,
516
516
  children: [e.callout ? /* @__PURE__ */ S(h, {
517
517
  variant: "headline",
518
518
  el: "h6",
@@ -522,29 +522,29 @@ function Qt({ item: e }) {
522
522
  }) : null, e.calloutLabel ? /* @__PURE__ */ S(h, {
523
523
  variant: "eyebrow",
524
524
  text: e.calloutLabel,
525
- className: Gt
525
+ className: Kt
526
526
  }) : null]
527
527
  }) : null]
528
528
  });
529
529
  }
530
- var $t = ({ props: e }) => /* @__PURE__ */ S("div", {
531
- className: Wt,
530
+ var en = ({ props: e }) => /* @__PURE__ */ S("div", {
531
+ className: Gt,
532
532
  children: e.items.map((e, t) => /* @__PURE__ */ S("div", {
533
- className: Kt,
534
- children: /* @__PURE__ */ S(Qt, { item: e })
533
+ className: qt,
534
+ children: /* @__PURE__ */ S($t, { item: e })
535
535
  }, e.identifier ?? e.title ?? t))
536
- }), en = w.object({
536
+ }), tn = w.object({
537
537
  label: w.string(),
538
538
  value: w.string(),
539
539
  tone: w.enum(M).optional()
540
- }), tn = {
540
+ }), nn = {
541
541
  props: w.object({
542
- items: w.array(en),
542
+ items: w.array(tn),
543
543
  columns: w.enum(["3", "4"]).optional()
544
544
  }),
545
545
  slots: [],
546
546
  description: "KPI grid with label and value pairs. Optional columns: 3 (default) or 4. Each item supports an optional tone (danger | warning | success | info | neutral) to color the value text."
547
- }, nn = j({
547
+ }, rn = j({
548
548
  defaultClassName: "_16tl57e0",
549
549
  variantClassNames: { columns: {
550
550
  3: "_16tl57e1",
@@ -552,16 +552,16 @@ var $t = ({ props: e }) => /* @__PURE__ */ S("div", {
552
552
  } },
553
553
  defaultVariants: { columns: "3" },
554
554
  compoundVariants: []
555
- }), rn = "_16tl57e3", an = "_16tl57e4", on = ({ props: e }) => /* @__PURE__ */ S("div", {
556
- className: nn({ columns: e.columns === "4" ? "4" : "3" }),
555
+ }), an = "_16tl57e3", on = "_16tl57e4", sn = ({ props: e }) => /* @__PURE__ */ S("div", {
556
+ className: rn({ columns: e.columns === "4" ? "4" : "3" }),
557
557
  children: e.items.map((e) => {
558
558
  let t = e.tone ? N(e.tone) : void 0;
559
559
  return /* @__PURE__ */ C("div", {
560
- className: an,
560
+ className: on,
561
561
  children: [/* @__PURE__ */ S(h, {
562
562
  variant: "eyebrow",
563
563
  text: e.label.toUpperCase(),
564
- className: rn
564
+ className: an
565
565
  }), /* @__PURE__ */ S(h, {
566
566
  variant: "headline",
567
567
  el: "h6",
@@ -571,8 +571,8 @@ var $t = ({ props: e }) => /* @__PURE__ */ S("div", {
571
571
  })]
572
572
  }, e.label);
573
573
  })
574
- }), sn = "_2pn4ri0", cn = ({ summary: e }) => /* @__PURE__ */ S("div", {
575
- className: sn,
574
+ }), cn = "_2pn4ri0", ln = ({ summary: e }) => /* @__PURE__ */ S("div", {
575
+ className: cn,
576
576
  "data-carto": "context-ai-summary",
577
577
  children: /* @__PURE__ */ S(m, {
578
578
  highlighted: !0,
@@ -585,27 +585,27 @@ var $t = ({ props: e }) => /* @__PURE__ */ S("div", {
585
585
  text: e
586
586
  })
587
587
  })
588
- }), ln = "_4l9lye0", un = "_4l9lye1", dn = "_4l9lye2", fn = "_4l9lye3", P = "_4l9lye4", pn = w.object({
588
+ }), un = "_4l9lye0", dn = "_4l9lye1", fn = "_4l9lye2", pn = "_4l9lye3", P = "_4l9lye4", mn = w.object({
589
589
  category: w.string().optional(),
590
590
  body: w.string(),
591
591
  author: w.string().optional(),
592
592
  date: w.string().optional(),
593
593
  truncate: w.boolean().optional()
594
- }), mn = {
594
+ }), hn = {
595
595
  props: w.object({
596
596
  summary: w.string().optional(),
597
- items: w.array(pn)
597
+ items: w.array(mn)
598
598
  }),
599
599
  slots: [],
600
600
  description: "Notes & Summaries list. Optional summary renders an AI-highlighted box at the top. Each item shows an optional category eyebrow (e.g. 'JOB SUMMARY'), body text, and optional author + date at top-right. Set truncate: true on long items to clamp to ~3 lines with an inline More/Less expand."
601
601
  };
602
602
  //#endregion
603
603
  //#region src/context/catalog/context-note-list.tsx
604
- function hn({ item: e }) {
604
+ function gn({ item: e }) {
605
605
  return /* @__PURE__ */ C("div", {
606
- className: dn,
606
+ className: fn,
607
607
  children: [e.category || e.author || e.date ? /* @__PURE__ */ C("div", {
608
- className: fn,
608
+ className: pn,
609
609
  children: [e.category ? /* @__PURE__ */ S(h, {
610
610
  variant: "eyebrow",
611
611
  text: e.category,
@@ -628,20 +628,20 @@ function hn({ item: e }) {
628
628
  })]
629
629
  });
630
630
  }
631
- var gn = ({ props: e }) => /* @__PURE__ */ C("div", {
632
- className: ln,
631
+ var _n = ({ props: e }) => /* @__PURE__ */ C("div", {
632
+ className: un,
633
633
  children: [e.summary ? /* @__PURE__ */ S("div", {
634
- className: un,
635
- children: /* @__PURE__ */ S(cn, { summary: e.summary })
636
- }) : null, e.items.map((e, t) => /* @__PURE__ */ S(hn, { item: e }, `${e.category ?? ""}-${t}`))]
637
- }), _n = {
634
+ className: dn,
635
+ children: /* @__PURE__ */ S(ln, { summary: e.summary })
636
+ }) : null, e.items.map((e, t) => /* @__PURE__ */ S(gn, { item: e }, `${e.category ?? ""}-${t}`))]
637
+ }), vn = {
638
638
  props: w.object({ summary: w.string() }),
639
639
  slots: [],
640
640
  description: "AI-generated overview summary for the Context panel. Optional first child of ContextPanel. Renders as a plain section (not a card): Overview headline with sparkle icon and body text. Leaf node — no children."
641
- }, vn = "_1ysu3qn0", yn = "_1ysu3qn1", bn = ({ props: t }) => /* @__PURE__ */ C("section", {
642
- className: vn,
641
+ }, yn = "_1ysu3qn0", bn = "_1ysu3qn1", xn = ({ props: t }) => /* @__PURE__ */ C("section", {
642
+ className: yn,
643
643
  children: [/* @__PURE__ */ C("div", {
644
- className: yn,
644
+ className: bn,
645
645
  children: [/* @__PURE__ */ S(h, {
646
646
  variant: "headline",
647
647
  el: "h2",
@@ -656,55 +656,55 @@ var gn = ({ props: e }) => /* @__PURE__ */ C("div", {
656
656
  size: "regular",
657
657
  text: t.summary
658
658
  })]
659
- }), xn = {
659
+ }), Sn = {
660
660
  props: w.object({}),
661
661
  slots: ["default"],
662
662
  description: "Root container for the Context panel. MUST be the spec root. Children MUST only be ContextOverview (optional, first) followed by one or more ContextCard components."
663
- }, F = "_19nljxi0", Sn = ({ children: e }) => /* @__PURE__ */ S("div", {
663
+ }, F = "_19nljxi0", Cn = ({ children: e }) => /* @__PURE__ */ S("div", {
664
664
  className: F,
665
665
  children: g.toArray(e).filter(Boolean)
666
- }), Cn = w.object({
666
+ }), wn = w.object({
667
667
  label: w.string(),
668
668
  value: w.string()
669
- }), wn = w.object({
669
+ }), Tn = w.object({
670
670
  eyebrow: w.string().optional(),
671
671
  identifier: w.string().optional(),
672
672
  identifierHref: w.string().optional(),
673
- fields: w.array(Cn)
674
- }), Tn = w.object({
673
+ fields: w.array(wn)
674
+ }), En = w.object({
675
675
  label: w.string(),
676
- items: w.array(wn)
677
- }), En = {
678
- props: w.object({ groups: w.array(Tn) }),
676
+ items: w.array(Tn)
677
+ }), Dn = {
678
+ props: w.object({ groups: w.array(En) }),
679
679
  slots: [],
680
680
  description: "Grouped tabular list for procurement-style records. Each group has a vendor label and rows with an optional eyebrow + identifier in the first column and additional label/value field columns (e.g. DATE, AMOUNT). Use inside ContextCard for Procurement sections."
681
- }, Dn = "_5kl5rv0", On = "_5kl5rv1", kn = "_5kl5rv2", I = "_5kl5rv3", An = "_5kl5rv4", jn = "_5kl5rv5", Mn = "_5kl5rv6";
681
+ }, On = "_5kl5rv0", kn = "_5kl5rv1", An = "_5kl5rv2", I = "_5kl5rv3", jn = "_5kl5rv4", Mn = "_5kl5rv5", Nn = "_5kl5rv6";
682
682
  //#endregion
683
683
  //#region src/context/catalog/context-tabular-list.tsx
684
- function Nn(e) {
684
+ function Pn(e) {
685
685
  let t = e + 1;
686
686
  if (t <= 1) return "max-content";
687
- let n = `minmax(${Ee.size[400]}, 1fr)`;
687
+ let n = `minmax(${De.size[400]}, 1fr)`;
688
688
  return Array(t).fill("max-content").join(` ${n} `);
689
689
  }
690
- function Pn(e) {
690
+ function Fn(e) {
691
691
  return e * 2 + 1;
692
692
  }
693
- function Fn({ item: e, gridRow: t }) {
693
+ function In({ item: e, gridRow: t }) {
694
694
  let n = (e) => ({
695
695
  style: {
696
- gridColumn: Pn(e),
696
+ gridColumn: Fn(e),
697
697
  gridRow: t
698
698
  },
699
- className: Mn
699
+ className: Nn
700
700
  });
701
- return /* @__PURE__ */ C(he, { children: [/* @__PURE__ */ C("div", {
701
+ return /* @__PURE__ */ C(ge, { children: [/* @__PURE__ */ C("div", {
702
702
  ...n(0),
703
703
  children: [e.eyebrow ? /* @__PURE__ */ S(h, {
704
704
  variant: "eyebrow",
705
705
  text: e.eyebrow,
706
706
  className: I
707
- }) : null, e.identifier && e.identifierHref ? /* @__PURE__ */ S(ue, {
707
+ }) : null, e.identifier && e.identifierHref ? /* @__PURE__ */ S(de, {
708
708
  href: e.identifierHref,
709
709
  target: "_blank",
710
710
  text: e.identifier
@@ -726,14 +726,14 @@ function Fn({ item: e, gridRow: t }) {
726
726
  })]
727
727
  }, e.label))] });
728
728
  }
729
- var In = ({ props: e }) => /* @__PURE__ */ S("div", {
730
- className: Dn,
729
+ var Ln = ({ props: e }) => /* @__PURE__ */ S("div", {
730
+ className: On,
731
731
  children: e.groups.map((e) => {
732
732
  let t = e.items[0]?.fields.length ?? 0;
733
733
  return /* @__PURE__ */ C("div", {
734
- className: On,
734
+ className: kn,
735
735
  children: [/* @__PURE__ */ S("div", {
736
- className: kn,
736
+ className: An,
737
737
  children: /* @__PURE__ */ S(h, {
738
738
  variant: "headline",
739
739
  el: "h5",
@@ -741,14 +741,14 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
741
741
  text: e.label
742
742
  })
743
743
  }), /* @__PURE__ */ S("div", {
744
- className: An,
745
- style: { gridTemplateColumns: Nn(t) },
744
+ className: jn,
745
+ style: { gridTemplateColumns: Pn(t) },
746
746
  children: e.items.map((e, t) => {
747
747
  let n = t * 2 + 1;
748
- return /* @__PURE__ */ C(pe, { children: [t > 0 ? /* @__PURE__ */ S("div", {
749
- className: jn,
748
+ return /* @__PURE__ */ C(me, { children: [t > 0 ? /* @__PURE__ */ S("div", {
749
+ className: Mn,
750
750
  style: { gridRow: t * 2 }
751
- }) : null, /* @__PURE__ */ S(Fn, {
751
+ }) : null, /* @__PURE__ */ S(In, {
752
752
  item: e,
753
753
  gridRow: n
754
754
  })] }, e.identifier ?? e.eyebrow ?? t);
@@ -757,16 +757,16 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
757
757
  }, e.label);
758
758
  })
759
759
  }), L = {
760
- ContextPanel: xn,
761
- ContextOverview: _n,
762
- ContextCard: ut
760
+ ContextPanel: Sn,
761
+ ContextOverview: vn,
762
+ ContextCard: dt
763
763
  }, R = {
764
- ContextNoteList: mn,
765
- ContextMetricGrid: tn,
766
- ContextDataTable: gt,
767
- ContextList: Ut,
768
- ContextTabularList: En,
769
- ContextFileList: St
764
+ ContextNoteList: hn,
765
+ ContextMetricGrid: nn,
766
+ ContextDataTable: _t,
767
+ ContextList: Wt,
768
+ ContextTabularList: Dn,
769
+ ContextFileList: Ct
770
770
  }, z = {
771
771
  "atlas.submitUserAction": {
772
772
  params: w.object({
@@ -786,11 +786,11 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
786
786
  }),
787
787
  description: "Invoke a tool on the active artifact panel app (an MCP-backed MFE). args is the tool argument payload; if omitted the current form state is sent."
788
788
  }
789
- }, Ln = {
789
+ }, Rn = {
790
790
  "atlas.submitUserAction": async (e) => {},
791
791
  "atlas.navigate": async (e) => {},
792
792
  "atlas.toolCall": async (e) => {}
793
- }, Rn = {
793
+ }, zn = {
794
794
  props: w.object({
795
795
  title: w.string(),
796
796
  status: w.enum([
@@ -805,7 +805,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
805
805
  slots: ["default"],
806
806
  events: ["close"],
807
807
  description: "Inline notification banner with a required title. status: info (default) | success | warning | danger — danger for errors, warning for cautions, success for confirmations. Put the main message in the alert's children (rendered below the title). dismissible: true adds a close button that emits a \"close\" event."
808
- }, zn = {
808
+ }, Bn = {
809
809
  props: w.object({
810
810
  data: w.array(w.object({
811
811
  category: w.string(),
@@ -822,7 +822,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
822
822
  }),
823
823
  slots: [],
824
824
  description: "Bar chart (vertical or horizontal) with Anvil2 theme. data: [{category, value}]. theme: monochrome (default, ≤4 vars), categorical (5-9 distinct), semantic (success/neutral/warning/danger order). unit: tooltip suffix."
825
- }, Bn = {
825
+ }, Vn = {
826
826
  props: w.object({
827
827
  label: w.string(),
828
828
  appearance: w.enum([
@@ -844,7 +844,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
844
844
  slots: [],
845
845
  events: ["press"],
846
846
  description: "Clickable button. Emits a \"press\" event when clicked; inside a form the host treats press as a submit and uses the element key as the actionId, so no explicit on.press wiring is needed for form submits. appearance: primary | secondary (default) | ghost | danger (destructive actions like delete/cancel). size: xsmall | small | medium (default) | large. loading: true shows a spinner and blocks interaction. disabled: true prevents interaction. badge: optional notification count shown as a superscript (e.g. \"3\", \"99+\"); use an empty string for a dot-only indicator."
847
- }, Vn = {
847
+ }, Hn = {
848
848
  props: w.object({
849
849
  title: w.string().optional(),
850
850
  description: w.string().optional(),
@@ -859,7 +859,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
859
859
  }),
860
860
  slots: ["default"],
861
861
  description: "White surface that groups a logical section of related content. title: optional headline rendered at the top of the card. description: optional subdued line below the title. Children render below the header and are stacked vertically with consistent spacing — you do not need to wrap them in a Flex. Prefer the built-in title/description over standalone Text children for the heading. background: strong | stronger for nested/elevated surfaces. padding: 0 | xsmall | small | medium (default) | large. Do not nest a Card inside another Card."
862
- }, Hn = {
862
+ }, Un = {
863
863
  props: w.object({
864
864
  label: w.string(),
865
865
  checked: w.boolean().optional(),
@@ -868,7 +868,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
868
868
  slots: [],
869
869
  events: ["change"],
870
870
  description: "Checkbox for selecting zero or more independent options that are submitted with a form (one Checkbox per option). For a single on/off setting with immediate effect prefer Switch. Bind state with $bindState on checked; emits a \"change\" event when toggled. disabled: true prevents toggling."
871
- }, Un = {
871
+ }, Wn = {
872
872
  props: w.object({
873
873
  label: w.string(),
874
874
  size: w.enum(["small", "medium"]).optional(),
@@ -883,7 +883,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
883
883
  slots: [],
884
884
  events: ["close"],
885
885
  description: "Inline label pill for metadata, tags, or categories — use for job statuses, not notification counts (use a Button/Link badge prop for those). size: small | medium (default). color: any CSS color. icon: optional leading status icon. removable: true adds a close button that emits a \"close\" event (ignored when size=small)."
886
- }, Wn = {
886
+ }, Gn = {
887
887
  props: w.object({
888
888
  vertical: w.boolean().optional(),
889
889
  spacing: w.enum([
@@ -906,7 +906,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
906
906
  }),
907
907
  slots: [],
908
908
  description: "Horizontal (default) or vertical rule that separates content sections. vertical: true for a vertical separator between side-by-side content. spacing (space around the divider, ~4px per step): 0 (default) | half | 1–6 | 8 | 12. alignContent: alignment of any divider content (start | center | end). Place between logical sections — not as a top/bottom border of a container."
909
- }, Gn = {
909
+ }, Kn = {
910
910
  props: w.object({
911
911
  data: w.array(w.object({
912
912
  category: w.string(),
@@ -923,7 +923,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
923
923
  }),
924
924
  slots: [],
925
925
  description: "Donut chart with optional legend and Anvil2 theme. data: [{category, value}]. theme: monochrome (≤4 vars), categorical (5-9 distinct), semantic (status values)."
926
- }, Kn = {
926
+ }, qn = {
927
927
  props: w.object({
928
928
  direction: w.enum(["row", "column"]).optional(),
929
929
  gap: w.enum([
@@ -973,7 +973,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
973
973
  }),
974
974
  slots: ["default"],
975
975
  description: "Flex layout container. direction: row (default) | column — always set column when stacking children vertically. gap (spacing token, ~4px per step): half=2px 1=4px 2=8px 3=12px 4=16px 5=20px 6=24px 8=32px 12=48px. alignItems: cross-axis alignment of children. justifyContent: main-axis distribution. When this Flex is itself a child of another Flex, use grow (1=fill available space), shrink, basis (CSS flex-basis e.g. \"200px\"), and alignSelf to control how it flexes."
976
- }, B = {
976
+ }, Jn = {
977
977
  props: w.object({
978
978
  templateColumns: w.string().optional(),
979
979
  gap: w.enum([
@@ -992,7 +992,75 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
992
992
  }),
993
993
  slots: ["default"],
994
994
  description: "CSS Grid layout. templateColumns: CSS grid-template-columns value — \"repeat(3, 1fr)\" for equal columns, \"200px 1fr\" for fixed+flex two-column (e.g. key-value tables), \"1fr 1fr 80px\" for multi-column tables. Children flow into grid cells left-to-right, top-to-bottom. gap (spacing token, ~4px per step): 1=4px 2=8px … 6=24px 8=32px 12=48px (default 2). bordered: true renders a bordered table with row separators and cell padding — use for key-value and data tables."
995
- }, qn = {
995
+ }, Yn = w.object({
996
+ from: w.string().nullable().optional(),
997
+ to: w.string().nullable().optional()
998
+ }).refine((e) => !("type" in e)), Xn = w.discriminatedUnion("type", [
999
+ w.object({
1000
+ type: w.literal("text"),
1001
+ value: w.string()
1002
+ }),
1003
+ w.object({
1004
+ type: w.literal("diff"),
1005
+ from: w.string().nullable().optional(),
1006
+ to: w.string().nullable().optional()
1007
+ }),
1008
+ w.object({
1009
+ type: w.literal("addition"),
1010
+ value: w.string()
1011
+ })
1012
+ ]), Zn = w.union([
1013
+ w.string(),
1014
+ Xn,
1015
+ Yn
1016
+ ]), Qn = w.object({
1017
+ key: w.string(),
1018
+ header: w.string(),
1019
+ minWidth: w.enum([
1020
+ "compact",
1021
+ "standard",
1022
+ "wide"
1023
+ ]).optional()
1024
+ }), $n = w.record(w.string(), Zn).and(w.object({ id: w.string() })), er = w.object({
1025
+ label: w.string(),
1026
+ columns: w.array(Qn),
1027
+ data: w.array($n),
1028
+ reason: w.string().optional()
1029
+ }), tr = w.object({
1030
+ id: w.string(),
1031
+ label: w.string(),
1032
+ from: w.string().nullable().optional(),
1033
+ to: w.string().nullable().optional(),
1034
+ reason: w.string().optional()
1035
+ }), nr = w.object({
1036
+ type: w.literal("single"),
1037
+ changes: w.array(tr)
1038
+ }), rr = w.object({
1039
+ type: w.literal("table"),
1040
+ label: w.string(),
1041
+ changeTables: w.array(er)
1042
+ }), ir = w.discriminatedUnion("type", [nr, rr]), ar = {
1043
+ props: w.object({
1044
+ state: w.enum([
1045
+ "default",
1046
+ "accepted",
1047
+ "rejected",
1048
+ "skipped"
1049
+ ]).optional(),
1050
+ referenceLabel: w.string(),
1051
+ referenceHref: w.string().optional(),
1052
+ changeSections: w.array(ir),
1053
+ appliedChangeIds: w.array(w.string()).optional(),
1054
+ defaultExpanded: w.boolean().optional()
1055
+ }),
1056
+ slots: [],
1057
+ events: [
1058
+ "apply",
1059
+ "edit",
1060
+ "dismiss"
1061
+ ],
1062
+ description: "Suggested-change review card for Atlas agent chat. Use in the default state while the user can accept, edit, or dismiss AI-proposed updates to an estimate/invoice. state: default (selectable diffs + actions) | accepted (collapsible accepted summary) | rejected | skipped (collapsible read-only summaries). Bind state and appliedChangeIds with $bindState so apply/reject can update lifecycle state locally. Checkbox selection is managed internally and defaults to all single-change and table-row ids selected. changeSections[] defines ordered body content: type single (changes[] with label/from/to/reason) or type table (label + changeTables[] with editable labels, columns[{ key, header, minWidth? }], data, optional reason). Column minWidth presets: compact (codes/SKUs/quantities) | standard (names/dates) | wide (descriptions/diffs) — omit when flexible. Table cell rendering is defined per cell via string (plain text), { type: text | diff | addition, ... }, or legacy { from, to } diff shorthand. appliedChangeIds filters accepted-state content. referenceHref opens the linked record in a new tab. Emits apply, edit, and dismiss."
1063
+ }, or = {
996
1064
  props: w.object({
997
1065
  name: w.enum([
998
1066
  "check-circle",
@@ -1009,7 +1077,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1009
1077
  }),
1010
1078
  slots: [],
1011
1079
  description: "Small status icon. name (only these three are available): check-circle=completed/success checkmark, in-progress=partial circle (active/working), radio-button-unchecked=empty circle (pending/not started). size: small | medium (default) | large | xlarge. color: any CSS color (defaults to the current text color). Commonly paired with status Text in lists and checklists."
1012
- }, Jn = {
1080
+ }, sr = {
1013
1081
  props: w.object({
1014
1082
  label: w.string(),
1015
1083
  placeholder: w.string().optional(),
@@ -1027,7 +1095,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1027
1095
  slots: [],
1028
1096
  events: ["change"],
1029
1097
  description: "Free-text input field for user-typed values (names, notes, numbers, etc). type: text (default), password (masked), email, tel (phone), url, number. Bind value with $bindState so the typed value is captured in state; emits a \"change\" event on every keystroke. Prefer this over Listbox when the value is not from a fixed list. disabled: true prevents editing."
1030
- }, Yn = {
1098
+ }, B = {
1031
1099
  props: w.object({
1032
1100
  data: w.array(w.record(w.string(), w.union([w.string(), w.number()]))),
1033
1101
  series: w.array(w.string()).optional(),
@@ -1043,7 +1111,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1043
1111
  }),
1044
1112
  slots: [],
1045
1113
  description: "Line chart for tracking trends over time with optional multiple series. data: array of objects with a \"category\" key (x-axis label) and one numeric key per series (e.g. [{category: \"Jan\", revenue: 100, cost: 60}]). series: explicit list of series keys to plot (inferred from data keys if omitted, max 6). theme: monochrome (1-2 series), categorical (3-6 distinct). showLegend: true when multiple series (default true for 2+ series). showDots: true adds data-point markers (default true). unit: tooltip value suffix."
1046
- }, Xn = {
1114
+ }, cr = {
1047
1115
  props: w.object({
1048
1116
  label: w.string(),
1049
1117
  href: w.string(),
@@ -1055,7 +1123,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1055
1123
  slots: [],
1056
1124
  events: ["press"],
1057
1125
  description: "Inline navigation link (renders an <a>). Emits a \"press\" event when clicked — handle navigation in on.press; href and target are inputs for the host/router rather than native browser navigation. href: destination URL for the host/router. appearance: primary (default) | secondary. target: _blank marks the link as external (shows external-link icon) and lets the host open a new tab if desired. ghost: quieter styling (primary only). badge: optional notification count shown as a superscript (e.g. \"5\"); use an empty string for a dot-only indicator."
1058
- }, Zn = {
1126
+ }, lr = {
1059
1127
  props: w.object({
1060
1128
  label: w.string(),
1061
1129
  options: w.array(w.object({
@@ -1068,7 +1136,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1068
1136
  slots: [],
1069
1137
  events: ["change"],
1070
1138
  description: "Single-select dropdown for choosing one value from a fixed list of known options. options: [{ value, label }] — value is stored in state, label is shown. Bind the selection with $bindState on value; emits a \"change\" event on selection. Use only when options are predefined; for free-text user input use Input, and for 2–7 visible mutually-exclusive choices prefer RadioGroup. disabled: true prevents selection."
1071
- }, Qn = {
1139
+ }, ur = {
1072
1140
  props: w.object({
1073
1141
  label: w.string(),
1074
1142
  value: w.number().min(0).max(100).optional(),
@@ -1077,7 +1145,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1077
1145
  }),
1078
1146
  slots: [],
1079
1147
  description: "Horizontal progress bar showing task completion. label is required (the accessible name for the bar). value: 0–100 percentage filled. Omit value and set indeterminate=true when progress cannot be measured (do not set both). description: optional helper text shown below the bar."
1080
- }, $n = {
1148
+ }, dr = {
1081
1149
  props: w.object({
1082
1150
  label: w.string(),
1083
1151
  options: w.array(w.object({
@@ -1090,7 +1158,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1090
1158
  slots: [],
1091
1159
  events: ["change"],
1092
1160
  description: "Group of radio buttons for picking one option from 2–7 visible mutually-exclusive choices. options: [{ value, label }]. Bind the selection with $bindState on value; emits a \"change\" event on selection. For longer option lists use Listbox. disabled: true prevents selection."
1093
- }, er = {
1161
+ }, fr = {
1094
1162
  props: w.object({
1095
1163
  label: w.string(),
1096
1164
  checked: w.boolean().optional(),
@@ -1099,7 +1167,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1099
1167
  slots: [],
1100
1168
  events: ["change"],
1101
1169
  description: "Toggle switch for a single binary on/off setting with immediate effect (no form submit). Prefer over Checkbox for enabling/disabling features. Bind state with $bindState on checked; emits a \"change\" event when toggled. disabled: true prevents toggling."
1102
- }, tr = {
1170
+ }, pr = {
1103
1171
  props: w.object({
1104
1172
  content: w.string(),
1105
1173
  variant: w.enum([
@@ -1117,7 +1185,7 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1117
1185
  }),
1118
1186
  slots: [],
1119
1187
  description: "Display text. variant: headline=bold title, eyebrow=small uppercase label, body=default (default variant). size: small | medium (default) | large | xlarge — applies to headline and body only (ignored for eyebrow). subdued: deemphasized secondary text (body only). Use eyebrow+headline pairs for KPI/stat labels above values."
1120
- }, nr = {
1188
+ }, mr = {
1121
1189
  props: w.object({
1122
1190
  label: w.string(),
1123
1191
  placeholder: w.string().optional(),
@@ -1131,26 +1199,27 @@ var In = ({ props: e }) => /* @__PURE__ */ S("div", {
1131
1199
  events: ["change"],
1132
1200
  description: "Multi-line free-text input for long values (notes, descriptions, email body). Bind value with $bindState; emits a \"change\" event on every keystroke. rows: visible row count (default 3). description: helper text below the field. moreInfo: tooltip text on the label. disabled: true prevents editing."
1133
1201
  }, V = {
1134
- Text: tr,
1135
- Card: Vn,
1136
- Flex: Kn,
1137
- Grid: B,
1138
- Alert: Rn,
1139
- Divider: Wn,
1140
- Icon: qn,
1141
- Chip: Un,
1142
- Link: Xn,
1143
- ProgressBar: Qn,
1144
- BarChart: zn,
1145
- DonutChart: Gn,
1146
- LineChart: Yn,
1147
- Button: Bn,
1148
- Checkbox: Hn,
1149
- Input: Jn,
1150
- Textarea: nr,
1151
- Listbox: Zn,
1152
- RadioGroup: $n,
1153
- Switch: er
1202
+ Text: pr,
1203
+ Card: Hn,
1204
+ Flex: qn,
1205
+ Grid: Jn,
1206
+ Alert: zn,
1207
+ Divider: Gn,
1208
+ Icon: or,
1209
+ Chip: Wn,
1210
+ Link: cr,
1211
+ ProgressBar: ur,
1212
+ BarChart: Bn,
1213
+ DonutChart: Kn,
1214
+ LineChart: B,
1215
+ Button: Vn,
1216
+ Checkbox: Un,
1217
+ Input: sr,
1218
+ Textarea: mr,
1219
+ Listbox: lr,
1220
+ RadioGroup: dr,
1221
+ Switch: fr,
1222
+ GuidanceCard: ar
1154
1223
  };
1155
1224
  //#endregion
1156
1225
  //#region src/scoped-catalog.ts
@@ -1174,10 +1243,10 @@ function H(e = {}) {
1174
1243
  }
1175
1244
  return i;
1176
1245
  }
1177
- function rr(e) {
1246
+ function hr(e) {
1178
1247
  return e;
1179
1248
  }
1180
- function ir(e) {
1249
+ function gr(e) {
1181
1250
  let t = H({
1182
1251
  core: e.core ?? "all",
1183
1252
  ...e.overrides ? { overrides: e.overrides } : {},
@@ -1205,7 +1274,7 @@ function ir(e) {
1205
1274
  }
1206
1275
  };
1207
1276
  }
1208
- var ar = H({
1277
+ var _r = H({
1209
1278
  core: [
1210
1279
  "Text",
1211
1280
  "Chip",
@@ -1217,89 +1286,89 @@ var ar = H({
1217
1286
  ...L,
1218
1287
  ...R
1219
1288
  }
1220
- }), or = T(D, {
1221
- components: ar,
1289
+ }), vr = T(D, {
1290
+ components: _r,
1222
1291
  actions: z
1223
1292
  }), U = [
1224
1293
  {
1225
1294
  name: "ContextPanel",
1226
1295
  catalog: L.ContextPanel,
1227
- renderer: Sn,
1296
+ renderer: Cn,
1228
1297
  renderers: ["context"]
1229
1298
  },
1230
1299
  {
1231
1300
  name: "ContextOverview",
1232
1301
  catalog: L.ContextOverview,
1233
- renderer: bn,
1302
+ renderer: xn,
1234
1303
  renderers: ["context"]
1235
1304
  },
1236
1305
  {
1237
1306
  name: "ContextCard",
1238
1307
  catalog: L.ContextCard,
1239
- renderer: dt,
1308
+ renderer: ft,
1240
1309
  renderers: ["context"]
1241
1310
  },
1242
1311
  {
1243
1312
  name: "ContextNoteList",
1244
1313
  catalog: R.ContextNoteList,
1245
- renderer: gn,
1314
+ renderer: _n,
1246
1315
  renderers: ["context"]
1247
1316
  },
1248
1317
  {
1249
1318
  name: "ContextMetricGrid",
1250
1319
  catalog: R.ContextMetricGrid,
1251
- renderer: on,
1320
+ renderer: sn,
1252
1321
  renderers: ["context"]
1253
1322
  },
1254
1323
  {
1255
1324
  name: "ContextDataTable",
1256
1325
  catalog: R.ContextDataTable,
1257
- renderer: bt,
1326
+ renderer: xt,
1258
1327
  renderers: ["context"]
1259
1328
  },
1260
1329
  {
1261
1330
  name: "ContextList",
1262
1331
  catalog: R.ContextList,
1263
- renderer: $t,
1332
+ renderer: en,
1264
1333
  renderers: ["context"]
1265
1334
  },
1266
1335
  {
1267
1336
  name: "ContextTabularList",
1268
1337
  catalog: R.ContextTabularList,
1269
- renderer: In,
1338
+ renderer: Ln,
1270
1339
  renderers: ["context"]
1271
1340
  },
1272
1341
  {
1273
1342
  name: "ContextFileList",
1274
1343
  catalog: R.ContextFileList,
1275
- renderer: Vt,
1344
+ renderer: Ht,
1276
1345
  renderers: ["context"]
1277
1346
  }
1278
1347
  ];
1279
1348
  Object.fromEntries(U.filter(({ name: e }) => e in L).map(({ name: e, renderer: t }) => [e, t])), Object.fromEntries(U.filter(({ name: e }) => e in R).map(({ name: e, renderer: t }) => [e, t]));
1280
1349
  //#endregion
1281
1350
  //#region src/context/constants.ts
1282
- var sr = [
1351
+ var yr = [
1283
1352
  "ContextPanel",
1284
1353
  "ContextOverview",
1285
1354
  "ContextCard"
1286
- ], cr = ["ContextOverview", "ContextCard"];
1287
- function lr(e) {
1288
- return sr.includes(e);
1355
+ ], br = ["ContextOverview", "ContextCard"];
1356
+ function xr(e) {
1357
+ return yr.includes(e);
1289
1358
  }
1290
- function ur(e) {
1291
- return cr.includes(e);
1359
+ function Sr(e) {
1360
+ return br.includes(e);
1292
1361
  }
1293
1362
  //#endregion
1294
1363
  //#region src/context/validate-context-spec.ts
1295
1364
  function W(e, t) {
1296
1365
  return e.elements[t];
1297
1366
  }
1298
- function dr(e, t, n = /* @__PURE__ */ new Set()) {
1367
+ function Cr(e, t, n = /* @__PURE__ */ new Set()) {
1299
1368
  let r = W(e, t);
1300
1369
  if (!r || n.has(t)) return n;
1301
1370
  n.add(t);
1302
- for (let t of r.children ?? []) dr(e, t, n);
1371
+ for (let t of r.children ?? []) Cr(e, t, n);
1303
1372
  return n;
1304
1373
  }
1305
1374
  function G(e) {
@@ -1322,7 +1391,7 @@ function G(e) {
1322
1391
  });
1323
1392
  continue;
1324
1393
  }
1325
- if (!ur(r.type)) {
1394
+ if (!Sr(r.type)) {
1326
1395
  t.push({
1327
1396
  path: `/elements/${n}`,
1328
1397
  message: `Direct child of ContextPanel must be ContextOverview or ContextCard — got "${r.type}".`
@@ -1333,10 +1402,10 @@ function G(e) {
1333
1402
  path: `/elements/${n}`,
1334
1403
  message: "ContextOverview may appear at most once in ContextPanel."
1335
1404
  }));
1336
- for (let r of dr(e, n)) {
1405
+ for (let r of Cr(e, n)) {
1337
1406
  if (r === n) continue;
1338
1407
  let i = W(e, r);
1339
- i && lr(i.type) && t.push({
1408
+ i && xr(i.type) && t.push({
1340
1409
  path: `/elements/${r}`,
1341
1410
  message: `Shell component "${i.type}" cannot be nested inside a card.`
1342
1411
  });
@@ -1356,49 +1425,49 @@ function q(e, t, n, r) {
1356
1425
  severity: r
1357
1426
  });
1358
1427
  }
1359
- function fr(e, t) {
1428
+ function wr(e, t) {
1360
1429
  return t.length === 0 ? e : `${e}/${t.map((e) => typeof e == "number" ? `[${e}]` : `.${String(e)}`).join("").replace(/^\./, "")}`;
1361
1430
  }
1362
- function pr(e) {
1363
- return ar[e];
1431
+ function Tr(e) {
1432
+ return _r[e];
1364
1433
  }
1365
- function mr(e) {
1434
+ function Er(e) {
1366
1435
  return (e?.slots?.length ?? 0) === 0;
1367
1436
  }
1368
- function hr(e, t) {
1437
+ function Dr(e, t) {
1369
1438
  for (let [n, r] of Object.entries(e.elements)) r && r.type === "ContextCard" && r.props.defaultExpanded === !1 && q(t, `/elements/${n}/props/defaultExpanded`, "defaultExpanded: false shows only the card header until the user expands the card.", "warn");
1370
1439
  }
1371
- function gr(e) {
1440
+ function Or(e) {
1372
1441
  let t = [];
1373
1442
  for (let n of G(e)) q(t, n.path, n.message, "error");
1374
- let n = De(e);
1443
+ let n = Oe(e);
1375
1444
  if (!n.valid) for (let e of n.issues) q(t, e.elementKey ? `/elements/${e.elementKey}` : "/", e.message, e.severity === "warning" ? "warn" : "error");
1376
- let r = or.validate(e);
1445
+ let r = vr.validate(e);
1377
1446
  if (!r.success && r.error) for (let e of r.error.issues) {
1378
1447
  let n = e.path.length > 0 ? `/${e.path.join("/")}` : "/";
1379
1448
  n.endsWith("/visible") || n.endsWith("/children") && e.message.includes("expected array, received undefined") || q(t, n, e.message, "error");
1380
1449
  }
1381
1450
  for (let [n, r] of Object.entries(e.elements)) {
1382
1451
  if (!r) continue;
1383
- let e = pr(r.type);
1452
+ let e = Tr(r.type);
1384
1453
  if (!e) {
1385
1454
  q(t, `/elements/${n}`, `Unknown component type "${r.type}" for context catalog.`, "error");
1386
1455
  continue;
1387
1456
  }
1388
1457
  if (e.props) {
1389
1458
  let i = e.props.safeParse(r.props ?? {});
1390
- if (!i.success) for (let e of i.error.issues) q(t, fr(`/elements/${n}/props`, e.path), e.message, "error");
1459
+ if (!i.success) for (let e of i.error.issues) q(t, wr(`/elements/${n}/props`, e.path), e.message, "error");
1391
1460
  }
1392
- let i = r.children, a = mr(e);
1461
+ let i = r.children, a = Er(e);
1393
1462
  i === void 0 && a && q(t, `/elements/${n}/children`, `Leaf element "${r.type}" should include "children": [].`, "warn"), a && (i?.length ?? 0) > 0 && q(t, `/elements/${n}/children`, `Leaf component "${r.type}" must not have children.`, "error");
1394
1463
  }
1395
- return hr(e, t), t;
1464
+ return Dr(e, t), t;
1396
1465
  }
1397
- function _r(e) {
1466
+ function kr(e) {
1398
1467
  let t = [], n = structuredClone(e);
1399
1468
  for (let [e, r] of Object.entries(n.elements)) {
1400
1469
  if (!r) continue;
1401
- let n = mr(pr(r.type));
1470
+ let n = Er(Tr(r.type));
1402
1471
  r.children === void 0 && n && (r.children = [], t.push(`Added children: [] to leaf element "${e}".`)), n && r.children && r.children.length > 0 && (r.children = [], t.push(`Removed illegal children from leaf element "${e}".`));
1403
1472
  }
1404
1473
  return {
@@ -1406,15 +1475,15 @@ function _r(e) {
1406
1475
  fixes: t
1407
1476
  };
1408
1477
  }
1409
- function vr(e) {
1478
+ function Ar(e) {
1410
1479
  return e.some((e) => e.severity !== "warn");
1411
1480
  }
1412
- function yr(e) {
1413
- return K(gr(e));
1481
+ function jr(e) {
1482
+ return K(Or(e));
1414
1483
  }
1415
1484
  //#endregion
1416
1485
  //#region src/core/catalog/alert.tsx
1417
- var br = ({ props: e, emit: n, children: r }) => /* @__PURE__ */ S(t, {
1486
+ var Mr = ({ props: e, emit: n, children: r }) => /* @__PURE__ */ S(t, {
1418
1487
  title: e.title,
1419
1488
  status: e.status ?? "info",
1420
1489
  ...e.aiMark ? { aiMark: !0 } : {},
@@ -1425,15 +1494,15 @@ var br = ({ props: e, emit: n, children: r }) => /* @__PURE__ */ S(t, {
1425
1494
  //#region src/core/catalog/chart-utils.ts
1426
1495
  function Y(e, t = "monochrome") {
1427
1496
  let n = {
1428
- monochrome: Pe,
1429
- categorical: Ne,
1430
- semantic: Fe
1431
- }[t] ?? Pe;
1432
- e.setThemes([Me.new(e), n.new(e)]);
1497
+ monochrome: Fe,
1498
+ categorical: Pe,
1499
+ semantic: Ie
1500
+ }[t] ?? Fe;
1501
+ e.setThemes([Ne.new(e), n.new(e)]);
1433
1502
  }
1434
1503
  //#endregion
1435
1504
  //#region src/core/catalog/bar-chart.tsx
1436
- var xr = ({ props: e }) => {
1505
+ var Nr = ({ props: e }) => {
1437
1506
  let t = y(null);
1438
1507
  return _(() => {
1439
1508
  let n = t.current;
@@ -1488,7 +1557,7 @@ function X(e) {
1488
1557
  }
1489
1558
  //#endregion
1490
1559
  //#region src/core/catalog/button.tsx
1491
- var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1560
+ var Pr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1492
1561
  appearance: e.appearance ?? "secondary",
1493
1562
  ...X({
1494
1563
  size: e.size,
@@ -1500,7 +1569,7 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1500
1569
  "aria-label": e.badge ? `${e.badge} unread` : "unread",
1501
1570
  children: e.badge
1502
1571
  })]
1503
- }), Cr = ({ props: e, children: t }) => {
1572
+ }), Fr = ({ props: e, children: t }) => {
1504
1573
  let n = e.title !== void 0 || e.description !== void 0;
1505
1574
  return /* @__PURE__ */ C(i, {
1506
1575
  flexDirection: "column",
@@ -1524,10 +1593,10 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1524
1593
  })]
1525
1594
  }) : null, t]
1526
1595
  });
1527
- }, wr = T(D, {
1596
+ }, Ir = T(D, {
1528
1597
  components: V,
1529
1598
  actions: z
1530
- }), Tr = ({ props: e, bindings: t, emit: n }) => {
1599
+ }), Lr = ({ props: e, bindings: t, emit: n }) => {
1531
1600
  let r = t?.checked, { state: i, set: o } = O(), s = r ? E(i, r) : void 0, c = r ? s ?? e.checked ?? !1 : e.checked ?? !1;
1532
1601
  return /* @__PURE__ */ S(a, {
1533
1602
  label: e.label,
@@ -1537,12 +1606,12 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1537
1606
  r && o(r, !(t?.checked ?? !1)), n("change");
1538
1607
  }
1539
1608
  });
1540
- }, Er = {
1541
- "check-circle": Ie,
1542
- "in-progress": Re,
1543
- "radio-button-unchecked": Le
1544
- }, Dr = ({ props: e, emit: t }) => {
1545
- let n = e.icon ? Er[e.icon] : void 0, r = e.removable && e.size !== "small" ? () => t("close") : void 0;
1609
+ }, Rr = {
1610
+ "check-circle": Le,
1611
+ "in-progress": ze,
1612
+ "radio-button-unchecked": Re
1613
+ }, zr = ({ props: e, emit: t }) => {
1614
+ let n = e.icon ? Rr[e.icon] : void 0, r = e.removable && e.size !== "small" ? () => t("close") : void 0;
1546
1615
  return /* @__PURE__ */ S(o, {
1547
1616
  label: e.label,
1548
1617
  ...X({
@@ -1552,21 +1621,21 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1552
1621
  onClose: r
1553
1622
  })
1554
1623
  });
1555
- }, Or = ({ props: e }) => /* @__PURE__ */ S(s, { ...X({
1624
+ }, Br = ({ props: e }) => /* @__PURE__ */ S(s, { ...X({
1556
1625
  vertical: e.vertical,
1557
1626
  spacing: e.spacing,
1558
1627
  alignContent: e.alignContent
1559
- }) }), kr = ({ props: e }) => {
1628
+ }) }), Vr = ({ props: e }) => {
1560
1629
  let t = y(null);
1561
1630
  return _(() => {
1562
1631
  let n = t.current;
1563
1632
  if (!n) return;
1564
1633
  let r, i = () => {
1565
1634
  r && r.dispose(), r = k.Root.new(n), Y(r, e.theme);
1566
- let t = r.container.children.push(ze.PieChart.new(r, {
1635
+ let t = r.container.children.push(Be.PieChart.new(r, {
1567
1636
  layout: r.horizontalLayout,
1568
1637
  innerRadius: k.percent(50)
1569
- })), i = t.series.push(ze.PieSeries.new(r, {
1638
+ })), i = t.series.push(Be.PieSeries.new(r, {
1570
1639
  valueField: "value",
1571
1640
  categoryField: "category",
1572
1641
  legendValueText: ""
@@ -1587,7 +1656,7 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1587
1656
  className: J,
1588
1657
  style: { height: e.height ?? 300 }
1589
1658
  });
1590
- }, Ar = ({ props: e, children: t }) => /* @__PURE__ */ S(l, {
1659
+ }, Hr = ({ props: e, children: t }) => /* @__PURE__ */ S(l, {
1591
1660
  ...X({
1592
1661
  direction: e.direction,
1593
1662
  gap: e.gap,
@@ -1601,21 +1670,21 @@ var Sr = ({ props: e, emit: t }) => /* @__PURE__ */ C(r, {
1601
1670
  inline: e.inline
1602
1671
  }),
1603
1672
  children: t
1604
- }), jr = (...e) => e.filter(Boolean).join(" "), Mr = "_1v76lkh0", Nr = "_1v76lkh1";
1673
+ }), Ur = (...e) => e.filter(Boolean).join(" "), Wr = "_1v76lkh0", Gr = "_1v76lkh1";
1605
1674
  //#endregion
1606
1675
  //#region src/core/catalog/grid.tsx
1607
- function Pr(e) {
1676
+ function Kr(e) {
1608
1677
  let t = e.match(/repeat\(\s*(\d+)/);
1609
1678
  return t?.[1] ? Number(t[1]) : e.trim().split(/\s+/).length;
1610
1679
  }
1611
- var Fr = ({ props: e, children: t }) => {
1680
+ var qr = ({ props: e, children: t }) => {
1612
1681
  if (e.bordered) {
1613
- let n = e.templateColumns ?? "1fr", r = g.count(t), i = Math.max(1, Pr(n)), a = Math.max(0, r - (r % i || i));
1682
+ let n = e.templateColumns ?? "1fr", r = g.count(t), i = Math.max(1, Kr(n)), a = Math.max(0, r - (r % i || i));
1614
1683
  return /* @__PURE__ */ S("div", {
1615
- className: Mr,
1684
+ className: Wr,
1616
1685
  style: { gridTemplateColumns: n },
1617
1686
  children: g.map(t, (e, t) => /* @__PURE__ */ S("div", {
1618
- className: jr(Nr, t < a && "_1v76lkh2"),
1687
+ className: Ur(Gr, t < a && "_1v76lkh2"),
1619
1688
  children: e
1620
1689
  }))
1621
1690
  });
@@ -1625,12 +1694,68 @@ var Fr = ({ props: e, children: t }) => {
1625
1694
  gap: e.gap ?? "2",
1626
1695
  children: t
1627
1696
  });
1628
- }, Ir = {
1629
- "check-circle": Ie,
1630
- "in-progress": Re,
1631
- "radio-button-unchecked": Le
1632
- }, Lr = ({ props: e }) => {
1633
- let t = Ir[e.name];
1697
+ }, Jr = {
1698
+ compact: 120,
1699
+ standard: 180,
1700
+ wide: 280
1701
+ };
1702
+ function Yr(e) {
1703
+ if (e != null) return Jr[e];
1704
+ }
1705
+ //#endregion
1706
+ //#region src/core/catalog/guidance-card.tsx
1707
+ function Xr(e) {
1708
+ let t = {
1709
+ key: e.key,
1710
+ header: e.header
1711
+ };
1712
+ return e.minWidth !== void 0 && (t.minWidth = Yr(e.minWidth)), t;
1713
+ }
1714
+ var Zr = ({ props: e, emit: t, bindings: n }) => {
1715
+ let { set: r } = O(), i = n?.appliedChangeIds, a = (e) => {
1716
+ i && r(i, e);
1717
+ }, o = e.changeSections.map((e) => e.type === "single" ? {
1718
+ type: "single",
1719
+ changes: e.changes.map((e) => ({
1720
+ id: e.id,
1721
+ label: e.label,
1722
+ from: e.from ?? null,
1723
+ to: e.to ?? null,
1724
+ ...e.reason === void 0 ? {} : { reason: e.reason }
1725
+ }))
1726
+ } : {
1727
+ type: "table",
1728
+ label: e.label,
1729
+ changeTables: e.changeTables.map((e) => ({
1730
+ label: e.label,
1731
+ columns: e.columns.map(Xr),
1732
+ data: e.data,
1733
+ ...e.reason === void 0 ? {} : { reason: e.reason }
1734
+ }))
1735
+ });
1736
+ return /* @__PURE__ */ S(ue, {
1737
+ referenceLabel: e.referenceLabel,
1738
+ changeSections: o,
1739
+ ...X({
1740
+ state: e.state,
1741
+ referenceHref: e.referenceHref,
1742
+ appliedChangeIds: e.appliedChangeIds,
1743
+ defaultExpanded: e.defaultExpanded
1744
+ }),
1745
+ onApply: (e) => {
1746
+ a(e), t("apply");
1747
+ },
1748
+ onEdit: (e) => {
1749
+ a(e), t("edit");
1750
+ },
1751
+ onDismiss: () => t("dismiss")
1752
+ });
1753
+ }, Qr = {
1754
+ "check-circle": Le,
1755
+ "in-progress": ze,
1756
+ "radio-button-unchecked": Re
1757
+ }, $r = ({ props: e }) => {
1758
+ let t = Qr[e.name];
1634
1759
  return t ? /* @__PURE__ */ S(d, {
1635
1760
  svg: t,
1636
1761
  ...X({
@@ -1638,7 +1763,7 @@ var Fr = ({ props: e, children: t }) => {
1638
1763
  color: e.color
1639
1764
  })
1640
1765
  }) : null;
1641
- }, Rr = ({ props: e, bindings: t, emit: n }) => {
1766
+ }, ei = ({ props: e, bindings: t, emit: n }) => {
1642
1767
  let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
1643
1768
  return /* @__PURE__ */ S(se, {
1644
1769
  label: e.label,
@@ -1652,7 +1777,7 @@ var Fr = ({ props: e, children: t }) => {
1652
1777
  r && a(r, e.target.value), n("change");
1653
1778
  }
1654
1779
  });
1655
- }, zr = ({ props: e }) => {
1780
+ }, ti = ({ props: e }) => {
1656
1781
  let t = y(null);
1657
1782
  return _(() => {
1658
1783
  let n = t.current;
@@ -1698,7 +1823,7 @@ var Fr = ({ props: e, children: t }) => {
1698
1823
  className: J,
1699
1824
  style: { height: e.height ?? 300 }
1700
1825
  });
1701
- }, Br = ({ props: e, emit: t }) => {
1826
+ }, ni = ({ props: e, emit: t }) => {
1702
1827
  let { label: r, href: i, appearance: a, target: o, ghost: s, badge: c } = e, l = (e) => {
1703
1828
  e.preventDefault(), t("press");
1704
1829
  }, u = c === void 0 ? r : /* @__PURE__ */ C("span", {
@@ -1737,7 +1862,7 @@ var Fr = ({ props: e, children: t }) => {
1737
1862
  onClick: l,
1738
1863
  children: u
1739
1864
  });
1740
- }, Vr = j({
1865
+ }, ri = j({
1741
1866
  defaultClassName: "_1le8ba60",
1742
1867
  variantClassNames: { disabled: {
1743
1868
  true: "_1le8ba61",
@@ -1745,10 +1870,10 @@ var Fr = ({ props: e, children: t }) => {
1745
1870
  } },
1746
1871
  defaultVariants: {},
1747
1872
  compoundVariants: []
1748
- }), Hr = [
1873
+ }), ii = [
1749
1874
  {
1750
1875
  name: "Text",
1751
- catalog: tr,
1876
+ catalog: pr,
1752
1877
  renderer: ({ props: e }) => e.variant === "headline" ? e.size === void 0 ? /* @__PURE__ */ S(p, {
1753
1878
  variant: "headline",
1754
1879
  el: "h3",
@@ -1782,55 +1907,55 @@ var Fr = ({ props: e, children: t }) => {
1782
1907
  },
1783
1908
  {
1784
1909
  name: "Card",
1785
- catalog: Vn,
1786
- renderer: Cr,
1910
+ catalog: Hn,
1911
+ renderer: Fr,
1787
1912
  renderers: ["all"]
1788
1913
  },
1789
1914
  {
1790
1915
  name: "Flex",
1791
- catalog: Kn,
1792
- renderer: Ar,
1916
+ catalog: qn,
1917
+ renderer: Hr,
1793
1918
  renderers: ["all"]
1794
1919
  },
1795
1920
  {
1796
1921
  name: "Grid",
1797
- catalog: B,
1798
- renderer: Fr,
1922
+ catalog: Jn,
1923
+ renderer: qr,
1799
1924
  renderers: ["all"]
1800
1925
  },
1801
1926
  {
1802
1927
  name: "Alert",
1803
- catalog: Rn,
1804
- renderer: br,
1928
+ catalog: zn,
1929
+ renderer: Mr,
1805
1930
  renderers: ["all"]
1806
1931
  },
1807
1932
  {
1808
1933
  name: "Divider",
1809
- catalog: Wn,
1810
- renderer: Or,
1934
+ catalog: Gn,
1935
+ renderer: Br,
1811
1936
  renderers: ["all"]
1812
1937
  },
1813
1938
  {
1814
1939
  name: "Icon",
1815
- catalog: qn,
1816
- renderer: Lr,
1940
+ catalog: or,
1941
+ renderer: $r,
1817
1942
  renderers: ["all"]
1818
1943
  },
1819
1944
  {
1820
1945
  name: "Chip",
1821
- catalog: Un,
1822
- renderer: Dr,
1946
+ catalog: Wn,
1947
+ renderer: zr,
1823
1948
  renderers: ["all"]
1824
1949
  },
1825
1950
  {
1826
1951
  name: "Link",
1827
- catalog: Xn,
1828
- renderer: Br,
1952
+ catalog: cr,
1953
+ renderer: ni,
1829
1954
  renderers: ["all"]
1830
1955
  },
1831
1956
  {
1832
1957
  name: "ProgressBar",
1833
- catalog: Qn,
1958
+ catalog: ur,
1834
1959
  renderer: ({ props: e }) => {
1835
1960
  let t = X({ description: e.description });
1836
1961
  return e.indeterminate || e.value === void 0 ? /* @__PURE__ */ S(ne, {
@@ -1847,43 +1972,43 @@ var Fr = ({ props: e, children: t }) => {
1847
1972
  },
1848
1973
  {
1849
1974
  name: "BarChart",
1850
- catalog: zn,
1851
- renderer: xr,
1975
+ catalog: Bn,
1976
+ renderer: Nr,
1852
1977
  renderers: ["all"]
1853
1978
  },
1854
1979
  {
1855
1980
  name: "DonutChart",
1856
- catalog: Gn,
1857
- renderer: kr,
1981
+ catalog: Kn,
1982
+ renderer: Vr,
1858
1983
  renderers: ["all"]
1859
1984
  },
1860
1985
  {
1861
1986
  name: "LineChart",
1862
- catalog: Yn,
1863
- renderer: zr,
1987
+ catalog: B,
1988
+ renderer: ti,
1864
1989
  renderers: ["all"]
1865
1990
  },
1866
1991
  {
1867
1992
  name: "Button",
1868
- catalog: Bn,
1869
- renderer: Sr,
1993
+ catalog: Vn,
1994
+ renderer: Pr,
1870
1995
  renderers: ["all"]
1871
1996
  },
1872
1997
  {
1873
1998
  name: "Checkbox",
1874
- catalog: Hn,
1875
- renderer: Tr,
1999
+ catalog: Un,
2000
+ renderer: Lr,
1876
2001
  renderers: ["all"]
1877
2002
  },
1878
2003
  {
1879
2004
  name: "Input",
1880
- catalog: Jn,
1881
- renderer: Rr,
2005
+ catalog: sr,
2006
+ renderer: ei,
1882
2007
  renderers: ["all"]
1883
2008
  },
1884
2009
  {
1885
2010
  name: "Textarea",
1886
- catalog: nr,
2011
+ catalog: mr,
1887
2012
  renderer: ({ props: e, bindings: t, emit: n }) => {
1888
2013
  let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
1889
2014
  return /* @__PURE__ */ S(ce, {
@@ -1905,14 +2030,14 @@ var Fr = ({ props: e, children: t }) => {
1905
2030
  },
1906
2031
  {
1907
2032
  name: "Listbox",
1908
- catalog: Zn,
2033
+ catalog: lr,
1909
2034
  renderer: ({ props: e, bindings: t, emit: n }) => {
1910
2035
  let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "", l = e.options.map((e) => ({
1911
2036
  id: e.value,
1912
2037
  label: e.label
1913
2038
  })), u = l.find((e) => e.id === s);
1914
2039
  return /* @__PURE__ */ C("div", {
1915
- className: Vr({ disabled: e.disabled ?? !1 }),
2040
+ className: ri({ disabled: e.disabled ?? !1 }),
1916
2041
  children: [/* @__PURE__ */ S(c, { children: e.label }), /* @__PURE__ */ S(ee, {
1917
2042
  items: l,
1918
2043
  ...u ? { selected: u } : {},
@@ -1931,7 +2056,7 @@ var Fr = ({ props: e, children: t }) => {
1931
2056
  },
1932
2057
  {
1933
2058
  name: "RadioGroup",
1934
- catalog: $n,
2059
+ catalog: dr,
1935
2060
  renderer: ({ props: e, bindings: t, emit: n }) => {
1936
2061
  let r = t?.value, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.value ?? "" : e.value ?? "";
1937
2062
  return /* @__PURE__ */ S(re.Group, {
@@ -1951,7 +2076,7 @@ var Fr = ({ props: e, children: t }) => {
1951
2076
  },
1952
2077
  {
1953
2078
  name: "Switch",
1954
- catalog: er,
2079
+ catalog: fr,
1955
2080
  renderer: ({ props: e, bindings: t, emit: n }) => {
1956
2081
  let r = t?.checked, { state: i, set: a } = O(), o = r ? E(i, r) : void 0, s = r ? o ?? e.checked ?? !1 : e.checked ?? !1;
1957
2082
  return /* @__PURE__ */ S(oe, {
@@ -1965,12 +2090,18 @@ var Fr = ({ props: e, children: t }) => {
1965
2090
  });
1966
2091
  },
1967
2092
  renderers: ["all"]
2093
+ },
2094
+ {
2095
+ name: "GuidanceCard",
2096
+ catalog: ar,
2097
+ renderer: Zr,
2098
+ renderers: ["all"]
1968
2099
  }
1969
2100
  ];
1970
- Object.fromEntries(Hr.map(({ name: e, renderer: t }) => [e, t]));
2101
+ Object.fromEntries(ii.map(({ name: e, renderer: t }) => [e, t]));
1971
2102
  //#endregion
1972
2103
  //#region src/marketing/catalog/components/revenue-card.catalog.ts
1973
- var Ur = {
2104
+ var ai = {
1974
2105
  props: w.object({
1975
2106
  title: w.string(),
1976
2107
  value: w.string(),
@@ -1983,7 +2114,7 @@ var Ur = {
1983
2114
  }),
1984
2115
  slots: [],
1985
2116
  description: "KPI metric card. trend: up=green↑ down=red↓ flat=grey→. delta e.g. \"+12% vs last month\". Leaf node — no children."
1986
- }, Wr = j({
2117
+ }, oi = j({
1987
2118
  defaultClassName: "cy2dbi0",
1988
2119
  variantClassNames: { trend: {
1989
2120
  up: "cy2dbi1",
@@ -1992,11 +2123,11 @@ var Ur = {
1992
2123
  } },
1993
2124
  defaultVariants: {},
1994
2125
  compoundVariants: []
1995
- }), Gr = [{
2126
+ }), si = [{
1996
2127
  name: "RevenueCard",
1997
- catalog: Ur,
2128
+ catalog: ai,
1998
2129
  renderer: ({ props: e }) => {
1999
- let t = e.trend ?? "flat", n = e.trend === "up" ? "↑" : e.trend === "down" ? "↓" : "→", r = Wr({ trend: t });
2130
+ let t = e.trend ?? "flat", n = e.trend === "up" ? "↑" : e.trend === "down" ? "↓" : "→", r = oi({ trend: t });
2000
2131
  return /* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(l, {
2001
2132
  direction: "column",
2002
2133
  gap: "2",
@@ -2030,39 +2161,39 @@ var Ur = {
2030
2161
  }];
2031
2162
  //#endregion
2032
2163
  //#region src/registry-utils.ts
2033
- function Kr(e, t) {
2164
+ function ci(e, t) {
2034
2165
  return t === "all" ? [...e] : e.filter(({ renderers: e }) => e.includes("all") || e.includes(t));
2035
2166
  }
2036
- function qr(e) {
2167
+ function li(e) {
2037
2168
  return Object.fromEntries(e.map(({ name: e, catalog: t }) => [e, t]));
2038
2169
  }
2039
- function Jr(e) {
2170
+ function ui(e) {
2040
2171
  return Object.fromEntries(e.map(({ name: e, renderer: t }) => [e, t]));
2041
2172
  }
2042
2173
  //#endregion
2043
2174
  //#region src/registry.ts
2044
- var Yr = [
2045
- ...Hr,
2046
- ...Gr,
2175
+ var di = [
2176
+ ...ii,
2177
+ ...si,
2047
2178
  ...U
2048
2179
  ];
2049
2180
  function Z(e = "chat") {
2050
- let t = Kr(Yr, e), n = qr(t), r = Jr(t);
2051
- return je(T(D, {
2181
+ let t = ci(di, e), n = li(t), r = ui(t);
2182
+ return Me(T(D, {
2052
2183
  components: n,
2053
2184
  actions: z
2054
2185
  }), {
2055
2186
  components: r,
2056
- actions: Ln
2187
+ actions: Rn
2057
2188
  });
2058
2189
  }
2059
- var Q = Z("chat"), Xr = Q.registry, Zr = Q.handlers, Qr = Q.executeAction;
2060
- function $r() {
2190
+ var Q = Z("chat"), fi = Q.registry, pi = Q.handlers, mi = Q.executeAction;
2191
+ function hi() {
2061
2192
  return Z("context");
2062
2193
  }
2063
2194
  //#endregion
2064
2195
  //#region src/renderers/internal/enrichments/button-actions.ts
2065
- function ei(e) {
2196
+ function gi(e) {
2066
2197
  let t = { ...e.elements };
2067
2198
  for (let [e, n] of Object.entries(t)) {
2068
2199
  if (n.type !== "Button" || n.on?.press) continue;
@@ -2085,16 +2216,16 @@ function ei(e) {
2085
2216
  }
2086
2217
  //#endregion
2087
2218
  //#region src/renderers/internal/enrichments/useEnrichedSpec.ts
2088
- function ti(e, t) {
2219
+ function _i(e, t) {
2089
2220
  return v(() => t.reduce((e, t) => t(e), e), [e, t]);
2090
2221
  }
2091
2222
  //#endregion
2092
2223
  //#region src/renderers/spec-renderer.tsx
2093
- var ni = [ei], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i }) => {
2094
- let a = ti(e, ni), o = y(null), s = y(null);
2095
- if (o.current !== e && (o.current = e, s.current = Ae(a.state ?? {})), s.current === null) throw Error("State store is not initialized");
2224
+ var vi = [gi], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i }) => {
2225
+ let a = _i(e, vi), o = y(null), s = y(null);
2226
+ if (o.current !== e && (o.current = e, s.current = je(a.state ?? {})), s.current === null) throw Error("State store is not initialized");
2096
2227
  let c = s.current;
2097
- return /* @__PURE__ */ S(Oe, {
2228
+ return /* @__PURE__ */ S(ke, {
2098
2229
  registry: t,
2099
2230
  store: c,
2100
2231
  handlers: v(() => {
@@ -2112,13 +2243,13 @@ var ni = [ei], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i
2112
2243
  c
2113
2244
  ]),
2114
2245
  functions: v(() => ({ computeTotal: (e) => `$${((Number.parseFloat(String(e.quantity ?? 0)) || 0) * (Number.parseFloat(String(e.unitPrice ?? "0").replace(/[^0-9.]/g, "")) || 0)).toFixed(2)}` }), []),
2115
- children: /* @__PURE__ */ S(ke, {
2246
+ children: /* @__PURE__ */ S(Ae, {
2116
2247
  spec: a,
2117
2248
  registry: t,
2118
2249
  loading: i ?? !1
2119
2250
  })
2120
2251
  });
2121
- }, ri = class extends fe {
2252
+ }, yi = class extends pe {
2122
2253
  state = {
2123
2254
  hasError: !1,
2124
2255
  message: ""
@@ -2148,12 +2279,12 @@ var ni = [ei], $ = ({ spec: e, registry: t, handlers: n, actions: r, loading: i
2148
2279
  };
2149
2280
  //#endregion
2150
2281
  //#region src/renderers/wrap-context-registry.tsx
2151
- function ii(e, t) {
2282
+ function bi(e, t) {
2152
2283
  if (process.env.NODE_ENV === "production") return e;
2153
2284
  let n = { ...e };
2154
2285
  for (let [r, i] of Object.entries(e)) {
2155
2286
  let e = i;
2156
- n[r] = ((n) => /* @__PURE__ */ S(ri, {
2287
+ n[r] = ((n) => /* @__PURE__ */ S(yi, {
2157
2288
  elementType: r,
2158
2289
  ...t ? { onError: t } : {},
2159
2290
  children: /* @__PURE__ */ S(e, { ...n })
@@ -2163,7 +2294,7 @@ function ii(e, t) {
2163
2294
  }
2164
2295
  //#endregion
2165
2296
  //#region src/renderers/context-spec-renderer.tsx
2166
- var ai = ({ spec: e, registry: t, handlers: n, actions: r, onRenderError: i, loading: a }) => {
2297
+ var xi = ({ spec: e, registry: t, handlers: n, actions: r, onRenderError: i, loading: a }) => {
2167
2298
  let o = a ? [] : G(e);
2168
2299
  o.length > 0 && process.env.NODE_ENV !== "production" && console.warn(`[ContextSpecRenderer] Spec validation issues:\n${K(o.map((e) => ({
2169
2300
  ...e,
@@ -2172,15 +2303,15 @@ var ai = ({ spec: e, registry: t, handlers: n, actions: r, onRenderError: i, loa
2172
2303
  let s = t ?? Z("context").registry, c = n ?? Z("context").handlers;
2173
2304
  return /* @__PURE__ */ S($, {
2174
2305
  spec: e,
2175
- registry: v(() => ii(s, i), [s, i]),
2306
+ registry: v(() => bi(s, i), [s, i]),
2176
2307
  handlers: c,
2177
2308
  ...r ? { actions: r } : {},
2178
2309
  ...a === void 0 ? {} : { loading: a }
2179
2310
  });
2180
- }, oi = "nilaa0";
2311
+ }, Si = "nilaa0";
2181
2312
  //#endregion
2182
2313
  //#region src/renderers/sectioned-context-renderer.tsx
2183
- function si(e, t) {
2314
+ function Ci(e, t) {
2184
2315
  let n = {}, r = !1, i = (t) => {
2185
2316
  let a = e.elements[t];
2186
2317
  if (!a) {
@@ -2197,8 +2328,8 @@ function si(e, t) {
2197
2328
  hasMissingRefs: r
2198
2329
  };
2199
2330
  }
2200
- function ci(e, t) {
2201
- let { elements: n, hasMissingRefs: r } = si(e, t), i = {
2331
+ function wi(e, t) {
2332
+ let { elements: n, hasMissingRefs: r } = Ci(e, t), i = {
2202
2333
  root: t,
2203
2334
  elements: n
2204
2335
  }, a = e.state;
@@ -2207,14 +2338,14 @@ function ci(e, t) {
2207
2338
  hasMissingRefs: r
2208
2339
  };
2209
2340
  }
2210
- function li(e, t) {
2341
+ function Ti(e, t) {
2211
2342
  let n = y(/* @__PURE__ */ new Map());
2212
2343
  return v(() => {
2213
2344
  if (!e?.root) return [];
2214
2345
  let r = e.elements[e.root];
2215
2346
  if (!r) return [];
2216
2347
  let i = (r.children ?? []).filter((t) => e.elements[t]), a = n.current, o = /* @__PURE__ */ new Map(), s = i.map((n, r) => {
2217
- let { spec: s, hasMissingRefs: c } = ci(e, n), l = JSON.stringify(s), u = a.get(n), d = u && u.key === l ? u.spec : s;
2348
+ let { spec: s, hasMissingRefs: c } = wi(e, n), l = JSON.stringify(s), u = a.get(n), d = u && u.key === l ? u.spec : s;
2218
2349
  o.set(n, {
2219
2350
  key: l,
2220
2351
  spec: d
@@ -2229,7 +2360,7 @@ function li(e, t) {
2229
2360
  return n.current = o, s;
2230
2361
  }, [e, t]);
2231
2362
  }
2232
- function ui(e) {
2363
+ function Ei(e) {
2233
2364
  let t = y(/* @__PURE__ */ new Map());
2234
2365
  return v(() => {
2235
2366
  let n = t.current, r = /* @__PURE__ */ new Map(), i = e.map((e) => {
@@ -2245,9 +2376,9 @@ function ui(e) {
2245
2376
  return t.current = r, i;
2246
2377
  }, [e]);
2247
2378
  }
2248
- function di({ title: e }) {
2379
+ function Di({ title: e }) {
2249
2380
  return /* @__PURE__ */ C("div", {
2250
- className: Je,
2381
+ className: Ye,
2251
2382
  "data-testid": "context-section-skeleton",
2252
2383
  children: [/* @__PURE__ */ S(ae, {
2253
2384
  variant: "headline",
@@ -2255,7 +2386,7 @@ function di({ title: e }) {
2255
2386
  }), /* @__PURE__ */ S(ie, { height: "64px" })]
2256
2387
  });
2257
2388
  }
2258
- function fi({ slot: e, registry: t, handlers: n, actions: r }) {
2389
+ function Oi({ slot: e, registry: t, handlers: n, actions: r }) {
2259
2390
  return e.spec ? /* @__PURE__ */ C("div", {
2260
2391
  "data-testid": `context-section-${e.id}`,
2261
2392
  "data-status": e.status,
@@ -2266,24 +2397,24 @@ function fi({ slot: e, registry: t, handlers: n, actions: r }) {
2266
2397
  loading: e.status === "loading",
2267
2398
  ...r ? { actions: r } : {}
2268
2399
  }), e.status === "loading" ? /* @__PURE__ */ S("div", {
2269
- className: oi,
2400
+ className: Si,
2270
2401
  children: /* @__PURE__ */ S(ae, {
2271
2402
  variant: "body",
2272
2403
  rows: 2,
2273
2404
  "aria-label": "Loading more of this section"
2274
2405
  })
2275
2406
  }) : null]
2276
- }) : /* @__PURE__ */ S(di, { ...e.title ? { title: e.title } : {} });
2407
+ }) : /* @__PURE__ */ S(Di, { ...e.title ? { title: e.title } : {} });
2277
2408
  }
2278
- var pi = ({ spec: e, sections: t, loading: n = !1, registry: r, handlers: i, actions: a, onRenderError: o }) => {
2279
- let s = v(() => Z("context"), []), c = r ?? s.registry, l = i ?? s.handlers, u = v(() => ii(c, o), [c, o]), d = li(e, n);
2409
+ var ki = ({ spec: e, sections: t, loading: n = !1, registry: r, handlers: i, actions: a, onRenderError: o }) => {
2410
+ let s = v(() => Z("context"), []), c = r ?? s.registry, l = i ?? s.handlers, u = v(() => bi(c, o), [c, o]), d = Ti(e, n);
2280
2411
  return /* @__PURE__ */ S("div", {
2281
2412
  className: F,
2282
2413
  "data-testid": "sectioned-context-panel",
2283
- children: ui(t ?? d).map((e) => /* @__PURE__ */ S(ri, {
2414
+ children: Ei(t ?? d).map((e) => /* @__PURE__ */ S(yi, {
2284
2415
  elementType: e.id,
2285
2416
  ...o ? { onError: o } : {},
2286
- children: /* @__PURE__ */ S(fi, {
2417
+ children: /* @__PURE__ */ S(Oi, {
2287
2418
  slot: e,
2288
2419
  registry: u,
2289
2420
  handlers: l,
@@ -2293,6 +2424,6 @@ var pi = ({ spec: e, sections: t, loading: n = !1, registry: r, handlers: i, act
2293
2424
  });
2294
2425
  };
2295
2426
  //#endregion
2296
- export { ai as ContextSpecRenderer, pi as SectionedContextRenderer, $ as SpecRenderer, wr as catalog, H as composeCatalogComponents, or as contextCatalog, rr as createScopedCatalog, Qr as executeAction, ci as extractSectionSpec, yr as formatContextRenderReport, K as formatContextSpecIssues, $r as getContextRegistry, Z as getRegistry, Zr as handlers, vr as hasContextSpecErrors, ir as mergeCatalogs, _r as postProcessContextSpec, Xr as registry, G as validateContextSpec, gr as validateContextSpecDeep };
2427
+ export { xi as ContextSpecRenderer, ki as SectionedContextRenderer, $ as SpecRenderer, Ir as catalog, H as composeCatalogComponents, vr as contextCatalog, hr as createScopedCatalog, mi as executeAction, wi as extractSectionSpec, jr as formatContextRenderReport, K as formatContextSpecIssues, hi as getContextRegistry, Z as getRegistry, pi as handlers, Ar as hasContextSpecErrors, gr as mergeCatalogs, kr as postProcessContextSpec, fi as registry, G as validateContextSpec, Or as validateContextSpecDeep };
2297
2428
 
2298
2429
  //# sourceMappingURL=index.js.map