@bettercms-ai/kit 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/adapters/lossy.d.ts +1 -1
  2. package/dist/adapters/lossy.js +1 -1
  3. package/dist/adapters/lossy.js.map +1 -1
  4. package/dist/adapters/schema.js +1 -1
  5. package/dist/adapters/schema.js.map +1 -1
  6. package/dist/context.d.ts +8 -0
  7. package/dist/context.js.map +1 -1
  8. package/dist/controls/index.js +2 -2
  9. package/dist/controls/media-v16.d.ts +3 -1
  10. package/dist/controls/media-v16.js +3 -1
  11. package/dist/controls/media-v16.js.map +1 -1
  12. package/dist/controls/media.d.ts +5 -1
  13. package/dist/controls/media.js +25 -7
  14. package/dist/controls/media.js.map +1 -1
  15. package/dist/controls/rich-text/block-tool.d.ts +1 -1
  16. package/dist/controls/rich-text/block-tool.js +1 -1
  17. package/dist/controls/rich-text/block-tool.js.map +1 -1
  18. package/dist/controls/rich-text/blocks.js +3 -1
  19. package/dist/controls/rich-text/blocks.js.map +1 -1
  20. package/dist/controls/rich-text/catalog.d.ts +26 -3
  21. package/dist/controls/rich-text/catalog.js +239 -58
  22. package/dist/controls/rich-text/catalog.js.map +1 -1
  23. package/dist/controls/rich-text/codec.d.ts +7 -1
  24. package/dist/controls/rich-text/codec.js +2 -1
  25. package/dist/controls/rich-text/codec.js.map +1 -1
  26. package/dist/controls/rich-text/control.js +2 -1
  27. package/dist/controls/rich-text/control.js.map +1 -1
  28. package/dist/controls/rich-text/dom.js +8 -3
  29. package/dist/controls/rich-text/dom.js.map +1 -1
  30. package/dist/controls/rich-text/editor.d.ts +3 -1
  31. package/dist/controls/rich-text/editor.js +160 -44
  32. package/dist/controls/rich-text/editor.js.map +1 -1
  33. package/dist/controls/rich-text/rewriteSelection.d.ts +25 -0
  34. package/dist/controls/rich-text/rewriteSelection.js +28 -0
  35. package/dist/controls/rich-text/rewriteSelection.js.map +1 -0
  36. package/dist/controls/rich-text/slash-preview.js +18 -5
  37. package/dist/controls/rich-text/slash-preview.js.map +1 -1
  38. package/dist/controls/rich-text/table-grid.js +28 -21
  39. package/dist/controls/rich-text/table-grid.js.map +1 -1
  40. package/dist/controls/rich-text/toolbar.d.ts +6 -2
  41. package/dist/controls/rich-text/toolbar.js +205 -4
  42. package/dist/controls/rich-text/toolbar.js.map +1 -1
  43. package/dist/controls/text.d.ts +1 -1
  44. package/dist/controls/text.js +10 -7
  45. package/dist/controls/text.js.map +1 -1
  46. package/dist/engine/field-shell.js +8 -4
  47. package/dist/engine/field-shell.js.map +1 -1
  48. package/dist/engine/frame.js +9 -2
  49. package/dist/engine/frame.js.map +1 -1
  50. package/dist/engine/grouping.js +4 -3
  51. package/dist/engine/grouping.js.map +1 -1
  52. package/dist/engine/item-list.js +2 -2
  53. package/dist/engine/item-list.js.map +1 -1
  54. package/dist/engine/schema-form.d.ts +2 -0
  55. package/dist/engine/schema-form.js +2 -0
  56. package/dist/engine/schema-form.js.map +1 -1
  57. package/dist/index.js +3 -3
  58. package/dist/kit.css +6 -32
  59. package/dist/lib/reduced-motion.d.ts +1 -0
  60. package/dist/lib/reduced-motion.js +19 -0
  61. package/dist/lib/reduced-motion.js.map +1 -0
  62. package/dist/styles.css +1 -1
  63. package/dist/theme.css +101 -0
  64. package/dist/tokens.css +9 -0
  65. package/dist/ui/content-fields.js +3 -2
  66. package/dist/ui/content-fields.js.map +1 -1
  67. package/dist/ui/controls.js +3 -2
  68. package/dist/ui/controls.js.map +1 -1
  69. package/dist/ui/floating-panel.js +3 -2
  70. package/dist/ui/floating-panel.js.map +1 -1
  71. package/dist/ui/foundations.js +3 -2
  72. package/dist/ui/foundations.js.map +1 -1
  73. package/dist/ui/index.js +2 -2
  74. package/dist/ui/inspector.d.ts +23 -5
  75. package/dist/ui/inspector.js +75 -30
  76. package/dist/ui/inspector.js.map +1 -1
  77. package/dist/ui/overlay.js +2 -2
  78. package/dist/ui/overlay.js.map +1 -1
  79. package/dist/ui/tab.js +3 -2
  80. package/dist/ui/tab.js.map +1 -1
  81. package/package.json +1 -1
@@ -1,10 +1,11 @@
1
1
  import { cn } from "../lib/cn.js";
2
+ import { useKitReducedMotion } from "../lib/reduced-motion.js";
2
3
  import { InfoTooltip } from "./tooltip-card.js";
3
4
  import { Menu, MenuContent, MenuItem, MenuLabel, MenuSeparator, MenuTrigger } from "./overlay.js";
4
5
  import * as React from "react";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  import { IconCheck, IconChevronDown, IconDots, IconGripVertical, IconInfoCircle, IconLock } from "@tabler/icons-react";
7
- import { AnimatePresence, motion, useReducedMotion } from "framer-motion";
8
+ import { AnimatePresence, motion } from "framer-motion";
8
9
  //#region src/ui/inspector.tsx
9
10
  /**
10
11
  * Inspector foundation · V1.6: the Visual Editor inspector's own building blocks, as prototype editor-v16 draws them
@@ -280,7 +281,7 @@ function LayoutOpt({ i, children }) {
280
281
  /** Collapsible body for a SectionHeader with trailing="collapse" (kit.jsx:248-252): height, then a 4px rise out of a
281
282
  * 4px blur, both on the accordion curve. Instant with reduced motion. */
282
283
  function InspectorCollapse({ open, id, rows, className, children }) {
283
- const reduce = useReducedMotion();
284
+ const reduce = useKitReducedMotion();
284
285
  const t = {
285
286
  duration: reduce ? 0 : .3,
286
287
  ease: INSPECTOR_EASE
@@ -393,7 +394,7 @@ function counterState(n, max) {
393
394
  /** The 12px progress ring beside a counter that is near or over its limit (content.jsx:307-309, content.css:617): a
394
395
  * grey track, an amber arc that fills with the count, red when over. Springs in and out (wrap it in AnimatePresence). */
395
396
  function CountRing({ value, max, className }) {
396
- const reduce = useReducedMotion();
397
+ const reduce = useKitReducedMotion();
397
398
  const r = 4.5;
398
399
  const c = 2 * Math.PI * r;
399
400
  const over = value > max;
@@ -448,6 +449,7 @@ function FieldCounter({ value, max, ring = true, size = 11, className }) {
448
449
  return /* @__PURE__ */ jsxs("span", {
449
450
  "data-slot": "kit-field-counter",
450
451
  "data-state": s,
452
+ role: "img",
451
453
  "aria-label": max == null ? `${value} characters` : `${value} of ${max} characters`,
452
454
  className: cn("inline-flex shrink-0 items-center gap-1.5 tabular-nums transition-colors duration-200", size === 11 ? "text-[11px] leading-[14px]" : "text-[12px] leading-4", s === "near" ? "font-medium text-kit-insp-count-near" : s === "over" ? "font-medium text-kit-insp-count-over" : "text-kit-insp-faint", className),
453
455
  children: [/* @__PURE__ */ jsx(AnimatePresence, {
@@ -463,50 +465,93 @@ function FieldCounter({ value, max, ring = true, size = 11, className }) {
463
465
  })]
464
466
  });
465
467
  }
466
- /** A number that rolls (ui.jsx:371-378 `Roll`, faq.css:90-91): the new figure rises in from 6 below while the old one
467
- * lifts out, both blurred 2, in 0.16s. Tabular, so the text beside it does not move. */
468
+ /** A number that rolls (ui.jsx:371-378 `Roll`, faq.css:90-91), digit by digit (M20): each digit sits in its own 1ch
469
+ * tabular cell, keyed by its place from the right, so only a digit that changed moves: the new one rises in from below
470
+ * while the old one lifts out (transform + opacity, 160ms in, 120ms out, no blur). The number itself never remounts,
471
+ * and fast typing never queues: the latest value is always the one entering. Reduced motion: an instant swap. */
468
472
  function RollNumber({ value, className }) {
473
+ const reduce = !!useKitReducedMotion();
474
+ const chars = Array.from(String(value));
469
475
  return /* @__PURE__ */ jsx("span", {
470
476
  "data-slot": "kit-roll",
471
- className: cn("relative inline-block tabular-nums", className),
472
- children: /* @__PURE__ */ jsx(AnimatePresence, {
477
+ className: cn("inline-flex tabular-nums", className),
478
+ children: chars.map((ch, i) => /* @__PURE__ */ jsx(RollDigit, {
479
+ ch,
480
+ reduce
481
+ }, chars.length - i))
482
+ });
483
+ }
484
+ var ROLL_EASE = [
485
+ .22,
486
+ 1,
487
+ .36,
488
+ 1
489
+ ];
490
+ function RollDigit({ ch, reduce }) {
491
+ return /* @__PURE__ */ jsx("span", {
492
+ "data-slot": "kit-roll-digit",
493
+ className: "relative inline-block w-[1ch] text-center",
494
+ children: reduce ? ch : /* @__PURE__ */ jsx(AnimatePresence, {
473
495
  mode: "popLayout",
474
496
  initial: false,
475
497
  children: /* @__PURE__ */ jsx(motion.span, {
476
498
  className: "inline-block",
477
499
  initial: {
478
500
  opacity: 0,
479
- y: 6,
480
- filter: "blur(2px)"
501
+ y: "0.5em"
481
502
  },
482
503
  animate: {
483
504
  opacity: 1,
484
505
  y: 0,
485
- filter: "blur(0px)"
506
+ transition: {
507
+ duration: .16,
508
+ ease: ROLL_EASE
509
+ }
486
510
  },
487
511
  exit: {
488
512
  opacity: 0,
489
- y: -6,
490
- filter: "blur(2px)"
513
+ y: "-0.5em",
514
+ transition: {
515
+ duration: .12,
516
+ ease: ROLL_EASE
517
+ }
491
518
  },
492
- transition: {
493
- duration: .16,
494
- ease: [
495
- .22,
496
- 1,
497
- .36,
498
- 1
499
- ]
500
- },
501
- children: value
502
- }, value)
519
+ children: ch
520
+ }, ch)
503
521
  })
504
522
  });
505
523
  }
506
524
  /** The line under a field that is over its limit, in the prototype's words (content.jsx:318). */
507
525
  var overLimitText = (max) => `Over the ${max}-character limit`;
508
- /** Put on the input of a field that just went over its limit: the red inset edge and one 0.32s shake (content.css:618). */
509
- var OVER_LIMIT_CLASS = "shadow-[inset_0_0_0_1px_var(--kit-insp-ring-over)] animate-[kit-insp-shake_0.32s_ease] motion-reduce:animate-none";
526
+ /** The red inset edge over a field's control box while its count is over the limit (content.css:618). Drawn on the
527
+ * box's ::after, so the input's own focus border cannot hide it. The box must be `relative`. */
528
+ var OVER_LIMIT_EDGE_CLASS = "after:pointer-events-none after:absolute after:inset-0 after:rounded-[6px] after:shadow-[inset_0_0_0_1px_var(--kit-insp-ring-over)]";
529
+ /** One 0.32s shake as the count goes over (content.css:618-619); none under reduced motion. */
530
+ var OVER_LIMIT_SHAKE_CLASS = "motion-safe:animate-[kit-insp-shake_0.32s_ease] motion-reduce:animate-none";
531
+ /** The edge and the shake together, for a box that is known to have just gone over. Prefer `useOverLimit`. */
532
+ var OVER_LIMIT_CLASS = `${OVER_LIMIT_EDGE_CLASS} ${OVER_LIMIT_SHAKE_CLASS}`;
533
+ /**
534
+ * M20: the props for a field's control box (spread them on it). The edge shows while `over`; the shake class is added
535
+ * only when the count CROSSES the limit after mount, and leaves when its animation ends, so the shake plays once per
536
+ * crossing: never per keystroke, and never again when the box is hidden and shown while still over. A field that
537
+ * mounts already over shows the edge with no shake (nothing animates on first paint). Reduced motion (the OS, or a
538
+ * host <MotionConfig reducedMotion="always">): the edge only.
539
+ */
540
+ function useOverLimit(over) {
541
+ const reduce = !!useKitReducedMotion();
542
+ const [prev, setPrev] = React.useState(over);
543
+ const [crossed, setCrossed] = React.useState(false);
544
+ if (prev !== over) {
545
+ setPrev(over);
546
+ setCrossed(over);
547
+ }
548
+ return {
549
+ className: over ? cn(OVER_LIMIT_EDGE_CLASS, crossed && !reduce && "motion-safe:animate-[kit-insp-shake_0.32s_ease] motion-reduce:animate-none") : void 0,
550
+ onAnimationEnd: (e) => {
551
+ if (e.target === e.currentTarget && e.animationName === "kit-insp-shake") setCrossed(false);
552
+ }
553
+ };
554
+ }
510
555
  /** Label left, control right in a fixed 194 column (kit.jsx:137, kit.css:50-55, 501-502). `meta` is the quiet current
511
556
  * value after the label ("M · 8 px"); `info` adds the info tooltip. */
512
557
  function InlineRow({ label, meta, info, labelId, className, children }) {
@@ -540,7 +585,7 @@ function InlineRow({ label, meta, info, labelId, className, children }) {
540
585
  */
541
586
  function InspectorSeg({ options, value, onChange, small, disabled, className, "aria-label": ariaLabel, "aria-labelledby": labelledBy }) {
542
587
  const id = React.useId();
543
- const reduce = useReducedMotion();
588
+ const reduce = useKitReducedMotion();
544
589
  const move = (e) => {
545
590
  const d = e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : e.key === "ArrowLeft" || e.key === "ArrowUp" ? -1 : 0;
546
591
  if (!d || disabled) return;
@@ -1140,7 +1185,7 @@ function ItemListNote({ className, children, ...rest }) {
1140
1185
  var ITEM_DELETE_CLASS = "inline-flex h-8 items-center gap-1.5 self-start rounded-[6px] bg-kit-insp-delete-bg px-3 text-[13px] font-medium text-kit-insp-delete-fg transition-[background-color,transform] duration-150 hover:bg-kit-insp-delete-bg-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-kit-insp-delete-bg disabled:active:scale-100 motion-reduce:transition-none motion-reduce:active:scale-100";
1141
1186
  /**
1142
1187
  * The red "Delete <noun>" that ends an item screen (inspector.jsx:663, faq.css:48-49, kit.css:183). When it cannot run
1143
- * (the list is at its minimum) pass `reason`: the button is disabled and the reason is its title and description.
1188
+ * (the list is at its minimum) pass `reason`: the button is disabled and the reason shows under it (its description).
1144
1189
  */
1145
1190
  function ItemDeleteButton({ noun, reason, icon, className, children, ...rest }) {
1146
1191
  const id = React.useId();
@@ -1153,9 +1198,9 @@ function ItemDeleteButton({ noun, reason, icon, className, children, ...rest })
1153
1198
  ...rest,
1154
1199
  className: cn(ITEM_DELETE_CLASS, FOCUS, className),
1155
1200
  children: [icon, children ?? `Delete ${noun ?? "item"}`]
1156
- }), reason ? /* @__PURE__ */ jsx("span", {
1201
+ }), reason ? /* @__PURE__ */ jsx("p", {
1157
1202
  id,
1158
- className: "sr-only",
1203
+ className: "mt-1.5 text-[12px] leading-4 text-kit-insp-faint",
1159
1204
  children: reason
1160
1205
  }) : null] });
1161
1206
  }
@@ -1168,6 +1213,6 @@ function InfoGlyph({ className }) {
1168
1213
  });
1169
1214
  }
1170
1215
  //#endregion
1171
- export { ColourSelect, CountRing, FieldCounter, FieldSweep, FocusDot, GroupHeader, INSPECTOR_EASE, ITEM_DELETE_CLASS, ITEM_LIST_ADD_CLASS, ITEM_ROW_CLASS, ITEM_ROW_GRIP_CLASS, ITEM_ROW_MORE_CLASS, ITEM_ROW_SUB_CLASS, ITEM_ROW_TITLE_CLASS, InfoGlyph, InlineRow, InspectorBody, InspectorCollapse, InspectorDivider, InspectorField, InspectorFields, InspectorGroup, InspectorLocked, InspectorNote, InspectorSeg, InspectorSwitch, ItemDeleteButton, ItemListAdd, ItemListCard, ItemListNote, ItemRow, ItemRowMore, LAYOUT_GLYPHS, LayoutOpt, OVER_LIMIT_CLASS, RollNumber, SectionHeader, SelectCompact, SelectField, StepRow, StepSlider, ToggleCard, ToggleRow, ValueSlider, counterState, itemListNote, overLimitText };
1216
+ export { ColourSelect, CountRing, FieldCounter, FieldSweep, FocusDot, GroupHeader, INSPECTOR_EASE, ITEM_DELETE_CLASS, ITEM_LIST_ADD_CLASS, ITEM_ROW_CLASS, ITEM_ROW_GRIP_CLASS, ITEM_ROW_MORE_CLASS, ITEM_ROW_SUB_CLASS, ITEM_ROW_TITLE_CLASS, InfoGlyph, InlineRow, InspectorBody, InspectorCollapse, InspectorDivider, InspectorField, InspectorFields, InspectorGroup, InspectorLocked, InspectorNote, InspectorSeg, InspectorSwitch, ItemDeleteButton, ItemListAdd, ItemListCard, ItemListNote, ItemRow, ItemRowMore, LAYOUT_GLYPHS, LayoutOpt, OVER_LIMIT_CLASS, OVER_LIMIT_EDGE_CLASS, OVER_LIMIT_SHAKE_CLASS, RollNumber, SectionHeader, SelectCompact, SelectField, StepRow, StepSlider, ToggleCard, ToggleRow, ValueSlider, counterState, itemListNote, overLimitText, useOverLimit };
1172
1217
 
1173
1218
  //# sourceMappingURL=inspector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspector.js","names":[],"sources":["../../src/ui/inspector.tsx"],"sourcesContent":["/**\n * Inspector foundation · V1.6: the Visual Editor inspector's own building blocks, as prototype editor-v16 draws them\n * (src/kit.jsx:59-250, kit.css:1-100, styles.css:153-218 + 286-289, editor.css:242-251 + 411-461, faq.css:48-49).\n *\n * <InspectorBody> groups stacked 32 apart, 24/16/32 padding, a 1px divider 20 under every group but the last\n * <InspectorGroup> one group: header, then its fields 16 below\n * <GroupHeader> Content tab group: 14/20 medium title + 13/18 supporting line\n * <SectionHeader> Design / Settings group: 16 icon + 14/20 medium, trailing Reset · Locked · collapse chevron\n * <InspectorFields> stacked fields 20 apart (`rows`: inline rows 12 apart)\n * <InlineRow> label left, control right in a fixed 194 column\n * <InspectorSeg> segmented control with the sliding pill\n * <SelectCompact> / <SelectField> / <ColourSelect> grey field selects (32 compact, 34 full width)\n * <StepSlider> / <StepRow> / <ValueSlider> the stop slider and the value-inside slider\n * <ToggleRow> / <ToggleCard> / <InspectorSwitch> label-left switch rows, related ones in one grey card\n * <ItemListCard> + <ItemRow> + <ItemListAdd> + <ItemListNote> the grey item list card\n * <ItemDeleteButton> the red \"Delete <noun>\" that ends an item screen\n * <InspectorField> + <FieldCounter> label row with the focus dot, the sweep, and the n / max counter\n *\n * Editor-scoped: these read the --kit-insp-* roles (tokens.css) and nothing else in the kit draws them unless a host\n * asks (`KitLookProvider look=\"v16\"` for the engine). Every other kit consumer keeps the V2 look.\n */\nimport * as React from \"react\";\nimport { IconCheck, IconChevronDown, IconDots, IconGripVertical, IconInfoCircle, IconLock } from \"@tabler/icons-react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"framer-motion\";\nimport { cn } from \"../lib/cn\";\nimport { Menu, MenuContent, MenuItem, MenuLabel, MenuSeparator, MenuTrigger } from \"./overlay\";\nimport { InfoTooltip } from \"./tooltip-card\";\n\n/** The prototype's accordion curve (kit.jsx:60 ACC) and its sliding-pill spring (kit.jsx:59 PILL). */\nexport const INSPECTOR_EASE = [0.22, 1, 0.36, 1] as const;\nconst PILL = { type: \"spring\", stiffness: 520, damping: 40, mass: 0.8 } as const;\nconst FOCUS = \"outline-none focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-kit-insp-accent\";\n\n/* ── Body, group, fields, divider ───────────────────────────────────── */\n\n/** Panel body (kit.css:6-8). `sub` = a drill-in screen (16 on top instead of 24). */\nexport function InspectorBody({ sub, className, children, ...rest }: React.HTMLAttributes<HTMLDivElement> & { sub?: boolean }) {\n return (\n <div\n data-slot=\"kit-insp-body\"\n className={cn(\n \"flex min-w-0 flex-col gap-8 px-4 pb-8\",\n sub ? \"pt-4\" : \"pt-6\",\n \"[&>[data-slot=kit-insp-group]:not(:last-child)]:border-b [&>[data-slot=kit-insp-group]:not(:last-child)]:border-kit-insp-divider [&>[data-slot=kit-insp-group]:not(:last-child)]:pb-5\",\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\n/** One group in the body (kit.css:9, 13, 36). `locked` greys its fields and makes them read-only; `flash` runs the\n * 1.2s violet flash a jump-to-group ends with. */\nexport function InspectorGroup({\n locked, flash, className, children, ...rest\n}: React.HTMLAttributes<HTMLElement> & { locked?: boolean; flash?: boolean }) {\n return (\n <section\n data-slot=\"kit-insp-group\"\n data-locked={locked || undefined}\n className={cn(\"flex min-w-0 flex-col gap-4\", flash && \"animate-[kit-insp-group-flash_1.2s_ease] motion-reduce:animate-none\", className)}\n {...rest}\n >\n {children}\n </section>\n );\n}\n\n/** The fields of a group (kit.css:10-11): 20 apart, or 12 for a run of inline rows. */\nexport function InspectorFields({ rows, className, children, ...rest }: React.HTMLAttributes<HTMLDivElement> & { rows?: boolean }) {\n return (\n <div data-slot=\"kit-insp-fields\" className={cn(\"flex min-w-0 flex-col\", rows ? \"gap-3\" : \"gap-5\", className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/** The 1px rule between groups, for a host that stacks groups outside <InspectorBody> (kit.css:8). */\nexport function InspectorDivider({ className }: { className?: string }) {\n return <div role=\"separator\" data-slot=\"kit-insp-divider\" className={cn(\"h-px w-full shrink-0 bg-kit-insp-divider\", className)} />;\n}\n\n/** Fields a role cannot edit (kit.css:36-37): one disabled fieldset at .45. */\nexport function InspectorLocked({ on, children }: { on?: boolean; children: React.ReactNode }) {\n if (!on) return <>{children}</>;\n return (\n <fieldset disabled aria-disabled=\"true\" data-slot=\"kit-insp-locked\" className=\"m-0 flex min-w-0 flex-col gap-[inherit] border-0 p-0 opacity-45 [&_*]:!cursor-default\">\n {children}\n </fieldset>\n );\n}\n\n/* ── Headers ────────────────────────────────────────────────────────── */\n\nexport interface GroupHeaderProps {\n title: React.ReactNode;\n /** supporting line under the title */\n sub?: React.ReactNode;\n /** trailing controls (link, comment, ⋯) */\n actions?: React.ReactNode;\n /** id of the title element, for aria-labelledby on the group */\n titleId?: string;\n className?: string;\n}\n\n/** Level-1 content group header (kit.jsx:66-68, kit.css:16-19; the inspector's ink is insp.css:19-20). */\nexport function GroupHeader({ title, sub, actions, titleId, className }: GroupHeaderProps) {\n return (\n <div data-slot=\"kit-group-header\" className={cn(\"flex items-start gap-2\", className)}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <h3 id={titleId} className=\"text-[14px] font-medium leading-5 tracking-[-0.2px] text-kit-group-title\">{title}</h3>\n {sub ? <p className=\"text-[13px] leading-[18px] tracking-[-0.16px] text-kit-group-sub\">{sub}</p> : null}\n </div>\n {actions}\n </div>\n );\n}\n\nexport interface SectionHeaderProps {\n /** 16px leading glyph */\n icon?: React.ReactNode;\n title: React.ReactNode;\n /** what sits at the end of the row */\n trailing?: \"reset\" | \"locked\" | \"collapse\";\n onReset?: () => void;\n /** the Reset is shown but inert (a read-only panel, a locked section, a save in flight) */\n resetDisabled?: boolean;\n /** with trailing=\"collapse\" */\n open?: boolean;\n onToggle?: () => void;\n /** description, always 4 under the title row */\n desc?: React.ReactNode;\n /** extra trailing content, before the Reset / chevron */\n actions?: React.ReactNode;\n titleId?: string;\n /** aria-controls for the collapse button */\n controls?: string;\n className?: string;\n}\n\n/** Design / Settings group header (kit.jsx:72-91, kit.css:22-33). Static unless trailing=\"collapse\". */\nexport function SectionHeader({ icon, title, trailing, onReset, resetDisabled, open, onToggle, desc, actions, titleId, controls, className }: SectionHeaderProps) {\n const row = (\n <>\n <span id={titleId} className=\"flex min-w-0 items-center gap-1.5 text-[14px] font-medium leading-5 text-kit-insp-title [&>svg]:size-4 [&>svg]:shrink-0 [&>img]:size-4 [&>img]:shrink-0\">\n {icon}\n <span className=\"truncate\">{title}</span>\n </span>\n <span className=\"flex-1\" />\n {trailing === \"locked\" ? (\n <span className=\"inline-flex items-center gap-1 text-[13px] text-kit-insp-faint\">\n <IconLock aria-hidden className=\"size-3.5\" stroke={1.8} />\n Locked\n </span>\n ) : null}\n {trailing === \"collapse\" ? (\n <span aria-hidden className={cn(\"grid text-kit-insp-desc transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none\", open && \"rotate-180\")}>\n <IconChevronDown className=\"size-4\" stroke={1.6} />\n </span>\n ) : null}\n </>\n );\n return (\n <div data-slot=\"kit-section-header\" className={cn(\"flex flex-col gap-1\", className)}>\n {trailing === \"collapse\" ? (\n <div className=\"flex min-h-6 w-full items-center gap-1.5\">\n <button type=\"button\" aria-expanded={!!open} aria-controls={controls} onClick={onToggle} className={cn(\"flex min-h-6 min-w-0 flex-1 items-center gap-1.5 rounded-[4px] text-left\", FOCUS)}>\n {row}\n </button>\n {actions}\n </div>\n ) : (\n <div className=\"flex min-h-6 w-full items-center gap-1.5\">\n {row}\n {actions}\n {trailing === \"reset\" ? (\n <button\n type=\"button\"\n onClick={onReset}\n disabled={resetDisabled}\n aria-label={typeof title === \"string\" ? `Reset ${title}` : undefined}\n className={cn(\"rounded-[4px] px-0.5 text-[13px] text-kit-insp-quiet transition-colors enabled:hover:text-kit-insp-ink disabled:cursor-default disabled:opacity-50\", FOCUS)}\n >\n Reset\n </button>\n ) : null}\n </div>\n )}\n {desc ? <p className=\"m-0 text-[13px] leading-[18px] tracking-[-0.16px] text-kit-insp-desc\">{desc}</p> : null}\n </div>\n );\n}\n\n/** The quiet note under a group's fields (insp.css:32 `.adv-note`): 12/16 in the sub colour. */\nexport function InspectorNote({ id, className, children }: { id?: string; className?: string; children: React.ReactNode }) {\n return (\n <p id={id} data-slot=\"kit-insp-note\" className={cn(\"m-0 text-[12px] leading-4 text-kit-group-sub\", className)}>\n {children}\n </p>\n );\n}\n\n/* Layout option glyphs (kit.jsx:121-135 `LAYOUT_SVG`, `LayoutOpt`): every layout choice shows a 14 glyph before its label. */\nexport const LAYOUT_GLYPHS = {\n centred: <path d=\"M4 6h16M8 12h8M6 18h12\" />,\n left: <path d=\"M4 6h16M4 12h10M4 18h14\" />,\n stacked: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M4 12h16\" />\n </>\n ),\n two: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M12 4v16\" />\n </>\n ),\n three: (\n <>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"1\" />\n <path d=\"M9 3v18M15 3v18\" />\n </>\n ),\n split: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M15 4v16\" />\n </>\n ),\n formLeft: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M9 4v16\" />\n </>\n ),\n row: (\n <>\n <path d=\"M4 4v16M20 4v16\" />\n <rect x=\"9\" y=\"6\" width=\"6\" height=\"12\" rx=\"2\" />\n </>\n ),\n grid: (\n <>\n <rect x=\"4\" y=\"4\" width=\"6\" height=\"6\" rx=\"1\" />\n <rect x=\"14\" y=\"4\" width=\"6\" height=\"6\" rx=\"1\" />\n <rect x=\"4\" y=\"14\" width=\"6\" height=\"6\" rx=\"1\" />\n <rect x=\"14\" y=\"14\" width=\"6\" height=\"6\" rx=\"1\" />\n </>\n ),\n scroll: (\n <>\n <rect x=\"7\" y=\"5\" width=\"10\" height=\"14\" rx=\"1\" />\n <path d=\"M22 17h-1a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h1M2 17h1a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H2\" />\n </>\n ),\n} as const;\nexport type LayoutGlyphName = keyof typeof LAYOUT_GLYPHS;\n/** A layout glyph, then the option's label: `<LayoutOpt i=\"two\">Two columns</LayoutOpt>`. */\nexport function LayoutOpt({ i, children }: { i: LayoutGlyphName; children?: React.ReactNode }) {\n return (\n <>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden className=\"shrink-0\">\n {LAYOUT_GLYPHS[i]}\n </svg>\n {children}\n </>\n );\n}\n\n/** Collapsible body for a SectionHeader with trailing=\"collapse\" (kit.jsx:248-252): height, then a 4px rise out of a\n * 4px blur, both on the accordion curve. Instant with reduced motion. */\nexport function InspectorCollapse({ open, id, rows, className, children }: { open: boolean; id?: string; rows?: boolean; className?: string; children: React.ReactNode }) {\n const reduce = useReducedMotion();\n const t = { duration: reduce ? 0 : 0.3, ease: INSPECTOR_EASE };\n return (\n <AnimatePresence initial={false}>\n {open ? (\n <motion.div key=\"c\" id={id} data-slot=\"kit-insp-collapse\" initial={{ height: 0 }} animate={{ height: \"auto\" }} exit={{ height: 0 }} transition={t} className=\"min-w-0 overflow-hidden\">\n <motion.div\n initial={reduce ? false : { opacity: 0, y: -4, filter: \"blur(4px)\" }}\n animate={{ opacity: 1, y: 0, filter: \"blur(0px)\" }}\n exit={reduce ? undefined : { opacity: 0, y: -4, filter: \"blur(4px)\" }}\n transition={t}\n className={cn(\"flex min-w-0 flex-col\", rows ? \"gap-3\" : \"gap-5\", className)}\n >\n {children}\n </motion.div>\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n}\n\n/* ── Field label, focus dot, sweep, counter ─────────────────────────── */\n\nexport interface InspectorFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n label: React.ReactNode;\n /** id for the label element (aria-labelledby on the control) */\n labelId?: string;\n htmlFor?: string;\n /** the info tooltip after the label: its body text */\n info?: React.ReactNode;\n /** right side of the label row (counter, actions) */\n meta?: React.ReactNode;\n /** P-FDOT: this is the field a canvas click opened. Draws the 6px violet dot after the label. */\n current?: boolean;\n /** P-FDOT: run the violet sweep once (change the value to run it again, e.g. a click counter) */\n flash?: boolean | number | string;\n /** over its limit / invalid: the footer turns red */\n state?: \"over\" | \"bad\";\n /** under the control: hint left, counter right */\n hint?: React.ReactNode;\n counter?: React.ReactNode;\n}\n\n/**\n * The inspector field shell (editor.css:411-431, kit.css:506-515): label row 13/16 medium, min 20 high, the control 8\n * under it, then an optional 12/16 footer. `current` puts the focus dot after the label (order: label · dot · spacer ·\n * meta); `flash` runs the left-to-right violet sweep behind the whole field (a plain fade with reduced motion).\n */\nexport function InspectorField({ label, labelId, htmlFor, info, meta, current, flash, state, hint, counter, className, children, ...rest }: InspectorFieldProps) {\n const labelCls = \"flex min-h-5 items-center gap-1.5 text-[13px] font-medium leading-4 text-kit-insp-label\";\n const labelInner = (\n <>\n {label}\n {info ? <InfoTooltip title={label}>{info}</InfoTooltip> : null}\n {current ? <FocusDot /> : null}\n <span className=\"flex-1\" />\n {meta}\n </>\n );\n return (\n <div\n data-slot=\"kit-insp-field\"\n data-cur={current || undefined}\n data-state={state}\n className={cn(\"relative flex min-w-0 flex-col gap-2 rounded-[4px]\", flash ? \"isolate\" : null, className)}\n {...rest}\n >\n {flash ? <FieldSweep key={String(flash)} /> : null}\n {htmlFor ? (\n <label id={labelId} htmlFor={htmlFor} data-slot=\"kit-insp-label\" className={labelCls}>{labelInner}</label>\n ) : (\n <div id={labelId} data-slot=\"kit-insp-label\" className={labelCls}>{labelInner}</div>\n )}\n {children}\n {hint || counter ? (\n <div data-slot=\"kit-insp-field-foot\" className={cn(\"flex justify-between gap-3 text-[12px] leading-4\", state === \"over\" ? \"text-kit-insp-error\" : \"text-kit-insp-faint\")}>\n <span className=\"min-w-0\">{hint}</span>\n {counter}\n </div>\n ) : null}\n </div>\n );\n}\n\n/** The 6px violet dot after a field's label while it is the one a canvas click opened (kit.css:513-515). */\nexport function FocusDot({ className }: { className?: string }) {\n return <span aria-hidden data-slot=\"kit-focus-dot\" className={cn(\"size-1.5 shrink-0 rounded-full bg-kit-insp-accent animate-[kit-insp-dot_0.24s_cubic-bezier(0.2,0.8,0.2,1)_both] motion-reduce:animate-none\", className)} />;\n}\n\n/** The soft violet fill that sweeps across a field a canvas click opened (kit.css:506-511). Sits behind the field, 6/8\n * outside it; the parent must be `relative isolate`. */\nexport function FieldSweep({ className }: { className?: string }) {\n return (\n <span\n aria-hidden\n data-slot=\"kit-field-sweep\"\n className={cn(\n \"pointer-events-none absolute -inset-x-2 -inset-y-1.5 -z-10 rounded-[6px] bg-linear-to-r/srgb from-kit-insp-flash-a via-kit-insp-flash-b via-55% to-kit-insp-flash-c\",\n \"[clip-path:inset(0_100%_0_0_round_6px)] animate-[kit-insp-sweep_1.4s_cubic-bezier(0.4,0,0.2,1)_forwards]\",\n \"motion-reduce:[clip-path:none] motion-reduce:animate-[kit-insp-fade_1.6s_ease_forwards]\",\n className,\n )}\n />\n );\n}\n\n/** How close a count is to its limit, by the prototype's rule (state.js:93 countLevel): \"near\" above 91% of the\n * limit, \"over\" past it. */\nexport function counterState(n: number, max?: number): \"ok\" | \"near\" | \"over\" {\n if (!max) return \"ok\";\n return n > max ? \"over\" : n > Math.floor(max * 0.91) ? \"near\" : \"ok\";\n}\n\n/** The 12px progress ring beside a counter that is near or over its limit (content.jsx:307-309, content.css:617): a\n * grey track, an amber arc that fills with the count, red when over. Springs in and out (wrap it in AnimatePresence). */\nexport function CountRing({ value, max, className }: { value: number; max: number; className?: string }) {\n const reduce = useReducedMotion();\n const r = 4.5;\n const c = 2 * Math.PI * r;\n const over = value > max;\n return (\n <motion.svg\n aria-hidden\n data-slot=\"kit-count-ring\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n initial={reduce ? false : { scale: 0.5, opacity: 0 }}\n animate={{ scale: 1, opacity: 1 }}\n exit={reduce ? { opacity: 0 } : { scale: 0.5, opacity: 0 }}\n transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 520, damping: 22 }}\n className={cn(\"shrink-0\", className)}\n >\n <circle cx=\"6\" cy=\"6\" r={r} fill=\"none\" strokeWidth=\"2\" className=\"stroke-kit-insp-track\" />\n <circle\n cx=\"6\"\n cy=\"6\"\n r={r}\n fill=\"none\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeDasharray={`${Math.min(value / max, 1) * c} ${c}`}\n transform=\"rotate(-90 6 6)\"\n className={cn(\"transition-[stroke-dasharray,stroke] duration-200 motion-reduce:transition-none\", over ? \"stroke-kit-insp-ring-over\" : \"stroke-kit-insp-ring-near\")}\n />\n </motion.svg>\n );\n}\n\n/** The field counter \"42 / 60\" (content.jsx:310-320; content.css:614-616; insp.css:163-164): 12/16 tabular, amber and\n * medium when near the limit, red over it, with the ring beside it in both states. Without `max` it is the bare count. */\nexport function FieldCounter({ value, max, ring = true, size = 11, className }: { value: number; max?: number; ring?: boolean; /** 11/14 in the inspector (insp.css:30), 12/16 in the content editor (editor.css:425) */ size?: 11 | 12; className?: string }) {\n const s = counterState(value, max);\n return (\n <span\n data-slot=\"kit-field-counter\"\n data-state={s}\n aria-label={max == null ? `${value} characters` : `${value} of ${max} characters`}\n className={cn(\"inline-flex shrink-0 items-center gap-1.5 tabular-nums transition-colors duration-200\", size === 11 ? \"text-[11px] leading-[14px]\" : \"text-[12px] leading-4\", s === \"near\" ? \"font-medium text-kit-insp-count-near\" : s === \"over\" ? \"font-medium text-kit-insp-count-over\" : \"text-kit-insp-faint\", className)}\n >\n <AnimatePresence initial={false}>{ring && max && s !== \"ok\" ? <CountRing key=\"r\" value={value} max={max} /> : null}</AnimatePresence>\n {max == null ? (\n value\n ) : (\n <span aria-hidden className=\"inline-flex items-center whitespace-pre\">\n <RollNumber value={value} />\n {` / ${max}`}\n </span>\n )}\n </span>\n );\n}\n\n/** A number that rolls (ui.jsx:371-378 `Roll`, faq.css:90-91): the new figure rises in from 6 below while the old one\n * lifts out, both blurred 2, in 0.16s. Tabular, so the text beside it does not move. */\nexport function RollNumber({ value, className }: { value: number | string; className?: string }) {\n return (\n <span data-slot=\"kit-roll\" className={cn(\"relative inline-block tabular-nums\", className)}>\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <motion.span\n key={value}\n className=\"inline-block\"\n initial={{ opacity: 0, y: 6, filter: \"blur(2px)\" }}\n animate={{ opacity: 1, y: 0, filter: \"blur(0px)\" }}\n exit={{ opacity: 0, y: -6, filter: \"blur(2px)\" }}\n transition={{ duration: 0.16, ease: [0.22, 1, 0.36, 1] }}\n >\n {value}\n </motion.span>\n </AnimatePresence>\n </span>\n );\n}\n\n/** The line under a field that is over its limit, in the prototype's words (content.jsx:318). */\nexport const overLimitText = (max: number) => `Over the ${max}-character limit`;\n/** Put on the input of a field that just went over its limit: the red inset edge and one 0.32s shake (content.css:618). */\nexport const OVER_LIMIT_CLASS = \"shadow-[inset_0_0_0_1px_var(--kit-insp-ring-over)] animate-[kit-insp-shake_0.32s_ease] motion-reduce:animate-none\";\n\n/* ── Inline row ─────────────────────────────────────────────────────── */\n\n/** Label left, control right in a fixed 194 column (kit.jsx:137, kit.css:50-55, 501-502). `meta` is the quiet current\n * value after the label (\"M · 8 px\"); `info` adds the info tooltip. */\nexport function InlineRow({\n label, meta, info, labelId, className, children,\n}: { label: React.ReactNode; meta?: React.ReactNode; info?: React.ReactNode; labelId?: string; className?: string; children: React.ReactNode }) {\n return (\n <div data-slot=\"kit-inline-row\" className={cn(\"flex min-h-8 items-center gap-4\", className)}>\n <span id={labelId} className=\"inline-flex min-w-0 flex-1 items-center gap-1 whitespace-nowrap text-[13px] leading-4 text-kit-insp-label\">\n {label}\n {info ? <InfoTooltip title={label}>{info}</InfoTooltip> : null}\n {meta ? <em className=\"truncate text-[12px] not-italic tabular-nums text-kit-insp-faint\">{meta}</em> : null}\n </span>\n <div className=\"w-[194px] flex-none\">{children}</div>\n </div>\n );\n}\n\n/* ── Segmented ──────────────────────────────────────────────────────── */\n\nexport interface InspectorSegOption<T extends string> {\n value: T;\n label: React.ReactNode;\n /** tooltip + accessible name (icon-only options need it) */\n title?: string;\n}\n\n/**\n * Segmented control, 2–5 options, with the sliding pill (kit.jsx:114-120; styles.css:188-191, editor.css:287 + 458-461,\n * insp.css:61). 36 high (32 with `small` or inside an InlineRow), 2 padding, grey track, white pill on the spring.\n * A radiogroup: arrows move the choice.\n */\nexport function InspectorSeg<T extends string>({\n options, value, onChange, small, disabled, className, \"aria-label\": ariaLabel, \"aria-labelledby\": labelledBy,\n}: {\n options: InspectorSegOption<T>[]; value: T; onChange: (v: T) => void; small?: boolean; disabled?: boolean; className?: string;\n \"aria-label\"?: string; \"aria-labelledby\"?: string;\n}) {\n const id = React.useId();\n const reduce = useReducedMotion();\n const move = (e: React.KeyboardEvent<HTMLDivElement>) => {\n const d = e.key === \"ArrowRight\" || e.key === \"ArrowDown\" ? 1 : e.key === \"ArrowLeft\" || e.key === \"ArrowUp\" ? -1 : 0;\n if (!d || disabled) return;\n e.preventDefault();\n const at = options.findIndex((o) => o.value === value);\n // nothing selected (a value no option carries): → takes the first, ← the last\n const next = at < 0 ? options[d > 0 ? 0 : options.length - 1] : options[(at + d + options.length) % options.length];\n if (!next) return;\n onChange(next.value);\n e.currentTarget.querySelector<HTMLElement>(`[data-seg=\"${CSS.escape(next.value)}\"]`)?.focus();\n };\n return (\n <div\n role=\"radiogroup\"\n aria-label={ariaLabel}\n aria-labelledby={labelledBy}\n data-slot=\"kit-insp-seg\"\n onKeyDown={move}\n className={cn(\"flex w-full gap-0.5 rounded-[6px] bg-kit-insp-track p-0.5\", small ? \"h-8\" : \"h-9\", className)}\n >\n {options.map((o, i) => {\n const on = o.value === value;\n // with nothing selected no pill is drawn and the first radio is the tab stop\n const stop = on || (i === 0 && !options.some((x) => x.value === value));\n return (\n <button\n key={o.value}\n type=\"button\"\n role=\"radio\"\n data-seg={o.value}\n disabled={disabled}\n aria-checked={on}\n aria-label={o.title}\n title={o.title}\n tabIndex={stop ? 0 : -1}\n onClick={() => onChange(o.value)}\n className={cn(\n \"relative min-w-0 flex-1 whitespace-nowrap rounded-[4px] tracking-[-0.16px] transition-colors disabled:cursor-default\",\n small ? \"text-[12.5px]\" : \"text-[13px]\",\n on ? \"font-medium text-kit-insp-ink\" : \"text-kit-insp-desc hover:text-kit-insp-ink\",\n FOCUS,\n )}\n >\n {on ? (\n <motion.span\n layoutId={`kit-seg-${id}`}\n transition={reduce ? { duration: 0 } : PILL}\n className=\"absolute inset-0 rounded-[5px] bg-kit-insp-seg-pill shadow-[0_0_0_0.5px_var(--kit-insp-line),0_1px_1px_rgb(0_0_0/0.1),0_3px_3px_rgb(0_0_0/0.09),0_6px_4px_rgb(0_0_0/0.05),0_11px_4px_rgb(0_0_0/0.01)]\"\n />\n ) : null}\n <span className=\"relative inline-flex items-center justify-center gap-1.5 [&>svg]:size-3.5 [&>svg]:shrink-0\">{o.label}</span>\n </button>\n );\n })}\n </div>\n );\n}\n\n/* ── Selects ────────────────────────────────────────────────────────── */\n\nexport interface InspectorOption<T extends string> {\n value: T;\n label: string;\n /** second line in the menu */\n desc?: string;\n /** shown but not pickable (a choice this site cannot take) */\n disabled?: boolean;\n}\n\nconst SELECT_BASE =\n \"flex w-full items-center rounded-[6px] border border-transparent bg-kit-insp-card text-left text-[13px] leading-[18px] text-kit-insp-ink transition-colors hover:bg-kit-insp-card-hover data-[popup-open]:border-kit-insp-accent data-[popup-open]:bg-kit-insp-card-focus disabled:cursor-default\";\n\nfunction OptionItems<T extends string>({ options, value, onPick }: { options: InspectorOption<T>[]; value: T | undefined; onPick: (v: T) => void }) {\n return (\n <>\n {options.map((o) => (\n <MenuItem key={o.value} disabled={o.disabled} onClick={() => onPick(o.value)} className={o.desc ? \"h-auto py-1.5\" : undefined} aria-current={o.value === value || undefined}>\n <span className=\"flex items-center gap-2\">\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate\">{o.label}</span>\n {o.desc ? <span className=\"whitespace-normal text-[12px] leading-4 text-kit-insp-quiet\">{o.desc}</span> : null}\n </span>\n {o.value === value ? <IconCheck aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-label\" stroke={2} /> : null}\n </span>\n </MenuItem>\n ))}\n </>\n );\n}\n\n/** Compact dropdown for an Inline row (kit.jsx:140-150, kit.css:58-62): 32 high, grey, violet edge while open. The menu\n * is at least as wide as the control. */\nexport function SelectCompact<T extends string>({\n value, options, onPick, icon, label, disabled, className,\n}: { value: T | undefined; options: InspectorOption<T>[]; onPick: (v: T) => void; icon?: React.ReactNode; label: string; disabled?: boolean; className?: string }) {\n const cur = options.find((o) => o.value === value);\n return (\n <Menu>\n <MenuTrigger aria-label={label} disabled={disabled} data-slot=\"kit-select-compact\" className={cn(SELECT_BASE, \"h-8 gap-1.5 pl-2.5 pr-2\", FOCUS, className)}>\n {icon ? <span aria-hidden className=\"flex shrink-0 text-kit-insp-label [&>svg]:size-3.5\">{icon}</span> : null}\n <span className=\"min-w-0 flex-1 truncate\">{cur ? cur.label : \"Select…\"}</span>\n <IconChevronDown aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-desc\" stroke={1.6} />\n </MenuTrigger>\n <MenuContent align=\"start\" className=\"min-w-[var(--anchor-width)]\">\n <OptionItems options={options} value={value} onPick={onPick} />\n </MenuContent>\n </Menu>\n );\n}\n\n/** Full-width select with its label above (kit.jsx:153-164; editor.css:416-417, 433; faq.css:59): 34 high. */\nexport function SelectField<T extends string>({\n label, value, options, onPick, placeholder = \"Select…\", icon, info, disabled, current, flash, className,\n}: {\n label: React.ReactNode; value: T | undefined; options: InspectorOption<T>[]; onPick: (v: T) => void; placeholder?: string; icon?: React.ReactNode;\n info?: React.ReactNode; disabled?: boolean; current?: boolean; flash?: InspectorFieldProps[\"flash\"]; className?: string;\n}) {\n const id = React.useId();\n const cur = options.find((o) => o.value === value);\n return (\n <InspectorField label={label} labelId={`${id}-l`} info={info} current={current} flash={flash} className={className}>\n <Menu>\n <MenuTrigger aria-labelledby={`${id}-l ${id}-v`} disabled={disabled} data-slot=\"kit-select-field\" className={cn(SELECT_BASE, \"h-[34px] gap-2 px-2.5 tracking-[-0.1625px]\", FOCUS)}>\n {icon ? <span aria-hidden className=\"flex shrink-0 text-kit-insp-label [&>svg]:size-3.5\">{icon}</span> : null}\n <span id={`${id}-v`} className={cn(\"min-w-0 truncate\", !cur && \"text-kit-insp-faint\")}>{cur ? cur.label : placeholder}</span>\n <span className=\"flex-1\" />\n <IconChevronDown aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-desc\" stroke={1.6} />\n </MenuTrigger>\n <MenuContent align=\"start\" className=\"min-w-[var(--anchor-width)]\">\n <OptionItems options={options} value={value} onPick={onPick} />\n </MenuContent>\n </Menu>\n </InspectorField>\n );\n}\n\nexport interface ColourOption<T extends string> {\n value: T;\n label: string;\n /** the design token's name, shown in the pill (\"surface/base\") */\n token: string;\n /** any CSS colour: the swatch */\n colour: string;\n}\n\n/** Colour select (kit.jsx:219-232, kit.css:77-79): value left, swatch + token pill right; the menu lists the theme\n * colours with their tokens under a header, then an optional readability note. */\nexport function ColourSelect<T extends string>({\n label, value, options, onPick, header = \"Section background\", note = \"Text switches to light on Inverse so it stays readable (4.5:1). Colours come from your site theme.\", disabled, className,\n}: { label: React.ReactNode; value: T | undefined; options: ColourOption<T>[]; onPick: (v: T) => void; /** the menu's heading; \"\" for none */ header?: string; /** the readability note under the options; null for none */ note?: React.ReactNode; disabled?: boolean; className?: string }) {\n const id = React.useId();\n const cur = options.find((o) => o.value === value) ?? options[0];\n const swatch = (c: string) => <span aria-hidden className=\"size-3.5 shrink-0 rounded-[3px] shadow-[inset_0_0_0_1px_rgb(0_0_0/0.12)]\" style={{ background: c }} />;\n return (\n <InspectorField label={label} labelId={`${id}-l`} className={className}>\n <Menu>\n <MenuTrigger aria-labelledby={`${id}-l ${id}-v`} disabled={disabled} data-slot=\"kit-colour-select\" className={cn(SELECT_BASE, \"h-[34px] gap-2 px-2.5 tracking-[-0.1625px]\", FOCUS)}>\n <span id={`${id}-v`} className=\"shrink-0\">{cur?.label ?? \"Select…\"}</span>\n <span className=\"flex-1\" />\n {cur ? (\n <span className=\"inline-flex h-[22px] items-center gap-1.5 whitespace-nowrap rounded-[4px] bg-kit-insp-token-chip pl-1 pr-1.5 text-[12px] text-kit-insp-desc\">\n {swatch(cur.colour)}\n {cur.token}\n </span>\n ) : null}\n <IconChevronDown aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-desc\" stroke={1.6} />\n </MenuTrigger>\n <MenuContent align=\"start\" className=\"w-[300px] min-w-[var(--anchor-width)]\">\n {header ? <MenuLabel>{header}</MenuLabel> : null}\n {options.map((o) => (\n <MenuItem key={o.value} icon={swatch(o.colour)} onClick={() => onPick(o.value)} aria-current={o.value === value || undefined}>\n <span className=\"flex items-center gap-2\">\n <span className=\"min-w-0 flex-1 truncate\">{o.label}</span>\n <span className=\"shrink-0 text-[12px] text-kit-insp-quiet\">{o.token}</span>\n {o.value === value ? <IconCheck aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-label\" stroke={2} /> : null}\n </span>\n </MenuItem>\n ))}\n {note ? (\n <>\n <MenuSeparator />\n <p className=\"px-2 py-1.5 text-[12px] leading-[17px] text-kit-insp-quiet\">{note}</p>\n </>\n ) : null}\n </MenuContent>\n </Menu>\n </InspectorField>\n );\n}\n\n/* ── Sliders ────────────────────────────────────────────────────────── */\n\nconst TRACK = \"relative h-7 touch-none select-none rounded-[6px] bg-kit-insp-track shadow-[inset_0_1px_2px_rgb(0_0_0/0.06)]\";\nconst HANDLE =\n \"absolute top-1/2 -ml-[5px] -mt-[10.5px] h-[21px] w-2.5 rounded-[4px] bg-kit-insp-handle shadow-[0_0_0_0.5px_rgb(0_0_0/0.18),0_1px_2px_rgb(0_0_0/0.16),0_2px_4px_rgb(0_0_0/0.08)] after:absolute after:left-[4.5px] after:top-1.5 after:h-[9px] after:w-px after:rounded-[1px] after:bg-kit-insp-handle-mark\";\n\nfunction trackDrag(e: React.PointerEvent<HTMLElement>, onMove: (clientX: number) => void, onEnd?: () => void) {\n e.preventDefault();\n e.currentTarget.focus();\n const body = e.currentTarget.ownerDocument.body;\n const prev = body.style.cursor;\n body.style.cursor = \"ew-resize\";\n const mv = (ev: PointerEvent) => onMove(ev.clientX);\n const up = () => {\n window.removeEventListener(\"pointermove\", mv);\n window.removeEventListener(\"pointerup\", up);\n window.removeEventListener(\"pointercancel\", up);\n body.style.cursor = prev;\n onEnd?.();\n };\n window.addEventListener(\"pointermove\", mv);\n window.addEventListener(\"pointerup\", up);\n window.addEventListener(\"pointercancel\", up);\n onMove(e.clientX);\n}\n\n/** Step slider (kit.jsx:168-187, kit.css:65-73): filler + handle on the current stop, dots on the others. Click a stop,\n * drag the handle, or use the arrow keys. `value` is the stop's index. */\nexport function StepSlider({\n label, stops, value, onChange, disabled, className, \"aria-labelledby\": labelledBy,\n}: { label?: string; stops: string[]; value: number; onChange: (index: number) => void; disabled?: boolean; className?: string; \"aria-labelledby\"?: string }) {\n const ref = React.useRef<HTMLDivElement | null>(null);\n const n = stops.length;\n const last = Math.max(1, n - 1);\n const i = Math.max(0, Math.min(n - 1, value));\n const cur = React.useRef(i);\n cur.current = i;\n const pick = (clientX: number) => {\n const r = ref.current!.getBoundingClientRect();\n const x = Math.min(Math.max(clientX - r.left - 8, 0), r.width - 16);\n return Math.round(x / ((r.width - 16) / last));\n };\n const pct = i / last;\n return (\n <div\n ref={ref}\n role=\"slider\"\n tabIndex={disabled ? -1 : 0}\n aria-label={labelledBy ? undefined : label}\n aria-labelledby={labelledBy}\n aria-valuemin={0}\n aria-valuemax={n - 1}\n aria-valuenow={i}\n aria-valuetext={stops[i]}\n aria-disabled={disabled || undefined}\n data-slot=\"kit-step-slider\"\n onPointerDown={(e) => {\n if (disabled) return;\n trackDrag(e, (x) => {\n const j = pick(x);\n if (j !== cur.current) {\n cur.current = j;\n onChange(j);\n }\n });\n }}\n onKeyDown={(e) => {\n if (disabled) return;\n if (e.key === \"ArrowRight\" || e.key === \"ArrowUp\") {\n e.preventDefault();\n onChange(Math.min(n - 1, i + 1));\n }\n if (e.key === \"ArrowLeft\" || e.key === \"ArrowDown\") {\n e.preventDefault();\n onChange(Math.max(0, i - 1));\n }\n }}\n className={cn(TRACK, \"group/step\", disabled ? \"cursor-default opacity-45\" : \"cursor-pointer\", FOCUS, className)}\n >\n <span aria-hidden className=\"absolute inset-y-0 left-0 rounded-[6px] bg-kit-insp-track-fill transition-[width] duration-[180ms] ease-[cubic-bezier(0.2,0.8,0.2,1)] motion-reduce:transition-none\" style={{ width: `calc(${pct} * (100% - 16px) + 13px)` }} />\n {stops.map((s, j) => (\n <span key={j} aria-hidden title={s} className={cn(\"absolute top-1/2 -ml-[1.5px] -mt-[1.5px] size-[3px] rounded-full bg-kit-insp-track-dot transition-opacity duration-100\", j === i && \"opacity-0\")} style={{ left: `calc(${j / last} * (100% - 16px) + 8px)` }} />\n ))}\n <span aria-hidden className={cn(HANDLE, \"transition-[left,transform] duration-[180ms] ease-[cubic-bezier(0.2,0.8,0.2,1)] motion-reduce:transition-none\", !disabled && \"group-active/step:scale-[1.08]\")} style={{ left: `calc(${pct} * (100% - 16px) + 8px)` }} />\n </div>\n );\n}\n\n/** Step slider in an Inline row: label + the current stop's name on the left (kit.jsx:211-213). */\nexport function StepRow({\n label, stops, names, value, onChange, disabled, info,\n}: { label: string; stops: string[]; names?: string[]; value: number; onChange: (index: number) => void; disabled?: boolean; info?: React.ReactNode }) {\n return (\n <InlineRow label={label} meta={(names ?? stops)[value]} info={info}>\n <StepSlider label={label} stops={stops} value={value} onChange={onChange} disabled={disabled} />\n </InlineRow>\n );\n}\n\n/**\n * Value slider (kit.jsx:191-209, kit.css:555-564): the step slider's track, filler and handle with the label left and\n * the number right inside the track. origin \"start\" fills from the left; \"center\" fills out from a zero mark. Drag,\n * click, arrow keys (Shift = ×10); double-click resets. `onStart` fires once before a gesture's first change (one undo step).\n */\nexport function ValueSlider({\n label, value, min = 0, max = 100, origin = \"start\", reset, format = String, onChange, onStart, disabled, className,\n}: {\n label: string; value: number; min?: number; max?: number; origin?: \"start\" | \"center\"; reset?: number; format?: (v: number) => string;\n onChange: (v: number) => void; onStart?: () => void; disabled?: boolean; className?: string;\n}) {\n const ref = React.useRef<HTMLDivElement | null>(null);\n const [drag, setDrag] = React.useState(false);\n const span = max - min || 1;\n const clamp = (v: number) => Math.max(min, Math.min(max, Math.round(v)));\n const pct = (value - min) / span;\n const at = (clientX: number) => {\n const r = ref.current!.getBoundingClientRect();\n return clamp(min + Math.min(Math.max((clientX - r.left - 6) / (r.width - 12), 0), 1) * span);\n };\n const z = origin === \"center\" ? 0.5 : 0;\n const a = Math.min(z, pct);\n const b = Math.max(z, pct);\n const move = drag ? \"\" : \"transition-[left,width,transform] duration-[120ms] motion-reduce:transition-none\";\n return (\n <div\n ref={ref}\n role=\"slider\"\n tabIndex={disabled ? -1 : 0}\n aria-label={label}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-valuetext={format(value)}\n aria-disabled={disabled || undefined}\n data-slot=\"kit-value-slider\"\n onPointerDown={(e) => {\n if (disabled) return;\n onStart?.();\n setDrag(true);\n trackDrag(e, (x) => onChange(at(x)), () => setDrag(false));\n }}\n onKeyDown={(e) => {\n if (disabled) return;\n const d = ({ ArrowRight: 1, ArrowUp: 1, ArrowLeft: -1, ArrowDown: -1 } as Record<string, number>)[e.key];\n if (!d) return;\n e.preventDefault();\n onStart?.();\n onChange(clamp(value + d * (e.shiftKey ? 10 : 1)));\n }}\n onDoubleClick={() => {\n if (disabled) return;\n onStart?.();\n onChange(reset ?? (origin === \"center\" ? clamp((min + max) / 2) : min));\n }}\n className={cn(TRACK, \"flex items-center justify-between px-2.5\", disabled ? \"cursor-default opacity-45\" : \"cursor-ew-resize\", FOCUS, className)}\n >\n <span aria-hidden className={cn(\"absolute inset-y-0 bg-kit-insp-track-fill\", origin === \"start\" && \"rounded-l-[6px]\", move)} style={{ left: `calc(${a} * (100% - 12px) + ${a ? 6 : 0}px)`, width: `calc(${b - a} * (100% - 12px) + ${a ? 0 : 6}px)` }} />\n {origin === \"center\" ? <span aria-hidden className=\"absolute inset-y-0 left-1/2 w-px bg-kit-insp-line-strong\" /> : null}\n <span className=\"pointer-events-none relative z-[1] text-[12px] font-medium leading-4 text-kit-insp-tip-body\">{label}</span>\n <span className=\"pointer-events-none relative z-[1] text-[12px] font-medium leading-4 tabular-nums text-kit-insp-tip-title\">{format(value)}</span>\n <span aria-hidden className={cn(HANDLE, \"z-[2]\", move, drag && \"scale-[1.08]\")} style={{ left: `calc(${pct} * (100% - 12px) + 6px)` }} />\n </div>\n );\n}\n\n/* ── Toggles ────────────────────────────────────────────────────────── */\n\n/** The prototype switch (ui.jsx:132-141, editor.css:242-251): 34×20 (sm 28×16), inset-shadow track, grey knob with a\n * 1px grip line. `deco` draws it inside another control (a menu row): no button, hidden from assistive tech. */\nexport function InspectorSwitch({\n on, onChange, size = \"md\", label, disabled, deco, className, \"aria-labelledby\": labelledBy,\n}: { on: boolean; onChange?: (on: boolean) => void; size?: \"sm\" | \"md\"; label?: string; disabled?: boolean; deco?: boolean; className?: string; \"aria-labelledby\"?: string }) {\n const sm = size === \"sm\";\n const track = cn(\n \"relative block shrink-0 rounded-full p-0 shadow-[inset_0_1px_2px_rgb(0_0_0/0.25),inset_0_-1px_0.5px_rgb(255_255_255/0.2)] transition-colors duration-150\",\n sm ? \"h-4 w-7\" : \"h-5 w-[34px]\",\n on ? \"bg-kit-insp-switch-on\" : \"bg-kit-insp-switch-off\",\n className,\n );\n const knob = (\n <span\n className={cn(\n \"absolute left-0.5 top-0.5 grid place-items-center rounded-full bg-kit-insp-switch-knob shadow-[0_1px_2px_rgb(0_0_0/0.25)] transition-transform duration-150 ease-[cubic-bezier(0.3,0.7,0.2,1)] motion-reduce:transition-none\",\n sm ? \"size-3\" : \"size-4\",\n on && (sm ? \"translate-x-3\" : \"translate-x-3.5\"),\n )}\n >\n <i className={cn(\"block w-px rounded-[0.5px] bg-kit-insp-switch-knob-mark\", sm ? \"h-1.5\" : \"h-2\")} />\n </span>\n );\n if (deco) return <span aria-hidden data-slot=\"kit-insp-switch\" className={track}>{knob}</span>;\n return (\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={on}\n aria-label={labelledBy ? undefined : label}\n aria-labelledby={labelledBy}\n disabled={disabled}\n data-slot=\"kit-insp-switch\"\n onClick={(e) => {\n e.stopPropagation();\n onChange?.(!on);\n }}\n className={cn(track, \"cursor-pointer disabled:cursor-default disabled:opacity-40\", FOCUS, \"focus-visible:outline-offset-2\")}\n >\n {knob}\n </button>\n );\n}\n\n/** Toggle row (kit.jsx:241-243; styles.css:286-289, editor.css:445-447): label + supporting text left, switch right,\n * top-aligned. */\nexport function ToggleRow({\n label, desc, on, onChange, disabled, className,\n}: { label: string; desc?: React.ReactNode; on: boolean; onChange: (on: boolean) => void; disabled?: boolean; className?: string }) {\n const id = React.useId();\n return (\n <div data-slot=\"kit-toggle-row\" className={cn(\"flex items-start justify-between gap-4\", className)}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-1 leading-[18px]\">\n <b id={id} className=\"text-[13px] font-medium tracking-[-0.1625px] text-kit-insp-ink\">{label}</b>\n {desc ? <small className=\"text-[12px] leading-[18px] tracking-[-0.12px] text-kit-insp-quiet\">{desc}</small> : null}\n </div>\n <InspectorSwitch on={on} onChange={onChange} disabled={disabled} aria-labelledby={id} />\n </div>\n );\n}\n\n/** Related toggles share ONE grey card (kit.jsx:245, kit.css:84-85): #F5F5F5, radius 8, 12 padding, rows 14 apart. */\nexport function ToggleCard({ className, children, ...rest }: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div data-slot=\"kit-toggle-card\" className={cn(\"flex flex-col gap-3.5 rounded-[8px] bg-kit-insp-card p-3\", className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/* ── Item list card ─────────────────────────────────────────────────── */\n\n/** The grey item list card (styles.css:200-201; faq.css:86): radius 12, 12/8/8 padding, rows in a 0-gap list, then the\n * Add button and the note, 4 apart. Pass <ItemRow>s as children, `add` and `note` below them. */\nexport function ItemListCard({\n add, note, listRef, className, children, ...rest\n}: React.HTMLAttributes<HTMLDivElement> & { add?: React.ReactNode; note?: React.ReactNode; listRef?: React.Ref<HTMLDivElement> }) {\n return (\n <div data-slot=\"kit-item-card\" className={cn(\"flex min-w-0 flex-col gap-1 overflow-hidden rounded-[12px] bg-kit-insp-card px-2 pb-2 pt-3\", className)} {...rest}>\n <div ref={listRef} role=\"list\" data-slot=\"kit-item-list\" className=\"flex min-w-0 flex-col\">\n {children}\n </div>\n {add}\n {note}\n </div>\n );\n}\n\nexport const ITEM_ROW_CLASS = \"group/li flex h-[46px] w-full min-w-0 cursor-pointer items-center gap-1 rounded-[6px] py-1 pl-0.5 pr-1 text-left transition-colors hover:bg-kit-insp-row-hover\";\nexport const ITEM_ROW_GRIP_CLASS = \"grid size-7 shrink-0 cursor-grab touch-none place-items-center rounded-[6px] text-kit-insp-quiet active:cursor-grabbing\";\nexport const ITEM_ROW_MORE_CLASS = \"grid size-7 shrink-0 place-items-center rounded-[6px] text-kit-insp-label transition-colors hover:bg-kit-insp-row-press aria-expanded:bg-kit-insp-row-press data-[popup-open]:bg-kit-insp-row-press\";\nexport const ITEM_ROW_TITLE_CLASS = \"truncate text-[13px] font-medium leading-[18px] tracking-[-0.1625px] text-kit-insp-ink\";\nexport const ITEM_ROW_SUB_CLASS = \"truncate text-[11.5px] leading-[14px] text-kit-insp-sub\";\n\nexport interface ItemRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n title: React.ReactNode;\n /** second line; `empty` is shown, quieter, when there is none */\n sub?: React.ReactNode;\n empty?: React.ReactNode;\n /** opens the item (the title area is the button) */\n onOpen?: () => void;\n /** aria-label of the open button */\n openLabel?: string;\n /** props for the drag grip (a host's sortable handle); omit to hide the grip */\n grip?: React.ButtonHTMLAttributes<HTMLButtonElement> | false;\n /** before the title: a thumbnail or a section icon */\n leading?: React.ReactNode;\n /** after the title: a tag or a quiet meta */\n tag?: React.ReactNode;\n meta?: React.ReactNode;\n /** the ⋯ control (a MenuTrigger using ITEM_ROW_MORE_CLASS), or props for a plain button */\n more?: React.ReactNode;\n /** 44 high (page outline rows) */\n compact?: boolean;\n dragging?: boolean;\n /** a row is being dragged over this one: the 2px violet line on its top edge */\n over?: boolean;\n error?: boolean;\n selected?: boolean;\n}\n\n/** One row of the item list card (styles.css:202-214, 258-261): 46 high, grip 28, title 13/18 medium over an 11.5/14\n * sub-line, ⋯ 28. Hover greys the row; `over` draws the drop line; `dragging` fades it. */\nexport function ItemRow({\n title, sub, empty, onOpen, openLabel, grip, leading, tag, meta, more, compact, dragging, over, error, selected, className, ...rest\n}: ItemRowProps) {\n const text = (\n <span className={cn(\"flex min-w-0 flex-col px-1.5 py-1\", compact ? \"flex-initial\" : \"flex-1\")}>\n <b className={cn(ITEM_ROW_TITLE_CLASS, error && \"text-kit-insp-delete-fg\")}>{title}</b>\n {sub || empty ? <small className={cn(ITEM_ROW_SUB_CLASS, !sub && \"text-kit-insp-faint\")}>{sub || empty}</small> : null}\n </span>\n );\n return (\n <div\n role=\"listitem\"\n data-slot=\"kit-item-row\"\n data-selected={selected || undefined}\n className={cn(ITEM_ROW_CLASS, compact && \"h-11\", dragging && \"opacity-40\", over && \"shadow-[inset_0_2px_0_var(--kit-insp-accent)]\", selected && \"bg-kit-insp-token-chip\", className)}\n {...rest}\n >\n {grip === false || grip === undefined ? null : (\n <button type=\"button\" aria-label=\"Drag to reorder\" title=\"Drag to reorder\" {...grip} className={cn(ITEM_ROW_GRIP_CLASS, FOCUS, grip.className)}>\n <IconGripVertical aria-hidden className=\"size-4\" stroke={1.6} />\n </button>\n )}\n {onOpen ? (\n <button type=\"button\" onClick={onOpen} aria-label={openLabel} className={cn(\"flex h-[38px] min-w-0 flex-1 items-center gap-2 rounded-[6px] text-left\", FOCUS)}>\n {leading}\n {text}\n </button>\n ) : (\n <span className=\"flex h-[38px] min-w-0 flex-1 items-center gap-2\">\n {leading}\n {text}\n </span>\n )}\n {tag ? <span className=\"flex min-h-5 shrink-0 items-center whitespace-nowrap rounded-[4px] bg-kit-insp-chip px-1.5 text-[10.5px] font-medium leading-4 text-kit-insp-note\">{tag}</span> : null}\n {meta ? <span className=\"shrink-0 whitespace-nowrap pr-1.5 text-[11.5px] text-kit-insp-sub\">{meta}</span> : null}\n {more}\n </div>\n );\n}\n\n/** A plain ⋯ button for an ItemRow whose menu the host opens itself. */\nexport function ItemRowMore({ label, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & { label: string }) {\n return (\n <button type=\"button\" aria-label={label} aria-haspopup=\"menu\" {...rest} className={cn(ITEM_ROW_MORE_CLASS, FOCUS, className)}>\n <IconDots aria-hidden className=\"size-4\" stroke={1.6} />\n </button>\n );\n}\n\nexport const ITEM_LIST_ADD_CLASS =\n \"h-10 w-full shrink-0 rounded-[6px] bg-kit-insp-btn text-[13px] font-medium leading-[18px] tracking-[-0.1625px] text-kit-insp-ink transition-[background-color,transform] duration-150 hover:bg-kit-insp-btn-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:bg-kit-insp-btn-off disabled:text-kit-insp-faint disabled:active:scale-100 aria-disabled:cursor-not-allowed aria-disabled:bg-kit-insp-btn-off aria-disabled:text-kit-insp-faint data-[popup-open]:bg-kit-insp-btn-on motion-reduce:transition-none motion-reduce:active:scale-100\";\n\n/** The Add button inside the card (styles.css:215-217, faq.css:96-97, page.css:11): full width, 40 high. */\nexport function ItemListAdd({ className, children, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement>) {\n return (\n <button type=\"button\" data-slot=\"kit-item-add\" {...rest} className={cn(ITEM_LIST_ADD_CLASS, FOCUS, className)}>\n {children}\n </button>\n );\n}\n\n/** The card's note line, in the prototype's words (inspector.jsx:254): \"3 of 6 questions. Drag to reorder.\" ·\n * \"6 of 6 questions. Remove one to add another.\" · \"3 questions. Drag to reorder.\" */\nexport function itemListNote(count: number, noun: string, max?: number | null, opts?: { sortable?: boolean }): string {\n const tail = opts?.sortable === false ? \"\" : \" Drag to reorder.\";\n if (max != null) return `${count} of ${max} ${noun}s.${count >= max ? \" Remove one to add another.\" : tail}`;\n return `${count} ${noun}${count === 1 ? \"\" : \"s\"}.${tail}`;\n}\n\n/** The note under the Add button (styles.css:218): 12/18, 4 padding. */\nexport function ItemListNote({ className, children, ...rest }: React.HTMLAttributes<HTMLParagraphElement>) {\n return (\n <p data-slot=\"kit-item-note\" className={cn(\"m-0 p-1 text-[12px] leading-[18px] tracking-[-0.15px] text-kit-insp-note\", className)} {...rest}>\n {children}\n </p>\n );\n}\n\n/* ── Item delete ────────────────────────────────────────────────────── */\n\nexport const ITEM_DELETE_CLASS =\n \"inline-flex h-8 items-center gap-1.5 self-start rounded-[6px] bg-kit-insp-delete-bg px-3 text-[13px] font-medium text-kit-insp-delete-fg transition-[background-color,transform] duration-150 hover:bg-kit-insp-delete-bg-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-kit-insp-delete-bg disabled:active:scale-100 motion-reduce:transition-none motion-reduce:active:scale-100\";\n\n/**\n * The red \"Delete <noun>\" that ends an item screen (inspector.jsx:663, faq.css:48-49, kit.css:183). When it cannot run\n * (the list is at its minimum) pass `reason`: the button is disabled and the reason is its title and description.\n */\nexport function ItemDeleteButton({\n noun, reason, icon, className, children, ...rest\n}: React.ButtonHTMLAttributes<HTMLButtonElement> & { noun?: string; reason?: string; icon?: React.ReactNode }) {\n const id = React.useId();\n return (\n <>\n <button type=\"button\" data-slot=\"kit-item-delete\" disabled={!!reason || rest.disabled} title={reason} aria-describedby={reason ? id : undefined} {...rest} className={cn(ITEM_DELETE_CLASS, FOCUS, className)}>\n {icon}\n {children ?? `Delete ${noun ?? \"item\"}`}\n </button>\n {reason ? <span id={id} className=\"sr-only\">{reason}</span> : null}\n </>\n );\n}\n\n/** The quiet ⓘ after a label, 16 box with a 14 glyph (kit.css:445-446), for hosts that draw their own label row. */\nexport function InfoGlyph({ className }: { className?: string }) {\n return <IconInfoCircle aria-hidden className={cn(\"size-3.5\", className)} stroke={1.6} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,iBAAiB;CAAC;CAAM;CAAG;CAAM;AAAC;AAC/C,IAAM,OAAO;CAAE,MA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,CAAC,CAAC,UAAU,KAAK;EAAU,OAAO;EAAQ,oBAAkB,SAAS,KAAK,KAAA;EAAW,GAAI;EAAM,WAAW,GAAG,mBAAmB,OAAO,SAAS;EAA5M,UAAA,CACG,MACA,YAAY,UAAU,QAAQ,QACzB;CACP,CAAA,GAAA,SAAS,oBAAC,QAAD;EAAU;EAAI,WAAU;EAAW,UAAA;CAAa,CAAA,IAAI,IAC9D,EAAA,CAAA;AAEN;;AAGA,SAAgB,UAAU,EAAE,aAAqC;CAC/D,OAAO,oBAAC,gBAAD;EAAgB,eAAA;EAAY,WAAW,GAAG,YAAY,SAAS;EAAG,QAAQ;CAAM,CAAA;AACzF"}
1
+ {"version":3,"file":"inspector.js","names":[],"sources":["../../src/ui/inspector.tsx"],"sourcesContent":["/**\n * Inspector foundation · V1.6: the Visual Editor inspector's own building blocks, as prototype editor-v16 draws them\n * (src/kit.jsx:59-250, kit.css:1-100, styles.css:153-218 + 286-289, editor.css:242-251 + 411-461, faq.css:48-49).\n *\n * <InspectorBody> groups stacked 32 apart, 24/16/32 padding, a 1px divider 20 under every group but the last\n * <InspectorGroup> one group: header, then its fields 16 below\n * <GroupHeader> Content tab group: 14/20 medium title + 13/18 supporting line\n * <SectionHeader> Design / Settings group: 16 icon + 14/20 medium, trailing Reset · Locked · collapse chevron\n * <InspectorFields> stacked fields 20 apart (`rows`: inline rows 12 apart)\n * <InlineRow> label left, control right in a fixed 194 column\n * <InspectorSeg> segmented control with the sliding pill\n * <SelectCompact> / <SelectField> / <ColourSelect> grey field selects (32 compact, 34 full width)\n * <StepSlider> / <StepRow> / <ValueSlider> the stop slider and the value-inside slider\n * <ToggleRow> / <ToggleCard> / <InspectorSwitch> label-left switch rows, related ones in one grey card\n * <ItemListCard> + <ItemRow> + <ItemListAdd> + <ItemListNote> the grey item list card\n * <ItemDeleteButton> the red \"Delete <noun>\" that ends an item screen\n * <InspectorField> + <FieldCounter> label row with the focus dot, the sweep, and the n / max counter\n *\n * Editor-scoped: these read the --kit-insp-* roles (tokens.css) and nothing else in the kit draws them unless a host\n * asks (`KitLookProvider look=\"v16\"` for the engine). Every other kit consumer keeps the V2 look.\n */\nimport * as React from \"react\";\nimport { IconCheck, IconChevronDown, IconDots, IconGripVertical, IconInfoCircle, IconLock } from \"@tabler/icons-react\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { cn } from \"../lib/cn\";\nimport { Menu, MenuContent, MenuItem, MenuLabel, MenuSeparator, MenuTrigger } from \"./overlay\";\nimport { InfoTooltip } from \"./tooltip-card\";\nimport { useKitReducedMotion } from \"../lib/reduced-motion\";\n\n/** The prototype's accordion curve (kit.jsx:60 ACC) and its sliding-pill spring (kit.jsx:59 PILL). */\nexport const INSPECTOR_EASE = [0.22, 1, 0.36, 1] as const;\nconst PILL = { type: \"spring\", stiffness: 520, damping: 40, mass: 0.8 } as const;\nconst FOCUS = \"outline-none focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-kit-insp-accent\";\n\n/* ── Body, group, fields, divider ───────────────────────────────────── */\n\n/** Panel body (kit.css:6-8). `sub` = a drill-in screen (16 on top instead of 24). */\nexport function InspectorBody({ sub, className, children, ...rest }: React.HTMLAttributes<HTMLDivElement> & { sub?: boolean }) {\n return (\n <div\n data-slot=\"kit-insp-body\"\n className={cn(\n \"flex min-w-0 flex-col gap-8 px-4 pb-8\",\n sub ? \"pt-4\" : \"pt-6\",\n \"[&>[data-slot=kit-insp-group]:not(:last-child)]:border-b [&>[data-slot=kit-insp-group]:not(:last-child)]:border-kit-insp-divider [&>[data-slot=kit-insp-group]:not(:last-child)]:pb-5\",\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\n/** One group in the body (kit.css:9, 13, 36). `locked` greys its fields and makes them read-only; `flash` runs the\n * 1.2s violet flash a jump-to-group ends with. */\nexport function InspectorGroup({\n locked, flash, className, children, ...rest\n}: React.HTMLAttributes<HTMLElement> & { locked?: boolean; flash?: boolean }) {\n return (\n <section\n data-slot=\"kit-insp-group\"\n data-locked={locked || undefined}\n className={cn(\"flex min-w-0 flex-col gap-4\", flash && \"animate-[kit-insp-group-flash_1.2s_ease] motion-reduce:animate-none\", className)}\n {...rest}\n >\n {children}\n </section>\n );\n}\n\n/** The fields of a group (kit.css:10-11): 20 apart, or 12 for a run of inline rows. */\nexport function InspectorFields({ rows, className, children, ...rest }: React.HTMLAttributes<HTMLDivElement> & { rows?: boolean }) {\n return (\n <div data-slot=\"kit-insp-fields\" className={cn(\"flex min-w-0 flex-col\", rows ? \"gap-3\" : \"gap-5\", className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/** The 1px rule between groups, for a host that stacks groups outside <InspectorBody> (kit.css:8). */\nexport function InspectorDivider({ className }: { className?: string }) {\n return <div role=\"separator\" data-slot=\"kit-insp-divider\" className={cn(\"h-px w-full shrink-0 bg-kit-insp-divider\", className)} />;\n}\n\n/** Fields a role cannot edit (kit.css:36-37): one disabled fieldset at .45. */\nexport function InspectorLocked({ on, children }: { on?: boolean; children: React.ReactNode }) {\n if (!on) return <>{children}</>;\n return (\n <fieldset disabled aria-disabled=\"true\" data-slot=\"kit-insp-locked\" className=\"m-0 flex min-w-0 flex-col gap-[inherit] border-0 p-0 opacity-45 [&_*]:!cursor-default\">\n {children}\n </fieldset>\n );\n}\n\n/* ── Headers ────────────────────────────────────────────────────────── */\n\nexport interface GroupHeaderProps {\n title: React.ReactNode;\n /** supporting line under the title */\n sub?: React.ReactNode;\n /** trailing controls (link, comment, ⋯) */\n actions?: React.ReactNode;\n /** id of the title element, for aria-labelledby on the group */\n titleId?: string;\n className?: string;\n}\n\n/** Level-1 content group header (kit.jsx:66-68, kit.css:16-19; the inspector's ink is insp.css:19-20). */\nexport function GroupHeader({ title, sub, actions, titleId, className }: GroupHeaderProps) {\n return (\n <div data-slot=\"kit-group-header\" className={cn(\"flex items-start gap-2\", className)}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <h3 id={titleId} className=\"text-[14px] font-medium leading-5 tracking-[-0.2px] text-kit-group-title\">{title}</h3>\n {sub ? <p className=\"text-[13px] leading-[18px] tracking-[-0.16px] text-kit-group-sub\">{sub}</p> : null}\n </div>\n {actions}\n </div>\n );\n}\n\nexport interface SectionHeaderProps {\n /** 16px leading glyph */\n icon?: React.ReactNode;\n title: React.ReactNode;\n /** what sits at the end of the row */\n trailing?: \"reset\" | \"locked\" | \"collapse\";\n onReset?: () => void;\n /** the Reset is shown but inert (a read-only panel, a locked section, a save in flight) */\n resetDisabled?: boolean;\n /** with trailing=\"collapse\" */\n open?: boolean;\n onToggle?: () => void;\n /** description, always 4 under the title row */\n desc?: React.ReactNode;\n /** extra trailing content, before the Reset / chevron */\n actions?: React.ReactNode;\n titleId?: string;\n /** aria-controls for the collapse button */\n controls?: string;\n className?: string;\n}\n\n/** Design / Settings group header (kit.jsx:72-91, kit.css:22-33). Static unless trailing=\"collapse\". */\nexport function SectionHeader({ icon, title, trailing, onReset, resetDisabled, open, onToggle, desc, actions, titleId, controls, className }: SectionHeaderProps) {\n const row = (\n <>\n <span id={titleId} className=\"flex min-w-0 items-center gap-1.5 text-[14px] font-medium leading-5 text-kit-insp-title [&>svg]:size-4 [&>svg]:shrink-0 [&>img]:size-4 [&>img]:shrink-0\">\n {icon}\n <span className=\"truncate\">{title}</span>\n </span>\n <span className=\"flex-1\" />\n {trailing === \"locked\" ? (\n <span className=\"inline-flex items-center gap-1 text-[13px] text-kit-insp-faint\">\n <IconLock aria-hidden className=\"size-3.5\" stroke={1.8} />\n Locked\n </span>\n ) : null}\n {trailing === \"collapse\" ? (\n <span aria-hidden className={cn(\"grid text-kit-insp-desc transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none\", open && \"rotate-180\")}>\n <IconChevronDown className=\"size-4\" stroke={1.6} />\n </span>\n ) : null}\n </>\n );\n return (\n <div data-slot=\"kit-section-header\" className={cn(\"flex flex-col gap-1\", className)}>\n {trailing === \"collapse\" ? (\n <div className=\"flex min-h-6 w-full items-center gap-1.5\">\n <button type=\"button\" aria-expanded={!!open} aria-controls={controls} onClick={onToggle} className={cn(\"flex min-h-6 min-w-0 flex-1 items-center gap-1.5 rounded-[4px] text-left\", FOCUS)}>\n {row}\n </button>\n {actions}\n </div>\n ) : (\n <div className=\"flex min-h-6 w-full items-center gap-1.5\">\n {row}\n {actions}\n {trailing === \"reset\" ? (\n <button\n type=\"button\"\n onClick={onReset}\n disabled={resetDisabled}\n aria-label={typeof title === \"string\" ? `Reset ${title}` : undefined}\n className={cn(\"rounded-[4px] px-0.5 text-[13px] text-kit-insp-quiet transition-colors enabled:hover:text-kit-insp-ink disabled:cursor-default disabled:opacity-50\", FOCUS)}\n >\n Reset\n </button>\n ) : null}\n </div>\n )}\n {desc ? <p className=\"m-0 text-[13px] leading-[18px] tracking-[-0.16px] text-kit-insp-desc\">{desc}</p> : null}\n </div>\n );\n}\n\n/** The quiet note under a group's fields (insp.css:32 `.adv-note`): 12/16 in the sub colour. */\nexport function InspectorNote({ id, className, children }: { id?: string; className?: string; children: React.ReactNode }) {\n return (\n <p id={id} data-slot=\"kit-insp-note\" className={cn(\"m-0 text-[12px] leading-4 text-kit-group-sub\", className)}>\n {children}\n </p>\n );\n}\n\n/* Layout option glyphs (kit.jsx:121-135 `LAYOUT_SVG`, `LayoutOpt`): every layout choice shows a 14 glyph before its label. */\nexport const LAYOUT_GLYPHS = {\n centred: <path d=\"M4 6h16M8 12h8M6 18h12\" />,\n left: <path d=\"M4 6h16M4 12h10M4 18h14\" />,\n stacked: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M4 12h16\" />\n </>\n ),\n two: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M12 4v16\" />\n </>\n ),\n three: (\n <>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"1\" />\n <path d=\"M9 3v18M15 3v18\" />\n </>\n ),\n split: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M15 4v16\" />\n </>\n ),\n formLeft: (\n <>\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"2\" />\n <path d=\"M9 4v16\" />\n </>\n ),\n row: (\n <>\n <path d=\"M4 4v16M20 4v16\" />\n <rect x=\"9\" y=\"6\" width=\"6\" height=\"12\" rx=\"2\" />\n </>\n ),\n grid: (\n <>\n <rect x=\"4\" y=\"4\" width=\"6\" height=\"6\" rx=\"1\" />\n <rect x=\"14\" y=\"4\" width=\"6\" height=\"6\" rx=\"1\" />\n <rect x=\"4\" y=\"14\" width=\"6\" height=\"6\" rx=\"1\" />\n <rect x=\"14\" y=\"14\" width=\"6\" height=\"6\" rx=\"1\" />\n </>\n ),\n scroll: (\n <>\n <rect x=\"7\" y=\"5\" width=\"10\" height=\"14\" rx=\"1\" />\n <path d=\"M22 17h-1a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h1M2 17h1a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H2\" />\n </>\n ),\n} as const;\nexport type LayoutGlyphName = keyof typeof LAYOUT_GLYPHS;\n/** A layout glyph, then the option's label: `<LayoutOpt i=\"two\">Two columns</LayoutOpt>`. */\nexport function LayoutOpt({ i, children }: { i: LayoutGlyphName; children?: React.ReactNode }) {\n return (\n <>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden className=\"shrink-0\">\n {LAYOUT_GLYPHS[i]}\n </svg>\n {children}\n </>\n );\n}\n\n/** Collapsible body for a SectionHeader with trailing=\"collapse\" (kit.jsx:248-252): height, then a 4px rise out of a\n * 4px blur, both on the accordion curve. Instant with reduced motion. */\nexport function InspectorCollapse({ open, id, rows, className, children }: { open: boolean; id?: string; rows?: boolean; className?: string; children: React.ReactNode }) {\n const reduce = useKitReducedMotion();\n const t = { duration: reduce ? 0 : 0.3, ease: INSPECTOR_EASE };\n return (\n <AnimatePresence initial={false}>\n {open ? (\n <motion.div key=\"c\" id={id} data-slot=\"kit-insp-collapse\" initial={{ height: 0 }} animate={{ height: \"auto\" }} exit={{ height: 0 }} transition={t} className=\"min-w-0 overflow-hidden\">\n <motion.div\n initial={reduce ? false : { opacity: 0, y: -4, filter: \"blur(4px)\" }}\n animate={{ opacity: 1, y: 0, filter: \"blur(0px)\" }}\n exit={reduce ? undefined : { opacity: 0, y: -4, filter: \"blur(4px)\" }}\n transition={t}\n className={cn(\"flex min-w-0 flex-col\", rows ? \"gap-3\" : \"gap-5\", className)}\n >\n {children}\n </motion.div>\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n}\n\n/* ── Field label, focus dot, sweep, counter ─────────────────────────── */\n\nexport interface InspectorFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n label: React.ReactNode;\n /** id for the label element (aria-labelledby on the control) */\n labelId?: string;\n htmlFor?: string;\n /** the info tooltip after the label: its body text */\n info?: React.ReactNode;\n /** right side of the label row (counter, actions) */\n meta?: React.ReactNode;\n /** P-FDOT: this is the field a canvas click opened. Draws the 6px violet dot after the label. */\n current?: boolean;\n /** P-FDOT: run the violet sweep once (change the value to run it again, e.g. a click counter) */\n flash?: boolean | number | string;\n /** over its limit / invalid: the footer turns red */\n state?: \"over\" | \"bad\";\n /** under the control: hint left, counter right */\n hint?: React.ReactNode;\n counter?: React.ReactNode;\n}\n\n/**\n * The inspector field shell (editor.css:411-431, kit.css:506-515): label row 13/16 medium, min 20 high, the control 8\n * under it, then an optional 12/16 footer. `current` puts the focus dot after the label (order: label · dot · spacer ·\n * meta); `flash` runs the left-to-right violet sweep behind the whole field (a plain fade with reduced motion).\n */\nexport function InspectorField({ label, labelId, htmlFor, info, meta, current, flash, state, hint, counter, className, children, ...rest }: InspectorFieldProps) {\n const labelCls = \"flex min-h-5 items-center gap-1.5 text-[13px] font-medium leading-4 text-kit-insp-label\";\n const labelInner = (\n <>\n {label}\n {info ? <InfoTooltip title={label}>{info}</InfoTooltip> : null}\n {current ? <FocusDot /> : null}\n <span className=\"flex-1\" />\n {meta}\n </>\n );\n return (\n <div\n data-slot=\"kit-insp-field\"\n data-cur={current || undefined}\n data-state={state}\n className={cn(\"relative flex min-w-0 flex-col gap-2 rounded-[4px]\", flash ? \"isolate\" : null, className)}\n {...rest}\n >\n {flash ? <FieldSweep key={String(flash)} /> : null}\n {htmlFor ? (\n <label id={labelId} htmlFor={htmlFor} data-slot=\"kit-insp-label\" className={labelCls}>{labelInner}</label>\n ) : (\n <div id={labelId} data-slot=\"kit-insp-label\" className={labelCls}>{labelInner}</div>\n )}\n {children}\n {hint || counter ? (\n <div data-slot=\"kit-insp-field-foot\" className={cn(\"flex justify-between gap-3 text-[12px] leading-4\", state === \"over\" ? \"text-kit-insp-error\" : \"text-kit-insp-faint\")}>\n <span className=\"min-w-0\">{hint}</span>\n {counter}\n </div>\n ) : null}\n </div>\n );\n}\n\n/** The 6px violet dot after a field's label while it is the one a canvas click opened (kit.css:513-515). */\nexport function FocusDot({ className }: { className?: string }) {\n return <span aria-hidden data-slot=\"kit-focus-dot\" className={cn(\"size-1.5 shrink-0 rounded-full bg-kit-insp-accent animate-[kit-insp-dot_0.24s_cubic-bezier(0.2,0.8,0.2,1)_both] motion-reduce:animate-none\", className)} />;\n}\n\n/** The soft violet fill that sweeps across a field a canvas click opened (kit.css:506-511). Sits behind the field, 6/8\n * outside it; the parent must be `relative isolate`. */\nexport function FieldSweep({ className }: { className?: string }) {\n return (\n <span\n aria-hidden\n data-slot=\"kit-field-sweep\"\n className={cn(\n \"pointer-events-none absolute -inset-x-2 -inset-y-1.5 -z-10 rounded-[6px] bg-linear-to-r/srgb from-kit-insp-flash-a via-kit-insp-flash-b via-55% to-kit-insp-flash-c\",\n \"[clip-path:inset(0_100%_0_0_round_6px)] animate-[kit-insp-sweep_1.4s_cubic-bezier(0.4,0,0.2,1)_forwards]\",\n \"motion-reduce:[clip-path:none] motion-reduce:animate-[kit-insp-fade_1.6s_ease_forwards]\",\n className,\n )}\n />\n );\n}\n\n/** How close a count is to its limit, by the prototype's rule (state.js:93 countLevel): \"near\" above 91% of the\n * limit, \"over\" past it. */\nexport function counterState(n: number, max?: number): \"ok\" | \"near\" | \"over\" {\n if (!max) return \"ok\";\n return n > max ? \"over\" : n > Math.floor(max * 0.91) ? \"near\" : \"ok\";\n}\n\n/** The 12px progress ring beside a counter that is near or over its limit (content.jsx:307-309, content.css:617): a\n * grey track, an amber arc that fills with the count, red when over. Springs in and out (wrap it in AnimatePresence). */\nexport function CountRing({ value, max, className }: { value: number; max: number; className?: string }) {\n const reduce = useKitReducedMotion(); // a host <MotionConfig reducedMotion=\"always\"> stops it too\n const r = 4.5;\n const c = 2 * Math.PI * r;\n const over = value > max;\n return (\n <motion.svg\n aria-hidden\n data-slot=\"kit-count-ring\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n initial={reduce ? false : { scale: 0.5, opacity: 0 }}\n animate={{ scale: 1, opacity: 1 }}\n exit={reduce ? { opacity: 0 } : { scale: 0.5, opacity: 0 }}\n transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 520, damping: 22 }}\n className={cn(\"shrink-0\", className)}\n >\n <circle cx=\"6\" cy=\"6\" r={r} fill=\"none\" strokeWidth=\"2\" className=\"stroke-kit-insp-track\" />\n <circle\n cx=\"6\"\n cy=\"6\"\n r={r}\n fill=\"none\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeDasharray={`${Math.min(value / max, 1) * c} ${c}`}\n transform=\"rotate(-90 6 6)\"\n className={cn(\"transition-[stroke-dasharray,stroke] duration-200 motion-reduce:transition-none\", over ? \"stroke-kit-insp-ring-over\" : \"stroke-kit-insp-ring-near\")}\n />\n </motion.svg>\n );\n}\n\n/** The field counter \"42 / 60\" (content.jsx:310-320; content.css:614-616; insp.css:163-164): 12/16 tabular, amber and\n * medium when near the limit, red over it, with the ring beside it in both states. Without `max` it is the bare count. */\nexport function FieldCounter({ value, max, ring = true, size = 11, className }: { value: number; max?: number; ring?: boolean; /** 11/14 in the inspector (insp.css:30), 12/16 in the content editor (editor.css:425) */ size?: 11 | 12; className?: string }) {\n const s = counterState(value, max);\n return (\n <span\n data-slot=\"kit-field-counter\"\n data-state={s}\n role=\"img\"\n aria-label={max == null ? `${value} characters` : `${value} of ${max} characters`}\n className={cn(\"inline-flex shrink-0 items-center gap-1.5 tabular-nums transition-colors duration-200\", size === 11 ? \"text-[11px] leading-[14px]\" : \"text-[12px] leading-4\", s === \"near\" ? \"font-medium text-kit-insp-count-near\" : s === \"over\" ? \"font-medium text-kit-insp-count-over\" : \"text-kit-insp-faint\", className)}\n >\n <AnimatePresence initial={false}>{ring && max && s !== \"ok\" ? <CountRing key=\"r\" value={value} max={max} /> : null}</AnimatePresence>\n {max == null ? (\n value\n ) : (\n <span aria-hidden className=\"inline-flex items-center whitespace-pre\">\n <RollNumber value={value} />\n {` / ${max}`}\n </span>\n )}\n </span>\n );\n}\n\n/** A number that rolls (ui.jsx:371-378 `Roll`, faq.css:90-91), digit by digit (M20): each digit sits in its own 1ch\n * tabular cell, keyed by its place from the right, so only a digit that changed moves: the new one rises in from below\n * while the old one lifts out (transform + opacity, 160ms in, 120ms out, no blur). The number itself never remounts,\n * and fast typing never queues: the latest value is always the one entering. Reduced motion: an instant swap. */\nexport function RollNumber({ value, className }: { value: number | string; className?: string }) {\n const reduce = !!useKitReducedMotion();\n const chars = Array.from(String(value));\n return (\n <span data-slot=\"kit-roll\" className={cn(\"inline-flex tabular-nums\", className)}>\n {chars.map((ch, i) => (\n <RollDigit key={chars.length - i} ch={ch} reduce={reduce} />\n ))}\n </span>\n );\n}\n\nconst ROLL_EASE = [0.22, 1, 0.36, 1] as const;\nfunction RollDigit({ ch, reduce }: { ch: string; reduce: boolean }) {\n return (\n <span data-slot=\"kit-roll-digit\" className=\"relative inline-block w-[1ch] text-center\">\n {reduce ? (\n ch\n ) : (\n <AnimatePresence mode=\"popLayout\" initial={false}>\n <motion.span\n key={ch}\n className=\"inline-block\"\n initial={{ opacity: 0, y: \"0.5em\" }}\n animate={{ opacity: 1, y: 0, transition: { duration: 0.16, ease: ROLL_EASE } }}\n exit={{ opacity: 0, y: \"-0.5em\", transition: { duration: 0.12, ease: ROLL_EASE } }}\n >\n {ch}\n </motion.span>\n </AnimatePresence>\n )}\n </span>\n );\n}\n\n/** The line under a field that is over its limit, in the prototype's words (content.jsx:318). */\nexport const overLimitText = (max: number) => `Over the ${max}-character limit`;\n/** The red inset edge over a field's control box while its count is over the limit (content.css:618). Drawn on the\n * box's ::after, so the input's own focus border cannot hide it. The box must be `relative`. */\nexport const OVER_LIMIT_EDGE_CLASS = \"after:pointer-events-none after:absolute after:inset-0 after:rounded-[6px] after:shadow-[inset_0_0_0_1px_var(--kit-insp-ring-over)]\";\n/** One 0.32s shake as the count goes over (content.css:618-619); none under reduced motion. */\nexport const OVER_LIMIT_SHAKE_CLASS = \"motion-safe:animate-[kit-insp-shake_0.32s_ease] motion-reduce:animate-none\";\n/** The edge and the shake together, for a box that is known to have just gone over. Prefer `useOverLimit`. */\nexport const OVER_LIMIT_CLASS = `${OVER_LIMIT_EDGE_CLASS} ${OVER_LIMIT_SHAKE_CLASS}`;\n/**\n * M20: the props for a field's control box (spread them on it). The edge shows while `over`; the shake class is added\n * only when the count CROSSES the limit after mount, and leaves when its animation ends, so the shake plays once per\n * crossing: never per keystroke, and never again when the box is hidden and shown while still over. A field that\n * mounts already over shows the edge with no shake (nothing animates on first paint). Reduced motion (the OS, or a\n * host <MotionConfig reducedMotion=\"always\">): the edge only.\n */\nexport function useOverLimit(over: boolean): { className: string | undefined; onAnimationEnd: (e: React.AnimationEvent<HTMLElement>) => void } {\n const reduce = !!useKitReducedMotion();\n const [prev, setPrev] = React.useState(over);\n const [crossed, setCrossed] = React.useState(false);\n if (prev !== over) {\n setPrev(over);\n setCrossed(over);\n }\n return {\n className: over ? cn(OVER_LIMIT_EDGE_CLASS, crossed && !reduce && OVER_LIMIT_SHAKE_CLASS) : undefined,\n onAnimationEnd: (e) => {\n if (e.target === e.currentTarget && e.animationName === \"kit-insp-shake\") setCrossed(false);\n },\n };\n}\n\n/* ── Inline row ─────────────────────────────────────────────────────── */\n\n/** Label left, control right in a fixed 194 column (kit.jsx:137, kit.css:50-55, 501-502). `meta` is the quiet current\n * value after the label (\"M · 8 px\"); `info` adds the info tooltip. */\nexport function InlineRow({\n label, meta, info, labelId, className, children,\n}: { label: React.ReactNode; meta?: React.ReactNode; info?: React.ReactNode; labelId?: string; className?: string; children: React.ReactNode }) {\n return (\n <div data-slot=\"kit-inline-row\" className={cn(\"flex min-h-8 items-center gap-4\", className)}>\n <span id={labelId} className=\"inline-flex min-w-0 flex-1 items-center gap-1 whitespace-nowrap text-[13px] leading-4 text-kit-insp-label\">\n {label}\n {info ? <InfoTooltip title={label}>{info}</InfoTooltip> : null}\n {meta ? <em className=\"truncate text-[12px] not-italic tabular-nums text-kit-insp-faint\">{meta}</em> : null}\n </span>\n <div className=\"w-[194px] flex-none\">{children}</div>\n </div>\n );\n}\n\n/* ── Segmented ──────────────────────────────────────────────────────── */\n\nexport interface InspectorSegOption<T extends string> {\n value: T;\n label: React.ReactNode;\n /** tooltip + accessible name (icon-only options need it) */\n title?: string;\n}\n\n/**\n * Segmented control, 2–5 options, with the sliding pill (kit.jsx:114-120; styles.css:188-191, editor.css:287 + 458-461,\n * insp.css:61). 36 high (32 with `small` or inside an InlineRow), 2 padding, grey track, white pill on the spring.\n * A radiogroup: arrows move the choice.\n */\nexport function InspectorSeg<T extends string>({\n options, value, onChange, small, disabled, className, \"aria-label\": ariaLabel, \"aria-labelledby\": labelledBy,\n}: {\n options: InspectorSegOption<T>[]; value: T; onChange: (v: T) => void; small?: boolean; disabled?: boolean; className?: string;\n \"aria-label\"?: string; \"aria-labelledby\"?: string;\n}) {\n const id = React.useId();\n const reduce = useKitReducedMotion();\n const move = (e: React.KeyboardEvent<HTMLDivElement>) => {\n const d = e.key === \"ArrowRight\" || e.key === \"ArrowDown\" ? 1 : e.key === \"ArrowLeft\" || e.key === \"ArrowUp\" ? -1 : 0;\n if (!d || disabled) return;\n e.preventDefault();\n const at = options.findIndex((o) => o.value === value);\n // nothing selected (a value no option carries): → takes the first, ← the last\n const next = at < 0 ? options[d > 0 ? 0 : options.length - 1] : options[(at + d + options.length) % options.length];\n if (!next) return;\n onChange(next.value);\n e.currentTarget.querySelector<HTMLElement>(`[data-seg=\"${CSS.escape(next.value)}\"]`)?.focus();\n };\n return (\n <div\n role=\"radiogroup\"\n aria-label={ariaLabel}\n aria-labelledby={labelledBy}\n data-slot=\"kit-insp-seg\"\n onKeyDown={move}\n className={cn(\"flex w-full gap-0.5 rounded-[6px] bg-kit-insp-track p-0.5\", small ? \"h-8\" : \"h-9\", className)}\n >\n {options.map((o, i) => {\n const on = o.value === value;\n // with nothing selected no pill is drawn and the first radio is the tab stop\n const stop = on || (i === 0 && !options.some((x) => x.value === value));\n return (\n <button\n key={o.value}\n type=\"button\"\n role=\"radio\"\n data-seg={o.value}\n disabled={disabled}\n aria-checked={on}\n aria-label={o.title}\n title={o.title}\n tabIndex={stop ? 0 : -1}\n onClick={() => onChange(o.value)}\n className={cn(\n \"relative min-w-0 flex-1 whitespace-nowrap rounded-[4px] tracking-[-0.16px] transition-colors disabled:cursor-default\",\n small ? \"text-[12.5px]\" : \"text-[13px]\",\n on ? \"font-medium text-kit-insp-ink\" : \"text-kit-insp-desc hover:text-kit-insp-ink\",\n FOCUS,\n )}\n >\n {on ? (\n <motion.span\n layoutId={`kit-seg-${id}`}\n transition={reduce ? { duration: 0 } : PILL}\n className=\"absolute inset-0 rounded-[5px] bg-kit-insp-seg-pill shadow-[0_0_0_0.5px_var(--kit-insp-line),0_1px_1px_rgb(0_0_0/0.1),0_3px_3px_rgb(0_0_0/0.09),0_6px_4px_rgb(0_0_0/0.05),0_11px_4px_rgb(0_0_0/0.01)]\"\n />\n ) : null}\n <span className=\"relative inline-flex items-center justify-center gap-1.5 [&>svg]:size-3.5 [&>svg]:shrink-0\">{o.label}</span>\n </button>\n );\n })}\n </div>\n );\n}\n\n/* ── Selects ────────────────────────────────────────────────────────── */\n\nexport interface InspectorOption<T extends string> {\n value: T;\n label: string;\n /** second line in the menu */\n desc?: string;\n /** shown but not pickable (a choice this site cannot take) */\n disabled?: boolean;\n}\n\nconst SELECT_BASE =\n \"flex w-full items-center rounded-[6px] border border-transparent bg-kit-insp-card text-left text-[13px] leading-[18px] text-kit-insp-ink transition-colors hover:bg-kit-insp-card-hover data-[popup-open]:border-kit-insp-accent data-[popup-open]:bg-kit-insp-card-focus disabled:cursor-default\";\n\nfunction OptionItems<T extends string>({ options, value, onPick }: { options: InspectorOption<T>[]; value: T | undefined; onPick: (v: T) => void }) {\n return (\n <>\n {options.map((o) => (\n <MenuItem key={o.value} disabled={o.disabled} onClick={() => onPick(o.value)} className={o.desc ? \"h-auto py-1.5\" : undefined} aria-current={o.value === value || undefined}>\n <span className=\"flex items-center gap-2\">\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate\">{o.label}</span>\n {o.desc ? <span className=\"whitespace-normal text-[12px] leading-4 text-kit-insp-quiet\">{o.desc}</span> : null}\n </span>\n {o.value === value ? <IconCheck aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-label\" stroke={2} /> : null}\n </span>\n </MenuItem>\n ))}\n </>\n );\n}\n\n/** Compact dropdown for an Inline row (kit.jsx:140-150, kit.css:58-62): 32 high, grey, violet edge while open. The menu\n * is at least as wide as the control. */\nexport function SelectCompact<T extends string>({\n value, options, onPick, icon, label, disabled, className,\n}: { value: T | undefined; options: InspectorOption<T>[]; onPick: (v: T) => void; icon?: React.ReactNode; label: string; disabled?: boolean; className?: string }) {\n const cur = options.find((o) => o.value === value);\n return (\n <Menu>\n <MenuTrigger aria-label={label} disabled={disabled} data-slot=\"kit-select-compact\" className={cn(SELECT_BASE, \"h-8 gap-1.5 pl-2.5 pr-2\", FOCUS, className)}>\n {icon ? <span aria-hidden className=\"flex shrink-0 text-kit-insp-label [&>svg]:size-3.5\">{icon}</span> : null}\n <span className=\"min-w-0 flex-1 truncate\">{cur ? cur.label : \"Select…\"}</span>\n <IconChevronDown aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-desc\" stroke={1.6} />\n </MenuTrigger>\n <MenuContent align=\"start\" className=\"min-w-[var(--anchor-width)]\">\n <OptionItems options={options} value={value} onPick={onPick} />\n </MenuContent>\n </Menu>\n );\n}\n\n/** Full-width select with its label above (kit.jsx:153-164; editor.css:416-417, 433; faq.css:59): 34 high. */\nexport function SelectField<T extends string>({\n label, value, options, onPick, placeholder = \"Select…\", icon, info, disabled, current, flash, className,\n}: {\n label: React.ReactNode; value: T | undefined; options: InspectorOption<T>[]; onPick: (v: T) => void; placeholder?: string; icon?: React.ReactNode;\n info?: React.ReactNode; disabled?: boolean; current?: boolean; flash?: InspectorFieldProps[\"flash\"]; className?: string;\n}) {\n const id = React.useId();\n const cur = options.find((o) => o.value === value);\n return (\n <InspectorField label={label} labelId={`${id}-l`} info={info} current={current} flash={flash} className={className}>\n <Menu>\n <MenuTrigger aria-labelledby={`${id}-l ${id}-v`} disabled={disabled} data-slot=\"kit-select-field\" className={cn(SELECT_BASE, \"h-[34px] gap-2 px-2.5 tracking-[-0.1625px]\", FOCUS)}>\n {icon ? <span aria-hidden className=\"flex shrink-0 text-kit-insp-label [&>svg]:size-3.5\">{icon}</span> : null}\n <span id={`${id}-v`} className={cn(\"min-w-0 truncate\", !cur && \"text-kit-insp-faint\")}>{cur ? cur.label : placeholder}</span>\n <span className=\"flex-1\" />\n <IconChevronDown aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-desc\" stroke={1.6} />\n </MenuTrigger>\n <MenuContent align=\"start\" className=\"min-w-[var(--anchor-width)]\">\n <OptionItems options={options} value={value} onPick={onPick} />\n </MenuContent>\n </Menu>\n </InspectorField>\n );\n}\n\nexport interface ColourOption<T extends string> {\n value: T;\n label: string;\n /** the design token's name, shown in the pill (\"surface/base\") */\n token: string;\n /** any CSS colour: the swatch */\n colour: string;\n}\n\n/** Colour select (kit.jsx:219-232, kit.css:77-79): value left, swatch + token pill right; the menu lists the theme\n * colours with their tokens under a header, then an optional readability note. */\nexport function ColourSelect<T extends string>({\n label, value, options, onPick, header = \"Section background\", note = \"Text switches to light on Inverse so it stays readable (4.5:1). Colours come from your site theme.\", disabled, className,\n}: { label: React.ReactNode; value: T | undefined; options: ColourOption<T>[]; onPick: (v: T) => void; /** the menu's heading; \"\" for none */ header?: string; /** the readability note under the options; null for none */ note?: React.ReactNode; disabled?: boolean; className?: string }) {\n const id = React.useId();\n const cur = options.find((o) => o.value === value) ?? options[0];\n const swatch = (c: string) => <span aria-hidden className=\"size-3.5 shrink-0 rounded-[3px] shadow-[inset_0_0_0_1px_rgb(0_0_0/0.12)]\" style={{ background: c }} />;\n return (\n <InspectorField label={label} labelId={`${id}-l`} className={className}>\n <Menu>\n <MenuTrigger aria-labelledby={`${id}-l ${id}-v`} disabled={disabled} data-slot=\"kit-colour-select\" className={cn(SELECT_BASE, \"h-[34px] gap-2 px-2.5 tracking-[-0.1625px]\", FOCUS)}>\n <span id={`${id}-v`} className=\"shrink-0\">{cur?.label ?? \"Select…\"}</span>\n <span className=\"flex-1\" />\n {cur ? (\n <span className=\"inline-flex h-[22px] items-center gap-1.5 whitespace-nowrap rounded-[4px] bg-kit-insp-token-chip pl-1 pr-1.5 text-[12px] text-kit-insp-desc\">\n {swatch(cur.colour)}\n {cur.token}\n </span>\n ) : null}\n <IconChevronDown aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-desc\" stroke={1.6} />\n </MenuTrigger>\n <MenuContent align=\"start\" className=\"w-[300px] min-w-[var(--anchor-width)]\">\n {header ? <MenuLabel>{header}</MenuLabel> : null}\n {options.map((o) => (\n <MenuItem key={o.value} icon={swatch(o.colour)} onClick={() => onPick(o.value)} aria-current={o.value === value || undefined}>\n <span className=\"flex items-center gap-2\">\n <span className=\"min-w-0 flex-1 truncate\">{o.label}</span>\n <span className=\"shrink-0 text-[12px] text-kit-insp-quiet\">{o.token}</span>\n {o.value === value ? <IconCheck aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-label\" stroke={2} /> : null}\n </span>\n </MenuItem>\n ))}\n {note ? (\n <>\n <MenuSeparator />\n <p className=\"px-2 py-1.5 text-[12px] leading-[17px] text-kit-insp-quiet\">{note}</p>\n </>\n ) : null}\n </MenuContent>\n </Menu>\n </InspectorField>\n );\n}\n\n/* ── Sliders ────────────────────────────────────────────────────────── */\n\nconst TRACK = \"relative h-7 touch-none select-none rounded-[6px] bg-kit-insp-track shadow-[inset_0_1px_2px_rgb(0_0_0/0.06)]\";\nconst HANDLE =\n \"absolute top-1/2 -ml-[5px] -mt-[10.5px] h-[21px] w-2.5 rounded-[4px] bg-kit-insp-handle shadow-[0_0_0_0.5px_rgb(0_0_0/0.18),0_1px_2px_rgb(0_0_0/0.16),0_2px_4px_rgb(0_0_0/0.08)] after:absolute after:left-[4.5px] after:top-1.5 after:h-[9px] after:w-px after:rounded-[1px] after:bg-kit-insp-handle-mark\";\n\nfunction trackDrag(e: React.PointerEvent<HTMLElement>, onMove: (clientX: number) => void, onEnd?: () => void) {\n e.preventDefault();\n e.currentTarget.focus();\n const body = e.currentTarget.ownerDocument.body;\n const prev = body.style.cursor;\n body.style.cursor = \"ew-resize\";\n const mv = (ev: PointerEvent) => onMove(ev.clientX);\n const up = () => {\n window.removeEventListener(\"pointermove\", mv);\n window.removeEventListener(\"pointerup\", up);\n window.removeEventListener(\"pointercancel\", up);\n body.style.cursor = prev;\n onEnd?.();\n };\n window.addEventListener(\"pointermove\", mv);\n window.addEventListener(\"pointerup\", up);\n window.addEventListener(\"pointercancel\", up);\n onMove(e.clientX);\n}\n\n/** Step slider (kit.jsx:168-187, kit.css:65-73): filler + handle on the current stop, dots on the others. Click a stop,\n * drag the handle, or use the arrow keys. `value` is the stop's index. */\nexport function StepSlider({\n label, stops, value, onChange, disabled, className, \"aria-labelledby\": labelledBy,\n}: { label?: string; stops: string[]; value: number; onChange: (index: number) => void; disabled?: boolean; className?: string; \"aria-labelledby\"?: string }) {\n const ref = React.useRef<HTMLDivElement | null>(null);\n const n = stops.length;\n const last = Math.max(1, n - 1);\n const i = Math.max(0, Math.min(n - 1, value));\n const cur = React.useRef(i);\n cur.current = i;\n const pick = (clientX: number) => {\n const r = ref.current!.getBoundingClientRect();\n const x = Math.min(Math.max(clientX - r.left - 8, 0), r.width - 16);\n return Math.round(x / ((r.width - 16) / last));\n };\n const pct = i / last;\n return (\n <div\n ref={ref}\n role=\"slider\"\n tabIndex={disabled ? -1 : 0}\n aria-label={labelledBy ? undefined : label}\n aria-labelledby={labelledBy}\n aria-valuemin={0}\n aria-valuemax={n - 1}\n aria-valuenow={i}\n aria-valuetext={stops[i]}\n aria-disabled={disabled || undefined}\n data-slot=\"kit-step-slider\"\n onPointerDown={(e) => {\n if (disabled) return;\n trackDrag(e, (x) => {\n const j = pick(x);\n if (j !== cur.current) {\n cur.current = j;\n onChange(j);\n }\n });\n }}\n onKeyDown={(e) => {\n if (disabled) return;\n if (e.key === \"ArrowRight\" || e.key === \"ArrowUp\") {\n e.preventDefault();\n onChange(Math.min(n - 1, i + 1));\n }\n if (e.key === \"ArrowLeft\" || e.key === \"ArrowDown\") {\n e.preventDefault();\n onChange(Math.max(0, i - 1));\n }\n }}\n className={cn(TRACK, \"group/step\", disabled ? \"cursor-default opacity-45\" : \"cursor-pointer\", FOCUS, className)}\n >\n <span aria-hidden className=\"absolute inset-y-0 left-0 rounded-[6px] bg-kit-insp-track-fill transition-[width] duration-[180ms] ease-[cubic-bezier(0.2,0.8,0.2,1)] motion-reduce:transition-none\" style={{ width: `calc(${pct} * (100% - 16px) + 13px)` }} />\n {stops.map((s, j) => (\n <span key={j} aria-hidden title={s} className={cn(\"absolute top-1/2 -ml-[1.5px] -mt-[1.5px] size-[3px] rounded-full bg-kit-insp-track-dot transition-opacity duration-100\", j === i && \"opacity-0\")} style={{ left: `calc(${j / last} * (100% - 16px) + 8px)` }} />\n ))}\n <span aria-hidden className={cn(HANDLE, \"transition-[left,transform] duration-[180ms] ease-[cubic-bezier(0.2,0.8,0.2,1)] motion-reduce:transition-none\", !disabled && \"group-active/step:scale-[1.08]\")} style={{ left: `calc(${pct} * (100% - 16px) + 8px)` }} />\n </div>\n );\n}\n\n/** Step slider in an Inline row: label + the current stop's name on the left (kit.jsx:211-213). */\nexport function StepRow({\n label, stops, names, value, onChange, disabled, info,\n}: { label: string; stops: string[]; names?: string[]; value: number; onChange: (index: number) => void; disabled?: boolean; info?: React.ReactNode }) {\n return (\n <InlineRow label={label} meta={(names ?? stops)[value]} info={info}>\n <StepSlider label={label} stops={stops} value={value} onChange={onChange} disabled={disabled} />\n </InlineRow>\n );\n}\n\n/**\n * Value slider (kit.jsx:191-209, kit.css:555-564): the step slider's track, filler and handle with the label left and\n * the number right inside the track. origin \"start\" fills from the left; \"center\" fills out from a zero mark. Drag,\n * click, arrow keys (Shift = ×10); double-click resets. `onStart` fires once before a gesture's first change (one undo step).\n */\nexport function ValueSlider({\n label, value, min = 0, max = 100, origin = \"start\", reset, format = String, onChange, onStart, disabled, className,\n}: {\n label: string; value: number; min?: number; max?: number; origin?: \"start\" | \"center\"; reset?: number; format?: (v: number) => string;\n onChange: (v: number) => void; onStart?: () => void; disabled?: boolean; className?: string;\n}) {\n const ref = React.useRef<HTMLDivElement | null>(null);\n const [drag, setDrag] = React.useState(false);\n const span = max - min || 1;\n const clamp = (v: number) => Math.max(min, Math.min(max, Math.round(v)));\n const pct = (value - min) / span;\n const at = (clientX: number) => {\n const r = ref.current!.getBoundingClientRect();\n return clamp(min + Math.min(Math.max((clientX - r.left - 6) / (r.width - 12), 0), 1) * span);\n };\n const z = origin === \"center\" ? 0.5 : 0;\n const a = Math.min(z, pct);\n const b = Math.max(z, pct);\n const move = drag ? \"\" : \"transition-[left,width,transform] duration-[120ms] motion-reduce:transition-none\";\n return (\n <div\n ref={ref}\n role=\"slider\"\n tabIndex={disabled ? -1 : 0}\n aria-label={label}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-valuetext={format(value)}\n aria-disabled={disabled || undefined}\n data-slot=\"kit-value-slider\"\n onPointerDown={(e) => {\n if (disabled) return;\n onStart?.();\n setDrag(true);\n trackDrag(e, (x) => onChange(at(x)), () => setDrag(false));\n }}\n onKeyDown={(e) => {\n if (disabled) return;\n const d = ({ ArrowRight: 1, ArrowUp: 1, ArrowLeft: -1, ArrowDown: -1 } as Record<string, number>)[e.key];\n if (!d) return;\n e.preventDefault();\n onStart?.();\n onChange(clamp(value + d * (e.shiftKey ? 10 : 1)));\n }}\n onDoubleClick={() => {\n if (disabled) return;\n onStart?.();\n onChange(reset ?? (origin === \"center\" ? clamp((min + max) / 2) : min));\n }}\n className={cn(TRACK, \"flex items-center justify-between px-2.5\", disabled ? \"cursor-default opacity-45\" : \"cursor-ew-resize\", FOCUS, className)}\n >\n <span aria-hidden className={cn(\"absolute inset-y-0 bg-kit-insp-track-fill\", origin === \"start\" && \"rounded-l-[6px]\", move)} style={{ left: `calc(${a} * (100% - 12px) + ${a ? 6 : 0}px)`, width: `calc(${b - a} * (100% - 12px) + ${a ? 0 : 6}px)` }} />\n {origin === \"center\" ? <span aria-hidden className=\"absolute inset-y-0 left-1/2 w-px bg-kit-insp-line-strong\" /> : null}\n <span className=\"pointer-events-none relative z-[1] text-[12px] font-medium leading-4 text-kit-insp-tip-body\">{label}</span>\n <span className=\"pointer-events-none relative z-[1] text-[12px] font-medium leading-4 tabular-nums text-kit-insp-tip-title\">{format(value)}</span>\n <span aria-hidden className={cn(HANDLE, \"z-[2]\", move, drag && \"scale-[1.08]\")} style={{ left: `calc(${pct} * (100% - 12px) + 6px)` }} />\n </div>\n );\n}\n\n/* ── Toggles ────────────────────────────────────────────────────────── */\n\n/** The prototype switch (ui.jsx:132-141, editor.css:242-251): 34×20 (sm 28×16), inset-shadow track, grey knob with a\n * 1px grip line. `deco` draws it inside another control (a menu row): no button, hidden from assistive tech. */\nexport function InspectorSwitch({\n on, onChange, size = \"md\", label, disabled, deco, className, \"aria-labelledby\": labelledBy,\n}: { on: boolean; onChange?: (on: boolean) => void; size?: \"sm\" | \"md\"; label?: string; disabled?: boolean; deco?: boolean; className?: string; \"aria-labelledby\"?: string }) {\n const sm = size === \"sm\";\n const track = cn(\n \"relative block shrink-0 rounded-full p-0 shadow-[inset_0_1px_2px_rgb(0_0_0/0.25),inset_0_-1px_0.5px_rgb(255_255_255/0.2)] transition-colors duration-150\",\n sm ? \"h-4 w-7\" : \"h-5 w-[34px]\",\n on ? \"bg-kit-insp-switch-on\" : \"bg-kit-insp-switch-off\",\n className,\n );\n const knob = (\n <span\n className={cn(\n \"absolute left-0.5 top-0.5 grid place-items-center rounded-full bg-kit-insp-switch-knob shadow-[0_1px_2px_rgb(0_0_0/0.25)] transition-transform duration-150 ease-[cubic-bezier(0.3,0.7,0.2,1)] motion-reduce:transition-none\",\n sm ? \"size-3\" : \"size-4\",\n on && (sm ? \"translate-x-3\" : \"translate-x-3.5\"),\n )}\n >\n <i className={cn(\"block w-px rounded-[0.5px] bg-kit-insp-switch-knob-mark\", sm ? \"h-1.5\" : \"h-2\")} />\n </span>\n );\n if (deco) return <span aria-hidden data-slot=\"kit-insp-switch\" className={track}>{knob}</span>;\n return (\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={on}\n aria-label={labelledBy ? undefined : label}\n aria-labelledby={labelledBy}\n disabled={disabled}\n data-slot=\"kit-insp-switch\"\n onClick={(e) => {\n e.stopPropagation();\n onChange?.(!on);\n }}\n className={cn(track, \"cursor-pointer disabled:cursor-default disabled:opacity-40\", FOCUS, \"focus-visible:outline-offset-2\")}\n >\n {knob}\n </button>\n );\n}\n\n/** Toggle row (kit.jsx:241-243; styles.css:286-289, editor.css:445-447): label + supporting text left, switch right,\n * top-aligned. */\nexport function ToggleRow({\n label, desc, on, onChange, disabled, className,\n}: { label: string; desc?: React.ReactNode; on: boolean; onChange: (on: boolean) => void; disabled?: boolean; className?: string }) {\n const id = React.useId();\n return (\n <div data-slot=\"kit-toggle-row\" className={cn(\"flex items-start justify-between gap-4\", className)}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-1 leading-[18px]\">\n <b id={id} className=\"text-[13px] font-medium tracking-[-0.1625px] text-kit-insp-ink\">{label}</b>\n {desc ? <small className=\"text-[12px] leading-[18px] tracking-[-0.12px] text-kit-insp-quiet\">{desc}</small> : null}\n </div>\n <InspectorSwitch on={on} onChange={onChange} disabled={disabled} aria-labelledby={id} />\n </div>\n );\n}\n\n/** Related toggles share ONE grey card (kit.jsx:245, kit.css:84-85): #F5F5F5, radius 8, 12 padding, rows 14 apart. */\nexport function ToggleCard({ className, children, ...rest }: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div data-slot=\"kit-toggle-card\" className={cn(\"flex flex-col gap-3.5 rounded-[8px] bg-kit-insp-card p-3\", className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/* ── Item list card ─────────────────────────────────────────────────── */\n\n/** The grey item list card (styles.css:200-201; faq.css:86): radius 12, 12/8/8 padding, rows in a 0-gap list, then the\n * Add button and the note, 4 apart. Pass <ItemRow>s as children, `add` and `note` below them. */\nexport function ItemListCard({\n add, note, listRef, className, children, ...rest\n}: React.HTMLAttributes<HTMLDivElement> & { add?: React.ReactNode; note?: React.ReactNode; listRef?: React.Ref<HTMLDivElement> }) {\n return (\n <div data-slot=\"kit-item-card\" className={cn(\"flex min-w-0 flex-col gap-1 overflow-hidden rounded-[12px] bg-kit-insp-card px-2 pb-2 pt-3\", className)} {...rest}>\n <div ref={listRef} role=\"list\" data-slot=\"kit-item-list\" className=\"flex min-w-0 flex-col\">\n {children}\n </div>\n {add}\n {note}\n </div>\n );\n}\n\nexport const ITEM_ROW_CLASS = \"group/li flex h-[46px] w-full min-w-0 cursor-pointer items-center gap-1 rounded-[6px] py-1 pl-0.5 pr-1 text-left transition-colors hover:bg-kit-insp-row-hover\";\nexport const ITEM_ROW_GRIP_CLASS = \"grid size-7 shrink-0 cursor-grab touch-none place-items-center rounded-[6px] text-kit-insp-quiet active:cursor-grabbing\";\nexport const ITEM_ROW_MORE_CLASS = \"grid size-7 shrink-0 place-items-center rounded-[6px] text-kit-insp-label transition-colors hover:bg-kit-insp-row-press aria-expanded:bg-kit-insp-row-press data-[popup-open]:bg-kit-insp-row-press\";\nexport const ITEM_ROW_TITLE_CLASS = \"truncate text-[13px] font-medium leading-[18px] tracking-[-0.1625px] text-kit-insp-ink\";\nexport const ITEM_ROW_SUB_CLASS = \"truncate text-[11.5px] leading-[14px] text-kit-insp-sub\";\n\nexport interface ItemRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n title: React.ReactNode;\n /** second line; `empty` is shown, quieter, when there is none */\n sub?: React.ReactNode;\n empty?: React.ReactNode;\n /** opens the item (the title area is the button) */\n onOpen?: () => void;\n /** aria-label of the open button */\n openLabel?: string;\n /** props for the drag grip (a host's sortable handle); omit to hide the grip */\n grip?: React.ButtonHTMLAttributes<HTMLButtonElement> | false;\n /** before the title: a thumbnail or a section icon */\n leading?: React.ReactNode;\n /** after the title: a tag or a quiet meta */\n tag?: React.ReactNode;\n meta?: React.ReactNode;\n /** the ⋯ control (a MenuTrigger using ITEM_ROW_MORE_CLASS), or props for a plain button */\n more?: React.ReactNode;\n /** 44 high (page outline rows) */\n compact?: boolean;\n dragging?: boolean;\n /** a row is being dragged over this one: the 2px violet line on its top edge */\n over?: boolean;\n error?: boolean;\n selected?: boolean;\n}\n\n/** One row of the item list card (styles.css:202-214, 258-261): 46 high, grip 28, title 13/18 medium over an 11.5/14\n * sub-line, ⋯ 28. Hover greys the row; `over` draws the drop line; `dragging` fades it. */\nexport function ItemRow({\n title, sub, empty, onOpen, openLabel, grip, leading, tag, meta, more, compact, dragging, over, error, selected, className, ...rest\n}: ItemRowProps) {\n const text = (\n <span className={cn(\"flex min-w-0 flex-col px-1.5 py-1\", compact ? \"flex-initial\" : \"flex-1\")}>\n <b className={cn(ITEM_ROW_TITLE_CLASS, error && \"text-kit-insp-delete-fg\")}>{title}</b>\n {sub || empty ? <small className={cn(ITEM_ROW_SUB_CLASS, !sub && \"text-kit-insp-faint\")}>{sub || empty}</small> : null}\n </span>\n );\n return (\n <div\n role=\"listitem\"\n data-slot=\"kit-item-row\"\n data-selected={selected || undefined}\n className={cn(ITEM_ROW_CLASS, compact && \"h-11\", dragging && \"opacity-40\", over && \"shadow-[inset_0_2px_0_var(--kit-insp-accent)]\", selected && \"bg-kit-insp-token-chip\", className)}\n {...rest}\n >\n {grip === false || grip === undefined ? null : (\n <button type=\"button\" aria-label=\"Drag to reorder\" title=\"Drag to reorder\" {...grip} className={cn(ITEM_ROW_GRIP_CLASS, FOCUS, grip.className)}>\n <IconGripVertical aria-hidden className=\"size-4\" stroke={1.6} />\n </button>\n )}\n {onOpen ? (\n <button type=\"button\" onClick={onOpen} aria-label={openLabel} className={cn(\"flex h-[38px] min-w-0 flex-1 items-center gap-2 rounded-[6px] text-left\", FOCUS)}>\n {leading}\n {text}\n </button>\n ) : (\n <span className=\"flex h-[38px] min-w-0 flex-1 items-center gap-2\">\n {leading}\n {text}\n </span>\n )}\n {tag ? <span className=\"flex min-h-5 shrink-0 items-center whitespace-nowrap rounded-[4px] bg-kit-insp-chip px-1.5 text-[10.5px] font-medium leading-4 text-kit-insp-note\">{tag}</span> : null}\n {meta ? <span className=\"shrink-0 whitespace-nowrap pr-1.5 text-[11.5px] text-kit-insp-sub\">{meta}</span> : null}\n {more}\n </div>\n );\n}\n\n/** A plain ⋯ button for an ItemRow whose menu the host opens itself. */\nexport function ItemRowMore({ label, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & { label: string }) {\n return (\n <button type=\"button\" aria-label={label} aria-haspopup=\"menu\" {...rest} className={cn(ITEM_ROW_MORE_CLASS, FOCUS, className)}>\n <IconDots aria-hidden className=\"size-4\" stroke={1.6} />\n </button>\n );\n}\n\nexport const ITEM_LIST_ADD_CLASS =\n \"h-10 w-full shrink-0 rounded-[6px] bg-kit-insp-btn text-[13px] font-medium leading-[18px] tracking-[-0.1625px] text-kit-insp-ink transition-[background-color,transform] duration-150 hover:bg-kit-insp-btn-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:bg-kit-insp-btn-off disabled:text-kit-insp-faint disabled:active:scale-100 aria-disabled:cursor-not-allowed aria-disabled:bg-kit-insp-btn-off aria-disabled:text-kit-insp-faint data-[popup-open]:bg-kit-insp-btn-on motion-reduce:transition-none motion-reduce:active:scale-100\";\n\n/** The Add button inside the card (styles.css:215-217, faq.css:96-97, page.css:11): full width, 40 high. */\nexport function ItemListAdd({ className, children, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement>) {\n return (\n <button type=\"button\" data-slot=\"kit-item-add\" {...rest} className={cn(ITEM_LIST_ADD_CLASS, FOCUS, className)}>\n {children}\n </button>\n );\n}\n\n/** The card's note line, in the prototype's words (inspector.jsx:254): \"3 of 6 questions. Drag to reorder.\" ·\n * \"6 of 6 questions. Remove one to add another.\" · \"3 questions. Drag to reorder.\" */\nexport function itemListNote(count: number, noun: string, max?: number | null, opts?: { sortable?: boolean }): string {\n const tail = opts?.sortable === false ? \"\" : \" Drag to reorder.\";\n if (max != null) return `${count} of ${max} ${noun}s.${count >= max ? \" Remove one to add another.\" : tail}`;\n return `${count} ${noun}${count === 1 ? \"\" : \"s\"}.${tail}`;\n}\n\n/** The note under the Add button (styles.css:218): 12/18, 4 padding. */\nexport function ItemListNote({ className, children, ...rest }: React.HTMLAttributes<HTMLParagraphElement>) {\n return (\n <p data-slot=\"kit-item-note\" className={cn(\"m-0 p-1 text-[12px] leading-[18px] tracking-[-0.15px] text-kit-insp-note\", className)} {...rest}>\n {children}\n </p>\n );\n}\n\n/* ── Item delete ────────────────────────────────────────────────────── */\n\nexport const ITEM_DELETE_CLASS =\n \"inline-flex h-8 items-center gap-1.5 self-start rounded-[6px] bg-kit-insp-delete-bg px-3 text-[13px] font-medium text-kit-insp-delete-fg transition-[background-color,transform] duration-150 hover:bg-kit-insp-delete-bg-hover active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-kit-insp-delete-bg disabled:active:scale-100 motion-reduce:transition-none motion-reduce:active:scale-100\";\n\n/**\n * The red \"Delete <noun>\" that ends an item screen (inspector.jsx:663, faq.css:48-49, kit.css:183). When it cannot run\n * (the list is at its minimum) pass `reason`: the button is disabled and the reason shows under it (its description).\n */\nexport function ItemDeleteButton({\n noun, reason, icon, className, children, ...rest\n}: React.ButtonHTMLAttributes<HTMLButtonElement> & { noun?: string; reason?: string; icon?: React.ReactNode }) {\n const id = React.useId();\n return (\n <>\n <button type=\"button\" data-slot=\"kit-item-delete\" disabled={!!reason || rest.disabled} title={reason} aria-describedby={reason ? id : undefined} {...rest} className={cn(ITEM_DELETE_CLASS, FOCUS, className)}>\n {icon}\n {children ?? `Delete ${noun ?? \"item\"}`}\n </button>\n {/* the reason it is off is on screen under the button, not only in a tooltip (no silent refusal) */}\n {reason ? <p id={id} className=\"mt-1.5 text-[12px] leading-4 text-kit-insp-faint\">{reason}</p> : null}\n </>\n );\n}\n\n/** The quiet ⓘ after a label, 16 box with a 14 glyph (kit.css:445-446), for hosts that draw their own label row. */\nexport function InfoGlyph({ className }: { className?: string }) {\n return <IconInfoCircle aria-hidden className={cn(\"size-3.5\", className)} stroke={1.6} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAa,iBAAiB;CAAC;CAAM;CAAG;CAAM;AAAC;AAC/C,IAAM,OAAO;CAAE,MAAM;CAAU,WAAW;CAAK,SAAS;CAAI,MAAM;AAAI;AACtE,IAAM,QAAQ;;AAKd,SAAgB,cAAc,EAAE,KAAK,WAAW,UAAU,GAAG,QAAkE;CAC7H,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,yCACA,MAAM,SAAS,QACf,yLACA,SACF;EACA,GAA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,SAAgB,aAAa,OAAe,MAAc,KAAqB,MAAuC;CACpH,MAAM,OAAO,MAAM,aAAa,QAAQ,KAAK;CAC7C,IAAI,OAAO,MAAM,OAAO,GAAG,MAAM,MAAM,IAAI,GAAG,KAAK,IAAI,SAAS,MAAM,gCAAgC;CACtG,OAAO,GAAG,MAAM,GAAG,OAAO,UAAU,IAAI,KAAK,IAAI,GAAG;AACtD;;AAGA,SAAgB,aAAa,EAAE,WAAW,UAAU,GAAG,QAAoD;CACzG,OACE,oBAAC,KAAD;EAAG,aAAU;EAAgB,WAAW,GAAG,4EAA4E,SAAS;EAAG,GAAI;EACpI;CACA,CAAA;AAEP;AAIA,IAAa,oBACX;;;;;AAMF,SAAgB,iBAAiB,EAC/B,MAAM,QAAQ,MAAM,WAAW,UAAU,GAAG,QACiE;CAC7G,MAAM,KAAK,MAAM,MAAM;CACvB,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,qBAAC,UAAD;EAAQ,MAAK;EAAS,aAAU;EAAkB,UAAU,CAAC,CAAC,UAAU,KAAK;EAAU,OAAO;EAAQ,oBAAkB,SAAS,KAAK,KAAA;EAAW,GAAI;EAAM,WAAW,GAAG,mBAAmB,OAAO,SAAS;EAA5M,UAAA,CACG,MACA,YAAY,UAAU,QAAQ,QACzB;CAEP,CAAA,GAAA,SAAS,oBAAC,KAAD;EAAO;EAAI,WAAU;EAAoD,UAAA;CAAU,CAAA,IAAI,IACjG,EAAA,CAAA;AAEN;;AAGA,SAAgB,UAAU,EAAE,aAAqC;CAC/D,OAAO,oBAAC,gBAAD;EAAgB,eAAA;EAAY,WAAW,GAAG,YAAY,SAAS;EAAG,QAAQ;CAAM,CAAA;AACzF"}
@@ -162,12 +162,12 @@ var V16_SHORTCUT = "ml-4 text-[12px] leading-4 tracking-[0.02em] text-kit-insp-f
162
162
  function MenuItem({ className, icon, shortcut, danger, children, ...props }) {
163
163
  const v16 = useKitLook() === "v16";
164
164
  return /* @__PURE__ */ jsxs(Menu$1.Item, {
165
- className: cn(itemCls, v16 && V16_ITEM, danger && "text-kit-danger-fg data-[highlighted]:bg-kit-danger-soft [&>svg]:text-kit-danger-fg", className),
165
+ className: cn(itemCls, v16 && V16_ITEM, props.disabled && "h-auto min-h-8 py-1.5", danger && "text-kit-danger-fg data-[highlighted]:bg-kit-danger-soft [&>svg]:text-kit-danger-fg", className),
166
166
  ...props,
167
167
  children: [
168
168
  icon,
169
169
  /* @__PURE__ */ jsx("span", {
170
- className: "min-w-0 flex-1 truncate",
170
+ className: cn("min-w-0 flex-1", props.disabled ? "whitespace-normal [overflow-wrap:anywhere]" : "truncate"),
171
171
  children
172
172
  }),
173
173
  shortcut ? /* @__PURE__ */ jsx("span", {