@paged-media/plugin-sdk 0.2.11-canary.0 → 0.2.13-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 +25 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -128,6 +128,8 @@ var HOST_FEATURES = [
|
|
|
128
128
|
"document.pathAnchors@1",
|
|
129
129
|
"document.hitTest@1",
|
|
130
130
|
"document.elementGeometry@1",
|
|
131
|
+
"document.elementProperties@1",
|
|
132
|
+
"document.placeholders@1",
|
|
131
133
|
"document.tree@1",
|
|
132
134
|
"document.onDidChange@1",
|
|
133
135
|
"document.getMetadata@1",
|
|
@@ -599,6 +601,29 @@ function createBundleHost(getEditor, manifest, options) {
|
|
|
599
601
|
requireDocRead("document.elementGeometry");
|
|
600
602
|
return getEditor().client.elementGeometry(ids);
|
|
601
603
|
},
|
|
604
|
+
async placeholders() {
|
|
605
|
+
requireDocRead("document.placeholders");
|
|
606
|
+
try {
|
|
607
|
+
const reply = await getEditor().client.send({
|
|
608
|
+
kind: "requestDocumentPlaceholders"
|
|
609
|
+
});
|
|
610
|
+
return reply.kind === "documentPlaceholders" ? reply.payload.items : [];
|
|
611
|
+
} catch {
|
|
612
|
+
return [];
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
async elementProperties(id) {
|
|
616
|
+
requireDocRead("document.elementProperties");
|
|
617
|
+
try {
|
|
618
|
+
const reply = await getEditor().client.send({
|
|
619
|
+
kind: "requestElementProperties",
|
|
620
|
+
payload: { id }
|
|
621
|
+
});
|
|
622
|
+
return reply.kind === "elementProperties" ? reply.payload.result : null;
|
|
623
|
+
} catch {
|
|
624
|
+
return null;
|
|
625
|
+
}
|
|
626
|
+
},
|
|
602
627
|
async tree() {
|
|
603
628
|
requireDocRead("document.tree");
|
|
604
629
|
const reply = await getEditor().client.send({
|
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.13-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.13-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.43.0",
|
|
26
26
|
"@types/node": "20.19.39",
|
|
27
27
|
"@types/react": "^18.3.12",
|
|
28
28
|
"react": "^18.3.0",
|