dsh-coding-sidebar 1.0.3 → 1.0.5

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.
Files changed (94) hide show
  1. package/README.md +27 -42
  2. package/lib/client-editor.js +315 -4179
  3. package/lib/client-registry.js +913 -1303
  4. package/lib/client-terminal.js +189 -261
  5. package/lib/client.js +911 -1301
  6. package/lib/index.js +13 -110
  7. package/lib/types/bundle-route.d.ts +1 -1
  8. package/lib/types/client/LiveView.d.ts +1 -0
  9. package/lib/types/client/SideCardSection.d.ts +3 -3
  10. package/lib/types/client/TextEditor.d.ts +20 -10
  11. package/lib/types/client/add-plugin-modal.d.ts +0 -4
  12. package/lib/types/client/api.d.ts +16 -11
  13. package/lib/types/client/builtins/index.d.ts +10 -10
  14. package/lib/types/client/chunk-loader.d.ts +7 -8
  15. package/lib/types/client/locales.d.ts +6 -26
  16. package/lib/types/client/native-avoid.d.ts +2 -0
  17. package/lib/types/client/plugins-shared.d.ts +6 -6
  18. package/lib/types/client/service.d.ts +13 -83
  19. package/lib/types/index.d.ts +1 -1
  20. package/lib/types/prefs-shared.d.ts +1 -24
  21. package/lib/types/wire.d.ts +1 -1
  22. package/package.json +26 -29
  23. package/src/bundle-route.ts +1 -1
  24. package/src/client/BrowserView.tsx +18 -2
  25. package/src/client/EditorHost.tsx +52 -122
  26. package/src/client/LiveView.tsx +229 -0
  27. package/src/client/SandboxStatusBar.tsx +12 -9
  28. package/src/client/SideCardSection.tsx +28 -81
  29. package/src/client/TextEditor.tsx +89 -266
  30. package/src/client/add-plugin-modal.tsx +16 -24
  31. package/src/client/api.ts +4 -25
  32. package/src/client/builtins/index.ts +10 -14
  33. package/src/client/chunk-loader.ts +7 -8
  34. package/src/client/index.tsx +12 -3
  35. package/src/client/locales-ar.ts +0 -6
  36. package/src/client/locales-de.ts +0 -6
  37. package/src/client/locales-fr.ts +0 -6
  38. package/src/client/locales-hi.ts +0 -6
  39. package/src/client/locales-id.ts +0 -6
  40. package/src/client/locales-it.ts +0 -6
  41. package/src/client/locales-ja.ts +0 -6
  42. package/src/client/locales-ko.ts +0 -6
  43. package/src/client/locales-nl.ts +0 -6
  44. package/src/client/locales-pl.ts +0 -6
  45. package/src/client/locales-pt.ts +0 -6
  46. package/src/client/locales-ru.ts +0 -6
  47. package/src/client/locales-sv.ts +0 -6
  48. package/src/client/locales-th.ts +0 -6
  49. package/src/client/locales-tr.ts +0 -6
  50. package/src/client/locales-vi.ts +0 -6
  51. package/src/client/locales-zh-HK.ts +0 -6
  52. package/src/client/locales-zh-MO.ts +0 -6
  53. package/src/client/locales-zh-TW.ts +0 -6
  54. package/src/client/locales.ts +12 -52
  55. package/src/client/native-avoid.ts +155 -0
  56. package/src/client/plugins-shared.ts +6 -6
  57. package/src/client/prefs.ts +0 -7
  58. package/src/client/service.ts +13 -150
  59. package/src/client/sidebar.module.css +28 -420
  60. package/src/config.ts +1 -4
  61. package/src/index.ts +17 -74
  62. package/src/prefs-shared.ts +1 -27
  63. package/src/wire.ts +1 -0
  64. package/lib/client-mermaid.js +0 -200776
  65. package/lib/types/client/MarkdownHtml.d.ts +0 -32
  66. package/lib/types/client/PdfView.d.ts +0 -6
  67. package/lib/types/client/builtins/viewers.d.ts +0 -3
  68. package/lib/types/client/chunks/mermaid.d.ts +0 -10
  69. package/lib/types/client/editor-load.d.ts +0 -66
  70. package/lib/types/client/image-types.d.ts +0 -3
  71. package/lib/types/client/markdown-html.d.ts +0 -96
  72. package/lib/types/client/markdown-images.d.ts +0 -45
  73. package/lib/types/client/md-toc.d.ts +0 -4
  74. package/lib/types/client/mermaid-blocks.d.ts +0 -47
  75. package/lib/types/client/mermaid-sanitize.d.ts +0 -2
  76. package/lib/types/client/mermaid.d.ts +0 -12
  77. package/lib/types/client/pdf-types.d.ts +0 -2
  78. package/lib/types/client/plugins-viewers.d.ts +0 -3
  79. package/lib/types/html-route.d.ts +0 -59
  80. package/src/client/MarkdownHtml.tsx +0 -296
  81. package/src/client/PdfView.tsx +0 -110
  82. package/src/client/builtins/viewers.tsx +0 -125
  83. package/src/client/chunks/mermaid.tsx +0 -10
  84. package/src/client/editor-load.ts +0 -92
  85. package/src/client/image-types.ts +0 -8
  86. package/src/client/markdown-html.ts +0 -331
  87. package/src/client/markdown-images.ts +0 -137
  88. package/src/client/md-toc.tsx +0 -127
  89. package/src/client/mermaid-blocks.ts +0 -110
  90. package/src/client/mermaid-sanitize.ts +0 -93
  91. package/src/client/mermaid.tsx +0 -406
  92. package/src/client/pdf-types.ts +0 -4
  93. package/src/client/plugins-viewers.ts +0 -30
  94. package/src/html-route.ts +0 -106
@@ -126,22 +126,6 @@ export interface SidebarPrefs {
126
126
  * starts `strip` px below its top edge.
127
127
  */
128
128
  titleBarStripPx: number
129
- /**
130
- * Whether the HTML previewer drops its sandboxed iframe. Sandbox ON (the
131
- * default) renders previewed HTML in an opaque-origin iframe that cannot
132
- * touch the GUI; turning it OFF runs the previewed page with the GUI's
133
- * own origin — full read/write access to session files and internal
134
- * APIs. Only for trusted local content; the setting copy warns.
135
- */
136
- htmlViewerNoSandbox: boolean
137
- /**
138
- * Whether a newly opened HTML preview starts UNSANDBOXED (the per-surface
139
- * temporary unlock pre-applied). Off by default: previews open sandboxed
140
- * and the status row offers the one-tap unlock; when on, previews open
141
- * in the red unsandboxed state and the status row offers a one-tap
142
- * restore for the current file.
143
- */
144
- htmlViewerDefaultUnsafe: boolean
145
129
  /**
146
130
  * Whether the browser tab drops its sandboxed iframe. Sandbox ON (the
147
131
  * default) keeps browsed sites in an opaque origin with no GUI access;
@@ -196,16 +180,9 @@ export interface SidebarPrefs {
196
180
  * own layouts" rule.
197
181
  */
198
182
  tabsEnabled: Record<string, boolean>
199
- /**
200
- * Per-viewer enable switches, keyed by file viewer descriptor id
201
- * (`'image'`, `'my-plugin:csv'`). An ABSENT key means enabled; a disabled
202
- * viewer is skipped by `matchFileViewer` so files fall through to the
203
- * next matching viewer (or the download button when none match).
204
- */
205
- viewersEnabled: Record<string, boolean>
206
183
  /**
207
184
  * Plugin-owned settings blobs (v0.12.0+), keyed by descriptor id: each
208
- * registered tab/viewer that declares `settings.pluginToggles` (or writes
185
+ * registered tab that declares `settings.pluginToggles` (or writes
209
186
  * through `settings.render`'s `updatePluginSetting`) persists its values
210
187
  * here — an open map, so third-party keys need no host PrefsSchema field.
211
188
  * Values are JSON-serializable (the row controls produce strings /
@@ -252,15 +229,12 @@ export const SIDEBAR_PREFS_DEFAULTS: SidebarPrefs = {
252
229
  customCss: '',
253
230
  titleBarCompat: false,
254
231
  titleBarStripPx: TITLE_BAR_STRIP_DEFAULT,
255
- htmlViewerNoSandbox: false,
256
- htmlViewerDefaultUnsafe: false,
257
232
  browserNoSandbox: false,
258
233
  browserInterceptLinks: true,
259
234
  browserInterceptHttp: true,
260
235
  browserInterceptHttps: false,
261
236
  browserAllowedLoopback: '',
262
237
  tabsEnabled: {},
263
- viewersEnabled: {},
264
238
  pluginSettings: {},
265
239
  }
266
240
 
package/src/wire.ts CHANGED
@@ -18,6 +18,7 @@ export type SidebarErrorCode =
18
18
  | 'pty-error'
19
19
  | 'pty-deps-missing'
20
20
  | 'job-error'
21
+ | 'cdp-down'
21
22
  | 'sidechat-error'
22
23
  | 'subagents-unavailable'
23
24
  | 'settings-rejected'