@dooherceg/tiptap-controlled-editor-with-table 0.0.2 → 0.0.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes zoomIn{0%{transform:scale(.95)}to{transform:scale(1)}}@keyframes zoomOut{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes zoom{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes slideFromTop{0%{transform:translateY(-.5rem)}to{transform:translateY(0)}}@keyframes slideFromRight{0%{transform:translate(.5rem)}to{transform:translate(0)}}@keyframes slideFromLeft{0%{transform:translate(-.5rem)}to{transform:translate(0)}}@keyframes slideFromBottom{0%{transform:translateY(.5rem)}to{transform:translateY(0)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:root{overflow-wrap:break-word;text-size-adjust:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--tt-gray-light-a-50: rgba(56, 56, 56, .04);--tt-gray-light-a-100: rgba(15, 22, 36, .05);--tt-gray-light-a-200: rgba(37, 39, 45, .1);--tt-gray-light-a-300: rgba(47, 50, 55, .2);--tt-gray-light-a-400: rgba(40, 44, 51, .42);--tt-gray-light-a-500: rgba(52, 55, 60, .64);--tt-gray-light-a-600: rgba(36, 39, 46, .78);--tt-gray-light-a-700: rgba(35, 37, 42, .87);--tt-gray-light-a-800: rgba(30, 32, 36, .95);--tt-gray-light-a-900: rgba(29, 30, 32, .98);--tt-gray-light-50: rgba(250, 250, 250, 1);--tt-gray-light-100: rgba(244, 244, 245, 1);--tt-gray-light-200: rgba(234, 234, 235, 1);--tt-gray-light-300: rgba(213, 214, 215, 1);--tt-gray-light-400: rgba(166, 167, 171, 1);--tt-gray-light-500: rgba(125, 127, 130, 1);--tt-gray-light-600: rgba(83, 86, 90, 1);--tt-gray-light-700: rgba(64, 65, 69, 1);--tt-gray-light-800: rgba(44, 45, 48, 1);--tt-gray-light-900: rgba(34, 35, 37, 1);--tt-gray-dark-a-50: rgba(232, 232, 253, .05);--tt-gray-dark-a-100: rgba(231, 231, 243, .07);--tt-gray-dark-a-200: rgba(238, 238, 246, .11);--tt-gray-dark-a-300: rgba(239, 239, 245, .22);--tt-gray-dark-a-400: rgba(244, 244, 255, .37);--tt-gray-dark-a-500: rgba(236, 238, 253, .5);--tt-gray-dark-a-600: rgba(247, 247, 253, .64);--tt-gray-dark-a-700: rgba(251, 251, 254, .75);--tt-gray-dark-a-800: rgba(253, 253, 253, .88);--tt-gray-dark-a-900: rgba(255, 255, 255, .96);--tt-gray-dark-50: rgba(25, 25, 26, 1);--tt-gray-dark-100: rgba(32, 32, 34, 1);--tt-gray-dark-200: rgba(45, 45, 47, 1);--tt-gray-dark-300: rgba(70, 70, 73, 1);--tt-gray-dark-400: rgba(99, 99, 105, 1);--tt-gray-dark-500: rgba(124, 124, 131, 1);--tt-gray-dark-600: rgba(163, 163, 168, 1);--tt-gray-dark-700: rgba(192, 192, 195, 1);--tt-gray-dark-800: rgba(224, 224, 225, 1);--tt-gray-dark-900: rgba(245, 245, 245, 1);--tt-brand-color-50: rgba(239, 238, 255, 1);--tt-brand-color-100: rgba(222, 219, 255, 1);--tt-brand-color-200: rgba(195, 189, 255, 1);--tt-brand-color-300: rgba(157, 138, 255, 1);--tt-brand-color-400: rgba(122, 82, 255, 1);--tt-brand-color-500: rgba(98, 41, 255, 1);--tt-brand-color-600: rgba(84, 0, 229, 1);--tt-brand-color-700: rgba(75, 0, 204, 1);--tt-brand-color-800: rgba(56, 0, 153, 1);--tt-brand-color-900: rgba(43, 25, 102, 1);--tt-brand-color-950: hsla(257, 100%, 9%, 1);--tt-brand-color-a-50: rgba(98, 41, 255, .04);--tt-brand-color-a-100: rgba(98, 41, 255, .06);--tt-brand-color-a-200: rgba(98, 41, 255, .11);--tt-brand-color-a-300: rgba(98, 41, 255, .22);--tt-brand-color-a-400: rgba(98, 41, 255, .37);--tt-brand-color-a-500: rgba(98, 41, 255, .5);--tt-brand-color-a-600: rgba(98, 41, 255, .64);--tt-brand-color-a-700: rgba(98, 41, 255, .75);--tt-brand-color-a-800: rgba(98, 41, 255, .88);--tt-brand-color-a-900: rgba(98, 41, 255, .96);--tt-color-green-inc-5: hsla(129, 100%, 97%, 1);--tt-color-green-inc-4: hsla(129, 100%, 92%, 1);--tt-color-green-inc-3: hsla(131, 100%, 86%, 1);--tt-color-green-inc-2: hsla(133, 98%, 78%, 1);--tt-color-green-inc-1: hsla(137, 99%, 70%, 1);--tt-color-green-base: hsla(147, 99%, 50%, 1);--tt-color-green-dec-1: hsla(147, 97%, 41%, 1);--tt-color-green-dec-2: hsla(146, 98%, 32%, 1);--tt-color-green-dec-3: hsla(146, 100%, 24%, 1);--tt-color-green-dec-4: hsla(144, 100%, 16%, 1);--tt-color-green-dec-5: hsla(140, 100%, 9%, 1);--tt-color-yellow-inc-5: hsla(50, 100%, 97%, 1);--tt-color-yellow-inc-4: hsla(50, 100%, 91%, 1);--tt-color-yellow-inc-3: hsla(50, 100%, 84%, 1);--tt-color-yellow-inc-2: hsla(50, 100%, 77%, 1);--tt-color-yellow-inc-1: hsla(50, 100%, 68%, 1);--tt-color-yellow-base: hsla(52, 100%, 50%, 1);--tt-color-yellow-dec-1: hsla(52, 100%, 41%, 1);--tt-color-yellow-dec-2: hsla(52, 100%, 32%, 1);--tt-color-yellow-dec-3: hsla(52, 100%, 24%, 1);--tt-color-yellow-dec-4: hsla(51, 100%, 16%, 1);--tt-color-yellow-dec-5: hsla(50, 100%, 9%, 1);--tt-color-red-inc-5: hsla(11, 100%, 96%, 1);--tt-color-red-inc-4: hsla(11, 100%, 88%, 1);--tt-color-red-inc-3: hsla(10, 100%, 80%, 1);--tt-color-red-inc-2: hsla(9, 100%, 73%, 1);--tt-color-red-inc-1: hsla(7, 100%, 64%, 1);--tt-color-red-base: hsla(7, 100%, 54%, 1);--tt-color-red-dec-1: hsla(7, 100%, 41%, 1);--tt-color-red-dec-2: hsla(5, 100%, 32%, 1);--tt-color-red-dec-3: hsla(4, 100%, 24%, 1);--tt-color-red-dec-4: hsla(3, 100%, 16%, 1);--tt-color-red-dec-5: hsla(1, 100%, 9%, 1);--white: rgba(255, 255, 255, 1);--black: rgba(14, 14, 17, 1);--transparent: rgba(255, 255, 255, 0);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(17, 24, 39, .04), 0px 12px 24px 0px rgba(17, 24, 39, .04), 0px 6px 8px 0px rgba(17, 24, 39, .02), 0px 2px 3px 0px rgba(17, 24, 39, .02);--tt-radius-xxs: .125rem;--tt-radius-xs: .25rem;--tt-radius-sm: .375rem;--tt-radius-md: .5rem;--tt-radius-lg: .75rem;--tt-radius-xl: 1rem;--tt-transition-duration-short: .1s;--tt-transition-duration-default: .2s;--tt-transition-duration-long: .64s;--tt-transition-easing-default: cubic-bezier(.46, .03, .52, .96);--tt-transition-easing-cubic: cubic-bezier(.65, .05, .36, 1);--tt-transition-easing-quart: cubic-bezier(.77, 0, .18, 1);--tt-transition-easing-circ: cubic-bezier(.79, .14, .15, .86);--tt-transition-easing-back: cubic-bezier(.68, -.55, .27, 1.55);--tt-accent-contrast: 8%;--tt-destructive-contrast: 8%;--tt-foreground-contrast: 8%}:root,:root *,:root :before,:root :after{box-sizing:border-box;transition:none var(--tt-transition-duration-default) var(--tt-transition-easing-default)}:root{--tt-bg-color: var(--white);--tt-border-color: var(--tt-gray-light-a-200);--tt-border-color-tint: var(--tt-gray-light-a-100);--tt-sidebar-bg-color: var(--tt-gray-light-100);--tt-scrollbar-color: var(--tt-gray-light-a-200);--tt-cursor-color: var(--tt-brand-color-500);--tt-selection-color: rgba(157, 138, 255, .2);--tt-card-bg-color: var(--white);--tt-card-border-color: var(--tt-gray-light-a-100);--tt-table-border-color: var(--tt-gray-light-900);--tt-table-header-bg-color: var(--tt-gray-light-200);--tt-table-header-text-color: var(--black);--tt-table-header-border-color: var(--tt-gray-light-900)}.dark{--tt-bg-color: var(--black);--tt-border-color: var(--tt-gray-dark-a-200);--tt-border-color-tint: var(--tt-gray-dark-a-100);--tt-sidebar-bg-color: var(--tt-gray-dark-100);--tt-scrollbar-color: var(--tt-gray-dark-a-200);--tt-cursor-color: var(--tt-brand-color-400);--tt-selection-color: rgba(122, 82, 255, .2);--tt-card-bg-color: var(--tt-gray-dark-50);--tt-card-border-color: var(--tt-gray-dark-a-50);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(0, 0, 0, .5), 0px 12px 24px 0px rgba(0, 0, 0, .24), 0px 6px 8px 0px rgba(0, 0, 0, .22), 0px 2px 3px 0px rgba(0, 0, 0, .12);--tt-table-border-color: var(--white);--tt-table-header-bg-color: var(--tt-gray-dark-700);--tt-table-header-text-color: var(--black);--tt-table-header-border-color: var(--white)}:root{--tt-color-text-gray: hsl(45, 2%, 46%);--tt-color-text-brown: hsl(19, 31%, 47%);--tt-color-text-orange: hsl(30, 89%, 45%);--tt-color-text-yellow: hsl(38, 62%, 49%);--tt-color-text-green: hsl(148, 32%, 39%);--tt-color-text-blue: hsl(202, 54%, 43%);--tt-color-text-purple: hsl(274, 32%, 54%);--tt-color-text-pink: hsl(328, 49%, 53%);--tt-color-text-red: hsl(2, 62%, 55%);--tt-color-text-gray-contrast: hsla(39, 26%, 26%, .15);--tt-color-text-brown-contrast: hsla(18, 43%, 69%, .35);--tt-color-text-orange-contrast: hsla(24, 73%, 55%, .27);--tt-color-text-yellow-contrast: hsla(44, 82%, 59%, .39);--tt-color-text-green-contrast: hsla(126, 29%, 60%, .27);--tt-color-text-blue-contrast: hsla(202, 54%, 59%, .27);--tt-color-text-purple-contrast: hsla(274, 37%, 64%, .27);--tt-color-text-pink-contrast: hsla(331, 60%, 71%, .27);--tt-color-text-red-contrast: hsla(8, 79%, 79%, .4)}.dark{--tt-color-text-gray: hsl(0, 0%, 61%);--tt-color-text-brown: hsl(18, 35%, 58%);--tt-color-text-orange: hsl(25, 53%, 53%);--tt-color-text-yellow: hsl(36, 54%, 55%);--tt-color-text-green: hsl(145, 32%, 47%);--tt-color-text-blue: hsl(202, 64%, 52%);--tt-color-text-purple: hsl(270, 55%, 62%);--tt-color-text-pink: hsl(329, 57%, 58%);--tt-color-text-red: hsl(1, 69%, 60%);--tt-color-text-gray-contrast: hsla(0, 0%, 100%, .09);--tt-color-text-brown-contrast: hsla(17, 45%, 50%, .25);--tt-color-text-orange-contrast: hsla(27, 82%, 53%, .2);--tt-color-text-yellow-contrast: hsla(35, 49%, 47%, .2);--tt-color-text-green-contrast: hsla(151, 55%, 39%, .2);--tt-color-text-blue-contrast: hsla(202, 54%, 43%, .2);--tt-color-text-purple-contrast: hsla(271, 56%, 60%, .18);--tt-color-text-pink-contrast: hsla(331, 67%, 58%, .22);--tt-color-text-red-contrast: hsla(0, 67%, 60%, .25)}:root{--tt-color-highlight-yellow: #fef9c3;--tt-color-highlight-green: #dcfce7;--tt-color-highlight-blue: #e0f2fe;--tt-color-highlight-purple: #f3e8ff;--tt-color-highlight-red: #ffe4e6;--tt-color-highlight-gray: rgb(248, 248, 247);--tt-color-highlight-brown: rgb(244, 238, 238);--tt-color-highlight-orange: rgb(251, 236, 221);--tt-color-highlight-pink: rgb(252, 241, 246);--tt-color-highlight-yellow-contrast: #fbe604;--tt-color-highlight-green-contrast: #c7fad8;--tt-color-highlight-blue-contrast: #ceeafd;--tt-color-highlight-purple-contrast: #e4ccff;--tt-color-highlight-red-contrast: #ffccd0;--tt-color-highlight-gray-contrast: rgba(84, 72, 49, .15);--tt-color-highlight-brown-contrast: rgba(210, 162, 141, .35);--tt-color-highlight-orange-contrast: rgba(224, 124, 57, .27);--tt-color-highlight-pink-contrast: rgba(225, 136, 179, .27)}.dark{--tt-color-highlight-yellow: #6b6524;--tt-color-highlight-green: #509568;--tt-color-highlight-blue: #6e92aa;--tt-color-highlight-purple: #583e74;--tt-color-highlight-red: #743e42;--tt-color-highlight-gray: rgb(47, 47, 47);--tt-color-highlight-brown: rgb(74, 50, 40);--tt-color-highlight-orange: rgb(92, 59, 35);--tt-color-highlight-pink: rgb(78, 44, 60);--tt-color-highlight-yellow-contrast: #58531e;--tt-color-highlight-green-contrast: #47855d;--tt-color-highlight-blue-contrast: #5e86a1;--tt-color-highlight-purple-contrast: #4c3564;--tt-color-highlight-red-contrast: #643539;--tt-color-highlight-gray-contrast: rgba(255, 255, 255, .094);--tt-color-highlight-brown-contrast: rgba(184, 101, 69, .25);--tt-color-highlight-orange-contrast: rgba(233, 126, 37, .2);--tt-color-highlight-pink-contrast: rgba(220, 76, 145, .22)}.tiptap.ProseMirror{--blockquote-bg-color: var(--tt-gray-light-900)}.dark .tiptap.ProseMirror{--blockquote-bg-color: var(--tt-gray-dark-900)}.tiptap.ProseMirror blockquote{position:relative;padding-left:1em;padding-top:.375em;padding-bottom:.375em;margin:1.5rem 0}.tiptap.ProseMirror blockquote p{margin-top:0}.tiptap.ProseMirror blockquote:before,.tiptap.ProseMirror blockquote.is-empty:before{position:absolute;bottom:0;left:0;top:0;height:100%;width:.25em;background-color:var(--blockquote-bg-color);content:"";border-radius:0}.tiptap.ProseMirror{--tt-inline-code-bg-color: var(--tt-gray-light-a-100);--tt-inline-code-text-color: var(--tt-gray-light-a-700);--tt-inline-code-border-color: var(--tt-gray-light-a-200);--tt-codeblock-bg: var(--tt-gray-light-a-50);--tt-codeblock-text: var(--tt-gray-light-a-800);--tt-codeblock-border: var(--tt-gray-light-a-200)}.dark .tiptap.ProseMirror{--tt-inline-code-bg-color: var(--tt-gray-dark-a-100);--tt-inline-code-text-color: var(--tt-gray-dark-a-700);--tt-inline-code-border-color: var(--tt-gray-dark-a-200);--tt-codeblock-bg: var(--tt-gray-dark-a-50);--tt-codeblock-text: var(--tt-gray-dark-a-800);--tt-codeblock-border: var(--tt-gray-dark-a-200)}.tiptap.ProseMirror code{background-color:var(--tt-inline-code-bg-color);color:var(--tt-inline-code-text-color);border:1px solid var(--tt-inline-code-border-color);font-family:JetBrains Mono NL,monospace;font-size:.875em;line-height:1.4;border-radius:6px/.375rem;padding:.1em .2em}.tiptap.ProseMirror pre{background-color:var(--tt-codeblock-bg);color:var(--tt-codeblock-text);border:1px solid var(--tt-codeblock-border);margin-top:1.5em;margin-bottom:1.5em;padding:1em;font-size:1rem;border-radius:6px/.375rem}.tiptap.ProseMirror pre code{background-color:transparent;border:none;border-radius:0;-webkit-text-fill-color:inherit;color:inherit}.tiptap.ProseMirror h1,.tiptap.ProseMirror h2,.tiptap.ProseMirror h3,.tiptap.ProseMirror h4{position:relative;color:inherit;font-style:inherit}.tiptap.ProseMirror h1:first-child,.tiptap.ProseMirror h1:first-of-type,.tiptap.ProseMirror h2:first-child,.tiptap.ProseMirror h2:first-of-type,.tiptap.ProseMirror h3:first-child,.tiptap.ProseMirror h3:first-of-type,.tiptap.ProseMirror h4:first-child,.tiptap.ProseMirror h4:first-of-type{margin-top:0}.tiptap.ProseMirror h1{font-size:1.5em;font-weight:700;margin-top:3em}.tiptap.ProseMirror h2{font-size:1.25em;font-weight:700;margin-top:2.5em}.tiptap.ProseMirror h3{font-size:1.125em;font-weight:600;margin-top:2em}.tiptap.ProseMirror h4{font-size:1em;font-weight:600;margin-top:2em}.tiptap.ProseMirror{--horizontal-rule-color: var(--tt-gray-light-a-200)}.dark .tiptap.ProseMirror{--horizontal-rule-color: var(--tt-gray-dark-a-200)}.tiptap.ProseMirror hr{border:none;height:1px;background-color:var(--horizontal-rule-color)}.tiptap.ProseMirror [data-type=horizontalRule]{margin-top:2.25em;margin-bottom:2.25em;padding-top:.75rem;padding-bottom:.75rem}.tiptap.ProseMirror img{max-width:100%;height:auto;display:block}.tiptap.ProseMirror>img:not([data-type=emoji] img){margin:2rem 0;outline:.125rem solid transparent;border-radius:var(--tt-radius-xs, .25rem)}.tiptap.ProseMirror img:not([data-type=emoji] img).ProseMirror-selectednode{outline-color:var(--tt-brand-color-500)}.tiptap.ProseMirror .tiptap-thread:has(>img){margin:2rem 0}.tiptap.ProseMirror .tiptap-thread:has(>img) img{outline:.125rem solid transparent;border-radius:var(--tt-radius-xs, .25rem)}.tiptap.ProseMirror .tiptap-thread img{margin:0}.tiptap.ProseMirror{--tt-checklist-bg-color: var(--tt-gray-light-a-100);--tt-checklist-bg-active-color: var(--tt-gray-light-a-900);--tt-checklist-border-color: var(--tt-gray-light-a-200);--tt-checklist-border-active-color: var(--tt-gray-light-a-900);--tt-checklist-check-icon-color: var(--white);--tt-checklist-text-active: var(--tt-gray-light-a-500)}.dark .tiptap.ProseMirror{--tt-checklist-bg-color: var(--tt-gray-dark-a-100);--tt-checklist-bg-active-color: var(--tt-gray-dark-a-900);--tt-checklist-border-color: var(--tt-gray-dark-a-200);--tt-checklist-border-active-color: var(--tt-gray-dark-a-900);--tt-checklist-check-icon-color: var(--black);--tt-checklist-text-active: var(--tt-gray-dark-a-500)}.tiptap.ProseMirror ol,.tiptap.ProseMirror ul{margin-top:1.5em;margin-bottom:1.5em;padding-left:1.5em}.tiptap.ProseMirror ol:first-child,.tiptap.ProseMirror ul:first-child{margin-top:0}.tiptap.ProseMirror ol:last-child,.tiptap.ProseMirror ul:last-child{margin-bottom:0}.tiptap.ProseMirror ol ol,.tiptap.ProseMirror ol ul,.tiptap.ProseMirror ul ol,.tiptap.ProseMirror ul ul{margin-top:0;margin-bottom:0}.tiptap.ProseMirror li p{margin-top:0;line-height:1.6}.tiptap.ProseMirror ol{list-style:decimal}.tiptap.ProseMirror ol ol{list-style:lower-alpha}.tiptap.ProseMirror ol ol ol{list-style:lower-roman}.tiptap.ProseMirror ul:not([data-type=taskList]){list-style:disc}.tiptap.ProseMirror ul:not([data-type=taskList]) ul{list-style:circle}.tiptap.ProseMirror ul:not([data-type=taskList]) ul ul{list-style:square}.tiptap.ProseMirror ul[data-type=taskList]{padding-left:.25em}.tiptap.ProseMirror ul[data-type=taskList] li{display:flex;flex-direction:row;align-items:flex-start}.tiptap.ProseMirror ul[data-type=taskList] li:not(:has(>p:first-child)){list-style-type:none}.tiptap.ProseMirror ul[data-type=taskList] li[data-checked=true]>div>p{opacity:.5;text-decoration:line-through}.tiptap.ProseMirror ul[data-type=taskList] li[data-checked=true]>div>p span{text-decoration:line-through}.tiptap.ProseMirror ul[data-type=taskList] li label{position:relative;padding-top:.375rem;padding-right:.5rem}.tiptap.ProseMirror ul[data-type=taskList] li label input[type=checkbox]{position:absolute;opacity:0;width:0;height:0}.tiptap.ProseMirror ul[data-type=taskList] li label span{display:block;width:1em;height:1em;border:1px solid var(--tt-checklist-border-color);border-radius:var(--tt-radius-xs, .25rem);position:relative;cursor:pointer;background-color:var(--tt-checklist-bg-color);transition:background-color 80ms ease-out,border-color 80ms ease-out}.tiptap.ProseMirror ul[data-type=taskList] li label span:before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:.75em;height:.75em;background-color:var(--tt-checklist-check-icon-color);opacity:0;-webkit-mask:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.4142%204.58579C22.1953%205.36683%2022.1953%206.63317%2021.4142%207.41421L10.4142%2018.4142C9.63317%2019.1953%208.36684%2019.1953%207.58579%2018.4142L2.58579%2013.4142C1.80474%2012.6332%201.80474%2011.3668%202.58579%2010.5858C3.36683%209.80474%204.63317%209.80474%205.41421%2010.5858L9%2014.1716L18.5858%204.58579C19.3668%203.80474%2020.6332%203.80474%2021.4142%204.58579Z%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E) center/contain no-repeat;mask:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.4142%204.58579C22.1953%205.36683%2022.1953%206.63317%2021.4142%207.41421L10.4142%2018.4142C9.63317%2019.1953%208.36684%2019.1953%207.58579%2018.4142L2.58579%2013.4142C1.80474%2012.6332%201.80474%2011.3668%202.58579%2010.5858C3.36683%209.80474%204.63317%209.80474%205.41421%2010.5858L9%2014.1716L18.5858%204.58579C19.3668%203.80474%2020.6332%203.80474%2021.4142%204.58579Z%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E) center/contain no-repeat}.tiptap.ProseMirror ul[data-type=taskList] li label input[type=checkbox]:checked+span{background:var(--tt-checklist-bg-active-color);border-color:var(--tt-checklist-border-active-color)}.tiptap.ProseMirror ul[data-type=taskList] li label input[type=checkbox]:checked+span:before{opacity:1}.tiptap.ProseMirror ul[data-type=taskList] li div{flex:1 1 0%;min-width:0}.tiptap.ProseMirror{--tt-collaboration-carets-label: var(--tt-gray-light-900);--link-text-color: var(--tt-brand-color-500);--thread-text: var(--tt-gray-light-900);--placeholder-color: var(--tt-gray-light-a-400);--thread-bg-color: var(--tt-color-yellow-inc-2);--tiptap-ai-insertion-color: var(--tt-brand-color-600)}.dark .tiptap.ProseMirror{--tt-collaboration-carets-label: var(--tt-gray-dark-100);--link-text-color: var(--tt-brand-color-400);--thread-text: var(--tt-gray-dark-900);--placeholder-color: var(--tt-gray-dark-a-400);--thread-bg-color: var(--tt-color-yellow-dec-2);--tiptap-ai-insertion-color: var(--tt-brand-color-400)}.tiptap.ProseMirror>*{position:relative}.tiptap.ProseMirror{white-space:pre-wrap;outline:none;caret-color:var(--tt-cursor-color)}.tiptap.ProseMirror p:not(:first-child):not(td p):not(th p){font-size:1rem;line-height:1.6;font-weight:400;margin-top:20px}.tiptap.ProseMirror:not(.readonly):not(.ProseMirror-hideselection) ::selection{background-color:var(--tt-selection-color)}.tiptap.ProseMirror:not(.readonly):not(.ProseMirror-hideselection) .selection::selection{background:transparent}.tiptap.ProseMirror .selection{display:inline;background-color:var(--tt-selection-color)}.tiptap.ProseMirror .ProseMirror-selectednode:not(img):not(pre):not(.react-renderer){border-radius:var(--tt-radius-md);background-color:var(--tt-selection-color)}.tiptap.ProseMirror .ProseMirror-hideselection{caret-color:transparent}.tiptap.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}.tiptap.ProseMirror a span{text-decoration:underline}.tiptap.ProseMirror s span{text-decoration:line-through}.tiptap.ProseMirror u span{text-decoration:underline}.tiptap.ProseMirror .tiptap-ai-insertion{color:var(--tiptap-ai-insertion-color)}.tiptap.ProseMirror .collaboration-carets__caret{border-right:1px solid transparent;border-left:1px solid transparent;pointer-events:none;margin-left:-1px;margin-right:-1px;position:relative;word-break:normal}.tiptap.ProseMirror .collaboration-carets__label{color:var(--tt-collaboration-carets-label);border-radius:.25rem;border-bottom-left-radius:0;font-size:.75rem;font-weight:600;left:-1px;line-height:1;padding:.125rem .375rem;position:absolute;top:-1.3em;-webkit-user-select:none;user-select:none;white-space:nowrap}.tiptap.ProseMirror [data-type=emoji] img{display:inline-block;width:1.25em;height:1.25em;cursor:text}.tiptap.ProseMirror a{color:var(--link-text-color);text-decoration:underline}.tiptap.ProseMirror [data-type=mention]{display:inline-block;color:var(--tt-brand-color-500)}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--inline{transition:color .2s ease-in-out,background-color .2s ease-in-out;color:var(--thread-text);border-bottom:2px dashed var(--tt-color-yellow-base);font-weight:600}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--inline.tiptap-thread--selected,.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--inline.tiptap-thread--hovered{background-color:var(--thread-bg-color);border-bottom-color:transparent}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:has(img){outline:.125rem solid var(--tt-color-yellow-base);border-radius:var(--tt-radius-xs, .25rem);overflow:hidden;width:fit-content}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:has(img).tiptap-thread--selected{outline-width:.25rem;outline-color:var(--tt-color-yellow-base)}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:has(img).tiptap-thread--hovered{outline-width:.25rem}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:not(:has(img)){border-radius:.25rem;border-bottom:.125rem dashed var(--tt-color-yellow-base);border-top:.125rem dashed var(--tt-color-yellow-base);outline:.25rem solid transparent}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:not(:has(img)).tiptap-thread--hovered,.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:not(:has(img)).tiptap-thread--selected{background-color:var(--tt-color-yellow-base);outline-color:var(--tt-color-yellow-base)}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--resolved.tiptap-thread--inline.tiptap-thread--selected{background-color:var(--tt-color-yellow-base);border-color:transparent;opacity:.5}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--block:has(.react-renderer){margin-top:3rem;margin-bottom:3rem}.is-empty:not(.with-slash)[data-placeholder]:has(>.ProseMirror-trailingBreak:only-child):before{content:attr(data-placeholder)}.is-empty.with-slash[data-placeholder]:has(>.ProseMirror-trailingBreak:only-child):before{content:"Write, type '/' for commands…";font-style:italic}.is-empty[data-placeholder]:has(>.ProseMirror-trailingBreak:only-child):before{pointer-events:none;height:0;position:absolute;width:100%;text-align:inherit;left:0;right:0}.is-empty[data-placeholder]:has(>.ProseMirror-trailingBreak):before{color:var(--placeholder-color)}.prosemirror-dropcursor-block,.prosemirror-dropcursor-inline{background:var(--tt-brand-color-400)!important;border-radius:.25rem;margin-left:-1px;margin-right:-1px;width:100%;height:.188rem;cursor:grabbing}body{--tt-toolbar-height: 44px;--tt-theme-text: var(--tt-gray-light-900)}.dark body{--tt-theme-text: var(--tt-gray-dark-900)}::-webkit-scrollbar{width:.25rem}*{scrollbar-width:thin;scrollbar-color:var(--tt-scrollbar-color) transparent}::-webkit-scrollbar-thumb{background-color:var(--tt-scrollbar-color);border-radius:9999px}::-webkit-scrollbar-track{background:transparent}.tiptap.ProseMirror{font-family:DM Sans,sans-serif}.simple-editor-wrapper{width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column}.simple-editor-content{width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto}.simple-editor-content .tiptap.ProseMirror.simple-editor{flex:1;padding:3rem 1rem}@media screen and (max-width:480px){.simple-editor-content .tiptap.ProseMirror.simple-editor{padding:1rem 1.5rem 30vh}}table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}table td,table th{border:1px solid var(--table-border-color);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}table td>*,table th>*{margin-bottom:0}table th{background:var(--th-bg-color);color:var(--th-text-color);border:1px solid var(--table-border-color);font-weight:700;text-align:left;position:relative;overflow:visible}table td{background:var(--td-bg-color);color:var(--tt-color-text-gray)}table .selectedCell:after{background:var(--gray-2);content:"";inset:0;pointer-events:none;position:absolute;z-index:2}table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.tiptap :first-child{margin-top:0}.tiptap table{border-collapse:collapse;overflow:hidden;table-layout:fixed;margin:48px 0}.tiptap table td,.tiptap table th{border:1px solid var(--tt-table-border-color);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.tiptap table td>*,.tiptap table th>*{margin-bottom:0}.tiptap table th{background-color:var(--tt-table-header-bg-color);font-weight:700;text-align:left;color:var(--tt-table-header-text-color);border-color:var(--tt-table-header-border-color)}.tiptap table .selectedCell:after{background:var(--tt-brand-color-a-500);content:"";inset:0;pointer-events:none;position:absolute;z-index:2}.tiptap table .column-resize-handle{background-color:purple;bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px;z-index:99}.tiptap.resize-cursor{cursor:ew-resize;cursor:col-resize}
|
|
1
|
+
@charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes zoomIn{0%{transform:scale(.95)}to{transform:scale(1)}}@keyframes zoomOut{0%{transform:scale(1)}to{transform:scale(.95)}}@keyframes zoom{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes slideFromTop{0%{transform:translateY(-.5rem)}to{transform:translateY(0)}}@keyframes slideFromRight{0%{transform:translate(.5rem)}to{transform:translate(0)}}@keyframes slideFromLeft{0%{transform:translate(-.5rem)}to{transform:translate(0)}}@keyframes slideFromBottom{0%{transform:translateY(.5rem)}to{transform:translateY(0)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:root{overflow-wrap:break-word;text-size-adjust:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--tt-gray-light-a-50: rgba(56, 56, 56, .04);--tt-gray-light-a-100: rgba(15, 22, 36, .05);--tt-gray-light-a-200: rgba(37, 39, 45, .1);--tt-gray-light-a-300: rgba(47, 50, 55, .2);--tt-gray-light-a-400: rgba(40, 44, 51, .42);--tt-gray-light-a-500: rgba(52, 55, 60, .64);--tt-gray-light-a-600: rgba(36, 39, 46, .78);--tt-gray-light-a-700: rgba(35, 37, 42, .87);--tt-gray-light-a-800: rgba(30, 32, 36, .95);--tt-gray-light-a-900: rgba(29, 30, 32, .98);--tt-gray-light-50: rgba(250, 250, 250, 1);--tt-gray-light-100: rgba(244, 244, 245, 1);--tt-gray-light-200: rgba(234, 234, 235, 1);--tt-gray-light-300: rgba(213, 214, 215, 1);--tt-gray-light-400: rgba(166, 167, 171, 1);--tt-gray-light-500: rgba(125, 127, 130, 1);--tt-gray-light-600: rgba(83, 86, 90, 1);--tt-gray-light-700: rgba(64, 65, 69, 1);--tt-gray-light-800: rgba(44, 45, 48, 1);--tt-gray-light-900: rgba(34, 35, 37, 1);--tt-gray-dark-a-50: rgba(232, 232, 253, .05);--tt-gray-dark-a-100: rgba(231, 231, 243, .07);--tt-gray-dark-a-200: rgba(238, 238, 246, .11);--tt-gray-dark-a-300: rgba(239, 239, 245, .22);--tt-gray-dark-a-400: rgba(244, 244, 255, .37);--tt-gray-dark-a-500: rgba(236, 238, 253, .5);--tt-gray-dark-a-600: rgba(247, 247, 253, .64);--tt-gray-dark-a-700: rgba(251, 251, 254, .75);--tt-gray-dark-a-800: rgba(253, 253, 253, .88);--tt-gray-dark-a-900: rgba(255, 255, 255, .96);--tt-gray-dark-50: rgba(25, 25, 26, 1);--tt-gray-dark-100: rgba(32, 32, 34, 1);--tt-gray-dark-200: rgba(45, 45, 47, 1);--tt-gray-dark-300: rgba(70, 70, 73, 1);--tt-gray-dark-400: rgba(99, 99, 105, 1);--tt-gray-dark-500: rgba(124, 124, 131, 1);--tt-gray-dark-600: rgba(163, 163, 168, 1);--tt-gray-dark-700: rgba(192, 192, 195, 1);--tt-gray-dark-800: rgba(224, 224, 225, 1);--tt-gray-dark-900: rgba(245, 245, 245, 1);--tt-brand-color-50: rgba(239, 238, 255, 1);--tt-brand-color-100: rgba(222, 219, 255, 1);--tt-brand-color-200: rgba(195, 189, 255, 1);--tt-brand-color-300: rgba(157, 138, 255, 1);--tt-brand-color-400: rgba(122, 82, 255, 1);--tt-brand-color-500: rgba(98, 41, 255, 1);--tt-brand-color-600: rgba(84, 0, 229, 1);--tt-brand-color-700: rgba(75, 0, 204, 1);--tt-brand-color-800: rgba(56, 0, 153, 1);--tt-brand-color-900: rgba(43, 25, 102, 1);--tt-brand-color-950: hsla(257, 100%, 9%, 1);--tt-brand-color-a-50: rgba(98, 41, 255, .04);--tt-brand-color-a-100: rgba(98, 41, 255, .06);--tt-brand-color-a-200: rgba(98, 41, 255, .11);--tt-brand-color-a-300: rgba(98, 41, 255, .22);--tt-brand-color-a-400: rgba(98, 41, 255, .37);--tt-brand-color-a-500: rgba(98, 41, 255, .5);--tt-brand-color-a-600: rgba(98, 41, 255, .64);--tt-brand-color-a-700: rgba(98, 41, 255, .75);--tt-brand-color-a-800: rgba(98, 41, 255, .88);--tt-brand-color-a-900: rgba(98, 41, 255, .96);--tt-color-green-inc-5: hsla(129, 100%, 97%, 1);--tt-color-green-inc-4: hsla(129, 100%, 92%, 1);--tt-color-green-inc-3: hsla(131, 100%, 86%, 1);--tt-color-green-inc-2: hsla(133, 98%, 78%, 1);--tt-color-green-inc-1: hsla(137, 99%, 70%, 1);--tt-color-green-base: hsla(147, 99%, 50%, 1);--tt-color-green-dec-1: hsla(147, 97%, 41%, 1);--tt-color-green-dec-2: hsla(146, 98%, 32%, 1);--tt-color-green-dec-3: hsla(146, 100%, 24%, 1);--tt-color-green-dec-4: hsla(144, 100%, 16%, 1);--tt-color-green-dec-5: hsla(140, 100%, 9%, 1);--tt-color-yellow-inc-5: hsla(50, 100%, 97%, 1);--tt-color-yellow-inc-4: hsla(50, 100%, 91%, 1);--tt-color-yellow-inc-3: hsla(50, 100%, 84%, 1);--tt-color-yellow-inc-2: hsla(50, 100%, 77%, 1);--tt-color-yellow-inc-1: hsla(50, 100%, 68%, 1);--tt-color-yellow-base: hsla(52, 100%, 50%, 1);--tt-color-yellow-dec-1: hsla(52, 100%, 41%, 1);--tt-color-yellow-dec-2: hsla(52, 100%, 32%, 1);--tt-color-yellow-dec-3: hsla(52, 100%, 24%, 1);--tt-color-yellow-dec-4: hsla(51, 100%, 16%, 1);--tt-color-yellow-dec-5: hsla(50, 100%, 9%, 1);--tt-color-red-inc-5: hsla(11, 100%, 96%, 1);--tt-color-red-inc-4: hsla(11, 100%, 88%, 1);--tt-color-red-inc-3: hsla(10, 100%, 80%, 1);--tt-color-red-inc-2: hsla(9, 100%, 73%, 1);--tt-color-red-inc-1: hsla(7, 100%, 64%, 1);--tt-color-red-base: hsla(7, 100%, 54%, 1);--tt-color-red-dec-1: hsla(7, 100%, 41%, 1);--tt-color-red-dec-2: hsla(5, 100%, 32%, 1);--tt-color-red-dec-3: hsla(4, 100%, 24%, 1);--tt-color-red-dec-4: hsla(3, 100%, 16%, 1);--tt-color-red-dec-5: hsla(1, 100%, 9%, 1);--white: rgba(255, 255, 255, 1);--black: rgba(14, 14, 17, 1);--transparent: rgba(255, 255, 255, 0);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(17, 24, 39, .04), 0px 12px 24px 0px rgba(17, 24, 39, .04), 0px 6px 8px 0px rgba(17, 24, 39, .02), 0px 2px 3px 0px rgba(17, 24, 39, .02);--tt-radius-xxs: .125rem;--tt-radius-xs: .25rem;--tt-radius-sm: .375rem;--tt-radius-md: .5rem;--tt-radius-lg: .75rem;--tt-radius-xl: 1rem;--tt-transition-duration-short: .1s;--tt-transition-duration-default: .2s;--tt-transition-duration-long: .64s;--tt-transition-easing-default: cubic-bezier(.46, .03, .52, .96);--tt-transition-easing-cubic: cubic-bezier(.65, .05, .36, 1);--tt-transition-easing-quart: cubic-bezier(.77, 0, .18, 1);--tt-transition-easing-circ: cubic-bezier(.79, .14, .15, .86);--tt-transition-easing-back: cubic-bezier(.68, -.55, .27, 1.55);--tt-accent-contrast: 8%;--tt-destructive-contrast: 8%;--tt-foreground-contrast: 8%}:root,:root *,:root :before,:root :after{box-sizing:border-box;transition:none var(--tt-transition-duration-default) var(--tt-transition-easing-default)}:root{--tt-bg-color: var(--white);--tt-border-color: var(--tt-gray-light-a-200);--tt-border-color-tint: var(--tt-gray-light-a-100);--tt-sidebar-bg-color: var(--tt-gray-light-100);--tt-scrollbar-color: var(--tt-gray-light-a-200);--tt-cursor-color: var(--tt-brand-color-500);--tt-selection-color: rgba(157, 138, 255, .2);--tt-card-bg-color: var(--white);--tt-card-border-color: var(--tt-gray-light-a-100);--tt-table-border-color: var(--tt-gray-light-900);--tt-table-header-bg-color: var(--tt-gray-light-200);--tt-table-header-text-color: var(--black);--tt-table-header-border-color: var(--tt-gray-light-900)}.dark{--tt-bg-color: var(--black);--tt-border-color: var(--tt-gray-dark-a-200);--tt-border-color-tint: var(--tt-gray-dark-a-100);--tt-sidebar-bg-color: var(--tt-gray-dark-100);--tt-scrollbar-color: var(--tt-gray-dark-a-200);--tt-cursor-color: var(--tt-brand-color-400);--tt-selection-color: rgba(122, 82, 255, .2);--tt-card-bg-color: var(--tt-gray-dark-50);--tt-card-border-color: var(--tt-gray-dark-a-50);--tt-shadow-elevated-md: 0px 16px 48px 0px rgba(0, 0, 0, .5), 0px 12px 24px 0px rgba(0, 0, 0, .24), 0px 6px 8px 0px rgba(0, 0, 0, .22), 0px 2px 3px 0px rgba(0, 0, 0, .12);--tt-table-border-color: var(--white);--tt-table-header-bg-color: var(--tt-gray-dark-700);--tt-table-header-text-color: var(--black);--tt-table-header-border-color: var(--white)}:root{--tt-color-text-gray: hsl(45, 2%, 46%);--tt-color-text-brown: hsl(19, 31%, 47%);--tt-color-text-orange: hsl(30, 89%, 45%);--tt-color-text-yellow: hsl(38, 62%, 49%);--tt-color-text-green: hsl(148, 32%, 39%);--tt-color-text-blue: hsl(202, 54%, 43%);--tt-color-text-purple: hsl(274, 32%, 54%);--tt-color-text-pink: hsl(328, 49%, 53%);--tt-color-text-red: hsl(2, 62%, 55%);--tt-color-text-gray-contrast: hsla(39, 26%, 26%, .15);--tt-color-text-brown-contrast: hsla(18, 43%, 69%, .35);--tt-color-text-orange-contrast: hsla(24, 73%, 55%, .27);--tt-color-text-yellow-contrast: hsla(44, 82%, 59%, .39);--tt-color-text-green-contrast: hsla(126, 29%, 60%, .27);--tt-color-text-blue-contrast: hsla(202, 54%, 59%, .27);--tt-color-text-purple-contrast: hsla(274, 37%, 64%, .27);--tt-color-text-pink-contrast: hsla(331, 60%, 71%, .27);--tt-color-text-red-contrast: hsla(8, 79%, 79%, .4)}.dark{--tt-color-text-gray: hsl(0, 0%, 61%);--tt-color-text-brown: hsl(18, 35%, 58%);--tt-color-text-orange: hsl(25, 53%, 53%);--tt-color-text-yellow: hsl(36, 54%, 55%);--tt-color-text-green: hsl(145, 32%, 47%);--tt-color-text-blue: hsl(202, 64%, 52%);--tt-color-text-purple: hsl(270, 55%, 62%);--tt-color-text-pink: hsl(329, 57%, 58%);--tt-color-text-red: hsl(1, 69%, 60%);--tt-color-text-gray-contrast: hsla(0, 0%, 100%, .09);--tt-color-text-brown-contrast: hsla(17, 45%, 50%, .25);--tt-color-text-orange-contrast: hsla(27, 82%, 53%, .2);--tt-color-text-yellow-contrast: hsla(35, 49%, 47%, .2);--tt-color-text-green-contrast: hsla(151, 55%, 39%, .2);--tt-color-text-blue-contrast: hsla(202, 54%, 43%, .2);--tt-color-text-purple-contrast: hsla(271, 56%, 60%, .18);--tt-color-text-pink-contrast: hsla(331, 67%, 58%, .22);--tt-color-text-red-contrast: hsla(0, 67%, 60%, .25)}:root{--tt-color-highlight-yellow: #fef9c3;--tt-color-highlight-green: #dcfce7;--tt-color-highlight-blue: #e0f2fe;--tt-color-highlight-purple: #f3e8ff;--tt-color-highlight-red: #ffe4e6;--tt-color-highlight-gray: rgb(248, 248, 247);--tt-color-highlight-brown: rgb(244, 238, 238);--tt-color-highlight-orange: rgb(251, 236, 221);--tt-color-highlight-pink: rgb(252, 241, 246);--tt-color-highlight-yellow-contrast: #fbe604;--tt-color-highlight-green-contrast: #c7fad8;--tt-color-highlight-blue-contrast: #ceeafd;--tt-color-highlight-purple-contrast: #e4ccff;--tt-color-highlight-red-contrast: #ffccd0;--tt-color-highlight-gray-contrast: rgba(84, 72, 49, .15);--tt-color-highlight-brown-contrast: rgba(210, 162, 141, .35);--tt-color-highlight-orange-contrast: rgba(224, 124, 57, .27);--tt-color-highlight-pink-contrast: rgba(225, 136, 179, .27)}.dark{--tt-color-highlight-yellow: #6b6524;--tt-color-highlight-green: #509568;--tt-color-highlight-blue: #6e92aa;--tt-color-highlight-purple: #583e74;--tt-color-highlight-red: #743e42;--tt-color-highlight-gray: rgb(47, 47, 47);--tt-color-highlight-brown: rgb(74, 50, 40);--tt-color-highlight-orange: rgb(92, 59, 35);--tt-color-highlight-pink: rgb(78, 44, 60);--tt-color-highlight-yellow-contrast: #58531e;--tt-color-highlight-green-contrast: #47855d;--tt-color-highlight-blue-contrast: #5e86a1;--tt-color-highlight-purple-contrast: #4c3564;--tt-color-highlight-red-contrast: #643539;--tt-color-highlight-gray-contrast: rgba(255, 255, 255, .094);--tt-color-highlight-brown-contrast: rgba(184, 101, 69, .25);--tt-color-highlight-orange-contrast: rgba(233, 126, 37, .2);--tt-color-highlight-pink-contrast: rgba(220, 76, 145, .22)}.tiptap.ProseMirror{--blockquote-bg-color: var(--tt-gray-light-900)}.dark .tiptap.ProseMirror{--blockquote-bg-color: var(--tt-gray-dark-900)}.tiptap.ProseMirror blockquote{position:relative;padding-left:1em;padding-top:.375em;padding-bottom:.375em;margin:1.5rem 0}.tiptap.ProseMirror blockquote p{margin-top:0}.tiptap.ProseMirror blockquote:before,.tiptap.ProseMirror blockquote.is-empty:before{position:absolute;bottom:0;left:0;top:0;height:100%;width:.25em;background-color:var(--blockquote-bg-color);content:"";border-radius:0}.tiptap.ProseMirror{--tt-inline-code-bg-color: var(--tt-gray-light-a-100);--tt-inline-code-text-color: var(--tt-gray-light-a-700);--tt-inline-code-border-color: var(--tt-gray-light-a-200);--tt-codeblock-bg: var(--tt-gray-light-a-50);--tt-codeblock-text: var(--tt-gray-light-a-800);--tt-codeblock-border: var(--tt-gray-light-a-200)}.dark .tiptap.ProseMirror{--tt-inline-code-bg-color: var(--tt-gray-dark-a-100);--tt-inline-code-text-color: var(--tt-gray-dark-a-700);--tt-inline-code-border-color: var(--tt-gray-dark-a-200);--tt-codeblock-bg: var(--tt-gray-dark-a-50);--tt-codeblock-text: var(--tt-gray-dark-a-800);--tt-codeblock-border: var(--tt-gray-dark-a-200)}.tiptap.ProseMirror code{background-color:var(--tt-inline-code-bg-color);color:var(--tt-inline-code-text-color);border:1px solid var(--tt-inline-code-border-color);font-family:JetBrains Mono NL,monospace;font-size:.875em;line-height:1.4;border-radius:6px/.375rem;padding:.1em .2em}.tiptap.ProseMirror pre{background-color:var(--tt-codeblock-bg);color:var(--tt-codeblock-text);border:1px solid var(--tt-codeblock-border);margin-top:1.5em;margin-bottom:1.5em;padding:1em;font-size:1rem;border-radius:6px/.375rem}.tiptap.ProseMirror pre code{background-color:transparent;border:none;border-radius:0;-webkit-text-fill-color:inherit;color:inherit}.tiptap.ProseMirror h1,.tiptap.ProseMirror h2,.tiptap.ProseMirror h3,.tiptap.ProseMirror h4{position:relative;color:inherit;font-style:inherit}.tiptap.ProseMirror h1:first-child,.tiptap.ProseMirror h1:first-of-type,.tiptap.ProseMirror h2:first-child,.tiptap.ProseMirror h2:first-of-type,.tiptap.ProseMirror h3:first-child,.tiptap.ProseMirror h3:first-of-type,.tiptap.ProseMirror h4:first-child,.tiptap.ProseMirror h4:first-of-type{margin-top:0}.tiptap.ProseMirror h1{font-size:1.5em;font-weight:700;margin-top:3em}.tiptap.ProseMirror h2{font-size:1.25em;font-weight:700;margin-top:2.5em}.tiptap.ProseMirror h3{font-size:1.125em;font-weight:600;margin-top:2em}.tiptap.ProseMirror h4{font-size:1em;font-weight:600;margin-top:2em}.tiptap.ProseMirror{--horizontal-rule-color: var(--tt-gray-light-a-200)}.dark .tiptap.ProseMirror{--horizontal-rule-color: var(--tt-gray-dark-a-200)}.tiptap.ProseMirror hr{border:none;height:1px;background-color:var(--horizontal-rule-color)}.tiptap.ProseMirror [data-type=horizontalRule]{margin-top:2.25em;margin-bottom:2.25em;padding-top:.75rem;padding-bottom:.75rem}.tiptap.ProseMirror img{max-width:100%;height:auto;display:block}.tiptap.ProseMirror>img:not([data-type=emoji] img){margin:2rem 0;outline:.125rem solid transparent;border-radius:var(--tt-radius-xs, .25rem)}.tiptap.ProseMirror img:not([data-type=emoji] img).ProseMirror-selectednode{outline-color:var(--tt-brand-color-500)}.tiptap.ProseMirror .tiptap-thread:has(>img){margin:2rem 0}.tiptap.ProseMirror .tiptap-thread:has(>img) img{outline:.125rem solid transparent;border-radius:var(--tt-radius-xs, .25rem)}.tiptap.ProseMirror .tiptap-thread img{margin:0}.tiptap.ProseMirror{--tt-checklist-bg-color: var(--tt-gray-light-a-100);--tt-checklist-bg-active-color: var(--tt-gray-light-a-900);--tt-checklist-border-color: var(--tt-gray-light-a-200);--tt-checklist-border-active-color: var(--tt-gray-light-a-900);--tt-checklist-check-icon-color: var(--white);--tt-checklist-text-active: var(--tt-gray-light-a-500)}.dark .tiptap.ProseMirror{--tt-checklist-bg-color: var(--tt-gray-dark-a-100);--tt-checklist-bg-active-color: var(--tt-gray-dark-a-900);--tt-checklist-border-color: var(--tt-gray-dark-a-200);--tt-checklist-border-active-color: var(--tt-gray-dark-a-900);--tt-checklist-check-icon-color: var(--black);--tt-checklist-text-active: var(--tt-gray-dark-a-500)}.tiptap.ProseMirror ol,.tiptap.ProseMirror ul{margin-top:1.5em;margin-bottom:1.5em;padding-left:1.5em}.tiptap.ProseMirror ol:first-child,.tiptap.ProseMirror ul:first-child{margin-top:0}.tiptap.ProseMirror ol:last-child,.tiptap.ProseMirror ul:last-child{margin-bottom:0}.tiptap.ProseMirror ol ol,.tiptap.ProseMirror ol ul,.tiptap.ProseMirror ul ol,.tiptap.ProseMirror ul ul{margin-top:0;margin-bottom:0}.tiptap.ProseMirror li p{margin-top:0;line-height:1.6}.tiptap.ProseMirror ol{list-style:decimal}.tiptap.ProseMirror ol ol{list-style:lower-alpha}.tiptap.ProseMirror ol ol ol{list-style:lower-roman}.tiptap.ProseMirror ul:not([data-type=taskList]){list-style:disc}.tiptap.ProseMirror ul:not([data-type=taskList]) ul{list-style:circle}.tiptap.ProseMirror ul:not([data-type=taskList]) ul ul{list-style:square}.tiptap.ProseMirror ul[data-type=taskList]{padding-left:.25em}.tiptap.ProseMirror ul[data-type=taskList] li{display:flex;flex-direction:row;align-items:flex-start}.tiptap.ProseMirror ul[data-type=taskList] li:not(:has(>p:first-child)){list-style-type:none}.tiptap.ProseMirror ul[data-type=taskList] li[data-checked=true]>div>p{opacity:.5;text-decoration:line-through}.tiptap.ProseMirror ul[data-type=taskList] li[data-checked=true]>div>p span{text-decoration:line-through}.tiptap.ProseMirror ul[data-type=taskList] li label{position:relative;padding-top:.375rem;padding-right:.5rem}.tiptap.ProseMirror ul[data-type=taskList] li label input[type=checkbox]{position:absolute;opacity:0;width:0;height:0}.tiptap.ProseMirror ul[data-type=taskList] li label span{display:block;width:1em;height:1em;border:1px solid var(--tt-checklist-border-color);border-radius:var(--tt-radius-xs, .25rem);position:relative;cursor:pointer;background-color:var(--tt-checklist-bg-color);transition:background-color 80ms ease-out,border-color 80ms ease-out}.tiptap.ProseMirror ul[data-type=taskList] li label span:before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:.75em;height:.75em;background-color:var(--tt-checklist-check-icon-color);opacity:0;-webkit-mask:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.4142%204.58579C22.1953%205.36683%2022.1953%206.63317%2021.4142%207.41421L10.4142%2018.4142C9.63317%2019.1953%208.36684%2019.1953%207.58579%2018.4142L2.58579%2013.4142C1.80474%2012.6332%201.80474%2011.3668%202.58579%2010.5858C3.36683%209.80474%204.63317%209.80474%205.41421%2010.5858L9%2014.1716L18.5858%204.58579C19.3668%203.80474%2020.6332%203.80474%2021.4142%204.58579Z%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E) center/contain no-repeat;mask:url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.4142%204.58579C22.1953%205.36683%2022.1953%206.63317%2021.4142%207.41421L10.4142%2018.4142C9.63317%2019.1953%208.36684%2019.1953%207.58579%2018.4142L2.58579%2013.4142C1.80474%2012.6332%201.80474%2011.3668%202.58579%2010.5858C3.36683%209.80474%204.63317%209.80474%205.41421%2010.5858L9%2014.1716L18.5858%204.58579C19.3668%203.80474%2020.6332%203.80474%2021.4142%204.58579Z%22%20fill%3D%22currentColor%22%2F%3E%3C%2Fsvg%3E) center/contain no-repeat}.tiptap.ProseMirror ul[data-type=taskList] li label input[type=checkbox]:checked+span{background:var(--tt-checklist-bg-active-color);border-color:var(--tt-checklist-border-active-color)}.tiptap.ProseMirror ul[data-type=taskList] li label input[type=checkbox]:checked+span:before{opacity:1}.tiptap.ProseMirror ul[data-type=taskList] li div{flex:1 1 0%;min-width:0}.tiptap.ProseMirror{--tt-collaboration-carets-label: var(--tt-gray-light-900);--link-text-color: var(--tt-brand-color-500);--thread-text: var(--tt-gray-light-900);--placeholder-color: var(--tt-gray-light-a-400);--thread-bg-color: var(--tt-color-yellow-inc-2);--tiptap-ai-insertion-color: var(--tt-brand-color-600)}.dark .tiptap.ProseMirror{--tt-collaboration-carets-label: var(--tt-gray-dark-100);--link-text-color: var(--tt-brand-color-400);--thread-text: var(--tt-gray-dark-900);--placeholder-color: var(--tt-gray-dark-a-400);--thread-bg-color: var(--tt-color-yellow-dec-2);--tiptap-ai-insertion-color: var(--tt-brand-color-400)}.tiptap.ProseMirror>*{position:relative}.tiptap.ProseMirror{white-space:pre-wrap;outline:none;caret-color:var(--tt-cursor-color)}.tiptap.ProseMirror p:not(:first-child):not(td p):not(th p){font-size:1rem;line-height:1.6;font-weight:400;margin-top:20px}.tiptap.ProseMirror:not(.readonly):not(.ProseMirror-hideselection) ::selection{background-color:var(--tt-selection-color)}.tiptap.ProseMirror:not(.readonly):not(.ProseMirror-hideselection) .selection::selection{background:transparent}.tiptap.ProseMirror .selection{display:inline;background-color:var(--tt-selection-color)}.tiptap.ProseMirror .ProseMirror-selectednode:not(img):not(pre):not(.react-renderer){border-radius:var(--tt-radius-md);background-color:var(--tt-selection-color)}.tiptap.ProseMirror .ProseMirror-hideselection{caret-color:transparent}.tiptap.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}.tiptap.ProseMirror a span{text-decoration:underline}.tiptap.ProseMirror s span{text-decoration:line-through}.tiptap.ProseMirror u span{text-decoration:underline}.tiptap.ProseMirror .tiptap-ai-insertion{color:var(--tiptap-ai-insertion-color)}.tiptap.ProseMirror .collaboration-carets__caret{border-right:1px solid transparent;border-left:1px solid transparent;pointer-events:none;margin-left:-1px;margin-right:-1px;position:relative;word-break:normal}.tiptap.ProseMirror .collaboration-carets__label{color:var(--tt-collaboration-carets-label);border-radius:.25rem;border-bottom-left-radius:0;font-size:.75rem;font-weight:600;left:-1px;line-height:1;padding:.125rem .375rem;position:absolute;top:-1.3em;-webkit-user-select:none;user-select:none;white-space:nowrap}.tiptap.ProseMirror [data-type=emoji] img{display:inline-block;width:1.25em;height:1.25em;cursor:text}.tiptap.ProseMirror a{color:var(--link-text-color);text-decoration:underline}.tiptap.ProseMirror [data-type=mention]{display:inline-block;color:var(--tt-brand-color-500)}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--inline{transition:color .2s ease-in-out,background-color .2s ease-in-out;color:var(--thread-text);border-bottom:2px dashed var(--tt-color-yellow-base);font-weight:600}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--inline.tiptap-thread--selected,.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--inline.tiptap-thread--hovered{background-color:var(--thread-bg-color);border-bottom-color:transparent}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:has(img){outline:.125rem solid var(--tt-color-yellow-base);border-radius:var(--tt-radius-xs, .25rem);overflow:hidden;width:fit-content}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:has(img).tiptap-thread--selected{outline-width:.25rem;outline-color:var(--tt-color-yellow-base)}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:has(img).tiptap-thread--hovered{outline-width:.25rem}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:not(:has(img)){border-radius:.25rem;border-bottom:.125rem dashed var(--tt-color-yellow-base);border-top:.125rem dashed var(--tt-color-yellow-base);outline:.25rem solid transparent}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:not(:has(img)).tiptap-thread--hovered,.tiptap.ProseMirror .tiptap-thread.tiptap-thread--unresolved.tiptap-thread--block:not(:has(img)).tiptap-thread--selected{background-color:var(--tt-color-yellow-base);outline-color:var(--tt-color-yellow-base)}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--resolved.tiptap-thread--inline.tiptap-thread--selected{background-color:var(--tt-color-yellow-base);border-color:transparent;opacity:.5}.tiptap.ProseMirror .tiptap-thread.tiptap-thread--block:has(.react-renderer){margin-top:3rem;margin-bottom:3rem}.is-empty:not(.with-slash)[data-placeholder]:has(>.ProseMirror-trailingBreak:only-child):before{content:attr(data-placeholder)}.is-empty.with-slash[data-placeholder]:has(>.ProseMirror-trailingBreak:only-child):before{content:"Write, type '/' for commands…";font-style:italic}.is-empty[data-placeholder]:has(>.ProseMirror-trailingBreak:only-child):before{pointer-events:none;height:0;position:absolute;width:100%;text-align:inherit;left:0;right:0}.is-empty[data-placeholder]:has(>.ProseMirror-trailingBreak):before{color:var(--placeholder-color)}.prosemirror-dropcursor-block,.prosemirror-dropcursor-inline{background:var(--tt-brand-color-400)!important;border-radius:.25rem;margin-left:-1px;margin-right:-1px;width:100%;height:.188rem;cursor:grabbing}body{--tt-toolbar-height: 44px;--tt-theme-text: var(--tt-gray-light-900)}.dark body{--tt-theme-text: var(--tt-gray-dark-900)}::-webkit-scrollbar{width:.25rem}*{scrollbar-width:thin;scrollbar-color:var(--tt-scrollbar-color) transparent}::-webkit-scrollbar-thumb{background-color:var(--tt-scrollbar-color);border-radius:9999px}::-webkit-scrollbar-track{background:transparent}.tiptap.ProseMirror{font-family:DM Sans,sans-serif}.simple-editor-wrapper{width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column}.simple-editor-content{width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto}.simple-editor-content .tiptap.ProseMirror.simple-editor{flex:1;padding:.5rem 1rem}@media screen and (max-width:480px){.simple-editor-content .tiptap.ProseMirror.simple-editor{padding:1rem 1.5rem 30vh}}table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}table td,table th{border:1px solid var(--table-border-color);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}table td>*,table th>*{margin-bottom:0}table th{background:var(--th-bg-color);color:var(--th-text-color);border:1px solid var(--table-border-color);font-weight:700;text-align:left;position:relative;overflow:visible}table td{background:var(--td-bg-color);color:var(--tt-color-text-gray)}table .selectedCell:after{background:var(--gray-2);content:"";inset:0;pointer-events:none;position:absolute;z-index:2}table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.tiptap table{border-collapse:collapse;overflow:hidden;table-layout:fixed;margin:28px 0}.tiptap table :first-child{margin-top:0}.tiptap table td,.tiptap table th{border:1px solid var(--tt-table-border-color);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.tiptap table td>*,.tiptap table th>*{margin-bottom:0}.tiptap table th{background-color:var(--tt-table-header-bg-color);font-weight:700;text-align:left;color:var(--tt-table-header-text-color);border-color:var(--tt-table-header-border-color)}.tiptap table .selectedCell:after{background:var(--tt-brand-color-a-500);content:"";inset:0;pointer-events:none;position:absolute;z-index:2}.tiptap table .column-resize-handle{background-color:purple;bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px;z-index:99}.tiptap.resize-cursor{cursor:ew-resize;cursor:col-resize}
|
|
@@ -3,6 +3,7 @@ interface SimpleEditorProps extends Omit<Partial<EditorOptions>, "content"> {
|
|
|
3
3
|
themeMode: "dark" | "light";
|
|
4
4
|
content?: string;
|
|
5
5
|
onContentChange?: (content: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare function SimpleEditor({ themeMode, content, onContentChange, }: SimpleEditorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export declare function SimpleEditor({ themeMode, content, onContentChange, placeholder, }: SimpleEditorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
9
|
export {};
|
|
@@ -171,14 +171,14 @@ import '../../../assets/simple-editor.css';var Me = /(?:^|\s)(==(?!\s+==)((?:[^=
|
|
|
171
171
|
const { directions: t, minWidth: e, minHeight: r, alwaysPreserveAspectRatio: n } = this.options.resize;
|
|
172
172
|
return ({ node: s, getPos: i, HTMLAttributes: a }) => {
|
|
173
173
|
const o = document.createElement("img");
|
|
174
|
-
Object.entries(a).forEach(([
|
|
175
|
-
if (
|
|
176
|
-
switch (
|
|
174
|
+
Object.entries(a).forEach(([u, d]) => {
|
|
175
|
+
if (d != null)
|
|
176
|
+
switch (u) {
|
|
177
177
|
case "width":
|
|
178
178
|
case "height":
|
|
179
179
|
break;
|
|
180
180
|
default:
|
|
181
|
-
o.setAttribute(
|
|
181
|
+
o.setAttribute(u, d);
|
|
182
182
|
break;
|
|
183
183
|
}
|
|
184
184
|
}), o.src = a.src;
|
|
@@ -186,17 +186,17 @@ import '../../../assets/simple-editor.css';var Me = /(?:^|\s)(==(?!\s+==)((?:[^=
|
|
|
186
186
|
element: o,
|
|
187
187
|
node: s,
|
|
188
188
|
getPos: i,
|
|
189
|
-
onResize: (
|
|
190
|
-
o.style.width = `${
|
|
189
|
+
onResize: (u, d) => {
|
|
190
|
+
o.style.width = `${u}px`, o.style.height = `${d}px`;
|
|
191
191
|
},
|
|
192
|
-
onCommit: (
|
|
192
|
+
onCommit: (u, d) => {
|
|
193
193
|
const h = i();
|
|
194
194
|
h !== void 0 && this.editor.chain().setNodeSelection(h).updateAttributes(this.name, {
|
|
195
|
-
width:
|
|
196
|
-
height:
|
|
195
|
+
width: u,
|
|
196
|
+
height: d
|
|
197
197
|
}).run();
|
|
198
198
|
},
|
|
199
|
-
onUpdate: (
|
|
199
|
+
onUpdate: (u, d, h) => u.type === s.type,
|
|
200
200
|
options: {
|
|
201
201
|
directions: t,
|
|
202
202
|
min: {
|
|
@@ -405,11 +405,11 @@ var $ = (t, e) => {
|
|
|
405
405
|
c.node().descendants((h, b) => {
|
|
406
406
|
h.type.name === e && l.push({ node: h, pos: b });
|
|
407
407
|
});
|
|
408
|
-
const
|
|
409
|
-
if (!
|
|
408
|
+
const u = l.at(-1);
|
|
409
|
+
if (!u)
|
|
410
410
|
return !1;
|
|
411
|
-
const
|
|
412
|
-
return t.chain().cut({ from: o.start() - 1, to: o.end() + 1 },
|
|
411
|
+
const d = t.state.doc.resolve(c.start() + u.pos + 1);
|
|
412
|
+
return t.chain().cut({ from: o.start() - 1, to: o.end() + 1 }, d.end()).joinForward().run();
|
|
413
413
|
}
|
|
414
414
|
if (!_(t.state, e) || !St(t.state))
|
|
415
415
|
return !1;
|
|
@@ -486,28 +486,28 @@ function _e(t) {
|
|
|
486
486
|
if (!i)
|
|
487
487
|
break;
|
|
488
488
|
const [, a, o, c] = i, l = a.length;
|
|
489
|
-
let
|
|
489
|
+
let u = c, d = r + 1;
|
|
490
490
|
const h = [s];
|
|
491
|
-
for (;
|
|
492
|
-
const b = t[
|
|
491
|
+
for (; d < t.length; ) {
|
|
492
|
+
const b = t[d];
|
|
493
493
|
if (b.match(et))
|
|
494
494
|
break;
|
|
495
495
|
if (b.trim() === "")
|
|
496
|
-
h.push(b),
|
|
497
|
-
`,
|
|
496
|
+
h.push(b), u += `
|
|
497
|
+
`, d += 1;
|
|
498
498
|
else if (b.match(De))
|
|
499
|
-
h.push(b),
|
|
500
|
-
${b.slice(l + 2)}`,
|
|
499
|
+
h.push(b), u += `
|
|
500
|
+
${b.slice(l + 2)}`, d += 1;
|
|
501
501
|
else
|
|
502
502
|
break;
|
|
503
503
|
}
|
|
504
504
|
e.push({
|
|
505
505
|
indent: l,
|
|
506
506
|
number: parseInt(o, 10),
|
|
507
|
-
content:
|
|
507
|
+
content: u.trim(),
|
|
508
508
|
raw: h.join(`
|
|
509
509
|
`)
|
|
510
|
-
}), n =
|
|
510
|
+
}), n = d, r = d;
|
|
511
511
|
}
|
|
512
512
|
return [e, n];
|
|
513
513
|
}
|
|
@@ -525,16 +525,16 @@ function yt(t, e, r) {
|
|
|
525
525
|
raw: c,
|
|
526
526
|
tokens: r.inlineTokens(c)
|
|
527
527
|
});
|
|
528
|
-
const
|
|
528
|
+
const u = o.slice(1).join(`
|
|
529
529
|
`).trim();
|
|
530
|
-
if (
|
|
531
|
-
const b = r.blockTokens(
|
|
530
|
+
if (u) {
|
|
531
|
+
const b = r.blockTokens(u);
|
|
532
532
|
l.push(...b);
|
|
533
533
|
}
|
|
534
|
-
let
|
|
534
|
+
let d = i + 1;
|
|
535
535
|
const h = [];
|
|
536
|
-
for (;
|
|
537
|
-
h.push(t[
|
|
536
|
+
for (; d < t.length && t[d].indent > e; )
|
|
537
|
+
h.push(t[d]), d += 1;
|
|
538
538
|
if (h.length > 0) {
|
|
539
539
|
const b = Math.min(...h.map((g) => g.indent)), f = yt(h, b, r);
|
|
540
540
|
l.push({
|
|
@@ -550,7 +550,7 @@ function yt(t, e, r) {
|
|
|
550
550
|
type: "list_item",
|
|
551
551
|
raw: a.raw,
|
|
552
552
|
tokens: l
|
|
553
|
-
}), i =
|
|
553
|
+
}), i = d;
|
|
554
554
|
} else
|
|
555
555
|
i += 1;
|
|
556
556
|
}
|
|
@@ -769,16 +769,16 @@ var We = "listItem", rt = "textStyle", nt = /^(\d+)\.\s$/, je = L.create({
|
|
|
769
769
|
},
|
|
770
770
|
addNodeView() {
|
|
771
771
|
return ({ node: t, HTMLAttributes: e, getPos: r, editor: n }) => {
|
|
772
|
-
const s = document.createElement("li"), i = document.createElement("label"), a = document.createElement("span"), o = document.createElement("input"), c = document.createElement("div"), l = (
|
|
773
|
-
var
|
|
774
|
-
o.ariaLabel = ((h = (
|
|
772
|
+
const s = document.createElement("li"), i = document.createElement("label"), a = document.createElement("span"), o = document.createElement("input"), c = document.createElement("div"), l = (u) => {
|
|
773
|
+
var d, h;
|
|
774
|
+
o.ariaLabel = ((h = (d = this.options.a11y) == null ? void 0 : d.checkboxLabel) == null ? void 0 : h.call(d, u, o.checked)) || `Task item checkbox for ${u.textContent || "empty task item"}`;
|
|
775
775
|
};
|
|
776
|
-
return l(t), i.contentEditable = "false", o.type = "checkbox", o.addEventListener("mousedown", (
|
|
776
|
+
return l(t), i.contentEditable = "false", o.type = "checkbox", o.addEventListener("mousedown", (u) => u.preventDefault()), o.addEventListener("change", (u) => {
|
|
777
777
|
if (!n.isEditable && !this.options.onReadOnlyChecked) {
|
|
778
778
|
o.checked = !o.checked;
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
|
-
const { checked:
|
|
781
|
+
const { checked: d } = u.target;
|
|
782
782
|
n.isEditable && typeof r == "function" && n.chain().focus(void 0, { scrollIntoView: !1 }).command(({ tr: h }) => {
|
|
783
783
|
const b = r();
|
|
784
784
|
if (typeof b != "number")
|
|
@@ -786,17 +786,17 @@ var We = "listItem", rt = "textStyle", nt = /^(\d+)\.\s$/, je = L.create({
|
|
|
786
786
|
const f = h.doc.nodeAt(b);
|
|
787
787
|
return h.setNodeMarkup(b, void 0, {
|
|
788
788
|
...f?.attrs,
|
|
789
|
-
checked:
|
|
789
|
+
checked: d
|
|
790
790
|
}), !0;
|
|
791
|
-
}).run(), !n.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(t,
|
|
792
|
-
}), Object.entries(this.options.HTMLAttributes).forEach(([
|
|
793
|
-
s.setAttribute(
|
|
794
|
-
}), s.dataset.checked = t.attrs.checked, o.checked = t.attrs.checked, i.append(o, a), s.append(i, c), Object.entries(e).forEach(([
|
|
795
|
-
s.setAttribute(
|
|
791
|
+
}).run(), !n.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(t, d) || (o.checked = !o.checked));
|
|
792
|
+
}), Object.entries(this.options.HTMLAttributes).forEach(([u, d]) => {
|
|
793
|
+
s.setAttribute(u, d);
|
|
794
|
+
}), s.dataset.checked = t.attrs.checked, o.checked = t.attrs.checked, i.append(o, a), s.append(i, c), Object.entries(e).forEach(([u, d]) => {
|
|
795
|
+
s.setAttribute(u, d);
|
|
796
796
|
}), {
|
|
797
797
|
dom: s,
|
|
798
798
|
contentDOM: c,
|
|
799
|
-
update: (
|
|
799
|
+
update: (u) => u.type !== this.type ? !1 : (s.dataset.checked = u.attrs.checked, o.checked = u.attrs.checked, l(u), !0)
|
|
800
800
|
};
|
|
801
801
|
};
|
|
802
802
|
},
|
|
@@ -1203,8 +1203,8 @@ C.create({
|
|
|
1203
1203
|
return !0;
|
|
1204
1204
|
if (s > n && i > n && i > s || !e.getMeta("paste"))
|
|
1205
1205
|
return !1;
|
|
1206
|
-
const o = e.selection.$head.pos, c = i - n, l = o - c,
|
|
1207
|
-
return e.deleteRange(l,
|
|
1206
|
+
const o = e.selection.$head.pos, c = i - n, l = o - c, u = o;
|
|
1207
|
+
return e.deleteRange(l, u), !(this.storage.characters({ node: e.doc }) > n);
|
|
1208
1208
|
}
|
|
1209
1209
|
})
|
|
1210
1210
|
];
|
|
@@ -1283,7 +1283,7 @@ C.create({
|
|
|
1283
1283
|
};
|
|
1284
1284
|
}
|
|
1285
1285
|
});
|
|
1286
|
-
C.create({
|
|
1286
|
+
var gr = C.create({
|
|
1287
1287
|
name: "placeholder",
|
|
1288
1288
|
addOptions() {
|
|
1289
1289
|
return {
|
|
@@ -1308,10 +1308,10 @@ C.create({
|
|
|
1308
1308
|
return t.descendants((a, o) => {
|
|
1309
1309
|
const c = n >= o && n <= o + a.nodeSize, l = !a.isLeaf && $t(a);
|
|
1310
1310
|
if ((c || !this.options.showOnlyCurrent) && l) {
|
|
1311
|
-
const
|
|
1312
|
-
i &&
|
|
1313
|
-
const
|
|
1314
|
-
class:
|
|
1311
|
+
const u = [this.options.emptyNodeClass];
|
|
1312
|
+
i && u.push(this.options.emptyEditorClass);
|
|
1313
|
+
const d = K.node(o, o + a.nodeSize, {
|
|
1314
|
+
class: u.join(" "),
|
|
1315
1315
|
"data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
|
|
1316
1316
|
editor: this.editor,
|
|
1317
1317
|
node: a,
|
|
@@ -1319,7 +1319,7 @@ C.create({
|
|
|
1319
1319
|
hasAnchor: c
|
|
1320
1320
|
}) : this.options.placeholder
|
|
1321
1321
|
});
|
|
1322
|
-
s.push(
|
|
1322
|
+
s.push(d);
|
|
1323
1323
|
}
|
|
1324
1324
|
return this.options.includeChildren;
|
|
1325
1325
|
}), B.create(t, s);
|
|
@@ -1328,8 +1328,7 @@ C.create({
|
|
|
1328
1328
|
})
|
|
1329
1329
|
];
|
|
1330
1330
|
}
|
|
1331
|
-
})
|
|
1332
|
-
var gr = C.create({
|
|
1331
|
+
}), br = C.create({
|
|
1333
1332
|
name: "selection",
|
|
1334
1333
|
addOptions() {
|
|
1335
1334
|
return {
|
|
@@ -1372,9 +1371,9 @@ C.create({
|
|
|
1372
1371
|
new H({
|
|
1373
1372
|
key: e,
|
|
1374
1373
|
appendTransaction: (s, i, a) => {
|
|
1375
|
-
const { doc: o, tr: c, schema: l } = a,
|
|
1376
|
-
if (
|
|
1377
|
-
return c.insert(
|
|
1374
|
+
const { doc: o, tr: c, schema: l } = a, u = e.getState(a), d = o.content.size, h = l.nodes[r];
|
|
1375
|
+
if (u)
|
|
1376
|
+
return c.insert(d, h.create());
|
|
1378
1377
|
},
|
|
1379
1378
|
state: {
|
|
1380
1379
|
init: (s, i) => {
|
|
@@ -1382,7 +1381,7 @@ C.create({
|
|
|
1382
1381
|
return !st({ node: a, types: n });
|
|
1383
1382
|
},
|
|
1384
1383
|
apply: (s, i) => {
|
|
1385
|
-
if (!s.docChanged)
|
|
1384
|
+
if (!s.docChanged || s.getMeta("__uniqueIDTransaction"))
|
|
1386
1385
|
return i;
|
|
1387
1386
|
const a = s.doc.lastChild;
|
|
1388
1387
|
return !st({ node: a, types: n });
|
|
@@ -1420,7 +1419,7 @@ C.create({
|
|
|
1420
1419
|
};
|
|
1421
1420
|
}
|
|
1422
1421
|
});
|
|
1423
|
-
var
|
|
1422
|
+
var yr = L.create({
|
|
1424
1423
|
name: "tableCell",
|
|
1425
1424
|
addOptions() {
|
|
1426
1425
|
return {
|
|
@@ -1461,7 +1460,7 @@ var br = L.create({
|
|
|
1461
1460
|
renderHTML({ HTMLAttributes: t }) {
|
|
1462
1461
|
return ["td", k(this.options.HTMLAttributes, t), 0];
|
|
1463
1462
|
}
|
|
1464
|
-
}),
|
|
1463
|
+
}), kr = L.create({
|
|
1465
1464
|
name: "tableHeader",
|
|
1466
1465
|
addOptions() {
|
|
1467
1466
|
return {
|
|
@@ -1494,7 +1493,7 @@ var br = L.create({
|
|
|
1494
1493
|
renderHTML({ HTMLAttributes: t }) {
|
|
1495
1494
|
return ["th", k(this.options.HTMLAttributes, t), 0];
|
|
1496
1495
|
}
|
|
1497
|
-
}),
|
|
1496
|
+
}), Tr = L.create({
|
|
1498
1497
|
name: "tableRow",
|
|
1499
1498
|
addOptions() {
|
|
1500
1499
|
return {
|
|
@@ -1516,10 +1515,10 @@ function j(t, e) {
|
|
|
1516
1515
|
function it(t, e, r, n, s, i) {
|
|
1517
1516
|
var a;
|
|
1518
1517
|
let o = 0, c = !0, l = e.firstChild;
|
|
1519
|
-
const
|
|
1520
|
-
if (
|
|
1521
|
-
for (let h = 0, b = 0; h <
|
|
1522
|
-
const { colspan: f, colwidth: g } =
|
|
1518
|
+
const u = t.firstChild;
|
|
1519
|
+
if (u !== null)
|
|
1520
|
+
for (let h = 0, b = 0; h < u.childCount; h += 1) {
|
|
1521
|
+
const { colspan: f, colwidth: g } = u.child(h).attrs;
|
|
1523
1522
|
for (let m = 0; m < f; m += 1, b += 1) {
|
|
1524
1523
|
const T = s === b ? i : g && g[m], v = T ? `${T}px` : "";
|
|
1525
1524
|
if (o += T || n, T || (c = !1), l) {
|
|
@@ -1538,10 +1537,10 @@ function it(t, e, r, n, s, i) {
|
|
|
1538
1537
|
const h = l.nextSibling;
|
|
1539
1538
|
(a = l.parentNode) == null || a.removeChild(l), l = h;
|
|
1540
1539
|
}
|
|
1541
|
-
const
|
|
1542
|
-
c && !
|
|
1540
|
+
const d = t.attrs.style && typeof t.attrs.style == "string" && /\bwidth\s*:/i.test(t.attrs.style);
|
|
1541
|
+
c && !d ? (r.style.width = `${o}px`, r.style.minWidth = "") : (r.style.width = "", r.style.minWidth = `${o}px`);
|
|
1543
1542
|
}
|
|
1544
|
-
var
|
|
1543
|
+
var Cr = class {
|
|
1545
1544
|
constructor(t, e) {
|
|
1546
1545
|
this.node = t, this.cellMinWidth = e, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), t.attrs.style && (this.table.style.cssText = t.attrs.style), this.colgroup = this.table.appendChild(document.createElement("colgroup")), it(t, this.colgroup, this.table, e), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
1547
1546
|
}
|
|
@@ -1553,13 +1552,13 @@ var Tr = class {
|
|
|
1553
1552
|
return !!(r && !n && (t.type === "attributes" || t.type === "childList" || t.type === "characterData"));
|
|
1554
1553
|
}
|
|
1555
1554
|
};
|
|
1556
|
-
function
|
|
1555
|
+
function Lr(t, e, r, n) {
|
|
1557
1556
|
let s = 0, i = !0;
|
|
1558
1557
|
const a = [], o = t.firstChild;
|
|
1559
1558
|
if (!o)
|
|
1560
1559
|
return {};
|
|
1561
|
-
for (let
|
|
1562
|
-
const { colspan: b, colwidth: f } = o.child(
|
|
1560
|
+
for (let d = 0, h = 0; d < o.childCount; d += 1) {
|
|
1561
|
+
const { colspan: b, colwidth: f } = o.child(d).attrs;
|
|
1563
1562
|
for (let g = 0; g < b; g += 1, h += 1) {
|
|
1564
1563
|
const m = r === h ? n : f && f[g];
|
|
1565
1564
|
s += m || e, m || (i = !1);
|
|
@@ -1573,7 +1572,7 @@ function Cr(t, e, r, n) {
|
|
|
1573
1572
|
function ot(t, e) {
|
|
1574
1573
|
return t.createAndFill();
|
|
1575
1574
|
}
|
|
1576
|
-
function
|
|
1575
|
+
function wr(t) {
|
|
1577
1576
|
if (t.cached.tableNodeTypes)
|
|
1578
1577
|
return t.cached.tableNodeTypes;
|
|
1579
1578
|
const e = {};
|
|
@@ -1582,13 +1581,13 @@ function Lr(t) {
|
|
|
1582
1581
|
n.spec.tableRole && (e[n.spec.tableRole] = n);
|
|
1583
1582
|
}), t.cached.tableNodeTypes = e, e;
|
|
1584
1583
|
}
|
|
1585
|
-
function
|
|
1586
|
-
const i =
|
|
1584
|
+
function vr(t, e, r, n, s) {
|
|
1585
|
+
const i = wr(t), a = [], o = [];
|
|
1587
1586
|
for (let l = 0; l < r; l += 1) {
|
|
1588
|
-
const
|
|
1589
|
-
if (
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1587
|
+
const u = ot(i.cell);
|
|
1588
|
+
if (u && o.push(u), n) {
|
|
1589
|
+
const d = ot(i.header_cell);
|
|
1590
|
+
d && a.push(d);
|
|
1592
1591
|
}
|
|
1593
1592
|
}
|
|
1594
1593
|
const c = [];
|
|
@@ -1596,12 +1595,12 @@ function wr(t, e, r, n, s) {
|
|
|
1596
1595
|
c.push(i.row.createChecked(null, n && l === 0 ? a : o));
|
|
1597
1596
|
return i.table.createChecked(null, c);
|
|
1598
1597
|
}
|
|
1599
|
-
function
|
|
1598
|
+
function Mr(t) {
|
|
1600
1599
|
return t instanceof pt;
|
|
1601
1600
|
}
|
|
1602
1601
|
var P = ({ editor: t }) => {
|
|
1603
1602
|
const { selection: e } = t.state;
|
|
1604
|
-
if (!
|
|
1603
|
+
if (!Mr(e))
|
|
1605
1604
|
return !1;
|
|
1606
1605
|
let r = 0;
|
|
1607
1606
|
const n = Rt(e.ranges[0].$from, (i) => i.type.name === "table");
|
|
@@ -1610,13 +1609,13 @@ var P = ({ editor: t }) => {
|
|
|
1610
1609
|
return !1;
|
|
1611
1610
|
["tableCell", "tableHeader"].includes(i.type.name) && (r += 1);
|
|
1612
1611
|
}), r === e.ranges.length ? (t.commands.deleteTable(), !0) : !1;
|
|
1613
|
-
},
|
|
1614
|
-
function
|
|
1612
|
+
}, xr = "";
|
|
1613
|
+
function Ar(t) {
|
|
1615
1614
|
return (t || "").replace(/\s+/g, " ").trim();
|
|
1616
1615
|
}
|
|
1617
|
-
function
|
|
1616
|
+
function Ir(t, e, r = {}) {
|
|
1618
1617
|
var n;
|
|
1619
|
-
const s = (n = r.cellLineSeparator) != null ? n :
|
|
1618
|
+
const s = (n = r.cellLineSeparator) != null ? n : xr;
|
|
1620
1619
|
if (!t || !t.content || t.content.length === 0)
|
|
1621
1620
|
return "";
|
|
1622
1621
|
const i = [];
|
|
@@ -1625,7 +1624,7 @@ function Ar(t, e, r = {}) {
|
|
|
1625
1624
|
f.content && f.content.forEach((m) => {
|
|
1626
1625
|
let T = "";
|
|
1627
1626
|
m.content && Array.isArray(m.content) && m.content.length > 1 ? T = m.content.map((O) => e.renderChildren(O)).join(s) : T = m.content ? e.renderChildren(m.content) : "";
|
|
1628
|
-
const v =
|
|
1627
|
+
const v = Ar(T), I = m.type === "tableHeader";
|
|
1629
1628
|
g.push({ text: v, isHeader: I });
|
|
1630
1629
|
}), i.push(g);
|
|
1631
1630
|
});
|
|
@@ -1640,18 +1639,18 @@ function Ar(t, e, r = {}) {
|
|
|
1640
1639
|
v > o[m] && (o[m] = v), o[m] < 3 && (o[m] = 3);
|
|
1641
1640
|
}
|
|
1642
1641
|
});
|
|
1643
|
-
const c = (f, g) => f + " ".repeat(Math.max(0, g - f.length)), l = i[0],
|
|
1644
|
-
let
|
|
1642
|
+
const c = (f, g) => f + " ".repeat(Math.max(0, g - f.length)), l = i[0], u = l.some((f) => f.isHeader);
|
|
1643
|
+
let d = `
|
|
1645
1644
|
`;
|
|
1646
|
-
const h = new Array(a).fill(0).map((f, g) =>
|
|
1647
|
-
return
|
|
1648
|
-
`,
|
|
1649
|
-
`, (
|
|
1650
|
-
|
|
1645
|
+
const h = new Array(a).fill(0).map((f, g) => u && l[g] && l[g].text || "");
|
|
1646
|
+
return d += `| ${h.map((f, g) => c(f, o[g])).join(" | ")} |
|
|
1647
|
+
`, d += `| ${o.map((f) => "-".repeat(Math.max(3, f))).join(" | ")} |
|
|
1648
|
+
`, (u ? i.slice(1) : i).forEach((f) => {
|
|
1649
|
+
d += `| ${new Array(a).fill(0).map((g, m) => c(f[m] && f[m].text || "", o[m])).join(" | ")} |
|
|
1651
1650
|
`;
|
|
1652
|
-
}),
|
|
1651
|
+
}), d;
|
|
1653
1652
|
}
|
|
1654
|
-
var
|
|
1653
|
+
var Sr = Ir, Hr = L.create({
|
|
1655
1654
|
name: "table",
|
|
1656
1655
|
// @ts-ignore
|
|
1657
1656
|
addOptions() {
|
|
@@ -1662,7 +1661,7 @@ var Ir = Ar, Sr = L.create({
|
|
|
1662
1661
|
handleWidth: 5,
|
|
1663
1662
|
cellMinWidth: 25,
|
|
1664
1663
|
// TODO: fix
|
|
1665
|
-
View:
|
|
1664
|
+
View: Cr,
|
|
1666
1665
|
lastColumnResizable: !0,
|
|
1667
1666
|
allowTableNodeSelection: !1
|
|
1668
1667
|
};
|
|
@@ -1675,7 +1674,7 @@ var Ir = Ar, Sr = L.create({
|
|
|
1675
1674
|
return [{ tag: "table" }];
|
|
1676
1675
|
},
|
|
1677
1676
|
renderHTML({ node: t, HTMLAttributes: e }) {
|
|
1678
|
-
const { colgroup: r, tableWidth: n, tableMinWidth: s } =
|
|
1677
|
+
const { colgroup: r, tableWidth: n, tableMinWidth: s } = Lr(t, this.options.cellMinWidth), i = e.style;
|
|
1679
1678
|
function a() {
|
|
1680
1679
|
return i || (n ? `width: ${n}` : `min-width: ${s}`);
|
|
1681
1680
|
}
|
|
@@ -1704,11 +1703,11 @@ var Ir = Ar, Sr = L.create({
|
|
|
1704
1703
|
}), r.push(e.createNode("tableRow", {}, s));
|
|
1705
1704
|
}), e.createNode("table", void 0, r);
|
|
1706
1705
|
},
|
|
1707
|
-
renderMarkdown: (t, e) =>
|
|
1706
|
+
renderMarkdown: (t, e) => Sr(t, e),
|
|
1708
1707
|
addCommands() {
|
|
1709
1708
|
return {
|
|
1710
1709
|
insertTable: ({ rows: t = 3, cols: e = 3, withHeaderRow: r = !0 } = {}) => ({ tr: n, dispatch: s, editor: i }) => {
|
|
1711
|
-
const a =
|
|
1710
|
+
const a = vr(i.schema, t, e, r);
|
|
1712
1711
|
if (s) {
|
|
1713
1712
|
const o = n.selection.from + 1;
|
|
1714
1713
|
n.replaceSelectionWith(a).scrollIntoView().setSelection(Pt.near(n.doc.resolve(o)));
|
|
@@ -1777,14 +1776,14 @@ var Ir = Ar, Sr = L.create({
|
|
|
1777
1776
|
tableRole: dt(ct(t, "tableRole", e))
|
|
1778
1777
|
};
|
|
1779
1778
|
}
|
|
1780
|
-
}),
|
|
1779
|
+
}), Er = C.create({
|
|
1781
1780
|
name: "tableKit",
|
|
1782
1781
|
addExtensions() {
|
|
1783
1782
|
const t = [];
|
|
1784
|
-
return this.options.table !== !1 && t.push(
|
|
1783
|
+
return this.options.table !== !1 && t.push(Hr.configure(this.options.table)), this.options.tableCell !== !1 && t.push(yr.configure(this.options.tableCell)), this.options.tableHeader !== !1 && t.push(kr.configure(this.options.tableHeader)), this.options.tableRow !== !1 && t.push(Tr.configure(this.options.tableRow)), t;
|
|
1785
1784
|
}
|
|
1786
1785
|
});
|
|
1787
|
-
const
|
|
1786
|
+
const $r = ({
|
|
1788
1787
|
onHighlighterClick: t,
|
|
1789
1788
|
onLinkClick: e,
|
|
1790
1789
|
isMobile: r
|
|
@@ -1836,7 +1835,7 @@ const Er = ({
|
|
|
1836
1835
|
} }) }),
|
|
1837
1836
|
r && /* @__PURE__ */ p(A, {})
|
|
1838
1837
|
] });
|
|
1839
|
-
},
|
|
1838
|
+
}, Nr = ({
|
|
1840
1839
|
type: t,
|
|
1841
1840
|
onBack: e
|
|
1842
1841
|
}) => /* @__PURE__ */ w(at, { children: [
|
|
@@ -1847,14 +1846,15 @@ const Er = ({
|
|
|
1847
1846
|
/* @__PURE__ */ p(A, {}),
|
|
1848
1847
|
t === "highlighter" ? /* @__PURE__ */ p(Te, {}) : /* @__PURE__ */ p(we, {})
|
|
1849
1848
|
] });
|
|
1850
|
-
function
|
|
1849
|
+
function mn({
|
|
1851
1850
|
themeMode: t,
|
|
1852
1851
|
content: e,
|
|
1853
|
-
onContentChange: r
|
|
1852
|
+
onContentChange: r,
|
|
1853
|
+
placeholder: n = ""
|
|
1854
1854
|
}) {
|
|
1855
|
-
const
|
|
1855
|
+
const s = Ut(), { height: i } = Gt(), [a, o] = vt(
|
|
1856
1856
|
"main"
|
|
1857
|
-
),
|
|
1857
|
+
), c = q(null), l = q(!1), u = Ct({
|
|
1858
1858
|
immediatelyRender: !1,
|
|
1859
1859
|
shouldRerenderOnTransaction: !1,
|
|
1860
1860
|
editorProps: {
|
|
@@ -1883,59 +1883,62 @@ function fn({
|
|
|
1883
1883
|
mr,
|
|
1884
1884
|
Ve,
|
|
1885
1885
|
Ke,
|
|
1886
|
-
|
|
1886
|
+
br,
|
|
1887
1887
|
Qt.configure({
|
|
1888
1888
|
accept: "image/*",
|
|
1889
1889
|
maxSize: Yt,
|
|
1890
1890
|
limit: 3,
|
|
1891
1891
|
upload: Xt,
|
|
1892
|
-
onError: (
|
|
1892
|
+
onError: (h) => console.error("Upload failed:", h)
|
|
1893
1893
|
}),
|
|
1894
|
-
|
|
1894
|
+
Er.configure({
|
|
1895
1895
|
table: {
|
|
1896
1896
|
resizable: !0
|
|
1897
1897
|
}
|
|
1898
|
+
}),
|
|
1899
|
+
gr.configure({
|
|
1900
|
+
placeholder: n
|
|
1898
1901
|
})
|
|
1899
1902
|
],
|
|
1900
1903
|
content: e,
|
|
1901
|
-
onUpdate: ({ editor:
|
|
1902
|
-
if (!
|
|
1903
|
-
const
|
|
1904
|
-
r(
|
|
1904
|
+
onUpdate: ({ editor: h }) => {
|
|
1905
|
+
if (!l.current && r) {
|
|
1906
|
+
const b = h.getHTML();
|
|
1907
|
+
r(b);
|
|
1905
1908
|
}
|
|
1906
1909
|
}
|
|
1907
1910
|
}), d = Ft({
|
|
1908
|
-
editor:
|
|
1909
|
-
overlayHeight:
|
|
1911
|
+
editor: u,
|
|
1912
|
+
overlayHeight: c.current?.getBoundingClientRect().height ?? 0
|
|
1910
1913
|
});
|
|
1911
1914
|
return D(() => {
|
|
1912
|
-
!
|
|
1913
|
-
}, [
|
|
1914
|
-
|
|
1915
|
-
}, [e,
|
|
1915
|
+
!s && a !== "main" && o("main");
|
|
1916
|
+
}, [s, a]), D(() => {
|
|
1917
|
+
u && e !== void 0 && u.getHTML() !== e && (l.current = !0, u.commands.setContent(e, { emitUpdate: !1 }), l.current = !1);
|
|
1918
|
+
}, [e, u]), D(() => {
|
|
1916
1919
|
document.documentElement.classList.toggle("dark", t === "dark");
|
|
1917
|
-
}, [t]),
|
|
1920
|
+
}, [t]), u ? /* @__PURE__ */ p("div", { className: "simple-editor-wrapper", children: /* @__PURE__ */ w(Lt.Provider, { value: { editor: u }, children: [
|
|
1918
1921
|
/* @__PURE__ */ p(
|
|
1919
1922
|
he,
|
|
1920
1923
|
{
|
|
1921
|
-
ref:
|
|
1924
|
+
ref: c,
|
|
1922
1925
|
style: {
|
|
1923
|
-
...
|
|
1924
|
-
bottom: `calc(100% - ${
|
|
1926
|
+
...s ? {
|
|
1927
|
+
bottom: `calc(100% - ${i - d.y}px)`
|
|
1925
1928
|
} : {}
|
|
1926
1929
|
},
|
|
1927
|
-
children:
|
|
1928
|
-
|
|
1930
|
+
children: a === "main" ? /* @__PURE__ */ p(
|
|
1931
|
+
$r,
|
|
1929
1932
|
{
|
|
1930
|
-
onHighlighterClick: () =>
|
|
1931
|
-
onLinkClick: () =>
|
|
1932
|
-
isMobile:
|
|
1933
|
+
onHighlighterClick: () => o("highlighter"),
|
|
1934
|
+
onLinkClick: () => o("link"),
|
|
1935
|
+
isMobile: s
|
|
1933
1936
|
}
|
|
1934
1937
|
) : /* @__PURE__ */ p(
|
|
1935
|
-
|
|
1938
|
+
Nr,
|
|
1936
1939
|
{
|
|
1937
|
-
type:
|
|
1938
|
-
onBack: () =>
|
|
1940
|
+
type: a === "highlighter" ? "highlighter" : "link",
|
|
1941
|
+
onBack: () => o("main")
|
|
1939
1942
|
}
|
|
1940
1943
|
)
|
|
1941
1944
|
}
|
|
@@ -1944,7 +1947,7 @@ function fn({
|
|
|
1944
1947
|
/* @__PURE__ */ p(
|
|
1945
1948
|
wt,
|
|
1946
1949
|
{
|
|
1947
|
-
editor:
|
|
1950
|
+
editor: u,
|
|
1948
1951
|
role: "presentation",
|
|
1949
1952
|
className: "simple-editor-content"
|
|
1950
1953
|
}
|
|
@@ -1952,5 +1955,5 @@ function fn({
|
|
|
1952
1955
|
] }) }) : null;
|
|
1953
1956
|
}
|
|
1954
1957
|
export {
|
|
1955
|
-
|
|
1958
|
+
mn as SimpleEditor
|
|
1956
1959
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@dooherceg/tiptap-controlled-editor-with-table",
|
|
3
3
|
"private": false,
|
|
4
4
|
"baseUrl": "./",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/main.js",
|
|
8
8
|
"types": "dist/main.d.ts",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"@eslint/js": "^9.36.0",
|
|
28
28
|
"@types/lodash.throttle": "^4.1.9",
|
|
29
29
|
"@types/node": "^24.10.0",
|
|
30
|
-
"@types/react": "^
|
|
31
|
-
"@types/react-dom": "^
|
|
30
|
+
"@types/react": "^19.2.4",
|
|
31
|
+
"@types/react-dom": "^19.2.3",
|
|
32
32
|
"@vitejs/plugin-react": "^5.0.4",
|
|
33
33
|
"eslint": "^9.36.0",
|
|
34
|
-
"eslint-plugin-react-hooks": "^
|
|
34
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
35
35
|
"eslint-plugin-react-refresh": "^0.4.22",
|
|
36
36
|
"glob": "^11.0.3",
|
|
37
37
|
"globals": "^16.4.0",
|
|
38
|
-
"react": "^
|
|
39
|
-
"react-dom": "^
|
|
38
|
+
"react": "^19.2.0",
|
|
39
|
+
"react-dom": "^19.2.0",
|
|
40
40
|
"sass-embedded": "^1.93.3",
|
|
41
41
|
"typescript": "~5.9.3",
|
|
42
42
|
"typescript-eslint": "^8.45.0",
|