lofter-lottie-opt 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 (66) hide show
  1. package/README.md +371 -0
  2. package/dist/bundle/358.mjs +34 -0
  3. package/dist/bundle/506.mjs +301 -0
  4. package/dist/bundle/599.mjs +15335 -0
  5. package/dist/bundle/599.mjs.LICENSE.txt +22 -0
  6. package/dist/bundle/index.mjs +13631 -0
  7. package/dist/bundle/index.mjs.LICENSE.txt +13 -0
  8. package/dist/cli/index.mjs +3162 -0
  9. package/dist/esm/cli/index.d.ts +3 -0
  10. package/dist/esm/cli/index.d.ts.map +1 -0
  11. package/dist/esm/cli/validate.d.ts +3 -0
  12. package/dist/esm/cli/validate.d.ts.map +1 -0
  13. package/dist/esm/core/optimizer.d.ts +13 -0
  14. package/dist/esm/core/optimizer.d.ts.map +1 -0
  15. package/dist/esm/index.d.ts +8 -0
  16. package/dist/esm/index.d.ts.map +1 -0
  17. package/dist/esm/index.mjs +2048 -0
  18. package/dist/esm/plugins/compress-images/algorithm.d.ts +11 -0
  19. package/dist/esm/plugins/compress-images/algorithm.d.ts.map +1 -0
  20. package/dist/esm/plugins/compress-images/index.d.ts +14 -0
  21. package/dist/esm/plugins/compress-images/index.d.ts.map +1 -0
  22. package/dist/esm/plugins/compress-images/tinypng.d.ts +22 -0
  23. package/dist/esm/plugins/compress-images/tinypng.d.ts.map +1 -0
  24. package/dist/esm/plugins/compress-images/types.d.ts +106 -0
  25. package/dist/esm/plugins/compress-images/types.d.ts.map +1 -0
  26. package/dist/esm/plugins/compress-images/utils.d.ts +66 -0
  27. package/dist/esm/plugins/compress-images/utils.d.ts.map +1 -0
  28. package/dist/esm/plugins/index.d.ts +8 -0
  29. package/dist/esm/plugins/index.d.ts.map +1 -0
  30. package/dist/esm/plugins/minify-json/algorithm.d.ts +15 -0
  31. package/dist/esm/plugins/minify-json/algorithm.d.ts.map +1 -0
  32. package/dist/esm/plugins/minify-json/index.d.ts +9 -0
  33. package/dist/esm/plugins/minify-json/index.d.ts.map +1 -0
  34. package/dist/esm/plugins/minify-json/types.d.ts +55 -0
  35. package/dist/esm/plugins/minify-json/types.d.ts.map +1 -0
  36. package/dist/esm/plugins/remove-unused-assets/algorithm.d.ts +20 -0
  37. package/dist/esm/plugins/remove-unused-assets/algorithm.d.ts.map +1 -0
  38. package/dist/esm/plugins/remove-unused-assets/index.d.ts +18 -0
  39. package/dist/esm/plugins/remove-unused-assets/index.d.ts.map +1 -0
  40. package/dist/esm/plugins/remove-unused-assets/types.d.ts +52 -0
  41. package/dist/esm/plugins/remove-unused-assets/types.d.ts.map +1 -0
  42. package/dist/esm/plugins/simplify-paths/algorithm.d.ts +17 -0
  43. package/dist/esm/plugins/simplify-paths/algorithm.d.ts.map +1 -0
  44. package/dist/esm/plugins/simplify-paths/index.d.ts +16 -0
  45. package/dist/esm/plugins/simplify-paths/index.d.ts.map +1 -0
  46. package/dist/esm/plugins/simplify-paths/types.d.ts +101 -0
  47. package/dist/esm/plugins/simplify-paths/types.d.ts.map +1 -0
  48. package/dist/esm/testing/comparison-tool.d.ts +60 -0
  49. package/dist/esm/testing/comparison-tool.d.ts.map +1 -0
  50. package/dist/esm/types/index.d.ts +175 -0
  51. package/dist/esm/types/index.d.ts.map +1 -0
  52. package/dist/esm/types/plugin-common.d.ts +91 -0
  53. package/dist/esm/types/plugin-common.d.ts.map +1 -0
  54. package/dist/esm/utils/config-validator.d.ts +19 -0
  55. package/dist/esm/utils/config-validator.d.ts.map +1 -0
  56. package/dist/esm/utils/logger.d.ts +4 -0
  57. package/dist/esm/utils/logger.d.ts.map +1 -0
  58. package/dist/esm/utils/nos-client.d.ts +55 -0
  59. package/dist/esm/utils/nos-client.d.ts.map +1 -0
  60. package/dist/esm/utils/size.d.ts +5 -0
  61. package/dist/esm/utils/size.d.ts.map +1 -0
  62. package/dist/esm/validation/index.d.ts +67 -0
  63. package/dist/esm/validation/index.d.ts.map +1 -0
  64. package/dist/esm/validation/visual-validator.d.ts +61 -0
  65. package/dist/esm/validation/visual-validator.d.ts.map +1 -0
  66. package/package.json +57 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 核心算法 - compress-images 插件(简化版)
3
+ *
4
+ * 极简参数:只关心是否启用 WebP/AVIF、是否内嵌、最长边限制和质量档位。
5
+ * 默认启用 WebP,关闭 AVIF。内置 mozjpeg / pngquant(palette)最佳实践。
6
+ * 自动多组候选 + SSIM 质量控制,智能选择最优压缩方案。
7
+ */
8
+ import { LottieData } from '../../types';
9
+ import { CompressImagesOptions, CompressImagesResult } from './types';
10
+ export declare function compressImages(input: LottieData, opt?: CompressImagesOptions): Promise<CompressImagesResult>;
11
+ //# sourceMappingURL=algorithm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"algorithm.d.ts","sourceRoot":"","sources":["../../../../src/plugins/compress-images/algorithm.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAe,qBAAqB,EAAE,oBAAoB,EAAyC,MAAM,SAAS,CAAC;AAqF1H,wBAAsB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,GAAE,qBAA0B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA+QtH"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * compress-images 插件入口(简化版)
3
+ *
4
+ * 极简参数:只关心是否启用 WebP/AVIF、是否内嵌、最长边限制和质量档位。
5
+ * 默认启用 WebP,关闭 AVIF。内置 mozjpeg / pngquant(palette)最佳实践。
6
+ * 自动多组候选 + SSIM 质量控制,智能选择最优压缩方案。
7
+ *
8
+ * Author: lottie-opt
9
+ */
10
+ import { OptimizePlugin } from '../../types';
11
+ export { compressImages } from './algorithm';
12
+ export * from './types';
13
+ export declare const compressImagesPlugin: OptimizePlugin;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/compress-images/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAA2C,MAAM,aAAa,CAAC;AAMtF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,cAAc,SAAS,CAAC;AAGxB,eAAO,MAAM,oBAAoB,EAAE,cAmDlC,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * TinyPNG 压缩功能
3
+ */
4
+ /**
5
+ * 生成随机IP地址,用于绕过某些服务的IP限制
6
+ */
7
+ export declare function getRandomIP(): string;
8
+ /**
9
+ * 下载图片并返回Buffer
10
+ */
11
+ export declare function downloadImg(url: string): Promise<Buffer>;
12
+ /**
13
+ * 使用 TinyPNG 压缩图片
14
+ * @param file 图片Buffer
15
+ * @returns [压缩后的Buffer, 文件扩展名]
16
+ */
17
+ export declare function compress(file: Buffer): Promise<[Buffer, string]>;
18
+ /**
19
+ * 重置 TinyPNG 服务状态,允许重新尝试使用服务
20
+ */
21
+ export declare function resetServiceStatus(): void;
22
+ //# sourceMappingURL=tinypng.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinypng.d.ts","sourceRoot":"","sources":["../../../../src/plugins/compress-images/tinypng.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkBH;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAIpC;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS9D;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAyEtE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * 类型定义 - compress-images 插件(简化版)
3
+ */
4
+ import { LottieData, BasePluginOptions, QualityLevel } from '../../types';
5
+ import { CDNUploadConfig } from '../../utils/nos-client';
6
+ type AnyObj = Record<string, any>;
7
+ export type CompressionLevel = "mild" | "standard" | "aggressive";
8
+ export interface SSIMCompressOptions {
9
+ /**
10
+ * 压缩等级:mild (0.995) | standard (0.99) | aggressive (0.975)
11
+ */
12
+ level?: CompressionLevel;
13
+ /**
14
+ * 自定义 SSIM 阈值,覆盖默认档位阈值
15
+ */
16
+ ssimThreshold?: number;
17
+ /**
18
+ * 允许的格式候选,默认全部尝试
19
+ */
20
+ allowFormats?: Array<"png" | "webp-lossy" | "webp-near" | "jpeg">;
21
+ /**
22
+ * 无达标项时是否回退到 SSIM 最大者,默认 true
23
+ */
24
+ fallbackToBestSSIM?: boolean;
25
+ /**
26
+ * 覆盖编码 effort,默认 6(webp)/ 10(png)
27
+ */
28
+ forceEffort?: number;
29
+ }
30
+ export interface LottieAsset extends AnyObj {
31
+ id?: string;
32
+ u?: string;
33
+ p?: string;
34
+ e?: 0 | 1;
35
+ w?: number;
36
+ h?: number;
37
+ }
38
+ export interface CompressImagesOptions extends BasePluginOptions {
39
+ /**
40
+ * 是否启用 WebP 格式,默认 true
41
+ */
42
+ enableWebp?: boolean;
43
+ /**
44
+ * 是否启用 AVIF 格式,默认 false
45
+ */
46
+ enableAvif?: boolean;
47
+ /**
48
+ * 压缩质量等级,默认 'balanced'
49
+ * @deprecated 建议使用 ssimOptions.level 替代
50
+ */
51
+ quality?: QualityLevel;
52
+ /**
53
+ * 最长边限制,0=不限制,默认 0
54
+ */
55
+ longEdge?: number;
56
+ /**
57
+ * 结果是否内嵌 DataURL,默认 true
58
+ */
59
+ embed?: boolean;
60
+ /**
61
+ * 读取相对路径的根目录,默认 cwd
62
+ */
63
+ baseDir?: string;
64
+ /**
65
+ * embed=false 时输出目录,默认 ./lottie-assets
66
+ */
67
+ outDir?: string;
68
+ /**
69
+ * 是否使用 TinyPNG 压缩,默认 false
70
+ * 开启后将优先使用 TinyPNG 进行图片压缩
71
+ */
72
+ useTinyPNG?: boolean;
73
+ /**
74
+ * CDN 上传配置,启用后将图片上传到 CDN 并替换为 CDN URL
75
+ * 注意:只有在 embed=false 时才生效
76
+ */
77
+ cdn?: CDNUploadConfig;
78
+ /**
79
+ * 基于 SSIM 的压缩选项,更智能的质量控制
80
+ */
81
+ ssimOptions?: SSIMCompressOptions;
82
+ }
83
+ export interface CompressImagesStats {
84
+ total: number;
85
+ optimized: number;
86
+ before: number;
87
+ after: number;
88
+ saved: number;
89
+ savedPct: number;
90
+ perAsset: Array<{
91
+ id?: string;
92
+ from?: string;
93
+ to?: string;
94
+ orig: number;
95
+ out: number;
96
+ ssim?: number;
97
+ resized?: boolean;
98
+ }>;
99
+ warnings: string[];
100
+ }
101
+ export interface CompressImagesResult {
102
+ data: LottieData;
103
+ stats: CompressImagesStats;
104
+ }
105
+ export {};
106
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/plugins/compress-images/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAGlC,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;AAGlE,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC,CAAC;IAElE;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,WA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M,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC,CAAC;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,mBAAmB,CAAC;CAC5B"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * image-compressor-utils.ts
3
+ *
4
+ * 图片压缩工具:
5
+ * - 三档压缩:"mild" | "standard" | "aggressive"
6
+ * - 用 SSIM.js 做质量守门(默认阈值:0.995 / 0.99 / 0.975,可自定义)
7
+ * - 对同一原图尝试多种编码候选(PNG-8 / WebP 有损 / WebP 近无损 / JPEG(无透明时)),
8
+ * 在达标的候选中选体积最小者;若无达标项,可选择回退到 SSIM 最大者,或返回原图。
9
+ * - 仅关注“图片压缩”,不包含 Lottie 处理逻辑。
10
+ *
11
+ * SSIM.js 参考:ssim(img1, img2, options) // 接收两张图的 Buffer(或路径)并返回 { mssim }
12
+ */
13
+ export type CompressionLevel = "mild" | "standard" | "aggressive";
14
+ export interface CompressOptions {
15
+ level?: CompressionLevel;
16
+ ssimThreshold?: number;
17
+ allowFormats?: Array<"png" | "webp-lossy" | "webp-near" | "jpeg">;
18
+ fallbackToBestSSIM?: boolean;
19
+ forceEffort?: number;
20
+ }
21
+ export interface EncodeChoice {
22
+ format: "png" | "webp" | "jpeg";
23
+ variant: "png8" | "webp-lossy" | "webp-near" | "jpeg";
24
+ label: string;
25
+ bytes: number;
26
+ ssim: number;
27
+ buffer: Buffer;
28
+ }
29
+ export interface CompressResult extends EncodeChoice {
30
+ level: CompressionLevel;
31
+ threshold: number;
32
+ hasAlpha: boolean;
33
+ tried: EncodeChoice[];
34
+ }
35
+ /**
36
+ * 主函数:压缩一张图片 Buffer,返回在 SSIM 达标前提下体积最小的候选。
37
+ */
38
+ export declare function compressImage(input: Buffer, options?: CompressOptions): Promise<CompressResult>;
39
+ export declare function compressMany(inputs: Buffer[], opts?: CompressOptions): Promise<CompressResult[]>;
40
+ /**
41
+ import fs from "node:fs/promises";
42
+
43
+ (async () => {
44
+ const input = await fs.readFile("./input.png");
45
+
46
+ // 1) 标准档(默认)
47
+ let r = await compressImage(input, { level: "standard" });
48
+ console.log("standard:", r.label, r.bytes, r.ssim.toFixed(5));
49
+ await fs.writeFile(`./out-standard.${r.format}`, r.buffer);
50
+
51
+ // 2) mild 档,阈值更苛刻(可覆盖阈值)、仅尝试 WebP 系列
52
+ r = await compressImage(input, {
53
+ level: "mild",
54
+ ssimThreshold: 0.997,
55
+ allowFormats: ["webp-lossy", "webp-near"],
56
+ });
57
+ console.log("mild:", r.label, r.bytes, r.ssim.toFixed(5));
58
+ await fs.writeFile(`./out-mild.${r.format}`, r.buffer);
59
+
60
+ // 3) aggressive 档,若全不达标则回退到 SSIM 最大者
61
+ r = await compressImage(input, { level: "aggressive", fallbackToBestSSIM: true });
62
+ console.log("aggressive:", r.label, r.bytes, r.ssim.toFixed(5));
63
+ await fs.writeFile(`./out-aggr.${r.format}`, r.buffer);
64
+ })();
65
+ */
66
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/plugins/compress-images/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;AAElE,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC,CAAC;IAClE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAqBD;;GAEG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,cAAc,CAAC,CAqCzB;AAiJD,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EAAE,EAChB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,cAAc,EAAE,CAAC,CAO3B;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;EAyBE"}
@@ -0,0 +1,8 @@
1
+ import { OptimizePlugin } from '../types';
2
+ export declare function getAvailablePlugins(): OptimizePlugin[];
3
+ export declare function getPluginByName(name: string): OptimizePlugin | undefined;
4
+ /**
5
+ * @deprecated Use plugin groups from presets/plugin-groups.ts instead
6
+ */
7
+ export declare function getPluginsByCategory(_category: 'safe' | 'lossy' | 'advanced'): OptimizePlugin[];
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAgB1C,wBAAgB,mBAAmB,IAAI,cAAc,EAAE,CAEtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAExE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,cAAc,EAAE,CAG/F"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Lottie JSON 精简算法
3
+ * 删除冗余数据,降低精度,压缩体积
4
+ */
5
+ import { LottieData } from '../../types';
6
+ import { MinifyJsonOptions, MinifyJsonResult } from './types';
7
+ /**
8
+ * 精简 Lottie JSON
9
+ * @param input 原始 Lottie 对象
10
+ * @param options 配置选项
11
+ * @returns 精简结果
12
+ */
13
+ export declare function minifyLottieJson(input: LottieData, options?: MinifyJsonOptions): MinifyJsonResult;
14
+ export default minifyLottieJson;
15
+ //# sourceMappingURL=algorithm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"algorithm.d.ts","sourceRoot":"","sources":["../../../../src/plugins/minify-json/algorithm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAA6C,MAAM,SAAS,CAAC;AA4azG;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CA6FrG;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Lottie JSON 精简插件
3
+ * 删除元数据、降低精度、压缩体积
4
+ */
5
+ import { OptimizePlugin } from '../../types';
6
+ export { minifyLottieJson } from './algorithm';
7
+ export * from './types';
8
+ export declare const minifyJsonPlugin: OptimizePlugin;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/minify-json/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAA2C,MAAM,aAAa,CAAC;AAMtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,cAAc,SAAS,CAAC;AAGxB,eAAO,MAAM,gBAAgB,EAAE,cAoE9B,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Lottie JSON 精简插件类型定义
3
+ */
4
+ import { LottieData, BasePluginOptions, BasePluginStats, BasePluginResult } from '../../types';
5
+ export interface LottieLayer {
6
+ ind?: number;
7
+ [k: string]: any;
8
+ }
9
+ export interface LottieAsset {
10
+ id?: string;
11
+ layers?: LottieLayer[];
12
+ [k: string]: any;
13
+ }
14
+ export interface MinifyJsonOptions extends BasePluginOptions {
15
+ keepMatchName?: boolean;
16
+ keepIds?: boolean;
17
+ mergeNearbyNumbers?: boolean;
18
+ markTiny?: boolean | number;
19
+ precisionTargetKeys?: string[];
20
+ frameKeyDigits?: number;
21
+ normalKeyDigits?: number;
22
+ mergeStep?: number;
23
+ colorQuantizePrecision?: number;
24
+ roundThreshold?: number;
25
+ removeMetadataKeys?: boolean;
26
+ enableGlobalPrecision?: boolean;
27
+ globalMaxDecimals?: number;
28
+ compressNames?: boolean;
29
+ removeDefaultValues?: boolean;
30
+ customMetadataKeys?: string[];
31
+ customDefaultValues?: Record<string, any>;
32
+ }
33
+ export interface MinifyJsonStats extends BasePluginStats {
34
+ originalSize: number;
35
+ minifiedSize: number;
36
+ compressionRatio: number;
37
+ savedBytes: number;
38
+ layersProcessed: number;
39
+ assetsProcessed: number;
40
+ idsShortened: number;
41
+ numbersPrecisionReduced: number;
42
+ attributesRemoved: number;
43
+ nearbyNumbersMerged: number;
44
+ missingIndicesFixed: number;
45
+ metadataKeysRemoved: number;
46
+ globalPrecisionProcessed: number;
47
+ namesCompressed: number;
48
+ defaultValuesRemoved: number;
49
+ hiddenFalseRemoved: number;
50
+ }
51
+ export interface MinifyJsonResult extends BasePluginResult<LottieData, MinifyJsonStats> {
52
+ data: LottieData;
53
+ stats: MinifyJsonStats;
54
+ }
55
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3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D,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wBAAwB,EAAE,MAAM,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,CAAC,UAAU,EAAE,eAAe,CAAC;IACrF,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,eAAe,CAAC;CACxB"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 核心算法 - remove-unused-assets 插件
3
+ *
4
+ * 使用 BFS 广度优先搜索进行闭包式遍历,安全地找出所有被引用的资产。
5
+ */
6
+ import { LottieData } from '../../types';
7
+ import { RemoveUnusedAssetsOptions, RemoveUnusedAssetsResult } from './types';
8
+ /**
9
+ * Compute a stable list of all layers reachable from top-level layers by
10
+ * following precomp assets' `layers` fields.
11
+ */
12
+ export declare function computeReferencedAssetIds(json: LottieData, opts: RemoveUnusedAssetsOptions): {
13
+ used: Set<string>;
14
+ unknownRefs: Set<string>;
15
+ };
16
+ /**
17
+ * Remove unreferenced assets by computing the transitive closure of references.
18
+ */
19
+ export declare function removeUnusedAssets(input: LottieData, options?: RemoveUnusedAssetsOptions): RemoveUnusedAssetsResult;
20
+ //# sourceMappingURL=algorithm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"algorithm.d.ts","sourceRoot":"","sources":["../../../../src/plugins/remove-unused-assets/algorithm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAGL,yBAAyB,EACzB,wBAAwB,EAEzB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,yBAAyB,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAsDjD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,CAsG1B"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * remove-unused-assets 插件入口
3
+ *
4
+ * Remove assets in a Lottie JSON that are not (transitively) referenced
5
+ * by any layer (including nested precomps). Uses a closure/BFS traversal.
6
+ *
7
+ * Safe-by-default:
8
+ * - Does not mutate the input object.
9
+ * - Skips deletion for assets without `id` (kept to be conservative).
10
+ * - Detects cycles in precomps to avoid infinite loops (rare but guarded).
11
+ *
12
+ * Author: lottie-opt
13
+ */
14
+ import { OptimizePlugin } from '../../types';
15
+ export { removeUnusedAssets } from './algorithm';
16
+ export * from './types';
17
+ export declare const removeUnusedAssetsPlugin: OptimizePlugin;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/remove-unused-assets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,cAAc,EAA2C,MAAM,aAAa,CAAC;AAMtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,cAAc,SAAS,CAAC;AAGxB,eAAO,MAAM,wBAAwB,EAAE,cAkCtC,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * 类型定义 - remove-unused-assets 插件
3
+ */
4
+ import { LottieData } from '../../types';
5
+ type AnyObj = Record<string, any>;
6
+ export interface LottieLayer extends AnyObj {
7
+ ty?: number;
8
+ refId?: string;
9
+ }
10
+ export interface LottieAsset extends AnyObj {
11
+ id?: string;
12
+ layers?: LottieLayer[];
13
+ u?: string;
14
+ p?: string;
15
+ e?: boolean | number;
16
+ }
17
+ export interface RemoveUnusedAssetsOptions {
18
+ /**
19
+ * IDs that must be preserved even if unreferenced.
20
+ * Useful when your runtime code loads certain precomps/images by ID/name.
21
+ */
22
+ preserveAssetIds?: string[];
23
+ /**
24
+ * If true, keep all assets that don't have an `id` field (safer).
25
+ * Default: true
26
+ */
27
+ keepAssetsWithoutId?: boolean;
28
+ /**
29
+ * If true, keep all precomp assets even if currently unreferenced.
30
+ * (Sometimes teams like to ship reusable precomps for later composition.)
31
+ * Default: false
32
+ */
33
+ keepUnreferencedPrecomps?: boolean;
34
+ /**
35
+ * Optional logger for diagnostics.
36
+ */
37
+ onLog?: (msg: string) => void;
38
+ }
39
+ export interface RemoveUnusedAssetsStats {
40
+ originalAssetCount: number;
41
+ keptAssetCount: number;
42
+ removedAssetCount: number;
43
+ unknownRefIds: string[];
44
+ referencedAssetIds: string[];
45
+ removedAssetIds: string[];
46
+ }
47
+ export interface RemoveUnusedAssetsResult {
48
+ data: LottieData;
49
+ stats: RemoveUnusedAssetsStats;
50
+ }
51
+ export {};
52
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/plugins/remove-unused-assets/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAElC,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAEhB;AAED,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAEtB;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,uBAAuB,CAAC;CAChC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 核心算法 - simplify-paths 插件
3
+ *
4
+ * Lottie shape path simplifier with:
5
+ * - Safe default: only simplify STATIC paths (a === 0)
6
+ * - Optional "animated-consistent" mode: remove common vertices across ALL frames,
7
+ * recompute cubic handles consistently per frame (Catmull-Rom → Bezier),
8
+ * guaranteeing identical vertex count/order across frames.
9
+ *
10
+ * Algorithms:
11
+ * - Ramer–Douglas–Peucker (RDP) on vertex polyline (v[]), with corner preservation
12
+ * - Catmull-Rom based handle regeneration to keep smoothness after vertex removal
13
+ * - Error check by curve sampling; fallback to original path if error > tolerance
14
+ */
15
+ import { LottieJSON, SimplifyPathsOptions, SimplifyPathsResult } from './types';
16
+ export declare function simplifyPaths(input: LottieJSON, options?: SimplifyPathsOptions): SimplifyPathsResult;
17
+ //# sourceMappingURL=algorithm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"algorithm.d.ts","sourceRoot":"","sources":["../../../../src/plugins/simplify-paths/algorithm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEL,UAAU,EAIV,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AA0ajB,wBAAgB,aAAa,CAC3B,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CA0ErB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * simplify-paths 插件入口
3
+ *
4
+ * Lottie shape path simplifier with:
5
+ * - Safe default: only simplify STATIC paths (a === 0)
6
+ * - Optional "animated-consistent" mode: remove common vertices across ALL frames,
7
+ * recompute cubic handles consistently per frame (Catmull-Rom → Bezier),
8
+ * guaranteeing identical vertex count/order across frames.
9
+ *
10
+ * Author: lottie-opt
11
+ */
12
+ import { OptimizePlugin } from '../../types';
13
+ export { simplifyPaths } from './algorithm';
14
+ export * from './types';
15
+ export declare const simplifyPathsPlugin: OptimizePlugin;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/simplify-paths/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAA2C,MAAM,aAAa,CAAC;AAMtF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,mBAAmB,EAAE,cAkDjC,CAAC"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * 类型定义 - simplify-paths 插件
3
+ */
4
+ type AnyObj = Record<string, any>;
5
+ export type Vec2 = [number, number];
6
+ export interface LottieJSON extends AnyObj {
7
+ layers?: LottieLayer[];
8
+ }
9
+ export interface LottieLayer extends AnyObj {
10
+ ty?: number;
11
+ shapes?: LottieShapeItem[];
12
+ }
13
+ export type LottieShapeItem = ({
14
+ ty: "gr";
15
+ it?: LottieShapeItem[];
16
+ } & AnyObj) | ({
17
+ ty: "sh";
18
+ ks: PathKeyframeProp;
19
+ } & AnyObj) | AnyObj;
20
+ export interface PathKeyframeProp {
21
+ a: 0 | 1;
22
+ k: LottieShapePath | PathKeyframe[];
23
+ }
24
+ export interface PathKeyframe extends AnyObj {
25
+ t?: number;
26
+ s?: [LottieShapePath];
27
+ e?: [LottieShapePath];
28
+ h?: number;
29
+ }
30
+ export interface LottieShapePath {
31
+ v: Vec2[];
32
+ i: Vec2[];
33
+ o: Vec2[];
34
+ c: boolean;
35
+ }
36
+ export interface SimplifyPathsOptions {
37
+ /**
38
+ * "static-only" (default): only simplify a===0 paths (safest).
39
+ * "animated-consistent": simplify a===1 by removing the SAME indices across all frames.
40
+ * "all": do both.
41
+ */
42
+ mode?: "static-only" | "animated-consistent" | "all";
43
+ /**
44
+ * Tolerance for geometric error (pixels).
45
+ * If relativeTolerance=true, this is a fraction of the path bbox diagonal (e.g. 0.01 = 1%).
46
+ * Default: 1.0 px.
47
+ */
48
+ tolerance?: number;
49
+ /**
50
+ * Interpret tolerance as relative to bbox diagonal.
51
+ * Default: false (absolute pixels).
52
+ */
53
+ relativeTolerance?: boolean;
54
+ /**
55
+ * Minimal number of vertices to keep (per path).
56
+ * Default: 6 (reasonable for smooth closed shapes).
57
+ */
58
+ minPoints?: number;
59
+ /**
60
+ * Preserve "corner" vertices (sharp angle) from removal.
61
+ * Default: true.
62
+ */
63
+ preserveCorners?: boolean;
64
+ /**
65
+ * Corner angle threshold in degrees (smaller = sharper corner).
66
+ * Default: 150 deg (keep angles sharper than this).
67
+ */
68
+ cornerAngleDeg?: number;
69
+ /**
70
+ * RDP simplification only (we implement RDP; "visvalingam" ignored).
71
+ */
72
+ algorithm?: "rdp";
73
+ /**
74
+ * Samples per segment for error checking.
75
+ * Default: 10.
76
+ */
77
+ samplesPerSegment?: number;
78
+ /**
79
+ * Catmull-Rom → Bezier tension factor (1.0 is standard).
80
+ * Smaller gives tighter curves. Default: 1.0.
81
+ */
82
+ tension?: number;
83
+ /**
84
+ * Optional logger.
85
+ */
86
+ onLog?: (msg: string) => void;
87
+ }
88
+ export interface SimplifyPathsStats {
89
+ totalPaths: number;
90
+ simplifiedPaths: number;
91
+ staticSimplified: number;
92
+ animatedSimplified: number;
93
+ avgVertexReduction?: number;
94
+ warnings: string[];
95
+ }
96
+ export interface SimplifyPathsResult {
97
+ data: LottieJSON;
98
+ stats: SimplifyPathsStats;
99
+ }
100
+ export {};
101
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/plugins/simplify-paths/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAClC,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpC,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,eAAe,GACvB,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,EAAE,CAAC,EAAE,eAAe,EAAE,CAAA;CAAE,GAAG,MAAM,CAAC,GAC/C,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,gBAAgB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