@yozora/tokenizer-table 2.0.6 → 2.1.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.
@@ -1,10 +1,10 @@
1
- import { IPartialYastBlockToken, ITokenizer, IBaseBlockTokenizerProps, IPhrasingContentLine, IMatchBlockHookCreator, IParseBlockHookCreator, BaseBlockTokenizer, IBlockTokenizer } from '@yozora/core-tokenizer';
1
+ import { IPartialBlockToken, ITokenizer, IBaseBlockTokenizerProps, IPhrasingContentLine, IMatchBlockHookCreator, IParseBlockHookCreator, BaseBlockTokenizer, IBlockTokenizer } from '@yozora/core-tokenizer';
2
2
  import { TableType, TableColumn, TableRowType, TableCellType, Position, Table } from '@yozora/ast';
3
3
 
4
4
  type T = TableType;
5
5
  type INode = Table;
6
6
  declare const uniqueName = "@yozora/tokenizer-table";
7
- interface IToken extends IPartialYastBlockToken<TableType> {
7
+ interface IToken extends IPartialBlockToken<TableType> {
8
8
  /**
9
9
  * Table column configuration items
10
10
  */
@@ -16,10 +16,10 @@ interface IToken extends IPartialYastBlockToken<TableType> {
16
16
  }
17
17
  type IThis = ITokenizer;
18
18
  type ITokenizerProps = Partial<IBaseBlockTokenizerProps>;
19
- interface ITableRowToken extends IPartialYastBlockToken<TableRowType> {
19
+ interface ITableRowToken extends IPartialBlockToken<TableRowType> {
20
20
  cells: ITableCellToken[];
21
21
  }
22
- interface ITableCellToken extends IPartialYastBlockToken<TableCellType> {
22
+ interface ITableCellToken extends IPartialBlockToken<TableCellType> {
23
23
  position: Position;
24
24
  lines: IPhrasingContentLine[];
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yozora/tokenizer-table",
3
- "version": "2.0.6",
3
+ "version": "2.1.0",
4
4
  "author": {
5
5
  "name": "guanghechen",
6
6
  "url": "https://github.com/guanghechen/"
@@ -39,9 +39,9 @@
39
39
  "test": "cross-env TS_NODE_FILES=true NODE_OPTIONS=--experimental-vm-modules jest --config ../../jest.config.mjs --rootDir ."
40
40
  },
41
41
  "dependencies": {
42
- "@yozora/ast": "^2.0.6",
43
- "@yozora/character": "^2.0.6",
44
- "@yozora/core-tokenizer": "^2.0.6"
42
+ "@yozora/ast": "^2.1.0",
43
+ "@yozora/character": "^2.1.0",
44
+ "@yozora/core-tokenizer": "^2.1.0"
45
45
  },
46
- "gitHead": "a263c5338103824347bac74d437051e9fbb6d791"
46
+ "gitHead": "387a68e8f9154944e2a6a7009a808d076d0659c6"
47
47
  }
package/src/match.ts CHANGED
@@ -2,12 +2,12 @@ import type { AlignType, Point, TableColumn } from '@yozora/ast'
2
2
  import { TableCellType, TableRowType, TableType } from '@yozora/ast'
3
3
  import { AsciiCodePoint, isWhitespaceCharacter } from '@yozora/character'
4
4
  import type {
5
+ IBlockToken,
5
6
  IMatchBlockHookCreator,
6
7
  IPhrasingContentLine,
7
8
  IResultOfEatAndInterruptPreviousSibling,
8
9
  IResultOfEatLazyContinuationText,
9
10
  IResultOfEatOpener,
10
- IYastBlockToken,
11
11
  } from '@yozora/core-tokenizer'
12
12
  import { calcEndPoint, calcStartPoint } from '@yozora/core-tokenizer'
13
13
  import type { ITableCellToken, ITableRowToken, IThis, IToken, T } from './types'
@@ -41,7 +41,7 @@ export const match: IMatchBlockHookCreator<T, IToken, IThis> = function (api) {
41
41
 
42
42
  function eatAndInterruptPreviousSibling(
43
43
  line: Readonly<IPhrasingContentLine>,
44
- prevSiblingToken: Readonly<IYastBlockToken>,
44
+ prevSiblingToken: Readonly<IBlockToken>,
45
45
  ): IResultOfEatAndInterruptPreviousSibling<T, IToken> {
46
46
  /**
47
47
  * Four spaces is too much
package/src/types.ts CHANGED
@@ -8,7 +8,7 @@ import type {
8
8
  } from '@yozora/ast'
9
9
  import type {
10
10
  IBaseBlockTokenizerProps,
11
- IPartialYastBlockToken,
11
+ IPartialBlockToken,
12
12
  IPhrasingContentLine,
13
13
  ITokenizer,
14
14
  } from '@yozora/core-tokenizer'
@@ -17,7 +17,7 @@ export type T = TableType
17
17
  export type INode = Table
18
18
  export const uniqueName = '@yozora/tokenizer-table'
19
19
 
20
- export interface IToken extends IPartialYastBlockToken<TableType> {
20
+ export interface IToken extends IPartialBlockToken<TableType> {
21
21
  /**
22
22
  * Table column configuration items
23
23
  */
@@ -32,11 +32,11 @@ export type IThis = ITokenizer
32
32
 
33
33
  export type ITokenizerProps = Partial<IBaseBlockTokenizerProps>
34
34
 
35
- export interface ITableRowToken extends IPartialYastBlockToken<TableRowType> {
35
+ export interface ITableRowToken extends IPartialBlockToken<TableRowType> {
36
36
  cells: ITableCellToken[]
37
37
  }
38
38
 
39
- export interface ITableCellToken extends IPartialYastBlockToken<TableCellType> {
39
+ export interface ITableCellToken extends IPartialBlockToken<TableCellType> {
40
40
  position: Position
41
41
  lines: IPhrasingContentLine[]
42
42
  }