@sealpixel/element 1.0.0-rc.5 → 1.0.0-rc.8
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.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ import '@sealpixel/ui/define';
|
|
|
10
10
|
export * from '@sealpixel/ui';
|
|
11
11
|
export { allPlugins, defaultPlugins };
|
|
12
12
|
/**
|
|
13
|
-
* Starts the bundled worker when the plugin list
|
|
14
|
-
* without options; options never reach the renderer
|
|
15
|
-
* plugin
|
|
16
|
-
*
|
|
13
|
+
* Starts the bundled worker when the plugin list renders like the default one,
|
|
14
|
+
* with or without options; options never reach the renderer, and neither does
|
|
15
|
+
* a plugin without operations (`assist`), so those are ignored in the
|
|
16
|
+
* comparison. A custom plugin list needs a custom worker (see
|
|
17
|
+
* `startSealpixelWorker`), so it falls back to rendering inline.
|
|
17
18
|
*/
|
|
18
19
|
export declare function createDefaultRenderer(plugins?: readonly AnyPlugin[]): Renderer;
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,SAAS,EAAkB,KAAK,QAAQ,EAAkB,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,SAAS,EAAkB,KAAK,QAAQ,EAAkB,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAoB,MAAM,oBAAoB,CAAC;AAElF,OAAO,sBAAsB,CAAC;AAE9B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;AAEtC;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,SAAS,SAAS,EAAmB,GAAG,QAAQ,CAe9F"}
|
package/dist/index.js
CHANGED
|
@@ -5,20 +5,23 @@
|
|
|
5
5
|
* webpack 5, esbuild with the worker plugin, Parcel) emit the worker chunk.
|
|
6
6
|
*/
|
|
7
7
|
import { InlineRenderer, WorkerRenderer } from '@sealpixel/core';
|
|
8
|
-
import { allPlugins, defaultPlugins } from '@sealpixel/plugins';
|
|
8
|
+
import { allPlugins, defaultPlugins, renderingPlugins } from '@sealpixel/plugins';
|
|
9
9
|
import { SealpixelEditor } from '@sealpixel/ui';
|
|
10
10
|
import '@sealpixel/ui/define';
|
|
11
11
|
export * from '@sealpixel/ui';
|
|
12
12
|
export { allPlugins, defaultPlugins };
|
|
13
13
|
/**
|
|
14
|
-
* Starts the bundled worker when the plugin list
|
|
15
|
-
* without options; options never reach the renderer
|
|
16
|
-
* plugin
|
|
17
|
-
*
|
|
14
|
+
* Starts the bundled worker when the plugin list renders like the default one,
|
|
15
|
+
* with or without options; options never reach the renderer, and neither does
|
|
16
|
+
* a plugin without operations (`assist`), so those are ignored in the
|
|
17
|
+
* comparison. A custom plugin list needs a custom worker (see
|
|
18
|
+
* `startSealpixelWorker`), so it falls back to rendering inline.
|
|
18
19
|
*/
|
|
19
20
|
export function createDefaultRenderer(plugins = defaultPlugins) {
|
|
20
|
-
const
|
|
21
|
-
|
|
21
|
+
const wanted = renderingPlugins(plugins);
|
|
22
|
+
const bundled = renderingPlugins(defaultPlugins);
|
|
23
|
+
const sameAsDefault = wanted.length === bundled.length &&
|
|
24
|
+
wanted.every((p, i) => p.id === bundled[i]?.id && p.version === bundled[i]?.version);
|
|
22
25
|
if (sameAsDefault && typeof Worker !== 'undefined') {
|
|
23
26
|
try {
|
|
24
27
|
const worker = new Worker(new URL('./worker.js', import.meta.url), { type: 'module' });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAkB,cAAc,EAAiB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAkB,cAAc,EAAiB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,sBAAsB,CAAC;AAE9B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAgC,cAAc;IAClF,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;IACjD,MAAM,aAAa,GACjB,MAAM,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM;QAChC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACvF,IAAI,aAAa,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QACnD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;YACvF,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC;QAAC,MAAM,CAAC;YACP,yBAAyB;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,cAAc,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACtF,CAAC;AAED,eAAe,CAAC,sBAAsB,KAAK,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sealpixel/element",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.8",
|
|
4
4
|
"description": "Drop-in <sealpixel-editor> with all first-party plugins and a bundled render worker. Import once, use the tag.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"repository": {
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sealpixel/
|
|
32
|
-
"@sealpixel/
|
|
33
|
-
"@sealpixel/
|
|
34
|
-
"@sealpixel/
|
|
31
|
+
"@sealpixel/core": "1.0.0-rc.7",
|
|
32
|
+
"@sealpixel/plugins": "1.0.0-rc.8",
|
|
33
|
+
"@sealpixel/ui": "1.0.0-rc.8",
|
|
34
|
+
"@sealpixel/wasm": "1.0.0-rc.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
+
"@sealpixel/config": "0.0.0",
|
|
37
38
|
"@types/node": "^24.0.0",
|
|
38
|
-
"typescript": "^
|
|
39
|
-
"@sealpixel/config": "0.0.0"
|
|
39
|
+
"typescript": "^6.0.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc -p tsconfig.build.json",
|