@podlite/schema 0.0.15 → 0.0.17
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/CHANGELOG.md +9 -0
- package/esm/blocks-helpers.d.ts +2 -2
- package/esm/blocks-helpers.js.map +1 -1
- package/esm/grammar.js +4 -3
- package/esm/grammar.js.map +1 -1
- package/esm/helpers/ids.d.ts +5 -0
- package/esm/helpers/ids.js +26 -2
- package/esm/helpers/ids.js.map +1 -1
- package/esm/plugin-formatting-codes.js +2 -1
- package/esm/plugin-formatting-codes.js.map +1 -1
- package/esm/types.d.ts +17 -2
- package/lib/blocks-helpers.d.ts +2 -2
- package/lib/grammar.js +4 -3
- package/lib/helpers/ids.d.ts +5 -0
- package/lib/helpers/ids.js +30 -4
- package/lib/plugin-formatting-codes.js +2 -1
- package/lib/types.d.ts +17 -2
- package/package.json +1 -1
- package/schema/AstTree.json +71 -0
- package/schema/PodliteDocument.json +71 -0
package/CHANGELOG.md
CHANGED
package/esm/blocks-helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AstTree, BlockCaption, BlockItem, Location, PodNode, RootBlock, Toc, TocItem, TocList, Node, Image } from './types';
|
|
1
|
+
import { AstTree, BlockCaption, BlockItem, Location, PodNode, RootBlock, Toc, TocItem, TocList, Node, Image, FormattingCodeL } from './types';
|
|
2
2
|
export declare const mkNode: <P extends Record<string, any>>(attr: P) => P;
|
|
3
3
|
export declare const filterNulls: (content: any) => any[];
|
|
4
4
|
export declare const mkBlock: (attrs: any, content: any) => any;
|
|
@@ -6,7 +6,7 @@ export declare const mkBlankline: () => {
|
|
|
6
6
|
type: string;
|
|
7
7
|
};
|
|
8
8
|
export declare const mkFomattingCode: (attrs: any, content: any) => any;
|
|
9
|
-
export declare const mkFomattingCodeL: (attrs: any, content: any) =>
|
|
9
|
+
export declare const mkFomattingCodeL: (attrs: any, content: any) => FormattingCodeL;
|
|
10
10
|
export declare const mkFomattingCodeDelete: (content: any) => {
|
|
11
11
|
type: string;
|
|
12
12
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks-helpers.js","sourceRoot":"","sources":["../src/blocks-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blocks-helpers.js","sourceRoot":"","sources":["../src/blocks-helpers.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAgC,IAAO,EAAK,EAAE;IAClE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAA;AACpB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,EAAE;IACnC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC1B,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KAC9B;IACD,OAAO,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAA;AACvE,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxC,MAAM,IAAI,GAAG,OAAO,CAAA;IACpB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;IACvB,MAAM,UAAU,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,CAAA;IACzD,IAAI,MAAM,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC3E,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAA;AACtC,CAAC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CAAA;AACrD,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAW,EAAE;IACrD,OAAO,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AACxE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAoB,EAAgB,EAAE;IAC9D,OAAO;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,SAAS;QACf,OAAO;KACR,CAAA;AACH,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,GAAY,EAAS,EAAE;IAC1D,OAAO;QACL,IAAI,EAAE,OAAO;QACb,GAAG;QACH,GAAG;KACJ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,EAAE,EAAE,OAAO,EAAa,EAAE;IACjE,OAAO,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAA;AACnD,CAAC,CAAA;AAOD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAqB,EAAE,OAAgB,EAAa,EAAE;IACzG,OAAO,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAA;AACpE,CAAC,CAAA"}
|
package/esm/grammar.js
CHANGED
|
@@ -134,7 +134,7 @@ function peg$parse(input, options) {
|
|
|
134
134
|
type: "boolean"
|
|
135
135
|
};
|
|
136
136
|
}, peg$c88 = function (isFalse, key, value) { return { name: key, ...value }; }, peg$c89 = function (first, rest) { return rest; }, peg$c90 = function (first, cont) { return flattenDeep([...first, ...cont]); }, peg$c91 = /^[^'"]/, peg$c92 = peg$classExpectation(["'", "\""], true, false), peg$c93 = function (text) { return text; }, peg$c94 = /^[0-9]/, peg$c95 = peg$classExpectation([["0", "9"]], false, false), peg$c96 = /^[\-+]/, peg$c97 = peg$classExpectation(["-", "+"], false, false), peg$c98 = "True", peg$c99 = peg$literalExpectation("True", false), peg$c100 = function () { return true; }, peg$c101 = "False", peg$c102 = peg$literalExpectation("False", false), peg$c103 = function () { return false; }, peg$c104 = ".", peg$c105 = peg$literalExpectation(".", false), peg$c106 = /^[eE]/, peg$c107 = peg$classExpectation(["e", "E"], false, false), peg$c108 = /^["]/, peg$c109 = peg$classExpectation(["\""], false, false), peg$c110 = /^[^"]/, peg$c111 = peg$classExpectation(["\""], true, false), peg$c112 = /^[']/, peg$c113 = peg$classExpectation(["'"], false, false), peg$c114 = /^[^']/, peg$c115 = peg$classExpectation(["'"], true, false), peg$c116 = function (numberFloat) { return parseFloat(numberFloat); }, peg$c117 = function (number) { return parseInt(number, 10); }, peg$c118 = function (vmargin, name, config) {
|
|
137
|
-
return ((name.match(/code|comment|output|input|markdown|toc|data/))
|
|
137
|
+
return ((name.match(/code|comment|output|input|markdown|picture|toc|data/))
|
|
138
138
|
||
|
|
139
139
|
isNamedBlock(name));
|
|
140
140
|
}, peg$c119 = function (vmargin, name, config, margins, ename) { return vmargin.length === margins.length && name === ename; }, peg$c120 = function (vmargin, name, config, margins, line) { return exludeVMargin(vmargin, `${margins}${line}`); }, peg$c121 = function (vmargin, name, config, content, vmargin2, ename) { return name === ename; }, peg$c122 = function (vmargin, name, config, content, vmargin2, ename) {
|
|
@@ -261,7 +261,7 @@ function peg$parse(input, options) {
|
|
|
261
261
|
location: location(),
|
|
262
262
|
};
|
|
263
263
|
}, peg$c150 = function () { return { empty: 1 }; }, peg$c151 = /^[s]/, peg$c152 = peg$classExpectation(["s"], false, false), peg$c153 = function (line) { return { text: text(), type: "ambient1" }; }, peg$c154 = function (vmargin, name) {
|
|
264
|
-
return ((name.match(/code|comment|output|input|markdown|toc|data/))
|
|
264
|
+
return ((name.match(/code|comment|output|input|markdown|picture|toc|data/))
|
|
265
265
|
||
|
|
266
266
|
isNamedBlock(name));
|
|
267
267
|
}, peg$c155 = function (vmargin, name, content) {
|
|
@@ -320,7 +320,7 @@ function peg$parse(input, options) {
|
|
|
320
320
|
margin: vmargin
|
|
321
321
|
};
|
|
322
322
|
}, peg$c168 = function (vmargin, marker, name, config) {
|
|
323
|
-
return ((name.match(/code|comment|output|input|markdown|toc|data/))
|
|
323
|
+
return ((name.match(/code|comment|output|input|markdown|picture|toc|data/))
|
|
324
324
|
||
|
|
325
325
|
isNamedBlock(name));
|
|
326
326
|
}, peg$c169 = function (vmargin, marker, name, config, content) {
|
|
@@ -6364,6 +6364,7 @@ function peg$parse(input, options) {
|
|
|
6364
6364
|
'nested',
|
|
6365
6365
|
'output',
|
|
6366
6366
|
'para',
|
|
6367
|
+
'picture',
|
|
6367
6368
|
'pod',
|
|
6368
6369
|
'table',
|
|
6369
6370
|
'toc',
|