@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
@@ -16,7 +16,7 @@ import { ChoiceSwitch } from "../../ui/choice-switch.js";
16
16
  import { LinkAddressButton, isScriptHref, tableLink } from "./table-link.js";
17
17
  import { refLabel, useRefSearch } from "./refs.js";
18
18
  import * as React from "react";
19
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
19
+ import { Fragment, jsxDEV } from "react/jsx-dev-runtime";
20
20
  import { IconAlignLeft, IconArrowDown, IconArrowUp, IconArrowsMaximize, IconCheck, IconChevronDown, IconCurrencyDollar, IconDots, IconFileDatabase, IconFolder, IconGripVertical, IconHash, IconLayoutColumns, IconLetterT, IconLink, IconList, IconPlus, IconStar, IconTable, IconToggleRight } from "@tabler/icons-react";
21
21
  import { ContextMenu } from "@base-ui/react/context-menu";
22
22
  //#region src/controls/table/table-editor.tsx
@@ -38,6 +38,7 @@ import { ContextMenu } from "@base-ui/react/context-menu";
38
38
  * across). The cell context menu is Base UI's ContextMenu. Toasts come from KitServices (absent → silent). Link cells use
39
39
  * the table's own address editor (table-link.tsx) in the spreadsheet and the global LinkField in a drilled row (as V2); reference cells search through the host (refs.ts).
40
40
  */
41
+ var _jsxFileName = "D:/Github/bettercms/bettercms-backend/packages/kit/src/controls/table/table-editor.tsx";
41
42
  var TYPE_UI = {
42
43
  text: {
43
44
  label: "Text",
@@ -87,11 +88,15 @@ var CURRENCIES = [
87
88
  ];
88
89
  var TypeIcon = ({ type, className }) => {
89
90
  const I = TYPE_UI[type].icon;
90
- return /* @__PURE__ */ jsx(I, {
91
+ return /* @__PURE__ */ jsxDEV(I, {
91
92
  className: cn("size-3.5 shrink-0 text-kit-fg-4", className),
92
93
  stroke: 1.75,
93
94
  "aria-hidden": true
94
- });
95
+ }, void 0, false, {
96
+ fileName: _jsxFileName,
97
+ lineNumber: 96,
98
+ columnNumber: 10
99
+ }, void 0);
95
100
  };
96
101
  var mapRow = (key, f) => (t) => ({
97
102
  ...t,
@@ -252,13 +257,21 @@ var copyColumn = (t, i) => {
252
257
  };
253
258
  /** CPO D49: the ONE way into the spreadsheet — opens it in the shared ExpandedEditorModal. Place it next to the title. */
254
259
  function TableFullScreenButton({ onOpen, className }) {
255
- return /* @__PURE__ */ jsx(IconButton, {
260
+ return /* @__PURE__ */ jsxDEV(IconButton, {
256
261
  size: "sm",
257
262
  label: "Edit in full screen",
258
263
  className,
259
264
  onClick: onOpen,
260
- children: /* @__PURE__ */ jsx(IconArrowsMaximize, { stroke: 1.5 })
261
- });
265
+ children: /* @__PURE__ */ jsxDEV(IconArrowsMaximize, { stroke: 1.5 }, void 0, false, {
266
+ fileName: _jsxFileName,
267
+ lineNumber: 199,
268
+ columnNumber: 7
269
+ }, this)
270
+ }, void 0, false, {
271
+ fileName: _jsxFileName,
272
+ lineNumber: 198,
273
+ columnNumber: 5
274
+ }, this);
262
275
  }
263
276
  function TableEditor(props) {
264
277
  const { value, onChange, readOnly, actions, label, options = GENERAL_TABLE, developer, resolveRef, nav, fullScreen } = props;
@@ -277,7 +290,19 @@ function TableEditor(props) {
277
290
  readOnly,
278
291
  toast
279
292
  });
280
- return /* @__PURE__ */ jsxs("div", {
293
+ const head = /* @__PURE__ */ jsxDEV(Fragment, { children: [readOnly || fullScreen ? null : /* @__PURE__ */ jsxDEV(TableFullScreenButton, {
294
+ className: "-my-1",
295
+ onOpen: () => setFull(true)
296
+ }, void 0, false, {
297
+ fileName: _jsxFileName,
298
+ lineNumber: 216,
299
+ columnNumber: 40
300
+ }, this), actions] }, void 0, true, {
301
+ fileName: _jsxFileName,
302
+ lineNumber: 215,
303
+ columnNumber: 5
304
+ }, this);
305
+ return /* @__PURE__ */ jsxDEV("div", {
281
306
  ref: root,
282
307
  className: "flex min-w-0 flex-col",
283
308
  "data-table-editor": "",
@@ -285,15 +310,16 @@ function TableEditor(props) {
285
310
  onPaste: (e) => e.stopPropagation(),
286
311
  onCut: (e) => e.stopPropagation(),
287
312
  onCopy: (e) => e.stopPropagation(),
288
- children: [/* @__PURE__ */ jsx(TableBody, {
313
+ children: [/* @__PURE__ */ jsxDEV(TableBody, {
289
314
  ctx,
290
315
  label,
291
316
  nav,
292
- head: /* @__PURE__ */ jsxs(Fragment, { children: [readOnly || fullScreen ? null : /* @__PURE__ */ jsx(TableFullScreenButton, {
293
- className: "-my-1",
294
- onOpen: () => setFull(true)
295
- }), actions] })
296
- }), /* @__PURE__ */ jsx(ExpandedEditorModal, {
317
+ head
318
+ }, void 0, false, {
319
+ fileName: _jsxFileName,
320
+ lineNumber: 232,
321
+ columnNumber: 7
322
+ }, this), /* @__PURE__ */ jsxDEV(ExpandedEditorModal, {
297
323
  open: full,
298
324
  onOpenChange: setFull,
299
325
  layout: "wide",
@@ -305,18 +331,34 @@ function TableEditor(props) {
305
331
  meta: `${t.rows.length} ${t.rows.length === 1 ? "row" : "rows"} · ${t.columns.length} ${t.columns.length === 1 ? "column" : "columns"}`,
306
332
  returnFocus: () => fullScreen?.returnFocus?.() ?? root.current?.querySelector("button[aria-label=\"Edit in full screen\"]") ?? null,
307
333
  initialFocus: () => document.querySelector("[role=dialog] [data-cell=\"0:0\"], [role=dialog] [data-cell=\"-1:0\"]"),
308
- children: full ? /* @__PURE__ */ jsx("div", {
334
+ children: full ? /* @__PURE__ */ jsxDEV("div", {
309
335
  "data-table-editor": "",
310
336
  className: "flex min-h-0 flex-1 flex-col",
311
337
  onPaste: (e) => e.stopPropagation(),
312
- children: /* @__PURE__ */ jsx(Grid, {
338
+ children: /* @__PURE__ */ jsxDEV(Grid, {
313
339
  ctx,
314
340
  label,
315
341
  full: true
316
- })
317
- }) : null
318
- })]
319
- });
342
+ }, void 0, false, {
343
+ fileName: _jsxFileName,
344
+ lineNumber: 244,
345
+ columnNumber: 13
346
+ }, this)
347
+ }, void 0, false, {
348
+ fileName: _jsxFileName,
349
+ lineNumber: 243,
350
+ columnNumber: 11
351
+ }, this) : null
352
+ }, void 0, false, {
353
+ fileName: _jsxFileName,
354
+ lineNumber: 233,
355
+ columnNumber: 7
356
+ }, this)]
357
+ }, void 0, true, {
358
+ fileName: _jsxFileName,
359
+ lineNumber: 221,
360
+ columnNumber: 5
361
+ }, this);
320
362
  }
321
363
  function makeCtx({ t, onChange, options = {}, developer, resolveRef, readOnly, toast }) {
322
364
  const types = Object.keys(TYPE_UI).filter((ty) => options.columnTypes ? options.columnTypes.includes(ty) : !TYPE_UI[ty].dev || developer);
@@ -358,19 +400,35 @@ function TableItemEditor({ kind, index, value, onChange, options, developer, res
358
400
  });
359
401
  if (kind === "row") {
360
402
  const row = t.rows[index];
361
- return row ? /* @__PURE__ */ jsx(RowFields, {
403
+ return row ? /* @__PURE__ */ jsxDEV(RowFields, {
362
404
  ctx,
363
405
  row
364
- }) : /* @__PURE__ */ jsx(Gone, { kind: "row" });
406
+ }, void 0, false, {
407
+ fileName: _jsxFileName,
408
+ lineNumber: 295,
409
+ columnNumber: 18
410
+ }, this) : /* @__PURE__ */ jsxDEV(Gone, { kind: "row" }, void 0, false, {
411
+ fileName: _jsxFileName,
412
+ lineNumber: 295,
413
+ columnNumber: 54
414
+ }, this);
365
415
  }
366
416
  const col = t.columns[index];
367
- return col ? /* @__PURE__ */ jsx(ColumnFields, {
417
+ return col ? /* @__PURE__ */ jsxDEV(ColumnFields, {
368
418
  ctx,
369
419
  col
370
- }) : /* @__PURE__ */ jsx(Gone, { kind: "column" });
420
+ }, void 0, false, {
421
+ fileName: _jsxFileName,
422
+ lineNumber: 298,
423
+ columnNumber: 16
424
+ }, this) : /* @__PURE__ */ jsxDEV(Gone, { kind: "column" }, void 0, false, {
425
+ fileName: _jsxFileName,
426
+ lineNumber: 298,
427
+ columnNumber: 55
428
+ }, this);
371
429
  }
372
430
  /** A frame restored onto a row or column that was deleted elsewhere says so, never an empty body. */
373
- var Gone = ({ kind }) => /* @__PURE__ */ jsxs("p", {
431
+ var Gone = ({ kind }) => /* @__PURE__ */ jsxDEV("p", {
374
432
  role: "note",
375
433
  className: "text-kit-sm text-kit-fg-3",
376
434
  children: [
@@ -378,7 +436,11 @@ var Gone = ({ kind }) => /* @__PURE__ */ jsxs("p", {
378
436
  kind,
379
437
  " is no longer in the table."
380
438
  ]
381
- });
439
+ }, void 0, true, {
440
+ fileName: _jsxFileName,
441
+ lineNumber: 301,
442
+ columnNumber: 56
443
+ }, void 0);
382
444
  /** A column's minimum width: its longest header word + the type icon and ⋯ never break mid-word (≥ 96px, ≤ 240px). */
383
445
  var colMinWidth = (c, full) => {
384
446
  const longest = Math.max(0, ...c.label.split(/\s+/).map((w) => w.length));
@@ -508,22 +570,26 @@ function Grid({ ctx, label, full }) {
508
570
  columns: moveItem(cols, d.i, i)
509
571
  });
510
572
  };
511
- return /* @__PURE__ */ jsxs("div", {
573
+ return /* @__PURE__ */ jsxDEV("div", {
512
574
  ref: host,
513
575
  className: cn("min-w-0 overflow-x-auto rounded-kit-lg border border-kit-field-border bg-kit-surface", full && "max-h-full min-h-0 flex-1 overflow-auto"),
514
576
  "data-full": full ? "" : void 0,
515
577
  children: [
516
- /* @__PURE__ */ jsxs("table", {
578
+ /* @__PURE__ */ jsxDEV("table", {
517
579
  role: "grid",
518
580
  "aria-label": label || t.caption || "Table",
519
581
  "aria-describedby": helpId,
520
582
  className: "w-full border-separate border-spacing-0 text-kit-sm",
521
- children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
522
- /* @__PURE__ */ jsx("th", {
583
+ children: [/* @__PURE__ */ jsxDEV("thead", { children: /* @__PURE__ */ jsxDEV("tr", { children: [
584
+ /* @__PURE__ */ jsxDEV("th", {
523
585
  className: cn("w-8 border-b border-kit-line bg-kit-subtle", full && "sticky left-0 top-0 z-[3]"),
524
586
  "aria-hidden": true
525
- }),
526
- cols.map((c, ci) => /* @__PURE__ */ jsx("th", {
587
+ }, void 0, false, {
588
+ fileName: _jsxFileName,
589
+ lineNumber: 411,
590
+ columnNumber: 13
591
+ }, this),
592
+ cols.map((c, ci) => /* @__PURE__ */ jsxDEV("th", {
527
593
  scope: "col",
528
594
  style: { minWidth: colMinWidth(c, full) },
529
595
  className: cn("group/col relative border-b border-l border-kit-line bg-kit-subtle p-0 text-left align-bottom font-medium", full && "sticky top-0 z-[2]", full && ci === 0 && "left-8 z-[3]", over?.kind === "col" && over.i === ci && "shadow-[inset_2px_0_0_var(--kit-fg-2)]"),
@@ -532,13 +598,13 @@ function Grid({ ctx, label, full }) {
532
598
  i: ci
533
599
  })),
534
600
  onDrop: () => drop("col", ci),
535
- children: /* @__PURE__ */ jsx(ColumnMenu, {
601
+ children: /* @__PURE__ */ jsxDEV(ColumnMenu, {
536
602
  ctx,
537
603
  col: c,
538
604
  index: ci,
539
605
  onInsert: (right) => addCol(right ? ci + 1 : ci),
540
- children: (openMenu) => /* @__PURE__ */ jsxs(Fragment, { children: [
541
- lock ? null : /* @__PURE__ */ jsx("span", {
606
+ children: (openMenu) => /* @__PURE__ */ jsxDEV(Fragment, { children: [
607
+ lock ? null : /* @__PURE__ */ jsxDEV("span", {
542
608
  draggable: true,
543
609
  onDragStart: (e) => (drag.current = {
544
610
  kind: "col",
@@ -546,13 +612,25 @@ function Grid({ ctx, label, full }) {
546
612
  }, e.dataTransfer.setData("text/plain", c.label)),
547
613
  className: "-ml-1 hidden cursor-grab text-kit-fg-4 group-hover/col:block",
548
614
  "aria-hidden": true,
549
- children: /* @__PURE__ */ jsx(IconGripVertical, {
615
+ children: /* @__PURE__ */ jsxDEV(IconGripVertical, {
550
616
  className: "size-3.5",
551
617
  stroke: 1.5
552
- })
553
- }),
554
- /* @__PURE__ */ jsx(TypeIcon, { type: c.type }),
555
- /* @__PURE__ */ jsx(CellInput, {
618
+ }, void 0, false, {
619
+ fileName: _jsxFileName,
620
+ lineNumber: 431,
621
+ columnNumber: 27
622
+ }, this)
623
+ }, void 0, false, {
624
+ fileName: _jsxFileName,
625
+ lineNumber: 430,
626
+ columnNumber: 25
627
+ }, this),
628
+ /* @__PURE__ */ jsxDEV(TypeIcon, { type: c.type }, void 0, false, {
629
+ fileName: _jsxFileName,
630
+ lineNumber: 434,
631
+ columnNumber: 23
632
+ }, this),
633
+ /* @__PURE__ */ jsxDEV(CellInput, {
556
634
  cell: `-1:${ci}`,
557
635
  value: c.label,
558
636
  display: c.label,
@@ -573,29 +651,73 @@ function Grid({ ctx, label, full }) {
573
651
  }, dir),
574
652
  onMenu: openMenu,
575
653
  onPaste: (e) => onPaste(e, -1, ci)
576
- })
577
- ] })
578
- })
579
- }, c._key)),
580
- /* @__PURE__ */ jsx("th", {
654
+ }, void 0, false, {
655
+ fileName: _jsxFileName,
656
+ lineNumber: 435,
657
+ columnNumber: 23
658
+ }, this)
659
+ ] }, void 0, true, {
660
+ fileName: _jsxFileName,
661
+ lineNumber: 428,
662
+ columnNumber: 21
663
+ }, this)
664
+ }, void 0, false, {
665
+ fileName: _jsxFileName,
666
+ lineNumber: 426,
667
+ columnNumber: 17
668
+ }, this)
669
+ }, c._key, false, {
670
+ fileName: _jsxFileName,
671
+ lineNumber: 413,
672
+ columnNumber: 15
673
+ }, this)),
674
+ /* @__PURE__ */ jsxDEV("th", {
581
675
  className: "w-9 border-b border-l border-kit-line bg-kit-subtle p-0",
582
- children: lock ? null : /* @__PURE__ */ jsx(IconButton, {
676
+ children: lock ? null : /* @__PURE__ */ jsxDEV(IconButton, {
583
677
  size: "xs",
584
678
  label: "Add column",
585
679
  className: "mx-auto",
586
680
  disabled: atMaxCols,
587
681
  onClick: () => addCol(),
588
- children: /* @__PURE__ */ jsx(IconPlus, { stroke: 1.75 })
589
- })
590
- })
591
- ] }) }), /* @__PURE__ */ jsx("tbody", { children: rows.map(({ row, groupStart, footStart }, ri) => /* @__PURE__ */ jsxs(React.Fragment, { children: [groupStart || footStart ? /* @__PURE__ */ jsx("tr", {
682
+ children: /* @__PURE__ */ jsxDEV(IconPlus, { stroke: 1.75 }, void 0, false, {
683
+ fileName: _jsxFileName,
684
+ lineNumber: 456,
685
+ columnNumber: 19
686
+ }, this)
687
+ }, void 0, false, {
688
+ fileName: _jsxFileName,
689
+ lineNumber: 455,
690
+ columnNumber: 17
691
+ }, this)
692
+ }, void 0, false, {
693
+ fileName: _jsxFileName,
694
+ lineNumber: 453,
695
+ columnNumber: 13
696
+ }, this)
697
+ ] }, void 0, true, {
698
+ fileName: _jsxFileName,
699
+ lineNumber: 410,
700
+ columnNumber: 11
701
+ }, this) }, void 0, false, {
702
+ fileName: _jsxFileName,
703
+ lineNumber: 409,
704
+ columnNumber: 9
705
+ }, this), /* @__PURE__ */ jsxDEV("tbody", { children: rows.map(({ row, groupStart, footStart }, ri) => /* @__PURE__ */ jsxDEV(React.Fragment, { children: [groupStart || footStart ? /* @__PURE__ */ jsxDEV("tr", {
592
706
  "aria-hidden": true,
593
- children: /* @__PURE__ */ jsx("td", {
707
+ children: /* @__PURE__ */ jsxDEV("td", {
594
708
  colSpan: cols.length + 2,
595
709
  className: "border-t border-kit-line bg-[var(--kit-subtle-2)] px-2 py-1 text-kit-2xs font-medium text-kit-fg-3",
596
710
  children: groupStart ? groupStart.label || "Untitled group" : "Totals"
597
- })
598
- }) : null, /* @__PURE__ */ jsxs("tr", {
711
+ }, void 0, false, {
712
+ fileName: _jsxFileName,
713
+ lineNumber: 467,
714
+ columnNumber: 19
715
+ }, this)
716
+ }, void 0, false, {
717
+ fileName: _jsxFileName,
718
+ lineNumber: 466,
719
+ columnNumber: 17
720
+ }, this) : null, /* @__PURE__ */ jsxDEV("tr", {
599
721
  className: cn("group/row", over?.kind === "row" && over.i === ri && "shadow-[inset_0_2px_0_var(--kit-fg-2)]"),
600
722
  onDragOver: (e) => drag.current?.kind === "row" && (e.preventDefault(), setOver({
601
723
  kind: "row",
@@ -603,35 +725,59 @@ function Grid({ ctx, label, full }) {
603
725
  })),
604
726
  onDrop: () => drop("row", ri),
605
727
  children: [
606
- /* @__PURE__ */ jsx("td", {
728
+ /* @__PURE__ */ jsxDEV("td", {
607
729
  className: cn("w-8 border-t border-kit-line bg-[var(--kit-subtle-2)] p-0 align-middle", full && "sticky left-0 z-[1] bg-kit-subtle"),
608
- children: readOnly ? /* @__PURE__ */ jsx("div", {
730
+ children: readOnly ? /* @__PURE__ */ jsxDEV("div", {
609
731
  className: "flex h-8 items-center justify-center text-kit-2xs text-kit-fg-4",
610
732
  children: ri + 1
611
- }) : /* @__PURE__ */ jsx(RowMenu, {
733
+ }, void 0, false, {
734
+ fileName: _jsxFileName,
735
+ lineNumber: 479,
736
+ columnNumber: 21
737
+ }, this) : /* @__PURE__ */ jsxDEV(RowMenu, {
612
738
  ctx,
613
739
  row,
614
740
  index: ri,
615
741
  count: rows.length,
616
742
  onInsert: (below) => addRow(below ? ri + 1 : ri),
617
- children: (trigger) => /* @__PURE__ */ jsxs("div", {
743
+ children: (trigger) => /* @__PURE__ */ jsxDEV("div", {
618
744
  draggable: true,
619
745
  onDragStart: (e) => (drag.current = {
620
746
  kind: "row",
621
747
  i: ri
622
748
  }, e.dataTransfer.setData("text/plain", String(ri))),
623
749
  className: "flex h-8 cursor-grab items-center justify-center text-kit-2xs text-kit-fg-4",
624
- children: [/* @__PURE__ */ jsx("span", {
750
+ children: [/* @__PURE__ */ jsxDEV("span", {
625
751
  className: "group-hover/row:hidden group-focus-within/row:hidden",
626
752
  children: ri + 1
627
- }), /* @__PURE__ */ jsx("span", {
753
+ }, void 0, false, {
754
+ fileName: _jsxFileName,
755
+ lineNumber: 488,
756
+ columnNumber: 27
757
+ }, this), /* @__PURE__ */ jsxDEV("span", {
628
758
  className: "hidden group-hover/row:flex group-focus-within/row:flex",
629
759
  children: trigger
630
- })]
631
- })
632
- })
633
- }),
634
- cols.map((c, ci) => /* @__PURE__ */ jsx(GridCell, {
760
+ }, void 0, false, {
761
+ fileName: _jsxFileName,
762
+ lineNumber: 489,
763
+ columnNumber: 27
764
+ }, this)]
765
+ }, void 0, true, {
766
+ fileName: _jsxFileName,
767
+ lineNumber: 483,
768
+ columnNumber: 25
769
+ }, this)
770
+ }, void 0, false, {
771
+ fileName: _jsxFileName,
772
+ lineNumber: 481,
773
+ columnNumber: 21
774
+ }, this)
775
+ }, void 0, false, {
776
+ fileName: _jsxFileName,
777
+ lineNumber: 477,
778
+ columnNumber: 17
779
+ }, this),
780
+ cols.map((c, ci) => /* @__PURE__ */ jsxDEV(GridCell, {
635
781
  full,
636
782
  ctx,
637
783
  row,
@@ -643,33 +789,73 @@ function Grid({ ctx, label, full }) {
643
789
  c: ci
644
790
  }, dir),
645
791
  onPaste: (e) => onPaste(e, ri, ci)
646
- }, c._key)),
647
- /* @__PURE__ */ jsx("td", { className: "border-l border-t border-kit-line" })
792
+ }, c._key, false, {
793
+ fileName: _jsxFileName,
794
+ lineNumber: 496,
795
+ columnNumber: 19
796
+ }, this)),
797
+ /* @__PURE__ */ jsxDEV("td", { className: "border-l border-t border-kit-line" }, void 0, false, {
798
+ fileName: _jsxFileName,
799
+ lineNumber: 498,
800
+ columnNumber: 17
801
+ }, this)
648
802
  ]
649
- })] }, row._key)) })]
650
- }),
651
- /* @__PURE__ */ jsx("p", {
803
+ }, void 0, true, {
804
+ fileName: _jsxFileName,
805
+ lineNumber: 472,
806
+ columnNumber: 15
807
+ }, this)] }, row._key, true, {
808
+ fileName: _jsxFileName,
809
+ lineNumber: 464,
810
+ columnNumber: 13
811
+ }, this)) }, void 0, false, {
812
+ fileName: _jsxFileName,
813
+ lineNumber: 462,
814
+ columnNumber: 9
815
+ }, this)]
816
+ }, void 0, true, {
817
+ fileName: _jsxFileName,
818
+ lineNumber: 408,
819
+ columnNumber: 7
820
+ }, this),
821
+ /* @__PURE__ */ jsxDEV("p", {
652
822
  id: helpId,
653
823
  className: "sr-only",
654
824
  children: "Tab and the arrow keys move between cells. Shift+F10 on a column, row or cell opens its options."
655
- }),
656
- readOnly ? null : /* @__PURE__ */ jsxs("button", {
825
+ }, void 0, false, {
826
+ fileName: _jsxFileName,
827
+ lineNumber: 504,
828
+ columnNumber: 7
829
+ }, this),
830
+ readOnly ? null : /* @__PURE__ */ jsxDEV("button", {
657
831
  type: "button",
658
832
  onClick: () => addRow(),
659
833
  disabled: atMaxRows,
660
834
  className: "flex h-8 w-full items-center gap-1.5 border-t border-kit-line px-2.5 text-left text-kit-xs text-kit-fg-3 hover:bg-kit-subtle hover:text-kit-fg disabled:opacity-45",
661
835
  children: [
662
- /* @__PURE__ */ jsx(IconPlus, {
836
+ /* @__PURE__ */ jsxDEV(IconPlus, {
663
837
  className: "size-3.5",
664
838
  stroke: 1.75,
665
839
  "aria-hidden": true
666
- }),
840
+ }, void 0, false, {
841
+ fileName: _jsxFileName,
842
+ lineNumber: 512,
843
+ columnNumber: 11
844
+ }, this),
667
845
  " ",
668
846
  atMaxRows ? `Add row · ${ctx.options.maxRows} at most` : "Add row"
669
847
  ]
670
- })
848
+ }, void 0, true, {
849
+ fileName: _jsxFileName,
850
+ lineNumber: 506,
851
+ columnNumber: 9
852
+ }, this)
671
853
  ]
672
- });
854
+ }, void 0, true, {
855
+ fileName: _jsxFileName,
856
+ lineNumber: 407,
857
+ columnNumber: 5
858
+ }, this);
673
859
  }
674
860
  /** A grid cell: always editable (no select-then-edit mode). Yes / No is a check toggle; links and references open a small editor. */
675
861
  function GridCell({ ctx, row, col, r, c, onMove, onPaste, full }) {
@@ -695,7 +881,7 @@ function GridCell({ ctx, row, col, r, c, onMove, onPaste, full }) {
695
881
  if (ty === "boolean") {
696
882
  const b = toBool(v);
697
883
  const { yes, no } = boolLabels(col);
698
- body = /* @__PURE__ */ jsx("button", {
884
+ body = /* @__PURE__ */ jsxDEV("button", {
699
885
  type: "button",
700
886
  role: "checkbox",
701
887
  "aria-checked": b === true,
@@ -722,19 +908,35 @@ function GridCell({ ctx, row, col, r, c, onMove, onPaste, full }) {
722
908
  },
723
909
  onPaste: (e) => onPaste(e),
724
910
  className: "flex h-8 w-full items-center px-2 outline-none focus-visible:shadow-[inset_0_0_0_2px_var(--kit-fg-3)]",
725
- children: b == null ? /* @__PURE__ */ jsx("span", {
911
+ children: b == null ? /* @__PURE__ */ jsxDEV("span", {
726
912
  className: "text-kit-fg-4",
727
913
  children: "—"
728
- }) : /* @__PURE__ */ jsx("span", {
914
+ }, void 0, false, {
915
+ fileName: _jsxFileName,
916
+ lineNumber: 559,
917
+ columnNumber: 11
918
+ }, this) : /* @__PURE__ */ jsxDEV("span", {
729
919
  className: cn("flex size-4 items-center justify-center rounded-kit-sm border", b ? "border-kit-inverse bg-kit-inverse text-kit-fg-inverse" : "border-kit-line-strong"),
730
- children: b ? /* @__PURE__ */ jsx(IconCheck, {
920
+ children: b ? /* @__PURE__ */ jsxDEV(IconCheck, {
731
921
  className: "size-3",
732
922
  stroke: 3,
733
923
  "aria-hidden": true
734
- }) : null
735
- })
736
- });
737
- } else if (ty === "reference") body = /* @__PURE__ */ jsx(RefCell, {
924
+ }, void 0, false, {
925
+ fileName: _jsxFileName,
926
+ lineNumber: 562,
927
+ columnNumber: 18
928
+ }, this) : null
929
+ }, void 0, false, {
930
+ fileName: _jsxFileName,
931
+ lineNumber: 561,
932
+ columnNumber: 11
933
+ }, this)
934
+ }, void 0, false, {
935
+ fileName: _jsxFileName,
936
+ lineNumber: 539,
937
+ columnNumber: 7
938
+ }, this);
939
+ } else if (ty === "reference") body = /* @__PURE__ */ jsxDEV(RefCell, {
738
940
  ctx,
739
941
  cell,
740
942
  col,
@@ -742,22 +944,30 @@ function GridCell({ ctx, row, col, r, c, onMove, onPaste, full }) {
742
944
  name,
743
945
  onWrite: write,
744
946
  onMove
745
- });
947
+ }, void 0, false, {
948
+ fileName: _jsxFileName,
949
+ lineNumber: 568,
950
+ columnNumber: 12
951
+ }, this);
746
952
  else {
747
953
  const draft = isEmptyCell(v) ? "" : NUMERIC.includes(ty) ? String(toNumber(v) ?? cellText(col, row, cell)) : ty === "link" && isObjLike(v) ? v.label : ty === "richtext-inline" ? String(v) : cellText(col, row, cell, resolveRef);
748
954
  const link = ty === "link" ? isObjLike(v) && !("ref" in v) ? v : {
749
955
  label: typeof v === "string" ? v : "",
750
956
  href: ""
751
957
  } : null;
752
- body = /* @__PURE__ */ jsxs("div", {
958
+ body = /* @__PURE__ */ jsxDEV("div", {
753
959
  className: "relative flex items-start",
754
960
  children: [
755
- ty === "rating" && !isEmptyCell(v) ? /* @__PURE__ */ jsx(IconStar, {
961
+ ty === "rating" && !isEmptyCell(v) ? /* @__PURE__ */ jsxDEV(IconStar, {
756
962
  className: "ml-2 mt-2 size-3 shrink-0 text-kit-warning",
757
963
  stroke: 2,
758
964
  "aria-hidden": true
759
- }) : null,
760
- /* @__PURE__ */ jsx(CellInput, {
965
+ }, void 0, false, {
966
+ fileName: _jsxFileName,
967
+ lineNumber: 574,
968
+ columnNumber: 47
969
+ }, this) : null,
970
+ /* @__PURE__ */ jsxDEV(CellInput, {
761
971
  cell: `${r}:${c}`,
762
972
  value: draft,
763
973
  display: isEmptyCell(v) ? "" : ty === "rating" ? draft : cellText(col, row, cell, resolveRef),
@@ -769,20 +979,32 @@ function GridCell({ ctx, row, col, r, c, onMove, onPaste, full }) {
769
979
  onCommit: (raw) => raw !== draft && write(typedCell(cell, col, row, raw)),
770
980
  onMove,
771
981
  onPaste
772
- }),
773
- link ? /* @__PURE__ */ jsx(LinkAddressButton, {
982
+ }, void 0, false, {
983
+ fileName: _jsxFileName,
984
+ lineNumber: 575,
985
+ columnNumber: 9
986
+ }, this),
987
+ link ? /* @__PURE__ */ jsxDEV(LinkAddressButton, {
774
988
  className: "mr-1 mt-1.5",
775
989
  link,
776
990
  readOnly,
777
991
  onSave: (l) => write(withValue(cell, l))
778
- }) : null
992
+ }, void 0, false, {
993
+ fileName: _jsxFileName,
994
+ lineNumber: 588,
995
+ columnNumber: 17
996
+ }, this) : null
779
997
  ]
780
- });
998
+ }, void 0, true, {
999
+ fileName: _jsxFileName,
1000
+ lineNumber: 573,
1001
+ columnNumber: 7
1002
+ }, this);
781
1003
  }
782
1004
  const cls = cn("relative border-l border-t border-kit-line p-0 align-top", head && "bg-[var(--kit-subtle-2)]", full && c === 0 && "sticky left-8 z-[1] bg-kit-surface", row.highlight && "bg-kit-accent-softer", col.highlight && "bg-kit-subtle");
783
- return /* @__PURE__ */ jsxs("td", {
1005
+ return /* @__PURE__ */ jsxDEV("td", {
784
1006
  className: cls,
785
- children: [readOnly ? body : /* @__PURE__ */ jsx(CellMenu, {
1007
+ children: [readOnly ? body : /* @__PURE__ */ jsxDEV(CellMenu, {
786
1008
  ctx,
787
1009
  row,
788
1010
  col,
@@ -790,25 +1012,41 @@ function GridCell({ ctx, row, col, r, c, onMove, onPaste, full }) {
790
1012
  onWrite: write,
791
1013
  onNote: () => window.setTimeout(() => setNoteOpen(true)),
792
1014
  children: body
793
- }), /* @__PURE__ */ jsxs(Popover, {
1015
+ }, void 0, false, {
1016
+ fileName: _jsxFileName,
1017
+ lineNumber: 601,
1018
+ columnNumber: 26
1019
+ }, this), /* @__PURE__ */ jsxDEV(Popover, {
794
1020
  open: noteOpen && !!fn,
795
1021
  onOpenChange: setNoteOpen,
796
- children: [/* @__PURE__ */ jsx(PopoverAnchor, {
797
- render: n > 0 ? /* @__PURE__ */ jsx("button", {
1022
+ children: [/* @__PURE__ */ jsxDEV(PopoverAnchor, {
1023
+ render: n > 0 ? /* @__PURE__ */ jsxDEV("button", {
798
1024
  type: "button",
799
1025
  tabIndex: -1,
800
1026
  "aria-label": `Footnote ${n}`,
801
1027
  onClick: () => setNoteOpen(true),
802
1028
  className: "absolute right-0.5 top-0.5 rounded-kit-xs px-0.5 text-kit-2xs leading-3 text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg"
803
- }) : /* @__PURE__ */ jsx("span", {
1029
+ }, void 0, false, {
1030
+ fileName: _jsxFileName,
1031
+ lineNumber: 607,
1032
+ columnNumber: 15
1033
+ }, this) : /* @__PURE__ */ jsxDEV("span", {
804
1034
  className: "pointer-events-none absolute right-1 top-1 size-0",
805
1035
  "aria-hidden": true
806
- }),
1036
+ }, void 0, false, {
1037
+ fileName: _jsxFileName,
1038
+ lineNumber: 609,
1039
+ columnNumber: 15
1040
+ }, this),
807
1041
  children: n > 0 ? n : null
808
- }), /* @__PURE__ */ jsx(PopoverContent, {
1042
+ }, void 0, false, {
1043
+ fileName: _jsxFileName,
1044
+ lineNumber: 604,
1045
+ columnNumber: 9
1046
+ }, this), /* @__PURE__ */ jsxDEV(PopoverContent, {
809
1047
  align: "end",
810
1048
  className: "w-72 p-2",
811
- children: fn ? /* @__PURE__ */ jsx(Input, {
1049
+ children: fn ? /* @__PURE__ */ jsxDEV(Input, {
812
1050
  size: "sm",
813
1051
  autoFocus: true,
814
1052
  value: fn.text,
@@ -823,10 +1061,26 @@ function GridCell({ ctx, row, col, r, c, onMove, onPaste, full }) {
823
1061
  } : x)
824
1062
  }),
825
1063
  onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), setNoteOpen(false))
826
- }) : null
827
- })]
828
- })]
829
- });
1064
+ }, void 0, false, {
1065
+ fileName: _jsxFileName,
1066
+ lineNumber: 617,
1067
+ columnNumber: 13
1068
+ }, this) : null
1069
+ }, void 0, false, {
1070
+ fileName: _jsxFileName,
1071
+ lineNumber: 615,
1072
+ columnNumber: 9
1073
+ }, this)]
1074
+ }, void 0, true, {
1075
+ fileName: _jsxFileName,
1076
+ lineNumber: 603,
1077
+ columnNumber: 7
1078
+ }, this)]
1079
+ }, void 0, true, {
1080
+ fileName: _jsxFileName,
1081
+ lineNumber: 600,
1082
+ columnNumber: 5
1083
+ }, this);
830
1084
  }
831
1085
  /** One cell's text. Shows the written value at rest ("$39", "2.4 kg") and the raw value while typing; commits on leave. */
832
1086
  function CellInput({ cell, value, display, onCommit, onMove, onMenu, onPaste, placeholder, numeric, className, ariaLabel, readOnly }) {
@@ -840,7 +1094,7 @@ function CellInput({ cell, value, display, onCommit, onMove, onMenu, onPaste, pl
840
1094
  el.style.height = "0px";
841
1095
  el.style.height = `${Math.max(32, el.scrollHeight)}px`;
842
1096
  }, [shown]);
843
- return /* @__PURE__ */ jsx("textarea", {
1097
+ return /* @__PURE__ */ jsxDEV("textarea", {
844
1098
  ref,
845
1099
  rows: 1,
846
1100
  "data-cell": cell,
@@ -894,7 +1148,11 @@ function CellInput({ cell, value, display, onCommit, onMove, onMenu, onPaste, pl
894
1148
  }
895
1149
  },
896
1150
  className: cn("block min-h-8 w-full resize-none overflow-hidden bg-transparent px-2 py-1.5 text-kit-sm leading-5 text-kit-fg outline-none [overflow-wrap:normal] [word-break:normal] placeholder:text-kit-fg-4 focus:bg-kit-surface focus:shadow-[inset_0_0_0_2px_var(--kit-fg-3)]", className)
897
- });
1151
+ }, void 0, false, {
1152
+ fileName: _jsxFileName,
1153
+ lineNumber: 652,
1154
+ columnNumber: 5
1155
+ }, this);
898
1156
  }
899
1157
  /**
900
1158
  * A reference cell: a page or entry chosen from the host's search (refs.ts). Stores `{ ref, label, href? }`: the label and
@@ -915,11 +1173,11 @@ function RefCell({ ctx, cell, col, cellId, name, onWrite, onMove }) {
915
1173
  }));
916
1174
  setOpen(false);
917
1175
  };
918
- return /* @__PURE__ */ jsxs(Popover, {
1176
+ return /* @__PURE__ */ jsxDEV(Popover, {
919
1177
  open,
920
1178
  onOpenChange: (o) => (setOpen(o), o || setQ("")),
921
- children: [/* @__PURE__ */ jsx(PopoverAnchor, {
922
- render: /* @__PURE__ */ jsx("button", {
1179
+ children: [/* @__PURE__ */ jsxDEV(PopoverAnchor, {
1180
+ render: /* @__PURE__ */ jsxDEV("button", {
923
1181
  type: "button",
924
1182
  "data-cell": cellId,
925
1183
  "aria-label": `${name}: ${label || "not chosen"}`,
@@ -937,81 +1195,153 @@ function RefCell({ ctx, cell, col, cellId, name, onWrite, onMove }) {
937
1195
  }
938
1196
  },
939
1197
  className: "flex min-h-8 w-full items-center px-2 text-left text-kit-sm text-kit-fg outline-none focus-visible:shadow-[inset_0_0_0_2px_var(--kit-fg-3)]"
940
- }),
941
- children: label ? /* @__PURE__ */ jsx("span", {
1198
+ }, void 0, false, {
1199
+ fileName: _jsxFileName,
1200
+ lineNumber: 720,
1201
+ columnNumber: 11
1202
+ }, this),
1203
+ children: label ? /* @__PURE__ */ jsxDEV("span", {
942
1204
  className: "truncate underline decoration-kit-fg-4 underline-offset-2",
943
1205
  children: label
944
- }) : /* @__PURE__ */ jsx("span", {
1206
+ }, void 0, false, {
1207
+ fileName: _jsxFileName,
1208
+ lineNumber: 736,
1209
+ columnNumber: 18
1210
+ }, this) : /* @__PURE__ */ jsxDEV("span", {
945
1211
  className: "text-kit-fg-4",
946
1212
  children: "Choose…"
947
- })
948
- }), /* @__PURE__ */ jsxs(PopoverContent, {
1213
+ }, void 0, false, {
1214
+ fileName: _jsxFileName,
1215
+ lineNumber: 736,
1216
+ columnNumber: 111
1217
+ }, this)
1218
+ }, void 0, false, {
1219
+ fileName: _jsxFileName,
1220
+ lineNumber: 718,
1221
+ columnNumber: 7
1222
+ }, this), /* @__PURE__ */ jsxDEV(PopoverContent, {
949
1223
  align: "start",
950
1224
  className: "w-72 p-1.5",
951
1225
  children: [
952
- /* @__PURE__ */ jsx(Input, {
1226
+ /* @__PURE__ */ jsxDEV(Input, {
953
1227
  size: "sm",
954
1228
  autoFocus: true,
955
1229
  value: q,
956
1230
  placeholder: "Search…",
957
1231
  "aria-label": "Find a page or entry",
958
1232
  onChange: (e) => setQ(e.target.value)
959
- }),
960
- /* @__PURE__ */ jsx("div", {
1233
+ }, void 0, false, {
1234
+ fileName: _jsxFileName,
1235
+ lineNumber: 739,
1236
+ columnNumber: 9
1237
+ }, this),
1238
+ /* @__PURE__ */ jsxDEV("div", {
961
1239
  role: "status",
962
1240
  className: "sr-only",
963
1241
  children: search.status === "ready" ? `${search.options.length} results` : search.status === "loading" ? "Searching" : ""
964
- }),
965
- /* @__PURE__ */ jsxs("ul", {
1242
+ }, void 0, false, {
1243
+ fileName: _jsxFileName,
1244
+ lineNumber: 740,
1245
+ columnNumber: 9
1246
+ }, this),
1247
+ /* @__PURE__ */ jsxDEV("ul", {
966
1248
  className: "mt-1 max-h-56 overflow-auto",
967
1249
  "aria-label": "Pages and entries",
968
1250
  children: [
969
- search.status === "ready" ? search.options.map((o) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("button", {
1251
+ search.status === "ready" ? search.options.map((o) => /* @__PURE__ */ jsxDEV("li", { children: /* @__PURE__ */ jsxDEV("button", {
970
1252
  type: "button",
971
1253
  className: "flex w-full flex-col rounded-kit-md px-2 py-1.5 text-left hover:bg-kit-hover",
972
1254
  onClick: () => pick(o),
973
- children: [/* @__PURE__ */ jsx("span", {
1255
+ children: [/* @__PURE__ */ jsxDEV("span", {
974
1256
  className: "truncate text-kit-sm text-kit-fg",
975
1257
  children: o.title
976
- }), o.subtitle ? /* @__PURE__ */ jsx("span", {
1258
+ }, void 0, false, {
1259
+ fileName: _jsxFileName,
1260
+ lineNumber: 748,
1261
+ columnNumber: 21
1262
+ }, this), o.subtitle ? /* @__PURE__ */ jsxDEV("span", {
977
1263
  className: "truncate text-kit-xs text-kit-fg-3",
978
1264
  children: o.subtitle
979
- }) : null]
980
- }) }, o.id)) : null,
981
- search.status === "ready" && !search.options.length ? /* @__PURE__ */ jsxs("li", {
1265
+ }, void 0, false, {
1266
+ fileName: _jsxFileName,
1267
+ lineNumber: 749,
1268
+ columnNumber: 35
1269
+ }, this) : null]
1270
+ }, void 0, true, {
1271
+ fileName: _jsxFileName,
1272
+ lineNumber: 747,
1273
+ columnNumber: 19
1274
+ }, this) }, o.id, false, {
1275
+ fileName: _jsxFileName,
1276
+ lineNumber: 746,
1277
+ columnNumber: 17
1278
+ }, this)) : null,
1279
+ search.status === "ready" && !search.options.length ? /* @__PURE__ */ jsxDEV("li", {
982
1280
  className: "px-2 py-1.5 text-kit-xs text-kit-fg-3",
983
1281
  children: [
984
1282
  "Nothing found",
985
1283
  q.trim() ? ` for “${q.trim()}”` : "",
986
1284
  "."
987
1285
  ]
988
- }) : null,
989
- search.status === "loading" ? /* @__PURE__ */ jsx("li", {
1286
+ }, void 0, true, {
1287
+ fileName: _jsxFileName,
1288
+ lineNumber: 754,
1289
+ columnNumber: 66
1290
+ }, this) : null,
1291
+ search.status === "loading" ? /* @__PURE__ */ jsxDEV("li", {
990
1292
  className: "px-2 py-1.5 text-kit-xs text-kit-fg-3",
991
1293
  children: "Searching…"
992
- }) : null,
993
- search.status === "error" ? /* @__PURE__ */ jsxs("li", {
1294
+ }, void 0, false, {
1295
+ fileName: _jsxFileName,
1296
+ lineNumber: 755,
1297
+ columnNumber: 42
1298
+ }, this) : null,
1299
+ search.status === "error" ? /* @__PURE__ */ jsxDEV("li", {
994
1300
  role: "alert",
995
1301
  className: "px-2 py-1.5 text-kit-xs text-kit-danger-fg",
996
1302
  children: ["Couldn't search: ", search.message]
997
- }) : null,
998
- search.status === "unavailable" ? /* @__PURE__ */ jsx("li", {
1303
+ }, void 0, true, {
1304
+ fileName: _jsxFileName,
1305
+ lineNumber: 756,
1306
+ columnNumber: 40
1307
+ }, this) : null,
1308
+ search.status === "unavailable" ? /* @__PURE__ */ jsxDEV("li", {
999
1309
  role: "note",
1000
1310
  className: "px-2 py-1.5 text-kit-xs text-kit-fg-3",
1001
1311
  children: "This view can't search pages or entries, so the cell can't change here."
1002
- }) : null
1312
+ }, void 0, false, {
1313
+ fileName: _jsxFileName,
1314
+ lineNumber: 757,
1315
+ columnNumber: 46
1316
+ }, this) : null
1003
1317
  ]
1004
- }),
1005
- r && !ctx.readOnly ? /* @__PURE__ */ jsx(Button, {
1318
+ }, void 0, true, {
1319
+ fileName: _jsxFileName,
1320
+ lineNumber: 743,
1321
+ columnNumber: 9
1322
+ }, this),
1323
+ r && !ctx.readOnly ? /* @__PURE__ */ jsxDEV(Button, {
1006
1324
  size: "sm",
1007
1325
  variant: "ghost",
1008
1326
  className: "mt-1 w-full justify-start text-kit-fg-2",
1009
1327
  onClick: () => (onWrite(withValue(cell, null)), setOpen(false)),
1010
1328
  children: "Clear"
1011
- }) : null
1329
+ }, void 0, false, {
1330
+ fileName: _jsxFileName,
1331
+ lineNumber: 760,
1332
+ columnNumber: 11
1333
+ }, this) : null
1012
1334
  ]
1013
- })]
1014
- });
1335
+ }, void 0, true, {
1336
+ fileName: _jsxFileName,
1337
+ lineNumber: 738,
1338
+ columnNumber: 7
1339
+ }, this)]
1340
+ }, void 0, true, {
1341
+ fileName: _jsxFileName,
1342
+ lineNumber: 717,
1343
+ columnNumber: 5
1344
+ }, this);
1015
1345
  }
1016
1346
  function ColumnMenu({ ctx, col, index, onInsert, children }) {
1017
1347
  const { t, set, edit, lock, types, readOnly } = ctx;
@@ -1027,105 +1357,201 @@ function ColumnMenu({ ctx, col, index, onInsert, children }) {
1027
1357
  };
1028
1358
  const shownTypes = types.includes(col.type) ? types : [...types, col.type];
1029
1359
  const hasDetails = !lock && (col.type === "number" || col.type === "money" || col.type === "boolean" || col.type === "rating");
1030
- return /* @__PURE__ */ jsxs(Popover, {
1360
+ return /* @__PURE__ */ jsxDEV(Popover, {
1031
1361
  open: details,
1032
1362
  onOpenChange: setDetails,
1033
- children: [/* @__PURE__ */ jsxs(PopoverAnchor, {
1034
- render: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1 pl-1.5 pr-0.5" }),
1035
- children: [/* @__PURE__ */ jsx("div", {
1363
+ children: [/* @__PURE__ */ jsxDEV(PopoverAnchor, {
1364
+ render: /* @__PURE__ */ jsxDEV("div", { className: "flex items-center gap-1 pl-1.5 pr-0.5" }, void 0, false, {
1365
+ fileName: _jsxFileName,
1366
+ lineNumber: 786,
1367
+ columnNumber: 30
1368
+ }, this),
1369
+ children: [/* @__PURE__ */ jsxDEV("div", {
1036
1370
  className: "flex min-w-0 flex-1 items-center gap-1",
1037
1371
  children: children(() => setOpen(true))
1038
- }), readOnly ? null : /* @__PURE__ */ jsxs(Menu, {
1372
+ }, void 0, false, {
1373
+ fileName: _jsxFileName,
1374
+ lineNumber: 787,
1375
+ columnNumber: 9
1376
+ }, this), readOnly ? null : /* @__PURE__ */ jsxDEV(Menu, {
1039
1377
  open,
1040
1378
  onOpenChange: setOpen,
1041
- children: [/* @__PURE__ */ jsx(MenuTrigger, {
1042
- render: /* @__PURE__ */ jsx(IconButton, {
1379
+ children: [/* @__PURE__ */ jsxDEV(MenuTrigger, {
1380
+ render: /* @__PURE__ */ jsxDEV(IconButton, {
1043
1381
  size: "xs",
1044
1382
  tabIndex: -1,
1045
1383
  label: `Options for column ${col.label || index + 1}`,
1046
1384
  className: "shrink-0 opacity-0 focus-visible:opacity-100 group-hover/col:opacity-100 group-focus-within/col:opacity-100 data-[popup-open]:opacity-100 [@media(pointer:coarse)]:opacity-100"
1047
- }),
1048
- children: /* @__PURE__ */ jsx(IconDots, { stroke: 1.5 })
1049
- }), /* @__PURE__ */ jsxs(MenuContent, {
1385
+ }, void 0, false, {
1386
+ fileName: _jsxFileName,
1387
+ lineNumber: 792,
1388
+ columnNumber: 17
1389
+ }, this),
1390
+ children: /* @__PURE__ */ jsxDEV(IconDots, { stroke: 1.5 }, void 0, false, {
1391
+ fileName: _jsxFileName,
1392
+ lineNumber: 800,
1393
+ columnNumber: 15
1394
+ }, this)
1395
+ }, void 0, false, {
1396
+ fileName: _jsxFileName,
1397
+ lineNumber: 790,
1398
+ columnNumber: 13
1399
+ }, this), /* @__PURE__ */ jsxDEV(MenuContent, {
1050
1400
  align: "end",
1051
1401
  className: "min-w-52",
1052
1402
  children: [
1053
- lock ? null : /* @__PURE__ */ jsxs(MenuSub, { children: [/* @__PURE__ */ jsxs(MenuSubTrigger, {
1054
- icon: /* @__PURE__ */ jsx(TypeIcon, {
1403
+ lock ? null : /* @__PURE__ */ jsxDEV(MenuSub, { children: [/* @__PURE__ */ jsxDEV(MenuSubTrigger, {
1404
+ icon: /* @__PURE__ */ jsxDEV(TypeIcon, {
1055
1405
  type: col.type,
1056
1406
  className: "text-kit-fg-2"
1057
- }),
1407
+ }, void 0, false, {
1408
+ fileName: _jsxFileName,
1409
+ lineNumber: 805,
1410
+ columnNumber: 41
1411
+ }, this),
1058
1412
  children: ["Type: ", TYPE_UI[col.type].label]
1059
- }), /* @__PURE__ */ jsx(MenuSubContent, { children: /* @__PURE__ */ jsx(MenuRadioGroup, {
1413
+ }, void 0, true, {
1414
+ fileName: _jsxFileName,
1415
+ lineNumber: 805,
1416
+ columnNumber: 19
1417
+ }, this), /* @__PURE__ */ jsxDEV(MenuSubContent, { children: /* @__PURE__ */ jsxDEV(MenuRadioGroup, {
1060
1418
  value: col.type,
1061
1419
  onValueChange: (v) => edit((x) => retype(x, col._key, v, ctx.resolveRef)),
1062
- children: shownTypes.map((ty) => /* @__PURE__ */ jsx(MenuRadioItem, {
1420
+ children: shownTypes.map((ty) => /* @__PURE__ */ jsxDEV(MenuRadioItem, {
1063
1421
  value: ty,
1064
- children: /* @__PURE__ */ jsxs("span", {
1422
+ children: /* @__PURE__ */ jsxDEV("span", {
1065
1423
  className: "flex items-center gap-2",
1066
- children: [/* @__PURE__ */ jsx(TypeIcon, {
1424
+ children: [/* @__PURE__ */ jsxDEV(TypeIcon, {
1067
1425
  type: ty,
1068
1426
  className: "text-kit-fg-2"
1069
- }), TYPE_UI[ty].label]
1070
- })
1071
- }, ty))
1072
- }) })] }),
1073
- hasDetails ? /* @__PURE__ */ jsx(MenuItem, {
1427
+ }, void 0, false, {
1428
+ fileName: _jsxFileName,
1429
+ lineNumber: 810,
1430
+ columnNumber: 69
1431
+ }, this), TYPE_UI[ty].label]
1432
+ }, void 0, true, {
1433
+ fileName: _jsxFileName,
1434
+ lineNumber: 810,
1435
+ columnNumber: 27
1436
+ }, this)
1437
+ }, ty, false, {
1438
+ fileName: _jsxFileName,
1439
+ lineNumber: 809,
1440
+ columnNumber: 25
1441
+ }, this))
1442
+ }, void 0, false, {
1443
+ fileName: _jsxFileName,
1444
+ lineNumber: 807,
1445
+ columnNumber: 21
1446
+ }, this) }, void 0, false, {
1447
+ fileName: _jsxFileName,
1448
+ lineNumber: 806,
1449
+ columnNumber: 19
1450
+ }, this)] }, void 0, true, {
1451
+ fileName: _jsxFileName,
1452
+ lineNumber: 804,
1453
+ columnNumber: 17
1454
+ }, this),
1455
+ hasDetails ? /* @__PURE__ */ jsxDEV(MenuItem, {
1074
1456
  onClick: () => window.setTimeout(() => setDetails(true)),
1075
1457
  children: col.type === "number" ? "Unit…" : col.type === "money" ? "Currency…" : col.type === "rating" ? "Scale…" : "Words for yes and no…"
1076
- }) : null,
1077
- lock ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
1078
- /* @__PURE__ */ jsx(MenuSeparator, {}),
1079
- /* @__PURE__ */ jsx(MenuItem, {
1458
+ }, void 0, false, {
1459
+ fileName: _jsxFileName,
1460
+ lineNumber: 818,
1461
+ columnNumber: 17
1462
+ }, this) : null,
1463
+ lock ? null : /* @__PURE__ */ jsxDEV(Fragment, { children: [
1464
+ /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
1465
+ fileName: _jsxFileName,
1466
+ lineNumber: 824,
1467
+ columnNumber: 19
1468
+ }, this),
1469
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1080
1470
  disabled: atMax,
1081
1471
  onClick: () => onInsert(false),
1082
1472
  children: "Insert column left"
1083
- }),
1084
- /* @__PURE__ */ jsx(MenuItem, {
1473
+ }, void 0, false, {
1474
+ fileName: _jsxFileName,
1475
+ lineNumber: 825,
1476
+ columnNumber: 19
1477
+ }, this),
1478
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1085
1479
  disabled: atMax,
1086
1480
  onClick: () => onInsert(true),
1087
1481
  children: "Insert column right"
1088
- }),
1089
- /* @__PURE__ */ jsx(MenuItem, {
1482
+ }, void 0, false, {
1483
+ fileName: _jsxFileName,
1484
+ lineNumber: 826,
1485
+ columnNumber: 19
1486
+ }, this),
1487
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1090
1488
  disabled: atMax,
1091
1489
  onClick: () => set(copyColumn(t, index)),
1092
1490
  children: "Duplicate column"
1093
- }),
1094
- /* @__PURE__ */ jsx(MenuItem, {
1491
+ }, void 0, false, {
1492
+ fileName: _jsxFileName,
1493
+ lineNumber: 827,
1494
+ columnNumber: 19
1495
+ }, this),
1496
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1095
1497
  disabled: index === 0,
1096
1498
  onClick: () => set({
1097
1499
  ...t,
1098
1500
  columns: moveItem(t.columns, index, index - 1)
1099
1501
  }),
1100
1502
  children: "Move left"
1101
- }),
1102
- /* @__PURE__ */ jsx(MenuItem, {
1503
+ }, void 0, false, {
1504
+ fileName: _jsxFileName,
1505
+ lineNumber: 828,
1506
+ columnNumber: 19
1507
+ }, this),
1508
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1103
1509
  disabled: index === n - 1,
1104
1510
  onClick: () => set({
1105
1511
  ...t,
1106
1512
  columns: moveItem(t.columns, index, index + 1)
1107
1513
  }),
1108
1514
  children: "Move right"
1109
- })
1110
- ] }),
1111
- /* @__PURE__ */ jsx(MenuSeparator, {}),
1112
- /* @__PURE__ */ jsx(MenuCheckItem, {
1515
+ }, void 0, false, {
1516
+ fileName: _jsxFileName,
1517
+ lineNumber: 829,
1518
+ columnNumber: 19
1519
+ }, this)
1520
+ ] }, void 0, true, {
1521
+ fileName: _jsxFileName,
1522
+ lineNumber: 823,
1523
+ columnNumber: 17
1524
+ }, this),
1525
+ /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
1526
+ fileName: _jsxFileName,
1527
+ lineNumber: 832,
1528
+ columnNumber: 15
1529
+ }, this),
1530
+ /* @__PURE__ */ jsxDEV(MenuCheckItem, {
1113
1531
  checked: t.headerRow,
1114
1532
  onCheckedChange: (v) => set({
1115
1533
  ...t,
1116
1534
  headerRow: v
1117
1535
  }),
1118
1536
  children: "Show column names"
1119
- }),
1120
- /* @__PURE__ */ jsx(MenuCheckItem, {
1537
+ }, void 0, false, {
1538
+ fileName: _jsxFileName,
1539
+ lineNumber: 833,
1540
+ columnNumber: 15
1541
+ }, this),
1542
+ /* @__PURE__ */ jsxDEV(MenuCheckItem, {
1121
1543
  checked: t.headerColumn,
1122
1544
  onCheckedChange: (v) => set({
1123
1545
  ...t,
1124
1546
  headerColumn: v
1125
1547
  }),
1126
1548
  children: "First column names each row"
1127
- }),
1128
- /* @__PURE__ */ jsx(MenuCheckItem, {
1549
+ }, void 0, false, {
1550
+ fileName: _jsxFileName,
1551
+ lineNumber: 834,
1552
+ columnNumber: 15
1553
+ }, this),
1554
+ /* @__PURE__ */ jsxDEV(MenuCheckItem, {
1129
1555
  checked: !!col.highlight,
1130
1556
  onCheckedChange: (v) => set({
1131
1557
  ...t,
@@ -1135,28 +1561,68 @@ function ColumnMenu({ ctx, col, index, onInsert, children }) {
1135
1561
  }))
1136
1562
  }),
1137
1563
  children: "Highlight this column"
1138
- }),
1139
- lock ? null : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MenuSeparator, {}), /* @__PURE__ */ jsx(MenuItem, {
1564
+ }, void 0, false, {
1565
+ fileName: _jsxFileName,
1566
+ lineNumber: 835,
1567
+ columnNumber: 15
1568
+ }, this),
1569
+ lock ? null : /* @__PURE__ */ jsxDEV(Fragment, { children: [/* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
1570
+ fileName: _jsxFileName,
1571
+ lineNumber: 838,
1572
+ columnNumber: 19
1573
+ }, this), /* @__PURE__ */ jsxDEV(MenuItem, {
1140
1574
  danger: true,
1141
1575
  disabled: n <= 1,
1142
1576
  onClick: remove,
1143
1577
  children: n <= 1 ? "Delete column · a table keeps one" : "Delete column"
1144
- })] })
1578
+ }, void 0, false, {
1579
+ fileName: _jsxFileName,
1580
+ lineNumber: 839,
1581
+ columnNumber: 19
1582
+ }, this)] }, void 0, true, {
1583
+ fileName: _jsxFileName,
1584
+ lineNumber: 837,
1585
+ columnNumber: 17
1586
+ }, this)
1145
1587
  ]
1146
- })]
1147
- })]
1148
- }), /* @__PURE__ */ jsx(PopoverContent, {
1588
+ }, void 0, true, {
1589
+ fileName: _jsxFileName,
1590
+ lineNumber: 802,
1591
+ columnNumber: 13
1592
+ }, this)]
1593
+ }, void 0, true, {
1594
+ fileName: _jsxFileName,
1595
+ lineNumber: 789,
1596
+ columnNumber: 11
1597
+ }, this)]
1598
+ }, void 0, true, {
1599
+ fileName: _jsxFileName,
1600
+ lineNumber: 786,
1601
+ columnNumber: 7
1602
+ }, this), /* @__PURE__ */ jsxDEV(PopoverContent, {
1149
1603
  align: "end",
1150
1604
  className: "w-64 p-3",
1151
- children: /* @__PURE__ */ jsx(ColumnDetails, {
1605
+ children: /* @__PURE__ */ jsxDEV(ColumnDetails, {
1152
1606
  col,
1153
1607
  onPatch: (p) => set({
1154
1608
  ...t,
1155
1609
  columns: t.columns.map((c) => c._key === col._key ? withPatch(c, p) : c)
1156
1610
  })
1157
- })
1158
- })]
1159
- });
1611
+ }, void 0, false, {
1612
+ fileName: _jsxFileName,
1613
+ lineNumber: 847,
1614
+ columnNumber: 9
1615
+ }, this)
1616
+ }, void 0, false, {
1617
+ fileName: _jsxFileName,
1618
+ lineNumber: 846,
1619
+ columnNumber: 7
1620
+ }, this)]
1621
+ }, void 0, true, {
1622
+ fileName: _jsxFileName,
1623
+ lineNumber: 785,
1624
+ columnNumber: 5
1625
+ }, this);
1160
1626
  }
1161
1627
  /** A stored TableLink as the global link field's value (V2 tableLinkValue). */
1162
1628
  var tableLinkValue = (l) => ({
@@ -1176,25 +1642,37 @@ function withPatch(c, p) {
1176
1642
  }
1177
1643
  function ColumnDetails({ col, onPatch, compact = true, readOnly }) {
1178
1644
  const id = React.useId();
1179
- const row = (key, label, node, help) => /* @__PURE__ */ jsxs("label", {
1645
+ const row = (key, label, node, help) => /* @__PURE__ */ jsxDEV("label", {
1180
1646
  htmlFor: `${id}-${key}`,
1181
1647
  className: cn("flex flex-col", compact ? "gap-1" : "gap-1.5"),
1182
1648
  children: [
1183
- /* @__PURE__ */ jsx("span", {
1649
+ /* @__PURE__ */ jsxDEV("span", {
1184
1650
  className: cn("font-medium text-kit-fg-2", compact ? "text-kit-xs" : "text-kit-sm"),
1185
1651
  children: label
1186
- }),
1652
+ }, void 0, false, {
1653
+ fileName: _jsxFileName,
1654
+ lineNumber: 866,
1655
+ columnNumber: 7
1656
+ }, this),
1187
1657
  node,
1188
- help ? /* @__PURE__ */ jsx("span", {
1658
+ help ? /* @__PURE__ */ jsxDEV("span", {
1189
1659
  className: "text-kit-2xs leading-4 text-kit-fg-3",
1190
1660
  children: help
1191
- }) : null
1661
+ }, void 0, false, {
1662
+ fileName: _jsxFileName,
1663
+ lineNumber: 868,
1664
+ columnNumber: 15
1665
+ }, this) : null
1192
1666
  ]
1193
- });
1194
- return /* @__PURE__ */ jsxs("div", {
1667
+ }, void 0, true, {
1668
+ fileName: _jsxFileName,
1669
+ lineNumber: 865,
1670
+ columnNumber: 5
1671
+ }, this);
1672
+ return /* @__PURE__ */ jsxDEV("div", {
1195
1673
  className: cn("flex flex-col", compact ? "gap-2.5" : "gap-4"),
1196
1674
  children: [
1197
- col.type === "number" ? row("unit", "Unit", /* @__PURE__ */ jsx(Input, {
1675
+ col.type === "number" ? row("unit", "Unit", /* @__PURE__ */ jsxDEV(Input, {
1198
1676
  id: `${id}-unit`,
1199
1677
  size: "sm",
1200
1678
  autoFocus: compact,
@@ -1203,8 +1681,12 @@ function ColumnDetails({ col, onPatch, compact = true, readOnly }) {
1203
1681
  value: col.unit ?? "",
1204
1682
  placeholder: "kg, %, min",
1205
1683
  onChange: (e) => onPatch({ unit: e.target.value || void 0 })
1206
- }), "Written after every value.") : null,
1207
- col.type === "money" ? row("currency", "Currency", /* @__PURE__ */ jsx(Segmented, {
1684
+ }, void 0, false, {
1685
+ fileName: _jsxFileName,
1686
+ lineNumber: 874,
1687
+ columnNumber: 31
1688
+ }, this), "Written after every value.") : null,
1689
+ col.type === "money" ? row("currency", "Currency", /* @__PURE__ */ jsxDEV(Segmented, {
1208
1690
  size: "sm",
1209
1691
  "aria-label": "Currency",
1210
1692
  value: col.currency ?? "USD",
@@ -1213,8 +1695,12 @@ function ColumnDetails({ col, onPatch, compact = true, readOnly }) {
1213
1695
  value: c,
1214
1696
  label: c
1215
1697
  }))
1216
- })) : null,
1217
- col.type === "rating" ? row("max", "Out of", /* @__PURE__ */ jsx(Input, {
1698
+ }, void 0, false, {
1699
+ fileName: _jsxFileName,
1700
+ lineNumber: 878,
1701
+ columnNumber: 37
1702
+ }, this)) : null,
1703
+ col.type === "rating" ? row("max", "Out of", /* @__PURE__ */ jsxDEV(Input, {
1218
1704
  id: `${id}-max`,
1219
1705
  size: "sm",
1220
1706
  autoFocus: compact,
@@ -1227,8 +1713,12 @@ function ColumnDetails({ col, onPatch, compact = true, readOnly }) {
1227
1713
  const n = Math.round(Number(e.target.value));
1228
1714
  onPatch({ max: Number.isFinite(n) && n >= 1 ? Math.min(10, n) : void 0 });
1229
1715
  }
1230
- })) : null,
1231
- col.type === "boolean" ? /* @__PURE__ */ jsxs(Fragment, { children: [row("yes", "Yes says", /* @__PURE__ */ jsx(Input, {
1716
+ }, void 0, false, {
1717
+ fileName: _jsxFileName,
1718
+ lineNumber: 884,
1719
+ columnNumber: 13
1720
+ }, this)) : null,
1721
+ col.type === "boolean" ? /* @__PURE__ */ jsxDEV(Fragment, { children: [row("yes", "Yes says", /* @__PURE__ */ jsxDEV(Input, {
1232
1722
  id: `${id}-yes`,
1233
1723
  size: "sm",
1234
1724
  autoFocus: compact,
@@ -1237,7 +1727,11 @@ function ColumnDetails({ col, onPatch, compact = true, readOnly }) {
1237
1727
  value: col.trueLabel ?? "",
1238
1728
  placeholder: "Included",
1239
1729
  onChange: (e) => onPatch({ trueLabel: e.target.value || void 0 })
1240
- }), "People who can't see the check mark hear these words."), row("no", "No says", /* @__PURE__ */ jsx(Input, {
1730
+ }, void 0, false, {
1731
+ fileName: _jsxFileName,
1732
+ lineNumber: 903,
1733
+ columnNumber: 35
1734
+ }, this), "People who can't see the check mark hear these words."), row("no", "No says", /* @__PURE__ */ jsxDEV(Input, {
1241
1735
  id: `${id}-no`,
1242
1736
  size: "sm",
1243
1737
  readOnly,
@@ -1245,9 +1739,21 @@ function ColumnDetails({ col, onPatch, compact = true, readOnly }) {
1245
1739
  value: col.falseLabel ?? "",
1246
1740
  placeholder: "Not included",
1247
1741
  onChange: (e) => onPatch({ falseLabel: e.target.value || void 0 })
1248
- }))] }) : null
1742
+ }, void 0, false, {
1743
+ fileName: _jsxFileName,
1744
+ lineNumber: 904,
1745
+ columnNumber: 33
1746
+ }, this))] }, void 0, true, {
1747
+ fileName: _jsxFileName,
1748
+ lineNumber: 902,
1749
+ columnNumber: 9
1750
+ }, this) : null
1249
1751
  ]
1250
- });
1752
+ }, void 0, true, {
1753
+ fileName: _jsxFileName,
1754
+ lineNumber: 872,
1755
+ columnNumber: 5
1756
+ }, this);
1251
1757
  }
1252
1758
  function RowMenu({ ctx, row, index, count, onInsert, children }) {
1253
1759
  const { t, set, edit } = ctx;
@@ -1273,66 +1779,126 @@ function RowMenu({ ctx, row, index, count, onInsert, children }) {
1273
1779
  ctx.undoable("Row deleted", prev);
1274
1780
  };
1275
1781
  const groups = offered(ctx.options).groups ? t.rowGroups ?? [] : [];
1276
- const trigger = /* @__PURE__ */ jsx(MenuTrigger, {
1277
- render: /* @__PURE__ */ jsx(IconButton, {
1782
+ const trigger = /* @__PURE__ */ jsxDEV(MenuTrigger, {
1783
+ render: /* @__PURE__ */ jsxDEV(IconButton, {
1278
1784
  size: "xs",
1279
1785
  tabIndex: -1,
1280
1786
  label: `Options for row ${index + 1}`
1281
- }),
1282
- children: /* @__PURE__ */ jsx(IconDots, { stroke: 1.5 })
1283
- });
1284
- return /* @__PURE__ */ jsxs(Menu, { children: [children(trigger), /* @__PURE__ */ jsxs(MenuContent, {
1787
+ }, void 0, false, {
1788
+ fileName: _jsxFileName,
1789
+ lineNumber: 926,
1790
+ columnNumber: 26
1791
+ }, this),
1792
+ children: /* @__PURE__ */ jsxDEV(IconDots, { stroke: 1.5 }, void 0, false, {
1793
+ fileName: _jsxFileName,
1794
+ lineNumber: 927,
1795
+ columnNumber: 7
1796
+ }, this)
1797
+ }, void 0, false, {
1798
+ fileName: _jsxFileName,
1799
+ lineNumber: 926,
1800
+ columnNumber: 5
1801
+ }, this);
1802
+ return /* @__PURE__ */ jsxDEV(Menu, { children: [children(trigger), /* @__PURE__ */ jsxDEV(MenuContent, {
1285
1803
  className: "min-w-52",
1286
1804
  children: [
1287
- /* @__PURE__ */ jsx(MenuItem, {
1805
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1288
1806
  disabled: atMax,
1289
1807
  onClick: () => onInsert(false),
1290
1808
  children: "Insert row above"
1291
- }),
1292
- /* @__PURE__ */ jsx(MenuItem, {
1809
+ }, void 0, false, {
1810
+ fileName: _jsxFileName,
1811
+ lineNumber: 934,
1812
+ columnNumber: 9
1813
+ }, this),
1814
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1293
1815
  disabled: atMax,
1294
1816
  onClick: () => onInsert(true),
1295
1817
  children: "Insert row below"
1296
- }),
1297
- /* @__PURE__ */ jsx(MenuItem, {
1818
+ }, void 0, false, {
1819
+ fileName: _jsxFileName,
1820
+ lineNumber: 935,
1821
+ columnNumber: 9
1822
+ }, this),
1823
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1298
1824
  disabled: atMax,
1299
1825
  onClick: duplicate,
1300
1826
  children: "Duplicate row"
1301
- }),
1302
- /* @__PURE__ */ jsx(MenuItem, {
1827
+ }, void 0, false, {
1828
+ fileName: _jsxFileName,
1829
+ lineNumber: 936,
1830
+ columnNumber: 9
1831
+ }, this),
1832
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1303
1833
  disabled: index === 0,
1304
1834
  onClick: () => set(moveRowTo(t, index, index - 1)),
1305
1835
  children: "Move up"
1306
- }),
1307
- /* @__PURE__ */ jsx(MenuItem, {
1836
+ }, void 0, false, {
1837
+ fileName: _jsxFileName,
1838
+ lineNumber: 937,
1839
+ columnNumber: 9
1840
+ }, this),
1841
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1308
1842
  disabled: index === count - 1,
1309
1843
  onClick: () => set(moveRowTo(t, index, index + 1)),
1310
1844
  children: "Move down"
1311
- }),
1312
- groups.length ? /* @__PURE__ */ jsxs(MenuSub, { children: [/* @__PURE__ */ jsx(MenuSubTrigger, { children: "Move to group" }), /* @__PURE__ */ jsx(MenuSubContent, { children: /* @__PURE__ */ jsxs(MenuRadioGroup, {
1845
+ }, void 0, false, {
1846
+ fileName: _jsxFileName,
1847
+ lineNumber: 938,
1848
+ columnNumber: 9
1849
+ }, this),
1850
+ groups.length ? /* @__PURE__ */ jsxDEV(MenuSub, { children: [/* @__PURE__ */ jsxDEV(MenuSubTrigger, { children: "Move to group" }, void 0, false, {
1851
+ fileName: _jsxFileName,
1852
+ lineNumber: 941,
1853
+ columnNumber: 13
1854
+ }, this), /* @__PURE__ */ jsxDEV(MenuSubContent, { children: /* @__PURE__ */ jsxDEV(MenuRadioGroup, {
1313
1855
  value: row.group ?? "",
1314
1856
  onValueChange: (g) => edit(mapRow(row._key, (x) => clean({
1315
1857
  ...x,
1316
1858
  group: g || void 0,
1317
1859
  footer: void 0
1318
1860
  }))),
1319
- children: [/* @__PURE__ */ jsx(MenuRadioItem, {
1861
+ children: [/* @__PURE__ */ jsxDEV(MenuRadioItem, {
1320
1862
  value: "",
1321
1863
  children: "No group"
1322
- }), groups.map((g) => /* @__PURE__ */ jsx(MenuRadioItem, {
1864
+ }, void 0, false, {
1865
+ fileName: _jsxFileName,
1866
+ lineNumber: 944,
1867
+ columnNumber: 17
1868
+ }, this), groups.map((g) => /* @__PURE__ */ jsxDEV(MenuRadioItem, {
1323
1869
  value: g._key,
1324
1870
  children: g.label || "Untitled group"
1325
- }, g._key))]
1326
- }) })] }) : null,
1327
- offered(ctx.options).highlight ? /* @__PURE__ */ jsx(MenuCheckItem, {
1871
+ }, g._key, false, {
1872
+ fileName: _jsxFileName,
1873
+ lineNumber: 946,
1874
+ columnNumber: 19
1875
+ }, this))]
1876
+ }, void 0, true, {
1877
+ fileName: _jsxFileName,
1878
+ lineNumber: 943,
1879
+ columnNumber: 15
1880
+ }, this) }, void 0, false, {
1881
+ fileName: _jsxFileName,
1882
+ lineNumber: 942,
1883
+ columnNumber: 13
1884
+ }, this)] }, void 0, true, {
1885
+ fileName: _jsxFileName,
1886
+ lineNumber: 940,
1887
+ columnNumber: 11
1888
+ }, this) : null,
1889
+ offered(ctx.options).highlight ? /* @__PURE__ */ jsxDEV(MenuCheckItem, {
1328
1890
  checked: !!row.highlight,
1329
1891
  onCheckedChange: (v) => edit(mapRow(row._key, (x) => clean({
1330
1892
  ...x,
1331
1893
  highlight: v
1332
1894
  }))),
1333
1895
  children: "Highlight this row"
1334
- }) : null,
1335
- offered(ctx.options).totals ? /* @__PURE__ */ jsx(MenuCheckItem, {
1896
+ }, void 0, false, {
1897
+ fileName: _jsxFileName,
1898
+ lineNumber: 952,
1899
+ columnNumber: 43
1900
+ }, this) : null,
1901
+ offered(ctx.options).totals ? /* @__PURE__ */ jsxDEV(MenuCheckItem, {
1336
1902
  checked: !!row.footer,
1337
1903
  onCheckedChange: (v) => edit(mapRow(row._key, (x) => clean({
1338
1904
  ...x,
@@ -1340,15 +1906,35 @@ function RowMenu({ ctx, row, index, count, onInsert, children }) {
1340
1906
  group: void 0
1341
1907
  }))),
1342
1908
  children: "Totals row"
1343
- }) : null,
1344
- /* @__PURE__ */ jsx(MenuSeparator, {}),
1345
- /* @__PURE__ */ jsx(MenuItem, {
1909
+ }, void 0, false, {
1910
+ fileName: _jsxFileName,
1911
+ lineNumber: 953,
1912
+ columnNumber: 40
1913
+ }, this) : null,
1914
+ /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
1915
+ fileName: _jsxFileName,
1916
+ lineNumber: 954,
1917
+ columnNumber: 9
1918
+ }, this),
1919
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1346
1920
  danger: true,
1347
1921
  onClick: remove,
1348
1922
  children: "Delete row"
1349
- })
1923
+ }, void 0, false, {
1924
+ fileName: _jsxFileName,
1925
+ lineNumber: 955,
1926
+ columnNumber: 9
1927
+ }, this)
1350
1928
  ]
1351
- })] });
1929
+ }, void 0, true, {
1930
+ fileName: _jsxFileName,
1931
+ lineNumber: 933,
1932
+ columnNumber: 7
1933
+ }, this)] }, void 0, true, {
1934
+ fileName: _jsxFileName,
1935
+ lineNumber: 931,
1936
+ columnNumber: 5
1937
+ }, this);
1352
1938
  }
1353
1939
  /** Right-click (or Shift+F10 / the menu key) on a cell: words instead of the column's type, a footnote, clear. */
1354
1940
  function CellMenu({ ctx, row, col, cell, onWrite, onNote, children }) {
@@ -1384,42 +1970,86 @@ function CellMenu({ ctx, row, col, cell, onWrite, onNote, children }) {
1384
1970
  rows: order
1385
1971
  });
1386
1972
  };
1387
- return /* @__PURE__ */ jsxs(ContextMenu.Root, { children: [/* @__PURE__ */ jsx(ContextMenu.Trigger, {
1388
- render: /* @__PURE__ */ jsx("div", {}),
1973
+ return /* @__PURE__ */ jsxDEV(ContextMenu.Root, { children: [/* @__PURE__ */ jsxDEV(ContextMenu.Trigger, {
1974
+ render: /* @__PURE__ */ jsxDEV("div", {}, void 0, false, {
1975
+ fileName: _jsxFileName,
1976
+ lineNumber: 982,
1977
+ columnNumber: 36
1978
+ }, this),
1389
1979
  children
1390
- }), /* @__PURE__ */ jsxs(MenuContent, {
1980
+ }, void 0, false, {
1981
+ fileName: _jsxFileName,
1982
+ lineNumber: 982,
1983
+ columnNumber: 7
1984
+ }, this), /* @__PURE__ */ jsxDEV(MenuContent, {
1391
1985
  className: "min-w-52",
1392
1986
  children: [
1393
- colType !== "text" && colType !== "reference" && colType !== "richtext-inline" ? /* @__PURE__ */ jsx(MenuItem, {
1987
+ colType !== "text" && colType !== "reference" && colType !== "richtext-inline" ? /* @__PURE__ */ jsxDEV(MenuItem, {
1394
1988
  onClick: () => setOwn(asText ? void 0 : "text"),
1395
1989
  children: asText ? `Use ${TYPE_UI[colType].label} like the column` : "Write words in this cell instead"
1396
- }) : null,
1397
- offered(ctx.options).footnotes ? note ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MenuItem, {
1990
+ }, void 0, false, {
1991
+ fileName: _jsxFileName,
1992
+ lineNumber: 985,
1993
+ columnNumber: 11
1994
+ }, this) : null,
1995
+ offered(ctx.options).footnotes ? note ? /* @__PURE__ */ jsxDEV(Fragment, { children: [/* @__PURE__ */ jsxDEV(MenuItem, {
1398
1996
  onClick: onNote,
1399
1997
  children: "Edit footnote"
1400
- }), /* @__PURE__ */ jsx(MenuItem, {
1998
+ }, void 0, false, {
1999
+ fileName: _jsxFileName,
2000
+ lineNumber: 990,
2001
+ columnNumber: 15
2002
+ }, this), /* @__PURE__ */ jsxDEV(MenuItem, {
1401
2003
  onClick: () => set(unlinkNote(t, row._key, col._key)),
1402
2004
  children: "Remove footnote"
1403
- })] }) : /* @__PURE__ */ jsx(MenuItem, {
2005
+ }, void 0, false, {
2006
+ fileName: _jsxFileName,
2007
+ lineNumber: 991,
2008
+ columnNumber: 15
2009
+ }, this)] }, void 0, true, {
2010
+ fileName: _jsxFileName,
2011
+ lineNumber: 989,
2012
+ columnNumber: 13
2013
+ }, this) : /* @__PURE__ */ jsxDEV(MenuItem, {
1404
2014
  onClick: () => (set(linkNote(t, row._key, col._key)[0]), onNote()),
1405
2015
  children: "Add a footnote"
1406
- }) : null,
1407
- /* @__PURE__ */ jsx(MenuSeparator, {}),
1408
- /* @__PURE__ */ jsx(MenuItem, {
2016
+ }, void 0, false, {
2017
+ fileName: _jsxFileName,
2018
+ lineNumber: 994,
2019
+ columnNumber: 13
2020
+ }, this) : null,
2021
+ /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
2022
+ fileName: _jsxFileName,
2023
+ lineNumber: 997,
2024
+ columnNumber: 9
2025
+ }, this),
2026
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1409
2027
  disabled: atMax,
1410
2028
  onClick: () => insertRow(true),
1411
2029
  children: "Insert row below"
1412
- }),
1413
- /* @__PURE__ */ jsx(MenuItem, {
2030
+ }, void 0, false, {
2031
+ fileName: _jsxFileName,
2032
+ lineNumber: 998,
2033
+ columnNumber: 9
2034
+ }, this),
2035
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1414
2036
  disabled: atMax,
1415
2037
  onClick: () => insertRow(false),
1416
2038
  children: "Insert row above"
1417
- }),
1418
- /* @__PURE__ */ jsx(MenuItem, {
2039
+ }, void 0, false, {
2040
+ fileName: _jsxFileName,
2041
+ lineNumber: 999,
2042
+ columnNumber: 9
2043
+ }, this),
2044
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1419
2045
  onClick: () => onWrite(withValue(cell, null)),
1420
2046
  children: "Clear cell"
1421
- }),
1422
- /* @__PURE__ */ jsx(MenuItem, {
2047
+ }, void 0, false, {
2048
+ fileName: _jsxFileName,
2049
+ lineNumber: 1e3,
2050
+ columnNumber: 9
2051
+ }, this),
2052
+ /* @__PURE__ */ jsxDEV(MenuItem, {
1423
2053
  danger: true,
1424
2054
  onClick: () => {
1425
2055
  const prev = t;
@@ -1430,9 +2060,21 @@ function CellMenu({ ctx, row, col, cell, onWrite, onNote, children }) {
1430
2060
  ctx.undoable("Row deleted", prev);
1431
2061
  },
1432
2062
  children: "Delete row"
1433
- })
2063
+ }, void 0, false, {
2064
+ fileName: _jsxFileName,
2065
+ lineNumber: 1001,
2066
+ columnNumber: 9
2067
+ }, this)
1434
2068
  ]
1435
- })] });
2069
+ }, void 0, true, {
2070
+ fileName: _jsxFileName,
2071
+ lineNumber: 983,
2072
+ columnNumber: 7
2073
+ }, this)] }, void 0, true, {
2074
+ fileName: _jsxFileName,
2075
+ lineNumber: 981,
2076
+ columnNumber: 5
2077
+ }, this);
1436
2078
  }
1437
2079
  var hasName = (t, r) => !!t.columns[0] && !isEmptyCell(cellValue(r.cells[t.columns[0]._key]));
1438
2080
  /** The row that was open when its drill closed, per table: focus lands back on it (form frames and the local drill). */
@@ -1569,9 +2211,9 @@ function TableBody({ ctx, label, nav, head }) {
1569
2211
  };
1570
2212
  const list = open ? open.kind === "rows" ? t.rows : t.columns : [];
1571
2213
  const at = open ? list.findIndex((x) => x._key === open.key) : -1;
1572
- if (open && at >= 0) return /* @__PURE__ */ jsx("div", {
2214
+ if (open && at >= 0) return /* @__PURE__ */ jsxDEV("div", {
1573
2215
  className: TABLE_GROUP,
1574
- children: /* @__PURE__ */ jsx(LocalDrill, {
2216
+ children: /* @__PURE__ */ jsxDEV(LocalDrill, {
1575
2217
  ctx,
1576
2218
  label,
1577
2219
  open,
@@ -1581,35 +2223,59 @@ function TableBody({ ctx, label, nav, head }) {
1581
2223
  kind: open.kind,
1582
2224
  key
1583
2225
  })
1584
- })
1585
- });
2226
+ }, void 0, false, {
2227
+ fileName: _jsxFileName,
2228
+ lineNumber: 1118,
2229
+ columnNumber: 9
2230
+ }, this)
2231
+ }, void 0, false, {
2232
+ fileName: _jsxFileName,
2233
+ lineNumber: 1117,
2234
+ columnNumber: 7
2235
+ }, this);
1586
2236
  const base = nav?.basePath ?? [];
1587
2237
  const titleId = `${id}-title`;
1588
2238
  const noteId = `${id}-note`;
1589
- return /* @__PURE__ */ jsxs("div", {
2239
+ return /* @__PURE__ */ jsxDEV("div", {
1590
2240
  ref: host,
1591
2241
  role: "group",
1592
2242
  "aria-label": label || "Table",
1593
2243
  className: cn(TABLE_GROUP, "flex flex-col gap-4 @max-[360px]:gap-3", !readOnly && "mb-2"),
1594
2244
  children: [
1595
- /* @__PURE__ */ jsxs("div", {
2245
+ /* @__PURE__ */ jsxDEV("div", {
1596
2246
  className: "group/part flex flex-col gap-1.5",
1597
- children: [/* @__PURE__ */ jsxs("div", {
2247
+ children: [/* @__PURE__ */ jsxDEV("div", {
1598
2248
  className: "flex min-h-5 items-center gap-1.5",
1599
2249
  children: [
1600
- /* @__PURE__ */ jsx("label", {
2250
+ /* @__PURE__ */ jsxDEV("label", {
1601
2251
  htmlFor: titleId,
1602
2252
  className: PART_LABEL,
1603
2253
  children: "Title"
1604
- }),
1605
- options.requireCaption !== false && !t.caption.trim() ? /* @__PURE__ */ jsx("span", {
2254
+ }, void 0, false, {
2255
+ fileName: _jsxFileName,
2256
+ lineNumber: 1129,
2257
+ columnNumber: 11
2258
+ }, this),
2259
+ options.requireCaption !== false && !t.caption.trim() ? /* @__PURE__ */ jsxDEV("span", {
1606
2260
  className: "text-kit-xs text-kit-fg-3",
1607
2261
  children: "Required"
1608
- }) : null,
1609
- /* @__PURE__ */ jsx("span", { className: "flex-1" }),
2262
+ }, void 0, false, {
2263
+ fileName: _jsxFileName,
2264
+ lineNumber: 1130,
2265
+ columnNumber: 68
2266
+ }, this) : null,
2267
+ /* @__PURE__ */ jsxDEV("span", { className: "flex-1" }, void 0, false, {
2268
+ fileName: _jsxFileName,
2269
+ lineNumber: 1131,
2270
+ columnNumber: 11
2271
+ }, this),
1610
2272
  head
1611
2273
  ]
1612
- }), /* @__PURE__ */ jsx(Textarea, {
2274
+ }, void 0, true, {
2275
+ fileName: _jsxFileName,
2276
+ lineNumber: 1128,
2277
+ columnNumber: 9
2278
+ }, this), /* @__PURE__ */ jsxDEV(Textarea, {
1613
2279
  id: titleId,
1614
2280
  rows: 1,
1615
2281
  maxLength: 300,
@@ -1621,25 +2287,45 @@ function TableBody({ ctx, label, nav, head }) {
1621
2287
  caption: e.target.value.replace(/\n/g, " ")
1622
2288
  }),
1623
2289
  className: "min-h-8 resize-none py-1.5"
1624
- })]
1625
- }),
1626
- /* @__PURE__ */ jsx(ColumnsPart, {
2290
+ }, void 0, false, {
2291
+ fileName: _jsxFileName,
2292
+ lineNumber: 1134,
2293
+ columnNumber: 9
2294
+ }, this)]
2295
+ }, void 0, true, {
2296
+ fileName: _jsxFileName,
2297
+ lineNumber: 1127,
2298
+ columnNumber: 7
2299
+ }, this),
2300
+ /* @__PURE__ */ jsxDEV(ColumnsPart, {
1627
2301
  ctx,
1628
2302
  basePath: base,
1629
2303
  onOpen: (i, key) => go("columns", i, key)
1630
- }),
1631
- /* @__PURE__ */ jsx(RowsPart, {
2304
+ }, void 0, false, {
2305
+ fileName: _jsxFileName,
2306
+ lineNumber: 1136,
2307
+ columnNumber: 7
2308
+ }, this),
2309
+ /* @__PURE__ */ jsxDEV(RowsPart, {
1632
2310
  ctx,
1633
2311
  basePath: base,
1634
2312
  onOpen: (i, key) => go("rows", i, key)
1635
- }),
1636
- offered(options).note ? /* @__PURE__ */ jsxs("div", {
2313
+ }, void 0, false, {
2314
+ fileName: _jsxFileName,
2315
+ lineNumber: 1137,
2316
+ columnNumber: 7
2317
+ }, this),
2318
+ offered(options).note ? /* @__PURE__ */ jsxDEV("div", {
1637
2319
  className: "group/part flex flex-col gap-1.5",
1638
- children: [/* @__PURE__ */ jsx("label", {
2320
+ children: [/* @__PURE__ */ jsxDEV("label", {
1639
2321
  htmlFor: noteId,
1640
2322
  className: PART_LABEL,
1641
2323
  children: "Note under the table"
1642
- }), /* @__PURE__ */ jsx(Textarea, {
2324
+ }, void 0, false, {
2325
+ fileName: _jsxFileName,
2326
+ lineNumber: 1140,
2327
+ columnNumber: 11
2328
+ }, this), /* @__PURE__ */ jsxDEV(Textarea, {
1643
2329
  id: noteId,
1644
2330
  rows: 2,
1645
2331
  maxLength: 2e3,
@@ -1650,11 +2336,27 @@ function TableBody({ ctx, label, nav, head }) {
1650
2336
  ...t,
1651
2337
  notes: e.target.value || void 0
1652
2338
  })
1653
- })]
1654
- }) : null,
1655
- readOnly ? null : /* @__PURE__ */ jsx(TableSettings, { ctx })
2339
+ }, void 0, false, {
2340
+ fileName: _jsxFileName,
2341
+ lineNumber: 1141,
2342
+ columnNumber: 11
2343
+ }, this)]
2344
+ }, void 0, true, {
2345
+ fileName: _jsxFileName,
2346
+ lineNumber: 1139,
2347
+ columnNumber: 9
2348
+ }, this) : null,
2349
+ readOnly ? null : /* @__PURE__ */ jsxDEV(TableSettings, { ctx }, void 0, false, {
2350
+ fileName: _jsxFileName,
2351
+ lineNumber: 1144,
2352
+ columnNumber: 26
2353
+ }, this)
1656
2354
  ]
1657
- });
2355
+ }, void 0, true, {
2356
+ fileName: _jsxFileName,
2357
+ lineNumber: 1126,
2358
+ columnNumber: 5
2359
+ }, this);
1658
2360
  }
1659
2361
  /** Columns: an array list like any other (type icon, name, "Yes / No" summary, ⋯, ›). */
1660
2362
  function ColumnsPart({ ctx, basePath, onOpen }) {
@@ -1705,14 +2407,18 @@ function ColumnsPart({ ctx, basePath, onOpen }) {
1705
2407
  empty: !c.label
1706
2408
  }
1707
2409
  }));
1708
- return /* @__PURE__ */ jsxs("div", {
2410
+ return /* @__PURE__ */ jsxDEV("div", {
1709
2411
  role: "group",
1710
2412
  "aria-label": "Columns",
1711
2413
  className: "group/part flex flex-col gap-1.5",
1712
- children: [/* @__PURE__ */ jsx("span", {
2414
+ children: [/* @__PURE__ */ jsxDEV("span", {
1713
2415
  className: PART_LABEL,
1714
2416
  children: "Columns"
1715
- }), /* @__PURE__ */ jsx(RowList, {
2417
+ }, void 0, false, {
2418
+ fileName: _jsxFileName,
2419
+ lineNumber: 1185,
2420
+ columnNumber: 7
2421
+ }, this), /* @__PURE__ */ jsxDEV(RowList, {
1716
2422
  field: {
1717
2423
  ...COLUMNS_FIELD,
1718
2424
  validation: { min: 1 }
@@ -1727,24 +2433,48 @@ function ColumnsPart({ ctx, basePath, onOpen }) {
1727
2433
  ops,
1728
2434
  renderInline: () => null,
1729
2435
  emptyLabel: "No columns yet.",
1730
- leading: (r) => /* @__PURE__ */ jsx("span", {
2436
+ leading: (r) => /* @__PURE__ */ jsxDEV("span", {
1731
2437
  className: "flex size-7 shrink-0 items-center justify-center rounded-kit-md bg-kit-muted text-kit-fg-2",
1732
- children: /* @__PURE__ */ jsx(TypeIcon, {
2438
+ children: /* @__PURE__ */ jsxDEV(TypeIcon, {
1733
2439
  type: r.item.type,
1734
2440
  className: "size-4 text-kit-fg-2"
1735
- })
1736
- }),
1737
- addButton: /* @__PURE__ */ jsx(Button, {
2441
+ }, void 0, false, {
2442
+ fileName: _jsxFileName,
2443
+ lineNumber: 1200,
2444
+ columnNumber: 13
2445
+ }, this)
2446
+ }, void 0, false, {
2447
+ fileName: _jsxFileName,
2448
+ lineNumber: 1199,
2449
+ columnNumber: 11
2450
+ }, this),
2451
+ addButton: /* @__PURE__ */ jsxDEV(Button, {
1738
2452
  size: "sm",
1739
2453
  variant: "ghost",
1740
2454
  className: "text-kit-fg-2",
1741
- leftIcon: /* @__PURE__ */ jsx(IconPlus, { stroke: 1.5 }),
2455
+ leftIcon: /* @__PURE__ */ jsxDEV(IconPlus, { stroke: 1.5 }, void 0, false, {
2456
+ fileName: _jsxFileName,
2457
+ lineNumber: 1204,
2458
+ columnNumber: 81
2459
+ }, this),
1742
2460
  disabled: atMax,
1743
2461
  onClick: add,
1744
2462
  children: atMax ? `Add column · ${options.maxColumns} at most` : "Add column"
1745
- })
1746
- })]
1747
- });
2463
+ }, void 0, false, {
2464
+ fileName: _jsxFileName,
2465
+ lineNumber: 1204,
2466
+ columnNumber: 11
2467
+ }, this)
2468
+ }, void 0, false, {
2469
+ fileName: _jsxFileName,
2470
+ lineNumber: 1186,
2471
+ columnNumber: 7
2472
+ }, this)]
2473
+ }, void 0, true, {
2474
+ fileName: _jsxFileName,
2475
+ lineNumber: 1184,
2476
+ columnNumber: 5
2477
+ }, this);
1748
2478
  }
1749
2479
  /**
1750
2480
  * Rows (D52): groups live in the row list itself. Loose rows first, then each group under a heading you rename in place
@@ -1895,53 +2625,93 @@ function RowsPart({ ctx, basePath, onOpen }) {
1895
2625
  }] : []
1896
2626
  ];
1897
2627
  if (!places.some((p) => p.value !== here)) return null;
1898
- return /* @__PURE__ */ jsxs(MenuSub, { children: [/* @__PURE__ */ jsx(MenuSubTrigger, {
1899
- icon: /* @__PURE__ */ jsx(IconFolder, { stroke: 1.5 }),
2628
+ return /* @__PURE__ */ jsxDEV(MenuSub, { children: [/* @__PURE__ */ jsxDEV(MenuSubTrigger, {
2629
+ icon: /* @__PURE__ */ jsxDEV(IconFolder, { stroke: 1.5 }, void 0, false, {
2630
+ fileName: _jsxFileName,
2631
+ lineNumber: 1307,
2632
+ columnNumber: 31
2633
+ }, this),
1900
2634
  children: "Move to group"
1901
- }), /* @__PURE__ */ jsx(MenuSubContent, {
2635
+ }, void 0, false, {
2636
+ fileName: _jsxFileName,
2637
+ lineNumber: 1307,
2638
+ columnNumber: 9
2639
+ }, this), /* @__PURE__ */ jsxDEV(MenuSubContent, {
1902
2640
  className: "min-w-44",
1903
- children: /* @__PURE__ */ jsx(MenuRadioGroup, {
2641
+ children: /* @__PURE__ */ jsxDEV(MenuRadioGroup, {
1904
2642
  value: here,
1905
2643
  onValueChange: (v) => v !== here && moveTo(row, v === "totals" ? { totals: true } : { group: v || void 0 }),
1906
- children: places.map((p) => /* @__PURE__ */ jsx(MenuRadioItem, {
2644
+ children: places.map((p) => /* @__PURE__ */ jsxDEV(MenuRadioItem, {
1907
2645
  value: p.value,
1908
2646
  children: p.label
1909
- }, p.value || "none"))
1910
- })
1911
- })] });
2647
+ }, p.value || "none", false, {
2648
+ fileName: _jsxFileName,
2649
+ lineNumber: 1311,
2650
+ columnNumber: 15
2651
+ }, this))
2652
+ }, void 0, false, {
2653
+ fileName: _jsxFileName,
2654
+ lineNumber: 1309,
2655
+ columnNumber: 11
2656
+ }, this)
2657
+ }, void 0, false, {
2658
+ fileName: _jsxFileName,
2659
+ lineNumber: 1308,
2660
+ columnNumber: 9
2661
+ }, this)] }, void 0, true, {
2662
+ fileName: _jsxFileName,
2663
+ lineNumber: 1306,
2664
+ columnNumber: 7
2665
+ }, this);
1912
2666
  };
1913
2667
  const sharedSort = useSharedSort();
1914
2668
  const unnamed = t.rows.find((r) => !hasName(t, r) && t.columns.slice(1).some((c) => !isEmptyCell(cellValue(r.cells[c._key]))));
1915
- const addRowButton = (ri) => /* @__PURE__ */ jsx(Button, {
2669
+ const addRowButton = (ri) => /* @__PURE__ */ jsxDEV(Button, {
1916
2670
  size: "sm",
1917
2671
  variant: "ghost",
1918
2672
  className: "text-kit-fg-2",
1919
- leftIcon: /* @__PURE__ */ jsx(IconPlus, { stroke: 1.5 }),
2673
+ leftIcon: /* @__PURE__ */ jsxDEV(IconPlus, { stroke: 1.5 }, void 0, false, {
2674
+ fileName: _jsxFileName,
2675
+ lineNumber: 1323,
2676
+ columnNumber: 75
2677
+ }, this),
1920
2678
  disabled: atMax && !runs[ri].totals,
1921
2679
  onClick: () => add(ri),
1922
2680
  children: atMax && !runs[ri].totals ? `Add row · ${options.maxRows} at most` : "Add row"
1923
- });
1924
- return /* @__PURE__ */ jsxs("div", {
2681
+ }, void 0, false, {
2682
+ fileName: _jsxFileName,
2683
+ lineNumber: 1323,
2684
+ columnNumber: 5
2685
+ }, this);
2686
+ return /* @__PURE__ */ jsxDEV("div", {
1925
2687
  role: "group",
1926
2688
  "aria-label": "Rows",
1927
2689
  className: "group/part flex flex-col gap-1.5",
1928
2690
  children: [
1929
- /* @__PURE__ */ jsx("span", {
2691
+ /* @__PURE__ */ jsxDEV("span", {
1930
2692
  className: PART_LABEL,
1931
2693
  children: "Rows"
1932
- }),
1933
- unnamed && !readOnly ? /* @__PURE__ */ jsx("button", {
2694
+ }, void 0, false, {
2695
+ fileName: _jsxFileName,
2696
+ lineNumber: 1329,
2697
+ columnNumber: 7
2698
+ }, this),
2699
+ unnamed && !readOnly ? /* @__PURE__ */ jsxDEV("button", {
1934
2700
  type: "button",
1935
2701
  onClick: () => onOpen(t.rows.indexOf(unnamed), unnamed._key),
1936
2702
  className: "self-start text-left text-kit-xs text-kit-warning-fg underline-offset-2 hover:underline",
1937
2703
  children: "A row has values but no name. Open it"
1938
- }) : null,
1939
- /* @__PURE__ */ jsx(SharedSortProvider, {
2704
+ }, void 0, false, {
2705
+ fileName: _jsxFileName,
2706
+ lineNumber: 1331,
2707
+ columnNumber: 9
2708
+ }, this) : null,
2709
+ /* @__PURE__ */ jsxDEV(SharedSortProvider, {
1940
2710
  value: sharedSort.value,
1941
- children: /* @__PURE__ */ jsx("div", {
2711
+ children: /* @__PURE__ */ jsxDEV("div", {
1942
2712
  className: "flex flex-col gap-3",
1943
2713
  children: runs.map((run, ri) => {
1944
- const list = /* @__PURE__ */ jsx(RowList, {
2714
+ const list = /* @__PURE__ */ jsxDEV(RowList, {
1945
2715
  field: ROWS_FIELD,
1946
2716
  rows: run.items.map(model),
1947
2717
  readOnly,
@@ -1954,46 +2724,98 @@ function RowsPart({ ctx, basePath, onOpen }) {
1954
2724
  renderInline: () => null,
1955
2725
  menuExtra: moveMenu,
1956
2726
  emptyLabel: run.totals ? "No totals yet." : run.group ? "No rows in this group yet." : "No rows yet.",
1957
- addButton: ri === lastBody && can.groups ? /* @__PURE__ */ jsxs("span", {
2727
+ addButton: ri === lastBody && can.groups ? /* @__PURE__ */ jsxDEV("span", {
1958
2728
  className: "flex flex-wrap items-center gap-1",
1959
- children: [addRowButton(ri), /* @__PURE__ */ jsx(Button, {
2729
+ children: [addRowButton(ri), /* @__PURE__ */ jsxDEV(Button, {
1960
2730
  size: "sm",
1961
2731
  variant: "ghost",
1962
2732
  className: "text-kit-fg-2",
1963
- leftIcon: /* @__PURE__ */ jsx(IconPlus, { stroke: 1.5 }),
2733
+ leftIcon: /* @__PURE__ */ jsxDEV(IconPlus, { stroke: 1.5 }, void 0, false, {
2734
+ fileName: _jsxFileName,
2735
+ lineNumber: 1356,
2736
+ columnNumber: 91
2737
+ }, this),
1964
2738
  onClick: addGroup,
1965
2739
  children: "Add group"
1966
- })]
1967
- }) : addRowButton(ri)
1968
- });
1969
- if (!run.group && !run.totals) return /* @__PURE__ */ jsx("div", { children: list }, run.key);
1970
- return /* @__PURE__ */ jsxs("div", {
2740
+ }, void 0, false, {
2741
+ fileName: _jsxFileName,
2742
+ lineNumber: 1356,
2743
+ columnNumber: 21
2744
+ }, this)]
2745
+ }, void 0, true, {
2746
+ fileName: _jsxFileName,
2747
+ lineNumber: 1354,
2748
+ columnNumber: 19
2749
+ }, this) : addRowButton(ri)
2750
+ }, void 0, false, {
2751
+ fileName: _jsxFileName,
2752
+ lineNumber: 1339,
2753
+ columnNumber: 13
2754
+ }, this);
2755
+ if (!run.group && !run.totals) return /* @__PURE__ */ jsxDEV("div", { children: list }, run.key, false, {
2756
+ fileName: _jsxFileName,
2757
+ lineNumber: 1366,
2758
+ columnNumber: 49
2759
+ }, this);
2760
+ return /* @__PURE__ */ jsxDEV("div", {
1971
2761
  role: "group",
1972
2762
  "aria-label": run.totals ? "Totals" : run.group.label || "Untitled group",
1973
2763
  className: "flex flex-col gap-1.5",
1974
- children: [/* @__PURE__ */ jsx("div", {
2764
+ children: [/* @__PURE__ */ jsxDEV("div", {
1975
2765
  className: "rounded-kit-md transition-colors",
1976
- children: run.totals ? /* @__PURE__ */ jsx("span", {
2766
+ children: run.totals ? /* @__PURE__ */ jsxDEV("span", {
1977
2767
  className: "flex h-7 items-center px-0.5 text-kit-sm font-medium text-kit-fg-2",
1978
2768
  children: "Totals"
1979
- }) : /* @__PURE__ */ jsx(GroupHeading, {
2769
+ }, void 0, false, {
2770
+ fileName: _jsxFileName,
2771
+ lineNumber: 1372,
2772
+ columnNumber: 19
2773
+ }, this) : /* @__PURE__ */ jsxDEV(GroupHeading, {
1980
2774
  ctx,
1981
2775
  group: run.group,
1982
2776
  index: groups.indexOf(run.group),
1983
2777
  count: groups.length,
1984
2778
  rows: run.items.length
1985
- })
1986
- }), /* @__PURE__ */ jsx("div", {
2779
+ }, void 0, false, {
2780
+ fileName: _jsxFileName,
2781
+ lineNumber: 1374,
2782
+ columnNumber: 19
2783
+ }, this)
2784
+ }, void 0, false, {
2785
+ fileName: _jsxFileName,
2786
+ lineNumber: 1370,
2787
+ columnNumber: 15
2788
+ }, this), /* @__PURE__ */ jsxDEV("div", {
1987
2789
  className: "ml-1.5 border-l border-kit-line pl-3",
1988
2790
  children: list
1989
- })]
1990
- }, run.key);
2791
+ }, void 0, false, {
2792
+ fileName: _jsxFileName,
2793
+ lineNumber: 1377,
2794
+ columnNumber: 15
2795
+ }, this)]
2796
+ }, run.key, true, {
2797
+ fileName: _jsxFileName,
2798
+ lineNumber: 1368,
2799
+ columnNumber: 13
2800
+ }, this);
1991
2801
  })
1992
- })
1993
- }),
2802
+ }, void 0, false, {
2803
+ fileName: _jsxFileName,
2804
+ lineNumber: 1336,
2805
+ columnNumber: 7
2806
+ }, this)
2807
+ }, void 0, false, {
2808
+ fileName: _jsxFileName,
2809
+ lineNumber: 1335,
2810
+ columnNumber: 7
2811
+ }, this),
1994
2812
  sharedSort.a11y
1995
2813
  ]
1996
- });
2814
+ }, void 0, true, {
2815
+ fileName: _jsxFileName,
2816
+ lineNumber: 1328,
2817
+ columnNumber: 5
2818
+ }, this);
1997
2819
  }
1998
2820
  /** A row group's heading, renamed in place. It reads as a label at rest; its ⋯ moves or removes the group. */
1999
2821
  function GroupHeading({ ctx, group, index, count, rows }) {
@@ -2027,9 +2849,9 @@ function GroupHeading({ ctx, group, index, count, rows }) {
2027
2849
  });
2028
2850
  ctx.undoable(`“${group.label || "Untitled group"}” removed`, prev, rows ? `Its ${rows === 1 ? "row stays" : `${rows} rows stay`} in the table.` : void 0);
2029
2851
  };
2030
- return /* @__PURE__ */ jsxs("div", {
2852
+ return /* @__PURE__ */ jsxDEV("div", {
2031
2853
  className: "group/gh flex min-w-0 items-center gap-1",
2032
- children: [/* @__PURE__ */ jsx("input", {
2854
+ children: [/* @__PURE__ */ jsxDEV("input", {
2033
2855
  "data-group-name": group._key,
2034
2856
  value: draft,
2035
2857
  readOnly,
@@ -2049,38 +2871,90 @@ function GroupHeading({ ctx, group, index, count, rows }) {
2049
2871
  }
2050
2872
  },
2051
2873
  className: "-mx-0.5 h-7 min-w-0 flex-1 truncate rounded-kit-md bg-transparent px-0.5 text-[13px] font-medium text-kit-fg-2 outline-none transition-colors placeholder:font-normal placeholder:text-kit-fg-4 hover:bg-kit-hover focus:bg-kit-surface focus:px-2 focus:text-kit-fg focus:shadow-[inset_0_0_0_1px_var(--kit-line-strong)]"
2052
- }), readOnly ? null : /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, {
2053
- render: /* @__PURE__ */ jsx(IconButton, {
2874
+ }, void 0, false, {
2875
+ fileName: _jsxFileName,
2876
+ lineNumber: 1407,
2877
+ columnNumber: 7
2878
+ }, this), readOnly ? null : /* @__PURE__ */ jsxDEV(Menu, { children: [/* @__PURE__ */ jsxDEV(MenuTrigger, {
2879
+ render: /* @__PURE__ */ jsxDEV(IconButton, {
2054
2880
  size: "xs",
2055
2881
  label: `Options for ${group.label || "this group"}`,
2056
2882
  className: "opacity-0 focus-visible:opacity-100 group-hover/gh:opacity-100 group-focus-within/gh:opacity-100 data-[popup-open]:opacity-100 [@media(pointer:coarse)]:opacity-100"
2057
- }),
2058
- children: /* @__PURE__ */ jsx(IconDots, { stroke: 1.5 })
2059
- }), /* @__PURE__ */ jsxs(MenuContent, {
2883
+ }, void 0, false, {
2884
+ fileName: _jsxFileName,
2885
+ lineNumber: 1426,
2886
+ columnNumber: 15
2887
+ }, this),
2888
+ children: /* @__PURE__ */ jsxDEV(IconDots, { stroke: 1.5 }, void 0, false, {
2889
+ fileName: _jsxFileName,
2890
+ lineNumber: 1433,
2891
+ columnNumber: 13
2892
+ }, this)
2893
+ }, void 0, false, {
2894
+ fileName: _jsxFileName,
2895
+ lineNumber: 1424,
2896
+ columnNumber: 11
2897
+ }, this), /* @__PURE__ */ jsxDEV(MenuContent, {
2060
2898
  align: "end",
2061
2899
  className: "min-w-44",
2062
2900
  children: [
2063
- /* @__PURE__ */ jsx(MenuItem, {
2064
- icon: /* @__PURE__ */ jsx(IconArrowUp, { stroke: 1.5 }),
2901
+ /* @__PURE__ */ jsxDEV(MenuItem, {
2902
+ icon: /* @__PURE__ */ jsxDEV(IconArrowUp, { stroke: 1.5 }, void 0, false, {
2903
+ fileName: _jsxFileName,
2904
+ lineNumber: 1436,
2905
+ columnNumber: 29
2906
+ }, this),
2065
2907
  disabled: index === 0,
2066
2908
  onClick: () => moveGroup(-1),
2067
2909
  children: "Move up"
2068
- }),
2069
- /* @__PURE__ */ jsx(MenuItem, {
2070
- icon: /* @__PURE__ */ jsx(IconArrowDown, { stroke: 1.5 }),
2910
+ }, void 0, false, {
2911
+ fileName: _jsxFileName,
2912
+ lineNumber: 1436,
2913
+ columnNumber: 13
2914
+ }, this),
2915
+ /* @__PURE__ */ jsxDEV(MenuItem, {
2916
+ icon: /* @__PURE__ */ jsxDEV(IconArrowDown, { stroke: 1.5 }, void 0, false, {
2917
+ fileName: _jsxFileName,
2918
+ lineNumber: 1437,
2919
+ columnNumber: 29
2920
+ }, this),
2071
2921
  disabled: index >= count - 1,
2072
2922
  onClick: () => moveGroup(1),
2073
2923
  children: "Move down"
2074
- }),
2075
- /* @__PURE__ */ jsx(MenuSeparator, {}),
2076
- /* @__PURE__ */ jsx(MenuItem, {
2924
+ }, void 0, false, {
2925
+ fileName: _jsxFileName,
2926
+ lineNumber: 1437,
2927
+ columnNumber: 13
2928
+ }, this),
2929
+ /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
2930
+ fileName: _jsxFileName,
2931
+ lineNumber: 1438,
2932
+ columnNumber: 13
2933
+ }, this),
2934
+ /* @__PURE__ */ jsxDEV(MenuItem, {
2077
2935
  danger: true,
2078
2936
  onClick: remove,
2079
2937
  children: "Remove group"
2080
- })
2938
+ }, void 0, false, {
2939
+ fileName: _jsxFileName,
2940
+ lineNumber: 1439,
2941
+ columnNumber: 13
2942
+ }, this)
2081
2943
  ]
2082
- })] })]
2083
- });
2944
+ }, void 0, true, {
2945
+ fileName: _jsxFileName,
2946
+ lineNumber: 1435,
2947
+ columnNumber: 11
2948
+ }, this)] }, void 0, true, {
2949
+ fileName: _jsxFileName,
2950
+ lineNumber: 1423,
2951
+ columnNumber: 9
2952
+ }, this)]
2953
+ }, void 0, true, {
2954
+ fileName: _jsxFileName,
2955
+ lineNumber: 1406,
2956
+ columnNumber: 5
2957
+ }, this);
2084
2958
  }
2085
2959
  /**
2086
2960
  * Height of the sticky bars pinned above a table in its scroll area: the rich-text editor publishes
@@ -2113,78 +2987,150 @@ function LocalDrill({ ctx, label, open, index, onBack, onGo }) {
2113
2987
  return () => cancelAnimationFrame(raf);
2114
2988
  }, [index]);
2115
2989
  const step = (d) => list[index + d] && onGo(list[index + d]._key);
2116
- return /* @__PURE__ */ jsxs("div", {
2990
+ return /* @__PURE__ */ jsxDEV("div", {
2117
2991
  ref: rootRef,
2118
2992
  className: "flex flex-col gap-4",
2119
2993
  style: { scrollMarginTop: `calc(${STICKY_TOP} + 8px)` },
2120
2994
  onKeyDown: (e) => e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), onBack()),
2121
2995
  children: [
2122
- /* @__PURE__ */ jsx("div", {
2996
+ /* @__PURE__ */ jsxDEV("div", {
2123
2997
  className: "sticky z-[2] -my-1 bg-kit-surface py-1",
2124
2998
  style: { top: STICKY_TOP },
2125
- children: /* @__PURE__ */ jsx(PathCrumbs, {
2999
+ children: /* @__PURE__ */ jsxDEV(PathCrumbs, {
2126
3000
  size: "sm",
2127
3001
  label: "Table path",
2128
3002
  items: [
2129
3003
  {
2130
3004
  id: "table",
2131
3005
  label: label || "Table",
2132
- icon: /* @__PURE__ */ jsx(IconTable, {}),
3006
+ icon: /* @__PURE__ */ jsxDEV(IconTable, {}, void 0, false, {
3007
+ fileName: _jsxFileName,
3008
+ lineNumber: 1493,
3009
+ columnNumber: 59
3010
+ }, this),
2133
3011
  onSelect: onBack
2134
3012
  },
2135
3013
  ...group ? [{
2136
3014
  id: "group",
2137
3015
  label: group.label || "Untitled group",
2138
- icon: /* @__PURE__ */ jsx(IconFolder, {}),
3016
+ icon: /* @__PURE__ */ jsxDEV(IconFolder, {}, void 0, false, {
3017
+ fileName: _jsxFileName,
3018
+ lineNumber: 1494,
3019
+ columnNumber: 87
3020
+ }, this),
2139
3021
  onSelect: onBack
2140
3022
  }] : [],
2141
3023
  {
2142
3024
  id: "current",
2143
3025
  label: title,
2144
- icon: rows ? /* @__PURE__ */ jsx(IconList, {}) : /* @__PURE__ */ jsx(IconLayoutColumns, {})
3026
+ icon: rows ? /* @__PURE__ */ jsxDEV(IconList, {}, void 0, false, {
3027
+ fileName: _jsxFileName,
3028
+ lineNumber: 1495,
3029
+ columnNumber: 57
3030
+ }, this) : /* @__PURE__ */ jsxDEV(IconLayoutColumns, {}, void 0, false, {
3031
+ fileName: _jsxFileName,
3032
+ lineNumber: 1495,
3033
+ columnNumber: 72
3034
+ }, this)
2145
3035
  }
2146
3036
  ]
2147
- })
2148
- }),
2149
- /* @__PURE__ */ jsxs("div", {
3037
+ }, void 0, false, {
3038
+ fileName: _jsxFileName,
3039
+ lineNumber: 1489,
3040
+ columnNumber: 9
3041
+ }, this)
3042
+ }, void 0, false, {
3043
+ fileName: _jsxFileName,
3044
+ lineNumber: 1488,
3045
+ columnNumber: 7
3046
+ }, this),
3047
+ /* @__PURE__ */ jsxDEV("div", {
2150
3048
  ref: headRef,
2151
3049
  tabIndex: -1,
2152
3050
  className: "flex items-start gap-2.5 outline-none",
2153
- children: [/* @__PURE__ */ jsxs("div", {
3051
+ children: [/* @__PURE__ */ jsxDEV("div", {
2154
3052
  className: "min-w-0 flex-1",
2155
- children: [/* @__PURE__ */ jsx("h2", {
3053
+ children: [/* @__PURE__ */ jsxDEV("h2", {
2156
3054
  className: "truncate text-kit-base font-semibold leading-6 text-kit-fg",
2157
3055
  children: title
2158
- }), /* @__PURE__ */ jsx("p", {
3056
+ }, void 0, false, {
3057
+ fileName: _jsxFileName,
3058
+ lineNumber: 1501,
3059
+ columnNumber: 11
3060
+ }, this), /* @__PURE__ */ jsxDEV("p", {
2159
3061
  className: "truncate text-kit-xs leading-4 text-kit-fg-3",
2160
3062
  children: `${rows ? "Row" : "Column"} ${index + 1} of ${list.length} in ${label || "the table"}`
2161
- })]
2162
- }), /* @__PURE__ */ jsxs("div", {
3063
+ }, void 0, false, {
3064
+ fileName: _jsxFileName,
3065
+ lineNumber: 1502,
3066
+ columnNumber: 11
3067
+ }, this)]
3068
+ }, void 0, true, {
3069
+ fileName: _jsxFileName,
3070
+ lineNumber: 1500,
3071
+ columnNumber: 9
3072
+ }, this), /* @__PURE__ */ jsxDEV("div", {
2163
3073
  className: "-mr-1 flex shrink-0 items-center gap-0.5 pt-0.5",
2164
- children: [/* @__PURE__ */ jsx(IconButton, {
3074
+ children: [/* @__PURE__ */ jsxDEV(IconButton, {
2165
3075
  size: "sm",
2166
3076
  label: index > 0 ? `Previous ${noun}: ${titleAt(index - 1)}` : `First ${noun}`,
2167
3077
  disabled: index === 0,
2168
3078
  onClick: () => step(-1),
2169
- children: /* @__PURE__ */ jsx(IconArrowUp, { stroke: 1.5 })
2170
- }), /* @__PURE__ */ jsx(IconButton, {
3079
+ children: /* @__PURE__ */ jsxDEV(IconArrowUp, { stroke: 1.5 }, void 0, false, {
3080
+ fileName: _jsxFileName,
3081
+ lineNumber: 1506,
3082
+ columnNumber: 13
3083
+ }, this)
3084
+ }, void 0, false, {
3085
+ fileName: _jsxFileName,
3086
+ lineNumber: 1505,
3087
+ columnNumber: 11
3088
+ }, this), /* @__PURE__ */ jsxDEV(IconButton, {
2171
3089
  size: "sm",
2172
3090
  label: index < list.length - 1 ? `Next ${noun}: ${titleAt(index + 1)}` : `Last ${noun}`,
2173
3091
  disabled: index >= list.length - 1,
2174
3092
  onClick: () => step(1),
2175
- children: /* @__PURE__ */ jsx(IconArrowDown, { stroke: 1.5 })
2176
- })]
2177
- })]
2178
- }),
2179
- rows ? /* @__PURE__ */ jsx(RowFields, {
3093
+ children: /* @__PURE__ */ jsxDEV(IconArrowDown, { stroke: 1.5 }, void 0, false, {
3094
+ fileName: _jsxFileName,
3095
+ lineNumber: 1509,
3096
+ columnNumber: 13
3097
+ }, this)
3098
+ }, void 0, false, {
3099
+ fileName: _jsxFileName,
3100
+ lineNumber: 1508,
3101
+ columnNumber: 11
3102
+ }, this)]
3103
+ }, void 0, true, {
3104
+ fileName: _jsxFileName,
3105
+ lineNumber: 1504,
3106
+ columnNumber: 9
3107
+ }, this)]
3108
+ }, void 0, true, {
3109
+ fileName: _jsxFileName,
3110
+ lineNumber: 1499,
3111
+ columnNumber: 7
3112
+ }, this),
3113
+ rows ? /* @__PURE__ */ jsxDEV(RowFields, {
2180
3114
  ctx,
2181
3115
  row: t.rows[index]
2182
- }) : /* @__PURE__ */ jsx(ColumnFields, {
3116
+ }, void 0, false, {
3117
+ fileName: _jsxFileName,
3118
+ lineNumber: 1513,
3119
+ columnNumber: 15
3120
+ }, this) : /* @__PURE__ */ jsxDEV(ColumnFields, {
2183
3121
  ctx,
2184
3122
  col: t.columns[index]
2185
- })
3123
+ }, void 0, false, {
3124
+ fileName: _jsxFileName,
3125
+ lineNumber: 1513,
3126
+ columnNumber: 61
3127
+ }, this)
2186
3128
  ]
2187
- });
3129
+ }, void 0, true, {
3130
+ fileName: _jsxFileName,
3131
+ lineNumber: 1482,
3132
+ columnNumber: 5
3133
+ }, this);
2188
3134
  }
2189
3135
  function RowFields({ ctx, row }) {
2190
3136
  const { t, edit, readOnly, options } = ctx;
@@ -2196,24 +3142,36 @@ function RowFields({ ctx, row }) {
2196
3142
  }
2197
3143
  })));
2198
3144
  const named = hasName(t, row);
2199
- return /* @__PURE__ */ jsxs("div", {
3145
+ return /* @__PURE__ */ jsxDEV("div", {
2200
3146
  className: "flex flex-col gap-4",
2201
- children: [t.columns.map((col, ci) => /* @__PURE__ */ jsx(CellField, {
3147
+ children: [t.columns.map((col, ci) => /* @__PURE__ */ jsxDEV(CellField, {
2202
3148
  ctx,
2203
3149
  row,
2204
3150
  col,
2205
3151
  ci,
2206
3152
  needsName: ci === 0 && !named,
2207
3153
  onWrite: (c) => write(col, c)
2208
- }, col._key)), readOnly || !offered(options).highlight ? null : /* @__PURE__ */ jsx(SwitchRow, {
3154
+ }, col._key, false, {
3155
+ fileName: _jsxFileName,
3156
+ lineNumber: 1526,
3157
+ columnNumber: 9
3158
+ }, this)), readOnly || !offered(options).highlight ? null : /* @__PURE__ */ jsxDEV(SwitchRow, {
2209
3159
  label: "Highlight this row",
2210
3160
  checked: !!row.highlight,
2211
3161
  onChange: (v) => edit(mapRow(row._key, (x) => clean({
2212
3162
  ...x,
2213
3163
  highlight: v
2214
3164
  })))
2215
- })]
2216
- });
3165
+ }, void 0, false, {
3166
+ fileName: _jsxFileName,
3167
+ lineNumber: 1529,
3168
+ columnNumber: 9
3169
+ }, this)]
3170
+ }, void 0, true, {
3171
+ fileName: _jsxFileName,
3172
+ lineNumber: 1524,
3173
+ columnNumber: 5
3174
+ }, this);
2217
3175
  }
2218
3176
  /**
2219
3177
  * One cell as a field. Per-cell exceptions are quiet: a ⋯ by the label (shown on hover or focus) offers "Write words
@@ -2254,9 +3212,9 @@ function CellField({ ctx, row, col, ci, needsName, onWrite }) {
2254
3212
  };
2255
3213
  const b = toBool(v);
2256
3214
  let control;
2257
- if (ty === "boolean") control = /* @__PURE__ */ jsxs("label", {
3215
+ if (ty === "boolean") control = /* @__PURE__ */ jsxDEV("label", {
2258
3216
  className: "flex h-8 items-center gap-2.5",
2259
- children: [/* @__PURE__ */ jsx(Switch, {
3217
+ children: [/* @__PURE__ */ jsxDEV(Switch, {
2260
3218
  id,
2261
3219
  size: "sm",
2262
3220
  "aria-labelledby": `${id}-name`,
@@ -2264,15 +3222,27 @@ function CellField({ ctx, row, col, ci, needsName, onWrite }) {
2264
3222
  disabled: readOnly,
2265
3223
  checked: b === true,
2266
3224
  onCheckedChange: (x) => onWrite(withValue(cell, x))
2267
- }), /* @__PURE__ */ jsx("span", {
3225
+ }, void 0, false, {
3226
+ fileName: _jsxFileName,
3227
+ lineNumber: 1572,
3228
+ columnNumber: 9
3229
+ }, this), /* @__PURE__ */ jsxDEV("span", {
2268
3230
  id: `${id}-says`,
2269
3231
  className: cn("text-kit-sm", b == null ? "text-kit-fg-4" : "text-kit-fg-2"),
2270
3232
  children: b == null ? "Not set" : b ? boolLabels(col).yes : boolLabels(col).no
2271
- })]
2272
- });
2273
- else if (ty === "reference") control = /* @__PURE__ */ jsx("div", {
3233
+ }, void 0, false, {
3234
+ fileName: _jsxFileName,
3235
+ lineNumber: 1573,
3236
+ columnNumber: 9
3237
+ }, this)]
3238
+ }, void 0, true, {
3239
+ fileName: _jsxFileName,
3240
+ lineNumber: 1571,
3241
+ columnNumber: 7
3242
+ }, this);
3243
+ else if (ty === "reference") control = /* @__PURE__ */ jsxDEV("div", {
2274
3244
  className: "rounded-kit-md border border-kit-field-border bg-kit-field-bg",
2275
- children: /* @__PURE__ */ jsx(RefCell, {
3245
+ children: /* @__PURE__ */ jsxDEV(RefCell, {
2276
3246
  ctx,
2277
3247
  cell,
2278
3248
  col,
@@ -2280,14 +3250,22 @@ function CellField({ ctx, row, col, ci, needsName, onWrite }) {
2280
3250
  name,
2281
3251
  onWrite,
2282
3252
  onMove: noop
2283
- })
2284
- });
3253
+ }, void 0, false, {
3254
+ fileName: _jsxFileName,
3255
+ lineNumber: 1579,
3256
+ columnNumber: 9
3257
+ }, this)
3258
+ }, void 0, false, {
3259
+ fileName: _jsxFileName,
3260
+ lineNumber: 1578,
3261
+ columnNumber: 7
3262
+ }, this);
2285
3263
  else if (ty === "link") {
2286
3264
  const l = isObjLike(v) && !("ref" in v) ? v : {
2287
3265
  label: typeof v === "string" ? v : "",
2288
3266
  href: ""
2289
3267
  };
2290
- control = /* @__PURE__ */ jsxs(FieldUnit, { children: [/* @__PURE__ */ jsx(FieldUnitRow, { children: /* @__PURE__ */ jsx("input", {
3268
+ control = /* @__PURE__ */ jsxDEV(FieldUnit, { children: [/* @__PURE__ */ jsxDEV(FieldUnitRow, { children: /* @__PURE__ */ jsxDEV("input", {
2291
3269
  id,
2292
3270
  className: "h-9 w-full min-w-0 bg-transparent px-2 text-kit-sm text-kit-fg outline-none placeholder:text-kit-fg-4",
2293
3271
  readOnly,
@@ -2298,7 +3276,15 @@ function CellField({ ctx, row, col, ci, needsName, onWrite }) {
2298
3276
  ...l,
2299
3277
  label: e.target.value
2300
3278
  }))
2301
- }, `l${l.label}`) }), /* @__PURE__ */ jsx(FieldUnitRow, { children: /* @__PURE__ */ jsx(LinkField, {
3279
+ }, `l${l.label}`, false, {
3280
+ fileName: _jsxFileName,
3281
+ lineNumber: 1589,
3282
+ columnNumber: 11
3283
+ }, this) }, void 0, false, {
3284
+ fileName: _jsxFileName,
3285
+ lineNumber: 1588,
3286
+ columnNumber: 9
3287
+ }, this), /* @__PURE__ */ jsxDEV(FieldUnitRow, { children: /* @__PURE__ */ jsxDEV(LinkField, {
2302
3288
  "aria-label": `${name} link`,
2303
3289
  value: tableLinkValue(l),
2304
3290
  readOnly,
@@ -2311,8 +3297,20 @@ function CellField({ ctx, row, col, ci, needsName, onWrite }) {
2311
3297
  href: ""
2312
3298
  }));
2313
3299
  }
2314
- }) })] });
2315
- } else control = /* @__PURE__ */ jsx(FormText, {
3300
+ }, void 0, false, {
3301
+ fileName: _jsxFileName,
3302
+ lineNumber: 1592,
3303
+ columnNumber: 11
3304
+ }, this) }, void 0, false, {
3305
+ fileName: _jsxFileName,
3306
+ lineNumber: 1591,
3307
+ columnNumber: 9
3308
+ }, this)] }, void 0, true, {
3309
+ fileName: _jsxFileName,
3310
+ lineNumber: 1587,
3311
+ columnNumber: 7
3312
+ }, this);
3313
+ } else control = /* @__PURE__ */ jsxDEV(FormText, {
2316
3314
  id,
2317
3315
  readOnly,
2318
3316
  autoFocus: needsName,
@@ -2320,61 +3318,129 @@ function CellField({ ctx, row, col, ci, needsName, onWrite }) {
2320
3318
  suffix: ty === "number" ? col.unit : ty === "money" ? col.currency ?? "USD" : ty === "rating" ? `/ ${col.max ?? 5}` : void 0,
2321
3319
  numeric: NUMERIC.includes(ty),
2322
3320
  onCommit: (raw) => onWrite(typedCell(cell, col, row, raw))
2323
- });
2324
- return /* @__PURE__ */ jsxs("div", {
3321
+ }, void 0, false, {
3322
+ fileName: _jsxFileName,
3323
+ lineNumber: 1609,
3324
+ columnNumber: 7
3325
+ }, this);
3326
+ return /* @__PURE__ */ jsxDEV("div", {
2325
3327
  className: "group/cell flex min-w-0 flex-col gap-1.5",
2326
3328
  children: [
2327
- /* @__PURE__ */ jsxs("div", {
3329
+ /* @__PURE__ */ jsxDEV("div", {
2328
3330
  className: "flex min-h-5 min-w-0 items-center gap-1.5",
2329
3331
  children: [
2330
- /* @__PURE__ */ jsx("label", {
3332
+ /* @__PURE__ */ jsxDEV("label", {
2331
3333
  id: `${id}-name`,
2332
3334
  htmlFor: id,
2333
3335
  className: "truncate text-kit-sm font-medium text-kit-fg-2 transition-colors group-focus-within/cell:text-kit-fg",
2334
3336
  children: name
2335
- }),
2336
- needsName ? /* @__PURE__ */ jsx("span", {
3337
+ }, void 0, false, {
3338
+ fileName: _jsxFileName,
3339
+ lineNumber: 1623,
3340
+ columnNumber: 9
3341
+ }, this),
3342
+ needsName ? /* @__PURE__ */ jsxDEV("span", {
2337
3343
  className: "shrink-0 text-kit-xs text-kit-warning-fg",
2338
3344
  children: "Needs a name"
2339
- }) : null,
2340
- /* @__PURE__ */ jsx("span", { className: "flex-1" }),
2341
- canWords || canNote || !readOnly && !isEmptyCell(v) ? /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, {
2342
- render: /* @__PURE__ */ jsx(IconButton, {
3345
+ }, void 0, false, {
3346
+ fileName: _jsxFileName,
3347
+ lineNumber: 1624,
3348
+ columnNumber: 22
3349
+ }, this) : null,
3350
+ /* @__PURE__ */ jsxDEV("span", { className: "flex-1" }, void 0, false, {
3351
+ fileName: _jsxFileName,
3352
+ lineNumber: 1625,
3353
+ columnNumber: 9
3354
+ }, this),
3355
+ canWords || canNote || !readOnly && !isEmptyCell(v) ? /* @__PURE__ */ jsxDEV(Menu, { children: [/* @__PURE__ */ jsxDEV(MenuTrigger, {
3356
+ render: /* @__PURE__ */ jsxDEV(IconButton, {
2343
3357
  size: "xs",
2344
3358
  label: `Options for ${name}`,
2345
3359
  className: "-my-1 opacity-0 focus-visible:opacity-100 group-hover/cell:opacity-100 group-focus-within/cell:opacity-100 data-[popup-open]:opacity-100 [@media(pointer:coarse)]:opacity-100"
2346
- }),
2347
- children: /* @__PURE__ */ jsx(IconDots, { stroke: 1.5 })
2348
- }), /* @__PURE__ */ jsxs(MenuContent, {
3360
+ }, void 0, false, {
3361
+ fileName: _jsxFileName,
3362
+ lineNumber: 1630,
3363
+ columnNumber: 17
3364
+ }, this),
3365
+ children: /* @__PURE__ */ jsxDEV(IconDots, { stroke: 1.5 }, void 0, false, {
3366
+ fileName: _jsxFileName,
3367
+ lineNumber: 1637,
3368
+ columnNumber: 15
3369
+ }, this)
3370
+ }, void 0, false, {
3371
+ fileName: _jsxFileName,
3372
+ lineNumber: 1628,
3373
+ columnNumber: 13
3374
+ }, this), /* @__PURE__ */ jsxDEV(MenuContent, {
2349
3375
  align: "end",
2350
3376
  className: "min-w-52",
2351
3377
  children: [
2352
- canWords ? /* @__PURE__ */ jsx(MenuItem, {
3378
+ canWords ? /* @__PURE__ */ jsxDEV(MenuItem, {
2353
3379
  onClick: () => setWords(!asWords),
2354
3380
  children: asWords ? `Use ${TYPE_UI[colType].label} like the column` : "Write words instead"
2355
- }) : null,
2356
- canNote ? note ? /* @__PURE__ */ jsx(MenuItem, {
3381
+ }, void 0, false, {
3382
+ fileName: _jsxFileName,
3383
+ lineNumber: 1640,
3384
+ columnNumber: 27
3385
+ }, this) : null,
3386
+ canNote ? note ? /* @__PURE__ */ jsxDEV(MenuItem, {
2357
3387
  onClick: () => set(unlinkNote(t, row._key, col._key)),
2358
3388
  children: "Remove footnote"
2359
- }) : /* @__PURE__ */ jsx(MenuItem, {
3389
+ }, void 0, false, {
3390
+ fileName: _jsxFileName,
3391
+ lineNumber: 1641,
3392
+ columnNumber: 33
3393
+ }, this) : /* @__PURE__ */ jsxDEV(MenuItem, {
2360
3394
  onClick: addNote,
2361
3395
  children: "Add a footnote"
2362
- }) : null,
2363
- !isEmptyCell(v) ? /* @__PURE__ */ jsxs(Fragment, { children: [canWords || canNote ? /* @__PURE__ */ jsx(MenuSeparator, {}) : null, /* @__PURE__ */ jsx(MenuItem, {
3396
+ }, void 0, false, {
3397
+ fileName: _jsxFileName,
3398
+ lineNumber: 1641,
3399
+ columnNumber: 127
3400
+ }, this) : null,
3401
+ !isEmptyCell(v) ? /* @__PURE__ */ jsxDEV(Fragment, { children: [canWords || canNote ? /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
3402
+ fileName: _jsxFileName,
3403
+ lineNumber: 1644,
3404
+ columnNumber: 42
3405
+ }, this) : null, /* @__PURE__ */ jsxDEV(MenuItem, {
2364
3406
  onClick: () => onWrite(withValue(cell, null)),
2365
3407
  children: "Clear"
2366
- })] }) : null
3408
+ }, void 0, false, {
3409
+ fileName: _jsxFileName,
3410
+ lineNumber: 1645,
3411
+ columnNumber: 19
3412
+ }, this)] }, void 0, true, {
3413
+ fileName: _jsxFileName,
3414
+ lineNumber: 1643,
3415
+ columnNumber: 17
3416
+ }, this) : null
2367
3417
  ]
2368
- })] }) : null
3418
+ }, void 0, true, {
3419
+ fileName: _jsxFileName,
3420
+ lineNumber: 1639,
3421
+ columnNumber: 13
3422
+ }, this)] }, void 0, true, {
3423
+ fileName: _jsxFileName,
3424
+ lineNumber: 1627,
3425
+ columnNumber: 11
3426
+ }, this) : null
2369
3427
  ]
2370
- }),
3428
+ }, void 0, true, {
3429
+ fileName: _jsxFileName,
3430
+ lineNumber: 1622,
3431
+ columnNumber: 7
3432
+ }, this),
2371
3433
  control,
2372
- fn ? /* @__PURE__ */ jsxs("div", {
3434
+ fn ? /* @__PURE__ */ jsxDEV("div", {
2373
3435
  className: "flex items-center gap-2",
2374
- children: [/* @__PURE__ */ jsxs("span", {
3436
+ children: [/* @__PURE__ */ jsxDEV("span", {
2375
3437
  className: "shrink-0 text-kit-xs text-kit-fg-3",
2376
3438
  children: ["Footnote ", fi + 1]
2377
- }), /* @__PURE__ */ jsx(Input, {
3439
+ }, void 0, true, {
3440
+ fileName: _jsxFileName,
3441
+ lineNumber: 1655,
3442
+ columnNumber: 11
3443
+ }, this), /* @__PURE__ */ jsxDEV(Input, {
2378
3444
  size: "sm",
2379
3445
  "data-footnote": fn._key,
2380
3446
  value: fn.text,
@@ -2389,22 +3455,42 @@ function CellField({ ctx, row, col, ci, needsName, onWrite }) {
2389
3455
  text: e.target.value
2390
3456
  } : x)
2391
3457
  })
2392
- })]
2393
- }) : null
3458
+ }, void 0, false, {
3459
+ fileName: _jsxFileName,
3460
+ lineNumber: 1656,
3461
+ columnNumber: 11
3462
+ }, this)]
3463
+ }, void 0, true, {
3464
+ fileName: _jsxFileName,
3465
+ lineNumber: 1654,
3466
+ columnNumber: 9
3467
+ }, this) : null
2394
3468
  ]
2395
- });
3469
+ }, void 0, true, {
3470
+ fileName: _jsxFileName,
3471
+ lineNumber: 1621,
3472
+ columnNumber: 5
3473
+ }, this);
2396
3474
  }
2397
3475
  function SwitchRow({ label, checked, onChange, disabled }) {
2398
- return /* @__PURE__ */ jsxs("label", {
3476
+ return /* @__PURE__ */ jsxDEV("label", {
2399
3477
  className: "flex min-h-8 items-center justify-between gap-2 text-kit-sm text-kit-fg-2",
2400
- children: [label, /* @__PURE__ */ jsx(Switch, {
3478
+ children: [label, /* @__PURE__ */ jsxDEV(Switch, {
2401
3479
  size: "sm",
2402
3480
  checked,
2403
3481
  disabled,
2404
3482
  onCheckedChange: onChange,
2405
3483
  "aria-label": label
2406
- })]
2407
- });
3484
+ }, void 0, false, {
3485
+ fileName: _jsxFileName,
3486
+ lineNumber: 1677,
3487
+ columnNumber: 7
3488
+ }, this)]
3489
+ }, void 0, true, {
3490
+ fileName: _jsxFileName,
3491
+ lineNumber: 1675,
3492
+ columnNumber: 5
3493
+ }, this);
2408
3494
  }
2409
3495
  function ColumnFields({ ctx, col }) {
2410
3496
  const { t, set, lock, types, readOnly } = ctx;
@@ -2413,18 +3499,22 @@ function ColumnFields({ ctx, col }) {
2413
3499
  ...t,
2414
3500
  columns: t.columns.map((c) => c._key === col._key ? withPatch(c, p) : c)
2415
3501
  });
2416
- return /* @__PURE__ */ jsxs("div", {
3502
+ return /* @__PURE__ */ jsxDEV("div", {
2417
3503
  className: "flex flex-col gap-4",
2418
3504
  children: [
2419
- /* @__PURE__ */ jsxs("div", {
3505
+ /* @__PURE__ */ jsxDEV("div", {
2420
3506
  className: "flex flex-col gap-1.5",
2421
3507
  children: [
2422
- /* @__PURE__ */ jsx("label", {
3508
+ /* @__PURE__ */ jsxDEV("label", {
2423
3509
  htmlFor: id,
2424
3510
  className: "text-kit-sm font-medium text-kit-fg-2",
2425
3511
  children: "Name"
2426
- }),
2427
- /* @__PURE__ */ jsx(Input, {
3512
+ }, void 0, false, {
3513
+ fileName: _jsxFileName,
3514
+ lineNumber: 1690,
3515
+ columnNumber: 9
3516
+ }, this),
3517
+ /* @__PURE__ */ jsxDEV(Input, {
2428
3518
  id,
2429
3519
  size: "sm",
2430
3520
  autoFocus: !col.label && !lock,
@@ -2433,66 +3523,146 @@ function ColumnFields({ ctx, col }) {
2433
3523
  value: col.label,
2434
3524
  placeholder: "Column name",
2435
3525
  onChange: (e) => patch({ label: e.target.value })
2436
- }),
2437
- lock && !readOnly ? /* @__PURE__ */ jsx("span", {
3526
+ }, void 0, false, {
3527
+ fileName: _jsxFileName,
3528
+ lineNumber: 1691,
3529
+ columnNumber: 9
3530
+ }, this),
3531
+ lock && !readOnly ? /* @__PURE__ */ jsxDEV("span", {
2438
3532
  className: "text-kit-2xs leading-4 text-kit-fg-3",
2439
3533
  children: "This table's columns are set by its developer."
2440
- }) : null
3534
+ }, void 0, false, {
3535
+ fileName: _jsxFileName,
3536
+ lineNumber: 1692,
3537
+ columnNumber: 30
3538
+ }, this) : null
2441
3539
  ]
2442
- }),
2443
- /* @__PURE__ */ jsxs("div", {
3540
+ }, void 0, true, {
3541
+ fileName: _jsxFileName,
3542
+ lineNumber: 1689,
3543
+ columnNumber: 7
3544
+ }, this),
3545
+ /* @__PURE__ */ jsxDEV("div", {
2444
3546
  className: "flex flex-col gap-1.5",
2445
- children: [/* @__PURE__ */ jsx("span", {
3547
+ children: [/* @__PURE__ */ jsxDEV("span", {
2446
3548
  className: "text-kit-sm font-medium text-kit-fg-2",
2447
3549
  children: "Type"
2448
- }), lock ? /* @__PURE__ */ jsxs("span", {
3550
+ }, void 0, false, {
3551
+ fileName: _jsxFileName,
3552
+ lineNumber: 1695,
3553
+ columnNumber: 9
3554
+ }, this), lock ? /* @__PURE__ */ jsxDEV("span", {
2449
3555
  className: "flex h-8 items-center gap-2 text-kit-sm text-kit-fg-2",
2450
- children: [/* @__PURE__ */ jsx(TypeIcon, {
3556
+ children: [/* @__PURE__ */ jsxDEV(TypeIcon, {
2451
3557
  type: col.type,
2452
3558
  className: "text-kit-fg-2"
2453
- }), TYPE_UI[col.type].label]
2454
- }) : /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, {
2455
- render: /* @__PURE__ */ jsx(Button, {
3559
+ }, void 0, false, {
3560
+ fileName: _jsxFileName,
3561
+ lineNumber: 1697,
3562
+ columnNumber: 83
3563
+ }, this), TYPE_UI[col.type].label]
3564
+ }, void 0, true, {
3565
+ fileName: _jsxFileName,
3566
+ lineNumber: 1697,
3567
+ columnNumber: 11
3568
+ }, this) : /* @__PURE__ */ jsxDEV(Menu, { children: [/* @__PURE__ */ jsxDEV(MenuTrigger, {
3569
+ render: /* @__PURE__ */ jsxDEV(Button, {
2456
3570
  size: "sm",
2457
3571
  variant: "secondary",
2458
3572
  className: "justify-between",
2459
- leftIcon: /* @__PURE__ */ jsx(TypeIcon, {
3573
+ leftIcon: /* @__PURE__ */ jsxDEV(TypeIcon, {
2460
3574
  type: col.type,
2461
3575
  className: "text-kit-fg-2"
2462
- }),
2463
- rightIcon: /* @__PURE__ */ jsx(IconChevronDown, { stroke: 1.5 })
2464
- }),
2465
- children: /* @__PURE__ */ jsx("span", {
3576
+ }, void 0, false, {
3577
+ fileName: _jsxFileName,
3578
+ lineNumber: 1700,
3579
+ columnNumber: 110
3580
+ }, this),
3581
+ rightIcon: /* @__PURE__ */ jsxDEV(IconChevronDown, { stroke: 1.5 }, void 0, false, {
3582
+ fileName: _jsxFileName,
3583
+ lineNumber: 1700,
3584
+ columnNumber: 177
3585
+ }, this)
3586
+ }, void 0, false, {
3587
+ fileName: _jsxFileName,
3588
+ lineNumber: 1700,
3589
+ columnNumber: 34
3590
+ }, this),
3591
+ children: /* @__PURE__ */ jsxDEV("span", {
2466
3592
  className: "flex-1 text-left",
2467
3593
  children: TYPE_UI[col.type].label
2468
- })
2469
- }), /* @__PURE__ */ jsx(MenuContent, {
3594
+ }, void 0, false, {
3595
+ fileName: _jsxFileName,
3596
+ lineNumber: 1701,
3597
+ columnNumber: 15
3598
+ }, this)
3599
+ }, void 0, false, {
3600
+ fileName: _jsxFileName,
3601
+ lineNumber: 1700,
3602
+ columnNumber: 13
3603
+ }, this), /* @__PURE__ */ jsxDEV(MenuContent, {
2470
3604
  align: "start",
2471
3605
  className: "min-w-52",
2472
- children: /* @__PURE__ */ jsx(MenuRadioGroup, {
3606
+ children: /* @__PURE__ */ jsxDEV(MenuRadioGroup, {
2473
3607
  value: col.type,
2474
3608
  onValueChange: (v) => ctx.edit((x) => retype(x, col._key, v, ctx.resolveRef)),
2475
- children: (types.includes(col.type) ? types : [...types, col.type]).map((ty) => /* @__PURE__ */ jsx(MenuRadioItem, {
3609
+ children: (types.includes(col.type) ? types : [...types, col.type]).map((ty) => /* @__PURE__ */ jsxDEV(MenuRadioItem, {
2476
3610
  value: ty,
2477
- children: /* @__PURE__ */ jsxs("span", {
3611
+ children: /* @__PURE__ */ jsxDEV("span", {
2478
3612
  className: "flex items-center gap-2",
2479
- children: [/* @__PURE__ */ jsx(TypeIcon, {
3613
+ children: [/* @__PURE__ */ jsxDEV(TypeIcon, {
2480
3614
  type: ty,
2481
3615
  className: "text-kit-fg-2"
2482
- }), TYPE_UI[ty].label]
2483
- })
2484
- }, ty))
2485
- })
2486
- })] })]
2487
- }),
2488
- /* @__PURE__ */ jsx(ColumnDetails, {
3616
+ }, void 0, false, {
3617
+ fileName: _jsxFileName,
3618
+ lineNumber: 1707,
3619
+ columnNumber: 63
3620
+ }, this), TYPE_UI[ty].label]
3621
+ }, void 0, true, {
3622
+ fileName: _jsxFileName,
3623
+ lineNumber: 1707,
3624
+ columnNumber: 21
3625
+ }, this)
3626
+ }, ty, false, {
3627
+ fileName: _jsxFileName,
3628
+ lineNumber: 1706,
3629
+ columnNumber: 19
3630
+ }, this))
3631
+ }, void 0, false, {
3632
+ fileName: _jsxFileName,
3633
+ lineNumber: 1704,
3634
+ columnNumber: 15
3635
+ }, this)
3636
+ }, void 0, false, {
3637
+ fileName: _jsxFileName,
3638
+ lineNumber: 1703,
3639
+ columnNumber: 13
3640
+ }, this)] }, void 0, true, {
3641
+ fileName: _jsxFileName,
3642
+ lineNumber: 1699,
3643
+ columnNumber: 11
3644
+ }, this)]
3645
+ }, void 0, true, {
3646
+ fileName: _jsxFileName,
3647
+ lineNumber: 1694,
3648
+ columnNumber: 7
3649
+ }, this),
3650
+ /* @__PURE__ */ jsxDEV(ColumnDetails, {
2489
3651
  col,
2490
3652
  onPatch: patch,
2491
3653
  compact: false,
2492
3654
  readOnly: lock
2493
- })
3655
+ }, void 0, false, {
3656
+ fileName: _jsxFileName,
3657
+ lineNumber: 1715,
3658
+ columnNumber: 7
3659
+ }, this)
2494
3660
  ]
2495
- });
3661
+ }, void 0, true, {
3662
+ fileName: _jsxFileName,
3663
+ lineNumber: 1688,
3664
+ columnNumber: 5
3665
+ }, this);
2496
3666
  }
2497
3667
  function FormText({ id, value, onCommit, suffix, numeric, readOnly, autoFocus }) {
2498
3668
  const [draft, setDraft] = React.useState(value);
@@ -2501,9 +3671,9 @@ function FormText({ id, value, onCommit, suffix, numeric, readOnly, autoFocus })
2501
3671
  setSeen(value);
2502
3672
  setDraft(value);
2503
3673
  }
2504
- return /* @__PURE__ */ jsxs("div", {
3674
+ return /* @__PURE__ */ jsxDEV("div", {
2505
3675
  className: "relative",
2506
- children: [/* @__PURE__ */ jsx(Textarea, {
3676
+ children: [/* @__PURE__ */ jsxDEV(Textarea, {
2507
3677
  id,
2508
3678
  rows: 1,
2509
3679
  value: draft,
@@ -2514,11 +3684,23 @@ function FormText({ id, value, onCommit, suffix, numeric, readOnly, autoFocus })
2514
3684
  onChange: (e) => setDraft(e.target.value),
2515
3685
  onBlur: () => draft !== value && onCommit(draft),
2516
3686
  className: cn("min-h-8 resize-none py-1.5", suffix && "pr-12")
2517
- }), suffix ? /* @__PURE__ */ jsx("span", {
3687
+ }, void 0, false, {
3688
+ fileName: _jsxFileName,
3689
+ lineNumber: 1729,
3690
+ columnNumber: 7
3691
+ }, this), suffix ? /* @__PURE__ */ jsxDEV("span", {
2518
3692
  className: "pointer-events-none absolute right-2.5 top-1.5 text-kit-xs text-kit-fg-3",
2519
3693
  children: suffix
2520
- }) : null]
2521
- });
3694
+ }, void 0, false, {
3695
+ fileName: _jsxFileName,
3696
+ lineNumber: 1741,
3697
+ columnNumber: 17
3698
+ }, this) : null]
3699
+ }, void 0, true, {
3700
+ fileName: _jsxFileName,
3701
+ lineNumber: 1728,
3702
+ columnNumber: 5
3703
+ }, this);
2522
3704
  }
2523
3705
  var SEARCH = [
2524
3706
  {
@@ -2578,50 +3760,78 @@ function TableSettings({ ctx }) {
2578
3760
  can.highlight && highlighted ? `${highlighted.label || "A column"} highlighted` : "",
2579
3761
  can.totals && totals ? "Totals row" : ""
2580
3762
  ].filter(Boolean).join(" · ");
2581
- const pick = (label, node) => /* @__PURE__ */ jsxs("div", {
3763
+ const pick = (label, node) => /* @__PURE__ */ jsxDEV("div", {
2582
3764
  className: "flex flex-col gap-1.5",
2583
- children: [/* @__PURE__ */ jsx("span", {
3765
+ children: [/* @__PURE__ */ jsxDEV("span", {
2584
3766
  className: "text-kit-sm font-medium text-kit-fg-2",
2585
3767
  children: label
2586
- }), node]
2587
- });
2588
- return /* @__PURE__ */ jsxs(FieldSection, {
3768
+ }, void 0, false, {
3769
+ fileName: _jsxFileName,
3770
+ lineNumber: 1782,
3771
+ columnNumber: 7
3772
+ }, this), node]
3773
+ }, void 0, true, {
3774
+ fileName: _jsxFileName,
3775
+ lineNumber: 1781,
3776
+ columnNumber: 5
3777
+ }, this);
3778
+ return /* @__PURE__ */ jsxDEV(FieldSection, {
2589
3779
  title: "Table settings",
2590
3780
  defaultOpen: false,
2591
3781
  summary,
2592
3782
  className: "before:hidden",
2593
3783
  children: [
2594
- can.headers ? /* @__PURE__ */ jsxs("div", {
3784
+ can.headers ? /* @__PURE__ */ jsxDEV("div", {
2595
3785
  className: "flex flex-col",
2596
3786
  children: [
2597
- /* @__PURE__ */ jsx(SwitchRow, {
3787
+ /* @__PURE__ */ jsxDEV(SwitchRow, {
2598
3788
  label: "Show column names",
2599
3789
  checked: t.headerRow,
2600
3790
  onChange: (v) => set({
2601
3791
  ...t,
2602
3792
  headerRow: v
2603
3793
  })
2604
- }),
2605
- /* @__PURE__ */ jsx(SwitchRow, {
3794
+ }, void 0, false, {
3795
+ fileName: _jsxFileName,
3796
+ lineNumber: 1791,
3797
+ columnNumber: 11
3798
+ }, this),
3799
+ /* @__PURE__ */ jsxDEV(SwitchRow, {
2606
3800
  label: "First column names each row",
2607
3801
  checked: t.headerColumn,
2608
3802
  onChange: (v) => set({
2609
3803
  ...t,
2610
3804
  headerColumn: v
2611
3805
  })
2612
- }),
2613
- can.totals ? /* @__PURE__ */ jsx(SwitchRow, {
3806
+ }, void 0, false, {
3807
+ fileName: _jsxFileName,
3808
+ lineNumber: 1792,
3809
+ columnNumber: 11
3810
+ }, this),
3811
+ can.totals ? /* @__PURE__ */ jsxDEV(SwitchRow, {
2614
3812
  label: "Totals row",
2615
3813
  checked: totals,
2616
3814
  onChange: (v) => set(setTotals(t, v))
2617
- }) : null
3815
+ }, void 0, false, {
3816
+ fileName: _jsxFileName,
3817
+ lineNumber: 1793,
3818
+ columnNumber: 25
3819
+ }, this) : null
2618
3820
  ]
2619
- }) : can.totals ? /* @__PURE__ */ jsx(SwitchRow, {
3821
+ }, void 0, true, {
3822
+ fileName: _jsxFileName,
3823
+ lineNumber: 1790,
3824
+ columnNumber: 9
3825
+ }, this) : can.totals ? /* @__PURE__ */ jsxDEV(SwitchRow, {
2620
3826
  label: "Totals row",
2621
3827
  checked: totals,
2622
3828
  onChange: (v) => set(setTotals(t, v))
2623
- }) : null,
2624
- can.highlight ? pick("Highlight column", /* @__PURE__ */ jsx(Select, {
3829
+ }, void 0, false, {
3830
+ fileName: _jsxFileName,
3831
+ lineNumber: 1796,
3832
+ columnNumber: 9
3833
+ }, this) : null,
3834
+ can.highlight ? pick("Highlight column", /* @__PURE__ */ jsxDEV(Select, {
2625
3835
  "aria-label": "Highlight column",
2626
3836
  value: highlighted?._key ?? NO_COLUMN,
2627
3837
  onValueChange: (k) => set({
@@ -2635,32 +3845,52 @@ function TableSettings({ ctx }) {
2635
3845
  value: c._key,
2636
3846
  label: c.label || "Untitled column"
2637
3847
  }))]
2638
- })) : null,
2639
- can.phones.length ? pick("On phones", /* @__PURE__ */ jsx(ChoiceSwitch, {
3848
+ }, void 0, false, {
3849
+ fileName: _jsxFileName,
3850
+ lineNumber: 1801,
3851
+ columnNumber: 13
3852
+ }, this)) : null,
3853
+ can.phones.length ? pick("On phones", /* @__PURE__ */ jsxDEV(ChoiceSwitch, {
2640
3854
  "aria-label": "On phones",
2641
3855
  value: phones,
2642
3856
  onChange: (responsive) => design({ responsive }),
2643
3857
  items: can.phones
2644
- })) : null,
2645
- can.sort || can.search ? /* @__PURE__ */ jsxs("div", {
3858
+ }, void 0, false, {
3859
+ fileName: _jsxFileName,
3860
+ lineNumber: 1809,
3861
+ columnNumber: 46
3862
+ }, this)) : null,
3863
+ can.sort || can.search ? /* @__PURE__ */ jsxDEV("div", {
2646
3864
  className: "flex flex-col",
2647
- children: [can.sort ? /* @__PURE__ */ jsx(SwitchRow, {
3865
+ children: [can.sort ? /* @__PURE__ */ jsxDEV(SwitchRow, {
2648
3866
  label: "Visitors can sort columns",
2649
3867
  checked: sortable,
2650
3868
  onChange: (v) => set({
2651
3869
  ...t,
2652
3870
  columns: t.columns.map((c, i) => withPatch(c, { sortable: v && !(t.headerColumn && i === 0) ? true : void 0 }))
2653
3871
  })
2654
- }) : null, can.search ? /* @__PURE__ */ jsx(SwitchRow, {
3872
+ }, void 0, false, {
3873
+ fileName: _jsxFileName,
3874
+ lineNumber: 1813,
3875
+ columnNumber: 13
3876
+ }, this) : null, can.search ? /* @__PURE__ */ jsxDEV(SwitchRow, {
2655
3877
  label: "Visitors can search rows",
2656
3878
  checked: !!t.filterable,
2657
3879
  onChange: (v) => set(dropUndefined({
2658
3880
  ...t,
2659
3881
  filterable: v || void 0
2660
3882
  }))
2661
- }) : null]
2662
- }) : null,
2663
- showJson ? /* @__PURE__ */ jsxs(Fragment, { children: [pick("Help search engines read this as", /* @__PURE__ */ jsx(ChoiceSwitch, {
3883
+ }, void 0, false, {
3884
+ fileName: _jsxFileName,
3885
+ lineNumber: 1815,
3886
+ columnNumber: 25
3887
+ }, this) : null]
3888
+ }, void 0, true, {
3889
+ fileName: _jsxFileName,
3890
+ lineNumber: 1811,
3891
+ columnNumber: 9
3892
+ }, this) : null,
3893
+ showJson ? /* @__PURE__ */ jsxDEV(Fragment, { children: [pick("Help search engines read this as", /* @__PURE__ */ jsxDEV(ChoiceSwitch, {
2664
3894
  "aria-label": "Help search engines read this as",
2665
3895
  value: t.jsonLd?.type ?? "none",
2666
3896
  onChange: (type) => set(dropUndefined({
@@ -2672,7 +3902,11 @@ function TableSettings({ ctx }) {
2672
3902
  }
2673
3903
  })),
2674
3904
  items: jsonOffered
2675
- })), t.jsonLd?.type === "ItemList" && developer ? pick("The things compared are the", /* @__PURE__ */ jsx(ChoiceSwitch, {
3905
+ }, void 0, false, {
3906
+ fileName: _jsxFileName,
3907
+ lineNumber: 1822,
3908
+ columnNumber: 13
3909
+ }, this)), t.jsonLd?.type === "ItemList" && developer ? pick("The things compared are the", /* @__PURE__ */ jsxDEV(ChoiceSwitch, {
2676
3910
  "aria-label": "The things compared are the",
2677
3911
  value: t.jsonLd.axis ?? "rows",
2678
3912
  onChange: (axis) => set({
@@ -2689,34 +3923,66 @@ function TableSettings({ ctx }) {
2689
3923
  value: "columns",
2690
3924
  label: "Columns"
2691
3925
  }]
2692
- })) : null] }) : null,
2693
- developer ? /* @__PURE__ */ jsxs("div", {
3926
+ }, void 0, false, {
3927
+ fileName: _jsxFileName,
3928
+ lineNumber: 1832,
3929
+ columnNumber: 17
3930
+ }, this)) : null] }, void 0, true, {
3931
+ fileName: _jsxFileName,
3932
+ lineNumber: 1819,
3933
+ columnNumber: 9
3934
+ }, this) : null,
3935
+ developer ? /* @__PURE__ */ jsxDEV("div", {
2694
3936
  className: "flex flex-col",
2695
3937
  children: [
2696
- /* @__PURE__ */ jsx(SwitchRow, {
3938
+ /* @__PURE__ */ jsxDEV(SwitchRow, {
2697
3939
  label: "Hide the title on the page",
2698
3940
  checked: !!d.hideCaption,
2699
3941
  onChange: (v) => design({ hideCaption: v || void 0 })
2700
- }),
2701
- can.sticky ? /* @__PURE__ */ jsx(SwitchRow, {
3942
+ }, void 0, false, {
3943
+ fileName: _jsxFileName,
3944
+ lineNumber: 1847,
3945
+ columnNumber: 11
3946
+ }, this),
3947
+ can.sticky ? /* @__PURE__ */ jsxDEV(SwitchRow, {
2702
3948
  label: "Keep column names in view",
2703
3949
  checked: !!d.sticky,
2704
3950
  onChange: (v) => design({ sticky: v || void 0 })
2705
- }) : null,
2706
- /* @__PURE__ */ jsx(SwitchRow, {
3951
+ }, void 0, false, {
3952
+ fileName: _jsxFileName,
3953
+ lineNumber: 1848,
3954
+ columnNumber: 25
3955
+ }, this) : null,
3956
+ /* @__PURE__ */ jsxDEV(SwitchRow, {
2707
3957
  label: "Striped rows",
2708
3958
  checked: !!d.striped,
2709
3959
  onChange: (v) => design({ striped: v || void 0 })
2710
- }),
2711
- /* @__PURE__ */ jsx(SwitchRow, {
3960
+ }, void 0, false, {
3961
+ fileName: _jsxFileName,
3962
+ lineNumber: 1849,
3963
+ columnNumber: 11
3964
+ }, this),
3965
+ /* @__PURE__ */ jsxDEV(SwitchRow, {
2712
3966
  label: "Compact",
2713
3967
  checked: d.density === "compact",
2714
3968
  onChange: (v) => design({ density: v ? "compact" : void 0 })
2715
- })
3969
+ }, void 0, false, {
3970
+ fileName: _jsxFileName,
3971
+ lineNumber: 1850,
3972
+ columnNumber: 11
3973
+ }, this)
2716
3974
  ]
2717
- }) : null
3975
+ }, void 0, true, {
3976
+ fileName: _jsxFileName,
3977
+ lineNumber: 1846,
3978
+ columnNumber: 9
3979
+ }, this) : null
2718
3980
  ]
2719
- });
3981
+ }, void 0, true, {
3982
+ fileName: _jsxFileName,
3983
+ lineNumber: 1788,
3984
+ columnNumber: 5
3985
+ }, this);
2720
3986
  }
2721
3987
  var dropUndefined = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0));
2722
3988
  //#endregion