@cyberskill/cyber-editor 3.9.0 → 4.0.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/README.md +126 -4
- package/dist/CyberEditor.d.ts +2 -0
- package/dist/CyberViewer.d.ts +2 -0
- package/dist/cyber-editor.cjs.js +703 -0
- package/dist/cyber-editor.css +1 -0
- package/dist/cyber-editor.es.js +52332 -0
- package/dist/index.d.ts +5 -0
- package/dist/modules/accordion/accordion-extension.d.ts +2 -0
- package/dist/modules/accordion/accordion-extension.type.d.ts +11 -0
- package/dist/modules/accordion/accordion-view.component.d.ts +2 -0
- package/dist/modules/accordion/accordion-view.type.d.ts +8 -0
- package/dist/modules/accordion/index.d.ts +4 -0
- package/dist/modules/color-picker/color-picker.component.d.ts +2 -0
- package/dist/modules/color-picker/color-picker.type.d.ts +4 -0
- package/dist/modules/color-picker/index.d.ts +2 -0
- package/dist/modules/heading/heading.component.d.ts +2 -0
- package/dist/modules/heading/heading.type.d.ts +4 -0
- package/dist/modules/heading/index.d.ts +2 -0
- package/dist/modules/image/enhanced-image-view.component.d.ts +2 -0
- package/dist/modules/image/enhanced-image.d.ts +27 -0
- package/dist/modules/image/image-view.type.d.ts +4 -0
- package/dist/modules/image/index.d.ts +2 -0
- package/dist/modules/index.d.ts +6 -0
- package/dist/modules/table/enhanced-table-cell-view.component.d.ts +2 -0
- package/dist/modules/table/enhanced-table-cell.d.ts +1 -0
- package/dist/modules/table/enhanced-table-view.component.d.ts +2 -0
- package/dist/modules/table/enhanced-table.d.ts +7 -0
- package/dist/modules/table/index.d.ts +6 -0
- package/dist/modules/table/table.component.d.ts +2 -0
- package/dist/modules/table/table.type.d.ts +6 -0
- package/dist/modules/toolbar/custom.d.ts +1 -0
- package/dist/modules/toolbar/font-family.d.ts +1 -0
- package/dist/modules/toolbar/font-size.d.ts +1 -0
- package/dist/modules/toolbar/index.d.ts +1 -0
- package/dist/modules/toolbar/table-controls.d.ts +1 -0
- package/dist/modules/video/index.d.ts +2 -0
- package/dist/modules/video/video-view.component.d.ts +16 -0
- package/dist/modules/video/video.d.ts +17 -0
- package/dist/playground/App.d.ts +1 -0
- package/dist/playground/main.d.ts +1 -0
- package/dist/shared/components/color-picker/color-picker.component.d.ts +2 -0
- package/dist/shared/components/color-picker/color-picker.type.d.ts +5 -0
- package/dist/shared/components/color-picker/index.d.ts +2 -0
- package/dist/shared/components/index.d.ts +2 -0
- package/dist/shared/components/modal-edit/index.d.ts +2 -0
- package/dist/shared/components/modal-edit/modal-edit.component.d.ts +2 -0
- package/dist/shared/components/modal-edit/modal-edit.type.d.ts +6 -0
- package/dist/shared/configs/env.d.ts +2 -0
- package/dist/shared/constants/alias.d.ts +4 -0
- package/dist/shared/constants/index.d.ts +1 -0
- package/dist/shared/providers/editor.d.ts +3 -0
- package/dist/shared/providers/index.d.ts +1 -0
- package/dist/shared/typescript/index.d.ts +8 -0
- package/dist/shared/utils/extensions.d.ts +16 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/package.json +60 -66
- package/dist/client/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/client/_commonjsHelpers-DwGv2jUC.cjs +0 -1
- package/dist/client/assets/manifest-e1ae6e39.js +0 -1
- package/dist/client/chunk-D4RADZKF-CqCYZIAv.js +0 -6257
- package/dist/client/chunk-D4RADZKF-sLhgGPy5.cjs +0 -56
- package/dist/client/cyber-editor.cjs.js +0 -259
- package/dist/client/cyber-editor.cjs2.js +0 -1
- package/dist/client/cyber-editor.cjs3.js +0 -1
- package/dist/client/cyber-editor.cjs4.js +0 -604
- package/dist/client/cyber-editor.cjs5.js +0 -1
- package/dist/client/cyber-editor.css +0 -1
- package/dist/client/cyber-editor.es.js +0 -25364
- package/dist/client/cyber-editor.es2.js +0 -43
- package/dist/client/cyber-editor.es3.js +0 -11
- package/dist/client/cyber-editor.es4.js +0 -46769
- package/dist/client/cyber-editor.es5.js +0 -11
- package/dist/client/index-HJNgKdvE.cjs +0 -5
- package/dist/client/index-rkLJDvut.js +0 -156
- package/dist/client/index.d.ts +0 -23
- package/dist/client/index.html +0 -6
- package/dist/client/with-props-Ba4118z_.js +0 -27
- package/dist/client/with-props-CuGIah2q.cjs +0 -1
- /package/dist/{client/assets → assets}/icons/index.ts +0 -0
- /package/dist/{client/favicon.svg → favicon.svg} +0 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface ImageOptions {
|
|
3
|
+
inline: boolean;
|
|
4
|
+
allowBase64: boolean;
|
|
5
|
+
HTMLAttributes: Record<string, any>;
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
}
|
|
8
|
+
declare module '@tiptap/core' {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
image: {
|
|
11
|
+
setImage: (options: {
|
|
12
|
+
src: string;
|
|
13
|
+
alt?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
width?: number | string;
|
|
16
|
+
height?: number | string;
|
|
17
|
+
align?: 'left' | 'center' | 'right';
|
|
18
|
+
float?: 'left' | 'right' | 'none';
|
|
19
|
+
caption?: string;
|
|
20
|
+
link?: string;
|
|
21
|
+
}) => ReturnType;
|
|
22
|
+
updateImage: (attrs: Record<string, any>) => ReturnType;
|
|
23
|
+
deleteImage: () => ReturnType;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export declare const EnhancedImage: Node<ImageOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EnhancedTableCell: import("@tiptap/core").Node<import("@tiptap/extension-table-cell").TableCellOptions, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface TableCellAttributes {
|
|
2
|
+
backgroundColor?: string;
|
|
3
|
+
borderColor?: string;
|
|
4
|
+
borderWidth?: string;
|
|
5
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
6
|
+
}
|
|
7
|
+
export declare const EnhancedTable: import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CustomExtensions({ editor }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FontFamily({ editor }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FontSize({ editor }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToolBar({ editor }: any): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TableControls({ editor }: any): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface VideoViewProps {
|
|
2
|
+
node: {
|
|
3
|
+
attrs: {
|
|
4
|
+
src: string;
|
|
5
|
+
width: string | number;
|
|
6
|
+
height: string | number;
|
|
7
|
+
provider: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
updateAttributes: (attrs: Record<string, any>) => void;
|
|
11
|
+
editor: any;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
deleteNode: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function VideoView({ node, updateAttributes, editor, selected, deleteNode, }: VideoViewProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface VideoOptions {
|
|
3
|
+
inline: boolean;
|
|
4
|
+
HTMLAttributes: Record<string, any>;
|
|
5
|
+
}
|
|
6
|
+
declare module '@tiptap/core' {
|
|
7
|
+
interface Commands<ReturnType> {
|
|
8
|
+
video: {
|
|
9
|
+
setVideo: (options: {
|
|
10
|
+
src: string;
|
|
11
|
+
width?: number | string;
|
|
12
|
+
height?: number | string;
|
|
13
|
+
}) => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const Video: Node<VideoOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function App(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../shared/assets/styles/global.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alias';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { I_CyberEditorProviderProps } from '#shared/typescript';
|
|
2
|
+
import '#shared/assets/styles/global.css';
|
|
3
|
+
export declare function EditorProvider({ content, slotBefore, className, editorClassName, editable, onChange, }: I_CyberEditorProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './editor';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
declare module '@tiptap/core' {
|
|
3
|
+
interface Commands<ReturnType> {
|
|
4
|
+
fontSize: {
|
|
5
|
+
setFontSize: (size: string) => ReturnType;
|
|
6
|
+
unsetFontSize: () => ReturnType;
|
|
7
|
+
};
|
|
8
|
+
fontFamily: {
|
|
9
|
+
setFontFamily: (font: string) => ReturnType;
|
|
10
|
+
unsetFontFamily: () => ReturnType;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export declare const FontSize: Extension<any, any>;
|
|
15
|
+
export declare const FontFamily: Extension<any, any>;
|
|
16
|
+
export declare const extensions: (import("@tiptap/core").Node<any, any> | Extension<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-underline").UnderlineOptions, any>)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './extensions';
|
package/package.json
CHANGED
|
@@ -1,87 +1,81 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberskill/cyber-editor",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
|
+
"description": "Update version tailwind v4 and plugin",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"types": "./dist/
|
|
9
|
-
"import": "./dist/
|
|
10
|
-
"require": "./dist/
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/cyber-editor.es.js",
|
|
10
|
+
"require": "./dist/cyber-editor.cjs.js"
|
|
11
11
|
},
|
|
12
|
-
"./index.css": "./dist/
|
|
12
|
+
"./index.css": "./dist/cyber-editor.css"
|
|
13
13
|
},
|
|
14
|
-
"main": "dist/
|
|
15
|
-
"module": "dist/
|
|
16
|
-
"types": "dist/
|
|
14
|
+
"main": "dist/cyber-editor.cjs.js",
|
|
15
|
+
"module": "dist/cyber-editor.es.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "
|
|
22
|
-
"dev": "
|
|
23
|
-
"lint": "cyberskill lint",
|
|
24
|
-
"lint:fix": "cyberskill lint:fix",
|
|
25
|
-
"lint:inspect": "cyberskill lint:inspect",
|
|
26
|
-
"reset": "cyberskill reset",
|
|
27
|
-
"
|
|
28
|
-
"inspect": "cyberskill inspect"
|
|
29
|
-
"start:dev": "dotenvx run -- react-router dev",
|
|
30
|
-
"start": "dotenvx run -- react-router-serve ./build/server/index.js"
|
|
21
|
+
"build": "cross-env NODE_ENV=production vite build && tsc --project tsconfig.app.json",
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"lint": "pnpm exec cyberskill lint",
|
|
24
|
+
"lint:fix": "pnpm exec cyberskill lint:fix",
|
|
25
|
+
"lint:inspect": "pnpm exec cyberskill lint:inspect",
|
|
26
|
+
"reset": "pnpm exec cyberskill reset",
|
|
27
|
+
"setup": "pnpm exec cyberskill setup",
|
|
28
|
+
"inspect": "pnpm exec cyberskill inspect"
|
|
31
29
|
},
|
|
32
30
|
"dependencies": {
|
|
33
|
-
"@cyberskill/shared": "1.
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@tiptap/
|
|
41
|
-
"@tiptap/extension-
|
|
42
|
-
"@tiptap/extension-
|
|
43
|
-
"@tiptap/extension-
|
|
44
|
-
"@tiptap/extension-
|
|
45
|
-
"@tiptap/extension-
|
|
46
|
-
"@tiptap/extension-
|
|
47
|
-
"@tiptap/extension-
|
|
48
|
-
"@tiptap/extension-
|
|
49
|
-
"@tiptap/extension-
|
|
50
|
-
"@tiptap/extension-
|
|
51
|
-
"@tiptap/extension-table
|
|
52
|
-
"@tiptap/extension-
|
|
53
|
-
"@tiptap/extension-
|
|
54
|
-
"@tiptap/extension-
|
|
55
|
-
"@tiptap/extension-
|
|
56
|
-
"@tiptap/extension-
|
|
57
|
-
"@tiptap/
|
|
58
|
-
"@tiptap/
|
|
59
|
-
"
|
|
31
|
+
"@cyberskill/shared": "1.47.0",
|
|
32
|
+
"@tailwindcss/vite": "4.0.17",
|
|
33
|
+
"@tiptap/core": "2.11.5",
|
|
34
|
+
"@tiptap/extension-bubble-menu": "3.18.0",
|
|
35
|
+
"@tiptap/extension-character-count": "3.18.0",
|
|
36
|
+
"@tiptap/extension-color": "2.11.5",
|
|
37
|
+
"@tiptap/extension-dropcursor": "3.18.0",
|
|
38
|
+
"@tiptap/extension-floating-menu": "3.18.0",
|
|
39
|
+
"@tiptap/extension-font-family": "3.18.0",
|
|
40
|
+
"@tiptap/extension-gapcursor": "3.18.0",
|
|
41
|
+
"@tiptap/extension-heading": "2.11.5",
|
|
42
|
+
"@tiptap/extension-highlight": "2.11.5",
|
|
43
|
+
"@tiptap/extension-image": "2.11.5",
|
|
44
|
+
"@tiptap/extension-link": "3.18.0",
|
|
45
|
+
"@tiptap/extension-list-item": "2.11.5",
|
|
46
|
+
"@tiptap/extension-placeholder": "3.18.0",
|
|
47
|
+
"@tiptap/extension-subscript": "2.11.5",
|
|
48
|
+
"@tiptap/extension-superscript": "2.11.5",
|
|
49
|
+
"@tiptap/extension-table": "2.11.5",
|
|
50
|
+
"@tiptap/extension-table-cell": "2.11.5",
|
|
51
|
+
"@tiptap/extension-table-header": "2.11.5",
|
|
52
|
+
"@tiptap/extension-table-row": "2.11.5",
|
|
53
|
+
"@tiptap/extension-task-item": "2.11.5",
|
|
54
|
+
"@tiptap/extension-task-list": "2.11.5",
|
|
55
|
+
"@tiptap/extension-text-align": "2.11.5",
|
|
56
|
+
"@tiptap/extension-text-style": "2.11.5",
|
|
57
|
+
"@tiptap/extension-typography": "3.18.0",
|
|
58
|
+
"@tiptap/extension-underline": "2.11.5",
|
|
59
|
+
"@tiptap/extension-youtube": "3.18.0",
|
|
60
|
+
"@tiptap/react": "2.11.5",
|
|
61
|
+
"@tiptap/starter-kit": "2.11.5",
|
|
62
|
+
"@vitejs/plugin-react-swc": "3.8.1",
|
|
63
|
+
"antd": "5.24.5",
|
|
60
64
|
"classnames": "2.5.1",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"npm-run-all2": "8.0.3",
|
|
65
|
-
"react": "19.1.0",
|
|
66
|
-
"react-dom": "19.1.0",
|
|
65
|
+
"lucide-react": "0.484.0",
|
|
66
|
+
"react": "19.0.0",
|
|
67
|
+
"react-dom": "19.0.0",
|
|
67
68
|
"react-icons": "5.5.0",
|
|
68
69
|
"react-resizable": "3.0.5",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"typescript": "5.8.3",
|
|
72
|
-
"vite": "6.3.5",
|
|
73
|
-
"vite-plugin-dts": "4.5.4"
|
|
70
|
+
"tailwindcss": "4.0.17",
|
|
71
|
+
"vite": "6.2.3"
|
|
74
72
|
},
|
|
75
73
|
"devDependencies": {
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@types/react": "19.1.5",
|
|
80
|
-
"@types/react-dom": "19.1.5",
|
|
74
|
+
"@types/node": "22.13.14",
|
|
75
|
+
"@types/react": "19.0.12",
|
|
76
|
+
"@types/react-dom": "19.0.4",
|
|
81
77
|
"@types/react-resizable": "3.0.8",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"node-modules-inspector": "0.6.8",
|
|
85
|
-
"simple-git-hooks": "2.13.0"
|
|
78
|
+
"cross-env": "7.0.3",
|
|
79
|
+
"typescript": "5.8.2"
|
|
86
80
|
}
|
|
87
81
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}exports.getDefaultExportFromCjs=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
window.__reactRouterManifest={"entry":{"module":"/cyber-editor.cjs.js","imports":["/chunk-D4RADZKF-sLhgGPy5.cjs","/_commonjsHelpers-DwGv2jUC.cjs"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs2.js","imports":["/chunk-D4RADZKF-sLhgGPy5.cjs","/_commonjsHelpers-DwGv2jUC.cjs","/with-props-CuGIah2q.cjs","/index-HJNgKdvE.cjs"],"css":[]},"shared/layout/blank/index":{"id":"shared/layout/blank/index","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs3.js","imports":["/with-props-CuGIah2q.cjs","/chunk-D4RADZKF-sLhgGPy5.cjs"],"css":[]},"pages/home/index":{"id":"pages/home/index","parentId":"shared/layout/blank/index","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs4.js","imports":["/with-props-CuGIah2q.cjs","/chunk-D4RADZKF-sLhgGPy5.cjs","/index-HJNgKdvE.cjs","/_commonjsHelpers-DwGv2jUC.cjs"],"css":[]},"pages/error/404":{"id":"pages/error/404","parentId":"root","path":"*?","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/cyber-editor.cjs5.js","imports":["/with-props-CuGIah2q.cjs","/chunk-D4RADZKF-sLhgGPy5.cjs"],"css":[]}},"url":"/assets/manifest-e1ae6e39.js","version":"e1ae6e39"};
|