@flint.fyi/markdown-language 0.15.3 → 0.15.4

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.
@@ -1,6 +1,6 @@
1
1
  import { DirectivesCollector } from "@flint.fyi/core";
2
- import { nullThrows } from "@flint.fyi/utils";
3
2
  import { visit } from "unist-util-visit";
3
+ import { nullThrows } from "@flint.fyi/utils";
4
4
  //#region src/directives/parseDirectivesFromMarkdownFile.ts
5
5
  function parseDirectivesFromMarkdownFile(root, sourceText) {
6
6
  const collector = new DirectivesCollector(root.children.find((child) => child.position?.start.offset !== void 0)?.position?.start.offset ?? sourceText.length);
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { MarkdownNodeVisitors, MarkdownNodesByName, PointWithOffset, PositionWithOffsets, RootContentMapWithChildren, WithPosition } from "./nodes.js";
2
2
  import { MarkdownFileServices, markdownLanguage } from "./language.js";
3
- export { MarkdownFileServices, MarkdownNodeVisitors, MarkdownNodesByName, PointWithOffset, PositionWithOffsets, RootContentMapWithChildren, WithPosition, markdownLanguage };
3
+ export { type MarkdownFileServices, type MarkdownNodeVisitors, type MarkdownNodesByName, type PointWithOffset, type PositionWithOffsets, type RootContentMapWithChildren, type WithPosition, markdownLanguage };
package/lib/language.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MarkdownNodesByName, WithPosition } from "./nodes.js";
1
+ import { WithPosition } from "./nodes.js";
2
2
  import * as _flint_fyi_core0 from "@flint.fyi/core";
3
3
  import * as mdast from "mdast";
4
4
 
@@ -6,34 +6,60 @@ import * as mdast from "mdast";
6
6
  interface MarkdownFileServices {
7
7
  root: WithPosition<mdast.Root>;
8
8
  }
9
- declare const markdownLanguage: _flint_fyi_core0.Language<_flint_fyi_core0.Simplify<MarkdownNodesByName & {
10
- "blockquote:exit"?: WithPosition<mdast.Blockquote>;
11
- "break:exit"?: WithPosition<mdast.Break>;
12
- "code:exit"?: WithPosition<mdast.Code>;
13
- "definition:exit"?: WithPosition<mdast.Definition>;
14
- "delete:exit"?: WithPosition<mdast.Delete>;
15
- "emphasis:exit"?: WithPosition<mdast.Emphasis>;
16
- "footnoteDefinition:exit"?: WithPosition<mdast.FootnoteDefinition>;
17
- "footnoteReference:exit"?: WithPosition<mdast.FootnoteReference>;
18
- "heading:exit"?: WithPosition<mdast.Heading>;
19
- "html:exit"?: WithPosition<mdast.Html>;
20
- "image:exit"?: WithPosition<mdast.Image>;
21
- "imageReference:exit"?: WithPosition<mdast.ImageReference>;
22
- "inlineCode:exit"?: WithPosition<mdast.InlineCode>;
23
- "link:exit"?: WithPosition<mdast.Link>;
24
- "linkReference:exit"?: WithPosition<mdast.LinkReference>;
25
- "list:exit"?: WithPosition<mdast.List>;
26
- "listItem:exit"?: WithPosition<mdast.ListItem>;
27
- "paragraph:exit"?: WithPosition<mdast.Paragraph>;
28
- "strong:exit"?: WithPosition<mdast.Strong>;
29
- "table:exit"?: WithPosition<mdast.Table>;
30
- "tableCell:exit"?: WithPosition<mdast.TableCell>;
31
- "tableRow:exit"?: WithPosition<mdast.TableRow>;
32
- "text:exit"?: WithPosition<mdast.Text>;
33
- "thematicBreak:exit"?: WithPosition<mdast.ThematicBreak>;
34
- "yaml:exit"?: WithPosition<mdast.Yaml>;
35
- "root:exit"?: WithPosition<mdast.Root>;
36
- }>, MarkdownFileServices>;
9
+ declare const markdownLanguage: _flint_fyi_core0.Language<{
10
+ root: WithPosition<mdast.Root>;
11
+ blockquote: WithPosition<mdast.Blockquote>;
12
+ break: WithPosition<mdast.Break>;
13
+ code: WithPosition<mdast.Code>;
14
+ definition: WithPosition<mdast.Definition>;
15
+ delete: WithPosition<mdast.Delete>;
16
+ emphasis: WithPosition<mdast.Emphasis>;
17
+ footnoteDefinition: WithPosition<mdast.FootnoteDefinition>;
18
+ footnoteReference: WithPosition<mdast.FootnoteReference>;
19
+ heading: WithPosition<mdast.Heading>;
20
+ html: WithPosition<mdast.Html>;
21
+ image: WithPosition<mdast.Image>;
22
+ imageReference: WithPosition<mdast.ImageReference>;
23
+ inlineCode: WithPosition<mdast.InlineCode>;
24
+ link: WithPosition<mdast.Link>;
25
+ linkReference: WithPosition<mdast.LinkReference>;
26
+ list: WithPosition<mdast.List>;
27
+ listItem: WithPosition<mdast.ListItem>;
28
+ paragraph: WithPosition<mdast.Paragraph>;
29
+ strong: WithPosition<mdast.Strong>;
30
+ table: WithPosition<mdast.Table>;
31
+ tableCell: WithPosition<mdast.TableCell>;
32
+ tableRow: WithPosition<mdast.TableRow>;
33
+ text: WithPosition<mdast.Text>;
34
+ thematicBreak: WithPosition<mdast.ThematicBreak>;
35
+ yaml: WithPosition<mdast.Yaml>;
36
+ "blockquote:exit": WithPosition<mdast.Blockquote>;
37
+ "break:exit": WithPosition<mdast.Break>;
38
+ "code:exit": WithPosition<mdast.Code>;
39
+ "definition:exit": WithPosition<mdast.Definition>;
40
+ "delete:exit": WithPosition<mdast.Delete>;
41
+ "emphasis:exit": WithPosition<mdast.Emphasis>;
42
+ "footnoteDefinition:exit": WithPosition<mdast.FootnoteDefinition>;
43
+ "footnoteReference:exit": WithPosition<mdast.FootnoteReference>;
44
+ "heading:exit": WithPosition<mdast.Heading>;
45
+ "html:exit": WithPosition<mdast.Html>;
46
+ "image:exit": WithPosition<mdast.Image>;
47
+ "imageReference:exit": WithPosition<mdast.ImageReference>;
48
+ "inlineCode:exit": WithPosition<mdast.InlineCode>;
49
+ "link:exit": WithPosition<mdast.Link>;
50
+ "linkReference:exit": WithPosition<mdast.LinkReference>;
51
+ "list:exit": WithPosition<mdast.List>;
52
+ "listItem:exit": WithPosition<mdast.ListItem>;
53
+ "paragraph:exit": WithPosition<mdast.Paragraph>;
54
+ "strong:exit": WithPosition<mdast.Strong>;
55
+ "table:exit": WithPosition<mdast.Table>;
56
+ "tableCell:exit": WithPosition<mdast.TableCell>;
57
+ "tableRow:exit": WithPosition<mdast.TableRow>;
58
+ "text:exit": WithPosition<mdast.Text>;
59
+ "thematicBreak:exit": WithPosition<mdast.ThematicBreak>;
60
+ "yaml:exit": WithPosition<mdast.Yaml>;
61
+ "root:exit": WithPosition<mdast.Root>;
62
+ }, MarkdownFileServices>;
37
63
  //#endregion
38
64
  export { MarkdownFileServices, markdownLanguage };
39
65
  //# sourceMappingURL=language.d.ts.map
package/lib/language.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { parseDirectivesFromMarkdownFile } from "./directives/parseDirectivesFromMarkdownFile.js";
2
- import { createLanguage } from "@flint.fyi/core";
3
2
  import { fromMarkdown } from "mdast-util-from-markdown";
4
3
  import { gfmFromMarkdown } from "mdast-util-gfm";
5
4
  import { gfm } from "micromark-extension-gfm";
5
+ import { createLanguage } from "@flint.fyi/core";
6
6
  //#region src/language.ts
7
7
  const markdownLanguage = createLanguage({
8
8
  about: { name: "Markdown" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flint.fyi/markdown-language",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "description": "[Experimental] Markdown language for Flint.",
5
5
  "homepage": "https://flint.fyi",
6
6
  "repository": {
@@ -10,8 +10,8 @@
10
10
  },
11
11
  "license": "MIT",
12
12
  "author": {
13
- "name": "JoshuaKGoldberg",
14
- "email": "npm@joshuakgoldberg.com"
13
+ "name": "Flint Team",
14
+ "url": "https://flint.fyi/team"
15
15
  },
16
16
  "sideEffects": false,
17
17
  "type": "module",
@@ -29,8 +29,8 @@
29
29
  "mdast-util-gfm": "^3.1.0",
30
30
  "micromark-extension-gfm": "^3.0.0",
31
31
  "unist-util-visit": "^5.0.0",
32
- "@flint.fyi/utils": "^0.14.1",
33
- "@flint.fyi/core": "^0.22.0"
32
+ "@flint.fyi/core": "^0.23.0",
33
+ "@flint.fyi/utils": "^0.14.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "tsdown": "0.21.0",