@d10f/asciidoc-astro-loader 0.0.8 → 0.0.9
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/{index-PY1MiQbP.d.cts → index-DwboxIUQ.d.cts} +2 -2
- package/dist/{index-PY1MiQbP.d.ts → index-DwboxIUQ.d.ts} +2 -2
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -0
- package/dist/lib/asciidoc/converters/index.d.cts +1 -1
- package/dist/lib/asciidoc/converters/index.d.ts +1 -1
- 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.d.cts +31 -4
- package/dist/lib/shiki/transformers/index.d.ts +31 -4
- package/package.json +2 -2
- package/dist/transformerPrompt-DfCRhAD2.d.ts +0 -32
- package/dist/transformerPrompt-n_gHpQ3r.d.cts +0 -32
|
@@ -489,7 +489,7 @@ type AsciidocLoader = {
|
|
|
489
489
|
/**
|
|
490
490
|
* A list of transformers to apply for source code blocks.
|
|
491
491
|
*
|
|
492
|
-
* @default [
|
|
492
|
+
* @default [ transformAsciidocCallout ]
|
|
493
493
|
*/
|
|
494
494
|
transformers: Array<ShikiTransformer | ShikiTransformerFactoryFn>;
|
|
495
495
|
callouts: Partial<{
|
|
@@ -542,4 +542,4 @@ interface RawTemplate {
|
|
|
542
542
|
renderString(content: string, options?: Record<string, unknown>): string;
|
|
543
543
|
}
|
|
544
544
|
|
|
545
|
-
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,
|
|
545
|
+
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, AbstractEngine as b, type ShikiTransformerFactory as c };
|
|
@@ -489,7 +489,7 @@ type AsciidocLoader = {
|
|
|
489
489
|
/**
|
|
490
490
|
* A list of transformers to apply for source code blocks.
|
|
491
491
|
*
|
|
492
|
-
* @default [
|
|
492
|
+
* @default [ transformAsciidocCallout ]
|
|
493
493
|
*/
|
|
494
494
|
transformers: Array<ShikiTransformer | ShikiTransformerFactoryFn>;
|
|
495
495
|
callouts: Partial<{
|
|
@@ -542,4 +542,4 @@ interface RawTemplate {
|
|
|
542
542
|
renderString(content: string, options?: Record<string, unknown>): string;
|
|
543
543
|
}
|
|
544
544
|
|
|
545
|
-
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,
|
|
545
|
+
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, AbstractEngine as b, type ShikiTransformerFactory as c };
|
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
asciidocLoader: () => asciidocLoader,
|
|
34
|
+
transformAsciidocCallout: () => transformAsciidocCallout,
|
|
34
35
|
transformerPrompt: () => transformerPrompt
|
|
35
36
|
});
|
|
36
37
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -805,5 +806,6 @@ var transformerPrompt = (options) => {
|
|
|
805
806
|
// Annotate the CommonJS export names for ESM import in node:
|
|
806
807
|
0 && (module.exports = {
|
|
807
808
|
asciidocLoader,
|
|
809
|
+
transformAsciidocCallout,
|
|
808
810
|
transformerPrompt
|
|
809
811
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LoaderContext } from 'astro/loaders';
|
|
2
|
-
import { A as AsciidocLoader } from './index-
|
|
3
|
-
export { a as AsciidocTemplate, C as CustomConverterFactoryFn, F as FilesystemTemplate, N as NodeContext, R as RawTemplate } from './index-
|
|
4
|
-
export {
|
|
2
|
+
import { A as AsciidocLoader } from './index-DwboxIUQ.cjs';
|
|
3
|
+
export { a as AsciidocTemplate, C as CustomConverterFactoryFn, F as FilesystemTemplate, N as NodeContext, R as RawTemplate } from './index-DwboxIUQ.cjs';
|
|
4
|
+
export { transformAsciidocCallout, transformerPrompt } from './lib/shiki/transformers/index.cjs';
|
|
5
5
|
import 'shiki';
|
|
6
6
|
import 'asciidoctor';
|
|
7
7
|
import 'astro/zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LoaderContext } from 'astro/loaders';
|
|
2
|
-
import { A as AsciidocLoader } from './index-
|
|
3
|
-
export { a as AsciidocTemplate, C as CustomConverterFactoryFn, F as FilesystemTemplate, N as NodeContext, R as RawTemplate } from './index-
|
|
4
|
-
export {
|
|
2
|
+
import { A as AsciidocLoader } from './index-DwboxIUQ.js';
|
|
3
|
+
export { a as AsciidocTemplate, C as CustomConverterFactoryFn, F as FilesystemTemplate, N as NodeContext, R as RawTemplate } from './index-DwboxIUQ.js';
|
|
4
|
+
export { transformAsciidocCallout, transformerPrompt } from './lib/shiki/transformers/index.js';
|
|
5
5
|
import 'shiki';
|
|
6
6
|
import 'asciidoctor';
|
|
7
7
|
import 'astro/zod';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShikiTransformer } from 'shiki';
|
|
2
|
-
import { C as CustomConverterFactoryFn, S as ShikiTransformerFactoryFn } from '../../../index-
|
|
2
|
+
import { C as CustomConverterFactoryFn, S as ShikiTransformerFactoryFn } from '../../../index-DwboxIUQ.cjs';
|
|
3
3
|
import 'asciidoctor';
|
|
4
4
|
import 'astro/zod';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShikiTransformer } from 'shiki';
|
|
2
|
-
import { C as CustomConverterFactoryFn, S as ShikiTransformerFactoryFn } from '../../../index-
|
|
2
|
+
import { C as CustomConverterFactoryFn, S as ShikiTransformerFactoryFn } from '../../../index-DwboxIUQ.js';
|
|
3
3
|
import 'asciidoctor';
|
|
4
4
|
import 'astro/zod';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as AbstractEngine, a as AsciidocTemplate, T as TemplateModule, F as FilesystemTemplate, R as RawTemplate } from '../../../../index-DwboxIUQ.cjs';
|
|
2
2
|
import { AbstractBlock } from 'asciidoctor';
|
|
3
3
|
import 'shiki';
|
|
4
4
|
import 'astro/zod';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as AbstractEngine, a as AsciidocTemplate, T as TemplateModule, F as FilesystemTemplate, R as RawTemplate } from '../../../../index-DwboxIUQ.js';
|
|
2
2
|
import { AbstractBlock } from 'asciidoctor';
|
|
3
3
|
import 'shiki';
|
|
4
4
|
import 'astro/zod';
|
|
@@ -1,13 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { c as ShikiTransformerFactory } from '../../../index-DwboxIUQ.cjs';
|
|
2
|
+
import { BundledLanguage } from 'shiki/types';
|
|
3
3
|
import 'shiki';
|
|
4
4
|
import 'asciidoctor';
|
|
5
5
|
import 'astro/zod';
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
type PromptOptions = {
|
|
8
|
+
prompt: string;
|
|
9
|
+
cssClasses: string;
|
|
10
|
+
};
|
|
11
|
+
type TransformOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* String of CSS classes to apply to leading prompt character(s) on
|
|
14
|
+
* source code blocks of type console.
|
|
15
|
+
*/
|
|
16
|
+
cssClasses?: string;
|
|
17
|
+
/**
|
|
18
|
+
* An object mapping each language block to a prompt string. An object
|
|
19
|
+
* can also be provided specified with two keys, the prompt and the
|
|
20
|
+
* css classes that modify this prompt in particular. Useful when you
|
|
21
|
+
* want to style them differently from the
|
|
22
|
+
* If not provided, it will default to look at the block attribute.
|
|
23
|
+
*/
|
|
24
|
+
langs?: Partial<Record<BundledLanguage, PromptOptions | string>>;
|
|
25
|
+
/**
|
|
26
|
+
* The name of the block attribute on the original document to look
|
|
27
|
+
* for and use as the prompt for this block.
|
|
28
|
+
*
|
|
29
|
+
* @default custom-prompt
|
|
30
|
+
*/
|
|
31
|
+
promptAttribute?: string;
|
|
32
|
+
};
|
|
33
|
+
declare const transformerPrompt: ShikiTransformerFactory<TransformOptions>;
|
|
7
34
|
|
|
8
35
|
type TransformerOptions = Partial<{
|
|
9
36
|
cssClasses?: string;
|
|
10
37
|
}>;
|
|
11
38
|
declare const transformAsciidocCallout: ShikiTransformerFactory<TransformerOptions>;
|
|
12
39
|
|
|
13
|
-
export { transformAsciidocCallout };
|
|
40
|
+
export { transformAsciidocCallout, transformerPrompt };
|
|
@@ -1,13 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { c as ShikiTransformerFactory } from '../../../index-DwboxIUQ.js';
|
|
2
|
+
import { BundledLanguage } from 'shiki/types';
|
|
3
3
|
import 'shiki';
|
|
4
4
|
import 'asciidoctor';
|
|
5
5
|
import 'astro/zod';
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
type PromptOptions = {
|
|
8
|
+
prompt: string;
|
|
9
|
+
cssClasses: string;
|
|
10
|
+
};
|
|
11
|
+
type TransformOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* String of CSS classes to apply to leading prompt character(s) on
|
|
14
|
+
* source code blocks of type console.
|
|
15
|
+
*/
|
|
16
|
+
cssClasses?: string;
|
|
17
|
+
/**
|
|
18
|
+
* An object mapping each language block to a prompt string. An object
|
|
19
|
+
* can also be provided specified with two keys, the prompt and the
|
|
20
|
+
* css classes that modify this prompt in particular. Useful when you
|
|
21
|
+
* want to style them differently from the
|
|
22
|
+
* If not provided, it will default to look at the block attribute.
|
|
23
|
+
*/
|
|
24
|
+
langs?: Partial<Record<BundledLanguage, PromptOptions | string>>;
|
|
25
|
+
/**
|
|
26
|
+
* The name of the block attribute on the original document to look
|
|
27
|
+
* for and use as the prompt for this block.
|
|
28
|
+
*
|
|
29
|
+
* @default custom-prompt
|
|
30
|
+
*/
|
|
31
|
+
promptAttribute?: string;
|
|
32
|
+
};
|
|
33
|
+
declare const transformerPrompt: ShikiTransformerFactory<TransformOptions>;
|
|
7
34
|
|
|
8
35
|
type TransformerOptions = Partial<{
|
|
9
36
|
cssClasses?: string;
|
|
10
37
|
}>;
|
|
11
38
|
declare const transformAsciidocCallout: ShikiTransformerFactory<TransformerOptions>;
|
|
12
39
|
|
|
13
|
-
export { transformAsciidocCallout };
|
|
40
|
+
export { transformAsciidocCallout, transformerPrompt };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d10f/asciidoc-astro-loader",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "An Astro collections loader for Asciidoc files",
|
|
5
5
|
"author": "D10f",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@shikijs/transformers": "^3.20.0",
|
|
53
53
|
"asciidoctor": "^3.0.4",
|
|
54
|
-
"shiki": "^3.
|
|
54
|
+
"shiki": "^3.20.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"astro": "^5.0.0"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BundledLanguage } from 'shiki/types';
|
|
2
|
-
import { b as ShikiTransformerFactory } from './index-PY1MiQbP.js';
|
|
3
|
-
|
|
4
|
-
type PromptOptions = {
|
|
5
|
-
prompt: string;
|
|
6
|
-
cssClasses: string;
|
|
7
|
-
};
|
|
8
|
-
type TransformOptions = {
|
|
9
|
-
/**
|
|
10
|
-
* String of CSS classes to apply to leading prompt character(s) on
|
|
11
|
-
* source code blocks of type console.
|
|
12
|
-
*/
|
|
13
|
-
cssClasses?: string;
|
|
14
|
-
/**
|
|
15
|
-
* An object mapping each language block to a prompt string. An object
|
|
16
|
-
* can also be provided specified with two keys, the prompt and the
|
|
17
|
-
* css classes that modify this prompt in particular. Useful when you
|
|
18
|
-
* want to style them differently from the
|
|
19
|
-
* If not provided, it will default to look at the block attribute.
|
|
20
|
-
*/
|
|
21
|
-
langs?: Partial<Record<BundledLanguage, PromptOptions | string>>;
|
|
22
|
-
/**
|
|
23
|
-
* The name of the block attribute on the original document to look
|
|
24
|
-
* for and use as the prompt for this block.
|
|
25
|
-
*
|
|
26
|
-
* @default custom-prompt
|
|
27
|
-
*/
|
|
28
|
-
promptAttribute?: string;
|
|
29
|
-
};
|
|
30
|
-
declare const transformerPrompt: ShikiTransformerFactory<TransformOptions>;
|
|
31
|
-
|
|
32
|
-
export { transformerPrompt as t };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BundledLanguage } from 'shiki/types';
|
|
2
|
-
import { b as ShikiTransformerFactory } from './index-PY1MiQbP.cjs';
|
|
3
|
-
|
|
4
|
-
type PromptOptions = {
|
|
5
|
-
prompt: string;
|
|
6
|
-
cssClasses: string;
|
|
7
|
-
};
|
|
8
|
-
type TransformOptions = {
|
|
9
|
-
/**
|
|
10
|
-
* String of CSS classes to apply to leading prompt character(s) on
|
|
11
|
-
* source code blocks of type console.
|
|
12
|
-
*/
|
|
13
|
-
cssClasses?: string;
|
|
14
|
-
/**
|
|
15
|
-
* An object mapping each language block to a prompt string. An object
|
|
16
|
-
* can also be provided specified with two keys, the prompt and the
|
|
17
|
-
* css classes that modify this prompt in particular. Useful when you
|
|
18
|
-
* want to style them differently from the
|
|
19
|
-
* If not provided, it will default to look at the block attribute.
|
|
20
|
-
*/
|
|
21
|
-
langs?: Partial<Record<BundledLanguage, PromptOptions | string>>;
|
|
22
|
-
/**
|
|
23
|
-
* The name of the block attribute on the original document to look
|
|
24
|
-
* for and use as the prompt for this block.
|
|
25
|
-
*
|
|
26
|
-
* @default custom-prompt
|
|
27
|
-
*/
|
|
28
|
-
promptAttribute?: string;
|
|
29
|
-
};
|
|
30
|
-
declare const transformerPrompt: ShikiTransformerFactory<TransformOptions>;
|
|
31
|
-
|
|
32
|
-
export { transformerPrompt as t };
|