@knapsack/design-token-utils 4.70.1--canary.4883.ec44536.0 → 4.71.0--canary.4884.6344b42.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"ks-figma-vars.format.d.ts","sourceRoot":"","sources":["../../../src/formats/ks-figma-vars/ks-figma-vars.format.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,SAAS,EAAE,MAAM,aAAa,CAAC;AAG1D,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,YAAY;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,YAAY;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,YAAY;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,gBAAgB,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;CACZ;AACD,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,MAAM,GACN,MAAM,GACN,eAAe,GACf,eAAe,CAAC;AACpB,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3E,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,CAE1B;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,eAAe,GACrB,KAAK,IAAI,eAAe,CAE1B;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,mBAAmB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC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,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,CAE1B;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,eAAe,GACrB,KAAK,IAAI,eAAe,CAE1B;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,mBAAmB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACnD,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,iBAAiB,CAyI7D,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { isObject } from '@knapsack/types';
2
+ import { isArray } from '@knapsack/utils';
2
3
  import { formatValidationResults } from '../format-utils.js';
3
4
  export function isKsFigmaVarValueAlias(value) {
4
5
  return isObject(value) && 'type' in value && value.type === 'VARIABLE_ALIAS';
@@ -7,86 +8,122 @@ export function isKsFigmaVarValueRgb(value) {
7
8
  return isObject(value) && 'r' in value && 'g' in value && 'b' in value;
8
9
  }
9
10
  export const validateFigmaVarsSrc = (src) => {
10
- let validateResults = {
11
+ const validateResults = {
11
12
  errorMsg: '',
12
13
  errors: [],
13
14
  data: undefined,
14
15
  };
16
+ // Reduce repeating
17
+ const validateReturn = () => ({
18
+ errorMsg: formatValidationResults(validateResults.errors),
19
+ errors: validateResults.errors,
20
+ data: validateResults.errors.length
21
+ ? undefined
22
+ : src,
23
+ });
15
24
  if (!isObject(src)) {
16
- const msg = `Must be an object, received: "${JSON.stringify(src)}"`;
17
- validateResults = {
18
- ...validateResults,
19
- errors: [
20
- ...validateResults.errors,
21
- {
22
- id: ',',
23
- msgs: [msg],
24
- },
25
- ],
26
- };
25
+ validateResults.errors.push({
26
+ id: 'mustBeObject',
27
+ msgs: [`Source must be an object, received: "${JSON.stringify(src)}"`],
28
+ });
29
+ return validateReturn();
27
30
  }
28
- if (isObject(src) && !('collectionsById' in src)) {
29
- const msg = `Must have a "collectionsById" key`;
30
- validateResults = {
31
- ...validateResults,
32
- errors: [
33
- ...validateResults.errors,
34
- {
35
- id: 'collectionsById',
36
- msgs: [msg],
37
- },
38
- ],
39
- };
31
+ if (!('collectionsById' in src) || !isObject(src.collectionsById)) {
32
+ validateResults.errors.push({
33
+ id: 'collectionsById',
34
+ msgs: [`Must have a "collectionsById" key`],
35
+ });
36
+ return validateReturn();
40
37
  }
41
- if (isObject(src) && !('variablesById' in src)) {
42
- const msg = `Must have a "variablesById" key`;
43
- validateResults = {
44
- ...validateResults,
45
- errors: [
46
- ...validateResults.errors,
47
- {
48
- id: 'variablesById',
49
- msgs: [msg],
50
- },
51
- ],
52
- };
38
+ if (!('variablesById' in src) || !isObject(src.variablesById)) {
39
+ validateResults.errors.push({
40
+ id: 'variablesById',
41
+ msgs: [`Must have a "variablesById" key`],
42
+ });
43
+ return validateReturn();
53
44
  }
45
+ const { variablesById, collectionsById } = src;
46
+ const setVariablesById = new Set(Object.keys(variablesById));
47
+ const setCollectionsById = new Set(Object.keys(collectionsById));
54
48
  // Verify all vars that are referenced actually exist
55
- // @TODO: zod all this
56
- if (isObject(src) && 'variablesById' in src && isObject(src.variablesById)) {
57
- // const allVarIds = Object.keys(src.variablesById);
58
- const { variablesById } = src;
59
- Object.values(variablesById).forEach((varData) => {
60
- if (!isObject(varData) || !('valuesByMode' in varData))
49
+ if (setVariablesById) {
50
+ setVariablesById.forEach((varId) => {
51
+ const varData = variablesById[varId];
52
+ if (!isObject(varData) || !('valuesByMode' in varData)) {
53
+ validateResults.errors.push({
54
+ id: 'badVar',
55
+ msgs: [`Malformed Variable: ${varId}`],
56
+ });
61
57
  return;
62
- const { valuesByMode } = varData;
63
- if (!isObject(valuesByMode))
58
+ }
59
+ const { valuesByMode, collectionId } = varData;
60
+ if (!isObject(valuesByMode)) {
61
+ validateResults.errors.push({
62
+ id: `${varData.name}-noModeValues`,
63
+ msgs: [
64
+ `${varData.name} is a Variable, but has not values for any modes.`,
65
+ ],
66
+ });
64
67
  return;
65
- const refErrors = [];
68
+ }
69
+ // Check refs
66
70
  Object.entries(valuesByMode).forEach(([modeId, modeVal]) => {
67
71
  if (isKsFigmaVarValueAlias(modeVal)) {
68
72
  const found = variablesById[modeVal.id];
69
73
  if (!found) {
70
- const msg = `Var "${varData.name}" has a reference, "${modeVal.id}", for mode "${modeId}" that cannot be found`;
71
- refErrors.push({
72
- id: `${varData.name}.${modeId}`,
73
- msgs: [msg],
74
+ validateResults.errors.push({
75
+ id: `${varData.name}.${modeId}-badRef`,
76
+ msgs: [
77
+ `Var "${varData.name}" has a reference, "${modeVal.id}", for mode "${modeId}" that cannot be found`,
78
+ ],
74
79
  });
75
80
  }
76
81
  }
77
82
  });
78
- validateResults = {
79
- ...validateResults,
80
- errors: [...validateResults.errors, ...refErrors],
81
- };
83
+ // Check that collection exists
84
+ if (typeof collectionId === 'string' &&
85
+ !setCollectionsById.has(collectionId)) {
86
+ validateResults.errors.push({
87
+ id: 'varRefsCollectionsNoExist',
88
+ msgs: [
89
+ `Variable ${varData.name} references Collection ID ${collectionId} that does not exist.`,
90
+ ],
91
+ });
92
+ }
82
93
  });
83
94
  }
84
- return {
85
- errorMsg: formatValidationResults(validateResults.errors),
86
- errors: validateResults.errors,
87
- data: validateResults.errors.length
88
- ? undefined
89
- : src,
90
- };
95
+ // Now that varIds are in the Set, run through Collections to make sure every var exists
96
+ if (setCollectionsById) {
97
+ setCollectionsById.forEach((colId) => {
98
+ const colData = collectionsById[colId];
99
+ if (!isObject(colData) || !('variableIds' in colData)) {
100
+ validateResults.errors.push({
101
+ id: 'badCol',
102
+ msgs: [`Malformed collection: ${colId}`],
103
+ });
104
+ return;
105
+ }
106
+ const { variableIds } = colData;
107
+ if (!isArray(variableIds)) {
108
+ validateResults.errors.push({
109
+ id: 'colMissingVariableIds',
110
+ msgs: [`Collection ${colId} has no Variables`],
111
+ });
112
+ return;
113
+ }
114
+ // Verify that every Var referenced in Collection actually exists
115
+ variableIds.forEach((variableId) => {
116
+ if (!setVariablesById.has(variableId)) {
117
+ validateResults.errors.push({
118
+ id: 'colHasMissingVar',
119
+ msgs: [
120
+ `Collection ${colId} references a Variable ${variableId} that does not exist.`,
121
+ ],
122
+ });
123
+ }
124
+ });
125
+ });
126
+ }
127
+ return validateReturn();
91
128
  };
92
129
  //# sourceMappingURL=ks-figma-vars.format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ks-figma-vars.format.js","sourceRoot":"","sources":["../../../src/formats/ks-figma-vars/ks-figma-vars.format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAyB7D,MAAM,UAAU,sBAAsB,CACpC,KAAc;IAEd,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,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GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;oBACtC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC;wBAC1B,EAAE,EAAE,kBAAkB;wBACtB,IAAI,EAAE;4BACJ,cAAc,KAAK,0BAA0B,UAAU,uBAAuB;yBAC/E;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,cAAc,EAAE,CAAC;AAC1B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/design-token-utils",
3
3
  "description": "",
4
- "version": "4.70.1--canary.4883.ec44536.0",
4
+ "version": "4.71.0--canary.4884.6344b42.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -26,19 +26,19 @@
26
26
  "test": "time npm run ava"
27
27
  },
28
28
  "dependencies": {
29
- "@knapsack/color-utils": "4.70.1--canary.4883.ec44536.0",
30
- "@knapsack/file-utils": "4.70.1--canary.4883.ec44536.0",
31
- "@knapsack/types": "4.70.1--canary.4883.ec44536.0",
32
- "@knapsack/utils": "4.70.1--canary.4883.ec44536.0",
29
+ "@knapsack/color-utils": "4.71.0--canary.4884.6344b42.0",
30
+ "@knapsack/file-utils": "4.71.0--canary.4884.6344b42.0",
31
+ "@knapsack/types": "4.71.0--canary.4884.6344b42.0",
32
+ "@knapsack/utils": "4.71.0--canary.4884.6344b42.0",
33
33
  "flat": "^5.0.2",
34
34
  "immer": "^10.1.1",
35
35
  "lodash": "^4.17.21",
36
36
  "superstruct": "^0.16.7"
37
37
  },
38
38
  "devDependencies": {
39
- "@knapsack/eslint-config-starter": "4.70.1--canary.4883.ec44536.0",
40
- "@knapsack/test-ava": "4.70.1--canary.4883.ec44536.0",
41
- "@knapsack/typescript-config-starter": "4.70.1--canary.4883.ec44536.0",
39
+ "@knapsack/eslint-config-starter": "4.71.0--canary.4884.6344b42.0",
40
+ "@knapsack/test-ava": "4.71.0--canary.4884.6344b42.0",
41
+ "@knapsack/typescript-config-starter": "4.71.0--canary.4884.6344b42.0",
42
42
  "@types/flat": "^5.0.5",
43
43
  "@types/fs-extra": "^11.0.4",
44
44
  "@types/lodash": "^4.17.5",
@@ -61,5 +61,5 @@
61
61
  "directory": "libs/design-token-utils",
62
62
  "type": "git"
63
63
  },
64
- "gitHead": "ec44536d123b050e7309a3d105ef12311c1aed65"
64
+ "gitHead": "6344b42a6dd323ce8133d55f49965e4a7a6437f0"
65
65
  }