@youcan/celeste 0.9.2 → 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 (537) hide show
  1. package/dist/celeste.css +1153 -755
  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 +31 -11
  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 +17 -11
  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 +32 -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 +1130 -261
  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/alert/alert.vue +3 -2
  517. package/src/components/chart/bar-chart.vue +383 -0
  518. package/src/components/chart/chart-card.vue +99 -0
  519. package/src/components/chart/chart-legend.vue +164 -0
  520. package/src/components/chart/chart-plot.vue +350 -0
  521. package/src/components/chart/chart-tooltip.ts +35 -0
  522. package/src/components/chart/index.ts +13 -0
  523. package/src/components/chart/stories/bar-chart.stories.ts +319 -0
  524. package/src/components/checkbox/checkbox.vue +45 -27
  525. package/src/components/color-picker/hue-slider.vue +1 -1
  526. package/src/components/file-upload/file-upload-area.vue +1 -1
  527. package/src/components/index.ts +1 -0
  528. package/src/components/rich-editor/rich-editor.vue +1 -1
  529. package/src/components/text-input/text-input.vue +1 -1
  530. package/src/components/tooltip/tooltip-content.vue +5 -1
  531. package/src/composables/index.ts +2 -0
  532. package/src/composables/use-chart-motion.ts +18 -0
  533. package/src/composables/use-locale.ts +8 -0
  534. package/src/utils/chart.ts +42 -0
  535. package/src/utils/index.ts +1 -0
  536. package/dist/cjs/chunks/core.cjs +0 -325
  537. package/dist/es/chunks/core.js +0 -289
@@ -7,13 +7,13 @@ import { t as compact_button_default } from "./compact-button.js";
7
7
  import { t as select_icon_default } from "./select-icon.js";
8
8
  import { t as select_default } from "./select.js";
9
9
  import { t as tooltip_default } from "./tooltip.js";
10
- import { A as textblockTypeInputRule, B as TextSelection, C as markInputRule, D as parseIndentedBlocks, E as nodeInputRule, F as NodeSelection, H as dropPoint, I as Plugin, L as PluginKey, M as keydownHandler, N as Decoration, P as DecorationSet, R as Selection$1, T as mergeAttributes, U as Fragment$1, V as Mapping, W as Slice, _ as isAtEndOfNode, a as callOrReturn, b as isNodeEmpty, c as findChildrenInRange, d as getExtensionField, f as getMarksBetween, i as Node3, j as wrappingInputRule, k as renderNestedMarkdownContent, l as getAttributes, m as getNodeType, n as Extension, o as canInsertNode, p as getNodeAtPosition, r as Mark, s as combineTransactionSteps, t as Editor$1, u as getChangedRanges, v as isAtStartOfNode, w as markPasteRule, x as isNodeSelection, y as isNodeActive } from "./dist2.js";
10
+ import { A as nodeInputRule, B as Plugin, C as isNodeActive, D as markInputRule, F as wrappingInputRule, G as Mapping, H as Selection$1, I as keydownHandler, J as Slice, K as dropPoint, L as Decoration, N as renderNestedMarkdownContent, O as markPasteRule, P as textblockTypeInputRule, R as DecorationSet, S as isAtStartOfNode, T as isNodeSelection, V as PluginKey, W as TextSelection, _ as getRenderedAttributes, a as Node3, c as canInsertNode, d as getAttributes, f as getChangedRanges, g as getNodeType, h as getNodeAtPosition, i as Mark, j as parseIndentedBlocks, k as mergeAttributes, l as combineTransactionSteps, m as getMarksBetween, n as Extension, o as PasteRule, p as getExtensionField, q as Fragment$1, r as InputRule, s as callOrReturn, t as Editor$1, u as findChildrenInRange, v as getStyleProperty, w as isNodeEmpty, x as isAtEndOfNode, z as NodeSelection } from "./dist3.js";
11
11
  import { fullToolbar, onActionClick, selectedOption } from "../config.js";
12
12
  import { t as extra_settings_default } from "./extra-settings.js";
13
13
  import { t as link_bubble_default } from "./link-bubble.js";
14
14
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, customRef, defineComponent, getCurrentInstance, h, markRaw, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, toDisplayString, unref, watch, watchEffect, withCtx } from "vue";
15
- //#region ../../node_modules/.pnpm/linkifyjs@4.3.2/node_modules/linkifyjs/dist/linkify.mjs
16
- var encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
15
+ //#region ../../node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.mjs
16
+ var encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
17
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";
18
18
  /**
19
19
  * Finite State Machine generation utilities
@@ -338,7 +338,7 @@ var TILDE = "TILDE";
338
338
  var UNDERSCORE = "UNDERSCORE";
339
339
  var EMOJI$1 = "EMOJI";
340
340
  var SYM = "SYM";
341
- var tk = /* @__PURE__ */ Object.freeze({
341
+ var tk = /*#__PURE__*/ Object.freeze({
342
342
  __proto__: null,
343
343
  ALPHANUMERICAL,
344
344
  AMPERSAND,
@@ -410,7 +410,8 @@ var LF = "\n";
410
410
  var EMOJI_VARIATION = "️";
411
411
  var EMOJI_JOINER = "‍";
412
412
  var OBJECT_REPLACEMENT = "";
413
- var tlds = null, utlds = null;
413
+ var tlds = null;
414
+ var utlds = null;
414
415
  /**
415
416
  * Scanner output token:
416
417
  * - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD')
@@ -1197,7 +1198,6 @@ function init$1({ groups }) {
1197
1198
  ta(Email$1, groups.domain, EmailDomain);
1198
1199
  tt(Email$1, DOT, EmailDomainDot);
1199
1200
  tt(Email$1, HYPHEN, EmailDomainHyphen);
1200
- ta(tt(Email$1, COLON), groups.numeric, Email);
1201
1201
  const DomainHyphen = tt(Domain, HYPHEN);
1202
1202
  const DomainDot = tt(Domain, DOT);
1203
1203
  tt(DomainHyphen, HYPHEN, DomainHyphen);
@@ -1251,11 +1251,11 @@ function init$1({ groups }) {
1251
1251
  const [OPEN, CLOSE] = bracketPairs[i];
1252
1252
  const UrlOpen = tt(Url$1, OPEN);
1253
1253
  tt(UrlNonaccept, OPEN, UrlOpen);
1254
- tt(UrlOpen, CLOSE, Url$1);
1255
1254
  const UrlOpenQ = makeState(Url);
1256
1255
  ta(UrlOpen, qsAccepting, UrlOpenQ);
1257
1256
  const UrlOpenSyms = makeState();
1258
- ta(UrlOpen, qsNonAccepting);
1257
+ ta(UrlOpen, qsNonAccepting, UrlOpenSyms);
1258
+ tt(UrlOpen, CLOSE, Url$1);
1259
1259
  ta(UrlOpenQ, qsAccepting, UrlOpenQ);
1260
1260
  ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);
1261
1261
  ta(UrlOpenSyms, qsAccepting, UrlOpenQ);
@@ -1444,7 +1444,7 @@ function find(str, type = null, opts = null) {
1444
1444
  return filtered;
1445
1445
  }
1446
1446
  //#endregion
1447
- //#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
1448
1448
  var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0 ᠎ -\u2029  ]";
1449
1449
  var UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN);
1450
1450
  var UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`);
@@ -1462,7 +1462,8 @@ function autolink(options) {
1462
1462
  const preventAutolink = transactions.some((transaction) => transaction.getMeta("preventAutolink"));
1463
1463
  if (!docChanges || preventAutolink) return;
1464
1464
  const { tr } = newState;
1465
- getChangedRanges(combineTransactionSteps(oldState.doc, [...transactions])).forEach(({ newRange }) => {
1465
+ const transform = combineTransactionSteps(oldState.doc, [...transactions]);
1466
+ getChangedRanges(transform).forEach(({ newRange }) => {
1466
1467
  const nodesInChangedRanges = findChildrenInRange(newState.doc, newRange, (node) => node.isTextblock);
1467
1468
  let textBlock;
1468
1469
  let textBeforeWhitespace;
@@ -1511,27 +1512,130 @@ function clickHandler(options) {
1511
1512
  let link = null;
1512
1513
  if (event.target instanceof HTMLAnchorElement) link = event.target;
1513
1514
  else {
1514
- let a = event.target;
1515
- const els = [];
1516
- while (a.nodeName !== "DIV") {
1517
- els.push(a);
1518
- a = a.parentNode;
1519
- }
1520
- 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;
1521
1520
  }
1522
1521
  if (!link) return false;
1523
- const attrs = getAttributes(view.state, options.type.name);
1524
- const href = (_a = link == null ? void 0 : link.href) != null ? _a : attrs.href;
1525
- const target = (_b = link == null ? void 0 : link.target) != null ? _b : attrs.target;
1526
- if (options.enableClickSelection) options.editor.commands.extendMarkRange(options.type.name);
1527
- if (link && href) {
1528
- window.open(href, target);
1529
- 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 = 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
+ }
1530
1532
  }
1531
- return false;
1533
+ return handled;
1532
1534
  } }
1533
1535
  });
1534
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 = 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 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 = 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 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
+ }
1535
1639
  function pasteHandler(options) {
1536
1640
  return new Plugin({
1537
1641
  key: new PluginKey("handlePasteLink"),
@@ -1546,7 +1650,7 @@ function pasteHandler(options) {
1546
1650
  textContent += node.textContent;
1547
1651
  });
1548
1652
  const link = find(textContent, { defaultProtocol: options.defaultProtocol }).find((item) => item.isLink && item.value === textContent);
1549
- if (!textContent || !link || shouldAutoLink !== void 0 && !shouldAutoLink(link.href)) return false;
1653
+ if (!textContent || !link || shouldAutoLink !== void 0 && !shouldAutoLink(link.value)) return false;
1550
1654
  return options.editor.commands.setMark(options.type, { href: link.href });
1551
1655
  } }
1552
1656
  });
@@ -1568,7 +1672,7 @@ function isAllowedUri(uri, protocols) {
1568
1672
  const nextProtocol = typeof protocol === "string" ? protocol : protocol.scheme;
1569
1673
  if (nextProtocol) allowedProtocols.push(nextProtocol);
1570
1674
  });
1571
- 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"));
1572
1676
  }
1573
1677
  var Link = Mark.create({
1574
1678
  name: "link",
@@ -1599,6 +1703,7 @@ var Link = Mark.create({
1599
1703
  openOnClick: true,
1600
1704
  enableClickSelection: false,
1601
1705
  linkOnPaste: true,
1706
+ markdownLinks: false,
1602
1707
  autolink: true,
1603
1708
  protocols: [],
1604
1709
  defaultProtocol: "http",
@@ -1609,10 +1714,19 @@ var Link = Mark.create({
1609
1714
  },
1610
1715
  isAllowedUri: (url, ctx) => !!isAllowedUri(url, ctx.protocols),
1611
1716
  validate: (url) => !!url,
1612
- 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
+ }
1613
1726
  };
1614
1727
  },
1615
1728
  addAttributes() {
1729
+ var _a, _b, _c;
1616
1730
  return {
1617
1731
  href: {
1618
1732
  default: null,
@@ -1620,9 +1734,10 @@ var Link = Mark.create({
1620
1734
  return element.getAttribute("href");
1621
1735
  }
1622
1736
  },
1623
- target: { default: this.options.HTMLAttributes.target },
1624
- rel: { default: this.options.HTMLAttributes.rel },
1625
- 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 }
1626
1741
  };
1627
1742
  },
1628
1743
  parseHTML() {
@@ -1666,9 +1781,11 @@ var Link = Mark.create({
1666
1781
  });
1667
1782
  },
1668
1783
  renderMarkdown: (node, h) => {
1669
- var _a;
1670
- const href = ((_a = node.attrs) == null ? void 0 : _a.href) || "";
1671
- 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})`;
1672
1789
  },
1673
1790
  addCommands() {
1674
1791
  return {
@@ -1695,28 +1812,48 @@ var Link = Mark.create({
1695
1812
  }
1696
1813
  };
1697
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
+ },
1698
1826
  addPasteRules() {
1699
- return [markPasteRule({
1700
- find: (text) => {
1701
- const foundLinks = [];
1702
- if (text) {
1703
- const { protocols, defaultProtocol } = this.options;
1704
- const links = find(text).filter((item) => item.isLink && this.options.isAllowedUri(item.value, {
1705
- defaultValidate: (href) => !!isAllowedUri(href, protocols),
1706
- protocols,
1707
- defaultProtocol
1708
- }));
1709
- if (links.length) links.forEach((link) => {
1710
- if (!this.options.shouldAutoLink(link.value)) return;
1711
- foundLinks.push({
1712
- text: link.value,
1713
- data: { href: link.href },
1714
- index: link.start
1715
- });
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
1716
1841
  });
1717
- }
1718
- return foundLinks;
1719
- },
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 [markPasteRule({
1856
+ find: findPlainUrls,
1720
1857
  type: this.type,
1721
1858
  getAttributes: (match) => {
1722
1859
  var _a;
@@ -1737,9 +1874,10 @@ var Link = Mark.create({
1737
1874
  }),
1738
1875
  shouldAutoLink: this.options.shouldAutoLink
1739
1876
  }));
1740
- if (this.options.openOnClick === true) plugins.push(clickHandler({
1877
+ plugins.push(clickHandler({
1741
1878
  type: this.type,
1742
1879
  editor: this.editor,
1880
+ openOnClick: this.options.openOnClick === "whenNotEditable" ? true : this.options.openOnClick,
1743
1881
  enableClickSelection: this.options.enableClickSelection
1744
1882
  }));
1745
1883
  if (this.options.linkOnPaste) plugins.push(pasteHandler({
@@ -1808,7 +1946,7 @@ var index_default$1 = Extension.create({
1808
1946
  }
1809
1947
  });
1810
1948
  //#endregion
1811
- //#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
1812
1950
  var MAX_FIND_CHILD_SPAN_DEPTH = 20;
1813
1951
  var findChildSpans = (element, depth = 0) => {
1814
1952
  const childSpans = [];
@@ -1885,19 +2023,8 @@ var BackgroundColor = Extension.create({
1885
2023
  default: null,
1886
2024
  parseHTML: (element) => {
1887
2025
  var _a;
1888
- const styleAttr = element.getAttribute("style");
1889
- if (styleAttr) {
1890
- const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
1891
- for (let i = decls.length - 1; i >= 0; i -= 1) {
1892
- const parts = decls[i].split(":");
1893
- if (parts.length >= 2) {
1894
- const prop = parts[0].trim().toLowerCase();
1895
- const val = parts.slice(1).join(":").trim();
1896
- if (prop === "background-color") return val.replace(/['"]+/g, "");
1897
- }
1898
- }
1899
- }
1900
- return (_a = element.style.backgroundColor) == null ? void 0 : _a.replace(/['"]+/g, "");
2026
+ const value = (_a = getStyleProperty(element, "background-color")) != null ? _a : element.style.backgroundColor;
2027
+ return value == null ? void 0 : value.replace(/['"]+/g, "");
1901
2028
  },
1902
2029
  renderHTML: (attributes) => {
1903
2030
  if (!attributes.backgroundColor) return {};
@@ -1929,19 +2056,8 @@ var Color = Extension.create({
1929
2056
  default: null,
1930
2057
  parseHTML: (element) => {
1931
2058
  var _a;
1932
- const styleAttr = element.getAttribute("style");
1933
- if (styleAttr) {
1934
- const decls = styleAttr.split(";").map((s) => s.trim()).filter(Boolean);
1935
- for (let i = decls.length - 1; i >= 0; i -= 1) {
1936
- const parts = decls[i].split(":");
1937
- if (parts.length >= 2) {
1938
- const prop = parts[0].trim().toLowerCase();
1939
- const val = parts.slice(1).join(":").trim();
1940
- if (prop === "color") return val.replace(/['"]+/g, "");
1941
- }
1942
- }
1943
- }
1944
- return (_a = element.style.color) == null ? void 0 : _a.replace(/['"]+/g, "");
2059
+ const value = (_a = getStyleProperty(element, "color")) != null ? _a : element.style.color;
2060
+ return value == null ? void 0 : value.replace(/['"]+/g, "");
1945
2061
  },
1946
2062
  renderHTML: (attributes) => {
1947
2063
  if (!attributes.color) return {};
@@ -1971,7 +2087,10 @@ var FontFamily = Extension.create({
1971
2087
  types: this.options.types,
1972
2088
  attributes: { fontFamily: {
1973
2089
  default: null,
1974
- parseHTML: (element) => element.style.fontFamily,
2090
+ parseHTML: (element) => {
2091
+ var _a;
2092
+ return (_a = getStyleProperty(element, "font-family")) != null ? _a : element.style.fontFamily;
2093
+ },
1975
2094
  renderHTML: (attributes) => {
1976
2095
  if (!attributes.fontFamily) return {};
1977
2096
  return { style: `font-family: ${attributes.fontFamily}` };
@@ -2000,7 +2119,10 @@ var FontSize = Extension.create({
2000
2119
  types: this.options.types,
2001
2120
  attributes: { fontSize: {
2002
2121
  default: null,
2003
- parseHTML: (element) => element.style.fontSize,
2122
+ parseHTML: (element) => {
2123
+ var _a;
2124
+ return (_a = getStyleProperty(element, "font-size")) != null ? _a : element.style.fontSize;
2125
+ },
2004
2126
  renderHTML: (attributes) => {
2005
2127
  if (!attributes.fontSize) return {};
2006
2128
  return { style: `font-size: ${attributes.fontSize}` };
@@ -2029,7 +2151,10 @@ var LineHeight = Extension.create({
2029
2151
  types: this.options.types,
2030
2152
  attributes: { lineHeight: {
2031
2153
  default: null,
2032
- parseHTML: (element) => element.style.lineHeight,
2154
+ parseHTML: (element) => {
2155
+ var _a;
2156
+ return (_a = getStyleProperty(element, "line-height")) != null ? _a : element.style.lineHeight;
2157
+ },
2033
2158
  renderHTML: (attributes) => {
2034
2159
  if (!attributes.lineHeight) return {};
2035
2160
  return { style: `line-height: ${attributes.lineHeight}` };
@@ -2062,7 +2187,7 @@ var TextStyleKit = Extension.create({
2062
2187
  }
2063
2188
  });
2064
2189
  //#endregion
2065
- //#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
2066
2191
  /**
2067
2192
  Create a plugin that, when added to a ProseMirror instance,
2068
2193
  causes a decoration to show up at the drop position when something
@@ -2085,6 +2210,7 @@ var DropCursorView = class {
2085
2210
  this.cursorPos = null;
2086
2211
  this.element = null;
2087
2212
  this.timeout = -1;
2213
+ this.lastDragEvent = null;
2088
2214
  this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;
2089
2215
  this.color = options.color === false ? void 0 : options.color || "black";
2090
2216
  this.class = options.class;
@@ -2108,8 +2234,13 @@ var DropCursorView = class {
2108
2234
  this.handlers.forEach(({ name, handler }) => this.editorView.dom.removeEventListener(name, handler));
2109
2235
  }
2110
2236
  update(editorView, prevState) {
2111
- if (this.cursorPos != null && prevState.doc != editorView.state.doc) if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null);
2112
- 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
+ }
2113
2244
  }
2114
2245
  setCursor(pos) {
2115
2246
  if (pos == this.cursorPos) return;
@@ -2180,8 +2311,7 @@ var DropCursorView = class {
2180
2311
  clearTimeout(this.timeout);
2181
2312
  this.timeout = setTimeout(() => this.setCursor(null), timeout);
2182
2313
  }
2183
- dragover(event) {
2184
- if (!this.editorView.editable) return;
2314
+ computeTarget(event) {
2185
2315
  let pos = this.editorView.posAtCoords({
2186
2316
  left: event.clientX,
2187
2317
  top: event.clientY
@@ -2189,12 +2319,19 @@ var DropCursorView = class {
2189
2319
  let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);
2190
2320
  let disableDropCursor = node && node.type.spec.disableDropCursor;
2191
2321
  let disabled = typeof disableDropCursor == "function" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor;
2192
- if (pos && !disabled) {
2193
- let target = pos.pos;
2194
- if (this.editorView.dragging && this.editorView.dragging.slice) {
2195
- let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);
2196
- if (point != null) target = point;
2197
- }
2322
+ if (!pos || disabled) return null;
2323
+ let target = pos.pos;
2324
+ if (this.editorView.dragging && this.editorView.dragging.slice) {
2325
+ let point = 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) {
2198
2335
  this.setCursor(target);
2199
2336
  this.scheduleRemoval(5e3);
2200
2337
  }
@@ -2210,7 +2347,7 @@ var DropCursorView = class {
2210
2347
  }
2211
2348
  };
2212
2349
  //#endregion
2213
- //#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
2214
2351
  /**
2215
2352
  Gap cursor selections are represented using this class. Its
2216
2353
  `$anchor` and `$head` properties both point at the cursor position.
@@ -2256,7 +2393,7 @@ var GapCursor = class GapCursor extends Selection$1 {
2256
2393
  */
2257
2394
  static valid($pos) {
2258
2395
  let parent = $pos.parent;
2259
- if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) return false;
2396
+ if (parent.inlineContent || !closedBefore($pos) || !closedAfter($pos)) return false;
2260
2397
  let override = parent.type.spec.allowGapCursor;
2261
2398
  if (override != null) return override;
2262
2399
  let deflt = parent.contentMatchAt($pos.index()).defaultType;
@@ -2313,6 +2450,9 @@ var GapBookmark = class GapBookmark {
2313
2450
  return GapCursor.valid($pos) ? new GapCursor($pos) : Selection$1.near($pos);
2314
2451
  }
2315
2452
  };
2453
+ function needsGap(type) {
2454
+ return type.isAtom || type.spec.isolating || type.spec.createGapCursor;
2455
+ }
2316
2456
  function closedBefore($pos) {
2317
2457
  for (let d = $pos.depth; d >= 0; d--) {
2318
2458
  let index = $pos.index(d), parent = $pos.node(d);
@@ -2321,7 +2461,7 @@ function closedBefore($pos) {
2321
2461
  continue;
2322
2462
  }
2323
2463
  for (let before = parent.child(index - 1);; before = before.lastChild) {
2324
- 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;
2325
2465
  if (before.inlineContent) return false;
2326
2466
  }
2327
2467
  }
@@ -2335,7 +2475,7 @@ function closedAfter($pos) {
2335
2475
  continue;
2336
2476
  }
2337
2477
  for (let after = parent.child(index);; after = after.firstChild) {
2338
- 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;
2339
2479
  if (after.inlineContent) return false;
2340
2480
  }
2341
2481
  }
@@ -2551,7 +2691,7 @@ var Append = /* @__PURE__ */ function(RopeSequence) {
2551
2691
  return Append;
2552
2692
  }(RopeSequence);
2553
2693
  //#endregion
2554
- //#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
2555
2695
  var max_empty_items = 500;
2556
2696
  var Branch = class Branch {
2557
2697
  constructor(items, eventCount) {
@@ -2666,7 +2806,8 @@ var Branch = class Branch {
2666
2806
  }, start);
2667
2807
  let newMaps = [];
2668
2808
  for (let i = rebasedCount; i < newUntil; i++) newMaps.push(new Item(mapping.maps[i]));
2669
- 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);
2670
2811
  if (branch.emptyItemCount() > max_empty_items) branch = branch.compress(this.items.length - rebasedItems.length);
2671
2812
  return branch;
2672
2813
  }
@@ -2741,9 +2882,10 @@ function applyTransaction(history, state, tr, options) {
2741
2882
  if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0, -1);
2742
2883
  let appended = tr.getMeta("appendedTransaction");
2743
2884
  if (tr.steps.length == 0) return history;
2744
- 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);
2745
- else return new HistoryState(history.done, history.undone.addTransform(tr, void 0, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition);
2746
- 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)) {
2747
2889
  let composition = tr.getMeta("composition");
2748
2890
  let newGroup = history.prevTime == 0 || !appended && history.prevComposition != composition && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges));
2749
2891
  let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps);
@@ -2787,7 +2929,8 @@ function histTransaction(history, state, redo) {
2787
2929
  historyState: newHist
2788
2930
  });
2789
2931
  }
2790
- var cachedPreserveItems = false, cachedPreserveItemsPlugins = null;
2932
+ var cachedPreserveItems = false;
2933
+ var cachedPreserveItemsPlugins = null;
2791
2934
  function mustPreserveItems(state) {
2792
2935
  let plugins = state.plugins;
2793
2936
  if (cachedPreserveItemsPlugins != plugins) {
@@ -2830,7 +2973,7 @@ function history(config = {}) {
2830
2973
  props: { handleDOMEvents: { beforeinput(view, e) {
2831
2974
  let inputType = e.inputType;
2832
2975
  let command = inputType == "historyUndo" ? undo : inputType == "historyRedo" ? redo : null;
2833
- if (!command) return false;
2976
+ if (!command || !view.editable) return false;
2834
2977
  e.preventDefault();
2835
2978
  return command(view.state, view.dispatch);
2836
2979
  } } }
@@ -2856,12 +2999,13 @@ A command function that redoes the last undone change, if any.
2856
2999
  */
2857
3000
  var redo = buildCommand(true, true);
2858
3001
  //#endregion
2859
- //#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
2860
3003
  var CharacterCount = Extension.create({
2861
3004
  name: "characterCount",
2862
3005
  addOptions() {
2863
3006
  return {
2864
3007
  limit: null,
3008
+ autoTrim: true,
2865
3009
  mode: "textSize",
2866
3010
  textCounter: (text) => text.length,
2867
3011
  wordCounter: (text) => text.split(" ").filter((word) => word !== "").length
@@ -2895,7 +3039,8 @@ var CharacterCount = Extension.create({
2895
3039
  appendTransaction: (transactions, oldState, newState) => {
2896
3040
  if (initialEvaluationDone) return;
2897
3041
  const limit = this.options.limit;
2898
- 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) {
2899
3044
  initialEvaluationDone = true;
2900
3045
  return;
2901
3046
  }
@@ -2985,19 +3130,261 @@ var Gapcursor = Extension.create({
2985
3130
  },
2986
3131
  extendNodeSchema(extension) {
2987
3132
  var _a;
2988
- return { allowGapCursor: (_a = callOrReturn(getExtensionField(extension, "allowGapCursor", {
3133
+ const context = {
2989
3134
  name: extension.name,
2990
3135
  options: extension.options,
2991
3136
  storage: extension.storage
2992
- }))) != null ? _a : null };
3137
+ };
3138
+ return { allowGapCursor: (_a = callOrReturn(getExtensionField(extension, "allowGapCursor", context))) != null ? _a : null };
2993
3139
  }
2994
3140
  });
3141
+ var DEFAULT_DATA_ATTRIBUTE = "placeholder";
3142
+ var PLUGIN_KEY = new 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 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 && 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 && 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 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 = 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 : 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 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 DecorationSet.empty;
3377
+ return (_a = PLUGIN_KEY.getState(state)) != null ? _a : DecorationSet.empty;
3378
+ } }
3379
+ });
3380
+ }
2995
3381
  var Placeholder = Extension.create({
2996
3382
  name: "placeholder",
2997
3383
  addOptions() {
2998
3384
  return {
2999
3385
  emptyEditorClass: "is-editor-empty",
3000
3386
  emptyNodeClass: "is-empty",
3387
+ dataAttribute: DEFAULT_DATA_ATTRIBUTE,
3001
3388
  placeholder: "Write something …",
3002
3389
  showOnlyWhenEditable: true,
3003
3390
  showOnlyCurrent: true,
@@ -3005,38 +3392,25 @@ var Placeholder = Extension.create({
3005
3392
  };
3006
3393
  },
3007
3394
  addProseMirrorPlugins() {
3008
- return [new Plugin({
3009
- key: new PluginKey("placeholder"),
3010
- props: { decorations: ({ doc, selection }) => {
3011
- const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;
3012
- const { anchor } = selection;
3013
- const decorations = [];
3014
- if (!active) return null;
3015
- const isEmptyDoc = this.editor.isEmpty;
3016
- doc.descendants((node, pos) => {
3017
- const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;
3018
- const isEmpty = !node.isLeaf && isNodeEmpty(node);
3019
- if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
3020
- const classes = [this.options.emptyNodeClass];
3021
- if (isEmptyDoc) classes.push(this.options.emptyEditorClass);
3022
- const decoration = Decoration.node(pos, pos + node.nodeSize, {
3023
- class: classes.join(" "),
3024
- "data-placeholder": typeof this.options.placeholder === "function" ? this.options.placeholder({
3025
- editor: this.editor,
3026
- node,
3027
- pos,
3028
- hasAnchor
3029
- }) : this.options.placeholder
3030
- });
3031
- decorations.push(decoration);
3032
- }
3033
- return this.options.includeChildren;
3034
- });
3035
- return DecorationSet.create(doc, decorations);
3036
- } }
3395
+ return [createPlaceholderPlugin({
3396
+ editor: this.editor,
3397
+ options: this.options
3037
3398
  })];
3038
3399
  }
3039
3400
  });
3401
+ function shouldSyncDomSelection(state, editor) {
3402
+ return !state.selection.empty && !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
+ }
3040
3414
  Extension.create({
3041
3415
  name: "selection",
3042
3416
  addOptions() {
@@ -3046,10 +3420,26 @@ Extension.create({
3046
3420
  const { editor, options } = this;
3047
3421
  return [new Plugin({
3048
3422
  key: new PluginKey("selection"),
3049
- props: { decorations(state) {
3050
- if (state.selection.empty || editor.isFocused || !editor.isEditable || isNodeSelection(state.selection) || editor.view.dragging) return null;
3051
- return DecorationSet.create(state.doc, [Decoration.inline(state.selection.from, state.selection.to, { class: options.className })]);
3052
- } }
3423
+ props: {
3424
+ decorations(state) {
3425
+ if (!shouldPreserveSelection(state, editor)) return null;
3426
+ return DecorationSet.create(state.doc, [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
+ }
3053
3443
  })];
3054
3444
  }
3055
3445
  });
@@ -3067,15 +3457,16 @@ var TrailingNode = Extension.create({
3067
3457
  addProseMirrorPlugins() {
3068
3458
  var _a;
3069
3459
  const plugin = new PluginKey(this.name);
3070
- 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";
3071
3461
  const disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));
3072
3462
  return [new Plugin({
3073
3463
  key: plugin,
3074
- appendTransaction: (_, __, state) => {
3464
+ appendTransaction: (transactions, __, state) => {
3075
3465
  const { doc, tr, schema } = state;
3076
3466
  const shouldInsertNodeAtEnd = plugin.getState(state);
3077
3467
  const endPosition = doc.content.size;
3078
3468
  const type = schema.nodes[defaultNode];
3469
+ if (transactions.some((transaction) => transaction.getMeta("skipTrailingNode"))) return;
3079
3470
  if (!shouldInsertNodeAtEnd) return;
3080
3471
  return tr.insert(endPosition, type.create());
3081
3472
  },
@@ -3132,7 +3523,7 @@ var UndoRedo = Extension.create({
3132
3523
  }
3133
3524
  });
3134
3525
  //#endregion
3135
- //#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
3136
3527
  var h$1 = (tag, attributes) => {
3137
3528
  if (tag === "slot") return 0;
3138
3529
  if (tag instanceof Function) return tag(attributes);
@@ -3145,8 +3536,31 @@ var h$1 = (tag, attributes) => {
3145
3536
  ];
3146
3537
  };
3147
3538
  //#endregion
3148
- //#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
3149
- 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(TextSelection.create(tr.doc, targetPos));
3560
+ view.dispatch(tr.scrollIntoView());
3561
+ return true;
3562
+ };
3563
+ var inputRegex$2 = /^\s*>\s$/;
3150
3564
  var Blockquote = Node3.create({
3151
3565
  name: "blockquote",
3152
3566
  addOptions() {
@@ -3165,14 +3579,17 @@ var Blockquote = Node3.create({
3165
3579
  });
3166
3580
  },
3167
3581
  parseMarkdown: (token, helpers) => {
3168
- 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 || []));
3169
3585
  },
3170
3586
  renderMarkdown: (node, h) => {
3171
3587
  if (!node.content) return "";
3172
3588
  const prefix = ">";
3173
3589
  const result = [];
3174
- node.content.forEach((child) => {
3175
- 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) => {
3176
3593
  if (line.trim() === "") return prefix;
3177
3594
  return `${prefix} ${line}`;
3178
3595
  });
@@ -3196,17 +3613,20 @@ ${prefix}
3196
3613
  };
3197
3614
  },
3198
3615
  addKeyboardShortcuts() {
3199
- 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
+ };
3200
3620
  },
3201
3621
  addInputRules() {
3202
3622
  return [wrappingInputRule({
3203
- find: inputRegex$3,
3623
+ find: inputRegex$2,
3204
3624
  type: this.type
3205
3625
  })];
3206
3626
  }
3207
3627
  });
3208
3628
  //#endregion
3209
- //#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
3210
3630
  var starInputRegex$1 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
3211
3631
  var starPasteRegex$1 = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
3212
3632
  var underscoreInputRegex$1 = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
@@ -3243,6 +3663,10 @@ var Bold = Mark.create({
3243
3663
  parseMarkdown: (token, helpers) => {
3244
3664
  return helpers.applyMark("bold", helpers.parseInline(token.tokens || []));
3245
3665
  },
3666
+ markdownOptions: { htmlReopen: {
3667
+ open: "<strong>",
3668
+ close: "</strong>"
3669
+ } },
3246
3670
  renderMarkdown: (node, h) => {
3247
3671
  return `**${h.renderChildren(node)}**`;
3248
3672
  },
@@ -3285,9 +3709,31 @@ var Bold = Mark.create({
3285
3709
  }
3286
3710
  });
3287
3711
  //#endregion
3288
- //#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
3289
- var inputRegex$2 = /(^|[^`])`([^`]+)`(?!`)$/;
3290
- 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
+ };
3291
3737
  var Code = Mark.create({
3292
3738
  name: "code",
3293
3739
  addOptions() {
@@ -3335,19 +3781,19 @@ var Code = Mark.create({
3335
3781
  },
3336
3782
  addInputRules() {
3337
3783
  return [markInputRule({
3338
- find: inputRegex$2,
3784
+ find: inputRegexMatch,
3339
3785
  type: this.type
3340
3786
  })];
3341
3787
  },
3342
3788
  addPasteRules() {
3343
3789
  return [markPasteRule({
3344
- find: pasteRegex$1,
3790
+ find: pasteRegexMatch,
3345
3791
  type: this.type
3346
3792
  })];
3347
3793
  }
3348
3794
  });
3349
3795
  //#endregion
3350
- //#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
3351
3797
  var DEFAULT_TAB_SIZE = 4;
3352
3798
  var backtickInputRegex = /^```([a-z]+)?[\s\n]$/;
3353
3799
  var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
@@ -3358,6 +3804,7 @@ var CodeBlock = Node3.create({
3358
3804
  languageClassPrefix: "language-",
3359
3805
  exitOnTripleEnter: true,
3360
3806
  exitOnArrowDown: true,
3807
+ exitOnArrowUp: true,
3361
3808
  defaultLanguage: null,
3362
3809
  enableTabIndentation: false,
3363
3810
  tabSize: DEFAULT_TAB_SIZE,
@@ -3402,8 +3849,8 @@ var CodeBlock = Node3.create({
3402
3849
  },
3403
3850
  markdownTokenName: "code",
3404
3851
  parseMarkdown: (token, helpers) => {
3405
- var _a;
3406
- 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 [];
3407
3854
  return helpers.createNode("codeBlock", { language: token.lang || null }, token.text ? [helpers.createTextNode(token.text)] : []);
3408
3855
  },
3409
3856
  renderMarkdown: (node, h) => {
@@ -3516,6 +3963,17 @@ var CodeBlock = Node3.create({
3516
3963
  return true;
3517
3964
  }).exitCode().run();
3518
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
+ },
3519
3977
  ArrowDown: ({ editor }) => {
3520
3978
  if (!this.options.exitOnArrowDown) return false;
3521
3979
  const { state } = editor;
@@ -3567,7 +4025,7 @@ var CodeBlock = Node3.create({
3567
4025
  }
3568
4026
  });
3569
4027
  //#endregion
3570
- //#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
3571
4029
  var Document = Node3.create({
3572
4030
  name: "doc",
3573
4031
  topNode: true,
@@ -3578,7 +4036,7 @@ var Document = Node3.create({
3578
4036
  }
3579
4037
  });
3580
4038
  //#endregion
3581
- //#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
3582
4040
  var HardBreak = Node3.create({
3583
4041
  name: "hardBreak",
3584
4042
  markdownTokenName: "br",
@@ -3620,7 +4078,7 @@ var HardBreak = Node3.create({
3620
4078
  tr.ensureMarks(filteredMarks);
3621
4079
  }
3622
4080
  return true;
3623
- }).run();
4081
+ }).scrollIntoView().run();
3624
4082
  })]);
3625
4083
  } };
3626
4084
  },
@@ -3632,7 +4090,7 @@ var HardBreak = Node3.create({
3632
4090
  }
3633
4091
  });
3634
4092
  //#endregion
3635
- //#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
3636
4094
  var Heading = Node3.create({
3637
4095
  name: "heading",
3638
4096
  addOptions() {
@@ -3709,7 +4167,7 @@ var Heading = Node3.create({
3709
4167
  }
3710
4168
  });
3711
4169
  //#endregion
3712
- //#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
3713
4171
  var HorizontalRule = Node3.create({
3714
4172
  name: "horizontalRule",
3715
4173
  addOptions() {
@@ -3744,10 +4202,11 @@ var HorizontalRule = Node3.create({
3744
4202
  if (dispatch) {
3745
4203
  const { $to } = tr.selection;
3746
4204
  const posAfter = $to.end();
3747
- if ($to.nodeAfter) if ($to.nodeAfter.isTextblock) tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1));
3748
- else if ($to.nodeAfter.isBlock) tr.setSelection(NodeSelection.create(tr.doc, $to.pos));
3749
- else tr.setSelection(TextSelection.create(tr.doc, $to.pos));
3750
- else {
4205
+ if ($to.nodeAfter) {
4206
+ if ($to.nodeAfter.isTextblock) tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1));
4207
+ else if ($to.nodeAfter.isBlock) tr.setSelection(NodeSelection.create(tr.doc, $to.pos));
4208
+ else tr.setSelection(TextSelection.create(tr.doc, $to.pos));
4209
+ } else {
3751
4210
  const nodeType = chainState.schema.nodes[this.options.nextNodeType] || $to.parent.type.contentMatch.defaultType;
3752
4211
  const node = nodeType == null ? void 0 : nodeType.create();
3753
4212
  if (node) {
@@ -3769,7 +4228,7 @@ var HorizontalRule = Node3.create({
3769
4228
  }
3770
4229
  });
3771
4230
  //#endregion
3772
- //#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
3773
4232
  var starInputRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
3774
4233
  var starPasteRegex = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
3775
4234
  var underscoreInputRegex = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
@@ -3817,6 +4276,10 @@ var Italic = Mark.create({
3817
4276
  parseMarkdown: (token, helpers) => {
3818
4277
  return helpers.applyMark("italic", helpers.parseInline(token.tokens || []));
3819
4278
  },
4279
+ markdownOptions: { htmlReopen: {
4280
+ open: "<em>",
4281
+ close: "</em>"
4282
+ } },
3820
4283
  renderMarkdown: (node, h) => {
3821
4284
  return `*${h.renderChildren(node)}*`;
3822
4285
  },
@@ -3846,7 +4309,7 @@ var Italic = Mark.create({
3846
4309
  }
3847
4310
  });
3848
4311
  //#endregion
3849
- //#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
3850
4313
  var __defProp = Object.defineProperty;
3851
4314
  var __export = (target, all) => {
3852
4315
  for (var name in all) __defProp(target, name, {
@@ -3921,6 +4384,217 @@ var BulletList = Node3.create({
3921
4384
  return [inputRule];
3922
4385
  }
3923
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, Fragment$1.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 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
+ }
3924
4598
  var ListItem = Node3.create({
3925
4599
  name: "listItem",
3926
4600
  addOptions() {
@@ -3944,22 +4618,32 @@ var ListItem = Node3.create({
3944
4618
  },
3945
4619
  markdownTokenName: "list_item",
3946
4620
  parseMarkdown: (token, helpers) => {
4621
+ var _a;
3947
4622
  if (token.type !== "list_item") return [];
4623
+ const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren;
3948
4624
  let content = [];
3949
- if (token.tokens && token.tokens.length > 0) if (token.tokens.some((t) => t.type === "paragraph")) content = helpers.parseChildren(token.tokens);
3950
- else {
3951
- const firstToken = token.tokens[0];
3952
- if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) {
3953
- content = [{
4625
+ if (token.tokens && token.tokens.length > 0) {
4626
+ if (isSameLineOrderedListToken(token)) return {
4627
+ type: "listItem",
4628
+ content: [{
3954
4629
  type: "paragraph",
3955
- content: helpers.parseInline(firstToken.tokens)
3956
- }];
3957
- if (token.tokens.length > 1) {
3958
- const remainingTokens = token.tokens.slice(1);
3959
- const additionalContent = helpers.parseChildren(remainingTokens);
3960
- content.push(...additionalContent);
3961
- }
3962
- } 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
+ }
3963
4647
  }
3964
4648
  if (content.length === 0) content = [{
3965
4649
  type: "paragraph",
@@ -3972,11 +4656,18 @@ var ListItem = Node3.create({
3972
4656
  },
3973
4657
  renderMarkdown: (node, h, ctx) => {
3974
4658
  return renderNestedMarkdownContent(node, h, (context) => {
4659
+ var _a, _b, _c, _d;
3975
4660
  if (context.parentType === "bulletList") return "- ";
3976
- 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
+ }
3977
4665
  return "- ";
3978
4666
  }, ctx);
3979
4667
  },
4668
+ addExtensions() {
4669
+ return [createBranchingListDeleteKeymap(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
4670
+ },
3980
4671
  addKeyboardShortcuts() {
3981
4672
  return {
3982
4673
  Enter: () => this.editor.commands.splitListItem(this.name),
@@ -4031,23 +4722,6 @@ var hasListBefore = (editorState, name, parentListTypes) => {
4031
4722
  if (!previousNode || !parentListTypes.includes(previousNode.type.name)) return false;
4032
4723
  return true;
4033
4724
  };
4034
- var hasListItemBefore = (typeOrName, state) => {
4035
- var _a;
4036
- const { $anchor } = state.selection;
4037
- const $targetPos = state.doc.resolve($anchor.pos - 2);
4038
- if ($targetPos.index() === 0) return false;
4039
- if (((_a = $targetPos.nodeBefore) == null ? void 0 : _a.type.name) !== typeOrName) return false;
4040
- return true;
4041
- };
4042
- var listItemHasSubList = (typeOrName, state, node) => {
4043
- if (!node) return false;
4044
- const nodeType = getNodeType(typeOrName, state.schema);
4045
- let hasSubList = false;
4046
- node.descendants((child) => {
4047
- if (child.type === nodeType) hasSubList = true;
4048
- });
4049
- return hasSubList;
4050
- };
4051
4725
  var handleBackspace = (editor, name, parentListTypes) => {
4052
4726
  if (editor.commands.undoInputRule()) return true;
4053
4727
  if (editor.state.selection.from !== editor.state.selection.to) return false;
@@ -4071,11 +4745,6 @@ var handleBackspace = (editor, name, parentListTypes) => {
4071
4745
  }
4072
4746
  if (!isNodeActive(editor.state, name)) return false;
4073
4747
  if (!isAtStartOfNode(editor.state)) return false;
4074
- const listItemPos = findListItemPos(name, editor.state);
4075
- if (!listItemPos) return false;
4076
- const prevNode = editor.state.doc.resolve(listItemPos.$pos.pos - 2).node(listItemPos.depth);
4077
- const previousListItemHasSubList = listItemHasSubList(name, editor.state, prevNode);
4078
- if (hasListItemBefore(name, editor.state) && !previousListItemHasSubList) return editor.commands.joinItemBackward();
4079
4748
  return editor.chain().liftListItem(name).run();
4080
4749
  };
4081
4750
  var nextListIsDeeper = (typeOrName, state) => {
@@ -4110,6 +4779,23 @@ var hasListItemAfter = (typeOrName, state) => {
4110
4779
  if (((_a = $targetPos.nodeAfter) == null ? void 0 : _a.type.name) !== typeOrName) return false;
4111
4780
  return true;
4112
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 = getNodeType(typeOrName, state.schema);
4793
+ let hasSubList = false;
4794
+ node.descendants((child) => {
4795
+ if (child.type === nodeType) hasSubList = true;
4796
+ });
4797
+ return hasSubList;
4798
+ };
4113
4799
  var ListKeymap = Extension.create({
4114
4800
  name: "listKeymap",
4115
4801
  addOptions() {
@@ -4158,8 +4844,50 @@ var ListKeymap = Extension.create({
4158
4844
  };
4159
4845
  }
4160
4846
  });
4161
- var ORDERED_LIST_ITEM_REGEX = /^(\s*)(\d+)\.\s+(.*)$/;
4847
+ var ORDERED_LIST_ITEM_REGEX = new RegExp(`^(\\s*)(${ORDERED_LIST_MARKER_PATTERN})([.)])\\s+(.*)$`);
4162
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
+ }
4163
4891
  function collectOrderedListItems(lines) {
4164
4892
  const listItems = [];
4165
4893
  let currentLineIndex = 0;
@@ -4168,29 +4896,42 @@ function collectOrderedListItems(lines) {
4168
4896
  const line = lines[currentLineIndex];
4169
4897
  const match = line.match(ORDERED_LIST_ITEM_REGEX);
4170
4898
  if (!match) break;
4171
- const [, indent, number, content] = match;
4899
+ const [, indent, marker, _separator, content] = match;
4172
4900
  const indentLevel = indent.length;
4173
- 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];
4174
4905
  let nextLineIndex = currentLineIndex + 1;
4175
4906
  const itemLines = [line];
4907
+ let sawBlankLine = false;
4176
4908
  while (nextLineIndex < lines.length) {
4177
4909
  const nextLine = lines[nextLineIndex];
4178
4910
  if (nextLine.match(ORDERED_LIST_ITEM_REGEX)) break;
4179
4911
  if (nextLine.trim() === "") {
4180
4912
  itemLines.push(nextLine);
4181
- itemContent += "\n";
4913
+ itemContentLines.push("");
4914
+ sawBlankLine = true;
4182
4915
  nextLineIndex += 1;
4183
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;
4184
4924
  itemLines.push(nextLine);
4185
- itemContent += `
4186
- ${nextLine.slice(indentLevel + 2)}`;
4925
+ itemContentLines.push(nextLine);
4187
4926
  nextLineIndex += 1;
4188
- } else break;
4927
+ }
4189
4928
  }
4190
4929
  listItems.push({
4191
4930
  indent: indentLevel,
4192
- number: parseInt(number, 10),
4193
- content: itemContent.trim(),
4931
+ number: itemNumber,
4932
+ type: markerType,
4933
+ content: itemContentLines.join("\n").trim(),
4934
+ contentLines: itemContentLines,
4194
4935
  raw: itemLines.join("\n")
4195
4936
  });
4196
4937
  consumed = nextLineIndex;
@@ -4198,22 +4939,50 @@ ${nextLine.slice(indentLevel + 2)}`;
4198
4939
  }
4199
4940
  return [listItems, consumed];
4200
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
+ }
4201
4971
  function buildNestedStructure(items, baseIndent, lexer) {
4202
- var _a;
4203
4972
  const result = [];
4204
4973
  let currentIndex = 0;
4205
4974
  while (currentIndex < items.length) {
4206
4975
  const item = items[currentIndex];
4207
4976
  if (item.indent === baseIndent) {
4208
- const contentLines = item.content.split("\n");
4209
- const mainText = ((_a = contentLines[0]) == null ? void 0 : _a.trim()) || "";
4977
+ const { paragraphLines, blockLines } = splitItemContent(item.contentLines);
4978
+ const mainText = paragraphLines.join("\n").trim();
4210
4979
  const tokens = [];
4211
4980
  if (mainText) tokens.push({
4212
4981
  type: "paragraph",
4213
4982
  raw: mainText,
4214
4983
  tokens: lexer.inlineTokens(mainText)
4215
4984
  });
4216
- const additionalContent = contentLines.slice(1).join("\n").trim();
4985
+ const additionalContent = blockLines.join("\n").trim();
4217
4986
  if (additionalContent) {
4218
4987
  const blockTokens = lexer.blockTokens(additionalContent);
4219
4988
  tokens.push(...blockTokens);
@@ -4230,6 +4999,7 @@ function buildNestedStructure(items, baseIndent, lexer) {
4230
4999
  type: "list",
4231
5000
  ordered: true,
4232
5001
  start: nestedItems[0].number,
5002
+ typeMarker: nestedItems[0].type,
4233
5003
  items: nestedListItems,
4234
5004
  raw: nestedItems.map((nestedItem) => nestedItem.raw).join("\n")
4235
5005
  });
@@ -4270,6 +5040,19 @@ function parseListItems(items, helpers) {
4270
5040
  var ListItemName2 = "listItem";
4271
5041
  var TextStyleName2 = "textStyle";
4272
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
+ }
4273
5056
  var OrderedList = Node3.create({
4274
5057
  name: "orderedList",
4275
5058
  addOptions() {
@@ -4294,7 +5077,24 @@ var OrderedList = Node3.create({
4294
5077
  },
4295
5078
  type: {
4296
5079
  default: null,
4297
- 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
+ }
4298
5098
  }
4299
5099
  };
4300
5100
  },
@@ -4302,14 +5102,13 @@ var OrderedList = Node3.create({
4302
5102
  return [{ tag: "ol" }];
4303
5103
  },
4304
5104
  renderHTML({ HTMLAttributes }) {
4305
- const { start, ...attributesWithoutStart } = HTMLAttributes;
4306
- return start === 1 ? [
4307
- "ol",
4308
- mergeAttributes(this.options.HTMLAttributes, attributesWithoutStart),
4309
- 0
4310
- ] : [
5105
+ const { start, type, ...attributesWithoutType } = HTMLAttributes;
5106
+ const attrs = mergeAttributes(this.options.HTMLAttributes, attributesWithoutType);
5107
+ if (start !== 1) attrs.start = start;
5108
+ if (type && type !== "1") attrs.type = type;
5109
+ return [
4311
5110
  "ol",
4312
- mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
5111
+ attrs,
4313
5112
  0
4314
5113
  ];
4315
5114
  },
@@ -4317,10 +5116,14 @@ var OrderedList = Node3.create({
4317
5116
  parseMarkdown: (token, helpers) => {
4318
5117
  if (token.type !== "list" || !token.ordered) return [];
4319
5118
  const startValue = token.start || 1;
5119
+ const typeValue = token.typeMarker;
4320
5120
  const content = token.items ? parseListItems(token.items, helpers) : [];
4321
- 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 {
4322
5125
  type: "orderedList",
4323
- attrs: { start: startValue },
5126
+ attrs,
4324
5127
  content
4325
5128
  };
4326
5129
  return {
@@ -4335,22 +5138,19 @@ var OrderedList = Node3.create({
4335
5138
  markdownTokenizer: {
4336
5139
  name: "orderedList",
4337
5140
  level: "block",
4338
- start: (src) => {
4339
- const match = src.match(/^(\s*)(\d+)\.\s+/);
4340
- const index = match == null ? void 0 : match.index;
4341
- return index !== void 0 ? index : -1;
4342
- },
5141
+ start: () => -1,
4343
5142
  tokenize: (src, _tokens, lexer) => {
4344
- var _a;
5143
+ var _a, _b;
4345
5144
  const lines = src.split("\n");
4346
5145
  const [listItems, consumed] = collectOrderedListItems(lines);
4347
5146
  if (listItems.length === 0) return;
4348
- const items = buildNestedStructure(listItems, 0, lexer);
5147
+ const items = buildNestedStructure(listItems, listItems[0].indent, lexer);
4349
5148
  if (items.length === 0) return;
4350
5149
  return {
4351
5150
  type: "list",
4352
5151
  ordered: true,
4353
5152
  start: ((_a = listItems[0]) == null ? void 0 : _a.number) || 1,
5153
+ typeMarker: (_b = listItems[0]) == null ? void 0 : _b.type,
4354
5154
  items,
4355
5155
  raw: lines.slice(0, consumed).join("\n")
4356
5156
  };
@@ -4366,12 +5166,34 @@ var OrderedList = Node3.create({
4366
5166
  addKeyboardShortcuts() {
4367
5167
  return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
4368
5168
  },
5169
+ addProseMirrorPlugins() {
5170
+ return [new 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
+ },
4369
5188
  addInputRules() {
5189
+ const joinPredicate = (match, node) => {
5190
+ return (!node.attrs.type || node.attrs.type === "1") && node.childCount + node.attrs.start === +match[1];
5191
+ };
4370
5192
  let inputRule = wrappingInputRule({
4371
5193
  find: orderedListInputRegex,
4372
5194
  type: this.type,
4373
5195
  getAttributes: (match) => ({ start: +match[1] }),
4374
- joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1]
5196
+ joinPredicate
4375
5197
  });
4376
5198
  if (this.options.keepMarks || this.options.keepAttributes) inputRule = wrappingInputRule({
4377
5199
  find: orderedListInputRegex,
@@ -4382,7 +5204,7 @@ var OrderedList = Node3.create({
4382
5204
  start: +match[1],
4383
5205
  ...this.editor.getAttributes(TextStyleName2)
4384
5206
  }),
4385
- joinPredicate: (match, node) => node.childCount + node.attrs.start === +match[1],
5207
+ joinPredicate,
4386
5208
  editor: this.editor
4387
5209
  });
4388
5210
  return [inputRule];
@@ -4448,7 +5270,12 @@ var TaskItem = Node3.create({
4448
5270
  },
4449
5271
  renderMarkdown: (node, h) => {
4450
5272
  var _a;
4451
- return 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 renderNestedMarkdownContent(node, h, prefix);
5275
+ },
5276
+ addExtensions() {
5277
+ if (!this.options.nested) return [];
5278
+ return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])];
4452
5279
  },
4453
5280
  addKeyboardShortcuts() {
4454
5281
  const shortcuts = {
@@ -4506,6 +5333,7 @@ var TaskItem = Node3.create({
4506
5333
  Object.entries(HTMLAttributes).forEach(([key, value]) => {
4507
5334
  listItem.setAttribute(key, value);
4508
5335
  });
5336
+ let prevRenderedAttributeKeys = new Set(Object.keys(HTMLAttributes));
4509
5337
  return {
4510
5338
  dom: listItem,
4511
5339
  contentDOM: content,
@@ -4514,6 +5342,23 @@ var TaskItem = Node3.create({
4514
5342
  listItem.dataset.checked = updatedNode.attrs.checked;
4515
5343
  checkbox.checked = updatedNode.attrs.checked;
4516
5344
  updateA11Y(updatedNode);
5345
+ const extensionAttributes = editor.extensionManager.attributes;
5346
+ const newHTMLAttributes = 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;
4517
5362
  return true;
4518
5363
  }
4519
5364
  };
@@ -4588,11 +5433,16 @@ var TaskList = Node3.create({
4588
5433
  }),
4589
5434
  customNestedParser: parseTaskListContent
4590
5435
  }, lexer);
4591
- if (nestedResult) return [{
4592
- type: "taskList",
4593
- raw: nestedResult.raw,
4594
- items: nestedResult.items
4595
- }];
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
+ }
4596
5446
  return lexer.blockTokens(content);
4597
5447
  };
4598
5448
  const result = parseIndentedBlocks(src, {
@@ -4646,7 +5496,9 @@ Extension.create({
4646
5496
  }
4647
5497
  });
4648
5498
  //#endregion
4649
- //#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";
4650
5502
  var Paragraph = Node3.create({
4651
5503
  name: "paragraph",
4652
5504
  priority: 1e3,
@@ -4668,11 +5520,19 @@ var Paragraph = Node3.create({
4668
5520
  parseMarkdown: (token, helpers) => {
4669
5521
  const tokens = token.tokens || [];
4670
5522
  if (tokens.length === 1 && tokens[0].type === "image") return helpers.parseChildren([tokens[0]]);
4671
- 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);
4672
5526
  },
4673
- renderMarkdown: (node, h) => {
4674
- if (!node || !Array.isArray(node.content)) return "";
4675
- 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);
4676
5536
  },
4677
5537
  addCommands() {
4678
5538
  return { setParagraph: () => ({ commands }) => {
@@ -4684,7 +5544,7 @@ var Paragraph = Node3.create({
4684
5544
  }
4685
5545
  });
4686
5546
  //#endregion
4687
- //#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
4688
5548
  var inputRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/;
4689
5549
  var pasteRegex = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g;
4690
5550
  var Strike = Mark.create({
@@ -4748,7 +5608,7 @@ var Strike = Mark.create({
4748
5608
  }
4749
5609
  });
4750
5610
  //#endregion
4751
- //#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
4752
5612
  var Text = Node3.create({
4753
5613
  name: "text",
4754
5614
  group: "inline",
@@ -4761,7 +5621,7 @@ var Text = Node3.create({
4761
5621
  renderMarkdown: (node) => node.text || ""
4762
5622
  });
4763
5623
  //#endregion
4764
- //#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
4765
5625
  var Underline = Mark.create({
4766
5626
  name: "underline",
4767
5627
  addOptions() {
@@ -4856,7 +5716,7 @@ var index_default = Extension.create({
4856
5716
  }
4857
5717
  });
4858
5718
  //#endregion
4859
- //#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
4860
5720
  function useDebouncedRef(value) {
4861
5721
  return customRef((track, trigger) => {
4862
5722
  return {
@@ -4924,9 +5784,9 @@ var EditorContent = defineComponent({
4924
5784
  const editor = props.editor;
4925
5785
  if (editor && editor.options.element && rootEl.value) nextTick(() => {
4926
5786
  var _a;
4927
- 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;
4928
5788
  const element = unref(rootEl.value);
4929
- rootEl.value.append(editor.view.dom);
5789
+ rootEl.value.append(...editor.view.dom.parentNode.childNodes);
4930
5790
  editor.contentComponent = instance.ctx._;
4931
5791
  if (instance) editor.appContext = {
4932
5792
  ...instance.appContext,
@@ -4956,6 +5816,15 @@ defineComponent({
4956
5816
  type: String,
4957
5817
  default: "div"
4958
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
+ },
4959
5828
  render() {
4960
5829
  return h(this.as, {
4961
5830
  style: { whiteSpace: "pre-wrap" },
@@ -5013,7 +5882,7 @@ var _hoisted_6 = {
5013
5882
  var _hoisted_7 = { class: "text-field" };
5014
5883
  //#endregion
5015
5884
  //#region src/components/rich-editor/rich-editor.vue
5016
- var rich_editor_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
5885
+ var rich_editor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
5017
5886
  __name: "rich-editor",
5018
5887
  props: {
5019
5888
  modelValue: {
@@ -5176,6 +6045,6 @@ var rich_editor_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @
5176
6045
  ])) : createCommentVNode("", true);
5177
6046
  };
5178
6047
  }
5179
- }), [["__scopeId", "data-v-d03a78c8"]]);
6048
+ }), [["__scopeId", "data-v-3fe18f57"]]);
5180
6049
  //#endregion
5181
6050
  export { rich_editor_default as t };