@vectoriox/iox-builder 1.3.0 → 1.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/package.json
CHANGED
|
@@ -118,6 +118,8 @@ interface StylePreset {
|
|
|
118
118
|
/** Flat CSS property map — same shape as IoxLayoutNode.styleProps. */
|
|
119
119
|
styleProps: Record<string, any>;
|
|
120
120
|
}
|
|
121
|
+
type ElementState = 'hover' | 'active' | 'focus';
|
|
122
|
+
declare const SUPPORTED_STATES: ElementState[];
|
|
121
123
|
interface ComponentNode {
|
|
122
124
|
id?: string;
|
|
123
125
|
/**
|
|
@@ -144,6 +146,12 @@ interface ComponentNode {
|
|
|
144
146
|
* Absent when no preset is applied (full styles stored in styleTraits instead).
|
|
145
147
|
*/
|
|
146
148
|
styleOverrides?: Record<string, any>;
|
|
149
|
+
/**
|
|
150
|
+
* Per-state style overrides. Only stores properties that differ from the base
|
|
151
|
+
* style — same sparse pattern as styleOverrides. Each key maps to a flat CSS
|
|
152
|
+
* property map that is compiled to `.iox-node-{id}:hover { … }` etc.
|
|
153
|
+
*/
|
|
154
|
+
stateStyles?: Partial<Record<ElementState, Record<string, any>>>;
|
|
147
155
|
}
|
|
148
156
|
/**
|
|
149
157
|
* Build a full StyleTraitGroup[] schema populated with values from a flat
|
|
@@ -780,6 +788,12 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
780
788
|
* space — it does not push sibling elements. Applying margin to the host element
|
|
781
789
|
* (which IS the flex/block child in the parent container) makes it work correctly.
|
|
782
790
|
*
|
|
791
|
+
* State styles (hover/active/focus) are stored under key `${nodeId}:${state}`
|
|
792
|
+
* and compiled to `.iox-node-{id}:hover { … }` selectors.
|
|
793
|
+
*
|
|
794
|
+
* Design token variables are stored under the reserved key `__tokens__` and
|
|
795
|
+
* compiled to a `:root { … }` block prepended to all other rules.
|
|
796
|
+
*
|
|
783
797
|
* Scoped to PageUiComponent.providers[] — one stylesheet per builder instance.
|
|
784
798
|
*/
|
|
785
799
|
declare class StyleRegistryService {
|
|
@@ -789,7 +803,23 @@ declare class StyleRegistryService {
|
|
|
789
803
|
/** Properties that must live on the wrapper element to affect the parent layout. */
|
|
790
804
|
private static readonly OUTER_PROPS;
|
|
791
805
|
init(): void;
|
|
792
|
-
|
|
806
|
+
/**
|
|
807
|
+
* Write or update the base styles for a node, or a pseudo-class state override.
|
|
808
|
+
*
|
|
809
|
+
* @param nodeId The node's CSS id (used in `.iox-node-{nodeId}`)
|
|
810
|
+
* @param styles Flat CSS property map (camelCase keys)
|
|
811
|
+
* @param state Optional pseudo-class state ('hover' | 'active' | 'focus').
|
|
812
|
+
* When provided, compiles to `.iox-node-{id}:{state} { … }`.
|
|
813
|
+
* State rules are NOT partitioned into inner/outer.
|
|
814
|
+
*/
|
|
815
|
+
upsert(nodeId: string, styles: Record<string, any>, state?: 'hover' | 'active' | 'focus'): void;
|
|
816
|
+
/**
|
|
817
|
+
* Write the org-level design token variables as a `:root { … }` block.
|
|
818
|
+
* Token names should be CSS custom property names without the `--` prefix
|
|
819
|
+
* (e.g., `{ 'iox-primary-color': '#cb9090' }`).
|
|
820
|
+
* Pass an empty object to clear all tokens.
|
|
821
|
+
*/
|
|
822
|
+
upsertTokens(tokens: Record<string, string>): void;
|
|
793
823
|
remove(nodeId: string): void;
|
|
794
824
|
destroy(): void;
|
|
795
825
|
private compile;
|
|
@@ -1339,5 +1369,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
1339
1369
|
constructor();
|
|
1340
1370
|
}
|
|
1341
1371
|
|
|
1342
|
-
export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DeviceMode, DragEngineService, EASING_OPTIONS, GroupStyleConfig, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, InteractionEngineService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, SectionComponent, SectionComponentConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, buildPresetStyleTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
1343
|
-
export type { ComponentNode, ComponentTrait, DeviceOption, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, 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 };
|
|
1372
|
+
export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DeviceMode, DragEngineService, EASING_OPTIONS, GroupStyleConfig, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, InteractionEngineService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, 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, ViewportService, ZOOM_OPTIONS, buildPresetStyleTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
1373
|
+
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 };
|