@contentful/field-editor-rich-text 3.1.12 → 3.2.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.
@@ -0,0 +1,11 @@
1
+ import { MARKS } from '@contentful/rich-text-types';
2
+ import * as Slate from 'slate-react';
3
+ import { RichTextPlugin } from '../../types';
4
+ export declare const ToolbarSubscriptButton: {
5
+ ({ isDisabled }: {
6
+ isDisabled?: boolean | undefined;
7
+ }): JSX.Element | null;
8
+ displayName: MARKS;
9
+ };
10
+ export declare function Subscript(props: Slate.RenderLeafProps): JSX.Element;
11
+ export declare const createSubscriptPlugin: () => RichTextPlugin;
@@ -0,0 +1,11 @@
1
+ import { MARKS } from '@contentful/rich-text-types';
2
+ import * as Slate from 'slate-react';
3
+ import { RichTextPlugin } from '../../types';
4
+ export declare const ToolbarSuperscriptButton: {
5
+ ({ isDisabled }: {
6
+ isDisabled?: boolean | undefined;
7
+ }): JSX.Element | null;
8
+ displayName: MARKS;
9
+ };
10
+ export declare function Superscript(props: Slate.RenderLeafProps): JSX.Element;
11
+ export declare const createSuperscriptPlugin: () => RichTextPlugin;
@@ -1,4 +1,6 @@
1
1
  import { MARKS } from '@contentful/rich-text-types';
2
2
  import { HotkeyPlugin, KeyboardHandler } from '@udecode/plate-core';
3
+ import type { PlateEditor } from '@udecode/plate-core';
3
4
  import { RichTextEditor } from '../../types';
5
+ export declare const toggleMarkAndDeactivateConflictingMarks: (editor: PlateEditor<RichTextEditor>, mark: MARKS) => void;
4
6
  export declare const buildMarkEventHandler: (type: MARKS) => KeyboardHandler<RichTextEditor, HotkeyPlugin>;
package/dist/types.d.ts CHANGED
@@ -10,6 +10,8 @@ export declare type CustomText = {
10
10
  [MARKS.CODE]?: boolean;
11
11
  [MARKS.ITALIC]?: boolean;
12
12
  [MARKS.UNDERLINE]?: boolean;
13
+ [MARKS.SUPERSCRIPT]?: boolean;
14
+ [MARKS.SUBSCRIPT]?: boolean;
13
15
  };
14
16
  export declare type TextOrCustomElement = CustomElement | CustomText;
15
17
  export declare type CustomElement<T = unknown> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-rich-text",
3
- "version": "3.1.12",
3
+ "version": "3.2.0",
4
4
  "source": "./src/index.tsx",
5
5
  "main": "./dist/index.js",
6
6
  "module": "dist/field-editor-rich-text.esm.js",
@@ -33,7 +33,7 @@
33
33
  "@contentful/field-editor-reference": "^5.5.2",
34
34
  "@contentful/field-editor-shared": "^1.1.3",
35
35
  "@contentful/rich-text-plain-text-renderer": "^15.12.1",
36
- "@contentful/rich-text-types": "^15.12.3",
36
+ "@contentful/rich-text-types": "15.14.0",
37
37
  "@popperjs/core": "^2.11.5",
38
38
  "@udecode/plate-basic-marks": "^10.4.0",
39
39
  "@udecode/plate-break": "^10.4.0",
@@ -73,5 +73,5 @@
73
73
  "@udecode/plate-test-utils": "^3.2.0",
74
74
  "react": ">=16.14.0"
75
75
  },
76
- "gitHead": "2739023eb9ef81f3f7ad81d5681fbcb4ceacf1d2"
76
+ "gitHead": "b05b482e3d018dd340c12c2ccc30b67420f59b13"
77
77
  }