@burdenoff/microfe-support 2026.1114.1 → 2026.1118.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/dist/generated/global-operations.d.ts +62 -0
  2. package/dist/generated/global-operations.js +104 -69
  3. package/dist/generated/global-operations.js.map +1 -1
  4. package/dist/generated/global-types.js +17 -15
  5. package/dist/generated/global-types.js.map +1 -1
  6. package/dist/support/SupportUserRoot.js +32 -28
  7. package/dist/support/SupportUserRoot.js.map +1 -1
  8. package/dist/support/SupportUserRoutes.d.ts +1 -0
  9. package/dist/support/SupportUserRoutes.js +31 -28
  10. package/dist/support/SupportUserRoutes.js.map +1 -1
  11. package/dist/support/components/PageLayout.js +35 -35
  12. package/dist/support/components/RouteHelpers.d.ts +2 -1
  13. package/dist/support/components/RouteHelpers.js +3 -3
  14. package/dist/support/components/RouteHelpers.js.map +1 -1
  15. package/dist/support/components/careers/RichTextEditor.js +31 -31
  16. package/dist/support/components/careers/RichTextEditor.js.map +1 -1
  17. package/dist/support/components/help/RelatedArticles.d.ts +12 -0
  18. package/dist/support/components/help/RelatedArticles.js +55 -0
  19. package/dist/support/components/help/RelatedArticles.js.map +1 -0
  20. package/dist/support/components/help/RequestDetailHeader.d.ts +18 -0
  21. package/dist/support/components/help/RequestDetailHeader.js +129 -0
  22. package/dist/support/components/help/RequestDetailHeader.js.map +1 -0
  23. package/dist/support/components/help/SatisfactionReview.d.ts +18 -0
  24. package/dist/support/components/help/SatisfactionReview.js +103 -0
  25. package/dist/support/components/help/SatisfactionReview.js.map +1 -0
  26. package/dist/support/components/help/StarRating.d.ts +16 -0
  27. package/dist/support/components/help/StarRating.js +63 -0
  28. package/dist/support/components/help/StarRating.js.map +1 -0
  29. package/dist/support/components/help/StatusGroupPill.d.ts +11 -0
  30. package/dist/support/components/help/StatusGroupPill.js +19 -0
  31. package/dist/support/components/help/StatusGroupPill.js.map +1 -0
  32. package/dist/support/components/settings/TicketCategoriesSettings.js +69 -69
  33. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  34. package/dist/support/components/tickets/MessageComposer.js +7 -7
  35. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  36. package/dist/support/components/tickets/TicketDetailHeader.js +54 -60
  37. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  38. package/dist/support/components/ui.js +1 -1
  39. package/dist/support/constants.d.ts +23 -0
  40. package/dist/support/constants.js +2 -2
  41. package/dist/support/constants.js.map +1 -1
  42. package/dist/support/hooks/useDebouncedValue.d.ts +6 -0
  43. package/dist/support/hooks/useDebouncedValue.js +12 -0
  44. package/dist/support/hooks/useDebouncedValue.js.map +1 -0
  45. package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +8 -1
  46. package/dist/support/hooks/useKnowledgeBaseOperations.js +86 -81
  47. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  48. package/dist/support/hooks/useSupportVariant.d.ts +11 -0
  49. package/dist/support/hooks/useSupportVariant.js +11 -0
  50. package/dist/support/hooks/useSupportVariant.js.map +1 -0
  51. package/dist/support/hooks/useTicketCreatedToast.d.ts +16 -0
  52. package/dist/support/hooks/useTicketCreatedToast.js +25 -0
  53. package/dist/support/hooks/useTicketCreatedToast.js.map +1 -0
  54. package/dist/support/hooks/useTicketLabels.d.ts +22 -0
  55. package/dist/support/hooks/useTicketLabels.js +40 -0
  56. package/dist/support/hooks/useTicketLabels.js.map +1 -0
  57. package/dist/support/index.d.ts +1 -1
  58. package/dist/support/pages/ArticleDetailAdminPage.js +84 -84
  59. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  60. package/dist/support/pages/ArticleDetailUserPage.d.ts +5 -0
  61. package/dist/support/pages/ArticleDetailUserPage.js +133 -69
  62. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  63. package/dist/support/pages/AskForHelpPage.d.ts +11 -0
  64. package/dist/support/pages/AskForHelpPage.js +396 -0
  65. package/dist/support/pages/AskForHelpPage.js.map +1 -0
  66. package/dist/support/pages/ContactInquiriesPage.js +73 -73
  67. package/dist/support/pages/ContactInquiryDetailPage.js +47 -47
  68. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  69. package/dist/support/pages/CreateTicketPage.d.ts +4 -0
  70. package/dist/support/pages/CreateTicketPage.js +121 -117
  71. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  72. package/dist/support/pages/HelpHubPage.d.ts +9 -0
  73. package/dist/support/pages/HelpHubPage.js +272 -0
  74. package/dist/support/pages/HelpHubPage.js.map +1 -0
  75. package/dist/support/pages/JobApplicationDetailPage.js +388 -388
  76. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  77. package/dist/support/pages/JobApplicationsPage.js +35 -35
  78. package/dist/support/pages/JobPostingDetailPage.js +236 -236
  79. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  80. package/dist/support/pages/KnowledgeBaseUserPage.d.ts +6 -1
  81. package/dist/support/pages/KnowledgeBaseUserPage.js +188 -137
  82. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  83. package/dist/support/pages/MyRequestsPage.d.ts +16 -0
  84. package/dist/support/pages/MyRequestsPage.js +389 -0
  85. package/dist/support/pages/MyRequestsPage.js.map +1 -0
  86. package/dist/support/pages/TicketDetailUserPage.d.ts +5 -0
  87. package/dist/support/pages/TicketDetailUserPage.js +285 -192
  88. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  89. package/dist/support/pages/TicketListPage.d.ts +7 -0
  90. package/dist/support/pages/TicketListPage.js +150 -153
  91. package/dist/support/pages/TicketListPage.js.map +1 -1
  92. package/dist/support/providers/SupportProvider.js +8 -7
  93. package/dist/support/providers/SupportProvider.js.map +1 -1
  94. package/dist/support/store/supportStore.d.ts +5 -0
  95. package/dist/support/store/supportStore.js +1 -0
  96. package/dist/support/store/supportStore.js.map +1 -1
  97. package/dist/support/translations/en.d.ts +279 -0
  98. package/dist/support/translations/en.js +270 -1
  99. package/dist/support/translations/en.js.map +1 -1
  100. package/dist/support/types/index.d.ts +13 -0
  101. package/dist/support/utils/cameFrom.d.ts +16 -0
  102. package/dist/support/utils/cameFrom.js +22 -0
  103. package/dist/support/utils/cameFrom.js.map +1 -0
  104. package/dist/support/utils/dates.d.ts +15 -0
  105. package/dist/support/utils/dates.js +35 -0
  106. package/dist/support/utils/dates.js.map +1 -0
  107. package/dist/support/utils/reopen.d.ts +27 -0
  108. package/dist/support/utils/reopen.js +27 -0
  109. package/dist/support/utils/reopen.js.map +1 -0
  110. package/dist/support/utils/requestTechnicalDetails.d.ts +13 -0
  111. package/dist/support/utils/requestTechnicalDetails.js +38 -0
  112. package/dist/support/utils/requestTechnicalDetails.js.map +1 -0
  113. package/dist/support/utils/ticketFilters.d.ts +16 -0
  114. package/dist/support/utils/ticketFilters.js +24 -12
  115. package/dist/support/utils/ticketFilters.js.map +1 -1
  116. package/dist/support/utils/ticketStatusGroups.d.ts +20 -0
  117. package/dist/support/utils/ticketStatusGroups.js +39 -0
  118. package/dist/support/utils/ticketStatusGroups.js.map +1 -0
  119. package/package.json +2 -2
  120. package/dist/_virtual/_rolldown/runtime.js +0 -6
  121. package/dist/node_modules/@tiptap/core/dist/index.js +0 -3491
  122. package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
  123. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -44
  124. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
  125. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -12
  126. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +0 -1
  127. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
  128. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
  129. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -73
  130. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
  131. package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -78
  132. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
  133. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -157
  134. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
  135. package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -11
  136. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
  137. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -50
  138. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
  139. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -70
  140. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
  141. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -49
  142. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
  143. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -70
  144. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
  145. package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -389
  146. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
  147. package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -967
  148. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
  149. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -46
  150. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
  151. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -6
  152. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
  153. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -55
  154. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
  155. package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -14
  156. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
  157. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -72
  158. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
  159. package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -457
  160. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
  161. package/dist/node_modules/@tiptap/react/dist/index.js +0 -332
  162. package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
  163. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -28
  164. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
  165. package/dist/node_modules/fast-equals/dist/es/index.js +0 -298
  166. package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
  167. package/dist/node_modules/linkifyjs/dist/linkify.js +0 -527
  168. package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
  169. package/dist/node_modules/orderedmap/dist/index.js +0 -68
  170. package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
  171. package/dist/node_modules/prosemirror-commands/dist/index.js +0 -334
  172. package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
  173. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -112
  174. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
  175. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -168
  176. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
  177. package/dist/node_modules/prosemirror-history/dist/index.js +0 -219
  178. package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
  179. package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -51
  180. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
  181. package/dist/node_modules/prosemirror-model/dist/index.js +0 -1775
  182. package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
  183. package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -77
  184. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
  185. package/dist/node_modules/prosemirror-state/dist/index.js +0 -526
  186. package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
  187. package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1204
  188. package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
  189. package/dist/node_modules/prosemirror-view/dist/index.js +0 -3355
  190. package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
  191. package/dist/node_modules/rope-sequence/dist/index.js +0 -84
  192. package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
  193. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -55
  194. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
  195. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -53
  196. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
  197. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -53
  198. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
  199. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -45
  200. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
  201. package/dist/node_modules/use-sync-external-store/shim/index.js +0 -11
  202. package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
  203. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -11
  204. package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
  205. package/dist/node_modules/w3c-keyname/index.js +0 -89
  206. package/dist/node_modules/w3c-keyname/index.js.map +0 -1
@@ -1,332 +0,0 @@
1
- "use client";
2
- import { Plugin as e, PluginKey as t } from "../../../prosemirror-state/dist/index.js";
3
- import { require_shim as n } from "../../../use-sync-external-store/shim/index.js";
4
- import { CommandManager as r, DECORATION_MANAGER_PLUGIN_KEY as i, DecorationManager as a, Editor as o, Extendable as s, Extension as ee, InputRule as te, MappablePosition as ne, Mark as re, Node as ie, NodePos as ae, PasteRule as oe, callOrReturn as se, canInsertNode as ce, combineTransactionSteps as le, commands as ue, createChainableState as de, createDocument as fe, createMappablePosition as pe, createNodeFromContent as me, createStyleTag as he, defaultBlockAt as ge, deleteProps as _e, elementFromString as ve, findChildrenInRange as ye, findDuplicates as be, findParentNode as xe, findParentNodeClosestToPos as Se, flattenExtensions as Ce, fromString as we, getAttributes as Te, getAttributesFromExtensions as Ee, getChangedRanges as De, getExtensionField as c, getHTMLFromFragment as l, getMarkAttributes as u, getMarkRange as d, getMarkType as f, getMarksBetween as p, getNodeAtPosition as m, getNodeAttributes as h, getNodeType as g, getPreviousBlockSibling as _, getRenderedAttributes as v, getSchemaByResolvedExtensions as y, getSchemaTypeByName as b, getSchemaTypeNameByName as x, getSplittedAttributes as S, getText as C, getTextBetween as w, getTextContentFromNodes as T, getTextSerializersFromSchema as E, getUpdatedPosition as Oe, injectExtensionAttributesToParseRule as ke, inputRulesPlugin as Ae, isActive as je, isAndroid as D, isAtEndOfNode as Me, isAtStartOfNode as Ne, isEmptyObject as Pe, isExtensionRulesEnabled as Fe, isFunction as Ie, isList as Le, isMacOS as Re, isMarkActive as ze, isNodeActive as Be, isNodeEmpty as Ve, isNodeSelection as He, isNumber as Ue, isPlainObject as We, isProseMirrorReplaceStep as Ge, isProseMirrorStep as Ke, isRegExp as qe, isSafari as O, isTextSelection as Je, isiOS as k, markInputRule as Ye, markPasteRule as Xe, mergeAttributes as Ze, mergeDeep as Qe, minMax as $e, nodeInputRule as et, objectIncludes as tt, parseIndentedBlocks as nt, pasteRulesPlugin as rt, removeDuplicates as it, renderNestedMarkdownContent as at, resolveExtensions as ot, resolveFocusPosition as st, selectionToInsertionEnd as ct, sortExtensions as lt, splitExtensions as ut, textblockTypeInputRule as dt, updateMarkViewAttributes as ft, wrappingInputRule as pt } from "../../core/dist/index.js";
5
- import { circularDeepEqual as mt } from "../../../fast-equals/dist/es/index.js";
6
- import { require_with_selector as ht } from "../../../use-sync-external-store/shim/with-selector.js";
7
- import A, { createContext as j, forwardRef as gt, useContext as M, useDebugValue as N, useEffect as P, useLayoutEffect as _t, useMemo as F, useRef as vt, useState as I } from "react";
8
- import { Fragment as L, jsx as R, jsxs as yt } from "react/jsx-runtime";
9
- import bt from "react-dom";
10
- // node_modules/@tiptap/react/dist/index.js
11
- var z = n(), xt = ht();
12
- function St(e, t) {
13
- if (e.isDestroyed || t.defaultPrevented || !t.cancelable || !e.isEditable || t.inputType !== "insertParagraph" && t.inputType !== "insertLineBreak" || !k() && !D()) return;
14
- let n = e.view, r = n.root, i = (r.getSelection?.call(r) ?? n.dom.ownerDocument.getSelection())?.anchorNode, a = (i?.nodeType === 1 ? i : i?.parentElement)?.closest("[data-node-view-content-react]");
15
- if (!a || !n.dom.contains(a)) return;
16
- let o = n.input.lastKeyCode;
17
- o === 13 && (n.input.lastKeyCode = null), n.domObserver.forceFlush(), n.domObserver.flush();
18
- let s = new KeyboardEvent("keydown", {
19
- key: "Enter",
20
- code: "Enter",
21
- keyCode: 13,
22
- shiftKey: t.inputType === "insertLineBreak",
23
- bubbles: !0,
24
- cancelable: !0
25
- });
26
- n.someProp("handleKeyDown", (e) => e(n, s)) ? (t.preventDefault(), n.input.lastIOSEnter = 0, clearTimeout(n.input.lastIOSEnterFallbackTimeout)) : o === 13 && (n.input.lastKeyCode = o);
27
- }
28
- var B = new t("reactMobileEnter"), Ct = (...e) => (t) => {
29
- e.forEach((e) => {
30
- typeof e == "function" ? e(t) : e && (e.current = t);
31
- });
32
- }, wt = ({ contentComponent: e }) => {
33
- let t = (0, z.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getServerSnapshot);
34
- return /* @__PURE__ */ R(L, { children: Object.values(t) });
35
- };
36
- function V() {
37
- let e = /* @__PURE__ */ new Set(), t = {}, n = !1, r = () => {
38
- !n && e.size && (n = !0, queueMicrotask(() => {
39
- n = !1, e.forEach((e) => e());
40
- }));
41
- };
42
- return {
43
- subscribe(t) {
44
- return e.add(t), () => {
45
- e.delete(t);
46
- };
47
- },
48
- getSnapshot() {
49
- return t;
50
- },
51
- getServerSnapshot() {
52
- return t;
53
- },
54
- setRenderer(e, n) {
55
- t = {
56
- ...t,
57
- [e]: bt.createPortal(n.reactElement, n.element, e)
58
- }, r();
59
- },
60
- removeRenderer(e) {
61
- let n = { ...t };
62
- delete n[e], t = n, r();
63
- }
64
- };
65
- }
66
- var H = class extends A.Component {
67
- constructor(e) {
68
- super(e), this.editorContentRef = A.createRef();
69
- }
70
- componentDidMount() {
71
- this.init();
72
- }
73
- componentDidUpdate() {
74
- this.init();
75
- }
76
- init() {
77
- let t = this.props.editor;
78
- if (t && !t.isDestroyed && t.view.dom?.parentNode) {
79
- if (t.contentComponent) return;
80
- let n = this.editorContentRef.current;
81
- n.append(...t.view.dom.parentNode.childNodes), t.view.updateRoot(), t.setOptions({ element: n }), t.contentComponent = V(), t.createNodeViews(), t.registerPlugin(new e({
82
- key: B,
83
- props: { handleDOMEvents: { beforeinput: (e, n) => St(t, n) } }
84
- })), t.isEditorContentInitialized = !0, this.forceUpdate();
85
- }
86
- }
87
- componentWillUnmount() {
88
- let e = this.props.editor;
89
- if (e) {
90
- e.isEditorContentInitialized = !1, e.isDestroyed || (e.unregisterPlugin(B), e.view.setProps({ nodeViews: {} })), e.contentComponent = null;
91
- try {
92
- if (!e.view.dom?.parentNode) return;
93
- let t = document.createElement("div");
94
- t.append(...e.view.dom.parentNode.childNodes), e.setOptions({ element: t });
95
- } catch {}
96
- }
97
- }
98
- render() {
99
- let { editor: e, innerRef: t, ...n } = this.props;
100
- return /* @__PURE__ */ yt(L, { children: [/* @__PURE__ */ R("div", {
101
- ref: Ct(t, this.editorContentRef),
102
- ...n
103
- }), e?.contentComponent && /* @__PURE__ */ R(wt, { contentComponent: e.contentComponent })] });
104
- }
105
- }, Tt = gt((e, t) => {
106
- let n = A.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [e.editor]);
107
- return A.createElement(H, {
108
- key: n,
109
- innerRef: t,
110
- ...e
111
- });
112
- }), U = A.memo(Tt), Et = typeof window < "u" ? _t : P, Dt = class {
113
- constructor(e) {
114
- this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = e, this.lastSnapshot = {
115
- editor: e,
116
- transactionNumber: 0
117
- }, this.getSnapshot = this.getSnapshot.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.watch = this.watch.bind(this), this.subscribe = this.subscribe.bind(this);
118
- }
119
- getSnapshot() {
120
- return this.transactionNumber === this.lastTransactionNumber || (this.lastTransactionNumber = this.transactionNumber, this.lastSnapshot = {
121
- editor: this.editor,
122
- transactionNumber: this.transactionNumber
123
- }), this.lastSnapshot;
124
- }
125
- getServerSnapshot() {
126
- return {
127
- editor: null,
128
- transactionNumber: 0
129
- };
130
- }
131
- subscribe(e) {
132
- return this.subscribers.add(e), () => {
133
- this.subscribers.delete(e);
134
- };
135
- }
136
- watch(e) {
137
- if (this.editor = e, this.editor) {
138
- let e, t = (t) => {
139
- (t?.transaction === void 0 || t.transaction !== e) && (e = t?.transaction, this.transactionNumber += 1, this.subscribers.forEach((e) => e()));
140
- }, n = this.editor;
141
- return n.on("transaction", t), n.on("update", t), () => {
142
- n.off("transaction", t), n.off("update", t);
143
- };
144
- }
145
- }
146
- };
147
- function W(e) {
148
- let [t] = I(() => new Dt(e.editor)), n = (0, xt.useSyncExternalStoreWithSelector)(t.subscribe, t.getSnapshot, t.getServerSnapshot, e.selector, e.equalityFn ?? mt);
149
- return Et(() => t.watch(e.editor), [e.editor, t]), N(n), n;
150
- }
151
- var G = process.env.NODE_ENV !== "production", K = typeof window > "u", Ot = K || !!(typeof window < "u" && window.next), kt = class e {
152
- constructor(e) {
153
- this.editor = null, this.subscriptions = /* @__PURE__ */ new Set(), this.isComponentMounted = !1, this.previousDeps = null, this.instanceId = "", this.options = e, this.subscriptions = /* @__PURE__ */ new Set(), this.setEditor(this.getInitialEditor()), this.scheduleDestroy(), this.getEditor = this.getEditor.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.subscribe = this.subscribe.bind(this), this.refreshEditorInstance = this.refreshEditorInstance.bind(this), this.scheduleDestroy = this.scheduleDestroy.bind(this), this.onRender = this.onRender.bind(this), this.createEditor = this.createEditor.bind(this);
154
- }
155
- setEditor(e) {
156
- this.editor = e, this.instanceId = Math.random().toString(36).slice(2, 9), this.subscriptions.forEach((e) => e());
157
- }
158
- getInitialEditor() {
159
- let e = this.options.current.immediatelyRender, t = e ?? !0;
160
- return K ? (t && G && console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"), t = !1) : Ot && e === void 0 && (t = !1, G && console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")), t ? this.createEditor() : null;
161
- }
162
- createEditor() {
163
- let e = {
164
- ...this.options.current,
165
- onBeforeCreate: (...e) => {
166
- var t;
167
- return (t = this.options.current).onBeforeCreate?.call(t, ...e);
168
- },
169
- onBlur: (...e) => {
170
- var t;
171
- return (t = this.options.current).onBlur?.call(t, ...e);
172
- },
173
- onCreate: (...e) => {
174
- var t;
175
- return (t = this.options.current).onCreate?.call(t, ...e);
176
- },
177
- onDestroy: (...e) => {
178
- var t;
179
- return (t = this.options.current).onDestroy?.call(t, ...e);
180
- },
181
- onFocus: (...e) => {
182
- var t;
183
- return (t = this.options.current).onFocus?.call(t, ...e);
184
- },
185
- onSelectionUpdate: (...e) => {
186
- var t;
187
- return (t = this.options.current).onSelectionUpdate?.call(t, ...e);
188
- },
189
- onTransaction: (...e) => {
190
- var t;
191
- return (t = this.options.current).onTransaction?.call(t, ...e);
192
- },
193
- onUpdate: (...e) => {
194
- var t;
195
- return (t = this.options.current).onUpdate?.call(t, ...e);
196
- },
197
- onContentError: (...e) => {
198
- var t;
199
- return (t = this.options.current).onContentError?.call(t, ...e);
200
- },
201
- onDrop: (...e) => {
202
- var t;
203
- return (t = this.options.current).onDrop?.call(t, ...e);
204
- },
205
- onPaste: (...e) => {
206
- var t;
207
- return (t = this.options.current).onPaste?.call(t, ...e);
208
- },
209
- onDelete: (...e) => {
210
- var t;
211
- return (t = this.options.current).onDelete?.call(t, ...e);
212
- },
213
- onMount: (...e) => {
214
- var t;
215
- return (t = this.options.current).onMount?.call(t, ...e);
216
- },
217
- onUnmount: (...e) => {
218
- var t;
219
- return (t = this.options.current).onUnmount?.call(t, ...e);
220
- }
221
- };
222
- return new o(e);
223
- }
224
- getEditor() {
225
- return this.editor;
226
- }
227
- getServerSnapshot() {
228
- return null;
229
- }
230
- subscribe(e) {
231
- return this.subscriptions.add(e), () => {
232
- this.subscriptions.delete(e);
233
- };
234
- }
235
- static compareOptions(e, t) {
236
- return Object.keys(e).every((n) => [
237
- "onCreate",
238
- "onBeforeCreate",
239
- "onDestroy",
240
- "onUpdate",
241
- "onTransaction",
242
- "onFocus",
243
- "onBlur",
244
- "onSelectionUpdate",
245
- "onContentError",
246
- "onDrop",
247
- "onPaste"
248
- ].includes(n) ? !0 : n === "extensions" && e.extensions && t.extensions ? e.extensions.length === t.extensions.length && e.extensions.every((e, n) => e === t.extensions?.[n]) : e[n] === t[n]);
249
- }
250
- onRender(t) {
251
- return () => (this.isComponentMounted = !0, clearTimeout(this.scheduledDestructionTimeout), this.editor && !this.editor.isDestroyed && t.length === 0 ? e.compareOptions(this.options.current, this.editor.options) || this.editor.setOptions({
252
- ...this.options.current,
253
- editable: this.editor.isEditable
254
- }) : this.refreshEditorInstance(t), () => {
255
- this.isComponentMounted = !1, this.scheduleDestroy();
256
- });
257
- }
258
- refreshEditorInstance(e) {
259
- if (this.editor && !this.editor.isDestroyed) {
260
- if (this.previousDeps === null) {
261
- this.previousDeps = e;
262
- return;
263
- }
264
- if (this.previousDeps.length === e.length && this.previousDeps.every((t, n) => t === e[n])) return;
265
- }
266
- this.editor && !this.editor.isDestroyed && this.editor.destroy(), this.setEditor(this.createEditor()), this.previousDeps = e;
267
- }
268
- scheduleDestroy() {
269
- let e = this.instanceId, t = this.editor;
270
- this.scheduledDestructionTimeout = setTimeout(() => {
271
- this.isComponentMounted && this.instanceId === e ? t && t.setOptions(this.options.current) : t && !t.isDestroyed && (t.destroy(), this.instanceId === e && this.setEditor(null));
272
- }, 1);
273
- }
274
- };
275
- function At(e = {}, t = []) {
276
- let n = vt(e);
277
- n.current = e;
278
- let [r] = I(() => new kt(n)), i = (0, z.useSyncExternalStore)(r.subscribe, r.getEditor, r.getServerSnapshot);
279
- return N(i), P(r.onRender(t)), W({
280
- editor: i,
281
- selector: ({ transactionNumber: t }) => e.shouldRerenderOnTransaction === !1 || e.shouldRerenderOnTransaction === void 0 ? null : e.immediatelyRender && t === 0 ? 0 : t + 1
282
- }), i;
283
- }
284
- var q = j({ editor: null });
285
- q.Consumer;
286
- var J = j({
287
- onDragStart: () => {},
288
- nodeViewContentChildren: void 0,
289
- nodeViewContentRef: () => {}
290
- }), Y = () => M(J);
291
- A.forwardRef((e, t) => {
292
- let { onDragStart: n } = Y(), r = e.as || "div";
293
- return /* @__PURE__ */ R(r, {
294
- ...e,
295
- ref: t,
296
- "data-node-view-wrapper": "",
297
- onDragStart: n,
298
- style: {
299
- whiteSpace: "normal",
300
- ...e.style
301
- }
302
- });
303
- }), A.createContext({ markViewContentRef: () => {} });
304
- var X = j({ get editor() {
305
- throw Error("useTiptap must be used within a <Tiptap> provider");
306
- } });
307
- X.displayName = "TiptapContext";
308
- var Z = () => M(X);
309
- function Q({ children: e, ...t }) {
310
- let n = "editor" in t ? t.editor : t.instance;
311
- if (!n) throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");
312
- let r = F(() => ({ editor: n }), [n]), i = F(() => ({ editor: n }), [n]);
313
- return /* @__PURE__ */ R(q.Provider, {
314
- value: i,
315
- children: /* @__PURE__ */ R(X.Provider, {
316
- value: r,
317
- children: e
318
- })
319
- });
320
- }
321
- Q.displayName = "Tiptap";
322
- function $({ ...e }) {
323
- let { editor: t } = Z();
324
- return /* @__PURE__ */ R(U, {
325
- editor: t,
326
- ...e
327
- });
328
- }
329
- $.displayName = "Tiptap.Content", Object.assign(Q, { Content: $ });
330
- export { r as CommandManager, i as DECORATION_MANAGER_PLUGIN_KEY, a as DecorationManager, o as Editor, U as EditorContent, q as EditorContext, s as Extendable, ee as Extension, te as InputRule, ne as MappablePosition, re as Mark, ie as Node, ae as NodePos, oe as PasteRule, H as PureEditorContent, J as ReactNodeViewContext, $ as TiptapContent, X as TiptapContext, Q as TiptapWrapper, se as callOrReturn, ce as canInsertNode, le as combineTransactionSteps, ue as commands, de as createChainableState, V as createContentComponent, fe as createDocument, pe as createMappablePosition, me as createNodeFromContent, he as createStyleTag, ge as defaultBlockAt, _e as deleteProps, ve as elementFromString, ye as findChildrenInRange, be as findDuplicates, xe as findParentNode, Se as findParentNodeClosestToPos, Ce as flattenExtensions, we as fromString, Te as getAttributes, Ee as getAttributesFromExtensions, De as getChangedRanges, c as getExtensionField, l as getHTMLFromFragment, u as getMarkAttributes, d as getMarkRange, f as getMarkType, p as getMarksBetween, m as getNodeAtPosition, h as getNodeAttributes, g as getNodeType, _ as getPreviousBlockSibling, v as getRenderedAttributes, y as getSchemaByResolvedExtensions, b as getSchemaTypeByName, x as getSchemaTypeNameByName, S as getSplittedAttributes, C as getText, w as getTextBetween, T as getTextContentFromNodes, E as getTextSerializersFromSchema, Oe as getUpdatedPosition, ke as injectExtensionAttributesToParseRule, Ae as inputRulesPlugin, je as isActive, D as isAndroid, Me as isAtEndOfNode, Ne as isAtStartOfNode, Pe as isEmptyObject, Fe as isExtensionRulesEnabled, Ie as isFunction, Le as isList, Re as isMacOS, ze as isMarkActive, Be as isNodeActive, Ve as isNodeEmpty, He as isNodeSelection, Ue as isNumber, We as isPlainObject, Ge as isProseMirrorReplaceStep, Ke as isProseMirrorStep, qe as isRegExp, O as isSafari, Je as isTextSelection, k as isiOS, Ye as markInputRule, Xe as markPasteRule, Ze as mergeAttributes, Qe as mergeDeep, $e as minMax, et as nodeInputRule, tt as objectIncludes, nt as parseIndentedBlocks, rt as pasteRulesPlugin, it as removeDuplicates, at as renderNestedMarkdownContent, ot as resolveExtensions, st as resolveFocusPosition, ct as selectionToInsertionEnd, lt as sortExtensions, ut as splitExtensions, dt as textblockTypeInputRule, ft as updateMarkViewAttributes, At as useEditor, W as useEditorState, Y as useReactNodeView, Z as useTiptap, pt as wrappingInputRule };
331
-
332
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["useSyncExternalStore","useSyncExternalStoreWithSelector","commands_exports","React","ReactDOM","import_shim","require_shim","import_with_selector","require_with_selector","handleMobileEnter","editor","event","isiOS","isAndroid","view","root","anchor","contentDOM","lastKeyCode","keyEvent","handleKeyDown","mobileEnterPluginKey","PluginKey","mergeRefs","refs","ref","node","Portals","renderers","contentComponent","Fragment","createContentComponent","subscribers","isNotificationQueued","notifySubscribers","subscriber","callback","id","renderer","nextRenderers","PureEditorContent","props","element","Plugin","newElement","rest","innerRef","EditorContentWithKey","forwardRef","key","EditorContent","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","EditorStateManager","initialEditor","nextEditor","lastTransaction","fn","currentEditor","useEditorState","editorStateManager","useState","options","selectedState","circularDeepEqual","useDebugValue","isDev","isSSR","isNext","EditorInstanceManager","cb","explicit","immediatelyRender","optionsToApply","args","_this$options$current2","_this$options$current4","_this$options$current6","_this$options$current8","_this$options$current10","_this$options$current12","_this$options$current14","_this$options$current16","_this$options$current18","_this$options$current20","_this$options$current22","_this$options$current24","_this$options$current26","_this$options$current28","Editor","onStoreChange","a","b","extension","index","deps","dep","currentInstanceId","useEditor","mostRecentOptions","useRef","instanceManager","transactionNumber","EditorContext","createContext","ReactNodeViewContext","useReactNodeView","useContext","Tag","TiptapContext","useTiptap","TiptapWrapper","resolvedEditor","tiptapContextValue","useMemo","legacyContextValue","TiptapContent","CommandManager","DECORATION_MANAGER_PLUGIN_KEY","DecorationManager","Extendable","Extension","InputRule","MappablePosition","Mark","Node","NodePos","PasteRule","callOrReturn","canInsertNode","combineTransactionSteps","createChainableState","createDocument","createMappablePosition","createNodeFromContent","createStyleTag","defaultBlockAt","deleteProps","elementFromString","findChildrenInRange","findDuplicates","findParentNode","findParentNodeClosestToPos","flattenExtensions","fromString","getAttributes","getAttributesFromExtensions","getChangedRanges","getExtensionField","getHTMLFromFragment","getMarkAttributes","getMarkRange","getMarkType","getMarksBetween","getNodeAtPosition","getNodeAttributes","getNodeType","getPreviousBlockSibling","getRenderedAttributes","getSchemaByResolvedExtensions","getSchemaTypeByName","getSchemaTypeNameByName","getSplittedAttributes","getText","getTextBetween","getTextContentFromNodes","getTextSerializersFromSchema","getUpdatedPosition","injectExtensionAttributesToParseRule","inputRulesPlugin","isActive","isAtEndOfNode","isAtStartOfNode","isEmptyObject","isExtensionRulesEnabled","isFunction","isList","isMacOS","isMarkActive","isNodeActive","isNodeEmpty","isNodeSelection","isNumber","isPlainObject","isProseMirrorReplaceStep","isProseMirrorStep","isRegExp","isSafari","isTextSelection","markInputRule","markPasteRule","mergeAttributes","mergeDeep","minMax","nodeInputRule","objectIncludes","parseIndentedBlocks","pasteRulesPlugin","removeDuplicates","renderNestedMarkdownContent","resolveExtensions","resolveFocusPosition","selectionToInsertionEnd","sortExtensions","splitExtensions","textblockTypeInputRule","updateMarkViewAttributes","wrappingInputRule"],"sources":["../../../../../node_modules/@tiptap/react/dist/index.js"],"sourcesContent":["\"use client\";\nimport React, { createContext, createElement, createRef, forwardRef, memo, useContext, useDebugValue, useEffect, useLayoutEffect, useMemo, useRef, useState, version } from \"react\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nimport ReactDOM from \"react-dom\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim/index.js\";\nimport { Editor, MarkView, NodeView, createWidgetDecoration, getRenderedAttributes, isAndroid, isTextSelection, isiOS } from \"@tiptap/core\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { circularDeepEqual } from \"fast-equals\";\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/shim/with-selector.js\";\nexport * from \"@tiptap/core\";\n//#region src/handleMobileEnter.ts\nfunction handleMobileEnter(editor, event) {\n\tvar _root$getSelection, _root$getSelection2;\n\tif (editor.isDestroyed || event.defaultPrevented || !event.cancelable || !editor.isEditable || event.inputType !== \"insertParagraph\" && event.inputType !== \"insertLineBreak\" || !isiOS() && !isAndroid()) return;\n\tconst view = editor.view;\n\tconst root = view.root;\n\tconst selection = (_root$getSelection = (_root$getSelection2 = root.getSelection) === null || _root$getSelection2 === void 0 ? void 0 : _root$getSelection2.call(root)) !== null && _root$getSelection !== void 0 ? _root$getSelection : view.dom.ownerDocument.getSelection();\n\tconst anchor = selection === null || selection === void 0 ? void 0 : selection.anchorNode;\n\tconst element = (anchor === null || anchor === void 0 ? void 0 : anchor.nodeType) === 1 ? anchor : anchor === null || anchor === void 0 ? void 0 : anchor.parentElement;\n\tconst contentDOM = element === null || element === void 0 ? void 0 : element.closest(\"[data-node-view-content-react]\");\n\tif (!contentDOM || !view.dom.contains(contentDOM)) return;\n\tconst lastKeyCode = view.input.lastKeyCode;\n\tif (lastKeyCode === 13) view.input.lastKeyCode = null;\n\tview.domObserver.forceFlush();\n\tview.domObserver.flush();\n\tconst keyEvent = new KeyboardEvent(\"keydown\", {\n\t\tkey: \"Enter\",\n\t\tcode: \"Enter\",\n\t\tkeyCode: 13,\n\t\tshiftKey: event.inputType === \"insertLineBreak\",\n\t\tbubbles: true,\n\t\tcancelable: true\n\t});\n\tif (view.someProp(\"handleKeyDown\", (handleKeyDown) => handleKeyDown(view, keyEvent))) {\n\t\tevent.preventDefault();\n\t\tview.input.lastIOSEnter = 0;\n\t\tclearTimeout(view.input.lastIOSEnterFallbackTimeout);\n\t} else if (lastKeyCode === 13) view.input.lastKeyCode = lastKeyCode;\n}\n//#endregion\n//#region src/EditorContent.tsx\nconst mobileEnterPluginKey = new PluginKey(\"reactMobileEnter\");\nconst mergeRefs = (...refs) => {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === \"function\") ref(node);\n\t\t\telse if (ref) ref.current = node;\n\t\t});\n\t};\n};\n/**\n* This component renders all of the editor's node views.\n*/\nconst Portals = ({ contentComponent }) => {\n\tconst renderers = useSyncExternalStore(contentComponent.subscribe, contentComponent.getSnapshot, contentComponent.getServerSnapshot);\n\treturn /* @__PURE__ */ jsx(Fragment, { children: Object.values(renderers) });\n};\nfunction createContentComponent() {\n\tconst subscribers = /* @__PURE__ */ new Set();\n\tlet renderers = {};\n\tlet isNotificationQueued = false;\n\tconst notifySubscribers = () => {\n\t\tif (isNotificationQueued || !subscribers.size) return;\n\t\tisNotificationQueued = true;\n\t\tqueueMicrotask(() => {\n\t\t\tisNotificationQueued = false;\n\t\t\tsubscribers.forEach((subscriber) => subscriber());\n\t\t});\n\t};\n\treturn {\n\t\t/**\n\t\t* Subscribe to the editor instance's changes.\n\t\t*/\n\t\tsubscribe(callback) {\n\t\t\tsubscribers.add(callback);\n\t\t\treturn () => {\n\t\t\t\tsubscribers.delete(callback);\n\t\t\t};\n\t\t},\n\t\tgetSnapshot() {\n\t\t\treturn renderers;\n\t\t},\n\t\tgetServerSnapshot() {\n\t\t\treturn renderers;\n\t\t},\n\t\t/**\n\t\t* Adds a new NodeView Renderer to the editor.\n\t\t*/\n\t\tsetRenderer(id, renderer) {\n\t\t\trenderers = {\n\t\t\t\t...renderers,\n\t\t\t\t[id]: ReactDOM.createPortal(renderer.reactElement, renderer.element, id)\n\t\t\t};\n\t\t\tnotifySubscribers();\n\t\t},\n\t\t/**\n\t\t* Removes a NodeView Renderer from the editor.\n\t\t*/\n\t\tremoveRenderer(id) {\n\t\t\tconst nextRenderers = { ...renderers };\n\t\t\tdelete nextRenderers[id];\n\t\t\trenderers = nextRenderers;\n\t\t\tnotifySubscribers();\n\t\t}\n\t};\n}\nvar PureEditorContent = class extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.editorContentRef = React.createRef();\n\t}\n\tcomponentDidMount() {\n\t\tthis.init();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.init();\n\t}\n\tinit() {\n\t\tvar _editor$view$dom;\n\t\tconst editor = this.props.editor;\n\t\tif (editor && !editor.isDestroyed && ((_editor$view$dom = editor.view.dom) === null || _editor$view$dom === void 0 ? void 0 : _editor$view$dom.parentNode)) {\n\t\t\tif (editor.contentComponent) return;\n\t\t\tconst element = this.editorContentRef.current;\n\t\t\telement.append(...editor.view.dom.parentNode.childNodes);\n\t\t\teditor.view.updateRoot();\n\t\t\teditor.setOptions({ element });\n\t\t\teditor.contentComponent = createContentComponent();\n\t\t\teditor.createNodeViews();\n\t\t\teditor.registerPlugin(new Plugin({\n\t\t\t\tkey: mobileEnterPluginKey,\n\t\t\t\tprops: { handleDOMEvents: { beforeinput: (_view, event) => handleMobileEnter(editor, event) } }\n\t\t\t}));\n\t\t\teditor.isEditorContentInitialized = true;\n\t\t\tthis.forceUpdate();\n\t\t}\n\t}\n\tcomponentWillUnmount() {\n\t\tconst editor = this.props.editor;\n\t\tif (!editor) return;\n\t\teditor.isEditorContentInitialized = false;\n\t\tif (!editor.isDestroyed) {\n\t\t\teditor.unregisterPlugin(mobileEnterPluginKey);\n\t\t\teditor.view.setProps({ nodeViews: {} });\n\t\t}\n\t\teditor.contentComponent = null;\n\t\ttry {\n\t\t\tvar _editor$view$dom2;\n\t\t\tif (!((_editor$view$dom2 = editor.view.dom) === null || _editor$view$dom2 === void 0 ? void 0 : _editor$view$dom2.parentNode)) return;\n\t\t\tconst newElement = document.createElement(\"div\");\n\t\t\tnewElement.append(...editor.view.dom.parentNode.childNodes);\n\t\t\teditor.setOptions({ element: newElement });\n\t\t} catch {}\n\t}\n\trender() {\n\t\tconst { editor, innerRef, ...rest } = this.props;\n\t\treturn /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(\"div\", {\n\t\t\tref: mergeRefs(innerRef, this.editorContentRef),\n\t\t\t...rest\n\t\t}), (editor === null || editor === void 0 ? void 0 : editor.contentComponent) && /* @__PURE__ */ jsx(Portals, { contentComponent: editor.contentComponent })] });\n\t}\n};\nconst EditorContentWithKey = forwardRef((props, ref) => {\n\tconst key = React.useMemo(() => {\n\t\treturn Math.floor(Math.random() * 4294967295).toString();\n\t}, [props.editor]);\n\treturn React.createElement(PureEditorContent, {\n\t\tkey,\n\t\tinnerRef: ref,\n\t\t...props\n\t});\n});\nconst EditorContent = React.memo(EditorContentWithKey);\n//#endregion\n//#region src/useEditorState.ts\nconst useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n/**\n* To synchronize the editor instance with the component state,\n* we need to create a separate instance that is not affected by the component re-renders.\n*/\nvar EditorStateManager = class {\n\tconstructor(initialEditor) {\n\t\tthis.transactionNumber = 0;\n\t\tthis.lastTransactionNumber = 0;\n\t\tthis.subscribers = /* @__PURE__ */ new Set();\n\t\tthis.editor = initialEditor;\n\t\tthis.lastSnapshot = {\n\t\t\teditor: initialEditor,\n\t\t\ttransactionNumber: 0\n\t\t};\n\t\tthis.getSnapshot = this.getSnapshot.bind(this);\n\t\tthis.getServerSnapshot = this.getServerSnapshot.bind(this);\n\t\tthis.watch = this.watch.bind(this);\n\t\tthis.subscribe = this.subscribe.bind(this);\n\t}\n\t/**\n\t* Get the current editor instance.\n\t*/\n\tgetSnapshot() {\n\t\tif (this.transactionNumber === this.lastTransactionNumber) return this.lastSnapshot;\n\t\tthis.lastTransactionNumber = this.transactionNumber;\n\t\tthis.lastSnapshot = {\n\t\t\teditor: this.editor,\n\t\t\ttransactionNumber: this.transactionNumber\n\t\t};\n\t\treturn this.lastSnapshot;\n\t}\n\t/**\n\t* Always disable the editor on the server-side.\n\t*/\n\tgetServerSnapshot() {\n\t\treturn {\n\t\t\teditor: null,\n\t\t\ttransactionNumber: 0\n\t\t};\n\t}\n\t/**\n\t* Subscribe to the editor instance's changes.\n\t*/\n\tsubscribe(callback) {\n\t\tthis.subscribers.add(callback);\n\t\treturn () => {\n\t\t\tthis.subscribers.delete(callback);\n\t\t};\n\t}\n\t/**\n\t* Watch the editor instance for changes.\n\t*/\n\twatch(nextEditor) {\n\t\tthis.editor = nextEditor;\n\t\tif (this.editor) {\n\t\t\t/**\n\t\t\t* This will force a re-render when the editor state changes.\n\t\t\t* This is to support things like `editor.can().toggleBold()` in components that `useEditor`.\n\t\t\t* This could be more efficient, but it's a good trade-off for now.\n\t\t\t*/\n\t\t\tlet lastTransaction;\n\t\t\tconst fn = (props) => {\n\t\t\t\tif ((props === null || props === void 0 ? void 0 : props.transaction) !== void 0 && props.transaction === lastTransaction) return;\n\t\t\t\tlastTransaction = props === null || props === void 0 ? void 0 : props.transaction;\n\t\t\t\tthis.transactionNumber += 1;\n\t\t\t\tthis.subscribers.forEach((callback) => callback());\n\t\t\t};\n\t\t\tconst currentEditor = this.editor;\n\t\t\tcurrentEditor.on(\"transaction\", fn);\n\t\t\tcurrentEditor.on(\"update\", fn);\n\t\t\treturn () => {\n\t\t\t\tcurrentEditor.off(\"transaction\", fn);\n\t\t\t\tcurrentEditor.off(\"update\", fn);\n\t\t\t};\n\t\t}\n\t}\n};\n/**\n* This hook allows you to watch for changes on the editor instance.\n* It will allow you to select a part of the editor state and re-render the component when it changes.\n* @example\n* ```tsx\n* const editor = useEditor({...options})\n* const { currentSelection } = useEditorState({\n* editor,\n* selector: snapshot => ({ currentSelection: snapshot.editor.state.selection }),\n* })\n*/\nfunction useEditorState(options) {\n\tvar _options$equalityFn;\n\tconst [editorStateManager] = useState(() => new EditorStateManager(options.editor));\n\tconst selectedState = useSyncExternalStoreWithSelector(editorStateManager.subscribe, editorStateManager.getSnapshot, editorStateManager.getServerSnapshot, options.selector, (_options$equalityFn = options.equalityFn) !== null && _options$equalityFn !== void 0 ? _options$equalityFn : circularDeepEqual);\n\tuseIsomorphicLayoutEffect(() => {\n\t\treturn editorStateManager.watch(options.editor);\n\t}, [options.editor, editorStateManager]);\n\tuseDebugValue(selectedState);\n\treturn selectedState;\n}\n//#endregion\n//#region src/useEditor.ts\nconst isDev = process.env.NODE_ENV !== \"production\";\nconst isSSR = typeof window === \"undefined\";\nconst isNext = isSSR || Boolean(typeof window !== \"undefined\" && window.next);\n/**\n* This class handles the creation, destruction, and re-creation of the editor instance.\n*/\nvar EditorInstanceManager = class EditorInstanceManager {\n\tconstructor(options) {\n\t\tthis.editor = null;\n\t\tthis.subscriptions = /* @__PURE__ */ new Set();\n\t\tthis.isComponentMounted = false;\n\t\tthis.previousDeps = null;\n\t\tthis.instanceId = \"\";\n\t\tthis.options = options;\n\t\tthis.subscriptions = /* @__PURE__ */ new Set();\n\t\tthis.setEditor(this.getInitialEditor());\n\t\tthis.scheduleDestroy();\n\t\tthis.getEditor = this.getEditor.bind(this);\n\t\tthis.getServerSnapshot = this.getServerSnapshot.bind(this);\n\t\tthis.subscribe = this.subscribe.bind(this);\n\t\tthis.refreshEditorInstance = this.refreshEditorInstance.bind(this);\n\t\tthis.scheduleDestroy = this.scheduleDestroy.bind(this);\n\t\tthis.onRender = this.onRender.bind(this);\n\t\tthis.createEditor = this.createEditor.bind(this);\n\t}\n\tsetEditor(editor) {\n\t\tthis.editor = editor;\n\t\tthis.instanceId = Math.random().toString(36).slice(2, 9);\n\t\tthis.subscriptions.forEach((cb) => cb());\n\t}\n\tgetInitialEditor() {\n\t\tconst explicit = this.options.current.immediatelyRender;\n\t\tlet immediatelyRender = explicit !== null && explicit !== void 0 ? explicit : true;\n\t\tif (isSSR) {\n\t\t\tif (immediatelyRender && isDev) console.warn(\"SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches\");\n\t\t\timmediatelyRender = false;\n\t\t} else if (isNext && explicit === void 0) {\n\t\t\timmediatelyRender = false;\n\t\t\tif (isDev) console.warn(\"Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.\");\n\t\t}\n\t\treturn immediatelyRender ? this.createEditor() : null;\n\t}\n\t/**\n\t* Create a new editor instance. And attach event listeners.\n\t*/\n\tcreateEditor() {\n\t\tconst optionsToApply = {\n\t\t\t...this.options.current,\n\t\t\tonBeforeCreate: (...args) => {\n\t\t\t\tvar _this$options$current, _this$options$current2;\n\t\t\t\treturn (_this$options$current = (_this$options$current2 = this.options.current).onBeforeCreate) === null || _this$options$current === void 0 ? void 0 : _this$options$current.call(_this$options$current2, ...args);\n\t\t\t},\n\t\t\tonBlur: (...args) => {\n\t\t\t\tvar _this$options$current3, _this$options$current4;\n\t\t\t\treturn (_this$options$current3 = (_this$options$current4 = this.options.current).onBlur) === null || _this$options$current3 === void 0 ? void 0 : _this$options$current3.call(_this$options$current4, ...args);\n\t\t\t},\n\t\t\tonCreate: (...args) => {\n\t\t\t\tvar _this$options$current5, _this$options$current6;\n\t\t\t\treturn (_this$options$current5 = (_this$options$current6 = this.options.current).onCreate) === null || _this$options$current5 === void 0 ? void 0 : _this$options$current5.call(_this$options$current6, ...args);\n\t\t\t},\n\t\t\tonDestroy: (...args) => {\n\t\t\t\tvar _this$options$current7, _this$options$current8;\n\t\t\t\treturn (_this$options$current7 = (_this$options$current8 = this.options.current).onDestroy) === null || _this$options$current7 === void 0 ? void 0 : _this$options$current7.call(_this$options$current8, ...args);\n\t\t\t},\n\t\t\tonFocus: (...args) => {\n\t\t\t\tvar _this$options$current9, _this$options$current10;\n\t\t\t\treturn (_this$options$current9 = (_this$options$current10 = this.options.current).onFocus) === null || _this$options$current9 === void 0 ? void 0 : _this$options$current9.call(_this$options$current10, ...args);\n\t\t\t},\n\t\t\tonSelectionUpdate: (...args) => {\n\t\t\t\tvar _this$options$current11, _this$options$current12;\n\t\t\t\treturn (_this$options$current11 = (_this$options$current12 = this.options.current).onSelectionUpdate) === null || _this$options$current11 === void 0 ? void 0 : _this$options$current11.call(_this$options$current12, ...args);\n\t\t\t},\n\t\t\tonTransaction: (...args) => {\n\t\t\t\tvar _this$options$current13, _this$options$current14;\n\t\t\t\treturn (_this$options$current13 = (_this$options$current14 = this.options.current).onTransaction) === null || _this$options$current13 === void 0 ? void 0 : _this$options$current13.call(_this$options$current14, ...args);\n\t\t\t},\n\t\t\tonUpdate: (...args) => {\n\t\t\t\tvar _this$options$current15, _this$options$current16;\n\t\t\t\treturn (_this$options$current15 = (_this$options$current16 = this.options.current).onUpdate) === null || _this$options$current15 === void 0 ? void 0 : _this$options$current15.call(_this$options$current16, ...args);\n\t\t\t},\n\t\t\tonContentError: (...args) => {\n\t\t\t\tvar _this$options$current17, _this$options$current18;\n\t\t\t\treturn (_this$options$current17 = (_this$options$current18 = this.options.current).onContentError) === null || _this$options$current17 === void 0 ? void 0 : _this$options$current17.call(_this$options$current18, ...args);\n\t\t\t},\n\t\t\tonDrop: (...args) => {\n\t\t\t\tvar _this$options$current19, _this$options$current20;\n\t\t\t\treturn (_this$options$current19 = (_this$options$current20 = this.options.current).onDrop) === null || _this$options$current19 === void 0 ? void 0 : _this$options$current19.call(_this$options$current20, ...args);\n\t\t\t},\n\t\t\tonPaste: (...args) => {\n\t\t\t\tvar _this$options$current21, _this$options$current22;\n\t\t\t\treturn (_this$options$current21 = (_this$options$current22 = this.options.current).onPaste) === null || _this$options$current21 === void 0 ? void 0 : _this$options$current21.call(_this$options$current22, ...args);\n\t\t\t},\n\t\t\tonDelete: (...args) => {\n\t\t\t\tvar _this$options$current23, _this$options$current24;\n\t\t\t\treturn (_this$options$current23 = (_this$options$current24 = this.options.current).onDelete) === null || _this$options$current23 === void 0 ? void 0 : _this$options$current23.call(_this$options$current24, ...args);\n\t\t\t},\n\t\t\tonMount: (...args) => {\n\t\t\t\tvar _this$options$current25, _this$options$current26;\n\t\t\t\treturn (_this$options$current25 = (_this$options$current26 = this.options.current).onMount) === null || _this$options$current25 === void 0 ? void 0 : _this$options$current25.call(_this$options$current26, ...args);\n\t\t\t},\n\t\t\tonUnmount: (...args) => {\n\t\t\t\tvar _this$options$current27, _this$options$current28;\n\t\t\t\treturn (_this$options$current27 = (_this$options$current28 = this.options.current).onUnmount) === null || _this$options$current27 === void 0 ? void 0 : _this$options$current27.call(_this$options$current28, ...args);\n\t\t\t}\n\t\t};\n\t\treturn new Editor(optionsToApply);\n\t}\n\t/**\n\t* Get the current editor instance.\n\t*/\n\tgetEditor() {\n\t\treturn this.editor;\n\t}\n\t/**\n\t* Always disable the editor on the server-side.\n\t*/\n\tgetServerSnapshot() {\n\t\treturn null;\n\t}\n\t/**\n\t* Subscribe to the editor instance's changes.\n\t*/\n\tsubscribe(onStoreChange) {\n\t\tthis.subscriptions.add(onStoreChange);\n\t\treturn () => {\n\t\t\tthis.subscriptions.delete(onStoreChange);\n\t\t};\n\t}\n\tstatic compareOptions(a, b) {\n\t\treturn Object.keys(a).every((key) => {\n\t\t\tif ([\n\t\t\t\t\"onCreate\",\n\t\t\t\t\"onBeforeCreate\",\n\t\t\t\t\"onDestroy\",\n\t\t\t\t\"onUpdate\",\n\t\t\t\t\"onTransaction\",\n\t\t\t\t\"onFocus\",\n\t\t\t\t\"onBlur\",\n\t\t\t\t\"onSelectionUpdate\",\n\t\t\t\t\"onContentError\",\n\t\t\t\t\"onDrop\",\n\t\t\t\t\"onPaste\"\n\t\t\t].includes(key)) return true;\n\t\t\tif (key === \"extensions\" && a.extensions && b.extensions) {\n\t\t\t\tif (a.extensions.length !== b.extensions.length) return false;\n\t\t\t\treturn a.extensions.every((extension, index) => {\n\t\t\t\t\tvar _b$extensions;\n\t\t\t\t\tif (extension !== ((_b$extensions = b.extensions) === null || _b$extensions === void 0 ? void 0 : _b$extensions[index])) return false;\n\t\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (a[key] !== b[key]) return false;\n\t\t\treturn true;\n\t\t});\n\t}\n\t/**\n\t* On each render, we will create, update, or destroy the editor instance.\n\t* @param deps The dependencies to watch for changes\n\t* @returns A cleanup function\n\t*/\n\tonRender(deps) {\n\t\treturn () => {\n\t\t\tthis.isComponentMounted = true;\n\t\t\tclearTimeout(this.scheduledDestructionTimeout);\n\t\t\tif (this.editor && !this.editor.isDestroyed && deps.length === 0) {\n\t\t\t\tif (!EditorInstanceManager.compareOptions(this.options.current, this.editor.options)) this.editor.setOptions({\n\t\t\t\t\t...this.options.current,\n\t\t\t\t\teditable: this.editor.isEditable\n\t\t\t\t});\n\t\t\t} else this.refreshEditorInstance(deps);\n\t\t\treturn () => {\n\t\t\t\tthis.isComponentMounted = false;\n\t\t\t\tthis.scheduleDestroy();\n\t\t\t};\n\t\t};\n\t}\n\t/**\n\t* Recreate the editor instance if the dependencies have changed.\n\t*/\n\trefreshEditorInstance(deps) {\n\t\tif (this.editor && !this.editor.isDestroyed) {\n\t\t\tif (this.previousDeps === null) {\n\t\t\t\tthis.previousDeps = deps;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.previousDeps.length === deps.length && this.previousDeps.every((dep, index) => dep === deps[index])) return;\n\t\t}\n\t\tif (this.editor && !this.editor.isDestroyed) this.editor.destroy();\n\t\tthis.setEditor(this.createEditor());\n\t\tthis.previousDeps = deps;\n\t}\n\t/**\n\t* Schedule the destruction of the editor instance.\n\t* This will only destroy the editor if it was not mounted on the next tick.\n\t* This is to avoid destroying the editor instance when it's actually still mounted.\n\t*/\n\tscheduleDestroy() {\n\t\tconst currentInstanceId = this.instanceId;\n\t\tconst currentEditor = this.editor;\n\t\tthis.scheduledDestructionTimeout = setTimeout(() => {\n\t\t\tif (this.isComponentMounted && this.instanceId === currentInstanceId) {\n\t\t\t\tif (currentEditor) currentEditor.setOptions(this.options.current);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (currentEditor && !currentEditor.isDestroyed) {\n\t\t\t\tcurrentEditor.destroy();\n\t\t\t\tif (this.instanceId === currentInstanceId) this.setEditor(null);\n\t\t\t}\n\t\t}, 1);\n\t}\n};\nfunction useEditor(options = {}, deps = []) {\n\tconst mostRecentOptions = useRef(options);\n\tmostRecentOptions.current = options;\n\tconst [instanceManager] = useState(() => new EditorInstanceManager(mostRecentOptions));\n\tconst editor = useSyncExternalStore(instanceManager.subscribe, instanceManager.getEditor, instanceManager.getServerSnapshot);\n\tuseDebugValue(editor);\n\tuseEffect(instanceManager.onRender(deps));\n\tuseEditorState({\n\t\teditor,\n\t\tselector: ({ transactionNumber }) => {\n\t\t\tif (options.shouldRerenderOnTransaction === false || options.shouldRerenderOnTransaction === void 0) return null;\n\t\t\tif (options.immediatelyRender && transactionNumber === 0) return 0;\n\t\t\treturn transactionNumber + 1;\n\t\t}\n\t});\n\treturn editor;\n}\n//#endregion\n//#region src/Context.tsx\nconst EditorContext = createContext({ editor: null });\nconst EditorConsumer = EditorContext.Consumer;\n/**\n* A hook to get the current editor instance.\n*/\nconst useCurrentEditor = () => useContext(EditorContext);\n/**\n* This is the provider component for the editor.\n* It allows the editor to be accessible across the entire component tree\n* with `useCurrentEditor`.\n*/\nfunction EditorProvider({ children, slotAfter, slotBefore, editorContainerProps = {}, ...editorOptions }) {\n\tconst editor = useEditor(editorOptions);\n\tconst contextValue = useMemo(() => ({ editor }), [editor]);\n\tif (!editor) return null;\n\treturn /* @__PURE__ */ jsxs(EditorContext.Provider, {\n\t\tvalue: contextValue,\n\t\tchildren: [\n\t\t\tslotBefore,\n\t\t\t/* @__PURE__ */ jsx(EditorConsumer, { children: ({ editor: currentEditor }) => /* @__PURE__ */ jsx(EditorContent, {\n\t\t\t\teditor: currentEditor,\n\t\t\t\t...editorContainerProps\n\t\t\t}) }),\n\t\t\tchildren,\n\t\t\tslotAfter\n\t\t]\n\t});\n}\n//#endregion\n//#region src/useReactNodeView.ts\nconst ReactNodeViewContext = createContext({\n\tonDragStart: () => {},\n\tnodeViewContentChildren: void 0,\n\tnodeViewContentRef: () => {}\n});\nconst ReactNodeViewContentProvider = ({ children, content }) => {\n\treturn createElement(ReactNodeViewContext.Provider, { value: { nodeViewContentChildren: content } }, children);\n};\nconst useReactNodeView = () => useContext(ReactNodeViewContext);\n//#endregion\n//#region src/NodeViewContent.tsx\nfunction NodeViewContent({ as: Tag = \"div\", ...props }) {\n\tconst { nodeViewContentRef, nodeViewContentChildren } = useReactNodeView();\n\treturn /* @__PURE__ */ jsx(Tag, {\n\t\t...props,\n\t\tref: nodeViewContentRef,\n\t\t\"data-node-view-content\": \"\",\n\t\tstyle: {\n\t\t\twhiteSpace: \"pre-wrap\",\n\t\t\t...props.style\n\t\t},\n\t\tchildren: nodeViewContentChildren\n\t});\n}\n//#endregion\n//#region src/NodeViewWrapper.tsx\nconst NodeViewWrapper = React.forwardRef((props, ref) => {\n\tconst { onDragStart } = useReactNodeView();\n\tconst Tag = props.as || \"div\";\n\treturn /* @__PURE__ */ jsx(Tag, {\n\t\t...props,\n\t\tref,\n\t\t\"data-node-view-wrapper\": \"\",\n\t\tonDragStart,\n\t\tstyle: {\n\t\t\twhiteSpace: \"normal\",\n\t\t\t...props.style\n\t\t}\n\t});\n});\n//#endregion\n//#region src/ReactRenderer.tsx\n/**\n* Check if a component is a class component.\n* @param Component\n* @returns {boolean}\n*/\nfunction isClassComponent(Component) {\n\treturn !!(typeof Component === \"function\" && Component.prototype && Component.prototype.isReactComponent);\n}\n/**\n* Check if a component is a forward ref component.\n* @param Component\n* @returns {boolean}\n*/\nfunction isForwardRefComponent(Component) {\n\treturn !!(typeof Component === \"object\" && Component.$$typeof && (Component.$$typeof.toString() === \"Symbol(react.forward_ref)\" || Component.$$typeof.description === \"react.forward_ref\"));\n}\n/**\n* Check if a component is a memoized component.\n* @param Component\n* @returns {boolean}\n*/\nfunction isMemoComponent(Component) {\n\treturn !!(typeof Component === \"object\" && Component.$$typeof && (Component.$$typeof.toString() === \"Symbol(react.memo)\" || Component.$$typeof.description === \"react.memo\"));\n}\n/**\n* Check if a component can safely receive a ref prop.\n* This includes class components, forwardRef components, and memoized components\n* that wrap forwardRef or class components.\n* @param Component\n* @returns {boolean}\n*/\nfunction canReceiveRef(Component) {\n\tif (isClassComponent(Component)) return true;\n\tif (isForwardRefComponent(Component)) return true;\n\tif (isMemoComponent(Component)) {\n\t\tconst wrappedComponent = Component.type;\n\t\tif (wrappedComponent) return isClassComponent(wrappedComponent) || isForwardRefComponent(wrappedComponent);\n\t}\n\treturn false;\n}\n/**\n* Check if we're running React 19+ by detecting if function components support ref props\n* @returns {boolean}\n*/\nfunction isReact19Plus() {\n\ttry {\n\t\tif (version) return parseInt(version.split(\".\")[0], 10) >= 19;\n\t} catch {}\n\treturn false;\n}\n/**\n* The ReactRenderer class. It's responsible for rendering React components inside the editor.\n* @example\n* new ReactRenderer(MyComponent, {\n* editor,\n* props: {\n* foo: 'bar',\n* },\n* as: 'span',\n* })\n*/\nvar ReactRenderer = class {\n\t/**\n\t* Immediately creates element and renders the provided React component.\n\t*/\n\tconstructor(component, { editor, props = {}, as = \"div\", className = \"\" }) {\n\t\tthis.ref = null;\n\t\tthis.destroyed = false;\n\t\tthis.id = Math.floor(Math.random() * 4294967295).toString();\n\t\tthis.component = component;\n\t\tthis.editor = editor;\n\t\tthis.props = props;\n\t\tthis.element = document.createElement(as);\n\t\tthis.element.classList.add(\"react-renderer\");\n\t\tif (className) this.element.classList.add(...className.split(\" \"));\n\t\tif (this.editor.isEditorContentInitialized) this.render();\n\t\telse queueMicrotask(() => {\n\t\t\tif (this.destroyed) return;\n\t\t\tthis.render();\n\t\t});\n\t}\n\t/**\n\t* Render the React component.\n\t*/\n\trender() {\n\t\tvar _editor$contentCompon;\n\t\tif (this.destroyed) return;\n\t\tconst Component = this.component;\n\t\tconst props = this.props;\n\t\tconst editor = this.editor;\n\t\tconst isReact19 = isReact19Plus();\n\t\tconst componentCanReceiveRef = canReceiveRef(Component);\n\t\tconst elementProps = { ...props };\n\t\tif (elementProps.ref && !(isReact19 || componentCanReceiveRef)) delete elementProps.ref;\n\t\tif (!elementProps.ref && (isReact19 || componentCanReceiveRef)) elementProps.ref = (ref) => {\n\t\t\tthis.ref = ref;\n\t\t};\n\t\tthis.reactElement = /* @__PURE__ */ jsx(Component, { ...elementProps });\n\t\teditor === null || editor === void 0 || (_editor$contentCompon = editor.contentComponent) === null || _editor$contentCompon === void 0 || _editor$contentCompon.setRenderer(this.id, this);\n\t}\n\t/**\n\t* Re-renders the React component with new props.\n\t* Skips the render if none of the supplied props actually changed,\n\t* to avoid unnecessary portal re-creation.\n\t*/\n\tupdateProps(props = {}) {\n\t\tif (this.destroyed) return;\n\t\tlet changed = false;\n\t\tconst keys = Object.keys(props);\n\t\tfor (let i = 0; i < keys.length; i += 1) {\n\t\t\tconst key = keys[i];\n\t\t\tif (props[key] !== this.props[key]) {\n\t\t\t\tchanged = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!changed) return;\n\t\tthis.props = {\n\t\t\t...this.props,\n\t\t\t...props\n\t\t};\n\t\tthis.render();\n\t}\n\t/**\n\t* Destroy the React component.\n\t*/\n\tdestroy() {\n\t\tvar _editor$contentCompon2;\n\t\tthis.destroyed = true;\n\t\tconst editor = this.editor;\n\t\teditor === null || editor === void 0 || (_editor$contentCompon2 = editor.contentComponent) === null || _editor$contentCompon2 === void 0 || _editor$contentCompon2.removeRenderer(this.id);\n\t\ttry {\n\t\t\tif (this.element && this.element.parentNode) this.element.parentNode.removeChild(this.element);\n\t\t} catch {}\n\t}\n\t/**\n\t* Update the attributes of the element that holds the React component.\n\t*/\n\tupdateAttributes(attributes) {\n\t\tObject.keys(attributes).forEach((key) => {\n\t\t\tthis.element.setAttribute(key, attributes[key]);\n\t\t});\n\t}\n};\n//#endregion\n//#region src/ReactMarkViewRenderer.tsx\nconst ReactMarkViewContext = React.createContext({ markViewContentRef: () => {} });\nconst MarkViewContent = (props) => {\n\tconst { as: Tag = \"span\", ...rest } = props;\n\tconst { markViewContentRef } = React.useContext(ReactMarkViewContext);\n\treturn /* @__PURE__ */ jsx(Tag, {\n\t\t...rest,\n\t\tref: markViewContentRef,\n\t\t\"data-mark-view-content\": \"\"\n\t});\n};\nvar ReactMarkView = class extends MarkView {\n\tconstructor(component, props, options) {\n\t\tsuper(component, props, options);\n\t\tconst { as = \"span\", attrs, className = \"\" } = options || {};\n\t\tconst componentProps = {\n\t\t\t...props,\n\t\t\tupdateAttributes: this.updateAttributes.bind(this)\n\t\t};\n\t\tthis.contentDOMElement = document.createElement(\"span\");\n\t\tconst markViewContentRef = (el) => {\n\t\t\tif (el && !el.contains(this.contentDOMElement)) el.appendChild(this.contentDOMElement);\n\t\t};\n\t\tconst context = { markViewContentRef };\n\t\tconst ReactMarkViewProvider = React.memo((componentProps) => {\n\t\t\treturn /* @__PURE__ */ jsx(ReactMarkViewContext.Provider, {\n\t\t\t\tvalue: context,\n\t\t\t\tchildren: React.createElement(component, componentProps)\n\t\t\t});\n\t\t});\n\t\tReactMarkViewProvider.displayName = \"ReactMarkView\";\n\t\tthis.renderer = new ReactRenderer(ReactMarkViewProvider, {\n\t\t\teditor: props.editor,\n\t\t\tprops: componentProps,\n\t\t\tas,\n\t\t\tclassName: `mark-${props.mark.type.name} ${className}`.trim()\n\t\t});\n\t\tif (attrs) this.renderer.updateAttributes(attrs);\n\t}\n\tget dom() {\n\t\treturn this.renderer.element;\n\t}\n\tget contentDOM() {\n\t\treturn this.contentDOMElement;\n\t}\n};\nfunction ReactMarkViewRenderer(component, options = {}) {\n\treturn (props) => new ReactMarkView(component, props, options);\n}\n//#endregion\n//#region src/captureDOMSelection.ts\n/**\n* Saves the DOM selection inside `element`, returns a function to put it back.\n* Browsers drop the selection when an element moves, so restore it after the move.\n*/\nfunction captureDOMSelection(element) {\n\tvar _element$ownerDocumen;\n\tconst root = element.getRootNode();\n\tconst selection = typeof root.getSelection === \"function\" ? root.getSelection() : (_element$ownerDocumen = element.ownerDocument) === null || _element$ownerDocumen === void 0 || (_element$ownerDocumen = _element$ownerDocumen.defaultView) === null || _element$ownerDocumen === void 0 ? void 0 : _element$ownerDocumen.getSelection();\n\tif (!selection || selection.rangeCount === 0) return null;\n\tconst { anchorNode, anchorOffset, focusNode, focusOffset } = selection;\n\tif (!anchorNode || !focusNode) return null;\n\tif (!element.contains(anchorNode) || !element.contains(focusNode)) return null;\n\treturn () => {\n\t\ttry {\n\t\t\tselection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);\n\t\t} catch {}\n\t};\n}\n//#endregion\n//#region src/lib/utils/getTextSelectionAncestorPositions.ts\nfunction isSameAncestor($from, $to, depth) {\n\treturn $from.node(depth) === $to.node(depth) && $from.before(depth) === $to.before(depth);\n}\nfunction getTextSelectionAncestorPositions(selection) {\n\tif (!isTextSelection(selection)) return [];\n\tconst { $from, $to } = selection;\n\tconst positions = [];\n\tconst maxDepth = Math.min($from.depth, $to.depth);\n\tfor (let depth = 1; depth <= maxDepth; depth += 1) {\n\t\tif (!isSameAncestor($from, $to, depth)) break;\n\t\tpositions.push($from.before(depth));\n\t}\n\treturn positions;\n}\n//#endregion\n//#region src/ReactNodeViewSelectionTracker.ts\nvar ReactNodeViewSelectionTracker = class {\n\tconstructor(editor) {\n\t\tthis.views = /* @__PURE__ */ new WeakMap();\n\t\tthis.viewCount = 0;\n\t\tthis.insideViews = /* @__PURE__ */ new Set();\n\t\tthis.syncQueued = false;\n\t\tthis.scheduleSync = () => {\n\t\t\tif (this.syncQueued) return;\n\t\t\tthis.syncQueued = true;\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tthis.syncQueued = false;\n\t\t\t\tthis.sync();\n\t\t\t});\n\t\t};\n\t\tthis.handleTransaction = () => this.scheduleSync();\n\t\tthis.editor = editor;\n\t}\n\tregister(view) {\n\t\tif (this.viewCount === 0) this.editor.on(\"transaction\", this.handleTransaction);\n\t\tthis.views.set(view.dom, view);\n\t\tthis.viewCount += 1;\n\t\tthis.scheduleSync();\n\t}\n\tunregister(view) {\n\t\tthis.views.delete(view.dom);\n\t\tthis.viewCount -= 1;\n\t\tthis.insideViews.delete(view);\n\t\tif (this.viewCount === 0) this.editor.off(\"transaction\", this.handleTransaction);\n\t}\n\tsync() {\n\t\tif (this.viewCount === 0 || this.editor.isDestroyed) return;\n\t\tconst nextInsideViews = this.findInsideViews();\n\t\tthis.updateViews(this.insideViews, nextInsideViews, false);\n\t\tthis.updateViews(nextInsideViews, this.insideViews, true);\n\t\tthis.insideViews = nextInsideViews;\n\t}\n\tupdateViews(views, unchangedViews, selectionInside) {\n\t\tfor (const view of views) if (!unchangedViews.has(view)) view.setSelectionInside(selectionInside);\n\t}\n\tfindInsideViews() {\n\t\tconst insideViews = /* @__PURE__ */ new Set();\n\t\tfor (const position of getTextSelectionAncestorPositions(this.editor.state.selection)) {\n\t\t\tconst dom = this.editor.view.nodeDOM(position);\n\t\t\tconst view = dom ? this.views.get(dom) : void 0;\n\t\t\tif (view) insideViews.add(view);\n\t\t}\n\t\treturn insideViews;\n\t}\n};\nconst trackers = /* @__PURE__ */ new WeakMap();\nfunction getReactNodeViewSelectionTracker(editor) {\n\tlet tracker = trackers.get(editor);\n\tif (!tracker) {\n\t\ttracker = new ReactNodeViewSelectionTracker(editor);\n\t\ttrackers.set(editor, tracker);\n\t}\n\treturn tracker;\n}\n//#endregion\n//#region src/ReactNodeViewRenderer.tsx\nvar ReactNodeView = class extends NodeView {\n\tconstructor(component, props, options) {\n\t\tsuper(component, props, options);\n\t\tthis.nodeSelected = false;\n\t\tthis.handlePositionUpdate = () => {\n\t\t\tconst newPos = this.getPos();\n\t\t\tif (typeof newPos !== \"number\" || newPos === this.currentPos) return;\n\t\t\tthis.currentPos = newPos;\n\t\t\tthis.renderer.updateProps({ getPos: () => this.getPos() });\n\t\t\tif (typeof this.options.attrs === \"function\") this.updateElementAttributes();\n\t\t};\n\t\tthis.cachedExtensionWithSyncedStorage = null;\n\t\tif (!this.node.isLeaf) {\n\t\t\tif (this.options.contentDOMElementTag) this.contentDOMElement = document.createElement(this.options.contentDOMElementTag);\n\t\t\telse this.contentDOMElement = document.createElement(this.node.isInline ? \"span\" : \"div\");\n\t\t\tthis.contentDOMElement.dataset.nodeViewContentReact = \"\";\n\t\t\tthis.contentDOMElement.dataset.nodeViewWrapper = \"\";\n\t\t\tthis.contentDOMElement.style.whiteSpace = \"inherit\";\n\t\t\tconst contentTarget = this.dom.querySelector(\"[data-node-view-content]\");\n\t\t\tif (contentTarget) contentTarget.appendChild(this.contentDOMElement);\n\t\t\telse this.dom.appendChild(this.contentDOMElement);\n\t\t}\n\t\tif (this.options.trackNodeViewPosition) this.editor.on(\"update\", this.handlePositionUpdate);\n\t}\n\t/**\n\t* Returns a proxy of the extension that redirects storage access to the editor's mutable storage.\n\t* This preserves the original prototype chain (instanceof checks, methods like configure/extend work).\n\t* Cached to avoid proxy creation on every update.\n\t*/\n\tget extensionWithSyncedStorage() {\n\t\tif (!this.cachedExtensionWithSyncedStorage) {\n\t\t\tconst editor = this.editor;\n\t\t\tconst extension = this.extension;\n\t\t\tthis.cachedExtensionWithSyncedStorage = new Proxy(extension, { get(target, prop, receiver) {\n\t\t\t\tif (prop === \"storage\") {\n\t\t\t\t\tvar _editor$storage;\n\t\t\t\t\treturn (_editor$storage = editor.storage[extension.name]) !== null && _editor$storage !== void 0 ? _editor$storage : {};\n\t\t\t\t}\n\t\t\t\treturn Reflect.get(target, prop, receiver);\n\t\t\t} });\n\t\t}\n\t\treturn this.cachedExtensionWithSyncedStorage;\n\t}\n\t/**\n\t* Setup the React component.\n\t* Called on initialization.\n\t*/\n\tmount() {\n\t\tconst mountProps = {\n\t\t\teditor: this.editor,\n\t\t\tnode: this.node,\n\t\t\tdecorations: this.decorations,\n\t\t\tinnerDecorations: this.innerDecorations,\n\t\t\tview: this.view,\n\t\t\tselected: false,\n\t\t\tselectionInside: false,\n\t\t\textension: this.extensionWithSyncedStorage,\n\t\t\tHTMLAttributes: this.HTMLAttributes,\n\t\t\tgetPos: () => this.getPos(),\n\t\t\tupdateAttributes: (attributes = {}) => this.updateAttributes(attributes),\n\t\t\tdeleteNode: () => this.deleteNode(),\n\t\t\tref: createRef()\n\t\t};\n\t\tif (!this.component.displayName) {\n\t\t\tconst capitalizeFirstChar = (string) => {\n\t\t\t\treturn string.charAt(0).toUpperCase() + string.substring(1);\n\t\t\t};\n\t\t\tthis.component.displayName = capitalizeFirstChar(this.extension.name);\n\t\t}\n\t\tconst onDragStart = this.onDragStart.bind(this);\n\t\tconst nodeViewContentRef = (element) => {\n\t\t\tif (element && this.contentDOMElement && element.firstChild !== this.contentDOMElement) {\n\t\t\t\tif (element.hasAttribute(\"data-node-view-wrapper\")) element.removeAttribute(\"data-node-view-wrapper\");\n\t\t\t\tconst restoreSelection = captureDOMSelection(this.contentDOMElement);\n\t\t\t\telement.appendChild(this.contentDOMElement);\n\t\t\t\trestoreSelection === null || restoreSelection === void 0 || restoreSelection();\n\t\t\t}\n\t\t};\n\t\tconst context = {\n\t\t\tonDragStart,\n\t\t\tnodeViewContentRef\n\t\t};\n\t\tconst Component = this.component;\n\t\tconst ReactNodeViewProvider = memo((componentProps) => {\n\t\t\treturn /* @__PURE__ */ jsx(ReactNodeViewContext.Provider, {\n\t\t\t\tvalue: context,\n\t\t\t\tchildren: createElement(Component, componentProps)\n\t\t\t});\n\t\t});\n\t\tReactNodeViewProvider.displayName = \"ReactNodeView\";\n\t\tlet as = this.node.isInline ? \"span\" : \"div\";\n\t\tif (this.options.as) as = this.options.as;\n\t\tconst { className = \"\" } = this.options;\n\t\tthis.renderer = new ReactRenderer(ReactNodeViewProvider, {\n\t\t\teditor: this.editor,\n\t\t\tprops: mountProps,\n\t\t\tas,\n\t\t\tclassName: `node-${this.node.type.name} ${className}`.trim()\n\t\t});\n\t\tgetReactNodeViewSelectionTracker(this.editor).register(this);\n\t\tthis.updateElementAttributes();\n\t\tthis.currentPos = this.getPos();\n\t}\n\t/**\n\t* Return the DOM element.\n\t* This is the element that will be used to display the node view.\n\t*/\n\tget dom() {\n\t\tvar _this$renderer$elemen;\n\t\tif (this.renderer.element.firstElementChild && !((_this$renderer$elemen = this.renderer.element.firstElementChild) === null || _this$renderer$elemen === void 0 ? void 0 : _this$renderer$elemen.hasAttribute(\"data-node-view-wrapper\"))) throw Error(\"Please use the NodeViewWrapper component for your node view.\");\n\t\treturn this.renderer.element;\n\t}\n\t/**\n\t* Return the content DOM element.\n\t* This is the element that will be used to display the rich-text content of the node.\n\t*/\n\tget contentDOM() {\n\t\tif (this.node.isLeaf) return null;\n\t\treturn this.contentDOMElement;\n\t}\n\t/**\n\t* On update, update the React component.\n\t* To prevent unnecessary updates, the `update` option can be used.\n\t*/\n\tupdate(node, decorations, innerDecorations) {\n\t\tconst rerenderComponent = (props) => {\n\t\t\tthis.renderer.updateProps(props);\n\t\t\tif (typeof this.options.attrs === \"function\") this.updateElementAttributes();\n\t\t};\n\t\tif (node.type !== this.node.type) return false;\n\t\tif (typeof this.options.update === \"function\") {\n\t\t\tconst oldNode = this.node;\n\t\t\tconst oldDecorations = this.decorations;\n\t\t\tconst oldInnerDecorations = this.innerDecorations;\n\t\t\tthis.node = node;\n\t\t\tthis.decorations = decorations;\n\t\t\tthis.innerDecorations = innerDecorations;\n\t\t\tthis.currentPos = this.getPos();\n\t\t\treturn this.options.update({\n\t\t\t\toldNode,\n\t\t\t\toldDecorations,\n\t\t\t\tnewNode: node,\n\t\t\t\tnewDecorations: decorations,\n\t\t\t\toldInnerDecorations,\n\t\t\t\tinnerDecorations,\n\t\t\t\tupdateProps: () => rerenderComponent({\n\t\t\t\t\tnode,\n\t\t\t\t\tdecorations,\n\t\t\t\t\tinnerDecorations,\n\t\t\t\t\textension: this.extensionWithSyncedStorage\n\t\t\t\t})\n\t\t\t});\n\t\t}\n\t\tif (!(node !== this.node)) {\n\t\t\tthis.node = node;\n\t\t\tthis.decorations = decorations;\n\t\t\tthis.innerDecorations = innerDecorations;\n\t\t\treturn true;\n\t\t}\n\t\tconst newPos = this.getPos();\n\t\tthis.node = node;\n\t\tthis.decorations = decorations;\n\t\tthis.innerDecorations = innerDecorations;\n\t\tthis.currentPos = newPos;\n\t\tconst extraProps = {\n\t\t\tnode,\n\t\t\tdecorations,\n\t\t\tinnerDecorations,\n\t\t\textension: this.extensionWithSyncedStorage\n\t\t};\n\t\tif (this.options.trackNodeViewPosition) extraProps.getPos = () => this.getPos();\n\t\trerenderComponent(extraProps);\n\t\treturn true;\n\t}\n\t/**\n\t* Select the node.\n\t* Add the `selected` prop and the `ProseMirror-selectednode` class.\n\t*/\n\tselectNode() {\n\t\tthis.nodeSelected = true;\n\t\tthis.updateSelectedState(true);\n\t}\n\t/**\n\t* Deselect the node.\n\t* Remove the `selected` prop and the `ProseMirror-selectednode` class.\n\t*/\n\tdeselectNode() {\n\t\tthis.nodeSelected = false;\n\t\tthis.updateSelectedState(this.options.selectedOnTextSelection === true && this.isTextSelectionInside());\n\t}\n\tsetSelectionInside(selectionInside) {\n\t\tconst selected = this.nodeSelected || this.options.selectedOnTextSelection === true && selectionInside;\n\t\tthis.renderer.updateProps({\n\t\t\tselectionInside,\n\t\t\tselected\n\t\t});\n\t\tthis.renderer.element.classList.toggle(\"ProseMirror-selectednode\", selected);\n\t}\n\tupdateSelectedState(selected) {\n\t\tthis.renderer.updateProps({ selected });\n\t\tthis.renderer.element.classList.toggle(\"ProseMirror-selectednode\", selected);\n\t}\n\tisTextSelectionInside() {\n\t\tconst pos = this.getPos();\n\t\treturn typeof pos === \"number\" && getTextSelectionAncestorPositions(this.editor.state.selection).includes(pos);\n\t}\n\t/**\n\t* Destroy the React component instance.\n\t*/\n\tdestroy() {\n\t\tthis.renderer.destroy();\n\t\tgetReactNodeViewSelectionTracker(this.editor).unregister(this);\n\t\tif (this.options.trackNodeViewPosition) this.editor.off(\"update\", this.handlePositionUpdate);\n\t\tthis.contentDOMElement = null;\n\t}\n\t/**\n\t* Update the attributes of the top-level element that holds the React component.\n\t* Applying the attributes defined in the `attrs` option.\n\t*/\n\tupdateElementAttributes() {\n\t\tif (this.options.attrs) {\n\t\t\tlet attrsObj = {};\n\t\t\tif (typeof this.options.attrs === \"function\") {\n\t\t\t\tconst extensionAttributes = this.editor.extensionManager.attributes;\n\t\t\t\tconst HTMLAttributes = getRenderedAttributes(this.node, extensionAttributes);\n\t\t\t\tattrsObj = this.options.attrs({\n\t\t\t\t\tnode: this.node,\n\t\t\t\t\tHTMLAttributes\n\t\t\t\t});\n\t\t\t} else attrsObj = this.options.attrs;\n\t\t\tthis.renderer.updateAttributes(attrsObj);\n\t\t}\n\t}\n};\n/**\n* Create a React node view renderer.\n*/\nfunction ReactNodeViewRenderer(component, options) {\n\treturn (props) => {\n\t\tif (!props.editor.contentComponent) return {\n\t\t\tdom: document.createElement(\"span\"),\n\t\t\tcontentDOM: null,\n\t\t\tupdate: () => false,\n\t\t\tdestroy: () => {},\n\t\t\tselectNode: () => {},\n\t\t\tdeselectNode: () => {},\n\t\t\tstopEvent: () => false,\n\t\t\tignoreMutation: () => true\n\t\t};\n\t\treturn new ReactNodeView(component, props, options);\n\t};\n}\n//#endregion\n//#region src/ReactWidgetRenderer.tsx\nconst WIDGET_CACHE = Symbol(\"tiptapReactWidgetCache\");\n/**\n* Renders a React component into a ProseMirror widget decoration.\n* Reuses Tiptap's `ReactRenderer` so the component lives in the editor's\n* React tree (context and hooks work as usual). Use a stable `key` for\n* stateful widgets.\n* @example\n* addDecorations() {\n* return {\n* create: ({ editor, state }) =>\n* findMatches(state.doc).map(match =>\n* ReactWidgetRenderer(MyWidget, {\n* editor, pos: match.pos, key: `match-${match.id}`,\n* props: { label: match.label },\n* }),\n* ),\n* }\n* }\n*/\nfunction ReactWidgetRenderer(component, options) {\n\tconst { editor, props = {}, as = \"span\", className } = options;\n\treturn createWidgetDecoration({\n\t\t...options,\n\t\tprops,\n\t\tcacheKey: WIDGET_CACHE,\n\t\tcontext: (getPos) => ({\n\t\t\teditor,\n\t\t\tgetPos\n\t\t}),\n\t\tcreate: (renderProps) => new ReactRenderer(component, {\n\t\t\teditor,\n\t\t\tas,\n\t\t\tclassName,\n\t\t\tprops: renderProps\n\t\t}),\n\t\tmaterialize: (renderer) => {\n\t\t\trenderer.render();\n\t\t\treturn renderer.element;\n\t\t}\n\t});\n}\n//#endregion\n//#region src/Tiptap.tsx\n/**\n* React context that stores the current editor instance.\n*\n* Use `useTiptap()` to read from this context in child components.\n*/\nconst TiptapContext = createContext({ get editor() {\n\tthrow new Error(\"useTiptap must be used within a <Tiptap> provider\");\n} });\nTiptapContext.displayName = \"TiptapContext\";\n/**\n* Hook to read the Tiptap context and access the editor instance.\n*\n* This is a small convenience wrapper around `useContext(TiptapContext)`.\n* The editor is always available when used within a `<Tiptap>` provider.\n*\n* @returns The current `TiptapContextType` value from the provider.\n*\n* @example\n* ```tsx\n* import { useTiptap } from '@tiptap/react'\n*\n* function Toolbar() {\n* const { editor } = useTiptap()\n*\n* return (\n* <button onClick={() => editor.chain().focus().toggleBold().run()}>\n* Bold\n* </button>\n* )\n* }\n* ```\n*/\nconst useTiptap = () => useContext(TiptapContext);\n/**\n* Select a slice of the editor state using the context-provided editor.\n*\n* This is a thin wrapper around `useEditorState` that reads the `editor`\n* instance from `useTiptap()` so callers don't have to pass it manually.\n*\n* @typeParam TSelectorResult - The type returned by the selector.\n* @param selector - Function that receives the editor state snapshot and\n* returns the piece of state you want to subscribe to.\n* @param equalityFn - Optional function to compare previous/next selected\n* values and avoid unnecessary updates.\n* @returns The selected slice of the editor state.\n*\n* @example\n* ```tsx\n* function WordCount() {\n* const wordCount = useTiptapState(state => {\n* const text = state.editor.state.doc.textContent\n* return text.split(/\\s+/).filter(Boolean).length\n* })\n*\n* return <span>{wordCount} words</span>\n* }\n* ```\n*/\nfunction useTiptapState(selector, equalityFn) {\n\tconst { editor } = useTiptap();\n\treturn useEditorState({\n\t\teditor,\n\t\tselector,\n\t\tequalityFn\n\t});\n}\n/**\n* Top-level provider component that makes the editor instance available via\n* React context to all child components.\n*\n* This component also provides backwards compatibility with the legacy\n* `EditorContext`, so components using `useCurrentEditor()` will work\n* inside a `<Tiptap>` provider.\n*\n* @param props - Component props.\n* @returns A context provider element wrapping `children`.\n*\n* @example\n* ```tsx\n* import { Tiptap, useEditor } from '@tiptap/react'\n*\n* function App() {\n* const editor = useEditor({ extensions: [...] })\n*\n* return (\n* <Tiptap editor={editor}>\n* <Toolbar />\n* <Tiptap.Content />\n* </Tiptap>\n* )\n* }\n* ```\n*/\nfunction TiptapWrapper({ children, ...props }) {\n\tconst resolvedEditor = \"editor\" in props ? props.editor : props.instance;\n\tif (!resolvedEditor) throw new Error(\"Tiptap: An editor instance is required. Pass a non-null `editor` prop.\");\n\tconst tiptapContextValue = useMemo(() => ({ editor: resolvedEditor }), [resolvedEditor]);\n\tconst legacyContextValue = useMemo(() => ({ editor: resolvedEditor }), [resolvedEditor]);\n\treturn /* @__PURE__ */ jsx(EditorContext.Provider, {\n\t\tvalue: legacyContextValue,\n\t\tchildren: /* @__PURE__ */ jsx(TiptapContext.Provider, {\n\t\t\tvalue: tiptapContextValue,\n\t\t\tchildren\n\t\t})\n\t});\n}\nTiptapWrapper.displayName = \"Tiptap\";\n/**\n* Convenience component that renders `EditorContent` using the context-provided\n* editor instance. Use this instead of manually passing the `editor` prop.\n*\n* @param props - All `EditorContent` props except `editor` and `ref`.\n* @returns An `EditorContent` element bound to the context editor.\n*\n* @example\n* ```tsx\n* // inside a Tiptap provider\n* <Tiptap.Content className=\"editor\" />\n* ```\n*/\nfunction TiptapContent({ ...rest }) {\n\tconst { editor } = useTiptap();\n\treturn /* @__PURE__ */ jsx(EditorContent, {\n\t\teditor,\n\t\t...rest\n\t});\n}\nTiptapContent.displayName = \"Tiptap.Content\";\n/**\n* Root `Tiptap` component. Use it as the provider for all child components.\n*\n* The exported object includes the `Content` subcomponent for rendering the\n* editor content area.\n*\n* This component provides both the new `TiptapContext` (accessed via `useTiptap()`)\n* and the legacy `EditorContext` (accessed via `useCurrentEditor()`) for\n* backwards compatibility.\n*\n* For bubble menus and floating menus, import them separately from\n* `@tiptap/react/menus` to keep floating-ui as an optional dependency.\n*\n* @example\n* ```tsx\n* import { Tiptap, useEditor } from '@tiptap/react'\n* import { BubbleMenu } from '@tiptap/react/menus'\n*\n* function App() {\n* const editor = useEditor({ extensions: [...] })\n*\n* return (\n* <Tiptap editor={editor}>\n* <Tiptap.Content />\n* <BubbleMenu>\n* <button onClick={() => editor.chain().focus().toggleBold().run()}>Bold</button>\n* </BubbleMenu>\n* </Tiptap>\n* )\n* }\n* ```\n*/\nconst Tiptap = Object.assign(TiptapWrapper, { \n/**\n* The Tiptap Content component that renders the EditorContent with the editor instance from the context.\n* @see TiptapContent\n*/\nContent: TiptapContent });\n//#endregion\nexport { EditorConsumer, EditorContent, EditorContext, EditorProvider, MarkViewContent, NodeViewContent, NodeViewWrapper, PureEditorContent, ReactMarkView, ReactMarkViewContext, ReactMarkViewRenderer, ReactNodeView, ReactNodeViewContentProvider, ReactNodeViewContext, ReactNodeViewRenderer, ReactRenderer, ReactWidgetRenderer, Tiptap, TiptapContent, TiptapContext, TiptapWrapper, createContentComponent, useCurrentEditor, useEditor, useEditorState, useReactNodeView, useTiptap, useTiptapState };\n\n//# sourceMappingURL=index.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;AAWA,SAASS,GAAkB,GAAQ,GAAO;CAEzC,IAAIC,EAAO,eAAeC,EAAM,oBAAoB,CAACA,EAAM,cAAc,CAACD,EAAO,cAAcC,EAAM,cAAc,qBAAqBA,EAAM,cAAc,qBAAqB,CAACC,EAAM,KAAK,CAACC,EAAU,GAAG;CAC3M,IAAMC,IAAOJ,EAAO,MACdK,IAAOD,EAAK,MAEZE,KADyDD,EAAK,cAAwF,KAAKA,CAAI,KAAoED,EAAK,IAAI,cAAc,aAAa,EAC9P,EAAgE,YAEzEG,KADWD,GAAuD,aAAc,IAAIA,IAASA,GAAuD,cACvI,EAA0D,QAAQ,gCAAgC;CACrH,IAAI,CAACC,KAAc,CAACH,EAAK,IAAI,SAASG,CAAU,GAAG;CACnD,IAAMC,IAAcJ,EAAK,MAAM;CAG/B,AAFII,MAAgB,OAAI,EAAK,MAAM,cAAc,OACjDJ,EAAK,YAAY,WAAW,GAC5BA,EAAK,YAAY,MAAM;CACvB,IAAMK,IAAW,IAAI,cAAc,WAAW;EAC7C,KAAK;EACL,MAAM;EACN,SAAS;EACT,UAAUR,EAAM,cAAc;EAC9B,SAAS;E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AC9B,0BAA0B,CAAC;AAC5B,CAAC,GAIKE,UAAyBC,EAAWF,CAAoB;AAkBtCvG,EAAM,YAAY,GAAO,MAAQ;CACxD,IAAM,EAAE,mBAAgBwG,EAAiB,GACnCE,IAAMpE,EAAM,MAAM;CACxB,OAAuB,kBAAIoE,GAAK;EAC/B,GAAGpE;EACH;EACA,0BAA0B;EAC1B;EACA,OAAO;GACN,YAAY;GACZ,GAAGA,EAAM;EACV;CACD,CAAC;AACF,CAAC,GAqJ4BtC,EAAM,cAAc,EAAE,0BAA0B,CAAC,EAAE,CAAC;AAgcjF,IAAM2G,IAAgBL,EAAc,EAAE,IAAI,SAAS;CAClD,MAAU,MAAM,mDAAmD;AACpE,EAAE,CAAC;AACH,EAAc,cAAc;AAwB5B,IAAMM,UAAkBH,EAAWE,CAAa;AA6DhD,SAASE,EAAc,EAAE,aAAU,GAAGvE,KAAS;CAC9C,IAAMwE,IAAiB,YAAYxE,IAAQA,EAAM,SAASA,EAAM;CAChE,IAAI,CAACwE,GAAgB,MAAU,MAAM,wEAAwE;CAC7G,IAAMC,IAAqBC,SAAe,EAAE,QAAQF,EAAe,IAAI,CAACA,CAAc,CAAC,GACjFG,IAAqBD,SAAe,EAAE,QAAQF,EAAe,IAAI,CAACA,CAAc,CAAC;CACvF,OAAuB,kBAAIT,EAAc,UAAU;EAClD,OAAOY;EACP,UAA0B,kBAAIN,EAAc,UAAU;GACrD,OAAOI;GACP;EACD,CAAC;CACF,CAAC;AACF;AACA,EAAc,cAAc;AAc5B,SAASG,EAAc,EAAE,GAAGxE,KAAQ;CACnC,IAAM,EAAE,cAAWkE,EAAU;CAC7B,OAAuB,kBAAI7D,GAAe;EACzC;EACA,GAAGL;CACJ,CAAC;AACF;AACA,EAAc,cAAc,kBAiCb,OAAO,OAAOmE,GAAe,EAK5C,SAASK,EAAc,CAAC"}
@@ -1,28 +0,0 @@
1
- import { Extension as e } from "../../core/dist/index.js";
2
- import { Blockquote as t } from "../../extension-blockquote/dist/index.js";
3
- import { Bold as n } from "../../extension-bold/dist/index.js";
4
- import { Code as r } from "../../extension-code/dist/index.js";
5
- import { CodeBlock as i } from "../../extension-code-block/dist/index.js";
6
- import { Document as a } from "../../extension-document/dist/index.js";
7
- import { HardBreak as o } from "../../extension-hard-break/dist/index.js";
8
- import { Heading as s } from "../../extension-heading/dist/index.js";
9
- import { HorizontalRule as c } from "../../extension-horizontal-rule/dist/index.js";
10
- import { Italic as l } from "../../extension-italic/dist/index.js";
11
- import { Link as u } from "../../extension-link/dist/index.js";
12
- import { BulletList as d, ListItem as f, ListKeymap as p, OrderedList as m } from "../../extension-list/dist/index.js";
13
- import { Paragraph as h } from "../../extension-paragraph/dist/index.js";
14
- import { Strike as g } from "../../extension-strike/dist/index.js";
15
- import { Text as _ } from "../../extension-text/dist/index.js";
16
- import { Underline as v } from "../../extension-underline/dist/index.js";
17
- import { Dropcursor as y, Gapcursor as b, TrailingNode as x, UndoRedo as S } from "../../extensions/dist/index.js";
18
- // node_modules/@tiptap/starter-kit/dist/index.js
19
- var C = e.create({
20
- name: "starterKit",
21
- addExtensions() {
22
- let e = [];
23
- return this.options.bold !== !1 && e.push(n.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(t.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(d.configure(this.options.bulletList)), this.options.code !== !1 && e.push(r.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(i.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(a.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(y.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(b.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(o.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(s.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(S.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(c.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(l.configure(this.options.italic)), this.options.listItem !== !1 && e.push(f.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(p.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(u.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(m.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(h.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(g.configure(this.options.strike)), this.options.text !== !1 && e.push(_.configure(this.options.text)), this.options.underline !== !1 && e.push(v.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(x.configure(this.options?.trailingNode)), e;
24
- }
25
- }), w = C;
26
- export { C as StarterKit, w as default };
27
-
28
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["StarterKit","Extension","extensions","Bold","Blockquote","BulletList","Code","CodeBlock","Document","Dropcursor","Gapcursor","HardBreak","Heading","UndoRedo","HorizontalRule","Italic","ListItem","ListKeymap","Link","OrderedList","Paragraph","Strike","Text","Underline","TrailingNode","src_default"],"sources":["../../../../../node_modules/@tiptap/starter-kit/dist/index.js"],"sourcesContent":["import { Extension } from \"@tiptap/core\";\nimport { Blockquote } from \"@tiptap/extension-blockquote\";\nimport { Bold } from \"@tiptap/extension-bold\";\nimport { Code } from \"@tiptap/extension-code\";\nimport { CodeBlock } from \"@tiptap/extension-code-block\";\nimport { Document } from \"@tiptap/extension-document\";\nimport { HardBreak } from \"@tiptap/extension-hard-break\";\nimport { Heading } from \"@tiptap/extension-heading\";\nimport { HorizontalRule } from \"@tiptap/extension-horizontal-rule\";\nimport { Italic } from \"@tiptap/extension-italic\";\nimport { Link } from \"@tiptap/extension-link\";\nimport { BulletList, ListItem, ListKeymap, OrderedList } from \"@tiptap/extension-list\";\nimport { Paragraph } from \"@tiptap/extension-paragraph\";\nimport { Strike } from \"@tiptap/extension-strike\";\nimport { Text } from \"@tiptap/extension-text\";\nimport { Underline } from \"@tiptap/extension-underline\";\nimport { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from \"@tiptap/extensions\";\n//#region src/starter-kit.ts\n/**\n* The starter kit is a collection of essential editor extensions.\n*\n* It’s a good starting point for building your own editor.\n*/\nconst StarterKit = Extension.create({\n\tname: \"starterKit\",\n\taddExtensions() {\n\t\tconst extensions = [];\n\t\tif (this.options.bold !== false) extensions.push(Bold.configure(this.options.bold));\n\t\tif (this.options.blockquote !== false) extensions.push(Blockquote.configure(this.options.blockquote));\n\t\tif (this.options.bulletList !== false) extensions.push(BulletList.configure(this.options.bulletList));\n\t\tif (this.options.code !== false) extensions.push(Code.configure(this.options.code));\n\t\tif (this.options.codeBlock !== false) extensions.push(CodeBlock.configure(this.options.codeBlock));\n\t\tif (this.options.document !== false) extensions.push(Document.configure(this.options.document));\n\t\tif (this.options.dropcursor !== false) extensions.push(Dropcursor.configure(this.options.dropcursor));\n\t\tif (this.options.gapcursor !== false) extensions.push(Gapcursor.configure(this.options.gapcursor));\n\t\tif (this.options.hardBreak !== false) extensions.push(HardBreak.configure(this.options.hardBreak));\n\t\tif (this.options.heading !== false) extensions.push(Heading.configure(this.options.heading));\n\t\tif (this.options.undoRedo !== false) extensions.push(UndoRedo.configure(this.options.undoRedo));\n\t\tif (this.options.horizontalRule !== false) extensions.push(HorizontalRule.configure(this.options.horizontalRule));\n\t\tif (this.options.italic !== false) extensions.push(Italic.configure(this.options.italic));\n\t\tif (this.options.listItem !== false) extensions.push(ListItem.configure(this.options.listItem));\n\t\tif (this.options.listKeymap !== false) {\n\t\t\tvar _this$options;\n\t\t\textensions.push(ListKeymap.configure((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.listKeymap));\n\t\t}\n\t\tif (this.options.link !== false) {\n\t\t\tvar _this$options2;\n\t\t\textensions.push(Link.configure((_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.link));\n\t\t}\n\t\tif (this.options.orderedList !== false) extensions.push(OrderedList.configure(this.options.orderedList));\n\t\tif (this.options.paragraph !== false) extensions.push(Paragraph.configure(this.options.paragraph));\n\t\tif (this.options.strike !== false) extensions.push(Strike.configure(this.options.strike));\n\t\tif (this.options.text !== false) extensions.push(Text.configure(this.options.text));\n\t\tif (this.options.underline !== false) {\n\t\t\tvar _this$options3;\n\t\t\textensions.push(Underline.configure((_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.underline));\n\t\t}\n\t\tif (this.options.trailingNode !== false) {\n\t\t\tvar _this$options4;\n\t\t\textensions.push(TrailingNode.configure((_this$options4 = this.options) === null || _this$options4 === void 0 ? void 0 : _this$options4.trailingNode));\n\t\t}\n\t\treturn extensions;\n\t}\n});\n//#endregion\n//#region src/index.ts\nvar src_default = StarterKit;\n//#endregion\nexport { StarterKit, src_default as default };\n\n//# sourceMappingURL=index.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,IAAMA,IAAaC,EAAU,OAAO;CACnC,MAAM;CACN,gBAAgB;EACf,IAAMC,IAAa,CAAC;EAmCpB,OAlCI,KAAK,QAAQ,SAAS,MAAOA,EAAW,KAAKC,EAAK,UAAU,KAAK,QAAQ,IAAI,CAAC,GAC9E,KAAK,QAAQ,eAAe,MAAOD,EAAW,KAAKE,EAAW,UAAU,KAAK,QAAQ,UAAU,CAAC,GAChG,KAAK,QAAQ,eAAe,MAAOF,EAAW,KAAKG,EAAW,UAAU,KAAK,QAAQ,UAAU,CAAC,GAChG,KAAK,QAAQ,SAAS,MAAOH,EAAW,KAAKI,EAAK,UAAU,KAAK,QAAQ,IAAI,CAAC,GAC9E,KAAK,QAAQ,cAAc,MAAOJ,EAAW,KAAKK,EAAU,UAAU,KAAK,QAAQ,SAAS,CAAC,GAC7F,KAAK,QAAQ,aAAa,MAAOL,EAAW,KAAKM,EAAS,UAAU,KAAK,QAAQ,QAAQ,CAAC,GAC1F,KAAK,QAAQ,eAAe,MAAON,EAAW,KAAKO,EAAW,UAAU,KAAK,QAAQ,UAAU,CAAC,GAChG,KAAK,QAAQ,cAAc,MAAOP,EAAW,KAAKQ,EAAU,UAAU,KAAK,QAAQ,SAAS,CAAC,GAC7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