@zencemarketing/text-editor-sdk 0.1.0-alpha.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 +666 -0
- package/dist/App.d.ts +4 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/components/ColorPicker.d.ts +10 -0
- package/dist/components/ColorPicker.d.ts.map +1 -0
- package/dist/components/EditorElement.d.ts +4 -0
- package/dist/components/EditorElement.d.ts.map +1 -0
- package/dist/components/EditorLeaf.d.ts +4 -0
- package/dist/components/EditorLeaf.d.ts.map +1 -0
- package/dist/components/EmojiPicker.d.ts +7 -0
- package/dist/components/EmojiPicker.d.ts.map +1 -0
- package/dist/components/PasteOptionsMenu.d.ts +13 -0
- package/dist/components/PasteOptionsMenu.d.ts.map +1 -0
- package/dist/components/Resizable.d.ts +17 -0
- package/dist/components/Resizable.d.ts.map +1 -0
- package/dist/components/RichTextEditor.d.ts +6 -0
- package/dist/components/RichTextEditor.d.ts.map +1 -0
- package/dist/components/Toolbar.d.ts +24 -0
- package/dist/components/Toolbar.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.css +1 -0
- package/dist/index.esm.js +37225 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +37230 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/types/index.d.ts +390 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/slate.d.ts +82 -0
- package/dist/types/slate.d.ts.map +1 -0
- package/dist/utils/pasteHelpers.d.ts +5 -0
- package/dist/utils/pasteHelpers.d.ts.map +1 -0
- package/dist/utils/slateHelpers.d.ts +25 -0
- package/dist/utils/slateHelpers.d.ts.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../src/components/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAU3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './PasteOptionsMenu.css';
|
|
3
|
+
interface PasteOptionsMenuProps {
|
|
4
|
+
position: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
onSelect: (mode: 'keep' | 'plain' | 'match') => void;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const PasteOptionsMenu: React.FC<PasteOptionsMenuProps>;
|
|
12
|
+
export default PasteOptionsMenu;
|
|
13
|
+
//# sourceMappingURL=PasteOptionsMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasteOptionsMenu.d.ts","sourceRoot":"","sources":["../../src/components/PasteOptionsMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,wBAAwB,CAAC;AAEhC,UAAU,qBAAqB;IAC7B,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC;IACrD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkErD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Resizable.css';
|
|
3
|
+
interface ResizableProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
height?: string | number;
|
|
7
|
+
onResize: (width: string | number, height: string | number) => void;
|
|
8
|
+
minWidth?: number;
|
|
9
|
+
minHeight?: number;
|
|
10
|
+
maxWidth?: number;
|
|
11
|
+
maxHeight?: number;
|
|
12
|
+
aspectRatio?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const Resizable: React.FC<ResizableProps>;
|
|
16
|
+
export default Resizable;
|
|
17
|
+
//# sourceMappingURL=Resizable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../src/components/Resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,iBAAiB,CAAC;AAEzB,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA+LvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../src/components/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAMjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAK/C,OAAO,sBAAsB,CAAC;AAS9B,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAknCjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Editor } from 'slate';
|
|
3
|
+
import { RichTextEditorProps } from '../types';
|
|
4
|
+
import './Toolbar.css';
|
|
5
|
+
interface ToolbarProps {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
features?: RichTextEditorProps['features'];
|
|
8
|
+
onLinkAdd?: (url: string) => void;
|
|
9
|
+
onMediaUpload?: (file: File) => Promise<string | void>;
|
|
10
|
+
onEmojiSelect?: (emoji: string) => void;
|
|
11
|
+
mentionUsers?: RichTextEditorProps['mentionUsers'];
|
|
12
|
+
onMentionSelect?: (user: any) => void;
|
|
13
|
+
tags?: RichTextEditorProps['tags'];
|
|
14
|
+
onTagSelect?: (tag: any) => void;
|
|
15
|
+
tagPlaceholder?: string;
|
|
16
|
+
toolbarBackgroundColor?: string;
|
|
17
|
+
toolbarStyle?: React.CSSProperties;
|
|
18
|
+
visibleButtons?: string[];
|
|
19
|
+
position?: 'top' | 'bottom';
|
|
20
|
+
actionButtons?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
declare const Toolbar: React.FC<ToolbarProps>;
|
|
23
|
+
export default Toolbar;
|
|
24
|
+
//# sourceMappingURL=Toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/components/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAc,MAAM,OAAO,CAAC;AAa3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,eAAe,CAAC;AAEvB,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACnD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAu5BnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.rte-custom-color-picker{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);min-width:240px;padding:32px 12px 12px;position:relative}.rte-color-picker-presets{display:grid;gap:4px;grid-template-columns:repeat(6,1fr);margin-bottom:12px}.rte-color-preset{border:1px solid #ddd;border-radius:4px;cursor:pointer;height:32px;padding:0;transition:transform .1s,box-shadow .1s;width:32px}.rte-color-preset:hover{box-shadow:0 2px 4px rgba(0,0,0,.2);position:relative;transform:scale(1.1);z-index:1}.rte-color-picker-input-group{align-items:center;display:flex;gap:8px}.rte-color-preview{border:1px solid #ddd;border-radius:4px;flex-shrink:0;height:40px;width:40px}.rte-color-hex-input{border:1px solid #ddd;border-radius:4px;flex:1;font-family:monospace;font-size:14px;padding:8px;text-transform:uppercase}.rte-color-hex-input:focus{border-color:#06c;box-shadow:0 0 0 2px rgba(0,102,204,.1);outline:none}.rte-color-native-input{bottom:60px;height:1px;left:50%;opacity:0;pointer-events:none;position:absolute;top:auto;transform:translateX(-50%);width:1px;z-index:-1}.rte-color-native-button{background:#f8f9fa;border:1px solid #ddd;border-radius:4px;cursor:pointer;font-size:18px;margin-top:8px;padding:8px;position:relative;transition:background-color .2s;width:100%}.rte-color-native-button:hover{background:#e9ecef}.rte-toolbar{align-items:center;background-color:#f8f9fa;display:flex;flex-wrap:nowrap;gap:4px;padding:8px 12px}.rte-toolbar-top{border-bottom:1px solid #e0e0e0}.rte-toolbar-bottom{border-top:1px solid #e0e0e0}.rte-toolbar-action-buttons{display:flex;flex-shrink:0;gap:8px;margin-left:auto}.rte-toolbar-select{background-color:#fff;border:1px solid #ddd;border-radius:4px;cursor:pointer;font-size:14px;margin-right:4px;padding:4px 8px}.rte-toolbar-button{align-items:center;background-color:transparent;border:none;border-radius:4px;color:#333;cursor:pointer;display:flex;font-size:16px;height:32px;justify-content:center;transition:background-color .2s;width:32px}.rte-toolbar-button:hover{background-color:#e0e0e0}.rte-toolbar-button.active{background-color:#d0d0d0;color:#000}.rte-toolbar-button:disabled{cursor:not-allowed;opacity:.5}.rte-toolbar-divider{background-color:#ddd;height:24px;margin:0 4px;width:1px}.rte-toolbar-group{position:relative}.rte-link-dialog-wrapper{overflow:visible;position:relative}.rte-link-dialog-wrapper .rte-close-button{position:absolute;right:-12px;top:-12px;z-index:10001}.rte-link-dialog{background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:320px;overflow:hidden;position:relative}.rte-link-dialog-content{display:flex;gap:8px;padding:12px}.rte-close-button{align-items:center;background:#fff;border:1px solid #ddd;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.15);color:#666;cursor:pointer;display:flex;font-size:18px;height:24px;justify-content:center;line-height:1;padding:0;position:absolute;right:-12px;top:-12px;transition:all .2s;width:24px;z-index:10001}.rte-close-button:hover{background-color:#f0f0f0;border-color:#999;box-shadow:0 2px 6px rgba(0,0,0,.2);color:#000;transform:scale(1.1)}.rte-close-button:active{transform:scale(.95)}.rte-link-dialog input{border:1px solid #ddd;border-radius:6px;flex:1;font-size:14px;outline:none;padding:10px 12px;transition:border-color .2s}.rte-link-dialog input:focus{border-color:#06c}.rte-link-dialog button{background-color:#06c;border:none;border-radius:6px;color:#fff;cursor:pointer;font-size:14px;font-weight:500;padding:10px 16px;transition:background-color .2s}.rte-link-dialog button:hover{background-color:#0052a3}.rte-link-dialog button:active{background-color:#004080}.rte-mention-list-wrapper{overflow:visible;position:relative}.rte-mention-list-wrapper .rte-close-button{position:absolute;right:-12px;top:-12px;z-index:10001}.rte-mention-list{background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);display:flex;flex-direction:column;max-height:350px;max-width:400px;min-width:280px;overflow:hidden;position:relative}.rte-mention-list input{background:#f8f9fa;border:none;border-bottom:1px solid #e0e0e0;border-radius:8px 8px 0 0;box-sizing:border-box;color:#333;font-size:14px;outline:none;padding:12px 16px;transition:background-color .2s;width:100%}.rte-mention-list input:focus{background:#fff;border-bottom-color:#06c}.rte-mention-list input::-moz-placeholder{color:#999}.rte-mention-list input::placeholder{color:#999}.rte-mention-items{max-height:280px;overflow-y:auto;padding:4px 0}.rte-mention-items::-webkit-scrollbar{width:6px}.rte-mention-items::-webkit-scrollbar-track{background:#f1f1f1}.rte-mention-items::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.rte-mention-items::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.rte-mention-item{align-items:center;border-bottom:1px solid #f0f0f0;cursor:pointer;display:flex;gap:12px;padding:10px 16px;transition:all .2s}.rte-mention-item:last-child{border-bottom:none}.rte-mention-item:hover{background-color:#f5f5f5}.rte-mention-item:active{background-color:#e8e8e8}.rte-mention-item img{border-radius:50%;flex-shrink:0;height:32px;-o-object-fit:cover;object-fit:cover;width:32px}.rte-mention-item span{color:#333;flex:1;font-size:14px}.rte-emoji-picker-container{margin-top:4px;overflow:visible;position:absolute;right:0;top:100%;z-index:1000}.rte-emoji-picker-container .rte-close-button{position:absolute;right:-12px;top:-12px;z-index:10001}.rte-emoji-picker-wrapper{border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);overflow:hidden}.rte-more-menu{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);margin-top:4px;min-width:220px;overflow:visible;padding-top:8px;position:absolute;right:0;top:100%;z-index:1000}.rte-more-menu-content{padding:4px 0}.rte-more-menu-item{align-items:center;background:transparent;border:none;color:#333;cursor:pointer;display:flex;font-size:14px;gap:12px;padding:8px 16px;text-align:left;transition:background-color .2s;width:100%}.rte-more-menu-item:hover{background-color:#f0f0f0}.rte-menu-icon{display:inline-block;font-size:16px;text-align:center;width:20px}.rte-menu-divider{background-color:#e0e0e0;height:1px;margin:4px 0}.rte-color-picker{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);min-width:200px;padding:32px 8px 8px}.rte-resizable-container{display:inline-block;position:relative}.rte-resizable-container:hover .rte-resize-handle{opacity:1}.rte-resize-handle{background:#06c;border:1px solid #fff;box-shadow:0 1px 2px rgba(0,0,0,.15);opacity:0;position:absolute;transition:opacity .2s;z-index:1000}.rte-resize-handle:hover{background:#0052a3;opacity:1!important}.rte-resize-handle-nw{border-radius:50% 0 50% 0;cursor:nw-resize;height:8px;left:-4px;top:-4px;width:8px}.rte-resize-handle-ne{cursor:ne-resize;right:-4px;top:-4px}.rte-resize-handle-ne,.rte-resize-handle-sw{border-radius:0 50% 0 50%;height:8px;width:8px}.rte-resize-handle-sw{bottom:-4px;cursor:sw-resize;left:-4px}.rte-resize-handle-se{border-radius:50% 0 50% 0;bottom:-4px;cursor:se-resize;height:8px;right:-4px;width:8px}.rte-resize-handle-n{cursor:n-resize;top:-3px}.rte-resize-handle-n,.rte-resize-handle-s{border-radius:2px;height:4px;left:50%;transform:translateX(-50%);width:30px}.rte-resize-handle-s{bottom:-3px;cursor:s-resize}.rte-resize-handle-e{cursor:e-resize;right:-3px}.rte-resize-handle-e,.rte-resize-handle-w{border-radius:2px;height:30px;top:50%;transform:translateY(-50%);width:4px}.rte-resize-handle-w{cursor:w-resize;left:-3px}.rte-paste-options-menu{background:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,.15);overflow:hidden;position:absolute!important;z-index:10000!important}.rte-paste-options-content{align-items:center;display:flex;flex-direction:row;gap:2px;padding:4px}.rte-paste-option{align-items:center;background:transparent;border:none;border-radius:4px;cursor:pointer;display:flex;height:32px;justify-content:center;padding:0;transition:background-color .2s;width:32px}.rte-paste-option:hover{background-color:#f0f0f0}.rte-paste-option.rte-paste-close{border-left:1px solid #e0e0e0;margin-left:4px;padding-left:4px}.rte-paste-icon{align-items:center;display:flex;font-size:18px;justify-content:center;line-height:1}.rte-paste-option-desc,.rte-paste-option-title{display:none}.rte-container{display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:14px;line-height:1.5}.rte-editor-wrapper{cursor:text;flex:1;min-height:100%;overflow-y:auto}.rte-editor-wrapper h1{font-size:2em;font-weight:700;margin:.67em 0}.rte-editor-wrapper h2{font-size:1.5em;font-weight:700;margin:.75em 0}.rte-editor-wrapper h3{font-size:1.17em;font-weight:700;margin:.83em 0}.rte-editor-wrapper ol,.rte-editor-wrapper ul{margin:1em 0;padding-left:2em}.rte-editor-wrapper li{margin:.25em 0}.rte-editor-wrapper a{color:#06c;text-decoration:underline}.rte-editor-wrapper a:hover{color:#0052a3}.rte-editor-wrapper pre{border:1px solid #ddd;border-radius:4px;font-size:13px;line-height:1.4;margin:12px 0;overflow-x:auto;padding:12px}.rte-editor-wrapper code,.rte-editor-wrapper pre{background-color:#f5f5f5;font-family:Courier New,Courier,monospace}.rte-editor-wrapper code{border-radius:3px;font-size:.9em;padding:2px 4px}.rte-editor-wrapper pre code{background-color:transparent;padding:0}.rte-editor-wrapper [data-slate-placeholder]{opacity:.5;pointer-events:none;position:absolute}.rte-action-buttons{display:flex;flex-shrink:0;gap:8px}.rte-action-button{min-width:80px;white-space:nowrap}.rte-action-button:hover{opacity:.9}.rte-action-button:active{transform:scale(.98)}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zencemarketing/text-editor-sdk
|
|
3
|
+
* A highly customizable rich text editor built with Slate.js
|
|
4
|
+
*
|
|
5
|
+
* @alpha This is an alpha release. API may change before stable 1.0.0 release.
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export { default as RichTextEditor } from './components/RichTextEditor';
|
|
9
|
+
export { default } from './components/RichTextEditor';
|
|
10
|
+
export type { User, Tag, ActionButtonConfig, CancelButtonConfig, SubmitButtonConfig, EditorFeatures, RichTextEditorProps, ToolbarButtonProps } from './types';
|
|
11
|
+
export type { CustomElement, CustomText, ParagraphElement, HeadingElement, LinkElement, CodeBlockElement, ListElement, ListItemElement, MentionElement, ImageElement, HorizontalRuleElement, IndentElement, TagElement } from './types/slate';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAGtD,YAAY,EACV,IAAI,EACJ,GAAG,EACH,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,UAAU,EACX,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.rte-custom-color-picker{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);min-width:240px;padding:32px 12px 12px;position:relative}.rte-color-picker-presets{display:grid;gap:4px;grid-template-columns:repeat(6,1fr);margin-bottom:12px}.rte-color-preset{border:1px solid #ddd;border-radius:4px;cursor:pointer;height:32px;padding:0;transition:transform .1s,box-shadow .1s;width:32px}.rte-color-preset:hover{box-shadow:0 2px 4px rgba(0,0,0,.2);position:relative;transform:scale(1.1);z-index:1}.rte-color-picker-input-group{align-items:center;display:flex;gap:8px}.rte-color-preview{border:1px solid #ddd;border-radius:4px;flex-shrink:0;height:40px;width:40px}.rte-color-hex-input{border:1px solid #ddd;border-radius:4px;flex:1;font-family:monospace;font-size:14px;padding:8px;text-transform:uppercase}.rte-color-hex-input:focus{border-color:#06c;box-shadow:0 0 0 2px rgba(0,102,204,.1);outline:none}.rte-color-native-input{bottom:60px;height:1px;left:50%;opacity:0;pointer-events:none;position:absolute;top:auto;transform:translateX(-50%);width:1px;z-index:-1}.rte-color-native-button{background:#f8f9fa;border:1px solid #ddd;border-radius:4px;cursor:pointer;font-size:18px;margin-top:8px;padding:8px;position:relative;transition:background-color .2s;width:100%}.rte-color-native-button:hover{background:#e9ecef}.rte-toolbar{align-items:center;background-color:#f8f9fa;display:flex;flex-wrap:nowrap;gap:4px;padding:8px 12px}.rte-toolbar-top{border-bottom:1px solid #e0e0e0}.rte-toolbar-bottom{border-top:1px solid #e0e0e0}.rte-toolbar-action-buttons{display:flex;flex-shrink:0;gap:8px;margin-left:auto}.rte-toolbar-select{background-color:#fff;border:1px solid #ddd;border-radius:4px;cursor:pointer;font-size:14px;margin-right:4px;padding:4px 8px}.rte-toolbar-button{align-items:center;background-color:transparent;border:none;border-radius:4px;color:#333;cursor:pointer;display:flex;font-size:16px;height:32px;justify-content:center;transition:background-color .2s;width:32px}.rte-toolbar-button:hover{background-color:#e0e0e0}.rte-toolbar-button.active{background-color:#d0d0d0;color:#000}.rte-toolbar-button:disabled{cursor:not-allowed;opacity:.5}.rte-toolbar-divider{background-color:#ddd;height:24px;margin:0 4px;width:1px}.rte-toolbar-group{position:relative}.rte-link-dialog-wrapper{overflow:visible;position:relative}.rte-link-dialog-wrapper .rte-close-button{position:absolute;right:-12px;top:-12px;z-index:10001}.rte-link-dialog{background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:320px;overflow:hidden;position:relative}.rte-link-dialog-content{display:flex;gap:8px;padding:12px}.rte-close-button{align-items:center;background:#fff;border:1px solid #ddd;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.15);color:#666;cursor:pointer;display:flex;font-size:18px;height:24px;justify-content:center;line-height:1;padding:0;position:absolute;right:-12px;top:-12px;transition:all .2s;width:24px;z-index:10001}.rte-close-button:hover{background-color:#f0f0f0;border-color:#999;box-shadow:0 2px 6px rgba(0,0,0,.2);color:#000;transform:scale(1.1)}.rte-close-button:active{transform:scale(.95)}.rte-link-dialog input{border:1px solid #ddd;border-radius:6px;flex:1;font-size:14px;outline:none;padding:10px 12px;transition:border-color .2s}.rte-link-dialog input:focus{border-color:#06c}.rte-link-dialog button{background-color:#06c;border:none;border-radius:6px;color:#fff;cursor:pointer;font-size:14px;font-weight:500;padding:10px 16px;transition:background-color .2s}.rte-link-dialog button:hover{background-color:#0052a3}.rte-link-dialog button:active{background-color:#004080}.rte-mention-list-wrapper{overflow:visible;position:relative}.rte-mention-list-wrapper .rte-close-button{position:absolute;right:-12px;top:-12px;z-index:10001}.rte-mention-list{background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);display:flex;flex-direction:column;max-height:350px;max-width:400px;min-width:280px;overflow:hidden;position:relative}.rte-mention-list input{background:#f8f9fa;border:none;border-bottom:1px solid #e0e0e0;border-radius:8px 8px 0 0;box-sizing:border-box;color:#333;font-size:14px;outline:none;padding:12px 16px;transition:background-color .2s;width:100%}.rte-mention-list input:focus{background:#fff;border-bottom-color:#06c}.rte-mention-list input::-moz-placeholder{color:#999}.rte-mention-list input::placeholder{color:#999}.rte-mention-items{max-height:280px;overflow-y:auto;padding:4px 0}.rte-mention-items::-webkit-scrollbar{width:6px}.rte-mention-items::-webkit-scrollbar-track{background:#f1f1f1}.rte-mention-items::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.rte-mention-items::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.rte-mention-item{align-items:center;border-bottom:1px solid #f0f0f0;cursor:pointer;display:flex;gap:12px;padding:10px 16px;transition:all .2s}.rte-mention-item:last-child{border-bottom:none}.rte-mention-item:hover{background-color:#f5f5f5}.rte-mention-item:active{background-color:#e8e8e8}.rte-mention-item img{border-radius:50%;flex-shrink:0;height:32px;-o-object-fit:cover;object-fit:cover;width:32px}.rte-mention-item span{color:#333;flex:1;font-size:14px}.rte-emoji-picker-container{margin-top:4px;overflow:visible;position:absolute;right:0;top:100%;z-index:1000}.rte-emoji-picker-container .rte-close-button{position:absolute;right:-12px;top:-12px;z-index:10001}.rte-emoji-picker-wrapper{border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);overflow:hidden}.rte-more-menu{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);margin-top:4px;min-width:220px;overflow:visible;padding-top:8px;position:absolute;right:0;top:100%;z-index:1000}.rte-more-menu-content{padding:4px 0}.rte-more-menu-item{align-items:center;background:transparent;border:none;color:#333;cursor:pointer;display:flex;font-size:14px;gap:12px;padding:8px 16px;text-align:left;transition:background-color .2s;width:100%}.rte-more-menu-item:hover{background-color:#f0f0f0}.rte-menu-icon{display:inline-block;font-size:16px;text-align:center;width:20px}.rte-menu-divider{background-color:#e0e0e0;height:1px;margin:4px 0}.rte-color-picker{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);min-width:200px;padding:32px 8px 8px}.rte-resizable-container{display:inline-block;position:relative}.rte-resizable-container:hover .rte-resize-handle{opacity:1}.rte-resize-handle{background:#06c;border:1px solid #fff;box-shadow:0 1px 2px rgba(0,0,0,.15);opacity:0;position:absolute;transition:opacity .2s;z-index:1000}.rte-resize-handle:hover{background:#0052a3;opacity:1!important}.rte-resize-handle-nw{border-radius:50% 0 50% 0;cursor:nw-resize;height:8px;left:-4px;top:-4px;width:8px}.rte-resize-handle-ne{cursor:ne-resize;right:-4px;top:-4px}.rte-resize-handle-ne,.rte-resize-handle-sw{border-radius:0 50% 0 50%;height:8px;width:8px}.rte-resize-handle-sw{bottom:-4px;cursor:sw-resize;left:-4px}.rte-resize-handle-se{border-radius:50% 0 50% 0;bottom:-4px;cursor:se-resize;height:8px;right:-4px;width:8px}.rte-resize-handle-n{cursor:n-resize;top:-3px}.rte-resize-handle-n,.rte-resize-handle-s{border-radius:2px;height:4px;left:50%;transform:translateX(-50%);width:30px}.rte-resize-handle-s{bottom:-3px;cursor:s-resize}.rte-resize-handle-e{cursor:e-resize;right:-3px}.rte-resize-handle-e,.rte-resize-handle-w{border-radius:2px;height:30px;top:50%;transform:translateY(-50%);width:4px}.rte-resize-handle-w{cursor:w-resize;left:-3px}.rte-paste-options-menu{background:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,.15);overflow:hidden;position:absolute!important;z-index:10000!important}.rte-paste-options-content{align-items:center;display:flex;flex-direction:row;gap:2px;padding:4px}.rte-paste-option{align-items:center;background:transparent;border:none;border-radius:4px;cursor:pointer;display:flex;height:32px;justify-content:center;padding:0;transition:background-color .2s;width:32px}.rte-paste-option:hover{background-color:#f0f0f0}.rte-paste-option.rte-paste-close{border-left:1px solid #e0e0e0;margin-left:4px;padding-left:4px}.rte-paste-icon{align-items:center;display:flex;font-size:18px;justify-content:center;line-height:1}.rte-paste-option-desc,.rte-paste-option-title{display:none}.rte-container{display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:14px;line-height:1.5}.rte-editor-wrapper{cursor:text;flex:1;min-height:100%;overflow-y:auto}.rte-editor-wrapper h1{font-size:2em;font-weight:700;margin:.67em 0}.rte-editor-wrapper h2{font-size:1.5em;font-weight:700;margin:.75em 0}.rte-editor-wrapper h3{font-size:1.17em;font-weight:700;margin:.83em 0}.rte-editor-wrapper ol,.rte-editor-wrapper ul{margin:1em 0;padding-left:2em}.rte-editor-wrapper li{margin:.25em 0}.rte-editor-wrapper a{color:#06c;text-decoration:underline}.rte-editor-wrapper a:hover{color:#0052a3}.rte-editor-wrapper pre{border:1px solid #ddd;border-radius:4px;font-size:13px;line-height:1.4;margin:12px 0;overflow-x:auto;padding:12px}.rte-editor-wrapper code,.rte-editor-wrapper pre{background-color:#f5f5f5;font-family:Courier New,Courier,monospace}.rte-editor-wrapper code{border-radius:3px;font-size:.9em;padding:2px 4px}.rte-editor-wrapper pre code{background-color:transparent;padding:0}.rte-editor-wrapper [data-slate-placeholder]{opacity:.5;pointer-events:none;position:absolute}.rte-action-buttons{display:flex;flex-shrink:0;gap:8px}.rte-action-button{min-width:80px;white-space:nowrap}.rte-action-button:hover{opacity:.9}.rte-action-button:active{transform:scale(.98)}
|