@podlite/schema 0.0.12 → 0.0.14

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 (46) hide show
  1. package/CHANGELOG.md +38 -4
  2. package/README.md +40 -0
  3. package/lib/ast-helpers.js +1 -0
  4. package/lib/ast-inerator.d.ts +0 -1
  5. package/lib/ast-inerator.js +5 -13
  6. package/lib/blocks-helpers.d.ts +1 -1
  7. package/lib/blocks-helpers.js +15 -12
  8. package/lib/exportAny.js +14 -6
  9. package/lib/exportHtml.js +43 -36
  10. package/lib/grammar.js +30 -21
  11. package/lib/grammarfc.js +1099 -243
  12. package/lib/helpers/config.js +8 -3
  13. package/lib/helpers/corePlugins.d.ts +12 -0
  14. package/lib/helpers/corePlugins.js +26 -0
  15. package/lib/helpers/handlers.js +1 -0
  16. package/lib/helpers/ids.d.ts +18 -0
  17. package/lib/helpers/ids.js +74 -0
  18. package/lib/helpers/makeInterator.js +6 -3
  19. package/lib/helpers/makeQuery.js +5 -1
  20. package/lib/helpers/makeQuery.test.js +32 -22
  21. package/lib/helpers/makeTransformer.js +7 -10
  22. package/lib/helpers/plugins.d.ts +2 -0
  23. package/lib/helpers/plugins.js +27 -0
  24. package/lib/index.d.ts +24 -21
  25. package/lib/index.js +18 -8
  26. package/lib/pluggableParser.d.ts +27 -0
  27. package/lib/pluggableParser.js +80 -0
  28. package/lib/plugin-clean-location.js +6 -3
  29. package/lib/plugin-defn-fill-term.js +7 -4
  30. package/lib/plugin-formatting-codes.js +41 -12
  31. package/lib/plugin-group-defn.js +10 -10
  32. package/lib/plugin-group-items.js +22 -20
  33. package/lib/plugin-heading.js +6 -3
  34. package/lib/plugin-items.js +9 -6
  35. package/lib/plugin-tables.js +46 -31
  36. package/lib/plugin-vmargin.js +5 -3
  37. package/lib/query-helpers.js +9 -6
  38. package/lib/types.d.ts +78 -70
  39. package/lib/types.js +1 -0
  40. package/lib/writer.js +22 -7
  41. package/lib/writerHtml.js +3 -2
  42. package/package.json +9 -9
  43. package/schema/AstTree.json +116 -0
  44. package/schema/PodliteDocument.json +116 -0
  45. package/schema/index.d.ts +3 -3
  46. package/index.js +0 -2
@@ -213,6 +213,12 @@
213
213
  {
214
214
  "$ref": "#/definitions/BlockCode"
215
215
  },
216
+ {
217
+ "$ref": "#/definitions/BlockToc"
218
+ },
219
+ {
220
+ "$ref": "#/definitions/BlockMarkdown"
221
+ },
216
222
  {
217
223
  "$ref": "#/definitions/BlockNested"
218
224
  },
@@ -1264,6 +1270,12 @@
1264
1270
  {
1265
1271
  "$ref": "#/definitions/BlockCode"
1266
1272
  },
1273
+ {
1274
+ "$ref": "#/definitions/BlockToc"
1275
+ },
1276
+ {
1277
+ "$ref": "#/definitions/BlockMarkdown"
1278
+ },
1267
1279
  {
1268
1280
  "$ref": "#/definitions/BlockNested"
1269
1281
  },
@@ -1941,6 +1953,110 @@
1941
1953
  "type"
1942
1954
  ]
1943
1955
  },
1956
+ "BlockToc": {
1957
+ "type": "object",
1958
+ "properties": {
1959
+ "name": {
1960
+ "type": "string",
1961
+ "enum": [
1962
+ "toc"
1963
+ ]
1964
+ },
1965
+ "type": {
1966
+ "type": "string",
1967
+ "enum": [
1968
+ "block"
1969
+ ]
1970
+ },
1971
+ "location": {
1972
+ "$ref": "#/definitions/Location"
1973
+ },
1974
+ "content": {
1975
+ "type": "array",
1976
+ "items": {
1977
+ "$ref": "#/definitions/PodNode"
1978
+ }
1979
+ },
1980
+ "margin": {
1981
+ "type": "string"
1982
+ },
1983
+ "config": {
1984
+ "type": "array",
1985
+ "items": {
1986
+ "anyOf": [
1987
+ {
1988
+ "$ref": "#/definitions/BrokenConfigItem"
1989
+ },
1990
+ {
1991
+ "$ref": "#/definitions/ConfigItem"
1992
+ }
1993
+ ]
1994
+ }
1995
+ },
1996
+ "id": {
1997
+ "type": "string"
1998
+ }
1999
+ },
2000
+ "required": [
2001
+ "content",
2002
+ "location",
2003
+ "margin",
2004
+ "name",
2005
+ "type"
2006
+ ]
2007
+ },
2008
+ "BlockMarkdown": {
2009
+ "type": "object",
2010
+ "properties": {
2011
+ "name": {
2012
+ "type": "string",
2013
+ "enum": [
2014
+ "markdown"
2015
+ ]
2016
+ },
2017
+ "type": {
2018
+ "type": "string",
2019
+ "enum": [
2020
+ "block"
2021
+ ]
2022
+ },
2023
+ "location": {
2024
+ "$ref": "#/definitions/Location"
2025
+ },
2026
+ "content": {
2027
+ "type": "array",
2028
+ "items": {
2029
+ "$ref": "#/definitions/PodNode"
2030
+ }
2031
+ },
2032
+ "margin": {
2033
+ "type": "string"
2034
+ },
2035
+ "config": {
2036
+ "type": "array",
2037
+ "items": {
2038
+ "anyOf": [
2039
+ {
2040
+ "$ref": "#/definitions/BrokenConfigItem"
2041
+ },
2042
+ {
2043
+ "$ref": "#/definitions/ConfigItem"
2044
+ }
2045
+ ]
2046
+ }
2047
+ },
2048
+ "id": {
2049
+ "type": "string"
2050
+ }
2051
+ },
2052
+ "required": [
2053
+ "content",
2054
+ "location",
2055
+ "margin",
2056
+ "name",
2057
+ "type"
2058
+ ]
2059
+ },
1944
2060
  "BlockNested": {
1945
2061
  "type": "object",
1946
2062
  "properties": {
package/schema/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export var Test: any;
2
- export var AstTree: any;
3
- export var PodliteDocument: any;
1
+ export var Test: any
2
+ export var AstTree: any
3
+ export var PodliteDocument: any
package/index.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict'
2
- module.exports = require('./lib')