@breadstone-infrastructure/style-dictionary 0.0.205 → 0.0.209
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/CHANGELOG.md +182 -0
- package/formats/index.d.ts +3 -0
- package/formats/index.d.ts.map +1 -0
- package/formats/{tailwind/index.js → index.js} +2 -2
- package/formats/index.js.map +1 -0
- package/formats/tailwind/v3/DesignTokenType.d.ts.map +1 -0
- package/formats/tailwind/v3/DesignTokenType.js.map +1 -0
- package/formats/tailwind/{TailwindPropertyMapping.d.ts → v3/TailwindV3PropertyMapping.d.ts} +15 -15
- package/formats/tailwind/v3/TailwindV3PropertyMapping.d.ts.map +1 -0
- package/formats/tailwind/{TailwindPropertyMapping.js → v3/TailwindV3PropertyMapping.js} +6 -6
- package/formats/tailwind/v3/TailwindV3PropertyMapping.js.map +1 -0
- package/formats/tailwind/{buildTailwindConfig.d.ts → v3/buildTailwindV3Config.d.ts} +5 -4
- package/formats/tailwind/v3/buildTailwindV3Config.d.ts.map +1 -0
- package/formats/tailwind/{buildTailwindConfig.js → v3/buildTailwindV3Config.js} +19 -17
- package/formats/tailwind/v3/buildTailwindV3Config.js.map +1 -0
- package/formats/tailwind/v3/index.d.ts +5 -0
- package/formats/tailwind/v3/index.d.ts.map +1 -0
- package/formats/tailwind/v3/index.js +21 -0
- package/formats/tailwind/v3/index.js.map +1 -0
- package/formats/tailwind/v3/tailwindV3Format.d.ts +32 -0
- package/formats/tailwind/v3/tailwindV3Format.d.ts.map +1 -0
- package/formats/tailwind/v3/tailwindV3Format.js +123 -0
- package/formats/tailwind/v3/tailwindV3Format.js.map +1 -0
- package/formats/tailwind/v4/DesignTokenType.d.ts +10 -0
- package/formats/tailwind/v4/DesignTokenType.d.ts.map +1 -0
- package/formats/tailwind/v4/DesignTokenType.js +3 -0
- package/formats/tailwind/v4/DesignTokenType.js.map +1 -0
- package/formats/tailwind/v4/TailwindV4PropertyMapping.d.ts +45 -0
- package/formats/tailwind/v4/TailwindV4PropertyMapping.d.ts.map +1 -0
- package/formats/tailwind/v4/TailwindV4PropertyMapping.js +322 -0
- package/formats/tailwind/v4/TailwindV4PropertyMapping.js.map +1 -0
- package/formats/tailwind/v4/buildTailwindV4Config.d.ts +83 -0
- package/formats/tailwind/v4/buildTailwindV4Config.d.ts.map +1 -0
- package/formats/tailwind/v4/buildTailwindV4Config.js +338 -0
- package/formats/tailwind/v4/buildTailwindV4Config.js.map +1 -0
- package/formats/tailwind/v4/buildTailwindV4Theme.d.ts +71 -0
- package/formats/tailwind/v4/buildTailwindV4Theme.d.ts.map +1 -0
- package/formats/tailwind/v4/buildTailwindV4Theme.js +247 -0
- package/formats/tailwind/v4/buildTailwindV4Theme.js.map +1 -0
- package/formats/tailwind/v4/index.d.ts +4 -0
- package/formats/tailwind/v4/index.d.ts.map +1 -0
- package/formats/tailwind/v4/index.js +20 -0
- package/formats/tailwind/v4/index.js.map +1 -0
- package/formats/tailwind/v4/tailwindV4Format.d.ts +119 -0
- package/formats/tailwind/v4/tailwindV4Format.d.ts.map +1 -0
- package/formats/tailwind/v4/tailwindV4Format.js +169 -0
- package/formats/tailwind/v4/tailwindV4Format.js.map +1 -0
- package/index.d.ts +3 -9
- package/index.d.ts.map +1 -1
- package/index.js +3 -17
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/preprocessors/index.d.ts +3 -0
- package/preprocessors/index.d.ts.map +1 -0
- package/preprocessors/index.js +19 -0
- package/preprocessors/index.js.map +1 -0
- package/transforms/index.d.ts +7 -0
- package/transforms/index.d.ts.map +1 -0
- package/transforms/index.js +23 -0
- package/transforms/index.js.map +1 -0
- package/formats/tailwind/DesignTokenType.d.ts.map +0 -1
- package/formats/tailwind/DesignTokenType.js.map +0 -1
- package/formats/tailwind/TailwindPropertyMapping.d.ts.map +0 -1
- package/formats/tailwind/TailwindPropertyMapping.js.map +0 -1
- package/formats/tailwind/buildTailwindConfig.d.ts.map +0 -1
- package/formats/tailwind/buildTailwindConfig.js.map +0 -1
- package/formats/tailwind/index.d.ts +0 -3
- package/formats/tailwind/index.d.ts.map +0 -1
- package/formats/tailwind/index.js.map +0 -1
- package/formats/tailwind/tailwindFormat.d.ts +0 -13
- package/formats/tailwind/tailwindFormat.d.ts.map +0 -1
- package/formats/tailwind/tailwindFormat.js +0 -57
- package/formats/tailwind/tailwindFormat.js.map +0 -1
- package/formats/tailwind/tailwindFormat2.d.ts +0 -13
- package/formats/tailwind/tailwindFormat2.d.ts.map +0 -1
- package/formats/tailwind/tailwindFormat2.js +0 -65
- package/formats/tailwind/tailwindFormat2.js.map +0 -1
- /package/formats/tailwind/{DesignTokenType.d.ts → v3/DesignTokenType.d.ts} +0 -0
- /package/formats/tailwind/{DesignTokenType.js → v3/DesignTokenType.js} +0 -0
|
@@ -1,57 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindFormat.js","sourceRoot":"","sources":["../../../src/formats/tailwind/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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindFormat2.d.ts","sourceRoot":"","sources":["../../../src/formats/tailwind/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"}
|
|
@@ -1,65 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindFormat2.js","sourceRoot":"","sources":["../../../src/formats/tailwind/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"}
|
|
File without changes
|
|
File without changes
|