@vectoriox/iox-builder 2.9.0 → 2.10.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-builder",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -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 */
@@ -258,6 +258,14 @@ interface ComponentNode {
258
258
  * property map that is compiled to `.iox-node-{id}:hover { … }` etc.
259
259
  */
260
260
  stateStyles?: Partial<Record<ElementState, Record<string, any>>>;
261
+ /**
262
+ * For TARGETED_STATES (e.g. `trigger-hover`): the node id whose pseudo-class drives
263
+ * that state. Keyed by state so future targeted states (trigger-active/focus) slot in.
264
+ * The styled node restyles when this trigger node is hovered; the compiler scopes the
265
+ * `:has()` selector to the nearest common ancestor of the two. Only nodes with a `label`
266
+ * appear in the trigger picker.
267
+ */
268
+ stateTriggers?: Partial<Record<ElementState, string>>;
261
269
  /** User-defined display name for this node. Used in the layer tree and as an
262
270
  * interaction target identifier. Only nodes with a label appear in the
263
271
  * interaction target picker. */
@@ -877,11 +885,14 @@ declare class StyleRegistryService {
877
885
  * @param state Optional pseudo-class state ('hover' | 'active' | 'focus' | …).
878
886
  * When provided, compiles to `.iox-node-{id}:{state} { … }`.
879
887
  * State rules are NOT partitioned into inner/outer.
880
- * @param relativeToId Ancestor css id, required for RELATIONAL states
881
- * (e.g. 'parent-hover'). Compiles to
882
- * `.iox-node-{relativeToId}:{base} .iox-node-{nodeId} { … }`.
888
+ * @param relativeToId For RELATIONAL states (e.g. 'parent-hover') this is the ancestor
889
+ * css id; compiles to `.iox-node-{relativeToId}:{base} .iox-node-{nodeId} { … }`.
890
+ * For TARGETED states (e.g. 'trigger-hover') this is the SCOPE css id
891
+ * (nearest common ancestor of the styled node + trigger).
892
+ * @param triggerId For TARGETED states only: the css id of the trigger node whose
893
+ * pseudo-class drives the state. Compiles a `:has()`-scoped selector.
883
894
  */
884
- upsert(nodeId: string, styles: Record<string, any>, state?: ElementState, relativeToId?: string): void;
895
+ upsert(nodeId: string, styles: Record<string, any>, state?: ElementState, relativeToId?: string, triggerId?: string): void;
885
896
  /**
886
897
  * Write the org-level design token variables as a `:root { … }` block.
887
898
  * Token names should be CSS custom property names without the `--` prefix