@bettercms-ai/kit 3.0.2 → 3.1.0

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