@primer/primitives 9.1.2 → 10.0.0-rc.6651a0c1
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/css/functional/themes/dark-colorblind.css +4 -4
- package/dist/css/functional/themes/dark-high-contrast.css +20 -20
- package/dist/css/functional/themes/light-high-contrast.css +14 -14
- package/dist/css/functional/typography/typography.css +20 -20
- package/dist/css/primitives.css +20 -20
- package/dist/docs/base/size/size.json +76 -76
- package/dist/docs/base/typography/typography.json +16 -16
- package/dist/docs/functional/motion/motion.json +18 -18
- package/dist/docs/functional/size/border.json +56 -56
- package/dist/docs/functional/size/breakpoints.json +24 -24
- package/dist/docs/functional/size/size-coarse.json +12 -12
- package/dist/docs/functional/size/size-fine.json +12 -12
- package/dist/docs/functional/size/size.json +264 -264
- package/dist/docs/functional/size/viewport.json +24 -24
- package/dist/docs/functional/themes/dark-colorblind.json +2310 -3186
- package/dist/docs/functional/themes/dark-dimmed.json +2300 -2794
- package/dist/docs/functional/themes/dark-high-contrast.json +2520 -5038
- package/dist/docs/functional/themes/dark-tritanopia.json +2351 -3003
- package/dist/docs/functional/themes/dark.json +2270 -2270
- package/dist/docs/functional/themes/light-colorblind.json +2298 -3124
- package/dist/docs/functional/themes/light-high-contrast.json +2419 -4645
- package/dist/docs/functional/themes/light-tritanopia.json +2330 -2990
- package/dist/docs/functional/themes/light.json +2260 -2260
- package/dist/docs/functional/typography/typography.json +206 -206
- package/dist/figma/dimension/dimension.json +489 -489
- package/dist/figma/figma.json +11 -3
- package/dist/figma/scales/dark-dimmed.json +38 -38
- package/dist/figma/scales/dark-high-constrast.json +38 -38
- package/dist/figma/scales/dark.json +35 -35
- package/dist/figma/scales/light-high-constrast.json +40 -40
- package/dist/figma/scales/light.json +40 -40
- package/dist/figma/shadows/dark-colorblind.json +280 -280
- package/dist/figma/shadows/dark-dimmed.json +280 -280
- package/dist/figma/shadows/dark-high-contrast.json +280 -280
- package/dist/figma/shadows/dark-tritanopia.json +280 -280
- package/dist/figma/shadows/dark.json +280 -280
- package/dist/figma/shadows/light-colorblind.json +281 -281
- package/dist/figma/shadows/light-high-contrast.json +281 -281
- package/dist/figma/shadows/light-tritanopia.json +281 -281
- package/dist/figma/shadows/light.json +281 -281
- package/dist/figma/themes/dark-colorblind.json +4991 -5854
- package/dist/figma/themes/dark-dimmed.json +5314 -5799
- package/dist/figma/themes/dark-high-contrast.json +4210 -6679
- package/dist/figma/themes/dark-tritanopia.json +5165 -5817
- package/dist/figma/themes/dark.json +5534 -5537
- package/dist/figma/themes/light-colorblind.json +4857 -5669
- package/dist/figma/themes/light-high-contrast.json +4198 -6372
- package/dist/figma/themes/light-tritanopia.json +4901 -5529
- package/dist/figma/themes/light.json +5349 -5349
- package/dist/figma/typography/typography.json +112 -156
- package/dist/internalCss/dark-colorblind.css +4 -4
- package/dist/internalCss/dark-high-contrast.css +20 -20
- package/dist/internalCss/light-high-contrast.css +14 -14
- package/dist/styleLint/base/size/size.json +38 -38
- package/dist/styleLint/base/typography/typography.json +8 -8
- package/dist/styleLint/functional/motion/motion.json +12 -12
- package/dist/styleLint/functional/size/border.json +30 -30
- package/dist/styleLint/functional/size/breakpoints.json +12 -12
- package/dist/styleLint/functional/size/size-coarse.json +6 -6
- package/dist/styleLint/functional/size/size-fine.json +6 -6
- package/dist/styleLint/functional/size/size.json +132 -132
- package/dist/styleLint/functional/size/viewport.json +12 -12
- package/dist/styleLint/functional/themes/dark-colorblind.json +1171 -2047
- package/dist/styleLint/functional/themes/dark-dimmed.json +1160 -1654
- package/dist/styleLint/functional/themes/dark-high-contrast.json +1307 -3825
- package/dist/styleLint/functional/themes/dark-tritanopia.json +1232 -1884
- package/dist/styleLint/functional/themes/dark.json +1140 -1140
- package/dist/styleLint/functional/themes/light-colorblind.json +1198 -2024
- package/dist/styleLint/functional/themes/light-high-contrast.json +1270 -3496
- package/dist/styleLint/functional/themes/light-tritanopia.json +1205 -1865
- package/dist/styleLint/functional/themes/light.json +1130 -1130
- package/dist/styleLint/functional/typography/typography.json +114 -114
- package/package.json +18 -10
- package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +4 -4
- package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +6 -0
- package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +21 -3
- package/src/tokens/functional/color/dark/primitives-dark.json5 +3 -3
- package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +4 -1
- package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +4 -1
- package/src/tokens/functional/color/light/primitives-light.json5 +2 -2
- package/dist/build/PrimerStyleDictionary.d.ts +0 -9
- package/dist/build/PrimerStyleDictionary.js +0 -92
- package/dist/build/filters/index.d.ts +0 -13
- package/dist/build/filters/index.js +0 -29
- package/dist/build/filters/isBorder.d.ts +0 -7
- package/dist/build/filters/isBorder.js +0 -12
- package/dist/build/filters/isColor.d.ts +0 -7
- package/dist/build/filters/isColor.js +0 -12
- package/dist/build/filters/isColorWithAlpha.d.ts +0 -7
- package/dist/build/filters/isColorWithAlpha.js +0 -13
- package/dist/build/filters/isColorWithMix.d.ts +0 -7
- package/dist/build/filters/isColorWithMix.js +0 -28
- package/dist/build/filters/isDeprecated.d.ts +0 -7
- package/dist/build/filters/isDeprecated.js +0 -12
- package/dist/build/filters/isDimension.d.ts +0 -7
- package/dist/build/filters/isDimension.js +0 -12
- package/dist/build/filters/isDuration.d.ts +0 -7
- package/dist/build/filters/isDuration.js +0 -12
- package/dist/build/filters/isFontFamily.d.ts +0 -7
- package/dist/build/filters/isFontFamily.js +0 -12
- package/dist/build/filters/isFontWeight.d.ts +0 -7
- package/dist/build/filters/isFontWeight.js +0 -12
- package/dist/build/filters/isFromFile.d.ts +0 -8
- package/dist/build/filters/isFromFile.js +0 -14
- package/dist/build/filters/isNumber.d.ts +0 -7
- package/dist/build/filters/isNumber.js +0 -10
- package/dist/build/filters/isShadow.d.ts +0 -7
- package/dist/build/filters/isShadow.js +0 -12
- package/dist/build/filters/isSource.d.ts +0 -7
- package/dist/build/filters/isSource.js +0 -12
- package/dist/build/filters/isTypography.d.ts +0 -7
- package/dist/build/filters/isTypography.js +0 -12
- package/dist/build/formats/cssAdvanced.d.ts +0 -2
- package/dist/build/formats/cssAdvanced.js +0 -84
- package/dist/build/formats/cssCustomMedia.d.ts +0 -7
- package/dist/build/formats/cssCustomMedia.js +0 -25
- package/dist/build/formats/index.d.ts +0 -9
- package/dist/build/formats/index.js +0 -21
- package/dist/build/formats/javascriptCommonJs.d.ts +0 -7
- package/dist/build/formats/javascriptCommonJs.js +0 -25
- package/dist/build/formats/javascriptEsm.d.ts +0 -7
- package/dist/build/formats/javascriptEsm.js +0 -25
- package/dist/build/formats/jsonFigma.d.ts +0 -7
- package/dist/build/formats/jsonFigma.js +0 -116
- package/dist/build/formats/jsonNestedPrefixed.d.ts +0 -8
- package/dist/build/formats/jsonNestedPrefixed.js +0 -28
- package/dist/build/formats/jsonOneDimensional.d.ts +0 -8
- package/dist/build/formats/jsonOneDimensional.js +0 -24
- package/dist/build/formats/jsonPostCssFallback.d.ts +0 -8
- package/dist/build/formats/jsonPostCssFallback.js +0 -21
- package/dist/build/formats/typescriptExportDefinition.d.ts +0 -7
- package/dist/build/formats/typescriptExportDefinition.js +0 -166
- package/dist/build/formats/utilities/jsonToFlat.d.ts +0 -11
- package/dist/build/formats/utilities/jsonToFlat.js +0 -12
- package/dist/build/formats/utilities/jsonToNestedValue.d.ts +0 -8
- package/dist/build/formats/utilities/jsonToNestedValue.js +0 -25
- package/dist/build/formats/utilities/prefixTokens.d.ts +0 -8
- package/dist/build/formats/utilities/prefixTokens.js +0 -17
- package/dist/build/parsers/index.d.ts +0 -1
- package/dist/build/parsers/index.js +0 -5
- package/dist/build/parsers/w3cJsonParser.d.ts +0 -6
- package/dist/build/parsers/w3cJsonParser.js +0 -27
- package/dist/build/platforms/css.d.ts +0 -2
- package/dist/build/platforms/css.js +0 -87
- package/dist/build/platforms/deprecatedJson.d.ts +0 -2
- package/dist/build/platforms/deprecatedJson.js +0 -17
- package/dist/build/platforms/docJson.d.ts +0 -2
- package/dist/build/platforms/docJson.js +0 -34
- package/dist/build/platforms/fallbacks.d.ts +0 -2
- package/dist/build/platforms/fallbacks.js +0 -34
- package/dist/build/platforms/figma.d.ts +0 -2
- package/dist/build/platforms/figma.js +0 -53
- package/dist/build/platforms/index.d.ts +0 -10
- package/dist/build/platforms/index.js +0 -23
- package/dist/build/platforms/javascript.d.ts +0 -2
- package/dist/build/platforms/javascript.js +0 -30
- package/dist/build/platforms/json.d.ts +0 -2
- package/dist/build/platforms/json.js +0 -32
- package/dist/build/platforms/styleLint.d.ts +0 -2
- package/dist/build/platforms/styleLint.js +0 -34
- package/dist/build/platforms/typeDefinitions.d.ts +0 -2
- package/dist/build/platforms/typeDefinitions.js +0 -30
- package/dist/build/platforms/typescript.d.ts +0 -2
- package/dist/build/platforms/typescript.js +0 -30
- package/dist/build/schemas/alphaValue.d.ts +0 -2
- package/dist/build/schemas/alphaValue.js +0 -8
- package/dist/build/schemas/baseToken.d.ts +0 -11
- package/dist/build/schemas/baseToken.js +0 -10
- package/dist/build/schemas/borderToken.d.ts +0 -51
- package/dist/build/schemas/borderToken.js +0 -20
- package/dist/build/schemas/collections.d.ts +0 -6
- package/dist/build/schemas/collections.js +0 -18
- package/dist/build/schemas/colorHexValue.d.ts +0 -2
- package/dist/build/schemas/colorHexValue.js +0 -12
- package/dist/build/schemas/colorToken.d.ts +0 -80
- package/dist/build/schemas/colorToken.js +0 -52
- package/dist/build/schemas/designToken.d.ts +0 -2
- package/dist/build/schemas/designToken.js +0 -37
- package/dist/build/schemas/dimensionToken.d.ts +0 -52
- package/dist/build/schemas/dimensionToken.js +0 -36
- package/dist/build/schemas/dimensionValue.d.ts +0 -2
- package/dist/build/schemas/dimensionValue.js +0 -12
- package/dist/build/schemas/durationToken.d.ts +0 -18
- package/dist/build/schemas/durationToken.js +0 -14
- package/dist/build/schemas/durationValue.d.ts +0 -2
- package/dist/build/schemas/durationValue.js +0 -8
- package/dist/build/schemas/fontFamilyToken.d.ts +0 -52
- package/dist/build/schemas/fontFamilyToken.js +0 -23
- package/dist/build/schemas/fontWeightToken.d.ts +0 -52
- package/dist/build/schemas/fontWeightToken.js +0 -24
- package/dist/build/schemas/fontWeightValue.d.ts +0 -2
- package/dist/build/schemas/fontWeightValue.js +0 -9
- package/dist/build/schemas/numberToken.d.ts +0 -71
- package/dist/build/schemas/numberToken.js +0 -30
- package/dist/build/schemas/referenceValue.d.ts +0 -2
- package/dist/build/schemas/referenceValue.js +0 -8
- package/dist/build/schemas/scopes.d.ts +0 -5
- package/dist/build/schemas/scopes.js +0 -34
- package/dist/build/schemas/shadowToken.d.ts +0 -157
- package/dist/build/schemas/shadowToken.js +0 -46
- package/dist/build/schemas/stringToken.d.ts +0 -18
- package/dist/build/schemas/stringToken.js +0 -13
- package/dist/build/schemas/tokenName.d.ts +0 -2
- package/dist/build/schemas/tokenName.js +0 -8
- package/dist/build/schemas/tokenType.d.ts +0 -3
- package/dist/build/schemas/tokenType.js +0 -6
- package/dist/build/schemas/typographyToken.d.ts +0 -59
- package/dist/build/schemas/typographyToken.js +0 -21
- package/dist/build/schemas/validTokenType.d.ts +0 -5
- package/dist/build/schemas/validTokenType.js +0 -34
- package/dist/build/schemas/viewportRangeToken.d.ts +0 -18
- package/dist/build/schemas/viewportRangeToken.js +0 -13
- package/dist/build/transformers/borderToCss.d.ts +0 -8
- package/dist/build/transformers/borderToCss.js +0 -38
- package/dist/build/transformers/colorToHex.d.ts +0 -8
- package/dist/build/transformers/colorToHex.js +0 -26
- package/dist/build/transformers/colorToHexMix.d.ts +0 -8
- package/dist/build/transformers/colorToHexMix.js +0 -25
- package/dist/build/transformers/colorToRgbAlpha.d.ts +0 -8
- package/dist/build/transformers/colorToRgbAlpha.js +0 -22
- package/dist/build/transformers/colorToRgbaFloat.d.ts +0 -8
- package/dist/build/transformers/colorToRgbaFloat.js +0 -50
- package/dist/build/transformers/dimensionToPixelUnitless.d.ts +0 -8
- package/dist/build/transformers/dimensionToPixelUnitless.js +0 -50
- package/dist/build/transformers/dimensionToRem.d.ts +0 -8
- package/dist/build/transformers/dimensionToRem.js +0 -47
- package/dist/build/transformers/dimensionToRemPxArray.d.ts +0 -8
- package/dist/build/transformers/dimensionToRemPxArray.js +0 -47
- package/dist/build/transformers/durationToCss.d.ts +0 -8
- package/dist/build/transformers/durationToCss.js +0 -30
- package/dist/build/transformers/figmaAttributes.d.ts +0 -8
- package/dist/build/transformers/figmaAttributes.js +0 -57
- package/dist/build/transformers/floatToPixel.d.ts +0 -15
- package/dist/build/transformers/floatToPixel.js +0 -41
- package/dist/build/transformers/fontFamilyToCss.d.ts +0 -14
- package/dist/build/transformers/fontFamilyToCss.js +0 -40
- package/dist/build/transformers/fontFamilyToFigma.d.ts +0 -14
- package/dist/build/transformers/fontFamilyToFigma.js +0 -46
- package/dist/build/transformers/fontWeightToNumber.d.ts +0 -9
- package/dist/build/transformers/fontWeightToNumber.js +0 -53
- package/dist/build/transformers/index.d.ts +0 -24
- package/dist/build/transformers/index.js +0 -51
- package/dist/build/transformers/jsonDeprecated.d.ts +0 -8
- package/dist/build/transformers/jsonDeprecated.js +0 -16
- package/dist/build/transformers/namePathToCamelCase.d.ts +0 -8
- package/dist/build/transformers/namePathToCamelCase.js +0 -14
- package/dist/build/transformers/namePathToDotNotation.d.ts +0 -8
- package/dist/build/transformers/namePathToDotNotation.js +0 -33
- package/dist/build/transformers/namePathToFigma.d.ts +0 -9
- package/dist/build/transformers/namePathToFigma.js +0 -24
- package/dist/build/transformers/namePathToKebabCase.d.ts +0 -8
- package/dist/build/transformers/namePathToKebabCase.js +0 -18
- package/dist/build/transformers/namePathToPascalCase.d.ts +0 -8
- package/dist/build/transformers/namePathToPascalCase.js +0 -14
- package/dist/build/transformers/namePathToSlashNotation.d.ts +0 -8
- package/dist/build/transformers/namePathToSlashNotation.js +0 -18
- package/dist/build/transformers/shadowToCss.d.ts +0 -8
- package/dist/build/transformers/shadowToCss.js +0 -35
- package/dist/build/transformers/typographyToCss.d.ts +0 -8
- package/dist/build/transformers/typographyToCss.js +0 -29
- package/dist/build/transformers/utilities/alpha.d.ts +0 -9
- package/dist/build/transformers/utilities/alpha.js +0 -20
- package/dist/build/transformers/utilities/checkRequiredTokenProperties.d.ts +0 -7
- package/dist/build/transformers/utilities/checkRequiredTokenProperties.js +0 -17
- package/dist/build/transformers/utilities/getTokenValue.d.ts +0 -2
- package/dist/build/transformers/utilities/getTokenValue.js +0 -18
- package/dist/build/transformers/utilities/hasSpaceInString.d.ts +0 -1
- package/dist/build/transformers/utilities/hasSpaceInString.js +0 -10
- package/dist/build/transformers/utilities/hexToRgbaFloat.d.ts +0 -2
- package/dist/build/transformers/utilities/hexToRgbaFloat.js +0 -33
- package/dist/build/transformers/utilities/invalidTokenError.d.ts +0 -7
- package/dist/build/transformers/utilities/invalidTokenError.js +0 -26
- package/dist/build/transformers/utilities/isRgbaFloat.d.ts +0 -7
- package/dist/build/transformers/utilities/isRgbaFloat.js +0 -24
- package/dist/build/transformers/utilities/mix.d.ts +0 -5
- package/dist/build/transformers/utilities/mix.js +0 -40
- package/dist/build/transformers/utilities/rgbaFloatToHex.d.ts +0 -6
- package/dist/build/transformers/utilities/rgbaFloatToHex.js +0 -15
- package/dist/build/utilities/copyFromDir.d.ts +0 -8
- package/dist/build/utilities/copyFromDir.js +0 -34
- package/dist/build/utilities/filterStringArray.d.ts +0 -1
- package/dist/build/utilities/filterStringArray.js +0 -17
- package/dist/build/utilities/getFlag.d.ts +0 -8
- package/dist/build/utilities/getFlag.js +0 -16
- package/dist/build/utilities/index.d.ts +0 -3
- package/dist/build/utilities/index.js +0 -9
- package/dist/build/utilities/joinFriendly.d.ts +0 -1
- package/dist/build/utilities/joinFriendly.js +0 -5
- package/dist/build/utilities/schemaErrorMessage.d.ts +0 -1
- package/dist/build/utilities/schemaErrorMessage.js +0 -5
- package/dist/build/utilities/toCamelCase.d.ts +0 -1
- package/dist/build/utilities/toCamelCase.js +0 -20
- package/dist/build/utilities/toPascalCase.d.ts +0 -1
- package/dist/build/utilities/toPascalCase.js +0 -17
- package/dist/build/utilities/treeWalker.d.ts +0 -8
- package/dist/build/utilities/treeWalker.js +0 -27
- package/dist/build/utilities/upperCaseFirstCharacter.d.ts +0 -8
- package/dist/build/utilities/upperCaseFirstCharacter.js +0 -14
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
-
$description: z.ZodOptional<z.ZodString>;
|
|
4
|
-
deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
5
|
-
}, {
|
|
6
|
-
$value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
|
|
7
|
-
$type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
|
|
8
|
-
$extensions: z.ZodOptional<z.ZodObject<{
|
|
9
|
-
'org.primer.figma': z.ZodObject<{
|
|
10
|
-
collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
11
|
-
scopes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
collection?: string | undefined;
|
|
14
|
-
scopes?: string[] | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
collection?: string | undefined;
|
|
17
|
-
scopes?: string[] | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
'org.primer.figma': {
|
|
21
|
-
collection?: string | undefined;
|
|
22
|
-
scopes?: string[] | undefined;
|
|
23
|
-
};
|
|
24
|
-
}, {
|
|
25
|
-
'org.primer.figma': {
|
|
26
|
-
collection?: string | undefined;
|
|
27
|
-
scopes?: string[] | undefined;
|
|
28
|
-
};
|
|
29
|
-
}>>;
|
|
30
|
-
}>, "strict", z.ZodTypeAny, {
|
|
31
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
32
|
-
$value: string;
|
|
33
|
-
deprecated?: string | boolean | undefined;
|
|
34
|
-
$extensions?: {
|
|
35
|
-
'org.primer.figma': {
|
|
36
|
-
collection?: string | undefined;
|
|
37
|
-
scopes?: string[] | undefined;
|
|
38
|
-
};
|
|
39
|
-
} | undefined;
|
|
40
|
-
$description?: string | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
43
|
-
$value: string;
|
|
44
|
-
deprecated?: string | boolean | undefined;
|
|
45
|
-
$extensions?: {
|
|
46
|
-
'org.primer.figma': {
|
|
47
|
-
collection?: string | undefined;
|
|
48
|
-
scopes?: string[] | undefined;
|
|
49
|
-
};
|
|
50
|
-
} | undefined;
|
|
51
|
-
$description?: string | undefined;
|
|
52
|
-
}>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fontFamilyToken = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const referenceValue_1 = require("./referenceValue");
|
|
6
|
-
const baseToken_1 = require("./baseToken");
|
|
7
|
-
const tokenType_1 = require("./tokenType");
|
|
8
|
-
const collections_1 = require("./collections");
|
|
9
|
-
const scopes_1 = require("./scopes");
|
|
10
|
-
exports.fontFamilyToken = baseToken_1.baseToken
|
|
11
|
-
.extend({
|
|
12
|
-
$value: zod_1.z.union([zod_1.z.string(), referenceValue_1.referenceValue]),
|
|
13
|
-
$type: (0, tokenType_1.tokenType)('fontFamily'),
|
|
14
|
-
$extensions: zod_1.z
|
|
15
|
-
.object({
|
|
16
|
-
'org.primer.figma': zod_1.z.object({
|
|
17
|
-
collection: (0, collections_1.collection)(['base/typography', 'typography']).optional(),
|
|
18
|
-
scopes: (0, scopes_1.scopes)(['fontFamily']).optional(),
|
|
19
|
-
}),
|
|
20
|
-
})
|
|
21
|
-
.optional(),
|
|
22
|
-
})
|
|
23
|
-
.strict();
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
-
$description: z.ZodOptional<z.ZodString>;
|
|
4
|
-
deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
5
|
-
}, {
|
|
6
|
-
$type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
|
|
7
|
-
$value: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
8
|
-
$extensions: z.ZodOptional<z.ZodObject<{
|
|
9
|
-
'org.primer.figma': z.ZodObject<{
|
|
10
|
-
collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
11
|
-
scopes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
collection?: string | undefined;
|
|
14
|
-
scopes?: string[] | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
collection?: string | undefined;
|
|
17
|
-
scopes?: string[] | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
'org.primer.figma': {
|
|
21
|
-
collection?: string | undefined;
|
|
22
|
-
scopes?: string[] | undefined;
|
|
23
|
-
};
|
|
24
|
-
}, {
|
|
25
|
-
'org.primer.figma': {
|
|
26
|
-
collection?: string | undefined;
|
|
27
|
-
scopes?: string[] | undefined;
|
|
28
|
-
};
|
|
29
|
-
}>>;
|
|
30
|
-
}>, "strict", z.ZodTypeAny, {
|
|
31
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
32
|
-
$value: string | number;
|
|
33
|
-
deprecated?: string | boolean | undefined;
|
|
34
|
-
$extensions?: {
|
|
35
|
-
'org.primer.figma': {
|
|
36
|
-
collection?: string | undefined;
|
|
37
|
-
scopes?: string[] | undefined;
|
|
38
|
-
};
|
|
39
|
-
} | undefined;
|
|
40
|
-
$description?: string | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
43
|
-
$value: string | number;
|
|
44
|
-
deprecated?: string | boolean | undefined;
|
|
45
|
-
$extensions?: {
|
|
46
|
-
'org.primer.figma': {
|
|
47
|
-
collection?: string | undefined;
|
|
48
|
-
scopes?: string[] | undefined;
|
|
49
|
-
};
|
|
50
|
-
} | undefined;
|
|
51
|
-
$description?: string | undefined;
|
|
52
|
-
}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fontWeightToken = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const fontWeightValue_1 = require("./fontWeightValue");
|
|
6
|
-
const referenceValue_1 = require("./referenceValue");
|
|
7
|
-
const baseToken_1 = require("./baseToken");
|
|
8
|
-
const tokenType_1 = require("./tokenType");
|
|
9
|
-
const collections_1 = require("./collections");
|
|
10
|
-
const scopes_1 = require("./scopes");
|
|
11
|
-
exports.fontWeightToken = baseToken_1.baseToken
|
|
12
|
-
.extend({
|
|
13
|
-
$type: (0, tokenType_1.tokenType)('fontWeight'),
|
|
14
|
-
$value: zod_1.z.union([fontWeightValue_1.fontWeightValue, referenceValue_1.referenceValue]),
|
|
15
|
-
$extensions: zod_1.z
|
|
16
|
-
.object({
|
|
17
|
-
'org.primer.figma': zod_1.z.object({
|
|
18
|
-
collection: (0, collections_1.collection)(['base/typography', 'typography']).optional(),
|
|
19
|
-
scopes: (0, scopes_1.scopes)(['fontWeight']).optional(),
|
|
20
|
-
}),
|
|
21
|
-
})
|
|
22
|
-
.optional(),
|
|
23
|
-
})
|
|
24
|
-
.strict();
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fontWeightValue = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
|
|
6
|
-
const allowed = [100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
7
|
-
exports.fontWeightValue = zod_1.z.number().refine(value => allowed.includes(value), value => ({
|
|
8
|
-
message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid font weight value: "${value}"`, `Font weight must be one of ${allowed.join(', ')}`),
|
|
9
|
-
}));
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
-
$description: z.ZodOptional<z.ZodString>;
|
|
4
|
-
deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
5
|
-
}, {
|
|
6
|
-
$value: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, string, string>]>;
|
|
7
|
-
$type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
|
|
8
|
-
$extensions: z.ZodOptional<z.ZodObject<{
|
|
9
|
-
'org.primer.data': z.ZodOptional<z.ZodObject<{
|
|
10
|
-
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
fontSize?: number | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
fontSize?: number | undefined;
|
|
15
|
-
}>>;
|
|
16
|
-
'org.primer.figma': z.ZodOptional<z.ZodObject<{
|
|
17
|
-
collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
18
|
-
scopes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
collection?: string | undefined;
|
|
21
|
-
scopes?: string[] | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
collection?: string | undefined;
|
|
24
|
-
scopes?: string[] | undefined;
|
|
25
|
-
}>>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
'org.primer.data'?: {
|
|
28
|
-
fontSize?: number | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
'org.primer.figma'?: {
|
|
31
|
-
collection?: string | undefined;
|
|
32
|
-
scopes?: string[] | undefined;
|
|
33
|
-
} | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
'org.primer.data'?: {
|
|
36
|
-
fontSize?: number | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
'org.primer.figma'?: {
|
|
39
|
-
collection?: string | undefined;
|
|
40
|
-
scopes?: string[] | undefined;
|
|
41
|
-
} | undefined;
|
|
42
|
-
}>>;
|
|
43
|
-
}>, "strict", z.ZodTypeAny, {
|
|
44
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
45
|
-
$value: string | number;
|
|
46
|
-
deprecated?: string | boolean | undefined;
|
|
47
|
-
$extensions?: {
|
|
48
|
-
'org.primer.data'?: {
|
|
49
|
-
fontSize?: number | undefined;
|
|
50
|
-
} | undefined;
|
|
51
|
-
'org.primer.figma'?: {
|
|
52
|
-
collection?: string | undefined;
|
|
53
|
-
scopes?: string[] | undefined;
|
|
54
|
-
} | undefined;
|
|
55
|
-
} | undefined;
|
|
56
|
-
$description?: string | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
59
|
-
$value: string | number;
|
|
60
|
-
deprecated?: string | boolean | undefined;
|
|
61
|
-
$extensions?: {
|
|
62
|
-
'org.primer.data'?: {
|
|
63
|
-
fontSize?: number | undefined;
|
|
64
|
-
} | undefined;
|
|
65
|
-
'org.primer.figma'?: {
|
|
66
|
-
collection?: string | undefined;
|
|
67
|
-
scopes?: string[] | undefined;
|
|
68
|
-
} | undefined;
|
|
69
|
-
} | undefined;
|
|
70
|
-
$description?: string | undefined;
|
|
71
|
-
}>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.numberToken = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const baseToken_1 = require("./baseToken");
|
|
6
|
-
const referenceValue_1 = require("./referenceValue");
|
|
7
|
-
const tokenType_1 = require("./tokenType");
|
|
8
|
-
const scopes_1 = require("./scopes");
|
|
9
|
-
const collections_1 = require("./collections");
|
|
10
|
-
exports.numberToken = baseToken_1.baseToken
|
|
11
|
-
.extend({
|
|
12
|
-
$value: zod_1.z.union([zod_1.z.number(), referenceValue_1.referenceValue]),
|
|
13
|
-
$type: (0, tokenType_1.tokenType)('number'),
|
|
14
|
-
$extensions: zod_1.z
|
|
15
|
-
.object({
|
|
16
|
-
'org.primer.data': zod_1.z
|
|
17
|
-
.object({
|
|
18
|
-
fontSize: zod_1.z.number().optional(),
|
|
19
|
-
})
|
|
20
|
-
.optional(),
|
|
21
|
-
'org.primer.figma': zod_1.z
|
|
22
|
-
.object({
|
|
23
|
-
collection: (0, collections_1.collection)(['typography']).optional(),
|
|
24
|
-
scopes: (0, scopes_1.scopes)(['fontWeight', 'lineHeight']).optional(),
|
|
25
|
-
})
|
|
26
|
-
.optional(),
|
|
27
|
-
})
|
|
28
|
-
.optional(),
|
|
29
|
-
})
|
|
30
|
-
.strict();
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.referenceValue = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
|
|
6
|
-
exports.referenceValue = zod_1.z.string().refine(ref => /^{\w+(\.\w+)*(\.\w+|\.@)}$/.test(ref), ref => ({
|
|
7
|
-
message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid reference: "${ref}"`, 'Reference must be a string in the format "{path.to.token}".'),
|
|
8
|
-
}));
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const validScopes: readonly ["all", "bgColor", "fgColor", "borderColor", "borderWidth", "size", "gap", "radius", "effectColor", "effectFloat", "opacity", "fontFamily", "fontStyle", "fontWeight", "fontSize", "lineHeight", "letterSpacing", "paragraphSpacing", "paragraphIndent"];
|
|
3
|
-
export type ValidScope = (typeof validScopes)[number];
|
|
4
|
-
export declare const scopes: (scopeSubset?: ValidScope[]) => z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
5
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scopes = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const joinFriendly_1 = require("../utilities/joinFriendly");
|
|
6
|
-
const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
|
|
7
|
-
const validScopes = [
|
|
8
|
-
'all',
|
|
9
|
-
'bgColor',
|
|
10
|
-
'fgColor',
|
|
11
|
-
'borderColor',
|
|
12
|
-
'borderWidth',
|
|
13
|
-
'size',
|
|
14
|
-
'gap',
|
|
15
|
-
'radius',
|
|
16
|
-
'effectColor',
|
|
17
|
-
'effectFloat',
|
|
18
|
-
'opacity',
|
|
19
|
-
'fontFamily',
|
|
20
|
-
'fontStyle',
|
|
21
|
-
'fontWeight',
|
|
22
|
-
'fontSize',
|
|
23
|
-
'lineHeight',
|
|
24
|
-
'letterSpacing',
|
|
25
|
-
'paragraphSpacing',
|
|
26
|
-
'paragraphIndent',
|
|
27
|
-
];
|
|
28
|
-
const scopes = (scopeSubset) => {
|
|
29
|
-
const scopeArray = scopeSubset !== null && scopeSubset !== void 0 ? scopeSubset : validScopes;
|
|
30
|
-
return zod_1.z.array(zod_1.z.string()).refine(value => value.every(item => scopeArray.includes(item)), value => ({
|
|
31
|
-
message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid scope: "${value}"`, `Valid scopes are: ${(0, joinFriendly_1.joinFriendly)(scopeArray)}`),
|
|
32
|
-
}));
|
|
33
|
-
};
|
|
34
|
-
exports.scopes = scopes;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const shadowValue: z.ZodObject<{
|
|
3
|
-
color: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
4
|
-
alpha: z.ZodUnion<[z.ZodEffects<z.ZodAny, any, any>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
5
|
-
offsetX: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
6
|
-
offsetY: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
7
|
-
blur: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
8
|
-
spread: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
9
|
-
inset: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
-
}, "strict", z.ZodTypeAny, {
|
|
11
|
-
color: string;
|
|
12
|
-
blur: string | 0;
|
|
13
|
-
offsetX: string | 0;
|
|
14
|
-
offsetY: string | 0;
|
|
15
|
-
spread: string | 0;
|
|
16
|
-
alpha?: any;
|
|
17
|
-
inset?: boolean | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
color: string;
|
|
20
|
-
blur: string | 0;
|
|
21
|
-
offsetX: string | 0;
|
|
22
|
-
offsetY: string | 0;
|
|
23
|
-
spread: string | 0;
|
|
24
|
-
alpha?: any;
|
|
25
|
-
inset?: boolean | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
|
|
28
|
-
$description: z.ZodOptional<z.ZodString>;
|
|
29
|
-
deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
30
|
-
}, {
|
|
31
|
-
$value: z.ZodUnion<[z.ZodObject<{
|
|
32
|
-
color: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
33
|
-
alpha: z.ZodUnion<[z.ZodEffects<z.ZodAny, any, any>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
34
|
-
offsetX: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
35
|
-
offsetY: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
36
|
-
blur: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
37
|
-
spread: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
38
|
-
inset: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
-
}, "strict", z.ZodTypeAny, {
|
|
40
|
-
color: string;
|
|
41
|
-
blur: string | 0;
|
|
42
|
-
offsetX: string | 0;
|
|
43
|
-
offsetY: string | 0;
|
|
44
|
-
spread: string | 0;
|
|
45
|
-
alpha?: any;
|
|
46
|
-
inset?: boolean | undefined;
|
|
47
|
-
}, {
|
|
48
|
-
color: string;
|
|
49
|
-
blur: string | 0;
|
|
50
|
-
offsetX: string | 0;
|
|
51
|
-
offsetY: string | 0;
|
|
52
|
-
spread: string | 0;
|
|
53
|
-
alpha?: any;
|
|
54
|
-
inset?: boolean | undefined;
|
|
55
|
-
}>, z.ZodArray<z.ZodObject<{
|
|
56
|
-
color: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
57
|
-
alpha: z.ZodUnion<[z.ZodEffects<z.ZodAny, any, any>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
58
|
-
offsetX: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
59
|
-
offsetY: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
60
|
-
blur: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
61
|
-
spread: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
62
|
-
inset: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
-
}, "strict", z.ZodTypeAny, {
|
|
64
|
-
color: string;
|
|
65
|
-
blur: string | 0;
|
|
66
|
-
offsetX: string | 0;
|
|
67
|
-
offsetY: string | 0;
|
|
68
|
-
spread: string | 0;
|
|
69
|
-
alpha?: any;
|
|
70
|
-
inset?: boolean | undefined;
|
|
71
|
-
}, {
|
|
72
|
-
color: string;
|
|
73
|
-
blur: string | 0;
|
|
74
|
-
offsetX: string | 0;
|
|
75
|
-
offsetY: string | 0;
|
|
76
|
-
spread: string | 0;
|
|
77
|
-
alpha?: any;
|
|
78
|
-
inset?: boolean | undefined;
|
|
79
|
-
}>, "many">, z.ZodEffects<z.ZodString, string, string>]>;
|
|
80
|
-
$type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
|
|
81
|
-
$extensions: z.ZodOptional<z.ZodObject<{
|
|
82
|
-
'org.primer.figma': z.ZodObject<{
|
|
83
|
-
collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
84
|
-
mode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
85
|
-
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
mode?: string | undefined;
|
|
87
|
-
collection?: string | undefined;
|
|
88
|
-
}, {
|
|
89
|
-
mode?: string | undefined;
|
|
90
|
-
collection?: string | undefined;
|
|
91
|
-
}>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
'org.primer.figma': {
|
|
94
|
-
mode?: string | undefined;
|
|
95
|
-
collection?: string | undefined;
|
|
96
|
-
};
|
|
97
|
-
}, {
|
|
98
|
-
'org.primer.figma': {
|
|
99
|
-
mode?: string | undefined;
|
|
100
|
-
collection?: string | undefined;
|
|
101
|
-
};
|
|
102
|
-
}>>;
|
|
103
|
-
}>, "strict", z.ZodTypeAny, {
|
|
104
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
105
|
-
$value: string | {
|
|
106
|
-
color: string;
|
|
107
|
-
blur: string | 0;
|
|
108
|
-
offsetX: string | 0;
|
|
109
|
-
offsetY: string | 0;
|
|
110
|
-
spread: string | 0;
|
|
111
|
-
alpha?: any;
|
|
112
|
-
inset?: boolean | undefined;
|
|
113
|
-
} | {
|
|
114
|
-
color: string;
|
|
115
|
-
blur: string | 0;
|
|
116
|
-
offsetX: string | 0;
|
|
117
|
-
offsetY: string | 0;
|
|
118
|
-
spread: string | 0;
|
|
119
|
-
alpha?: any;
|
|
120
|
-
inset?: boolean | undefined;
|
|
121
|
-
}[];
|
|
122
|
-
deprecated?: string | boolean | undefined;
|
|
123
|
-
$extensions?: {
|
|
124
|
-
'org.primer.figma': {
|
|
125
|
-
mode?: string | undefined;
|
|
126
|
-
collection?: string | undefined;
|
|
127
|
-
};
|
|
128
|
-
} | undefined;
|
|
129
|
-
$description?: string | undefined;
|
|
130
|
-
}, {
|
|
131
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
132
|
-
$value: string | {
|
|
133
|
-
color: string;
|
|
134
|
-
blur: string | 0;
|
|
135
|
-
offsetX: string | 0;
|
|
136
|
-
offsetY: string | 0;
|
|
137
|
-
spread: string | 0;
|
|
138
|
-
alpha?: any;
|
|
139
|
-
inset?: boolean | undefined;
|
|
140
|
-
} | {
|
|
141
|
-
color: string;
|
|
142
|
-
blur: string | 0;
|
|
143
|
-
offsetX: string | 0;
|
|
144
|
-
offsetY: string | 0;
|
|
145
|
-
spread: string | 0;
|
|
146
|
-
alpha?: any;
|
|
147
|
-
inset?: boolean | undefined;
|
|
148
|
-
}[];
|
|
149
|
-
deprecated?: string | boolean | undefined;
|
|
150
|
-
$extensions?: {
|
|
151
|
-
'org.primer.figma': {
|
|
152
|
-
mode?: string | undefined;
|
|
153
|
-
collection?: string | undefined;
|
|
154
|
-
};
|
|
155
|
-
} | undefined;
|
|
156
|
-
$description?: string | undefined;
|
|
157
|
-
}>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shadowToken = exports.shadowValue = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const baseToken_1 = require("./baseToken");
|
|
6
|
-
const referenceValue_1 = require("./referenceValue");
|
|
7
|
-
const colorHexValue_1 = require("./colorHexValue");
|
|
8
|
-
const alphaValue_1 = require("./alphaValue");
|
|
9
|
-
const dimensionValue_1 = require("./dimensionValue");
|
|
10
|
-
const tokenType_1 = require("./tokenType");
|
|
11
|
-
const collections_1 = require("./collections");
|
|
12
|
-
exports.shadowValue = zod_1.z
|
|
13
|
-
.object({
|
|
14
|
-
color: zod_1.z.union([colorHexValue_1.colorHexValue, referenceValue_1.referenceValue]),
|
|
15
|
-
alpha: zod_1.z.union([alphaValue_1.alphaValue, referenceValue_1.referenceValue]),
|
|
16
|
-
offsetX: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
|
|
17
|
-
offsetY: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
|
|
18
|
-
blur: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
|
|
19
|
-
spread: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
|
|
20
|
-
inset: zod_1.z.boolean().optional(),
|
|
21
|
-
})
|
|
22
|
-
.strict();
|
|
23
|
-
exports.shadowToken = baseToken_1.baseToken
|
|
24
|
-
.extend({
|
|
25
|
-
$value: zod_1.z.union([exports.shadowValue, zod_1.z.array(exports.shadowValue), referenceValue_1.referenceValue]),
|
|
26
|
-
$type: (0, tokenType_1.tokenType)('shadow'),
|
|
27
|
-
$extensions: zod_1.z
|
|
28
|
-
.object({
|
|
29
|
-
'org.primer.figma': zod_1.z.object({
|
|
30
|
-
collection: (0, collections_1.collection)(['mode']).optional(),
|
|
31
|
-
mode: (0, collections_1.mode)([
|
|
32
|
-
'light',
|
|
33
|
-
'dark',
|
|
34
|
-
'dark dimmed',
|
|
35
|
-
'light high contrast',
|
|
36
|
-
'dark high contrast',
|
|
37
|
-
'light colorblind',
|
|
38
|
-
'dark colorblind',
|
|
39
|
-
'light tritanopia',
|
|
40
|
-
'dark tritanopia',
|
|
41
|
-
]).optional(),
|
|
42
|
-
}),
|
|
43
|
-
})
|
|
44
|
-
.optional(),
|
|
45
|
-
})
|
|
46
|
-
.strict();
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const stringToken: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
-
$description: z.ZodOptional<z.ZodString>;
|
|
4
|
-
deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
5
|
-
}, {
|
|
6
|
-
$value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
|
|
7
|
-
$type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
|
|
8
|
-
}>, "strict", z.ZodTypeAny, {
|
|
9
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
10
|
-
$value: string;
|
|
11
|
-
deprecated?: string | boolean | undefined;
|
|
12
|
-
$description?: string | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
15
|
-
$value: string;
|
|
16
|
-
deprecated?: string | boolean | undefined;
|
|
17
|
-
$description?: string | undefined;
|
|
18
|
-
}>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringToken = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const baseToken_1 = require("./baseToken");
|
|
6
|
-
const referenceValue_1 = require("./referenceValue");
|
|
7
|
-
const tokenType_1 = require("./tokenType");
|
|
8
|
-
exports.stringToken = baseToken_1.baseToken
|
|
9
|
-
.extend({
|
|
10
|
-
$value: zod_1.z.union([zod_1.z.string(), referenceValue_1.referenceValue]),
|
|
11
|
-
$type: (0, tokenType_1.tokenType)('string'),
|
|
12
|
-
})
|
|
13
|
-
.strict();
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tokenName = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
|
|
6
|
-
exports.tokenName = zod_1.z.string().refine(name => /(^[a-z0-9][A-Za-z0-9-]*$|^@$)/.test(name), name => ({
|
|
7
|
-
message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid token name: "${name}"`, 'Token name must be kebab-case or camelCase, and start with a lowercase letter or number and consist only of letters, numbers, and hyphens.'),
|
|
8
|
-
}));
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { TokenType } from './validTokenType';
|
|
3
|
-
export declare const tokenType: ($type: TokenType) => z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const typographyValue: z.ZodObject<{
|
|
3
|
-
fontSize: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
4
|
-
lineHeight: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>>;
|
|
5
|
-
fontWeight: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
6
|
-
fontFamily: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
fontFamily: string;
|
|
9
|
-
fontSize: string | 0;
|
|
10
|
-
fontWeight: string | number;
|
|
11
|
-
lineHeight?: string | 0 | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
fontFamily: string;
|
|
14
|
-
fontSize: string | 0;
|
|
15
|
-
fontWeight: string | number;
|
|
16
|
-
lineHeight?: string | 0 | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const typographyToken: z.ZodObject<z.objectUtil.extendShape<{
|
|
19
|
-
$description: z.ZodOptional<z.ZodString>;
|
|
20
|
-
deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
21
|
-
}, {
|
|
22
|
-
$value: z.ZodUnion<[z.ZodObject<{
|
|
23
|
-
fontSize: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
24
|
-
lineHeight: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>>;
|
|
25
|
-
fontWeight: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
26
|
-
fontFamily: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
|
|
27
|
-
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
fontFamily: string;
|
|
29
|
-
fontSize: string | 0;
|
|
30
|
-
fontWeight: string | number;
|
|
31
|
-
lineHeight?: string | 0 | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
fontFamily: string;
|
|
34
|
-
fontSize: string | 0;
|
|
35
|
-
fontWeight: string | number;
|
|
36
|
-
lineHeight?: string | 0 | undefined;
|
|
37
|
-
}>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
38
|
-
$type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
|
|
39
|
-
}>, "strict", z.ZodTypeAny, {
|
|
40
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
41
|
-
$value: string | {
|
|
42
|
-
fontFamily: string;
|
|
43
|
-
fontSize: string | 0;
|
|
44
|
-
fontWeight: string | number;
|
|
45
|
-
lineHeight?: string | 0 | undefined;
|
|
46
|
-
};
|
|
47
|
-
deprecated?: string | boolean | undefined;
|
|
48
|
-
$description?: string | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
$type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
|
|
51
|
-
$value: string | {
|
|
52
|
-
fontFamily: string;
|
|
53
|
-
fontSize: string | 0;
|
|
54
|
-
fontWeight: string | number;
|
|
55
|
-
lineHeight?: string | 0 | undefined;
|
|
56
|
-
};
|
|
57
|
-
deprecated?: string | boolean | undefined;
|
|
58
|
-
$description?: string | undefined;
|
|
59
|
-
}>;
|