@avocadostudio-ai/cli 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/index.js +19 -2
  2. package/editor-dist/assets/Editor-44C53YAG-DEGaMaB1.js +1 -0
  3. package/editor-dist/assets/PuckPrototypeRoute-Cfcfp2ny.css +1 -0
  4. package/editor-dist/assets/PuckPrototypeRoute-ZGWY33XX.js +3878 -0
  5. package/editor-dist/assets/Render-DQXAYUBI-DydvfQCE.js +1 -0
  6. package/editor-dist/assets/chunk-2CNEFIQP-DQGs5Wqf.js +1 -0
  7. package/editor-dist/assets/full-7ZJV44EE-CUISJvzH.js +1 -0
  8. package/editor-dist/assets/index-NfTcJCu2.css +1 -0
  9. package/editor-dist/assets/index-Q6RlyZQf.js +883 -0
  10. package/editor-dist/assets/loaded-36WRJPBT-h2OdO2B0.js +1 -0
  11. package/editor-dist/assets/loaded-JKA25A3T-CqsSmhVi.js +1 -0
  12. package/editor-dist/assets/loaded-SMPR6KZF-DhwaGEfX.js +1 -0
  13. package/editor-dist/index.html +2 -2
  14. package/package.json +2 -2
  15. package/editor-dist/assets/Editor-EPSED64A-BbR5OV39.js +0 -1
  16. package/editor-dist/assets/PuckPrototypeRoute-BIRXZD6I.js +0 -230
  17. package/editor-dist/assets/PuckPrototypeRoute-Dmhc4leq.css +0 -1
  18. package/editor-dist/assets/Render-CU35UAWV-sTFPSz4y.js +0 -1
  19. package/editor-dist/assets/chunk-2CNEFIQP-ClxJS7-z.js +0 -37
  20. package/editor-dist/assets/full-N67EAB2Q-CbWp-ID0.js +0 -1
  21. package/editor-dist/assets/index-BuvqDAuB.css +0 -1
  22. package/editor-dist/assets/index-Cb3URH9a.js +0 -861
  23. package/editor-dist/assets/index-DqMdfn9V.js +0 -93
  24. package/editor-dist/assets/index-b40ZkO8N.js +0 -1
  25. package/editor-dist/assets/loaded-F37CNCVG-CX9bgUkA.js +0 -1
  26. package/editor-dist/assets/loaded-H325ZSK5-CiO5LpU-.js +0 -1
  27. package/editor-dist/assets/loaded-MIY725CK-B3NnbLsW.js +0 -1
@@ -0,0 +1 @@
1
+ import{P as u}from"./chunk-2CNEFIQP-DQGs5Wqf.js";import{g as p,s as f,i as l}from"./PuckPrototypeRoute-ZGWY33XX.js";import{a8 as d,a9 as h,aa as w,ab as g,r as s,j as m}from"./index-Q6RlyZQf.js";function y(e,t,r){if(typeof window>"u")throw new Error("getHTMLFromFragment can only be used in a browser environment\nIf you want to use this in a Node environment, use the `@tiptap/html/server` import instead.");const n=g.fromSchema(t).serializeFragment(e.content,{document:window.document});return new XMLSerializer().serializeToString(n)}function x(e,t){if(typeof window>"u")throw new Error("generateHTML can only be used in a browser environment\nIf you want to use this in a Node environment, use the `@tiptap/html/server` import instead.");const r=d(t),n=w.fromJSON(r,e);return y(n,r)}function v(e,t,r){if(typeof window>"u")throw new Error("generateJSON can only be used in a browser environment\nIf you want to use this in a Node environment, use the `@tiptap/html/server` import instead.");const n=d(t),o=new window.DOMParser().parseFromString(e,"text/html");if(!o)throw new Error("Failed to parse HTML string");return h.fromSchema(n).parse(o.body,r).toJSON()}l();var M=p("RichTextEditor",f);function b({content:e,field:t}){const{tiptap:r={},options:n}=t,{extensions:o=[]}=r,i=s.useMemo(()=>[u.configure(n),...o],[t,o]),a=s.useMemo(()=>typeof e=="object"&&(e==null?void 0:e.type)==="doc"?e:typeof e=="string"?e?/<\/?[a-z][\s\S]*>/i.test(e)?v(e,i):{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:e}]}]}:{type:"doc",content:[]}:{type:"doc",content:[]},[e,i]),c=s.useMemo(()=>x(a,i),[a,i]);return m.jsx("div",{className:M(),children:m.jsx("div",{className:"rich-text",dangerouslySetInnerHTML:{__html:c}})})}export{b as RichTextRender};
@@ -0,0 +1 @@
1
+ import{b as s,i as n}from"./PuckPrototypeRoute-ZGWY33XX.js";import{ac as a,ad as r,ae as l,af as o,ag as u,ah as f,ai as d,aj as g,ak as c,al as p,am as h,an as m,ao as x,ap as A,aq as k,ar as T,as as y,at as b,au as L}from"./index-Q6RlyZQf.js";var B=a.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).some(i=>i):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:i})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),v=B;n();var M={textAlign:{types:["heading","paragraph"]}},H=a.create({name:"puckRichText",addExtensions(){const t=[],e=s(s({},this.options),M);return e.bold!==!1&&t.push(r.configure(e.bold)),e.blockquote!==!1&&t.push(l.configure(e.blockquote)),e.code!==!1&&t.push(o.configure(e.code)),e.codeBlock!==!1&&t.push(u.configure(e.codeBlock)),e.document!==!1&&t.push(f.configure(e.document)),e.hardBreak!==!1&&t.push(d.configure(e.hardBreak)),e.heading!==!1&&t.push(g.configure(e.heading)),e.horizontalRule!==!1&&t.push(c.configure(e.horizontalRule)),e.italic!==!1&&t.push(p.configure(e.italic)),e.listItem!==!1&&(t.push(h.configure(e.listItem)),e.bulletList!==!1&&t.push(m.configure(e.bulletList)),e.orderedList!==!1&&t.push(x.configure(e.orderedList))),e.listKeymap!==!1&&t.push(A.configure(e==null?void 0:e.listKeymap)),e.link!==!1&&t.push(k.configure(e==null?void 0:e.link)),e.paragraph!==!1&&t.push(T.configure(e.paragraph)),e.strike!==!1&&t.push(y.configure(e.strike)),e.text!==!1&&t.push(b.configure(e.text)),e.textAlign!==!1&&t.push(v.configure(e.textAlign)),e.underline!==!1&&t.push(L.configure(e==null?void 0:e.underline)),t}});export{H as P};
@@ -0,0 +1 @@
1
+ import{b as E,c as M,i as z}from"./PuckPrototypeRoute-ZGWY33XX.js";import{r as U,av as H,j as J}from"./index-Q6RlyZQf.js";z();z();var w=(o,i)=>{var e,u,r,n,a,c,s,g,d,v,_,A,x,B,f,k,L,p,h,C,m,R,S,j,I,T,b,q;const t=o.editor;if(!t||t.isDestroyed)return{};const l=()=>t.can().chain();return{isAlignLeft:t.isActive({textAlign:"left"}),canAlignLeft:!i&&((u=(e=l()).setTextAlign)==null?void 0:u.call(e,"left").run()),isAlignCenter:t.isActive({textAlign:"center"}),canAlignCenter:!i&&((n=(r=l()).setTextAlign)==null?void 0:n.call(r,"center").run()),isAlignRight:t.isActive({textAlign:"right"}),canAlignRight:!i&&((c=(a=l()).setTextAlign)==null?void 0:c.call(a,"right").run()),isAlignJustify:t.isActive({textAlign:"justify"}),canAlignJustify:!i&&((g=(s=l()).setTextAlign)==null?void 0:g.call(s,"justify").run()),isBold:t.isActive("bold"),canBold:!i&&((v=(d=l()).toggleBold)==null?void 0:v.call(d).run()),isItalic:t.isActive("italic"),canItalic:!i&&((A=(_=l()).toggleItalic)==null?void 0:A.call(_).run()),isUnderline:t.isActive("underline"),canUnderline:!i&&((B=(x=l()).toggleUnderline)==null?void 0:B.call(x).run()),isStrike:t.isActive("strike"),canStrike:!i&&((k=(f=l()).toggleStrike)==null?void 0:k.call(f).run()),isInlineCode:t.isActive("code"),canInlineCode:!i&&((p=(L=l()).toggleCode)==null?void 0:p.call(L).run()),isBulletList:t.isActive("bulletList"),canBulletList:!i&&((C=(h=l()).toggleBulletList)==null?void 0:C.call(h).run()),isOrderedList:t.isActive("orderedList"),canOrderedList:!i&&((R=(m=l()).toggleOrderedList)==null?void 0:R.call(m).run()),isCodeBlock:t.isActive("codeBlock"),canCodeBlock:!i&&((j=(S=l()).toggleCodeBlock)==null?void 0:j.call(S).run()),isBlockquote:t.isActive("blockquote"),canBlockquote:!i&&((T=(I=l()).toggleBlockquote)==null?void 0:T.call(I).run()),canHorizontalRule:!i&&((q=(b=l()).setHorizontalRule)==null?void 0:q.call(b).run())}},V=({editor:o,field:i,readOnly:e,inline:u})=>{const{tiptap:r={}}=i,{selector:n}=r,a=U.useMemo(()=>s=>E(E({},w(s,e)),n?n(s,e):{}),[n,e]),c=H({editor:o,selector:a});return!o||!c?null:J.jsx(M,{editor:o,editorState:c,field:i,readOnly:e,inline:u})};export{V as LoadedRichTextMenuFull};