react-reason-editor 1.0.77 → 1.0.78

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 (195) hide show
  1. package/dist/Ai-CfgczVyp.cjs +1 -0
  2. package/dist/Ai-DsWeNKXF.js +1 -0
  3. package/dist/Ai.cjs +1 -1
  4. package/dist/Ai.js +1 -1
  5. package/dist/{Attachment-bBEf8uOc.js → Attachment-BmQoshq_.js} +1 -1
  6. package/dist/Attachment.cjs +1 -1
  7. package/dist/Attachment.js +1 -1
  8. package/dist/{Blockquote-Cw5Zty9X.js → Blockquote-cNS4L62L.js} +1 -1
  9. package/dist/Blockquote.cjs +1 -1
  10. package/dist/Blockquote.js +1 -1
  11. package/dist/{Bold-BwuX7fZs.js → Bold-DiKXbC2z.js} +1 -1
  12. package/dist/Bold.cjs +1 -1
  13. package/dist/Bold.js +1 -1
  14. package/dist/BubbleMenus-CIOMgQ-M.js +216 -0
  15. package/dist/BubbleMenus-vqNuXWlm.cjs +1 -0
  16. package/dist/BulletList.cjs +1 -1
  17. package/dist/BulletList.js +1 -1
  18. package/dist/{Callout-CJofZEpX.js → Callout-BLkbFKjv.js} +1 -1
  19. package/dist/{Callout-wjo2BYZi.cjs → Callout-CpkjGEBS.cjs} +1 -1
  20. package/dist/Callout.cjs +1 -1
  21. package/dist/Callout.js +1 -1
  22. package/dist/Clear.cjs +1 -1
  23. package/dist/Clear.js +1 -1
  24. package/dist/{Code-CtIvf6_L.js → Code-DvYJ892R.js} +1 -1
  25. package/dist/Code.cjs +1 -1
  26. package/dist/Code.js +1 -1
  27. package/dist/{CodeBlock-DoIb7GC2.js → CodeBlock-B3dLyClh.js} +1 -1
  28. package/dist/CodeBlock.cjs +1 -1
  29. package/dist/CodeBlock.js +1 -1
  30. package/dist/CodeView.cjs +1 -1
  31. package/dist/CodeView.js +1 -1
  32. package/dist/{Color-DSs2MkQU.js → Color-Cng09GRR.js} +1 -1
  33. package/dist/{Color-B9PloDr5.cjs → Color-ZjBs7t7J.cjs} +1 -1
  34. package/dist/Color.cjs +1 -1
  35. package/dist/Color.js +1 -1
  36. package/dist/{Column-BXSoMVXw.cjs → Column-BaMOYvoO.cjs} +1 -1
  37. package/dist/{Column-CrT9596v.js → Column-DO6MfrOQ.js} +1 -1
  38. package/dist/Column.cjs +1 -1
  39. package/dist/Column.js +1 -1
  40. package/dist/{Drawer-CfcCPGCn.cjs → Drawer-CC24iVYp.cjs} +1 -1
  41. package/dist/{Drawer-DuQ5tw2t.js → Drawer-CL5Rhqw4.js} +1 -1
  42. package/dist/Drawer.cjs +1 -1
  43. package/dist/Drawer.js +1 -1
  44. package/dist/{Drawio-DQEgw3du.cjs → Drawio-CD_Tea_o.cjs} +1 -1
  45. package/dist/{Drawio-P620K_Ps.js → Drawio-LEtUoVAY.js} +1 -1
  46. package/dist/Drawio.cjs +1 -1
  47. package/dist/Drawio.js +1 -1
  48. package/dist/{Emoji-CYM4tY7s.js → Emoji-DN3yfwz_.js} +1 -1
  49. package/dist/Emoji.cjs +1 -1
  50. package/dist/Emoji.js +1 -1
  51. package/dist/{ExportPdf-BoD_D91q.js → ExportPdf-CrQVmD4l.js} +1 -1
  52. package/dist/ExportPdf.cjs +1 -1
  53. package/dist/ExportPdf.js +1 -1
  54. package/dist/{ExportWord-Bj9q_cyK.js → ExportWord-BM4ogH_i.js} +1 -1
  55. package/dist/ExportWord.cjs +1 -1
  56. package/dist/ExportWord.js +1 -1
  57. package/dist/FontFamily.cjs +1 -1
  58. package/dist/FontFamily.js +1 -1
  59. package/dist/FontSize.cjs +1 -1
  60. package/dist/FontSize.js +1 -1
  61. package/dist/{Heading-BHOPoy3X.js → Heading-Bcrl3eKU.js} +1 -1
  62. package/dist/Heading.cjs +1 -1
  63. package/dist/Heading.js +1 -1
  64. package/dist/{Highlight-BxKQNHmT.cjs → Highlight-cO9V18Me.cjs} +1 -1
  65. package/dist/{Highlight-3SpxpGDw.js → Highlight-uXDlNgw3.js} +1 -1
  66. package/dist/Highlight.cjs +1 -1
  67. package/dist/Highlight.js +1 -1
  68. package/dist/{History-CmI6jUTV.js → History-BoHiw0Bn.js} +1 -1
  69. package/dist/History.cjs +1 -1
  70. package/dist/History.js +1 -1
  71. package/dist/{HorizontalRule-BeLfU92F.js → HorizontalRule-C7mAKdzL.js} +1 -1
  72. package/dist/HorizontalRule.cjs +1 -1
  73. package/dist/HorizontalRule.js +1 -1
  74. package/dist/{Iframe-D-WaYtdF.cjs → Iframe-DGL_MOLf.cjs} +1 -1
  75. package/dist/{Iframe-C0ozlEX4.js → Iframe-D_IjezyZ.js} +1 -1
  76. package/dist/Iframe.cjs +1 -1
  77. package/dist/Iframe.js +1 -1
  78. package/dist/Image.cjs +1 -1
  79. package/dist/Image.js +1 -1
  80. package/dist/{ImageCropper-BVl7AuRL.js → ImageCropper-ChOGJuHZ.js} +1 -1
  81. package/dist/{ImageCropper-DqHxEOtN.cjs → ImageCropper-DDWnFI2-.cjs} +1 -1
  82. package/dist/{ImageGif-BSVyqEv6.cjs → ImageGif-3dik7FeU.cjs} +1 -1
  83. package/dist/{ImageGif-BvthT-Lc.js → ImageGif-D_kKkBU5.js} +1 -1
  84. package/dist/ImageGif.cjs +1 -1
  85. package/dist/ImageGif.js +1 -1
  86. package/dist/{ImportWord-C6EnXbyR.js → ImportWord-CtFBb_n4.js} +1 -1
  87. package/dist/ImportWord.cjs +1 -1
  88. package/dist/ImportWord.js +1 -1
  89. package/dist/{Indent-BuzxHbMb.js → Indent-BIk98fDV.js} +1 -1
  90. package/dist/{Indent-eL-WNEF4.cjs → Indent-BVMl9zKV.cjs} +1 -1
  91. package/dist/Indent.cjs +1 -1
  92. package/dist/Indent.js +1 -1
  93. package/dist/{Italic-D8ZI09FZ.js → Italic-3mlmsxqN.js} +1 -1
  94. package/dist/Italic.cjs +1 -1
  95. package/dist/Italic.js +1 -1
  96. package/dist/{Katex-46mDLDuw.cjs → Katex-C2AcX_Un.cjs} +1 -1
  97. package/dist/{Katex-B-lo5eMz.js → Katex-DRPWO2AM.js} +1 -1
  98. package/dist/Katex.cjs +1 -1
  99. package/dist/Katex.js +1 -1
  100. package/dist/LineHeight.cjs +1 -1
  101. package/dist/LineHeight.js +1 -1
  102. package/dist/{Link-CDtipqwb.js → Link-D5y_0ekP.js} +1 -1
  103. package/dist/Link.cjs +1 -1
  104. package/dist/Link.js +1 -1
  105. package/dist/{LinkEditBlock-D0V9PwbF.cjs → LinkEditBlock-D78J06F7.cjs} +1 -1
  106. package/dist/MarkdownPaste.cjs +1 -1
  107. package/dist/MarkdownPaste.js +1 -1
  108. package/dist/{Mermaid-DDV93CBT.cjs → Mermaid-B6SL3cf5.cjs} +1 -1
  109. package/dist/{Mermaid-Cb8MiE1N.js → Mermaid-BaTtCsrD.js} +1 -1
  110. package/dist/Mermaid.cjs +1 -1
  111. package/dist/Mermaid.js +1 -1
  112. package/dist/{MoreMark-CJ3nTD1T.js → MoreMark-Bfsa3STU.js} +1 -1
  113. package/dist/MoreMark.cjs +1 -1
  114. package/dist/MoreMark.js +1 -1
  115. package/dist/OrderedList.cjs +1 -1
  116. package/dist/OrderedList.js +1 -1
  117. package/dist/{ReasonDocs-BliNN1Tt.cjs → ReasonDocs-Bjefr26w.cjs} +1 -1
  118. package/dist/{ReasonDocs-4vxZ3zY7.js → ReasonDocs-_hTAa8-q.js} +1 -1
  119. package/dist/{RichTextProvider-Dl77gVJI.cjs → RichTextProvider-BuTrDlZY.cjs} +1 -1
  120. package/dist/{RichTextProvider-E6rbc_J2.js → RichTextProvider-D9EtjDKS.js} +1 -1
  121. package/dist/SearchAndReplace.cjs +1 -1
  122. package/dist/SearchAndReplace.js +1 -1
  123. package/dist/{SlashCommand-DtlUkwyM.js → SlashCommand-Cg-Rvv3o.js} +1 -1
  124. package/dist/SlashCommand.js +1 -1
  125. package/dist/{Strike-CWYl45VK.js → Strike-CSxbYwpk.js} +1 -1
  126. package/dist/Strike.cjs +1 -1
  127. package/dist/Strike.js +1 -1
  128. package/dist/{Table-DCLsW5DJ.js → Table-CFcOg-4n.js} +1 -1
  129. package/dist/{Table-C9RAHNEk.cjs → Table-Do_kTawS.cjs} +1 -1
  130. package/dist/Table.cjs +1 -1
  131. package/dist/Table.js +1 -1
  132. package/dist/TaskList.cjs +1 -1
  133. package/dist/TaskList.js +1 -1
  134. package/dist/{TextAlign-D4UgbJ7F.cjs → TextAlign-CcsTIs-9.cjs} +1 -1
  135. package/dist/{TextAlign-9ezg8E99.js → TextAlign-Dun3_Ozv.js} +1 -1
  136. package/dist/TextAlign.cjs +1 -1
  137. package/dist/TextAlign.js +1 -1
  138. package/dist/TextDirection.cjs +1 -1
  139. package/dist/TextDirection.js +1 -1
  140. package/dist/{TextUnderline-C5A078R0.js → TextUnderline-Cqm5NQVW.js} +1 -1
  141. package/dist/TextUnderline.cjs +1 -1
  142. package/dist/TextUnderline.js +1 -1
  143. package/dist/{Twitter-D7ulyHFD.cjs → Twitter-B4IYTs3E.cjs} +1 -1
  144. package/dist/{Twitter-ByGJ4v1K.js → Twitter-CZHAICpz.js} +1 -1
  145. package/dist/Twitter.cjs +1 -1
  146. package/dist/Twitter.js +1 -1
  147. package/dist/{Video-hhw77FP4.js → Video-5nw_Zeob.js} +1 -1
  148. package/dist/{Video-ConJGjxP.cjs → Video-CtGR5VVD.cjs} +1 -1
  149. package/dist/Video.cjs +1 -1
  150. package/dist/Video.js +1 -1
  151. package/dist/WordCount.cjs +1 -1
  152. package/dist/WordCount.js +1 -1
  153. package/dist/bubble-BhkjoWdo.js +79 -0
  154. package/dist/bubble.cjs +1 -1
  155. package/dist/bubble.js +1 -1
  156. package/dist/{cdn-loader-BGIuN138-wkFA6jnE.cjs → cdn-loader-BGIuN138-7PrAg-Ef.cjs} +1 -1
  157. package/dist/docs-agent.cjs +1 -1
  158. package/dist/docs-agent.js +1 -1
  159. package/dist/editor-kit.cjs +1 -1
  160. package/dist/editor-kit.js +1 -1
  161. package/dist/editorConfig-BR7z-P0e.js +18 -0
  162. package/dist/editorConfig-CHBSp2KG.cjs +1 -0
  163. package/dist/extensions/Ai/Ai.d.ts +22 -5
  164. package/dist/extensions/Ai/commands.d.ts +6 -1
  165. package/dist/extensions/Ai/components/AiMenu.d.ts +6 -5
  166. package/dist/extensions/Ai/components/RichTextAi.d.ts +12 -0
  167. package/dist/extensions/Ai/index.d.ts +9 -3
  168. package/dist/extensions/Ai/lib/completionToContent.d.ts +35 -0
  169. package/dist/extensions/Ai/lib/createStreamingCompletion.d.ts +27 -0
  170. package/dist/extensions/Ai/lib/prompt.d.ts +38 -0
  171. package/dist/extensions/Ai/lib/sanitizeCompletion.d.ts +37 -0
  172. package/dist/extensions/Ai/types.d.ts +47 -3
  173. package/dist/index.cjs +1 -1
  174. package/dist/index.js +1 -1
  175. package/dist/marked.esm-B7mQ2Kzc.cjs +1 -0
  176. package/dist/marked.esm-CNm6O672.js +1 -0
  177. package/dist/{react-BQVDEMs2.cjs → react-Bfe0Tko8.cjs} +1 -1
  178. package/dist/reason-docs.cjs +1 -1
  179. package/dist/reason-docs.js +1 -1
  180. package/dist/{reason-toolbar-skin-9xQLtzeK.js → reason-toolbar-skin-BNYK97ET.js} +1 -1
  181. package/dist/{reason-toolbar-skin-DyYu9ywU.cjs → reason-toolbar-skin-CD4T53He.cjs} +1 -1
  182. package/dist/style.css +1 -1
  183. package/dist/useButtonProps-BBiR6DPI.cjs +1 -0
  184. package/dist/useButtonProps-Codtb0k0.js +1 -0
  185. package/package.json +1 -1
  186. package/dist/Ai-BGpnAE8s.js +0 -1
  187. package/dist/Ai-CORhNCSN.cjs +0 -1
  188. package/dist/BubbleMenus-QlttKSIN.cjs +0 -1
  189. package/dist/BubbleMenus-mwxYB3IU.js +0 -195
  190. package/dist/MarkdownPaste-C5jQ33SR.js +0 -1
  191. package/dist/bubble-CpeBzXMe.js +0 -78
  192. package/dist/editorConfig-D-Tlrdwj.js +0 -18
  193. package/dist/editorConfig-Du7YaEDm.cjs +0 -1
  194. package/dist/useButtonProps-BFfsKvCi.cjs +0 -1
  195. package/dist/useButtonProps-BZwO1Of-.js +0 -1
@@ -1 +0,0 @@
1
- const e=require("./rolldown-runtime-BeavJI0R.cjs"),t=require("./locales-DRkmn37v.cjs"),n=require("./dist-GxnWmQlw.cjs");let r=require("@tiptap/react"),o=require("react"),u=e.__toESM(o,1);function i(){return function(e){const{editor:t}=(0,r.useCurrentEditor)(),n=u.useMemo(()=>e||t,[e,t]);return(0,r.useEditorState)({editor:n,selector:e=>e.editor?{editor:e.editor,editorState:e.editor.state,canCommand:e.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}})||{editor:null}}().editor}o=e.__toESM(o);var s=n.y(!1);function a(){return n.b(s)}function c(){return n.S(s)}var f=()=>!1;function d(e=f){const t=a(),[n,r]=(0,u.useState)(()=>{const t=e();return"boolean"==typeof t?!t:t}),o=i();return(0,u.useEffect)(()=>{if(!o||!e)return;const t=()=>{const t=e();r("boolean"==typeof t?!t:t)};return t(),o.on("selectionUpdate",t),o.on("transaction",t),()=>{o.off("selectionUpdate",t),o.off("transaction",t)}},[o,e]),{disabled:(0,u.useMemo)(()=>!t||!o||"boolean"==typeof n&&n,[t,o,n]),dataState:n,editorDisabled:(0,u.useMemo)(()=>!t||!o,[t,o])}}function l(e=f){const t=a(),[n,r]=(0,u.useState)({}),[o,s]=(0,u.useState)(e()),c=i();return(0,u.useEffect)(()=>{if(!c||!e)return;const t=()=>{s(e())};return t(),c.on("selectionUpdate",t),()=>{c.off("selectionUpdate",t)}},[n,c,e]),{disabled:(0,u.useMemo)(()=>!t||!c,[t,c]),dataState:o,editorDisabled:(0,u.useMemo)(()=>!t||!c,[t,c]),update:()=>r({})}}function p(e){const t=i();return(0,u.useMemo)(()=>t?t.extensionManager.extensions.find(t=>t.name===e):null,[t,e])}function b(e,t,n){return e<t?t:e>n?n:e}function m(e,t="px"){if(!e)return e;const n=(e=>"number"==typeof e)(e)?String(e):e,r=Number.parseFloat(n),o=n.match(/[%a-z]+$/i),u=o?o[0]:t;return Number.isNaN(r)?e:r+u}function x(e,t){if(!e)return!1;const{extensions:n=[]}=e?.extensionManager??{};return!!n.find(e=>e.name===t)}function g(e){return e.map(e=>"string"==typeof e?{value:e,name:e}:e)}function y(e){const n=i(),r=p(e),{t:o}=t.useLocale();return(0,u.useMemo)(()=>{if(!n||!r||!o)return null;const{button:e}=r.options;return e&&"function"==typeof e?e({editor:n,extension:r,t:o}):null},[n,r,o])}Object.defineProperty(exports,"clamp",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"ensureNameValueOptions",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"getCssUnitWithDefault",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"hasExtension",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"useActive",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"useButtonProps",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"useEditableEditor",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"useEditorInstance",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"useExtension",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"useStoreEditableEditor",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"useToggleActive",{enumerable:!0,get:function(){return l}});
@@ -1 +0,0 @@
1
- import{n as t}from"./locales-rT_qjKW9.js";import{a as n,r as e,t as o}from"./dist-fiA_WbbM.js";import{useCurrentEditor as r,useEditorState as a}from"@tiptap/react";import*as i from"react";import{useEffect as s,useMemo as u,useState as c}from"react";function f(){return function(t){const{editor:n}=r(),e=i.useMemo(()=>t||n,[t,n]);return a({editor:e,selector:t=>t.editor?{editor:t.editor,editorState:t.editor.state,canCommand:t.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}})||{editor:null}}().editor}var d=n(!1);function l(){return e(d)}function m(){return o(d)}var p=()=>!1;function b(t=p){const n=l(),[e,o]=c(()=>{const n=t();return"boolean"==typeof n?!n:n}),r=f();return s(()=>{if(!r||!t)return;const n=()=>{const n=t();o("boolean"==typeof n?!n:n)};return n(),r.on("selectionUpdate",n),r.on("transaction",n),()=>{r.off("selectionUpdate",n),r.off("transaction",n)}},[r,t]),{disabled:u(()=>!n||!r||"boolean"==typeof e&&e,[n,r,e]),dataState:e,editorDisabled:u(()=>!n||!r,[n,r])}}function x(t=p){const n=l(),[e,o]=c({}),[r,a]=c(t()),i=f();return s(()=>{if(!i||!t)return;const n=()=>{a(t())};return n(),i.on("selectionUpdate",n),()=>{i.off("selectionUpdate",n)}},[e,i,t]),{disabled:u(()=>!n||!i,[n,i]),dataState:r,editorDisabled:u(()=>!n||!i,[n,i]),update:()=>o({})}}function y(t){const n=f();return u(()=>n?n.extensionManager.extensions.find(n=>n.name===t):null,[n,t])}function v(t,n,e){return t<n?n:t>e?e:t}function S(t,n="px"){if(!t)return t;const e=(t=>"number"==typeof t)(t)?String(t):t,o=Number.parseFloat(e),r=e.match(/[%a-z]+$/i),a=r?r[0]:n;return Number.isNaN(o)?t:o+a}function g(t,n){if(!t)return!1;const{extensions:e=[]}=t?.extensionManager??{};return!!e.find(t=>t.name===n)}function N(t){return t.map(t=>"string"==typeof t?{value:t,name:t}:t)}function U(n){const e=f(),o=y(n),{t:r}=t();return u(()=>{if(!e||!o||!r)return null;const{button:t}=o.options;return t&&"function"==typeof t?t({editor:e,extension:o,t:r}):null},[e,o,r])}export{g as a,x as c,f as d,S as i,l,v as n,y as o,N as r,b as s,U as t,m as u};