@bettercms-ai/kit 3.2.0 → 4.1.1

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 (135) hide show
  1. package/dist/adapters/lossy.d.ts +4 -0
  2. package/dist/adapters/lossy.js +4 -0
  3. package/dist/adapters/lossy.js.map +1 -1
  4. package/dist/adapters/prod-types.d.ts +4 -0
  5. package/dist/adapters/prod-types.js +4 -1
  6. package/dist/adapters/prod-types.js.map +1 -1
  7. package/dist/adapters/schema.js +7 -0
  8. package/dist/adapters/schema.js.map +1 -1
  9. package/dist/context.d.ts +81 -4
  10. package/dist/context.js +58 -1
  11. package/dist/context.js.map +1 -1
  12. package/dist/controls/choice.d.ts +1 -1
  13. package/dist/controls/choice.js +21 -2
  14. package/dist/controls/choice.js.map +1 -1
  15. package/dist/controls/index.d.ts +1 -0
  16. package/dist/controls/index.js +3 -2
  17. package/dist/controls/index.js.map +1 -1
  18. package/dist/controls/link.d.ts +23 -2
  19. package/dist/controls/link.js +456 -4
  20. package/dist/controls/link.js.map +1 -1
  21. package/dist/controls/media-v16.d.ts +27 -0
  22. package/dist/controls/media-v16.js +261 -0
  23. package/dist/controls/media-v16.js.map +1 -0
  24. package/dist/controls/media.js +63 -1
  25. package/dist/controls/media.js.map +1 -1
  26. package/dist/controls/reference-services.d.ts +8 -0
  27. package/dist/controls/reference.js +78 -2
  28. package/dist/controls/reference.js.map +1 -1
  29. package/dist/controls/rich-text/ai-runs.d.ts +13 -0
  30. package/dist/controls/rich-text/ai-runs.js +71 -0
  31. package/dist/controls/rich-text/ai-runs.js.map +1 -0
  32. package/dist/controls/rich-text/block-tool.d.ts +31 -0
  33. package/dist/controls/rich-text/block-tool.js +62 -0
  34. package/dist/controls/rich-text/block-tool.js.map +1 -0
  35. package/dist/controls/rich-text/blocks.d.ts +6 -1
  36. package/dist/controls/rich-text/blocks.js +404 -24
  37. package/dist/controls/rich-text/blocks.js.map +1 -1
  38. package/dist/controls/rich-text/catalog.d.ts +21 -6
  39. package/dist/controls/rich-text/catalog.js +312 -23
  40. package/dist/controls/rich-text/catalog.js.map +1 -1
  41. package/dist/controls/rich-text/code-head.d.ts +30 -0
  42. package/dist/controls/rich-text/code-head.js +230 -0
  43. package/dist/controls/rich-text/code-head.js.map +1 -0
  44. package/dist/controls/rich-text/codec.d.ts +3 -3
  45. package/dist/controls/rich-text/codec.js +3 -1
  46. package/dist/controls/rich-text/codec.js.map +1 -1
  47. package/dist/controls/rich-text/control.d.ts +1 -1
  48. package/dist/controls/rich-text/control.js +11 -29
  49. package/dist/controls/rich-text/control.js.map +1 -1
  50. package/dist/controls/rich-text/dom.d.ts +27 -0
  51. package/dist/controls/rich-text/dom.js +69 -4
  52. package/dist/controls/rich-text/dom.js.map +1 -1
  53. package/dist/controls/rich-text/editor.js +212 -50
  54. package/dist/controls/rich-text/editor.js.map +1 -1
  55. package/dist/controls/rich-text/ops.js +1 -0
  56. package/dist/controls/rich-text/ops.js.map +1 -1
  57. package/dist/controls/rich-text/slash-preview.d.ts +8 -0
  58. package/dist/controls/rich-text/slash-preview.js +287 -0
  59. package/dist/controls/rich-text/slash-preview.js.map +1 -0
  60. package/dist/controls/rich-text/table-grid.d.ts +22 -0
  61. package/dist/controls/rich-text/table-grid.js +1052 -0
  62. package/dist/controls/rich-text/table-grid.js.map +1 -0
  63. package/dist/controls/rich-text/toolbar.js +60 -18
  64. package/dist/controls/rich-text/toolbar.js.map +1 -1
  65. package/dist/controls/text.d.ts +6 -0
  66. package/dist/controls/text.js +95 -5
  67. package/dist/controls/text.js.map +1 -1
  68. package/dist/core/facets.d.ts +1 -0
  69. package/dist/core/facets.js +1 -0
  70. package/dist/core/facets.js.map +1 -1
  71. package/dist/engine/array.d.ts +7 -0
  72. package/dist/engine/array.js +164 -45
  73. package/dist/engine/array.js.map +1 -1
  74. package/dist/engine/expand.d.ts +1 -1
  75. package/dist/engine/expand.js +1 -1
  76. package/dist/engine/expand.js.map +1 -1
  77. package/dist/engine/field-shell.d.ts +12 -0
  78. package/dist/engine/field-shell.js +217 -63
  79. package/dist/engine/field-shell.js.map +1 -1
  80. package/dist/engine/frame.js +39 -2
  81. package/dist/engine/frame.js.map +1 -1
  82. package/dist/engine/grouping.d.ts +71 -10
  83. package/dist/engine/grouping.js +223 -26
  84. package/dist/engine/grouping.js.map +1 -1
  85. package/dist/engine/held.d.ts +2 -2
  86. package/dist/engine/held.js +2 -2
  87. package/dist/engine/held.js.map +1 -1
  88. package/dist/engine/kit-field.d.ts +0 -10
  89. package/dist/engine/kit-field.js +40 -72
  90. package/dist/engine/kit-field.js.map +1 -1
  91. package/dist/engine/schema-form.js +7 -2
  92. package/dist/engine/schema-form.js.map +1 -1
  93. package/dist/index.d.ts +1 -1
  94. package/dist/index.js +14 -7
  95. package/dist/index.js.map +1 -1
  96. package/dist/kit.css +85 -0
  97. package/dist/schema/table.d.ts +2 -1
  98. package/dist/schema/table.js +5 -0
  99. package/dist/schema/table.js.map +1 -1
  100. package/dist/schema/types.d.ts +6 -0
  101. package/dist/schema/types.js.map +1 -1
  102. package/dist/styles.css +1 -1
  103. package/dist/theme.css +115 -0
  104. package/dist/tokens.css +268 -0
  105. package/dist/ui/block-icon-picker.d.ts +38 -0
  106. package/dist/ui/block-icon-picker.js +141 -0
  107. package/dist/ui/block-icon-picker.js.map +1 -0
  108. package/dist/ui/button.js +1 -0
  109. package/dist/ui/button.js.map +1 -1
  110. package/dist/ui/code-language-menu.d.ts +24 -0
  111. package/dist/ui/code-language-menu.js +123 -0
  112. package/dist/ui/code-language-menu.js.map +1 -0
  113. package/dist/ui/content-fields.d.ts +47 -0
  114. package/dist/ui/content-fields.js +278 -0
  115. package/dist/ui/content-fields.js.map +1 -0
  116. package/dist/ui/foundations.d.ts +118 -0
  117. package/dist/ui/foundations.js +564 -0
  118. package/dist/ui/foundations.js.map +1 -0
  119. package/dist/ui/index.d.ts +6 -0
  120. package/dist/ui/index.js +7 -1
  121. package/dist/ui/inspector.d.ts +394 -0
  122. package/dist/ui/inspector.js +1173 -0
  123. package/dist/ui/inspector.js.map +1 -0
  124. package/dist/ui/overlay.d.ts +7 -2
  125. package/dist/ui/overlay.js +55 -20
  126. package/dist/ui/overlay.js.map +1 -1
  127. package/dist/ui/shortcut-hint.js +1 -1
  128. package/dist/ui/shortcut-hint.js.map +1 -1
  129. package/dist/ui/toast.d.ts +5 -3
  130. package/dist/ui/toast.js +83 -11
  131. package/dist/ui/toast.js.map +1 -1
  132. package/dist/ui/tooltip-card.d.ts +45 -0
  133. package/dist/ui/tooltip-card.js +135 -0
  134. package/dist/ui/tooltip-card.js.map +1 -0
  135. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foundations.js","names":[],"sources":["../../src/ui/foundations.tsx"],"sourcesContent":["/**\n * FOUNDATIONS · V1.6 (prototype editor-v16 `Btn`, `Checkbox`, `StatusIcon`, `Badge`, `ProBadge`, `TextField`, `Popover`,\n * `ButtonStylePicker`, `SearchClear`, save status; kit.jsx:9-43, 255-296; ui.jsx:332-345, 393-398; foundations.css;\n * kit.css:112-131; shellx.css:2-16, 199-204; faq.css:99-101).\n *\n * New names, so nothing of the stock kit changes: the kit's own `Button`, `Checkbox`, `Badge` and `Input` stay as they\n * are. Colours are `--kit-insp-*` tokens (tokens.css). Every part is presentational: the host owns the state.\n *\n * <FoundationButton variant size icon> primary (ink) or secondary (grey), 28 / 32 / 34 high\n * <FoundationCheckbox on mixed onChange label> 16, radius 4, violet when on, a dash when mixed\n * <StatusIcon kind size> a 10% tint disc with a tick or an exclamation mark\n * <FoundationBadge tone dot size> 20 (24) high tag with a 5 tone dot\n * <ProBadge /> <BcmsMark size /> the white \"PRO\" pill with the gradient mark\n * <FoundationTextField icon error /> 34 high grey field, violet focus ring, red edge on error\n * <SearchClear show onClear /> the 16 round × that fades in when a search field has text\n * <SaveStatus state onRetry /> Saved · Saving… · Couldn’t save · Retry · Offline\n * <InspectorPopover anchor onClose label> anchored panel: 6 under the anchor, flips above, 8 from the edges\n * <ButtonStylePicker anchor value onPick> \"Button style\": five radio rows with a live button preview\n */\nimport * as React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { motion, useReducedMotion } from \"framer-motion\";\nimport { cn } from \"../lib/cn\";\n\nconst FOCUS_HALO = \"focus-visible:shadow-[0_0_0_3px_color-mix(in_srgb,var(--kit-insp-accent)_30%,transparent)]\";\n\n/* ── Button (F1569) ───────────────────────────────────────────────── */\nexport interface FoundationButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: \"primary\" | \"secondary\";\n /** sm 28 · md 32 (default) · lg 34, beside a 34 high field */\n size?: \"sm\" | \"md\" | \"lg\";\n icon?: React.ReactNode;\n}\nexport const FoundationButton = React.forwardRef<HTMLButtonElement, FoundationButtonProps>(function FoundationButton(\n { variant = \"primary\", size = \"md\", icon, className, children, type = \"button\", ...rest },\n ref,\n) {\n return (\n <button\n ref={ref}\n type={type}\n data-slot=\"kit-fbtn\"\n className={cn(\n \"inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-[6px] font-medium outline-none transition-[background-color,color,opacity] duration-150\",\n size === \"sm\" ? \"h-7 px-2.5 text-[12px]\" : size === \"lg\" ? \"h-[34px] px-3.5 text-[13px]\" : \"h-8 px-3 text-[13px]\",\n variant === \"primary\"\n ? \"bg-kit-insp-tip-title text-kit-insp-tip-bg enabled:hover:bg-kit-insp-ink disabled:opacity-35\"\n : \"bg-kit-insp-card text-kit-insp-tip-title enabled:hover:bg-kit-insp-divider disabled:text-kit-insp-faint\",\n FOCUS_HALO,\n className,\n )}\n {...rest}\n >\n {icon}\n {children}\n </button>\n );\n});\n\n/* ── Checkbox (F1570) ─────────────────────────────────────────────── */\nexport function FoundationCheckbox({\n on, mixed, disabled, onChange, label, className, \"aria-labelledby\": labelledBy,\n}: { on?: boolean; mixed?: boolean; disabled?: boolean; onChange?: (on: boolean) => void; label?: string; className?: string; \"aria-labelledby\"?: string }) {\n const filled = !!on || !!mixed;\n return (\n <button\n type=\"button\"\n role=\"checkbox\"\n aria-checked={mixed ? \"mixed\" : !!on}\n aria-label={label}\n aria-labelledby={labelledBy}\n disabled={disabled}\n data-slot=\"kit-fcb\"\n onClick={(e) => {\n e.stopPropagation();\n onChange?.(!on);\n }}\n className={cn(\n \"grid size-4 shrink-0 place-items-center rounded-[4px] outline-none transition-[background-color,box-shadow] duration-150 disabled:cursor-not-allowed disabled:opacity-40\",\n filled\n ? \"bg-kit-insp-accent-fg focus-visible:shadow-[0_0_0_3px_color-mix(in_srgb,var(--kit-insp-accent-fg)_20%,transparent)]\"\n : \"bg-kit-insp-tip-bg shadow-[inset_0_0_0_1.5px_var(--kit-insp-line-strong)] focus-visible:shadow-[0_0_0_3px_color-mix(in_srgb,var(--kit-insp-accent-fg)_20%,transparent),inset_0_0_0_1.5px_var(--kit-insp-line-strong)]\",\n className,\n )}\n >\n {filled ? (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden>\n {mixed ? <path d=\"M4.5 8h7\" stroke=\"#fff\" strokeWidth=\"1.8\" strokeLinecap=\"round\" /> : <path d=\"M3.6 8.3l2.7 2.7l6-6.2\" stroke=\"#fff\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />}\n </svg>\n ) : null}\n </button>\n );\n}\n\n/* ── Status icon (F1571) ──────────────────────────────────────────── */\nexport function StatusIcon({ kind = \"success\", size = 14, className }: { kind?: \"success\" | \"error\"; size?: number; className?: string }) {\n const tint = kind === \"success\" ? \"var(--kit-insp-ok-tint)\" : \"var(--kit-insp-err-tint)\";\n const ink = kind === \"success\" ? \"var(--kit-insp-ok)\" : \"var(--kit-insp-err)\";\n return (\n <svg width={size} height={size} viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden className={cn(\"shrink-0\", className)}>\n <circle cx=\"7\" cy=\"7\" r=\"7\" fill={tint} />\n {kind === \"success\" ? (\n <path d=\"M4.4 7.2 6.2 9 9.7 5.3\" stroke={ink} strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n ) : (\n <>\n <path d=\"M7 4.2v3.4\" stroke={ink} strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n <path d=\"M7 9.8h.01\" stroke={ink} strokeWidth=\"1.9\" strokeLinecap=\"round\" />\n </>\n )}\n </svg>\n );\n}\n\n/* ── Badge (F1572) ────────────────────────────────────────────────── */\nexport type FoundationBadgeTone = \"gray\" | \"green\" | \"amber\" | \"red\" | \"blue\" | \"violet\" | \"outline\";\nconst BADGE_TONE: Record<FoundationBadgeTone, { box: string; dot: string }> = {\n gray: { box: \"bg-kit-insp-card text-kit-insp-tip-body\", dot: \"bg-kit-group-sub\" },\n green: { box: \"bg-[var(--kit-insp-badge-green)] text-[var(--kit-insp-badge-green-fg)]\", dot: \"bg-[var(--kit-insp-badge-green-dot)]\" },\n amber: { box: \"bg-[var(--kit-insp-badge-amber)] text-kit-insp-count-near\", dot: \"bg-[var(--kit-insp-badge-amber-dot)]\" },\n red: { box: \"bg-kit-insp-delete-bg text-kit-insp-count-over\", dot: \"bg-kit-insp-ring-over\" },\n blue: { box: \"bg-kit-insp-card text-kit-insp-tip-body\", dot: \"bg-[var(--kit-insp-badge-blue-dot)]\" },\n violet: { box: \"bg-kit-insp-card text-kit-insp-tip-body\", dot: \"bg-kit-insp-accent\" },\n outline: { box: \"bg-kit-insp-tip-bg text-kit-insp-tip-body shadow-[inset_0_0_0_1px_var(--kit-insp-line)]\", dot: \"bg-kit-group-sub\" },\n};\nexport function FoundationBadge({\n tone = \"gray\", dot = true, size = \"sm\", className, children,\n}: { tone?: FoundationBadgeTone; dot?: boolean; size?: \"sm\" | \"md\"; className?: string; children: React.ReactNode }) {\n const t = BADGE_TONE[tone];\n return (\n <span\n data-slot=\"kit-fbadge\"\n className={cn(\"inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[12px] font-medium leading-4\", size === \"md\" ? \"h-6 rounded-[6px] pl-2 pr-2.5\" : \"h-5 rounded-[4px] pl-1.5 pr-2\", t.box, className)}\n >\n {dot ? <i aria-hidden className={cn(\"size-[5px] rounded-full\", t.dot)} /> : null}\n {children}\n </span>\n );\n}\n\n/* ── PRO badge (F1576) ────────────────────────────────────────────── */\nexport function BcmsMark({ size = 10 }: { size?: number }) {\n const id = React.useId();\n return (\n <svg width={size} height={(size * 28) / 24} viewBox=\"0 0 24 28\" fill=\"none\" aria-hidden>\n <defs>\n <linearGradient id={id} x1=\"8.8\" y1=\"-2.8\" x2=\"18.9\" y2=\"29.1\" gradientUnits=\"userSpaceOnUse\">\n <stop offset=\".08\" stopColor=\"#A878D2\" />\n <stop offset=\".48\" stopColor=\"#ED6262\" />\n <stop offset=\".92\" stopColor=\"#D13A3A\" />\n </linearGradient>\n </defs>\n <path fill={`url(#${id})`} d=\"M12.76 27L1.51 20.09A3.1 3.1 0 0 1 0 17.4V8.6c0-1.15.62-2.21 1.63-2.77L9.59 1.4a3.2 3.2 0 0 1 2.92-.09l11.32 5.43-9.48 5.42a2.8 2.8 0 0 0-1.6 2.75V27z\" />\n <path fill={`url(#${id})`} d=\"M14.34 16.02v2.85l7.88-5.01c.91-.58 1.47-1.59 1.47-2.67V8.3l-7.89 5.06a3.2 3.2 0 0 0-1.46 2.66zM14.34 22.26v2.85l7.88-5.01c.91-.58 1.47-1.59 1.47-2.67v-2.89l-7.89 5.06a3.2 3.2 0 0 0-1.46 2.66z\" />\n </svg>\n );\n}\nexport function ProBadge({ className }: { className?: string }) {\n return (\n <span data-slot=\"kit-fpro\" className={cn(\"inline-flex h-5 shrink-0 items-center gap-1 rounded-full bg-kit-insp-tip-bg pl-[5px] pr-[7px] text-[10px] font-semibold leading-3 text-kit-insp-tip-body shadow-[inset_0_0_0_1px_var(--kit-insp-line)]\", className)}>\n <BcmsMark size={10} />\n PRO\n </span>\n );\n}\n\n/* ── Text field (F1577) ───────────────────────────────────────────── */\nexport interface FoundationTextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n icon?: React.ReactNode;\n error?: boolean;\n /** after the input: a `SearchClear`, a unit */\n trailing?: React.ReactNode;\n boxClassName?: string;\n}\nexport const FoundationTextField = React.forwardRef<HTMLInputElement, FoundationTextFieldProps>(function FoundationTextField(\n { icon, error, trailing, boxClassName, className, ...rest },\n ref,\n) {\n return (\n <label\n data-slot=\"kit-fin\"\n className={cn(\n \"flex h-[34px] min-w-0 flex-1 items-center gap-2 rounded-[6px] px-2.5 text-kit-insp-faint transition-[background-color,box-shadow] duration-150 [&>svg]:size-4 [&>svg]:shrink-0\",\n error\n ? \"bg-kit-insp-tip-bg shadow-[inset_0_0_0_1px_var(--kit-insp-error)]\"\n : \"bg-kit-insp-card focus-within:bg-kit-insp-tip-bg focus-within:shadow-[inset_0_0_0_1px_var(--kit-insp-accent),0_0_0_3px_color-mix(in_srgb,var(--kit-insp-accent)_15%,transparent)]\",\n boxClassName,\n )}\n >\n {icon}\n <input\n ref={ref}\n aria-invalid={error || undefined}\n className={cn(\"h-full min-w-0 flex-1 border-0 bg-transparent text-[13px] text-kit-insp-tip-title outline-none placeholder:text-kit-group-sub focus-visible:shadow-none\", className)}\n {...rest}\n />\n {trailing}\n </label>\n );\n});\n\n/* ── Search clear (F1596) ─────────────────────────────────────────── */\n/** Out of the tab order: Escape clears from the keyboard (the field's owner handles it). */\nexport function SearchClear({ show, onClear, className }: { show: boolean; onClear: () => void; className?: string }) {\n return (\n <button\n type=\"button\"\n tabIndex={-1}\n aria-label=\"Clear search\"\n aria-hidden={!show || undefined}\n data-slot=\"kit-search-clear\"\n onMouseDown={(e) => e.preventDefault()}\n onClick={onClear}\n className={cn(\n \"grid size-4 shrink-0 place-items-center rounded-full bg-kit-insp-chip text-kit-insp-label transition-[opacity,transform] duration-150 ease-out hover:bg-[var(--kit-insp-chip-hover)]\",\n show ? \"opacity-100\" : \"pointer-events-none scale-50 opacity-0\",\n className,\n )}\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n </button>\n );\n}\n\n/* ── Save status (F1597) ──────────────────────────────────────────── */\nexport type SaveState = \"saved\" | \"saving\" | \"error\" | \"offline\";\nconst SAVE_COPY: Record<SaveState, { label: string; title?: string }> = {\n saved: { label: \"Saved\", title: \"All changes saved\" },\n saving: { label: \"Saving…\" },\n error: { label: \"Couldn’t save · Retry\", title: \"Your latest changes didn’t reach the server. Try again\" },\n offline: { label: \"Offline · changes kept on this device\" },\n};\nconst SAVE_BOX = \"inline-flex h-7 min-w-0 items-center gap-[5px] whitespace-nowrap rounded-[6px] px-1.5 text-[12px] font-medium leading-[18px]\";\n/**\n * The save status chip. `error` makes the whole chip the Retry button. `savedTitle` overrides the hover text of Saved\n * (the prototype's reads \"All changes saved to main\": the branch is the host's to name).\n */\nexport function SaveStatus({ state, onRetry, savedTitle, className }: { state: SaveState; onRetry?: () => void; savedTitle?: string; className?: string }) {\n const copy = SAVE_COPY[state];\n const glyph = (\n <span aria-hidden className={cn(\"relative grid h-3.5 shrink-0 place-items-center transition-[width] duration-150\", state === \"error\" ? \"w-[18px]\" : \"w-3.5\")}>\n {state === \"saving\" ? (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" className=\"animate-spin [animation-duration:0.8s] motion-reduce:animate-none\">\n <circle cx=\"7\" cy=\"7\" r=\"5.25\" stroke=\"currentColor\" strokeOpacity=\"0.25\" strokeWidth=\"1.5\" />\n <path d=\"M12.25 7A5.25 5.25 0 0 0 7 1.75\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n ) : state === \"error\" ? (\n <svg width=\"18\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M7 18a4.6 4.4 0 0 1 0-9 5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7H7M12 11v3M12 16.5h.01\" />\n </svg>\n ) : state === \"offline\" ? (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M3 3l18 18M9.6 5.6A5 4.5 0 0 1 18 11h1a3.5 3.5 0 0 1 2.2 6.2M16 18H7a4.6 4.4 0 0 1-1.3-8.6\" />\n </svg>\n ) : (\n <StatusIcon kind=\"success\" />\n )}\n </span>\n );\n const text = <span className=\"min-w-0 truncate\">{copy.label}</span>;\n if (state === \"error\")\n return (\n <button\n type=\"button\"\n data-slot=\"kit-save-status\"\n data-state={state}\n title={copy.title}\n onClick={onRetry}\n className={cn(SAVE_BOX, \"text-kit-insp-count-over outline-none transition-[background-color] duration-[120ms] hover:bg-kit-insp-delete-bg focus-visible:shadow-[0_0_0_2px_var(--kit-insp-tip-bg),0_0_0_4px_var(--kit-insp-accent)]\", className)}\n >\n {glyph}\n {text}\n </button>\n );\n return (\n <span data-slot=\"kit-save-status\" data-state={state} role=\"status\" aria-live=\"polite\" title={state === \"saved\" ? savedTitle ?? copy.title : copy.title} className={cn(SAVE_BOX, \"text-kit-insp-desc\", className)}>\n {glyph}\n {text}\n </span>\n );\n}\n\n/* ── Anchored popover (F1565) ─────────────────────────────────────── */\n/**\n * A panel on an anchor element: in a portal, 6 under the anchor (left edges aligned, or right with `align=\"right\"`),\n * above it when it would cross the window's bottom, never closer than 8 to the left or right edge. A press outside\n * the panel and its anchor closes it, and so does Escape (captured, so nothing behind it also reacts).\n */\nexport function InspectorPopover({\n anchor, onClose, width = 300, align = \"left\", label, className, children,\n}: { anchor: HTMLElement | null; onClose: () => void; width?: number; align?: \"left\" | \"right\"; label: string; className?: string; children: React.ReactNode }) {\n const ref = React.useRef<HTMLDivElement>(null);\n const reduce = useReducedMotion();\n const [pos, setPos] = React.useState({ left: -9999, top: 0, origin: \"top left\" });\n React.useLayoutEffect(() => {\n if (!anchor || !ref.current) return;\n const r = anchor.getBoundingClientRect();\n const h = ref.current.offsetHeight;\n const left = align === \"right\" ? r.right - width : r.left;\n let top = r.bottom + 6;\n let above = false;\n if (top + h > window.innerHeight - 8) {\n top = Math.max(8, r.top - h - 6);\n above = true;\n }\n setPos({ left: Math.max(8, Math.min(left, window.innerWidth - width - 8)), top, origin: `${above ? \"bottom\" : \"top\"} ${align}` });\n }, [anchor, width, align]);\n const close = React.useRef(onClose);\n close.current = onClose;\n React.useEffect(() => {\n const down = (e: MouseEvent) => {\n const t = e.target as Node;\n if (!ref.current?.contains(t) && !anchor?.contains(t)) close.current();\n };\n const key = (e: KeyboardEvent) => {\n if (e.key !== \"Escape\") return;\n e.stopPropagation();\n close.current();\n };\n document.addEventListener(\"mousedown\", down);\n document.addEventListener(\"keydown\", key, true);\n return () => {\n document.removeEventListener(\"mousedown\", down);\n document.removeEventListener(\"keydown\", key, true);\n };\n }, [anchor]);\n if (typeof document === \"undefined\") return null;\n return createPortal(\n <motion.div\n ref={ref}\n role=\"dialog\"\n aria-label={label}\n data-kit-scope=\"\"\n data-floating-layer=\"\"\n data-slot=\"kit-insp-popover\"\n className={cn(\n \"fixed z-[var(--kit-z-popover,84)] overflow-hidden rounded-[10px] border border-kit-insp-line bg-kit-insp-tip-bg shadow-[0_1px_1px_rgb(0_0_0/0.04),0_6px_24px_rgb(0_0_0/0.1),0_9px_48px_rgb(0_0_0/0.08)]\",\n className,\n )}\n style={{ left: pos.left, top: pos.top, width, transformOrigin: pos.origin }}\n initial={reduce ? false : { opacity: 0, scale: 0.95, filter: \"blur(2px)\" }}\n animate={{ opacity: 1, scale: 1, filter: \"blur(0px)\" }}\n transition={{ duration: 0.15, ease: \"easeOut\" }}\n >\n {children}\n </motion.div>,\n document.body,\n );\n}\n\n/* ── Button style picker (F1566-F1568) ────────────────────────────── */\nexport type ButtonStyleKey = \"primary\" | \"brand\" | \"secondary\" | \"outline\" | \"ghost\";\nexport const BUTTON_STYLES: { value: ButtonStyleKey; label: string; hint: string }[] = [\n { value: \"primary\", label: \"Solid\", hint: \"Main action\" },\n { value: \"brand\", label: \"Color\", hint: \"Brand colour\" },\n { value: \"secondary\", label: \"Soft\", hint: \"Quiet\" },\n { value: \"outline\", label: \"Outline\", hint: \"Low emphasis\" },\n { value: \"ghost\", label: \"Ghost\", hint: \"Text only\" },\n];\n/** How each style draws the preview button (the site's own button looks; `brand` is the site's brand colour). */\nconst previewStyle = (k: ButtonStyleKey, brand: string): React.CSSProperties =>\n k === \"primary\" ? { background: \"#101010\", color: \"#fff\" }\n : k === \"brand\" ? { background: brand, color: \"#fff\" }\n : k === \"secondary\" ? { background: \"#E8E8E6\", color: \"#101010\" }\n : k === \"outline\" ? { background: \"#fff\", color: \"#101010\", borderColor: \"#D4D4D2\" }\n : { background: \"transparent\", color: \"#101010\" };\n\n/**\n * \"Button style\": five radio rows, each a live preview of the button in that style, its name and a hint, a check on\n * the current one. `styles` narrows the list to what the site's button stores. The footer's \"Edit\" is drawn only when\n * the host says where it goes (`onEdit`). ↑ ↓ move between rows.\n */\nexport function ButtonStylePicker({\n anchor, value, label = \"Get Started\", brand = \"var(--kit-insp-accent-fg)\", styles, onPick, onClose, onEdit, align,\n}: {\n anchor: HTMLElement | null;\n value: ButtonStyleKey;\n /** the button's own text, drawn in every preview */\n label?: string;\n /** the site's brand colour (a CSS colour) for the Color row */\n brand?: string;\n styles?: ButtonStyleKey[];\n onPick: (value: ButtonStyleKey) => void;\n onClose: () => void;\n onEdit?: () => void;\n align?: \"left\" | \"right\";\n}) {\n const list = styles ? BUTTON_STYLES.filter((s) => styles.includes(s.value)) : BUTTON_STYLES;\n const rows = React.useRef<HTMLDivElement>(null);\n const move = (e: React.KeyboardEvent, i: number) => {\n if (e.key !== \"ArrowDown\" && e.key !== \"ArrowUp\") return;\n e.preventDefault();\n const next = Math.max(0, Math.min(list.length - 1, i + (e.key === \"ArrowDown\" ? 1 : -1)));\n rows.current?.querySelectorAll<HTMLButtonElement>(\"[role=radio]\")[next]?.focus();\n };\n return (\n <InspectorPopover anchor={anchor} onClose={onClose} width={300} label=\"Button style\" align={align}>\n <div className=\"flex items-center gap-2 border-b border-kit-insp-divider px-3 py-2.5\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden className=\"shrink-0 text-kit-insp-label\">\n <path d=\"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11ZM5 2l5 5M2 13h15M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z\" />\n </svg>\n <b className=\"flex-1 text-[13px] font-medium text-kit-insp-ink\">Button style</b>\n <kbd className=\"rounded-[4px] bg-[var(--kit-insp-kbd)] px-[5px] font-kit-sans text-[11px] font-medium leading-[18px] text-kit-insp-desc\">Esc</kbd>\n </div>\n <div ref={rows} role=\"radiogroup\" aria-label=\"Button style\" className=\"flex flex-col gap-1.5 p-2\">\n {list.map((o, i) => {\n const on = value === o.value;\n return (\n <button\n key={o.value}\n type=\"button\"\n role=\"radio\"\n aria-checked={on}\n tabIndex={on || (!list.some((x) => x.value === value) && i === 0) ? 0 : -1}\n onClick={() => onPick(o.value)}\n onKeyDown={(e) => move(e, i)}\n className={cn(\n \"flex items-center gap-3 rounded-[8px] border p-2 text-left outline-none transition-[background-color,border-color] duration-[120ms] focus-visible:shadow-[0_0_0_2px_var(--kit-focus-ring)]\",\n on ? \"border-[var(--kit-insp-opt-on-line)] bg-[var(--kit-insp-opt-on)]\" : \"border-transparent bg-kit-insp-card-focus hover:bg-[var(--kit-insp-opt-hover)]\",\n )}\n >\n <span aria-hidden className=\"pointer-events-none grid h-8 w-[112px] shrink-0 place-items-center truncate rounded-[6px] border border-transparent px-2 text-[12px] font-semibold leading-[18px]\" style={previewStyle(o.value, brand)}>\n {label}\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col gap-px\">\n <b className=\"text-[13px] font-medium text-kit-insp-ink\">{o.label}</b>\n <small className=\"text-[12px] text-kit-insp-quiet\">{o.hint}</small>\n </span>\n {on ? (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden className=\"shrink-0 text-kit-insp-label\">\n <path d=\"M5 12l5 5L20 7\" />\n </svg>\n ) : null}\n </button>\n );\n })}\n </div>\n <div className=\"flex items-center justify-between gap-3 border-t border-kit-insp-divider px-3 py-2.5 text-[12px] leading-[18px] text-kit-insp-quiet\">\n <span>Styles come from the site style guide</span>\n {onEdit ? (\n <button type=\"button\" onClick={onEdit} className=\"whitespace-nowrap rounded-[4px] text-[12px] font-medium text-kit-insp-accent-fg outline-none hover:underline hover:underline-offset-2 focus-visible:shadow-[0_0_0_2px_var(--kit-focus-ring)]\">\n Edit\n </button>\n ) : null}\n </div>\n </InspectorPopover>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,aAAa;AASnB,IAAa,mBAAmB,MAAM,WAAqD,SAAS,iBAClG,EAAE,UAAU,WAAW,OAAO,MAAM,MAAM,WAAW,UAAU,OAAO,UAAU,GAAG,QACnF,KACA;CACA,OACE,qBAAC,UAAD;EACO;EACC;EACN,aAAU;EACV,WAAW,GACT,8KACA,SAAS,OAAO,2BAA2B,SAAS,OAAO,gCAAgC,wBAC3F,YAAY,YACR,iGACA,2GACJ,YACA,SACF;EACA,GAAI;EAbN,UAAA,CAeG,MACA,QACK;;AAEZ,CAAC;AAGD,SAAgB,mBAAmB,EACjC,IAAI,OAAO,UAAU,UAAU,OAAO,WAAW,mBAAmB,cACsF;CAC1J,MAAM,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;CACzB,OACE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AAK;MAC7B,YAAY,MAAM,KAAK,GAAG,CAAC;MAC3B,WAAW,GACT,8LACA,KAAK,qEAAqE,gFAC5E;MAXF,UAAA;OAaE,oBAAC,QAAD;QAAM,eAAA;QAAY,WAAU;QAAoK,OAAO,aAAa,EAAE,OAAO,KAAK;QAC/N,UAAA;OACG,CAAA;OACN,qBAAC,QAAD;QAAM,WAAU;QAAhB,UAAA,CACE,oBAAC,KAAD;SAAG,WAAU;SAA6C,UAAA,EAAE;QAAS,CAAA,GACrE,oBAAC,SAAD;SAAO,WAAU;SAAmC,UAAA,EAAE;QAAY,CAAA,CAC9D;;OACL,KACC,oBAAC,OAAD;QAAK,OAAM;QAAK,QAAO;QAAK,SAAQ;QAAY,MAAK;QAAO,QAAO;QAAe,aAAY;QAAI,eAAc;QAAQ,gBAAe;QAAQ,eAAA;QAAY,WAAU;QACnK,UAAA,oBAAC,QAAD,EAAM,GAAE,iBAAkB,CAAA;OACvB,CAAA,IACH;MACE;KAxBD,GAAA,EAAE,KAwBD;IAEZ,CAAC;GACE,CAAA;GACL,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,oBAAC,QAAD,EAAA,UAAM,wCAA2C,CAAA,GAChD,SACC,oBAAC,UAAD;KAAQ,MAAK;KAAS,SAAS;KAAQ,WAAU;KAA+L,UAAA;IAExO,CAAA,IACN,IACD;;EACW;;AAEtB"}
@@ -14,3 +14,9 @@ export * from "./spinner";
14
14
  export * from "./tab";
15
15
  export * from "./toast";
16
16
  export * from "./autocomplete";
17
+ export * from "./inspector";
18
+ export * from "./tooltip-card";
19
+ export * from "./content-fields";
20
+ export * from "./block-icon-picker";
21
+ export * from "./code-language-menu";
22
+ export * from "./foundations";
package/dist/ui/index.js CHANGED
@@ -3,7 +3,9 @@ import { Spinner } from "./spinner.js";
3
3
  import { Button, HintTooltip, IconButton, RevealLink, Sparkle, TooltipScope, buttonVariants, iconButtonVariants } from "./button.js";
4
4
  import { ShortcutHint, ShortcutHintsProvider, platformKeys, shortcutHintsOn, useShortcutHints } from "./shortcut-hint.js";
5
5
  import { Checkbox, ChoiceCard, ChoiceList, Progress, Radio, RadioGroup, Segmented, Slider, Switch, ToggleGroup, ToggleItem } from "./controls.js";
6
+ import { CARD_TOOLTIP_CLASS, CardTooltip, InfoTooltip } from "./tooltip-card.js";
6
7
  import { FLOATING_LAYER, FlowBody, FlowClose, FlowFooter, FlowHeader, FlowLabel, FlowModal, HeaderStatus, HoverCard, HoverCardContent, HoverCardTrigger, Menu, MenuCheckItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Modal, ModalBody, ModalClose, ModalContent, ModalFooter, ModalHeader, ModalTrigger, MoreOptions, OptionRow, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Sheet, SheetClose, SheetContent, SheetTrigger, Tooltip, TooltipProvider, useFocusReturn } from "./overlay.js";
8
+ import { 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 } from "./inspector.js";
7
9
  import { Avatar, AvatarStack, Badge, Card, CardHeader, Dot, EmptyState, Kbd, PageHeader, Separator, SettingsSection, Skeleton, Stat, StatusMark, StatusPill, Table, Td, Th, Tr, avatarRingSpread, badgeVariants, colorFor, statusMap } from "./display.js";
8
10
  import { AGENT_PRESENCE, presenceColor, presenceSlot, registerPresenceRoster } from "./presence.js";
9
11
  import { Field, HelpMore, Input, Label, SearchInput, Textarea } from "./input.js";
@@ -11,8 +13,12 @@ import { Highlight, SEARCH_THRESHOLD, Select, filterOptions, matchPositions, mat
11
13
  import { Autocomplete } from "./autocomplete.js";
12
14
  import { ExpandedEditorModal } from "./expanded-editor-modal.js";
13
15
  import { ChoiceSwitch, SEGMENTED_MAX, SEGMENTED_MAX_LABEL, fitsSegmented } from "./choice-switch.js";
16
+ import { AuthorField, TagsInput } from "./content-fields.js";
17
+ import { CODE_LANGUAGE_NAMES, CodeLanguageMenu, CodeLanguagePopover } from "./code-language-menu.js";
14
18
  import { ActionTray, TrayMeta, TrayMore, actionTrayClass } from "./action-tray.js";
15
19
  import { ModeBar, ModeBarDot, ModeBarLink } from "./mode-bar.js";
16
20
  import { Tab, TabList, TabPanel, Tabs } from "./tab.js";
21
+ import { BUTTON_STYLES, BcmsMark, ButtonStylePicker, FoundationBadge, FoundationButton, FoundationCheckbox, FoundationTextField, InspectorPopover, ProBadge, SaveStatus, SearchClear, StatusIcon } from "./foundations.js";
17
22
  import { KitToaster, kitToast, kitToastManager } from "./toast.js";
18
- export { AGENT_PRESENCE, ActionTray, Autocomplete, Avatar, AvatarStack, Badge, Button, Card, CardHeader, Checkbox, ChoiceCard, ChoiceList, ChoiceSwitch, Dot, EmptyState, ExpandedEditorModal, FLOATING_LAYER, Field, FieldDescribedByContext, FieldLabelledByContext, FlowBody, FlowClose, FlowFooter, FlowHeader, FlowLabel, FlowModal, HeaderStatus, HelpMore, Highlight, HintTooltip, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, Input, Kbd, KitToaster, Label, Menu, MenuCheckItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Modal, ModalBody, ModalClose, ModalContent, ModalFooter, ModalHeader, ModalTrigger, ModeBar, ModeBarDot, ModeBarLink, MoreOptions, OptionRow, PageHeader, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, Radio, RadioGroup, RevealLink, SEARCH_THRESHOLD, SEGMENTED_MAX, SEGMENTED_MAX_LABEL, SearchInput, Segmented, Select, Separator, SettingsSection, Sheet, SheetClose, SheetContent, SheetTrigger, ShortcutHint, ShortcutHintsProvider, Skeleton, Slider, Sparkle, Spinner, Stat, StatusMark, StatusPill, Switch, Tab, TabList, TabPanel, Table, Tabs, Td, Textarea, Th, ToggleGroup, ToggleItem, Tooltip, TooltipProvider, TooltipScope, Tr, TrayMeta, TrayMore, actionTrayClass, avatarRingSpread, badgeVariants, buttonVariants, colorFor, filterOptions, fitsSegmented, iconButtonVariants, kitToast, kitToastManager, matchPositions, matchScore, nodeText, platformKeys, presenceColor, presenceSlot, registerPresenceRoster, selectTriggerClass, shortcutHintsOn, statusMap, useFieldDescribedBy, useFieldId, useFieldLabelledBy, useFocusReturn, useShortcutHints };
23
+ import { BlockIconPicker, BlockIconPickerPopover } from "./block-icon-picker.js";
24
+ export { AGENT_PRESENCE, ActionTray, AuthorField, Autocomplete, Avatar, AvatarStack, BUTTON_STYLES, Badge, BcmsMark, BlockIconPicker, BlockIconPickerPopover, Button, ButtonStylePicker, CARD_TOOLTIP_CLASS, CODE_LANGUAGE_NAMES, Card, CardHeader, CardTooltip, Checkbox, ChoiceCard, ChoiceList, ChoiceSwitch, CodeLanguageMenu, CodeLanguagePopover, ColourSelect, CountRing, Dot, EmptyState, ExpandedEditorModal, FLOATING_LAYER, Field, FieldCounter, FieldDescribedByContext, FieldLabelledByContext, FieldSweep, FlowBody, FlowClose, FlowFooter, FlowHeader, FlowLabel, FlowModal, FocusDot, FoundationBadge, FoundationButton, FoundationCheckbox, FoundationTextField, GroupHeader, HeaderStatus, HelpMore, Highlight, HintTooltip, HoverCard, HoverCardContent, HoverCardTrigger, 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, IconButton, InfoGlyph, InfoTooltip, InlineRow, Input, InspectorBody, InspectorCollapse, InspectorDivider, InspectorField, InspectorFields, InspectorGroup, InspectorLocked, InspectorNote, InspectorPopover, InspectorSeg, InspectorSwitch, ItemDeleteButton, ItemListAdd, ItemListCard, ItemListNote, ItemRow, ItemRowMore, Kbd, KitToaster, LAYOUT_GLYPHS, Label, LayoutOpt, Menu, MenuCheckItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Modal, ModalBody, ModalClose, ModalContent, ModalFooter, ModalHeader, ModalTrigger, ModeBar, ModeBarDot, ModeBarLink, MoreOptions, OVER_LIMIT_CLASS, OptionRow, PageHeader, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, ProBadge, Progress, Radio, RadioGroup, RevealLink, RollNumber, SEARCH_THRESHOLD, SEGMENTED_MAX, SEGMENTED_MAX_LABEL, SaveStatus, SearchClear, SearchInput, SectionHeader, Segmented, Select, SelectCompact, SelectField, Separator, SettingsSection, Sheet, SheetClose, SheetContent, SheetTrigger, ShortcutHint, ShortcutHintsProvider, Skeleton, Slider, Sparkle, Spinner, Stat, StatusIcon, StatusMark, StatusPill, StepRow, StepSlider, Switch, Tab, TabList, TabPanel, Table, Tabs, TagsInput, Td, Textarea, Th, ToggleCard, ToggleGroup, ToggleItem, ToggleRow, Tooltip, TooltipProvider, TooltipScope, Tr, TrayMeta, TrayMore, ValueSlider, actionTrayClass, avatarRingSpread, badgeVariants, buttonVariants, colorFor, counterState, filterOptions, fitsSegmented, iconButtonVariants, itemListNote, kitToast, kitToastManager, matchPositions, matchScore, nodeText, overLimitText, platformKeys, presenceColor, presenceSlot, registerPresenceRoster, selectTriggerClass, shortcutHintsOn, statusMap, useFieldDescribedBy, useFieldId, useFieldLabelledBy, useFocusReturn, useShortcutHints };
@@ -0,0 +1,394 @@
1
+ /**
2
+ * Inspector foundation · V1.6: the Visual Editor inspector's own building blocks, as prototype editor-v16 draws them
3
+ * (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).
4
+ *
5
+ * <InspectorBody> groups stacked 32 apart, 24/16/32 padding, a 1px divider 20 under every group but the last
6
+ * <InspectorGroup> one group: header, then its fields 16 below
7
+ * <GroupHeader> Content tab group: 14/20 medium title + 13/18 supporting line
8
+ * <SectionHeader> Design / Settings group: 16 icon + 14/20 medium, trailing Reset · Locked · collapse chevron
9
+ * <InspectorFields> stacked fields 20 apart (`rows`: inline rows 12 apart)
10
+ * <InlineRow> label left, control right in a fixed 194 column
11
+ * <InspectorSeg> segmented control with the sliding pill
12
+ * <SelectCompact> / <SelectField> / <ColourSelect> grey field selects (32 compact, 34 full width)
13
+ * <StepSlider> / <StepRow> / <ValueSlider> the stop slider and the value-inside slider
14
+ * <ToggleRow> / <ToggleCard> / <InspectorSwitch> label-left switch rows, related ones in one grey card
15
+ * <ItemListCard> + <ItemRow> + <ItemListAdd> + <ItemListNote> the grey item list card
16
+ * <ItemDeleteButton> the red "Delete <noun>" that ends an item screen
17
+ * <InspectorField> + <FieldCounter> label row with the focus dot, the sweep, and the n / max counter
18
+ *
19
+ * Editor-scoped: these read the --kit-insp-* roles (tokens.css) and nothing else in the kit draws them unless a host
20
+ * asks (`KitLookProvider look="v16"` for the engine). Every other kit consumer keeps the V2 look.
21
+ */
22
+ import * as React from "react";
23
+ /** The prototype's accordion curve (kit.jsx:60 ACC) and its sliding-pill spring (kit.jsx:59 PILL). */
24
+ export declare const INSPECTOR_EASE: readonly [0.22, 1, 0.36, 1];
25
+ /** Panel body (kit.css:6-8). `sub` = a drill-in screen (16 on top instead of 24). */
26
+ export declare function InspectorBody({ sub, className, children, ...rest }: React.HTMLAttributes<HTMLDivElement> & {
27
+ sub?: boolean;
28
+ }): import("react/jsx-runtime").JSX.Element;
29
+ /** One group in the body (kit.css:9, 13, 36). `locked` greys its fields and makes them read-only; `flash` runs the
30
+ * 1.2s violet flash a jump-to-group ends with. */
31
+ export declare function InspectorGroup({ locked, flash, className, children, ...rest }: React.HTMLAttributes<HTMLElement> & {
32
+ locked?: boolean;
33
+ flash?: boolean;
34
+ }): import("react/jsx-runtime").JSX.Element;
35
+ /** The fields of a group (kit.css:10-11): 20 apart, or 12 for a run of inline rows. */
36
+ export declare function InspectorFields({ rows, className, children, ...rest }: React.HTMLAttributes<HTMLDivElement> & {
37
+ rows?: boolean;
38
+ }): import("react/jsx-runtime").JSX.Element;
39
+ /** The 1px rule between groups, for a host that stacks groups outside <InspectorBody> (kit.css:8). */
40
+ export declare function InspectorDivider({ className }: {
41
+ className?: string;
42
+ }): import("react/jsx-runtime").JSX.Element;
43
+ /** Fields a role cannot edit (kit.css:36-37): one disabled fieldset at .45. */
44
+ export declare function InspectorLocked({ on, children }: {
45
+ on?: boolean;
46
+ children: React.ReactNode;
47
+ }): import("react/jsx-runtime").JSX.Element;
48
+ export interface GroupHeaderProps {
49
+ title: React.ReactNode;
50
+ /** supporting line under the title */
51
+ sub?: React.ReactNode;
52
+ /** trailing controls (link, comment, ⋯) */
53
+ actions?: React.ReactNode;
54
+ /** id of the title element, for aria-labelledby on the group */
55
+ titleId?: string;
56
+ className?: string;
57
+ }
58
+ /** Level-1 content group header (kit.jsx:66-68, kit.css:16-19; the inspector's ink is insp.css:19-20). */
59
+ export declare function GroupHeader({ title, sub, actions, titleId, className }: GroupHeaderProps): import("react/jsx-runtime").JSX.Element;
60
+ export interface SectionHeaderProps {
61
+ /** 16px leading glyph */
62
+ icon?: React.ReactNode;
63
+ title: React.ReactNode;
64
+ /** what sits at the end of the row */
65
+ trailing?: "reset" | "locked" | "collapse";
66
+ onReset?: () => void;
67
+ /** the Reset is shown but inert (a read-only panel, a locked section, a save in flight) */
68
+ resetDisabled?: boolean;
69
+ /** with trailing="collapse" */
70
+ open?: boolean;
71
+ onToggle?: () => void;
72
+ /** description, always 4 under the title row */
73
+ desc?: React.ReactNode;
74
+ /** extra trailing content, before the Reset / chevron */
75
+ actions?: React.ReactNode;
76
+ titleId?: string;
77
+ /** aria-controls for the collapse button */
78
+ controls?: string;
79
+ className?: string;
80
+ }
81
+ /** Design / Settings group header (kit.jsx:72-91, kit.css:22-33). Static unless trailing="collapse". */
82
+ export declare function SectionHeader({ icon, title, trailing, onReset, resetDisabled, open, onToggle, desc, actions, titleId, controls, className }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
83
+ /** The quiet note under a group's fields (insp.css:32 `.adv-note`): 12/16 in the sub colour. */
84
+ export declare function InspectorNote({ id, className, children }: {
85
+ id?: string;
86
+ className?: string;
87
+ children: React.ReactNode;
88
+ }): import("react/jsx-runtime").JSX.Element;
89
+ export declare const LAYOUT_GLYPHS: {
90
+ readonly centred: import("react/jsx-runtime").JSX.Element;
91
+ readonly left: import("react/jsx-runtime").JSX.Element;
92
+ readonly stacked: import("react/jsx-runtime").JSX.Element;
93
+ readonly two: import("react/jsx-runtime").JSX.Element;
94
+ readonly three: import("react/jsx-runtime").JSX.Element;
95
+ readonly split: import("react/jsx-runtime").JSX.Element;
96
+ readonly formLeft: import("react/jsx-runtime").JSX.Element;
97
+ readonly row: import("react/jsx-runtime").JSX.Element;
98
+ readonly grid: import("react/jsx-runtime").JSX.Element;
99
+ readonly scroll: import("react/jsx-runtime").JSX.Element;
100
+ };
101
+ export type LayoutGlyphName = keyof typeof LAYOUT_GLYPHS;
102
+ /** A layout glyph, then the option's label: `<LayoutOpt i="two">Two columns</LayoutOpt>`. */
103
+ export declare function LayoutOpt({ i, children }: {
104
+ i: LayoutGlyphName;
105
+ children?: React.ReactNode;
106
+ }): import("react/jsx-runtime").JSX.Element;
107
+ /** Collapsible body for a SectionHeader with trailing="collapse" (kit.jsx:248-252): height, then a 4px rise out of a
108
+ * 4px blur, both on the accordion curve. Instant with reduced motion. */
109
+ export declare function InspectorCollapse({ open, id, rows, className, children }: {
110
+ open: boolean;
111
+ id?: string;
112
+ rows?: boolean;
113
+ className?: string;
114
+ children: React.ReactNode;
115
+ }): import("react/jsx-runtime").JSX.Element;
116
+ export interface InspectorFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
117
+ label: React.ReactNode;
118
+ /** id for the label element (aria-labelledby on the control) */
119
+ labelId?: string;
120
+ htmlFor?: string;
121
+ /** the info tooltip after the label: its body text */
122
+ info?: React.ReactNode;
123
+ /** right side of the label row (counter, actions) */
124
+ meta?: React.ReactNode;
125
+ /** P-FDOT: this is the field a canvas click opened. Draws the 6px violet dot after the label. */
126
+ current?: boolean;
127
+ /** P-FDOT: run the violet sweep once (change the value to run it again, e.g. a click counter) */
128
+ flash?: boolean | number | string;
129
+ /** over its limit / invalid: the footer turns red */
130
+ state?: "over" | "bad";
131
+ /** under the control: hint left, counter right */
132
+ hint?: React.ReactNode;
133
+ counter?: React.ReactNode;
134
+ }
135
+ /**
136
+ * The inspector field shell (editor.css:411-431, kit.css:506-515): label row 13/16 medium, min 20 high, the control 8
137
+ * under it, then an optional 12/16 footer. `current` puts the focus dot after the label (order: label · dot · spacer ·
138
+ * meta); `flash` runs the left-to-right violet sweep behind the whole field (a plain fade with reduced motion).
139
+ */
140
+ export declare function InspectorField({ label, labelId, htmlFor, info, meta, current, flash, state, hint, counter, className, children, ...rest }: InspectorFieldProps): import("react/jsx-runtime").JSX.Element;
141
+ /** The 6px violet dot after a field's label while it is the one a canvas click opened (kit.css:513-515). */
142
+ export declare function FocusDot({ className }: {
143
+ className?: string;
144
+ }): import("react/jsx-runtime").JSX.Element;
145
+ /** The soft violet fill that sweeps across a field a canvas click opened (kit.css:506-511). Sits behind the field, 6/8
146
+ * outside it; the parent must be `relative isolate`. */
147
+ export declare function FieldSweep({ className }: {
148
+ className?: string;
149
+ }): import("react/jsx-runtime").JSX.Element;
150
+ /** How close a count is to its limit, by the prototype's rule (state.js:93 countLevel): "near" above 91% of the
151
+ * limit, "over" past it. */
152
+ export declare function counterState(n: number, max?: number): "ok" | "near" | "over";
153
+ /** The 12px progress ring beside a counter that is near or over its limit (content.jsx:307-309, content.css:617): a
154
+ * grey track, an amber arc that fills with the count, red when over. Springs in and out (wrap it in AnimatePresence). */
155
+ export declare function CountRing({ value, max, className }: {
156
+ value: number;
157
+ max: number;
158
+ className?: string;
159
+ }): import("react/jsx-runtime").JSX.Element;
160
+ /** The field counter "42 / 60" (content.jsx:310-320; content.css:614-616; insp.css:163-164): 12/16 tabular, amber and
161
+ * medium when near the limit, red over it, with the ring beside it in both states. Without `max` it is the bare count. */
162
+ export declare function FieldCounter({ value, max, ring, size, className }: {
163
+ value: number;
164
+ max?: number;
165
+ ring?: boolean; /** 11/14 in the inspector (insp.css:30), 12/16 in the content editor (editor.css:425) */
166
+ size?: 11 | 12;
167
+ className?: string;
168
+ }): import("react/jsx-runtime").JSX.Element;
169
+ /** 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
170
+ * lifts out, both blurred 2, in 0.16s. Tabular, so the text beside it does not move. */
171
+ export declare function RollNumber({ value, className }: {
172
+ value: number | string;
173
+ className?: string;
174
+ }): import("react/jsx-runtime").JSX.Element;
175
+ /** The line under a field that is over its limit, in the prototype's words (content.jsx:318). */
176
+ export declare const overLimitText: (max: number) => string;
177
+ /** 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). */
178
+ export declare 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";
179
+ /** Label left, control right in a fixed 194 column (kit.jsx:137, kit.css:50-55, 501-502). `meta` is the quiet current
180
+ * value after the label ("M · 8 px"); `info` adds the info tooltip. */
181
+ export declare function InlineRow({ label, meta, info, labelId, className, children, }: {
182
+ label: React.ReactNode;
183
+ meta?: React.ReactNode;
184
+ info?: React.ReactNode;
185
+ labelId?: string;
186
+ className?: string;
187
+ children: React.ReactNode;
188
+ }): import("react/jsx-runtime").JSX.Element;
189
+ export interface InspectorSegOption<T extends string> {
190
+ value: T;
191
+ label: React.ReactNode;
192
+ /** tooltip + accessible name (icon-only options need it) */
193
+ title?: string;
194
+ }
195
+ /**
196
+ * Segmented control, 2–5 options, with the sliding pill (kit.jsx:114-120; styles.css:188-191, editor.css:287 + 458-461,
197
+ * insp.css:61). 36 high (32 with `small` or inside an InlineRow), 2 padding, grey track, white pill on the spring.
198
+ * A radiogroup: arrows move the choice.
199
+ */
200
+ export declare function InspectorSeg<T extends string>({ options, value, onChange, small, disabled, className, "aria-label": ariaLabel, "aria-labelledby": labelledBy, }: {
201
+ options: InspectorSegOption<T>[];
202
+ value: T;
203
+ onChange: (v: T) => void;
204
+ small?: boolean;
205
+ disabled?: boolean;
206
+ className?: string;
207
+ "aria-label"?: string;
208
+ "aria-labelledby"?: string;
209
+ }): import("react/jsx-runtime").JSX.Element;
210
+ export interface InspectorOption<T extends string> {
211
+ value: T;
212
+ label: string;
213
+ /** second line in the menu */
214
+ desc?: string;
215
+ /** shown but not pickable (a choice this site cannot take) */
216
+ disabled?: boolean;
217
+ }
218
+ /** Compact dropdown for an Inline row (kit.jsx:140-150, kit.css:58-62): 32 high, grey, violet edge while open. The menu
219
+ * is at least as wide as the control. */
220
+ export declare function SelectCompact<T extends string>({ value, options, onPick, icon, label, disabled, className, }: {
221
+ value: T | undefined;
222
+ options: InspectorOption<T>[];
223
+ onPick: (v: T) => void;
224
+ icon?: React.ReactNode;
225
+ label: string;
226
+ disabled?: boolean;
227
+ className?: string;
228
+ }): import("react/jsx-runtime").JSX.Element;
229
+ /** Full-width select with its label above (kit.jsx:153-164; editor.css:416-417, 433; faq.css:59): 34 high. */
230
+ export declare function SelectField<T extends string>({ label, value, options, onPick, placeholder, icon, info, disabled, current, flash, className, }: {
231
+ label: React.ReactNode;
232
+ value: T | undefined;
233
+ options: InspectorOption<T>[];
234
+ onPick: (v: T) => void;
235
+ placeholder?: string;
236
+ icon?: React.ReactNode;
237
+ info?: React.ReactNode;
238
+ disabled?: boolean;
239
+ current?: boolean;
240
+ flash?: InspectorFieldProps["flash"];
241
+ className?: string;
242
+ }): import("react/jsx-runtime").JSX.Element;
243
+ export interface ColourOption<T extends string> {
244
+ value: T;
245
+ label: string;
246
+ /** the design token's name, shown in the pill ("surface/base") */
247
+ token: string;
248
+ /** any CSS colour: the swatch */
249
+ colour: string;
250
+ }
251
+ /** Colour select (kit.jsx:219-232, kit.css:77-79): value left, swatch + token pill right; the menu lists the theme
252
+ * colours with their tokens under a header, then an optional readability note. */
253
+ export declare function ColourSelect<T extends string>({ label, value, options, onPick, header, note, disabled, className, }: {
254
+ label: React.ReactNode;
255
+ value: T | undefined;
256
+ options: ColourOption<T>[];
257
+ onPick: (v: T) => void; /** the menu's heading; "" for none */
258
+ header?: string; /** the readability note under the options; null for none */
259
+ note?: React.ReactNode;
260
+ disabled?: boolean;
261
+ className?: string;
262
+ }): import("react/jsx-runtime").JSX.Element;
263
+ /** Step slider (kit.jsx:168-187, kit.css:65-73): filler + handle on the current stop, dots on the others. Click a stop,
264
+ * drag the handle, or use the arrow keys. `value` is the stop's index. */
265
+ export declare function StepSlider({ label, stops, value, onChange, disabled, className, "aria-labelledby": labelledBy, }: {
266
+ label?: string;
267
+ stops: string[];
268
+ value: number;
269
+ onChange: (index: number) => void;
270
+ disabled?: boolean;
271
+ className?: string;
272
+ "aria-labelledby"?: string;
273
+ }): import("react/jsx-runtime").JSX.Element;
274
+ /** Step slider in an Inline row: label + the current stop's name on the left (kit.jsx:211-213). */
275
+ export declare function StepRow({ label, stops, names, value, onChange, disabled, info, }: {
276
+ label: string;
277
+ stops: string[];
278
+ names?: string[];
279
+ value: number;
280
+ onChange: (index: number) => void;
281
+ disabled?: boolean;
282
+ info?: React.ReactNode;
283
+ }): import("react/jsx-runtime").JSX.Element;
284
+ /**
285
+ * Value slider (kit.jsx:191-209, kit.css:555-564): the step slider's track, filler and handle with the label left and
286
+ * the number right inside the track. origin "start" fills from the left; "center" fills out from a zero mark. Drag,
287
+ * click, arrow keys (Shift = ×10); double-click resets. `onStart` fires once before a gesture's first change (one undo step).
288
+ */
289
+ export declare function ValueSlider({ label, value, min, max, origin, reset, format, onChange, onStart, disabled, className, }: {
290
+ label: string;
291
+ value: number;
292
+ min?: number;
293
+ max?: number;
294
+ origin?: "start" | "center";
295
+ reset?: number;
296
+ format?: (v: number) => string;
297
+ onChange: (v: number) => void;
298
+ onStart?: () => void;
299
+ disabled?: boolean;
300
+ className?: string;
301
+ }): import("react/jsx-runtime").JSX.Element;
302
+ /** The prototype switch (ui.jsx:132-141, editor.css:242-251): 34×20 (sm 28×16), inset-shadow track, grey knob with a
303
+ * 1px grip line. `deco` draws it inside another control (a menu row): no button, hidden from assistive tech. */
304
+ export declare function InspectorSwitch({ on, onChange, size, label, disabled, deco, className, "aria-labelledby": labelledBy, }: {
305
+ on: boolean;
306
+ onChange?: (on: boolean) => void;
307
+ size?: "sm" | "md";
308
+ label?: string;
309
+ disabled?: boolean;
310
+ deco?: boolean;
311
+ className?: string;
312
+ "aria-labelledby"?: string;
313
+ }): import("react/jsx-runtime").JSX.Element;
314
+ /** Toggle row (kit.jsx:241-243; styles.css:286-289, editor.css:445-447): label + supporting text left, switch right,
315
+ * top-aligned. */
316
+ export declare function ToggleRow({ label, desc, on, onChange, disabled, className, }: {
317
+ label: string;
318
+ desc?: React.ReactNode;
319
+ on: boolean;
320
+ onChange: (on: boolean) => void;
321
+ disabled?: boolean;
322
+ className?: string;
323
+ }): import("react/jsx-runtime").JSX.Element;
324
+ /** Related toggles share ONE grey card (kit.jsx:245, kit.css:84-85): #F5F5F5, radius 8, 12 padding, rows 14 apart. */
325
+ export declare function ToggleCard({ className, children, ...rest }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
326
+ /** 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
327
+ * Add button and the note, 4 apart. Pass <ItemRow>s as children, `add` and `note` below them. */
328
+ export declare function ItemListCard({ add, note, listRef, className, children, ...rest }: React.HTMLAttributes<HTMLDivElement> & {
329
+ add?: React.ReactNode;
330
+ note?: React.ReactNode;
331
+ listRef?: React.Ref<HTMLDivElement>;
332
+ }): import("react/jsx-runtime").JSX.Element;
333
+ export declare 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";
334
+ export declare 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";
335
+ export declare 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";
336
+ export declare const ITEM_ROW_TITLE_CLASS = "truncate text-[13px] font-medium leading-[18px] tracking-[-0.1625px] text-kit-insp-ink";
337
+ export declare const ITEM_ROW_SUB_CLASS = "truncate text-[11.5px] leading-[14px] text-kit-insp-sub";
338
+ export interface ItemRowProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
339
+ title: React.ReactNode;
340
+ /** second line; `empty` is shown, quieter, when there is none */
341
+ sub?: React.ReactNode;
342
+ empty?: React.ReactNode;
343
+ /** opens the item (the title area is the button) */
344
+ onOpen?: () => void;
345
+ /** aria-label of the open button */
346
+ openLabel?: string;
347
+ /** props for the drag grip (a host's sortable handle); omit to hide the grip */
348
+ grip?: React.ButtonHTMLAttributes<HTMLButtonElement> | false;
349
+ /** before the title: a thumbnail or a section icon */
350
+ leading?: React.ReactNode;
351
+ /** after the title: a tag or a quiet meta */
352
+ tag?: React.ReactNode;
353
+ meta?: React.ReactNode;
354
+ /** the ⋯ control (a MenuTrigger using ITEM_ROW_MORE_CLASS), or props for a plain button */
355
+ more?: React.ReactNode;
356
+ /** 44 high (page outline rows) */
357
+ compact?: boolean;
358
+ dragging?: boolean;
359
+ /** a row is being dragged over this one: the 2px violet line on its top edge */
360
+ over?: boolean;
361
+ error?: boolean;
362
+ selected?: boolean;
363
+ }
364
+ /** 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
365
+ * sub-line, ⋯ 28. Hover greys the row; `over` draws the drop line; `dragging` fades it. */
366
+ export declare function ItemRow({ title, sub, empty, onOpen, openLabel, grip, leading, tag, meta, more, compact, dragging, over, error, selected, className, ...rest }: ItemRowProps): import("react/jsx-runtime").JSX.Element;
367
+ /** A plain ⋯ button for an ItemRow whose menu the host opens itself. */
368
+ export declare function ItemRowMore({ label, className, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
369
+ label: string;
370
+ }): import("react/jsx-runtime").JSX.Element;
371
+ export declare const ITEM_LIST_ADD_CLASS = "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";
372
+ /** The Add button inside the card (styles.css:215-217, faq.css:96-97, page.css:11): full width, 40 high. */
373
+ export declare function ItemListAdd({ className, children, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
374
+ /** The card's note line, in the prototype's words (inspector.jsx:254): "3 of 6 questions. Drag to reorder." ·
375
+ * "6 of 6 questions. Remove one to add another." · "3 questions. Drag to reorder." */
376
+ export declare function itemListNote(count: number, noun: string, max?: number | null, opts?: {
377
+ sortable?: boolean;
378
+ }): string;
379
+ /** The note under the Add button (styles.css:218): 12/18, 4 padding. */
380
+ export declare function ItemListNote({ className, children, ...rest }: React.HTMLAttributes<HTMLParagraphElement>): import("react/jsx-runtime").JSX.Element;
381
+ export declare const 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";
382
+ /**
383
+ * The red "Delete <noun>" that ends an item screen (inspector.jsx:663, faq.css:48-49, kit.css:183). When it cannot run
384
+ * (the list is at its minimum) pass `reason`: the button is disabled and the reason is its title and description.
385
+ */
386
+ export declare function ItemDeleteButton({ noun, reason, icon, className, children, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
387
+ noun?: string;
388
+ reason?: string;
389
+ icon?: React.ReactNode;
390
+ }): import("react/jsx-runtime").JSX.Element;
391
+ /** The quiet ⓘ after a label, 16 box with a 14 glyph (kit.css:445-446), for hosts that draw their own label row. */
392
+ export declare function InfoGlyph({ className }: {
393
+ className?: string;
394
+ }): import("react/jsx-runtime").JSX.Element;