seemore 1.8.0 → 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 +25 -3
- package/package.json +1 -1
- package/src/app/mdx/Pdf.tsx +8 -3
- package/src/app/styles/globals.css +41 -6
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
|
-
|
|
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
|
|
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.
|
|
@@ -126,7 +128,7 @@ Install **seemore** from the [VS Code Marketplace](https://marketplace.visualstu
|
|
|
126
128
|
| --- | --- | --- |
|
|
127
129
|
| **Open in seemore** | Editor title bar, on any Markdown file | Renders that file's folder as a site |
|
|
128
130
|
| **Open Folder in seemore** | Explorer, right-click a folder | Renders that folder as a site and pins it as the root |
|
|
129
|
-
| **
|
|
131
|
+
| **Choose Root** | Status bar item, or the command palette | Pins the folder being served, clears a pinned root, or picks another folder to serve |
|
|
130
132
|
|
|
131
133
|
### Settings
|
|
132
134
|
|
|
@@ -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
|
+

|
|
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
package/src/app/mdx/Pdf.tsx
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
);
|
|
@@ -185,8 +185,11 @@
|
|
|
185
185
|
@apply fixed inset-0 z-30 bg-black/40 md:hidden;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/* A flex column, so the site footer can take `mt-auto`: on a page too short to fill the
|
|
189
|
+
viewport it settles at the bottom instead of floating mid-screen, and on a long one the
|
|
190
|
+
`gap-10` is all that separates it from the content above. */
|
|
188
191
|
.seemore-main {
|
|
189
|
-
@apply mx-auto min-w-0 max-w-3xl flex-1 px-4 py-8 md:px-8;
|
|
192
|
+
@apply mx-auto flex min-w-0 max-w-3xl flex-1 flex-col gap-10 px-4 py-8 md:px-8;
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
/* Docs are full of long identifiers — `EmbeddedPaymentsController`,
|
|
@@ -224,7 +227,7 @@
|
|
|
224
227
|
}
|
|
225
228
|
|
|
226
229
|
.seemore-page-footer {
|
|
227
|
-
@apply
|
|
230
|
+
@apply grid grid-cols-2 gap-4 border-t border-fd-border pt-6 text-sm;
|
|
228
231
|
}
|
|
229
232
|
|
|
230
233
|
.seemore-next {
|
|
@@ -236,11 +239,11 @@
|
|
|
236
239
|
}
|
|
237
240
|
|
|
238
241
|
.seemore-edit-link {
|
|
239
|
-
@apply
|
|
242
|
+
@apply inline-flex items-center gap-2 self-start text-sm text-fd-muted-foreground;
|
|
240
243
|
}
|
|
241
244
|
|
|
242
245
|
.seemore-site-footer {
|
|
243
|
-
@apply mt-
|
|
246
|
+
@apply mt-auto flex flex-wrap gap-4 border-t border-fd-border pt-6 text-sm text-fd-muted-foreground;
|
|
244
247
|
}
|
|
245
248
|
|
|
246
249
|
/* The generated index page: pages as cards, folders as titled sections of cards. */
|
|
@@ -422,8 +425,32 @@
|
|
|
422
425
|
@apply block h-[70vh] w-full rounded-lg border border-fd-border;
|
|
423
426
|
}
|
|
424
427
|
|
|
425
|
-
.seemore-pdf
|
|
426
|
-
@apply mt-2
|
|
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
|
+
}
|
|
427
454
|
}
|
|
428
455
|
}
|
|
429
456
|
|
|
@@ -438,5 +465,13 @@
|
|
|
438
465
|
}
|
|
439
466
|
}
|
|
440
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
|
+
|
|
441
476
|
/* seemore:user-css — the stylesheet named by `css` in seemore.config.ts is inlined here, at
|
|
442
477
|
the very end, so that it wins against everything above it. */
|