@paged-media/plugin-sdk 0.2.19 → 0.2.21-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 +4 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -284,6 +284,7 @@ function createBundleHost(getEditor, manifest, options) {
284
284
  const clipboardGrant = () => caps?.clipboard === "full" ? "full" : caps?.clipboard === "vector" ? "vector" : "none";
285
285
  const hasWorkers = () => typeof caps?.workers?.max === "number";
286
286
  const hasSecrets = () => caps?.secrets?.sources === true;
287
+ const hasGpu = () => caps?.gpu?.realm === "bundle";
287
288
  const lists = (arr, id) => arr?.includes(id) ?? false;
288
289
  const declaresType = (arr, type) => arr?.some((e) => e.type === type) ?? false;
289
290
  const requireDeclared = (ok, door, missing) => {
@@ -1366,6 +1367,9 @@ function createBundleHost(getEditor, manifest, options) {
1366
1367
  if (options?.secrets) {
1367
1368
  featureSet.add("secrets@1");
1368
1369
  }
1370
+ if (hasGpu()) {
1371
+ featureSet.add("gpu@1");
1372
+ }
1369
1373
  const host = {
1370
1374
  manifest,
1371
1375
  log,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paged-media/plugin-sdk",
3
- "version": "0.2.19",
3
+ "version": "0.2.21-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.19"
14
+ "@paged-media/plugin-api": "0.2.21-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.44.1",
25
+ "@paged-media/canvas-wasm": "0.45.0",
26
26
  "@types/node": "20.19.39",
27
27
  "@types/react": "^18.3.12",
28
28
  "react": "^18.3.0",