@avocadostudio-ai/cli 0.11.6 → 0.11.8
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.
- package/dist/index.js +17 -2
- package/editor-dist/assets/{Editor-EPSED64A-B5mOFpPW.js → Editor-EPSED64A-BFga_gYB.js} +1 -1
- package/editor-dist/assets/{PuckPrototypeRoute-CnasXb0R.js → PuckPrototypeRoute-CejP0xoY.js} +4 -4
- package/editor-dist/assets/{Render-CU35UAWV-D6tiu6E3.js → Render-CU35UAWV-jcXgat7H.js} +1 -1
- package/editor-dist/assets/{chunk-2CNEFIQP-C5ugG0kw.js → chunk-2CNEFIQP-DpYaYUD7.js} +1 -1
- package/editor-dist/assets/{full-N67EAB2Q-BBZ5ukNY.js → full-N67EAB2Q-D0loYSGS.js} +1 -1
- package/editor-dist/assets/{index-ByDa6BbZ.js → index-B9wMx9Fd.js} +39 -39
- package/editor-dist/assets/{index-BF3lByJ7.js → index-Duoiltna.js} +1 -1
- package/editor-dist/assets/{index-BmUfMOyw.js → index-rrtIE5Cr.js} +1 -1
- package/editor-dist/assets/{loaded-F37CNCVG-BjKIowvx.js → loaded-F37CNCVG-BpYYdl7Q.js} +1 -1
- package/editor-dist/assets/{loaded-H325ZSK5-Mxd8cxM0.js → loaded-H325ZSK5-CLRW3Tp-.js} +1 -1
- package/editor-dist/assets/{loaded-MIY725CK-CW8BEk3D.js → loaded-MIY725CK-foVXkOVo.js} +1 -1
- package/editor-dist/index.html +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as u}from"./chunk-2CNEFIQP-
|
|
1
|
+
import{P as u}from"./chunk-2CNEFIQP-DpYaYUD7.js";import{g as p,s as f,i as l}from"./PuckPrototypeRoute-CejP0xoY.js";import{g as d}from"./index-rrtIE5Cr.js";import{a4 as h,a5 as w,a6 as g,r as s,j as m}from"./index-B9wMx9Fd.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 z({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"?/<\/?[a-z][\s\S]*>/i.test(e)?v(e,i):{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:e}]}]}:{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{z as RichTextRender};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as K,i as de}from"./PuckPrototypeRoute-
|
|
1
|
+
import{b as K,i as de}from"./PuckPrototypeRoute-CejP0xoY.js";import{N as b,w as A,m as k,M as x,a as M,b as T,t as R,n as ce,c as pe,i as he,d as fe,e as me,f as ge,h as ke,j as ye,r as Y,E as _,k as B,l as be,o as ve,p as Z,q as Le,s as Me,u as W}from"./index-rrtIE5Cr.js";import{a7 as P,a8 as $,a9 as I,aa as Ae,ab as Te,ac as xe,ad as U,ae as Ce,af as Q}from"./index-B9wMx9Fd.js";var H=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);const{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},Ie=/^\s*>\s$/,we=b.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return H("blockquote",{...k(this.options.HTMLAttributes,e),children:H("slot",{})})},parseMarkdown:(e,t)=>{var n;const r=(n=t.parseBlockChildren)!=null?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";const n=">",r=[];return e.content.forEach((s,o)=>{var i,a;const p=((a=(i=t.renderChild)==null?void 0:i.call(t,s,o))!=null?a:t.renderChildren([s])).split(`
|
|
2
2
|
`).map(u=>u.trim()===""?n:`${n} ${u}`);r.push(p.join(`
|
|
3
3
|
`))}),r.join(`
|
|
4
4
|
${n}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as E,c as M,i as z}from"./PuckPrototypeRoute-
|
|
1
|
+
import{b as E,c as M,i as z}from"./PuckPrototypeRoute-CejP0xoY.js";import{a as U}from"./index-Duoiltna.js";import{r as H,j as J}from"./index-B9wMx9Fd.js";import"./index-rrtIE5Cr.js";z();z();var w=(o,i)=>{var e,r,u,n,a,c,s,g,d,v,_,A,x,f,B,k,p,L,m,h,C,R,S,j,I,T,b,q;const t=o.editor;if(!t)return{};const l=()=>t.can().chain();return{isAlignLeft:t.isActive({textAlign:"left"}),canAlignLeft:!i&&((r=(e=l()).setTextAlign)==null?void 0:r.call(e,"left").run()),isAlignCenter:t.isActive({textAlign:"center"}),canAlignCenter:!i&&((n=(u=l()).setTextAlign)==null?void 0:n.call(u,"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&&((f=(x=l()).toggleUnderline)==null?void 0:f.call(x).run()),isStrike:t.isActive("strike"),canStrike:!i&&((k=(B=l()).toggleStrike)==null?void 0:k.call(B).run()),isInlineCode:t.isActive("code"),canInlineCode:!i&&((L=(p=l()).toggleCode)==null?void 0:L.call(p).run()),isBulletList:t.isActive("bulletList"),canBulletList:!i&&((h=(m=l()).toggleBulletList)==null?void 0:h.call(m).run()),isOrderedList:t.isActive("orderedList"),canOrderedList:!i&&((R=(C=l()).toggleOrderedList)==null?void 0:R.call(C).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())}},K=({editor:o,field:i,readOnly:e,inline:r})=>{const{tiptap:u={}}=i,{selector:n}=u,a=H.useMemo(()=>s=>E(E({},w(s,e)),n?n(s,e):{}),[n,e]),c=U({editor:o,selector:a});return!o||!c?null:J.jsx(M,{editor:o,editorState:c,field:i,readOnly:e,inline:r})};export{K as LoadedRichTextMenuFull};
|