@commercetools-uikit/rich-text-utils 19.26.0 → 20.1.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/dist/commercetools-uikit-rich-text-utils.cjs.dev.js +9 -65
- package/dist/commercetools-uikit-rich-text-utils.cjs.prod.js +2 -10
- package/dist/commercetools-uikit-rich-text-utils.esm.js +9 -64
- package/dist/declarations/src/rich-text-body/dropdown.d.ts +6 -1
- package/dist/declarations/src/rich-text-body/rich-text-body-button.d.ts +2 -2
- package/dist/declarations/src/rich-text-body/rich-text-body.d.ts +3 -3
- package/package.json +14 -15
|
@@ -2,6 +2,11 @@ import type { FunctionComponent, ReactNode } from 'react';
|
|
|
2
2
|
export type TDropdownLabel = {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
};
|
|
5
|
+
export type TDropdownItem = {
|
|
6
|
+
value: string;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
5
10
|
export type TDropdownProps = {
|
|
6
11
|
label: string;
|
|
7
12
|
isMulti?: boolean;
|
|
@@ -9,7 +14,7 @@ export type TDropdownProps = {
|
|
|
9
14
|
isReadOnly?: boolean;
|
|
10
15
|
onChange?: ({ value }: TItem) => void;
|
|
11
16
|
components?: {
|
|
12
|
-
Item: FunctionComponent<
|
|
17
|
+
Item: FunctionComponent<TDropdownItem>;
|
|
13
18
|
Label: FunctionComponent<TDropdownLabel>;
|
|
14
19
|
};
|
|
15
20
|
options: Array<TItem>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ReactNode,
|
|
1
|
+
import type { ReactNode, MouseEventHandler } from 'react';
|
|
2
2
|
export type TRichTextBodyButtonProps = {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
4
|
label: string;
|
|
5
5
|
isActive?: boolean;
|
|
6
6
|
isReadOnly?: boolean;
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
onClick?:
|
|
8
|
+
onClick?: MouseEventHandler;
|
|
9
9
|
};
|
|
10
10
|
declare const RichTextBodyButton: {
|
|
11
11
|
(props: TRichTextBodyButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type ReactNode, type
|
|
1
|
+
import { type ReactNode, type Ref, type CSSProperties } from 'react';
|
|
2
2
|
import { type SerializedStyles } from '@emotion/react';
|
|
3
3
|
type TNodeRefObject = {
|
|
4
4
|
clientHeight: number;
|
|
5
|
-
} &
|
|
5
|
+
} & Ref<HTMLDivElement>;
|
|
6
6
|
export type TRichtTextEditorBodyRef = {
|
|
7
7
|
registerContentNode: TNodeRefObject;
|
|
8
|
-
containerRef?:
|
|
8
|
+
containerRef?: Ref<HTMLDivElement>;
|
|
9
9
|
};
|
|
10
10
|
export type TRichTextEditorBody = {
|
|
11
11
|
styles?: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/rich-text-utils",
|
|
3
3
|
"description": "Utilities for working with rich-text components.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "20.1.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -24,21 +24,20 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "^7.20.13",
|
|
26
26
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
27
|
-
"@commercetools-uikit/design-system": "
|
|
28
|
-
"@commercetools-uikit/icons": "
|
|
29
|
-
"@commercetools-uikit/input-utils": "
|
|
30
|
-
"@commercetools-uikit/spacings-inline": "
|
|
31
|
-
"@commercetools-uikit/tooltip": "
|
|
32
|
-
"@commercetools-uikit/utils": "
|
|
27
|
+
"@commercetools-uikit/design-system": "20.1.0",
|
|
28
|
+
"@commercetools-uikit/icons": "20.1.0",
|
|
29
|
+
"@commercetools-uikit/input-utils": "20.1.0",
|
|
30
|
+
"@commercetools-uikit/spacings-inline": "20.1.0",
|
|
31
|
+
"@commercetools-uikit/tooltip": "20.1.0",
|
|
32
|
+
"@commercetools-uikit/utils": "20.1.0",
|
|
33
33
|
"@emotion/react": "^11.10.5",
|
|
34
34
|
"@emotion/styled": "^11.10.5",
|
|
35
35
|
"@types/escape-html": "1.0.4",
|
|
36
|
-
"downshift": "
|
|
36
|
+
"downshift": "9.0.9",
|
|
37
37
|
"escape-html": "1.0.3",
|
|
38
38
|
"is-hotkey": "0.2.0",
|
|
39
39
|
"is-url": "^1.2.4",
|
|
40
40
|
"lodash": "4.17.21",
|
|
41
|
-
"prop-types": "15.8.1",
|
|
42
41
|
"slate": "0.75.0",
|
|
43
42
|
"slate-history": "0.113.1",
|
|
44
43
|
"slate-hyperscript": "0.100.0",
|
|
@@ -46,13 +45,13 @@
|
|
|
46
45
|
"style-to-object": "0.4.4"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"react": "
|
|
50
|
-
"react-dom": "
|
|
51
|
-
"react-intl": "^
|
|
48
|
+
"react": "19.1.0",
|
|
49
|
+
"react-dom": "19.1.0",
|
|
50
|
+
"react-intl": "^7.1.4"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {
|
|
54
|
-
"react": "
|
|
55
|
-
"react-dom": "
|
|
56
|
-
"react-intl": "
|
|
53
|
+
"react": "19.x",
|
|
54
|
+
"react-dom": "19.x",
|
|
55
|
+
"react-intl": "7.x"
|
|
57
56
|
}
|
|
58
57
|
}
|