arxatec-ui 0.1.1 → 0.1.3
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/arxatec-ui.css +2 -0
- package/dist/components/date_range_picker/index.d.ts +1 -1
- package/dist/components/description_markdown_editor/components/index.d.ts +1 -0
- package/dist/components/description_markdown_editor/components/toolbar_button/index.d.ts +12 -0
- package/dist/components/description_markdown_editor/index.d.ts +17 -0
- package/dist/components/description_markdown_editor/utils/index.d.ts +6 -0
- package/dist/components/form_input/index.d.ts +15 -0
- package/dist/components/form_select/index.d.ts +25 -0
- package/dist/components/form_textarea/index.d.ts +14 -0
- package/dist/components/rich_text_editor/components/document_dialog/index.d.ts +8 -0
- package/dist/components/rich_text_editor/components/index.d.ts +1 -0
- package/dist/components/rich_text_editor/extensions/floating_menu/index.d.ts +4 -0
- package/dist/components/rich_text_editor/extensions/floating_toolbar/index.d.ts +4 -0
- package/dist/components/rich_text_editor/extensions/image/image-extension.d.ts +1 -0
- package/dist/components/rich_text_editor/extensions/image/index.d.ts +1 -0
- package/dist/components/rich_text_editor/extensions/image/tiptap-image.d.ts +2 -0
- package/dist/components/rich_text_editor/extensions/image_placeholder/index.d.ts +17 -0
- package/dist/components/rich_text_editor/extensions/index.d.ts +5 -0
- package/dist/components/rich_text_editor/extensions/search_and_replace/index.d.ts +54 -0
- package/dist/components/rich_text_editor/index.d.ts +13 -0
- package/dist/components/rich_text_editor/lib/tiptap-utils.d.ts +15 -0
- package/dist/components/rich_text_editor/toolbars/alignment/index.d.ts +1 -0
- package/dist/components/rich_text_editor/toolbars/blockquote/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/bold/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/bullet_list/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/code/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/code_block/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/color_and_highlight/index.d.ts +1 -0
- package/dist/components/rich_text_editor/toolbars/editor_toolbar/index.d.ts +7 -0
- package/dist/components/rich_text_editor/toolbars/hard_break/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/headings/index.d.ts +2 -0
- package/dist/components/rich_text_editor/toolbars/horizontal_rule/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/image_placeholder_toolbar/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/index.d.ts +22 -0
- package/dist/components/rich_text_editor/toolbars/italic/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/link/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/mobile_toolbar_group/index.d.ts +12 -0
- package/dist/components/rich_text_editor/toolbars/ordered_list/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/redo/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/search_and_replace_toolbar/index.d.ts +1 -0
- package/dist/components/rich_text_editor/toolbars/strikethrough/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/toolbar_provider/context.d.ts +7 -0
- package/dist/components/rich_text_editor/toolbars/toolbar_provider/index.d.ts +2 -0
- package/dist/components/rich_text_editor/toolbars/toolbar_provider/toolbar_provider.d.ts +8 -0
- package/dist/components/rich_text_editor/toolbars/underline/index.d.ts +3 -0
- package/dist/components/rich_text_editor/toolbars/undo/index.d.ts +3 -0
- package/dist/components/rich_text_editor/ui/floating-element.d.ts +20 -0
- package/dist/exports/index.d.ts +1 -0
- package/dist/exports/sidebar.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/use_image_upload/index.d.ts +15 -0
- package/dist/hooks/use_media_query/index.d.ts +1 -0
- package/dist/icons_data-BHKds1ja-BJPm3PV7-CcZneBOT-Chm0XtnU.js +22025 -0
- package/dist/icons_data-BHKds1ja-BJPm3PV7-CcZneBOT-Chm0XtnU.js.map +1 -0
- package/dist/icons_data-BHKds1ja-BPOjhDPB-CoyEcb95-DrgKLAG--oqddcPLE-8vgBvP7E.js +22025 -0
- package/dist/icons_data-BHKds1ja-BPOjhDPB-CoyEcb95-DrgKLAG--oqddcPLE-8vgBvP7E.js.map +1 -0
- package/dist/icons_data-BHKds1ja-BPOjhDPB-O5bUR24H-DnafVe1n-Dkf4m7h1-egmn7vd0-BEpd2kmx--3Ux1c8Q.js +22025 -0
- package/dist/icons_data-BHKds1ja-BPOjhDPB-O5bUR24H-DnafVe1n-Dkf4m7h1-egmn7vd0-BEpd2kmx--3Ux1c8Q.js.map +1 -0
- package/dist/icons_data-BHKds1ja-CLjt2Lud.js +22025 -0
- package/dist/icons_data-BHKds1ja-CLjt2Lud.js.map +1 -0
- package/dist/icons_data-BHKds1ja-Cqx-AFTA-DUeHq_rP-DVyOjjT--Ci-PmBcL-D4Ygycyx-Bzkq_U9B.js +22025 -0
- package/dist/icons_data-BHKds1ja-Cqx-AFTA-DUeHq_rP-DVyOjjT--Ci-PmBcL-D4Ygycyx-Bzkq_U9B.js.map +1 -0
- package/dist/icons_data-BHKds1ja-Cqx-AFTA-DUeHq_rP-dXd2WO7V-D1ANykD3-BvOdc1OQ-Cf9leDU9-CtKpffr0-BkJ16B7c.js +22025 -0
- package/dist/icons_data-BHKds1ja-Cqx-AFTA-DUeHq_rP-dXd2WO7V-D1ANykD3-BvOdc1OQ-Cf9leDU9-CtKpffr0-BkJ16B7c.js.map +1 -0
- package/dist/icons_data-BHKds1ja-CsVC001U-BYjvbsVx-omT3dyIc-CF9UoXT4.js +22025 -0
- package/dist/icons_data-BHKds1ja-CsVC001U-BYjvbsVx-omT3dyIc-CF9UoXT4.js.map +1 -0
- package/dist/icons_data-BHKds1ja-Cwl6KKva-BIDtxJa6-th7L9zrq-BwlsX6V6-DerXw7lM-BZuU3kG0--6yW5zdl-BPJQDofc-yBRG3zTi.js +22025 -0
- package/dist/icons_data-BHKds1ja-Cwl6KKva-BIDtxJa6-th7L9zrq-BwlsX6V6-DerXw7lM-BZuU3kG0--6yW5zdl-BPJQDofc-yBRG3zTi.js.map +1 -0
- package/dist/icons_data-BHKds1ja-DqJrOhJv-BG3yc1Cg.js +22025 -0
- package/dist/icons_data-BHKds1ja-DqJrOhJv-BG3yc1Cg.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +41326 -2473
- package/dist/index.js.map +1 -1
- package/dist/sheet-BAH_9-wM.js +222 -0
- package/dist/sheet-BAH_9-wM.js.map +1 -0
- package/dist/sidebar.js +347 -0
- package/dist/sidebar.js.map +1 -0
- package/dist/styles.css +25 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/tiptap/index.d.ts +7 -0
- package/package.json +34 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{--editor-text-default:#09090b;--editor-text-gray:#71717a;--editor-text-brown:#f97415;--editor-text-orange:#f97015;--editor-text-yellow:#facc14;--editor-text-green:#21c45d;--editor-text-blue:#2463eb;--editor-text-purple:#d8b4fe;--editor-text-pink:#ea3e83;--editor-text-red:#ef4343;--editor-bg-default:#fff;--editor-bg-subtle:#fafafa;--editor-bg-muted:#f4f4f5;--editor-highlight-default:#fafafa;--editor-highlight-gray:#f4f4f5;--editor-highlight-brown:#fff9eb;--editor-highlight-orange:#fff6eb;--editor-highlight-yellow:#fffdeb;--editor-highlight-green:#eefcf3;--editor-highlight-blue:#ecf3fe;--editor-highlight-purple:#f4ebff;--editor-highlight-pink:#fdedf3;--editor-highlight-red:#fdecec;--editor-border-default:#dfdfe2;--editor-border-strong:#a1a1aa;--editor-spacing-1:.25rem;--editor-spacing-2:.5rem;--editor-spacing-3:.75rem;--editor-spacing-4:1rem;--editor-spacing-6:1.5rem;--editor-spacing-8:2rem;--editor-spacing-12:3rem;--editor-spacing-16:4rem;--editor-font-sans:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--editor-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;--editor-font-serif:Georgia, Cambria, "Times New Roman", Times, serif;--editor-transition-fast:.15s cubic-bezier(.4, 0, .2, 1);--editor-transition-normal:.2s cubic-bezier(.4, 0, .2, 1);--editor-transition-slow:.3s cubic-bezier(.4, 0, .2, 1);--editor-shadow-sm:0 1px 2px 0 #0000000d;--editor-shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--editor-shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a}.dark{--editor-text-default:#fafafa;--editor-text-gray:#a1a1aa;--editor-text-brown:#f97415;--editor-text-orange:#f97015;--editor-text-yellow:#facc14;--editor-text-green:#21c45d;--editor-text-blue:#2463eb;--editor-text-purple:#d8b4fe;--editor-text-pink:#ea3e83;--editor-text-red:#ef4343;--editor-bg-default:#09090b;--editor-bg-subtle:#27272a;--editor-bg-muted:#3f3f46;--editor-highlight-default:#27272a;--editor-highlight-gray:#3f3f46;--editor-highlight-brown:#322401;--editor-highlight-orange:#331c00;--editor-highlight-yellow:#332e00;--editor-highlight-green:#072c15;--editor-highlight-blue:#021431;--editor-highlight-purple:#190132;--editor-highlight-pink:#2e0515;--editor-highlight-red:#2f0404;--editor-border-default:#3f3f46;--editor-border-strong:#a1a1aa}.ProseMirror{caret-color:var(--editor-text-default);padding:var(--editor-spacing-16) var(--editor-spacing-8);max-width:90ch;font-family:var(--editor-font-sans);color:var(--editor-text-default);text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;outline:none;min-height:100vh;margin:0 auto;position:relative}.is-expanded .ProseMirror{max-width:1050px}.ProseMirror:focus{box-shadow:none;outline:none}.ProseMirror .selection{background-color:var(--editor-highlight-blue)}.ProseMirror ::selection{background-color:var(--editor-highlight-blue)}.ProseMirror>.react-renderer{margin:var(--editor-spacing-12) 0;transition:all var(--editor-transition-normal)}.ProseMirror>.react-renderer:first-child{margin-top:0}.ProseMirror>.react-renderer:last-child{margin-bottom:0}.ProseMirror p{margin:var(--editor-spacing-4) 0;color:var(--editor-text-default);font-size:1.125rem;line-height:1.75}.ProseMirror>p{margin:var(--editor-spacing-6) 0}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4{font-family:var(--editor-font-sans);letter-spacing:-.025em;color:var(--editor-text-default);scroll-margin-top:var(--editor-spacing-16);font-weight:700;line-height:1.2}.ProseMirror h1{margin:var(--editor-spacing-8) 0 var(--editor-spacing-4);font-size:2.5rem}.ProseMirror h2{margin:var(--editor-spacing-8) 0 var(--editor-spacing-4);font-size:2rem}.ProseMirror h3{margin:var(--editor-spacing-6) 0 var(--editor-spacing-3);font-size:1.5rem}.ProseMirror h4{margin:var(--editor-spacing-4) 0 var(--editor-spacing-2);font-size:1.25rem}.ProseMirror a{color:var(--editor-text-blue);cursor:pointer;text-underline-offset:.2em;transition:all var(--editor-transition-fast);text-decoration:underline;text-decoration-thickness:.1em}.ProseMirror a:hover{color:var(--editor-text-blue);text-decoration-thickness:.2em}.ProseMirror code{font-family:var(--editor-font-mono);background-color:var(--editor-bg-muted);color:var(--editor-text-default);border:1px solid var(--editor-border-default);border-radius:4px;padding:.2em .4em;font-size:.9em}.ProseMirror pre{margin:var(--editor-spacing-6) 0;padding:var(--editor-spacing-4);background-color:var(--editor-bg-subtle);border:1px solid var(--editor-border-default);border-radius:8px;overflow-x:auto}.ProseMirror pre code{color:var(--editor-text-default);background-color:#0000;border:none;padding:0;font-size:.875rem;line-height:1.7}.ProseMirror blockquote{margin:var(--editor-spacing-6) 0;padding:var(--editor-spacing-4) var(--editor-spacing-6);border-left:4px solid var(--editor-border-strong);color:var(--editor-text-gray);background-color:var(--editor-bg-subtle);border-radius:0 8px 8px 0;font-style:italic}.ProseMirror ul,.ProseMirror ol{margin:var(--editor-spacing-4) 0;padding-left:var(--editor-spacing-6)}.ProseMirror li{margin:var(--editor-spacing-2) 0;padding-left:var(--editor-spacing-2)}.ProseMirror ul{list-style-type:disc}.ProseMirror ul ul{list-style-type:circle}.ProseMirror ul ul ul{list-style-type:square}.ProseMirror ol{list-style-type:decimal}.ProseMirror ol ol{list-style-type:lower-alpha}.ProseMirror ol ol ol{list-style-type:lower-roman}.ProseMirror table{border-collapse:separate;border-spacing:0;width:100%;margin:var(--editor-spacing-6) 0;border:1px solid var(--editor-border-default);border-radius:8px;overflow:hidden}.ProseMirror th{background-color:var(--editor-bg-subtle);text-align:left;padding:var(--editor-spacing-3) var(--editor-spacing-4);border-bottom:2px solid var(--editor-border-default);font-weight:600}.ProseMirror td{padding:var(--editor-spacing-3) var(--editor-spacing-4);border-bottom:1px solid var(--editor-border-default);transition:background-color var(--editor-transition-fast)}.ProseMirror tr:last-child td{border-bottom:none}.ProseMirror tr:hover td{background-color:var(--editor-bg-subtle)}.ProseMirror img{border:1px solid var(--editor-border-default);max-width:100%;height:auto;box-shadow:var(--editor-shadow-sm);transition:all var(--editor-transition-normal);border-radius:8px;display:block}.ProseMirror img:hover{box-shadow:var(--editor-shadow-lg);transform:translateY(-2px)}.ProseMirror .image-wrapper{margin:var(--editor-spacing-4) 0;flex-direction:column;display:flex}.ProseMirror .image-wrapper.align-left{align-items:flex-start}.ProseMirror .image-wrapper.align-center{align-items:center}.ProseMirror .image-wrapper.align-right{align-items:flex-end}.ProseMirror hr{margin:var(--editor-spacing-8) 0;border:none;border-top:2px solid var(--editor-border-default)}.floating-menu{background-color:var(--editor-bg-default);border:1px solid var(--editor-border-default);box-shadow:var(--editor-shadow-lg);padding:var(--editor-spacing-1);gap:var(--editor-spacing-1);animation:fadeIn var(--editor-transition-normal);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-radius:8px;align-items:center;display:flex}.toolbar-button{height:2.25rem;padding:0 var(--editor-spacing-3);transition:all var(--editor-transition-fast);color:var(--editor-text-default);background-color:#0000;border:1px solid #0000;border-radius:6px;justify-content:center;align-items:center;font-size:.875rem;font-weight:500;display:inline-flex}.toolbar-button:hover{background-color:var(--editor-bg-subtle);color:var(--editor-text-default)}.toolbar-button:focus-visible{box-shadow:0 0 0 2px var(--editor-border-strong);outline:none}.toolbar-button:disabled{opacity:.5;cursor:not-allowed}.toolbar-button.active{background-color:var(--editor-bg-muted);color:var(--editor-text-blue)}@media (width<=640px){.ProseMirror{padding:var(--editor-spacing-8) var(--editor-spacing-4)}.ProseMirror h1{font-size:2rem}.ProseMirror h2{font-size:1.75rem}.ProseMirror h3{font-size:1.5rem}.ProseMirror h4{font-size:1.25rem}.ProseMirror p{font-size:1rem}}@keyframes fadeIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@media print{.ProseMirror{max-width:none;padding:0}.floating-menu,.toolbar-button{display:none}}.is-editor-empty:before{color:var(--editor-text-gray);content:attr(data-placeholder);float:left;pointer-events:none;height:0}._wrapper_1t7pv_5 .ProseMirror{max-width:none!important;min-height:0!important;margin:0!important;padding:.375rem .75rem!important}._wrapper_1t7pv_5{min-height:2.5rem}._editorContent_1t7pv_17{font-size:.875rem;line-height:1rem;font-family:var(--font-sans);background:0 0;outline:none;min-height:1rem;padding:.375rem .75rem}._editorContent_1t7pv_17 p,._editorContent_1t7pv_17 li,._editorContent_1t7pv_17 blockquote,._editorContent_1t7pv_17 code,._editorContent_1t7pv_17 strong,._editorContent_1t7pv_17 em,._editorContent_1t7pv_17 u{margin:.5rem 0!important;font-size:.8rem!important;line-height:1rem!important}._editorContent_1t7pv_17 h1{margin:.375rem 0 .25rem!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.35!important}._editorContent_1t7pv_17 h2{margin:.375rem 0 .25rem!important;font-size:1.05rem!important;font-weight:600!important;line-height:1.35!important}._editorContent_1t7pv_17 h3{margin:.35rem 0 .2rem!important;font-size:.95rem!important;font-weight:600!important;line-height:1.3!important}._editorContent_1t7pv_17 h4{margin:.3rem 0 .15rem!important;font-size:.875rem!important;font-weight:600!important;line-height:1.3!important}._editorContent_1t7pv_17 h5,._editorContent_1t7pv_17 h6{margin:.25rem 0!important;font-size:.875rem!important;font-weight:600!important;line-height:1.25!important}._editorContent_1t7pv_17 p{margin:.125rem 0}._editorContent_1t7pv_17 ul,._editorContent_1t7pv_17 ol{margin:.25rem 0;padding-left:1.25rem}._editorContent_1t7pv_17 li{margin:0}._editorContent_1t7pv_17 blockquote{border-left-width:2px;margin:.25rem 0;padding-left:.75rem}._editorContent_1t7pv_17 code{font-size:.8125rem}._editorContent_1t7pv_17 .is-description-editor-empty:before{content:attr(data-placeholder);float:left;pointer-events:none;height:0;color:var(--color-muted-foreground);font-size:.8rem}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -8,4 +8,4 @@ interface Props {
|
|
|
8
8
|
optional?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const DateRangePicker: ({ startDate, dueDate, onStartDateChange, onDueDateChange, errorMessage, label, optional, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
11
|
+
export { DateDisplay, DateInput, DatePanel } from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toolbar_button';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
interface Props {
|
|
3
|
+
editor: Editor | null;
|
|
4
|
+
onClick: (editor: Editor) => void;
|
|
5
|
+
isActive: (editor: Editor) => boolean;
|
|
6
|
+
canDo: (editor: Editor) => boolean;
|
|
7
|
+
icon: React.ElementType;
|
|
8
|
+
label: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ToolbarButton: React.FC<Props>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface DescriptionMarkdownEditorRef {
|
|
2
|
+
insertContent: (text: string) => void;
|
|
3
|
+
clearContent: () => void;
|
|
4
|
+
}
|
|
5
|
+
interface DescriptionMarkdownEditorProps {
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (markdown: string) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
onSubmit?: () => void;
|
|
10
|
+
onEscape?: () => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
editorClassName?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
footer?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare const DescriptionMarkdownEditor: import('react').ForwardRefExoticComponent<DescriptionMarkdownEditorProps & import('react').RefAttributes<DescriptionMarkdownEditorRef>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function parseMarkdownToHtml(markdown: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Párrafos vacíos no sobreviven al ciclo HTML → turndown → marked.
|
|
4
|
+
* Sustituirlos por ZWCSP permite round‑trip estable del markdown persistido.
|
|
5
|
+
*/
|
|
6
|
+
export declare function htmlForMarkdownExport(html: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FieldErrors, FieldValues, Path, UseFormRegister } from 'react-hook-form';
|
|
2
|
+
interface Props<T extends FieldValues> {
|
|
3
|
+
label?: string;
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
type?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
register: UseFormRegister<T>;
|
|
8
|
+
errors: FieldErrors<T>;
|
|
9
|
+
className?: string;
|
|
10
|
+
optional?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
size?: "default" | "sm";
|
|
13
|
+
}
|
|
14
|
+
export declare function FormInput<T extends FieldValues>({ label, name, type, placeholder, register, errors, className, optional, disabled, size, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Control, FieldErrors, FieldValues } from 'react-hook-form';
|
|
3
|
+
interface FormSelectProps {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
control: Control<any & FieldValues>;
|
|
7
|
+
options: {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
errors?: FieldErrors<any & FieldValues>;
|
|
14
|
+
renderItem?: (option: {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}) => ReactNode;
|
|
18
|
+
children?: (option: {
|
|
19
|
+
value: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}) => ReactNode;
|
|
22
|
+
size?: "default" | "sm";
|
|
23
|
+
}
|
|
24
|
+
export declare const FormSelect: React.FC<FormSelectProps>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldErrors, FieldValues, Path, UseFormRegister } from 'react-hook-form';
|
|
2
|
+
interface Props<T extends FieldValues> extends React.ComponentProps<"textarea"> {
|
|
3
|
+
label?: string;
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
type?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
register: UseFormRegister<T>;
|
|
8
|
+
errors: FieldErrors<T>;
|
|
9
|
+
className?: string;
|
|
10
|
+
optional?: boolean;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function FormTextarea<T extends FieldValues>({ label, name, placeholder, register, errors, className, optional, autoFocus, ...props }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
onSave: (name: string) => Promise<void>;
|
|
5
|
+
isSaving?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function SaveDocumentNameDialog({ open, onOpenChange, onSave, isSaving, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './document_dialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ImageExtension: import('@tiptap/core').Node<import('@tiptap/extension-image').ImageOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ImageExtension } from './image-extension';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Node } from '@tiptap/react';
|
|
2
|
+
export interface ImagePlaceholderOptions {
|
|
3
|
+
HTMLAttributes: Record<string, unknown>;
|
|
4
|
+
onUpload?: (url: string) => void;
|
|
5
|
+
onError?: (error: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare module "@tiptap/core" {
|
|
8
|
+
interface Commands<ReturnType> {
|
|
9
|
+
imagePlaceholder: {
|
|
10
|
+
/**
|
|
11
|
+
* Inserts an image placeholder
|
|
12
|
+
*/
|
|
13
|
+
insertImagePlaceholder: () => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const ImagePlaceholder: Node<ImagePlaceholderOptions, any>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Extension, Range } from '@tiptap/core';
|
|
2
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
declare module "@tiptap/core" {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
search: {
|
|
6
|
+
/**
|
|
7
|
+
* @description Set search term in extension.
|
|
8
|
+
*/
|
|
9
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
10
|
+
/**
|
|
11
|
+
* @description Set replace term in extension.
|
|
12
|
+
*/
|
|
13
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
14
|
+
/**
|
|
15
|
+
* @description Replace first instance of search result with given replace term.
|
|
16
|
+
*/
|
|
17
|
+
replace: () => ReturnType;
|
|
18
|
+
/**
|
|
19
|
+
* @description Replace all instances of search result with given replace term.
|
|
20
|
+
*/
|
|
21
|
+
replaceAll: () => ReturnType;
|
|
22
|
+
/**
|
|
23
|
+
* @description Select the next search result.
|
|
24
|
+
*/
|
|
25
|
+
selectNextResult: () => ReturnType;
|
|
26
|
+
/**
|
|
27
|
+
* @description Select the previous search result.
|
|
28
|
+
*/
|
|
29
|
+
selectPreviousResult: () => ReturnType;
|
|
30
|
+
/**
|
|
31
|
+
* @description Set case sensitivity in extension.
|
|
32
|
+
*/
|
|
33
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export declare const searchAndReplacePluginKey: PluginKey<any>;
|
|
38
|
+
export interface SearchAndReplaceOptions {
|
|
39
|
+
searchResultClass: string;
|
|
40
|
+
selectedResultClass: string;
|
|
41
|
+
disableRegex: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface SearchAndReplaceStorage {
|
|
44
|
+
searchTerm: string;
|
|
45
|
+
replaceTerm: string;
|
|
46
|
+
results: Range[];
|
|
47
|
+
lastSearchTerm: string;
|
|
48
|
+
selectedResult: number;
|
|
49
|
+
lastSelectedResult: number;
|
|
50
|
+
caseSensitive: boolean;
|
|
51
|
+
lastCaseSensitiveState: boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare const SearchAndReplace: Extension<SearchAndReplaceOptions, SearchAndReplaceStorage>;
|
|
54
|
+
export default SearchAndReplace;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSONContent } from '@tiptap/core';
|
|
2
|
+
export interface RichTextEditorRef {
|
|
3
|
+
save: () => Promise<void>;
|
|
4
|
+
isDirty: boolean;
|
|
5
|
+
fileId: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const RichTextEditor: import('react').ForwardRefExoticComponent<{
|
|
8
|
+
className?: string;
|
|
9
|
+
fileId?: string;
|
|
10
|
+
/** Si se define, el botón "Guardar" persistirá el documento vía este callback. */
|
|
11
|
+
onSave?: (schema: JSONContent) => Promise<void>;
|
|
12
|
+
onSaveSuccess?: () => void;
|
|
13
|
+
} & import('react').RefAttributes<RichTextEditorRef>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import { Selection } from '@tiptap/pm/state';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the bounding rectangle of the current selection in the editor.
|
|
5
|
+
* Uses the native DOM selection for more reliable results with portaled elements.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getSelectionBoundingRect: (editor: Editor) => DOMRect | null;
|
|
8
|
+
/**
|
|
9
|
+
* Checks if the current selection is valid for showing floating elements.
|
|
10
|
+
*/
|
|
11
|
+
export declare const isSelectionValid: (editor: Editor, selection?: Selection, excludedNodeTypes?: string[]) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the current text selection is valid for editing.
|
|
14
|
+
*/
|
|
15
|
+
export declare const isTextSelectionValid: (editor: Editor) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AlignmentToolbar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ColorHighlightToolbar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
export declare const EditorToolbar: ({ editor, isExpanded, onToggleExpand, rightContent, }: {
|
|
3
|
+
editor: Editor;
|
|
4
|
+
isExpanded?: boolean;
|
|
5
|
+
onToggleExpand?: () => void;
|
|
6
|
+
rightContent?: React.ReactNode;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './alignment';
|
|
2
|
+
export * from './blockquote';
|
|
3
|
+
export * from './bold';
|
|
4
|
+
export * from './bullet_list';
|
|
5
|
+
export * from './code';
|
|
6
|
+
export * from './code_block';
|
|
7
|
+
export * from './color_and_highlight';
|
|
8
|
+
export * from './editor_toolbar';
|
|
9
|
+
export * from './hard_break';
|
|
10
|
+
export * from './headings';
|
|
11
|
+
export * from './horizontal_rule';
|
|
12
|
+
export * from './image_placeholder_toolbar';
|
|
13
|
+
export * from './italic';
|
|
14
|
+
export * from './link';
|
|
15
|
+
export * from './mobile_toolbar_group';
|
|
16
|
+
export * from './ordered_list';
|
|
17
|
+
export * from './redo';
|
|
18
|
+
export * from './search_and_replace_toolbar';
|
|
19
|
+
export * from './strikethrough';
|
|
20
|
+
export * from './toolbar_provider';
|
|
21
|
+
export * from './underline';
|
|
22
|
+
export * from './undo';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface MobileToolbarGroupProps {
|
|
3
|
+
label: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const MobileToolbarGroup: ({ label, children, className, }: MobileToolbarGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const MobileToolbarItem: ({ children, active, onClick, closeDrawer, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
+
active?: boolean;
|
|
10
|
+
closeDrawer?: () => void;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SearchAndReplaceToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface ToolbarContextProps {
|
|
4
|
+
editor: Editor;
|
|
5
|
+
}
|
|
6
|
+
export declare const ToolbarContext: React.Context<ToolbarContextProps | null>;
|
|
7
|
+
export declare const useToolbar: () => ToolbarContextProps;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ToolbarProviderProps {
|
|
4
|
+
editor: Editor;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToolbarProvider: ({ editor, children }: ToolbarProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseFloatingOptions } from '@floating-ui/react';
|
|
2
|
+
import { Editor } from '@tiptap/core';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
interface FloatingElementProps {
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
shouldShow?: boolean;
|
|
7
|
+
floatingOptions?: Partial<UseFloatingOptions>;
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
referenceElement?: HTMLElement | null;
|
|
11
|
+
getBoundingClientRect?: (editor: Editor) => DOMRect | null;
|
|
12
|
+
closeOnEscape?: boolean;
|
|
13
|
+
resetTextSelectionOnClose?: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const FloatingElement: ({ editor, shouldShow, floatingOptions, zIndex, onOpenChange, referenceElement, getBoundingClientRect, closeOnEscape, children, style, className, }: FloatingElementProps) => React.ReactPortal | null;
|
|
19
|
+
export declare const isElementWithinEditor: (editor: Editor, element: Node) => boolean;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/sidebar';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface UseImageUploadProps {
|
|
2
|
+
onUpload?: (url: string) => void;
|
|
3
|
+
uploadFn: (file: File) => Promise<string>;
|
|
4
|
+
}
|
|
5
|
+
export declare function useImageUpload({ onUpload, uploadFn }: UseImageUploadProps): {
|
|
6
|
+
previewUrl: string | null;
|
|
7
|
+
fileName: string | null;
|
|
8
|
+
fileInputRef: import('react').RefObject<HTMLInputElement | null>;
|
|
9
|
+
handleThumbnailClick: () => void;
|
|
10
|
+
handleFileChange: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
11
|
+
handleRemove: () => void;
|
|
12
|
+
uploading: boolean;
|
|
13
|
+
error: string | null;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMediaQuery(query: string): boolean;
|