@gradient-ui/gradient-engine 0.6.0 → 1.0.1

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.
Files changed (87) hide show
  1. package/README.md +0 -6
  2. package/dist/animation.cjs +13 -13
  3. package/dist/animation.mjs +36 -36
  4. package/dist/core.cjs +1 -1
  5. package/dist/core.mjs +17 -17
  6. package/dist/css-B3xGfmW1.js +17 -0
  7. package/dist/css-CREh0Awz.cjs +1 -0
  8. package/dist/design-tokens.cjs +1 -1
  9. package/dist/design-tokens.mjs +5 -5
  10. package/dist/designTokens-Bw-HZ1f1.js +116 -0
  11. package/dist/designTokens-DsIk5RSi.cjs +1 -0
  12. package/dist/effects.cjs +67 -67
  13. package/dist/effects.mjs +153 -153
  14. package/dist/formatters.cjs +1 -1
  15. package/dist/formatters.mjs +33 -33
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.mjs +63 -63
  18. package/dist/material.cjs +8 -8
  19. package/dist/material.mjs +170 -170
  20. package/dist/presets-DA-6KYJh.cjs +316 -0
  21. package/dist/presets-Du6aTLtD.js +4025 -0
  22. package/dist/svg-B2CaHCLv.js +118 -0
  23. package/dist/svg-BtMrj3fP.cjs +32 -0
  24. package/dist/types/animation/css.d.ts +2 -2
  25. package/dist/types/animation/index.d.ts +1 -1
  26. package/dist/types/colorSystem.d.ts +3 -3
  27. package/dist/types/core.d.ts +7 -7
  28. package/dist/types/designTokens.d.ts +4 -4
  29. package/dist/types/effects/index.d.ts +2 -2
  30. package/dist/types/effects/morph.d.ts +1 -1
  31. package/dist/types/effects/shadow.d.ts +1 -1
  32. package/dist/types/formatters/canvas.d.ts +1 -1
  33. package/dist/types/formatters/css.d.ts +1 -1
  34. package/dist/types/formatters/index.d.ts +3 -3
  35. package/dist/types/formatters/svg.d.ts +1 -1
  36. package/dist/types/index.d.ts +11 -11
  37. package/dist/types/material.d.ts +1 -1
  38. package/dist/types/model.d.ts +3 -3
  39. package/dist/types/palette.d.ts +1 -1
  40. package/dist/types/presets.d.ts +1 -1
  41. package/dist/types/recipes.d.ts +12 -12
  42. package/dist/types/tokens.d.ts +3 -3
  43. package/dist/types/types.d.ts +1 -1
  44. package/dist/types/utils.d.ts +1 -1
  45. package/dist/{types-BFr1fN-7.js → types-B0eCazk8.js} +4 -4
  46. package/dist/types-BFkUlDkW.cjs +1 -0
  47. package/dist/types-cjs/animation/css.d.cts +12 -0
  48. package/dist/types-cjs/animation/index.d.cts +1 -0
  49. package/dist/types-cjs/color.d.cts +11 -0
  50. package/dist/types-cjs/colorMath.d.cts +3 -0
  51. package/dist/types-cjs/colorSeeds.d.cts +22 -0
  52. package/dist/types-cjs/colorSystem.d.cts +20 -0
  53. package/dist/types-cjs/constants.d.cts +3 -0
  54. package/dist/types-cjs/core.d.cts +9 -0
  55. package/dist/types-cjs/designTokens.d.cts +24 -0
  56. package/dist/types-cjs/effects/index.d.cts +2 -0
  57. package/dist/types-cjs/effects/morph.d.cts +8 -0
  58. package/dist/types-cjs/effects/shadow.d.cts +3 -0
  59. package/dist/types-cjs/formatters/canvas.d.cts +2 -0
  60. package/dist/types-cjs/formatters/css.d.cts +3 -0
  61. package/dist/types-cjs/formatters/index.d.cts +3 -0
  62. package/dist/types-cjs/formatters/svg.d.cts +5 -0
  63. package/dist/types-cjs/index.d.cts +11 -0
  64. package/dist/types-cjs/material.d.cts +1 -0
  65. package/dist/types-cjs/model.d.cts +5 -0
  66. package/dist/types-cjs/package.json +3 -0
  67. package/dist/types-cjs/palette.d.cts +13 -0
  68. package/dist/types-cjs/presets.d.cts +239 -0
  69. package/dist/types-cjs/recipes.d.cts +14 -0
  70. package/dist/types-cjs/scheme.d.cts +3 -0
  71. package/dist/types-cjs/tokens.d.cts +107 -0
  72. package/dist/types-cjs/types.d.cts +127 -0
  73. package/dist/types-cjs/utils.d.cts +10 -0
  74. package/dist/utils-Bry9BTmj.cjs +1 -0
  75. package/dist/utils-VaqPefmS.js +76 -0
  76. package/package.json +59 -23
  77. package/dist/css-BVHXLMRl.cjs +0 -1
  78. package/dist/css-DVaTTIqS.js +0 -17
  79. package/dist/designTokens-BnzZfRES.js +0 -116
  80. package/dist/designTokens-C1WdzS3v.cjs +0 -1
  81. package/dist/presets-BBLdqUE4.cjs +0 -316
  82. package/dist/presets-DYXLx_nN.js +0 -4025
  83. package/dist/svg-dGtLYnIJ.cjs +0 -32
  84. package/dist/svg-hZus3ztj.js +0 -118
  85. package/dist/types-BMLEvdee.cjs +0 -1
  86. package/dist/utils-BzSNCfat.js +0 -76
  87. package/dist/utils-D83DMCMa.cjs +0 -1
@@ -0,0 +1,118 @@
1
+ import { t as toCssDuration, b as clamp } from "./utils-VaqPefmS.js";
2
+ import { t as toCssGradient } from "./css-B3xGfmW1.js";
3
+ const SVG_NAMESPACE = "http://www.w3.org/2000/svg", XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml", escapeAttribute = (value) => value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), formatSvgStop = (stop) => {
4
+ const opacity = stop.opacity === void 0 ? "" : ` stop-opacity="${clamp(stop.opacity)}"`;
5
+ return `<stop offset="${stop.position}%" stop-color="${stop.color}"${opacity} />`;
6
+ }, getPathStroke = (model, options) => {
7
+ var _a, _b, _c;
8
+ return {
9
+ active: options.activeStroke ?? ((_a = model.stops[Math.max(0, Math.floor(model.stops.length / 2))]) == null ? void 0 : _a.color) ?? ((_b = model.stops[0]) == null ? void 0 : _b.color) ?? "currentColor",
10
+ background: options.backgroundStroke ?? ((_c = model.stops[0]) == null ? void 0 : _c.color) ?? options.activeStroke ?? "currentColor"
11
+ };
12
+ }, getSvgViewBox = (svg, options) => {
13
+ var _a;
14
+ const viewBox = (_a = svg.match(/\bviewBox=(["'])(.*?)\1/i)) == null ? void 0 : _a[2];
15
+ if (viewBox) return viewBox;
16
+ const width = options.width ?? 240, height = options.height ?? 120;
17
+ return `0 0 ${width} ${height}`;
18
+ }, getSvgBody = (svg) => {
19
+ var _a;
20
+ return ((_a = svg.replace(/<\?xml[\s\S]*?\?>/gi, "").replace(/<!doctype[\s\S]*?>/gi, "").match(/<svg\b[^>]*>([\s\S]*?)<\/svg>/i)) == null ? void 0 : _a[1].trim()) ?? svg;
21
+ }, splitAbsoluteSubpaths = (path) => {
22
+ const subpaths = path.trim().split(/(?=M\s*[-+.\d])/).map((subpath) => subpath.trim()).filter(Boolean);
23
+ return subpaths.length > 1 ? subpaths : [path];
24
+ }, getSvgPathData = (svg) => [...svg.matchAll(/<path\b[^>]*\sd=(["'])([\s\S]*?)\1/gi)].flatMap(
25
+ (match) => splitAbsoluteSubpaths(match[2])
26
+ ), getPathComplexity = (path) => {
27
+ var _a;
28
+ return Math.max(1, ((_a = path.match(/[LlHhVvCcSsQqTtAaZz]/g)) == null ? void 0 : _a.length) ?? 0);
29
+ }, getSourcePathFillTime = (path, maxComplexity) => {
30
+ const fillTime = 0.5 + (1 - getPathComplexity(path) / maxComplexity) * 0.22;
31
+ return Math.round(fillTime * 1e3) / 1e3;
32
+ }, getViewBoxMetrics = (viewBox) => {
33
+ const [x = "0", y = "0", width = "240", height = "120"] = viewBox.trim().split(/[\s,]+/);
34
+ return {
35
+ height: Number(height) || 120,
36
+ width: Number(width) || 240,
37
+ x: Number(x) || 0,
38
+ y: Number(y) || 0
39
+ };
40
+ }, getPaddedViewBox = (viewBox, strokeWidth, options) => {
41
+ if (options.viewBoxPadding === !1) return viewBox;
42
+ const metrics = getViewBoxMetrics(viewBox), fallbackPadding = Math.max(
43
+ strokeWidth * 2,
44
+ Math.min(metrics.width, metrics.height) * 0.02
45
+ ), padding = options.viewBoxPadding ?? fallbackPadding;
46
+ return [
47
+ metrics.x - padding,
48
+ metrics.y - padding,
49
+ metrics.width + padding * 2,
50
+ metrics.height + padding * 2
51
+ ].join(" ");
52
+ }, getViewBoxSize = (viewBox) => {
53
+ const { height, width } = getViewBoxMetrics(viewBox);
54
+ return {
55
+ height: Number(height) || 120,
56
+ width: Number(width) || 240
57
+ };
58
+ }, getNormalizedStrokeWidth = (strokeWidth, viewBox, options) => {
59
+ if (options.normalizeStrokeWidth === !1) return strokeWidth;
60
+ const { height, width } = getViewBoxSize(viewBox), base = options.strokeWidthBase ?? 180;
61
+ return strokeWidth * (Math.min(width, height) / base);
62
+ }, toSvgGradient = (model, options = {}) => {
63
+ const id = options.id ?? "g-gradient", stops = model.stops.map(formatSvgStop).join("");
64
+ return model.type === "radial" ? `<radialGradient id="${id}" cx="${options.cx ?? "50%"}" cy="${options.cy ?? "50%"}" r="${options.r ?? "75%"}">${stops}</radialGradient>` : model.type === "conic" ? `<pattern id="${id}" patternUnits="objectBoundingBox" width="1" height="1"><foreignObject x="0" y="0" width="100%" height="100%"><div xmlns="${XHTML_NAMESPACE}" style="width:100%;height:100%;background:${escapeAttribute(toCssGradient(model))};"></div></foreignObject></pattern>` : `<linearGradient id="${id}" x1="${options.x1 ?? "0%"}" y1="${options.y1 ?? "0%"}" x2="${options.x2 ?? "100%"}" y2="${options.y2 ?? "100%"}">${stops}</linearGradient>`;
65
+ }, toSvgGradientMarkup = (model, options = {}) => {
66
+ const id = options.id ?? "g-gradient", width = options.width ?? 240, height = options.height ?? 120, rx = options.rx ?? 18;
67
+ return `<svg xmlns="${SVG_NAMESPACE}" viewBox="0 0 ${width} ${height}" role="img">
68
+ <defs>
69
+ ${toSvgGradient(model, options)}
70
+ </defs>
71
+ <rect width="${width}" height="${height}" rx="${rx}" fill="url(#${id})" />
72
+ </svg>`;
73
+ }, toSvgSourceAnimationMarkup = (sourceSvg, model, options = {}) => {
74
+ const gradientId = `${options.id ?? "g-gradient-source"}-stroke`, sourceViewBox = getSvgViewBox(sourceSvg, options), body = getSvgBody(sourceSvg), paths = getSvgPathData(sourceSvg), strokeWidth = getNormalizedStrokeWidth(
75
+ options.strokeWidth ?? 1.4,
76
+ sourceViewBox,
77
+ options
78
+ ), viewBox = getPaddedViewBox(sourceViewBox, strokeWidth, options), { width, x } = getViewBoxMetrics(viewBox), linecap = options.linecap ?? "round", duration = toCssDuration(options.duration ?? 3600), repeatCount = options.repeatCount ?? "indefinite", sourceOpacity = options.sourceOpacity ?? 0.22, stops = model.stops.map(formatSvgStop).join(""), maxPathComplexity = Math.max(...paths.map(getPathComplexity));
79
+ return `<svg xmlns="${SVG_NAMESPACE}" viewBox="${escapeAttribute(viewBox)}" role="img">
80
+ <defs>
81
+ <linearGradient id="${gradientId}" gradientUnits="userSpaceOnUse" x1="${x}" y1="0" x2="${x + width}" y2="0">
82
+ ${stops}
83
+ </linearGradient>
84
+ </defs>
85
+ <g opacity="${clamp(sourceOpacity)}">
86
+ ${body}
87
+ </g>
88
+ <g fill="none" stroke="url(#${gradientId})" stroke-width="${strokeWidth}" stroke-linecap="${linecap}" stroke-linejoin="round">
89
+ ${paths.map((path) => {
90
+ const fillTime = getSourcePathFillTime(path, maxPathComplexity);
91
+ return `<path d="${escapeAttribute(path)}" pathLength="100" stroke-dasharray="0 100" stroke-dashoffset="0">
92
+ <animate attributeName="stroke-dasharray" values="0 100;100 100;0 100" keyTimes="0;${fillTime};1" dur="${duration}" repeatCount="${repeatCount}" calcMode="linear" />
93
+ <animate attributeName="stroke-dashoffset" values="0;0;-100" keyTimes="0;${fillTime};1" dur="${duration}" repeatCount="${repeatCount}" calcMode="linear" />
94
+ </path>`;
95
+ }).join(`
96
+ `)}
97
+ </g>
98
+ </svg>`;
99
+ }, toSvgPathAnimationMarkup = (model, options = {}) => {
100
+ const gradientId = `${options.id ?? "g-gradient-path"}-stroke`, width = options.width ?? 240, height = options.height ?? 120, path = options.path ?? `M 20 ${height * 0.64} C ${width * 0.28} ${height * 0.18}, ${width * 0.58} ${height * 0.18}, ${width - 20} ${height * 0.64}`, strokeWidth = options.strokeWidth ?? 12, linecap = options.linecap ?? "round", duration = toCssDuration(options.duration ?? 2800), repeatCount = options.repeatCount ?? "indefinite", opacity = options.backgroundOpacity ?? 0.24, stroke = getPathStroke(model, options), stops = model.stops.map(formatSvgStop).join("");
101
+ return `<svg xmlns="${SVG_NAMESPACE}" viewBox="0 0 ${width} ${height}" role="img">
102
+ <defs>
103
+ <linearGradient id="${gradientId}" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="${width}" y2="0">
104
+ ${stops}
105
+ </linearGradient>
106
+ </defs>
107
+ <path d="${escapeAttribute(path)}" fill="none" stroke="${stroke.background}" stroke-width="${strokeWidth}" stroke-linecap="${linecap}" opacity="${opacity}" />
108
+ <path d="${escapeAttribute(path)}" fill="none" stroke="${options.activeStroke ? stroke.active : `url(#${gradientId})`}" stroke-width="${strokeWidth}" stroke-linecap="${linecap}" pathLength="100" stroke-dasharray="100 100" stroke-dashoffset="100">
109
+ <animate attributeName="stroke-dashoffset" values="100;0;-100" dur="${duration}" repeatCount="${repeatCount}" />
110
+ </path>
111
+ </svg>`;
112
+ };
113
+ export {
114
+ toSvgGradientMarkup as a,
115
+ toSvgPathAnimationMarkup as b,
116
+ toSvgSourceAnimationMarkup as c,
117
+ toSvgGradient as t
118
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";const utils=require("./utils-Bry9BTmj.cjs"),css=require("./css-CREh0Awz.cjs"),SVG_NAMESPACE="http://www.w3.org/2000/svg",XHTML_NAMESPACE="http://www.w3.org/1999/xhtml",escapeAttribute=value=>value.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),formatSvgStop=stop=>{const opacity=stop.opacity===void 0?"":` stop-opacity="${utils.clamp(stop.opacity)}"`;return`<stop offset="${stop.position}%" stop-color="${stop.color}"${opacity} />`},getPathStroke=(model,options)=>{var _a,_b,_c;return{active:options.activeStroke??((_a=model.stops[Math.max(0,Math.floor(model.stops.length/2))])==null?void 0:_a.color)??((_b=model.stops[0])==null?void 0:_b.color)??"currentColor",background:options.backgroundStroke??((_c=model.stops[0])==null?void 0:_c.color)??options.activeStroke??"currentColor"}},getSvgViewBox=(svg,options)=>{var _a;const viewBox=(_a=svg.match(/\bviewBox=(["'])(.*?)\1/i))==null?void 0:_a[2];if(viewBox)return viewBox;const width=options.width??240,height=options.height??120;return`0 0 ${width} ${height}`},getSvgBody=svg=>{var _a;return((_a=svg.replace(/<\?xml[\s\S]*?\?>/gi,"").replace(/<!doctype[\s\S]*?>/gi,"").match(/<svg\b[^>]*>([\s\S]*?)<\/svg>/i))==null?void 0:_a[1].trim())??svg},splitAbsoluteSubpaths=path=>{const subpaths=path.trim().split(/(?=M\s*[-+.\d])/).map(subpath=>subpath.trim()).filter(Boolean);return subpaths.length>1?subpaths:[path]},getSvgPathData=svg=>[...svg.matchAll(/<path\b[^>]*\sd=(["'])([\s\S]*?)\1/gi)].flatMap(match=>splitAbsoluteSubpaths(match[2])),getPathComplexity=path=>{var _a;return Math.max(1,((_a=path.match(/[LlHhVvCcSsQqTtAaZz]/g))==null?void 0:_a.length)??0)},getSourcePathFillTime=(path,maxComplexity)=>{const fillTime=.5+(1-getPathComplexity(path)/maxComplexity)*.22;return Math.round(fillTime*1e3)/1e3},getViewBoxMetrics=viewBox=>{const[x="0",y="0",width="240",height="120"]=viewBox.trim().split(/[\s,]+/);return{height:Number(height)||120,width:Number(width)||240,x:Number(x)||0,y:Number(y)||0}},getPaddedViewBox=(viewBox,strokeWidth,options)=>{if(options.viewBoxPadding===!1)return viewBox;const metrics=getViewBoxMetrics(viewBox),fallbackPadding=Math.max(strokeWidth*2,Math.min(metrics.width,metrics.height)*.02),padding=options.viewBoxPadding??fallbackPadding;return[metrics.x-padding,metrics.y-padding,metrics.width+padding*2,metrics.height+padding*2].join(" ")},getViewBoxSize=viewBox=>{const{height,width}=getViewBoxMetrics(viewBox);return{height:Number(height)||120,width:Number(width)||240}},getNormalizedStrokeWidth=(strokeWidth,viewBox,options)=>{if(options.normalizeStrokeWidth===!1)return strokeWidth;const{height,width}=getViewBoxSize(viewBox),base=options.strokeWidthBase??180;return strokeWidth*(Math.min(width,height)/base)},toSvgGradient=(model,options={})=>{const id=options.id??"g-gradient",stops=model.stops.map(formatSvgStop).join("");return model.type==="radial"?`<radialGradient id="${id}" cx="${options.cx??"50%"}" cy="${options.cy??"50%"}" r="${options.r??"75%"}">${stops}</radialGradient>`:model.type==="conic"?`<pattern id="${id}" patternUnits="objectBoundingBox" width="1" height="1"><foreignObject x="0" y="0" width="100%" height="100%"><div xmlns="${XHTML_NAMESPACE}" style="width:100%;height:100%;background:${escapeAttribute(css.toCssGradient(model))};"></div></foreignObject></pattern>`:`<linearGradient id="${id}" x1="${options.x1??"0%"}" y1="${options.y1??"0%"}" x2="${options.x2??"100%"}" y2="${options.y2??"100%"}">${stops}</linearGradient>`},toSvgGradientMarkup=(model,options={})=>{const id=options.id??"g-gradient",width=options.width??240,height=options.height??120,rx=options.rx??18;return`<svg xmlns="${SVG_NAMESPACE}" viewBox="0 0 ${width} ${height}" role="img">
2
+ <defs>
3
+ ${toSvgGradient(model,options)}
4
+ </defs>
5
+ <rect width="${width}" height="${height}" rx="${rx}" fill="url(#${id})" />
6
+ </svg>`},toSvgSourceAnimationMarkup=(sourceSvg,model,options={})=>{const gradientId=`${options.id??"g-gradient-source"}-stroke`,sourceViewBox=getSvgViewBox(sourceSvg,options),body=getSvgBody(sourceSvg),paths=getSvgPathData(sourceSvg),strokeWidth=getNormalizedStrokeWidth(options.strokeWidth??1.4,sourceViewBox,options),viewBox=getPaddedViewBox(sourceViewBox,strokeWidth,options),{width,x}=getViewBoxMetrics(viewBox),linecap=options.linecap??"round",duration=utils.toCssDuration(options.duration??3600),repeatCount=options.repeatCount??"indefinite",sourceOpacity=options.sourceOpacity??.22,stops=model.stops.map(formatSvgStop).join(""),maxPathComplexity=Math.max(...paths.map(getPathComplexity));return`<svg xmlns="${SVG_NAMESPACE}" viewBox="${escapeAttribute(viewBox)}" role="img">
7
+ <defs>
8
+ <linearGradient id="${gradientId}" gradientUnits="userSpaceOnUse" x1="${x}" y1="0" x2="${x+width}" y2="0">
9
+ ${stops}
10
+ </linearGradient>
11
+ </defs>
12
+ <g opacity="${utils.clamp(sourceOpacity)}">
13
+ ${body}
14
+ </g>
15
+ <g fill="none" stroke="url(#${gradientId})" stroke-width="${strokeWidth}" stroke-linecap="${linecap}" stroke-linejoin="round">
16
+ ${paths.map(path=>{const fillTime=getSourcePathFillTime(path,maxPathComplexity);return`<path d="${escapeAttribute(path)}" pathLength="100" stroke-dasharray="0 100" stroke-dashoffset="0">
17
+ <animate attributeName="stroke-dasharray" values="0 100;100 100;0 100" keyTimes="0;${fillTime};1" dur="${duration}" repeatCount="${repeatCount}" calcMode="linear" />
18
+ <animate attributeName="stroke-dashoffset" values="0;0;-100" keyTimes="0;${fillTime};1" dur="${duration}" repeatCount="${repeatCount}" calcMode="linear" />
19
+ </path>`}).join(`
20
+ `)}
21
+ </g>
22
+ </svg>`},toSvgPathAnimationMarkup=(model,options={})=>{const gradientId=`${options.id??"g-gradient-path"}-stroke`,width=options.width??240,height=options.height??120,path=options.path??`M 20 ${height*.64} C ${width*.28} ${height*.18}, ${width*.58} ${height*.18}, ${width-20} ${height*.64}`,strokeWidth=options.strokeWidth??12,linecap=options.linecap??"round",duration=utils.toCssDuration(options.duration??2800),repeatCount=options.repeatCount??"indefinite",opacity=options.backgroundOpacity??.24,stroke=getPathStroke(model,options),stops=model.stops.map(formatSvgStop).join("");return`<svg xmlns="${SVG_NAMESPACE}" viewBox="0 0 ${width} ${height}" role="img">
23
+ <defs>
24
+ <linearGradient id="${gradientId}" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="${width}" y2="0">
25
+ ${stops}
26
+ </linearGradient>
27
+ </defs>
28
+ <path d="${escapeAttribute(path)}" fill="none" stroke="${stroke.background}" stroke-width="${strokeWidth}" stroke-linecap="${linecap}" opacity="${opacity}" />
29
+ <path d="${escapeAttribute(path)}" fill="none" stroke="${options.activeStroke?stroke.active:`url(#${gradientId})`}" stroke-width="${strokeWidth}" stroke-linecap="${linecap}" pathLength="100" stroke-dasharray="100 100" stroke-dashoffset="100">
30
+ <animate attributeName="stroke-dashoffset" values="100;0;-100" dur="${duration}" repeatCount="${repeatCount}" />
31
+ </path>
32
+ </svg>`};exports.toSvgGradient=toSvgGradient;exports.toSvgGradientMarkup=toSvgGradientMarkup;exports.toSvgPathAnimationMarkup=toSvgPathAnimationMarkup;exports.toSvgSourceAnimationMarkup=toSvgSourceAnimationMarkup;
@@ -1,9 +1,9 @@
1
- import type { GradientAnimationOptions } from '../types';
1
+ import type { GradientAnimationOptions } from '../types.js';
2
2
  export declare const getGradientAnimationOptions: (options?: GradientAnimationOptions) => {
3
3
  duration: string;
4
4
  easing: string;
5
5
  name: string;
6
- preset: import("..").GradientAnimationPreset;
6
+ preset: import("../types.js").GradientAnimationPreset;
7
7
  selector: string;
8
8
  };
9
9
  export declare const toGradientAnimationKeyframes: (options?: GradientAnimationOptions) => string;
@@ -1 +1 @@
1
- export { getGradientAnimationOptions, toGradientAnimationCSS, toGradientAnimationKeyframes, toGradientAnimationStyles, toGradientAnimationValue } from './css';
1
+ export { getGradientAnimationOptions, toGradientAnimationCSS, toGradientAnimationKeyframes, toGradientAnimationStyles, toGradientAnimationValue } from './css.js';
@@ -1,6 +1,6 @@
1
- import { type ColorPalettePair } from './palette';
2
- import type { ColorInput } from './color';
3
- import type { ThemeTokens } from './scheme';
1
+ import { type ColorPalettePair } from './palette.js';
2
+ import type { ColorInput } from './color.js';
3
+ import type { ThemeTokens } from './scheme.js';
4
4
  export interface ThemeColorDefinition {
5
5
  color: ColorInput;
6
6
  onColor?: ColorInput;
@@ -1,9 +1,9 @@
1
- import { type ColorPalette } from './palette';
2
- import type { ColorInput } from './color';
3
- import type { GradientOptions } from './types';
4
- export * from './types';
5
- export { createGradientModel, createGradientModelFromColor } from './model';
6
- export { createRecipeStops, gradientRecipes } from './recipes';
7
- export { defineGradientPreset, defineGradientPresetRegistry, getGradientPreset, gradientPresets, type GradientPreset, type GradientPresetName, type GradientPresetRegistry } from './presets';
1
+ import { type ColorPalette } from './palette.js';
2
+ import type { ColorInput } from './color.js';
3
+ import type { GradientOptions } from './types.js';
4
+ export * from './types.js';
5
+ export { createGradientModel, createGradientModelFromColor } from './model.js';
6
+ export { createRecipeStops, gradientRecipes } from './recipes.js';
7
+ export { defineGradientPreset, defineGradientPresetRegistry, getGradientPreset, gradientPresets, type GradientPreset, type GradientPresetName, type GradientPresetRegistry } from './presets.js';
8
8
  export declare const createGradient: (palette: ColorPalette, options?: GradientOptions) => string;
9
9
  export declare const createGradientFromColor: (color: ColorInput, options?: GradientOptions) => string;
@@ -1,7 +1,7 @@
1
- import { type ColorInput } from './color';
2
- import { type ColorSystem, type ThemeColorExtensions } from './colorSystem';
3
- import { type CreatedGradientTokens, type GradientTokenOptions } from './tokens';
4
- import { type ThemeMode, type ThemeTokens } from './scheme';
1
+ import { type ColorInput } from './color.js';
2
+ import { type ColorSystem, type ThemeColorExtensions } from './colorSystem.js';
3
+ import { type CreatedGradientTokens, type GradientTokenOptions } from './tokens.js';
4
+ import { type ThemeMode, type ThemeTokens } from './scheme.js';
5
5
  export declare const DEFAULT_SEED = "#4e51ff";
6
6
  export interface DesignTokenOptions {
7
7
  seed?: ColorInput;
@@ -1,2 +1,2 @@
1
- export { createGradientMorphBlobs, isGradientMorphBlendMode, resolveGradientMorphBlendMode, toGradientMorphCSS, toGradientMorphFilter, toGradientMorphFilterMarkup, toGradientMorphMarkup } from './morph';
2
- export { toGradientBoxShadow, toGradientDropShadow } from './shadow';
1
+ export { createGradientMorphBlobs, isGradientMorphBlendMode, resolveGradientMorphBlendMode, toGradientMorphCSS, toGradientMorphFilter, toGradientMorphFilterMarkup, toGradientMorphMarkup } from './morph.js';
2
+ export { toGradientBoxShadow, toGradientDropShadow } from './shadow.js';
@@ -1,4 +1,4 @@
1
- import type { GradientModel, GradientMorphBlob, GradientMorphBlendMode, GradientMorphMarkupOptions, GradientMorphOptions } from '../types';
1
+ import type { GradientModel, GradientMorphBlob, GradientMorphBlendMode, GradientMorphMarkupOptions, GradientMorphOptions } from '../types.js';
2
2
  export declare const isGradientMorphBlendMode: (value: string) => value is GradientMorphBlendMode;
3
3
  export declare const resolveGradientMorphBlendMode: (value: string | undefined) => GradientMorphBlendMode;
4
4
  export declare const createGradientMorphBlobs: (model: GradientModel, options?: GradientMorphOptions) => GradientMorphBlob[];
@@ -1,3 +1,3 @@
1
- import type { GradientModel, GradientShadowOptions } from '../types';
1
+ import type { GradientModel, GradientShadowOptions } from '../types.js';
2
2
  export declare const toGradientBoxShadow: (model: GradientModel, options?: GradientShadowOptions) => string;
3
3
  export declare const toGradientDropShadow: (model: GradientModel, options?: GradientShadowOptions) => string;
@@ -1,2 +1,2 @@
1
- import type { CanvasGradientOptions, GradientModel } from '../types';
1
+ import type { CanvasGradientOptions, GradientModel } from '../types.js';
2
2
  export declare const toCanvasGradient: (context: CanvasRenderingContext2D, model: GradientModel, options?: CanvasGradientOptions) => CanvasGradient;
@@ -1,3 +1,3 @@
1
- import type { GradientDirection, GradientModel } from '../types';
1
+ import type { GradientDirection, GradientModel } from '../types.js';
2
2
  export declare const createLinearGradient: (stops: readonly string[], direction?: GradientDirection) => string;
3
3
  export declare const toCssGradient: (model: GradientModel) => string;
@@ -1,3 +1,3 @@
1
- export { createLinearGradient, toCssGradient } from './css';
2
- export { toCanvasGradient } from './canvas';
3
- export { toSvgGradient, toSvgGradientMarkup, toSvgPathAnimationMarkup, toSvgSourceAnimationMarkup } from './svg';
1
+ export { createLinearGradient, toCssGradient } from './css.js';
2
+ export { toCanvasGradient } from './canvas.js';
3
+ export { toSvgGradient, toSvgGradientMarkup, toSvgPathAnimationMarkup, toSvgSourceAnimationMarkup } from './svg.js';
@@ -1,4 +1,4 @@
1
- import type { GradientModel, SvgGradientOptions, SvgPathAnimationOptions, SvgSourceAnimationOptions } from '../types';
1
+ import type { GradientModel, SvgGradientOptions, SvgPathAnimationOptions, SvgSourceAnimationOptions } from '../types.js';
2
2
  export declare const toSvgGradient: (model: GradientModel, options?: SvgGradientOptions) => string;
3
3
  export declare const toSvgGradientMarkup: (model: GradientModel, options?: SvgGradientOptions) => string;
4
4
  export declare const toSvgSourceAnimationMarkup: (sourceSvg: string, model: GradientModel, options?: SvgSourceAnimationOptions) => string;
@@ -1,11 +1,11 @@
1
- export * from './core';
2
- export * from './color';
3
- export * from './colorSeeds';
4
- export * from './colorSystem';
5
- export * from './palette';
6
- export * from './scheme';
7
- export * from './formatters';
8
- export * from './effects';
9
- export { toGradientAnimationCSS } from './animation';
10
- export * from './material';
11
- export * from './designTokens';
1
+ export * from './core.js';
2
+ export * from './color.js';
3
+ export * from './colorSeeds.js';
4
+ export * from './colorSystem.js';
5
+ export * from './palette.js';
6
+ export * from './scheme.js';
7
+ export * from './formatters/index.js';
8
+ export * from './effects/index.js';
9
+ export { toGradientAnimationCSS } from './animation/index.js';
10
+ export * from './material.js';
11
+ export * from './designTokens.js';
@@ -1 +1 @@
1
- export { createGradientMaterial, createGradientPreset, createGradientTokens, clearGradientMaterialCache, getGradientMaterialCacheStats, setGradientMaterialCacheLimit, type CreatedGradientMaterial, type CreatedGradientPreset, type CreatedGradientTokens, type GradientAnimationTokenEntry, type GradientEffectTokenEntry, type GradientMaterialOptions, type GradientTokenEntry, type GradientTokenOptions, type GradientTokenRecipe } from './tokens';
1
+ export { createGradientMaterial, createGradientPreset, createGradientTokens, clearGradientMaterialCache, getGradientMaterialCacheStats, setGradientMaterialCacheLimit, type CreatedGradientMaterial, type CreatedGradientPreset, type CreatedGradientTokens, type GradientAnimationTokenEntry, type GradientEffectTokenEntry, type GradientMaterialOptions, type GradientTokenEntry, type GradientTokenOptions, type GradientTokenRecipe } from './tokens.js';
@@ -1,5 +1,5 @@
1
- import { type ColorPalette } from './palette';
2
- import type { GradientModel, GradientOptions } from './types';
3
- import type { ColorInput } from './color';
1
+ import { type ColorPalette } from './palette.js';
2
+ import type { GradientModel, GradientOptions } from './types.js';
3
+ import type { ColorInput } from './color.js';
4
4
  export declare const createGradientModel: (palette: ColorPalette, options?: GradientOptions) => GradientModel;
5
5
  export declare const createGradientModelFromColor: (color: ColorInput, options?: GradientOptions) => GradientModel;
@@ -1,4 +1,4 @@
1
- import { type ColorInput } from './color';
1
+ import { type ColorInput } from './color.js';
2
2
  export declare const COLOR_SHADES: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
3
3
  export type ColorShade = (typeof COLOR_SHADES)[number];
4
4
  export type ColorPalette = Record<ColorShade, string>;
@@ -1,4 +1,4 @@
1
- import type { GradientAnimationOptions, GradientAnimationPreset, GradientOptions, GradientRecipe, GradientShadowOptions, GradientType } from './types';
1
+ import type { GradientAnimationOptions, GradientAnimationPreset, GradientOptions, GradientRecipe, GradientShadowOptions, GradientType } from './types.js';
2
2
  export interface GradientPreset {
3
3
  label: string;
4
4
  description?: string;
@@ -1,14 +1,14 @@
1
- import type { GradientRecipe } from './types';
1
+ import type { GradientRecipe } from './types.js';
2
2
  export declare const gradientRecipes: {
3
- glare: (base: string) => import("./types").GradientStop[];
4
- monochrome: (base: string) => import("./types").GradientStop[];
5
- complementary: (base: string) => import("./types").GradientStop[];
6
- 'split-complementary': (base: string) => import("./types").GradientStop[];
7
- analogous: (base: string) => import("./types").GradientStop[];
8
- triadic: (base: string) => import("./types").GradientStop[];
9
- tetradic: (base: string) => import("./types").GradientStop[];
10
- rectangle: (base: string) => import("./types").GradientStop[];
11
- square: (base: string) => import("./types").GradientStop[];
12
- duotone: (base: string, colors: readonly string[] | undefined) => import("./types").GradientStop[];
3
+ glare: (base: string) => import("./types.js").GradientStop[];
4
+ monochrome: (base: string) => import("./types.js").GradientStop[];
5
+ complementary: (base: string) => import("./types.js").GradientStop[];
6
+ 'split-complementary': (base: string) => import("./types.js").GradientStop[];
7
+ analogous: (base: string) => import("./types.js").GradientStop[];
8
+ triadic: (base: string) => import("./types.js").GradientStop[];
9
+ tetradic: (base: string) => import("./types.js").GradientStop[];
10
+ rectangle: (base: string) => import("./types.js").GradientStop[];
11
+ square: (base: string) => import("./types.js").GradientStop[];
12
+ duotone: (base: string, colors: readonly string[] | undefined) => import("./types.js").GradientStop[];
13
13
  };
14
- export declare const createRecipeStops: (base: string, recipe: GradientRecipe, colors?: readonly string[]) => import("./types").GradientStop[];
14
+ export declare const createRecipeStops: (base: string, recipe: GradientRecipe, colors?: readonly string[]) => import("./types.js").GradientStop[];
@@ -1,6 +1,6 @@
1
- import type { ColorInput } from './color';
2
- import { type GradientPresetName, type GradientPresetRegistry } from './presets';
3
- import type { GradientAnimationOptions, GradientMorphBlendMode, GradientMorphBlob, GradientMorphOptions, GradientModel, GradientOptions, GradientRecipe, GradientShadowOptions, GradientStop } from './types';
1
+ import type { ColorInput } from './color.js';
2
+ import { type GradientPresetName, type GradientPresetRegistry } from './presets.js';
3
+ import type { GradientAnimationOptions, GradientMorphBlendMode, GradientMorphBlob, GradientMorphOptions, GradientModel, GradientOptions, GradientRecipe, GradientShadowOptions, GradientStop } from './types.js';
4
4
  export type GradientTokenRecipe = GradientRecipe | GradientPresetName | 'mesh' | 'soft';
5
5
  export interface GradientTokenEntry {
6
6
  value: string;
@@ -1,4 +1,4 @@
1
- import type { ColorShade } from './palette';
1
+ import type { ColorShade } from './palette.js';
2
2
  export type GradientDirection = number | string;
3
3
  export type GradientType = 'linear' | 'radial' | 'conic';
4
4
  export type GradientRecipe = 'glare' | 'monochrome' | 'complementary' | 'split-complementary' | 'analogous' | 'triadic' | 'tetradic' | 'rectangle' | 'square' | 'duotone';
@@ -1,4 +1,4 @@
1
- import type { GradientDirection, GradientStop } from './types';
1
+ import type { GradientDirection, GradientStop } from './types.js';
2
2
  export declare const normalizeDirection: (direction?: GradientDirection) => string;
3
3
  export declare const toCssLength: (value: number | string) => string;
4
4
  export declare const addCssLength: (value: number | string, offset: number) => string;
@@ -1,4 +1,4 @@
1
- const o = [
1
+ const GRADIENT_MORPH_BLEND_MODES = [
2
2
  "normal",
3
3
  "multiply",
4
4
  "screen",
@@ -15,8 +15,8 @@ const o = [
15
15
  "saturation",
16
16
  "color",
17
17
  "luminosity"
18
- ], l = "hard-light";
18
+ ], DEFAULT_GRADIENT_MORPH_BLEND_MODE = "hard-light";
19
19
  export {
20
- l as D,
21
- o as G
20
+ DEFAULT_GRADIENT_MORPH_BLEND_MODE as D,
21
+ GRADIENT_MORPH_BLEND_MODES as G
22
22
  };
@@ -0,0 +1 @@
1
+ "use strict";const GRADIENT_MORPH_BLEND_MODES=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],DEFAULT_GRADIENT_MORPH_BLEND_MODE="hard-light";exports.DEFAULT_GRADIENT_MORPH_BLEND_MODE=DEFAULT_GRADIENT_MORPH_BLEND_MODE;exports.GRADIENT_MORPH_BLEND_MODES=GRADIENT_MORPH_BLEND_MODES;
@@ -0,0 +1,12 @@
1
+ import type { GradientAnimationOptions } from '../types.cjs';
2
+ export declare const getGradientAnimationOptions: (options?: GradientAnimationOptions) => {
3
+ duration: string;
4
+ easing: string;
5
+ name: string;
6
+ preset: import("../types.cjs").GradientAnimationPreset;
7
+ selector: string;
8
+ };
9
+ export declare const toGradientAnimationKeyframes: (options?: GradientAnimationOptions) => string;
10
+ export declare const toGradientAnimationValue: (options?: GradientAnimationOptions) => string;
11
+ export declare const toGradientAnimationStyles: (options?: GradientAnimationOptions) => string;
12
+ export declare const toGradientAnimationCSS: (options?: GradientAnimationOptions) => string;
@@ -0,0 +1 @@
1
+ export { getGradientAnimationOptions, toGradientAnimationCSS, toGradientAnimationKeyframes, toGradientAnimationStyles, toGradientAnimationValue } from './css.cjs';
@@ -0,0 +1,11 @@
1
+ export type ColorInput = string | number;
2
+ export interface RgbColor {
3
+ r: number;
4
+ g: number;
5
+ b: number;
6
+ }
7
+ export declare const parseColor: (input: ColorInput) => RgbColor | null;
8
+ export declare const rgbToHex: ({ r, g, b }: RgbColor) => string;
9
+ export declare const rgbToChannels: ({ r, g, b }: RgbColor) => string;
10
+ export declare const colorToHex: (input: ColorInput, fallback: string) => string;
11
+ export declare const getContrastingColor: (color: ColorInput) => "#ffffff" | "#0d0d12";
@@ -0,0 +1,3 @@
1
+ export declare const changeTone: (hex: string, tone: number) => string;
2
+ export declare const shiftHue: (hex: string, hueShift: number, tone: number, chromaMultiplier?: number) => string;
3
+ export declare const getComplementaryColor: (hex: string) => string;
@@ -0,0 +1,22 @@
1
+ export declare const COLOR_SEEDS: {
2
+ readonly red: "#F44336";
3
+ readonly pink: "#E91E63";
4
+ readonly purple: "#9C27B0";
5
+ readonly deepPurple: "#673AB7";
6
+ readonly indigo: "#3F51B5";
7
+ readonly blue: "#2196F3";
8
+ readonly lightBlue: "#03A9F4";
9
+ readonly cyan: "#00BCD4";
10
+ readonly teal: "#009688";
11
+ readonly green: "#4CAF50";
12
+ readonly lightGreen: "#8BC34A";
13
+ readonly lime: "#CDDC39";
14
+ readonly yellow: "#FFEB3B";
15
+ readonly amber: "#FFC107";
16
+ readonly orange: "#FF9800";
17
+ readonly deepOrange: "#FF5722";
18
+ readonly brown: "#795548";
19
+ readonly grey: "#9E9E9E";
20
+ readonly blueGrey: "#607D8B";
21
+ };
22
+ export type ColorFamily = keyof typeof COLOR_SEEDS;
@@ -0,0 +1,20 @@
1
+ import { type ColorPalettePair } from './palette.cjs';
2
+ import type { ColorInput } from './color.cjs';
3
+ import type { ThemeTokens } from './scheme.cjs';
4
+ export interface ThemeColorDefinition {
5
+ color: ColorInput;
6
+ onColor?: ColorInput;
7
+ palette?: boolean;
8
+ gradient?: string | false;
9
+ }
10
+ export type ThemeColorValue = ColorInput | ThemeColorDefinition;
11
+ export type ThemeColorExtensions = Record<string, ThemeColorValue>;
12
+ export interface ColorSystem {
13
+ colors: ThemeTokens;
14
+ gradients: ThemeTokens;
15
+ palettes: Record<string, ColorPalettePair>;
16
+ }
17
+ export interface ColorSystemOptions {
18
+ colors?: ThemeColorExtensions;
19
+ }
20
+ export declare const createColorSystem: (seed: ColorInput, options?: ColorSystemOptions) => ColorSystem;
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_GRADIENT_DIRECTION = 135;
2
+ export declare const DEFAULT_GRADIENT_POSITION = "center";
3
+ export declare const DEFAULT_GRADIENT_SIZE = "farthest-corner";
@@ -0,0 +1,9 @@
1
+ import { type ColorPalette } from './palette.cjs';
2
+ import type { ColorInput } from './color.cjs';
3
+ import type { GradientOptions } from './types.cjs';
4
+ export * from './types.cjs';
5
+ export { createGradientModel, createGradientModelFromColor } from './model.cjs';
6
+ export { createRecipeStops, gradientRecipes } from './recipes.cjs';
7
+ export { defineGradientPreset, defineGradientPresetRegistry, getGradientPreset, gradientPresets, type GradientPreset, type GradientPresetName, type GradientPresetRegistry } from './presets.cjs';
8
+ export declare const createGradient: (palette: ColorPalette, options?: GradientOptions) => string;
9
+ export declare const createGradientFromColor: (color: ColorInput, options?: GradientOptions) => string;
@@ -0,0 +1,24 @@
1
+ import { type ColorInput } from './color.cjs';
2
+ import { type ColorSystem, type ThemeColorExtensions } from './colorSystem.cjs';
3
+ import { type CreatedGradientTokens, type GradientTokenOptions } from './tokens.cjs';
4
+ import { type ThemeMode, type ThemeTokens } from './scheme.cjs';
5
+ export declare const DEFAULT_SEED = "#4e51ff";
6
+ export interface DesignTokenOptions {
7
+ seed?: ColorInput;
8
+ mode?: ThemeMode;
9
+ colors?: ThemeColorExtensions;
10
+ gradientTokens?: GradientTokenOptions;
11
+ }
12
+ export interface CreatedDesignTokens {
13
+ seed: string;
14
+ mode: ThemeMode;
15
+ tokens: {
16
+ theme: ThemeTokens;
17
+ colors: ThemeTokens;
18
+ gradients: ThemeTokens;
19
+ };
20
+ colorSystem: ColorSystem;
21
+ gradientTokens: CreatedGradientTokens;
22
+ }
23
+ export declare const normalizeDesignTokenSeed: (seed?: ColorInput) => string;
24
+ export declare const createDesignTokens: (options?: DesignTokenOptions) => CreatedDesignTokens;
@@ -0,0 +1,2 @@
1
+ export { createGradientMorphBlobs, isGradientMorphBlendMode, resolveGradientMorphBlendMode, toGradientMorphCSS, toGradientMorphFilter, toGradientMorphFilterMarkup, toGradientMorphMarkup } from './morph.cjs';
2
+ export { toGradientBoxShadow, toGradientDropShadow } from './shadow.cjs';
@@ -0,0 +1,8 @@
1
+ import type { GradientModel, GradientMorphBlob, GradientMorphBlendMode, GradientMorphMarkupOptions, GradientMorphOptions } from '../types.cjs';
2
+ export declare const isGradientMorphBlendMode: (value: string) => value is GradientMorphBlendMode;
3
+ export declare const resolveGradientMorphBlendMode: (value: string | undefined) => GradientMorphBlendMode;
4
+ export declare const createGradientMorphBlobs: (model: GradientModel, options?: GradientMorphOptions) => GradientMorphBlob[];
5
+ export declare const toGradientMorphFilter: (options?: GradientMorphOptions) => string;
6
+ export declare const toGradientMorphFilterMarkup: (options?: GradientMorphOptions) => string;
7
+ export declare const toGradientMorphCSS: (model: GradientModel, options?: GradientMorphOptions) => string;
8
+ export declare const toGradientMorphMarkup: (model: GradientModel, options?: GradientMorphMarkupOptions) => string;
@@ -0,0 +1,3 @@
1
+ import type { GradientModel, GradientShadowOptions } from '../types.cjs';
2
+ export declare const toGradientBoxShadow: (model: GradientModel, options?: GradientShadowOptions) => string;
3
+ export declare const toGradientDropShadow: (model: GradientModel, options?: GradientShadowOptions) => string;
@@ -0,0 +1,2 @@
1
+ import type { CanvasGradientOptions, GradientModel } from '../types.cjs';
2
+ export declare const toCanvasGradient: (context: CanvasRenderingContext2D, model: GradientModel, options?: CanvasGradientOptions) => CanvasGradient;
@@ -0,0 +1,3 @@
1
+ import type { GradientDirection, GradientModel } from '../types.cjs';
2
+ export declare const createLinearGradient: (stops: readonly string[], direction?: GradientDirection) => string;
3
+ export declare const toCssGradient: (model: GradientModel) => string;
@@ -0,0 +1,3 @@
1
+ export { createLinearGradient, toCssGradient } from './css.cjs';
2
+ export { toCanvasGradient } from './canvas.cjs';
3
+ export { toSvgGradient, toSvgGradientMarkup, toSvgPathAnimationMarkup, toSvgSourceAnimationMarkup } from './svg.cjs';
@@ -0,0 +1,5 @@
1
+ import type { GradientModel, SvgGradientOptions, SvgPathAnimationOptions, SvgSourceAnimationOptions } from '../types.cjs';
2
+ export declare const toSvgGradient: (model: GradientModel, options?: SvgGradientOptions) => string;
3
+ export declare const toSvgGradientMarkup: (model: GradientModel, options?: SvgGradientOptions) => string;
4
+ export declare const toSvgSourceAnimationMarkup: (sourceSvg: string, model: GradientModel, options?: SvgSourceAnimationOptions) => string;
5
+ export declare const toSvgPathAnimationMarkup: (model: GradientModel, options?: SvgPathAnimationOptions) => string;
@@ -0,0 +1,11 @@
1
+ export * from './core.cjs';
2
+ export * from './color.cjs';
3
+ export * from './colorSeeds.cjs';
4
+ export * from './colorSystem.cjs';
5
+ export * from './palette.cjs';
6
+ export * from './scheme.cjs';
7
+ export * from './formatters/index.cjs';
8
+ export * from './effects/index.cjs';
9
+ export { toGradientAnimationCSS } from './animation/index.cjs';
10
+ export * from './material.cjs';
11
+ export * from './designTokens.cjs';
@@ -0,0 +1 @@
1
+ export { createGradientMaterial, createGradientPreset, createGradientTokens, clearGradientMaterialCache, getGradientMaterialCacheStats, setGradientMaterialCacheLimit, type CreatedGradientMaterial, type CreatedGradientPreset, type CreatedGradientTokens, type GradientAnimationTokenEntry, type GradientEffectTokenEntry, type GradientMaterialOptions, type GradientTokenEntry, type GradientTokenOptions, type GradientTokenRecipe } from './tokens.cjs';
@@ -0,0 +1,5 @@
1
+ import { type ColorPalette } from './palette.cjs';
2
+ import type { GradientModel, GradientOptions } from './types.cjs';
3
+ import type { ColorInput } from './color.cjs';
4
+ export declare const createGradientModel: (palette: ColorPalette, options?: GradientOptions) => GradientModel;
5
+ export declare const createGradientModelFromColor: (color: ColorInput, options?: GradientOptions) => GradientModel;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }