@wipcomputer/markdown-viewer 1.0.0

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/demo/demo.md ADDED
@@ -0,0 +1,165 @@
1
+ # Markdown Viewer Demo
2
+
3
+ Welcome to the **enhanced** Markdown Viewer! This demo showcases all the new features.
4
+
5
+ ## Features Overview
6
+
7
+ This viewer now supports:
8
+
9
+ - ✅ Syntax highlighting for code blocks
10
+ - ✅ Dark mode toggle
11
+ - ✅ Table of Contents generation
12
+ - ✅ GitHub Flavored Markdown
13
+ - ✅ Mermaid diagrams
14
+ - ✅ Math equations (KaTeX)
15
+ - ✅ Export to HTML
16
+ - ✅ Print support
17
+ - ✅ File System Access API auto-refresh
18
+
19
+ ## Code Highlighting
20
+
21
+ Here's some JavaScript with syntax highlighting:
22
+
23
+ ```javascript
24
+ function fibonacci(n) {
25
+ if (n <= 1) return n;
26
+ return fibonacci(n - 1) + fibonacci(n - 2);
27
+ }
28
+
29
+ console.log(fibonacci(10)); // Output: 55
30
+ ```
31
+
32
+ Python example:
33
+
34
+ ```python
35
+ def quicksort(arr):
36
+ if len(arr) <= 1:
37
+ return arr
38
+ pivot = arr[len(arr) // 2]
39
+ left = [x for x in arr if x < pivot]
40
+ middle = [x for x in arr if x == pivot]
41
+ right = [x for x in arr if x > pivot]
42
+ return quicksort(left) + middle + quicksort(right)
43
+
44
+ print(quicksort([3, 6, 8, 10, 1, 2, 1]))
45
+ ```
46
+
47
+ ## GitHub Flavored Markdown
48
+
49
+ ### Task Lists
50
+
51
+ - [x] Implement syntax highlighting
52
+ - [x] Add dark mode
53
+ - [x] Create TOC
54
+ - [ ] Add more themes
55
+ - [ ] Support more diagram types
56
+
57
+ ### Tables
58
+
59
+ | Feature | Status | Priority |
60
+ |---------|--------|----------|
61
+ | Syntax Highlighting | ✅ Done | High |
62
+ | Dark Mode | ✅ Done | High |
63
+ | TOC | ✅ Done | Medium |
64
+ | Mermaid | ✅ Done | Medium |
65
+ | Math | ✅ Done | Low |
66
+
67
+ ### Strikethrough
68
+
69
+ ~~This feature was removed~~ This feature is now available!
70
+
71
+ ## Mermaid Diagrams
72
+
73
+ ### Flowchart
74
+
75
+ ```mermaid
76
+ graph TD
77
+ A[Start] --> B{Is it working?}
78
+ B -->|Yes| C[Great!]
79
+ B -->|No| D[Debug]
80
+ D --> B
81
+ C --> E[End]
82
+ ```
83
+
84
+ ### Sequence Diagram
85
+
86
+ ```mermaid
87
+ sequenceDiagram
88
+ participant User
89
+ participant Browser
90
+ participant Viewer
91
+ User->>Browser: Drag & Drop MD file
92
+ Browser->>Viewer: Load file
93
+ Viewer->>Viewer: Parse Markdown
94
+ Viewer->>Viewer: Render HTML
95
+ Viewer->>Browser: Display content
96
+ Browser->>User: Show rendered MD
97
+ ```
98
+
99
+ ## Math Equations
100
+
101
+ Inline math: $E = mc^2$
102
+
103
+ Display math:
104
+
105
+ $$
106
+ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
107
+ $$
108
+
109
+ The quadratic formula:
110
+
111
+ $$
112
+ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
113
+ $$
114
+
115
+ Summation:
116
+
117
+ $$
118
+ \sum_{i=1}^{n} i = \frac{n(n+1)}{2}
119
+ $$
120
+
121
+ ## Blockquotes
122
+
123
+ > "The best way to predict the future is to invent it."
124
+ >
125
+ > — Alan Kay
126
+
127
+ > **Note:** This is a nested quote example
128
+ > > And this is the nested content
129
+
130
+ ## Lists
131
+
132
+ ### Unordered List
133
+
134
+ - First item
135
+ - Second item
136
+ - Nested item 1
137
+ - Nested item 2
138
+ - Deeply nested item
139
+ - Third item
140
+
141
+ ### Ordered List
142
+
143
+ 1. First step
144
+ 2. Second step
145
+ 1. Sub-step A
146
+ 2. Sub-step B
147
+ 3. Third step
148
+
149
+ ## Images
150
+
151
+ ![Demo Image](demo-image.png)
152
+
153
+ ## Links
154
+
155
+ Check out the [GitHub repository](https://github.com/parkertoddbrooks/simple-web-markdown-viewer) for more information.
156
+
157
+ ## Horizontal Rule
158
+
159
+ ---
160
+
161
+ ## Conclusion
162
+
163
+ This enhanced Markdown viewer provides a rich set of features for viewing and working with Markdown files. Try out all the features using the buttons in the header!
164
+
165
+ **Happy Markdown viewing! 🎉**
package/images/01.png ADDED
Binary file
package/images/02.png ADDED
Binary file
package/images/03.png ADDED
Binary file