@youtyan/code-viewer 0.8.5 → 0.8.7
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 +10 -8
- package/dist/code-viewer.js +210 -783
- package/package.json +1 -1
- package/web/app.js +139 -33
package/README.md
CHANGED
|
@@ -146,14 +146,16 @@ resolved inside the repository, code blocks are highlighted with Shiki, and
|
|
|
146
146
|
Mermaid diagrams are rendered lazily in the browser (click any diagram to
|
|
147
147
|
open it in a lightbox).
|
|
148
148
|
|
|
149
|
-
A file detail page lays out four tabs — **Preview**, **Code**,
|
|
150
|
-
**History** — modelled after the GitHub file view.
|
|
151
|
-
`?preview=1` opts in to the Markdown /
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
A file detail page lays out up to four tabs — **Preview**, **Code**,
|
|
150
|
+
**Blame**, **History** — modelled after the GitHub file view. For text files
|
|
151
|
+
`Code` is the default and `?preview=1` opts in to the Markdown / HTML
|
|
152
|
+
preview. Media files (images, video, audio, PDF) show a **Preview** tab only
|
|
153
|
+
— there is no Code tab for binary media. `Blame` and `History` each have
|
|
154
|
+
their own canonical URL (`view=blame`, `view=history`), so deep links and
|
|
155
|
+
the browser back/forward stay in sync. The Blame tab reuses the source
|
|
156
|
+
view's row component, so line numbers, drag-selection of `line=` ranges,
|
|
157
|
+
syntax highlighting and the Viewer Settings code font size all match the
|
|
158
|
+
Code tab.
|
|
157
159
|
|
|
158
160
|
Very large text files use a virtualized source viewer. Only visible rows are
|
|
159
161
|
rendered, and the page includes controls to copy the full file or reopen it in
|