@vectoriox/iox-builder 4.3.0 → 4.4.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 +406 -121
- package/fesm2022/vectoriox-iox-builder.mjs.map +1 -1
- package/index.d.ts +172 -72
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ComponentRef, Type, ChangeDetectorRef, OnInit, AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, ApplicationRef, SimpleChanges, ViewContainerRef, Injector, EnvironmentInjector, InjectionToken, TemplateRef, AfterContentInit, QueryList } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i29 from '@vectoriox/iox-ui';
|
|
4
4
|
import { ResponsiveOverrides, RelativeSourceSpec, Breakpoint, DataSourceEndpoints } from '@vectoriox/iox-ui';
|
|
5
5
|
export { ComponentInstanceRegistryService, IoxContextSlot, SetContextParams, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
7
|
import { Subject, Subscription, BehaviorSubject, Observable } from 'rxjs';
|
|
8
8
|
import * as _vectoriox_iox_builder from '@vectoriox/iox-builder';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i24 from 'primeng/popover';
|
|
10
10
|
import { Popover } from 'primeng/popover';
|
|
11
11
|
import { HttpClient } from '@angular/common/http';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i21 from '@angular/cdk/drag-drop';
|
|
13
13
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
14
|
+
import * as i19 from '@angular/common';
|
|
15
|
+
import * as i20 from '@angular/forms';
|
|
16
|
+
import * as i22 from 'primeng/accordion';
|
|
17
|
+
import * as i23 from 'primeng/button';
|
|
18
|
+
import * as i25 from 'primeng/inputtext';
|
|
19
|
+
import * as i26 from 'primeng/select';
|
|
20
|
+
import * as i27 from 'primeng/tooltip';
|
|
21
|
+
import * as i28 from 'primeng/dialog';
|
|
22
22
|
|
|
23
23
|
declare enum StyleCategory {
|
|
24
24
|
Layout = "Layout",
|
|
@@ -1359,6 +1359,111 @@ declare class ViewportService {
|
|
|
1359
1359
|
/** Override counts per breakpoint — what the breakpoint bar's dots show. Base is never present. */
|
|
1360
1360
|
type BreakpointCounts = Partial<Record<Breakpoint, number>>;
|
|
1361
1361
|
|
|
1362
|
+
/**
|
|
1363
|
+
* STRUCTURE OPS (A4) — the one-click layout changes people actually make at a narrow width, as pure
|
|
1364
|
+
* "what to write" functions. Each returns a flat style map the caller stores in the node's
|
|
1365
|
+
* `responsive[bp]` layer (or in the base styles at Base) through the shared `setOverride`.
|
|
1366
|
+
*
|
|
1367
|
+
* All of it is ordinary CSS the SSR engine already renders — there is no second tree and no
|
|
1368
|
+
* per-width HTML. See responsive-breakpoints-plan.md (D5).
|
|
1369
|
+
*/
|
|
1370
|
+
type StyleMap = Record<string, any>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Hide / show at a width. Hiding is `display: none` INSIDE that breakpoint's rules — the node stays
|
|
1373
|
+
* in the DOM and in the SSR output (one HTML document serves every width), so hidden content still
|
|
1374
|
+
* ships bytes and is still indexed. Showing again clears the override rather than guessing a value.
|
|
1375
|
+
*
|
|
1376
|
+
* @returns the props to write, or `null` meaning "clear the display override at this breakpoint".
|
|
1377
|
+
*/
|
|
1378
|
+
declare function visibilityProps(hidden: boolean): StyleMap | null;
|
|
1379
|
+
/** True when this node is hidden by the resolved styles at some width. */
|
|
1380
|
+
declare function isHiddenAt(resolvedStyleProps: StyleMap | null | undefined): boolean;
|
|
1381
|
+
/**
|
|
1382
|
+
* Stack a container's children in one column — the most common mobile edit, and four separate
|
|
1383
|
+
* controls today (display, direction, wrap, columns). A grid becomes a single-column grid; anything
|
|
1384
|
+
* else becomes a column flex box.
|
|
1385
|
+
*/
|
|
1386
|
+
declare function stackChildrenProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap;
|
|
1387
|
+
/**
|
|
1388
|
+
* Collapse a grid to `count` columns (a flex row is stacked instead — it has no column track).
|
|
1389
|
+
* `count` is clamped to at least 1.
|
|
1390
|
+
*/
|
|
1391
|
+
declare function collapseColumnsProps(resolvedStyleProps: StyleMap | null | undefined, count: number): StyleMap;
|
|
1392
|
+
/** How many equal columns a `repeat(N, …)` track list describes, or null when it isn't one. */
|
|
1393
|
+
declare function columnCountOf(resolvedStyleProps: StyleMap | null | undefined): number | null;
|
|
1394
|
+
/**
|
|
1395
|
+
* Make fixed pixel sizes fluid: `width: 520px` → `width: 100%` with the original kept as
|
|
1396
|
+
* `max-width`, so the element still never exceeds its designed size on a wide screen. `minWidth` in
|
|
1397
|
+
* px is dropped to 0 — it is what actually forces horizontal scrolling on a phone.
|
|
1398
|
+
*
|
|
1399
|
+
* @returns the props to write; EMPTY when there is nothing fixed to fluidise.
|
|
1400
|
+
*/
|
|
1401
|
+
declare function fluidiseProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap;
|
|
1402
|
+
/** True when `fluidiseProps` would change anything — drives the button's disabled state. */
|
|
1403
|
+
declare function canFluidise(resolvedStyleProps: StyleMap | null | undefined): boolean;
|
|
1404
|
+
/**
|
|
1405
|
+
* Reorder children AT ONE WIDTH using CSS `order`, leaving the tree — and so the DOM and
|
|
1406
|
+
* screen-reader order — untouched. Returns one value per child BY CHILD INDEX: the `order` it must
|
|
1407
|
+
* take, or `null` for "no override needed".
|
|
1408
|
+
*
|
|
1409
|
+
* Either every child gets an explicit `order` or none does: CSS defaults `order` to 0, so a partial
|
|
1410
|
+
* set would mix overridden children with unordered ones and read as an arbitrary interleave.
|
|
1411
|
+
*
|
|
1412
|
+
* @param count How many children there are.
|
|
1413
|
+
* @param from Index of the child being moved.
|
|
1414
|
+
* @param to Index it should occupy.
|
|
1415
|
+
*/
|
|
1416
|
+
declare function reorderProps(count: number, from: number, to: number): Array<number | null>;
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* RESPONSIVE AUDIT (A5) — find what is broken at a width, from the node tree plus ONE measurement
|
|
1420
|
+
* pass. A builder that lets you author five widths must also tell you which of them are broken.
|
|
1421
|
+
*
|
|
1422
|
+
* Pure: the caller measures (one `getBoundingClientRect` per node, off the animation path) and
|
|
1423
|
+
* passes the numbers in. Every finding that can be repaired carries the exact props to write, so a
|
|
1424
|
+
* fix is one `setOverride` per key — one undo step, and it shows as an ordinary override.
|
|
1425
|
+
*/
|
|
1426
|
+
declare enum AuditCode {
|
|
1427
|
+
Overflow = "overflow",
|
|
1428
|
+
FixedWidth = "fixed-width",
|
|
1429
|
+
TapTarget = "tap-target",
|
|
1430
|
+
TinyText = "tiny-text",
|
|
1431
|
+
UnboundedImage = "unbounded-image"
|
|
1432
|
+
}
|
|
1433
|
+
declare enum AuditSeverity {
|
|
1434
|
+
Error = "error",
|
|
1435
|
+
Warning = "warning",
|
|
1436
|
+
Info = "info"
|
|
1437
|
+
}
|
|
1438
|
+
/** One node, resolved at the width being audited. */
|
|
1439
|
+
interface AuditNode {
|
|
1440
|
+
id: string;
|
|
1441
|
+
type: string;
|
|
1442
|
+
label?: string;
|
|
1443
|
+
/** Styles RESOLVED at this breakpoint (base + every wider layer + this one). */
|
|
1444
|
+
styleProps: StyleMap;
|
|
1445
|
+
/** Laid-out size in CSS px at this width. */
|
|
1446
|
+
width: number;
|
|
1447
|
+
height: number;
|
|
1448
|
+
}
|
|
1449
|
+
interface AuditFinding {
|
|
1450
|
+
nodeId: string;
|
|
1451
|
+
nodeName: string;
|
|
1452
|
+
code: AuditCode;
|
|
1453
|
+
severity: AuditSeverity;
|
|
1454
|
+
/** Human summary — the builder library is English-only, like the rest of its chrome. */
|
|
1455
|
+
message: string;
|
|
1456
|
+
/** Props to write into this breakpoint's layer to repair it; absent when no safe auto-fix. */
|
|
1457
|
+
fix?: StyleMap;
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* Audit nodes laid out at `viewportWidth`. Returns findings ordered by severity (errors first),
|
|
1461
|
+
* then by the order the nodes were given — so the worst thing is at the top of the list.
|
|
1462
|
+
*/
|
|
1463
|
+
declare function auditNodes(nodes: readonly AuditNode[], viewportWidth: number): AuditFinding[];
|
|
1464
|
+
/** Counts per severity — the per-breakpoint summary strip. */
|
|
1465
|
+
declare function summarise(findings: readonly AuditFinding[]): Record<AuditSeverity, number>;
|
|
1466
|
+
|
|
1362
1467
|
interface BuilderClipboard {
|
|
1363
1468
|
node?: ComponentNode;
|
|
1364
1469
|
presetId?: string;
|
|
@@ -1416,6 +1521,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1416
1521
|
private appRef;
|
|
1417
1522
|
private moveableCanvas;
|
|
1418
1523
|
private selectoCanvas;
|
|
1524
|
+
private styleRegistry;
|
|
1419
1525
|
private contextStore;
|
|
1420
1526
|
/**
|
|
1421
1527
|
* Re-apply context-bound inputs on the CANVAS when a slot changes — the builder twin of the
|
|
@@ -1470,6 +1576,28 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1470
1576
|
breakpointCounts: BreakpointCounts;
|
|
1471
1577
|
/** Deadline for swallowing the canvas click that completes an overlay action. */
|
|
1472
1578
|
private _ignoreCanvasClickUntil;
|
|
1579
|
+
/** Findings for the width being edited; the panel is open while `auditOpen`. */
|
|
1580
|
+
auditFindings: AuditFinding[];
|
|
1581
|
+
auditOpen: boolean;
|
|
1582
|
+
auditRunning: boolean;
|
|
1583
|
+
get auditBreakpointLabel(): string;
|
|
1584
|
+
toggleAudit(): void;
|
|
1585
|
+
/**
|
|
1586
|
+
* Audit every rendered node at the width being edited: resolve its styles for this breakpoint
|
|
1587
|
+
* and measure it ONCE (on demand — never on the animation path). Measurements are divided by the
|
|
1588
|
+
* canvas scale, so findings are in CSS px whatever the zoom. The rules are pure — see
|
|
1589
|
+
* `utils/responsive-audit.util.ts`.
|
|
1590
|
+
*/
|
|
1591
|
+
runAudit(): void;
|
|
1592
|
+
/** Apply one finding's fix into the current breakpoint's layer (or the base styles at Base). */
|
|
1593
|
+
applyAuditFix(finding: AuditFinding): void;
|
|
1594
|
+
/** Apply every fixable finding, then re-measure. */
|
|
1595
|
+
applyAllAuditFixes(): void;
|
|
1596
|
+
/** Select the node a finding is about. */
|
|
1597
|
+
selectAuditNode(finding: AuditFinding): void;
|
|
1598
|
+
/** A node's full base style map, flattened from its styleTraits. */
|
|
1599
|
+
private baseStyleMapOf;
|
|
1600
|
+
private findNodeById;
|
|
1473
1601
|
activeZoom: number;
|
|
1474
1602
|
activeScreenWidth: number;
|
|
1475
1603
|
selectedItem: ComponentNode | null;
|
|
@@ -1530,7 +1658,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1530
1658
|
get canvasMinHeight(): number;
|
|
1531
1659
|
private sub?;
|
|
1532
1660
|
private registrySub?;
|
|
1533
|
-
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, symbolRegistry: SymbolRegistryService, cdr: ChangeDetectorRef, appRef: ApplicationRef, moveableCanvas: MoveableCanvasService, selectoCanvas: SelectoCanvasService);
|
|
1661
|
+
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, symbolRegistry: SymbolRegistryService, cdr: ChangeDetectorRef, appRef: ApplicationRef, moveableCanvas: MoveableCanvasService, selectoCanvas: SelectoCanvasService, styleRegistry: StyleRegistryService);
|
|
1534
1662
|
ngOnInit(): void;
|
|
1535
1663
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1536
1664
|
ngAfterViewInit(): void;
|
|
@@ -1905,6 +2033,9 @@ declare class ToolbarComponent {
|
|
|
1905
2033
|
activeBreakpoint: Breakpoint;
|
|
1906
2034
|
/** Overrides per breakpoint — for the selection, or the page when nothing is selected. */
|
|
1907
2035
|
breakpointCounts: BreakpointCounts;
|
|
2036
|
+
/** Findings at the current width — shown as a count on the audit button. */
|
|
2037
|
+
auditCount: number;
|
|
2038
|
+
auditOpen: boolean;
|
|
1908
2039
|
activeZoom: number;
|
|
1909
2040
|
activeScreenWidth: number;
|
|
1910
2041
|
canUndo: boolean;
|
|
@@ -1913,6 +2044,7 @@ declare class ToolbarComponent {
|
|
|
1913
2044
|
pageStatus: string;
|
|
1914
2045
|
modeChange: EventEmitter<BuilderMode>;
|
|
1915
2046
|
breakpointChange: EventEmitter<Breakpoint>;
|
|
2047
|
+
auditToggle: EventEmitter<void>;
|
|
1916
2048
|
zoomChange: EventEmitter<number | "fit">;
|
|
1917
2049
|
screenWidthChange: EventEmitter<number>;
|
|
1918
2050
|
undo: EventEmitter<void>;
|
|
@@ -1950,7 +2082,7 @@ declare class ToolbarComponent {
|
|
|
1950
2082
|
toggleZoomPopover(event: Event): void;
|
|
1951
2083
|
selectZoom(value: number | 'fit'): void;
|
|
1952
2084
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarComponent, never>;
|
|
1953
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "app-toolbar", never, { "activeMode": { "alias": "activeMode"; "required": false; }; "activeBreakpoint": { "alias": "activeBreakpoint"; "required": false; }; "breakpointCounts": { "alias": "breakpointCounts"; "required": false; }; "activeZoom": { "alias": "activeZoom"; "required": false; }; "activeScreenWidth": { "alias": "activeScreenWidth"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; "isSaving": { "alias": "isSaving"; "required": false; }; "pageStatus": { "alias": "pageStatus"; "required": false; }; }, { "modeChange": "modeChange"; "breakpointChange": "breakpointChange"; "zoomChange": "zoomChange"; "screenWidthChange": "screenWidthChange"; "undo": "undo"; "redo": "redo"; "save": "save"; "preview": "preview"; "publishToggle": "publishToggle"; }, never, never, false, never>;
|
|
2085
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "app-toolbar", never, { "activeMode": { "alias": "activeMode"; "required": false; }; "activeBreakpoint": { "alias": "activeBreakpoint"; "required": false; }; "breakpointCounts": { "alias": "breakpointCounts"; "required": false; }; "auditCount": { "alias": "auditCount"; "required": false; }; "auditOpen": { "alias": "auditOpen"; "required": false; }; "activeZoom": { "alias": "activeZoom"; "required": false; }; "activeScreenWidth": { "alias": "activeScreenWidth"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; "isSaving": { "alias": "isSaving"; "required": false; }; "pageStatus": { "alias": "pageStatus"; "required": false; }; }, { "modeChange": "modeChange"; "breakpointChange": "breakpointChange"; "auditToggle": "auditToggle"; "zoomChange": "zoomChange"; "screenWidthChange": "screenWidthChange"; "undo": "undo"; "redo": "redo"; "save": "save"; "preview": "preview"; "publishToggle": "publishToggle"; }, never, never, false, never>;
|
|
1954
2086
|
}
|
|
1955
2087
|
|
|
1956
2088
|
/**
|
|
@@ -2457,9 +2589,33 @@ declare class BreadcrumbBarComponent {
|
|
|
2457
2589
|
static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbBarComponent, "app-breadcrumb-bar", never, { "path": { "alias": "path"; "required": false; }; }, { "nodeSelect": "nodeSelect"; "nodePeek": "nodePeek"; }, never, never, false, never>;
|
|
2458
2590
|
}
|
|
2459
2591
|
|
|
2592
|
+
/**
|
|
2593
|
+
* The responsive audit list (A5) — what is broken at the width being edited, worst first.
|
|
2594
|
+
* Presentational: the builder runs the audit (it owns the tree and the canvas measurements) and
|
|
2595
|
+
* applies the fixes; this only renders and emits.
|
|
2596
|
+
*/
|
|
2597
|
+
declare class AuditPanelComponent {
|
|
2598
|
+
findings: AuditFinding[];
|
|
2599
|
+
/** Name of the breakpoint being audited, for the header. */
|
|
2600
|
+
breakpointLabel: string;
|
|
2601
|
+
running: boolean;
|
|
2602
|
+
select: EventEmitter<AuditFinding>;
|
|
2603
|
+
fix: EventEmitter<AuditFinding>;
|
|
2604
|
+
fixAll: EventEmitter<void>;
|
|
2605
|
+
rerun: EventEmitter<void>;
|
|
2606
|
+
closePanel: EventEmitter<void>;
|
|
2607
|
+
readonly severities: typeof AuditSeverity;
|
|
2608
|
+
trackFinding(_index: number, finding: AuditFinding): string;
|
|
2609
|
+
/** Findings that carry a safe auto-fix — what "Fix all" would apply. */
|
|
2610
|
+
get fixableCount(): number;
|
|
2611
|
+
iconFor(severity: AuditSeverity): string;
|
|
2612
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditPanelComponent, never>;
|
|
2613
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuditPanelComponent, "app-audit-panel", never, { "findings": { "alias": "findings"; "required": false; }; "breakpointLabel": { "alias": "breakpointLabel"; "required": false; }; "running": { "alias": "running"; "required": false; }; }, { "select": "select"; "fix": "fix"; "fixAll": "fixAll"; "rerun": "rerun"; "closePanel": "closePanel"; }, never, never, false, never>;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2460
2616
|
declare class IoxBuilderModule {
|
|
2461
2617
|
static ɵfac: i0.ɵɵFactoryDeclaration<IoxBuilderModule, never>;
|
|
2462
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IoxBuilderModule, [typeof BuilderComponent, typeof RenderDirective, typeof IoxDraggableDirective, typeof IoxDropzoneDirective, typeof OverlayComponent, typeof ToolbarComponent, typeof SectionComponent, typeof BuilderContainerComponent, typeof BuilderLinkedContainerComponent, typeof BuilderRepeaterComponent, typeof BuilderButtonBlockComponent, typeof SliderContainerComponent, typeof SliderSlideComponent, typeof PanelComponent, typeof PanelChildComponent, typeof LayerTreeComponent, typeof BreadcrumbBarComponent], [typeof
|
|
2618
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IoxBuilderModule, [typeof BuilderComponent, typeof RenderDirective, typeof IoxDraggableDirective, typeof IoxDropzoneDirective, typeof OverlayComponent, typeof ToolbarComponent, typeof SectionComponent, typeof BuilderContainerComponent, typeof BuilderLinkedContainerComponent, typeof BuilderRepeaterComponent, typeof BuilderButtonBlockComponent, typeof SliderContainerComponent, typeof SliderSlideComponent, typeof PanelComponent, typeof PanelChildComponent, typeof LayerTreeComponent, typeof BreadcrumbBarComponent, typeof AuditPanelComponent], [typeof i19.CommonModule, typeof i20.FormsModule, typeof i21.DragDropModule, typeof i22.AccordionModule, typeof i23.ButtonModule, typeof i24.PopoverModule, typeof i25.InputTextModule, typeof i26.SelectModule, typeof i27.TooltipModule, typeof i28.DialogModule, typeof i29.IoxPageModule], [typeof i19.CommonModule, typeof i20.FormsModule, typeof i21.DragDropModule, typeof i22.AccordionModule, typeof i23.ButtonModule, typeof i24.PopoverModule, typeof i25.InputTextModule, typeof i26.SelectModule, typeof i27.TooltipModule, typeof i28.DialogModule, typeof i29.IoxPageModule, typeof BuilderComponent, typeof RenderDirective, typeof IoxDraggableDirective, typeof IoxDropzoneDirective, typeof OverlayComponent, typeof ToolbarComponent, typeof SectionComponent, typeof BuilderContainerComponent, typeof BuilderLinkedContainerComponent, typeof BuilderRepeaterComponent, typeof BuilderButtonBlockComponent, typeof SliderContainerComponent, typeof SliderSlideComponent, typeof PanelComponent, typeof PanelChildComponent, typeof LayerTreeComponent, typeof BreadcrumbBarComponent, typeof AuditPanelComponent]>;
|
|
2463
2619
|
static ɵinj: i0.ɵɵInjectorDeclaration<IoxBuilderModule>;
|
|
2464
2620
|
}
|
|
2465
2621
|
|
|
@@ -2600,62 +2756,6 @@ declare function resolveInsertTarget<T extends TreePathNode & {
|
|
|
2600
2756
|
children?: T[] | null;
|
|
2601
2757
|
}>(roots: T[], selected: T | null | undefined, isContainer: (node: T) => boolean): InsertTarget<T>;
|
|
2602
2758
|
|
|
2603
|
-
/**
|
|
2604
|
-
* STRUCTURE OPS (A4) — the one-click layout changes people actually make at a narrow width, as pure
|
|
2605
|
-
* "what to write" functions. Each returns a flat style map the caller stores in the node's
|
|
2606
|
-
* `responsive[bp]` layer (or in the base styles at Base) through the shared `setOverride`.
|
|
2607
|
-
*
|
|
2608
|
-
* All of it is ordinary CSS the SSR engine already renders — there is no second tree and no
|
|
2609
|
-
* per-width HTML. See responsive-breakpoints-plan.md (D5).
|
|
2610
|
-
*/
|
|
2611
|
-
type StyleMap = Record<string, any>;
|
|
2612
|
-
/**
|
|
2613
|
-
* Hide / show at a width. Hiding is `display: none` INSIDE that breakpoint's rules — the node stays
|
|
2614
|
-
* in the DOM and in the SSR output (one HTML document serves every width), so hidden content still
|
|
2615
|
-
* ships bytes and is still indexed. Showing again clears the override rather than guessing a value.
|
|
2616
|
-
*
|
|
2617
|
-
* @returns the props to write, or `null` meaning "clear the display override at this breakpoint".
|
|
2618
|
-
*/
|
|
2619
|
-
declare function visibilityProps(hidden: boolean): StyleMap | null;
|
|
2620
|
-
/** True when this node is hidden by the resolved styles at some width. */
|
|
2621
|
-
declare function isHiddenAt(resolvedStyleProps: StyleMap | null | undefined): boolean;
|
|
2622
|
-
/**
|
|
2623
|
-
* Stack a container's children in one column — the most common mobile edit, and four separate
|
|
2624
|
-
* controls today (display, direction, wrap, columns). A grid becomes a single-column grid; anything
|
|
2625
|
-
* else becomes a column flex box.
|
|
2626
|
-
*/
|
|
2627
|
-
declare function stackChildrenProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap;
|
|
2628
|
-
/**
|
|
2629
|
-
* Collapse a grid to `count` columns (a flex row is stacked instead — it has no column track).
|
|
2630
|
-
* `count` is clamped to at least 1.
|
|
2631
|
-
*/
|
|
2632
|
-
declare function collapseColumnsProps(resolvedStyleProps: StyleMap | null | undefined, count: number): StyleMap;
|
|
2633
|
-
/** How many equal columns a `repeat(N, …)` track list describes, or null when it isn't one. */
|
|
2634
|
-
declare function columnCountOf(resolvedStyleProps: StyleMap | null | undefined): number | null;
|
|
2635
|
-
/**
|
|
2636
|
-
* Make fixed pixel sizes fluid: `width: 520px` → `width: 100%` with the original kept as
|
|
2637
|
-
* `max-width`, so the element still never exceeds its designed size on a wide screen. `minWidth` in
|
|
2638
|
-
* px is dropped to 0 — it is what actually forces horizontal scrolling on a phone.
|
|
2639
|
-
*
|
|
2640
|
-
* @returns the props to write; EMPTY when there is nothing fixed to fluidise.
|
|
2641
|
-
*/
|
|
2642
|
-
declare function fluidiseProps(resolvedStyleProps: StyleMap | null | undefined): StyleMap;
|
|
2643
|
-
/** True when `fluidiseProps` would change anything — drives the button's disabled state. */
|
|
2644
|
-
declare function canFluidise(resolvedStyleProps: StyleMap | null | undefined): boolean;
|
|
2645
|
-
/**
|
|
2646
|
-
* Reorder children AT ONE WIDTH using CSS `order`, leaving the tree — and so the DOM and
|
|
2647
|
-
* screen-reader order — untouched. Returns one value per child BY CHILD INDEX: the `order` it must
|
|
2648
|
-
* take, or `null` for "no override needed".
|
|
2649
|
-
*
|
|
2650
|
-
* Either every child gets an explicit `order` or none does: CSS defaults `order` to 0, so a partial
|
|
2651
|
-
* set would mix overridden children with unordered ones and read as an arbitrary interleave.
|
|
2652
|
-
*
|
|
2653
|
-
* @param count How many children there are.
|
|
2654
|
-
* @param from Index of the child being moved.
|
|
2655
|
-
* @param to Index it should occupy.
|
|
2656
|
-
*/
|
|
2657
|
-
declare function reorderProps(count: number, from: number, to: number): Array<number | null>;
|
|
2658
|
-
|
|
2659
2759
|
/**
|
|
2660
2760
|
* ESSENTIALS (B3) — the handful of style controls that matter first for each component type.
|
|
2661
2761
|
*
|
|
@@ -2778,5 +2878,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
2778
2878
|
constructor();
|
|
2779
2879
|
}
|
|
2780
2880
|
|
|
2781
|
-
export { ACTION_TYPE_OPTIONS, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEFAULT_ESSENTIAL_TRAITS, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, buildFullStyleTraits, buildPresetStyleTraits, canFluidise, collapseColumnsProps, columnCountOf, defaultPageSettings, dropTargetLabel, essentialTraitsFor, findNodeLocation, findParentOf, flattenSchemaFields, fluidiseProps, generateNodeId, isHiddenAt, matchesControlSearch, nodeAncestorPath, nodeAncestorPathInEither, reorderProps, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, stackChildrenProps, visibilityProps, wrapNode };
|
|
2782
|
-
export type { BreakpointPresentation, BuilderClipboard, ComponentEventDef, ComponentMethodDef, ComponentNode, ComponentTrait, Crumb, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, HistoryEntry, InsertTarget, InteractionAction, InteractionActionType, InteractionPreset, InteractionTrigger, IoxBinding, IoxDataSource, IoxDropEvent, IoxFontManager, IoxInteraction, IoxSymbol, NodeRef, OverlayBoxModel, OverlayBoxSpacing, OverlayEntry, PageRouteAnimationSettings, PageScrollSettings, PageSettings, PageStyleSettings, PanelEvent, QuadSizeSegment, RouteAnimationPreset, ScreenWidthOption, SelectionBadge, StyleMap, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, TreePathNode, ViewportState, ZoomOption };
|
|
2881
|
+
export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEFAULT_ESSENTIAL_TRAITS, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, buildFullStyleTraits, buildPresetStyleTraits, canFluidise, collapseColumnsProps, columnCountOf, defaultPageSettings, dropTargetLabel, essentialTraitsFor, findNodeLocation, findParentOf, flattenSchemaFields, fluidiseProps, generateNodeId, isHiddenAt, matchesControlSearch, nodeAncestorPath, nodeAncestorPathInEither, reorderProps, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, stackChildrenProps, summarise, visibilityProps, wrapNode };
|
|
2882
|
+
export type { AuditFinding, AuditNode, BreakpointPresentation, BuilderClipboard, ComponentEventDef, ComponentMethodDef, ComponentNode, ComponentTrait, Crumb, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, HistoryEntry, InsertTarget, InteractionAction, InteractionActionType, InteractionPreset, InteractionTrigger, IoxBinding, IoxDataSource, IoxDropEvent, IoxFontManager, IoxInteraction, IoxSymbol, NodeRef, OverlayBoxModel, OverlayBoxSpacing, OverlayEntry, PageRouteAnimationSettings, PageScrollSettings, PageSettings, PageStyleSettings, PanelEvent, QuadSizeSegment, RouteAnimationPreset, ScreenWidthOption, SelectionBadge, StyleMap, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, TreePathNode, ViewportState, ZoomOption };
|