@mtcute/markdown-parser 0.17.0 → 0.18.0-rc.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/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
2
2
  globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
3
- console.warn("[@mtcute/markdown-parser] CommonJS support is deprecated and will be removed soon. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
4
- console.warn("[@mtcute/markdown-parser] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
3
+ console.warn("[mtcute-workspace] CommonJS support is deprecated and will be removed in 0.20.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
4
+ console.warn("[mtcute-workspace] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
5
5
  }
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { default as Long } from 'long';
2
1
  import { InputText, MessageEntity, TextWithEntities } from '@mtcute/core';
2
+ import { default as Long } from 'long';
3
3
  /**
4
4
  * Escape a string to be safely used in Markdown.
5
5
  *
package/package.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "@mtcute/markdown-parser",
3
3
  "type": "module",
4
- "version": "0.17.0",
4
+ "version": "0.18.0-rc.5",
5
5
  "description": "Markdown entities parser for mtcute",
6
- "author": "alina sireneva <alina@tei.su>",
7
6
  "license": "MIT",
8
- "sideEffects": false,
7
+ "homepage": "https://mtcute.dev",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/mtcute/mtcute.git"
11
+ },
12
+ "scripts": {},
13
+ "dependencies": {
14
+ "@mtcute/core": "0.18.0-rc.5",
15
+ "long": "5.2.3"
16
+ },
9
17
  "exports": {
10
18
  ".": {
11
19
  "import": {
@@ -18,14 +26,6 @@
18
26
  }
19
27
  }
20
28
  },
21
- "scripts": {},
22
- "dependencies": {
23
- "@mtcute/core": "^0.17.0",
24
- "long": "5.2.3"
25
- },
26
- "homepage": "https://mtcute.dev",
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/mtcute/mtcute"
30
- }
29
+ "author": "alina sireneva <alina@tei.su>",
30
+ "sideEffects": false
31
31
  }
package/index.d.cts DELETED
@@ -1,47 +0,0 @@
1
- import { default as Long } from 'long';
2
- import { InputText, MessageEntity, TextWithEntities } from '@mtcute/core';
3
- /**
4
- * Escape a string to be safely used in Markdown.
5
- *
6
- * > **Note**: this function is in most cases not needed, as `md` function
7
- * > handles all `string`s passed to it automatically as plain text.
8
- */
9
- declare function escape(str: string): string;
10
- /**
11
- * Add Markdown formatting to the text given the plain text and entities contained in it.
12
- */
13
- declare function unparse(input: InputText): string;
14
- export declare const md: {
15
- /**
16
- * Tagged template based Markdown-to-entities parser function
17
- *
18
- * Additionally, `md` function has two static methods:
19
- * - `md.escape` - escape a string to be safely used in Markdown
20
- * (should not be needed in most cases, as `md` function itself handles all `string`s
21
- * passed to it automatically as plain text)
22
- * - `md.unparse` - add Markdown formatting to the text given the plain text and entities contained in it
23
- *
24
- * @example
25
- * ```typescript
26
- * const text = md`**${user.displayName}**`
27
- * ```
28
- */
29
- (strings: TemplateStringsArray, ...sub: (InputText | MessageEntity | Long | boolean | number | undefined | null)[]): TextWithEntities;
30
- /**
31
- * A variant taking a plain JS string as input
32
- * and parsing it.
33
- *
34
- * Useful for cases when you already have a string
35
- * (e.g. from some server) and want to parse it.
36
- *
37
- * @example
38
- * ```typescript
39
- * const string = '**hello**'
40
- * const text = md(string)
41
- * ```
42
- */
43
- (string: string): TextWithEntities;
44
- escape: typeof escape;
45
- unparse: typeof unparse;
46
- };
47
- export {};