@chatcode/cco-better-sidebar 0.18.0-rc.3 → 0.18.0-rc.4

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 (36) hide show
  1. package/README.md +5 -1
  2. package/README_EN.md +5 -1
  3. package/lib/client-editor.js +315 -258
  4. package/lib/client-mermaid.js +298 -256
  5. package/lib/client-registry.js +1097 -460
  6. package/lib/client-terminal.js +318 -261
  7. package/lib/client.js +1110 -473
  8. package/lib/index.js +47 -1
  9. package/lib/types/client/PluginMarketSettingsSection.d.ts +7 -0
  10. package/lib/types/client/PluginMarketView.d.ts +7 -0
  11. package/lib/types/client/api.d.ts +15 -0
  12. package/lib/types/client/builtins/tabs.d.ts +6 -3
  13. package/lib/types/client/locales.d.ts +21 -0
  14. package/lib/types/client/plugin-market-catalog.d.ts +25 -0
  15. package/lib/types/client/ui-tweaks/index.d.ts +1 -1
  16. package/lib/types/client/ui-tweaks/typography.d.ts +9 -0
  17. package/lib/types/plugin-market-api.d.ts +5 -0
  18. package/lib/types/plugin-market-shared.d.ts +37 -0
  19. package/lib/types/ui-tweaks/config.d.ts +5 -6
  20. package/package.json +1 -1
  21. package/src/client/PluginMarketSettingsSection.tsx +55 -0
  22. package/src/client/PluginMarketView.module.css +35 -0
  23. package/src/client/PluginMarketView.tsx +154 -0
  24. package/src/client/api.ts +7 -0
  25. package/src/client/builtins/tabs.tsx +16 -3
  26. package/src/client/index.tsx +10 -1
  27. package/src/client/locales-ja.ts +21 -0
  28. package/src/client/locales.ts +42 -0
  29. package/src/client/plugin-market-catalog.ts +90 -0
  30. package/src/client/ui-tweaks/branding.tsx +15 -7
  31. package/src/client/ui-tweaks/index.tsx +36 -99
  32. package/src/client/ui-tweaks/typography.ts +38 -0
  33. package/src/index.ts +2 -0
  34. package/src/plugin-market-api.ts +42 -0
  35. package/src/plugin-market-shared.ts +21 -0
  36. package/src/ui-tweaks/config.ts +10 -10
@@ -29,10 +29,9 @@ export interface UITweaksConfig {
29
29
  */
30
30
  codeFontScale?: number
31
31
  /**
32
- * Absolute code font size in px (8–32). 13 matches the stock DSH code block
33
- * at a 16px body. Drives the code block directly; inline code and the small
34
- * code font follow proportionally. When unset, falls back to the legacy
35
- * `codeFontScale` percentage, then to the stock default.
32
+ * Absolute code font size in px (8–32), default 13. Drives code blocks;
33
+ * inline code and small code follow proportionally. When unset, uses a non-default legacy
34
+ * `codeFontScale` percentage, otherwise 13px.
36
35
  */
37
36
  codeFontSize?: number
38
37
  /**
@@ -114,7 +113,7 @@ export interface UITweaksConfig {
114
113
 
115
114
  export const MIN_FONT_SIZE = 10
116
115
  export const MAX_FONT_SIZE = 32
117
- export const DEFAULT_FONT_SIZE = 16
116
+ export const DEFAULT_FONT_SIZE = 14
118
117
 
119
118
  /** 16px matches the stock DSH vertical rhythm (message/block gaps, etc.). */
120
119
  export const MIN_LINE_HEIGHT = 0
@@ -126,7 +125,7 @@ export const MIN_CODE_FONT_SCALE = 50
126
125
  export const MAX_CODE_FONT_SCALE = 150
127
126
  export const DEFAULT_CODE_FONT_SCALE = 81
128
127
 
129
- /** Absolute code font size (px): 13 is the stock DSH code block at a 16px body. */
128
+ /** Default absolute code-block size, paired with 14px prose. */
130
129
  export const MIN_CODE_FONT_SIZE = 8
131
130
  export const MAX_CODE_FONT_SIZE = 32
132
131
  export const DEFAULT_CODE_FONT_SIZE = 13
@@ -164,7 +163,7 @@ export const DEFAULT_NOTIFY_SOUND = false
164
163
 
165
164
  /** Configuration schema with documented defaults. */
166
165
  export const Config: Schema<UITweaksConfig> = z.object({
167
- fontSize: z.number().min(10).max(32).default(16),
166
+ fontSize: z.number().min(10).max(32).default(DEFAULT_FONT_SIZE),
168
167
  codeFontScale: z.number().min(MIN_CODE_FONT_SCALE).max(MAX_CODE_FONT_SCALE).default(DEFAULT_CODE_FONT_SCALE),
169
168
  codeFontSize: z.number().min(MIN_CODE_FONT_SIZE).max(MAX_CODE_FONT_SIZE),
170
169
  lineHeight: z.number().min(MIN_LINE_HEIGHT).max(MAX_LINE_HEIGHT).default(DEFAULT_LINE_HEIGHT),
@@ -229,11 +228,12 @@ export interface ResolvedUITweaksConfig {
229
228
  export function resolveConfig(config: UITweaksConfig = {}): ResolvedUITweaksConfig {
230
229
  const fontSize = config.fontSize ?? DEFAULT_FONT_SIZE
231
230
  const codeFontScale = config.codeFontScale ?? DEFAULT_CODE_FONT_SCALE
232
- // Effective code size: the absolute px input wins; otherwise derive px from
233
- // the legacy percentage at the resolved body size; otherwise stock.
231
+ // Explicit code sizing wins; the stock preference keeps readable 13px code.
234
232
  const codeFontSize = typeof config.codeFontSize === 'number'
235
233
  ? Math.min(MAX_CODE_FONT_SIZE, Math.max(MIN_CODE_FONT_SIZE, config.codeFontSize))
236
- : Math.max(8, Math.round(fontSize * (13 / 16) * (codeFontScale / DEFAULT_CODE_FONT_SCALE)))
234
+ : codeFontScale === DEFAULT_CODE_FONT_SCALE
235
+ ? DEFAULT_CODE_FONT_SIZE
236
+ : Math.max(8, Math.round(fontSize * (13 / 16) * (codeFontScale / DEFAULT_CODE_FONT_SCALE)))
237
237
  const lineHeight = config.lineHeight ?? DEFAULT_LINE_HEIGHT
238
238
  const tableStyle = config.tableStyle ?? 'default'
239
239
  const gitBarEnabled = config.gitBarEnabled ?? DEFAULT_GITBAR_ENABLED