@podlite/schema 0.0.69 → 0.0.70
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.podlite +14 -0
- package/esm/ast-helpers.js +2 -2
- package/esm/ast-inerator.js +1 -1
- package/esm/exportAny.js +5 -5
- package/esm/exportHtml.js +11 -11
- package/esm/exportMarkdown.js +9 -9
- package/esm/guard.js +1 -1
- package/esm/helpers/corePlugins.js +3 -3
- package/esm/helpers/handlers.js +3 -3
- package/esm/helpers/ids.js +1 -1
- package/esm/helpers/makeTransformer.js +1 -1
- package/esm/helpers/parseAttributes.js +1 -1
- package/esm/index.js +45 -43
- package/esm/index.js.map +1 -1
- package/esm/pluggableParser.js +10 -10
- package/esm/plugin-clean-location.js +1 -1
- package/esm/plugin-data-table.js +3 -3
- package/esm/plugin-defn-fill-term.js +1 -1
- package/esm/plugin-formatting-codes.js +5 -5
- package/esm/plugin-group-items.js +1 -1
- package/esm/plugin-tables.js +2 -2
- package/esm/query-helpers.js +1 -1
- package/esm/selectors.js +2 -2
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/esm/writerHtml.js +1 -1
- package/esm/writerMarkdown.js +1 -1
- package/lib/index.js +3 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/esm/helpers/makeQuery.test.d.ts +0 -1
- package/esm/helpers/makeQuery.test.js +0 -51
- package/esm/helpers/makeQuery.test.js.map +0 -1
- package/lib/helpers/makeQuery.test.d.ts +0 -1
- package/lib/helpers/makeQuery.test.js +0 -51
package/CHANGELOG.podlite
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
=head1 Upcoming
|
|
4
4
|
|
|
5
|
+
=head1 0.0.70
|
|
6
|
+
|
|
7
|
+
=item the published build no longer carries a test file
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
=item the package needs Node 20.19 or newer. Its ESM build relies on the loader recognising module syntax in a .js file, which older versions do not do
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
=item the package can be imported from Node directly. The emitted ESM referenced its own files without an extension, which the ESM loader refuses
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
=item ajv moved from 7 to 8. Under the old version an ESM consumer got a namespace object where a constructor was expected, so the package could not be imported from Node at all
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
=head1 0.0.68
|
|
6
20
|
|
|
7
21
|
=item a link is bound to its target on the tree, before the address is shaped for a format. A target that is not there no longer produces an address that merely looks like one: the link renders without an address, which is the form html gives a link that leads nowhere. Across the knowledge base this cut links pointing at nothing from 63 to 13
|
package/esm/ast-helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getTextContentFromNode } from '.';
|
|
2
|
-
import makeAttrsPod from './helpers/config';
|
|
1
|
+
import { getTextContentFromNode } from './index.js';
|
|
2
|
+
import makeAttrsPod from './helpers/config.js';
|
|
3
3
|
export const getNodeId = (node, ctx) => {
|
|
4
4
|
const conf = makeAttrsPod(node, ctx);
|
|
5
5
|
if (conf.exists('id')) {
|
package/esm/ast-inerator.js
CHANGED
package/esm/exportAny.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { makeRule, makePlug } from './helpers/makeQuery';
|
|
2
|
-
import makeInterator from './helpers/makeInterator';
|
|
3
|
-
import Writer from './writer';
|
|
4
|
-
import { parse } from './';
|
|
5
|
-
import { indexAnchors, buildBindingIndex } from './ast-helpers';
|
|
1
|
+
import { makeRule, makePlug } from './helpers/makeQuery.js';
|
|
2
|
+
import makeInterator from './helpers/makeInterator.js';
|
|
3
|
+
import Writer from './writer.js';
|
|
4
|
+
import { parse } from './index.js';
|
|
5
|
+
import { indexAnchors, buildBindingIndex } from './ast-helpers.js';
|
|
6
6
|
export const toAny = (options = {}, plugins = []) => {
|
|
7
7
|
let fns = plugins;
|
|
8
8
|
// setup pod6 processor
|
package/esm/exportHtml.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import toAny from './exportAny';
|
|
2
|
-
import { subUse, wrapContent, emptyContent, content, setFn, handleNested, maskText, collectText, } from './helpers/handlers';
|
|
3
|
-
import { isNamedBlock } from './helpers/makeTransformer';
|
|
4
|
-
import makeAttrs, { codeConfigWithDefaults } from './helpers/config';
|
|
5
|
-
import { applyImageBase } from './image-base';
|
|
6
|
-
import { isCovered } from './guard';
|
|
7
|
-
import htmlWriter from './writerHtml';
|
|
8
|
-
import clean_plugin from './plugin-clean-location';
|
|
9
|
-
import { getExplicitNodeId, getSafeNodeId, linkTarget, sameDocTarget, toFragment, writtenValue } from './ast-helpers';
|
|
10
|
-
import { readLinkConfig } from './helpers/link-config';
|
|
1
|
+
import toAny from './exportAny.js';
|
|
2
|
+
import { subUse, wrapContent, emptyContent, content, setFn, handleNested, maskText, collectText, } from './helpers/handlers.js';
|
|
3
|
+
import { isNamedBlock } from './helpers/makeTransformer.js';
|
|
4
|
+
import makeAttrs, { codeConfigWithDefaults } from './helpers/config.js';
|
|
5
|
+
import { applyImageBase } from './image-base.js';
|
|
6
|
+
import { isCovered } from './guard.js';
|
|
7
|
+
import htmlWriter from './writerHtml.js';
|
|
8
|
+
import clean_plugin from './plugin-clean-location.js';
|
|
9
|
+
import { getExplicitNodeId, getSafeNodeId, linkTarget, sameDocTarget, toFragment, writtenValue } from './ast-helpers.js';
|
|
10
|
+
import { readLinkConfig } from './helpers/link-config.js';
|
|
11
11
|
import { decodeHTMLStrict } from 'entities';
|
|
12
|
-
import { quoteAttribute as quoteValue } from './helpers/html-attr';
|
|
12
|
+
import { quoteAttribute as quoteValue } from './helpers/html-attr.js';
|
|
13
13
|
// HTML gives an anchor without href to a link whose target the author never
|
|
14
14
|
// wrote; an empty href would claim the current document instead. The address is
|
|
15
15
|
// quoted like every other attribute value: a quote inside it would otherwise
|
package/esm/exportMarkdown.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import toAny from './exportAny';
|
|
2
|
-
import { isCovered } from './guard';
|
|
3
|
-
import { subUse, wrapContent, emptyContent, content, setFn, handleNested, maskText, collectText, } from './helpers/handlers';
|
|
4
|
-
import makeAttrs, { codeConfigWithDefaults } from './helpers/config';
|
|
5
|
-
import { applyImageBase } from './image-base';
|
|
6
|
-
import writerMarkdown from './writerMarkdown';
|
|
7
|
-
import clean_plugin from './plugin-clean-location';
|
|
8
|
-
import { linkTarget, markdownStyle, restyleAnchors, sameDocTarget, writtenValue } from './ast-helpers';
|
|
9
|
-
import { readLinkConfig } from './helpers/link-config';
|
|
1
|
+
import toAny from './exportAny.js';
|
|
2
|
+
import { isCovered } from './guard.js';
|
|
3
|
+
import { subUse, wrapContent, emptyContent, content, setFn, handleNested, maskText, collectText, } from './helpers/handlers.js';
|
|
4
|
+
import makeAttrs, { codeConfigWithDefaults } from './helpers/config.js';
|
|
5
|
+
import { applyImageBase } from './image-base.js';
|
|
6
|
+
import writerMarkdown from './writerMarkdown.js';
|
|
7
|
+
import clean_plugin from './plugin-clean-location.js';
|
|
8
|
+
import { linkTarget, markdownStyle, restyleAnchors, sameDocTarget, writtenValue } from './ast-helpers.js';
|
|
9
|
+
import { readLinkConfig } from './helpers/link-config.js';
|
|
10
10
|
// A markdown reader builds the anchor out of the heading itself, by its own rules,
|
|
11
11
|
// so a link written here has to match what that reader will produce.
|
|
12
12
|
const markdownAnchors = ctx => ctx && (ctx.__markdownAnchors ||= restyleAnchors(ctx.__anchors, markdownStyle));
|
package/esm/guard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import makeAttrs from './helpers/config';
|
|
1
|
+
import makeAttrs from './helpers/config.js';
|
|
2
2
|
// Covered content is marked on the node, not decided at render time. A block
|
|
3
3
|
// carrying :masked or a G<> code can be lifted out of its document by =include,
|
|
4
4
|
// by a data: reference, by an alias expansion or by a selector; the mark travels
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { content } from '
|
|
2
|
-
import { writtenValue } from '../ast-helpers';
|
|
3
|
-
import { quoteAttribute } from './html-attr';
|
|
1
|
+
import { content } from '../index.js';
|
|
2
|
+
import { writtenValue } from '../ast-helpers.js';
|
|
3
|
+
import { quoteAttribute } from './html-attr.js';
|
|
4
4
|
export const core = {
|
|
5
5
|
':image': {
|
|
6
6
|
toHtml: writer => node => {
|
package/esm/helpers/handlers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeRule, makeRulesArray } from './makeQuery';
|
|
2
|
-
import makeInterator from './makeInterator';
|
|
3
|
-
import makeAttrs from './config';
|
|
1
|
+
import { makeRule, makeRulesArray } from './makeQuery.js';
|
|
2
|
+
import makeInterator from './makeInterator.js';
|
|
3
|
+
import makeAttrs from './config.js';
|
|
4
4
|
/**
|
|
5
5
|
* wrap content by open and closed tags
|
|
6
6
|
*/
|
package/esm/helpers/ids.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeRule, makePlug } from './makeQuery';
|
|
1
|
+
import { makeRule, makePlug } from './makeQuery.js';
|
|
2
2
|
// the following names: MyBlock, myBlock are use for extending pod6
|
|
3
3
|
export function isNamedBlock(name) {
|
|
4
4
|
return name && name !== name.toLowerCase() && name !== name.toUpperCase();
|
package/esm/index.js
CHANGED
|
@@ -1,43 +1,45 @@
|
|
|
1
1
|
import Ajv from 'ajv';
|
|
2
2
|
import * as pointer from 'json-pointer';
|
|
3
|
-
import { BLOCK_NAMES } from './block-names';
|
|
4
|
-
import * as jsonShemes from '../schema';
|
|
5
|
-
import { makeInterator } from './ast-inerator';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './block-names';
|
|
8
|
-
export * from './attribute-names';
|
|
9
|
-
export * from './blocks-helpers';
|
|
10
|
-
export * from './query-helpers';
|
|
11
|
-
export * from './ast-helpers';
|
|
12
|
-
export * from './helpers/handlers';
|
|
13
|
-
export { makeInterator } from './ast-inerator';
|
|
14
|
-
export { makeTransformer, isNamedBlock, isSemanticBlock } from './helpers/makeTransformer';
|
|
15
|
-
export { toAny } from './exportAny';
|
|
16
|
-
export { makeAttrs, codeConfigWithDefaults } from './helpers/config';
|
|
17
|
-
export { parseAttributes } from './helpers/parseAttributes';
|
|
18
|
-
export { readLinkConfig } from './helpers/link-config';
|
|
19
|
-
export { quoteAttribute } from './helpers/html-attr';
|
|
20
|
-
export { pluginCleanLocation } from './plugin-clean-location';
|
|
21
|
-
export { toAnyRules } from './helpers/plugins';
|
|
22
|
-
export { podlitePluggable, cleanIds, frozenIds, headingId } from './pluggableParser';
|
|
23
|
-
import * as parser from './grammar';
|
|
24
|
-
import { parse as parseFcodes } from './grammarfc';
|
|
25
|
-
import { parseAttributes } from './helpers/parseAttributes';
|
|
26
|
-
import vmargin_plug from './plugin-vmargin';
|
|
27
|
-
import formattingCodes_plug from './plugin-formatting-codes';
|
|
28
|
-
import itemsNumbering_plug from './plugin-items';
|
|
29
|
-
import heading_plug from './plugin-heading';
|
|
30
|
-
import defnGroup_plug from './plugin-group-defn';
|
|
31
|
-
import itemsGroup_plug from './plugin-group-items';
|
|
32
|
-
import defnTerms_plug from './plugin-defn-fill-term';
|
|
33
|
-
import set_plug from './plugin-set';
|
|
34
|
-
import { propagateConfigDefaults } from './helpers/configPropagation';
|
|
35
|
-
import table_plug from './plugin-tables';
|
|
36
|
-
import data_table_plug from './plugin-data-table';
|
|
3
|
+
import { BLOCK_NAMES } from './block-names.js';
|
|
4
|
+
import * as jsonShemes from '../schema/index.js';
|
|
5
|
+
import { makeInterator } from './ast-inerator.js';
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
export * from './block-names.js';
|
|
8
|
+
export * from './attribute-names.js';
|
|
9
|
+
export * from './blocks-helpers.js';
|
|
10
|
+
export * from './query-helpers.js';
|
|
11
|
+
export * from './ast-helpers.js';
|
|
12
|
+
export * from './helpers/handlers.js';
|
|
13
|
+
export { makeInterator } from './ast-inerator.js';
|
|
14
|
+
export { makeTransformer, isNamedBlock, isSemanticBlock } from './helpers/makeTransformer.js';
|
|
15
|
+
export { toAny } from './exportAny.js';
|
|
16
|
+
export { makeAttrs, codeConfigWithDefaults } from './helpers/config.js';
|
|
17
|
+
export { parseAttributes } from './helpers/parseAttributes.js';
|
|
18
|
+
export { readLinkConfig } from './helpers/link-config.js';
|
|
19
|
+
export { quoteAttribute } from './helpers/html-attr.js';
|
|
20
|
+
export { pluginCleanLocation } from './plugin-clean-location.js';
|
|
21
|
+
export { toAnyRules } from './helpers/plugins.js';
|
|
22
|
+
export { podlitePluggable, cleanIds, frozenIds, headingId } from './pluggableParser.js';
|
|
23
|
+
import * as parser from './grammar.js';
|
|
24
|
+
import { parse as parseFcodes } from './grammarfc.js';
|
|
25
|
+
import { parseAttributes } from './helpers/parseAttributes.js';
|
|
26
|
+
import vmargin_plug from './plugin-vmargin.js';
|
|
27
|
+
import formattingCodes_plug from './plugin-formatting-codes.js';
|
|
28
|
+
import itemsNumbering_plug from './plugin-items.js';
|
|
29
|
+
import heading_plug from './plugin-heading.js';
|
|
30
|
+
import defnGroup_plug from './plugin-group-defn.js';
|
|
31
|
+
import itemsGroup_plug from './plugin-group-items.js';
|
|
32
|
+
import defnTerms_plug from './plugin-defn-fill-term.js';
|
|
33
|
+
import set_plug from './plugin-set.js';
|
|
34
|
+
import { propagateConfigDefaults } from './helpers/configPropagation.js';
|
|
35
|
+
import table_plug from './plugin-tables.js';
|
|
36
|
+
import data_table_plug from './plugin-data-table.js';
|
|
37
37
|
export function toAst() {
|
|
38
38
|
return {};
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
// ajv 8 refuses a tuple whose minItems is below its length, and a picture carries
|
|
41
|
+
// an optional second element. ajv 7 had no such check, so nothing is being relaxed.
|
|
42
|
+
const ajv = new Ajv({ strict: true, allowUnionTypes: true, strictTuples: false });
|
|
41
43
|
export function getTextContentFromNode(node) {
|
|
42
44
|
let text = '';
|
|
43
45
|
const rules = {
|
|
@@ -155,12 +157,12 @@ export { makeTree as toTree };
|
|
|
155
157
|
const parse = makeTree().parse;
|
|
156
158
|
export { parse as parse };
|
|
157
159
|
export const parseFormattingCodes = (text, options = {}) => parseFcodes(text, { parseAttributes, ...options });
|
|
158
|
-
export { default as toHtml } from './exportHtml';
|
|
159
|
-
export { default as toMarkdown } from './exportMarkdown';
|
|
160
|
-
export { default as Writer } from './writer';
|
|
161
|
-
export { parseSelector, runSelector, filePathMatches } from './selectors';
|
|
162
|
-
export { markGuarded, isCovered } from './guard';
|
|
163
|
-
export { applyFoldedSections } from './folded-sections';
|
|
164
|
-
export { applyImageBase } from './image-base';
|
|
165
|
-
export { version } from './version';
|
|
160
|
+
export { default as toHtml } from './exportHtml.js';
|
|
161
|
+
export { default as toMarkdown } from './exportMarkdown.js';
|
|
162
|
+
export { default as Writer } from './writer.js';
|
|
163
|
+
export { parseSelector, runSelector, filePathMatches } from './selectors.js';
|
|
164
|
+
export { markGuarded, isCovered } from './guard.js';
|
|
165
|
+
export { applyFoldedSections } from './folded-sections.js';
|
|
166
|
+
export { applyImageBase } from './image-base.js';
|
|
167
|
+
export { version } from './version.js';
|
|
166
168
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAoC,MAAM,KAAK,CAAA;AACtD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,UAAU,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AA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MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACxC,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;gBACzB,OAAO;gBACP,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;gBAC3B,eAAe;gBACf,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;YACtB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,CAAA;AAC7B,MAAM,KAAK,GAAa,QAAQ,EAAE,CAAC,KAAK,CAAA;AACxC,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,CAAA;AACzB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,UAAkC,EAAE,EAAE,EAAE,CACzF,WAAW,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
package/esm/pluggableParser.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { mkRootBlock, toAny, toAnyRules, toHtml, toTree } from '.';
|
|
2
|
-
import toMarkdown from './exportMarkdown';
|
|
3
|
-
import idMiddleware from './helpers/ids';
|
|
4
|
-
import core from './helpers/corePlugins';
|
|
5
|
-
import { propagateConfigDefaults } from './helpers/configPropagation';
|
|
6
|
-
import { attachHeadingNumberPrefix } from './helpers/headingNumbering';
|
|
7
|
-
import { promoteOrderedLists } from './helpers/itemNumbering';
|
|
8
|
-
import { markGuarded } from './guard';
|
|
9
|
-
import { applyFoldedSections } from './folded-sections';
|
|
10
|
-
export { cleanIds, frozenIds, headingId } from './helpers/ids';
|
|
1
|
+
import { mkRootBlock, toAny, toAnyRules, toHtml, toTree } from './index.js';
|
|
2
|
+
import toMarkdown from './exportMarkdown.js';
|
|
3
|
+
import idMiddleware from './helpers/ids.js';
|
|
4
|
+
import core from './helpers/corePlugins.js';
|
|
5
|
+
import { propagateConfigDefaults } from './helpers/configPropagation.js';
|
|
6
|
+
import { attachHeadingNumberPrefix } from './helpers/headingNumbering.js';
|
|
7
|
+
import { promoteOrderedLists } from './helpers/itemNumbering.js';
|
|
8
|
+
import { markGuarded } from './guard.js';
|
|
9
|
+
import { applyFoldedSections } from './folded-sections.js';
|
|
10
|
+
export { cleanIds, frozenIds, headingId } from './helpers/ids.js';
|
|
11
11
|
export const podlitePluggable = ({ plugins = {} } = {}) => {
|
|
12
12
|
let instance = function () { };
|
|
13
13
|
let _plugins = [];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Delete location attribute
|
|
3
3
|
* use in test suite
|
|
4
4
|
*/
|
|
5
|
-
import makeTransformer from './helpers/makeTransformer';
|
|
5
|
+
import makeTransformer from './helpers/makeTransformer.js';
|
|
6
6
|
export const pluginCleanLocation = () => tree => {
|
|
7
7
|
const transformer = makeTransformer({
|
|
8
8
|
'*': (node, ctx, visiter) => {
|
package/esm/plugin-data-table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import makeTransformer from './helpers/makeTransformer';
|
|
2
|
-
import makeAttrs from './helpers/config';
|
|
3
|
-
import { parseCsv, parseTsv, parseMimeType, findDataBlockByKey, extractDataText, csvToTableContent, normalizeCellCounts, makeTableReport, } from './plugin-tables';
|
|
1
|
+
import makeTransformer from './helpers/makeTransformer.js';
|
|
2
|
+
import makeAttrs from './helpers/config.js';
|
|
3
|
+
import { parseCsv, parseTsv, parseMimeType, findDataBlockByKey, extractDataText, csvToTableContent, normalizeCellCounts, makeTableReport, } from './plugin-tables.js';
|
|
4
4
|
const extensionMimeMap = {
|
|
5
5
|
csv: 'text/csv; header=present',
|
|
6
6
|
tsv: 'text/tab-separated-values; header=present',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* The first non-blank line of content is treated as a term being defined,
|
|
4
4
|
* and the remaining content is treated as the definition for the term.
|
|
5
5
|
*/
|
|
6
|
-
import makeTransformer from './helpers/makeTransformer';
|
|
6
|
+
import makeTransformer from './helpers/makeTransformer.js';
|
|
7
7
|
export default () => tree => {
|
|
8
8
|
const transformer = makeTransformer({
|
|
9
9
|
defn: node => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as fcparser from './grammarfc';
|
|
2
|
-
import makeTransformer from './helpers/makeTransformer';
|
|
3
|
-
import { isNamedBlock } from './helpers/makeTransformer';
|
|
4
|
-
import makeAttrs from './helpers/config';
|
|
5
|
-
import { parseAttributes } from './helpers/parseAttributes';
|
|
1
|
+
import * as fcparser from './grammarfc.js';
|
|
2
|
+
import makeTransformer from './helpers/makeTransformer.js';
|
|
3
|
+
import { isNamedBlock } from './helpers/makeTransformer.js';
|
|
4
|
+
import makeAttrs from './helpers/config.js';
|
|
5
|
+
import { parseAttributes } from './helpers/parseAttributes.js';
|
|
6
6
|
// `=config C<> :allow<I>` names a markup code, not a block: the trailing angles
|
|
7
7
|
// are the marker, and what it declares belongs to the code they name
|
|
8
8
|
const codeConfigOwner = (name) => typeof name === 'string' && /^[A-Z]<>$/.test(name) ? name[0] : null;
|
package/esm/plugin-tables.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* The first non-blank line of content is treated as a term being defined,
|
|
4
4
|
* and the remaining content is treated as the definition for the term.
|
|
5
5
|
*/
|
|
6
|
-
import makeTransformer from './helpers/makeTransformer';
|
|
7
|
-
import makeAttrs from './helpers/config';
|
|
6
|
+
import makeTransformer from './helpers/makeTransformer.js';
|
|
7
|
+
import makeAttrs from './helpers/config.js';
|
|
8
8
|
function flattenDeep(arr) {
|
|
9
9
|
return arr.reduce((acc, val) => (Array.isArray(val) ? acc.concat(flattenDeep(val)) : acc.concat(val)), []);
|
|
10
10
|
}
|
package/esm/query-helpers.js
CHANGED
package/esm/selectors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getFromTree, getNodeId, getTextContentFromNode, makeAttrs } from './index';
|
|
2
|
-
import { parseAttributes } from './helpers/parseAttributes';
|
|
1
|
+
import { getFromTree, getNodeId, getTextContentFromNode, makeAttrs } from './index.js';
|
|
2
|
+
import { parseAttributes } from './helpers/parseAttributes.js';
|
|
3
3
|
// --- predicate parser ---------------------------------------------------
|
|
4
4
|
const isIdentStart = (c) => /[a-zA-Z_]/.test(c);
|
|
5
5
|
const isIdentCont = (c) => /[a-zA-Z0-9_-]/.test(c);
|
package/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.70";
|
package/esm/version.js
CHANGED
package/esm/writerHtml.js
CHANGED
package/esm/writerMarkdown.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -103,7 +103,9 @@ const plugin_data_table_1 = __importDefault(require("./plugin-data-table"));
|
|
|
103
103
|
function toAst() {
|
|
104
104
|
return {};
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
// ajv 8 refuses a tuple whose minItems is below its length, and a picture carries
|
|
107
|
+
// an optional second element. ajv 7 had no such check, so nothing is being relaxed.
|
|
108
|
+
const ajv = new ajv_1.default({ strict: true, allowUnionTypes: true, strictTuples: false });
|
|
107
109
|
function getTextContentFromNode(node) {
|
|
108
110
|
let text = '';
|
|
109
111
|
const rules = {
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.70";
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podlite/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
4
4
|
"description": "AST tools and schema for Podlite markup language — validate, traverse, and transform document trees",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"CHANGELOG.md"
|
|
37
37
|
],
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
39
|
+
"node": ">=20.19"
|
|
40
40
|
},
|
|
41
41
|
"engineStrict": true,
|
|
42
42
|
"publishConfig": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"selectors"
|
|
70
70
|
],
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"ajv": "^
|
|
72
|
+
"ajv": "^8.20.0",
|
|
73
73
|
"entities": "^4.5.0",
|
|
74
74
|
"events": "^3.1.0",
|
|
75
75
|
"json-pointer": "^0.6.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const makePlug = require('./makeQuery').makePlug;
|
|
2
|
-
const fixtures = [
|
|
3
|
-
'name:block',
|
|
4
|
-
{
|
|
5
|
-
name: 'name',
|
|
6
|
-
type: 'block',
|
|
7
|
-
},
|
|
8
|
-
'C<>',
|
|
9
|
-
{
|
|
10
|
-
name: 'C',
|
|
11
|
-
type: 'fcode',
|
|
12
|
-
},
|
|
13
|
-
':blankline',
|
|
14
|
-
{
|
|
15
|
-
type: 'blankline',
|
|
16
|
-
},
|
|
17
|
-
'*:block',
|
|
18
|
-
{
|
|
19
|
-
type: 'block',
|
|
20
|
-
},
|
|
21
|
-
'*:*',
|
|
22
|
-
{},
|
|
23
|
-
'*',
|
|
24
|
-
{},
|
|
25
|
-
'<>',
|
|
26
|
-
{
|
|
27
|
-
type: 'fcode',
|
|
28
|
-
},
|
|
29
|
-
'name',
|
|
30
|
-
{
|
|
31
|
-
name: 'name',
|
|
32
|
-
type: 'block',
|
|
33
|
-
},
|
|
34
|
-
'Special<>',
|
|
35
|
-
{
|
|
36
|
-
name: 'Special',
|
|
37
|
-
type: 'fcode',
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
const pairs = fixtures.reduce(function (result, value, index, array) {
|
|
41
|
-
if (index % 2 === 0)
|
|
42
|
-
result.push(array.slice(index, index + 2));
|
|
43
|
-
return result;
|
|
44
|
-
}, []);
|
|
45
|
-
const log = a => console.log(JSON.stringify(a, null, 2));
|
|
46
|
-
describe('run make query helpers tests', () => {
|
|
47
|
-
pairs.map(([k, v], idx) => {
|
|
48
|
-
test(`test ${idx}`, () => expect(makePlug(k)).toEqual(v));
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=makeQuery.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"makeQuery.test.js","sourceRoot":"","sources":["../../src/helpers/makeQuery.test.js"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAA;AAEhD,MAAM,QAAQ,GAAG;IACf,YAAY;IACZ;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,OAAO;KACd;IACD,KAAK;IACL;QACE,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,OAAO;KACd;IACD,YAAY;IACZ;QACE,IAAI,EAAE,WAAW;KAClB;IACD,SAAS;IACT;QACE,IAAI,EAAE,OAAO;KACd;IACD,KAAK;IACL,EAAE;IACF,GAAG;IACH,EAAE;IACF,IAAI;IACJ;QACE,IAAI,EAAE,OAAO;KACd;IACD,MAAM;IACN;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,OAAO;KACd;IACD,WAAW;IACX;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,OAAO;KACd;CACF,CAAA;AAED,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAU,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IACjE,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAA;IAC/D,OAAO,MAAM,CAAA;AACf,CAAC,EAAE,EAAE,CAAC,CAAA;AAEN,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AAExD,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;QACxB,IAAI,CAAC,QAAQ,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3D,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const makePlug = require('./makeQuery').makePlug;
|
|
2
|
-
const fixtures = [
|
|
3
|
-
'name:block',
|
|
4
|
-
{
|
|
5
|
-
name: 'name',
|
|
6
|
-
type: 'block',
|
|
7
|
-
},
|
|
8
|
-
'C<>',
|
|
9
|
-
{
|
|
10
|
-
name: 'C',
|
|
11
|
-
type: 'fcode',
|
|
12
|
-
},
|
|
13
|
-
':blankline',
|
|
14
|
-
{
|
|
15
|
-
type: 'blankline',
|
|
16
|
-
},
|
|
17
|
-
'*:block',
|
|
18
|
-
{
|
|
19
|
-
type: 'block',
|
|
20
|
-
},
|
|
21
|
-
'*:*',
|
|
22
|
-
{},
|
|
23
|
-
'*',
|
|
24
|
-
{},
|
|
25
|
-
'<>',
|
|
26
|
-
{
|
|
27
|
-
type: 'fcode',
|
|
28
|
-
},
|
|
29
|
-
'name',
|
|
30
|
-
{
|
|
31
|
-
name: 'name',
|
|
32
|
-
type: 'block',
|
|
33
|
-
},
|
|
34
|
-
'Special<>',
|
|
35
|
-
{
|
|
36
|
-
name: 'Special',
|
|
37
|
-
type: 'fcode',
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
const pairs = fixtures.reduce(function (result, value, index, array) {
|
|
41
|
-
if (index % 2 === 0)
|
|
42
|
-
result.push(array.slice(index, index + 2));
|
|
43
|
-
return result;
|
|
44
|
-
}, []);
|
|
45
|
-
const log = a => console.log(JSON.stringify(a, null, 2));
|
|
46
|
-
describe('run make query helpers tests', () => {
|
|
47
|
-
pairs.map(([k, v], idx) => {
|
|
48
|
-
test(`test ${idx}`, () => expect(makePlug(k)).toEqual(v));
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=makeQuery.test.js.map
|