@netless/appliance-plugin 1.1.42-beta.1 → 1.1.42-beta.2

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.
@@ -1,6 +1,12 @@
1
1
  export type BackgroundImageSource = "appliance" | "whiteSdk";
2
+ /**
3
+ * 背景图片加载重试次数:
4
+ * - `-1`:无限重试(对外唯一表达,内部归一为 `Infinity`);
5
+ * - `0`~`10`:有限重试次数。
6
+ */
7
+ export type BackgroundImageMaxRetries = -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
2
8
  export interface BackgroundImageLoadOptions {
3
- maxRetries?: number;
9
+ maxRetries?: BackgroundImageMaxRetries;
4
10
  timeoutMs?: number;
5
11
  retryIntervalMs?: number;
6
12
  }
@@ -15,8 +15,8 @@ import type { TextEditorInfo, FontWeightType, FontStyleType, TextAlignType, Vert
15
15
  import type { IMarkmapOptions } from "../component/svg/markmap-runtime";
16
16
  import type { AutoShapeKind, AutoShapeMetrics } from "../core/autoShape/types";
17
17
  import type { ShapeOptType } from "../displayer/types";
18
- import type { BackgroundImageLoadEvent, BackgroundImageLoadOptions, BackgroundImageSource, ReloadBackgroundImageParams, ReloadBackgroundImageResult } from "../component/backgroundImageLoadCoordinator";
19
- export type { BackgroundImageLoadEvent, BackgroundImageLoadOptions, BackgroundImageSource, ReloadBackgroundImageParams, ReloadBackgroundImageResult, };
18
+ import type { BackgroundImageLoadEvent, BackgroundImageLoadOptions, BackgroundImageMaxRetries, BackgroundImageSource, ReloadBackgroundImageParams, ReloadBackgroundImageResult } from "../component/backgroundImageLoadCoordinator";
19
+ export type { BackgroundImageLoadEvent, BackgroundImageLoadOptions, BackgroundImageMaxRetries, BackgroundImageSource, ReloadBackgroundImageParams, ReloadBackgroundImageResult, };
20
20
  export type BackgroundImageQuerySource = "appliance" | "whiteSdk";
21
21
  export interface HasBackgroundImageParams {
22
22
  /** Whiteboard view containing the scene. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/appliance-plugin",
3
- "version": "1.1.42-beta.1",
3
+ "version": "1.1.42-beta.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "bridge.d.ts",
@@ -42,7 +42,8 @@
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:background-image-load:coverage && pnpm test:background-image-query && pnpm test:current-scene-guard && pnpm test:init-ready && pnpm build && pnpm example:typecheck",
45
+ "ci:check": "pnpm lint && pnpm test:auto-shape && pnpm test:rendering-compatibility && pnpm test:background-image-load:coverage && pnpm test:max-retries-type && pnpm test:background-image-query && pnpm test:current-scene-guard && pnpm test:init-ready && pnpm build && pnpm example:typecheck",
46
+ "test:max-retries-type": "tsc -p tsconfig.types-test.json",
46
47
  "test:text-editor-focus": "tsx scripts/textEditorFocus.test.ts",
47
48
  "test:auto-shape": "tsx test/autoShape.test.ts",
48
49
  "test:undo-timing": "tsx test/undoTiming.test.ts",