eddyter 1.3.75 → 1.3.77

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.
Files changed (54) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +478 -478
  3. package/dist/EddyterIcon.svg +24 -24
  4. package/dist/Provider/EditorProvider.d.ts +12 -0
  5. package/dist/api/auth.d.ts +10 -0
  6. package/dist/api/bugReport.d.ts +2 -0
  7. package/dist/api/config/endpoints.d.ts +1 -0
  8. package/dist/assets/style.css +1 -1
  9. package/dist/{babel-B9hn44Wo.js → babel-CCPWkrf4.js} +1302 -726
  10. package/dist/components/EddyterLogo/EddyterLogo.d.ts +2 -1
  11. package/dist/components/HtmlCodeEditor.d.ts +9 -0
  12. package/dist/components/ImageView/ImageCropDialog.d.ts +18 -0
  13. package/dist/components/LockedFeature/LockedFeature.d.ts +4 -0
  14. package/dist/components/Placeholder/styles.d.ts +2 -0
  15. package/dist/components/Toast/EditorToast.d.ts +2 -0
  16. package/dist/components/ui/button.d.ts +1 -1
  17. package/dist/config/env.d.ts +9 -0
  18. package/dist/editorConfig.d.ts +1 -0
  19. package/dist/{estree-CocPn_Md.js → estree-CxUPh9wa.js} +917 -529
  20. package/dist/generateDocxThumbnail-Du6zd_sv.js +5876 -0
  21. package/dist/generatePdfThumbnail-DdNHlnr8.js +53 -0
  22. package/dist/generateXlsxThumbnail-VFzuEJln.js +21707 -0
  23. package/dist/hooks/useFeedbackEligibility.d.ts +2 -2
  24. package/dist/hooks/usePdfPreview.d.ts +6 -0
  25. package/dist/{html-CxCicOef.js → html-CmniStvG.js} +589 -350
  26. package/dist/html2canvas.esm-C2wu93Kq.js +4867 -0
  27. package/dist/{html2pdf.bundle.min-BxzIoi3T.js → html2pdf.bundle.min-4S-fQVxW.js} +5223 -3407
  28. package/dist/index-BUrH5xJk.js +1498 -0
  29. package/dist/index-DCBdbL8A.js +131 -0
  30. package/dist/{index-Cuv9ugJL.js → index-DSNo50FN.js} +17 -17
  31. package/dist/{index-DxEP36zG.js → index-Dh3DFyBT.js} +16269 -15166
  32. package/dist/index.js +1 -1
  33. package/dist/lib/toast.d.ts +39 -0
  34. package/dist/{markdown-BUjgWFLu.js → markdown-B0mEGGfQ.js} +1015 -578
  35. package/dist/nodes/EmbedNode.d.ts +9 -3
  36. package/dist/nodes/FileNode.d.ts +3 -0
  37. package/dist/{postcss-CGIcwj_g.js → postcss-B0bxXf7u.js} +1065 -615
  38. package/dist/{standalone-C0qguT38.js → standalone-DmuJV5rn.js} +596 -350
  39. package/dist/store/tableFullWidthStore.d.ts +6 -0
  40. package/dist/types.d.ts +4 -0
  41. package/dist/{typescript-BM7wk6k-.js → typescript-DZlC_9M8.js} +1805 -1113
  42. package/dist/utils/cropUrl.d.ts +28 -0
  43. package/dist/utils/editorStyleConverter.d.ts +3 -1
  44. package/dist/utils/export.d.ts +5 -0
  45. package/dist/utils/generateDocxThumbnail.d.ts +5 -0
  46. package/dist/utils/generatePdfThumbnail.d.ts +1 -0
  47. package/dist/utils/generateXlsxThumbnail.d.ts +5 -0
  48. package/dist/utils/helper.d.ts +2 -0
  49. package/dist/utils/htmlFormat.d.ts +5 -0
  50. package/dist/utils/index.d.ts +4 -4
  51. package/package.json +148 -150
  52. package/dist/html2pdf.bundle-CVq-OpZt.js +0 -32961
  53. package/dist/index-CtPRZTab.js +0 -845
  54. package/dist/index-eRyVFO7x.js +0 -83
@@ -0,0 +1,28 @@
1
+ export type CropData = {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ naturalWidth: number;
7
+ naturalHeight: number;
8
+ };
9
+ /**
10
+ * Returns true if the given src is served from our CloudFront CDN.
11
+ * Includes both direct CDN URLs and /transform-image/... crop URLs.
12
+ */
13
+ export declare function isCdnUrl(src: string): boolean;
14
+ /**
15
+ * Builds the crop URL using CDN: https://<cdn>/transform-image/<s3-key>?crop=x,y,w,h
16
+ */
17
+ export declare function buildCropUrl(src: string, crop: CropData): string;
18
+ /**
19
+ * Strips the `crop` query param. Used when re-opening the crop dialog (full image).
20
+ */
21
+ export declare function stripCropParams(src: string): string;
22
+ /**
23
+ * Returns the URL for the original (full, uncropped) image. Use this for the crop
24
+ * dialog preview so the user always sees the full image to draw a new crop.
25
+ * For CDN images this is the direct object URL (e.g. https://cdn.../key), not
26
+ * /transform-image/..., so the preview loads reliably.
27
+ */
28
+ export declare function getOriginalImageUrl(src: string): string;
@@ -1,10 +1,12 @@
1
- import { LexicalEditor } from '../../node_modules/lexical';
1
+ import { NodeKey, LexicalEditor } from '../../node_modules/lexical';
2
2
  /**
3
3
  * ==========================================
4
4
  * Main Export Hooks & Functions
5
5
  * ==========================================
6
6
  */
7
7
  export declare function useExportWithStriping(): () => string;
8
+ /** Collect table node keys in document order (for export and initial content fullWidth). */
9
+ export declare function getTableKeysInDocumentOrder(editor: LexicalEditor): NodeKey[];
8
10
  export declare function exportEditorWithInlineStyle(editor: LexicalEditor): string;
9
11
  /**
10
12
  * Processes initial HTML content for loading into the editor.
@@ -1,2 +1,7 @@
1
1
  import { LexicalEditor } from '../../node_modules/lexical';
2
2
  export declare function exportEditorToPDF(editor: LexicalEditor, filename?: string, apiKey?: string): Promise<void>;
3
+ /**
4
+ * Export editor content as a Word document (.docx).
5
+ * Uses the same HTML as the editor (with inline styles). Requires complete HTML document for html-docx-js.
6
+ */
7
+ export declare function exportEditorToDoc(editor: LexicalEditor, filename?: string, _apiKey?: string): Promise<void>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Renders the first page of a DOCX, captures it, then crops to the top portion
3
+ * so the thumbnail shows the start of the document (not the whole doc).
4
+ */
5
+ export declare function generateDocxThumbnail(docxUrl: string): Promise<string>;
@@ -0,0 +1 @@
1
+ export declare function generatePdfThumbnail(pdfUrl: string): Promise<string>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Renders the first sheet of an XLSX file as a small table, captures it with html2canvas,
3
+ * and returns a PNG data URL for use as a thumbnail.
4
+ */
5
+ export declare function generateXlsxThumbnail(xlsxUrl: string): Promise<string>;
@@ -1,3 +1,5 @@
1
1
  export declare const AI_ACTION_COMMAND: import('../../node_modules/lexical').LexicalCommand<{
2
2
  type: string;
3
3
  }>;
4
+ /** Dispatched to request immediate HTML export (e.g. after table full-width toggle) so preview updates without waiting for debounce. */
5
+ export declare const REQUEST_IMMEDIATE_EXPORT_COMMAND: import('../../node_modules/lexical').LexicalCommand<void>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Simple HTML formatter for the code view: breaks tags onto separate lines
3
+ * so minified/single-line HTML is readable. Safe to run on any HTML string.
4
+ */
5
+ export declare function formatHtmlForCodeView(html: string): string;
@@ -1,5 +1,5 @@
1
- import { SxProps, Theme } from '@mui/material';
1
+ import { default as React } from 'react';
2
2
  import { IMenuButtonStyle } from '../types';
3
- export declare const getMenuButtonStyle: ({ open, isMdViewport, }: IMenuButtonStyle) => SxProps;
4
- export declare const getActiveBtnStyle: (isActive: boolean) => SxProps<Theme>;
5
- export declare const getColorPickerPaperStyle: () => SxProps;
3
+ export declare const getMenuButtonStyle: ({ open, isMdViewport, }: IMenuButtonStyle) => React.CSSProperties;
4
+ export declare const getActiveBtnStyle: (isActive: boolean) => React.CSSProperties;
5
+ export declare const getColorPickerPaperStyle: () => React.CSSProperties;
package/package.json CHANGED
@@ -1,150 +1,148 @@
1
- {
2
- "name": "eddyter",
3
- "private": false,
4
- "version": "1.3.75",
5
- "type": "module",
6
- "keywords": [
7
- "rich-text-editor",
8
- "text-editor",
9
- "wysiwyg",
10
- "editor",
11
- "ai-editor",
12
- "ai-writing",
13
- "ai-assistant",
14
- "content-editor",
15
- "document-editor",
16
- "web-editor",
17
- "react-editor",
18
- "javascript-editor",
19
- "frontend-component",
20
- "ui-component",
21
- "saas-editor",
22
- "api-key",
23
- "authenticated-editor",
24
- "pluggable-editor",
25
- "configurable-editor",
26
- "eddyter"
27
- ],
28
- "main": "dist/index.js",
29
- "module": "dist/index.js",
30
- "types": "dist/index.d.ts",
31
- "style": "dist/assets/style.css",
32
- "files": [
33
- "dist"
34
- ],
35
- "exports": {
36
- ".": {
37
- "import": "./dist/index.js",
38
- "types": "./dist/index.d.ts"
39
- },
40
- "./style.css": "./dist/assets/style.css"
41
- },
42
- "peerDependencies": {
43
- "react": "^18.2.0 || ^19.0.0",
44
- "react-dom": "^18.2.0 || ^19.0.0"
45
- },
46
- "dependencies": {
47
- "@aws-sdk/client-s3": "^3.744.0",
48
- "@aws-sdk/s3-request-presigner": "^3.744.0",
49
- "@emotion/react": "^11.10.6",
50
- "@emotion/styled": "^11.10.6",
51
- "@lexical/clipboard": "^0.24.0",
52
- "@lexical/code": "^0.24.0",
53
- "@lexical/dragon": "^0.24.0",
54
- "@lexical/history": "^0.24.0",
55
- "@lexical/html": "^0.24.0",
56
- "@lexical/link": "^0.24.0",
57
- "@lexical/list": "^0.24.0",
58
- "@lexical/markdown": "0.24.0",
59
- "@lexical/react": "^0.24.0",
60
- "@lexical/rich-text": "^0.24.0",
61
- "@lexical/selection": "^0.24.0",
62
- "@lexical/table": "^0.24.0",
63
- "@lexical/text": "^0.24.0",
64
- "@lexical/utils": "^0.24.0",
65
- "@mui/icons-material": "^5.11.9",
66
- "@mui/material": "^5.11.9",
67
- "@mui/styles": "^5.11.9",
68
- "@radix-ui/react-avatar": "^1.1.3",
69
- "@radix-ui/react-checkbox": "^1.1.4",
70
- "@radix-ui/react-dialog": "^1.1.6",
71
- "@radix-ui/react-dropdown-menu": "^2.1.6",
72
- "@radix-ui/react-label": "^2.1.2",
73
- "@radix-ui/react-popover": "^1.1.13",
74
- "@radix-ui/react-select": "^2.2.6",
75
- "@radix-ui/react-separator": "^1.1.2",
76
- "@radix-ui/react-slot": "^1.2.2",
77
- "@radix-ui/react-tabs": "^1.1.3",
78
- "@radix-ui/react-tooltip": "^1.1.8",
79
- "@types/react-signature-canvas": "^1.0.7",
80
- "axios": "^1.8.1",
81
- "class-variance-authority": "^0.7.1",
82
- "classnames": "^2.3.2",
83
- "clsx": "^2.1.1",
84
- "emoji-picker-react": "^4.12.0",
85
- "framer-motion": "^12.5.0",
86
- "html2pdf.js": "^0.14.0",
87
- "lexical": "^0.24.0",
88
- "lexical-ai-plugin": "0.0.2-alpha",
89
- "lodash-es": "^4.17.21",
90
- "lucide-react": "^0.344.0",
91
- "marked": "^17.0.1",
92
- "prettier": "^3.5.1",
93
- "react-colorful": "^5.6.1",
94
- "react-router-dom": "^7.2.0",
95
- "react-signature-canvas": "^1.1.0-alpha.1",
96
- "sass": "^1.57.1",
97
- "sonner": "^2.0.3",
98
- "tailwind-merge": "^3.0.2",
99
- "tailwindcss": "3",
100
- "tailwindcss-animate": "^1.0.7"
101
- },
102
- "license": "SEE LICENSE IN LICENSE",
103
- "devDependencies": {
104
- "@types/he": "^1.2.3",
105
- "@types/lodash-es": "^4.17.12",
106
- "@types/node": "^22.13.10",
107
- "@types/react": "^18.0.26",
108
- "@types/react-dom": "^18.0.9",
109
- "@typescript-eslint/eslint-plugin": "5.62.0",
110
- "@typescript-eslint/parser": "5.62.0",
111
- "@vitejs/plugin-react-swc": "^3.11.0",
112
- "autoprefixer": "^10.4.18",
113
- "cross-env": "^7.0.3",
114
- "eslint": "8.56.0",
115
- "eslint-config-prettier": "^10.1.1",
116
- "eslint-import-resolver-typescript": "^3.8.5",
117
- "eslint-plugin-import": "^2.31.0",
118
- "eslint-plugin-react": "^7.37.4",
119
- "eslint-plugin-react-hooks": "^5.2.0",
120
- "eslint-plugin-simple-import-sort": "^12.1.1",
121
- "eslint-plugin-unused-imports": "^4.1.4",
122
- "husky": "^9.1.7",
123
- "lint-staged": "^15.4.3",
124
- "postcss": "^8.4.35",
125
- "postcss-prefix-selector": "^2.1.1",
126
- "react": "^18.2.0",
127
- "react-dom": "^18.2.0",
128
- "typescript": "^5.3.3",
129
- "vite": "^5.4.21",
130
- "vite-plugin-dts": "^4.5.3",
131
- "vite-tsconfig-paths": "^5.1.4"
132
- },
133
- "lint-staged": {
134
- "*.{js,jsx,ts,tsx}": [
135
- "prettier --write",
136
- "eslint --fix"
137
- ]
138
- },
139
- "scripts": {
140
- "dev": "vite",
141
- "build": "tsc && vite build --mode production",
142
- "preview": "vite preview",
143
- "prettier:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
144
- "prettier:format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
145
- "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
146
- "lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
147
- "format": "pnpm prettier:format && pnpm lint:fix",
148
- "check": "pnpm prettier:check && pnpm lint"
149
- }
150
- }
1
+ {
2
+ "name": "eddyter",
3
+ "private": false,
4
+ "version": "1.3.77",
5
+ "type": "module",
6
+ "packageManager": "pnpm@9.0.0",
7
+ "keywords": [
8
+ "rich-text-editor",
9
+ "text-editor",
10
+ "wysiwyg",
11
+ "editor",
12
+ "ai-editor",
13
+ "ai-writing",
14
+ "ai-assistant",
15
+ "content-editor",
16
+ "document-editor",
17
+ "web-editor",
18
+ "react-editor",
19
+ "javascript-editor",
20
+ "frontend-component",
21
+ "ui-component",
22
+ "saas-editor",
23
+ "api-key",
24
+ "authenticated-editor",
25
+ "pluggable-editor",
26
+ "configurable-editor",
27
+ "eddyter"
28
+ ],
29
+ "main": "dist/index.js",
30
+ "module": "dist/index.js",
31
+ "types": "dist/index.d.ts",
32
+ "style": "dist/assets/style.css",
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "exports": {
37
+ ".": {
38
+ "import": "./dist/index.js",
39
+ "types": "./dist/index.d.ts"
40
+ },
41
+ "./style.css": "./dist/assets/style.css"
42
+ },
43
+ "peerDependencies": {
44
+ "react": "^18.2.0 || ^19.0.0",
45
+ "react-dom": "^18.2.0 || ^19.0.0"
46
+ },
47
+ "scripts": {
48
+ "dev": "vite",
49
+ "build": "tsc && vite build --mode production",
50
+ "preview": "vite preview",
51
+ "prettier:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
52
+ "prettier:format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
53
+ "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
54
+ "lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
55
+ "format": "pnpm prettier:format && pnpm lint:fix",
56
+ "check": "pnpm prettier:check && pnpm lint",
57
+ "prepare": "husky",
58
+ "prepublishOnly": "pnpm build"
59
+ },
60
+ "dependencies": {
61
+ "@lexical/clipboard": "^0.24.0",
62
+ "@lexical/code": "^0.24.0",
63
+ "@lexical/dragon": "^0.24.0",
64
+ "@lexical/history": "^0.24.0",
65
+ "@lexical/html": "^0.24.0",
66
+ "@lexical/link": "^0.24.0",
67
+ "@lexical/list": "^0.24.0",
68
+ "@lexical/markdown": "0.24.0",
69
+ "@lexical/react": "^0.24.0",
70
+ "@lexical/rich-text": "^0.24.0",
71
+ "@lexical/selection": "^0.24.0",
72
+ "@lexical/table": "^0.24.0",
73
+ "@lexical/text": "^0.24.0",
74
+ "@lexical/utils": "^0.24.0",
75
+ "@radix-ui/react-avatar": "^1.1.3",
76
+ "@radix-ui/react-checkbox": "^1.1.4",
77
+ "@radix-ui/react-dialog": "^1.1.6",
78
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
79
+ "@radix-ui/react-label": "^2.1.2",
80
+ "@radix-ui/react-popover": "^1.1.13",
81
+ "@radix-ui/react-select": "^2.2.6",
82
+ "@radix-ui/react-separator": "^1.1.2",
83
+ "@radix-ui/react-slot": "^1.2.2",
84
+ "@radix-ui/react-tabs": "^1.1.3",
85
+ "@radix-ui/react-tooltip": "^1.1.8",
86
+ "@types/react-signature-canvas": "^1.0.7",
87
+ "axios": "^1.8.1",
88
+ "class-variance-authority": "^0.7.1",
89
+ "clsx": "^2.1.1",
90
+ "docx-preview": "^0.3.0",
91
+ "emoji-picker-react": "^4.12.0",
92
+ "html-docx-js": "^0.3.1",
93
+ "html2canvas": "^1.4.1",
94
+ "html2pdf.js": "^0.14.0",
95
+ "lexical": "^0.24.0",
96
+ "lexical-ai-plugin": "0.0.2-alpha",
97
+ "lodash-es": "^4.17.21",
98
+ "lucide-react": "^0.344.0",
99
+ "marked": "^17.0.1",
100
+ "pdfjs-dist": "^3.11.174",
101
+ "prettier": "^3.5.1",
102
+ "react-colorful": "^5.6.1",
103
+ "react-router-dom": "^7.2.0",
104
+ "react-signature-canvas": "^1.1.0-alpha.1",
105
+ "sass": "^1.57.1",
106
+ "tailwind-merge": "^3.0.2",
107
+ "tailwindcss": "3",
108
+ "tailwindcss-animate": "^1.0.7",
109
+ "xlsx": "^0.18.5"
110
+ },
111
+ "license": "SEE LICENSE IN LICENSE",
112
+ "devDependencies": {
113
+ "@types/he": "^1.2.3",
114
+ "@types/lodash-es": "^4.17.12",
115
+ "@types/node": "^22.13.10",
116
+ "@types/react": "^18.0.26",
117
+ "@types/react-dom": "^18.0.9",
118
+ "@typescript-eslint/eslint-plugin": "5.62.0",
119
+ "@typescript-eslint/parser": "5.62.0",
120
+ "@vitejs/plugin-react-swc": "^3.11.0",
121
+ "autoprefixer": "^10.4.18",
122
+ "cross-env": "^7.0.3",
123
+ "eslint": "8.56.0",
124
+ "eslint-config-prettier": "^10.1.1",
125
+ "eslint-import-resolver-typescript": "^3.8.5",
126
+ "eslint-plugin-import": "^2.31.0",
127
+ "eslint-plugin-react": "^7.37.4",
128
+ "eslint-plugin-react-hooks": "^5.2.0",
129
+ "eslint-plugin-simple-import-sort": "^12.1.1",
130
+ "eslint-plugin-unused-imports": "^4.1.4",
131
+ "husky": "^9.1.7",
132
+ "lint-staged": "^15.4.3",
133
+ "postcss": "^8.4.35",
134
+ "postcss-prefix-selector": "^2.1.1",
135
+ "react": "^18.2.0",
136
+ "react-dom": "^18.2.0",
137
+ "typescript": "^5.3.3",
138
+ "vite": "^5.4.21",
139
+ "vite-plugin-dts": "^4.5.3",
140
+ "vite-tsconfig-paths": "^5.1.4"
141
+ },
142
+ "lint-staged": {
143
+ "*.{js,jsx,ts,tsx}": [
144
+ "prettier --write",
145
+ "eslint --fix"
146
+ ]
147
+ }
148
+ }