@bylqwjc/media-editor-video 1.0.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.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -0
  3. package/dist/chunk-EK7ODJWE.js +1 -0
  4. package/dist/index-CX2iAapm.d.ts +51 -0
  5. package/dist/index.d.ts +61 -0
  6. package/dist/index.js +2273 -0
  7. package/dist/lazy.d.ts +7 -0
  8. package/dist/lazy.js +1 -0
  9. package/dist/legacy.js +65 -0
  10. package/node_modules/@media-editor/client/LICENSE +21 -0
  11. package/node_modules/@media-editor/client/README.md +27 -0
  12. package/node_modules/@media-editor/client/dist/index.d.ts +24 -0
  13. package/node_modules/@media-editor/client/dist/index.js +1 -0
  14. package/node_modules/@media-editor/client/package.json +22 -0
  15. package/node_modules/@media-editor/core/LICENSE +21 -0
  16. package/node_modules/@media-editor/core/README.md +14 -0
  17. package/node_modules/@media-editor/core/dist/browser.d.ts +100 -0
  18. package/node_modules/@media-editor/core/dist/browser.js +3 -0
  19. package/node_modules/@media-editor/core/dist/chunk-MGKYVYOH.js +1 -0
  20. package/node_modules/@media-editor/core/dist/chunk-USY6UDGL.js +1 -0
  21. package/node_modules/@media-editor/core/dist/chunk-XCBM7P7N.js +1 -0
  22. package/node_modules/@media-editor/core/dist/engine.d.ts +359 -0
  23. package/node_modules/@media-editor/core/dist/engine.js +1 -0
  24. package/node_modules/@media-editor/core/dist/index.d.ts +264 -0
  25. package/node_modules/@media-editor/core/dist/index.js +1 -0
  26. package/node_modules/@media-editor/core/dist/platform-presets-B-o4C6uY.d.ts +80 -0
  27. package/node_modules/@media-editor/core/dist/state-B85vkf7_.d.ts +1027 -0
  28. package/node_modules/@media-editor/core/node_modules/zod/LICENSE +21 -0
  29. package/node_modules/@media-editor/core/node_modules/zod/README.md +208 -0
  30. package/node_modules/@media-editor/core/node_modules/zod/index.d.cts +4 -0
  31. package/node_modules/@media-editor/core/node_modules/zod/index.js +1 -0
  32. package/node_modules/@media-editor/core/node_modules/zod/package.json +74 -0
  33. package/node_modules/@media-editor/core/node_modules/zod/v3/ZodError.d.cts +164 -0
  34. package/node_modules/@media-editor/core/node_modules/zod/v3/ZodError.js +1 -0
  35. package/node_modules/@media-editor/core/node_modules/zod/v3/errors.d.cts +5 -0
  36. package/node_modules/@media-editor/core/node_modules/zod/v3/errors.js +1 -0
  37. package/node_modules/@media-editor/core/node_modules/zod/v3/external.d.cts +6 -0
  38. package/node_modules/@media-editor/core/node_modules/zod/v3/external.js +1 -0
  39. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  40. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/enumUtil.js +0 -0
  41. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  42. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/errorUtil.js +1 -0
  43. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  44. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/parseUtil.js +1 -0
  45. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  46. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/partialUtil.js +0 -0
  47. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  48. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/typeAliases.js +0 -0
  49. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/util.d.cts +85 -0
  50. package/node_modules/@media-editor/core/node_modules/zod/v3/helpers/util.js +1 -0
  51. package/node_modules/@media-editor/core/node_modules/zod/v3/index.d.cts +4 -0
  52. package/node_modules/@media-editor/core/node_modules/zod/v3/index.js +1 -0
  53. package/node_modules/@media-editor/core/node_modules/zod/v3/locales/en.d.cts +3 -0
  54. package/node_modules/@media-editor/core/node_modules/zod/v3/locales/en.js +1 -0
  55. package/node_modules/@media-editor/core/node_modules/zod/v3/standard-schema.d.cts +102 -0
  56. package/node_modules/@media-editor/core/node_modules/zod/v3/standard-schema.js +0 -0
  57. package/node_modules/@media-editor/core/node_modules/zod/v3/types.d.cts +1031 -0
  58. package/node_modules/@media-editor/core/node_modules/zod/v3/types.js +1 -0
  59. package/node_modules/@media-editor/core/package.json +34 -0
  60. package/package.json +33 -0
@@ -0,0 +1,80 @@
1
+ /**
2
+ * editor-core/i18n —— 编辑器文案字典(纯 TS,零框架依赖,Vue/React 壳共用)。
3
+ * key 规约(domain 扁平):tool.* tune.* overlay.* filter.* ratio.* act.* err.* tip.* msg.* lbl.* panel.* poster.* crop.*
4
+ * 插值:{name} 形式,tEditor 第三参传值。
5
+ * 单测保证所有 locale key 集合一致(Filerobot 内核覆盖键不在此,见 ImageEditor 的 FIE_* translations)。
6
+ */
7
+ type EditorLocale = 'zh' | 'en' | 'es' | 'zh-Hant';
8
+ declare const toHant: (value: string) => string;
9
+ declare const EDITOR_MESSAGES: Record<EditorLocale, Record<string, string>>;
10
+ /** 取文案;缺 key 兜底显示 key 本身;{name} 插值 */
11
+ declare function tEditor(locale: EditorLocale, key: string, vars?: Record<string, string | number>): string;
12
+
13
+ /**
14
+ * 内置平台发布目标表(SDK 自带默认值)。
15
+ * 原 SocialEcho 仓从 lib/ark-config.ts 的 PUBLISH_TARGETS 派生预设;为让 SDK 自包含、
16
+ * 去掉对宿主 ark-config 的硬依赖,这里内置编辑器预设真正用到的字段子集(15 行)。
17
+ * 宿主仍可调 buildPlatformPresets(自己的 targets) 注入,保持单一真值源。
18
+ */
19
+ interface PlatformTarget {
20
+ platform: string;
21
+ postType: string;
22
+ label: string;
23
+ shortLabel: string;
24
+ ratio: string;
25
+ imageSize: string;
26
+ videoRatio?: string;
27
+ videoResolution?: '720p' | '1080p';
28
+ }
29
+ /** 默认平台表(与原仓 PUBLISH_TARGETS 同步;升级宿主数据时复核) */
30
+ declare const DEFAULT_PLATFORM_TARGETS: PlatformTarget[];
31
+
32
+ /**
33
+ * 编辑器「平台 → 可选裁剪比例 / 输出尺寸」预设。
34
+ * 默认从内置 DEFAULT_PLATFORM_TARGETS 派生(SDK 自包含);
35
+ * 宿主可调 buildImagePlatformPresets/buildVideoSizePresets 传入自己的目标表保持单一真值源。
36
+ */
37
+
38
+ interface RatioPreset {
39
+ ratio: string;
40
+ value: number;
41
+ label: string;
42
+ }
43
+ declare function parseRatio(r: string): number;
44
+ /** 图片比例预设:精确 7 项(顺序即 UI 顺序) */
45
+ declare const IMAGE_RATIO_PRESETS: RatioPreset[];
46
+ /** 视频比例预设:精确 4 项(顺序即 UI 顺序) */
47
+ declare const VIDEO_RATIO_PRESETS: RatioPreset[];
48
+ interface VideoPlatformRatioPreset {
49
+ platform: string;
50
+ postType: string;
51
+ label: string;
52
+ ratio: string;
53
+ value: number;
54
+ }
55
+ /** 视频平台比例快捷入口:从目标表 videoRatio 派生,保留平台/类型,按 platform+type+ratio 去重 */
56
+ declare function buildVideoPlatformRatioPresets(targets?: PlatformTarget[]): VideoPlatformRatioPreset[];
57
+ declare const VIDEO_PLATFORM_RATIO_PRESETS: VideoPlatformRatioPreset[];
58
+ interface PlatformPreset {
59
+ platform: string;
60
+ label: string;
61
+ ratio: string;
62
+ value: number;
63
+ w: number;
64
+ h: number;
65
+ }
66
+ /** 每平台一条(优先 postType='post',否则取该平台首条);w/h 来自 imageSize */
67
+ declare function buildImagePlatformPresets(targets?: PlatformTarget[]): PlatformPreset[];
68
+ /** 默认图片平台预设(内置表派生) */
69
+ declare const IMAGE_PLATFORM_PRESETS: PlatformPreset[];
70
+ interface SizePreset {
71
+ label: string;
72
+ w: number;
73
+ h: number;
74
+ }
75
+ /** 视频输出尺寸预设:从目标表派生(平台标签 + 实际像素),按 w×h 去重 */
76
+ declare function buildVideoSizePresets(targets?: PlatformTarget[]): SizePreset[];
77
+ /** 默认视频尺寸预设(内置表派生) */
78
+ declare const VIDEO_SIZE_PRESETS: SizePreset[];
79
+
80
+ export { DEFAULT_PLATFORM_TARGETS as D, type EditorLocale as E, IMAGE_PLATFORM_PRESETS as I, type PlatformPreset as P, type RatioPreset as R, type SizePreset as S, VIDEO_PLATFORM_RATIO_PRESETS as V, EDITOR_MESSAGES as a, IMAGE_RATIO_PRESETS as b, type PlatformTarget as c, VIDEO_RATIO_PRESETS as d, VIDEO_SIZE_PRESETS as e, type VideoPlatformRatioPreset as f, buildImagePlatformPresets as g, buildVideoPlatformRatioPresets as h, buildVideoSizePresets as i, toHant as j, parseRatio as p, tEditor as t };