@art-md/constructs 0.0.3 → 0.0.5
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/README.md +3 -3
- package/dist/factories/constructs/Document/factory/createDocument.d.ts +3 -0
- package/dist/factories/constructs/Document/factory/types.d.ts +4 -0
- package/dist/factories/constructs/Document/index.d.ts +2 -0
- package/dist/factories/constructs/FieldBlock/factory/createFieldBlock.d.ts +3 -0
- package/dist/factories/constructs/FieldBlock/factory/types.d.ts +7 -0
- package/dist/factories/constructs/FieldBlock/index.d.ts +3 -0
- package/dist/factories/constructs/FieldBlock/types.d.ts +9 -0
- package/dist/factories/constructs/FieldInline/factory/createFieldInline.d.ts +3 -0
- package/dist/factories/constructs/FieldInline/factory/types.d.ts +7 -0
- package/dist/factories/constructs/FieldInline/index.d.ts +3 -0
- package/dist/factories/constructs/FieldInline/types.d.ts +9 -0
- package/dist/factories/constructs/NaturalBlock/factory/createNaturalBlock.d.ts +3 -0
- package/dist/factories/constructs/NaturalBlock/factory/types.d.ts +11 -0
- package/dist/factories/constructs/NaturalBlock/index.d.ts +3 -0
- package/dist/factories/constructs/NaturalBlock/types.d.ts +12 -0
- package/dist/factories/constructs/NaturalExpression/factory/createNaturalExpression.d.ts +3 -0
- package/dist/factories/constructs/NaturalExpression/factory/types.d.ts +7 -0
- package/dist/factories/constructs/NaturalExpression/index.d.ts +3 -0
- package/dist/factories/constructs/NaturalExpression/types.d.ts +8 -0
- package/dist/factories/constructs/SectionBlock/factory/createSectionBlock.d.ts +3 -0
- package/dist/factories/constructs/SectionBlock/factory/types.d.ts +8 -0
- package/dist/factories/constructs/SectionBlock/index.d.ts +3 -0
- package/dist/factories/constructs/SectionBlock/types.d.ts +9 -0
- package/dist/factories/constructs/Tag/factory/createTag.d.ts +3 -0
- package/dist/factories/constructs/Tag/factory/types.d.ts +3 -0
- package/dist/factories/constructs/Tag/index.d.ts +3 -0
- package/dist/factories/constructs/Tag/types.d.ts +5 -0
- package/dist/factories/index.d.ts +8 -0
- package/dist/factories/public.d.ts +36 -0
- package/dist/factories/types.d.ts +31 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +627 -0
- package/dist/index.mjs.map +7 -0
- package/dist/parser/constructs/FieldBlock/createFieldBlockParser.d.ts +2 -0
- package/dist/parser/constructs/FieldBlock/index.d.ts +1 -0
- package/dist/parser/constructs/FieldBlock/private/helpers/createFieldBlockFromNode.d.ts +4 -0
- package/dist/parser/constructs/FieldBlock/private/helpers/onBeforeConstruct.d.ts +2 -0
- package/dist/parser/constructs/FieldBlock/private/index.d.ts +2 -0
- package/dist/parser/constructs/FieldBlock/private/integrator/createFieldBlockIntegrator.d.ts +2 -0
- package/dist/parser/constructs/FieldBlock/private/processor/createFieldBlockProcessor.d.ts +2 -0
- package/dist/parser/constructs/FieldInline/createFieldInlineParser.d.ts +2 -0
- package/dist/parser/constructs/FieldInline/index.d.ts +1 -0
- package/dist/parser/constructs/FieldInline/private/helpers/createFieldInlineFromNode.d.ts +4 -0
- package/dist/parser/constructs/FieldInline/private/helpers/trimFieldEdges.d.ts +2 -0
- package/dist/parser/constructs/FieldInline/private/index.d.ts +1 -0
- package/dist/parser/constructs/FieldInline/private/processor/createFieldInlineProcessor.d.ts +2 -0
- package/dist/parser/constructs/NaturalBlock/createNaturalBlockParser.d.ts +2 -0
- package/dist/parser/constructs/NaturalBlock/index.d.ts +1 -0
- package/dist/parser/constructs/NaturalBlock/private/helpers/createNaturalBlockFromNode.d.ts +4 -0
- package/dist/parser/constructs/NaturalBlock/private/index.d.ts +1 -0
- package/dist/parser/constructs/NaturalBlock/private/processor/createNaturalBlockProcessor.d.ts +2 -0
- package/dist/parser/constructs/SectionBlock/createSectionBlockParser.d.ts +2 -0
- package/dist/parser/constructs/SectionBlock/index.d.ts +1 -0
- package/dist/parser/constructs/SectionBlock/private/helpers/createSectionBlockFromNode.d.ts +4 -0
- package/dist/parser/constructs/SectionBlock/private/helpers/findParentSection.d.ts +3 -0
- package/dist/parser/constructs/SectionBlock/private/index.d.ts +2 -0
- package/dist/parser/constructs/SectionBlock/private/integrator/createSectionBlockIntegrator.d.ts +2 -0
- package/dist/parser/constructs/SectionBlock/private/processor/createSectionBlockProcessor.d.ts +2 -0
- package/dist/parser/document/createArtDocumentFromNode.d.ts +3 -0
- package/dist/parser/document/index.d.ts +1 -0
- package/dist/parser/fields/constants.d.ts +1 -0
- package/dist/parser/fields/index.d.ts +3 -0
- package/dist/parser/fields/isFieldStrong.d.ts +3 -0
- package/dist/parser/fields/stripStrong.d.ts +3 -0
- package/dist/parser/index.d.ts +6 -0
- package/dist/parser/mdast/index.d.ts +1 -0
- package/dist/parser/mdast/rawSlice.d.ts +2 -0
- package/dist/parser/naturalExpression/createNaturalExpressionFromNode.d.ts +3 -0
- package/dist/parser/naturalExpression/index.d.ts +1 -0
- package/dist/parser/public.d.ts +5 -0
- package/dist/parser/tags/extractTags.d.ts +5 -0
- package/dist/parser/tags/index.d.ts +1 -0
- package/dist/parser/types.d.ts +14 -0
- package/dist/serializer/constructs/Document/createDocumentToMdast.d.ts +2 -0
- package/dist/serializer/constructs/Document/index.d.ts +1 -0
- package/dist/serializer/constructs/FieldBlock/createFieldBlockToMdast.d.ts +2 -0
- package/dist/serializer/constructs/FieldBlock/index.d.ts +1 -0
- package/dist/serializer/constructs/FieldInline/createFieldInlineToMdast.d.ts +2 -0
- package/dist/serializer/constructs/FieldInline/index.d.ts +1 -0
- package/dist/serializer/constructs/NaturalBlock/createNaturalBlockToMdast.d.ts +2 -0
- package/dist/serializer/constructs/NaturalBlock/index.d.ts +1 -0
- package/dist/serializer/constructs/NaturalExpression/createNaturalExpressionToMdast.d.ts +2 -0
- package/dist/serializer/constructs/NaturalExpression/index.d.ts +1 -0
- package/dist/serializer/constructs/SectionBlock/createSectionBlockToMdast.d.ts +2 -0
- package/dist/serializer/constructs/SectionBlock/index.d.ts +1 -0
- package/dist/serializer/index.d.ts +7 -0
- package/dist/serializer/public.d.ts +3 -0
- package/dist/serializer/tags/index.d.ts +2 -0
- package/dist/serializer/tags/tagToMdast.d.ts +3 -0
- package/dist/serializer/tags/tagsToMdast.d.ts +3 -0
- package/dist/serializer/types.d.ts +7 -0
- package/dist/test/helpers/constructs/FieldBlock/createFieldBlockFromNodeMock.d.ts +7 -0
- package/dist/test/helpers/constructs/FieldBlock/createFieldBlockMock.d.ts +7 -0
- package/dist/test/helpers/constructs/FieldBlock/makeFieldBlockFixture.d.ts +9 -0
- package/dist/test/helpers/constructs/FieldBlock/makeFieldBlockMock.d.ts +9 -0
- package/dist/test/helpers/constructs/FieldInline/createFieldInlineFromNodeMock.d.ts +7 -0
- package/dist/test/helpers/constructs/FieldInline/createFieldInlineMock.d.ts +7 -0
- package/dist/test/helpers/constructs/FieldInline/makeFieldInlineFixture.d.ts +9 -0
- package/dist/test/helpers/constructs/FieldInline/makeFieldInlineMock.d.ts +9 -0
- package/dist/test/helpers/constructs/NaturalBlock/createNaturalBlockFromNodeMock.d.ts +7 -0
- package/dist/test/helpers/constructs/NaturalBlock/createNaturalBlockMock.d.ts +7 -0
- package/dist/test/helpers/constructs/NaturalBlock/makeNaturalBlockFixture.d.ts +12 -0
- package/dist/test/helpers/constructs/NaturalBlock/makeNaturalBlockMock.d.ts +12 -0
- package/dist/test/helpers/constructs/NaturalExpression/makeNaturalExpressionFixture.d.ts +10 -0
- package/dist/test/helpers/constructs/NaturalExpression/makeNaturalExpressionMock.d.ts +10 -0
- package/dist/test/helpers/constructs/SectionBlock/createSectionBlockFromNodeMock.d.ts +7 -0
- package/dist/test/helpers/constructs/SectionBlock/createSectionBlockMock.d.ts +7 -0
- package/dist/test/helpers/constructs/SectionBlock/makeSectionBlockFixture.d.ts +10 -0
- package/dist/test/helpers/constructs/Tag/makeTagFixture.d.ts +7 -0
- package/dist/test/helpers/constructs/index.d.ts +14 -0
- package/dist/test/helpers/index.d.ts +2 -0
- package/dist/test/helpers/parsers/fields/stripStrongMock.d.ts +7 -0
- package/dist/test/helpers/parsers/index.d.ts +5 -0
- package/dist/test/helpers/parsers/mdast/rawSliceMock.d.ts +7 -0
- package/dist/test/helpers/parsers/natural-expression/createNaturalExpressionFromNodeMock.d.ts +7 -0
- package/dist/test/helpers/parsers/tags/extractTagsMock.d.ts +7 -0
- package/dist/test/helpers/parsers/tags/tagToMdastMock.d.ts +7 -0
- package/package.json +22 -4
- package/src/factories/constructs/Document/factory/createDocument.test.ts +2 -2
- package/src/factories/constructs/Document/factory/createDocument.ts +1 -1
- package/src/factories/constructs/Document/factory/types.ts +1 -1
- package/src/factories/constructs/Document/index.ts +2 -2
- package/src/factories/constructs/FieldBlock/factory/createFieldBlock.test.ts +2 -2
- package/src/factories/constructs/FieldBlock/factory/createFieldBlock.ts +2 -2
- package/src/factories/constructs/FieldBlock/factory/types.ts +2 -2
- package/src/factories/constructs/FieldBlock/index.ts +3 -3
- package/src/factories/constructs/FieldBlock/types.ts +2 -2
- package/src/factories/constructs/FieldInline/factory/createFieldInline.test.ts +2 -2
- package/src/factories/constructs/FieldInline/factory/createFieldInline.ts +2 -2
- package/src/factories/constructs/FieldInline/factory/types.ts +2 -2
- package/src/factories/constructs/FieldInline/index.ts +3 -3
- package/src/factories/constructs/FieldInline/types.ts +2 -2
- package/src/factories/constructs/NaturalBlock/factory/createNaturalBlock.test.ts +2 -2
- package/src/factories/constructs/NaturalBlock/factory/createNaturalBlock.ts +2 -2
- package/src/factories/constructs/NaturalBlock/factory/types.ts +1 -1
- package/src/factories/constructs/NaturalBlock/index.ts +3 -3
- package/src/factories/constructs/NaturalBlock/types.ts +1 -1
- package/src/factories/constructs/NaturalExpression/factory/createNaturalExpression.test.ts +2 -2
- package/src/factories/constructs/NaturalExpression/factory/createNaturalExpression.ts +2 -2
- package/src/factories/constructs/NaturalExpression/factory/types.ts +1 -1
- package/src/factories/constructs/NaturalExpression/index.ts +3 -3
- package/src/factories/constructs/SectionBlock/factory/createSectionBlock.test.ts +2 -4
- package/src/factories/constructs/SectionBlock/factory/createSectionBlock.ts +2 -3
- package/src/factories/constructs/SectionBlock/factory/types.ts +1 -2
- package/src/factories/constructs/SectionBlock/index.ts +3 -3
- package/src/factories/constructs/SectionBlock/types.ts +1 -2
- package/src/factories/constructs/Tag/factory/createTag.test.ts +1 -1
- package/src/factories/constructs/Tag/factory/createTag.ts +2 -2
- package/src/factories/constructs/Tag/index.ts +3 -3
- package/src/factories/index.ts +8 -8
- package/src/factories/public.ts +14 -14
- package/src/factories/types.ts +6 -6
- package/src/index.ts +3 -3
- package/src/parser/constructs/FieldBlock/createFieldBlockParser.test.ts +1 -1
- package/src/parser/constructs/FieldBlock/createFieldBlockParser.ts +2 -2
- package/src/parser/constructs/FieldBlock/index.ts +1 -1
- package/src/parser/constructs/FieldBlock/private/helpers/createFieldBlockFromNode.test.ts +4 -4
- package/src/parser/constructs/FieldBlock/private/helpers/createFieldBlockFromNode.ts +4 -4
- package/src/parser/constructs/FieldBlock/private/helpers/onBeforeConstruct.test.ts +1 -1
- package/src/parser/constructs/FieldBlock/private/index.ts +2 -2
- package/src/parser/constructs/FieldBlock/private/integrator/createFieldBlockIntegrator.test.ts +4 -4
- package/src/parser/constructs/FieldBlock/private/integrator/createFieldBlockIntegrator.ts +3 -3
- package/src/parser/constructs/FieldBlock/private/processor/createFieldBlockProcessor.test.ts +4 -4
- package/src/parser/constructs/FieldBlock/private/processor/createFieldBlockProcessor.ts +3 -3
- package/src/parser/constructs/FieldInline/createFieldInlineParser.test.ts +1 -1
- package/src/parser/constructs/FieldInline/createFieldInlineParser.ts +2 -2
- package/src/parser/constructs/FieldInline/index.ts +1 -1
- package/src/parser/constructs/FieldInline/private/helpers/createFieldInlineFromNode.test.ts +4 -4
- package/src/parser/constructs/FieldInline/private/helpers/createFieldInlineFromNode.ts +6 -6
- package/src/parser/constructs/FieldInline/private/helpers/trimFieldEdges.test.ts +2 -2
- package/src/parser/constructs/FieldInline/private/helpers/trimFieldEdges.ts +1 -1
- package/src/parser/constructs/FieldInline/private/index.ts +1 -1
- package/src/parser/constructs/FieldInline/private/processor/createFieldInlineProcessor.test.ts +4 -4
- package/src/parser/constructs/FieldInline/private/processor/createFieldInlineProcessor.ts +3 -3
- package/src/parser/constructs/NaturalBlock/createNaturalBlockParser.test.ts +1 -1
- package/src/parser/constructs/NaturalBlock/createNaturalBlockParser.ts +2 -2
- package/src/parser/constructs/NaturalBlock/index.ts +1 -1
- package/src/parser/constructs/NaturalBlock/private/helpers/createNaturalBlockFromNode.test.ts +4 -4
- package/src/parser/constructs/NaturalBlock/private/helpers/createNaturalBlockFromNode.ts +4 -4
- package/src/parser/constructs/NaturalBlock/private/index.ts +1 -1
- package/src/parser/constructs/NaturalBlock/private/processor/createNaturalBlockProcessor.test.ts +4 -4
- package/src/parser/constructs/NaturalBlock/private/processor/createNaturalBlockProcessor.ts +2 -2
- package/src/parser/constructs/SectionBlock/createSectionBlockParser.test.ts +1 -1
- package/src/parser/constructs/SectionBlock/createSectionBlockParser.ts +2 -2
- package/src/parser/constructs/SectionBlock/index.ts +1 -1
- package/src/parser/constructs/SectionBlock/private/helpers/createSectionBlockFromNode.test.ts +6 -6
- package/src/parser/constructs/SectionBlock/private/helpers/createSectionBlockFromNode.ts +4 -7
- package/src/parser/constructs/SectionBlock/private/helpers/findParentSection.test.ts +9 -3
- package/src/parser/constructs/SectionBlock/private/helpers/findParentSection.ts +1 -1
- package/src/parser/constructs/SectionBlock/private/index.ts +2 -2
- package/src/parser/constructs/SectionBlock/private/integrator/createSectionBlockIntegrator.test.ts +6 -3
- package/src/parser/constructs/SectionBlock/private/integrator/createSectionBlockIntegrator.ts +3 -3
- package/src/parser/constructs/SectionBlock/private/processor/createSectionBlockProcessor.test.ts +4 -4
- package/src/parser/constructs/SectionBlock/private/processor/createSectionBlockProcessor.ts +2 -2
- package/src/parser/document/createArtDocumentFromNode.test.ts +2 -2
- package/src/parser/document/createArtDocumentFromNode.ts +1 -1
- package/src/parser/document/index.ts +1 -1
- package/src/parser/fields/constants.test.ts +1 -1
- package/src/parser/fields/index.ts +3 -3
- package/src/parser/fields/isFieldStrong.test.ts +2 -2
- package/src/parser/fields/isFieldStrong.ts +2 -2
- package/src/parser/fields/stripStrong.test.ts +3 -3
- package/src/parser/fields/stripStrong.ts +1 -1
- package/src/parser/index.ts +6 -6
- package/src/parser/mdast/index.ts +1 -1
- package/src/parser/mdast/rawSlice.test.ts +1 -1
- package/src/parser/naturalExpression/createNaturalExpressionFromNode.test.ts +2 -7
- package/src/parser/naturalExpression/createNaturalExpressionFromNode.ts +2 -3
- package/src/parser/naturalExpression/index.ts +1 -1
- package/src/parser/public.ts +7 -7
- package/src/parser/tags/extractTags.test.ts +1 -1
- package/src/parser/tags/extractTags.ts +1 -1
- package/src/parser/tags/index.ts +1 -1
- package/src/parser/types.ts +1 -1
- package/src/serializer/constructs/Document/createDocumentToMdast.test.ts +1 -1
- package/src/serializer/constructs/Document/createDocumentToMdast.ts +1 -1
- package/src/serializer/constructs/Document/index.ts +1 -1
- package/src/serializer/constructs/FieldBlock/createFieldBlockToMdast.test.ts +2 -2
- package/src/serializer/constructs/FieldBlock/createFieldBlockToMdast.ts +3 -3
- package/src/serializer/constructs/FieldBlock/index.ts +1 -1
- package/src/serializer/constructs/FieldInline/createFieldInlineToMdast.test.ts +2 -2
- package/src/serializer/constructs/FieldInline/createFieldInlineToMdast.ts +3 -3
- package/src/serializer/constructs/FieldInline/index.ts +1 -1
- package/src/serializer/constructs/NaturalBlock/createNaturalBlockToMdast.test.ts +2 -2
- package/src/serializer/constructs/NaturalBlock/createNaturalBlockToMdast.ts +3 -3
- package/src/serializer/constructs/NaturalBlock/index.ts +1 -1
- package/src/serializer/constructs/NaturalExpression/createNaturalExpressionToMdast.test.ts +2 -2
- package/src/serializer/constructs/NaturalExpression/createNaturalExpressionToMdast.ts +2 -2
- package/src/serializer/constructs/NaturalExpression/index.ts +1 -1
- package/src/serializer/constructs/SectionBlock/createSectionBlockToMdast.test.ts +2 -2
- package/src/serializer/constructs/SectionBlock/createSectionBlockToMdast.ts +3 -3
- package/src/serializer/constructs/SectionBlock/index.ts +1 -1
- package/src/serializer/index.ts +7 -7
- package/src/serializer/public.ts +8 -8
- package/src/serializer/tags/index.ts +2 -2
- package/src/serializer/tags/tagToMdast.test.ts +1 -1
- package/src/serializer/tags/tagToMdast.ts +1 -1
- package/src/serializer/tags/tagsToMdast.test.ts +2 -2
- package/src/serializer/tags/tagsToMdast.ts +2 -2
- package/src/serializer/types.ts +1 -1
- package/src/test/helpers/constructs/FieldBlock/makeFieldBlockFixture.ts +1 -1
- package/src/test/helpers/constructs/FieldBlock/makeFieldBlockMock.ts +1 -1
- package/src/test/helpers/constructs/FieldInline/makeFieldInlineFixture.ts +1 -1
- package/src/test/helpers/constructs/FieldInline/makeFieldInlineMock.ts +1 -1
- package/src/test/helpers/constructs/NaturalBlock/makeNaturalBlockFixture.ts +1 -1
- package/src/test/helpers/constructs/NaturalBlock/makeNaturalBlockMock.ts +1 -1
- package/src/test/helpers/constructs/NaturalExpression/makeNaturalExpressionFixture.ts +1 -1
- package/src/test/helpers/constructs/NaturalExpression/makeNaturalExpressionMock.ts +1 -1
- package/src/test/helpers/constructs/SectionBlock/makeSectionBlockFixture.ts +1 -3
- package/src/test/helpers/constructs/Tag/makeTagFixture.ts +1 -1
- package/src/test/helpers/constructs/index.ts +14 -14
- package/src/test/helpers/index.ts +2 -2
- package/src/test/helpers/parsers/index.ts +5 -5
- package/src/parser/constructs/SectionBlock/private/constants.test.ts +0 -17
- package/src/parser/constructs/SectionBlock/private/constants.ts +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './FieldBlock/createFieldBlockFromNodeMock.js';
|
|
2
|
+
export * from './FieldBlock/createFieldBlockMock.js';
|
|
3
|
+
export * from './FieldBlock/makeFieldBlockFixture.js';
|
|
4
|
+
export * from './FieldInline/createFieldInlineFromNodeMock.js';
|
|
5
|
+
export * from './FieldInline/createFieldInlineMock.js';
|
|
6
|
+
export * from './FieldInline/makeFieldInlineFixture.js';
|
|
7
|
+
export * from './NaturalBlock/createNaturalBlockFromNodeMock.js';
|
|
8
|
+
export * from './NaturalBlock/createNaturalBlockMock.js';
|
|
9
|
+
export * from './NaturalBlock/makeNaturalBlockFixture.js';
|
|
10
|
+
export * from './NaturalExpression/makeNaturalExpressionFixture.js';
|
|
11
|
+
export * from './SectionBlock/createSectionBlockFromNodeMock.js';
|
|
12
|
+
export * from './SectionBlock/createSectionBlockMock.js';
|
|
13
|
+
export * from './SectionBlock/makeSectionBlockFixture.js';
|
|
14
|
+
export * from './Tag/makeTagFixture.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mocks createNaturalExpressionFromNode() from `src/parsers/NaturalExpression/private/helpers`
|
|
3
|
+
*/
|
|
4
|
+
import { vi } from 'vitest';
|
|
5
|
+
export declare const createNaturalExpressionFromNodeMock: () => {
|
|
6
|
+
createNaturalExpressionFromNode: ReturnType<typeof vi.fn>;
|
|
7
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@art-md/constructs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Construct factories for Art parser records.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"library",
|
|
7
|
+
"constructs",
|
|
8
|
+
"art",
|
|
9
|
+
"markdown",
|
|
10
|
+
"ast",
|
|
11
|
+
"structured-data",
|
|
12
|
+
"agent-instructions"
|
|
13
|
+
],
|
|
5
14
|
"author": "Noodlestan Collective",
|
|
6
15
|
"license": "MIT",
|
|
7
16
|
"private": false,
|
|
@@ -15,17 +24,26 @@
|
|
|
15
24
|
},
|
|
16
25
|
"type": "module",
|
|
17
26
|
"sideEffects": false,
|
|
18
|
-
"
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./test-helpers/*": {
|
|
33
|
+
"import": "./src/test/helpers/*"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
19
36
|
"files": [
|
|
20
37
|
"src",
|
|
38
|
+
"dist",
|
|
21
39
|
"LICENSE-MIT",
|
|
22
40
|
"README.md"
|
|
23
41
|
],
|
|
24
42
|
"scripts": {
|
|
25
|
-
"dev": "
|
|
43
|
+
"dev": "esbuild-cli-watch",
|
|
26
44
|
"lint": "prettier . -c && eslint . && tsc --noEmit",
|
|
27
45
|
"lint:fix": "prettier . -c --write && eslint . --fix",
|
|
28
|
-
"build": "
|
|
46
|
+
"build": "esbuild-cli",
|
|
29
47
|
"build:clean": "rm -rf dist",
|
|
30
48
|
"test": "vitest run",
|
|
31
49
|
"test:ci": "vitest run --coverage",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import type { SectionBlock } from '../../SectionBlock';
|
|
3
|
+
import type { SectionBlock } from '../../SectionBlock/index.js';
|
|
4
4
|
|
|
5
|
-
import { createDocument } from './createDocument';
|
|
5
|
+
import { createDocument } from './createDocument.js';
|
|
6
6
|
|
|
7
7
|
describe('createDocument', () => {
|
|
8
8
|
it('WHEN creating an ArtDocument from data', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ArtDocument, createArtDocument } from '@art-md/primitives';
|
|
2
2
|
|
|
3
|
-
import type { DocumentFactoryData } from './types';
|
|
3
|
+
import type { DocumentFactoryData } from './types.js';
|
|
4
4
|
|
|
5
5
|
export function createDocument(data: DocumentFactoryData): ArtDocument {
|
|
6
6
|
const docData = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createDocument } from './factory/createDocument';
|
|
1
|
+
export { createDocument } from './factory/createDocument.js';
|
|
2
2
|
|
|
3
|
-
export type { DocumentFactoryData } from './factory/types';
|
|
3
|
+
export type { DocumentFactoryData } from './factory/types.js';
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
makeFieldBlockFixture,
|
|
5
5
|
makeNaturalBlockFixture,
|
|
6
6
|
makeTagFixture,
|
|
7
|
-
} from '../../../../test/helpers';
|
|
7
|
+
} from '../../../../test/helpers/index.js';
|
|
8
8
|
|
|
9
|
-
import { createFieldBlock } from './createFieldBlock';
|
|
9
|
+
import { createFieldBlock } from './createFieldBlock.js';
|
|
10
10
|
|
|
11
11
|
describe('createFieldBlock', () => {
|
|
12
12
|
it('WHEN creating a FieldBlock from minimal data', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FieldBlock } from '../types';
|
|
1
|
+
import type { FieldBlock } from '../types.js';
|
|
2
2
|
|
|
3
|
-
import type { FieldBlockFactoryData } from './types';
|
|
3
|
+
import type { FieldBlockFactoryData } from './types.js';
|
|
4
4
|
|
|
5
5
|
export function createFieldBlock(data: FieldBlockFactoryData): FieldBlock {
|
|
6
6
|
const field: FieldBlock = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createFieldBlock } from './factory/createFieldBlock';
|
|
1
|
+
export { createFieldBlock } from './factory/createFieldBlock.js';
|
|
2
2
|
|
|
3
|
-
export type { FieldBlock } from './types';
|
|
4
|
-
export type { FieldBlockFactoryData } from './factory/types';
|
|
3
|
+
export type { FieldBlock } from './types.js';
|
|
4
|
+
export type { FieldBlockFactoryData } from './factory/types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContainerConstructBase } from '@art-md/primitives';
|
|
2
2
|
|
|
3
|
-
import type { BlockContent } from '../../types';
|
|
4
|
-
import type { Tag } from '../Tag';
|
|
3
|
+
import type { BlockContent } from '../../types.js';
|
|
4
|
+
import type { Tag } from '../Tag/index.js';
|
|
5
5
|
|
|
6
6
|
export type FieldBlock = ContainerConstructBase & {
|
|
7
7
|
construct: 'FieldBlock';
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
makeFieldInlineFixture,
|
|
5
5
|
makeNaturalExpressionFixture,
|
|
6
6
|
makeTagFixture,
|
|
7
|
-
} from '../../../../test/helpers';
|
|
7
|
+
} from '../../../../test/helpers/index.js';
|
|
8
8
|
|
|
9
|
-
import { createFieldInline } from './createFieldInline';
|
|
9
|
+
import { createFieldInline } from './createFieldInline.js';
|
|
10
10
|
|
|
11
11
|
describe('createFieldInline', () => {
|
|
12
12
|
it('WHEN creating a FieldInline from minimal data', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FieldInline } from '../types';
|
|
1
|
+
import type { FieldInline } from '../types.js';
|
|
2
2
|
|
|
3
|
-
import type { FieldInlineFactoryData } from './types';
|
|
3
|
+
import type { FieldInlineFactoryData } from './types.js';
|
|
4
4
|
|
|
5
5
|
export function createFieldInline(data: FieldInlineFactoryData): FieldInline {
|
|
6
6
|
const field: FieldInline = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NaturalExpression } from '../../NaturalExpression';
|
|
2
|
-
import type { Tag } from '../../Tag';
|
|
1
|
+
import type { NaturalExpression } from '../../NaturalExpression/index.js';
|
|
2
|
+
import type { Tag } from '../../Tag/index.js';
|
|
3
3
|
|
|
4
4
|
export type FieldInlineFactoryData = {
|
|
5
5
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createFieldInline } from './factory/createFieldInline';
|
|
1
|
+
export { createFieldInline } from './factory/createFieldInline.js';
|
|
2
2
|
|
|
3
|
-
export type { FieldInline } from './types';
|
|
4
|
-
export type { FieldInlineFactoryData } from './factory/types';
|
|
3
|
+
export type { FieldInline } from './types.js';
|
|
4
|
+
export type { FieldInlineFactoryData } from './factory/types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContainerConstructBase } from '@art-md/primitives';
|
|
2
2
|
|
|
3
|
-
import type { NaturalExpression } from '../NaturalExpression';
|
|
4
|
-
import type { Tag } from '../Tag';
|
|
3
|
+
import type { NaturalExpression } from '../NaturalExpression/index.js';
|
|
4
|
+
import type { Tag } from '../Tag/index.js';
|
|
5
5
|
|
|
6
6
|
export type FieldInline = ContainerConstructBase & {
|
|
7
7
|
construct: 'FieldInline';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import { makeNaturalBlockFixture, makeTagFixture } from '../../../../test/helpers';
|
|
3
|
+
import { makeNaturalBlockFixture, makeTagFixture } from '../../../../test/helpers/index.js';
|
|
4
4
|
|
|
5
|
-
import { createNaturalBlock } from './createNaturalBlock';
|
|
5
|
+
import { createNaturalBlock } from './createNaturalBlock.js';
|
|
6
6
|
|
|
7
7
|
describe('createNaturalBlock', () => {
|
|
8
8
|
it('WHEN creating a NaturalBlock from minimal data', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NaturalBlock } from '../types';
|
|
1
|
+
import type { NaturalBlock } from '../types.js';
|
|
2
2
|
|
|
3
|
-
import type { NaturalBlockFactoryData } from './types';
|
|
3
|
+
import type { NaturalBlockFactoryData } from './types.js';
|
|
4
4
|
|
|
5
5
|
export function createNaturalBlock(data: NaturalBlockFactoryData): NaturalBlock {
|
|
6
6
|
const block: NaturalBlock = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createNaturalBlock } from './factory/createNaturalBlock';
|
|
1
|
+
export { createNaturalBlock } from './factory/createNaturalBlock.js';
|
|
2
2
|
|
|
3
|
-
export type { NaturalBlock } from './types';
|
|
4
|
-
export type { NaturalBlockFactoryData } from './factory/types';
|
|
3
|
+
export type { NaturalBlock } from './types.js';
|
|
4
|
+
export type { NaturalBlockFactoryData } from './factory/types.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import { makeNaturalExpressionFixture } from '../../../../test/helpers';
|
|
3
|
+
import { makeNaturalExpressionFixture } from '../../../../test/helpers/index.js';
|
|
4
4
|
|
|
5
|
-
import { createNaturalExpression } from './createNaturalExpression';
|
|
5
|
+
import { createNaturalExpression } from './createNaturalExpression.js';
|
|
6
6
|
|
|
7
7
|
describe('createNaturalExpression', () => {
|
|
8
8
|
it('WHEN creating a NaturalExpression from data', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NaturalExpression } from '../types';
|
|
1
|
+
import type { NaturalExpression } from '../types.js';
|
|
2
2
|
|
|
3
|
-
import type { NaturalExpressionFactoryData } from './types';
|
|
3
|
+
import type { NaturalExpressionFactoryData } from './types.js';
|
|
4
4
|
|
|
5
5
|
export function createNaturalExpression(data: NaturalExpressionFactoryData): NaturalExpression {
|
|
6
6
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createNaturalExpression } from './factory/createNaturalExpression';
|
|
1
|
+
export { createNaturalExpression } from './factory/createNaturalExpression.js';
|
|
2
2
|
|
|
3
|
-
export type { NaturalExpression } from './types';
|
|
4
|
-
export type { NaturalExpressionFactoryData } from './factory/types';
|
|
3
|
+
export type { NaturalExpression } from './types.js';
|
|
4
|
+
export type { NaturalExpressionFactoryData } from './factory/types.js';
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
makeNaturalBlockFixture,
|
|
5
5
|
makeSectionBlockFixture,
|
|
6
6
|
makeTagFixture,
|
|
7
|
-
} from '../../../../test/helpers';
|
|
7
|
+
} from '../../../../test/helpers/index.js';
|
|
8
8
|
|
|
9
|
-
import { createSectionBlock } from './createSectionBlock';
|
|
9
|
+
import { createSectionBlock } from './createSectionBlock.js';
|
|
10
10
|
|
|
11
11
|
describe('createSectionBlock', () => {
|
|
12
12
|
it('WHEN creating a SectionBlock from minimal data', () => {
|
|
@@ -17,12 +17,10 @@ describe('createSectionBlock', () => {
|
|
|
17
17
|
it('WHEN provided includes optional properties', () => {
|
|
18
18
|
const result = createSectionBlock({
|
|
19
19
|
name: 'Test',
|
|
20
|
-
kind: 'Module',
|
|
21
20
|
depth: 2,
|
|
22
21
|
children: [makeNaturalBlockFixture()],
|
|
23
22
|
tags: [makeTagFixture()],
|
|
24
23
|
});
|
|
25
|
-
expect(result.kind).toBe('Module');
|
|
26
24
|
expect(result.depth).toBe(2);
|
|
27
25
|
expect(result.children).toHaveLength(1);
|
|
28
26
|
expect(result.tags).toHaveLength(1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SectionBlock } from '../types';
|
|
1
|
+
import type { SectionBlock } from '../types.js';
|
|
2
2
|
|
|
3
|
-
import type { SectionBlockFactoryData } from './types';
|
|
3
|
+
import type { SectionBlockFactoryData } from './types.js';
|
|
4
4
|
|
|
5
5
|
export function createSectionBlock(data: SectionBlockFactoryData): SectionBlock {
|
|
6
6
|
const section: SectionBlock = {
|
|
@@ -8,7 +8,6 @@ export function createSectionBlock(data: SectionBlockFactoryData): SectionBlock
|
|
|
8
8
|
name: data.name,
|
|
9
9
|
children: data.children ?? [],
|
|
10
10
|
};
|
|
11
|
-
if (data.kind) section.kind = data.kind;
|
|
12
11
|
if (data.depth !== undefined) section.depth = data.depth;
|
|
13
12
|
if (data.tags?.length) section.tags = data.tags;
|
|
14
13
|
return section;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ConstructBase } from '@art-md/primitives';
|
|
2
2
|
|
|
3
|
-
import type { Tag } from '../../Tag';
|
|
3
|
+
import type { Tag } from '../../Tag/index.js';
|
|
4
4
|
|
|
5
5
|
export type SectionBlockFactoryData = {
|
|
6
6
|
name: string;
|
|
7
|
-
kind?: string;
|
|
8
7
|
depth?: number;
|
|
9
8
|
children?: ConstructBase[];
|
|
10
9
|
tags?: Tag[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createSectionBlock } from './factory/createSectionBlock';
|
|
1
|
+
export { createSectionBlock } from './factory/createSectionBlock.js';
|
|
2
2
|
|
|
3
|
-
export type { SectionBlock } from './types';
|
|
4
|
-
export type { SectionBlockFactoryData } from './factory/types';
|
|
3
|
+
export type { SectionBlock } from './types.js';
|
|
4
|
+
export type { SectionBlockFactoryData } from './factory/types.js';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ConstructBase, ContainerConstructBase } from '@art-md/primitives';
|
|
2
2
|
|
|
3
|
-
import type { Tag } from '../Tag';
|
|
3
|
+
import type { Tag } from '../Tag/index.js';
|
|
4
4
|
|
|
5
5
|
export type SectionBlock = ContainerConstructBase & {
|
|
6
6
|
construct: 'SectionBlock';
|
|
7
|
-
kind?: string;
|
|
8
7
|
name: string;
|
|
9
8
|
tags?: Tag[];
|
|
10
9
|
children: ConstructBase[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Tag } from '../types';
|
|
1
|
+
import type { Tag } from '../types.js';
|
|
2
2
|
|
|
3
|
-
import type { TagFactoryData } from './types';
|
|
3
|
+
import type { TagFactoryData } from './types.js';
|
|
4
4
|
|
|
5
5
|
export function createTag(tagData: TagFactoryData): Tag {
|
|
6
6
|
return { construct: 'Tag' as const, name: tagData.name };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createTag } from './factory/createTag';
|
|
1
|
+
export { createTag } from './factory/createTag.js';
|
|
2
2
|
|
|
3
|
-
export type { Tag } from './types';
|
|
4
|
-
export type { TagFactoryData } from './factory/types';
|
|
3
|
+
export type { Tag } from './types.js';
|
|
4
|
+
export type { TagFactoryData } from './factory/types.js';
|
package/src/factories/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './constructs/Document';
|
|
2
|
-
export * from './constructs/FieldBlock';
|
|
3
|
-
export * from './constructs/FieldInline';
|
|
4
|
-
export * from './constructs/NaturalBlock';
|
|
5
|
-
export * from './constructs/NaturalExpression';
|
|
6
|
-
export * from './constructs/SectionBlock';
|
|
7
|
-
export * from './constructs/Tag';
|
|
1
|
+
export * from './constructs/Document/index.js';
|
|
2
|
+
export * from './constructs/FieldBlock/index.js';
|
|
3
|
+
export * from './constructs/FieldInline/index.js';
|
|
4
|
+
export * from './constructs/NaturalBlock/index.js';
|
|
5
|
+
export * from './constructs/NaturalExpression/index.js';
|
|
6
|
+
export * from './constructs/SectionBlock/index.js';
|
|
7
|
+
export * from './constructs/Tag/index.js';
|
|
8
8
|
|
|
9
|
-
export type * from './types';
|
|
9
|
+
export type * from './types.js';
|
package/src/factories/public.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { createDocument } from './constructs/Document';
|
|
2
|
-
import { createFieldBlock } from './constructs/FieldBlock';
|
|
3
|
-
import { createFieldInline } from './constructs/FieldInline';
|
|
4
|
-
import { createNaturalBlock } from './constructs/NaturalBlock';
|
|
5
|
-
import { createNaturalExpression } from './constructs/NaturalExpression';
|
|
6
|
-
import { createSectionBlock } from './constructs/SectionBlock';
|
|
7
|
-
import { createTag } from './constructs/Tag';
|
|
1
|
+
import { createDocument } from './constructs/Document/index.js';
|
|
2
|
+
import { createFieldBlock } from './constructs/FieldBlock/index.js';
|
|
3
|
+
import { createFieldInline } from './constructs/FieldInline/index.js';
|
|
4
|
+
import { createNaturalBlock } from './constructs/NaturalBlock/index.js';
|
|
5
|
+
import { createNaturalExpression } from './constructs/NaturalExpression/index.js';
|
|
6
|
+
import { createSectionBlock } from './constructs/SectionBlock/index.js';
|
|
7
|
+
import { createTag } from './constructs/Tag/index.js';
|
|
8
8
|
|
|
9
|
-
export type { FieldBlock } from './constructs/FieldBlock';
|
|
10
|
-
export type { FieldInline } from './constructs/FieldInline';
|
|
11
|
-
export type { NaturalBlock } from './constructs/NaturalBlock';
|
|
12
|
-
export type { NaturalExpression } from './constructs/NaturalExpression';
|
|
13
|
-
export type { SectionBlock } from './constructs/SectionBlock';
|
|
14
|
-
export type { Tag } from './constructs/Tag';
|
|
9
|
+
export type { FieldBlock } from './constructs/FieldBlock/index.js';
|
|
10
|
+
export type { FieldInline } from './constructs/FieldInline/index.js';
|
|
11
|
+
export type { NaturalBlock } from './constructs/NaturalBlock/index.js';
|
|
12
|
+
export type { NaturalExpression } from './constructs/NaturalExpression/index.js';
|
|
13
|
+
export type { SectionBlock } from './constructs/SectionBlock/index.js';
|
|
14
|
+
export type { Tag } from './constructs/Tag/index.js';
|
|
15
15
|
|
|
16
|
-
export type * from './types';
|
|
16
|
+
export type * from './types.js';
|
|
17
17
|
|
|
18
18
|
export const FACTORIES = [
|
|
19
19
|
{
|
package/src/factories/types.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { FieldBlock } from './constructs/FieldBlock';
|
|
2
|
-
import type { FieldInline } from './constructs/FieldInline';
|
|
3
|
-
import type { NaturalBlock } from './constructs/NaturalBlock';
|
|
4
|
-
import type { NaturalExpression } from './constructs/NaturalExpression';
|
|
5
|
-
import type { SectionBlock } from './constructs/SectionBlock';
|
|
6
|
-
import type { Tag } from './constructs/Tag';
|
|
1
|
+
import type { FieldBlock } from './constructs/FieldBlock/index.js';
|
|
2
|
+
import type { FieldInline } from './constructs/FieldInline/index.js';
|
|
3
|
+
import type { NaturalBlock } from './constructs/NaturalBlock/index.js';
|
|
4
|
+
import type { NaturalExpression } from './constructs/NaturalExpression/index.js';
|
|
5
|
+
import type { SectionBlock } from './constructs/SectionBlock/index.js';
|
|
6
|
+
import type { Tag } from './constructs/Tag/index.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Open registry of block-level constructs. Augment via declaration merging when new constructs land.
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './factories/public';
|
|
2
|
-
export * from './parser/public';
|
|
3
|
-
export * from './serializer/public';
|
|
1
|
+
export * from './factories/public.js';
|
|
2
|
+
export * from './parser/public.js';
|
|
3
|
+
export * from './serializer/public.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import { createFieldBlockParser } from './createFieldBlockParser';
|
|
3
|
+
import { createFieldBlockParser } from './createFieldBlockParser.js';
|
|
4
4
|
|
|
5
5
|
describe('createFieldBlockParser', () => {
|
|
6
6
|
it('WHEN called returns a parser with FieldBlock name, processor, integrator and factory', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ConstructParserFactory } from '../../types';
|
|
1
|
+
import type { ConstructParserFactory } from '../../types.js';
|
|
2
2
|
|
|
3
|
-
import { createFieldBlockIntegrator, createFieldBlockProcessor } from './private';
|
|
3
|
+
import { createFieldBlockIntegrator, createFieldBlockProcessor } from './private/index.js';
|
|
4
4
|
|
|
5
5
|
export const createFieldBlockParser: ConstructParserFactory = () => ({
|
|
6
6
|
name: 'FieldBlock',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createFieldBlockParser } from './createFieldBlockParser';
|
|
1
|
+
export { createFieldBlockParser } from './createFieldBlockParser.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { makeParserVisitContextMock } from '@art-md/primitives/
|
|
1
|
+
import { makeParserVisitContextMock } from '@art-md/primitives/test-helpers/index.js';
|
|
2
2
|
import type { Paragraph } from 'mdast';
|
|
3
3
|
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
4
4
|
import { describe, expect, it, vi } from 'vitest';
|
|
5
5
|
|
|
6
|
-
import { createFieldBlock } from '../../../../../factories';
|
|
6
|
+
import { createFieldBlock } from '../../../../../factories/index.js';
|
|
7
7
|
|
|
8
|
-
import { createFieldBlockFromNode } from './createFieldBlockFromNode';
|
|
8
|
+
import { createFieldBlockFromNode } from './createFieldBlockFromNode.js';
|
|
9
9
|
|
|
10
10
|
vi.mock('../../../../../factories/constructs/FieldBlock/factory/createFieldBlock', async () => {
|
|
11
|
-
const { createFieldBlockMock } = await import('../../../../../test/helpers');
|
|
11
|
+
const { createFieldBlockMock } = await import('../../../../../test/helpers/index.js');
|
|
12
12
|
return createFieldBlockMock();
|
|
13
13
|
});
|
|
14
14
|
|
|
@@ -2,10 +2,10 @@ import type { ParserVisitContext } from '@art-md/primitives';
|
|
|
2
2
|
import { nodePosition } from '@art-md/primitives';
|
|
3
3
|
import type { Paragraph, Strong } from 'mdast';
|
|
4
4
|
|
|
5
|
-
import { type FieldBlock, createFieldBlock } from '../../../../../factories';
|
|
6
|
-
import { stripStrong } from '../../../../fields';
|
|
7
|
-
import { rawSlice } from '../../../../mdast';
|
|
8
|
-
import { extractTags } from '../../../../tags';
|
|
5
|
+
import { type FieldBlock, createFieldBlock } from '../../../../../factories/index.js';
|
|
6
|
+
import { stripStrong } from '../../../../fields/index.js';
|
|
7
|
+
import { rawSlice } from '../../../../mdast/index.js';
|
|
8
|
+
import { extractTags } from '../../../../tags/index.js';
|
|
9
9
|
|
|
10
10
|
export function createFieldBlockFromNode(
|
|
11
11
|
paragraph: Paragraph,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import { onBeforeConstruct } from './onBeforeConstruct';
|
|
3
|
+
import { onBeforeConstruct } from './onBeforeConstruct.js';
|
|
4
4
|
|
|
5
5
|
describe('onBeforeConstruct', () => {
|
|
6
6
|
it('FOR a non-boundary construct returns the same context', () => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './integrator/createFieldBlockIntegrator';
|
|
2
|
-
export * from './processor/createFieldBlockProcessor';
|
|
1
|
+
export * from './integrator/createFieldBlockIntegrator.js';
|
|
2
|
+
export * from './processor/createFieldBlockProcessor.js';
|