xeerpe 0.0.6 → 0.0.12

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.
@@ -0,0 +1,29 @@
1
+ @keyframes xeerpe-pulse {
2
+ 0%, 100% {
3
+ opacity: 1;
4
+ }
5
+ 50% {
6
+ opacity: 0.7;
7
+ }
8
+ }
9
+
10
+ @keyframes xeerpe-rotate {
11
+ from {
12
+ transform: rotate(0deg);
13
+ }
14
+ to {
15
+ transform: rotate(360deg);
16
+ }
17
+ }
18
+
19
+ @keyframes xeerpe-breathe {
20
+ 0% {
21
+ background-size: 100% 100%;
22
+ }
23
+ 50% {
24
+ background-size: 120% 120%;
25
+ }
26
+ 100% {
27
+ background-size: 100% 100%;
28
+ }
29
+ }
@@ -1,4 +1,4 @@
1
- import { EffectOptions, EffectType, NoiseOptions, VignetteOptions, GrainOptions, BlurOptions, FilterType, FilterOptions, GlowOptions } from "../models/index.ts";
1
+ import { EffectOptions, EffectType, NoiseOptions, VignetteOptions, GrainOptions, BlurOptions, FilterType, FilterOptions, GlowOptions, PatternOptions, PatternType, DotsOptions, GridOptions, AnimationOptions, AnimationType } from "../models/index.ts";
2
2
  import { ConicGradientOptions, GradientOptions, GradientType, LinearGradientOptions, MeshGradientOptions, RadialGradientOptions } from "../models/index.ts";
3
3
  export declare class Builder {
4
4
  private _layers;
@@ -9,11 +9,18 @@ export declare class Builder {
9
9
  meshGradient(options: MeshGradientOptions): this;
10
10
  effect(type: EffectType, options: EffectOptions): this;
11
11
  filter(type: FilterType, options: FilterOptions): this;
12
+ pattern(type: PatternType, options: PatternOptions): this;
13
+ animation(type: AnimationType, options: AnimationOptions): this;
12
14
  noise(options: NoiseOptions): this;
13
15
  vignette(options: VignetteOptions): this;
14
16
  grain(options: GrainOptions): this;
15
17
  glow(options: GlowOptions): this;
16
18
  blur(options: BlurOptions): this;
19
+ dots(options: DotsOptions): this;
20
+ grid(options: GridOptions): this;
21
+ pulse(options: AnimationOptions): this;
22
+ rotate(options: AnimationOptions): this;
23
+ breathe(options: AnimationOptions): this;
17
24
  toStyle(): Record<string, string>;
18
25
  toTextStyle(): any;
19
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/core/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,aAAa,EACb,UAAU,EACV,YAAY,EACZ,eAAe,EACf,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EACpE,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,qBAAa,OAAO;IAChB,OAAO,CAAC,OAAO,CAAsB;IAErC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;IAM5D,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAIpD,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAIpD,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAIlD,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAIhD,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAMtD,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAMtD,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAIlC,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAIxC,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAIlC,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIhC,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIhC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAwCjC,WAAW,IAAI,GAAG;CAWrB"}
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/core/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,aAAa,EACb,UAAU,EACV,YAAY,EACZ,eAAe,EACf,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAC3G,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAC/C,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,EACH,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,qBAAa,OAAO;IAChB,OAAO,CAAC,OAAO,CAAsB;IAErC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;IAM5D,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAIpD,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAIpD,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAIlD,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAIhD,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAMtD,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAMtD,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAMzD,SAAS,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAM/D,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAIlC,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAIxC,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAIlC,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIhC,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIhC,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIhC,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIhC,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAItC,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAIvC,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAIxC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IA6CjC,WAAW,IAAI,GAAG;CAWrB"}
@@ -0,0 +1,7 @@
1
+ import { AnimationOptions, AnimationType, BuilderLayer } from "../models/index.ts";
2
+ export declare const generatePulseAnimation: (options: AnimationOptions) => string;
3
+ export declare const generateRotateAnimation: (options: AnimationOptions) => string;
4
+ export declare const generateBreatheAnimation: (options: AnimationOptions) => string;
5
+ export declare const buildAnimationByType: (type: AnimationType, options: AnimationOptions) => string;
6
+ export declare const buildAnimationLayer: (type: AnimationType, options: AnimationOptions) => BuilderLayer;
7
+ //# sourceMappingURL=animations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../src/generators/animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAgB,MAAM,oBAAoB,CAAC;AAEhG,eAAO,MAAM,sBAAsB,GAAI,SAAS,gBAAgB,KAAG,MAGlE,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,SAAS,gBAAgB,KAAG,MAGnE,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,SAAS,gBAAgB,KAAG,MAIpE,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,aAAa,EAAE,SAAS,gBAAgB,WAWlF,CAAA;AAID,eAAO,MAAM,mBAAmB,GAAI,MAAM,aAAa,EAAE,SAAS,gBAAgB,KAAG,YAOpF,CAAA"}
@@ -1,4 +1,6 @@
1
1
  export * from './gradients.ts';
2
2
  export * from './effects.ts';
3
3
  export * from './filters.ts';
4
+ export * from './pattern.ts';
5
+ export * from './animations.ts';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { BuilderLayer, PatternOptions, PatternType } from "../models/index.ts";
2
+ export declare const buildPatternByType: (type: PatternType, options: PatternOptions) => string;
3
+ export declare const buildPatternLayer: (type: PatternType, options: PatternOptions) => BuilderLayer;
4
+ //# sourceMappingURL=pattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/generators/pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAEZ,cAAc,EAAE,WAAW,EAC9B,MAAM,oBAAoB,CAAC;AAkC5B,eAAO,MAAM,kBAAkB,GAAI,MAAM,WAAW,EAAE,SAAS,cAAc,KAAG,MAS/E,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,MAAM,WAAW,EAAE,SAAS,cAAc,KAAG,YAO9E,CAAA"}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={};e.d=(t,r,n)=>{var a=(r,n)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,[n]:r[a]})};a(r,"get"),a(n,"value")},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{Builder:()=>T,colors:()=>C});var r=/^-?\d*\.?\d+(%|px|rem|em|vh|vw|vmin|vmax)$/,n=/^calc\(.+\)$/,a=function(e){var t=e.trim();return r.test(t)||n.test(t)},o=/^-?\d*\.?\d+(deg|rad|grad|turn)$/,c=function(e){return o.test(e.trim())},i=["to top","to bottom","to left","to right","to top right","to bottom right","to top left","to bottom left"],l=function(e){if("string"==typeof e)return e;var t=e.color,r=e.position;return r&&a(r)?"".concat(t," ").concat(r):t},u=function(e){var t,r,n=e.angle&&c(e.angle)?e.angle:e.direction&&(t=e.direction,i.includes(t))?e.direction:"135deg",a=(null==(r=e.colors)?void 0:r.length)?e.colors.map(l).join(", "):"".concat(e.from,", ").concat(e.to),o=e.size?" ".concat(e.size):"";return"linear-gradient(".concat(n,", ").concat(a).concat(o,")")},f=function(e){var t,r,n=null===e.shape?"":"".concat(null!=(t=e.shape)?t:"circle"," "),a=e.size?" ".concat(e.size):"",o="at ".concat(null!=(r=e.position)?r:"center"),c=e.colorFromPosition?" ".concat(e.colorFromPosition):"",i=e.colorToPosition?" ".concat(e.colorToPosition):"",l="".concat(e.from).concat(c,", ").concat(e.to).concat(i);return"radial-gradient(".concat(n).concat(a," ").concat(o,", ").concat(l,")")},s=function(e){var t,r,n=e.angle&&c(e.angle)?"from ".concat(e.angle," "):"",a="at ".concat(null!=(t=e.position)?t:"center"),o=(null==(r=e.colors)?void 0:r.length)?e.colors.map(l).join(", "):"".concat(e.from,", ").concat(e.to);return"conic-gradient(".concat(n).concat(a,", ").concat(o,")")},d=function(e,t){switch(e){case"linear":return u(t);case"radial":return f(t);case"conic":return s(t);case"mesh":return t.layers.map(function(e){e.shape=null!=(t=e.shape)?t:null;var t,r=f(e);return"".concat(r)}).join(", ");default:throw Error("Unknown gradient type: ".concat(e))}},b=function(e,t){var r,n,a,o="mesh"===e;return{type:"gradient",properties:(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},o&&{backgroundImage:d(e,t),backgroundColor:t.background},!o&&{background:d(e,t)}),n=n={backgroundSize:null!=(a=t.backgroundSize)?a:"auto"},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r)}},p=function(e){var t=e.replace("#",""),r=parseInt(3===t.length?t.split("").map(function(e){return e+e}).join(""):t,16);return{red:r>>16&255,green:r>>8&255,blue:255&r}},g=function(e,t){if(e.startsWith("#")){var r=p(e),n=r.red,a=r.green,o=r.blue;return"rgba(".concat(n,", ").concat(a,", ").concat(o,", ").concat(t,")")}return e.startsWith("rgb(")?e.replace("rgb(","rgba(").replace(")",", ".concat(t,")")):e.startsWith("hsl(")?e.replace("hsl(","hsla(").replace(")",", ".concat(t,")")):e},h=function(e,t,r){return Math.min(r,Math.max(t,e))},v=function(e){var t=e.opacity,r=e.scale,n=e.type,a=e.octaves,o=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">\n <filter id="n">\n <feTurbulence type="'.concat(void 0===n?"fractalNoise":n,'" baseFrequency="').concat(void 0===r?.65:r,'" numOctaves="').concat(void 0===a?16:a,'" stitchTiles="stitch"/>\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="100%" height="100%" filter="url(#n)" opacity="').concat(void 0===t?.25:t,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(o,'")')},y=function(e){var t=e.color,r=e.intensity,n=e.spread,a=g(void 0===t?"#000000":t,h(void 0===r?.2:r,0,1)),o=Math.round(100*(void 0===n?.2:n));return"radial-gradient(ellipse at center, transparent ".concat(100-o,"%, ").concat(a," 100%)")},m=function(e){var t=e.intensity,r=e.size,n=void 0===r?"100%":r,a=e.animated,o=h(.08*(void 0===t?1:t),.01,.12),c=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(n,'" height="').concat(n,'" viewBox="0 0 100% 100%">\n <filter id="g" x="0" y="0" width="').concat(n,'" height="').concat(n,'">\n ').concat(void 0!==a&&a?'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch">\n <animate attributeName="baseFrequency" values="0.65;0.68;0.63;0.65" dur="2s" repeatCount="indefinite"/>\n </feTurbulence>':'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/>','\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="').concat(n,'" height="').concat(n,'" filter="url(#g)" opacity="').concat(o,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(c,'")')},k=function(e){var t=e.amount,r=e.spread,n=void 0===r?"":r,a=e.x,o=e.y,c=e.color,i=e.type;return"".concat("inner"===(void 0===i?"outer":i)?"inset ":"").concat(void 0===a?"0px":a," ").concat(void 0===o?"0px":o," ").concat(void 0===t?"20px":t).concat(n?" ".concat(n):""," ").concat(void 0===c?"#ffffff":c)},w=function(e,t){switch(e){case"noise":return v(t);case"vignette":return y(t);case"grain":return m(t);case"glow":return k(t);default:throw Error("Unknown gradient type: ".concat(e))}},O=function(e,t){var r;return"glow"===e?{type:"effect",properties:{boxShadow:w(e,t)}}:{type:"effect",properties:{backgroundImage:w(e,t),backgroundSize:null!=(r=t.backgroundSize)?r:"auto"}}},j=function(e){var t,r,n,a=e.amount,o=void 0===a?"20px":a,c=e.type;return"backdrop"===(void 0===c?"backdrop":c)?{properties:(t={backdropFilter:"blur(".concat(o,")")},r="-webkit-backdrop-filter",n="blur(".concat(o,")"),r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t)}:{properties:{filter:"blur(".concat(o,")")}}},S=function(e,t){if("blur"===e)return j(t);throw Error("Unknown filter type: ".concat(e))};function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function P(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return x(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return x(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var T=function(){var e;function t(){var e,r;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");r=[],(e="_layers")in this?Object.defineProperty(this,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[e]=r}return e=[{key:"gradient",value:function(e,t){var r=b(e,t);return this._layers.push(r),this}},{key:"linearGradient",value:function(e){return this.gradient("linear",e)}},{key:"radialGradient",value:function(e){return this.gradient("radial",e)}},{key:"conicGradient",value:function(e){return this.gradient("conic",e)}},{key:"meshGradient",value:function(e){return this.gradient("mesh",e)}},{key:"effect",value:function(e,t){var r=O(e,t);return this._layers.push(r),this}},{key:"filter",value:function(e,t){var r={type:"filter",properties:S(e,t).properties};return this._layers.push(r),this}},{key:"noise",value:function(e){return this.effect("noise",e)}},{key:"vignette",value:function(e){return this.effect("vignette",e)}},{key:"grain",value:function(e){return this.effect("grain",e)}},{key:"glow",value:function(e){return this.effect("glow",e)}},{key:"blur",value:function(e){return this.filter("blur",e)}},{key:"toStyle",value:function(){var e,t,r,n={gradient:[],filter:[],effect:[]};this._layers.forEach(function(e){n[e.type].push(e.properties)});var a={};if(n.gradient.length||n.effect.length){var o,c=P(n.effect).concat(P(n.gradient)).flatMap(function(e){return[e.backgroundImage,e.background].filter(Boolean)}),i=P(n.effect).concat(P(n.gradient)).map(function(e){return e.backgroundSize}).filter(Boolean),l=n.effect.map(function(e){return e.boxShadow}).filter(Boolean),u=null==(o=n.gradient.find(function(e){return e.backgroundColor}))?void 0:o.backgroundColor;c.length&&(a.backgroundImage=c.join(", ")),i.length&&(a.backgroundSize=i.join(", ")),u&&(a.backgroundColor=u),l&&(a.boxShadow=l.join(", "))}return n.filter.length&&(console.log(n.filter),a.filter=null!=(e=n.filter[0].filter)?e:"",a.backdropFilter=null!=(t=null==(r=n.filter[0])?void 0:r.backdropFilter)?t:""),a}},{key:"toTextStyle",value:function(){var e,t=this.toStyle();return{backgroundImage:null!=(e=t.backgroundImage)?e:t.background,backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",WebkitTextFillColor:"transparent"}}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}(),C={inkwell:"#1a1a2e",obsidian:"#16213e",void:"#0f0f1a",midnightOil:"#1b1f3b",pitch:"#222222",carbon:"#2d2d2d",graphite:"#3d3d3d",flint:"#555555",stone:"#737373",pewter:"#8e8e8e",ash:"#b4b4b0",smoke:"#d0d0cc",bone:"#e8e5dc",chalk:"#f2f0ea",salt:"#faf9f6",parchment:"#f5f0e8",linen:"#eee8d5",cream:"#fdf6e3",absinthe:"#4a7c59",forestFloor:"#2d5a27",malachite:"#3a9e6d",verdigris:"#5f9ea0",celadon:"#ace1af",fern:"#4f7942",chartreuse:"#b5cc18",mantis:"#74c365",viridian:"#40826d",spruce:"#1e4d40",prussian:"#003153",lapis:"#1b4f8c",cobalt:"#0047ab",cerulean:"#007ba7",denim:"#1560bd",glacier:"#80b9d3",powder:"#b0d6e6",steel:"#4682b4",maya:"#73c2fb",delft:"#3640b8",indigoInk:"#220066",wisteria:"#9b7ec8",aubergine:"#614051",amethyst:"#9966cc",mauve:"#e0b0ff",byzantium:"#702963",mulberry:"#c54b8c",plum:"#8e4585",heliotrope:"#df73ff",iris:"#5a4fcf",cinnabar:"#e34234",amaranth:"#e52b50",carmine:"#960018",rouge:"#ab4f62",garnet:"#732e45",crimson:"#dc143c",venetian:"#c80815",blush:"#f4a0a0",tomato:"#ff6347",poppy:"#e35335",amber:"#ffbf00",saffron:"#f4c430",ochre:"#cc7722",goldenrod:"#daa520",harvest:"#da8a2e",copper:"#b87333",terra:"#c2713f",sienna:"#882d17",umber:"#635147",rust:"#b7410e",coral:"#ff7f7f",peach:"#ffb38a",apricot:"#fbceb1",cantaloupe:"#f48054",melon:"#fdbcb4",spearmint:"#a1caa0",sage:"#b2ac88",taupe:"#b5a999",khaki:"#c3b091",dusk:"#8899a6",slate:"#6d8b9c",cadet:"#5f9ea0",eucalyptus:"#5f8575",clay:"#9c6b5a",mushroom:"#9e9388",tealDeep:"#006d77",aquamarine:"#2dc5a2",seafoam:"#93e1d8",jade:"#00a878",turquoise:"#40e0d0",niagara:"#06aed5",tiffany:"#81d8d0",pine:"#01796f",mint:"#98ff98",patina:"#4e8b78",sakura:"#ffb7c5",orchid:"#da70d6",fandango:"#b53389",cerise:"#de3163",magenta:"#ff00ff"};module.exports=t})();
1
+ (()=>{"use strict";var t={};t.d=(e,n,r)=>{var a=(n,r)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,[r]:n[a]})};a(n,"get"),a(r,"value")},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};t.r(e),t.d(e,{Builder:()=>B,colors:()=>W});var n=/^-?\d*\.?\d+(%|px|rem|em|vh|vw|vmin|vmax)$/,r=/^calc\(.+\)$/,a=function(t){var e=t.trim();return n.test(e)||r.test(e)},o=/^-?\d*\.?\d+(deg|rad|grad|turn)$/,c=function(t){return o.test(t.trim())},i=["to top","to bottom","to left","to right","to top right","to bottom right","to top left","to bottom left"],u=function(t){if("string"==typeof t)return t;var e=t.color,n=t.position;return n&&a(n)?"".concat(e," ").concat(n):e},l=function(t){var e,n,r=t.angle&&c(t.angle)?t.angle:t.direction&&(e=t.direction,i.includes(e))?t.direction:"135deg",a=(null==(n=t.colors)?void 0:n.length)?t.colors.map(u).join(", "):"".concat(t.from,", ").concat(t.to),o=t.size?" ".concat(t.size):"";return"linear-gradient(".concat(r,", ").concat(a).concat(o,")")},f=function(t){var e,n,r=null===t.shape?"":"".concat(null!=(e=t.shape)?e:"circle"," "),a=t.size?" ".concat(t.size):"",o="at ".concat(null!=(n=t.position)?n:"center"),c=t.colorFromPosition?" ".concat(t.colorFromPosition):"",i=t.colorToPosition?" ".concat(t.colorToPosition):"",u="".concat(t.from).concat(c,", ").concat(t.to).concat(i);return"radial-gradient(".concat(r).concat(a," ").concat(o,", ").concat(u,")")},s=function(t){var e,n,r=t.angle&&c(t.angle)?"from ".concat(t.angle," "):"",a="at ".concat(null!=(e=t.position)?e:"center"),o=(null==(n=t.colors)?void 0:n.length)?t.colors.map(u).join(", "):"".concat(t.from,", ").concat(t.to);return"conic-gradient(".concat(r).concat(a,", ").concat(o,")")},d=function(t,e){switch(t){case"linear":return l(e);case"radial":return f(e);case"conic":return s(e);case"mesh":return e.layers.map(function(t){t.shape=null!=(e=t.shape)?e:null;var e,n=f(t);return"".concat(n)}).join(", ");default:throw Error("Unknown gradient type: ".concat(t))}},p=function(t,e){var n,r,a,o="mesh"===t;return{type:"gradient",properties:(n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r;r=n[e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})}return t}({},o&&{backgroundImage:d(t,e),backgroundColor:e.background},!o&&{background:d(t,e)}),r=r={backgroundSize:null!=(a=e.backgroundSize)?a:"auto"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e.push.apply(e,n)}return e})(Object(r)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}),n)}};function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var g=function(t){var e=t.replace("#",""),n=parseInt(3===e.length?e.split("").map(function(t){return t+t}).join(""):e,16);return{red:n>>16&255,green:n>>8&255,blue:255&n}},b=function(t,e){if(t.startsWith("#")){var n=g(t),r=n.red,a=n.green,o=n.blue;return"rgba(".concat(r,", ").concat(a,", ").concat(o,", ").concat(e,")")}return t.startsWith("rgb(")?t.replace("rgb(","rgba(").replace(")",", ".concat(e,")")):t.startsWith("hsl(")?t.replace("hsl(","hsla(").replace(")",", ".concat(e,")")):t},h=function(t,e,n){return Math.min(n,Math.max(e,t))},y=function(t){var e=t.trim().match(/^(-?\d*\.?\d+)([a-z%]*)$/i);if(!e)throw Error('Invalid CSS length: "'.concat(t,'"'));var n=function(t){if(Array.isArray(t))return t}(e)||function(t){var e,n,r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a=[],o=!0,c=!1;try{for(r=r.call(t);!(o=(e=r.next()).done)&&(a.push(e.value),3!==a.length);o=!0);}catch(t){c=!0,n=t}finally{try{o||null==r.return||r.return()}finally{if(c)throw n}}return a}}(e)||function(t){if(t){if("string"==typeof t)return v(t,3);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return v(t,3)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[1],a=n[2];return{value:parseFloat(r),unit:a||"px"}},m=function(t){var e=t.opacity,n=t.scale,r=t.type,a=t.octaves,o=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">\n <filter id="n">\n <feTurbulence type="'.concat(void 0===r?"fractalNoise":r,'" baseFrequency="').concat(void 0===n?.65:n,'" numOctaves="').concat(void 0===a?16:a,'" stitchTiles="stitch"/>\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="100%" height="100%" filter="url(#n)" opacity="').concat(void 0===e?.25:e,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(o,'")')},k=function(t){var e=t.color,n=t.intensity,r=t.spread,a=b(void 0===e?"#000000":e,h(void 0===n?.2:n,0,1)),o=Math.round(100*(void 0===r?.2:r));return"radial-gradient(ellipse at center, transparent ".concat(100-o,"%, ").concat(a," 100%)")},w=function(t){var e=t.intensity,n=t.size,r=void 0===n?"100%":n,a=t.animated,o=h(.08*(void 0===e?1:e),.01,.12),c=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(r,'" height="').concat(r,'" viewBox="0 0 100% 100%">\n <filter id="g" x="0" y="0" width="').concat(r,'" height="').concat(r,'">\n ').concat(void 0!==a&&a?'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch">\n <animate attributeName="baseFrequency" values="0.65;0.68;0.63;0.65" dur="2s" repeatCount="indefinite"/>\n </feTurbulence>':'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/>','\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="').concat(r,'" height="').concat(r,'" filter="url(#g)" opacity="').concat(o,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(c,'")')},x=function(t){var e=t.amount,n=t.spread,r=void 0===n?"":n,a=t.x,o=t.y,c=t.color,i=t.type;return"".concat("inner"===(void 0===i?"outer":i)?"inset ":"").concat(void 0===a?"0px":a," ").concat(void 0===o?"0px":o," ").concat(void 0===e?"20px":e).concat(r?" ".concat(r):""," ").concat(void 0===c?"#ffffff":c)},O=function(t,e){switch(t){case"noise":return m(e);case"vignette":return k(e);case"grain":return w(e);case"glow":return x(e);default:throw Error("Unknown gradient type: ".concat(t))}},j=function(t,e){var n;return"glow"===t?{type:"effect",properties:{boxShadow:O(t,e)}}:{type:"effect",properties:{backgroundImage:O(t,e),backgroundSize:null!=(n=e.backgroundSize)?n:"auto"}}},S=function(t){var e,n,r,a=t.amount,o=void 0===a?"20px":a,c=t.type;return"backdrop"===(void 0===c?"backdrop":c)?{properties:(e={backdropFilter:"blur(".concat(o,")")},n="-webkit-backdrop-filter",r="blur(".concat(o,")"),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e)}:{properties:{filter:"blur(".concat(o,")")}}},P=function(t,e){if("blur"===t)return S(e);throw Error("Unknown filter type: ".concat(t))},C=function(t){var e=t.color,n=t.background,r=t.size,a=void 0===r?"20px":r,o=t.spacing,c=t.opacity,i=t.strokeWidth,u=y(null!=o?o:a),l=i?y(i).value:.15*y(a).value,f=b(void 0===e?"#000000":e,void 0===c?.2:c),s=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(u.value).concat(u.unit,'" height="').concat(u.value).concat(u.unit,'" viewBox="0 0 ').concat(u.value," ").concat(u.value,'">\n <rect width="').concat(u.value,'" height="').concat(u.value,'" fill="').concat(void 0===n?"transparent":n,'"/>\n <circle cx="').concat(u.value/2,'" cy="').concat(u.value/2,'" r="').concat(l,'" fill="').concat(f,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(s,'")')},I=function(t){var e=t.color,n=t.background,r=t.size,a=t.opacity,o=t.strokeWidth,c=y(void 0===r?"40px":r),i=y(void 0===o?"1px":o).value,u=b(void 0===e?"#000000":e,void 0===a?.1:a),l=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(c.value).concat(c.unit,'" height="').concat(c.value).concat(c.unit,'" viewBox="0 0 ').concat(c.value," ").concat(c.value,'">\n <rect width="').concat(c.value,'" height="').concat(c.value,'" fill="').concat(void 0===n?"transparent":n,'"/>\n <path d="M ').concat(c.value," 0 L 0 0 0 ").concat(c.value,'" fill="none" stroke="').concat(u,'" stroke-width="').concat(i,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(l,'")')},z=function(t,e){switch(t){case"dots":return C(e);case"grid":return I(e);default:throw Error("Unknown pattern type: ".concat(t))}},T=function(t,e){var n;return{type:"pattern",properties:{backgroundImage:z(t,e),backgroundSize:null!=(n=e.backgroundSize)?n:"auto"}}},A=function(t){var e=t.duration,n=t.easing,r=t.direction,a=t.iterationCount;return"xeerpe-pulse ".concat(void 0===e?"4s":e," ").concat(void 0===n?"ease-in-out":n," ").concat(void 0===r?"alternate":r," ").concat(void 0===a?"infinite":a)},E=function(t){var e=t.duration,n=t.easing,r=t.iterationCount;return"xeerpe-rotate ".concat(void 0===e?"12s":e," ").concat(void 0===n?"linear":n," ").concat(void 0===r?"infinite":r,"; transform-origin: center")},F=function(t){var e=t.duration,n=t.easing,r=t.direction,a=t.iterationCount;return"xeerpe-breathe ".concat(void 0===e?"12s":e," ").concat(void 0===n?"ease-in-out":n," ").concat(void 0===r?"alternate":r," ").concat(void 0===a?"infinite":a)},M=function(t,e){switch(t){case"pulse":return A(e);case"rotate":return E(e);case"breathe":return F(e);default:throw Error("Unknown gradient type: ".concat(t))}};function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function _(t){return function(t){if(Array.isArray(t))return U(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t){if(t){if("string"==typeof t)return U(t,void 0);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return U(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var B=function(){var t;function e(){var t,n;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");n=[],(t="_layers")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[t]=n}return t=[{key:"gradient",value:function(t,e){var n=p(t,e);return this._layers.push(n),this}},{key:"linearGradient",value:function(t){return this.gradient("linear",t)}},{key:"radialGradient",value:function(t){return this.gradient("radial",t)}},{key:"conicGradient",value:function(t){return this.gradient("conic",t)}},{key:"meshGradient",value:function(t){return this.gradient("mesh",t)}},{key:"effect",value:function(t,e){var n=j(t,e);return this._layers.push(n),this}},{key:"filter",value:function(t,e){var n={type:"filter",properties:P(t,e).properties};return this._layers.push(n),this}},{key:"pattern",value:function(t,e){var n=T(t,e);return this._layers.push(n),this}},{key:"animation",value:function(t,e){var n={type:"animation",properties:{animation:M(t,e)}};return this._layers.push(n),this}},{key:"noise",value:function(t){return this.effect("noise",t)}},{key:"vignette",value:function(t){return this.effect("vignette",t)}},{key:"grain",value:function(t){return this.effect("grain",t)}},{key:"glow",value:function(t){return this.effect("glow",t)}},{key:"blur",value:function(t){return this.filter("blur",t)}},{key:"dots",value:function(t){return this.pattern("dots",t)}},{key:"grid",value:function(t){return this.pattern("grid",t)}},{key:"pulse",value:function(t){return this.animation("pulse",t)}},{key:"rotate",value:function(t){return this.animation("rotate",t)}},{key:"breathe",value:function(t){return this.animation("breathe",t)}},{key:"toStyle",value:function(){var t,e,n,r,a={gradient:[],filter:[],effect:[],pattern:[],animation:[]};this._layers.forEach(function(t){a[t.type].push(t.properties)});var o={};if(a.gradient.length||a.effect.length||a.pattern){var c,i=_(a.effect).concat(_(a.pattern),_(a.gradient)).flatMap(function(t){return[t.backgroundImage,t.background].filter(Boolean)}),u=_(a.effect).concat(_(a.pattern),_(a.gradient)).map(function(t){return t.backgroundSize}).filter(Boolean),l=a.effect.map(function(t){return t.boxShadow}).filter(Boolean),f=null==(c=a.gradient.find(function(t){return t.backgroundColor}))?void 0:c.backgroundColor;i.length&&(o.backgroundImage=i.join(", ")),u.length&&(o.backgroundSize=u.join(", ")),f&&(o.backgroundColor=f),l&&(o.boxShadow=l.join(", "))}return a.filter.length&&(o.filter=null!=(t=a.filter[0].filter)?t:"",o.backdropFilter=null!=(e=null==(n=a.filter[0])?void 0:n.backdropFilter)?e:""),a.animation.length&&(o.animation=null!=(r=a.animation[0].animation)?r:""),o}},{key:"toTextStyle",value:function(){var t,e=this.toStyle();return{backgroundImage:null!=(t=e.backgroundImage)?t:e.background,backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",WebkitTextFillColor:"transparent"}}}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,t),e}(),W={inkwell:"#1a1a2e",obsidian:"#16213e",void:"#0f0f1a",midnightOil:"#1b1f3b",pitch:"#222222",carbon:"#2d2d2d",graphite:"#3d3d3d",flint:"#555555",stone:"#737373",pewter:"#8e8e8e",ash:"#b4b4b0",smoke:"#d0d0cc",bone:"#e8e5dc",chalk:"#f2f0ea",salt:"#faf9f6",parchment:"#f5f0e8",linen:"#eee8d5",cream:"#fdf6e3",absinthe:"#4a7c59",forestFloor:"#2d5a27",malachite:"#3a9e6d",verdigris:"#5f9ea0",celadon:"#ace1af",fern:"#4f7942",chartreuse:"#b5cc18",mantis:"#74c365",viridian:"#40826d",spruce:"#1e4d40",prussian:"#003153",lapis:"#1b4f8c",cobalt:"#0047ab",cerulean:"#007ba7",denim:"#1560bd",glacier:"#80b9d3",powder:"#b0d6e6",steel:"#4682b4",maya:"#73c2fb",delft:"#3640b8",indigoInk:"#220066",wisteria:"#9b7ec8",aubergine:"#614051",amethyst:"#9966cc",mauve:"#e0b0ff",byzantium:"#702963",mulberry:"#c54b8c",plum:"#8e4585",heliotrope:"#df73ff",iris:"#5a4fcf",cinnabar:"#e34234",amaranth:"#e52b50",carmine:"#960018",rouge:"#ab4f62",garnet:"#732e45",crimson:"#dc143c",venetian:"#c80815",blush:"#f4a0a0",tomato:"#ff6347",poppy:"#e35335",amber:"#ffbf00",saffron:"#f4c430",ochre:"#cc7722",goldenrod:"#daa520",harvest:"#da8a2e",copper:"#b87333",terra:"#c2713f",sienna:"#882d17",umber:"#635147",rust:"#b7410e",coral:"#ff7f7f",peach:"#ffb38a",apricot:"#fbceb1",cantaloupe:"#f48054",melon:"#fdbcb4",spearmint:"#a1caa0",sage:"#b2ac88",taupe:"#b5a999",khaki:"#c3b091",dusk:"#8899a6",slate:"#6d8b9c",cadet:"#5f9ea0",eucalyptus:"#5f8575",clay:"#9c6b5a",mushroom:"#9e9388",tealDeep:"#006d77",aquamarine:"#2dc5a2",seafoam:"#93e1d8",jade:"#00a878",turquoise:"#40e0d0",niagara:"#06aed5",tiffany:"#81d8d0",pine:"#01796f",mint:"#98ff98",patina:"#4e8b78",sakura:"#ffb7c5",orchid:"#da70d6",fandango:"#b53389",cerise:"#de3163",magenta:"#ff00ff"};module.exports=e})();
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var e={};e.d=(t,r,n)=>{var a=(r,n)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,[n]:r[a]})};a(r,"get"),a(n,"value")},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var t={};e.d(t,{M:()=>T,T:()=>_});var r=/^-?\d*\.?\d+(%|px|rem|em|vh|vw|vmin|vmax)$/,n=/^calc\(.+\)$/,a=function(e){var t=e.trim();return r.test(t)||n.test(t)},o=/^-?\d*\.?\d+(deg|rad|grad|turn)$/,c=function(e){return o.test(e.trim())},i=["to top","to bottom","to left","to right","to top right","to bottom right","to top left","to bottom left"],l=function(e){if("string"==typeof e)return e;var t=e.color,r=e.position;return r&&a(r)?"".concat(t," ").concat(r):t},u=function(e){var t,r,n=e.angle&&c(e.angle)?e.angle:e.direction&&(t=e.direction,i.includes(t))?e.direction:"135deg",a=(null==(r=e.colors)?void 0:r.length)?e.colors.map(l).join(", "):"".concat(e.from,", ").concat(e.to),o=e.size?" ".concat(e.size):"";return"linear-gradient(".concat(n,", ").concat(a).concat(o,")")},f=function(e){var t,r,n=null===e.shape?"":"".concat(null!=(t=e.shape)?t:"circle"," "),a=e.size?" ".concat(e.size):"",o="at ".concat(null!=(r=e.position)?r:"center"),c=e.colorFromPosition?" ".concat(e.colorFromPosition):"",i=e.colorToPosition?" ".concat(e.colorToPosition):"",l="".concat(e.from).concat(c,", ").concat(e.to).concat(i);return"radial-gradient(".concat(n).concat(a," ").concat(o,", ").concat(l,")")},s=function(e){var t,r,n=e.angle&&c(e.angle)?"from ".concat(e.angle," "):"",a="at ".concat(null!=(t=e.position)?t:"center"),o=(null==(r=e.colors)?void 0:r.length)?e.colors.map(l).join(", "):"".concat(e.from,", ").concat(e.to);return"conic-gradient(".concat(n).concat(a,", ").concat(o,")")},d=function(e,t){switch(e){case"linear":return u(t);case"radial":return f(t);case"conic":return s(t);case"mesh":return t.layers.map(function(e){e.shape=null!=(t=e.shape)?t:null;var t,r=f(e);return"".concat(r)}).join(", ");default:throw Error("Unknown gradient type: ".concat(e))}},p=function(e,t){var r,n,a,o="mesh"===e;return{type:"gradient",properties:(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},o&&{backgroundImage:d(e,t),backgroundColor:t.background},!o&&{background:d(e,t)}),n=n={backgroundSize:null!=(a=t.backgroundSize)?a:"auto"},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r)}},b=function(e){var t=e.replace("#",""),r=parseInt(3===t.length?t.split("").map(function(e){return e+e}).join(""):t,16);return{red:r>>16&255,green:r>>8&255,blue:255&r}},g=function(e,t){if(e.startsWith("#")){var r=b(e),n=r.red,a=r.green,o=r.blue;return"rgba(".concat(n,", ").concat(a,", ").concat(o,", ").concat(t,")")}return e.startsWith("rgb(")?e.replace("rgb(","rgba(").replace(")",", ".concat(t,")")):e.startsWith("hsl(")?e.replace("hsl(","hsla(").replace(")",", ".concat(t,")")):e},h=function(e,t,r){return Math.min(r,Math.max(t,e))},v=function(e){var t=e.opacity,r=e.scale,n=e.type,a=e.octaves,o=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">\n <filter id="n">\n <feTurbulence type="'.concat(void 0===n?"fractalNoise":n,'" baseFrequency="').concat(void 0===r?.65:r,'" numOctaves="').concat(void 0===a?16:a,'" stitchTiles="stitch"/>\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="100%" height="100%" filter="url(#n)" opacity="').concat(void 0===t?.25:t,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(o,'")')},y=function(e){var t=e.color,r=e.intensity,n=e.spread,a=g(void 0===t?"#000000":t,h(void 0===r?.2:r,0,1)),o=Math.round(100*(void 0===n?.2:n));return"radial-gradient(ellipse at center, transparent ".concat(100-o,"%, ").concat(a," 100%)")},m=function(e){var t=e.intensity,r=e.size,n=void 0===r?"100%":r,a=e.animated,o=h(.08*(void 0===t?1:t),.01,.12),c=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(n,'" height="').concat(n,'" viewBox="0 0 100% 100%">\n <filter id="g" x="0" y="0" width="').concat(n,'" height="').concat(n,'">\n ').concat(void 0!==a&&a?'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch">\n <animate attributeName="baseFrequency" values="0.65;0.68;0.63;0.65" dur="2s" repeatCount="indefinite"/>\n </feTurbulence>':'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/>','\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="').concat(n,'" height="').concat(n,'" filter="url(#g)" opacity="').concat(o,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(c,'")')},k=function(e){var t=e.amount,r=e.spread,n=void 0===r?"":r,a=e.x,o=e.y,c=e.color,i=e.type;return"".concat("inner"===(void 0===i?"outer":i)?"inset ":"").concat(void 0===a?"0px":a," ").concat(void 0===o?"0px":o," ").concat(void 0===t?"20px":t).concat(n?" ".concat(n):""," ").concat(void 0===c?"#ffffff":c)},w=function(e,t){switch(e){case"noise":return v(t);case"vignette":return y(t);case"grain":return m(t);case"glow":return k(t);default:throw Error("Unknown gradient type: ".concat(e))}},O=function(e,t){var r;return"glow"===e?{type:"effect",properties:{boxShadow:w(e,t)}}:{type:"effect",properties:{backgroundImage:w(e,t),backgroundSize:null!=(r=t.backgroundSize)?r:"auto"}}},j=function(e){var t,r,n,a=e.amount,o=void 0===a?"20px":a,c=e.type;return"backdrop"===(void 0===c?"backdrop":c)?{properties:(t={backdropFilter:"blur(".concat(o,")")},r="-webkit-backdrop-filter",n="blur(".concat(o,")"),r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t)}:{properties:{filter:"blur(".concat(o,")")}}},x=function(e,t){if("blur"===e)return j(t);throw Error("Unknown filter type: ".concat(e))};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function P(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return S(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return S(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var T=function(){"use strict";var e;function t(){var e,r;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");r=[],(e="_layers")in this?Object.defineProperty(this,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[e]=r}return e=[{key:"gradient",value:function(e,t){var r=p(e,t);return this._layers.push(r),this}},{key:"linearGradient",value:function(e){return this.gradient("linear",e)}},{key:"radialGradient",value:function(e){return this.gradient("radial",e)}},{key:"conicGradient",value:function(e){return this.gradient("conic",e)}},{key:"meshGradient",value:function(e){return this.gradient("mesh",e)}},{key:"effect",value:function(e,t){var r=O(e,t);return this._layers.push(r),this}},{key:"filter",value:function(e,t){var r={type:"filter",properties:x(e,t).properties};return this._layers.push(r),this}},{key:"noise",value:function(e){return this.effect("noise",e)}},{key:"vignette",value:function(e){return this.effect("vignette",e)}},{key:"grain",value:function(e){return this.effect("grain",e)}},{key:"glow",value:function(e){return this.effect("glow",e)}},{key:"blur",value:function(e){return this.filter("blur",e)}},{key:"toStyle",value:function(){var e,t,r,n={gradient:[],filter:[],effect:[]};this._layers.forEach(function(e){n[e.type].push(e.properties)});var a={};if(n.gradient.length||n.effect.length){var o,c=P(n.effect).concat(P(n.gradient)).flatMap(function(e){return[e.backgroundImage,e.background].filter(Boolean)}),i=P(n.effect).concat(P(n.gradient)).map(function(e){return e.backgroundSize}).filter(Boolean),l=n.effect.map(function(e){return e.boxShadow}).filter(Boolean),u=null==(o=n.gradient.find(function(e){return e.backgroundColor}))?void 0:o.backgroundColor;c.length&&(a.backgroundImage=c.join(", ")),i.length&&(a.backgroundSize=i.join(", ")),u&&(a.backgroundColor=u),l&&(a.boxShadow=l.join(", "))}return n.filter.length&&(console.log(n.filter),a.filter=null!=(e=n.filter[0].filter)?e:"",a.backdropFilter=null!=(t=null==(r=n.filter[0])?void 0:r.backdropFilter)?t:""),a}},{key:"toTextStyle",value:function(){var e,t=this.toStyle();return{backgroundImage:null!=(e=t.backgroundImage)?e:t.background,backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",WebkitTextFillColor:"transparent"}}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}(),_={inkwell:"#1a1a2e",obsidian:"#16213e",void:"#0f0f1a",midnightOil:"#1b1f3b",pitch:"#222222",carbon:"#2d2d2d",graphite:"#3d3d3d",flint:"#555555",stone:"#737373",pewter:"#8e8e8e",ash:"#b4b4b0",smoke:"#d0d0cc",bone:"#e8e5dc",chalk:"#f2f0ea",salt:"#faf9f6",parchment:"#f5f0e8",linen:"#eee8d5",cream:"#fdf6e3",absinthe:"#4a7c59",forestFloor:"#2d5a27",malachite:"#3a9e6d",verdigris:"#5f9ea0",celadon:"#ace1af",fern:"#4f7942",chartreuse:"#b5cc18",mantis:"#74c365",viridian:"#40826d",spruce:"#1e4d40",prussian:"#003153",lapis:"#1b4f8c",cobalt:"#0047ab",cerulean:"#007ba7",denim:"#1560bd",glacier:"#80b9d3",powder:"#b0d6e6",steel:"#4682b4",maya:"#73c2fb",delft:"#3640b8",indigoInk:"#220066",wisteria:"#9b7ec8",aubergine:"#614051",amethyst:"#9966cc",mauve:"#e0b0ff",byzantium:"#702963",mulberry:"#c54b8c",plum:"#8e4585",heliotrope:"#df73ff",iris:"#5a4fcf",cinnabar:"#e34234",amaranth:"#e52b50",carmine:"#960018",rouge:"#ab4f62",garnet:"#732e45",crimson:"#dc143c",venetian:"#c80815",blush:"#f4a0a0",tomato:"#ff6347",poppy:"#e35335",amber:"#ffbf00",saffron:"#f4c430",ochre:"#cc7722",goldenrod:"#daa520",harvest:"#da8a2e",copper:"#b87333",terra:"#c2713f",sienna:"#882d17",umber:"#635147",rust:"#b7410e",coral:"#ff7f7f",peach:"#ffb38a",apricot:"#fbceb1",cantaloupe:"#f48054",melon:"#fdbcb4",spearmint:"#a1caa0",sage:"#b2ac88",taupe:"#b5a999",khaki:"#c3b091",dusk:"#8899a6",slate:"#6d8b9c",cadet:"#5f9ea0",eucalyptus:"#5f8575",clay:"#9c6b5a",mushroom:"#9e9388",tealDeep:"#006d77",aquamarine:"#2dc5a2",seafoam:"#93e1d8",jade:"#00a878",turquoise:"#40e0d0",niagara:"#06aed5",tiffany:"#81d8d0",pine:"#01796f",mint:"#98ff98",patina:"#4e8b78",sakura:"#ffb7c5",orchid:"#da70d6",fandango:"#b53389",cerise:"#de3163",magenta:"#ff00ff"},C=t.M,I=t.T;export{C as Builder,I as colors};
1
+ var t={};t.d=(e,n,r)=>{var a=(n,r)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,[r]:n[a]})};a(n,"get"),a(r,"value")},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var e={};t.d(e,{M:()=>B,T:()=>W});var n=/^-?\d*\.?\d+(%|px|rem|em|vh|vw|vmin|vmax)$/,r=/^calc\(.+\)$/,a=function(t){var e=t.trim();return n.test(e)||r.test(e)},o=/^-?\d*\.?\d+(deg|rad|grad|turn)$/,c=function(t){return o.test(t.trim())},i=["to top","to bottom","to left","to right","to top right","to bottom right","to top left","to bottom left"],u=function(t){if("string"==typeof t)return t;var e=t.color,n=t.position;return n&&a(n)?"".concat(e," ").concat(n):e},l=function(t){var e,n,r=t.angle&&c(t.angle)?t.angle:t.direction&&(e=t.direction,i.includes(e))?t.direction:"135deg",a=(null==(n=t.colors)?void 0:n.length)?t.colors.map(u).join(", "):"".concat(t.from,", ").concat(t.to),o=t.size?" ".concat(t.size):"";return"linear-gradient(".concat(r,", ").concat(a).concat(o,")")},s=function(t){var e,n,r=null===t.shape?"":"".concat(null!=(e=t.shape)?e:"circle"," "),a=t.size?" ".concat(t.size):"",o="at ".concat(null!=(n=t.position)?n:"center"),c=t.colorFromPosition?" ".concat(t.colorFromPosition):"",i=t.colorToPosition?" ".concat(t.colorToPosition):"",u="".concat(t.from).concat(c,", ").concat(t.to).concat(i);return"radial-gradient(".concat(r).concat(a," ").concat(o,", ").concat(u,")")},f=function(t){var e,n,r=t.angle&&c(t.angle)?"from ".concat(t.angle," "):"",a="at ".concat(null!=(e=t.position)?e:"center"),o=(null==(n=t.colors)?void 0:n.length)?t.colors.map(u).join(", "):"".concat(t.from,", ").concat(t.to);return"conic-gradient(".concat(r).concat(a,", ").concat(o,")")},d=function(t,e){switch(t){case"linear":return l(e);case"radial":return s(e);case"conic":return f(e);case"mesh":return e.layers.map(function(t){t.shape=null!=(e=t.shape)?e:null;var e,n=s(t);return"".concat(n)}).join(", ");default:throw Error("Unknown gradient type: ".concat(t))}},p=function(t,e){var n,r,a,o="mesh"===t;return{type:"gradient",properties:(n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r;r=n[e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})}return t}({},o&&{backgroundImage:d(t,e),backgroundColor:e.background},!o&&{background:d(t,e)}),r=r={backgroundSize:null!=(a=e.backgroundSize)?a:"auto"},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e.push.apply(e,n)}return e})(Object(r)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}),n)}};function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var g=function(t){var e=t.replace("#",""),n=parseInt(3===e.length?e.split("").map(function(t){return t+t}).join(""):e,16);return{red:n>>16&255,green:n>>8&255,blue:255&n}},b=function(t,e){if(t.startsWith("#")){var n=g(t),r=n.red,a=n.green,o=n.blue;return"rgba(".concat(r,", ").concat(a,", ").concat(o,", ").concat(e,")")}return t.startsWith("rgb(")?t.replace("rgb(","rgba(").replace(")",", ".concat(e,")")):t.startsWith("hsl(")?t.replace("hsl(","hsla(").replace(")",", ".concat(e,")")):t},h=function(t,e,n){return Math.min(n,Math.max(e,t))},y=function(t){var e=t.trim().match(/^(-?\d*\.?\d+)([a-z%]*)$/i);if(!e)throw Error('Invalid CSS length: "'.concat(t,'"'));var n=function(t){if(Array.isArray(t))return t}(e)||function(t){var e,n,r=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a=[],o=!0,c=!1;try{for(r=r.call(t);!(o=(e=r.next()).done)&&(a.push(e.value),3!==a.length);o=!0);}catch(t){c=!0,n=t}finally{try{o||null==r.return||r.return()}finally{if(c)throw n}}return a}}(e)||function(t){if(t){if("string"==typeof t)return v(t,3);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return v(t,3)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[1],a=n[2];return{value:parseFloat(r),unit:a||"px"}},m=function(t){var e=t.opacity,n=t.scale,r=t.type,a=t.octaves,o=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">\n <filter id="n">\n <feTurbulence type="'.concat(void 0===r?"fractalNoise":r,'" baseFrequency="').concat(void 0===n?.65:n,'" numOctaves="').concat(void 0===a?16:a,'" stitchTiles="stitch"/>\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="100%" height="100%" filter="url(#n)" opacity="').concat(void 0===e?.25:e,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(o,'")')},k=function(t){var e=t.color,n=t.intensity,r=t.spread,a=b(void 0===e?"#000000":e,h(void 0===n?.2:n,0,1)),o=Math.round(100*(void 0===r?.2:r));return"radial-gradient(ellipse at center, transparent ".concat(100-o,"%, ").concat(a," 100%)")},w=function(t){var e=t.intensity,n=t.size,r=void 0===n?"100%":n,a=t.animated,o=h(.08*(void 0===e?1:e),.01,.12),c=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(r,'" height="').concat(r,'" viewBox="0 0 100% 100%">\n <filter id="g" x="0" y="0" width="').concat(r,'" height="').concat(r,'">\n ').concat(void 0!==a&&a?'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch">\n <animate attributeName="baseFrequency" values="0.65;0.68;0.63;0.65" dur="2s" repeatCount="indefinite"/>\n </feTurbulence>':'<feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/>','\n <feColorMatrix type="saturate" values="0"/>\n </filter>\n <rect width="').concat(r,'" height="').concat(r,'" filter="url(#g)" opacity="').concat(o,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(c,'")')},x=function(t){var e=t.amount,n=t.spread,r=void 0===n?"":n,a=t.x,o=t.y,c=t.color,i=t.type;return"".concat("inner"===(void 0===i?"outer":i)?"inset ":"").concat(void 0===a?"0px":a," ").concat(void 0===o?"0px":o," ").concat(void 0===e?"20px":e).concat(r?" ".concat(r):""," ").concat(void 0===c?"#ffffff":c)},O=function(t,e){switch(t){case"noise":return m(e);case"vignette":return k(e);case"grain":return w(e);case"glow":return x(e);default:throw Error("Unknown gradient type: ".concat(t))}},j=function(t,e){var n;return"glow"===t?{type:"effect",properties:{boxShadow:O(t,e)}}:{type:"effect",properties:{backgroundImage:O(t,e),backgroundSize:null!=(n=e.backgroundSize)?n:"auto"}}},S=function(t){var e,n,r,a=t.amount,o=void 0===a?"20px":a,c=t.type;return"backdrop"===(void 0===c?"backdrop":c)?{properties:(e={backdropFilter:"blur(".concat(o,")")},n="-webkit-backdrop-filter",r="blur(".concat(o,")"),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e)}:{properties:{filter:"blur(".concat(o,")")}}},C=function(t,e){if("blur"===t)return S(e);throw Error("Unknown filter type: ".concat(t))},I=function(t){var e=t.color,n=t.background,r=t.size,a=void 0===r?"20px":r,o=t.spacing,c=t.opacity,i=t.strokeWidth,u=y(null!=o?o:a),l=i?y(i).value:.15*y(a).value,s=b(void 0===e?"#000000":e,void 0===c?.2:c),f=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(u.value).concat(u.unit,'" height="').concat(u.value).concat(u.unit,'" viewBox="0 0 ').concat(u.value," ").concat(u.value,'">\n <rect width="').concat(u.value,'" height="').concat(u.value,'" fill="').concat(void 0===n?"transparent":n,'"/>\n <circle cx="').concat(u.value/2,'" cy="').concat(u.value/2,'" r="').concat(l,'" fill="').concat(s,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(f,'")')},P=function(t){var e=t.color,n=t.background,r=t.size,a=t.opacity,o=t.strokeWidth,c=y(void 0===r?"40px":r),i=y(void 0===o?"1px":o).value,u=b(void 0===e?"#000000":e,void 0===a?.1:a),l=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(c.value).concat(c.unit,'" height="').concat(c.value).concat(c.unit,'" viewBox="0 0 ').concat(c.value," ").concat(c.value,'">\n <rect width="').concat(c.value,'" height="').concat(c.value,'" fill="').concat(void 0===n?"transparent":n,'"/>\n <path d="M ').concat(c.value," 0 L 0 0 0 ").concat(c.value,'" fill="none" stroke="').concat(u,'" stroke-width="').concat(i,'"/>\n </svg>'));return'url("data:image/svg+xml,'.concat(l,'")')},z=function(t,e){switch(t){case"dots":return I(e);case"grid":return P(e);default:throw Error("Unknown pattern type: ".concat(t))}},_=function(t,e){var n;return{type:"pattern",properties:{backgroundImage:z(t,e),backgroundSize:null!=(n=e.backgroundSize)?n:"auto"}}},T=function(t){var e=t.duration,n=t.easing,r=t.direction,a=t.iterationCount;return"xeerpe-pulse ".concat(void 0===e?"4s":e," ").concat(void 0===n?"ease-in-out":n," ").concat(void 0===r?"alternate":r," ").concat(void 0===a?"infinite":a)},A=function(t){var e=t.duration,n=t.easing,r=t.iterationCount;return"xeerpe-rotate ".concat(void 0===e?"12s":e," ").concat(void 0===n?"linear":n," ").concat(void 0===r?"infinite":r,"; transform-origin: center")},E=function(t){var e=t.duration,n=t.easing,r=t.direction,a=t.iterationCount;return"xeerpe-breathe ".concat(void 0===e?"12s":e," ").concat(void 0===n?"ease-in-out":n," ").concat(void 0===r?"alternate":r," ").concat(void 0===a?"infinite":a)},F=function(t,e){switch(t){case"pulse":return T(e);case"rotate":return A(e);case"breathe":return E(e);default:throw Error("Unknown gradient type: ".concat(t))}};function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function U(t){return function(t){if(Array.isArray(t))return M(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t){if(t){if("string"==typeof t)return M(t,void 0);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return M(t,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var B=function(){"use strict";var t;function e(){var t,n;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");n=[],(t="_layers")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[t]=n}return t=[{key:"gradient",value:function(t,e){var n=p(t,e);return this._layers.push(n),this}},{key:"linearGradient",value:function(t){return this.gradient("linear",t)}},{key:"radialGradient",value:function(t){return this.gradient("radial",t)}},{key:"conicGradient",value:function(t){return this.gradient("conic",t)}},{key:"meshGradient",value:function(t){return this.gradient("mesh",t)}},{key:"effect",value:function(t,e){var n=j(t,e);return this._layers.push(n),this}},{key:"filter",value:function(t,e){var n={type:"filter",properties:C(t,e).properties};return this._layers.push(n),this}},{key:"pattern",value:function(t,e){var n=_(t,e);return this._layers.push(n),this}},{key:"animation",value:function(t,e){var n={type:"animation",properties:{animation:F(t,e)}};return this._layers.push(n),this}},{key:"noise",value:function(t){return this.effect("noise",t)}},{key:"vignette",value:function(t){return this.effect("vignette",t)}},{key:"grain",value:function(t){return this.effect("grain",t)}},{key:"glow",value:function(t){return this.effect("glow",t)}},{key:"blur",value:function(t){return this.filter("blur",t)}},{key:"dots",value:function(t){return this.pattern("dots",t)}},{key:"grid",value:function(t){return this.pattern("grid",t)}},{key:"pulse",value:function(t){return this.animation("pulse",t)}},{key:"rotate",value:function(t){return this.animation("rotate",t)}},{key:"breathe",value:function(t){return this.animation("breathe",t)}},{key:"toStyle",value:function(){var t,e,n,r,a={gradient:[],filter:[],effect:[],pattern:[],animation:[]};this._layers.forEach(function(t){a[t.type].push(t.properties)});var o={};if(a.gradient.length||a.effect.length||a.pattern){var c,i=U(a.effect).concat(U(a.pattern),U(a.gradient)).flatMap(function(t){return[t.backgroundImage,t.background].filter(Boolean)}),u=U(a.effect).concat(U(a.pattern),U(a.gradient)).map(function(t){return t.backgroundSize}).filter(Boolean),l=a.effect.map(function(t){return t.boxShadow}).filter(Boolean),s=null==(c=a.gradient.find(function(t){return t.backgroundColor}))?void 0:c.backgroundColor;i.length&&(o.backgroundImage=i.join(", ")),u.length&&(o.backgroundSize=u.join(", ")),s&&(o.backgroundColor=s),l&&(o.boxShadow=l.join(", "))}return a.filter.length&&(o.filter=null!=(t=a.filter[0].filter)?t:"",o.backdropFilter=null!=(e=null==(n=a.filter[0])?void 0:n.backdropFilter)?e:""),a.animation.length&&(o.animation=null!=(r=a.animation[0].animation)?r:""),o}},{key:"toTextStyle",value:function(){var t,e=this.toStyle();return{backgroundImage:null!=(t=e.backgroundImage)?t:e.background,backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",WebkitTextFillColor:"transparent"}}}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,t),e}(),W={inkwell:"#1a1a2e",obsidian:"#16213e",void:"#0f0f1a",midnightOil:"#1b1f3b",pitch:"#222222",carbon:"#2d2d2d",graphite:"#3d3d3d",flint:"#555555",stone:"#737373",pewter:"#8e8e8e",ash:"#b4b4b0",smoke:"#d0d0cc",bone:"#e8e5dc",chalk:"#f2f0ea",salt:"#faf9f6",parchment:"#f5f0e8",linen:"#eee8d5",cream:"#fdf6e3",absinthe:"#4a7c59",forestFloor:"#2d5a27",malachite:"#3a9e6d",verdigris:"#5f9ea0",celadon:"#ace1af",fern:"#4f7942",chartreuse:"#b5cc18",mantis:"#74c365",viridian:"#40826d",spruce:"#1e4d40",prussian:"#003153",lapis:"#1b4f8c",cobalt:"#0047ab",cerulean:"#007ba7",denim:"#1560bd",glacier:"#80b9d3",powder:"#b0d6e6",steel:"#4682b4",maya:"#73c2fb",delft:"#3640b8",indigoInk:"#220066",wisteria:"#9b7ec8",aubergine:"#614051",amethyst:"#9966cc",mauve:"#e0b0ff",byzantium:"#702963",mulberry:"#c54b8c",plum:"#8e4585",heliotrope:"#df73ff",iris:"#5a4fcf",cinnabar:"#e34234",amaranth:"#e52b50",carmine:"#960018",rouge:"#ab4f62",garnet:"#732e45",crimson:"#dc143c",venetian:"#c80815",blush:"#f4a0a0",tomato:"#ff6347",poppy:"#e35335",amber:"#ffbf00",saffron:"#f4c430",ochre:"#cc7722",goldenrod:"#daa520",harvest:"#da8a2e",copper:"#b87333",terra:"#c2713f",sienna:"#882d17",umber:"#635147",rust:"#b7410e",coral:"#ff7f7f",peach:"#ffb38a",apricot:"#fbceb1",cantaloupe:"#f48054",melon:"#fdbcb4",spearmint:"#a1caa0",sage:"#b2ac88",taupe:"#b5a999",khaki:"#c3b091",dusk:"#8899a6",slate:"#6d8b9c",cadet:"#5f9ea0",eucalyptus:"#5f8575",clay:"#9c6b5a",mushroom:"#9e9388",tealDeep:"#006d77",aquamarine:"#2dc5a2",seafoam:"#93e1d8",jade:"#00a878",turquoise:"#40e0d0",niagara:"#06aed5",tiffany:"#81d8d0",pine:"#01796f",mint:"#98ff98",patina:"#4e8b78",sakura:"#ffb7c5",orchid:"#da70d6",fandango:"#b53389",cerise:"#de3163",magenta:"#ff00ff"},q=e.M,$=e.T;export{q as Builder,$ as colors};
@@ -0,0 +1,8 @@
1
+ export type AnimationType = 'pulse' | 'rotate' | 'breathe';
2
+ export interface AnimationOptions {
3
+ duration?: string;
4
+ easing?: string;
5
+ direction?: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
6
+ iterationCount?: number | 'infinite';
7
+ }
8
+ //# sourceMappingURL=animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/models/animation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE1D,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,mBAAmB,CAAA;IACpE,cAAc,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CACvC"}
@@ -1,4 +1,4 @@
1
- export type LayerType = 'gradient' | 'filter' | 'effect';
1
+ export type LayerType = 'gradient' | 'filter' | 'effect' | 'pattern' | 'animation';
2
2
  export interface CSSProperties {
3
3
  background?: string;
4
4
  backgroundImage?: string;
@@ -7,6 +7,7 @@ export interface CSSProperties {
7
7
  filter?: string;
8
8
  backdropFilter?: string;
9
9
  boxShadow?: string;
10
+ animation?: string;
10
11
  }
11
12
  export interface BuilderLayer {
12
13
  type: LayerType;
@@ -1 +1 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/models/builder.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAExD,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAGD,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,SAAS,CAAA;IACf,UAAU,EAAE,aAAa,CAAA;CAC5B"}
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/models/builder.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;AAElF,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAGD,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,SAAS,CAAA;IACf,UAAU,EAAE,aAAa,CAAA;CAC5B"}
@@ -3,9 +3,9 @@ export type LinearGradientDirection = 'to top' | 'to bottom' | 'to left' | 'to r
3
3
  export type LinearGradientAngle = `${number}deg` | `${number}rad` | `${number}grad` | `${number}turn`;
4
4
  export type RadialGradientShape = 'circle' | 'ellipse' | null;
5
5
  export type RadialGradientSize = 'closest-side' | 'closest-corner' | 'farthest-side' | 'farthest-corner' | string;
6
- export type GradientOptions = LinearGradientOptions | RadialGradientOptions | ConicGradientOptions | MeshGradientOptions;
7
6
  export type LinearGradientPositionUnit = `${number}%` | `${number}px` | `${number}rem` | `${number}em` | `${number}vh` | `${number}vw` | `${number}vmin` | `${number}vmax`;
8
7
  export type LinearGradientPosition = LinearGradientPositionUnit | `calc(${string})`;
8
+ export type GradientOptions = LinearGradientOptions | RadialGradientOptions | ConicGradientOptions | MeshGradientOptions;
9
9
  export type GradientColorStop = string | {
10
10
  color: string;
11
11
  position?: LinearGradientPosition;
@@ -1 +1 @@
1
- {"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../src/models/gradient.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;AACjE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;AAC7J,MAAM,MAAM,mBAAmB,GACzB,GAAG,MAAM,KAAK,GACd,GAAG,MAAM,KAAK,GACd,GAAG,MAAM,MAAM,GACf,GAAG,MAAM,MAAM,CAAA;AACrB,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAA;AAC7D,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,gBAAgB,GAAG,eAAe,GAAG,iBAAiB,GAAG,MAAM,CAAA;AACjH,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,mBAAmB,CAAA;AACxH,MAAM,MAAM,0BAA0B,GAChC,GAAG,MAAM,GAAG,GACZ,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,KAAK,GACd,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,MAAM,GACf,GAAG,MAAM,MAAM,CAAA;AAErB,MAAM,MAAM,sBAAsB,GAC5B,0BAA0B,GAC1B,QAAQ,MAAM,GAAG,CAAA;AAEvB,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAE7F,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,cAAc,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,iBAAiB,CAAC,EAAE,CAAA;IACvC,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,SAAS,CAAC,EAAE,uBAAuB,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,iBAAiB,CAAC,EAAE,CAAA;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,qBAAqB,EAAE,CAAA;CAClC"}
1
+ {"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../src/models/gradient.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;AACjE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;AAC7J,MAAM,MAAM,mBAAmB,GACzB,GAAG,MAAM,KAAK,GACd,GAAG,MAAM,KAAK,GACd,GAAG,MAAM,MAAM,GACf,GAAG,MAAM,MAAM,CAAA;AACrB,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAA;AAC7D,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,gBAAgB,GAAG,eAAe,GAAG,iBAAiB,GAAG,MAAM,CAAA;AACjH,MAAM,MAAM,0BAA0B,GAChC,GAAG,MAAM,GAAG,GACZ,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,KAAK,GACd,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,IAAI,GACb,GAAG,MAAM,MAAM,GACf,GAAG,MAAM,MAAM,CAAA;AAErB,MAAM,MAAM,sBAAsB,GAC5B,0BAA0B,GAC1B,QAAQ,MAAM,GAAG,CAAA;AAEvB,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,mBAAmB,CAAA;AAExH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAA;CAAE,CAAA;AAE7F,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,cAAc,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,iBAAiB,CAAC,EAAE,CAAA;IACvC,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,SAAS,CAAC,EAAE,uBAAuB,CAAA;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACvD,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACtD,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,iBAAiB,CAAC,EAAE,CAAA;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,qBAAqB,EAAE,CAAA;CAClC"}
@@ -2,5 +2,7 @@ export * from './gradient.ts';
2
2
  export * from './builder.ts';
3
3
  export * from './effects.ts';
4
4
  export * from './filters.ts';
5
+ export * from './pattern.ts';
6
+ export * from './animation.ts';
5
7
  export * from './utils.ts';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
@@ -0,0 +1,21 @@
1
+ export type PatternType = 'dots' | 'grid';
2
+ export interface PatterBaseOptions {
3
+ color?: string;
4
+ background?: string;
5
+ size?: string;
6
+ opacity?: number;
7
+ strokeWidth?: string;
8
+ backgroundSize?: string;
9
+ }
10
+ export interface DotsOptions extends PatterBaseOptions {
11
+ color?: string;
12
+ background?: string;
13
+ size?: string;
14
+ spacing?: string;
15
+ style?: string;
16
+ opacity?: number;
17
+ }
18
+ export interface GridOptions extends PatterBaseOptions {
19
+ }
20
+ export type PatternOptions = DotsOptions | GridOptions;
21
+ //# sourceMappingURL=pattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/models/pattern.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;AAEzC,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,iBAAiB;CAAG;AAEzD,MAAM,MAAM,cAAc,GAAI,WAAW,GAAG,WAAW,CAAA"}
@@ -4,4 +4,8 @@ export type RgbColor = {
4
4
  blue: number;
5
5
  alpha?: number;
6
6
  };
7
+ export type CSSLength = {
8
+ value: number;
9
+ unit: string;
10
+ };
7
11
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/models/utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/models/utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AACnF,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA"}
@@ -1,5 +1,6 @@
1
- import { RgbColor } from "../models/index.ts";
1
+ import { CSSLength, RgbColor } from "../models/index.ts";
2
2
  export declare const hexToRgb: (hex: string) => RgbColor;
3
3
  export declare const withAlpha: (color: string, alpha: number) => string;
4
4
  export declare const clamp: (value: number, min: number, max: number) => number;
5
+ export declare const parseLength: (input: string) => CSSLength;
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAE5C,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,QAWtC,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,MAYxD,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MACzB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAEvD,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,QAWtC,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,MAYxD,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MACzB,CAAA;AAGvC,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,SAK3C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xeerpe",
3
- "version": "0.0.6",
3
+ "version": "0.0.12",
4
4
  "private": false,
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",
@@ -15,9 +15,12 @@
15
15
  "types": "./dist/index.d.cts",
16
16
  "default": "./dist/index.cjs"
17
17
  }
18
- }
18
+ },
19
+ "./animations.css": "./dist/animations.css",
20
+ "./package.json": "./package.json"
19
21
  },
20
22
  "files": ["dist/*"],
23
+ "sideEffects": ["*.css"],
21
24
  "keywords": ["xeerpe"],
22
25
  "description": "xeerpe",
23
26
  "author": "Nicola Centonze",
@@ -27,7 +30,7 @@
27
30
  "url": "git@github.com:nicolacentonze/xeerpe.git"
28
31
  },
29
32
  "scripts": {
30
- "build": "rm -rf dist && rspack build && tsc --emitDeclarationOnly --outDir dist && cp dist/index.d.ts dist/index.d.cts"
33
+ "build": "rm -rf dist && rspack build && tsc --emitDeclarationOnly --outDir dist && cp dist/index.d.ts dist/index.d.cts && cp src/css/animations.css dist/animations.css"
31
34
  },
32
35
  "devDependencies": {
33
36
  "@rspack/cli": "latest",