@vectoriox/iox-builder 1.4.34 → 1.4.36
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/package.json
CHANGED
|
@@ -133,6 +133,14 @@ interface StylePreset {
|
|
|
133
133
|
/** Per-state style overrides stored alongside the preset (e.g. hover, active, focus). */
|
|
134
134
|
stateStyles?: Partial<Record<ElementState, Record<string, any>>>;
|
|
135
135
|
}
|
|
136
|
+
/** A reusable element definition whose instances all stay in sync.
|
|
137
|
+
* Stored in the `symbols` backend collection; referenced by ComponentNode.symbolId. */
|
|
138
|
+
interface IoxSymbol {
|
|
139
|
+
id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
/** Full serialised node tree — same shape as a page layout node. */
|
|
142
|
+
node: Record<string, any>;
|
|
143
|
+
}
|
|
136
144
|
type ElementState = 'hover' | 'active' | 'focus' | 'first-child' | 'last-child' | 'nth-child(odd)' | 'nth-child(even)';
|
|
137
145
|
/** Interaction pseudo-classes — compiled to .iox-node-{id}:state */
|
|
138
146
|
declare const INTERACTION_STATES: ElementState[];
|
|
@@ -175,6 +183,10 @@ interface ComponentNode {
|
|
|
175
183
|
* interaction target identifier. Only nodes with a label appear in the
|
|
176
184
|
* interaction target picker. */
|
|
177
185
|
label?: string;
|
|
186
|
+
/** ID of the org-level IoxSymbol this node is linked to.
|
|
187
|
+
* Absent on stamps (independent copies). When present, any style change
|
|
188
|
+
* on this node propagates to all other instances of the same symbol. */
|
|
189
|
+
symbolId?: string;
|
|
178
190
|
}
|
|
179
191
|
/**
|
|
180
192
|
* Build a full StyleTraitGroup[] schema populated with values from a flat
|
|
@@ -335,7 +347,8 @@ declare enum ToolbarAction {
|
|
|
335
347
|
SaveAsBlock = "save-as-block",
|
|
336
348
|
MakeGlobal = "make-global",
|
|
337
349
|
RemoveGlobal = "remove-global",
|
|
338
|
-
EditPreset = "edit-preset"
|
|
350
|
+
EditPreset = "edit-preset",
|
|
351
|
+
DetachSymbol = "detach-symbol"
|
|
339
352
|
}
|
|
340
353
|
declare enum NodeAction {
|
|
341
354
|
Delete = "delete",
|
|
@@ -454,7 +467,9 @@ declare enum PanelEventTypes {
|
|
|
454
467
|
/** Open the Style panel in preset-edit mode for the given preset ID. */
|
|
455
468
|
PRESET_EDIT = "presetedit",
|
|
456
469
|
/** Fired after a preset is created, updated, or deleted so panels refresh their list. */
|
|
457
|
-
PRESETS_CHANGED = "presetschanged"
|
|
470
|
+
PRESETS_CHANGED = "presetschanged",
|
|
471
|
+
/** Fired when a linked symbol instance's styles change — propagates to all instances. */
|
|
472
|
+
SYMBOLS_CHANGED = "symbolschanged"
|
|
458
473
|
}
|
|
459
474
|
interface PanelEvent {
|
|
460
475
|
type: PanelEventTypes;
|
|
@@ -535,6 +550,8 @@ declare class DragEngineService {
|
|
|
535
550
|
private _scale;
|
|
536
551
|
/** Called by BuilderComponent whenever the viewport scale changes. */
|
|
537
552
|
setScale(scale: number): void;
|
|
553
|
+
private _dropzoneRectCache;
|
|
554
|
+
private _snapshotRects;
|
|
538
555
|
private readonly ROOT_ESCAPE_PX;
|
|
539
556
|
private _rootEscapeActiveFor;
|
|
540
557
|
private _getEl;
|
|
@@ -1050,10 +1067,28 @@ declare class PresetRegistryService {
|
|
|
1050
1067
|
static ɵprov: i0.ɵɵInjectableDeclaration<PresetRegistryService>;
|
|
1051
1068
|
}
|
|
1052
1069
|
|
|
1070
|
+
/**
|
|
1071
|
+
* SymbolRegistryService — in-memory store for org-level symbols.
|
|
1072
|
+
*
|
|
1073
|
+
* Loaded once per page by PageUiComponent alongside the page layout.
|
|
1074
|
+
* Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.
|
|
1075
|
+
*/
|
|
1076
|
+
declare class SymbolRegistryService {
|
|
1077
|
+
private symbols;
|
|
1078
|
+
setSymbols(symbols: IoxSymbol[]): void;
|
|
1079
|
+
getSymbol(id: string): IoxSymbol | undefined;
|
|
1080
|
+
getAll(): IoxSymbol[];
|
|
1081
|
+
upsert(symbol: IoxSymbol): void;
|
|
1082
|
+
remove(id: string): void;
|
|
1083
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SymbolRegistryService, never>;
|
|
1084
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SymbolRegistryService>;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1053
1087
|
declare class OverlayComponent implements OnInit, OnDestroy {
|
|
1054
1088
|
private overlayService;
|
|
1055
1089
|
private viewportService;
|
|
1056
1090
|
private presetRegistry;
|
|
1091
|
+
private symbolRegistry;
|
|
1057
1092
|
private styleRegistry;
|
|
1058
1093
|
private cdr;
|
|
1059
1094
|
toolbarAction: EventEmitter<{
|
|
@@ -1074,8 +1109,10 @@ declare class OverlayComponent implements OnInit, OnDestroy {
|
|
|
1074
1109
|
private containerResizeObserver?;
|
|
1075
1110
|
private mutationObserver?;
|
|
1076
1111
|
private boundUpdate;
|
|
1112
|
+
private _scrollRaf;
|
|
1113
|
+
private boundScrollUpdate;
|
|
1077
1114
|
private activeScrollContainer;
|
|
1078
|
-
constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
|
|
1115
|
+
constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, symbolRegistry: SymbolRegistryService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
|
|
1079
1116
|
ngOnInit(): void;
|
|
1080
1117
|
ngOnDestroy(): void;
|
|
1081
1118
|
onSelectParent(event: MouseEvent): void;
|
|
@@ -1091,7 +1128,10 @@ declare class OverlayComponent implements OnInit, OnDestroy {
|
|
|
1091
1128
|
get hasInteractions(): boolean;
|
|
1092
1129
|
get selectedNodeIsGlobal(): boolean;
|
|
1093
1130
|
get selectedPresetName(): string | null;
|
|
1131
|
+
get isLinkedSymbol(): boolean;
|
|
1132
|
+
get linkedSymbolName(): string | null;
|
|
1094
1133
|
onEditPreset(event: MouseEvent): void;
|
|
1134
|
+
onDetachSymbol(event: MouseEvent): void;
|
|
1095
1135
|
private observeSelectElement;
|
|
1096
1136
|
private updateAll;
|
|
1097
1137
|
private updateHover;
|
|
@@ -1528,5 +1568,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
1528
1568
|
constructor();
|
|
1529
1569
|
}
|
|
1530
1570
|
|
|
1531
|
-
export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DeviceMode, DragEngineService, EASING_OPTIONS, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, InteractionEngineService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VIRTUAL_TRAIT_KEYS, ViewportService, ZOOM_OPTIONS, buildFullStyleTraits, buildPresetStyleTraits, composeVirtualTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
1532
|
-
export type { ComponentNode, ComponentTrait, DeviceOption, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, InteractionAction, InteractionActionType, InteractionTrigger, IoxBinding, IoxContentService, IoxDataSource, IoxDropEvent, IoxFontManager, IoxInteraction, NodeRef, OverlayBoxModel, OverlayBoxSpacing, OverlayEntry, PageRouteAnimationSettings, PageScrollSettings, PageSettings, PageStyleSettings, PanelEvent, QuadSizeSegment, RouteAnimationPreset, ScreenWidthOption, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, ViewportState, ZoomOption };
|
|
1571
|
+
export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DeviceMode, DragEngineService, EASING_OPTIONS, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, InteractionEngineService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VIRTUAL_TRAIT_KEYS, ViewportService, ZOOM_OPTIONS, buildFullStyleTraits, buildPresetStyleTraits, composeVirtualTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
1572
|
+
export type { ComponentNode, ComponentTrait, DeviceOption, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, InteractionAction, InteractionActionType, InteractionTrigger, IoxBinding, IoxContentService, IoxDataSource, IoxDropEvent, IoxFontManager, IoxInteraction, IoxSymbol, NodeRef, OverlayBoxModel, OverlayBoxSpacing, OverlayEntry, PageRouteAnimationSettings, PageScrollSettings, PageSettings, PageStyleSettings, PanelEvent, QuadSizeSegment, RouteAnimationPreset, ScreenWidthOption, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, ViewportState, ZoomOption };
|