@bettercms-ai/kit 3.0.2 → 3.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 (161) hide show
  1. package/dist/adapters/lossy.d.ts +1 -1
  2. package/dist/adapters/lossy.js +3 -2
  3. package/dist/adapters/lossy.js.map +1 -1
  4. package/dist/adapters/schema.js +5 -5
  5. package/dist/adapters/schema.js.map +1 -1
  6. package/dist/brand/logo.js +18 -67
  7. package/dist/brand/logo.js.map +1 -1
  8. package/dist/context.js +3 -8
  9. package/dist/context.js.map +1 -1
  10. package/dist/controls/button.js +134 -451
  11. package/dist/controls/button.js.map +1 -1
  12. package/dist/controls/choice.js +95 -336
  13. package/dist/controls/choice.js.map +1 -1
  14. package/dist/controls/code.js +72 -245
  15. package/dist/controls/code.js.map +1 -1
  16. package/dist/controls/color.js +31 -108
  17. package/dist/controls/color.js.map +1 -1
  18. package/dist/controls/date.js +83 -268
  19. package/dist/controls/date.js.map +1 -1
  20. package/dist/controls/form-picker.js +9 -26
  21. package/dist/controls/form-picker.js.map +1 -1
  22. package/dist/controls/icon.js +100 -341
  23. package/dist/controls/icon.js.map +1 -1
  24. package/dist/controls/json.js +7 -20
  25. package/dist/controls/json.js.map +1 -1
  26. package/dist/controls/link.js +156 -561
  27. package/dist/controls/link.js.map +1 -1
  28. package/dist/controls/location.js +35 -124
  29. package/dist/controls/location.js.map +1 -1
  30. package/dist/controls/media.js +267 -928
  31. package/dist/controls/media.js.map +1 -1
  32. package/dist/controls/number.js +23 -80
  33. package/dist/controls/number.js.map +1 -1
  34. package/dist/controls/reference.js +155 -516
  35. package/dist/controls/reference.js.map +1 -1
  36. package/dist/controls/rich-text/article-shell.js +86 -327
  37. package/dist/controls/rich-text/article-shell.js.map +1 -1
  38. package/dist/controls/rich-text/author.js +21 -78
  39. package/dist/controls/rich-text/author.js.map +1 -1
  40. package/dist/controls/rich-text/blocks.js +317 -1086
  41. package/dist/controls/rich-text/blocks.js.map +1 -1
  42. package/dist/controls/rich-text/button.js +10 -31
  43. package/dist/controls/rich-text/button.js.map +1 -1
  44. package/dist/controls/rich-text/catalog.js +51 -168
  45. package/dist/controls/rich-text/catalog.js.map +1 -1
  46. package/dist/controls/rich-text/columns.js +31 -104
  47. package/dist/controls/rich-text/columns.js.map +1 -1
  48. package/dist/controls/rich-text/component-card.js +209 -790
  49. package/dist/controls/rich-text/component-card.js.map +1 -1
  50. package/dist/controls/rich-text/component-panel.js +40 -102
  51. package/dist/controls/rich-text/component-panel.js.map +1 -1
  52. package/dist/controls/rich-text/control.js +32 -101
  53. package/dist/controls/rich-text/control.js.map +1 -1
  54. package/dist/controls/rich-text/editor.js +108 -369
  55. package/dist/controls/rich-text/editor.js.map +1 -1
  56. package/dist/controls/rich-text/embed.js +51 -184
  57. package/dist/controls/rich-text/embed.js.map +1 -1
  58. package/dist/controls/rich-text/floating.js +42 -171
  59. package/dist/controls/rich-text/floating.js.map +1 -1
  60. package/dist/controls/rich-text/footnote.js +28 -89
  61. package/dist/controls/rich-text/footnote.js.map +1 -1
  62. package/dist/controls/rich-text/gallery.js +27 -88
  63. package/dist/controls/rich-text/gallery.js.map +1 -1
  64. package/dist/controls/rich-text/link-form.d.ts +10 -0
  65. package/dist/controls/rich-text/link-form.js +16 -204
  66. package/dist/controls/rich-text/link-form.js.map +1 -1
  67. package/dist/controls/rich-text/plain.js +3 -8
  68. package/dist/controls/rich-text/plain.js.map +1 -1
  69. package/dist/controls/rich-text/related.js +25 -86
  70. package/dist/controls/rich-text/related.js.map +1 -1
  71. package/dist/controls/rich-text/toc.js +15 -48
  72. package/dist/controls/rich-text/toc.js.map +1 -1
  73. package/dist/controls/rich-text/toolbar.js +105 -402
  74. package/dist/controls/rich-text/toolbar.js.map +1 -1
  75. package/dist/controls/scale.js +52 -169
  76. package/dist/controls/scale.js.map +1 -1
  77. package/dist/controls/slot.js +73 -238
  78. package/dist/controls/slot.js.map +1 -1
  79. package/dist/controls/table/table-editor.js +500 -1766
  80. package/dist/controls/table/table-editor.js.map +1 -1
  81. package/dist/controls/table/table-link.js +41 -121
  82. package/dist/controls/table/table-link.js.map +1 -1
  83. package/dist/controls/table/table.js +9 -26
  84. package/dist/controls/table/table.js.map +1 -1
  85. package/dist/controls/text.js +68 -221
  86. package/dist/controls/text.js.map +1 -1
  87. package/dist/controls/unknown-value.js +22 -79
  88. package/dist/controls/unknown-value.js.map +1 -1
  89. package/dist/engine/array.js +228 -821
  90. package/dist/engine/array.js.map +1 -1
  91. package/dist/engine/bits.js +13 -38
  92. package/dist/engine/bits.js.map +1 -1
  93. package/dist/engine/breadcrumb.js +8 -25
  94. package/dist/engine/breadcrumb.js.map +1 -1
  95. package/dist/engine/expand.js +13 -38
  96. package/dist/engine/expand.js.map +1 -1
  97. package/dist/engine/field-list.js +5 -14
  98. package/dist/engine/field-list.js.map +1 -1
  99. package/dist/engine/field-shell.js +244 -849
  100. package/dist/engine/field-shell.js.map +1 -1
  101. package/dist/engine/frame.js +78 -275
  102. package/dist/engine/frame.js.map +1 -1
  103. package/dist/engine/grouping.js +193 -630
  104. package/dist/engine/grouping.js.map +1 -1
  105. package/dist/engine/item-list.js +50 -187
  106. package/dist/engine/item-list.js.map +1 -1
  107. package/dist/engine/kit-field.js +95 -320
  108. package/dist/engine/kit-field.js.map +1 -1
  109. package/dist/engine/schema-form.js +32 -101
  110. package/dist/engine/schema-form.js.map +1 -1
  111. package/dist/engine/slot.js +45 -146
  112. package/dist/engine/slot.js.map +1 -1
  113. package/dist/lib/icons.js +5 -14
  114. package/dist/lib/icons.js.map +1 -1
  115. package/dist/library/kit-catalog.json +2 -1
  116. package/dist/styles.css +1 -5821
  117. package/dist/table/table-view.js +16 -49
  118. package/dist/table/table-view.js.map +1 -1
  119. package/dist/testing/test-form.js +5 -14
  120. package/dist/testing/test-form.js.map +1 -1
  121. package/dist/theme.js +3 -8
  122. package/dist/theme.js.map +1 -1
  123. package/dist/ui/action-tray.js +24 -97
  124. package/dist/ui/action-tray.js.map +1 -1
  125. package/dist/ui/autocomplete.js +38 -135
  126. package/dist/ui/autocomplete.js.map +1 -1
  127. package/dist/ui/button.js +31 -108
  128. package/dist/ui/button.js.map +1 -1
  129. package/dist/ui/choice-switch.js +5 -14
  130. package/dist/ui/choice-switch.js.map +1 -1
  131. package/dist/ui/controls.js +86 -279
  132. package/dist/ui/controls.js.map +1 -1
  133. package/dist/ui/display.js +116 -401
  134. package/dist/ui/display.js.map +1 -1
  135. package/dist/ui/expanded-editor-modal.js +27 -100
  136. package/dist/ui/expanded-editor-modal.js.map +1 -1
  137. package/dist/ui/floating-panel.js +37 -130
  138. package/dist/ui/floating-panel.js.map +1 -1
  139. package/dist/ui/input.js +59 -196
  140. package/dist/ui/input.js.map +1 -1
  141. package/dist/ui/mode-bar.js +11 -32
  142. package/dist/ui/mode-bar.js.map +1 -1
  143. package/dist/ui/overlay.js +176 -613
  144. package/dist/ui/overlay.js.map +1 -1
  145. package/dist/ui/path-crumbs.js +113 -374
  146. package/dist/ui/path-crumbs.js.map +1 -1
  147. package/dist/ui/select.js +78 -311
  148. package/dist/ui/select.js.map +1 -1
  149. package/dist/ui/shortcut-hint.js +6 -19
  150. package/dist/ui/shortcut-hint.js.map +1 -1
  151. package/dist/ui/spinner.js +7 -20
  152. package/dist/ui/spinner.js.map +1 -1
  153. package/dist/ui/split-button.js +10 -35
  154. package/dist/ui/split-button.js.map +1 -1
  155. package/dist/ui/tab.js +17 -50
  156. package/dist/ui/tab.js.map +1 -1
  157. package/dist/ui/toast.js +30 -107
  158. package/dist/ui/toast.js.map +1 -1
  159. package/dist/ui/tooltip-root.js +7 -24
  160. package/dist/ui/tooltip-root.js.map +1 -1
  161. package/package.json +1 -1
@@ -10,7 +10,6 @@ import { COMPONENT_INSERT_TOAST } from "../component-services.js";
10
10
  import { closestBlock, createIsland, defaultModel, editingHost, esc, hydrate, isEmptyHtml, placeCaret, rangeRect, rid, sanitize, serialize, textBeforeCaret, topBlock } from "./dom.js";
11
11
  import { eventKey } from "../../lib/key-event.js";
12
12
  import { ALL_FEATURES } from "./codec.js";
13
- import { applyTextLink, fromLinkValue, textLinkOf, toLinkValue } from "./link-form.js";
14
13
  import { createOutlineStore, outlineOf } from "./toc.js";
15
14
  import { CatalogComponentsProvider, InsertMenuContent, SlashMenuPanel, blockAllowed, catalogKey, noteRecent, useCatalog } from "./catalog.js";
16
15
  import { openComponentPanel } from "./component-panel.js";
@@ -19,11 +18,12 @@ import { htmlToMarkdown, looksLikeMarkdown, markdownToHtml } from "./markdown.js
19
18
  import { duplicateBlock, ensureLineAfter, insertBasic, insertIsland, liveInlineCode, liveMarkdown, moveBlock, restrictHtml, turnInto } from "./ops.js";
20
19
  import { EMPTY_FMT, FormatToolbar, MARK_FEATURE, stylesFor } from "./toolbar.js";
21
20
  import { SelectionBubble } from "./floating.js";
21
+ import { applyTextLink, fromLinkValue, textLinkOf, toLinkValue } from "./link-form.js";
22
22
  import { checklistShortcut, insertChecklist, syncTaskA11y, toggleTaskAtPointer, toggleTaskFromKey } from "./checklist.js";
23
23
  import { FN_MARK, FOOTNOTE_POPOVER_CLASS, FOOTNOTE_REFUSED, FootnoteEditor, FootnotesList, backToMarker, caretAfterMarker, insertFootnote, renumberFootnotes } from "./footnote.js";
24
24
  import { ButtonLinkPanel, applyButton, buttonAt, buttonInitial, insertButton, removeButton } from "./button.js";
25
25
  import * as React from "react";
26
- import { Fragment, jsxDEV } from "react/jsx-dev-runtime";
26
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
27
27
  import { IconArrowBarToDown, IconArrowBarToUp, IconCopy, IconGripVertical, IconPlus, IconTransform, IconTrash } from "@tabler/icons-react";
28
28
  import { AnimatePresence, motion, useReducedMotion } from "framer-motion";
29
29
  import { createPortal, flushSync } from "react-dom";
@@ -46,7 +46,6 @@ import { createPortal, flushSync } from "react-dom";
46
46
  * Everything the editor offers is limited to what the field accepts (`features`): a toolbar button, a slash command, a
47
47
  * Markdown shortcut or pasted markup the field cannot hold is not offered, or is turned into what it can hold and said so.
48
48
  */
49
- var _jsxFileName = "D:/Github/bettercms/bettercms-backend/packages/kit/src/controls/rich-text/editor.tsx";
50
49
  var RT_PROSE = "text-kit-base leading-[1.6] text-kit-fg [&>*+*]:mt-3 [&_span[class]:not([data-rt-isolate]_*)]:!text-inherit [&_span[class]:not([data-rt-isolate]_*)]:![-webkit-text-fill-color:currentColor] [&_span[class]:not([data-rt-isolate]_*)]:!bg-none [&_span[class]:not([data-rt-isolate]_*)]:!opacity-100 [&_span[class]:not([data-rt-isolate]_*)]:!visible [&_h1:not([data-rt-isolate]_*)]:text-[28px] [&_h1:not([data-rt-isolate]_*)]:font-semibold [&_h1:not([data-rt-isolate]_*)]:leading-9 [&_h1:not([data-rt-isolate]_*)]:tracking-[-0.01em] [&_h2:not([data-rt-isolate]_*)]:text-[22px] [&_h2:not([data-rt-isolate]_*)]:font-semibold [&_h2:not([data-rt-isolate]_*)]:leading-8 [&_h2:not([data-rt-isolate]_*)]:tracking-[-0.01em] [&_h3:not([data-rt-isolate]_*)]:text-kit-lg [&_h3:not([data-rt-isolate]_*)]:font-semibold [&_h4:not([data-rt-isolate]_*)]:text-kit-md [&_h4:not([data-rt-isolate]_*)]:font-semibold [&_h5:not([data-rt-isolate]_*)]:text-kit-base [&_h5:not([data-rt-isolate]_*)]:font-semibold [&_h6:not([data-rt-isolate]_*)]:text-kit-sm [&_h6:not([data-rt-isolate]_*)]:font-semibold [&_h6:not([data-rt-isolate]_*)]:uppercase [&_h6:not([data-rt-isolate]_*)]:tracking-wide [&_h6:not([data-rt-isolate]_*)]:text-kit-fg-2 [&>h1]:mt-6 [&>h2]:mt-6 [&>h3]:mt-5 [&>*:first-child]:mt-0 [&_ul:not([data-rt-isolate]_*)]:list-disc [&_ul:not([data-rt-isolate]_*)]:pl-5 [&_ol:not([data-rt-isolate]_*)]:list-decimal [&_ol:not([data-rt-isolate]_*)]:pl-5 [&_li:not([data-rt-isolate]_*)]:pl-1 [&_li+li:not([data-rt-isolate]_*)]:mt-1 [&_li:not([data-rt-isolate]_*)]:marker:text-kit-fg-3 [&_ul[data-task]:not([data-rt-isolate]_*)]:list-none [&_ul[data-task]:not([data-rt-isolate]_*)]:pl-0 [&_ul[data-task]>li:not([data-rt-isolate]_*)]:relative [&_ul[data-task]>li:not([data-rt-isolate]_*)]:pl-7 [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:absolute [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:left-0 [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:top-[0.2em] [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:flex [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:size-4 [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:items-center [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:justify-center [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:rounded-kit-md [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:border [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:border-kit-line-strong [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:bg-kit-surface [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:text-[11px] [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:font-semibold [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:leading-none [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:content-[''] [&_ul[data-task]>li[data-checked=true]:not([data-rt-isolate]_*)]:text-kit-fg-3 [&_ul[data-task]>li[data-checked=true]:not([data-rt-isolate]_*)]:line-through [&_ul[data-task]>li[data-checked=true]:not([data-rt-isolate]_*)]:before:border-kit-inverse [&_ul[data-task]>li[data-checked=true]:not([data-rt-isolate]_*)]:before:bg-kit-inverse [&_ul[data-task]>li[data-checked=true]:not([data-rt-isolate]_*)]:before:text-kit-fg-inverse [&_ul[data-task]>li[data-checked=true]:not([data-rt-isolate]_*)]:before:content-['✓'] [&_blockquote:not([data-rt-isolate]_*)]:border-l-2 [&_blockquote:not([data-rt-isolate]_*)]:border-kit-line-strong [&_blockquote:not([data-rt-isolate]_*)]:pl-4 [&_blockquote:not([data-rt-isolate]_*)]:text-kit-fg-2 [&_blockquote:not([data-rt-isolate]_*)]:italic [&_a:not([data-rt-isolate]_*)]:text-kit-accent-fg [&_a:not([data-rt-isolate]_*)]:underline [&_a:not([data-rt-isolate]_*)]:decoration-kit-accent-line [&_a:not([data-rt-isolate]_*)]:underline-offset-2 [&_a[data-button]:not([data-rt-isolate]_*)]:inline-flex [&_a[data-button]:not([data-rt-isolate]_*)]:h-9 [&_a[data-button]:not([data-rt-isolate]_*)]:items-center [&_a[data-button]:not([data-rt-isolate]_*)]:rounded-kit-md [&_a[data-button]:not([data-rt-isolate]_*)]:bg-kit-inverse [&_a[data-button]:not([data-rt-isolate]_*)]:px-3.5 [&_a[data-button]:not([data-rt-isolate]_*)]:text-kit-sm [&_a[data-button]:not([data-rt-isolate]_*)]:font-medium [&_a[data-button]:not([data-rt-isolate]_*)]:text-kit-fg-inverse [&_a[data-button]:not([data-rt-isolate]_*)]:no-underline [&_abbr:not([data-rt-isolate]_*)]:cursor-help [&_abbr:not([data-rt-isolate]_*)]:underline [&_abbr:not([data-rt-isolate]_*)]:decoration-dotted [&_abbr:not([data-rt-isolate]_*)]:underline-offset-2 [&_sup:not([data-rt-isolate]_*)]:text-[0.7em] [&_sup:not([data-rt-isolate]_*)]:leading-none [&_code:not([data-rt-isolate]_*)]:rounded-kit-md [&_code:not([data-rt-isolate]_*)]:bg-kit-muted [&_code:not([data-rt-isolate]_*)]:px-1 [&_code:not([data-rt-isolate]_*)]:py-px [&_code:not([data-rt-isolate]_*)]:font-kit-mono [&_code:not([data-rt-isolate]_*)]:text-[0.9em] [&_pre:not([data-rt-isolate]_*)]:overflow-x-auto [&_pre:not([data-rt-isolate]_*)]:whitespace-pre-wrap [&_pre:not([data-rt-isolate]_*)]:rounded-kit-lg [&_pre:not([data-rt-isolate]_*)]:bg-kit-code [&_pre:not([data-rt-isolate]_*)]:text-kit-code-fg [&_pre:not([data-rt-isolate]_*)]:p-3 [&_pre:not([data-rt-isolate]_*)]:font-kit-mono [&_pre:not([data-rt-isolate]_*)]:text-kit-sm [&_pre:not([data-rt-isolate]_*)]:border [&_pre:not([data-rt-isolate]_*)]:border-kit-line [&_pre_code:not([data-rt-isolate]_*)]:rounded-none [&_pre_code:not([data-rt-isolate]_*)]:bg-transparent [&_pre_code:not([data-rt-isolate]_*)]:p-0 [&_pre_code:not([data-rt-isolate]_*)]:text-[1em] [&_hr:not([data-rt-isolate]_*)]:my-6 [&_hr:not([data-rt-isolate]_*)]:border-kit-line [&_figure:not([data-rt-isolate]_*)]:my-4 [&_img:not([data-rt-isolate]_*)]:rounded-kit-lg [&_img:not([data-rt-isolate]_*)]:border [&_img:not([data-rt-isolate]_*)]:border-kit-line [&_figcaption:not([data-rt-isolate]_*)]:mt-1.5 [&_figcaption:not([data-rt-isolate]_*)]:text-center [&_figcaption:not([data-rt-isolate]_*)]:text-kit-sm [&_figcaption:not([data-rt-isolate]_*)]:text-kit-fg-3 [&_figure_img:not([data-rt-isolate]_*)]:block [&_figure[data-size=s]_img:not([data-rt-isolate]_*)]:w-1/3 [&_figure[data-size=m]_img:not([data-rt-isolate]_*)]:w-1/2 [&_figure[data-size=l]_img:not([data-rt-isolate]_*)]:w-3/4 [&_figure[data-align=center]_img:not([data-rt-isolate]_*)]:mx-auto [&_figure[data-align=right]_img:not([data-rt-isolate]_*)]:ml-auto [&_figure[data-align=full]_img:not([data-rt-isolate]_*)]:w-full [&_div[data-callout]:not([data-rt-isolate]_*)]:rounded-kit-lg [&_div[data-callout]:not([data-rt-isolate]_*)]:border [&_div[data-callout]:not([data-rt-isolate]_*)]:border-kit-info-line [&_div[data-callout]:not([data-rt-isolate]_*)]:bg-kit-info-soft [&_div[data-callout]:not([data-rt-isolate]_*)]:px-4 [&_div[data-callout]:not([data-rt-isolate]_*)]:py-3 [&_div[data-callout]:not([data-rt-isolate]_*)]:text-kit-fg [&_div[data-callout=tip]:not([data-rt-isolate]_*)]:border-kit-success-line [&_div[data-callout=tip]:not([data-rt-isolate]_*)]:bg-kit-success-soft [&_div[data-callout=warning]:not([data-rt-isolate]_*)]:border-kit-warning-line [&_div[data-callout=warning]:not([data-rt-isolate]_*)]:bg-kit-warning-soft [&_div[data-callout]>p[data-title]:not([data-rt-isolate]_*)]:font-medium [&_details:not([data-rt-isolate]_*)]:rounded-kit-md [&_summary:not([data-rt-isolate]_*)]:cursor-pointer [&_summary:not([data-rt-isolate]_*)]:font-medium [&_details>div:not([data-rt-isolate]_*)]:mt-1 [&_details>div:not([data-rt-isolate]_*)]:border-l [&_details>div:not([data-rt-isolate]_*)]:border-kit-line [&_details>div:not([data-rt-isolate]_*)]:pl-4 [&_details>div:not([data-rt-isolate]_*)]:ml-1 [&_div[data-rt=columns]:not([data-rt-isolate]_*)]:grid [&_div[data-rt=columns]:not([data-rt-isolate]_*)]:gap-4 [&_div[data-cols='2']:not([data-rt-isolate]_*)]:grid-cols-2 [&_div[data-cols='3']:not([data-rt-isolate]_*)]:grid-cols-3 [&_div[data-cols='4']:not([data-rt-isolate]_*)]:grid-cols-4 [&_div[data-gap=s]:not([data-rt-isolate]_*)]:gap-2 [&_div[data-gap=l]:not([data-rt-isolate]_*)]:gap-7 [&_div[data-rt=file]:not([data-rt-isolate]_*)]:rounded-kit-lg [&_div[data-rt=file]:not([data-rt-isolate]_*)]:border [&_div[data-rt=file]:not([data-rt-isolate]_*)]:border-kit-line [&_div[data-rt=file]:not([data-rt-isolate]_*)]:px-3 [&_div[data-rt=file]:not([data-rt-isolate]_*)]:py-2.5 [&_div[data-rt=file]:not([data-rt-isolate]_*)]:text-kit-sm [&_div[data-embed]:not([data-rt-isolate]_*)]:flex [&_div[data-embed]:not([data-rt-isolate]_*)]:aspect-video [&_div[data-embed]:not([data-rt-isolate]_*)]:items-center [&_div[data-embed]:not([data-rt-isolate]_*)]:justify-center [&_div[data-embed]:not([data-rt-isolate]_*)]:rounded-kit-lg [&_div[data-embed]:not([data-rt-isolate]_*)]:border [&_div[data-embed]:not([data-rt-isolate]_*)]:border-kit-line [&_div[data-embed]:not([data-rt-isolate]_*)]:bg-kit-subtle [&_div[data-embed]:not([data-rt-isolate]_*)]:text-kit-sm [&_div[data-embed]:not([data-rt-isolate]_*)]:text-kit-fg-3 [&_div[data-block]:not([data-rt-isolate]_*)]:flex [&_div[data-block]:not([data-rt-isolate]_*)]:items-center [&_div[data-block]:not([data-rt-isolate]_*)]:gap-2 [&_div[data-block]:not([data-rt-isolate]_*)]:rounded-kit-lg [&_div[data-block]:not([data-rt-isolate]_*)]:border [&_div[data-block]:not([data-rt-isolate]_*)]:border-dashed [&_div[data-block]:not([data-rt-isolate]_*)]:border-kit-accent-line [&_div[data-block]:not([data-rt-isolate]_*)]:bg-kit-accent-softer [&_div[data-block]:not([data-rt-isolate]_*)]:px-3 [&_div[data-block]:not([data-rt-isolate]_*)]:py-3 [&_div[data-block]:not([data-rt-isolate]_*)]:text-kit-sm [&_div[data-block]:not([data-rt-isolate]_*)]:text-kit-accent-fg [&_table:not([data-rt-isolate]_*)]:w-full [&_table:not([data-rt-isolate]_*)]:border-collapse [&_table:not([data-rt-isolate]_*)]:text-kit-sm [&_td:not([data-rt-isolate]_*)]:border [&_td:not([data-rt-isolate]_*)]:border-kit-line [&_td:not([data-rt-isolate]_*)]:px-2.5 [&_td:not([data-rt-isolate]_*)]:py-1.5 [&_td:not([data-rt-isolate]_*)]:align-top [&_th:not([data-rt-isolate]_*)]:border [&_th:not([data-rt-isolate]_*)]:border-kit-line [&_th:not([data-rt-isolate]_*)]:bg-kit-subtle [&_th:not([data-rt-isolate]_*)]:px-2.5 [&_th:not([data-rt-isolate]_*)]:py-1.5 [&_th:not([data-rt-isolate]_*)]:text-left [&_th:not([data-rt-isolate]_*)]:align-top [&_th:not([data-rt-isolate]_*)]:font-medium";
51
50
  /** Panel density (≈340px inspector): 13px text, smaller headings. */
52
51
  var RT_PANEL = "text-kit-sm leading-[1.6] [&_h1:not([data-rt-isolate]_*)]:text-kit-xl [&_h1:not([data-rt-isolate]_*)]:leading-7 [&_h2:not([data-rt-isolate]_*)]:text-kit-lg [&_h2:not([data-rt-isolate]_*)]:leading-7 [&_h3:not([data-rt-isolate]_*)]:text-kit-md [&_h4:not([data-rt-isolate]_*)]:text-kit-base [&_h5:not([data-rt-isolate]_*)]:text-kit-sm [&_h6:not([data-rt-isolate]_*)]:text-kit-xs";
@@ -1276,9 +1275,9 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1276
1275
  "h3",
1277
1276
  "blockquote"
1278
1277
  ].includes(s.tag));
1279
- return /* @__PURE__ */ jsxDEV(CatalogComponentsProvider, {
1278
+ return /* @__PURE__ */ jsx(CatalogComponentsProvider, {
1280
1279
  value: components ?? null,
1281
- children: /* @__PURE__ */ jsxDEV("div", {
1280
+ children: /* @__PURE__ */ jsxs("div", {
1282
1281
  ref: wrap,
1283
1282
  "data-rt-editor": "",
1284
1283
  className: cn("relative [--rt-toolbar-h:2rem] pointer-coarse:[--rt-toolbar-h:2.75rem]", "rounded-kit-lg border transition-colors duration-150", expanded ? "bg-[var(--kit-surface-raised)]" : "bg-kit-surface", invalid ? "border-[var(--kit-field-invalid)]" : toolbarOpen ? "border-kit-line-strong" : "border-kit-line"),
@@ -1301,7 +1300,7 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1301
1300
  }, 400);
1302
1301
  },
1303
1302
  children: [
1304
- readOnly ? null : /* @__PURE__ */ jsxDEV(FormatToolbar, {
1303
+ readOnly ? null : /* @__PURE__ */ jsx(FormatToolbar, {
1305
1304
  open: toolbarOpen,
1306
1305
  sticky: !dense,
1307
1306
  stickyTop,
@@ -1361,15 +1360,11 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1361
1360
  onFullscreen: () => setModalOpen(true),
1362
1361
  onMarkdown: toggleMarkdown,
1363
1362
  saveSel
1364
- }, void 0, false, {
1365
- fileName: _jsxFileName,
1366
- lineNumber: 1405,
1367
- columnNumber: 9
1368
- }, this),
1369
- md ? /* @__PURE__ */ jsxDEV("div", {
1363
+ }),
1364
+ md ? /* @__PURE__ */ jsxs("div", {
1370
1365
  className: "px-3 pb-2.5 pt-2.5",
1371
1366
  children: [
1372
- /* @__PURE__ */ jsxDEV(Textarea, {
1367
+ /* @__PURE__ */ jsx(Textarea, {
1373
1368
  "aria-label": "Field content as Markdown",
1374
1369
  spellCheck: false,
1375
1370
  value: md.text,
@@ -1383,22 +1378,14 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1383
1378
  },
1384
1379
  className: cn("font-kit-mono text-kit-xs leading-5", expanded ? "min-h-[60vh]" : dense ? "min-h-[120px]" : "min-h-[190px]"),
1385
1380
  style: scrollable ? { maxHeight } : void 0
1386
- }, void 0, false, {
1387
- fileName: _jsxFileName,
1388
- lineNumber: 1477,
1389
- columnNumber: 11
1390
- }, this),
1391
- /* @__PURE__ */ jsxDEV("p", {
1381
+ }),
1382
+ /* @__PURE__ */ jsx("p", {
1392
1383
  className: "mt-1.5 text-kit-2xs text-kit-fg-3",
1393
1384
  children: "Markdown. Switching back converts it to blocks."
1394
- }, void 0, false, {
1395
- fileName: _jsxFileName,
1396
- lineNumber: 1489,
1397
- columnNumber: 11
1398
- }, this),
1399
- /* @__PURE__ */ jsxDEV(AnimatePresence, {
1385
+ }),
1386
+ /* @__PURE__ */ jsx(AnimatePresence, {
1400
1387
  initial: false,
1401
- children: mdConfirm ? /* @__PURE__ */ jsxDEV(motion.div, {
1388
+ children: mdConfirm ? /* @__PURE__ */ jsxs(motion.div, {
1402
1389
  initial: {
1403
1390
  opacity: 0,
1404
1391
  y: reduceMotion ? 0 : 4
@@ -1416,52 +1403,28 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1416
1403
  "aria-label": "Convert edited Markdown?",
1417
1404
  className: "mt-2 flex flex-wrap items-center gap-2 rounded-kit-lg border border-kit-line bg-kit-subtle px-3 py-2",
1418
1405
  children: [
1419
- /* @__PURE__ */ jsxDEV("span", {
1406
+ /* @__PURE__ */ jsx("span", {
1420
1407
  className: "flex-1 text-kit-sm font-medium text-kit-fg",
1421
1408
  children: "Convert edited Markdown?"
1422
- }, void 0, false, {
1423
- fileName: _jsxFileName,
1424
- lineNumber: 1502,
1425
- columnNumber: 17
1426
- }, this),
1427
- /* @__PURE__ */ jsxDEV(Button, {
1409
+ }),
1410
+ /* @__PURE__ */ jsx(Button, {
1428
1411
  size: "xs",
1429
1412
  variant: "ghost",
1430
1413
  onClick: () => setMdConfirm(false),
1431
1414
  children: "Keep editing Markdown"
1432
- }, void 0, false, {
1433
- fileName: _jsxFileName,
1434
- lineNumber: 1503,
1435
- columnNumber: 17
1436
- }, this),
1437
- /* @__PURE__ */ jsxDEV(Button, {
1415
+ }),
1416
+ /* @__PURE__ */ jsx(Button, {
1438
1417
  size: "xs",
1439
1418
  variant: "primary",
1440
1419
  autoFocus: true,
1441
1420
  onClick: convertMarkdown,
1442
1421
  children: "Convert to rich text"
1443
- }, void 0, false, {
1444
- fileName: _jsxFileName,
1445
- lineNumber: 1506,
1446
- columnNumber: 17
1447
- }, this)
1422
+ })
1448
1423
  ]
1449
- }, "confirm", true, {
1450
- fileName: _jsxFileName,
1451
- lineNumber: 1492,
1452
- columnNumber: 15
1453
- }, this) : null
1454
- }, void 0, false, {
1455
- fileName: _jsxFileName,
1456
- lineNumber: 1490,
1457
- columnNumber: 11
1458
- }, this)
1424
+ }, "confirm") : null
1425
+ })
1459
1426
  ]
1460
- }, void 0, true, {
1461
- fileName: _jsxFileName,
1462
- lineNumber: 1476,
1463
- columnNumber: 9
1464
- }, this) : /* @__PURE__ */ jsxDEV("div", {
1427
+ }) : /* @__PURE__ */ jsxs("div", {
1465
1428
  ref: scroller,
1466
1429
  className: cn("relative", scrollable && "overflow-y-auto"),
1467
1430
  style: scrollable ? { maxHeight } : void 0,
@@ -1473,7 +1436,7 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1473
1436
  placeGutter(b?.getAttribute("data-rt-island") === "component" ? null : b);
1474
1437
  },
1475
1438
  children: [
1476
- /* @__PURE__ */ jsxDEV("div", {
1439
+ /* @__PURE__ */ jsx("div", {
1477
1440
  ref,
1478
1441
  id: inModal ? void 0 : id,
1479
1442
  role: "textbox",
@@ -1555,25 +1518,17 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1555
1518
  }
1556
1519
  },
1557
1520
  className: cn(RT_PROSE, dense && "text-kit-sm leading-[1.6] [&_h1:not([data-rt-isolate]_*)]:text-kit-xl [&_h1:not([data-rt-isolate]_*)]:leading-7 [&_h2:not([data-rt-isolate]_*)]:text-kit-lg [&_h2:not([data-rt-isolate]_*)]:leading-7 [&_h3:not([data-rt-isolate]_*)]:text-kit-md [&_h4:not([data-rt-isolate]_*)]:text-kit-base [&_h5:not([data-rt-isolate]_*)]:text-kit-sm [&_h6:not([data-rt-isolate]_*)]:text-kit-xs", "peer relative outline-none focus-visible:shadow-none [&_*:not([data-rt-isolate]_*)]:outline-none", "[&>p[data-hint]]:before:pointer-events-none [&>p[data-hint]]:before:float-left [&>p[data-hint]]:before:h-0 [&>p[data-hint]]:before:text-kit-fg-4 [&>p[data-hint]]:before:content-[attr(data-hint)]", "[&_a[data-button]:not([data-rt-isolate]_*)]:cursor-pointer [&_ul[data-task]>li:not([data-rt-isolate]_*)]:before:cursor-pointer", "[&_sup[data-rt=fn]]:mx-px [&_sup[data-rt=fn]]:cursor-pointer [&_sup[data-rt=fn]]:rounded-kit-sm [&_sup[data-rt=fn]]:px-0.5 [&_sup[data-rt=fn]]:text-[0.72em] [&_sup[data-rt=fn]]:leading-[0] [&_sup[data-rt=fn]]:font-semibold [&_sup[data-rt=fn]]:text-kit-accent-fg [&_sup[data-rt=fn]:hover]:bg-kit-accent-soft", dense ? "px-2.5 py-2" : "px-4 py-3.5", minH)
1558
- }, void 0, false, {
1559
- fileName: _jsxFileName,
1560
- lineNumber: 1527,
1561
- columnNumber: 11
1562
- }, this),
1563
- empty ? /* @__PURE__ */ jsxDEV("div", {
1521
+ }),
1522
+ empty ? /* @__PURE__ */ jsx("div", {
1564
1523
  "aria-hidden": true,
1565
1524
  className: cn("pointer-events-none absolute text-kit-fg-4 peer-focus:hidden", dense ? "text-kit-sm" : "text-kit-base", dense ? "left-2.5 top-2" : "left-4 top-3.5"),
1566
1525
  children: ph
1567
- }, void 0, false, {
1568
- fileName: _jsxFileName,
1569
- lineNumber: 1622,
1570
- columnNumber: 13
1571
- }, this) : null,
1572
- gutter && showGutter ? /* @__PURE__ */ jsxDEV("div", {
1526
+ }) : null,
1527
+ gutter && showGutter ? /* @__PURE__ */ jsxs("div", {
1573
1528
  "data-rt-gutter": "",
1574
1529
  className: cn("absolute z-[3] flex items-start", gutterMode === "outside" ? "-left-12 pr-1" : "left-0"),
1575
1530
  style: { top: gutter.top + Math.max(-2, Math.min(4, gutter.height / 2 - 12)) },
1576
- children: [gutterMode === "outside" ? /* @__PURE__ */ jsxDEV(Popover, {
1531
+ children: [gutterMode === "outside" ? /* @__PURE__ */ jsxs(Popover, {
1577
1532
  open: gutterInsert,
1578
1533
  onOpenChange: (o) => {
1579
1534
  if (o) {
@@ -1582,30 +1537,18 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1582
1537
  }
1583
1538
  setGutterInsert(o);
1584
1539
  },
1585
- children: [/* @__PURE__ */ jsxDEV(Tooltip, {
1540
+ children: [/* @__PURE__ */ jsx(Tooltip, {
1586
1541
  content: "Add a block below",
1587
1542
  disabled: gutterInsert,
1588
- children: /* @__PURE__ */ jsxDEV(PopoverTrigger, {
1543
+ children: /* @__PURE__ */ jsx(PopoverTrigger, {
1589
1544
  "aria-label": "Add a block below",
1590
1545
  className: cn("flex items-center justify-center rounded-kit-md text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg data-[popup-open]:bg-kit-hover data-[popup-open]:text-kit-fg", btn),
1591
- children: /* @__PURE__ */ jsxDEV(IconPlus, {
1546
+ children: /* @__PURE__ */ jsx(IconPlus, {
1592
1547
  stroke: 1.5,
1593
1548
  "aria-hidden": true
1594
- }, void 0, false, {
1595
- fileName: _jsxFileName,
1596
- lineNumber: 1651,
1597
- columnNumber: 23
1598
- }, this)
1599
- }, void 0, false, {
1600
- fileName: _jsxFileName,
1601
- lineNumber: 1647,
1602
- columnNumber: 21
1603
- }, this)
1604
- }, void 0, false, {
1605
- fileName: _jsxFileName,
1606
- lineNumber: 1646,
1607
- columnNumber: 19
1608
- }, this), gutterInsert ? /* @__PURE__ */ jsxDEV(InsertMenuContent, {
1549
+ })
1550
+ })
1551
+ }), gutterInsert ? /* @__PURE__ */ jsx(InsertMenuContent, {
1609
1552
  side: "bottom",
1610
1553
  align: "start",
1611
1554
  allows,
@@ -1623,22 +1566,14 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1623
1566
  placeCaret(p);
1624
1567
  insertBlock(it);
1625
1568
  }
1626
- }, void 0, false, {
1627
- fileName: _jsxFileName,
1628
- lineNumber: 1655,
1629
- columnNumber: 21
1630
- }, this) : null]
1631
- }, void 0, true, {
1632
- fileName: _jsxFileName,
1633
- lineNumber: 1636,
1634
- columnNumber: 17
1635
- }, this) : null, /* @__PURE__ */ jsxDEV(Menu, {
1569
+ }) : null]
1570
+ }) : null, /* @__PURE__ */ jsxs(Menu, {
1636
1571
  open: blockMenu,
1637
1572
  onOpenChange: setBlockMenu,
1638
- children: [/* @__PURE__ */ jsxDEV(Tooltip, {
1573
+ children: [/* @__PURE__ */ jsx(Tooltip, {
1639
1574
  content: "Drag to move, click for options",
1640
1575
  disabled: blockMenu || !!drag,
1641
- children: /* @__PURE__ */ jsxDEV(MenuTrigger, {
1576
+ children: /* @__PURE__ */ jsx(MenuTrigger, {
1642
1577
  "aria-label": "Block options",
1643
1578
  onPointerDown: onGripDown,
1644
1579
  onKeyDown: (e) => {
@@ -1648,182 +1583,86 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1648
1583
  }
1649
1584
  },
1650
1585
  className: cn("flex cursor-grab items-center justify-center rounded-kit-md text-kit-fg-3 hover:bg-kit-hover hover:text-kit-fg active:cursor-grabbing", gutterMode === "inset" ? "h-[22px] w-4 rounded-kit-sm [&_svg:not([data-rt-isolate]_*)]:size-3.5" : btn, (blockMenu || drag) && "bg-kit-hover text-kit-fg"),
1651
- children: /* @__PURE__ */ jsxDEV(IconGripVertical, {
1586
+ children: /* @__PURE__ */ jsx(IconGripVertical, {
1652
1587
  stroke: 1.5,
1653
1588
  "aria-hidden": true
1654
- }, void 0, false, {
1655
- fileName: _jsxFileName,
1656
- lineNumber: 1694,
1657
- columnNumber: 21
1658
- }, this)
1659
- }, void 0, false, {
1660
- fileName: _jsxFileName,
1661
- lineNumber: 1679,
1662
- columnNumber: 19
1663
- }, this)
1664
- }, void 0, false, {
1665
- fileName: _jsxFileName,
1666
- lineNumber: 1678,
1667
- columnNumber: 17
1668
- }, this), /* @__PURE__ */ jsxDEV(MenuContent, {
1589
+ })
1590
+ })
1591
+ }), /* @__PURE__ */ jsxs(MenuContent, {
1669
1592
  className: "w-56",
1670
1593
  align: "start",
1671
1594
  finalFocus: false,
1672
1595
  children: [
1673
- turnStyles.length > 1 ? /* @__PURE__ */ jsxDEV(MenuSub, { children: [/* @__PURE__ */ jsxDEV(MenuSubTrigger, {
1674
- icon: /* @__PURE__ */ jsxDEV(IconTransform, { stroke: 1.5 }, void 0, false, {
1675
- fileName: _jsxFileName,
1676
- lineNumber: 1700,
1677
- columnNumber: 45
1678
- }, this),
1596
+ turnStyles.length > 1 ? /* @__PURE__ */ jsxs(MenuSub, { children: [/* @__PURE__ */ jsx(MenuSubTrigger, {
1597
+ icon: /* @__PURE__ */ jsx(IconTransform, { stroke: 1.5 }),
1679
1598
  disabled: !gIsText,
1680
1599
  children: "Turn into"
1681
- }, void 0, false, {
1682
- fileName: _jsxFileName,
1683
- lineNumber: 1700,
1684
- columnNumber: 23
1685
- }, this), /* @__PURE__ */ jsxDEV(MenuSubContent, {
1600
+ }), /* @__PURE__ */ jsx(MenuSubContent, {
1686
1601
  className: "w-48",
1687
- children: turnStyles.map((t) => /* @__PURE__ */ jsxDEV(MenuItem, {
1602
+ children: turnStyles.map((t) => /* @__PURE__ */ jsx(MenuItem, {
1688
1603
  icon: t.icon,
1689
1604
  onClick: () => turnInto$1(gBlock ?? null, t.tag),
1690
1605
  children: t.label
1691
- }, t.tag, false, {
1692
- fileName: _jsxFileName,
1693
- lineNumber: 1705,
1694
- columnNumber: 27
1695
- }, this))
1696
- }, void 0, false, {
1697
- fileName: _jsxFileName,
1698
- lineNumber: 1703,
1699
- columnNumber: 23
1700
- }, this)] }, void 0, true, {
1701
- fileName: _jsxFileName,
1702
- lineNumber: 1699,
1703
- columnNumber: 21
1704
- }, this) : null,
1705
- /* @__PURE__ */ jsxDEV(MenuItem, {
1706
- icon: /* @__PURE__ */ jsxDEV(IconCopy, { stroke: 1.5 }, void 0, false, {
1707
- fileName: _jsxFileName,
1708
- lineNumber: 1712,
1709
- columnNumber: 35
1710
- }, this),
1606
+ }, t.tag))
1607
+ })] }) : null,
1608
+ /* @__PURE__ */ jsx(MenuItem, {
1609
+ icon: /* @__PURE__ */ jsx(IconCopy, { stroke: 1.5 }),
1711
1610
  shortcut: "⌘D",
1712
1611
  onClick: () => gBlock && duplicateBlock$1(gBlock),
1713
1612
  children: "Duplicate"
1714
- }, void 0, false, {
1715
- fileName: _jsxFileName,
1716
- lineNumber: 1712,
1717
- columnNumber: 19
1718
- }, this),
1719
- /* @__PURE__ */ jsxDEV(MenuItem, {
1720
- icon: /* @__PURE__ */ jsxDEV(IconArrowBarToUp, { stroke: 1.5 }, void 0, false, {
1721
- fileName: _jsxFileName,
1722
- lineNumber: 1715,
1723
- columnNumber: 35
1724
- }, this),
1613
+ }),
1614
+ /* @__PURE__ */ jsx(MenuItem, {
1615
+ icon: /* @__PURE__ */ jsx(IconArrowBarToUp, { stroke: 1.5 }),
1725
1616
  shortcut: "⌘⇧↑",
1726
1617
  disabled: !gBlock?.previousElementSibling,
1727
1618
  onClick: () => gBlock && moveBlock$1(gBlock, -1),
1728
1619
  children: "Move up"
1729
- }, void 0, false, {
1730
- fileName: _jsxFileName,
1731
- lineNumber: 1715,
1732
- columnNumber: 19
1733
- }, this),
1734
- /* @__PURE__ */ jsxDEV(MenuItem, {
1735
- icon: /* @__PURE__ */ jsxDEV(IconArrowBarToDown, { stroke: 1.5 }, void 0, false, {
1736
- fileName: _jsxFileName,
1737
- lineNumber: 1718,
1738
- columnNumber: 35
1739
- }, this),
1620
+ }),
1621
+ /* @__PURE__ */ jsx(MenuItem, {
1622
+ icon: /* @__PURE__ */ jsx(IconArrowBarToDown, { stroke: 1.5 }),
1740
1623
  shortcut: "⌘⇧↓",
1741
1624
  disabled: !gBlock?.nextElementSibling,
1742
1625
  onClick: () => gBlock && moveBlock$1(gBlock, 1),
1743
1626
  children: "Move down"
1744
- }, void 0, false, {
1745
- fileName: _jsxFileName,
1746
- lineNumber: 1718,
1747
- columnNumber: 19
1748
- }, this),
1749
- /* @__PURE__ */ jsxDEV(MenuSeparator, {}, void 0, false, {
1750
- fileName: _jsxFileName,
1751
- lineNumber: 1721,
1752
- columnNumber: 19
1753
- }, this),
1754
- /* @__PURE__ */ jsxDEV(MenuItem, {
1627
+ }),
1628
+ /* @__PURE__ */ jsx(MenuSeparator, {}),
1629
+ /* @__PURE__ */ jsx(MenuItem, {
1755
1630
  danger: true,
1756
- icon: /* @__PURE__ */ jsxDEV(IconTrash, { stroke: 1.5 }, void 0, false, {
1757
- fileName: _jsxFileName,
1758
- lineNumber: 1722,
1759
- columnNumber: 42
1760
- }, this),
1631
+ icon: /* @__PURE__ */ jsx(IconTrash, { stroke: 1.5 }),
1761
1632
  onClick: () => gBlock && deleteBlock(gBlock),
1762
1633
  children: "Delete"
1763
- }, void 0, false, {
1764
- fileName: _jsxFileName,
1765
- lineNumber: 1722,
1766
- columnNumber: 19
1767
- }, this)
1634
+ })
1768
1635
  ]
1769
- }, void 0, true, {
1770
- fileName: _jsxFileName,
1771
- lineNumber: 1697,
1772
- columnNumber: 17
1773
- }, this)]
1774
- }, void 0, true, {
1775
- fileName: _jsxFileName,
1776
- lineNumber: 1677,
1777
- columnNumber: 15
1778
- }, this)]
1779
- }, void 0, true, {
1780
- fileName: _jsxFileName,
1781
- lineNumber: 1629,
1782
- columnNumber: 13
1783
- }, this) : null,
1784
- drag?.line != null ? /* @__PURE__ */ jsxDEV("div", {
1636
+ })]
1637
+ })]
1638
+ }) : null,
1639
+ drag?.line != null ? /* @__PURE__ */ jsx("div", {
1785
1640
  className: "pointer-events-none absolute inset-x-3 z-[6] h-0.5 rounded-full bg-kit-info",
1786
1641
  style: { top: drag.line }
1787
- }, void 0, false, {
1788
- fileName: _jsxFileName,
1789
- lineNumber: 1729,
1790
- columnNumber: 33
1791
- }, this) : null,
1792
- islands.map(({ id: key, el }) => createPortal(/* @__PURE__ */ jsxDEV(Island, {
1642
+ }) : null,
1643
+ islands.map(({ id: key, el }) => createPortal(/* @__PURE__ */ jsx(Island, {
1793
1644
  el,
1794
1645
  ctx: islandCtx
1795
- }, void 0, false, {
1796
- fileName: _jsxFileName,
1797
- lineNumber: 1732,
1798
- columnNumber: 58
1799
- }, this), el, key))
1646
+ }), el, key))
1800
1647
  ]
1801
- }, void 0, true, {
1802
- fileName: _jsxFileName,
1803
- lineNumber: 1514,
1804
- columnNumber: 9
1805
- }, this),
1806
- /* @__PURE__ */ jsxDEV(FootnotesList, {
1648
+ }),
1649
+ /* @__PURE__ */ jsx(FootnotesList, {
1807
1650
  notes: footnotes,
1808
1651
  readOnly,
1809
1652
  density: dense ? "dense" : "default",
1810
1653
  onEdit: (m) => openFootnote(m),
1811
1654
  onBack: (m) => ref.current && backToMarker(ref.current, m)
1812
- }, void 0, false, {
1813
- fileName: _jsxFileName,
1814
- lineNumber: 1737,
1815
- columnNumber: 7
1816
- }, this),
1817
- counts || notice ? /* @__PURE__ */ jsxDEV("div", {
1655
+ }),
1656
+ counts || notice ? /* @__PURE__ */ jsxs("div", {
1818
1657
  className: "flex h-7 items-center justify-end gap-3 rounded-b-kit-lg border-t border-kit-line-subtle px-3 text-kit-2xs text-kit-fg-3",
1819
- children: [notice ? /* @__PURE__ */ jsxDEV("span", {
1658
+ children: [notice ? /* @__PURE__ */ jsxs("span", {
1820
1659
  role: "status",
1821
1660
  "aria-live": "polite",
1822
1661
  className: "mr-auto min-w-0 truncate text-kit-fg-2",
1823
1662
  children: [
1824
1663
  notice.message,
1825
1664
  notice.description ? ` ${notice.description}` : "",
1826
- notice.action ? /* @__PURE__ */ jsxDEV("button", {
1665
+ notice.action ? /* @__PURE__ */ jsx("button", {
1827
1666
  type: "button",
1828
1667
  className: "ml-1.5 font-medium text-kit-fg underline underline-offset-2",
1829
1668
  onClick: () => {
@@ -1831,17 +1670,9 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1831
1670
  setNotice(null);
1832
1671
  },
1833
1672
  children: notice.action.label
1834
- }, void 0, false, {
1835
- fileName: _jsxFileName,
1836
- lineNumber: 1754,
1837
- columnNumber: 17
1838
- }, this) : null
1673
+ }) : null
1839
1674
  ]
1840
- }, void 0, true, {
1841
- fileName: _jsxFileName,
1842
- lineNumber: 1750,
1843
- columnNumber: 13
1844
- }, this) : null, counts ? /* @__PURE__ */ jsxDEV("span", {
1675
+ }) : null, counts ? /* @__PURE__ */ jsxs("span", {
1845
1676
  className: "tabular-nums",
1846
1677
  children: [
1847
1678
  words.toLocaleString("en-US"),
@@ -1852,17 +1683,9 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1852
1683
  Math.max(1, Math.round(words / 220)),
1853
1684
  " min read"
1854
1685
  ]
1855
- }, void 0, true, {
1856
- fileName: _jsxFileName,
1857
- lineNumber: 1768,
1858
- columnNumber: 13
1859
- }, this) : null]
1860
- }, void 0, true, {
1861
- fileName: _jsxFileName,
1862
- lineNumber: 1748,
1863
- columnNumber: 9
1864
- }, this) : null,
1865
- bubble && !quiet && !readOnly && !slash && !link && !md && !menus.style && !menus.more && !insertOpen ? /* @__PURE__ */ jsxDEV(SelectionBubble, {
1686
+ }) : null]
1687
+ }) : null,
1688
+ bubble && !quiet && !readOnly && !slash && !link && !md && !menus.style && !menus.more && !insertOpen ? /* @__PURE__ */ jsx(SelectionBubble, {
1866
1689
  rect: bubble,
1867
1690
  avoid: toolbarOpen ? wrap.current?.querySelector("[role=\"toolbar\"][aria-label=\"Text formatting\"]")?.getBoundingClientRect() : null,
1868
1691
  fmt,
@@ -1877,20 +1700,12 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1877
1700
  },
1878
1701
  onLink: openLink,
1879
1702
  onComment: commentSel
1880
- }, void 0, false, {
1881
- fileName: _jsxFileName,
1882
- lineNumber: 1778,
1883
- columnNumber: 9
1884
- }, this) : null,
1885
- slash && !md ? createPortal(/* @__PURE__ */ jsxDEV(Fragment, { children: [/* @__PURE__ */ jsxDEV("div", {
1703
+ }) : null,
1704
+ slash && !md ? createPortal(/* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
1886
1705
  "data-floating-layer": "",
1887
1706
  className: "pointer-events-auto fixed inset-0 z-[var(--kit-z-popover,84)]",
1888
1707
  onMouseDown: () => setSlash(null)
1889
- }, void 0, false, {
1890
- fileName: _jsxFileName,
1891
- lineNumber: 1800,
1892
- columnNumber: 15
1893
- }, this), /* @__PURE__ */ jsxDEV(motion.div, {
1708
+ }), /* @__PURE__ */ jsx(motion.div, {
1894
1709
  initial: {
1895
1710
  opacity: 0,
1896
1711
  y: flipUp ? -4 : 4
@@ -1906,7 +1721,7 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1906
1721
  },
1907
1722
  "data-floating-layer": "",
1908
1723
  className: "pointer-events-auto fixed z-[calc(var(--kit-z-popover,84)_+_1)]",
1909
- children: /* @__PURE__ */ jsxDEV(SlashMenuPanel, {
1724
+ children: /* @__PURE__ */ jsx(SlashMenuPanel, {
1910
1725
  query: slash.query,
1911
1726
  folder: slash.folder,
1912
1727
  active: slash.active,
@@ -1917,24 +1732,12 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1917
1732
  }),
1918
1733
  onPick: pickSlash,
1919
1734
  maxHeight: slashMaxH
1920
- }, void 0, false, {
1921
- fileName: _jsxFileName,
1922
- lineNumber: 1812,
1923
- columnNumber: 17
1924
- }, this)
1925
- }, void 0, false, {
1926
- fileName: _jsxFileName,
1927
- lineNumber: 1801,
1928
- columnNumber: 15
1929
- }, this)] }, void 0, true, {
1930
- fileName: _jsxFileName,
1931
- lineNumber: 1799,
1932
- columnNumber: 13
1933
- }, this), document.body) : null,
1934
- /* @__PURE__ */ jsxDEV(Popover, {
1735
+ })
1736
+ })] }), document.body) : null,
1737
+ /* @__PURE__ */ jsxs(Popover, {
1935
1738
  open: !!fnEdit,
1936
1739
  onOpenChange: (o) => !o && closeFootnote(),
1937
- children: [/* @__PURE__ */ jsxDEV(PopoverAnchor, { render: /* @__PURE__ */ jsxDEV("span", {
1740
+ children: [/* @__PURE__ */ jsx(PopoverAnchor, { render: /* @__PURE__ */ jsx("span", {
1938
1741
  className: "pointer-events-none fixed",
1939
1742
  style: fnEdit ? {
1940
1743
  top: fnEdit.rect.bottom,
@@ -1945,18 +1748,10 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1945
1748
  top: 0,
1946
1749
  left: 0
1947
1750
  }
1948
- }, void 0, false, {
1949
- fileName: _jsxFileName,
1950
- lineNumber: 1822,
1951
- columnNumber: 19
1952
- }, this) }, void 0, false, {
1953
- fileName: _jsxFileName,
1954
- lineNumber: 1821,
1955
- columnNumber: 9
1956
- }, this), /* @__PURE__ */ jsxDEV(PopoverContent, {
1751
+ }) }), /* @__PURE__ */ jsx(PopoverContent, {
1957
1752
  className: FOOTNOTE_POPOVER_CLASS,
1958
1753
  finalFocus: false,
1959
- children: fnEdit ? /* @__PURE__ */ jsxDEV(FootnoteEditor, {
1754
+ children: fnEdit ? /* @__PURE__ */ jsx(FootnoteEditor, {
1960
1755
  n: footnotes.findIndex((f) => f.el === fnEdit.el) + 1,
1961
1756
  note: fnEdit.el.getAttribute("data-note") ?? "",
1962
1757
  onChange: (v) => {
@@ -1965,25 +1760,13 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1965
1760
  },
1966
1761
  onRemove: () => removeFootnote(fnEdit.el),
1967
1762
  onDone: closeFootnote
1968
- }, footnotes.findIndex((f) => f.el === fnEdit.el), false, {
1969
- fileName: _jsxFileName,
1970
- lineNumber: 1826,
1971
- columnNumber: 13
1972
- }, this) : null
1973
- }, void 0, false, {
1974
- fileName: _jsxFileName,
1975
- lineNumber: 1824,
1976
- columnNumber: 9
1977
- }, this)]
1978
- }, void 0, true, {
1979
- fileName: _jsxFileName,
1980
- lineNumber: 1820,
1981
- columnNumber: 7
1982
- }, this),
1983
- /* @__PURE__ */ jsxDEV(Popover, {
1763
+ }, footnotes.findIndex((f) => f.el === fnEdit.el)) : null
1764
+ })]
1765
+ }),
1766
+ /* @__PURE__ */ jsxs(Popover, {
1984
1767
  open: !!link,
1985
1768
  onOpenChange: (o) => !o && setLink(null),
1986
- children: [/* @__PURE__ */ jsxDEV(PopoverAnchor, { render: /* @__PURE__ */ jsxDEV("span", {
1769
+ children: [/* @__PURE__ */ jsx(PopoverAnchor, { render: /* @__PURE__ */ jsx("span", {
1987
1770
  className: "pointer-events-none fixed",
1988
1771
  style: link ? {
1989
1772
  top: link.rect.bottom,
@@ -1994,18 +1777,10 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
1994
1777
  top: 0,
1995
1778
  left: 0
1996
1779
  }
1997
- }, void 0, false, {
1998
- fileName: _jsxFileName,
1999
- lineNumber: 1844,
2000
- columnNumber: 19
2001
- }, this) }, void 0, false, {
2002
- fileName: _jsxFileName,
2003
- lineNumber: 1843,
2004
- columnNumber: 9
2005
- }, this), /* @__PURE__ */ jsxDEV(PopoverContent, {
1780
+ }) }), /* @__PURE__ */ jsx(PopoverContent, {
2006
1781
  className: "w-[340px] rounded-kit-lg p-3",
2007
1782
  finalFocus: false,
2008
- children: link?.button ? /* @__PURE__ */ jsxDEV(ButtonLinkPanel, {
1783
+ children: link?.button ? /* @__PURE__ */ jsx(ButtonLinkPanel, {
2009
1784
  initial: link.initial,
2010
1785
  label: link.button.label,
2011
1786
  allowNewTab,
@@ -2017,13 +1792,9 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
2017
1792
  if (ref.current) removeButton(ref.current, a);
2018
1793
  emit();
2019
1794
  }
2020
- }, void 0, false, {
2021
- fileName: _jsxFileName,
2022
- lineNumber: 1848,
2023
- columnNumber: 13
2024
- }, this) : link ? /* @__PURE__ */ jsxDEV("div", {
1795
+ }) : link ? /* @__PURE__ */ jsx("div", {
2025
1796
  className: "flex flex-col gap-2",
2026
- children: /* @__PURE__ */ jsxDEV(LinkPopoverBody, {
1797
+ children: /* @__PURE__ */ jsx(LinkPopoverBody, {
2027
1798
  initial: toLinkValue(link.initial),
2028
1799
  hideNewTab: !allowNewTab,
2029
1800
  onSave: (v) => saveLink(fromLinkValue(v, allowNewTab)),
@@ -2034,33 +1805,17 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
2034
1805
  setLink(null);
2035
1806
  emit();
2036
1807
  } : void 0
2037
- }, void 0, false, {
2038
- fileName: _jsxFileName,
2039
- lineNumber: 1863,
2040
- columnNumber: 15
2041
- }, this)
2042
- }, void 0, false, {
2043
- fileName: _jsxFileName,
2044
- lineNumber: 1862,
2045
- columnNumber: 13
2046
- }, this) : null
2047
- }, void 0, false, {
2048
- fileName: _jsxFileName,
2049
- lineNumber: 1846,
2050
- columnNumber: 9
2051
- }, this)]
2052
- }, void 0, true, {
2053
- fileName: _jsxFileName,
2054
- lineNumber: 1842,
2055
- columnNumber: 7
2056
- }, this),
2057
- !hideFullscreen ? /* @__PURE__ */ jsxDEV(ExpandedEditorModal, {
1808
+ })
1809
+ }) : null
1810
+ })]
1811
+ }),
1812
+ !hideFullscreen ? /* @__PURE__ */ jsx(ExpandedEditorModal, {
2058
1813
  open: modalOpen,
2059
1814
  onOpenChange: setModalOpen,
2060
1815
  crumbs: expandCrumbs?.length ? expandCrumbs : ["Text"],
2061
1816
  returnFocus: () => ref.current,
2062
1817
  meta: bodyCountLabel(value),
2063
- children: modalOpen ? /* @__PURE__ */ jsxDEV(RichTextEditor, {
1818
+ children: modalOpen ? /* @__PURE__ */ jsx(RichTextEditor, {
2064
1819
  value,
2065
1820
  onChange,
2066
1821
  readOnly,
@@ -2077,27 +1832,11 @@ function RichTextEditor({ value, onChange, readOnly, placeholder, docKey, featur
2077
1832
  autoFocus: true,
2078
1833
  onComment,
2079
1834
  components
2080
- }, void 0, false, {
2081
- fileName: _jsxFileName,
2082
- lineNumber: 1886,
2083
- columnNumber: 13
2084
- }, this) : null
2085
- }, void 0, false, {
2086
- fileName: _jsxFileName,
2087
- lineNumber: 1884,
2088
- columnNumber: 9
2089
- }, this) : null
1835
+ }) : null
1836
+ }) : null
2090
1837
  ]
2091
- }, void 0, true, {
2092
- fileName: _jsxFileName,
2093
- lineNumber: 1373,
2094
- columnNumber: 5
2095
- }, this)
2096
- }, void 0, false, {
2097
- fileName: _jsxFileName,
2098
- lineNumber: 1372,
2099
- columnNumber: 5
2100
- }, this);
1838
+ })
1839
+ });
2101
1840
  }
2102
1841
  //#endregion
2103
1842
  export { RT_PANEL, RT_PROSE, RichTextEditor, bodyCountLabel, countComponents, countWords, slashPlacement };