@wdprlib/ast 4.0.2 → 4.2.0

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/dist/index.cjs CHANGED
@@ -51,6 +51,7 @@ __export(exports_src, {
51
51
  createPosition: () => createPosition,
52
52
  createPoint: () => createPoint,
53
53
  container: () => container,
54
+ buildInfo: () => buildInfo,
54
55
  bold: () => bold,
55
56
  STYLE_SLOT_PREFIX: () => STYLE_SLOT_PREFIX,
56
57
  STYLE_ANCHOR_PREFIX: () => STYLE_ANCHOR_PREFIX,
@@ -59,6 +60,12 @@ __export(exports_src, {
59
60
  });
60
61
  module.exports = __toCommonJS(exports_src);
61
62
 
63
+ // packages/ast/src/build-info.generated.ts
64
+ var buildInfo = Object.freeze({
65
+ version: "4.2.0",
66
+ sha: "b71b84c705e05717f5ea12fd89684a91b669dbff",
67
+ dirty: false
68
+ });
62
69
  // packages/ast/src/position.ts
63
70
  function createPoint(line, column, offset) {
64
71
  return { line, column, offset };
package/dist/index.d.cts CHANGED
@@ -1,3 +1,9 @@
1
+ /** Build-time package metadata; unavailable Git information is null. */
2
+ declare const buildInfo: Readonly<{
3
+ version: string;
4
+ sha: string | null;
5
+ dirty: boolean | null;
6
+ }>;
1
7
  /**
2
8
  * Source position tracking for Wikidot markup.
3
9
  *
@@ -724,6 +730,20 @@ interface TableOfContentsData {
724
730
  align: Alignment | null;
725
731
  }
726
732
  /**
733
+ * Resolved pagination state and navigation targets.
734
+ *
735
+ * @group Element Data
736
+ */
737
+ interface PagerData {
738
+ currentPage: number;
739
+ totalPages: number;
740
+ /** Ascending targets, including the current page, its neighbors, and both ends. */
741
+ pages: {
742
+ page: number;
743
+ href: string;
744
+ }[];
745
+ }
746
+ /**
727
747
  * Data for `[[footnoteblock]]` elements.
728
748
  *
729
749
  * @group Element Data
@@ -930,6 +950,7 @@ type ElementDataMap = {
930
950
  "definition-list": DefinitionListItem[];
931
951
  collapsible: CollapsibleData;
932
952
  "table-of-contents": TableOfContentsData;
953
+ pager: PagerData;
933
954
  footnote: void;
934
955
  "footnote-ref": number;
935
956
  "footnote-block": FootnoteBlockData;
@@ -1433,4 +1454,4 @@ interface WikitextPageContext {
1433
1454
  * @group Core
1434
1455
  */
1435
1456
  type Version = "wikidot";
1436
- export { text, paragraph, listItemSubList, listItemElements, list, link, lineBreak, italics, isTruthy, isStringContainerType, isParagraphSafe, isHeaderType, isContainerTypeParagraphSafe, isAlignType, horizontalRule, heading, formatExprValue, evaluateExpression, createSettings, createPosition, createPoint, container, bold, WikitextSettings, WikitextPageFile, WikitextPageContext, WikitextMode, Version, VariableMap, UserData, TocEntry, TableRow, TableOfContentsData, TableData, TableCell, TabData, SyntaxTree, StringContainerType, STYLE_SLOT_PREFIX, STYLE_ANCHOR_PREFIX, Position, Point, ParseResult, PageRef, Module, MathInlineData, MathData, ListType, ListItem, ListData, LinkType, LinkLocation, LinkLabel, LinkData, IncludeData, ImageSource, ImageData, IframeData, IfTagsData, IfExprData, IfCondData, HtmlData, HeadingLevel, Heading, HeaderType, GallerySize, GalleryOrder, GalleryItem, GalleryData, GalleryContent, FootnoteBlockData, FloatAlignment, ExprResult, ExprData, EmbedBlockData, Embed, ElementOf, ElementName, ElementDataMap, ElementData, Element, DiagnosticSeverity, Diagnostic, DefinitionListItem, DateItem, DateData, DEFAULT_SETTINGS, CssLengthUnit, ContainerType, ContainerData, ColorData, CollapsibleData, CodeBlockData, ClearFloat, CSS_LENGTH_UNITS, BibliographyCiteData, BibliographyBlockData, AttributeMap, AnchorTarget, AnchorData, Alignment, AlignType };
1457
+ export { text, paragraph, listItemSubList, listItemElements, list, link, lineBreak, italics, isTruthy, isStringContainerType, isParagraphSafe, isHeaderType, isContainerTypeParagraphSafe, isAlignType, horizontalRule, heading, formatExprValue, evaluateExpression, createSettings, createPosition, createPoint, container, buildInfo, bold, WikitextSettings, WikitextPageFile, WikitextPageContext, WikitextMode, Version, VariableMap, UserData, TocEntry, TableRow, TableOfContentsData, TableData, TableCell, TabData, SyntaxTree, StringContainerType, STYLE_SLOT_PREFIX, STYLE_ANCHOR_PREFIX, Position, Point, ParseResult, PagerData, PageRef, Module, MathInlineData, MathData, ListType, ListItem, ListData, LinkType, LinkLocation, LinkLabel, LinkData, IncludeData, ImageSource, ImageData, IframeData, IfTagsData, IfExprData, IfCondData, HtmlData, HeadingLevel, Heading, HeaderType, GallerySize, GalleryOrder, GalleryItem, GalleryData, GalleryContent, FootnoteBlockData, FloatAlignment, ExprResult, ExprData, EmbedBlockData, Embed, ElementOf, ElementName, ElementDataMap, ElementData, Element, DiagnosticSeverity, Diagnostic, DefinitionListItem, DateItem, DateData, DEFAULT_SETTINGS, CssLengthUnit, ContainerType, ContainerData, ColorData, CollapsibleData, CodeBlockData, ClearFloat, CSS_LENGTH_UNITS, BibliographyCiteData, BibliographyBlockData, AttributeMap, AnchorTarget, AnchorData, Alignment, AlignType };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,9 @@
1
+ /** Build-time package metadata; unavailable Git information is null. */
2
+ declare const buildInfo: Readonly<{
3
+ version: string;
4
+ sha: string | null;
5
+ dirty: boolean | null;
6
+ }>;
1
7
  /**
2
8
  * Source position tracking for Wikidot markup.
3
9
  *
@@ -724,6 +730,20 @@ interface TableOfContentsData {
724
730
  align: Alignment | null;
725
731
  }
726
732
  /**
733
+ * Resolved pagination state and navigation targets.
734
+ *
735
+ * @group Element Data
736
+ */
737
+ interface PagerData {
738
+ currentPage: number;
739
+ totalPages: number;
740
+ /** Ascending targets, including the current page, its neighbors, and both ends. */
741
+ pages: {
742
+ page: number;
743
+ href: string;
744
+ }[];
745
+ }
746
+ /**
727
747
  * Data for `[[footnoteblock]]` elements.
728
748
  *
729
749
  * @group Element Data
@@ -930,6 +950,7 @@ type ElementDataMap = {
930
950
  "definition-list": DefinitionListItem[];
931
951
  collapsible: CollapsibleData;
932
952
  "table-of-contents": TableOfContentsData;
953
+ pager: PagerData;
933
954
  footnote: void;
934
955
  "footnote-ref": number;
935
956
  "footnote-block": FootnoteBlockData;
@@ -1433,4 +1454,4 @@ interface WikitextPageContext {
1433
1454
  * @group Core
1434
1455
  */
1435
1456
  type Version = "wikidot";
1436
- export { text, paragraph, listItemSubList, listItemElements, list, link, lineBreak, italics, isTruthy, isStringContainerType, isParagraphSafe, isHeaderType, isContainerTypeParagraphSafe, isAlignType, horizontalRule, heading, formatExprValue, evaluateExpression, createSettings, createPosition, createPoint, container, bold, WikitextSettings, WikitextPageFile, WikitextPageContext, WikitextMode, Version, VariableMap, UserData, TocEntry, TableRow, TableOfContentsData, TableData, TableCell, TabData, SyntaxTree, StringContainerType, STYLE_SLOT_PREFIX, STYLE_ANCHOR_PREFIX, Position, Point, ParseResult, PageRef, Module, MathInlineData, MathData, ListType, ListItem, ListData, LinkType, LinkLocation, LinkLabel, LinkData, IncludeData, ImageSource, ImageData, IframeData, IfTagsData, IfExprData, IfCondData, HtmlData, HeadingLevel, Heading, HeaderType, GallerySize, GalleryOrder, GalleryItem, GalleryData, GalleryContent, FootnoteBlockData, FloatAlignment, ExprResult, ExprData, EmbedBlockData, Embed, ElementOf, ElementName, ElementDataMap, ElementData, Element, DiagnosticSeverity, Diagnostic, DefinitionListItem, DateItem, DateData, DEFAULT_SETTINGS, CssLengthUnit, ContainerType, ContainerData, ColorData, CollapsibleData, CodeBlockData, ClearFloat, CSS_LENGTH_UNITS, BibliographyCiteData, BibliographyBlockData, AttributeMap, AnchorTarget, AnchorData, Alignment, AlignType };
1457
+ export { text, paragraph, listItemSubList, listItemElements, list, link, lineBreak, italics, isTruthy, isStringContainerType, isParagraphSafe, isHeaderType, isContainerTypeParagraphSafe, isAlignType, horizontalRule, heading, formatExprValue, evaluateExpression, createSettings, createPosition, createPoint, container, buildInfo, bold, WikitextSettings, WikitextPageFile, WikitextPageContext, WikitextMode, Version, VariableMap, UserData, TocEntry, TableRow, TableOfContentsData, TableData, TableCell, TabData, SyntaxTree, StringContainerType, STYLE_SLOT_PREFIX, STYLE_ANCHOR_PREFIX, Position, Point, ParseResult, PagerData, PageRef, Module, MathInlineData, MathData, ListType, ListItem, ListData, LinkType, LinkLocation, LinkLabel, LinkData, IncludeData, ImageSource, ImageData, IframeData, IfTagsData, IfExprData, IfCondData, HtmlData, HeadingLevel, Heading, HeaderType, GallerySize, GalleryOrder, GalleryItem, GalleryData, GalleryContent, FootnoteBlockData, FloatAlignment, ExprResult, ExprData, EmbedBlockData, Embed, ElementOf, ElementName, ElementDataMap, ElementData, Element, DiagnosticSeverity, Diagnostic, DefinitionListItem, DateItem, DateData, DEFAULT_SETTINGS, CssLengthUnit, ContainerType, ContainerData, ColorData, CollapsibleData, CodeBlockData, ClearFloat, CSS_LENGTH_UNITS, BibliographyCiteData, BibliographyBlockData, AttributeMap, AnchorTarget, AnchorData, Alignment, AlignType };
package/dist/index.js CHANGED
@@ -1,3 +1,9 @@
1
+ // packages/ast/src/build-info.generated.ts
2
+ var buildInfo = Object.freeze({
3
+ version: "4.2.0",
4
+ sha: "b71b84c705e05717f5ea12fd89684a91b669dbff",
5
+ dirty: false
6
+ });
1
7
  // packages/ast/src/position.ts
2
8
  function createPoint(line, column, offset) {
3
9
  return { line, column, offset };
@@ -692,6 +698,7 @@ export {
692
698
  createPosition,
693
699
  createPoint,
694
700
  container,
701
+ buildInfo,
695
702
  bold,
696
703
  STYLE_SLOT_PREFIX,
697
704
  STYLE_ANCHOR_PREFIX,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdprlib/ast",
3
- "version": "4.0.2",
3
+ "version": "4.2.0",
4
4
  "description": "AST types for Wikidot markup",
5
5
  "keywords": [
6
6
  "ast",
@@ -0,0 +1,11 @@
1
+ // Generated by bun run build:info. Do not edit.
2
+ /** Build-time package metadata; unavailable Git information is null. */
3
+ export const buildInfo: Readonly<{
4
+ version: string;
5
+ sha: string | null;
6
+ dirty: boolean | null;
7
+ }> = Object.freeze({
8
+ version: "4.2.0",
9
+ sha: "b71b84c705e05717f5ea12fd89684a91b669dbff",
10
+ dirty: false,
11
+ });
package/src/element.ts CHANGED
@@ -742,6 +742,18 @@ export interface TableOfContentsData {
742
742
  align: Alignment | null;
743
743
  }
744
744
 
745
+ /**
746
+ * Resolved pagination state and navigation targets.
747
+ *
748
+ * @group Element Data
749
+ */
750
+ export interface PagerData {
751
+ currentPage: number;
752
+ totalPages: number;
753
+ /** Ascending targets, including the current page, its neighbors, and both ends. */
754
+ pages: { page: number; href: string }[];
755
+ }
756
+
745
757
  /**
746
758
  * Data for `[[footnoteblock]]` elements.
747
759
  *
@@ -969,6 +981,7 @@ export type ElementDataMap = {
969
981
  "definition-list": DefinitionListItem[];
970
982
  collapsible: CollapsibleData;
971
983
  "table-of-contents": TableOfContentsData;
984
+ pager: PagerData;
972
985
  footnote: void;
973
986
  "footnote-ref": number;
974
987
  "footnote-block": FootnoteBlockData;
package/src/index.ts CHANGED
@@ -10,6 +10,8 @@
10
10
  * @packageDocumentation
11
11
  */
12
12
 
13
+ export { buildInfo } from "./build-info.generated";
14
+
13
15
  export type { Position, Point } from "./position";
14
16
  export { createPoint, createPosition } from "./position";
15
17
 
@@ -73,6 +75,7 @@ export type {
73
75
  GalleryContent,
74
76
  GalleryData,
75
77
  TableOfContentsData,
78
+ PagerData,
76
79
  FootnoteBlockData,
77
80
  BibliographyCiteData,
78
81
  BibliographyBlockData,