@wix/zero-config-implementation 1.105.0 → 1.107.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
  /**
@@ -2463,23 +2476,6 @@ declare interface RegisteredCustomProperty {
2463
2476
  * (`a | b | c`). Present only when `cssPropertyType` is `customEnum`.
2464
2477
  */
2465
2478
  enumOptions?: string[];
2466
- /**
2467
- * The numeric range for the control, as raw descriptor strings. Validated at
2468
- * conversion time. Meaningful only when `cssPropertyType` is `number`.
2469
- */
2470
- range?: RegisteredPropertyRange;
2471
- }
2472
-
2473
- /**
2474
- * `--min` / `--max` / `--step` descriptors an importer may emit inside an `@property`
2475
- * block. The `--` prefix keeps them in the author namespace: browsers ignore descriptors
2476
- * they don't know, so the CSS stays valid and CSS can't standardise these names out from
2477
- * under us.
2478
- */
2479
- declare interface RegisteredPropertyRange {
2480
- min?: string;
2481
- max?: string;
2482
- step?: string;
2483
2479
  }
2484
2480
 
2485
2481
  /**
@@ -2622,6 +2618,22 @@ export declare interface RunExtractorsOptions {
2622
2618
  wrapper?: (component: ComponentType<unknown>) => ComponentType<unknown>;
2623
2619
  }
2624
2620
 
2621
+ /**
2622
+ * Which appearance of its subject element a selector styles:
2623
+ * - `regular` — the element's default appearance (no state condition on the subject).
2624
+ * - `state` — exactly one design state on the subject (`.root:hover`, `.root:global(.x--hover)`).
2625
+ * - `unmappedState` — state-dependent, but not attributable to a single state of the subject
2626
+ * (an ancestor's state, several states combined, a state inside `:is()`).
2627
+ */
2628
+ declare type SelectorStateScope = {
2629
+ kind: 'regular';
2630
+ } | {
2631
+ kind: 'state';
2632
+ stateName: string;
2633
+ } | {
2634
+ kind: 'unmappedState';
2635
+ };
2636
+
2625
2637
  /**
2626
2638
  * Like `LowObject & HighObject` except that if both keys are defined,
2627
2639
  * `HighObject` overrides `LowObject` instead of intersecting to it