@the_dissidents/libemmm 0.0.4 → 0.0.5

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.
Files changed (118) hide show
  1. package/dist/src/builtin/builtin.d.ts +2 -0
  2. package/dist/src/builtin/builtin.js +18 -0
  3. package/dist/src/builtin/builtin.js.map +1 -0
  4. package/dist/src/builtin/define-modifier.d.ts +12 -0
  5. package/dist/src/builtin/define-modifier.js +129 -0
  6. package/dist/src/builtin/define-modifier.js.map +1 -0
  7. package/dist/src/builtin/define-shorthand.d.ts +14 -0
  8. package/dist/src/builtin/define-shorthand.js +178 -0
  9. package/dist/src/builtin/define-shorthand.js.map +1 -0
  10. package/dist/src/builtin/internal.d.ts +41 -0
  11. package/dist/src/builtin/internal.js +106 -0
  12. package/dist/src/builtin/internal.js.map +1 -0
  13. package/dist/src/builtin/module.d.ts +16 -0
  14. package/dist/src/builtin/module.js +156 -0
  15. package/dist/src/builtin/module.js.map +1 -0
  16. package/dist/src/builtin/slot.d.ts +7 -0
  17. package/dist/src/builtin/slot.js +136 -0
  18. package/dist/src/builtin/slot.js.map +1 -0
  19. package/dist/src/builtin/var.d.ts +12 -0
  20. package/dist/src/builtin/var.js +103 -0
  21. package/dist/src/builtin/var.js.map +1 -0
  22. package/dist/src/debug-print.d.ts +14 -0
  23. package/dist/src/debug-print.js +113 -0
  24. package/dist/src/debug-print.js.map +1 -0
  25. package/dist/src/debug.d.ts +15 -0
  26. package/dist/src/debug.js +47 -0
  27. package/dist/src/debug.js.map +1 -0
  28. package/dist/src/default/bullets.d.ts +4 -0
  29. package/dist/src/default/bullets.js +39 -0
  30. package/dist/src/default/bullets.js.map +1 -0
  31. package/dist/src/default/code.d.ts +6 -0
  32. package/dist/src/default/code.js +13 -0
  33. package/dist/src/default/code.js.map +1 -0
  34. package/dist/src/default/default.d.ts +2 -0
  35. package/dist/src/default/default.js +20 -0
  36. package/dist/src/default/default.js.map +1 -0
  37. package/dist/src/default/headings.d.ts +20 -0
  38. package/dist/src/default/headings.js +125 -0
  39. package/dist/src/default/headings.js.map +1 -0
  40. package/dist/src/default/html-renderer.d.ts +26 -0
  41. package/dist/src/default/html-renderer.js +108 -0
  42. package/dist/src/default/html-renderer.js.map +1 -0
  43. package/dist/src/default/inline-styles.d.ts +4 -0
  44. package/dist/src/default/inline-styles.js +24 -0
  45. package/dist/src/default/inline-styles.js.map +1 -0
  46. package/dist/src/default/misc.d.ts +6 -0
  47. package/dist/src/default/misc.js +112 -0
  48. package/dist/src/default/misc.js.map +1 -0
  49. package/dist/src/default/notes.d.ts +28 -0
  50. package/dist/src/default/notes.js +109 -0
  51. package/dist/src/default/notes.js.map +1 -0
  52. package/dist/src/default/quotes.d.ts +4 -0
  53. package/dist/src/default/quotes.js +36 -0
  54. package/dist/src/default/quotes.js.map +1 -0
  55. package/dist/src/default/vars.d.ts +2 -0
  56. package/dist/src/default/vars.js +39 -0
  57. package/dist/src/default/vars.js.map +1 -0
  58. package/dist/src/index.d.ts +13 -0
  59. package/dist/src/index.js +58 -0
  60. package/dist/src/index.js.map +1 -0
  61. package/dist/src/interface.d.ts +174 -0
  62. package/dist/src/interface.js +93 -0
  63. package/dist/src/interface.js.map +1 -0
  64. package/dist/src/messages.d.ts +165 -0
  65. package/dist/src/messages.js +279 -0
  66. package/dist/src/messages.js.map +1 -0
  67. package/dist/src/modifier-helper.d.ts +6 -0
  68. package/dist/src/modifier-helper.js +113 -0
  69. package/dist/src/modifier-helper.js.map +1 -0
  70. package/dist/src/parser-config.d.ts +44 -0
  71. package/dist/src/parser-config.js +67 -0
  72. package/dist/src/parser-config.js.map +1 -0
  73. package/dist/src/parser.d.ts +3 -0
  74. package/dist/src/parser.js +652 -0
  75. package/dist/src/parser.js.map +1 -0
  76. package/dist/src/renderer.d.ts +49 -0
  77. package/dist/src/renderer.js +81 -0
  78. package/dist/src/renderer.js.map +1 -0
  79. package/dist/src/scanner.d.ts +22 -0
  80. package/dist/src/scanner.js +50 -0
  81. package/dist/src/scanner.js.map +1 -0
  82. package/dist/src/temp.d.ts +1 -0
  83. package/dist/src/temp.js +108 -0
  84. package/dist/src/temp.js.map +1 -0
  85. package/dist/src/typing-helper.d.ts +7 -0
  86. package/dist/src/typing-helper.js +3 -0
  87. package/dist/src/typing-helper.js.map +1 -0
  88. package/dist/src/util.d.ts +29 -0
  89. package/dist/src/util.js +177 -0
  90. package/dist/src/util.js.map +1 -0
  91. package/dist/tests/advanced_syntax.test.d.ts +1 -0
  92. package/dist/tests/advanced_syntax.test.js +180 -0
  93. package/dist/tests/advanced_syntax.test.js.map +1 -0
  94. package/dist/tests/basic_syntax.test.d.ts +1 -0
  95. package/dist/tests/basic_syntax.test.js +431 -0
  96. package/dist/tests/basic_syntax.test.js.map +1 -0
  97. package/dist/tests/default/headings.test.d.ts +1 -0
  98. package/dist/tests/default/headings.test.js +90 -0
  99. package/dist/tests/default/headings.test.js.map +1 -0
  100. package/dist/tests/define_block.test.d.ts +1 -0
  101. package/dist/tests/define_block.test.js +209 -0
  102. package/dist/tests/define_block.test.js.map +1 -0
  103. package/dist/tests/define_inline.test.d.ts +1 -0
  104. package/dist/tests/define_inline.test.js +289 -0
  105. package/dist/tests/define_inline.test.js.map +1 -0
  106. package/dist/tests/modules.test.d.ts +1 -0
  107. package/dist/tests/modules.test.js +137 -0
  108. package/dist/tests/modules.test.js.map +1 -0
  109. package/dist/tests/shorthands.test.d.ts +1 -0
  110. package/dist/tests/shorthands.test.js +79 -0
  111. package/dist/tests/shorthands.test.js.map +1 -0
  112. package/dist/tsup.config.d.ts +2 -0
  113. package/dist/tsup.config.js +12 -0
  114. package/dist/tsup.config.js.map +1 -0
  115. package/dist/vitest.config.d.ts +2 -0
  116. package/dist/vitest.config.js +17 -0
  117. package/dist/vitest.config.js.map +1 -0
  118. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import { InlineModifierDefinition, BlockModifierDefinition, BlockEntity, LocationRange } from "../interface";
2
+ import { ParseContext } from "../parser-config";
3
+ import { HTMLComponentPlugin, HTMLRenderType } from "./html-renderer";
4
+ export declare const notes: unique symbol;
5
+ type NoteSystem = {
6
+ position: 'block' | 'section' | 'global';
7
+ autonumber: boolean;
8
+ };
9
+ type NoteDefinition = {
10
+ system: string;
11
+ name: string;
12
+ location: LocationRange;
13
+ content: BlockEntity[];
14
+ };
15
+ declare module '../parser-config' {
16
+ interface ParseContextStoreDefinitions {
17
+ [notes]?: {
18
+ systems: Map<string, NoteSystem>;
19
+ definitions: NoteDefinition[];
20
+ };
21
+ }
22
+ }
23
+ export declare function initNotes(cxt: ParseContext): void;
24
+ export declare const NoteBlocks: BlockModifierDefinition<string>[];
25
+ export declare const NoteInlines: InlineModifierDefinition<string>[];
26
+ export declare const NoteInlineRenderersHTML: [InlineModifierDefinition<string>, (node: import("../interface").InlineModifierNode<string>, cxt: import("../renderer").RenderContext<HTMLRenderType>) => string][];
27
+ export declare const NotesFooterPlugin: HTMLComponentPlugin;
28
+ export {};
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotesFooterPlugin = exports.NoteInlineRenderersHTML = exports.NoteInlines = exports.NoteBlocks = exports.notes = void 0;
4
+ exports.initNotes = initNotes;
5
+ const debug_1 = require("../debug");
6
+ const debug_print_1 = require("../debug-print");
7
+ const interface_1 = require("../interface");
8
+ const modifier_helper_1 = require("../modifier-helper");
9
+ const util_1 = require("../util");
10
+ exports.notes = Symbol();
11
+ function initNotes(cxt) {
12
+ cxt.init(exports.notes, {
13
+ systems: new Map(),
14
+ definitions: []
15
+ });
16
+ }
17
+ const noteMarkerInline = new interface_1.InlineModifierDefinition('note', interface_1.ModifierSlotType.None, {
18
+ roleHint: 'link',
19
+ prepareExpand(node) {
20
+ let msgs = (0, modifier_helper_1.checkArguments)(node, 1);
21
+ if (msgs)
22
+ return msgs;
23
+ node.state = node.arguments[0].expansion;
24
+ return [];
25
+ },
26
+ });
27
+ const noteInline = new interface_1.InlineModifierDefinition('note-inline', interface_1.ModifierSlotType.Normal, {
28
+ roleHint: 'quote',
29
+ prepareExpand(node) {
30
+ let msgs = (0, modifier_helper_1.checkArguments)(node, 0, 1);
31
+ if (msgs)
32
+ return msgs;
33
+ node.state = node.arguments.at(0)?.expansion ?? '';
34
+ return [];
35
+ },
36
+ afterProcessExpansion(node, cxt) {
37
+ if (node.state !== undefined) {
38
+ cxt.get(exports.notes).definitions.push({
39
+ system: '',
40
+ name: node.state,
41
+ location: node.location,
42
+ content: [{
43
+ type: interface_1.NodeType.Paragraph,
44
+ location: {
45
+ source: node.location.source,
46
+ start: node.head.end,
47
+ end: node.location.actualEnd ?? node.location.end
48
+ },
49
+ content: node.content
50
+ }]
51
+ });
52
+ }
53
+ return [];
54
+ },
55
+ });
56
+ const noteBlock = new interface_1.BlockModifierDefinition('note', interface_1.ModifierSlotType.Normal, {
57
+ roleHint: 'quote',
58
+ prepareExpand(node) {
59
+ let msgs = (0, modifier_helper_1.checkArguments)(node, 1);
60
+ if (msgs)
61
+ return msgs;
62
+ node.state = node.arguments[0].expansion;
63
+ return [];
64
+ },
65
+ afterProcessExpansion(node, cxt) {
66
+ if (node.state !== undefined) {
67
+ // TODO: check if this is sound in typing
68
+ let content = (0, util_1.stripNode)(...node.content);
69
+ debug_1.debug.trace(`add note: system=<${''}> name=${node.state} @${node.location.start}`);
70
+ debug_1.debug.trace(`-->\n`, debug_print_1.debugPrint.node(...content));
71
+ cxt.get(exports.notes).definitions.push({
72
+ system: '',
73
+ name: node.state,
74
+ location: node.location,
75
+ content: content
76
+ });
77
+ }
78
+ // manually set expansion to nothing
79
+ node.expansion = [];
80
+ return [];
81
+ },
82
+ });
83
+ exports.NoteBlocks = [noteBlock];
84
+ exports.NoteInlines = [noteInline, noteMarkerInline];
85
+ exports.NoteInlineRenderersHTML = [
86
+ [noteMarkerInline, (node, cxt) => {
87
+ if (node.state === undefined)
88
+ return cxt.state.invalidInline(node, 'bad format');
89
+ // find node definition
90
+ const defs = cxt.parseContext.get(exports.notes).definitions;
91
+ const note = defs.findIndex((x) => /*x.position >= node.start &&*/ x.name == node.state);
92
+ if (note < 0)
93
+ return `<sup class='note invalid'>Not found: ${node.state}</sup>`;
94
+ return `<sup class='note' id='notemarker-id-${note}'><a href='#note-id-${note}'>${node.state}</a></sup>`;
95
+ }]
96
+ ];
97
+ const NotesFooterPlugin = (cxt) => {
98
+ let defs = cxt.parseContext.get(exports.notes).definitions;
99
+ if (defs.length == 0)
100
+ return undefined;
101
+ return `<hr/>
102
+ <section class='notes'>
103
+ ${defs.map((x, i) => `<section class='note' id='note-id-${i}'>
104
+ <div class='note-name'><p><a href='#notemarker-id-${i}'>${x.name}</a></p></div>
105
+ <div class='note-content'>${cxt.state.render(x.content, cxt)}</div></section>`).join('\n')}
106
+ </section>`;
107
+ };
108
+ exports.NotesFooterPlugin = NotesFooterPlugin;
109
+ //# sourceMappingURL=notes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../../src/default/notes.ts"],"names":[],"mappings":";;;AAgCA,8BAKC;AArCD,oCAAiC;AACjC,gDAA4C;AAC5C,4CAAyI;AACzI,wDAAoD;AAGpD,kCAAoC;AAGvB,QAAA,KAAK,GAAG,MAAM,EAAE,CAAC;AAuB9B,SAAgB,SAAS,CAAC,GAAiB;IACvC,GAAG,CAAC,IAAI,CAAC,aAAK,EAAE;QACZ,OAAO,EAAE,IAAI,GAAG,EAAE;QAClB,WAAW,EAAE,EAAE;KAClB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,gBAAgB,GAAG,IAAI,oCAAwB,CACjD,MAAM,EAAE,4BAAgB,CAAC,IAAI,EAC7B;IACI,QAAQ,EAAE,MAAM;IAChB,aAAa,CAAC,IAAI;QACd,IAAI,IAAI,GAAG,IAAA,gCAAc,EAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnC,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAA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BlockModifierDefinition<unknown> | BlockModifierDefinition<boolean>)[];
4
+ export declare const QuoteBlockRenderersHTML: ([BlockModifierDefinition<unknown>, (node: import("../interface").BlockModifierNode<any>, cxt: import("../renderer").RenderContext<HTMLRenderType>) => string] | [BlockModifierDefinition<boolean>, (node: import("../interface").BlockModifierNode<boolean>, cxt: import("../renderer").RenderContext<HTMLRenderType>) => string])[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuoteBlockRenderersHTML = exports.QuoteBlocks = void 0;
4
+ const interface_1 = require("../interface");
5
+ const modifier_helper_1 = require("../modifier-helper");
6
+ const quoteBlock = new interface_1.BlockModifierDefinition('quote', interface_1.ModifierSlotType.Normal, { roleHint: 'quote' });
7
+ const epitaphBlock = new interface_1.BlockModifierDefinition('epitaph', interface_1.ModifierSlotType.Normal, { roleHint: 'quote' });
8
+ const attributionBlock = new interface_1.BlockModifierDefinition('by', interface_1.ModifierSlotType.Normal, {
9
+ roleHint: 'quote',
10
+ prepareExpand(node) {
11
+ let msgs = (0, modifier_helper_1.onlyPermitSingleBlock)(node);
12
+ if (msgs)
13
+ return msgs;
14
+ msgs = (0, modifier_helper_1.onlyPermitSimpleParagraphs)(node);
15
+ if (msgs)
16
+ return msgs;
17
+ node.state = true;
18
+ return [];
19
+ },
20
+ });
21
+ exports.QuoteBlocks = [quoteBlock, epitaphBlock, attributionBlock];
22
+ exports.QuoteBlockRenderersHTML = [
23
+ [quoteBlock, (node, cxt) => {
24
+ return `<blockquote>${cxt.state.render(node.content, cxt)}</blockquote>`;
25
+ }],
26
+ [epitaphBlock, (node, cxt) => {
27
+ return `<blockquote class='epitaph'>${cxt.state.render(node.content, cxt)}</blockquote>`;
28
+ }],
29
+ [attributionBlock, (node, cxt) => {
30
+ if (!node.state)
31
+ return cxt.state.invalidBlock(node, 'bad format');
32
+ let para = node.content[0];
33
+ return `<p class='attribution'>${cxt.state.render(para.content, cxt)}</p>`;
34
+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K,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,eAAe,CAAC;QAC7F,CAAC,CAAkD;IACnD,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,KAAK;gBACX,OAAO,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YACtD,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAkB,CAAC;YAC5C,OAAO,0BAA0B,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC;QAC/E,CAAC,CAA2D;CAC/D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { SystemModifierDefinition } from "../interface";
2
+ export declare const VarWrappers: SystemModifierDefinition<void>[];
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VarWrappers = void 0;
4
+ const interface_1 = require("../interface");
5
+ const messages_1 = require("../messages");
6
+ const modifier_helper_1 = require("../modifier-helper");
7
+ function createWrapper(name, varname) {
8
+ varname = varname ?? name.toUpperCase();
9
+ return new interface_1.SystemModifierDefinition(name, interface_1.ModifierSlotType.Normal, {
10
+ delayContentExpansion: true,
11
+ afterProcessExpansion(node, cxt) {
12
+ let msgs = (0, modifier_helper_1.checkArguments)(node, 0);
13
+ if (msgs)
14
+ return msgs;
15
+ const result = (0, modifier_helper_1.onlyPermitPlaintextParagraph)(node);
16
+ if (typeof result !== 'string')
17
+ return result;
18
+ const previous = cxt.variables.get(varname);
19
+ if (previous)
20
+ msgs = [new messages_1.OverwriteSpecialVariableMessage(node.head, varname, previous)];
21
+ cxt.variables.set(varname, result);
22
+ return msgs ?? [];
23
+ },
24
+ });
25
+ }
26
+ exports.VarWrappers = [
27
+ createWrapper('title'),
28
+ createWrapper('subtitle'),
29
+ createWrapper('author'),
30
+ createWrapper('translator'),
31
+ createWrapper('proofreader'),
32
+ createWrapper('typeset-by'),
33
+ createWrapper('cover-by'),
34
+ createWrapper('cover-img'),
35
+ createWrapper('orig-title'),
36
+ createWrapper('orig-link'),
37
+ createWrapper('theme-color'),
38
+ ];
39
+ //# sourceMappingURL=vars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../../src/default/vars.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAC1E,0CAA8D;AAC9D,wDAAkF;AAElF,SAAS,aAAa,CAAC,IAAY,EAAE,OAAgB;IACjD,OAAO,GAAG,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;IACxC,OAAO,IAAI,oCAAwB,CAAO,IAAI,EAAE,4BAAgB,CAAC,MAAM,EAAE;QACrE,qBAAqB,EAAE,IAAI;QAC3B,qBAAqB,CAAC,IAAI,EAAE,GAAG;YAC3B,IAAI,IAAI,GAAG,IAAA,gCAAc,EAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACnC,IAAI,IAAI;gBAAE,OAAO,IAAI,CAAC;YACtB,MAAM,MAAM,GAAG,IAAA,8CAA4B,EAAC,IAAI,CAAC,CAAC;YAClD,IAAI,OAAO,MAAM,KAAK,QAAQ;gBAAE,OAAO,MAAM,CAAC;YAE9C,MAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,QAAQ;gBACR,IAAI,GAAG,CAAC,IAAI,0CAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;YAC/E,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACnC,OAAO,IAAI,IAAI,EAAE,CAAC;QACtB,CAAC;KACJ,CAAC,CAAC;AACP,CAAC;AAEY,QAAA,WAAW,GAAG;IACvB,aAAa,CAAC,OAAO,CAAC;IACtB,aAAa,CAAC,UAAU,CAAC;IACzB,aAAa,CAAC,QAAQ,CAAC;IACvB,aAAa,CAAC,YAAY,CAAC;IAC3B,aAAa,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,YAAY,CAAC;IAC3B,aAAa,CAAC,UAAU,CAAC;IACzB,aAAa,CAAC,WAAW,CAAC;IAC1B,aAAa,CAAC,YAAY,CAAC;IAC3B,aAAa,CAAC,WAAW,CAAC;IAC1B,aAAa,CAAC,aAAa,CAAC;CAC/B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { DebugLevel } from './debug';
2
+ export * from './interface';
3
+ export * from './scanner';
4
+ export * from './parser';
5
+ export * from './parser-config';
6
+ export * from './renderer';
7
+ export * as messages from './messages';
8
+ export * from './builtin/builtin';
9
+ export * from './default/default';
10
+ export * from './default/html-renderer';
11
+ export { DebugLevel } from './debug';
12
+ export { debugPrint } from './debug-print';
13
+ export declare function setDebugLevel(level: DebugLevel): void;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.debugPrint = exports.DebugLevel = exports.messages = void 0;
40
+ exports.setDebugLevel = setDebugLevel;
41
+ const debug_1 = require("./debug");
42
+ __exportStar(require("./interface"), exports);
43
+ __exportStar(require("./scanner"), exports);
44
+ __exportStar(require("./parser"), exports);
45
+ __exportStar(require("./parser-config"), exports);
46
+ __exportStar(require("./renderer"), exports);
47
+ exports.messages = __importStar(require("./messages"));
48
+ __exportStar(require("./builtin/builtin"), exports);
49
+ __exportStar(require("./default/default"), exports);
50
+ __exportStar(require("./default/html-renderer"), exports);
51
+ var debug_2 = require("./debug");
52
+ Object.defineProperty(exports, "DebugLevel", { enumerable: true, get: function () { return debug_2.DebugLevel; } });
53
+ var debug_print_1 = require("./debug-print");
54
+ Object.defineProperty(exports, "debugPrint", { enumerable: true, get: function () { return debug_print_1.debugPrint; } });
55
+ function setDebugLevel(level) {
56
+ debug_1.debug.level = level;
57
+ }
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,sCAEC;AAhBD,mCAA4C;AAE5C,8CAA4B;AAC5B,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,uDAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,0DAAwC;AACxC,iCAAqC;AAA5B,mGAAA,UAAU,OAAA;AACnB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AAEnB,SAAgB,aAAa,CAAC,KAAiB;IAC3C,aAAK,CAAC,KAAK,GAAG,KAAK,CAAC;AACxB,CAAC"}
@@ -0,0 +1,174 @@
1
+ import { ParseContext } from "./parser-config";
2
+ export declare enum MessageSeverity {
3
+ Info = 0,
4
+ Warning = 1,
5
+ Error = 2
6
+ }
7
+ export type Message = {
8
+ readonly severity: MessageSeverity;
9
+ readonly location: LocationRange;
10
+ readonly info: string;
11
+ readonly code: number;
12
+ };
13
+ export type SourceDescriptor = {
14
+ name: string;
15
+ };
16
+ export type LocationRange = {
17
+ original?: LocationRange;
18
+ source: SourceDescriptor;
19
+ start: number;
20
+ end: number;
21
+ actualEnd?: number;
22
+ };
23
+ export declare enum NodeType {
24
+ Root = 0,
25
+ Paragraph = 1,
26
+ Preformatted = 2,
27
+ Text = 3,
28
+ Escaped = 4,
29
+ SystemModifier = 5,
30
+ InlineModifier = 6,
31
+ BlockModifier = 7,
32
+ Interpolation = 8
33
+ }
34
+ export type ParagraphNode = {
35
+ location: LocationRange;
36
+ type: NodeType.Paragraph;
37
+ content: InlineEntity[];
38
+ };
39
+ export type PreNode = {
40
+ location: LocationRange;
41
+ type: NodeType.Preformatted;
42
+ content: {
43
+ start: number;
44
+ end: number;
45
+ text: string;
46
+ };
47
+ };
48
+ export type TextNode = {
49
+ location: LocationRange;
50
+ type: NodeType.Text;
51
+ content: string;
52
+ };
53
+ export type EscapedNode = {
54
+ location: LocationRange;
55
+ type: NodeType.Escaped;
56
+ content: string;
57
+ };
58
+ export type SystemModifierNode<TState> = {
59
+ location: LocationRange;
60
+ type: NodeType.SystemModifier;
61
+ mod: SystemModifierDefinition<TState>;
62
+ state?: TState;
63
+ head: LocationRange;
64
+ arguments: ModifierArgument[];
65
+ content: BlockEntity[];
66
+ expansion?: never[];
67
+ };
68
+ export type BlockModifierNode<TState> = {
69
+ location: LocationRange;
70
+ type: NodeType.BlockModifier;
71
+ mod: BlockModifierDefinition<TState>;
72
+ state?: TState;
73
+ head: LocationRange;
74
+ arguments: ModifierArgument[];
75
+ content: BlockEntity[];
76
+ expansion?: BlockEntity[];
77
+ };
78
+ export type InlineModifierNode<TState> = {
79
+ location: LocationRange;
80
+ type: NodeType.InlineModifier;
81
+ mod: InlineModifierDefinition<TState>;
82
+ state?: TState;
83
+ head: LocationRange;
84
+ arguments: ModifierArgument[];
85
+ content: InlineEntity[];
86
+ expansion?: InlineEntity[];
87
+ };
88
+ export type RootNode = {
89
+ type: NodeType.Root;
90
+ content: BlockEntity[];
91
+ source: SourceDescriptor;
92
+ };
93
+ export type ModifierNode<T = any> = BlockModifierNode<T> | InlineModifierNode<T> | SystemModifierNode<T>;
94
+ export type BlockEntity = ParagraphNode | PreNode | BlockModifierNode<any> | SystemModifierNode<any>;
95
+ export type InlineEntity = TextNode | EscapedNode | InlineModifierNode<any> | SystemModifierNode<any>;
96
+ export type DocumentNode = BlockEntity | InlineEntity | RootNode;
97
+ export type InterpolationNode = {
98
+ location: LocationRange;
99
+ type: NodeType.Interpolation;
100
+ definition: ArgumentInterpolatorDefinition;
101
+ argument: ModifierArgument;
102
+ expansion?: string;
103
+ };
104
+ export type ModifierArgument = {
105
+ location: LocationRange;
106
+ content: ArgumentEntity[];
107
+ expansion?: string;
108
+ };
109
+ export type ArgumentEntity = TextNode | EscapedNode | InterpolationNode;
110
+ export declare enum ModifierSlotType {
111
+ Normal = 0,
112
+ /** Content is preformatted: no escaping, no inner tags */
113
+ Preformatted = 1,
114
+ /** No content slot */
115
+ None = 2
116
+ }
117
+ declare class ModifierBase<TNode, TEntity> {
118
+ readonly name: string;
119
+ readonly slotType: ModifierSlotType;
120
+ constructor(name: string, slotType?: ModifierSlotType, args?: Partial<ModifierBase<TNode, TEntity>>);
121
+ roleHint?: string;
122
+ /**
123
+ * If true, any modifier encountered inside it will *not* be expanded *during parse-content*, *unless* that modifier is `alwaysTryExpand`.
124
+ */
125
+ delayContentExpansion: boolean;
126
+ /**
127
+ * If true, such a modifier will always be expanded whenever it is encountered, *even if* contained in a modifier with `delayContentExpansion`.
128
+ */
129
+ alwaysTryExpand: boolean;
130
+ /** Called before the modifier's content is parsed.
131
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
132
+ */
133
+ beforeParseContent?: (node: TNode, cxt: ParseContext, immediate: boolean) => Message[];
134
+ /** Called after the modifier's content is parsed.
135
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
136
+ */
137
+ afterParseContent?: (node: TNode, cxt: ParseContext, immediate: boolean) => Message[];
138
+ /** Called before reparsing of the expansion.
139
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.*/
140
+ beforeProcessExpansion?: (node: TNode, cxt: ParseContext, immediate: boolean) => Message[];
141
+ /** Called before reparsing of the expansion.
142
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.*/
143
+ afterProcessExpansion?: (node: TNode, cxt: ParseContext, immediate: boolean) => Message[];
144
+ /**
145
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
146
+ */
147
+ prepareExpand?: (node: TNode, cxt: ParseContext, immediate: boolean) => Message[];
148
+ /**
149
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
150
+ */
151
+ expand?: (node: TNode, cxt: ParseContext, immediate: boolean) => TEntity[] | undefined;
152
+ }
153
+ export declare class BlockModifierDefinition<TState> extends ModifierBase<BlockModifierNode<TState>, BlockEntity> {
154
+ }
155
+ export declare class InlineModifierDefinition<TState> extends ModifierBase<InlineModifierNode<TState>, InlineEntity> {
156
+ }
157
+ export declare class SystemModifierDefinition<TState> extends ModifierBase<SystemModifierNode<TState>, never> {
158
+ }
159
+ export declare class ArgumentInterpolatorDefinition {
160
+ readonly name: string;
161
+ readonly postfix: string;
162
+ constructor(name: string, postfix: string, args?: Partial<ArgumentInterpolatorDefinition>);
163
+ alwaysTryExpand: boolean;
164
+ expand?: (content: string, cxt: ParseContext, immediate: boolean) => string | undefined;
165
+ }
166
+ type Shorthand<TMod> = {
167
+ name: string;
168
+ parts: readonly string[];
169
+ postfix: string | undefined;
170
+ mod: TMod;
171
+ };
172
+ export type BlockShorthand<TState> = Shorthand<BlockModifierDefinition<TState>>;
173
+ export type InlineShorthand<TState> = Shorthand<InlineModifierDefinition<TState>>;
174
+ export {};
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArgumentInterpolatorDefinition = exports.SystemModifierDefinition = exports.InlineModifierDefinition = exports.BlockModifierDefinition = exports.ModifierSlotType = exports.NodeType = exports.MessageSeverity = void 0;
4
+ var MessageSeverity;
5
+ (function (MessageSeverity) {
6
+ MessageSeverity[MessageSeverity["Info"] = 0] = "Info";
7
+ MessageSeverity[MessageSeverity["Warning"] = 1] = "Warning";
8
+ MessageSeverity[MessageSeverity["Error"] = 2] = "Error";
9
+ })(MessageSeverity || (exports.MessageSeverity = MessageSeverity = {}));
10
+ var NodeType;
11
+ (function (NodeType) {
12
+ NodeType[NodeType["Root"] = 0] = "Root";
13
+ NodeType[NodeType["Paragraph"] = 1] = "Paragraph";
14
+ NodeType[NodeType["Preformatted"] = 2] = "Preformatted";
15
+ NodeType[NodeType["Text"] = 3] = "Text";
16
+ NodeType[NodeType["Escaped"] = 4] = "Escaped";
17
+ NodeType[NodeType["SystemModifier"] = 5] = "SystemModifier";
18
+ NodeType[NodeType["InlineModifier"] = 6] = "InlineModifier";
19
+ NodeType[NodeType["BlockModifier"] = 7] = "BlockModifier";
20
+ NodeType[NodeType["Interpolation"] = 8] = "Interpolation";
21
+ })(NodeType || (exports.NodeType = NodeType = {}));
22
+ var ModifierSlotType;
23
+ (function (ModifierSlotType) {
24
+ ModifierSlotType[ModifierSlotType["Normal"] = 0] = "Normal";
25
+ /** Content is preformatted: no escaping, no inner tags */
26
+ ModifierSlotType[ModifierSlotType["Preformatted"] = 1] = "Preformatted";
27
+ /** No content slot */
28
+ ModifierSlotType[ModifierSlotType["None"] = 2] = "None";
29
+ })(ModifierSlotType || (exports.ModifierSlotType = ModifierSlotType = {}));
30
+ class ModifierBase {
31
+ name;
32
+ slotType;
33
+ constructor(name, slotType = ModifierSlotType.Normal, args) {
34
+ this.name = name;
35
+ this.slotType = slotType;
36
+ if (args)
37
+ Object.assign(this, args);
38
+ }
39
+ roleHint;
40
+ /**
41
+ * If true, any modifier encountered inside it will *not* be expanded *during parse-content*, *unless* that modifier is `alwaysTryExpand`.
42
+ */
43
+ delayContentExpansion = false;
44
+ /**
45
+ * If true, such a modifier will always be expanded whenever it is encountered, *even if* contained in a modifier with `delayContentExpansion`.
46
+ */
47
+ alwaysTryExpand = false;
48
+ /** Called before the modifier's content is parsed.
49
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
50
+ */
51
+ beforeParseContent;
52
+ /** Called after the modifier's content is parsed.
53
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
54
+ */
55
+ afterParseContent;
56
+ /** Called before reparsing of the expansion.
57
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.*/
58
+ beforeProcessExpansion;
59
+ /** Called before reparsing of the expansion.
60
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.*/
61
+ afterProcessExpansion;
62
+ /**
63
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
64
+ */
65
+ prepareExpand;
66
+ /**
67
+ * @param immediate False when the node is inside a `delayContentExpansion` modifier, but it is `alwaysTryExpand`; otherwise true.
68
+ */
69
+ expand;
70
+ }
71
+ class BlockModifierDefinition extends ModifierBase {
72
+ }
73
+ exports.BlockModifierDefinition = BlockModifierDefinition;
74
+ class InlineModifierDefinition extends ModifierBase {
75
+ }
76
+ exports.InlineModifierDefinition = InlineModifierDefinition;
77
+ class SystemModifierDefinition extends ModifierBase {
78
+ }
79
+ exports.SystemModifierDefinition = SystemModifierDefinition;
80
+ class ArgumentInterpolatorDefinition {
81
+ name;
82
+ postfix;
83
+ constructor(name, postfix, args) {
84
+ this.name = name;
85
+ this.postfix = postfix;
86
+ if (args)
87
+ Object.assign(this, args);
88
+ }
89
+ alwaysTryExpand = false;
90
+ expand;
91
+ }
92
+ exports.ArgumentInterpolatorDefinition = ArgumentInterpolatorDefinition;
93
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":";;;AAEA,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,qDAAI,CAAA;IACJ,2DAAO,CAAA;IACP,uDAAK,CAAA;AACT,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAwBD,IAAY,QAUX;AAVD,WAAY,QAAQ;IAChB,uCAAI,CAAA;IACJ,iDAAS,CAAA;IACT,uDAAY,CAAA;IACZ,uCAAI,CAAA;IACJ,6CAAO,CAAA;IACP,2DAAc,CAAA;IACd,2DAAc,CAAA;IACd,yDAAa,CAAA;IACb,yDAAa,CAAA;AACjB,CAAC,EAVW,QAAQ,wBAAR,QAAQ,QAUnB;AA+FD,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,2DAAM,CAAA;IACN,0DAA0D;IAC1D,uEAAY,CAAA;IACZ,sBAAsB;IACtB,uDAAI,CAAA;AACR,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B;AAED,MAAM,YAAY;IAEM;IACA;IAFpB,YACoB,IAAY,EACZ,WAAW,gBAAgB,CAAC,MAAM,EAClD,IAA4C;QAF5B,SAAI,GAAJ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