@podlite/schema 0.0.14 → 0.0.15
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/esm/ast-helpers.d.ts +2 -0
- package/esm/ast-helpers.js +10 -0
- package/esm/ast-helpers.js.map +1 -0
- package/esm/ast-inerator.d.ts +6 -0
- package/esm/ast-inerator.js +57 -0
- package/esm/ast-inerator.js.map +1 -0
- package/esm/blocks-helpers.d.ts +32 -0
- package/esm/blocks-helpers.js +65 -0
- package/esm/blocks-helpers.js.map +1 -0
- package/esm/exportAny.d.ts +19 -0
- package/esm/exportAny.js +65 -0
- package/esm/exportAny.js.map +1 -0
- package/esm/exportHtml.d.ts +15 -0
- package/esm/exportHtml.js +279 -0
- package/esm/exportHtml.js.map +1 -0
- package/esm/grammar.d.ts +14 -0
- package/esm/grammar.js +6404 -0
- package/esm/grammar.js.map +1 -0
- package/esm/grammarfc.d.ts +14 -0
- package/esm/grammarfc.js +4218 -0
- package/esm/grammarfc.js.map +1 -0
- package/esm/helpers/config.d.ts +12 -0
- package/esm/helpers/config.js +52 -0
- package/esm/helpers/config.js.map +1 -0
- package/esm/helpers/corePlugins.d.ts +12 -0
- package/esm/helpers/corePlugins.js +23 -0
- package/esm/helpers/corePlugins.js.map +1 -0
- package/esm/helpers/handlers.d.ts +47 -0
- package/esm/helpers/handlers.js +107 -0
- package/esm/helpers/handlers.js.map +1 -0
- package/esm/helpers/ids.d.ts +18 -0
- package/esm/helpers/ids.js +69 -0
- package/esm/helpers/ids.js.map +1 -0
- package/esm/helpers/makeInterator.d.ts +5 -0
- package/esm/helpers/makeInterator.js +52 -0
- package/esm/helpers/makeInterator.js.map +1 -0
- package/esm/helpers/makeQuery.d.ts +47 -0
- package/esm/helpers/makeQuery.js +100 -0
- package/esm/helpers/makeQuery.js.map +1 -0
- package/esm/helpers/makeQuery.test.d.ts +1 -0
- package/esm/helpers/makeQuery.test.js +51 -0
- package/esm/helpers/makeQuery.test.js.map +1 -0
- package/esm/helpers/makeTransformer.d.ts +7 -0
- package/esm/helpers/makeTransformer.js +61 -0
- package/esm/helpers/makeTransformer.js.map +1 -0
- package/esm/helpers/plugins.d.ts +2 -0
- package/esm/helpers/plugins.js +23 -0
- package/esm/helpers/plugins.js.map +1 -0
- package/esm/index.d.ts +82 -0
- package/esm/index.js +123 -0
- package/esm/index.js.map +1 -0
- package/esm/pluggableParser.d.ts +27 -0
- package/esm/pluggableParser.js +71 -0
- package/esm/pluggableParser.js.map +1 -0
- package/esm/plugin-clean-location.d.ts +2 -0
- package/esm/plugin-clean-location.js +19 -0
- package/esm/plugin-clean-location.js.map +1 -0
- package/esm/plugin-defn-fill-term.d.ts +2 -0
- package/esm/plugin-defn-fill-term.js +50 -0
- package/esm/plugin-defn-fill-term.js.map +1 -0
- package/esm/plugin-formatting-codes.d.ts +3 -0
- package/esm/plugin-formatting-codes.js +53 -0
- package/esm/plugin-formatting-codes.js.map +1 -0
- package/esm/plugin-group-defn.d.ts +2 -0
- package/esm/plugin-group-defn.js +71 -0
- package/esm/plugin-group-defn.js.map +1 -0
- package/esm/plugin-group-items.d.ts +2 -0
- package/esm/plugin-group-items.js +79 -0
- package/esm/plugin-group-items.js.map +1 -0
- package/esm/plugin-heading.d.ts +2 -0
- package/esm/plugin-heading.js +33 -0
- package/esm/plugin-heading.js.map +1 -0
- package/esm/plugin-items.d.ts +2 -0
- package/esm/plugin-items.js +41 -0
- package/esm/plugin-items.js.map +1 -0
- package/esm/plugin-tables.d.ts +5 -0
- package/esm/plugin-tables.js +141 -0
- package/esm/plugin-tables.js.map +1 -0
- package/esm/plugin-vmargin.d.ts +3 -0
- package/esm/plugin-vmargin.js +29 -0
- package/esm/plugin-vmargin.js.map +1 -0
- package/esm/query-helpers.d.ts +28 -0
- package/esm/query-helpers.js +131 -0
- package/esm/query-helpers.js.map +1 -0
- package/esm/types.d.ts +342 -0
- package/esm/types.js +2 -0
- package/esm/types.js.map +1 -0
- package/esm/writer.d.ts +30 -0
- package/esm/writer.js +85 -0
- package/esm/writer.js.map +1 -0
- package/esm/writerHtml.d.ts +11 -0
- package/esm/writerHtml.js +29 -0
- package/esm/writerHtml.js.map +1 -0
- package/package.json +9 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.js","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAEhC,MAAM,MAAO,SAAQ,MAAM,CAAC,YAAY;IACtC,UAAU,CAAO;IACjB,SAAS,CAAO;IAChB,MAAM,CAAK;IACX,MAAM,CAAK;IACX,GAAG,CAAK;IACR,GAAG,CAAO;IACV,2BAA2B;IAC3B,2EAA2E;IAC3E,eAAe;IACf,YAAY;IACZ,0BAA0B;IAC1B,cAAc;IACd,wBAAwB;IAExB,YAAY,MAAO;QACjB,KAAK,EAAE,CAAA;QACP,mBAAmB;QACnB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAA;QACpB,qBAAqB;QACrB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAA;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;QACb,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACpB,CAAC;IACD,6BAA6B;IAC7B,MAAM,CAAC,CAAC;QACN,OAAO,CAAC,CAAA;IACV,CAAC;IACD,oCAAoC;IACpC,KAAK,CAAC,CAAC;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACtC,CAAC;IACD,kBAAkB;IAClB,QAAQ,CAAC,GAAG;QACV,IAAI,UAAU,KAAK,OAAO,IAAI,CAAC,MAAM,EAAE;YACrC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;SACjB;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;SACjB;IAC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C,CAAC,CAAA;IACzB,CAAC;CACF;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML writer
|
|
3
|
+
*/
|
|
4
|
+
import Writer from './writer';
|
|
5
|
+
declare class WriterHTML extends Writer {
|
|
6
|
+
constructor(output?: any);
|
|
7
|
+
escape(string: any): string;
|
|
8
|
+
_add_nesting(n: any): void;
|
|
9
|
+
_remove_nesting(n: any): void;
|
|
10
|
+
}
|
|
11
|
+
export default WriterHTML;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML writer
|
|
3
|
+
*/
|
|
4
|
+
import Writer from './writer';
|
|
5
|
+
class WriterHTML extends Writer {
|
|
6
|
+
constructor(output) {
|
|
7
|
+
super(output);
|
|
8
|
+
}
|
|
9
|
+
escape(string) {
|
|
10
|
+
const HTML_CHARS = {
|
|
11
|
+
'&': '&',
|
|
12
|
+
'<': '<',
|
|
13
|
+
'>': '>',
|
|
14
|
+
'"': '"',
|
|
15
|
+
"'": ''',
|
|
16
|
+
'/': '/',
|
|
17
|
+
'`': '`',
|
|
18
|
+
};
|
|
19
|
+
return (string + '').replace(/[&<>"'\/`]/g, match => HTML_CHARS[match]);
|
|
20
|
+
}
|
|
21
|
+
_add_nesting(n) {
|
|
22
|
+
this.writeRaw('<blockquote>'.repeat(n));
|
|
23
|
+
}
|
|
24
|
+
_remove_nesting(n) {
|
|
25
|
+
this.writeRaw('</blockquote>'.repeat(n));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export default WriterHTML;
|
|
29
|
+
//# sourceMappingURL=writerHtml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writerHtml.js","sourceRoot":"","sources":["../src/writerHtml.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,MAAM,UAAW,SAAQ,MAAM;IAC7B,YAAY,MAAO;QACjB,KAAK,CAAC,MAAM,CAAC,CAAA;IACf,CAAC;IACD,MAAM,CAAC,MAAM;QACX,MAAM,UAAU,GAAG;YACjB,GAAG,EAAE,OAAO;YACZ,GAAG,EAAE,MAAM;YACX,GAAG,EAAE,MAAM;YACX,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;SACd,CAAA;QACD,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;IACzE,CAAC;IAED,YAAY,CAAC,CAAC;QACZ,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACzC,CAAC;IACD,eAAe,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AACD,eAAe,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podlite/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "AST tools for Podlite markup language",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"lib/**/*.js",
|
|
10
10
|
"lib/**/*.d.ts",
|
|
11
|
+
"esm",
|
|
11
12
|
"schema/*",
|
|
12
13
|
"README.md",
|
|
13
14
|
"CHANGELOG.md"
|
|
@@ -19,14 +20,14 @@
|
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"access": "public",
|
|
21
22
|
"main": "lib/index.js",
|
|
22
|
-
"types": "./lib/index.d.ts"
|
|
23
|
+
"types": "./lib/index.d.ts",
|
|
24
|
+
"module": "./esm/index.js"
|
|
23
25
|
},
|
|
24
26
|
"scripts": {
|
|
25
|
-
"clean": "rm -rf lib esm
|
|
26
|
-
"build": "run-s build:pegjs
|
|
27
|
+
"clean": "rm -rf lib esm *.tsbuildinfo",
|
|
28
|
+
"build": "run-s build:pegjs build_lib build:ast ",
|
|
29
|
+
"build_lib": "yarn g:build",
|
|
27
30
|
"build:ast": "ts-node scripts/make-ast-scheme.ts",
|
|
28
|
-
"build:ts": "yarn g:tsc --build $INIT_CWD",
|
|
29
|
-
"build:esm": "yarn g:tsctest -p tsconfig.esm.json",
|
|
30
31
|
"build:pegjs": "pegjs -o src/grammar.js src/grammar.pegjs && pegjs -o src/grammarfc.js src/grammarfc.pegjs",
|
|
31
32
|
"watch": "npx nodemon -e js,ts --exec 'yarn' build",
|
|
32
33
|
"watch:pegjs": "npx nodemon -e pegjs --exec 'yarn' build:pegjs",
|
|
@@ -52,5 +53,6 @@
|
|
|
52
53
|
"ts-node": "^9.1.1",
|
|
53
54
|
"typescript": "4.5.5",
|
|
54
55
|
"typescript-json-schema": "0.53.0"
|
|
55
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"module": "./esm/index.js"
|
|
56
58
|
}
|