You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

2 years ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. Object.defineProperty(exports, "default", {
  6. enumerable: true,
  7. get: ()=>getAllConfigs
  8. });
  9. const _defaultConfigStubJs = /*#__PURE__*/ _interopRequireDefault(require("../../stubs/defaultConfig.stub.js"));
  10. const _featureFlags = require("../featureFlags");
  11. function _interopRequireDefault(obj) {
  12. return obj && obj.__esModule ? obj : {
  13. default: obj
  14. };
  15. }
  16. function getAllConfigs(config) {
  17. var ref;
  18. const configs = ((ref = config === null || config === void 0 ? void 0 : config.presets) !== null && ref !== void 0 ? ref : [
  19. _defaultConfigStubJs.default
  20. ]).slice().reverse().flatMap((preset)=>getAllConfigs(preset instanceof Function ? preset() : preset));
  21. const features = {
  22. // Add experimental configs here...
  23. respectDefaultRingColorOpacity: {
  24. theme: {
  25. ringColor: {
  26. DEFAULT: "#3b82f67f"
  27. }
  28. }
  29. }
  30. };
  31. const experimentals = Object.keys(features).filter((feature)=>(0, _featureFlags.flagEnabled)(config, feature)).map((feature)=>features[feature]);
  32. return [
  33. config,
  34. ...experimentals,
  35. ...configs
  36. ];
  37. }