@shell-shock/plugin-theme 0.0.10 → 0.0.12

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 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
- [![Version](https://img.shields.io/badge/version-0.0.8-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/shell-shock/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/shell-shock/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.0.10-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/shell-shock/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/shell-shock/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
package/dist/index.cjs CHANGED
@@ -18,10 +18,7 @@ const plugin = (options = {}) => {
18
18
  name: "shell-shock:theme",
19
19
  config() {
20
20
  this.debug("Providing default configuration for the Shell Shock `theme` plugin.");
21
- return {
22
- theme: options.theme,
23
- styleDictionary: { customPreprocessors: (context) => ({ "shell-shock/preprocessor": require_preprocessor.preprocessor(context) }) }
24
- };
21
+ return { styleDictionary: { customPreprocessors: (context) => ({ "shell-shock/preprocessor": require_preprocessor.preprocessor(context) }) } };
25
22
  },
26
23
  configResolved: {
27
24
  order: "pre",
package/dist/index.mjs CHANGED
@@ -14,10 +14,7 @@ const plugin = (options = {}) => {
14
14
  name: "shell-shock:theme",
15
15
  config() {
16
16
  this.debug("Providing default configuration for the Shell Shock `theme` plugin.");
17
- return {
18
- theme: options.theme,
19
- styleDictionary: { customPreprocessors: (context) => ({ "shell-shock/preprocessor": preprocessor(context) }) }
20
- };
17
+ return { styleDictionary: { customPreprocessors: (context) => ({ "shell-shock/preprocessor": preprocessor(context) }) } };
21
18
  },
22
19
  configResolved: {
23
20
  order: "pre",
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["defaultTheme"],"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 as defaultTheme } 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(defu({ skipBuild: false }, 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,\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)\n ? defu(this.config.theme, defaultTheme)\n : defaultTheme,\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,EAAE,WAAW,OAAO,EAAE,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EACrE;EACE,MAAM;EACN,SAAS;AACP,QAAK,MACH,sEACD;AAED,UAAO;IACL,OAAO,QAAQ;IACf,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,GAClC,KAAK,KAAK,OAAO,OAAOA,MAAa,GACrCA;KACJ,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"}
1
+ {"version":3,"file":"index.mjs","names":["defaultTheme"],"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 as defaultTheme } 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(defu({ skipBuild: false }, 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,\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)\n ? defu(this.config.theme, defaultTheme)\n : defaultTheme,\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,EAAE,WAAW,OAAO,EAAE,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EACrE;EACE,MAAM;EACN,SAAS;AACP,QAAK,MACH,sEACD;AAED,UAAO,EAEL,iBAAiB,EACf,sBAAsB,aAAuB,EAC3C,4BAA4B,aAAa,QAAQ,EAClD,GACF,EACF;;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,GAClC,KAAK,KAAK,OAAO,OAAOA,MAAa,GACrCA;KACJ,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-theme",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "description": "A package containing a Shell Shock plugin to generate source code given a list design tokens.",
6
6
  "repository": {
@@ -110,18 +110,18 @@
110
110
  "storm-software"
111
111
  ],
112
112
  "dependencies": {
113
- "@powerlines/plugin-plugin": "^0.12.217",
114
- "@powerlines/plugin-style-dictionary": "^0.3.167",
113
+ "@powerlines/plugin-plugin": "^0.12.218",
114
+ "@powerlines/plugin-style-dictionary": "^0.3.168",
115
115
  "@stryke/helpers": "0.9.40",
116
116
  "@stryke/type-checks": "^0.5.23",
117
117
  "defu": "^6.1.4",
118
- "powerlines": "^0.38.33",
118
+ "powerlines": "^0.38.34",
119
119
  "style-dictionary": "^5.2.0"
120
120
  },
121
121
  "devDependencies": {
122
- "@powerlines/plugin-deepkit": "^0.11.145",
123
- "@types/node": "^22.19.8"
122
+ "@powerlines/plugin-deepkit": "^0.11.146",
123
+ "@types/node": "^22.19.9"
124
124
  },
125
125
  "publishConfig": { "access": "public" },
126
- "gitHead": "93f7eadb6fb5670226a117c04e7e8b505554d76d"
126
+ "gitHead": "2905cdd0c86c5c4f8b4205e82fd180ee0b97351e"
127
127
  }