@paged-media/plugin-sdk 0.2.35-canary.0 → 0.2.36-canary.0
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/dist/index.js +13 -6
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -209,7 +209,12 @@ var HOST_FEATURES = [
|
|
|
209
209
|
// `{ found: false, reason }`, never a fake empty face list. Same
|
|
210
210
|
// honesty split as the protocol-ahead mutations (mutations.ts): the
|
|
211
211
|
// engine-level gate is the worker handshake, not `supports()`.
|
|
212
|
-
"document.planarRegions@1"
|
|
212
|
+
"document.planarRegions@1",
|
|
213
|
+
// DOC-03 structured whole-story read (canvas-wasm v54). Static for the same
|
|
214
|
+
// reason as storage.parts@1: the pinned engine is the server, and the worker
|
|
215
|
+
// handshake refuses a protocol older than the pin — so a running bundle is
|
|
216
|
+
// always talking to an engine that answers RequestStoryContent.
|
|
217
|
+
"document.readStory@1"
|
|
213
218
|
];
|
|
214
219
|
var PluginApiNotImplemented = class extends Error {
|
|
215
220
|
constructor(member, pointer) {
|
|
@@ -1159,11 +1164,13 @@ function createBundleHost(getEditor, manifest, options) {
|
|
|
1159
1164
|
});
|
|
1160
1165
|
return reply.kind === "frameChainResult" ? reply.payload.links : [];
|
|
1161
1166
|
},
|
|
1162
|
-
async storyContent(
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
+
async storyContent(storyId) {
|
|
1168
|
+
requireDocRead("document.storyContent");
|
|
1169
|
+
const reply = await getEditor().client.send({
|
|
1170
|
+
kind: "requestStoryContent",
|
|
1171
|
+
payload: { storyId }
|
|
1172
|
+
});
|
|
1173
|
+
return reply.kind === "storyContentResult" ? reply.payload.content ?? null : null;
|
|
1167
1174
|
},
|
|
1168
1175
|
onDidChange(listener) {
|
|
1169
1176
|
requireDocRead("document.onDidChange");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paged-media/plugin-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.36-canary.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@paged-media/canvas-wasm": "0.63.0",
|
|
26
26
|
"@types/node": "20.19.39",
|
|
27
|
-
"@types/react": "^18.3.
|
|
28
|
-
"react": "^18.3.
|
|
29
|
-
"typescript": "^5.
|
|
30
|
-
"vitest": "^2.1.
|
|
27
|
+
"@types/react": "^18.3.31",
|
|
28
|
+
"react": "^18.3.1",
|
|
29
|
+
"typescript": "^5.9.3",
|
|
30
|
+
"vitest": "^2.1.9"
|
|
31
31
|
},
|
|
32
32
|
"description": "The Paged plugin runtime: loadBundle, the in-process BundleHost adapter, the gesture kit, and version negotiation.",
|
|
33
33
|
"license": "MPL-2.0 OR LicenseRef-PMEL",
|