dsh-movable-settings 1.0.0 → 1.1.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/README.md +8 -4
- package/client.js +61 -1
- package/locale/de.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,6 +79,8 @@ Plugins are installed per profile, so every session in that profile gets it.
|
|
|
79
79
|
- **主题一致 / Theme-consistent**:颜色 / 圆角 / 边框只用 `--dsw-alias-*`、`--dsw-radius-*` 主题 token。
|
|
80
80
|
- **提示不误报 / No misleading tooltips**:拖动气泡只出现在能力真正生效的条带容器上,并对容器内无自带 `title` 的交互后代写入 `title=""` 阻断继承;`unbind` / `dispose` 时按原值逐一还原所有被改过的节点(实际改写集合 `titleTouched` + 原值表 `titleBackups`),节点中途脱离文档再复用也不会残留 `title=""`。
|
|
81
81
|
- **完全可回收 / Fully reversible**:`dispose` 时移除注入的 `<style>`、observer、所有监听器、交互层节点与内联覆盖样式。
|
|
82
|
+
- **语言覆盖 / Locale coverage**:内置 `zh`、`en`、`de`、`es`、`fr`、`ja`、`pt`、`ru` 共 8 种语言的文案字典(与 DSH 运行时内置语言一致),由 `scope.locale.register` 一次性注册;未启用的语言包按上游 fallback 链回落到 `en`,locale 服务未就绪时仍用内置中文兜底。
|
|
83
|
+
Built-in dictionaries for all 8 languages DSH ships with (`zh`, `en`, `de`, `es`, `fr`, `ja`, `pt`, `ru`), registered in one `scope.locale.register` call; disabled language packs fall back to `en`, and the inline Chinese dictionary still backs up an unavailable locale service.
|
|
82
84
|
|
|
83
85
|
## 文件 / Files
|
|
84
86
|
|
|
@@ -86,9 +88,11 @@ Plugins are installed per profile, so every session in that profile gets it.
|
|
|
86
88
|
package.json 清单(dsh.bundle.patch + dsh.client)
|
|
87
89
|
cordis.patch.yml Loader 补丁,插入 id=movable-settings 的插件行
|
|
88
90
|
index.js Host 半区(空壳:能力全在 Client 半区)
|
|
89
|
-
client.js 核心实现(DOM 增强 + settings.action
|
|
90
|
-
locale/zh.json
|
|
91
|
-
locale/en.json
|
|
91
|
+
client.js 核心实现(DOM 增强 + settings.action 最大化/重置按钮 + 8 语言内置字典)
|
|
92
|
+
locale/zh.json 插件显示名与描述(中文 / Chinese)
|
|
93
|
+
locale/en.json 插件显示名与描述(英文 / English)
|
|
94
|
+
locale/{ja,de,es,fr,ru,pt}.json 同上的日语 / 德语 / 西班牙语 / 法语 / 俄语 / 葡萄牙语版本
|
|
95
|
+
same title & description in Japanese, German, Spanish, French, Russian and Portuguese
|
|
92
96
|
icon.svg 插件图标
|
|
93
97
|
LICENSE MIT 许可证
|
|
94
98
|
test/dom-stub.mjs 最小 DOM 桩
|
|
@@ -99,7 +103,7 @@ test/enhancer.test.mjs 行为测试(node:test)
|
|
|
99
103
|
|
|
100
104
|
```bash
|
|
101
105
|
npm run check # node --check index.js client.js
|
|
102
|
-
npm test #
|
|
106
|
+
npm test # 50 项行为与清单断言(node:test)
|
|
103
107
|
```
|
|
104
108
|
|
|
105
109
|
等价的细项 / equivalent commands:
|
package/client.js
CHANGED
|
@@ -99,6 +99,66 @@ window.__ModuleLoader__.load({
|
|
|
99
99
|
'tooltip.dragMaximize': 'Drag to move · double-click to maximize',
|
|
100
100
|
'tooltip.dragRestore': 'Drag to move · double-click to restore',
|
|
101
101
|
};
|
|
102
|
+
const de = {
|
|
103
|
+
'action.reset': 'Position und Größe des Einstellungsdialogs zurücksetzen',
|
|
104
|
+
'action.reset.short': 'Position zurücksetzen',
|
|
105
|
+
'action.maximize': 'Einstellungsdialog maximieren (auch per Doppelklick auf die Titelleiste)',
|
|
106
|
+
'action.maximize.short': 'Maximieren',
|
|
107
|
+
'action.restore': 'Einstellungsdialog wiederherstellen (auch per Doppelklick auf die Titelleiste)',
|
|
108
|
+
'action.restore.short': 'Wiederherstellen',
|
|
109
|
+
'tooltip.dragMaximize': 'Ziehen zum Verschieben · Doppelklick zum Maximieren',
|
|
110
|
+
'tooltip.dragRestore': 'Ziehen zum Verschieben · Doppelklick zum Wiederherstellen',
|
|
111
|
+
};
|
|
112
|
+
const es = {
|
|
113
|
+
'action.reset': 'Restablecer la posición y el tamaño del diálogo de ajustes',
|
|
114
|
+
'action.reset.short': 'Restablecer posición',
|
|
115
|
+
'action.maximize': 'Maximizar el diálogo de ajustes (también con doble clic en la barra de título)',
|
|
116
|
+
'action.maximize.short': 'Maximizar',
|
|
117
|
+
'action.restore': 'Restaurar el diálogo de ajustes (también con doble clic en la barra de título)',
|
|
118
|
+
'action.restore.short': 'Restaurar',
|
|
119
|
+
'tooltip.dragMaximize': 'Arrastrar para mover · doble clic para maximizar',
|
|
120
|
+
'tooltip.dragRestore': 'Arrastrar para mover · doble clic para restaurar',
|
|
121
|
+
};
|
|
122
|
+
const fr = {
|
|
123
|
+
'action.reset': 'Réinitialiser la position et la taille de la boîte de dialogue des paramètres',
|
|
124
|
+
'action.reset.short': 'Réinitialiser la position',
|
|
125
|
+
'action.maximize': 'Agrandir la boîte de dialogue des paramètres (ou double-clic sur la barre de titre)',
|
|
126
|
+
'action.maximize.short': 'Agrandir',
|
|
127
|
+
'action.restore': 'Restaurer la boîte de dialogue des paramètres (ou double-clic sur la barre de titre)',
|
|
128
|
+
'action.restore.short': 'Restaurer',
|
|
129
|
+
'tooltip.dragMaximize': 'Glisser pour déplacer · double-clic pour agrandir',
|
|
130
|
+
'tooltip.dragRestore': 'Glisser pour déplacer · double-clic pour restaurer',
|
|
131
|
+
};
|
|
132
|
+
const ja = {
|
|
133
|
+
'action.reset': '設定ダイアログの位置とサイズをリセット',
|
|
134
|
+
'action.reset.short': '位置をリセット',
|
|
135
|
+
'action.maximize': '設定ダイアログを最大化(タイトルバーのダブルクリックでも可)',
|
|
136
|
+
'action.maximize.short': '最大化',
|
|
137
|
+
'action.restore': '設定ダイアログを元に戻す(タイトルバーのダブルクリックでも可)',
|
|
138
|
+
'action.restore.short': '元に戻す',
|
|
139
|
+
'tooltip.dragMaximize': 'ドラッグで移動 · ダブルクリックで最大化',
|
|
140
|
+
'tooltip.dragRestore': 'ドラッグで移動 · ダブルクリックで元に戻す',
|
|
141
|
+
};
|
|
142
|
+
const pt = {
|
|
143
|
+
'action.reset': 'Redefinir a posição e o tamanho da caixa de diálogo de configurações',
|
|
144
|
+
'action.reset.short': 'Redefinir posição',
|
|
145
|
+
'action.maximize': 'Maximizar a caixa de diálogo de configurações (ou clique duplo na barra de título)',
|
|
146
|
+
'action.maximize.short': 'Maximizar',
|
|
147
|
+
'action.restore': 'Restaurar a caixa de diálogo de configurações (ou clique duplo na barra de título)',
|
|
148
|
+
'action.restore.short': 'Restaurar',
|
|
149
|
+
'tooltip.dragMaximize': 'Arraste para mover · clique duplo para maximizar',
|
|
150
|
+
'tooltip.dragRestore': 'Arraste para mover · clique duplo para restaurar',
|
|
151
|
+
};
|
|
152
|
+
const ru = {
|
|
153
|
+
'action.reset': 'Сбросить положение и размер диалога настроек',
|
|
154
|
+
'action.reset.short': 'Сбросить положение',
|
|
155
|
+
'action.maximize': 'Развернуть диалог настроек (или дважды щёлкните по заголовку)',
|
|
156
|
+
'action.maximize.short': 'Развернуть',
|
|
157
|
+
'action.restore': 'Восстановить диалог настроек (или дважды щёлкните по заголовку)',
|
|
158
|
+
'action.restore.short': 'Восстановить',
|
|
159
|
+
'tooltip.dragMaximize': 'Перетащите, чтобы переместить · двойной щелчок — развернуть',
|
|
160
|
+
'tooltip.dragRestore': 'Перетащите, чтобы переместить · двойной щелчок — восстановить',
|
|
161
|
+
};
|
|
102
162
|
|
|
103
163
|
/** 兜底翻译:locale 服务未就绪时仍给出可读文案。 */
|
|
104
164
|
function fallbackTranslate(key) {
|
|
@@ -951,7 +1011,7 @@ window.__ModuleLoader__.load({
|
|
|
951
1011
|
const registerAction = function (scope) {
|
|
952
1012
|
if (!scope || typeof scope.effect !== 'function' || !scope.slots || !scope.locale) return;
|
|
953
1013
|
scope.effect(function () {
|
|
954
|
-
return scope.locale.register(NS, { zh
|
|
1014
|
+
return scope.locale.register(NS, { zh, en, de, es, fr, ja, pt, ru });
|
|
955
1015
|
}, 'dsh-movable-settings: dictionary');
|
|
956
1016
|
if (typeof scope.locale.bind === 'function') enhancer.setTranslator(scope.locale.bind(NS));
|
|
957
1017
|
scope.slots.inject('settings.action', function () {
|
package/locale/de.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Verschiebbarer Einstellungsdialog",
|
|
4
|
+
"description": "Einstellungsdialog ziehen, in acht Richtungen skalieren und per Doppelklick auf die Titelleiste maximieren; die Kopfzeile bietet Maximieren/Wiederherstellen und Zurücksetzen, und die Geometrie wird gemerkt."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/es.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Diálogo de ajustes movible",
|
|
4
|
+
"description": "Arrastra, cambia el tamaño en ocho direcciones y haz doble clic en la barra de título para maximizar el diálogo de ajustes; su cabecera incluye botones de maximizar/restaurar y restablecer, y la geometría se recuerda."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/fr.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Boîte de dialogue des paramètres déplaçable",
|
|
4
|
+
"description": "Déplacez, redimensionnez dans huit directions et double-cliquez sur la barre de titre pour agrandir la boîte de dialogue des paramètres ; son en-tête propose les boutons Agrandir/Restaurer et Réinitialiser, et sa géométrie est mémorisée."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/ja.json
ADDED
package/locale/pt.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Caixa de diálogo de configurações móvel",
|
|
4
|
+
"description": "Arraste, redimensione em oito direções e dê um clique duplo na barra de título para maximizar a caixa de diálogo de configurações; o cabeçalho traz botões de maximizar/restaurar e redefinir, e a geometria é lembrada."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/ru.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Перемещаемый диалог настроек",
|
|
4
|
+
"description": "Перетаскивайте, изменяйте размер в восьми направлениях и дважды щёлкните по заголовку, чтобы развернуть диалог настроек; в его шапке есть кнопки «Развернуть/Восстановить» и «Сбросить», а положение и размер запоминаются."
|
|
5
|
+
}
|
|
6
|
+
}
|