@powerlines/plugin-style-dictionary 0.3.139 → 0.3.140
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-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +60 -7
- package/dist/index.d.cts +4 -3
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +31 -3
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-C3MaN5jp.mjs +1 -0
- package/dist/plugin-COXACFbO.d.cts +119 -0
- package/dist/plugin-COXACFbO.d.cts.map +1 -0
- package/dist/plugin-CYveN_7t.d.mts +119 -0
- package/dist/plugin-CYveN_7t.d.mts.map +1 -0
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -117
- package/dist/types/plugin.d.mts +1 -117
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-CTUnla4x.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +4 -4
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/style-dictionary/file-header.cjs +0 -15
- package/dist/style-dictionary/file-header.mjs +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,67 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
//#region rolldown:runtime
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
require('./plugin-DHXHjv16.cjs');
|
|
30
|
+
require('./types-DHkg7xmX.cjs');
|
|
5
31
|
let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
6
32
|
let defu = require("defu");
|
|
7
|
-
defu =
|
|
33
|
+
defu = __toESM(defu);
|
|
8
34
|
let powerlines_lib_utilities_resolve = require("powerlines/lib/utilities/resolve");
|
|
9
35
|
let style_dictionary = require("style-dictionary");
|
|
10
|
-
style_dictionary =
|
|
36
|
+
style_dictionary = __toESM(style_dictionary);
|
|
11
37
|
|
|
38
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.0_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
|
|
39
|
+
var LogLevelLabel = {
|
|
40
|
+
SILENT: "silent",
|
|
41
|
+
FATAL: "fatal",
|
|
42
|
+
ERROR: "error",
|
|
43
|
+
WARN: "warn",
|
|
44
|
+
SUCCESS: "success",
|
|
45
|
+
INFO: "info",
|
|
46
|
+
DEBUG: "debug",
|
|
47
|
+
TRACE: "trace",
|
|
48
|
+
ALL: "all"
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/style-dictionary/file-header.ts
|
|
53
|
+
const fileHeader = (context) => ({
|
|
54
|
+
name: "powerlines/file-header",
|
|
55
|
+
fileHeader: (defaultMessages = []) => {
|
|
56
|
+
return [
|
|
57
|
+
`Generated by ${context.config.framework || "Powerlines"}`,
|
|
58
|
+
"NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command",
|
|
59
|
+
...defaultMessages
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
12
65
|
//#region src/index.ts
|
|
13
66
|
/**
|
|
14
67
|
* A Powerlines plugin to integrate style-dictionary for code generation.
|
|
@@ -21,13 +74,13 @@ const plugin = (options = {}) => {
|
|
|
21
74
|
name: "style-dictionary",
|
|
22
75
|
config() {
|
|
23
76
|
return { styleDictionary: (0, defu.default)(options, {
|
|
24
|
-
log: { verbosity: this.config.logLevel ===
|
|
77
|
+
log: { verbosity: this.config.logLevel === LogLevelLabel.TRACE ? "verbose" : this.config.logLevel === LogLevelLabel.DEBUG ? "default" : "silent" },
|
|
25
78
|
fileHeader: "powerlines/file-header"
|
|
26
79
|
}) };
|
|
27
80
|
},
|
|
28
81
|
async configResolved() {
|
|
29
82
|
this.styleDictionary = this.config.styleDictionary.instance ?? new style_dictionary.default(this.config.styleDictionary);
|
|
30
|
-
this.styleDictionary.registerFileHeader(
|
|
83
|
+
this.styleDictionary.registerFileHeader(fileHeader(this));
|
|
31
84
|
if (this.config.styleDictionary.customActions) {
|
|
32
85
|
let builder;
|
|
33
86
|
if ((0, __stryke_type_checks_is_function.isFunction)(this.config.styleDictionary.customActions)) builder = this.config.styleDictionary.customActions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "./plugin-COXACFbO.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
@@ -12,4 +12,5 @@ import { Plugin } from "powerlines/types/plugin";
|
|
|
12
12
|
*/
|
|
13
13
|
declare const plugin: <TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext>(options?: StyleDictionaryPluginOptions) => Plugin<TContext>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig, plugin as default, plugin };
|
|
16
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA8CA;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,4BAGT,GAHwC,4BAGxC,CAAA,CAAA,OAAA,CAAA,EADC,4BACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "./plugin-CYveN_7t.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
@@ -12,4 +12,5 @@ import { Plugin } from "powerlines/types/plugin";
|
|
|
12
12
|
*/
|
|
13
13
|
declare const plugin: <TContext extends StyleDictionaryPluginContext = StyleDictionaryPluginContext>(options?: StyleDictionaryPluginOptions) => Plugin<TContext>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig, plugin as default, plugin };
|
|
16
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA8CA;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,4BAGT,GAHwC,4BAGxC,CAAA,CAAA,OAAA,CAAA,EADC,4BACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "./plugin-C3MaN5jp.mjs";
|
|
2
|
+
import "./types-CTUnla4x.mjs";
|
|
3
3
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
4
4
|
import defu from "defu";
|
|
5
5
|
import { resolve } from "powerlines/lib/utilities/resolve";
|
|
6
6
|
import StyleDictionary from "style-dictionary";
|
|
7
7
|
|
|
8
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.189.0_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
|
|
9
|
+
var LogLevelLabel = {
|
|
10
|
+
SILENT: "silent",
|
|
11
|
+
FATAL: "fatal",
|
|
12
|
+
ERROR: "error",
|
|
13
|
+
WARN: "warn",
|
|
14
|
+
SUCCESS: "success",
|
|
15
|
+
INFO: "info",
|
|
16
|
+
DEBUG: "debug",
|
|
17
|
+
TRACE: "trace",
|
|
18
|
+
ALL: "all"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/style-dictionary/file-header.ts
|
|
23
|
+
const fileHeader = (context) => ({
|
|
24
|
+
name: "powerlines/file-header",
|
|
25
|
+
fileHeader: (defaultMessages = []) => {
|
|
26
|
+
return [
|
|
27
|
+
`Generated by ${context.config.framework || "Powerlines"}`,
|
|
28
|
+
"NOTE: Do not edit this file manually - it will be overwritten automatically by the \"prepare\" command",
|
|
29
|
+
...defaultMessages
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
8
35
|
//#region src/index.ts
|
|
9
36
|
/**
|
|
10
37
|
* A Powerlines plugin to integrate style-dictionary for code generation.
|
|
@@ -116,4 +143,5 @@ const plugin = (options = {}) => {
|
|
|
116
143
|
var src_default = plugin;
|
|
117
144
|
|
|
118
145
|
//#endregion
|
|
119
|
-
export { src_default as default, plugin };
|
|
146
|
+
export { src_default as default, plugin };
|
|
147
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["builder!: CustomActionsBuilder","builder!: CustomFileHeadersBuilder","fileHeader","builder!: CustomFiltersBuilder","builder!: CustomPreprocessorsBuilder","builder!: CustomParsersBuilder","builder!: CustomTransformsBuilder","builder!: CustomTransformGroupsBuilder"],"sources":["../../../node_modules/.pnpm/@storm-software+config-tools@1.189.0_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js","../src/style-dictionary/file-header.ts","../src/index.ts"],"sourcesContent":["// src/types.ts\nvar LogLevel = {\n SILENT: 0,\n FATAL: 10,\n ERROR: 20,\n WARN: 30,\n SUCCESS: 35,\n INFO: 40,\n DEBUG: 60,\n TRACE: 70,\n ALL: 100\n};\nvar LogLevelLabel = {\n SILENT: \"silent\",\n FATAL: \"fatal\",\n ERROR: \"error\",\n WARN: \"warn\",\n SUCCESS: \"success\",\n INFO: \"info\",\n DEBUG: \"debug\",\n TRACE: \"trace\",\n ALL: \"all\"\n};\n\nexport {\n LogLevel,\n LogLevelLabel\n};\n","/* -------------------------------------------------------------------\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","/* -------------------------------------------------------------------\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 { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport defu from \"defu\";\nimport { resolve } from \"powerlines/lib/utilities/resolve\";\nimport { Plugin } from \"powerlines/types/plugin\";\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 StyleDictionaryPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\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 } as Partial<StyleDictionaryPluginUserConfig>;\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"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
2
|
+
import { EnvironmentConfig, UserConfig } from "powerlines/types/config";
|
|
3
|
+
import { PluginContext } from "powerlines/types/context";
|
|
4
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
+
import StyleDictionary, { Config } from "style-dictionary";
|
|
6
|
+
import { Action, FileHeader, Filter, Format, Parser, PlatformConfig, Preprocessor, Transform } from "style-dictionary/types";
|
|
7
|
+
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
type StyleDictionaryExtensionBuilder<T> = (extensionContext: StyleDictionaryPluginContext) => Record<string, T>;
|
|
10
|
+
type CustomActionsBuilder = StyleDictionaryExtensionBuilder<Action>;
|
|
11
|
+
type CustomTransformsBuilder = StyleDictionaryExtensionBuilder<Transform>;
|
|
12
|
+
type CustomFormatsBuilder = StyleDictionaryExtensionBuilder<Format>;
|
|
13
|
+
type CustomTransformGroupsBuilder = StyleDictionaryExtensionBuilder<string[]>;
|
|
14
|
+
type CustomFileHeadersBuilder = StyleDictionaryExtensionBuilder<FileHeader>;
|
|
15
|
+
type CustomFiltersBuilder = StyleDictionaryExtensionBuilder<Filter>;
|
|
16
|
+
type CustomParsersBuilder = (extensionContext: StyleDictionaryPluginContext) => Parser[];
|
|
17
|
+
type CustomPreprocessorsBuilder = StyleDictionaryExtensionBuilder<Preprocessor>;
|
|
18
|
+
type StyleDictionaryPluginOptions = Omit<Config, "platforms"> & {
|
|
19
|
+
/**
|
|
20
|
+
* Whether to skip the Style Dictionary build process.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* If set to `true`, the Style Dictionary build step will be skipped (ran during the "prepare" command), allowing for manual control over when the build occurs.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue false
|
|
26
|
+
*/
|
|
27
|
+
skipBuild?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Custom Style Dictionary actions to register.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
33
|
+
*/
|
|
34
|
+
customActions?: TypeDefinitionParameter | CustomActionsBuilder;
|
|
35
|
+
/**
|
|
36
|
+
* Custom Style Dictionary file headers to register.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
40
|
+
*/
|
|
41
|
+
customFileHeaders?: TypeDefinitionParameter | CustomFileHeadersBuilder;
|
|
42
|
+
/**
|
|
43
|
+
* Custom Style Dictionary filters to register.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
47
|
+
*/
|
|
48
|
+
customFilters?: TypeDefinitionParameter | CustomFiltersBuilder;
|
|
49
|
+
/**
|
|
50
|
+
* Custom Style Dictionary formats to register.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
54
|
+
*/
|
|
55
|
+
customFormats?: TypeDefinitionParameter | CustomFormatsBuilder;
|
|
56
|
+
/**
|
|
57
|
+
* Custom Style Dictionary preprocessors to register.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
61
|
+
*/
|
|
62
|
+
customPreprocessors?: TypeDefinitionParameter | CustomPreprocessorsBuilder;
|
|
63
|
+
/**
|
|
64
|
+
* Custom Style Dictionary parsers to register.
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
68
|
+
*/
|
|
69
|
+
customParsers?: TypeDefinitionParameter | CustomParsersBuilder;
|
|
70
|
+
/**
|
|
71
|
+
* Custom Style Dictionary transform groups to register.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
75
|
+
*/
|
|
76
|
+
customTransformGroups?: TypeDefinitionParameter | CustomTransformGroupsBuilder;
|
|
77
|
+
/**
|
|
78
|
+
* Custom Style Dictionary transforms to register.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
82
|
+
*/
|
|
83
|
+
customTransforms?: TypeDefinitionParameter | CustomTransformsBuilder;
|
|
84
|
+
/**
|
|
85
|
+
* An existing Style Dictionary instance to use.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* If provided, this instance will be used instead of creating a new one.
|
|
89
|
+
*/
|
|
90
|
+
instance?: StyleDictionary;
|
|
91
|
+
};
|
|
92
|
+
type StyleDictionaryPluginEnvironmentConfig = EnvironmentConfig & PlatformConfig;
|
|
93
|
+
type StyleDictionaryPluginUserConfig = UserConfig & {
|
|
94
|
+
styleDictionary?: StyleDictionaryPluginOptions;
|
|
95
|
+
environments?: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
96
|
+
};
|
|
97
|
+
type StyleDictionaryPluginResolvedConfig = ResolvedConfig & {
|
|
98
|
+
styleDictionary: StyleDictionaryPluginOptions;
|
|
99
|
+
environments: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
100
|
+
};
|
|
101
|
+
type StyleDictionaryPluginContext<TResolvedConfig extends StyleDictionaryPluginResolvedConfig = StyleDictionaryPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
102
|
+
styleDictionary: StyleDictionary;
|
|
103
|
+
};
|
|
104
|
+
declare type __ΩCustomActionsBuilder = any[];
|
|
105
|
+
declare type __ΩCustomTransformsBuilder = any[];
|
|
106
|
+
declare type __ΩCustomFormatsBuilder = any[];
|
|
107
|
+
declare type __ΩCustomTransformGroupsBuilder = any[];
|
|
108
|
+
declare type __ΩCustomFileHeadersBuilder = any[];
|
|
109
|
+
declare type __ΩCustomFiltersBuilder = any[];
|
|
110
|
+
declare type __ΩCustomParsersBuilder = any[];
|
|
111
|
+
declare type __ΩCustomPreprocessorsBuilder = any[];
|
|
112
|
+
declare type __ΩStyleDictionaryPluginOptions = any[];
|
|
113
|
+
declare type __ΩStyleDictionaryPluginEnvironmentConfig = any[];
|
|
114
|
+
declare type __ΩStyleDictionaryPluginUserConfig = any[];
|
|
115
|
+
declare type __ΩStyleDictionaryPluginResolvedConfig = any[];
|
|
116
|
+
declare type __ΩStyleDictionaryPluginContext = any[];
|
|
117
|
+
//#endregion
|
|
118
|
+
export { __ΩStyleDictionaryPluginEnvironmentConfig as C, __ΩStyleDictionaryPluginUserConfig as E, __ΩStyleDictionaryPluginContext as S, __ΩStyleDictionaryPluginResolvedConfig as T, __ΩCustomFormatsBuilder as _, CustomParsersBuilder as a, __ΩCustomTransformGroupsBuilder as b, CustomTransformsBuilder as c, StyleDictionaryPluginOptions as d, StyleDictionaryPluginResolvedConfig as f, __ΩCustomFiltersBuilder as g, __ΩCustomFileHeadersBuilder as h, CustomFormatsBuilder as i, StyleDictionaryPluginContext as l, __ΩCustomActionsBuilder as m, CustomFileHeadersBuilder as n, CustomPreprocessorsBuilder as o, StyleDictionaryPluginUserConfig as p, CustomFiltersBuilder as r, CustomTransformGroupsBuilder as s, CustomActionsBuilder as t, StyleDictionaryPluginEnvironmentConfig as u, __ΩCustomParsersBuilder as v, __ΩStyleDictionaryPluginOptions as w, __ΩCustomTransformsBuilder as x, __ΩCustomPreprocessorsBuilder as y };
|
|
119
|
+
//# sourceMappingURL=plugin-COXACFbO.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-COXACFbO.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAoCK,wDACe,iCACf,eAAe;KAER,oBAAA,GAAuB,gCAAgC;AAJ9D,KAKO,uBAAA,GACV,+BANkC,CAMF,SANE,CAAA;AAChB,KAMR,oBAAA,GAAuB,+BANf,CAM+C,MAN/C,CAAA;AACA,KAMR,4BAAA,GAA+B,+BANvB,CAAA,MAAA,EAAA,CAAA;AAAf,KASO,wBAAA,GACV,+BAVG,CAU6B,UAV7B,CAAA;AAAM,KAWC,oBAAA,GAAuB,+BAXxB,CAWwD,MAXxD,CAAA;AAEC,KAUA,oBAAA,GAVoB,CAAA,gBAAG,EAWf,4BAX8C,EAAA,GAY7D,MAZ6D,EAAA;AACtD,KAYA,0BAAA,GACV,+BAZA,CAYgC,YAZD,CAAA;AACrB,KAaA,4BAAA,GAA+B,IAbR,CAaa,MAbb,EAAA,WAAA,CAAA,GAAA;EACvB;AAGZ;AAEA;AACA;AAGA;AAGA;;;EAiBkB,SAAA,CAAA,EAAA,OAAA;EAA0B;;;;;;EAwBA,aAAA,CAAA,EAxB1B,uBAwB0B,GAxBA,oBAwBA;EAQpB;;;;;;EA0BH,iBAAA,CAAA,EAlDC,uBAkDD,GAlD2B,wBAkD3B;EAA0B;;;AAW/C;AAGA;;EACoB,aAAA,CAAA,EAzDF,uBAyDE,GAzDwB,oBAyDxB;EACY;;;AAGhC;;;EAE+B,aAAA,CAAA,EAvDb,uBAuDa,GAvDa,oBAuDb;EAAf;;AAGhB;;;;EAGI,mBAAA,CAAA,EArDoB,uBAqDpB,GArD8C,0BAqD9C;EACe;;;;;;kBA9CD,0BAA0B;;;;;;;0BAStC,0BACA;;;;;;;qBAQe,0BAA0B;;;;;;;aAQlC;;KAGD,sCAAA,GAAyC,oBACnD;KAEU,+BAAA,GAAkC;oBAC1B;iBACH,eAAe;;KAGpB,mCAAA,GAAsC;mBAC/B;gBACH,eAAe;;KAGnB,qDACc,sCACtB,uCACA,cAAc;mBACC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import StyleDictionary, { Config } from "style-dictionary";
|
|
2
|
+
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
3
|
+
import { EnvironmentConfig, UserConfig } from "powerlines/types/config";
|
|
4
|
+
import { PluginContext } from "powerlines/types/context";
|
|
5
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
+
import { Action, FileHeader, Filter, Format, Parser, PlatformConfig, Preprocessor, Transform } from "style-dictionary/types";
|
|
7
|
+
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
type StyleDictionaryExtensionBuilder<T> = (extensionContext: StyleDictionaryPluginContext) => Record<string, T>;
|
|
10
|
+
type CustomActionsBuilder = StyleDictionaryExtensionBuilder<Action>;
|
|
11
|
+
type CustomTransformsBuilder = StyleDictionaryExtensionBuilder<Transform>;
|
|
12
|
+
type CustomFormatsBuilder = StyleDictionaryExtensionBuilder<Format>;
|
|
13
|
+
type CustomTransformGroupsBuilder = StyleDictionaryExtensionBuilder<string[]>;
|
|
14
|
+
type CustomFileHeadersBuilder = StyleDictionaryExtensionBuilder<FileHeader>;
|
|
15
|
+
type CustomFiltersBuilder = StyleDictionaryExtensionBuilder<Filter>;
|
|
16
|
+
type CustomParsersBuilder = (extensionContext: StyleDictionaryPluginContext) => Parser[];
|
|
17
|
+
type CustomPreprocessorsBuilder = StyleDictionaryExtensionBuilder<Preprocessor>;
|
|
18
|
+
type StyleDictionaryPluginOptions = Omit<Config, "platforms"> & {
|
|
19
|
+
/**
|
|
20
|
+
* Whether to skip the Style Dictionary build process.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* If set to `true`, the Style Dictionary build step will be skipped (ran during the "prepare" command), allowing for manual control over when the build occurs.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue false
|
|
26
|
+
*/
|
|
27
|
+
skipBuild?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Custom Style Dictionary actions to register.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
33
|
+
*/
|
|
34
|
+
customActions?: TypeDefinitionParameter | CustomActionsBuilder;
|
|
35
|
+
/**
|
|
36
|
+
* Custom Style Dictionary file headers to register.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
40
|
+
*/
|
|
41
|
+
customFileHeaders?: TypeDefinitionParameter | CustomFileHeadersBuilder;
|
|
42
|
+
/**
|
|
43
|
+
* Custom Style Dictionary filters to register.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
47
|
+
*/
|
|
48
|
+
customFilters?: TypeDefinitionParameter | CustomFiltersBuilder;
|
|
49
|
+
/**
|
|
50
|
+
* Custom Style Dictionary formats to register.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
54
|
+
*/
|
|
55
|
+
customFormats?: TypeDefinitionParameter | CustomFormatsBuilder;
|
|
56
|
+
/**
|
|
57
|
+
* Custom Style Dictionary preprocessors to register.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
61
|
+
*/
|
|
62
|
+
customPreprocessors?: TypeDefinitionParameter | CustomPreprocessorsBuilder;
|
|
63
|
+
/**
|
|
64
|
+
* Custom Style Dictionary parsers to register.
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
68
|
+
*/
|
|
69
|
+
customParsers?: TypeDefinitionParameter | CustomParsersBuilder;
|
|
70
|
+
/**
|
|
71
|
+
* Custom Style Dictionary transform groups to register.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
75
|
+
*/
|
|
76
|
+
customTransformGroups?: TypeDefinitionParameter | CustomTransformGroupsBuilder;
|
|
77
|
+
/**
|
|
78
|
+
* Custom Style Dictionary transforms to register.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
82
|
+
*/
|
|
83
|
+
customTransforms?: TypeDefinitionParameter | CustomTransformsBuilder;
|
|
84
|
+
/**
|
|
85
|
+
* An existing Style Dictionary instance to use.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* If provided, this instance will be used instead of creating a new one.
|
|
89
|
+
*/
|
|
90
|
+
instance?: StyleDictionary;
|
|
91
|
+
};
|
|
92
|
+
type StyleDictionaryPluginEnvironmentConfig = EnvironmentConfig & PlatformConfig;
|
|
93
|
+
type StyleDictionaryPluginUserConfig = UserConfig & {
|
|
94
|
+
styleDictionary?: StyleDictionaryPluginOptions;
|
|
95
|
+
environments?: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
96
|
+
};
|
|
97
|
+
type StyleDictionaryPluginResolvedConfig = ResolvedConfig & {
|
|
98
|
+
styleDictionary: StyleDictionaryPluginOptions;
|
|
99
|
+
environments: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
100
|
+
};
|
|
101
|
+
type StyleDictionaryPluginContext<TResolvedConfig extends StyleDictionaryPluginResolvedConfig = StyleDictionaryPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
102
|
+
styleDictionary: StyleDictionary;
|
|
103
|
+
};
|
|
104
|
+
declare type __ΩCustomActionsBuilder = any[];
|
|
105
|
+
declare type __ΩCustomTransformsBuilder = any[];
|
|
106
|
+
declare type __ΩCustomFormatsBuilder = any[];
|
|
107
|
+
declare type __ΩCustomTransformGroupsBuilder = any[];
|
|
108
|
+
declare type __ΩCustomFileHeadersBuilder = any[];
|
|
109
|
+
declare type __ΩCustomFiltersBuilder = any[];
|
|
110
|
+
declare type __ΩCustomParsersBuilder = any[];
|
|
111
|
+
declare type __ΩCustomPreprocessorsBuilder = any[];
|
|
112
|
+
declare type __ΩStyleDictionaryPluginOptions = any[];
|
|
113
|
+
declare type __ΩStyleDictionaryPluginEnvironmentConfig = any[];
|
|
114
|
+
declare type __ΩStyleDictionaryPluginUserConfig = any[];
|
|
115
|
+
declare type __ΩStyleDictionaryPluginResolvedConfig = any[];
|
|
116
|
+
declare type __ΩStyleDictionaryPluginContext = any[];
|
|
117
|
+
//#endregion
|
|
118
|
+
export { __ΩStyleDictionaryPluginEnvironmentConfig as C, __ΩStyleDictionaryPluginUserConfig as E, __ΩStyleDictionaryPluginContext as S, __ΩStyleDictionaryPluginResolvedConfig as T, __ΩCustomFormatsBuilder as _, CustomParsersBuilder as a, __ΩCustomTransformGroupsBuilder as b, CustomTransformsBuilder as c, StyleDictionaryPluginOptions as d, StyleDictionaryPluginResolvedConfig as f, __ΩCustomFiltersBuilder as g, __ΩCustomFileHeadersBuilder as h, CustomFormatsBuilder as i, StyleDictionaryPluginContext as l, __ΩCustomActionsBuilder as m, CustomFileHeadersBuilder as n, CustomPreprocessorsBuilder as o, StyleDictionaryPluginUserConfig as p, CustomFiltersBuilder as r, CustomTransformGroupsBuilder as s, CustomActionsBuilder as t, StyleDictionaryPluginEnvironmentConfig as u, __ΩCustomParsersBuilder as v, __ΩStyleDictionaryPluginOptions as w, __ΩCustomTransformsBuilder as x, __ΩCustomPreprocessorsBuilder as y };
|
|
119
|
+
//# sourceMappingURL=plugin-CYveN_7t.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-CYveN_7t.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAoCK,wDACe,iCACf,eAAe;KAER,oBAAA,GAAuB,gCAAgC;AAJ9D,KAKO,uBAAA,GACV,+BANkC,CAMF,SANE,CAAA;AAChB,KAMR,oBAAA,GAAuB,+BANf,CAM+C,MAN/C,CAAA;AACA,KAMR,4BAAA,GAA+B,+BANvB,CAAA,MAAA,EAAA,CAAA;AAAf,KASO,wBAAA,GACV,+BAVG,CAU6B,UAV7B,CAAA;AAAM,KAWC,oBAAA,GAAuB,+BAXxB,CAWwD,MAXxD,CAAA;AAEC,KAUA,oBAAA,GAVoB,CAAA,gBAAG,EAWf,4BAX8C,EAAA,GAY7D,MAZ6D,EAAA;AACtD,KAYA,0BAAA,GACV,+BAZA,CAYgC,YAZD,CAAA;AACrB,KAaA,4BAAA,GAA+B,IAbR,CAaa,MAbb,EAAA,WAAA,CAAA,GAAA;EACvB;AAGZ;AAEA;AACA;AAGA;AAGA;;;EAiBkB,SAAA,CAAA,EAAA,OAAA;EAA0B;;;;;;EAwBA,aAAA,CAAA,EAxB1B,uBAwB0B,GAxBA,oBAwBA;EAQpB;;;;;;EA0BH,iBAAA,CAAA,EAlDC,uBAkDD,GAlD2B,wBAkD3B;EAA0B;;;AAW/C;AAGA;;EACoB,aAAA,CAAA,EAzDF,uBAyDE,GAzDwB,oBAyDxB;EACY;;;AAGhC;;;EAE+B,aAAA,CAAA,EAvDb,uBAuDa,GAvDa,oBAuDb;EAAf;;AAGhB;;;;EAGI,mBAAA,CAAA,EArDoB,uBAqDpB,GArD8C,0BAqD9C;EACe;;;;;;kBA9CD,0BAA0B;;;;;;;0BAStC,0BACA;;;;;;;qBAQe,0BAA0B;;;;;;;aAQlC;;KAGD,sCAAA,GAAyC,oBACnD;KAEU,+BAAA,GAAkC;oBAC1B;iBACH,eAAe;;KAGpB,mCAAA,GAAsC;mBAC/B;gBACH,eAAe;;KAGnB,qDACc,sCACtB,uCACA,cAAc;mBACC"}
|
|
File without changes
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "../plugin-COXACFbO.cjs";
|
|
2
|
+
import "../index-CEgs-Dz2.cjs";
|
|
2
3
|
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "../plugin-CYveN_7t.mjs";
|
|
2
|
+
import "../index-BgAdqTbb.mjs";
|
|
2
3
|
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,118 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EnvironmentConfig, UserConfig } from "powerlines/types/config";
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
-
import StyleDictionary, { Config } from "style-dictionary";
|
|
6
|
-
import { Action, FileHeader, Filter, Format, Parser, PlatformConfig, Preprocessor, Transform } from "style-dictionary/types";
|
|
7
|
-
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
type StyleDictionaryExtensionBuilder<T> = (extensionContext: StyleDictionaryPluginContext) => Record<string, T>;
|
|
10
|
-
type CustomActionsBuilder = StyleDictionaryExtensionBuilder<Action>;
|
|
11
|
-
type CustomTransformsBuilder = StyleDictionaryExtensionBuilder<Transform>;
|
|
12
|
-
type CustomFormatsBuilder = StyleDictionaryExtensionBuilder<Format>;
|
|
13
|
-
type CustomTransformGroupsBuilder = StyleDictionaryExtensionBuilder<string[]>;
|
|
14
|
-
type CustomFileHeadersBuilder = StyleDictionaryExtensionBuilder<FileHeader>;
|
|
15
|
-
type CustomFiltersBuilder = StyleDictionaryExtensionBuilder<Filter>;
|
|
16
|
-
type CustomParsersBuilder = (extensionContext: StyleDictionaryPluginContext) => Parser[];
|
|
17
|
-
type CustomPreprocessorsBuilder = StyleDictionaryExtensionBuilder<Preprocessor>;
|
|
18
|
-
type StyleDictionaryPluginOptions = Omit<Config, "platforms"> & {
|
|
19
|
-
/**
|
|
20
|
-
* Whether to skip the Style Dictionary build process.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* If set to `true`, the Style Dictionary build step will be skipped (ran during the "prepare" command), allowing for manual control over when the build occurs.
|
|
24
|
-
*
|
|
25
|
-
* @defaultValue false
|
|
26
|
-
*/
|
|
27
|
-
skipBuild?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Custom Style Dictionary actions to register.
|
|
30
|
-
*
|
|
31
|
-
* @remarks
|
|
32
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
33
|
-
*/
|
|
34
|
-
customActions?: TypeDefinitionParameter | CustomActionsBuilder;
|
|
35
|
-
/**
|
|
36
|
-
* Custom Style Dictionary file headers to register.
|
|
37
|
-
*
|
|
38
|
-
* @remarks
|
|
39
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
40
|
-
*/
|
|
41
|
-
customFileHeaders?: TypeDefinitionParameter | CustomFileHeadersBuilder;
|
|
42
|
-
/**
|
|
43
|
-
* Custom Style Dictionary filters to register.
|
|
44
|
-
*
|
|
45
|
-
* @remarks
|
|
46
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
47
|
-
*/
|
|
48
|
-
customFilters?: TypeDefinitionParameter | CustomFiltersBuilder;
|
|
49
|
-
/**
|
|
50
|
-
* Custom Style Dictionary formats to register.
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
54
|
-
*/
|
|
55
|
-
customFormats?: TypeDefinitionParameter | CustomFormatsBuilder;
|
|
56
|
-
/**
|
|
57
|
-
* Custom Style Dictionary preprocessors to register.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
61
|
-
*/
|
|
62
|
-
customPreprocessors?: TypeDefinitionParameter | CustomPreprocessorsBuilder;
|
|
63
|
-
/**
|
|
64
|
-
* Custom Style Dictionary parsers to register.
|
|
65
|
-
*
|
|
66
|
-
* @remarks
|
|
67
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
68
|
-
*/
|
|
69
|
-
customParsers?: TypeDefinitionParameter | CustomParsersBuilder;
|
|
70
|
-
/**
|
|
71
|
-
* Custom Style Dictionary transform groups to register.
|
|
72
|
-
*
|
|
73
|
-
* @remarks
|
|
74
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
75
|
-
*/
|
|
76
|
-
customTransformGroups?: TypeDefinitionParameter | CustomTransformGroupsBuilder;
|
|
77
|
-
/**
|
|
78
|
-
* Custom Style Dictionary transforms to register.
|
|
79
|
-
*
|
|
80
|
-
* @remarks
|
|
81
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
82
|
-
*/
|
|
83
|
-
customTransforms?: TypeDefinitionParameter | CustomTransformsBuilder;
|
|
84
|
-
/**
|
|
85
|
-
* An existing Style Dictionary instance to use.
|
|
86
|
-
*
|
|
87
|
-
* @remarks
|
|
88
|
-
* If provided, this instance will be used instead of creating a new one.
|
|
89
|
-
*/
|
|
90
|
-
instance?: StyleDictionary;
|
|
91
|
-
};
|
|
92
|
-
type StyleDictionaryPluginEnvironmentConfig = EnvironmentConfig & PlatformConfig;
|
|
93
|
-
type StyleDictionaryPluginUserConfig = UserConfig & {
|
|
94
|
-
styleDictionary?: StyleDictionaryPluginOptions;
|
|
95
|
-
environments?: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
96
|
-
};
|
|
97
|
-
type StyleDictionaryPluginResolvedConfig = ResolvedConfig & {
|
|
98
|
-
styleDictionary: StyleDictionaryPluginOptions;
|
|
99
|
-
environments: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
100
|
-
};
|
|
101
|
-
type StyleDictionaryPluginContext<TResolvedConfig extends StyleDictionaryPluginResolvedConfig = StyleDictionaryPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
102
|
-
styleDictionary: StyleDictionary;
|
|
103
|
-
};
|
|
104
|
-
declare type __ΩCustomActionsBuilder = any[];
|
|
105
|
-
declare type __ΩCustomTransformsBuilder = any[];
|
|
106
|
-
declare type __ΩCustomFormatsBuilder = any[];
|
|
107
|
-
declare type __ΩCustomTransformGroupsBuilder = any[];
|
|
108
|
-
declare type __ΩCustomFileHeadersBuilder = any[];
|
|
109
|
-
declare type __ΩCustomFiltersBuilder = any[];
|
|
110
|
-
declare type __ΩCustomParsersBuilder = any[];
|
|
111
|
-
declare type __ΩCustomPreprocessorsBuilder = any[];
|
|
112
|
-
declare type __ΩStyleDictionaryPluginOptions = any[];
|
|
113
|
-
declare type __ΩStyleDictionaryPluginEnvironmentConfig = any[];
|
|
114
|
-
declare type __ΩStyleDictionaryPluginUserConfig = any[];
|
|
115
|
-
declare type __ΩStyleDictionaryPluginResolvedConfig = any[];
|
|
116
|
-
declare type __ΩStyleDictionaryPluginContext = any[];
|
|
117
|
-
//#endregion
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "../plugin-COXACFbO.cjs";
|
|
118
2
|
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,118 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
3
|
-
import { EnvironmentConfig, UserConfig } from "powerlines/types/config";
|
|
4
|
-
import { PluginContext } from "powerlines/types/context";
|
|
5
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
-
import { Action, FileHeader, Filter, Format, Parser, PlatformConfig, Preprocessor, Transform } from "style-dictionary/types";
|
|
7
|
-
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
type StyleDictionaryExtensionBuilder<T> = (extensionContext: StyleDictionaryPluginContext) => Record<string, T>;
|
|
10
|
-
type CustomActionsBuilder = StyleDictionaryExtensionBuilder<Action>;
|
|
11
|
-
type CustomTransformsBuilder = StyleDictionaryExtensionBuilder<Transform>;
|
|
12
|
-
type CustomFormatsBuilder = StyleDictionaryExtensionBuilder<Format>;
|
|
13
|
-
type CustomTransformGroupsBuilder = StyleDictionaryExtensionBuilder<string[]>;
|
|
14
|
-
type CustomFileHeadersBuilder = StyleDictionaryExtensionBuilder<FileHeader>;
|
|
15
|
-
type CustomFiltersBuilder = StyleDictionaryExtensionBuilder<Filter>;
|
|
16
|
-
type CustomParsersBuilder = (extensionContext: StyleDictionaryPluginContext) => Parser[];
|
|
17
|
-
type CustomPreprocessorsBuilder = StyleDictionaryExtensionBuilder<Preprocessor>;
|
|
18
|
-
type StyleDictionaryPluginOptions = Omit<Config, "platforms"> & {
|
|
19
|
-
/**
|
|
20
|
-
* Whether to skip the Style Dictionary build process.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* If set to `true`, the Style Dictionary build step will be skipped (ran during the "prepare" command), allowing for manual control over when the build occurs.
|
|
24
|
-
*
|
|
25
|
-
* @defaultValue false
|
|
26
|
-
*/
|
|
27
|
-
skipBuild?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Custom Style Dictionary actions to register.
|
|
30
|
-
*
|
|
31
|
-
* @remarks
|
|
32
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
33
|
-
*/
|
|
34
|
-
customActions?: TypeDefinitionParameter | CustomActionsBuilder;
|
|
35
|
-
/**
|
|
36
|
-
* Custom Style Dictionary file headers to register.
|
|
37
|
-
*
|
|
38
|
-
* @remarks
|
|
39
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
40
|
-
*/
|
|
41
|
-
customFileHeaders?: TypeDefinitionParameter | CustomFileHeadersBuilder;
|
|
42
|
-
/**
|
|
43
|
-
* Custom Style Dictionary filters to register.
|
|
44
|
-
*
|
|
45
|
-
* @remarks
|
|
46
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
47
|
-
*/
|
|
48
|
-
customFilters?: TypeDefinitionParameter | CustomFiltersBuilder;
|
|
49
|
-
/**
|
|
50
|
-
* Custom Style Dictionary formats to register.
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
54
|
-
*/
|
|
55
|
-
customFormats?: TypeDefinitionParameter | CustomFormatsBuilder;
|
|
56
|
-
/**
|
|
57
|
-
* Custom Style Dictionary preprocessors to register.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
61
|
-
*/
|
|
62
|
-
customPreprocessors?: TypeDefinitionParameter | CustomPreprocessorsBuilder;
|
|
63
|
-
/**
|
|
64
|
-
* Custom Style Dictionary parsers to register.
|
|
65
|
-
*
|
|
66
|
-
* @remarks
|
|
67
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
68
|
-
*/
|
|
69
|
-
customParsers?: TypeDefinitionParameter | CustomParsersBuilder;
|
|
70
|
-
/**
|
|
71
|
-
* Custom Style Dictionary transform groups to register.
|
|
72
|
-
*
|
|
73
|
-
* @remarks
|
|
74
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
75
|
-
*/
|
|
76
|
-
customTransformGroups?: TypeDefinitionParameter | CustomTransformGroupsBuilder;
|
|
77
|
-
/**
|
|
78
|
-
* Custom Style Dictionary transforms to register.
|
|
79
|
-
*
|
|
80
|
-
* @remarks
|
|
81
|
-
* This value can be a {@link TypeDefinitionParameter} pointing to a module export or an actual builder function.
|
|
82
|
-
*/
|
|
83
|
-
customTransforms?: TypeDefinitionParameter | CustomTransformsBuilder;
|
|
84
|
-
/**
|
|
85
|
-
* An existing Style Dictionary instance to use.
|
|
86
|
-
*
|
|
87
|
-
* @remarks
|
|
88
|
-
* If provided, this instance will be used instead of creating a new one.
|
|
89
|
-
*/
|
|
90
|
-
instance?: StyleDictionary;
|
|
91
|
-
};
|
|
92
|
-
type StyleDictionaryPluginEnvironmentConfig = EnvironmentConfig & PlatformConfig;
|
|
93
|
-
type StyleDictionaryPluginUserConfig = UserConfig & {
|
|
94
|
-
styleDictionary?: StyleDictionaryPluginOptions;
|
|
95
|
-
environments?: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
96
|
-
};
|
|
97
|
-
type StyleDictionaryPluginResolvedConfig = ResolvedConfig & {
|
|
98
|
-
styleDictionary: StyleDictionaryPluginOptions;
|
|
99
|
-
environments: Record<string, StyleDictionaryPluginEnvironmentConfig>;
|
|
100
|
-
};
|
|
101
|
-
type StyleDictionaryPluginContext<TResolvedConfig extends StyleDictionaryPluginResolvedConfig = StyleDictionaryPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
102
|
-
styleDictionary: StyleDictionary;
|
|
103
|
-
};
|
|
104
|
-
declare type __ΩCustomActionsBuilder = any[];
|
|
105
|
-
declare type __ΩCustomTransformsBuilder = any[];
|
|
106
|
-
declare type __ΩCustomFormatsBuilder = any[];
|
|
107
|
-
declare type __ΩCustomTransformGroupsBuilder = any[];
|
|
108
|
-
declare type __ΩCustomFileHeadersBuilder = any[];
|
|
109
|
-
declare type __ΩCustomFiltersBuilder = any[];
|
|
110
|
-
declare type __ΩCustomParsersBuilder = any[];
|
|
111
|
-
declare type __ΩCustomPreprocessorsBuilder = any[];
|
|
112
|
-
declare type __ΩStyleDictionaryPluginOptions = any[];
|
|
113
|
-
declare type __ΩStyleDictionaryPluginEnvironmentConfig = any[];
|
|
114
|
-
declare type __ΩStyleDictionaryPluginUserConfig = any[];
|
|
115
|
-
declare type __ΩStyleDictionaryPluginResolvedConfig = any[];
|
|
116
|
-
declare type __ΩStyleDictionaryPluginContext = any[];
|
|
117
|
-
//#endregion
|
|
1
|
+
import { C as __ΩStyleDictionaryPluginEnvironmentConfig, E as __ΩStyleDictionaryPluginUserConfig, S as __ΩStyleDictionaryPluginContext, T as __ΩStyleDictionaryPluginResolvedConfig, _ as __ΩCustomFormatsBuilder, a as CustomParsersBuilder, b as __ΩCustomTransformGroupsBuilder, c as CustomTransformsBuilder, d as StyleDictionaryPluginOptions, f as StyleDictionaryPluginResolvedConfig, g as __ΩCustomFiltersBuilder, h as __ΩCustomFileHeadersBuilder, i as CustomFormatsBuilder, l as StyleDictionaryPluginContext, m as __ΩCustomActionsBuilder, n as CustomFileHeadersBuilder, o as CustomPreprocessorsBuilder, p as StyleDictionaryPluginUserConfig, r as CustomFiltersBuilder, s as CustomTransformGroupsBuilder, t as CustomActionsBuilder, u as StyleDictionaryPluginEnvironmentConfig, v as __ΩCustomParsersBuilder, w as __ΩStyleDictionaryPluginOptions, x as __ΩCustomTransformsBuilder, y as __ΩCustomPreprocessorsBuilder } from "../plugin-CYveN_7t.mjs";
|
|
118
2
|
export { CustomActionsBuilder, CustomFileHeadersBuilder, CustomFiltersBuilder, CustomFormatsBuilder, CustomParsersBuilder, CustomPreprocessorsBuilder, CustomTransformGroupsBuilder, CustomTransformsBuilder, StyleDictionaryPluginContext, StyleDictionaryPluginEnvironmentConfig, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig, __ΩCustomActionsBuilder, __ΩCustomFileHeadersBuilder, __ΩCustomFiltersBuilder, __ΩCustomFormatsBuilder, __ΩCustomParsersBuilder, __ΩCustomPreprocessorsBuilder, __ΩCustomTransformGroupsBuilder, __ΩCustomTransformsBuilder, __ΩStyleDictionaryPluginContext, __ΩStyleDictionaryPluginEnvironmentConfig, __ΩStyleDictionaryPluginOptions, __ΩStyleDictionaryPluginResolvedConfig, __ΩStyleDictionaryPluginUserConfig };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-style-dictionary",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.140",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code with Style Dictionary.",
|
|
6
6
|
"repository": {
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
"@stryke/types": "^0.10.36",
|
|
100
100
|
"defu": "^6.1.4",
|
|
101
101
|
"jiti": "^2.6.1",
|
|
102
|
-
"powerlines": "^0.38.
|
|
102
|
+
"powerlines": "^0.38.6",
|
|
103
103
|
"style-dictionary": "^5.2.0"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
106
|
+
"@powerlines/plugin-plugin": "^0.12.190",
|
|
107
107
|
"@types/node": "^24.10.9"
|
|
108
108
|
},
|
|
109
109
|
"publishConfig": { "access": "public" },
|
|
110
110
|
"types": "./dist/index.d.cts",
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "f90d675c44d4323d447a46c8a4c833420543cc0a"
|
|
112
112
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
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;
|
|
@@ -1,15 +0,0 @@
|
|
|
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,14 +0,0 @@
|
|
|
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 };
|