dsh-image-blur 0.2.6
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/README.md +163 -0
- package/client.js +1186 -0
- package/cordis.patch.yml +13 -0
- package/docs/preview-blurred.jpg +0 -0
- package/docs/preview-shown.jpg +0 -0
- package/icon.svg +26 -0
- package/index.js +15 -0
- package/locale/en.json +23 -0
- package/locale/zh.json +23 -0
- package/package.json +57 -0
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# dsh-image-blur bundle patch.
|
|
2
|
+
#
|
|
3
|
+
# 只有一行宿主记录:宿主半边不做任何事(`index.js` 的 apply 是空的),
|
|
4
|
+
# 真正干活的是 package.json 里 `dsh.client` 声明的浏览器半边:
|
|
5
|
+
# 1. 往页面注入一份样式(img[data-dsh-imgblur="hidden"] → blur 滤镜);
|
|
6
|
+
# 2. 用 MutationObserver 盯住所有 <img>,尺寸够大的默认打上 "hidden";
|
|
7
|
+
# 3. 在 `shell.overlay` 槽里渲染一层穿透浮层,给每张被模糊的图挂一颗
|
|
8
|
+
# 「显示 / 模糊」按钮(绝对定位,跟着滚动/窗口变化实时跟随);
|
|
9
|
+
# 4. 在 `settings.general.item` 槽里加一行开关 + 强度,写 localStorage。
|
|
10
|
+
|
|
11
|
+
- insert:
|
|
12
|
+
- id: image-blur
|
|
13
|
+
name: 'dsh-image-blur'
|
|
Binary file
|
|
Binary file
|
package/icon.svg
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="Image blur">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="ib-bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#2b3550"/>
|
|
5
|
+
<stop offset="1" stop-color="#131826"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<filter id="ib-soft" x="-40%" y="-40%" width="180%" height="180%">
|
|
8
|
+
<feGaussianBlur stdDeviation="4.6"/>
|
|
9
|
+
</filter>
|
|
10
|
+
<clipPath id="ib-round">
|
|
11
|
+
<rect x="4" y="4" width="56" height="56" rx="14"/>
|
|
12
|
+
</clipPath>
|
|
13
|
+
</defs>
|
|
14
|
+
<g clip-path="url(#ib-round)">
|
|
15
|
+
<rect x="4" y="4" width="56" height="56" fill="url(#ib-bg)"/>
|
|
16
|
+
<g filter="url(#ib-soft)">
|
|
17
|
+
<circle cx="20" cy="22" r="10.5" fill="#5b8def"/>
|
|
18
|
+
<circle cx="45" cy="29" r="12" fill="#8f6bff"/>
|
|
19
|
+
<circle cx="27" cy="47" r="11" fill="#39c0a4"/>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
<g fill="none" stroke="#ffffff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
23
|
+
<path d="M14 32c4.6-6.4 10.6-9.6 18-9.6S45.4 25.6 50 32c-4.6 6.4-10.6 9.6-18 9.6S18.6 38.4 14 32Z"/>
|
|
24
|
+
<circle cx="32" cy="32" r="4.6" fill="#ffffff" stroke="none"/>
|
|
25
|
+
</g>
|
|
26
|
+
</svg>
|
package/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host half of the `dsh-image-blur` bundle.
|
|
3
|
+
*
|
|
4
|
+
* Everything the plugin does happens in the browser: the Client module
|
|
5
|
+
* (`./client`, declared by `dsh.client` in package.json) installs the blur
|
|
6
|
+
* stylesheet, watches `<img>` nodes and draws the per-image 显示 / 模糊 button
|
|
7
|
+
* inside the `shell.overlay` slot.
|
|
8
|
+
*
|
|
9
|
+
* There is deliberately no Host tool, no route and no Config here: blur is a
|
|
10
|
+
* pure presentation effect, and a Host row that registers nothing keeps the
|
|
11
|
+
* bundle loadable in every profile that has the Client UI, including ones
|
|
12
|
+
* where the desktop-only services are missing.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export function apply() {}
|
package/locale/en.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Image Blur",
|
|
4
|
+
"description": "Blurs images in the conversation body only, until you click the Show button in the corner; the Blur button covers it again. Side panels, plugin pages and icons are left alone, and the image file is never modified."
|
|
5
|
+
},
|
|
6
|
+
"chip": {
|
|
7
|
+
"show": "Show",
|
|
8
|
+
"blur": "Blur",
|
|
9
|
+
"showTitle": "This image is blurred — click to show it",
|
|
10
|
+
"blurTitle": "Blur this image again",
|
|
11
|
+
"showAria": "Show this blurred image",
|
|
12
|
+
"blurAria": "Blur this image again"
|
|
13
|
+
},
|
|
14
|
+
"settings": {
|
|
15
|
+
"title": "Image blur",
|
|
16
|
+
"desc": "Images rendered in DSH are blurred by default; click “Show” in the corner to reveal, “Blur” to cover it again. The file itself is untouched.",
|
|
17
|
+
"offDesc": "Off: images render as-is and no Show / Blur button appears.",
|
|
18
|
+
"strength": "Strength",
|
|
19
|
+
"light": "Low",
|
|
20
|
+
"normal": "Medium",
|
|
21
|
+
"strong": "High"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/locale/zh.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "图片模糊",
|
|
4
|
+
"description": "只对会话正文里的图片生效:默认盖一层模糊,图片右上角点「显示」才看清、点「模糊」再盖回去;侧栏、右侧面板、插件页面一概不碰,图片文件本身也不会被改动。"
|
|
5
|
+
},
|
|
6
|
+
"chip": {
|
|
7
|
+
"show": "显示",
|
|
8
|
+
"blur": "模糊",
|
|
9
|
+
"showTitle": "这张图片已模糊,点击显示",
|
|
10
|
+
"blurTitle": "重新模糊这张图片",
|
|
11
|
+
"showAria": "显示这张被模糊的图片",
|
|
12
|
+
"blurAria": "重新模糊这张图片"
|
|
13
|
+
},
|
|
14
|
+
"settings": {
|
|
15
|
+
"title": "图片模糊",
|
|
16
|
+
"desc": "DSH 渲染的图片默认盖一层模糊;右上角点「显示」才看清,点「模糊」盖回去,图片文件本身不变。",
|
|
17
|
+
"offDesc": "已关闭:图片按原样显示,不出现「显示 / 模糊」按钮。",
|
|
18
|
+
"strength": "强度",
|
|
19
|
+
"light": "轻",
|
|
20
|
+
"normal": "中",
|
|
21
|
+
"strong": "强"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-image-blur",
|
|
3
|
+
"version": "0.2.6",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "DSH 插件:只对会话正文里的图片生效,默认盖一层模糊,图片右上角有「显示 / 模糊」按钮,点了「显示」才看清。",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "kangjun <kangjunwk@163.com>",
|
|
8
|
+
"homepage": "https://github.com/kandsome1/dsh-image-blur#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/kandsome1/dsh-image-blur.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/kandsome1/dsh-image-blur/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"dsh",
|
|
18
|
+
"dsh-plugin",
|
|
19
|
+
"deepseek-harness",
|
|
20
|
+
"image",
|
|
21
|
+
"blur",
|
|
22
|
+
"nsfw",
|
|
23
|
+
"chat-ui"
|
|
24
|
+
],
|
|
25
|
+
"main": "index.js",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": "./index.js",
|
|
28
|
+
"./client": "./client.js",
|
|
29
|
+
"./locale/*.json": "./locale/*.json",
|
|
30
|
+
"./icon": "./icon.svg"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"index.js",
|
|
34
|
+
"client.js",
|
|
35
|
+
"cordis.patch.yml",
|
|
36
|
+
"locale/*.json",
|
|
37
|
+
"icon.svg",
|
|
38
|
+
"docs/*.jpg",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"registry": "https://registry.npmjs.org/",
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"dsh": {
|
|
46
|
+
"bundle": {
|
|
47
|
+
"patch": "./cordis.patch.yml"
|
|
48
|
+
},
|
|
49
|
+
"client": {
|
|
50
|
+
"platform": "web",
|
|
51
|
+
"immediately": true,
|
|
52
|
+
"inject": [
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|