npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@axclip/axclip-editor-sdk

v2.0.8

Published

Axclip Editor SDK - A powerful video editing web component. Demo: https://axclip.com

Readme

@axclip/axclip-editor-sdk

Axclip Editor SDK available as a framework-agnostic Web Component. Demo: https://axclip.com

📦 Installation

pnpm install @axclip/axclip-editor-sdk

🔧 Prerequisites (Important!)

This 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.

1. COOP/COEP Headers

Configure your server (Nginx, Vercel, Netlify, Vite, etc.) to send these headers:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

2. Static Assets

The SDK requires static assets (WASM files, icons).

  • Option A (Recommended): Use our CDN (no action needed, default behavior).
  • 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".

🚀 Usage Guide

1. Vue 3.0+

In 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.

vite.config.ts:

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          // Treat all tags starting with 'axclip-' as custom elements
          isCustomElement: (tag) => tag.startsWith("axclip-"),
        },
      },
    }),
  ],
});

App.vue:

<script setup lang="ts">
  import "@axclip/axclip-editor-sdk/axclip-editor.css"; // Import CSS
  import "@axclip/axclip-editor-sdk"; // Import Web Component registration

  const handleExport = (e: CustomEvent) => {
    console.log("Project JSON:", e.detail);
  };

  const handleVideoExport = (e: CustomEvent) => {
    console.log("Video Blob:", e.detail.file);
  };
</script>

<template>
  <div class="editor-container">
    <axclip-editor
      sdk-key="YOUR_SDK_KEY"
      assets-url="https://cdn.axclip.com/assets/"
      @ax-export="handleExport"
      @ax-video-export="handleVideoExport"
    ></axclip-editor>
  </div>
</template>

<style scoped>
  .editor-container {
    width: 100vw;
    height: 100vh;
  }
</style>

2. React 18 / Next.js

React 18 does not fully support Web Components events (like @ax-export). You need to use a ref to attach event listeners manually.

Top-level declaration (to fix TypeScript red errors):

// global.d.ts or at the top of your file
declare global {
  namespace JSX {
    interface IntrinsicElements {
      "axclip-editor": React.DetailedHTMLProps<
        React.HTMLAttributes<HTMLElement>,
        HTMLElement
      > & {
        "sdk-key"?: string;
        "assets-url"?: string;
        "resource-id"?: string;
        class?: string;
      };
    }
  }
}

Editor Component:

"use client"; // If using Next.js App Router

import { useEffect, useRef } from "react";
import "@axclip/axclip-editor-sdk/axclip-editor.css";

// Dynamic import to avoid SSR issues if needed
// import('@axclip/axclip-editor-sdk');

export default function VideoEditor() {
  const editorRef = useRef<HTMLElement>(null);
  const initialized = useRef(false);

  useEffect(() => {
    // Dynamically import the SDK on client-side only
    import("@axclip/axclip-editor-sdk");

    const editor = editorRef.current;
    if (!editor) return;

    const onExport = (e: any) => console.log("Export:", e.detail);
    const onVideo = (e: any) => console.log("Video:", e.detail);

    // React 18: Manually attach custom event listeners
    editor.addEventListener("ax-export", onExport);
    editor.addEventListener("ax-video-export", onVideo);

    return () => {
      editor.removeEventListener("ax-export", onExport);
      editor.removeEventListener("ax-video-export", onVideo);
    };
  }, []);

  return (
    <div style={{ width: "100vw", height: "100vh" }}>
      <axclip-editor
        ref={editorRef}
        sdk-key="YOUR_SDK_KEY"
        assets-url="https://cdn.axclip.com/assets/"
      ></axclip-editor>
    </div>
  );
}

3. React 19

React 19 has full support for Custom Elements! You can use it just like a normal component without refs.

import { useEffect, useRef } from "react";
import "@axclip/axclip-editor-sdk/axclip-editor.css";
import "@axclip/axclip-editor-sdk";

export default function Editor() {
  const editorRef = useRef<HTMLElement>(null);

  useEffect(() => {
    // Standard event listener attachment
    const el = editorRef.current;
    if (!el) return;

    const handler = (e: any) => console.log(e.detail);
    el.addEventListener("ax-export", handler);
    return () => el.removeEventListener("ax-export", handler);
  }, []);

  return <axclip-editor ref={editorRef} sdk-key="YOUR_SDK_KEY"></axclip-editor>;
}

(Note: React 19 is still new. If events don't fire, fallback to the React 18 method.)


4. Vanilla JS / HTML (CDN)

Use the ESM build for modern browsers.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link
      rel="stylesheet"
      href="./node_modules/@axclip/axclip-editor-sdk/axclip-editor.css"
    />
    <style>
      body {
        margin: 0;
        height: 100vh;
        background: #000;
      }
    </style>
  </head>
  <body>
    <axclip-editor id="editor" sdk-key="YOUR_KEY"></axclip-editor>

    <!-- Load ESM module -->
    <script
      type="module"
      src="./node_modules/@axclip/axclip-editor-sdk/axclip-editor.es.js"
    ></script>

    <script>
      const editor = document.getElementById("editor");

      editor.addEventListener("ax-export", (e) => {
        console.log("Project Data:", e.detail);
      });

      // You can also manipulate it via JS
      // editor.setAttribute('resource-id', '123');
    </script>
  </body>
</html>

5. Vanilla JS (UMD / Legacy)

Use the UMD build if you are not using a bundler and cannot use ES modules.

<script src="./node_modules/@axclip/axclip-editor-sdk/axclip-editor.umd.js"></script>
<!-- The component is automatically registered -->
<axclip-editor sdk-key="..."></axclip-editor>

📚 API Reference

Attributes (Properties)

These attributes can be set on the <axclip-editor> element.

Important: In HTML, use kebab-case (e.g. sdk-key). In JavaScript/React refs, use camelCase (e.g. element.sdkKey).

| Attribute (HTML) | Property (JS) | Type | Required | Description | | :--------------- | :------------ | :------- | :------- | :------------------------------------------------- | | sdk-key | sdkKey | string | Yes | Your SDK Access Token. | | resource-id | resourceId | string | No | ID of the project/template to load. | | assets-url | assetsUrl | string | No | Base URL for fetching static assets (icons, wasm). | | api-base-url | apiBaseUrl | string | No | Custom API endpoint for private deployments. |

Events

Listen to these events to interact with the editor.

| Event Name | Detail Type | Description | | :---------------- | :--------------------- | :------------------------------------------------------------------------------------------------------------- | | ax-export | JSONObject | Fired when the user triggers a "Save/Export Project" action. Matches the internal project state format. | | ax-video-export | { file: Uint8Array } | Fired when the video rendering process finishes. event.detail.file contains the binary video data (MP4). |

Methods

Currently, the editor is primarily controlled via Attributes and User Interaction. Programmatic control methods (e.g., save(), load()) are planned for v2.1.


💡 Common Issues & Troubleshooting

Q: "Failed to resolve component: axclip-editor" in Vue A: You forgot to configure compilerOptions.isCustomElement in your vite/vue config. See the Vue section above.

Q: "Property 'axclip-editor' does not exist on type 'JSX.IntrinsicElements'" in React/TS A: You need to add the module declaration to extends JSX types. See the React 18 section above.

Q: Editor stuck at "Loading..." A: Open DevTools > Console. If you see SharedArrayBuffer is not defined, you are missing the COOP/COEP headers. See "Prerequisites".

Q: Icons or Fonts are missing (404) A: 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/).