@rocket.chat/message-parser 0.32.0-rc.0 → 0.33.0-rc.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/README.md +190 -55
- package/dist/asciiList.d.ts +2 -0
- package/dist/asciiList.d.ts.map +1 -0
- package/dist/definitions.d.ts +3 -0
- package/dist/definitions.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/messageParser.js +1 -1
- package/dist/utils.d.ts +10 -3
- package/dist/utils.d.ts.map +1 -1
- package/package.json +10 -22
package/README.md
CHANGED
|
@@ -1,49 +1,149 @@
|
|
|
1
|
-
|
|
1
|
+
# `@rocket.chat/message-parser`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<a href="https://rocket.chat" title="Rocket.Chat">
|
|
5
|
-
<img src="https://github.com/RocketChat/Rocket.Chat.Artwork/raw/master/Logos/2020/png/logo-horizontal-red.png" alt="Rocket.Chat" />
|
|
6
|
-
</a>
|
|
7
|
-
</p>
|
|
3
|
+
> Parses Rocket.Chat message text into an abstract syntax tree.
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@rocket.chat/message-parser) [](https://www.npmjs.com/package/@rocket.chat/message-parser)
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
Rocket.Chat messages use a Markdown dialect with chat additions: user and channel mentions, emoji, timestamps, spoilers, colors and KaTeX. This package turns that text into a typed AST, so a client can render a message without parsing Markdown itself. Rocket.Chat stores the AST alongside each message and its clients render from it.
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
The parser is generated from a [Peggy](https://peggyjs.org/) grammar and has one runtime dependency, [`tldts`](https://github.com/remusao/tldts), used to recognize domain names in bare links.
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
## Installation
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
```sh
|
|
14
|
+
npm install @rocket.chat/message-parser
|
|
15
|
+
```
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
The package ships a single ES module bundle with TypeScript declarations. It runs in browsers and in Node.js (`engines` requires Node.js 22.22.3+ on the 22 line, or 24.15.0+ on the 24 line).
|
|
20
18
|
|
|
21
|
-
##
|
|
19
|
+
## Usage
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
### Parsing a message
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
```ts
|
|
24
|
+
import { parse } from '@rocket.chat/message-parser';
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
const ast = parse('Hello *world*, @john! See #general :smile:');
|
|
27
|
+
```
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
`parse` returns an array of block nodes. Text that is not inside a block becomes a `PARAGRAPH`:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
[
|
|
33
|
+
{
|
|
34
|
+
"type": "PARAGRAPH",
|
|
35
|
+
"value": [
|
|
36
|
+
{ "type": "PLAIN_TEXT", "value": "Hello " },
|
|
37
|
+
{ "type": "BOLD", "value": [{ "type": "PLAIN_TEXT", "value": "world" }] },
|
|
38
|
+
{ "type": "PLAIN_TEXT", "value": ", " },
|
|
39
|
+
{ "type": "MENTION_USER", "value": { "type": "PLAIN_TEXT", "value": "john" } },
|
|
40
|
+
{ "type": "PLAIN_TEXT", "value": "! See " },
|
|
41
|
+
{ "type": "MENTION_CHANNEL", "value": { "type": "PLAIN_TEXT", "value": "general" } },
|
|
42
|
+
{ "type": "PLAIN_TEXT", "value": " " },
|
|
43
|
+
{ "type": "EMOJI", "value": { "type": "PLAIN_TEXT", "value": "smile" }, "shortCode": "smile" }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Every node has a `type` and a `value`; some carry extra fields, such as `level` on `HEADING`, `language` on `CODE` or `status` on `TASK`. A message made of one to three emoji and nothing else parses as a single `BIG_EMOJI` node, so it can be shown larger.
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
### Options
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
```ts
|
|
54
|
+
import { parse } from '@rocket.chat/message-parser';
|
|
55
|
+
|
|
56
|
+
const ast = parse(text, {
|
|
57
|
+
colors: true,
|
|
58
|
+
emoticons: true,
|
|
59
|
+
katex: { dollarSyntax: true, parenthesisSyntax: true },
|
|
60
|
+
customDomains: ['corp.internal'],
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
| Option | Default | Effect |
|
|
65
|
+
| ------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| `colors` | off | Parse `color:#rgb`, `color:#rgba`, `color:#rrggbb` and `color:#rrggbbaa` into `COLOR` nodes |
|
|
67
|
+
| `emoticons` | off | Parse ASCII emoticons such as `:)` and `<3` into `EMOJI` nodes |
|
|
68
|
+
| `katex.dollarSyntax` | off | Parse `$...$` (inline) and `$$...$$` (block) as KaTeX |
|
|
69
|
+
| `katex.parenthesisSyntax` | off | Parse `\(...\)` (inline) and `\[...\]` (block) as KaTeX |
|
|
70
|
+
| `customDomains` | none | Extra domains to autolink in bare links, such as intranet hosts. Public suffixes and `localhost` are always recognized |
|
|
71
|
+
|
|
72
|
+
### Walking the tree
|
|
73
|
+
|
|
74
|
+
`isNodeOfType` narrows an unknown node to a specific type:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { isNodeOfType, parse } from '@rocket.chat/message-parser';
|
|
78
|
+
import type { Inlines } from '@rocket.chat/message-parser';
|
|
79
|
+
|
|
80
|
+
const mentionedUsers = (inlines: Inlines[]): string[] =>
|
|
81
|
+
inlines.flatMap((node) => {
|
|
82
|
+
if (isNodeOfType(node, 'MENTION_USER')) {
|
|
83
|
+
return [node.value.value];
|
|
84
|
+
}
|
|
85
|
+
if (isNodeOfType(node, 'BOLD') || isNodeOfType(node, 'ITALIC') || isNodeOfType(node, 'STRIKE')) {
|
|
86
|
+
return mentionedUsers(node.value as Inlines[]);
|
|
87
|
+
}
|
|
88
|
+
return [];
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const users = parse('hi @alice and *@bob*').flatMap((block) => (isNodeOfType(block, 'PARAGRAPH') ? mentionedUsers(block.value) : []));
|
|
92
|
+
// ['alice', 'bob']
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Fallback ranges
|
|
96
|
+
|
|
97
|
+
`TABLE`, `TIMESTAMP` and `HORIZONTAL_RULE` nodes carry a `fallback` field: the `[start, end]` offsets of the node's source text. A renderer that does not support one of these nodes can show `input.slice(start, end)` instead. Older stored ASTs may have a `PLAIN_TEXT` node there instead of a range.
|
|
98
|
+
|
|
99
|
+
### Supported markup
|
|
100
|
+
|
|
101
|
+
Blocks:
|
|
102
|
+
|
|
103
|
+
| Markup | Example | Node |
|
|
104
|
+
| --------------------------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
|
105
|
+
| Paragraph | any text | `PARAGRAPH` |
|
|
106
|
+
| Heading, levels 1 to 4 | `# Title` … `#### Title` | `HEADING` |
|
|
107
|
+
| Quote | `> quoted` | `QUOTE` |
|
|
108
|
+
| Code block, with optional language | ` ```js ` … ` ``` ` | `CODE` with `CODE_LINE`s |
|
|
109
|
+
| Long code fence (4+ backticks), which may contain ` ``` ` | ` ````md ` … ` ```` ` | `CODE` |
|
|
110
|
+
| Unordered list | `- item` or `* item` | `UNORDERED_LIST` with `LIST_ITEM`s |
|
|
111
|
+
| Ordered list | `1. item` | `ORDERED_LIST` with numbered `LIST_ITEM`s |
|
|
112
|
+
| Task list | `- [x] done` / `- [ ] todo` | `TASKS` with `TASK`s |
|
|
113
|
+
| Nested lists (indented, any mix of the three list kinds) | `- a` then ` - b` | `nested` on `LIST_ITEM` / `TASK` |
|
|
114
|
+
| Table | see [Tables](#tables) | `TABLE` |
|
|
115
|
+
| Horizontal rule (3+ dashes alone on a line) | `---` | `HORIZONTAL_RULE` |
|
|
116
|
+
| Spoiler block | `\|\|` on its own line, text, then `\|\|` | `SPOILER_BLOCK` |
|
|
117
|
+
| KaTeX block (when enabled) | `$$...$$`, `\[...\]` | `KATEX` |
|
|
118
|
+
| Empty line | | `LINE_BREAK` |
|
|
119
|
+
|
|
120
|
+
Inline:
|
|
121
|
+
|
|
122
|
+
| Markup | Example | Node |
|
|
123
|
+
| ----------------------------- | -------------------------------------------------------------- | -------------------------- |
|
|
124
|
+
| Bold | `*bold*`, `**bold**` | `BOLD` |
|
|
125
|
+
| Italic | `_italic_`, `__italic__` | `ITALIC` |
|
|
126
|
+
| Strikethrough | `~strike~`, `~~strike~~` | `STRIKE` |
|
|
127
|
+
| Inline code | `` `code` `` | `INLINE_CODE` |
|
|
128
|
+
| Spoiler | `\|\|hidden\|\|` | `SPOILER` |
|
|
129
|
+
| Link | `[label](https://rocket.chat)`, `<https://rocket.chat\|label>` | `LINK` |
|
|
130
|
+
| Bare URL, email, phone number | `rocket.chat`, `a@b.com`, `+5511999999999` | `LINK` (`mailto:`, `tel:`) |
|
|
131
|
+
| Image | `` | `IMAGE` |
|
|
132
|
+
| User mention | `@john`, `@all`, `@user@server.com` | `MENTION_USER` |
|
|
133
|
+
| Channel mention | `#general` | `MENTION_CHANNEL` |
|
|
134
|
+
| Emoji | `:smile:`, `😀` | `EMOJI` |
|
|
135
|
+
| Emoticon (when enabled) | `:)`, `<3` | `EMOJI` |
|
|
136
|
+
| Timestamp | `<t:1700000000:R>` | `TIMESTAMP` |
|
|
137
|
+
| Color (when enabled) | `color:#ff0000` | `COLOR` |
|
|
138
|
+
| Inline KaTeX (when enabled) | `$x^2$`, `\(x^2\)` | `INLINE_KATEX` |
|
|
139
|
+
|
|
140
|
+
A backslash escapes only these characters: `*`, `_`, `~`, `` ` ``, `#` and `.`. Each backslash escapes a single character, so `\*not bold\*` stays plain text, but strikethrough needs both tildes escaped: `\~\~not struck\~\~`. Two other escapes exist: `\<t:1700000000:R>` keeps a timestamp as plain text, and `\|` escapes a pipe inside a table cell. Before any other character the backslash stays in the text and the markup still applies: `\[link](https://example.com)` renders a backslash followed by a link, and `\@john` a backslash followed by a mention.
|
|
141
|
+
|
|
142
|
+
Bold, italic and strikethrough can be nested inside each other.
|
|
143
|
+
|
|
144
|
+
### Tables
|
|
145
|
+
|
|
146
|
+
GFM-style tables. Every row needs a leading and a trailing pipe. Alignment comes from the delimiter row:
|
|
47
147
|
|
|
48
148
|
| Marker | Alignment |
|
|
49
149
|
| ------ | --------- |
|
|
@@ -55,26 +155,22 @@ Alignment is taken from the delimiter row:
|
|
|
55
155
|
```md
|
|
56
156
|
| Header 1 | Header 2 |
|
|
57
157
|
| -------- | :------: |
|
|
58
|
-
| Cell 1 |
|
|
158
|
+
| Cell 1 | Cell 2 |
|
|
59
159
|
```
|
|
60
160
|
|
|
61
|
-
|
|
62
|
-
inline markup (bold, italic, links, emoji, …).
|
|
63
|
-
|
|
64
|
-
## Timestamps
|
|
65
|
-
|
|
66
|
-
The timestamp tag is a special tag that allows you to convert a Unix timestamp to a human-readable date and time.
|
|
161
|
+
Escape a literal pipe inside a cell as `\|`. Cells can contain inline markup.
|
|
67
162
|
|
|
68
|
-
Timestamps
|
|
163
|
+
### Timestamps
|
|
69
164
|
|
|
70
|
-
|
|
165
|
+
`<t:{time}>` or `<t:{time}:{format}>` renders a date and time in the reader's locale and time zone. It also works inside strikethrough and bold.
|
|
71
166
|
|
|
72
|
-
|
|
167
|
+
`{time}` can be:
|
|
73
168
|
|
|
74
|
-
-
|
|
75
|
-
-
|
|
169
|
+
- a 10-digit Unix timestamp, e.g. `<t:1700000000>`;
|
|
170
|
+
- a date and time in the form `YYYY-MM-DDTHH:MM:SS`, optionally followed by three-digit milliseconds (`.sss`) and a numeric UTC offset (`+HH:MM` or `-HH:MM`), e.g. `<t:2025-07-22T10:00:00.000+00:00>`. Other ISO 8601 forms, such as a `Z` suffix (`<t:2025-07-22T10:00:00Z>`), a `+HHMM` offset or a time without seconds, are not recognized and stay plain text. Without an offset, the time is read in the time zone of the environment that parses the message, so include one;
|
|
171
|
+
- a time of day with a UTC offset, e.g. `<t:10:00+00:00>` or `<t:10:00:05-03:00>`. The date is the current UTC date when the message is parsed, not the local date in that offset: near midnight it can be a day apart, and the same message parsed on another day resolves to that day.
|
|
76
172
|
|
|
77
|
-
|
|
173
|
+
The node stores the time as a Unix timestamp string. `{format}` defaults to `t`:
|
|
78
174
|
|
|
79
175
|
| Format | Description | Example |
|
|
80
176
|
| ------ | ------------------------- | --------------------------------------- |
|
|
@@ -86,20 +182,59 @@ Pattern: <t:{timestamp}:?{format}>
|
|
|
86
182
|
| `F` | Full date and time (long) | Thursday, December 31, 2020 12:00:00 AM |
|
|
87
183
|
| `R` | Relative time | 1 year ago |
|
|
88
184
|
|
|
89
|
-
|
|
185
|
+
Formatting is up to the renderer; the examples show how Rocket.Chat displays them.
|
|
90
186
|
|
|
91
|
-
|
|
187
|
+
### Known limitations
|
|
92
188
|
|
|
93
|
-
|
|
94
|
-
|
|
189
|
+
- A bare URL ends at the first `)`, so `https://en.wikipedia.org/wiki/Lint_(software)` loses its closing parenthesis. Wrap it in a Markdown link to keep it: `[Lint](https://en.wikipedia.org/wiki/Lint_(software))`.
|
|
190
|
+
- Horizontal rules only use `-`. `***` and `___` are left as text, because they collide with emphasis and with censored words.
|
|
191
|
+
- Headings stop at level 4. `##### text` is a paragraph.
|
|
192
|
+
|
|
193
|
+
## API
|
|
194
|
+
|
|
195
|
+
### `parse(input: string, options?: Options): Root`
|
|
196
|
+
|
|
197
|
+
Parses a message. Also exported as `parser`.
|
|
198
|
+
|
|
199
|
+
### `isNodeOfType(value: unknown, type: T): value is Types[T]`
|
|
200
|
+
|
|
201
|
+
Type guard that checks `value.type === type`.
|
|
202
|
+
|
|
203
|
+
### `asciiList: Record<string, string>`
|
|
204
|
+
|
|
205
|
+
The emoticon-to-emoji table used when `emoticons` is on, e.g. `':)'` → `'🙂'`.
|
|
206
|
+
|
|
207
|
+
### Types
|
|
208
|
+
|
|
209
|
+
| Type | Description |
|
|
210
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
211
|
+
| `Root` (alias `MarkdownAST`) | What `parse` returns: `Array<Paragraph \| Blocks>`, or `[BigEmoji]` |
|
|
212
|
+
| `Options` | The options object above |
|
|
213
|
+
| `Blocks` | Union of block nodes |
|
|
214
|
+
| `Inlines` | Union of inline nodes |
|
|
215
|
+
| `ASTNode` | Union of the main node types |
|
|
216
|
+
| `Types` | Map from each `type` string to its node type; `TypesKeys` is its keys |
|
|
217
|
+
| Node types | `Paragraph`, `Heading`, `Quote`, `Code`, `CodeLine`, `OrderedList`, `UnorderedList`, `ListItem`, `NestedList`, `Tasks`, `Task`, `Table`, `TableRow`, `TableCell`, `TableCellAlignment`, `HorizontalRule`, `LineBreak`, `SpoilerBlock`, `KaTeX`, `BigEmoji`, `Plain`, `Bold`, `Italic`, `Strike`, `Markup`, `InlineCode`, `Spoiler`, `Link`, `Image`, `UserMention`, `ChannelMention`, `Emoji`, `Color`, `Timestamp`, `InlineKaTeX`, `SourceRange` |
|
|
218
|
+
|
|
219
|
+
## Development
|
|
220
|
+
|
|
221
|
+
This package lives in the [Rocket.Chat monorepo](https://github.com/RocketChat/Rocket.Chat/tree/develop/packages/message-parser). From the repository root:
|
|
222
|
+
|
|
223
|
+
```sh
|
|
224
|
+
yarn workspace @rocket.chat/message-parser build
|
|
225
|
+
yarn workspace @rocket.chat/message-parser testunit
|
|
226
|
+
yarn workspace @rocket.chat/message-parser lint
|
|
227
|
+
yarn workspace @rocket.chat/message-parser typecheck
|
|
228
|
+
yarn workspace @rocket.chat/message-parser bench
|
|
229
|
+
yarn workspace @rocket.chat/message-parser bench:size
|
|
230
|
+
```
|
|
95
231
|
|
|
96
|
-
|
|
232
|
+
The grammar is [`src/grammar.pegjs`](https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/message-parser/src/grammar.pegjs). `build` bundles it with webpack and [`@rocket.chat/peggy-loader`](https://www.npmjs.com/package/@rocket.chat/peggy-loader) into `dist/messageParser.js`. `bench` runs parser benchmarks; `bench:size` prints the raw and gzipped size of the built bundle.
|
|
97
233
|
|
|
98
|
-
|
|
234
|
+
### Changing the grammar
|
|
99
235
|
|
|
100
|
-
|
|
236
|
+
When you find a grammar bug, start by adding a test case under `tests/` that reproduces it. New markup is welcome as long as it does not change how existing messages parse.
|
|
101
237
|
|
|
102
|
-
##
|
|
238
|
+
## License
|
|
103
239
|
|
|
104
|
-
|
|
105
|
-
- `URL` rule doesn't allow whitespace, `(`, or `)`
|
|
240
|
+
MIT — see [LICENSE](https://github.com/RocketChat/Rocket.Chat/blob/develop/LICENSE).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asciiList.d.ts","sourceRoot":"","sources":["../src/asciiList.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoH5C,CAAC"}
|
package/dist/definitions.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type ListItem = {
|
|
|
14
14
|
type: 'LIST_ITEM';
|
|
15
15
|
value: Inlines[];
|
|
16
16
|
number?: number;
|
|
17
|
+
nested?: NestedList[];
|
|
17
18
|
};
|
|
18
19
|
export type Tasks = {
|
|
19
20
|
type: 'TASKS';
|
|
@@ -23,7 +24,9 @@ export type Task = {
|
|
|
23
24
|
type: 'TASK';
|
|
24
25
|
status: boolean;
|
|
25
26
|
value: Inlines[];
|
|
27
|
+
nested?: NestedList[];
|
|
26
28
|
};
|
|
29
|
+
export type NestedList = OrderedList | UnorderedList | Tasks;
|
|
27
30
|
export type CodeLine = {
|
|
28
31
|
type: 'CODE_LINE';
|
|
29
32
|
value: Plain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../src/definitions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,SAAS,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../src/definitions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,SAAS,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,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,MAAM,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC;AAEpC,MAAM,MAAM,OAAO,GAChB,SAAS,GACT,IAAI,GACJ,OAAO,GACP,KAAK,GACL,MAAM,GACN,MAAM,GACN,UAAU,GACV,KAAK,GACL,IAAI,GACJ,WAAW,GACX,cAAc,GACd,KAAK,GACL,KAAK,GACL,WAAW,CAAC;AAEf,MAAM,MAAM,MAAM,GACjB,IAAI,GAAG,OAAO,GAAG,KAAK,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,KAAK,GAAG,cAAc,GAAG,KAAK,CAAC;AAErI,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,mBAAmB,eAAe,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,OAAO,GAAG;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,UAAU,OAAO,KAAG,IAAqC,CAAC;AAE/F,YAAY,EAAE,IAAI,IAAI,WAAW,EAAE,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,CAAC"}
|
|
1
|
+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