UNPKG

@difizen/mana-core

Version:

75 lines (74 loc) 3.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { ThemeModule: true, ThemeVariableModule: true }; exports.ThemeVariableModule = exports.ThemeModule = void 0; var _module = require("../module"); var _antdVariableContribution = require("./basic/antd-variable-contribution"); var _defaultVariableContribution = require("./basic/default-variable-contribution"); var _variableProtocol = require("./basic/variable-protocol"); var _variableRegistry = require("./basic/variable-registry"); var _antdColorContribution = require("./color/antd-color-contribution"); var _colorProtocol = require("./color/color-protocol"); var _colorRegistry = require("./color/color-registry"); var _defaultColorContribution = require("./color/default-color-contribution"); var _themeApp = require("./theme-app"); var _themeService = require("./theme-service"); Object.keys(_themeService).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _themeService[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _themeService[key]; } }); }); var _basic = require("./basic"); Object.keys(_basic).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _basic[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _basic[key]; } }); }); var _color = require("./color"); Object.keys(_color).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _color[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _color[key]; } }); }); var _protocol = require("./protocol"); Object.keys(_protocol).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _protocol[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _protocol[key]; } }); }); var ThemeModule = exports.ThemeModule = _module.ManaModule.create().register({ token: _themeService.ThemeService, useDynamic: function useDynamic() { return _themeService.ThemeService.get(); } }); var ThemeVariableModule = exports.ThemeVariableModule = _module.ManaModule.create().contribution(_variableProtocol.VariableContribution, _colorProtocol.ColorContribution).register(_variableRegistry.VariableRegistry, _colorRegistry.ColorRegistry, _defaultColorContribution.DefaultColorContribution, _themeApp.ThemeApplication, _defaultVariableContribution.DefaultVariableContribution, _antdColorContribution.AntdColorContribution, _antdVariableContribution.AntdVariableContribution).dependOn(ThemeModule);