@shell-shock/plugin-theme 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/ansi-utils.cjs +54 -0
- package/dist/helpers/ansi-utils.d.cts.map +1 -1
- package/dist/helpers/ansi-utils.d.mts.map +1 -1
- package/dist/helpers/ansi-utils.mjs +54 -0
- package/dist/helpers/ansi-utils.mjs.map +1 -1
- package/dist/{style-dictionary/helpers.mjs → helpers/border-styles.cjs} +2 -15
- package/dist/helpers/border-styles.d.cts +14 -0
- package/dist/helpers/border-styles.d.cts.map +1 -0
- package/dist/helpers/border-styles.d.mts +14 -0
- package/dist/helpers/border-styles.d.mts.map +1 -0
- package/dist/{style-dictionary/helpers.cjs → helpers/border-styles.mjs} +3 -17
- package/dist/helpers/border-styles.mjs.map +1 -0
- package/dist/helpers/index.cjs +98 -1
- package/dist/helpers/index.d.cts +4 -1
- package/dist/helpers/index.d.mts +4 -1
- package/dist/helpers/index.mjs +4 -1
- package/dist/helpers/merge.cjs +18 -0
- package/dist/helpers/merge.d.cts +16 -0
- package/dist/helpers/merge.d.cts.map +1 -0
- package/dist/helpers/merge.d.mts +16 -0
- package/dist/helpers/merge.d.mts.map +1 -0
- package/dist/helpers/merge.mjs +18 -0
- package/dist/helpers/merge.mjs.map +1 -0
- package/dist/helpers/spinners.cjs +1853 -0
- package/dist/helpers/spinners.d.cts +735 -0
- package/dist/helpers/spinners.d.cts.map +1 -0
- package/dist/helpers/spinners.d.mts +735 -0
- package/dist/helpers/spinners.d.mts.map +1 -0
- package/dist/helpers/spinners.mjs +1760 -0
- package/dist/helpers/spinners.mjs.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/dist/style-dictionary/border-styles.cjs +39 -38
- package/dist/style-dictionary/border-styles.mjs +2 -1
- package/dist/style-dictionary/border-styles.mjs.map +1 -1
- package/dist/style-dictionary/colors.cjs +117 -2
- package/dist/style-dictionary/colors.mjs +116 -1
- package/dist/style-dictionary/colors.mjs.map +1 -1
- package/dist/style-dictionary/icons.cjs +30 -2
- package/dist/style-dictionary/icons.mjs +29 -1
- package/dist/style-dictionary/icons.mjs.map +1 -1
- package/dist/style-dictionary/labels.cjs +2 -2
- package/dist/style-dictionary/labels.mjs +1 -1
- package/dist/style-dictionary/labels.mjs.map +1 -1
- package/dist/style-dictionary/padding.cjs +39 -38
- package/dist/style-dictionary/padding.mjs +2 -1
- package/dist/style-dictionary/padding.mjs.map +1 -1
- package/dist/style-dictionary/settings.cjs +2 -2
- package/dist/style-dictionary/settings.mjs +1 -1
- package/dist/style-dictionary/settings.mjs.map +1 -1
- package/dist/style-dictionary/spinners.cjs +31 -0
- package/dist/style-dictionary/spinners.mjs +31 -0
- package/dist/style-dictionary/spinners.mjs.map +1 -0
- package/dist/themes/storm.cjs +20 -1
- package/dist/themes/storm.mjs +20 -1
- package/dist/themes/storm.mjs.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/theme.d.cts +48 -4
- package/dist/types/theme.d.cts.map +1 -1
- package/dist/types/theme.d.mts +48 -4
- package/dist/types/theme.d.mts.map +1 -1
- package/package.json +49 -7
- package/dist/style-dictionary/helpers.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"border-styles.mjs","names":["isSetObject","isSetString","mergeThemes","resolveBorderStyle","borderStyles","context","name","preprocessor","dictionary","_options","resolvedConfig","$theme","config","banner","outline","divider","message","app","table","borderStyle","primary","secondary","tertiary","help","success","info","debug","warning","danger","error"],"sources":["../../src/style-dictionary/border-styles.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 ThemeBorderStyleAppSubItemUserConfig,\n ThemeBorderStyleMessageStateUserConfig,\n ThemeBorderStyleSectionTypesUserConfig,\n ThemeBorderStylesResolvedConfig,\n ThemeBorderStyleSubItemUserConfig,\n ThemeBorderStylesUserConfig,\n ThemeResolvedConfig,\n ThemeStyleBorderIdentifiers\n} from \"../types/theme\";\nimport { mergeThemes, resolveBorderStyle } from \"./helpers\";\n\n/**\n * Shell Shock - Theme Border Styles Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const borderStyles = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/border-styles\",\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 BorderStyles\n\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 // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;AA6CA,MAAaI,gBAAgBC,aAA+C;CAC1EC,MAAM;CACNC,eACEC,YACAC,aACuB;EACvB,MAAMC,iBAAiB,EAAyB;AAChDA,iBAAeJ,OACZE,WAA2BG,UAAUN,QAAQO,OAAON;AAMvDI,iBAAeN,iBAAiB;GAC9BS,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,MAAMX,iBAAeI,WAAWJ;AAEhC,MAAIH,YAAYG,eAAa,EAAE;GAC7B,MAAMe,cAAchB,mBAClBC,eACD;AAEDM,kBAAeN,eAAe;IAC5BS,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,QAA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SAASL;MACTM,MAAMN;MACNO,OAAOP;MACPQ,SAASR;MACTS,QAAQT;MACRU,OAAOV;MACR;eACQnB,YAAYe,QAAQ,EAAE;AAC/B,SACEd,YACGc,QAAmDQ,KACrD,CAEDb,gBAAeN,aAAaY,QAAQD,QAAQQ,OAC1CpB,mBACGY,QACEQ,KACJ;AAEL,SACEtB,YACGc,QAAmDS,QACrD,CAEDd,gBAAeN,aAAaY,QAAQD,QAAQS,UAC1CrB,mBACGY,QACES,QACJ;AAEL,SACEvB,YACGc,QAAmDU,KACrD,CAEDf,gBAAeN,aAAaY,QAAQD,QAAQU,OAC1CtB,mBACGY,QACEU,KACJ;AAEL,SACExB,YACGc,QAAmDW,MACrD,CAEDhB,gBAAeN,aAAaY,QAAQD,QAAQW,QAC1CvB,mBACGY,QACEW,MACJ;AAEL,SACEzB,YACGc,QAAmDY,QACrD,CAEDjB,gBAAeN,aAAaY,QAAQD,QAAQY,UAC1CxB,mBACGY,QACEY,QACJ;AAEL,SACE1B,YACGc,QAAmDa,OACrD,CAEDlB,gBAAeN,aAAaY,QAAQD,QAAQa,SAC1CzB,mBACGY,QACEa,OACJ;AAEL,SACE3B,YACGc,QAAmDc,MACrD,CAEDnB,gBAAeN,aAAaY,QAAQD,QAAQc,QAC1C1B,mBACGY,QACEc,MACJ;;;;AAUX3B,cAAYG,SAASK,eAAe;AAEpC,SAAOF;;CAEV"}
|
|
1
|
+
{"version":3,"file":"border-styles.mjs","names":["isSetObject","isSetString","resolveBorderStyle","mergeThemes","borderStyles","context","name","preprocessor","dictionary","_options","resolvedConfig","$theme","config","banner","outline","divider","message","app","table","borderStyle","primary","secondary","tertiary","help","success","info","debug","warning","danger","error"],"sources":["../../src/style-dictionary/border-styles.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 { resolveBorderStyle } from \"../helpers/border-styles\";\nimport { mergeThemes } from \"../helpers/merge\";\nimport type { ThemePluginContext } from \"../types/plugin\";\nimport type {\n ThemeBorderStyleAppSubItemUserConfig,\n ThemeBorderStyleMessageStateUserConfig,\n ThemeBorderStyleSectionTypesUserConfig,\n ThemeBorderStylesResolvedConfig,\n ThemeBorderStyleSubItemUserConfig,\n ThemeBorderStylesUserConfig,\n ThemeResolvedConfig,\n ThemeStyleBorderIdentifiers\n} from \"../types/theme\";\n\n/**\n * Shell Shock - Theme Border Styles Preprocessor\n *\n * @remarks\n * This preprocessor applies custom value transformations to design tokens based on the provided configuration options.\n */\nexport const borderStyles = (context: ThemePluginContext): Preprocessor => ({\n name: \"shell-shock/border-styles\",\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 BorderStyles\n\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 // #endregion Tiered token resolution\n\n mergeThemes(context, resolvedConfig);\n\n return dictionary;\n }\n});\n"],"mappings":";;;;;;;;;;;;AA8CA,MAAaI,gBAAgBC,aAA+C;CAC1EC,MAAM;CACNC,eACEC,YACAC,aACuB;EACvB,MAAMC,iBAAiB,EAAyB;AAChDA,iBAAeJ,OACZE,WAA2BG,UAAUN,QAAQO,OAAON;AAMvDI,iBAAeN,iBAAiB;GAC9BS,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,MAAMX,iBAAeI,WAAWJ;AAEhC,MAAIH,YAAYG,eAAa,EAAE;GAC7B,MAAMe,cAAcjB,mBAClBE,eACD;AAEDM,kBAAeN,eAAe;IAC5BS,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;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ACNO,OAAOP;MACPQ,SAASR;MACTS,QAAQT;MACRU,OAAOV;MACR;eACQnB,YAAYe,QAAQ,EAAE;AAC/B,SACEd,YACGc,QAAmDQ,KACrD,CAEDb,gBAAeN,aAAaY,QAAQD,QAAQQ,OAC1CrB,mBACGa,QACEQ,KACJ;AAEL,SACEtB,YACGc,QAAmDS,QACrD,CAEDd,gBAAeN,aAAaY,QAAQD,QAAQS,UAC1CtB,mBACGa,QACES,QACJ;AAEL,SACEvB,YACGc,QAAmDU,KACrD,CAEDf,gBAAeN,aAAaY,QAAQD,QAAQU,OAC1CvB,mBACGa,QACEU,KACJ;AAEL,SACExB,YACGc,QAAmDW,MACrD,CAEDhB,gBAAeN,aAAaY,QAAQD,QAAQW,QAC1CxB,mBACGa,QACEW,MACJ;AAEL,SACEzB,YACGc,QAAmDY,QACrD,CAEDjB,gBAAeN,aAAaY,QAAQD,QAAQY,UAC1CzB,mBACGa,QACEY,QACJ;AAEL,SACE1B,YACGc,QAAmDa,OACrD,CAEDlB,gBAAeN,aAAaY,QAAQD,QAAQa,SAC1C1B,mBACGa,QACEa,OACJ;AAEL,SACE3B,YACGc,QAAmDc,MACrD,CAEDnB,gBAAeN,aAAaY,QAAQD,QAAQc,QAC1C3B,mBACGa,QACEc,MACJ;;;;AAUX1B,cAAYE,SAASK,eAAe;AAEpC,SAAOF;;CAEV"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const
|
|
2
|
+
const require_helpers_merge = require('../helpers/merge.cjs');
|
|
3
3
|
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
4
4
|
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
5
5
|
|
|
@@ -170,6 +170,24 @@ const colors = (context) => ({
|
|
|
170
170
|
submitted: colors$1,
|
|
171
171
|
disabled: colors$1
|
|
172
172
|
}
|
|
173
|
+
},
|
|
174
|
+
spinner: {
|
|
175
|
+
icon: {
|
|
176
|
+
active: colors$1,
|
|
177
|
+
error: colors$1,
|
|
178
|
+
success: colors$1,
|
|
179
|
+
help: colors$1,
|
|
180
|
+
info: colors$1,
|
|
181
|
+
warning: colors$1
|
|
182
|
+
},
|
|
183
|
+
message: {
|
|
184
|
+
active: colors$1,
|
|
185
|
+
error: colors$1,
|
|
186
|
+
success: colors$1,
|
|
187
|
+
help: colors$1,
|
|
188
|
+
info: colors$1,
|
|
189
|
+
warning: colors$1
|
|
190
|
+
}
|
|
173
191
|
}
|
|
174
192
|
},
|
|
175
193
|
border: {
|
|
@@ -358,6 +376,24 @@ const colors = (context) => ({
|
|
|
358
376
|
submitted: text,
|
|
359
377
|
disabled: text
|
|
360
378
|
}
|
|
379
|
+
},
|
|
380
|
+
spinner: {
|
|
381
|
+
icon: {
|
|
382
|
+
active: text,
|
|
383
|
+
error: text,
|
|
384
|
+
success: text,
|
|
385
|
+
help: text,
|
|
386
|
+
info: text,
|
|
387
|
+
warning: text
|
|
388
|
+
},
|
|
389
|
+
message: {
|
|
390
|
+
active: text,
|
|
391
|
+
error: text,
|
|
392
|
+
success: text,
|
|
393
|
+
help: text,
|
|
394
|
+
info: text,
|
|
395
|
+
warning: text
|
|
396
|
+
}
|
|
361
397
|
}
|
|
362
398
|
};
|
|
363
399
|
else if ((0, __stryke_type_checks_is_set_object.isSetObject)(text)) {
|
|
@@ -765,6 +801,67 @@ const colors = (context) => ({
|
|
|
765
801
|
if ((0, __stryke_type_checks_is_set_string.isSetString)(prompt.description.disabled)) resolvedConfig.colors.text.prompt.description.disabled = prompt.description.disabled;
|
|
766
802
|
}
|
|
767
803
|
}
|
|
804
|
+
resolvedConfig.colors.text.spinner ??= {
|
|
805
|
+
icon: {},
|
|
806
|
+
message: {}
|
|
807
|
+
};
|
|
808
|
+
const spinner = text.spinner;
|
|
809
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner)) resolvedConfig.colors.text.spinner = {
|
|
810
|
+
icon: {
|
|
811
|
+
active: spinner,
|
|
812
|
+
error: spinner,
|
|
813
|
+
success: spinner,
|
|
814
|
+
help: spinner,
|
|
815
|
+
info: spinner,
|
|
816
|
+
warning: spinner
|
|
817
|
+
},
|
|
818
|
+
message: {
|
|
819
|
+
active: spinner,
|
|
820
|
+
error: spinner,
|
|
821
|
+
success: spinner,
|
|
822
|
+
help: spinner,
|
|
823
|
+
info: spinner,
|
|
824
|
+
warning: spinner
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
else if ((0, __stryke_type_checks_is_set_object.isSetObject)(spinner)) {
|
|
828
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.icon)) {
|
|
829
|
+
const icon = spinner.icon;
|
|
830
|
+
resolvedConfig.colors.text.spinner.icon = {
|
|
831
|
+
active: icon,
|
|
832
|
+
error: icon,
|
|
833
|
+
success: icon,
|
|
834
|
+
help: icon,
|
|
835
|
+
info: icon,
|
|
836
|
+
warning: icon
|
|
837
|
+
};
|
|
838
|
+
} else if ((0, __stryke_type_checks_is_set_object.isSetObject)(spinner.icon)) {
|
|
839
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.icon.active)) resolvedConfig.colors.text.spinner.icon.active = spinner.icon.active;
|
|
840
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.icon.error)) resolvedConfig.colors.text.spinner.icon.error = spinner.icon.error;
|
|
841
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.icon.success)) resolvedConfig.colors.text.spinner.icon.success = spinner.icon.success;
|
|
842
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.icon.help)) resolvedConfig.colors.text.spinner.icon.help = spinner.icon.help;
|
|
843
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.icon.info)) resolvedConfig.colors.text.spinner.icon.info = spinner.icon.info;
|
|
844
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.icon.warning)) resolvedConfig.colors.text.spinner.icon.warning = spinner.icon.warning;
|
|
845
|
+
}
|
|
846
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.message)) {
|
|
847
|
+
const message$1 = spinner.message;
|
|
848
|
+
resolvedConfig.colors.text.spinner.message = {
|
|
849
|
+
active: message$1,
|
|
850
|
+
error: message$1,
|
|
851
|
+
success: message$1,
|
|
852
|
+
help: message$1,
|
|
853
|
+
info: message$1,
|
|
854
|
+
warning: message$1
|
|
855
|
+
};
|
|
856
|
+
} else if ((0, __stryke_type_checks_is_set_object.isSetObject)(spinner.message)) {
|
|
857
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.message.active)) resolvedConfig.colors.text.spinner.message.active = spinner.message.active;
|
|
858
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.message.error)) resolvedConfig.colors.text.spinner.message.error = spinner.message.error;
|
|
859
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.message.success)) resolvedConfig.colors.text.spinner.message.success = spinner.message.success;
|
|
860
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.message.help)) resolvedConfig.colors.text.spinner.message.help = spinner.message.help;
|
|
861
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.message.info)) resolvedConfig.colors.text.spinner.message.info = spinner.message.info;
|
|
862
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(spinner.message.warning)) resolvedConfig.colors.text.spinner.message.warning = spinner.message.warning;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
768
865
|
}
|
|
769
866
|
resolvedConfig.colors.border ??= {
|
|
770
867
|
banner: {
|
|
@@ -1215,7 +1312,25 @@ const colors = (context) => ({
|
|
|
1215
1312
|
if (!resolvedConfig.colors.text.prompt.input?.cancelled && resolvedConfig.colors.text.prompt.input?.disabled) resolvedConfig.colors.text.prompt.input.cancelled = resolvedConfig.colors.text.prompt.input.disabled;
|
|
1216
1313
|
if (!resolvedConfig.colors.text.prompt.input?.placeholder && resolvedConfig.colors.text.prompt.input?.disabled) resolvedConfig.colors.text.prompt.input.placeholder = resolvedConfig.colors.text.prompt.input.disabled;
|
|
1217
1314
|
if (!resolvedConfig.colors.text.prompt.input?.disabled && resolvedConfig.colors.text.prompt.input?.placeholder) resolvedConfig.colors.text.prompt.input.disabled = resolvedConfig.colors.text.prompt.input.placeholder;
|
|
1218
|
-
|
|
1315
|
+
if (!resolvedConfig.colors.text.spinner.icon?.active && resolvedConfig.colors.text.spinner.message?.active) resolvedConfig.colors.text.spinner.icon.active = resolvedConfig.colors.text.spinner.message.active;
|
|
1316
|
+
if (!resolvedConfig.colors.text.spinner.icon?.success && resolvedConfig.colors.text.spinner.message?.success) resolvedConfig.colors.text.spinner.icon.success = resolvedConfig.colors.text.spinner.message.success;
|
|
1317
|
+
if (!resolvedConfig.colors.text.spinner.icon?.error && resolvedConfig.colors.text?.spinner?.message?.error) resolvedConfig.colors.text.spinner.icon.error = resolvedConfig.colors.text.spinner.message.error;
|
|
1318
|
+
if (!resolvedConfig.colors.text.spinner.icon?.help && resolvedConfig.colors.text.spinner.message?.help) resolvedConfig.colors.text.spinner.icon.help = resolvedConfig.colors.text.spinner.message.help;
|
|
1319
|
+
if (!resolvedConfig.colors.text.spinner.icon?.info && resolvedConfig.colors.text.spinner.message?.info) resolvedConfig.colors.text.spinner.icon.info = resolvedConfig.colors.text.spinner.message.info;
|
|
1320
|
+
if (!resolvedConfig.colors.text.spinner.icon?.warning && resolvedConfig.colors.text.spinner.message?.warning) resolvedConfig.colors.text.spinner.icon.warning = resolvedConfig.colors.text.spinner.message.warning;
|
|
1321
|
+
if (!resolvedConfig.colors.text.spinner.icon?.active && resolvedConfig.colors.text?.banner?.title?.primary) resolvedConfig.colors.text.spinner.icon.active = resolvedConfig.colors.text.banner.title.primary;
|
|
1322
|
+
if (!resolvedConfig.colors.text.spinner.icon?.success && resolvedConfig.colors.text?.message?.header?.success) resolvedConfig.colors.text.spinner.icon.success = resolvedConfig.colors.text.message.header.success;
|
|
1323
|
+
if (!resolvedConfig.colors.text.spinner.icon?.error && resolvedConfig.colors.text?.message?.header?.error) resolvedConfig.colors.text.spinner.icon.error = resolvedConfig.colors.text.message.header.error;
|
|
1324
|
+
if (!resolvedConfig.colors.text.spinner.icon?.help && resolvedConfig.colors.text?.message?.header?.help) resolvedConfig.colors.text.spinner.icon.help = resolvedConfig.colors.text.message.header.help;
|
|
1325
|
+
if (!resolvedConfig.colors.text.spinner.icon?.info && resolvedConfig.colors.text?.message?.header?.info) resolvedConfig.colors.text.spinner.icon.info = resolvedConfig.colors.text.message.header.info;
|
|
1326
|
+
if (!resolvedConfig.colors.text.spinner.icon?.warning && resolvedConfig.colors.text?.message?.header?.warning) resolvedConfig.colors.text.spinner.icon.warning = resolvedConfig.colors.text.message.header.warning;
|
|
1327
|
+
if (!resolvedConfig.colors.text.spinner.message?.active && resolvedConfig.colors.text?.spinner?.icon?.active) resolvedConfig.colors.text.spinner.message.active = resolvedConfig.colors.text.spinner.icon.active;
|
|
1328
|
+
if (!resolvedConfig.colors.text.spinner.message?.success && resolvedConfig.colors.text?.spinner?.icon?.success) resolvedConfig.colors.text.spinner.message.success = resolvedConfig.colors.text.spinner.icon.success;
|
|
1329
|
+
if (!resolvedConfig.colors.text.spinner.message?.error && resolvedConfig.colors.text?.spinner?.icon?.error) resolvedConfig.colors.text.spinner.message.error = resolvedConfig.colors.text.spinner.icon.error;
|
|
1330
|
+
if (!resolvedConfig.colors.text.spinner.message?.help && resolvedConfig.colors.text?.spinner?.icon?.help) resolvedConfig.colors.text.spinner.message.help = resolvedConfig.colors.text.spinner.icon.help;
|
|
1331
|
+
if (!resolvedConfig.colors.text.spinner.message?.info && resolvedConfig.colors.text?.spinner?.icon?.info) resolvedConfig.colors.text.spinner.message.info = resolvedConfig.colors.text.spinner.icon.info;
|
|
1332
|
+
if (!resolvedConfig.colors.text.spinner.message?.warning && resolvedConfig.colors.text?.spinner?.icon?.warning) resolvedConfig.colors.text.spinner.message.warning = resolvedConfig.colors.text.spinner.icon.warning;
|
|
1333
|
+
require_helpers_merge.mergeThemes(context, resolvedConfig);
|
|
1219
1334
|
return dictionary;
|
|
1220
1335
|
}
|
|
1221
1336
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeThemes } from "
|
|
1
|
+
import { mergeThemes } from "../helpers/merge.mjs";
|
|
2
2
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
3
3
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
4
4
|
|
|
@@ -169,6 +169,24 @@ const colors = (context) => ({
|
|
|
169
169
|
submitted: colors$1,
|
|
170
170
|
disabled: colors$1
|
|
171
171
|
}
|
|
172
|
+
},
|
|
173
|
+
spinner: {
|
|
174
|
+
icon: {
|
|
175
|
+
active: colors$1,
|
|
176
|
+
error: colors$1,
|
|
177
|
+
success: colors$1,
|
|
178
|
+
help: colors$1,
|
|
179
|
+
info: colors$1,
|
|
180
|
+
warning: colors$1
|
|
181
|
+
},
|
|
182
|
+
message: {
|
|
183
|
+
active: colors$1,
|
|
184
|
+
error: colors$1,
|
|
185
|
+
success: colors$1,
|
|
186
|
+
help: colors$1,
|
|
187
|
+
info: colors$1,
|
|
188
|
+
warning: colors$1
|
|
189
|
+
}
|
|
172
190
|
}
|
|
173
191
|
},
|
|
174
192
|
border: {
|
|
@@ -357,6 +375,24 @@ const colors = (context) => ({
|
|
|
357
375
|
submitted: text,
|
|
358
376
|
disabled: text
|
|
359
377
|
}
|
|
378
|
+
},
|
|
379
|
+
spinner: {
|
|
380
|
+
icon: {
|
|
381
|
+
active: text,
|
|
382
|
+
error: text,
|
|
383
|
+
success: text,
|
|
384
|
+
help: text,
|
|
385
|
+
info: text,
|
|
386
|
+
warning: text
|
|
387
|
+
},
|
|
388
|
+
message: {
|
|
389
|
+
active: text,
|
|
390
|
+
error: text,
|
|
391
|
+
success: text,
|
|
392
|
+
help: text,
|
|
393
|
+
info: text,
|
|
394
|
+
warning: text
|
|
395
|
+
}
|
|
360
396
|
}
|
|
361
397
|
};
|
|
362
398
|
else if (isSetObject(text)) {
|
|
@@ -764,6 +800,67 @@ const colors = (context) => ({
|
|
|
764
800
|
if (isSetString(prompt.description.disabled)) resolvedConfig.colors.text.prompt.description.disabled = prompt.description.disabled;
|
|
765
801
|
}
|
|
766
802
|
}
|
|
803
|
+
resolvedConfig.colors.text.spinner ??= {
|
|
804
|
+
icon: {},
|
|
805
|
+
message: {}
|
|
806
|
+
};
|
|
807
|
+
const spinner = text.spinner;
|
|
808
|
+
if (isSetString(spinner)) resolvedConfig.colors.text.spinner = {
|
|
809
|
+
icon: {
|
|
810
|
+
active: spinner,
|
|
811
|
+
error: spinner,
|
|
812
|
+
success: spinner,
|
|
813
|
+
help: spinner,
|
|
814
|
+
info: spinner,
|
|
815
|
+
warning: spinner
|
|
816
|
+
},
|
|
817
|
+
message: {
|
|
818
|
+
active: spinner,
|
|
819
|
+
error: spinner,
|
|
820
|
+
success: spinner,
|
|
821
|
+
help: spinner,
|
|
822
|
+
info: spinner,
|
|
823
|
+
warning: spinner
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
else if (isSetObject(spinner)) {
|
|
827
|
+
if (isSetString(spinner.icon)) {
|
|
828
|
+
const icon = spinner.icon;
|
|
829
|
+
resolvedConfig.colors.text.spinner.icon = {
|
|
830
|
+
active: icon,
|
|
831
|
+
error: icon,
|
|
832
|
+
success: icon,
|
|
833
|
+
help: icon,
|
|
834
|
+
info: icon,
|
|
835
|
+
warning: icon
|
|
836
|
+
};
|
|
837
|
+
} else if (isSetObject(spinner.icon)) {
|
|
838
|
+
if (isSetString(spinner.icon.active)) resolvedConfig.colors.text.spinner.icon.active = spinner.icon.active;
|
|
839
|
+
if (isSetString(spinner.icon.error)) resolvedConfig.colors.text.spinner.icon.error = spinner.icon.error;
|
|
840
|
+
if (isSetString(spinner.icon.success)) resolvedConfig.colors.text.spinner.icon.success = spinner.icon.success;
|
|
841
|
+
if (isSetString(spinner.icon.help)) resolvedConfig.colors.text.spinner.icon.help = spinner.icon.help;
|
|
842
|
+
if (isSetString(spinner.icon.info)) resolvedConfig.colors.text.spinner.icon.info = spinner.icon.info;
|
|
843
|
+
if (isSetString(spinner.icon.warning)) resolvedConfig.colors.text.spinner.icon.warning = spinner.icon.warning;
|
|
844
|
+
}
|
|
845
|
+
if (isSetString(spinner.message)) {
|
|
846
|
+
const message$1 = spinner.message;
|
|
847
|
+
resolvedConfig.colors.text.spinner.message = {
|
|
848
|
+
active: message$1,
|
|
849
|
+
error: message$1,
|
|
850
|
+
success: message$1,
|
|
851
|
+
help: message$1,
|
|
852
|
+
info: message$1,
|
|
853
|
+
warning: message$1
|
|
854
|
+
};
|
|
855
|
+
} else if (isSetObject(spinner.message)) {
|
|
856
|
+
if (isSetString(spinner.message.active)) resolvedConfig.colors.text.spinner.message.active = spinner.message.active;
|
|
857
|
+
if (isSetString(spinner.message.error)) resolvedConfig.colors.text.spinner.message.error = spinner.message.error;
|
|
858
|
+
if (isSetString(spinner.message.success)) resolvedConfig.colors.text.spinner.message.success = spinner.message.success;
|
|
859
|
+
if (isSetString(spinner.message.help)) resolvedConfig.colors.text.spinner.message.help = spinner.message.help;
|
|
860
|
+
if (isSetString(spinner.message.info)) resolvedConfig.colors.text.spinner.message.info = spinner.message.info;
|
|
861
|
+
if (isSetString(spinner.message.warning)) resolvedConfig.colors.text.spinner.message.warning = spinner.message.warning;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
767
864
|
}
|
|
768
865
|
resolvedConfig.colors.border ??= {
|
|
769
866
|
banner: {
|
|
@@ -1214,6 +1311,24 @@ const colors = (context) => ({
|
|
|
1214
1311
|
if (!resolvedConfig.colors.text.prompt.input?.cancelled && resolvedConfig.colors.text.prompt.input?.disabled) resolvedConfig.colors.text.prompt.input.cancelled = resolvedConfig.colors.text.prompt.input.disabled;
|
|
1215
1312
|
if (!resolvedConfig.colors.text.prompt.input?.placeholder && resolvedConfig.colors.text.prompt.input?.disabled) resolvedConfig.colors.text.prompt.input.placeholder = resolvedConfig.colors.text.prompt.input.disabled;
|
|
1216
1313
|
if (!resolvedConfig.colors.text.prompt.input?.disabled && resolvedConfig.colors.text.prompt.input?.placeholder) resolvedConfig.colors.text.prompt.input.disabled = resolvedConfig.colors.text.prompt.input.placeholder;
|
|
1314
|
+
if (!resolvedConfig.colors.text.spinner.icon?.active && resolvedConfig.colors.text.spinner.message?.active) resolvedConfig.colors.text.spinner.icon.active = resolvedConfig.colors.text.spinner.message.active;
|
|
1315
|
+
if (!resolvedConfig.colors.text.spinner.icon?.success && resolvedConfig.colors.text.spinner.message?.success) resolvedConfig.colors.text.spinner.icon.success = resolvedConfig.colors.text.spinner.message.success;
|
|
1316
|
+
if (!resolvedConfig.colors.text.spinner.icon?.error && resolvedConfig.colors.text?.spinner?.message?.error) resolvedConfig.colors.text.spinner.icon.error = resolvedConfig.colors.text.spinner.message.error;
|
|
1317
|
+
if (!resolvedConfig.colors.text.spinner.icon?.help && resolvedConfig.colors.text.spinner.message?.help) resolvedConfig.colors.text.spinner.icon.help = resolvedConfig.colors.text.spinner.message.help;
|
|
1318
|
+
if (!resolvedConfig.colors.text.spinner.icon?.info && resolvedConfig.colors.text.spinner.message?.info) resolvedConfig.colors.text.spinner.icon.info = resolvedConfig.colors.text.spinner.message.info;
|
|
1319
|
+
if (!resolvedConfig.colors.text.spinner.icon?.warning && resolvedConfig.colors.text.spinner.message?.warning) resolvedConfig.colors.text.spinner.icon.warning = resolvedConfig.colors.text.spinner.message.warning;
|
|
1320
|
+
if (!resolvedConfig.colors.text.spinner.icon?.active && resolvedConfig.colors.text?.banner?.title?.primary) resolvedConfig.colors.text.spinner.icon.active = resolvedConfig.colors.text.banner.title.primary;
|
|
1321
|
+
if (!resolvedConfig.colors.text.spinner.icon?.success && resolvedConfig.colors.text?.message?.header?.success) resolvedConfig.colors.text.spinner.icon.success = resolvedConfig.colors.text.message.header.success;
|
|
1322
|
+
if (!resolvedConfig.colors.text.spinner.icon?.error && resolvedConfig.colors.text?.message?.header?.error) resolvedConfig.colors.text.spinner.icon.error = resolvedConfig.colors.text.message.header.error;
|
|
1323
|
+
if (!resolvedConfig.colors.text.spinner.icon?.help && resolvedConfig.colors.text?.message?.header?.help) resolvedConfig.colors.text.spinner.icon.help = resolvedConfig.colors.text.message.header.help;
|
|
1324
|
+
if (!resolvedConfig.colors.text.spinner.icon?.info && resolvedConfig.colors.text?.message?.header?.info) resolvedConfig.colors.text.spinner.icon.info = resolvedConfig.colors.text.message.header.info;
|
|
1325
|
+
if (!resolvedConfig.colors.text.spinner.icon?.warning && resolvedConfig.colors.text?.message?.header?.warning) resolvedConfig.colors.text.spinner.icon.warning = resolvedConfig.colors.text.message.header.warning;
|
|
1326
|
+
if (!resolvedConfig.colors.text.spinner.message?.active && resolvedConfig.colors.text?.spinner?.icon?.active) resolvedConfig.colors.text.spinner.message.active = resolvedConfig.colors.text.spinner.icon.active;
|
|
1327
|
+
if (!resolvedConfig.colors.text.spinner.message?.success && resolvedConfig.colors.text?.spinner?.icon?.success) resolvedConfig.colors.text.spinner.message.success = resolvedConfig.colors.text.spinner.icon.success;
|
|
1328
|
+
if (!resolvedConfig.colors.text.spinner.message?.error && resolvedConfig.colors.text?.spinner?.icon?.error) resolvedConfig.colors.text.spinner.message.error = resolvedConfig.colors.text.spinner.icon.error;
|
|
1329
|
+
if (!resolvedConfig.colors.text.spinner.message?.help && resolvedConfig.colors.text?.spinner?.icon?.help) resolvedConfig.colors.text.spinner.message.help = resolvedConfig.colors.text.spinner.icon.help;
|
|
1330
|
+
if (!resolvedConfig.colors.text.spinner.message?.info && resolvedConfig.colors.text?.spinner?.icon?.info) resolvedConfig.colors.text.spinner.message.info = resolvedConfig.colors.text.spinner.icon.info;
|
|
1331
|
+
if (!resolvedConfig.colors.text.spinner.message?.warning && resolvedConfig.colors.text?.spinner?.icon?.warning) resolvedConfig.colors.text.spinner.message.warning = resolvedConfig.colors.text.spinner.icon.warning;
|
|
1217
1332
|
mergeThemes(context, resolvedConfig);
|
|
1218
1333
|
return dictionary;
|
|
1219
1334
|
}
|