@youcan/celeste 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (534) hide show
  1. package/dist/celeste.css +1030 -634
  2. package/dist/cjs/bar-chart.cjs +2 -0
  3. package/dist/cjs/chart-card.cjs +2 -0
  4. package/dist/cjs/chart-legend.cjs +2 -0
  5. package/dist/cjs/chart-plot.cjs +2 -0
  6. package/dist/cjs/chart-tooltip.cjs +25 -0
  7. package/dist/cjs/chart.cjs +38 -0
  8. package/dist/cjs/chunks/BubbleSelect.cjs +5 -6
  9. package/dist/cjs/chunks/CollapsibleRoot.cjs +3 -4
  10. package/dist/cjs/chunks/Collection.cjs +3 -4
  11. package/dist/cjs/chunks/ComboboxContent.cjs +7 -7
  12. package/dist/cjs/chunks/ComboboxGroup.cjs +4 -5
  13. package/dist/cjs/chunks/ComboboxInput.cjs +3 -4
  14. package/dist/cjs/chunks/ComboboxItem.cjs +7 -7
  15. package/dist/cjs/chunks/ComboboxLabel.cjs +1 -2
  16. package/dist/cjs/chunks/ComboboxRoot.cjs +17 -14
  17. package/dist/cjs/chunks/ComboboxSeparator.cjs +1 -2
  18. package/dist/cjs/chunks/ConfigProvider.cjs +2 -2
  19. package/dist/cjs/chunks/DialogClose.cjs +1 -2
  20. package/dist/cjs/chunks/DialogDescription.cjs +1 -2
  21. package/dist/cjs/chunks/DialogPortal.cjs +10 -10
  22. package/dist/cjs/chunks/DialogRoot.cjs +3 -4
  23. package/dist/cjs/chunks/DialogTitle.cjs +1 -2
  24. package/dist/cjs/chunks/DialogTrigger.cjs +1 -2
  25. package/dist/cjs/chunks/DismissableLayer.cjs +5 -5
  26. package/dist/cjs/chunks/DropdownMenuPortal.cjs +2 -3
  27. package/dist/cjs/chunks/DropdownMenuRoot.cjs +3 -4
  28. package/dist/cjs/chunks/FocusScope.cjs +7 -7
  29. package/dist/cjs/chunks/Label.cjs +1 -2
  30. package/dist/cjs/chunks/MenuAnchor.cjs +1 -2
  31. package/dist/cjs/chunks/MenuContentImpl.cjs +4 -4
  32. package/dist/cjs/chunks/MenuGroup.cjs +2 -3
  33. package/dist/cjs/chunks/MenuItemImpl.cjs +1 -2
  34. package/dist/cjs/chunks/MenuRoot.cjs +8 -8
  35. package/dist/cjs/chunks/MenuSub.cjs +3 -4
  36. package/dist/cjs/chunks/PaginationRoot.cjs +3 -4
  37. package/dist/cjs/chunks/PinInputRoot.cjs +3 -4
  38. package/dist/cjs/chunks/PopoverRoot.cjs +3 -4
  39. package/dist/cjs/chunks/PopperAnchor.cjs +1 -2
  40. package/dist/cjs/chunks/PopperArrow.cjs +2 -3
  41. package/dist/cjs/chunks/PopperContent.cjs +263 -298
  42. package/dist/cjs/chunks/PopperRoot.cjs +2 -3
  43. package/dist/cjs/chunks/Presence.cjs +7 -7
  44. package/dist/cjs/chunks/Primitive.cjs +5 -6
  45. package/dist/cjs/chunks/ProgressIndicator.cjs +4 -5
  46. package/dist/cjs/chunks/RadioGroupRoot.cjs +3 -4
  47. package/dist/cjs/chunks/RovingFocusGroup.cjs +6 -6
  48. package/dist/cjs/chunks/RovingFocusItem.cjs +1 -2
  49. package/dist/cjs/chunks/SelectGroup.cjs +2 -3
  50. package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +9 -9
  51. package/dist/cjs/chunks/TabsRoot.cjs +4 -5
  52. package/dist/cjs/chunks/Teleport.cjs +2 -3
  53. package/dist/cjs/chunks/ToggleGroupRoot.cjs +4 -5
  54. package/dist/cjs/chunks/TooltipProvider.cjs +2 -3
  55. package/dist/cjs/chunks/TooltipRoot.cjs +5 -5
  56. package/dist/cjs/chunks/VisuallyHidden.cjs +1 -2
  57. package/dist/cjs/chunks/VisuallyHiddenInput.cjs +4 -4
  58. package/dist/cjs/chunks/alert.cjs +17 -12
  59. package/dist/cjs/chunks/alpha-slider.cjs +1 -4
  60. package/dist/cjs/chunks/badge.cjs +18 -13
  61. package/dist/cjs/chunks/bar-chart.cjs +10322 -0
  62. package/dist/cjs/chunks/button.cjs +12 -7
  63. package/dist/cjs/chunks/calendar.cjs +39 -33
  64. package/dist/cjs/chunks/chart-card.cjs +69 -0
  65. package/dist/cjs/chunks/chart-legend.cjs +88 -0
  66. package/dist/cjs/chunks/chart-plot.cjs +92 -0
  67. package/dist/cjs/chunks/checkbox-card.cjs +15 -10
  68. package/dist/cjs/chunks/checkbox-label.cjs +11 -6
  69. package/dist/cjs/chunks/checkbox.cjs +18 -12
  70. package/dist/cjs/chunks/clamp.cjs +1 -1
  71. package/dist/cjs/chunks/collapsible-content.cjs +9 -4
  72. package/dist/cjs/chunks/collapsible-trigger.cjs +1 -2
  73. package/dist/cjs/chunks/collapsible.cjs +0 -1
  74. package/dist/cjs/chunks/color-area.cjs +3 -4
  75. package/dist/cjs/chunks/color-picker.cjs +69 -42
  76. package/dist/cjs/chunks/color-swatch.cjs +4 -5
  77. package/dist/cjs/chunks/combobox-anchor.cjs +11 -5
  78. package/dist/cjs/chunks/combobox-empty.cjs +10 -5
  79. package/dist/cjs/chunks/combobox-group.cjs +11 -6
  80. package/dist/cjs/chunks/combobox-input.cjs +11 -6
  81. package/dist/cjs/chunks/combobox-item.cjs +23 -17
  82. package/dist/cjs/chunks/combobox-list.cjs +14 -8
  83. package/dist/cjs/chunks/combobox-root.cjs +2 -3
  84. package/dist/cjs/chunks/combobox-separator.cjs +9 -4
  85. package/dist/cjs/chunks/combobox-trigger.cjs +14 -8
  86. package/dist/cjs/chunks/combobox.cjs +14 -14
  87. package/dist/cjs/chunks/compact-button.cjs +13 -8
  88. package/dist/cjs/chunks/components.cjs +20 -4
  89. package/dist/cjs/chunks/content-divider.cjs +14 -9
  90. package/dist/cjs/chunks/counter-input.cjs +145 -111
  91. package/dist/cjs/chunks/createContext.cjs +1 -2
  92. package/dist/cjs/chunks/date-picker.cjs +14 -9
  93. package/dist/cjs/chunks/digit-input-group.cjs +12 -6
  94. package/dist/cjs/chunks/digit-input-slot.cjs +13 -7
  95. package/dist/cjs/chunks/digit-input.cjs +13 -7
  96. package/dist/cjs/chunks/dist.cjs +120 -230
  97. package/dist/cjs/chunks/dist2.cjs +459 -15492
  98. package/dist/cjs/chunks/dist3.cjs +16177 -0
  99. package/dist/cjs/chunks/dropdown-menu-content.cjs +15 -9
  100. package/dist/cjs/chunks/dropdown-menu-group.cjs +3 -4
  101. package/dist/cjs/chunks/dropdown-menu-item.cjs +13 -7
  102. package/dist/cjs/chunks/dropdown-menu-label.cjs +13 -7
  103. package/dist/cjs/chunks/dropdown-menu-separator.cjs +11 -6
  104. package/dist/cjs/chunks/dropdown-menu-sub-content.cjs +13 -7
  105. package/dist/cjs/chunks/dropdown-menu-sub-trigger.cjs +13 -7
  106. package/dist/cjs/chunks/dropdown-menu-sub.cjs +2 -3
  107. package/dist/cjs/chunks/dropdown-menu-trigger.cjs +3 -4
  108. package/dist/cjs/chunks/dropdown-menu.cjs +11 -5
  109. package/dist/cjs/chunks/extra-settings.cjs +3 -7
  110. package/dist/cjs/chunks/fancy-button.cjs +12 -7
  111. package/dist/cjs/chunks/file-upload-area.cjs +24 -17
  112. package/dist/cjs/chunks/getActiveElement.cjs +1 -1
  113. package/dist/cjs/chunks/handleAndDispatchCustomEvent.cjs +1 -1
  114. package/dist/cjs/chunks/hint-text.cjs +13 -8
  115. package/dist/cjs/chunks/hue-slider.cjs +3 -6
  116. package/dist/cjs/chunks/isValueEqualOrExist.cjs +1 -1
  117. package/dist/cjs/chunks/label2.cjs +15 -10
  118. package/dist/cjs/chunks/link-bubble.cjs +12 -15
  119. package/dist/cjs/chunks/link-button.cjs +14 -9
  120. package/dist/cjs/chunks/menus.cjs +236 -42
  121. package/dist/cjs/chunks/modal-body.cjs +9 -4
  122. package/dist/cjs/chunks/modal-close.cjs +0 -1
  123. package/dist/cjs/chunks/modal-content.cjs +18 -6
  124. package/dist/cjs/chunks/modal-footer.cjs +9 -4
  125. package/dist/cjs/chunks/modal-header.cjs +18 -13
  126. package/dist/cjs/chunks/modal-trigger.cjs +0 -1
  127. package/dist/cjs/chunks/modal.cjs +0 -1
  128. package/dist/cjs/chunks/nullish.cjs +1 -1
  129. package/dist/cjs/chunks/ohash.D__AXeF1.cjs +1 -1
  130. package/dist/cjs/chunks/pagination-content.cjs +14 -9
  131. package/dist/cjs/chunks/pagination-ellipsis.cjs +12 -7
  132. package/dist/cjs/chunks/pagination-first.cjs +11 -5
  133. package/dist/cjs/chunks/pagination-item.cjs +10 -5
  134. package/dist/cjs/chunks/pagination-last.cjs +11 -5
  135. package/dist/cjs/chunks/pagination-next.cjs +11 -5
  136. package/dist/cjs/chunks/pagination-previous.cjs +11 -5
  137. package/dist/cjs/chunks/pagination.cjs +12 -6
  138. package/dist/cjs/chunks/popover-content.cjs +27 -21
  139. package/dist/cjs/chunks/popover-trigger.cjs +3 -4
  140. package/dist/cjs/chunks/popover.cjs +0 -1
  141. package/dist/cjs/chunks/progress-bar.cjs +14 -9
  142. package/dist/cjs/chunks/progress-circle.cjs +10 -5
  143. package/dist/cjs/chunks/radio-group-card.cjs +15 -10
  144. package/dist/cjs/chunks/radio-group-item.cjs +15 -9
  145. package/dist/cjs/chunks/radio-group-label.cjs +11 -6
  146. package/dist/cjs/chunks/radio-group.cjs +9 -3
  147. package/dist/cjs/chunks/range-calendar.cjs +56 -47
  148. package/dist/cjs/chunks/range-picker.cjs +19 -14
  149. package/dist/cjs/chunks/rich-editor.cjs +1130 -262
  150. package/dist/cjs/chunks/{chunk.cjs → rolldown-runtime.cjs} +8 -1
  151. package/dist/cjs/chunks/scroll-area.cjs +13 -8
  152. package/dist/cjs/chunks/scroll-bar.cjs +43 -29
  153. package/dist/cjs/chunks/segmented-control-item.cjs +12 -7
  154. package/dist/cjs/chunks/segmented-control.cjs +11 -5
  155. package/dist/cjs/chunks/select-content.cjs +16 -10
  156. package/dist/cjs/chunks/select-group.cjs +0 -1
  157. package/dist/cjs/chunks/select-icon.cjs +9 -4
  158. package/dist/cjs/chunks/select-item.cjs +17 -11
  159. package/dist/cjs/chunks/select-label.cjs +10 -5
  160. package/dist/cjs/chunks/select-separator.cjs +10 -5
  161. package/dist/cjs/chunks/select-trigger.cjs +12 -7
  162. package/dist/cjs/chunks/select-value.cjs +10 -5
  163. package/dist/cjs/chunks/select.cjs +9 -3
  164. package/dist/cjs/chunks/sheet-close.cjs +9 -4
  165. package/dist/cjs/chunks/sheet-content.cjs +13 -7
  166. package/dist/cjs/chunks/sheet-description.cjs +11 -6
  167. package/dist/cjs/chunks/sheet-footer.cjs +9 -4
  168. package/dist/cjs/chunks/sheet-header.cjs +9 -4
  169. package/dist/cjs/chunks/sheet-title.cjs +11 -6
  170. package/dist/cjs/chunks/sheet-trigger.cjs +0 -1
  171. package/dist/cjs/chunks/sheet.cjs +0 -1
  172. package/dist/cjs/chunks/sidebar-content.cjs +7 -2
  173. package/dist/cjs/chunks/sidebar-element.cjs +8 -3
  174. package/dist/cjs/chunks/sidebar-footer.cjs +7 -2
  175. package/dist/cjs/chunks/sidebar-group-content.cjs +9 -4
  176. package/dist/cjs/chunks/sidebar-group-label.cjs +9 -4
  177. package/dist/cjs/chunks/sidebar-group.cjs +7 -2
  178. package/dist/cjs/chunks/sidebar-header.cjs +7 -2
  179. package/dist/cjs/chunks/sidebar-menu-action.cjs +10 -5
  180. package/dist/cjs/chunks/sidebar-menu-badge.cjs +11 -6
  181. package/dist/cjs/chunks/sidebar-menu-button.cjs +11 -6
  182. package/dist/cjs/chunks/sidebar-menu-item.cjs +7 -2
  183. package/dist/cjs/chunks/sidebar-menu-sub-button.cjs +12 -7
  184. package/dist/cjs/chunks/sidebar-menu-sub-item.cjs +7 -2
  185. package/dist/cjs/chunks/sidebar-menu-sub.cjs +7 -2
  186. package/dist/cjs/chunks/sidebar-menu.cjs +7 -2
  187. package/dist/cjs/chunks/sidebar-provider.cjs +14 -8
  188. package/dist/cjs/chunks/sidebar-trigger.cjs +10 -5
  189. package/dist/cjs/chunks/sidebar.cjs +11 -6
  190. package/dist/cjs/chunks/slider.cjs +38 -24
  191. package/dist/cjs/chunks/social-button.cjs +5 -6
  192. package/dist/cjs/chunks/sonner-alert.cjs +2 -3
  193. package/dist/cjs/chunks/sonner.cjs +4 -4
  194. package/dist/cjs/chunks/status-badge.cjs +13 -8
  195. package/dist/cjs/chunks/switch.cjs +13 -7
  196. package/dist/cjs/chunks/tab-menu-content.cjs +10 -5
  197. package/dist/cjs/chunks/tab-menu-item.cjs +12 -6
  198. package/dist/cjs/chunks/tab-menu-list.cjs +10 -5
  199. package/dist/cjs/chunks/tab-menu.cjs +2 -3
  200. package/dist/cjs/chunks/table-body.cjs +9 -4
  201. package/dist/cjs/chunks/table-caption.cjs +9 -4
  202. package/dist/cjs/chunks/table-cell.cjs +9 -4
  203. package/dist/cjs/chunks/table-footer.cjs +9 -4
  204. package/dist/cjs/chunks/table-head.cjs +9 -4
  205. package/dist/cjs/chunks/table-header.cjs +7 -2
  206. package/dist/cjs/chunks/table-row.cjs +9 -4
  207. package/dist/cjs/chunks/table.cjs +9 -4
  208. package/dist/cjs/chunks/table2.cjs +9 -4
  209. package/dist/cjs/chunks/tag.cjs +16 -11
  210. package/dist/cjs/chunks/text-input-affix.cjs +9 -4
  211. package/dist/cjs/chunks/text-input-button.cjs +9 -4
  212. package/dist/cjs/chunks/text-input.cjs +10 -10
  213. package/dist/cjs/chunks/textarea.cjs +15 -10
  214. package/dist/cjs/chunks/tooltip-content.cjs +38 -32
  215. package/dist/cjs/chunks/tooltip-provider.cjs +0 -1
  216. package/dist/cjs/chunks/tooltip-root.cjs +2 -2
  217. package/dist/cjs/chunks/tooltip-trigger.cjs +1 -2
  218. package/dist/cjs/chunks/tooltip.cjs +17 -11
  219. package/dist/cjs/chunks/use-color-model.cjs +7 -12
  220. package/dist/cjs/chunks/useArrowNavigation.cjs +1 -1
  221. package/dist/cjs/chunks/useCalendar.cjs +669 -598
  222. package/dist/cjs/chunks/useComposing.cjs +1 -2
  223. package/dist/cjs/chunks/useDirection.cjs +1 -2
  224. package/dist/cjs/chunks/useEmitAsProps.cjs +1 -2
  225. package/dist/cjs/chunks/useFocusGuards.cjs +1 -2
  226. package/dist/cjs/chunks/useFormControl.cjs +2 -3
  227. package/dist/cjs/chunks/useForwardExpose.cjs +2 -3
  228. package/dist/cjs/chunks/useForwardProps.cjs +1 -2
  229. package/dist/cjs/chunks/useForwardPropsEmits.cjs +1 -2
  230. package/dist/cjs/chunks/useForwardScopeId.cjs +1 -2
  231. package/dist/cjs/chunks/useHideOthers.cjs +4 -5
  232. package/dist/cjs/chunks/useId.cjs +3 -3
  233. package/dist/cjs/chunks/useKbd.cjs +1 -1
  234. package/dist/cjs/chunks/useLocale.cjs +1 -2
  235. package/dist/cjs/chunks/useNonce.cjs +1 -2
  236. package/dist/cjs/chunks/usePrimitiveElement.cjs +2 -3
  237. package/dist/cjs/chunks/useSize.cjs +2 -3
  238. package/dist/cjs/chunks/useTypeahead.cjs +1 -1
  239. package/dist/cjs/chunks/utils.cjs +1 -1
  240. package/dist/cjs/chunks/utils2.cjs +1 -1
  241. package/dist/cjs/chunks/utils3.cjs +1 -1
  242. package/dist/cjs/color.cjs +1 -3
  243. package/dist/cjs/command-group.cjs +11 -6
  244. package/dist/cjs/command-input.cjs +12 -6
  245. package/dist/cjs/command-item.cjs +10 -4
  246. package/dist/cjs/command-list.cjs +10 -4
  247. package/dist/cjs/command-root.cjs +10 -4
  248. package/dist/cjs/command-separator.cjs +9 -4
  249. package/dist/cjs/config.cjs +0 -1
  250. package/dist/cjs/index.cjs +21 -1
  251. package/dist/cjs/use-chart-motion.cjs +17 -0
  252. package/dist/cjs/use-delegated-props.cjs +0 -1
  253. package/dist/cjs/use-locale.cjs +8 -0
  254. package/dist/cjs/use-sidebar.cjs +1 -1
  255. package/dist/cjs/use-user-select.cjs +0 -1
  256. package/dist/components/chart/bar-chart.d.ts +39 -0
  257. package/dist/components/chart/chart-card.d.ts +26 -0
  258. package/dist/components/chart/chart-legend.d.ts +32 -0
  259. package/dist/components/chart/chart-plot.d.ts +35 -0
  260. package/dist/components/chart/chart-tooltip.d.ts +11 -0
  261. package/dist/components/chart/index.d.ts +9 -0
  262. package/dist/components/color-picker/hue-slider.d.ts +1 -4
  263. package/dist/components/digit-input/digit-input.d.ts +1 -1
  264. package/dist/components/index.d.ts +1 -0
  265. package/dist/components/popover/popover-content.d.ts +1 -1
  266. package/dist/components/progress/progress-bar.d.ts +1 -1
  267. package/dist/components/text-input/text-input.d.ts +1 -0
  268. package/dist/composables/index.d.ts +2 -0
  269. package/dist/composables/use-chart-motion.d.ts +7 -0
  270. package/dist/composables/use-locale.d.ts +2 -0
  271. package/dist/es/bar-chart.js +2 -0
  272. package/dist/es/chart-card.js +2 -0
  273. package/dist/es/chart-legend.js +2 -0
  274. package/dist/es/chart-plot.js +2 -0
  275. package/dist/es/chart-tooltip.js +24 -0
  276. package/dist/es/chart.js +33 -0
  277. package/dist/es/chunks/BubbleSelect.js +5 -5
  278. package/dist/es/chunks/CollapsibleRoot.js +3 -3
  279. package/dist/es/chunks/Collection.js +3 -3
  280. package/dist/es/chunks/ComboboxContent.js +9 -8
  281. package/dist/es/chunks/ComboboxGroup.js +4 -4
  282. package/dist/es/chunks/ComboboxInput.js +3 -3
  283. package/dist/es/chunks/ComboboxItem.js +7 -6
  284. package/dist/es/chunks/ComboboxLabel.js +1 -1
  285. package/dist/es/chunks/ComboboxRoot.js +15 -11
  286. package/dist/es/chunks/ComboboxSeparator.js +1 -1
  287. package/dist/es/chunks/ConfigProvider.js +2 -2
  288. package/dist/es/chunks/DialogClose.js +1 -1
  289. package/dist/es/chunks/DialogDescription.js +1 -1
  290. package/dist/es/chunks/DialogPortal.js +10 -9
  291. package/dist/es/chunks/DialogRoot.js +3 -3
  292. package/dist/es/chunks/DialogTitle.js +1 -1
  293. package/dist/es/chunks/DialogTrigger.js +1 -1
  294. package/dist/es/chunks/DismissableLayer.js +5 -4
  295. package/dist/es/chunks/DropdownMenuPortal.js +2 -2
  296. package/dist/es/chunks/DropdownMenuRoot.js +3 -3
  297. package/dist/es/chunks/FocusScope.js +7 -6
  298. package/dist/es/chunks/Label.js +1 -1
  299. package/dist/es/chunks/MenuAnchor.js +1 -1
  300. package/dist/es/chunks/MenuContentImpl.js +5 -4
  301. package/dist/es/chunks/MenuGroup.js +2 -2
  302. package/dist/es/chunks/MenuItemImpl.js +1 -1
  303. package/dist/es/chunks/MenuRoot.js +6 -5
  304. package/dist/es/chunks/MenuSub.js +3 -3
  305. package/dist/es/chunks/PaginationRoot.js +3 -3
  306. package/dist/es/chunks/PinInputRoot.js +3 -3
  307. package/dist/es/chunks/PopoverRoot.js +3 -3
  308. package/dist/es/chunks/PopperAnchor.js +1 -1
  309. package/dist/es/chunks/PopperArrow.js +3 -3
  310. package/dist/es/chunks/PopperContent.js +261 -321
  311. package/dist/es/chunks/PopperRoot.js +2 -2
  312. package/dist/es/chunks/Presence.js +6 -5
  313. package/dist/es/chunks/Primitive.js +5 -5
  314. package/dist/es/chunks/ProgressIndicator.js +4 -4
  315. package/dist/es/chunks/RadioGroupRoot.js +3 -3
  316. package/dist/es/chunks/RovingFocusGroup.js +6 -5
  317. package/dist/es/chunks/RovingFocusItem.js +1 -1
  318. package/dist/es/chunks/SelectGroup.js +2 -2
  319. package/dist/es/chunks/SelectItemAlignedPosition.js +10 -9
  320. package/dist/es/chunks/TabsRoot.js +4 -4
  321. package/dist/es/chunks/Teleport.js +2 -2
  322. package/dist/es/chunks/ToggleGroupRoot.js +4 -4
  323. package/dist/es/chunks/TooltipProvider.js +2 -2
  324. package/dist/es/chunks/TooltipRoot.js +5 -4
  325. package/dist/es/chunks/VisuallyHidden.js +1 -1
  326. package/dist/es/chunks/VisuallyHiddenInput.js +4 -3
  327. package/dist/es/chunks/alert.js +16 -10
  328. package/dist/es/chunks/alpha-slider.js +1 -3
  329. package/dist/es/chunks/badge.js +17 -11
  330. package/dist/es/chunks/bar-chart.js +10314 -0
  331. package/dist/es/chunks/button.js +11 -5
  332. package/dist/es/chunks/calendar.js +39 -32
  333. package/dist/es/chunks/chart-card.js +63 -0
  334. package/dist/es/chunks/chart-legend.js +82 -0
  335. package/dist/es/chunks/chart-plot.js +87 -0
  336. package/dist/es/chunks/checkbox-card.js +14 -8
  337. package/dist/es/chunks/checkbox-label.js +10 -4
  338. package/dist/es/chunks/checkbox.js +18 -11
  339. package/dist/es/chunks/clamp.js +1 -1
  340. package/dist/es/chunks/collapsible-content.js +9 -3
  341. package/dist/es/chunks/collapsible-trigger.js +1 -1
  342. package/dist/es/chunks/color-area.js +7 -5
  343. package/dist/es/chunks/color-picker.js +68 -40
  344. package/dist/es/chunks/color-swatch.js +3 -3
  345. package/dist/es/chunks/combobox-anchor.js +11 -4
  346. package/dist/es/chunks/combobox-empty.js +9 -3
  347. package/dist/es/chunks/combobox-group.js +10 -4
  348. package/dist/es/chunks/combobox-input.js +10 -4
  349. package/dist/es/chunks/combobox-item.js +22 -15
  350. package/dist/es/chunks/combobox-list.js +13 -6
  351. package/dist/es/chunks/combobox-root.js +1 -1
  352. package/dist/es/chunks/combobox-separator.js +8 -2
  353. package/dist/es/chunks/combobox-trigger.js +13 -6
  354. package/dist/es/chunks/combobox.js +13 -12
  355. package/dist/es/chunks/compact-button.js +12 -6
  356. package/dist/es/chunks/components.js +19 -3
  357. package/dist/es/chunks/content-divider.js +14 -8
  358. package/dist/es/chunks/counter-input.js +141 -106
  359. package/dist/es/chunks/createContext.js +1 -1
  360. package/dist/es/chunks/date-picker.js +13 -7
  361. package/dist/es/chunks/digit-input-group.js +11 -4
  362. package/dist/es/chunks/digit-input-slot.js +12 -5
  363. package/dist/es/chunks/digit-input.js +12 -5
  364. package/dist/es/chunks/dist.js +90 -205
  365. package/dist/es/chunks/dist2.js +434 -15275
  366. package/dist/es/chunks/dist3.js +15890 -0
  367. package/dist/es/chunks/dropdown-menu-content.js +14 -7
  368. package/dist/es/chunks/dropdown-menu-group.js +2 -2
  369. package/dist/es/chunks/dropdown-menu-item.js +12 -5
  370. package/dist/es/chunks/dropdown-menu-label.js +12 -5
  371. package/dist/es/chunks/dropdown-menu-separator.js +10 -4
  372. package/dist/es/chunks/dropdown-menu-sub-content.js +12 -5
  373. package/dist/es/chunks/dropdown-menu-sub-trigger.js +12 -5
  374. package/dist/es/chunks/dropdown-menu-sub.js +2 -2
  375. package/dist/es/chunks/dropdown-menu-trigger.js +2 -2
  376. package/dist/es/chunks/dropdown-menu.js +10 -3
  377. package/dist/es/chunks/extra-settings.js +2 -5
  378. package/dist/es/chunks/fancy-button.js +11 -5
  379. package/dist/es/chunks/file-upload-area.js +23 -15
  380. package/dist/es/chunks/getActiveElement.js +1 -1
  381. package/dist/es/chunks/handleAndDispatchCustomEvent.js +1 -1
  382. package/dist/es/chunks/hint-text.js +12 -6
  383. package/dist/es/chunks/hue-slider.js +3 -5
  384. package/dist/es/chunks/isValueEqualOrExist.js +1 -1
  385. package/dist/es/chunks/label2.js +14 -8
  386. package/dist/es/chunks/link-bubble.js +11 -13
  387. package/dist/es/chunks/link-button.js +13 -7
  388. package/dist/es/chunks/menus.js +236 -41
  389. package/dist/es/chunks/modal-body.js +8 -2
  390. package/dist/es/chunks/modal-content.js +17 -4
  391. package/dist/es/chunks/modal-footer.js +8 -2
  392. package/dist/es/chunks/modal-header.js +17 -11
  393. package/dist/es/chunks/nullish.js +1 -1
  394. package/dist/es/chunks/ohash.D__AXeF1.js +1 -1
  395. package/dist/es/chunks/pagination-content.js +12 -6
  396. package/dist/es/chunks/pagination-ellipsis.js +10 -4
  397. package/dist/es/chunks/pagination-first.js +11 -4
  398. package/dist/es/chunks/pagination-item.js +9 -3
  399. package/dist/es/chunks/pagination-last.js +11 -4
  400. package/dist/es/chunks/pagination-next.js +11 -4
  401. package/dist/es/chunks/pagination-previous.js +11 -4
  402. package/dist/es/chunks/pagination.js +11 -4
  403. package/dist/es/chunks/popover-content.js +28 -21
  404. package/dist/es/chunks/popover-trigger.js +2 -2
  405. package/dist/es/chunks/progress-bar.js +13 -7
  406. package/dist/es/chunks/progress-circle.js +9 -3
  407. package/dist/es/chunks/radio-group-card.js +14 -8
  408. package/dist/es/chunks/radio-group-item.js +15 -8
  409. package/dist/es/chunks/radio-group-label.js +10 -4
  410. package/dist/es/chunks/radio-group.js +9 -2
  411. package/dist/es/chunks/range-calendar.js +56 -46
  412. package/dist/es/chunks/range-picker.js +19 -13
  413. package/dist/es/chunks/rich-editor.js +1129 -260
  414. package/dist/es/chunks/rolldown-runtime.js +34 -0
  415. package/dist/es/chunks/scroll-area.js +12 -6
  416. package/dist/es/chunks/scroll-bar.js +39 -24
  417. package/dist/es/chunks/segmented-control-item.js +11 -5
  418. package/dist/es/chunks/segmented-control.js +10 -3
  419. package/dist/es/chunks/select-content.js +15 -8
  420. package/dist/es/chunks/select-icon.js +8 -2
  421. package/dist/es/chunks/select-item.js +16 -9
  422. package/dist/es/chunks/select-label.js +9 -3
  423. package/dist/es/chunks/select-separator.js +9 -3
  424. package/dist/es/chunks/select-trigger.js +11 -5
  425. package/dist/es/chunks/select-value.js +9 -3
  426. package/dist/es/chunks/select.js +9 -2
  427. package/dist/es/chunks/sheet-close.js +8 -2
  428. package/dist/es/chunks/sheet-content.js +12 -5
  429. package/dist/es/chunks/sheet-description.js +9 -3
  430. package/dist/es/chunks/sheet-footer.js +8 -2
  431. package/dist/es/chunks/sheet-header.js +8 -2
  432. package/dist/es/chunks/sheet-title.js +9 -3
  433. package/dist/es/chunks/sidebar-content.js +7 -1
  434. package/dist/es/chunks/sidebar-element.js +8 -2
  435. package/dist/es/chunks/sidebar-footer.js +7 -1
  436. package/dist/es/chunks/sidebar-group-content.js +8 -2
  437. package/dist/es/chunks/sidebar-group-label.js +9 -3
  438. package/dist/es/chunks/sidebar-group.js +7 -1
  439. package/dist/es/chunks/sidebar-header.js +7 -1
  440. package/dist/es/chunks/sidebar-menu-action.js +10 -4
  441. package/dist/es/chunks/sidebar-menu-badge.js +11 -5
  442. package/dist/es/chunks/sidebar-menu-button.js +10 -4
  443. package/dist/es/chunks/sidebar-menu-item.js +7 -1
  444. package/dist/es/chunks/sidebar-menu-sub-button.js +12 -6
  445. package/dist/es/chunks/sidebar-menu-sub-item.js +7 -1
  446. package/dist/es/chunks/sidebar-menu-sub.js +7 -1
  447. package/dist/es/chunks/sidebar-menu.js +7 -1
  448. package/dist/es/chunks/sidebar-provider.js +10 -3
  449. package/dist/es/chunks/sidebar-trigger.js +9 -3
  450. package/dist/es/chunks/sidebar.js +11 -5
  451. package/dist/es/chunks/slider.js +38 -23
  452. package/dist/es/chunks/social-button.js +4 -4
  453. package/dist/es/chunks/sonner-alert.js +1 -1
  454. package/dist/es/chunks/sonner.js +4 -3
  455. package/dist/es/chunks/status-badge.js +12 -6
  456. package/dist/es/chunks/switch.js +13 -6
  457. package/dist/es/chunks/tab-menu-content.js +9 -3
  458. package/dist/es/chunks/tab-menu-item.js +11 -4
  459. package/dist/es/chunks/tab-menu-list.js +9 -3
  460. package/dist/es/chunks/tab-menu.js +1 -1
  461. package/dist/es/chunks/table-body.js +8 -2
  462. package/dist/es/chunks/table-caption.js +8 -2
  463. package/dist/es/chunks/table-cell.js +8 -2
  464. package/dist/es/chunks/table-footer.js +8 -2
  465. package/dist/es/chunks/table-head.js +8 -2
  466. package/dist/es/chunks/table-header.js +7 -1
  467. package/dist/es/chunks/table-row.js +8 -2
  468. package/dist/es/chunks/table.js +8 -2
  469. package/dist/es/chunks/table2.js +8 -2
  470. package/dist/es/chunks/tag.js +15 -9
  471. package/dist/es/chunks/text-input-affix.js +8 -2
  472. package/dist/es/chunks/text-input-button.js +8 -2
  473. package/dist/es/chunks/text-input.js +10 -9
  474. package/dist/es/chunks/textarea.js +14 -8
  475. package/dist/es/chunks/tooltip-content.js +38 -31
  476. package/dist/es/chunks/tooltip-root.js +2 -1
  477. package/dist/es/chunks/tooltip-trigger.js +1 -1
  478. package/dist/es/chunks/tooltip.js +17 -10
  479. package/dist/es/chunks/use-color-model.js +7 -11
  480. package/dist/es/chunks/useArrowNavigation.js +1 -1
  481. package/dist/es/chunks/useCalendar.js +656 -584
  482. package/dist/es/chunks/useComposing.js +1 -1
  483. package/dist/es/chunks/useDirection.js +1 -1
  484. package/dist/es/chunks/useEmitAsProps.js +1 -1
  485. package/dist/es/chunks/useFocusGuards.js +2 -2
  486. package/dist/es/chunks/useFormControl.js +2 -2
  487. package/dist/es/chunks/useForwardExpose.js +2 -2
  488. package/dist/es/chunks/useForwardProps.js +1 -1
  489. package/dist/es/chunks/useForwardPropsEmits.js +1 -1
  490. package/dist/es/chunks/useForwardScopeId.js +1 -1
  491. package/dist/es/chunks/useHideOthers.js +4 -4
  492. package/dist/es/chunks/useId.js +1 -1
  493. package/dist/es/chunks/useKbd.js +1 -1
  494. package/dist/es/chunks/useLocale.js +1 -1
  495. package/dist/es/chunks/useNonce.js +1 -1
  496. package/dist/es/chunks/usePrimitiveElement.js +2 -2
  497. package/dist/es/chunks/useSize.js +2 -2
  498. package/dist/es/chunks/useTypeahead.js +2 -2
  499. package/dist/es/chunks/utils.js +1 -1
  500. package/dist/es/chunks/utils2.js +1 -1
  501. package/dist/es/chunks/utils3.js +1 -1
  502. package/dist/es/color.js +1 -3
  503. package/dist/es/command-group.js +10 -4
  504. package/dist/es/command-input.js +11 -4
  505. package/dist/es/command-item.js +10 -3
  506. package/dist/es/command-list.js +10 -3
  507. package/dist/es/command-root.js +10 -3
  508. package/dist/es/command-separator.js +8 -2
  509. package/dist/es/index.js +9 -1
  510. package/dist/es/use-chart-motion.js +15 -0
  511. package/dist/es/use-locale.js +8 -0
  512. package/dist/es/use-sidebar.js +1 -1
  513. package/dist/utils/chart.d.ts +6 -0
  514. package/dist/utils/index.d.ts +1 -0
  515. package/package.json +46 -44
  516. package/src/components/chart/bar-chart.vue +383 -0
  517. package/src/components/chart/chart-card.vue +99 -0
  518. package/src/components/chart/chart-legend.vue +164 -0
  519. package/src/components/chart/chart-plot.vue +350 -0
  520. package/src/components/chart/chart-tooltip.ts +35 -0
  521. package/src/components/chart/index.ts +13 -0
  522. package/src/components/chart/stories/bar-chart.stories.ts +319 -0
  523. package/src/components/color-picker/hue-slider.vue +1 -1
  524. package/src/components/file-upload/file-upload-area.vue +1 -1
  525. package/src/components/index.ts +1 -0
  526. package/src/components/text-input/text-input.vue +1 -0
  527. package/src/components/tooltip/tooltip-content.vue +5 -1
  528. package/src/composables/index.ts +2 -0
  529. package/src/composables/use-chart-motion.ts +18 -0
  530. package/src/composables/use-locale.ts +8 -0
  531. package/src/utils/chart.ts +42 -0
  532. package/src/utils/index.ts +1 -0
  533. package/dist/cjs/chunks/core.cjs +0 -325
  534. package/dist/es/chunks/core.js +0 -289
@@ -1,4 +1,3 @@
1
- require("./chunk.cjs");
2
1
  const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper.cjs");
3
2
  const require_select_content = require("./select-content.cjs");
4
3
  const require_select_trigger = require("./select-trigger.cjs");
@@ -8,13 +7,13 @@ const require_compact_button = require("./compact-button.cjs");
8
7
  const require_select_icon = require("./select-icon.cjs");
9
8
  const require_select = require("./select.cjs");
10
9
  const require_tooltip = require("./tooltip.cjs");
11
- const require_dist = require("./dist2.cjs");
10
+ const require_dist = require("./dist3.cjs");
12
11
  const require_config = require("../config.cjs");
13
12
  const require_extra_settings = require("./extra-settings.cjs");
14
13
  const require_link_bubble = require("./link-bubble.cjs");
15
14
  let vue = require("vue");
16
- //#region ../../node_modules/.pnpm/linkifyjs@4.3.2/node_modules/linkifyjs/dist/linkify.mjs
17
- var encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
15
+ //#region ../../node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.mjs
16
+ var encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
18
17
  var encodedUtlds = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";
19
18
  /**
20
19
  * Finite State Machine generation utilities
@@ -339,7 +338,7 @@ var TILDE = "TILDE";
339
338
  var UNDERSCORE = "UNDERSCORE";
340
339
  var EMOJI$1 = "EMOJI";
341
340
  var SYM = "SYM";
342
- var tk = /* @__PURE__ */ Object.freeze({
341
+ var tk = /*#__PURE__*/ Object.freeze({
343
342
  __proto__: null,
344
343
  ALPHANUMERICAL,
345
344
  AMPERSAND,
@@ -411,7 +410,8 @@ var LF = "\n";
411
410
  var EMOJI_VARIATION = "️";
412
411
  var EMOJI_JOINER = "‍";
413
412
  var OBJECT_REPLACEMENT = "";
414
- var tlds = null, utlds = null;
413
+ var tlds = null;
414
+ var utlds = null;
415
415
  /**
416
416
  * Scanner output token:
417
417
  * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD')
@@ -1198,7 +1198,6 @@ function init$1({ groups }) {
1198
1198
  ta(Email$1, groups.domain, EmailDomain);
1199
1199
  tt(Email$1, DOT, EmailDomainDot);
1200
1200
  tt(Email$1, HYPHEN, EmailDomainHyphen);
1201
- ta(tt(Email$1, COLON), groups.numeric, Email);
1202
1201
  const DomainHyphen = tt(Domain, HYPHEN);
1203
1202
  const DomainDot = tt(Domain, DOT);
1204
1203
  tt(DomainHyphen, HYPHEN, DomainHyphen);
@@ -1252,11 +1251,11 @@ function init$1({ groups }) {
1252
1251
  const [OPEN, CLOSE] = bracketPairs[i];
1253
1252
  const UrlOpen = tt(Url$1, OPEN);
1254
1253
  tt(UrlNonaccept, OPEN, UrlOpen);
1255
- tt(UrlOpen, CLOSE, Url$1);
1256
1254
  const UrlOpenQ = makeState(Url);
1257
1255
  ta(UrlOpen, qsAccepting, UrlOpenQ);
1258
1256
  const UrlOpenSyms = makeState();
1259
- ta(UrlOpen, qsNonAccepting);
1257
+ ta(UrlOpen, qsNonAccepting, UrlOpenSyms);
1258
+ tt(UrlOpen, CLOSE, Url$1);
1260
1259
  ta(UrlOpenQ, qsAccepting, UrlOpenQ);
1261
1260
  ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);
1262
1261
  ta(UrlOpenSyms, qsAccepting, UrlOpenQ);
@@ -1445,7 +1444,7 @@ function find(str, type = null, opts = null) {
1445
1444
  return filtered;
1446
1445
  }
1447
1446
  //#endregion
1448
- //#region ../../node_modules/.pnpm/@tiptap+extension-link@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0__@tiptap+pm@3.11.0/node_modules/@tiptap/extension-link/dist/index.js
1447
+ //#region ../../node_modules/.pnpm/@tiptap+extension-link@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-link/dist/index.js
1449
1448
  var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0 ᠎ -\u2029  ]";
1450
1449
  var UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN);
1451
1450
  var UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`);
@@ -1463,7 +1462,8 @@ function autolink(options) {
1463
1462
  const preventAutolink = transactions.some((transaction) => transaction.getMeta("preventAutolink"));
1464
1463
  if (!docChanges || preventAutolink) return;
1465
1464
  const { tr } = newState;
1466
- require_dist.getChangedRanges(require_dist.combineTransactionSteps(oldState.doc, [...transactions])).forEach(({ newRange }) => {
1465
+ const transform = require_dist.combineTransactionSteps(oldState.doc, [...transactions]);
1466
+ require_dist.getChangedRanges(transform).forEach(({ newRange }) => {
1467
1467
  const nodesInChangedRanges = require_dist.findChildrenInRange(newState.doc, newRange, (node) => node.isTextblock);
1468
1468
  let textBlock;
1469
1469
  let textBeforeWhitespace;
@@ -1512,27 +1512,130 @@ function clickHandler(options) {
1512
1512
  let link = null;
1513
1513
  if (event.target instanceof HTMLAnchorElement) link = event.target;
1514
1514
  else {
1515
- let a = event.target;
1516
- const els = [];
1517
- while (a.nodeName !== "DIV") {
1518
- els.push(a);
1519
- a = a.parentNode;
1520
- }
1521
- link = els.find((value) => value.nodeName === "A");
1515
+ const target = event.target;
1516
+ if (!target) return false;
1517
+ const root = options.editor.view.dom;
1518
+ link = target.closest("a");
1519
+ if (link && !root.contains(link)) link = null;
1522
1520
  }
1523
1521
  if (!link) return false;
1524
- const attrs = require_dist.getAttributes(view.state, options.type.name);
1525
- const href = (_a = link == null ? void 0 : link.href) != null ? _a : attrs.href;
1526
- const target = (_b = link == null ? void 0 : link.target) != null ? _b : attrs.target;
1527
- if (options.enableClickSelection) options.editor.commands.extendMarkRange(options.type.name);
1528
- if (link && href) {
1529
- window.open(href, target);
1530
- return true;
1522
+ let handled = false;
1523
+ if (options.enableClickSelection) handled = options.editor.commands.extendMarkRange(options.type.name);
1524
+ if (options.openOnClick) {
1525
+ const attrs = require_dist.getAttributes(view.state, options.type.name);
1526
+ const href = (_a = link.href) != null ? _a : attrs.href;
1527
+ const target = (_b = link.target) != null ? _b : attrs.target;
1528
+ if (href) {
1529
+ window.open(href, target);
1530
+ handled = true;
1531
+ }
1531
1532
  }
1532
- return false;
1533
+ return handled;
1533
1534
  } }
1534
1535
  });
1535
1536
  }
1537
+ var MARKDOWN_LINK_INPUT_REGEX = /\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/;
1538
+ var MARKDOWN_LINK_PASTE_REGEX = /\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;
1539
+ function isEscaped(text, index) {
1540
+ let backslashes = 0;
1541
+ for (let position = index - 1; position >= 0 && text[position] === "\\"; position -= 1) backslashes += 1;
1542
+ return backslashes % 2 === 1;
1543
+ }
1544
+ function isInsideCodeSpan(text, matchIndex) {
1545
+ let openRunLength = 0;
1546
+ let index = 0;
1547
+ while (index < matchIndex) {
1548
+ if (text[index] !== "`") {
1549
+ index += 1;
1550
+ continue;
1551
+ }
1552
+ if (openRunLength === 0 && isEscaped(text, index)) {
1553
+ index += 1;
1554
+ continue;
1555
+ }
1556
+ let runLength = 0;
1557
+ while (index < matchIndex && text[index] === "`") {
1558
+ runLength += 1;
1559
+ index += 1;
1560
+ }
1561
+ if (openRunLength === 0) openRunLength = runLength;
1562
+ else if (runLength === openRunLength) openRunLength = 0;
1563
+ }
1564
+ return openRunLength > 0;
1565
+ }
1566
+ function isConvertibleLink(text, match, isAllowedHref) {
1567
+ var _a, _b;
1568
+ const [, linkText, href] = match;
1569
+ if ((match.index ? text[match.index - 1] : void 0) === "!" || isEscaped(text, (_a = match.index) != null ? _a : 0)) return false;
1570
+ if (isInsideCodeSpan(text, (_b = match.index) != null ? _b : 0)) return false;
1571
+ return !!linkText.trim() && isAllowedHref(href);
1572
+ }
1573
+ function toRuleMatch(match) {
1574
+ var _a, _b;
1575
+ const [linkSyntax, linkText, href, , straightQuotedTitle, curlyDoubleTitle, curlySingleTitle] = match;
1576
+ const title = (_a = straightQuotedTitle != null ? straightQuotedTitle : curlyDoubleTitle) != null ? _a : curlySingleTitle;
1577
+ return {
1578
+ index: (_b = match.index) != null ? _b : 0,
1579
+ text: linkSyntax,
1580
+ replaceWith: linkText,
1581
+ data: {
1582
+ href,
1583
+ title: title || null,
1584
+ markdown: true
1585
+ }
1586
+ };
1587
+ }
1588
+ function matchesOverlap(a, b) {
1589
+ return a.index < b.index + b.text.length && b.index < a.index + a.text.length;
1590
+ }
1591
+ function getMarkdownLinkAttributes(match) {
1592
+ var _a, _b, _c;
1593
+ return {
1594
+ href: (_a = match.data) == null ? void 0 : _a.href,
1595
+ title: (_c = (_b = match.data) == null ? void 0 : _b.title) != null ? _c : null
1596
+ };
1597
+ }
1598
+ function markdownLinkInputRule(config) {
1599
+ const rule = require_dist.markInputRule({
1600
+ find: (text) => {
1601
+ const match = MARKDOWN_LINK_INPUT_REGEX.exec(text);
1602
+ if (!match || !isConvertibleLink(text, match, config.isAllowedHref)) return null;
1603
+ return toRuleMatch(match);
1604
+ },
1605
+ type: config.type,
1606
+ getAttributes: getMarkdownLinkAttributes
1607
+ });
1608
+ return new require_dist.InputRule({
1609
+ find: rule.find,
1610
+ handler: (props) => {
1611
+ const result = rule.handler(props);
1612
+ if (result !== null && props.state.tr.steps.length) props.state.tr.setMeta("preventAutolink", true);
1613
+ return result;
1614
+ }
1615
+ });
1616
+ }
1617
+ function markdownLinkPasteRule(config) {
1618
+ const rule = require_dist.markPasteRule({
1619
+ find: (text) => {
1620
+ var _a, _b;
1621
+ const markdownMatches = [];
1622
+ for (const match of text.matchAll(MARKDOWN_LINK_PASTE_REGEX)) if (isConvertibleLink(text, match, config.isAllowedHref)) markdownMatches.push(toRuleMatch(match));
1623
+ const plainUrlMatches = ((_b = (_a = config.findPlainUrls) == null ? void 0 : _a.call(config, text)) != null ? _b : []).filter((urlMatch) => !markdownMatches.some((markdownMatch) => matchesOverlap(markdownMatch, urlMatch)));
1624
+ return [...markdownMatches, ...plainUrlMatches];
1625
+ },
1626
+ type: config.type,
1627
+ getAttributes: getMarkdownLinkAttributes
1628
+ });
1629
+ return new require_dist.PasteRule({
1630
+ find: rule.find,
1631
+ handler: (props) => {
1632
+ var _a;
1633
+ const result = rule.handler(props);
1634
+ if (result !== null && props.state.tr.steps.length && ((_a = props.match.data) == null ? void 0 : _a.markdown)) props.state.tr.setMeta("preventAutolink", true);
1635
+ return result;
1636
+ }
1637
+ });
1638
+ }
1536
1639
  function pasteHandler(options) {
1537
1640
  return new require_dist.Plugin({
1538
1641
  key: new require_dist.PluginKey("handlePasteLink"),
@@ -1547,7 +1650,7 @@ function pasteHandler(options) {
1547
1650
  textContent += node.textContent;
1548
1651
  });
1549
1652
  const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find((item) => item.isLink && item.value === textContent);
1550
- if (!textContent || !link || shouldAutoLink !== void 0 && !shouldAutoLink(link.href)) return false;
1653
+ if (!textContent || !link || shouldAutoLink !== void 0 && !shouldAutoLink(link.value)) return false;
1551
1654
  return options.editor.commands.setMark(options.type, { href: link.href });
1552
1655
  } }
1553
1656
  });
@@ -1569,7 +1672,7 @@ function isAllowedUri(uri, protocols) {
1569
1672
  const nextProtocol = typeof protocol === "string" ? protocol : protocol.scheme;
1570
1673
  if (nextProtocol) allowedProtocols.push(nextProtocol);
1571
1674
  });
1572
- return !uri || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, "").match(new RegExp(`^(?:(?:${allowedProtocols.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`, "i"));
1675
+ return !uri || uri.replace(UNICODE_WHITESPACE_REGEX_GLOBAL, "").match(new RegExp(`^(?:(?:${allowedProtocols.map((protocol) => protocol.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`, "i"));
1573
1676
  }
1574
1677
  var Link = require_dist.Mark.create({
1575
1678
  name: "link",
@@ -1600,6 +1703,7 @@ var Link = require_dist.Mark.create({
1600
1703
  openOnClick: true,
1601
1704
  enableClickSelection: false,
1602
1705
  linkOnPaste: true,
1706
+ markdownLinks: false,
1603
1707
  autolink: true,
1604
1708
  protocols: [],
1605
1709
  defaultProtocol: "http",
@@ -1610,10 +1714,19 @@ var Link = require_dist.Mark.create({
1610
1714
  },
1611
1715
  isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols),
1612
1716
  validate: (url) => !!url,
1613
- shouldAutoLink: (url) => !!url
1717
+ shouldAutoLink: (url) => {
1718
+ const hasProtocol = /^[a-z][a-z0-9+.-]*:\/\//i.test(url);
1719
+ const hasMaybeProtocol = /^[a-z][a-z0-9+.-]*:/i.test(url);
1720
+ if (hasProtocol || hasMaybeProtocol && !url.includes("@")) return true;
1721
+ const hostname = (url.includes("@") ? url.split("@").pop() : url).split(/[/?#:]/)[0];
1722
+ if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname)) return false;
1723
+ if (!/\./.test(hostname)) return false;
1724
+ return true;
1725
+ }
1614
1726
  };
1615
1727
  },
1616
1728
  addAttributes() {
1729
+ var _a, _b, _c;
1617
1730
  return {
1618
1731
  href: {
1619
1732
  default: null,
@@ -1621,9 +1734,10 @@ var Link = require_dist.Mark.create({
1621
1734
  return element.getAttribute("href");
1622
1735
  }
1623
1736
  },
1624
- target: { default: this.options.HTMLAttributes.target },
1625
- rel: { default: this.options.HTMLAttributes.rel },
1626
- class: { default: this.options.HTMLAttributes.class }
1737
+ target: { default: (_a = this.options.HTMLAttributes.target) != null ? _a : null },
1738
+ rel: { default: (_b = this.options.HTMLAttributes.rel) != null ? _b : null },
1739
+ class: { default: (_c = this.options.HTMLAttributes.class) != null ? _c : null },
1740
+ title: { default: null }
1627
1741
  };
1628
1742
  },
1629
1743
  parseHTML() {
@@ -1667,9 +1781,11 @@ var Link = require_dist.Mark.create({
1667
1781
  });
1668
1782
  },
1669
1783
  renderMarkdown: (node, h) => {
1670
- var _a;
1671
- const href = ((_a = node.attrs) == null ? void 0 : _a.href) || "";
1672
- return `[${h.renderChildren(node)}](${href})`;
1784
+ var _a, _b, _c, _d;
1785
+ const href = (_b = (_a = node.attrs) == null ? void 0 : _a.href) != null ? _b : "";
1786
+ const title = (_d = (_c = node.attrs) == null ? void 0 : _c.title) != null ? _d : "";
1787
+ const text = h.renderChildren(node);
1788
+ return title ? `[${text}](${href} "${title}")` : `[${text}](${href})`;
1673
1789
  },
1674
1790
  addCommands() {
1675
1791
  return {
@@ -1696,28 +1812,48 @@ var Link = require_dist.Mark.create({
1696
1812
  }
1697
1813
  };
1698
1814
  },
1815
+ addInputRules() {
1816
+ if (!this.options.markdownLinks) return [];
1817
+ return [markdownLinkInputRule({
1818
+ type: this.type,
1819
+ isAllowedHref: (href) => this.options.isAllowedUri(href, {
1820
+ defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols),
1821
+ protocols: this.options.protocols,
1822
+ defaultProtocol: this.options.defaultProtocol
1823
+ })
1824
+ })];
1825
+ },
1699
1826
  addPasteRules() {
1700
- return [require_dist.markPasteRule({
1701
- find: (text) => {
1702
- const foundLinks = [];
1703
- if (text) {
1704
- const { protocols, defaultProtocol } = this.options;
1705
- const links = find(text).filter((item) => item.isLink && this.options.isAllowedUri(item.value, {
1706
- defaultValidate: (href) => !!isAllowedUri(href, protocols),
1707
- protocols,
1708
- defaultProtocol
1709
- }));
1710
- if (links.length) links.forEach((link) => {
1711
- if (!this.options.shouldAutoLink(link.value)) return;
1712
- foundLinks.push({
1713
- text: link.value,
1714
- data: { href: link.href },
1715
- index: link.start
1716
- });
1827
+ const findPlainUrls = (text) => {
1828
+ const foundLinks = [];
1829
+ if (text) {
1830
+ const { protocols, defaultProtocol } = this.options;
1831
+ find(text).filter((item) => item.isLink && this.options.isAllowedUri(item.value, {
1832
+ defaultValidate: (href) => !!isAllowedUri(href, protocols),
1833
+ protocols,
1834
+ defaultProtocol
1835
+ })).forEach((link) => {
1836
+ if (!this.options.shouldAutoLink(link.value)) return;
1837
+ foundLinks.push({
1838
+ text: link.value,
1839
+ data: { href: link.href },
1840
+ index: link.start
1717
1841
  });
1718
- }
1719
- return foundLinks;
1720
- },
1842
+ });
1843
+ }
1844
+ return foundLinks;
1845
+ };
1846
+ if (this.options.markdownLinks) return [markdownLinkPasteRule({
1847
+ type: this.type,
1848
+ isAllowedHref: (href) => this.options.isAllowedUri(href, {
1849
+ defaultValidate: (url) => !!isAllowedUri(url, this.options.protocols),
1850
+ protocols: this.options.protocols,
1851
+ defaultProtocol: this.options.defaultProtocol
1852
+ }),
1853
+ findPlainUrls
1854
+ })];
1855
+ return [require_dist.markPasteRule({
1856
+ find: findPlainUrls,
1721
1857
  type: this.type,
1722
1858
  getAttributes: (match) => {
1723
1859
  var _a;
@@ -1738,9 +1874,10 @@ var Link = require_dist.Mark.create({
1738
1874
  }),
1739
1875
  shouldAutoLink: this.options.shouldAutoLink
1740
1876
  }));
1741
- if (this.options.openOnClick === true) plugins.push(clickHandler({
1877
+ plugins.push(clickHandler({
1742
1878
  type: this.type,
1743
1879
  editor: this.editor,
1880
+ openOnClick: this.options.openOnClick === "whenNotEditable" ? true : this.options.openOnClick,
1744
1881
  enableClickSelection: this.options.enableClickSelection
1745
1882
  }));
1746
1883
  if (this.options.linkOnPaste) plugins.push(pasteHandler({
@@ -1809,7 +1946,7 @@ var index_default$1 = require_dist.Extension.create({
1809
1946
  }
1810
1947
  });
1811
1948
  //#endregion
1812
- //#region ../../node_modules/.pnpm/@tiptap+extension-text-style@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-text-style/dist/index.js
1949
+ //#region ../../node_modules/.pnpm/@tiptap+extension-text-style@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-text-style/dist/index.js
1813
1950
  var MAX_FIND_CHILD_SPAN_DEPTH = 20;
1814
1951
  var findChildSpans = (element, depth = 0) => {
1815
1952
  const childSpans = [];
@@ -1886,19 +2023,8 @@ var BackgroundColor = require_dist.Extension.create({
1886
2023
  default: null,
1887
2024
  parseHTML: (element) => {
1888
2025
  var _a;
1889
- const styleAttr = element.getAttribute("style");
1890
- if (styleAttr) {
1891
- const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
1892
- for (let i = decls.length - 1; i >= 0; i -= 1) {
1893
- const parts = decls[i].split(":");
1894
- if (parts.length >= 2) {
1895
- const prop = parts[0].trim().toLowerCase();
1896
- const val = parts.slice(1).join(":").trim();
1897
- if (prop === "background-color") return val.replace(/['"]+/g, "");
1898
- }
1899
- }
1900
- }
1901
- return (_a = element.style.backgroundColor) == null ? void 0 : _a.replace(/['"]+/g, "");
2026
+ const value = (_a = require_dist.getStyleProperty(element, "background-color")) != null ? _a : element.style.backgroundColor;
2027
+ return value == null ? void 0 : value.replace(/['"]+/g, "");
1902
2028
  },
1903
2029
  renderHTML: (attributes) => {
1904
2030
  if (!attributes.backgroundColor) return {};
@@ -1930,19 +2056,8 @@ var Color = require_dist.Extension.create({
1930
2056
  default: null,
1931
2057
  parseHTML: (element) => {
1932
2058
  var _a;
1933
- const styleAttr = element.getAttribute("style");
1934
- if (styleAttr) {
1935
- const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
1936
- for (let i = decls.length - 1; i >= 0; i -= 1) {
1937
- const parts = decls[i].split(":");
1938
- if (parts.length >= 2) {
1939
- const prop = parts[0].trim().toLowerCase();
1940
- const val = parts.slice(1).join(":").trim();
1941
- if (prop === "color") return val.replace(/['"]+/g, "");
1942
- }
1943
- }
1944
- }
1945
- return (_a = element.style.color) == null ? void 0 : _a.replace(/['"]+/g, "");
2059
+ const value = (_a = require_dist.getStyleProperty(element, "color")) != null ? _a : element.style.color;
2060
+ return value == null ? void 0 : value.replace(/['"]+/g, "");
1946
2061
  },
1947
2062
  renderHTML: (attributes) => {
1948
2063
  if (!attributes.color) return {};
@@ -1972,7 +2087,10 @@ var FontFamily = require_dist.Extension.create({
1972
2087
  types: this.options.types,
1973
2088
  attributes: { fontFamily: {
1974
2089
  default: null,
1975
- parseHTML: (element) => element.style.fontFamily,
2090
+ parseHTML: (element) => {
2091
+ var _a;
2092
+ return (_a = require_dist.getStyleProperty(element, "font-family")) != null ? _a : element.style.fontFamily;
2093
+ },
1976
2094
  renderHTML: (attributes) => {
1977
2095
  if (!attributes.fontFamily) return {};
1978
2096
  return { style: `font-family: ${attributes.fontFamily}` };
@@ -2001,7 +2119,10 @@ var FontSize = require_dist.Extension.create({
2001
2119
  types: this.options.types,
2002
2120
  attributes: { fontSize: {
2003
2121
  default: null,
2004
- parseHTML: (element) => element.style.fontSize,
2122
+ parseHTML: (element) => {
2123
+ var _a;
2124
+ return (_a = require_dist.getStyleProperty(element, "font-size")) != null ? _a : element.style.fontSize;
2125
+ },
2005
2126
  renderHTML: (attributes) => {
2006
2127
  if (!attributes.fontSize) return {};
2007
2128
  return { style: `font-size: ${attributes.fontSize}` };
@@ -2030,7 +2151,10 @@ var LineHeight = require_dist.Extension.create({
2030
2151
  types: this.options.types,
2031
2152
  attributes: { lineHeight: {
2032
2153
  default: null,
2033
- parseHTML: (element) => element.style.lineHeight,
2154
+ parseHTML: (element) => {
2155
+ var _a;
2156
+ return (_a = require_dist.getStyleProperty(element, "line-height")) != null ? _a : element.style.lineHeight;
2157
+ },
2034
2158
  renderHTML: (attributes) => {
2035
2159
  if (!attributes.lineHeight) return {};
2036
2160
  return { style: `line-height: ${attributes.lineHeight}` };
@@ -2063,7 +2187,7 @@ var TextStyleKit = require_dist.Extension.create({
2063
2187
  }
2064
2188
  });
2065
2189
  //#endregion
2066
- //#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js
2190
+ //#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.3/node_modules/prosemirror-dropcursor/dist/index.js
2067
2191
  /**
2068
2192
  Create a plugin that, when added to a ProseMirror instance,
2069
2193
  causes a decoration to show up at the drop position when something
@@ -2086,6 +2210,7 @@ var DropCursorView = class {
2086
2210
  this.cursorPos = null;
2087
2211
  this.element = null;
2088
2212
  this.timeout = -1;
2213
+ this.lastDragEvent = null;
2089
2214
  this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;
2090
2215
  this.color = options.color === false ? void 0 : options.color || "black";
2091
2216
  this.class = options.class;
@@ -2109,8 +2234,13 @@ var DropCursorView = class {
2109
2234
  this.handlers.forEach(({ name, handler }) => this.editorView.dom.removeEventListener(name, handler));
2110
2235
  }
2111
2236
  update(editorView, prevState) {
2112
- if (this.cursorPos != null && prevState.doc != editorView.state.doc) if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null);
2113
- else this.updateOverlay();
2237
+ if (this.cursorPos != null && prevState.doc != editorView.state.doc) {
2238
+ if (this.lastDragEvent) {
2239
+ let target = this.computeTarget(this.lastDragEvent);
2240
+ if (target == this.cursorPos) this.updateOverlay();
2241
+ else this.setCursor(target);
2242
+ } else this.updateOverlay();
2243
+ }
2114
2244
  }
2115
2245
  setCursor(pos) {
2116
2246
  if (pos == this.cursorPos) return;
@@ -2181,8 +2311,7 @@ var DropCursorView = class {
2181
2311
  clearTimeout(this.timeout);
2182
2312
  this.timeout = setTimeout(() => this.setCursor(null), timeout);
2183
2313
  }
2184
- dragover(event) {
2185
- if (!this.editorView.editable) return;
2314
+ computeTarget(event) {
2186
2315
  let pos = this.editorView.posAtCoords({
2187
2316
  left: event.clientX,
2188
2317
  top: event.clientY
@@ -2190,12 +2319,19 @@ var DropCursorView = class {
2190
2319
  let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);
2191
2320
  let disableDropCursor = node && node.type.spec.disableDropCursor;
2192
2321
  let disabled = typeof disableDropCursor == "function" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor;
2193
- if (pos && !disabled) {
2194
- let target = pos.pos;
2195
- if (this.editorView.dragging && this.editorView.dragging.slice) {
2196
- let point = require_dist.dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);
2197
- if (point != null) target = point;
2198
- }
2322
+ if (!pos || disabled) return null;
2323
+ let target = pos.pos;
2324
+ if (this.editorView.dragging && this.editorView.dragging.slice) {
2325
+ let point = require_dist.dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);
2326
+ if (point != null) target = point;
2327
+ }
2328
+ return target;
2329
+ }
2330
+ dragover(event) {
2331
+ if (!this.editorView.editable) return;
2332
+ this.lastDragEvent = event;
2333
+ let target = this.computeTarget(event);
2334
+ if (target != null) {
2199
2335
  this.setCursor(target);
2200
2336
  this.scheduleRemoval(5e3);
2201
2337
  }
@@ -2211,7 +2347,7 @@ var DropCursorView = class {
2211
2347
  }
2212
2348
  };
2213
2349
  //#endregion
2214
- //#region ../../node_modules/.pnpm/prosemirror-gapcursor@1.3.2/node_modules/prosemirror-gapcursor/dist/index.js
2350
+ //#region ../../node_modules/.pnpm/prosemirror-gapcursor@1.4.1/node_modules/prosemirror-gapcursor/dist/index.js
2215
2351
  /**
2216
2352
  Gap cursor selections are represented using this class. Its
2217
2353
  `$anchor` and `$head` properties both point at the cursor position.
@@ -2257,7 +2393,7 @@ var GapCursor = class GapCursor extends require_dist.Selection {
2257
2393
  */
2258
2394
  static valid($pos) {
2259
2395
  let parent = $pos.parent;
2260
- if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) return false;
2396
+ if (parent.inlineContent || !closedBefore($pos) || !closedAfter($pos)) return false;
2261
2397
  let override = parent.type.spec.allowGapCursor;
2262
2398
  if (override != null) return override;
2263
2399
  let deflt = parent.contentMatchAt($pos.index()).defaultType;
@@ -2314,6 +2450,9 @@ var GapBookmark = class GapBookmark {
2314
2450
  return GapCursor.valid($pos) ? new GapCursor($pos) : require_dist.Selection.near($pos);
2315
2451
  }
2316
2452
  };
2453
+ function needsGap(type) {
2454
+ return type.isAtom || type.spec.isolating || type.spec.createGapCursor;
2455
+ }
2317
2456
  function closedBefore($pos) {
2318
2457
  for (let d = $pos.depth; d >= 0; d--) {
2319
2458
  let index = $pos.index(d), parent = $pos.node(d);
@@ -2322,7 +2461,7 @@ function closedBefore($pos) {
2322
2461
  continue;
2323
2462
  }
2324
2463
  for (let before = parent.child(index - 1);; before = before.lastChild) {
2325
- if (before.childCount == 0 && !before.inlineContent || before.isAtom || before.type.spec.isolating) return true;
2464
+ if (before.childCount == 0 && !before.inlineContent || needsGap(before.type)) return true;
2326
2465
  if (before.inlineContent) return false;
2327
2466
  }
2328
2467
  }
@@ -2336,7 +2475,7 @@ function closedAfter($pos) {
2336
2475
  continue;
2337
2476
  }
2338
2477
  for (let after = parent.child(index);; after = after.firstChild) {
2339
- if (after.childCount == 0 && !after.inlineContent || after.isAtom || after.type.spec.isolating) return true;
2478
+ if (after.childCount == 0 && !after.inlineContent || needsGap(after.type)) return true;
2340
2479
  if (after.inlineContent) return false;
2341
2480
  }
2342
2481
  }
@@ -2552,7 +2691,7 @@ var Append = /* @__PURE__ */ function(RopeSequence) {
2552
2691
  return Append;
2553
2692
  }(RopeSequence);
2554
2693
  //#endregion
2555
- //#region ../../node_modules/.pnpm/prosemirror-history@1.4.1/node_modules/prosemirror-history/dist/index.js
2694
+ //#region ../../node_modules/.pnpm/prosemirror-history@1.5.0/node_modules/prosemirror-history/dist/index.js
2556
2695
  var max_empty_items = 500;
2557
2696
  var Branch = class Branch {
2558
2697
  constructor(items, eventCount) {
@@ -2667,7 +2806,8 @@ var Branch = class Branch {
2667
2806
  }, start);
2668
2807
  let newMaps = [];
2669
2808
  for (let i = rebasedCount; i < newUntil; i++) newMaps.push(new Item(mapping.maps[i]));
2670
- let branch = new Branch(this.items.slice(0, start).append(newMaps).append(rebasedItems), eventCount);
2809
+ let items = this.items.slice(0, start).append(newMaps).append(rebasedItems);
2810
+ let branch = new Branch(items, eventCount);
2671
2811
  if (branch.emptyItemCount() > max_empty_items) branch = branch.compress(this.items.length - rebasedItems.length);
2672
2812
  return branch;
2673
2813
  }
@@ -2742,9 +2882,10 @@ function applyTransaction(history, state, tr, options) {
2742
2882
  if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0, -1);
2743
2883
  let appended = tr.getMeta("appendedTransaction");
2744
2884
  if (tr.steps.length == 0) return history;
2745
- else if (appended && appended.getMeta(historyKey)) if (appended.getMeta(historyKey).redo) return new HistoryState(history.done.addTransform(tr, void 0, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition);
2746
- else return new HistoryState(history.done, history.undone.addTransform(tr, void 0, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition);
2747
- else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
2885
+ else if (appended && appended.getMeta(historyKey)) {
2886
+ if (appended.getMeta(historyKey).redo) return new HistoryState(history.done.addTransform(tr, void 0, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition);
2887
+ else return new HistoryState(history.done, history.undone.addTransform(tr, void 0, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition);
2888
+ } else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
2748
2889
  let composition = tr.getMeta("composition");
2749
2890
  let newGroup = history.prevTime == 0 || !appended && history.prevComposition != composition && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges));
2750
2891
  let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps);
@@ -2788,7 +2929,8 @@ function histTransaction(history, state, redo) {
2788
2929
  historyState: newHist
2789
2930
  });
2790
2931
  }
2791
- var cachedPreserveItems = false, cachedPreserveItemsPlugins = null;
2932
+ var cachedPreserveItems = false;
2933
+ var cachedPreserveItemsPlugins = null;
2792
2934
  function mustPreserveItems(state) {
2793
2935
  let plugins = state.plugins;
2794
2936
  if (cachedPreserveItemsPlugins != plugins) {
@@ -2831,7 +2973,7 @@ function history(config = {}) {
2831
2973
  props: { handleDOMEvents: { beforeinput(view, e) {
2832
2974
  let inputType = e.inputType;
2833
2975
  let command = inputType == "historyUndo" ? undo : inputType == "historyRedo" ? redo : null;
2834
- if (!command) return false;
2976
+ if (!command || !view.editable) return false;
2835
2977
  e.preventDefault();
2836
2978
  return command(view.state, view.dispatch);
2837
2979
  } } }
@@ -2857,12 +2999,13 @@ A command function that redoes the last undone change, if any.
2857
2999
  */
2858
3000
  var redo = buildCommand(true, true);
2859
3001
  //#endregion
2860
- //#region ../../node_modules/.pnpm/@tiptap+extensions@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0__@tiptap+pm@3.11.0/node_modules/@tiptap/extensions/dist/index.js
3002
+ //#region ../../node_modules/.pnpm/@tiptap+extensions@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extensions/dist/index.js
2861
3003
  var CharacterCount = require_dist.Extension.create({
2862
3004
  name: "characterCount",
2863
3005
  addOptions() {
2864
3006
  return {
2865
3007
  limit: null,
3008
+ autoTrim: true,
2866
3009
  mode: "textSize",
2867
3010
  textCounter: (text) => text.length,
2868
3011
  wordCounter: (text) => text.split(" ").filter((word) => word !== "").length
@@ -2896,7 +3039,8 @@ var CharacterCount = require_dist.Extension.create({
2896
3039
  appendTransaction: (transactions, oldState, newState) => {
2897
3040
  if (initialEvaluationDone) return;
2898
3041
  const limit = this.options.limit;
2899
- if (limit === null || limit === void 0 || limit === 0) {
3042
+ const autoTrim = this.options.autoTrim;
3043
+ if (limit === null || limit === void 0 || limit === 0 || autoTrim === false) {
2900
3044
  initialEvaluationDone = true;
2901
3045
  return;
2902
3046
  }
@@ -2986,19 +3130,261 @@ var Gapcursor = require_dist.Extension.create({
2986
3130
  },
2987
3131
  extendNodeSchema(extension) {
2988
3132
  var _a;
2989
- return { allowGapCursor: (_a = require_dist.callOrReturn(require_dist.getExtensionField(extension, "allowGapCursor", {
3133
+ const context = {
2990
3134
  name: extension.name,
2991
3135
  options: extension.options,
2992
3136
  storage: extension.storage
2993
- }))) != null ? _a : null };
3137
+ };
3138
+ return { allowGapCursor: (_a = require_dist.callOrReturn(require_dist.getExtensionField(extension, "allowGapCursor", context))) != null ? _a : null };
2994
3139
  }
2995
3140
  });
3141
+ var DEFAULT_DATA_ATTRIBUTE = "placeholder";
3142
+ var PLUGIN_KEY = new require_dist.PluginKey("tiptap__placeholder");
3143
+ function createPlaceholderDecoration(options) {
3144
+ const { editor, placeholder, dataAttribute, pos, node, isEmptyDoc, hasAnchor, classes: { emptyNode, emptyEditor } } = options;
3145
+ const classes = [emptyNode];
3146
+ if (isEmptyDoc) classes.push(emptyEditor);
3147
+ return require_dist.Decoration.node(pos, pos + node.nodeSize, {
3148
+ class: classes.join(" "),
3149
+ [dataAttribute]: typeof placeholder === "function" ? placeholder({
3150
+ editor,
3151
+ node,
3152
+ pos,
3153
+ hasAnchor
3154
+ }) : placeholder
3155
+ });
3156
+ }
3157
+ function resolveEmptyNodeClass(emptyNodeClass, props) {
3158
+ return typeof emptyNodeClass === "function" ? emptyNodeClass(props) : emptyNodeClass;
3159
+ }
3160
+ function scanRangeForDecorations({ editor, options, dataAttribute, doc, selection, from, to }) {
3161
+ const { anchor } = selection;
3162
+ const decorations = [];
3163
+ const isEmptyDoc = editor.isEmpty;
3164
+ doc.nodesBetween(from, to, (node, pos) => {
3165
+ const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;
3166
+ const isEmpty = !node.isLeaf && require_dist.isNodeEmpty(node);
3167
+ if (!node.type.isTextblock) return options.includeChildren;
3168
+ if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) decorations.push(createPlaceholderDecoration({
3169
+ editor,
3170
+ isEmptyDoc,
3171
+ dataAttribute,
3172
+ hasAnchor,
3173
+ placeholder: options.placeholder,
3174
+ classes: {
3175
+ emptyEditor: options.emptyEditorClass,
3176
+ emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {
3177
+ editor,
3178
+ node,
3179
+ pos,
3180
+ hasAnchor
3181
+ })
3182
+ },
3183
+ node,
3184
+ pos
3185
+ }));
3186
+ return options.includeChildren;
3187
+ });
3188
+ return decorations;
3189
+ }
3190
+ function buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) {
3191
+ if (!(editor.isEditable || !options.showOnlyWhenEditable)) return null;
3192
+ const { anchor } = selection;
3193
+ const decorations = [];
3194
+ const isEmptyDoc = editor.isEmpty;
3195
+ if (options.showOnlyCurrent && !options.includeChildren) {
3196
+ const resolved = doc.resolve(anchor);
3197
+ const node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter;
3198
+ const nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor;
3199
+ if (node && node.type.isTextblock && require_dist.isNodeEmpty(node)) {
3200
+ const hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize;
3201
+ decorations.push(createPlaceholderDecoration({
3202
+ editor,
3203
+ isEmptyDoc,
3204
+ dataAttribute,
3205
+ hasAnchor,
3206
+ placeholder: options.placeholder,
3207
+ classes: {
3208
+ emptyEditor: options.emptyEditorClass,
3209
+ emptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {
3210
+ editor,
3211
+ node,
3212
+ pos: nodeStart,
3213
+ hasAnchor
3214
+ })
3215
+ },
3216
+ node,
3217
+ pos: nodeStart
3218
+ }));
3219
+ }
3220
+ } else decorations.push(...scanRangeForDecorations({
3221
+ editor,
3222
+ options,
3223
+ dataAttribute,
3224
+ doc,
3225
+ selection,
3226
+ from: 0,
3227
+ to: doc.content.size
3228
+ }));
3229
+ return require_dist.DecorationSet.create(doc, decorations);
3230
+ }
3231
+ function resolveTopLevelRange(doc, pos) {
3232
+ var _a;
3233
+ const resolved = doc.resolve(pos);
3234
+ if (resolved.depth === 0) {
3235
+ const node2 = (_a = resolved.nodeAfter) != null ? _a : resolved.nodeBefore;
3236
+ if (!node2) return {
3237
+ from: pos,
3238
+ to: pos
3239
+ };
3240
+ const nodePos = resolved.nodeAfter ? pos : pos - node2.nodeSize;
3241
+ return {
3242
+ from: nodePos,
3243
+ to: nodePos + node2.nodeSize
3244
+ };
3245
+ }
3246
+ const topLevelPos = resolved.before(1);
3247
+ return {
3248
+ from: topLevelPos,
3249
+ to: topLevelPos + resolved.node(1).nodeSize
3250
+ };
3251
+ }
3252
+ function toContentRelativeRange(doc, range) {
3253
+ return {
3254
+ from: Math.max(0, range.from - 1),
3255
+ to: Math.min(doc.content.size, range.to - 1)
3256
+ };
3257
+ }
3258
+ function getTopLevelBlocksInRange(doc, from, to) {
3259
+ const ranges = [];
3260
+ doc.forEach((node, offset) => {
3261
+ const nodeStart = offset;
3262
+ const nodeEnd = nodeStart + node.nodeSize;
3263
+ const absNodeStart = nodeStart + 1;
3264
+ const absNodeEnd = nodeEnd + 1;
3265
+ if (absNodeStart < to && absNodeEnd > from) ranges.push({
3266
+ from: nodeStart,
3267
+ to: nodeEnd
3268
+ });
3269
+ });
3270
+ return ranges;
3271
+ }
3272
+ function mergeRanges(ranges) {
3273
+ if (ranges.length === 0) return [];
3274
+ const sorted = [...ranges].sort((a, b) => a.from - b.from);
3275
+ const merged = [{ ...sorted[0] }];
3276
+ for (let i = 1; i < sorted.length; i += 1) {
3277
+ const last = merged[merged.length - 1];
3278
+ const current = sorted[i];
3279
+ if (current.from <= last.to) last.to = Math.max(last.to, current.to);
3280
+ else merged.push({ ...current });
3281
+ }
3282
+ return merged;
3283
+ }
3284
+ function collectBlocksForChange(doc, change) {
3285
+ const ranges = getTopLevelBlocksInRange(doc, change.from, change.to);
3286
+ ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, change.from)));
3287
+ if (change.to > change.from) ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, Math.min(change.to, doc.content.size + 1) - 1)));
3288
+ else if (change.from < doc.content.size + 1) ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, Math.min(change.from + 1, doc.content.size))));
3289
+ return ranges;
3290
+ }
3291
+ function collectRescanRanges(tr, oldState, newState) {
3292
+ const ranges = [];
3293
+ if (tr.docChanged) {
3294
+ const changes = require_dist.getChangedRanges(tr);
3295
+ for (const change of changes) ranges.push(...collectBlocksForChange(newState.doc, change.newRange));
3296
+ }
3297
+ if (tr.selectionSet) {
3298
+ ranges.push(toContentRelativeRange(newState.doc, resolveTopLevelRange(newState.doc, tr.mapping.map(oldState.selection.anchor))));
3299
+ ranges.push(toContentRelativeRange(newState.doc, resolveTopLevelRange(newState.doc, newState.selection.anchor)));
3300
+ }
3301
+ return mergeRanges(ranges);
3302
+ }
3303
+ function clampRange(from, to, doc) {
3304
+ const clampedFrom = Math.max(0, Math.min(from, doc.content.size));
3305
+ return {
3306
+ from: clampedFrom,
3307
+ to: Math.max(clampedFrom, Math.min(to, doc.content.size))
3308
+ };
3309
+ }
3310
+ function updateDecorationsInRanges({ decorations, ranges, editor, options, dataAttribute, doc, selection }) {
3311
+ let next = decorations;
3312
+ for (const range of ranges) {
3313
+ const { from, to } = clampRange(range.from, range.to, doc);
3314
+ const existing = next.find(from, to).filter((decoration) => decoration.from >= from && decoration.to <= to);
3315
+ if (existing.length) next = next.remove(existing);
3316
+ const newDecos = scanRangeForDecorations({
3317
+ editor,
3318
+ options,
3319
+ dataAttribute,
3320
+ doc,
3321
+ selection,
3322
+ from,
3323
+ to
3324
+ });
3325
+ if (newDecos.length) next = next.add(doc, newDecos);
3326
+ }
3327
+ return next;
3328
+ }
3329
+ function createPlaceholderStateField({ editor, options, dataAttribute }) {
3330
+ return {
3331
+ init(_config, state) {
3332
+ const decorations = buildPlaceholderDecorations({
3333
+ editor,
3334
+ options,
3335
+ dataAttribute,
3336
+ doc: state.doc,
3337
+ selection: state.selection
3338
+ });
3339
+ return decorations != null ? decorations : require_dist.DecorationSet.empty;
3340
+ },
3341
+ apply(tr, prev, oldState, newState) {
3342
+ if (!tr.docChanged && !tr.selectionSet) return prev;
3343
+ return updateDecorationsInRanges({
3344
+ decorations: prev.map(tr.mapping, tr.doc),
3345
+ ranges: collectRescanRanges(tr, oldState, newState),
3346
+ editor,
3347
+ options,
3348
+ dataAttribute,
3349
+ doc: newState.doc,
3350
+ selection: newState.selection
3351
+ });
3352
+ }
3353
+ };
3354
+ }
3355
+ function preparePlaceholderAttribute(attr) {
3356
+ return attr.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
3357
+ }
3358
+ function createPlaceholderPlugin({ editor, options }) {
3359
+ const dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;
3360
+ const useResolvedPath = options.showOnlyCurrent && !options.includeChildren;
3361
+ return new require_dist.Plugin({
3362
+ key: PLUGIN_KEY,
3363
+ ...useResolvedPath ? {} : { state: createPlaceholderStateField({
3364
+ editor,
3365
+ options,
3366
+ dataAttribute
3367
+ }) },
3368
+ props: { decorations: useResolvedPath ? ({ doc, selection }) => buildPlaceholderDecorations({
3369
+ editor,
3370
+ options,
3371
+ dataAttribute,
3372
+ doc,
3373
+ selection
3374
+ }) : (state) => {
3375
+ var _a;
3376
+ if (options.showOnlyWhenEditable && !editor.isEditable) return require_dist.DecorationSet.empty;
3377
+ return (_a = PLUGIN_KEY.getState(state)) != null ? _a : require_dist.DecorationSet.empty;
3378
+ } }
3379
+ });
3380
+ }
2996
3381
  var Placeholder = require_dist.Extension.create({
2997
3382
  name: "placeholder",
2998
3383
  addOptions() {
2999
3384
  return {
3000
3385
  emptyEditorClass: "is-editor-empty",
3001
3386
  emptyNodeClass: "is-empty",
3387
+ dataAttribute: DEFAULT_DATA_ATTRIBUTE,
3002
3388
  placeholder: "Write something …",
3003
3389
  showOnlyWhenEditable: true,
3004
3390
  showOnlyCurrent: true,
@@ -3006,38 +3392,25 @@ var Placeholder = require_dist.Extension.create({
3006
3392
  };
3007
3393
  },
3008
3394
  addProseMirrorPlugins() {
3009
- return [new require_dist.Plugin({
3010
- key: new require_dist.PluginKey("placeholder"),
3011
- props: { decorations: ({ doc, selection }) => {
3012
- const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;
3013
- const { anchor } = selection;
3014
- const decorations = [];
3015
- if (!active) return null;
3016
- const isEmptyDoc = this.editor.isEmpty;
3017
- doc.descendants((node, pos) => {
3018
- const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;
3019
- const isEmpty = !node.isLeaf && require_dist.isNodeEmpty(node);
3020
- if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
3021
- const classes = [this.options.emptyNodeClass];
3022
- if (isEmptyDoc) classes.push(this.options.emptyEditorClass);
3023
- const decoration = require_dist.Decoration.node(pos, pos + node.nodeSize, {
3024
- class: classes.join(" "),
3025
- "data-placeholder": typeof this.options.placeholder === "function" ? this.options.placeholder({
3026
- editor: this.editor,
3027
- node,
3028
- pos,
3029
- hasAnchor
3030
- }) : this.options.placeholder
3031
- });
3032
- decorations.push(decoration);
3033
- }
3034
- return this.options.includeChildren;
3035
- });
3036
- return require_dist.DecorationSet.create(doc, decorations);
3037
- } }
3395
+ return [createPlaceholderPlugin({
3396
+ editor: this.editor,
3397
+ options: this.options
3038
3398
  })];
3039
3399
  }
3040
3400
  });
3401
+ function shouldSyncDomSelection(state, editor) {
3402
+ return !state.selection.empty && !require_dist.isNodeSelection(state.selection) && editor.isEditable;
3403
+ }
3404
+ function shouldPreserveSelection(state, editor) {
3405
+ return shouldSyncDomSelection(state, editor) && !editor.isFocused && !editor.view.dragging;
3406
+ }
3407
+ function clearDomSelection() {
3408
+ var _a;
3409
+ (_a = window.getSelection()) == null || _a.removeAllRanges();
3410
+ }
3411
+ function restoreDomSelection(view) {
3412
+ view.focus();
3413
+ }
3041
3414
  require_dist.Extension.create({
3042
3415
  name: "selection",
3043
3416
  addOptions() {
@@ -3047,10 +3420,26 @@ require_dist.Extension.create({
3047
3420
  const { editor, options } = this;
3048
3421
  return [new require_dist.Plugin({
3049
3422
  key: new require_dist.PluginKey("selection"),
3050
- props: { decorations(state) {
3051
- if (state.selection.empty || editor.isFocused || !editor.isEditable || require_dist.isNodeSelection(state.selection) || editor.view.dragging) return null;
3052
- return require_dist.DecorationSet.create(state.doc, [require_dist.Decoration.inline(state.selection.from, state.selection.to, { class: options.className })]);
3053
- } }
3423
+ props: {
3424
+ decorations(state) {
3425
+ if (!shouldPreserveSelection(state, editor)) return null;
3426
+ return require_dist.DecorationSet.create(state.doc, [require_dist.Decoration.inline(state.selection.from, state.selection.to, { class: options.className })]);
3427
+ },
3428
+ handleDOMEvents: {
3429
+ blur(view) {
3430
+ if (!shouldSyncDomSelection(view.state, editor)) return false;
3431
+ clearDomSelection();
3432
+ return false;
3433
+ },
3434
+ focus(view) {
3435
+ if (!shouldSyncDomSelection(view.state, editor)) return false;
3436
+ requestAnimationFrame(() => {
3437
+ if (!editor.isDestroyed && view.hasFocus()) restoreDomSelection(view);
3438
+ });
3439
+ return false;
3440
+ }
3441
+ }
3442
+ }
3054
3443
  })];
3055
3444
  }
3056
3445
  });
@@ -3068,15 +3457,16 @@ var TrailingNode = require_dist.Extension.create({
3068
3457
  addProseMirrorPlugins() {
3069
3458
  var _a;
3070
3459
  const plugin = new require_dist.PluginKey(this.name);
3071
- const defaultNode = ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || this.options.node || "paragraph";
3460
+ const defaultNode = this.options.node || ((_a = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : _a.name) || "paragraph";
3072
3461
  const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));
3073
3462
  return [new require_dist.Plugin({
3074
3463
  key: plugin,
3075
- appendTransaction: (_, __, state) => {
3464
+ appendTransaction: (transactions, __, state) => {
3076
3465
  const { doc, tr, schema } = state;
3077
3466
  const shouldInsertNodeAtEnd = plugin.getState(state);
3078
3467
  const endPosition = doc.content.size;
3079
3468
  const type = schema.nodes[defaultNode];
3469
+ if (transactions.some((transaction) => transaction.getMeta("skipTrailingNode"))) return;
3080
3470
  if (!shouldInsertNodeAtEnd) return;
3081
3471
  return tr.insert(endPosition, type.create());
3082
3472
  },
@@ -3133,7 +3523,7 @@ var UndoRedo = require_dist.Extension.create({
3133
3523
  }
3134
3524
  });
3135
3525
  //#endregion
3136
- //#region ../../node_modules/.pnpm/@tiptap+core@3.11.0_@tiptap+pm@3.11.0/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
3526
+ //#region ../../node_modules/.pnpm/@tiptap+core@3.29.2_@tiptap+pm@3.29.2/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
3137
3527
  var h$1 = (tag, attributes) => {
3138
3528
  if (tag === "slot") return 0;
3139
3529
  if (tag instanceof Function) return tag(attributes);
@@ -3146,8 +3536,31 @@ var h$1 = (tag, attributes) => {
3146
3536
  ];
3147
3537
  };
3148
3538
  //#endregion
3149
- //#region ../../node_modules/.pnpm/@tiptap+extension-blockquote@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-blockquote/dist/index.js
3150
- var inputRegex$3 = /^\s*>\s$/;
3539
+ //#region ../../node_modules/.pnpm/@tiptap+extension-blockquote@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-blockquote/dist/index.js
3540
+ var handleBackspace$1 = (editor, type) => {
3541
+ var _a;
3542
+ const { state, view } = editor;
3543
+ const { selection } = state;
3544
+ if (!selection.empty) return false;
3545
+ const { $from } = selection;
3546
+ if ($from.parentOffset !== 0) return false;
3547
+ const parentDepth = $from.depth - 1;
3548
+ if (parentDepth < 0) return false;
3549
+ const parent = $from.node(parentDepth);
3550
+ const index = $from.index(parentDepth);
3551
+ if (index === 0) return false;
3552
+ if (parent.type === type) return editor.commands.lift(type.name);
3553
+ const previous = parent.child(index - 1);
3554
+ if (previous.type !== type || !((_a = previous.lastChild) == null ? void 0 : _a.isTextblock)) return false;
3555
+ const blockStart = $from.before();
3556
+ const targetPos = blockStart - 1 - 1;
3557
+ const { tr } = state;
3558
+ tr.delete(blockStart, $from.after()).insert(targetPos, $from.parent.content);
3559
+ tr.setSelection(require_dist.TextSelection.create(tr.doc, targetPos));
3560
+ view.dispatch(tr.scrollIntoView());
3561
+ return true;
3562
+ };
3563
+ var inputRegex$2 = /^\s*>\s$/;
3151
3564
  var Blockquote = require_dist.Node3.create({
3152
3565
  name: "blockquote",
3153
3566
  addOptions() {
@@ -3166,14 +3579,17 @@ var Blockquote = require_dist.Node3.create({
3166
3579
  });
3167
3580
  },
3168
3581
  parseMarkdown: (token, helpers) => {
3169
- return helpers.createNode("blockquote", void 0, helpers.parseChildren(token.tokens || []));
3582
+ var _a;
3583
+ const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren;
3584
+ return helpers.createNode("blockquote", void 0, parseBlockChildren(token.tokens || []));
3170
3585
  },
3171
3586
  renderMarkdown: (node, h) => {
3172
3587
  if (!node.content) return "";
3173
3588
  const prefix = ">";
3174
3589
  const result = [];
3175
- node.content.forEach((child) => {
3176
- const linesWithPrefix = h.renderChildren([child]).split("\n").map((line) => {
3590
+ node.content.forEach((child, index) => {
3591
+ var _a, _b;
3592
+ const linesWithPrefix = ((_b = (_a = h.renderChild) == null ? void 0 : _a.call(h, child, index)) != null ? _b : h.renderChildren([child])).split("\n").map((line) => {
3177
3593
  if (line.trim() === "") return prefix;
3178
3594
  return `${prefix} ${line}`;
3179
3595
  });
@@ -3197,17 +3613,20 @@ ${prefix}
3197
3613
  };
3198
3614
  },
3199
3615
  addKeyboardShortcuts() {
3200
- return { "Mod-Shift-b": () => this.editor.commands.toggleBlockquote() };
3616
+ return {
3617
+ "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
3618
+ Backspace: () => handleBackspace$1(this.editor, this.type)
3619
+ };
3201
3620
  },
3202
3621
  addInputRules() {
3203
3622
  return [require_dist.wrappingInputRule({
3204
- find: inputRegex$3,
3623
+ find: inputRegex$2,
3205
3624
  type: this.type
3206
3625
  })];
3207
3626
  }
3208
3627
  });
3209
3628
  //#endregion
3210
- //#region ../../node_modules/.pnpm/@tiptap+extension-bold@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-bold/dist/index.js
3629
+ //#region ../../node_modules/.pnpm/@tiptap+extension-bold@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-bold/dist/index.js
3211
3630
  var starInputRegex$1 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
3212
3631
  var starPasteRegex$1 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
3213
3632
  var underscoreInputRegex$1 = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
@@ -3244,6 +3663,10 @@ var Bold = require_dist.Mark.create({
3244
3663
  parseMarkdown: (token, helpers) => {
3245
3664
  return helpers.applyMark("bold", helpers.parseInline(token.tokens || []));
3246
3665
  },
3666
+ markdownOptions: { htmlReopen: {
3667
+ open: "<strong>",
3668
+ close: "</strong>"
3669
+ } },
3247
3670
  renderMarkdown: (node, h) => {
3248
3671
  return `**${h.renderChildren(node)}**`;
3249
3672
  },
@@ -3286,9 +3709,31 @@ var Bold = require_dist.Mark.create({
3286
3709
  }
3287
3710
  });
3288
3711
  //#endregion
3289
- //#region ../../node_modules/.pnpm/@tiptap+extension-code@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-code/dist/index.js
3290
- var inputRegex$2 = /(^|[^`])`([^`]+)`(?!`)$/;
3291
- var pasteRegex$1 = /(^|[^`])`([^`]+)`(?!`)/g;
3712
+ //#region ../../node_modules/.pnpm/@tiptap+extension-code@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-code/dist/index.js
3713
+ var inputRegexMatch = (text) => {
3714
+ const match = /`([^`]+)`(?!`)$/.exec(text);
3715
+ if (!match) return null;
3716
+ if (match.index > 0 && text[match.index - 1] === "`") return null;
3717
+ return {
3718
+ index: match.index,
3719
+ text: match[0],
3720
+ replaceWith: match[1]
3721
+ };
3722
+ };
3723
+ var pasteRegexMatch = (text) => {
3724
+ const regex = /`([^`]+)`(?!`)/g;
3725
+ const matches = [];
3726
+ let match;
3727
+ while ((match = regex.exec(text)) !== null) {
3728
+ if (match.index > 0 && text[match.index - 1] === "`") continue;
3729
+ matches.push({
3730
+ index: match.index,
3731
+ text: match[0],
3732
+ replaceWith: match[1]
3733
+ });
3734
+ }
3735
+ return matches;
3736
+ };
3292
3737
  var Code = require_dist.Mark.create({
3293
3738
  name: "code",
3294
3739
  addOptions() {
@@ -3336,19 +3781,19 @@ var Code = require_dist.Mark.create({
3336
3781
  },
3337
3782
  addInputRules() {
3338
3783
  return [require_dist.markInputRule({
3339
- find: inputRegex$2,
3784
+ find: inputRegexMatch,
3340
3785
  type: this.type
3341
3786
  })];
3342
3787
  },
3343
3788
  addPasteRules() {
3344
3789
  return [require_dist.markPasteRule({
3345
- find: pasteRegex$1,
3790
+ find: pasteRegexMatch,
3346
3791
  type: this.type
3347
3792
  })];
3348
3793
  }
3349
3794
  });
3350
3795
  //#endregion
3351
- //#region ../../node_modules/.pnpm/@tiptap+extension-code-block@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0__@tiptap+pm@3.11.0/node_modules/@tiptap/extension-code-block/dist/index.js
3796
+ //#region ../../node_modules/.pnpm/@tiptap+extension-code-block@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-code-block/dist/index.js
3352
3797
  var DEFAULT_TAB_SIZE = 4;
3353
3798
  var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
3354
3799
  var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
@@ -3359,6 +3804,7 @@ var CodeBlock = require_dist.Node3.create({
3359
3804
  languageClassPrefix: "language-",
3360
3805
  exitOnTripleEnter: true,
3361
3806
  exitOnArrowDown: true,
3807
+ exitOnArrowUp: true,
3362
3808
  defaultLanguage: null,
3363
3809
  enableTabIndentation: false,
3364
3810
  tabSize: DEFAULT_TAB_SIZE,
@@ -3403,8 +3849,8 @@ var CodeBlock = require_dist.Node3.create({
3403
3849
  },
3404
3850
  markdownTokenName: "code",
3405
3851
  parseMarkdown: (token, helpers) => {
3406
- var _a;
3407
- if (((_a = token.raw) == null ? void 0 : _a.startsWith("```")) === false && token.codeBlockStyle !== "indented") return [];
3852
+ var _a, _b;
3853
+ if (((_a = token.raw) == null ? void 0 : _a.startsWith("```")) === false && ((_b = token.raw) == null ? void 0 : _b.startsWith("~~~")) === false && token.codeBlockStyle !== "indented") return [];
3408
3854
  return helpers.createNode("codeBlock", { language: token.lang || null }, token.text ? [helpers.createTextNode(token.text)] : []);
3409
3855
  },
3410
3856
  renderMarkdown: (node, h) => {
@@ -3517,6 +3963,17 @@ var CodeBlock = require_dist.Node3.create({
3517
3963
  return true;
3518
3964
  }).exitCode().run();
3519
3965
  },
3966
+ ArrowUp: ({ editor }) => {
3967
+ if (!this.options.exitOnArrowUp) return false;
3968
+ const { state } = editor;
3969
+ const { selection } = state;
3970
+ const { $from, empty } = selection;
3971
+ if (!empty || $from.parent.type !== this.type) return false;
3972
+ if ($from.parentOffset !== 0) return false;
3973
+ const before = $from.before();
3974
+ if (before > 0) return false;
3975
+ return editor.commands.insertDefaultBlock({ pos: before });
3976
+ },
3520
3977
  ArrowDown: ({ editor }) => {
3521
3978
  if (!this.options.exitOnArrowDown) return false;
3522
3979
  const { state } = editor;
@@ -3568,7 +4025,7 @@ var CodeBlock = require_dist.Node3.create({
3568
4025
  }
3569
4026
  });
3570
4027
  //#endregion
3571
- //#region ../../node_modules/.pnpm/@tiptap+extension-document@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-document/dist/index.js
4028
+ //#region ../../node_modules/.pnpm/@tiptap+extension-document@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-document/dist/index.js
3572
4029
  var Document = require_dist.Node3.create({
3573
4030
  name: "doc",
3574
4031
  topNode: true,
@@ -3579,7 +4036,7 @@ var Document = require_dist.Node3.create({
3579
4036
  }
3580
4037
  });
3581
4038
  //#endregion
3582
- //#region ../../node_modules/.pnpm/@tiptap+extension-hard-break@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-hard-break/dist/index.js
4039
+ //#region ../../node_modules/.pnpm/@tiptap+extension-hard-break@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-hard-break/dist/index.js
3583
4040
  var HardBreak = require_dist.Node3.create({
3584
4041
  name: "hardBreak",
3585
4042
  markdownTokenName: "br",
@@ -3621,7 +4078,7 @@ var HardBreak = require_dist.Node3.create({
3621
4078
  tr.ensureMarks(filteredMarks);
3622
4079
  }
3623
4080
  return true;
3624
- }).run();
4081
+ }).scrollIntoView().run();
3625
4082
  })]);
3626
4083
  } };
3627
4084
  },
@@ -3633,7 +4090,7 @@ var HardBreak = require_dist.Node3.create({
3633
4090
  }
3634
4091
  });
3635
4092
  //#endregion
3636
- //#region ../../node_modules/.pnpm/@tiptap+extension-heading@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-heading/dist/index.js
4093
+ //#region ../../node_modules/.pnpm/@tiptap+extension-heading@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-heading/dist/index.js
3637
4094
  var Heading = require_dist.Node3.create({
3638
4095
  name: "heading",
3639
4096
  addOptions() {
@@ -3710,7 +4167,7 @@ var Heading = require_dist.Node3.create({
3710
4167
  }
3711
4168
  });
3712
4169
  //#endregion
3713
- //#region ../../node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0__@tiptap+pm@3.11.0/node_modules/@tiptap/extension-horizontal-rule/dist/index.js
4170
+ //#region ../../node_modules/.pnpm/@tiptap+extension-horizontal-rule@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-horizontal-rule/dist/index.js
3714
4171
  var HorizontalRule = require_dist.Node3.create({
3715
4172
  name: "horizontalRule",
3716
4173
  addOptions() {
@@ -3745,10 +4202,11 @@ var HorizontalRule = require_dist.Node3.create({
3745
4202
  if (dispatch) {
3746
4203
  const { $to } = tr.selection;
3747
4204
  const posAfter = $to.end();
3748
- if ($to.nodeAfter) if ($to.nodeAfter.isTextblock) tr.setSelection(require_dist.TextSelection.create(tr.doc, $to.pos + 1));
3749
- else if ($to.nodeAfter.isBlock) tr.setSelection(require_dist.NodeSelection.create(tr.doc, $to.pos));
3750
- else tr.setSelection(require_dist.TextSelection.create(tr.doc, $to.pos));
3751
- else {
4205
+ if ($to.nodeAfter) {
4206
+ if ($to.nodeAfter.isTextblock) tr.setSelection(require_dist.TextSelection.create(tr.doc, $to.pos + 1));
4207
+ else if ($to.nodeAfter.isBlock) tr.setSelection(require_dist.NodeSelection.create(tr.doc, $to.pos));
4208
+ else tr.setSelection(require_dist.TextSelection.create(tr.doc, $to.pos));
4209
+ } else {
3752
4210
  const nodeType = chainState.schema.nodes[this.options.nextNodeType] || $to.parent.type.contentMatch.defaultType;
3753
4211
  const node = nodeType == null ? void 0 : nodeType.create();
3754
4212
  if (node) {
@@ -3770,7 +4228,7 @@ var HorizontalRule = require_dist.Node3.create({
3770
4228
  }
3771
4229
  });
3772
4230
  //#endregion
3773
- //#region ../../node_modules/.pnpm/@tiptap+extension-italic@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-italic/dist/index.js
4231
+ //#region ../../node_modules/.pnpm/@tiptap+extension-italic@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-italic/dist/index.js
3774
4232
  var starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
3775
4233
  var starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
3776
4234
  var underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
@@ -3818,6 +4276,10 @@ var Italic = require_dist.Mark.create({
3818
4276
  parseMarkdown: (token, helpers) => {
3819
4277
  return helpers.applyMark("italic", helpers.parseInline(token.tokens || []));
3820
4278
  },
4279
+ markdownOptions: { htmlReopen: {
4280
+ open: "<em>",
4281
+ close: "</em>"
4282
+ } },
3821
4283
  renderMarkdown: (node, h) => {
3822
4284
  return `*${h.renderChildren(node)}*`;
3823
4285
  },
@@ -3847,7 +4309,7 @@ var Italic = require_dist.Mark.create({
3847
4309
  }
3848
4310
  });
3849
4311
  //#endregion
3850
- //#region ../../node_modules/.pnpm/@tiptap+extension-list@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0__@tiptap+pm@3.11.0/node_modules/@tiptap/extension-list/dist/index.js
4312
+ //#region ../../node_modules/.pnpm/@tiptap+extension-list@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-list/dist/index.js
3851
4313
  var __defProp = Object.defineProperty;
3852
4314
  var __export = (target, all) => {
3853
4315
  for (var name in all) __defProp(target, name, {
@@ -3922,6 +4384,217 @@ var BulletList = require_dist.Node3.create({
3922
4384
  return [inputRule];
3923
4385
  }
3924
4386
  });
4387
+ var getBranchingNestedListAtCursor = (state, itemName, wrapperNames) => {
4388
+ const { selection } = state;
4389
+ if (!selection.empty) return null;
4390
+ const { $from } = selection;
4391
+ if (!$from.parent.isTextblock) return null;
4392
+ if ($from.parentOffset !== $from.parent.content.size) return null;
4393
+ let listItemDepth = -1;
4394
+ for (let depth = $from.depth; depth > 0; depth -= 1) if ($from.node(depth).type.name === itemName) {
4395
+ listItemDepth = depth;
4396
+ break;
4397
+ }
4398
+ if (listItemDepth < 0) return null;
4399
+ const listItem = $from.node(listItemDepth);
4400
+ const indexInListItem = $from.index(listItemDepth);
4401
+ if (indexInListItem + 1 >= listItem.childCount) return null;
4402
+ const nextChild = listItem.child(indexInListItem + 1);
4403
+ if (!wrapperNames.includes(nextChild.type.name)) return null;
4404
+ const itemType = state.schema.nodes[itemName];
4405
+ let hasBranching = false;
4406
+ nextChild.forEach((child) => {
4407
+ if (child.type === itemType && child.childCount > 1) hasBranching = true;
4408
+ });
4409
+ if (!hasBranching) return null;
4410
+ const nodeAfter = state.doc.resolve($from.after()).nodeAfter;
4411
+ if (!nodeAfter || !wrapperNames.includes(nodeAfter.type.name)) return null;
4412
+ const items = [];
4413
+ nodeAfter.forEach((child) => {
4414
+ items.push(child);
4415
+ });
4416
+ if (items.length === 0) return null;
4417
+ return {
4418
+ listItemDepth,
4419
+ nestedList: nodeAfter,
4420
+ nestedListPos: $from.after(),
4421
+ insertPos: $from.after(listItemDepth),
4422
+ items
4423
+ };
4424
+ };
4425
+ var hoistBranchingNestedList = (state, dispatch, itemName, wrapperNames) => {
4426
+ const context = getBranchingNestedListAtCursor(state, itemName, wrapperNames);
4427
+ if (!context) return false;
4428
+ const { selection } = state;
4429
+ const { nestedList, nestedListPos, insertPos, items } = context;
4430
+ const tr = state.tr;
4431
+ tr.delete(nestedListPos, nestedListPos + nestedList.nodeSize);
4432
+ const mappedInsertPos = tr.mapping.map(insertPos);
4433
+ tr.insert(mappedInsertPos, require_dist.Fragment.from(items));
4434
+ tr.setSelection(selection.map(tr.doc, tr.mapping));
4435
+ if (dispatch) dispatch(tr);
4436
+ return true;
4437
+ };
4438
+ var handleDeleteBranchingNestedList = (editor, itemName, wrapperNames) => {
4439
+ return hoistBranchingNestedList(editor.state, editor.view.dispatch, itemName, wrapperNames);
4440
+ };
4441
+ var createBranchingListDeleteKeymap = (itemName, wrapperNames) => {
4442
+ return require_dist.Extension.create({
4443
+ name: `${itemName}BranchingDeleteKeymap`,
4444
+ priority: 101,
4445
+ addKeyboardShortcuts() {
4446
+ const handleDelete2 = () => handleDeleteBranchingNestedList(this.editor, itemName, wrapperNames);
4447
+ return {
4448
+ Delete: handleDelete2,
4449
+ "Mod-Delete": handleDelete2
4450
+ };
4451
+ }
4452
+ });
4453
+ };
4454
+ var ROMAN_NUMERALS = [
4455
+ [1e3, "m"],
4456
+ [900, "cm"],
4457
+ [500, "d"],
4458
+ [400, "cd"],
4459
+ [100, "c"],
4460
+ [90, "xc"],
4461
+ [50, "l"],
4462
+ [40, "xl"],
4463
+ [10, "x"],
4464
+ [9, "ix"],
4465
+ [5, "v"],
4466
+ [4, "iv"],
4467
+ [1, "i"]
4468
+ ];
4469
+ var ALPHA_NUMERALS = "abcdefghijklmnopqrstuvwxyz";
4470
+ var ORDERED_LIST_MARKER_PATTERN = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
4471
+ function toRoman(num) {
4472
+ let remaining = num;
4473
+ let result = "";
4474
+ for (const [value, numeral] of ROMAN_NUMERALS) while (remaining >= value) {
4475
+ result += numeral;
4476
+ remaining -= value;
4477
+ }
4478
+ return result;
4479
+ }
4480
+ function toRomanUpper(num) {
4481
+ return toRoman(num).toUpperCase();
4482
+ }
4483
+ function fromRoman(roman) {
4484
+ const lower = roman.toLowerCase();
4485
+ let index = 0;
4486
+ let result = 0;
4487
+ while (index < lower.length) {
4488
+ let matched = false;
4489
+ for (const [value, numeral] of ROMAN_NUMERALS) if (lower.startsWith(numeral, index)) {
4490
+ result += value;
4491
+ index += numeral.length;
4492
+ matched = true;
4493
+ break;
4494
+ }
4495
+ if (!matched) return 0;
4496
+ }
4497
+ return result;
4498
+ }
4499
+ function isValidRoman(marker) {
4500
+ if (!/^[ivxlcdmIVXLCDM]+$/.test(marker)) return false;
4501
+ const value = fromRoman(marker);
4502
+ if (value <= 0) return false;
4503
+ return (marker === marker.toLowerCase() ? toRoman(value) : toRomanUpper(value)) === marker;
4504
+ }
4505
+ function fromAlpha(marker) {
4506
+ const lower = marker.toLowerCase();
4507
+ if (lower.length === 1) return lower.charCodeAt(0) - "a".charCodeAt(0) + 1;
4508
+ if (lower.length === 2) {
4509
+ const first = lower.charCodeAt(0) - "a".charCodeAt(0);
4510
+ const second = lower.charCodeAt(1) - "a".charCodeAt(0);
4511
+ return (first + 1) * 26 + second + 1;
4512
+ }
4513
+ return 0;
4514
+ }
4515
+ function toRomanAlpha(num) {
4516
+ if (num <= 26) return ALPHA_NUMERALS[num - 1];
4517
+ const first = Math.floor((num - 1) / 26) - 1;
4518
+ const second = (num - 1) % 26;
4519
+ if (first < 0) return ALPHA_NUMERALS[second];
4520
+ return ALPHA_NUMERALS[first] + ALPHA_NUMERALS[second];
4521
+ }
4522
+ function detectMarkerType(marker) {
4523
+ if (!marker || /^\d+$/.test(marker)) return;
4524
+ if (isValidRoman(marker)) return marker === marker.toLowerCase() ? "i" : "I";
4525
+ if (/^[a-z]{1,2}$/.test(marker)) return "a";
4526
+ if (/^[A-Z]{1,2}$/.test(marker)) return "A";
4527
+ }
4528
+ function markerToStart(marker) {
4529
+ if (/^\d+$/.test(marker)) return parseInt(marker, 10);
4530
+ const type = detectMarkerType(marker);
4531
+ if (type === "i" || type === "I") return fromRoman(marker);
4532
+ if (type === "a" || type === "A") {
4533
+ const start = fromAlpha(marker);
4534
+ return start > 0 ? start : 1;
4535
+ }
4536
+ const parsed = parseInt(marker, 10);
4537
+ return Number.isNaN(parsed) ? 1 : parsed;
4538
+ }
4539
+ function startToMarker(type, start) {
4540
+ if (type === "numeric") return String(start);
4541
+ switch (type) {
4542
+ case "a": return toRomanAlpha(start);
4543
+ case "A": return toRomanAlpha(start).toUpperCase();
4544
+ case "i": return toRoman(start);
4545
+ case "I": return toRomanUpper(start);
4546
+ default: return String(start);
4547
+ }
4548
+ }
4549
+ function areOrderedListMarkersSequential(markers) {
4550
+ var _a;
4551
+ if (markers.length === 0) return false;
4552
+ const firstType = (_a = detectMarkerType(markers[0])) != null ? _a : "numeric";
4553
+ const firstStart = markerToStart(markers[0]);
4554
+ if (firstStart < 1) return false;
4555
+ for (let i = 0; i < markers.length; i++) {
4556
+ const expected = startToMarker(firstType, firstStart + i);
4557
+ if (markers[i] !== expected) return false;
4558
+ }
4559
+ return true;
4560
+ }
4561
+ function parseListMarker(marker) {
4562
+ return {
4563
+ type: detectMarkerType(marker),
4564
+ start: markerToStart(marker)
4565
+ };
4566
+ }
4567
+ function buildOrderedListAttrsFromMarker(marker) {
4568
+ const { type, start } = parseListMarker(marker);
4569
+ const attrs = {};
4570
+ if (type) attrs.type = type;
4571
+ if (start !== 1) attrs.start = start;
4572
+ return attrs;
4573
+ }
4574
+ function getListMarker(type, index, separator = ". ") {
4575
+ const position = index + 1;
4576
+ if (!type || type === "1") return `${position}${separator}`;
4577
+ switch (type) {
4578
+ case "a": return `${toRomanAlpha(position)}${separator}`;
4579
+ case "A": return `${toRomanAlpha(position).toUpperCase()}${separator}`;
4580
+ case "i": return `${toRoman(position)}${separator}`;
4581
+ case "I": return `${toRomanUpper(position)}${separator}`;
4582
+ default: return `${position}${separator}`;
4583
+ }
4584
+ }
4585
+ function isSameLineOrderedListToken(token) {
4586
+ var _a, _b;
4587
+ const nestedToken = (_a = token.tokens) == null ? void 0 : _a[0];
4588
+ return Boolean(token.text && ((_b = token.tokens) == null ? void 0 : _b.length) === 1 && (nestedToken == null ? void 0 : nestedToken.type) === "list" && nestedToken.ordered && nestedToken.raw === token.text);
4589
+ }
4590
+ function parseSameLineOrderedListText(text, helpers) {
4591
+ if (helpers.tokenizeInline) return helpers.parseInline(helpers.tokenizeInline(text));
4592
+ return helpers.parseInline([{
4593
+ type: "text",
4594
+ raw: text,
4595
+ text
4596
+ }]);
4597
+ }
3925
4598
  var ListItem = require_dist.Node3.create({
3926
4599
  name: "listItem",
3927
4600
  addOptions() {
@@ -3945,22 +4618,32 @@ var ListItem = require_dist.Node3.create({
3945
4618
  },
3946
4619
  markdownTokenName: "list_item",
3947
4620
  parseMarkdown: (token, helpers) => {
4621
+ var _a;
3948
4622
  if (token.type !== "list_item") return [];
4623
+ const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren;
3949
4624
  let content = [];
3950
- if (token.tokens && token.tokens.length > 0) if (token.tokens.some((t) => t.type === "paragraph")) content = helpers.parseChildren(token.tokens);
3951
- else {
3952
- const firstToken = token.tokens[0];
3953
- if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) {
3954
- content = [{
4625
+ if (token.tokens && token.tokens.length > 0) {
4626
+ if (isSameLineOrderedListToken(token)) return {
4627
+ type: "listItem",
4628
+ content: [{
3955
4629
  type: "paragraph",
3956
- content: helpers.parseInline(firstToken.tokens)
3957
- }];
3958
- if (token.tokens.length > 1) {
3959
- const remainingTokens = token.tokens.slice(1);
3960
- const additionalContent = helpers.parseChildren(remainingTokens);
3961
- content.push(...additionalContent);
3962
- }
3963
- } else content = helpers.parseChildren(token.tokens);
4630
+ content: parseSameLineOrderedListText(token.text || "", helpers)
4631
+ }]
4632
+ };
4633
+ if (token.tokens.some((t) => t.type === "paragraph")) content = parseBlockChildren(token.tokens);
4634
+ else {
4635
+ const firstToken = token.tokens[0];
4636
+ if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) {
4637
+ content = [{
4638
+ type: "paragraph",
4639
+ content: helpers.parseInline(firstToken.tokens)
4640
+ }];
4641
+ if (token.tokens.length > 1) {
4642
+ const additionalContent = parseBlockChildren(token.tokens.slice(1));
4643
+ content.push(...additionalContent);
4644
+ }
4645
+ } else content = parseBlockChildren(token.tokens);
4646
+ }
3964
4647
  }
3965
4648
  if (content.length === 0) content = [{
3966
4649
  type: "paragraph",
@@ -3973,11 +4656,18 @@ var ListItem = require_dist.Node3.create({
3973
4656
  },
3974
4657
  renderMarkdown: (node, h, ctx) => {
3975
4658
  return require_dist.renderNestedMarkdownContent(node, h, (context) => {
4659
+ var _a, _b, _c, _d;
3976
4660
  if (context.parentType === "bulletList") return "- ";
3977
- if (context.parentType === "orderedList") return `${context.index + 1}. `;
4661
+ if (context.parentType === "orderedList") {
4662
+ const start = ((_b = (_a = context.meta) == null ? void 0 : _a.parentAttrs) == null ? void 0 : _b.start) || 1;
4663
+ return getListMarker((_d = (_c = context.meta) == null ? void 0 : _c.parentAttrs) == null ? void 0 : _d.type, start - 1 + (context.index || 0), ". ");
4664
+ }
3978
4665
  return "- ";
3979
4666
  }, ctx);
3980
4667
  },
4668
+ addExtensions() {
4669
+ return [createBranchingListDeleteKeymap(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
4670
+ },
3981
4671
  addKeyboardShortcuts() {
3982
4672
  return {
3983
4673
  Enter: () => this.editor.commands.splitListItem(this.name),
@@ -4032,23 +4722,6 @@ var hasListBefore = (editorState, name, parentListTypes) => {
4032
4722
  if (!previousNode || !parentListTypes.includes(previousNode.type.name)) return false;
4033
4723
  return true;
4034
4724
  };
4035
- var hasListItemBefore = (typeOrName, state) => {
4036
- var _a;
4037
- const { $anchor } = state.selection;
4038
- const $targetPos = state.doc.resolve($anchor.pos - 2);
4039
- if ($targetPos.index() === 0) return false;
4040
- if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) return false;
4041
- return true;
4042
- };
4043
- var listItemHasSubList = (typeOrName, state, node) => {
4044
- if (!node) return false;
4045
- const nodeType = require_dist.getNodeType(typeOrName, state.schema);
4046
- let hasSubList = false;
4047
- node.descendants((child) => {
4048
- if (child.type === nodeType) hasSubList = true;
4049
- });
4050
- return hasSubList;
4051
- };
4052
4725
  var handleBackspace = (editor, name, parentListTypes) => {
4053
4726
  if (editor.commands.undoInputRule()) return true;
4054
4727
  if (editor.state.selection.from !== editor.state.selection.to) return false;
@@ -4072,11 +4745,6 @@ var handleBackspace = (editor, name, parentListTypes) => {
4072
4745
  }
4073
4746
  if (!require_dist.isNodeActive(editor.state, name)) return false;
4074
4747
  if (!require_dist.isAtStartOfNode(editor.state)) return false;
4075
- const listItemPos = findListItemPos(name, editor.state);
4076
- if (!listItemPos) return false;
4077
- const prevNode = editor.state.doc.resolve(listItemPos.$pos.pos - 2).node(listItemPos.depth);
4078
- const previousListItemHasSubList = listItemHasSubList(name, editor.state, prevNode);
4079
- if (hasListItemBefore(name, editor.state) && !previousListItemHasSubList) return editor.commands.joinItemBackward();
4080
4748
  return editor.chain().liftListItem(name).run();
4081
4749
  };
4082
4750
  var nextListIsDeeper = (typeOrName, state) => {
@@ -4111,6 +4779,23 @@ var hasListItemAfter = (typeOrName, state) => {
4111
4779
  if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) return false;
4112
4780
  return true;
4113
4781
  };
4782
+ var hasListItemBefore = (typeOrName, state) => {
4783
+ var _a;
4784
+ const { $anchor } = state.selection;
4785
+ const $targetPos = state.doc.resolve($anchor.pos - 2);
4786
+ if ($targetPos.index() === 0) return false;
4787
+ if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) return false;
4788
+ return true;
4789
+ };
4790
+ var listItemHasSubList = (typeOrName, state, node) => {
4791
+ if (!node) return false;
4792
+ const nodeType = require_dist.getNodeType(typeOrName, state.schema);
4793
+ let hasSubList = false;
4794
+ node.descendants((child) => {
4795
+ if (child.type === nodeType) hasSubList = true;
4796
+ });
4797
+ return hasSubList;
4798
+ };
4114
4799
  var ListKeymap = require_dist.Extension.create({
4115
4800
  name: "listKeymap",
4116
4801
  addOptions() {
@@ -4159,8 +4844,50 @@ var ListKeymap = require_dist.Extension.create({
4159
4844
  };
4160
4845
  }
4161
4846
  });
4162
- var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/;
4847
+ var ORDERED_LIST_ITEM_REGEX = new RegExp(`^(\\s*)(${ORDERED_LIST_MARKER_PATTERN})([.)])\\s+(.*)$`);
4163
4848
  var INDENTED_LINE_REGEX = /^\s/;
4849
+ var PARAGRAPH_INTERRUPTERS = {
4850
+ heading: /^#{1,6}(?:\s|$)/,
4851
+ bulletItem: /^[-+*]\s+/,
4852
+ codeFence: /^(?:```|~~~)/,
4853
+ thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
4854
+ };
4855
+ function isOrderedListMarkerLine(line) {
4856
+ return ORDERED_LIST_ITEM_REGEX.test(line.trimStart());
4857
+ }
4858
+ function isBlockContentLine(line) {
4859
+ const trimmedLine = line.trimStart();
4860
+ return PARAGRAPH_INTERRUPTERS.bulletItem.test(trimmedLine) || isOrderedListMarkerLine(trimmedLine) || PARAGRAPH_INTERRUPTERS.heading.test(trimmedLine) || PARAGRAPH_INTERRUPTERS.thematicBreak.test(trimmedLine) && !trimmedLine.startsWith("-") || /^>\s?/.test(trimmedLine) || PARAGRAPH_INTERRUPTERS.codeFence.test(trimmedLine);
4861
+ }
4862
+ function interruptsLazyContinuation(line) {
4863
+ return Object.values(PARAGRAPH_INTERRUPTERS).some((pattern) => pattern.test(line));
4864
+ }
4865
+ function splitItemContent(contentLines) {
4866
+ const paragraphLines = [];
4867
+ const blockLines = [];
4868
+ let reachedBlockBoundary = false;
4869
+ contentLines.forEach((line) => {
4870
+ if (reachedBlockBoundary) {
4871
+ blockLines.push(line);
4872
+ return;
4873
+ }
4874
+ if (line.trim() === "") {
4875
+ reachedBlockBoundary = true;
4876
+ blockLines.push(line);
4877
+ return;
4878
+ }
4879
+ if (paragraphLines.length > 0 && isBlockContentLine(line)) {
4880
+ reachedBlockBoundary = true;
4881
+ blockLines.push(line);
4882
+ return;
4883
+ }
4884
+ paragraphLines.push(line);
4885
+ });
4886
+ return {
4887
+ paragraphLines,
4888
+ blockLines
4889
+ };
4890
+ }
4164
4891
  function collectOrderedListItems(lines) {
4165
4892
  const listItems = [];
4166
4893
  let currentLineIndex = 0;
@@ -4169,29 +4896,42 @@ function collectOrderedListItems(lines) {
4169
4896
  const line = lines[currentLineIndex];
4170
4897
  const match = line.match(ORDERED_LIST_ITEM_REGEX);
4171
4898
  if (!match) break;
4172
- const [, indent, number, content] = match;
4899
+ const [, indent, marker, _separator, content] = match;
4173
4900
  const indentLevel = indent.length;
4174
- let itemContent = content;
4901
+ const number = parseInt(marker, 10);
4902
+ const markerType = isNaN(number) ? detectMarkerType(marker) : void 0;
4903
+ const itemNumber = isNaN(number) ? markerToStart(marker) : number;
4904
+ const itemContentLines = [content];
4175
4905
  let nextLineIndex = currentLineIndex + 1;
4176
4906
  const itemLines = [line];
4907
+ let sawBlankLine = false;
4177
4908
  while (nextLineIndex < lines.length) {
4178
4909
  const nextLine = lines[nextLineIndex];
4179
4910
  if (nextLine.match(ORDERED_LIST_ITEM_REGEX)) break;
4180
4911
  if (nextLine.trim() === "") {
4181
4912
  itemLines.push(nextLine);
4182
- itemContent += "\n";
4913
+ itemContentLines.push("");
4914
+ sawBlankLine = true;
4183
4915
  nextLineIndex += 1;
4184
4916
  } else if (nextLine.match(INDENTED_LINE_REGEX)) {
4917
+ const leadingWhitespace = nextLine.length - nextLine.trimStart().length;
4918
+ const contentIndent = indentLevel + marker.length + 1;
4919
+ itemLines.push(nextLine);
4920
+ itemContentLines.push(nextLine.slice(Math.min(leadingWhitespace, contentIndent)));
4921
+ nextLineIndex += 1;
4922
+ } else {
4923
+ if (sawBlankLine || interruptsLazyContinuation(nextLine)) break;
4185
4924
  itemLines.push(nextLine);
4186
- itemContent += `
4187
- ${nextLine.slice(indentLevel + 2)}`;
4925
+ itemContentLines.push(nextLine);
4188
4926
  nextLineIndex += 1;
4189
- } else break;
4927
+ }
4190
4928
  }
4191
4929
  listItems.push({
4192
4930
  indent: indentLevel,
4193
- number: parseInt(number, 10),
4194
- content: itemContent.trim(),
4931
+ number: itemNumber,
4932
+ type: markerType,
4933
+ content: itemContentLines.join("\n").trim(),
4934
+ contentLines: itemContentLines,
4195
4935
  raw: itemLines.join("\n")
4196
4936
  });
4197
4937
  consumed = nextLineIndex;
@@ -4199,22 +4939,50 @@ ${nextLine.slice(indentLevel + 2)}`;
4199
4939
  }
4200
4940
  return [listItems, consumed];
4201
4941
  }
4942
+ var PLAIN_TEXT_ORDERED_LIST_LINE_REGEX = new RegExp(`^(${ORDERED_LIST_MARKER_PATTERN})([.)])\\s+(.+)$`);
4943
+ function parsePlainTextOrderedListPaste(text) {
4944
+ const lines = text.split("\n").filter((l) => l.trim().length > 0);
4945
+ if (lines.length === 0) return null;
4946
+ const parsedItems = [];
4947
+ for (const line of lines) {
4948
+ const match = line.trim().match(PLAIN_TEXT_ORDERED_LIST_LINE_REGEX);
4949
+ if (!match) return null;
4950
+ parsedItems.push({
4951
+ marker: match[1],
4952
+ content: match[3]
4953
+ });
4954
+ }
4955
+ if (!areOrderedListMarkersSequential(parsedItems.map((item) => item.marker))) return null;
4956
+ return {
4957
+ type: "orderedList",
4958
+ attrs: buildOrderedListAttrsFromMarker(parsedItems[0].marker),
4959
+ content: parsedItems.map((item) => ({
4960
+ type: "listItem",
4961
+ content: [{
4962
+ type: "paragraph",
4963
+ content: [{
4964
+ type: "text",
4965
+ text: item.content
4966
+ }]
4967
+ }]
4968
+ }))
4969
+ };
4970
+ }
4202
4971
  function buildNestedStructure(items, baseIndent, lexer) {
4203
- var _a;
4204
4972
  const result = [];
4205
4973
  let currentIndex = 0;
4206
4974
  while (currentIndex < items.length) {
4207
4975
  const item = items[currentIndex];
4208
4976
  if (item.indent === baseIndent) {
4209
- const contentLines = item.content.split("\n");
4210
- const mainText = ((_a = contentLines[0]) == null ? void 0 : _a.trim()) || "";
4977
+ const { paragraphLines, blockLines } = splitItemContent(item.contentLines);
4978
+ const mainText = paragraphLines.join("\n").trim();
4211
4979
  const tokens = [];
4212
4980
  if (mainText) tokens.push({
4213
4981
  type: "paragraph",
4214
4982
  raw: mainText,
4215
4983
  tokens: lexer.inlineTokens(mainText)
4216
4984
  });
4217
- const additionalContent = contentLines.slice(1).join("\n").trim();
4985
+ const additionalContent = blockLines.join("\n").trim();
4218
4986
  if (additionalContent) {
4219
4987
  const blockTokens = lexer.blockTokens(additionalContent);
4220
4988
  tokens.push(...blockTokens);
@@ -4231,6 +4999,7 @@ function buildNestedStructure(items, baseIndent, lexer) {
4231
4999
  type: "list",
4232
5000
  ordered: true,
4233
5001
  start: nestedItems[0].number,
5002
+ typeMarker: nestedItems[0].type,
4234
5003
  items: nestedListItems,
4235
5004
  raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n")
4236
5005
  });
@@ -4271,6 +5040,19 @@ function parseListItems(items, helpers) {
4271
5040
  var ListItemName2 = "listItem";
4272
5041
  var TextStyleName2 = "textStyle";
4273
5042
  var orderedListInputRegex = /^(\d+)\.\s$/;
5043
+ function cssListStyleTypeToHtmlType(style) {
5044
+ const match = style.match(/list-style-type\s*:\s*([^;]+)/i);
5045
+ if (!match) return null;
5046
+ switch (match[1].trim().toLowerCase()) {
5047
+ case "upper-roman": return "I";
5048
+ case "lower-roman": return "i";
5049
+ case "upper-alpha":
5050
+ case "upper-latin": return "A";
5051
+ case "lower-alpha":
5052
+ case "lower-latin": return "a";
5053
+ default: return null;
5054
+ }
5055
+ }
4274
5056
  var OrderedList = require_dist.Node3.create({
4275
5057
  name: "orderedList",
4276
5058
  addOptions() {
@@ -4295,7 +5077,24 @@ var OrderedList = require_dist.Node3.create({
4295
5077
  },
4296
5078
  type: {
4297
5079
  default: null,
4298
- parseHTML: (element) => element.getAttribute("type")
5080
+ parseHTML: (element) => {
5081
+ const htmlType = element.getAttribute("type");
5082
+ if (htmlType) return htmlType;
5083
+ const style = element.getAttribute("style");
5084
+ if (style) {
5085
+ const mappedFromOl = cssListStyleTypeToHtmlType(style);
5086
+ if (mappedFromOl) return mappedFromOl;
5087
+ }
5088
+ const firstLi = element.querySelector("li");
5089
+ if (firstLi) {
5090
+ const liStyle = firstLi.getAttribute("style");
5091
+ if (liStyle) {
5092
+ const mappedFromLi = cssListStyleTypeToHtmlType(liStyle);
5093
+ if (mappedFromLi) return mappedFromLi;
5094
+ }
5095
+ }
5096
+ return null;
5097
+ }
4299
5098
  }
4300
5099
  };
4301
5100
  },
@@ -4303,14 +5102,13 @@ var OrderedList = require_dist.Node3.create({
4303
5102
  return [{ tag: "ol" }];
4304
5103
  },
4305
5104
  renderHTML({ HTMLAttributes }) {
4306
- const { start, ...attributesWithoutStart } = HTMLAttributes;
4307
- return start === 1 ? [
4308
- "ol",
4309
- require_dist.mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart),
4310
- 0
4311
- ] : [
5105
+ const { start, type, ...attributesWithoutType } = HTMLAttributes;
5106
+ const attrs = require_dist.mergeAttributes(this.options.HTMLAttributes, attributesWithoutType);
5107
+ if (start !== 1) attrs.start = start;
5108
+ if (type && type !== "1") attrs.type = type;
5109
+ return [
4312
5110
  "ol",
4313
- require_dist.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
5111
+ attrs,
4314
5112
  0
4315
5113
  ];
4316
5114
  },
@@ -4318,10 +5116,14 @@ var OrderedList = require_dist.Node3.create({
4318
5116
  parseMarkdown: (token, helpers) => {
4319
5117
  if (token.type !== "list" || !token.ordered) return [];
4320
5118
  const startValue = token.start || 1;
5119
+ const typeValue = token.typeMarker;
4321
5120
  const content = token.items ? parseListItems(token.items, helpers) : [];
4322
- if (startValue !== 1) return {
5121
+ const attrs = {};
5122
+ if (startValue !== 1) attrs.start = startValue;
5123
+ if (typeValue) attrs.type = typeValue;
5124
+ if (Object.keys(attrs).length > 0) return {
4323
5125
  type: "orderedList",
4324
- attrs: { start: startValue },
5126
+ attrs,
4325
5127
  content
4326
5128
  };
4327
5129
  return {
@@ -4336,22 +5138,19 @@ var OrderedList = require_dist.Node3.create({
4336
5138
  markdownTokenizer: {
4337
5139
  name: "orderedList",
4338
5140
  level: "block",
4339
- start: (src) => {
4340
- const match = src.match(/^(\s*)(\d+)\.\s+/);
4341
- const index = match == null ? void 0 : match.index;
4342
- return index !== void 0 ? index : -1;
4343
- },
5141
+ start: () => -1,
4344
5142
  tokenize: (src, _tokens, lexer) => {
4345
- var _a;
5143
+ var _a, _b;
4346
5144
  const lines = src.split("\n");
4347
5145
  const [listItems, consumed] = collectOrderedListItems(lines);
4348
5146
  if (listItems.length === 0) return;
4349
- const items = buildNestedStructure(listItems, 0, lexer);
5147
+ const items = buildNestedStructure(listItems, listItems[0].indent, lexer);
4350
5148
  if (items.length === 0) return;
4351
5149
  return {
4352
5150
  type: "list",
4353
5151
  ordered: true,
4354
5152
  start: ((_a = listItems[0]) == null ? void 0 : _a.number) || 1,
5153
+ typeMarker: (_b = listItems[0]) == null ? void 0 : _b.type,
4355
5154
  items,
4356
5155
  raw: lines.slice(0, consumed).join("\n")
4357
5156
  };
@@ -4367,12 +5166,34 @@ var OrderedList = require_dist.Node3.create({
4367
5166
  addKeyboardShortcuts() {
4368
5167
  return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
4369
5168
  },
5169
+ addProseMirrorPlugins() {
5170
+ return [new require_dist.Plugin({ props: { handlePaste: (view, event) => {
5171
+ var _a, _b;
5172
+ const html = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/html");
5173
+ if (html == null ? void 0 : html.trim()) return false;
5174
+ const text = (_b = event.clipboardData) == null ? void 0 : _b.getData("text/plain");
5175
+ if (!text) return false;
5176
+ const orderedListContent = parsePlainTextOrderedListPaste(text);
5177
+ if (!orderedListContent) return false;
5178
+ try {
5179
+ const orderedListNode = view.state.schema.nodeFromJSON(orderedListContent);
5180
+ const tr = view.state.tr.replaceSelectionWith(orderedListNode);
5181
+ view.dispatch(tr);
5182
+ return true;
5183
+ } catch {
5184
+ return false;
5185
+ }
5186
+ } } })];
5187
+ },
4370
5188
  addInputRules() {
5189
+ const joinPredicate = (match, node) => {
5190
+ return (!node.attrs.type || node.attrs.type === "1") && node.childCount + node.attrs.start === +match[1];
5191
+ };
4371
5192
  let inputRule = require_dist.wrappingInputRule({
4372
5193
  find: orderedListInputRegex,
4373
5194
  type: this.type,
4374
5195
  getAttributes: (match) => ({ start: +match[1] }),
4375
- joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1]
5196
+ joinPredicate
4376
5197
  });
4377
5198
  if (this.options.keepMarks || this.options.keepAttributes) inputRule = require_dist.wrappingInputRule({
4378
5199
  find: orderedListInputRegex,
@@ -4383,7 +5204,7 @@ var OrderedList = require_dist.Node3.create({
4383
5204
  start: +match[1],
4384
5205
  ...this.editor.getAttributes(TextStyleName2)
4385
5206
  }),
4386
- joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],
5207
+ joinPredicate,
4387
5208
  editor: this.editor
4388
5209
  });
4389
5210
  return [inputRule];
@@ -4449,7 +5270,12 @@ var TaskItem = require_dist.Node3.create({
4449
5270
  },
4450
5271
  renderMarkdown: (node, h) => {
4451
5272
  var _a;
4452
- return require_dist.renderNestedMarkdownContent(node, h, `- [${((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "}] `);
5273
+ const prefix = `- [${((_a = node.attrs) == null ? void 0 : _a.checked) ? "x" : " "}] `;
5274
+ return require_dist.renderNestedMarkdownContent(node, h, prefix);
5275
+ },
5276
+ addExtensions() {
5277
+ if (!this.options.nested) return [];
5278
+ return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])];
4453
5279
  },
4454
5280
  addKeyboardShortcuts() {
4455
5281
  const shortcuts = {
@@ -4507,6 +5333,7 @@ var TaskItem = require_dist.Node3.create({
4507
5333
  Object.entries(HTMLAttributes).forEach(([key, value]) => {
4508
5334
  listItem.setAttribute(key, value);
4509
5335
  });
5336
+ let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes));
4510
5337
  return {
4511
5338
  dom: listItem,
4512
5339
  contentDOM: content,
@@ -4515,6 +5342,23 @@ var TaskItem = require_dist.Node3.create({
4515
5342
  listItem.dataset.checked = updatedNode.attrs.checked;
4516
5343
  checkbox.checked = updatedNode.attrs.checked;
4517
5344
  updateA11Y(updatedNode);
5345
+ const extensionAttributes = editor.extensionManager.attributes;
5346
+ const newHTMLAttributes = require_dist.getRenderedAttributes(updatedNode, extensionAttributes);
5347
+ const newKeys = new Set(Object.keys(newHTMLAttributes));
5348
+ const staticAttrs = this.options.HTMLAttributes;
5349
+ prevRenderedAttributeKeys.forEach((key) => {
5350
+ if (!newKeys.has(key)) {
5351
+ if (key in staticAttrs) listItem.setAttribute(key, staticAttrs[key]);
5352
+ else listItem.removeAttribute(key);
5353
+ }
5354
+ });
5355
+ Object.entries(newHTMLAttributes).forEach(([key, value]) => {
5356
+ if (value === null || value === void 0) {
5357
+ if (key in staticAttrs) listItem.setAttribute(key, staticAttrs[key]);
5358
+ else listItem.removeAttribute(key);
5359
+ } else listItem.setAttribute(key, value);
5360
+ });
5361
+ prevRenderedAttributeKeys = newKeys;
4518
5362
  return true;
4519
5363
  }
4520
5364
  };
@@ -4589,11 +5433,16 @@ var TaskList = require_dist.Node3.create({
4589
5433
  }),
4590
5434
  customNestedParser: parseTaskListContent
4591
5435
  }, lexer);
4592
- if (nestedResult) return [{
4593
- type: "taskList",
4594
- raw: nestedResult.raw,
4595
- items: nestedResult.items
4596
- }];
5436
+ if (nestedResult) {
5437
+ const taskListToken = {
5438
+ type: "taskList",
5439
+ raw: nestedResult.raw,
5440
+ items: nestedResult.items
5441
+ };
5442
+ const remainder = content.slice(nestedResult.raw.length);
5443
+ if (remainder.trim()) return [taskListToken, ...lexer.blockTokens(remainder)];
5444
+ return [taskListToken];
5445
+ }
4597
5446
  return lexer.blockTokens(content);
4598
5447
  };
4599
5448
  const result = require_dist.parseIndentedBlocks(src, {
@@ -4647,7 +5496,9 @@ require_dist.Extension.create({
4647
5496
  }
4648
5497
  });
4649
5498
  //#endregion
4650
- //#region ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-paragraph/dist/index.js
5499
+ //#region ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-paragraph/dist/index.js
5500
+ var EMPTY_PARAGRAPH_MARKDOWN = "&nbsp;";
5501
+ var NBSP_CHAR = "\xA0";
4651
5502
  var Paragraph = require_dist.Node3.create({
4652
5503
  name: "paragraph",
4653
5504
  priority: 1e3,
@@ -4669,11 +5520,19 @@ var Paragraph = require_dist.Node3.create({
4669
5520
  parseMarkdown: (token, helpers) => {
4670
5521
  const tokens = token.tokens || [];
4671
5522
  if (tokens.length === 1 && tokens[0].type === "image") return helpers.parseChildren([tokens[0]]);
4672
- return helpers.createNode("paragraph", void 0, helpers.parseInline(tokens));
5523
+ const content = helpers.parseInline(tokens);
5524
+ if (tokens.length === 1 && tokens[0].type === "text" && (tokens[0].raw === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].text === EMPTY_PARAGRAPH_MARKDOWN || tokens[0].raw === NBSP_CHAR || tokens[0].text === NBSP_CHAR) && content.length === 1 && content[0].type === "text" && (content[0].text === EMPTY_PARAGRAPH_MARKDOWN || content[0].text === NBSP_CHAR)) return helpers.createNode("paragraph", void 0, []);
5525
+ return helpers.createNode("paragraph", void 0, content);
4673
5526
  },
4674
- renderMarkdown: (node, h) => {
4675
- if (!node || !Array.isArray(node.content)) return "";
4676
- return h.renderChildren(node.content);
5527
+ renderMarkdown: (node, h, ctx) => {
5528
+ var _a, _b;
5529
+ if (!node) return "";
5530
+ const content = Array.isArray(node.content) ? node.content : [];
5531
+ if (content.length === 0) {
5532
+ const previousContent = Array.isArray((_a = ctx == null ? void 0 : ctx.previousNode) == null ? void 0 : _a.content) ? ctx.previousNode.content : [];
5533
+ return ((_b = ctx == null ? void 0 : ctx.previousNode) == null ? void 0 : _b.type) === "paragraph" && previousContent.length === 0 ? EMPTY_PARAGRAPH_MARKDOWN : "";
5534
+ }
5535
+ return h.renderChildren(content);
4677
5536
  },
4678
5537
  addCommands() {
4679
5538
  return { setParagraph: () => ({ commands }) => {
@@ -4685,7 +5544,7 @@ var Paragraph = require_dist.Node3.create({
4685
5544
  }
4686
5545
  });
4687
5546
  //#endregion
4688
- //#region ../../node_modules/.pnpm/@tiptap+extension-strike@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-strike/dist/index.js
5547
+ //#region ../../node_modules/.pnpm/@tiptap+extension-strike@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-strike/dist/index.js
4689
5548
  var inputRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/;
4690
5549
  var pasteRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g;
4691
5550
  var Strike = require_dist.Mark.create({
@@ -4749,7 +5608,7 @@ var Strike = require_dist.Mark.create({
4749
5608
  }
4750
5609
  });
4751
5610
  //#endregion
4752
- //#region ../../node_modules/.pnpm/@tiptap+extension-text@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-text/dist/index.js
5611
+ //#region ../../node_modules/.pnpm/@tiptap+extension-text@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-text/dist/index.js
4753
5612
  var Text = require_dist.Node3.create({
4754
5613
  name: "text",
4755
5614
  group: "inline",
@@ -4762,7 +5621,7 @@ var Text = require_dist.Node3.create({
4762
5621
  renderMarkdown: (node) => node.text || ""
4763
5622
  });
4764
5623
  //#endregion
4765
- //#region ../../node_modules/.pnpm/@tiptap+extension-underline@3.11.0_@tiptap+core@3.11.0_@tiptap+pm@3.11.0_/node_modules/@tiptap/extension-underline/dist/index.js
5624
+ //#region ../../node_modules/.pnpm/@tiptap+extension-underline@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2_/node_modules/@tiptap/extension-underline/dist/index.js
4766
5625
  var Underline = require_dist.Mark.create({
4767
5626
  name: "underline",
4768
5627
  addOptions() {
@@ -4857,7 +5716,7 @@ var index_default = require_dist.Extension.create({
4857
5716
  }
4858
5717
  });
4859
5718
  //#endregion
4860
- //#region ../../node_modules/.pnpm/@tiptap+vue-3@3.11.0_@floating-ui+dom@1.6.13_@tiptap+core@3.11.0_@tiptap+pm@3.11.0__@ti_45b8c35b8241f1f45bcf18bc7e68b71b/node_modules/@tiptap/vue-3/dist/index.js
5719
+ //#region ../../node_modules/.pnpm/@tiptap+vue-3@3.29.2_@floating-ui+dom@1.8.0_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tip_82ae703f9716de2fe82106636b634245/node_modules/@tiptap/vue-3/dist/index.js
4861
5720
  function useDebouncedRef(value) {
4862
5721
  return (0, vue.customRef)((track, trigger) => {
4863
5722
  return {
@@ -4925,9 +5784,9 @@ var EditorContent = (0, vue.defineComponent)({
4925
5784
  const editor = props.editor;
4926
5785
  if (editor && editor.options.element && rootEl.value) (0, vue.nextTick)(() => {
4927
5786
  var _a;
4928
- if (!rootEl.value || !((_a = editor.view.dom) == null ? void 0 : _a.firstChild)) return;
5787
+ if (!rootEl.value || !((_a = editor.view.dom) == null ? void 0 : _a.parentNode)) return;
4929
5788
  const element = (0, vue.unref)(rootEl.value);
4930
- rootEl.value.append(editor.view.dom);
5789
+ rootEl.value.append(...editor.view.dom.parentNode.childNodes);
4931
5790
  editor.contentComponent = instance.ctx._;
4932
5791
  if (instance) editor.appContext = {
4933
5792
  ...instance.appContext,
@@ -4957,6 +5816,15 @@ var EditorContent = (0, vue.defineComponent)({
4957
5816
  type: String,
4958
5817
  default: "div"
4959
5818
  } },
5819
+ inject: { nodeViewContentRef: { default: void 0 } },
5820
+ mounted() {
5821
+ const ref3 = this.nodeViewContentRef;
5822
+ if (ref3 && this.$el) ref3(this.$el);
5823
+ },
5824
+ beforeUnmount() {
5825
+ const ref3 = this.nodeViewContentRef;
5826
+ if (ref3) ref3(null);
5827
+ },
4960
5828
  render() {
4961
5829
  return (0, vue.h)(this.as, {
4962
5830
  style: { whiteSpace: "pre-wrap" },
@@ -5012,7 +5880,7 @@ var _hoisted_6 = {
5012
5880
  class: "extra-settings-wrapper"
5013
5881
  };
5014
5882
  var _hoisted_7 = { class: "text-field" };
5015
- var rich_editor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
5883
+ var rich_editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
5016
5884
  __name: "rich-editor",
5017
5885
  props: {
5018
5886
  modelValue: {
@@ -5178,7 +6046,7 @@ var rich_editor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0
5178
6046
  });
5179
6047
  //#endregion
5180
6048
  //#region src/components/rich-editor/rich-editor.vue
5181
- var rich_editor_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(rich_editor_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3fe18f57"]]);
6049
+ var rich_editor_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(rich_editor_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3fe18f57"]]);
5182
6050
  //#endregion
5183
6051
  Object.defineProperty(exports, "rich_editor_default", {
5184
6052
  enumerable: true,