@doist/typist 1.1.2 → 1.2.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [1.2.1](https://github.com/Doist/typist/compare/v1.2.0...v1.2.1) (2023-04-01)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **deps:** update tiptap packages to v2.0.0-rc.1 ([#192](https://github.com/Doist/typist/issues/192)) ([26d090a](https://github.com/Doist/typist/commit/26d090a8a0c93a0795f0714392129aacc30c72b6))
6
+
7
+ ## [1.2.0](https://github.com/Doist/typist/compare/v1.1.2...v1.2.0) (2023-03-17)
8
+
9
+ ### Features
10
+
11
+ - **serializers:** Add `get*` functions for reusable singular instances ([#88](https://github.com/Doist/typist/issues/88)) ([b2c77c3](https://github.com/Doist/typist/commit/b2c77c30b15cd3dd676fc01531ecbeb5a6f7b952))
12
+
1
13
  ## [1.1.2](https://github.com/Doist/typist/compare/v1.1.1...v1.1.2) (2023-03-06)
2
14
 
3
15
  ### Bug Fixes
@@ -1 +1 @@
1
- {"version":3,"file":"typist-editor.d.ts","sourceRoot":"","sources":["../../src/components/typist-editor.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAqB,wBAAwB,EAAE,MAAM,wCAAwC,CAAA;AAMpG,OAAO,EAAE,2BAA2B,EAA2B,MAAM,wBAAwB,CAAA;AAE7F,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAClF,OAAO,KAAK,EAAU,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE1D;;;GAGG;AACH,KAAK,eAAe,GAAG;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,UAAU,CAAA;IAE3B;;OAEG;IACH,WAAW,EAAE,MAAM,MAAM,CAAA;IAEzB;;OAEG;IACH,2BAA2B,EAAE,CACzB,QAAQ,EAAE,MAAM,KACf,UAAU,CA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AAC,CAAA;CACpD,CAAA;AAED;;;GAGG;AACH,QAAA,MAAM,YAAY,+GAgNhB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,YAAY,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,GACd,CAAA"}
@@ -7,8 +7,8 @@ import { ExtraEditorCommands } from '../extensions/core/extra-editor-commands/ex
7
7
  import { ViewEventHandlers } from '../extensions/core/view-event-handlers';
8
8
  import { isMultilineDocument, isPlainTextDocument } from '../helpers/schema';
9
9
  import { useEditor } from '../hooks/use-editor';
10
- import { createHTMLSerializer } from '../serializers/html/html';
11
- import { createMarkdownSerializer } from '../serializers/markdown/markdown';
10
+ import { getHTMLSerializerInstance } from '../serializers/html/html';
11
+ import { getMarkdownSerializerInstance } from '../serializers/markdown/markdown';
12
12
  import { getAllNodesAttributesByType, resolveContentSelection } from './typist-editor.helper';
13
13
  /**
14
14
  * The `TypistEditor` component represents a plain-text or a rich-text editing control, built on
@@ -17,7 +17,6 @@ import { getAllNodesAttributesByType, resolveContentSelection } from './typist-e
17
17
  const TypistEditor = forwardRef(function TypistEditor({ autoFocus, className, content = '', contentSelection, editable = true, extensions, placeholder, onBeforeCreate, onCreate, onUpdate, onSelectionUpdate, onTransaction, onFocus, onBlur, onDestroy, 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, onClick, onKeyDown, }, ref) {
18
18
  const allExtensions = useMemo(function initializeExtensions() {
19
19
  return [
20
- // Custom core extensions
21
20
  ...(placeholder
22
21
  ? [
23
22
  Placeholder.configure({
@@ -39,10 +38,10 @@ const TypistEditor = forwardRef(function TypistEditor({ autoFocus, className, co
39
38
  return getSchema(allExtensions);
40
39
  }, [allExtensions]);
41
40
  const htmlSerializer = useMemo(function initializeHTMLSerializer() {
42
- return createHTMLSerializer(schema);
41
+ return getHTMLSerializerInstance(schema);
43
42
  }, [schema]);
44
43
  const markdownSerializer = useMemo(function initializeMarkdownSerializer() {
45
- return createMarkdownSerializer(schema);
44
+ return getMarkdownSerializerInstance(schema);
46
45
  }, [schema]);
47
46
  const htmlContent = useMemo(function generateHTMLContent() {
48
47
  return htmlSerializer.serialize(content);
@@ -1,6 +1,6 @@
1
1
  import { DOMParser } from 'prosemirror-model';
2
2
  import { parseHtmlToElement } from '../../../../helpers/dom';
3
- import { createHTMLSerializer } from '../../../../serializers/html/html';
3
+ import { getHTMLSerializerInstance } from '../../../../serializers/html/html';
4
4
  /**
5
5
  * Inserts the provided Markdown as HTML into the editor.
6
6
  *
@@ -12,7 +12,7 @@ function insertMarkdownContent(markdown, parseOptions) {
12
12
  // Check if the transaction should be dispatched
13
13
  // ref: https://tiptap.dev/api/commands#dry-run-for-commands
14
14
  if (dispatch) {
15
- const htmlContent = createHTMLSerializer(editor.schema).serialize(markdown);
15
+ const htmlContent = getHTMLSerializerInstance(editor.schema).serialize(markdown);
16
16
  // Inserts the HTML content into the editor while preserving the current selection
17
17
  tr.replaceSelection(DOMParser.fromSchema(editor.schema).parseSlice(parseHtmlToElement(htmlContent), parseOptions));
18
18
  }
@@ -1,5 +1,5 @@
1
1
  import { Extension, getHTMLFromFragment } from '@tiptap/core';
2
- import { createMarkdownSerializer } from '../../serializers/markdown/markdown';
2
+ import { getMarkdownSerializerInstance } from '../../serializers/markdown/markdown';
3
3
  /**
4
4
  * The `CopyMarkdownSource` extension adds the ability to copy the editor underlying Markdown
5
5
  * source, and write it to the system clipboard. This extension has full support for both the
@@ -18,7 +18,7 @@ const CopyMarkdownSource = Extension.create({
18
18
  // Get a fragment of the editor's content based on the selection
19
19
  const nodeSelection = editor.state.doc.cut(editor.state.selection.from, editor.state.selection.to);
20
20
  // Serialize the selected content HTML to Markdown
21
- const markdownContent = createMarkdownSerializer(editor.schema).serialize(getHTMLFromFragment(nodeSelection.content, editor.schema));
21
+ const markdownContent = getMarkdownSerializerInstance(editor.schema).serialize(getHTMLFromFragment(nodeSelection.content, editor.schema));
22
22
  // Writes the selected Markdown content to the system clipboard
23
23
  navigator?.clipboard
24
24
  ?.writeText(markdownContent)
@@ -15,5 +15,13 @@ declare function isMultilineDocument(schema: Schema): boolean;
15
15
  * @returns True if the schema contains a plain-text document, false otherwise.
16
16
  */
17
17
  declare function isPlainTextDocument(schema: Schema): boolean;
18
- export { isMultilineDocument, isPlainTextDocument };
18
+ /**
19
+ * Computes a string ID that identifies a given editor schema which can be used for object mapping.
20
+ *
21
+ * @param schema The current editor document schema.
22
+ *
23
+ * @returns A string ID matching the editor schema.
24
+ */
25
+ declare function computeSchemaId(schema: Schema): string;
26
+ export { computeSchemaId, isMultilineDocument, isPlainTextDocument };
19
27
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/helpers/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/helpers/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;GAMG;AACH,iBAAS,eAAe,CAAC,MAAM,EAAE,MAAM,UAEtC;AAED,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA"}
@@ -18,4 +18,14 @@ function isMultilineDocument(schema) {
18
18
  function isPlainTextDocument(schema) {
19
19
  return Boolean(schema.topNodeType.spec.content?.startsWith('paragraph'));
20
20
  }
21
- export { isMultilineDocument, isPlainTextDocument };
21
+ /**
22
+ * Computes a string ID that identifies a given editor schema which can be used for object mapping.
23
+ *
24
+ * @param schema The current editor document schema.
25
+ *
26
+ * @returns A string ID matching the editor schema.
27
+ */
28
+ function computeSchemaId(schema) {
29
+ return [...Object.keys(schema.marks), ...Object.keys(schema.nodes)].join();
30
+ }
31
+ export { computeSchemaId, isMultilineDocument, isPlainTextDocument };
package/dist/index.d.ts CHANGED
@@ -9,8 +9,8 @@ export { RichTextKit } from './extensions/rich-text/rich-text-kit';
9
9
  export type { SuggestionExtensionResult, SuggestionOptions, SuggestionRendererProps, SuggestionRendererRef, SuggestionStorage, } from './factories/create-suggestion-extension';
10
10
  export { createSuggestionExtension } from './factories/create-suggestion-extension';
11
11
  export { isMultilineDocument, isPlainTextDocument } from './helpers/schema';
12
- export { createHTMLSerializer } from './serializers/html/html';
13
- export { createMarkdownSerializer } from './serializers/markdown/markdown';
12
+ export { createHTMLSerializer, getHTMLSerializerInstance } from './serializers/html/html';
13
+ export { createMarkdownSerializer, getMarkdownSerializerInstance, } from './serializers/markdown/markdown';
14
14
  export { canInsertNodeAt } from './utilities/can-insert-node-at';
15
15
  export { canInsertSuggestion } from './utilities/can-insert-suggestion';
16
16
  export type { AnyConfig, Editor as CoreEditor, EditorEvents, MarkRange, Range } from '@tiptap/core';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,GACd,M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AE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC9D,YAAY,EACR,sBAAsB,EACtB,iBAAiB,IAAI,uBAAuB,GAC/C,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
package/dist/index.js CHANGED
@@ -6,8 +6,8 @@ export { PlainTextKit } from './extensions/plain-text/plain-text-kit';
6
6
  export { RichTextKit } from './extensions/rich-text/rich-text-kit';
7
7
  export { createSuggestionExtension } from './factories/create-suggestion-extension';
8
8
  export { isMultilineDocument, isPlainTextDocument } from './helpers/schema';
9
- export { createHTMLSerializer } from './serializers/html/html';
10
- export { createMarkdownSerializer } from './serializers/markdown/markdown';
9
+ export { createHTMLSerializer, getHTMLSerializerInstance } from './serializers/html/html';
10
+ export { createMarkdownSerializer, getMarkdownSerializerInstance, } from './serializers/markdown/markdown';
11
11
  export { canInsertNodeAt } from './utilities/can-insert-node-at';
12
12
  export { canInsertSuggestion } from './utilities/can-insert-suggestion';
13
13
  export { combineTransactionSteps, defaultBlockAt, findChildren, findChildrenInRange, findParentNode, findParentNodeClosestToPos, generateHTML, generateJSON, generateText, getAttributes, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarksBetween, getMarkType, getNodeAttributes, getNodeType, getSchema, getText, getTextBetween, isActive, isList, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isTextSelection, mergeAttributes, posToDOMRect, } from '@tiptap/core';
@@ -29,6 +29,14 @@ declare const INITIAL_MARKED_OPTIONS: marked.MarkedOptions;
29
29
  * @returns A normalized object for the HTML serializer.
30
30
  */
31
31
  declare function createHTMLSerializer(schema: Schema): HTMLSerializerReturnType;
32
- export { createHTMLSerializer, INITIAL_MARKED_OPTIONS };
32
+ /**
33
+ * Returns a singleton instance of a HTML serializer based on the provided editor schema.
34
+ *
35
+ * @param schema The editor schema connected to the HTML serializer instance.
36
+ *
37
+ * @returns The HTML serializer instance for the given editor schema.
38
+ */
39
+ declare function getHTMLSerializerInstance(schema: Schema): HTMLSerializerReturnType;
40
+ export { createHTMLSerializer, getHTMLSerializerInstance, INITIAL_MARKED_OPTIONS };
33
41
  export type { HTMLSerializerReturnType };
34
42
  //# sourceMappingURL=html.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/serializers/html/html.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAc/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;GAEG;AACH,KAAK,wBAAwB,GAAG;IAC5B;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;CAC1C,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,aAMpC,CAAA;AAmCD;;;;;;;;GAQG;AACH,iBAAS,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,CAiDtE;AAED,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,CAAA;AAEvD,YAAY,EAAE,wBAAwB,EAAE,CAAA"}
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../src/serializers/html/html.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAc/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;GAEG;AACH,KAAK,wBAAwB,GAAG;IAC5B;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;CAC1C,CAAA;AASD;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,aAMpC,CAAA;AAmCD;;;;;;;;GAQG;AACH,iBAAS,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,CAiDtE;AAOD;;;;;;GAMG;AACH,iBAAS,yBAAyB,CAAC,MAAM,EAAE,MAAM,4BAQhD;AAED,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,CAAA;AAElF,YAAY,EAAE,wBAAwB,EAAE,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { escape, kebabCase } from 'lodash-es';
2
2
  import { marked } from 'marked';
3
3
  import { REGEX_LINE_BREAKS } from '../../constants/regular-expressions';
4
- import { isPlainTextDocument } from '../../helpers/schema';
4
+ import { computeSchemaId, isPlainTextDocument } from '../../helpers/schema';
5
5
  import { buildSuggestionSchemaPartialRegex } from '../../helpers/serializer';
6
6
  import { checkbox } from './extensions/checkbox';
7
7
  import { code } from './extensions/code';
@@ -94,4 +94,22 @@ function createHTMLSerializer(schema) {
94
94
  },
95
95
  };
96
96
  }
97
- export { createHTMLSerializer, INITIAL_MARKED_OPTIONS };
97
+ /**
98
+ * Object that holds multiple HTML serializer instances based on a given ID.
99
+ */
100
+ const htmlSerializerInstanceById = {};
101
+ /**
102
+ * Returns a singleton instance of a HTML serializer based on the provided editor schema.
103
+ *
104
+ * @param schema The editor schema connected to the HTML serializer instance.
105
+ *
106
+ * @returns The HTML serializer instance for the given editor schema.
107
+ */
108
+ function getHTMLSerializerInstance(schema) {
109
+ const id = computeSchemaId(schema);
110
+ if (!htmlSerializerInstanceById[id]) {
111
+ htmlSerializerInstanceById[id] = createHTMLSerializer(schema);
112
+ }
113
+ return htmlSerializerInstanceById[id];
114
+ }
115
+ export { createHTMLSerializer, getHTMLSerializerInstance, INITIAL_MARKED_OPTIONS };
@@ -30,6 +30,14 @@ declare const BULLET_LIST_MARKER = "-";
30
30
  * @returns A normalized object for the Markdown serializer.
31
31
  */
32
32
  declare function createMarkdownSerializer(schema: Schema): MarkdownSerializerReturnType;
33
- export { BULLET_LIST_MARKER, createMarkdownSerializer };
33
+ /**
34
+ * Returns a singleton instance of a Markdown serializer based on the provided editor schema.
35
+ *
36
+ * @param schema The editor schema connected to the Markdown serializer instance.
37
+ *
38
+ * @returns The Markdown serializer instance for the given editor schema.
39
+ */
40
+ declare function getMarkdownSerializerInstance(schema: Schema): MarkdownSerializerReturnType;
41
+ export { BULLET_LIST_MARKER, createMarkdownSerializer, getMarkdownSerializerInstance };
34
42
  export type { MarkdownSerializerReturnType };
35
43
  //# sourceMappingURL=markdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/serializers/markdown/markdown.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;GAEG;AACH,KAAK,4BAA4B,GAAG;IAChC;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACtC,CAAA;AAED;;GAEG;AACH,QAAA,MAAM,kBAAkB,MAAM,CAAA;AA8C9B;;;;;;;;;;;;GAYG;AACH,iBAAS,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,4BAA4B,CAiG9E;AAED,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,CAAA;AAEvD,YAAY,EAAE,4BAA4B,EAAE,CAAA"}
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/serializers/markdown/markdown.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;GAEG;AACH,KAAK,4BAA4B,GAAG;IAChC;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACtC,CAAA;AASD;;GAEG;AACH,QAAA,MAAM,kBAAkB,MAAM,CAAA;AA8C9B;;;;;;;;;;;;GAYG;AACH,iBAAS,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,4BAA4B,CAiG9E;AAOD;;;;;;GAMG;AACH,iBAAS,6BAA6B,CAAC,MAAM,EAAE,MAAM,gCAQpD;AAED,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,CAAA;AAEtF,YAAY,EAAE,4BAA4B,EAAE,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import Turndown from 'turndown';
2
2
  import { REGEX_PUNCTUATION } from '../../constants/regular-expressions';
3
- import { isPlainTextDocument } from '../../helpers/schema';
3
+ import { computeSchemaId, isPlainTextDocument } from '../../helpers/schema';
4
4
  import { image } from './plugins/image';
5
5
  import { listItem } from './plugins/list-item';
6
6
  import { paragraph } from './plugins/paragraph';
@@ -145,4 +145,22 @@ function createMarkdownSerializer(schema) {
145
145
  },
146
146
  };
147
147
  }
148
- export { BULLET_LIST_MARKER, createMarkdownSerializer };
148
+ /**
149
+ * Object that holds multiple Markdown serializer instances based on a given ID.
150
+ */
151
+ const markdownSerializerInstanceById = {};
152
+ /**
153
+ * Returns a singleton instance of a Markdown serializer based on the provided editor schema.
154
+ *
155
+ * @param schema The editor schema connected to the Markdown serializer instance.
156
+ *
157
+ * @returns The Markdown serializer instance for the given editor schema.
158
+ */
159
+ function getMarkdownSerializerInstance(schema) {
160
+ const id = computeSchemaId(schema);
161
+ if (!markdownSerializerInstanceById[id]) {
162
+ markdownSerializerInstanceById[id] = createMarkdownSerializer(schema);
163
+ }
164
+ return markdownSerializerInstanceById[id];
165
+ }
166
+ export { BULLET_LIST_MARKER, createMarkdownSerializer, getMarkdownSerializerInstance };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@doist/typist",
3
3
  "description": "The mighty Tiptap-based rich-text editor React component that powers Doist products.",
4
- "version": "1.1.2",
4
+ "version": "1.2.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://typist.doist.dev/",
7
7
  "repository": "https://github.com/Doist/typist",
@@ -36,8 +36,8 @@
36
36
  "prepare": "is-ci || husky install",
37
37
  "prettier:check": "prettier --check \"./**/*.{js,jsx,ts,tsx,json,css,yml,md}\"",
38
38
  "prettier:format": "prettier --write \"./**/*.{js,jsx,ts,tsx,json,css,yml,md}\"",
39
- "storybook:build": "build-storybook",
40
- "storybook:start": "start-storybook --port 6006 --no-manager-cache --ci",
39
+ "storybook:build": "storybook build",
40
+ "storybook:start": "storybook dev --port 6006 --ci",
41
41
  "test": "jest",
42
42
  "test:watch": "jest --watch",
43
43
  "typescript:check": "tsc --project tsconfig.json",
@@ -46,58 +46,59 @@
46
46
  "validate:pre-push": "run-s test"
47
47
  },
48
48
  "dependencies": {
49
- "@tiptap/core": "2.0.0-beta.220",
50
- "@tiptap/extension-blockquote": "2.0.0-beta.220",
51
- "@tiptap/extension-bold": "2.0.0-beta.220",
52
- "@tiptap/extension-bullet-list": "2.0.0-beta.220",
53
- "@tiptap/extension-character-count": "2.0.0-beta.220",
54
- "@tiptap/extension-code": "2.0.0-beta.220",
55
- "@tiptap/extension-code-block": "2.0.0-beta.220",
56
- "@tiptap/extension-document": "2.0.0-beta.220",
57
- "@tiptap/extension-dropcursor": "2.0.0-beta.220",
58
- "@tiptap/extension-gapcursor": "2.0.0-beta.220",
59
- "@tiptap/extension-hard-break": "2.0.0-beta.220",
60
- "@tiptap/extension-heading": "2.0.0-beta.220",
61
- "@tiptap/extension-history": "2.0.0-beta.220",
62
- "@tiptap/extension-horizontal-rule": "2.0.0-beta.220",
63
- "@tiptap/extension-image": "2.0.0-beta.220",
64
- "@tiptap/extension-italic": "2.0.0-beta.220",
65
- "@tiptap/extension-link": "2.0.0-beta.220",
66
- "@tiptap/extension-list-item": "2.0.0-beta.220",
67
- "@tiptap/extension-ordered-list": "2.0.0-beta.220",
68
- "@tiptap/extension-paragraph": "2.0.0-beta.220",
69
- "@tiptap/extension-placeholder": "2.0.0-beta.220",
70
- "@tiptap/extension-strike": "2.0.0-beta.220",
71
- "@tiptap/extension-task-item": "2.0.0-beta.220",
72
- "@tiptap/extension-task-list": "2.0.0-beta.220",
73
- "@tiptap/extension-text": "2.0.0-beta.220",
74
- "@tiptap/extension-typography": "2.0.0-beta.220",
75
- "@tiptap/pm": "2.0.0-beta.220",
76
- "@tiptap/react": "2.0.0-beta.220",
77
- "@tiptap/suggestion": "2.0.0-beta.220",
49
+ "@tiptap/core": "2.0.0-rc.1",
50
+ "@tiptap/extension-blockquote": "2.0.0-rc.1",
51
+ "@tiptap/extension-bold": "2.0.0-rc.1",
52
+ "@tiptap/extension-bullet-list": "2.0.0-rc.1",
53
+ "@tiptap/extension-character-count": "2.0.0-rc.1",
54
+ "@tiptap/extension-code": "2.0.0-rc.1",
55
+ "@tiptap/extension-code-block": "2.0.0-rc.1",
56
+ "@tiptap/extension-document": "2.0.0-rc.1",
57
+ "@tiptap/extension-dropcursor": "2.0.0-rc.1",
58
+ "@tiptap/extension-gapcursor": "2.0.0-rc.1",
59
+ "@tiptap/extension-hard-break": "2.0.0-rc.1",
60
+ "@tiptap/extension-heading": "2.0.0-rc.1",
61
+ "@tiptap/extension-history": "2.0.0-rc.1",
62
+ "@tiptap/extension-horizontal-rule": "2.0.0-rc.1",
63
+ "@tiptap/extension-image": "2.0.0-rc.1",
64
+ "@tiptap/extension-italic": "2.0.0-rc.1",
65
+ "@tiptap/extension-link": "2.0.0-rc.1",
66
+ "@tiptap/extension-list-item": "2.0.0-rc.1",
67
+ "@tiptap/extension-ordered-list": "2.0.0-rc.1",
68
+ "@tiptap/extension-paragraph": "2.0.0-rc.1",
69
+ "@tiptap/extension-placeholder": "2.0.0-rc.1",
70
+ "@tiptap/extension-strike": "2.0.0-rc.1",
71
+ "@tiptap/extension-task-item": "2.0.0-rc.1",
72
+ "@tiptap/extension-task-list": "2.0.0-rc.1",
73
+ "@tiptap/extension-text": "2.0.0-rc.1",
74
+ "@tiptap/extension-typography": "2.0.0-rc.1",
75
+ "@tiptap/pm": "2.0.0-rc.1",
76
+ "@tiptap/react": "2.0.0-rc.1",
77
+ "@tiptap/suggestion": "2.0.0-rc.1",
78
78
  "prosemirror-codemark": "0.4.2"
79
79
  },
80
80
  "devDependencies": {
81
- "@doist/eslint-config": "8.1.3",
81
+ "@doist/eslint-config": "8.1.4",
82
82
  "@doist/prettier-config": "3.0.5",
83
- "@doist/reactist": "17.10.1",
83
+ "@doist/reactist": "20.1.0",
84
84
  "@mdx-js/react": "2.3.0",
85
- "@semantic-release/changelog": "6.0.2",
85
+ "@semantic-release/changelog": "6.0.3",
86
86
  "@semantic-release/exec": "6.0.3",
87
87
  "@semantic-release/git": "10.0.1",
88
- "@storybook/addon-a11y": "6.5.16",
89
- "@storybook/addon-essentials": "6.5.16",
90
- "@storybook/addons": "6.5.16",
91
- "@storybook/builder-vite": "0.2.7",
92
- "@storybook/mdx2-csf": "0.0.3",
93
- "@storybook/react": "6.5.16",
94
- "@testing-library/dom": "8.20.0",
88
+ "@storybook/addon-a11y": "7.0.0-rc.8",
89
+ "@storybook/addon-essentials": "7.0.0-rc.8",
90
+ "@storybook/addons": "7.0.0-rc.8",
91
+ "@storybook/csf": "0.0.2-next.10",
92
+ "@storybook/mdx2-csf": "1.0.0-next.6",
93
+ "@storybook/react": "7.0.0-rc.8",
94
+ "@storybook/react-vite": "7.0.0-rc.8",
95
+ "@testing-library/dom": "9.2.0",
95
96
  "@testing-library/jest-dom": "5.16.5",
96
- "@testing-library/react": "13.4.0",
97
- "@types/jest": "29.4.0",
98
- "@types/lodash-es": "4.17.6",
97
+ "@testing-library/react": "14.0.0",
98
+ "@types/jest": "29.5.0",
99
+ "@types/lodash-es": "4.17.7",
99
100
  "@types/marked": "4.0.8",
100
- "@types/react": "18.0.28",
101
+ "@types/react": "18.0.29",
101
102
  "@types/react-dom": "18.0.11",
102
103
  "@types/react-syntax-highlighter": "15.5.6",
103
104
  "@types/turndown": "5.0.1",
@@ -105,34 +106,38 @@
105
106
  "classnames": "2.3.2",
106
107
  "conventional-changelog-conventionalcommits": "5.0.0",
107
108
  "emoji-regex": "10.2.1",
108
- "eslint": "8.35.0",
109
+ "eslint": "8.36.0",
109
110
  "eslint-formatter-codeframe": "7.32.1",
110
111
  "eslint-import-resolver-typescript": "3.5.3",
111
112
  "eslint-plugin-jest": "27.2.1",
112
- "eslint-plugin-simple-import-sort": "8.0.0",
113
- "eslint-plugin-unicorn": "45.0.2",
113
+ "eslint-plugin-simple-import-sort": "10.0.0",
114
+ "eslint-plugin-storybook": "0.6.11",
115
+ "eslint-plugin-unicorn": "46.0.0",
114
116
  "github-markdown-css": "5.2.0",
115
117
  "husky": "8.0.3",
116
118
  "ignore-sync": "6.0.2",
117
119
  "is-ci": "3.0.1",
118
- "jest": "29.4.3",
119
- "jest-environment-jsdom": "29.4.3",
120
- "lint-staged": "13.1.2",
120
+ "jest": "29.5.0",
121
+ "jest-environment-jsdom": "29.5.0",
122
+ "lint-staged": "13.2.0",
121
123
  "npm-run-all": "4.1.5",
122
- "prettier": "2.8.4",
123
- "react-icons": "4.7.1",
124
- "react-markdown": "8.0.5",
124
+ "prettier": "2.8.7",
125
+ "react": "18.2.0",
126
+ "react-dom": "18.2.0",
127
+ "react-icons": "4.8.0",
128
+ "react-markdown": "8.0.6",
125
129
  "react-syntax-highlighter": "15.5.0",
126
130
  "rehype-raw": "6.1.1",
127
131
  "remark-gfm": "3.0.1",
128
- "rimraf": "3.0.2",
129
- "semantic-release": "19.0.5",
132
+ "rimraf": "4.4.1",
133
+ "semantic-release": "21.0.0",
134
+ "storybook": "7.0.0-rc.8",
130
135
  "storybook-css-modules": "1.0.8",
131
136
  "ts-jest": "29.0.5",
132
137
  "ts-node": "10.9.1",
133
- "type-fest": "3.6.1",
134
- "typescript": "4.9.5",
135
- "typescript-plugin-css-modules": "4.2.2"
138
+ "type-fest": "3.7.1",
139
+ "typescript": "5.0.2",
140
+ "typescript-plugin-css-modules": "4.2.3"
136
141
  },
137
142
  "peerDependencies": {
138
143
  "@react-hookz/web": "^14.2.3 || >=15.x",