@weser/theming 0.0.8 → 0.0.10

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.
@@ -0,0 +1 @@
1
+ export default function createVariableReference(name: string, fallbackValue?: string): [`--${string}`, string];
@@ -0,0 +1,7 @@
1
+ export default function createVariableReference(name, fallbackValue) {
2
+ const variable = `--${name}`;
3
+ if (fallbackValue) {
4
+ return [variable, `var(${variable}, ${fallbackValue})`];
5
+ }
6
+ return [variable, `var(${variable})`];
7
+ }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as createVariable } from './createVariable.js';
2
+ export { default as createVariableReference } from './createVariableReference.js';
2
3
  export { default as createTheme } from './createTheme.js';
3
4
  export { default as createThemes } from './createThemes.js';
4
5
  export { default as alpha } from './alpha.js';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as createVariable } from './createVariable.js';
2
+ export { default as createVariableReference } from './createVariableReference.js';
2
3
  export { default as createTheme } from './createTheme.js';
3
4
  export { default as createThemes } from './createThemes.js';
4
5
  export { default as alpha } from './alpha.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weser/theming",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Utils for theming with CSS variables",
5
5
  "author": "Robin Weser <robin@weser.io>",
6
6
  "license": "MIT",
@@ -48,5 +48,5 @@
48
48
  "rimraf": "^3.0.2",
49
49
  "typescript": "^5.4.5"
50
50
  },
51
- "gitHead": "9dce5f658f08431e80506b022369229dfeff7dd7"
51
+ "gitHead": "6dd1ad00ab8dacea2878edc99085324ea5d03588"
52
52
  }