@shell-shock/plugin-theme 0.0.6 → 0.0.8
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/README.md +1 -1
- package/dist/index.cjs +2 -2
- 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 +4 -3
- package/dist/index.mjs.map +1 -0
- package/dist/style-dictionary/helpers.cjs +20 -0
- package/dist/style-dictionary/helpers.mjs +22 -1
- package/dist/style-dictionary/helpers.mjs.map +1 -0
- package/dist/style-dictionary/preprocessor.cjs +100 -38
- package/dist/style-dictionary/preprocessor.mjs +102 -39
- package/dist/style-dictionary/preprocessor.mjs.map +1 -0
- package/dist/themes/storm.cjs +9 -5
- package/dist/themes/storm.mjs +11 -6
- package/dist/themes/storm.mjs.map +1 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/plugin.d.cts +2 -1
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +2 -1
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/theme.d.cts +33 -6
- package/dist/types/theme.d.cts.map +1 -0
- package/dist/types/theme.d.mts +33 -6
- package/dist/types/theme.d.mts.map +1 -0
- package/package.json +40 -40
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the ⚡<b>Shell Shock</b> monorepo. The Shell Shock pack
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/shell-shock/) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
package/dist/index.cjs
CHANGED
|
@@ -17,7 +17,7 @@ const plugin = (options = {}) => {
|
|
|
17
17
|
return [(0, __powerlines_plugin_style_dictionary.default)((0, __stryke_helpers_omit.omit)(options, ["theme"])), {
|
|
18
18
|
name: "shell-shock:theme",
|
|
19
19
|
config() {
|
|
20
|
-
this.
|
|
20
|
+
this.debug("Providing default configuration for the Shell Shock `theme` plugin.");
|
|
21
21
|
return {
|
|
22
22
|
theme: options.theme ?? require_storm.theme,
|
|
23
23
|
styleDictionary: { customPreprocessors: (context) => ({ "shell-shock/preprocessor": require_preprocessor.preprocessor(context) }) }
|
|
@@ -26,7 +26,7 @@ const plugin = (options = {}) => {
|
|
|
26
26
|
configResolved: {
|
|
27
27
|
order: "pre",
|
|
28
28
|
async handler() {
|
|
29
|
-
this.
|
|
29
|
+
this.debug("Shell Shock `theme` plugin configuration resolved.");
|
|
30
30
|
this.config.styleDictionary = (0, defu.default)(this.config.styleDictionary, {
|
|
31
31
|
tokens: (0, __stryke_type_checks_is_set_object.isSetObject)(this.config.theme) ? this.config.theme : {},
|
|
32
32
|
platforms: { js: {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig } from "./types/theme.cjs";
|
|
1
|
+
import { ThemeBorderStyleAppSubItemResolvedConfig, ThemeBorderStyleAppSubItemUserConfig, ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderAppSubItemResolvedConfig, ThemeColorBorderAppSubItemUserConfig, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemeMessageVariant, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig } from "./types/theme.cjs";
|
|
2
2
|
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "./types/plugin.cjs";
|
|
3
|
+
import "./types/index.cjs";
|
|
3
4
|
import { Plugin } from "powerlines";
|
|
4
5
|
|
|
5
6
|
//#region src/index.d.ts
|
|
6
|
-
|
|
7
7
|
/**
|
|
8
8
|
* The Style Dictionary - Shell Shock plugin to use Style Dictionary tokens to select theme colors to Shell Shock projects.
|
|
9
9
|
*/
|
|
10
10
|
declare const plugin: <TContext extends ThemePluginContext = ThemePluginContext>(options?: ThemePluginOptions) => Plugin<TContext>[];
|
|
11
11
|
//#endregion
|
|
12
|
-
export { ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig, plugin as default, plugin };
|
|
12
|
+
export { ThemeBorderStyleAppSubItemResolvedConfig, ThemeBorderStyleAppSubItemUserConfig, ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderAppSubItemResolvedConfig, ThemeColorBorderAppSubItemUserConfig, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemeMessageVariant, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig, plugin as default, plugin };
|
|
13
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAiCa,cAAA,MA4DZ,EAAA,CAAA,iBA3DkB,kBA2DlB,GA3DuC,kBA2DvC,CAAA,CAAA,OAAA,CAAA,EAzDU,kBAyDV,EAAA,GAxDE,MAwDF,CAxDS,QAwDT,CAAA,EAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig } from "./types/theme.mjs";
|
|
1
|
+
import { ThemeBorderStyleAppSubItemResolvedConfig, ThemeBorderStyleAppSubItemUserConfig, ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderAppSubItemResolvedConfig, ThemeColorBorderAppSubItemUserConfig, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemeMessageVariant, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig } from "./types/theme.mjs";
|
|
2
2
|
import { ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig } from "./types/plugin.mjs";
|
|
3
|
+
import "./types/index.mjs";
|
|
3
4
|
import { Plugin } from "powerlines";
|
|
4
5
|
|
|
5
6
|
//#region src/index.d.ts
|
|
6
|
-
|
|
7
7
|
/**
|
|
8
8
|
* The Style Dictionary - Shell Shock plugin to use Style Dictionary tokens to select theme colors to Shell Shock projects.
|
|
9
9
|
*/
|
|
10
10
|
declare const plugin: <TContext extends ThemePluginContext = ThemePluginContext>(options?: ThemePluginOptions) => Plugin<TContext>[];
|
|
11
11
|
//#endregion
|
|
12
|
-
export { ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig, plugin as default, plugin };
|
|
12
|
+
export { ThemeBorderStyleAppSubItemResolvedConfig, ThemeBorderStyleAppSubItemUserConfig, ThemeBorderStyleMessageStateResolvedConfig, ThemeBorderStyleMessageStateUserConfig, ThemeBorderStyleSectionTypesResolvedConfig, ThemeBorderStyleSectionTypesUserConfig, ThemeBorderStyleSubItemResolvedConfig, ThemeBorderStyleSubItemUserConfig, ThemeBorderStylesResolvedConfig, ThemeBorderStylesUserConfig, ThemeColorBannerSubItem, ThemeColorBodySubItem, ThemeColorBorderAppSubItemResolvedConfig, ThemeColorBorderAppSubItemUserConfig, ThemeColorBorderItemsResolvedConfig, ThemeColorBorderItemsUserConfig, ThemeColorBorderSubItemResolvedConfig, ThemeColorBorderSubItemUserConfig, ThemeColorMessageState, ThemeColorMessageSubItemResolvedConfig, ThemeColorMessageSubItemUserConfig, ThemeColorSubItem, ThemeColorTextItemsResolvedConfig, ThemeColorTextItemsUserConfig, ThemeColorTypesUserConfig, ThemeColorUsageSubItem, ThemeColorsResolvedConfig, ThemeIconMessageStateConfig, ThemeIconSubItemConfig, ThemeIconTypeResolvedConfig, ThemeIconTypeUserConfig, ThemeIconsResolvedConfig, ThemeIconsUserConfig, ThemeLabelMessageStateConfig, ThemeLabelTypeResolvedConfig, ThemeLabelTypeUserConfig, ThemeLabelsResolvedConfig, ThemeLabelsUserConfig, ThemeMessageVariant, ThemePaddingResolvedConfig, ThemePaddingUserConfig, ThemePluginContext, ThemePluginOptions, ThemePluginResolvedConfig, ThemePluginUserConfig, ThemeResolvedConfig, ThemeStyleBorderIdentifiers, ThemeStyleBorderType, ThemeStyleBorderTypeConfig, ThemeUserConfig, plugin as default, plugin };
|
|
13
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAiCa,cAAA,MA4DZ,EAAA,CAAA,iBA3DkB,kBA2DlB,GA3DuC,kBA2DvC,CAAA,CAAA,OAAA,CAAA,EAzDU,kBAyDV,EAAA,GAxDE,MAwDF,CAxDS,QAwDT,CAAA,EAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ const plugin = (options = {}) => {
|
|
|
13
13
|
return [styleDictionary(omit(options, ["theme"])), {
|
|
14
14
|
name: "shell-shock:theme",
|
|
15
15
|
config() {
|
|
16
|
-
this.
|
|
16
|
+
this.debug("Providing default configuration for the Shell Shock `theme` plugin.");
|
|
17
17
|
return {
|
|
18
18
|
theme: options.theme ?? theme,
|
|
19
19
|
styleDictionary: { customPreprocessors: (context) => ({ "shell-shock/preprocessor": preprocessor(context) }) }
|
|
@@ -22,7 +22,7 @@ const plugin = (options = {}) => {
|
|
|
22
22
|
configResolved: {
|
|
23
23
|
order: "pre",
|
|
24
24
|
async handler() {
|
|
25
|
-
this.
|
|
25
|
+
this.debug("Shell Shock `theme` plugin configuration resolved.");
|
|
26
26
|
this.config.styleDictionary = defu(this.config.styleDictionary, {
|
|
27
27
|
tokens: isSetObject(this.config.theme) ? this.config.theme : {},
|
|
28
28
|
platforms: { js: {
|
|
@@ -49,4 +49,5 @@ const plugin = (options = {}) => {
|
|
|
49
49
|
var src_default = plugin;
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
|
-
export { src_default as default, plugin };
|
|
52
|
+
export { src_default as default, plugin };
|
|
53
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\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/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport styleDictionary from \"@powerlines/plugin-style-dictionary\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport type { Config } from \"style-dictionary/types\";\nimport { preprocessor } from \"./style-dictionary/preprocessor\";\nimport { theme } from \"./themes/storm\";\nimport type { ThemePluginContext, ThemePluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * The Style Dictionary - Shell Shock plugin to use Style Dictionary tokens to select theme colors to Shell Shock projects.\n */\nexport const plugin = <\n TContext extends ThemePluginContext = ThemePluginContext\n>(\n options: ThemePluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n styleDictionary(omit(options, [\"theme\"])),\n {\n name: \"shell-shock:theme\",\n config() {\n this.debug(\n \"Providing default configuration for the Shell Shock `theme` plugin.\"\n );\n\n return {\n theme: options.theme ?? theme,\n styleDictionary: {\n customPreprocessors: (context: TContext) => ({\n \"shell-shock/preprocessor\": preprocessor(context)\n })\n }\n };\n },\n configResolved: {\n order: \"pre\",\n async handler() {\n this.debug(\"Shell Shock `theme` plugin configuration resolved.\");\n\n this.config.styleDictionary = defu(this.config.styleDictionary, {\n tokens: isSetObject(this.config.theme) ? this.config.theme : {},\n platforms: {\n js: {\n preprocessors: [\"shell-shock/preprocessor\"],\n transformGroup: \"js\",\n transforms: [\"name/camel\"],\n fileHeader: \"powerlines/file-header\",\n buildPath: this.config.output.outputPath,\n files: [\n {\n format: \"javascript/module\",\n destination: \"theme.js\",\n options: {\n minify: this.config.mode === \"production\"\n }\n },\n {\n format: \"typescript/module-declarations\",\n destination: \"theme.d.ts\",\n options: {\n minify: this.config.mode === \"production\"\n }\n }\n ]\n }\n }\n } as Config);\n }\n }\n }\n ];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAiCA,MAAa,UAGX,UAA8B,EAAE,KACT;AACvB,QAAO,CACL,gBAAgB,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC,EACzC;EACE,MAAM;EACN,SAAS;AACP,QAAK,MACH,sEACD;AAED,UAAO;IACL,OAAO,QAAQ,SAAS;IACxB,iBAAiB,EACf,sBAAsB,aAAuB,EAC3C,4BAA4B,aAAa,QAAQ,EAClD,GACF;IACF;;EAEH,gBAAgB;GACd,OAAO;GACP,MAAM,UAAU;AACd,SAAK,MAAM,qDAAqD;AAEhE,SAAK,OAAO,kBAAkB,KAAK,KAAK,OAAO,iBAAiB;KAC9D,QAAQ,YAAY,KAAK,OAAO,MAAM,GAAG,KAAK,OAAO,QAAQ,EAAE;KAC/D,WAAW,EACT,IAAI;MACF,eAAe,CAAC,2BAA2B;MAC3C,gBAAgB;MAChB,YAAY,CAAC,aAAa;MAC1B,YAAY;MACZ,WAAW,KAAK,OAAO,OAAO;MAC9B,OAAO,CACL;OACE,QAAQ;OACR,aAAa;OACb,SAAS,EACP,QAAQ,KAAK,OAAO,SAAS,cAC9B;OACF,EACD;OACE,QAAQ;OACR,aAAa;OACb,SAAS,EACP,QAAQ,KAAK,OAAO,SAAS,cAC9B;OACF,CACF;MACF,EACF;KACF,CAAW;;GAEf;EACF,CACF;;AAGH,kBAAe"}
|
|
@@ -68,6 +68,26 @@ function resolveBorderStyle(identifier) {
|
|
|
68
68
|
left: "|",
|
|
69
69
|
right: "|"
|
|
70
70
|
};
|
|
71
|
+
case "diagonal": return {
|
|
72
|
+
topLeft: "╱╱",
|
|
73
|
+
topRight: "╱╱",
|
|
74
|
+
bottomLeft: "╱╱",
|
|
75
|
+
bottomRight: "╱╱",
|
|
76
|
+
top: "╱",
|
|
77
|
+
bottom: "╱",
|
|
78
|
+
left: "╱╱",
|
|
79
|
+
right: "╱╱"
|
|
80
|
+
};
|
|
81
|
+
case "diagonal-thick": return {
|
|
82
|
+
topLeft: "🙼🙼",
|
|
83
|
+
topRight: "🙼🙼",
|
|
84
|
+
bottomLeft: "🙼🙼",
|
|
85
|
+
bottomRight: "🙼🙼",
|
|
86
|
+
top: "🙼",
|
|
87
|
+
bottom: "🙼",
|
|
88
|
+
left: "🙼🙼",
|
|
89
|
+
right: "🙼🙼"
|
|
90
|
+
};
|
|
71
91
|
case "pointer": return {
|
|
72
92
|
topLeft: "▶",
|
|
73
93
|
topRight: "◀",
|
|
@@ -67,6 +67,26 @@ function resolveBorderStyle(identifier) {
|
|
|
67
67
|
left: "|",
|
|
68
68
|
right: "|"
|
|
69
69
|
};
|
|
70
|
+
case "diagonal": return {
|
|
71
|
+
topLeft: "╱╱",
|
|
72
|
+
topRight: "╱╱",
|
|
73
|
+
bottomLeft: "╱╱",
|
|
74
|
+
bottomRight: "╱╱",
|
|
75
|
+
top: "╱",
|
|
76
|
+
bottom: "╱",
|
|
77
|
+
left: "╱╱",
|
|
78
|
+
right: "╱╱"
|
|
79
|
+
};
|
|
80
|
+
case "diagonal-thick": return {
|
|
81
|
+
topLeft: "🙼🙼",
|
|
82
|
+
topRight: "🙼🙼",
|
|
83
|
+
bottomLeft: "🙼🙼",
|
|
84
|
+
bottomRight: "🙼🙼",
|
|
85
|
+
top: "🙼",
|
|
86
|
+
bottom: "🙼",
|
|
87
|
+
left: "🙼🙼",
|
|
88
|
+
right: "🙼🙼"
|
|
89
|
+
};
|
|
70
90
|
case "pointer": return {
|
|
71
91
|
topLeft: "▶",
|
|
72
92
|
topRight: "◀",
|
|
@@ -144,4 +164,5 @@ function resolveBorderStyle(identifier) {
|
|
|
144
164
|
}
|
|
145
165
|
|
|
146
166
|
//#endregion
|
|
147
|
-
export { resolveBorderStyle };
|
|
167
|
+
export { resolveBorderStyle };
|
|
168
|
+
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.mjs","names":[],"sources":["../../src/style-dictionary/helpers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\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/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n ThemeStyleBorderIdentifiers,\n ThemeStyleBorderTypeConfig\n} from \"../types/theme\";\n\n/**\n * Applies the specified border style type and returns the corresponding border characters.\n *\n * @param identifier - The border style identifier.\n * @returns The border type configuration with the corresponding characters.\n */\nexport function resolveBorderStyle(\n identifier: ThemeStyleBorderIdentifiers\n): ThemeStyleBorderTypeConfig {\n switch (identifier) {\n case \"double\":\n return {\n topLeft: \"╔\",\n topRight: \"╗\",\n bottomLeft: \"╚\",\n bottomRight: \"╝\",\n top: \"═\",\n bottom: \"═\",\n left: \"║\",\n right: \"║\"\n };\n case \"bold\":\n return {\n topLeft: \"┏\",\n topRight: \"┓\",\n bottomLeft: \"┗\",\n bottomRight: \"┛\",\n top: \"━\",\n bottom: \"━\",\n left: \"┃\",\n right: \"┃\"\n };\n case \"round\":\n return {\n topLeft: \"╭\",\n topRight: \"╮\",\n bottomLeft: \"╰\",\n bottomRight: \"╯\",\n top: \"─\",\n bottom: \"─\",\n left: \"│\",\n right: \"│\"\n };\n case \"single-double\":\n return {\n topLeft: \"╓\",\n topRight: \"╖\",\n bottomLeft: \"╙\",\n bottomRight: \"╜\",\n top: \"─\",\n bottom: \"─\",\n left: \"║\",\n right: \"║\"\n };\n case \"double-single\":\n return {\n topLeft: \"╒\",\n topRight: \"╕\",\n bottomLeft: \"╘\",\n bottomRight: \"╛\",\n top: \"═\",\n bottom: \"═\",\n left: \"│\",\n right: \"│\"\n };\n case \"classic\":\n return {\n topLeft: \"+\",\n topRight: \"+\",\n bottomLeft: \"+\",\n bottomRight: \"+\",\n top: \"-\",\n bottom: \"-\",\n left: \"|\",\n right: \"|\"\n };\n case \"diagonal\":\n return {\n topLeft: \"╱╱\",\n topRight: \"╱╱\",\n bottomLeft: \"╱╱\",\n bottomRight: \"╱╱\",\n top: \"╱\",\n bottom: \"╱\",\n left: \"╱╱\",\n right: \"╱╱\"\n };\n case \"diagonal-thick\":\n return {\n topLeft: \"🙼🙼\",\n topRight: \"🙼🙼\",\n bottomLeft: \"🙼🙼\",\n bottomRight: \"🙼🙼\",\n top: \"🙼\",\n bottom: \"🙼\",\n left: \"🙼🙼\",\n right: \"🙼🙼\"\n };\n case \"pointer\":\n return {\n topLeft: \"▶\",\n topRight: \"◀\",\n bottomLeft: \"◀\",\n bottomRight: \"▶\",\n top: \"─\",\n bottom: \"─\",\n left: \"►\",\n right: \"◄\"\n };\n case \"outward-arrow\":\n return {\n topLeft: \"↗\",\n topRight: \"↖\",\n bottomLeft: \"↙\",\n bottomRight: \"↘\",\n top: \"↑\",\n bottom: \"↓\",\n left: \"←\",\n right: \"→\"\n };\n case \"arrow\":\n case \"inward-arrow\":\n return {\n topLeft: \"↘\",\n topRight: \"↙\",\n bottomLeft: \"↖\",\n bottomRight: \"↗\",\n top: \"↓\",\n bottom: \"↑\",\n left: \"→\",\n right: \"←\"\n };\n case \"outward-double-arrow\":\n return {\n topLeft: \"⇗\",\n topRight: \"⇖\",\n bottomLeft: \"⇙\",\n bottomRight: \"⇘\",\n top: \"⇑\",\n bottom: \"⇓\",\n left: \"⇐\",\n right: \"⇒\"\n };\n case \"double-arrow\":\n case \"inward-double-arrow\":\n return {\n topLeft: \"⇘\",\n topRight: \"⇙\",\n bottomLeft: \"⇖\",\n bottomRight: \"⇗\",\n top: \"⇓\",\n bottom: \"⇑\",\n left: \"⇒\",\n right: \"⇐\"\n };\n case \"none\":\n return {\n topLeft: \" \",\n topRight: \" \",\n bottomLeft: \" \",\n bottomRight: \" \",\n top: \" \",\n bottom: \" \",\n left: \" \",\n right: \" \"\n };\n case \"single\":\n default:\n return {\n topLeft: \"┌\",\n topRight: \"┐\",\n bottomLeft: \"└\",\n bottomRight: \"┘\",\n top: \"─\",\n bottom: \"─\",\n left: \"│\",\n right: \"│\"\n };\n }\n}\n"],"mappings":";;;;;;;AA6BA,SAAgB,mBACd,YAC4B;AAC5B,SAAQ,YAAR;EACE,KAAK,SACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,OACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,QACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,gBACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,gBACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,UACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,WACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,iBACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,UACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,gBACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK;EACL,KAAK,eACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,uBACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK;EACL,KAAK,sBACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK,OACH,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR;EACH,KAAK;EACL,QACE,QAAO;GACL,SAAS;GACT,UAAU;GACV,YAAY;GACZ,aAAa;GACb,KAAK;GACL,QAAQ;GACR,MAAM;GACN,OAAO;GACR"}
|