@cyberskill/cyber-editor 3.9.1 → 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.
Files changed (192) hide show
  1. package/README.md +126 -4
  2. package/dist/CyberEditor.d.ts +2 -0
  3. package/dist/CyberViewer.d.ts +2 -0
  4. package/dist/cyber-editor.cjs.js +703 -0
  5. package/dist/cyber-editor.css +1 -0
  6. package/dist/cyber-editor.es.js +52332 -0
  7. package/dist/index.d.ts +5 -20
  8. package/dist/modules/accordion/accordion-extension.d.ts +2 -1
  9. package/dist/modules/accordion/accordion-extension.type.d.ts +11 -0
  10. package/dist/modules/accordion/accordion-view.component.d.ts +2 -1
  11. package/dist/modules/accordion/accordion-view.type.d.ts +8 -2
  12. package/dist/modules/accordion/index.d.ts +4 -4
  13. package/dist/modules/color-picker/color-picker.component.d.ts +2 -1
  14. package/dist/modules/color-picker/color-picker.type.d.ts +4 -1
  15. package/dist/modules/color-picker/index.d.ts +2 -2
  16. package/dist/modules/heading/heading.component.d.ts +2 -1
  17. package/dist/modules/heading/heading.type.d.ts +4 -1
  18. package/dist/modules/heading/index.d.ts +2 -2
  19. package/dist/modules/image/enhanced-image-view.component.d.ts +2 -0
  20. package/dist/modules/image/enhanced-image.d.ts +27 -0
  21. package/dist/modules/image/image-view.type.d.ts +4 -2
  22. package/dist/modules/image/index.d.ts +2 -4
  23. package/dist/modules/index.d.ts +6 -20
  24. package/dist/modules/table/enhanced-table-cell-view.component.d.ts +2 -0
  25. package/dist/modules/table/enhanced-table-cell.d.ts +1 -0
  26. package/dist/modules/table/enhanced-table-view.component.d.ts +2 -0
  27. package/dist/modules/table/enhanced-table.d.ts +7 -0
  28. package/dist/modules/table/index.d.ts +6 -2
  29. package/dist/modules/table/table.component.d.ts +2 -1
  30. package/dist/modules/table/table.type.d.ts +6 -1
  31. package/dist/modules/toolbar/custom.d.ts +1 -0
  32. package/dist/modules/toolbar/font-family.d.ts +1 -0
  33. package/dist/modules/toolbar/font-size.d.ts +1 -0
  34. package/dist/modules/toolbar/index.d.ts +1 -2
  35. package/dist/modules/toolbar/table-controls.d.ts +1 -0
  36. package/dist/modules/video/index.d.ts +2 -0
  37. package/dist/modules/video/video-view.component.d.ts +16 -0
  38. package/dist/modules/video/video.d.ts +17 -0
  39. package/dist/playground/App.d.ts +1 -0
  40. package/dist/playground/main.d.ts +1 -0
  41. package/dist/shared/components/color-picker/color-picker.component.d.ts +2 -0
  42. package/dist/shared/components/color-picker/color-picker.type.d.ts +5 -0
  43. package/dist/shared/components/color-picker/index.d.ts +2 -0
  44. package/dist/shared/components/index.d.ts +2 -0
  45. package/dist/shared/components/modal-edit/index.d.ts +2 -0
  46. package/dist/shared/components/modal-edit/modal-edit.component.d.ts +2 -0
  47. package/dist/shared/components/modal-edit/modal-edit.type.d.ts +6 -0
  48. package/dist/shared/configs/env.d.ts +2 -0
  49. package/dist/shared/constants/alias.d.ts +4 -0
  50. package/dist/shared/constants/index.d.ts +1 -0
  51. package/dist/shared/providers/editor.d.ts +3 -0
  52. package/dist/shared/providers/index.d.ts +1 -0
  53. package/dist/shared/typescript/index.d.ts +8 -0
  54. package/dist/shared/utils/extensions.d.ts +16 -0
  55. package/dist/shared/utils/index.d.ts +1 -0
  56. package/package.json +64 -80
  57. package/dist/_tsup-dts-rollup.d.cts +0 -196
  58. package/dist/_tsup-dts-rollup.d.ts +0 -196
  59. package/dist/index.cjs +0 -1
  60. package/dist/index.d.cts +0 -20
  61. package/dist/index.js +0 -1
  62. package/dist/modules/accordion/accordion-extension.cjs +0 -1
  63. package/dist/modules/accordion/accordion-extension.d.cts +0 -1
  64. package/dist/modules/accordion/accordion-extension.js +0 -1
  65. package/dist/modules/accordion/accordion-view.component.cjs +0 -1
  66. package/dist/modules/accordion/accordion-view.component.d.cts +0 -1
  67. package/dist/modules/accordion/accordion-view.component.js +0 -1
  68. package/dist/modules/accordion/accordion-view.type.cjs +0 -1
  69. package/dist/modules/accordion/accordion-view.type.d.cts +0 -2
  70. package/dist/modules/accordion/accordion-view.type.js +0 -0
  71. package/dist/modules/accordion/index.cjs +0 -1
  72. package/dist/modules/accordion/index.d.cts +0 -4
  73. package/dist/modules/accordion/index.js +0 -1
  74. package/dist/modules/color-picker/color-picker.component.cjs +0 -1
  75. package/dist/modules/color-picker/color-picker.component.d.cts +0 -1
  76. package/dist/modules/color-picker/color-picker.component.js +0 -1
  77. package/dist/modules/color-picker/color-picker.type.cjs +0 -1
  78. package/dist/modules/color-picker/color-picker.type.d.cts +0 -1
  79. package/dist/modules/color-picker/color-picker.type.js +0 -0
  80. package/dist/modules/color-picker/index.cjs +0 -1
  81. package/dist/modules/color-picker/index.d.cts +0 -2
  82. package/dist/modules/color-picker/index.js +0 -1
  83. package/dist/modules/editor/editor.component.cjs +0 -1
  84. package/dist/modules/editor/editor.component.d.cts +0 -1
  85. package/dist/modules/editor/editor.component.d.ts +0 -1
  86. package/dist/modules/editor/editor.component.js +0 -1
  87. package/dist/modules/editor/editor.constant.cjs +0 -1
  88. package/dist/modules/editor/editor.constant.d.cts +0 -1
  89. package/dist/modules/editor/editor.constant.d.ts +0 -1
  90. package/dist/modules/editor/editor.constant.js +0 -1
  91. package/dist/modules/editor/editor.module.d.cts +0 -1
  92. package/dist/modules/editor/editor.module.d.ts +0 -1
  93. package/dist/modules/editor/editor.module.scss +0 -313
  94. package/dist/modules/editor/editor.type.cjs +0 -1
  95. package/dist/modules/editor/editor.type.d.cts +0 -1
  96. package/dist/modules/editor/editor.type.d.ts +0 -1
  97. package/dist/modules/editor/editor.type.js +0 -0
  98. package/dist/modules/editor/index.cjs +0 -1
  99. package/dist/modules/editor/index.d.cts +0 -3
  100. package/dist/modules/editor/index.d.ts +0 -3
  101. package/dist/modules/editor/index.js +0 -1
  102. package/dist/modules/heading/heading.component.cjs +0 -1
  103. package/dist/modules/heading/heading.component.d.cts +0 -1
  104. package/dist/modules/heading/heading.component.js +0 -1
  105. package/dist/modules/heading/heading.type.cjs +0 -1
  106. package/dist/modules/heading/heading.type.d.cts +0 -1
  107. package/dist/modules/heading/heading.type.js +0 -0
  108. package/dist/modules/heading/index.cjs +0 -1
  109. package/dist/modules/heading/index.d.cts +0 -2
  110. package/dist/modules/heading/index.js +0 -1
  111. package/dist/modules/home/home.page.cjs +0 -1
  112. package/dist/modules/home/home.page.d.cts +0 -1
  113. package/dist/modules/home/home.page.d.ts +0 -1
  114. package/dist/modules/home/home.page.js +0 -1
  115. package/dist/modules/home/index.cjs +0 -1
  116. package/dist/modules/home/index.d.cts +0 -1
  117. package/dist/modules/home/index.d.ts +0 -1
  118. package/dist/modules/home/index.js +0 -1
  119. package/dist/modules/image/image-view.component.cjs +0 -1
  120. package/dist/modules/image/image-view.component.d.cts +0 -1
  121. package/dist/modules/image/image-view.component.d.ts +0 -1
  122. package/dist/modules/image/image-view.component.js +0 -1
  123. package/dist/modules/image/image-view.type.cjs +0 -1
  124. package/dist/modules/image/image-view.type.d.cts +0 -2
  125. package/dist/modules/image/image-view.type.js +0 -0
  126. package/dist/modules/image/image.cjs +0 -1
  127. package/dist/modules/image/image.d.cts +0 -1
  128. package/dist/modules/image/image.d.ts +0 -1
  129. package/dist/modules/image/image.js +0 -1
  130. package/dist/modules/image/index.cjs +0 -1
  131. package/dist/modules/image/index.d.cts +0 -4
  132. package/dist/modules/image/index.js +0 -1
  133. package/dist/modules/index.cjs +0 -1
  134. package/dist/modules/index.d.cts +0 -20
  135. package/dist/modules/index.js +0 -1
  136. package/dist/modules/table/index.cjs +0 -1
  137. package/dist/modules/table/index.d.cts +0 -2
  138. package/dist/modules/table/index.js +0 -1
  139. package/dist/modules/table/table.component.cjs +0 -1
  140. package/dist/modules/table/table.component.d.cts +0 -1
  141. package/dist/modules/table/table.component.js +0 -1
  142. package/dist/modules/table/table.type.cjs +0 -1
  143. package/dist/modules/table/table.type.d.cts +0 -1
  144. package/dist/modules/table/table.type.js +0 -0
  145. package/dist/modules/toolbar/index.cjs +0 -1
  146. package/dist/modules/toolbar/index.d.cts +0 -2
  147. package/dist/modules/toolbar/index.js +0 -1
  148. package/dist/modules/toolbar/toolbar.component.cjs +0 -1
  149. package/dist/modules/toolbar/toolbar.component.d.cts +0 -1
  150. package/dist/modules/toolbar/toolbar.component.d.ts +0 -1
  151. package/dist/modules/toolbar/toolbar.component.js +0 -1
  152. package/dist/modules/toolbar/toolbar.custom.component.cjs +0 -1
  153. package/dist/modules/toolbar/toolbar.custom.component.d.cts +0 -1
  154. package/dist/modules/toolbar/toolbar.custom.component.d.ts +0 -1
  155. package/dist/modules/toolbar/toolbar.custom.component.js +0 -1
  156. package/dist/shared/component/color-picker/color-picker.component.cjs +0 -1
  157. package/dist/shared/component/color-picker/color-picker.component.d.cts +0 -1
  158. package/dist/shared/component/color-picker/color-picker.component.d.ts +0 -1
  159. package/dist/shared/component/color-picker/color-picker.component.js +0 -1
  160. package/dist/shared/component/color-picker/color-picker.type.cjs +0 -1
  161. package/dist/shared/component/color-picker/color-picker.type.d.cts +0 -1
  162. package/dist/shared/component/color-picker/color-picker.type.d.ts +0 -1
  163. package/dist/shared/component/color-picker/color-picker.type.js +0 -0
  164. package/dist/shared/component/color-picker/index.cjs +0 -1
  165. package/dist/shared/component/color-picker/index.d.cts +0 -2
  166. package/dist/shared/component/color-picker/index.d.ts +0 -2
  167. package/dist/shared/component/color-picker/index.js +0 -1
  168. package/dist/shared/component/index.cjs +0 -1
  169. package/dist/shared/component/index.d.cts +0 -4
  170. package/dist/shared/component/index.d.ts +0 -4
  171. package/dist/shared/component/index.js +0 -1
  172. package/dist/shared/component/modal-edit/index.cjs +0 -1
  173. package/dist/shared/component/modal-edit/index.d.cts +0 -2
  174. package/dist/shared/component/modal-edit/index.d.ts +0 -2
  175. package/dist/shared/component/modal-edit/index.js +0 -1
  176. package/dist/shared/component/modal-edit/modal-edit.component.cjs +0 -1
  177. package/dist/shared/component/modal-edit/modal-edit.component.d.cts +0 -1
  178. package/dist/shared/component/modal-edit/modal-edit.component.d.ts +0 -1
  179. package/dist/shared/component/modal-edit/modal-edit.component.js +0 -1
  180. package/dist/shared/component/modal-edit/modal-edit.type.cjs +0 -1
  181. package/dist/shared/component/modal-edit/modal-edit.type.d.cts +0 -1
  182. package/dist/shared/component/modal-edit/modal-edit.type.d.ts +0 -1
  183. package/dist/shared/component/modal-edit/modal-edit.type.js +0 -0
  184. package/dist/shared/style/global.css +0 -2
  185. package/dist/shared/style/global.d.cts +0 -1
  186. package/dist/shared/style/global.d.ts +0 -1
  187. package/dist/shared/typescript/style.d.cjs +0 -1
  188. package/dist/shared/typescript/style.d.d.cts +0 -1
  189. package/dist/shared/typescript/style.d.d.ts +0 -1
  190. package/dist/shared/typescript/style.d.js +0 -0
  191. /package/{public → dist}/assets/icons/index.ts +0 -0
  192. /package/{public → dist}/favicon.svg +0 -0
package/dist/index.d.ts CHANGED
@@ -1,20 +1,5 @@
1
- export { AccordionExtension } from './_tsup-dts-rollup.js';
2
- export { AccordionView } from './_tsup-dts-rollup.js';
3
- export { I_AccordionViewProps } from './_tsup-dts-rollup.js';
4
- export { T_AccordionCustomCommands } from './_tsup-dts-rollup.js';
5
- export { TextColorPicker } from './_tsup-dts-rollup.js';
6
- export { I_ColorPickerProps } from './_tsup-dts-rollup.js';
7
- export { Editor } from './_tsup-dts-rollup.js';
8
- export { EDITOR_EXTENSIONS } from './_tsup-dts-rollup.js';
9
- export { I_EditorProps } from './_tsup-dts-rollup.js';
10
- export { Heading } from './_tsup-dts-rollup.js';
11
- export { I_HeadingProps } from './_tsup-dts-rollup.js';
12
- export { HomePage } from './_tsup-dts-rollup.js';
13
- export { ImageView } from './_tsup-dts-rollup.js';
14
- export { I_ImageViewProps } from './_tsup-dts-rollup.js';
15
- export { T_ImageCustomCommands } from './_tsup-dts-rollup.js';
16
- export { Image } from './_tsup-dts-rollup.js';
17
- export { Table } from './_tsup-dts-rollup.js';
18
- export { I_TableSelectorProps } from './_tsup-dts-rollup.js';
19
- export { ToolBar } from './_tsup-dts-rollup.js';
20
- export { CustomExtensions } from './_tsup-dts-rollup.js';
1
+ import './shared/assets/styles/global.css';
2
+ export * from './shared/typescript';
3
+ export { CyberEditor } from './CyberEditor';
4
+ export { CyberViewer } from './CyberViewer';
5
+ export { EditorProvider } from './shared/providers/editor';
@@ -1 +1,2 @@
1
- export { AccordionExtension_alias_2 as AccordionExtension } from '../../_tsup-dts-rollup.js';
1
+ import { Node } from '@tiptap/core';
2
+ export declare const AccordionExtension: Node<any, any>;
@@ -0,0 +1,11 @@
1
+ declare module '@tiptap/core' {
2
+ interface Commands<ReturnType> {
3
+ customAccordion: {
4
+ setAccordion: (attrs?: {
5
+ title?: string;
6
+ content?: string;
7
+ }) => ReturnType;
8
+ };
9
+ }
10
+ }
11
+ export {};
@@ -1 +1,2 @@
1
- export { AccordionView_alias_3 as AccordionView } from '../../_tsup-dts-rollup.js';
1
+ import type { I_AccordionViewProps } from './accordion-view.type';
2
+ export declare function AccordionView({ node, updateAttributes, editor }: I_AccordionViewProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,8 @@
1
- export { I_AccordionViewProps_alias_2 as I_AccordionViewProps } from '../../_tsup-dts-rollup.js';
2
- export { T_AccordionCustomCommands_alias_2 as T_AccordionCustomCommands } from '../../_tsup-dts-rollup.js';
1
+ import type { Editor } from '@tiptap/react';
2
+ export interface I_AccordionViewProps {
3
+ node: any;
4
+ updateAttributes: (attrs: Record<string, any>) => void;
5
+ editor: Editor;
6
+ deleteNode?: () => void;
7
+ getPos?: () => number;
8
+ }
@@ -1,4 +1,4 @@
1
- export { AccordionExtension_alias_3 as AccordionExtension } from '../../_tsup-dts-rollup.js';
2
- export { AccordionView_alias_2 as AccordionView } from '../../_tsup-dts-rollup.js';
3
- export { I_AccordionViewProps_alias_3 as I_AccordionViewProps } from '../../_tsup-dts-rollup.js';
4
- export { T_AccordionCustomCommands_alias_3 as T_AccordionCustomCommands } from '../../_tsup-dts-rollup.js';
1
+ export * from './accordion-extension';
2
+ export * from './accordion-extension.type';
3
+ export * from './accordion-view.component';
4
+ export * from './accordion-view.type';
@@ -1 +1,2 @@
1
- export { TextColorPicker_alias_2 as TextColorPicker } from '../../_tsup-dts-rollup.js';
1
+ import type { I_ColorPickerProps } from './color-picker.type';
2
+ export declare function TextColorPicker({ editor }: I_ColorPickerProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,4 @@
1
- export { I_ColorPickerProps_alias_2 as I_ColorPickerProps } from '../../_tsup-dts-rollup.js';
1
+ import type { Editor } from '@tiptap/react';
2
+ export interface I_ColorPickerProps {
3
+ editor: Editor;
4
+ }
@@ -1,2 +1,2 @@
1
- export { TextColorPicker_alias_3 as TextColorPicker } from '../../_tsup-dts-rollup.js';
2
- export { I_ColorPickerProps_alias_5 as I_ColorPickerProps } from '../../_tsup-dts-rollup.js';
1
+ export * from './color-picker.component';
2
+ export * from './color-picker.type';
@@ -1 +1,2 @@
1
- export { Heading_alias_2 as Heading } from '../../_tsup-dts-rollup.js';
1
+ import type { I_HeadingProps } from './heading.type';
2
+ export declare function Heading({ editor }: I_HeadingProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1,4 @@
1
- export { I_HeadingProps_alias_2 as I_HeadingProps } from '../../_tsup-dts-rollup.js';
1
+ import type { Editor } from '@tiptap/react';
2
+ export interface I_HeadingProps {
3
+ editor: Editor;
4
+ }
@@ -1,2 +1,2 @@
1
- export { Heading_alias_3 as Heading } from '../../_tsup-dts-rollup.js';
2
- export { I_HeadingProps_alias_3 as I_HeadingProps } from '../../_tsup-dts-rollup.js';
1
+ export * from './heading.component';
2
+ export * from './heading.type';
@@ -0,0 +1,2 @@
1
+ import type { I_ImageViewProps } from './image-view.type';
2
+ export declare function EnhancedImageView({ node, updateAttributes, editor, selected, deleteNode, }: I_ImageViewProps): import("react/jsx-runtime").JSX.Element;
@@ -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>;
@@ -1,2 +1,4 @@
1
- export { I_ImageViewProps_alias_2 as I_ImageViewProps } from '../../_tsup-dts-rollup.js';
2
- export { T_ImageCustomCommands_alias_2 as T_ImageCustomCommands } from '../../_tsup-dts-rollup.js';
1
+ import type { Editor, NodeViewProps } from '@tiptap/core';
2
+ export interface I_ImageViewProps extends NodeViewProps {
3
+ editor: Editor;
4
+ }
@@ -1,4 +1,2 @@
1
- export { ImageView_alias_2 as ImageView } from '../../_tsup-dts-rollup.js';
2
- export { I_ImageViewProps_alias_3 as I_ImageViewProps } from '../../_tsup-dts-rollup.js';
3
- export { T_ImageCustomCommands_alias_3 as T_ImageCustomCommands } from '../../_tsup-dts-rollup.js';
4
- export { Image_alias_3 as Image } from '../../_tsup-dts-rollup.js';
1
+ export * from './enhanced-image';
2
+ export * from './enhanced-image-view.component';
@@ -1,20 +1,6 @@
1
- export { AccordionExtension_alias_1 as AccordionExtension } from '../_tsup-dts-rollup.js';
2
- export { AccordionView_alias_1 as AccordionView } from '../_tsup-dts-rollup.js';
3
- export { I_AccordionViewProps_alias_1 as I_AccordionViewProps } from '../_tsup-dts-rollup.js';
4
- export { T_AccordionCustomCommands_alias_1 as T_AccordionCustomCommands } from '../_tsup-dts-rollup.js';
5
- export { TextColorPicker_alias_1 as TextColorPicker } from '../_tsup-dts-rollup.js';
6
- export { I_ColorPickerProps_alias_1 as I_ColorPickerProps } from '../_tsup-dts-rollup.js';
7
- export { Editor_alias_1 as Editor } from '../_tsup-dts-rollup.js';
8
- export { EDITOR_EXTENSIONS_alias_1 as EDITOR_EXTENSIONS } from '../_tsup-dts-rollup.js';
9
- export { I_EditorProps_alias_1 as I_EditorProps } from '../_tsup-dts-rollup.js';
10
- export { Heading_alias_1 as Heading } from '../_tsup-dts-rollup.js';
11
- export { I_HeadingProps_alias_1 as I_HeadingProps } from '../_tsup-dts-rollup.js';
12
- export { HomePage_alias_1 as HomePage } from '../_tsup-dts-rollup.js';
13
- export { ImageView_alias_1 as ImageView } from '../_tsup-dts-rollup.js';
14
- export { I_ImageViewProps_alias_1 as I_ImageViewProps } from '../_tsup-dts-rollup.js';
15
- export { T_ImageCustomCommands_alias_1 as T_ImageCustomCommands } from '../_tsup-dts-rollup.js';
16
- export { Image_alias_1 as Image } from '../_tsup-dts-rollup.js';
17
- export { Table_alias_1 as Table } from '../_tsup-dts-rollup.js';
18
- export { I_TableSelectorProps_alias_1 as I_TableSelectorProps } from '../_tsup-dts-rollup.js';
19
- export { ToolBar_alias_1 as ToolBar } from '../_tsup-dts-rollup.js';
20
- export { CustomExtensions_alias_1 as CustomExtensions } from '../_tsup-dts-rollup.js';
1
+ export * from './accordion';
2
+ export * from './color-picker';
3
+ export * from './heading';
4
+ export * from './image';
5
+ export * from './table';
6
+ export * from './toolbar';
@@ -0,0 +1,2 @@
1
+ import { NodeViewProps } from '@tiptap/react';
2
+ export declare function EnhancedTableCellView({ node, updateAttributes, }: NodeViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const EnhancedTableCell: import("@tiptap/core").Node<import("@tiptap/extension-table-cell").TableCellOptions, any>;
@@ -0,0 +1,2 @@
1
+ import { NodeViewProps } from '@tiptap/react';
2
+ export declare function EnhancedTableView({ node, updateAttributes, editor, }: NodeViewProps): import("react/jsx-runtime").JSX.Element;
@@ -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>;
@@ -1,2 +1,6 @@
1
- export { Table_alias_2 as Table } from '../../_tsup-dts-rollup.js';
2
- export { I_TableSelectorProps_alias_2 as I_TableSelectorProps } from '../../_tsup-dts-rollup.js';
1
+ export * from './table.component';
2
+ export * from './table.type';
3
+ export * from './enhanced-table';
4
+ export * from './enhanced-table-cell';
5
+ export * from './enhanced-table-view.component';
6
+ export * from './enhanced-table-cell-view.component';
@@ -1 +1,2 @@
1
- export { Table_alias_3 as Table } from '../../_tsup-dts-rollup.js';
1
+ import type { I_TableSelectorProps } from './table.type';
2
+ export declare function Table({ editor, buttonClass, activeClass, }: I_TableSelectorProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,6 @@
1
- export { I_TableSelectorProps_alias_3 as I_TableSelectorProps } from '../../_tsup-dts-rollup.js';
1
+ import type { Editor } from '@tiptap/react';
2
+ export interface I_TableSelectorProps {
3
+ editor: Editor;
4
+ buttonClass: string;
5
+ activeClass: string;
6
+ }
@@ -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;
@@ -1,2 +1 @@
1
- export { ToolBar_alias_2 as ToolBar } from '../../_tsup-dts-rollup.js';
2
- export { CustomExtensions_alias_2 as CustomExtensions } from '../../_tsup-dts-rollup.js';
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,2 @@
1
+ export { Video } from './video';
2
+ export { VideoView } from './video-view.component';
@@ -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,2 @@
1
+ import type { I_ColorPickerProps } from './color-picker.type';
2
+ export declare function ColorPicker({ value, onChange }: I_ColorPickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { Color } from 'antd/es/color-picker';
2
+ export interface I_ColorPickerProps {
3
+ value: string;
4
+ onChange: (value: Color) => void;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './color-picker.component';
2
+ export * from './color-picker.type';
@@ -0,0 +1,2 @@
1
+ export * from './color-picker';
2
+ export * from './modal-edit';
@@ -0,0 +1,2 @@
1
+ export * from './modal-edit.component';
2
+ export * from './modal-edit.type';
@@ -0,0 +1,2 @@
1
+ import type { I_ModalEditProps } from './modal-edit.type';
2
+ export declare function ModalEdit({ title, childrenContent, editable, childrenEdit, }: I_ModalEditProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface I_ModalEditProps {
2
+ title: string;
3
+ childrenContent: React.ReactNode;
4
+ editable: boolean;
5
+ childrenEdit?: React.ReactNode;
6
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (mode?: string) => Record<string, string>;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export declare const VITE_ALIAS: {
2
+ '#modules': string;
3
+ '#shared': string;
4
+ };
@@ -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,8 @@
1
+ export interface I_CyberEditorProviderProps {
2
+ content?: string;
3
+ slotBefore?: boolean;
4
+ className?: string;
5
+ editorClassName?: string;
6
+ editable?: boolean;
7
+ onChange?: (content: string) => void;
8
+ }
@@ -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,97 +1,81 @@
1
1
  {
2
2
  "name": "@cyberskill/cyber-editor",
3
3
  "type": "module",
4
- "version": "3.9.1",
5
- "description": "Cyber Editor",
6
- "author": "Stephen Cheng",
7
- "license": "MIT",
8
- "homepage": "https://github.com/cyberskill-world/cyber-editor#readme",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/cyberskill-world/cyber-editor.git"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/cyberskill-world/cyber-editor/issues"
15
- },
4
+ "version": "4.0.0",
5
+ "description": "Update version tailwind v4 and plugin",
16
6
  "exports": {
17
7
  ".": {
18
8
  "types": "./dist/index.d.ts",
19
- "import": "./dist/index.js",
20
- "require": "./dist/index.cjs"
21
- }
9
+ "import": "./dist/cyber-editor.es.js",
10
+ "require": "./dist/cyber-editor.cjs.js"
11
+ },
12
+ "./index.css": "./dist/cyber-editor.css"
22
13
  },
14
+ "main": "dist/cyber-editor.cjs.js",
15
+ "module": "dist/cyber-editor.es.js",
16
+ "types": "dist/index.d.ts",
23
17
  "files": [
24
- "dist",
25
- "public"
18
+ "dist"
26
19
  ],
27
20
  "scripts": {
28
- "build": "tsup",
29
- "dev": "tsup --watch",
30
- "lint": "cyberskill lint",
31
- "lint:fix": "cyberskill lint:fix",
32
- "lint:inspect": "cyberskill lint:inspect",
33
- "reset": "cyberskill reset",
34
- "prepare": "cyberskill prepare",
35
- "inspect": "cyberskill inspect",
36
- "storybook": "storybook dev -p 6006",
37
- "build-storybook": "storybook build"
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"
38
29
  },
39
30
  "dependencies": {
40
- "@cyberskill/shared": "1.173.0",
41
- "@microsoft/api-extractor": "7.52.8",
42
- "@tiptap/core": "2.12.0",
43
- "@tiptap/extension-color": "2.12.0",
44
- "@tiptap/extension-heading": "2.12.0",
45
- "@tiptap/extension-highlight": "2.12.0",
46
- "@tiptap/extension-image": "2.12.0",
47
- "@tiptap/extension-list-item": "2.12.0",
48
- "@tiptap/extension-subscript": "2.12.0",
49
- "@tiptap/extension-superscript": "2.12.0",
50
- "@tiptap/extension-table": "2.12.0",
51
- "@tiptap/extension-table-cell": "2.12.0",
52
- "@tiptap/extension-table-header": "2.12.0",
53
- "@tiptap/extension-table-row": "2.12.0",
54
- "@tiptap/extension-task-item": "2.12.0",
55
- "@tiptap/extension-task-list": "2.12.0",
56
- "@tiptap/extension-text-align": "2.12.0",
57
- "@tiptap/extension-text-style": "2.12.0",
58
- "@tiptap/extension-underline": "2.12.0",
59
- "@tiptap/react": "2.12.0",
60
- "@tiptap/starter-kit": "2.12.0",
61
- "antd": "5.25.2",
62
- "clsx": "2.1.1",
63
- "lucide-react": "0.511.0",
64
- "react": "19.1.0",
65
- "react-dom": "19.1.0",
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",
64
+ "classnames": "2.5.1",
65
+ "lucide-react": "0.484.0",
66
+ "react": "19.0.0",
67
+ "react-dom": "19.0.0",
66
68
  "react-icons": "5.5.0",
67
- "react-router": "7.6.1",
68
- "tailwindcss": "4.1.7",
69
- "tsup": "8.5.0",
70
- "typescript": "5.8.3"
69
+ "react-resizable": "3.0.5",
70
+ "tailwindcss": "4.0.17",
71
+ "vite": "6.2.3"
71
72
  },
72
73
  "devDependencies": {
73
- "@chromatic-com/storybook": "^3.2.6",
74
- "@commitlint/cli": "19.8.1",
75
- "@commitlint/config-conventional": "19.8.1",
76
- "@eslint/config-inspector": "1.0.2",
77
- "@storybook/addon-essentials": "^8.6.14",
78
- "@storybook/addon-onboarding": "^8.6.14",
79
- "@storybook/blocks": "^8.6.14",
80
- "@storybook/react": "^8.6.14",
81
- "@storybook/react-vite": "^8.6.14",
82
- "@storybook/test": "^8.6.14",
83
- "@types/react": "19.1.5",
84
- "@types/react-dom": "19.1.5",
85
- "eslint": "9.27.0",
86
- "eslint-plugin-storybook": "0.12.0",
87
- "lint-staged": "16.0.0",
88
- "node-modules-inspector": "0.6.8",
89
- "simple-git-hooks": "2.13.0",
90
- "storybook": "^8.6.14"
91
- },
92
- "eslintConfig": {
93
- "extends": [
94
- "plugin:storybook/recommended"
95
- ]
74
+ "@types/node": "22.13.14",
75
+ "@types/react": "19.0.12",
76
+ "@types/react-dom": "19.0.4",
77
+ "@types/react-resizable": "3.0.8",
78
+ "cross-env": "7.0.3",
79
+ "typescript": "5.8.2"
96
80
  }
97
81
  }