@sanity/ui 3.0.0-static.40 → 3.0.0-static.42

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.
@@ -435,7 +435,10 @@ export declare type CSSThemeOptions = {
435
435
  }
436
436
 
437
437
  /** @public */
438
- export declare type CSSVarFunction = `var(--${string})`
438
+ export declare type CSSVarFunction = `var(${CSSVarName})`
439
+
440
+ /** @public */
441
+ export declare type CSSVarName = `--${string}`
439
442
 
440
443
  /** @public */
441
444
  export declare function dialog(props: {className?: string}): string | undefined
@@ -588,6 +591,18 @@ export declare interface GapStyleProps {
588
591
  gapY?: ResponsiveProp<Space>
589
592
  }
590
593
 
594
+ /**
595
+ * Extract the name of a CSS variable.
596
+ *
597
+ * @example
598
+ * ```ts
599
+ * getVarName('var(--color-primary)') // '--color-primary'
600
+ * ```
601
+ *
602
+ * @public
603
+ */
604
+ export declare function getVarName(variable: CSSVarFunction): CSSVarName
605
+
591
606
  /** @public */
592
607
  export declare type GridAutoColumns = 'auto' | 'min' | 'max' | 'fr'
593
608
 
@@ -435,7 +435,10 @@ export declare type CSSThemeOptions = {
435
435
  }
436
436
 
437
437
  /** @public */
438
- export declare type CSSVarFunction = `var(--${string})`
438
+ export declare type CSSVarFunction = `var(${CSSVarName})`
439
+
440
+ /** @public */
441
+ export declare type CSSVarName = `--${string}`
439
442
 
440
443
  /** @public */
441
444
  export declare function dialog(props: {className?: string}): string | undefined
@@ -588,6 +591,18 @@ export declare interface GapStyleProps {
588
591
  gapY?: ResponsiveProp<Space>
589
592
  }
590
593
 
594
+ /**
595
+ * Extract the name of a CSS variable.
596
+ *
597
+ * @example
598
+ * ```ts
599
+ * getVarName('var(--color-primary)') // '--color-primary'
600
+ * ```
601
+ *
602
+ * @public
603
+ */
604
+ export declare function getVarName(variable: CSSVarFunction): CSSVarName
605
+
591
606
  /** @public */
592
607
  export declare type GridAutoColumns = 'auto' | 'min' | 'max' | 'fr'
593
608