@maily-to/core 0.0.18 → 0.0.19
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/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1104 -845
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1010 -751
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -60,11 +60,11 @@ styleInject(':root {\n --placeholder-color: #adb5bd;\n --bg-color: #ffffff;\n
|
|
|
60
60
|
styleInject(':where(.mly-editor),\n:where(.mly-editor) ::before,\n:where(.mly-editor) ::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: #e5e7eb;\n}\n:where(.mly-editor) ::before,\n:where(.mly-editor) ::after {\n --tw-content: "";\n}\n:where(.mly-editor) html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family:\n ui-sans-serif,\n system-ui,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol",\n "Noto Color Emoji";\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n:where(.mly-editor) body {\n margin: 0;\n line-height: inherit;\n}\n:where(.mly-editor) hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n}\n:where(.mly-editor) abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n:where(.mly-editor) h1,\n:where(.mly-editor) h2,\n:where(.mly-editor) h3,\n:where(.mly-editor) h4,\n:where(.mly-editor) h5,\n:where(.mly-editor) h6 {\n font-size: inherit;\n font-weight: inherit;\n}\n:where(.mly-editor) a {\n color: inherit;\n text-decoration: inherit;\n}\n:where(.mly-editor) b,\n:where(.mly-editor) strong {\n font-weight: bolder;\n}\n:where(.mly-editor) code,\n:where(.mly-editor) kbd,\n:where(.mly-editor) samp,\n:where(.mly-editor) pre {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n font-size: 1em;\n}\n:where(.mly-editor) small {\n font-size: 80%;\n}\n:where(.mly-editor) sub,\n:where(.mly-editor) sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n:where(.mly-editor) sub {\n bottom: -0.25em;\n}\n:where(.mly-editor) sup {\n top: -0.5em;\n}\n:where(.mly-editor) table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n}\n:where(.mly-editor) button,\n:where(.mly-editor) input,\n:where(.mly-editor) optgroup,\n:where(.mly-editor) select,\n:where(.mly-editor) textarea {\n font-family: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n font-size: 100%;\n font-weight: inherit;\n line-height: inherit;\n color: inherit;\n margin: 0;\n padding: 0;\n}\n:where(.mly-editor) button,\n:where(.mly-editor) select {\n text-transform: none;\n}\n:where(.mly-editor) button,\n:where(.mly-editor) [type=button],\n:where(.mly-editor) [type=reset],\n:where(.mly-editor) [type=submit] {\n -webkit-appearance: button;\n background-image: none;\n}\n:where(.mly-editor) :-moz-focusring {\n outline: auto;\n}\n:where(.mly-editor) :-moz-ui-invalid {\n box-shadow: none;\n}\n:where(.mly-editor) progress {\n vertical-align: baseline;\n}\n:where(.mly-editor) ::-webkit-inner-spin-button,\n:where(.mly-editor) ::-webkit-outer-spin-button {\n height: auto;\n}\n:where(.mly-editor) [type=search] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n:where(.mly-editor) ::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n:where(.mly-editor) ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n:where(.mly-editor) summary {\n display: list-item;\n}\n:where(.mly-editor) blockquote,\n:where(.mly-editor) dl,\n:where(.mly-editor) dd,\n:where(.mly-editor) h1,\n:where(.mly-editor) h2,\n:where(.mly-editor) h3,\n:where(.mly-editor) h4,\n:where(.mly-editor) h5,\n:where(.mly-editor) h6,\n:where(.mly-editor) hr,\n:where(.mly-editor) figure,\n:where(.mly-editor) p,\n:where(.mly-editor) pre {\n margin: 0;\n}\n:where(.mly-editor) fieldset {\n margin: 0;\n padding: 0;\n}\n:where(.mly-editor) legend {\n padding: 0;\n}\n:where(.mly-editor) ol,\n:where(.mly-editor) ul,\n:where(.mly-editor) menu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n:where(.mly-editor) dialog {\n padding: 0;\n}\n:where(.mly-editor) textarea {\n resize: vertical;\n}\n:where(.mly-editor) input::-moz-placeholder,\n:where(.mly-editor) textarea::-moz-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n:where(.mly-editor) input::placeholder,\n:where(.mly-editor) textarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\n:where(.mly-editor) button,\n:where(.mly-editor) [role=button] {\n cursor: pointer;\n}\n:where(.mly-editor) :disabled {\n cursor: default;\n}\n:where(.mly-editor) img,\n:where(.mly-editor) svg,\n:where(.mly-editor) video,\n:where(.mly-editor) canvas,\n:where(.mly-editor) audio,\n:where(.mly-editor) iframe,\n:where(.mly-editor) embed,\n:where(.mly-editor) object {\n display: block;\n vertical-align: middle;\n}\n:where(.mly-editor) img,\n:where(.mly-editor) video {\n max-width: 100%;\n height: auto;\n}\n:where(.mly-editor) [hidden] {\n display: none;\n}\n');
|
|
61
61
|
|
|
62
62
|
// src/styles/tailwind.css
|
|
63
|
-
styleInject('*,\n::before,\n::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n* {\n scrollbar-color: initial;\n scrollbar-width: initial;\n}\n.mly-prose {\n color: var(--tw-prose-body);\n max-width: 65ch;\n}\n.mly-prose :where(p):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.mly-prose :where([class~=lead]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-lead);\n font-size: 1.25em;\n line-height: 1.6;\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.mly-prose :where(a):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.mly-prose :where(strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-bold);\n font-weight: 600;\n}\n.mly-prose :where(a strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(blockquote strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(thead th strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(ol):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: decimal;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.mly-prose :where(ol[type=A]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-alpha;\n}\n.mly-prose :where(ol[type=a]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-alpha;\n}\n.mly-prose :where(ol[type=A s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-alpha;\n}\n.mly-prose :where(ol[type=a s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-alpha;\n}\n.mly-prose :where(ol[type=I]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-roman;\n}\n.mly-prose :where(ol[type=i]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-roman;\n}\n.mly-prose :where(ol[type=I s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-roman;\n}\n.mly-prose :where(ol[type=i s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-roman;\n}\n.mly-prose :where(ol[type="1"]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: decimal;\n}\n.mly-prose :where(ul):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: disc;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.mly-prose :where(ol > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::marker {\n font-weight: 400;\n color: var(--tw-prose-counters);\n}\n.mly-prose :where(ul > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::marker {\n color: var(--tw-prose-bullets);\n}\n.mly-prose :where(dt):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.25em;\n}\n.mly-prose :where(hr):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-color: var(--tw-prose-hr);\n border-top-width: 1px;\n margin-top: 3em;\n margin-bottom: 3em;\n}\n.mly-prose :where(blockquote):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 500;\n font-style: italic;\n color: var(--tw-prose-quotes);\n border-inline-start-width: 0.25rem;\n border-inline-start-color: var(--tw-prose-quote-borders);\n quotes: "\\201c""\\201d""\\2018""\\2019";\n margin-top: 1.6em;\n margin-bottom: 1.6em;\n padding-inline-start: 1em;\n}\n.mly-prose :where(blockquote p:first-of-type):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::before {\n content: open-quote;\n}\n.mly-prose :where(blockquote p:last-of-type):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::after {\n content: close-quote;\n}\n.mly-prose :where(h1):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 800;\n font-size: 2.25em;\n margin-top: 0;\n margin-bottom: 0.8888889em;\n line-height: 1.1111111;\n}\n.mly-prose :where(h1 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 900;\n color: inherit;\n}\n.mly-prose :where(h2):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 700;\n font-size: 1.5em;\n margin-top: 2em;\n margin-bottom: 1em;\n line-height: 1.3333333;\n}\n.mly-prose :where(h2 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 800;\n color: inherit;\n}\n.mly-prose :where(h3):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n font-size: 1.25em;\n margin-top: 1.6em;\n margin-bottom: 0.6em;\n line-height: 1.6;\n}\n.mly-prose :where(h3 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 700;\n color: inherit;\n}\n.mly-prose :where(h4):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.mly-prose :where(h4 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 700;\n color: inherit;\n}\n.mly-prose :where(img):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(picture):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n display: block;\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(video):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(kbd):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 500;\n font-family: inherit;\n color: var(--tw-prose-kbd);\n box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);\n font-size: 0.875em;\n border-radius: 0.3125rem;\n padding-top: 0.1875em;\n padding-inline-end: 0.375em;\n padding-bottom: 0.1875em;\n padding-inline-start: 0.375em;\n}\n.mly-prose :where(code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-code);\n font-weight: 600;\n font-size: 0.875em;\n}\n.mly-prose :where(code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::before {\n content: "`";\n}\n.mly-prose :where(code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::after {\n content: "`";\n}\n.mly-prose :where(a code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(h1 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(h2 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n font-size: 0.875em;\n}\n.mly-prose :where(h3 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n font-size: 0.9em;\n}\n.mly-prose :where(h4 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(blockquote code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(thead th code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(pre):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-pre-code);\n background-color: var(--tw-prose-pre-bg);\n overflow-x: auto;\n font-weight: 400;\n font-size: 0.875em;\n line-height: 1.7142857;\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n border-radius: 0.375rem;\n padding-top: 0.8571429em;\n padding-inline-end: 1.1428571em;\n padding-bottom: 0.8571429em;\n padding-inline-start: 1.1428571em;\n}\n.mly-prose :where(pre code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n background-color: transparent;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-weight: inherit;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\n.mly-prose :where(pre code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::before {\n content: none;\n}\n.mly-prose :where(pre code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::after {\n content: none;\n}\n.mly-prose :where(table):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n width: 100%;\n table-layout: auto;\n margin-top: 2em;\n margin-bottom: 2em;\n font-size: 0.875em;\n line-height: 1.7142857;\n}\n.mly-prose :where(thead):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-th-borders);\n}\n.mly-prose :where(thead th):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n vertical-align: bottom;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.mly-prose :where(tbody tr):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-td-borders);\n}\n.mly-prose :where(tbody tr:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-bottom-width: 0;\n}\n.mly-prose :where(tbody td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n vertical-align: baseline;\n}\n.mly-prose :where(tfoot):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-top-width: 1px;\n border-top-color: var(--tw-prose-th-borders);\n}\n.mly-prose :where(tfoot td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n vertical-align: top;\n}\n.mly-prose :where(th, td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n text-align: start;\n}\n.mly-prose :where(figure > *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.mly-prose :where(figcaption):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-captions);\n font-size: 0.875em;\n line-height: 1.4285714;\n margin-top: 0.8571429em;\n}\n.mly-prose {\n --tw-prose-body: #374151;\n --tw-prose-headings: #111827;\n --tw-prose-lead: #4b5563;\n --tw-prose-links: #111827;\n --tw-prose-bold: #111827;\n --tw-prose-counters: #6b7280;\n --tw-prose-bullets: #d1d5db;\n --tw-prose-hr: #e5e7eb;\n --tw-prose-quotes: #111827;\n --tw-prose-quote-borders: #e5e7eb;\n --tw-prose-captions: #6b7280;\n --tw-prose-kbd: #111827;\n --tw-prose-kbd-shadows: 17 24 39;\n --tw-prose-code: #111827;\n --tw-prose-pre-code: #e5e7eb;\n --tw-prose-pre-bg: #1f2937;\n --tw-prose-th-borders: #d1d5db;\n --tw-prose-td-borders: #e5e7eb;\n --tw-prose-invert-body: #d1d5db;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #9ca3af;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #9ca3af;\n --tw-prose-invert-bullets: #4b5563;\n --tw-prose-invert-hr: #374151;\n --tw-prose-invert-quotes: #f3f4f6;\n --tw-prose-invert-quote-borders: #374151;\n --tw-prose-invert-captions: #9ca3af;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: 255 255 255;\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d1d5db;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #4b5563;\n --tw-prose-invert-td-borders: #374151;\n font-size: 1rem;\n line-height: 1.75;\n}\n.mly-prose :where(picture > img):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.mly-prose :where(li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n.mly-prose :where(ol > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0.375em;\n}\n.mly-prose :where(ul > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0.375em;\n}\n.mly-prose :where(.mly-prose > ul > li p):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.mly-prose :where(.mly-prose > ul > li > p:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n}\n.mly-prose :where(.mly-prose > ul > li > p:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-bottom: 1.25em;\n}\n.mly-prose :where(.mly-prose > ol > li > p:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n}\n.mly-prose :where(.mly-prose > ol > li > p:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-bottom: 1.25em;\n}\n.mly-prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.mly-prose :where(dl):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.mly-prose :where(dd):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.5em;\n padding-inline-start: 1.625em;\n}\n.mly-prose :where(hr + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(h2 + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(h3 + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(h4 + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(thead th:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0;\n}\n.mly-prose :where(thead th:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-end: 0;\n}\n.mly-prose :where(tbody td, tfoot td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-top: 0.5714286em;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.mly-prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0;\n}\n.mly-prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-end: 0;\n}\n.mly-prose :where(figure):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(.mly-prose > :first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(.mly-prose > :last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-bottom: 0;\n}\n.mly-pointer-events-none {\n pointer-events: none;\n}\n.mly-absolute {\n position: absolute;\n}\n.mly-relative {\n position: relative;\n}\n.mly-inset-y-0 {\n top: 0px;\n bottom: 0px;\n}\n.mly-left-0 {\n left: 0px;\n}\n.mly-left-1\\.5 {\n left: 0.375rem;\n}\n.mly-left-2 {\n left: 0.5rem;\n}\n.mly-right-0 {\n right: 0px;\n}\n.mly-right-1 {\n right: 0.25rem;\n}\n.mly-right-1\\.5 {\n right: 0.375rem;\n}\n.mly-top-0 {\n top: 0px;\n}\n.mly-top-8 {\n top: 2rem;\n}\n.mly-isolate {\n isolation: isolate;\n}\n.mly-z-0 {\n z-index: 0;\n}\n.mly-z-10 {\n z-index: 10;\n}\n.mly-z-20 {\n z-index: 20;\n}\n.mly-z-50 {\n z-index: 50;\n}\n.mly-z-\\[1\\] {\n z-index: 1;\n}\n.mly-z-\\[9999\\] {\n z-index: 9999;\n}\n.\\!mly-my-0 {\n margin-top: 0px !important;\n margin-bottom: 0px !important;\n}\n.mly--mx-1 {\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.mly-mx-0\\.5 {\n margin-left: 0.125rem;\n margin-right: 0.125rem;\n}\n.mly-mx-1\\.5 {\n margin-left: 0.375rem;\n margin-right: 0.375rem;\n}\n.mly-my-0\\.5 {\n margin-top: 0.125rem;\n margin-bottom: 0.125rem;\n}\n.mly-my-1 {\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n}\n.\\!mly-mb-0 {\n margin-bottom: 0px !important;\n}\n.\\!mly-mb-1\\.5 {\n margin-bottom: 0.375rem !important;\n}\n.-mly-ms-px {\n margin-inline-start: -1px;\n}\n.mly-mb-1\\.5 {\n margin-bottom: 0.375rem;\n}\n.mly-mb-4 {\n margin-bottom: 1rem;\n}\n.mly-ml-1 {\n margin-left: 0.25rem;\n}\n.mly-ml-auto {\n margin-left: auto;\n}\n.mly-mt-4 {\n margin-top: 1rem;\n}\n.mly-block {\n display: block;\n}\n.mly-inline-block {\n display: inline-block;\n}\n.mly-flex {\n display: flex;\n}\n.mly-inline-flex {\n display: inline-flex;\n}\n.mly-grid {\n display: grid;\n}\n.mly-inline-grid {\n display: inline-grid;\n}\n.mly-aspect-square {\n aspect-ratio: 1 / 1;\n}\n.\\!mly-size-5 {\n width: 1.25rem !important;\n height: 1.25rem !important;\n}\n.\\!mly-size-7 {\n width: 1.75rem !important;\n height: 1.75rem !important;\n}\n.mly-size-3 {\n width: 0.75rem;\n height: 0.75rem;\n}\n.mly-size-3\\.5 {\n width: 0.875rem;\n height: 0.875rem;\n}\n.mly-size-4 {\n width: 1rem;\n height: 1rem;\n}\n.mly-size-5 {\n width: 1.25rem;\n height: 1.25rem;\n}\n.mly-size-7 {\n width: 1.75rem;\n height: 1.75rem;\n}\n.mly-size-\\[15px\\] {\n width: 15px;\n height: 15px;\n}\n.mly-size-\\[var\\(--variable-icon-size\\)\\] {\n width: var(--variable-icon-size);\n height: var(--variable-icon-size);\n}\n.\\!mly-h-7 {\n height: 1.75rem !important;\n}\n.mly-h-10 {\n height: 2.5rem;\n}\n.mly-h-11 {\n height: 2.75rem;\n}\n.mly-h-3 {\n height: 0.75rem;\n}\n.mly-h-4 {\n height: 1rem;\n}\n.mly-h-5 {\n height: 1.25rem;\n}\n.mly-h-6 {\n height: 1.5rem;\n}\n.mly-h-7 {\n height: 1.75rem;\n}\n.mly-h-8 {\n height: 2rem;\n}\n.mly-h-9 {\n height: 2.25rem;\n}\n.mly-h-\\[2px\\] {\n height: 2px;\n}\n.mly-h-auto {\n height: auto;\n}\n.mly-h-full {\n height: 100%;\n}\n.mly-h-px {\n height: 1px;\n}\n.mly-max-h-52 {\n max-height: 13rem;\n}\n.mly-max-h-\\[330px\\] {\n max-height: 330px;\n}\n.mly-min-h-24 {\n min-height: 6rem;\n}\n.mly-min-h-7 {\n min-height: 1.75rem;\n}\n.\\!mly-w-full {\n width: 100% !important;\n}\n.mly-w-10 {\n width: 2.5rem;\n}\n.mly-w-3 {\n width: 0.75rem;\n}\n.mly-w-32 {\n width: 8rem;\n}\n.mly-w-36 {\n width: 9rem;\n}\n.mly-w-4 {\n width: 1rem;\n}\n.mly-w-40 {\n width: 10rem;\n}\n.mly-w-5 {\n width: 1.25rem;\n}\n.mly-w-52 {\n width: 13rem;\n}\n.mly-w-6 {\n width: 1.5rem;\n}\n.mly-w-64 {\n width: 16rem;\n}\n.mly-w-7 {\n width: 1.75rem;\n}\n.mly-w-72 {\n width: 18rem;\n}\n.mly-w-9 {\n width: 2.25rem;\n}\n.mly-w-96 {\n width: 24rem;\n}\n.mly-w-\\[1\\.5px\\] {\n width: 1.5px;\n}\n.mly-w-\\[300px\\] {\n width: 300px;\n}\n.mly-w-full {\n width: 100%;\n}\n.mly-w-max {\n width: -moz-max-content;\n width: max-content;\n}\n.mly-w-px {\n width: 1px;\n}\n.mly-min-w-0 {\n min-width: 0px;\n}\n.mly-min-w-28 {\n min-width: 7rem;\n}\n.mly-min-w-\\[260px\\] {\n min-width: 260px;\n}\n.mly-min-w-\\[8rem\\] {\n min-width: 8rem;\n}\n.mly-max-w-12 {\n max-width: 3rem;\n}\n.mly-max-w-20 {\n max-width: 5rem;\n}\n.mly-max-w-28 {\n max-width: 7rem;\n}\n.mly-max-w-max {\n max-width: -moz-max-content;\n max-width: max-content;\n}\n.mly-max-w-xs {\n max-width: 20rem;\n}\n.mly-shrink-0 {\n flex-shrink: 0;\n}\n.mly-grow {\n flex-grow: 1;\n}\n.mly-border-separate {\n border-collapse: separate;\n}\n.mly-translate-x-full {\n --tw-translate-x: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.mly-transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@keyframes mly-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.mly-animate-spin {\n animation: mly-spin 1s linear infinite;\n}\n.mly-cursor-default {\n cursor: default;\n}\n.mly-cursor-grab {\n cursor: grab;\n}\n.mly-cursor-pointer {\n cursor: pointer;\n}\n.mly-select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.mly-appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.mly-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.mly-grid-cols-\\[12px_1fr\\] {\n grid-template-columns: 12px 1fr;\n}\n.mly-flex-col {\n flex-direction: column;\n}\n.mly-items-center {\n align-items: center;\n}\n.mly-items-stretch {\n align-items: stretch;\n}\n.mly-justify-start {\n justify-content: flex-start;\n}\n.mly-justify-center {\n justify-content: center;\n}\n.mly-justify-between {\n justify-content: space-between;\n}\n.mly-gap-0\\.5 {\n gap: 0.125rem;\n}\n.mly-gap-1 {\n gap: 0.25rem;\n}\n.mly-gap-1\\.5 {\n gap: 0.375rem;\n}\n.mly-gap-2 {\n gap: 0.5rem;\n}\n.mly-gap-3 {\n gap: 0.75rem;\n}\n.mly-gap-4 {\n gap: 1rem;\n}\n.mly-gap-\\[1px\\] {\n gap: 1px;\n}\n.mly-gap-\\[var\\(--variable-icon-gap\\)\\] {\n gap: var(--variable-icon-gap);\n}\n.mly-space-x-0\\.5 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.125rem * var(--tw-space-x-reverse));\n margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.mly-space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.mly-space-y-1 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));\n}\n.mly-overflow-hidden {\n overflow: hidden;\n}\n.mly-overflow-y-auto {\n overflow-y: auto;\n}\n.mly-scroll-smooth {\n scroll-behavior: smooth;\n}\n.mly-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.\\!mly-rounded {\n border-radius: 0.25rem !important;\n}\n.\\!mly-rounded-full {\n border-radius: 9999px !important;\n}\n.\\!mly-rounded-md {\n border-radius: 0.375rem !important;\n}\n.\\!mly-rounded-none {\n border-radius: 0px !important;\n}\n.mly-rounded {\n border-radius: 0.25rem;\n}\n.mly-rounded-full {\n border-radius: 9999px;\n}\n.mly-rounded-lg {\n border-radius: 0.5rem;\n}\n.mly-rounded-md {\n border-radius: 0.375rem;\n}\n.mly-rounded-none {\n border-radius: 0px;\n}\n.mly-rounded-sm {\n border-radius: 0.125rem;\n}\n.mly-rounded-xl {\n border-radius: 0.75rem;\n}\n.mly-rounded-s-lg {\n border-start-start-radius: 0.5rem;\n border-end-start-radius: 0.5rem;\n}\n.mly-rounded-s-none {\n border-start-start-radius: 0px;\n border-end-start-radius: 0px;\n}\n.mly-rounded-t-lg {\n border-top-left-radius: 0.5rem;\n border-top-right-radius: 0.5rem;\n}\n.mly-border {\n border-width: 1px;\n}\n.mly-border-0 {\n border-width: 0px;\n}\n.mly-border-2 {\n border-width: 2px;\n}\n.mly-border-\\[1\\.5px\\] {\n border-width: 1.5px;\n}\n.mly-border-b {\n border-bottom-width: 1px;\n}\n.mly-border-l-4 {\n border-left-width: 4px;\n}\n.mly-border-t {\n border-top-width: 1px;\n}\n.mly-border-none {\n border-style: none;\n}\n.mly-border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.mly-border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.mly-border-gray-700 {\n --tw-border-opacity: 1;\n border-color: rgb(55 65 81 / var(--tw-border-opacity));\n}\n.mly-border-rose-400 {\n --tw-border-opacity: 1;\n border-color: rgb(251 113 133 / var(--tw-border-opacity));\n}\n.mly-border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity));\n}\n.mly-border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.\\!mly-bg-transparent {\n background-color: transparent !important;\n}\n.mly-bg-\\[\\#efefef\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(239 239 239 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity));\n}\n.mly-bg-red-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 226 226 / var(--tw-bg-opacity));\n}\n.mly-bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(255 228 230 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(253 164 175 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(255 241 242 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(244 63 94 / var(--tw-bg-opacity));\n}\n.mly-bg-soft-gray {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.mly-bg-soft-gray\\/40 {\n background-color: rgb(244 245 246 / 0.4);\n}\n.mly-bg-soft-gray\\/60 {\n background-color: rgb(244 245 246 / 0.6);\n}\n.mly-bg-transparent {\n background-color: transparent;\n}\n.mly-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.mly-bg-yellow-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity));\n}\n.mly-stroke-midnight-gray {\n stroke: #333333;\n}\n.mly-stroke-\\[1\\.2\\] {\n stroke-width: 1.2;\n}\n.mly-stroke-\\[1\\] {\n stroke-width: 1;\n}\n.mly-stroke-\\[2\\.5\\] {\n stroke-width: 2.5;\n}\n.\\!mly-p-0 {\n padding: 0px !important;\n}\n.\\!mly-p-0\\.5 {\n padding: 0.125rem !important;\n}\n.mly-p-0 {\n padding: 0px;\n}\n.mly-p-0\\.5 {\n padding: 0.125rem;\n}\n.mly-p-1 {\n padding: 0.25rem;\n}\n.mly-p-3 {\n padding: 0.75rem;\n}\n.mly-p-4 {\n padding: 1rem;\n}\n.mly-px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.mly-px-1\\.5 {\n padding-left: 0.375rem;\n padding-right: 0.375rem;\n}\n.mly-px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.mly-px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n.mly-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.mly-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.mly-px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n.mly-px-\\[26px\\] {\n padding-left: 26px;\n padding-right: 26px;\n}\n.mly-px-\\[32px\\] {\n padding-left: 32px;\n padding-right: 32px;\n}\n.mly-py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.mly-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.mly-py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.mly-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.mly-py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.mly-py-\\[20px\\] {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n.mly-pe-8 {\n padding-inline-end: 2rem;\n}\n.mly-pl-1 {\n padding-left: 0.25rem;\n}\n.mly-pl-4 {\n padding-left: 1rem;\n}\n.mly-pl-7 {\n padding-left: 1.75rem;\n}\n.mly-pl-8 {\n padding-left: 2rem;\n}\n.mly-pl-\\[26px\\] {\n padding-left: 26px;\n}\n.mly-pr-1\\.5 {\n padding-right: 0.375rem;\n}\n.mly-pr-6 {\n padding-right: 1.5rem;\n}\n.mly-pr-7 {\n padding-right: 1.75rem;\n}\n.mly-ps-3 {\n padding-inline-start: 0.75rem;\n}\n.mly-text-left {\n text-align: left;\n}\n.mly-text-center {\n text-align: center;\n}\n.mly-font-mono {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n}\n.\\!mly-text-base {\n font-size: 1rem !important;\n line-height: 1.5rem !important;\n}\n.\\!mly-text-lg {\n font-size: 1.125rem !important;\n line-height: 1.75rem !important;\n}\n.mly-text-\\[10px\\] {\n font-size: 10px;\n}\n.mly-text-\\[13px\\] {\n font-size: 13px;\n}\n.mly-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.mly-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.mly-font-medium {\n font-weight: 500;\n}\n.mly-font-normal {\n font-weight: 400;\n}\n.mly-font-semibold {\n font-weight: 600;\n}\n.mly-uppercase {\n text-transform: uppercase;\n}\n.mly-capitalize {\n text-transform: capitalize;\n}\n.mly-tabular-nums {\n --tw-numeric-spacing: tabular-nums;\n font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);\n}\n.mly-leading-none {\n line-height: 1;\n}\n.mly-tracking-normal {\n letter-spacing: 0em;\n}\n.mly-tracking-widest {\n letter-spacing: 0.1em;\n}\n.mly-text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.mly-text-gray-50 {\n --tw-text-opacity: 1;\n color: rgb(249 250 251 / var(--tw-text-opacity));\n}\n.mly-text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.mly-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.mly-text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.mly-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.mly-text-gray-950 {\n --tw-text-opacity: 1;\n color: rgb(3 7 18 / var(--tw-text-opacity));\n}\n.mly-text-midnight-gray {\n --tw-text-opacity: 1;\n color: rgb(51 51 51 / var(--tw-text-opacity));\n}\n.mly-text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.mly-text-red-600 {\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity));\n}\n.mly-text-rose-600 {\n --tw-text-opacity: 1;\n color: rgb(225 29 72 / var(--tw-text-opacity));\n}\n.mly-text-rose-800 {\n --tw-text-opacity: 1;\n color: rgb(159 18 57 / var(--tw-text-opacity));\n}\n.mly-text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity));\n}\n.mly-text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity));\n}\n.mly-text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity));\n}\n.mly-text-slate-700 {\n --tw-text-opacity: 1;\n color: rgb(51 65 85 / var(--tw-text-opacity));\n}\n.mly-no-underline {\n text-decoration-line: none;\n}\n.mly-underline-offset-4 {\n text-underline-offset: 4px;\n}\n.mly-antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.mly-opacity-60 {\n opacity: 0.6;\n}\n.mly-shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.mly-ring-offset-white {\n --tw-ring-offset-color: #fff;\n}\n.mly-drop-shadow-md {\n --tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.mly-transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.mly-transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.mly-transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.mly-ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n.mly-animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.mly-fade-in-0 {\n --tw-enter-opacity: 0;\n}\n.mly-zoom-in-95 {\n --tw-enter-scale: .95;\n}\n.mly-ease-out {\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-track {\n background-color: var(--scrollbar-track);\n border-radius: var(--scrollbar-track-radius);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-track:hover {\n background-color: var(--scrollbar-track-hover, var(--scrollbar-track));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-track:active {\n background-color: var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar-thumb);\n border-radius: var(--scrollbar-thumb-radius);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-thumb:hover {\n background-color: var(--scrollbar-thumb-hover, var(--scrollbar-thumb));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-thumb:active {\n background-color: var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-corner {\n background-color: var(--scrollbar-corner);\n border-radius: var(--scrollbar-corner-radius);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-corner:hover {\n background-color: var(--scrollbar-corner-hover, var(--scrollbar-corner));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-corner:active {\n background-color: var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)));\n}\n.mly-scrollbar-thin {\n scrollbar-width: thin;\n scrollbar-color: var(--scrollbar-thumb, initial) var(--scrollbar-track, initial);\n}\n.mly-scrollbar-thin::-webkit-scrollbar {\n display: block;\n width: 8px;\n height: 8px;\n}\n.mly-scrollbar-track-transparent {\n --scrollbar-track: transparent !important;\n}\n.mly-scrollbar-thumb-gray-200 {\n --scrollbar-thumb: #e5e7eb !important;\n}\n.\\[text-align\\:revert-layer\\] {\n text-align: revert-layer;\n}\n.file\\:mly-border-0::file-selector-button {\n border-width: 0px;\n}\n.file\\:mly-bg-transparent::file-selector-button {\n background-color: transparent;\n}\n.file\\:mly-text-sm::file-selector-button {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.file\\:mly-font-medium::file-selector-button {\n font-weight: 500;\n}\n.placeholder\\:mly-text-gray-400::-moz-placeholder {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.placeholder\\:mly-text-gray-400::placeholder {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.placeholder\\:mly-text-gray-500::-moz-placeholder {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.placeholder\\:mly-text-gray-500::placeholder {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.mly-peer:disabled ~ .peer-disabled\\:mly-opacity-50 {\n opacity: 0.5;\n}\n.aria-selected\\:mly-bg-soft-gray[aria-selected=true] {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.data-\\[disabled\\]\\:mly-pointer-events-none[data-disabled] {\n pointer-events: none;\n}\n.data-\\[state\\=open\\]\\:mly-bg-rose-100[data-state=open] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 228 230 / var(--tw-bg-opacity));\n}\n.data-\\[state\\=open\\]\\:mly-bg-soft-gray[data-state=open] {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.data-\\[state\\=true\\]\\:mly-bg-soft-gray[data-state=true] {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.data-\\[state\\=true\\]\\:mly-text-gray-900[data-state=true] {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.data-\\[disabled\\]\\:mly-opacity-50[data-disabled] {\n opacity: 0.5;\n}\n.hover\\:mly-bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-gray-100\\/80:hover {\n background-color: rgb(243 244 246 / 0.8);\n}\n.hover\\:mly-bg-red-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-red-500\\/90:hover {\n background-color: rgb(239 68 68 / 0.9);\n}\n.hover\\:mly-bg-rose-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(255 228 230 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-soft-gray:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-soft-gray\\/60:hover {\n background-color: rgb(244 245 246 / 0.6);\n}\n.hover\\:mly-text-black:hover {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n.hover\\:mly-text-gray-900:hover {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.hover\\:mly-text-midnight-gray:hover {\n --tw-text-opacity: 1;\n color: rgb(51 51 51 / var(--tw-text-opacity));\n}\n.hover\\:mly-underline:hover {\n text-decoration-line: underline;\n}\n.focus\\:mly-z-10:focus {\n z-index: 10;\n}\n.focus\\:mly-bg-gray-100:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.focus\\:mly-bg-red-200:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity));\n}\n.focus\\:mly-bg-soft-gray:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.focus\\:mly-outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus\\:mly-ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:mly-ring-midnight-gray\\/50:focus {\n --tw-ring-color: rgb(51 51 51 / 0.5);\n}\n.focus-visible\\:mly-relative:focus-visible {\n position: relative;\n}\n.focus-visible\\:mly-z-10:focus-visible {\n z-index: 10;\n}\n.focus-visible\\:mly-border-gray-400:focus-visible {\n --tw-border-opacity: 1;\n border-color: rgb(156 163 175 / var(--tw-border-opacity));\n}\n.focus-visible\\:mly-outline-none:focus-visible {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus-visible\\:mly-ring-2:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus-visible\\:mly-ring-gray-400:focus-visible {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity));\n}\n.focus-visible\\:mly-ring-offset-2:focus-visible {\n --tw-ring-offset-width: 2px;\n}\n.active\\:mly-bg-soft-gray:active {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.disabled\\:mly-pointer-events-none:disabled {\n pointer-events: none;\n}\n.disabled\\:mly-cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n.disabled\\:mly-opacity-50:disabled {\n opacity: 0.5;\n}\n.\\[\\&_svg\\]\\:mly-pointer-events-none svg {\n pointer-events: none;\n}\n');
|
|
63
|
+
styleInject('*,\n::before,\n::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n* {\n scrollbar-color: initial;\n scrollbar-width: initial;\n}\n.mly-prose {\n color: var(--tw-prose-body);\n max-width: 65ch;\n}\n.mly-prose :where(p):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.mly-prose :where([class~=lead]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-lead);\n font-size: 1.25em;\n line-height: 1.6;\n margin-top: 1.2em;\n margin-bottom: 1.2em;\n}\n.mly-prose :where(a):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-links);\n text-decoration: underline;\n font-weight: 500;\n}\n.mly-prose :where(strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-bold);\n font-weight: 600;\n}\n.mly-prose :where(a strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(blockquote strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(thead th strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(ol):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: decimal;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.mly-prose :where(ol[type=A]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-alpha;\n}\n.mly-prose :where(ol[type=a]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-alpha;\n}\n.mly-prose :where(ol[type=A s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-alpha;\n}\n.mly-prose :where(ol[type=a s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-alpha;\n}\n.mly-prose :where(ol[type=I]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-roman;\n}\n.mly-prose :where(ol[type=i]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-roman;\n}\n.mly-prose :where(ol[type=I s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: upper-roman;\n}\n.mly-prose :where(ol[type=i s]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: lower-roman;\n}\n.mly-prose :where(ol[type="1"]):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: decimal;\n}\n.mly-prose :where(ul):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n list-style-type: disc;\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n padding-inline-start: 1.625em;\n}\n.mly-prose :where(ol > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::marker {\n font-weight: 400;\n color: var(--tw-prose-counters);\n}\n.mly-prose :where(ul > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::marker {\n color: var(--tw-prose-bullets);\n}\n.mly-prose :where(dt):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.25em;\n}\n.mly-prose :where(hr):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-color: var(--tw-prose-hr);\n border-top-width: 1px;\n margin-top: 3em;\n margin-bottom: 3em;\n}\n.mly-prose :where(blockquote):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 500;\n font-style: italic;\n color: var(--tw-prose-quotes);\n border-inline-start-width: 0.25rem;\n border-inline-start-color: var(--tw-prose-quote-borders);\n quotes: "\\201c""\\201d""\\2018""\\2019";\n margin-top: 1.6em;\n margin-bottom: 1.6em;\n padding-inline-start: 1em;\n}\n.mly-prose :where(blockquote p:first-of-type):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::before {\n content: open-quote;\n}\n.mly-prose :where(blockquote p:last-of-type):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::after {\n content: close-quote;\n}\n.mly-prose :where(h1):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 800;\n font-size: 2.25em;\n margin-top: 0;\n margin-bottom: 0.8888889em;\n line-height: 1.1111111;\n}\n.mly-prose :where(h1 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 900;\n color: inherit;\n}\n.mly-prose :where(h2):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 700;\n font-size: 1.5em;\n margin-top: 2em;\n margin-bottom: 1em;\n line-height: 1.3333333;\n}\n.mly-prose :where(h2 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 800;\n color: inherit;\n}\n.mly-prose :where(h3):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n font-size: 1.25em;\n margin-top: 1.6em;\n margin-bottom: 0.6em;\n line-height: 1.6;\n}\n.mly-prose :where(h3 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 700;\n color: inherit;\n}\n.mly-prose :where(h4):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n margin-top: 1.5em;\n margin-bottom: 0.5em;\n line-height: 1.5;\n}\n.mly-prose :where(h4 strong):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 700;\n color: inherit;\n}\n.mly-prose :where(img):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(picture):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n display: block;\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(video):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(kbd):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n font-weight: 500;\n font-family: inherit;\n color: var(--tw-prose-kbd);\n box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);\n font-size: 0.875em;\n border-radius: 0.3125rem;\n padding-top: 0.1875em;\n padding-inline-end: 0.375em;\n padding-bottom: 0.1875em;\n padding-inline-start: 0.375em;\n}\n.mly-prose :where(code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-code);\n font-weight: 600;\n font-size: 0.875em;\n}\n.mly-prose :where(code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::before {\n content: "`";\n}\n.mly-prose :where(code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::after {\n content: "`";\n}\n.mly-prose :where(a code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(h1 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(h2 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n font-size: 0.875em;\n}\n.mly-prose :where(h3 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n font-size: 0.9em;\n}\n.mly-prose :where(h4 code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(blockquote code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(thead th code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: inherit;\n}\n.mly-prose :where(pre):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-pre-code);\n background-color: var(--tw-prose-pre-bg);\n overflow-x: auto;\n font-weight: 400;\n font-size: 0.875em;\n line-height: 1.7142857;\n margin-top: 1.7142857em;\n margin-bottom: 1.7142857em;\n border-radius: 0.375rem;\n padding-top: 0.8571429em;\n padding-inline-end: 1.1428571em;\n padding-bottom: 0.8571429em;\n padding-inline-start: 1.1428571em;\n}\n.mly-prose :where(pre code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n background-color: transparent;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-weight: inherit;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\n.mly-prose :where(pre code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::before {\n content: none;\n}\n.mly-prose :where(pre code):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *))::after {\n content: none;\n}\n.mly-prose :where(table):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n width: 100%;\n table-layout: auto;\n margin-top: 2em;\n margin-bottom: 2em;\n font-size: 0.875em;\n line-height: 1.7142857;\n}\n.mly-prose :where(thead):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-th-borders);\n}\n.mly-prose :where(thead th):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-headings);\n font-weight: 600;\n vertical-align: bottom;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.mly-prose :where(tbody tr):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-bottom-width: 1px;\n border-bottom-color: var(--tw-prose-td-borders);\n}\n.mly-prose :where(tbody tr:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-bottom-width: 0;\n}\n.mly-prose :where(tbody td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n vertical-align: baseline;\n}\n.mly-prose :where(tfoot):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n border-top-width: 1px;\n border-top-color: var(--tw-prose-th-borders);\n}\n.mly-prose :where(tfoot td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n vertical-align: top;\n}\n.mly-prose :where(th, td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n text-align: start;\n}\n.mly-prose :where(figure > *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.mly-prose :where(figcaption):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n color: var(--tw-prose-captions);\n font-size: 0.875em;\n line-height: 1.4285714;\n margin-top: 0.8571429em;\n}\n.mly-prose {\n --tw-prose-body: #374151;\n --tw-prose-headings: #111827;\n --tw-prose-lead: #4b5563;\n --tw-prose-links: #111827;\n --tw-prose-bold: #111827;\n --tw-prose-counters: #6b7280;\n --tw-prose-bullets: #d1d5db;\n --tw-prose-hr: #e5e7eb;\n --tw-prose-quotes: #111827;\n --tw-prose-quote-borders: #e5e7eb;\n --tw-prose-captions: #6b7280;\n --tw-prose-kbd: #111827;\n --tw-prose-kbd-shadows: 17 24 39;\n --tw-prose-code: #111827;\n --tw-prose-pre-code: #e5e7eb;\n --tw-prose-pre-bg: #1f2937;\n --tw-prose-th-borders: #d1d5db;\n --tw-prose-td-borders: #e5e7eb;\n --tw-prose-invert-body: #d1d5db;\n --tw-prose-invert-headings: #fff;\n --tw-prose-invert-lead: #9ca3af;\n --tw-prose-invert-links: #fff;\n --tw-prose-invert-bold: #fff;\n --tw-prose-invert-counters: #9ca3af;\n --tw-prose-invert-bullets: #4b5563;\n --tw-prose-invert-hr: #374151;\n --tw-prose-invert-quotes: #f3f4f6;\n --tw-prose-invert-quote-borders: #374151;\n --tw-prose-invert-captions: #9ca3af;\n --tw-prose-invert-kbd: #fff;\n --tw-prose-invert-kbd-shadows: 255 255 255;\n --tw-prose-invert-code: #fff;\n --tw-prose-invert-pre-code: #d1d5db;\n --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);\n --tw-prose-invert-th-borders: #4b5563;\n --tw-prose-invert-td-borders: #374151;\n font-size: 1rem;\n line-height: 1.75;\n}\n.mly-prose :where(picture > img):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n margin-bottom: 0;\n}\n.mly-prose :where(li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n.mly-prose :where(ol > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0.375em;\n}\n.mly-prose :where(ul > li):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0.375em;\n}\n.mly-prose :where(.mly-prose > ul > li p):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.mly-prose :where(.mly-prose > ul > li > p:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n}\n.mly-prose :where(.mly-prose > ul > li > p:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-bottom: 1.25em;\n}\n.mly-prose :where(.mly-prose > ol > li > p:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n}\n.mly-prose :where(.mly-prose > ol > li > p:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-bottom: 1.25em;\n}\n.mly-prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}\n.mly-prose :where(dl):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 1.25em;\n margin-bottom: 1.25em;\n}\n.mly-prose :where(dd):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0.5em;\n padding-inline-start: 1.625em;\n}\n.mly-prose :where(hr + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(h2 + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(h3 + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(h4 + *):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(thead th:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0;\n}\n.mly-prose :where(thead th:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-end: 0;\n}\n.mly-prose :where(tbody td, tfoot td):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-top: 0.5714286em;\n padding-inline-end: 0.5714286em;\n padding-bottom: 0.5714286em;\n padding-inline-start: 0.5714286em;\n}\n.mly-prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-start: 0;\n}\n.mly-prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n padding-inline-end: 0;\n}\n.mly-prose :where(figure):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 2em;\n margin-bottom: 2em;\n}\n.mly-prose :where(.mly-prose > :first-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-top: 0;\n}\n.mly-prose :where(.mly-prose > :last-child):not(:where([class~=mly-not-prose], [class~=mly-not-prose] *)) {\n margin-bottom: 0;\n}\n.mly-pointer-events-none {\n pointer-events: none;\n}\n.mly-absolute {\n position: absolute;\n}\n.mly-relative {\n position: relative;\n}\n.mly-inset-y-0 {\n top: 0px;\n bottom: 0px;\n}\n.mly-left-0 {\n left: 0px;\n}\n.mly-left-1\\.5 {\n left: 0.375rem;\n}\n.mly-left-2 {\n left: 0.5rem;\n}\n.mly-right-0 {\n right: 0px;\n}\n.mly-right-1 {\n right: 0.25rem;\n}\n.mly-top-0 {\n top: 0px;\n}\n.mly-top-8 {\n top: 2rem;\n}\n.mly-isolate {\n isolation: isolate;\n}\n.mly-z-0 {\n z-index: 0;\n}\n.mly-z-10 {\n z-index: 10;\n}\n.mly-z-20 {\n z-index: 20;\n}\n.mly-z-50 {\n z-index: 50;\n}\n.mly-z-\\[1\\] {\n z-index: 1;\n}\n.mly-z-\\[9999\\] {\n z-index: 9999;\n}\n.\\!mly-my-0 {\n margin-top: 0px !important;\n margin-bottom: 0px !important;\n}\n.mly--mx-1 {\n margin-left: -0.25rem;\n margin-right: -0.25rem;\n}\n.mly-mx-0\\.5 {\n margin-left: 0.125rem;\n margin-right: 0.125rem;\n}\n.mly-my-0\\.5 {\n margin-top: 0.125rem;\n margin-bottom: 0.125rem;\n}\n.mly-my-1 {\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n}\n.\\!mly-mb-0 {\n margin-bottom: 0px !important;\n}\n.\\!mly-mb-1\\.5 {\n margin-bottom: 0.375rem !important;\n}\n.-mly-ms-px {\n margin-inline-start: -1px;\n}\n.mly-mb-1\\.5 {\n margin-bottom: 0.375rem;\n}\n.mly-mb-4 {\n margin-bottom: 1rem;\n}\n.mly-ml-1 {\n margin-left: 0.25rem;\n}\n.mly-ml-auto {\n margin-left: auto;\n}\n.mly-mt-4 {\n margin-top: 1rem;\n}\n.mly-block {\n display: block;\n}\n.mly-inline-block {\n display: inline-block;\n}\n.mly-flex {\n display: flex;\n}\n.mly-inline-flex {\n display: inline-flex;\n}\n.mly-grid {\n display: grid;\n}\n.mly-inline-grid {\n display: inline-grid;\n}\n.mly-aspect-square {\n aspect-ratio: 1 / 1;\n}\n.\\!mly-size-5 {\n width: 1.25rem !important;\n height: 1.25rem !important;\n}\n.\\!mly-size-7 {\n width: 1.75rem !important;\n height: 1.75rem !important;\n}\n.mly-size-3 {\n width: 0.75rem;\n height: 0.75rem;\n}\n.mly-size-3\\.5 {\n width: 0.875rem;\n height: 0.875rem;\n}\n.mly-size-4 {\n width: 1rem;\n height: 1rem;\n}\n.mly-size-5 {\n width: 1.25rem;\n height: 1.25rem;\n}\n.mly-size-7 {\n width: 1.75rem;\n height: 1.75rem;\n}\n.mly-size-\\[15px\\] {\n width: 15px;\n height: 15px;\n}\n.mly-size-\\[var\\(--variable-icon-size\\)\\] {\n width: var(--variable-icon-size);\n height: var(--variable-icon-size);\n}\n.\\!mly-h-7 {\n height: 1.75rem !important;\n}\n.mly-h-10 {\n height: 2.5rem;\n}\n.mly-h-11 {\n height: 2.75rem;\n}\n.mly-h-3 {\n height: 0.75rem;\n}\n.mly-h-4 {\n height: 1rem;\n}\n.mly-h-5 {\n height: 1.25rem;\n}\n.mly-h-6 {\n height: 1.5rem;\n}\n.mly-h-7 {\n height: 1.75rem;\n}\n.mly-h-8 {\n height: 2rem;\n}\n.mly-h-9 {\n height: 2.25rem;\n}\n.mly-h-\\[2px\\] {\n height: 2px;\n}\n.mly-h-auto {\n height: auto;\n}\n.mly-h-full {\n height: 100%;\n}\n.mly-h-px {\n height: 1px;\n}\n.mly-max-h-52 {\n max-height: 13rem;\n}\n.mly-max-h-\\[330px\\] {\n max-height: 330px;\n}\n.mly-min-h-24 {\n min-height: 6rem;\n}\n.mly-min-h-7 {\n min-height: 1.75rem;\n}\n.\\!mly-w-full {\n width: 100% !important;\n}\n.mly-w-10 {\n width: 2.5rem;\n}\n.mly-w-3 {\n width: 0.75rem;\n}\n.mly-w-32 {\n width: 8rem;\n}\n.mly-w-4 {\n width: 1rem;\n}\n.mly-w-40 {\n width: 10rem;\n}\n.mly-w-5 {\n width: 1.25rem;\n}\n.mly-w-52 {\n width: 13rem;\n}\n.mly-w-6 {\n width: 1.5rem;\n}\n.mly-w-64 {\n width: 16rem;\n}\n.mly-w-7 {\n width: 1.75rem;\n}\n.mly-w-72 {\n width: 18rem;\n}\n.mly-w-9 {\n width: 2.25rem;\n}\n.mly-w-96 {\n width: 24rem;\n}\n.mly-w-\\[1\\.5px\\] {\n width: 1.5px;\n}\n.mly-w-\\[300px\\] {\n width: 300px;\n}\n.mly-w-full {\n width: 100%;\n}\n.mly-w-max {\n width: -moz-max-content;\n width: max-content;\n}\n.mly-w-px {\n width: 1px;\n}\n.mly-min-w-0 {\n min-width: 0px;\n}\n.mly-min-w-28 {\n min-width: 7rem;\n}\n.mly-min-w-\\[260px\\] {\n min-width: 260px;\n}\n.mly-min-w-\\[8rem\\] {\n min-width: 8rem;\n}\n.mly-max-w-12 {\n max-width: 3rem;\n}\n.mly-max-w-20 {\n max-width: 5rem;\n}\n.mly-max-w-28 {\n max-width: 7rem;\n}\n.mly-max-w-max {\n max-width: -moz-max-content;\n max-width: max-content;\n}\n.mly-max-w-xs {\n max-width: 20rem;\n}\n.mly-shrink-0 {\n flex-shrink: 0;\n}\n.mly-grow {\n flex-grow: 1;\n}\n.mly-table-fixed {\n table-layout: fixed;\n}\n.mly-border-separate {\n border-collapse: separate;\n}\n.mly-translate-x-full {\n --tw-translate-x: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.mly-transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@keyframes mly-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.mly-animate-spin {\n animation: mly-spin 1s linear infinite;\n}\n.mly-cursor-default {\n cursor: default;\n}\n.mly-cursor-grab {\n cursor: grab;\n}\n.mly-cursor-pointer {\n cursor: pointer;\n}\n.mly-select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.mly-appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.mly-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.mly-grid-cols-\\[12px_1fr\\] {\n grid-template-columns: 12px 1fr;\n}\n.mly-flex-col {\n flex-direction: column;\n}\n.mly-items-center {\n align-items: center;\n}\n.mly-items-stretch {\n align-items: stretch;\n}\n.mly-justify-start {\n justify-content: flex-start;\n}\n.mly-justify-center {\n justify-content: center;\n}\n.mly-justify-between {\n justify-content: space-between;\n}\n.mly-gap-0\\.5 {\n gap: 0.125rem;\n}\n.mly-gap-1 {\n gap: 0.25rem;\n}\n.mly-gap-1\\.5 {\n gap: 0.375rem;\n}\n.mly-gap-2 {\n gap: 0.5rem;\n}\n.mly-gap-3 {\n gap: 0.75rem;\n}\n.mly-gap-4 {\n gap: 1rem;\n}\n.mly-gap-\\[1px\\] {\n gap: 1px;\n}\n.mly-gap-\\[var\\(--variable-icon-gap\\)\\] {\n gap: var(--variable-icon-gap);\n}\n.mly-space-x-0\\.5 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.125rem * var(--tw-space-x-reverse));\n margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.mly-space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.mly-space-y-1 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));\n}\n.mly-overflow-hidden {\n overflow: hidden;\n}\n.mly-overflow-y-auto {\n overflow-y: auto;\n}\n.mly-scroll-smooth {\n scroll-behavior: smooth;\n}\n.mly-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.\\!mly-rounded {\n border-radius: 0.25rem !important;\n}\n.\\!mly-rounded-full {\n border-radius: 9999px !important;\n}\n.\\!mly-rounded-md {\n border-radius: 0.375rem !important;\n}\n.\\!mly-rounded-none {\n border-radius: 0px !important;\n}\n.mly-rounded {\n border-radius: 0.25rem;\n}\n.mly-rounded-full {\n border-radius: 9999px;\n}\n.mly-rounded-lg {\n border-radius: 0.5rem;\n}\n.mly-rounded-md {\n border-radius: 0.375rem;\n}\n.mly-rounded-none {\n border-radius: 0px;\n}\n.mly-rounded-sm {\n border-radius: 0.125rem;\n}\n.mly-rounded-xl {\n border-radius: 0.75rem;\n}\n.mly-rounded-s-lg {\n border-start-start-radius: 0.5rem;\n border-end-start-radius: 0.5rem;\n}\n.mly-rounded-s-none {\n border-start-start-radius: 0px;\n border-end-start-radius: 0px;\n}\n.mly-rounded-t-lg {\n border-top-left-radius: 0.5rem;\n border-top-right-radius: 0.5rem;\n}\n.mly-border {\n border-width: 1px;\n}\n.mly-border-0 {\n border-width: 0px;\n}\n.mly-border-2 {\n border-width: 2px;\n}\n.mly-border-\\[1\\.5px\\] {\n border-width: 1.5px;\n}\n.mly-border-b {\n border-bottom-width: 1px;\n}\n.mly-border-l-4 {\n border-left-width: 4px;\n}\n.mly-border-t {\n border-top-width: 1px;\n}\n.mly-border-none {\n border-style: none;\n}\n.mly-border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.mly-border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.mly-border-gray-700 {\n --tw-border-opacity: 1;\n border-color: rgb(55 65 81 / var(--tw-border-opacity));\n}\n.mly-border-rose-400 {\n --tw-border-opacity: 1;\n border-color: rgb(251 113 133 / var(--tw-border-opacity));\n}\n.mly-border-slate-200 {\n --tw-border-opacity: 1;\n border-color: rgb(226 232 240 / var(--tw-border-opacity));\n}\n.mly-border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.\\!mly-bg-transparent {\n background-color: transparent !important;\n}\n.mly-bg-\\[\\#efefef\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(239 239 239 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.mly-bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity));\n}\n.mly-bg-red-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 226 226 / var(--tw-bg-opacity));\n}\n.mly-bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(255 228 230 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(253 164 175 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(255 241 242 / var(--tw-bg-opacity));\n}\n.mly-bg-rose-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(244 63 94 / var(--tw-bg-opacity));\n}\n.mly-bg-soft-gray {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.mly-bg-soft-gray\\/40 {\n background-color: rgb(244 245 246 / 0.4);\n}\n.mly-bg-soft-gray\\/60 {\n background-color: rgb(244 245 246 / 0.6);\n}\n.mly-bg-transparent {\n background-color: transparent;\n}\n.mly-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.mly-bg-yellow-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity));\n}\n.mly-stroke-midnight-gray {\n stroke: #333333;\n}\n.mly-stroke-\\[1\\.2\\] {\n stroke-width: 1.2;\n}\n.mly-stroke-\\[1\\] {\n stroke-width: 1;\n}\n.mly-stroke-\\[2\\.5\\] {\n stroke-width: 2.5;\n}\n.\\!mly-p-0 {\n padding: 0px !important;\n}\n.\\!mly-p-0\\.5 {\n padding: 0.125rem !important;\n}\n.mly-p-0 {\n padding: 0px;\n}\n.mly-p-0\\.5 {\n padding: 0.125rem;\n}\n.mly-p-1 {\n padding: 0.25rem;\n}\n.mly-p-3 {\n padding: 0.75rem;\n}\n.mly-p-4 {\n padding: 1rem;\n}\n.mly-px-0\\.5 {\n padding-left: 0.125rem;\n padding-right: 0.125rem;\n}\n.mly-px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.mly-px-1\\.5 {\n padding-left: 0.375rem;\n padding-right: 0.375rem;\n}\n.mly-px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.mly-px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n.mly-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.mly-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.mly-px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n.mly-px-\\[26px\\] {\n padding-left: 26px;\n padding-right: 26px;\n}\n.mly-px-\\[32px\\] {\n padding-left: 32px;\n padding-right: 32px;\n}\n.mly-py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.mly-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.mly-py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.mly-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.mly-py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.mly-py-\\[20px\\] {\n padding-top: 20px;\n padding-bottom: 20px;\n}\n.mly-pe-8 {\n padding-inline-end: 2rem;\n}\n.mly-pl-1 {\n padding-left: 0.25rem;\n}\n.mly-pl-4 {\n padding-left: 1rem;\n}\n.mly-pl-7 {\n padding-left: 1.75rem;\n}\n.mly-pl-8 {\n padding-left: 2rem;\n}\n.mly-pl-\\[26px\\] {\n padding-left: 26px;\n}\n.mly-pr-1\\.5 {\n padding-right: 0.375rem;\n}\n.mly-pr-6 {\n padding-right: 1.5rem;\n}\n.mly-pr-7 {\n padding-right: 1.75rem;\n}\n.mly-ps-3 {\n padding-inline-start: 0.75rem;\n}\n.mly-text-left {\n text-align: left;\n}\n.mly-text-center {\n text-align: center;\n}\n.mly-font-mono {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n}\n.\\!mly-text-base {\n font-size: 1rem !important;\n line-height: 1.5rem !important;\n}\n.\\!mly-text-lg {\n font-size: 1.125rem !important;\n line-height: 1.75rem !important;\n}\n.mly-text-\\[10px\\] {\n font-size: 10px;\n}\n.mly-text-\\[13px\\] {\n font-size: 13px;\n}\n.mly-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.mly-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.mly-font-medium {\n font-weight: 500;\n}\n.mly-font-normal {\n font-weight: 400;\n}\n.mly-font-semibold {\n font-weight: 600;\n}\n.mly-uppercase {\n text-transform: uppercase;\n}\n.mly-capitalize {\n text-transform: capitalize;\n}\n.mly-tabular-nums {\n --tw-numeric-spacing: tabular-nums;\n font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);\n}\n.mly-leading-none {\n line-height: 1;\n}\n.mly-tracking-normal {\n letter-spacing: 0em;\n}\n.mly-tracking-widest {\n letter-spacing: 0.1em;\n}\n.mly-text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.mly-text-gray-50 {\n --tw-text-opacity: 1;\n color: rgb(249 250 251 / var(--tw-text-opacity));\n}\n.mly-text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.mly-text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.mly-text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.mly-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.mly-text-gray-950 {\n --tw-text-opacity: 1;\n color: rgb(3 7 18 / var(--tw-text-opacity));\n}\n.mly-text-midnight-gray {\n --tw-text-opacity: 1;\n color: rgb(51 51 51 / var(--tw-text-opacity));\n}\n.mly-text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.mly-text-red-600 {\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity));\n}\n.mly-text-rose-600 {\n --tw-text-opacity: 1;\n color: rgb(225 29 72 / var(--tw-text-opacity));\n}\n.mly-text-rose-800 {\n --tw-text-opacity: 1;\n color: rgb(159 18 57 / var(--tw-text-opacity));\n}\n.mly-text-slate-400 {\n --tw-text-opacity: 1;\n color: rgb(148 163 184 / var(--tw-text-opacity));\n}\n.mly-text-slate-500 {\n --tw-text-opacity: 1;\n color: rgb(100 116 139 / var(--tw-text-opacity));\n}\n.mly-text-slate-600 {\n --tw-text-opacity: 1;\n color: rgb(71 85 105 / var(--tw-text-opacity));\n}\n.mly-text-slate-700 {\n --tw-text-opacity: 1;\n color: rgb(51 65 85 / var(--tw-text-opacity));\n}\n.mly-no-underline {\n text-decoration-line: none;\n}\n.mly-underline-offset-4 {\n text-underline-offset: 4px;\n}\n.mly-antialiased {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.mly-opacity-60 {\n opacity: 0.6;\n}\n.mly-shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.mly-outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.mly-ring-offset-white {\n --tw-ring-offset-color: #fff;\n}\n.mly-drop-shadow-md {\n --tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.mly-transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.mly-transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.mly-transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.mly-ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n.mly-animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.mly-fade-in-0 {\n --tw-enter-opacity: 0;\n}\n.mly-zoom-in-95 {\n --tw-enter-scale: .95;\n}\n.mly-ease-out {\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-track {\n background-color: var(--scrollbar-track);\n border-radius: var(--scrollbar-track-radius);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-track:hover {\n background-color: var(--scrollbar-track-hover, var(--scrollbar-track));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-track:active {\n background-color: var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar-thumb);\n border-radius: var(--scrollbar-thumb-radius);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-thumb:hover {\n background-color: var(--scrollbar-thumb-hover, var(--scrollbar-thumb));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-thumb:active {\n background-color: var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-corner {\n background-color: var(--scrollbar-corner);\n border-radius: var(--scrollbar-corner-radius);\n}\n.mly-scrollbar-thin::-webkit-scrollbar-corner:hover {\n background-color: var(--scrollbar-corner-hover, var(--scrollbar-corner));\n}\n.mly-scrollbar-thin::-webkit-scrollbar-corner:active {\n background-color: var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)));\n}\n.mly-scrollbar-thin {\n scrollbar-width: thin;\n scrollbar-color: var(--scrollbar-thumb, initial) var(--scrollbar-track, initial);\n}\n.mly-scrollbar-thin::-webkit-scrollbar {\n display: block;\n width: 8px;\n height: 8px;\n}\n.mly-scrollbar-track-transparent {\n --scrollbar-track: transparent !important;\n}\n.mly-scrollbar-thumb-gray-200 {\n --scrollbar-thumb: #e5e7eb !important;\n}\n.\\[text-align\\:revert-layer\\] {\n text-align: revert-layer;\n}\n.file\\:mly-border-0::file-selector-button {\n border-width: 0px;\n}\n.file\\:mly-bg-transparent::file-selector-button {\n background-color: transparent;\n}\n.file\\:mly-text-sm::file-selector-button {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.file\\:mly-font-medium::file-selector-button {\n font-weight: 500;\n}\n.placeholder\\:mly-text-gray-400::-moz-placeholder {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.placeholder\\:mly-text-gray-400::placeholder {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.placeholder\\:mly-text-gray-500::-moz-placeholder {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.placeholder\\:mly-text-gray-500::placeholder {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.mly-peer:disabled ~ .peer-disabled\\:mly-opacity-50 {\n opacity: 0.5;\n}\n.data-\\[disabled\\]\\:mly-pointer-events-none[data-disabled] {\n pointer-events: none;\n}\n.data-\\[state\\=open\\]\\:mly-bg-rose-100[data-state=open] {\n --tw-bg-opacity: 1;\n background-color: rgb(255 228 230 / var(--tw-bg-opacity));\n}\n.data-\\[state\\=open\\]\\:mly-bg-soft-gray[data-state=open] {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.data-\\[state\\=true\\]\\:mly-bg-soft-gray[data-state=true] {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.data-\\[state\\=true\\]\\:mly-text-gray-900[data-state=true] {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.data-\\[disabled\\]\\:mly-opacity-50[data-disabled] {\n opacity: 0.5;\n}\n.hover\\:mly-bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-gray-100\\/80:hover {\n background-color: rgb(243 244 246 / 0.8);\n}\n.hover\\:mly-bg-red-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-red-500\\/90:hover {\n background-color: rgb(239 68 68 / 0.9);\n}\n.hover\\:mly-bg-rose-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(255 228 230 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-soft-gray:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.hover\\:mly-bg-soft-gray\\/60:hover {\n background-color: rgb(244 245 246 / 0.6);\n}\n.hover\\:mly-text-black:hover {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n.hover\\:mly-text-gray-900:hover {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.hover\\:mly-text-midnight-gray:hover {\n --tw-text-opacity: 1;\n color: rgb(51 51 51 / var(--tw-text-opacity));\n}\n.hover\\:mly-underline:hover {\n text-decoration-line: underline;\n}\n.focus\\:mly-z-10:focus {\n z-index: 10;\n}\n.focus\\:mly-bg-gray-100:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.focus\\:mly-bg-red-200:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity));\n}\n.focus\\:mly-bg-soft-gray:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.focus\\:mly-outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus\\:mly-ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:mly-ring-midnight-gray\\/50:focus {\n --tw-ring-color: rgb(51 51 51 / 0.5);\n}\n.focus-visible\\:mly-relative:focus-visible {\n position: relative;\n}\n.focus-visible\\:mly-z-10:focus-visible {\n z-index: 10;\n}\n.focus-visible\\:mly-border-gray-400:focus-visible {\n --tw-border-opacity: 1;\n border-color: rgb(156 163 175 / var(--tw-border-opacity));\n}\n.focus-visible\\:mly-outline-none:focus-visible {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus-visible\\:mly-ring-2:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus-visible\\:mly-ring-gray-400:focus-visible {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity));\n}\n.focus-visible\\:mly-ring-offset-2:focus-visible {\n --tw-ring-offset-width: 2px;\n}\n.active\\:mly-bg-soft-gray:active {\n --tw-bg-opacity: 1;\n background-color: rgb(244 245 246 / var(--tw-bg-opacity));\n}\n.disabled\\:mly-pointer-events-none:disabled {\n pointer-events: none;\n}\n.disabled\\:mly-cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n.disabled\\:mly-opacity-50:disabled {\n opacity: 0.5;\n}\n.\\[\\&_svg\\]\\:mly-pointer-events-none svg {\n pointer-events: none;\n}\n');
|
|
64
64
|
|
|
65
65
|
// src/editor/index.tsx
|
|
66
66
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
67
|
-
import { useRef as
|
|
67
|
+
import { useRef as useRef12 } from "react";
|
|
68
68
|
|
|
69
69
|
// src/editor/components/column-menu/columns-bubble-menu.tsx
|
|
70
70
|
import { BubbleMenu } from "@tiptap/react";
|
|
@@ -600,7 +600,7 @@ function VerticalAlignmentSwitch(props) {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
// src/editor/components/show-popover.tsx
|
|
603
|
-
import { Braces, Eye } from "lucide-react";
|
|
603
|
+
import { Braces as Braces3, Eye } from "lucide-react";
|
|
604
604
|
|
|
605
605
|
// src/editor/components/popover.tsx
|
|
606
606
|
import * as React3 from "react";
|
|
@@ -627,11 +627,123 @@ var PopoverContent = React3.forwardRef((_a, ref) => {
|
|
|
627
627
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
628
628
|
|
|
629
629
|
// src/editor/components/show-popover.tsx
|
|
630
|
-
import { useRef as
|
|
630
|
+
import { useRef as useRef3, useState as useState3 } from "react";
|
|
631
|
+
|
|
632
|
+
// src/editor/nodes/variable/variable-popover.tsx
|
|
633
|
+
import {
|
|
634
|
+
ArrowDownIcon,
|
|
635
|
+
ArrowUpIcon,
|
|
636
|
+
Braces,
|
|
637
|
+
CornerDownLeftIcon
|
|
638
|
+
} from "lucide-react";
|
|
639
|
+
import {
|
|
640
|
+
useImperativeHandle,
|
|
641
|
+
forwardRef as forwardRef4,
|
|
642
|
+
useState,
|
|
643
|
+
useEffect,
|
|
644
|
+
useRef
|
|
645
|
+
} from "react";
|
|
646
|
+
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
647
|
+
var VariablePopover = forwardRef4((props, ref) => {
|
|
648
|
+
const { items, onSelectItem } = props;
|
|
649
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
650
|
+
const scrollContainerRef = useRef(null);
|
|
651
|
+
const itemRefs = useRef([]);
|
|
652
|
+
const scrollSelectedIntoView = (index) => {
|
|
653
|
+
const container = scrollContainerRef.current;
|
|
654
|
+
const selectedItem = itemRefs.current[index];
|
|
655
|
+
if (!container || !selectedItem) {
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
const containerRect = container.getBoundingClientRect();
|
|
659
|
+
const itemRect = selectedItem.getBoundingClientRect();
|
|
660
|
+
const padding = 4;
|
|
661
|
+
if (itemRect.bottom > containerRect.bottom) {
|
|
662
|
+
container.scrollTop += itemRect.bottom - containerRect.bottom + padding;
|
|
663
|
+
} else if (itemRect.top < containerRect.top) {
|
|
664
|
+
container.scrollTop += itemRect.top - containerRect.top - padding;
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
useEffect(() => {
|
|
668
|
+
setSelectedIndex(0);
|
|
669
|
+
if (scrollContainerRef.current) {
|
|
670
|
+
scrollContainerRef.current.scrollTop = 0;
|
|
671
|
+
}
|
|
672
|
+
itemRefs.current = items.map(() => null);
|
|
673
|
+
}, [items]);
|
|
674
|
+
useEffect(() => {
|
|
675
|
+
scrollSelectedIntoView(selectedIndex);
|
|
676
|
+
}, [selectedIndex]);
|
|
677
|
+
useImperativeHandle(ref, () => ({
|
|
678
|
+
moveUp: () => {
|
|
679
|
+
setSelectedIndex((selectedIndex + items.length - 1) % items.length);
|
|
680
|
+
},
|
|
681
|
+
moveDown: () => {
|
|
682
|
+
setSelectedIndex((selectedIndex + 1) % items.length);
|
|
683
|
+
},
|
|
684
|
+
select: () => {
|
|
685
|
+
const item = items[selectedIndex];
|
|
686
|
+
if (!item) {
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
onSelectItem(item);
|
|
690
|
+
}
|
|
691
|
+
}));
|
|
692
|
+
return /* @__PURE__ */ jsxs2("div", { className: "mly-z-50 mly-w-64 mly-rounded-lg mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all", children: [
|
|
693
|
+
/* @__PURE__ */ jsxs2("div", { className: "mly-flex mly-items-center mly-justify-between mly-gap-2 mly-border-b mly-border-gray-200 mly-bg-soft-gray/40 mly-px-1 mly-py-1.5 mly-text-gray-500", children: [
|
|
694
|
+
/* @__PURE__ */ jsx7("span", { className: "mly-text-xs mly-uppercase", children: "Variables" }),
|
|
695
|
+
/* @__PURE__ */ jsx7(VariableIcon, { children: /* @__PURE__ */ jsx7(Braces, { className: "mly-size-3 mly-stroke-[2.5]" }) })
|
|
696
|
+
] }),
|
|
697
|
+
/* @__PURE__ */ jsx7(
|
|
698
|
+
"div",
|
|
699
|
+
{
|
|
700
|
+
ref: scrollContainerRef,
|
|
701
|
+
className: "mly-max-h-52 mly-overflow-y-auto mly-scrollbar-thin mly-scrollbar-track-transparent mly-scrollbar-thumb-gray-200",
|
|
702
|
+
children: /* @__PURE__ */ jsx7("div", { className: "mly-flex mly-flex-col mly-gap-0.5 mly-p-1", children: (items == null ? void 0 : items.length) ? items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsxs2(
|
|
703
|
+
"button",
|
|
704
|
+
{
|
|
705
|
+
ref: (el) => itemRefs.current[index] = el,
|
|
706
|
+
onClick: () => onSelectItem(item),
|
|
707
|
+
className: cn(
|
|
708
|
+
"mly-flex mly-w-full mly-items-center mly-gap-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-font-mono mly-text-sm mly-text-gray-900 hover:mly-bg-soft-gray",
|
|
709
|
+
index === selectedIndex ? "mly-bg-soft-gray" : "mly-bg-white"
|
|
710
|
+
),
|
|
711
|
+
children: [
|
|
712
|
+
/* @__PURE__ */ jsx7(Braces, { className: "mly-size-3 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
713
|
+
item.name
|
|
714
|
+
]
|
|
715
|
+
},
|
|
716
|
+
index
|
|
717
|
+
)) : /* @__PURE__ */ jsx7("div", { className: "mly-flex mly-h-7 mly-w-full mly-items-center mly-gap-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-font-mono mly-text-[13px] mly-text-gray-900 hover:mly-bg-soft-gray", children: "No result" }) })
|
|
718
|
+
}
|
|
719
|
+
),
|
|
720
|
+
/* @__PURE__ */ jsxs2("div", { className: "mly-flex mly-items-center mly-justify-between mly-gap-2 mly-border-t mly-border-gray-200 mly-px-1 mly-py-1.5 mly-text-gray-500", children: [
|
|
721
|
+
/* @__PURE__ */ jsxs2("div", { className: "mly-flex mly-items-center mly-gap-1", children: [
|
|
722
|
+
/* @__PURE__ */ jsx7(VariableIcon, { children: /* @__PURE__ */ jsx7(ArrowDownIcon, { className: "mly-size-3 mly-stroke-[2.5]" }) }),
|
|
723
|
+
/* @__PURE__ */ jsx7(VariableIcon, { children: /* @__PURE__ */ jsx7(ArrowUpIcon, { className: "mly-size-3 mly-stroke-[2.5]" }) }),
|
|
724
|
+
/* @__PURE__ */ jsx7("span", { className: "mly-text-xs mly-text-gray-500", children: "Navigate" })
|
|
725
|
+
] }),
|
|
726
|
+
/* @__PURE__ */ jsx7(VariableIcon, { children: /* @__PURE__ */ jsx7(CornerDownLeftIcon, { className: "mly-size-3 mly-stroke-[2.5]" }) })
|
|
727
|
+
] })
|
|
728
|
+
] });
|
|
729
|
+
});
|
|
730
|
+
function VariableIcon(props) {
|
|
731
|
+
const { className, children } = props;
|
|
732
|
+
return /* @__PURE__ */ jsx7(
|
|
733
|
+
"div",
|
|
734
|
+
{
|
|
735
|
+
className: cn(
|
|
736
|
+
"mly-flex mly-size-5 mly-items-center mly-justify-center mly-rounded-md mly-border",
|
|
737
|
+
className
|
|
738
|
+
),
|
|
739
|
+
children
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
}
|
|
631
743
|
|
|
632
744
|
// src/editor/utils/use-outside-click.ts
|
|
633
745
|
import { useCallback } from "react";
|
|
634
|
-
import { useEffect } from "react";
|
|
746
|
+
import { useEffect as useEffect2 } from "react";
|
|
635
747
|
function useOutsideClick(ref, callback) {
|
|
636
748
|
const handleClick = useCallback(
|
|
637
749
|
(e) => {
|
|
@@ -641,7 +753,7 @@ function useOutsideClick(ref, callback) {
|
|
|
641
753
|
},
|
|
642
754
|
[ref, callback]
|
|
643
755
|
);
|
|
644
|
-
|
|
756
|
+
useEffect2(() => {
|
|
645
757
|
document.addEventListener("mousedown", handleClick);
|
|
646
758
|
document.addEventListener("touchstart", handleClick);
|
|
647
759
|
return () => {
|
|
@@ -653,78 +765,83 @@ function useOutsideClick(ref, callback) {
|
|
|
653
765
|
|
|
654
766
|
// src/editor/components/ui/input-autocomplete.tsx
|
|
655
767
|
import { CornerDownLeft } from "lucide-react";
|
|
656
|
-
import { forwardRef as
|
|
657
|
-
import { jsx as
|
|
658
|
-
var InputAutocomplete =
|
|
768
|
+
import { forwardRef as forwardRef5, useRef as useRef2 } from "react";
|
|
769
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
770
|
+
var InputAutocomplete = forwardRef5((props, ref) => {
|
|
659
771
|
const _a = props, {
|
|
660
772
|
value = "",
|
|
661
773
|
onValueChange,
|
|
662
774
|
className,
|
|
663
775
|
onOutsideClick,
|
|
664
776
|
onSelectOption,
|
|
665
|
-
autoCompleteOptions = []
|
|
777
|
+
autoCompleteOptions = [],
|
|
778
|
+
triggerChar = ""
|
|
666
779
|
} = _a, inputProps = __objRest(_a, [
|
|
667
780
|
"value",
|
|
668
781
|
"onValueChange",
|
|
669
782
|
"className",
|
|
670
783
|
"onOutsideClick",
|
|
671
784
|
"onSelectOption",
|
|
672
|
-
"autoCompleteOptions"
|
|
785
|
+
"autoCompleteOptions",
|
|
786
|
+
"triggerChar"
|
|
673
787
|
]);
|
|
674
|
-
const containerRef =
|
|
675
|
-
const
|
|
788
|
+
const containerRef = useRef2(null);
|
|
789
|
+
const popoverRef = useRef2(null);
|
|
676
790
|
useOutsideClick(containerRef, () => {
|
|
677
791
|
onOutsideClick == null ? void 0 : onOutsideClick();
|
|
678
792
|
});
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
793
|
+
const isTriggeringVariable = value.startsWith(triggerChar);
|
|
794
|
+
return /* @__PURE__ */ jsxs3("div", { className: cn("mly-relative"), ref: containerRef, children: [
|
|
795
|
+
/* @__PURE__ */ jsxs3("label", { className: "mly-relative", children: [
|
|
796
|
+
/* @__PURE__ */ jsx8(
|
|
682
797
|
"input",
|
|
683
|
-
__spreadProps(__spreadValues({
|
|
798
|
+
__spreadProps(__spreadValues({
|
|
799
|
+
placeholder: "e.g. items",
|
|
800
|
+
type: "text"
|
|
801
|
+
}, inputProps), {
|
|
684
802
|
ref,
|
|
685
803
|
value,
|
|
686
804
|
onChange: (e) => {
|
|
687
|
-
setSelectedIndex(0);
|
|
688
805
|
onValueChange(e.target.value);
|
|
689
806
|
},
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
807
|
+
className: cn(
|
|
808
|
+
"mly-h-7 mly-w-40 mly-rounded-md mly-px-2 mly-pr-6 mly-text-sm mly-text-midnight-gray hover:mly-bg-soft-gray focus:mly-bg-soft-gray focus:mly-outline-none",
|
|
809
|
+
className
|
|
810
|
+
),
|
|
693
811
|
onKeyDown: (e) => {
|
|
812
|
+
if (!popoverRef.current || !isTriggeringVariable) {
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
const { moveUp, moveDown, select } = popoverRef.current;
|
|
694
816
|
if (e.key === "ArrowDown") {
|
|
695
817
|
e.preventDefault();
|
|
696
|
-
|
|
697
|
-
(prev) => Math.min(prev + 1, autoCompleteOptions.length - 1)
|
|
698
|
-
);
|
|
818
|
+
moveDown();
|
|
699
819
|
} else if (e.key === "ArrowUp") {
|
|
700
820
|
e.preventDefault();
|
|
701
|
-
|
|
821
|
+
moveUp();
|
|
702
822
|
} else if (e.key === "Enter") {
|
|
703
823
|
e.preventDefault();
|
|
704
|
-
|
|
705
|
-
onValueChange(_value);
|
|
706
|
-
onSelectOption == null ? void 0 : onSelectOption(_value);
|
|
824
|
+
select();
|
|
707
825
|
}
|
|
708
826
|
}
|
|
709
827
|
})
|
|
710
828
|
),
|
|
711
|
-
/* @__PURE__ */
|
|
829
|
+
/* @__PURE__ */ jsx8("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ jsx8(CornerDownLeft, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
|
|
712
830
|
] }),
|
|
713
|
-
|
|
714
|
-
|
|
831
|
+
isTriggeringVariable && /* @__PURE__ */ jsx8("div", { className: "mly-absolute mly-left-0 mly-top-8", children: /* @__PURE__ */ jsx8(
|
|
832
|
+
VariablePopover,
|
|
715
833
|
{
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
834
|
+
items: autoCompleteOptions.map((option) => {
|
|
835
|
+
return {
|
|
836
|
+
name: option
|
|
837
|
+
};
|
|
838
|
+
}),
|
|
839
|
+
onSelectItem: (item) => {
|
|
840
|
+
onSelectOption == null ? void 0 : onSelectOption(item.name);
|
|
721
841
|
},
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
},
|
|
726
|
-
option
|
|
727
|
-
)) })
|
|
842
|
+
ref: popoverRef
|
|
843
|
+
}
|
|
844
|
+
) })
|
|
728
845
|
] });
|
|
729
846
|
});
|
|
730
847
|
InputAutocomplete.displayName = "InputAutocomplete";
|
|
@@ -734,12 +851,12 @@ import { createContext, useContext } from "react";
|
|
|
734
851
|
|
|
735
852
|
// src/blocks/button.tsx
|
|
736
853
|
import { MousePointer, ArrowUpRightSquare } from "lucide-react";
|
|
737
|
-
import { jsx as
|
|
854
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
738
855
|
var button = {
|
|
739
856
|
title: "Button",
|
|
740
857
|
description: "Add a call to action button to email.",
|
|
741
858
|
searchTerms: ["link", "button", "cta"],
|
|
742
|
-
icon: /* @__PURE__ */
|
|
859
|
+
icon: /* @__PURE__ */ jsx9(MousePointer, { className: "mly-h-4 mly-w-4" }),
|
|
743
860
|
command: ({ editor, range }) => {
|
|
744
861
|
editor.chain().focus().deleteRange(range).setButton().run();
|
|
745
862
|
}
|
|
@@ -748,7 +865,7 @@ var linkCard = {
|
|
|
748
865
|
title: "Link Card",
|
|
749
866
|
description: "Add a link card to email.",
|
|
750
867
|
searchTerms: ["link", "button", "image"],
|
|
751
|
-
icon: /* @__PURE__ */
|
|
868
|
+
icon: /* @__PURE__ */ jsx9(ArrowUpRightSquare, { className: "mly-h-4 mly-w-4" }),
|
|
752
869
|
command: ({ editor, range }) => {
|
|
753
870
|
editor.chain().focus().deleteRange(range).setLinkCard().run();
|
|
754
871
|
}
|
|
@@ -756,12 +873,12 @@ var linkCard = {
|
|
|
756
873
|
|
|
757
874
|
// src/blocks/image.tsx
|
|
758
875
|
import { ImageIcon } from "lucide-react";
|
|
759
|
-
import { jsx as
|
|
876
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
760
877
|
var image = {
|
|
761
878
|
title: "Image",
|
|
762
879
|
description: "Full width image",
|
|
763
880
|
searchTerms: ["image"],
|
|
764
|
-
icon: /* @__PURE__ */
|
|
881
|
+
icon: /* @__PURE__ */ jsx10(ImageIcon, { className: "mly-h-4 mly-w-4" }),
|
|
765
882
|
command: ({ editor, range }) => {
|
|
766
883
|
editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
|
|
767
884
|
}
|
|
@@ -770,7 +887,7 @@ var logo = {
|
|
|
770
887
|
title: "Logo",
|
|
771
888
|
description: "Add your brand logo",
|
|
772
889
|
searchTerms: ["image", "logo"],
|
|
773
|
-
icon: /* @__PURE__ */
|
|
890
|
+
icon: /* @__PURE__ */ jsx10(ImageIcon, { className: "mly-h-4 mly-w-4" }),
|
|
774
891
|
command: ({ editor, range }) => {
|
|
775
892
|
editor.chain().focus().deleteRange(range).setLogoImage({ src: "" }).run();
|
|
776
893
|
}
|
|
@@ -784,12 +901,12 @@ import {
|
|
|
784
901
|
RectangleHorizontal,
|
|
785
902
|
Minus
|
|
786
903
|
} from "lucide-react";
|
|
787
|
-
import { jsx as
|
|
904
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
788
905
|
var columns = {
|
|
789
906
|
title: "Columns",
|
|
790
907
|
description: "Add columns to email.",
|
|
791
908
|
searchTerms: ["layout", "columns"],
|
|
792
|
-
icon: /* @__PURE__ */
|
|
909
|
+
icon: /* @__PURE__ */ jsx11(ColumnsIcon, { className: "mly-h-4 mly-w-4" }),
|
|
793
910
|
shouldBeHidden: (editor) => {
|
|
794
911
|
return editor.isActive("columns");
|
|
795
912
|
},
|
|
@@ -801,7 +918,7 @@ var section = {
|
|
|
801
918
|
title: "Section",
|
|
802
919
|
description: "Add a section to email.",
|
|
803
920
|
searchTerms: ["layout", "section"],
|
|
804
|
-
icon: /* @__PURE__ */
|
|
921
|
+
icon: /* @__PURE__ */ jsx11(RectangleHorizontal, { className: "mly-h-4 mly-w-4" }),
|
|
805
922
|
command: ({ editor, range }) => {
|
|
806
923
|
editor.chain().focus().deleteRange(range).setSection().run();
|
|
807
924
|
}
|
|
@@ -810,7 +927,7 @@ var forLoop = {
|
|
|
810
927
|
title: "For",
|
|
811
928
|
description: "Loop over an array of items.",
|
|
812
929
|
searchTerms: ["for", "loop"],
|
|
813
|
-
icon: /* @__PURE__ */
|
|
930
|
+
icon: /* @__PURE__ */ jsx11(Repeat2, { className: "mly-h-4 mly-w-4" }),
|
|
814
931
|
shouldBeHidden: (editor) => {
|
|
815
932
|
return editor.isActive("for");
|
|
816
933
|
},
|
|
@@ -822,7 +939,7 @@ var spacer = {
|
|
|
822
939
|
title: "Spacer",
|
|
823
940
|
description: "Add space between blocks.",
|
|
824
941
|
searchTerms: ["space", "gap", "divider"],
|
|
825
|
-
icon: /* @__PURE__ */
|
|
942
|
+
icon: /* @__PURE__ */ jsx11(MoveVertical, { className: "mly-h-4 mly-w-4" }),
|
|
826
943
|
command: ({ editor, range }) => {
|
|
827
944
|
editor.chain().focus().deleteRange(range).setSpacer({ height: "sm" }).run();
|
|
828
945
|
}
|
|
@@ -831,7 +948,7 @@ var divider = {
|
|
|
831
948
|
title: "Divider",
|
|
832
949
|
description: "Add a horizontal divider.",
|
|
833
950
|
searchTerms: ["divider", "line"],
|
|
834
|
-
icon: /* @__PURE__ */
|
|
951
|
+
icon: /* @__PURE__ */ jsx11(Minus, { className: "mly-h-4 mly-w-4" }),
|
|
835
952
|
command: ({ editor, range }) => {
|
|
836
953
|
editor.chain().focus().deleteRange(range).setHorizontalRule().run();
|
|
837
954
|
}
|
|
@@ -839,12 +956,12 @@ var divider = {
|
|
|
839
956
|
|
|
840
957
|
// src/blocks/list.tsx
|
|
841
958
|
import { List, ListOrdered } from "lucide-react";
|
|
842
|
-
import { jsx as
|
|
959
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
843
960
|
var bulletList = {
|
|
844
961
|
title: "Bullet List",
|
|
845
962
|
description: "Create a simple bullet list.",
|
|
846
963
|
searchTerms: ["unordered", "point"],
|
|
847
|
-
icon: /* @__PURE__ */
|
|
964
|
+
icon: /* @__PURE__ */ jsx12(List, { className: "mly-h-4 mly-w-4" }),
|
|
848
965
|
command: ({ editor, range }) => {
|
|
849
966
|
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
850
967
|
}
|
|
@@ -853,7 +970,7 @@ var orderedList = {
|
|
|
853
970
|
title: "Numbered List",
|
|
854
971
|
description: "Create a list with numbering.",
|
|
855
972
|
searchTerms: ["ordered"],
|
|
856
|
-
icon: /* @__PURE__ */
|
|
973
|
+
icon: /* @__PURE__ */ jsx12(ListOrdered, { className: "mly-h-4 mly-w-4" }),
|
|
857
974
|
command: ({ editor, range }) => {
|
|
858
975
|
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
859
976
|
}
|
|
@@ -870,12 +987,12 @@ import {
|
|
|
870
987
|
FootprintsIcon,
|
|
871
988
|
EraserIcon
|
|
872
989
|
} from "lucide-react";
|
|
873
|
-
import { jsx as
|
|
990
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
874
991
|
var text = {
|
|
875
992
|
title: "Text",
|
|
876
993
|
description: "Just start typing with plain text.",
|
|
877
994
|
searchTerms: ["p", "paragraph"],
|
|
878
|
-
icon: /* @__PURE__ */
|
|
995
|
+
icon: /* @__PURE__ */ jsx13(Text, { className: "mly-h-4 mly-w-4" }),
|
|
879
996
|
command: ({ editor, range }) => {
|
|
880
997
|
editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").run();
|
|
881
998
|
}
|
|
@@ -884,7 +1001,7 @@ var heading1 = {
|
|
|
884
1001
|
title: "Heading 1",
|
|
885
1002
|
description: "Big heading.",
|
|
886
1003
|
searchTerms: ["title", "big", "large"],
|
|
887
|
-
icon: /* @__PURE__ */
|
|
1004
|
+
icon: /* @__PURE__ */ jsx13(Heading1, { className: "mly-h-4 mly-w-4" }),
|
|
888
1005
|
command: ({ editor, range }) => {
|
|
889
1006
|
editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
|
|
890
1007
|
}
|
|
@@ -893,7 +1010,7 @@ var heading2 = {
|
|
|
893
1010
|
title: "Heading 2",
|
|
894
1011
|
description: "Medium heading.",
|
|
895
1012
|
searchTerms: ["subtitle", "medium"],
|
|
896
|
-
icon: /* @__PURE__ */
|
|
1013
|
+
icon: /* @__PURE__ */ jsx13(Heading2, { className: "mly-h-4 mly-w-4" }),
|
|
897
1014
|
command: ({ editor, range }) => {
|
|
898
1015
|
editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
|
|
899
1016
|
}
|
|
@@ -902,7 +1019,7 @@ var heading3 = {
|
|
|
902
1019
|
title: "Heading 3",
|
|
903
1020
|
description: "Small heading.",
|
|
904
1021
|
searchTerms: ["subtitle", "small"],
|
|
905
|
-
icon: /* @__PURE__ */
|
|
1022
|
+
icon: /* @__PURE__ */ jsx13(Heading3, { className: "mly-h-4 mly-w-4" }),
|
|
906
1023
|
command: ({ editor, range }) => {
|
|
907
1024
|
editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
|
|
908
1025
|
}
|
|
@@ -911,7 +1028,7 @@ var hardBreak = {
|
|
|
911
1028
|
title: "Hard Break",
|
|
912
1029
|
description: "Add a break between lines.",
|
|
913
1030
|
searchTerms: ["break", "line"],
|
|
914
|
-
icon: /* @__PURE__ */
|
|
1031
|
+
icon: /* @__PURE__ */ jsx13(DivideIcon, { className: "mly-h-4 mly-w-4" }),
|
|
915
1032
|
command: ({ editor, range }) => {
|
|
916
1033
|
editor.chain().focus().deleteRange(range).setHardBreak().run();
|
|
917
1034
|
}
|
|
@@ -920,7 +1037,7 @@ var blockquote = {
|
|
|
920
1037
|
title: "Blockquote",
|
|
921
1038
|
description: "Add blockquote.",
|
|
922
1039
|
searchTerms: ["quote", "blockquote"],
|
|
923
|
-
icon: /* @__PURE__ */
|
|
1040
|
+
icon: /* @__PURE__ */ jsx13(TextQuote, { className: "mly-h-4 mly-w-4" }),
|
|
924
1041
|
command: ({ editor, range }) => {
|
|
925
1042
|
editor.chain().focus().deleteRange(range).toggleBlockquote().run();
|
|
926
1043
|
}
|
|
@@ -929,7 +1046,7 @@ var footer = {
|
|
|
929
1046
|
title: "Footer",
|
|
930
1047
|
description: "Add a footer text to email.",
|
|
931
1048
|
searchTerms: ["footer", "text"],
|
|
932
|
-
icon: /* @__PURE__ */
|
|
1049
|
+
icon: /* @__PURE__ */ jsx13(FootprintsIcon, { className: "mly-h-4 mly-w-4" }),
|
|
933
1050
|
command: ({ editor, range }) => {
|
|
934
1051
|
editor.chain().focus().deleteRange(range).setFooter().run();
|
|
935
1052
|
}
|
|
@@ -938,7 +1055,7 @@ var clearLine = {
|
|
|
938
1055
|
title: "Clear Line",
|
|
939
1056
|
description: "Clear the current line.",
|
|
940
1057
|
searchTerms: ["clear", "line"],
|
|
941
|
-
icon: /* @__PURE__ */
|
|
1058
|
+
icon: /* @__PURE__ */ jsx13(EraserIcon, { className: "mly-h-4 mly-w-4" }),
|
|
942
1059
|
command: ({ editor, range }) => {
|
|
943
1060
|
editor.chain().focus().selectParentNode().deleteSelection().run();
|
|
944
1061
|
}
|
|
@@ -967,21 +1084,91 @@ var DEFAULT_SLASH_COMMANDS = [
|
|
|
967
1084
|
clearLine
|
|
968
1085
|
];
|
|
969
1086
|
|
|
1087
|
+
// src/editor/nodes/variable/variable-view.tsx
|
|
1088
|
+
import { NodeViewWrapper } from "@tiptap/react";
|
|
1089
|
+
import { AlertTriangle, Braces as Braces2, Pencil } from "lucide-react";
|
|
1090
|
+
import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1091
|
+
function VariableView(props) {
|
|
1092
|
+
const { node, updateAttributes: updateAttributes2, editor } = props;
|
|
1093
|
+
const { id, fallback, required } = node.attrs;
|
|
1094
|
+
const { renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION } = useMailyContext();
|
|
1095
|
+
return /* @__PURE__ */ jsx14(
|
|
1096
|
+
NodeViewWrapper,
|
|
1097
|
+
{
|
|
1098
|
+
className: "react-component mly-inline-block mly-leading-none",
|
|
1099
|
+
draggable: "false",
|
|
1100
|
+
children: /* @__PURE__ */ jsxs4(Popover, { children: [
|
|
1101
|
+
/* @__PURE__ */ jsx14(PopoverTrigger, { children: renderVariable({
|
|
1102
|
+
variable: { name: id, required },
|
|
1103
|
+
fallback,
|
|
1104
|
+
editor
|
|
1105
|
+
}) }),
|
|
1106
|
+
/* @__PURE__ */ jsx14(
|
|
1107
|
+
PopoverContent,
|
|
1108
|
+
{
|
|
1109
|
+
align: "start",
|
|
1110
|
+
side: "bottom",
|
|
1111
|
+
className: "mly-w-max mly-rounded-lg !mly-p-0.5",
|
|
1112
|
+
sideOffset: 8,
|
|
1113
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
1114
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
1115
|
+
children: /* @__PURE__ */ jsx14(TooltipProvider, { children: /* @__PURE__ */ jsx14("div", { className: "mly-flex mly-items-stretch mly-text-midnight-gray", children: /* @__PURE__ */ jsxs4("label", { className: "mly-relative", children: [
|
|
1116
|
+
/* @__PURE__ */ jsx14("span", { className: "mly-inline-block mly-px-2 mly-pl-1 mly-text-xs mly-text-midnight-gray", children: "Default" }),
|
|
1117
|
+
/* @__PURE__ */ jsx14(
|
|
1118
|
+
"input",
|
|
1119
|
+
{
|
|
1120
|
+
value: fallback != null ? fallback : "",
|
|
1121
|
+
onChange: (e) => {
|
|
1122
|
+
updateAttributes2({
|
|
1123
|
+
fallback: e.target.value
|
|
1124
|
+
});
|
|
1125
|
+
},
|
|
1126
|
+
placeholder: "ie. John Doe...",
|
|
1127
|
+
className: "mly-h-7 mly-w-32 mly-rounded-md mly-bg-soft-gray mly-px-2 mly-pr-6 mly-text-sm mly-text-midnight-gray focus:mly-bg-soft-gray focus:mly-outline-none"
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1130
|
+
/* @__PURE__ */ jsx14("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ jsx14(Pencil, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
|
|
1131
|
+
] }) }) })
|
|
1132
|
+
}
|
|
1133
|
+
)
|
|
1134
|
+
] })
|
|
1135
|
+
}
|
|
1136
|
+
);
|
|
1137
|
+
}
|
|
1138
|
+
var DefaultRenderVariable = (props) => {
|
|
1139
|
+
const { variable, fallback } = props;
|
|
1140
|
+
const { name, required } = variable;
|
|
1141
|
+
return /* @__PURE__ */ jsxs4(
|
|
1142
|
+
"span",
|
|
1143
|
+
{
|
|
1144
|
+
tabIndex: -1,
|
|
1145
|
+
className: "mly-inline-flex mly-items-center mly-gap-[var(--variable-icon-gap)] mly-rounded-full mly-border mly-px-1.5 mly-py-0.5 mly-leading-none",
|
|
1146
|
+
children: [
|
|
1147
|
+
/* @__PURE__ */ jsx14(Braces2, { className: "mly-size-[var(--variable-icon-size)] mly-shrink-0 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
1148
|
+
name,
|
|
1149
|
+
required && !fallback && /* @__PURE__ */ jsx14(AlertTriangle, { className: "mly-size-[var(--variable-icon-size)] mly-shrink-0 mly-stroke-[2.5]" })
|
|
1150
|
+
]
|
|
1151
|
+
}
|
|
1152
|
+
);
|
|
1153
|
+
};
|
|
1154
|
+
|
|
970
1155
|
// src/editor/provider.tsx
|
|
971
|
-
import { jsx as
|
|
1156
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
972
1157
|
var DEFAULT_VARIABLE_TRIGGER_CHAR = "@";
|
|
973
1158
|
var DEFAULT_VARIABLES = [];
|
|
1159
|
+
var DEFAULT_RENDER_VARIABLE_FUNCTION = DefaultRenderVariable;
|
|
974
1160
|
var MailyContext = createContext({
|
|
975
1161
|
variableTriggerCharacter: DEFAULT_VARIABLE_TRIGGER_CHAR,
|
|
976
1162
|
variables: DEFAULT_VARIABLES,
|
|
977
|
-
blocks: DEFAULT_SLASH_COMMANDS
|
|
1163
|
+
blocks: DEFAULT_SLASH_COMMANDS,
|
|
1164
|
+
renderVariable: DEFAULT_RENDER_VARIABLE_FUNCTION
|
|
978
1165
|
});
|
|
979
1166
|
function MailyProvider(props) {
|
|
980
1167
|
const _a = props, { children } = _a, defaultValues = __objRest(_a, ["children"]);
|
|
981
1168
|
if (defaultValues.variableTriggerCharacter === "") {
|
|
982
1169
|
throw new Error("variableTriggerCharacter cannot be an empty string");
|
|
983
1170
|
}
|
|
984
|
-
return /* @__PURE__ */
|
|
1171
|
+
return /* @__PURE__ */ jsx15(MailyContext.Provider, { value: defaultValues, children });
|
|
985
1172
|
}
|
|
986
1173
|
function useMailyContext() {
|
|
987
1174
|
const values = useContext(MailyContext);
|
|
@@ -1018,21 +1205,21 @@ You can check out the documentation for more information: https://github.com/ari
|
|
|
1018
1205
|
}
|
|
1019
1206
|
|
|
1020
1207
|
// src/editor/components/show-popover.tsx
|
|
1021
|
-
import { jsx as
|
|
1208
|
+
import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1022
1209
|
function _ShowPopover(props) {
|
|
1023
1210
|
const { showIfKey = "", onShowIfKeyValueChange, editor } = props;
|
|
1024
1211
|
const { variables = [] } = useMailyContext();
|
|
1025
|
-
const [isUpdatingKey, setIsUpdatingKey] =
|
|
1026
|
-
const inputRef =
|
|
1212
|
+
const [isUpdatingKey, setIsUpdatingKey] = useState3(false);
|
|
1213
|
+
const inputRef = useRef3(null);
|
|
1027
1214
|
const autoCompleteOptions = useMemo2(() => {
|
|
1028
1215
|
return processVariables(variables, {
|
|
1029
1216
|
query: showIfKey || "",
|
|
1030
1217
|
from: "variable",
|
|
1031
1218
|
editor
|
|
1032
|
-
}).map((variable) => variable.name)
|
|
1219
|
+
}).map((variable) => variable.name);
|
|
1033
1220
|
}, [variables, showIfKey, editor]);
|
|
1034
1221
|
const isValidWhenKey = showIfKey || autoCompleteOptions.includes(showIfKey);
|
|
1035
|
-
return /* @__PURE__ */
|
|
1222
|
+
return /* @__PURE__ */ jsxs5(
|
|
1036
1223
|
Popover,
|
|
1037
1224
|
{
|
|
1038
1225
|
onOpenChange: (open) => {
|
|
@@ -1042,17 +1229,17 @@ function _ShowPopover(props) {
|
|
|
1042
1229
|
setIsUpdatingKey(false);
|
|
1043
1230
|
},
|
|
1044
1231
|
children: [
|
|
1045
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ jsx16(
|
|
1046
1233
|
PopoverTrigger,
|
|
1047
1234
|
{
|
|
1048
1235
|
className: cn(
|
|
1049
1236
|
"mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-px-1.5 mly-text-sm data-[state=open]:mly-bg-soft-gray hover:mly-bg-soft-gray focus-visible:mly-relative focus-visible:mly-z-10 focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2",
|
|
1050
1237
|
showIfKey && "mly-bg-rose-100 mly-text-rose-800 data-[state=open]:mly-bg-rose-100 hover:mly-bg-rose-100"
|
|
1051
1238
|
),
|
|
1052
|
-
children: /* @__PURE__ */
|
|
1239
|
+
children: /* @__PURE__ */ jsx16(Eye, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" })
|
|
1053
1240
|
}
|
|
1054
1241
|
),
|
|
1055
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ jsxs5(
|
|
1056
1243
|
PopoverContent,
|
|
1057
1244
|
{
|
|
1058
1245
|
className: "mly-flex mly-w-max mly-rounded-lg !mly-p-0.5",
|
|
@@ -1066,8 +1253,8 @@ function _ShowPopover(props) {
|
|
|
1066
1253
|
e.preventDefault();
|
|
1067
1254
|
},
|
|
1068
1255
|
children: [
|
|
1069
|
-
/* @__PURE__ */
|
|
1070
|
-
!isUpdatingKey && /* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ jsx16("span", { className: "mly-flex mly-items-center mly-px-1.5 mly-text-sm mly-leading-none", children: "Show if" }),
|
|
1257
|
+
!isUpdatingKey && /* @__PURE__ */ jsxs5(
|
|
1071
1258
|
"button",
|
|
1072
1259
|
{
|
|
1073
1260
|
className: cn(
|
|
@@ -1082,12 +1269,12 @@ function _ShowPopover(props) {
|
|
|
1082
1269
|
}, 0);
|
|
1083
1270
|
},
|
|
1084
1271
|
children: [
|
|
1085
|
-
/* @__PURE__ */
|
|
1086
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ jsx16(Braces3, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
1273
|
+
/* @__PURE__ */ jsx16("span", { children: showIfKey })
|
|
1087
1274
|
]
|
|
1088
1275
|
}
|
|
1089
1276
|
),
|
|
1090
|
-
isUpdatingKey && /* @__PURE__ */
|
|
1277
|
+
isUpdatingKey && /* @__PURE__ */ jsx16(
|
|
1091
1278
|
"form",
|
|
1092
1279
|
{
|
|
1093
1280
|
onSubmit: (e) => {
|
|
@@ -1099,7 +1286,7 @@ function _ShowPopover(props) {
|
|
|
1099
1286
|
setIsUpdatingKey(false);
|
|
1100
1287
|
}
|
|
1101
1288
|
},
|
|
1102
|
-
children: /* @__PURE__ */
|
|
1289
|
+
children: /* @__PURE__ */ jsx16(
|
|
1103
1290
|
InputAutocomplete,
|
|
1104
1291
|
{
|
|
1105
1292
|
value: showIfKey || "",
|
|
@@ -1109,7 +1296,8 @@ function _ShowPopover(props) {
|
|
|
1109
1296
|
onOutsideClick: () => {
|
|
1110
1297
|
setIsUpdatingKey(false);
|
|
1111
1298
|
},
|
|
1112
|
-
onSelectOption: () => {
|
|
1299
|
+
onSelectOption: (value) => {
|
|
1300
|
+
onShowIfKeyValueChange == null ? void 0 : onShowIfKeyValueChange(value);
|
|
1113
1301
|
setIsUpdatingKey(false);
|
|
1114
1302
|
},
|
|
1115
1303
|
autoCompleteOptions,
|
|
@@ -1129,7 +1317,7 @@ var ShowPopover = memo(_ShowPopover);
|
|
|
1129
1317
|
|
|
1130
1318
|
// src/editor/components/column-menu/columns-width-config.tsx
|
|
1131
1319
|
import { Columns2, SlidersVertical, Columns3 } from "lucide-react";
|
|
1132
|
-
import { jsx as
|
|
1320
|
+
import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1133
1321
|
function ColumnsWidthConfig(props) {
|
|
1134
1322
|
const {
|
|
1135
1323
|
columnsCount = 2,
|
|
@@ -1137,9 +1325,9 @@ function ColumnsWidthConfig(props) {
|
|
|
1137
1325
|
columnWidths,
|
|
1138
1326
|
onColumnWidthChange
|
|
1139
1327
|
} = props;
|
|
1140
|
-
return /* @__PURE__ */
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ jsxs6(Popover, { children: [
|
|
1329
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { className: "mly-flex mly-size-7 mly-items-center mly-justify-center mly-gap-1 mly-rounded-md mly-text-sm data-[state=open]:mly-bg-soft-gray hover:mly-bg-soft-gray", children: /* @__PURE__ */ jsx17(SlidersVertical, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5]" }) }),
|
|
1330
|
+
/* @__PURE__ */ jsxs6(
|
|
1143
1331
|
PopoverContent,
|
|
1144
1332
|
{
|
|
1145
1333
|
className: "mly-w-[300px] mly-rounded-lg !mly-p-0.5",
|
|
@@ -1153,32 +1341,32 @@ function ColumnsWidthConfig(props) {
|
|
|
1153
1341
|
e.preventDefault();
|
|
1154
1342
|
},
|
|
1155
1343
|
children: [
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
1344
|
+
/* @__PURE__ */ jsxs6("div", { className: "mly-grid mly-grid-cols-2 mly-gap-1", children: [
|
|
1345
|
+
/* @__PURE__ */ jsxs6(
|
|
1158
1346
|
SwitchButton,
|
|
1159
1347
|
{
|
|
1160
1348
|
onClick: () => onColumnsCountChange(2),
|
|
1161
1349
|
isActive: columnsCount === 2,
|
|
1162
1350
|
children: [
|
|
1163
|
-
/* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ jsx17(Columns2, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" }),
|
|
1352
|
+
/* @__PURE__ */ jsx17("span", { children: "2 Columns" })
|
|
1165
1353
|
]
|
|
1166
1354
|
}
|
|
1167
1355
|
),
|
|
1168
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ jsxs6(
|
|
1169
1357
|
SwitchButton,
|
|
1170
1358
|
{
|
|
1171
1359
|
onClick: () => onColumnsCountChange(3),
|
|
1172
1360
|
isActive: columnsCount === 3,
|
|
1173
1361
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
/* @__PURE__ */
|
|
1362
|
+
/* @__PURE__ */ jsx17(Columns3, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" }),
|
|
1363
|
+
/* @__PURE__ */ jsx17("span", { children: "3 Columns" })
|
|
1176
1364
|
]
|
|
1177
1365
|
}
|
|
1178
1366
|
)
|
|
1179
1367
|
] }),
|
|
1180
|
-
/* @__PURE__ */
|
|
1181
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ jsx17("hr", { className: "mly-my-0.5 mly-border-gray-200" }),
|
|
1369
|
+
/* @__PURE__ */ jsx17(
|
|
1182
1370
|
"div",
|
|
1183
1371
|
{
|
|
1184
1372
|
className: "mly-grid mly-gap-1 mly-p-1",
|
|
@@ -1186,10 +1374,10 @@ function ColumnsWidthConfig(props) {
|
|
|
1186
1374
|
children: Array.from({ length: columnsCount }).map((_, index) => {
|
|
1187
1375
|
const value = columnWidths[index] === "auto" ? "" : columnWidths[index];
|
|
1188
1376
|
const label = columnsCount === 2 ? index === 0 ? "Left" : "Right" : index === 0 ? "Left" : index === 1 ? "Middle" : "Right";
|
|
1189
|
-
return /* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */
|
|
1192
|
-
/* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ jsxs6("div", { className: "mly-flex mly-flex-col mly-gap-1", children: [
|
|
1378
|
+
/* @__PURE__ */ jsx17("span", { className: "mly-text-xs mly-text-gray-400", children: label }),
|
|
1379
|
+
/* @__PURE__ */ jsxs6("label", { className: "mly-relative", children: [
|
|
1380
|
+
/* @__PURE__ */ jsx17(
|
|
1193
1381
|
"input",
|
|
1194
1382
|
{
|
|
1195
1383
|
placeholder: "auto",
|
|
@@ -1204,7 +1392,7 @@ function ColumnsWidthConfig(props) {
|
|
|
1204
1392
|
}
|
|
1205
1393
|
}
|
|
1206
1394
|
),
|
|
1207
|
-
/* @__PURE__ */
|
|
1395
|
+
/* @__PURE__ */ jsx17("span", { className: "mly-absolute mly-inset-y-0 mly-right-0 mly-flex mly-aspect-square mly-items-center mly-justify-center mly-text-xs mly-tabular-nums mly-text-gray-500", children: "%" })
|
|
1208
1396
|
] })
|
|
1209
1397
|
] }, index);
|
|
1210
1398
|
})
|
|
@@ -1217,7 +1405,7 @@ function ColumnsWidthConfig(props) {
|
|
|
1217
1405
|
}
|
|
1218
1406
|
function SwitchButton(props) {
|
|
1219
1407
|
const { onClick, isActive = false, children } = props;
|
|
1220
|
-
return /* @__PURE__ */
|
|
1408
|
+
return /* @__PURE__ */ jsx17(
|
|
1221
1409
|
"button",
|
|
1222
1410
|
{
|
|
1223
1411
|
className: cn(
|
|
@@ -1233,7 +1421,7 @@ function SwitchButton(props) {
|
|
|
1233
1421
|
// src/editor/components/ui/select.tsx
|
|
1234
1422
|
import { useId } from "react";
|
|
1235
1423
|
import { ChevronDownIcon } from "lucide-react";
|
|
1236
|
-
import { jsx as
|
|
1424
|
+
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1237
1425
|
function Select(props) {
|
|
1238
1426
|
const {
|
|
1239
1427
|
label,
|
|
@@ -1246,10 +1434,10 @@ function Select(props) {
|
|
|
1246
1434
|
iconClassName
|
|
1247
1435
|
} = props;
|
|
1248
1436
|
const selectId = `mly${useId()}`;
|
|
1249
|
-
const content = /* @__PURE__ */
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
Icon && /* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */
|
|
1437
|
+
const content = /* @__PURE__ */ jsxs7("div", { className: "relative", children: [
|
|
1438
|
+
/* @__PURE__ */ jsx18("label", { htmlFor: selectId, className: "sr-only", children: label }),
|
|
1439
|
+
Icon && /* @__PURE__ */ jsx18("div", { className: "mly-pointer-events-none mly-absolute mly-inset-y-0 mly-left-2 mly-z-20 mly-flex mly-items-center", children: /* @__PURE__ */ jsx18(Icon, { className: cn("mly-size-3", iconClassName) }) }),
|
|
1440
|
+
/* @__PURE__ */ jsx18(
|
|
1253
1441
|
"select",
|
|
1254
1442
|
{
|
|
1255
1443
|
id: selectId,
|
|
@@ -1260,10 +1448,10 @@ function Select(props) {
|
|
|
1260
1448
|
),
|
|
1261
1449
|
value,
|
|
1262
1450
|
onChange: (event) => onValueChange(event.target.value),
|
|
1263
|
-
children: options.map((option) => /* @__PURE__ */
|
|
1451
|
+
children: options.map((option) => /* @__PURE__ */ jsx18("option", { value: option.value, children: option.label }, option.value))
|
|
1264
1452
|
}
|
|
1265
1453
|
),
|
|
1266
|
-
/* @__PURE__ */
|
|
1454
|
+
/* @__PURE__ */ jsx18("span", { className: "mly-pointer-events-none mly-absolute mly-inset-y-0 mly-right-0 mly-z-10 mly-flex mly-h-full mly-w-7 mly-items-center mly-justify-center mly-text-gray-600 peer-disabled:mly-opacity-50", children: /* @__PURE__ */ jsx18(
|
|
1267
1455
|
ChevronDownIcon,
|
|
1268
1456
|
{
|
|
1269
1457
|
size: 16,
|
|
@@ -1276,9 +1464,9 @@ function Select(props) {
|
|
|
1276
1464
|
if (!tooltip) {
|
|
1277
1465
|
return content;
|
|
1278
1466
|
}
|
|
1279
|
-
return /* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1281
|
-
/* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ jsxs7(Tooltip, { children: [
|
|
1468
|
+
/* @__PURE__ */ jsx18(TooltipTrigger, { asChild: true, children: content }),
|
|
1469
|
+
/* @__PURE__ */ jsx18(TooltipContent, { sideOffset: 8, children: tooltip })
|
|
1282
1470
|
] });
|
|
1283
1471
|
}
|
|
1284
1472
|
|
|
@@ -1303,7 +1491,7 @@ function deleteNode(editor, nodeType) {
|
|
|
1303
1491
|
}
|
|
1304
1492
|
|
|
1305
1493
|
// src/editor/components/column-menu/columns-bubble-menu-content.tsx
|
|
1306
|
-
import { Fragment as Fragment2, jsx as
|
|
1494
|
+
import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1307
1495
|
function ColumnsBubbleMenuContent(props) {
|
|
1308
1496
|
const { editor } = props;
|
|
1309
1497
|
if (!editor) {
|
|
@@ -1311,9 +1499,9 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
1311
1499
|
}
|
|
1312
1500
|
const state = useColumnsState(editor);
|
|
1313
1501
|
const currentColumnCount = state.columnsCount;
|
|
1314
|
-
return /* @__PURE__ */
|
|
1315
|
-
state.isColumnActive && /* @__PURE__ */
|
|
1316
|
-
/* @__PURE__ */
|
|
1502
|
+
return /* @__PURE__ */ jsx19(TooltipProvider, { children: /* @__PURE__ */ jsxs8("div", { className: "mly-flex mly-items-stretch", children: [
|
|
1503
|
+
state.isColumnActive && /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
1504
|
+
/* @__PURE__ */ jsx19(
|
|
1317
1505
|
ColumnsWidthConfig,
|
|
1318
1506
|
{
|
|
1319
1507
|
columnsCount: currentColumnCount,
|
|
@@ -1330,9 +1518,9 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
1330
1518
|
}
|
|
1331
1519
|
}
|
|
1332
1520
|
),
|
|
1333
|
-
/* @__PURE__ */
|
|
1521
|
+
/* @__PURE__ */ jsx19(Divider, {})
|
|
1334
1522
|
] }),
|
|
1335
|
-
/* @__PURE__ */
|
|
1523
|
+
/* @__PURE__ */ jsx19(
|
|
1336
1524
|
VerticalAlignmentSwitch,
|
|
1337
1525
|
{
|
|
1338
1526
|
alignment: state.currentVerticalAlignment,
|
|
@@ -1343,8 +1531,8 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
1343
1531
|
}
|
|
1344
1532
|
}
|
|
1345
1533
|
),
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1534
|
+
/* @__PURE__ */ jsx19(Divider, {}),
|
|
1535
|
+
/* @__PURE__ */ jsx19(
|
|
1348
1536
|
Select,
|
|
1349
1537
|
{
|
|
1350
1538
|
icon: Space,
|
|
@@ -1365,8 +1553,8 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
1365
1553
|
tooltip: "Columns Gap"
|
|
1366
1554
|
}
|
|
1367
1555
|
),
|
|
1368
|
-
/* @__PURE__ */
|
|
1369
|
-
/* @__PURE__ */
|
|
1556
|
+
/* @__PURE__ */ jsx19(Divider, {}),
|
|
1557
|
+
/* @__PURE__ */ jsx19(
|
|
1370
1558
|
BubbleMenuButton,
|
|
1371
1559
|
{
|
|
1372
1560
|
icon: Trash,
|
|
@@ -1376,8 +1564,8 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
1376
1564
|
}
|
|
1377
1565
|
}
|
|
1378
1566
|
),
|
|
1379
|
-
/* @__PURE__ */
|
|
1380
|
-
/* @__PURE__ */
|
|
1567
|
+
/* @__PURE__ */ jsx19(Divider, {}),
|
|
1568
|
+
/* @__PURE__ */ jsx19(
|
|
1381
1569
|
ShowPopover,
|
|
1382
1570
|
{
|
|
1383
1571
|
showIfKey: state.currentShowIfKey,
|
|
@@ -1393,7 +1581,7 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
1393
1581
|
}
|
|
1394
1582
|
|
|
1395
1583
|
// src/editor/components/column-menu/columns-bubble-menu.tsx
|
|
1396
|
-
import { jsx as
|
|
1584
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1397
1585
|
function ColumnsBubbleMenu(props) {
|
|
1398
1586
|
const { appendTo, editor } = props;
|
|
1399
1587
|
if (!editor) {
|
|
@@ -1424,26 +1612,26 @@ function ColumnsBubbleMenu(props) {
|
|
|
1424
1612
|
},
|
|
1425
1613
|
pluginKey: "columnsBubbleMenu"
|
|
1426
1614
|
});
|
|
1427
|
-
return /* @__PURE__ */
|
|
1615
|
+
return /* @__PURE__ */ jsx20(
|
|
1428
1616
|
BubbleMenu,
|
|
1429
1617
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
1430
1618
|
className: "mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
1431
|
-
children: /* @__PURE__ */
|
|
1619
|
+
children: /* @__PURE__ */ jsx20(ColumnsBubbleMenuContent, { editor })
|
|
1432
1620
|
})
|
|
1433
1621
|
);
|
|
1434
1622
|
}
|
|
1435
1623
|
|
|
1436
1624
|
// src/editor/components/content-menu.tsx
|
|
1437
|
-
import { useCallback as useCallback3, useEffect as
|
|
1625
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useState as useState5 } from "react";
|
|
1438
1626
|
import { Copy, GripVertical, Plus, Trash2 } from "lucide-react";
|
|
1439
1627
|
|
|
1440
1628
|
// src/editor/components/drag-handle.tsx
|
|
1441
|
-
import { useState as
|
|
1629
|
+
import { useState as useState4, useRef as useRef4, useEffect as useEffect3 } from "react";
|
|
1442
1630
|
import {
|
|
1443
1631
|
DragHandlePlugin,
|
|
1444
1632
|
dragHandlePluginDefaultKey
|
|
1445
1633
|
} from "echo-drag-handle-plugin";
|
|
1446
|
-
import { jsx as
|
|
1634
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1447
1635
|
function DragHandle(props) {
|
|
1448
1636
|
const {
|
|
1449
1637
|
className = "drag-handle",
|
|
@@ -1453,9 +1641,9 @@ function DragHandle(props) {
|
|
|
1453
1641
|
onNodeChange,
|
|
1454
1642
|
tippyOptions = {}
|
|
1455
1643
|
} = props;
|
|
1456
|
-
const [element, setElement] =
|
|
1457
|
-
const pluginRef =
|
|
1458
|
-
|
|
1644
|
+
const [element, setElement] = useState4(null);
|
|
1645
|
+
const pluginRef = useRef4(null);
|
|
1646
|
+
useEffect3(() => {
|
|
1459
1647
|
if (!element) {
|
|
1460
1648
|
return () => {
|
|
1461
1649
|
pluginRef.current = null;
|
|
@@ -1481,16 +1669,16 @@ function DragHandle(props) {
|
|
|
1481
1669
|
pluginRef.current = null;
|
|
1482
1670
|
};
|
|
1483
1671
|
}, [element, editor, onNodeChange, pluginKey]);
|
|
1484
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ jsx21("div", { className, ref: setElement, children });
|
|
1485
1673
|
}
|
|
1486
1674
|
|
|
1487
1675
|
// src/editor/components/content-menu.tsx
|
|
1488
|
-
import { jsx as
|
|
1676
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1489
1677
|
function ContentMenu(props) {
|
|
1490
1678
|
const { editor } = props;
|
|
1491
|
-
const [menuOpen, setMenuOpen] =
|
|
1492
|
-
const [currentNode, setCurrentNode] =
|
|
1493
|
-
const [currentNodePos, setCurrentNodePos] =
|
|
1679
|
+
const [menuOpen, setMenuOpen] = useState5(false);
|
|
1680
|
+
const [currentNode, setCurrentNode] = useState5(null);
|
|
1681
|
+
const [currentNodePos, setCurrentNodePos] = useState5(-1);
|
|
1494
1682
|
const handleNodeChange = useCallback3(
|
|
1495
1683
|
(data) => {
|
|
1496
1684
|
if (data.node) {
|
|
@@ -1539,7 +1727,7 @@ function ContentMenu(props) {
|
|
|
1539
1727
|
}).focus(focusPos).run();
|
|
1540
1728
|
}
|
|
1541
1729
|
}
|
|
1542
|
-
|
|
1730
|
+
useEffect4(() => {
|
|
1543
1731
|
if (menuOpen) {
|
|
1544
1732
|
editor.commands.setMeta("lockDragHandle", true);
|
|
1545
1733
|
} else {
|
|
@@ -1549,7 +1737,7 @@ function ContentMenu(props) {
|
|
|
1549
1737
|
editor.commands.setMeta("lockDragHandle", false);
|
|
1550
1738
|
};
|
|
1551
1739
|
}, [editor, menuOpen]);
|
|
1552
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ jsx22(
|
|
1553
1741
|
DragHandle,
|
|
1554
1742
|
{
|
|
1555
1743
|
pluginKey: "ContentMenu",
|
|
@@ -1559,9 +1747,9 @@ function ContentMenu(props) {
|
|
|
1559
1747
|
zIndex: 99
|
|
1560
1748
|
},
|
|
1561
1749
|
onNodeChange: handleNodeChange,
|
|
1562
|
-
children: /* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
1564
|
-
/* @__PURE__ */
|
|
1750
|
+
children: /* @__PURE__ */ jsx22(TooltipProvider, { children: /* @__PURE__ */ jsxs9("div", { className: "mly-flex mly-items-center mly-pr-1.5", children: [
|
|
1751
|
+
/* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
1752
|
+
/* @__PURE__ */ jsx22(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx22(
|
|
1565
1753
|
BaseButton,
|
|
1566
1754
|
{
|
|
1567
1755
|
variant: "ghost",
|
|
@@ -1569,15 +1757,15 @@ function ContentMenu(props) {
|
|
|
1569
1757
|
className: "!mly-size-5 mly-cursor-grab mly-text-gray-500 hover:mly-text-black",
|
|
1570
1758
|
onClick: handleAddNewNode,
|
|
1571
1759
|
type: "button",
|
|
1572
|
-
children: /* @__PURE__ */
|
|
1760
|
+
children: /* @__PURE__ */ jsx22(Plus, { className: "mly-size-3.5 mly-shrink-0" })
|
|
1573
1761
|
}
|
|
1574
1762
|
) }),
|
|
1575
|
-
/* @__PURE__ */
|
|
1763
|
+
/* @__PURE__ */ jsx22(TooltipContent, { sideOffset: 8, children: "Add new node" })
|
|
1576
1764
|
] }),
|
|
1577
|
-
/* @__PURE__ */
|
|
1578
|
-
/* @__PURE__ */
|
|
1579
|
-
/* @__PURE__ */
|
|
1580
|
-
/* @__PURE__ */
|
|
1765
|
+
/* @__PURE__ */ jsxs9(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
1766
|
+
/* @__PURE__ */ jsxs9("div", { className: "mly-relative mly-flex mly-flex-col", children: [
|
|
1767
|
+
/* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
1768
|
+
/* @__PURE__ */ jsx22(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx22(
|
|
1581
1769
|
BaseButton,
|
|
1582
1770
|
{
|
|
1583
1771
|
variant: "ghost",
|
|
@@ -1589,14 +1777,14 @@ function ContentMenu(props) {
|
|
|
1589
1777
|
editor.commands.setNodeSelection(currentNodePos);
|
|
1590
1778
|
},
|
|
1591
1779
|
type: "button",
|
|
1592
|
-
children: /* @__PURE__ */
|
|
1780
|
+
children: /* @__PURE__ */ jsx22(GripVertical, { className: "mly-size-3.5 mly-shrink-0" })
|
|
1593
1781
|
}
|
|
1594
1782
|
) }),
|
|
1595
|
-
/* @__PURE__ */
|
|
1783
|
+
/* @__PURE__ */ jsx22(TooltipContent, { sideOffset: 8, children: "Node actions" })
|
|
1596
1784
|
] }),
|
|
1597
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ jsx22(PopoverTrigger, { className: "mly-absolute mly-left-0 mly-top-0 mly-z-0 mly-h-5 mly-w-5" })
|
|
1598
1786
|
] }),
|
|
1599
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ jsxs9(
|
|
1600
1788
|
PopoverContent,
|
|
1601
1789
|
{
|
|
1602
1790
|
align: "start",
|
|
@@ -1604,26 +1792,26 @@ function ContentMenu(props) {
|
|
|
1604
1792
|
sideOffset: 8,
|
|
1605
1793
|
className: "mly-flex mly-w-max mly-flex-col mly-rounded-md mly-p-1",
|
|
1606
1794
|
children: [
|
|
1607
|
-
/* @__PURE__ */
|
|
1795
|
+
/* @__PURE__ */ jsxs9(
|
|
1608
1796
|
BaseButton,
|
|
1609
1797
|
{
|
|
1610
1798
|
variant: "ghost",
|
|
1611
1799
|
onClick: duplicateNode,
|
|
1612
1800
|
className: "mly-h-auto mly-justify-start mly-gap-2 !mly-rounded mly-px-2 mly-py-1 mly-text-sm mly-font-normal",
|
|
1613
1801
|
children: [
|
|
1614
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ jsx22(Copy, { className: "mly-size-[15px] mly-shrink-0" }),
|
|
1615
1803
|
"Duplicate"
|
|
1616
1804
|
]
|
|
1617
1805
|
}
|
|
1618
1806
|
),
|
|
1619
|
-
/* @__PURE__ */
|
|
1620
|
-
/* @__PURE__ */
|
|
1807
|
+
/* @__PURE__ */ jsx22(Divider, { type: "horizontal" }),
|
|
1808
|
+
/* @__PURE__ */ jsxs9(
|
|
1621
1809
|
BaseButton,
|
|
1622
1810
|
{
|
|
1623
1811
|
onClick: deleteCurrentNode,
|
|
1624
1812
|
className: "mly-h-auto mly-justify-start mly-gap-2 !mly-rounded mly-bg-red-100 mly-px-2 mly-py-1 mly-text-sm mly-font-normal mly-text-red-600 hover:mly-bg-red-200 focus:mly-bg-red-200",
|
|
1625
1813
|
children: [
|
|
1626
|
-
/* @__PURE__ */
|
|
1814
|
+
/* @__PURE__ */ jsx22(Trash2, { className: "mly-size-[15px] mly-shrink-0" }),
|
|
1627
1815
|
"Delete"
|
|
1628
1816
|
]
|
|
1629
1817
|
}
|
|
@@ -1651,7 +1839,7 @@ import {
|
|
|
1651
1839
|
StrikethroughIcon,
|
|
1652
1840
|
UnderlineIcon
|
|
1653
1841
|
} from "lucide-react";
|
|
1654
|
-
import { jsx as
|
|
1842
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1655
1843
|
var EditorMenuBar = (props) => {
|
|
1656
1844
|
const { editor, config } = props;
|
|
1657
1845
|
const items = useMemo3(
|
|
@@ -1750,15 +1938,15 @@ var EditorMenuBar = (props) => {
|
|
|
1750
1938
|
if (!editor) {
|
|
1751
1939
|
return null;
|
|
1752
1940
|
}
|
|
1753
|
-
return /* @__PURE__ */
|
|
1941
|
+
return /* @__PURE__ */ jsx23(
|
|
1754
1942
|
"div",
|
|
1755
1943
|
{
|
|
1756
1944
|
className: `mly-flex mly-items-center mly-gap-3 ${config == null ? void 0 : config.toolbarClassName}`,
|
|
1757
|
-
children: groups.map((group, index) => /* @__PURE__ */
|
|
1945
|
+
children: groups.map((group, index) => /* @__PURE__ */ jsx23(
|
|
1758
1946
|
"div",
|
|
1759
1947
|
{
|
|
1760
1948
|
className: "mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-border mly-bg-white mly-p-1",
|
|
1761
|
-
children: items.filter((item) => item.group === group).map((item, index2) => /* @__PURE__ */
|
|
1949
|
+
children: items.filter((item) => item.group === group).map((item, index2) => /* @__PURE__ */ jsx23(BubbleMenuButton, __spreadValues({}, item), index2))
|
|
1762
1950
|
},
|
|
1763
1951
|
index
|
|
1764
1952
|
))
|
|
@@ -1768,8 +1956,8 @@ var EditorMenuBar = (props) => {
|
|
|
1768
1956
|
|
|
1769
1957
|
// src/editor/components/for-menu/for-bubble-menu.tsx
|
|
1770
1958
|
import { BubbleMenu as BubbleMenu2, findChildren } from "@tiptap/react";
|
|
1771
|
-
import { Braces as
|
|
1772
|
-
import { useCallback as useCallback4, useMemo as useMemo4, useRef as
|
|
1959
|
+
import { Braces as Braces4 } from "lucide-react";
|
|
1960
|
+
import { useCallback as useCallback4, useMemo as useMemo4, useRef as useRef5, useState as useState6 } from "react";
|
|
1773
1961
|
import { sticky as sticky2 } from "tippy.js";
|
|
1774
1962
|
|
|
1775
1963
|
// src/editor/components/for-menu/use-for-state.ts
|
|
@@ -1792,7 +1980,7 @@ var useForState = (editor) => {
|
|
|
1792
1980
|
};
|
|
1793
1981
|
|
|
1794
1982
|
// src/editor/components/for-menu/for-bubble-menu.tsx
|
|
1795
|
-
import { jsx as
|
|
1983
|
+
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1796
1984
|
function ForBubbleMenu(props) {
|
|
1797
1985
|
const { appendTo, editor } = props;
|
|
1798
1986
|
if (!editor) {
|
|
@@ -1831,24 +2019,24 @@ function ForBubbleMenu(props) {
|
|
|
1831
2019
|
pluginKey: "forBubbleMenu"
|
|
1832
2020
|
});
|
|
1833
2021
|
const { variables = [] } = useMailyContext();
|
|
1834
|
-
const inputRef =
|
|
1835
|
-
const [isUpdatingKey, setIsUpdatingKey] =
|
|
2022
|
+
const inputRef = useRef5(null);
|
|
2023
|
+
const [isUpdatingKey, setIsUpdatingKey] = useState6(false);
|
|
1836
2024
|
const eachKey = (state == null ? void 0 : state.each) || "";
|
|
1837
2025
|
const autoCompleteOptions = useMemo4(() => {
|
|
1838
2026
|
return processVariables(variables, {
|
|
1839
2027
|
query: eachKey || "",
|
|
1840
2028
|
editor,
|
|
1841
2029
|
from: "for"
|
|
1842
|
-
}).map((variable) => variable.name)
|
|
2030
|
+
}).map((variable) => variable.name);
|
|
1843
2031
|
}, [variables, eachKey, editor]);
|
|
1844
2032
|
const isValidEachKey = eachKey || autoCompleteOptions.includes(eachKey);
|
|
1845
|
-
return /* @__PURE__ */
|
|
2033
|
+
return /* @__PURE__ */ jsx24(
|
|
1846
2034
|
BubbleMenu2,
|
|
1847
2035
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
1848
2036
|
className: "mly-flex mly-items-stretch mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
1849
|
-
children: /* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
!isUpdatingKey && /* @__PURE__ */
|
|
2037
|
+
children: /* @__PURE__ */ jsxs10(TooltipProvider, { children: [
|
|
2038
|
+
/* @__PURE__ */ jsx24("span", { className: "mly-flex mly-items-center mly-px-1.5 mly-text-sm mly-leading-none", children: "For" }),
|
|
2039
|
+
!isUpdatingKey && /* @__PURE__ */ jsxs10(
|
|
1852
2040
|
"button",
|
|
1853
2041
|
{
|
|
1854
2042
|
className: cn(
|
|
@@ -1863,12 +2051,12 @@ function ForBubbleMenu(props) {
|
|
|
1863
2051
|
}, 0);
|
|
1864
2052
|
},
|
|
1865
2053
|
children: [
|
|
1866
|
-
/* @__PURE__ */
|
|
1867
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ jsx24(Braces4, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
2055
|
+
/* @__PURE__ */ jsx24("span", { className: "mly-min-w-0 mly-truncate mly-text-left", children: state == null ? void 0 : state.each })
|
|
1868
2056
|
]
|
|
1869
2057
|
}
|
|
1870
2058
|
),
|
|
1871
|
-
isUpdatingKey && /* @__PURE__ */
|
|
2059
|
+
isUpdatingKey && /* @__PURE__ */ jsx24(
|
|
1872
2060
|
"form",
|
|
1873
2061
|
{
|
|
1874
2062
|
onSubmit: (e) => {
|
|
@@ -1880,7 +2068,7 @@ function ForBubbleMenu(props) {
|
|
|
1880
2068
|
setIsUpdatingKey(false);
|
|
1881
2069
|
}
|
|
1882
2070
|
},
|
|
1883
|
-
children: /* @__PURE__ */
|
|
2071
|
+
children: /* @__PURE__ */ jsx24(
|
|
1884
2072
|
InputAutocomplete,
|
|
1885
2073
|
{
|
|
1886
2074
|
value: (state == null ? void 0 : state.each) || "",
|
|
@@ -1892,7 +2080,10 @@ function ForBubbleMenu(props) {
|
|
|
1892
2080
|
onOutsideClick: () => {
|
|
1893
2081
|
setIsUpdatingKey(false);
|
|
1894
2082
|
},
|
|
1895
|
-
onSelectOption: () => {
|
|
2083
|
+
onSelectOption: (value) => {
|
|
2084
|
+
editor.commands.updateFor({
|
|
2085
|
+
each: value
|
|
2086
|
+
});
|
|
1896
2087
|
setIsUpdatingKey(false);
|
|
1897
2088
|
},
|
|
1898
2089
|
autoCompleteOptions,
|
|
@@ -1901,8 +2092,8 @@ function ForBubbleMenu(props) {
|
|
|
1901
2092
|
)
|
|
1902
2093
|
}
|
|
1903
2094
|
),
|
|
1904
|
-
/* @__PURE__ */
|
|
1905
|
-
/* @__PURE__ */
|
|
2095
|
+
/* @__PURE__ */ jsx24(Divider, {}),
|
|
2096
|
+
/* @__PURE__ */ jsx24(
|
|
1906
2097
|
ShowPopover,
|
|
1907
2098
|
{
|
|
1908
2099
|
showIfKey: state.currentShowIfKey,
|
|
@@ -1925,7 +2116,7 @@ import { ImageDown } from "lucide-react";
|
|
|
1925
2116
|
|
|
1926
2117
|
// src/editor/components/alignment-switch.tsx
|
|
1927
2118
|
import { AlignCenter as AlignCenter2, AlignLeft as AlignLeft2, AlignRight as AlignRight2 } from "lucide-react";
|
|
1928
|
-
import { jsx as
|
|
2119
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1929
2120
|
function AlignmentSwitch(props) {
|
|
1930
2121
|
const { alignment = "left", onAlignmentChange } = props;
|
|
1931
2122
|
const activeAlignment = {
|
|
@@ -1951,7 +2142,7 @@ function AlignmentSwitch(props) {
|
|
|
1951
2142
|
}
|
|
1952
2143
|
}
|
|
1953
2144
|
}[alignment];
|
|
1954
|
-
return /* @__PURE__ */
|
|
2145
|
+
return /* @__PURE__ */ jsx25(
|
|
1955
2146
|
BubbleMenuButton,
|
|
1956
2147
|
{
|
|
1957
2148
|
icon: activeAlignment.icon,
|
|
@@ -1963,24 +2154,49 @@ function AlignmentSwitch(props) {
|
|
|
1963
2154
|
|
|
1964
2155
|
// src/editor/components/ui/link-input-popover.tsx
|
|
1965
2156
|
import {
|
|
2157
|
+
BracesIcon,
|
|
1966
2158
|
ChevronDownIcon as ChevronDownIcon2,
|
|
1967
|
-
CornerDownLeft as CornerDownLeft3,
|
|
1968
2159
|
Link
|
|
1969
2160
|
} from "lucide-react";
|
|
1970
|
-
import { useRef as
|
|
1971
|
-
import {
|
|
2161
|
+
import { useRef as useRef6, useState as useState7 } from "react";
|
|
2162
|
+
import { useMemo as useMemo5 } from "react";
|
|
2163
|
+
import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2164
|
+
var LINK_PROTOCOL_REGEX = /https?:\/\//;
|
|
1972
2165
|
function LinkInputPopover(props) {
|
|
2166
|
+
var _a;
|
|
1973
2167
|
const {
|
|
1974
2168
|
defaultValue = "",
|
|
1975
2169
|
onValueChange,
|
|
1976
2170
|
tooltip,
|
|
1977
|
-
icon: Icon = Link
|
|
2171
|
+
icon: Icon = Link,
|
|
2172
|
+
editor,
|
|
2173
|
+
isVariable
|
|
1978
2174
|
} = props;
|
|
1979
|
-
const
|
|
1980
|
-
const
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
2175
|
+
const defaultProtocol = (_a = defaultValue.match(LINK_PROTOCOL_REGEX)) == null ? void 0 : _a[0];
|
|
2176
|
+
const defaultUrlWithoutProtocol = defaultValue.replace(
|
|
2177
|
+
LINK_PROTOCOL_REGEX,
|
|
2178
|
+
""
|
|
2179
|
+
);
|
|
2180
|
+
const [isOpen, setIsOpen] = useState7(false);
|
|
2181
|
+
const [protocol, setProtocol] = useState7(defaultProtocol || "https://");
|
|
2182
|
+
const [isEditing, setIsEditing] = useState7(!isVariable);
|
|
2183
|
+
const linkInputRef = useRef6(null);
|
|
2184
|
+
const {
|
|
2185
|
+
variables = [],
|
|
2186
|
+
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR
|
|
2187
|
+
} = useMailyContext();
|
|
2188
|
+
const autoCompleteOptions = useMemo5(() => {
|
|
2189
|
+
const withoutTrigger = defaultUrlWithoutProtocol.replace(
|
|
2190
|
+
new RegExp(variableTriggerCharacter, "g"),
|
|
2191
|
+
""
|
|
2192
|
+
);
|
|
2193
|
+
return processVariables(variables, {
|
|
2194
|
+
query: withoutTrigger || "",
|
|
2195
|
+
from: "variable",
|
|
2196
|
+
editor
|
|
2197
|
+
}).map((variable) => variable.name);
|
|
2198
|
+
}, [variables, defaultUrlWithoutProtocol, editor]);
|
|
2199
|
+
const popoverButton = /* @__PURE__ */ jsx26(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx26(
|
|
1984
2200
|
BaseButton,
|
|
1985
2201
|
{
|
|
1986
2202
|
variant: "ghost",
|
|
@@ -1988,19 +2204,19 @@ function LinkInputPopover(props) {
|
|
|
1988
2204
|
type: "button",
|
|
1989
2205
|
className: "mly-size-7",
|
|
1990
2206
|
"data-state": !!defaultUrlWithoutProtocol,
|
|
1991
|
-
children: /* @__PURE__ */
|
|
2207
|
+
children: /* @__PURE__ */ jsx26(Icon, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5] mly-text-midnight-gray" })
|
|
1992
2208
|
}
|
|
1993
2209
|
) });
|
|
1994
2210
|
const normalizeProtocol = (value, p = protocol) => {
|
|
1995
|
-
value = value.replace(
|
|
2211
|
+
value = value == null ? void 0 : value.replace(LINK_PROTOCOL_REGEX, "");
|
|
1996
2212
|
return p + value;
|
|
1997
2213
|
};
|
|
1998
|
-
return /* @__PURE__ */
|
|
1999
|
-
tooltip ? /* @__PURE__ */
|
|
2000
|
-
/* @__PURE__ */
|
|
2001
|
-
/* @__PURE__ */
|
|
2214
|
+
return /* @__PURE__ */ jsxs11(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
2215
|
+
tooltip ? /* @__PURE__ */ jsxs11(Tooltip, { children: [
|
|
2216
|
+
/* @__PURE__ */ jsx26(TooltipTrigger, { asChild: true, children: popoverButton }),
|
|
2217
|
+
/* @__PURE__ */ jsx26(TooltipContent, { sideOffset: 8, children: tooltip })
|
|
2002
2218
|
] }) : popoverButton,
|
|
2003
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsx26(
|
|
2004
2220
|
PopoverContent,
|
|
2005
2221
|
{
|
|
2006
2222
|
align: "end",
|
|
@@ -2008,7 +2224,7 @@ function LinkInputPopover(props) {
|
|
|
2008
2224
|
className: "mly-w-max mly-rounded-none mly-border-none mly-bg-transparent !mly-p-0 mly-shadow-none",
|
|
2009
2225
|
sideOffset: 8,
|
|
2010
2226
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
2011
|
-
children: /* @__PURE__ */
|
|
2227
|
+
children: /* @__PURE__ */ jsx26(
|
|
2012
2228
|
"form",
|
|
2013
2229
|
{
|
|
2014
2230
|
onSubmit: (e) => {
|
|
@@ -2021,32 +2237,49 @@ function LinkInputPopover(props) {
|
|
|
2021
2237
|
onValueChange == null ? void 0 : onValueChange(value);
|
|
2022
2238
|
setIsOpen(false);
|
|
2023
2239
|
},
|
|
2024
|
-
children: /* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
|
|
2027
|
-
|
|
2240
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "mly-isolate mly-flex mly-rounded-lg", children: [
|
|
2241
|
+
!isEditing && /* @__PURE__ */ jsx26("div", { className: "mly-flex mly-h-8 mly-items-center mly-rounded-lg mly-border mly-border-gray-300 mly-bg-white mly-px-0.5", children: /* @__PURE__ */ jsxs11(
|
|
2242
|
+
"button",
|
|
2243
|
+
{
|
|
2244
|
+
className: "mly-inline-grid mly-h-7 mly-min-w-28 mly-max-w-xs mly-grid-cols-[12px_1fr] mly-items-center mly-gap-1.5 mly-rounded-md mly-border mly-px-2 mly-font-mono mly-text-sm hover:mly-bg-soft-gray",
|
|
2245
|
+
onClick: () => {
|
|
2246
|
+
setIsEditing(true);
|
|
2247
|
+
setTimeout(() => {
|
|
2248
|
+
var _a2;
|
|
2249
|
+
(_a2 = linkInputRef.current) == null ? void 0 : _a2.focus();
|
|
2250
|
+
}, 0);
|
|
2251
|
+
},
|
|
2252
|
+
children: [
|
|
2253
|
+
/* @__PURE__ */ jsx26(BracesIcon, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
2254
|
+
/* @__PURE__ */ jsx26("span", { className: "mly-min-w-0 mly-truncate mly-text-left", children: defaultUrlWithoutProtocol })
|
|
2255
|
+
]
|
|
2256
|
+
}
|
|
2257
|
+
) }),
|
|
2258
|
+
isEditing && /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
2259
|
+
/* @__PURE__ */ jsxs11("div", { className: "mly-relative", children: [
|
|
2260
|
+
/* @__PURE__ */ jsxs11(
|
|
2028
2261
|
"select",
|
|
2029
2262
|
{
|
|
2030
2263
|
className: "hover:text-accent-foreground mly-peer mly-inline-flex mly-h-full mly-appearance-none mly-items-center mly-rounded-none mly-rounded-s-lg mly-border mly-border-gray-300 mly-bg-gray-50 mly-pe-8 mly-ps-3 mly-text-sm mly-text-gray-700 mly-transition-shadow hover:mly-bg-gray-100 focus:mly-z-10 focus-visible:mly-outline-none disabled:mly-pointer-events-none disabled:mly-cursor-not-allowed disabled:mly-opacity-50",
|
|
2031
2264
|
"aria-label": "Protocol",
|
|
2032
2265
|
value: protocol,
|
|
2033
2266
|
onChange: (e) => {
|
|
2034
|
-
var
|
|
2267
|
+
var _a2;
|
|
2035
2268
|
const protocol2 = e.target.value;
|
|
2036
2269
|
setProtocol(protocol2);
|
|
2037
2270
|
const newValue = normalizeProtocol(
|
|
2038
|
-
((
|
|
2271
|
+
((_a2 = linkInputRef.current) == null ? void 0 : _a2.value) || "",
|
|
2039
2272
|
protocol2
|
|
2040
2273
|
);
|
|
2041
2274
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
2042
2275
|
},
|
|
2043
2276
|
children: [
|
|
2044
|
-
/* @__PURE__ */
|
|
2045
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ jsx26("option", { value: "https://", children: "https://" }),
|
|
2278
|
+
/* @__PURE__ */ jsx26("option", { value: "http://", children: "http://" })
|
|
2046
2279
|
]
|
|
2047
2280
|
}
|
|
2048
2281
|
),
|
|
2049
|
-
/* @__PURE__ */
|
|
2282
|
+
/* @__PURE__ */ jsx26("span", { className: "mly-pointer-events-none mly-absolute mly-inset-y-0 mly-right-0 mly-z-10 mly-flex mly-h-full mly-w-9 mly-items-center mly-justify-center mly-text-gray-600 peer-disabled:mly-opacity-50", children: /* @__PURE__ */ jsx26(
|
|
2050
2283
|
ChevronDownIcon2,
|
|
2051
2284
|
{
|
|
2052
2285
|
size: 16,
|
|
@@ -2056,29 +2289,33 @@ function LinkInputPopover(props) {
|
|
|
2056
2289
|
}
|
|
2057
2290
|
) })
|
|
2058
2291
|
] }),
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
|
|
2292
|
+
/* @__PURE__ */ jsx26(
|
|
2293
|
+
InputAutocomplete,
|
|
2061
2294
|
{
|
|
2062
2295
|
value: defaultUrlWithoutProtocol,
|
|
2063
|
-
|
|
2064
|
-
let
|
|
2065
|
-
onValueChange == null ? void 0 : onValueChange(
|
|
2296
|
+
onValueChange: (value) => {
|
|
2297
|
+
let newValue = normalizeProtocol(value);
|
|
2298
|
+
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
2066
2299
|
},
|
|
2300
|
+
autoCompleteOptions,
|
|
2067
2301
|
ref: linkInputRef,
|
|
2068
|
-
|
|
2302
|
+
placeholder: "maily.to/",
|
|
2069
2303
|
className: "-mly-ms-px mly-block mly-h-8 mly-w-52 mly-rounded-lg mly-rounded-s-none mly-border mly-border-gray-300 mly-px-2 mly-py-1.5 mly-pr-6 mly-text-sm mly-shadow-sm mly-outline-none placeholder:mly-text-gray-400",
|
|
2070
|
-
|
|
2304
|
+
triggerChar: variableTriggerCharacter,
|
|
2305
|
+
onSelectOption: (value) => {
|
|
2306
|
+
var _a2;
|
|
2307
|
+
const isVariable2 = (_a2 = autoCompleteOptions.includes(value)) != null ? _a2 : false;
|
|
2308
|
+
if (isVariable2) {
|
|
2309
|
+
setIsEditing(false);
|
|
2310
|
+
} else {
|
|
2311
|
+
value = normalizeProtocol(value);
|
|
2312
|
+
}
|
|
2313
|
+
onValueChange == null ? void 0 : onValueChange(value, isVariable2);
|
|
2314
|
+
setIsOpen(false);
|
|
2315
|
+
}
|
|
2071
2316
|
}
|
|
2072
2317
|
)
|
|
2073
|
-
] })
|
|
2074
|
-
/* @__PURE__ */ jsx24("div", { className: "mly-pointer-events-none mly-absolute mly-inset-y-0 mly-right-1.5 mly-flex mly-items-center", children: /* @__PURE__ */ jsx24(
|
|
2075
|
-
CornerDownLeft3,
|
|
2076
|
-
{
|
|
2077
|
-
className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray",
|
|
2078
|
-
"aria-hidden": "true",
|
|
2079
|
-
role: "img"
|
|
2080
|
-
}
|
|
2081
|
-
) })
|
|
2318
|
+
] })
|
|
2082
2319
|
] })
|
|
2083
2320
|
}
|
|
2084
2321
|
)
|
|
@@ -2088,12 +2325,12 @@ function LinkInputPopover(props) {
|
|
|
2088
2325
|
}
|
|
2089
2326
|
|
|
2090
2327
|
// src/editor/components/image-menu/image-size.tsx
|
|
2091
|
-
import { jsx as
|
|
2328
|
+
import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2092
2329
|
function ImageSize(props) {
|
|
2093
2330
|
const { value, onValueChange, dimension } = props;
|
|
2094
|
-
return /* @__PURE__ */
|
|
2095
|
-
/* @__PURE__ */
|
|
2096
|
-
/* @__PURE__ */
|
|
2331
|
+
return /* @__PURE__ */ jsxs12("label", { className: "mly-relative mly-flex mly-items-center", children: [
|
|
2332
|
+
/* @__PURE__ */ jsx27("span", { className: "mly-absolute mly-inset-y-0 mly-left-2 mly-flex mly-items-center mly-text-xs mly-leading-none mly-text-gray-400", children: dimension === "width" ? "W" : "H" }),
|
|
2333
|
+
/* @__PURE__ */ jsx27(
|
|
2097
2334
|
"input",
|
|
2098
2335
|
{
|
|
2099
2336
|
className: "hide-number-controls mly-h-auto mly-max-w-20 mly-appearance-none mly-border-0 mly-border-none mly-p-1 mly-px-[26px] mly-text-sm mly-uppercase mly-tabular-nums mly-outline-none focus-visible:mly-outline-none",
|
|
@@ -2102,7 +2339,7 @@ function ImageSize(props) {
|
|
|
2102
2339
|
onChange: (e) => onValueChange(e.target.value)
|
|
2103
2340
|
}
|
|
2104
2341
|
),
|
|
2105
|
-
/* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ jsx27("span", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center mly-text-xs mly-leading-none mly-text-gray-400", children: "PX" })
|
|
2106
2343
|
] });
|
|
2107
2344
|
}
|
|
2108
2345
|
|
|
@@ -2373,7 +2610,7 @@ var SectionExtension = Node3.create({
|
|
|
2373
2610
|
border: 0,
|
|
2374
2611
|
cellpadding: 0,
|
|
2375
2612
|
cellspacing: 0,
|
|
2376
|
-
class: "mly-w-full mly-border-separate mly-relative",
|
|
2613
|
+
class: "mly-w-full mly-border-separate mly-relative mly-table-fixed",
|
|
2377
2614
|
style: `margin-top: ${marginTop}px; margin-right: ${marginRight}px; margin-bottom: ${marginBottom}px; margin-left: ${marginLeft}px;`
|
|
2378
2615
|
},
|
|
2379
2616
|
[
|
|
@@ -2409,14 +2646,14 @@ var SectionExtension = Node3.create({
|
|
|
2409
2646
|
});
|
|
2410
2647
|
|
|
2411
2648
|
// src/editor/nodes/logo/logo-view.tsx
|
|
2412
|
-
import { NodeViewWrapper as
|
|
2413
|
-
import { useEffect as
|
|
2414
|
-
import { useState as
|
|
2649
|
+
import { NodeViewWrapper as NodeViewWrapper3 } from "@tiptap/react";
|
|
2650
|
+
import { useEffect as useEffect6 } from "react";
|
|
2651
|
+
import { useState as useState9 } from "react";
|
|
2415
2652
|
|
|
2416
2653
|
// src/editor/utils/use-event.ts
|
|
2417
|
-
import { useCallback as useCallback5, useLayoutEffect, useRef as
|
|
2654
|
+
import { useCallback as useCallback5, useLayoutEffect, useRef as useRef7 } from "react";
|
|
2418
2655
|
var useEvent = (handler) => {
|
|
2419
|
-
const handlerRef =
|
|
2656
|
+
const handlerRef = useRef7(null);
|
|
2420
2657
|
useLayoutEffect(() => {
|
|
2421
2658
|
handlerRef.current = handler;
|
|
2422
2659
|
}, [handler]);
|
|
@@ -2429,18 +2666,18 @@ var useEvent = (handler) => {
|
|
|
2429
2666
|
};
|
|
2430
2667
|
|
|
2431
2668
|
// src/editor/nodes/image/image-view.tsx
|
|
2432
|
-
import { NodeViewWrapper } from "@tiptap/react";
|
|
2433
|
-
import { Ban, ImageOffIcon, Loader2 } from "lucide-react";
|
|
2434
|
-
import { useEffect as
|
|
2435
|
-
import { Fragment as
|
|
2669
|
+
import { NodeViewWrapper as NodeViewWrapper2 } from "@tiptap/react";
|
|
2670
|
+
import { Ban, BracesIcon as BracesIcon2, ImageOffIcon, Loader2 } from "lucide-react";
|
|
2671
|
+
import { useEffect as useEffect5, useRef as useRef8, useState as useState8 } from "react";
|
|
2672
|
+
import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2436
2673
|
var MIN_WIDTH = 20;
|
|
2437
2674
|
var MAX_WIDTH = 600;
|
|
2438
2675
|
function ImageView(props) {
|
|
2439
2676
|
const { node, updateAttributes: updateAttributes2, selected } = props;
|
|
2440
|
-
const [status, setStatus] =
|
|
2441
|
-
const wrapperRef =
|
|
2442
|
-
const imgRef =
|
|
2443
|
-
const [resizingStyle, setResizingStyle] =
|
|
2677
|
+
const [status, setStatus] = useState8("idle");
|
|
2678
|
+
const wrapperRef = useRef8(null);
|
|
2679
|
+
const imgRef = useRef8(null);
|
|
2680
|
+
const [resizingStyle, setResizingStyle] = useState8();
|
|
2444
2681
|
const handleMouseDown = useEvent(
|
|
2445
2682
|
(event) => {
|
|
2446
2683
|
const imageParent = document.querySelector(
|
|
@@ -2483,7 +2720,7 @@ function ImageView(props) {
|
|
|
2483
2720
|
}
|
|
2484
2721
|
);
|
|
2485
2722
|
function dragCornerButton(direction) {
|
|
2486
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ jsx28(
|
|
2487
2724
|
"div",
|
|
2488
2725
|
{
|
|
2489
2726
|
role: "button",
|
|
@@ -2502,9 +2739,19 @@ function ImageView(props) {
|
|
|
2502
2739
|
);
|
|
2503
2740
|
}
|
|
2504
2741
|
let { alignment = "center", width, height, src } = node.attrs || {};
|
|
2505
|
-
const _a = node.attrs || {}, {
|
|
2742
|
+
const _a = node.attrs || {}, {
|
|
2743
|
+
externalLink,
|
|
2744
|
+
isExternalLinkVariable,
|
|
2745
|
+
isSrcVariable,
|
|
2746
|
+
showIfKey
|
|
2747
|
+
} = _a, attrs = __objRest(_a, [
|
|
2748
|
+
"externalLink",
|
|
2749
|
+
"isExternalLinkVariable",
|
|
2750
|
+
"isSrcVariable",
|
|
2751
|
+
"showIfKey"
|
|
2752
|
+
]);
|
|
2506
2753
|
const hasImageSrc = !!attrs.src;
|
|
2507
|
-
|
|
2754
|
+
useEffect5(() => {
|
|
2508
2755
|
if (!src) {
|
|
2509
2756
|
return;
|
|
2510
2757
|
}
|
|
@@ -2538,8 +2785,8 @@ function ImageView(props) {
|
|
|
2538
2785
|
img.onerror = null;
|
|
2539
2786
|
};
|
|
2540
2787
|
}, [src]);
|
|
2541
|
-
return /* @__PURE__ */
|
|
2542
|
-
|
|
2788
|
+
return /* @__PURE__ */ jsxs13(
|
|
2789
|
+
NodeViewWrapper2,
|
|
2543
2790
|
{
|
|
2544
2791
|
as: "div",
|
|
2545
2792
|
draggable: true,
|
|
@@ -2560,11 +2807,12 @@ function ImageView(props) {
|
|
|
2560
2807
|
}[alignment] || {}),
|
|
2561
2808
|
ref: wrapperRef,
|
|
2562
2809
|
children: [
|
|
2563
|
-
!hasImageSrc && /* @__PURE__ */
|
|
2564
|
-
hasImageSrc &&
|
|
2565
|
-
hasImageSrc && status === "
|
|
2566
|
-
hasImageSrc && status === "
|
|
2567
|
-
|
|
2810
|
+
!hasImageSrc && /* @__PURE__ */ jsx28(ImageStatusLabel, { status: "idle" }),
|
|
2811
|
+
hasImageSrc && isSrcVariable && /* @__PURE__ */ jsx28(ImageStatusLabel, { status: "variable" }),
|
|
2812
|
+
hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx28(ImageStatusLabel, { status: "loading" }),
|
|
2813
|
+
hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ jsx28(ImageStatusLabel, { status: "error" }),
|
|
2814
|
+
hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2815
|
+
/* @__PURE__ */ jsx28(
|
|
2568
2816
|
"img",
|
|
2569
2817
|
__spreadProps(__spreadValues({}, attrs), {
|
|
2570
2818
|
ref: imgRef,
|
|
@@ -2574,13 +2822,13 @@ function ImageView(props) {
|
|
|
2574
2822
|
})
|
|
2575
2823
|
})
|
|
2576
2824
|
),
|
|
2577
|
-
selected && /* @__PURE__ */
|
|
2825
|
+
selected && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2578
2826
|
[
|
|
2579
2827
|
{ left: 0, top: 0, height: "100%", width: "1px" },
|
|
2580
2828
|
{ right: 0, top: 0, height: "100%", width: "1px" },
|
|
2581
2829
|
{ top: 0, left: 0, width: "100%", height: "1px" },
|
|
2582
2830
|
{ bottom: 0, left: 0, width: "100%", height: "1px" }
|
|
2583
|
-
].map((style, i) => /* @__PURE__ */
|
|
2831
|
+
].map((style, i) => /* @__PURE__ */ jsx28(
|
|
2584
2832
|
"div",
|
|
2585
2833
|
{
|
|
2586
2834
|
className: "mly-bg-rose-500",
|
|
@@ -2602,7 +2850,7 @@ function ImageView(props) {
|
|
|
2602
2850
|
}
|
|
2603
2851
|
function ImageStatusLabel(props) {
|
|
2604
2852
|
const { status } = props;
|
|
2605
|
-
return /* @__PURE__ */
|
|
2853
|
+
return /* @__PURE__ */ jsxs13(
|
|
2606
2854
|
"div",
|
|
2607
2855
|
{
|
|
2608
2856
|
className: cn(
|
|
@@ -2613,17 +2861,21 @@ function ImageStatusLabel(props) {
|
|
|
2613
2861
|
}
|
|
2614
2862
|
),
|
|
2615
2863
|
children: [
|
|
2616
|
-
status === "idle" && /* @__PURE__ */
|
|
2617
|
-
/* @__PURE__ */
|
|
2618
|
-
/* @__PURE__ */
|
|
2864
|
+
status === "idle" && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2865
|
+
/* @__PURE__ */ jsx28(ImageOffIcon, { className: "mly-size-4 mly-stroke-[2.5]" }),
|
|
2866
|
+
/* @__PURE__ */ jsx28("span", { children: "No image selected" })
|
|
2867
|
+
] }),
|
|
2868
|
+
status === "loading" && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2869
|
+
/* @__PURE__ */ jsx28(Loader2, { className: "mly-size-4 mly-animate-spin mly-stroke-[2.5]" }),
|
|
2870
|
+
/* @__PURE__ */ jsx28("span", { children: "Loading image..." })
|
|
2619
2871
|
] }),
|
|
2620
|
-
status === "
|
|
2621
|
-
/* @__PURE__ */
|
|
2622
|
-
/* @__PURE__ */
|
|
2872
|
+
status === "error" && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2873
|
+
/* @__PURE__ */ jsx28(Ban, { className: "mly-size-4 mly-stroke-[2.5]" }),
|
|
2874
|
+
/* @__PURE__ */ jsx28("span", { children: "Error loading image" })
|
|
2623
2875
|
] }),
|
|
2624
|
-
status === "
|
|
2625
|
-
/* @__PURE__ */
|
|
2626
|
-
/* @__PURE__ */
|
|
2876
|
+
status === "variable" && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
2877
|
+
/* @__PURE__ */ jsx28(BracesIcon2, { className: "mly-size-4 mly-stroke-[2.5]" }),
|
|
2878
|
+
/* @__PURE__ */ jsx28("span", { children: "Variable Image URL" })
|
|
2627
2879
|
] })
|
|
2628
2880
|
]
|
|
2629
2881
|
}
|
|
@@ -2631,17 +2883,18 @@ function ImageStatusLabel(props) {
|
|
|
2631
2883
|
}
|
|
2632
2884
|
|
|
2633
2885
|
// src/editor/nodes/logo/logo-view.tsx
|
|
2634
|
-
import { jsx as
|
|
2886
|
+
import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2635
2887
|
function LogoView(props) {
|
|
2636
2888
|
const { node } = props;
|
|
2637
|
-
const [status, setStatus] =
|
|
2889
|
+
const [status, setStatus] = useState9("idle");
|
|
2638
2890
|
let {
|
|
2639
2891
|
alignment = "center",
|
|
2640
2892
|
src: logoSrc,
|
|
2893
|
+
isSrcVariable,
|
|
2641
2894
|
size = "sm"
|
|
2642
2895
|
} = node.attrs || {};
|
|
2643
2896
|
const hasImageSrc = !!logoSrc;
|
|
2644
|
-
|
|
2897
|
+
useEffect6(() => {
|
|
2645
2898
|
if (!logoSrc) {
|
|
2646
2899
|
return;
|
|
2647
2900
|
}
|
|
@@ -2661,8 +2914,8 @@ function LogoView(props) {
|
|
|
2661
2914
|
};
|
|
2662
2915
|
}, [logoSrc]);
|
|
2663
2916
|
const logoSize = logoSizes[size];
|
|
2664
|
-
return /* @__PURE__ */
|
|
2665
|
-
|
|
2917
|
+
return /* @__PURE__ */ jsxs14(
|
|
2918
|
+
NodeViewWrapper3,
|
|
2666
2919
|
{
|
|
2667
2920
|
as: "div",
|
|
2668
2921
|
draggable: true,
|
|
@@ -2675,10 +2928,11 @@ function LogoView(props) {
|
|
|
2675
2928
|
display: "block"
|
|
2676
2929
|
},
|
|
2677
2930
|
children: [
|
|
2678
|
-
!hasImageSrc && /* @__PURE__ */
|
|
2679
|
-
hasImageSrc &&
|
|
2680
|
-
hasImageSrc && status === "
|
|
2681
|
-
hasImageSrc && status === "
|
|
2931
|
+
!hasImageSrc && /* @__PURE__ */ jsx29(ImageStatusLabel, { status: "idle" }),
|
|
2932
|
+
hasImageSrc && isSrcVariable && /* @__PURE__ */ jsx29(ImageStatusLabel, { status: "variable" }),
|
|
2933
|
+
hasImageSrc && status === "loading" && !isSrcVariable && /* @__PURE__ */ jsx29(ImageStatusLabel, { status: "loading" }),
|
|
2934
|
+
hasImageSrc && status === "error" && !isSrcVariable && /* @__PURE__ */ jsx29(ImageStatusLabel, { status: "error" }),
|
|
2935
|
+
hasImageSrc && status === "loaded" && !isSrcVariable && /* @__PURE__ */ jsx29(
|
|
2682
2936
|
"img",
|
|
2683
2937
|
{
|
|
2684
2938
|
src: logoSrc,
|
|
@@ -2755,6 +3009,23 @@ var LogoExtension = TiptapImage.extend({
|
|
|
2755
3009
|
"data-show-if-key": attributes.showIfKey
|
|
2756
3010
|
};
|
|
2757
3011
|
}
|
|
3012
|
+
},
|
|
3013
|
+
// Later we will remove this attribute
|
|
3014
|
+
// and use the `src` attribute instead when implement
|
|
3015
|
+
// the URL variable feature
|
|
3016
|
+
isSrcVariable: {
|
|
3017
|
+
default: false,
|
|
3018
|
+
parseHTML: (element) => {
|
|
3019
|
+
return element.getAttribute("data-is-src-variable") === "true";
|
|
3020
|
+
},
|
|
3021
|
+
renderHTML: (attributes) => {
|
|
3022
|
+
if (!attributes.isSrcVariable) {
|
|
3023
|
+
return {};
|
|
3024
|
+
}
|
|
3025
|
+
return {
|
|
3026
|
+
"data-is-src-variable": "true"
|
|
3027
|
+
};
|
|
3028
|
+
}
|
|
2758
3029
|
}
|
|
2759
3030
|
});
|
|
2760
3031
|
},
|
|
@@ -2791,18 +3062,20 @@ import deepEql3 from "fast-deep-equal";
|
|
|
2791
3062
|
var useImageState = (editor) => {
|
|
2792
3063
|
const states = useEditorState3({
|
|
2793
3064
|
editor,
|
|
2794
|
-
selector: (
|
|
2795
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3065
|
+
selector: ({ editor: editor2 }) => {
|
|
3066
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2796
3067
|
return {
|
|
2797
|
-
width:
|
|
2798
|
-
height:
|
|
2799
|
-
isImageActive:
|
|
2800
|
-
isLogoActive:
|
|
2801
|
-
alignment: ((_a =
|
|
2802
|
-
logoSize: ((_c =
|
|
2803
|
-
imageSrc: ((_d =
|
|
2804
|
-
|
|
2805
|
-
|
|
3068
|
+
width: editor2.getAttributes("image").width,
|
|
3069
|
+
height: editor2.getAttributes("image").height,
|
|
3070
|
+
isImageActive: editor2.isActive("image"),
|
|
3071
|
+
isLogoActive: editor2.isActive("logo"),
|
|
3072
|
+
alignment: ((_a = editor2.getAttributes("image")) == null ? void 0 : _a.alignment) || ((_b = editor2.getAttributes("logo")) == null ? void 0 : _b.alignment),
|
|
3073
|
+
logoSize: ((_c = editor2.getAttributes("logo")) == null ? void 0 : _c.size) || DEFAULT_LOGO_SIZE,
|
|
3074
|
+
imageSrc: ((_d = editor2.getAttributes("image")) == null ? void 0 : _d.src) || ((_e = editor2.getAttributes("logo")) == null ? void 0 : _e.src) || "",
|
|
3075
|
+
isSrcVariable: (_i = (_h = (_f = editor2.getAttributes("image")) == null ? void 0 : _f.isSrcVariable) != null ? _h : (_g = editor2.getAttributes("logo")) == null ? void 0 : _g.isSrcVariable) != null ? _i : false,
|
|
3076
|
+
imageExternalLink: ((_j = editor2.getAttributes("image")) == null ? void 0 : _j.externalLink) || "",
|
|
3077
|
+
isExternalLinkVariable: (_k = editor2.getAttributes("image")) == null ? void 0 : _k.isExternalLinkVariable,
|
|
3078
|
+
currentShowIfKey: ((_l = editor2.getAttributes("image")) == null ? void 0 : _l.showIfKey) || ((_m = editor2.getAttributes("logo")) == null ? void 0 : _m.showIfKey) || ""
|
|
2806
3079
|
};
|
|
2807
3080
|
},
|
|
2808
3081
|
equalityFn: deepEql3
|
|
@@ -2812,7 +3085,7 @@ var useImageState = (editor) => {
|
|
|
2812
3085
|
|
|
2813
3086
|
// src/editor/components/image-menu/image-bubble-menu.tsx
|
|
2814
3087
|
import { sticky as sticky3 } from "tippy.js";
|
|
2815
|
-
import { Fragment as
|
|
3088
|
+
import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2816
3089
|
function ImageBubbleMenu(props) {
|
|
2817
3090
|
var _a, _b, _c, _d;
|
|
2818
3091
|
const { editor, appendTo } = props;
|
|
@@ -2833,13 +3106,13 @@ function ImageBubbleMenu(props) {
|
|
|
2833
3106
|
maxWidth: "100%"
|
|
2834
3107
|
}
|
|
2835
3108
|
});
|
|
2836
|
-
return /* @__PURE__ */
|
|
3109
|
+
return /* @__PURE__ */ jsx30(
|
|
2837
3110
|
BubbleMenu3,
|
|
2838
3111
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
2839
3112
|
className: "mly-flex mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
2840
|
-
children: /* @__PURE__ */
|
|
2841
|
-
state.isLogoActive && state.imageSrc && /* @__PURE__ */
|
|
2842
|
-
/* @__PURE__ */
|
|
3113
|
+
children: /* @__PURE__ */ jsxs15(TooltipProvider, { children: [
|
|
3114
|
+
state.isLogoActive && state.imageSrc && /* @__PURE__ */ jsxs15(Fragment5, { children: [
|
|
3115
|
+
/* @__PURE__ */ jsx30(
|
|
2843
3116
|
Select,
|
|
2844
3117
|
{
|
|
2845
3118
|
label: "Size",
|
|
@@ -2854,10 +3127,10 @@ function ImageBubbleMenu(props) {
|
|
|
2854
3127
|
}
|
|
2855
3128
|
}
|
|
2856
3129
|
),
|
|
2857
|
-
/* @__PURE__ */
|
|
3130
|
+
/* @__PURE__ */ jsx30(Divider, {})
|
|
2858
3131
|
] }),
|
|
2859
|
-
/* @__PURE__ */
|
|
2860
|
-
/* @__PURE__ */
|
|
3132
|
+
/* @__PURE__ */ jsxs15("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
3133
|
+
/* @__PURE__ */ jsx30(
|
|
2861
3134
|
AlignmentSwitch,
|
|
2862
3135
|
{
|
|
2863
3136
|
alignment: state.alignment,
|
|
@@ -2871,36 +3144,49 @@ function ImageBubbleMenu(props) {
|
|
|
2871
3144
|
}
|
|
2872
3145
|
}
|
|
2873
3146
|
),
|
|
2874
|
-
/* @__PURE__ */
|
|
3147
|
+
/* @__PURE__ */ jsx30(
|
|
2875
3148
|
LinkInputPopover,
|
|
2876
3149
|
{
|
|
2877
3150
|
defaultValue: (_a = state == null ? void 0 : state.imageSrc) != null ? _a : "",
|
|
2878
|
-
onValueChange: (value) => {
|
|
3151
|
+
onValueChange: (value, isVariable) => {
|
|
2879
3152
|
if (state.isLogoActive) {
|
|
2880
|
-
editor == null ? void 0 : editor.chain().setLogoAttributes({
|
|
3153
|
+
editor == null ? void 0 : editor.chain().setLogoAttributes({
|
|
3154
|
+
src: value,
|
|
3155
|
+
isSrcVariable: isVariable != null ? isVariable : false
|
|
3156
|
+
}).run();
|
|
2881
3157
|
} else {
|
|
2882
|
-
editor == null ? void 0 : editor.chain().updateAttributes("image", {
|
|
3158
|
+
editor == null ? void 0 : editor.chain().updateAttributes("image", {
|
|
3159
|
+
src: value,
|
|
3160
|
+
isSrcVariable: isVariable != null ? isVariable : false
|
|
3161
|
+
}).run();
|
|
2883
3162
|
}
|
|
2884
3163
|
},
|
|
2885
3164
|
tooltip: "Source URL",
|
|
2886
|
-
icon: ImageDown
|
|
3165
|
+
icon: ImageDown,
|
|
3166
|
+
editor,
|
|
3167
|
+
isVariable: state.isSrcVariable
|
|
2887
3168
|
}
|
|
2888
3169
|
),
|
|
2889
|
-
state.isImageActive && /* @__PURE__ */
|
|
3170
|
+
state.isImageActive && /* @__PURE__ */ jsx30(
|
|
2890
3171
|
LinkInputPopover,
|
|
2891
3172
|
{
|
|
2892
3173
|
defaultValue: (_b = state == null ? void 0 : state.imageExternalLink) != null ? _b : "",
|
|
2893
|
-
onValueChange: (value) => {
|
|
2894
|
-
editor == null ? void 0 : editor.chain().updateAttributes("image", {
|
|
3174
|
+
onValueChange: (value, isVariable) => {
|
|
3175
|
+
editor == null ? void 0 : editor.chain().updateAttributes("image", {
|
|
3176
|
+
externalLink: value,
|
|
3177
|
+
isExternalLinkVariable: isVariable != null ? isVariable : false
|
|
3178
|
+
}).run();
|
|
2895
3179
|
},
|
|
2896
|
-
tooltip: "External URL"
|
|
3180
|
+
tooltip: "External URL",
|
|
3181
|
+
editor,
|
|
3182
|
+
isVariable: state.isExternalLinkVariable
|
|
2897
3183
|
}
|
|
2898
3184
|
)
|
|
2899
3185
|
] }),
|
|
2900
|
-
state.isImageActive && state.imageSrc && /* @__PURE__ */
|
|
2901
|
-
/* @__PURE__ */
|
|
2902
|
-
/* @__PURE__ */
|
|
2903
|
-
/* @__PURE__ */
|
|
3186
|
+
state.isImageActive && state.imageSrc && /* @__PURE__ */ jsxs15(Fragment5, { children: [
|
|
3187
|
+
/* @__PURE__ */ jsx30(Divider, {}),
|
|
3188
|
+
/* @__PURE__ */ jsxs15("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
3189
|
+
/* @__PURE__ */ jsx30(
|
|
2904
3190
|
ImageSize,
|
|
2905
3191
|
{
|
|
2906
3192
|
dimension: "width",
|
|
@@ -2910,7 +3196,7 @@ function ImageBubbleMenu(props) {
|
|
|
2910
3196
|
}
|
|
2911
3197
|
}
|
|
2912
3198
|
),
|
|
2913
|
-
/* @__PURE__ */
|
|
3199
|
+
/* @__PURE__ */ jsx30(
|
|
2914
3200
|
ImageSize,
|
|
2915
3201
|
{
|
|
2916
3202
|
dimension: "height",
|
|
@@ -2922,8 +3208,8 @@ function ImageBubbleMenu(props) {
|
|
|
2922
3208
|
)
|
|
2923
3209
|
] })
|
|
2924
3210
|
] }),
|
|
2925
|
-
/* @__PURE__ */
|
|
2926
|
-
/* @__PURE__ */
|
|
3211
|
+
/* @__PURE__ */ jsx30(Divider, {}),
|
|
3212
|
+
/* @__PURE__ */ jsx30(
|
|
2927
3213
|
ShowPopover,
|
|
2928
3214
|
{
|
|
2929
3215
|
showIfKey: state.currentShowIfKey,
|
|
@@ -2947,10 +3233,10 @@ import { useCallback as useCallback6 } from "react";
|
|
|
2947
3233
|
import { sticky as sticky4 } from "tippy.js";
|
|
2948
3234
|
|
|
2949
3235
|
// src/editor/components/icons/border-color.tsx
|
|
2950
|
-
import { jsx as
|
|
3236
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2951
3237
|
function BorderColor(props) {
|
|
2952
3238
|
const _a = props, { topBarClassName } = _a, rest = __objRest(_a, ["topBarClassName"]);
|
|
2953
|
-
return /* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ jsxs16(
|
|
2954
3240
|
"svg",
|
|
2955
3241
|
__spreadProps(__spreadValues({
|
|
2956
3242
|
width: 11,
|
|
@@ -2960,8 +3246,8 @@ function BorderColor(props) {
|
|
|
2960
3246
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2961
3247
|
}, rest), {
|
|
2962
3248
|
children: [
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
3249
|
+
/* @__PURE__ */ jsx31("path", { d: "M0 11H10.6667", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
3250
|
+
/* @__PURE__ */ jsx31(
|
|
2965
3251
|
"path",
|
|
2966
3252
|
{
|
|
2967
3253
|
d: "M0.666504 9V6.33333C0.666504 3.38781 3.05432 1 5.99984 1H10.6665",
|
|
@@ -2975,9 +3261,9 @@ function BorderColor(props) {
|
|
|
2975
3261
|
}
|
|
2976
3262
|
|
|
2977
3263
|
// src/editor/components/icons/margin-icon.tsx
|
|
2978
|
-
import { jsx as
|
|
3264
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2979
3265
|
function MarginIcon(props) {
|
|
2980
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ jsx32(
|
|
2981
3267
|
"svg",
|
|
2982
3268
|
__spreadProps(__spreadValues({
|
|
2983
3269
|
width: 12,
|
|
@@ -2986,7 +3272,7 @@ function MarginIcon(props) {
|
|
|
2986
3272
|
fill: "none",
|
|
2987
3273
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2988
3274
|
}, props), {
|
|
2989
|
-
children: /* @__PURE__ */
|
|
3275
|
+
children: /* @__PURE__ */ jsx32(
|
|
2990
3276
|
"path",
|
|
2991
3277
|
{
|
|
2992
3278
|
d: "M10.5 10.499V1.49902M1.5 10.499V1.49902M4.5 5.99902C4.5 5.53308 4.5 5.30011 4.57612 5.11634C4.67761 4.87131 4.87229 4.67664 5.11732 4.57514C5.30109 4.49902 5.53406 4.49902 6 4.49902C6.46594 4.49902 6.69891 4.49902 6.88268 4.57514C7.12771 4.67664 7.32239 4.87131 7.42388 5.11634C7.5 5.30011 7.5 5.53308 7.5 5.99902C7.5 6.46496 7.5 6.69794 7.42388 6.88171C7.32239 7.12673 7.12771 7.32141 6.88268 7.4229C6.69891 7.49902 6.46594 7.49902 6 7.49902C5.53406 7.49902 5.30109 7.49902 5.11732 7.4229C4.87229 7.32141 4.67761 7.12673 4.57612 6.88171C4.5 6.69794 4.5 6.46496 4.5 5.99902Z",
|
|
@@ -3000,9 +3286,9 @@ function MarginIcon(props) {
|
|
|
3000
3286
|
}
|
|
3001
3287
|
|
|
3002
3288
|
// src/editor/components/icons/padding-icon.tsx
|
|
3003
|
-
import { jsx as
|
|
3289
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3004
3290
|
function PaddingIcon(props) {
|
|
3005
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsx33(
|
|
3006
3292
|
"svg",
|
|
3007
3293
|
__spreadProps(__spreadValues({
|
|
3008
3294
|
width: 10,
|
|
@@ -3011,7 +3297,7 @@ function PaddingIcon(props) {
|
|
|
3011
3297
|
fill: "none",
|
|
3012
3298
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3013
3299
|
}, props), {
|
|
3014
|
-
children: /* @__PURE__ */
|
|
3300
|
+
children: /* @__PURE__ */ jsx33(
|
|
3015
3301
|
"path",
|
|
3016
3302
|
{
|
|
3017
3303
|
d: "M9.50244 0.501526L9.10244 0.501526C8.54239 0.501526 8.26236 0.501526 8.04845 0.610519C7.86029 0.706392 7.70731 0.859373 7.61144 1.04754C7.50244 1.26145 7.50244 1.54147 7.50244 2.10153V7.90153C7.50244 8.46158 7.50244 8.74161 7.61144 8.95552C7.70731 9.14368 7.86029 9.29666 8.04845 9.39253C8.26236 9.50153 8.54239 9.50153 9.10244 9.50153H9.50244M0.502441 0.501527L0.902441 0.501527C1.46249 0.501527 1.74252 0.501527 1.95643 0.61052C2.14459 0.706393 2.29757 0.859374 2.39345 1.04754C2.50244 1.26145 2.50244 1.54147 2.50244 2.10153L2.50244 7.90153C2.50244 8.46158 2.50244 8.74161 2.39345 8.95552C2.29757 9.14368 2.14459 9.29666 1.95643 9.39253C1.74252 9.50153 1.46249 9.50153 0.902442 9.50153H0.502442M4.99994 7.99903V1.99903",
|
|
@@ -3026,7 +3312,7 @@ function PaddingIcon(props) {
|
|
|
3026
3312
|
|
|
3027
3313
|
// src/editor/components/ui/color-picker.tsx
|
|
3028
3314
|
import { HexColorPicker, HexColorInput } from "react-colorful";
|
|
3029
|
-
import { jsx as
|
|
3315
|
+
import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3030
3316
|
function ColorPicker(props) {
|
|
3031
3317
|
const {
|
|
3032
3318
|
color,
|
|
@@ -3042,14 +3328,14 @@ function ColorPicker(props) {
|
|
|
3042
3328
|
onColorChange(color2);
|
|
3043
3329
|
});
|
|
3044
3330
|
};
|
|
3045
|
-
const popoverButton = /* @__PURE__ */
|
|
3331
|
+
const popoverButton = /* @__PURE__ */ jsx34(PopoverTrigger, { asChild: true, children: children || /* @__PURE__ */ jsx34(
|
|
3046
3332
|
BaseButton,
|
|
3047
3333
|
{
|
|
3048
3334
|
variant: "ghost",
|
|
3049
3335
|
className: "!mly-size-7 mly-shrink-0",
|
|
3050
3336
|
size: "sm",
|
|
3051
3337
|
type: "button",
|
|
3052
|
-
children: /* @__PURE__ */
|
|
3338
|
+
children: /* @__PURE__ */ jsx34(
|
|
3053
3339
|
"div",
|
|
3054
3340
|
{
|
|
3055
3341
|
className: cn(
|
|
@@ -3063,18 +3349,18 @@ function ColorPicker(props) {
|
|
|
3063
3349
|
)
|
|
3064
3350
|
}
|
|
3065
3351
|
) });
|
|
3066
|
-
return /* @__PURE__ */
|
|
3067
|
-
tooltip ? /* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
3352
|
+
return /* @__PURE__ */ jsxs17(Popover, { children: [
|
|
3353
|
+
tooltip ? /* @__PURE__ */ jsxs17(Tooltip, { children: [
|
|
3354
|
+
/* @__PURE__ */ jsx34(TooltipTrigger, { asChild: true, children: popoverButton }),
|
|
3355
|
+
/* @__PURE__ */ jsx34(TooltipContent, { sideOffset: 8, children: tooltip })
|
|
3070
3356
|
] }) : popoverButton,
|
|
3071
|
-
/* @__PURE__ */
|
|
3357
|
+
/* @__PURE__ */ jsx34(
|
|
3072
3358
|
PopoverContent,
|
|
3073
3359
|
{
|
|
3074
3360
|
className: "mly-w-full mly-rounded-none mly-border-0 !mly-bg-transparent !mly-p-0 mly-shadow-none mly-drop-shadow-md",
|
|
3075
3361
|
sideOffset: 8,
|
|
3076
|
-
children: /* @__PURE__ */
|
|
3077
|
-
/* @__PURE__ */
|
|
3362
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "mly-min-w-[260px] mly-rounded-xl mly-border mly-bg-white mly-p-4", children: [
|
|
3363
|
+
/* @__PURE__ */ jsx34(
|
|
3078
3364
|
HexColorPicker,
|
|
3079
3365
|
{
|
|
3080
3366
|
color,
|
|
@@ -3082,7 +3368,7 @@ function ColorPicker(props) {
|
|
|
3082
3368
|
className: "mly-flex !mly-w-full mly-flex-col mly-gap-4"
|
|
3083
3369
|
}
|
|
3084
3370
|
),
|
|
3085
|
-
/* @__PURE__ */
|
|
3371
|
+
/* @__PURE__ */ jsx34(
|
|
3086
3372
|
HexColorInput,
|
|
3087
3373
|
{
|
|
3088
3374
|
alpha: true,
|
|
@@ -3130,7 +3416,7 @@ var useSectionState = (editor) => {
|
|
|
3130
3416
|
};
|
|
3131
3417
|
|
|
3132
3418
|
// src/editor/components/section-menu/section-bubble-menu.tsx
|
|
3133
|
-
import { Fragment as
|
|
3419
|
+
import { Fragment as Fragment6, jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3134
3420
|
function SectionBubbleMenu(props) {
|
|
3135
3421
|
const { appendTo, editor } = props;
|
|
3136
3422
|
if (!editor) {
|
|
@@ -3173,12 +3459,12 @@ function SectionBubbleMenu(props) {
|
|
|
3173
3459
|
{ value: "6", label: "Smooth" },
|
|
3174
3460
|
{ value: "9999", label: "Round" }
|
|
3175
3461
|
];
|
|
3176
|
-
return /* @__PURE__ */
|
|
3462
|
+
return /* @__PURE__ */ jsx35(
|
|
3177
3463
|
BubbleMenu4,
|
|
3178
3464
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
3179
3465
|
className: "mly-flex mly-items-stretch mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
3180
|
-
children: /* @__PURE__ */
|
|
3181
|
-
/* @__PURE__ */
|
|
3466
|
+
children: /* @__PURE__ */ jsxs18(TooltipProvider, { children: [
|
|
3467
|
+
/* @__PURE__ */ jsx35(
|
|
3182
3468
|
AlignmentSwitch,
|
|
3183
3469
|
{
|
|
3184
3470
|
alignment: state.currentAlignment,
|
|
@@ -3190,9 +3476,9 @@ function SectionBubbleMenu(props) {
|
|
|
3190
3476
|
}
|
|
3191
3477
|
}
|
|
3192
3478
|
),
|
|
3193
|
-
/* @__PURE__ */
|
|
3194
|
-
/* @__PURE__ */
|
|
3195
|
-
/* @__PURE__ */
|
|
3479
|
+
/* @__PURE__ */ jsx35(Divider, {}),
|
|
3480
|
+
/* @__PURE__ */ jsxs18("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
3481
|
+
/* @__PURE__ */ jsx35(
|
|
3196
3482
|
Select,
|
|
3197
3483
|
{
|
|
3198
3484
|
label: "Border Radius",
|
|
@@ -3208,7 +3494,7 @@ function SectionBubbleMenu(props) {
|
|
|
3208
3494
|
className: "mly-capitalize"
|
|
3209
3495
|
}
|
|
3210
3496
|
),
|
|
3211
|
-
/* @__PURE__ */
|
|
3497
|
+
/* @__PURE__ */ jsx35(
|
|
3212
3498
|
Select,
|
|
3213
3499
|
{
|
|
3214
3500
|
label: "Border Width",
|
|
@@ -3230,8 +3516,8 @@ function SectionBubbleMenu(props) {
|
|
|
3230
3516
|
}
|
|
3231
3517
|
)
|
|
3232
3518
|
] }),
|
|
3233
|
-
/* @__PURE__ */
|
|
3234
|
-
/* @__PURE__ */
|
|
3519
|
+
/* @__PURE__ */ jsx35(Divider, {}),
|
|
3520
|
+
/* @__PURE__ */ jsx35(
|
|
3235
3521
|
Select,
|
|
3236
3522
|
{
|
|
3237
3523
|
icon: MarginIcon,
|
|
@@ -3258,8 +3544,8 @@ function SectionBubbleMenu(props) {
|
|
|
3258
3544
|
className: "mly-capitalize"
|
|
3259
3545
|
}
|
|
3260
3546
|
),
|
|
3261
|
-
/* @__PURE__ */
|
|
3262
|
-
/* @__PURE__ */
|
|
3547
|
+
/* @__PURE__ */ jsx35(Divider, {}),
|
|
3548
|
+
/* @__PURE__ */ jsx35(
|
|
3263
3549
|
Select,
|
|
3264
3550
|
{
|
|
3265
3551
|
icon: PaddingIcon,
|
|
@@ -3286,9 +3572,9 @@ function SectionBubbleMenu(props) {
|
|
|
3286
3572
|
className: "mly-capitalize"
|
|
3287
3573
|
}
|
|
3288
3574
|
),
|
|
3289
|
-
/* @__PURE__ */
|
|
3290
|
-
/* @__PURE__ */
|
|
3291
|
-
/* @__PURE__ */
|
|
3575
|
+
/* @__PURE__ */ jsx35(Divider, {}),
|
|
3576
|
+
/* @__PURE__ */ jsxs18("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
3577
|
+
/* @__PURE__ */ jsx35(
|
|
3292
3578
|
ColorPicker,
|
|
3293
3579
|
{
|
|
3294
3580
|
color: state.currentBorderColor,
|
|
@@ -3299,14 +3585,14 @@ function SectionBubbleMenu(props) {
|
|
|
3299
3585
|
});
|
|
3300
3586
|
},
|
|
3301
3587
|
tooltip: "Border Color",
|
|
3302
|
-
children: /* @__PURE__ */
|
|
3588
|
+
children: /* @__PURE__ */ jsx35(
|
|
3303
3589
|
BaseButton,
|
|
3304
3590
|
{
|
|
3305
3591
|
variant: "ghost",
|
|
3306
3592
|
className: "!mly-size-7 mly-shrink-0",
|
|
3307
3593
|
size: "sm",
|
|
3308
3594
|
type: "button",
|
|
3309
|
-
children: /* @__PURE__ */
|
|
3595
|
+
children: /* @__PURE__ */ jsx35(
|
|
3310
3596
|
BorderColor,
|
|
3311
3597
|
{
|
|
3312
3598
|
className: "mly-size-3 mly-shrink-0",
|
|
@@ -3320,7 +3606,7 @@ function SectionBubbleMenu(props) {
|
|
|
3320
3606
|
)
|
|
3321
3607
|
}
|
|
3322
3608
|
),
|
|
3323
|
-
/* @__PURE__ */
|
|
3609
|
+
/* @__PURE__ */ jsx35(
|
|
3324
3610
|
ColorPicker,
|
|
3325
3611
|
{
|
|
3326
3612
|
color: state.currentBackgroundColor,
|
|
@@ -3336,8 +3622,8 @@ function SectionBubbleMenu(props) {
|
|
|
3336
3622
|
}
|
|
3337
3623
|
)
|
|
3338
3624
|
] }),
|
|
3339
|
-
/* @__PURE__ */
|
|
3340
|
-
/* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ jsx35(Divider, {}),
|
|
3626
|
+
/* @__PURE__ */ jsx35(
|
|
3341
3627
|
BubbleMenuButton,
|
|
3342
3628
|
{
|
|
3343
3629
|
icon: Trash3,
|
|
@@ -3347,8 +3633,8 @@ function SectionBubbleMenu(props) {
|
|
|
3347
3633
|
}
|
|
3348
3634
|
}
|
|
3349
3635
|
),
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
/* @__PURE__ */
|
|
3636
|
+
/* @__PURE__ */ jsx35(Divider, {}),
|
|
3637
|
+
/* @__PURE__ */ jsx35(
|
|
3352
3638
|
ShowPopover,
|
|
3353
3639
|
{
|
|
3354
3640
|
showIfKey: state.currentShowIfKey,
|
|
@@ -3360,14 +3646,14 @@ function SectionBubbleMenu(props) {
|
|
|
3360
3646
|
editor
|
|
3361
3647
|
}
|
|
3362
3648
|
),
|
|
3363
|
-
state.isColumnsActive && /* @__PURE__ */
|
|
3364
|
-
/* @__PURE__ */
|
|
3365
|
-
/* @__PURE__ */
|
|
3366
|
-
/* @__PURE__ */
|
|
3649
|
+
state.isColumnsActive && /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
3650
|
+
/* @__PURE__ */ jsx35(Divider, {}),
|
|
3651
|
+
/* @__PURE__ */ jsxs18(Popover, { children: [
|
|
3652
|
+
/* @__PURE__ */ jsxs18(PopoverTrigger, { className: "mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-px-1.5 mly-text-sm data-[state=open]:mly-bg-soft-gray hover:mly-bg-soft-gray", children: [
|
|
3367
3653
|
"Column",
|
|
3368
|
-
/* @__PURE__ */
|
|
3654
|
+
/* @__PURE__ */ jsx35(ChevronUp2, { className: "mly-h-3 mly-w-3" })
|
|
3369
3655
|
] }),
|
|
3370
|
-
/* @__PURE__ */
|
|
3656
|
+
/* @__PURE__ */ jsx35(
|
|
3371
3657
|
PopoverContent,
|
|
3372
3658
|
{
|
|
3373
3659
|
className: "mly-w-max mly-rounded-lg !mly-p-0.5",
|
|
@@ -3380,7 +3666,7 @@ function SectionBubbleMenu(props) {
|
|
|
3380
3666
|
onCloseAutoFocus: (e) => {
|
|
3381
3667
|
e.preventDefault();
|
|
3382
3668
|
},
|
|
3383
|
-
children: /* @__PURE__ */
|
|
3669
|
+
children: /* @__PURE__ */ jsx35(ColumnsBubbleMenuContent, { editor })
|
|
3384
3670
|
}
|
|
3385
3671
|
)
|
|
3386
3672
|
] })
|
|
@@ -3498,7 +3784,7 @@ var useSpacerState = (editor) => {
|
|
|
3498
3784
|
};
|
|
3499
3785
|
|
|
3500
3786
|
// src/editor/components/spacer-menu/spacer-bubble-menu.tsx
|
|
3501
|
-
import { jsx as
|
|
3787
|
+
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3502
3788
|
function SpacerBubbleMenu(props) {
|
|
3503
3789
|
const { editor, appendTo } = props;
|
|
3504
3790
|
if (!editor) {
|
|
@@ -3519,12 +3805,12 @@ function SpacerBubbleMenu(props) {
|
|
|
3519
3805
|
}
|
|
3520
3806
|
});
|
|
3521
3807
|
const state = useSpacerState(editor);
|
|
3522
|
-
return /* @__PURE__ */
|
|
3808
|
+
return /* @__PURE__ */ jsxs19(
|
|
3523
3809
|
BubbleMenu5,
|
|
3524
3810
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
3525
3811
|
className: "mly-flex mly-gap-0.5 mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
3526
3812
|
children: [
|
|
3527
|
-
items.map((item, index) => /* @__PURE__ */
|
|
3813
|
+
items.map((item, index) => /* @__PURE__ */ jsx36(
|
|
3528
3814
|
BubbleMenuButton,
|
|
3529
3815
|
__spreadValues({
|
|
3530
3816
|
className: "!mly-h-7 mly-w-7 mly-shrink-0 mly-p-0",
|
|
@@ -3533,8 +3819,8 @@ function SpacerBubbleMenu(props) {
|
|
|
3533
3819
|
}, item),
|
|
3534
3820
|
index
|
|
3535
3821
|
)),
|
|
3536
|
-
/* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3822
|
+
/* @__PURE__ */ jsx36(Divider, {}),
|
|
3823
|
+
/* @__PURE__ */ jsx36(
|
|
3538
3824
|
ShowPopover,
|
|
3539
3825
|
{
|
|
3540
3826
|
showIfKey: state.currentShowIfKey,
|
|
@@ -3569,12 +3855,13 @@ var useTextMenuState = (editor) => {
|
|
|
3569
3855
|
const states = useEditorState6({
|
|
3570
3856
|
editor,
|
|
3571
3857
|
selector: (ctx) => {
|
|
3572
|
-
var _a, _b, _c, _d, _e;
|
|
3858
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3573
3859
|
return {
|
|
3574
3860
|
currentTextColor: ctx.editor.getAttributes("textStyle").color || DEFAULT_TEXT_COLOR,
|
|
3575
3861
|
linkUrl: (_a = ctx.editor) == null ? void 0 : _a.getAttributes("link").href,
|
|
3576
3862
|
textAlign: ((_b = ctx.editor) == null ? void 0 : _b.isActive({ textAlign: "left" })) ? "left" : ((_c = ctx.editor) == null ? void 0 : _c.isActive({ textAlign: "center" })) ? "center" : ((_d = ctx.editor) == null ? void 0 : _d.isActive({ textAlign: "right" })) ? "right" : ((_e = ctx.editor) == null ? void 0 : _e.isActive({ textAlign: "justify" })) ? "justify" : "left",
|
|
3577
|
-
isListActive: ctx.editor.isActive("bulletList") || ctx.editor.isActive("orderedList")
|
|
3863
|
+
isListActive: ctx.editor.isActive("bulletList") || ctx.editor.isActive("orderedList"),
|
|
3864
|
+
isUrlVariable: (_f = ctx.editor.getAttributes("link").isUrlVariable) != null ? _f : false
|
|
3578
3865
|
};
|
|
3579
3866
|
},
|
|
3580
3867
|
equalityFn: deepEql6
|
|
@@ -3620,15 +3907,15 @@ import { mergeAttributes as mergeAttributes4, Node as Node5 } from "@tiptap/core
|
|
|
3620
3907
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer2 } from "@tiptap/react";
|
|
3621
3908
|
|
|
3622
3909
|
// src/editor/nodes/link-card.tsx
|
|
3623
|
-
import { NodeViewWrapper as
|
|
3910
|
+
import { NodeViewWrapper as NodeViewWrapper4 } from "@tiptap/react";
|
|
3624
3911
|
|
|
3625
3912
|
// src/editor/components/input.tsx
|
|
3626
3913
|
import * as React5 from "react";
|
|
3627
|
-
import { jsx as
|
|
3914
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3628
3915
|
var Input = React5.forwardRef(
|
|
3629
3916
|
(_a, ref) => {
|
|
3630
3917
|
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
3631
|
-
return /* @__PURE__ */
|
|
3918
|
+
return /* @__PURE__ */ jsx37(
|
|
3632
3919
|
"input",
|
|
3633
3920
|
__spreadValues({
|
|
3634
3921
|
type,
|
|
@@ -3646,11 +3933,11 @@ Input.displayName = "Input";
|
|
|
3646
3933
|
|
|
3647
3934
|
// src/editor/components/textarea.tsx
|
|
3648
3935
|
import * as React6 from "react";
|
|
3649
|
-
import { jsx as
|
|
3936
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3650
3937
|
var Textarea = React6.forwardRef(
|
|
3651
3938
|
(_a, ref) => {
|
|
3652
3939
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3653
|
-
return /* @__PURE__ */
|
|
3940
|
+
return /* @__PURE__ */ jsx38(
|
|
3654
3941
|
"textarea",
|
|
3655
3942
|
__spreadValues({
|
|
3656
3943
|
className: cn(
|
|
@@ -3666,18 +3953,18 @@ var Textarea = React6.forwardRef(
|
|
|
3666
3953
|
Textarea.displayName = "Textarea";
|
|
3667
3954
|
|
|
3668
3955
|
// src/editor/nodes/link-card.tsx
|
|
3669
|
-
import { jsx as
|
|
3956
|
+
import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3670
3957
|
function LinkCardComponent(props) {
|
|
3671
3958
|
const { title, description, link, linkTitle, image: image2, badgeText, subTitle } = props.node.attrs;
|
|
3672
3959
|
const { getPos, editor } = props;
|
|
3673
|
-
return /* @__PURE__ */
|
|
3674
|
-
|
|
3960
|
+
return /* @__PURE__ */ jsx39(
|
|
3961
|
+
NodeViewWrapper4,
|
|
3675
3962
|
{
|
|
3676
3963
|
className: `react-component ${props.selected && "ProseMirror-selectednode"}`,
|
|
3677
3964
|
draggable: "true",
|
|
3678
3965
|
"data-drag-handle": "",
|
|
3679
|
-
children: /* @__PURE__ */
|
|
3680
|
-
/* @__PURE__ */
|
|
3966
|
+
children: /* @__PURE__ */ jsxs20(Popover, { open: props.selected, children: [
|
|
3967
|
+
/* @__PURE__ */ jsx39(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx39(
|
|
3681
3968
|
"div",
|
|
3682
3969
|
{
|
|
3683
3970
|
tabIndex: -1,
|
|
@@ -3686,8 +3973,8 @@ function LinkCardComponent(props) {
|
|
|
3686
3973
|
const pos = getPos();
|
|
3687
3974
|
editor.commands.setNodeSelection(pos);
|
|
3688
3975
|
},
|
|
3689
|
-
children: /* @__PURE__ */
|
|
3690
|
-
image2 && /* @__PURE__ */
|
|
3976
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "mly-no-prose mly-flex mly-flex-col mly-rounded-lg mly-border mly-border-gray-300", children: [
|
|
3977
|
+
image2 && /* @__PURE__ */ jsx39("div", { className: "mly-relative mly-mb-1.5 mly-w-full mly-shrink-0", children: /* @__PURE__ */ jsx39(
|
|
3691
3978
|
"img",
|
|
3692
3979
|
{
|
|
3693
3980
|
src: image2,
|
|
@@ -3695,23 +3982,23 @@ function LinkCardComponent(props) {
|
|
|
3695
3982
|
className: "mly-no-prose !mly-mb-0 mly-h-full mly-w-full mly-rounded-t-lg"
|
|
3696
3983
|
}
|
|
3697
3984
|
) }),
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
badgeText && /* @__PURE__ */
|
|
3985
|
+
/* @__PURE__ */ jsx39("div", { className: "mly-flex mly-items-stretch mly-p-3", children: /* @__PURE__ */ jsxs20("div", { className: cn("mly-flex mly-flex-col"), children: [
|
|
3986
|
+
/* @__PURE__ */ jsxs20("div", { className: "!mly-mb-1.5 mly-flex mly-items-center mly-gap-1.5", children: [
|
|
3987
|
+
/* @__PURE__ */ jsx39("h2", { className: "!mly-mb-0 !mly-text-lg mly-font-semibold", children: title }),
|
|
3988
|
+
badgeText && /* @__PURE__ */ jsx39("span", { className: "!mly-font-base text-xs mly-rounded-md mly-bg-yellow-200 mly-px-2 mly-py-1 mly-font-semibold mly-leading-none", children: badgeText }),
|
|
3702
3989
|
" ",
|
|
3703
|
-
subTitle && !badgeText && /* @__PURE__ */
|
|
3990
|
+
subTitle && !badgeText && /* @__PURE__ */ jsx39("span", { className: "!mly-font-base text-xs mly-font-regular mly-rounded-md mly-leading-none mly-text-gray-400", children: subTitle })
|
|
3704
3991
|
] }),
|
|
3705
|
-
/* @__PURE__ */
|
|
3992
|
+
/* @__PURE__ */ jsxs20("p", { className: "!mly-my-0 !mly-text-base mly-text-gray-500", children: [
|
|
3706
3993
|
description,
|
|
3707
3994
|
" ",
|
|
3708
|
-
linkTitle ? /* @__PURE__ */
|
|
3995
|
+
linkTitle ? /* @__PURE__ */ jsx39("a", { href: link, className: "mly-font-semibold", children: linkTitle }) : null
|
|
3709
3996
|
] })
|
|
3710
3997
|
] }) })
|
|
3711
3998
|
] })
|
|
3712
3999
|
}
|
|
3713
4000
|
) }),
|
|
3714
|
-
/* @__PURE__ */
|
|
4001
|
+
/* @__PURE__ */ jsxs20(
|
|
3715
4002
|
PopoverContent,
|
|
3716
4003
|
{
|
|
3717
4004
|
align: "end",
|
|
@@ -3720,9 +4007,9 @@ function LinkCardComponent(props) {
|
|
|
3720
4007
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
3721
4008
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
3722
4009
|
children: [
|
|
3723
|
-
/* @__PURE__ */
|
|
3724
|
-
/* @__PURE__ */
|
|
3725
|
-
/* @__PURE__ */
|
|
4010
|
+
/* @__PURE__ */ jsxs20("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
4011
|
+
/* @__PURE__ */ jsx39("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Image" }),
|
|
4012
|
+
/* @__PURE__ */ jsx39(
|
|
3726
4013
|
Input,
|
|
3727
4014
|
{
|
|
3728
4015
|
placeholder: "Add Image",
|
|
@@ -3736,9 +4023,9 @@ function LinkCardComponent(props) {
|
|
|
3736
4023
|
}
|
|
3737
4024
|
)
|
|
3738
4025
|
] }),
|
|
3739
|
-
/* @__PURE__ */
|
|
3740
|
-
/* @__PURE__ */
|
|
3741
|
-
/* @__PURE__ */
|
|
4026
|
+
/* @__PURE__ */ jsxs20("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
4027
|
+
/* @__PURE__ */ jsx39("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Title" }),
|
|
4028
|
+
/* @__PURE__ */ jsx39(
|
|
3742
4029
|
Input,
|
|
3743
4030
|
{
|
|
3744
4031
|
placeholder: "Add title",
|
|
@@ -3751,9 +4038,9 @@ function LinkCardComponent(props) {
|
|
|
3751
4038
|
}
|
|
3752
4039
|
)
|
|
3753
4040
|
] }),
|
|
3754
|
-
/* @__PURE__ */
|
|
3755
|
-
/* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
4041
|
+
/* @__PURE__ */ jsxs20("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
4042
|
+
/* @__PURE__ */ jsx39("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Description" }),
|
|
4043
|
+
/* @__PURE__ */ jsx39(
|
|
3757
4044
|
Textarea,
|
|
3758
4045
|
{
|
|
3759
4046
|
placeholder: "Add description here",
|
|
@@ -3766,10 +4053,10 @@ function LinkCardComponent(props) {
|
|
|
3766
4053
|
}
|
|
3767
4054
|
)
|
|
3768
4055
|
] }),
|
|
3769
|
-
/* @__PURE__ */
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
/* @__PURE__ */
|
|
3772
|
-
/* @__PURE__ */
|
|
4056
|
+
/* @__PURE__ */ jsxs20("div", { className: "mly-grid mly-grid-cols-2 mly-gap-2", children: [
|
|
4057
|
+
/* @__PURE__ */ jsxs20("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
4058
|
+
/* @__PURE__ */ jsx39("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Link Title" }),
|
|
4059
|
+
/* @__PURE__ */ jsx39(
|
|
3773
4060
|
Input,
|
|
3774
4061
|
{
|
|
3775
4062
|
placeholder: "Add link title here",
|
|
@@ -3782,9 +4069,9 @@ function LinkCardComponent(props) {
|
|
|
3782
4069
|
}
|
|
3783
4070
|
)
|
|
3784
4071
|
] }),
|
|
3785
|
-
/* @__PURE__ */
|
|
3786
|
-
/* @__PURE__ */
|
|
3787
|
-
/* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ jsxs20("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
4073
|
+
/* @__PURE__ */ jsx39("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Link" }),
|
|
4074
|
+
/* @__PURE__ */ jsx39(
|
|
3788
4075
|
Input,
|
|
3789
4076
|
{
|
|
3790
4077
|
placeholder: "Add link here",
|
|
@@ -3798,10 +4085,10 @@ function LinkCardComponent(props) {
|
|
|
3798
4085
|
)
|
|
3799
4086
|
] })
|
|
3800
4087
|
] }),
|
|
3801
|
-
/* @__PURE__ */
|
|
3802
|
-
/* @__PURE__ */
|
|
3803
|
-
/* @__PURE__ */
|
|
3804
|
-
/* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ jsxs20("div", { className: "mly-grid mly-grid-cols-2 mly-gap-2", children: [
|
|
4089
|
+
/* @__PURE__ */ jsxs20("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
4090
|
+
/* @__PURE__ */ jsx39("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Badge Text" }),
|
|
4091
|
+
/* @__PURE__ */ jsx39(
|
|
3805
4092
|
Input,
|
|
3806
4093
|
{
|
|
3807
4094
|
placeholder: "Add badge text here",
|
|
@@ -3814,9 +4101,9 @@ function LinkCardComponent(props) {
|
|
|
3814
4101
|
}
|
|
3815
4102
|
)
|
|
3816
4103
|
] }),
|
|
3817
|
-
/* @__PURE__ */
|
|
3818
|
-
/* @__PURE__ */
|
|
3819
|
-
/* @__PURE__ */
|
|
4104
|
+
/* @__PURE__ */ jsxs20("label", { className: "mly-w-full mly-space-y-1", children: [
|
|
4105
|
+
/* @__PURE__ */ jsx39("span", { className: "mly-text-xs mly-font-normal mly-text-slate-400", children: "Sub Title" }),
|
|
4106
|
+
/* @__PURE__ */ jsx39(
|
|
3820
4107
|
Input,
|
|
3821
4108
|
{
|
|
3822
4109
|
placeholder: "Add sub title here",
|
|
@@ -3914,23 +4201,94 @@ import { mergeAttributes as mergeAttributes5, Node as Node6 } from "@tiptap/core
|
|
|
3914
4201
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer3 } from "@tiptap/react";
|
|
3915
4202
|
|
|
3916
4203
|
// src/editor/nodes/button/button-view.tsx
|
|
3917
|
-
import { NodeViewWrapper as
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
4204
|
+
import { NodeViewWrapper as NodeViewWrapper5 } from "@tiptap/react";
|
|
4205
|
+
|
|
4206
|
+
// src/editor/nodes/button/button-label-input.tsx
|
|
4207
|
+
import { BracesIcon as BracesIcon3 } from "lucide-react";
|
|
4208
|
+
import { useMemo as useMemo6 } from "react";
|
|
4209
|
+
import { useState as useState10 } from "react";
|
|
4210
|
+
import { useRef as useRef9 } from "react";
|
|
4211
|
+
import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4212
|
+
function ButtonLabelInput(props) {
|
|
4213
|
+
const { value, onValueChange, isVariable, editor } = props;
|
|
4214
|
+
const linkInputRef = useRef9(null);
|
|
4215
|
+
const [isEditing, setIsEditing] = useState10(!isVariable);
|
|
3922
4216
|
const {
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
4217
|
+
variables = [],
|
|
4218
|
+
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR
|
|
4219
|
+
} = useMailyContext();
|
|
4220
|
+
const autoCompleteOptions = useMemo6(() => {
|
|
4221
|
+
const withoutTrigger = value.replace(
|
|
4222
|
+
new RegExp(variableTriggerCharacter, "g"),
|
|
4223
|
+
""
|
|
4224
|
+
);
|
|
4225
|
+
return processVariables(variables, {
|
|
4226
|
+
query: withoutTrigger || "",
|
|
4227
|
+
from: "variable",
|
|
4228
|
+
editor
|
|
4229
|
+
}).map((variable) => variable.name);
|
|
4230
|
+
}, [variables, value, editor]);
|
|
4231
|
+
return /* @__PURE__ */ jsxs21("div", { className: "mly-isolate mly-flex mly-rounded-lg", children: [
|
|
4232
|
+
!isEditing && /* @__PURE__ */ jsxs21(
|
|
4233
|
+
"button",
|
|
4234
|
+
{
|
|
4235
|
+
className: "mly-inline-grid mly-h-7 mly-min-w-28 mly-max-w-xs mly-grid-cols-[12px_1fr] mly-items-center mly-gap-1.5 mly-rounded-md mly-border mly-px-2 mly-font-mono mly-text-sm hover:mly-bg-soft-gray",
|
|
4236
|
+
onClick: () => {
|
|
4237
|
+
setIsEditing(true);
|
|
4238
|
+
setTimeout(() => {
|
|
4239
|
+
var _a;
|
|
4240
|
+
(_a = linkInputRef.current) == null ? void 0 : _a.focus();
|
|
4241
|
+
}, 0);
|
|
4242
|
+
},
|
|
4243
|
+
children: [
|
|
4244
|
+
/* @__PURE__ */ jsx40(BracesIcon3, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
4245
|
+
/* @__PURE__ */ jsx40("span", { className: "mly-min-w-0 mly-truncate mly-text-left", children: value })
|
|
4246
|
+
]
|
|
4247
|
+
}
|
|
4248
|
+
),
|
|
4249
|
+
isEditing && /* @__PURE__ */ jsx40(
|
|
4250
|
+
InputAutocomplete,
|
|
4251
|
+
{
|
|
4252
|
+
value,
|
|
4253
|
+
onValueChange: (value2) => {
|
|
4254
|
+
onValueChange == null ? void 0 : onValueChange(value2);
|
|
4255
|
+
},
|
|
4256
|
+
autoCompleteOptions,
|
|
4257
|
+
ref: linkInputRef,
|
|
4258
|
+
placeholder: "maily.to/",
|
|
4259
|
+
className: "mly-h-7 mly-w-40 mly-rounded-md mly-px-2 mly-pr-6 mly-text-sm mly-text-midnight-gray hover:mly-bg-soft-gray focus:mly-bg-soft-gray focus:mly-outline-none",
|
|
4260
|
+
triggerChar: variableTriggerCharacter,
|
|
4261
|
+
onSelectOption: (value2) => {
|
|
4262
|
+
var _a;
|
|
4263
|
+
const isVariable2 = (_a = autoCompleteOptions.includes(value2)) != null ? _a : false;
|
|
4264
|
+
if (isVariable2) {
|
|
4265
|
+
setIsEditing(false);
|
|
4266
|
+
}
|
|
4267
|
+
onValueChange == null ? void 0 : onValueChange(value2, isVariable2);
|
|
4268
|
+
}
|
|
4269
|
+
}
|
|
4270
|
+
)
|
|
4271
|
+
] });
|
|
4272
|
+
}
|
|
4273
|
+
|
|
4274
|
+
// src/editor/nodes/button/button-view.tsx
|
|
4275
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4276
|
+
function ButtonView(props) {
|
|
4277
|
+
const { node, editor, getPos, updateAttributes: updateAttributes2 } = props;
|
|
4278
|
+
const {
|
|
4279
|
+
text: text2,
|
|
4280
|
+
isTextVariable,
|
|
4281
|
+
alignment,
|
|
4282
|
+
variant,
|
|
4283
|
+
borderRadius: _radius,
|
|
4284
|
+
buttonColor,
|
|
3928
4285
|
textColor,
|
|
3929
4286
|
url: externalLink,
|
|
3930
|
-
showIfKey = ""
|
|
4287
|
+
showIfKey = "",
|
|
4288
|
+
isUrlVariable
|
|
3931
4289
|
} = node.attrs;
|
|
3932
|
-
return /* @__PURE__ */
|
|
3933
|
-
|
|
4290
|
+
return /* @__PURE__ */ jsx41(
|
|
4291
|
+
NodeViewWrapper5,
|
|
3934
4292
|
{
|
|
3935
4293
|
draggable: "true",
|
|
3936
4294
|
"data-drag-handle": "",
|
|
@@ -3938,8 +4296,8 @@ function ButtonView(props) {
|
|
|
3938
4296
|
style: {
|
|
3939
4297
|
textAlign: alignment
|
|
3940
4298
|
},
|
|
3941
|
-
children: /* @__PURE__ */
|
|
3942
|
-
/* @__PURE__ */
|
|
4299
|
+
children: /* @__PURE__ */ jsxs22(Popover, { open: props.selected, children: [
|
|
4300
|
+
/* @__PURE__ */ jsx41(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx41("div", { children: /* @__PURE__ */ jsx41(
|
|
3943
4301
|
"button",
|
|
3944
4302
|
{
|
|
3945
4303
|
className: cn(
|
|
@@ -3968,7 +4326,7 @@ function ButtonView(props) {
|
|
|
3968
4326
|
children: text2
|
|
3969
4327
|
}
|
|
3970
4328
|
) }) }),
|
|
3971
|
-
/* @__PURE__ */
|
|
4329
|
+
/* @__PURE__ */ jsx41(
|
|
3972
4330
|
PopoverContent,
|
|
3973
4331
|
{
|
|
3974
4332
|
align: "end",
|
|
@@ -3977,25 +4335,24 @@ function ButtonView(props) {
|
|
|
3977
4335
|
sideOffset: 8,
|
|
3978
4336
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
3979
4337
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
3980
|
-
children: /* @__PURE__ */
|
|
3981
|
-
/* @__PURE__ */
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
/* @__PURE__ */
|
|
3997
|
-
|
|
3998
|
-
/* @__PURE__ */ jsx38(
|
|
4338
|
+
children: /* @__PURE__ */ jsx41(TooltipProvider, { children: /* @__PURE__ */ jsxs22("div", { className: "mly-flex mly-items-stretch mly-text-midnight-gray", children: [
|
|
4339
|
+
/* @__PURE__ */ jsx41(
|
|
4340
|
+
ButtonLabelInput,
|
|
4341
|
+
{
|
|
4342
|
+
value: text2,
|
|
4343
|
+
onValueChange: (value, isVariable) => {
|
|
4344
|
+
updateAttributes2({
|
|
4345
|
+
text: value,
|
|
4346
|
+
isTextVariable: isVariable != null ? isVariable : false
|
|
4347
|
+
});
|
|
4348
|
+
},
|
|
4349
|
+
isVariable: isTextVariable,
|
|
4350
|
+
editor
|
|
4351
|
+
}
|
|
4352
|
+
),
|
|
4353
|
+
/* @__PURE__ */ jsx41(Divider, {}),
|
|
4354
|
+
/* @__PURE__ */ jsxs22("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
4355
|
+
/* @__PURE__ */ jsx41(
|
|
3999
4356
|
Select,
|
|
4000
4357
|
{
|
|
4001
4358
|
label: "Border Radius",
|
|
@@ -4013,7 +4370,7 @@ function ButtonView(props) {
|
|
|
4013
4370
|
className: "mly-capitalize"
|
|
4014
4371
|
}
|
|
4015
4372
|
),
|
|
4016
|
-
/* @__PURE__ */
|
|
4373
|
+
/* @__PURE__ */ jsx41(
|
|
4017
4374
|
Select,
|
|
4018
4375
|
{
|
|
4019
4376
|
label: "Style",
|
|
@@ -4032,9 +4389,9 @@ function ButtonView(props) {
|
|
|
4032
4389
|
}
|
|
4033
4390
|
)
|
|
4034
4391
|
] }),
|
|
4035
|
-
/* @__PURE__ */
|
|
4036
|
-
/* @__PURE__ */
|
|
4037
|
-
/* @__PURE__ */
|
|
4392
|
+
/* @__PURE__ */ jsx41(Divider, {}),
|
|
4393
|
+
/* @__PURE__ */ jsxs22("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
4394
|
+
/* @__PURE__ */ jsx41(
|
|
4038
4395
|
AlignmentSwitch,
|
|
4039
4396
|
{
|
|
4040
4397
|
alignment,
|
|
@@ -4045,22 +4402,25 @@ function ButtonView(props) {
|
|
|
4045
4402
|
}
|
|
4046
4403
|
}
|
|
4047
4404
|
),
|
|
4048
|
-
/* @__PURE__ */
|
|
4405
|
+
/* @__PURE__ */ jsx41(
|
|
4049
4406
|
LinkInputPopover,
|
|
4050
4407
|
{
|
|
4051
4408
|
defaultValue: externalLink || "",
|
|
4052
|
-
onValueChange: (value) => {
|
|
4409
|
+
onValueChange: (value, isVariable) => {
|
|
4053
4410
|
updateAttributes2({
|
|
4054
|
-
url: value
|
|
4411
|
+
url: value,
|
|
4412
|
+
isUrlVariable: isVariable != null ? isVariable : false
|
|
4055
4413
|
});
|
|
4056
4414
|
},
|
|
4057
|
-
tooltip: "Update External Link"
|
|
4415
|
+
tooltip: "Update External Link",
|
|
4416
|
+
editor,
|
|
4417
|
+
isVariable: isUrlVariable
|
|
4058
4418
|
}
|
|
4059
4419
|
)
|
|
4060
4420
|
] }),
|
|
4061
|
-
/* @__PURE__ */
|
|
4062
|
-
/* @__PURE__ */
|
|
4063
|
-
/* @__PURE__ */
|
|
4421
|
+
/* @__PURE__ */ jsx41(Divider, {}),
|
|
4422
|
+
/* @__PURE__ */ jsxs22("div", { className: "mly-flex mly-space-x-0.5", children: [
|
|
4423
|
+
/* @__PURE__ */ jsx41(
|
|
4064
4424
|
BackgroundColorPickerPopup,
|
|
4065
4425
|
{
|
|
4066
4426
|
variant,
|
|
@@ -4072,7 +4432,7 @@ function ButtonView(props) {
|
|
|
4072
4432
|
}
|
|
4073
4433
|
}
|
|
4074
4434
|
),
|
|
4075
|
-
/* @__PURE__ */
|
|
4435
|
+
/* @__PURE__ */ jsx41(
|
|
4076
4436
|
TextColorPickerPopup,
|
|
4077
4437
|
{
|
|
4078
4438
|
color: textColor,
|
|
@@ -4084,8 +4444,8 @@ function ButtonView(props) {
|
|
|
4084
4444
|
}
|
|
4085
4445
|
)
|
|
4086
4446
|
] }),
|
|
4087
|
-
/* @__PURE__ */
|
|
4088
|
-
/* @__PURE__ */
|
|
4447
|
+
/* @__PURE__ */ jsx41(Divider, {}),
|
|
4448
|
+
/* @__PURE__ */ jsx41(
|
|
4089
4449
|
ShowPopover,
|
|
4090
4450
|
{
|
|
4091
4451
|
showIfKey,
|
|
@@ -4106,20 +4466,20 @@ function ButtonView(props) {
|
|
|
4106
4466
|
}
|
|
4107
4467
|
function BackgroundColorPickerPopup(props) {
|
|
4108
4468
|
const { color, onChange, variant } = props;
|
|
4109
|
-
return /* @__PURE__ */
|
|
4469
|
+
return /* @__PURE__ */ jsx41(
|
|
4110
4470
|
ColorPicker,
|
|
4111
4471
|
{
|
|
4112
4472
|
color,
|
|
4113
4473
|
onColorChange: onChange,
|
|
4114
4474
|
tooltip: "Background Color",
|
|
4115
|
-
children: /* @__PURE__ */
|
|
4475
|
+
children: /* @__PURE__ */ jsx41(
|
|
4116
4476
|
BaseButton,
|
|
4117
4477
|
{
|
|
4118
4478
|
variant: "ghost",
|
|
4119
4479
|
size: "sm",
|
|
4120
4480
|
type: "button",
|
|
4121
4481
|
className: "mly-size-7",
|
|
4122
|
-
children: /* @__PURE__ */
|
|
4482
|
+
children: /* @__PURE__ */ jsx41(
|
|
4123
4483
|
"div",
|
|
4124
4484
|
{
|
|
4125
4485
|
className: "mly-h-4 mly-w-4 mly-shrink-0 mly-rounded-full mly-shadow",
|
|
@@ -4138,16 +4498,16 @@ function BackgroundColorPickerPopup(props) {
|
|
|
4138
4498
|
}
|
|
4139
4499
|
function TextColorPickerPopup(props) {
|
|
4140
4500
|
const { color, onChange } = props;
|
|
4141
|
-
return /* @__PURE__ */
|
|
4501
|
+
return /* @__PURE__ */ jsx41(ColorPicker, { color, onColorChange: onChange, tooltip: "Text Color", children: /* @__PURE__ */ jsx41(
|
|
4142
4502
|
BaseButton,
|
|
4143
4503
|
{
|
|
4144
4504
|
variant: "ghost",
|
|
4145
4505
|
size: "sm",
|
|
4146
4506
|
type: "button",
|
|
4147
4507
|
className: "mly-size-7",
|
|
4148
|
-
children: /* @__PURE__ */
|
|
4149
|
-
/* @__PURE__ */
|
|
4150
|
-
/* @__PURE__ */
|
|
4508
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]", children: [
|
|
4509
|
+
/* @__PURE__ */ jsx41("span", { className: "mly-font-bolder mly-font-mono mly-text-xs mly-text-midnight-gray", children: "A" }),
|
|
4510
|
+
/* @__PURE__ */ jsx41(
|
|
4151
4511
|
"div",
|
|
4152
4512
|
{
|
|
4153
4513
|
className: "mly-h-[2px] mly-w-3 mly-shrink-0 mly-rounded-md mly-shadow",
|
|
@@ -4185,6 +4545,20 @@ var ButtonExtension = Node6.create({
|
|
|
4185
4545
|
};
|
|
4186
4546
|
}
|
|
4187
4547
|
},
|
|
4548
|
+
isTextVariable: {
|
|
4549
|
+
default: false,
|
|
4550
|
+
parseHTML: (element) => {
|
|
4551
|
+
return element.getAttribute("data-is-text-variable") === "true";
|
|
4552
|
+
},
|
|
4553
|
+
renderHTML: (attributes) => {
|
|
4554
|
+
if (!attributes.isTextVariable) {
|
|
4555
|
+
return {};
|
|
4556
|
+
}
|
|
4557
|
+
return {
|
|
4558
|
+
"data-is-text-variable": "true"
|
|
4559
|
+
};
|
|
4560
|
+
}
|
|
4561
|
+
},
|
|
4188
4562
|
url: {
|
|
4189
4563
|
default: "",
|
|
4190
4564
|
parseHTML: (element) => {
|
|
@@ -4196,6 +4570,23 @@ var ButtonExtension = Node6.create({
|
|
|
4196
4570
|
};
|
|
4197
4571
|
}
|
|
4198
4572
|
},
|
|
4573
|
+
// Later we will remove this attribute
|
|
4574
|
+
// and use the `url` attribute instead when implement
|
|
4575
|
+
// the URL variable feature
|
|
4576
|
+
isUrlVariable: {
|
|
4577
|
+
default: false,
|
|
4578
|
+
parseHTML: (element) => {
|
|
4579
|
+
return element.getAttribute("data-is-url-variable") === "true";
|
|
4580
|
+
},
|
|
4581
|
+
renderHTML: (attributes) => {
|
|
4582
|
+
if (!attributes.isUrlVariable) {
|
|
4583
|
+
return {};
|
|
4584
|
+
}
|
|
4585
|
+
return {
|
|
4586
|
+
"data-is-url-variable": "true"
|
|
4587
|
+
};
|
|
4588
|
+
}
|
|
4589
|
+
},
|
|
4199
4590
|
alignment: {
|
|
4200
4591
|
default: DEFAULT_BUTTON_ALIGNMENT,
|
|
4201
4592
|
parseHTML: (element) => {
|
|
@@ -4307,115 +4698,6 @@ import { mergeAttributes as mergeAttributes6, Node as Node7 } from "@tiptap/core
|
|
|
4307
4698
|
import { PluginKey } from "@tiptap/pm/state";
|
|
4308
4699
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer4 } from "@tiptap/react";
|
|
4309
4700
|
import Suggestion from "@tiptap/suggestion";
|
|
4310
|
-
|
|
4311
|
-
// src/editor/nodes/variable/variable-view.tsx
|
|
4312
|
-
import { NodeViewWrapper as NodeViewWrapper5 } from "@tiptap/react";
|
|
4313
|
-
import { AlertTriangle, Braces as Braces3, Pencil as Pencil2 } from "lucide-react";
|
|
4314
|
-
import { useMemo as useMemo5 } from "react";
|
|
4315
|
-
import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4316
|
-
function VariableView(props) {
|
|
4317
|
-
var _a;
|
|
4318
|
-
const { node, selected, updateAttributes: updateAttributes2, editor } = props;
|
|
4319
|
-
const { id, fallback, showIfKey = "" } = node.attrs;
|
|
4320
|
-
const { variables = [] } = useMailyContext();
|
|
4321
|
-
const eachKey = ((_a = editor == null ? void 0 : editor.getAttributes("for")) == null ? void 0 : _a.each) || "";
|
|
4322
|
-
const isRequired = useMemo5(() => {
|
|
4323
|
-
var _a2;
|
|
4324
|
-
const variable = processVariables(variables, {
|
|
4325
|
-
query: "",
|
|
4326
|
-
from: "variable",
|
|
4327
|
-
editor
|
|
4328
|
-
}).find((variable2) => variable2.name === id);
|
|
4329
|
-
return (_a2 = variable == null ? void 0 : variable.required) != null ? _a2 : true;
|
|
4330
|
-
}, [variables, id, editor, eachKey]);
|
|
4331
|
-
return /* @__PURE__ */ jsx39(
|
|
4332
|
-
NodeViewWrapper5,
|
|
4333
|
-
{
|
|
4334
|
-
className: cn(
|
|
4335
|
-
"react-component",
|
|
4336
|
-
selected && "ProseMirror-selectednode",
|
|
4337
|
-
"mly-inline-block mly-leading-none"
|
|
4338
|
-
),
|
|
4339
|
-
draggable: "false",
|
|
4340
|
-
children: /* @__PURE__ */ jsxs20(Popover, { children: [
|
|
4341
|
-
/* @__PURE__ */ jsx39(PopoverTrigger, { children: /* @__PURE__ */ jsxs20(
|
|
4342
|
-
"span",
|
|
4343
|
-
{
|
|
4344
|
-
tabIndex: -1,
|
|
4345
|
-
className: "mly-inline-flex mly-items-center mly-gap-[var(--variable-icon-gap)] mly-rounded-full mly-border mly-px-1.5 mly-py-0.5 mly-leading-none",
|
|
4346
|
-
children: [
|
|
4347
|
-
/* @__PURE__ */ jsx39(Braces3, { className: "mly-size-[var(--variable-icon-size)] mly-shrink-0 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
4348
|
-
id,
|
|
4349
|
-
isRequired && !fallback && /* @__PURE__ */ jsx39(AlertTriangle, { className: "mly-size-[var(--variable-icon-size)] mly-shrink-0 mly-stroke-[2.5]" })
|
|
4350
|
-
]
|
|
4351
|
-
}
|
|
4352
|
-
) }),
|
|
4353
|
-
/* @__PURE__ */ jsx39(
|
|
4354
|
-
PopoverContent,
|
|
4355
|
-
{
|
|
4356
|
-
align: "start",
|
|
4357
|
-
side: "bottom",
|
|
4358
|
-
className: "mly-w-max mly-rounded-lg !mly-p-0.5",
|
|
4359
|
-
sideOffset: 8,
|
|
4360
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
4361
|
-
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
4362
|
-
children: /* @__PURE__ */ jsx39(TooltipProvider, { children: /* @__PURE__ */ jsxs20("div", { className: "mly-flex mly-items-stretch mly-text-midnight-gray", children: [
|
|
4363
|
-
/* @__PURE__ */ jsxs20("label", { className: "mly-relative", children: [
|
|
4364
|
-
/* @__PURE__ */ jsx39("span", { className: "mly-inline-block mly-px-2 mly-text-xs mly-text-midnight-gray", children: "Variable" }),
|
|
4365
|
-
/* @__PURE__ */ jsx39(
|
|
4366
|
-
"input",
|
|
4367
|
-
{
|
|
4368
|
-
value: id != null ? id : "",
|
|
4369
|
-
onChange: (e) => {
|
|
4370
|
-
updateAttributes2({
|
|
4371
|
-
id: e.target.value
|
|
4372
|
-
});
|
|
4373
|
-
},
|
|
4374
|
-
placeholder: "ie. name...",
|
|
4375
|
-
className: "mly-h-7 mly-w-36 mly-rounded-md mly-bg-soft-gray mly-px-2 mly-text-sm mly-text-midnight-gray focus:mly-bg-soft-gray focus:mly-outline-none"
|
|
4376
|
-
}
|
|
4377
|
-
)
|
|
4378
|
-
] }),
|
|
4379
|
-
/* @__PURE__ */ jsx39(Divider, { className: "mly-mx-1.5" }),
|
|
4380
|
-
/* @__PURE__ */ jsxs20("label", { className: "mly-relative", children: [
|
|
4381
|
-
/* @__PURE__ */ jsx39("span", { className: "mly-inline-block mly-px-2 mly-pl-1 mly-text-xs mly-text-midnight-gray", children: "Default" }),
|
|
4382
|
-
/* @__PURE__ */ jsx39(
|
|
4383
|
-
"input",
|
|
4384
|
-
{
|
|
4385
|
-
value: fallback != null ? fallback : "",
|
|
4386
|
-
onChange: (e) => {
|
|
4387
|
-
updateAttributes2({
|
|
4388
|
-
fallback: e.target.value
|
|
4389
|
-
});
|
|
4390
|
-
},
|
|
4391
|
-
placeholder: "ie. John Doe...",
|
|
4392
|
-
className: "mly-h-7 mly-w-32 mly-rounded-md mly-bg-soft-gray mly-px-2 mly-pr-6 mly-text-sm mly-text-midnight-gray focus:mly-bg-soft-gray focus:mly-outline-none"
|
|
4393
|
-
}
|
|
4394
|
-
),
|
|
4395
|
-
/* @__PURE__ */ jsx39("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ jsx39(Pencil2, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
|
|
4396
|
-
] }),
|
|
4397
|
-
/* @__PURE__ */ jsx39(Divider, {}),
|
|
4398
|
-
/* @__PURE__ */ jsx39(
|
|
4399
|
-
ShowPopover,
|
|
4400
|
-
{
|
|
4401
|
-
showIfKey,
|
|
4402
|
-
onShowIfKeyValueChange: (value) => {
|
|
4403
|
-
updateAttributes2({
|
|
4404
|
-
showIfKey: value
|
|
4405
|
-
});
|
|
4406
|
-
},
|
|
4407
|
-
editor
|
|
4408
|
-
}
|
|
4409
|
-
)
|
|
4410
|
-
] }) })
|
|
4411
|
-
}
|
|
4412
|
-
)
|
|
4413
|
-
] })
|
|
4414
|
-
}
|
|
4415
|
-
);
|
|
4416
|
-
}
|
|
4417
|
-
|
|
4418
|
-
// src/editor/nodes/variable/variable.ts
|
|
4419
4701
|
var VariablePluginKey = new PluginKey("variable");
|
|
4420
4702
|
var VariableExtension = Node7.create({
|
|
4421
4703
|
name: "variable",
|
|
@@ -4499,17 +4781,13 @@ var VariableExtension = Node7.create({
|
|
|
4499
4781
|
};
|
|
4500
4782
|
}
|
|
4501
4783
|
},
|
|
4502
|
-
|
|
4503
|
-
default:
|
|
4504
|
-
parseHTML: (element) =>
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
renderHTML(attributes) {
|
|
4508
|
-
if (!attributes.showIfKey) {
|
|
4509
|
-
return {};
|
|
4510
|
-
}
|
|
4784
|
+
required: {
|
|
4785
|
+
default: true,
|
|
4786
|
+
parseHTML: (element) => element.hasAttribute("data-required"),
|
|
4787
|
+
renderHTML: (attributes) => {
|
|
4788
|
+
var _a;
|
|
4511
4789
|
return {
|
|
4512
|
-
"data-
|
|
4790
|
+
"data-required": (_a = attributes == null ? void 0 : attributes.required) != null ? _a : true
|
|
4513
4791
|
};
|
|
4514
4792
|
}
|
|
4515
4793
|
}
|
|
@@ -4518,13 +4796,13 @@ var VariableExtension = Node7.create({
|
|
|
4518
4796
|
parseHTML() {
|
|
4519
4797
|
return [
|
|
4520
4798
|
{
|
|
4521
|
-
tag: `
|
|
4799
|
+
tag: `div[data-type="${this.name}"]`
|
|
4522
4800
|
}
|
|
4523
4801
|
];
|
|
4524
4802
|
},
|
|
4525
4803
|
renderHTML({ node, HTMLAttributes: HTMLAttributes2 }) {
|
|
4526
4804
|
return [
|
|
4527
|
-
"
|
|
4805
|
+
"div",
|
|
4528
4806
|
mergeAttributes6(
|
|
4529
4807
|
{ "data-type": this.name },
|
|
4530
4808
|
this.options.HTMLAttributes,
|
|
@@ -4575,7 +4853,8 @@ var VariableExtension = Node7.create({
|
|
|
4575
4853
|
},
|
|
4576
4854
|
addNodeView() {
|
|
4577
4855
|
return ReactNodeViewRenderer4(VariableView, {
|
|
4578
|
-
className: "mly-relative"
|
|
4856
|
+
className: "mly-relative mly-inline-block",
|
|
4857
|
+
as: "div"
|
|
4579
4858
|
});
|
|
4580
4859
|
}
|
|
4581
4860
|
});
|
|
@@ -4623,6 +4902,40 @@ var ImageExtension = TiptapImage2.extend({
|
|
|
4623
4902
|
return externalLink ? { externalLink } : null;
|
|
4624
4903
|
}
|
|
4625
4904
|
},
|
|
4905
|
+
// Later we will remove this attribute
|
|
4906
|
+
// and use the `externalLink` attribute instead
|
|
4907
|
+
// when implement the URL variable feature
|
|
4908
|
+
isExternalLinkVariable: {
|
|
4909
|
+
default: false,
|
|
4910
|
+
parseHTML: (element) => {
|
|
4911
|
+
return element.getAttribute("data-is-external-link-variable") === "true";
|
|
4912
|
+
},
|
|
4913
|
+
renderHTML: (attributes) => {
|
|
4914
|
+
if (!attributes.isExternalLinkVariable) {
|
|
4915
|
+
return {};
|
|
4916
|
+
}
|
|
4917
|
+
return {
|
|
4918
|
+
"data-is-external-link-variable": "true"
|
|
4919
|
+
};
|
|
4920
|
+
}
|
|
4921
|
+
},
|
|
4922
|
+
// Later we will remove this attribute
|
|
4923
|
+
// and use the `src` attribute instead when implement
|
|
4924
|
+
// the URL variable feature
|
|
4925
|
+
isSrcVariable: {
|
|
4926
|
+
default: false,
|
|
4927
|
+
parseHTML: (element) => {
|
|
4928
|
+
return element.getAttribute("data-is-src-variable") === "true";
|
|
4929
|
+
},
|
|
4930
|
+
renderHTML: (attributes) => {
|
|
4931
|
+
if (!attributes.isSrcVariable) {
|
|
4932
|
+
return {};
|
|
4933
|
+
}
|
|
4934
|
+
return {
|
|
4935
|
+
"data-is-src-variable": "true"
|
|
4936
|
+
};
|
|
4937
|
+
}
|
|
4938
|
+
},
|
|
4626
4939
|
showIfKey: {
|
|
4627
4940
|
default: DEFAULT_SECTION_SHOW_IF_KEY,
|
|
4628
4941
|
parseHTML: (element) => {
|
|
@@ -4775,10 +5088,10 @@ import { ReactNodeViewRenderer as ReactNodeViewRenderer6 } from "@tiptap/react";
|
|
|
4775
5088
|
// src/editor/nodes/for/for-view.tsx
|
|
4776
5089
|
import { NodeViewWrapper as NodeViewWrapper6, NodeViewContent } from "@tiptap/react";
|
|
4777
5090
|
import { Repeat2 as Repeat22 } from "lucide-react";
|
|
4778
|
-
import { jsx as
|
|
5091
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4779
5092
|
function ForView(props) {
|
|
4780
5093
|
const { editor, getPos } = props;
|
|
4781
|
-
return /* @__PURE__ */
|
|
5094
|
+
return /* @__PURE__ */ jsxs23(
|
|
4782
5095
|
NodeViewWrapper6,
|
|
4783
5096
|
{
|
|
4784
5097
|
draggable: "true",
|
|
@@ -4786,8 +5099,8 @@ function ForView(props) {
|
|
|
4786
5099
|
"data-type": "for",
|
|
4787
5100
|
className: "mly-relative",
|
|
4788
5101
|
children: [
|
|
4789
|
-
/* @__PURE__ */
|
|
4790
|
-
/* @__PURE__ */
|
|
5102
|
+
/* @__PURE__ */ jsx42(NodeViewContent, { className: "is-editable" }),
|
|
5103
|
+
/* @__PURE__ */ jsxs23(
|
|
4791
5104
|
"div",
|
|
4792
5105
|
{
|
|
4793
5106
|
role: "button",
|
|
@@ -4798,8 +5111,8 @@ function ForView(props) {
|
|
|
4798
5111
|
editor.commands.setNodeSelection(getPos());
|
|
4799
5112
|
},
|
|
4800
5113
|
children: [
|
|
4801
|
-
/* @__PURE__ */
|
|
4802
|
-
/* @__PURE__ */
|
|
5114
|
+
/* @__PURE__ */ jsx42(Repeat22, { className: "mly-size-3 mly-stroke-[2.5] mly-text-midnight-gray" }),
|
|
5115
|
+
/* @__PURE__ */ jsx42("div", { className: "mly-w-[1.5px] mly-grow mly-rounded-full mly-bg-rose-300" })
|
|
4803
5116
|
]
|
|
4804
5117
|
}
|
|
4805
5118
|
)
|
|
@@ -4891,7 +5204,7 @@ var ForExtension = Node9.create({
|
|
|
4891
5204
|
});
|
|
4892
5205
|
|
|
4893
5206
|
// src/editor/components/text-menu/text-bubble-menu.tsx
|
|
4894
|
-
import { Fragment as
|
|
5207
|
+
import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4895
5208
|
function TextBubbleMenu(props) {
|
|
4896
5209
|
var _a;
|
|
4897
5210
|
const { editor, appendTo } = props;
|
|
@@ -4980,13 +5293,13 @@ function TextBubbleMenu(props) {
|
|
|
4980
5293
|
}
|
|
4981
5294
|
});
|
|
4982
5295
|
const state = useTextMenuState(editor);
|
|
4983
|
-
return /* @__PURE__ */
|
|
5296
|
+
return /* @__PURE__ */ jsx43(
|
|
4984
5297
|
BubbleMenu6,
|
|
4985
5298
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
4986
5299
|
className: "mly-flex mly-gap-1 mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
4987
|
-
children: /* @__PURE__ */
|
|
4988
|
-
items.map((item, index) => /* @__PURE__ */
|
|
4989
|
-
/* @__PURE__ */
|
|
5300
|
+
children: /* @__PURE__ */ jsxs24(TooltipProvider, { children: [
|
|
5301
|
+
items.map((item, index) => /* @__PURE__ */ jsx43(BubbleMenuButton, __spreadValues({}, item), index)),
|
|
5302
|
+
/* @__PURE__ */ jsx43(
|
|
4990
5303
|
AlignmentSwitch,
|
|
4991
5304
|
{
|
|
4992
5305
|
alignment: state.textAlign,
|
|
@@ -4995,8 +5308,8 @@ function TextBubbleMenu(props) {
|
|
|
4995
5308
|
}
|
|
4996
5309
|
}
|
|
4997
5310
|
),
|
|
4998
|
-
!state.isListActive && /* @__PURE__ */
|
|
4999
|
-
/* @__PURE__ */
|
|
5311
|
+
!state.isListActive && /* @__PURE__ */ jsxs24(Fragment7, { children: [
|
|
5312
|
+
/* @__PURE__ */ jsx43(
|
|
5000
5313
|
BubbleMenuButton,
|
|
5001
5314
|
{
|
|
5002
5315
|
icon: List2,
|
|
@@ -5006,7 +5319,7 @@ function TextBubbleMenu(props) {
|
|
|
5006
5319
|
tooltip: "Bullet List"
|
|
5007
5320
|
}
|
|
5008
5321
|
),
|
|
5009
|
-
/* @__PURE__ */
|
|
5322
|
+
/* @__PURE__ */ jsx43(
|
|
5010
5323
|
BubbleMenuButton,
|
|
5011
5324
|
{
|
|
5012
5325
|
icon: ListOrdered2,
|
|
@@ -5017,11 +5330,11 @@ function TextBubbleMenu(props) {
|
|
|
5017
5330
|
}
|
|
5018
5331
|
)
|
|
5019
5332
|
] }),
|
|
5020
|
-
/* @__PURE__ */
|
|
5333
|
+
/* @__PURE__ */ jsx43(
|
|
5021
5334
|
LinkInputPopover,
|
|
5022
5335
|
{
|
|
5023
5336
|
defaultValue: (_a = state == null ? void 0 : state.linkUrl) != null ? _a : "",
|
|
5024
|
-
onValueChange: (value) => {
|
|
5337
|
+
onValueChange: (value, isVariable) => {
|
|
5025
5338
|
const defaultValueWithoutProtocol = value.replace(
|
|
5026
5339
|
/https?:\/\//,
|
|
5027
5340
|
""
|
|
@@ -5030,13 +5343,15 @@ function TextBubbleMenu(props) {
|
|
|
5030
5343
|
editor == null ? void 0 : editor.chain().focus().extendMarkRange("link").unsetLink().unsetUnderline().run();
|
|
5031
5344
|
return;
|
|
5032
5345
|
}
|
|
5033
|
-
editor == null ? void 0 : editor.chain().extendMarkRange("link").setLink({ href: value }).setUnderline().run();
|
|
5346
|
+
editor == null ? void 0 : editor.chain().extendMarkRange("link").setLink({ href: value }).setIsUrlVariable(isVariable != null ? isVariable : false).setUnderline().run();
|
|
5034
5347
|
},
|
|
5035
|
-
tooltip: "External URL"
|
|
5348
|
+
tooltip: "External URL",
|
|
5349
|
+
editor,
|
|
5350
|
+
isVariable: state.isUrlVariable
|
|
5036
5351
|
}
|
|
5037
5352
|
),
|
|
5038
|
-
/* @__PURE__ */
|
|
5039
|
-
/* @__PURE__ */
|
|
5353
|
+
/* @__PURE__ */ jsx43(Divider, {}),
|
|
5354
|
+
/* @__PURE__ */ jsx43(
|
|
5040
5355
|
ColorPicker,
|
|
5041
5356
|
{
|
|
5042
5357
|
color: state.currentTextColor,
|
|
@@ -5044,16 +5359,16 @@ function TextBubbleMenu(props) {
|
|
|
5044
5359
|
editor == null ? void 0 : editor.chain().setColor(color).run();
|
|
5045
5360
|
},
|
|
5046
5361
|
tooltip: "Text Color",
|
|
5047
|
-
children: /* @__PURE__ */
|
|
5362
|
+
children: /* @__PURE__ */ jsx43(
|
|
5048
5363
|
BaseButton,
|
|
5049
5364
|
{
|
|
5050
5365
|
variant: "ghost",
|
|
5051
5366
|
size: "sm",
|
|
5052
5367
|
type: "button",
|
|
5053
5368
|
className: "!mly-h-7 mly-w-7 mly-shrink-0 mly-p-0",
|
|
5054
|
-
children: /* @__PURE__ */
|
|
5055
|
-
/* @__PURE__ */
|
|
5056
|
-
/* @__PURE__ */
|
|
5369
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]", children: [
|
|
5370
|
+
/* @__PURE__ */ jsx43("span", { className: "mly-font-bolder mly-font-mono mly-text-xs mly-text-slate-700", children: "A" }),
|
|
5371
|
+
/* @__PURE__ */ jsx43(
|
|
5057
5372
|
"div",
|
|
5058
5373
|
{
|
|
5059
5374
|
className: "mly-h-[2px] mly-w-3",
|
|
@@ -5073,7 +5388,6 @@ function TextBubbleMenu(props) {
|
|
|
5073
5388
|
// src/editor/extensions/index.ts
|
|
5074
5389
|
import StarterKit from "@tiptap/starter-kit";
|
|
5075
5390
|
import { Color } from "@tiptap/extension-color";
|
|
5076
|
-
import TiptapLink from "@tiptap/extension-link";
|
|
5077
5391
|
import ListItem from "@tiptap/extension-list-item";
|
|
5078
5392
|
import Paragraph from "@tiptap/extension-paragraph";
|
|
5079
5393
|
import Placeholder from "@tiptap/extension-placeholder";
|
|
@@ -5127,129 +5441,51 @@ var Footer = Node10.create({
|
|
|
5127
5441
|
|
|
5128
5442
|
// src/editor/nodes/variable/variable-suggestions.tsx
|
|
5129
5443
|
import { ReactRenderer } from "@tiptap/react";
|
|
5130
|
-
import {
|
|
5131
|
-
ArrowDown,
|
|
5132
|
-
ArrowUp,
|
|
5133
|
-
Braces as Braces4,
|
|
5134
|
-
CornerDownLeft as CornerDownLeft4
|
|
5135
|
-
} from "lucide-react";
|
|
5136
|
-
import {
|
|
5137
|
-
forwardRef as forwardRef7,
|
|
5138
|
-
useEffect as useEffect6,
|
|
5139
|
-
useImperativeHandle,
|
|
5140
|
-
useState as useState9,
|
|
5141
|
-
useRef as useRef8
|
|
5142
|
-
} from "react";
|
|
5444
|
+
import { forwardRef as forwardRef8, useImperativeHandle as useImperativeHandle2 } from "react";
|
|
5143
5445
|
import tippy from "tippy.js";
|
|
5144
|
-
import {
|
|
5145
|
-
|
|
5446
|
+
import { useRef as useRef10 } from "react";
|
|
5447
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
5448
|
+
var VariableList = forwardRef8((props, ref) => {
|
|
5146
5449
|
const { items = [] } = props;
|
|
5147
|
-
const
|
|
5148
|
-
|
|
5149
|
-
const itemRefs = useRef8([]);
|
|
5150
|
-
const selectItem = (index) => {
|
|
5151
|
-
const item = props.items[index];
|
|
5152
|
-
if (!item) {
|
|
5153
|
-
return;
|
|
5154
|
-
}
|
|
5155
|
-
props.command({ id: item });
|
|
5156
|
-
};
|
|
5157
|
-
const scrollSelectedIntoView = (index) => {
|
|
5158
|
-
const container = scrollContainerRef.current;
|
|
5159
|
-
const selectedItem = itemRefs.current[index];
|
|
5160
|
-
if (!container || !selectedItem) {
|
|
5161
|
-
return;
|
|
5162
|
-
}
|
|
5163
|
-
const containerRect = container.getBoundingClientRect();
|
|
5164
|
-
const itemRect = selectedItem.getBoundingClientRect();
|
|
5165
|
-
const padding = 4;
|
|
5166
|
-
if (itemRect.bottom > containerRect.bottom) {
|
|
5167
|
-
container.scrollTop += itemRect.bottom - containerRect.bottom + padding;
|
|
5168
|
-
} else if (itemRect.top < containerRect.top) {
|
|
5169
|
-
container.scrollTop += itemRect.top - containerRect.top - padding;
|
|
5170
|
-
}
|
|
5171
|
-
};
|
|
5172
|
-
useEffect6(() => {
|
|
5173
|
-
setSelectedIndex(0);
|
|
5174
|
-
if (scrollContainerRef.current) {
|
|
5175
|
-
scrollContainerRef.current.scrollTop = 0;
|
|
5176
|
-
}
|
|
5177
|
-
itemRefs.current = props.items.map(() => null);
|
|
5178
|
-
}, [props.items]);
|
|
5179
|
-
useEffect6(() => {
|
|
5180
|
-
scrollSelectedIntoView(selectedIndex);
|
|
5181
|
-
}, [selectedIndex]);
|
|
5182
|
-
useImperativeHandle(ref, () => ({
|
|
5450
|
+
const popoverRef = useRef10(null);
|
|
5451
|
+
useImperativeHandle2(ref, () => ({
|
|
5183
5452
|
onKeyDown: ({ event }) => {
|
|
5453
|
+
if (!popoverRef.current) {
|
|
5454
|
+
return false;
|
|
5455
|
+
}
|
|
5456
|
+
const { moveUp, moveDown, select } = popoverRef.current || {};
|
|
5184
5457
|
if (event.key === "ArrowUp") {
|
|
5185
5458
|
event.preventDefault();
|
|
5186
|
-
|
|
5459
|
+
moveUp();
|
|
5187
5460
|
return true;
|
|
5188
5461
|
}
|
|
5189
5462
|
if (event.key === "ArrowDown") {
|
|
5190
5463
|
event.preventDefault();
|
|
5191
|
-
|
|
5464
|
+
moveDown();
|
|
5192
5465
|
return true;
|
|
5193
5466
|
}
|
|
5194
5467
|
if (event.key === "Enter") {
|
|
5195
|
-
|
|
5468
|
+
select();
|
|
5196
5469
|
return true;
|
|
5197
5470
|
}
|
|
5198
5471
|
return false;
|
|
5199
5472
|
}
|
|
5200
5473
|
}));
|
|
5201
|
-
return /* @__PURE__ */
|
|
5202
|
-
|
|
5203
|
-
/* @__PURE__ */ jsx42("span", { className: "mly-text-xs mly-uppercase", children: "Variables" }),
|
|
5204
|
-
/* @__PURE__ */ jsx42(VariableIcon, { children: /* @__PURE__ */ jsx42(Braces4, { className: "mly-size-3 mly-stroke-[2.5]" }) })
|
|
5205
|
-
] }),
|
|
5206
|
-
/* @__PURE__ */ jsx42(
|
|
5207
|
-
"div",
|
|
5208
|
-
{
|
|
5209
|
-
ref: scrollContainerRef,
|
|
5210
|
-
className: "mly-max-h-52 mly-overflow-y-auto mly-scrollbar-thin mly-scrollbar-track-transparent mly-scrollbar-thumb-gray-200",
|
|
5211
|
-
children: /* @__PURE__ */ jsx42("div", { className: "mly-flex mly-flex-col mly-gap-0.5 mly-p-1", children: (items == null ? void 0 : items.length) ? items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsxs23(
|
|
5212
|
-
"button",
|
|
5213
|
-
{
|
|
5214
|
-
ref: (el) => itemRefs.current[index] = el,
|
|
5215
|
-
onClick: () => selectItem(index),
|
|
5216
|
-
className: cn(
|
|
5217
|
-
"mly-flex mly-w-full mly-items-center mly-gap-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-font-mono mly-text-sm mly-text-gray-900 hover:mly-bg-soft-gray",
|
|
5218
|
-
index === selectedIndex ? "mly-bg-soft-gray" : "mly-bg-white"
|
|
5219
|
-
),
|
|
5220
|
-
children: [
|
|
5221
|
-
/* @__PURE__ */ jsx42(Braces4, { className: "mly-size-3 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
5222
|
-
item
|
|
5223
|
-
]
|
|
5224
|
-
},
|
|
5225
|
-
index
|
|
5226
|
-
)) : /* @__PURE__ */ jsx42("div", { className: "mly-flex mly-h-7 mly-w-full mly-items-center mly-gap-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-font-mono mly-text-[13px] mly-text-gray-900 hover:mly-bg-soft-gray", children: "No result" }) })
|
|
5227
|
-
}
|
|
5228
|
-
),
|
|
5229
|
-
/* @__PURE__ */ jsxs23("div", { className: "mly-flex mly-items-center mly-justify-between mly-gap-2 mly-border-t mly-border-gray-200 mly-px-1 mly-py-1.5 mly-text-gray-500", children: [
|
|
5230
|
-
/* @__PURE__ */ jsxs23("div", { className: "mly-flex mly-items-center mly-gap-1", children: [
|
|
5231
|
-
/* @__PURE__ */ jsx42(VariableIcon, { children: /* @__PURE__ */ jsx42(ArrowDown, { className: "mly-size-3 mly-stroke-[2.5]" }) }),
|
|
5232
|
-
/* @__PURE__ */ jsx42(VariableIcon, { children: /* @__PURE__ */ jsx42(ArrowUp, { className: "mly-size-3 mly-stroke-[2.5]" }) }),
|
|
5233
|
-
/* @__PURE__ */ jsx42("span", { className: "mly-text-xs mly-text-gray-500", children: "Navigate" })
|
|
5234
|
-
] }),
|
|
5235
|
-
/* @__PURE__ */ jsx42(VariableIcon, { children: /* @__PURE__ */ jsx42(CornerDownLeft4, { className: "mly-size-3 mly-stroke-[2.5]" }) })
|
|
5236
|
-
] })
|
|
5237
|
-
] });
|
|
5238
|
-
});
|
|
5239
|
-
VariableList.displayName = "VariableList";
|
|
5240
|
-
function VariableIcon(props) {
|
|
5241
|
-
const { className, children } = props;
|
|
5242
|
-
return /* @__PURE__ */ jsx42(
|
|
5243
|
-
"div",
|
|
5474
|
+
return /* @__PURE__ */ jsx44(
|
|
5475
|
+
VariablePopover,
|
|
5244
5476
|
{
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5477
|
+
items,
|
|
5478
|
+
onSelectItem: (value) => {
|
|
5479
|
+
var _a;
|
|
5480
|
+
props.command({
|
|
5481
|
+
id: value.name,
|
|
5482
|
+
required: (_a = value.required) != null ? _a : true
|
|
5483
|
+
});
|
|
5484
|
+
},
|
|
5485
|
+
ref: popoverRef
|
|
5250
5486
|
}
|
|
5251
5487
|
);
|
|
5252
|
-
}
|
|
5488
|
+
});
|
|
5253
5489
|
VariableList.displayName = "VariableList";
|
|
5254
5490
|
function getVariableSuggestions(variables = DEFAULT_VARIABLES, char = DEFAULT_VARIABLE_TRIGGER_CHAR) {
|
|
5255
5491
|
return {
|
|
@@ -5259,7 +5495,7 @@ function getVariableSuggestions(variables = DEFAULT_VARIABLES, char = DEFAULT_VA
|
|
|
5259
5495
|
query,
|
|
5260
5496
|
editor,
|
|
5261
5497
|
from: "variable"
|
|
5262
|
-
})
|
|
5498
|
+
});
|
|
5263
5499
|
},
|
|
5264
5500
|
render: () => {
|
|
5265
5501
|
let component;
|
|
@@ -5360,14 +5596,14 @@ import {
|
|
|
5360
5596
|
useCallback as useCallback7,
|
|
5361
5597
|
useEffect as useEffect7,
|
|
5362
5598
|
useLayoutEffect as useLayoutEffect2,
|
|
5363
|
-
useRef as
|
|
5364
|
-
useState as
|
|
5599
|
+
useRef as useRef11,
|
|
5600
|
+
useState as useState12
|
|
5365
5601
|
} from "react";
|
|
5366
5602
|
import tippy2 from "tippy.js";
|
|
5367
|
-
import { jsx as
|
|
5603
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5368
5604
|
function CommandList(props) {
|
|
5369
5605
|
const { items, command, editor } = props;
|
|
5370
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5606
|
+
const [selectedIndex, setSelectedIndex] = useState12(0);
|
|
5371
5607
|
const selectItem = useCallback7(
|
|
5372
5608
|
(index) => {
|
|
5373
5609
|
const item = items[index];
|
|
@@ -5406,7 +5642,7 @@ function CommandList(props) {
|
|
|
5406
5642
|
useEffect7(() => {
|
|
5407
5643
|
setSelectedIndex(0);
|
|
5408
5644
|
}, [items]);
|
|
5409
|
-
const commandListContainer =
|
|
5645
|
+
const commandListContainer = useRef11(null);
|
|
5410
5646
|
useLayoutEffect2(() => {
|
|
5411
5647
|
const container = commandListContainer == null ? void 0 : commandListContainer.current;
|
|
5412
5648
|
const item = container == null ? void 0 : container.children[selectedIndex];
|
|
@@ -5414,15 +5650,15 @@ function CommandList(props) {
|
|
|
5414
5650
|
updateScrollView(container, item);
|
|
5415
5651
|
}
|
|
5416
5652
|
}, [selectedIndex]);
|
|
5417
|
-
return items.length > 0 ? /* @__PURE__ */
|
|
5418
|
-
/* @__PURE__ */
|
|
5653
|
+
return items.length > 0 ? /* @__PURE__ */ jsxs25("div", { className: "mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all", children: [
|
|
5654
|
+
/* @__PURE__ */ jsx45(
|
|
5419
5655
|
"div",
|
|
5420
5656
|
{
|
|
5421
5657
|
id: "slash-command",
|
|
5422
5658
|
ref: commandListContainer,
|
|
5423
5659
|
className: "mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto mly-scroll-smooth mly-p-1",
|
|
5424
5660
|
children: items.map((item, index) => {
|
|
5425
|
-
return /* @__PURE__ */
|
|
5661
|
+
return /* @__PURE__ */ jsxs25(
|
|
5426
5662
|
"button",
|
|
5427
5663
|
{
|
|
5428
5664
|
className: cn(
|
|
@@ -5432,10 +5668,10 @@ function CommandList(props) {
|
|
|
5432
5668
|
onClick: () => selectItem(index),
|
|
5433
5669
|
type: "button",
|
|
5434
5670
|
children: [
|
|
5435
|
-
/* @__PURE__ */
|
|
5436
|
-
/* @__PURE__ */
|
|
5437
|
-
/* @__PURE__ */
|
|
5438
|
-
/* @__PURE__ */
|
|
5671
|
+
/* @__PURE__ */ jsx45("div", { className: "mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center", children: item.icon }),
|
|
5672
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
5673
|
+
/* @__PURE__ */ jsx45("p", { className: "mly-font-medium", children: item.title }),
|
|
5674
|
+
/* @__PURE__ */ jsx45("p", { className: "mly-text-xs mly-text-gray-400", children: item.description })
|
|
5439
5675
|
] })
|
|
5440
5676
|
]
|
|
5441
5677
|
},
|
|
@@ -5444,16 +5680,16 @@ function CommandList(props) {
|
|
|
5444
5680
|
})
|
|
5445
5681
|
}
|
|
5446
5682
|
),
|
|
5447
|
-
/* @__PURE__ */
|
|
5448
|
-
/* @__PURE__ */
|
|
5449
|
-
/* @__PURE__ */
|
|
5450
|
-
/* @__PURE__ */
|
|
5683
|
+
/* @__PURE__ */ jsx45("div", { className: "mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4", children: /* @__PURE__ */ jsxs25("div", { className: "mly-flex mly-items-center", children: [
|
|
5684
|
+
/* @__PURE__ */ jsxs25("p", { className: "mly-text-center mly-text-xs mly-text-gray-400", children: [
|
|
5685
|
+
/* @__PURE__ */ jsx45("kbd", { className: "mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium", children: "\u2191" }),
|
|
5686
|
+
/* @__PURE__ */ jsx45("kbd", { className: "mly-ml-1 mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium", children: "\u2193" }),
|
|
5451
5687
|
" ",
|
|
5452
5688
|
"to navigate"
|
|
5453
5689
|
] }),
|
|
5454
|
-
/* @__PURE__ */
|
|
5455
|
-
/* @__PURE__ */
|
|
5456
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: "mly-select-none mly-px-1", children: "\xB7" }),
|
|
5691
|
+
/* @__PURE__ */ jsxs25("p", { className: "mly-text-center mly-text-xs mly-text-gray-400", children: [
|
|
5692
|
+
/* @__PURE__ */ jsx45("kbd", { className: "mly-rounded mly-border mly-p-1 mly-px-1.5 mly-font-medium", children: "Enter" }),
|
|
5457
5693
|
" ",
|
|
5458
5694
|
"to select"
|
|
5459
5695
|
] })
|
|
@@ -5519,6 +5755,27 @@ function getSlashCommandSuggestions(commands = []) {
|
|
|
5519
5755
|
};
|
|
5520
5756
|
}
|
|
5521
5757
|
|
|
5758
|
+
// src/editor/nodes/link.ts
|
|
5759
|
+
import TiptapLink from "@tiptap/extension-link";
|
|
5760
|
+
var LinkExtension = TiptapLink.extend({
|
|
5761
|
+
addAttributes() {
|
|
5762
|
+
var _a;
|
|
5763
|
+
return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
|
|
5764
|
+
isUrlVariable: {
|
|
5765
|
+
default: false
|
|
5766
|
+
}
|
|
5767
|
+
});
|
|
5768
|
+
},
|
|
5769
|
+
addCommands() {
|
|
5770
|
+
var _a;
|
|
5771
|
+
return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
|
|
5772
|
+
setIsUrlVariable: (isUrlVariable) => ({ chain }) => {
|
|
5773
|
+
return chain().setMark("link", { isUrlVariable }).run();
|
|
5774
|
+
}
|
|
5775
|
+
});
|
|
5776
|
+
}
|
|
5777
|
+
});
|
|
5778
|
+
|
|
5522
5779
|
// src/editor/extensions/index.ts
|
|
5523
5780
|
function extensions(props) {
|
|
5524
5781
|
const { variables, blocks, variableTriggerCharacter } = props;
|
|
@@ -5593,7 +5850,7 @@ function extensions(props) {
|
|
|
5593
5850
|
SlashCommand.configure({
|
|
5594
5851
|
suggestion: getSlashCommandSuggestions(blocks)
|
|
5595
5852
|
}),
|
|
5596
|
-
|
|
5853
|
+
LinkExtension.configure({
|
|
5597
5854
|
HTMLAttributes: {
|
|
5598
5855
|
target: "_blank",
|
|
5599
5856
|
rel: "noopener noreferrer nofollow",
|
|
@@ -5619,7 +5876,7 @@ function extensions(props) {
|
|
|
5619
5876
|
}
|
|
5620
5877
|
|
|
5621
5878
|
// src/editor/index.tsx
|
|
5622
|
-
import { jsx as
|
|
5879
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5623
5880
|
function Editor8(props) {
|
|
5624
5881
|
const {
|
|
5625
5882
|
config: {
|
|
@@ -5638,7 +5895,8 @@ function Editor8(props) {
|
|
|
5638
5895
|
contentJson,
|
|
5639
5896
|
variables = DEFAULT_VARIABLES,
|
|
5640
5897
|
blocks = DEFAULT_SLASH_COMMANDS,
|
|
5641
|
-
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR
|
|
5898
|
+
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR,
|
|
5899
|
+
renderVariable = DEFAULT_RENDER_VARIABLE_FUNCTION
|
|
5642
5900
|
} = props;
|
|
5643
5901
|
let formattedContent = null;
|
|
5644
5902
|
if (contentJson) {
|
|
@@ -5659,7 +5917,7 @@ function Editor8(props) {
|
|
|
5659
5917
|
]
|
|
5660
5918
|
};
|
|
5661
5919
|
}
|
|
5662
|
-
const menuContainerRef =
|
|
5920
|
+
const menuContainerRef = useRef12(null);
|
|
5663
5921
|
const editor = useEditor({
|
|
5664
5922
|
editorProps: {
|
|
5665
5923
|
attributes: {
|
|
@@ -5698,20 +5956,21 @@ function Editor8(props) {
|
|
|
5698
5956
|
if (!editor) {
|
|
5699
5957
|
return null;
|
|
5700
5958
|
}
|
|
5701
|
-
return /* @__PURE__ */
|
|
5959
|
+
return /* @__PURE__ */ jsx46(
|
|
5702
5960
|
MailyProvider,
|
|
5703
5961
|
{
|
|
5704
5962
|
variables,
|
|
5705
5963
|
blocks,
|
|
5706
5964
|
variableTriggerCharacter,
|
|
5707
|
-
|
|
5965
|
+
renderVariable,
|
|
5966
|
+
children: /* @__PURE__ */ jsxs26(
|
|
5708
5967
|
"div",
|
|
5709
5968
|
{
|
|
5710
5969
|
className: cn("mly-editor mly-antialiased", wrapClassName),
|
|
5711
5970
|
ref: menuContainerRef,
|
|
5712
5971
|
children: [
|
|
5713
|
-
hasMenuBar && /* @__PURE__ */
|
|
5714
|
-
/* @__PURE__ */
|
|
5972
|
+
hasMenuBar && /* @__PURE__ */ jsx46(EditorMenuBar, { config: props.config, editor }),
|
|
5973
|
+
/* @__PURE__ */ jsxs26(
|
|
5715
5974
|
"div",
|
|
5716
5975
|
{
|
|
5717
5976
|
className: cn(
|
|
@@ -5719,14 +5978,14 @@ function Editor8(props) {
|
|
|
5719
5978
|
bodyClassName
|
|
5720
5979
|
),
|
|
5721
5980
|
children: [
|
|
5722
|
-
/* @__PURE__ */
|
|
5723
|
-
/* @__PURE__ */
|
|
5724
|
-
/* @__PURE__ */
|
|
5725
|
-
/* @__PURE__ */
|
|
5726
|
-
/* @__PURE__ */
|
|
5727
|
-
/* @__PURE__ */
|
|
5728
|
-
/* @__PURE__ */
|
|
5729
|
-
/* @__PURE__ */
|
|
5981
|
+
/* @__PURE__ */ jsx46(TextBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
5982
|
+
/* @__PURE__ */ jsx46(ImageBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
5983
|
+
/* @__PURE__ */ jsx46(SpacerBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
5984
|
+
/* @__PURE__ */ jsx46(EditorContent, { editor }),
|
|
5985
|
+
/* @__PURE__ */ jsx46(SectionBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
5986
|
+
/* @__PURE__ */ jsx46(ColumnsBubbleMenu, { editor, appendTo: menuContainerRef }),
|
|
5987
|
+
/* @__PURE__ */ jsx46(ContentMenu, { editor }),
|
|
5988
|
+
/* @__PURE__ */ jsx46(ForBubbleMenu, { editor, appendTo: menuContainerRef })
|
|
5730
5989
|
]
|
|
5731
5990
|
}
|
|
5732
5991
|
)
|