@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.
@@ -489,7 +489,7 @@ type AsciidocLoader = {
489
489
  /**
490
490
  * A list of transformers to apply for source code blocks.
491
491
  *
492
- * @default [ transformerNotationDiff, transformerNotationHighlight, transformerNotationFocus ]
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, type ShikiTransformerFactory as b, AbstractEngine as c };
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 [ transformerNotationDiff, transformerNotationHighlight, transformerNotationFocus ]
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, type ShikiTransformerFactory as b, AbstractEngine as c };
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-PY1MiQbP.cjs';
3
- export { a as AsciidocTemplate, C as CustomConverterFactoryFn, F as FilesystemTemplate, N as NodeContext, R as RawTemplate } from './index-PY1MiQbP.cjs';
4
- export { t as transformerPrompt } from './transformerPrompt-n_gHpQ3r.cjs';
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-PY1MiQbP.js';
3
- export { a as AsciidocTemplate, C as CustomConverterFactoryFn, F as FilesystemTemplate, N as NodeContext, R as RawTemplate } from './index-PY1MiQbP.js';
4
- export { t as transformerPrompt } from './transformerPrompt-DfCRhAD2.js';
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
@@ -483,5 +483,6 @@ async function setDocument(doc, converters, templateEngine, { parseData, store }
483
483
  }
484
484
  export {
485
485
  asciidocLoader,
486
+ transformAsciidocCallout,
486
487
  transformerPrompt
487
488
  };
@@ -1,5 +1,5 @@
1
1
  import { ShikiTransformer } from 'shiki';
2
- import { C as CustomConverterFactoryFn, S as ShikiTransformerFactoryFn } from '../../../index-PY1MiQbP.cjs';
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-PY1MiQbP.js';
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 { c as AbstractEngine, a as AsciidocTemplate, T as TemplateModule, F as FilesystemTemplate, R as RawTemplate } from '../../../../index-PY1MiQbP.cjs';
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 { c as AbstractEngine, a as AsciidocTemplate, T as TemplateModule, F as FilesystemTemplate, R as RawTemplate } from '../../../../index-PY1MiQbP.js';
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 { b as ShikiTransformerFactory } from '../../../index-PY1MiQbP.cjs';
2
- export { t as transformerPrompt } from '../../../transformerPrompt-n_gHpQ3r.cjs';
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
- import 'shiki/types';
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 { b as ShikiTransformerFactory } from '../../../index-PY1MiQbP.js';
2
- export { t as transformerPrompt } from '../../../transformerPrompt-DfCRhAD2.js';
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
- import 'shiki/types';
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.8",
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.13.0"
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 };