@editframe/nextjs-plugin 0.51.0 → 0.51.1

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/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # @editframe/nextjs-plugin
2
+
3
+ Next.js plugin for Editframe development — zero-config local video transcoding and asset serving.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install --save-dev @editframe/nextjs-plugin
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Wrap your Next.js config with `withEditframe`:
14
+
15
+ ```js
16
+ // next.config.mjs
17
+ import { withEditframe } from "@editframe/nextjs-plugin";
18
+
19
+ export default withEditframe(
20
+ { root: "./src", cacheRoot: "./cache" },
21
+ {
22
+ // your existing Next.js config
23
+ },
24
+ );
25
+ ```
26
+
27
+ ```js
28
+ // next.config.js (CommonJS)
29
+ const { withEditframe } = require("@editframe/nextjs-plugin");
30
+
31
+ module.exports = withEditframe(
32
+ { root: "./src", cacheRoot: "./cache" },
33
+ {
34
+ // your existing Next.js config
35
+ },
36
+ );
37
+ ```
38
+
39
+ That's it. Run `next dev` as normal.
40
+
41
+ ## How it works
42
+
43
+ In development, the plugin starts a sidecar HTTP server (default port `3001`) that handles all Editframe media API requests. Next.js automatically proxies `/api/v1/*` and `/@ef*` requests to the sidecar, so your composition elements make same-origin requests with no CORS configuration required.
44
+
45
+ Editframe elements (`ef-video`, `ef-audio`, `ef-image`) automatically detect the localhost origin and route dev requests correctly — no additional configuration needed in your app code.
46
+
47
+ ## Options
48
+
49
+ | Option | Type | Default | Description |
50
+ |---|---|---|---|
51
+ | `root` | `string` | required | Base directory for resolving local media file paths |
52
+ | `cacheRoot` | `string` | required | Directory for cached transcoded assets |
53
+ | `port` | `number` | `3001` | Port for the sidecar dev server |
54
+
55
+ ## Environment variables
56
+
57
+ | Variable | Description |
58
+ |---|---|
59
+ | `EF_TOKEN` | Your Editframe API token (required for URL signing) |
60
+ | `EF_HOST` | Override the Editframe API host (optional) |
package/dist/version.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/version.ts
2
- const version = "0.51.0";
2
+ const version = "0.51.1";
3
3
  //#endregion
4
4
  exports.version = version;
5
5
 
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/version.ts
2
- const version = "0.51.0";
2
+ const version = "0.51.1";
3
3
  //#endregion
4
4
  export { version };
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editframe/nextjs-plugin",
3
- "version": "0.51.0",
3
+ "version": "0.51.1",
4
4
  "description": "Editframe Next.js plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,9 +16,9 @@
16
16
  "author": "",
17
17
  "license": "SEE LICENSE IN LICENSE-FULL.md",
18
18
  "dependencies": {
19
- "@editframe/api": "0.51.0",
20
- "@editframe/assets": "0.51.0",
21
- "@editframe/dev-server": "0.51.0"
19
+ "@editframe/api": "0.51.1",
20
+ "@editframe/assets": "0.51.1",
21
+ "@editframe/dev-server": "0.51.1"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "next": ">=14.0.0"