@vectoriox/iox-builder 4.5.0 → 4.7.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/fesm2022/vectoriox-iox-builder.mjs +141 -109
- package/fesm2022/vectoriox-iox-builder.mjs.map +1 -1
- package/index.d.ts +47 -39
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1464,6 +1464,45 @@ declare function auditNodes(nodes: readonly AuditNode[], viewportWidth: number):
|
|
|
1464
1464
|
/** Counts per severity — the per-breakpoint summary strip. */
|
|
1465
1465
|
declare function summarise(findings: readonly AuditFinding[]): Record<AuditSeverity, number>;
|
|
1466
1466
|
|
|
1467
|
+
/**
|
|
1468
|
+
* LAYOUT PRESETS (B4) — the structures people build over and over, as one insert that is ALREADY
|
|
1469
|
+
* responsive. A preset is a container plus children (Webflow's Quick Stack idea), not a new
|
|
1470
|
+
* component type: what it inserts is ordinary nodes you can edit or take apart afterwards.
|
|
1471
|
+
*
|
|
1472
|
+
* The point is the `responsive` layers: a beginner gets a working phone layout without knowing what
|
|
1473
|
+
* a breakpoint is, and an expert gets the boring part typed for them.
|
|
1474
|
+
*/
|
|
1475
|
+
interface LayoutPresetChildStyles {
|
|
1476
|
+
[prop: string]: string;
|
|
1477
|
+
}
|
|
1478
|
+
interface LayoutPresetDef {
|
|
1479
|
+
id: string;
|
|
1480
|
+
name: string;
|
|
1481
|
+
icon: string;
|
|
1482
|
+
/** One line in the panel — what it is and what it does when it gets narrow. */
|
|
1483
|
+
description: string;
|
|
1484
|
+
/** Styles for the container itself, at base. */
|
|
1485
|
+
container: LayoutPresetChildStyles;
|
|
1486
|
+
/** Per-breakpoint container overrides — this is what makes the preset responsive. */
|
|
1487
|
+
containerResponsive?: Partial<Record<Breakpoint, LayoutPresetChildStyles>>;
|
|
1488
|
+
/** How many child containers to create. */
|
|
1489
|
+
childCount: number;
|
|
1490
|
+
/** Styles applied to every child at base. */
|
|
1491
|
+
child?: LayoutPresetChildStyles;
|
|
1492
|
+
/** Per-child, per-breakpoint overrides, by child index (e.g. reordering a split hero). */
|
|
1493
|
+
childResponsive?: Array<Partial<Record<Breakpoint, LayoutPresetChildStyles>>>;
|
|
1494
|
+
}
|
|
1495
|
+
declare const LAYOUT_PRESETS: readonly LayoutPresetDef[];
|
|
1496
|
+
/** Set a style trait's value on a node built from a component config. */
|
|
1497
|
+
declare function setStyleTrait(node: ComponentNode, name: string, value: any): void;
|
|
1498
|
+
/**
|
|
1499
|
+
* Build a preset's node tree. `createNode` makes an empty node of a type (the component registry in
|
|
1500
|
+
* the builder) — passed in so this stays pure and testable.
|
|
1501
|
+
*
|
|
1502
|
+
* @returns the container node, or `null` when the container type can't be created.
|
|
1503
|
+
*/
|
|
1504
|
+
declare function buildLayoutPreset(def: LayoutPresetDef, createNode: (type: string) => ComponentNode | null): ComponentNode | null;
|
|
1505
|
+
|
|
1467
1506
|
interface BuilderClipboard {
|
|
1468
1507
|
node?: ComponentNode;
|
|
1469
1508
|
presetId?: string;
|
|
@@ -1576,6 +1615,14 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1576
1615
|
breakpointCounts: BreakpointCounts;
|
|
1577
1616
|
/** Deadline for swallowing the canvas click that completes an overlay action. */
|
|
1578
1617
|
private _ignoreCanvasClickUntil;
|
|
1618
|
+
/** The starting points offered on a blank page — the responsive layout presets. */
|
|
1619
|
+
readonly starterLayouts: readonly LayoutPresetDef[];
|
|
1620
|
+
/** A page with nothing on it yet: offer a structure instead of a blank canvas. */
|
|
1621
|
+
get isPageEmpty(): boolean;
|
|
1622
|
+
/** Insert a starter layout at the end of the page and select it. */
|
|
1623
|
+
startWithLayout(def: LayoutPresetDef): void;
|
|
1624
|
+
/** Open the components panel from the empty state. */
|
|
1625
|
+
browseComponents(): void;
|
|
1579
1626
|
/** Findings for the width being edited; the panel is open while `auditOpen`. */
|
|
1580
1627
|
auditFindings: AuditFinding[];
|
|
1581
1628
|
auditOpen: boolean;
|
|
@@ -2778,45 +2825,6 @@ declare function essentialTraitsFor(type: string | null | undefined): readonly s
|
|
|
2778
2825
|
*/
|
|
2779
2826
|
declare function matchesControlSearch(name: string, label: string, term: string): boolean;
|
|
2780
2827
|
|
|
2781
|
-
/**
|
|
2782
|
-
* LAYOUT PRESETS (B4) — the structures people build over and over, as one insert that is ALREADY
|
|
2783
|
-
* responsive. A preset is a container plus children (Webflow's Quick Stack idea), not a new
|
|
2784
|
-
* component type: what it inserts is ordinary nodes you can edit or take apart afterwards.
|
|
2785
|
-
*
|
|
2786
|
-
* The point is the `responsive` layers: a beginner gets a working phone layout without knowing what
|
|
2787
|
-
* a breakpoint is, and an expert gets the boring part typed for them.
|
|
2788
|
-
*/
|
|
2789
|
-
interface LayoutPresetChildStyles {
|
|
2790
|
-
[prop: string]: string;
|
|
2791
|
-
}
|
|
2792
|
-
interface LayoutPresetDef {
|
|
2793
|
-
id: string;
|
|
2794
|
-
name: string;
|
|
2795
|
-
icon: string;
|
|
2796
|
-
/** One line in the panel — what it is and what it does when it gets narrow. */
|
|
2797
|
-
description: string;
|
|
2798
|
-
/** Styles for the container itself, at base. */
|
|
2799
|
-
container: LayoutPresetChildStyles;
|
|
2800
|
-
/** Per-breakpoint container overrides — this is what makes the preset responsive. */
|
|
2801
|
-
containerResponsive?: Partial<Record<Breakpoint, LayoutPresetChildStyles>>;
|
|
2802
|
-
/** How many child containers to create. */
|
|
2803
|
-
childCount: number;
|
|
2804
|
-
/** Styles applied to every child at base. */
|
|
2805
|
-
child?: LayoutPresetChildStyles;
|
|
2806
|
-
/** Per-child, per-breakpoint overrides, by child index (e.g. reordering a split hero). */
|
|
2807
|
-
childResponsive?: Array<Partial<Record<Breakpoint, LayoutPresetChildStyles>>>;
|
|
2808
|
-
}
|
|
2809
|
-
declare const LAYOUT_PRESETS: readonly LayoutPresetDef[];
|
|
2810
|
-
/** Set a style trait's value on a node built from a component config. */
|
|
2811
|
-
declare function setStyleTrait(node: ComponentNode, name: string, value: any): void;
|
|
2812
|
-
/**
|
|
2813
|
-
* Build a preset's node tree. `createNode` makes an empty node of a type (the component registry in
|
|
2814
|
-
* the builder) — passed in so this stays pure and testable.
|
|
2815
|
-
*
|
|
2816
|
-
* @returns the container node, or `null` when the container type can't be created.
|
|
2817
|
-
*/
|
|
2818
|
-
declare function buildLayoutPreset(def: LayoutPresetDef, createNode: (type: string) => ComponentNode | null): ComponentNode | null;
|
|
2819
|
-
|
|
2820
2828
|
/**
|
|
2821
2829
|
* The text on the drop indicator's chip — "into Card grid · position 2 of 3" (B2).
|
|
2822
2830
|
*
|