@block-kit/react 1.0.1 → 1.0.3

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.
@@ -3,7 +3,6 @@ import React from "react";
3
3
  export declare const BlockKitContext: React.Context<Editor | null>;
4
4
  export declare const useEditorStatic: () => {
5
5
  editor: Editor;
6
- ref: import("@block-kit/core").Ref;
7
6
  rect: import("@block-kit/core/dist/es/rect").Rect;
8
7
  state: import("@block-kit/core").EditorState;
9
8
  event: import("@block-kit/core").Event;
@@ -12,7 +11,8 @@ export declare const useEditorStatic: () => {
12
11
  plugin: import("@block-kit/core").Plugin;
13
12
  schema: import("@block-kit/core").Schema;
14
13
  logger: import("@block-kit/core").Logger;
15
- collect: import("@block-kit/core").Collect;
14
+ lookup: import("@block-kit/core").Lookup;
15
+ tracer: import("@block-kit/core").Tracer;
16
16
  command: import("@block-kit/core").Command;
17
17
  history: import("@block-kit/core").History;
18
18
  perform: import("@block-kit/core").Perform;
@@ -7,7 +7,6 @@ export const useEditorStatic = () => {
7
7
  }
8
8
  return {
9
9
  editor,
10
- ref: editor.ref,
11
10
  rect: editor.rect,
12
11
  state: editor.state,
13
12
  event: editor.event,
@@ -16,7 +15,8 @@ export const useEditorStatic = () => {
16
15
  plugin: editor.plugin,
17
16
  schema: editor.schema,
18
17
  logger: editor.logger,
19
- collect: editor.collect,
18
+ lookup: editor.lookup,
19
+ tracer: editor.tracer,
20
20
  command: editor.command,
21
21
  history: editor.history,
22
22
  perform: editor.perform,
@@ -6,7 +6,7 @@ import { forwardRef } from "react";
6
6
  * 文本节点
7
7
  * @param props
8
8
  */
9
- export const Text = forwardRef((props, ref) => {
9
+ export const Text = /*#__PURE__*/ forwardRef((props, ref) => {
10
10
  const onRef = (dom) => {
11
11
  // 处理外部引用的 ref
12
12
  if (isFunction(ref)) {
@@ -11,7 +11,7 @@ import { NO_CURSOR } from "../utils/constant";
11
11
  * @param props
12
12
  * @param ref
13
13
  */
14
- export const ZeroSpace = forwardRef((props, ref) => {
14
+ export const ZeroSpace = /*#__PURE__*/ forwardRef((props, ref) => {
15
15
  return (_jsx("span", { ref: ref, [ZERO_SPACE_KEY]: true,
16
16
  [ZERO_VOID_KEY]: props.void,
17
17
  [ZERO_ENTER_KEY]: props.enter,
@@ -3,7 +3,6 @@ import React from "react";
3
3
  export declare const BlockKitContext: React.Context<Editor | null>;
4
4
  export declare const useEditorStatic: () => {
5
5
  editor: Editor;
6
- ref: import("@block-kit/core").Ref;
7
6
  rect: import("@block-kit/core/dist/es/rect").Rect;
8
7
  state: import("@block-kit/core").EditorState;
9
8
  event: import("@block-kit/core").Event;
@@ -12,7 +11,8 @@ export declare const useEditorStatic: () => {
12
11
  plugin: import("@block-kit/core").Plugin;
13
12
  schema: import("@block-kit/core").Schema;
14
13
  logger: import("@block-kit/core").Logger;
15
- collect: import("@block-kit/core").Collect;
14
+ lookup: import("@block-kit/core").Lookup;
15
+ tracer: import("@block-kit/core").Tracer;
16
16
  command: import("@block-kit/core").Command;
17
17
  history: import("@block-kit/core").History;
18
18
  perform: import("@block-kit/core").Perform;
@@ -33,7 +33,6 @@ const useEditorStatic = () => {
33
33
  }
34
34
  return {
35
35
  editor,
36
- ref: editor.ref,
37
36
  rect: editor.rect,
38
37
  state: editor.state,
39
38
  event: editor.event,
@@ -42,7 +41,8 @@ const useEditorStatic = () => {
42
41
  plugin: editor.plugin,
43
42
  schema: editor.schema,
44
43
  logger: editor.logger,
45
- collect: editor.collect,
44
+ lookup: editor.lookup,
45
+ tracer: editor.tracer,
46
46
  command: editor.command,
47
47
  history: editor.history,
48
48
  perform: editor.perform,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@block-kit/react",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/es/index.d.ts",
@@ -27,9 +27,9 @@
27
27
  "react-dom": ">=16"
28
28
  },
29
29
  "dependencies": {
30
- "@block-kit/core": "1.0.1",
31
- "@block-kit/delta": "1.0.1",
32
- "@block-kit/utils": "1.0.1"
30
+ "@block-kit/core": "1.0.3",
31
+ "@block-kit/delta": "1.0.3",
32
+ "@block-kit/utils": "1.0.3"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/react": "17.0.2",