@netless/appliance-plugin 1.1.44-beta.0 → 1.1.44

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 (64) hide show
  1. package/dist/appliance-plugin.js +1 -1
  2. package/dist/appliance-plugin.mjs +12 -12
  3. package/dist/{bridge-CskJoX5M.js → bridge-B7BW1lpB.js} +1 -1
  4. package/dist/{bridge-rKHCYJ6m.mjs → bridge-DQud78k4.mjs} +1 -1
  5. package/dist/bridge.js +1 -1
  6. package/dist/bridge.mjs +1 -1
  7. package/dist/collector/types.d.ts +0 -3
  8. package/dist/component/textEditor/types.d.ts +0 -5
  9. package/dist/core/mainThread/base.d.ts +5 -1
  10. package/dist/core/mainThread/snapshotThread.d.ts +2 -3
  11. package/dist/core/mainThread/subLocalThread.d.ts +2 -5
  12. package/dist/core/mainThread/subServiceThread.d.ts +2 -1
  13. package/dist/core/mainThread/subTopThread.d.ts +2 -2
  14. package/dist/core/tools/arrow.d.ts +1 -423
  15. package/dist/core/tools/base.d.ts +2 -444
  16. package/dist/core/tools/ellipse.d.ts +1 -423
  17. package/dist/core/tools/eraser.d.ts +2 -846
  18. package/dist/core/tools/eraserFaces.d.ts +0 -2
  19. package/dist/core/tools/image.d.ts +1 -0
  20. package/dist/core/tools/laserPen.d.ts +2 -846
  21. package/dist/core/tools/pencil.d.ts +2 -848
  22. package/dist/core/tools/pencilEraser.d.ts +4 -1692
  23. package/dist/core/tools/pencilEraserBitMap.d.ts +5 -2115
  24. package/dist/core/tools/polygon.d.ts +1 -423
  25. package/dist/core/tools/rectangle.d.ts +1 -423
  26. package/dist/core/tools/selector.d.ts +7 -2121
  27. package/dist/core/tools/speechBalloon.d.ts +1 -423
  28. package/dist/core/tools/star.d.ts +1 -423
  29. package/dist/core/tools/straight.d.ts +1 -423
  30. package/dist/core/tools/text.d.ts +3 -3
  31. package/dist/core/tools/utils.d.ts +2 -2
  32. package/dist/core/types.d.ts +0 -9
  33. package/dist/core/utils/index.d.ts +0 -2
  34. package/dist/core/utils/serviceImageRecovery.d.ts +9 -0
  35. package/dist/core/vNodeManager.d.ts +1 -1
  36. package/dist/core/worker/base.d.ts +6 -2
  37. package/dist/core/worker/fullWorkerLocal.d.ts +0 -1
  38. package/dist/core/worker/fullWorkerService.d.ts +4 -2
  39. package/dist/core/worker/simpleWorker.d.ts +2 -2
  40. package/dist/core/worker/subWorkerTopLayer.d.ts +2 -2
  41. package/dist/fullWorker.js +148 -149
  42. package/dist/{index-Ca2t53R7.mjs → index-4ZI3GxVI.mjs} +1 -1
  43. package/dist/{index-ZMuKk-bl.js → index-AJCkfnUu.js} +1 -1
  44. package/dist/{index-ConirzkM.mjs → index-B8Ls8sf_.mjs} +1 -1
  45. package/dist/{index-BbBSxLGe.mjs → index-BBtV40zU.mjs} +563 -490
  46. package/dist/{index-C-tBYq0K.js → index-BOzOWS7h.js} +1 -1
  47. package/dist/index-BQiBrpib.js +1 -0
  48. package/dist/index-BYriQtGa.js +1 -0
  49. package/dist/{index-_3yxgNoj.mjs → index-C2tUvh2a.mjs} +11964 -12224
  50. package/dist/{index-DWevrjrE.mjs → index-DSFxl2wM.mjs} +11917 -12168
  51. package/dist/index-DnJkIouU.js +570 -0
  52. package/dist/index-DptnZ-h8.js +570 -0
  53. package/dist/{index-LcCU1tMV.mjs → index-ZUpKkvbD.mjs} +563 -490
  54. package/dist/subWorker.js +132 -133
  55. package/package.json +3 -4
  56. package/dist/core/utils/affineMatrix.d.ts +0 -33
  57. package/dist/core/utils/fontFamily.d.ts +0 -8
  58. package/dist/core/utils/selectorMatrix.d.ts +0 -4
  59. package/dist/core/utils/selectorRefresh.d.ts +0 -8
  60. package/dist/core/utils/textRaster.d.ts +0 -2
  61. package/dist/index-B0SB7Efu.js +0 -570
  62. package/dist/index-BIVRfc_x.js +0 -570
  63. package/dist/index-Bzg5OMdP.js +0 -1
  64. package/dist/index-CsNG_bzI.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/appliance-plugin",
3
- "version": "1.1.44-beta.0",
3
+ "version": "1.1.44",
4
4
  "files": [
5
5
  "dist",
6
6
  "bridge.d.ts",
@@ -42,13 +42,12 @@
42
42
  "example:lint": "pnpm --dir example lint",
43
43
  "example:typecheck": "pnpm exec tsc --noEmit -p example/tsconfig.json",
44
44
  "sync:fastboard-docs": "node scripts/sync-fastboard-docs.mjs",
45
- "ci:check": "pnpm lint && pnpm test:auto-shape && pnpm test:rendering-compatibility && pnpm test:render-runtime-fallback && pnpm test:image-bitmap-retirement && pnpm test:image-bitmap-diagnostic && pnpm test:service-sync-commit && pnpm test:init-await-boundaries && pnpm test:init-log-aggregation && pnpm test:background-image-load:coverage && pnpm test:max-retries-type && pnpm test:background-image-query && pnpm test:current-scene-guard && pnpm test:init-state-reconciliation && pnpm test:render-runtime-cache && pnpm test:init-ready && pnpm test:transaction-barrier && pnpm test:bitmap-eraser && pnpm test:undo-timing && pnpm build && pnpm example:typecheck",
45
+ "ci:check": "pnpm lint && pnpm test:auto-shape && pnpm test:rendering-compatibility && pnpm test:render-runtime-fallback && pnpm test:image-bitmap-retirement && pnpm test:image-insert-robustness && pnpm test:image-bitmap-diagnostic && pnpm test:service-sync-commit && pnpm test:init-await-boundaries && pnpm test:init-log-aggregation && pnpm test:background-image-load:coverage && pnpm test:max-retries-type && pnpm test:background-image-query && pnpm test:current-scene-guard && pnpm test:init-state-reconciliation && pnpm test:render-runtime-cache && pnpm test:init-ready && pnpm test:transaction-barrier && pnpm test:bitmap-eraser && pnpm test:undo-timing && pnpm build && pnpm example:typecheck",
46
46
  "test:max-retries-type": "tsc -p tsconfig.types-test.json",
47
47
  "test:text-editor-focus": "tsx scripts/textEditorFocus.test.ts",
48
48
  "test:auto-shape": "tsx scripts/autoShape.test.ts",
49
49
  "test:undo-timing": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx test/undoTiming.test.ts",
50
50
  "test:undo-finalize": "tsx scripts/undoFinalize.test.ts",
51
- "test:selector-refresh": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx scripts/selectorRefresh.test.ts",
52
51
  "test:batch-scheduler": "tsx scripts/batchScheduler.test.ts",
53
52
  "test:transaction-barrier": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx scripts/transactionBarrier.test.ts",
54
53
  "test:current-scene-guard": "tsx scripts/currentSceneGuard.test.ts",
@@ -60,10 +59,10 @@
60
59
  "test:renderer-pixel": "pnpm build:spritejs-runtime && tsx scripts/rendererPixel.test.ts",
61
60
  "test:undo-timing:coverage": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs c8 --reporter=text --reporter=html --include=src/undo/timing.ts --check-coverage --statements 90 --lines 90 --branches 90 --functions 90 tsx test/undoTiming.test.ts",
62
61
  "test:selector-api": "tsx test/selectorApi.test.ts",
63
- "test:element-matrix": "tsx scripts/elementMatrix.test.ts",
64
62
  "test:rendering-compatibility": "tsx scripts/renderingCompatibility.test.ts",
65
63
  "test:render-runtime-fallback": "tsx scripts/renderRuntimeFallback.test.ts && cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx --tsconfig scripts/tsconfig.appliance-main.json scripts/renderRuntimeFallbackMainEngine.test.ts",
66
64
  "test:image-bitmap-retirement": "tsx scripts/renderImageBitmapRetirement.test.ts",
65
+ "test:image-insert-robustness": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx scripts/imageInsertRobustness.test.ts",
67
66
  "test:image-bitmap-diagnostic": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx --tsconfig scripts/tsconfig.appliance-main.json scripts/renderImageBitmapDiagnostic.test.ts",
68
67
  "test:service-sync-commit": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx scripts/serviceSyncCommit.test.ts",
69
68
  "test:init-await-boundaries": "cross-env NODE_OPTIONS=--require=./scripts/registerAssetStubs.cjs tsx scripts/initAwaitBoundaries.test.ts",
@@ -1,33 +0,0 @@
1
- /** Scene-space 2D affine matrix in SVG/CSS order: [a, b, c, d, e, f]. */
2
- export type AffineMatrix = [number, number, number, number, number, number];
3
- export interface AffineRect {
4
- x: number;
5
- y: number;
6
- w: number;
7
- h: number;
8
- }
9
- export declare const IDENTITY_AFFINE_MATRIX: AffineMatrix;
10
- /** Read the Group-local origin used by SpriteJS before applying its transform. */
11
- export declare function getNodeLocalPosition(node: unknown, fallback: [number, number]): [number, number];
12
- export declare function normalizeAffineMatrix(value?: unknown): AffineMatrix;
13
- /** Compose matrices so the left matrix is applied after the right matrix. */
14
- export declare function multiplyAffineMatrix(left: AffineMatrix, right: AffineMatrix): AffineMatrix;
15
- export declare function translateAffineMatrix(x: number, y: number): AffineMatrix;
16
- export declare function scaleAffineMatrix(x: number, y: number): AffineMatrix;
17
- export declare function rotateAffineMatrix(degrees: number): AffineMatrix;
18
- export declare function aroundAffineMatrix(transform: AffineMatrix, x: number, y: number): AffineMatrix;
19
- export declare function invertAffineMatrix(matrix: AffineMatrix): AffineMatrix | undefined;
20
- export declare function transformAffinePoint(matrix: AffineMatrix, point: [number, number]): [number, number];
21
- /** Calculate the screen-space bounds of a Group-local box. */
22
- export declare function getTransformedLocalBoxRect(localOrigin: [number, number], size: [number, number], matrix: unknown, worldPosition: readonly [number, number], worldScaling: readonly [number, number], extraSize?: number): AffineRect;
23
- export declare function affineMatrixToTransform(matrix?: unknown): string | undefined;
24
- /**
25
- * Convert a scene-space matrix to the local matrix of a Group positioned at
26
- * `center`. SpriteJS applies `transform` before the Group position, so a
27
- * scene-space gesture must be conjugated by that position to preserve its
28
- * world-space anchor.
29
- */
30
- export declare function sceneMatrixToLocalMatrix(matrix: unknown, center?: [number, number]): AffineMatrix;
31
- /** Convert a Group-local matrix into the equivalent scene-space matrix. */
32
- export declare function localMatrixToSceneMatrix(matrix: unknown, center?: [number, number]): AffineMatrix;
33
- export declare function transformAffinePoints(points: number[], matrix: AffineMatrix, stride?: number): number[];
@@ -1,8 +0,0 @@
1
- /**
2
- * Keep multi-word font families intact for mesh.js' font parser.
3
- *
4
- * mesh.js parses an unquoted family name only up to its first space. The
5
- * browser accepts the same family name without quotes, so quote each family
6
- * item before it is used to build a Canvas font string.
7
- */
8
- export declare function normalizeCanvasFontFamily(fontFamily?: string): string | undefined;
@@ -1,4 +0,0 @@
1
- import type { IUpdateNodeOpt } from "../types";
2
- import type { AffineMatrix } from "./affineMatrix";
3
- /** Build one scene-space gesture delta shared by every selected object. */
4
- export declare function getSelectorMatrixDelta(opt: IUpdateNodeOpt, objectCenter?: [number, number], selectorCenter?: [number, number]): AffineMatrix | undefined;
@@ -1,8 +0,0 @@
1
- import { EToolsKey } from "../enum";
2
- import type { BaseNodeMapItem } from "../types";
3
- import type { TextOptions } from "../../component/textEditor/types";
4
- export declare function shouldRefreshTextSelectorFrame(toolsType: EToolsKey, nodeName: string, textInfos?: {
5
- has: (key: string) => boolean;
6
- }): boolean;
7
- /** Keep text position canonical; selector movement is represented by matrix. */
8
- export declare function mergeTextSelectorGeometry(targetNode: BaseNodeMapItem, textInfo?: Partial<TextOptions>): BaseNodeMapItem;
@@ -1,2 +0,0 @@
1
- export declare const TEXT_IMAGE_MAX_TEXTURE_SIZE = 2048;
2
- export declare function getTextSnippetLength(fontSize: number): number;