@aicut/vue 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 +21 -0
- package/README.md +136 -0
- package/dist/Timeline.vue.d.ts +42 -0
- package/dist/Timeline.vue.d.ts.map +1 -0
- package/dist/VideoEditor.vue.d.ts +36 -0
- package/dist/VideoEditor.vue.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +117 -0
- package/dist/index.js.map +1 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ziqiang
|
|
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/README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# @aicut/vue
|
|
2
|
+
|
|
3
|
+
Vue 3 wrapper around **[@aicut/core](https://www.npmjs.com/package/@aicut/core)** — a canvas-rendered video editor component. Import the core stylesheet once and use it like any other Vue SFC.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pnpm add @aicut/vue @aicut/core
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { ref } from "vue";
|
|
14
|
+
import {
|
|
15
|
+
VideoEditor,
|
|
16
|
+
type EditorApi,
|
|
17
|
+
type Project,
|
|
18
|
+
} from "@aicut/vue";
|
|
19
|
+
import "@aicut/core/styles.css";
|
|
20
|
+
|
|
21
|
+
const project: Project = {
|
|
22
|
+
version: 1,
|
|
23
|
+
sources: [{ id: "s1", url: "/media/a.mp4", kind: "video", name: "a.mp4" }],
|
|
24
|
+
tracks: [
|
|
25
|
+
{ id: "t1", kind: "video", clips: [
|
|
26
|
+
{ id: "c1", sourceId: "s1", in: 0, out: 5000, start: 0 },
|
|
27
|
+
]},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const editor = ref<{ api(): EditorApi | null } | null>(null);
|
|
32
|
+
|
|
33
|
+
function save(p: Project) {
|
|
34
|
+
console.log("autosave", p);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function doExport(p: Project) {
|
|
38
|
+
await fetch("/api/export", {
|
|
39
|
+
method: "POST",
|
|
40
|
+
body: JSON.stringify({ project: p }),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<VideoEditor
|
|
47
|
+
ref="editor"
|
|
48
|
+
:default-project="project"
|
|
49
|
+
@change="save"
|
|
50
|
+
@export="doExport"
|
|
51
|
+
style="height: 600px"
|
|
52
|
+
/>
|
|
53
|
+
</template>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The component is **uncontrolled for project state**. Restore later with `editor.value?.api()?.setProject(saved)`.
|
|
57
|
+
|
|
58
|
+
## Props
|
|
59
|
+
|
|
60
|
+
| Prop | Type | Notes |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| `defaultProject` | `Project` | Initial project. Read once on mount. |
|
|
63
|
+
| `theme` | `Theme` | CSS variable overrides. Reactive. |
|
|
64
|
+
| `locale` | `Partial<Locale>` | UI strings. English by default; pass `localeZh` for Chinese. Reactive. |
|
|
65
|
+
|
|
66
|
+
## Events
|
|
67
|
+
|
|
68
|
+
| Event | Payload |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `ready` | `(api: EditorApi)` |
|
|
71
|
+
| `change` | `(project: Project)` |
|
|
72
|
+
| `export` | `(project: Project)` — fired by `api.requestExport()` |
|
|
73
|
+
| `time-update` | `(timeMs: number)` |
|
|
74
|
+
| `play` / `pause` | `()` |
|
|
75
|
+
| `selection-change` | `(clipId: string \| null)` |
|
|
76
|
+
| `error` | `(error: Error)` |
|
|
77
|
+
|
|
78
|
+
The exposed `api()` returns the same `EditorApi` instance described in [`@aicut/core`](https://www.npmjs.com/package/@aicut/core) — `play`, `pause`, `seek`, `split`, `setProject`, `requestExport`, `setTheme`, `setLocale`, the lot.
|
|
79
|
+
|
|
80
|
+
## Theming
|
|
81
|
+
|
|
82
|
+
```vue
|
|
83
|
+
<VideoEditor
|
|
84
|
+
:theme="{
|
|
85
|
+
controlsBg: '#f6f6f8',
|
|
86
|
+
controlsText: 'rgba(0, 0, 0, 0.78)',
|
|
87
|
+
controlsBorder: 'rgba(0, 0, 0, 0.08)',
|
|
88
|
+
controlsHover: 'rgba(0, 0, 0, 0.06)',
|
|
89
|
+
controlsActive: 'rgba(0, 0, 0, 0.08)',
|
|
90
|
+
previewBg: '#e4e4e7',
|
|
91
|
+
}"
|
|
92
|
+
/* … */
|
|
93
|
+
/>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The `theme` prop is reactive — swap the binding and the editor calls `setTheme` internally.
|
|
97
|
+
|
|
98
|
+
## i18n
|
|
99
|
+
|
|
100
|
+
```vue
|
|
101
|
+
<script setup lang="ts">
|
|
102
|
+
import { ref, computed } from "vue";
|
|
103
|
+
import { VideoEditor, localeEn, localeZh, type Locale } from "@aicut/vue";
|
|
104
|
+
|
|
105
|
+
const lang = ref<"en" | "zh">("en");
|
|
106
|
+
const locale = computed<Locale>(() => (lang.value === "zh" ? localeZh : localeEn));
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<template>
|
|
110
|
+
<VideoEditor :locale="locale" /* … */ />
|
|
111
|
+
</template>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Standalone `<Timeline>`
|
|
115
|
+
|
|
116
|
+
```vue
|
|
117
|
+
<script setup lang="ts">
|
|
118
|
+
import { ref } from "vue";
|
|
119
|
+
import { Timeline } from "@aicut/vue";
|
|
120
|
+
|
|
121
|
+
const picked = ref(0);
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<template>
|
|
125
|
+
<Timeline
|
|
126
|
+
:default-project="singleClipProject"
|
|
127
|
+
:show-header="false"
|
|
128
|
+
read-only
|
|
129
|
+
@seek="(ms) => (picked = ms)"
|
|
130
|
+
/>
|
|
131
|
+
</template>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Timeline as CoreTimeline, type Clip, type Locale, type Ms, type Project } from "@aicut/core";
|
|
2
|
+
/**
|
|
3
|
+
* Standalone canvas Timeline wrapped for Vue 3. Same surface as the
|
|
4
|
+
* React `<Timeline>`: pass `defaultProject`, drive imperatively via
|
|
5
|
+
* the exposed `api()` ref.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
defaultProject: Project;
|
|
9
|
+
defaultScale?: number;
|
|
10
|
+
defaultTime?: Ms;
|
|
11
|
+
defaultSelectedClipId?: string | null;
|
|
12
|
+
showHeader?: boolean;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
snap?: boolean;
|
|
15
|
+
autoFit?: boolean;
|
|
16
|
+
locale?: Partial<Locale>;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
19
|
+
api: () => CoreTimeline | null;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
21
|
+
seek: (timeMs: number) => any;
|
|
22
|
+
selectClip: (clipId: string | null) => any;
|
|
23
|
+
scaleChange: (pxPerSec: number) => any;
|
|
24
|
+
moveClip: (clipId: string, opts: {
|
|
25
|
+
start?: Ms;
|
|
26
|
+
trackId?: string;
|
|
27
|
+
}) => any;
|
|
28
|
+
resizeClip: (clipId: string, edits: Partial<Pick<Clip, "in" | "out" | "start">>) => any;
|
|
29
|
+
change: (project: Project) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onSeek?: ((timeMs: number) => any) | undefined;
|
|
32
|
+
onSelectClip?: ((clipId: string | null) => any) | undefined;
|
|
33
|
+
onScaleChange?: ((pxPerSec: number) => any) | undefined;
|
|
34
|
+
onMoveClip?: ((clipId: string, opts: {
|
|
35
|
+
start?: Ms;
|
|
36
|
+
trackId?: string;
|
|
37
|
+
}) => any) | undefined;
|
|
38
|
+
onResizeClip?: ((clipId: string, edits: Partial<Pick<Clip, "in" | "out" | "start">>) => any) | undefined;
|
|
39
|
+
onChange?: ((project: Project) => any) | undefined;
|
|
40
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
export default _default;
|
|
42
|
+
//# sourceMappingURL=Timeline.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.vue.d.ts","sourceRoot":"","sources":["../src/Timeline.vue"],"names":[],"mappings":"AAwFA,OAAO,EACL,QAAQ,IAAI,YAAY,EACxB,KAAK,IAAI,EACT,KAAK,MAAM,EACX,KAAK,EAAE,EACP,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,EAAE,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;;eAuDS,YAAY,GAAG,IAAI;;;;;;gBAhDoB,EAAE;kBAAY,MAAM;;;;;;;;;gBAApB,EAAE;kBAAY,MAAM;;;;;AAwFtE,wBAQG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type EditorApi, type Locale, type Project, type Theme } from "@aicut/core";
|
|
2
|
+
/**
|
|
3
|
+
* Vue 3 wrapper around `@aicut/core`. Same shape as `@aicut/react`:
|
|
4
|
+
* uncontrolled for project state, theme is reactive, API exposed via
|
|
5
|
+
* `defineExpose` so a parent `ref` can call cut/seek/setProject/etc.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
defaultProject?: Project;
|
|
9
|
+
theme?: Theme;
|
|
10
|
+
/** UI string overrides (English default). Reactive — swap to `localeZh` for Chinese. */
|
|
11
|
+
locale?: Partial<Locale>;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
14
|
+
/** Returns the underlying core API or null if not yet mounted. */
|
|
15
|
+
api: () => EditorApi | null;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
|
+
change: (project: Project) => any;
|
|
18
|
+
ready: (api: EditorApi) => any;
|
|
19
|
+
export: (project: Project) => any;
|
|
20
|
+
timeUpdate: (timeMs: number) => any;
|
|
21
|
+
play: () => any;
|
|
22
|
+
pause: () => any;
|
|
23
|
+
selectionChange: (clipId: string | null) => any;
|
|
24
|
+
error: (error: Error) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
onChange?: ((project: Project) => any) | undefined;
|
|
27
|
+
onReady?: ((api: EditorApi) => any) | undefined;
|
|
28
|
+
onExport?: ((project: Project) => any) | undefined;
|
|
29
|
+
onTimeUpdate?: ((timeMs: number) => any) | undefined;
|
|
30
|
+
onPlay?: (() => any) | undefined;
|
|
31
|
+
onPause?: (() => any) | undefined;
|
|
32
|
+
onSelectionChange?: ((clipId: string | null) => any) | undefined;
|
|
33
|
+
onError?: ((error: Error) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=VideoEditor.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoEditor.vue.d.ts","sourceRoot":"","sources":["../src/VideoEditor.vue"],"names":[],"mappings":"AA+FA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,MAAM,EAEX,KAAK,OAAO,EACZ,KAAK,KAAK,EACX,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,KAAK,WAAW,GAAG;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,wFAAwF;IACxF,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;;IAiEA,kEAAkE;eACzD,SAAS,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;AAuC3B,wBAQG"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),c=require("@aicut/core"),u=a.defineComponent({__name:"VideoEditor",props:{defaultProject:{},theme:{},locale:{}},emits:["ready","change","export","timeUpdate","play","pause","selectionChange","error"],setup(i,{expose:s,emit:p}){const l=i,n=p,r=a.ref(null);let e=null;const o=[];return a.onMounted(()=>{r.value&&(e=c.Editor.create({container:r.value,project:l.defaultProject,theme:l.theme,locale:l.locale}),o.push(e.on("change",({project:t})=>n("change",t)),e.on("export",({project:t})=>n("export",t)),e.on("time",({timeMs:t})=>n("timeUpdate",t)),e.on("play",()=>n("play")),e.on("pause",()=>n("pause")),e.on("selectionChange",({clipId:t})=>n("selectionChange",t)),e.on("error",({error:t})=>n("error",t))),n("ready",e))}),a.watch(()=>l.theme,t=>{t&&e&&e.setTheme(t)}),a.watch(()=>l.locale,t=>{t&&e&&e.setLocale(t)}),a.onBeforeUnmount(()=>{for(const t of o)t();o.length=0,e==null||e.destroy(),e=null}),s({api:()=>e}),(t,f)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"host",ref:r,"data-aicut-host":""},null,512))}}),d=a.defineComponent({__name:"Timeline",props:{defaultProject:{},defaultScale:{},defaultTime:{},defaultSelectedClipId:{},showHeader:{type:Boolean},readOnly:{type:Boolean},snap:{type:Boolean},autoFit:{type:Boolean},locale:{}},emits:["seek","selectClip","scaleChange","moveClip","resizeClip","change"],setup(i,{expose:s,emit:p}){const l=i,n=p,r=a.ref(null);let e=null;return a.onMounted(()=>{r.value&&(e=c.Timeline.create({container:r.value,project:l.defaultProject,pxPerSec:l.defaultScale,time:l.defaultTime,selectedClipId:l.defaultSelectedClipId??null,showHeader:l.showHeader,readOnly:l.readOnly,snap:l.snap,autoFit:l.autoFit,locale:l.locale,onSeek:o=>n("seek",o),onSelectClip:o=>n("selectClip",o),onScaleChange:o=>n("scaleChange",o),onMoveClip:(o,t)=>n("moveClip",o,t),onResizeClip:(o,t)=>n("resizeClip",o,t),onChange:o=>n("change",o)}))}),a.watch(()=>l.locale,o=>{o&&e&&e.setLocale(o)}),a.onBeforeUnmount(()=>{e==null||e.destroy(),e=null}),s({api:()=>e}),(o,t)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"host",ref:r,"data-aicut-timeline-host":"",style:{width:"100%",height:"240px"}},null,512))}});Object.defineProperty(exports,"createEmptyProject",{enumerable:!0,get:()=>c.createEmptyProject});Object.defineProperty(exports,"createId",{enumerable:!0,get:()=>c.createId});Object.defineProperty(exports,"localeEn",{enumerable:!0,get:()=>c.localeEn});Object.defineProperty(exports,"localeZh",{enumerable:!0,get:()=>c.localeZh});exports.Timeline=d;exports.VideoEditor=u;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/VideoEditor.vue","../src/Timeline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport {\n Editor,\n type EditorApi,\n type Locale,\n type Ms,\n type Project,\n type Theme,\n} from \"@aicut/core\";\n\n/**\n * Vue 3 wrapper around `@aicut/core`. Same shape as `@aicut/react`:\n * uncontrolled for project state, theme is reactive, API exposed via\n * `defineExpose` so a parent `ref` can call cut/seek/setProject/etc.\n */\nconst props = defineProps<{\n defaultProject?: Project;\n theme?: Theme;\n /** UI string overrides (English default). Reactive — swap to `localeZh` for Chinese. */\n locale?: Partial<Locale>;\n}>();\n\nconst emit = defineEmits<{\n (e: \"ready\", api: EditorApi): void;\n (e: \"change\", project: Project): void;\n (e: \"export\", project: Project): void;\n (e: \"timeUpdate\", timeMs: Ms): void;\n (e: \"play\"): void;\n (e: \"pause\"): void;\n (e: \"selectionChange\", clipId: string | null): void;\n (e: \"error\", error: Error): void;\n}>();\n\nconst host = ref<HTMLDivElement | null>(null);\nlet editor: Editor | null = null;\nconst offs: Array<() => void> = [];\n\nonMounted(() => {\n if (!host.value) return;\n editor = Editor.create({\n container: host.value,\n project: props.defaultProject,\n theme: props.theme,\n locale: props.locale,\n });\n\n offs.push(\n editor.on(\"change\", ({ project }) => emit(\"change\", project)),\n editor.on(\"export\", ({ project }) => emit(\"export\", project)),\n editor.on(\"time\", ({ timeMs }) => emit(\"timeUpdate\", timeMs)),\n editor.on(\"play\", () => emit(\"play\")),\n editor.on(\"pause\", () => emit(\"pause\")),\n editor.on(\"selectionChange\", ({ clipId }) =>\n emit(\"selectionChange\", clipId),\n ),\n editor.on(\"error\", ({ error }) => emit(\"error\", error)),\n );\n\n emit(\"ready\", editor);\n});\n\nwatch(\n () => props.theme,\n (theme) => {\n if (theme && editor) editor.setTheme(theme);\n },\n);\n\nwatch(\n () => props.locale,\n (locale) => {\n if (locale && editor) editor.setLocale(locale);\n },\n);\n\nonBeforeUnmount(() => {\n for (const off of offs) off();\n offs.length = 0;\n editor?.destroy();\n editor = null;\n});\n\ndefineExpose({\n /** Returns the underlying core API or null if not yet mounted. */\n api: (): EditorApi | null => editor,\n});\n</script>\n\n<template>\n <div ref=\"host\" data-aicut-host=\"\" />\n</template>\n","<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport {\n Timeline as CoreTimeline,\n type Clip,\n type Locale,\n type Ms,\n type Project,\n} from \"@aicut/core\";\n\n/**\n * Standalone canvas Timeline wrapped for Vue 3. Same surface as the\n * React `<Timeline>`: pass `defaultProject`, drive imperatively via\n * the exposed `api()` ref.\n */\nconst props = defineProps<{\n defaultProject: Project;\n defaultScale?: number;\n defaultTime?: Ms;\n defaultSelectedClipId?: string | null;\n showHeader?: boolean;\n readOnly?: boolean;\n snap?: boolean;\n autoFit?: boolean;\n locale?: Partial<Locale>;\n}>();\n\nconst emit = defineEmits<{\n (e: \"seek\", timeMs: Ms): void;\n (e: \"selectClip\", clipId: string | null): void;\n (e: \"scaleChange\", pxPerSec: number): void;\n (e: \"moveClip\", clipId: string, opts: { start?: Ms; trackId?: string }): void;\n (\n e: \"resizeClip\",\n clipId: string,\n edits: Partial<Pick<Clip, \"in\" | \"out\" | \"start\">>,\n ): void;\n (e: \"change\", project: Project): void;\n}>();\n\nconst host = ref<HTMLDivElement | null>(null);\nlet timeline: CoreTimeline | null = null;\n\nonMounted(() => {\n if (!host.value) return;\n timeline = CoreTimeline.create({\n container: host.value,\n project: props.defaultProject,\n pxPerSec: props.defaultScale,\n time: props.defaultTime,\n selectedClipId: props.defaultSelectedClipId ?? null,\n showHeader: props.showHeader,\n readOnly: props.readOnly,\n snap: props.snap,\n autoFit: props.autoFit,\n locale: props.locale,\n onSeek: (t) => emit(\"seek\", t),\n onSelectClip: (id) => emit(\"selectClip\", id),\n onScaleChange: (s) => emit(\"scaleChange\", s),\n onMoveClip: (id, opts) => emit(\"moveClip\", id, opts),\n onResizeClip: (id, edits) => emit(\"resizeClip\", id, edits),\n onChange: (p) => emit(\"change\", p),\n });\n});\n\nwatch(\n () => props.locale,\n (locale) => {\n if (locale && timeline) timeline.setLocale(locale);\n },\n);\n\nonBeforeUnmount(() => {\n timeline?.destroy();\n timeline = null;\n});\n\ndefineExpose({\n api: (): CoreTimeline | null => timeline,\n});\n</script>\n\n<template>\n <div ref=\"host\" data-aicut-timeline-host=\"\" :style=\"{ width: '100%', height: '240px' }\" />\n</template>\n"],"names":["props","__props","emit","__emit","host","ref","editor","offs","onMounted","Editor","project","timeMs","clipId","error","watch","theme","locale","onBeforeUnmount","off","__expose","_createElementBlock","timeline","CoreTimeline","t","id","s","opts","edits","p"],"mappings":"0UAgBA,MAAMA,EAAQC,EAORC,EAAOC,EAWPC,EAAOC,EAAAA,IAA2B,IAAI,EAC5C,IAAIC,EAAwB,KAC5B,MAAMC,EAA0B,CAAA,EAEhCC,OAAAA,EAAAA,UAAU,IAAM,CACTJ,EAAK,QACVE,EAASG,EAAAA,OAAO,OAAO,CACrB,UAAWL,EAAK,MAChB,QAASJ,EAAM,eACf,MAAOA,EAAM,MACb,OAAQA,EAAM,MAAA,CACf,EAEDO,EAAK,KACHD,EAAO,GAAG,SAAU,CAAC,CAAE,QAAAI,KAAcR,EAAK,SAAUQ,CAAO,CAAC,EAC5DJ,EAAO,GAAG,SAAU,CAAC,CAAE,QAAAI,KAAcR,EAAK,SAAUQ,CAAO,CAAC,EAC5DJ,EAAO,GAAG,OAAQ,CAAC,CAAE,OAAAK,KAAaT,EAAK,aAAcS,CAAM,CAAC,EAC5DL,EAAO,GAAG,OAAQ,IAAMJ,EAAK,MAAM,CAAC,EACpCI,EAAO,GAAG,QAAS,IAAMJ,EAAK,OAAO,CAAC,EACtCI,EAAO,GAAG,kBAAmB,CAAC,CAAE,OAAAM,CAAA,IAC9BV,EAAK,kBAAmBU,CAAM,CAAA,EAEhCN,EAAO,GAAG,QAAS,CAAC,CAAE,MAAAO,KAAYX,EAAK,QAASW,CAAK,CAAC,CAAA,EAGxDX,EAAK,QAASI,CAAM,EACtB,CAAC,EAEDQ,EAAAA,MACE,IAAMd,EAAM,MACXe,GAAU,CACLA,GAAST,GAAQA,EAAO,SAASS,CAAK,CAC5C,CAAA,EAGFD,EAAAA,MACE,IAAMd,EAAM,OACXgB,GAAW,CACNA,GAAUV,GAAQA,EAAO,UAAUU,CAAM,CAC/C,CAAA,EAGFC,EAAAA,gBAAgB,IAAM,CACpB,UAAWC,KAAOX,EAAMW,EAAA,EACxBX,EAAK,OAAS,EACdD,GAAA,MAAAA,EAAQ,UACRA,EAAS,IACX,CAAC,EAEDa,EAAa,CAEX,IAAK,IAAwBb,CAAA,CAC9B,wBAICc,EAAAA,mBAAqC,MAAA,SAA5B,OAAJ,IAAIhB,EAAO,kBAAgB,EAAA,sVC3ElC,MAAMJ,EAAQC,EAYRC,EAAOC,EAaPC,EAAOC,EAAAA,IAA2B,IAAI,EAC5C,IAAIgB,EAAgC,KAEpCb,OAAAA,EAAAA,UAAU,IAAM,CACTJ,EAAK,QACViB,EAAWC,EAAAA,SAAa,OAAO,CAC7B,UAAWlB,EAAK,MAChB,QAASJ,EAAM,eACf,SAAUA,EAAM,aAChB,KAAMA,EAAM,YACZ,eAAgBA,EAAM,uBAAyB,KAC/C,WAAYA,EAAM,WAClB,SAAUA,EAAM,SAChB,KAAMA,EAAM,KACZ,QAASA,EAAM,QACf,OAAQA,EAAM,OACd,OAASuB,GAAMrB,EAAK,OAAQqB,CAAC,EAC7B,aAAeC,GAAOtB,EAAK,aAAcsB,CAAE,EAC3C,cAAgBC,GAAMvB,EAAK,cAAeuB,CAAC,EAC3C,WAAY,CAACD,EAAIE,IAASxB,EAAK,WAAYsB,EAAIE,CAAI,EACnD,aAAc,CAACF,EAAIG,IAAUzB,EAAK,aAAcsB,EAAIG,CAAK,EACzD,SAAWC,GAAM1B,EAAK,SAAU0B,CAAC,CAAA,CAClC,EACH,CAAC,EAEDd,EAAAA,MACE,IAAMd,EAAM,OACXgB,GAAW,CACNA,GAAUK,GAAUA,EAAS,UAAUL,CAAM,CACnD,CAAA,EAGFC,EAAAA,gBAAgB,IAAM,CACpBI,GAAA,MAAAA,EAAU,UACVA,EAAW,IACb,CAAC,EAEDF,EAAa,CACX,IAAK,IAA2BE,CAAA,CACjC,wBAICD,EAAAA,mBAA0F,MAAA,SAAjF,OAAJ,IAAIhB,EAAO,2BAAyB,GAAI,MAAO,CAAA,MAAA,OAAA,OAAA,OAAA,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as VideoEditor } from "./VideoEditor.vue";
|
|
2
|
+
export { default as Timeline } from "./Timeline.vue";
|
|
3
|
+
export type { Project, MediaSource, Track, Clip, Ms, Theme, EditorApi, TimelineOptions, Locale, } from "@aicut/core";
|
|
4
|
+
export { createEmptyProject, createId, localeEn, localeZh } from "@aicut/core";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EACV,OAAO,EACP,WAAW,EACX,KAAK,EACL,IAAI,EACJ,EAAE,EACF,KAAK,EACL,SAAS,EACT,eAAe,EACf,MAAM,GACP,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { defineComponent as p, ref as u, onMounted as d, watch as s, onBeforeUnmount as h, openBlock as m, createElementBlock as f } from "vue";
|
|
2
|
+
import { Editor as C, Timeline as y } from "@aicut/core";
|
|
3
|
+
import { createEmptyProject as B, createId as E, localeEn as P, localeZh as T } from "@aicut/core";
|
|
4
|
+
const v = /* @__PURE__ */ p({
|
|
5
|
+
__name: "VideoEditor",
|
|
6
|
+
props: {
|
|
7
|
+
defaultProject: {},
|
|
8
|
+
theme: {},
|
|
9
|
+
locale: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["ready", "change", "export", "timeUpdate", "play", "pause", "selectionChange", "error"],
|
|
12
|
+
setup(r, { expose: c, emit: i }) {
|
|
13
|
+
const l = r, a = i, n = u(null);
|
|
14
|
+
let e = null;
|
|
15
|
+
const o = [];
|
|
16
|
+
return d(() => {
|
|
17
|
+
n.value && (e = C.create({
|
|
18
|
+
container: n.value,
|
|
19
|
+
project: l.defaultProject,
|
|
20
|
+
theme: l.theme,
|
|
21
|
+
locale: l.locale
|
|
22
|
+
}), o.push(
|
|
23
|
+
e.on("change", ({ project: t }) => a("change", t)),
|
|
24
|
+
e.on("export", ({ project: t }) => a("export", t)),
|
|
25
|
+
e.on("time", ({ timeMs: t }) => a("timeUpdate", t)),
|
|
26
|
+
e.on("play", () => a("play")),
|
|
27
|
+
e.on("pause", () => a("pause")),
|
|
28
|
+
e.on(
|
|
29
|
+
"selectionChange",
|
|
30
|
+
({ clipId: t }) => a("selectionChange", t)
|
|
31
|
+
),
|
|
32
|
+
e.on("error", ({ error: t }) => a("error", t))
|
|
33
|
+
), a("ready", e));
|
|
34
|
+
}), s(
|
|
35
|
+
() => l.theme,
|
|
36
|
+
(t) => {
|
|
37
|
+
t && e && e.setTheme(t);
|
|
38
|
+
}
|
|
39
|
+
), s(
|
|
40
|
+
() => l.locale,
|
|
41
|
+
(t) => {
|
|
42
|
+
t && e && e.setLocale(t);
|
|
43
|
+
}
|
|
44
|
+
), h(() => {
|
|
45
|
+
for (const t of o) t();
|
|
46
|
+
o.length = 0, e == null || e.destroy(), e = null;
|
|
47
|
+
}), c({
|
|
48
|
+
/** Returns the underlying core API or null if not yet mounted. */
|
|
49
|
+
api: () => e
|
|
50
|
+
}), (t, g) => (m(), f("div", {
|
|
51
|
+
ref_key: "host",
|
|
52
|
+
ref: n,
|
|
53
|
+
"data-aicut-host": ""
|
|
54
|
+
}, null, 512));
|
|
55
|
+
}
|
|
56
|
+
}), S = /* @__PURE__ */ p({
|
|
57
|
+
__name: "Timeline",
|
|
58
|
+
props: {
|
|
59
|
+
defaultProject: {},
|
|
60
|
+
defaultScale: {},
|
|
61
|
+
defaultTime: {},
|
|
62
|
+
defaultSelectedClipId: {},
|
|
63
|
+
showHeader: { type: Boolean },
|
|
64
|
+
readOnly: { type: Boolean },
|
|
65
|
+
snap: { type: Boolean },
|
|
66
|
+
autoFit: { type: Boolean },
|
|
67
|
+
locale: {}
|
|
68
|
+
},
|
|
69
|
+
emits: ["seek", "selectClip", "scaleChange", "moveClip", "resizeClip", "change"],
|
|
70
|
+
setup(r, { expose: c, emit: i }) {
|
|
71
|
+
const l = r, a = i, n = u(null);
|
|
72
|
+
let e = null;
|
|
73
|
+
return d(() => {
|
|
74
|
+
n.value && (e = y.create({
|
|
75
|
+
container: n.value,
|
|
76
|
+
project: l.defaultProject,
|
|
77
|
+
pxPerSec: l.defaultScale,
|
|
78
|
+
time: l.defaultTime,
|
|
79
|
+
selectedClipId: l.defaultSelectedClipId ?? null,
|
|
80
|
+
showHeader: l.showHeader,
|
|
81
|
+
readOnly: l.readOnly,
|
|
82
|
+
snap: l.snap,
|
|
83
|
+
autoFit: l.autoFit,
|
|
84
|
+
locale: l.locale,
|
|
85
|
+
onSeek: (o) => a("seek", o),
|
|
86
|
+
onSelectClip: (o) => a("selectClip", o),
|
|
87
|
+
onScaleChange: (o) => a("scaleChange", o),
|
|
88
|
+
onMoveClip: (o, t) => a("moveClip", o, t),
|
|
89
|
+
onResizeClip: (o, t) => a("resizeClip", o, t),
|
|
90
|
+
onChange: (o) => a("change", o)
|
|
91
|
+
}));
|
|
92
|
+
}), s(
|
|
93
|
+
() => l.locale,
|
|
94
|
+
(o) => {
|
|
95
|
+
o && e && e.setLocale(o);
|
|
96
|
+
}
|
|
97
|
+
), h(() => {
|
|
98
|
+
e == null || e.destroy(), e = null;
|
|
99
|
+
}), c({
|
|
100
|
+
api: () => e
|
|
101
|
+
}), (o, t) => (m(), f("div", {
|
|
102
|
+
ref_key: "host",
|
|
103
|
+
ref: n,
|
|
104
|
+
"data-aicut-timeline-host": "",
|
|
105
|
+
style: { width: "100%", height: "240px" }
|
|
106
|
+
}, null, 512));
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export {
|
|
110
|
+
S as Timeline,
|
|
111
|
+
v as VideoEditor,
|
|
112
|
+
B as createEmptyProject,
|
|
113
|
+
E as createId,
|
|
114
|
+
P as localeEn,
|
|
115
|
+
T as localeZh
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/VideoEditor.vue","../src/Timeline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport {\n Editor,\n type EditorApi,\n type Locale,\n type Ms,\n type Project,\n type Theme,\n} from \"@aicut/core\";\n\n/**\n * Vue 3 wrapper around `@aicut/core`. Same shape as `@aicut/react`:\n * uncontrolled for project state, theme is reactive, API exposed via\n * `defineExpose` so a parent `ref` can call cut/seek/setProject/etc.\n */\nconst props = defineProps<{\n defaultProject?: Project;\n theme?: Theme;\n /** UI string overrides (English default). Reactive — swap to `localeZh` for Chinese. */\n locale?: Partial<Locale>;\n}>();\n\nconst emit = defineEmits<{\n (e: \"ready\", api: EditorApi): void;\n (e: \"change\", project: Project): void;\n (e: \"export\", project: Project): void;\n (e: \"timeUpdate\", timeMs: Ms): void;\n (e: \"play\"): void;\n (e: \"pause\"): void;\n (e: \"selectionChange\", clipId: string | null): void;\n (e: \"error\", error: Error): void;\n}>();\n\nconst host = ref<HTMLDivElement | null>(null);\nlet editor: Editor | null = null;\nconst offs: Array<() => void> = [];\n\nonMounted(() => {\n if (!host.value) return;\n editor = Editor.create({\n container: host.value,\n project: props.defaultProject,\n theme: props.theme,\n locale: props.locale,\n });\n\n offs.push(\n editor.on(\"change\", ({ project }) => emit(\"change\", project)),\n editor.on(\"export\", ({ project }) => emit(\"export\", project)),\n editor.on(\"time\", ({ timeMs }) => emit(\"timeUpdate\", timeMs)),\n editor.on(\"play\", () => emit(\"play\")),\n editor.on(\"pause\", () => emit(\"pause\")),\n editor.on(\"selectionChange\", ({ clipId }) =>\n emit(\"selectionChange\", clipId),\n ),\n editor.on(\"error\", ({ error }) => emit(\"error\", error)),\n );\n\n emit(\"ready\", editor);\n});\n\nwatch(\n () => props.theme,\n (theme) => {\n if (theme && editor) editor.setTheme(theme);\n },\n);\n\nwatch(\n () => props.locale,\n (locale) => {\n if (locale && editor) editor.setLocale(locale);\n },\n);\n\nonBeforeUnmount(() => {\n for (const off of offs) off();\n offs.length = 0;\n editor?.destroy();\n editor = null;\n});\n\ndefineExpose({\n /** Returns the underlying core API or null if not yet mounted. */\n api: (): EditorApi | null => editor,\n});\n</script>\n\n<template>\n <div ref=\"host\" data-aicut-host=\"\" />\n</template>\n","<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport {\n Timeline as CoreTimeline,\n type Clip,\n type Locale,\n type Ms,\n type Project,\n} from \"@aicut/core\";\n\n/**\n * Standalone canvas Timeline wrapped for Vue 3. Same surface as the\n * React `<Timeline>`: pass `defaultProject`, drive imperatively via\n * the exposed `api()` ref.\n */\nconst props = defineProps<{\n defaultProject: Project;\n defaultScale?: number;\n defaultTime?: Ms;\n defaultSelectedClipId?: string | null;\n showHeader?: boolean;\n readOnly?: boolean;\n snap?: boolean;\n autoFit?: boolean;\n locale?: Partial<Locale>;\n}>();\n\nconst emit = defineEmits<{\n (e: \"seek\", timeMs: Ms): void;\n (e: \"selectClip\", clipId: string | null): void;\n (e: \"scaleChange\", pxPerSec: number): void;\n (e: \"moveClip\", clipId: string, opts: { start?: Ms; trackId?: string }): void;\n (\n e: \"resizeClip\",\n clipId: string,\n edits: Partial<Pick<Clip, \"in\" | \"out\" | \"start\">>,\n ): void;\n (e: \"change\", project: Project): void;\n}>();\n\nconst host = ref<HTMLDivElement | null>(null);\nlet timeline: CoreTimeline | null = null;\n\nonMounted(() => {\n if (!host.value) return;\n timeline = CoreTimeline.create({\n container: host.value,\n project: props.defaultProject,\n pxPerSec: props.defaultScale,\n time: props.defaultTime,\n selectedClipId: props.defaultSelectedClipId ?? null,\n showHeader: props.showHeader,\n readOnly: props.readOnly,\n snap: props.snap,\n autoFit: props.autoFit,\n locale: props.locale,\n onSeek: (t) => emit(\"seek\", t),\n onSelectClip: (id) => emit(\"selectClip\", id),\n onScaleChange: (s) => emit(\"scaleChange\", s),\n onMoveClip: (id, opts) => emit(\"moveClip\", id, opts),\n onResizeClip: (id, edits) => emit(\"resizeClip\", id, edits),\n onChange: (p) => emit(\"change\", p),\n });\n});\n\nwatch(\n () => props.locale,\n (locale) => {\n if (locale && timeline) timeline.setLocale(locale);\n },\n);\n\nonBeforeUnmount(() => {\n timeline?.destroy();\n timeline = null;\n});\n\ndefineExpose({\n api: (): CoreTimeline | null => timeline,\n});\n</script>\n\n<template>\n <div ref=\"host\" data-aicut-timeline-host=\"\" :style=\"{ width: '100%', height: '240px' }\" />\n</template>\n"],"names":["props","__props","emit","__emit","host","ref","editor","offs","onMounted","Editor","project","timeMs","clipId","error","watch","theme","locale","onBeforeUnmount","off","__expose","_createElementBlock","timeline","CoreTimeline","t","id","s","opts","edits","p"],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aicut/vue",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vue 3 wrapper for the AiCut video editor — thin declarative shell over @aicut/core.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@aicut/core": "0.1.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"vue": "^3.4.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
29
|
+
"typescript": "^5.7.2",
|
|
30
|
+
"vite": "^6.0.3",
|
|
31
|
+
"vue": "^3.5.13",
|
|
32
|
+
"vue-tsc": "^2.1.10"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "vite build && vue-tsc --emitDeclarationOnly -p tsconfig.json --outDir dist",
|
|
39
|
+
"dev": "vite build --watch",
|
|
40
|
+
"typecheck": "vue-tsc --noEmit"
|
|
41
|
+
}
|
|
42
|
+
}
|