seemore 1.8.1 → 1.8.2

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
@@ -60,7 +60,9 @@ And whichever preview is open, the page is also an editor: **double-click any pa
60
60
 
61
61
  ## Who is seemore for?
62
62
 
63
- If your documentation is a folder of Markdown files, seemore helps you browse, review, edit and publish it with almost no setup.
63
+ <p align="center">
64
+ <video src="https://github.com/user-attachments/assets/8142fcb4-2a1f-4e48-82b5-059a28fc0cf2" width="640" controls muted></video>
65
+ </p>
64
66
 
65
67
  Typical use cases include:
66
68
 
@@ -113,7 +115,7 @@ export default {
113
115
  Install **seemore** from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=arifszn.seemore-vscode) or [Open VSX](https://open-vsx.org/extension/arifszn/seemore-vscode) to get the same rendered site as a panel beside your editor — no terminal, no `npx`, no browser tab to manage. The extension bundles the CLI, so nothing is downloaded or put on your PATH. Open VSX also covers VS Code-compatible editors — Cursor, Antigravity, and others.
114
116
 
115
117
  <p align="center">
116
- <img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/vscode-extension.png" alt="VS Code with a Markdown file open in the editor and the seemore panel rendering the same folder as a site beside it" width="640"/>
118
+ <img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/vscode-extension.png" alt="VS Code with features.md open in the editor and the seemore panel beside it, rendering the same page with a paragraph's Markdown source open in the inline editor" width="640"/>
117
119
  </p>
118
120
 
119
121
  1. Open any Markdown file.
@@ -245,6 +247,26 @@ Supports `.md` and `.mdx` both.
245
247
  - Sibling images inlined as hashed assets with click-to-zoom, sibling PDFs open in the browser's own viewer
246
248
  - Frontmatter keys are validated
247
249
 
250
+ ### PDF viewer
251
+
252
+ Reference a PDF with image syntax and it opens inline in the browser's own viewer, with a download link underneath — a sibling file or a remote URL both work:
253
+
254
+ ```md
255
+ ![sample document](./assets/sample.pdf)
256
+ ```
257
+
258
+ <p align="center">
259
+ <img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/pdf-viewer.png" alt="A sample PDF rendered inline on the page in the browser's native PDF viewer, with a Download sample document link underneath" width="640"/>
260
+ </p>
261
+
262
+ ### Diagrams
263
+
264
+ A ` ```mermaid ` or ` ```d2 ` code fence renders live in the browser, no build step or external service:
265
+
266
+ <p align="center">
267
+ <img src="https://raw.githubusercontent.com/arifszn/seemore/main/packages/site/assets/diagrams.png" alt="A mermaid flowchart reading Markdown, seemore, Static site rendered live on the Diagrams page, with a D2 diagram of the same chain below it" width="640"/>
268
+ </p>
269
+
248
270
  ### Code blocks
249
271
 
250
272
  Code is syntax-highlighted automatically — nothing to configure. Add a filename or line numbers by putting them after the language on the fence line:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seemore",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Let AI write the Markdown. Let seemore show it better — zero config documentation framework.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,4 +1,5 @@
1
1
  import type { ComponentProps } from 'react';
2
+ import { FileText } from 'lucide-react';
2
3
 
3
4
  /**
4
5
  * Sibling PDFs render in the browser's own viewer.
@@ -9,14 +10,18 @@ import type { ComponentProps } from 'react';
9
10
  * on a `<span>` gets the same layout with none of that.
10
11
  *
11
12
  * `pdfjs-dist` is roughly a megabyte, which is a poor trade for a docs site. The accepted
12
- * cost is that most mobile browsers degrade `<embed>` to a download link.
13
+ * cost is that most mobile browsers degrade `<embed>` to a blank box, since they don't
14
+ * support inline PDF plugins. There's no reliable JS-free way to detect that, so the CSS
15
+ * in globals.css hides the embed and expands this link into a full card under
16
+ * `(pointer: coarse)` — touch devices are the same population that lacks embed support.
13
17
  */
14
18
  export function Pdf({ src, title, ...props }: ComponentProps<'embed'> & { src: string }) {
15
19
  return (
16
20
  <span className="seemore-pdf">
17
21
  <embed src={src} type="application/pdf" title={title} {...props} />
18
- <a href={src} download>
19
- Download {title ?? 'PDF'}
22
+ <a className="seemore-pdf-fallback" href={src} download>
23
+ <FileText className="seemore-pdf-fallback-icon" aria-hidden="true" />
24
+ <span className="seemore-pdf-fallback-title">Download {title ?? 'PDF'}</span>
20
25
  </a>
21
26
  </span>
22
27
  );
@@ -425,8 +425,32 @@
425
425
  @apply block h-[70vh] w-full rounded-lg border border-fd-border;
426
426
  }
427
427
 
428
- .seemore-pdf a {
429
- @apply mt-2 block text-sm text-fd-muted-foreground;
428
+ .seemore-pdf-fallback {
429
+ @apply mt-2 flex items-center gap-2 text-sm text-fd-muted-foreground no-underline transition-colors hover:text-fd-foreground;
430
+ }
431
+
432
+ .seemore-pdf-fallback-icon {
433
+ @apply size-4 shrink-0;
434
+ }
435
+
436
+ .seemore-pdf-fallback-title {
437
+ @apply font-medium text-fd-foreground;
438
+ }
439
+
440
+ /* Most touch browsers can't render `<embed type="application/pdf">` at all, so the box
441
+ above sits blank. Hide it there and promote the download link into the primary UI. */
442
+ @media (pointer: coarse) {
443
+ .seemore-pdf embed {
444
+ @apply hidden;
445
+ }
446
+
447
+ .seemore-pdf-fallback {
448
+ @apply mt-0 flex-col items-start gap-1 rounded-lg border border-fd-border bg-fd-card px-4 py-4 hover:border-fd-primary/60;
449
+ }
450
+
451
+ .seemore-pdf-fallback-icon {
452
+ @apply size-6;
453
+ }
430
454
  }
431
455
  }
432
456
 
@@ -441,5 +465,13 @@
441
465
  }
442
466
  }
443
467
 
468
+ /* Unlayered, deliberately, for the same reason as the dialog fix above: fumadocs underlines
469
+ in-content links from its utilities layer, which beats `@layer components` regardless of
470
+ specificity. The PDF fallback reads as a button, not prose — it keeps its icon and title
471
+ flush, with no underline. */
472
+ .seemore-pdf-fallback {
473
+ text-decoration-line: none;
474
+ }
475
+
444
476
  /* seemore:user-css — the stylesheet named by `css` in seemore.config.ts is inlined here, at
445
477
  the very end, so that it wins against everything above it. */