@avocadostudio-ai/cli 0.29.1 → 0.30.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 +13 -0
- package/editor-dist/assets/{Editor-EPSED64A-Bglre1zy.js → Editor-EPSED64A-BbR5OV39.js} +1 -1
- package/editor-dist/assets/{PuckPrototypeRoute-CFwlZaQP.js → PuckPrototypeRoute-BIRXZD6I.js} +14 -19
- package/editor-dist/assets/{Render-CU35UAWV-R-hJMdml.js → Render-CU35UAWV-sTFPSz4y.js} +1 -1
- package/editor-dist/assets/{chunk-2CNEFIQP-kdd7MquI.js → chunk-2CNEFIQP-ClxJS7-z.js} +1 -1
- package/editor-dist/assets/{full-N67EAB2Q-G-d5oZde.js → full-N67EAB2Q-CbWp-ID0.js} +1 -1
- package/editor-dist/assets/{index-C22KfTbY.css → index-BuvqDAuB.css} +1 -1
- package/editor-dist/assets/index-Cb3URH9a.js +861 -0
- package/editor-dist/assets/{index-bSPYizZ6.js → index-DqMdfn9V.js} +6 -6
- package/editor-dist/assets/{index-BI9xm3sn.js → index-b40ZkO8N.js} +1 -1
- package/editor-dist/assets/{loaded-F37CNCVG-m-j8U0AY.js → loaded-F37CNCVG-CX9bgUkA.js} +1 -1
- package/editor-dist/assets/{loaded-H325ZSK5-nYv9gLuN.js → loaded-H325ZSK5-CiO5LpU-.js} +1 -1
- package/editor-dist/assets/{loaded-MIY725CK-CggCDxB3.js → loaded-MIY725CK-B3NnbLsW.js} +1 -1
- package/editor-dist/index.html +2 -2
- package/package.json +2 -2
- package/editor-dist/assets/index-Cy-PEt_d.js +0 -765
package/dist/index.js
CHANGED
|
@@ -14131,6 +14131,8 @@ registerBuiltinBlock("Card", {
|
|
|
14131
14131
|
displayName: "Card",
|
|
14132
14132
|
description: "Single prominent card with a CTA. Use 'full-bleed' variant for background image with dark overlay and white text.",
|
|
14133
14133
|
category: "content",
|
|
14134
|
+
// One card on its own reads as a fragment of a grid; CardGrid is the section.
|
|
14135
|
+
role: "element",
|
|
14134
14136
|
fields: {
|
|
14135
14137
|
tone: f.tone(),
|
|
14136
14138
|
title: f.text("Card title"),
|
|
@@ -14761,6 +14763,17 @@ var blockDefinitionSchema = external_exports.object({
|
|
|
14761
14763
|
category: external_exports.string().min(1).optional(),
|
|
14762
14764
|
description: external_exports.string().min(1).optional(),
|
|
14763
14765
|
chrome: external_exports.boolean().optional(),
|
|
14766
|
+
/**
|
|
14767
|
+
* How the add-block picker offers this type — see `BlockMeta.role` and
|
|
14768
|
+
* `BlockCatalogueConfig`. Each is emitted only when it differs from the
|
|
14769
|
+
* default, so absent means: a section, insertable, in no custom group.
|
|
14770
|
+
*
|
|
14771
|
+
* A consumer reads them from here and never from its own registry: a site
|
|
14772
|
+
* that declared a built-in `Card` a section has said so by leaving `role` out.
|
|
14773
|
+
*/
|
|
14774
|
+
role: external_exports.enum(["section", "element"]).optional(),
|
|
14775
|
+
insertable: external_exports.boolean().optional(),
|
|
14776
|
+
group: external_exports.string().min(1).optional(),
|
|
14764
14777
|
/**
|
|
14765
14778
|
* The site renders this block at a fixed position — see `BlockMeta.fixed`.
|
|
14766
14779
|
* The editor hides its move, delete and add controls, and the ops engine
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as b}from"./chunk-2CNEFIQP-
|
|
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};
|