asma-ui-richeditor 0.1.1 → 0.1.2-beta

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,9 @@
1
+ import type { Editor } from '@tiptap/react';
2
+ import React from 'react';
3
+ interface Props {
4
+ open: boolean;
5
+ setOpen: (value: boolean) => void;
6
+ editor: Editor;
7
+ }
8
+ export declare const LinkDialog: React.FC<Props>;
9
+ export {};
@@ -1,20 +1,4 @@
1
- import { type FC, type MutableRefObject } from 'react';
2
- import { Editor, type UseEditorOptions } from '@tiptap/react';
3
- export interface IRichInput extends UseEditorOptions {
4
- dataTest: string;
5
- inputRef?: MutableRefObject<Editor>;
6
- immediatelyRender?: boolean;
7
- id?: string;
8
- label?: string;
9
- placeholder?: string;
10
- className?: string;
11
- disabled?: boolean;
12
- is_error?: boolean;
13
- ghost?: boolean;
14
- helperText?: string;
15
- isRequired?: boolean;
16
- hideMenuBar?: boolean;
17
- noDefaultStyles?: boolean;
18
- }
1
+ import { type FC } from 'react';
2
+ import type { IRichInput } from './interfaces/types';
19
3
  declare const RichInput: FC<IRichInput>;
20
4
  export { RichInput };
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export declare const Toolbar: ({ editor, onClose, error, focused, }: {
3
+ editor: Editor;
4
+ onClose: () => void;
5
+ error?: boolean | undefined;
6
+ focused: boolean;
7
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const defaultExtensions: (import("@tiptap/core").Node<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-text-style").TextStyleOptions, any>)[];
2
+ export declare const editModeExtensions: (import("@tiptap/core").Node<import("@tiptap/extension-heading").HeadingOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-bullet-list").BulletListOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-bold").BoldOptions, any> | import("@tiptap/core").Extension<{
3
+ types: string[];
4
+ }, any>)[];
@@ -0,0 +1,6 @@
1
+ export declare const useToggleMenuVisibility: () => {
2
+ open: boolean;
3
+ handleClose: () => void;
4
+ handleOpen: (event: React.MouseEvent<HTMLElement | SVGSVGElement>) => void;
5
+ anchorEl: HTMLElement | SVGSVGElement | null;
6
+ };
@@ -0,0 +1,23 @@
1
+ import type { Editor, UseEditorOptions } from "@tiptap/react";
2
+ import type { MutableRefObject } from "react";
3
+ export interface IRichInput extends UseEditorOptions {
4
+ dataTest: string;
5
+ inputRef?: MutableRefObject<Editor | null>;
6
+ immediatelyRender?: boolean;
7
+ id?: string;
8
+ title?: string;
9
+ placeholder?: string;
10
+ className?: string;
11
+ disabled?: boolean;
12
+ error?: boolean;
13
+ readOnly?: boolean;
14
+ helperText?: string;
15
+ required?: boolean;
16
+ hideToolbar?: boolean;
17
+ noDefaultStyles?: boolean;
18
+ maxScrollableHeight?: number;
19
+ toolbarDefaultVisible?: boolean;
20
+ }
21
+ export interface CustomCSSProperties extends React.CSSProperties {
22
+ '--max-scrollable-height'?: string;
23
+ }
package/package.json CHANGED
@@ -1,133 +1,138 @@
1
1
  {
2
- "name": "asma-ui-richeditor",
3
- "publishConfig": {
4
- "access": "public"
5
- },
6
- "version": "0.1.1",
7
- "type": "module",
8
- "files": [
9
- "dist/**/*",
10
- "dist/style.css",
11
- "tw-configs/**/*"
12
- ],
13
- "keywords": [],
14
- "author": "asma-team",
15
- "types": "./dist/index.d.ts",
16
- "main": "./dist/asma-ui-richeditor.es.js",
17
- "module": "./dist/asma-ui-richeditor.es.js",
18
- "license": "UNLICENSED",
19
- "dependencies": {
20
- "@emotion/react": "^11.11.1",
21
- "@emotion/styled": "^11.11.0",
22
- "@fontsource/roboto": "^5.0.4",
23
- "@mui/material": "^5.13.7",
24
- "@tiptap/extension-blockquote": "^2.6.5",
25
- "@tiptap/extension-bold": "^2.6.5",
26
- "@tiptap/extension-bullet-list": "^2.6.5",
27
- "@tiptap/extension-color": "^2.6.5",
28
- "@tiptap/extension-document": "^2.6.5",
29
- "@tiptap/extension-hard-break": "^2.6.5",
30
- "@tiptap/extension-heading": "^2.6.5",
31
- "@tiptap/extension-horizontal-rule": "^2.6.5",
32
- "@tiptap/extension-italic": "^2.6.5",
33
- "@tiptap/extension-list-item": "^2.6.5",
34
- "@tiptap/extension-ordered-list": "^2.6.5",
35
- "@tiptap/extension-paragraph": "^2.6.5",
36
- "@tiptap/extension-placeholder": "^2.6.5",
37
- "@tiptap/extension-strike": "^2.6.5",
38
- "@tiptap/extension-text": "^2.6.5",
39
- "@tiptap/extension-text-style": "^2.6.5",
40
- "@tiptap/react": "^2.6.5",
41
- "clsx": "^2.1.1",
42
- "node": "18.17.0",
43
- "react": "^18.2.0",
44
- "react-dom": "^18.2.0"
45
- },
46
- "devDependencies": {
47
- "@changesets/cli": "^2.26.2",
48
- "@faker-js/faker": "^8.0.2",
49
- "@rollup/plugin-terser": "^0.4.3",
50
- "@storybook/addon-a11y": "^7.6.9",
51
- "@storybook/addon-essentials": "^7.6.9",
52
- "@storybook/addon-interactions": "^7.6.9",
53
- "@storybook/addon-links": "^7.6.9",
54
- "@storybook/addon-mdx-gfm": "^7.6.9",
55
- "@storybook/addon-styling": "^1.3.7",
56
- "@storybook/addons": "^7.6.9",
57
- "@storybook/blocks": "^7.6.9",
58
- "@storybook/manager-api": "^7.6.9",
59
- "@storybook/preset-create-react-app": "^7.6.9",
60
- "@storybook/react": "^7.6.9",
61
- "@storybook/react-vite": "^7.6.9",
62
- "@storybook/test-runner": "^0.16.0",
63
- "@storybook/testing-library": "^0.2.2",
64
- "@storybook/theming": "^7.6.9",
65
- "@types/lodash-es": "^4.17.7",
66
- "@types/node": "^18.0.3",
67
- "@types/react": "^18.0.37",
68
- "@types/react-dom": "^18.0.11",
69
- "@typescript-eslint/eslint-plugin": "^5.59.0",
70
- "@typescript-eslint/parser": "^5.59.0",
71
- "@vitejs/plugin-react": "^4.0.0",
72
- "asma-core-ui": "^3.0.71",
73
- "autoprefixer": "^10.4.14",
74
- "axe-playwright": "^1.2.3",
75
- "axios": "^1.6.8",
76
- "eslint": "^8.38.0",
77
- "eslint-plugin-react-hooks": "^4.6.0",
78
- "eslint-plugin-react-refresh": "^0.3.4",
79
- "eslint-plugin-storybook": "^0.6.15",
80
- "postcss": "^8.4.24",
81
- "prop-types": "^15.8.1",
82
- "rollup-plugin-typescript2": "^0.35.0",
83
- "storybook": "^7.6.9",
84
- "storybook-addon-themes": "^6.1.0",
85
- "tailwind-scrollbar": "^3.1.0",
86
- "tailwindcss": "^3.3.2",
87
- "typescript": "^5.0.2",
88
- "typescript-plugin-css-modules": "^5.0.1",
89
- "vite": "^4.3.9",
90
- "vite-plugin-css-injected-by-js": "^3.5.1",
91
- "vite-plugin-dts": "^3.1.1",
92
- "vite-tsconfig-paths": "^4.2.0"
93
- },
94
- "peerDependencies": {
95
- "@emotion/react": "^11.*",
96
- "@emotion/styled": "^11.*",
97
- "@mui/material": "^5.*",
98
- "immer": "^9.*",
99
- "react": "^18.*",
100
- "react-dom": "^18.*"
101
- },
102
- "resolutions": {
103
- "@types/node": "18.0.3",
104
- "node": "18.17.0"
105
- },
106
- "exports": {
107
- ".": {
108
- "import": "./dist/asma-ui-richeditor.es.js"
2
+ "name": "asma-ui-richeditor",
3
+ "publishConfig": {
4
+ "access": "public"
109
5
  },
110
- "./dist/style.css": "./dist/style.css",
111
- "./tw-configs/twConfigs.json": "./tw-configs/twConfigs.json"
112
- },
113
- "scripts": {
114
- "dev": "vite",
115
- "build": "npx tsc && rm -rf ./dist && vite build",
116
- "preview": "vite preview",
117
- "lint": "eslint src/**/*.{js,jsx,ts,tsx}",
118
- "version": "echo $npm_package_version",
119
- "lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
120
- "prettier": "prettier --write src//**/*.{ts,tsx,scss} --config ./.prettierrc",
121
- "storybook": "storybook dev -p 6006",
122
- "storybook:no-browser": "storybook dev -p 6006 --no-open",
123
- "storybook:node18": "export NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
124
- "storybook:node18:win": "set NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
125
- "build-storybook": "export NODE_OPTIONS=--max_old_space_size=6240 && storybook build",
126
- "test-storybook": "test-storybook",
127
- "changeset:pre-beta": "changeset pre enter beta",
128
- "changeset:pre-exit": "changeset pre exit",
129
- "changeset:version": "changeset version",
130
- "changeset:publish": "changeset publish",
131
- "changeset:status": "changeset status"
132
- }
133
- }
6
+ "version": "0.1.2-beta",
7
+ "type": "module",
8
+ "files": [
9
+ "dist/**/*",
10
+ "dist/style.css",
11
+ "tw-configs/**/*"
12
+ ],
13
+ "keywords": [],
14
+ "author": "asma-team",
15
+ "types": "./dist/index.d.ts",
16
+ "main": "./dist/asma-ui-richeditor.es.js",
17
+ "module": "./dist/asma-ui-richeditor.es.js",
18
+ "scripts": {
19
+ "dev": "vite",
20
+ "build": "npx tsc && rm -rf ./dist && vite build",
21
+ "preview": "vite preview",
22
+ "lint": "eslint src/**/*.{js,jsx,ts,tsx}",
23
+ "version": "echo $npm_package_version",
24
+ "lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
25
+ "prettier": "prettier --write src//**/*.{ts,tsx,scss} --config ./.prettierrc",
26
+ "storybook": "storybook dev -p 6006",
27
+ "storybook:no-browser": "storybook dev -p 6006 --no-open",
28
+ "storybook:node18": "export NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
29
+ "storybook:node18:win": "set NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
30
+ "build-storybook": "export NODE_OPTIONS=--max_old_space_size=6240 && storybook build",
31
+ "test-storybook": "test-storybook",
32
+ "changeset:pre-beta": "changeset pre enter beta",
33
+ "changeset:pre-exit": "changeset pre exit",
34
+ "changeset:version": "changeset version",
35
+ "changeset:publish": "changeset publish",
36
+ "changeset:status": "changeset status"
37
+ },
38
+ "license": "UNLICENSED",
39
+ "dependencies": {
40
+ "@emotion/react": "^11.11.1",
41
+ "@emotion/styled": "^11.11.0",
42
+ "@fontsource/roboto": "^5.0.4",
43
+ "@iconify/react": "^5.0.2",
44
+ "@mui/material": "^5.13.7",
45
+ "@tiptap/core": "^2.8.0",
46
+ "@tiptap/extension-blockquote": "^2.6.5",
47
+ "@tiptap/extension-bold": "^2.6.5",
48
+ "@tiptap/extension-bullet-list": "^2.6.5",
49
+ "@tiptap/extension-color": "^2.6.5",
50
+ "@tiptap/extension-document": "^2.6.5",
51
+ "@tiptap/extension-hard-break": "^2.6.5",
52
+ "@tiptap/extension-heading": "^2.6.5",
53
+ "@tiptap/extension-horizontal-rule": "^2.6.5",
54
+ "@tiptap/extension-italic": "^2.6.5",
55
+ "@tiptap/extension-link": "^2.8.0",
56
+ "@tiptap/extension-list-item": "^2.6.5",
57
+ "@tiptap/extension-ordered-list": "^2.6.5",
58
+ "@tiptap/extension-paragraph": "^2.6.5",
59
+ "@tiptap/extension-placeholder": "^2.6.5",
60
+ "@tiptap/extension-strike": "^2.6.5",
61
+ "@tiptap/extension-text": "^2.6.5",
62
+ "@tiptap/extension-text-style": "^2.6.5",
63
+ "@tiptap/extension-underline": "^2.8.0",
64
+ "@tiptap/react": "^2.6.5",
65
+ "clsx": "^2.1.1",
66
+ "node": "18.17.0",
67
+ "react": "^18.2.0",
68
+ "react-dom": "^18.2.0",
69
+ "tiptap-extension-font-size": "^1.2.0"
70
+ },
71
+ "devDependencies": {
72
+ "@changesets/cli": "^2.26.2",
73
+ "@faker-js/faker": "^8.0.2",
74
+ "@rollup/plugin-terser": "^0.4.3",
75
+ "@storybook/addon-a11y": "^7.6.9",
76
+ "@storybook/addon-essentials": "^7.6.9",
77
+ "@storybook/addon-interactions": "^7.6.9",
78
+ "@storybook/addon-links": "^7.6.9",
79
+ "@storybook/addon-mdx-gfm": "^7.6.9",
80
+ "@storybook/addon-styling": "^1.3.7",
81
+ "@storybook/addons": "^7.6.9",
82
+ "@storybook/blocks": "^7.6.9",
83
+ "@storybook/manager-api": "^7.6.9",
84
+ "@storybook/preset-create-react-app": "^7.6.9",
85
+ "@storybook/react": "^7.6.9",
86
+ "@storybook/react-vite": "^7.6.9",
87
+ "@storybook/test-runner": "^0.16.0",
88
+ "@storybook/testing-library": "^0.2.2",
89
+ "@storybook/theming": "^7.6.9",
90
+ "@types/lodash-es": "^4.17.7",
91
+ "@types/node": "^18.0.3",
92
+ "@types/react": "^18.0.37",
93
+ "@types/react-dom": "^18.0.11",
94
+ "@typescript-eslint/eslint-plugin": "^5.59.0",
95
+ "@typescript-eslint/parser": "^5.59.0",
96
+ "@vitejs/plugin-react": "^4.0.0",
97
+ "asma-core-ui": "^3.0.71",
98
+ "autoprefixer": "^10.4.14",
99
+ "axe-playwright": "^1.2.3",
100
+ "axios": "^1.6.8",
101
+ "eslint": "^8.38.0",
102
+ "eslint-plugin-react-hooks": "^4.6.0",
103
+ "eslint-plugin-react-refresh": "^0.3.4",
104
+ "eslint-plugin-storybook": "^0.6.15",
105
+ "postcss": "^8.4.24",
106
+ "prop-types": "^15.8.1",
107
+ "rollup-plugin-typescript2": "^0.35.0",
108
+ "storybook": "^7.6.9",
109
+ "storybook-addon-themes": "^6.1.0",
110
+ "tailwind-scrollbar": "^3.1.0",
111
+ "tailwindcss": "^3.3.2",
112
+ "typescript": "^5.0.2",
113
+ "typescript-plugin-css-modules": "^5.0.1",
114
+ "vite": "^4.3.9",
115
+ "vite-plugin-css-injected-by-js": "^3.5.1",
116
+ "vite-plugin-dts": "^3.1.1",
117
+ "vite-tsconfig-paths": "^4.2.0"
118
+ },
119
+ "peerDependencies": {
120
+ "@emotion/react": "^11.*",
121
+ "@emotion/styled": "^11.*",
122
+ "@mui/material": "^5.*",
123
+ "immer": "^9.*",
124
+ "react": "^18.*",
125
+ "react-dom": "^18.*"
126
+ },
127
+ "resolutions": {
128
+ "@types/node": "18.0.3",
129
+ "node": "18.17.0"
130
+ },
131
+ "exports": {
132
+ ".": {
133
+ "import": "./dist/asma-ui-richeditor.es.js"
134
+ },
135
+ "./dist/style.css": "./dist/style.css",
136
+ "./tw-configs/twConfigs.json": "./tw-configs/twConfigs.json"
137
+ }
138
+ }
@@ -1,4 +0,0 @@
1
- import { Editor } from '@tiptap/react';
2
- export declare const MenuBar: ({ editor }: {
3
- editor: Editor | null;
4
- }) => JSX.Element | null;