@shell-shock/plugin-theme 0.2.2 → 0.3.0

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 (40) hide show
  1. package/dist/contexts/index.cjs +4 -0
  2. package/dist/contexts/index.d.cts +2 -0
  3. package/dist/contexts/index.d.mts +2 -0
  4. package/dist/contexts/index.mjs +3 -0
  5. package/dist/contexts/theme.cjs +28 -0
  6. package/dist/contexts/theme.d.cts +20 -0
  7. package/dist/contexts/theme.d.cts.map +1 -0
  8. package/dist/contexts/theme.d.mts +20 -0
  9. package/dist/contexts/theme.d.mts.map +1 -0
  10. package/dist/contexts/theme.mjs +27 -0
  11. package/dist/contexts/theme.mjs.map +1 -0
  12. package/dist/helpers/ansi-utils.cjs +692 -0
  13. package/dist/helpers/ansi-utils.d.cts +75 -0
  14. package/dist/helpers/ansi-utils.d.cts.map +1 -0
  15. package/dist/helpers/ansi-utils.d.mts +75 -0
  16. package/dist/helpers/ansi-utils.d.mts.map +1 -0
  17. package/dist/helpers/ansi-utils.mjs +689 -0
  18. package/dist/helpers/ansi-utils.mjs.map +1 -0
  19. package/dist/helpers/index.cjs +6 -0
  20. package/dist/helpers/index.d.cts +2 -0
  21. package/dist/helpers/index.d.mts +2 -0
  22. package/dist/helpers/index.mjs +3 -0
  23. package/dist/index.cjs +53 -47
  24. package/dist/index.d.cts.map +1 -1
  25. package/dist/index.d.mts.map +1 -1
  26. package/dist/index.mjs +52 -47
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/style-dictionary/border-styles.mjs.map +1 -1
  29. package/dist/style-dictionary/colors.mjs.map +1 -1
  30. package/dist/style-dictionary/helpers.mjs.map +1 -1
  31. package/dist/style-dictionary/icons.mjs.map +1 -1
  32. package/dist/style-dictionary/labels.mjs.map +1 -1
  33. package/dist/style-dictionary/padding.mjs.map +1 -1
  34. package/dist/style-dictionary/settings.mjs.map +1 -1
  35. package/dist/themes/storm.mjs.map +1 -1
  36. package/dist/types/plugin.d.cts +6 -4
  37. package/dist/types/plugin.d.cts.map +1 -1
  38. package/dist/types/plugin.d.mts +6 -4
  39. package/dist/types/plugin.d.mts.map +1 -1
  40. package/package.json +61 -3
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.mjs","names":["result!: ThemeStyleBorderTypeConfig"],"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 { mergeConfig } from \"powerlines/plugin-utils/merge\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeResolvedConfig,\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 let result!: ThemeStyleBorderTypeConfig;\n switch (identifier.replace(/-corners$/, \"\").toLowerCase()) {\n case \"double\":\n result = {\n topLeft: \"╔\",\n topRight: \"╗\",\n bottomLeft: \"╚\",\n bottomRight: \"╝\",\n top: \"═\",\n bottom: \"═\",\n left: \"║\",\n right: \"║\"\n };\n break;\n case \"bold\":\n result = {\n topLeft: \"┏\",\n topRight: \"┓\",\n bottomLeft: \"┗\",\n bottomRight: \"┛\",\n top: \"━\",\n bottom: \"━\",\n left: \"┃\",\n right: \"┃\"\n };\n break;\n case \"round\":\n result = {\n topLeft: \"╭\",\n topRight: \"╮\",\n bottomLeft: \"╰\",\n bottomRight: \"╯\",\n top: \"─\",\n bottom: \"─\",\n left: \"│\",\n right: \"│\"\n };\n break;\n case \"single-double\":\n result = {\n topLeft: \"╓\",\n topRight: \"╖\",\n bottomLeft: \"╙\",\n bottomRight: \"╜\",\n top: \"─\",\n bottom: \"─\",\n left: \"║\",\n right: \"║\"\n };\n break;\n case \"double-single\":\n result = {\n topLeft: \"╒\",\n topRight: \"╕\",\n bottomLeft: \"╘\",\n bottomRight: \"╛\",\n top: \"═\",\n bottom: \"═\",\n left: \"│\",\n right: \"│\"\n };\n break;\n case \"classic\":\n result = {\n topLeft: \"+\",\n topRight: \"+\",\n bottomLeft: \"+\",\n bottomRight: \"+\",\n top: \"-\",\n bottom: \"-\",\n left: \"|\",\n right: \"|\"\n };\n break;\n case \"diagonal\":\n result = {\n topLeft: \"╱╱\",\n topRight: \"╱╱\",\n bottomLeft: \"╱╱\",\n bottomRight: \"╱╱\",\n top: \"╱\",\n bottom: \"╱\",\n left: \"╱╱\",\n right: \"╱╱\"\n };\n break;\n case \"diagonal-thick\":\n result = {\n topLeft: \"🙼🙼\",\n topRight: \"🙼🙼\",\n bottomLeft: \"🙼🙼\",\n bottomRight: \"🙼🙼\",\n top: \"🙼\",\n bottom: \"🙼\",\n left: \"🙼🙼\",\n right: \"🙼🙼\"\n };\n break;\n case \"pointer\":\n result = {\n topLeft: \"▶\",\n topRight: \"◀\",\n bottomLeft: \"◀\",\n bottomRight: \"▶\",\n top: \"─\",\n bottom: \"─\",\n left: \"►\",\n right: \"◄\"\n };\n break;\n case \"outward-arrow\":\n result = {\n topLeft: \"↗\",\n topRight: \"↖\",\n bottomLeft: \"↙\",\n bottomRight: \"↘\",\n top: \"↑\",\n bottom: \"↓\",\n left: \"←\",\n right: \"→\"\n };\n break;\n case \"arrow\":\n case \"inward-arrow\":\n result = {\n topLeft: \"↘\",\n topRight: \"↙\",\n bottomLeft: \"↖\",\n bottomRight: \"↗\",\n top: \"↓\",\n bottom: \"↑\",\n left: \"→\",\n right: \"←\"\n };\n break;\n case \"outward-double-arrow\":\n result = {\n topLeft: \"⇗\",\n topRight: \"⇖\",\n bottomLeft: \"⇙\",\n bottomRight: \"⇘\",\n top: \"⇑\",\n bottom: \"⇓\",\n left: \"⇐\",\n right: \"⇒\"\n };\n break;\n case \"double-arrow\":\n case \"inward-double-arrow\":\n result = {\n topLeft: \"⇘\",\n topRight: \"⇙\",\n bottomLeft: \"⇖\",\n bottomRight: \"⇗\",\n top: \"⇓\",\n bottom: \"⇑\",\n left: \"⇒\",\n right: \"⇐\"\n };\n break;\n case \"none\":\n result = {\n topLeft: \" \",\n topRight: \" \",\n bottomLeft: \" \",\n bottomRight: \" \",\n top: \" \",\n bottom: \" \",\n left: \" \",\n right: \" \"\n };\n break;\n case \"single\":\n default:\n result = {\n topLeft: \"┌\",\n topRight: \"┐\",\n bottomLeft: \"└\",\n bottomRight: \"┘\",\n top: \"─\",\n bottom: \"─\",\n left: \"│\",\n right: \"│\"\n };\n break;\n }\n\n result.meta = identifier.endsWith(\"-corners\")\n ? {\n corners: true\n }\n : {};\n\n return result;\n}\n\n/**\n * Merges the provided resolved theme configuration into the existing theme configuration in the context.\n *\n * @param context - The theme plugin context containing the current theme configuration.\n * @param resolvedConfig - The resolved theme configuration to merge into the context's theme configuration.\n * @return The merged theme configuration.\n */\nexport function mergeThemes<TContext extends ThemePluginContext>(\n context: TContext,\n resolvedConfig: Partial<ThemeResolvedConfig>\n) {\n context.theme = mergeConfig(context.theme, resolvedConfig);\n\n return context.theme;\n}\n"],"mappings":";;;;;;;;;AAgCA,SAAgB,mBACd,YAC4B;CAC5B,IAAIA;AACJ,SAAQ,WAAW,QAAQ,aAAa,GAAG,CAAC,aAAa,EAAzD;EACE,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;EACL,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;EACL,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;AACH,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;EACF,KAAK;EACL;AACE,YAAS;IACP,SAAS;IACT,UAAU;IACV,YAAY;IACZ,aAAa;IACb,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACR;AACD;;AAGJ,QAAO,OAAO,WAAW,SAAS,WAAW,GACzC,EACE,SAAS,MACV,GACD,EAAE;AAEN,QAAO;;;;;;;;;AAUT,SAAgB,YACd,SACA,gBACA;AACA,SAAQ,QAAQ,YAAY,QAAQ,OAAO,eAAe;AAE1D,QAAO,QAAQ"}
1
+ {"version":3,"file":"helpers.mjs","names":["mergeConfig","resolveBorderStyle","identifier","result","replace","toLowerCase","topLeft","topRight","bottomLeft","bottomRight","top","bottom","left","right","meta","endsWith","corners","mergeThemes","context","resolvedConfig","theme"],"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 { mergeConfig } from \"powerlines/plugin-utils/merge\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeResolvedConfig,\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 let result!: ThemeStyleBorderTypeConfig;\n switch (identifier.replace(/-corners$/, \"\").toLowerCase()) {\n case \"double\":\n result = {\n topLeft: \"╔\",\n topRight: \"╗\",\n bottomLeft: \"╚\",\n bottomRight: \"╝\",\n top: \"═\",\n bottom: \"═\",\n left: \"║\",\n right: \"║\"\n };\n break;\n case \"bold\":\n result = {\n topLeft: \"┏\",\n topRight: \"┓\",\n bottomLeft: \"┗\",\n bottomRight: \"┛\",\n top: \"━\",\n bottom: \"━\",\n left: \"┃\",\n right: \"┃\"\n };\n break;\n case \"round\":\n result = {\n topLeft: \"╭\",\n topRight: \"╮\",\n bottomLeft: \"╰\",\n bottomRight: \"╯\",\n top: \"─\",\n bottom: \"─\",\n left: \"│\",\n right: \"│\"\n };\n break;\n case \"single-double\":\n result = {\n topLeft: \"╓\",\n topRight: \"╖\",\n bottomLeft: \"╙\",\n bottomRight: \"╜\",\n top: \"─\",\n bottom: \"─\",\n left: \"║\",\n right: \"║\"\n };\n break;\n case \"double-single\":\n result = {\n topLeft: \"╒\",\n topRight: \"╕\",\n bottomLeft: \"╘\",\n bottomRight: \"╛\",\n top: \"═\",\n bottom: \"═\",\n left: \"│\",\n right: \"│\"\n };\n break;\n case \"classic\":\n result = {\n topLeft: \"+\",\n topRight: \"+\",\n bottomLeft: \"+\",\n bottomRight: \"+\",\n top: \"-\",\n bottom: \"-\",\n left: \"|\",\n right: \"|\"\n };\n break;\n case \"diagonal\":\n result = {\n topLeft: \"╱╱\",\n topRight: \"╱╱\",\n bottomLeft: \"╱╱\",\n bottomRight: \"╱╱\",\n top: \"╱\",\n bottom: \"╱\",\n left: \"╱╱\",\n right: \"╱╱\"\n };\n break;\n case \"diagonal-thick\":\n result = {\n topLeft: \"🙼🙼\",\n topRight: \"🙼🙼\",\n bottomLeft: \"🙼🙼\",\n bottomRight: \"🙼🙼\",\n top: \"🙼\",\n bottom: \"🙼\",\n left: \"🙼🙼\",\n right: \"🙼🙼\"\n };\n break;\n case \"pointer\":\n result = {\n topLeft: \"▶\",\n topRight: \"◀\",\n bottomLeft: \"◀\",\n bottomRight: \"▶\",\n top: \"─\",\n bottom: \"─\",\n left: \"►\",\n right: \"◄\"\n };\n break;\n case \"outward-arrow\":\n result = {\n topLeft: \"↗\",\n topRight: \"↖\",\n bottomLeft: \"↙\",\n bottomRight: \"↘\",\n top: \"↑\",\n bottom: \"↓\",\n left: \"←\",\n right: \"→\"\n };\n break;\n case \"arrow\":\n case \"inward-arrow\":\n result = {\n topLeft: \"↘\",\n topRight: \"↙\",\n bottomLeft: \"↖\",\n bottomRight: \"↗\",\n top: \"↓\",\n bottom: \"↑\",\n left: \"→\",\n right: \"←\"\n };\n break;\n case \"outward-double-arrow\":\n result = {\n topLeft: \"⇗\",\n topRight: \"⇖\",\n bottomLeft: \"⇙\",\n bottomRight: \"⇘\",\n top: \"⇑\",\n bottom: \"⇓\",\n left: \"⇐\",\n right: \"⇒\"\n };\n break;\n case \"double-arrow\":\n case \"inward-double-arrow\":\n result = {\n topLeft: \"⇘\",\n topRight: \"⇙\",\n bottomLeft: \"⇖\",\n bottomRight: \"⇗\",\n top: \"⇓\",\n bottom: \"⇑\",\n left: \"⇒\",\n right: \"⇐\"\n };\n break;\n case \"none\":\n result = {\n topLeft: \" \",\n topRight: \" \",\n bottomLeft: \" \",\n bottomRight: \" \",\n top: \" \",\n bottom: \" \",\n left: \" \",\n right: \" \"\n };\n break;\n case \"single\":\n default:\n result = {\n topLeft: \"┌\",\n topRight: \"┐\",\n bottomLeft: \"└\",\n bottomRight: \"┘\",\n top: \"─\",\n bottom: \"─\",\n left: \"│\",\n right: \"│\"\n };\n break;\n }\n\n result.meta = identifier.endsWith(\"-corners\")\n ? {\n corners: true\n }\n : {};\n\n return result;\n}\n\n/**\n * Merges the provided resolved theme configuration into the existing theme configuration in the context.\n *\n * @param context - The theme plugin context containing the current theme configuration.\n * @param resolvedConfig - The resolved theme configuration to merge into the context's theme configuration.\n * @return The merged theme configuration.\n */\nexport function mergeThemes<TContext extends ThemePluginContext>(\n context: TContext,\n resolvedConfig: Partial<ThemeResolvedConfig>\n) {\n context.theme = mergeConfig(context.theme, resolvedConfig);\n\n return context.theme;\n}\n"],"mappings":";;;;;;;;;AAgCA,SAAgBC,mBACdC,YAC4B;CAC5B,IAAIC;AACJ,SAAQD,WAAWE,QAAQ,aAAa,GAAG,CAACC,aAAa,EAAzD;EACE,KAAK;AACHF,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;EACL,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;EACL,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;AACHV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;EACF,KAAK;EACL;AACEV,YAAS;IACPG,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,aAAa;IACbC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACR;AACD;;AAGJV,QAAOW,OAAOZ,WAAWa,SAAS,WAAW,GACzC,EACEC,SAAS,MACV,GACD,EAAE;AAEN,QAAOb;;;;;;;;;AAUT,SAAgBc,YACdC,SACAC,gBACA;AACAD,SAAQE,QAAQpB,YAAYkB,QAAQE,OAAOD,eAAe;AAE1D,QAAOD,QAAQE"}
@@ -1 +1 @@
1
- {"version":3,"file":"icons.mjs","names":["icons"],"sources":["../../src/style-dictionary/icons.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeIconMessageStateConfig,\n ThemeIconPromptState,\n ThemeIconsResolvedConfig,\n ThemeIconSubItemConfig,\n ThemeIconsUserConfig,\n ThemeIconTypeResolvedConfig,\n ThemeResolvedConfig\n} from \"../types/theme\";\nimport { mergeThemes } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Icons Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const icons = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/icons\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n\n // #region Icons\n\n resolvedConfig.icons ??= {\n message: { header: {} },\n banner: { header: {} },\n prompt: {}\n } as ThemeIconsResolvedConfig;\n const icons = dictionary.icons as ThemeIconsUserConfig;\n\n if (isSetString(icons)) {\n resolvedConfig.icons = {\n message: {\n header: {\n help: icons,\n success: icons,\n info: icons,\n debug: icons,\n warning: icons,\n danger: icons,\n error: icons\n }\n },\n banner: {\n header: {\n primary: icons,\n secondary: icons,\n tertiary: icons\n }\n },\n prompt: {\n active: icons,\n cancelled: icons,\n warning: icons,\n error: icons,\n submitted: icons,\n disabled: icons\n }\n };\n } else if (isSetObject(icons)) {\n resolvedConfig.icons.message =\n {} as ThemeIconTypeResolvedConfig<ThemeIconMessageStateConfig>;\n const message = icons.message;\n\n if (isSetString(message)) {\n resolvedConfig.icons.message = {\n header: {\n help: message,\n success: message,\n info: message,\n debug: message,\n warning: message,\n danger: message,\n error: message\n }\n };\n } else if (isSetObject(message)) {\n resolvedConfig.icons.message.header ??=\n {} as ThemeIconMessageStateConfig;\n const header = message.header;\n\n if (isSetString(header)) {\n resolvedConfig.icons.message = {\n header: {\n help: header,\n success: header,\n info: header,\n debug: header,\n warning: header,\n danger: header,\n error: header\n }\n };\n } else if (isSetObject(header)) {\n if (isSetString(header.help)) {\n resolvedConfig.icons.message.header.help = header.help;\n }\n if (isSetString(header.success)) {\n resolvedConfig.icons.message.header.success = header.success;\n }\n if (isSetString(header.info)) {\n resolvedConfig.icons.message.header.info = header.info;\n }\n if (isSetString(header.debug)) {\n resolvedConfig.icons.message.header.debug = header.debug;\n }\n if (isSetString(header.warning)) {\n resolvedConfig.icons.message.header.warning = header.warning;\n }\n if (isSetString(header.danger)) {\n resolvedConfig.icons.message.header.danger = header.danger;\n }\n if (isSetString(header.error)) {\n resolvedConfig.icons.message.header.error = header.error;\n }\n }\n }\n\n resolvedConfig.icons.banner ??= {\n header: {}\n } as ThemeIconTypeResolvedConfig<ThemeIconSubItemConfig>;\n const banner = icons.banner;\n\n if (isSetString(banner)) {\n resolvedConfig.icons.banner = {\n header: {\n primary: banner,\n secondary: banner,\n tertiary: banner\n }\n };\n } else if (isSetObject(banner)) {\n resolvedConfig.icons.banner.header ??= {} as ThemeIconSubItemConfig;\n const header = banner.header as ThemeIconSubItemConfig;\n\n if (isSetString(banner.header)) {\n resolvedConfig.icons.banner = {\n header: {\n primary: banner.header,\n secondary: banner.header,\n tertiary: banner.header\n }\n };\n } else if (isSetObject(banner.header)) {\n if (isSetString(header.primary)) {\n resolvedConfig.icons.banner.header.primary = header.primary;\n }\n if (isSetString(header.secondary)) {\n resolvedConfig.icons.banner.header.secondary = header.secondary;\n }\n if (isSetString(header.tertiary)) {\n resolvedConfig.icons.banner.header.tertiary = header.tertiary;\n }\n }\n }\n\n resolvedConfig.icons.prompt ??= {} as ThemeIconPromptState;\n const prompt = icons.prompt;\n\n if (isSetString(prompt)) {\n resolvedConfig.icons.prompt = {\n active: prompt,\n cancelled: prompt,\n error: prompt,\n warning: prompt,\n submitted: prompt,\n disabled: prompt\n };\n } else if (isSetObject(prompt)) {\n if (isSetString(prompt.active)) {\n resolvedConfig.icons.prompt.active = prompt.active;\n }\n if (isSetString(prompt.cancelled)) {\n resolvedConfig.icons.prompt.cancelled = prompt.cancelled;\n }\n if (isSetString(prompt.error)) {\n resolvedConfig.icons.prompt.error = prompt.error;\n }\n if (isSetString(prompt.warning)) {\n resolvedConfig.icons.prompt.warning = prompt.warning;\n }\n if (isSetString(prompt.submitted)) {\n resolvedConfig.icons.prompt.submitted = prompt.submitted;\n }\n if (isSetString(prompt.disabled)) {\n resolvedConfig.icons.prompt.disabled = prompt.disabled;\n }\n }\n }\n\n // #endregion Icons\n\n // #endregion Tiered token resolution\n\n // #region Missing token defaulting\n\n if (\n !resolvedConfig.icons.prompt?.active &&\n resolvedConfig.icons?.banner?.header?.primary\n ) {\n resolvedConfig.icons.prompt.active =\n resolvedConfig.icons.banner.header.primary;\n }\n if (\n !resolvedConfig.icons.prompt?.submitted &&\n resolvedConfig.icons.message?.header?.success\n ) {\n resolvedConfig.icons.prompt.submitted =\n resolvedConfig.icons.message.header.success;\n }\n if (\n !resolvedConfig.icons.prompt?.warning &&\n resolvedConfig.icons.message?.header?.warning\n ) {\n resolvedConfig.icons.prompt.warning =\n resolvedConfig.icons.message.header.warning;\n }\n if (\n !resolvedConfig.icons.prompt?.error &&\n resolvedConfig.icons.message?.header?.error\n ) {\n resolvedConfig.icons.prompt.error =\n resolvedConfig.icons.message.header.error;\n }\n if (\n !resolvedConfig.icons.prompt?.cancelled &&\n resolvedConfig.icons.message?.header?.error\n ) {\n resolvedConfig.icons.prompt.cancelled =\n resolvedConfig.icons.message.header.error;\n }\n\n // #endregion Missing token defaulting\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;AA4CA,MAAa,SAAS,aAA+C;CACnE,MAAM;CACN,eACE,YACA,aACuB;EACvB,MAAM,iBAAiB,EAAE;AACzB,iBAAe,OACZ,WAA2B,UAAU,QAAQ,OAAO;AAMvD,iBAAe,UAAU;GACvB,SAAS,EAAE,QAAQ,EAAE,EAAE;GACvB,QAAQ,EAAE,QAAQ,EAAE,EAAE;GACtB,QAAQ,EAAE;GACX;EACD,MAAMA,UAAQ,WAAW;AAEzB,MAAI,YAAYA,QAAM,CACpB,gBAAe,QAAQ;GACrB,SAAS,EACP,QAAQ;IACN,MAAMA;IACN,SAASA;IACT,MAAMA;IACN,OAAOA;IACP,SAASA;IACT,QAAQA;IACR,OAAOA;IACR,EACF;GACD,QAAQ,EACN,QAAQ;IACN,SAASA;IACT,WAAWA;IACX,UAAUA;IACX,EACF;GACD,QAAQ;IACN,QAAQA;IACR,WAAWA;IACX,SAASA;IACT,OAAOA;IACP,WAAWA;IACX,UAAUA;IACX;GACF;WACQ,YAAYA,QAAM,EAAE;AAC7B,kBAAe,MAAM,UACnB,EAAE;GACJ,MAAM,UAAUA,QA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BAAe,MAAM,OAAO,YAC1B,eAAe,MAAM,QAAQ,OAAO;AAExC,MACE,CAAC,eAAe,MAAM,QAAQ,WAC9B,eAAe,MAAM,SAAS,QAAQ,QAEtC,gBAAe,MAAM,OAAO,UAC1B,eAAe,MAAM,QAAQ,OAAO;AAExC,MACE,CAAC,eAAe,MAAM,QAAQ,SAC9B,eAAe,MAAM,SAAS,QAAQ,MAEtC,gBAAe,MAAM,OAAO,QAC1B,eAAe,MAAM,QAAQ,OAAO;AAExC,MACE,CAAC,eAAe,MAAM,QAAQ,aAC9B,eAAe,MAAM,SAAS,QAAQ,MAEtC,gBAAe,MAAM,OAAO,YAC1B,eAAe,MAAM,QAAQ,OAAO;AAKxC,cAAY,SAAS,eAAe;AAEpC,SAAO;;CAEV"}
1
+ {"version":3,"file":"icons.mjs","names":["isSetObject","isSetString","mergeThemes","icons","context","name","preprocessor","dictionary","_options","resolvedConfig","$theme","config","message","header","banner","prompt","help","success","info","debug","warning","danger","error","primary","secondary","tertiary","active","cancelled","submitted","disabled"],"sources":["../../src/style-dictionary/icons.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeIconMessageStateConfig,\n ThemeIconPromptState,\n ThemeIconsResolvedConfig,\n ThemeIconSubItemConfig,\n ThemeIconsUserConfig,\n ThemeIconTypeResolvedConfig,\n ThemeResolvedConfig\n} from \"../types/theme\";\nimport { mergeThemes } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Icons Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const icons = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/icons\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n\n // #region Icons\n\n resolvedConfig.icons ??= {\n message: { header: {} },\n banner: { header: {} },\n prompt: {}\n } as ThemeIconsResolvedConfig;\n const icons = dictionary.icons as ThemeIconsUserConfig;\n\n if (isSetString(icons)) {\n resolvedConfig.icons = {\n message: {\n header: {\n help: icons,\n success: icons,\n info: icons,\n debug: icons,\n warning: icons,\n danger: icons,\n error: icons\n }\n },\n banner: {\n header: {\n primary: icons,\n secondary: icons,\n tertiary: icons\n }\n },\n prompt: {\n active: icons,\n cancelled: icons,\n warning: icons,\n error: icons,\n submitted: icons,\n disabled: icons\n }\n };\n } else if (isSetObject(icons)) {\n resolvedConfig.icons.message =\n {} as ThemeIconTypeResolvedConfig<ThemeIconMessageStateConfig>;\n const message = icons.message;\n\n if (isSetString(message)) {\n resolvedConfig.icons.message = {\n header: {\n help: message,\n success: message,\n info: message,\n debug: message,\n warning: message,\n danger: message,\n error: message\n }\n };\n } else if (isSetObject(message)) {\n resolvedConfig.icons.message.header ??=\n {} as ThemeIconMessageStateConfig;\n const header = message.header;\n\n if (isSetString(header)) {\n resolvedConfig.icons.message = {\n header: {\n help: header,\n success: header,\n info: header,\n debug: header,\n warning: header,\n danger: header,\n error: header\n }\n };\n } else if (isSetObject(header)) {\n if (isSetString(header.help)) {\n resolvedConfig.icons.message.header.help = header.help;\n }\n if (isSetString(header.success)) {\n resolvedConfig.icons.message.header.success = header.success;\n }\n if (isSetString(header.info)) {\n resolvedConfig.icons.message.header.info = header.info;\n }\n if (isSetString(header.debug)) {\n resolvedConfig.icons.message.header.debug = header.debug;\n }\n if (isSetString(header.warning)) {\n resolvedConfig.icons.message.header.warning = header.warning;\n }\n if (isSetString(header.danger)) {\n resolvedConfig.icons.message.header.danger = header.danger;\n }\n if (isSetString(header.error)) {\n resolvedConfig.icons.message.header.error = header.error;\n }\n }\n }\n\n resolvedConfig.icons.banner ??= {\n header: {}\n } as ThemeIconTypeResolvedConfig<ThemeIconSubItemConfig>;\n const banner = icons.banner;\n\n if (isSetString(banner)) {\n resolvedConfig.icons.banner = {\n header: {\n primary: banner,\n secondary: banner,\n tertiary: banner\n }\n };\n } else if (isSetObject(banner)) {\n resolvedConfig.icons.banner.header ??= {} as ThemeIconSubItemConfig;\n const header = banner.header as ThemeIconSubItemConfig;\n\n if (isSetString(banner.header)) {\n resolvedConfig.icons.banner = {\n header: {\n primary: banner.header,\n secondary: banner.header,\n tertiary: banner.header\n }\n };\n } else if (isSetObject(banner.header)) {\n if (isSetString(header.primary)) {\n resolvedConfig.icons.banner.header.primary = header.primary;\n }\n if (isSetString(header.secondary)) {\n resolvedConfig.icons.banner.header.secondary = header.secondary;\n }\n if (isSetString(header.tertiary)) {\n resolvedConfig.icons.banner.header.tertiary = header.tertiary;\n }\n }\n }\n\n resolvedConfig.icons.prompt ??= {} as ThemeIconPromptState;\n const prompt = icons.prompt;\n\n if (isSetString(prompt)) {\n resolvedConfig.icons.prompt = {\n active: prompt,\n cancelled: prompt,\n error: prompt,\n warning: prompt,\n submitted: prompt,\n disabled: prompt\n };\n } else if (isSetObject(prompt)) {\n if (isSetString(prompt.active)) {\n resolvedConfig.icons.prompt.active = prompt.active;\n }\n if (isSetString(prompt.cancelled)) {\n resolvedConfig.icons.prompt.cancelled = prompt.cancelled;\n }\n if (isSetString(prompt.error)) {\n resolvedConfig.icons.prompt.error = prompt.error;\n }\n if (isSetString(prompt.warning)) {\n resolvedConfig.icons.prompt.warning = prompt.warning;\n }\n if (isSetString(prompt.submitted)) {\n resolvedConfig.icons.prompt.submitted = prompt.submitted;\n }\n if (isSetString(prompt.disabled)) {\n resolvedConfig.icons.prompt.disabled = prompt.disabled;\n }\n }\n }\n\n // #endregion Icons\n\n // #endregion Tiered token resolution\n\n // #region Missing token defaulting\n\n if (\n !resolvedConfig.icons.prompt?.active &&\n resolvedConfig.icons?.banner?.header?.primary\n ) {\n resolvedConfig.icons.prompt.active =\n resolvedConfig.icons.banner.header.primary;\n }\n if (\n !resolvedConfig.icons.prompt?.submitted &&\n resolvedConfig.icons.message?.header?.success\n ) {\n resolvedConfig.icons.prompt.submitted =\n resolvedConfig.icons.message.header.success;\n }\n if (\n !resolvedConfig.icons.prompt?.warning &&\n resolvedConfig.icons.message?.header?.warning\n ) {\n resolvedConfig.icons.prompt.warning =\n resolvedConfig.icons.message.header.warning;\n }\n if (\n !resolvedConfig.icons.prompt?.error &&\n resolvedConfig.icons.message?.header?.error\n ) {\n resolvedConfig.icons.prompt.error =\n resolvedConfig.icons.message.header.error;\n }\n if (\n !resolvedConfig.icons.prompt?.cancelled &&\n resolvedConfig.icons.message?.header?.error\n ) {\n resolvedConfig.icons.prompt.cancelled =\n resolvedConfig.icons.message.header.error;\n }\n\n // #endregion Missing token defaulting\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;AA4CA,MAAaG,SAASC,aAA+C;CACnEC,MAAM;CACNC,eACEC,YACAC,aACuB;EACvB,MAAMC,iBAAiB,EAAyB;AAChDA,iBAAeJ,OACZE,WAA2BG,UAAUN,QAAQO,OAAON;AAMvDI,iBAAeN,UAAU;GACvBS,SAAS,EAAEC,QAAQ,EAAC,EAAG;GACvBC,QAAQ,EAAED,QAAQ,EAAC,EAAG;GACtBE,QAAQ,EAAC;GACkB;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E,CAACb,eAAeN,MAAMY,QAAQY,aAC9BlB,eAAeN,MAAMS,SAASC,QAAQS,MAEtCb,gBAAeN,MAAMY,OAAOY,YAC1BlB,eAAeN,MAAMS,QAAQC,OAAOS;AAKxCpB,cAAYE,SAASK,eAAe;AAEpC,SAAOF;;CAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"labels.mjs","names":["labels","header","footer"],"sources":["../../src/style-dictionary/labels.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeLabelBannerSubItemConfig,\n ThemeLabelMessageStateConfig,\n ThemeLabelsResolvedConfig,\n ThemeLabelsUserConfig,\n ThemeLabelTypeResolvedConfig,\n ThemeLabelTypeUserConfig,\n ThemeResolvedConfig\n} from \"../types/theme\";\nimport { mergeThemes } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Labels Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const labels = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/labels\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n\n // #region Labels\n\n resolvedConfig.labels ??= {\n message: { header: {}, footer: {} },\n banner: { header: {}, footer: {} }\n } as ThemeLabelsResolvedConfig;\n const labels = dictionary.labels as ThemeLabelsUserConfig;\n\n if (isSetString(labels)) {\n resolvedConfig.labels = {\n message: {\n header: {\n help: labels,\n success: labels,\n info: labels,\n debug: labels,\n warning: labels,\n danger: labels,\n error: labels\n },\n footer: {}\n },\n banner: {\n header: {\n primary: labels,\n secondary: labels,\n tertiary: labels\n },\n footer: {}\n }\n };\n } else if (isSetObject(labels)) {\n resolvedConfig.labels.message ??=\n {} as ThemeLabelTypeResolvedConfig<ThemeLabelMessageStateConfig>;\n const message =\n labels?.message as ThemeLabelTypeUserConfig<ThemeLabelMessageStateConfig>;\n\n if (isSetString(message)) {\n resolvedConfig.labels.message = {\n header: {\n help: message,\n success: message,\n info: message,\n debug: message,\n warning: message,\n danger: message,\n error: message\n },\n footer: {}\n };\n } else if (isSetObject(message)) {\n resolvedConfig.labels.message.header =\n {} as ThemeLabelMessageStateConfig;\n resolvedConfig.labels.message.footer =\n {} as ThemeLabelMessageStateConfig;\n const header = message.header;\n const footer = message.footer;\n\n if (isSetString(header)) {\n resolvedConfig.labels.message.header = {\n help: header,\n success: header,\n info: header,\n debug: header,\n warning: header,\n danger: header,\n error: header\n };\n } else if (isSetObject(header)) {\n if (isSetString(header.help)) {\n resolvedConfig.labels.message.header.help = header.help;\n }\n if (isSetString(header.success)) {\n resolvedConfig.labels.message.header.success = header.success;\n }\n if (isSetString(header.info)) {\n resolvedConfig.labels.message.header.info = header.info;\n }\n if (isSetString(header.debug)) {\n resolvedConfig.labels.message.header.debug = header.debug;\n }\n if (isSetString(header.warning)) {\n resolvedConfig.labels.message.header.warning = header.warning;\n }\n if (isSetString(header.danger)) {\n resolvedConfig.labels.message.header.danger = header.danger;\n }\n if (isSetString(header.error)) {\n resolvedConfig.labels.message.header.error = header.error;\n }\n }\n\n if (isSetString(footer)) {\n resolvedConfig.labels.message.footer = {\n help: footer,\n success: footer,\n info: footer,\n debug: footer,\n warning: footer,\n danger: footer,\n error: footer\n };\n } else if (isSetObject(footer)) {\n if (isSetString(footer.help)) {\n resolvedConfig.labels.message.footer.help = footer.help;\n }\n if (isSetString(footer.success)) {\n resolvedConfig.labels.message.footer.success = footer.success;\n }\n if (isSetString(footer.info)) {\n resolvedConfig.labels.message.footer.info = footer.info;\n }\n if (isSetString(footer.debug)) {\n resolvedConfig.labels.message.footer.debug = footer.debug;\n }\n if (isSetString(footer.warning)) {\n resolvedConfig.labels.message.footer.warning = footer.warning;\n }\n if (isSetString(footer.danger)) {\n resolvedConfig.labels.message.footer.danger = footer.danger;\n }\n if (isSetString(footer.error)) {\n resolvedConfig.labels.message.footer.error = footer.error;\n }\n }\n\n resolvedConfig.labels.banner ??=\n {} as ThemeLabelTypeResolvedConfig<ThemeLabelBannerSubItemConfig>;\n const banner =\n labels?.banner as ThemeLabelTypeUserConfig<ThemeLabelBannerSubItemConfig>;\n\n if (isSetString(banner)) {\n resolvedConfig.labels.banner = {\n header: {\n primary: banner,\n secondary: banner,\n tertiary: banner\n },\n footer: {}\n };\n } else if (isSetObject(banner)) {\n resolvedConfig.labels.banner.header =\n {} as ThemeLabelBannerSubItemConfig;\n resolvedConfig.labels.banner.footer =\n {} as ThemeLabelBannerSubItemConfig;\n const header = banner.header;\n const footer = banner.footer;\n\n if (isSetString(header)) {\n resolvedConfig.labels.banner.header = {\n primary: header,\n secondary: header,\n tertiary: header\n };\n } else if (isSetObject(header)) {\n if (isSetString(header.primary)) {\n resolvedConfig.labels.banner.header.primary = header.primary;\n }\n if (isSetString(header.secondary)) {\n resolvedConfig.labels.banner.header.secondary = header.secondary;\n }\n if (isSetString(header.tertiary)) {\n resolvedConfig.labels.banner.header.tertiary = header.tertiary;\n }\n }\n\n if (isSetString(footer)) {\n resolvedConfig.labels.banner.footer = {\n primary: footer,\n secondary: footer,\n tertiary: footer\n };\n } else if (isSetObject(footer)) {\n if (isSetString(footer.primary)) {\n resolvedConfig.labels.banner.footer.primary = footer.primary;\n }\n if (isSetString(footer.secondary)) {\n resolvedConfig.labels.banner.footer.secondary = footer.secondary;\n }\n if (isSetString(footer.tertiary)) {\n resolvedConfig.labels.banner.footer.tertiary = footer.tertiary;\n }\n }\n }\n }\n }\n\n // #endregion Labels\n\n // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;AA4CA,MAAa,UAAU,aAA+C;CACpE,MAAM;CACN,eACE,YACA,aACuB;EACvB,MAAM,iBAAiB,EAAE;AACzB,iBAAe,OACZ,WAA2B,UAAU,QAAQ,OAAO;AAMvD,iBAAe,WAAW;GACxB,SAAS;IAAE,QAAQ,EAAE;IAAE,QAAQ,EAAE;IAAE;GACnC,QAAQ;IAAE,QAAQ,EAAE;IAAE,QAAQ,EAAE;IAAE;GACnC;EACD,MAAMA,WAAS,WAAW;AAE1B,MAAI,YAAYA,SAAO,CACrB,gBAAe,SAAS;GACtB,SAAS;IACP,QAAQ;KACN,MAAMA;KACN,SAASA;KACT,MAAMA;KACN,OAAOA;KACP,SAASA;KACT,QAAQA;KACR,OAAOA;KACR;IACD,QAAQ,EAAE;IACX;GACD,QAAQ;IACN,QAAQ;KACN,SAASA;KACT,WAAWA;KACX,UAAUA;KACX;IACD,QAAQ,EAAE;IACX;GACF;WACQ,YAAYA,SAAO,EAAE;AAC9B,kBAAe,OAAO,YACpB,EAAE;GACJ,MAAM,UACJA,UAAQ;AAEV,OAAI,YAAY,QAAQ,CACtB,gBAAe,OAAO,UAAU;IAC9B,QAAQ;KACN,MAAM;KACN,SAAS;KACT,MAAM;KACN,OAAO;KACP,SAAS;KACT,QAAQ;KACR,OAAO;KACR;IACD,QAAQ,EAAE;IACX;YACQ,YAAY,QAAQ,EAAE;AAC/B,mBAAe,OAAO,QAAQ,SAC5B,EAA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O,YAAYA,SAAO;AAEzD,UAAI,YAAYA,SAAO,SAAS,CAC9B,gBAAe,OAAO,OAAO,OAAO,WAAWA,SAAO;;;;;AAWhE,cAAY,SAAS,eAAe;AAEpC,SAAO;;CAEV"}
1
+ {"version":3,"file":"labels.mjs","names":["isSetObject","isSetString","mergeThemes","labels","context","name","preprocessor","dictionary","_options","resolvedConfig","$theme","config","message","header","footer","banner","help","success","info","debug","warning","danger","error","primary","secondary","tertiary"],"sources":["../../src/style-dictionary/labels.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeLabelBannerSubItemConfig,\n ThemeLabelMessageStateConfig,\n ThemeLabelsResolvedConfig,\n ThemeLabelsUserConfig,\n ThemeLabelTypeResolvedConfig,\n ThemeLabelTypeUserConfig,\n ThemeResolvedConfig\n} from \"../types/theme\";\nimport { mergeThemes } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Labels Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const labels = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/labels\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n\n // #region Labels\n\n resolvedConfig.labels ??= {\n message: { header: {}, footer: {} },\n banner: { header: {}, footer: {} }\n } as ThemeLabelsResolvedConfig;\n const labels = dictionary.labels as ThemeLabelsUserConfig;\n\n if (isSetString(labels)) {\n resolvedConfig.labels = {\n message: {\n header: {\n help: labels,\n success: labels,\n info: labels,\n debug: labels,\n warning: labels,\n danger: labels,\n error: labels\n },\n footer: {}\n },\n banner: {\n header: {\n primary: labels,\n secondary: labels,\n tertiary: labels\n },\n footer: {}\n }\n };\n } else if (isSetObject(labels)) {\n resolvedConfig.labels.message ??=\n {} as ThemeLabelTypeResolvedConfig<ThemeLabelMessageStateConfig>;\n const message =\n labels?.message as ThemeLabelTypeUserConfig<ThemeLabelMessageStateConfig>;\n\n if (isSetString(message)) {\n resolvedConfig.labels.message = {\n header: {\n help: message,\n success: message,\n info: message,\n debug: message,\n warning: message,\n danger: message,\n error: message\n },\n footer: {}\n };\n } else if (isSetObject(message)) {\n resolvedConfig.labels.message.header =\n {} as ThemeLabelMessageStateConfig;\n resolvedConfig.labels.message.footer =\n {} as ThemeLabelMessageStateConfig;\n const header = message.header;\n const footer = message.footer;\n\n if (isSetString(header)) {\n resolvedConfig.labels.message.header = {\n help: header,\n success: header,\n info: header,\n debug: header,\n warning: header,\n danger: header,\n error: header\n };\n } else if (isSetObject(header)) {\n if (isSetString(header.help)) {\n resolvedConfig.labels.message.header.help = header.help;\n }\n if (isSetString(header.success)) {\n resolvedConfig.labels.message.header.success = header.success;\n }\n if (isSetString(header.info)) {\n resolvedConfig.labels.message.header.info = header.info;\n }\n if (isSetString(header.debug)) {\n resolvedConfig.labels.message.header.debug = header.debug;\n }\n if (isSetString(header.warning)) {\n resolvedConfig.labels.message.header.warning = header.warning;\n }\n if (isSetString(header.danger)) {\n resolvedConfig.labels.message.header.danger = header.danger;\n }\n if (isSetString(header.error)) {\n resolvedConfig.labels.message.header.error = header.error;\n }\n }\n\n if (isSetString(footer)) {\n resolvedConfig.labels.message.footer = {\n help: footer,\n success: footer,\n info: footer,\n debug: footer,\n warning: footer,\n danger: footer,\n error: footer\n };\n } else if (isSetObject(footer)) {\n if (isSetString(footer.help)) {\n resolvedConfig.labels.message.footer.help = footer.help;\n }\n if (isSetString(footer.success)) {\n resolvedConfig.labels.message.footer.success = footer.success;\n }\n if (isSetString(footer.info)) {\n resolvedConfig.labels.message.footer.info = footer.info;\n }\n if (isSetString(footer.debug)) {\n resolvedConfig.labels.message.footer.debug = footer.debug;\n }\n if (isSetString(footer.warning)) {\n resolvedConfig.labels.message.footer.warning = footer.warning;\n }\n if (isSetString(footer.danger)) {\n resolvedConfig.labels.message.footer.danger = footer.danger;\n }\n if (isSetString(footer.error)) {\n resolvedConfig.labels.message.footer.error = footer.error;\n }\n }\n\n resolvedConfig.labels.banner ??=\n {} as ThemeLabelTypeResolvedConfig<ThemeLabelBannerSubItemConfig>;\n const banner =\n labels?.banner as ThemeLabelTypeUserConfig<ThemeLabelBannerSubItemConfig>;\n\n if (isSetString(banner)) {\n resolvedConfig.labels.banner = {\n header: {\n primary: banner,\n secondary: banner,\n tertiary: banner\n },\n footer: {}\n };\n } else if (isSetObject(banner)) {\n resolvedConfig.labels.banner.header =\n {} as ThemeLabelBannerSubItemConfig;\n resolvedConfig.labels.banner.footer =\n {} as ThemeLabelBannerSubItemConfig;\n const header = banner.header;\n const footer = banner.footer;\n\n if (isSetString(header)) {\n resolvedConfig.labels.banner.header = {\n primary: header,\n secondary: header,\n tertiary: header\n };\n } else if (isSetObject(header)) {\n if (isSetString(header.primary)) {\n resolvedConfig.labels.banner.header.primary = header.primary;\n }\n if (isSetString(header.secondary)) {\n resolvedConfig.labels.banner.header.secondary = header.secondary;\n }\n if (isSetString(header.tertiary)) {\n resolvedConfig.labels.banner.header.tertiary = header.tertiary;\n }\n }\n\n if (isSetString(footer)) {\n resolvedConfig.labels.banner.footer = {\n primary: footer,\n secondary: footer,\n tertiary: footer\n };\n } else if (isSetObject(footer)) {\n if (isSetString(footer.primary)) {\n resolvedConfig.labels.banner.footer.primary = footer.primary;\n }\n if (isSetString(footer.secondary)) {\n resolvedConfig.labels.banner.footer.secondary = footer.secondary;\n }\n if (isSetString(footer.tertiary)) {\n resolvedConfig.labels.banner.footer.tertiary = footer.tertiary;\n }\n }\n }\n }\n }\n\n // #endregion Labels\n\n // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;AA4CA,MAAaG,UAAUC,aAA+C;CACpEC,MAAM;CACNC,eACEC,YACAC,aACuB;EACvB,MAAMC,iBAAiB,EAAyB;AAChDA,iBAAeJ,OACZE,WAA2BG,UAAUN,QAAQO,OAAON;AAMvDI,iBAAeN,WAAW;GACxBS,SAAS;IAAEC,QAAQ,EAAE;IAAEC,QAAQ,EAAC;IAAG;GACnCC,QAAQ;IAAEF,QAAQ,EAAE;IAAEC,QAAQ,EAAC;IAAE;GACL;EAC9B,MAAMX,WAASI,WAAWJ;AAE1B,MAAIF,YAAYE,SAAO,CACrBM,gBAAeN,SAAS;GACtBS,SAAS;IACPC,QAAQ;KACNG,MAAMb;KACNc,SAASd;KACTe,MAAMf;KACNgB,OAAOhB;KACPiB,SAASjB;KACTkB,QAAQlB;KACRmB,OAAOnB;KACR;IACDW,QAAQ,EAAC;IACV;GACDC,QAAQ;IACNF,QAAQ;KACNU,SAASpB;KACTqB,WAAWrB;KACXsB,UAAUtB;KACX;IACDW,QAAQ,EAAC;IACX;GACD;WACQd,YAAYG,SAAO,EAAE;AAC9BM,kBAAeN,OAAOS,YACpB,EAAgE;GAClE,MAAMA,UACJT,UAAQS;AAEV,OAAIX,YAAYW,QAAQ,CACtBH,gBAAeN,OAAOS,UAAU;IAC9BC,QAAQ;KACNG,MAAMJ;KACNK,SAASL;KACTM,MAAMN;KACN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V,SAAOU;AAEvD,UAAItB,YAAYY,SAAOW,UAAU,CAC/Bf,gBAAeN,OAAOY,OAAOF,OAAOW,YAAYX,SAAOW;AAEzD,UAAIvB,YAAYY,SAAOY,SAAS,CAC9BhB,gBAAeN,OAAOY,OAAOF,OAAOY,WAAWZ,SAAOY;;AAI1D,SAAIxB,YAAYa,SAAO,CACrBL,gBAAeN,OAAOY,OAAOD,SAAS;MACpCS,SAAST;MACTU,WAAWV;MACXW,UAAUX;MACX;cACQd,YAAYc,SAAO,EAAE;AAC9B,UAAIb,YAAYa,SAAOS,QAAQ,CAC7Bd,gBAAeN,OAAOY,OAAOD,OAAOS,UAAUT,SAAOS;AAEvD,UAAItB,YAAYa,SAAOU,UAAU,CAC/Bf,gBAAeN,OAAOY,OAAOD,OAAOU,YAAYV,SAAOU;AAEzD,UAAIvB,YAAYa,SAAOW,SAAS,CAC9BhB,gBAAeN,OAAOY,OAAOD,OAAOW,WAAWX,SAAOW;;;;;AAWhEvB,cAAYE,SAASK,eAAe;AAEpC,SAAOF;;CAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"padding.mjs","names":["padding"],"sources":["../../src/style-dictionary/padding.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 { isNumber } from \"@stryke/type-checks/is-number\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeBorderStyleAppSubItemUserConfig,\n ThemeBorderStyleMessageStateUserConfig,\n ThemeBorderStyleSectionTypesUserConfig,\n ThemeBorderStylesResolvedConfig,\n ThemeBorderStyleSubItemUserConfig,\n ThemeBorderStylesUserConfig,\n ThemePaddingResolvedConfig,\n ThemeResolvedConfig,\n ThemeStyleBorderIdentifiers\n} from \"../types/theme\";\nimport { mergeThemes, resolveBorderStyle } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Padding Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const padding = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/padding\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n resolvedConfig.borderStyles ??= {\n banner: { outline: {}, divider: {} },\n message: { outline: {}, divider: {} },\n app: { table: {}, divider: {} }\n } as ThemeBorderStylesResolvedConfig;\n const borderStyles = dictionary.borderStyles as ThemeBorderStylesUserConfig;\n\n if (isSetString(borderStyles)) {\n const borderStyle = resolveBorderStyle(\n borderStyles as ThemeStyleBorderIdentifiers\n );\n\n resolvedConfig.borderStyles = {\n banner: {\n outline: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n },\n message: {\n outline: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n },\n divider: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n }\n },\n app: {\n table: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n }\n };\n } else if (isSetObject(borderStyles)) {\n resolvedConfig.borderStyles.banner ??= {\n outline: {},\n divider: {}\n } as ThemeBorderStylesResolvedConfig[\"banner\"];\n const banner = borderStyles.banner;\n\n if (isSetString(banner)) {\n const borderStyle = resolveBorderStyle(banner);\n\n resolvedConfig.borderStyles.banner = {\n outline: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n };\n } else if (isSetObject(banner)) {\n resolvedConfig.borderStyles.banner ??=\n {} as ThemeBorderStylesResolvedConfig[\"banner\"];\n const outline = (\n banner as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).outline;\n\n if (isSetString(outline)) {\n const borderStyle = resolveBorderStyle(outline);\n\n resolvedConfig.borderStyles.banner.outline = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(outline)) {\n resolvedConfig.borderStyles.banner.outline =\n {} as ThemeBorderStylesResolvedConfig[\"banner\"][\"outline\"];\n\n if (\n isSetString(\n (outline as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.banner.outline.primary =\n resolveBorderStyle(\n (outline as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.banner.outline.secondary =\n resolveBorderStyle(\n (outline as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.banner.outline.tertiary =\n resolveBorderStyle(\n (outline as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n\n const divider = (\n banner as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).divider;\n\n if (isSetString(divider)) {\n const borderStyle = resolveBorderStyle(divider);\n\n resolvedConfig.borderStyles.banner.divider = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(divider)) {\n resolvedConfig.borderStyles.banner.divider =\n {} as ThemeBorderStylesResolvedConfig[\"banner\"][\"divider\"];\n\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.banner.divider.primary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.banner.divider.secondary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.banner.divider.tertiary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n }\n\n resolvedConfig.borderStyles.app ??= {\n table: {},\n divider: {}\n } as ThemeBorderStylesResolvedConfig[\"app\"];\n const app = borderStyles.app;\n\n if (isSetString(app)) {\n const borderStyle = resolveBorderStyle(app);\n\n resolvedConfig.borderStyles.app = {\n table: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n };\n } else if (isSetObject(app)) {\n resolvedConfig.borderStyles.app ??=\n {} as ThemeBorderStylesResolvedConfig[\"app\"];\n\n const table = (\n app as ThemeBorderStyleAppSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).table;\n\n if (isSetString(table)) {\n const borderStyle = resolveBorderStyle(table);\n\n resolvedConfig.borderStyles.app.table = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(table)) {\n resolvedConfig.borderStyles.app.table =\n {} as ThemeBorderStylesResolvedConfig[\"app\"][\"table\"];\n\n if (\n isSetString(\n (table as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.app.table.primary = resolveBorderStyle(\n (table as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (table as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.app.table.secondary =\n resolveBorderStyle(\n (table as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (table as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.app.table.tertiary = resolveBorderStyle(\n (table as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n\n const divider = (\n app as ThemeBorderStyleAppSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).divider;\n\n if (isSetString(divider)) {\n const borderStyle = resolveBorderStyle(divider);\n\n resolvedConfig.borderStyles.app.divider = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(divider)) {\n resolvedConfig.borderStyles.app.divider =\n {} as ThemeBorderStylesResolvedConfig[\"app\"][\"divider\"];\n\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.app.divider.primary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.app.divider.secondary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.app.divider.tertiary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n }\n\n resolvedConfig.borderStyles.message ??=\n {} as ThemeBorderStylesResolvedConfig[\"message\"];\n const message = borderStyles.message;\n\n if (isSetString(message)) {\n const borderStyle = resolveBorderStyle(message);\n\n resolvedConfig.borderStyles.message = {\n outline: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n },\n divider: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n }\n };\n } else if (isSetObject(message)) {\n const outline = (\n message as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).outline;\n\n if (isSetString(outline)) {\n const borderStyle = resolveBorderStyle(outline);\n\n resolvedConfig.borderStyles.message.outline = {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n };\n } else if (isSetObject(outline)) {\n resolvedConfig.borderStyles.message.outline =\n {} as ThemeBorderStylesResolvedConfig[\"message\"][\"outline\"];\n\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).help\n )\n ) {\n resolvedConfig.borderStyles.message.outline.help =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .help as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).success\n )\n ) {\n resolvedConfig.borderStyles.message.outline.success =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .success as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).info\n )\n ) {\n resolvedConfig.borderStyles.message.outline.info =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .info as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).debug\n )\n ) {\n resolvedConfig.borderStyles.message.outline.debug =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .debug as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).warning\n )\n ) {\n resolvedConfig.borderStyles.message.outline.warning =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .warning as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).danger\n )\n ) {\n resolvedConfig.borderStyles.message.outline.danger =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .danger as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).error\n )\n ) {\n resolvedConfig.borderStyles.message.outline.error =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .error as ThemeStyleBorderIdentifiers\n );\n }\n }\n\n resolvedConfig.borderStyles.message.divider ??=\n {} as ThemeBorderStylesResolvedConfig[\"message\"][\"divider\"];\n const divider = (\n message as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).divider;\n\n if (isSetString(divider)) {\n const borderStyle = resolveBorderStyle(divider);\n\n resolvedConfig.borderStyles.message.divider = {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n };\n } else if (isSetObject(divider)) {\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).help\n )\n ) {\n resolvedConfig.borderStyles.message.divider.help =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .help as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).success\n )\n ) {\n resolvedConfig.borderStyles.message.divider.success =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .success as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).info\n )\n ) {\n resolvedConfig.borderStyles.message.divider.info =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .info as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).debug\n )\n ) {\n resolvedConfig.borderStyles.message.divider.debug =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .debug as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).warning\n )\n ) {\n resolvedConfig.borderStyles.message.divider.warning =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .warning as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).danger\n )\n ) {\n resolvedConfig.borderStyles.message.divider.danger =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .danger as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).error\n )\n ) {\n resolvedConfig.borderStyles.message.divider.error =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .error as ThemeStyleBorderIdentifiers\n );\n }\n }\n }\n }\n\n // #endregion BorderStyles\n\n // #region Padding\n\n resolvedConfig.padding ??= {} as ThemePaddingResolvedConfig;\n const padding = dictionary.padding;\n\n if (isNumber(padding)) {\n resolvedConfig.padding = {\n banner: padding,\n message: padding,\n app: padding,\n table: padding\n };\n } else if (isSetObject(padding)) {\n if (isNumber(padding.banner)) {\n resolvedConfig.padding.banner = padding.banner;\n }\n if (isNumber(padding.message)) {\n resolvedConfig.padding.message = padding.message;\n }\n if (isNumber(padding.app)) {\n resolvedConfig.padding.app = padding.app;\n }\n if (isNumber(padding.table)) {\n resolvedConfig.padding.table = padding.table;\n }\n }\n\n // #endregion Padding\n\n // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;;AA+CA,MAAa,WAAW,aAA+C;CACrE,MAAM;CACN,eACE,YACA,aACuB;EACvB,MAAM,iBAAiB,EAAE;AACzB,iBAAe,OACZ,WAA2B,UAAU,QAAQ,OAAO;AAGvD,iBAAe,iBAAiB;GAC9B,QAAQ;IAAE,SAAS,EAAE;IAAE,SAAS,EAAE;IAAE;GACpC,SAAS;IAAE,SAAS,EAAE;IAAE,SAAS,EAAE;IAAE;GACrC,KAAK;IAAE,OAAO,EAAE;IAAE,SAAS,EAAE;IAAE;GAChC;EACD,MAAM,eAAe,WAAW;AAEhC,MAAI,YAAY,aAAa,EAAE;GAC7B,MAAM,cAAc,mBAClB,aACD;AAED,kBAAe,eAAe;IAC5B,QAAQ;KACN,SAAS;MACP,SAAS;MACT,WAAW;MACX,UAAU;MACX;KACD,SAAS;MACP,SAAS;MACT,WAAW;MACX,UAAU;MACX;KACF;IACD,SAAS;KACP,SAAS;MACP,MAAM;MACN,SAAS;MACT,MAAM;MACN,OAAO;MACP,SAAS;MACT,QAAQ;MACR,OAAO;MACR;KACD,SAAS;MACP,MAAM;MACN,SAAS;MACT,MAAM;MACN,OAAO;MACP,SAAS;MACT,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AASA,UAAQ,CACnB,gBAAe,UAAU;GACvB,QAAQA;GACR,SAASA;GACT,KAAKA;GACL,OAAOA;GACR;WACQ,YAAYA,UAAQ,EAAE;AAC/B,OAAI,SAASA,UAAQ,OAAO,CAC1B,gBAAe,QAAQ,SAASA,UAAQ;AAE1C,OAAI,SAASA,UAAQ,QAAQ,CAC3B,gBAAe,QAAQ,UAAUA,UAAQ;AAE3C,OAAI,SAASA,UAAQ,IAAI,CACvB,gBAAe,QAAQ,MAAMA,UAAQ;AAEvC,OAAI,SAASA,UAAQ,MAAM,CACzB,gBAAe,QAAQ,QAAQA,UAAQ;;AAQ3C,cAAY,SAAS,eAAe;AAEpC,SAAO;;CAEV"}
1
+ {"version":3,"file":"padding.mjs","names":["isNumber","isSetObject","isSetString","mergeThemes","resolveBorderStyle","padding","context","name","preprocessor","dictionary","_options","resolvedConfig","$theme","config","borderStyles","banner","outline","divider","message","app","table","borderStyle","primary","secondary","tertiary","help","success","info","debug","warning","danger","error"],"sources":["../../src/style-dictionary/padding.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 { isNumber } from \"@stryke/type-checks/is-number\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeBorderStyleAppSubItemUserConfig,\n ThemeBorderStyleMessageStateUserConfig,\n ThemeBorderStyleSectionTypesUserConfig,\n ThemeBorderStylesResolvedConfig,\n ThemeBorderStyleSubItemUserConfig,\n ThemeBorderStylesUserConfig,\n ThemePaddingResolvedConfig,\n ThemeResolvedConfig,\n ThemeStyleBorderIdentifiers\n} from \"../types/theme\";\nimport { mergeThemes, resolveBorderStyle } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Padding Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const padding = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/padding\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n resolvedConfig.borderStyles ??= {\n banner: { outline: {}, divider: {} },\n message: { outline: {}, divider: {} },\n app: { table: {}, divider: {} }\n } as ThemeBorderStylesResolvedConfig;\n const borderStyles = dictionary.borderStyles as ThemeBorderStylesUserConfig;\n\n if (isSetString(borderStyles)) {\n const borderStyle = resolveBorderStyle(\n borderStyles as ThemeStyleBorderIdentifiers\n );\n\n resolvedConfig.borderStyles = {\n banner: {\n outline: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n },\n message: {\n outline: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n },\n divider: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n }\n },\n app: {\n table: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n }\n };\n } else if (isSetObject(borderStyles)) {\n resolvedConfig.borderStyles.banner ??= {\n outline: {},\n divider: {}\n } as ThemeBorderStylesResolvedConfig[\"banner\"];\n const banner = borderStyles.banner;\n\n if (isSetString(banner)) {\n const borderStyle = resolveBorderStyle(banner);\n\n resolvedConfig.borderStyles.banner = {\n outline: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n };\n } else if (isSetObject(banner)) {\n resolvedConfig.borderStyles.banner ??=\n {} as ThemeBorderStylesResolvedConfig[\"banner\"];\n const outline = (\n banner as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).outline;\n\n if (isSetString(outline)) {\n const borderStyle = resolveBorderStyle(outline);\n\n resolvedConfig.borderStyles.banner.outline = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(outline)) {\n resolvedConfig.borderStyles.banner.outline =\n {} as ThemeBorderStylesResolvedConfig[\"banner\"][\"outline\"];\n\n if (\n isSetString(\n (outline as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.banner.outline.primary =\n resolveBorderStyle(\n (outline as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.banner.outline.secondary =\n resolveBorderStyle(\n (outline as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.banner.outline.tertiary =\n resolveBorderStyle(\n (outline as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n\n const divider = (\n banner as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).divider;\n\n if (isSetString(divider)) {\n const borderStyle = resolveBorderStyle(divider);\n\n resolvedConfig.borderStyles.banner.divider = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(divider)) {\n resolvedConfig.borderStyles.banner.divider =\n {} as ThemeBorderStylesResolvedConfig[\"banner\"][\"divider\"];\n\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.banner.divider.primary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.banner.divider.secondary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.banner.divider.tertiary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n }\n\n resolvedConfig.borderStyles.app ??= {\n table: {},\n divider: {}\n } as ThemeBorderStylesResolvedConfig[\"app\"];\n const app = borderStyles.app;\n\n if (isSetString(app)) {\n const borderStyle = resolveBorderStyle(app);\n\n resolvedConfig.borderStyles.app = {\n table: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n },\n divider: {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n }\n };\n } else if (isSetObject(app)) {\n resolvedConfig.borderStyles.app ??=\n {} as ThemeBorderStylesResolvedConfig[\"app\"];\n\n const table = (\n app as ThemeBorderStyleAppSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).table;\n\n if (isSetString(table)) {\n const borderStyle = resolveBorderStyle(table);\n\n resolvedConfig.borderStyles.app.table = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(table)) {\n resolvedConfig.borderStyles.app.table =\n {} as ThemeBorderStylesResolvedConfig[\"app\"][\"table\"];\n\n if (\n isSetString(\n (table as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.app.table.primary = resolveBorderStyle(\n (table as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (table as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.app.table.secondary =\n resolveBorderStyle(\n (table as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (table as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.app.table.tertiary = resolveBorderStyle(\n (table as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n\n const divider = (\n app as ThemeBorderStyleAppSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).divider;\n\n if (isSetString(divider)) {\n const borderStyle = resolveBorderStyle(divider);\n\n resolvedConfig.borderStyles.app.divider = {\n primary: borderStyle,\n secondary: borderStyle,\n tertiary: borderStyle\n };\n } else if (isSetObject(divider)) {\n resolvedConfig.borderStyles.app.divider =\n {} as ThemeBorderStylesResolvedConfig[\"app\"][\"divider\"];\n\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).primary\n )\n ) {\n resolvedConfig.borderStyles.app.divider.primary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .primary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).secondary\n )\n ) {\n resolvedConfig.borderStyles.app.divider.secondary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .secondary as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleSectionTypesUserConfig).tertiary\n )\n ) {\n resolvedConfig.borderStyles.app.divider.tertiary =\n resolveBorderStyle(\n (divider as ThemeBorderStyleSectionTypesUserConfig)\n .tertiary as ThemeStyleBorderIdentifiers\n );\n }\n }\n }\n\n resolvedConfig.borderStyles.message ??=\n {} as ThemeBorderStylesResolvedConfig[\"message\"];\n const message = borderStyles.message;\n\n if (isSetString(message)) {\n const borderStyle = resolveBorderStyle(message);\n\n resolvedConfig.borderStyles.message = {\n outline: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n },\n divider: {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n }\n };\n } else if (isSetObject(message)) {\n const outline = (\n message as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).outline;\n\n if (isSetString(outline)) {\n const borderStyle = resolveBorderStyle(outline);\n\n resolvedConfig.borderStyles.message.outline = {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n };\n } else if (isSetObject(outline)) {\n resolvedConfig.borderStyles.message.outline =\n {} as ThemeBorderStylesResolvedConfig[\"message\"][\"outline\"];\n\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).help\n )\n ) {\n resolvedConfig.borderStyles.message.outline.help =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .help as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).success\n )\n ) {\n resolvedConfig.borderStyles.message.outline.success =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .success as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).info\n )\n ) {\n resolvedConfig.borderStyles.message.outline.info =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .info as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).debug\n )\n ) {\n resolvedConfig.borderStyles.message.outline.debug =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .debug as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).warning\n )\n ) {\n resolvedConfig.borderStyles.message.outline.warning =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .warning as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).danger\n )\n ) {\n resolvedConfig.borderStyles.message.outline.danger =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .danger as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (outline as ThemeBorderStyleMessageStateUserConfig).error\n )\n ) {\n resolvedConfig.borderStyles.message.outline.error =\n resolveBorderStyle(\n (outline as ThemeBorderStyleMessageStateUserConfig)\n .error as ThemeStyleBorderIdentifiers\n );\n }\n }\n\n resolvedConfig.borderStyles.message.divider ??=\n {} as ThemeBorderStylesResolvedConfig[\"message\"][\"divider\"];\n const divider = (\n message as ThemeBorderStyleSubItemUserConfig<ThemeBorderStyleSectionTypesUserConfig>\n ).divider;\n\n if (isSetString(divider)) {\n const borderStyle = resolveBorderStyle(divider);\n\n resolvedConfig.borderStyles.message.divider = {\n help: borderStyle,\n success: borderStyle,\n info: borderStyle,\n debug: borderStyle,\n warning: borderStyle,\n danger: borderStyle,\n error: borderStyle\n };\n } else if (isSetObject(divider)) {\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).help\n )\n ) {\n resolvedConfig.borderStyles.message.divider.help =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .help as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).success\n )\n ) {\n resolvedConfig.borderStyles.message.divider.success =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .success as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).info\n )\n ) {\n resolvedConfig.borderStyles.message.divider.info =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .info as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).debug\n )\n ) {\n resolvedConfig.borderStyles.message.divider.debug =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .debug as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).warning\n )\n ) {\n resolvedConfig.borderStyles.message.divider.warning =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .warning as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).danger\n )\n ) {\n resolvedConfig.borderStyles.message.divider.danger =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .danger as ThemeStyleBorderIdentifiers\n );\n }\n if (\n isSetString(\n (divider as ThemeBorderStyleMessageStateUserConfig).error\n )\n ) {\n resolvedConfig.borderStyles.message.divider.error =\n resolveBorderStyle(\n (divider as ThemeBorderStyleMessageStateUserConfig)\n .error as ThemeStyleBorderIdentifiers\n );\n }\n }\n }\n }\n\n // #endregion BorderStyles\n\n // #region Padding\n\n resolvedConfig.padding ??= {} as ThemePaddingResolvedConfig;\n const padding = dictionary.padding;\n\n if (isNumber(padding)) {\n resolvedConfig.padding = {\n banner: padding,\n message: padding,\n app: padding,\n table: padding\n };\n } else if (isSetObject(padding)) {\n if (isNumber(padding.banner)) {\n resolvedConfig.padding.banner = padding.banner;\n }\n if (isNumber(padding.message)) {\n resolvedConfig.padding.message = padding.message;\n }\n if (isNumber(padding.app)) {\n resolvedConfig.padding.app = padding.app;\n }\n if (isNumber(padding.table)) {\n resolvedConfig.padding.table = padding.table;\n }\n }\n\n // #endregion Padding\n\n // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;;AA+CA,MAAaK,WAAWC,aAA+C;CACrEC,MAAM;CACNC,eACEC,YACAC,aACuB;EACvB,MAAMC,iBAAiB,EAAyB;AAChDA,iBAAeJ,OACZE,WAA2BG,UAAUN,QAAQO,OAAON;AAGvDI,iBAAeG,iBAAiB;GAC9BC,QAAQ;IAAEC,SAAS,EAAE;IAAEC,SAAS,EAAC;IAAG;GACpCC,SAAS;IAAEF,SAAS,EAAE;IAAEC,SAAS,EAAC;IAAG;GACrCE,KAAK;IAAEC,OAAO,EAAE;IAAEH,SAAS,EAAC;IAAE;GACI;EACpC,MAAMH,eAAeL,WAAWK;AAEhC,MAAIZ,YAAYY,aAAa,EAAE;GAC7B,MAAMO,cAAcjB,mBAClBU,aACD;AAEDH,kBAAeG,eAAe;IAC5BC,QAAQ;KACNC,SAAS;MACPM,SAASD;MACTE,WAAWF;MACXG,UAAUH;MACX;KACDJ,SAAS;MACPK,SAASD;MACTE,WAAWF;MACXG,UAAUH;MACZ;KACD;IACDH,SAAS;KACPF,SAAS;MACPS,MAAMJ;MACNK,SAASL;MACTM,MAAMN;MACNO,OAAOP;MACPQ,SAASR;MACTS,QAAQT;MACRU,OAAOV;MACR;KACDJ,SAAS;MACPQ,MAAMJ;MACNK,SAASL;MACTM,MAAMN;MACNO,OAAOP;MACPQ,SA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K,eAAe;AAEpC,SAAOF;;CAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.mjs","names":["settings"],"sources":["../../src/style-dictionary/settings.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type { ThemeResolvedConfig } from \"../types/theme\";\nimport { mergeThemes } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Settings Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const settings = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/settings\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n\n // #region Settings\n\n resolvedConfig.settings ??= {};\n const settings = dictionary.settings;\n\n if (isSetObject(settings)) {\n resolvedConfig.settings = {\n ...settings\n };\n }\n\n // #endregion Settings\n\n // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;AAmCA,MAAa,YAAY,aAA+C;CACtE,MAAM;CACN,eACE,YACA,aACuB;EACvB,MAAM,iBAAiB,EAAE;AACzB,iBAAe,OACZ,WAA2B,UAAU,QAAQ,OAAO;AAMvD,iBAAe,aAAa,EAAE;EAC9B,MAAMA,aAAW,WAAW;AAE5B,MAAI,YAAYA,WAAS,CACvB,gBAAe,WAAW,EACxB,GAAGA,YACJ;AAOH,cAAY,SAAS,eAAe;AAEpC,SAAO;;CAEV"}
1
+ {"version":3,"file":"settings.mjs","names":["isSetObject","mergeThemes","settings","context","name","preprocessor","dictionary","_options","resolvedConfig","$theme","config"],"sources":["../../src/style-dictionary/settings.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 { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { Config, PlatformConfig } from \"style-dictionary\";\nimport type {\n DesignToken,\n PreprocessedTokens,\n Preprocessor\n} from \"style-dictionary/types\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type { ThemeResolvedConfig } from \"../types/theme\";\nimport { mergeThemes } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Settings Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const settings = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/settings\",\n preprocessor: (\n dictionary: PreprocessedTokens,\n _options: Config | PlatformConfig\n ): PreprocessedTokens => {\n const resolvedConfig = {} as ThemeResolvedConfig;\n resolvedConfig.name =\n (dictionary as DesignToken).$theme ?? context.config.name;\n\n // #region Tiered token resolution\n\n // #region Settings\n\n resolvedConfig.settings ??= {};\n const settings = dictionary.settings;\n\n if (isSetObject(settings)) {\n resolvedConfig.settings = {\n ...settings\n };\n }\n\n // #endregion Settings\n\n // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;AAmCA,MAAaE,YAAYC,aAA+C;CACtEC,MAAM;CACNC,eACEC,YACAC,aACuB;EACvB,MAAMC,iBAAiB,EAAyB;AAChDA,iBAAeJ,OACZE,WAA2BG,UAAUN,QAAQO,OAAON;AAMvDI,iBAAeN,aAAa,EAAE;EAC9B,MAAMA,aAAWI,WAAWJ;AAE5B,MAAIF,YAAYE,WAAS,CACvBM,gBAAeN,WAAW,EACxB,GAAGA,YACJ;AAOHD,cAAYE,SAASK,eAAe;AAEpC,SAAOF;;CAEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"storm.mjs","names":["theme: ThemeUserConfig"],"sources":["../../src/themes/storm.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 { ThemeUserConfig } from \"../types/theme\";\n\nexport const theme: ThemeUserConfig = {\n $theme: \"storm\",\n colors: {\n text: {\n banner: {\n title: \"#3be4be\",\n command: \"#ffffff\",\n description: \"#9ca3af\"\n },\n heading: {\n primary: \"#3be4be\",\n secondary: \"#ffffff\",\n tertiary: \"#cbd5e1\"\n },\n body: {\n primary: \"#cbd5e1\",\n secondary: \"#9ca3af\",\n tertiary: \"#65676d\",\n link: \"#3fa6ff\"\n },\n message: {\n description: \"#ffffff\"\n },\n usage: {\n bin: \"#9ca3af\",\n command: \"#4ee0a1\",\n dynamic: \"#8c82e3\",\n options: \"#ec5050\",\n arguments: \"#3bcde4\",\n description: \"#9ca3af\"\n },\n prompt: {\n icon: {\n active: \"#3be4be\",\n warning: \"#f3d371\",\n error: \"#d8314a\",\n submitted: \"#45b27e\",\n cancelled: \"#d8314a\",\n disabled: \"#4f4f50\"\n },\n message: {\n active: \"#ffffff\",\n warning: \"#ffffff\",\n error: \"#ffffff\",\n submitted: \"#9ca3af\",\n cancelled: \"#9ca3af\",\n disabled: \"#4f4f50\"\n },\n input: {\n active: \"#3be4be\",\n inactive: \"#65676d\",\n warning: \"#f3d371\",\n error: \"#d8314a\",\n submitted: \"#ffffff\",\n cancelled: \"#d8314a\",\n placeholder: \"#65676d\",\n disabled: \"#4f4f50\"\n },\n description: {\n active: \"#9ca3af\",\n inactive: \"#4f4f50\",\n warning: \"#f3d371\",\n error: \"#d8314a\",\n submitted: \"#4f4f50\",\n cancelled: \"#d8314a\",\n disabled: \"#4f4f50\"\n }\n }\n },\n border: {\n app: {\n primary: \"#ffffff\",\n secondary: \"#9ca3af\",\n tertiary: \"#4f4f50\"\n },\n banner: \"#3be4be\",\n message: {\n help: \"#818cf8\",\n success: \"#45b27e\",\n info: \"#38bdf8\",\n debug: \"#8afafc\",\n warning: \"#f3d371\",\n danger: \"#d8314a\"\n }\n }\n },\n borderStyles: {\n app: \"single\",\n banner: \"bold\",\n message: \"round\"\n },\n padding: {\n app: 0,\n banner: 14,\n message: 8,\n table: 1\n },\n icons: {\n message: {\n header: {\n help: \"✱\",\n success: \"✔\",\n info: \"🛈\",\n debug: \"🛠\",\n warning: \"🛆\",\n danger: \"🛇\",\n error: \"✘\"\n }\n },\n banner: {\n header: \"⬤\" // 🗲 🗱 ⏺ ⬤\n },\n prompt: {\n active: \"✱\",\n error: \"✘\",\n warning: \"🛆\",\n submitted: \"✔\",\n cancelled: \"🛇\",\n disabled: \"🛇\"\n }\n },\n labels: {\n message: {\n header: {\n help: \"Useful Tip\",\n success: \"Success\",\n info: \"Info\",\n debug: \"Debug\",\n warning: \"Warning\",\n danger: \"Danger\",\n error: \"Error\"\n }\n }\n }\n} as const;\n"],"mappings":";AAoBA,MAAaA,QAAyB;CACpC,QAAQ;CACR,QAAQ;EACN,MAAM;GACJ,QAAQ;IACN,OAAO;IACP,SAAS;IACT,aAAa;IACd;GACD,SAAS;IACP,SAAS;IACT,WAAW;IACX,UAAU;IACX;GACD,MAAM;IACJ,SAAS;IACT,WAAW;IACX,UAAU;IACV,MAAM;IACP;GACD,SAAS,EACP,aAAa,WACd;GACD,OAAO;IACL,KAAK;IACL,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,aAAa;IACd;GACD,QAAQ;IACN,MAAM;KACJ,QAAQ;KACR,SAAS;KACT,OAAO;KACP,WAAW;KACX,WAAW;KACX,UAAU;KACX;IACD,SAAS;KACP,QAAQ;KACR,SAAS;KACT,OAAO;KACP,WAAW;KACX,WAAW;KACX,UAAU;KACX;IACD,OAAO;KACL,QAAQ;KACR,UAAU;KACV,SAAS;KACT,OAAO;KACP,WAAW;KACX,WAAW;KACX,aAAa;KACb,UAAU;KACX;IACD,aAAa;KACX,QAAQ;KACR,UAAU;KACV,SAAS;KACT,OAAO;KACP,WAAW;KACX,WAAW;KACX,UAAU;KACX;IACF;GACF;EACD,QAAQ;GACN,KAAK;IACH,SAAS;IACT,WAAW;IACX,UAAU;IACX;GACD,QAAQ;GACR,SAAS;IACP,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,SAAS;IACT,QAAQ;IACT;GACF;EACF;CACD,cAAc;EACZ,KAAK;EACL,QAAQ;EACR,SAAS;EACV;CACD,SAAS;EACP,KAAK;EACL,QAAQ;EACR,SAAS;EACT,OAAO;EACR;CACD,OAAO;EACL,SAAS,EACP,QAAQ;GACN,MAAM;GACN,SAAS;GACT,MAAM;GACN,OAAO;GACP,SAAS;GACT,QAAQ;GACR,OAAO;GACR,EACF;EACD,QAAQ,EACN,QAAQ,KACT;EACD,QAAQ;GACN,QAAQ;GACR,OAAO;GACP,SAAS;GACT,WAAW;GACX,WAAW;GACX,UAAU;GACX;EACF;CACD,QAAQ,EACN,SAAS,EACP,QAAQ;EACN,MAAM;EACN,SAAS;EACT,MAAM;EACN,OAAO;EACP,SAAS;EACT,QAAQ;EACR,OAAO;EACR,EACF,EACF;CACF"}
1
+ {"version":3,"file":"storm.mjs","names":["theme","$theme","colors","text","banner","title","command","description","heading","primary","secondary","tertiary","body","link","message","usage","bin","dynamic","options","arguments","prompt","icon","active","warning","error","submitted","cancelled","disabled","input","inactive","placeholder","border","app","help","success","info","debug","danger","borderStyles","padding","table","icons","header","labels"],"sources":["../../src/themes/storm.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 { ThemeUserConfig } from \"../types/theme\";\n\nexport const theme: ThemeUserConfig = {\n $theme: \"storm\",\n colors: {\n text: {\n banner: {\n title: \"#3be4be\",\n command: \"#ffffff\",\n description: \"#9ca3af\"\n },\n heading: {\n primary: \"#3be4be\",\n secondary: \"#ffffff\",\n tertiary: \"#cbd5e1\"\n },\n body: {\n primary: \"#cbd5e1\",\n secondary: \"#9ca3af\",\n tertiary: \"#65676d\",\n link: \"#3fa6ff\"\n },\n message: {\n description: \"#ffffff\"\n },\n usage: {\n bin: \"#9ca3af\",\n command: \"#4ee0a1\",\n dynamic: \"#8c82e3\",\n options: \"#ec5050\",\n arguments: \"#3bcde4\",\n description: \"#9ca3af\"\n },\n prompt: {\n icon: {\n active: \"#3be4be\",\n warning: \"#f3d371\",\n error: \"#d8314a\",\n submitted: \"#45b27e\",\n cancelled: \"#d8314a\",\n disabled: \"#4f4f50\"\n },\n message: {\n active: \"#ffffff\",\n warning: \"#ffffff\",\n error: \"#ffffff\",\n submitted: \"#9ca3af\",\n cancelled: \"#9ca3af\",\n disabled: \"#4f4f50\"\n },\n input: {\n active: \"#3be4be\",\n inactive: \"#65676d\",\n warning: \"#f3d371\",\n error: \"#d8314a\",\n submitted: \"#ffffff\",\n cancelled: \"#d8314a\",\n placeholder: \"#65676d\",\n disabled: \"#4f4f50\"\n },\n description: {\n active: \"#9ca3af\",\n inactive: \"#4f4f50\",\n warning: \"#f3d371\",\n error: \"#d8314a\",\n submitted: \"#4f4f50\",\n cancelled: \"#d8314a\",\n disabled: \"#4f4f50\"\n }\n }\n },\n border: {\n app: {\n primary: \"#ffffff\",\n secondary: \"#9ca3af\",\n tertiary: \"#4f4f50\"\n },\n banner: \"#3be4be\",\n message: {\n help: \"#818cf8\",\n success: \"#45b27e\",\n info: \"#38bdf8\",\n debug: \"#8afafc\",\n warning: \"#f3d371\",\n danger: \"#d8314a\"\n }\n }\n },\n borderStyles: {\n app: \"single\",\n banner: \"bold\",\n message: \"round\"\n },\n padding: {\n app: 0,\n banner: 14,\n message: 8,\n table: 1\n },\n icons: {\n message: {\n header: {\n help: \"✱\",\n success: \"✔\",\n info: \"🛈\",\n debug: \"🛠\",\n warning: \"🛆\",\n danger: \"🛇\",\n error: \"✘\"\n }\n },\n banner: {\n header: \"⬤\" // 🗲 🗱 ⏺ ⬤\n },\n prompt: {\n active: \"✱\",\n error: \"✘\",\n warning: \"🛆\",\n submitted: \"✔\",\n cancelled: \"🛇\",\n disabled: \"🛇\"\n }\n },\n labels: {\n message: {\n header: {\n help: \"Useful Tip\",\n success: \"Success\",\n info: \"Info\",\n debug: \"Debug\",\n warning: \"Warning\",\n danger: \"Danger\",\n error: \"Error\"\n }\n }\n }\n} as const;\n"],"mappings":";AAoBA,MAAaA,QAAyB;CACpCC,QAAQ;CACRC,QAAQ;EACNC,MAAM;GACJC,QAAQ;IACNC,OAAO;IACPC,SAAS;IACTC,aAAa;IACd;GACDC,SAAS;IACPC,SAAS;IACTC,WAAW;IACXC,UAAU;IACX;GACDC,MAAM;IACJH,SAAS;IACTC,WAAW;IACXC,UAAU;IACVE,MAAM;IACP;GACDC,SAAS,EACPP,aAAa,WACd;GACDQ,OAAO;IACLC,KAAK;IACLV,SAAS;IACTW,SAAS;IACTC,SAAS;IACTC,WAAW;IACXZ,aAAa;IACd;GACDa,QAAQ;IACNC,MAAM;KACJC,QAAQ;KACRC,SAAS;KACTC,OAAO;KACPC,WAAW;KACXC,WAAW;KACXC,UAAU;KACX;IACDb,SAAS;KACPQ,QAAQ;KACRC,SAAS;KACTC,OAAO;KACPC,WAAW;KACXC,WAAW;KACXC,UAAU;KACX;IACDC,OAAO;KACLN,QAAQ;KACRO,UAAU;KACVN,SAAS;KACTC,OAAO;KACPC,WAAW;KACXC,WAAW;KACXI,aAAa;KACbH,UAAU;KACX;IACDpB,aAAa;KACXe,QAAQ;KACRO,UAAU;KACVN,SAAS;KACTC,OAAO;KACPC,WAAW;KACXC,WAAW;KACXC,UAAU;KACZ;IACF;GACD;EACDI,QAAQ;GACNC,KAAK;IACHvB,SAAS;IACTC,WAAW;IACXC,UAAU;IACX;GACDP,QAAQ;GACRU,SAAS;IACPmB,MAAM;IACNC,SAAS;IACTC,MAAM;IACNC,OAAO;IACPb,SAAS;IACTc,QAAQ;IACV;GACF;EACD;CACDC,cAAc;EACZN,KAAK;EACL5B,QAAQ;EACRU,SAAS;EACV;CACDyB,SAAS;EACPP,KAAK;EACL5B,QAAQ;EACRU,SAAS;EACT0B,OAAO;EACR;CACDC,OAAO;EACL3B,SAAS,EACP4B,QAAQ;GACNT,MAAM;GACNC,SAAS;GACTC,MAAM;GACNC,OAAO;GACPb,SAAS;GACTc,QAAQ;GACRb,OAAO;GACT,EACD;EACDpB,QAAQ,EACNsC,QAAQ,KACT;EACDtB,QAAQ;GACNE,QAAQ;GACRE,OAAO;GACPD,SAAS;GACTE,WAAW;GACXC,WAAW;GACXC,UAAU;GACZ;EACD;CACDgB,QAAQ,EACN7B,SAAS,EACP4B,QAAQ;EACNT,MAAM;EACNC,SAAS;EACTC,MAAM;EACNC,OAAO;EACPb,SAAS;EACTc,QAAQ;EACRb,OAAO;EACT,EACF,EACF;CACQ"}
@@ -1,21 +1,23 @@
1
1
  import { ThemeResolvedConfig, ThemeUserConfig } from "./theme.cjs";
2
+ import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig } from "@powerlines/plugin-alloy/types";
2
3
  import { StyleDictionaryPluginContext, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig } from "@powerlines/plugin-style-dictionary/types";
4
+ import { Context } from "powerlines/types/context";
3
5
 
4
6
  //#region src/types/plugin.d.ts
5
- type ThemePluginOptions = StyleDictionaryPluginOptions & {
7
+ type ThemePluginOptions = StyleDictionaryPluginOptions & AlloyPluginOptions & {
6
8
  /**
7
9
  * Theme configuration for the plugin.
8
10
  */
9
11
  theme?: ThemeUserConfig;
10
12
  };
11
- type ThemePluginUserConfig = StyleDictionaryPluginUserConfig & ThemePluginOptions;
12
- type ThemePluginResolvedConfig = StyleDictionaryPluginResolvedConfig & {
13
+ type ThemePluginUserConfig = StyleDictionaryPluginUserConfig & AlloyPluginOptions & ThemePluginOptions;
14
+ type ThemePluginResolvedConfig = StyleDictionaryPluginResolvedConfig & AlloyPluginResolvedConfig & {
13
15
  /**
14
16
  * Resolved theme configuration for the plugin.
15
17
  */
16
18
  theme: ThemeResolvedConfig;
17
19
  };
18
- type ThemePluginContext<TResolvedConfig extends ThemePluginResolvedConfig = ThemePluginResolvedConfig> = StyleDictionaryPluginContext<TResolvedConfig> & {
20
+ type ThemePluginContext<TResolvedConfig extends ThemePluginResolvedConfig = ThemePluginResolvedConfig> = AlloyPluginContext<TResolvedConfig> & StyleDictionaryPluginContext<TResolvedConfig> & Context<TResolvedConfig> & {
19
21
  /**
20
22
  * Resolved theme configuration.
21
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KA0BY,kBAAA,GAAqB;;AAAjC;AAOA;EAGY,KAAA,CAAA,EANF,eAME;AAOZ,CAAA;AAC0B,KAXd,qBAAA,GAAwB,+BAWV,GAVxB,kBAUwB;AAA4B,KAR1C,yBAAA,GAA4B,mCAQc,GAAA;EACrB;;;EAIL,KAAA,EATnB,mBASmB;;KANhB,2CACc,4BAA4B,6BAClD,6BAA6B;;;;SAIxB"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAgCY,kBAAA,GAAqB,+BAC/B;;AADF;;EACE,KAAA,CAAA,EAIU,eAJV;CAIU;AAAe,KAGf,qBAAA,GAAwB,+BAHT,GAIzB,kBAJyB,GAKzB,kBALyB;AAGf,KAIA,yBAAA,GAA4B,mCAJP,GAK/B,yBAL+B,GAAA;EAAG;;;EAEhB,KAAA,EAOT,mBAPS;AAEpB,CAAA;AAAwC,KAQ5B,kBAR4B,CAAA,wBASd,yBATc,GASc,yBATd,CAAA,GAUpC,kBAVoC,CAUjB,eAViB,CAAA,GAWtC,4BAXsC,CAWT,eAXS,CAAA,GAYtC,OAZsC,CAY9B,eAZ8B,CAAA,GAAA;EACtC;;;EAOU,KAAA,EAQD,mBARmB;CACJ"}
@@ -1,21 +1,23 @@
1
1
  import { ThemeResolvedConfig, ThemeUserConfig } from "./theme.mjs";
2
+ import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig } from "@powerlines/plugin-alloy/types";
2
3
  import { StyleDictionaryPluginContext, StyleDictionaryPluginOptions, StyleDictionaryPluginResolvedConfig, StyleDictionaryPluginUserConfig } from "@powerlines/plugin-style-dictionary/types";
4
+ import { Context } from "powerlines/types/context";
3
5
 
4
6
  //#region src/types/plugin.d.ts
5
- type ThemePluginOptions = StyleDictionaryPluginOptions & {
7
+ type ThemePluginOptions = StyleDictionaryPluginOptions & AlloyPluginOptions & {
6
8
  /**
7
9
  * Theme configuration for the plugin.
8
10
  */
9
11
  theme?: ThemeUserConfig;
10
12
  };
11
- type ThemePluginUserConfig = StyleDictionaryPluginUserConfig & ThemePluginOptions;
12
- type ThemePluginResolvedConfig = StyleDictionaryPluginResolvedConfig & {
13
+ type ThemePluginUserConfig = StyleDictionaryPluginUserConfig & AlloyPluginOptions & ThemePluginOptions;
14
+ type ThemePluginResolvedConfig = StyleDictionaryPluginResolvedConfig & AlloyPluginResolvedConfig & {
13
15
  /**
14
16
  * Resolved theme configuration for the plugin.
15
17
  */
16
18
  theme: ThemeResolvedConfig;
17
19
  };
18
- type ThemePluginContext<TResolvedConfig extends ThemePluginResolvedConfig = ThemePluginResolvedConfig> = StyleDictionaryPluginContext<TResolvedConfig> & {
20
+ type ThemePluginContext<TResolvedConfig extends ThemePluginResolvedConfig = ThemePluginResolvedConfig> = AlloyPluginContext<TResolvedConfig> & StyleDictionaryPluginContext<TResolvedConfig> & Context<TResolvedConfig> & {
19
21
  /**
20
22
  * Resolved theme configuration.
21
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KA0BY,kBAAA,GAAqB;;AAAjC;AAOA;EAGY,KAAA,CAAA,EANF,eAME;AAOZ,CAAA;AAC0B,KAXd,qBAAA,GAAwB,+BAWV,GAVxB,kBAUwB;AAA4B,KAR1C,yBAAA,GAA4B,mCAQc,GAAA;EACrB;;;EAIL,KAAA,EATnB,mBASmB;;KANhB,2CACc,4BAA4B,6BAClD,6BAA6B;;;;SAIxB"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAgCY,kBAAA,GAAqB,+BAC/B;;AADF;;EACE,KAAA,CAAA,EAIU,eAJV;CAIU;AAAe,KAGf,qBAAA,GAAwB,+BAHT,GAIzB,kBAJyB,GAKzB,kBALyB;AAGf,KAIA,yBAAA,GAA4B,mCAJP,GAK/B,yBAL+B,GAAA;EAAG;;;EAEhB,KAAA,EAOT,mBAPS;AAEpB,CAAA;AAAwC,KAQ5B,kBAR4B,CAAA,wBASd,yBATc,GASc,yBATd,CAAA,GAUpC,kBAVoC,CAUjB,eAViB,CAAA,GAWtC,4BAXsC,CAWT,eAXS,CAAA,GAYtC,OAZsC,CAY9B,eAZ8B,CAAA,GAAA;EACtC;;;EAOU,KAAA,EAQD,mBARmB;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shell-shock/plugin-theme",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
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": {
@@ -55,6 +55,62 @@
55
55
  "default": "./dist/index.mjs"
56
56
  }
57
57
  },
58
+ "./contexts": {
59
+ "require": {
60
+ "types": "./dist/contexts/index.d.cts",
61
+ "default": "./dist/contexts/index.cjs"
62
+ },
63
+ "import": {
64
+ "types": "./dist/contexts/index.d.mts",
65
+ "default": "./dist/contexts/index.mjs"
66
+ },
67
+ "default": {
68
+ "types": "./dist/contexts/index.d.mts",
69
+ "default": "./dist/contexts/index.mjs"
70
+ }
71
+ },
72
+ "./contexts/theme": {
73
+ "require": {
74
+ "types": "./dist/contexts/theme.d.cts",
75
+ "default": "./dist/contexts/theme.cjs"
76
+ },
77
+ "import": {
78
+ "types": "./dist/contexts/theme.d.mts",
79
+ "default": "./dist/contexts/theme.mjs"
80
+ },
81
+ "default": {
82
+ "types": "./dist/contexts/theme.d.mts",
83
+ "default": "./dist/contexts/theme.mjs"
84
+ }
85
+ },
86
+ "./helpers": {
87
+ "require": {
88
+ "types": "./dist/helpers/index.d.cts",
89
+ "default": "./dist/helpers/index.cjs"
90
+ },
91
+ "import": {
92
+ "types": "./dist/helpers/index.d.mts",
93
+ "default": "./dist/helpers/index.mjs"
94
+ },
95
+ "default": {
96
+ "types": "./dist/helpers/index.d.mts",
97
+ "default": "./dist/helpers/index.mjs"
98
+ }
99
+ },
100
+ "./helpers/ansi-utils": {
101
+ "require": {
102
+ "types": "./dist/helpers/ansi-utils.d.cts",
103
+ "default": "./dist/helpers/ansi-utils.cjs"
104
+ },
105
+ "import": {
106
+ "types": "./dist/helpers/ansi-utils.d.mts",
107
+ "default": "./dist/helpers/ansi-utils.mjs"
108
+ },
109
+ "default": {
110
+ "types": "./dist/helpers/ansi-utils.d.mts",
111
+ "default": "./dist/helpers/ansi-utils.mjs"
112
+ }
113
+ },
58
114
  "./package.json": "./package.json",
59
115
  "./types": {
60
116
  "require": {
@@ -116,12 +172,14 @@
116
172
  "@stryke/type-checks": "^0.5.25",
117
173
  "defu": "6.1.4",
118
174
  "powerlines": "^0.38.53",
119
- "style-dictionary": "^5.3.1"
175
+ "style-dictionary": "^5.3.2",
176
+ "@powerlines/plugin-alloy": "0.23.16",
177
+ "@alloy-js/core": "0.23.0-dev.8"
120
178
  },
121
179
  "devDependencies": {
122
180
  "@powerlines/plugin-deepkit": "^0.11.165",
123
181
  "@types/node": "^22.19.11"
124
182
  },
125
183
  "publishConfig": { "access": "public" },
126
- "gitHead": "1137a1ee3be5bb927dc9b15e118f804fd09a24b4"
184
+ "gitHead": "a802bf947afd12ce5c0f29aae1d4039c9e4f40f7"
127
185
  }