@paged-media/plugin-sdk 0.2.38-canary.3 → 0.2.40-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 +27 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -266,6 +266,10 @@ var HOST_FEATURES = [
|
|
|
266
266
|
// honesty split as the protocol-ahead mutations (mutations.ts): the
|
|
267
267
|
// engine-level gate is the worker handshake, not `supports()`.
|
|
268
268
|
"document.planarRegions@1",
|
|
269
|
+
// v67 (RFI C-68) — the engine's point snapper. Static like the region
|
|
270
|
+
// door: the flag says this SDK forwards `snapPoint`; an engine older
|
|
271
|
+
// than v67 answers the point unsnapped, never a throw.
|
|
272
|
+
"document.snapPoint@1",
|
|
269
273
|
// DOC-03 structured whole-story read (canvas-wasm v54). Static for the same
|
|
270
274
|
// reason as storage.parts@1: the pinned engine is the server, and the worker
|
|
271
275
|
// handshake refuses a protocol older than the pin — so a running bundle is
|
|
@@ -1002,10 +1006,12 @@ function createBundleHost(getEditor, manifest, options) {
|
|
|
1002
1006
|
log.warn(
|
|
1003
1007
|
`contribute.sceneLayer().submit("${elementId}") ignored \u2014 the host wired no scene channel (probe supports("rendering.sceneLayer@1"))`
|
|
1004
1008
|
);
|
|
1005
|
-
return;
|
|
1009
|
+
return { fontFallbacks: [] };
|
|
1006
1010
|
}
|
|
1007
1011
|
submitted.add(elementId);
|
|
1008
|
-
await ch.submit(elementId, layer, manifest.id);
|
|
1012
|
+
const reply = await ch.submit(elementId, layer, manifest.id);
|
|
1013
|
+
const fontFallbacks = reply && Array.isArray(reply.fontFallbacks) ? [...reply.fontFallbacks] : [];
|
|
1014
|
+
return { fontFallbacks };
|
|
1009
1015
|
},
|
|
1010
1016
|
async clear(elementId) {
|
|
1011
1017
|
submitted.delete(elementId);
|
|
@@ -1296,6 +1302,24 @@ function createBundleHost(getEditor, manifest, options) {
|
|
|
1296
1302
|
return refusal(`the region read door failed: ${String(error)}`);
|
|
1297
1303
|
}
|
|
1298
1304
|
},
|
|
1305
|
+
async snapPoint(query) {
|
|
1306
|
+
requireDocRead("document.snapPoint");
|
|
1307
|
+
const unsnapped = () => ({
|
|
1308
|
+
point: [query.point[0], query.point[1]],
|
|
1309
|
+
snapped: false,
|
|
1310
|
+
lines: [],
|
|
1311
|
+
tolerancePt: 0
|
|
1312
|
+
});
|
|
1313
|
+
try {
|
|
1314
|
+
const reply = await getEditor().client.send({
|
|
1315
|
+
kind: "requestSnapPoint",
|
|
1316
|
+
payload: { query }
|
|
1317
|
+
});
|
|
1318
|
+
return reply.kind === "snapPoint" ? reply.payload.result : unsnapped();
|
|
1319
|
+
} catch {
|
|
1320
|
+
return unsnapped();
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1299
1323
|
async tree() {
|
|
1300
1324
|
requireDocRead("document.tree");
|
|
1301
1325
|
const reply = await getEditor().client.send({
|
|
@@ -2241,6 +2265,7 @@ function createBundleHost(getEditor, manifest, options) {
|
|
|
2241
2265
|
}
|
|
2242
2266
|
if (getEditor().sceneLayers) {
|
|
2243
2267
|
featureSet.add("rendering.sceneLayer@1");
|
|
2268
|
+
featureSet.add("rendering.sceneLayer.faces@1");
|
|
2244
2269
|
}
|
|
2245
2270
|
if (typeof getEditor().overlaySignals?.setToolPreviews === "function") {
|
|
2246
2271
|
featureSet.add("overlay.multiPreview@1");
|
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.40-canary.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@paged-media/plugin-api": "0.2.
|
|
14
|
+
"@paged-media/plugin-api": "0.2.40-canary.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": "^18.3.0"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@paged-media/canvas-wasm": "0.
|
|
25
|
+
"@paged-media/canvas-wasm": "0.68.0",
|
|
26
26
|
"@types/node": "20.19.39",
|
|
27
27
|
"@types/react": "^18.3.31",
|
|
28
28
|
"react": "^18.3.1",
|