@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.
Files changed (94) hide show
  1. package/esm/ast-helpers.d.ts +2 -0
  2. package/esm/ast-helpers.js +10 -0
  3. package/esm/ast-helpers.js.map +1 -0
  4. package/esm/ast-inerator.d.ts +6 -0
  5. package/esm/ast-inerator.js +57 -0
  6. package/esm/ast-inerator.js.map +1 -0
  7. package/esm/blocks-helpers.d.ts +32 -0
  8. package/esm/blocks-helpers.js +65 -0
  9. package/esm/blocks-helpers.js.map +1 -0
  10. package/esm/exportAny.d.ts +19 -0
  11. package/esm/exportAny.js +65 -0
  12. package/esm/exportAny.js.map +1 -0
  13. package/esm/exportHtml.d.ts +15 -0
  14. package/esm/exportHtml.js +279 -0
  15. package/esm/exportHtml.js.map +1 -0
  16. package/esm/grammar.d.ts +14 -0
  17. package/esm/grammar.js +6404 -0
  18. package/esm/grammar.js.map +1 -0
  19. package/esm/grammarfc.d.ts +14 -0
  20. package/esm/grammarfc.js +4218 -0
  21. package/esm/grammarfc.js.map +1 -0
  22. package/esm/helpers/config.d.ts +12 -0
  23. package/esm/helpers/config.js +52 -0
  24. package/esm/helpers/config.js.map +1 -0
  25. package/esm/helpers/corePlugins.d.ts +12 -0
  26. package/esm/helpers/corePlugins.js +23 -0
  27. package/esm/helpers/corePlugins.js.map +1 -0
  28. package/esm/helpers/handlers.d.ts +47 -0
  29. package/esm/helpers/handlers.js +107 -0
  30. package/esm/helpers/handlers.js.map +1 -0
  31. package/esm/helpers/ids.d.ts +18 -0
  32. package/esm/helpers/ids.js +69 -0
  33. package/esm/helpers/ids.js.map +1 -0
  34. package/esm/helpers/makeInterator.d.ts +5 -0
  35. package/esm/helpers/makeInterator.js +52 -0
  36. package/esm/helpers/makeInterator.js.map +1 -0
  37. package/esm/helpers/makeQuery.d.ts +47 -0
  38. package/esm/helpers/makeQuery.js +100 -0
  39. package/esm/helpers/makeQuery.js.map +1 -0
  40. package/esm/helpers/makeQuery.test.d.ts +1 -0
  41. package/esm/helpers/makeQuery.test.js +51 -0
  42. package/esm/helpers/makeQuery.test.js.map +1 -0
  43. package/esm/helpers/makeTransformer.d.ts +7 -0
  44. package/esm/helpers/makeTransformer.js +61 -0
  45. package/esm/helpers/makeTransformer.js.map +1 -0
  46. package/esm/helpers/plugins.d.ts +2 -0
  47. package/esm/helpers/plugins.js +23 -0
  48. package/esm/helpers/plugins.js.map +1 -0
  49. package/esm/index.d.ts +82 -0
  50. package/esm/index.js +123 -0
  51. package/esm/index.js.map +1 -0
  52. package/esm/pluggableParser.d.ts +27 -0
  53. package/esm/pluggableParser.js +71 -0
  54. package/esm/pluggableParser.js.map +1 -0
  55. package/esm/plugin-clean-location.d.ts +2 -0
  56. package/esm/plugin-clean-location.js +19 -0
  57. package/esm/plugin-clean-location.js.map +1 -0
  58. package/esm/plugin-defn-fill-term.d.ts +2 -0
  59. package/esm/plugin-defn-fill-term.js +50 -0
  60. package/esm/plugin-defn-fill-term.js.map +1 -0
  61. package/esm/plugin-formatting-codes.d.ts +3 -0
  62. package/esm/plugin-formatting-codes.js +53 -0
  63. package/esm/plugin-formatting-codes.js.map +1 -0
  64. package/esm/plugin-group-defn.d.ts +2 -0
  65. package/esm/plugin-group-defn.js +71 -0
  66. package/esm/plugin-group-defn.js.map +1 -0
  67. package/esm/plugin-group-items.d.ts +2 -0
  68. package/esm/plugin-group-items.js +79 -0
  69. package/esm/plugin-group-items.js.map +1 -0
  70. package/esm/plugin-heading.d.ts +2 -0
  71. package/esm/plugin-heading.js +33 -0
  72. package/esm/plugin-heading.js.map +1 -0
  73. package/esm/plugin-items.d.ts +2 -0
  74. package/esm/plugin-items.js +41 -0
  75. package/esm/plugin-items.js.map +1 -0
  76. package/esm/plugin-tables.d.ts +5 -0
  77. package/esm/plugin-tables.js +141 -0
  78. package/esm/plugin-tables.js.map +1 -0
  79. package/esm/plugin-vmargin.d.ts +3 -0
  80. package/esm/plugin-vmargin.js +29 -0
  81. package/esm/plugin-vmargin.js.map +1 -0
  82. package/esm/query-helpers.d.ts +28 -0
  83. package/esm/query-helpers.js +131 -0
  84. package/esm/query-helpers.js.map +1 -0
  85. package/esm/types.d.ts +342 -0
  86. package/esm/types.js +2 -0
  87. package/esm/types.js.map +1 -0
  88. package/esm/writer.d.ts +30 -0
  89. package/esm/writer.js +85 -0
  90. package/esm/writer.js.map +1 -0
  91. package/esm/writerHtml.d.ts +11 -0
  92. package/esm/writerHtml.js +29 -0
  93. package/esm/writerHtml.js.map +1 -0
  94. 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,CAA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ED,kBAAkB;IAElB,YAAY,CAAC,CAAS,IAAG,CAAC;IAC1B,eAAe,CAAC,CAAS,IAAG,CAAC;IAE7B,QAAQ,CAAC,CAAS;QAChB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;IACtB,CAAC;IAED,WAAW,CAAC,CAAS;QACnB,IAAI,CAAC,eAAe,CAAC,CAAC,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
+ '<': '&lt;',
13
+ '>': '&gt;',
14
+ '"': '&quot;',
15
+ "'": '&#x27;',
16
+ '/': '&#x2F;',
17
+ '`': '&#x60;',
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.14",
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 tsconfig.tsbuildinfo",
26
- "build": "run-s build:pegjs build:ts build:ast ",
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
  }