@tnd028/strapi-plugin-tiptap-editor 0.0.1

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 (126) hide show
  1. package/README.md +3 -0
  2. package/dist/_chunks/Alignment-B0f2-LO0.js +135 -0
  3. package/dist/_chunks/Alignment-qMOzO-n2.mjs +133 -0
  4. package/dist/_chunks/Blockquote-9wBGDz3L.mjs +34 -0
  5. package/dist/_chunks/Blockquote-DeGUfK27.js +36 -0
  6. package/dist/_chunks/Bold-C-0g6Ayd.mjs +46 -0
  7. package/dist/_chunks/Bold-ClnPsPHt.js +48 -0
  8. package/dist/_chunks/ColorAndHighlight-BMmtoSpj.js +217 -0
  9. package/dist/_chunks/ColorAndHighlight-t1Ui5tcL.mjs +215 -0
  10. package/dist/_chunks/Emoji-Bm1_vSh5.mjs +263 -0
  11. package/dist/_chunks/Emoji-C-LQZ4Z3.js +265 -0
  12. package/dist/_chunks/Heading-BDJqd1Qw.js +125 -0
  13. package/dist/_chunks/Heading-BycRob5M.mjs +123 -0
  14. package/dist/_chunks/HorizontalRule-CJlDmdma.js +34 -0
  15. package/dist/_chunks/HorizontalRule-CzQCeC3b.mjs +32 -0
  16. package/dist/_chunks/Iframe-DCBWSb0v.mjs +165 -0
  17. package/dist/_chunks/Iframe-Dyn_2cMB.js +167 -0
  18. package/dist/_chunks/ImagePlaceholder-C14kojd5.js +71 -0
  19. package/dist/_chunks/ImagePlaceholder-DtrSuhf_.mjs +69 -0
  20. package/dist/_chunks/Italic-BfpKX0KX.mjs +34 -0
  21. package/dist/_chunks/Italic-DdhVL78v.js +36 -0
  22. package/dist/_chunks/Link-BuYDqSqo.js +61 -0
  23. package/dist/_chunks/Link-DUV5Ybep.mjs +59 -0
  24. package/dist/_chunks/Lists-BKopoFR6.js +107 -0
  25. package/dist/_chunks/Lists-DsKxj3MD.mjs +105 -0
  26. package/dist/_chunks/Redo-1mEX1yOd.js +35 -0
  27. package/dist/_chunks/Redo-Ca3VQxSe.mjs +33 -0
  28. package/dist/_chunks/SearchAndReplace-DmU5DlWv.mjs +347 -0
  29. package/dist/_chunks/SearchAndReplace-DzNdbTWJ.js +349 -0
  30. package/dist/_chunks/Strikethrough-BygxCHak.mjs +121 -0
  31. package/dist/_chunks/Strikethrough-DQfR4OFk.js +123 -0
  32. package/dist/_chunks/Table-BhbZ2Blv.mjs +123 -0
  33. package/dist/_chunks/Table-DLaqBAbz.js +125 -0
  34. package/dist/_chunks/TiptapEditorInput-BDE09h5-.mjs +6802 -0
  35. package/dist/_chunks/TiptapEditorInput-vfLsCt1p.js +6854 -0
  36. package/dist/_chunks/Undo-BuT4OkoE.js +32 -0
  37. package/dist/_chunks/Undo-PL5n4axf.mjs +30 -0
  38. package/dist/_chunks/en-B4KWt_jN.js +4 -0
  39. package/dist/_chunks/en-Byx4XI2L.mjs +4 -0
  40. package/dist/_chunks/index-ku90UbIF.mjs +1397 -0
  41. package/dist/_chunks/index-wYDv8vsJ.js +1398 -0
  42. package/dist/admin/index.js +6 -0
  43. package/dist/admin/index.mjs +6 -0
  44. package/dist/admin/src/components/ContentEditorInput.d.ts +10 -0
  45. package/dist/admin/src/components/GlobalStyling.d.ts +4 -0
  46. package/dist/admin/src/components/Initializer.d.ts +5 -0
  47. package/dist/admin/src/components/MediaLibraryModal.d.ts +27 -0
  48. package/dist/admin/src/components/PluginIcon.d.ts +2 -0
  49. package/dist/admin/src/components/TextEditorInput.d.ts +10 -0
  50. package/dist/admin/src/components/TiptapEditorInput.d.ts +6 -0
  51. package/dist/admin/src/components/editor/BaseEditor.d.ts +22 -0
  52. package/dist/admin/src/components/editor/ContentEditor.d.ts +10 -0
  53. package/dist/admin/src/components/editor/TextEditor.d.ts +10 -0
  54. package/dist/admin/src/components/editor/extensions/Heading.d.ts +2 -0
  55. package/dist/admin/src/components/editor/extensions/Iframe.d.ts +24 -0
  56. package/dist/admin/src/components/editor/extensions/Image.d.ts +3 -0
  57. package/dist/admin/src/components/editor/extensions/ImagePlaceholder.d.ts +15 -0
  58. package/dist/admin/src/components/editor/extensions/custom-component/CustomComponentEditPopover.d.ts +1 -0
  59. package/dist/admin/src/components/editor/extensions/custom-component/CustomComponentExtension.d.ts +3 -0
  60. package/dist/admin/src/components/editor/extensions/custom-component/CustomComponentInsertPopover.d.ts +13 -0
  61. package/dist/admin/src/components/editor/extensions/custom-component/CustomComponentRenderer.d.ts +1 -0
  62. package/dist/admin/src/components/editor/extensions/custom-component/Store.d.ts +20 -0
  63. package/dist/admin/src/components/editor/extensions/custom-component/types.d.ts +33 -0
  64. package/dist/admin/src/components/editor/extensions/fileHandler.d.ts +12 -0
  65. package/dist/admin/src/components/editor/extensions/link.d.ts +1 -0
  66. package/dist/admin/src/components/editor/extensions/noNewLine.d.ts +2 -0
  67. package/dist/admin/src/components/editor/extensions/resetMarksOnEnter.d.ts +2 -0
  68. package/dist/admin/src/components/editor/extensions/searchAndReplace.d.ts +53 -0
  69. package/dist/admin/src/components/editor/partials/EditorProvider.d.ts +13 -0
  70. package/dist/admin/src/components/editor/partials/LinkBubbleMenu.d.ts +5 -0
  71. package/dist/admin/src/components/editor/partials/LinkEditBlock.d.ts +9 -0
  72. package/dist/admin/src/components/editor/partials/LinkPopoverBlock.d.ts +8 -0
  73. package/dist/admin/src/components/editor/partials/ToolbarButton.d.ts +11 -0
  74. package/dist/admin/src/components/editor/partials/ToolbarButtons.d.ts +25 -0
  75. package/dist/admin/src/components/editor/toolbars/Alignment.d.ts +1 -0
  76. package/dist/admin/src/components/editor/toolbars/Blockquote.d.ts +4 -0
  77. package/dist/admin/src/components/editor/toolbars/Bold.d.ts +4 -0
  78. package/dist/admin/src/components/editor/toolbars/BulletList.d.ts +4 -0
  79. package/dist/admin/src/components/editor/toolbars/ColorAndHighlight.d.ts +5 -0
  80. package/dist/admin/src/components/editor/toolbars/Emoji.d.ts +4 -0
  81. package/dist/admin/src/components/editor/toolbars/Heading.d.ts +1 -0
  82. package/dist/admin/src/components/editor/toolbars/HorizontalRule.d.ts +4 -0
  83. package/dist/admin/src/components/editor/toolbars/Iframe.d.ts +3 -0
  84. package/dist/admin/src/components/editor/toolbars/ImagePlaceholder.d.ts +4 -0
  85. package/dist/admin/src/components/editor/toolbars/Italic.d.ts +4 -0
  86. package/dist/admin/src/components/editor/toolbars/Link.d.ts +4 -0
  87. package/dist/admin/src/components/editor/toolbars/Lists.d.ts +1 -0
  88. package/dist/admin/src/components/editor/toolbars/OrderedList.d.ts +4 -0
  89. package/dist/admin/src/components/editor/toolbars/Redo.d.ts +4 -0
  90. package/dist/admin/src/components/editor/toolbars/SearchAndReplace.d.ts +1 -0
  91. package/dist/admin/src/components/editor/toolbars/Strikethrough.d.ts +4 -0
  92. package/dist/admin/src/components/editor/toolbars/Table.d.ts +1 -0
  93. package/dist/admin/src/components/editor/toolbars/Undo.d.ts +4 -0
  94. package/dist/admin/src/components/editor/useEditor.d.ts +18 -0
  95. package/dist/admin/src/components/editor/utils.d.ts +28 -0
  96. package/dist/admin/src/components/ui/button.d.ts +9 -0
  97. package/dist/admin/src/components/ui/dropdown-menu.d.ts +27 -0
  98. package/dist/admin/src/components/ui/input.d.ts +6 -0
  99. package/dist/admin/src/components/ui/label.d.ts +7 -0
  100. package/dist/admin/src/components/ui/separator.d.ts +7 -0
  101. package/dist/admin/src/components/ui/toggle.d.ts +17 -0
  102. package/dist/admin/src/components/ui/tooltip.d.ts +7 -0
  103. package/dist/admin/src/config/index.d.ts +2 -0
  104. package/dist/admin/src/config/pluginConfig.d.ts +20 -0
  105. package/dist/admin/src/config/types.d.ts +109 -0
  106. package/dist/admin/src/errorSlicer.d.ts +4 -0
  107. package/dist/admin/src/exports.d.ts +4 -0
  108. package/dist/admin/src/hooks/useDebounceCallback.d.ts +9 -0
  109. package/dist/admin/src/index.d.ts +25 -0
  110. package/dist/admin/src/pluginId.d.ts +5 -0
  111. package/dist/admin/src/theme/additional.d.ts +1 -0
  112. package/dist/admin/src/theme/colorScheme.d.ts +2 -0
  113. package/dist/admin/src/theme/colors.d.ts +1 -0
  114. package/dist/admin/src/theme/common.d.ts +1 -0
  115. package/dist/admin/src/theme/index.d.ts +2 -0
  116. package/dist/admin/src/types.d.ts +15 -0
  117. package/dist/admin/src/utils/dom.d.ts +7 -0
  118. package/dist/admin/src/utils/getTranslation.d.ts +7 -0
  119. package/dist/admin/src/utils/isImageResponsive.d.ts +8 -0
  120. package/dist/admin/src/utils/localStorage.d.ts +21 -0
  121. package/dist/admin/src/utils/prefixWithBackendUrl.d.ts +6 -0
  122. package/dist/admin/src/utils/utils.d.ts +7 -0
  123. package/dist/server/index.js +15 -0
  124. package/dist/server/index.mjs +16 -0
  125. package/dist/server/src/index.d.ts +7 -0
  126. package/package.json +116 -0
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare const DropdownMenu: import("react").FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: import("react").FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean | undefined;
11
+ } & import("react").RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean | undefined;
16
+ } & import("react").RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean | undefined;
21
+ } & import("react").RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ onValueChange?: (value: string) => void;
4
+ }
5
+ declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
6
+ export { Input };
@@ -0,0 +1,7 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ interface LabelProps extends ComponentPropsWithoutRef<"label"> {
3
+ mandatory?: boolean;
4
+ optional?: boolean;
5
+ }
6
+ declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
7
+ export { Label };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type SeparatorOrientation = "horizontal" | "vertical";
3
+ declare const Separator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
+ orientation?: SeparatorOrientation | undefined;
5
+ decorative?: boolean | undefined;
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
7
+ export { Separator };
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
3
+ interface ToggleProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> {
4
+ variant?: "default" | "outline";
5
+ size?: "default" | "sm" | "lg";
6
+ }
7
+ declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ declare const toggleVariants: {
9
+ default: string;
10
+ outline: string;
11
+ sizes: {
12
+ default: string;
13
+ sm: string;
14
+ lg: string;
15
+ };
16
+ };
17
+ export { Toggle, toggleVariants };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ declare const TooltipProvider: import("react").FC<TooltipPrimitive.TooltipProviderProps>;
4
+ declare const Tooltip: import("react").FC<TooltipPrimitive.TooltipProps>;
5
+ declare const TooltipTrigger: import("react").ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ declare const TooltipContent: import("react").ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './pluginConfig';
@@ -0,0 +1,20 @@
1
+ import type { PluginConfig, UserPluginConfig } from './types';
2
+ /**
3
+ * Sets a configuration for the plugin.
4
+ *
5
+ * @remarks
6
+ *
7
+ * - Function must be invoked before the admin panel's bootstrap lifecycle function.
8
+ * The recommended way is to invoke it within the admin panel's register lifecycle function.
9
+ *
10
+ * - Provided properties will overwrite the default configuration values.
11
+ *
12
+ * @param userConfig - Plugin configuration object.
13
+ */
14
+ export declare function setPluginConfig(userPluginConfig: UserPluginConfig): void;
15
+ /**
16
+ * Retrieves current plugin configuration.
17
+ *
18
+ * @internal
19
+ */
20
+ export declare function getPluginConfig(): PluginConfig;
@@ -0,0 +1,109 @@
1
+ import type { Interpolation } from 'styled-components';
2
+ /**
3
+ * Plugin configuration object.
4
+ *
5
+ * @internal
6
+ */
7
+ export type PluginConfig = {
8
+ theme: Theme;
9
+ };
10
+ /**
11
+ * Used to register a preset option in the admin panel.
12
+ *
13
+ * @internal
14
+ *
15
+ * @see {@link https://docs.strapi.io/dev-docs/custom-fields#options | Strapi documentation}
16
+ */
17
+ export type Option = {
18
+ metadatas: Metadatas;
19
+ key: string | number;
20
+ /**
21
+ * @remarks
22
+ *
23
+ * The value must match the corresponding key in the presets.
24
+ */
25
+ value: string | number;
26
+ };
27
+ /**
28
+ * Used to register a preset option in the admin panel.
29
+ *
30
+ * @internal
31
+ *
32
+ * @see {@link https://docs.strapi.io/dev-docs/custom-fields#options | Strapi documentation}
33
+ */
34
+ export type Metadatas = {
35
+ intlLabel: IntlLabel;
36
+ };
37
+ /**
38
+ * Used to register a preset option in the admin panel.
39
+ *
40
+ * @internal
41
+ *
42
+ * @see {@link https://docs.strapi.io/dev-docs/custom-fields#options | Strapi documentation}
43
+ */
44
+ export type IntlLabel = {
45
+ id: string;
46
+ defaultMessage: string;
47
+ values?: object;
48
+ };
49
+ /**
50
+ * Plugin configuration object.
51
+ */
52
+ export type UserPluginConfig = {
53
+ /**
54
+ * Presets are sets of settings that define the editor's features and appearance.
55
+ */
56
+ presets?: Preset[];
57
+ /**
58
+ * Styles applied globally to every editor instance.
59
+ */
60
+ theme?: Theme;
61
+ };
62
+ /**
63
+ * Styles applied globally to every editor instance.
64
+ *
65
+ * @remarks
66
+ *
67
+ * The `common` styles are applied first, followed by `light` or `dark` styles
68
+ * according to user preferences, and finally `additional` styles.
69
+ */
70
+ export type Theme = {
71
+ /**
72
+ * Core styles.
73
+ */
74
+ common?: EditorStyles;
75
+ /**
76
+ * Styles applied in light mode.
77
+ */
78
+ light?: EditorStyles;
79
+ /**
80
+ * Styles applied in dark mode.
81
+ */
82
+ dark?: EditorStyles;
83
+ /**
84
+ * Additional styles that complement the theme.
85
+ */
86
+ additional?: EditorStyles;
87
+ };
88
+ /**
89
+ * Represents styles that can be applied to an editor instance.
90
+ * Can be a plain CSS string or an array of interpolations for dynamic styling.
91
+ */
92
+ export type EditorStyles = string | Interpolation<object>[];
93
+ /**
94
+ * Preset is a set of settings that define the editor's features and appearance.
95
+ */
96
+ export type Preset = {
97
+ /**
98
+ * Preset name, displayed in the schema.
99
+ */
100
+ name: string;
101
+ /**
102
+ * Preset description, displayed in the Content-Type Builder.
103
+ */
104
+ description: string;
105
+ /**
106
+ * Additional styles applied to the editor instance after the theme styles.
107
+ */
108
+ styles?: EditorStyles;
109
+ };
@@ -0,0 +1,4 @@
1
+ declare const originalError: {
2
+ (...data: any[]): void;
3
+ (message?: any, ...optionalParams: any[]): void;
4
+ };
@@ -0,0 +1,4 @@
1
+ declare const clonedDefaultTheme: import("./config").Theme;
2
+ export { clonedDefaultTheme as defaultTheme };
3
+ export type { UserPluginConfig as PluginConfig, Preset, Theme, EditorStyles, } from './config/types';
4
+ export { setPluginConfig } from './config';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * useDebounceCallback
3
+ * Membuat callback yang akan dijalankan setelah delay tertentu
4
+ * sejak terakhir kali dipanggil.
5
+ *
6
+ * @param callback - fungsi yang ingin didebounce
7
+ * @param delay - waktu tunggu (ms) sebelum callback dijalankan
8
+ */
9
+ export declare function useDebounceCallback<T extends (...args: any[]) => void>(callback: T, delay: number): (...args: Parameters<T>) => void;
@@ -0,0 +1,25 @@
1
+ export * from './exports';
2
+ /**
3
+ * Strapi Plugin Entry Point
4
+ * Registers the Tiptap Editor plugin and its custom fields.
5
+ */
6
+ declare const _default: {
7
+ /**
8
+ * Registers the plugin with the Strapi admin application.
9
+ * @param app - The Strapi administration application instance.
10
+ */
11
+ register(app: any): Promise<void>;
12
+ /**
13
+ * Registers translations for the plugin.
14
+ * @param {Object} context - Context object containing supported locales.
15
+ * @param {string[]} context.locales - Array of locale codes.
16
+ * @returns {Promise<Array>} Array of translation objects.
17
+ */
18
+ registerTrads({ locales }: {
19
+ locales: string[];
20
+ }): Promise<{
21
+ data: any;
22
+ locale: string;
23
+ }[]>;
24
+ };
25
+ export default _default;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The unique identifier for the Tiptap Editor plugin.
3
+ * Used for registration in Strapi and translation keys.
4
+ */
5
+ export declare const PLUGIN_ID = "tiptap-editor";
@@ -0,0 +1 @@
1
+ export declare const additional: import("styled-components").RuleSet<object>;
@@ -0,0 +1,2 @@
1
+ export declare const light: import("styled-components").RuleSet<object>;
2
+ export declare const dark: import("styled-components").RuleSet<object>;
@@ -0,0 +1 @@
1
+ export declare const colors: import("styled-components").RuleSet<object>;
@@ -0,0 +1 @@
1
+ export declare const common: import("styled-components").RuleSet<object>;
@@ -0,0 +1,2 @@
1
+ import type { Theme } from '../config';
2
+ export declare const defaultTheme: Theme;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { JSONContent } from "@tiptap/core";
3
+ import type { InputProps, FieldValue } from '@strapi/strapi/admin';
4
+ export type TiptapJSONInputProps = Readonly<InputProps & FieldValue & {
5
+ value?: JSONContent | JSONContent[] | null;
6
+ labelAction?: React.ReactNode;
7
+ attribute: {
8
+ options: {};
9
+ pluginOptions?: {
10
+ i18n?: {
11
+ localized?: boolean;
12
+ };
13
+ };
14
+ };
15
+ }>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Safely resets pointer events on the body element after a delay.
3
+ * Useful for handling transition end cases where pointer-events might get stuck.
4
+ *
5
+ * @param delay - Delay in milliseconds before resetting (default: 100).
6
+ */
7
+ export declare function safelyResetPointerEvents(delay?: number): void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Generates a translation key prefixed with the plugin ID.
3
+ * @param id - The translation identifier.
4
+ * @returns The namespaced translation key.
5
+ */
6
+ declare const getTranslation: (id: string) => string;
7
+ export { getTranslation };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Checks if an image has responsive formats available.
3
+ * @param imgFormats - The formats object from the image data.
4
+ * @returns True if responsive formats exist, false otherwise.
5
+ */
6
+ export declare function isImageResponsive(imgFormats: {
7
+ [k: string]: Object;
8
+ }): boolean;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Retrieves a cookie value by name.
3
+ * @param name - The name of the cookie.
4
+ * @returns The cookie value or null if not found.
5
+ */
6
+ export declare function getCookieValue(name: string): string | null;
7
+ /**
8
+ * Retrieves the stored JWT token from local storage, session storage, or cookies.
9
+ * @returns The token string or null.
10
+ */
11
+ export declare function getStoredToken(): string | null;
12
+ /**
13
+ * Retrieves the user's preferred language.
14
+ * @returns The language code (default: 'en').
15
+ */
16
+ export declare function getPreferedLanguage(): string;
17
+ /**
18
+ * Retrieves the user's profile theme preference.
19
+ * @returns 'light', 'dark', 'system', or null.
20
+ */
21
+ export declare function getProfileTheme(): 'light' | 'dark' | 'system' | null;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Prefixes a URL with the Strapi backend URL if it's a relative path.
3
+ * @param url - The URL to process.
4
+ * @returns The full URL.
5
+ */
6
+ export declare const prefixWithBackendUrl: (url: string) => string;
@@ -0,0 +1,7 @@
1
+ import { type ClassValue } from "clsx";
2
+ /**
3
+ * Merges class names using clsx.
4
+ * @param inputs - Class values to merge.
5
+ * @returns The merged class string.
6
+ */
7
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ const index = {
3
+ register: ({ strapi }) => {
4
+ strapi.customFields.register({
5
+ name: "tiptap",
6
+ plugin: "tiptap-editor",
7
+ type: "json",
8
+ inputSize: {
9
+ default: 12,
10
+ isResizable: true
11
+ }
12
+ });
13
+ }
14
+ };
15
+ module.exports = index;
@@ -0,0 +1,16 @@
1
+ const index = {
2
+ register: ({ strapi }) => {
3
+ strapi.customFields.register({
4
+ name: "tiptap",
5
+ plugin: "tiptap-editor",
6
+ type: "json",
7
+ inputSize: {
8
+ default: 12,
9
+ isResizable: true
10
+ }
11
+ });
12
+ }
13
+ };
14
+ export {
15
+ index as default
16
+ };
@@ -0,0 +1,7 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const _default: {
3
+ register: ({ strapi }: {
4
+ strapi: Core.Strapi;
5
+ }) => void;
6
+ };
7
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,116 @@
1
+ {
2
+ "version": "0.0.1",
3
+ "keywords": [],
4
+ "type": "commonjs",
5
+ "exports": {
6
+ "./package.json": "./package.json",
7
+ "./strapi-admin": {
8
+ "types": "./dist/admin/src/index.d.ts",
9
+ "source": "./admin/src/index.ts",
10
+ "import": "./dist/admin/index.mjs",
11
+ "require": "./dist/admin/index.js",
12
+ "default": "./dist/admin/index.js"
13
+ },
14
+ "./strapi-server": {
15
+ "types": "./dist/server/src/index.d.ts",
16
+ "source": "./server/src/index.ts",
17
+ "import": "./dist/server/index.mjs",
18
+ "require": "./dist/server/index.js",
19
+ "default": "./dist/server/index.js"
20
+ }
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "strapi-plugin build",
27
+ "watch": "strapi-plugin watch",
28
+ "watch:link": "strapi-plugin watch:link",
29
+ "verify": "strapi-plugin verify",
30
+ "test:ts:front": "run -T tsc -p admin/tsconfig.json",
31
+ "test:ts:back": "run -T tsc -p server/tsconfig.json"
32
+ },
33
+ "dependencies": {
34
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
35
+ "@radix-ui/react-slot": "^1.2.4",
36
+ "@radix-ui/react-toggle": "^1.1.10",
37
+ "@radix-ui/react-tooltip": "^1.2.8",
38
+ "@strapi/design-system": "^2.0.0-rc.30",
39
+ "@strapi/icons": "^2.0.0-rc.30",
40
+ "@tiptap/core": "^2.9.1",
41
+ "@tiptap/extension-blockquote": "^2.9.1",
42
+ "@tiptap/extension-bold": "^2.9.1",
43
+ "@tiptap/extension-bullet-list": "^2.9.1",
44
+ "@tiptap/extension-color": "^2.9.1",
45
+ "@tiptap/extension-document": "^2.9.1",
46
+ "@tiptap/extension-dropcursor": "^2.9.1",
47
+ "@tiptap/extension-emoji": "^2.27.1",
48
+ "@tiptap/extension-gapcursor": "^2.9.1",
49
+ "@tiptap/extension-heading": "^2.9.1",
50
+ "@tiptap/extension-highlight": "^2.9.1",
51
+ "@tiptap/extension-history": "^2.9.1",
52
+ "@tiptap/extension-horizontal-rule": "^2.9.1",
53
+ "@tiptap/extension-image": "^2.9.1",
54
+ "@tiptap/extension-italic": "^2.9.1",
55
+ "@tiptap/extension-link": "^2.9.1",
56
+ "@tiptap/extension-list-item": "^2.9.1",
57
+ "@tiptap/extension-ordered-list": "^2.9.1",
58
+ "@tiptap/extension-paragraph": "^2.9.1",
59
+ "@tiptap/extension-strike": "^2.9.1",
60
+ "@tiptap/extension-table": "^2.9.1",
61
+ "@tiptap/extension-table-cell": "^2.9.1",
62
+ "@tiptap/extension-table-header": "^2.9.1",
63
+ "@tiptap/extension-table-row": "^2.9.1",
64
+ "@tiptap/extension-task-item": "^2.27.1",
65
+ "@tiptap/extension-task-list": "^2.27.1",
66
+ "@tiptap/extension-text": "^2.9.1",
67
+ "@tiptap/extension-text-align": "^2.9.1",
68
+ "@tiptap/extension-text-style": "^2.9.1",
69
+ "@tiptap/extension-underline": "^2.27.1",
70
+ "@tiptap/html": "^2.9.1",
71
+ "@tiptap/pm": "^2.9.1",
72
+ "@tiptap/react": "^2.9.1",
73
+ "@tiptap/suggestion": "2.9.1",
74
+ "autoprefixer": "^10.4.21",
75
+ "clsx": "^2.1.1",
76
+ "lucide-react": "^0.553.0",
77
+ "react-intl": "^7.1.14"
78
+ },
79
+ "devDependencies": {
80
+ "@strapi/sdk-plugin": "^5.3.2",
81
+ "@strapi/strapi": "^5.30.1",
82
+ "@strapi/typescript-utils": "^5.30.1",
83
+ "@types/react": "^19.2.2",
84
+ "@types/react-dom": "^19.2.2",
85
+ "prettier": "^3.6.2",
86
+ "react": "^18.3.1",
87
+ "react-dom": "^18.3.1",
88
+ "react-router-dom": "^6.30.1",
89
+ "styled-components": "^6.1.19",
90
+ "typescript": "^5.9.3"
91
+ },
92
+ "peerDependencies": {
93
+ "@strapi/sdk-plugin": "^5.3.2",
94
+ "@strapi/strapi": "^5.30.1",
95
+ "react": "^18.3.1",
96
+ "react-dom": "^18.3.1",
97
+ "react-router-dom": "^6.30.1",
98
+ "styled-components": "^6.1.19"
99
+ },
100
+ "strapi": {
101
+ "kind": "plugin",
102
+ "name": "tiptap-editor",
103
+ "displayName": "Tiptap Editor",
104
+ "description": "Tiptap editor for Strapi 5",
105
+ "customFields": [
106
+ "tiptap"
107
+ ]
108
+ },
109
+ "name": "@tnd028/strapi-plugin-tiptap-editor",
110
+ "repository": {
111
+ "type": "git",
112
+ "url": "https://github.com/thinhnd028/strapi-plugin-tiptap-editor.git"
113
+ },
114
+ "description": "Tiptap editor for Strapi 5",
115
+ "license": "MIT"
116
+ }