@udixio/theme 1.0.0-beta.3 → 1.0.0-beta.30
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/app.container.d.ts +5 -0
- package/dist/app.module.d.ts +2 -2
- package/dist/app.service.d.ts +9 -3
- package/dist/color/color.interface.d.ts +1 -2
- package/dist/color/color.module.d.ts +2 -2
- package/dist/color/entities/color.entity.d.ts +6 -1
- package/dist/color/entities/index.d.ts +1 -0
- package/dist/color/index.d.ts +5 -0
- package/dist/color/models/default-color.model.d.ts +2 -3
- package/dist/color/models/index.d.ts +1 -0
- package/dist/color/services/color-manager.service.d.ts +18 -0
- package/dist/color/services/color.service.d.ts +21 -0
- package/dist/color/services/index.d.ts +2 -0
- package/dist/config/config.interface.d.ts +13 -0
- package/dist/config/config.module.d.ts +2 -0
- package/dist/config/config.service.d.ts +12 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/index.d.ts +11 -0
- package/dist/main.d.ts +6 -1
- package/dist/material-color-utilities/index.d.ts +1 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/plugin.module.d.ts +2 -0
- package/dist/plugin/plugin.service.d.ts +8 -0
- package/dist/plugin/pluginAbstract.d.ts +18 -0
- package/dist/plugins/font/font.plugin.d.ts +49 -0
- package/dist/plugins/font/index.d.ts +1 -0
- package/dist/plugins/tailwind/index.d.ts +3 -0
- package/dist/plugins/tailwind/main.d.ts +13 -0
- package/dist/plugins/tailwind/plugins-tailwind/font.d.ts +5 -0
- package/dist/plugins/tailwind/plugins-tailwind/index.d.ts +2 -0
- package/dist/plugins/tailwind/plugins-tailwind/state.d.ts +4 -0
- package/dist/plugins/tailwind/plugins-tailwind/themer.d.ts +10 -0
- package/dist/plugins/tailwind/tailwind.plugin.d.ts +18 -0
- package/dist/theme/entities/index.d.ts +2 -0
- package/dist/theme/entities/variant.entity.d.ts +2 -1
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/models/index.d.ts +1 -0
- package/dist/theme/services/index.d.ts +3 -0
- package/dist/theme/services/scheme.service.d.ts +7 -2
- package/dist/theme/services/theme.service.d.ts +16 -7
- package/dist/theme/services/variant.service.d.ts +8 -2
- package/dist/theme/theme.module.d.ts +2 -2
- package/dist/theme.cjs.development.js +1416 -906
- package/dist/theme.cjs.development.js.map +1 -1
- package/dist/theme.cjs.production.min.js +1 -1
- package/dist/theme.cjs.production.min.js.map +1 -1
- package/dist/theme.esm.js +1383 -907
- package/dist/theme.esm.js.map +1 -1
- package/package.json +21 -22
- package/src/app.container.ts +46 -0
- package/src/app.module.ts +5 -8
- package/src/app.service.spec.ts +1 -1
- package/src/app.service.ts +20 -8
- package/src/color/color.interface.ts +1 -3
- package/src/color/color.module.ts +8 -10
- package/src/color/entities/color.entity.ts +13 -1
- package/src/color/entities/index.ts +1 -0
- package/src/color/index.ts +5 -0
- package/src/color/models/default-color.model.ts +205 -202
- package/src/color/models/index.ts +1 -0
- package/src/color/{color-manager.service.ts → services/color-manager.service.ts} +23 -15
- package/src/color/{color.service.spec.ts → services/color.service.spec.ts} +1 -1
- package/src/color/services/color.service.ts +75 -0
- package/src/color/services/index.ts +2 -0
- package/src/config/config.interface.ts +14 -0
- package/src/config/config.module.ts +7 -0
- package/src/config/config.service.ts +101 -0
- package/src/config/index.ts +3 -0
- package/src/index.ts +11 -0
- package/src/main.ts +13 -7
- package/src/material-color-utilities/index.ts +1 -0
- package/src/plugin/index.ts +3 -0
- package/src/plugin/plugin.module.ts +7 -0
- package/src/plugin/plugin.service.ts +42 -0
- package/src/plugin/pluginAbstract.ts +44 -0
- package/src/plugins/font/font.plugin.ts +203 -0
- package/src/plugins/font/index.ts +1 -0
- package/src/plugins/tailwind/index.ts +3 -0
- package/src/plugins/tailwind/main.ts +16 -0
- package/src/plugins/tailwind/plugins-tailwind/font.ts +69 -0
- package/src/plugins/tailwind/plugins-tailwind/index.ts +2 -0
- package/src/plugins/tailwind/plugins-tailwind/state.ts +88 -0
- package/src/plugins/tailwind/plugins-tailwind/themer.ts +137 -0
- package/src/plugins/tailwind/tailwind.plugin.ts +72 -0
- package/src/theme/entities/index.ts +2 -0
- package/src/theme/entities/variant.entity.ts +2 -1
- package/src/theme/index.ts +4 -0
- package/src/theme/models/index.ts +1 -0
- package/src/theme/models/variant.model.ts +7 -0
- package/src/theme/services/index.ts +3 -0
- package/src/theme/services/scheme.service.ts +39 -11
- package/src/theme/services/theme.service.ts +30 -14
- package/src/theme/services/variant.service.ts +40 -5
- package/src/theme/theme.module.ts +8 -9
- package/dist/color/color-manager.service.d.ts +0 -15
- package/dist/color/color.service.d.ts +0 -14
- package/src/color/color.service.ts +0 -58
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@nestjs/core"),e=require("tslib"),r=require("@nestjs/common"),n=require("@material/material-color-utilities"),o=require("merge-deep");function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a.apply(null,arguments)}function u(){u=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=Object.create((e&&e.prototype instanceof y?e:y).prototype),a=new M(n||[]);return o(i,"_invoke",{value:O(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var g="suspendedStart",d="suspendedYield",p="executing",v="completed",m={};function y(){}function k(){}function C(){}var w={};l(w,a,(function(){return this}));var b=Object.getPrototypeOf,D=b&&b(b(B([])));D&&D!==r&&n.call(D,a)&&(w=D);var P=C.prototype=y.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,u){var c=h(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(e,r,n){var o=g;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===g)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?v:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function B(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return k.prototype=C,o(P,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:k,configurable:!0}),k.displayName=l(C,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,l(t,s,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,s,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=B,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:B(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function c(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}var s=function(){function t(t,e,r,n){this.low=void 0,this.normal=void 0,this.medium=void 0,this.high=void 0,this.low=t,this.normal=e,this.medium=r,this.high=n}return t.prototype.get=function(t){return t<=-1?this.low:t<0?n.lerp(this.low,this.normal,(t- -1)/1):t<.5?n.lerp(this.normal,this.medium,(t-0)/.5):t<1?n.lerp(this.medium,this.high,(t-.5)/.5):this.high},t}(),l=function(t,e,r,n,o){this.roleA=void 0,this.roleB=void 0,this.delta=void 0,this.polarity=void 0,this.stayTogether=void 0,this.roleA=t,this.roleB=e,this.delta=r,this.polarity=n,this.stayTogether=o},f=function(){function t(t,e,r,n,o,i,a,u){if(this.name=void 0,this.palette=void 0,this.tone=void 0,this.isBackground=void 0,this.background=void 0,this.secondBackground=void 0,this.contrastCurve=void 0,this.toneDeltaPair=void 0,this.hctCache=new Map,this.name=t,this.palette=e,this.tone=r,this.isBackground=n,this.background=o,this.secondBackground=i,this.contrastCurve=a,this.toneDeltaPair=u,!o&&i)throw new Error("Color "+t+" has secondBackgrounddefined, but background is not defined.");if(!o&&a)throw new Error("Color "+t+" has contrastCurvedefined, but background is not defined.");if(o&&!a)throw new Error("Color "+t+" has backgrounddefined, but contrastCurve is not defined.")}t.fromPalette=function(e){var r,n;return new t(null!=(r=e.name)?r:"",e.palette,e.tone,null!=(n=e.isBackground)&&n,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)},t.foregroundTone=function(e,r){var o=n.Contrast.lighterUnsafe(e,r),i=n.Contrast.darkerUnsafe(e,r),a=n.Contrast.ratioOfTones(o,e),u=n.Contrast.ratioOfTones(i,e);if(t.tonePrefersLightForeground(e)){var c=Math.abs(a-u)<.1&&a<r&&u<r;return a>=r||a>=u||c?o:i}return u>=r||u>=a?i:o},t.tonePrefersLightForeground=function(t){return Math.round(t)<60},t.toneAllowsLightForeground=function(t){return Math.round(t)<=49},t.enableLightForeground=function(e){return t.tonePrefersLightForeground(e)&&!t.toneAllowsLightForeground(e)?49:e};var e=t.prototype;return e.getArgb=function(t){return this.getHct(t).toInt()},e.getHct=function(t){var e=this.hctCache.get(t);if(null!=e)return e;var r=this.getTone(t),n=this.palette(t).getHct(r);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n},e.getTone=function(e){var r=e.contrastLevel<0;if(this.toneDeltaPair){var o=this.toneDeltaPair(e),i=o.roleA,a=o.roleB,u=o.delta,c=o.polarity,s=o.stayTogether,l=this.background(e).getTone(e),f="nearer"===c||"lighter"===c&&!e.isDark||"darker"===c&&e.isDark,h=f?i:a,g=f?a:i,d=this.name===h.name,p=e.isDark?1:-1,v=h.contrastCurve.get(e.contrastLevel),m=g.contrastCurve.get(e.contrastLevel),y=h.tone(e),k=n.Contrast.ratioOfTones(l,y)>=v?y:t.foregroundTone(l,v),C=g.tone(e),w=n.Contrast.ratioOfTones(l,C)>=m?C:t.foregroundTone(l,m);return r&&(k=t.foregroundTone(l,v),w=t.foregroundTone(l,m)),(w-k)*p>=u||((w=n.clampDouble(0,100,k+u*p))-k)*p>=u||(k=n.clampDouble(0,100,w-u*p)),50<=k&&k<60?p>0?(k=60,w=Math.max(w,k+u*p)):(k=49,w=Math.min(w,k+u*p)):50<=w&&w<60&&(s?p>0?(k=60,w=Math.max(w,k+u*p)):(k=49,w=Math.min(w,k+u*p)):w=p>0?60:49),d?k:w}var b=this.tone(e);if(null==this.background)return b;var D=this.background(e).getTone(e),P=this.contrastCurve.get(e.contrastLevel);if(n.Contrast.ratioOfTones(D,b)>=P||(b=t.foregroundTone(D,P)),r&&(b=t.foregroundTone(D,P)),this.isBackground&&50<=b&&b<60&&(b=n.Contrast.ratioOfTones(49,D)>=P?49:60),this.secondBackground){var S=[this.background,this.secondBackground],x=S[1],O=[(0,S[0])(e).getTone(e),x(e).getTone(e)],_=O[0],L=O[1],E=[Math.max(_,L),Math.min(_,L)],M=E[0],B=E[1];if(n.Contrast.ratioOfTones(M,b)>=P&&n.Contrast.ratioOfTones(B,b)>=P)return b;var T=n.Contrast.lighter(M,P),j=n.Contrast.darker(B,P),F=[];return-1!==T&&F.push(T),-1!==j&&F.push(j),t.tonePrefersLightForeground(_)||t.tonePrefersLightForeground(L)?T<0?100:T:1===F.length?F[0]:j<0?0:j}return b},t}(),h=function(){function t(t,e,r){this.option=void 0,this.schemeService=void 0,this.colorService=void 0,this.dynamicColor=null,this.option=t,this.schemeService=e,this.colorService=r}var e=t.prototype;return e.update=function(t){this.dynamicColor=null,this.option=a({},this.option,t)},e.getHex=function(){return n.hexFromArgb(this.getArgb())},e.getArgb=function(){return this.getDynamicColor().getArgb(this.schemeService.get())},e.getName=function(){return this.option.name.replace(/([A-Z])/g,"_$1").toLowerCase()},e.getDynamicColor=function(){return this.dynamicColor||(this.dynamicColor=f.fromPalette(a({},this.option,{name:this.getName()}))),this.dynamicColor},t}(),g=function(){function t(t){this.options=void 0,this.options=t}var e,r;return t.prototype.getPalette=function(t){if(!this.options)throw new Error("Scheme options is not set");var e=this.options.palettes.get(t);if(!e)throw new Error("Palette "+t+" not found");return e},e=t,(r=[{key:"contrastLevel",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.contrastLevel}},{key:"isDark",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.isDark}},{key:"sourceColorHct",get:function(){if(!this.options)throw new Error("Scheme options is not set");return n.Hct.fromInt(this.options.sourceColorArgb)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(),d=function(){function t(){this.schemeEntity=void 0,this.options=void 0}var e=t.prototype;return e.createOrUpdate=function(t){this.options=o(t,this.options);var e=new Map,r=n.argbFromHex(this.options.sourceColorHex),i=n.Hct.fromInt(r);if(this.options.palettes){for(var u=0,c=Object.entries(this.options.palettes);u<c.length;u++){var s=c[u],l=s[0],f=(0,s[1])(i);e.set(l,f)}this.schemeEntity=new g(a({},this.options,{palettes:e,sourceColorArgb:r}))}},e.get=function(){if(!this.schemeEntity)throw new Error("Scheme is not created");return this.schemeEntity},t}();d=e.__decorate([r.Injectable()],d);var p=function(t,e){return t.isDark?e.get("surfaceBright").getDynamicColor():e.get("surfaceDim").getDynamicColor()},v=function(){function t(t){this.schemeService=void 0,this.colorMap=new Map,this.schemeService=t}var e=t.prototype;return e.createOrUpdate=function(t,e){var r=this.colorMap.get(t);if(r)r.update(a({},e,{name:t})),this.colorMap.set(t,r);else{var n=e.palette,o=e.tone;if(!n||!o)throw new Error("Palette "+t+" does not exist");r=new h(a({},e,{palette:n,tone:o,name:t}),this.schemeService,this),this.colorMap.set(t,r)}return r},e.remove=function(t){return this.colorMap.delete(t)},e.get=function(t){var e=this.colorMap.get(t);if(e)return e;throw new Error("Color "+t+" does not exist")},e.getAll=function(){return this.colorMap},e.addFromPalette=function(t){var e,r=this,n=t,o=(e=t).charAt(0).toUpperCase()+e.slice(1),i="on"+o,a=n+"Container",u="on"+o+"Container",c="inverse"+o,f=n+"Fixed",h=n+"FixedDim",g="on"+o+"Fixed",d="on"+o+"FixedVariant";this.createOrUpdate(n,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(t){return p(t,r)},contrastCurve:new s(3,4.5,7,11),toneDeltaPair:function(t){return new l(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),15,"nearer",!1)}}),this.createOrUpdate(i,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?20:100},background:function(t){return r.get(n).getDynamicColor()},contrastCurve:new s(4.5,7,11,21)}),this.createOrUpdate(a,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(t){return p(t,r)},contrastCurve:new s(1,1,3,7),toneDeltaPair:function(t){return new l(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),15,"nearer",!1)}}),this.createOrUpdate(u,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?90:10},background:function(t){return r.get(a).getDynamicColor()},contrastCurve:new s(4.5,7,11,21)}),this.createOrUpdate(c,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?40:80},background:function(t){return r.get("inverseSurface").getDynamicColor()},contrastCurve:new s(3,4.5,7,11)}),this.createOrUpdate(f,{palette:function(e){return e.getPalette(t)},tone:function(t){return 90},isBackground:!0,background:function(t){return p(t,r)},contrastCurve:new s(1,1,3,7),toneDeltaPair:function(t){return new l(r.get(f).getDynamicColor(),r.get(h).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(h,{palette:function(e){return e.getPalette(t)},tone:function(t){return 80},isBackground:!0,background:function(t){return p(t,r)},contrastCurve:new s(1,1,3,7),toneDeltaPair:function(t){return new l(r.get(f).getDynamicColor(),r.get(h).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(g,{palette:function(e){return e.getPalette(t)},tone:function(t){return 10},background:function(t){return r.get(h).getDynamicColor()},secondBackground:function(t){return r.get(f).getDynamicColor()},contrastCurve:new s(4.5,7,11,21)}),this.createOrUpdate(d,{palette:function(e){return e.getPalette(t)},tone:function(t){return 30},background:function(t){return r.get(h).getDynamicColor()},secondBackground:function(t){return r.get(f).getDynamicColor()},contrastCurve:new s(3,4.5,7,11)})},t}();v=e.__decorate([r.Injectable(),e.__metadata("design:paramtypes",[d])],v);var m=function(){function t(t){this.colorManagerService=void 0,this.colorManagerService=t}var e=t.prototype;return e.getAllColors=function(){return this.colorManagerService.getAll()},e.addBaseColors=function(){var t=this;this.colorManagerService.addFromPalette("primary"),this.colorManagerService.addFromPalette("secondary"),this.colorManagerService.addFromPalette("tertiary");var e,r=(e=this.colorManagerService,{background:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},onBackground:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(t){return e.get("background").getDynamicColor()},contrastCurve:new s(3,3,4.5,7)},surface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},surfaceDim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:87},isBackground:!0},surfaceBright:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?24:98},isBackground:!0},surfaceContainerLowest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?4:100},isBackground:!0},surfaceContainerLow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?10:96},isBackground:!0},surfaceContainer:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?12:94},isBackground:!0},surfaceContainerHigh:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?17:92},isBackground:!0},surfaceContainerHighest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?22:90},isBackground:!0},onSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(t){return p(t,e)},contrastCurve:new s(4.5,7,11,21)},surfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:90},isBackground:!0},onSurfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?80:30},background:function(t){return p(t,e)},contrastCurve:new s(3,4.5,7,11)},inverseSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:20}},inverseOnSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?20:95},background:function(t){return e.get("inverseSurface").getDynamicColor()},contrastCurve:new s(4.5,7,11,21)},outline:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?60:50},background:function(t){return p(t,e)},contrastCurve:new s(1.5,3,4.5,7)},outlineVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:80},background:function(t){return p(t,e)},contrastCurve:new s(1,1,3,7)},shadow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},scrim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},surfaceTint:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?80:40},isBackground:!0},secondaryContainer:{tone:function(t){var e=t.isDark?30:90;return function(t,e,r,o){var i=r,a=n.Hct.from(t,e,r);if(a.chroma<e)for(var u=a.chroma;a.chroma<e;){var c=n.Hct.from(t,e,i+=o?-1:1);if(u>c.chroma)break;if(Math.abs(c.chroma-e)<.4)break;Math.abs(c.chroma-e)<Math.abs(a.chroma-e)&&(a=c),u=Math.max(u,c.chroma)}return i}(t.getPalette("secondary").hue,t.getPalette("secondary").chroma,e,!t.isDark)}},onSecondaryContainer:{tone:function(t){return f.foregroundTone(e.get("secondaryContainer").getDynamicColor().tone(t),4.5)}},tertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){var e=t.getPalette("tertiary").getHct(t.sourceColorHct.tone);return n.DislikeAnalyzer.fixIfDisliked(e).tone}},onTertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return f.foregroundTone(e.get("tertiaryContainer").getDynamicColor().tone(t),4.5)}},error:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(t){return p(t,e)},contrastCurve:new s(3,4.5,7,11),toneDeltaPair:function(t){return new l(e.get("errorContainer").getDynamicColor(),e.get("error").getDynamicColor(),15,"nearer",!1)}},onError:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?20:100},background:function(t){return e.get("error").getDynamicColor()},contrastCurve:new s(4.5,7,11,21)},errorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(t){return p(t,e)},contrastCurve:new s(1,1,3,7),toneDeltaPair:function(t){return new l(e.get("errorContainer").getDynamicColor(),e.get("error").getDynamicColor(),15,"nearer",!1)}},onErrorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?90:10},background:function(t){return e.get("errorContainer").getDynamicColor()},contrastCurve:new s(4.5,7,11,21)},onTertiaryFixed:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 10},background:function(t){return e.get("tertiaryFixedDim").getDynamicColor()},secondBackground:function(t){return e.get("tertiaryFixed").getDynamicColor()},contrastCurve:new s(4.5,7,11,21)},onTertiaryFixedVariant:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 30},background:function(t){return e.get("tertiaryFixedDim").getDynamicColor()},secondBackground:function(t){return e.get("tertiaryFixed").getDynamicColor()},contrastCurve:new s(3,4.5,7,11)}});Object.keys(r).map((function(e){var n=r[e];if(n)return t.colorManagerService.createOrUpdate(e,n)}))},e.addColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},e.addColors=function(t){var e=this;return Object.keys(t).map((function(r){return e.addColor(r,t[r])}))},e.getColor=function(t){return this.colorManagerService.get(t)},e.removeColor=function(t){return this.colorManagerService.remove(t)},e.updateColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},t}();m=e.__decorate([r.Injectable(),e.__metadata("design:paramtypes",[v])],m);var y=function(){function t(t){this.schemeService=void 0,this.schemeService=t}return t.prototype.set=function(t){t.palettes.error||(t.palettes.error=function(){return n.TonalPalette.fromHueAndChroma(25,84)}),this.schemeService.createOrUpdate(t)},t}();y=e.__decorate([r.Injectable(),e.__metadata("design:paramtypes",[d])],y);var k=function(){function t(t,e){this.schemeService=void 0,this.variantService=void 0,this.schemeService=t,this.variantService=e}var e=t.prototype;return e.create=function(t){this.schemeService.createOrUpdate(t)},e.addVariant=function(t){this.variantService.set(t)},e.update=function(t){this.schemeService.createOrUpdate(t)},t}();k=e.__decorate([r.Injectable(),e.__metadata("design:paramtypes",[d,y])],k);var C=function(t,e){this.colorService=void 0,this.themeService=void 0,this.colorService=t,this.themeService=e};C=e.__decorate([r.Injectable(),e.__metadata("design:paramtypes",[m,k])],C);var w=function(){},b=function(){},D=function(){};function P(){var e;return e=u().mark((function e(){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.NestFactory.create(D);case 2:return n=(r=e.sent).get(C),e.abrupt("return",[n,function(){return r.close()}]);case 6:case"end":return e.stop()}}),e)})),P=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)}))},P.apply(this,arguments)}D=e.__decorate([r.Module({imports:[b=e.__decorate([r.Module({imports:[w=e.__decorate([r.Module({providers:[d,k,y],exports:[k,d]})],w)],providers:[m,v],exports:[m]})],b),w],providers:[C]})],D),exports.main=function(){return P.apply(this,arguments)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("awilix"),e=require("@material/material-color-utilities"),r=require("node:path"),n=require("node:fs"),o=require("tailwindcss/plugin"),i=function(){function t(t){var e=t.colorManagerService;this.colorManagerService=void 0,this.colorManagerService=e}var e=t.prototype;return e.getColors=function(){return this.colorManagerService.getAll()},e.addColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},e.addColors=function(t){var e=this;Array.isArray(t)||(t=[t]),t.forEach((function(t){"function"==typeof t&&(t=t(e)),t.fromPalettes&&(Array.isArray(t.fromPalettes)||(t.fromPalettes=[t.fromPalettes]),t.fromPalettes.map((function(t){e.colorManagerService.addFromPalette(t)}))),t.colors&&Object.keys(t.colors).map((function(r){return e.addColor(r,t.colors[r])}))}))},e.getColor=function(t){return this.colorManagerService.get(t)},e.removeColor=function(t){return this.colorManagerService.remove(t)},e.updateColor=function(t,e){return this.colorManagerService.createOrUpdate(t,e)},t}();function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g(n.key),n)}}function u(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l.apply(null,arguments)}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function g(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}var p,d=function(){function t(t,e,r,n){this.low=void 0,this.normal=void 0,this.medium=void 0,this.high=void 0,this.low=t,this.normal=e,this.medium=r,this.high=n}return t.prototype.get=function(t){return t<=-1?this.low:t<0?e.lerp(this.low,this.normal,(t- -1)/1):t<.5?e.lerp(this.normal,this.medium,(t-0)/.5):t<1?e.lerp(this.medium,this.high,(t-.5)/.5):this.high},t}(),m=function(){function t(t,e,r,n,o,i,a,s){if(this.name=void 0,this.palette=void 0,this.tone=void 0,this.isBackground=void 0,this.background=void 0,this.secondBackground=void 0,this.contrastCurve=void 0,this.toneDeltaPair=void 0,this.hctCache=new Map,this.name=t,this.palette=e,this.tone=r,this.isBackground=n,this.background=o,this.secondBackground=i,this.contrastCurve=a,this.toneDeltaPair=s,!o&&i)throw new Error("Color "+t+" has secondBackgrounddefined, but background is not defined.");if(!o&&a)throw new Error("Color "+t+" has contrastCurvedefined, but background is not defined.");if(o&&!a)throw new Error("Color "+t+" has backgrounddefined, but contrastCurve is not defined.")}t.fromPalette=function(e){var r,n;return new t(null!=(r=e.name)?r:"",e.palette,e.tone,null!=(n=e.isBackground)&&n,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)},t.foregroundTone=function(r,n){var o=e.Contrast.lighterUnsafe(r,n),i=e.Contrast.darkerUnsafe(r,n),a=e.Contrast.ratioOfTones(o,r),s=e.Contrast.ratioOfTones(i,r);if(t.tonePrefersLightForeground(r)){var u=Math.abs(a-s)<.1&&a<n&&s<n;return a>=n||a>=s||u?o:i}return s>=n||s>=a?i:o},t.tonePrefersLightForeground=function(t){return Math.round(t)<60},t.toneAllowsLightForeground=function(t){return Math.round(t)<=49},t.enableLightForeground=function(e){return t.tonePrefersLightForeground(e)&&!t.toneAllowsLightForeground(e)?49:e};var r=t.prototype;return r.getArgb=function(t){return this.getHct(t).toInt()},r.getHct=function(t){var e=this.hctCache.get(t);if(null!=e)return e;var r=this.getTone(t),n=this.palette(t).getHct(r);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,n),n},r.getTone=function(r){var n=r.contrastLevel<0;if(this.toneDeltaPair){var o=this.toneDeltaPair(r),i=o.roleA,a=o.roleB,s=o.delta,u=o.polarity,c=o.stayTogether,l=this.background(r).getTone(r),f="nearer"===u||"lighter"===u&&!r.isDark||"darker"===u&&r.isDark,h=f?i:a,g=f?a:i,p=this.name===h.name,d=r.isDark?1:-1,m=h.contrastCurve.get(r.contrastLevel),v=g.contrastCurve.get(r.contrastLevel),y=h.tone(r),C=e.Contrast.ratioOfTones(l,y)>=m?y:t.foregroundTone(l,m),k=g.tone(r),S=e.Contrast.ratioOfTones(l,k)>=v?k:t.foregroundTone(l,v);return n&&(C=t.foregroundTone(l,m),S=t.foregroundTone(l,v)),(S-C)*d>=s||((S=e.clampDouble(0,100,C+s*d))-C)*d>=s||(C=e.clampDouble(0,100,S-s*d)),50<=C&&C<60?d>0?(C=60,S=Math.max(S,C+s*d)):(C=49,S=Math.min(S,C+s*d)):50<=S&&S<60&&(c?d>0?(C=60,S=Math.max(S,C+s*d)):(C=49,S=Math.min(S,C+s*d)):S=d>0?60:49),p?C:S}var b=this.tone(r);if(null==this.background)return b;var P=this.background(r).getTone(r),x=this.contrastCurve.get(r.contrastLevel);if(e.Contrast.ratioOfTones(P,b)>=x||(b=t.foregroundTone(P,x)),n&&(b=t.foregroundTone(P,x)),this.isBackground&&50<=b&&b<60&&(b=e.Contrast.ratioOfTones(49,P)>=x?49:60),this.secondBackground){var w=[this.background,this.secondBackground],D=w[1],F=[(0,w[0])(r).getTone(r),D(r).getTone(r)],H=F[0],T=F[1],E=[Math.max(H,T),Math.min(H,T)],O=E[0],M=E[1];if(e.Contrast.ratioOfTones(O,b)>=x&&e.Contrast.ratioOfTones(M,b)>=x)return b;var A=e.Contrast.lighter(O,x),B=e.Contrast.darker(M,x),j=[];return-1!==A&&j.push(A),-1!==B&&j.push(B),t.tonePrefersLightForeground(H)||t.tonePrefersLightForeground(T)?A<0?100:A:1===j.length?j[0]:B<0?0:B}return b},t}(),v=function(t,e,r,n,o){this.roleA=void 0,this.roleB=void 0,this.delta=void 0,this.polarity=void 0,this.stayTogether=void 0,this.roleA=t,this.roleB=e,this.delta=r,this.polarity=n,this.stayTogether=o},y=function(){function t(t,e,r){this.option=void 0,this.schemeService=void 0,this.colorService=void 0,this.dynamicColor=null,this.option=t,this.schemeService=e,this.colorService=r}var r=t.prototype;return r.update=function(t){this.dynamicColor=null,this.option=l({},this.option,t)},r.getHex=function(){return e.hexFromArgb(this.getArgb())},r.getArgb=function(){return this.getDynamicColor().getArgb(this.schemeService.get())},r.getRgb=function(){return{r:(t=this.getArgb())>>16&255,g:t>>8&255,b:255&t};var t},r.getName=function(){return this.option.name.replace(/([A-Z])/g,"_$1").toLowerCase()},r.getDynamicColor=function(){return this.dynamicColor||(this.dynamicColor=m.fromPalette(l({},this.option,{name:this.getName()}))),this.dynamicColor},t}(),C=function(t,e){return e instanceof i?t.isDark?e.getColor("surfaceBright").getDynamicColor():e.getColor("surfaceDim").getDynamicColor():t.isDark?e.get("surfaceBright").getDynamicColor():e.get("surfaceDim").getDynamicColor()},k=function(){function t(t){var e=t.schemeService;this.colorMap=new Map,this.schemeService=void 0,this.schemeService=e}var e=t.prototype;return e.createOrUpdate=function(t,e){var r=this.colorMap.get(t);if(r)r.update(l({},e,{name:t})),this.colorMap.set(t,r);else{var n=e.palette,o=e.tone;if(!n||!o)throw new Error("Palette "+t+" does not exist");r=new y(l({},e,{palette:n,tone:o,name:t}),this.schemeService,this),this.colorMap.set(t,r)}return r},e.remove=function(t){return this.colorMap.delete(t)},e.get=function(t){var e=this.colorMap.get(t);if(e)return e;throw new Error("Color "+t+" does not exist")},e.getAll=function(){return this.colorMap},e.addFromPalette=function(t){var e,r=this,n=t,o=(e=t).charAt(0).toUpperCase()+e.slice(1),i="on"+o,a=n+"Container",s="on"+o+"Container",u="inverse"+o,c=n+"Fixed",l=n+"FixedDim",f="on"+o+"Fixed",h="on"+o+"FixedVariant";this.createOrUpdate(n,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(t){return C(t,r)},contrastCurve:new d(3,4.5,7,11),toneDeltaPair:function(t){return new v(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),10,"nearer",!1)}}),this.createOrUpdate(i,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?20:100},background:function(t){return r.get(n).getDynamicColor()},contrastCurve:new d(4.5,7,11,21)}),this.createOrUpdate(a,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(t){return C(t,r)},contrastCurve:new d(1,1,3,7),toneDeltaPair:function(t){return new v(r.get(a).getDynamicColor(),r.get(n).getDynamicColor(),10,"nearer",!1)}}),this.createOrUpdate(s,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?90:10},background:function(t){return r.get(a).getDynamicColor()},contrastCurve:new d(4.5,7,11,21)}),this.createOrUpdate(u,{palette:function(e){return e.getPalette(t)},tone:function(t){return t.isDark?40:80},background:function(t){return r.get("inverseSurface").getDynamicColor()},contrastCurve:new d(3,4.5,7,11)}),this.createOrUpdate(c,{palette:function(e){return e.getPalette(t)},tone:function(t){return 90},isBackground:!0,background:function(t){return C(t,r)},contrastCurve:new d(1,1,3,7),toneDeltaPair:function(t){return new v(r.get(c).getDynamicColor(),r.get(l).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(l,{palette:function(e){return e.getPalette(t)},tone:function(t){return 80},isBackground:!0,background:function(t){return C(t,r)},contrastCurve:new d(1,1,3,7),toneDeltaPair:function(t){return new v(r.get(c).getDynamicColor(),r.get(l).getDynamicColor(),10,"lighter",!0)}}),this.createOrUpdate(f,{palette:function(e){return e.getPalette(t)},tone:function(t){return 10},background:function(t){return r.get(l).getDynamicColor()},secondBackground:function(t){return r.get(c).getDynamicColor()},contrastCurve:new d(4.5,7,11,21)}),this.createOrUpdate(h,{palette:function(e){return e.getPalette(t)},tone:function(t){return 30},background:function(t){return r.get(l).getDynamicColor()},secondBackground:function(t){return r.get(c).getDynamicColor()},contrastCurve:new d(3,4.5,7,11)})},t}(),S={colorManagerService:t.asClass(k).singleton(),colorService:t.asClass(i).singleton()},b=function(){function t(t){this.options=void 0,this.options=t}return t.prototype.getPalette=function(t){if(!this.options)throw new Error("Scheme options is not set");var e=this.options.palettes.get(t);if(!e)throw new Error("Palette "+t+" not found");return e},u(t,[{key:"contrastLevel",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.contrastLevel}},{key:"isDark",get:function(){if(!this.options)throw new Error("Scheme options is not set");return this.options.isDark}},{key:"sourceColorHct",get:function(){if(!this.options)throw new Error("Scheme options is not set");return e.Hct.fromInt(this.options.sourceColorArgb)}}])}(),P=function(){function t(){this.schemeEntity=void 0,this.options=void 0}var r=t.prototype;return r.createOrUpdate=function(t){var r,n;this.options=l({},this.options,t,{sourcesColorHex:l({},null==(r=this.options)?void 0:r.sourcesColorHex,t.sourcesColorHex),palettes:l({},null==(n=this.options)?void 0:n.palettes,t.palettes)});var o=new Map;if(!this.options.sourcesColorHex.primary)throw new Error("Primary source color is not set");var i=e.argbFromHex(this.options.sourcesColorHex.primary),a=e.Hct.fromInt(i);if(this.options.palettes){for(var s=0,u=Object.entries(this.options.palettes);s<u.length;s++){var c=u[s],f=c[0],h=c[1],g=h.sourceColorkey,p=h.tonalPalette,d=void 0;if(g){var m=e.argbFromHex(this.options.sourcesColorHex[g]);d=p(e.Hct.fromInt(m))}else d=p(a);o.set(f,d)}this.schemeEntity=new b(l({},this.options,{palettes:o,sourceColorArgb:i}))}},r.get=function(){if(!this.schemeEntity)throw new Error("Scheme is not created");return this.schemeEntity},t}(),x=function(){function t(t){var e=t.schemeService,r=t.variantService;this.schemeService=void 0,this.variantService=void 0,this.schemeService=e,this.variantService=r}var e=t.prototype;return e.create=function(t){this.schemeService.createOrUpdate(l({},t,{sourcesColorHex:{primary:t.sourceColorHex}})),this.variantService.set(t.variant)},e.update=function(t){var e=l({},t);t.sourceColorHex&&(e.sourcesColorHex={primary:t.sourceColorHex}),this.schemeService.createOrUpdate(e),t.variant&&this.variantService.set(t.variant)},e.addCustomPalette=function(t,e){this.variantService.addCustomPalette(t,e)},t}(),w=function(){function t(t){var e=t.schemeService;this.customPalettes={},this.variantEntity=void 0,this.schemeService=void 0,this.schemeService=e}var r=t.prototype;return r.addCustomPalette=function(t,e){this.customPalettes[t]=e,this.update()},r.set=function(t){this.variantEntity=t,t.palettes.error||(t.palettes.error=function(){return e.TonalPalette.fromHueAndChroma(25,84)}),this.update()},r.update=function(){var t=this;if(this.variantEntity){var e={};Object.keys(this.variantEntity.palettes).forEach((function(r){e[r]={tonalPalette:t.variantEntity.palettes[r]}})),this.variantEntity.customPalettes&&Object.keys(this.customPalettes).forEach((function(r){e[r]={sourceColorkey:r,tonalPalette:t.variantEntity.customPalettes}})),this.schemeService.createOrUpdate({sourcesColorHex:this.customPalettes,palettes:e})}},t}(),D={schemeService:t.asClass(P).singleton(),variantService:t.asClass(w).singleton(),themeService:t.asClass(x).singleton()},F=function(t){var e=t.colorService,r=t.themeService,n=t.pluginService;this.colorService=void 0,this.themeService=void 0,this.pluginService=void 0,this.pluginService=n,this.colorService=e,this.themeService=r},H={appService:t.asClass(F).singleton()},T=function(t){return{fromPalettes:["primary","secondary","tertiary"],colors:{background:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},onBackground:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(e){return t.getColor("background").getDynamicColor()},contrastCurve:new d(3,3,4.5,7)},surface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:98},isBackground:!0},surfaceDim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?6:87},isBackground:!0},surfaceBright:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?24:98},isBackground:!0},surfaceContainerLowest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?4:100},isBackground:!0},surfaceContainerLow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?10:96},isBackground:!0},surfaceContainer:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?12:94},isBackground:!0},surfaceContainerHigh:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?17:92},isBackground:!0},surfaceContainerHighest:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?22:90},isBackground:!0},onSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:10},background:function(e){return C(e,t)},contrastCurve:new d(4.5,7,11,21)},surfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:90},isBackground:!0},onSurfaceVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?80:30},background:function(e){return C(e,t)},contrastCurve:new d(3,4.5,7,11)},inverseSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?90:20}},inverseOnSurface:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?20:95},background:function(e){return t.getColor("inverseSurface").getDynamicColor()},contrastCurve:new d(4.5,7,11,21)},outline:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?60:50},background:function(e){return C(e,t)},contrastCurve:new d(1.5,3,4.5,7)},outlineVariant:{palette:function(t){return t.getPalette("neutralVariant")},tone:function(t){return t.isDark?30:80},background:function(e){return C(e,t)},contrastCurve:new d(1,1,3,7)},shadow:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},scrim:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return 0}},surfaceTint:{palette:function(t){return t.getPalette("neutral")},tone:function(t){return t.isDark?80:40},isBackground:!0},secondaryContainer:{tone:function(t){var r=t.isDark?30:90;return function(t,r,n,o){var i=n,a=e.Hct.from(t,r,n);if(a.chroma<r)for(var s=a.chroma;a.chroma<r;){var u=e.Hct.from(t,r,i+=o?-1:1);if(s>u.chroma)break;if(Math.abs(u.chroma-r)<.4)break;Math.abs(u.chroma-r)<Math.abs(a.chroma-r)&&(a=u),s=Math.max(s,u.chroma)}return i}(t.getPalette("secondary").hue,t.getPalette("secondary").chroma,r,!t.isDark)}},onSecondaryContainer:{tone:function(e){return m.foregroundTone(t.getColor("secondaryContainer").getDynamicColor().tone(e),4.5)}},tertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){var r=t.getPalette("tertiary").getHct(t.sourceColorHct.tone);return e.DislikeAnalyzer.fixIfDisliked(r).tone}},onTertiaryContainer:{palette:function(t){return t.getPalette("tertiary")},tone:function(e){return m.foregroundTone(t.getColor("tertiaryContainer").getDynamicColor().tone(e),4.5)}},error:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?80:40},isBackground:!0,background:function(e){return C(e,t)},contrastCurve:new d(3,4.5,7,11),toneDeltaPair:function(e){return new v(t.getColor("errorContainer").getDynamicColor(),t.getColor("error").getDynamicColor(),15,"nearer",!1)}},onError:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?20:100},background:function(e){return t.getColor("error").getDynamicColor()},contrastCurve:new d(4.5,7,11,21)},errorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?30:90},isBackground:!0,background:function(e){return C(e,t)},contrastCurve:new d(1,1,3,7),toneDeltaPair:function(e){return new v(t.getColor("errorContainer").getDynamicColor(),t.getColor("error").getDynamicColor(),15,"nearer",!1)}},onErrorContainer:{palette:function(t){return t.getPalette("error")},tone:function(t){return t.isDark?90:10},background:function(e){return t.getColor("errorContainer").getDynamicColor()},contrastCurve:new d(4.5,7,11,21)},onTertiaryFixed:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 10},background:function(e){return t.getColor("tertiaryFixedDim").getDynamicColor()},secondBackground:function(e){return t.getColor("tertiaryFixed").getDynamicColor()},contrastCurve:new d(4.5,7,11,21)},onTertiaryFixedVariant:{palette:function(t){return t.getPalette("tertiary")},tone:function(t){return 30},background:function(e){return t.getColor("tertiaryFixedDim").getDynamicColor()},secondBackground:function(e){return t.getColor("tertiaryFixed").getDynamicColor()},contrastCurve:new d(3,4.5,7,11)}}}},E=function(t,r,n){var o=t.hue;if(r.length!==n.length)throw new Error("mismatch between hue length "+r.length+" & rotations "+n.length);if(1===n.length)return e.sanitizeDegreesDouble(t.hue+n[0]);for(var i=r.length,a=0;a<=i-2;a++)if(r[a]<o&&o<r[a+1])return e.sanitizeDegreesDouble(o+n[a]);return o},O=function(){};p=O,O.tonalSpot={palettes:{primary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,36)},secondary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,16)},tertiary:function(t){return e.TonalPalette.fromHueAndChroma(e.sanitizeDegreesDouble(t.hue+60),24)},neutral:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,6)},neutralVariant:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,8)}},customPalettes:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,16)}},O.vibrant={palettes:{primary:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,200)},secondary:function(t){return e.TonalPalette.fromHueAndChroma(E(t,p.hues,p.secondaryRotations),24)},tertiary:function(t){return e.TonalPalette.fromHueAndChroma(E(t,p.hues,p.tertiaryRotations),32)},neutral:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,6)},neutralVariant:function(t){return e.TonalPalette.fromHueAndChroma(t.hue,8)}},customPalettes:function(t){return e.TonalPalette.fromHueAndChroma(E(t,p.hues,p.secondaryRotations),24)}},O.hues=[0,41,61,101,131,181,251,301,360],O.secondaryRotations=[18,15,10,12,15,18,15,12,12],O.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var M=function(){function t(t){var e=t.appService;this.configPath="./theme.config",this.appService=void 0,this.appService=e}var e=t.prototype;return e.loadConfig=function(t){var e=this.appService,r=e.themeService,n=e.colorService,o=e.pluginService,i=null!=t?t:this.getConfig(),a=i.contrastLevel,s=i.isDark,u=i.variant,c=i.palettes,l=i.colors,f=i.useDefaultColors,h=void 0===f||f,g=i.plugins;r.create({contrastLevel:void 0===a?0:a,isDark:void 0!==s&&s,sourceColorHex:i.sourceColor,variant:void 0===u?O.tonalSpot:u}),c&&Object.entries(c).forEach((function(t){return r.addCustomPalette(t[0],t[1])})),h&&n.addColors(T),l&&n.addColors(l),g&&(g.forEach((function(t){o.addPlugin(t)})),o.loadPlugins(this.appService))},e.getConfig=function(){if("undefined"!=typeof process&&process.release&&"node"===process.release.name){for(var t=r.resolve(this.configPath),e=null,o=0,i=[".js",".ts",".jms",".jcs"];o<i.length;o++){var a=t+i[o];if(n.existsSync(a)){e=require(a);break}}if(!e)throw new Error("Configuration file not found");return"default"in e?e.default:e}throw new Error("You must provide configuration object when using this library in a browser.")},t}(),A={configService:t.asClass(M).singleton()},B=function(){function t(){this.plugins=new Map}var e=t.prototype;return e.addPlugin=function(t){this.plugins.set(t.name,t)},e.loadPlugins=function(t){var e=this,r=new Map(this.plugins),n=0;do{n=r.size,r.forEach((function(n,o){0===n.dependencies.filter((function(t){return!e.plugins.has((new t).name)})).length&&(e.plugins.set(n.name,n.init(t)),r.delete(o))}))}while(0!=r.size&&r.size<n);if(r.size>0)throw new Error("Some plugins couldn't be loaded due to missing dependencies: "+Array.from(r.keys()))},e.getPlugin=function(t){var e=this.plugins.get((new t).name);if(!e)throw new Error("Plugin "+t.name+" not found");return e},t}(),j={pluginService:t.asClass(B).singleton()};function z(t,e){return e.forEach((function(e){Object.entries(e).forEach((function(e){t.register(e[0],e[1])}))})),t}var I=t.createContainer({injectionMode:t.InjectionMode.PROXY});function L(t){var e=I.resolve("configService");return null!=t&&t.path&&(e.configPath=t.path),e.loadConfig(null==t?void 0:t.config),I.resolve("appService")}z(I,[A,H,j,S,D]);var U,W=function(){function t(t){this.options=void 0,this.pluginInstance=void 0,this.options=t}var e=t.prototype;return e.init=function(t){return this.pluginInstance=new this.pluginClass(t,this.options),this.pluginInstance.onInit(),this},e.getInstance=function(){if(!this.pluginInstance)throw new Error("Plugin "+this.name+" is not initialized");return this.pluginInstance},t}(),_=function(t,e){this.appService=void 0,this.options=void 0,this.appService=t,this.options=e,this.onInit()};exports.FontFamily=void 0,(U=exports.FontFamily||(exports.FontFamily={})).Expressive="expressive",U.Neutral="neutral";var V=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).dependencies=[],e.name="font",e.pluginClass=N,e}return f(e,t),e}(W),N=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this)._fontFamily=void 0,e._fontStyles=void 0,e}f(e,t);var r=e.prototype;return r.getFonts=function(){return{fontStyles:this.fontStyles,fontFamily:this.fontFamily}},r.onInit=function(){var t,e,r,n,o=this;this.fontFamily={expressive:null!=(t=null==(e=this.options)||null==(e=e.fontFamily)?void 0:e.expressive)?t:["Roboto","sans-serif"],neutral:null!=(r=null==(n=this.options)||null==(n=n.fontFamily)?void 0:n.neutral)?r:["Roboto","sans-serif"]},this.fontStyles={display:{large:{fontWeight:400,fontSize:3.5625,lineHeight:4,letterSpacing:-.015625,fontFamily:exports.FontFamily.Expressive},medium:{fontWeight:400,fontSize:2.8125,lineHeight:3.25,fontFamily:exports.FontFamily.Expressive},small:{fontWeight:400,fontSize:2.25,lineHeight:2.75,fontFamily:exports.FontFamily.Expressive}},headline:{large:{fontWeight:400,fontSize:2,lineHeight:2.5,fontFamily:exports.FontFamily.Expressive},medium:{fontWeight:400,fontSize:1.75,lineHeight:2.25,fontFamily:exports.FontFamily.Expressive},small:{fontWeight:400,fontSize:1.5,lineHeight:2,fontFamily:exports.FontFamily.Expressive}},title:{large:{fontWeight:400,fontSize:1.375,lineHeight:1.75,fontFamily:exports.FontFamily.Neutral},medium:{fontWeight:500,fontSize:1,lineHeight:1.5,fontFamily:exports.FontFamily.Neutral,letterSpacing:.009375},small:{fontWeight:500,fontSize:.875,lineHeight:1.25,fontFamily:exports.FontFamily.Neutral,letterSpacing:.00625}},label:{large:{fontWeight:500,fontSize:.875,lineHeight:1.25,fontFamily:exports.FontFamily.Neutral,letterSpacing:.00625},medium:{fontWeight:500,fontSize:.75,lineHeight:1,fontFamily:exports.FontFamily.Neutral,letterSpacing:.03125},small:{fontWeight:500,fontSize:.6875,lineHeight:1,fontFamily:exports.FontFamily.Neutral,letterSpacing:.03125}},body:{large:{fontWeight:400,fontSize:1,lineHeight:1.5625,fontFamily:exports.FontFamily.Neutral,letterSpacing:.03125},medium:{fontWeight:400,fontSize:.875,lineHeight:1.25,fontFamily:exports.FontFamily.Neutral,letterSpacing:.015625},small:{fontWeight:400,fontSize:.75,lineHeight:1,fontFamily:exports.FontFamily.Neutral,letterSpacing:.025}}},this.options&&this.options.fontStyles&&Object.entries(this.options.fontStyles).forEach((function(t){var e=t[0];Object.entries(t[1]).forEach((function(t){var r=t[0],n=t[1];n&&(o.fontStyles[e][r]=l({},o.fontStyles[e][r],n))}))}))},u(e,[{key:"fontFamily",get:function(){if(!this._fontFamily)throw new Error("Font family not initialized");return this._fontFamily},set:function(t){this._fontFamily=t}},{key:"fontStyles",get:function(){if(!this._fontStyles)throw new Error("Font styles not initialized");return this._fontStyles},set:function(t){this._fontStyles=t}}])}(_),R=function(t){return o((function(e){q(e,{statePrefix:"state",disabledStyles:{textOpacity:.38,backgroundOpacity:.12},transition:{duration:150}},t)}),{})},q=function(t,e,r){for(var n=t.addComponents,o=e.statePrefix,i=e.disabledStyles,a=e.transition,s={},u=0,l=[!1,!0];u<l.length;u++)for(var f,h=l[u]?"group-":"",g=c(r);!(f=g()).done;){var p,d=f.value,m="."+h+o+"-"+d;s[m]=((p={})["@apply "+h+"hover:bg-"+d+"/[0.08]"]={},p["@apply "+h+"active:bg-"+d+"/[0.12]"]={},p["@apply "+h+"focus-visible:bg-"+d+"/[0.12]"]={},p),a&&(s[m]["@apply transition-colors"]={},s[m]["@apply duration-"+a.duration]={}),i&&(s[m]["@apply "+h+"disabled:text-on-surface/["+i.textOpacity+"]"]={},s[m]["@apply "+h+"disabled:bg-on-surface/["+i.backgroundOpacity+"]"]={})}for(var v,y=c(r);!(v=y()).done;)for(var C=v.value,k=0,S=["hover","active","focus","disabled"];k<S.length;k++){var b,P=S[k],x="."+P+"-"+o+"-"+C;if("active"===P||"focus"===P)s[x]=((b={})["@apply bg-"+C+"/[0.12]"]={},b);else if("hover"===P){var w;s[x]=((w={})["@apply bg-"+C+"/[0.08]"]={},w)}else if("disabled"===P){var D,F;s[x]=((D={})["@apply text-on-surface/["+i.textOpacity+"]"]={},D),s[x]=((F={})["@apply bg-on-surface/["+i.backgroundOpacity+"]"]={},F)}}n(s)};function $(t){var e=t.name,r=t.darkMode,n=t.isDarkTheme;return{name:n?e+"Dark":e,selectors:n&&"class"===r?[".dark-mode .theme-"+e,".dark-mode.theme-"+e,'[data-theme="dark"] .theme-'+e,'[data-theme="dark"].theme-'+e]:[".theme-"+e,".theme-"+e+" .light-mode",".theme-"+e+' [data-theme="light"]',".light-mode .theme-"+e,".light-mode.theme-"+e,'[data-theme="light"] .theme-'+e,'[data-theme="light"].theme-'+e],mediaQuery:n&&"media"===r?"@media (prefers-color-scheme: dark)":void 0,extend:{colors:t.colors}}}var Z=function(t){var e=t.appService,r=e.themeService,n=e.colorService,o={defaultTheme:{extend:{colors:{}}},themes:[{name:"darkTheme",extend:{colors:{}}}]};return Object.entries(t.colors).forEach((function(t){var e=t[0],r=t[1];o.defaultTheme.extend.colors[e]=r.light,o.themes[0].extend.colors[e]=r.dark})),o.themes[0].selectors="class"===t.darkMode?[".dark-mode",'[data-theme="dark"]']:void 0,o.themes[0].mediaQuery="media"===t.darkMode?"@media (prefers-color-scheme: dark)":void 0,t.subThemes&&Object.entries(t.subThemes).forEach((function(e){var i=e[0];r.update({sourceColorHex:e[1]});for(var a=0,s=[!0,!1];a<s.length;a++){var u=s[a],l={};r.update({isDark:u});for(var f,h=c(n.getColors().entries());!(f=h()).done;){var g=f.value,p=g[1];l[g[0].replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()]=p.getHex()}o.themes.push($({name:i,isDarkTheme:u,darkMode:t.darkMode,colors:l}))}})),require("tailwindcss-themer")(o)},Q=function(t,e){return o((function(r){(0,r.addUtilities)(function(r){for(var n=r.theme,o="rem",i={},a=function(t){return{fontSize:t.fontSize+o,fontWeight:t.fontWeight,lineHeight:t.lineHeight+o,letterSpacing:t.letterSpacing?t.letterSpacing+o:null,fontFamily:n("fontFamily."+t.fontFamily)}},s=function(t,e,r){var i;return(i={})["@media (min-width: "+n("screens."+e,{})+")"]={fontSize:t.fontSize*r+o,lineHeight:t.lineHeight*r+o},i},u=0,c=Object.entries(t);u<c.length;u++)for(var f=c[u],h=f[0],g=function(){var t=d[p],r=t[1];i[".text-"+h+"-"+t[0]]=l({},a(r),Object.entries(e).reduce((function(t,e){return l({},t,s(r,e[0],e[1]))}),{}))},p=0,d=Object.entries(f[1]);p<d.length;p++)g();return i}({theme:r.theme}))}))},Y=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).dependencies=[V],e.name="tailwind",e.pluginClass=X,e}return f(e,t),e}(W),X=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var r=e.prototype;return r.onInit=function(){var t,e;null!=(t=this.options).darkMode||(t.darkMode="class"),null!=(e=this.options).responsiveBreakPoints||(e.responsiveBreakPoints={lg:1.125})},r.getTheme=function(){for(var t={},e=0,r=[!1,!0];e<r.length;e++){var n=r[e];this.appService.themeService.update({isDark:n});for(var o,i=c(this.appService.colorService.getColors().entries());!(o=i()).done;){var a=o.value,s=a[1],u=a[0].replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase();null!=t[u]||(t[u]={light:"",dark:""}),t[u][n?"dark":"light"]=s.getHex()}}var l=this.appService.pluginService.getPlugin(V).getInstance().getFonts(),f=l.fontStyles;return{colors:{},fontFamily:l.fontFamily,plugins:[R(Object.keys(t)),Q(f,this.options.responsiveBreakPoints),Z({colors:t,darkMode:this.options.darkMode,subThemes:this.options.subThemes,appService:this.appService})]}},e}(_);exports.AppContainer=I,exports.AppModule=H,exports.AppService=F,exports.ColorEntity=y,exports.ColorManagerService=k,exports.ColorModule=S,exports.ColorService=i,exports.ConfigModule=A,exports.ConfigService=M,exports.ContrastCurve=d,exports.DynamicColor=m,exports.FontPlugin=V,exports.PluginAbstract=W,exports.PluginImplAbstract=_,exports.PluginModule=j,exports.PluginService=B,exports.SchemeEntity=b,exports.SchemeService=P,exports.TailwindPlugin=Y,exports.ThemeModule=D,exports.ThemeService=x,exports.ToneDeltaPair=v,exports.VariantEntity=function(t,e){void 0===t&&(t={}),this.palettes=void 0,this.customPalettes=void 0,this.palettes=t,this.customPalettes=e},exports.VariantModel=O,exports.VariantService=w,exports.bootstrap=function(){return I.resolve("appService")},exports.bootstrapFromConfig=L,exports.createTheme=function(){var t=L();return l({},t.pluginService.getPlugin(Y).getInstance().getTheme(),{appService:t})},exports.defaultColors=T,exports.defineConfig=function(t){if(!t||"object"!=typeof t)throw new Error("The configuration is missing or not an object");if(!("sourceColor"in t))throw new Error("Invalid configuration");return t},exports.getRotatedHue=E,exports.highestSurface=C,exports.importContainer=z,exports.state=R,exports.themer=Z;
|
|
2
2
|
//# sourceMappingURL=theme.cjs.production.min.js.map
|