@vectoriox/iox-builder 1.4.33 → 1.4.35

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-builder",
3
- "version": "1.4.33",
3
+ "version": "1.4.35",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -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;
@@ -740,6 +755,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
740
755
  previewCanvas?: ElementRef<HTMLElement>;
741
756
  previewScrollRef?: ElementRef<HTMLElement>;
742
757
  lenisContentRef?: ElementRef<HTMLElement>;
758
+ globalOverlayRef?: ElementRef<HTMLElement>;
743
759
  components: any[];
744
760
  activePanel: string;
745
761
  isPanelOpen: boolean;
@@ -1049,10 +1065,28 @@ declare class PresetRegistryService {
1049
1065
  static ɵprov: i0.ɵɵInjectableDeclaration<PresetRegistryService>;
1050
1066
  }
1051
1067
 
1068
+ /**
1069
+ * SymbolRegistryService — in-memory store for org-level symbols.
1070
+ *
1071
+ * Loaded once per page by PageUiComponent alongside the page layout.
1072
+ * Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.
1073
+ */
1074
+ declare class SymbolRegistryService {
1075
+ private symbols;
1076
+ setSymbols(symbols: IoxSymbol[]): void;
1077
+ getSymbol(id: string): IoxSymbol | undefined;
1078
+ getAll(): IoxSymbol[];
1079
+ upsert(symbol: IoxSymbol): void;
1080
+ remove(id: string): void;
1081
+ static ɵfac: i0.ɵɵFactoryDeclaration<SymbolRegistryService, never>;
1082
+ static ɵprov: i0.ɵɵInjectableDeclaration<SymbolRegistryService>;
1083
+ }
1084
+
1052
1085
  declare class OverlayComponent implements OnInit, OnDestroy {
1053
1086
  private overlayService;
1054
1087
  private viewportService;
1055
1088
  private presetRegistry;
1089
+ private symbolRegistry;
1056
1090
  private styleRegistry;
1057
1091
  private cdr;
1058
1092
  toolbarAction: EventEmitter<{
@@ -1074,7 +1108,7 @@ declare class OverlayComponent implements OnInit, OnDestroy {
1074
1108
  private mutationObserver?;
1075
1109
  private boundUpdate;
1076
1110
  private activeScrollContainer;
1077
- constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
1111
+ constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, symbolRegistry: SymbolRegistryService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
1078
1112
  ngOnInit(): void;
1079
1113
  ngOnDestroy(): void;
1080
1114
  onSelectParent(event: MouseEvent): void;
@@ -1090,7 +1124,10 @@ declare class OverlayComponent implements OnInit, OnDestroy {
1090
1124
  get hasInteractions(): boolean;
1091
1125
  get selectedNodeIsGlobal(): boolean;
1092
1126
  get selectedPresetName(): string | null;
1127
+ get isLinkedSymbol(): boolean;
1128
+ get linkedSymbolName(): string | null;
1093
1129
  onEditPreset(event: MouseEvent): void;
1130
+ onDetachSymbol(event: MouseEvent): void;
1094
1131
  private observeSelectElement;
1095
1132
  private updateAll;
1096
1133
  private updateHover;
@@ -1527,5 +1564,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
1527
1564
  constructor();
1528
1565
  }
1529
1566
 
1530
- 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 };
1531
- 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 };
1567
+ 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 };
1568
+ 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 };