asma-ui-richeditor 0.2.11 → 0.2.13
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/asma-ui-richeditor.css +3 -0
- package/dist/asma-ui-richeditor.es.js +27478 -55
- package/dist/index.d.ts +1 -0
- package/dist/src/rich-input/RichInput.d.ts +2 -2
- package/dist/src/rich-input/components/CustomMenuItem.d.ts +3 -2
- package/dist/src/rich-input/components/FontSizeSelect.d.ts +5 -4
- package/dist/src/rich-input/components/LinkDialog.d.ts +3 -3
- package/dist/src/rich-input/components/Toolbar.d.ts +6 -6
- package/dist/src/rich-input/components/useTranslations.d.ts +1 -1
- package/dist/src/rich-input/helpers/EditorExtensions.d.ts +2 -2
- package/dist/src/rich-input/interfaces/types.d.ts +4 -4
- package/dist/tailwind.config.d.ts +32 -22
- package/dist/vite.config.d.ts +1 -1
- package/package.json +27 -51
- package/dist/style.css +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { MenuItemProps } from '@mui/material';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare const CustomMenuItem: (props: MenuItemProps) => React.JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { TextFieldProps } from 'asma-ui-core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Editor } from '@tiptap/core';
|
|
4
|
+
import { ILocale } from '../interfaces/types';
|
|
4
5
|
export declare const FontSizeSelect: (props: TextFieldProps & {
|
|
5
6
|
editor: Editor;
|
|
6
7
|
isNorsk: boolean;
|
|
7
8
|
locale?: ILocale;
|
|
8
|
-
}) => JSX.Element;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ILocale } from '../interfaces/types';
|
|
4
4
|
export declare const LinkDialog: React.FC<{
|
|
5
5
|
open: boolean;
|
|
6
6
|
setOpen: (value: boolean) => void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Editor } from '@tiptap/react';
|
|
3
|
-
import
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
import { ILocale } from '../interfaces/types';
|
|
4
4
|
export declare const Toolbar: ({ editor, onClose, error, focused, openLinkDialog, openEmojiPicker, locale, emojiButtonRef, }: {
|
|
5
5
|
editor: Editor;
|
|
6
6
|
onClose: () => void;
|
|
7
|
-
error?: boolean
|
|
7
|
+
error?: boolean;
|
|
8
8
|
focused: boolean;
|
|
9
9
|
openLinkDialog: () => void;
|
|
10
10
|
openEmojiPicker: () => void;
|
|
11
|
-
locale?: ILocale
|
|
12
|
-
emojiButtonRef?:
|
|
13
|
-
}) => JSX.Element;
|
|
11
|
+
locale?: ILocale;
|
|
12
|
+
emojiButtonRef?: RefObject<HTMLSpanElement>;
|
|
13
|
+
}) => import("node_modules/@types/react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const defaultExtensions: (import(
|
|
2
|
-
export declare const editModeExtensions: (import(
|
|
1
|
+
export declare const defaultExtensions: (import('@tiptap/core').Node<any, any> | import('@tiptap/core').Mark<import('node_modules/@tiptap/extension-text-style/dist').TextStyleOptions, any>)[];
|
|
2
|
+
export declare const editModeExtensions: (import('@tiptap/core').Node<import('node_modules/@tiptap/extension-heading/dist').HeadingOptions, any> | import('@tiptap/core').Node<import('node_modules/@tiptap/extension-list-item/dist').ListItemOptions, any> | import('@tiptap/core').Node<import('node_modules/@tiptap/extension-bullet-list/dist').BulletListOptions, any> | import('@tiptap/core').Mark<import('node_modules/@tiptap/extension-bold/dist').BoldOptions, any> | import('@tiptap/core').Extension<{
|
|
3
3
|
types: string[];
|
|
4
4
|
}, any>)[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ChipProps } from '@mui/material';
|
|
2
|
+
import { Editor, UseEditorOptions } from '@tiptap/react';
|
|
3
|
+
import { RefObject } from 'react';
|
|
4
4
|
export interface CustomCSSProperties extends React.CSSProperties {
|
|
5
5
|
'--max-scrollable-height'?: string;
|
|
6
6
|
}
|
|
@@ -9,7 +9,7 @@ export interface IRichInput extends UseEditorOptions {
|
|
|
9
9
|
dataTest: string;
|
|
10
10
|
attachmentsMenu?: React.ReactNode;
|
|
11
11
|
replyModeComponent?: React.ReactNode;
|
|
12
|
-
inputRef?:
|
|
12
|
+
inputRef?: RefObject<Editor | null>;
|
|
13
13
|
id?: string;
|
|
14
14
|
title?: string;
|
|
15
15
|
placeholder?: string;
|
|
@@ -6,53 +6,59 @@ declare const _default: {
|
|
|
6
6
|
};
|
|
7
7
|
extend: {
|
|
8
8
|
screens: {
|
|
9
|
-
[
|
|
9
|
+
[n: number]: string;
|
|
10
10
|
length: number;
|
|
11
|
-
toString
|
|
12
|
-
toLocaleString
|
|
11
|
+
toString(): string;
|
|
12
|
+
toLocaleString(): string;
|
|
13
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
13
14
|
pop(): string | undefined;
|
|
14
15
|
push(...items: string[]): number;
|
|
15
16
|
concat(...items: ConcatArray<string>[]): string[];
|
|
16
17
|
concat(...items: (string | ConcatArray<string>)[]): string[];
|
|
17
|
-
join(separator?: string
|
|
18
|
+
join(separator?: string): string;
|
|
18
19
|
reverse(): string[];
|
|
19
20
|
shift(): string | undefined;
|
|
20
|
-
slice(start?: number
|
|
21
|
+
slice(start?: number, end?: number): string[];
|
|
21
22
|
sort(compareFn?: ((a: string, b: string) => number) | undefined): string[] & Record<"sm" | "md" | "lg" | "xl" | "2xl", string>;
|
|
22
|
-
splice(start: number, deleteCount?: number
|
|
23
|
+
splice(start: number, deleteCount?: number): string[];
|
|
23
24
|
splice(start: number, deleteCount: number, ...items: string[]): string[];
|
|
24
25
|
unshift(...items: string[]): number;
|
|
25
|
-
indexOf(searchElement: string, fromIndex?: number
|
|
26
|
-
lastIndexOf(searchElement: string, fromIndex?: number
|
|
26
|
+
indexOf(searchElement: string, fromIndex?: number): number;
|
|
27
|
+
lastIndexOf(searchElement: string, fromIndex?: number): number;
|
|
27
28
|
every<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[];
|
|
28
29
|
every(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
|
|
29
30
|
some(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean;
|
|
30
31
|
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
|
|
31
32
|
map<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[];
|
|
32
|
-
filter<
|
|
33
|
+
filter<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
|
|
33
34
|
filter(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
|
|
34
35
|
reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
|
|
35
36
|
reduce(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
|
|
36
|
-
reduce<
|
|
37
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
|
|
37
38
|
reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
|
|
38
39
|
reduceRight(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
|
|
39
|
-
reduceRight<
|
|
40
|
-
find<
|
|
40
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U;
|
|
41
|
+
find<S extends string>(predicate: (value: string, index: number, obj: string[]) => value is S, thisArg?: any): S | undefined;
|
|
41
42
|
find(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
|
|
42
43
|
findIndex(predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): number;
|
|
43
|
-
fill(value: string, start?: number
|
|
44
|
-
copyWithin(target: number, start: number, end?: number
|
|
45
|
-
entries():
|
|
46
|
-
keys():
|
|
47
|
-
values():
|
|
48
|
-
includes(searchElement: string, fromIndex?: number
|
|
49
|
-
flatMap<
|
|
44
|
+
fill(value: string, start?: number, end?: number): string[] & Record<"sm" | "md" | "lg" | "xl" | "2xl", string>;
|
|
45
|
+
copyWithin(target: number, start: number, end?: number): string[] & Record<"sm" | "md" | "lg" | "xl" | "2xl", string>;
|
|
46
|
+
entries(): ArrayIterator<[number, string]>;
|
|
47
|
+
keys(): ArrayIterator<number>;
|
|
48
|
+
values(): ArrayIterator<string>;
|
|
49
|
+
includes(searchElement: string, fromIndex?: number): boolean;
|
|
50
|
+
flatMap<U, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U | readonly U[], thisArg?: This | undefined): U[];
|
|
50
51
|
flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
|
|
51
52
|
at(index: number): string | undefined;
|
|
52
|
-
findLast<
|
|
53
|
+
findLast<S extends string>(predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S | undefined;
|
|
53
54
|
findLast(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string | undefined;
|
|
54
55
|
findLastIndex(predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): number;
|
|
55
|
-
|
|
56
|
+
toReversed(): string[];
|
|
57
|
+
toSorted(compareFn?: ((a: string, b: string) => number) | undefined): string[];
|
|
58
|
+
toSpliced(start: number, deleteCount: number, ...items: string[]): string[];
|
|
59
|
+
toSpliced(start: number, deleteCount?: number): string[];
|
|
60
|
+
with(index: number, value: string): string[];
|
|
61
|
+
[Symbol.iterator](): ArrayIterator<string>;
|
|
56
62
|
[Symbol.unscopables]: {
|
|
57
63
|
[x: number]: boolean | undefined;
|
|
58
64
|
length?: boolean | undefined;
|
|
@@ -90,6 +96,10 @@ declare const _default: {
|
|
|
90
96
|
at?: boolean | undefined;
|
|
91
97
|
findLast?: boolean | undefined;
|
|
92
98
|
findLastIndex?: boolean | undefined;
|
|
99
|
+
toReversed?: boolean | undefined;
|
|
100
|
+
toSorted?: boolean | undefined;
|
|
101
|
+
toSpliced?: boolean | undefined;
|
|
102
|
+
with?: boolean | undefined;
|
|
93
103
|
[Symbol.iterator]?: boolean | undefined;
|
|
94
104
|
readonly [Symbol.unscopables]?: boolean | undefined;
|
|
95
105
|
};
|
|
@@ -99,7 +109,7 @@ declare const _default: {
|
|
|
99
109
|
xl: string;
|
|
100
110
|
"2xl": string;
|
|
101
111
|
} | {
|
|
102
|
-
[x: string]: string | import(
|
|
112
|
+
[x: string]: string | import('./node_modules/tailwindcss/types/config').Screen | import('./node_modules/tailwindcss/types/config').Screen[];
|
|
103
113
|
sm: string;
|
|
104
114
|
md: string;
|
|
105
115
|
lg: string;
|
package/dist/vite.config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('node_modules/vite/dist/node').UserConfig;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.13",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/**/*",
|
|
@@ -52,96 +52,72 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@emotion/react": "^11.11.1",
|
|
54
54
|
"@emotion/styled": "^11.11.0",
|
|
55
|
-
"@fontsource/roboto": "^5.0.4",
|
|
56
55
|
"@iconify/react": "^5.0.2",
|
|
57
56
|
"@mui/material": "^5.13.7",
|
|
58
57
|
"@tiptap/core": "^2.11.7",
|
|
59
|
-
"@tiptap/extension-blockquote": "^2.11.7",
|
|
60
58
|
"@tiptap/extension-bold": "^2.11.7",
|
|
61
59
|
"@tiptap/extension-bullet-list": "^2.11.7",
|
|
62
|
-
"@tiptap/extension-color": "^2.11.7",
|
|
63
60
|
"@tiptap/extension-document": "^2.11.7",
|
|
64
|
-
"@tiptap/extension-hard-break": "^2.11.7",
|
|
65
61
|
"@tiptap/extension-heading": "^2.11.7",
|
|
66
|
-
"@tiptap/extension-horizontal-rule": "^2.11.7",
|
|
67
62
|
"@tiptap/extension-italic": "^2.11.7",
|
|
68
63
|
"@tiptap/extension-link": "^2.11.7",
|
|
69
64
|
"@tiptap/extension-list-item": "^2.11.7",
|
|
70
65
|
"@tiptap/extension-ordered-list": "^2.11.7",
|
|
71
66
|
"@tiptap/extension-paragraph": "^2.11.7",
|
|
72
67
|
"@tiptap/extension-placeholder": "^2.11.7",
|
|
73
|
-
"@tiptap/extension-
|
|
74
|
-
"@tiptap/extension-text": "^2.11.7",
|
|
68
|
+
"@tiptap/extension-text": "^2.27.2",
|
|
75
69
|
"@tiptap/extension-text-style": "^2.11.7",
|
|
76
|
-
"@tiptap/extension-underline": "^2.11.7",
|
|
77
70
|
"@tiptap/react": "^2.11.7",
|
|
78
71
|
"clsx": "^2.1.1",
|
|
79
|
-
"emoji-mart": "^5.6.0",
|
|
80
72
|
"emoji-picker-react": "^4.13.2",
|
|
81
|
-
"node": "18.17.0",
|
|
82
|
-
"react": "^18.2.0",
|
|
83
|
-
"react-dom": "^18.2.0",
|
|
84
|
-
"tailwind-merge": "^2.5.4",
|
|
85
73
|
"tiptap-extension-font-size": "^1.2.0"
|
|
86
74
|
},
|
|
87
75
|
"devDependencies": {
|
|
88
76
|
"@changesets/cli": "^2.26.2",
|
|
89
|
-
"@faker-js/faker": "^8.0.2",
|
|
90
77
|
"@rollup/plugin-terser": "^0.4.3",
|
|
91
|
-
"@storybook/addon-a11y": "^
|
|
92
|
-
"@storybook/addon-
|
|
93
|
-
"@storybook/addon-
|
|
94
|
-
"@storybook/addon-
|
|
95
|
-
"@storybook/
|
|
96
|
-
"@storybook/
|
|
97
|
-
"@storybook/
|
|
98
|
-
"@storybook/blocks": "^7.6.9",
|
|
99
|
-
"@storybook/manager-api": "^7.6.9",
|
|
100
|
-
"@storybook/preset-create-react-app": "^7.6.9",
|
|
101
|
-
"@storybook/react": "^7.6.9",
|
|
102
|
-
"@storybook/react-vite": "^7.6.9",
|
|
103
|
-
"@storybook/test-runner": "^0.16.0",
|
|
104
|
-
"@storybook/testing-library": "^0.2.2",
|
|
105
|
-
"@storybook/theming": "^7.6.9",
|
|
106
|
-
"@types/lodash-es": "^4.17.7",
|
|
78
|
+
"@storybook/addon-a11y": "^10.4.0",
|
|
79
|
+
"@storybook/addon-docs": "^10.4.0",
|
|
80
|
+
"@storybook/addon-links": "^10.4.0",
|
|
81
|
+
"@storybook/addon-themes": "^10.4.0",
|
|
82
|
+
"@storybook/react": "^10.4.0",
|
|
83
|
+
"@storybook/react-vite": "^10.4.0",
|
|
84
|
+
"@storybook/test-runner": "^0.24.4",
|
|
107
85
|
"@types/node": "^18.0.3",
|
|
108
|
-
"@types/react": "^18.
|
|
109
|
-
"@types/react-dom": "^18.0.11",
|
|
86
|
+
"@types/react": "^18.3.28",
|
|
110
87
|
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
|
111
88
|
"@typescript-eslint/parser": "^5.59.0",
|
|
112
|
-
"@vitejs/plugin-react": "^
|
|
89
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
113
90
|
"asma-ui-core": "^3.3.7",
|
|
114
|
-
"autoprefixer": "^10.
|
|
91
|
+
"autoprefixer": "^10.5.0",
|
|
115
92
|
"axe-playwright": "^1.2.3",
|
|
116
|
-
"
|
|
93
|
+
"esbuild": "^0.28.0",
|
|
117
94
|
"eslint": "^8.38.0",
|
|
118
95
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
119
96
|
"eslint-plugin-react-refresh": "^0.3.4",
|
|
120
97
|
"eslint-plugin-storybook": "^0.6.15",
|
|
121
|
-
"postcss": "^8.
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
98
|
+
"postcss": "^8.5.15",
|
|
99
|
+
"postcss-import": "^16.1.1",
|
|
100
|
+
"react": "18.2.0",
|
|
101
|
+
"react-dom": "18.2.0",
|
|
102
|
+
"remark-gfm": "^4.0.1",
|
|
103
|
+
"storybook": "^10.4.0",
|
|
104
|
+
"tailwind-merge": "^2.4.0",
|
|
126
105
|
"tailwind-scrollbar": "^3.1.0",
|
|
127
106
|
"tailwindcss": "^3.3.2",
|
|
128
|
-
"typescript": "^5.
|
|
107
|
+
"typescript": "^5.9.3",
|
|
129
108
|
"typescript-plugin-css-modules": "^5.0.1",
|
|
130
|
-
"vite": "^
|
|
131
|
-
"vite-plugin-
|
|
132
|
-
"vite-plugin-dts": "^3.1.1",
|
|
133
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
109
|
+
"vite": "^8.0.13",
|
|
110
|
+
"vite-plugin-dts": "^5.0.1"
|
|
134
111
|
},
|
|
135
112
|
"peerDependencies": {
|
|
136
113
|
"@emotion/react": "^11.*",
|
|
137
114
|
"@emotion/styled": "^11.*",
|
|
138
115
|
"@mui/material": "^5.*",
|
|
139
|
-
"
|
|
140
|
-
"react": "^18
|
|
141
|
-
"react-dom": "^18
|
|
116
|
+
"asma-ui-core": "^3.3.7",
|
|
117
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
118
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
142
119
|
},
|
|
143
120
|
"resolutions": {
|
|
144
|
-
"@types/node": "18.0.3"
|
|
145
|
-
"node": "18.17.0"
|
|
121
|
+
"@types/node": "18.0.3"
|
|
146
122
|
}
|
|
147
123
|
}
|