@bikdotai/bik-component-library 0.0.823 → 0.0.824

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 (149) hide show
  1. package/dist/cjs/components/adbanner/AdBanner.js.map +1 -0
  2. package/dist/cjs/components/{banner → adbanner}/Banner.styled.js +13 -9
  3. package/dist/cjs/components/adbanner/Banner.styled.js.map +1 -0
  4. package/dist/cjs/components/adbanner/BannerInline.js.map +1 -0
  5. package/dist/cjs/components/adbanner/BannerWithImage.js.map +1 -0
  6. package/dist/cjs/components/adbanner/CardBanner.js.map +1 -0
  7. package/dist/cjs/components/adbanner/CardBannerWithImage.js.map +1 -0
  8. package/dist/cjs/components/adbanner/model.js.map +1 -0
  9. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +1 -1
  10. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
  12. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +2 -2
  14. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  15. package/dist/cjs/editor/BikEditor.js +1 -1
  16. package/dist/cjs/editor/BikEditor.js.map +1 -1
  17. package/dist/cjs/editor/BikEditor.styles.js +143 -5
  18. package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
  19. package/dist/cjs/editor/BikEditor.types.js.map +1 -1
  20. package/dist/cjs/editor/BikEditor.utils.js +3 -2
  21. package/dist/cjs/editor/BikEditor.utils.js.map +1 -1
  22. package/dist/cjs/editor/extensions/buildExtensions.js +3 -1
  23. package/dist/cjs/editor/extensions/buildExtensions.js.map +1 -1
  24. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js +4 -0
  25. package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -0
  26. package/dist/cjs/editor/extensions/jsonHighlight/tokenizeJson.js +2 -0
  27. package/dist/cjs/editor/extensions/jsonHighlight/tokenizeJson.js.map +1 -0
  28. package/dist/cjs/icons/Actions/Common actions/ProductTour.js +2 -0
  29. package/dist/cjs/icons/Actions/Common actions/ProductTour.js.map +1 -0
  30. package/dist/cjs/icons/Actions/Common actions/RestApi.js +2 -0
  31. package/dist/cjs/icons/Actions/Common actions/RestApi.js.map +1 -0
  32. package/dist/cjs/icons/Actions/Common actions/Save.js +2 -0
  33. package/dist/cjs/icons/Actions/Common actions/Save.js.map +1 -0
  34. package/dist/cjs/icons/Actions/Common actions/Shortcut.js +2 -0
  35. package/dist/cjs/icons/Actions/Common actions/Shortcut.js.map +1 -0
  36. package/dist/cjs/icons/BIK AI specific/WandSparkles.js +2 -0
  37. package/dist/cjs/icons/BIK AI specific/WandSparkles.js.map +1 -0
  38. package/dist/cjs/icons/BIK AI specific/Webhook.js +2 -0
  39. package/dist/cjs/icons/BIK AI specific/Webhook.js.map +1 -0
  40. package/dist/cjs/icons/Informational/Store related/TicketForm.js +2 -0
  41. package/dist/cjs/icons/Informational/Store related/TicketForm.js.map +1 -0
  42. package/dist/cjs/icons/Legacy - Bikayi specific/Services/LoudSpeaker.js +2 -0
  43. package/dist/cjs/icons/Legacy - Bikayi specific/Services/LoudSpeaker.js.map +1 -0
  44. package/dist/cjs/icons/index.js +1 -1
  45. package/dist/cjs/index.js +1 -1
  46. package/dist/esm/components/adbanner/AdBanner.js.map +1 -0
  47. package/dist/esm/components/{banner → adbanner}/Banner.styled.js +18 -14
  48. package/dist/esm/components/adbanner/Banner.styled.js.map +1 -0
  49. package/dist/esm/components/adbanner/BannerInline.js.map +1 -0
  50. package/dist/esm/components/adbanner/BannerWithImage.js.map +1 -0
  51. package/dist/esm/components/adbanner/CardBanner.js.map +1 -0
  52. package/dist/esm/components/adbanner/CardBannerWithImage.js.map +1 -0
  53. package/dist/esm/components/adbanner/model.js.map +1 -0
  54. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +24 -24
  55. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  56. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +98 -101
  57. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  58. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +5 -7
  59. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +40 -37
  60. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  61. package/dist/esm/editor/BikEditor.js +247 -181
  62. package/dist/esm/editor/BikEditor.js.map +1 -1
  63. package/dist/esm/editor/BikEditor.styles.d.ts +9 -0
  64. package/dist/esm/editor/BikEditor.styles.js +147 -7
  65. package/dist/esm/editor/BikEditor.styles.js.map +1 -1
  66. package/dist/esm/editor/BikEditor.types.d.ts +76 -0
  67. package/dist/esm/editor/BikEditor.types.js.map +1 -1
  68. package/dist/esm/editor/BikEditor.utils.d.ts +15 -1
  69. package/dist/esm/editor/BikEditor.utils.js +155 -92
  70. package/dist/esm/editor/BikEditor.utils.js.map +1 -1
  71. package/dist/esm/editor/extensions/buildExtensions.d.ts +1 -1
  72. package/dist/esm/editor/extensions/buildExtensions.js +86 -55
  73. package/dist/esm/editor/extensions/buildExtensions.js.map +1 -1
  74. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.d.ts +14 -0
  75. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js +132 -0
  76. package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -0
  77. package/dist/esm/editor/extensions/jsonHighlight/tokenizeJson.d.ts +18 -0
  78. package/dist/esm/editor/extensions/jsonHighlight/tokenizeJson.js +21 -0
  79. package/dist/esm/editor/extensions/jsonHighlight/tokenizeJson.js.map +1 -0
  80. package/dist/esm/editor/index.d.ts +1 -1
  81. package/dist/esm/icons/Actions/Common actions/ProductTour.d.ts +7 -0
  82. package/dist/esm/icons/Actions/Common actions/ProductTour.js +51 -0
  83. package/dist/esm/icons/Actions/Common actions/ProductTour.js.map +1 -0
  84. package/dist/esm/icons/Actions/Common actions/RestApi.d.ts +7 -0
  85. package/dist/esm/icons/Actions/Common actions/RestApi.js +29 -0
  86. package/dist/esm/icons/Actions/Common actions/RestApi.js.map +1 -0
  87. package/dist/esm/icons/Actions/Common actions/Save.d.ts +7 -0
  88. package/dist/esm/icons/Actions/Common actions/Save.js +40 -0
  89. package/dist/esm/icons/Actions/Common actions/Save.js.map +1 -0
  90. package/dist/esm/icons/Actions/Common actions/Shortcut.d.ts +7 -0
  91. package/dist/esm/icons/Actions/Common actions/Shortcut.js +40 -0
  92. package/dist/esm/icons/Actions/Common actions/Shortcut.js.map +1 -0
  93. package/dist/esm/icons/Actions/Common actions/index.d.ts +4 -0
  94. package/dist/esm/icons/BIK AI specific/WandSparkles.d.ts +7 -0
  95. package/dist/esm/icons/BIK AI specific/WandSparkles.js +39 -0
  96. package/dist/esm/icons/BIK AI specific/WandSparkles.js.map +1 -0
  97. package/dist/esm/icons/BIK AI specific/Webhook.d.ts +7 -0
  98. package/dist/esm/icons/BIK AI specific/Webhook.js +32 -0
  99. package/dist/esm/icons/BIK AI specific/Webhook.js.map +1 -0
  100. package/dist/esm/icons/BIK AI specific/index.d.ts +2 -0
  101. package/dist/esm/icons/Informational/Store related/TicketForm.d.ts +7 -0
  102. package/dist/esm/icons/Informational/Store related/TicketForm.js +65 -0
  103. package/dist/esm/icons/Informational/Store related/TicketForm.js.map +1 -0
  104. package/dist/esm/icons/Informational/Store related/index.d.ts +1 -0
  105. package/dist/esm/icons/Legacy - Bikayi specific/Services/LoudSpeaker.d.ts +7 -0
  106. package/dist/esm/icons/Legacy - Bikayi specific/Services/LoudSpeaker.js +35 -0
  107. package/dist/esm/icons/Legacy - Bikayi specific/Services/LoudSpeaker.js.map +1 -0
  108. package/dist/esm/icons/Legacy - Bikayi specific/Services/index.d.ts +1 -0
  109. package/dist/esm/icons/index.d.ts +4 -4
  110. package/dist/esm/icons/index.js +284 -268
  111. package/dist/esm/icons/index.js.map +1 -1
  112. package/dist/esm/index.d.ts +1 -1
  113. package/dist/esm/index.js +2 -2
  114. package/package.json +1 -1
  115. package/dist/cjs/components/banner/AdBanner.js.map +0 -1
  116. package/dist/cjs/components/banner/Banner.styled.js.map +0 -1
  117. package/dist/cjs/components/banner/BannerInline.js.map +0 -1
  118. package/dist/cjs/components/banner/BannerWithImage.js.map +0 -1
  119. package/dist/cjs/components/banner/CardBanner.js.map +0 -1
  120. package/dist/cjs/components/banner/CardBannerWithImage.js.map +0 -1
  121. package/dist/cjs/components/banner/model.js.map +0 -1
  122. package/dist/esm/components/banner/AdBanner.js.map +0 -1
  123. package/dist/esm/components/banner/Banner.stories.d.ts +0 -39
  124. package/dist/esm/components/banner/Banner.styled.js.map +0 -1
  125. package/dist/esm/components/banner/BannerInline.js.map +0 -1
  126. package/dist/esm/components/banner/BannerWithImage.js.map +0 -1
  127. package/dist/esm/components/banner/CardBanner.js.map +0 -1
  128. package/dist/esm/components/banner/CardBannerWithImage.js.map +0 -1
  129. package/dist/esm/components/banner/model.js.map +0 -1
  130. /package/dist/cjs/components/{banner → adbanner}/AdBanner.js +0 -0
  131. /package/dist/cjs/components/{banner → adbanner}/BannerInline.js +0 -0
  132. /package/dist/cjs/components/{banner → adbanner}/BannerWithImage.js +0 -0
  133. /package/dist/cjs/components/{banner → adbanner}/CardBanner.js +0 -0
  134. /package/dist/cjs/components/{banner → adbanner}/CardBannerWithImage.js +0 -0
  135. /package/dist/cjs/components/{banner → adbanner}/model.js +0 -0
  136. /package/dist/esm/components/{banner → adbanner}/AdBanner.d.ts +0 -0
  137. /package/dist/esm/components/{banner → adbanner}/AdBanner.js +0 -0
  138. /package/dist/esm/components/{banner → adbanner}/Banner.styled.d.ts +0 -0
  139. /package/dist/esm/components/{banner → adbanner}/BannerInline.d.ts +0 -0
  140. /package/dist/esm/components/{banner → adbanner}/BannerInline.js +0 -0
  141. /package/dist/esm/components/{banner → adbanner}/BannerWithImage.d.ts +0 -0
  142. /package/dist/esm/components/{banner → adbanner}/BannerWithImage.js +0 -0
  143. /package/dist/esm/components/{banner → adbanner}/CardBanner.d.ts +0 -0
  144. /package/dist/esm/components/{banner → adbanner}/CardBanner.js +0 -0
  145. /package/dist/esm/components/{banner → adbanner}/CardBannerWithImage.d.ts +0 -0
  146. /package/dist/esm/components/{banner → adbanner}/CardBannerWithImage.js +0 -0
  147. /package/dist/esm/components/{banner → adbanner}/index.d.ts +0 -0
  148. /package/dist/esm/components/{banner → adbanner}/model.d.ts +0 -0
  149. /package/dist/esm/components/{banner → adbanner}/model.js +0 -0
@@ -1,5 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../node_modules/prosemirror-model/dist/index.js"),A=require("./extensions/plainClipboard/pasteUtils.js");function h(e){if(!e||typeof document>"u")return e;const t=document.createElement("div");return t.innerHTML=e,t.querySelectorAll("span").forEach(n=>{const i=n.getAttribute("data-type");if(n.hasAttribute("style")||n.hasAttribute("data-variable")||i!==null&&i.startsWith("mention"))return;const r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);r.removeChild(n)}}),t.querySelectorAll("p").forEach(n=>{n.querySelectorAll("br").length===1&&(n.textContent??"").trim()===""&&(n.innerHTML="")}),t.innerHTML}function u(e){const t=document.createElement("div");t.innerHTML=e;const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let i;for(;i=n.nextNode();)i.nodeValue&&i.nodeValue.includes(" ")&&(i.nodeValue=i.nodeValue.replace(/ {2}/g,"  "));const r=t.querySelectorAll("p");for(const s of Array.from(r)){if(s.childNodes.length===0){s.appendChild(document.createElement("br"));continue}s.lastChild instanceof HTMLBRElement&&s.childNodes.length>1&&s.appendChild(document.createElement("br"))}return t.innerHTML}function S(e,t){const n=h(t),i=document.createElement("div");i.innerHTML=n;const r=a.DOMParser.fromSchema(e.schema).parseSlice(i,{preserveWhitespace:!0});if(r.size===0)return;const{from:s,to:c}=e.state.selection,o=e.state.tr.replaceRange(s,c,r);e.view.dispatch(o)}const d=e=>`<div data-section-divider="${e}" style="display:none;height:0;line-height:0;overflow:hidden;"></div>`;function b(e,t){let n=e;for(const i of t)n+=d(i.id)+i.content;return n}function v(e){return e?g(e).get("body")??e:""}function x(e){if(!e)return"";const t=v(e);return e.substring(t.length)}function g(e){const t=new Map,n=/<div[^>]*data-section-divider="([^"]*)[^>]*>\s*<\/div>/g,i=[];let r;for(;(r=n.exec(e))!==null;)i.push({id:r[1],index:r.index,endIndex:r.index+r[0].length});if(i.length===0)return t.set("body",e),t;t.set("body",e.slice(0,i[0].index));for(let s=0;s<i.length;s++){const c=i[s].endIndex,o=s+1<i.length?i[s+1].index:e.length;t.set(i[s].id,e.slice(c,o))}return t}function p(e,t){const n=f(e,t);if(n===-1)return{html:"",text:"",isEmpty:!0,characterCount:0};const i=m(e,t),r=e.state.doc.slice(n,i),s=document.createElement("div"),c=a.DOMSerializer.fromSchema(e.schema);s.appendChild(c.serializeFragment(r.content));const o=u(s.innerHTML),l=s.textContent??"";return{html:o,text:l,isEmpty:!l.trim(),characterCount:l.length}}function H(e,t){const n=document.createElement("div");return n.innerHTML=t,a.DOMParser.fromSchema(e.schema).parse(n,{preserveWhitespace:!0}).content}function C(e,t,n){const i=f(e,t);if(i===-1){const l=e.state.doc.content.size,y=d(t)+n;e.commands.insertContentAt(l,y,{updateSelection:!1});return}const r=m(e,t),s=H(e,n),{tr:c}=e.state,o=t==="body"?0:i;c.replaceWith(o,r,s),c.setMeta("addToHistory",!1),e.view.dispatch(c)}function E(e){return p(e,"body")}function T(e){return{bold:e.isActive("bold"),italic:e.isActive("italic"),underline:e.isActive("underline"),strike:e.isActive("strike"),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote"),codeBlock:e.isActive("codeBlock"),link:(()=>{if(e.isActive("link"))return{href:e.getAttributes("link").href??""};const{$from:t}=e.state.selection;if(t.pos>0){const i=t.doc.resolve(t.pos).marks().find(r=>r.type.name==="link");if(i)return{href:i.attrs.href??""};{const s=t.nodeBefore?.marks.find(c=>c.type.name==="link");if(s)return{href:s.attrs.href??""}}}return null})(),textAlign:e.isActive({textAlign:"center"})?"center":e.isActive({textAlign:"right"})?"right":e.isActive({textAlign:"justify"})?"justify":e.isActive({textAlign:"left"})?"left":null,fontFamily:e.getAttributes("textStyle").fontFamily??null,fontSize:e.getAttributes("textStyle").fontSize??null,color:e.getAttributes("textStyle").color??null,highlight:e.isActive("highlight")?e.getAttributes("highlight").color??"default":null,superscript:e.isActive("superscript"),subscript:e.isActive("subscript")}}function k(e){const t=u(e.getHTML()),n=A.normalizeHardBreaks(e.state.doc.content),i=e.schema.node("doc",null,n),r=i.textBetween(0,i.content.size,`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../node_modules/prosemirror-model/dist/index.js"),x=require("./extensions/plainClipboard/pasteUtils.js");function h(e){if(!e||typeof document>"u")return e;const t=document.createElement("div");return t.innerHTML=e,t.querySelectorAll("span").forEach(i=>{const n=i.getAttribute("data-type");if(i.hasAttribute("style")||i.hasAttribute("data-variable")||n!==null&&n.startsWith("mention"))return;const r=i.parentNode;if(r){for(;i.firstChild;)r.insertBefore(i.firstChild,i);r.removeChild(i)}}),t.querySelectorAll("p").forEach(i=>{i.querySelectorAll("br").length===1&&(i.textContent??"").trim()===""&&(i.innerHTML="")}),t.innerHTML}function u(e){const t=document.createElement("div");t.innerHTML=e;const i=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let n;for(;n=i.nextNode();)n.nodeValue&&n.nodeValue.includes(" ")&&(n.nodeValue=n.nodeValue.replace(/ {2}/g,"  "));const r=t.querySelectorAll("p");for(const o of Array.from(r)){if(o.childNodes.length===0){o.appendChild(document.createElement("br"));continue}o.lastChild instanceof HTMLBRElement&&o.childNodes.length>1&&o.appendChild(document.createElement("br"))}return t.innerHTML}function S(e,t){const i=h(t),n=document.createElement("div");n.innerHTML=i;const r=a.DOMParser.fromSchema(e.schema).parseSlice(n,{preserveWhitespace:!0});if(r.size===0)return;const{from:o,to:c}=e.state.selection,s=e.state.tr.replaceRange(o,c,r);e.view.dispatch(s)}const d=e=>`<div data-section-divider="${e}" style="display:none;height:0;line-height:0;overflow:hidden;"></div>`;function A(e,t){let i=e;for(const n of t)i+=d(n.id)+n.content;return i}function p(e){return e?g(e).get("body")??e:""}function C(e){if(!e)return"";const t=p(e);return e.substring(t.length)}function g(e){const t=new Map,i=/<div[^>]*data-section-divider="([^"]*)[^>]*>\s*<\/div>/g,n=[];let r;for(;(r=i.exec(e))!==null;)n.push({id:r[1],index:r.index,endIndex:r.index+r[0].length});if(n.length===0)return t.set("body",e),t;t.set("body",e.slice(0,n[0].index));for(let o=0;o<n.length;o++){const c=n[o].endIndex,s=o+1<n.length?n[o+1].index:e.length;t.set(n[o].id,e.slice(c,s))}return t}function v(e,t){const i=f(e,t);if(i===-1)return{html:"",text:"",isEmpty:!0,characterCount:0};const n=m(e,t),r=e.state.doc.slice(i,n),o=document.createElement("div"),c=a.DOMSerializer.fromSchema(e.schema);o.appendChild(c.serializeFragment(r.content));const s=u(o.innerHTML),l=o.textContent??"";return{html:s,text:l,isEmpty:!l.trim(),characterCount:l.length}}function H(e,t){const i=document.createElement("div");return i.innerHTML=t,a.DOMParser.fromSchema(e.schema).parse(i,{preserveWhitespace:!0}).content}function k(e,t,i){const n=f(e,t);if(n===-1){const l=e.state.doc.content.size,y=d(t)+i;e.commands.insertContentAt(l,y,{updateSelection:!1});return}const r=m(e,t),o=H(e,i),{tr:c}=e.state,s=t==="body"?0:n;c.replaceWith(s,r,o),c.setMeta("addToHistory",!1),e.view.dispatch(c)}function T(e){return v(e,"body")}function E(e){return{bold:e.isActive("bold"),italic:e.isActive("italic"),underline:e.isActive("underline"),strike:e.isActive("strike"),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote"),codeBlock:e.isActive("codeBlock"),link:(()=>{if(e.isActive("link"))return{href:e.getAttributes("link").href??""};const{$from:t}=e.state.selection;if(t.pos>0){const n=t.doc.resolve(t.pos).marks().find(r=>r.type.name==="link");if(n)return{href:n.attrs.href??""};{const o=t.nodeBefore?.marks.find(c=>c.type.name==="link");if(o)return{href:o.attrs.href??""}}}return null})(),textAlign:e.isActive({textAlign:"center"})?"center":e.isActive({textAlign:"right"})?"right":e.isActive({textAlign:"justify"})?"justify":e.isActive({textAlign:"left"})?"left":null,fontFamily:e.getAttributes("textStyle").fontFamily??null,fontSize:e.getAttributes("textStyle").fontSize??null,color:e.getAttributes("textStyle").color??null,highlight:e.isActive("highlight")?e.getAttributes("highlight").color??"default":null,superscript:e.isActive("superscript"),subscript:e.isActive("subscript")}}function B(e){const t=u(e.getHTML()),i=x.normalizeHardBreaks(e.state.doc.content),n=e.schema.node("doc",null,i),r=n.textBetween(0,n.content.size,`
2
2
 
3
3
  `,`
4
- `);return{html:t,text:r,isEmpty:e.isEmpty,characterCount:r.length}}function f(e,t){if(t==="body")return 1;let n=-1;return e.state.doc.descendants((i,r)=>{if(n!==-1)return!1;i.type.name==="sectionDivider"&&i.attrs.sectionId===t&&(n=r+i.nodeSize)}),n}function m(e,t){const n=e.state.doc,i=n.content.size;if(t==="body"){let c=-1;return n.descendants((o,l)=>{if(c!==-1)return!1;o.type.name==="sectionDivider"&&(c=l)}),c!==-1?c:i}let r=!1,s=-1;return n.descendants((c,o)=>{if(s!==-1)return!1;if(!r)return c.type.name==="sectionDivider"&&c.attrs.sectionId===t&&(r=!0),!1;c.type.name==="sectionDivider"&&(s=o)}),s!==-1?s:i}exports.SECTION_DIVIDER_HTML=d;exports.buildSectionedContent=b;exports.extractActiveFormats=T;exports.extractAllSectionsFromHtml=g;exports.extractBodyContent=E;exports.extractContent=k;exports.extractSectionContent=p;exports.findSectionEndPos=m;exports.findSectionStartPos=f;exports.getBodyHtml=v;exports.getSectionsHtml=x;exports.insertInlineHtml=S;exports.normalizeHtml=h;exports.setSectionContentInEditor=C;exports.toPortableHtml=u;
4
+ `);return{html:t,text:r,isEmpty:e.isEmpty,characterCount:r.length}}function f(e,t){if(t==="body")return 1;let i=-1;return e.state.doc.descendants((n,r)=>{if(i!==-1)return!1;n.type.name==="sectionDivider"&&n.attrs.sectionId===t&&(i=r+n.nodeSize)}),i}function m(e,t){const i=e.state.doc,n=i.content.size;if(t==="body"){let c=-1;return i.descendants((s,l)=>{if(c!==-1)return!1;s.type.name==="sectionDivider"&&(c=l)}),c!==-1?c:n}let r=!1,o=-1;return i.descendants((c,s)=>{if(o!==-1)return!1;if(!r)return c.type.name==="sectionDivider"&&c.attrs.sectionId===t&&(r=!0),!1;c.type.name==="sectionDivider"&&(o=s)}),o!==-1?o:n}function M(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function b(e){return`<pre><code>${M(e??"")}</code></pre>`}function P(e){let t="",i=!1;return e.state.doc.descendants(n=>{if(i)return!1;if(n.type.name==="codeBlock")return t=n.textContent,i=!0,!1}),t}function L(e,t){e.commands.setContent(b(t),{emitUpdate:!0})}function z(e,t){const n=e.slice(0,Math.max(0,t)).split(`
5
+ `);return{line:n.length,column:(n[n.length-1]?.length??0)+1}}function D(e,t){const i=e.replace(/\s*in JSON at position[\s\S]*$/i,"").trim()||e,n=e.match(/line (\d+) column (\d+)/i);if(n)return{message:i,line:Number(n[1]),column:Number(n[2])};const r=e.match(/position (\d+)/i);if(r){const{line:o,column:c}=z(t,Number(r[1]));return{message:i,line:o,column:c}}return{message:i,line:null,column:null}}function N(e){if(!e.trim())return{valid:!0,value:null,error:null,line:null,column:null};try{return{valid:!0,value:JSON.parse(e),error:null,line:null,column:null}}catch(t){const{message:i,line:n,column:r}=D(t.message,e);return{valid:!1,value:null,error:i,line:n,column:r}}}exports.SECTION_DIVIDER_HTML=d;exports.buildJsonCodeBlockHtml=b;exports.buildSectionedContent=A;exports.extractActiveFormats=E;exports.extractAllSectionsFromHtml=g;exports.extractBodyContent=T;exports.extractContent=B;exports.extractSectionContent=v;exports.findSectionEndPos=m;exports.findSectionStartPos=f;exports.getBodyHtml=p;exports.getCodeBlockText=P;exports.getSectionsHtml=C;exports.insertInlineHtml=S;exports.normalizeHtml=h;exports.parseJson=N;exports.setCodeBlockText=L;exports.setSectionContentInEditor=k;exports.toPortableHtml=u;
5
6
  //# sourceMappingURL=BikEditor.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BikEditor.utils.js","sources":["../../../src/editor/BikEditor.utils.ts"],"sourcesContent":["import { Editor } from '@tiptap/core';\nimport { DOMParser, DOMSerializer } from 'prosemirror-model';\nimport { EditorSnapshot, FormatState } from './BikEditor.types';\nimport { normalizeHardBreaks } from './extensions/plainClipboard/pasteUtils';\n\n// ---------------------------------------------------------------------------\n// HTML normalisation\n// ---------------------------------------------------------------------------\n\n/**\n * Normalise HTML before passing it to TipTap.\n *\n * 1. Unwrap style-less `<span>` wrappers (plain spans, and editor-cursor spans\n * like Quill's `<span class=\"ql-cursor\">`). Spans that carry inline styling\n * (`color` / `font-family` / `font-size` render as styled spans) or that\n * represent a `{{variable}}` token are PRESERVED — otherwise a setContent\n * round-trip would silently drop colour/font formatting that paste keeps.\n * 2. Collapse placeholder paragraphs (`<p><br></p>`) to `<p></p>`. ProseMirror\n * parses `<p></p>` as an empty paragraph and adds its own DOM `<br>` for the\n * cursor — one blank line, correct height. Leaving the source `<br>` would\n * create a `hard_break` child AND the cursor `<br>` → double-height blank line.\n *\n * Uses the DOM (regex cannot selectively pair span tags). `normalizeHtml` runs\n * in the component body for `initialContent`, so it is guarded for SSR: the\n * editor is created lazily on the client (`immediatelyRender: false`), meaning\n * the value is only parsed client-side and passing through on the server is safe.\n */\nexport function normalizeHtml(html: string): string {\n\tif (!html || typeof document === 'undefined') return html;\n\n\tconst container = document.createElement('div');\n\tcontainer.innerHTML = html;\n\n\tcontainer.querySelectorAll('span').forEach((span) => {\n\t\t// Keep schema-backed spans: styled spans, variables, and mention chips\n\t\t// (`data-type=\"mention…\"`). Stripping a mention span would drop the\n\t\t// `data-id`/`data-label`/`data-kind` the editor needs to reparse it.\n\t\tconst dataType = span.getAttribute('data-type');\n\t\tif (\n\t\t\tspan.hasAttribute('style') ||\n\t\t\tspan.hasAttribute('data-variable') ||\n\t\t\t(dataType !== null && dataType.startsWith('mention'))\n\t\t)\n\t\t\treturn;\n\t\tconst parent = span.parentNode;\n\t\tif (!parent) return;\n\t\twhile (span.firstChild) parent.insertBefore(span.firstChild, span);\n\t\tparent.removeChild(span);\n\t});\n\n\tcontainer.querySelectorAll('p').forEach((p) => {\n\t\tif (\n\t\t\tp.querySelectorAll('br').length === 1 &&\n\t\t\t(p.textContent ?? '').trim() === ''\n\t\t) {\n\t\t\tp.innerHTML = '';\n\t\t}\n\t});\n\n\treturn container.innerHTML;\n}\n\n/**\n * Make editor HTML portable across email clients and chat renderers.\n *\n * 1. Preserve consecutive spaces by converting every second space in a run\n * to `&nbsp;` (U+00A0). Standard HTML collapses adjacent regular spaces;\n * alternating with `&nbsp;` prevents that — same convention Gmail uses.\n * 2. Double a trailing `<br>` in content paragraphs so the blank line is\n * visible. A single trailing `<br>` before `</p>` is swallowed by most\n * email clients; `<br><br>` renders as a visible blank line (matches\n * Gmail's output).\n * 3. Convert empty `<p></p>` to `<p><br></p>` — email clients collapse\n * zero-height paragraphs without a `<br>`.\n */\nexport function toPortableHtml(html: string): string {\n\tconst div = document.createElement('div');\n\tdiv.innerHTML = html;\n\n\t// TreeWalker visits only text nodes, skipping HTML tags/attributes, so we safely\n\t// replace consecutive spaces with space + \\u00a0 (nbsp) to prevent email clients from collapsing them\n\tconst walker = document.createTreeWalker(div, NodeFilter.SHOW_TEXT);\n\tlet textNode: Text | null;\n\twhile ((textNode = walker.nextNode() as Text | null)) {\n\t\tif (textNode.nodeValue && textNode.nodeValue.includes(' ')) {\n\t\t\ttextNode.nodeValue = textNode.nodeValue.replace(/ {2}/g, '  ');\n\t\t}\n\t}\n\n\tconst blocks = div.querySelectorAll('p');\n\tfor (const p of Array.from(blocks)) {\n\t\tif (p.childNodes.length === 0) {\n\t\t\tp.appendChild(document.createElement('br'));\n\t\t\tcontinue;\n\t\t}\n\t\tconst last = p.lastChild;\n\t\tif (last instanceof HTMLBRElement && p.childNodes.length > 1) {\n\t\t\tp.appendChild(document.createElement('br'));\n\t\t}\n\t}\n\treturn div.innerHTML;\n}\n\n// ---------------------------------------------------------------------------\n// Inline content insertion\n// ---------------------------------------------------------------------------\n\n/**\n * Insert HTML at the current cursor position, merging the first paragraph\n * inline while preserving the block structure of subsequent paragraphs/lists.\n *\n * Uses `parseSlice` which returns an open-ended Slice — the first block merges\n * at the cursor, middle blocks stay intact, and the last block merges with any\n * text that follows the cursor.\n */\nexport function insertInlineHtml(editor: Editor, html: string): void {\n\tconst normalised = normalizeHtml(html);\n\tconst dom = document.createElement('div');\n\tdom.innerHTML = normalised;\n\tconst slice = DOMParser.fromSchema(editor.schema).parseSlice(dom, {\n\t\tpreserveWhitespace: true,\n\t});\n\n\tif (slice.size === 0) return;\n\n\tconst { from, to } = editor.state.selection;\n\tconst tr = editor.state.tr.replaceRange(from, to, slice);\n\teditor.view.dispatch(tr);\n}\n\n// ---------------------------------------------------------------------------\n// Section divider HTML\n// ---------------------------------------------------------------------------\n\nexport const SECTION_DIVIDER_HTML = (id: string) =>\n\t`<div data-section-divider=\"${id}\" style=\"display:none;height:0;line-height:0;overflow:hidden;\"></div>`;\n\n/**\n * Build initial HTML for an editor with one or more named sections below the body.\n * Each section is separated by an invisible divider node.\n *\n * @example\n * buildSectionedContent('<p>Body</p>', [\n * { id: 'signature', content: '<p>Alice</p>' },\n * { id: 'forwarded', content: '<p>--- fwd ---</p>' },\n * ])\n */\nexport function buildSectionedContent(\n\tbody: string,\n\tsections: Array<{ id: string; content: string }>,\n): string {\n\tlet html = body;\n\tfor (const s of sections) {\n\t\thtml += SECTION_DIVIDER_HTML(s.id) + s.content;\n\t}\n\treturn html;\n}\n\n// ---------------------------------------------------------------------------\n// Section extraction\n// ---------------------------------------------------------------------------\n\n/**\n * Parse the editor HTML into a Map of sectionId → raw HTML string.\n * The special key `'body'` always holds the content before the first divider.\n * Map iteration order matches document order.\n */\nexport function extractAllSections(editor: Editor): Map<string, string> {\n\treturn extractAllSectionsFromHtml(editor.getHTML());\n}\n\n/**\n * Extract just the body portion (everything before the first section divider)\n * from an HTML string produced by BikEditor. Safe to call on plain HTML too —\n * returns the full string when no dividers are present.\n */\nexport function getBodyHtml(html: string): string {\n\tif (!html) return '';\n\tconst sections = extractAllSectionsFromHtml(html);\n\treturn sections.get('body') ?? html;\n}\n\n/**\n * Extract everything from the first section divider onward (dividers + their\n * content). Returns an empty string when there are no sections.\n */\nexport function getSectionsHtml(html: string): string {\n\tif (!html) return '';\n\tconst body = getBodyHtml(html);\n\treturn html.substring(body.length);\n}\n\nexport function extractAllSectionsFromHtml(html: string): Map<string, string> {\n\tconst sections = new Map<string, string>();\n\tconst dividerRegex =\n\t\t/<div[^>]*data-section-divider=\"([^\"]*)[^>]*>\\s*<\\/div>/g;\n\tconst dividers: Array<{ id: string; index: number; endIndex: number }> = [];\n\n\tlet match: RegExpExecArray | null;\n\twhile ((match = dividerRegex.exec(html)) !== null) {\n\t\tdividers.push({\n\t\t\tid: match[1],\n\t\t\tindex: match.index,\n\t\t\tendIndex: match.index + match[0].length,\n\t\t});\n\t}\n\n\tif (dividers.length === 0) {\n\t\tsections.set('body', html);\n\t\treturn sections;\n\t}\n\n\tsections.set('body', html.slice(0, dividers[0].index));\n\tfor (let i = 0; i < dividers.length; i++) {\n\t\tconst start = dividers[i].endIndex;\n\t\tconst end = i + 1 < dividers.length ? dividers[i + 1].index : html.length;\n\t\tsections.set(dividers[i].id, html.slice(start, end));\n\t}\n\n\treturn sections;\n}\n\n/** Returns BikEditorContent for a single named section (or 'body'). */\nexport function extractSectionContent(\n\teditor: Editor,\n\tid: string,\n): EditorSnapshot {\n\tconst startPos = findSectionStartPos(editor, id);\n\tif (startPos === -1)\n\t\treturn { html: '', text: '', isEmpty: true, characterCount: 0 };\n\tconst endPos = findSectionEndPos(editor, id);\n\tconst slice = editor.state.doc.slice(startPos, endPos);\n\tconst container = document.createElement('div');\n\tconst serializer = DOMSerializer.fromSchema(editor.schema);\n\tcontainer.appendChild(serializer.serializeFragment(slice.content));\n\tconst html = toPortableHtml(container.innerHTML);\n\tconst text = container.textContent ?? '';\n\treturn { html, text, isEmpty: !text.trim(), characterCount: text.length };\n}\n\n/**\n * Parse an HTML string into ProseMirror nodes using the editor's schema.\n */\nfunction parseHtmlToNodes(editor: Editor, html: string) {\n\tconst container = document.createElement('div');\n\tcontainer.innerHTML = html;\n\treturn DOMParser.fromSchema(editor.schema).parse(container, {\n\t\tpreserveWhitespace: true,\n\t}).content;\n}\n\n/**\n * Replace the content of a single named section without touching others.\n * Uses a ProseMirror transaction to replace only the target range,\n * preserving undo history and other sections' state.\n * If the section doesn't exist yet, it is appended at the end of the document.\n */\nexport function setSectionContentInEditor(\n\teditor: Editor,\n\tid: string,\n\thtml: string,\n): void {\n\tconst startPos = findSectionStartPos(editor, id);\n\tif (startPos === -1) {\n\t\tconst endPos = editor.state.doc.content.size;\n\t\tconst dividerHtml = SECTION_DIVIDER_HTML(id) + html;\n\t\teditor.commands.insertContentAt(endPos, dividerHtml, {\n\t\t\tupdateSelection: false,\n\t\t});\n\t\treturn;\n\t}\n\tconst endPos = findSectionEndPos(editor, id);\n\tconst fragment = parseHtmlToNodes(editor, html);\n\tconst { tr } = editor.state;\n\t// For body, replace from position 0 (before the first paragraph's opening\n\t// boundary) so ProseMirror swaps entire block nodes cleanly. Position 1\n\t// (inside the paragraph) would force ProseMirror to close the open paragraph\n\t// first, creating a ghost empty <p></p>.\n\tconst replaceFrom = id === 'body' ? 0 : startPos;\n\ttr.replaceWith(replaceFrom, endPos, fragment);\n\ttr.setMeta('addToHistory', false);\n\teditor.view.dispatch(tr);\n}\n\n// ---------------------------------------------------------------------------\n// Convenience shorthands (body = first section)\n// ---------------------------------------------------------------------------\n\n/** Extract BikEditorContent for just the body (before the first divider). */\nexport function extractBodyContent(editor: Editor): EditorSnapshot {\n\treturn extractSectionContent(editor, 'body');\n}\n\n// ---------------------------------------------------------------------------\n// Active formats\n// ---------------------------------------------------------------------------\n\nexport function extractActiveFormats(editor: Editor): FormatState {\n\treturn {\n\t\tbold: editor.isActive('bold'),\n\t\titalic: editor.isActive('italic'),\n\t\tunderline: editor.isActive('underline'),\n\t\tstrike: editor.isActive('strike'),\n\t\tbulletList: editor.isActive('bulletList'),\n\t\torderedList: editor.isActive('orderedList'),\n\t\tblockquote: editor.isActive('blockquote'),\n\t\tcodeBlock: editor.isActive('codeBlock'),\n\t\tlink: (() => {\n\t\t\tif (editor.isActive('link')) {\n\t\t\t\treturn { href: editor.getAttributes('link')['href'] ?? '' };\n\t\t\t}\n\t\t\tconst { $from } = editor.state.selection;\n\t\t\tif ($from.pos > 0) {\n\t\t\t\tconst before = $from.doc.resolve($from.pos);\n\t\t\t\tconst linkMark = before.marks().find((m) => m.type.name === 'link');\n\t\t\t\tif (!linkMark) {\n\t\t\t\t\tconst nodeBefore = $from.nodeBefore;\n\t\t\t\t\tconst markOnPrev = nodeBefore?.marks.find(\n\t\t\t\t\t\t(m) => m.type.name === 'link',\n\t\t\t\t\t);\n\t\t\t\t\tif (markOnPrev) {\n\t\t\t\t\t\treturn { href: markOnPrev.attrs['href'] ?? '' };\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn { href: linkMark.attrs['href'] ?? '' };\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t})(),\n\t\ttextAlign: editor.isActive({ textAlign: 'center' })\n\t\t\t? 'center'\n\t\t\t: editor.isActive({ textAlign: 'right' })\n\t\t\t? 'right'\n\t\t\t: editor.isActive({ textAlign: 'justify' })\n\t\t\t? 'justify'\n\t\t\t: editor.isActive({ textAlign: 'left' })\n\t\t\t? 'left'\n\t\t\t: null,\n\t\tfontFamily: editor.getAttributes('textStyle')['fontFamily'] ?? null,\n\t\tfontSize: editor.getAttributes('textStyle')['fontSize'] ?? null,\n\t\tcolor: editor.getAttributes('textStyle')['color'] ?? null,\n\t\thighlight: editor.isActive('highlight')\n\t\t\t? editor.getAttributes('highlight')['color'] ?? 'default'\n\t\t\t: null,\n\t\tsuperscript: editor.isActive('superscript'),\n\t\tsubscript: editor.isActive('subscript'),\n\t};\n}\n\nexport function extractContent(editor: Editor): EditorSnapshot {\n\tconst html = toPortableHtml(editor.getHTML());\n\tconst normalized = normalizeHardBreaks(editor.state.doc.content);\n\tconst tempDoc = editor.schema.node('doc', null, normalized);\n\t// Paragraph boundary → blank line (\\n\\n), soft line break (hardBreak) → \\n.\n\t// Matches Gmail's plain-text output for the same content.\n\tconst text = tempDoc.textBetween(0, tempDoc.content.size, '\\n\\n', '\\n');\n\treturn {\n\t\thtml,\n\t\ttext,\n\t\tisEmpty: editor.isEmpty,\n\t\tcharacterCount: text.length,\n\t};\n}\n\n// ---------------------------------------------------------------------------\n// Section position helpers (used by insertAtSectionStart/End and appendBodyContent)\n// ---------------------------------------------------------------------------\n\n/**\n * Returns the ProseMirror position immediately after a section's opening divider\n * (i.e. the start of the section's own content).\n * For `'body'`, returns 1 (beginning of the document).\n * Returns -1 if the named section's divider is not found.\n */\nexport function findSectionStartPos(editor: Editor, sectionId: string): number {\n\tif (sectionId === 'body') return 1;\n\tlet startPos = -1;\n\teditor.state.doc.descendants((node, pos) => {\n\t\tif (startPos !== -1) return false;\n\t\tif (\n\t\t\tnode.type.name === 'sectionDivider' &&\n\t\t\tnode.attrs['sectionId'] === sectionId\n\t\t) {\n\t\t\tstartPos = pos + node.nodeSize; // position right after the divider\n\t\t}\n\t});\n\treturn startPos;\n}\n\n/**\n * Returns the ProseMirror position at the end of a named section's content:\n * - For `'body'`: position of the first section divider, or end of document.\n * - For a named section: position of the next divider, or end of document.\n */\nexport function findSectionEndPos(editor: Editor, sectionId: string): number {\n\tconst doc = editor.state.doc;\n\tconst docSize = doc.content.size;\n\n\tif (sectionId === 'body') {\n\t\tlet firstDividerPos = -1;\n\t\tdoc.descendants((node, pos) => {\n\t\t\tif (firstDividerPos !== -1) return false;\n\t\t\tif (node.type.name === 'sectionDivider') {\n\t\t\t\tfirstDividerPos = pos;\n\t\t\t}\n\t\t});\n\t\treturn firstDividerPos !== -1 ? firstDividerPos : docSize;\n\t}\n\n\tlet passedSection = false;\n\tlet nextDividerPos = -1;\n\tdoc.descendants((node, pos) => {\n\t\tif (nextDividerPos !== -1) return false;\n\t\tif (!passedSection) {\n\t\t\tif (\n\t\t\t\tnode.type.name === 'sectionDivider' &&\n\t\t\t\tnode.attrs['sectionId'] === sectionId\n\t\t\t) {\n\t\t\t\tpassedSection = true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif (node.type.name === 'sectionDivider') {\n\t\t\tnextDividerPos = pos;\n\t\t}\n\t});\n\treturn nextDividerPos !== -1 ? nextDividerPos : docSize;\n}\n"],"names":["normalizeHtml","html","container","span","dataType","parent","p","toPortableHtml","div","walker","textNode","blocks","insertInlineHtml","editor","normalised","dom","slice","DOMParser","from","to","tr","SECTION_DIVIDER_HTML","id","buildSectionedContent","body","sections","s","getBodyHtml","extractAllSectionsFromHtml","getSectionsHtml","dividerRegex","dividers","match","i","start","end","extractSectionContent","startPos","findSectionStartPos","endPos","findSectionEndPos","serializer","DOMSerializer","text","parseHtmlToNodes","setSectionContentInEditor","dividerHtml","fragment","replaceFrom","extractBodyContent","extractActiveFormats","$from","linkMark","m","markOnPrev","extractContent","normalized","normalizeHardBreaks","tempDoc","sectionId","node","pos","doc","docSize","firstDividerPos","passedSection","nextDividerPos"],"mappings":"0MA2BO,SAASA,EAAcC,EAAsB,CACnD,GAAI,CAACA,GAAQ,OAAO,SAAa,IAAa,OAAOA,EAErD,MAAMC,EAAY,SAAS,cAAc,KAAK,EAC9C,OAAAA,EAAU,UAAYD,EAEtBC,EAAU,iBAAiB,MAAM,EAAE,QAASC,GAAS,CAIpD,MAAMC,EAAWD,EAA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AK,KAAK,OAAS,mBACtBI,EAAkBH,EAEpB,CAAC,EACMG,IAAoB,GAAKA,EAAkBD,CACnD,CAEA,IAAIE,EAAgB,GAChBC,EAAiB,GACrB,OAAAJ,EAAI,YAAY,CAACF,EAAMC,IAAQ,CAC9B,GAAIK,IAAmB,GAAI,MAAO,GAClC,GAAI,CAACD,EACJ,OACCL,EAAK,KAAK,OAAS,kBACnBA,EAAK,MAAM,YAAiBD,IAE5BM,EAAgB,IAEV,GAEJL,EAAK,KAAK,OAAS,mBACtBM,EAAiBL,EAEnB,CAAC,EACMK,IAAmB,GAAKA,EAAiBH,CACjD"}
1
+ {"version":3,"file":"BikEditor.utils.js","sources":["../../../src/editor/BikEditor.utils.ts"],"sourcesContent":["import { Editor } from '@tiptap/core';\nimport { DOMParser, DOMSerializer } from 'prosemirror-model';\nimport {\n\tEditorSnapshot,\n\tFormatState,\n\tJsonParseResult,\n} from './BikEditor.types';\nimport { normalizeHardBreaks } from './extensions/plainClipboard/pasteUtils';\n\n// ---------------------------------------------------------------------------\n// HTML normalisation\n// ---------------------------------------------------------------------------\n\n/**\n * Normalise HTML before passing it to TipTap.\n *\n * 1. Unwrap style-less `<span>` wrappers (plain spans, and editor-cursor spans\n * like Quill's `<span class=\"ql-cursor\">`). Spans that carry inline styling\n * (`color` / `font-family` / `font-size` render as styled spans) or that\n * represent a `{{variable}}` token are PRESERVED — otherwise a setContent\n * round-trip would silently drop colour/font formatting that paste keeps.\n * 2. Collapse placeholder paragraphs (`<p><br></p>`) to `<p></p>`. ProseMirror\n * parses `<p></p>` as an empty paragraph and adds its own DOM `<br>` for the\n * cursor — one blank line, correct height. Leaving the source `<br>` would\n * create a `hard_break` child AND the cursor `<br>` → double-height blank line.\n *\n * Uses the DOM (regex cannot selectively pair span tags). `normalizeHtml` runs\n * in the component body for `initialContent`, so it is guarded for SSR: the\n * editor is created lazily on the client (`immediatelyRender: false`), meaning\n * the value is only parsed client-side and passing through on the server is safe.\n */\nexport function normalizeHtml(html: string): string {\n\tif (!html || typeof document === 'undefined') return html;\n\n\tconst container = document.createElement('div');\n\tcontainer.innerHTML = html;\n\n\tcontainer.querySelectorAll('span').forEach((span) => {\n\t\t// Keep schema-backed spans: styled spans, variables, and mention chips\n\t\t// (`data-type=\"mention…\"`). Stripping a mention span would drop the\n\t\t// `data-id`/`data-label`/`data-kind` the editor needs to reparse it.\n\t\tconst dataType = span.getAttribute('data-type');\n\t\tif (\n\t\t\tspan.hasAttribute('style') ||\n\t\t\tspan.hasAttribute('data-variable') ||\n\t\t\t(dataType !== null && dataType.startsWith('mention'))\n\t\t)\n\t\t\treturn;\n\t\tconst parent = span.parentNode;\n\t\tif (!parent) return;\n\t\twhile (span.firstChild) parent.insertBefore(span.firstChild, span);\n\t\tparent.removeChild(span);\n\t});\n\n\tcontainer.querySelectorAll('p').forEach((p) => {\n\t\tif (\n\t\t\tp.querySelectorAll('br').length === 1 &&\n\t\t\t(p.textContent ?? '').trim() === ''\n\t\t) {\n\t\t\tp.innerHTML = '';\n\t\t}\n\t});\n\n\treturn container.innerHTML;\n}\n\n/**\n * Make editor HTML portable across email clients and chat renderers.\n *\n * 1. Preserve consecutive spaces by converting every second space in a run\n * to `&nbsp;` (U+00A0). Standard HTML collapses adjacent regular spaces;\n * alternating with `&nbsp;` prevents that — same convention Gmail uses.\n * 2. Double a trailing `<br>` in content paragraphs so the blank line is\n * visible. A single trailing `<br>` before `</p>` is swallowed by most\n * email clients; `<br><br>` renders as a visible blank line (matches\n * Gmail's output).\n * 3. Convert empty `<p></p>` to `<p><br></p>` — email clients collapse\n * zero-height paragraphs without a `<br>`.\n */\nexport function toPortableHtml(html: string): string {\n\tconst div = document.createElement('div');\n\tdiv.innerHTML = html;\n\n\t// TreeWalker visits only text nodes, skipping HTML tags/attributes, so we safely\n\t// replace consecutive spaces with space + \\u00a0 (nbsp) to prevent email clients from collapsing them\n\tconst walker = document.createTreeWalker(div, NodeFilter.SHOW_TEXT);\n\tlet textNode: Text | null;\n\twhile ((textNode = walker.nextNode() as Text | null)) {\n\t\tif (textNode.nodeValue && textNode.nodeValue.includes(' ')) {\n\t\t\ttextNode.nodeValue = textNode.nodeValue.replace(/ {2}/g, '  ');\n\t\t}\n\t}\n\n\tconst blocks = div.querySelectorAll('p');\n\tfor (const p of Array.from(blocks)) {\n\t\tif (p.childNodes.length === 0) {\n\t\t\tp.appendChild(document.createElement('br'));\n\t\t\tcontinue;\n\t\t}\n\t\tconst last = p.lastChild;\n\t\tif (last instanceof HTMLBRElement && p.childNodes.length > 1) {\n\t\t\tp.appendChild(document.createElement('br'));\n\t\t}\n\t}\n\treturn div.innerHTML;\n}\n\n// ---------------------------------------------------------------------------\n// Inline content insertion\n// ---------------------------------------------------------------------------\n\n/**\n * Insert HTML at the current cursor position, merging the first paragraph\n * inline while preserving the block structure of subsequent paragraphs/lists.\n *\n * Uses `parseSlice` which returns an open-ended Slice — the first block merges\n * at the cursor, middle blocks stay intact, and the last block merges with any\n * text that follows the cursor.\n */\nexport function insertInlineHtml(editor: Editor, html: string): void {\n\tconst normalised = normalizeHtml(html);\n\tconst dom = document.createElement('div');\n\tdom.innerHTML = normalised;\n\tconst slice = DOMParser.fromSchema(editor.schema).parseSlice(dom, {\n\t\tpreserveWhitespace: true,\n\t});\n\n\tif (slice.size === 0) return;\n\n\tconst { from, to } = editor.state.selection;\n\tconst tr = editor.state.tr.replaceRange(from, to, slice);\n\teditor.view.dispatch(tr);\n}\n\n// ---------------------------------------------------------------------------\n// Section divider HTML\n// ---------------------------------------------------------------------------\n\nexport const SECTION_DIVIDER_HTML = (id: string) =>\n\t`<div data-section-divider=\"${id}\" style=\"display:none;height:0;line-height:0;overflow:hidden;\"></div>`;\n\n/**\n * Build initial HTML for an editor with one or more named sections below the body.\n * Each section is separated by an invisible divider node.\n *\n * @example\n * buildSectionedContent('<p>Body</p>', [\n * { id: 'signature', content: '<p>Alice</p>' },\n * { id: 'forwarded', content: '<p>--- fwd ---</p>' },\n * ])\n */\nexport function buildSectionedContent(\n\tbody: string,\n\tsections: Array<{ id: string; content: string }>,\n): string {\n\tlet html = body;\n\tfor (const s of sections) {\n\t\thtml += SECTION_DIVIDER_HTML(s.id) + s.content;\n\t}\n\treturn html;\n}\n\n// ---------------------------------------------------------------------------\n// Section extraction\n// ---------------------------------------------------------------------------\n\n/**\n * Parse the editor HTML into a Map of sectionId → raw HTML string.\n * The special key `'body'` always holds the content before the first divider.\n * Map iteration order matches document order.\n */\nexport function extractAllSections(editor: Editor): Map<string, string> {\n\treturn extractAllSectionsFromHtml(editor.getHTML());\n}\n\n/**\n * Extract just the body portion (everything before the first section divider)\n * from an HTML string produced by BikEditor. Safe to call on plain HTML too —\n * returns the full string when no dividers are present.\n */\nexport function getBodyHtml(html: string): string {\n\tif (!html) return '';\n\tconst sections = extractAllSectionsFromHtml(html);\n\treturn sections.get('body') ?? html;\n}\n\n/**\n * Extract everything from the first section divider onward (dividers + their\n * content). Returns an empty string when there are no sections.\n */\nexport function getSectionsHtml(html: string): string {\n\tif (!html) return '';\n\tconst body = getBodyHtml(html);\n\treturn html.substring(body.length);\n}\n\nexport function extractAllSectionsFromHtml(html: string): Map<string, string> {\n\tconst sections = new Map<string, string>();\n\tconst dividerRegex =\n\t\t/<div[^>]*data-section-divider=\"([^\"]*)[^>]*>\\s*<\\/div>/g;\n\tconst dividers: Array<{ id: string; index: number; endIndex: number }> = [];\n\n\tlet match: RegExpExecArray | null;\n\twhile ((match = dividerRegex.exec(html)) !== null) {\n\t\tdividers.push({\n\t\t\tid: match[1],\n\t\t\tindex: match.index,\n\t\t\tendIndex: match.index + match[0].length,\n\t\t});\n\t}\n\n\tif (dividers.length === 0) {\n\t\tsections.set('body', html);\n\t\treturn sections;\n\t}\n\n\tsections.set('body', html.slice(0, dividers[0].index));\n\tfor (let i = 0; i < dividers.length; i++) {\n\t\tconst start = dividers[i].endIndex;\n\t\tconst end = i + 1 < dividers.length ? dividers[i + 1].index : html.length;\n\t\tsections.set(dividers[i].id, html.slice(start, end));\n\t}\n\n\treturn sections;\n}\n\n/** Returns BikEditorContent for a single named section (or 'body'). */\nexport function extractSectionContent(\n\teditor: Editor,\n\tid: string,\n): EditorSnapshot {\n\tconst startPos = findSectionStartPos(editor, id);\n\tif (startPos === -1)\n\t\treturn { html: '', text: '', isEmpty: true, characterCount: 0 };\n\tconst endPos = findSectionEndPos(editor, id);\n\tconst slice = editor.state.doc.slice(startPos, endPos);\n\tconst container = document.createElement('div');\n\tconst serializer = DOMSerializer.fromSchema(editor.schema);\n\tcontainer.appendChild(serializer.serializeFragment(slice.content));\n\tconst html = toPortableHtml(container.innerHTML);\n\tconst text = container.textContent ?? '';\n\treturn { html, text, isEmpty: !text.trim(), characterCount: text.length };\n}\n\n/**\n * Parse an HTML string into ProseMirror nodes using the editor's schema.\n */\nfunction parseHtmlToNodes(editor: Editor, html: string) {\n\tconst container = document.createElement('div');\n\tcontainer.innerHTML = html;\n\treturn DOMParser.fromSchema(editor.schema).parse(container, {\n\t\tpreserveWhitespace: true,\n\t}).content;\n}\n\n/**\n * Replace the content of a single named section without touching others.\n * Uses a ProseMirror transaction to replace only the target range,\n * preserving undo history and other sections' state.\n * If the section doesn't exist yet, it is appended at the end of the document.\n */\nexport function setSectionContentInEditor(\n\teditor: Editor,\n\tid: string,\n\thtml: string,\n): void {\n\tconst startPos = findSectionStartPos(editor, id);\n\tif (startPos === -1) {\n\t\tconst endPos = editor.state.doc.content.size;\n\t\tconst dividerHtml = SECTION_DIVIDER_HTML(id) + html;\n\t\teditor.commands.insertContentAt(endPos, dividerHtml, {\n\t\t\tupdateSelection: false,\n\t\t});\n\t\treturn;\n\t}\n\tconst endPos = findSectionEndPos(editor, id);\n\tconst fragment = parseHtmlToNodes(editor, html);\n\tconst { tr } = editor.state;\n\t// For body, replace from position 0 (before the first paragraph's opening\n\t// boundary) so ProseMirror swaps entire block nodes cleanly. Position 1\n\t// (inside the paragraph) would force ProseMirror to close the open paragraph\n\t// first, creating a ghost empty <p></p>.\n\tconst replaceFrom = id === 'body' ? 0 : startPos;\n\ttr.replaceWith(replaceFrom, endPos, fragment);\n\ttr.setMeta('addToHistory', false);\n\teditor.view.dispatch(tr);\n}\n\n// ---------------------------------------------------------------------------\n// Convenience shorthands (body = first section)\n// ---------------------------------------------------------------------------\n\n/** Extract BikEditorContent for just the body (before the first divider). */\nexport function extractBodyContent(editor: Editor): EditorSnapshot {\n\treturn extractSectionContent(editor, 'body');\n}\n\n// ---------------------------------------------------------------------------\n// Active formats\n// ---------------------------------------------------------------------------\n\nexport function extractActiveFormats(editor: Editor): FormatState {\n\treturn {\n\t\tbold: editor.isActive('bold'),\n\t\titalic: editor.isActive('italic'),\n\t\tunderline: editor.isActive('underline'),\n\t\tstrike: editor.isActive('strike'),\n\t\tbulletList: editor.isActive('bulletList'),\n\t\torderedList: editor.isActive('orderedList'),\n\t\tblockquote: editor.isActive('blockquote'),\n\t\tcodeBlock: editor.isActive('codeBlock'),\n\t\tlink: (() => {\n\t\t\tif (editor.isActive('link')) {\n\t\t\t\treturn { href: editor.getAttributes('link')['href'] ?? '' };\n\t\t\t}\n\t\t\tconst { $from } = editor.state.selection;\n\t\t\tif ($from.pos > 0) {\n\t\t\t\tconst before = $from.doc.resolve($from.pos);\n\t\t\t\tconst linkMark = before.marks().find((m) => m.type.name === 'link');\n\t\t\t\tif (!linkMark) {\n\t\t\t\t\tconst nodeBefore = $from.nodeBefore;\n\t\t\t\t\tconst markOnPrev = nodeBefore?.marks.find(\n\t\t\t\t\t\t(m) => m.type.name === 'link',\n\t\t\t\t\t);\n\t\t\t\t\tif (markOnPrev) {\n\t\t\t\t\t\treturn { href: markOnPrev.attrs['href'] ?? '' };\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn { href: linkMark.attrs['href'] ?? '' };\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t})(),\n\t\ttextAlign: editor.isActive({ textAlign: 'center' })\n\t\t\t? 'center'\n\t\t\t: editor.isActive({ textAlign: 'right' })\n\t\t\t? 'right'\n\t\t\t: editor.isActive({ textAlign: 'justify' })\n\t\t\t? 'justify'\n\t\t\t: editor.isActive({ textAlign: 'left' })\n\t\t\t? 'left'\n\t\t\t: null,\n\t\tfontFamily: editor.getAttributes('textStyle')['fontFamily'] ?? null,\n\t\tfontSize: editor.getAttributes('textStyle')['fontSize'] ?? null,\n\t\tcolor: editor.getAttributes('textStyle')['color'] ?? null,\n\t\thighlight: editor.isActive('highlight')\n\t\t\t? editor.getAttributes('highlight')['color'] ?? 'default'\n\t\t\t: null,\n\t\tsuperscript: editor.isActive('superscript'),\n\t\tsubscript: editor.isActive('subscript'),\n\t};\n}\n\nexport function extractContent(editor: Editor): EditorSnapshot {\n\tconst html = toPortableHtml(editor.getHTML());\n\tconst normalized = normalizeHardBreaks(editor.state.doc.content);\n\tconst tempDoc = editor.schema.node('doc', null, normalized);\n\t// Paragraph boundary → blank line (\\n\\n), soft line break (hardBreak) → \\n.\n\t// Matches Gmail's plain-text output for the same content.\n\tconst text = tempDoc.textBetween(0, tempDoc.content.size, '\\n\\n', '\\n');\n\treturn {\n\t\thtml,\n\t\ttext,\n\t\tisEmpty: editor.isEmpty,\n\t\tcharacterCount: text.length,\n\t};\n}\n\n// ---------------------------------------------------------------------------\n// Section position helpers (used by insertAtSectionStart/End and appendBodyContent)\n// ---------------------------------------------------------------------------\n\n/**\n * Returns the ProseMirror position immediately after a section's opening divider\n * (i.e. the start of the section's own content).\n * For `'body'`, returns 1 (beginning of the document).\n * Returns -1 if the named section's divider is not found.\n */\nexport function findSectionStartPos(editor: Editor, sectionId: string): number {\n\tif (sectionId === 'body') return 1;\n\tlet startPos = -1;\n\teditor.state.doc.descendants((node, pos) => {\n\t\tif (startPos !== -1) return false;\n\t\tif (\n\t\t\tnode.type.name === 'sectionDivider' &&\n\t\t\tnode.attrs['sectionId'] === sectionId\n\t\t) {\n\t\t\tstartPos = pos + node.nodeSize; // position right after the divider\n\t\t}\n\t});\n\treturn startPos;\n}\n\n/**\n * Returns the ProseMirror position at the end of a named section's content:\n * - For `'body'`: position of the first section divider, or end of document.\n * - For a named section: position of the next divider, or end of document.\n */\nexport function findSectionEndPos(editor: Editor, sectionId: string): number {\n\tconst doc = editor.state.doc;\n\tconst docSize = doc.content.size;\n\n\tif (sectionId === 'body') {\n\t\tlet firstDividerPos = -1;\n\t\tdoc.descendants((node, pos) => {\n\t\t\tif (firstDividerPos !== -1) return false;\n\t\t\tif (node.type.name === 'sectionDivider') {\n\t\t\t\tfirstDividerPos = pos;\n\t\t\t}\n\t\t});\n\t\treturn firstDividerPos !== -1 ? firstDividerPos : docSize;\n\t}\n\n\tlet passedSection = false;\n\tlet nextDividerPos = -1;\n\tdoc.descendants((node, pos) => {\n\t\tif (nextDividerPos !== -1) return false;\n\t\tif (!passedSection) {\n\t\t\tif (\n\t\t\t\tnode.type.name === 'sectionDivider' &&\n\t\t\t\tnode.attrs['sectionId'] === sectionId\n\t\t\t) {\n\t\t\t\tpassedSection = true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tif (node.type.name === 'sectionDivider') {\n\t\t\tnextDividerPos = pos;\n\t\t}\n\t});\n\treturn nextDividerPos !== -1 ? nextDividerPos : docSize;\n}\n\n// ---------------------------------------------------------------------------\n// JSON body helpers (used when features.jsonMode is on — the whole document is\n// a single code block whose text is raw JSON, Postman-style)\n// ---------------------------------------------------------------------------\n\nfunction escapeHtml(raw: string): string {\n\treturn raw.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\n/**\n * Wrap a raw JSON string in a `<pre><code>` code block so TipTap parses it as a\n * single code-block node (the container for JSON body mode).\n */\nexport function buildJsonCodeBlockHtml(raw: string): string {\n\treturn `<pre><code>${escapeHtml(raw ?? '')}</code></pre>`;\n}\n\n/** Returns the raw text of the first code block in the document (empty if none). */\nexport function getCodeBlockText(editor: Editor): string {\n\tlet text = '';\n\tlet found = false;\n\teditor.state.doc.descendants((node) => {\n\t\tif (found) return false;\n\t\tif (node.type.name === 'codeBlock') {\n\t\t\ttext = node.textContent;\n\t\t\tfound = true;\n\t\t\treturn false;\n\t\t}\n\t\treturn undefined;\n\t});\n\treturn text;\n}\n\n/**\n * Replace the text of the first code block with `raw`, keeping it a code block.\n * Falls back to replacing the whole document when no code block exists yet.\n */\nexport function setCodeBlockText(editor: Editor, raw: string): void {\n\teditor.commands.setContent(buildJsonCodeBlockHtml(raw), { emitUpdate: true });\n}\n\n/** 1-based line/column of a 0-based character offset within `text`. */\nfunction offsetToLineCol(\n\ttext: string,\n\toffset: number,\n): { line: number; column: number } {\n\tconst before = text.slice(0, Math.max(0, offset));\n\tconst lines = before.split('\\n');\n\treturn {\n\t\tline: lines.length,\n\t\tcolumn: (lines[lines.length - 1]?.length ?? 0) + 1,\n\t};\n}\n\n/**\n * Turn a raw `JSON.parse` error into a clean message + location. Engine messages\n * look like `\"Bad control character in string literal in JSON at position 94\n * (line 7 column 9)\"` — we strip the `\"in JSON at position …\"` tail for the\n * message and pull the line/column from it (falling back to computing them from\n * the position offset when the engine omits them).\n */\nfunction describeJsonError(\n\trawMessage: string,\n\ttext: string,\n): { message: string; line: number | null; column: number | null } {\n\tconst message =\n\t\trawMessage.replace(/\\s*in JSON at position[\\s\\S]*$/i, '').trim() ||\n\t\trawMessage;\n\n\tconst lineCol = rawMessage.match(/line (\\d+) column (\\d+)/i);\n\tif (lineCol) {\n\t\treturn {\n\t\t\tmessage,\n\t\t\tline: Number(lineCol[1]),\n\t\t\tcolumn: Number(lineCol[2]),\n\t\t};\n\t}\n\n\tconst posMatch = rawMessage.match(/position (\\d+)/i);\n\tif (posMatch) {\n\t\tconst { line, column } = offsetToLineCol(text, Number(posMatch[1]));\n\t\treturn { message, line, column };\n\t}\n\n\treturn { message, line: null, column: null };\n}\n\n/** Parse a JSON string without throwing. Empty / whitespace-only text is valid. */\nexport function parseJson(text: string): JsonParseResult {\n\tif (!text.trim()) {\n\t\treturn { valid: true, value: null, error: null, line: null, column: null };\n\t}\n\ttry {\n\t\treturn {\n\t\t\tvalid: true,\n\t\t\tvalue: JSON.parse(text),\n\t\t\terror: null,\n\t\t\tline: null,\n\t\t\tcolumn: null,\n\t\t};\n\t} catch (e) {\n\t\tconst { message, line, column } = describeJsonError(\n\t\t\t(e as Error).message,\n\t\t\ttext,\n\t\t);\n\t\treturn { valid: false, value: null, error: message, line, column };\n\t}\n}\n"],"names":["normalizeHtml","html","container","span","dataType","parent","p","toPortableHtml","div","walker","textNode","blocks","insertInlineHtml","editor","normalised","dom","slice","DOMParser","from","to","tr","SECTION_DIVIDER_HTML","id","buildSectionedContent","body","sections","s","getBodyHtml","extractAllSectionsFromHtml","getSectionsHtml","dividerRegex","dividers","match","i","start","end","extractSectionContent","startPos","findSectionStartPos","endPos","findSectionEndPos","serializer","DOMSerializer","text","parseHtmlToNodes","setSectionContentInEditor","dividerHtml","fragment","replaceFrom","extractBodyContent","extractActiveFormats","$from","linkMark","m","markOnPrev","extractContent","normalized","normalizeHardBreaks","tempDoc","sectionId","node","pos","doc","docSize","firstDividerPos","passedSection","nextDividerPos","escapeHtml","raw","buildJsonCodeBlockHtml","getCodeBlockText","found","setCodeBlockText","offsetToLineCol","offset","lines","describeJsonError","rawMessage","message","lineCol","posMatch","line","column","parseJson","e"],"mappings":"0MA+BO,SAASA,EAAcC,EAAsB,CACnD,GAAI,CAACA,GAAQ,OAAO,SAAa,IAAa,OAAOA,EAErD,MAAMC,EAAY,SAAS,cAAc,KAAK,EAC9C,OAAAA,EAAU,UAAYD,EAEtBC,EAAU,iBAAiB,MAAM,EAAE,QAASC,GAAS,CAIpD,MAAMC,EAAWD,EAAK,aAAa,WAAW,EAC9C,GACCA,EAAK,aAAa,OAAO,GACzBA,EAAK,aAAa,eAAe,GAChCC,IAAa,MAAQA,EAAS,WAAW,SAAS,EAEnD,OACD,MAAMC,EAASF,EAAK,WACpB,GAAKE,EACL,MAAOF,EAAK,YAAYE,EAAO,aAAaF,EAAK,WAAYA,CAAI,EACjEE,EAAO,YAAYF,CAAI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AIG,EAAU,CACb,KAAM,CAAE,KAAAC,EAAM,OAAAC,CAAA,EAAWT,EAAgB9B,EAAM,OAAOqC,EAAS,CAAC,CAAC,CAAC,EAClE,MAAO,CAAE,QAAAF,EAAS,KAAAG,EAAM,OAAAC,CAAA,CACzB,CAEA,MAAO,CAAE,QAAAJ,EAAS,KAAM,KAAM,OAAQ,IAAA,CACvC,CAGO,SAASK,EAAUxC,EAA+B,CACxD,GAAI,CAACA,EAAK,OACT,MAAO,CAAE,MAAO,GAAM,MAAO,KAAM,MAAO,KAAM,KAAM,KAAM,OAAQ,IAAA,EAErE,GAAI,CACH,MAAO,CACN,MAAO,GACP,MAAO,KAAK,MAAMA,CAAI,EACtB,MAAO,KACP,KAAM,KACN,OAAQ,IAAA,CAEV,OAASyC,EAAG,CACX,KAAM,CAAE,QAAAN,EAAS,KAAAG,EAAM,OAAAC,CAAA,EAAWN,EAChCQ,EAAY,QACbzC,CAAA,EAED,MAAO,CAAE,MAAO,GAAO,MAAO,KAAM,MAAOmC,EAAS,KAAAG,EAAM,OAAAC,CAAA,CAC3D,CACD"}
@@ -1,2 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@tiptap/extension-character-count"),x=require("@tiptap/extension-color"),S=require("@tiptap/extension-font-family"),_=require("@tiptap/extension-hard-break"),q=require("@tiptap/extension-highlight"),E=require("@tiptap/extension-image"),M=require("@tiptap/extension-link"),b=require("../../node_modules/@tiptap/extension-paragraph/dist/index.js"),k=require("@tiptap/extension-placeholder"),y=require("@tiptap/extension-subscript"),C=require("@tiptap/extension-superscript"),P=require("@tiptap/extension-text-align"),T=require("@tiptap/extension-text-style"),g=require("@tiptap/extension-underline"),D=require("@tiptap/starter-kit"),H=require("./FontSizeExtension.js"),i=require("./mention/MentionExtension.js"),B=require("./paste/PasteExtension.js"),F=require("./plainClipboard/PasteNormalizationExtension.js"),I=require("./sectionDivider/SectionDividerNode.js"),L=require("./sendShortcut/SendShortcutExtension.js"),O=require("./slashCommand/SlashCommandExtension.js"),w=require("./variable/VariableDecorationExtension.js"),t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},A=t(f),l=t(x),z=t(S),N=t(_),R=t(q),v=t(E),K=t(M),j=t(k),U=t(y),V=t(C),W=t(P),Z=t(g),G=t(D);function J(e){const s=e.features?.richPaste??!1,u=e.features?.richTypography??!1,a=e.features?.allowedMarks,r=n=>!a||a.includes(n),d=N.default.extend({addKeyboardShortcuts(){return{"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),o=n=>n==="0"||n==="0px"||n==="0pt"||n==="0em",c=b.default.extend({addAttributes(){return{...this.parent?.()??{},margin:{default:null,parseHTML:n=>o(n.style.marginTop)&&o(n.style.marginBottom)?"0":null,renderHTML:n=>n.margin==="0"?{style:"margin: 0px"}:{}}}}}),m=[G.default.configure({link:!1,underline:!1,hardBreak:!1,paragraph:!1,bold:r("bold")?{}:!1,italic:r("italic")?{}:!1,strike:r("strike")?{}:!1,code:r("code")?{}:!1}),c,d,...r("underline")?[Z.default]:[],K.default.extend({addPasteRules:()=>[],addInputRules:()=>[]}).configure({openOnClick:!1,autolink:!1,linkOnPaste:!1,HTMLAttributes:{rel:"noopener noreferrer",class:"bik-link"}}),T.TextStyle,j.default.configure({placeholder:e.placeholder??"Type a message..."}),...e.onPaste?[B.PasteExtension.configure({onPaste:e.onPaste})]:[],F.PasteNormalizationExtension.configure({preserveMarks:s,plainOnly:!s}),L.SendShortcutExtension.configure({onSend:e.onSend,sendShortcut:e.sendShortcut,extraShortcuts:e.shortcuts??[]}),w.VariableDecorationExtension,...e.maxCharacters?[A.default.configure({limit:e.maxCharacters})]:[],I.SectionDividerNode],h=[...e.mentions?.agents?[i.buildAgentMentionExtension(e.mentions.agents,e.onMentionSelected,e.renderMentionItem,e.renderMentionDropdown,e.removeMentionTriggerOnDismiss)]:[],...e.mentions?.teams?[i.buildTeamMentionExtension(e.mentions.teams,e.onMentionSelected,e.renderMentionItem,e.renderMentionDropdown,e.removeMentionTriggerOnDismiss)]:[],...e.slashCommands?[O.buildSlashCommandExtension(e.slashCommands,e.onSlashCommandSelected,e.renderSlashCommandItem,e.renderSlashCommandDropdown)]:[]],p=u?[l.default,R.default.configure({multicolor:!0}),z.default,H.FontSizeExtension,W.default.configure({types:["heading","paragraph"]}),U.default,V.default,v.default]:[l.default];return[...m,...h,...p]}exports.buildExtensions=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("@tiptap/extension-character-count"),E=require("@tiptap/extension-color"),b=require("@tiptap/extension-font-family"),k=require("@tiptap/extension-hard-break"),M=require("@tiptap/extension-highlight"),C=require("@tiptap/extension-image"),y=require("@tiptap/extension-link"),P=require("../../node_modules/@tiptap/extension-paragraph/dist/index.js"),T=require("@tiptap/extension-placeholder"),g=require("@tiptap/extension-subscript"),D=require("@tiptap/extension-superscript"),H=require("@tiptap/extension-text-align"),L=require("@tiptap/extension-text-style"),B=require("@tiptap/extension-underline"),F=require("@tiptap/starter-kit"),I=require("./FontSizeExtension.js"),O=require("./jsonHighlight/JsonHighlightExtension.js"),i=require("./mention/MentionExtension.js"),w=require("./paste/PasteExtension.js"),z=require("./plainClipboard/PasteNormalizationExtension.js"),A=require("./sectionDivider/SectionDividerNode.js"),l=require("./sendShortcut/SendShortcutExtension.js"),R=require("./slashCommand/SlashCommandExtension.js"),N=require("./variable/VariableDecorationExtension.js"),t=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},u=t(q),d=t(E),j=t(b),v=t(k),K=t(M),J=t(C),U=t(y),c=t(T),V=t(g),W=t(D),Z=t(H),G=t(B),h=t(F);function Q(e){if(e.features?.jsonMode)return[h.default.configure({link:!1,underline:!1,bold:!1,italic:!1,strike:!1,code:!1,heading:!1,bulletList:!1,orderedList:!1,blockquote:!1,horizontalRule:!1}),c.default.configure({placeholder:e.placeholder??`{
2
+
3
+ }`}),O.JsonHighlightExtension,l.SendShortcutExtension.configure({onSend:e.onSend,sendShortcut:e.sendShortcut,extraShortcuts:e.shortcuts??[]}),...e.maxCharacters?[u.default.configure({limit:e.maxCharacters})]:[]];const s=e.features?.richPaste??!1,m=e.features?.richTypography??!1,a=e.features?.allowedMarks,r=n=>!a||a.includes(n),f=v.default.extend({addKeyboardShortcuts(){return{"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),o=n=>n==="0"||n==="0px"||n==="0pt"||n==="0em",S=P.default.extend({addAttributes(){return{...this.parent?.()??{},margin:{default:null,parseHTML:n=>o(n.style.marginTop)&&o(n.style.marginBottom)?"0":null,renderHTML:n=>n.margin==="0"?{style:"margin: 0px"}:{}}}}}),p=[h.default.configure({link:!1,underline:!1,hardBreak:!1,paragraph:!1,bold:r("bold")?{}:!1,italic:r("italic")?{}:!1,strike:r("strike")?{}:!1,code:r("code")?{}:!1}),S,f,...r("underline")?[G.default]:[],U.default.extend({addPasteRules:()=>[],addInputRules:()=>[]}).configure({openOnClick:!1,autolink:!1,linkOnPaste:!1,HTMLAttributes:{rel:"noopener noreferrer",class:"bik-link"}}),L.TextStyle,c.default.configure({placeholder:e.placeholder??"Type a message..."}),...e.onPaste?[w.PasteExtension.configure({onPaste:e.onPaste})]:[],z.PasteNormalizationExtension.configure({preserveMarks:s,plainOnly:!s}),l.SendShortcutExtension.configure({onSend:e.onSend,sendShortcut:e.sendShortcut,extraShortcuts:e.shortcuts??[]}),N.VariableDecorationExtension,...e.maxCharacters?[u.default.configure({limit:e.maxCharacters})]:[],A.SectionDividerNode],x=[...e.mentions?.agents?[i.buildAgentMentionExtension(e.mentions.agents,e.onMentionSelected,e.renderMentionItem,e.renderMentionDropdown,e.removeMentionTriggerOnDismiss)]:[],...e.mentions?.teams?[i.buildTeamMentionExtension(e.mentions.teams,e.onMentionSelected,e.renderMentionItem,e.renderMentionDropdown,e.removeMentionTriggerOnDismiss)]:[],...e.slashCommands?[R.buildSlashCommandExtension(e.slashCommands,e.onSlashCommandSelected,e.renderSlashCommandItem,e.renderSlashCommandDropdown)]:[]],_=m?[d.default,K.default.configure({multicolor:!0}),j.default,I.FontSizeExtension,Z.default.configure({types:["heading","paragraph"]}),V.default,W.default,J.default]:[d.default];return[...p,...x,..._]}exports.buildExtensions=Q;
2
4
  //# sourceMappingURL=buildExtensions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildExtensions.js","sources":["../../../../src/editor/extensions/buildExtensions.ts"],"sourcesContent":["import CharacterCount from '@tiptap/extension-character-count';\nimport Color from '@tiptap/extension-color';\nimport FontFamily from '@tiptap/extension-font-family';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Highlight from '@tiptap/extension-highlight';\nimport Image from '@tiptap/extension-image';\nimport Link from '@tiptap/extension-link';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Subscript from '@tiptap/extension-subscript';\nimport Superscript from '@tiptap/extension-superscript';\nimport TextAlign from '@tiptap/extension-text-align';\nimport { TextStyle } from '@tiptap/extension-text-style';\nimport Underline from '@tiptap/extension-underline';\nimport StarterKit from '@tiptap/starter-kit';\nimport type { ReactNode } from 'react';\nimport type {\n\tEditorFeatures,\n\tEditorSnapshot,\n\tKeyboardShortcut,\n\tMentionDropdownRenderProps,\n\tMentionItem,\n\tPasteData,\n\tSlashCommandDropdownRenderProps,\n\tSlashCommandItem,\n} from '../BikEditor.types';\nimport { FontSizeExtension } from './FontSizeExtension';\nimport {\n\tbuildAgentMentionExtension,\n\tbuildTeamMentionExtension,\n} from './mention/MentionExtension';\nimport { PasteExtension } from './paste/PasteExtension';\nimport { PasteNormalizationExtension } from './plainClipboard/PasteNormalizationExtension';\nimport { SectionDividerNode } from './sectionDivider/SectionDividerNode';\nimport { SendShortcutExtension } from './sendShortcut/SendShortcutExtension';\nimport { buildSlashCommandExtension } from './slashCommand/SlashCommandExtension';\nimport { VariableDecorationExtension } from './variable/VariableDecorationExtension';\n\ninterface ExtensionConfig {\n\tfeatures?: EditorFeatures;\n\tplaceholder?: string;\n\tmaxCharacters?: number;\n\thasSections?: boolean;\n\tmentions?: {\n\t\tagents?: { current: MentionItem[] };\n\t\tteams?: { current: MentionItem[] };\n\t};\n\tslashCommands?: { current: SlashCommandItem[] };\n\tonPaste?: (data: PasteData) => boolean | void;\n\tonSend?: (content: EditorSnapshot) => void;\n\tsendShortcut?:\n\t\t| { key: string; modifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'> }\n\t\t| Array<{\n\t\t\t\tkey: string;\n\t\t\t\tmodifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'>;\n\t\t }>;\n\tshortcuts?: KeyboardShortcut[];\n\tonMentionSelected?: (item: MentionItem, char: '@' | '#') => void;\n\tonSlashCommandSelected?: (command: SlashCommandItem) => void;\n\trenderMentionItem?: (item: MentionItem, isActive: boolean) => ReactNode;\n\trenderMentionDropdown?: (props: MentionDropdownRenderProps) => ReactNode;\n\tremoveMentionTriggerOnDismiss?: boolean;\n\trenderSlashCommandItem?: (\n\t\titem: SlashCommandItem,\n\t\tisActive: boolean,\n\t) => ReactNode;\n\trenderSlashCommandDropdown?: (\n\t\tprops: SlashCommandDropdownRenderProps,\n\t) => ReactNode;\n}\n\nexport function buildExtensions(config: ExtensionConfig) {\n\tconst hasRichPaste = config.features?.richPaste ?? false;\n\tconst hasRichTypography = config.features?.richTypography ?? false;\n\n\t// When allowedMarks is specified only those marks are registered in the schema.\n\t// This disables rendering, keyboard shortcuts AND paste-preservation for the\n\t// excluded marks — all three come for free when the extension is absent.\n\tconst allowedMarks = config.features?.allowedMarks;\n\tconst isMark = (m: 'bold' | 'italic' | 'strike' | 'underline' | 'code') =>\n\t\t!allowedMarks || allowedMarks.includes(m);\n\n\t// Soft line break. Shift-Enter inserts a <br> inside the current block\n\t// (matches Gmail); plain Enter still splits the block into a new paragraph\n\t// via StarterKit's default. HardBreak is registered standalone — like Link\n\t// and Underline above — instead of through StarterKit, so we can bind ONLY\n\t// Shift-Enter here and leave Mod-Enter free for the send shortcut.\n\tconst softBreak = HardBreak.extend({\n\t\taddKeyboardShortcuts() {\n\t\t\treturn {\n\t\t\t\t'Shift-Enter': () => this.editor.commands.setHardBreak(),\n\t\t\t};\n\t\t},\n\t});\n\n\t// Paragraph that preserves a zero block-margin from the source (Gmail-style).\n\t// Most sources (ChatGPT, typed text) use plain <p> → no margin attr → the\n\t// editor/viewer default 1em margin provides the gap. Google-Docs-style\n\t// content uses margin:0 paragraphs and a separate blank-line paragraph for\n\t// spacing; we keep that margin:0 so the blank line — not stacked margins —\n\t// provides a single-line gap, exactly like Gmail. The paste pipeline also\n\t// sets margin:'0' on every paragraph when a paste contains blank-line\n\t// paragraphs (see applyParagraphSpacing), so spacing comes from EITHER the\n\t// margin OR the blank line, never both (no double gap).\n\tconst isZeroLen = (v: string) =>\n\t\tv === '0' || v === '0px' || v === '0pt' || v === '0em';\n\tconst ParagraphWithMargin = Paragraph.extend({\n\t\taddAttributes() {\n\t\t\treturn {\n\t\t\t\t...(this.parent?.() ?? {}),\n\t\t\t\tmargin: {\n\t\t\t\t\tdefault: null,\n\t\t\t\t\tparseHTML: (el: HTMLElement) =>\n\t\t\t\t\t\tisZeroLen(el.style.marginTop) && isZeroLen(el.style.marginBottom)\n\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\trenderHTML: (attrs: { margin?: string | null }) =>\n\t\t\t\t\t\tattrs.margin === '0' ? { style: 'margin: 0px' } : {},\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t});\n\n\tconst base = [\n\t\t// Exclude Link and Underline from StarterKit — TipTap v3 bundles both.\n\t\t// Without this, two copies of each are registered and the StarterKit copy's\n\t\t// click handler calls window.open even when openOnClick: false is set.\n\t\tStarterKit.configure({\n\t\t\tlink: false,\n\t\t\tunderline: false,\n\t\t\thardBreak: false,\n\t\t\tparagraph: false,\n\t\t\tbold: isMark('bold') ? {} : false,\n\t\t\titalic: isMark('italic') ? {} : false,\n\t\t\tstrike: isMark('strike') ? {} : false,\n\t\t\tcode: isMark('code') ? {} : false,\n\t\t}),\n\t\tParagraphWithMargin,\n\t\tsoftBreak,\n\t\t...(isMark('underline') ? [Underline] : []),\n\t\t// Extend Link to strip addPasteRules() and addInputRules() so pasting a\n\t\t// URL never creates a hyperlink regardless of autolink/linkOnPaste values.\n\t\tLink.extend({\n\t\t\taddPasteRules: () => [],\n\t\t\taddInputRules: () => [],\n\t\t}).configure({\n\t\t\topenOnClick: false,\n\t\t\tautolink: false,\n\t\t\tlinkOnPaste: false,\n\t\t\tHTMLAttributes: {\n\t\t\t\trel: 'noopener noreferrer',\n\t\t\t\tclass: 'bik-link',\n\t\t\t},\n\t\t}),\n\t\tTextStyle,\n\t\tPlaceholder.configure({\n\t\t\tplaceholder: config.placeholder ?? 'Type a message...',\n\t\t}),\n\t\t// Consumer paste callback runs first. If it returns true the event is\n\t\t// consumed and neither PlainClipboardExtension nor the editor's default\n\t\t// paste handling will run for that event.\n\t\t...(config.onPaste\n\t\t\t? [PasteExtension.configure({ onPaste: config.onPaste })]\n\t\t\t: []),\n\t\tPasteNormalizationExtension.configure({\n\t\t\tpreserveMarks: hasRichPaste,\n\t\t\t// Only email + signature (richPaste) keep the rich HTML paste pipeline.\n\t\t\t// Every other channel (WhatsApp, IG, FB, comments) forces plain-text\n\t\t\t// paste for BOTH Cmd/Ctrl+V and Cmd/Ctrl+Shift+V — no formatting.\n\t\t\tplainOnly: !hasRichPaste,\n\t\t}),\n\t\tSendShortcutExtension.configure({\n\t\t\tonSend: config.onSend,\n\t\t\tsendShortcut: config.sendShortcut,\n\t\t\textraShortcuts: config.shortcuts ?? [],\n\t\t}),\n\t\tVariableDecorationExtension,\n\t\t...(config.maxCharacters\n\t\t\t? [CharacterCount.configure({ limit: config.maxCharacters })]\n\t\t\t: []),\n\t\t// Always register SectionDividerNode so the custom <div data-section-divider>\n\t\t// node is part of the schema in every editor instance. This means imperative\n\t\t// callers (setBodyAndSections / setSectionContent) work even when no\n\t\t// `sections` prop was provided at mount time.\n\t\tSectionDividerNode,\n\t];\n\n\tconst mentionExtensions = [\n\t\t...(config.mentions?.agents\n\t\t\t? [\n\t\t\t\t\tbuildAgentMentionExtension(\n\t\t\t\t\t\tconfig.mentions.agents,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.mentions?.teams\n\t\t\t? [\n\t\t\t\t\tbuildTeamMentionExtension(\n\t\t\t\t\t\tconfig.mentions.teams,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.slashCommands\n\t\t\t? [\n\t\t\t\t\tbuildSlashCommandExtension(\n\t\t\t\t\t\tconfig.slashCommands,\n\t\t\t\t\t\tconfig.onSlashCommandSelected,\n\t\t\t\t\t\tconfig.renderSlashCommandItem,\n\t\t\t\t\t\tconfig.renderSlashCommandDropdown,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t];\n\n\tconst richExtensions = hasRichTypography\n\t\t? [\n\t\t\t\tColor,\n\t\t\t\tHighlight.configure({ multicolor: true }),\n\t\t\t\tFontFamily,\n\t\t\t\tFontSizeExtension,\n\t\t\t\tTextAlign.configure({ types: ['heading', 'paragraph'] }),\n\t\t\t\tSubscript,\n\t\t\t\tSuperscript,\n\t\t\t\tImage,\n\t\t ]\n\t\t: [Color];\n\n\treturn [...base, ...mentionExtensions, ...richExtensions];\n}\n"],"names":["buildExtensions","config","hasRichPaste","hasRichTypography","allowedMarks","isMark","m","softBreak","HardBreak","isZeroLen","v","ParagraphWithMargin","Paragraph","el","attrs","base","StarterKit","Underline","Link","TextStyle","Placeholder","PasteExtension","PasteNormalizationExtension","SendShortcutExtension","VariableDecorationExtension","CharacterCount","SectionDividerNode","mentionExtensions","buildAgentMentionExtension","buildTeamMentionExtension","buildSlashCommandExtension","richExtensions","Color","Highlight","FontFamily","FontSizeExtension","TextAlign","Subscript","Superscript","Image"],"mappings":"mvCAuEO,SAASA,EAAgBC,EAAyB,CACxD,MAAMC,EAAeD,EAAO,UAAU,WAAa,GAC7CE,EAAoBF,EAAO,UAAU,gBAAkB,GAKvDG,EAAeH,EAAO,UAAU,aAChCI,EAAUC,GACf,CAACF,GAAgBA,EAAa,SAASE,CAAC,EAOnCC,EAAYC,EAAAA,QAAU,OAAO,CAClC,sBAAuB,CACtB,MAAO,CACN,cAAe,IAAM,KAAK,OAAO,SAAS,aAAA,CAAa,CAEzD,CAAA,CACA,EAWKC,EAAaC,GAClBA,IAAM,KAAOA,IAAM,OAASA,IAAM,OAASA,IAAM,MAC5CC,EAAsBC,EAAAA,QAAU,OAAO,CAC5C,eAAgB,CACf,MAAO,CACN,GAAI,KAAK,SAAA,GAAc,CAAA,EACvB,OAAQ,CACP,QAAS,KACT,UAAYC,GACXJ,EAAUI,EAAG,MAAM,SAAS,GAAKJ,EAAUI,EAAG,MAAM,YAAY,EAC7D,IACA,KACJ,WAAaC,GACZA,EAAM,SAAW,IAAM,CAAE,MAAO,eAAkB,CAAA,CAAC,CACrD,CAEF,CAAA,CACA,EAEKC,EAAO,CAIZC,EAAAA,QAAW,UAAU,CACpB,KAAM,GACN,UAAW,GACX,UAAW,GACX,UAAW,GACX,KAAMX,EAAO,MAAM,EAAI,CAAA,EAAK,GAC5B,OAAQA,EAAO,QAAQ,EAAI,CAAA,EAAK,GAChC,OAAQA,EAAO,QAAQ,EAAI,CAAA,EAAK,GAChC,KAAMA,EAAO,MAAM,EAAI,GAAK,EAAA,CAC5B,EACDM,EACAJ,EACA,GAAIF,EAAO,WAAW,EAAI,CAACY,EAAAA,OAAS,EAAI,CAAA,EAGxCC,EAAAA,QAAK,OAA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W,EAAG,EACvDC,EAAAA,QACAC,EAAAA,QACAC,EAAAA,OAAA,EAEA,CAACP,EAAAA,OAAK,EAET,MAAO,CAAC,GAAGjB,EAAM,GAAGY,EAAmB,GAAGI,CAAc,CACzD"}
1
+ {"version":3,"file":"buildExtensions.js","sources":["../../../../src/editor/extensions/buildExtensions.ts"],"sourcesContent":["import CharacterCount from '@tiptap/extension-character-count';\nimport Color from '@tiptap/extension-color';\nimport FontFamily from '@tiptap/extension-font-family';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Highlight from '@tiptap/extension-highlight';\nimport Image from '@tiptap/extension-image';\nimport Link from '@tiptap/extension-link';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Subscript from '@tiptap/extension-subscript';\nimport Superscript from '@tiptap/extension-superscript';\nimport TextAlign from '@tiptap/extension-text-align';\nimport { TextStyle } from '@tiptap/extension-text-style';\nimport Underline from '@tiptap/extension-underline';\nimport StarterKit from '@tiptap/starter-kit';\nimport type { ReactNode } from 'react';\nimport type {\n\tEditorFeatures,\n\tEditorSnapshot,\n\tKeyboardShortcut,\n\tMentionDropdownRenderProps,\n\tMentionItem,\n\tPasteData,\n\tSlashCommandDropdownRenderProps,\n\tSlashCommandItem,\n} from '../BikEditor.types';\nimport { FontSizeExtension } from './FontSizeExtension';\nimport { JsonHighlightExtension } from './jsonHighlight/JsonHighlightExtension';\nimport {\n\tbuildAgentMentionExtension,\n\tbuildTeamMentionExtension,\n} from './mention/MentionExtension';\nimport { PasteExtension } from './paste/PasteExtension';\nimport { PasteNormalizationExtension } from './plainClipboard/PasteNormalizationExtension';\nimport { SectionDividerNode } from './sectionDivider/SectionDividerNode';\nimport { SendShortcutExtension } from './sendShortcut/SendShortcutExtension';\nimport { buildSlashCommandExtension } from './slashCommand/SlashCommandExtension';\nimport { VariableDecorationExtension } from './variable/VariableDecorationExtension';\n\ninterface ExtensionConfig {\n\tfeatures?: EditorFeatures;\n\tplaceholder?: string;\n\tmaxCharacters?: number;\n\thasSections?: boolean;\n\tmentions?: {\n\t\tagents?: { current: MentionItem[] };\n\t\tteams?: { current: MentionItem[] };\n\t};\n\tslashCommands?: { current: SlashCommandItem[] };\n\tonPaste?: (data: PasteData) => boolean | void;\n\tonSend?: (content: EditorSnapshot) => void;\n\tsendShortcut?:\n\t\t| { key: string; modifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'> }\n\t\t| Array<{\n\t\t\t\tkey: string;\n\t\t\t\tmodifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'>;\n\t\t }>;\n\tshortcuts?: KeyboardShortcut[];\n\tonMentionSelected?: (item: MentionItem, char: '@' | '#') => void;\n\tonSlashCommandSelected?: (command: SlashCommandItem) => void;\n\trenderMentionItem?: (item: MentionItem, isActive: boolean) => ReactNode;\n\trenderMentionDropdown?: (props: MentionDropdownRenderProps) => ReactNode;\n\tremoveMentionTriggerOnDismiss?: boolean;\n\trenderSlashCommandItem?: (\n\t\titem: SlashCommandItem,\n\t\tisActive: boolean,\n\t) => ReactNode;\n\trenderSlashCommandDropdown?: (\n\t\tprops: SlashCommandDropdownRenderProps,\n\t) => ReactNode;\n}\n\nexport function buildExtensions(config: ExtensionConfig) {\n\t// JSON body mode is a dedicated code editor — it deliberately skips the rich\n\t// text stack (mentions, typography, rich paste, sections) and turns the whole\n\t// document into one syntax-highlighted JSON code block, Postman-style.\n\tif (config.features?.jsonMode) {\n\t\treturn [\n\t\t\tStarterKit.configure({\n\t\t\t\tlink: false,\n\t\t\t\tunderline: false,\n\t\t\t\t// Keep codeBlock (the JSON container) and history; drop everything\n\t\t\t\t// that has no meaning inside raw JSON.\n\t\t\t\tbold: false,\n\t\t\t\titalic: false,\n\t\t\t\tstrike: false,\n\t\t\t\tcode: false,\n\t\t\t\theading: false,\n\t\t\t\tbulletList: false,\n\t\t\t\torderedList: false,\n\t\t\t\tblockquote: false,\n\t\t\t\thorizontalRule: false,\n\t\t\t}),\n\t\t\tPlaceholder.configure({\n\t\t\t\tplaceholder: config.placeholder ?? '{\\n \\n}',\n\t\t\t}),\n\t\t\tJsonHighlightExtension,\n\t\t\tSendShortcutExtension.configure({\n\t\t\t\tonSend: config.onSend,\n\t\t\t\tsendShortcut: config.sendShortcut,\n\t\t\t\textraShortcuts: config.shortcuts ?? [],\n\t\t\t}),\n\t\t\t...(config.maxCharacters\n\t\t\t\t? [CharacterCount.configure({ limit: config.maxCharacters })]\n\t\t\t\t: []),\n\t\t];\n\t}\n\n\tconst hasRichPaste = config.features?.richPaste ?? false;\n\tconst hasRichTypography = config.features?.richTypography ?? false;\n\n\t// When allowedMarks is specified only those marks are registered in the schema.\n\t// This disables rendering, keyboard shortcuts AND paste-preservation for the\n\t// excluded marks — all three come for free when the extension is absent.\n\tconst allowedMarks = config.features?.allowedMarks;\n\tconst isMark = (m: 'bold' | 'italic' | 'strike' | 'underline' | 'code') =>\n\t\t!allowedMarks || allowedMarks.includes(m);\n\n\t// Soft line break. Shift-Enter inserts a <br> inside the current block\n\t// (matches Gmail); plain Enter still splits the block into a new paragraph\n\t// via StarterKit's default. HardBreak is registered standalone — like Link\n\t// and Underline above — instead of through StarterKit, so we can bind ONLY\n\t// Shift-Enter here and leave Mod-Enter free for the send shortcut.\n\tconst softBreak = HardBreak.extend({\n\t\taddKeyboardShortcuts() {\n\t\t\treturn {\n\t\t\t\t'Shift-Enter': () => this.editor.commands.setHardBreak(),\n\t\t\t};\n\t\t},\n\t});\n\n\t// Paragraph that preserves a zero block-margin from the source (Gmail-style).\n\t// Most sources (ChatGPT, typed text) use plain <p> → no margin attr → the\n\t// editor/viewer default 1em margin provides the gap. Google-Docs-style\n\t// content uses margin:0 paragraphs and a separate blank-line paragraph for\n\t// spacing; we keep that margin:0 so the blank line — not stacked margins —\n\t// provides a single-line gap, exactly like Gmail. The paste pipeline also\n\t// sets margin:'0' on every paragraph when a paste contains blank-line\n\t// paragraphs (see applyParagraphSpacing), so spacing comes from EITHER the\n\t// margin OR the blank line, never both (no double gap).\n\tconst isZeroLen = (v: string) =>\n\t\tv === '0' || v === '0px' || v === '0pt' || v === '0em';\n\tconst ParagraphWithMargin = Paragraph.extend({\n\t\taddAttributes() {\n\t\t\treturn {\n\t\t\t\t...(this.parent?.() ?? {}),\n\t\t\t\tmargin: {\n\t\t\t\t\tdefault: null,\n\t\t\t\t\tparseHTML: (el: HTMLElement) =>\n\t\t\t\t\t\tisZeroLen(el.style.marginTop) && isZeroLen(el.style.marginBottom)\n\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\trenderHTML: (attrs: { margin?: string | null }) =>\n\t\t\t\t\t\tattrs.margin === '0' ? { style: 'margin: 0px' } : {},\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t});\n\n\tconst base = [\n\t\t// Exclude Link and Underline from StarterKit — TipTap v3 bundles both.\n\t\t// Without this, two copies of each are registered and the StarterKit copy's\n\t\t// click handler calls window.open even when openOnClick: false is set.\n\t\tStarterKit.configure({\n\t\t\tlink: false,\n\t\t\tunderline: false,\n\t\t\thardBreak: false,\n\t\t\tparagraph: false,\n\t\t\tbold: isMark('bold') ? {} : false,\n\t\t\titalic: isMark('italic') ? {} : false,\n\t\t\tstrike: isMark('strike') ? {} : false,\n\t\t\tcode: isMark('code') ? {} : false,\n\t\t}),\n\t\tParagraphWithMargin,\n\t\tsoftBreak,\n\t\t...(isMark('underline') ? [Underline] : []),\n\t\t// Extend Link to strip addPasteRules() and addInputRules() so pasting a\n\t\t// URL never creates a hyperlink regardless of autolink/linkOnPaste values.\n\t\tLink.extend({\n\t\t\taddPasteRules: () => [],\n\t\t\taddInputRules: () => [],\n\t\t}).configure({\n\t\t\topenOnClick: false,\n\t\t\tautolink: false,\n\t\t\tlinkOnPaste: false,\n\t\t\tHTMLAttributes: {\n\t\t\t\trel: 'noopener noreferrer',\n\t\t\t\tclass: 'bik-link',\n\t\t\t},\n\t\t}),\n\t\tTextStyle,\n\t\tPlaceholder.configure({\n\t\t\tplaceholder: config.placeholder ?? 'Type a message...',\n\t\t}),\n\t\t// Consumer paste callback runs first. If it returns true the event is\n\t\t// consumed and neither PlainClipboardExtension nor the editor's default\n\t\t// paste handling will run for that event.\n\t\t...(config.onPaste\n\t\t\t? [PasteExtension.configure({ onPaste: config.onPaste })]\n\t\t\t: []),\n\t\tPasteNormalizationExtension.configure({\n\t\t\tpreserveMarks: hasRichPaste,\n\t\t\t// Only email + signature (richPaste) keep the rich HTML paste pipeline.\n\t\t\t// Every other channel (WhatsApp, IG, FB, comments) forces plain-text\n\t\t\t// paste for BOTH Cmd/Ctrl+V and Cmd/Ctrl+Shift+V — no formatting.\n\t\t\tplainOnly: !hasRichPaste,\n\t\t}),\n\t\tSendShortcutExtension.configure({\n\t\t\tonSend: config.onSend,\n\t\t\tsendShortcut: config.sendShortcut,\n\t\t\textraShortcuts: config.shortcuts ?? [],\n\t\t}),\n\t\tVariableDecorationExtension,\n\t\t...(config.maxCharacters\n\t\t\t? [CharacterCount.configure({ limit: config.maxCharacters })]\n\t\t\t: []),\n\t\t// Always register SectionDividerNode so the custom <div data-section-divider>\n\t\t// node is part of the schema in every editor instance. This means imperative\n\t\t// callers (setBodyAndSections / setSectionContent) work even when no\n\t\t// `sections` prop was provided at mount time.\n\t\tSectionDividerNode,\n\t];\n\n\tconst mentionExtensions = [\n\t\t...(config.mentions?.agents\n\t\t\t? [\n\t\t\t\t\tbuildAgentMentionExtension(\n\t\t\t\t\t\tconfig.mentions.agents,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.mentions?.teams\n\t\t\t? [\n\t\t\t\t\tbuildTeamMentionExtension(\n\t\t\t\t\t\tconfig.mentions.teams,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.slashCommands\n\t\t\t? [\n\t\t\t\t\tbuildSlashCommandExtension(\n\t\t\t\t\t\tconfig.slashCommands,\n\t\t\t\t\t\tconfig.onSlashCommandSelected,\n\t\t\t\t\t\tconfig.renderSlashCommandItem,\n\t\t\t\t\t\tconfig.renderSlashCommandDropdown,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t];\n\n\tconst richExtensions = hasRichTypography\n\t\t? [\n\t\t\t\tColor,\n\t\t\t\tHighlight.configure({ multicolor: true }),\n\t\t\t\tFontFamily,\n\t\t\t\tFontSizeExtension,\n\t\t\t\tTextAlign.configure({ types: ['heading', 'paragraph'] }),\n\t\t\t\tSubscript,\n\t\t\t\tSuperscript,\n\t\t\t\tImage,\n\t\t ]\n\t\t: [Color];\n\n\treturn [...base, ...mentionExtensions, ...richExtensions];\n}\n"],"names":["buildExtensions","config","StarterKit","Placeholder","JsonHighlightExtension","SendShortcutExtension","CharacterCount","hasRichPaste","hasRichTypography","allowedMarks","isMark","m","softBreak","HardBreak","isZeroLen","v","ParagraphWithMargin","Paragraph","el","attrs","base","Underline","Link","TextStyle","PasteExtension","PasteNormalizationExtension","VariableDecorationExtension","SectionDividerNode","mentionExtensions","buildAgentMentionExtension","buildTeamMentionExtension","buildSlashCommandExtension","richExtensions","Color","Highlight","FontFamily","FontSizeExtension","TextAlign","Subscript","Superscript","Image"],"mappings":"0yCAwEO,SAASA,EAAgBC,EAAyB,CAIxD,GAAIA,EAAO,UAAU,SACpB,MAAO,CACNC,EAAAA,QAAW,UAAU,CACpB,KAAM,GACN,UAAW,GAGX,KAAM,GACN,OAAQ,GACR,OAAQ,GACR,KAAM,GACN,QAAS,GACT,WAAY,GACZ,YAAa,GACb,WAAY,GACZ,eAAgB,EAAA,CAChB,E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ACxCC,EAAAA,QACAC,EAAAA,kBACAC,EAAAA,QAAU,UAAU,CAAE,MAAO,CAAC,UAAW,WAAW,EAAG,EACvDC,EAAAA,QACAC,EAAAA,QACAC,EAAAA,OAAA,EAEA,CAACP,EAAAA,OAAK,EAET,MAAO,CAAC,GAAGb,EAAM,GAAGQ,EAAmB,GAAGI,CAAc,CACzD"}
@@ -0,0 +1,4 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../../node_modules/@tiptap/core/dist/index.js"),a=require("@tiptap/pm/state"),u=require("@tiptap/pm/view"),f=require("./tokenizeJson.js"),h={key:"bik-json-key",string:"bik-json-string",number:"bik-json-number",boolean:"bik-json-boolean",null:"bik-json-null",punctuation:"bik-json-punct"};function p(i){const e=document.createElement("span");return e.className="bik-json-lineno",e.textContent=String(i),e.setAttribute("contenteditable","false"),e}const k=g.Extension.create({name:"jsonHighlight",priority:1e3,addKeyboardShortcuts(){return{Backspace:()=>{const{selection:i}=this.editor.state,{empty:e,$from:t}=i;return e&&t.parent.type.name==="codeBlock"&&t.parentOffset===0}}},addProseMirrorPlugins(){return[new a.Plugin({key:new a.PluginKey("jsonHighlightGuard"),appendTransaction(i,e,t){if(!i.some(d=>d.docChanged))return null;const{doc:r,schema:s}=t,o=s.nodes.codeBlock;if(!o||r.childCount===1&&r.firstChild?.type===o)return null;let l=!1;if(r.forEach(d=>{d.type===o&&(l=!0)}),l)return null;const n=r.textBetween(0,r.content.size,`
2
+ `),c=t.tr;return c.replaceWith(0,r.content.size,o.create(null,n?s.text(n):null)),c.setSelection(a.TextSelection.create(c.doc,1)),c}}),new a.Plugin({key:new a.PluginKey("jsonHighlight"),props:{handlePaste(i,e){const t=e.clipboardData?.getData("text/plain");if(!t||!t.trim())return!1;let r;try{r=JSON.parse(t)}catch{return!1}const s=JSON.stringify(r,null,2);if(s===t)return!1;const{state:o,dispatch:l}=i,{from:n,to:c}=o.selection;return l(o.tr.insertText(s,n,c).scrollIntoView()),!0},decorations(i){const e=[];return i.doc.descendants((t,r)=>{if(t.type.name!=="codeBlock")return;const s=t.textContent,o=r+1;for(const n of f.tokenizeJson(s))e.push(u.Decoration.inline(o+n.start,o+n.end,{class:h[n.type]}));let l=1;e.push(u.Decoration.widget(o,()=>p(1),{side:-1,key:"ln-1"}));for(let n=0;n<s.length;n++){if(s[n]!==`
3
+ `)continue;l+=1;const c=l;e.push(u.Decoration.widget(o+n+1,()=>p(c),{side:-1,key:`ln-${c}`}))}}),u.DecorationSet.create(i.doc,e)}}})]}});exports.JsonHighlightExtension=k;
4
+ //# sourceMappingURL=JsonHighlightExtension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonHighlightExtension.js","sources":["../../../../../src/editor/extensions/jsonHighlight/JsonHighlightExtension.ts"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey, TextSelection } from '@tiptap/pm/state';\nimport { Decoration, DecorationSet } from '@tiptap/pm/view';\nimport { JsonTokenType, tokenizeJson } from './tokenizeJson';\n\nconst CLASS_BY_TYPE: Record<JsonTokenType, string> = {\n\tkey: 'bik-json-key',\n\tstring: 'bik-json-string',\n\tnumber: 'bik-json-number',\n\tboolean: 'bik-json-boolean',\n\tnull: 'bik-json-null',\n\tpunctuation: 'bik-json-punct',\n};\n\n/** Line-number widget rendered in the hanging gutter at each line start. */\nfunction lineNumberWidget(n: number): HTMLElement {\n\tconst span = document.createElement('span');\n\tspan.className = 'bik-json-lineno';\n\tspan.textContent = String(n);\n\tspan.setAttribute('contenteditable', 'false');\n\treturn span;\n}\n\n/**\n * Colours JSON tokens inside `codeBlock` nodes and renders a line-number gutter.\n * A code block stores its whole multi-line body in a single text node, so token\n * offsets map 1:1 onto document positions (`nodeStart + offset`) — no cross-node\n * bookkeeping needed, and lines are just the `\\n`-separated runs of that text.\n *\n * Purely decorative: the document text is never rewritten, so undo/redo,\n * character count and the cursor all behave exactly as with plain text. The\n * gutter numbers are `side: -1` widgets that hang into the code block's left\n * padding (see `.bik-json-lineno` in BikEditor.styles.ts), so they never enter\n * the document text or shift character offsets.\n */\nexport const JsonHighlightExtension = Extension.create({\n\tname: 'jsonHighlight',\n\t// Above CodeBlock (default 100) so our Backspace handler runs first and can\n\t// veto CodeBlock's own \"clearNodes at start\" shortcut (which would lift the\n\t// block to a paragraph).\n\tpriority: 1000,\n\taddKeyboardShortcuts() {\n\t\treturn {\n\t\t\t// In JSON mode the document is a single code block. A Backspace at its very\n\t\t\t// start would lift it to a plain paragraph (killing the highlight, the\n\t\t\t// line-number gutter and the monospace font). There's nothing to delete\n\t\t\t// before the caret there anyway, so swallow it. Mid-text Backspace (and\n\t\t\t// deleting a leading `\\n` from line 2+) still works — those have\n\t\t\t// parentOffset > 0.\n\t\t\tBackspace: () => {\n\t\t\t\tconst { selection } = this.editor.state;\n\t\t\t\tconst { empty, $from } = selection;\n\t\t\t\treturn (\n\t\t\t\t\tempty &&\n\t\t\t\t\t$from.parent.type.name === 'codeBlock' &&\n\t\t\t\t\t$from.parentOffset === 0\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [\n\t\t\tnew Plugin({\n\t\t\t\tkey: new PluginKey('jsonHighlightGuard'),\n\t\t\t\t// jsonMode invariant: the whole document is ONE codeBlock. Several\n\t\t\t\t// default Backspace paths can lift it to a plain paragraph — and one\n\t\t\t\t// of them, TipTap core's `clearDocument` appendTransaction (fired when\n\t\t\t\t// the whole doc is selected then deleted, e.g. Cmd-A → Backspace),\n\t\t\t\t// runs AFTER our Backspace shortcut, so a keymap veto can't stop it.\n\t\t\t\t// A paragraph has no gutter and no monospace rule, so the line numbers\n\t\t\t\t// and font vanish. Re-wrap the content back into a codeBlock whenever\n\t\t\t\t// something lifts it, restoring the invariant.\n\t\t\t\tappendTransaction(transactions, _oldState, newState) {\n\t\t\t\t\tif (!transactions.some((tr) => tr.docChanged)) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tconst { doc, schema } = newState;\n\t\t\t\t\tconst codeBlock = schema.nodes['codeBlock'];\n\t\t\t\t\tif (!codeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// Common case: already a single codeBlock → nothing to do.\n\t\t\t\t\tif (doc.childCount === 1 && doc.firstChild?.type === codeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// If a codeBlock survives anywhere, leave it alone (don't fight\n\t\t\t\t\t// legitimate multi-node edits that shouldn't happen in jsonMode).\n\t\t\t\t\tlet hasCodeBlock = false;\n\t\t\t\t\tdoc.forEach((node) => {\n\t\t\t\t\t\tif (node.type === codeBlock) {\n\t\t\t\t\t\t\thasCodeBlock = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (hasCodeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// A lift happened: rebuild a single codeBlock from the text\n\t\t\t\t\t// (block boundaries preserved as newlines, matching JSON lines).\n\t\t\t\t\tconst text = doc.textBetween(0, doc.content.size, '\\n');\n\t\t\t\t\tconst tr = newState.tr;\n\t\t\t\t\ttr.replaceWith(\n\t\t\t\t\t\t0,\n\t\t\t\t\t\tdoc.content.size,\n\t\t\t\t\t\tcodeBlock.create(null, text ? schema.text(text) : null),\n\t\t\t\t\t);\n\t\t\t\t\ttr.setSelection(TextSelection.create(tr.doc, 1));\n\t\t\t\t\treturn tr;\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew Plugin({\n\t\t\t\tkey: new PluginKey('jsonHighlight'),\n\t\t\t\tprops: {\n\t\t\t\t\t// Paste beautify: if the clipboard text is valid JSON, drop in a\n\t\t\t\t\t// pretty-printed version (2-space indent, matching the Beautify\n\t\t\t\t\t// button) instead of the raw blob. Non-JSON pastes fall through to\n\t\t\t\t\t// the default handler untouched.\n\t\t\t\t\thandlePaste(view, event) {\n\t\t\t\t\t\tconst raw = event.clipboardData?.getData('text/plain');\n\t\t\t\t\t\tif (!raw || !raw.trim()) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet value: unknown;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvalue = JSON.parse(raw);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst pretty = JSON.stringify(value, null, 2);\n\t\t\t\t\t\t// No-op if it was already beautified (avoids a redundant tx).\n\t\t\t\t\t\tif (pretty === raw) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst { state, dispatch } = view;\n\t\t\t\t\t\tconst { from, to } = state.selection;\n\t\t\t\t\t\tdispatch(state.tr.insertText(pretty, from, to).scrollIntoView());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t},\n\t\t\t\t\tdecorations(state) {\n\t\t\t\t\t\tconst decorations: Decoration[] = [];\n\t\t\t\t\t\tstate.doc.descendants((node, pos) => {\n\t\t\t\t\t\t\tif (node.type.name !== 'codeBlock') return;\n\t\t\t\t\t\t\tconst text = node.textContent;\n\t\t\t\t\t\t\t// +1: step past the code-block node boundary into its text.\n\t\t\t\t\t\t\tconst base = pos + 1;\n\n\t\t\t\t\t\t\tfor (const tok of tokenizeJson(text)) {\n\t\t\t\t\t\t\t\tdecorations.push(\n\t\t\t\t\t\t\t\t\tDecoration.inline(base + tok.start, base + tok.end, {\n\t\t\t\t\t\t\t\t\t\tclass: CLASS_BY_TYPE[tok.type],\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// One line number per `\\n`-separated line (line 1 at offset 0,\n\t\t\t\t\t\t\t// then one after every newline). `white-space: pre` on the block\n\t\t\t\t\t\t\t// disables wrapping, so logical lines == visual lines.\n\t\t\t\t\t\t\tlet line = 1;\n\t\t\t\t\t\t\tdecorations.push(\n\t\t\t\t\t\t\t\tDecoration.widget(base, () => lineNumberWidget(1), {\n\t\t\t\t\t\t\t\t\tside: -1,\n\t\t\t\t\t\t\t\t\tkey: 'ln-1',\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tfor (let i = 0; i < text.length; i++) {\n\t\t\t\t\t\t\t\tif (text[i] !== '\\n') continue;\n\t\t\t\t\t\t\t\tline += 1;\n\t\t\t\t\t\t\t\tconst n = line;\n\t\t\t\t\t\t\t\tdecorations.push(\n\t\t\t\t\t\t\t\t\tDecoration.widget(base + i + 1, () => lineNumberWidget(n), {\n\t\t\t\t\t\t\t\t\t\tside: -1,\n\t\t\t\t\t\t\t\t\t\tkey: `ln-${n}`,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn DecorationSet.create(state.doc, decorations);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t];\n\t},\n});\n"],"names":["CLASS_BY_TYPE","lineNumberWidget","n","span","JsonHighlightExtension","Extension","selection","empty","$from","Plugin","PluginKey","transactions","_oldState","newState","tr","doc","schema","codeBlock","hasCodeBlock","node","text","TextSelection","view","event","raw","value","pretty","state","dispatch","from","to","decorations","pos","base","tok","tokenizeJson","Decoration","line","i","DecorationSet"],"mappings":"8OAKMA,EAA+C,CACpD,IAAK,eACL,OAAQ,kBACR,OAAQ,kBACR,QAAS,mBACT,KAAM,gBACN,YAAa,gBACd,EAGA,SAASC,EAAiBC,EAAwB,CACjD,MAAMC,EAAO,SAAS,cAAc,MAAM,EAC1C,OAAAA,EAAK,UAAY,kBACjBA,EAAK,YAAc,OAAOD,CAAC,EAC3BC,EAAK,aAAa,kBAAmB,OAAO,EACrCA,CACR,CAcO,MAAMC,EAAyBC,EAAAA,UAAU,OAAO,CACtD,KAAM,gBAIN,SAAU,IACV,sBAAuB,CACtB,MAAO,CAON,UAAW,IA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|\b(true|false)\b|\bnull\b|([{}[\],:])/g;function a(t,l){let e=l;for(;/\s/.test(t.charAt(e));)e++;return t.charAt(e)===":"}function b(t){const l=[];u.lastIndex=0;let e;for(;(e=u.exec(t))!==null;){const[o,r,c,d]=e,s=e.index,i=s+o.length;let n;r!==void 0?n=a(t,i)?"key":"string":c!==void 0?n="number":d!==void 0?n="boolean":o==="null"?n="null":n="punctuation",l.push({start:s,end:i,type:n})}return l}exports.tokenizeJson=b;
2
+ //# sourceMappingURL=tokenizeJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenizeJson.js","sources":["../../../../../src/editor/extensions/jsonHighlight/tokenizeJson.ts"],"sourcesContent":["/**\n * Minimal, dependency-free JSON tokenizer used for syntax highlighting.\n *\n * It is a LEXER, not a parser — it never rejects input. Given any string it\n * returns the ranges it recognises as JSON tokens and leaves everything else\n * (whitespace, malformed fragments) undecorated. This is exactly what a code\n * editor wants: highlight the valid-looking parts even while the user is still\n * typing invalid JSON.\n *\n * Offsets are 0-based indexes into `text`; `end` is exclusive.\n */\nexport type JsonTokenType =\n\t| 'key'\n\t| 'string'\n\t| 'number'\n\t| 'boolean'\n\t| 'null'\n\t| 'punctuation';\n\nexport interface JsonToken {\n\tstart: number;\n\tend: number;\n\ttype: JsonTokenType;\n}\n\n// One regex, alternation ordered so strings are matched before anything else.\n// Group 1 = string body (kept so we can peek past it for the `:` that marks a key).\nconst TOKEN_RE =\n\t/(\"(?:\\\\.|[^\"\\\\])*\")|(-?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|\\b(true|false)\\b|\\bnull\\b|([{}[\\],:])/g;\n\n/** Returns true if the next non-whitespace char after `index` is a colon. */\nfunction isFollowedByColon(text: string, index: number): boolean {\n\tlet i = index;\n\t// charAt returns '' past the end, so the loop terminates without bounds checks.\n\twhile (/\\s/.test(text.charAt(i))) i++;\n\treturn text.charAt(i) === ':';\n}\n\nexport function tokenizeJson(text: string): JsonToken[] {\n\tconst tokens: JsonToken[] = [];\n\tTOKEN_RE.lastIndex = 0;\n\tlet match: RegExpExecArray | null;\n\twhile ((match = TOKEN_RE.exec(text)) !== null) {\n\t\tconst [full, str, num, bool] = match;\n\t\tconst start = match.index;\n\t\tconst end = start + full.length;\n\t\tlet type: JsonTokenType;\n\t\tif (str !== undefined) {\n\t\t\t// A string is a KEY when the next meaningful char is `:` (object member).\n\t\t\ttype = isFollowedByColon(text, end) ? 'key' : 'string';\n\t\t} else if (num !== undefined) {\n\t\t\ttype = 'number';\n\t\t} else if (bool !== undefined) {\n\t\t\ttype = 'boolean';\n\t\t} else if (full === 'null') {\n\t\t\ttype = 'null';\n\t\t} else {\n\t\t\ttype = 'punctuation';\n\t\t}\n\t\ttokens.push({ start, end, type });\n\t}\n\treturn tokens;\n}\n"],"names":["TOKEN_RE","isFollowedByColon","text","index","i","tokenizeJson","tokens","match","full","str","num","bool","start","end","type"],"mappings":"gFA2BA,MAAMA,EACL,gGAGD,SAASC,EAAkBC,EAAcC,EAAwB,CAChE,IAAIC,EAAID,EAER,KAAO,KAAK,KAAKD,EAAK,OAAOE,CAAC,CAAC,GAAGA,IAClC,OAAOF,EAAK,OAAOE,CAAC,IAAM,GAC3B,CAEO,SAASC,EAAaH,EAA2B,CACvD,MAAMI,EAAsB,CAAA,EAC5BN,EAAS,UAAY,EACrB,IAAIO,EACJ,MAAQA,EAAQP,EAAS,KAAKE,CAAI,KAAO,MAAM,CAC9C,KAAM,CAACM,EAAMC,EAAKC,EAAKC,CAAI,EAAIJ,EACzBK,EAAQL,EAAM,MACdM,EAAMD,EAAQJ,EAAK,OACzB,IAAIM,EACAL,IAAQ,OAEXK,EAAOb,EAAkBC,EAAMW,CAAG,EAAI,MAAQ,SACpCH,IAAQ,OAClBI,EAAO,SACGH,IAAS,OACnBG,EAAO,UACGN,IAAS,OACnBM,EAAO,OAEPA,EAAO,cAERR,EAAO,KAAK,CAAE,MAAAM,EAAO,IAAAC,EAAK,KAAAC,EAAM,CACjC,CACA,OAAOR,CACR"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("react/jsx-runtime"),o=({size:e=24,color:r="currentColor",...l})=>{const t={width:e,height:e,color:r,...l};return C.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[C.jsx("path",{d:"M22 20C22.5523 20 23 20.4477 23 21C23 21.5523 22.5523 22 22 22H2C1.44772 22 1 21.5523 1 21C1 20.4477 1.44772 20 2 20H22Z",fill:"currentColor"}),C.jsx("path",{d:"M13.4697 5.46973C13.7626 5.17684 14.2374 5.17684 14.5303 5.46973C14.8232 5.76262 14.8232 6.23738 14.5303 6.53027L11.8633 9.19727C11.5704 9.48983 11.0955 9.49004 10.8027 9.19727L9.46973 7.86328C9.177 7.57037 9.17689 7.09557 9.46973 6.80273C9.76258 6.51007 10.2374 6.51006 10.5303 6.80273L11.333 7.60547L13.4697 5.46973Z",fill:"currentColor"}),C.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 1C14.953 1 17.373 3.17087 17.8945 6H19C20.4784 6 22 7.03126 22 8.66699V15.333C22 16.9687 20.4784 18 19 18H5C3.52161 18 2 16.9687 2 15.333V8.66699C2 7.03126 3.52161 6 5 6H6C6.03527 6 6.07017 6.00132 6.10449 6.00488C6.62417 3.17336 9.04531 1 12 1ZM6 8H5C4.26926 8 4 8.46177 4 8.66699V15.333C4 15.5382 4.26926 16 5 16H19C19.7307 16 20 15.5382 20 15.333V8.66699C20 8.46177 19.7307 8 19 8H17.9414C17.6538 10.1053 16.3225 11.8773 14.4844 12.7344C14.4676 12.7529 14.4492 12.7742 14.4287 12.7969C14.3191 12.918 14.1734 13.0804 14.0127 13.2588C13.6911 13.6156 13.3122 14.0366 13.0527 14.3252C12.4798 14.9624 11.4782 14.9378 10.9346 14.2832L9.72754 12.8281C7.77915 12.0113 6.35629 10.1834 6.05859 7.99707C6.03918 7.99819 6.01969 8 6 8ZM12 3C9.81732 3 8.00015 4.82793 8 7.14258C8 8.8488 8.99284 10.299 10.3906 10.9365L10.6748 11.0537L10.9297 11.1455L11.1025 11.3545L12.0303 12.4717C12.531 11.9152 13.1114 11.2712 13.1709 11.21L13.3125 11.0635L13.501 10.9844C14.956 10.3736 16 8.89206 16 7.14258C15.9999 4.82793 14.1827 3 12 3Z",fill:"currentColor"})]})};exports.default=o;
2
+ //# sourceMappingURL=ProductTour.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductTour.js","sources":["../../../../../src/icons/Actions/Common actions/ProductTour.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgProductTour = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M22 20C22.5523 20 23 20.4477 23 21C23 21.5523 22.5523 22 22 22H2C1.44772 22 1 21.5523 1 21C1 20.4477 1.44772 20 2 20H22Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M13.4697 5.46973C13.7626 5.17684 14.2374 5.17684 14.5303 5.46973C14.8232 5.76262 14.8232 6.23738 14.5303 6.53027L11.8633 9.19727C11.5704 9.48983 11.0955 9.49004 10.8027 9.19727L9.46973 7.86328C9.177 7.57037 9.17689 7.09557 9.46973 6.80273C9.76258 6.51007 10.2374 6.51006 10.5303 6.80273L11.333 7.60547L13.4697 5.46973Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M12 1C14.953 1 17.373 3.17087 17.8945 6H19C20.4784 6 22 7.03126 22 8.66699V15.333C22 16.9687 20.4784 18 19 18H5C3.52161 18 2 16.9687 2 15.333V8.66699C2 7.03126 3.52161 6 5 6H6C6.03527 6 6.07017 6.00132 6.10449 6.00488C6.62417 3.17336 9.04531 1 12 1ZM6 8H5C4.26926 8 4 8.46177 4 8.66699V15.333C4 15.5382 4.26926 16 5 16H19C19.7307 16 20 15.5382 20 15.333V8.66699C20 8.46177 19.7307 8 19 8H17.9414C17.6538 10.1053 16.3225 11.8773 14.4844 12.7344C14.4676 12.7529 14.4492 12.7742 14.4287 12.7969C14.3191 12.918 14.1734 13.0804 14.0127 13.2588C13.6911 13.6156 13.3122 14.0366 13.0527 14.3252C12.4798 14.9624 11.4782 14.9378 10.9346 14.2832L9.72754 12.8281C7.77915 12.0113 6.35629 10.1834 6.05859 7.99707C6.03918 7.99819 6.01969 8 6 8ZM12 3C9.81732 3 8.00015 4.82793 8 7.14258C8 8.8488 8.99284 10.299 10.3906 10.9365L10.6748 11.0537L10.9297 11.1455L11.1025 11.3545L12.0303 12.4717C12.531 11.9152 13.1114 11.2712 13.1709 11.21L13.3125 11.0635L13.501 10.9844C14.956 10.3736 16 8.89206 16 7.14258C15.9999 4.82793 14.1827 3 12 3Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgProductTour;\n"],"names":["SvgProductTour","size","color","rest","props","jsxs","jsx"],"mappings":"iJAMMA,EAAiB,CAAC,CACvB,KAAAC,EAAO,GACP,MAAAC,EAAQ,eACR,GAAGC,CACJ,IAAa,CACZ,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,KAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAA,CAAAE,EAAAA,IAAC,OAAA,CACA,EAAE,2HACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,EAAE,iUACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,8/BACF,KAAK,cAAA,CAAA,CACN,CAAA,CAAA,CAGH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),l=({size:C=24,color:t="currentColor",...r})=>{const o={width:C,height:C,color:t,...r};return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:e.jsx("path",{d:"M21 17.0003C21 16.2047 20.6837 15.4409 20.1211 14.8783C19.5585 14.3159 18.7955 14.0003 18 14.0003C16.8352 14.0003 15.0663 13.6977 14.253 12.2093H14.252L11.1221 6.47983C10.8574 5.99517 11.0359 5.38719 11.5205 5.12241C12.0052 4.85765 12.6132 5.03616 12.878 5.52084L16.0078 11.2503C16.2546 11.7019 16.9648 12.0003 18 12.0003C19.326 12.0003 20.5975 12.5267 21.5352 13.4642C22.4729 14.4019 23 15.6743 23 17.0003C22.9999 18.3263 22.4728 19.5979 21.5352 20.5355C20.5975 21.4731 19.326 22.0003 18 22.0003C17.4478 22.0003 17.0002 21.5525 17 21.0003C17 20.4481 17.4477 20.0003 18 20.0003C18.7956 20.0003 19.5585 19.6839 20.1211 19.1214C20.6837 18.5589 20.9999 17.7959 21 17.0003ZM1.71878 14.4749C2.00866 14.005 2.62472 13.859 3.09476 14.1488C3.56485 14.4387 3.71082 15.0547 3.42093 15.5248C3.15352 15.9584 3.00898 16.4768 3.00003 17.0062C3.00168 17.673 3.2252 18.3205 3.63577 18.846C4.04767 19.3732 4.62438 19.7475 5.27347 19.9095C5.92255 20.0715 6.60745 20.0123 7.21878 19.7406C7.83011 19.4688 8.33285 18.9999 8.64749 18.4095C8.64975 18.4053 8.65201 18.401 8.65433 18.3968C9.21258 17.3856 10.3185 15.98 12.0098 15.9798H18C18.5522 15.9798 18.9999 16.4276 19 16.9798C19 17.5321 18.5523 17.9798 18 17.9798H12.0098C11.5013 17.98 10.9069 18.455 10.4053 19.3636L10.4043 19.3626C9.87953 20.3404 9.04557 21.1168 8.03128 21.5677C7.01239 22.0206 5.87089 22.12 4.78909 21.8499C3.70726 21.5798 2.7461 20.9561 2.0596 20.0775C1.3731 19.1988 1.00038 18.1154 1.00003 17.0003C1.00003 16.9955 0.999962 16.9906 1.00003 16.9857C1.01244 16.1179 1.24757 15.2391 1.71878 14.4749ZM11.3575 1.04331C12.0191 0.954644 12.6919 0.999662 13.336 1.17514C13.9802 1.3507 14.5832 1.65358 15.1084 2.06577C15.6337 2.47794 16.0709 2.9916 16.3946 3.57553C16.6621 4.05853 16.4879 4.66718 16.0049 4.93491C15.522 5.20255 14.9134 5.028 14.6455 4.54526C14.4513 4.19494 14.1891 3.8863 13.8741 3.63901C13.5589 3.39172 13.197 3.21017 12.8106 3.10483C12.4241 2.99949 12.0201 2.97252 11.6231 3.02573C11.2262 3.07891 10.8441 3.21119 10.4991 3.4144C10.1539 3.61778 9.85224 3.88874 9.61331 4.2103C9.37448 4.53179 9.20256 4.8984 9.10745 5.28745C9.01242 5.67646 8.99599 6.08055 9.0596 6.47592C9.12264 6.86772 9.26263 7.24321 9.47171 7.58041C9.81393 8.10643 10.1323 8.75044 10.2813 9.44077C10.4318 10.1388 10.4188 10.9429 10.0088 11.6956L6.87894 17.4759C6.61595 17.9616 6.00912 18.1422 5.52347 17.8792C5.03808 17.6162 4.8582 17.0093 5.12112 16.5238L8.25101 10.7435L8.25296 10.7406C8.37091 10.5246 8.40769 10.2406 8.3262 9.86264C8.24328 9.47833 8.04819 9.05914 7.79202 8.66635C7.78858 8.66107 7.7856 8.6551 7.78226 8.64975C7.42837 8.0837 7.19103 7.45241 7.08499 6.79331C6.97899 6.13419 7.00654 5.46035 7.16507 4.81186C7.32364 4.16337 7.60968 3.5528 8.00784 3.01694C8.40606 2.48101 8.9082 2.0307 9.48343 1.69174C10.0586 1.35282 10.6957 1.13198 11.3575 1.04331Z",fill:"currentColor"})})};exports.default=l;
2
+ //# sourceMappingURL=RestApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RestApi.js","sources":["../../../../../src/icons/Actions/Common actions/RestApi.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgRestApi = ({ size = 24, color = 'currentColor', ...rest }: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M21 17.0003C21 16.2047 20.6837 15.4409 20.1211 14.8783C19.5585 14.3159 18.7955 14.0003 18 14.0003C16.8352 14.0003 15.0663 13.6977 14.253 12.2093H14.252L11.1221 6.47983C10.8574 5.99517 11.0359 5.38719 11.5205 5.12241C12.0052 4.85765 12.6132 5.03616 12.878 5.52084L16.0078 11.2503C16.2546 11.7019 16.9648 12.0003 18 12.0003C19.326 12.0003 20.5975 12.5267 21.5352 13.4642C22.4729 14.4019 23 15.6743 23 17.0003C22.9999 18.3263 22.4728 19.5979 21.5352 20.5355C20.5975 21.4731 19.326 22.0003 18 22.0003C17.4478 22.0003 17.0002 21.5525 17 21.0003C17 20.4481 17.4477 20.0003 18 20.0003C18.7956 20.0003 19.5585 19.6839 20.1211 19.1214C20.6837 18.5589 20.9999 17.7959 21 17.0003ZM1.71878 14.4749C2.00866 14.005 2.62472 13.859 3.09476 14.1488C3.56485 14.4387 3.71082 15.0547 3.42093 15.5248C3.15352 15.9584 3.00898 16.4768 3.00003 17.0062C3.00168 17.673 3.2252 18.3205 3.63577 18.846C4.04767 19.3732 4.62438 19.7475 5.27347 19.9095C5.92255 20.0715 6.60745 20.0123 7.21878 19.7406C7.83011 19.4688 8.33285 18.9999 8.64749 18.4095C8.64975 18.4053 8.65201 18.401 8.65433 18.3968C9.21258 17.3856 10.3185 15.98 12.0098 15.9798H18C18.5522 15.9798 18.9999 16.4276 19 16.9798C19 17.5321 18.5523 17.9798 18 17.9798H12.0098C11.5013 17.98 10.9069 18.455 10.4053 19.3636L10.4043 19.3626C9.87953 20.3404 9.04557 21.1168 8.03128 21.5677C7.01239 22.0206 5.87089 22.12 4.78909 21.8499C3.70726 21.5798 2.7461 20.9561 2.0596 20.0775C1.3731 19.1988 1.00038 18.1154 1.00003 17.0003C1.00003 16.9955 0.999962 16.9906 1.00003 16.9857C1.01244 16.1179 1.24757 15.2391 1.71878 14.4749ZM11.3575 1.04331C12.0191 0.954644 12.6919 0.999662 13.336 1.17514C13.9802 1.3507 14.5832 1.65358 15.1084 2.06577C15.6337 2.47794 16.0709 2.9916 16.3946 3.57553C16.6621 4.05853 16.4879 4.66718 16.0049 4.93491C15.522 5.20255 14.9134 5.028 14.6455 4.54526C14.4513 4.19494 14.1891 3.8863 13.8741 3.63901C13.5589 3.39172 13.197 3.21017 12.8106 3.10483C12.4241 2.99949 12.0201 2.97252 11.6231 3.02573C11.2262 3.07891 10.8441 3.21119 10.4991 3.4144C10.1539 3.61778 9.85224 3.88874 9.61331 4.2103C9.37448 4.53179 9.20256 4.8984 9.10745 5.28745C9.01242 5.67646 8.99599 6.08055 9.0596 6.47592C9.12264 6.86772 9.26263 7.24321 9.47171 7.58041C9.81393 8.10643 10.1323 8.75044 10.2813 9.44077C10.4318 10.1388 10.4188 10.9429 10.0088 11.6956L6.87894 17.4759C6.61595 17.9616 6.00912 18.1422 5.52347 17.8792C5.03808 17.6162 4.8582 17.0093 5.12112 16.5238L8.25101 10.7435L8.25296 10.7406C8.37091 10.5246 8.40769 10.2406 8.3262 9.86264C8.24328 9.47833 8.04819 9.05914 7.79202 8.66635C7.78858 8.66107 7.7856 8.6551 7.78226 8.64975C7.42837 8.0837 7.19103 7.45241 7.08499 6.79331C6.97899 6.13419 7.00654 5.46035 7.16507 4.81186C7.32364 4.16337 7.60968 3.5528 8.00784 3.01694C8.40606 2.48101 8.9082 2.0307 9.48343 1.69174C10.0586 1.35282 10.6957 1.13198 11.3575 1.04331Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgRestApi;\n"],"names":["SvgRestApi","size","color","rest","props","jsx"],"mappings":"iJAMMA,EAAa,CAAC,CAAE,KAAAC,EAAO,GAAI,MAAAC,EAAQ,eAAgB,GAAGC,KAAkB,CAC7E,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,IAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAAC,EAAAA,IAAC,OAAA,CACA,EAAE,6uFACF,KAAK,cAAA,CAAA,CACN,CAAA,CAGH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),C=({size:l=24,color:t="currentColor",...r})=>{const o={width:l,height:l,color:t,...r};return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[e.jsx("path",{d:"M14.25 5.75C14.8023 5.75 15.25 6.19772 15.25 6.75C15.25 7.30228 14.8023 7.75 14.25 7.75H9C8.44772 7.75 8 7.30228 8 6.75C8 6.19772 8.44772 5.75 9 5.75H14.25Z",fill:"currentColor"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3633 2.75879C16.706 2.79301 17.0313 2.92737 17.2979 3.14551L17.4258 3.26172L20.7383 6.57422C21.0656 6.90206 21.2497 7.34627 21.25 7.80957V19.5C21.25 19.9641 21.0655 20.4091 20.7373 20.7373C20.4091 21.0655 19.9641 21.25 19.5 21.25H4.5C4.03587 21.25 3.59089 21.0655 3.2627 20.7373C2.93451 20.4091 2.75 19.9641 2.75 19.5V4.5C2.75 4.03587 2.93451 3.59088 3.2627 3.2627C3.59088 2.93451 4.03587 2.75 4.5 2.75H16.1904L16.3633 2.75879ZM4.75 19.25H6.5V14.25C6.5 13.7859 6.68451 13.3409 7.0127 13.0127C7.34089 12.6845 7.78587 12.5 8.25 12.5H15.75C16.2141 12.5 16.6591 12.6845 16.9873 13.0127C17.3155 13.3409 17.5 13.7859 17.5 14.25V19.25H19.25V7.91406L16.0859 4.75H4.75V19.25ZM8.5 19.25H15.5V14.5H8.5V19.25Z",fill:"currentColor"})]})};exports.default=C;
2
+ //# sourceMappingURL=Save.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Save.js","sources":["../../../../../src/icons/Actions/Common actions/Save.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgSave = ({ size = 24, color = 'currentColor', ...rest }: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M14.25 5.75C14.8023 5.75 15.25 6.19772 15.25 6.75C15.25 7.30228 14.8023 7.75 14.25 7.75H9C8.44772 7.75 8 7.30228 8 6.75C8 6.19772 8.44772 5.75 9 5.75H14.25Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M16.3633 2.75879C16.706 2.79301 17.0313 2.92737 17.2979 3.14551L17.4258 3.26172L20.7383 6.57422C21.0656 6.90206 21.2497 7.34627 21.25 7.80957V19.5C21.25 19.9641 21.0655 20.4091 20.7373 20.7373C20.4091 21.0655 19.9641 21.25 19.5 21.25H4.5C4.03587 21.25 3.59089 21.0655 3.2627 20.7373C2.93451 20.4091 2.75 19.9641 2.75 19.5V4.5C2.75 4.03587 2.93451 3.59088 3.2627 3.2627C3.59088 2.93451 4.03587 2.75 4.5 2.75H16.1904L16.3633 2.75879ZM4.75 19.25H6.5V14.25C6.5 13.7859 6.68451 13.3409 7.0127 13.0127C7.34089 12.6845 7.78587 12.5 8.25 12.5H15.75C16.2141 12.5 16.6591 12.6845 16.9873 13.0127C17.3155 13.3409 17.5 13.7859 17.5 14.25V19.25H19.25V7.91406L16.0859 4.75H4.75V19.25ZM8.5 19.25H15.5V14.5H8.5V19.25Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgSave;\n"],"names":["SvgSave","size","color","rest","props","jsxs","jsx"],"mappings":"iJAMMA,EAAU,CAAC,CAAE,KAAAC,EAAO,GAAI,MAAAC,EAAQ,eAAgB,GAAGC,KAAkB,CAC1E,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,KAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAA,CAAAE,EAAAA,IAAC,OAAA,CACA,EAAE,+JACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,gsBACF,KAAK,cAAA,CAAA,CACN,CAAA,CAAA,CAGH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const L=require("react/jsx-runtime"),r=({size:C=24,color:e="currentColor",...t})=>{const l={width:C,height:C,color:e,...t};return L.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:[L.jsx("path",{d:"M18.3242 13.5635C18.5955 13.083 19.2047 12.9129 19.6855 13.1836L21.0352 13.9434L21.0371 13.9443C21.2927 14.0892 21.511 14.2917 21.6748 14.5342L21.7422 14.6406L21.8018 14.752C21.9319 15.0138 21.9999 15.3032 22 15.5967C22 15.9326 21.9112 16.2635 21.7422 16.5537C21.5731 16.8439 21.3293 17.0844 21.0371 17.25L21.0361 17.249L13.3984 21.625C12.9731 21.8705 12.4911 22.001 12 22.001C11.5088 22.001 11.026 21.8716 10.6006 21.626L2.96387 17.249L2.96289 17.25C2.67067 17.0843 2.42694 16.8439 2.25781 16.5537C2.08876 16.2635 2 15.9326 2 15.5967C2.00015 15.261 2.08881 14.9307 2.25781 14.6406L2.3252 14.5342C2.48902 14.2916 2.70727 14.0892 2.96289 13.9443L2.96484 13.9434L4.31445 13.1836C4.79533 12.9129 5.40454 13.083 5.67578 13.5635C5.94679 14.0446 5.77685 14.6546 5.2959 14.9258L4.10254 15.5967L11.5977 19.8916L11.6006 19.8936C11.722 19.9637 11.8598 20.001 12 20.001C12.1402 20.001 12.278 19.9637 12.3994 19.8936L12.4023 19.8916L19.8965 15.5967L18.7041 14.9258C18.2232 14.6546 18.0532 14.0446 18.3242 13.5635Z",fill:"currentColor"}),L.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 1.99902C12.49 1.99902 12.9709 2.12866 13.3955 2.37305L13.3965 2.37207L21.041 6.75195C21.2955 6.89678 21.5116 7.09807 21.6748 7.33984L21.7422 7.44629L21.8018 7.55664C21.9321 7.81883 22 8.10841 22 8.40234C22 8.73815 21.9112 9.06821 21.7422 9.3584C21.5737 9.64752 21.3308 9.88617 21.04 10.0518L21.041 10.0527L13.3965 14.4326L13.3955 14.4316C12.9708 14.6761 12.49 14.8057 12 14.8057C11.5097 14.8057 11.0284 14.6763 10.6035 14.4316L2.95898 10.0527L2.95996 10.0518C2.66925 9.88617 2.42628 9.64751 2.25781 9.3584C2.08883 9.06821 2 8.73815 2 8.40234C2.00003 8.06652 2.08879 7.73647 2.25781 7.44629L2.3252 7.33984C2.4884 7.09807 2.7055 6.89679 2.95996 6.75195L10.6035 2.37207C11.0283 2.1274 11.5097 1.99903 12 1.99902ZM12 3.99902C11.8598 3.99903 11.722 4.03635 11.6006 4.10645L11.5977 4.10742L4.10059 8.40234L11.5977 12.6973L11.6006 12.6992C11.722 12.7693 11.8598 12.8057 12 12.8057C12.1402 12.8057 12.278 12.7693 12.3994 12.6992L12.4023 12.6973L19.8984 8.40234L12.4023 4.10742L12.3994 4.10645C12.278 4.03635 12.1402 3.99902 12 3.99902Z",fill:"currentColor"})]})};exports.default=r;
2
+ //# sourceMappingURL=Shortcut.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shortcut.js","sources":["../../../../../src/icons/Actions/Common actions/Shortcut.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgShortcut = ({ size = 24, color = 'currentColor', ...rest }: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M18.3242 13.5635C18.5955 13.083 19.2047 12.9129 19.6855 13.1836L21.0352 13.9434L21.0371 13.9443C21.2927 14.0892 21.511 14.2917 21.6748 14.5342L21.7422 14.6406L21.8018 14.752C21.9319 15.0138 21.9999 15.3032 22 15.5967C22 15.9326 21.9112 16.2635 21.7422 16.5537C21.5731 16.8439 21.3293 17.0844 21.0371 17.25L21.0361 17.249L13.3984 21.625C12.9731 21.8705 12.4911 22.001 12 22.001C11.5088 22.001 11.026 21.8716 10.6006 21.626L2.96387 17.249L2.96289 17.25C2.67067 17.0843 2.42694 16.8439 2.25781 16.5537C2.08876 16.2635 2 15.9326 2 15.5967C2.00015 15.261 2.08881 14.9307 2.25781 14.6406L2.3252 14.5342C2.48902 14.2916 2.70727 14.0892 2.96289 13.9443L2.96484 13.9434L4.31445 13.1836C4.79533 12.9129 5.40454 13.083 5.67578 13.5635C5.94679 14.0446 5.77685 14.6546 5.2959 14.9258L4.10254 15.5967L11.5977 19.8916L11.6006 19.8936C11.722 19.9637 11.8598 20.001 12 20.001C12.1402 20.001 12.278 19.9637 12.3994 19.8936L12.4023 19.8916L19.8965 15.5967L18.7041 14.9258C18.2232 14.6546 18.0532 14.0446 18.3242 13.5635Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M12 1.99902C12.49 1.99902 12.9709 2.12866 13.3955 2.37305L13.3965 2.37207L21.041 6.75195C21.2955 6.89678 21.5116 7.09807 21.6748 7.33984L21.7422 7.44629L21.8018 7.55664C21.9321 7.81883 22 8.10841 22 8.40234C22 8.73815 21.9112 9.06821 21.7422 9.3584C21.5737 9.64752 21.3308 9.88617 21.04 10.0518L21.041 10.0527L13.3965 14.4326L13.3955 14.4316C12.9708 14.6761 12.49 14.8057 12 14.8057C11.5097 14.8057 11.0284 14.6763 10.6035 14.4316L2.95898 10.0527L2.95996 10.0518C2.66925 9.88617 2.42628 9.64751 2.25781 9.3584C2.08883 9.06821 2 8.73815 2 8.40234C2.00003 8.06652 2.08879 7.73647 2.25781 7.44629L2.3252 7.33984C2.4884 7.09807 2.7055 6.89679 2.95996 6.75195L10.6035 2.37207C11.0283 2.1274 11.5097 1.99903 12 1.99902ZM12 3.99902C11.8598 3.99903 11.722 4.03635 11.6006 4.10645L11.5977 4.10742L4.10059 8.40234L11.5977 12.6973L11.6006 12.6992C11.722 12.7693 11.8598 12.8057 12 12.8057C12.1402 12.8057 12.278 12.7693 12.3994 12.6992L12.4023 12.6973L19.8984 8.40234L12.4023 4.10742L12.3994 4.10645C12.278 4.03635 12.1402 3.99902 12 3.99902Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgShortcut;\n"],"names":["SvgShortcut","size","color","rest","props","jsxs","jsx"],"mappings":"iJAMMA,EAAc,CAAC,CAAE,KAAAC,EAAO,GAAI,MAAAC,EAAQ,eAAgB,GAAGC,KAAkB,CAC9E,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,KAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAA,CAAAE,EAAAA,IAAC,OAAA,CACA,EAAE,4+BACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,0gCACF,KAAK,cAAA,CAAA,CACN,CAAA,CAAA,CAGH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),l=({size:t=24,color:r="currentColor",...i})=>{const s={width:t,height:t,color:r,...i};return e.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s,children:[e.jsx("g",{clipPath:"url(#clip0_758_122311)",children:e.jsx("path",{d:"M9.3332 4.66659L11.3332 6.66658M3.3332 3.99992V6.66658M12.6665 9.33325V11.9999M6.66653 1.33325V2.66659M4.66653 5.33325H1.99987M13.9999 10.6666H11.3332M7.3332 1.99992H5.99987M14.4265 2.42659L13.5732 1.57325C13.4982 1.49746 13.4089 1.4373 13.3105 1.39624C13.2121 1.35518 13.1065 1.33404 12.9999 1.33404C12.8932 1.33404 12.7877 1.35518 12.6893 1.39624C12.5908 1.4373 12.5015 1.49746 12.4265 1.57325L1.5732 12.4266C1.49741 12.5016 1.43725 12.5909 1.39619 12.6893C1.35513 12.7877 1.33398 12.8933 1.33398 12.9999C1.33398 13.1066 1.35513 13.2121 1.39619 13.3105C1.43725 13.4089 1.49741 13.4982 1.5732 13.5733L2.42653 14.4266C2.50108 14.5032 2.59022 14.5641 2.6887 14.6057C2.78717 14.6472 2.89298 14.6687 2.99987 14.6687C3.10676 14.6687 3.21256 14.6472 3.31104 14.6057C3.40951 14.5641 3.49865 14.5032 3.5732 14.4266L14.4265 3.57325C14.5031 3.4987 14.564 3.40956 14.6056 3.31109C14.6472 3.21262 14.6686 3.10681 14.6686 2.99992C14.6686 2.89303 14.6472 2.78722 14.6056 2.68875C14.564 2.59028 14.5031 2.50113 14.4265 2.42659Z",stroke:"#616161",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_758_122311",children:e.jsx("rect",{width:16,height:16,fill:"white"})})})]})};exports.default=l;
2
+ //# sourceMappingURL=WandSparkles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WandSparkles.js","sources":["../../../../src/icons/BIK AI specific/WandSparkles.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgWandSparkles = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 16 16\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<g clipPath=\"url(#clip0_758_122311)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"M9.3332 4.66659L11.3332 6.66658M3.3332 3.99992V6.66658M12.6665 9.33325V11.9999M6.66653 1.33325V2.66659M4.66653 5.33325H1.99987M13.9999 10.6666H11.3332M7.3332 1.99992H5.99987M14.4265 2.42659L13.5732 1.57325C13.4982 1.49746 13.4089 1.4373 13.3105 1.39624C13.2121 1.35518 13.1065 1.33404 12.9999 1.33404C12.8932 1.33404 12.7877 1.35518 12.6893 1.39624C12.5908 1.4373 12.5015 1.49746 12.4265 1.57325L1.5732 12.4266C1.49741 12.5016 1.43725 12.5909 1.39619 12.6893C1.35513 12.7877 1.33398 12.8933 1.33398 12.9999C1.33398 13.1066 1.35513 13.2121 1.39619 13.3105C1.43725 13.4089 1.49741 13.4982 1.5732 13.5733L2.42653 14.4266C2.50108 14.5032 2.59022 14.5641 2.6887 14.6057C2.78717 14.6472 2.89298 14.6687 2.99987 14.6687C3.10676 14.6687 3.21256 14.6472 3.31104 14.6057C3.40951 14.5641 3.49865 14.5032 3.5732 14.4266L14.4265 3.57325C14.5031 3.4987 14.564 3.40956 14.6056 3.31109C14.6472 3.21262 14.6686 3.10681 14.6686 2.99992C14.6686 2.89303 14.6472 2.78722 14.6056 2.68875C14.564 2.59028 14.5031 2.50113 14.4265 2.42659Z\"\n\t\t\t\t\tstroke=\"#616161\"\n\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_758_122311\">\n\t\t\t\t\t<rect width={16} height={16} fill=\"white\" />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</svg>\n\t);\n};\nexport default SvgWandSparkles;\n"],"names":["SvgWandSparkles","size","color","rest","props","jsxs","jsx"],"mappings":"iJAMMA,EAAkB,CAAC,CACxB,KAAAC,EAAO,GACP,MAAAC,EAAQ,eACR,GAAGC,CACJ,IAAa,CACZ,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,KAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAA,CAAAE,EAAAA,IAAC,IAAA,CAAE,SAAS,yBACX,SAAAA,EAAAA,IAAC,OAAA,CACA,EAAE,w/BACF,OAAO,UACP,YAAa,IACb,cAAc,QACd,eAAe,OAAA,CAAA,EAEjB,EACAA,MAAC,OAAA,CACA,SAAAA,EAAAA,IAAC,WAAA,CAAS,GAAG,mBACZ,SAAAA,EAAAA,IAAC,OAAA,CAAK,MAAO,GAAI,OAAQ,GAAI,KAAK,QAAQ,EAC3C,CAAA,CACD,CAAA,CAAA,CAAA,CAGH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),n=({size:e=24,color:o="currentColor",...r})=>{const C={width:e,height:e,color:o,...r};return t.jsx("svg",{viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...C,children:t.jsx("path",{d:"M14.0833 13.2339H9.09167C8.175 13.2339 7.46667 14.0172 7.025 14.8172C6.67538 15.4733 6.11649 15.9936 5.43718 16.2955C4.75788 16.5975 3.99714 16.6636 3.27589 16.4836C2.55465 16.3035 1.91429 15.8875 1.45662 15.3017C0.998952 14.7159 0.750232 13.9939 0.75 13.2506C0.758333 12.6672 0.916667 12.0839 1.225 11.5839M4.08333 13.2506L6.69167 8.43389C7.13333 7.62556 6.775 6.61722 6.275 5.85056C6.03901 5.47314 5.881 5.05228 5.8103 4.61282C5.73959 4.17335 5.75762 3.72417 5.86332 3.29178C5.96903 2.85939 6.16026 2.45255 6.42574 2.09527C6.69122 1.73798 7.02557 1.43748 7.40906 1.21151C7.79255 0.985529 8.21742 0.838649 8.6586 0.77953C9.09977 0.720412 9.54832 0.750253 9.97778 0.867294C10.4072 0.984335 10.8089 1.1862 11.1591 1.46099C11.5093 1.73578 11.8009 2.07792 12.0167 2.46722M9.08333 4.08389L11.6917 8.85889C12.1333 9.66722 13.1667 9.91722 14.0833 9.91722C14.9674 9.91722 15.8152 10.2684 16.4404 10.8935C17.0655 11.5187 17.4167 12.3665 17.4167 13.2506C17.4167 14.1346 17.0655 14.9825 16.4404 15.6076C15.8152 16.2327 14.9674 16.5839 14.0833 16.5839",stroke:"black",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})};exports.default=n;
2
+ //# sourceMappingURL=Webhook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Webhook.js","sources":["../../../../src/icons/BIK AI specific/Webhook.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgWebhook = ({ size = 24, color = 'currentColor', ...rest }: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 19 18\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M14.0833 13.2339H9.09167C8.175 13.2339 7.46667 14.0172 7.025 14.8172C6.67538 15.4733 6.11649 15.9936 5.43718 16.2955C4.75788 16.5975 3.99714 16.6636 3.27589 16.4836C2.55465 16.3035 1.91429 15.8875 1.45662 15.3017C0.998952 14.7159 0.750232 13.9939 0.75 13.2506C0.758333 12.6672 0.916667 12.0839 1.225 11.5839M4.08333 13.2506L6.69167 8.43389C7.13333 7.62556 6.775 6.61722 6.275 5.85056C6.03901 5.47314 5.881 5.05228 5.8103 4.61282C5.73959 4.17335 5.75762 3.72417 5.86332 3.29178C5.96903 2.85939 6.16026 2.45255 6.42574 2.09527C6.69122 1.73798 7.02557 1.43748 7.40906 1.21151C7.79255 0.985529 8.21742 0.838649 8.6586 0.77953C9.09977 0.720412 9.54832 0.750253 9.97778 0.867294C10.4072 0.984335 10.8089 1.1862 11.1591 1.46099C11.5093 1.73578 11.8009 2.07792 12.0167 2.46722M9.08333 4.08389L11.6917 8.85889C12.1333 9.66722 13.1667 9.91722 14.0833 9.91722C14.9674 9.91722 15.8152 10.2684 16.4404 10.8935C17.0655 11.5187 17.4167 12.3665 17.4167 13.2506C17.4167 14.1346 17.0655 14.9825 16.4404 15.6076C15.8152 16.2327 14.9674 16.5839 14.0833 16.5839\"\n\t\t\t\tstroke=\"black\"\n\t\t\t\tstrokeWidth={1.5}\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgWebhook;\n"],"names":["SvgWebhook","size","color","rest","props","jsx"],"mappings":"iJAMMA,EAAa,CAAC,CAAE,KAAAC,EAAO,GAAI,MAAAC,EAAQ,eAAgB,GAAGC,KAAkB,CAC7E,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,IAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAAC,EAAAA,IAAC,OAAA,CACA,EAAE,mhCACF,OAAO,QACP,YAAa,IACb,cAAc,QACd,eAAe,OAAA,CAAA,CAChB,CAAA,CAGH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("react/jsx-runtime"),o=({size:e=24,color:l="currentColor",...r})=>{const t={width:e,height:e,color:l,...r};return C.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[C.jsx("path",{d:"M8.00977 15C8.56205 15 9.00977 15.4477 9.00977 16C9.00977 16.5523 8.56205 17 8.00977 17H8C7.44772 17 7 16.5523 7 16C7 15.4477 7.44772 15 8 15H8.00977Z",fill:"currentColor"}),C.jsx("path",{d:"M16 15C16.5523 15 17 15.4477 17 16C17 16.5523 16.5523 17 16 17H12C11.4477 17 11 16.5523 11 16C11 15.4477 11.4477 15 12 15H16Z",fill:"currentColor"}),C.jsx("path",{d:"M8.00977 10C8.56205 10 9.00977 10.4477 9.00977 11C9.00977 11.5523 8.56205 12 8.00977 12H8C7.44772 12 7 11.5523 7 11C7 10.4477 7.44772 10 8 10H8.00977Z",fill:"currentColor"}),C.jsx("path",{d:"M16 10C16.5523 10 17 10.4477 17 11C17 11.5523 16.5523 12 16 12H12C11.4477 12 11 11.5523 11 11C11 10.4477 11.4477 10 12 10H16Z",fill:"currentColor"}),C.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 1C16.1046 1 17 1.89543 17 3H18C18.7956 3 19.5585 3.3163 20.1211 3.87891C20.6837 4.44151 21 5.20435 21 6V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7956 23 18 23H6C5.20435 23 4.44151 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V6C3 5.20435 3.3163 4.44152 3.87891 3.87891C4.44152 3.3163 5.20435 3 6 3H7C7 1.89543 7.89543 1 9 1H15ZM6 5C5.73478 5 5.4805 5.10543 5.29297 5.29297C5.10543 5.4805 5 5.73478 5 6V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V6C19 5.73478 18.8946 5.48051 18.707 5.29297C18.5195 5.10543 18.2652 5 18 5H17C17 6.10457 16.1046 7 15 7H9C7.89543 7 7 6.10457 7 5H6ZM9 5H15V3H9V5Z",fill:"currentColor"})]})};exports.default=o;
2
+ //# sourceMappingURL=TicketForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TicketForm.js","sources":["../../../../../src/icons/Informational/Store related/TicketForm.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgTicketForm = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M8.00977 15C8.56205 15 9.00977 15.4477 9.00977 16C9.00977 16.5523 8.56205 17 8.00977 17H8C7.44772 17 7 16.5523 7 16C7 15.4477 7.44772 15 8 15H8.00977Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M16 15C16.5523 15 17 15.4477 17 16C17 16.5523 16.5523 17 16 17H12C11.4477 17 11 16.5523 11 16C11 15.4477 11.4477 15 12 15H16Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M8.00977 10C8.56205 10 9.00977 10.4477 9.00977 11C9.00977 11.5523 8.56205 12 8.00977 12H8C7.44772 12 7 11.5523 7 11C7 10.4477 7.44772 10 8 10H8.00977Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M16 10C16.5523 10 17 10.4477 17 11C17 11.5523 16.5523 12 16 12H12C11.4477 12 11 11.5523 11 11C11 10.4477 11.4477 10 12 10H16Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M15 1C16.1046 1 17 1.89543 17 3H18C18.7956 3 19.5585 3.3163 20.1211 3.87891C20.6837 4.44151 21 5.20435 21 6V20C21 20.7957 20.6837 21.5585 20.1211 22.1211C19.5585 22.6837 18.7956 23 18 23H6C5.20435 23 4.44151 22.6837 3.87891 22.1211C3.3163 21.5585 3 20.7957 3 20V6C3 5.20435 3.3163 4.44152 3.87891 3.87891C4.44152 3.3163 5.20435 3 6 3H7C7 1.89543 7.89543 1 9 1H15ZM6 5C5.73478 5 5.4805 5.10543 5.29297 5.29297C5.10543 5.4805 5 5.73478 5 6V20C5 20.2652 5.10543 20.5195 5.29297 20.707C5.48051 20.8946 5.73478 21 6 21H18C18.2652 21 18.5195 20.8946 18.707 20.707C18.8946 20.5195 19 20.2652 19 20V6C19 5.73478 18.8946 5.48051 18.707 5.29297C18.5195 5.10543 18.2652 5 18 5H17C17 6.10457 16.1046 7 15 7H9C7.89543 7 7 6.10457 7 5H6ZM9 5H15V3H9V5Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgTicketForm;\n"],"names":["SvgTicketForm","size","color","rest","props","jsxs","jsx"],"mappings":"iJAMMA,EAAgB,CAAC,CACtB,KAAAC,EAAO,GACP,MAAAC,EAAQ,eACR,GAAGC,CACJ,IAAa,CACZ,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,KAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAA,CAAAE,EAAAA,IAAC,OAAA,CACA,EAAE,yJACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,EAAE,gIACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,EAAE,yJACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,EAAE,gIACF,KAAK,cAAA,CAAA,EAENA,EAAAA,IAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,ouBACF,KAAK,cAAA,CAAA,CACN,CAAA,CAAA,CAGH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=({size:C=24,color:t="currentColor",...l})=>{const o={width:C,height:C,color:t,...l};return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.8203 2.00752C20.1902 1.97418 20.5624 2.04458 20.8945 2.21065C21.2266 2.37667 21.5059 2.63222 21.7012 2.94795C21.8964 3.26383 22 3.62838 22 3.99971V15.9997C22 16.3711 21.8964 16.7356 21.7012 17.0515C21.5059 17.3673 21.2266 17.6227 20.8945 17.7888C20.5623 17.9549 20.1902 18.0253 19.8203 17.9919C19.4504 17.9585 19.0969 17.8222 18.7998 17.5993C18.7931 17.5943 18.7859 17.5889 18.7793 17.5837C16.5892 15.8514 13.8639 14.9379 11.0732 14.9987C11.24 16.1548 11.6932 17.257 12.4004 18.1999C12.8775 18.8362 13.082 19.6362 12.9697 20.4235C12.8572 21.2111 12.4363 21.9227 11.7998 22.4001C11.1634 22.8772 10.3636 23.0818 9.57617 22.9694C8.78854 22.8569 8.07699 22.436 7.59961 21.7995C6.11295 19.8171 5.22958 17.4566 5.04004 14.9997H5C4.20435 14.9997 3.44151 14.6834 2.87891 14.1208C2.31638 13.5582 2 12.7953 2 11.9997V7.99971C2.00007 7.20416 2.31636 6.44116 2.87891 5.87862C3.4415 5.31609 4.20441 4.99971 5 4.99971H11.0254C13.8327 5.07203 16.5768 4.15787 18.7793 2.41573C18.7859 2.41051 18.7931 2.40514 18.7998 2.4001C19.0969 2.17731 19.4505 2.04088 19.8203 2.00752ZM7.04785 14.9997C7.23259 17.0232 7.9733 18.9633 9.2002 20.5993C9.35929 20.8114 9.59591 20.9524 9.8584 20.9899C10.1209 21.0274 10.3875 20.9586 10.5996 20.7995C10.8117 20.6404 10.9527 20.4038 10.9902 20.1413C11.0277 19.8789 10.9588 19.6122 10.7998 19.4001C9.83275 18.1106 9.2354 16.5896 9.05762 14.9997H7.04785ZM20 3.99971C17.5945 5.8954 14.6384 6.94676 11.5869 7.00166L10.9746 6.99971H9V12.9997H10.9746C14.2412 12.9157 17.4339 13.9775 20 15.9997V3.99971ZM5 6.99971C4.73485 6.99971 4.48049 7.10523 4.29297 7.29268C4.10549 7.48015 4.00007 7.73459 4 7.99971V11.9997C4 12.2649 4.10551 12.5192 4.29297 12.7067C4.48051 12.8943 4.73478 12.9997 5 12.9997H7V6.99971H5Z",fill:"currentColor"})})};exports.default=r;
2
+ //# sourceMappingURL=LoudSpeaker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoudSpeaker.js","sources":["../../../../../src/icons/Legacy - Bikayi specific/Services/LoudSpeaker.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgLoudSpeaker = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M19.8203 2.00752C20.1902 1.97418 20.5624 2.04458 20.8945 2.21065C21.2266 2.37667 21.5059 2.63222 21.7012 2.94795C21.8964 3.26383 22 3.62838 22 3.99971V15.9997C22 16.3711 21.8964 16.7356 21.7012 17.0515C21.5059 17.3673 21.2266 17.6227 20.8945 17.7888C20.5623 17.9549 20.1902 18.0253 19.8203 17.9919C19.4504 17.9585 19.0969 17.8222 18.7998 17.5993C18.7931 17.5943 18.7859 17.5889 18.7793 17.5837C16.5892 15.8514 13.8639 14.9379 11.0732 14.9987C11.24 16.1548 11.6932 17.257 12.4004 18.1999C12.8775 18.8362 13.082 19.6362 12.9697 20.4235C12.8572 21.2111 12.4363 21.9227 11.7998 22.4001C11.1634 22.8772 10.3636 23.0818 9.57617 22.9694C8.78854 22.8569 8.07699 22.436 7.59961 21.7995C6.11295 19.8171 5.22958 17.4566 5.04004 14.9997H5C4.20435 14.9997 3.44151 14.6834 2.87891 14.1208C2.31638 13.5582 2 12.7953 2 11.9997V7.99971C2.00007 7.20416 2.31636 6.44116 2.87891 5.87862C3.4415 5.31609 4.20441 4.99971 5 4.99971H11.0254C13.8327 5.07203 16.5768 4.15787 18.7793 2.41573C18.7859 2.41051 18.7931 2.40514 18.7998 2.4001C19.0969 2.17731 19.4505 2.04088 19.8203 2.00752ZM7.04785 14.9997C7.23259 17.0232 7.9733 18.9633 9.2002 20.5993C9.35929 20.8114 9.59591 20.9524 9.8584 20.9899C10.1209 21.0274 10.3875 20.9586 10.5996 20.7995C10.8117 20.6404 10.9527 20.4038 10.9902 20.1413C11.0277 19.8789 10.9588 19.6122 10.7998 19.4001C9.83275 18.1106 9.2354 16.5896 9.05762 14.9997H7.04785ZM20 3.99971C17.5945 5.8954 14.6384 6.94676 11.5869 7.00166L10.9746 6.99971H9V12.9997H10.9746C14.2412 12.9157 17.4339 13.9775 20 15.9997V3.99971ZM5 6.99971C4.73485 6.99971 4.48049 7.10523 4.29297 7.29268C4.10549 7.48015 4.00007 7.73459 4 7.99971V11.9997C4 12.2649 4.10551 12.5192 4.29297 12.7067C4.48051 12.8943 4.73478 12.9997 5 12.9997H7V6.99971H5Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgLoudSpeaker;\n"],"names":["SvgLoudSpeaker","size","color","rest","props","jsx"],"mappings":"iJAMMA,EAAiB,CAAC,CACvB,KAAAC,EAAO,GACP,MAAAC,EAAQ,eACR,GAAGC,CACJ,IAAa,CACZ,MAAMC,EAAQ,CACb,MAAOH,EACP,OAAQA,EACR,MAAAC,EACA,GAAGC,CAAA,EAEJ,OACCE,EAAAA,IAAC,MAAA,CACA,QAAQ,YACR,KAAK,OACL,MAAM,6BACL,GAAGD,EAEJ,SAAAC,EAAAA,IAAC,OAAA,CACA,SAAS,UACT,SAAS,UACT,EAAE,wrDACF,KAAK,cAAA,CAAA,CACN,CAAA,CAGH"}