rendx-interpolate 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present wei.liang (https://github.com/weiliang0121)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/main.cjs ADDED
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/main.ts
21
+ var main_exports = {};
22
+ __export(main_exports, {
23
+ decompose: () => decompose,
24
+ interpolateColor: () => interpolateColor,
25
+ interpolateColors: () => interpolateColors,
26
+ interpolateMat2d: () => interpolateMat2d,
27
+ interpolateRotate: () => interpolateRotate,
28
+ interpolateValue: () => interpolateValue,
29
+ interpolateVec2: () => interpolateVec2,
30
+ lerp: () => lerp,
31
+ normalize: () => normalize,
32
+ slerp: () => slerp
33
+ });
34
+ module.exports = __toCommonJS(main_exports);
35
+
36
+ // src/number.ts
37
+ var lerp = (a, b) => {
38
+ const d = b - a;
39
+ return (t) => a + d * t;
40
+ };
41
+ var normalize = (a, b) => {
42
+ const d = b - a;
43
+ if (!d) return () => isNaN(d) ? NaN : 0.5;
44
+ const inv = 1 / d;
45
+ return (x) => (x - a) * inv;
46
+ };
47
+
48
+ // src/color.ts
49
+ var HEX_REGEX = /^#([A-Fa-f0-9]{6})$/;
50
+ var RGB_REGEX = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
51
+ var parseColor = (color) => {
52
+ let match;
53
+ if (match = HEX_REGEX.exec(color)) {
54
+ const v = parseInt(match[1], 16);
55
+ return [v >> 16 & 255, v >> 8 & 255, v & 255];
56
+ }
57
+ if (match = RGB_REGEX.exec(color)) {
58
+ return [Number(match[1]), Number(match[2]), Number(match[3])];
59
+ }
60
+ throw new Error(`Unsupported color format: ${color}`);
61
+ };
62
+ var HEX_TABLE = new Array(256);
63
+ for (let i = 0; i < 256; i++) HEX_TABLE[i] = i.toString(16).padStart(2, "0");
64
+ var toHex = (n) => HEX_TABLE[n + 0.5 | 0];
65
+ var interpolateColor = (c0, c1) => {
66
+ const [r0, g0, b0] = parseColor(c0);
67
+ const [r1, g1, b1] = parseColor(c1);
68
+ const dr = r1 - r0;
69
+ const dg = g1 - g0;
70
+ const db = b1 - b0;
71
+ return (t) => `#${toHex(r0 + dr * t)}${toHex(g0 + dg * t)}${toHex(b0 + db * t)}`;
72
+ };
73
+ var MAX_CACHE_SIZE = 64;
74
+ var cache = /* @__PURE__ */ new Map();
75
+ var interpolateColors = (colors) => {
76
+ const key = colors.join(",");
77
+ if (!cache.has(key)) {
78
+ if (cache.size >= MAX_CACHE_SIZE) {
79
+ const firstKey = cache.keys().next().value;
80
+ cache.delete(firstKey);
81
+ }
82
+ const C = colors.slice(0, -1).map((c, i) => interpolateColor(c, colors[i + 1]));
83
+ cache.set(key, C);
84
+ }
85
+ const interpolators = cache.get(key);
86
+ return (t) => {
87
+ const n = interpolators.length;
88
+ const j = Math.min(n - 1, Math.floor(t * n));
89
+ return interpolators[j](t * n - j);
90
+ };
91
+ };
92
+
93
+ // src/vector.ts
94
+ var import_gl_matrix = require("gl-matrix");
95
+ var slerp = (a, b) => {
96
+ const dot = import_gl_matrix.vec2.dot(a, b);
97
+ const clampedDot = Math.max(-1, Math.min(dot, 1));
98
+ const angle = Math.acos(clampedDot);
99
+ const sinAngle = Math.sin(angle);
100
+ const out = import_gl_matrix.vec2.clone(a);
101
+ if (angle === 0 || sinAngle === 0) return (_t) => out;
102
+ return (t) => {
103
+ const s1 = Math.sin((1 - t) * angle) / sinAngle;
104
+ const s2 = Math.sin(t * angle) / sinAngle;
105
+ out[0] = s1 * a[0] + s2 * b[0];
106
+ out[1] = s1 * a[1] + s2 * b[1];
107
+ return out;
108
+ };
109
+ };
110
+ var interpolateVec2 = (a, b) => {
111
+ const dx = b[0] - a[0];
112
+ const dy = b[1] - a[1];
113
+ const out = import_gl_matrix.vec2.create();
114
+ return (t) => {
115
+ out[0] = a[0] + dx * t;
116
+ out[1] = a[1] + dy * t;
117
+ return out;
118
+ };
119
+ };
120
+ var interpolateRotate = (a, b) => {
121
+ let d = b - a;
122
+ if (d > Math.PI) d -= 2 * Math.PI;
123
+ else if (d < -Math.PI) d += 2 * Math.PI;
124
+ return (t) => a + d * t;
125
+ };
126
+
127
+ // src/matrix.ts
128
+ var import_gl_matrix2 = require("gl-matrix");
129
+ var decompose = (mat) => {
130
+ const [a, b, c, d, e, f] = mat;
131
+ const translation = import_gl_matrix2.vec2.fromValues(e, f);
132
+ const scale = import_gl_matrix2.vec2.fromValues(Math.hypot(a, b), Math.hypot(c, d));
133
+ const rotation = Math.atan2(b, a);
134
+ return { translation, rotation, scale };
135
+ };
136
+ var interpolateMat2d = (a, b) => {
137
+ const { translation: ta, rotation: ra, scale: sa } = decompose(a);
138
+ const { translation: tb, rotation: rb, scale: sb } = decompose(b);
139
+ const is = interpolateVec2(sa, sb);
140
+ const ir = interpolateRotate(ra, rb);
141
+ const it = interpolateVec2(ta, tb);
142
+ const out = import_gl_matrix2.mat2d.create();
143
+ return (t) => {
144
+ const s = is(t);
145
+ const r = ir(t);
146
+ const p = it(t);
147
+ const cos = Math.cos(r);
148
+ const sin = Math.sin(r);
149
+ out[0] = cos * s[0];
150
+ out[1] = sin * s[0];
151
+ out[2] = -sin * s[1];
152
+ out[3] = cos * s[1];
153
+ out[4] = p[0];
154
+ out[5] = p[1];
155
+ return out;
156
+ };
157
+ };
158
+
159
+ // src/value.ts
160
+ var interpolateValue = (a, b) => {
161
+ if (typeof a === "number" && typeof b === "number") return lerp(a, b);
162
+ if (typeof a === "string" && typeof b === "string") return interpolateColor(a, b);
163
+ return () => a;
164
+ };
165
+ // Annotate the CommonJS export names for ESM import in node:
166
+ 0 && (module.exports = {
167
+ decompose,
168
+ interpolateColor,
169
+ interpolateColors,
170
+ interpolateMat2d,
171
+ interpolateRotate,
172
+ interpolateValue,
173
+ interpolateVec2,
174
+ lerp,
175
+ normalize,
176
+ slerp
177
+ });
@@ -0,0 +1,84 @@
1
+ import { vec2, mat2d } from 'gl-matrix';
2
+
3
+ /**
4
+ * 线性插值构造器,预计算差值,每次调用只需 1 乘 1 加
5
+ * @param a 起始值
6
+ * @param b 结束值
7
+ * @returns 插值函数 (t) => number
8
+ */
9
+ declare const lerp: (a: number, b: number) => (t: number) => number;
10
+ /**
11
+ * 归一化函数构造器,预计算倒数避免每次除法
12
+ * @param a 左界
13
+ * @param b 右界
14
+ * @returns 归一化函数
15
+ */
16
+ declare const normalize: (a: number, b: number) => (x: number) => number;
17
+
18
+ /**
19
+ * 根据插值系数 t 计算两个颜色的插值颜色构造器
20
+ * 预计算 RGB 差值,每次调用只需 3 次乘加 + 查表
21
+ * @param c0 起始颜色
22
+ * @param c1 结束颜色
23
+ * @returns 插值函数
24
+ */
25
+ declare const interpolateColor: (c0: string, c1: string) => (t: number) => string;
26
+ /**
27
+ * 根据颜色数组计算插值颜色函数构造器
28
+ * @param colors 颜色数组
29
+ * @returns 插值颜色函数
30
+ */
31
+ declare const interpolateColors: (colors: string[]) => (t: number) => string;
32
+
33
+ /**
34
+ * 球面二维向量插值构造器,预分配输出向量避免 GC
35
+ * @param a 向量 a
36
+ * @param b 向量 b
37
+ * @returns 插值函数 (t) => vec2(注意:返回的 vec2 是复用对象)
38
+ */
39
+ declare const slerp: (a: vec2, b: vec2) => (_t: number) => vec2;
40
+ /**
41
+ * 向量插值函数构造器
42
+ * 预计算差值 + 预分配输出 vec2,每次调用零分配
43
+ * @param a 向量
44
+ * @param b 向量
45
+ * @returns 插值函数 (t) => vec2(注意:返回的 vec2 是复用对象)
46
+ */
47
+ declare const interpolateVec2: (a: vec2, b: vec2) => (t: number) => vec2;
48
+ /**
49
+ * 角度插值函数构造器(最短路径)
50
+ * 直接计算最短角度差,避免 slerp 的三角函数开销
51
+ * @param a 起始角度(弧度)
52
+ * @param b 结束角度(弧度)
53
+ * @returns 插值函数 (t) => number
54
+ */
55
+ declare const interpolateRotate: (a: number, b: number) => (t: number) => number;
56
+
57
+ /**
58
+ * 解构矩阵为 TRS 分量
59
+ * @param mat 矩阵
60
+ * @returns 平移、旋转、缩放
61
+ */
62
+ declare const decompose: (mat: mat2d) => {
63
+ translation: vec2;
64
+ rotation: number;
65
+ scale: vec2;
66
+ };
67
+ /**
68
+ * 插值矩阵函数构造器
69
+ * 预分配输出矩阵,每次调用复用同一对象
70
+ * @param a 起始矩阵
71
+ * @param b 结束矩阵
72
+ * @returns 插值矩阵函数 (t) => mat2d(注意:返回的 mat2d 是复用对象)
73
+ */
74
+ declare const interpolateMat2d: (a: mat2d, b: mat2d) => (t: number) => mat2d;
75
+
76
+ /**
77
+ * 通用插值函数构造器,根据类型自动分派
78
+ * @param a 起始值(number 或 color string)
79
+ * @param b 结束值
80
+ * @returns 插值函数
81
+ */
82
+ declare const interpolateValue: (a: number | string, b: number | string) => ((t: number) => number) | ((t: number) => string) | (() => string | number);
83
+
84
+ export { decompose, interpolateColor, interpolateColors, interpolateMat2d, interpolateRotate, interpolateValue, interpolateVec2, lerp, normalize, slerp };
package/dist/main.d.ts ADDED
@@ -0,0 +1,84 @@
1
+ import { vec2, mat2d } from 'gl-matrix';
2
+
3
+ /**
4
+ * 线性插值构造器,预计算差值,每次调用只需 1 乘 1 加
5
+ * @param a 起始值
6
+ * @param b 结束值
7
+ * @returns 插值函数 (t) => number
8
+ */
9
+ declare const lerp: (a: number, b: number) => (t: number) => number;
10
+ /**
11
+ * 归一化函数构造器,预计算倒数避免每次除法
12
+ * @param a 左界
13
+ * @param b 右界
14
+ * @returns 归一化函数
15
+ */
16
+ declare const normalize: (a: number, b: number) => (x: number) => number;
17
+
18
+ /**
19
+ * 根据插值系数 t 计算两个颜色的插值颜色构造器
20
+ * 预计算 RGB 差值,每次调用只需 3 次乘加 + 查表
21
+ * @param c0 起始颜色
22
+ * @param c1 结束颜色
23
+ * @returns 插值函数
24
+ */
25
+ declare const interpolateColor: (c0: string, c1: string) => (t: number) => string;
26
+ /**
27
+ * 根据颜色数组计算插值颜色函数构造器
28
+ * @param colors 颜色数组
29
+ * @returns 插值颜色函数
30
+ */
31
+ declare const interpolateColors: (colors: string[]) => (t: number) => string;
32
+
33
+ /**
34
+ * 球面二维向量插值构造器,预分配输出向量避免 GC
35
+ * @param a 向量 a
36
+ * @param b 向量 b
37
+ * @returns 插值函数 (t) => vec2(注意:返回的 vec2 是复用对象)
38
+ */
39
+ declare const slerp: (a: vec2, b: vec2) => (_t: number) => vec2;
40
+ /**
41
+ * 向量插值函数构造器
42
+ * 预计算差值 + 预分配输出 vec2,每次调用零分配
43
+ * @param a 向量
44
+ * @param b 向量
45
+ * @returns 插值函数 (t) => vec2(注意:返回的 vec2 是复用对象)
46
+ */
47
+ declare const interpolateVec2: (a: vec2, b: vec2) => (t: number) => vec2;
48
+ /**
49
+ * 角度插值函数构造器(最短路径)
50
+ * 直接计算最短角度差,避免 slerp 的三角函数开销
51
+ * @param a 起始角度(弧度)
52
+ * @param b 结束角度(弧度)
53
+ * @returns 插值函数 (t) => number
54
+ */
55
+ declare const interpolateRotate: (a: number, b: number) => (t: number) => number;
56
+
57
+ /**
58
+ * 解构矩阵为 TRS 分量
59
+ * @param mat 矩阵
60
+ * @returns 平移、旋转、缩放
61
+ */
62
+ declare const decompose: (mat: mat2d) => {
63
+ translation: vec2;
64
+ rotation: number;
65
+ scale: vec2;
66
+ };
67
+ /**
68
+ * 插值矩阵函数构造器
69
+ * 预分配输出矩阵,每次调用复用同一对象
70
+ * @param a 起始矩阵
71
+ * @param b 结束矩阵
72
+ * @returns 插值矩阵函数 (t) => mat2d(注意:返回的 mat2d 是复用对象)
73
+ */
74
+ declare const interpolateMat2d: (a: mat2d, b: mat2d) => (t: number) => mat2d;
75
+
76
+ /**
77
+ * 通用插值函数构造器,根据类型自动分派
78
+ * @param a 起始值(number 或 color string)
79
+ * @param b 结束值
80
+ * @returns 插值函数
81
+ */
82
+ declare const interpolateValue: (a: number | string, b: number | string) => ((t: number) => number) | ((t: number) => string) | (() => string | number);
83
+
84
+ export { decompose, interpolateColor, interpolateColors, interpolateMat2d, interpolateRotate, interpolateValue, interpolateVec2, lerp, normalize, slerp };
package/dist/main.js ADDED
@@ -0,0 +1,141 @@
1
+ // src/number.ts
2
+ var lerp = (a, b) => {
3
+ const d = b - a;
4
+ return (t) => a + d * t;
5
+ };
6
+ var normalize = (a, b) => {
7
+ const d = b - a;
8
+ if (!d) return () => isNaN(d) ? NaN : 0.5;
9
+ const inv = 1 / d;
10
+ return (x) => (x - a) * inv;
11
+ };
12
+
13
+ // src/color.ts
14
+ var HEX_REGEX = /^#([A-Fa-f0-9]{6})$/;
15
+ var RGB_REGEX = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
16
+ var parseColor = (color) => {
17
+ let match;
18
+ if (match = HEX_REGEX.exec(color)) {
19
+ const v = parseInt(match[1], 16);
20
+ return [v >> 16 & 255, v >> 8 & 255, v & 255];
21
+ }
22
+ if (match = RGB_REGEX.exec(color)) {
23
+ return [Number(match[1]), Number(match[2]), Number(match[3])];
24
+ }
25
+ throw new Error(`Unsupported color format: ${color}`);
26
+ };
27
+ var HEX_TABLE = new Array(256);
28
+ for (let i = 0; i < 256; i++) HEX_TABLE[i] = i.toString(16).padStart(2, "0");
29
+ var toHex = (n) => HEX_TABLE[n + 0.5 | 0];
30
+ var interpolateColor = (c0, c1) => {
31
+ const [r0, g0, b0] = parseColor(c0);
32
+ const [r1, g1, b1] = parseColor(c1);
33
+ const dr = r1 - r0;
34
+ const dg = g1 - g0;
35
+ const db = b1 - b0;
36
+ return (t) => `#${toHex(r0 + dr * t)}${toHex(g0 + dg * t)}${toHex(b0 + db * t)}`;
37
+ };
38
+ var MAX_CACHE_SIZE = 64;
39
+ var cache = /* @__PURE__ */ new Map();
40
+ var interpolateColors = (colors) => {
41
+ const key = colors.join(",");
42
+ if (!cache.has(key)) {
43
+ if (cache.size >= MAX_CACHE_SIZE) {
44
+ const firstKey = cache.keys().next().value;
45
+ cache.delete(firstKey);
46
+ }
47
+ const C = colors.slice(0, -1).map((c, i) => interpolateColor(c, colors[i + 1]));
48
+ cache.set(key, C);
49
+ }
50
+ const interpolators = cache.get(key);
51
+ return (t) => {
52
+ const n = interpolators.length;
53
+ const j = Math.min(n - 1, Math.floor(t * n));
54
+ return interpolators[j](t * n - j);
55
+ };
56
+ };
57
+
58
+ // src/vector.ts
59
+ import { vec2 } from "gl-matrix";
60
+ var slerp = (a, b) => {
61
+ const dot = vec2.dot(a, b);
62
+ const clampedDot = Math.max(-1, Math.min(dot, 1));
63
+ const angle = Math.acos(clampedDot);
64
+ const sinAngle = Math.sin(angle);
65
+ const out = vec2.clone(a);
66
+ if (angle === 0 || sinAngle === 0) return (_t) => out;
67
+ return (t) => {
68
+ const s1 = Math.sin((1 - t) * angle) / sinAngle;
69
+ const s2 = Math.sin(t * angle) / sinAngle;
70
+ out[0] = s1 * a[0] + s2 * b[0];
71
+ out[1] = s1 * a[1] + s2 * b[1];
72
+ return out;
73
+ };
74
+ };
75
+ var interpolateVec2 = (a, b) => {
76
+ const dx = b[0] - a[0];
77
+ const dy = b[1] - a[1];
78
+ const out = vec2.create();
79
+ return (t) => {
80
+ out[0] = a[0] + dx * t;
81
+ out[1] = a[1] + dy * t;
82
+ return out;
83
+ };
84
+ };
85
+ var interpolateRotate = (a, b) => {
86
+ let d = b - a;
87
+ if (d > Math.PI) d -= 2 * Math.PI;
88
+ else if (d < -Math.PI) d += 2 * Math.PI;
89
+ return (t) => a + d * t;
90
+ };
91
+
92
+ // src/matrix.ts
93
+ import { mat2d, vec2 as vec22 } from "gl-matrix";
94
+ var decompose = (mat) => {
95
+ const [a, b, c, d, e, f] = mat;
96
+ const translation = vec22.fromValues(e, f);
97
+ const scale = vec22.fromValues(Math.hypot(a, b), Math.hypot(c, d));
98
+ const rotation = Math.atan2(b, a);
99
+ return { translation, rotation, scale };
100
+ };
101
+ var interpolateMat2d = (a, b) => {
102
+ const { translation: ta, rotation: ra, scale: sa } = decompose(a);
103
+ const { translation: tb, rotation: rb, scale: sb } = decompose(b);
104
+ const is = interpolateVec2(sa, sb);
105
+ const ir = interpolateRotate(ra, rb);
106
+ const it = interpolateVec2(ta, tb);
107
+ const out = mat2d.create();
108
+ return (t) => {
109
+ const s = is(t);
110
+ const r = ir(t);
111
+ const p = it(t);
112
+ const cos = Math.cos(r);
113
+ const sin = Math.sin(r);
114
+ out[0] = cos * s[0];
115
+ out[1] = sin * s[0];
116
+ out[2] = -sin * s[1];
117
+ out[3] = cos * s[1];
118
+ out[4] = p[0];
119
+ out[5] = p[1];
120
+ return out;
121
+ };
122
+ };
123
+
124
+ // src/value.ts
125
+ var interpolateValue = (a, b) => {
126
+ if (typeof a === "number" && typeof b === "number") return lerp(a, b);
127
+ if (typeof a === "string" && typeof b === "string") return interpolateColor(a, b);
128
+ return () => a;
129
+ };
130
+ export {
131
+ decompose,
132
+ interpolateColor,
133
+ interpolateColors,
134
+ interpolateMat2d,
135
+ interpolateRotate,
136
+ interpolateValue,
137
+ interpolateVec2,
138
+ lerp,
139
+ normalize,
140
+ slerp
141
+ };
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "rendx-interpolate",
3
+ "version": "0.1.0",
4
+ "description": "Interpolators for numbers, colors, vectors, and matrices",
5
+ "license": "MIT",
6
+ "author": "wei.liang (https://github.com/weiliang0121)",
7
+ "type": "module",
8
+ "keywords": [
9
+ "rendx",
10
+ "2d",
11
+ "canvas",
12
+ "rendering",
13
+ "visualization",
14
+ "scene-graph"
15
+ ],
16
+ "homepage": "https://weiliang0121.github.io/rendx/",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/weiliang0121/rendx.git",
20
+ "directory": "packages/interpolate"
21
+ },
22
+ "main": "dist/main.cjs",
23
+ "module": "dist/main.js",
24
+ "types": "dist/main.d.ts",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/main.d.ts",
28
+ "import": "./dist/main.js",
29
+ "require": "./dist/main.cjs"
30
+ }
31
+ },
32
+ "dependencies": {
33
+ "gl-matrix": "^3.4.4",
34
+ "rendx-core": "^0.1.0"
35
+ },
36
+ "sideEffects": false,
37
+ "files": [
38
+ "dist"
39
+ ],
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup",
45
+ "dev": "tsup --watch"
46
+ }
47
+ }