@paged-media/plugin-sdk 0.2.11-canary.0 → 0.2.12-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.
Files changed (2) hide show
  1. package/dist/index.js +13 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -128,6 +128,7 @@ var HOST_FEATURES = [
128
128
  "document.pathAnchors@1",
129
129
  "document.hitTest@1",
130
130
  "document.elementGeometry@1",
131
+ "document.elementProperties@1",
131
132
  "document.tree@1",
132
133
  "document.onDidChange@1",
133
134
  "document.getMetadata@1",
@@ -599,6 +600,18 @@ function createBundleHost(getEditor, manifest, options) {
599
600
  requireDocRead("document.elementGeometry");
600
601
  return getEditor().client.elementGeometry(ids);
601
602
  },
603
+ async elementProperties(id) {
604
+ requireDocRead("document.elementProperties");
605
+ try {
606
+ const reply = await getEditor().client.send({
607
+ kind: "requestElementProperties",
608
+ payload: { id }
609
+ });
610
+ return reply.kind === "elementProperties" ? reply.payload.result : null;
611
+ } catch {
612
+ return null;
613
+ }
614
+ },
602
615
  async tree() {
603
616
  requireDocRead("document.tree");
604
617
  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.11-canary.0",
3
+ "version": "0.2.12-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.11-canary.0"
14
+ "@paged-media/plugin-api": "0.2.12-canary.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": "^18.3.0"