dsh-sidebar-fold 0.1.12 → 0.1.14

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/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ ## 0.1.14
4
+
5
+ - **CI 发版通道**:新增 `.github/workflows/release.yml`,打 tag 后由 GitHub Actions 依次完成
6
+ 版本对齐、门禁、`npm pack --dry-run`、幂等检查、`npm publish`、`dsh-*` 线标签同步与
7
+ GitHub Release(带 `Latest` 徽标)。
8
+ - **`scripts/release-notes.mjs`**:Release 正文生成器,优先级
9
+ `RELEASE-NOTES-v<ver>.md` > `CHANGELOG.md` 版本节 > tag 提交信息;正文短于 80 字符或命中
10
+ 空壳标记时拒绝写入,避免发布空壳 Release。
11
+ - **README 新增 Releases 一节**:写清本地 6 步与 CI 4 步的分界、dry_run 预演方式,以及
12
+ 幂等重跑与线标签降级行为。
13
+ - 本文件为首次引入;之后每个版本在顶部新增一节,CI 从该节取 Release 正文。
14
+
15
+ ## 0.1.13
16
+
17
+ - 折叠标记落在 panelEntry 包装层,避免与宿主行级 class 冲突(issue #2)。
18
+ - 新增第 10 种 runtime 字典 `pt`(巴西葡萄牙语),locale 文件与门禁同步到 10 种。
19
+ - README.pt.md 镜像翻译,`files[]` 收录。
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 drscrewdriver
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 drscrewdriver
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -95,7 +95,7 @@ the hide list.
95
95
  ```sh
96
96
  npm run build # scripts/build-client.mjs -> lib/client.js (module-loader bundle)
97
97
  npm run verify # gate: loader id === package name, dual-manifest same string,
98
- # no module request, no host primitives, 9 locales, no
98
+ # no module request, no host primitives, 10 locales, no
99
99
  # machine-absolute paths
100
100
  npm test # node --test on the pure seams (header split, nav fallback chain)
101
101
  npm run hosts:check # enumeration drift vs scripts/hosts.mjs (--write to repair)
@@ -103,6 +103,38 @@ npm run hosts:check # enumeration drift vs scripts/hosts.mjs (--write to repair
103
103
 
104
104
  `prepack` runs build + verify, so a stale `lib/client.js` cannot be published.
105
105
 
106
+ ## Releases
107
+
108
+ Releases are published by CI from a pushed tag; the local side only bumps and tags:
109
+
110
+ ```sh
111
+ npm run ci # 1 the gate, run locally first
112
+ # 2 bump package.json AND dsh.plugin.json to the same number
113
+ # 3 add the new version section at the top of CHANGELOG.md
114
+ git commit -am "release(0.1.14): ..." # 4 version and changes in one commit
115
+ git tag v0.1.14 # 5 the tag points at that commit
116
+ git push origin main v0.1.14 # 6 pushing the tag is the trigger
117
+ ```
118
+
119
+ `.github/workflows/release.yml` then does the rest: version alignment (tag / package.json /
120
+ `dsh.plugin.json`), dependency install, the gate, `npm pack --dry-run`, an idempotency guard
121
+ (`npm view <pkg>@<ver>`), `npm publish`, `dsh-*` line-tag sync with read-side retry, and the
122
+ GitHub Release carrying the `Latest` badge.
123
+
124
+ Two properties worth knowing before you tag:
125
+
126
+ - **Dry run first.** `gh workflow run release.yml -f tag=vX -f dry_run=true` runs every step
127
+ except publish / line-tag sync / Release, so a broken gate is found while the version is
128
+ still unpublished.
129
+ - **Re-publishing is idempotent.** If the version already exists in the registry the job skips
130
+ the publish block and warns instead of failing, so re-dispatching the same tag is safe.
131
+ A line-tag sync failure only warns (publish has already succeeded) and the job summary
132
+ prints the local repair command.
133
+
134
+ Release notes are built by `scripts/release-notes.mjs`: `RELEASE-NOTES-v<ver>.md` > the version
135
+ section of `CHANGELOG.md` > the tag message, with a minimum body length so that an empty shell
136
+ cannot be published.
137
+
106
138
  ## Supported hosts
107
139
 
108
140
  **DSH hosts `>=0.2.1-rc.3 <0.3.0`** (the "More" row first ships in 0.2.1-rc.3; newer 0.2.x rcs stay installable without a republish). Single source of truth: `scripts/hosts.mjs` — `engines.dsh` carries that bounded range, `peerDependencies` keep the per-rc enumeration (npm resolution never assumes `includePrerelease`), and `dsh.plugin.json` mirrors the range; all generated, never hand-edited.
@@ -152,7 +184,7 @@ one segment) by design, so a regression shows up as “nothing happened”, not
152
184
  ```
153
185
  src/index.js host half: Config schema + no-op apply (no build step)
154
186
  src/client/constants.ts measured anchors, attribute marks, injected stylesheet
155
- src/client/locales.ts 9 runtime dictionaries (zh = key-set source of truth)
187
+ src/client/locales.ts 10 runtime dictionaries (zh = key-set source of truth)
156
188
  src/client/fold.ts nav location, header/group split, toggle mount, fold state
157
189
  src/client/settings-card.ts the bundle-page configuration card (plain DOM)
158
190
  src/client/index.ts apply: fold first, then the guarded settings waists
package/README.pt.md ADDED
@@ -0,0 +1,171 @@
1
+ # dsh-sidebar-fold
2
+
3
+ [![npm version](https://img.shields.io/npm/v/dsh-sidebar-fold?color=4d6bfe)](https://www.npmjs.com/package/dsh-sidebar-fold)
4
+ [![license](https://img.shields.io/npm/l/dsh-sidebar-fold)](https://github.com/drscrewdriver/dsh-sidebar-fold/blob/main/LICENSE)
5
+
6
+ Recolhe as entradas adicionadas à barra lateral na linha **“Mais”** que já vem no host.
7
+
8
+ A lista *Painéis globais* da coluna esquerda cresce a cada plugin instalado: tarefas
9
+ agendadas, equipes de agentes, o mercado de plugins, páginas de contexto, … O
10
+ `dsh-sidebar-fold` coloca um **comutador de seta quadrada de 28×28** na extremidade direita
11
+ da linha “Mais” do host. Um clique recolhe essas linhas adicionadas, deixando apenas a linha
12
+ “Mais”; a seta inverte de ▲ (pode recolher) para ▼ (pode expandir) e um segundo clique traz as
13
+ linhas de volta.
14
+
15
+ - **Não invasivo** — um plugin de cliente que apenas acrescenta DOM. O bundle do host nunca é
16
+ modificado, nada em `app.asar` é tocado e desinstalar restaura a barra lateral exatamente como
17
+ veio de fábrica (a própria tag `<style>` e as marcas `data-dshsf-*` são removidas).
18
+ - **Detecção estrutural do cabeçalho** — a linha de cabeçalho é o `panelRow` que carrega
19
+ `aria-haspopup="menu"` dentro da navegação “Global panels”, o que independe do idioma e da
20
+ ordem de registro dos plugins.
21
+ - **Estado por janela** — a escolha entre recolhida e aberta persiste em `localStorage`, de modo
22
+ que um recarregamento a mantém.
23
+ - **Chave de alinhamento** — as linhas gerenciadas (incluída a linha “Mais”) podem pôr seu par
24
+ ícone + rótulo **à esquerda / centralizado / à direita**. Em `right` o comutador se espelha para a
25
+ extremidade esquerda da linha, para nunca cobrir o texto; a sobrescrita é um único
26
+ `justify-content` por extenso e não mexe em `display`/`gap`/altura da linha.
27
+ - **Três estados por linha (host 0.2.2 em diante)** — cada linha do cartão de configurações elege
28
+ um entre **Mostrar** (sempre visível), **Recolher** (pode ser recolhida) ou **Ocultar em «Mais»**
29
+ (entregar a linha à própria lista “Mais” do host, isto é, à ação de desafixação dele). Uma linha
30
+ oculta sai da coluna e aparece no menu “Mais”, de onde o controle de fixação do próprio host a
31
+ traz de volta; o plugin reconcilia os dois lados na inicialização, a cada escrita de configuração
32
+ e a cada repintura da barra lateral — inclusive depois de um recarregamento, em que a tabela de
33
+ fixações em memória do host volta vazia.
34
+ - **Configurável** — o estado padrão, os controles de linha em três estados e o alinhamento das
35
+ linhas vivem no cartão de configurações do plugin (`Config` do host, `.volatile()`, aplicado sem
36
+ reiniciar).
37
+ - **Seguro no rail** — quando a barra lateral é recolhida ao rail de ícones de 36 px, o comutador é
38
+ removido e todas as linhas voltam a ser mostradas: sem espremer, sem estado meio oculto.
39
+ - **Degradação silenciosa** — se a DOM do host divergir e os âncoras não forem encontrados, o
40
+ plugin fica de fora em vez de quebrar a barra lateral (`dsh-sidebar-fold:
41
+ fold installed { mounted: false }` no console conta o que aconteceu).
42
+
43
+ ## Capturas de tela
44
+
45
+ Expandida, linhas centralizadas — o comutador fica na linha Mais e as linhas adicionadas são listadas:
46
+
47
+ ![expandida e centralizada](assets/middle.png)
48
+
49
+ Recolhida — apenas a linha do plugin e a linha Mais permanecem:
50
+
51
+ ![recolhida](assets/fold.png)
52
+
53
+ ## Instalação
54
+
55
+ ```sh
56
+ # canal npm (após o lançamento)
57
+ dsh plugin --profile <profile> add dsh-sidebar-fold
58
+
59
+ # compilação local
60
+ npm run build && npm run verify
61
+ npm pack --pack-destination .
62
+ dsh plugin --profile <profile> add ./dsh-sidebar-fold-0.1.2.tgz
63
+ ```
64
+
65
+ Depois adicione `dsh-sidebar-fold` à lista `dsh.profile.bundles` do perfil (ou ative o
66
+ bundle no app) e reinicie. No perfil desktop, encerre o app Electron antes de editar o
67
+ `package.json` dele — o app em execução reescreve esse arquivo e desfaz edições externas.
68
+
69
+ ## Configurações
70
+
71
+ Abra **Plugins → dsh-sidebar-fold** (o cartão é registrado no assento
72
+ `plugins.bundle.config`, chaveado pelo nome do pacote), ou clique em
73
+ **“Configurações de recolhimento da barra lateral” no rodapé do menu “Mais” da barra
74
+ lateral**: essa linha fica no assento `sidebar.panellist.actions` e salta com o
75
+ `pluginNavigation.openBundle(package)` do próprio host, compartilhando assim a caminhada de
76
+ teclado e o caminho de dispensa do menu; um host sem esse serviço cai na seleção do painel Plugins.
77
+
78
+ | Campo | Significado | Padrão |
79
+ |---|---|---|
80
+ | Recolhido por padrão | Estado em que uma janela inicia quando não tem registro local | desligado |
81
+ | Alinhamento das linhas | Controle segmentado em três vias (esquerda / centro / direita) para as linhas gerenciadas; a linha “Mais” segue a mesma configuração | esquerda |
82
+ | Entradas (uma por linha) | **Mostrar** = sempre visível; **Recolher** = pode ser recolhida (padrão); **Ocultar em «Mais»** = movê-la para o menu “Mais” do host | Recolher |
83
+
84
+ A lista de linhas é lida da DOM no momento da abertura, então um painel instalado depois
85
+ aparece sem editar nada. Quando toda linha está em Mostrar, o comutador se esmaece e
86
+ reporta `aria-disabled="true"` em vez de girar uma seta sobre uma lista inalterada.
87
+
88
+ “Ocultar em «Mais»” exige a estrutura de linha da 0.2.2 (`div._panelEntry` mais o controle de
89
+ fixação dentro da linha): na linha 0.2.1 esse único segmento fica desabilitado no cartão enquanto
90
+ os outros dois continuam funcionando. A tabela de fixações do host existe **apenas em memória**
91
+ (um recarregamento começa vazia), então o plugin reconcilia a cada varredura: uma linha que deveria
92
+ estar oculta mas ainda está na coluna tem seu controle de desafixação clicado, e um rótulo oculto
93
+ cuja linha voltou é removido da lista de ocultação.
94
+
95
+ ## Desenvolvimento
96
+
97
+ ```sh
98
+ npm run build # scripts/build-client.mjs -> lib/client.js (bundle do module-loader)
99
+ npm run verify # gate: loader id === nome do pacote, dois manifestos na mesma string,
100
+ # nenhuma requisição de módulo, nenhum primitive de host,
101
+ # 10 locales, nenhum caminho absoluto de máquina
102
+ npm test # node --test nas costuras puras (divisão do cabeçalho, cadeia de
103
+ # fallback da navegação)
104
+ npm run hosts:check # drift de enumeração vs scripts/hosts.mjs (--write para reparar)
105
+ ```
106
+
107
+ `prepack` roda build + verify, então um `lib/client.js` obsoleto não pode ser publicado.
108
+
109
+ ## Hosts suportados
110
+
111
+ **Hosts DSH `>=0.2.1-rc.3 <0.3.0`** (a linha "Mais" surge pela primeira vez em 0.2.1-rc.3; os rc 0.2.x
112
+ mais recentes continuam instaláveis sem um novo lançamento). Fonte única de verdade: `scripts/hosts.mjs`
113
+ — `engines.dsh` carrega esse intervalo limitado, `peerDependencies` mantêm a enumeração por rc (a
114
+ resolução do npm nunca assume `includePrerelease`) e `dsh.plugin.json` espelha o intervalo; tudo gerado,
115
+ nunca editado à mão.
116
+
117
+ Por que o piso é 0.2.1-rc.3: a montagem precisa da lista de painéis da barra lateral **e** da linha
118
+ "Mais" que vem no host. Medido em todo `dsh-client-ui-sidebar` rc publicado:
119
+
120
+ | linha do host | lista de painéis | linha "Mais" | wrapper de linha / controle de fixação na linha |
121
+ |---|---|---|---|
122
+ | 0.1.0-rc.8 / 0.1.1-rc.2 / 0.1.2-rc.1 | não | não | — |
123
+ | 0.1.5-rc.3 / 0.1.7-rc.2 / 0.2.0-rc.2 | sim | não | — |
124
+ | 0.2.1-rc.1 / 0.2.1-rc.2 | sim | não | — |
125
+ | 0.2.1-rc.3 | sim | sim | não |
126
+ | 0.2.2-rc.3 (DOM verificado em 2026-11-14) | sim | sim | **sim** (`div._panelEntry` + `button._panelUnpin`, `button._pinButton` dentro do menu) |
127
+
128
+ Numa linha sem a linha Mais o plugin degrada silenciosamente — não injeta nada e deixa a barra
129
+ lateral como veio. Declarar um host assim só faria o usuário instalar um plugin que não faz nada.
130
+
131
+ **Duas diferenças medidas na linha 0.2.2** (ambas verificadas em 0.2.2-rc.3):
132
+
133
+ 1. Uma linha é envolvida por `div._panelEntry` e carrega o próprio controle de desafixação do host.
134
+ A marca de recolhimento, portanto, tem de cair no **wrapper**: ocultar apenas o
135
+ `button._panelRow` interno deixava um slot vazio de 32 px (mais um alfinete que aparece no hover)
136
+ para trás — a regressão real que a v0.1.6 mostrou em hosts mais novos.
137
+ 2. A ação de desafixar do host *é* “ocultar em Mais”: uma linha desafixada é filtrada da navegação e
138
+ renderizada por `sidebar.panellist.actions` no menu “Mais” (cada linha com um controle de
139
+ fixar de volta). Essa tabela de fixações fica em memória e nunca é persistida, então o plugin
140
+ mantém duas listas de rótulos (`keepLabels` / `hideLabels`) como fonte de verdade e reconcilia.
141
+
142
+ Depois de uma atualização de host, rode de novo o teste de fumaça no navegador antes de alargar esta
143
+ lista: os hashes do CSS-module driftam a cada build (rc.2 emitia `wtg9ga_`, os runtimes
144
+ 0.2.1/0.2.2 rc.3 emitem `hHd-Xa_`), então apenas os seletores por fragmento (`_panelList`, `_panelRow`,
145
+ `_moreAnchor`, `_collapsed`, `_panelEntry`, `_panelUnpin`, `_pinButton`) são estáveis.
146
+
147
+ ## Guarda de atualização
148
+
149
+ Os hashes do CSS-module do host driftam a cada build (`wtg9ga_` na rc.2 → `hHd-Xa_` nos runtimes
150
+ 0.2.1/0.2.2 rc.3), por isso todo seletor casa um *fragmento* (`_panelList`, `_panelRow`,
151
+ `_moreAnchor`, `_collapsed`, `_panelEntry`, `_panelUnpin`, `_pinButton`). **Depois de qualquer troca de
152
+ versão do host, rode o smoke no navegador** antes de assumir que os três caminhos continuam de pé: a
153
+ montagem do recolhimento, a escrita em três estados e ocultar/refixar. O plugin degrada
154
+ silenciosamente (ou desabilita um segmento) por design, então uma regressão aparece como “não
155
+ aconteceu nada”, não como erro.
156
+
157
+ ## Estrutura
158
+
159
+ ```
160
+ src/index.js metade host: schema Config + apply no-op (sem etapa de build)
161
+ src/client/constants.ts âncoras medidas, marcas de atributo, folha de estilo injetada
162
+ src/client/locales.ts 10 dicionários de runtime (o conjunto de chaves zh é a fonte de verdade)
163
+ src/client/fold.ts localização da navegação, divisão cabeçalho/grupo, montagem do comutador, estado
164
+ src/client/settings-card.ts o cartão de configuração da página do bundle (DOM puro)
165
+ src/client/index.ts apply: primeiro o recolhimento, depois as cinturas de configuração guardadas
166
+ scripts/ build-client / verify / sync-hosts / hosts / gen-locale-meta
167
+ ```
168
+
169
+ ## Licença
170
+
171
+ MIT
package/README.zh.md CHANGED
@@ -78,7 +78,7 @@ key 为包名);或点侧栏 **「更多」菜单最下面的「侧栏折叠
78
78
  ```sh
79
79
  npm run build # scripts/build-client.mjs -> lib/client.js(模块加载器 bundle)
80
80
  npm run verify # 门禁:loader id === 包名、双清单同串、无模块请求、
81
- # 不引宿主 primitives、9 语词典、无机器绝对路径
81
+ # 不引宿主 primitives、10 语词典、无机器绝对路径
82
82
  npm test # node --test,覆盖纯逻辑面(头行/分组划分、nav 回退链)
83
83
  npm run hosts:check # 与 scripts/hosts.mjs 的枚举漂移检查(--write 修复)
84
84
  ```
package/cordis.patch.yml CHANGED
@@ -1,17 +1,17 @@
1
- # dsh-sidebar-fold bundle patch
2
- #
3
- # Assembly layer for the DSH profiles whose bundle list includes this package.
4
- # A pure ADDITION: one insert row carrying an id no shipped entry uses. No
5
- # shipped row is disabled, renamed, or reconfigured here, so the patch stays
6
- # safe to compose with any other plugin's patch.
7
- #
8
- # The row exists so the loader has a host-side entry point (src/index.js, which
9
- # installs nothing) and so the bundle's settings namespace is served under this
10
- # package's name; every behaviour lives in the browser half (lib/client.js).
11
- #
12
- # Install (recommended, official CLI):
13
- # dsh plugin --profile <profile> add dsh-sidebar-fold
14
-
15
- - insert:
16
- - id: dsh-sidebar-fold
17
- name: dsh-sidebar-fold
1
+ # dsh-sidebar-fold bundle patch
2
+ #
3
+ # Assembly layer for the DSH profiles whose bundle list includes this package.
4
+ # A pure ADDITION: one insert row carrying an id no shipped entry uses. No
5
+ # shipped row is disabled, renamed, or reconfigured here, so the patch stays
6
+ # safe to compose with any other plugin's patch.
7
+ #
8
+ # The row exists so the loader has a host-side entry point (src/index.js, which
9
+ # installs nothing) and so the bundle's settings namespace is served under this
10
+ # package's name; every behaviour lives in the browser half (lib/client.js).
11
+ #
12
+ # Install (recommended, official CLI):
13
+ # dsh plugin --profile <profile> add dsh-sidebar-fold
14
+
15
+ - insert:
16
+ - id: dsh-sidebar-fold
17
+ name: dsh-sidebar-fold
package/dsh.plugin.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-sidebar-fold",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "main": "./src/index.js",
5
5
  "description": "折叠左侧栏加项入口:在宿主「更多」行挂一个 28×28 方形箭头按钮,把自动化任务、agent 团队、插件市场、上下文页等加项面板行收纳成一行;设置卡每行三档:显示(一直显示)/ 折叠(允许折叠)/ 隐藏到更多(移进宿主「更多」菜单,宿主 0.2.2 起)。还可调默认态与行内文字图标对齐(左/居中/右)。",
6
6
  "engines": {
7
- "dsh": ">=0.2.1-rc.3 <0.3.0"
7
+ "dsh": ">=0.2.1-rc.3 <0.3.0-0"
8
8
  },
9
9
  "contributes": {
10
10
  "tools": [],
package/lib/client.js CHANGED
@@ -307,7 +307,7 @@ window.__ModuleLoader__.load({
307
307
  rule(`.${CLS.menuIcon}`, ['flex:none', 'display:block']),
308
308
  ].join('');
309
309
  /**
310
- * Runtime dictionaries for the browser half (9 languages, zh key set is the
310
+ * Runtime dictionaries for the browser half (10 languages, zh key set is the
311
311
  * source of truth — `dsh-plugin-dev` §4).
312
312
  *
313
313
  * These strings are ours: the toggle's accessible name and the settings card.
@@ -558,8 +558,36 @@ window.__ModuleLoader__.load({
558
558
  'settings.alignEnd': 'Derecha',
559
559
  'settings.readonly': 'Este host no expone una superficie de configuración editable; se muestran los valores predeterminados.',
560
560
  };
561
+ /** Brazilian Portuguese dictionary, checked complete against the zh key set. */
562
+ const pt = {
563
+ 'fold.nothing': 'Não há entradas para recolher agora',
564
+ 'fold.expand': 'Expandir mais entradas da barra lateral',
565
+ 'fold.collapse': 'Recolher mais entradas da barra lateral',
566
+ 'menu.settings': 'Configurações de recolhimento da barra lateral',
567
+ 'settings.defaultFolded': 'Recolhido por padrão',
568
+ 'settings.defaultFoldedHint': 'Estado inicial de uma janela sem registro local',
569
+ 'settings.rows': 'Entradas',
570
+ 'settings.rowsHint': 'Três estados por linha: Mostrar mantém a linha sempre visível; Recolher permite o recolhimento; Ocultar em «Mais» move a linha para o menu «Mais».',
571
+ 'settings.rowAlways': 'Mostrar',
572
+ 'settings.rowFold': 'Recolher',
573
+ 'settings.rowMore': 'Ocultar em «Mais»',
574
+ 'settings.rowHint': 'Mostrar = sempre visível; Recolher = pode ser recolhida',
575
+ 'settings.rowsEmpty': 'A barra lateral não tem entradas gerenciáveis no momento.',
576
+ 'settings.moreUnavailable': 'Este host não oculta entradas em «Mais» (requer a barra lateral 0.2.2 ou mais recente).',
577
+ 'settings.moreFixed': 'Entrada fixa do host: não pode ser ocultada em «Mais».',
578
+ 'settings.saving': 'Salvando…',
579
+ 'settings.saved': 'Salvo',
580
+ 'settings.saveFailed': 'Falha ao salvar: aplicado na barra lateral, mas o host não gravou em disco.',
581
+ 'settings.retrySave': 'Tentar salvar novamente',
582
+ 'settings.align': 'Alinhamento do texto e do ícone',
583
+ 'settings.alignHint': 'Vale para as linhas de entrada gerenciadas pelo recolhimento na barra lateral; a linha «Mais» segue o mesmo alinhamento.',
584
+ 'settings.alignStart': 'Esquerda',
585
+ 'settings.alignCenter': 'Centralizado',
586
+ 'settings.alignEnd': 'Direita',
587
+ 'settings.readonly': 'Este host não expõe uma superfície de configuração editável; são exibidos os valores padrão incorporados.',
588
+ };
561
589
  /** Registered dictionaries, zh first (the truth source). */
562
- const languages = ['zh', 'en', 'ja', 'ko', 'fr', 'de', 'it', 'ru', 'es'];
590
+ const languages = ['zh', 'en', 'ja', 'ko', 'fr', 'de', 'it', 'ru', 'es', 'pt'];
563
591
  /** All dictionaries keyed by language (not by text key — mixing those up is a type error). */
564
592
  const dictionaries = {
565
593
  zh,
@@ -571,6 +599,7 @@ window.__ModuleLoader__.load({
571
599
  it,
572
600
  ru,
573
601
  es,
602
+ pt,
574
603
  };
575
604
  /**
576
605
  * Pick the dictionary for the shell's current language.
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Recolhimento de «Mais» da barra lateral",
4
+ "description": "Adiciona um comutador de seta quadrada na linha «Mais» para recolher as linhas de painéis adicionados da barra lateral em uma única linha; estado padrão e lista de exceções configuráveis."
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-sidebar-fold",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Folds the sidebar's add-on panel rows under the shipped \"More\" row, and from host 0.2.2 on gives every row three states — show, fold, or hide in the host's own \"More\" list. The fold state persists per window, rows are read from the live sidebar, and the managed rows' icon + label can be aligned left, centre or right.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -19,7 +19,9 @@
19
19
  "cordis.patch.yml",
20
20
  "dsh.plugin.json",
21
21
  "README.md",
22
- "README.zh.md"
22
+ "CHANGELOG.md",
23
+ "README.zh.md",
24
+ "README.pt.md"
23
25
  ],
24
26
  "dsh": {
25
27
  "bundle": {
@@ -57,7 +59,7 @@
57
59
  ],
58
60
  "engines": {
59
61
  "node": ">=22.6.0",
60
- "dsh": ">=0.2.1-rc.3 <0.3.0"
62
+ "dsh": ">=0.2.1-rc.3 <0.3.0-0"
61
63
  },
62
64
  "license": "MIT",
63
65
  "repository": {
@@ -73,7 +75,7 @@
73
75
  "@deepseek-ai/schemastery": "^3.18.4"
74
76
  },
75
77
  "peerDependencies": {
76
- "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3"
78
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5"
77
79
  },
78
80
  "devDependencies": {
79
81
  "@types/node": "^22.20.5",
package/screenshots.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "screenshots": [
3
- "assets/middle.png",
4
- "assets/fold.png"
5
- ]
6
- }
1
+ {
2
+ "screenshots": [
3
+ "assets/middle.png",
4
+ "assets/fold.png"
5
+ ]
6
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Runtime dictionaries for the browser half (9 languages, zh key set is the
2
+ * Runtime dictionaries for the browser half (10 languages, zh key set is the
3
3
  * source of truth — `dsh-plugin-dev` §4).
4
4
  *
5
5
  * These strings are ours: the toggle's accessible name and the settings card.
@@ -263,8 +263,37 @@ export const es: Record<LocaleKey, string> = {
263
263
  'settings.readonly': 'Este host no expone una superficie de configuración editable; se muestran los valores predeterminados.',
264
264
  }
265
265
 
266
+ /** Brazilian Portuguese dictionary, checked complete against the zh key set. */
267
+ export const pt: Record<LocaleKey, string> = {
268
+ 'fold.nothing': 'Não há entradas para recolher agora',
269
+ 'fold.expand': 'Expandir mais entradas da barra lateral',
270
+ 'fold.collapse': 'Recolher mais entradas da barra lateral',
271
+ 'menu.settings': 'Configurações de recolhimento da barra lateral',
272
+ 'settings.defaultFolded': 'Recolhido por padrão',
273
+ 'settings.defaultFoldedHint': 'Estado inicial de uma janela sem registro local',
274
+ 'settings.rows': 'Entradas',
275
+ 'settings.rowsHint': 'Três estados por linha: Mostrar mantém a linha sempre visível; Recolher permite o recolhimento; Ocultar em «Mais» move a linha para o menu «Mais».',
276
+ 'settings.rowAlways': 'Mostrar',
277
+ 'settings.rowFold': 'Recolher',
278
+ 'settings.rowMore': 'Ocultar em «Mais»',
279
+ 'settings.rowHint': 'Mostrar = sempre visível; Recolher = pode ser recolhida',
280
+ 'settings.rowsEmpty': 'A barra lateral não tem entradas gerenciáveis no momento.',
281
+ 'settings.moreUnavailable': 'Este host não oculta entradas em «Mais» (requer a barra lateral 0.2.2 ou mais recente).',
282
+ 'settings.moreFixed': 'Entrada fixa do host: não pode ser ocultada em «Mais».',
283
+ 'settings.saving': 'Salvando…',
284
+ 'settings.saved': 'Salvo',
285
+ 'settings.saveFailed': 'Falha ao salvar: aplicado na barra lateral, mas o host não gravou em disco.',
286
+ 'settings.retrySave': 'Tentar salvar novamente',
287
+ 'settings.align': 'Alinhamento do texto e do ícone',
288
+ 'settings.alignHint': 'Vale para as linhas de entrada gerenciadas pelo recolhimento na barra lateral; a linha «Mais» segue o mesmo alinhamento.',
289
+ 'settings.alignStart': 'Esquerda',
290
+ 'settings.alignCenter': 'Centralizado',
291
+ 'settings.alignEnd': 'Direita',
292
+ 'settings.readonly': 'Este host não expõe uma superfície de configuração editável; são exibidos os valores padrão incorporados.',
293
+ }
294
+
266
295
  /** Registered dictionaries, zh first (the truth source). */
267
- export const languages = ['zh', 'en', 'ja', 'ko', 'fr', 'de', 'it', 'ru', 'es'] as const
296
+ export const languages = ['zh', 'en', 'ja', 'ko', 'fr', 'de', 'it', 'ru', 'es', 'pt'] as const
268
297
 
269
298
  /** One of the supported language tags. */
270
299
  export type Language = (typeof languages)[number]
@@ -280,6 +309,7 @@ export const dictionaries: Record<Language, Record<LocaleKey, string>> = {
280
309
  it,
281
310
  ru,
282
311
  es,
312
+ pt,
283
313
  }
284
314
 
285
315
  /**