react-tiptap-base-editor 1.3.0 → 1.3.2
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/dist/components/tiptap-icons/text-color-icon.d.ts +3 -0
- package/dist/components/tiptap-icons/text-color-icon.d.ts.map +1 -0
- package/dist/components/tiptap-icons/video-icon.d.ts +3 -0
- package/dist/components/tiptap-icons/video-icon.d.ts.map +1 -0
- package/dist/components/tiptap-node/resizable-image-node/resizable-image-component.d.ts.map +1 -1
- package/dist/components/tiptap-node/resizable-image-node/resizable-image-extension.d.ts.map +1 -1
- package/dist/components/tiptap-node/video-embed-node/index.d.ts +2 -0
- package/dist/components/tiptap-node/video-embed-node/index.d.ts.map +1 -0
- package/dist/components/tiptap-node/video-embed-node/video-embed-component.d.ts +4 -0
- package/dist/components/tiptap-node/video-embed-node/video-embed-component.d.ts.map +1 -0
- package/dist/components/tiptap-node/video-embed-node/video-embed-extension.d.ts +22 -0
- package/dist/components/tiptap-node/video-embed-node/video-embed-extension.d.ts.map +1 -0
- package/dist/components/tiptap-templates/simple/simple-editor.d.ts +1 -0
- package/dist/components/tiptap-templates/simple/simple-editor.d.ts.map +1 -1
- package/dist/components/tiptap-ui/color-highlight-popover/color-highlight-popover.d.ts +5 -13
- package/dist/components/tiptap-ui/color-highlight-popover/color-highlight-popover.d.ts.map +1 -1
- package/dist/components/tiptap-ui/text-align-button/use-text-align.d.ts.map +1 -1
- package/dist/components/tiptap-ui/text-color-button/index.d.ts +3 -0
- package/dist/components/tiptap-ui/text-color-button/index.d.ts.map +1 -0
- package/dist/components/tiptap-ui/text-color-button/text-color-button.d.ts +9 -0
- package/dist/components/tiptap-ui/text-color-button/text-color-button.d.ts.map +1 -0
- package/dist/components/tiptap-ui/text-color-button/use-text-color.d.ts +36 -0
- package/dist/components/tiptap-ui/text-color-button/use-text-color.d.ts.map +1 -0
- package/dist/components/tiptap-ui/video-embed-button/index.d.ts +3 -0
- package/dist/components/tiptap-ui/video-embed-button/index.d.ts.map +1 -0
- package/dist/components/tiptap-ui/video-embed-button/use-video-embed.d.ts +16 -0
- package/dist/components/tiptap-ui/video-embed-button/use-video-embed.d.ts.map +1 -0
- package/dist/components/tiptap-ui/video-embed-button/video-embed-button.d.ts +8 -0
- package/dist/components/tiptap-ui/video-embed-button/video-embed-button.d.ts.map +1 -0
- package/dist/index.cjs +61 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7132 -6370
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-color-icon.d.ts","sourceRoot":"","sources":["../../../src/components/tiptap-icons/text-color-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,eAAO,MAAM,aAAa,sDACE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,6CAmBxD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-icon.d.ts","sourceRoot":"","sources":["../../../src/components/tiptap-icons/video-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,eAAO,MAAM,SAAS,sDACM,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,6CAoBxD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable-image-component.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-node/resizable-image-node/resizable-image-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"resizable-image-component.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-node/resizable-image-node/resizable-image-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4N3D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable-image-extension.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-node/resizable-image-node/resizable-image-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAA;AAIpD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACpC;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,cAAc,EAAE;YACd;;eAEG;YACH,iBAAiB,EAAE,CAAC,OAAO,EAAE;gBAC3B,GAAG,EAAE,MAAM,CAAA;gBACX,GAAG,CAAC,EAAE,MAAM,CAAA;gBACZ,KAAK,CAAC,EAAE,MAAM,CAAA;gBACd,KAAK,CAAC,EAAE,MAAM,CAAA;aACf,KAAK,UAAU,CAAA;YAChB;;eAEG;YACH,YAAY,EAAE,CAAC,OAAO,EAAE;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE,KAAK,UAAU,CAAA;SAC1D,CAAA;KACF;CACF;AAED,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"resizable-image-extension.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-node/resizable-image-node/resizable-image-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAA;AAIpD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACpC;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,cAAc,EAAE;YACd;;eAEG;YACH,iBAAiB,EAAE,CAAC,OAAO,EAAE;gBAC3B,GAAG,EAAE,MAAM,CAAA;gBACX,GAAG,CAAC,EAAE,MAAM,CAAA;gBACZ,KAAK,CAAC,EAAE,MAAM,CAAA;gBACd,KAAK,CAAC,EAAE,MAAM,CAAA;aACf,KAAK,UAAU,CAAA;YAChB;;eAEG;YACH,YAAY,EAAE,CAAC,OAAO,EAAE;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE,KAAK,UAAU,CAAA;SAC1D,CAAA;KACF;CACF;AAED,eAAO,MAAM,cAAc,kCA8GzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-node/video-embed-node/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-embed-component.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-node/video-embed-node/video-embed-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyBvD,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export type VideoProvider = 'youtube' | 'vimeo' | 'other';
|
|
3
|
+
export interface VideoEmbedOptions {
|
|
4
|
+
HTMLAttributes: Record<string, any>;
|
|
5
|
+
allowFullscreen: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ParsedVideo {
|
|
8
|
+
embedUrl: string;
|
|
9
|
+
provider: VideoProvider;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseVideoUrl(url: string): ParsedVideo | null;
|
|
12
|
+
declare module '@tiptap/core' {
|
|
13
|
+
interface Commands<ReturnType> {
|
|
14
|
+
videoEmbed: {
|
|
15
|
+
setVideoEmbed: (options: {
|
|
16
|
+
src: string;
|
|
17
|
+
}) => ReturnType;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export declare const VideoEmbed: Node<VideoEmbedOptions, any>;
|
|
22
|
+
//# sourceMappingURL=video-embed-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-embed-extension.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-node/video-embed-node/video-embed-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAA;AAIpD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEzD,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnC,eAAe,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAiC7D;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,UAAU,EAAE;YACV,aAAa,EAAE,CAAC,OAAO,EAAE;gBAAE,GAAG,EAAE,MAAM,CAAA;aAAE,KAAK,UAAU,CAAA;SACxD,CAAA;KACF;CACF;AAED,eAAO,MAAM,UAAU,8BAqFrB,CAAA"}
|
|
@@ -6,6 +6,7 @@ import '@/components/tiptap-node/image-node/image-node.scss';
|
|
|
6
6
|
import '@/components/tiptap-node/resizable-image-node/resizable-image-node.scss';
|
|
7
7
|
import '@/components/tiptap-node/heading-node/heading-node.scss';
|
|
8
8
|
import '@/components/tiptap-node/paragraph-node/paragraph-node.scss';
|
|
9
|
+
import '@/components/tiptap-node/video-embed-node/video-embed-node.scss';
|
|
9
10
|
import '@/components/tiptap-templates/simple/simple-editor.scss';
|
|
10
11
|
export type TiptapEditorProps = {
|
|
11
12
|
id: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-templates/simple/simple-editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simple-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-templates/simple/simple-editor.tsx"],"names":[],"mappings":"AA6BA,OAAO,+DAA+D,CAAA;AACtE,OAAO,+DAA+D,CAAA;AACtE,OAAO,yEAAyE,CAAA;AAChF,OAAO,mDAAmD,CAAA;AAC1D,OAAO,qDAAqD,CAAA;AAC5D,OAAO,yEAAyE,CAAA;AAChF,OAAO,yDAAyD,CAAA;AAChE,OAAO,6DAA6D,CAAA;AACpE,OAAO,iEAAiE,CAAA;AAiCxE,OAAO,yDAAyD,CAAA;AAuGhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,aAAa,CAAC,EAAE,CACd,IAAI,EAAE,IAAI,EACV,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,EAClD,WAAW,CAAC,EAAE,WAAW,KACtB,OAAO,CAAC,MAAM,CAAC,CAAA;CACrB,CAAA;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAqHpD"}
|
|
@@ -2,26 +2,18 @@ import * as React from "react";
|
|
|
2
2
|
import { type Editor } from "@tiptap/react";
|
|
3
3
|
import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
|
|
4
4
|
import type { HighlightColor, UseColorHighlightConfig } from "@/components/tiptap-ui/color-highlight-button";
|
|
5
|
+
import type { TextColor } from "@/components/tiptap-ui/text-color-button";
|
|
5
6
|
export interface ColorHighlightPopoverContentProps {
|
|
6
|
-
/**
|
|
7
|
-
* The Tiptap editor instance.
|
|
8
|
-
*/
|
|
9
7
|
editor?: Editor | null;
|
|
10
|
-
/**
|
|
11
|
-
* Optional colors to use in the highlight popover.
|
|
12
|
-
* If not provided, defaults to a predefined set of colors.
|
|
13
|
-
*/
|
|
14
8
|
colors?: HighlightColor[];
|
|
9
|
+
textColors?: TextColor[];
|
|
15
10
|
}
|
|
16
11
|
export interface ColorHighlightPopoverProps extends Omit<ButtonProps, "type">, Pick<UseColorHighlightConfig, "editor" | "hideWhenUnavailable" | "onApplied"> {
|
|
17
|
-
/**
|
|
18
|
-
* Optional colors to use in the highlight popover.
|
|
19
|
-
* If not provided, defaults to a predefined set of colors.
|
|
20
|
-
*/
|
|
21
12
|
colors?: HighlightColor[];
|
|
13
|
+
textColors?: TextColor[];
|
|
22
14
|
}
|
|
23
15
|
export declare const ColorHighlightPopoverButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
-
export declare function ColorHighlightPopoverContent({ editor, colors, }: ColorHighlightPopoverContentProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare function ColorHighlightPopover({ editor: providedEditor, colors, hideWhenUnavailable, onApplied, ...props }: ColorHighlightPopoverProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export declare function ColorHighlightPopoverContent({ editor, colors, textColors, }: ColorHighlightPopoverContentProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ColorHighlightPopover({ editor: providedEditor, colors, textColors, hideWhenUnavailable, onApplied, ...props }: ColorHighlightPopoverProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
18
|
export default ColorHighlightPopover;
|
|
27
19
|
//# sourceMappingURL=color-highlight-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-highlight-popover.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAY3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAA;AAe1E,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,+CAA+C,CAAA;AAOtD,MAAM,WAAW,iCAAiC;IAChD
|
|
1
|
+
{"version":3,"file":"color-highlight-popover.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAY3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAA;AAe1E,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,+CAA+C,CAAA;AAOtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AAOzE,MAAM,WAAW,iCAAiC;IAChD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EAC/B,IAAI,CACF,uBAAuB,EACvB,QAAQ,GAAG,qBAAqB,GAAG,WAAW,CAC/C;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;CACzB;AAED,eAAO,MAAM,2BAA2B,uFAkBtC,CAAA;AAwBF,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,MAAiC,EACjC,UAAgC,GACjC,EAAE,iCAAiC,2CA8GnC;AAED,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EAAE,cAAc,EACtB,MAAiC,EACjC,UAAgC,EAChC,mBAA2B,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,0BAA0B,kDAoC5B;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-text-align.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/text-align-button/use-text-align.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"use-text-align.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/text-align-button/use-text-align.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAkB3C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAE/D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAK9D,CAAA;AAED,eAAO,MAAM,cAAc;;;;;CAK1B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAKrD,CAAA;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,EAAE,SAAS,GACf,OAAO,CAmBT;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,eAAe,GACxB,QAAQ,IAAI,eAAe,GAAG;IAC/B,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,eAAe,CAAA;CACpD,CAEA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,EAAE,SAAS,GACf,OAAO,CAGT;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAU7E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,mBAAmB,EAAE,OAAO,CAAA;IAC5B,KAAK,EAAE,SAAS,CAAA;CACjB,GAAG,OAAO,CAWV;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB;;;;;;;;EAgDtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/text-color-button/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { UseTextColorConfig } from "./use-text-color";
|
|
3
|
+
import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
|
|
4
|
+
import "@/components/tiptap-ui/text-color-button/text-color-button.scss";
|
|
5
|
+
export interface TextColorButtonProps extends Omit<ButtonProps, "type">, UseTextColorConfig {
|
|
6
|
+
text?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const TextColorButton: React.ForwardRefExoticComponent<TextColorButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
//# sourceMappingURL=text-color-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-color-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/text-color-button/text-color-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAA;AAG1E,OAAO,iEAAiE,CAAA;AAExE,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EAC/B,kBAAkB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,eAAe,gGAiF3B,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Editor } from "@tiptap/react";
|
|
3
|
+
export declare const TEXT_COLORS: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
border: string;
|
|
7
|
+
}[];
|
|
8
|
+
export type TextColor = (typeof TEXT_COLORS)[number];
|
|
9
|
+
export interface UseTextColorConfig {
|
|
10
|
+
editor?: Editor | null;
|
|
11
|
+
color?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
hideWhenUnavailable?: boolean;
|
|
14
|
+
onApplied?: ({ color, label }: {
|
|
15
|
+
color: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function pickTextColorsByValue(values: string[]): {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
border: string;
|
|
23
|
+
}[];
|
|
24
|
+
export declare function canSetTextColor(editor: Editor | null): boolean;
|
|
25
|
+
export declare function isTextColorActive(editor: Editor | null, color?: string): boolean;
|
|
26
|
+
export declare function removeTextColor(editor: Editor | null): boolean;
|
|
27
|
+
export declare function useTextColor(config: UseTextColorConfig): {
|
|
28
|
+
isVisible: boolean;
|
|
29
|
+
isActive: boolean;
|
|
30
|
+
handleSetColor: () => false | undefined;
|
|
31
|
+
handleRemoveColor: () => boolean;
|
|
32
|
+
canSetColor: boolean;
|
|
33
|
+
label: string;
|
|
34
|
+
Icon: React.MemoExoticComponent<({ className, ...props }: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element>;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=use-text-color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-text-color.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/text-color-button/use-text-color.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAM3C,eAAO,MAAM,WAAW;;;;GA8CvB,CAAA;AACD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,SAAS,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACzE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE;;;;IAKrD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAS9D;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAKT;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAG9D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB;;;;;;;;EAsEtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/video-embed-button/index.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Editor } from "@tiptap/react";
|
|
3
|
+
export interface UseVideoEmbedConfig {
|
|
4
|
+
editor?: Editor | null;
|
|
5
|
+
hideWhenUnavailable?: boolean;
|
|
6
|
+
onInserted?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function canInsertVideo(editor: Editor | null): boolean;
|
|
9
|
+
export declare function useVideoEmbed(config?: UseVideoEmbedConfig): {
|
|
10
|
+
isVisible: boolean;
|
|
11
|
+
canInsert: boolean;
|
|
12
|
+
insertVideo: (url: string) => any;
|
|
13
|
+
label: string;
|
|
14
|
+
Icon: React.MemoExoticComponent<({ className, ...props }: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-video-embed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-video-embed.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/video-embed-button/use-video-embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAK3C,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAG7D;AAED,wBAAgB,aAAa,CAAC,MAAM,GAAE,mBAAwB;;;uBA4CpD,MAAM;;;EAmBf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { UseVideoEmbedConfig } from "./use-video-embed";
|
|
3
|
+
import type { ButtonProps } from "@/components/tiptap-ui-primitive/button";
|
|
4
|
+
export interface VideoEmbedButtonProps extends Omit<ButtonProps, "type">, UseVideoEmbedConfig {
|
|
5
|
+
text?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const VideoEmbedButton: React.ForwardRefExoticComponent<VideoEmbedButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
//# sourceMappingURL=video-embed-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-embed-button.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap-ui/video-embed-button/video-embed-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAI5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAA;AAgB1E,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EAC/B,mBAAmB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,gBAAgB,iGAqJ5B,CAAA"}
|