@vectoriox/iox-builder 2.9.0 → 2.10.1
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
|
@@ -212,7 +212,7 @@ interface InteractionPreset {
|
|
|
212
212
|
name: string;
|
|
213
213
|
interactions: IoxInteraction[];
|
|
214
214
|
}
|
|
215
|
-
type ElementState = 'hover' | 'active' | 'focus' | 'first-child' | 'last-child' | 'nth-child(odd)' | 'nth-child(even)' | 'parent-hover';
|
|
215
|
+
type ElementState = 'hover' | 'active' | 'focus' | 'first-child' | 'last-child' | 'nth-child(odd)' | 'nth-child(even)' | 'parent-hover' | 'trigger-hover';
|
|
216
216
|
/** Interaction pseudo-classes — compiled to .iox-node-{id}:state */
|
|
217
217
|
declare const INTERACTION_STATES: ElementState[];
|
|
218
218
|
/** Structural pseudo-classes — compiled to .iox-outer-{id}:state */
|
|
@@ -225,6 +225,19 @@ declare const STRUCTURAL_STATES: ElementState[];
|
|
|
225
225
|
*/
|
|
226
226
|
declare const RELATIONAL_STATES: ElementState[];
|
|
227
227
|
declare const RELATIONAL_STATE_BASE: Partial<Record<ElementState, string>>;
|
|
228
|
+
/**
|
|
229
|
+
* Targeted relational pseudo-classes — the styled element restyles when an ARBITRARY
|
|
230
|
+
* chosen element (the `trigger`, not the DOM parent) matches a pseudo-class. Compiled to
|
|
231
|
+
* `.iox-node-{scopeId}:has(.iox-node-{triggerId}:{base}) .iox-node-{id} { … }`, where
|
|
232
|
+
* `scopeId` is the NEAREST COMMON ANCESTOR of the styled node and the trigger. Scoping the
|
|
233
|
+
* `:has()` to that ancestor keeps the rule repetition-safe (each cloned subtree matches
|
|
234
|
+
* independently) with a single shared CSS rule.
|
|
235
|
+
*
|
|
236
|
+
* The trigger node id per state is stored on `ComponentNode.stateTriggers`.
|
|
237
|
+
* `TARGETED_STATE_BASE` maps each targeted state to the trigger's pseudo-class.
|
|
238
|
+
*/
|
|
239
|
+
declare const TARGETED_STATES: ElementState[];
|
|
240
|
+
declare const TARGETED_STATE_BASE: Partial<Record<ElementState, string>>;
|
|
228
241
|
declare const SUPPORTED_STATES: ElementState[];
|
|
229
242
|
interface ComponentNode {
|
|
230
243
|
id?: string;
|
|
@@ -258,6 +271,14 @@ interface ComponentNode {
|
|
|
258
271
|
* property map that is compiled to `.iox-node-{id}:hover { … }` etc.
|
|
259
272
|
*/
|
|
260
273
|
stateStyles?: Partial<Record<ElementState, Record<string, any>>>;
|
|
274
|
+
/**
|
|
275
|
+
* For TARGETED_STATES (e.g. `trigger-hover`): the node id whose pseudo-class drives
|
|
276
|
+
* that state. Keyed by state so future targeted states (trigger-active/focus) slot in.
|
|
277
|
+
* The styled node restyles when this trigger node is hovered; the compiler scopes the
|
|
278
|
+
* `:has()` selector to the nearest common ancestor of the two. Only nodes with a `label`
|
|
279
|
+
* appear in the trigger picker.
|
|
280
|
+
*/
|
|
281
|
+
stateTriggers?: Partial<Record<ElementState, string>>;
|
|
261
282
|
/** User-defined display name for this node. Used in the layer tree and as an
|
|
262
283
|
* interaction target identifier. Only nodes with a label appear in the
|
|
263
284
|
* interaction target picker. */
|
|
@@ -877,11 +898,14 @@ declare class StyleRegistryService {
|
|
|
877
898
|
* @param state Optional pseudo-class state ('hover' | 'active' | 'focus' | …).
|
|
878
899
|
* When provided, compiles to `.iox-node-{id}:{state} { … }`.
|
|
879
900
|
* State rules are NOT partitioned into inner/outer.
|
|
880
|
-
* @param relativeToId
|
|
881
|
-
*
|
|
882
|
-
*
|
|
901
|
+
* @param relativeToId For RELATIONAL states (e.g. 'parent-hover') this is the ancestor
|
|
902
|
+
* css id; compiles to `.iox-node-{relativeToId}:{base} .iox-node-{nodeId} { … }`.
|
|
903
|
+
* For TARGETED states (e.g. 'trigger-hover') this is the SCOPE css id
|
|
904
|
+
* (nearest common ancestor of the styled node + trigger).
|
|
905
|
+
* @param triggerId For TARGETED states only: the css id of the trigger node whose
|
|
906
|
+
* pseudo-class drives the state. Compiles a `:has()`-scoped selector.
|
|
883
907
|
*/
|
|
884
|
-
upsert(nodeId: string, styles: Record<string, any>, state?: ElementState, relativeToId?: string): void;
|
|
908
|
+
upsert(nodeId: string, styles: Record<string, any>, state?: ElementState, relativeToId?: string, triggerId?: string): void;
|
|
885
909
|
/**
|
|
886
910
|
* Write the org-level design token variables as a `:root { … }` block.
|
|
887
911
|
* Token names should be CSS custom property names without the `--` prefix
|
|
@@ -2405,5 +2429,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
2405
2429
|
constructor();
|
|
2406
2430
|
}
|
|
2407
2431
|
|
|
2408
|
-
export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, 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, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, 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, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, buildFullStyleTraits, buildPresetStyleTraits, defaultPageSettings, findNodeLocation, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions, wrapNode };
|
|
2432
|
+
export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, 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, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, 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, defaultPageSettings, findNodeLocation, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions, wrapNode };
|
|
2409
2433
|
export type { BuilderClipboard, ComponentEventDef, ComponentMethodDef, ComponentNode, ComponentTrait, DeviceOption, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, HistoryEntry, InteractionAction, InteractionActionType, InteractionPreset, InteractionTrigger, IoxBinding, 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 };
|