@d10f/asciidoc-astro-loader 0.0.2 → 0.0.3
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 +132 -92
- package/dist/chunk-2UGTFP4R.js +22 -0
- package/dist/chunk-5P6LDJGO.js +65 -0
- package/dist/{chunk-BRMWIQA2.js → chunk-KZRXEKZK.js} +5 -9
- package/dist/{index-BNxO58s3.d.cts → index-sFlXF8Qm.d.cts} +142 -65
- package/dist/{index-BNxO58s3.d.ts → index-sFlXF8Qm.d.ts} +142 -65
- package/dist/index.cjs +225 -254
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +47 -37
- package/dist/lib/asciidoc/converters/index.cjs +3 -99
- package/dist/lib/asciidoc/converters/index.d.cts +2 -2
- package/dist/lib/asciidoc/converters/index.d.ts +2 -2
- package/dist/lib/asciidoc/converters/index.js +2 -2
- package/dist/lib/asciidoc/templates/engines/index.d.cts +1 -1
- package/dist/lib/asciidoc/templates/engines/index.d.ts +1 -1
- package/dist/lib/shiki/transformers/index.cjs +88 -79
- package/dist/lib/shiki/transformers/index.d.cts +23 -32
- package/dist/lib/shiki/transformers/index.d.ts +23 -32
- package/dist/lib/shiki/transformers/index.js +45 -4
- package/package.json +1 -1
- package/dist/chunk-DDIUST2Z.js +0 -113
|
@@ -43,73 +43,118 @@ declare const loaderOptionsSchema: z.ZodObject<{
|
|
|
43
43
|
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
44
44
|
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
45
45
|
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
enforce: z.ZodUnion<[z.ZodLiteral<"pre">, z.ZodLiteral<"post">]>;
|
|
46
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
49
48
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
|
|
51
|
-
enforce: "pre" | "post";
|
|
49
|
+
cssClasses?: string | undefined;
|
|
52
50
|
}, {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
cssClasses?: string | undefined;
|
|
52
|
+
}>>;
|
|
53
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
54
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
55
|
+
light: z.ZodString;
|
|
56
|
+
dark: z.ZodString;
|
|
57
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
58
|
+
light: z.ZodString;
|
|
59
|
+
dark: z.ZodString;
|
|
60
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
61
|
+
light: z.ZodString;
|
|
62
|
+
dark: z.ZodString;
|
|
63
|
+
}, z.ZodString, "strip">>]>, {
|
|
58
64
|
light: string;
|
|
59
65
|
dark: string;
|
|
60
66
|
} & {
|
|
61
67
|
[other: string]: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
}, string | z.objectInputType<{
|
|
69
|
+
light: z.ZodString;
|
|
70
|
+
dark: z.ZodString;
|
|
71
|
+
}, z.ZodString, "strip">>>;
|
|
72
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
73
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
74
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
75
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
76
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
cssClasses?: string | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
cssClasses?: string | undefined;
|
|
82
|
+
}>>;
|
|
83
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
84
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
85
|
+
light: z.ZodString;
|
|
86
|
+
dark: z.ZodString;
|
|
87
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
88
|
+
light: z.ZodString;
|
|
89
|
+
dark: z.ZodString;
|
|
90
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
91
|
+
light: z.ZodString;
|
|
92
|
+
dark: z.ZodString;
|
|
93
|
+
}, z.ZodString, "strip">>]>, {
|
|
94
|
+
light: string;
|
|
95
|
+
dark: string;
|
|
96
|
+
} & {
|
|
97
|
+
[other: string]: string;
|
|
98
|
+
}, string | z.objectInputType<{
|
|
73
99
|
light: z.ZodString;
|
|
74
100
|
dark: z.ZodString;
|
|
75
|
-
}, z.ZodString, "strip"
|
|
76
|
-
defaultColor
|
|
77
|
-
cssVariablePrefix
|
|
78
|
-
mergeWhitespaces
|
|
79
|
-
tabindex
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
101
|
+
}, z.ZodString, "strip">>>;
|
|
102
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
103
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
104
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
105
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
106
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
cssClasses?: string | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
cssClasses?: string | undefined;
|
|
112
|
+
}>>;
|
|
113
|
+
}, z.ZodTypeAny, "passthrough">>, {
|
|
85
114
|
defaultColor: string;
|
|
86
115
|
cssVariablePrefix: string;
|
|
87
116
|
mergeWhitespaces: boolean | "never";
|
|
88
117
|
tabindex: string | number | false;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}[] | undefined;
|
|
118
|
+
callouts?: {
|
|
119
|
+
cssClasses?: string | undefined;
|
|
120
|
+
} | undefined;
|
|
93
121
|
themes: {
|
|
94
122
|
light: string;
|
|
95
123
|
dark: string;
|
|
96
124
|
} & {
|
|
97
125
|
[other: string]: string;
|
|
98
126
|
};
|
|
99
|
-
}, {
|
|
100
|
-
theme
|
|
127
|
+
}, z.objectInputType<{
|
|
128
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
101
129
|
light: z.ZodString;
|
|
102
130
|
dark: z.ZodString;
|
|
103
|
-
}, z.ZodString,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
131
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
132
|
+
light: z.ZodString;
|
|
133
|
+
dark: z.ZodString;
|
|
134
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
135
|
+
light: z.ZodString;
|
|
136
|
+
dark: z.ZodString;
|
|
137
|
+
}, z.ZodString, "strip">>]>, {
|
|
138
|
+
light: string;
|
|
139
|
+
dark: string;
|
|
140
|
+
} & {
|
|
141
|
+
[other: string]: string;
|
|
142
|
+
}, string | z.objectInputType<{
|
|
143
|
+
light: z.ZodString;
|
|
144
|
+
dark: z.ZodString;
|
|
145
|
+
}, z.ZodString, "strip">>>;
|
|
146
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
147
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
148
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
149
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
150
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
cssClasses?: string | undefined;
|
|
154
|
+
}, {
|
|
155
|
+
cssClasses?: string | undefined;
|
|
156
|
+
}>>;
|
|
157
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
113
158
|
preamble: z.ZodDefault<z.ZodObject<{
|
|
114
159
|
tableOfContents: z.ZodDefault<z.ZodBoolean>;
|
|
115
160
|
maxLevel: z.ZodDefault<z.ZodNumber>;
|
|
@@ -137,10 +182,9 @@ declare const loaderOptionsSchema: z.ZodObject<{
|
|
|
137
182
|
cssVariablePrefix: string;
|
|
138
183
|
mergeWhitespaces: boolean | "never";
|
|
139
184
|
tabindex: string | number | false;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}[] | undefined;
|
|
185
|
+
callouts?: {
|
|
186
|
+
cssClasses?: string | undefined;
|
|
187
|
+
} | undefined;
|
|
144
188
|
themes: {
|
|
145
189
|
light: string;
|
|
146
190
|
dark: string;
|
|
@@ -160,20 +204,37 @@ declare const loaderOptionsSchema: z.ZodObject<{
|
|
|
160
204
|
template: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
161
205
|
recursive: z.ZodDefault<z.ZodBoolean>;
|
|
162
206
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
163
|
-
syntaxHighlighting?: {
|
|
164
|
-
theme
|
|
207
|
+
syntaxHighlighting?: z.objectInputType<{
|
|
208
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
165
209
|
light: z.ZodString;
|
|
166
210
|
dark: z.ZodString;
|
|
167
|
-
}, z.ZodString,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
211
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
212
|
+
light: z.ZodString;
|
|
213
|
+
dark: z.ZodString;
|
|
214
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
215
|
+
light: z.ZodString;
|
|
216
|
+
dark: z.ZodString;
|
|
217
|
+
}, z.ZodString, "strip">>]>, {
|
|
218
|
+
light: string;
|
|
219
|
+
dark: string;
|
|
220
|
+
} & {
|
|
221
|
+
[other: string]: string;
|
|
222
|
+
}, string | z.objectInputType<{
|
|
223
|
+
light: z.ZodString;
|
|
224
|
+
dark: z.ZodString;
|
|
225
|
+
}, z.ZodString, "strip">>>;
|
|
226
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
227
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
228
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
229
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
230
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
cssClasses?: string | undefined;
|
|
234
|
+
}, {
|
|
235
|
+
cssClasses?: string | undefined;
|
|
236
|
+
}>>;
|
|
237
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
177
238
|
preamble?: {
|
|
178
239
|
tableOfContents?: boolean | undefined;
|
|
179
240
|
maxLevel?: number | undefined;
|
|
@@ -294,6 +355,15 @@ type CustomConverter = {
|
|
|
294
355
|
};
|
|
295
356
|
type CustomConverterFactoryFn<T extends object | undefined> = (converterOptions: T) => CustomConverterFn;
|
|
296
357
|
type CustomConverterFn = (opts: RequiredOptions, highlighter: HighlighterCore) => CustomConverter;
|
|
358
|
+
type ShikiTransformerFactory<T extends object> = (options?: T) => ShikiTransformerFactoryFn;
|
|
359
|
+
type ShikiTransformerFactoryFn = (node: AbstractNode) => ShikiTransformer;
|
|
360
|
+
type CalloutOptions = Partial<{
|
|
361
|
+
/**
|
|
362
|
+
* CSS class to apply to Asciidoc callout elements. By default, styles
|
|
363
|
+
* are injected into the HTML element to make it unselectable.
|
|
364
|
+
*/
|
|
365
|
+
cssClasses: string;
|
|
366
|
+
}>;
|
|
297
367
|
type AsciidocLoader = {
|
|
298
368
|
/**
|
|
299
369
|
* Path to the Asciidoc documents to parse.
|
|
@@ -405,7 +475,14 @@ type AsciidocLoader = {
|
|
|
405
475
|
*
|
|
406
476
|
* @default [ transformerNotationDiff, transformerNotationHighlight, transformerNotationFocus ]
|
|
407
477
|
*/
|
|
408
|
-
transformers: ShikiTransformer
|
|
478
|
+
transformers: Array<ShikiTransformer | ShikiTransformerFactoryFn>;
|
|
479
|
+
callouts: Partial<{
|
|
480
|
+
/**
|
|
481
|
+
* CSS class to apply to Asciidoc callout elements. By default, styles
|
|
482
|
+
* are injected into the HTML element to make it unselectable.
|
|
483
|
+
*/
|
|
484
|
+
cssClasses: CalloutOptions['cssClasses'];
|
|
485
|
+
}>;
|
|
409
486
|
}>;
|
|
410
487
|
};
|
|
411
488
|
/**
|
|
@@ -449,4 +526,4 @@ interface RawTemplate {
|
|
|
449
526
|
renderString(content: string, options?: Record<string, unknown>): string;
|
|
450
527
|
}
|
|
451
528
|
|
|
452
|
-
export { type AsciidocLoader as A, type CustomConverterFactoryFn as C, type FilesystemTemplate as F, type NodeContext as N, type RawTemplate as R, type TemplateModule as T, type AsciidocTemplate as a,
|
|
529
|
+
export { type AsciidocLoader as A, type CustomConverterFactoryFn as C, type FilesystemTemplate as F, type NodeContext as N, type RawTemplate as R, type ShikiTransformerFactoryFn as S, type TemplateModule as T, type AsciidocTemplate as a, type ShikiTransformerFactory as b, AbstractEngine as c };
|
|
@@ -43,73 +43,118 @@ declare const loaderOptionsSchema: z.ZodObject<{
|
|
|
43
43
|
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
44
44
|
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
45
45
|
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
enforce: z.ZodUnion<[z.ZodLiteral<"pre">, z.ZodLiteral<"post">]>;
|
|
46
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
49
48
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
|
|
51
|
-
enforce: "pre" | "post";
|
|
49
|
+
cssClasses?: string | undefined;
|
|
52
50
|
}, {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
cssClasses?: string | undefined;
|
|
52
|
+
}>>;
|
|
53
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
54
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
55
|
+
light: z.ZodString;
|
|
56
|
+
dark: z.ZodString;
|
|
57
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
58
|
+
light: z.ZodString;
|
|
59
|
+
dark: z.ZodString;
|
|
60
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
61
|
+
light: z.ZodString;
|
|
62
|
+
dark: z.ZodString;
|
|
63
|
+
}, z.ZodString, "strip">>]>, {
|
|
58
64
|
light: string;
|
|
59
65
|
dark: string;
|
|
60
66
|
} & {
|
|
61
67
|
[other: string]: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
}, string | z.objectInputType<{
|
|
69
|
+
light: z.ZodString;
|
|
70
|
+
dark: z.ZodString;
|
|
71
|
+
}, z.ZodString, "strip">>>;
|
|
72
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
73
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
74
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
75
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
76
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
cssClasses?: string | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
cssClasses?: string | undefined;
|
|
82
|
+
}>>;
|
|
83
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
84
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
85
|
+
light: z.ZodString;
|
|
86
|
+
dark: z.ZodString;
|
|
87
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
88
|
+
light: z.ZodString;
|
|
89
|
+
dark: z.ZodString;
|
|
90
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
91
|
+
light: z.ZodString;
|
|
92
|
+
dark: z.ZodString;
|
|
93
|
+
}, z.ZodString, "strip">>]>, {
|
|
94
|
+
light: string;
|
|
95
|
+
dark: string;
|
|
96
|
+
} & {
|
|
97
|
+
[other: string]: string;
|
|
98
|
+
}, string | z.objectInputType<{
|
|
73
99
|
light: z.ZodString;
|
|
74
100
|
dark: z.ZodString;
|
|
75
|
-
}, z.ZodString, "strip"
|
|
76
|
-
defaultColor
|
|
77
|
-
cssVariablePrefix
|
|
78
|
-
mergeWhitespaces
|
|
79
|
-
tabindex
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
101
|
+
}, z.ZodString, "strip">>>;
|
|
102
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
103
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
104
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
105
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
106
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
cssClasses?: string | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
cssClasses?: string | undefined;
|
|
112
|
+
}>>;
|
|
113
|
+
}, z.ZodTypeAny, "passthrough">>, {
|
|
85
114
|
defaultColor: string;
|
|
86
115
|
cssVariablePrefix: string;
|
|
87
116
|
mergeWhitespaces: boolean | "never";
|
|
88
117
|
tabindex: string | number | false;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}[] | undefined;
|
|
118
|
+
callouts?: {
|
|
119
|
+
cssClasses?: string | undefined;
|
|
120
|
+
} | undefined;
|
|
93
121
|
themes: {
|
|
94
122
|
light: string;
|
|
95
123
|
dark: string;
|
|
96
124
|
} & {
|
|
97
125
|
[other: string]: string;
|
|
98
126
|
};
|
|
99
|
-
}, {
|
|
100
|
-
theme
|
|
127
|
+
}, z.objectInputType<{
|
|
128
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
101
129
|
light: z.ZodString;
|
|
102
130
|
dark: z.ZodString;
|
|
103
|
-
}, z.ZodString,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
131
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
132
|
+
light: z.ZodString;
|
|
133
|
+
dark: z.ZodString;
|
|
134
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
135
|
+
light: z.ZodString;
|
|
136
|
+
dark: z.ZodString;
|
|
137
|
+
}, z.ZodString, "strip">>]>, {
|
|
138
|
+
light: string;
|
|
139
|
+
dark: string;
|
|
140
|
+
} & {
|
|
141
|
+
[other: string]: string;
|
|
142
|
+
}, string | z.objectInputType<{
|
|
143
|
+
light: z.ZodString;
|
|
144
|
+
dark: z.ZodString;
|
|
145
|
+
}, z.ZodString, "strip">>>;
|
|
146
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
147
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
148
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
149
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
150
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
cssClasses?: string | undefined;
|
|
154
|
+
}, {
|
|
155
|
+
cssClasses?: string | undefined;
|
|
156
|
+
}>>;
|
|
157
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
113
158
|
preamble: z.ZodDefault<z.ZodObject<{
|
|
114
159
|
tableOfContents: z.ZodDefault<z.ZodBoolean>;
|
|
115
160
|
maxLevel: z.ZodDefault<z.ZodNumber>;
|
|
@@ -137,10 +182,9 @@ declare const loaderOptionsSchema: z.ZodObject<{
|
|
|
137
182
|
cssVariablePrefix: string;
|
|
138
183
|
mergeWhitespaces: boolean | "never";
|
|
139
184
|
tabindex: string | number | false;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}[] | undefined;
|
|
185
|
+
callouts?: {
|
|
186
|
+
cssClasses?: string | undefined;
|
|
187
|
+
} | undefined;
|
|
144
188
|
themes: {
|
|
145
189
|
light: string;
|
|
146
190
|
dark: string;
|
|
@@ -160,20 +204,37 @@ declare const loaderOptionsSchema: z.ZodObject<{
|
|
|
160
204
|
template: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
161
205
|
recursive: z.ZodDefault<z.ZodBoolean>;
|
|
162
206
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
163
|
-
syntaxHighlighting?: {
|
|
164
|
-
theme
|
|
207
|
+
syntaxHighlighting?: z.objectInputType<{
|
|
208
|
+
theme: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
165
209
|
light: z.ZodString;
|
|
166
210
|
dark: z.ZodString;
|
|
167
|
-
}, z.ZodString,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
211
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
212
|
+
light: z.ZodString;
|
|
213
|
+
dark: z.ZodString;
|
|
214
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
215
|
+
light: z.ZodString;
|
|
216
|
+
dark: z.ZodString;
|
|
217
|
+
}, z.ZodString, "strip">>]>, {
|
|
218
|
+
light: string;
|
|
219
|
+
dark: string;
|
|
220
|
+
} & {
|
|
221
|
+
[other: string]: string;
|
|
222
|
+
}, string | z.objectInputType<{
|
|
223
|
+
light: z.ZodString;
|
|
224
|
+
dark: z.ZodString;
|
|
225
|
+
}, z.ZodString, "strip">>>;
|
|
226
|
+
defaultColor: z.ZodDefault<z.ZodString>;
|
|
227
|
+
cssVariablePrefix: z.ZodDefault<z.ZodString>;
|
|
228
|
+
mergeWhitespaces: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"never">]>>;
|
|
229
|
+
tabindex: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodLiteral<false>]>>;
|
|
230
|
+
callouts: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
cssClasses: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
cssClasses?: string | undefined;
|
|
234
|
+
}, {
|
|
235
|
+
cssClasses?: string | undefined;
|
|
236
|
+
}>>;
|
|
237
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
177
238
|
preamble?: {
|
|
178
239
|
tableOfContents?: boolean | undefined;
|
|
179
240
|
maxLevel?: number | undefined;
|
|
@@ -294,6 +355,15 @@ type CustomConverter = {
|
|
|
294
355
|
};
|
|
295
356
|
type CustomConverterFactoryFn<T extends object | undefined> = (converterOptions: T) => CustomConverterFn;
|
|
296
357
|
type CustomConverterFn = (opts: RequiredOptions, highlighter: HighlighterCore) => CustomConverter;
|
|
358
|
+
type ShikiTransformerFactory<T extends object> = (options?: T) => ShikiTransformerFactoryFn;
|
|
359
|
+
type ShikiTransformerFactoryFn = (node: AbstractNode) => ShikiTransformer;
|
|
360
|
+
type CalloutOptions = Partial<{
|
|
361
|
+
/**
|
|
362
|
+
* CSS class to apply to Asciidoc callout elements. By default, styles
|
|
363
|
+
* are injected into the HTML element to make it unselectable.
|
|
364
|
+
*/
|
|
365
|
+
cssClasses: string;
|
|
366
|
+
}>;
|
|
297
367
|
type AsciidocLoader = {
|
|
298
368
|
/**
|
|
299
369
|
* Path to the Asciidoc documents to parse.
|
|
@@ -405,7 +475,14 @@ type AsciidocLoader = {
|
|
|
405
475
|
*
|
|
406
476
|
* @default [ transformerNotationDiff, transformerNotationHighlight, transformerNotationFocus ]
|
|
407
477
|
*/
|
|
408
|
-
transformers: ShikiTransformer
|
|
478
|
+
transformers: Array<ShikiTransformer | ShikiTransformerFactoryFn>;
|
|
479
|
+
callouts: Partial<{
|
|
480
|
+
/**
|
|
481
|
+
* CSS class to apply to Asciidoc callout elements. By default, styles
|
|
482
|
+
* are injected into the HTML element to make it unselectable.
|
|
483
|
+
*/
|
|
484
|
+
cssClasses: CalloutOptions['cssClasses'];
|
|
485
|
+
}>;
|
|
409
486
|
}>;
|
|
410
487
|
};
|
|
411
488
|
/**
|
|
@@ -449,4 +526,4 @@ interface RawTemplate {
|
|
|
449
526
|
renderString(content: string, options?: Record<string, unknown>): string;
|
|
450
527
|
}
|
|
451
528
|
|
|
452
|
-
export { type AsciidocLoader as A, type CustomConverterFactoryFn as C, type FilesystemTemplate as F, type NodeContext as N, type RawTemplate as R, type TemplateModule as T, type AsciidocTemplate as a,
|
|
529
|
+
export { type AsciidocLoader as A, type CustomConverterFactoryFn as C, type FilesystemTemplate as F, type NodeContext as N, type RawTemplate as R, type ShikiTransformerFactoryFn as S, type TemplateModule as T, type AsciidocTemplate as a, type ShikiTransformerFactory as b, AbstractEngine as c };
|