style-dictionary 4.1.0 → 4.1.2

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.
@@ -12,6 +12,6 @@
12
12
  "author": "",
13
13
  "license": "Apache-2.0",
14
14
  "devDependencies": {
15
- "style-dictionary": "^4.1.0"
15
+ "style-dictionary": "^4.1.2"
16
16
  }
17
17
  }
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "eslint-config-react-app": "^7.0.1",
15
- "style-dictionary": "^4.1.0"
15
+ "style-dictionary": "^4.1.2"
16
16
  },
17
17
  "resolutions": {
18
18
  "immer": "8.0.1",
@@ -29,7 +29,7 @@
29
29
  "eslint-config-react-app": "^7.0.1",
30
30
  "jest": "~25.2.6",
31
31
  "react-test-renderer": "~16.13.1",
32
- "style-dictionary": "^4.1.0"
32
+ "style-dictionary": "^4.1.2"
33
33
  },
34
34
  "jest": {
35
35
  "preset": "react-native"
@@ -10,6 +10,6 @@
10
10
  "author": "",
11
11
  "license": "Apache-2.0",
12
12
  "devDependencies": {
13
- "style-dictionary": "^4.1.0"
13
+ "style-dictionary": "^4.1.2"
14
14
  }
15
15
  }
@@ -16,6 +16,6 @@
16
16
  "author": "",
17
17
  "license": "Apache-2.0",
18
18
  "devDependencies": {
19
- "style-dictionary": "^4.1.0"
19
+ "style-dictionary": "^4.1.2"
20
20
  }
21
21
  }
@@ -9,6 +9,6 @@
9
9
  },
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
- "style-dictionary": "^4.1.0"
12
+ "style-dictionary": "^4.1.2"
13
13
  }
14
14
  }
@@ -10,6 +10,6 @@
10
10
  "author": "",
11
11
  "license": "Apache-2.0",
12
12
  "devDependencies": {
13
- "style-dictionary": "^4.1.0"
13
+ "style-dictionary": "^4.1.2"
14
14
  }
15
15
  }
@@ -17,6 +17,6 @@
17
17
  "author": "Kelly Harrop <kn.harrop@gmail.com>",
18
18
  "license": "Apache-2.0",
19
19
  "devDependencies": {
20
- "style-dictionary": "^4.1.0"
20
+ "style-dictionary": "^4.1.2"
21
21
  }
22
22
  }
@@ -16,6 +16,6 @@
16
16
  "author": "",
17
17
  "license": "Apache-2.0",
18
18
  "devDependencies": {
19
- "style-dictionary": "^4.1.0"
19
+ "style-dictionary": "^4.1.2"
20
20
  }
21
21
  }
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "homepage": "https://github.com/dbanksdesign/style-dictionary-node#readme",
22
22
  "devDependencies": {
23
- "style-dictionary": "^4.1.0",
23
+ "style-dictionary": "^4.1.2",
24
24
  "tinycolor2": "^1.4.1"
25
25
  }
26
26
  }
@@ -17,6 +17,6 @@
17
17
  "author": "",
18
18
  "license": "Apache-2.0",
19
19
  "devDependencies": {
20
- "style-dictionary": "^4.1.0"
20
+ "style-dictionary": "^4.1.2"
21
21
  }
22
22
  }
@@ -16,6 +16,6 @@
16
16
  "author": "",
17
17
  "license": "Apache-2.0",
18
18
  "devDependencies": {
19
- "style-dictionary": "^4.1.0"
19
+ "style-dictionary": "^4.1.2"
20
20
  }
21
21
  }
@@ -16,6 +16,6 @@
16
16
  "devDependencies": {
17
17
  "aws-sdk": "^2.7.21",
18
18
  "fs-extra": "^1.0.0",
19
- "style-dictionary": "^4.1.0"
19
+ "style-dictionary": "^4.1.2"
20
20
  }
21
21
  }
@@ -16,6 +16,6 @@
16
16
  "author": "",
17
17
  "license": "Apache-2.0",
18
18
  "devDependencies": {
19
- "style-dictionary": "^4.1.0"
19
+ "style-dictionary": "^4.1.2"
20
20
  }
21
21
  }
@@ -12,6 +12,6 @@
12
12
  "license": "ISC",
13
13
  "devDependencies": {
14
14
  "colorjs.io": "^0.5.2",
15
- "style-dictionary": "^4.1.0"
15
+ "style-dictionary": "^4.1.2"
16
16
  }
17
17
  }
@@ -11,6 +11,6 @@
11
11
  "author": "",
12
12
  "license": "MIT",
13
13
  "devDependencies": {
14
- "style-dictionary": "^4.1.0"
14
+ "style-dictionary": "^4.1.2"
15
15
  }
16
16
  }
@@ -10,7 +10,7 @@
10
10
  "author": "",
11
11
  "license": "Apache-2.0",
12
12
  "devDependencies": {
13
- "style-dictionary": "^4.1.0",
13
+ "style-dictionary": "^4.1.2",
14
14
  "yaml": "^1.10.0"
15
15
  }
16
16
  }
package/lib/Register.d.ts CHANGED
@@ -70,10 +70,10 @@ export class Register {
70
70
  */
71
71
  static registerParser(cfg: Parser): void;
72
72
  /**
73
- * @param {import('../types/Parser.ts').Parser} parser
73
+ * @param {Parser} parser
74
74
  * @param {typeof Register | Register} target
75
75
  */
76
- static __registerParser(parser: import("../types/Parser.ts").Parser, target: typeof Register | Register): typeof Register | Register;
76
+ static __registerParser(parser: Parser, target: typeof Register | Register): typeof Register | Register;
77
77
  /**
78
78
  * @param {Preprocessor} cfg
79
79
  */
package/lib/Register.js CHANGED
@@ -53,6 +53,10 @@ export class Register {
53
53
  */
54
54
  static hooks = getBuiltinHooks();
55
55
 
56
+ constructor() {
57
+ this.hooks = Register.hooks;
58
+ }
59
+
56
60
  /** @type {Required<Hooks>} */
57
61
  get hooks() {
58
62
  const ctor = /** @type {typeof Register} */ (this.constructor);
@@ -293,7 +297,7 @@ export class Register {
293
297
  }
294
298
 
295
299
  /**
296
- * @param {import('../types/Parser.ts').Parser} parser
300
+ * @param {Parser} parser
297
301
  * @param {typeof Register | Register} target
298
302
  */
299
303
  static __registerParser(parser, target) {
@@ -393,8 +397,4 @@ export class Register {
393
397
  });
394
398
  return target;
395
399
  }
396
-
397
- constructor() {
398
- this.hooks = getBuiltinHooks();
399
- }
400
400
  }
@@ -78,7 +78,7 @@ export default class StyleDictionary extends Register {
78
78
  // Placeholder is transformed on prepublish -> see scripts/inject-version.js
79
79
  // Another option might be import pkg from './package.json' with { "type": "json" } which would work in both browser and node, but support is not there yet.
80
80
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility
81
- static VERSION = '4.1.0';
81
+ static VERSION = '4.1.2';
82
82
 
83
83
  /** @returns {Config} */
84
84
  get options() {
@@ -78,14 +78,21 @@ export default {
78
78
  // eslint-disable-next-line no-console
79
79
  console.log('Copying assets directory to ' + config.buildPath + 'assets');
80
80
  }
81
- return vol.promises.copyFile('assets', config.buildPath + 'assets');
81
+ return vol.promises.cp(
82
+ 'assets',
83
+ config.buildPath + 'assets',
84
+ // @ts-expect-error ICpOptions requires other props, this is a mistake in memfs types definition
85
+ {
86
+ recursive: true,
87
+ },
88
+ );
82
89
  },
83
90
  undo: async function (_, config, options, vol = fs) {
84
91
  if (config.log?.verbosity !== 'silent') {
85
92
  // eslint-disable-next-line no-console
86
93
  console.log('Removing assets directory from ' + config.buildPath + 'assets');
87
94
  }
88
- return vol.promises.unlink(config.buildPath + 'assets');
95
+ return vol.promises.rmdir(config.buildPath + 'assets', { recursive: true });
89
96
  },
90
97
  },
91
98
  };
@@ -1211,6 +1211,7 @@ declare const ${moduleName}: ${JSON.stringify(treeWalker(dictionary.tokens), nul
1211
1211
  * @typedef {Object} iosSwiftEnumOpts
1212
1212
  * @property {String} [iosSwiftEnumOpts.accessControl='public'] - Level of [access](https://docs.swift.org/swift-book/LanguageGuide/AccessControl.html) of the generated swift object
1213
1213
  * @property {String[]} [iosSwiftEnumOpts.import='UIKit'] - Modules to import. Can be a string or array of strings
1214
+ * @property {String} [iosSwiftEnumOpts.className] - The name of the generated Swift enum
1214
1215
  * @property {boolean} [iosSwiftEnumOpts.showFileHeader=true] - Whether or not to include a comment that has the build date
1215
1216
  * @property {OutputReferences} [iosSwiftEnumOpts.outputReferences=false] - Whether or not to keep [references](/#/formats?id=references-in-output-files) (a -> b -> c) in the output.
1216
1217
  * @param {FormatArgs & { options?: iosSwiftEnumOpts }} options
@@ -1265,6 +1266,7 @@ declare const ${moduleName}: ${JSON.stringify(treeWalker(dictionary.tokens), nul
1265
1266
  * @typedef {Object} iosSwiftAnyOpts
1266
1267
  * @property {string} [iosSwiftAnyOpts.accessControl='public'] - Level of [access](https://docs.swift.org/swift-book/LanguageGuide/AccessControl.html) of the generated swift object
1267
1268
  * @property {string[]} [iosSwiftAnyOpts.import='UIKit'] - Modules to import. Can be a string or array of strings
1269
+ * @property {String} [iosSwiftAnyOpts.className] - The name of the generated Swift object
1268
1270
  * @property {string} [iosSwiftAnyOpts.objectType='class'] - The type of the generated Swift object
1269
1271
  * @property {boolean} [iosSwiftAnyOpts.showFileHeader=true] - Whether or not to include a comment that has the build date
1270
1272
  * @property {OutputReferences} [iosSwiftAnyOpts.outputReferences=false] - Whether or not to keep [references](/#/formats?id=references-in-output-files) (a -> b -> c) in the output.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "style-dictionary",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "description": "Style once, use everywhere. A build system for creating cross-platform styles.",
5
5
  "keywords": [
6
6
  "style dictionary",
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { Action } from './Action.ts';
2
- export type { PlatformConfig, Config, LocalOptions, LogConfig } from './Config.ts';
2
+ export type { PlatformConfig, Config, LocalOptions, LogConfig, Hooks, ExpandFilter, Expand, ExpandConfig, } from './Config.ts';
3
3
  export type { DesignToken, DesignTokens, PreprocessedTokens, TransformedToken, TransformedTokens, Dictionary, } from './DesignToken.ts';
4
4
  export type { FileHeader, File, FormattingOptions } from './File.ts';
5
5
  export type { Filter } from './Filter.ts';