deepseek-harness-background 0.5.6 → 0.6.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/lib/index.js CHANGED
@@ -24,6 +24,8 @@ const BACKGROUND_SETTINGS_FIELDS = [
24
24
  "blur",
25
25
  "wallpaperBlur",
26
26
  "fit",
27
+ "offsetX",
28
+ "offsetY",
27
29
  "timeline"
28
30
  ];
29
31
  /** Browser-facing base path of the background API (shared with the host routes). */
@@ -48,6 +50,8 @@ const DEFAULT_PANEL_OPACITY = .15;
48
50
  const DEFAULT_FIT = "cover";
49
51
  /** Image positioning modes. `cover` fills the frame (cropping as needed); `contain` fits the whole image inside the frame (letterboxing). */
50
52
  const FIT_MODES = ["cover", "contain"];
53
+ /** Default framing offset — the image sits centered on both axes. */
54
+ const DEFAULT_OFFSET = .5;
51
55
  //#endregion
52
56
  //#region src/schema.ts
53
57
  /** Host-side schema for the `ui-background` settings namespace. */
@@ -68,6 +72,8 @@ const BackgroundSettingsFields = {
68
72
  blur: z.number().min(0).max(40).default(16),
69
73
  wallpaperBlur: z.number().min(0).max(60).default(0),
70
74
  fit: z.union([...FIT_MODES]).default(DEFAULT_FIT),
75
+ offsetX: z.number().min(0).max(1).default(DEFAULT_OFFSET),
76
+ offsetY: z.number().min(0).max(1).default(DEFAULT_OFFSET),
71
77
  timeline: z.boolean().default(true)
72
78
  };
73
79
  /**
@@ -322,6 +328,8 @@ const DEFAULTS = {
322
328
  blur: 16,
323
329
  wallpaperBlur: 0,
324
330
  fit: DEFAULT_FIT,
331
+ offsetX: DEFAULT_OFFSET,
332
+ offsetY: DEFAULT_OFFSET,
325
333
  timeline: true
326
334
  };
327
335
  /** Keep only the schema's known fields (see BACKGROUND_SETTINGS_FIELDS). */
@@ -378,6 +386,14 @@ const NUM_BOUNDS = {
378
386
  wallpaperBlur: {
379
387
  min: 0,
380
388
  max: 60
389
+ },
390
+ offsetX: {
391
+ min: 0,
392
+ max: 1
393
+ },
394
+ offsetY: {
395
+ min: 0,
396
+ max: 1
381
397
  }
382
398
  };
383
399
  /** Magic-byte signatures for the accepted formats (first bytes). */
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Custom Background",
4
+ "description": "Upload a picture or paste an image URL, then tune opacity, scrim and frosted-glass panels."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "自定义背景",
4
+ "description": "上传图片或粘贴链接,为整个界面铺上壁纸,并可调节不透明度、蒙版与毛玻璃面板。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "deepseek-harness-background",
3
3
  "description": "Custom background image plugin for the DeepSeek Harness web GUI: upload a local picture or paste an image URL, and render it behind the whole app surface with adjustable opacity, scrim, panel transparency and frosted-glass blur.",
4
- "version": "0.5.6",
4
+ "version": "0.6.0",
5
+ "icon": "./icon.svg",
5
6
  "keywords": [
6
7
  "deepseek-harness",
7
8
  "dsh",
@@ -25,6 +26,7 @@
25
26
  "exports": {
26
27
  ".": "./lib/index.js",
27
28
  "./client": "./lib/client.js",
29
+ "./locale/*.json": "./locale/*.json",
28
30
  "./package.json": "./package.json"
29
31
  },
30
32
  "dsh": {
@@ -46,6 +48,8 @@
46
48
  "typecheck": "tsc --noEmit -p tsconfig.json"
47
49
  },
48
50
  "files": [
51
+ "icon.svg",
52
+ "locale/*.json",
49
53
  "lib",
50
54
  "cordis.patch.yml",
51
55
  "README.md",
@@ -53,9 +57,9 @@
53
57
  ],
54
58
  "peerDependencies": {
55
59
  "@deepseek-ai/cordis": "^4.0.1",
56
- "@deepseek-ai/dsh-client-locale": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1",
57
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1",
58
- "@deepseek-ai/dsh-settings": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1",
60
+ "@deepseek-ai/dsh-client-locale": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1 || >=0.2.0-rc.1",
61
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1 || >=0.2.0-rc.1",
62
+ "@deepseek-ai/dsh-settings": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1 || >=0.2.0-rc.1",
59
63
  "react": "^18.2.0"
60
64
  },
61
65
  "dependencies": {
@@ -63,10 +67,10 @@
63
67
  },
64
68
  "devDependencies": {
65
69
  "@deepseek-ai/cordis": "^4.0.1",
66
- "@deepseek-ai/dsh-client-locale": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1",
67
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1",
68
- "@deepseek-ai/dsh-host-webserver": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1",
69
- "@deepseek-ai/dsh-settings": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1",
70
+ "@deepseek-ai/dsh-client-locale": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1 || >=0.2.0-rc.1",
71
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1 || >=0.2.0-rc.1",
72
+ "@deepseek-ai/dsh-host-webserver": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1 || >=0.2.0-rc.1",
73
+ "@deepseek-ai/dsh-settings": ">=0.1.2-rc.1 || >=0.1.3-alpha.1 || >=0.1.5-alpha.1 || >=0.1.5-rc.1 || >=0.1.5-rc.2 || >=0.1.6-alpha.1 || >=0.1.6-alpha.2 || >=0.1.7-alpha.1 || >=0.2.0-rc.1",
70
74
  "@deepseek-ai/schemastery": "^3.18.3",
71
75
  "@testing-library/dom": "^10.4.1",
72
76
  "@testing-library/react": "^16.3.0",