@wix/zero-config-implementation 1.105.0 → 1.106.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/dist/index.d.ts CHANGED
@@ -435,6 +435,12 @@ export declare interface CSSParserAPI {
435
435
  * Returns null when the selector was not parsed.
436
436
  */
437
437
  getSelectorSpecificity: (selector: string) => [number, number, number] | null;
438
+ /**
439
+ * Classifies which appearance of its subject element a selector styles — regular, a single
440
+ * design state, or a state that cannot be attributed to the subject. Returns `regular` for
441
+ * selectors that were not parsed (e.g. keyframe selectors).
442
+ */
443
+ getSelectorStateScope: (selector: string) => SelectorStateScope;
438
444
  /**
439
445
  * Determines the CSS property type this one stylesheet can attribute to a custom property.
440
446
  * A `@property` registration is the top-priority source (declared type). Otherwise falls back
@@ -472,6 +478,13 @@ declare interface CSSProperty {
472
478
  valueAst?: CssNode;
473
479
  /** CSS variable names referenced via var() in this property's value */
474
480
  varRefs?: string[];
481
+ /**
482
+ * True when the declaration sits inside an at-rule block (e.g. `@media`, `@supports`, `@layer`),
483
+ * other than `@keyframes`. A top-level declaration wins over one in an at-rule when resolving a
484
+ * default value — conditional rules don't describe the default appearance, and unlayered rules
485
+ * beat layered ones in the cascade.
486
+ */
487
+ inAtRule?: boolean;
475
488
  }
476
489
 
477
490
  /**
@@ -2622,6 +2635,22 @@ export declare interface RunExtractorsOptions {
2622
2635
  wrapper?: (component: ComponentType<unknown>) => ComponentType<unknown>;
2623
2636
  }
2624
2637
 
2638
+ /**
2639
+ * Which appearance of its subject element a selector styles:
2640
+ * - `regular` — the element's default appearance (no state condition on the subject).
2641
+ * - `state` — exactly one design state on the subject (`.root:hover`, `.root:global(.x--hover)`).
2642
+ * - `unmappedState` — state-dependent, but not attributable to a single state of the subject
2643
+ * (an ancestor's state, several states combined, a state inside `:is()`).
2644
+ */
2645
+ declare type SelectorStateScope = {
2646
+ kind: 'regular';
2647
+ } | {
2648
+ kind: 'state';
2649
+ stateName: string;
2650
+ } | {
2651
+ kind: 'unmappedState';
2652
+ };
2653
+
2625
2654
  /**
2626
2655
  * Like `LowObject & HighObject` except that if both keys are defined,
2627
2656
  * `HighObject` overrides `LowObject` instead of intersecting to it