{"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 AspectRatio,\n  type EditorApi,\n  type Locale,\n  type Ms,\n  type PlaybackEngineFactory,\n  type PreviewLayout,\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   * Initial-only factory for a custom playback engine. Defaults to the\n   * built-in `HtmlVideoEngine`. Pass `WebCodecsEngine` (v0.6+) or your\n   * own engine to override. Bound at mount; later prop changes are\n   * ignored.\n   */\n  playbackEngine?: PlaybackEngineFactory;\n  /**\n   * Initial-only — pixel height of each track row (default 56). Lower\n   * values (~32–40) shrink the timeline for small viewports. Applied\n   * process-wide at construction time.\n   */\n  trackHeight?: number;\n  /** Initial-only — pixel height of the timeline ruler (default 24). */\n  rulerHeight?: number;\n  /**\n   * Pixel height of the whole bottom timeline area (default 240).\n   * Reactive — swap any time to recompact. The canvas inside fills\n   * 100% and shows an internal scrollbar when track count overflows.\n   */\n  timelineHeight?: number;\n  /**\n   * Per-clip keyframe animation (X / Y / Scale). Reactive — set\n   * `{ enabled: true }` to surface keyframe diamonds on the timeline\n   * and route the canvas-based engines through the transform pipeline.\n   * Data is preserved when disabled.\n   */\n  keyframes?: { enabled?: boolean };\n  /**\n   * Jump-to-clip-edge toolbar cluster (|◀ ▶|) + I/O keyboard shortcuts.\n   * Reactive — set `{ enabled: true }` to surface the buttons next to\n   * the keyframe diamond and bind the shortcuts. Off hides the buttons\n   * entirely (no toolbar space cost).\n   */\n  clipEdgeNav?: { enabled?: boolean };\n  /**\n   * Dashed outline of the output canvas on top of the preview.\n   * Defaults to `{ enabled: true }` — purely visual. Set\n   * `{ enabled: false }` to hide it entirely. Independent of\n   * `keyframes`; when keyframes mode is also on the frame body\n   * becomes draggable and grows corner scale handles.\n   */\n  previewFrame?: { enabled?: boolean };\n  /**\n   * Multi-track picture-in-picture compositing in the preview. Off\n   * by default. Reactive — set `{ enabled: true }` to composite\n   * every video track's active clip with track `0` on top. Audio\n   * policy: only top track unmuted; lower tracks mute.\n   */\n  pictureInPicture?: { enabled?: boolean; toolbarAdd?: boolean };\n  /**\n   * Built-in aspect-ratio picker (CapCut-style 比例 dropdown). Reactive\n   * — set `{ enabled: true }` to surface the chip at the left of the\n   * toolbar. Listen for `aspectChange` to drive your preview letterbox\n   * / export defaults.\n   */\n  aspect?: { enabled?: boolean };\n  /**\n   * Picks how the preview area sits in the row below the header.\n   * `\"centered\"` (default) pins it to the middle third (CapCut-desktop\n   * style) with `panelLeft` / `panelRight` slots flanking it.\n   * `\"fullWidth\"` spans the row with no side columns. Reactive.\n   */\n  previewLayout?: PreviewLayout;\n  /**\n   * Minimum pixel gap between timeline ruler major ticks. Default 80;\n   * lower (~50) packs labels denser, higher (~140) spaces them out.\n   * Reactive — change anytime to retune density.\n   */\n  rulerMinTickPx?: number;\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  (\n    e: \"keyframeSelectionChange\",\n    target: { clipId: string; keyframeId: string } | null,\n  ): void;\n  (e: \"aspectChange\", aspect: AspectRatio | null): void;\n  (e: \"pictureInPictureAddRequested\"): 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/** Header slot DOM nodes — set after editor mount so Vue Teleports\n *  have a valid target. Library renders nothing here; named slots\n *  `#headerLeft` / `#headerRight` portal whatever the host provides. */\nconst headerLeftSlot = ref<HTMLElement | null>(null);\nconst headerRightSlot = ref<HTMLElement | null>(null);\n/** Side-panel slot DOM nodes — visible only when\n *  `previewLayout === \"centered\"`. */\nconst panelLeftSlot = ref<HTMLElement | null>(null);\nconst panelRightSlot = ref<HTMLElement | null>(null);\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    playbackEngine: props.playbackEngine,\n    ...(props.trackHeight != null ? { trackHeight: props.trackHeight } : {}),\n    ...(props.rulerHeight != null ? { rulerHeight: props.rulerHeight } : {}),\n    ...(props.timelineHeight != null\n      ? { timelineHeight: props.timelineHeight }\n      : {}),\n    ...(props.keyframes != null ? { keyframes: props.keyframes } : {}),\n    ...(props.clipEdgeNav != null ? { clipEdgeNav: props.clipEdgeNav } : {}),\n    ...(props.previewFrame != null\n      ? { previewFrame: props.previewFrame }\n      : {}),\n    ...(props.pictureInPicture != null\n      ? { pictureInPicture: props.pictureInPicture }\n      : {}),\n    ...(props.aspect != null ? { aspect: props.aspect } : {}),\n    ...(props.previewLayout != null\n      ? { previewLayout: props.previewLayout }\n      : {}),\n    ...(props.rulerMinTickPx != null\n      ? { rulerMinTickPx: props.rulerMinTickPx }\n      : {}),\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(\"keyframeSelectionChange\", ({ target }) =>\n      emit(\"keyframeSelectionChange\", target),\n    ),\n    editor.on(\"aspectChange\", ({ aspect }) => emit(\"aspectChange\", aspect)),\n    editor.on(\"requestPictureInPictureAdd\", () =>\n      emit(\"pictureInPictureAddRequested\"),\n    ),\n    editor.on(\"error\", ({ error }) => emit(\"error\", error)),\n  );\n\n  headerLeftSlot.value = editor.headerLeft;\n  headerRightSlot.value = editor.headerRight;\n  panelLeftSlot.value = editor.panelLeft;\n  panelRightSlot.value = editor.panelRight;\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\n// Reactive — flip keyframe mode without remount. Data preserved.\nwatch(\n  () => props.keyframes?.enabled,\n  (enabled) => {\n    if (!editor) return;\n    const desired = enabled === true;\n    if (editor.isKeyframesEnabled() !== desired) {\n      editor.setKeyframesEnabled(desired);\n    }\n  },\n);\n\n// Reactive — flip clip-edge nav cluster (|◀ ▶|) + I/O shortcuts.\nwatch(\n  () => props.clipEdgeNav?.enabled,\n  (enabled) => {\n    if (!editor) return;\n    const desired = enabled === true;\n    if (editor.isClipEdgeNavEnabled() !== desired) {\n      editor.setClipEdgeNavEnabled(desired);\n    }\n  },\n);\n\n// Reactive — flip the dashed output-frame outline.\nwatch(\n  () => props.previewFrame?.enabled,\n  (enabled) => {\n    if (!editor) return;\n    const desired = enabled !== false;\n    if (editor.isPreviewFrameEnabled() !== desired) {\n      editor.setPreviewFrameEnabled(desired);\n    }\n  },\n);\n\n// Reactive — flip multi-track PiP compositing.\nwatch(\n  () => props.pictureInPicture?.enabled,\n  (enabled) => {\n    if (!editor) return;\n    const desired = enabled === true;\n    if (editor.isPictureInPictureEnabled() !== desired) {\n      editor.setPictureInPictureEnabled(desired);\n    }\n  },\n);\n\n// Reactive — flip built-in aspect picker visibility.\nwatch(\n  () => props.aspect?.enabled,\n  (enabled) => {\n    if (!editor) return;\n    const desired = enabled === true;\n    if (editor.isAspectEnabled() !== desired) {\n      editor.setAspectEnabled(desired);\n    }\n  },\n);\n\n// Reactive — swap preview layout (fullWidth ↔ centered).\nwatch(\n  () => props.previewLayout,\n  (layout) => {\n    if (!editor || layout == null) return;\n    if (editor.getPreviewLayout() !== layout) {\n      editor.setPreviewLayout(layout);\n    }\n  },\n);\n\nwatch(\n  () => props.rulerMinTickPx,\n  (px) => {\n    if (!editor || px == null) return;\n    if (editor.getRulerMinTickPx() !== px) editor.setRulerMinTickPx(px);\n  },\n);\n\n// Reactive — sets the CSS custom property directly so the timeline\n// height can be tweaked without remounting.\nwatch(\n  () => props.timelineHeight,\n  (timelineHeight) => {\n    const root = host.value;\n    if (!root) return;\n    if (timelineHeight != null && timelineHeight > 0) {\n      root.style.setProperty(\n        \"--aicut-timeline-height\",\n        `${Math.round(timelineHeight)}px`,\n      );\n    } else {\n      root.style.removeProperty(\"--aicut-timeline-height\");\n    }\n  },\n);\n\nonBeforeUnmount(() => {\n  for (const off of offs) off();\n  offs.length = 0;\n  editor?.destroy();\n  editor = null;\n  headerLeftSlot.value = null;\n  headerRightSlot.value = null;\n  panelLeftSlot.value = null;\n  panelRightSlot.value = 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    <Teleport v-if=\"headerLeftSlot\" :to=\"headerLeftSlot\">\n      <slot name=\"headerLeft\" />\n    </Teleport>\n    <Teleport v-if=\"headerRightSlot\" :to=\"headerRightSlot\">\n      <slot name=\"headerRight\" />\n    </Teleport>\n    <Teleport v-if=\"panelLeftSlot\" :to=\"panelLeftSlot\">\n      <slot name=\"panelLeft\" />\n    </Teleport>\n    <Teleport v-if=\"panelRightSlot\" :to=\"panelRightSlot\">\n      <slot name=\"panelRight\" />\n    </Teleport>\n  </div>\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","headerLeftSlot","headerRightSlot","panelLeftSlot","panelRightSlot","onMounted","Editor","project","timeMs","clipId","target","aspect","error","watch","theme","locale","_a","enabled","desired","layout","px","timelineHeight","root","onBeforeUnmount","off","__expose","_createElementBlock","_createBlock","_Teleport","_renderSlot","_ctx","timeline","CoreTimeline","t","id","s","opts","edits","p"],"mappings":"8kBAmBA,MAAMA,EAAQC,EA6ERC,EAAOC,EAiBPC,EAAOC,EAAAA,IAA2B,IAAI,EAC5C,IAAIC,EAAwB,KAC5B,MAAMC,EAA0B,CAAA,EAI1BC,EAAiBH,EAAAA,IAAwB,IAAI,EAC7CI,EAAkBJ,EAAAA,IAAwB,IAAI,EAG9CK,EAAgBL,EAAAA,IAAwB,IAAI,EAC5CM,EAAiBN,EAAAA,IAAwB,IAAI,EAEnDO,OAAAA,EAAAA,UAAU,IAAM,CACTR,EAAK,QACVE,EAASO,EAAAA,OAAO,OAAO,CACrB,UAAWT,EAAK,MAChB,QAASJ,EAAM,eACf,MAAOA,EAAM,MACb,OAAQA,EAAM,OACd,eAAgBA,EAAM,eACtB,GAAIA,EAAM,aAAe,KAAO,CAAE,YAAaA,EAAM,WAAA,EAAgB,CAAA,EACrE,GAAIA,EAAM,aAAe,KAAO,CAAE,YAAaA,EAAM,WAAA,EAAgB,CAAA,EACrE,GAAIA,EAAM,gBAAkB,KACxB,CAAE,eAAgBA,EAAM,cAAA,EACxB,CAAA,EACJ,GAAIA,EAAM,WAAa,KAAO,CAAE,UAAWA,EAAM,SAAA,EAAc,CAAA,EAC/D,GAAIA,EAAM,aAAe,KAAO,CAAE,YAAaA,EAAM,WAAA,EAAgB,CAAA,EACrE,GAAIA,EAAM,cAAgB,KACtB,CAAE,aAAcA,EAAM,YAAA,EACtB,C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