efficient-web-builder 69.5.0 → 70.1.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/CHANGELOG.md +34 -0
- package/dist/editor/components/AddPageWindow.d.ts +7 -0
- package/dist/editor/components/AddPageWindow.js +1 -0
- package/dist/editor/components/PageStarterCard.d.ts +9 -0
- package/dist/editor/components/PageStarterCard.js +1 -0
- package/dist/editor/components/PagesPanel.js +1 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/storefront-editor.css +71 -0
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/box-footer-rows.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/host-config.d.ts +2 -0
- package/dist/editor/lib/document/host-config.js +1 -0
- package/dist/editor/lib/document/overrides.d.ts +1 -0
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root.d.ts +12 -0
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/host-document-bridge.js +1 -1
- package/dist/format/lib/build/module-specifiers.d.ts +11 -0
- package/dist/format/lib/build/module-specifiers.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +1 -7
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-darken-styles.d.ts +7 -0
- package/dist/format/lib/content/box-darken-styles.js +1 -0
- package/dist/format/lib/content/card-row-keys.d.ts +10 -0
- package/dist/format/lib/content/card-row-keys.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +1 -11
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/count-numbers.js +1 -1
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
- package/dist/format/lib/document/blocks/general/Grid/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroGroup/meta.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/HeroGroup/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/OrderSummary/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/slots.d.ts +93 -0
- package/dist/format/lib/document/blocks/general/slots.js +1 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/node-lists.d.ts +4 -0
- package/dist/format/lib/document/node-lists.js +1 -1
- package/dist/format/lib/document/passes/document-position.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +9 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/page-starters.d.ts +14 -0
- package/dist/format/lib/page-starters.js +1 -0
- package/dist/format/lib/source-rules/panel-one-arrow.js +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.d.ts +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -1
- package/dist/format/lib/web-backend.d.ts +9 -0
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/document/slot-counts.js +1 -1
- package/package.json +6 -6
- package/dist/format/lib/document/panel-bands.d.ts +0 -15
- package/dist/format/lib/document/panel-bands.js +0 -1
|
@@ -46,6 +46,13 @@ export type DuplicatePageInput = {
|
|
|
46
46
|
title: string;
|
|
47
47
|
slug: string;
|
|
48
48
|
} & SiteScope;
|
|
49
|
+
export type PageStarter = {
|
|
50
|
+
id: string;
|
|
51
|
+
source: "library" | "template";
|
|
52
|
+
slug: string;
|
|
53
|
+
title: string;
|
|
54
|
+
layout: PageLayout;
|
|
55
|
+
};
|
|
49
56
|
export type SaveExpectation = {
|
|
50
57
|
version: string | null;
|
|
51
58
|
clientId: string;
|
|
@@ -76,6 +83,8 @@ export interface WebsitePages {
|
|
|
76
83
|
keepalive?: boolean;
|
|
77
84
|
}): Promise<void>;
|
|
78
85
|
duplicate?(id: string, input: DuplicatePageInput): Promise<EditorPageRow>;
|
|
86
|
+
starters?(scope?: SiteScope): Promise<PageStarter[]>;
|
|
87
|
+
createFromStarter?(starterId: string, input: DuplicatePageInput): Promise<EditorPageRow>;
|
|
79
88
|
linkTargets?(scope?: SiteScope): Promise<LinkTargetPage[]>;
|
|
80
89
|
}
|
|
81
90
|
export interface SiteChange {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readHidable as g}from"efficient-easel/draw";import{
|
|
1
|
+
import{readHidable as g}from"efficient-easel/draw";import{mapEachNode as _,mapNodeLists as b,nodeListsOf as y}from"../../../format/lib/document/node-lists.js";import{anchorSlug as M}from"../../../format/lib/content/anchor-name.js";import{namedRowField as I}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{resolveContainerDirection as S}from"../../../format/lib/content/container-direction.js";import{listNumberIn as B,readListNumberForm as F}from"../../../format/lib/content/list-number.js";import{nodeHiddenEverywhere as a}from"../../../format/lib/content/view-hide-class.js";import{stripMarkup as K}from"../../../format/lib/markup.js";const l="Contents",d="Flex",x="Text",L="numberForm",v="_contentsEntries",U="_kickerNumber",Z="data-sf-kicker-number",D=t=>g(t).text.trim(),N=t=>M(t?.anchor),k=t=>String(t.props?.id??""),H=t=>!g(t.props?.text).hidden&&!P(t.props)&&!I(t.props),u=t=>y(t);function R(t){for(const o of u(t))for(const n of o){if(a(n.props??{}))continue;if(n.type===x&&H(n))return n;if(n.type===x)continue;const i=R(n);if(i)return i}}function T(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||T(n))))}const h=t=>t.type===d&&S(d,t.props?.direction)==="row";function C(t){return u(t).some(o=>o.some(n=>n&&!a(n.props??{})&&(n.type===l||!h(n)&&C(n))))}function W(t){const o=[],n=(i,r)=>{for(const e of i){if(!e||a(e.props??{}))continue;if(e.type===l){r.open={contents:e,sections:r.waiting??[]},r.waiting=null,o.push(r.open);continue}if(h(e)&&C(e)){const c={inRow:!0,open:null,waiting:[]};for(const p of u(e))n(p,c);r.inRow||(r.open=null);continue}const s=r.open?.sections??r.waiting;if(e.type===d&&N(e.props)&&s&&!T(e)){s.push({box:e,kicker:R(e)});continue}for(const c of u(e))n(c,r)}};return n(t,{inRow:!1,open:null,waiting:null}),o}function X(t){return t.map(o=>({label:o.kicker?K(D(o.kicker.props?.text)):"",anchor:N(o.box.props)}))}function Y(t){const o=t?.length?W(t):[];if(!o.length)return null;const n=new Map,i=new Map;for(const r of o){const e=k(r.contents);e&&n.set(e,X(r.sections));const s=F(r.contents.props?.[L]);r.sections.forEach((c,p)=>{const f=c.kicker?k(c.kicker):"";f&&i.set(f,B(s,p))})}return{entries:n,numbers:i}}const tt=t=>t.endsWith(".")?`${t} `:`${t} · `;function nt(t){const o=t;if(!o?.content?.length)return t;const n=Y(o.content);if(!n)return t;const{entries:i,numbers:r}=n,e=s=>{const c=b(s,O=>_(O,e));let p=c.props??{},f=c!==s;const m=k(s),w=m?i.get(m):void 0;w&&(p={...p,[v]:w},f=!0);const E=m?r.get(m):void 0;return E&&(p={...p,[U]:E},f=!0),f?{...s,props:p}:s};return{...o,content:o.content.map(e)}}export{v as CONTENTS_ENTRIES_PROP,L as CONTENTS_NUMBER_FORM_KEY,Z as KICKER_NUMBER_ATTR,U as KICKER_NUMBER_PROP,tt as kickerLead,Y as pageContentsDrawing,nt as withPageContents};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNode as w,isNodeList as y}from"efficient-easel/data";import{hidableText as S,readHidable as _}from"efficient-easel/draw";import{blockSizeValuesOf as h}from"../content/block-size.js";import{nodeHiddenEverywhere as R,nodeViewHideClass as b}from"../../../format/lib/content/view-hide-class.js";import{CARD_ROW_FIELD_PROP as x,isCardTemplateSlot as g,namedRowField as C,ROW_BOUND_PROPS as E}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as P}from"../../../format/lib/content/box-show-for-choices.js";import{ownEntry as
|
|
1
|
+
import{isNode as w,isNodeList as y}from"efficient-easel/data";import{nodeListKeys as O}from"../../../format/lib/document/node-lists.js";import{hidableText as S,readHidable as _}from"efficient-easel/draw";import{blockSizeValuesOf as h}from"../content/block-size.js";import{nodeHiddenEverywhere as R,nodeViewHideClass as b}from"../../../format/lib/content/view-hide-class.js";import{CARD_ROW_FIELD_PROP as x,isCardTemplateSlot as g,namedRowField as C,ROW_BOUND_PROPS as E}from"../../../format/lib/content/card-template.js";import{SHOW_FOR_PROP as P}from"../../../format/lib/content/box-show-for-choices.js";import{ownEntry as l}from"../../../format/lib/own-entry.js";const m="slotCounts",c=t=>!_(t).hidden&&S(t).trim()!=="",F=t=>typeof t=="string"&&t.trim()!=="",N={Flex:()=>!0,PostCard:()=>!0,ImageBlock:t=>F(t.src),Text:t=>c(t.text),Heading:t=>c(t.text),Eyebrow:t=>c(t.eyebrow)},W=["widthFit","width","minWidth"],p=t=>y(t);function A(t){if(Array.isArray(t.content))return p(t.content)?t.content:null;const e=Object.values(t).filter(p);return e.length===1?e[0]:null}function I(t,e){return[...new Set([x,...Object.values(l(E,t)??{})])].some(o=>C(e,o)!=="")}function D(t){const e=t.props??{},n=l(N,t.type);if(!n||!n(e)||I(t.type,e)||b(e))return!1;const o=e[P];if(o!=null&&o!=="")return!1;const r=h(e);return!W.some(s=>r[s]!==void 0)}function H(t){let e=0;for(const n of t)if(!R(n.props??{})){if(!D(n))return;e+=1}return e>0?e:void 0}function L(t){const e={},n=new Set,o=new Set,r=(s,u)=>{if(Array.isArray(s))for(const i of s){if(!w(i))continue;const f=i.props.id;typeof f=="string"&&(n.has(f)?o:n).add(f);const a=u?null:A(i.props);if(typeof f=="string"&&a){const d=H(a);d!==void 0&&(e[f]=d)}for(const d of O(i))r(i.props[d],u||g(i.type,d))}};r(t,!1);for(const s of o)delete e[s];return e}function V(t,e){return{...t??{},[m]:L(e)}}function Y(t){const n=t.editor?.metadata?.[m],o=t.id,r=typeof o=="string"&&n&&typeof n=="object"?n[o]:void 0;return typeof r=="number"&&Number.isInteger(r)&&r>0?r:void 0}export{N as DRAWS_FOR_SURE,m as SLOT_COUNTS_KEY,Y as slotCountOf,L as slotCountsOf,V as withSlotCounts};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-web-builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "70.1.0",
|
|
4
4
|
"description": "The EFFICIENT website builder: the website editor, the general sections and the renderer that draws them, compiled. Hostable by any EFFICIENT product; nothing here imports a host.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tabler/icons-react": "^3.46.0",
|
|
57
|
-
"efficient-easel": "^
|
|
58
|
-
"efficient-shell": "^13.
|
|
57
|
+
"efficient-easel": "^35.0.0",
|
|
58
|
+
"efficient-shell": "^13.17.0",
|
|
59
59
|
"isomorphic-dompurify": "^3.18.0",
|
|
60
60
|
"next": ">=16",
|
|
61
61
|
"react": ">=19",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"@types/node": "^20",
|
|
74
74
|
"@types/react": "^19",
|
|
75
75
|
"@types/react-dom": "^19",
|
|
76
|
-
"efficient-easel": "^
|
|
77
|
-
"efficient-shell": "^13.
|
|
78
|
-
"efficient-shell-checker": "npm:efficient-shell@
|
|
76
|
+
"efficient-easel": "^35.0.0",
|
|
77
|
+
"efficient-shell": "^13.17.0",
|
|
78
|
+
"efficient-shell-checker": "npm:efficient-shell@13.17.0",
|
|
79
79
|
"esbuild": "^0.28.0",
|
|
80
80
|
"happy-dom": "^20.14.5",
|
|
81
81
|
"isomorphic-dompurify": "^3.18.0",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface BandRow {
|
|
2
|
-
shown: boolean;
|
|
3
|
-
labelled: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface DrawnBand {
|
|
6
|
-
key: string;
|
|
7
|
-
rows: readonly BandRow[];
|
|
8
|
-
}
|
|
9
|
-
export declare const TEXT_BAND_KEY = " text";
|
|
10
|
-
export declare const TEXT_BAND_TITLE = "Text";
|
|
11
|
-
export declare function bandIsDropped(band: DrawnBand): boolean;
|
|
12
|
-
export declare function droppedBands(bands: readonly DrawnBand[]): string[];
|
|
13
|
-
export declare function loneDesignBand(bands: readonly DrawnBand[], loose: readonly BandRow[]): string | null;
|
|
14
|
-
export declare function withoutBands<T extends Record<string, unknown>>(fields: T, keys: ReadonlySet<string>): T;
|
|
15
|
-
export declare function sameKeys(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const s=" text",f="Text";function l(e){const t=e.rows.filter(o=>o.shown);return t.length===0||t.length===1&&t[0].labelled}function u(e){return e.filter(l).map(t=>t.key)}function i(e,t){const o=e.filter(n=>!l(n));if(o.length!==1)return null;const r=e.filter(l).flatMap(n=>n.rows);return[...t,...r].some(n=>n.shown)?null:o[0].rows.filter(n=>n.shown).length>1?o[0].key:null}function p(e,t){let o=null;for(const r of t){const n=e[r];!n||n.marker!==!0||typeof n.fold!="string"||(o??={...e},o[r]={...n,fold:!1})}return o??e}function c(e,t){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}export{s as TEXT_BAND_KEY,f as TEXT_BAND_TITLE,l as bandIsDropped,u as droppedBands,i as loneDesignBand,c as sameKeys,p as withoutBands};
|