@noirmd/previewer 1.2.0 → 2.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/dist/NReditor.cjs +851 -895
- package/dist/NReditor.cjs.map +1 -1
- package/dist/NReditor.d.cts +1 -1
- package/dist/NReditor.d.ts +1 -1
- package/dist/NReditor.js +852 -896
- package/dist/NReditor.js.map +1 -1
- package/dist/admonition.css +55 -0
- package/dist/{markdown.css → base.css} +96 -126
- package/dist/blockquote.css +16 -0
- package/dist/button.css +32 -0
- package/dist/card.css +143 -0
- package/dist/codeblock.css +59 -0
- package/dist/core.cjs +9 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +9 -1
- package/dist/core.js.map +1 -1
- package/dist/details.css +45 -0
- package/dist/editor.css +56 -9
- package/dist/fonts/material-icons-round.woff2 +0 -0
- package/dist/index.cjs +852 -883
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -70
- package/dist/index.d.ts +41 -70
- package/dist/index.js +851 -877
- package/dist/index.js.map +1 -1
- package/dist/list.css +18 -0
- package/dist/modal.css +82 -0
- package/dist/react.cjs +852 -886
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +44 -73
- package/dist/react.d.ts +44 -73
- package/dist/react.js +851 -880
- package/dist/react.js.map +1 -1
- package/dist/slide.css +21 -0
- package/dist/table.css +36 -0
- package/dist/toc.css +45 -0
- package/dist/vanilla.cjs +42 -28
- package/dist/vanilla.cjs.map +1 -1
- package/dist/vanilla.css +32 -677
- package/dist/vanilla.d.cts +8 -2
- package/dist/vanilla.d.ts +8 -2
- package/dist/vanilla.js +41 -28
- package/dist/vanilla.js.map +1 -1
- package/dist/variables.css +53 -0
- package/dist/vue.cjs +931 -1121
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +63 -214
- package/dist/vue.d.ts +63 -214
- package/dist/vue.js +930 -1120
- package/dist/vue.js.map +1 -1
- package/editor.css +56 -9
- package/package.json +5 -10
- package/markdown.css +0 -344
package/dist/vue.d.cts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { PropType,
|
|
2
|
+
import { PropType, Ref } from 'vue';
|
|
3
3
|
|
|
4
|
+
interface NRpreviewerProps {
|
|
5
|
+
/** Markdown string to render */
|
|
6
|
+
content?: string;
|
|
7
|
+
/** Raw HTML string to render (used when content is not provided) */
|
|
8
|
+
html?: string;
|
|
9
|
+
/** Inject Tailwind v4 browser CDN at runtime for user-authored Tailwind classes. Default: false */
|
|
10
|
+
tailwindCDN?: boolean;
|
|
11
|
+
/** Additional CSS class on the wrapper element */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Inline styles on the wrapper element */
|
|
14
|
+
style?: Record<string, string>;
|
|
15
|
+
}
|
|
4
16
|
declare const NRpreviewer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
5
17
|
content: {
|
|
6
18
|
type: StringConstructor;
|
|
@@ -58,7 +70,7 @@ declare const CustomMarkdownRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
58
70
|
type: StringConstructor;
|
|
59
71
|
required: true;
|
|
60
72
|
};
|
|
61
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
73
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
62
74
|
[key: string]: any;
|
|
63
75
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
64
76
|
content: {
|
|
@@ -67,6 +79,30 @@ declare const CustomMarkdownRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
67
79
|
};
|
|
68
80
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
69
81
|
|
|
82
|
+
declare const RawHtmlRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
83
|
+
content: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
wrapperClassName: {
|
|
88
|
+
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
94
|
+
content: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
required: true;
|
|
97
|
+
};
|
|
98
|
+
wrapperClassName: {
|
|
99
|
+
type: StringConstructor;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
}>> & Readonly<{}>, {
|
|
103
|
+
wrapperClassName: string;
|
|
104
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
105
|
+
|
|
70
106
|
/**
|
|
71
107
|
* Generic CSSProperties — framework-agnostic equivalent of React.CSSProperties.
|
|
72
108
|
* Used for inline styles on tokens (e.g. images).
|
|
@@ -143,197 +179,6 @@ type Token = HeaderToken | ParagraphToken | CodeblockToken | DirectiveToken | Ht
|
|
|
143
179
|
*/
|
|
144
180
|
declare function parseMarkdown(markdown: string): Token[];
|
|
145
181
|
|
|
146
|
-
/**
|
|
147
|
-
* Extract all header tokens from an AST for TOC generation.
|
|
148
|
-
*/
|
|
149
|
-
declare function extractHeaders(elements: Token[]): Token[];
|
|
150
|
-
|
|
151
|
-
declare const IconRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
152
|
-
iconName: {
|
|
153
|
-
type: StringConstructor;
|
|
154
|
-
required: true;
|
|
155
|
-
};
|
|
156
|
-
extraClasses: {
|
|
157
|
-
type: StringConstructor;
|
|
158
|
-
default: string;
|
|
159
|
-
};
|
|
160
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
161
|
-
[key: string]: any;
|
|
162
|
-
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
163
|
-
iconName: {
|
|
164
|
-
type: StringConstructor;
|
|
165
|
-
required: true;
|
|
166
|
-
};
|
|
167
|
-
extraClasses: {
|
|
168
|
-
type: StringConstructor;
|
|
169
|
-
default: string;
|
|
170
|
-
};
|
|
171
|
-
}>> & Readonly<{}>, {
|
|
172
|
-
extraClasses: string;
|
|
173
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
174
|
-
declare const CodeBlock: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
175
|
-
code: {
|
|
176
|
-
type: StringConstructor;
|
|
177
|
-
required: true;
|
|
178
|
-
};
|
|
179
|
-
language: {
|
|
180
|
-
type: StringConstructor;
|
|
181
|
-
default: string;
|
|
182
|
-
};
|
|
183
|
-
title: {
|
|
184
|
-
type: StringConstructor;
|
|
185
|
-
default: undefined;
|
|
186
|
-
};
|
|
187
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
188
|
-
[key: string]: any;
|
|
189
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
190
|
-
code: {
|
|
191
|
-
type: StringConstructor;
|
|
192
|
-
required: true;
|
|
193
|
-
};
|
|
194
|
-
language: {
|
|
195
|
-
type: StringConstructor;
|
|
196
|
-
default: string;
|
|
197
|
-
};
|
|
198
|
-
title: {
|
|
199
|
-
type: StringConstructor;
|
|
200
|
-
default: undefined;
|
|
201
|
-
};
|
|
202
|
-
}>> & Readonly<{}>, {
|
|
203
|
-
title: string;
|
|
204
|
-
language: string;
|
|
205
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
206
|
-
declare const Admonition: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
207
|
-
type: {
|
|
208
|
-
type: StringConstructor;
|
|
209
|
-
default: string;
|
|
210
|
-
};
|
|
211
|
-
title: {
|
|
212
|
-
type: StringConstructor;
|
|
213
|
-
default: undefined;
|
|
214
|
-
};
|
|
215
|
-
icon: {
|
|
216
|
-
type: StringConstructor;
|
|
217
|
-
default: undefined;
|
|
218
|
-
};
|
|
219
|
-
class: {
|
|
220
|
-
type: StringConstructor;
|
|
221
|
-
default: string;
|
|
222
|
-
};
|
|
223
|
-
style: {
|
|
224
|
-
type: PropType<CSSProperties>;
|
|
225
|
-
default: undefined;
|
|
226
|
-
};
|
|
227
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
228
|
-
[key: string]: any;
|
|
229
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
230
|
-
type: {
|
|
231
|
-
type: StringConstructor;
|
|
232
|
-
default: string;
|
|
233
|
-
};
|
|
234
|
-
title: {
|
|
235
|
-
type: StringConstructor;
|
|
236
|
-
default: undefined;
|
|
237
|
-
};
|
|
238
|
-
icon: {
|
|
239
|
-
type: StringConstructor;
|
|
240
|
-
default: undefined;
|
|
241
|
-
};
|
|
242
|
-
class: {
|
|
243
|
-
type: StringConstructor;
|
|
244
|
-
default: string;
|
|
245
|
-
};
|
|
246
|
-
style: {
|
|
247
|
-
type: PropType<CSSProperties>;
|
|
248
|
-
default: undefined;
|
|
249
|
-
};
|
|
250
|
-
}>> & Readonly<{}>, {
|
|
251
|
-
class: string;
|
|
252
|
-
style: CSSProperties;
|
|
253
|
-
title: string;
|
|
254
|
-
type: string;
|
|
255
|
-
icon: string;
|
|
256
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
257
|
-
declare const Details: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
258
|
-
title: {
|
|
259
|
-
type: StringConstructor;
|
|
260
|
-
required: true;
|
|
261
|
-
};
|
|
262
|
-
icon: {
|
|
263
|
-
type: StringConstructor;
|
|
264
|
-
default: undefined;
|
|
265
|
-
};
|
|
266
|
-
defaultOpen: {
|
|
267
|
-
type: BooleanConstructor;
|
|
268
|
-
default: boolean;
|
|
269
|
-
};
|
|
270
|
-
class: {
|
|
271
|
-
type: StringConstructor;
|
|
272
|
-
default: string;
|
|
273
|
-
};
|
|
274
|
-
style: {
|
|
275
|
-
type: PropType<CSSProperties>;
|
|
276
|
-
default: undefined;
|
|
277
|
-
};
|
|
278
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
279
|
-
[key: string]: any;
|
|
280
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
281
|
-
title: {
|
|
282
|
-
type: StringConstructor;
|
|
283
|
-
required: true;
|
|
284
|
-
};
|
|
285
|
-
icon: {
|
|
286
|
-
type: StringConstructor;
|
|
287
|
-
default: undefined;
|
|
288
|
-
};
|
|
289
|
-
defaultOpen: {
|
|
290
|
-
type: BooleanConstructor;
|
|
291
|
-
default: boolean;
|
|
292
|
-
};
|
|
293
|
-
class: {
|
|
294
|
-
type: StringConstructor;
|
|
295
|
-
default: string;
|
|
296
|
-
};
|
|
297
|
-
style: {
|
|
298
|
-
type: PropType<CSSProperties>;
|
|
299
|
-
default: undefined;
|
|
300
|
-
};
|
|
301
|
-
}>> & Readonly<{}>, {
|
|
302
|
-
class: string;
|
|
303
|
-
style: CSSProperties;
|
|
304
|
-
icon: string;
|
|
305
|
-
defaultOpen: boolean;
|
|
306
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
307
|
-
declare const Modal: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
308
|
-
title: {
|
|
309
|
-
type: StringConstructor;
|
|
310
|
-
required: true;
|
|
311
|
-
};
|
|
312
|
-
isOpen: {
|
|
313
|
-
type: BooleanConstructor;
|
|
314
|
-
required: true;
|
|
315
|
-
};
|
|
316
|
-
onClose: {
|
|
317
|
-
type: PropType<() => void>;
|
|
318
|
-
required: true;
|
|
319
|
-
};
|
|
320
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
321
|
-
[key: string]: any;
|
|
322
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
323
|
-
title: {
|
|
324
|
-
type: StringConstructor;
|
|
325
|
-
required: true;
|
|
326
|
-
};
|
|
327
|
-
isOpen: {
|
|
328
|
-
type: BooleanConstructor;
|
|
329
|
-
required: true;
|
|
330
|
-
};
|
|
331
|
-
onClose: {
|
|
332
|
-
type: PropType<() => void>;
|
|
333
|
-
required: true;
|
|
334
|
-
};
|
|
335
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
336
|
-
|
|
337
182
|
declare global {
|
|
338
183
|
interface Window {
|
|
339
184
|
__twCDNRefs?: number;
|
|
@@ -356,34 +201,38 @@ declare function scanTailwindCDN(): void;
|
|
|
356
201
|
*/
|
|
357
202
|
declare function preloadTailwindCDN(): void;
|
|
358
203
|
|
|
359
|
-
interface
|
|
360
|
-
|
|
361
|
-
setModals: (value: Record<string, boolean> | ((prev: Record<string, boolean>) => Record<string, boolean>)) => void;
|
|
362
|
-
articleClass: string;
|
|
363
|
-
allElements: Token[];
|
|
204
|
+
interface VanillaRenderContext {
|
|
205
|
+
/** Parse markdown string into tokens */
|
|
364
206
|
parseMarkdown: (md: string) => Token[];
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
207
|
+
/** Render tokens into an HTMLElement */
|
|
208
|
+
renderElements: (tokens: Token[]) => HTMLElement;
|
|
209
|
+
/** Render inline text into a DocumentFragment */
|
|
210
|
+
renderInline: (text: string) => DocumentFragment;
|
|
211
|
+
/** Parse markdown string and render into an HTMLElement */
|
|
212
|
+
renderMarkdown: (md: string) => HTMLElement;
|
|
368
213
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
/** The directive type string, e.g. 'card', 'note', 'modal' */
|
|
214
|
+
interface DirectiveProps {
|
|
215
|
+
/** The directive type string */
|
|
372
216
|
directiveType: string;
|
|
373
|
-
/** Parsed key="value" attributes
|
|
217
|
+
/** Parsed key="value" attributes */
|
|
374
218
|
props: Record<string, string>;
|
|
375
|
-
/** Named slots → raw content strings
|
|
219
|
+
/** Named slots → raw content strings */
|
|
376
220
|
slots: Record<string, string>;
|
|
377
|
-
/**
|
|
378
|
-
renderSlot: (name: string) =>
|
|
379
|
-
/**
|
|
380
|
-
context:
|
|
381
|
-
/** Position index
|
|
382
|
-
index:
|
|
221
|
+
/** Render a named slot as parsed markdown */
|
|
222
|
+
renderSlot: (name: string) => DocumentFragment;
|
|
223
|
+
/** Render context */
|
|
224
|
+
context: VanillaRenderContext;
|
|
225
|
+
/** Position index */
|
|
226
|
+
index: number;
|
|
383
227
|
/** Full parsed AST */
|
|
384
228
|
allElements: Token[];
|
|
385
|
-
/** Extra flags
|
|
229
|
+
/** Extra flags */
|
|
386
230
|
options?: Record<string, any>;
|
|
231
|
+
/** Inline renderer shortcut */
|
|
232
|
+
renderInline: (text: string) => DocumentFragment;
|
|
233
|
+
/** Full markdown renderer shortcut (for complex directives like slide) */
|
|
234
|
+
renderMarkdown?: (md: string) => HTMLElement;
|
|
387
235
|
}
|
|
236
|
+
type DirectiveRendererFn = (props: DirectiveProps) => HTMLElement | DocumentFragment;
|
|
388
237
|
|
|
389
|
-
export {
|
|
238
|
+
export { type BlockquoteToken, type CSSProperties, type CodeblockToken, CustomMarkdownRenderer, type DirectiveProps, type DirectiveRendererFn, type DirectiveToken, type HeaderToken, type HrToken, type HtmlBlockToken, type HtmlToken, type ImageToken, type ListToken, NRpreviewer, type NRpreviewerProps, type ParagraphToken, RawHtmlRenderer, type TableToken, type TocToken, type Token, type VanillaRenderContext, parseMarkdown, preloadTailwindCDN, scanTailwindCDN, useLazyTailwindCDN };
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { PropType,
|
|
2
|
+
import { PropType, Ref } from 'vue';
|
|
3
3
|
|
|
4
|
+
interface NRpreviewerProps {
|
|
5
|
+
/** Markdown string to render */
|
|
6
|
+
content?: string;
|
|
7
|
+
/** Raw HTML string to render (used when content is not provided) */
|
|
8
|
+
html?: string;
|
|
9
|
+
/** Inject Tailwind v4 browser CDN at runtime for user-authored Tailwind classes. Default: false */
|
|
10
|
+
tailwindCDN?: boolean;
|
|
11
|
+
/** Additional CSS class on the wrapper element */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Inline styles on the wrapper element */
|
|
14
|
+
style?: Record<string, string>;
|
|
15
|
+
}
|
|
4
16
|
declare const NRpreviewer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
5
17
|
content: {
|
|
6
18
|
type: StringConstructor;
|
|
@@ -58,7 +70,7 @@ declare const CustomMarkdownRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
58
70
|
type: StringConstructor;
|
|
59
71
|
required: true;
|
|
60
72
|
};
|
|
61
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
73
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
62
74
|
[key: string]: any;
|
|
63
75
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
64
76
|
content: {
|
|
@@ -67,6 +79,30 @@ declare const CustomMarkdownRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
67
79
|
};
|
|
68
80
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
69
81
|
|
|
82
|
+
declare const RawHtmlRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
83
|
+
content: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
wrapperClassName: {
|
|
88
|
+
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
94
|
+
content: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
required: true;
|
|
97
|
+
};
|
|
98
|
+
wrapperClassName: {
|
|
99
|
+
type: StringConstructor;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
}>> & Readonly<{}>, {
|
|
103
|
+
wrapperClassName: string;
|
|
104
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
105
|
+
|
|
70
106
|
/**
|
|
71
107
|
* Generic CSSProperties — framework-agnostic equivalent of React.CSSProperties.
|
|
72
108
|
* Used for inline styles on tokens (e.g. images).
|
|
@@ -143,197 +179,6 @@ type Token = HeaderToken | ParagraphToken | CodeblockToken | DirectiveToken | Ht
|
|
|
143
179
|
*/
|
|
144
180
|
declare function parseMarkdown(markdown: string): Token[];
|
|
145
181
|
|
|
146
|
-
/**
|
|
147
|
-
* Extract all header tokens from an AST for TOC generation.
|
|
148
|
-
*/
|
|
149
|
-
declare function extractHeaders(elements: Token[]): Token[];
|
|
150
|
-
|
|
151
|
-
declare const IconRenderer: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
152
|
-
iconName: {
|
|
153
|
-
type: StringConstructor;
|
|
154
|
-
required: true;
|
|
155
|
-
};
|
|
156
|
-
extraClasses: {
|
|
157
|
-
type: StringConstructor;
|
|
158
|
-
default: string;
|
|
159
|
-
};
|
|
160
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
161
|
-
[key: string]: any;
|
|
162
|
-
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
163
|
-
iconName: {
|
|
164
|
-
type: StringConstructor;
|
|
165
|
-
required: true;
|
|
166
|
-
};
|
|
167
|
-
extraClasses: {
|
|
168
|
-
type: StringConstructor;
|
|
169
|
-
default: string;
|
|
170
|
-
};
|
|
171
|
-
}>> & Readonly<{}>, {
|
|
172
|
-
extraClasses: string;
|
|
173
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
174
|
-
declare const CodeBlock: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
175
|
-
code: {
|
|
176
|
-
type: StringConstructor;
|
|
177
|
-
required: true;
|
|
178
|
-
};
|
|
179
|
-
language: {
|
|
180
|
-
type: StringConstructor;
|
|
181
|
-
default: string;
|
|
182
|
-
};
|
|
183
|
-
title: {
|
|
184
|
-
type: StringConstructor;
|
|
185
|
-
default: undefined;
|
|
186
|
-
};
|
|
187
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
188
|
-
[key: string]: any;
|
|
189
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
190
|
-
code: {
|
|
191
|
-
type: StringConstructor;
|
|
192
|
-
required: true;
|
|
193
|
-
};
|
|
194
|
-
language: {
|
|
195
|
-
type: StringConstructor;
|
|
196
|
-
default: string;
|
|
197
|
-
};
|
|
198
|
-
title: {
|
|
199
|
-
type: StringConstructor;
|
|
200
|
-
default: undefined;
|
|
201
|
-
};
|
|
202
|
-
}>> & Readonly<{}>, {
|
|
203
|
-
title: string;
|
|
204
|
-
language: string;
|
|
205
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
206
|
-
declare const Admonition: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
207
|
-
type: {
|
|
208
|
-
type: StringConstructor;
|
|
209
|
-
default: string;
|
|
210
|
-
};
|
|
211
|
-
title: {
|
|
212
|
-
type: StringConstructor;
|
|
213
|
-
default: undefined;
|
|
214
|
-
};
|
|
215
|
-
icon: {
|
|
216
|
-
type: StringConstructor;
|
|
217
|
-
default: undefined;
|
|
218
|
-
};
|
|
219
|
-
class: {
|
|
220
|
-
type: StringConstructor;
|
|
221
|
-
default: string;
|
|
222
|
-
};
|
|
223
|
-
style: {
|
|
224
|
-
type: PropType<CSSProperties>;
|
|
225
|
-
default: undefined;
|
|
226
|
-
};
|
|
227
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
228
|
-
[key: string]: any;
|
|
229
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
230
|
-
type: {
|
|
231
|
-
type: StringConstructor;
|
|
232
|
-
default: string;
|
|
233
|
-
};
|
|
234
|
-
title: {
|
|
235
|
-
type: StringConstructor;
|
|
236
|
-
default: undefined;
|
|
237
|
-
};
|
|
238
|
-
icon: {
|
|
239
|
-
type: StringConstructor;
|
|
240
|
-
default: undefined;
|
|
241
|
-
};
|
|
242
|
-
class: {
|
|
243
|
-
type: StringConstructor;
|
|
244
|
-
default: string;
|
|
245
|
-
};
|
|
246
|
-
style: {
|
|
247
|
-
type: PropType<CSSProperties>;
|
|
248
|
-
default: undefined;
|
|
249
|
-
};
|
|
250
|
-
}>> & Readonly<{}>, {
|
|
251
|
-
class: string;
|
|
252
|
-
style: CSSProperties;
|
|
253
|
-
title: string;
|
|
254
|
-
type: string;
|
|
255
|
-
icon: string;
|
|
256
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
257
|
-
declare const Details: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
258
|
-
title: {
|
|
259
|
-
type: StringConstructor;
|
|
260
|
-
required: true;
|
|
261
|
-
};
|
|
262
|
-
icon: {
|
|
263
|
-
type: StringConstructor;
|
|
264
|
-
default: undefined;
|
|
265
|
-
};
|
|
266
|
-
defaultOpen: {
|
|
267
|
-
type: BooleanConstructor;
|
|
268
|
-
default: boolean;
|
|
269
|
-
};
|
|
270
|
-
class: {
|
|
271
|
-
type: StringConstructor;
|
|
272
|
-
default: string;
|
|
273
|
-
};
|
|
274
|
-
style: {
|
|
275
|
-
type: PropType<CSSProperties>;
|
|
276
|
-
default: undefined;
|
|
277
|
-
};
|
|
278
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
279
|
-
[key: string]: any;
|
|
280
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
281
|
-
title: {
|
|
282
|
-
type: StringConstructor;
|
|
283
|
-
required: true;
|
|
284
|
-
};
|
|
285
|
-
icon: {
|
|
286
|
-
type: StringConstructor;
|
|
287
|
-
default: undefined;
|
|
288
|
-
};
|
|
289
|
-
defaultOpen: {
|
|
290
|
-
type: BooleanConstructor;
|
|
291
|
-
default: boolean;
|
|
292
|
-
};
|
|
293
|
-
class: {
|
|
294
|
-
type: StringConstructor;
|
|
295
|
-
default: string;
|
|
296
|
-
};
|
|
297
|
-
style: {
|
|
298
|
-
type: PropType<CSSProperties>;
|
|
299
|
-
default: undefined;
|
|
300
|
-
};
|
|
301
|
-
}>> & Readonly<{}>, {
|
|
302
|
-
class: string;
|
|
303
|
-
style: CSSProperties;
|
|
304
|
-
icon: string;
|
|
305
|
-
defaultOpen: boolean;
|
|
306
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
307
|
-
declare const Modal: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
308
|
-
title: {
|
|
309
|
-
type: StringConstructor;
|
|
310
|
-
required: true;
|
|
311
|
-
};
|
|
312
|
-
isOpen: {
|
|
313
|
-
type: BooleanConstructor;
|
|
314
|
-
required: true;
|
|
315
|
-
};
|
|
316
|
-
onClose: {
|
|
317
|
-
type: PropType<() => void>;
|
|
318
|
-
required: true;
|
|
319
|
-
};
|
|
320
|
-
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
321
|
-
[key: string]: any;
|
|
322
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
323
|
-
title: {
|
|
324
|
-
type: StringConstructor;
|
|
325
|
-
required: true;
|
|
326
|
-
};
|
|
327
|
-
isOpen: {
|
|
328
|
-
type: BooleanConstructor;
|
|
329
|
-
required: true;
|
|
330
|
-
};
|
|
331
|
-
onClose: {
|
|
332
|
-
type: PropType<() => void>;
|
|
333
|
-
required: true;
|
|
334
|
-
};
|
|
335
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
336
|
-
|
|
337
182
|
declare global {
|
|
338
183
|
interface Window {
|
|
339
184
|
__twCDNRefs?: number;
|
|
@@ -356,34 +201,38 @@ declare function scanTailwindCDN(): void;
|
|
|
356
201
|
*/
|
|
357
202
|
declare function preloadTailwindCDN(): void;
|
|
358
203
|
|
|
359
|
-
interface
|
|
360
|
-
|
|
361
|
-
setModals: (value: Record<string, boolean> | ((prev: Record<string, boolean>) => Record<string, boolean>)) => void;
|
|
362
|
-
articleClass: string;
|
|
363
|
-
allElements: Token[];
|
|
204
|
+
interface VanillaRenderContext {
|
|
205
|
+
/** Parse markdown string into tokens */
|
|
364
206
|
parseMarkdown: (md: string) => Token[];
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
207
|
+
/** Render tokens into an HTMLElement */
|
|
208
|
+
renderElements: (tokens: Token[]) => HTMLElement;
|
|
209
|
+
/** Render inline text into a DocumentFragment */
|
|
210
|
+
renderInline: (text: string) => DocumentFragment;
|
|
211
|
+
/** Parse markdown string and render into an HTMLElement */
|
|
212
|
+
renderMarkdown: (md: string) => HTMLElement;
|
|
368
213
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
/** The directive type string, e.g. 'card', 'note', 'modal' */
|
|
214
|
+
interface DirectiveProps {
|
|
215
|
+
/** The directive type string */
|
|
372
216
|
directiveType: string;
|
|
373
|
-
/** Parsed key="value" attributes
|
|
217
|
+
/** Parsed key="value" attributes */
|
|
374
218
|
props: Record<string, string>;
|
|
375
|
-
/** Named slots → raw content strings
|
|
219
|
+
/** Named slots → raw content strings */
|
|
376
220
|
slots: Record<string, string>;
|
|
377
|
-
/**
|
|
378
|
-
renderSlot: (name: string) =>
|
|
379
|
-
/**
|
|
380
|
-
context:
|
|
381
|
-
/** Position index
|
|
382
|
-
index:
|
|
221
|
+
/** Render a named slot as parsed markdown */
|
|
222
|
+
renderSlot: (name: string) => DocumentFragment;
|
|
223
|
+
/** Render context */
|
|
224
|
+
context: VanillaRenderContext;
|
|
225
|
+
/** Position index */
|
|
226
|
+
index: number;
|
|
383
227
|
/** Full parsed AST */
|
|
384
228
|
allElements: Token[];
|
|
385
|
-
/** Extra flags
|
|
229
|
+
/** Extra flags */
|
|
386
230
|
options?: Record<string, any>;
|
|
231
|
+
/** Inline renderer shortcut */
|
|
232
|
+
renderInline: (text: string) => DocumentFragment;
|
|
233
|
+
/** Full markdown renderer shortcut (for complex directives like slide) */
|
|
234
|
+
renderMarkdown?: (md: string) => HTMLElement;
|
|
387
235
|
}
|
|
236
|
+
type DirectiveRendererFn = (props: DirectiveProps) => HTMLElement | DocumentFragment;
|
|
388
237
|
|
|
389
|
-
export {
|
|
238
|
+
export { type BlockquoteToken, type CSSProperties, type CodeblockToken, CustomMarkdownRenderer, type DirectiveProps, type DirectiveRendererFn, type DirectiveToken, type HeaderToken, type HrToken, type HtmlBlockToken, type HtmlToken, type ImageToken, type ListToken, NRpreviewer, type NRpreviewerProps, type ParagraphToken, RawHtmlRenderer, type TableToken, type TocToken, type Token, type VanillaRenderContext, parseMarkdown, preloadTailwindCDN, scanTailwindCDN, useLazyTailwindCDN };
|