@wordpress/theme 0.1.0 → 0.2.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/README.md +69 -9
- package/bin/generate-default-ramps/index.ts +49 -0
- package/bin/generate-primitive-tokens/index.ts +14 -9
- package/bin/terrazzo-plugin-ds-tokens-docs/index.ts +5 -24
- package/bin/terrazzo-plugin-figma-ds-token-manager/index.ts +11 -4
- package/bin/terrazzo-plugin-inline-alias-values/index.ts +84 -0
- package/bin/terrazzo-plugin-known-wpds-css-variables/index.ts +19 -39
- package/build/color-ramps/index.js +21 -39
- package/build/color-ramps/index.js.map +3 -3
- package/build/color-ramps/lib/color-utils.js +39 -0
- package/build/color-ramps/lib/color-utils.js.map +7 -0
- package/build/color-ramps/lib/constants.js +20 -27
- package/build/color-ramps/lib/constants.js.map +3 -3
- package/build/color-ramps/lib/default-ramps.js +220 -0
- package/build/color-ramps/lib/default-ramps.js.map +7 -0
- package/build/color-ramps/lib/find-color-with-constraints.js +60 -91
- package/build/color-ramps/lib/find-color-with-constraints.js.map +3 -3
- package/build/color-ramps/lib/index.js +77 -119
- package/build/color-ramps/lib/index.js.map +3 -3
- package/build/color-ramps/lib/ramp-configs.js +15 -14
- package/build/color-ramps/lib/ramp-configs.js.map +2 -2
- package/build/color-ramps/lib/register-color-spaces.js +7 -0
- package/build/color-ramps/lib/register-color-spaces.js.map +7 -0
- package/build/color-ramps/lib/taper-chroma.js +35 -27
- package/build/color-ramps/lib/taper-chroma.js.map +3 -3
- package/build/color-ramps/lib/types.js +2 -1
- package/build/color-ramps/lib/types.js.map +1 -1
- package/build/color-ramps/lib/utils.js +75 -11
- package/build/color-ramps/lib/utils.js.map +2 -2
- package/build/context.js +3 -2
- package/build/context.js.map +1 -1
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +3 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/prebuilt/js/design-tokens.js +19 -11
- package/build/prebuilt/js/design-tokens.js.map +2 -2
- package/build/prebuilt/json/figma.json +165 -783
- package/build/prebuilt/ts/color-tokens.js +137 -0
- package/build/prebuilt/ts/color-tokens.js.map +7 -0
- package/build/private-apis.js +3 -2
- package/build/private-apis.js.map +1 -1
- package/build/theme-provider.js +19 -17
- package/build/theme-provider.js.map +4 -4
- package/build/token-id.js +30 -0
- package/build/token-id.js.map +7 -0
- package/build/types/css-modules.d.js +0 -1
- package/build/types.js +2 -1
- package/build/types.js.map +1 -1
- package/build/use-theme-provider-styles.js +67 -62
- package/build/use-theme-provider-styles.js.map +3 -3
- package/build-module/color-ramps/index.js +20 -28
- package/build-module/color-ramps/index.js.map +2 -2
- package/build-module/color-ramps/lib/color-utils.js +19 -0
- package/build-module/color-ramps/lib/color-utils.js.map +7 -0
- package/build-module/color-ramps/lib/constants.js +14 -11
- package/build-module/color-ramps/lib/constants.js.map +2 -2
- package/build-module/color-ramps/lib/default-ramps.js +196 -0
- package/build-module/color-ramps/lib/default-ramps.js.map +7 -0
- package/build-module/color-ramps/lib/find-color-with-constraints.js +61 -87
- package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
- package/build-module/color-ramps/lib/index.js +85 -109
- package/build-module/color-ramps/lib/index.js.map +3 -3
- package/build-module/color-ramps/lib/ramp-configs.js +14 -13
- package/build-module/color-ramps/lib/ramp-configs.js.map +2 -2
- package/build-module/color-ramps/lib/register-color-spaces.js +7 -0
- package/build-module/color-ramps/lib/register-color-spaces.js.map +7 -0
- package/build-module/color-ramps/lib/taper-chroma.js +40 -16
- package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
- package/build-module/color-ramps/lib/utils.js +70 -6
- package/build-module/color-ramps/lib/utils.js.map +2 -2
- package/build-module/context.js +2 -1
- package/build-module/context.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js +2 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/prebuilt/js/design-tokens.js +18 -10
- package/build-module/prebuilt/js/design-tokens.js.map +2 -2
- package/build-module/prebuilt/json/figma.json +165 -783
- package/build-module/prebuilt/ts/color-tokens.js +117 -0
- package/build-module/prebuilt/ts/color-tokens.js.map +7 -0
- package/build-module/private-apis.js +2 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/theme-provider.js +18 -6
- package/build-module/theme-provider.js.map +3 -3
- package/build-module/token-id.js +6 -0
- package/build-module/token-id.js.map +7 -0
- package/build-module/use-theme-provider-styles.js +69 -57
- package/build-module/use-theme-provider-styles.js.map +2 -2
- package/build-types/color-ramps/index.d.ts +9 -16
- package/build-types/color-ramps/index.d.ts.map +1 -1
- package/build-types/color-ramps/lib/color-utils.d.ts +22 -0
- package/build-types/color-ramps/lib/color-utils.d.ts.map +1 -0
- package/build-types/color-ramps/lib/constants.d.ts +7 -9
- package/build-types/color-ramps/lib/constants.d.ts.map +1 -1
- package/build-types/color-ramps/lib/default-ramps.d.ts +7 -0
- package/build-types/color-ramps/lib/default-ramps.d.ts.map +1 -0
- package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +8 -7
- package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
- package/build-types/color-ramps/lib/index.d.ts +5 -2
- package/build-types/color-ramps/lib/index.d.ts.map +1 -1
- package/build-types/color-ramps/lib/register-color-spaces.d.ts +2 -0
- package/build-types/color-ramps/lib/register-color-spaces.d.ts.map +1 -0
- package/build-types/color-ramps/lib/taper-chroma.d.ts +7 -3
- package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
- package/build-types/color-ramps/lib/utils.d.ts +28 -5
- package/build-types/color-ramps/lib/utils.d.ts.map +1 -1
- package/build-types/color-ramps/stories/index.story.d.ts.map +1 -1
- package/build-types/prebuilt/ts/color-tokens.d.ts +7 -0
- package/build-types/prebuilt/ts/color-tokens.d.ts.map +1 -0
- package/build-types/stories/index.story.d.ts.map +1 -1
- package/build-types/theme-provider.d.ts.map +1 -1
- package/build-types/token-id.d.ts +9 -0
- package/build-types/token-id.d.ts.map +1 -0
- package/build-types/use-theme-provider-styles.d.ts +4 -0
- package/build-types/use-theme-provider-styles.d.ts.map +1 -1
- package/docs/ds-tokens.md +22 -156
- package/package.json +19 -9
- package/src/color-ramps/index.ts +24 -41
- package/src/color-ramps/lib/color-utils.ts +34 -0
- package/src/color-ramps/lib/constants.ts +13 -9
- package/src/color-ramps/lib/default-ramps.ts +200 -0
- package/src/color-ramps/lib/find-color-with-constraints.ts +83 -116
- package/src/color-ramps/lib/index.ts +107 -145
- package/src/color-ramps/lib/ramp-configs.ts +3 -3
- package/src/color-ramps/lib/register-color-spaces.ts +13 -0
- package/src/color-ramps/lib/taper-chroma.ts +47 -19
- package/src/color-ramps/lib/utils.ts +117 -14
- package/src/color-ramps/stories/index.story.tsx +16 -22
- package/src/color-ramps/test/__snapshots__/index.test.ts.snap +45722 -376
- package/src/color-ramps/test/index.test.ts +68 -29
- package/src/prebuilt/css/design-tokens.css +88 -355
- package/src/prebuilt/js/design-tokens.js +17 -10
- package/src/prebuilt/json/figma.json +165 -783
- package/src/prebuilt/ts/color-tokens.ts +117 -0
- package/src/stories/index.story.tsx +4 -18
- package/src/test/token-id.test.ts +12 -0
- package/src/token-id.ts +9 -0
- package/src/use-theme-provider-styles.ts +67 -60
- package/terrazzo.config.ts +15 -12
- package/tokens/color.json +221 -69
- package/tokens/dimension.json +75 -0
- package/tsconfig.bin.json +13 -0
- package/tsconfig.bin.tsbuildinfo +1 -0
- package/tsconfig.json +6 -4
- package/tsconfig.src.json +9 -0
- package/tsconfig.src.tsbuildinfo +1 -0
- package/bin/build-tokens.js +0 -83
- package/build/color-ramps/lib/cache-utils.js +0 -57
- package/build/color-ramps/lib/cache-utils.js.map +0 -7
- package/build/prebuilt/ts/design-tokens.js +0 -354
- package/build/prebuilt/ts/design-tokens.js.map +0 -7
- package/build/style.module.css.js +0 -2
- package/build-module/color-ramps/lib/cache-utils.js +0 -31
- package/build-module/color-ramps/lib/cache-utils.js.map +0 -7
- package/build-module/prebuilt/ts/design-tokens.js +0 -334
- package/build-module/prebuilt/ts/design-tokens.js.map +0 -7
- package/build-module/style.module.css.js +0 -1
- package/build-style/style.css +0 -3
- package/build-types/color-ramps/lib/cache-utils.d.ts +0 -22
- package/build-types/color-ramps/lib/cache-utils.d.ts.map +0 -1
- package/build-types/prebuilt/ts/design-tokens.d.ts +0 -7
- package/build-types/prebuilt/ts/design-tokens.d.ts.map +0 -1
- package/src/color-ramps/lib/cache-utils.ts +0 -56
- package/src/prebuilt/ts/design-tokens.ts +0 -335
- package/tokens/spacing.json +0 -45
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import { type ColorTypes } from 'colorjs.io/fn';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import './register-color-spaces';
|
|
5
9
|
import { type TaperChromaOptions } from './taper-chroma';
|
|
6
10
|
/**
|
|
7
11
|
* Solve for L such that:
|
|
@@ -14,24 +18,21 @@ import { type TaperChromaOptions } from './taper-chroma';
|
|
|
14
18
|
* @param target
|
|
15
19
|
* @param direction
|
|
16
20
|
* @param options
|
|
17
|
-
* @param options.strict
|
|
18
|
-
* @param options.debug
|
|
19
21
|
* @param options.lightnessConstraint
|
|
20
22
|
* @param options.lightnessConstraint.type
|
|
21
23
|
* @param options.lightnessConstraint.value
|
|
22
24
|
* @param options.taperChromaOptions
|
|
23
25
|
*/
|
|
24
|
-
export declare function findColorMeetingRequirements(reference:
|
|
26
|
+
export declare function findColorMeetingRequirements(reference: ColorTypes, seed: ColorTypes, target: number, direction: 'lighter' | 'darker', { lightnessConstraint, taperChromaOptions, }?: {
|
|
25
27
|
lightnessConstraint?: {
|
|
26
28
|
type: 'force' | 'onlyIfSucceeds';
|
|
27
29
|
value: number;
|
|
28
30
|
};
|
|
29
31
|
taperChromaOptions?: TaperChromaOptions;
|
|
30
|
-
strict?: boolean;
|
|
31
|
-
debug?: boolean;
|
|
32
32
|
}): {
|
|
33
|
-
color:
|
|
33
|
+
color: ColorTypes;
|
|
34
34
|
reached: boolean;
|
|
35
35
|
achieved: number;
|
|
36
|
+
deficit?: number;
|
|
36
37
|
};
|
|
37
38
|
//# sourceMappingURL=find-color-with-constraints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,gBAAgB,CAAC;AAatE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,UAAU,EACrB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GAAG,QAAQ,EAC/B,EACC,mBAAmB,EACnB,kBAAkB,GAClB,GAAE;IACF,mBAAmB,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;QACjC,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACnC,GACJ;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAoG7E"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import './register-color-spaces';
|
|
1
5
|
import type { Ramp, RampDirection, RampConfig, RampResult } from './types';
|
|
2
|
-
export declare function buildRamp(seedArg: string, config: RampConfig, { mainDirection, pinLightness,
|
|
6
|
+
export declare function buildRamp(seedArg: string, config: RampConfig, { mainDirection, pinLightness, rescaleToFitContrastTargets, }?: {
|
|
3
7
|
mainDirection?: RampDirection;
|
|
4
8
|
pinLightness?: {
|
|
5
9
|
stepName: keyof Ramp;
|
|
6
10
|
value: number;
|
|
7
11
|
};
|
|
8
12
|
rescaleToFitContrastTargets?: boolean;
|
|
9
|
-
debug?: boolean;
|
|
10
13
|
}): RampResult;
|
|
11
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/index.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAYjC,OAAO,KAAK,EAEX,IAAI,EACJ,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,SAAS,CAAC;AA+KjB,wBAAgB,SAAS,CACxB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,UAAU,EAClB,EACC,aAAa,EACb,YAAY,EACZ,2BAAkC,GAClC,GAAE;IACF,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE;QACd,QAAQ,EAAE,MAAM,IAAI,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACjC,GACJ,UAAU,CA0GZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-color-spaces.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/register-color-spaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import { type ColorTypes, type ColorObject } from 'colorjs.io/fn';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import './register-color-spaces';
|
|
5
9
|
export interface TaperChromaOptions {
|
|
6
10
|
gamut?: 'p3' | 'srgb';
|
|
7
11
|
alpha?: number;
|
|
@@ -23,10 +27,10 @@ export interface TaperChromaOptions {
|
|
|
23
27
|
* @param lTarget
|
|
24
28
|
* @param options
|
|
25
29
|
*/
|
|
26
|
-
export declare function taperChroma(seed:
|
|
30
|
+
export declare function taperChroma(seed: ColorTypes, // already OKLCH
|
|
27
31
|
lTarget: number, // [0..1]
|
|
28
32
|
options?: TaperChromaOptions): {
|
|
29
33
|
l: number;
|
|
30
34
|
c: number;
|
|
31
|
-
};
|
|
35
|
+
} | ColorObject;
|
|
32
36
|
//# sourceMappingURL=taper-chroma.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAMN,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IAClC,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,UAAU,EAAE,gBAAgB;AAClC,OAAO,EAAE,MAAM,EAAE,SAAS;AAC1B,OAAO,GAAE,kBAAuB,GAC9B;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CA8ExC"}
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type
|
|
5
|
-
|
|
4
|
+
import { type ColorTypes } from 'colorjs.io/fn';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import './register-color-spaces';
|
|
9
|
+
import type { Ramp, RampConfig, RampDirection } from './types';
|
|
6
10
|
/**
|
|
7
11
|
* Make sure that a color is valid in the p3 gamut, and converts it to oklch.
|
|
8
12
|
* @param c
|
|
9
13
|
*/
|
|
10
|
-
export declare const clampToGamut: (c:
|
|
14
|
+
export declare const clampToGamut: (c: ColorTypes) => import("colorjs.io/fn").PlainColorObject;
|
|
11
15
|
/**
|
|
12
16
|
* Topologically sort steps based on their dependencies
|
|
13
17
|
* @param config - The steps configuration object
|
|
14
18
|
*/
|
|
15
|
-
export declare function sortByDependency(config:
|
|
19
|
+
export declare function sortByDependency(config: RampConfig): (keyof Ramp)[];
|
|
20
|
+
/**
|
|
21
|
+
* Return minimal set of steps that are needed to calculate `stepName` from the seed.
|
|
22
|
+
* @param stepName Name of the step.
|
|
23
|
+
* @param config Configuration of the ramp.
|
|
24
|
+
* @return Array of steps that `stepName` depends on.
|
|
25
|
+
*/
|
|
26
|
+
export declare function stepsForStep(stepName: keyof Ramp, config: RampConfig): (keyof Ramp)[];
|
|
16
27
|
/**
|
|
17
28
|
* Finds out whether a lighter or a darker foreground color achieves a better
|
|
18
29
|
* contrast against the seed
|
|
@@ -21,7 +32,7 @@ export declare function sortByDependency(config: Record<keyof Ramp, RampStepConf
|
|
|
21
32
|
* @return An object with "better" and "worse" properties, each holding a
|
|
22
33
|
* ramp direction value.
|
|
23
34
|
*/
|
|
24
|
-
export declare function computeBetterFgColorDirection(seed:
|
|
35
|
+
export declare function computeBetterFgColorDirection(seed: ColorTypes, preferLighter?: boolean): {
|
|
25
36
|
better: RampDirection;
|
|
26
37
|
worse: RampDirection;
|
|
27
38
|
};
|
|
@@ -35,4 +46,16 @@ export declare function adjustContrastTarget(target: number): number;
|
|
|
35
46
|
* @return The clamped lightness value
|
|
36
47
|
*/
|
|
37
48
|
export declare function clampAccentScaleReferenceLightness(rawLightness: number, direction: RampDirection): number;
|
|
49
|
+
/**
|
|
50
|
+
* Find the value of of `L` (luminance) that produces a `C` (color) that has a
|
|
51
|
+
* `value` (contrast delta) equal to zero.
|
|
52
|
+
* @param calculateC Calculate `C` from a given `L`.
|
|
53
|
+
* @param calculateValue Calculate value (delta) for a given `C`.
|
|
54
|
+
* @param initLowerL Initial lower value of `L`.
|
|
55
|
+
* @param initLowerValue Initial lower delta (negative).
|
|
56
|
+
* @param initUpperL Initial upper value of `L`.
|
|
57
|
+
* @param initUpperValue Initial upper delta (positive).
|
|
58
|
+
* @return Resulting value of type `C`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function solveWithBisect<C>(calculateC: (l: number) => C, calculateValue: (t: C) => number, initLowerL: number, initLowerValue: number, initUpperL: number, initUpperValue: number): C;
|
|
38
61
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAExE;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAUjC,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG/D;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAK,GAAG,UAAU,6CACa,CAAC;AAwCzD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAE,MAAM,EAAE,UAAU,GAAI,CAAE,MAAM,IAAI,CAAE,EAAE,CAuCvE;AACD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,QAAQ,EAAE,MAAM,IAAI,EACpB,MAAM,EAAE,UAAU,GAChB,CAAE,MAAM,IAAI,CAAE,EAAE,CAqBlB;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC5C,IAAI,EAAE,UAAU,EAChB,aAAa,CAAC,EAAE,OAAO,GACrB;IACF,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;CACrB,CASA;AAED,wBAAgB,oBAAoB,CAAE,MAAM,EAAE,MAAM,UAOnD;AAED;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CACjD,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,aAAa,UAIxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAE,CAAC,EACjC,UAAU,EAAE,CAAE,CAAC,EAAE,MAAM,KAAM,CAAC,EAC9B,cAAc,EAAE,CAAE,CAAC,EAAE,CAAC,KAAM,MAAM,EAClC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACpB,CAAC,CAqDH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AASvD,QAAA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AASvD,QAAA,MAAM,QAAQ,GAAK,OAAO;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,gCAEA,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,QAAQ,CAmBhC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,QAAQ,CA4H9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAE,OAAO,QAAQ,CAyFzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-tokens.d.ts","sourceRoot":"","sources":["../../../src/prebuilt/ts/color-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;wBAiHE,MAAM,CAAE,MAAM,EAAE,MAAM,EAAE,CAAE;AA/G/B,wBA+GgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../src/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAavD;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAgBrC,CAAC;AACF,eAAe,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../src/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAavD;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAgBrC,CAAC;AACF,eAAe,IAAI,CAAC;AA2GpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,aAAa,CAInD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAE,OAAO,aAAa,CA+CtD,CAAC;AA6CF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAE,OAAO,aAAa,CAiDhE,CAAC;AA0EF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAE,OAAO,aAAa,CA6CzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../src/theme-provider.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAgClD,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../src/theme-provider.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAgClD,eAAO,MAAM,aAAa,GAAK,8BAI5B,kBAAkB,gCAmCpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes a token ID by removing default states and visibility identifiers,
|
|
3
|
+
* making it human-readable as a publicly-accessible variable name.
|
|
4
|
+
*
|
|
5
|
+
* @param id The token ID to normalize.
|
|
6
|
+
* @return The normalized token ID.
|
|
7
|
+
*/
|
|
8
|
+
export declare const publicTokenId: (id: string) => string;
|
|
9
|
+
//# sourceMappingURL=token-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-id.d.ts","sourceRoot":"","sources":["../src/token-id.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAK,IAAI,MAAM,WACkB,CAAC"}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { CSSProperties } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import './color-ramps/lib/register-color-spaces';
|
|
5
9
|
import type { ThemeProviderProps } from './types';
|
|
6
10
|
export declare function useThemeProviderStyles({ color, }?: {
|
|
7
11
|
color?: ThemeProviderProps['color'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme-provider-styles.d.ts","sourceRoot":"","sources":["../src/use-theme-provider-styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-theme-provider-styles.d.ts","sourceRoot":"","sources":["../src/use-theme-provider-styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAiB3C;;GAEG;AACH,OAAO,yCAAyC,CAAC;AASjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAiKlD,wBAAgB,sBAAsB,CAAE,EACvC,KAAU,GACV,GAAE;IACF,KAAK,CAAC,EAAE,kBAAkB,CAAE,OAAO,CAAE,CAAC;CACjC;;;;;;;;EAwDL"}
|
package/docs/ds-tokens.md
CHANGED
|
@@ -31,6 +31,8 @@ Do not edit directly.
|
|
|
31
31
|
| `--wpds-color-bg-surface-info-weak` | Background color for surfaces with info tone and weak emphasis. |
|
|
32
32
|
| `--wpds-color-bg-surface-warning` | Background color for surfaces with warning tone and normal emphasis. |
|
|
33
33
|
| `--wpds-color-bg-surface-warning-weak` | Background color for surfaces with warning tone and weak emphasis. |
|
|
34
|
+
| `--wpds-color-bg-surface-caution` | Background color for surfaces with caution tone and normal emphasis. |
|
|
35
|
+
| `--wpds-color-bg-surface-caution-weak` | Background color for surfaces with caution tone and weak emphasis. |
|
|
34
36
|
| `--wpds-color-bg-surface-error` | Background color for surfaces with error tone and normal emphasis. |
|
|
35
37
|
| `--wpds-color-bg-surface-error-weak` | Background color for surfaces with error tone and weak emphasis. |
|
|
36
38
|
| `--wpds-color-bg-interactive-neutral` | Background color for interactive elements with neutral tone and normal emphasis. |
|
|
@@ -60,6 +62,16 @@ Do not edit directly.
|
|
|
60
62
|
| `--wpds-color-bg-thumb-brand-disabled` | Background color for thumbs with a brand tone and normal emphasis (eg. slider thumb and filled track), in their disabled state. |
|
|
61
63
|
| `--wpds-color-fg-content-neutral` | Foreground color for content like text with normal emphasis. |
|
|
62
64
|
| `--wpds-color-fg-content-neutral-weak` | Foreground color for content like text with weak emphasis. |
|
|
65
|
+
| `--wpds-color-fg-content-success` | Foreground color for content like text with success tone and normal emphasis. |
|
|
66
|
+
| `--wpds-color-fg-content-success-weak` | Foreground color for content like text with success tone and weak emphasis. |
|
|
67
|
+
| `--wpds-color-fg-content-info` | Foreground color for content like text with info tone and normal emphasis. |
|
|
68
|
+
| `--wpds-color-fg-content-info-weak` | Foreground color for content like text with info tone and weak emphasis. |
|
|
69
|
+
| `--wpds-color-fg-content-warning` | Foreground color for content like text with warning tone and normal emphasis. |
|
|
70
|
+
| `--wpds-color-fg-content-warning-weak` | Foreground color for content like text with warning tone and weak emphasis. |
|
|
71
|
+
| `--wpds-color-fg-content-caution` | Foreground color for content like text with caution tone and normal emphasis. |
|
|
72
|
+
| `--wpds-color-fg-content-caution-weak` | Foreground color for content like text with caution tone and weak emphasis. |
|
|
73
|
+
| `--wpds-color-fg-content-error` | Foreground color for content like text with error tone and normal emphasis. |
|
|
74
|
+
| `--wpds-color-fg-content-error-weak` | Foreground color for content like text with error tone and weak emphasis. |
|
|
63
75
|
| `--wpds-color-fg-interactive-neutral` | Foreground color for interactive elements with neutral tone and normal emphasis. |
|
|
64
76
|
| `--wpds-color-fg-interactive-neutral-active` | Foreground color for interactive elements with neutral tone and normal emphasis that are hovered, focused, or active. |
|
|
65
77
|
| `--wpds-color-fg-interactive-neutral-disabled` | Foreground color for interactive elements with neutral tone and normal emphasis, in their disabled state. |
|
|
@@ -97,6 +109,16 @@ Do not edit directly.
|
|
|
97
109
|
| `--wpds-color-stroke-interactive-error-strong` | Accessible stroke color used for interactive error-toned elements with strong emphasis. |
|
|
98
110
|
| `--wpds-color-stroke-focus-brand` | Accessible stroke color applied to focus rings. |
|
|
99
111
|
|
|
112
|
+
### Dimension
|
|
113
|
+
|
|
114
|
+
| Variable name | Description |
|
|
115
|
+
| ------------------------------------------ | -------------------------------- |
|
|
116
|
+
| `--wpds-dimension-base` | Base dimension unit |
|
|
117
|
+
| `--wpds-dimension-padding-surface-x-small` | Extra small spacing for surfaces |
|
|
118
|
+
| `--wpds-dimension-padding-surface-small` | Small spacing for surfaces |
|
|
119
|
+
| `--wpds-dimension-padding-surface-medium` | Medium spacing for surfaces |
|
|
120
|
+
| `--wpds-dimension-padding-surface-large` | Large spacing for surfaces |
|
|
121
|
+
|
|
100
122
|
### Elevation
|
|
101
123
|
|
|
102
124
|
| Variable name | Description |
|
|
@@ -106,21 +128,6 @@ Do not edit directly.
|
|
|
106
128
|
| `--wpds-elevation-medium` | For components that offer additional actions. Example: Menus, Command Palette |
|
|
107
129
|
| `--wpds-elevation-large` | For components that confirm decisions or handle necessary interruptions. Example: Modals. |
|
|
108
130
|
|
|
109
|
-
### Spacing
|
|
110
|
-
|
|
111
|
-
| Variable name | Description |
|
|
112
|
-
| ------------------- | ------------------- |
|
|
113
|
-
| `--wpds-spacing-05` | Extra small spacing |
|
|
114
|
-
| `--wpds-spacing-10` | Small spacing |
|
|
115
|
-
| `--wpds-spacing-15` | Medium spacing |
|
|
116
|
-
| `--wpds-spacing-20` | Large spacing |
|
|
117
|
-
| `--wpds-spacing-30` | Extra large spacing |
|
|
118
|
-
| `--wpds-spacing-40` | 2X large spacing |
|
|
119
|
-
| `--wpds-spacing-50` | 3X large spacing |
|
|
120
|
-
| `--wpds-spacing-60` | 4X large spacing |
|
|
121
|
-
| `--wpds-spacing-70` | 5X large spacing |
|
|
122
|
-
| `--wpds-spacing-80` | 6X large spacing |
|
|
123
|
-
|
|
124
131
|
### Typography
|
|
125
132
|
|
|
126
133
|
| Variable name | Description |
|
|
@@ -140,144 +147,3 @@ Do not edit directly.
|
|
|
140
147
|
| `--wpds-font-line-height-large` | Large line height |
|
|
141
148
|
| `--wpds-font-line-height-x-large` | Extra large line height |
|
|
142
149
|
| `--wpds-font-line-height-2x-large` | 2X large line height |
|
|
143
|
-
|
|
144
|
-
## Primitive tokens
|
|
145
|
-
|
|
146
|
-
**🚨 Note: These tokens are only private implementation details of the Theme, and should never be referenced / consumed directly in the code.**
|
|
147
|
-
|
|
148
|
-
### Color (private)
|
|
149
|
-
|
|
150
|
-
| Variable name | Description |
|
|
151
|
-
| ------------------------------------------------ | ----------- |
|
|
152
|
-
| `--wpds-color-private-primary-bg-fill1` | N/A |
|
|
153
|
-
| `--wpds-color-private-primary-fg-fill` | N/A |
|
|
154
|
-
| `--wpds-color-private-primary-bg-fill2` | N/A |
|
|
155
|
-
| `--wpds-color-private-primary-surface2` | N/A |
|
|
156
|
-
| `--wpds-color-private-primary-surface6` | N/A |
|
|
157
|
-
| `--wpds-color-private-primary-surface5` | N/A |
|
|
158
|
-
| `--wpds-color-private-primary-surface4` | N/A |
|
|
159
|
-
| `--wpds-color-private-primary-surface3` | N/A |
|
|
160
|
-
| `--wpds-color-private-primary-fg-surface4` | N/A |
|
|
161
|
-
| `--wpds-color-private-primary-fg-surface3` | N/A |
|
|
162
|
-
| `--wpds-color-private-primary-fg-surface2` | N/A |
|
|
163
|
-
| `--wpds-color-private-primary-fg-surface1` | N/A |
|
|
164
|
-
| `--wpds-color-private-primary-stroke3` | N/A |
|
|
165
|
-
| `--wpds-color-private-primary-stroke4` | N/A |
|
|
166
|
-
| `--wpds-color-private-primary-stroke2` | N/A |
|
|
167
|
-
| `--wpds-color-private-primary-stroke1` | N/A |
|
|
168
|
-
| `--wpds-color-private-primary-bg-fill-dark` | N/A |
|
|
169
|
-
| `--wpds-color-private-primary-fg-fill-dark` | N/A |
|
|
170
|
-
| `--wpds-color-private-primary-bg-fill-inverted2` | N/A |
|
|
171
|
-
| `--wpds-color-private-primary-bg-fill-inverted1` | N/A |
|
|
172
|
-
| `--wpds-color-private-primary-fg-fill-inverted` | N/A |
|
|
173
|
-
| `--wpds-color-private-primary-surface1` | N/A |
|
|
174
|
-
| `--wpds-color-private-info-bg-fill1` | N/A |
|
|
175
|
-
| `--wpds-color-private-info-fg-fill` | N/A |
|
|
176
|
-
| `--wpds-color-private-info-bg-fill2` | N/A |
|
|
177
|
-
| `--wpds-color-private-info-surface2` | N/A |
|
|
178
|
-
| `--wpds-color-private-info-surface6` | N/A |
|
|
179
|
-
| `--wpds-color-private-info-surface5` | N/A |
|
|
180
|
-
| `--wpds-color-private-info-surface4` | N/A |
|
|
181
|
-
| `--wpds-color-private-info-surface3` | N/A |
|
|
182
|
-
| `--wpds-color-private-info-fg-surface4` | N/A |
|
|
183
|
-
| `--wpds-color-private-info-fg-surface3` | N/A |
|
|
184
|
-
| `--wpds-color-private-info-fg-surface2` | N/A |
|
|
185
|
-
| `--wpds-color-private-info-fg-surface1` | N/A |
|
|
186
|
-
| `--wpds-color-private-info-stroke3` | N/A |
|
|
187
|
-
| `--wpds-color-private-info-stroke4` | N/A |
|
|
188
|
-
| `--wpds-color-private-info-stroke2` | N/A |
|
|
189
|
-
| `--wpds-color-private-info-stroke1` | N/A |
|
|
190
|
-
| `--wpds-color-private-info-bg-fill-dark` | N/A |
|
|
191
|
-
| `--wpds-color-private-info-fg-fill-dark` | N/A |
|
|
192
|
-
| `--wpds-color-private-info-bg-fill-inverted2` | N/A |
|
|
193
|
-
| `--wpds-color-private-info-bg-fill-inverted1` | N/A |
|
|
194
|
-
| `--wpds-color-private-info-fg-fill-inverted` | N/A |
|
|
195
|
-
| `--wpds-color-private-info-surface1` | N/A |
|
|
196
|
-
| `--wpds-color-private-success-bg-fill1` | N/A |
|
|
197
|
-
| `--wpds-color-private-success-fg-fill` | N/A |
|
|
198
|
-
| `--wpds-color-private-success-bg-fill2` | N/A |
|
|
199
|
-
| `--wpds-color-private-success-surface2` | N/A |
|
|
200
|
-
| `--wpds-color-private-success-surface6` | N/A |
|
|
201
|
-
| `--wpds-color-private-success-surface5` | N/A |
|
|
202
|
-
| `--wpds-color-private-success-surface4` | N/A |
|
|
203
|
-
| `--wpds-color-private-success-surface3` | N/A |
|
|
204
|
-
| `--wpds-color-private-success-fg-surface4` | N/A |
|
|
205
|
-
| `--wpds-color-private-success-fg-surface3` | N/A |
|
|
206
|
-
| `--wpds-color-private-success-fg-surface2` | N/A |
|
|
207
|
-
| `--wpds-color-private-success-fg-surface1` | N/A |
|
|
208
|
-
| `--wpds-color-private-success-stroke3` | N/A |
|
|
209
|
-
| `--wpds-color-private-success-stroke4` | N/A |
|
|
210
|
-
| `--wpds-color-private-success-stroke2` | N/A |
|
|
211
|
-
| `--wpds-color-private-success-stroke1` | N/A |
|
|
212
|
-
| `--wpds-color-private-success-bg-fill-dark` | N/A |
|
|
213
|
-
| `--wpds-color-private-success-fg-fill-dark` | N/A |
|
|
214
|
-
| `--wpds-color-private-success-bg-fill-inverted2` | N/A |
|
|
215
|
-
| `--wpds-color-private-success-bg-fill-inverted1` | N/A |
|
|
216
|
-
| `--wpds-color-private-success-fg-fill-inverted` | N/A |
|
|
217
|
-
| `--wpds-color-private-success-surface1` | N/A |
|
|
218
|
-
| `--wpds-color-private-warning-bg-fill1` | N/A |
|
|
219
|
-
| `--wpds-color-private-warning-fg-fill` | N/A |
|
|
220
|
-
| `--wpds-color-private-warning-bg-fill2` | N/A |
|
|
221
|
-
| `--wpds-color-private-warning-surface2` | N/A |
|
|
222
|
-
| `--wpds-color-private-warning-surface6` | N/A |
|
|
223
|
-
| `--wpds-color-private-warning-surface5` | N/A |
|
|
224
|
-
| `--wpds-color-private-warning-surface4` | N/A |
|
|
225
|
-
| `--wpds-color-private-warning-surface3` | N/A |
|
|
226
|
-
| `--wpds-color-private-warning-fg-surface4` | N/A |
|
|
227
|
-
| `--wpds-color-private-warning-fg-surface3` | N/A |
|
|
228
|
-
| `--wpds-color-private-warning-fg-surface2` | N/A |
|
|
229
|
-
| `--wpds-color-private-warning-fg-surface1` | N/A |
|
|
230
|
-
| `--wpds-color-private-warning-stroke3` | N/A |
|
|
231
|
-
| `--wpds-color-private-warning-stroke4` | N/A |
|
|
232
|
-
| `--wpds-color-private-warning-stroke2` | N/A |
|
|
233
|
-
| `--wpds-color-private-warning-stroke1` | N/A |
|
|
234
|
-
| `--wpds-color-private-warning-bg-fill-dark` | N/A |
|
|
235
|
-
| `--wpds-color-private-warning-fg-fill-dark` | N/A |
|
|
236
|
-
| `--wpds-color-private-warning-bg-fill-inverted2` | N/A |
|
|
237
|
-
| `--wpds-color-private-warning-bg-fill-inverted1` | N/A |
|
|
238
|
-
| `--wpds-color-private-warning-fg-fill-inverted` | N/A |
|
|
239
|
-
| `--wpds-color-private-warning-surface1` | N/A |
|
|
240
|
-
| `--wpds-color-private-error-bg-fill1` | N/A |
|
|
241
|
-
| `--wpds-color-private-error-fg-fill` | N/A |
|
|
242
|
-
| `--wpds-color-private-error-bg-fill2` | N/A |
|
|
243
|
-
| `--wpds-color-private-error-surface2` | N/A |
|
|
244
|
-
| `--wpds-color-private-error-surface6` | N/A |
|
|
245
|
-
| `--wpds-color-private-error-surface5` | N/A |
|
|
246
|
-
| `--wpds-color-private-error-surface4` | N/A |
|
|
247
|
-
| `--wpds-color-private-error-surface3` | N/A |
|
|
248
|
-
| `--wpds-color-private-error-fg-surface4` | N/A |
|
|
249
|
-
| `--wpds-color-private-error-fg-surface3` | N/A |
|
|
250
|
-
| `--wpds-color-private-error-fg-surface2` | N/A |
|
|
251
|
-
| `--wpds-color-private-error-fg-surface1` | N/A |
|
|
252
|
-
| `--wpds-color-private-error-stroke3` | N/A |
|
|
253
|
-
| `--wpds-color-private-error-stroke4` | N/A |
|
|
254
|
-
| `--wpds-color-private-error-stroke2` | N/A |
|
|
255
|
-
| `--wpds-color-private-error-stroke1` | N/A |
|
|
256
|
-
| `--wpds-color-private-error-bg-fill-dark` | N/A |
|
|
257
|
-
| `--wpds-color-private-error-fg-fill-dark` | N/A |
|
|
258
|
-
| `--wpds-color-private-error-bg-fill-inverted2` | N/A |
|
|
259
|
-
| `--wpds-color-private-error-bg-fill-inverted1` | N/A |
|
|
260
|
-
| `--wpds-color-private-error-fg-fill-inverted` | N/A |
|
|
261
|
-
| `--wpds-color-private-error-surface1` | N/A |
|
|
262
|
-
| `--wpds-color-private-bg-surface2` | N/A |
|
|
263
|
-
| `--wpds-color-private-bg-bg-fill1` | N/A |
|
|
264
|
-
| `--wpds-color-private-bg-fg-fill` | N/A |
|
|
265
|
-
| `--wpds-color-private-bg-bg-fill2` | N/A |
|
|
266
|
-
| `--wpds-color-private-bg-surface6` | N/A |
|
|
267
|
-
| `--wpds-color-private-bg-surface5` | N/A |
|
|
268
|
-
| `--wpds-color-private-bg-surface4` | N/A |
|
|
269
|
-
| `--wpds-color-private-bg-surface3` | N/A |
|
|
270
|
-
| `--wpds-color-private-bg-fg-surface4` | N/A |
|
|
271
|
-
| `--wpds-color-private-bg-fg-surface3` | N/A |
|
|
272
|
-
| `--wpds-color-private-bg-fg-surface2` | N/A |
|
|
273
|
-
| `--wpds-color-private-bg-fg-surface1` | N/A |
|
|
274
|
-
| `--wpds-color-private-bg-stroke3` | N/A |
|
|
275
|
-
| `--wpds-color-private-bg-stroke4` | N/A |
|
|
276
|
-
| `--wpds-color-private-bg-stroke2` | N/A |
|
|
277
|
-
| `--wpds-color-private-bg-stroke1` | N/A |
|
|
278
|
-
| `--wpds-color-private-bg-bg-fill-dark` | N/A |
|
|
279
|
-
| `--wpds-color-private-bg-fg-fill-dark` | N/A |
|
|
280
|
-
| `--wpds-color-private-bg-bg-fill-inverted2` | N/A |
|
|
281
|
-
| `--wpds-color-private-bg-bg-fill-inverted1` | N/A |
|
|
282
|
-
| `--wpds-color-private-bg-fg-fill-inverted` | N/A |
|
|
283
|
-
| `--wpds-color-private-bg-surface1` | N/A |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Theme and context provider for the WordPress Design System.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,17 +32,24 @@
|
|
|
32
32
|
},
|
|
33
33
|
"./design-tokens.css": "./src/prebuilt/css/design-tokens.css",
|
|
34
34
|
"./design-tokens.js": "./src/prebuilt/js/design-tokens.js",
|
|
35
|
-
"./package.json": "./package.json"
|
|
36
|
-
"./build-style/": "./build-style/"
|
|
35
|
+
"./package.json": "./package.json"
|
|
37
36
|
},
|
|
38
37
|
"react-native": "src/index",
|
|
39
38
|
"wpScript": true,
|
|
40
39
|
"types": "build-types",
|
|
41
|
-
"sideEffects":
|
|
40
|
+
"sideEffects": [
|
|
41
|
+
"src/color-ramps/lib/register-color-spaces.ts",
|
|
42
|
+
"build/color-ramps/lib/register-color-spaces.js",
|
|
43
|
+
"build-module/color-ramps/lib/register-color-spaces.js"
|
|
44
|
+
],
|
|
42
45
|
"dependencies": {
|
|
43
|
-
"@wordpress/element": "^6.
|
|
44
|
-
"@wordpress/private-apis": "^1.
|
|
45
|
-
"colorjs.io": "^0.5.2"
|
|
46
|
+
"@wordpress/element": "^6.35.0",
|
|
47
|
+
"@wordpress/private-apis": "^1.35.0",
|
|
48
|
+
"colorjs.io": "^0.5.2",
|
|
49
|
+
"memize": "^2.1.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"esbuild-esm-loader": "0.3.3"
|
|
46
53
|
},
|
|
47
54
|
"peerDependencies": {
|
|
48
55
|
"react": "^18.0.0",
|
|
@@ -52,7 +59,10 @@
|
|
|
52
59
|
"access": "public"
|
|
53
60
|
},
|
|
54
61
|
"scripts": {
|
|
55
|
-
"build": "
|
|
62
|
+
"build:default-ramps": "node --import=esbuild-esm-loader/register bin/generate-default-ramps/index.ts",
|
|
63
|
+
"build:tokens": "node --import=esbuild-esm-loader/register bin/generate-primitive-tokens/index.ts && cross-env NODE_OPTIONS=--import=esbuild-esm-loader/register tz build --config terrazzo.config.ts",
|
|
64
|
+
"build": "npm run build:tokens && npm run build:default-ramps",
|
|
65
|
+
"postbuild": "prettier --write tokens/color.json src/prebuilt src/color-ramps/lib/default-ramps.ts docs"
|
|
56
66
|
},
|
|
57
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "77aa1f194edceafe8ac2a1b9438bf84b557e76e3"
|
|
58
68
|
}
|