@parhelia/editor-bridge-head-react 0.1.12875 → 0.1.12877

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 CHANGED
@@ -2,13 +2,12 @@
2
2
 
3
3
  React helper for adding the Parhelia editor bridge head to rendering hosts.
4
4
 
5
- The component renders the framework-agnostic stub script tag:
5
+ Import and render the component in editing mode:
6
6
 
7
7
  ```tsx
8
8
  <ParheliaBridgeHead />
9
9
  ```
10
10
 
11
- Projects still need to serve `parhelia-stub.js` and `parhelia-bridge.js`,
12
- usually by copying them from `@parhelia/editor-bridge-head/host/v1/` into
13
- public assets. The stub connects to the parent editor, receives the canonical
14
- bridge URL, validates it, and bootstraps the full bridge.
11
+ The component bootstraps the bridge from the package. It connects to the parent
12
+ editor, receives the canonical bridge URL, validates it, and injects the full
13
+ bridge script. Host projects do not need to copy bridge files or add routes.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { type ReactElement } from "react";
2
- export declare function ParheliaBridgeHead(): ReactElement;
1
+ export declare function ParheliaBridgeHead(): null;
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,wBAAgB,kBAAkB,IAAI,YAAY,CAMjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB,IAAI,IAAI,CAMzC"}
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { PARHELIA_EDITOR_BRIDGE_HEAD_STUB_PATH } from "@parhelia/editor-bridge-head";
2
- import { createElement } from "react";
1
+ "use client";
2
+ import { startParheliaBridgeHead } from "@parhelia/editor-bridge-head";
3
+ import { useEffect } from "react";
3
4
  export function ParheliaBridgeHead() {
4
- return createElement("script", {
5
- id: "parhelia-editing-bridge",
6
- src: PARHELIA_EDITOR_BRIDGE_HEAD_STUB_PATH,
7
- defer: true,
8
- });
5
+ useEffect(() => {
6
+ startParheliaBridgeHead();
7
+ }, []);
8
+ return null;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parhelia/editor-bridge-head-react",
3
- "version": "0.1.12875",
3
+ "version": "0.1.12877",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -9,7 +9,6 @@
9
9
  "types": "./dist/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
- "development": "./src/index.ts",
13
12
  "types": "./dist/index.d.ts",
14
13
  "import": "./dist/index.js"
15
14
  }