@brett_lamy/docstream 0.3.3 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brett_lamy/docstream",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "GitBook-aware readonly markdown and AI stream renderer.",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -336,8 +336,16 @@ function Blocks({ blocks, inline, liveRenderer }: { blocks: Block[]; inline?: bo
336
336
 
337
337
  // Renders a markdown string inline — used for embedded markdown like
338
338
  // OpenAPI descriptions, which can themselves contain GitBook blocks.
339
- export function MarkdownContent({ markdown, liveRenderer }: { markdown: string; liveRenderer?: LivePreviewRenderer }) {
340
- return <Blocks blocks={parseMarkdown(markdown).children} liveRenderer={liveRenderer} />
339
+ export function MarkdownContent({
340
+ markdown,
341
+ liveRenderer,
342
+ className,
343
+ }: { markdown: string; liveRenderer?: LivePreviewRenderer; className?: string }) {
344
+ return (
345
+ <div data-docstream="" className={className}>
346
+ <Blocks blocks={parseMarkdown(markdown).children} liveRenderer={liveRenderer} />
347
+ </div>
348
+ )
341
349
  }
342
350
 
343
351
  export function DocsRenderer({ doc, liveRenderer }: { doc: DocumentNode; liveRenderer?: LivePreviewRenderer }) {
package/src/styles.css CHANGED
@@ -2,19 +2,19 @@
2
2
 
3
3
  [data-docstream],
4
4
  .docs-article {
5
- --gb-panel: var(--card);
6
- --gb-panel-foreground: var(--card-foreground);
7
- --gb-muted: var(--muted);
8
- --gb-muted-foreground: var(--muted-foreground);
9
- --gb-border: var(--border);
10
- --gb-accent: var(--accent);
11
- --gb-accent-foreground: var(--accent-foreground);
12
- --gb-primary: var(--primary);
13
- --gb-primary-foreground: var(--primary-foreground);
5
+ --gb-panel: var(--card, #ffffff);
6
+ --gb-panel-foreground: var(--card-foreground, #18181b);
7
+ --gb-muted: var(--muted, #f4f4f5);
8
+ --gb-muted-foreground: var(--muted-foreground, #71717a);
9
+ --gb-border: var(--border, #e4e4e7);
10
+ --gb-accent: var(--accent, #f4f4f5);
11
+ --gb-accent-foreground: var(--accent-foreground, #18181b);
12
+ --gb-primary: var(--primary, #4f46e5);
13
+ --gb-primary-foreground: var(--primary-foreground, #fafafa);
14
14
  /* Plain rgba/hex values (no color-mix()/oklch()) so the theme renders
15
15
  correctly in older Chromium forks; hosts can override any token. */
16
16
  --gb-code-bg: rgba(128, 128, 128, 0.13);
17
- --gb-code-fg: var(--foreground);
17
+ --gb-code-fg: var(--foreground, #18181b);
18
18
 
19
19
  /* Semantic hint palette — solid color plus precomputed tints. Matches the
20
20
  editor palette in @brett_lamy/docstream-editor/styles.css. */
@@ -55,7 +55,7 @@
55
55
  font-weight: 650;
56
56
  margin-top: 1.4em;
57
57
  padding-bottom: 0.2em;
58
- border-bottom: 1px solid var(--border);
58
+ border-bottom: 1px solid var(--border, #e4e4e7);
59
59
  }
60
60
 
61
61
  .docs-article h3 {
@@ -216,8 +216,8 @@
216
216
  }
217
217
 
218
218
  .docs-tabs-header .docs-tab-active {
219
- background: var(--background);
220
- color: var(--foreground);
219
+ background: var(--background, #ffffff);
220
+ color: var(--foreground, #18181b);
221
221
  font-weight: 500;
222
222
  }
223
223
 
@@ -298,7 +298,7 @@
298
298
  border-radius: 12px;
299
299
  font-weight: 500;
300
300
  text-decoration: none !important;
301
- color: var(--foreground) !important;
301
+ color: var(--foreground, #18181b) !important;
302
302
  }
303
303
 
304
304
  .docs-content-ref:hover {
@@ -463,7 +463,7 @@
463
463
  padding: 16px;
464
464
  border: 1px solid var(--gb-border);
465
465
  border-radius: 12px;
466
- background: var(--background);
466
+ background: var(--background, #ffffff);
467
467
  }
468
468
 
469
469
  .docs-mermaid svg {
@@ -560,7 +560,7 @@
560
560
  }
561
561
 
562
562
  .oas-desc {
563
- color: var(--foreground);
563
+ color: var(--foreground, #18181b);
564
564
  margin-bottom: 8px;
565
565
  }
566
566