@paged-media/plugin-sdk 0.2.46-canary.0 → 0.2.48-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 +5 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -73,7 +73,7 @@ function parseRange(text2) {
|
|
|
73
73
|
if (dots < 0) return null;
|
|
74
74
|
const start = uint(text2.slice(0, dots));
|
|
75
75
|
const end = uint(text2.slice(dots + 2));
|
|
76
|
-
if (start === null || end === null || end
|
|
76
|
+
if (start === null || end === null || end < start) return null;
|
|
77
77
|
return { start, end };
|
|
78
78
|
}
|
|
79
79
|
var MASTER_SCOPE = " > ";
|
|
@@ -8733,6 +8733,9 @@ function formatSelector(steps) {
|
|
|
8733
8733
|
}
|
|
8734
8734
|
return { text: text2, family };
|
|
8735
8735
|
}
|
|
8736
|
+
function keywordOf(type, value) {
|
|
8737
|
+
return type.kind === "number" && typeof value === "string" && (type.keywords ?? []).includes(value);
|
|
8738
|
+
}
|
|
8736
8739
|
function createCoreObjectsV71(getEditor, v70) {
|
|
8737
8740
|
const client = () => getEditor().client;
|
|
8738
8741
|
async function send(kind, payload) {
|
|
@@ -8842,7 +8845,7 @@ function createCoreObjectsV71(getEditor, v70) {
|
|
|
8842
8845
|
}
|
|
8843
8846
|
let wire;
|
|
8844
8847
|
if (isRawWire2(value)) wire = value;
|
|
8845
|
-
else if (row) wire = { type: row.wire, value };
|
|
8848
|
+
else if (row) wire = { type: keywordOf(row.schema.type, value) ? "enum" : row.wire, value };
|
|
8846
8849
|
else if (CORE_OPERATION_PATHS.has(path)) return no2("invalidValue", `${path} is a geometry operation: pass its raw wire value { type, value }`);
|
|
8847
8850
|
else return no2("unknownPath", `${kind || formatAddress(a)} has no path "${path}"`);
|
|
8848
8851
|
const address = a.kind === "handle" ? formatAddress(a) : await target(a, row);
|
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.48-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.48-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.71.
|
|
25
|
+
"@paged-media/canvas-wasm": "0.71.2",
|
|
26
26
|
"@types/node": "20.19.39",
|
|
27
27
|
"@types/react": "^18.3.31",
|
|
28
28
|
"fast-check": "^4.10.2",
|