{"_id":"@axclip/axclip-editor-sdk","_rev":"8-5e71e2b5bf74c3e4179ef2d3e290767a","name":"@axclip/axclip-editor-sdk","dist-tags":{"latest":"2.0.8"},"versions":{"1.1.3":{"name":"@axclip/axclip-editor-sdk","version":"1.1.3","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","_id":"@axclip/axclip-editor-sdk@1.1.3","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"homepage":"https://axclip.com","dist":{"shasum":"929be221b598c42bbfe5487ca4dc1d45b13f078d","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-1.1.3.tgz","fileCount":2185,"integrity":"sha512-w2g4o2t9JHElNFKZxSVlt2QnJ6PglhkFwbzXWm3BKGsAO+3DAGoJU5E14C4xplgFZKEYCjbn/mmU2NcW9Or9UA==","signatures":[{"sig":"MEYCIQCBgEkdveoZLeSKk2mFkbYt0flKSF/SjqK08dfJgnLWSgIhALKiuOj+g5oF9YsrAk4p8djqf6oCtx6SzU0FYQJf/4hS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96077334},"main":"axclip-editor.umd.js","style":"axclip-editor.css","module":"axclip-editor.es.js","gitHead":"be75e2b6d79db4c06668f13aa403921a9e4d9bbf","_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.2","description":"Axclip Editor SDK - A powerful video editing web component","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axclip-editor-sdk_1.1.3_1766746416534_0.6484531287999014","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@axclip/axclip-editor-sdk","version":"2.0.0","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","_id":"@axclip/axclip-editor-sdk@2.0.0","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"homepage":"https://axclip.com","dist":{"shasum":"3418eae0c485690e19e2fecaee266c9186b817f1","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-2.0.0.tgz","fileCount":12,"integrity":"sha512-ws7UdCsiST0WfNVtAqOuka7Nt7AHQo7SZX2TFLjKzP3j0YxRJPu2x5Jf3IZsX6s6xIvKOY8UK57gSngsHpGWpA==","signatures":[{"sig":"MEYCIQDn3hTTMlEpV0NATSWcCJzXqg3Rf0DxhbQR/l2OO4ayKAIhALdvcqCu23MLzjFfw9lBZ7KngsDJ94d9w6GRKNRtzGuw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8590005},"main":"axclip-editor.umd.js","style":"axclip-editor.css","module":"axclip-editor.es.js","gitHead":"827e396408a7fb0ab3f7ae7a27f3f6fbd027be06","_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.2","description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axclip-editor-sdk_2.0.0_1769570222751_0.45337950969772645","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@axclip/axclip-editor-sdk","version":"2.0.1","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","_id":"@axclip/axclip-editor-sdk@2.0.1","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"homepage":"https://axclip.com","dist":{"shasum":"7178c76df6a7093cfd473e9177443ac05ca398e0","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-2.0.1.tgz","fileCount":12,"integrity":"sha512-9pUP6x3dUcijTrK2Eu14fWoCOwPmcrgLMJOHjyTynwKBqRWjft51r7S6JuCHe5edlsYMQAzjgs3ouyxcHssoqw==","signatures":[{"sig":"MEYCIQC5FKXKAwZEPgXM+wvxbPeBs549FefyzQqZXT/8OHAGqwIhAPfqo/W1FBWAiIASr0+8WFbWIJxkoQi4m2lC39Pca1UD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8608488},"main":"axclip-editor.umd.js","style":"axclip-editor.css","module":"axclip-editor.es.js","gitHead":"827e396408a7fb0ab3f7ae7a27f3f6fbd027be06","_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.2","description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axclip-editor-sdk_2.0.1_1769570457406_0.36098778001349574","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@axclip/axclip-editor-sdk","version":"2.0.2","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","_id":"@axclip/axclip-editor-sdk@2.0.2","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"homepage":"https://axclip.com","dist":{"shasum":"1925bb367b5b4661ff0dc4f2ef70f37322a972cd","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-2.0.2.tgz","fileCount":12,"integrity":"sha512-jexAgldVZ+dYJL6Pt5+Ryb3AYPZ714ziB4SxeMa/ievzuK1H3p1QNsfJbqDLqibzhJZNUOU9WCGdPzKdiqTfRA==","signatures":[{"sig":"MEUCIFaqSupIB2LfRvKTo/htXu4yo/BDpC5FFM36hi1s/biGAiEAyXVRwc8/5yWEOiC0I9eaepdfu+1g+uBRqQNHBl3n8N8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8593623},"main":"axclip-editor.umd.js","style":"axclip-editor.css","module":"axclip-editor.es.js","gitHead":"0a9b03c4f625f4ea64bd63f66a36f874ee84b5aa","_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.2","description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axclip-editor-sdk_2.0.2_1769580004498_0.20925074725887138","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@axclip/axclip-editor-sdk","version":"2.0.4","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","_id":"@axclip/axclip-editor-sdk@2.0.4","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"homepage":"https://axclip.com","dist":{"shasum":"b0fcfc0b78d7312b201d35efa1ba1e40c05feb9f","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-2.0.4.tgz","fileCount":12,"integrity":"sha512-HrR0UMXTglZjOHV+spuBJJaUOP1ELGYSmYVGzuzL9fY0hr29SeT4juifFdVTpZa9sbp4ivKCEQBTffFE9IWOqw==","signatures":[{"sig":"MEUCIGyHW3IhLDzEjonGIwQI3vxslKpTwq76t0camu36O7qeAiEA+RGxiThrXR5D3FjkURt+AL+2xFNZQ9+6dxLKFaUCx1A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8575029},"main":"axclip-editor.umd.js","style":"axclip-editor.css","module":"axclip-editor.es.js","gitHead":"4a90dc05bf6ba425ca93bfca3cf250d1e7fdc317","_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.2","description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axclip-editor-sdk_2.0.4_1769580667728_0.42942559835363503","host":"s3://npm-registry-packages-npm-production"}},"2.0.6":{"name":"@axclip/axclip-editor-sdk","version":"2.0.6","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","_id":"@axclip/axclip-editor-sdk@2.0.6","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"homepage":"https://axclip.com","dist":{"shasum":"a2486b9b55f22e024dd00c6a302fa1c7f3fac49e","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-2.0.6.tgz","fileCount":12,"integrity":"sha512-uYOgYFLfd7Yz1nQxi352p04fVwMN7BV9g8Zv83OBCvJVrMvIG7c0NShO6GzhT/dirBVaUL+NuZYL/sMgXLkW9w==","signatures":[{"sig":"MEUCIQDT/2Orjx7Hlz8bI2EMhAbTb93ajC3gQVUxURdv7GfBhwIge94GOU/5/UBFC9JRb0noeIB1xQktaEHSnJuzrfQKJqo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3588746},"main":"axclip-editor.umd.js","style":"axclip-editor.css","module":"axclip-editor.es.js","gitHead":"3c9fc1039e3eb2272464b1cd491592dc92c25769","_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.2","description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axclip-editor-sdk_2.0.6_1769599202075_0.7115952951765605","host":"s3://npm-registry-packages-npm-production"}},"2.0.7":{"name":"@axclip/axclip-editor-sdk","version":"2.0.7","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","_id":"@axclip/axclip-editor-sdk@2.0.7","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"homepage":"https://axclip.com","dist":{"shasum":"932539164100c5ce9b005830d2289925eb328172","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-2.0.7.tgz","fileCount":15,"integrity":"sha512-zvp5gxQJcat48xvAESy1aWaVppbKt98pBJ+hoLkWO0/GgYgLcJPOv9IZIB2OyX+c4jVaN9Xo1tw8I1OHBhqaGw==","signatures":[{"sig":"MEUCIBxL8IonUl4I8nWmJ3SKERkfo0EBYR4goIH985ZmvPpzAiEAyh25D1Foea3Sbdf6m78I6ipKYrj0ZY0KUFu7OtXvuUE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8618884},"main":"axclip-editor.umd.js","style":"axclip-editor.css","module":"axclip-editor.es.js","gitHead":"3c9fc1039e3eb2272464b1cd491592dc92c25769","_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"repository":{"url":"https://www.npmjs.com/package/@axclip/axclip-editor-sdk","type":"git"},"_npmVersion":"10.9.2","description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/axclip-editor-sdk_2.0.7_1769662766878_0.9132153670112815","host":"s3://npm-registry-packages-npm-production"}},"2.0.8":{"name":"@axclip/axclip-editor-sdk","version":"2.0.8","description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","main":"axclip-editor.umd.js","module":"axclip-editor.es.js","style":"axclip-editor.css","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","repository":{"type":"git","url":"https://www.npmjs.com/package/@axclip/axclip-editor-sdk"},"homepage":"https://axclip.com","_id":"@axclip/axclip-editor-sdk@2.0.8","gitHead":"3c9fc1039e3eb2272464b1cd491592dc92c25769","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-1uR5rbUGU4BXtlnedfE84bQUf4SWPDePuU0sw4hHhWlOvh+WLFt2jxOyhGOLhFCjDxhOUhUP87zpGUEVDcjZJA==","shasum":"2290b218692ebb5989e1893e6d73dde93c5e4358","tarball":"https://registry.npmjs.org/@axclip/axclip-editor-sdk/-/axclip-editor-sdk-2.0.8.tgz","fileCount":16,"unpackedSize":8608984,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDBNpk9Q8MPtitajt6BPPDzTrQZW71ipEXPeKcj2X8q7gIgYYxjaO0Ldu8t3LwqPafa6e9FGvwfsWuPLpkJldZCwNw="}]},"_npmUser":{"name":"axclip","email":"1500215002@qq.com"},"directories":{},"maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/axclip-editor-sdk_2.0.8_1769665996086_0.1023761151002065"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-26T10:53:36.429Z","modified":"2026-01-29T05:53:16.507Z","1.1.3":"2025-12-26T10:53:38.196Z","2.0.0":"2026-01-28T03:17:03.075Z","2.0.1":"2026-01-28T03:20:57.712Z","2.0.2":"2026-01-28T06:00:04.751Z","2.0.4":"2026-01-28T06:11:08.007Z","2.0.6":"2026-01-28T11:20:02.296Z","2.0.7":"2026-01-29T04:59:27.162Z","2.0.8":"2026-01-29T05:53:16.391Z"},"author":{"name":"axclip","email":"1500215002@qq.com"},"license":"ISC","homepage":"https://axclip.com","keywords":["video-editor","video-editing","video-clip","video-cutter","video-trimmer","sdk","web-component","web-component-library","axclip.com","typescript","video-processing","media-editor","video-player","video-production","online-video-editor","browser-video-editor","axclip","video-sdk","media-sdk","video-component","video-tools","editor","multimedia","video-creation","video-manipulation","video-effects","video-filters","video-transitions"],"repository":{"type":"git","url":"https://www.npmjs.com/package/@axclip/axclip-editor-sdk"},"description":"Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com","maintainers":[{"name":"axclip","email":"1500215002@qq.com"}],"readme":"# @axclip/axclip-editor-sdk\n\nAxclip Editor SDK available as a framework-agnostic Web Component.\n**Demo**: [https://axclip.com](https://axclip.com)\n\n<p align=\"center\">\n  <img src=\"https://cdn.jsdelivr.net/npm/@axclip/axclip-editor-sdk@latest/doc/images/preview-desktop.png\" alt=\"Axclip Desktop Editor\" width=\"100%\">\n</p>\n<p align=\"center\" style=\"display: flex; gap: 10px; justify-content: center;\">\n  <img src=\"https://cdn.jsdelivr.net/npm/@axclip/axclip-editor-sdk@latest/doc/images/preview-mobile.jpg\" alt=\"Axclip Mobile Editor\" width=\"45%\">\n</p>\n\n## 📦 Installation\n\n```bash\npnpm install @axclip/axclip-editor-sdk\n```\n\n## 🔧 Prerequisites (Important!)\n\nThis SDK uses advanced browser features like `SharedArrayBuffer` for high-performance video processing. **You must serve your application with specific HTTP headers**, otherwise the editor will strictly fail to load.\n\n### 1. COOP/COEP Headers\n\nConfigure your server (Nginx, Vercel, Netlify, Vite, etc.) to send these headers:\n\n```http\nCross-Origin-Opener-Policy: same-origin\nCross-Origin-Embedder-Policy: require-corp\n```\n\n### 2. Static Assets\n\nThe SDK requires static assets (WASM files, icons).\n\n- **Option A (Recommended)**: Use our CDN (no action needed, default behavior).\n- **Option B (Self-hosted)**: Copy the `assets` folder from `node_modules/@axclip/axclip-editor-sdk/dist/assets` to your public directory and set `assets-url=\"/your/public/path\"`.\n\n---\n\n## 🚀 Usage Guide\n\n### 1. Vue 3.0+\n\nIn Vue, you must tell the compiler to treat `<axclip-editor>` as a custom element, otherwise it will try to resolve it as a Vue component and warn you.\n\n**vite.config.ts:**\n\n```typescript\nimport { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({\n  plugins: [\n    vue({\n      template: {\n        compilerOptions: {\n          // Treat all tags starting with 'axclip-' as custom elements\n          isCustomElement: (tag) => tag.startsWith(\"axclip-\"),\n        },\n      },\n    }),\n  ],\n});\n```\n\n**App.vue:**\n\n```html\n<script setup lang=\"ts\">\n  import \"@axclip/axclip-editor-sdk/axclip-editor.css\"; // Import CSS\n  import \"@axclip/axclip-editor-sdk\"; // Import Web Component registration\n\n  const handleExport = (e: CustomEvent) => {\n    console.log(\"Project JSON:\", e.detail);\n  };\n\n  const handleVideoExport = (e: CustomEvent) => {\n    console.log(\"Video Blob:\", e.detail.file);\n  };\n</script>\n\n<template>\n  <div class=\"editor-container\">\n    <axclip-editor\n      sdk-key=\"YOUR_SDK_KEY\"\n      assets-url=\"https://cdn.axclip.com/assets/\"\n      @ax-export=\"handleExport\"\n      @ax-video-export=\"handleVideoExport\"\n    ></axclip-editor>\n  </div>\n</template>\n\n<style scoped>\n  .editor-container {\n    width: 100vw;\n    height: 100vh;\n  }\n</style>\n```\n\n---\n\n### 2. React 18 / Next.js\n\nReact 18 does not fully support Web Components events (like `@ax-export`). You need to use a `ref` to attach event listeners manually.\n\n**Top-level declaration (to fix TypeScript red errors):**\n\n```typescript\n// global.d.ts or at the top of your file\ndeclare global {\n  namespace JSX {\n    interface IntrinsicElements {\n      \"axclip-editor\": React.DetailedHTMLProps<\n        React.HTMLAttributes<HTMLElement>,\n        HTMLElement\n      > & {\n        \"sdk-key\"?: string;\n        \"assets-url\"?: string;\n        \"resource-id\"?: string;\n        class?: string;\n      };\n    }\n  }\n}\n```\n\n**Editor Component:**\n\n```tsx\n\"use client\"; // If using Next.js App Router\n\nimport { useEffect, useRef } from \"react\";\nimport \"@axclip/axclip-editor-sdk/axclip-editor.css\";\n\n// Dynamic import to avoid SSR issues if needed\n// import('@axclip/axclip-editor-sdk');\n\nexport default function VideoEditor() {\n  const editorRef = useRef<HTMLElement>(null);\n  const initialized = useRef(false);\n\n  useEffect(() => {\n    // Dynamically import the SDK on client-side only\n    import(\"@axclip/axclip-editor-sdk\");\n\n    const editor = editorRef.current;\n    if (!editor) return;\n\n    const onExport = (e: any) => console.log(\"Export:\", e.detail);\n    const onVideo = (e: any) => console.log(\"Video:\", e.detail);\n\n    // React 18: Manually attach custom event listeners\n    editor.addEventListener(\"ax-export\", onExport);\n    editor.addEventListener(\"ax-video-export\", onVideo);\n\n    return () => {\n      editor.removeEventListener(\"ax-export\", onExport);\n      editor.removeEventListener(\"ax-video-export\", onVideo);\n    };\n  }, []);\n\n  return (\n    <div style={{ width: \"100vw\", height: \"100vh\" }}>\n      <axclip-editor\n        ref={editorRef}\n        sdk-key=\"YOUR_SDK_KEY\"\n        assets-url=\"https://cdn.axclip.com/assets/\"\n      ></axclip-editor>\n    </div>\n  );\n}\n```\n\n---\n\n### 3. React 19\n\nReact 19 has full support for Custom Elements! You can use it just like a normal component without refs.\n\n```tsx\nimport { useEffect, useRef } from \"react\";\nimport \"@axclip/axclip-editor-sdk/axclip-editor.css\";\nimport \"@axclip/axclip-editor-sdk\";\n\nexport default function Editor() {\n  const editorRef = useRef<HTMLElement>(null);\n\n  useEffect(() => {\n    // Standard event listener attachment\n    const el = editorRef.current;\n    if (!el) return;\n\n    const handler = (e: any) => console.log(e.detail);\n    el.addEventListener(\"ax-export\", handler);\n    return () => el.removeEventListener(\"ax-export\", handler);\n  }, []);\n\n  return <axclip-editor ref={editorRef} sdk-key=\"YOUR_SDK_KEY\"></axclip-editor>;\n}\n```\n\n_(Note: React 19 is still new. If events don't fire, fallback to the React 18 method.)_\n\n---\n\n### 4. Vanilla JS / HTML (CDN)\n\nUse the **ESM** build for modern browsers.\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link\n      rel=\"stylesheet\"\n      href=\"./node_modules/@axclip/axclip-editor-sdk/axclip-editor.css\"\n    />\n    <style>\n      body {\n        margin: 0;\n        height: 100vh;\n        background: #000;\n      }\n    </style>\n  </head>\n  <body>\n    <axclip-editor id=\"editor\" sdk-key=\"YOUR_KEY\"></axclip-editor>\n\n    <!-- Load ESM module -->\n    <script\n      type=\"module\"\n      src=\"./node_modules/@axclip/axclip-editor-sdk/axclip-editor.es.js\"\n    ></script>\n\n    <script>\n      const editor = document.getElementById(\"editor\");\n\n      editor.addEventListener(\"ax-export\", (e) => {\n        console.log(\"Project Data:\", e.detail);\n      });\n\n      // You can also manipulate it via JS\n      // editor.setAttribute('resource-id', '123');\n    </script>\n  </body>\n</html>\n```\n\n### 5. Vanilla JS (UMD / Legacy)\n\nUse the **UMD** build if you are not using a bundler and cannot use ES modules.\n\n```html\n<script src=\"./node_modules/@axclip/axclip-editor-sdk/axclip-editor.umd.js\"></script>\n<!-- The component is automatically registered -->\n<axclip-editor sdk-key=\"...\"></axclip-editor>\n```\n\n---\n\n## 📚 API Reference\n\n### Attributes (Properties)\n\nThese attributes can be set on the `<axclip-editor>` element.\n\n**Important**: In HTML, use **kebab-case** (e.g. `sdk-key`). In JavaScript/React refs, use **camelCase** (e.g. `element.sdkKey`).\n\n| Attribute (HTML) | Property (JS) | Type     | Required | Description                                        |\n| :--------------- | :------------ | :------- | :------- | :------------------------------------------------- |\n| `sdk-key`        | `sdkKey`      | `string` | **Yes**  | Your SDK Access Token.                             |\n| `resource-id`    | `resourceId`  | `string` | No       | ID of the project/template to load.                |\n| `assets-url`     | `assetsUrl`   | `string` | No       | Base URL for fetching static assets (icons, wasm). |\n| `api-base-url`   | `apiBaseUrl`  | `string` | No       | Custom API endpoint for private deployments.       |\n\n### Events\n\nListen to these events to interact with the editor.\n\n| Event Name        | Detail Type            | Description                                                                                                    |\n| :---------------- | :--------------------- | :------------------------------------------------------------------------------------------------------------- |\n| `ax-export`       | `JSONObject`           | Fired when the user triggers a \"Save/Export Project\" action. <br>Matches the internal project state format.    |\n| `ax-video-export` | `{ file: Uint8Array }` | Fired when the video rendering process finishes. <br>`event.detail.file` contains the binary video data (MP4). |\n\n### Methods\n\nCurrently, the editor is primarily controlled via Attributes and User Interaction.\n_Programmatic control methods (e.g., `save()`, `load()`) are planned for v2.1._\n\n---\n\n## 💡 Common Issues & Troubleshooting\n\n**Q: \"Failed to resolve component: axclip-editor\" in Vue**\nA: You forgot to configure `compilerOptions.isCustomElement` in your vite/vue config. See the Vue section above.\n\n**Q: \"Property 'axclip-editor' does not exist on type 'JSX.IntrinsicElements'\" in React/TS**\nA: You need to add the module declaration to extends JSX types. See the React 18 section above.\n\n**Q: Editor stuck at \"Loading...\"**\nA: Open DevTools > Console. If you see `SharedArrayBuffer is not defined`, you are missing the COOP/COEP headers. See \"Prerequisites\".\n\n**Q: Icons or Fonts are missing (404)**\nA: Check the Network tab. If requests to `/assets/...` are failing, set the `assets-url` attribute to point to the correct absolute path (e.g., `https://my-cdn.com/axclip/`).\n","readmeFilename":"README.md"}