@powerlines/plugin-style-dictionary 0.3.425 → 0.3.426

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/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_file_header = require('./style-dictionary/file-header.cjs');
4
- let _powerlines_schema_resolve = require("@powerlines/schema/resolve");
4
+ let _powerlines_schema = require("@powerlines/schema");
5
5
  let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
6
6
  let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
7
7
  let defu = require("defu");
@@ -31,7 +31,7 @@ const plugin = (options = {}) => {
31
31
  if (this.config.styleDictionary.customActions) {
32
32
  let builder;
33
33
  if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customActions)) builder = this.config.styleDictionary.customActions;
34
- else builder = await (0, _powerlines_schema_resolve.resolve)(this, this.config.styleDictionary.customActions);
34
+ else builder = await (0, _powerlines_schema.resolve)(this, this.config.styleDictionary.customActions);
35
35
  Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, action]) => {
36
36
  this.styleDictionary.registerAction({
37
37
  ...action,
@@ -42,7 +42,7 @@ const plugin = (options = {}) => {
42
42
  if (this.config.styleDictionary.customFileHeaders) {
43
43
  let builder;
44
44
  if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customFileHeaders)) builder = this.config.styleDictionary.customFileHeaders;
45
- else builder = await (0, _powerlines_schema_resolve.resolve)(this, this.config.styleDictionary.customFileHeaders);
45
+ else builder = await (0, _powerlines_schema.resolve)(this, this.config.styleDictionary.customFileHeaders);
46
46
  Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, fileHeader]) => {
47
47
  this.styleDictionary.registerFileHeader({
48
48
  name,
@@ -53,7 +53,7 @@ const plugin = (options = {}) => {
53
53
  if (this.config.styleDictionary.customFilters) {
54
54
  let builder;
55
55
  if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customFilters)) builder = this.config.styleDictionary.customFilters;
56
- else builder = await (0, _powerlines_schema_resolve.resolve)(this, this.config.styleDictionary.customFilters);
56
+ else builder = await (0, _powerlines_schema.resolve)(this, this.config.styleDictionary.customFilters);
57
57
  Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, filter]) => {
58
58
  this.styleDictionary.registerFilter({
59
59
  ...filter,
@@ -64,7 +64,7 @@ const plugin = (options = {}) => {
64
64
  if (this.config.styleDictionary.customPreprocessors) {
65
65
  let builder;
66
66
  if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customPreprocessors)) builder = this.config.styleDictionary.customPreprocessors;
67
- else builder = await (0, _powerlines_schema_resolve.resolve)(this, this.config.styleDictionary.customPreprocessors);
67
+ else builder = await (0, _powerlines_schema.resolve)(this, this.config.styleDictionary.customPreprocessors);
68
68
  Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, preprocessor]) => {
69
69
  this.styleDictionary.registerPreprocessor({
70
70
  ...preprocessor,
@@ -75,7 +75,7 @@ const plugin = (options = {}) => {
75
75
  if (this.config.styleDictionary.customParsers) {
76
76
  let builder;
77
77
  if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customParsers)) builder = this.config.styleDictionary.customParsers;
78
- else builder = await (0, _powerlines_schema_resolve.resolve)(this, this.config.styleDictionary.customParsers);
78
+ else builder = await (0, _powerlines_schema.resolve)(this, this.config.styleDictionary.customParsers);
79
79
  Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, parser]) => {
80
80
  this.styleDictionary.registerParser({
81
81
  ...parser,
@@ -86,7 +86,7 @@ const plugin = (options = {}) => {
86
86
  if (this.config.styleDictionary.customTransforms) {
87
87
  let builder;
88
88
  if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customTransforms)) builder = this.config.styleDictionary.customTransforms;
89
- else builder = await (0, _powerlines_schema_resolve.resolve)(this, this.config.styleDictionary.customTransforms);
89
+ else builder = await (0, _powerlines_schema.resolve)(this, this.config.styleDictionary.customTransforms);
90
90
  Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, transform]) => {
91
91
  this.styleDictionary.registerTransform({
92
92
  ...transform,
@@ -97,7 +97,7 @@ const plugin = (options = {}) => {
97
97
  if (this.config.styleDictionary.customTransformGroups) {
98
98
  let builder;
99
99
  if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customTransformGroups)) builder = this.config.styleDictionary.customTransformGroups;
100
- else builder = await (0, _powerlines_schema_resolve.resolve)(this, this.config.styleDictionary.customTransformGroups);
100
+ else builder = await (0, _powerlines_schema.resolve)(this, this.config.styleDictionary.customTransformGroups);
101
101
  Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, transformGroup]) => {
102
102
  this.styleDictionary.registerTransformGroup({
103
103
  name,
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fileHeader } from "./style-dictionary/file-header.mjs";
2
- import { resolve } from "@powerlines/schema/resolve";
2
+ import { resolve } from "@powerlines/schema";
3
3
  import { LogLevelLabel } from "@storm-software/config-tools/types";
4
4
  import { isFunction } from "@stryke/type-checks/is-function";
5
5
  import defu from "defu";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolve } from \"@powerlines/schema/resolve\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport StyleDictionary from \"style-dictionary\";\nimport { fileHeader } from \"./style-dictionary/file-header\";\nimport {\n CustomActionsBuilder,\n CustomFileHeadersBuilder,\n CustomFiltersBuilder,\n CustomParsersBuilder,\n CustomPreprocessorsBuilder,\n CustomTransformGroupsBuilder,\n CustomTransformsBuilder,\n StyleDictionaryPluginContext,\n StyleDictionaryPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n styleDictionary?: StyleDictionaryPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate style-dictionary for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext\n>(\n options: StyleDictionaryPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"style-dictionary\",\n config() {\n return {\n styleDictionary: defu(options, {\n log: {\n verbosity:\n this.config.logLevel.general === LogLevelLabel.TRACE\n ? \"verbose\"\n : this.config.logLevel.general === LogLevelLabel.DEBUG\n ? \"default\"\n : \"silent\"\n },\n fileHeader: \"powerlines/file-header\"\n })\n };\n },\n async configResolved() {\n this.styleDictionary =\n this.config.styleDictionary.instance ??\n new StyleDictionary(this.config.styleDictionary);\n\n this.styleDictionary.registerFileHeader(fileHeader(this));\n\n if (this.config.styleDictionary.customActions) {\n let builder!: CustomActionsBuilder;\n if (isFunction(this.config.styleDictionary.customActions)) {\n builder = this.config.styleDictionary.customActions;\n } else {\n builder = await resolve<CustomActionsBuilder>(\n this,\n this.config.styleDictionary.customActions\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, action]) => {\n this.styleDictionary.registerAction({\n ...action,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFileHeaders) {\n let builder!: CustomFileHeadersBuilder;\n if (isFunction(this.config.styleDictionary.customFileHeaders)) {\n builder = this.config.styleDictionary.customFileHeaders;\n } else {\n builder = await resolve<CustomFileHeadersBuilder>(\n this,\n this.config.styleDictionary.customFileHeaders\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, fileHeader]) => {\n this.styleDictionary.registerFileHeader({\n name,\n fileHeader\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFilters) {\n let builder!: CustomFiltersBuilder;\n if (isFunction(this.config.styleDictionary.customFilters)) {\n builder = this.config.styleDictionary.customFilters;\n } else {\n builder = await resolve<CustomFiltersBuilder>(\n this,\n this.config.styleDictionary.customFilters\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, filter]) => {\n this.styleDictionary.registerFilter({\n ...filter,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customPreprocessors) {\n let builder!: CustomPreprocessorsBuilder;\n if (isFunction(this.config.styleDictionary.customPreprocessors)) {\n builder = this.config.styleDictionary.customPreprocessors;\n } else {\n builder = await resolve<CustomPreprocessorsBuilder>(\n this,\n this.config.styleDictionary.customPreprocessors\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, preprocessor]) => {\n this.styleDictionary.registerPreprocessor({\n ...preprocessor,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customParsers) {\n let builder!: CustomParsersBuilder;\n if (isFunction(this.config.styleDictionary.customParsers)) {\n builder = this.config.styleDictionary.customParsers;\n } else {\n builder = await resolve<CustomParsersBuilder>(\n this,\n this.config.styleDictionary.customParsers\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, parser]) => {\n this.styleDictionary.registerParser({\n ...parser,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransforms) {\n let builder!: CustomTransformsBuilder;\n if (isFunction(this.config.styleDictionary.customTransforms)) {\n builder = this.config.styleDictionary.customTransforms;\n } else {\n builder = await resolve<CustomTransformsBuilder>(\n this,\n this.config.styleDictionary.customTransforms\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transform]) => {\n this.styleDictionary.registerTransform({\n ...transform,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransformGroups) {\n let builder!: CustomTransformGroupsBuilder;\n if (isFunction(this.config.styleDictionary.customTransformGroups)) {\n builder = this.config.styleDictionary.customTransformGroups;\n } else {\n builder = await resolve<CustomTransformGroupsBuilder>(\n this,\n this.config.styleDictionary.customTransformGroups\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transformGroup]) => {\n this.styleDictionary.registerTransformGroup({\n name,\n transforms: transformGroup\n });\n }\n );\n }\n },\n async clean() {\n await this.styleDictionary.cleanAllPlatforms({\n cache: !this.config.skipCache\n });\n },\n prepare: {\n order: \"pre\",\n async handler() {\n if (!this.config.styleDictionary.skipBuild) {\n await this.styleDictionary.buildAllPlatforms({\n cache: !this.config.skipCache\n });\n }\n }\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AAmDA,MAAa,UAGX,UAAwC,CAAC,MACpB;CACrB,OAAO;EACL,MAAM;EACN,SAAS;GACP,OAAO,EACL,iBAAiB,KAAK,SAAS;IAC7B,KAAK,EACH,WACE,KAAK,OAAO,SAAS,YAAY,cAAc,QAC3C,YACA,KAAK,OAAO,SAAS,YAAY,cAAc,QAC7C,YACA,SACV;IACA,YAAY;GACd,CAAC,EACH;EACF;EACA,MAAM,iBAAiB;GACrB,KAAK,kBACH,KAAK,OAAO,gBAAgB,YAC5B,IAAI,gBAAgB,KAAK,OAAO,eAAe;GAEjD,KAA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MAC1C;MACA,YAAY;KACd,CAAC;IACH,CACF;GACF;EACF;EACA,MAAM,QAAQ;GACZ,MAAM,KAAK,gBAAgB,kBAAkB,EAC3C,OAAO,CAAC,KAAK,OAAO,UACtB,CAAC;EACH;EACA,SAAS;GACP,OAAO;GACP,MAAM,UAAU;IACd,IAAI,CAAC,KAAK,OAAO,gBAAgB,WAC/B,MAAM,KAAK,gBAAgB,kBAAkB,EAC3C,OAAO,CAAC,KAAK,OAAO,UACtB,CAAC;GAEL;EACF;CACF;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolve } from \"@powerlines/schema\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport StyleDictionary from \"style-dictionary\";\nimport { fileHeader } from \"./style-dictionary/file-header\";\nimport {\n CustomActionsBuilder,\n CustomFileHeadersBuilder,\n CustomFiltersBuilder,\n CustomParsersBuilder,\n CustomPreprocessorsBuilder,\n CustomTransformGroupsBuilder,\n CustomTransformsBuilder,\n StyleDictionaryPluginContext,\n StyleDictionaryPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n styleDictionary?: StyleDictionaryPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate style-dictionary for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext\n>(\n options: StyleDictionaryPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"style-dictionary\",\n config() {\n return {\n styleDictionary: defu(options, {\n log: {\n verbosity:\n this.config.logLevel.general === LogLevelLabel.TRACE\n ? \"verbose\"\n : this.config.logLevel.general === LogLevelLabel.DEBUG\n ? \"default\"\n : \"silent\"\n },\n fileHeader: \"powerlines/file-header\"\n })\n };\n },\n async configResolved() {\n this.styleDictionary =\n this.config.styleDictionary.instance ??\n new StyleDictionary(this.config.styleDictionary);\n\n this.styleDictionary.registerFileHeader(fileHeader(this));\n\n if (this.config.styleDictionary.customActions) {\n let builder!: CustomActionsBuilder;\n if (isFunction(this.config.styleDictionary.customActions)) {\n builder = this.config.styleDictionary.customActions;\n } else {\n builder = await resolve<CustomActionsBuilder>(\n this,\n this.config.styleDictionary.customActions\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, action]) => {\n this.styleDictionary.registerAction({\n ...action,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFileHeaders) {\n let builder!: CustomFileHeadersBuilder;\n if (isFunction(this.config.styleDictionary.customFileHeaders)) {\n builder = this.config.styleDictionary.customFileHeaders;\n } else {\n builder = await resolve<CustomFileHeadersBuilder>(\n this,\n this.config.styleDictionary.customFileHeaders\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, fileHeader]) => {\n this.styleDictionary.registerFileHeader({\n name,\n fileHeader\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customFilters) {\n let builder!: CustomFiltersBuilder;\n if (isFunction(this.config.styleDictionary.customFilters)) {\n builder = this.config.styleDictionary.customFilters;\n } else {\n builder = await resolve<CustomFiltersBuilder>(\n this,\n this.config.styleDictionary.customFilters\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, filter]) => {\n this.styleDictionary.registerFilter({\n ...filter,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customPreprocessors) {\n let builder!: CustomPreprocessorsBuilder;\n if (isFunction(this.config.styleDictionary.customPreprocessors)) {\n builder = this.config.styleDictionary.customPreprocessors;\n } else {\n builder = await resolve<CustomPreprocessorsBuilder>(\n this,\n this.config.styleDictionary.customPreprocessors\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, preprocessor]) => {\n this.styleDictionary.registerPreprocessor({\n ...preprocessor,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customParsers) {\n let builder!: CustomParsersBuilder;\n if (isFunction(this.config.styleDictionary.customParsers)) {\n builder = this.config.styleDictionary.customParsers;\n } else {\n builder = await resolve<CustomParsersBuilder>(\n this,\n this.config.styleDictionary.customParsers\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, parser]) => {\n this.styleDictionary.registerParser({\n ...parser,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransforms) {\n let builder!: CustomTransformsBuilder;\n if (isFunction(this.config.styleDictionary.customTransforms)) {\n builder = this.config.styleDictionary.customTransforms;\n } else {\n builder = await resolve<CustomTransformsBuilder>(\n this,\n this.config.styleDictionary.customTransforms\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transform]) => {\n this.styleDictionary.registerTransform({\n ...transform,\n name\n });\n }\n );\n }\n\n if (this.config.styleDictionary.customTransformGroups) {\n let builder!: CustomTransformGroupsBuilder;\n if (isFunction(this.config.styleDictionary.customTransformGroups)) {\n builder = this.config.styleDictionary.customTransformGroups;\n } else {\n builder = await resolve<CustomTransformGroupsBuilder>(\n this,\n this.config.styleDictionary.customTransformGroups\n );\n }\n\n Object.entries(isFunction(builder) ? builder(this) : builder).forEach(\n ([name, transformGroup]) => {\n this.styleDictionary.registerTransformGroup({\n name,\n transforms: transformGroup\n });\n }\n );\n }\n },\n async clean() {\n await this.styleDictionary.cleanAllPlatforms({\n cache: !this.config.skipCache\n });\n },\n prepare: {\n order: \"pre\",\n async handler() {\n if (!this.config.styleDictionary.skipBuild) {\n await this.styleDictionary.buildAllPlatforms({\n cache: !this.config.skipCache\n });\n }\n }\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AAmDA,MAAa,UAGX,UAAwC,CAAC,MACpB;CACrB,OAAO;EACL,MAAM;EACN,SAAS;GACP,OAAO,EACL,iBAAiB,KAAK,SAAS;IAC7B,KAAK,EACH,WACE,KAAK,OAAO,SAAS,YAAY,cAAc,QAC3C,YACA,KAAK,OAAO,SAAS,YAAY,cAAc,QAC7C,YACA,SACV;IACA,YAAY;GACd,CAAC,EACH;EACF;EACA,MAAM,iBAAiB;GACrB,KAAK,kBACH,KAAK,OAAO,gBAAgB,YAC5B,IAAI,gBAAgB,KAAK,OAAO,eAAe;GAEjD,KAAK,gBAAgB,mBAAmB,WAAW,IAAI,CAAC;GAExD,IAAI,KAAK,OAAO,gBAAgB,eAAe;IAC7C,IAAI;IACJ,IAAI,WAAW,KAAK,OAAO,gBAAgB,aAAa,GACtD,UAAU,KAAK,OAAO,gBAAgB;SAEtC,UAAU,MAAM,QACd,MACA,KAAK,OAAO,gBAAgB,aAC9B;IAGF,OAAO,QAAQ,WAAW,OAAO,IAAI,QAAQ,IAAI,IAAI,OAAO,EAAE,SAC3D,CAAC,MAAM,YAAY;KAClB,KAAK,gBAAgB,eAAe;MAClC,GAAG;MACH;KACF,CAAC;IACH,CACF;GACF;GAEA,IAAI,KAAK,OAAO,gBAAgB,mBAAmB;IACjD,IAAI;IACJ,IAAI,WAAW,KAAK,OAAO,gBAAgB,iBAAiB,GAC1D,UAAU,KAAK,OAAO,gBAAgB;SAEtC,UAAU,MAAM,QACd,MACA,KAAK,OAAO,gBAAgB,iBAC9B;IAGF,OAAO,QAAQ,WAAW,OAAO,IAAI,QAAQ,IAAI,IAAI,OAAO,EAAE,SAC3D,CAAC,MAAM,gBAAgB;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AAK,OAAO,gBAAgB;SAEtC,UAAU,MAAM,QACd,MACA,KAAK,OAAO,gBAAgB,gBAC9B;IAGF,OAAO,QAAQ,WAAW,OAAO,IAAI,QAAQ,IAAI,IAAI,OAAO,EAAE,SAC3D,CAAC,MAAM,eAAe;KACrB,KAAK,gBAAgB,kBAAkB;MACrC,GAAG;MACH;KACF,CAAC;IACH,CACF;GACF;GAEA,IAAI,KAAK,OAAO,gBAAgB,uBAAuB;IACrD,IAAI;IACJ,IAAI,WAAW,KAAK,OAAO,gBAAgB,qBAAqB,GAC9D,UAAU,KAAK,OAAO,gBAAgB;SAEtC,UAAU,MAAM,QACd,MACA,KAAK,OAAO,gBAAgB,qBAC9B;IAGF,OAAO,QAAQ,WAAW,OAAO,IAAI,QAAQ,IAAI,IAAI,OAAO,EAAE,SAC3D,CAAC,MAAM,oBAAoB;KAC1B,KAAK,gBAAgB,uBAAuB;MAC1C;MACA,YAAY;KACd,CAAC;IACH,CACF;GACF;EACF;EACA,MAAM,QAAQ;GACZ,MAAM,KAAK,gBAAgB,kBAAkB,EAC3C,OAAO,CAAC,KAAK,OAAO,UACtB,CAAC;EACH;EACA,SAAS;GACP,OAAO;GACP,MAAM,UAAU;IACd,IAAI,CAAC,KAAK,OAAO,gBAAgB,WAC/B,MAAM,KAAK,gBAAgB,kBAAkB,EAC3C,OAAO,CAAC,KAAK,OAAO,UACtB,CAAC;GAEL;EACF;CACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-style-dictionary",
3
- "version": "0.3.425",
3
+ "version": "0.3.426",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to generate project code with Style Dictionary.",
6
6
  "keywords": [
@@ -62,19 +62,19 @@
62
62
  "typings": "dist/index.d.mts",
63
63
  "files": ["dist"],
64
64
  "dependencies": {
65
- "@powerlines/schema": "^0.11.41",
65
+ "@powerlines/schema": "0.11.42",
66
66
  "@storm-software/config-tools": "^1.190.27",
67
67
  "@stryke/string-format": "^0.17.18",
68
68
  "@stryke/type-checks": "^0.6.9",
69
69
  "@stryke/types": "^0.12.4",
70
70
  "defu": "^6.1.7",
71
- "powerlines": "^0.47.60",
71
+ "powerlines": "0.47.61",
72
72
  "style-dictionary": "^5.4.1"
73
73
  },
74
74
  "devDependencies": {
75
- "@powerlines/plugin-plugin": "^0.12.472",
75
+ "@powerlines/plugin-plugin": "0.12.473",
76
76
  "@types/node": "^25.9.1"
77
77
  },
78
78
  "publishConfig": { "access": "public" },
79
- "gitHead": "3b2fa8b99824b2931e215e3794ea4365b928034d"
79
+ "gitHead": "6ca3515304ea3e458094bd7650a9bfbe0681a124"
80
80
  }