dsh-extra-paths 0.3.0 → 0.3.1

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 CHANGED
@@ -225,6 +225,9 @@ name (`.git`, `.env`) is a name rule. Hand-written comments (`# …`) and blank
225
225
  common spellings (access levels, surfaces, bare-name rules, patterns, Windows/WSL paths) and the same defaults note.
226
226
  - **The base-workspace field** only feeds the preview and the host-side resolution — it is not part of the saved
227
227
  configuration.
228
+ - **Long rules stay on one line**: the editor never soft-wraps (and neither do the paths in the preview) — a long path
229
+ or pattern keeps its exact spelling and you scroll horizontally with the trackpad/mouse instead of reading a broken
230
+ wrap.
228
231
  - **Save** parses the whole text (all-or-nothing) and writes the structured `paths` array in one step; invalid lines are
229
232
  reported with their line number and nothing is saved. The host's refusal (a home/CLI override owns the namespace) is
230
233
  shown instead of silently pretending to save.
package/README.zh.md CHANGED
@@ -202,6 +202,8 @@ paths:
202
202
  - **内置示例**:编辑器上方有可展开的「示例与支持的写法」,列出常用形式(访问级别、作用面、名称规则、模式、
203
203
  Windows/WSL 路径),并同样写明默认值。
204
204
  - **基准工作区**只用于预览与宿主侧解析,不属于保存的配置内容。
205
+ - **长行不换行**:编辑器(以及预览里的路径)不会自动折行——长路径/模式保持原样,用触控板/鼠标横向滚动查看,
206
+ 避免断行后难以核对。
205
207
  - **保存** 一步解析整段文本(全有或全无)并写入结构化的 `paths` 数组;解析错误按行号提示、不保存任何内容。
206
208
  宿主拒绝写入(命名空间被 home/CLI 覆盖)时会明确显示原因,不会假装保存成功。
207
209
  - **解析预览**按草稿给出答案:生效可写根、只读根、被禁止的根、逐条状态(`[生效]`、`[缺失]`、`[已拒绝]`、
package/lib/client.js CHANGED
@@ -923,7 +923,11 @@ C:\work\shared | write
923
923
  fontFamily: "var(--dsh-font-mono, monospace)",
924
924
  fontSize: 12,
925
925
  lineHeight: 1.6,
926
- resize: "vertical"
926
+ resize: "vertical",
927
+ whiteSpace: "pre",
928
+ overflowWrap: "normal",
929
+ wordBreak: "normal",
930
+ overflowX: "auto"
927
931
  },
928
932
  textErrors: {
929
933
  display: "flex",
@@ -974,7 +978,7 @@ C:\work\shared | write
974
978
  code: {
975
979
  fontFamily: "var(--dsh-font-mono, monospace)",
976
980
  fontSize: 12,
977
- wordBreak: "break-all"
981
+ whiteSpace: "nowrap"
978
982
  },
979
983
  dim: {
980
984
  opacity: .6,
@@ -1071,7 +1075,8 @@ C:\work\shared | write
1071
1075
  align-items: baseline;
1072
1076
  font-size: 12px;
1073
1077
  }
1074
- .xp-entry-paths { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
1078
+ /* A resolved path is one token: never wrap it, scroll horizontally instead. */
1079
+ .xp-entry-paths { display: flex; gap: 6px; flex-wrap: nowrap; min-width: 0; overflow-x: auto; }
1075
1080
  `;
1076
1081
  //#endregion
1077
1082
  //#region src/client/page.tsx
@@ -1233,6 +1238,7 @@ C:\work\shared | write
1233
1238
  style: styles.textarea,
1234
1239
  rows: 12,
1235
1240
  spellCheck: false,
1241
+ wrap: "off",
1236
1242
  value,
1237
1243
  "aria-label": tr("textMode"),
1238
1244
  onChange: (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-extra-paths",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "配置一组额外可写根:fs 工具与受限 shell 首次尝试即可写、无需审批,带 Web 设置页与按目录结构锚定的路径模式。 · DSH plugin: configured extra writable roots for the fs tools and the sandboxed shell, with a Web settings page and structure-anchored path patterns.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",