@udixio/theme 1.0.0-beta.21 → 1.0.0-beta.23

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/theme.esm.js CHANGED
@@ -1499,24 +1499,24 @@ var ConfigService = /*#__PURE__*/function () {
1499
1499
  this.appService = appService;
1500
1500
  }
1501
1501
  var _proto = ConfigService.prototype;
1502
- _proto.loadConfig = function loadConfig() {
1502
+ _proto.loadConfig = function loadConfig(config) {
1503
1503
  var _this$appService = this.appService,
1504
1504
  themeService = _this$appService.themeService,
1505
1505
  colorService = _this$appService.colorService,
1506
1506
  pluginService = _this$appService.pluginService;
1507
- var _this$getConfig = this.getConfig(),
1508
- sourceColor = _this$getConfig.sourceColor,
1509
- _this$getConfig$contr = _this$getConfig.contrastLevel,
1510
- contrastLevel = _this$getConfig$contr === void 0 ? 0 : _this$getConfig$contr,
1511
- _this$getConfig$isDar = _this$getConfig.isDark,
1512
- isDark = _this$getConfig$isDar === void 0 ? false : _this$getConfig$isDar,
1513
- _this$getConfig$varia = _this$getConfig.variant,
1514
- variant = _this$getConfig$varia === void 0 ? VariantModel.tonalSpot : _this$getConfig$varia,
1515
- palettes = _this$getConfig.palettes,
1516
- colors = _this$getConfig.colors,
1517
- _this$getConfig$useDe = _this$getConfig.useDefaultColors,
1518
- useDefaultColors = _this$getConfig$useDe === void 0 ? true : _this$getConfig$useDe,
1519
- plugins = _this$getConfig.plugins;
1507
+ var _ref2 = config != null ? config : this.getConfig(),
1508
+ sourceColor = _ref2.sourceColor,
1509
+ _ref2$contrastLevel = _ref2.contrastLevel,
1510
+ contrastLevel = _ref2$contrastLevel === void 0 ? 0 : _ref2$contrastLevel,
1511
+ _ref2$isDark = _ref2.isDark,
1512
+ isDark = _ref2$isDark === void 0 ? false : _ref2$isDark,
1513
+ _ref2$variant = _ref2.variant,
1514
+ variant = _ref2$variant === void 0 ? VariantModel.tonalSpot : _ref2$variant,
1515
+ palettes = _ref2.palettes,
1516
+ colors = _ref2.colors,
1517
+ _ref2$useDefaultColor = _ref2.useDefaultColors,
1518
+ useDefaultColors = _ref2$useDefaultColor === void 0 ? true : _ref2$useDefaultColor,
1519
+ plugins = _ref2.plugins;
1520
1520
  themeService.create({
1521
1521
  contrastLevel: contrastLevel,
1522
1522
  isDark: isDark,
@@ -1524,9 +1524,9 @@ var ConfigService = /*#__PURE__*/function () {
1524
1524
  variant: variant
1525
1525
  });
1526
1526
  if (palettes) {
1527
- Object.entries(palettes).forEach(function (_ref2) {
1528
- var key = _ref2[0],
1529
- value = _ref2[1];
1527
+ Object.entries(palettes).forEach(function (_ref3) {
1528
+ var key = _ref3[0],
1529
+ value = _ref3[1];
1530
1530
  return themeService.addCustomPalette(key, value);
1531
1531
  });
1532
1532
  }
@@ -1636,10 +1636,10 @@ importContainer(AppContainer, [ConfigModule, AppModule, PluginModule, ColorModul
1636
1636
  function bootstrap() {
1637
1637
  return AppContainer.resolve('appService');
1638
1638
  }
1639
- function bootstrapFromConfig(path) {
1639
+ function bootstrapFromConfig(args) {
1640
1640
  var configService = AppContainer.resolve('configService');
1641
- if (path) configService.configPath = path;
1642
- configService.loadConfig();
1641
+ if (args != null && args.path) configService.configPath = args.path;
1642
+ configService.loadConfig(args == null ? void 0 : args.config);
1643
1643
  return AppContainer.resolve('appService');
1644
1644
  }
1645
1645