@bettercms-ai/kit 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/dist/brand/logo.js +67 -18
  2. package/dist/brand/logo.js.map +1 -1
  3. package/dist/context.js +8 -3
  4. package/dist/context.js.map +1 -1
  5. package/dist/controls/button.js +451 -134
  6. package/dist/controls/button.js.map +1 -1
  7. package/dist/controls/choice.js +336 -95
  8. package/dist/controls/choice.js.map +1 -1
  9. package/dist/controls/code.js +245 -72
  10. package/dist/controls/code.js.map +1 -1
  11. package/dist/controls/color.js +108 -31
  12. package/dist/controls/color.js.map +1 -1
  13. package/dist/controls/date.js +268 -83
  14. package/dist/controls/date.js.map +1 -1
  15. package/dist/controls/form-picker.js +26 -9
  16. package/dist/controls/form-picker.js.map +1 -1
  17. package/dist/controls/icon.js +341 -100
  18. package/dist/controls/icon.js.map +1 -1
  19. package/dist/controls/json.js +20 -7
  20. package/dist/controls/json.js.map +1 -1
  21. package/dist/controls/link.js +561 -156
  22. package/dist/controls/link.js.map +1 -1
  23. package/dist/controls/location.js +124 -35
  24. package/dist/controls/location.js.map +1 -1
  25. package/dist/controls/media.js +928 -267
  26. package/dist/controls/media.js.map +1 -1
  27. package/dist/controls/number.js +80 -23
  28. package/dist/controls/number.js.map +1 -1
  29. package/dist/controls/reference.js +516 -155
  30. package/dist/controls/reference.js.map +1 -1
  31. package/dist/controls/rich-text/article-shell.js +327 -86
  32. package/dist/controls/rich-text/article-shell.js.map +1 -1
  33. package/dist/controls/rich-text/author.js +78 -21
  34. package/dist/controls/rich-text/author.js.map +1 -1
  35. package/dist/controls/rich-text/blocks.js +1084 -315
  36. package/dist/controls/rich-text/blocks.js.map +1 -1
  37. package/dist/controls/rich-text/button.js +30 -9
  38. package/dist/controls/rich-text/button.js.map +1 -1
  39. package/dist/controls/rich-text/catalog.js +168 -51
  40. package/dist/controls/rich-text/catalog.js.map +1 -1
  41. package/dist/controls/rich-text/columns.js +104 -31
  42. package/dist/controls/rich-text/columns.js.map +1 -1
  43. package/dist/controls/rich-text/component-card.js +790 -209
  44. package/dist/controls/rich-text/component-card.js.map +1 -1
  45. package/dist/controls/rich-text/component-panel.js +102 -40
  46. package/dist/controls/rich-text/component-panel.js.map +1 -1
  47. package/dist/controls/rich-text/control.js +101 -32
  48. package/dist/controls/rich-text/control.js.map +1 -1
  49. package/dist/controls/rich-text/editor.js +423 -121
  50. package/dist/controls/rich-text/editor.js.map +1 -1
  51. package/dist/controls/rich-text/embed.js +184 -51
  52. package/dist/controls/rich-text/embed.js.map +1 -1
  53. package/dist/controls/rich-text/floating.js +171 -42
  54. package/dist/controls/rich-text/floating.js.map +1 -1
  55. package/dist/controls/rich-text/footnote.js +89 -28
  56. package/dist/controls/rich-text/footnote.js.map +1 -1
  57. package/dist/controls/rich-text/gallery.js +88 -27
  58. package/dist/controls/rich-text/gallery.js.map +1 -1
  59. package/dist/controls/rich-text/link-form.js +111 -34
  60. package/dist/controls/rich-text/link-form.js.map +1 -1
  61. package/dist/controls/rich-text/plain.js +8 -3
  62. package/dist/controls/rich-text/plain.js.map +1 -1
  63. package/dist/controls/rich-text/related.js +86 -25
  64. package/dist/controls/rich-text/related.js.map +1 -1
  65. package/dist/controls/rich-text/toc.js +48 -15
  66. package/dist/controls/rich-text/toc.js.map +1 -1
  67. package/dist/controls/rich-text/toolbar.js +408 -107
  68. package/dist/controls/rich-text/toolbar.js.map +1 -1
  69. package/dist/controls/scale.js +169 -52
  70. package/dist/controls/scale.js.map +1 -1
  71. package/dist/controls/slot.js +238 -73
  72. package/dist/controls/slot.js.map +1 -1
  73. package/dist/controls/table/table-editor.js +1766 -500
  74. package/dist/controls/table/table-editor.js.map +1 -1
  75. package/dist/controls/table/table-link.js +119 -38
  76. package/dist/controls/table/table-link.js.map +1 -1
  77. package/dist/controls/table/table.js +26 -9
  78. package/dist/controls/table/table.js.map +1 -1
  79. package/dist/controls/text.js +221 -68
  80. package/dist/controls/text.js.map +1 -1
  81. package/dist/controls/unknown-value.js +79 -22
  82. package/dist/controls/unknown-value.js.map +1 -1
  83. package/dist/engine/array.js +821 -228
  84. package/dist/engine/array.js.map +1 -1
  85. package/dist/engine/bits.js +38 -13
  86. package/dist/engine/bits.js.map +1 -1
  87. package/dist/engine/breadcrumb.js +25 -8
  88. package/dist/engine/breadcrumb.js.map +1 -1
  89. package/dist/engine/expand.js +38 -13
  90. package/dist/engine/expand.js.map +1 -1
  91. package/dist/engine/field-list.js +14 -5
  92. package/dist/engine/field-list.js.map +1 -1
  93. package/dist/engine/field-shell.js +849 -244
  94. package/dist/engine/field-shell.js.map +1 -1
  95. package/dist/engine/frame.js +275 -78
  96. package/dist/engine/frame.js.map +1 -1
  97. package/dist/engine/grouping.js +630 -193
  98. package/dist/engine/grouping.js.map +1 -1
  99. package/dist/engine/item-list.js +187 -50
  100. package/dist/engine/item-list.js.map +1 -1
  101. package/dist/engine/kit-field.js +320 -95
  102. package/dist/engine/kit-field.js.map +1 -1
  103. package/dist/engine/schema-form.js +101 -32
  104. package/dist/engine/schema-form.js.map +1 -1
  105. package/dist/engine/slot.js +146 -45
  106. package/dist/engine/slot.js.map +1 -1
  107. package/dist/index.js +2 -2
  108. package/dist/lib/icons.js +14 -5
  109. package/dist/lib/icons.js.map +1 -1
  110. package/dist/styles.css +5821 -1
  111. package/dist/table/table-view.js +49 -16
  112. package/dist/table/table-view.js.map +1 -1
  113. package/dist/testing/test-form.js +14 -5
  114. package/dist/testing/test-form.js.map +1 -1
  115. package/dist/theme.js +8 -3
  116. package/dist/theme.js.map +1 -1
  117. package/dist/ui/action-tray.js +97 -24
  118. package/dist/ui/action-tray.js.map +1 -1
  119. package/dist/ui/autocomplete.js +135 -38
  120. package/dist/ui/autocomplete.js.map +1 -1
  121. package/dist/ui/button.js +108 -31
  122. package/dist/ui/button.js.map +1 -1
  123. package/dist/ui/choice-switch.js +14 -5
  124. package/dist/ui/choice-switch.js.map +1 -1
  125. package/dist/ui/controls.js +279 -86
  126. package/dist/ui/controls.js.map +1 -1
  127. package/dist/ui/display.js +401 -116
  128. package/dist/ui/display.js.map +1 -1
  129. package/dist/ui/expanded-editor-modal.js +100 -27
  130. package/dist/ui/expanded-editor-modal.js.map +1 -1
  131. package/dist/ui/floating-panel.js +130 -37
  132. package/dist/ui/floating-panel.js.map +1 -1
  133. package/dist/ui/index.js +2 -2
  134. package/dist/ui/input.js +196 -59
  135. package/dist/ui/input.js.map +1 -1
  136. package/dist/ui/mode-bar.js +32 -11
  137. package/dist/ui/mode-bar.js.map +1 -1
  138. package/dist/ui/overlay.js +616 -179
  139. package/dist/ui/overlay.js.map +1 -1
  140. package/dist/ui/path-crumbs.js +374 -113
  141. package/dist/ui/path-crumbs.js.map +1 -1
  142. package/dist/ui/select.js +311 -78
  143. package/dist/ui/select.js.map +1 -1
  144. package/dist/ui/shortcut-hint.d.ts +3 -0
  145. package/dist/ui/shortcut-hint.js +33 -7
  146. package/dist/ui/shortcut-hint.js.map +1 -1
  147. package/dist/ui/spinner.js +20 -7
  148. package/dist/ui/spinner.js.map +1 -1
  149. package/dist/ui/split-button.js +35 -10
  150. package/dist/ui/split-button.js.map +1 -1
  151. package/dist/ui/tab.js +50 -17
  152. package/dist/ui/tab.js.map +1 -1
  153. package/dist/ui/toast.js +107 -30
  154. package/dist/ui/toast.js.map +1 -1
  155. package/dist/ui/tooltip-root.js +24 -7
  156. package/dist/ui/tooltip-root.js.map +1 -1
  157. package/package.json +2 -2
@@ -11,7 +11,7 @@ import { HISTORY_SEGMENT } from "../schema/types.js";
11
11
  import { resolveHelp } from "../schema/help.js";
12
12
  import { textLength } from "../lib/validate.js";
13
13
  import * as React from "react";
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
+ import { Fragment, jsxDEV } from "react/jsx-dev-runtime";
15
15
  import { IconAlertCircle, IconAlertTriangle, IconArrowBackUp, IconBraces, IconClipboard, IconCopy, IconDots, IconHistory, IconInfoCircle, IconLock, IconMessage, IconMessagePlus, IconRefresh, IconRotate, IconWorld } from "@tabler/icons-react";
16
16
  import { AnimatePresence, motion } from "framer-motion";
17
17
  import { createPortal } from "react-dom";
@@ -30,6 +30,7 @@ import { createPortal } from "react-dom";
30
30
  *
31
31
  * Services (toast, AI rewrite, in-place comments) come from KitServices; a missing service hides its surface.
32
32
  */
33
+ var _jsxFileName = "D:/Github/bettercms/bettercms-backend/packages/kit/src/engine/field-shell.tsx";
33
34
  /** `html`: a rich text value as its editor html (read through the host's codec), so Paste re-stores it for the target field. */
34
35
  var clip = null;
35
36
  /** Test seam: forget the shared field clipboard. */
@@ -114,7 +115,7 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
114
115
  const limit = field.validation?.max ?? field.validation?.recommendedMax;
115
116
  const len = textLength(value);
116
117
  const near = !!limit && len >= limit * .8;
117
- const counter = limit && (field.type === "string" || field.type === "text" || field.type === "richtext") ? /* @__PURE__ */ jsxs("span", {
118
+ const counter = limit && (field.type === "string" || field.type === "text" || field.type === "richtext") ? /* @__PURE__ */ jsxDEV("span", {
118
119
  "data-slot": "field-counter",
119
120
  className: cn("tabular-nums text-kit-xs", !near && "hidden group-focus-within/field:inline", field.validation?.max && len > field.validation.max ? "text-kit-danger-fg" : field.validation?.recommendedMax && len > field.validation.recommendedMax ? "text-kit-warning-fg" : "text-kit-fg-3"),
120
121
  children: [
@@ -122,22 +123,42 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
122
123
  " / ",
123
124
  limit
124
125
  ]
125
- }) : null;
126
+ }, void 0, true, {
127
+ fileName: _jsxFileName,
128
+ lineNumber: 149,
129
+ columnNumber: 7
130
+ }, this) : null;
126
131
  const dense = env.helpDisplay === "tooltip";
127
132
  const lockedHere = !!readOnly && !!field.access?.edit && !env.readOnly && !env.can(field.access.edit);
128
133
  const help = lockedHere ? (field.lockReason?.trim() || "Set by developers").replace(/\.?$/, ".") : resolveHelp(field);
129
- const helpNode = lockedHere ? /* @__PURE__ */ jsxs("span", {
134
+ const helpNode = lockedHere ? /* @__PURE__ */ jsxDEV("span", {
130
135
  "data-locked": "",
131
136
  className: "inline-flex items-start gap-1",
132
- children: [/* @__PURE__ */ jsx(IconLock, {
137
+ children: [/* @__PURE__ */ jsxDEV(IconLock, {
133
138
  className: "mt-px size-3 shrink-0",
134
139
  stroke: 1.75,
135
140
  "aria-hidden": true
136
- }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
141
+ }, void 0, false, {
142
+ fileName: _jsxFileName,
143
+ lineNumber: 170,
144
+ columnNumber: 7
145
+ }, this), /* @__PURE__ */ jsxDEV("span", { children: [/* @__PURE__ */ jsxDEV("span", {
137
146
  className: "sr-only",
138
147
  children: "Locked. "
139
- }), help] })]
140
- }) : help;
148
+ }, void 0, false, {
149
+ fileName: _jsxFileName,
150
+ lineNumber: 172,
151
+ columnNumber: 9
152
+ }, this), help] }, void 0, true, {
153
+ fileName: _jsxFileName,
154
+ lineNumber: 171,
155
+ columnNumber: 7
156
+ }, this)]
157
+ }, void 0, true, {
158
+ fileName: _jsxFileName,
159
+ lineNumber: 169,
160
+ columnNumber: 5
161
+ }, this) : help;
141
162
  const more = field.helpMore || void 0;
142
163
  const erroring = issue?.level === "error";
143
164
  const helpInline = !!help && (!dense || lockedHere) && !erroring;
@@ -157,82 +178,166 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
157
178
  if (next) el.setAttribute("aria-describedby", next);
158
179
  else el.removeAttribute("aria-describedby");
159
180
  }, [id, describedBy]);
160
- const info = tip ? /* @__PURE__ */ jsx(Tooltip, {
161
- content: /* @__PURE__ */ jsx("span", {
181
+ const info = tip ? /* @__PURE__ */ jsxDEV(Tooltip, {
182
+ content: /* @__PURE__ */ jsxDEV("span", {
162
183
  className: "block max-w-[260px] whitespace-normal font-normal leading-4",
163
184
  children: tip
164
- }),
165
- children: /* @__PURE__ */ jsxs("button", {
185
+ }, void 0, false, {
186
+ fileName: _jsxFileName,
187
+ lineNumber: 199,
188
+ columnNumber: 23
189
+ }, this),
190
+ children: /* @__PURE__ */ jsxDEV("button", {
166
191
  type: "button",
167
192
  "aria-label": `About ${field.title}`,
168
193
  className: "-my-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-kit-sm text-kit-fg-4 hover:text-kit-fg-2",
169
- children: [/* @__PURE__ */ jsx(IconInfoCircle, {
194
+ children: [/* @__PURE__ */ jsxDEV(IconInfoCircle, {
170
195
  className: "size-3.5",
171
196
  stroke: 1.5,
172
197
  "aria-hidden": true
173
- }), /* @__PURE__ */ jsx("span", {
198
+ }, void 0, false, {
199
+ fileName: _jsxFileName,
200
+ lineNumber: 201,
201
+ columnNumber: 9
202
+ }, this), /* @__PURE__ */ jsxDEV("span", {
174
203
  id: moreId,
175
204
  className: "sr-only",
176
205
  children: tip
177
- })]
178
- })
179
- }) : null;
180
- const label = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
206
+ }, void 0, false, {
207
+ fileName: _jsxFileName,
208
+ lineNumber: 202,
209
+ columnNumber: 9
210
+ }, this)]
211
+ }, void 0, true, {
212
+ fileName: _jsxFileName,
213
+ lineNumber: 200,
214
+ columnNumber: 7
215
+ }, this)
216
+ }, void 0, false, {
217
+ fileName: _jsxFileName,
218
+ lineNumber: 199,
219
+ columnNumber: 5
220
+ }, this) : null;
221
+ const label = /* @__PURE__ */ jsxDEV(Fragment, { children: [/* @__PURE__ */ jsxDEV("span", {
181
222
  className: "truncate",
182
223
  children: field.title
183
- }), field.validation?.required ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
224
+ }, void 0, false, {
225
+ fileName: _jsxFileName,
226
+ lineNumber: 209,
227
+ columnNumber: 7
228
+ }, this), field.validation?.required ? /* @__PURE__ */ jsxDEV(Fragment, { children: [/* @__PURE__ */ jsxDEV("span", {
184
229
  "aria-hidden": true,
185
230
  className: "text-kit-fg-2",
186
231
  children: "*"
187
- }), /* @__PURE__ */ jsx("span", {
232
+ }, void 0, false, {
233
+ fileName: _jsxFileName,
234
+ lineNumber: 212,
235
+ columnNumber: 11
236
+ }, this), /* @__PURE__ */ jsxDEV("span", {
188
237
  className: "sr-only",
189
238
  children: "(required)"
190
- })] }) : null] });
191
- const badges = /* @__PURE__ */ jsxs(Fragment, { children: [
192
- overridden ? /* @__PURE__ */ jsx(Tooltip, {
239
+ }, void 0, false, {
240
+ fileName: _jsxFileName,
241
+ lineNumber: 213,
242
+ columnNumber: 11
243
+ }, this)] }, void 0, true, {
244
+ fileName: _jsxFileName,
245
+ lineNumber: 211,
246
+ columnNumber: 9
247
+ }, this) : null] }, void 0, true, {
248
+ fileName: _jsxFileName,
249
+ lineNumber: 208,
250
+ columnNumber: 5
251
+ }, this);
252
+ const badges = /* @__PURE__ */ jsxDEV(Fragment, { children: [
253
+ overridden ? /* @__PURE__ */ jsxDEV(Tooltip, {
193
254
  content: `Overrides ${inh.from}. Changes to the block no longer reach this field.`,
194
- children: /* @__PURE__ */ jsx("span", {
255
+ children: /* @__PURE__ */ jsxDEV("span", {
195
256
  role: "img",
196
257
  className: "size-1.5 shrink-0 rounded-full bg-kit-accent",
197
258
  "aria-label": `Overrides ${inh.from}`
198
- })
199
- }) : null,
200
- changed && !reviewing ? /* @__PURE__ */ jsx(Tooltip, {
259
+ }, void 0, false, {
260
+ fileName: _jsxFileName,
261
+ lineNumber: 222,
262
+ columnNumber: 11
263
+ }, this)
264
+ }, void 0, false, {
265
+ fileName: _jsxFileName,
266
+ lineNumber: 221,
267
+ columnNumber: 9
268
+ }, this) : null,
269
+ changed && !reviewing ? /* @__PURE__ */ jsxDEV(Tooltip, {
201
270
  content: "Changed since publish",
202
- children: /* @__PURE__ */ jsx("span", {
271
+ children: /* @__PURE__ */ jsxDEV("span", {
203
272
  role: "img",
204
273
  className: "size-1.5 shrink-0 rounded-full bg-kit-warning",
205
274
  "aria-label": "Changed since publish"
206
- })
207
- }) : null,
208
- synced ? /* @__PURE__ */ jsx(Tooltip, {
275
+ }, void 0, false, {
276
+ fileName: _jsxFileName,
277
+ lineNumber: 227,
278
+ columnNumber: 11
279
+ }, this)
280
+ }, void 0, false, {
281
+ fileName: _jsxFileName,
282
+ lineNumber: 226,
283
+ columnNumber: 9
284
+ }, this) : null,
285
+ synced ? /* @__PURE__ */ jsxDEV(Tooltip, {
209
286
  content: `Synced from ${synced}. Changes apply on every page that uses it.`,
210
- children: /* @__PURE__ */ jsxs("span", {
287
+ children: /* @__PURE__ */ jsxDEV("span", {
211
288
  className: "inline-flex h-4 shrink-0 items-center gap-0.5 rounded-kit-md bg-kit-info-soft px-1 text-kit-2xs font-medium text-kit-info-fg",
212
- children: [/* @__PURE__ */ jsx(IconRefresh, {
289
+ children: [/* @__PURE__ */ jsxDEV(IconRefresh, {
213
290
  className: "size-2.5",
214
291
  stroke: 2,
215
292
  "aria-hidden": true
216
- }), "Synced"]
217
- })
218
- }) : null,
219
- field.localized ? /* @__PURE__ */ jsx(Tooltip, {
293
+ }, void 0, false, {
294
+ fileName: _jsxFileName,
295
+ lineNumber: 233,
296
+ columnNumber: 13
297
+ }, this), "Synced"]
298
+ }, void 0, true, {
299
+ fileName: _jsxFileName,
300
+ lineNumber: 232,
301
+ columnNumber: 11
302
+ }, this)
303
+ }, void 0, false, {
304
+ fileName: _jsxFileName,
305
+ lineNumber: 231,
306
+ columnNumber: 9
307
+ }, this) : null,
308
+ field.localized ? /* @__PURE__ */ jsxDEV(Tooltip, {
220
309
  content: "Translatable: this field can hold a value for each of the site's languages.",
221
- children: /* @__PURE__ */ jsxs("span", {
310
+ children: /* @__PURE__ */ jsxDEV("span", {
222
311
  className: "inline-flex h-4 shrink-0 items-center gap-0.5 rounded-kit-md bg-kit-muted px-1 text-kit-2xs font-medium text-kit-fg-3",
223
- children: [/* @__PURE__ */ jsx(IconWorld, {
312
+ children: [/* @__PURE__ */ jsxDEV(IconWorld, {
224
313
  className: "size-2.5",
225
314
  stroke: 2,
226
315
  "aria-hidden": true
227
- }), "EN"]
228
- })
229
- }) : null
230
- ] });
231
- const accessories = /* @__PURE__ */ jsxs(Fragment, { children: [
316
+ }, void 0, false, {
317
+ fileName: _jsxFileName,
318
+ lineNumber: 241,
319
+ columnNumber: 13
320
+ }, this), "EN"]
321
+ }, void 0, true, {
322
+ fileName: _jsxFileName,
323
+ lineNumber: 240,
324
+ columnNumber: 11
325
+ }, this)
326
+ }, void 0, false, {
327
+ fileName: _jsxFileName,
328
+ lineNumber: 239,
329
+ columnNumber: 9
330
+ }, this) : null
331
+ ] }, void 0, true, {
332
+ fileName: _jsxFileName,
333
+ lineNumber: 219,
334
+ columnNumber: 5
335
+ }, this);
336
+ const accessories = /* @__PURE__ */ jsxDEV(Fragment, { children: [
232
337
  action,
233
- overridden && !readOnly ? /* @__PURE__ */ jsx(Tooltip, {
338
+ overridden && !readOnly ? /* @__PURE__ */ jsxDEV(Tooltip, {
234
339
  content: `Use ${inh.from}'s value again`,
235
- children: /* @__PURE__ */ jsx("button", {
340
+ children: /* @__PURE__ */ jsxDEV("button", {
236
341
  type: "button",
237
342
  onClick: (e) => {
238
343
  const box = e.currentTarget.closest("[data-field-key]");
@@ -242,23 +347,43 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
242
347
  "aria-label": `Reset ${field.title} to ${inh.from}`,
243
348
  className: "inline-flex h-5 items-center rounded-kit-md px-1 text-kit-xs text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg",
244
349
  children: "Reset"
245
- })
246
- }) : null,
247
- canUndo ? /* @__PURE__ */ jsx(Tooltip, {
350
+ }, void 0, false, {
351
+ fileName: _jsxFileName,
352
+ lineNumber: 253,
353
+ columnNumber: 11
354
+ }, this)
355
+ }, void 0, false, {
356
+ fileName: _jsxFileName,
357
+ lineNumber: 252,
358
+ columnNumber: 9
359
+ }, this) : null,
360
+ canUndo ? /* @__PURE__ */ jsxDEV(Tooltip, {
248
361
  content: `Undo last change to ${field.title}`,
249
- children: /* @__PURE__ */ jsx("button", {
362
+ children: /* @__PURE__ */ jsxDEV("button", {
250
363
  type: "button",
251
364
  "aria-label": `Undo last change to ${field.title}`,
252
365
  onClick: () => form?.undo(key),
253
366
  className: "inline-flex size-5 items-center justify-center rounded-kit-md text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg",
254
- children: /* @__PURE__ */ jsx(IconArrowBackUp, {
367
+ children: /* @__PURE__ */ jsxDEV(IconArrowBackUp, {
255
368
  className: "size-3.5",
256
369
  stroke: 1.5,
257
370
  "aria-hidden": true
258
- })
259
- })
260
- }) : null,
261
- canComment ? /* @__PURE__ */ jsx(CommentButton, {
371
+ }, void 0, false, {
372
+ fileName: _jsxFileName,
373
+ lineNumber: 271,
374
+ columnNumber: 13
375
+ }, this)
376
+ }, void 0, false, {
377
+ fileName: _jsxFileName,
378
+ lineNumber: 270,
379
+ columnNumber: 11
380
+ }, this)
381
+ }, void 0, false, {
382
+ fileName: _jsxFileName,
383
+ lineNumber: 269,
384
+ columnNumber: 9
385
+ }, this) : null,
386
+ canComment ? /* @__PURE__ */ jsxDEV(CommentButton, {
262
387
  count: openCount,
263
388
  useCount: useStoreCount ? () => useStoreCount(env.docId, key) : void 0,
264
389
  label: field.title,
@@ -268,9 +393,17 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
268
393
  setCommentArea(fieldPopoverCollision(el.closest("[data-field-key]")));
269
394
  setCommentsOpen(true);
270
395
  }
271
- }) : null,
272
- /* @__PURE__ */ jsx(PeerStack, { peers }),
273
- bare ? null : /* @__PURE__ */ jsx(FieldMenu, {
396
+ }, void 0, false, {
397
+ fileName: _jsxFileName,
398
+ lineNumber: 276,
399
+ columnNumber: 9
400
+ }, this) : null,
401
+ /* @__PURE__ */ jsxDEV(PeerStack, { peers }, void 0, false, {
402
+ fileName: _jsxFileName,
403
+ lineNumber: 288,
404
+ columnNumber: 7
405
+ }, this),
406
+ bare ? null : /* @__PURE__ */ jsxDEV(FieldMenu, {
274
407
  field,
275
408
  path,
276
409
  value,
@@ -278,18 +411,30 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
278
411
  readOnly: !!readOnly,
279
412
  changed,
280
413
  onAi: () => setAi(true)
281
- })
282
- ] });
283
- const control = /* @__PURE__ */ jsx("div", {
414
+ }, void 0, false, {
415
+ fileName: _jsxFileName,
416
+ lineNumber: 289,
417
+ columnNumber: 22
418
+ }, this)
419
+ ] }, void 0, true, {
420
+ fileName: _jsxFileName,
421
+ lineNumber: 249,
422
+ columnNumber: 5
423
+ }, this);
424
+ const control = /* @__PURE__ */ jsxDEV("div", {
284
425
  className: cn("relative", editor && "[&_.border-kit-field-border]:border-[var(--peer)]"),
285
426
  style: editor ? { "--peer": editor.color ?? presenceColor(editor.id ?? editor.name) } : void 0,
286
427
  children
287
- });
288
- const message = issue || meta ? /* @__PURE__ */ jsxs("div", {
428
+ }, void 0, false, {
429
+ fileName: _jsxFileName,
430
+ lineNumber: 297,
431
+ columnNumber: 5
432
+ }, this);
433
+ const message = issue || meta ? /* @__PURE__ */ jsxDEV("div", {
289
434
  className: "flex min-h-4 items-start justify-between gap-3",
290
- children: [/* @__PURE__ */ jsx(AnimatePresence, {
435
+ children: [/* @__PURE__ */ jsxDEV(AnimatePresence, {
291
436
  initial: false,
292
- children: issue ? /* @__PURE__ */ jsxs(motion.p, {
437
+ children: issue ? /* @__PURE__ */ jsxDEV(motion.p, {
293
438
  id: msgId,
294
439
  initial: {
295
440
  opacity: 0,
@@ -301,140 +446,256 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
301
446
  },
302
447
  role: issue.level === "error" ? "alert" : "status",
303
448
  className: cn("flex min-w-0 items-start gap-1 text-kit-xs", issue.level === "error" ? "text-kit-danger-fg" : "text-kit-warning-fg"),
304
- children: [issue.level === "error" ? /* @__PURE__ */ jsx(IconAlertCircle, {
449
+ children: [issue.level === "error" ? /* @__PURE__ */ jsxDEV(IconAlertCircle, {
305
450
  className: "mt-px size-3.5 shrink-0",
306
451
  stroke: 1.5,
307
452
  "aria-hidden": true
308
- }) : /* @__PURE__ */ jsx(IconAlertTriangle, {
453
+ }, void 0, false, {
454
+ fileName: _jsxFileName,
455
+ lineNumber: 318,
456
+ columnNumber: 42
457
+ }, this) : /* @__PURE__ */ jsxDEV(IconAlertTriangle, {
309
458
  className: "mt-px size-3.5 shrink-0",
310
459
  stroke: 1.5,
311
460
  "aria-hidden": true
312
- }), /* @__PURE__ */ jsxs("span", {
461
+ }, void 0, false, {
462
+ fileName: _jsxFileName,
463
+ lineNumber: 318,
464
+ columnNumber: 125
465
+ }, this), /* @__PURE__ */ jsxDEV("span", {
313
466
  className: "min-w-0",
314
- children: [issue.message, issue.fix && !readOnly ? /* @__PURE__ */ jsxs(Fragment, { children: [" ", /* @__PURE__ */ jsx("button", {
467
+ children: [issue.message, issue.fix && !readOnly ? /* @__PURE__ */ jsxDEV(Fragment, { children: [" ", /* @__PURE__ */ jsxDEV("button", {
315
468
  type: "button",
316
469
  onClick: issue.fix.apply,
317
470
  className: "font-medium text-kit-fg underline-offset-2 hover:underline",
318
471
  children: issue.fix.label
319
- })] }) : null]
320
- })]
321
- }, issue.message) : /* @__PURE__ */ jsx("span", {})
322
- }), meta ? /* @__PURE__ */ jsx("span", {
472
+ }, void 0, false, {
473
+ fileName: _jsxFileName,
474
+ lineNumber: 324,
475
+ columnNumber: 21
476
+ }, this)] }, void 0, true, {
477
+ fileName: _jsxFileName,
478
+ lineNumber: 322,
479
+ columnNumber: 19
480
+ }, this) : null]
481
+ }, void 0, true, {
482
+ fileName: _jsxFileName,
483
+ lineNumber: 319,
484
+ columnNumber: 15
485
+ }, this)]
486
+ }, issue.message, true, {
487
+ fileName: _jsxFileName,
488
+ lineNumber: 310,
489
+ columnNumber: 13
490
+ }, this) : /* @__PURE__ */ jsxDEV("span", {}, void 0, false, {
491
+ fileName: _jsxFileName,
492
+ lineNumber: 332,
493
+ columnNumber: 13
494
+ }, this)
495
+ }, void 0, false, {
496
+ fileName: _jsxFileName,
497
+ lineNumber: 308,
498
+ columnNumber: 9
499
+ }, this), meta ? /* @__PURE__ */ jsxDEV("span", {
323
500
  className: "flex shrink-0 items-center gap-2",
324
501
  children: meta
325
- }) : null]
326
- }) : null;
327
- const labelEl = /* @__PURE__ */ jsx("label", {
502
+ }, void 0, false, {
503
+ fileName: _jsxFileName,
504
+ lineNumber: 335,
505
+ columnNumber: 17
506
+ }, this) : null]
507
+ }, void 0, true, {
508
+ fileName: _jsxFileName,
509
+ lineNumber: 307,
510
+ columnNumber: 7
511
+ }, this) : null;
512
+ const labelEl = /* @__PURE__ */ jsxDEV("label", {
328
513
  htmlFor: id,
329
514
  id: `${id}-label`,
330
515
  className: "flex min-w-0 items-center gap-1 text-kit-sm font-medium text-kit-fg-2 transition-colors group-focus-within/field:text-kit-fg",
331
516
  title: field.title.length > 28 ? field.title : void 0,
332
517
  children: label
333
- });
334
- const body = layout === "row" ? /* @__PURE__ */ jsxs("div", {
518
+ }, void 0, false, {
519
+ fileName: _jsxFileName,
520
+ lineNumber: 340,
521
+ columnNumber: 5
522
+ }, this);
523
+ const body = layout === "row" ? /* @__PURE__ */ jsxDEV("div", {
335
524
  className: cn("group/field relative flex min-w-0 flex-col gap-1.5", className),
336
525
  "data-field-key": key,
337
526
  "data-field": path.length === 1 ? key : void 0,
338
527
  "data-slot": "kit-field",
339
528
  children: [
340
529
  bar,
341
- /* @__PURE__ */ jsx(RowChrome.Provider, {
342
- value: /* @__PURE__ */ jsxs(Fragment, { children: [
530
+ /* @__PURE__ */ jsxDEV(RowChrome.Provider, {
531
+ value: /* @__PURE__ */ jsxDEV(Fragment, { children: [
343
532
  info,
344
533
  badges,
345
534
  accessories
346
- ] }),
535
+ ] }, void 0, true, {
536
+ fileName: _jsxFileName,
537
+ lineNumber: 354,
538
+ columnNumber: 36
539
+ }, this),
347
540
  children: control
348
- }),
541
+ }, void 0, false, {
542
+ fileName: _jsxFileName,
543
+ lineNumber: 354,
544
+ columnNumber: 9
545
+ }, this),
349
546
  message
350
547
  ]
351
- }) : layout === "card" && quiet ? /* @__PURE__ */ jsxs("div", {
548
+ }, void 0, true, {
549
+ fileName: _jsxFileName,
550
+ lineNumber: 352,
551
+ columnNumber: 7
552
+ }, this) : layout === "card" && quiet ? /* @__PURE__ */ jsxDEV("div", {
352
553
  className: cn("group/field relative flex flex-col gap-1", className),
353
554
  "data-field-key": key,
354
555
  "data-field": path.length === 1 ? key : void 0,
355
556
  "data-slot": "kit-field",
356
557
  children: [
357
558
  bar,
358
- /* @__PURE__ */ jsxs("div", {
559
+ /* @__PURE__ */ jsxDEV("div", {
359
560
  "data-field-head": "",
360
561
  className: "flex min-h-8 items-center gap-3",
361
562
  children: [
362
- /* @__PURE__ */ jsxs("label", {
563
+ /* @__PURE__ */ jsxDEV("label", {
363
564
  htmlFor: id,
364
565
  id: `${id}-label`,
365
566
  className: "min-w-0 flex-1 cursor-pointer",
366
- children: [/* @__PURE__ */ jsxs("span", {
567
+ children: [/* @__PURE__ */ jsxDEV("span", {
367
568
  className: "flex min-w-0 items-center gap-1 text-kit-sm font-medium text-kit-fg-2 transition-colors group-focus-within/field:text-kit-fg",
368
569
  children: [
369
570
  label,
370
571
  info,
371
572
  badges
372
573
  ]
373
- }), helpInline ? /* @__PURE__ */ jsx("span", {
574
+ }, void 0, true, {
575
+ fileName: _jsxFileName,
576
+ lineNumber: 363,
577
+ columnNumber: 13
578
+ }, this), helpInline ? /* @__PURE__ */ jsxDEV("span", {
374
579
  id: helpId,
375
580
  "data-slot": "field-help",
376
581
  className: "mt-0.5 block text-kit-xs leading-4 text-kit-fg-3",
377
582
  children: helpNode
378
- }) : null]
379
- }),
380
- /* @__PURE__ */ jsx("span", {
583
+ }, void 0, false, {
584
+ fileName: _jsxFileName,
585
+ lineNumber: 369,
586
+ columnNumber: 15
587
+ }, this) : null]
588
+ }, void 0, true, {
589
+ fileName: _jsxFileName,
590
+ lineNumber: 362,
591
+ columnNumber: 11
592
+ }, this),
593
+ /* @__PURE__ */ jsxDEV("span", {
381
594
  className: "flex shrink-0 items-center gap-0.5 empty:hidden",
382
595
  children: accessories
383
- }),
384
- /* @__PURE__ */ jsx("span", {
596
+ }, void 0, false, {
597
+ fileName: _jsxFileName,
598
+ lineNumber: 374,
599
+ columnNumber: 11
600
+ }, this),
601
+ /* @__PURE__ */ jsxDEV("span", {
385
602
  className: "flex shrink-0 items-center",
386
- children: readOnly ? /* @__PURE__ */ jsx("span", {
603
+ children: readOnly ? /* @__PURE__ */ jsxDEV("span", {
387
604
  className: "text-kit-sm text-kit-fg-2",
388
605
  children: value ? "On" : "Off"
389
- }) : control
390
- })
606
+ }, void 0, false, {
607
+ fileName: _jsxFileName,
608
+ lineNumber: 375,
609
+ columnNumber: 68
610
+ }, this) : control
611
+ }, void 0, false, {
612
+ fileName: _jsxFileName,
613
+ lineNumber: 375,
614
+ columnNumber: 11
615
+ }, this)
391
616
  ]
392
- }),
617
+ }, void 0, true, {
618
+ fileName: _jsxFileName,
619
+ lineNumber: 361,
620
+ columnNumber: 9
621
+ }, this),
393
622
  message
394
623
  ]
395
- }) : layout === "card" ? /* @__PURE__ */ jsxs("div", {
624
+ }, void 0, true, {
625
+ fileName: _jsxFileName,
626
+ lineNumber: 359,
627
+ columnNumber: 7
628
+ }, this) : layout === "card" ? /* @__PURE__ */ jsxDEV("div", {
396
629
  className: cn("group/field relative flex flex-col gap-1.5", className),
397
630
  "data-field-key": key,
398
631
  "data-field": path.length === 1 ? key : void 0,
399
632
  "data-slot": "kit-field",
400
633
  children: [
401
634
  bar,
402
- /* @__PURE__ */ jsxs("div", {
635
+ /* @__PURE__ */ jsxDEV("div", {
403
636
  "data-field-head": "",
404
637
  className: cn("flex items-center gap-3 rounded-kit-lg border bg-kit-surface px-3 py-2.5 transition-colors", issue?.level === "error" ? "border-[var(--kit-field-invalid)]" : "border-kit-line hover:border-kit-line-strong"),
405
638
  children: [
406
639
  control,
407
- /* @__PURE__ */ jsxs("label", {
640
+ /* @__PURE__ */ jsxDEV("label", {
408
641
  htmlFor: id,
409
642
  id: `${id}-label`,
410
643
  className: "min-w-0 flex-1 cursor-pointer",
411
- children: [/* @__PURE__ */ jsxs("span", {
644
+ children: [/* @__PURE__ */ jsxDEV("span", {
412
645
  className: "flex min-w-0 items-center gap-1.5 text-kit-sm font-medium text-kit-fg",
413
646
  children: [
414
647
  label,
415
648
  info,
416
649
  badges
417
650
  ]
418
- }), helpInline ? /* @__PURE__ */ jsx("span", {
651
+ }, void 0, true, {
652
+ fileName: _jsxFileName,
653
+ lineNumber: 385,
654
+ columnNumber: 13
655
+ }, this), helpInline ? /* @__PURE__ */ jsxDEV("span", {
419
656
  id: helpId,
420
657
  "data-slot": "field-help",
421
658
  className: "block text-kit-xs leading-4 text-kit-fg-3",
422
659
  children: helpNode
423
- }) : null]
424
- }),
425
- /* @__PURE__ */ jsx("span", {
660
+ }, void 0, false, {
661
+ fileName: _jsxFileName,
662
+ lineNumber: 391,
663
+ columnNumber: 15
664
+ }, this) : null]
665
+ }, void 0, true, {
666
+ fileName: _jsxFileName,
667
+ lineNumber: 384,
668
+ columnNumber: 11
669
+ }, this),
670
+ /* @__PURE__ */ jsxDEV("span", {
426
671
  className: "shrink-0 text-kit-xs text-kit-fg-3",
427
672
  children: value ? "On" : "Off"
428
- }),
429
- /* @__PURE__ */ jsx("span", {
673
+ }, void 0, false, {
674
+ fileName: _jsxFileName,
675
+ lineNumber: 396,
676
+ columnNumber: 11
677
+ }, this),
678
+ /* @__PURE__ */ jsxDEV("span", {
430
679
  className: "flex shrink-0 items-center gap-0.5 empty:hidden",
431
680
  children: accessories
432
- })
681
+ }, void 0, false, {
682
+ fileName: _jsxFileName,
683
+ lineNumber: 397,
684
+ columnNumber: 11
685
+ }, this)
433
686
  ]
434
- }),
687
+ }, void 0, true, {
688
+ fileName: _jsxFileName,
689
+ lineNumber: 382,
690
+ columnNumber: 9
691
+ }, this),
435
692
  message
436
693
  ]
437
- }) : /* @__PURE__ */ jsxs("div", {
694
+ }, void 0, true, {
695
+ fileName: _jsxFileName,
696
+ lineNumber: 380,
697
+ columnNumber: 7
698
+ }, this) : /* @__PURE__ */ jsxDEV("div", {
438
699
  className: cn("group/field relative flex min-w-0 flex-col gap-1.5", className),
439
700
  "data-field-key": key,
440
701
  "data-field": path.length === 1 ? key : void 0,
@@ -443,17 +704,25 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
443
704
  "data-overridden": overridden ? "" : void 0,
444
705
  children: [
445
706
  bar,
446
- repeatsSection ? /* @__PURE__ */ jsx("label", {
707
+ repeatsSection ? /* @__PURE__ */ jsxDEV("label", {
447
708
  htmlFor: id,
448
709
  id: `${id}-label`,
449
710
  className: "sr-only",
450
711
  children: label
451
- }) : lifted ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("label", {
712
+ }, void 0, false, {
713
+ fileName: _jsxFileName,
714
+ lineNumber: 412,
715
+ columnNumber: 11
716
+ }, this) : lifted ? /* @__PURE__ */ jsxDEV(Fragment, { children: [/* @__PURE__ */ jsxDEV("label", {
452
717
  htmlFor: id,
453
718
  id: `${id}-label`,
454
719
  className: "sr-only",
455
720
  children: label
456
- }), createPortal(/* @__PURE__ */ jsxs("span", {
721
+ }, void 0, false, {
722
+ fileName: _jsxFileName,
723
+ lineNumber: 417,
724
+ columnNumber: 13
725
+ }, this), createPortal(/* @__PURE__ */ jsxDEV("span", {
457
726
  className: "flex items-center gap-0.5 [&>button]:!inline-flex",
458
727
  children: [
459
728
  info,
@@ -461,7 +730,15 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
461
730
  counter,
462
731
  accessories
463
732
  ]
464
- }), lifted)] }) : /* @__PURE__ */ jsxs("div", {
733
+ }, void 0, true, {
734
+ fileName: _jsxFileName,
735
+ lineNumber: 421,
736
+ columnNumber: 15
737
+ }, this), lifted)] }, void 0, true, {
738
+ fileName: _jsxFileName,
739
+ lineNumber: 416,
740
+ columnNumber: 11
741
+ }, this) : /* @__PURE__ */ jsxDEV("div", {
465
742
  "data-slot": "field-label-row",
466
743
  "data-field-head": "",
467
744
  className: "flex min-h-5 min-w-0 items-center gap-1.5",
@@ -469,45 +746,69 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
469
746
  labelEl,
470
747
  info,
471
748
  badges,
472
- /* @__PURE__ */ jsx("span", { className: "flex-1" }),
749
+ /* @__PURE__ */ jsxDEV("span", { className: "flex-1" }, void 0, false, {
750
+ fileName: _jsxFileName,
751
+ lineNumber: 435,
752
+ columnNumber: 13
753
+ }, this),
473
754
  counter,
474
- /* @__PURE__ */ jsx("span", {
755
+ /* @__PURE__ */ jsxDEV("span", {
475
756
  className: "flex shrink-0 items-center gap-0.5",
476
757
  children: accessories
477
- })
758
+ }, void 0, false, {
759
+ fileName: _jsxFileName,
760
+ lineNumber: 437,
761
+ columnNumber: 13
762
+ }, this)
478
763
  ]
479
- }),
480
- helpInline ? /* @__PURE__ */ jsx("p", {
764
+ }, void 0, true, {
765
+ fileName: _jsxFileName,
766
+ lineNumber: 431,
767
+ columnNumber: 11
768
+ }, this),
769
+ helpInline ? /* @__PURE__ */ jsxDEV("p", {
481
770
  id: helpId,
482
771
  "data-slot": "field-help",
483
772
  className: "-mt-0.5 text-kit-xs leading-4 text-kit-fg-3",
484
773
  children: helpNode
485
- }) : null,
774
+ }, void 0, false, {
775
+ fileName: _jsxFileName,
776
+ lineNumber: 441,
777
+ columnNumber: 11
778
+ }, this) : null,
486
779
  control,
487
780
  message
488
781
  ]
489
- });
490
- return /* @__PURE__ */ jsxs(Popover, {
782
+ }, void 0, true, {
783
+ fileName: _jsxFileName,
784
+ lineNumber: 402,
785
+ columnNumber: 7
786
+ }, this);
787
+ return /* @__PURE__ */ jsxDEV(Popover, {
491
788
  open: ai,
492
789
  onOpenChange: setAi,
493
- children: [/* @__PURE__ */ jsx(PopoverAnchor, {
790
+ children: [/* @__PURE__ */ jsxDEV(PopoverAnchor, {
494
791
  className: "min-w-0",
495
- children: /* @__PURE__ */ jsxs(Popover, {
792
+ children: /* @__PURE__ */ jsxDEV(Popover, {
496
793
  open: commentsOpen,
497
794
  onOpenChange: (open, d) => {
498
795
  if (!open && d.reason === "escape-key" && document.activeElement?.hasAttribute("data-esc-owner")) return d.cancel();
499
796
  setCommentsOpen(open);
500
797
  },
501
- children: [/* @__PURE__ */ jsx(PopoverAnchor, {
798
+ children: [/* @__PURE__ */ jsxDEV(PopoverAnchor, {
502
799
  className: "min-w-0",
503
800
  children: body
504
- }), commentsOpen && InPlaceComments ? /* @__PURE__ */ jsx(PopoverContent, {
801
+ }, void 0, false, {
802
+ fileName: _jsxFileName,
803
+ lineNumber: 462,
804
+ columnNumber: 11
805
+ }, this), commentsOpen && InPlaceComments ? /* @__PURE__ */ jsxDEV(PopoverContent, {
505
806
  align: "start",
506
807
  sideOffset: 8,
507
808
  ...commentArea,
508
809
  initialFocus: false,
509
810
  className: "w-[clamp(280px,var(--anchor-width),420px)] p-0",
510
- children: /* @__PURE__ */ jsx(InPlaceComments, {
811
+ children: /* @__PURE__ */ jsxDEV(InPlaceComments, {
511
812
  docId: env.docId,
512
813
  fieldKey: key,
513
814
  label: field.title,
@@ -517,22 +818,50 @@ function FieldShell({ field, path, id, value, onChange, readOnly, issue, action,
517
818
  env.onComment?.(path, field);
518
819
  setCommentsOpen(false);
519
820
  } : void 0
520
- })
521
- }) : null]
522
- })
523
- }), ai ? /* @__PURE__ */ jsx(PopoverContent, {
821
+ }, void 0, false, {
822
+ fileName: _jsxFileName,
823
+ lineNumber: 465,
824
+ columnNumber: 15
825
+ }, this)
826
+ }, void 0, false, {
827
+ fileName: _jsxFileName,
828
+ lineNumber: 464,
829
+ columnNumber: 13
830
+ }, this) : null]
831
+ }, void 0, true, {
832
+ fileName: _jsxFileName,
833
+ lineNumber: 454,
834
+ columnNumber: 9
835
+ }, this)
836
+ }, void 0, false, {
837
+ fileName: _jsxFileName,
838
+ lineNumber: 453,
839
+ columnNumber: 7
840
+ }, this), ai ? /* @__PURE__ */ jsxDEV(PopoverContent, {
524
841
  align: "start",
525
842
  sideOffset: 8,
526
843
  className: "w-[clamp(300px,var(--anchor-width),440px)] p-0",
527
- children: /* @__PURE__ */ jsx(AiRewrite, {
844
+ children: /* @__PURE__ */ jsxDEV(AiRewrite, {
528
845
  field,
529
846
  path,
530
847
  value,
531
848
  onChange,
532
849
  onClose: () => setAi(false)
533
- })
534
- }) : null]
535
- });
850
+ }, void 0, false, {
851
+ fileName: _jsxFileName,
852
+ lineNumber: 486,
853
+ columnNumber: 11
854
+ }, this)
855
+ }, void 0, false, {
856
+ fileName: _jsxFileName,
857
+ lineNumber: 485,
858
+ columnNumber: 9
859
+ }, this) : null]
860
+ }, void 0, true, {
861
+ fileName: _jsxFileName,
862
+ lineNumber: 452,
863
+ columnNumber: 5
864
+ }, this);
536
865
  }
537
866
  /** V2 features/comments fieldPopoverCollision: inside a scrolling panel, collide with that panel below its sticky header. */
538
867
  function fieldPopoverCollision(anchor) {
@@ -553,52 +882,92 @@ function fieldPopoverCollision(anchor) {
553
882
  /** Comment count chip (always visible) or the hover-revealed "Add comment" icon. `useCount` (the host's store hook)
554
883
  * replaces `count` when the kit draws the comments in place. */
555
884
  function CommentButton({ useCount, ...props }) {
556
- return useCount ? /* @__PURE__ */ jsx(StoreCommentButton, {
885
+ return useCount ? /* @__PURE__ */ jsxDEV(StoreCommentButton, {
557
886
  useCount,
558
887
  ...props
559
- }) : /* @__PURE__ */ jsx(CountedCommentButton, { ...props });
888
+ }, void 0, false, {
889
+ fileName: _jsxFileName,
890
+ lineNumber: 506,
891
+ columnNumber: 21
892
+ }, this) : /* @__PURE__ */ jsxDEV(CountedCommentButton, { ...props }, void 0, false, {
893
+ fileName: _jsxFileName,
894
+ lineNumber: 506,
895
+ columnNumber: 77
896
+ }, this);
560
897
  }
561
898
  function StoreCommentButton({ useCount, ...props }) {
562
- return /* @__PURE__ */ jsx(CountedCommentButton, {
899
+ return /* @__PURE__ */ jsxDEV(CountedCommentButton, {
563
900
  ...props,
564
901
  count: useCount()
565
- });
902
+ }, void 0, false, {
903
+ fileName: _jsxFileName,
904
+ lineNumber: 515,
905
+ columnNumber: 10
906
+ }, this);
566
907
  }
567
908
  function CountedCommentButton({ count, label, open, onOpen }) {
568
- if (count > 0) return /* @__PURE__ */ jsx(Tooltip, {
909
+ if (count > 0) return /* @__PURE__ */ jsxDEV(Tooltip, {
569
910
  content: `${count} open comment${count === 1 ? "" : "s"} on ${label}`,
570
- children: /* @__PURE__ */ jsxs("button", {
911
+ children: /* @__PURE__ */ jsxDEV("button", {
571
912
  type: "button",
572
913
  onClick: (e) => onOpen(e.currentTarget),
573
914
  "data-state": open ? "open" : "closed",
574
915
  "aria-label": `${count} open comments on ${label}`,
575
916
  className: "-my-0.5 inline-flex h-5 items-center gap-0.5 rounded-kit-md px-1 text-kit-2xs font-medium text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg data-[state=open]:bg-kit-hover data-[state=open]:text-kit-fg",
576
- children: [/* @__PURE__ */ jsx(IconMessage, {
917
+ children: [/* @__PURE__ */ jsxDEV(IconMessage, {
577
918
  className: "size-3.5",
578
919
  stroke: 1.5,
579
920
  "aria-hidden": true
580
- }), /* @__PURE__ */ jsx("span", {
921
+ }, void 0, false, {
922
+ fileName: _jsxFileName,
923
+ lineNumber: 528,
924
+ columnNumber: 11
925
+ }, this), /* @__PURE__ */ jsxDEV("span", {
581
926
  className: "tabular-nums",
582
927
  children: count
583
- })]
584
- })
585
- });
586
- return /* @__PURE__ */ jsx(Tooltip, {
928
+ }, void 0, false, {
929
+ fileName: _jsxFileName,
930
+ lineNumber: 529,
931
+ columnNumber: 11
932
+ }, this)]
933
+ }, void 0, true, {
934
+ fileName: _jsxFileName,
935
+ lineNumber: 521,
936
+ columnNumber: 9
937
+ }, this)
938
+ }, void 0, false, {
939
+ fileName: _jsxFileName,
940
+ lineNumber: 520,
941
+ columnNumber: 7
942
+ }, this);
943
+ return /* @__PURE__ */ jsxDEV(Tooltip, {
587
944
  content: "Add comment",
588
- children: /* @__PURE__ */ jsx("button", {
945
+ children: /* @__PURE__ */ jsxDEV("button", {
589
946
  type: "button",
590
947
  onClick: (e) => onOpen(e.currentTarget),
591
948
  "data-state": open ? "open" : "closed",
592
949
  "aria-label": `Add comment to ${label}`,
593
950
  "data-field-reveal": "",
594
951
  className: cn("-my-0.5 size-6 items-center justify-center rounded-kit-md text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg"),
595
- children: /* @__PURE__ */ jsx(IconMessagePlus, {
952
+ children: /* @__PURE__ */ jsxDEV(IconMessagePlus, {
596
953
  className: "size-3.5",
597
954
  stroke: 1.5,
598
955
  "aria-hidden": true
599
- })
600
- })
601
- });
956
+ }, void 0, false, {
957
+ fileName: _jsxFileName,
958
+ lineNumber: 542,
959
+ columnNumber: 9
960
+ }, this)
961
+ }, void 0, false, {
962
+ fileName: _jsxFileName,
963
+ lineNumber: 535,
964
+ columnNumber: 7
965
+ }, this)
966
+ }, void 0, false, {
967
+ fileName: _jsxFileName,
968
+ lineNumber: 534,
969
+ columnNumber: 5
970
+ }, this);
602
971
  }
603
972
  /** Who is in this field: 16px faces in the label row's action slot (no overlap with the label or the input), name on hover. */
604
973
  function PeerStack({ peers, size = 16 }) {
@@ -612,18 +981,18 @@ function PeerStack({ peers, size = 16 }) {
612
981
  });
613
982
  const box = size + band * 2;
614
983
  const overlap = -(Math.round(size * .25) + band * 2);
615
- return /* @__PURE__ */ jsx(AnimatePresence, {
984
+ return /* @__PURE__ */ jsxDEV(AnimatePresence, {
616
985
  initial: false,
617
- children: shown.length ? /* @__PURE__ */ jsxs(motion.span, {
986
+ children: shown.length ? /* @__PURE__ */ jsxDEV(motion.span, {
618
987
  initial: { opacity: 0 },
619
988
  animate: { opacity: 1 },
620
989
  exit: { opacity: 0 },
621
990
  transition: { duration: .25 },
622
991
  className: "flex h-5 items-center",
623
992
  "data-slot": "field-presence",
624
- children: [shown.map((p, i) => /* @__PURE__ */ jsx(Tooltip, {
993
+ children: [shown.map((p, i) => /* @__PURE__ */ jsxDEV(Tooltip, {
625
994
  content: `${p.name} · ${p.status === "viewing" ? "Viewing" : "Editing"} this field`,
626
- children: /* @__PURE__ */ jsx("span", {
995
+ children: /* @__PURE__ */ jsxDEV("span", {
627
996
  style: {
628
997
  marginLeft: i ? overlap : 0,
629
998
  zIndex: shown.length - i + 1,
@@ -631,7 +1000,7 @@ function PeerStack({ peers, size = 16 }) {
631
1000
  height: box
632
1001
  },
633
1002
  className: cn("relative inline-flex shrink-0 rounded-full transition-transform duration-150 hover:!z-30 hover:-translate-y-px", p.status === "viewing" && "opacity-60"),
634
- children: /* @__PURE__ */ jsx(Avatar, {
1003
+ children: /* @__PURE__ */ jsxDEV(Avatar, {
635
1004
  name: p.name,
636
1005
  src: p.avatar,
637
1006
  size,
@@ -639,11 +1008,23 @@ function PeerStack({ peers, size = 16 }) {
639
1008
  ringWidth: 1,
640
1009
  ringAccent: p.color ?? presenceColor(p.id ?? p.name),
641
1010
  decorative: true
642
- })
643
- })
644
- }, p.name + i)), rest > 0 ? /* @__PURE__ */ jsx(Tooltip, {
1011
+ }, void 0, false, {
1012
+ fileName: _jsxFileName,
1013
+ lineNumber: 570,
1014
+ columnNumber: 17
1015
+ }, this)
1016
+ }, void 0, false, {
1017
+ fileName: _jsxFileName,
1018
+ lineNumber: 566,
1019
+ columnNumber: 15
1020
+ }, this)
1021
+ }, p.name + i, false, {
1022
+ fileName: _jsxFileName,
1023
+ lineNumber: 565,
1024
+ columnNumber: 13
1025
+ }, this)), rest > 0 ? /* @__PURE__ */ jsxDEV(Tooltip, {
645
1026
  content: peers.slice(shown.length).map((p) => p.name).join(", "),
646
- children: /* @__PURE__ */ jsx("span", {
1027
+ children: /* @__PURE__ */ jsxDEV("span", {
647
1028
  style: {
648
1029
  marginLeft: overlap,
649
1030
  width: box,
@@ -651,7 +1032,7 @@ function PeerStack({ peers, size = 16 }) {
651
1032
  padding: band
652
1033
  },
653
1034
  className: "relative z-[1] inline-flex shrink-0",
654
- children: /* @__PURE__ */ jsxs("span", {
1035
+ children: /* @__PURE__ */ jsxDEV("span", {
655
1036
  style: {
656
1037
  width: size,
657
1038
  height: size,
@@ -660,11 +1041,31 @@ function PeerStack({ peers, size = 16 }) {
660
1041
  },
661
1042
  className: "inline-flex items-center justify-center rounded-full bg-kit-muted font-medium leading-none tabular-nums text-kit-fg-2",
662
1043
  children: ["+", rest]
663
- })
664
- })
665
- }) : null]
666
- }, "peers") : null
667
- });
1044
+ }, void 0, true, {
1045
+ fileName: _jsxFileName,
1046
+ lineNumber: 577,
1047
+ columnNumber: 17
1048
+ }, this)
1049
+ }, void 0, false, {
1050
+ fileName: _jsxFileName,
1051
+ lineNumber: 576,
1052
+ columnNumber: 15
1053
+ }, this)
1054
+ }, void 0, false, {
1055
+ fileName: _jsxFileName,
1056
+ lineNumber: 575,
1057
+ columnNumber: 13
1058
+ }, this) : null]
1059
+ }, "peers", true, {
1060
+ fileName: _jsxFileName,
1061
+ lineNumber: 561,
1062
+ columnNumber: 9
1063
+ }, this) : null
1064
+ }, void 0, false, {
1065
+ fileName: _jsxFileName,
1066
+ lineNumber: 559,
1067
+ columnNumber: 5
1068
+ }, this);
668
1069
  }
669
1070
  function FieldMenu({ field, path, value, onChange, readOnly, changed, onAi }) {
670
1071
  const form = useForm();
@@ -676,24 +1077,40 @@ function FieldMenu({ field, path, value, onChange, readOnly, changed, onAi }) {
676
1077
  const prose = field.type === "string" || field.type === "text" || field.type === "richtext" && !!richText;
677
1078
  const editable = !readOnly;
678
1079
  const dev = seesDevSurfaces(env);
679
- return /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(Tooltip, {
1080
+ return /* @__PURE__ */ jsxDEV(Menu, { children: [/* @__PURE__ */ jsxDEV(Tooltip, {
680
1081
  content: "Field actions",
681
- children: /* @__PURE__ */ jsx(MenuTrigger, {
1082
+ children: /* @__PURE__ */ jsxDEV(MenuTrigger, {
682
1083
  "aria-label": `${field.title} actions`,
683
1084
  "data-field-reveal": "",
684
1085
  className: cn("-my-0.5 size-6 items-center justify-center rounded-kit-md text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg data-[popup-open]:bg-kit-hover data-[popup-open]:text-kit-fg"),
685
- children: /* @__PURE__ */ jsx(IconDots, {
1086
+ children: /* @__PURE__ */ jsxDEV(IconDots, {
686
1087
  className: "size-3.5",
687
1088
  stroke: 1.5,
688
1089
  "aria-hidden": true
689
- })
690
- })
691
- }), /* @__PURE__ */ jsxs(MenuContent, {
1090
+ }, void 0, false, {
1091
+ fileName: _jsxFileName,
1092
+ lineNumber: 611,
1093
+ columnNumber: 11
1094
+ }, this)
1095
+ }, void 0, false, {
1096
+ fileName: _jsxFileName,
1097
+ lineNumber: 607,
1098
+ columnNumber: 9
1099
+ }, this)
1100
+ }, void 0, false, {
1101
+ fileName: _jsxFileName,
1102
+ lineNumber: 606,
1103
+ columnNumber: 7
1104
+ }, this), /* @__PURE__ */ jsxDEV(MenuContent, {
692
1105
  align: "end",
693
1106
  className: "w-60",
694
1107
  children: [
695
- /* @__PURE__ */ jsx(MenuItem, {
696
- icon: /* @__PURE__ */ jsx(IconCopy, { stroke: 1.5 }),
1108
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1109
+ icon: /* @__PURE__ */ jsxDEV(IconCopy, { stroke: 1.5 }, void 0, false, {
1110
+ fileName: _jsxFileName,
1111
+ lineNumber: 616,
1112
+ columnNumber: 17
1113
+ }, this),
697
1114
  onClick: () => {
698
1115
  const html = richTextHtml(richText, field, path, value);
699
1116
  clip = {
@@ -707,15 +1124,27 @@ function FieldMenu({ field, path, value, onChange, readOnly, changed, onAi }) {
707
1124
  toast?.success(`${field.title} copied`);
708
1125
  },
709
1126
  children: "Copy value"
710
- }),
711
- editable ? /* @__PURE__ */ jsx(PasteItem, {
1127
+ }, void 0, false, {
1128
+ fileName: _jsxFileName,
1129
+ lineNumber: 615,
1130
+ columnNumber: 9
1131
+ }, this),
1132
+ editable ? /* @__PURE__ */ jsxDEV(PasteItem, {
712
1133
  field,
713
1134
  path,
714
1135
  value,
715
1136
  onChange
716
- }) : null,
717
- editable && form?.hasPublished && changed ? /* @__PURE__ */ jsx(MenuItem, {
718
- icon: /* @__PURE__ */ jsx(IconRotate, { stroke: 1.5 }),
1137
+ }, void 0, false, {
1138
+ fileName: _jsxFileName,
1139
+ lineNumber: 627,
1140
+ columnNumber: 21
1141
+ }, this) : null,
1142
+ editable && form?.hasPublished && changed ? /* @__PURE__ */ jsxDEV(MenuItem, {
1143
+ icon: /* @__PURE__ */ jsxDEV(IconRotate, { stroke: 1.5 }, void 0, false, {
1144
+ fileName: _jsxFileName,
1145
+ lineNumber: 630,
1146
+ columnNumber: 19
1147
+ }, this),
719
1148
  onClick: () => {
720
1149
  const prev = value;
721
1150
  onChange(form.publishedAt(path));
@@ -728,50 +1157,118 @@ function FieldMenu({ field, path, value, onChange, readOnly, changed, onAi }) {
728
1157
  });
729
1158
  },
730
1159
  children: "Reset to published"
731
- }) : null,
732
- env.onFieldHistory ? /* @__PURE__ */ jsx(MenuItem, {
733
- icon: /* @__PURE__ */ jsx(IconHistory, { stroke: 1.5 }),
1160
+ }, void 0, false, {
1161
+ fileName: _jsxFileName,
1162
+ lineNumber: 629,
1163
+ columnNumber: 11
1164
+ }, this) : null,
1165
+ env.onFieldHistory ? /* @__PURE__ */ jsxDEV(MenuItem, {
1166
+ icon: /* @__PURE__ */ jsxDEV(IconHistory, { stroke: 1.5 }, void 0, false, {
1167
+ fileName: _jsxFileName,
1168
+ lineNumber: 641,
1169
+ columnNumber: 27
1170
+ }, this),
734
1171
  onClick: () => env.onFieldHistory(path, field),
735
1172
  children: "History"
736
- }) : null,
737
- FieldMenuExtras ? /* @__PURE__ */ jsx(FieldMenuExtras, {
1173
+ }, void 0, false, {
1174
+ fileName: _jsxFileName,
1175
+ lineNumber: 641,
1176
+ columnNumber: 11
1177
+ }, this) : null,
1178
+ FieldMenuExtras ? /* @__PURE__ */ jsxDEV(FieldMenuExtras, {
738
1179
  field,
739
1180
  path,
740
1181
  readOnly
741
- }) : null,
742
- editable && prose && aiRewrite ? /* @__PURE__ */ jsxs(Fragment, { children: [
743
- /* @__PURE__ */ jsx(MenuSeparator, {}),
744
- form?.aiKeys.has(key) ? /* @__PURE__ */ jsx(MenuItem, {
745
- icon: /* @__PURE__ */ jsx(IconArrowBackUp, { stroke: 1.5 }),
1182
+ }, void 0, false, {
1183
+ fileName: _jsxFileName,
1184
+ lineNumber: 645,
1185
+ columnNumber: 28
1186
+ }, this) : null,
1187
+ editable && prose && aiRewrite ? /* @__PURE__ */ jsxDEV(Fragment, { children: [
1188
+ /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
1189
+ fileName: _jsxFileName,
1190
+ lineNumber: 648,
1191
+ columnNumber: 13
1192
+ }, this),
1193
+ form?.aiKeys.has(key) ? /* @__PURE__ */ jsxDEV(MenuItem, {
1194
+ icon: /* @__PURE__ */ jsxDEV(IconArrowBackUp, { stroke: 1.5 }, void 0, false, {
1195
+ fileName: _jsxFileName,
1196
+ lineNumber: 651,
1197
+ columnNumber: 23
1198
+ }, this),
746
1199
  onClick: () => {
747
1200
  form.undo(key);
748
1201
  form.markAi(key, false);
749
1202
  },
750
1203
  children: "Undo AI change"
751
- }) : null,
752
- /* @__PURE__ */ jsx(MenuItem, {
753
- icon: /* @__PURE__ */ jsx(Sparkle, { size: 16 }),
1204
+ }, void 0, false, {
1205
+ fileName: _jsxFileName,
1206
+ lineNumber: 650,
1207
+ columnNumber: 15
1208
+ }, this) : null,
1209
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1210
+ icon: /* @__PURE__ */ jsxDEV(Sparkle, { size: 16 }, void 0, false, {
1211
+ fileName: _jsxFileName,
1212
+ lineNumber: 660,
1213
+ columnNumber: 29
1214
+ }, this),
754
1215
  onClick: () => window.setTimeout(onAi, 0),
755
1216
  children: "Rewrite with AI"
756
- })
757
- ] }) : null,
758
- dev ? /* @__PURE__ */ jsx(MenuSeparator, {}) : null,
759
- dev ? /* @__PURE__ */ jsx(MenuItem, {
760
- icon: /* @__PURE__ */ jsx(IconBraces, { stroke: 1.5 }),
1217
+ }, void 0, false, {
1218
+ fileName: _jsxFileName,
1219
+ lineNumber: 660,
1220
+ columnNumber: 13
1221
+ }, this)
1222
+ ] }, void 0, true, {
1223
+ fileName: _jsxFileName,
1224
+ lineNumber: 647,
1225
+ columnNumber: 11
1226
+ }, this) : null,
1227
+ dev ? /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
1228
+ fileName: _jsxFileName,
1229
+ lineNumber: 665,
1230
+ columnNumber: 16
1231
+ }, this) : null,
1232
+ dev ? /* @__PURE__ */ jsxDEV(MenuItem, {
1233
+ icon: /* @__PURE__ */ jsxDEV(IconBraces, { stroke: 1.5 }, void 0, false, {
1234
+ fileName: _jsxFileName,
1235
+ lineNumber: 668,
1236
+ columnNumber: 19
1237
+ }, this),
761
1238
  onClick: () => {
762
1239
  navigator.clipboard?.writeText(api).catch(() => {});
763
1240
  toast?.success(`Copied ${api}`);
764
1241
  },
765
- children: /* @__PURE__ */ jsxs("span", {
1242
+ children: /* @__PURE__ */ jsxDEV("span", {
766
1243
  className: "flex w-full items-center justify-between gap-3",
767
- children: ["Copy API name", /* @__PURE__ */ jsx("span", {
1244
+ children: ["Copy API name", /* @__PURE__ */ jsxDEV("span", {
768
1245
  className: "truncate font-kit-mono text-kit-2xs text-kit-fg-3",
769
1246
  children: api.length > 22 ? `…${api.slice(-20)}` : api
770
- })]
771
- })
772
- }) : null
1247
+ }, void 0, false, {
1248
+ fileName: _jsxFileName,
1249
+ lineNumber: 676,
1250
+ columnNumber: 15
1251
+ }, this)]
1252
+ }, void 0, true, {
1253
+ fileName: _jsxFileName,
1254
+ lineNumber: 674,
1255
+ columnNumber: 13
1256
+ }, this)
1257
+ }, void 0, false, {
1258
+ fileName: _jsxFileName,
1259
+ lineNumber: 667,
1260
+ columnNumber: 11
1261
+ }, this) : null
773
1262
  ]
774
- })] });
1263
+ }, void 0, true, {
1264
+ fileName: _jsxFileName,
1265
+ lineNumber: 614,
1266
+ columnNumber: 7
1267
+ }, this)] }, void 0, true, {
1268
+ fileName: _jsxFileName,
1269
+ lineNumber: 605,
1270
+ columnNumber: 5
1271
+ }, this);
775
1272
  }
776
1273
  /** Reads the shared clipboard when the menu opens (it mounts with the popup), so a copy in another field is seen. */
777
1274
  function PasteItem({ field, path, value, onChange }) {
@@ -780,8 +1277,12 @@ function PasteItem({ field, path, value, onChange }) {
780
1277
  const needsCodec = !!clip && field.type === "richtext" && clip.type !== "richtext" && !richText;
781
1278
  const pasteOk = clip && !needsCodec && (clip.type === field.type || textual && isTextual(clip.type));
782
1279
  const pasteReason = !clip ? "Copy a value from a field first." : needsCodec ? "This rich text field takes a copied rich text value only." : pasteOk ? null : `Clipboard holds ${kindOf(clip.type)}. This field takes ${kindOf(field.type)}.`;
783
- return /* @__PURE__ */ jsx(MenuItem, {
784
- icon: /* @__PURE__ */ jsx(IconClipboard, { stroke: 1.5 }),
1280
+ return /* @__PURE__ */ jsxDEV(MenuItem, {
1281
+ icon: /* @__PURE__ */ jsxDEV(IconClipboard, { stroke: 1.5 }, void 0, false, {
1282
+ fileName: _jsxFileName,
1283
+ lineNumber: 700,
1284
+ columnNumber: 13
1285
+ }, this),
785
1286
  disabled: !pasteOk,
786
1287
  className: cn(pasteReason && "h-auto py-1.5"),
787
1288
  onClick: () => {
@@ -805,14 +1306,26 @@ function PasteItem({ field, path, value, onChange }) {
805
1306
  duration: 1e4
806
1307
  });
807
1308
  },
808
- children: /* @__PURE__ */ jsxs("span", {
1309
+ children: /* @__PURE__ */ jsxDEV("span", {
809
1310
  className: "flex flex-col",
810
- children: ["Paste value", pasteReason ? /* @__PURE__ */ jsx("span", {
1311
+ children: ["Paste value", pasteReason ? /* @__PURE__ */ jsxDEV("span", {
811
1312
  className: "whitespace-normal text-kit-xs text-kit-fg-3",
812
1313
  children: pasteReason
813
- }) : null]
814
- })
815
- });
1314
+ }, void 0, false, {
1315
+ fileName: _jsxFileName,
1316
+ lineNumber: 722,
1317
+ columnNumber: 24
1318
+ }, this) : null]
1319
+ }, void 0, true, {
1320
+ fileName: _jsxFileName,
1321
+ lineNumber: 720,
1322
+ columnNumber: 7
1323
+ }, this)
1324
+ }, void 0, false, {
1325
+ fileName: _jsxFileName,
1326
+ lineNumber: 699,
1327
+ columnNumber: 5
1328
+ }, this);
816
1329
  }
817
1330
  function structuredCloneish(v) {
818
1331
  try {
@@ -858,7 +1371,11 @@ function AiRewrite({ field, path, value, onChange, onClose }) {
858
1371
  onChange(next);
859
1372
  form?.markAi(key, true);
860
1373
  toast?.("Rewritten with AI", {
861
- icon: /* @__PURE__ */ jsx(Sparkle, { size: 14 }),
1374
+ icon: /* @__PURE__ */ jsxDEV(Sparkle, { size: 14 }, void 0, false, {
1375
+ fileName: _jsxFileName,
1376
+ lineNumber: 778,
1377
+ columnNumber: 13
1378
+ }, this),
862
1379
  action: {
863
1380
  label: "Undo",
864
1381
  onClick: () => {
@@ -870,31 +1387,55 @@ function AiRewrite({ field, path, value, onChange, onClose }) {
870
1387
  });
871
1388
  onClose();
872
1389
  };
873
- return /* @__PURE__ */ jsxs("div", {
1390
+ return /* @__PURE__ */ jsxDEV("div", {
874
1391
  className: "flex flex-col",
875
1392
  children: [
876
- /* @__PURE__ */ jsxs("div", {
1393
+ /* @__PURE__ */ jsxDEV("div", {
877
1394
  className: "flex items-center gap-2 border-b border-kit-line px-3 py-2.5",
878
- children: [/* @__PURE__ */ jsx(Sparkle, { size: 16 }), /* @__PURE__ */ jsxs("span", {
1395
+ children: [/* @__PURE__ */ jsxDEV(Sparkle, { size: 16 }, void 0, false, {
1396
+ fileName: _jsxFileName,
1397
+ lineNumber: 793,
1398
+ columnNumber: 9
1399
+ }, this), /* @__PURE__ */ jsxDEV("span", {
879
1400
  className: "text-kit-sm font-medium text-kit-fg",
880
1401
  children: ["Rewrite ", field.title.toLowerCase()]
881
- })]
882
- }),
883
- /* @__PURE__ */ jsx("div", {
1402
+ }, void 0, true, {
1403
+ fileName: _jsxFileName,
1404
+ lineNumber: 794,
1405
+ columnNumber: 9
1406
+ }, this)]
1407
+ }, void 0, true, {
1408
+ fileName: _jsxFileName,
1409
+ lineNumber: 792,
1410
+ columnNumber: 7
1411
+ }, this),
1412
+ /* @__PURE__ */ jsxDEV("div", {
884
1413
  className: "flex flex-wrap gap-1 px-3 pt-2.5",
885
- children: AI_PRESETS.map((p) => /* @__PURE__ */ jsx("button", {
1414
+ children: AI_PRESETS.map((p) => /* @__PURE__ */ jsxDEV("button", {
886
1415
  type: "button",
887
1416
  onClick: () => run(p.id),
888
1417
  className: cn("h-6 rounded-full border px-2 text-kit-xs transition-colors", preset === p.id ? "border-[var(--kit-emphasis-line)] bg-kit-surface text-kit-fg" : "border-kit-line text-kit-fg-2 hover:border-kit-line-strong hover:text-kit-fg"),
889
1418
  children: p.label
890
- }, p.id))
891
- }),
892
- /* @__PURE__ */ jsx("div", {
1419
+ }, p.id, false, {
1420
+ fileName: _jsxFileName,
1421
+ lineNumber: 798,
1422
+ columnNumber: 11
1423
+ }, this))
1424
+ }, void 0, false, {
1425
+ fileName: _jsxFileName,
1426
+ lineNumber: 796,
1427
+ columnNumber: 7
1428
+ }, this),
1429
+ /* @__PURE__ */ jsxDEV("div", {
893
1430
  className: "px-3 py-3",
894
- children: !preset ? /* @__PURE__ */ jsx("p", {
1431
+ children: !preset ? /* @__PURE__ */ jsxDEV("p", {
895
1432
  className: "text-kit-xs text-kit-fg-3",
896
1433
  children: "Pick a direction. You'll see the suggestion before anything changes."
897
- }) : failed ? /* @__PURE__ */ jsxs("p", {
1434
+ }, void 0, false, {
1435
+ fileName: _jsxFileName,
1436
+ lineNumber: 810,
1437
+ columnNumber: 11
1438
+ }, this) : failed ? /* @__PURE__ */ jsxDEV("p", {
898
1439
  role: "alert",
899
1440
  className: "text-kit-xs text-kit-danger-fg",
900
1441
  children: [
@@ -902,50 +1443,106 @@ function AiRewrite({ field, path, value, onChange, onClose }) {
902
1443
  field.title.toLowerCase(),
903
1444
  ". Try again."
904
1445
  ]
905
- }) : out == null ? /* @__PURE__ */ jsx("p", {
1446
+ }, void 0, true, {
1447
+ fileName: _jsxFileName,
1448
+ lineNumber: 812,
1449
+ columnNumber: 11
1450
+ }, this) : out == null ? /* @__PURE__ */ jsxDEV("p", {
906
1451
  className: "text-kit-sm",
907
- children: /* @__PURE__ */ jsxs(Shimmer, { children: [
1452
+ children: /* @__PURE__ */ jsxDEV(Shimmer, { children: [
908
1453
  "Rewriting ",
909
1454
  field.title.toLowerCase(),
910
1455
  "…"
911
- ] })
912
- }) : /* @__PURE__ */ jsx("div", {
1456
+ ] }, void 0, true, {
1457
+ fileName: _jsxFileName,
1458
+ lineNumber: 817,
1459
+ columnNumber: 13
1460
+ }, this)
1461
+ }, void 0, false, {
1462
+ fileName: _jsxFileName,
1463
+ lineNumber: 816,
1464
+ columnNumber: 11
1465
+ }, this) : /* @__PURE__ */ jsxDEV("div", {
913
1466
  className: "rounded-kit-lg bg-kit-subtle p-2.5 text-kit-sm leading-5 text-kit-fg",
914
- children: /* @__PURE__ */ jsx(TypeOut, { text: out })
915
- })
916
- }),
917
- /* @__PURE__ */ jsxs("div", {
1467
+ children: /* @__PURE__ */ jsxDEV(TypeOut, { text: out }, void 0, false, {
1468
+ fileName: _jsxFileName,
1469
+ lineNumber: 821,
1470
+ columnNumber: 13
1471
+ }, this)
1472
+ }, void 0, false, {
1473
+ fileName: _jsxFileName,
1474
+ lineNumber: 820,
1475
+ columnNumber: 11
1476
+ }, this)
1477
+ }, void 0, false, {
1478
+ fileName: _jsxFileName,
1479
+ lineNumber: 808,
1480
+ columnNumber: 7
1481
+ }, this),
1482
+ /* @__PURE__ */ jsxDEV("div", {
918
1483
  className: "flex items-center justify-between gap-2 border-t border-kit-line px-3 py-2",
919
- children: [/* @__PURE__ */ jsx(Button, {
1484
+ children: [/* @__PURE__ */ jsxDEV(Button, {
920
1485
  size: "xs",
921
1486
  variant: "ghost",
922
1487
  onClick: onClose,
923
1488
  children: "Discard"
924
- }), /* @__PURE__ */ jsxs("div", {
1489
+ }, void 0, false, {
1490
+ fileName: _jsxFileName,
1491
+ lineNumber: 826,
1492
+ columnNumber: 9
1493
+ }, this), /* @__PURE__ */ jsxDEV("div", {
925
1494
  className: "flex gap-1",
926
- children: [out || failed ? /* @__PURE__ */ jsx(Button, {
1495
+ children: [out || failed ? /* @__PURE__ */ jsxDEV(Button, {
927
1496
  size: "xs",
928
1497
  variant: "ghost",
929
- leftIcon: /* @__PURE__ */ jsx(IconRefresh, { stroke: 1.5 }),
1498
+ leftIcon: /* @__PURE__ */ jsxDEV(IconRefresh, { stroke: 1.5 }, void 0, false, {
1499
+ fileName: _jsxFileName,
1500
+ lineNumber: 831,
1501
+ columnNumber: 57
1502
+ }, this),
930
1503
  onClick: () => preset && run(preset),
931
1504
  children: "Try again"
932
- }) : null, /* @__PURE__ */ jsx(Button, {
1505
+ }, void 0, false, {
1506
+ fileName: _jsxFileName,
1507
+ lineNumber: 831,
1508
+ columnNumber: 13
1509
+ }, this) : null, /* @__PURE__ */ jsxDEV(Button, {
933
1510
  size: "xs",
934
1511
  variant: "primary",
935
1512
  disabled: !out,
936
1513
  onClick: apply,
937
1514
  children: "Apply"
938
- })]
939
- })]
940
- })
1515
+ }, void 0, false, {
1516
+ fileName: _jsxFileName,
1517
+ lineNumber: 835,
1518
+ columnNumber: 11
1519
+ }, this)]
1520
+ }, void 0, true, {
1521
+ fileName: _jsxFileName,
1522
+ lineNumber: 829,
1523
+ columnNumber: 9
1524
+ }, this)]
1525
+ }, void 0, true, {
1526
+ fileName: _jsxFileName,
1527
+ lineNumber: 825,
1528
+ columnNumber: 7
1529
+ }, this)
941
1530
  ]
942
- });
1531
+ }, void 0, true, {
1532
+ fileName: _jsxFileName,
1533
+ lineNumber: 791,
1534
+ columnNumber: 5
1535
+ }, this);
943
1536
  }
944
1537
  function Shimmer({ children }) {
945
- return /* @__PURE__ */ jsx("span", {
1538
+ return /* @__PURE__ */ jsxDEV("span", {
946
1539
  className: "bg-[linear-gradient(90deg,var(--kit-fg-3)_0%,var(--kit-fg)_45%,var(--kit-fg-3)_90%)] bg-[length:200%_100%] bg-clip-text text-transparent [animation:kit-shimmer-text_1.6s_linear_infinite] motion-reduce:[animation:none]",
947
1540
  children
948
- });
1541
+ }, void 0, false, {
1542
+ fileName: _jsxFileName,
1543
+ lineNumber: 847,
1544
+ columnNumber: 5
1545
+ }, this);
949
1546
  }
950
1547
  /**
951
1548
  * Reduced motion as the app reads it: the OS query or the in-app preference (which stamps `data-reduce-motion` on
@@ -978,10 +1575,18 @@ function TypeOut({ text, speed = 14 }) {
978
1575
  speed,
979
1576
  reduce
980
1577
  ]);
981
- return /* @__PURE__ */ jsxs("span", { children: [text.slice(0, n), n < text.length ? /* @__PURE__ */ jsx("span", {
1578
+ return /* @__PURE__ */ jsxDEV("span", { children: [text.slice(0, n), n < text.length ? /* @__PURE__ */ jsxDEV("span", {
982
1579
  "data-typeout-caret": true,
983
1580
  className: "ml-0.5 inline-block h-[1em] w-[2px] translate-y-[2px] bg-kit-fg motion-safe:animate-pulse"
984
- }) : null] });
1581
+ }, void 0, false, {
1582
+ fileName: _jsxFileName,
1583
+ lineNumber: 883,
1584
+ columnNumber: 26
1585
+ }, this) : null] }, void 0, true, {
1586
+ fileName: _jsxFileName,
1587
+ lineNumber: 881,
1588
+ columnNumber: 5
1589
+ }, this);
985
1590
  }
986
1591
  //#endregion
987
1592
  export { FieldShell, LABEL_HINT_AT, PeerStack, apiName, resetFieldClipboard };