@powerlines/plugin-style-dictionary 0.3.357 → 0.3.359

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.
@@ -1 +1,29 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
package/dist/index.cjs CHANGED
@@ -1 +1,123 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./_virtual/_rolldown/runtime.cjs`),t=require(`./style-dictionary/file-header.cjs`);let n=require(`@powerlines/plugin-esbuild/helpers/resolve`),r=require(`@storm-software/config-tools/types`),i=require(`@stryke/type-checks/is-function`),a=require(`defu`);a=e.__toESM(a,1);let o=require(`style-dictionary`);o=e.__toESM(o,1);const s=(e={})=>({name:`style-dictionary`,config(){return{styleDictionary:(0,a.default)(e,{log:{verbosity:this.config.logLevel===r.LogLevelLabel.TRACE?`verbose`:this.config.logLevel===r.LogLevelLabel.DEBUG?`default`:`silent`},fileHeader:`powerlines/file-header`})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new o.default(this.config.styleDictionary),this.styleDictionary.registerFileHeader(t.fileHeader(this)),this.config.styleDictionary.customActions){let e;e=(0,i.isFunction)(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await(0,n.resolve)(this,this.config.styleDictionary.customActions),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let e;e=(0,i.isFunction)(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await(0,n.resolve)(this,this.config.styleDictionary.customFileHeaders),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let e;e=(0,i.isFunction)(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await(0,n.resolve)(this,this.config.styleDictionary.customFilters),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let e;e=(0,i.isFunction)(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await(0,n.resolve)(this,this.config.styleDictionary.customPreprocessors),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let e;e=(0,i.isFunction)(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await(0,n.resolve)(this,this.config.styleDictionary.customParsers),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let e;e=(0,i.isFunction)(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await(0,n.resolve)(this,this.config.styleDictionary.customTransforms),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let e;e=(0,i.isFunction)(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await(0,n.resolve)(this,this.config.styleDictionary.customTransformGroups),Object.entries((0,i.isFunction)(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async clean(){await this.styleDictionary.cleanAllPlatforms({cache:!this.config.skipCache})},prepare:{order:`pre`,async handler(){this.config.styleDictionary.skipBuild||await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}}});exports.default=s,exports.plugin=s;
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ const require_file_header = require('./style-dictionary/file-header.cjs');
4
+ let _powerlines_plugin_esbuild_helpers_resolve = require("@powerlines/plugin-esbuild/helpers/resolve");
5
+ let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
6
+ let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
7
+ let defu = require("defu");
8
+ defu = require_runtime.__toESM(defu, 1);
9
+ let style_dictionary = require("style-dictionary");
10
+ style_dictionary = require_runtime.__toESM(style_dictionary, 1);
11
+
12
+ //#region src/index.ts
13
+ /**
14
+ * A Powerlines plugin to integrate style-dictionary for code generation.
15
+ *
16
+ * @param options - The plugin options.
17
+ * @returns A Powerlines plugin instance.
18
+ */
19
+ const plugin = (options = {}) => {
20
+ return {
21
+ name: "style-dictionary",
22
+ config() {
23
+ return { styleDictionary: (0, defu.default)(options, {
24
+ log: { verbosity: this.config.logLevel === _storm_software_config_tools_types.LogLevelLabel.TRACE ? "verbose" : this.config.logLevel === _storm_software_config_tools_types.LogLevelLabel.DEBUG ? "default" : "silent" },
25
+ fileHeader: "powerlines/file-header"
26
+ }) };
27
+ },
28
+ async configResolved() {
29
+ this.styleDictionary = this.config.styleDictionary.instance ?? new style_dictionary.default(this.config.styleDictionary);
30
+ this.styleDictionary.registerFileHeader(require_file_header.fileHeader(this));
31
+ if (this.config.styleDictionary.customActions) {
32
+ let builder;
33
+ if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customActions)) builder = this.config.styleDictionary.customActions;
34
+ else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customActions);
35
+ Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, action]) => {
36
+ this.styleDictionary.registerAction({
37
+ ...action,
38
+ name
39
+ });
40
+ });
41
+ }
42
+ if (this.config.styleDictionary.customFileHeaders) {
43
+ let builder;
44
+ if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customFileHeaders)) builder = this.config.styleDictionary.customFileHeaders;
45
+ else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customFileHeaders);
46
+ Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, fileHeader]) => {
47
+ this.styleDictionary.registerFileHeader({
48
+ name,
49
+ fileHeader
50
+ });
51
+ });
52
+ }
53
+ if (this.config.styleDictionary.customFilters) {
54
+ let builder;
55
+ if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customFilters)) builder = this.config.styleDictionary.customFilters;
56
+ else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customFilters);
57
+ Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, filter]) => {
58
+ this.styleDictionary.registerFilter({
59
+ ...filter,
60
+ name
61
+ });
62
+ });
63
+ }
64
+ if (this.config.styleDictionary.customPreprocessors) {
65
+ let builder;
66
+ if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customPreprocessors)) builder = this.config.styleDictionary.customPreprocessors;
67
+ else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customPreprocessors);
68
+ Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, preprocessor]) => {
69
+ this.styleDictionary.registerPreprocessor({
70
+ ...preprocessor,
71
+ name
72
+ });
73
+ });
74
+ }
75
+ if (this.config.styleDictionary.customParsers) {
76
+ let builder;
77
+ if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customParsers)) builder = this.config.styleDictionary.customParsers;
78
+ else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customParsers);
79
+ Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, parser]) => {
80
+ this.styleDictionary.registerParser({
81
+ ...parser,
82
+ name
83
+ });
84
+ });
85
+ }
86
+ if (this.config.styleDictionary.customTransforms) {
87
+ let builder;
88
+ if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customTransforms)) builder = this.config.styleDictionary.customTransforms;
89
+ else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customTransforms);
90
+ Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, transform]) => {
91
+ this.styleDictionary.registerTransform({
92
+ ...transform,
93
+ name
94
+ });
95
+ });
96
+ }
97
+ if (this.config.styleDictionary.customTransformGroups) {
98
+ let builder;
99
+ if ((0, _stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customTransformGroups)) builder = this.config.styleDictionary.customTransformGroups;
100
+ else builder = await (0, _powerlines_plugin_esbuild_helpers_resolve.resolve)(this, this.config.styleDictionary.customTransformGroups);
101
+ Object.entries((0, _stryke_type_checks_is_function.isFunction)(builder) ? builder(this) : builder).forEach(([name, transformGroup]) => {
102
+ this.styleDictionary.registerTransformGroup({
103
+ name,
104
+ transforms: transformGroup
105
+ });
106
+ });
107
+ }
108
+ },
109
+ async clean() {
110
+ await this.styleDictionary.cleanAllPlatforms({ cache: !this.config.skipCache });
111
+ },
112
+ prepare: {
113
+ order: "pre",
114
+ async handler() {
115
+ if (!this.config.styleDictionary.skipBuild) await this.styleDictionary.buildAllPlatforms({ cache: !this.config.skipCache });
116
+ }
117
+ }
118
+ };
119
+ };
120
+
121
+ //#endregion
122
+ exports.default = plugin;
123
+ exports.plugin = plugin;
package/dist/index.mjs CHANGED
@@ -1,2 +1,119 @@
1
- import{fileHeader as e}from"./style-dictionary/file-header.mjs";import{resolve as t}from"@powerlines/plugin-esbuild/helpers/resolve";import{LogLevelLabel as n}from"@storm-software/config-tools/types";import{isFunction as r}from"@stryke/type-checks/is-function";import i from"defu";import a from"style-dictionary";const o=(o={})=>({name:`style-dictionary`,config(){return{styleDictionary:i(o,{log:{verbosity:this.config.logLevel===n.TRACE?`verbose`:this.config.logLevel===n.DEBUG?`default`:`silent`},fileHeader:`powerlines/file-header`})}},async configResolved(){if(this.styleDictionary=this.config.styleDictionary.instance??new a(this.config.styleDictionary),this.styleDictionary.registerFileHeader(e(this)),this.config.styleDictionary.customActions){let e;e=r(this.config.styleDictionary.customActions)?this.config.styleDictionary.customActions:await t(this,this.config.styleDictionary.customActions),Object.entries(r(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerAction({...t,name:e})})}if(this.config.styleDictionary.customFileHeaders){let e;e=r(this.config.styleDictionary.customFileHeaders)?this.config.styleDictionary.customFileHeaders:await t(this,this.config.styleDictionary.customFileHeaders),Object.entries(r(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFileHeader({name:e,fileHeader:t})})}if(this.config.styleDictionary.customFilters){let e;e=r(this.config.styleDictionary.customFilters)?this.config.styleDictionary.customFilters:await t(this,this.config.styleDictionary.customFilters),Object.entries(r(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerFilter({...t,name:e})})}if(this.config.styleDictionary.customPreprocessors){let e;e=r(this.config.styleDictionary.customPreprocessors)?this.config.styleDictionary.customPreprocessors:await t(this,this.config.styleDictionary.customPreprocessors),Object.entries(r(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerPreprocessor({...t,name:e})})}if(this.config.styleDictionary.customParsers){let e;e=r(this.config.styleDictionary.customParsers)?this.config.styleDictionary.customParsers:await t(this,this.config.styleDictionary.customParsers),Object.entries(r(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerParser({...t,name:e})})}if(this.config.styleDictionary.customTransforms){let e;e=r(this.config.styleDictionary.customTransforms)?this.config.styleDictionary.customTransforms:await t(this,this.config.styleDictionary.customTransforms),Object.entries(r(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransform({...t,name:e})})}if(this.config.styleDictionary.customTransformGroups){let e;e=r(this.config.styleDictionary.customTransformGroups)?this.config.styleDictionary.customTransformGroups:await t(this,this.config.styleDictionary.customTransformGroups),Object.entries(r(e)?e(this):e).forEach(([e,t])=>{this.styleDictionary.registerTransformGroup({name:e,transforms:t})})}},async clean(){await this.styleDictionary.cleanAllPlatforms({cache:!this.config.skipCache})},prepare:{order:`pre`,async handler(){this.config.styleDictionary.skipBuild||await this.styleDictionary.buildAllPlatforms({cache:!this.config.skipCache})}}});export{o as default,o as plugin};
1
+ import { fileHeader } from "./style-dictionary/file-header.mjs";
2
+ import { resolve } from "@powerlines/plugin-esbuild/helpers/resolve";
3
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
4
+ import { isFunction } from "@stryke/type-checks/is-function";
5
+ import defu from "defu";
6
+ import StyleDictionary from "style-dictionary";
7
+
8
+ //#region src/index.ts
9
+ /**
10
+ * A Powerlines plugin to integrate style-dictionary for code generation.
11
+ *
12
+ * @param options - The plugin options.
13
+ * @returns A Powerlines plugin instance.
14
+ */
15
+ const plugin = (options = {}) => {
16
+ return {
17
+ name: "style-dictionary",
18
+ config() {
19
+ return { styleDictionary: defu(options, {
20
+ log: { verbosity: this.config.logLevel === LogLevelLabel.TRACE ? "verbose" : this.config.logLevel === LogLevelLabel.DEBUG ? "default" : "silent" },
21
+ fileHeader: "powerlines/file-header"
22
+ }) };
23
+ },
24
+ async configResolved() {
25
+ this.styleDictionary = this.config.styleDictionary.instance ?? new StyleDictionary(this.config.styleDictionary);
26
+ this.styleDictionary.registerFileHeader(fileHeader(this));
27
+ if (this.config.styleDictionary.customActions) {
28
+ let builder;
29
+ if (isFunction(this.config.styleDictionary.customActions)) builder = this.config.styleDictionary.customActions;
30
+ else builder = await resolve(this, this.config.styleDictionary.customActions);
31
+ Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, action]) => {
32
+ this.styleDictionary.registerAction({
33
+ ...action,
34
+ name
35
+ });
36
+ });
37
+ }
38
+ if (this.config.styleDictionary.customFileHeaders) {
39
+ let builder;
40
+ if (isFunction(this.config.styleDictionary.customFileHeaders)) builder = this.config.styleDictionary.customFileHeaders;
41
+ else builder = await resolve(this, this.config.styleDictionary.customFileHeaders);
42
+ Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, fileHeader]) => {
43
+ this.styleDictionary.registerFileHeader({
44
+ name,
45
+ fileHeader
46
+ });
47
+ });
48
+ }
49
+ if (this.config.styleDictionary.customFilters) {
50
+ let builder;
51
+ if (isFunction(this.config.styleDictionary.customFilters)) builder = this.config.styleDictionary.customFilters;
52
+ else builder = await resolve(this, this.config.styleDictionary.customFilters);
53
+ Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, filter]) => {
54
+ this.styleDictionary.registerFilter({
55
+ ...filter,
56
+ name
57
+ });
58
+ });
59
+ }
60
+ if (this.config.styleDictionary.customPreprocessors) {
61
+ let builder;
62
+ if (isFunction(this.config.styleDictionary.customPreprocessors)) builder = this.config.styleDictionary.customPreprocessors;
63
+ else builder = await resolve(this, this.config.styleDictionary.customPreprocessors);
64
+ Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, preprocessor]) => {
65
+ this.styleDictionary.registerPreprocessor({
66
+ ...preprocessor,
67
+ name
68
+ });
69
+ });
70
+ }
71
+ if (this.config.styleDictionary.customParsers) {
72
+ let builder;
73
+ if (isFunction(this.config.styleDictionary.customParsers)) builder = this.config.styleDictionary.customParsers;
74
+ else builder = await resolve(this, this.config.styleDictionary.customParsers);
75
+ Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, parser]) => {
76
+ this.styleDictionary.registerParser({
77
+ ...parser,
78
+ name
79
+ });
80
+ });
81
+ }
82
+ if (this.config.styleDictionary.customTransforms) {
83
+ let builder;
84
+ if (isFunction(this.config.styleDictionary.customTransforms)) builder = this.config.styleDictionary.customTransforms;
85
+ else builder = await resolve(this, this.config.styleDictionary.customTransforms);
86
+ Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, transform]) => {
87
+ this.styleDictionary.registerTransform({
88
+ ...transform,
89
+ name
90
+ });
91
+ });
92
+ }
93
+ if (this.config.styleDictionary.customTransformGroups) {
94
+ let builder;
95
+ if (isFunction(this.config.styleDictionary.customTransformGroups)) builder = this.config.styleDictionary.customTransformGroups;
96
+ else builder = await resolve(this, this.config.styleDictionary.customTransformGroups);
97
+ Object.entries(isFunction(builder) ? builder(this) : builder).forEach(([name, transformGroup]) => {
98
+ this.styleDictionary.registerTransformGroup({
99
+ name,
100
+ transforms: transformGroup
101
+ });
102
+ });
103
+ }
104
+ },
105
+ async clean() {
106
+ await this.styleDictionary.cleanAllPlatforms({ cache: !this.config.skipCache });
107
+ },
108
+ prepare: {
109
+ order: "pre",
110
+ async handler() {
111
+ if (!this.config.styleDictionary.skipBuild) await this.styleDictionary.buildAllPlatforms({ cache: !this.config.skipCache });
112
+ }
113
+ }
114
+ };
115
+ };
116
+
117
+ //#endregion
118
+ export { plugin as default, plugin };
2
119
  //# sourceMappingURL=index.mjs.map
@@ -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/plugin-esbuild/helpers/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 === LogLevelLabel.TRACE\n ? \"verbose\"\n : this.config.logLevel === 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":"yTAmDA,MAAa,GAGX,EAAwC,EAAE,IAEnC,CACL,KAAM,mBACN,QAAS,CACP,MAAO,CACL,gBAAiB,EAAK,EAAS,CAC7B,IAAK,CACH,UACE,KAAK,OAAO,WAAa,EAAc,MACnC,UACA,KAAK,OAAO,WAAa,EAAc,MACrC,UACA,SACT,CACD,WAAY,yBACb,CAAC,CACH,EAEH,MAAM,gBAAiB,CAOrB,GANA,KAAK,gBACH,KAAK,OAAO,gBAAgB,UAC5B,IAAI,EAAgB,KAAK,OAAO,gBAAgB,CAElD,KAAK,gBAAgB,mBAAmB,EAAW,KAAK,CAAC,CAErD,KAAK,OAAO,gBAAgB,cAAe,CAC7C,IAAI,EACJ,AAGE,EAHE,EAAW,KAAK,OAAO,gBAAgB,cAAc,CAC7C,KAAK,OAAO,gBAAgB,cAE5B,MAAM,EACd,KACA,KAAK,OAAO,gBAAgB,cAC7B,CAGH,OAAO,QAAQ,EAAW,EAAQ,CAAG,EAAQ,KAAK,CAAG,EAAQ,CAAC,SAC3D,CAAC,EAAM,KAAY,CAClB,KAAK,gBAAgB,eAAe,CAClC,GAAG,EACH,OACD,CAAC,EAEL,CAGH,GAAI,KAAK,OAAO,gBAAgB,kBAAmB,CACjD,IAAI,EACJ,AAGE,EAHE,EAAW,KAAK,OAAO,gBAAgB,kBAAkB,CACjD,KAAK,OAAO,gBAAgB,kBAE5B,MAAM,EACd,KACA,KAAK,OAAO,gBAAgB,kBAC7B,CAGH,OAAO,QAAQ,EAAW,EAAQ,CAAG,EAAQ,KAAK,CAAG,EAAQ,CAAC,SAC3D,CAAC,EAAM,KAAgB,CACtB,KAAK,gBAAgB,mBAAmB,CACtC,OACA,aACD,CAAC,EAEL,CAGH,GAAI,KAAK,OAAO,gBAAgB,cAAe,CAC7C,IAAI,EACJ,AA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M,KAAe,CACrB,KAAK,gBAAgB,kBAAkB,CACrC,GAAG,EACH,OACD,CAAC,EAEL,CAGH,GAAI,KAAK,OAAO,gBAAgB,sBAAuB,CACrD,IAAI,EACJ,AAGE,EAHE,EAAW,KAAK,OAAO,gBAAgB,sBAAsB,CACrD,KAAK,OAAO,gBAAgB,sBAE5B,MAAM,EACd,KACA,KAAK,OAAO,gBAAgB,sBAC7B,CAGH,OAAO,QAAQ,EAAW,EAAQ,CAAG,EAAQ,KAAK,CAAG,EAAQ,CAAC,SAC3D,CAAC,EAAM,KAAoB,CAC1B,KAAK,gBAAgB,uBAAuB,CAC1C,OACA,WAAY,EACb,CAAC,EAEL,GAGL,MAAM,OAAQ,CACZ,MAAM,KAAK,gBAAgB,kBAAkB,CAC3C,MAAO,CAAC,KAAK,OAAO,UACrB,CAAC,EAEJ,QAAS,CACP,MAAO,MACP,MAAM,SAAU,CACT,KAAK,OAAO,gBAAgB,WAC/B,MAAM,KAAK,gBAAgB,kBAAkB,CAC3C,MAAO,CAAC,KAAK,OAAO,UACrB,CAAC,EAGP,CACF"}
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/plugin-esbuild/helpers/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 === LogLevelLabel.TRACE\n ? \"verbose\"\n : this.config.logLevel === 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,EAAE,KACrB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,iBAAiB,KAAK,SAAS;IAC7B,KAAK,EACH,WACE,KAAK,OAAO,aAAa,cAAc,QACnC,YACA,KAAK,OAAO,aAAa,cAAc,QACrC,YACA,UACT;IACD,YAAY;IACb,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,QAAK,kBACH,KAAK,OAAO,gBAAgB,YAC5B,IAAI,gBAAgB,KAAK,OAAO,gBAAgB;AAElD,QAAK,gBAAgB,mBAAmB,WAAW,KAAK,CAAC;AAEzD,OAAI,KAAK,OAAO,gBAAgB,eAAe;IAC7C,IAAI;AACJ,QAAI,WAAW,KAAK,OAAO,gBAAgB,cAAc,CACvD,WAAU,KAAK,OAAO,gBAAgB;QAEtC,WAAU,MAAM,QACd,MACA,KAAK,OAAO,gBAAgB,cAC7B;AAGH,WAAO,QAAQ,WAAW,QAAQ,GAAG,QAAQ,KAAK,GAAG,QAAQ,CAAC,SAC3D,CAAC,MAAM,YAAY;AAClB,UA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fileHeader:(t=[])=>[`Generated by ${e.config.framework||`Powerlines`}`,`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`,...t]});exports.fileHeader=e;
1
+
2
+ //#region src/style-dictionary/file-header.ts
3
+ const fileHeader = (context) => ({
4
+ name: "powerlines/file-header",
5
+ fileHeader: (defaultMessages = []) => {
6
+ return [
7
+ `Generated by ${context.config.framework || "Powerlines"}`,
8
+ "NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command",
9
+ ...defaultMessages
10
+ ];
11
+ }
12
+ });
13
+
14
+ //#endregion
15
+ exports.fileHeader = fileHeader;
@@ -1,2 +1,15 @@
1
- const e=e=>({name:`powerlines/file-header`,fileHeader:(t=[])=>[`Generated by ${e.config.framework||`Powerlines`}`,`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`,...t]});export{e as fileHeader};
1
+ //#region src/style-dictionary/file-header.ts
2
+ const fileHeader = (context) => ({
3
+ name: "powerlines/file-header",
4
+ fileHeader: (defaultMessages = []) => {
5
+ return [
6
+ `Generated by ${context.config.framework || "Powerlines"}`,
7
+ "NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command",
8
+ ...defaultMessages
9
+ ];
10
+ }
11
+ });
12
+
13
+ //#endregion
14
+ export { fileHeader };
2
15
  //# sourceMappingURL=file-header.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-header.mjs","names":[],"sources":["../../src/style-dictionary/file-header.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 type { Context } from \"powerlines\";\nimport type { FileHeader } from \"style-dictionary/types\";\n\nexport const fileHeader = (\n context: Context\n): { name: string; fileHeader: FileHeader } => ({\n name: \"powerlines/file-header\",\n fileHeader: (defaultMessages = [] as string[]) => {\n return [\n `Generated by ${context.config.framework || \"Powerlines\"}`,\n 'NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command',\n ...defaultMessages\n ];\n }\n});\n"],"mappings":"AAqBA,MAAa,EACX,IAC8C,CAC9C,KAAM,yBACN,YAAa,EAAkB,EAAE,GACxB,CACL,gBAAgB,EAAQ,OAAO,WAAa,eAC5C,uGACA,GAAG,EACJ,CAEJ"}
1
+ {"version":3,"file":"file-header.mjs","names":[],"sources":["../../src/style-dictionary/file-header.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 type { Context } from \"powerlines\";\nimport type { FileHeader } from \"style-dictionary/types\";\n\nexport const fileHeader = (\n context: Context\n): { name: string; fileHeader: FileHeader } => ({\n name: \"powerlines/file-header\",\n fileHeader: (defaultMessages = [] as string[]) => {\n return [\n `Generated by ${context.config.framework || \"Powerlines\"}`,\n 'NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command',\n ...defaultMessages\n ];\n }\n});\n"],"mappings":";AAqBA,MAAa,cACX,aAC8C;CAC9C,MAAM;CACN,aAAa,kBAAkB,EAAE,KAAiB;AAChD,SAAO;GACL,gBAAgB,QAAQ,OAAO,aAAa;GAC5C;GACA,GAAG;GACJ;;CAEJ"}
@@ -1 +1 @@
1
- export{};
1
+ export { };
@@ -1 +1 @@
1
- export{};
1
+ export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-style-dictionary",
3
- "version": "0.3.357",
3
+ "version": "0.3.359",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to generate project code with Style Dictionary.",
6
6
  "keywords": [
@@ -95,20 +95,20 @@
95
95
  "typings": "dist/index.d.mts",
96
96
  "files": ["dist/**/*"],
97
97
  "dependencies": {
98
- "@powerlines/plugin-esbuild": "^0.13.453",
98
+ "@powerlines/plugin-esbuild": "^0.13.455",
99
99
  "@storm-software/config-tools": "^1.190.1",
100
100
  "@stryke/path": "^0.28.2",
101
101
  "@stryke/type-checks": "^0.6.5",
102
102
  "@stryke/types": "^0.12.0",
103
103
  "defu": "^6.1.7",
104
104
  "jiti": "^2.6.1",
105
- "powerlines": "^0.46.3",
105
+ "powerlines": "^0.46.5",
106
106
  "style-dictionary": "^5.4.0"
107
107
  },
108
108
  "devDependencies": {
109
- "@powerlines/plugin-plugin": "^0.12.407",
109
+ "@powerlines/plugin-plugin": "^0.12.409",
110
110
  "@types/node": "^25.6.0"
111
111
  },
112
112
  "publishConfig": { "access": "public" },
113
- "gitHead": "9a51041e0817e438c49db05bb757b3bdbaf497ef"
113
+ "gitHead": "9af888c54e58a82744cc334a6b80da52429fa0ac"
114
114
  }