dsh-focus-overlay 0.4.0 → 0.5.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/client.js +2 -2
- package/lib/index.mjs +22 -2
- package/package.json +5 -2
package/lib/client.js
CHANGED
|
@@ -1111,9 +1111,9 @@ window.__ModuleLoader__.load({
|
|
|
1111
1111
|
}, () => (0, react.createElement)(FocusToggle, { t })));
|
|
1112
1112
|
ctx.slots.inject("settings.plugin.item", () => ctx.slots.register({
|
|
1113
1113
|
name: "settings.plugin.item",
|
|
1114
|
+
key: "dsh-focus-overlay",
|
|
1114
1115
|
id: "dsh-focus-overlay",
|
|
1115
|
-
order: 1e3
|
|
1116
|
-
label: () => t("settings.label")
|
|
1116
|
+
order: 1e3
|
|
1117
1117
|
}, () => (0, react.createElement)(FocusSettingsCard, { t })));
|
|
1118
1118
|
}
|
|
1119
1119
|
};
|
package/lib/index.mjs
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
+
import z from "@deepseek-ai/schemastery";
|
|
1
2
|
//#region src/index.mjs
|
|
2
|
-
|
|
3
|
+
/** Settings namespace owned by this plugin (must match /^[a-z][a-z0-9-]*$/). */
|
|
4
|
+
const NAMESPACE = "dsh-focus-overlay";
|
|
5
|
+
/** Durable settings schema; defaults mirror the browser localStorage DEFAULTS. */
|
|
6
|
+
const FocusSettingsSchema = z.object({
|
|
7
|
+
navbar: z.boolean().default(true),
|
|
8
|
+
scroll: z.union(["preserve", "bottom"]).default("preserve"),
|
|
9
|
+
width: z.number().default(760),
|
|
10
|
+
autoFocus: z.boolean().default(false)
|
|
11
|
+
});
|
|
12
|
+
function apply(ctx) {
|
|
13
|
+
ctx.inject(["settings"], (settingsCtx) => {
|
|
14
|
+
const settings = settingsCtx.settings;
|
|
15
|
+
if (!settings || typeof settings.register !== "function") return;
|
|
16
|
+
try {
|
|
17
|
+
settings.register(NAMESPACE, FocusSettingsSchema);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
console.warn("[dsh-focus-overlay] settings namespace registration failed:", error);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
3
23
|
//#endregion
|
|
4
|
-
export { apply as default };
|
|
24
|
+
export { FocusSettingsSchema, NAMESPACE, apply as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-focus-overlay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Focus Mode for the dsh web GUI: a full-screen reading overlay that hides chrome and folds the AI tool-call flow into summaries, reusing the official Markdown / image primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.mjs",
|
|
@@ -55,5 +55,8 @@
|
|
|
55
55
|
"type": "git",
|
|
56
56
|
"url": "https://github.com/boogoo619/dsh-focus-overlay.git"
|
|
57
57
|
},
|
|
58
|
-
"license": "MIT"
|
|
58
|
+
"license": "MIT",
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
61
|
+
}
|
|
59
62
|
}
|