@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.
- package/dist/index.js +19 -2
- package/editor-dist/assets/Editor-44C53YAG-DEGaMaB1.js +1 -0
- package/editor-dist/assets/PuckPrototypeRoute-Cfcfp2ny.css +1 -0
- package/editor-dist/assets/PuckPrototypeRoute-ZGWY33XX.js +3878 -0
- package/editor-dist/assets/Render-DQXAYUBI-DydvfQCE.js +1 -0
- package/editor-dist/assets/chunk-2CNEFIQP-DQGs5Wqf.js +1 -0
- package/editor-dist/assets/full-7ZJV44EE-CUISJvzH.js +1 -0
- package/editor-dist/assets/index-NfTcJCu2.css +1 -0
- package/editor-dist/assets/index-Q6RlyZQf.js +883 -0
- package/editor-dist/assets/loaded-36WRJPBT-h2OdO2B0.js +1 -0
- package/editor-dist/assets/loaded-JKA25A3T-CqsSmhVi.js +1 -0
- package/editor-dist/assets/loaded-SMPR6KZF-DhwaGEfX.js +1 -0
- package/editor-dist/index.html +2 -2
- package/package.json +2 -2
- package/editor-dist/assets/Editor-EPSED64A-BbR5OV39.js +0 -1
- package/editor-dist/assets/PuckPrototypeRoute-BIRXZD6I.js +0 -230
- package/editor-dist/assets/PuckPrototypeRoute-Dmhc4leq.css +0 -1
- package/editor-dist/assets/Render-CU35UAWV-sTFPSz4y.js +0 -1
- package/editor-dist/assets/chunk-2CNEFIQP-ClxJS7-z.js +0 -37
- package/editor-dist/assets/full-N67EAB2Q-CbWp-ID0.js +0 -1
- package/editor-dist/assets/index-BuvqDAuB.css +0 -1
- package/editor-dist/assets/index-Cb3URH9a.js +0 -861
- package/editor-dist/assets/index-DqMdfn9V.js +0 -93
- package/editor-dist/assets/index-b40ZkO8N.js +0 -1
- package/editor-dist/assets/loaded-F37CNCVG-CX9bgUkA.js +0 -1
- package/editor-dist/assets/loaded-H325ZSK5-CiO5LpU-.js +0 -1
- package/editor-dist/assets/loaded-MIY725CK-B3NnbLsW.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as s,h as a,S as d,j as c,i as p}from"./PuckPrototypeRoute-ZGWY33XX.js";import{av as f,j as v}from"./index-Q6RlyZQf.js";p();function h(){const{options:r}=s(),l=a(r),{editor:o}=s(),i=f({editor:o,selector:e=>{var t,n;return(t=e.editor)!=null&&t.isActive("bulletList")?"ul":(n=e.editor)!=null&&n.isActive("orderedList")?"ol":"p"}}),u=e=>{const t=o==null?void 0:o.chain();e==="p"?t==null||t.focus().setParagraph().run():e==="ol"?t==null||t.focus().toggleOrderedList().run():e==="ul"&&(t==null||t.focus().toggleBulletList().run())};return v.jsx(d,{options:l,onChange:u,value:i??"p",defaultValue:"p",renderDefaultIcon:c})}export{h as ListSelectLoaded};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as i,f as d,S as c,H as p,i as f}from"./PuckPrototypeRoute-ZGWY33XX.js";import{av as g,j as h}from"./index-Q6RlyZQf.js";f();function C(){const{options:s}=i(),l=d(s),{editor:r}=i(),a=g({editor:r,selector:n=>{var e,t;if((e=n.editor)!=null&&e.isActive("paragraph"))return"p";for(let o=1;o<=6;o++)if((t=n.editor)!=null&&t.isActive("heading",{level:o}))return`h${o}`;return"p"}}),u=n=>{const e=r==null?void 0:r.chain();if(n==="p")e==null||e.focus().setParagraph().run();else{const t=parseInt(n.replace("h",""),10);e==null||e.focus().toggleHeading({level:t}).run()}};return h.jsx(c,{options:l,onChange:u,value:a??"p",defaultValue:"p",renderDefaultIcon:p})}export{C as HeadingSelectLoaded};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as u,e as f,S as g,A,i as v}from"./PuckPrototypeRoute-ZGWY33XX.js";import{av as p,j as x}from"./index-Q6RlyZQf.js";v();function _(){var l;const{options:n}=u(),a=f(n),{editor:i}=u(),c=(l=p({editor:i,selector:t=>{var e,o,r,s;return(e=t.editor)!=null&&e.isActive({textAlign:"center"})?"center":(o=t.editor)!=null&&o.isActive({textAlign:"right"})?"right":(r=t.editor)!=null&&r.isActive({textAlign:"justify"})?"justify":n!=null&&n.textAlign&&(s=n.textAlign.defaultAlignment)!=null?s:"left"}}))!=null?l:"left",d=t=>{const e=i==null?void 0:i.chain();e==null||e.focus().setTextAlign(t).run()};return x.jsx(g,{options:a,onChange:d,value:c,defaultValue:"left",renderDefaultIcon:A})}export{_ as AlignSelectLoaded};
|
package/editor-dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<title>Avocado Studio</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Q6RlyZQf.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-NfTcJCu2.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avocadostudio-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Self-host launcher for the Avocado Studio editor UI",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"esbuild": "^0.24.0",
|
|
42
42
|
"tsx": "^4.19.0",
|
|
43
43
|
"typescript": "^5.7.3",
|
|
44
|
-
"@avocadostudio-ai/shared": "0.
|
|
44
|
+
"@avocadostudio-ai/shared": "0.31.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "rm -rf dist && esbuild src/index.ts --bundle --platform=node --target=node22 --format=esm --outfile=dist/index.js --banner:js='#!/usr/bin/env node'",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as b}from"./chunk-2CNEFIQP-ClxJS7-z.js";import{u as y,a as j,E as L,_ as m,L as M,b as p,o as P,i as A}from"./PuckPrototypeRoute-BIRXZD6I.js";import{r as s,j as g}from"./index-Cb3URH9a.js";import{E as N,u as U}from"./index-b40ZkO8N.js";import"./index-DqMdfn9V.js";A();A();function C({content:a,onChange:x,extensions:v,editable:d=!0,onFocusChange:o,name:c}){const[i,E]=P(null,50,{leading:!0,maxWait:200}),l=s.useRef(!1),S=s.useRef(""),f=s.useRef(null),R=!!f.current,_=j(t=>t.state.ui.field.focus===c),T=t=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{S.current===t&&(f.current=null)},200)},u=y(),e=U({extensions:v,content:a,editable:d,immediatelyRender:!1,parseOptions:{preserveWhitespace:"full"},onUpdate:({editor:t})=>{if(l.current||!_){u.getState().setUi({field:{focus:c}});return}const r=t.getHTML(),{from:n,to:h}=t.state.selection;E({from:n,to:h,html:r}),T(r),S.current=r}});return s.useEffect(()=>{if(!e)return;const t=()=>{o==null||o(e)};return e.on("focus",t),()=>{e.off("focus",t)}},[e,o]),s.useEffect(()=>{if(i){const{ui:t}=u.getState().state;x(i.html,{field:m(p({},t.field),{metadata:{from:i.from,to:i.to}})})}},[e,i,x,u,c]),s.useEffect(()=>{e==null||e.setEditable(d)},[e,d]),s.useEffect(()=>{var t;if(!e||R||e.getHTML()===a)return;l.current=!0,e.commands.setContent(a,{emitUpdate:!1});const{ui:n}=u.getState().state;typeof((t=n.field.metadata)==null?void 0:t.from)<"u"&&e.commands.setTextSelection({from:n.field.metadata.from,to:n.field.metadata.to}),l.current=!1},[a,e,u]),e}var F=s.memo(a=>{const{onChange:x,content:v,readOnly:d=!1,field:o,inline:c=!1,onFocus:i,id:E,name:l}=a,{tiptap:S={},options:f}=o,{extensions:R=[]}=S,_=s.useMemo(()=>[b.configure(f),...R],[o,R]),T=y(),u=`${l}${c?"::inline":""}`,e=C({content:v,onChange:x,extensions:_,editable:!d,name:u,onFocusChange:r=>{if(r){const n=T.getState();T.setState({currentRichText:{field:o,editor:r,id:E,inline:c},state:m(p({},n.state),{ui:m(p({},n.state.ui),{field:m(p({},n.state.ui.field),{focus:u})})})}),i==null||i(r)}}}),t=j(r=>{var n,h;return!c&&((n=r.currentRichText)==null?void 0:n.id)===E&&((h=r.currentRichText)!=null&&h.inlineComponentId)?r.currentRichText.editor:e});return e?g.jsx(L,m(p({},a),{editor:e,menu:g.jsx(M,{field:o,editor:t,readOnly:d}),children:g.jsx(N,{editor:e,className:"rich-text"})})):null});F.displayName="Editor";export{F as Editor};
|