@shiqianjiang/ceru-plugin-core 0.3.2 → 0.3.5

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.
@@ -1,10 +1,10 @@
1
1
  import type { Artifact } from '@shiqianjiang/ceru-plugin-issuer';
2
2
  import type { JsonObject } from '@shiqianjiang/ceru-plugin-sdk';
3
- /** A self-contained document for a sandbox="allow-scripts" opaque-origin iframe. */
3
+ /** Self-contained iframe document; the shared runtime reports mounted content via resize events. */
4
4
  export declare function createWebSurfaceDocument(artifact: Artifact, surfaceId: string, sessionId: string): Promise<{
5
5
  title: string;
6
6
  presentation: {
7
- kind: "drawer";
7
+ kind: "drawer" | "modal";
8
8
  placement: "left" | "right" | "top" | "bottom";
9
9
  size: number;
10
10
  };
@@ -1,6 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  let assets;
3
- /** A self-contained document for a sandbox="allow-scripts" opaque-origin iframe. */
3
+ /** Self-contained iframe document; the shared runtime reports mounted content via resize events. */
4
4
  export async function createWebSurfaceDocument(artifact, surfaceId, sessionId) {
5
5
  const surface = artifact.header.manifest.modules.surfaces?.find((item) => item.id === surfaceId);
6
6
  if (surface?.kind !== 'web')
@@ -29,7 +29,7 @@ export async function createWebSurfaceDocument(artifact, surfaceId, sessionId) {
29
29
  },
30
30
  html: '<!doctype html><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">' +
31
31
  "<meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'none'; script-src data:; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; connect-src 'none'; object-src 'none'; frame-src 'none'; form-action 'none'; base-uri 'none'\">" +
32
- '<div id="plugin-root"></div>' +
32
+ '<style>html,body{margin:0}</style><div id="plugin-root"></div>' +
33
33
  script(runtime) +
34
34
  script('globalThis.__ceruStart(' + code + ');'),
35
35
  init: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shiqianjiang/ceru-plugin-core",
3
- "version": "0.3.2",
3
+ "version": "0.3.5",
4
4
  "description": "Ceru Music v2 plugin Core runtime and Host adapter boundary",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -57,8 +57,8 @@
57
57
  "socket.io-client": "^4.8.3",
58
58
  "ws": "^8.21.3",
59
59
  "axios": "^1.13.2",
60
- "@shiqianjiang/ceru-plugin-issuer": "0.3.2",
61
- "@shiqianjiang/ceru-plugin-sdk": "0.3.2"
60
+ "@shiqianjiang/ceru-plugin-issuer": "0.3.5",
61
+ "@shiqianjiang/ceru-plugin-sdk": "0.3.5"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public",