@breadstone-infrastructure/style-dictionary 0.0.205 → 0.0.206

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 (73) hide show
  1. package/formats/index.d.ts +3 -0
  2. package/formats/index.d.ts.map +1 -0
  3. package/formats/index.js +19 -0
  4. package/formats/index.js.map +1 -0
  5. package/formats/tailwind/v3/DesignTokenType.d.ts +10 -0
  6. package/formats/tailwind/v3/DesignTokenType.d.ts.map +1 -0
  7. package/formats/tailwind/v3/DesignTokenType.js +3 -0
  8. package/formats/tailwind/v3/DesignTokenType.js.map +1 -0
  9. package/formats/tailwind/v3/TailwindPropertyMapping.d.ts +61 -0
  10. package/formats/tailwind/v3/TailwindPropertyMapping.d.ts.map +1 -0
  11. package/formats/tailwind/v3/TailwindPropertyMapping.js +421 -0
  12. package/formats/tailwind/v3/TailwindPropertyMapping.js.map +1 -0
  13. package/formats/tailwind/v3/TailwindV3PropertyMapping.d.ts +61 -0
  14. package/formats/tailwind/v3/TailwindV3PropertyMapping.d.ts.map +1 -0
  15. package/formats/tailwind/v3/TailwindV3PropertyMapping.js +421 -0
  16. package/formats/tailwind/v3/TailwindV3PropertyMapping.js.map +1 -0
  17. package/formats/tailwind/v3/buildTailwindConfig.d.ts +23 -0
  18. package/formats/tailwind/v3/buildTailwindConfig.d.ts.map +1 -0
  19. package/formats/tailwind/v3/buildTailwindConfig.js +281 -0
  20. package/formats/tailwind/v3/buildTailwindConfig.js.map +1 -0
  21. package/formats/tailwind/v3/buildTailwindV3Config.d.ts +24 -0
  22. package/formats/tailwind/v3/buildTailwindV3Config.d.ts.map +1 -0
  23. package/formats/tailwind/v3/buildTailwindV3Config.js +282 -0
  24. package/formats/tailwind/v3/buildTailwindV3Config.js.map +1 -0
  25. package/formats/tailwind/v3/index.d.ts +5 -0
  26. package/formats/tailwind/v3/index.d.ts.map +1 -0
  27. package/formats/tailwind/v3/index.js +21 -0
  28. package/formats/tailwind/v3/index.js.map +1 -0
  29. package/formats/tailwind/v3/tailwindFormat.d.ts +13 -0
  30. package/formats/tailwind/v3/tailwindFormat.d.ts.map +1 -0
  31. package/formats/tailwind/v3/tailwindFormat.js +57 -0
  32. package/formats/tailwind/v3/tailwindFormat.js.map +1 -0
  33. package/formats/tailwind/v3/tailwindFormat2.d.ts +13 -0
  34. package/formats/tailwind/v3/tailwindFormat2.d.ts.map +1 -0
  35. package/formats/tailwind/v3/tailwindFormat2.js +65 -0
  36. package/formats/tailwind/v3/tailwindFormat2.js.map +1 -0
  37. package/formats/tailwind/v3/tailwindV3Format.d.ts +32 -0
  38. package/formats/tailwind/v3/tailwindV3Format.d.ts.map +1 -0
  39. package/formats/tailwind/v3/tailwindV3Format.js +123 -0
  40. package/formats/tailwind/v3/tailwindV3Format.js.map +1 -0
  41. package/formats/tailwind/v4/DesignTokenType.d.ts +10 -0
  42. package/formats/tailwind/v4/DesignTokenType.d.ts.map +1 -0
  43. package/formats/tailwind/v4/DesignTokenType.js +3 -0
  44. package/formats/tailwind/v4/DesignTokenType.js.map +1 -0
  45. package/formats/tailwind/v4/TailwindV4PropertyMapping.d.ts +45 -0
  46. package/formats/tailwind/v4/TailwindV4PropertyMapping.d.ts.map +1 -0
  47. package/formats/tailwind/v4/TailwindV4PropertyMapping.js +322 -0
  48. package/formats/tailwind/v4/TailwindV4PropertyMapping.js.map +1 -0
  49. package/formats/tailwind/v4/buildTailwindV4Theme.d.ts +71 -0
  50. package/formats/tailwind/v4/buildTailwindV4Theme.d.ts.map +1 -0
  51. package/formats/tailwind/v4/buildTailwindV4Theme.js +247 -0
  52. package/formats/tailwind/v4/buildTailwindV4Theme.js.map +1 -0
  53. package/formats/tailwind/v4/index.d.ts +2 -0
  54. package/formats/tailwind/v4/index.d.ts.map +1 -0
  55. package/formats/tailwind/v4/index.js +18 -0
  56. package/formats/tailwind/v4/index.js.map +1 -0
  57. package/formats/tailwind/v4/tailwindV4Format.d.ts +55 -0
  58. package/formats/tailwind/v4/tailwindV4Format.d.ts.map +1 -0
  59. package/formats/tailwind/v4/tailwindV4Format.js +88 -0
  60. package/formats/tailwind/v4/tailwindV4Format.js.map +1 -0
  61. package/index.d.ts +3 -9
  62. package/index.d.ts.map +1 -1
  63. package/index.js +3 -17
  64. package/index.js.map +1 -1
  65. package/package.json +2 -2
  66. package/preprocessors/index.d.ts +3 -0
  67. package/preprocessors/index.d.ts.map +1 -0
  68. package/preprocessors/index.js +19 -0
  69. package/preprocessors/index.js.map +1 -0
  70. package/transforms/index.d.ts +7 -0
  71. package/transforms/index.d.ts.map +1 -0
  72. package/transforms/index.js +23 -0
  73. package/transforms/index.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v3/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,6DAA2C;AAC3C,uDAAqC;AACrC,iEAA+C"}
@@ -0,0 +1,13 @@
1
+ import type { Format } from 'style-dictionary/types';
2
+ /**
3
+ * Style-Dictionary format that outputs a CommonJS `tailwind.config.js`,
4
+ * exporting the theme configuration as `module.exports = …`.
5
+ */
6
+ export declare const tailwindPresetFormat: Format;
7
+ /**
8
+ * Style-Dictionary format that generates a Tailwind plugin module.
9
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
10
+ * in tailwind.config.js.
11
+ */
12
+ export declare const tailwindPluginFormat: Format;
13
+ //# sourceMappingURL=tailwindFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwindFormat.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v3/tailwindFormat.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,MAAM,EAAgB,MAAM,wBAAwB,CAAC;AAKvF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAgBlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,MA8BlC,CAAC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ // #region Imports
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.tailwindPluginFormat = exports.tailwindPresetFormat = void 0;
5
+ const buildTailwindConfig_js_1 = require("./buildTailwindConfig.js");
6
+ // #endregion
7
+ /**
8
+ * Style-Dictionary format that outputs a CommonJS `tailwind.config.js`,
9
+ * exporting the theme configuration as `module.exports = …`.
10
+ */
11
+ exports.tailwindPresetFormat = {
12
+ name: 'tailwind/preset/js',
13
+ format({ dictionary, options }) {
14
+ const config = (0, buildTailwindConfig_js_1.buildTailwindConfig)(dictionary.allTokens, options.ignoredTokenNames ?? []);
15
+ const header = `// ------------------------------------------------------------------------------
16
+ // <auto-generated>
17
+ // This code was generated by a tool.
18
+ // Changes to this file may cause incorrect behavior and will be lost if
19
+ // the code is regenerated.
20
+ // </auto-generated>
21
+ // ------------------------------------------------------------------------------`;
22
+ return `${header}\n\nmodule.exports = ${JSON.stringify(config, null, 2)};\n`;
23
+ }
24
+ };
25
+ /**
26
+ * Style-Dictionary format that generates a Tailwind plugin module.
27
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
28
+ * in tailwind.config.js.
29
+ */
30
+ exports.tailwindPluginFormat = {
31
+ name: 'tailwind/plugin/js',
32
+ format({ dictionary, options }) {
33
+ const config = (0, buildTailwindConfig_js_1.buildTailwindConfig)(dictionary.allTokens, options.ignoredTokenNames ?? []);
34
+ const themeSection = JSON.stringify(config.theme, null, 2);
35
+ const header = `// ------------------------------------------------------------------------------
36
+ // <auto-generated>
37
+ // This code was generated by a tool.
38
+ // Changes to this file may cause incorrect behavior and will be lost if
39
+ // the code is regenerated.
40
+ // </auto-generated>
41
+ // ------------------------------------------------------------------------------`;
42
+ return `${header}\n\nconst plugin = require('tailwindcss/plugin');
43
+
44
+ module.exports = plugin(function({ addUtilities, theme, e }) {
45
+ // Optional: Add custom utilities here
46
+ // Example: Custom shadow utilities
47
+ // const shadows = theme('boxShadow') || {};
48
+ // const shadowUtils = Object.entries(shadows).reduce((acc, [key, value]) => {
49
+ // acc['.' + e('shadow-' + key)] = { boxShadow: value };
50
+ // return acc;
51
+ // }, {});
52
+ // addUtilities(shadowUtils);
53
+ }, ${themeSection});
54
+ `;
55
+ }
56
+ };
57
+ //# sourceMappingURL=tailwindFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwindFormat.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v3/tailwindFormat.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAGlB,qEAA+D;AAE/D,aAAa;AAEb;;;GAGG;AACU,QAAA,oBAAoB,GAAW;IACxC,IAAI,EAAE,oBAAoB;IAC1B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,4CAAmB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC1F,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAC3E,OAAO,GAAG,MAAM,wBAAwB,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC;IACjF,CAAC;CACJ,CAAC;AAEF;;;;GAIG;AACU,QAAA,oBAAoB,GAAW;IACxC,IAAI,EAAE,oBAAoB;IAC1B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,4CAAmB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC1F,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAE3E,OAAO,GAAG,MAAM;;;;;;;;;;;KAWnB,YAAY;CAChB,CAAC;IACE,CAAC;CACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Format } from 'style-dictionary/types';
2
+ /**
3
+ * Style-Dictionary format that outputs a CommonJS `tailwind.config.js`,
4
+ * exporting the theme configuration as `module.exports = …`.
5
+ */
6
+ export declare const tailwindPresetTsFormat: Format;
7
+ /**
8
+ * Style-Dictionary format that generates a Tailwind plugin module.
9
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
10
+ * in tailwind.config.js.
11
+ */
12
+ export declare const tailwindPluginTsFormat: Format;
13
+ //# sourceMappingURL=tailwindFormat2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwindFormat2.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v3/tailwindFormat2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,MAAM,EAAgB,MAAM,wBAAwB,CAAC;AAKvF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAuBpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAgCpC,CAAC"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ // #region Imports
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.tailwindPluginTsFormat = exports.tailwindPresetTsFormat = void 0;
5
+ const buildTailwindConfig_js_1 = require("./buildTailwindConfig.js");
6
+ // #endregion
7
+ /**
8
+ * Style-Dictionary format that outputs a CommonJS `tailwind.config.js`,
9
+ * exporting the theme configuration as `module.exports = …`.
10
+ */
11
+ exports.tailwindPresetTsFormat = {
12
+ name: 'tailwind/preset/ts',
13
+ format({ dictionary, options }) {
14
+ const config = (0, buildTailwindConfig_js_1.buildTailwindConfig)(dictionary.allTokens, options.ignoredTokenNames ?? []);
15
+ const header = `// ------------------------------------------------------------------------------
16
+ // <auto-generated>
17
+ // This code was generated by a tool.
18
+ // Changes to this file may cause incorrect behavior and will be lost if
19
+ // the code is regenerated.
20
+ // </auto-generated>
21
+ // ------------------------------------------------------------------------------`;
22
+ return `
23
+ ${header}
24
+
25
+ import { Config } from 'tailwindcss';
26
+
27
+ module.exports = ${JSON.stringify(config, null, 2)} satisfies Partial<Config>;
28
+ `.trim();
29
+ }
30
+ };
31
+ /**
32
+ * Style-Dictionary format that generates a Tailwind plugin module.
33
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
34
+ * in tailwind.config.js.
35
+ */
36
+ exports.tailwindPluginTsFormat = {
37
+ name: 'tailwind/plugin/ts',
38
+ format({ dictionary, options }) {
39
+ const config = (0, buildTailwindConfig_js_1.buildTailwindConfig)(dictionary.allTokens, options.ignoredTokenNames ?? []);
40
+ const themeSection = JSON.stringify(config.theme, null, 2);
41
+ const header = `// ------------------------------------------------------------------------------
42
+ // <auto-generated>
43
+ // This code was generated by a tool.
44
+ // Changes to this file may cause incorrect behavior and will be lost if
45
+ // the code is regenerated.
46
+ // </auto-generated>
47
+ // ------------------------------------------------------------------------------`;
48
+ return `${header}
49
+
50
+ import createPlugin from 'tailwindcss/plugin';
51
+
52
+ module.exports = createPlugin(function({ addUtilities, theme, e }) {
53
+ // Optional: Add custom utilities here
54
+ // Example: Custom shadow utilities
55
+ // const shadows = theme('boxShadow') || {};
56
+ // const shadowUtils = Object.entries(shadows).reduce((acc, [key, value]) => {
57
+ // acc['.' + e('shadow-' + key)] = { boxShadow: value };
58
+ // return acc;
59
+ // }, {});
60
+ // addUtilities(shadowUtils);
61
+ }, ${themeSection});
62
+ `.trim();
63
+ }
64
+ };
65
+ //# sourceMappingURL=tailwindFormat2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwindFormat2.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v3/tailwindFormat2.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAGlB,qEAA+D;AAE/D,aAAa;AAEb;;;GAGG;AACU,QAAA,sBAAsB,GAAW;IAC1C,IAAI,EAAE,oBAAoB;IAC1B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,4CAAmB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC1F,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAE3E,OAAO;EACb,MAAM;;;;mBAIW,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;SACzC,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;CACJ,CAAC;AAEF;;;;GAIG;AACU,QAAA,sBAAsB,GAAW;IAC1C,IAAI,EAAE,oBAAoB;IAC1B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,4CAAmB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC1F,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAE3E,OAAO,GAAG,MAAM;;;;;;;;;;;;;KAanB,YAAY;CAChB,CAAC,IAAI,EAAE,CAAC;IACL,CAAC;CACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { Format } from 'style-dictionary/types';
2
+ /**
3
+ * Style-Dictionary format that outputs a CommonJS `tailwind.config.js`,
4
+ * exporting the theme configuration as `module.exports = …`.
5
+ *
6
+ * @public
7
+ */
8
+ export declare const tailwindV3PresetFormat: Format;
9
+ /**
10
+ * Style-Dictionary format that generates a Tailwind v3 plugin module.
11
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
12
+ * in tailwind.config.js.
13
+ *
14
+ * @public
15
+ */
16
+ export declare const tailwindV3PluginFormat: Format;
17
+ /**
18
+ * Style-Dictionary format that outputs a TypeScript Tailwind v3 preset,
19
+ * exporting the theme configuration with type annotations.
20
+ *
21
+ * @public
22
+ */
23
+ export declare const tailwindV3PresetTsFormat: Format;
24
+ /**
25
+ * Style-Dictionary format that generates a TypeScript Tailwind v3 plugin module.
26
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
27
+ * in tailwind.config.ts.
28
+ *
29
+ * @public
30
+ */
31
+ export declare const tailwindV3PluginTsFormat: Format;
32
+ //# sourceMappingURL=tailwindV3Format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwindV3Format.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v3/tailwindV3Format.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,MAAM,EAAgB,MAAM,wBAAwB,CAAC;AAKvF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAgBpC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,MA8BpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAuBtC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAgCtC,CAAC"}
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ // #region Imports
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.tailwindV3PluginTsFormat = exports.tailwindV3PresetTsFormat = exports.tailwindV3PluginFormat = exports.tailwindV3PresetFormat = void 0;
5
+ const buildTailwindV3Config_js_1 = require("./buildTailwindV3Config.js");
6
+ // #endregion
7
+ /**
8
+ * Style-Dictionary format that outputs a CommonJS `tailwind.config.js`,
9
+ * exporting the theme configuration as `module.exports = …`.
10
+ *
11
+ * @public
12
+ */
13
+ exports.tailwindV3PresetFormat = {
14
+ name: 'tailwind/v3/preset/js',
15
+ format({ dictionary, options }) {
16
+ const config = (0, buildTailwindV3Config_js_1.buildTailwindV3Config)(dictionary.allTokens, options.ignoredTokenNames ?? []);
17
+ const header = `// ------------------------------------------------------------------------------
18
+ // <auto-generated>
19
+ // This code was generated by a tool.
20
+ // Changes to this file may cause incorrect behavior and will be lost if
21
+ // the code is regenerated.
22
+ // </auto-generated>
23
+ // ------------------------------------------------------------------------------`;
24
+ return `${header}\n\nmodule.exports = ${JSON.stringify(config, null, 2)};\n`;
25
+ }
26
+ };
27
+ /**
28
+ * Style-Dictionary format that generates a Tailwind v3 plugin module.
29
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
30
+ * in tailwind.config.js.
31
+ *
32
+ * @public
33
+ */
34
+ exports.tailwindV3PluginFormat = {
35
+ name: 'tailwind/v3/plugin/js',
36
+ format({ dictionary, options }) {
37
+ const config = (0, buildTailwindV3Config_js_1.buildTailwindV3Config)(dictionary.allTokens, options.ignoredTokenNames ?? []);
38
+ const themeSection = JSON.stringify(config.theme, null, 2);
39
+ const header = `// ------------------------------------------------------------------------------
40
+ // <auto-generated>
41
+ // This code was generated by a tool.
42
+ // Changes to this file may cause incorrect behavior and will be lost if
43
+ // the code is regenerated.
44
+ // </auto-generated>
45
+ // ------------------------------------------------------------------------------`;
46
+ return `${header}\n\nconst plugin = require('tailwindcss/plugin');
47
+
48
+ module.exports = plugin(function({ addUtilities, theme, e }) {
49
+ // Optional: Add custom utilities here
50
+ // Example: Custom shadow utilities
51
+ // const shadows = theme('boxShadow') || {};
52
+ // const shadowUtils = Object.entries(shadows).reduce((acc, [key, value]) => {
53
+ // acc['.' + e('shadow-' + key)] = { boxShadow: value };
54
+ // return acc;
55
+ // }, {});
56
+ // addUtilities(shadowUtils);
57
+ }, ${themeSection});
58
+ `;
59
+ }
60
+ };
61
+ /**
62
+ * Style-Dictionary format that outputs a TypeScript Tailwind v3 preset,
63
+ * exporting the theme configuration with type annotations.
64
+ *
65
+ * @public
66
+ */
67
+ exports.tailwindV3PresetTsFormat = {
68
+ name: 'tailwind/v3/preset/ts',
69
+ format({ dictionary, options }) {
70
+ const config = (0, buildTailwindV3Config_js_1.buildTailwindV3Config)(dictionary.allTokens, options.ignoredTokenNames ?? []);
71
+ const header = `// ------------------------------------------------------------------------------
72
+ // <auto-generated>
73
+ // This code was generated by a tool.
74
+ // Changes to this file may cause incorrect behavior and will be lost if
75
+ // the code is regenerated.
76
+ // </auto-generated>
77
+ // ------------------------------------------------------------------------------`;
78
+ return `
79
+ ${header}
80
+
81
+ import { Config } from 'tailwindcss';
82
+
83
+ module.exports = ${JSON.stringify(config, null, 2)} satisfies Partial<Config>;
84
+ `.trim();
85
+ }
86
+ };
87
+ /**
88
+ * Style-Dictionary format that generates a TypeScript Tailwind v3 plugin module.
89
+ * Exports a proper Tailwind CSS plugin that can be added to the plugins array
90
+ * in tailwind.config.ts.
91
+ *
92
+ * @public
93
+ */
94
+ exports.tailwindV3PluginTsFormat = {
95
+ name: 'tailwind/v3/plugin/ts',
96
+ format({ dictionary, options }) {
97
+ const config = (0, buildTailwindV3Config_js_1.buildTailwindV3Config)(dictionary.allTokens, options.ignoredTokenNames ?? []);
98
+ const themeSection = JSON.stringify(config.theme, null, 2);
99
+ const header = `// ------------------------------------------------------------------------------
100
+ // <auto-generated>
101
+ // This code was generated by a tool.
102
+ // Changes to this file may cause incorrect behavior and will be lost if
103
+ // the code is regenerated.
104
+ // </auto-generated>
105
+ // ------------------------------------------------------------------------------`;
106
+ return `${header}
107
+
108
+ import createPlugin from 'tailwindcss/plugin';
109
+
110
+ module.exports = createPlugin(function({ addUtilities, theme, e }) {
111
+ // Optional: Add custom utilities here
112
+ // Example: Custom shadow utilities
113
+ // const shadows = theme('boxShadow') || {};
114
+ // const shadowUtils = Object.entries(shadows).reduce((acc, [key, value]) => {
115
+ // acc['.' + e('shadow-' + key)] = { boxShadow: value };
116
+ // return acc;
117
+ // }, {});
118
+ // addUtilities(shadowUtils);
119
+ }, ${themeSection});
120
+ `.trim();
121
+ }
122
+ };
123
+ //# sourceMappingURL=tailwindV3Format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwindV3Format.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v3/tailwindV3Format.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAGlB,yEAAmE;AAEnE,aAAa;AAEb;;;;;GAKG;AACU,QAAA,sBAAsB,GAAW;IAC1C,IAAI,EAAE,uBAAuB;IAC7B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,gDAAqB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC5F,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAC3E,OAAO,GAAG,MAAM,wBAAwB,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC;IACjF,CAAC;CACJ,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,sBAAsB,GAAW;IAC1C,IAAI,EAAE,uBAAuB;IAC7B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,gDAAqB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC5F,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAE3E,OAAO,GAAG,MAAM;;;;;;;;;;;KAWnB,YAAY;CAChB,CAAC;IACE,CAAC;CACJ,CAAC;AAEF;;;;;GAKG;AACU,QAAA,wBAAwB,GAAW;IAC5C,IAAI,EAAE,uBAAuB;IAC7B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,gDAAqB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC5F,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAE3E,OAAO;EACb,MAAM;;;;mBAIW,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;SACzC,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;CACJ,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,wBAAwB,GAAW;IAC5C,IAAI,EAAE,uBAAuB;IAC7B,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAG3B;QACG,MAAM,MAAM,GAAG,IAAA,gDAAqB,EAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;QAC5F,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG;;;;;;kFAM2D,CAAC;QAE3E,OAAO,GAAG,MAAM;;;;;;;;;;;;;KAanB,YAAY;CAChB,CAAC,IAAI,EAAE,CAAC;IACL,CAAC;CACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Supported logical token types as returned by `getType`.
3
+ *
4
+ * This mirrors your original formatter's behavior and is used for
5
+ * type-based fallback mapping if no valid category is present.
6
+ *
7
+ * @public
8
+ */
9
+ export type DesignTokenType = 'borderRadius' | 'borderWidth' | 'color' | 'duration' | 'font' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'height' | 'letterSpacing' | 'lineHeight' | 'maxHeight' | 'maxWidth' | 'minHeight' | 'minWidth' | 'opacity' | 'shadow' | 'size' | 'spacing' | 'textDecorationLine' | 'textTransform' | 'width' | 'zIndex';
10
+ //# sourceMappingURL=DesignTokenType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DesignTokenType.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/DesignTokenType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,oBAAoB,GAAG,eAAe,GAAG,OAAO,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DesignTokenType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DesignTokenType.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/DesignTokenType.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ import type { DesignTokenType } from './DesignTokenType.js';
2
+ /**
3
+ * Tailwind v4 CSS variable namespace prefixes.
4
+ * In Tailwind v4, theme values are exposed as CSS custom properties
5
+ * with specific namespace prefixes.
6
+ *
7
+ * @public
8
+ */
9
+ export type TailwindV4Namespace = '--color' | '--font-family' | '--font-size' | '--font-weight' | '--letter-spacing' | '--line-height' | '--radius' | '--shadow' | '--spacing' | '--width' | '--height' | '--z' | '--opacity' | '--transition-duration' | '--border-width';
10
+ /**
11
+ * Function type for transforming token paths into Tailwind v4 compatible variable names.
12
+ *
13
+ * @public
14
+ */
15
+ export type PathTransformFn = (path: ReadonlyArray<string>) => string;
16
+ /**
17
+ * Internal mapping definition for Tailwind v4.
18
+ * Maps tokens to CSS custom property namespaces.
19
+ *
20
+ * @public
21
+ */
22
+ export interface IV4KeyMapping {
23
+ readonly namespace: TailwindV4Namespace;
24
+ readonly pathTransform?: PathTransformFn;
25
+ }
26
+ /**
27
+ * Set of supported design token types for validation.
28
+ * Used only for logging; unsupported types are skipped.
29
+ *
30
+ * @public
31
+ */
32
+ export declare const SUPPORTED_TOKEN_TYPES: ReadonlyArray<DesignTokenType>;
33
+ /**
34
+ * Maps category values to Tailwind v4 CSS variable namespaces.
35
+ *
36
+ * @public
37
+ */
38
+ export declare const CATEGORY_TO_V4_MAPPING: Record<string, IV4KeyMapping>;
39
+ /**
40
+ * Fallback mapping from logical token type → Tailwind v4 namespace.
41
+ *
42
+ * @public
43
+ */
44
+ export declare const TOKEN_TYPE_TO_V4_MAPPING: Partial<Record<DesignTokenType, IV4KeyMapping>>;
45
+ //# sourceMappingURL=TailwindV4PropertyMapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TailwindV4PropertyMapping.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/TailwindV4PropertyMapping.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM5D;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,eAAe,GAAG,kBAAkB,GAAG,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,KAAK,GAAG,WAAW,GAAG,uBAAuB,GAAG,gBAAgB,CAAC;AAE3Q;;;;GAIG;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;CAC5C;AAMD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,eAAe,CAwBhE,CAAC;AAkIF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAiEhE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAqFpF,CAAC"}