@powerlines/plugin-style-dictionary 0.3.24 → 0.3.26

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.
Files changed (52) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/index.cjs +13 -210
  3. package/dist/index.d.cts +2 -2
  4. package/dist/index.d.mts +3 -2
  5. package/dist/index.mjs +2 -173
  6. package/dist/powerlines/src/lib/build/esbuild.cjs +102 -0
  7. package/dist/powerlines/src/lib/build/esbuild.mjs +100 -0
  8. package/dist/powerlines/src/lib/entry.cjs +12 -0
  9. package/dist/powerlines/src/lib/entry.mjs +14 -0
  10. package/dist/powerlines/src/lib/utilities/bundle.cjs +35 -0
  11. package/dist/powerlines/src/lib/utilities/bundle.mjs +34 -0
  12. package/dist/powerlines/src/lib/utilities/resolve.cjs +30 -0
  13. package/dist/powerlines/src/lib/utilities/resolve.mjs +29 -0
  14. package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
  15. package/dist/powerlines/src/plugin-utils/paths.mjs +3 -0
  16. package/dist/powerlines/src/types/babel.d.mts +2 -0
  17. package/dist/powerlines/src/types/build.d.cts +145 -0
  18. package/dist/powerlines/src/types/build.d.mts +147 -0
  19. package/dist/powerlines/src/types/commands.d.cts +8 -0
  20. package/dist/powerlines/src/types/commands.d.mts +9 -0
  21. package/dist/powerlines/src/types/config.d.cts +376 -0
  22. package/dist/powerlines/src/types/config.d.mts +376 -0
  23. package/dist/powerlines/src/types/context.d.cts +403 -0
  24. package/dist/powerlines/src/types/context.d.mts +405 -0
  25. package/dist/powerlines/src/types/fs.d.cts +486 -0
  26. package/dist/powerlines/src/types/fs.d.mts +486 -0
  27. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  28. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  29. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  30. package/dist/powerlines/src/types/resolved.d.cts +81 -0
  31. package/dist/powerlines/src/types/resolved.d.mts +82 -0
  32. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  33. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  34. package/dist/style-dictionary/file-header.cjs +15 -0
  35. package/dist/style-dictionary/file-header.mjs +14 -0
  36. package/dist/types/index.cjs +0 -2
  37. package/dist/types/index.d.cts +1 -2
  38. package/dist/types/index.d.mts +1 -2
  39. package/dist/types/index.mjs +0 -3
  40. package/dist/types/plugin.cjs +0 -1
  41. package/dist/types/plugin.d.cts +117 -1
  42. package/dist/types/plugin.d.mts +117 -1
  43. package/dist/types/plugin.mjs +0 -2
  44. package/package.json +5 -5
  45. package/dist/index-BgAdqTbb.d.mts +0 -1
  46. package/dist/index-CEgs-Dz2.d.cts +0 -1
  47. package/dist/plugin-C3MaN5jp.mjs +0 -1
  48. package/dist/plugin-CXsNgnqK.d.mts +0 -1869
  49. package/dist/plugin-DHXHjv16.cjs +0 -0
  50. package/dist/plugin-DOb20y5l.d.cts +0 -1868
  51. package/dist/types-CTUnla4x.mjs +0 -1
  52. package/dist/types-DHkg7xmX.cjs +0 -0
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,15 @@
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;
@@ -0,0 +1,14 @@
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 };
@@ -1,2 +0,0 @@
1
- require('../plugin-DHXHjv16.cjs');
2
- require('../types-DHkg7xmX.cjs');
@@ -1,3 +1,2 @@
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-DOb20y5l.cjs";
2
- import "../index-CEgs-Dz2.cjs";
1
+ import { 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 } from "./plugin.cjs";
3
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 };
@@ -1,3 +1,2 @@
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-CXsNgnqK.mjs";
2
- import "../index-BgAdqTbb.mjs";
1
+ import { 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 } from "./plugin.mjs";
3
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 };
@@ -1,4 +1 @@
1
- import "../plugin-C3MaN5jp.mjs";
2
- import "../types-CTUnla4x.mjs";
3
-
4
1
  export { };
@@ -1 +0,0 @@
1
- require('../plugin-DHXHjv16.cjs');
@@ -1,2 +1,118 @@
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-DOb20y5l.cjs";
1
+ import { EnvironmentConfig, UserConfig } from "../powerlines/src/types/config.cjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.cjs";
4
+ import { TypeDefinitionParameter } from "@stryke/types/configuration";
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
2
118
  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 };
@@ -1,2 +1,118 @@
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-CXsNgnqK.mjs";
1
+ import { EnvironmentConfig, UserConfig } from "../powerlines/src/types/config.mjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.mjs";
4
+ import StyleDictionary, { Config } from "style-dictionary";
5
+ import { TypeDefinitionParameter } from "@stryke/types/configuration";
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
2
118
  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 };
@@ -1,3 +1 @@
1
- import "../plugin-C3MaN5jp.mjs";
2
-
3
1
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-style-dictionary",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code with Style Dictionary.",
6
6
  "repository": {
@@ -127,14 +127,14 @@
127
127
  "@stryke/types": "^0.10.29",
128
128
  "defu": "^6.1.4",
129
129
  "jiti": "^2.6.1",
130
- "powerlines": "^0.36.27",
130
+ "powerlines": "^0.36.29",
131
131
  "style-dictionary": "^5.1.1"
132
132
  },
133
133
  "devDependencies": {
134
- "@powerlines/nx": "^0.11.53",
135
- "@powerlines/plugin-plugin": "^0.12.75",
134
+ "@powerlines/nx": "^0.11.55",
135
+ "@powerlines/plugin-plugin": "^0.12.77",
136
136
  "@types/node": "^24.10.4"
137
137
  },
138
138
  "publishConfig": { "access": "public" },
139
- "gitHead": "fbc59ce584fd0f78d90d2dbaa18f9c9267bd3b61"
139
+ "gitHead": "bfbde2cda62a5307013bf11d1ef6a8500bcbc4b1"
140
140
  }
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };