@maily-to/core 0.0.17 → 0.0.18
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 +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +1080 -964
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1076 -955
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/readme.md +51 -21
package/dist/index.mjs
CHANGED
|
@@ -54,13 +54,13 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// src/styles/index.css
|
|
57
|
-
styleInject(':root {\n --placeholder-color: #adb5bd;\n --bg-color: #ffffff;\n --variable-icon-size: 12px;\n --variable-icon-gap: 4px;\n}\n.mly-editor .mly-prose p:where([class~=text-sm]) {\n font-size: 16px;\n}\n.mly-editor .mly-prose h1,\n.mly-editor .mly-prose h2,\n.mly-editor .mly-prose h3 {\n margin-top: 0;\n margin-bottom: 12px;\n}\n.mly-editor .mly-prose h1 {\n font-size: 36px;\n}\n.mly-editor .mly-prose h2 {\n font-size: 30px;\n}\n.mly-editor .mly-prose h3 {\n font-size: 24px;\n}\n.mly-editor .mly-prose p {\n font-size: 15px;\n margin-bottom: 20px;\n}\n.mly-editor .mly-prose h1 + p,\n.mly-editor .mly-prose h2 + p,\n.mly-editor .mly-prose h3 + p,\n.mly-editor .mly-prose hr + p,\n.mly-editor .mly-prose table + p {\n margin-top: 0;\n}\n.mly-editor .mly-prose ol,\n.mly-editor .mly-prose ul {\n margin-top: 0;\n margin-bottom: 20px;\n}\n.mly-editor .mly-prose li:not(:last-child) {\n margin-bottom: 8px;\n}\n.mly-editor .mly-prose li > p {\n margin: 0;\n}\n.mly-editor .mly-prose img,\n.mly-editor .mly-prose .node-logo {\n margin-top: 0;\n margin-bottom: 32px;\n}\n.mly-editor .mly-prose hr {\n margin-block: 32px;\n}\n.mly-editor .mly-prose .footer {\n display: block;\n font-size: 13px;\n margin-bottom: 20px;\n color: rgb(100, 116, 139);\n}\n.mly-editor .mly-prose .spacer + * {\n margin-top: 0;\n}\n.mly-editor .mly-prose p + .spacer {\n margin-top: -20px;\n}\n.mly-editor .mly-prose blockquote + .spacer {\n margin-top: -16px;\n}\n.mly-editor .mly-prose h1 + .spacer,\n.mly-editor .mly-prose h2 + .spacer,\n.mly-editor .mly-prose h3 + .spacer {\n margin-top: -12px;\n}\n.mly-editor .mly-prose ol + .spacer,\n.mly-editor .mly-prose ul + .spacer {\n margin-top: -20px;\n}\n.mly-editor .mly-prose img + .spacer,\n.mly-editor .mly-prose .node-logo + .spacer {\n margin-top: -32px;\n}\n.mly-editor .mly-prose .node-button + .spacer,\n.mly-editor .mly-prose .node-linkCard + .spacer,\n.mly-editor .mly-prose footer + .spacer {\n margin-top: -20px;\n}\n.mly-editor .mly-prose .node-button,\n.mly-editor .mly-prose .node-linkCard {\n margin-top: 0;\n margin-bottom: 20px;\n}\n.mly-editor .mly-prose .node-image {\n line-height: 0;\n margin-top: 0;\n margin-bottom: 32px;\n outline: none;\n}\n.mly-editor .mly-prose .node-image + .spacer {\n margin-top: -32px;\n}\n.mly-editor .mly-prose code::before,\n.mly-editor .mly-prose code::after {\n content: none;\n}\n.mly-no-scrollbar::-webkit-scrollbar {\n display: none;\n}\n.mly-no-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.mly-editor .react-colorful__alpha {\n border-radius: 0;\n}\n.mly-editor .react-colorful__saturation,\n.mly-editor .react-colorful__hue,\n.mly-editor .react-colorful__alpha {\n border-radius: 8px;\n}\n.mly-editor .react-colorful__hue,\n.mly-editor .react-colorful__alpha {\n height: 16px;\n}\n.mly-editor .react-colorful__pointer {\n width: 16px;\n height: 16px;\n}\n.ProseMirror-selectednode {\n
|
|
57
|
+
styleInject(':root {\n --placeholder-color: #adb5bd;\n --bg-color: #ffffff;\n --variable-icon-size: 12px;\n --variable-icon-gap: 4px;\n}\n.mly-editor .mly-prose p:where([class~=text-sm]) {\n font-size: 16px;\n}\n.mly-editor .mly-prose h1,\n.mly-editor .mly-prose h2,\n.mly-editor .mly-prose h3 {\n margin-top: 0;\n margin-bottom: 12px;\n}\n.mly-editor .mly-prose h1 {\n font-size: 36px;\n}\n.mly-editor .mly-prose h2 {\n font-size: 30px;\n}\n.mly-editor .mly-prose h3 {\n font-size: 24px;\n}\n.mly-editor .mly-prose p {\n font-size: 15px;\n margin-bottom: 20px;\n}\n.mly-editor .mly-prose h1 + p,\n.mly-editor .mly-prose h2 + p,\n.mly-editor .mly-prose h3 + p,\n.mly-editor .mly-prose hr + p,\n.mly-editor .mly-prose table + p {\n margin-top: 0;\n}\n.mly-editor .mly-prose ol,\n.mly-editor .mly-prose ul {\n margin-top: 0;\n margin-bottom: 20px;\n}\n.mly-editor .mly-prose li:not(:last-child) {\n margin-bottom: 8px;\n}\n.mly-editor .mly-prose li > p {\n margin: 0;\n}\n.mly-editor .mly-prose img,\n.mly-editor .mly-prose .node-logo {\n margin-top: 0;\n margin-bottom: 32px;\n}\n.mly-editor .mly-prose hr {\n margin-block: 32px;\n}\n.mly-editor .mly-prose .footer {\n display: block;\n font-size: 13px;\n margin-bottom: 20px;\n color: rgb(100, 116, 139);\n}\n.mly-editor .mly-prose .spacer + * {\n margin-top: 0;\n}\n.mly-editor .mly-prose p + .spacer {\n margin-top: -20px;\n}\n.mly-editor .mly-prose blockquote + .spacer {\n margin-top: -16px;\n}\n.mly-editor .mly-prose h1 + .spacer,\n.mly-editor .mly-prose h2 + .spacer,\n.mly-editor .mly-prose h3 + .spacer {\n margin-top: -12px;\n}\n.mly-editor .mly-prose ol + .spacer,\n.mly-editor .mly-prose ul + .spacer {\n margin-top: -20px;\n}\n.mly-editor .mly-prose img + .spacer,\n.mly-editor .mly-prose .node-logo + .spacer {\n margin-top: -32px;\n}\n.mly-editor .mly-prose .node-button + .spacer,\n.mly-editor .mly-prose .node-linkCard + .spacer,\n.mly-editor .mly-prose footer + .spacer {\n margin-top: -20px;\n}\n.mly-editor .mly-prose .node-button,\n.mly-editor .mly-prose .node-linkCard {\n margin-top: 0;\n margin-bottom: 20px;\n}\n.mly-editor .mly-prose .node-image {\n line-height: 0;\n margin-top: 0;\n margin-bottom: 32px;\n outline: none;\n}\n.mly-editor .mly-prose .node-image + .spacer {\n margin-top: -32px;\n}\n.mly-editor .mly-prose code::before,\n.mly-editor .mly-prose code::after {\n content: none;\n}\n.mly-no-scrollbar::-webkit-scrollbar {\n display: none;\n}\n.mly-no-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.mly-editor .react-colorful__alpha {\n border-radius: 0;\n}\n.mly-editor .react-colorful__saturation,\n.mly-editor .react-colorful__hue,\n.mly-editor .react-colorful__alpha {\n border-radius: 8px;\n}\n.mly-editor .react-colorful__hue,\n.mly-editor .react-colorful__alpha {\n height: 16px;\n}\n.mly-editor .react-colorful__pointer {\n width: 16px;\n height: 16px;\n}\n.ProseMirror-selectednode::after {\n content: "";\n position: absolute;\n inset: -2px;\n pointer-events: none;\n border-radius: 6px;\n background: rgba(35, 131, 226, 0.14);\n}\n.mly-prose {\n strong {\n color: currentColor;\n }\n}\n.ProseMirror {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0;\n &:focus {\n outline: none;\n }\n p {\n margin-top: 0;\n }\n h1 {\n --variable-icon-size: 28px;\n }\n h2 {\n --variable-icon-size: 24px;\n }\n h3 {\n --variable-icon-size: 20px;\n }\n h1,\n h2,\n h3 {\n --variable-icon-gap: 8px;\n }\n .is-editor-empty:first-child:not([data-type=columns], [data-type=section], ul, li, ol)::before {\n content: attr(data-placeholder);\n float: left;\n color: var(--placeholder-color);\n pointer-events: none;\n height: 0;\n }\n .is-empty:not([data-type=columns], [data-type=section], ol, ul, li)::before {\n content: attr(data-placeholder);\n float: left;\n color: var(--placeholder-color);\n pointer-events: none;\n height: 0;\n }\n [data-type=columns] .is-empty::before,\n [data-type=section] .is-empty::before {\n --l-threshold: 0.66;\n --diff: calc(var(--l-threshold) - l);\n color: oklch(from var(--bg-color) clamp(0.05, max(min(var(--diff) * infinity, 1), 0), 0.95) c h) !important;\n opacity: 0.6;\n }\n [data-type=columns] {\n display: flex;\n margin: 0;\n padding: 0;\n &.has-focus [data-type=column],\n &:hover [data-type=column] {\n outline: 1.5px solid #e9ecef;\n outline-style: dashed;\n }\n [data-type=column].has-focus {\n outline-style: solid;\n }\n }\n [data-type=column] {\n display: table-cell;\n flex-basis: 0;\n flex-grow: 1;\n overflow: auto;\n & > *:first-child {\n margin-top: 0;\n }\n & > *:last-child {\n margin-bottom: 0;\n }\n }\n [data-type=section] {\n margin: 0;\n padding: 0;\n [data-type=section-cell] {\n padding: 0;\n & > *:first-child {\n margin-top: 0;\n }\n & > *:last-child {\n margin-bottom: 0;\n }\n }\n }\n [data-type=for] {\n [data-node-view-content] > div {\n & > *:first-child {\n margin-top: 0;\n }\n & > *:last-child {\n margin-bottom: 0;\n }\n }\n }\n .node-for.has-focus [data-repeat-indicator] {\n opacity: 1;\n }\n [data-type=show] {\n [data-node-view-content] > div {\n & > *:first-child {\n margin-top: 0;\n }\n & > *:last-child {\n margin-bottom: 0;\n }\n }\n }\n *:has(+ .ProseMirror-gapcursor) {\n margin-bottom: 0 !important;\n }\n .ProseMirror-gapcursor {\n &::after {\n border: 1.5px solid gray;\n width: 24px;\n }\n & + * {\n margin-top: 0 !important;\n }\n }\n}\n.hide-number-controls {\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &[type=number] {\n -moz-appearance: textfield;\n }\n}\n.hide-scrollbars {\n scrollbar-width: none;\n -ms-overflow-style: none;\n &::-webkit-scrollbar {\n display: none;\n }\n}\n');
|
|
58
58
|
|
|
59
59
|
// src/styles/preflight.css
|
|
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-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-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-\\[28px\\] {\n height: 28px;\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-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-\\[28px\\] {\n width: 28px;\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-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');
|
|
64
64
|
|
|
65
65
|
// src/editor/index.tsx
|
|
66
66
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
@@ -68,7 +68,7 @@ import { useRef as useRef10 } from "react";
|
|
|
68
68
|
|
|
69
69
|
// src/editor/components/column-menu/columns-bubble-menu.tsx
|
|
70
70
|
import { BubbleMenu } from "@tiptap/react";
|
|
71
|
-
import { useCallback } from "react";
|
|
71
|
+
import { useCallback as useCallback2 } from "react";
|
|
72
72
|
|
|
73
73
|
// src/editor/utils/get-render-container.ts
|
|
74
74
|
function getRenderContainer(editor, nodeType) {
|
|
@@ -600,7 +600,7 @@ function VerticalAlignmentSwitch(props) {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
// src/editor/components/show-popover.tsx
|
|
603
|
-
import { Braces,
|
|
603
|
+
import { Braces, Eye } from "lucide-react";
|
|
604
604
|
|
|
605
605
|
// src/editor/components/popover.tsx
|
|
606
606
|
import * as React3 from "react";
|
|
@@ -627,266 +627,663 @@ 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, useState } from "react";
|
|
631
|
-
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
632
|
-
function ShowPopover(props) {
|
|
633
|
-
const { showIfKey, onShowIfKeyValueChange } = props;
|
|
634
|
-
const [isUpdatingKey, setIsUpdatingKey] = useState(false);
|
|
635
|
-
const inputRef = useRef(null);
|
|
636
|
-
const isValidWhenKey = showIfKey !== void 0 && showIfKey !== "";
|
|
637
|
-
return /* @__PURE__ */ jsxs2(
|
|
638
|
-
Popover,
|
|
639
|
-
{
|
|
640
|
-
onOpenChange: (open) => {
|
|
641
|
-
if (open) {
|
|
642
|
-
return;
|
|
643
|
-
}
|
|
644
|
-
setIsUpdatingKey(false);
|
|
645
|
-
},
|
|
646
|
-
children: [
|
|
647
|
-
/* @__PURE__ */ jsx7(
|
|
648
|
-
PopoverTrigger,
|
|
649
|
-
{
|
|
650
|
-
className: cn(
|
|
651
|
-
"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",
|
|
652
|
-
showIfKey && "mly-bg-rose-100 mly-text-rose-800 data-[state=open]:mly-bg-rose-100 hover:mly-bg-rose-100"
|
|
653
|
-
),
|
|
654
|
-
children: /* @__PURE__ */ jsx7(Eye, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" })
|
|
655
|
-
}
|
|
656
|
-
),
|
|
657
|
-
/* @__PURE__ */ jsxs2(
|
|
658
|
-
PopoverContent,
|
|
659
|
-
{
|
|
660
|
-
className: "mly-flex mly-w-max mly-rounded-lg !mly-p-0.5",
|
|
661
|
-
side: "top",
|
|
662
|
-
sideOffset: 8,
|
|
663
|
-
align: "end",
|
|
664
|
-
onOpenAutoFocus: (e) => {
|
|
665
|
-
e.preventDefault();
|
|
666
|
-
},
|
|
667
|
-
onCloseAutoFocus: (e) => {
|
|
668
|
-
e.preventDefault();
|
|
669
|
-
},
|
|
670
|
-
children: [
|
|
671
|
-
/* @__PURE__ */ jsx7("span", { className: "mly-flex mly-items-center mly-px-1.5 mly-text-sm mly-leading-none", children: "Show if" }),
|
|
672
|
-
!isUpdatingKey && /* @__PURE__ */ jsxs2(
|
|
673
|
-
"button",
|
|
674
|
-
{
|
|
675
|
-
className: cn(
|
|
676
|
-
"mly-flex mly-h-7 mly-min-w-28 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",
|
|
677
|
-
!isValidWhenKey && "mly-border-rose-400 mly-bg-rose-50 mly-text-rose-600 hover:mly-bg-rose-100"
|
|
678
|
-
),
|
|
679
|
-
onClick: () => {
|
|
680
|
-
setIsUpdatingKey(true);
|
|
681
|
-
setTimeout(() => {
|
|
682
|
-
var _a;
|
|
683
|
-
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
684
|
-
}, 0);
|
|
685
|
-
},
|
|
686
|
-
children: [
|
|
687
|
-
/* @__PURE__ */ jsx7(Braces, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
688
|
-
/* @__PURE__ */ jsx7("span", { children: showIfKey })
|
|
689
|
-
]
|
|
690
|
-
}
|
|
691
|
-
),
|
|
692
|
-
isUpdatingKey && /* @__PURE__ */ jsx7(
|
|
693
|
-
"form",
|
|
694
|
-
{
|
|
695
|
-
onSubmit: (e) => {
|
|
696
|
-
e.preventDefault();
|
|
697
|
-
setIsUpdatingKey(false);
|
|
698
|
-
},
|
|
699
|
-
onKeyDown: (e) => {
|
|
700
|
-
if (e.key === "Escape") {
|
|
701
|
-
setIsUpdatingKey(false);
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
children: /* @__PURE__ */ jsxs2("label", { className: "mly-relative", children: [
|
|
705
|
-
/* @__PURE__ */ jsx7(
|
|
706
|
-
"input",
|
|
707
|
-
{
|
|
708
|
-
value: showIfKey || "",
|
|
709
|
-
onChange: (e) => {
|
|
710
|
-
onShowIfKeyValueChange == null ? void 0 : onShowIfKeyValueChange(e.target.value);
|
|
711
|
-
},
|
|
712
|
-
onBlur: () => {
|
|
713
|
-
setIsUpdatingKey(false);
|
|
714
|
-
},
|
|
715
|
-
ref: inputRef,
|
|
716
|
-
type: "text",
|
|
717
|
-
placeholder: "e.g. key",
|
|
718
|
-
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"
|
|
719
|
-
}
|
|
720
|
-
),
|
|
721
|
-
/* @__PURE__ */ jsx7("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ jsx7(CornerDownLeft, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
|
|
722
|
-
] })
|
|
723
|
-
}
|
|
724
|
-
)
|
|
725
|
-
]
|
|
726
|
-
}
|
|
727
|
-
)
|
|
728
|
-
]
|
|
729
|
-
}
|
|
730
|
-
);
|
|
731
|
-
}
|
|
630
|
+
import { useRef as useRef2, useState as useState2 } from "react";
|
|
732
631
|
|
|
733
|
-
// src/editor/
|
|
734
|
-
import {
|
|
735
|
-
import {
|
|
736
|
-
function
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
onColumnWidthChange
|
|
742
|
-
} = props;
|
|
743
|
-
return /* @__PURE__ */ jsxs3(Popover, { children: [
|
|
744
|
-
/* @__PURE__ */ jsx8(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__ */ jsx8(SlidersVertical, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5]" }) }),
|
|
745
|
-
/* @__PURE__ */ jsxs3(
|
|
746
|
-
PopoverContent,
|
|
747
|
-
{
|
|
748
|
-
className: "mly-w-[300px] mly-rounded-lg !mly-p-0.5",
|
|
749
|
-
side: "top",
|
|
750
|
-
sideOffset: 8,
|
|
751
|
-
align: "center",
|
|
752
|
-
onOpenAutoFocus: (e) => {
|
|
753
|
-
e.preventDefault();
|
|
754
|
-
},
|
|
755
|
-
onCloseAutoFocus: (e) => {
|
|
756
|
-
e.preventDefault();
|
|
757
|
-
},
|
|
758
|
-
children: [
|
|
759
|
-
/* @__PURE__ */ jsxs3("div", { className: "mly-grid mly-grid-cols-2 mly-gap-1", children: [
|
|
760
|
-
/* @__PURE__ */ jsxs3(
|
|
761
|
-
SwitchButton,
|
|
762
|
-
{
|
|
763
|
-
onClick: () => onColumnsCountChange(2),
|
|
764
|
-
isActive: columnsCount === 2,
|
|
765
|
-
children: [
|
|
766
|
-
/* @__PURE__ */ jsx8(Columns2, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" }),
|
|
767
|
-
/* @__PURE__ */ jsx8("span", { children: "2 Columns" })
|
|
768
|
-
]
|
|
769
|
-
}
|
|
770
|
-
),
|
|
771
|
-
/* @__PURE__ */ jsxs3(
|
|
772
|
-
SwitchButton,
|
|
773
|
-
{
|
|
774
|
-
onClick: () => onColumnsCountChange(3),
|
|
775
|
-
isActive: columnsCount === 3,
|
|
776
|
-
children: [
|
|
777
|
-
/* @__PURE__ */ jsx8(Columns3, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" }),
|
|
778
|
-
/* @__PURE__ */ jsx8("span", { children: "3 Columns" })
|
|
779
|
-
]
|
|
780
|
-
}
|
|
781
|
-
)
|
|
782
|
-
] }),
|
|
783
|
-
/* @__PURE__ */ jsx8("hr", { className: "mly-my-0.5 mly-border-gray-200" }),
|
|
784
|
-
/* @__PURE__ */ jsx8(
|
|
785
|
-
"div",
|
|
786
|
-
{
|
|
787
|
-
className: "mly-grid mly-gap-1 mly-p-1",
|
|
788
|
-
style: { gridTemplateColumns: `repeat(${columnsCount}, 1fr)` },
|
|
789
|
-
children: Array.from({ length: columnsCount }).map((_, index) => {
|
|
790
|
-
const value = columnWidths[index] === "auto" ? "" : columnWidths[index];
|
|
791
|
-
const label = columnsCount === 2 ? index === 0 ? "Left" : "Right" : index === 0 ? "Left" : index === 1 ? "Middle" : "Right";
|
|
792
|
-
return /* @__PURE__ */ jsxs3("div", { className: "mly-flex mly-flex-col mly-gap-1", children: [
|
|
793
|
-
/* @__PURE__ */ jsx8("span", { className: "mly-text-xs mly-text-gray-400", children: label }),
|
|
794
|
-
/* @__PURE__ */ jsxs3("label", { className: "mly-relative", children: [
|
|
795
|
-
/* @__PURE__ */ jsx8(
|
|
796
|
-
"input",
|
|
797
|
-
{
|
|
798
|
-
placeholder: "auto",
|
|
799
|
-
min: 1,
|
|
800
|
-
max: 90,
|
|
801
|
-
type: "number",
|
|
802
|
-
className: "hide-number-controls mly-w-full mly-appearance-none mly-rounded-md mly-bg-soft-gray mly-px-1.5 mly-py-1 mly-pr-6 mly-text-sm mly-tabular-nums mly-outline-none focus:mly-bg-soft-gray focus:mly-outline-none focus:mly-ring-1 focus:mly-ring-midnight-gray/50",
|
|
803
|
-
value,
|
|
804
|
-
onChange: (e) => {
|
|
805
|
-
const value2 = e.target.value;
|
|
806
|
-
onColumnWidthChange == null ? void 0 : onColumnWidthChange(index, value2);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
),
|
|
810
|
-
/* @__PURE__ */ jsx8("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: "%" })
|
|
811
|
-
] })
|
|
812
|
-
] }, index);
|
|
813
|
-
})
|
|
814
|
-
}
|
|
815
|
-
)
|
|
816
|
-
]
|
|
632
|
+
// src/editor/utils/use-outside-click.ts
|
|
633
|
+
import { useCallback } from "react";
|
|
634
|
+
import { useEffect } from "react";
|
|
635
|
+
function useOutsideClick(ref, callback) {
|
|
636
|
+
const handleClick = useCallback(
|
|
637
|
+
(e) => {
|
|
638
|
+
if (ref.current && !ref.current.contains(e.target)) {
|
|
639
|
+
callback();
|
|
817
640
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
}
|
|
821
|
-
function SwitchButton(props) {
|
|
822
|
-
const { onClick, isActive = false, children } = props;
|
|
823
|
-
return /* @__PURE__ */ jsx8(
|
|
824
|
-
"button",
|
|
825
|
-
{
|
|
826
|
-
className: cn(
|
|
827
|
-
"mly-flex mly-h-7 mly-items-center mly-gap-1 mly-rounded-md mly-px-2 mly-text-sm mly-text-gray-500 hover:mly-bg-soft-gray hover:mly-text-midnight-gray",
|
|
828
|
-
isActive && "mly-bg-soft-gray mly-text-midnight-gray"
|
|
829
|
-
),
|
|
830
|
-
onClick,
|
|
831
|
-
children
|
|
832
|
-
}
|
|
641
|
+
},
|
|
642
|
+
[ref, callback]
|
|
833
643
|
);
|
|
644
|
+
useEffect(() => {
|
|
645
|
+
document.addEventListener("mousedown", handleClick);
|
|
646
|
+
document.addEventListener("touchstart", handleClick);
|
|
647
|
+
return () => {
|
|
648
|
+
document.removeEventListener("mousedown", handleClick);
|
|
649
|
+
document.removeEventListener("touchstart", handleClick);
|
|
650
|
+
};
|
|
651
|
+
}, [handleClick]);
|
|
834
652
|
}
|
|
835
653
|
|
|
836
|
-
// src/editor/components/ui/
|
|
837
|
-
import {
|
|
838
|
-
import {
|
|
839
|
-
import { jsx as
|
|
840
|
-
|
|
841
|
-
const {
|
|
842
|
-
|
|
843
|
-
options,
|
|
844
|
-
value,
|
|
654
|
+
// src/editor/components/ui/input-autocomplete.tsx
|
|
655
|
+
import { CornerDownLeft } from "lucide-react";
|
|
656
|
+
import { forwardRef as forwardRef4, useState, useRef } from "react";
|
|
657
|
+
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
658
|
+
var InputAutocomplete = forwardRef4((props, ref) => {
|
|
659
|
+
const _a = props, {
|
|
660
|
+
value = "",
|
|
845
661
|
onValueChange,
|
|
846
|
-
tooltip,
|
|
847
662
|
className,
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
663
|
+
onOutsideClick,
|
|
664
|
+
onSelectOption,
|
|
665
|
+
autoCompleteOptions = []
|
|
666
|
+
} = _a, inputProps = __objRest(_a, [
|
|
667
|
+
"value",
|
|
668
|
+
"onValueChange",
|
|
669
|
+
"className",
|
|
670
|
+
"onOutsideClick",
|
|
671
|
+
"onSelectOption",
|
|
672
|
+
"autoCompleteOptions"
|
|
673
|
+
]);
|
|
674
|
+
const containerRef = useRef(null);
|
|
675
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
676
|
+
useOutsideClick(containerRef, () => {
|
|
677
|
+
onOutsideClick == null ? void 0 : onOutsideClick();
|
|
678
|
+
});
|
|
679
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn("mly-relative", className), ref: containerRef, children: [
|
|
680
|
+
/* @__PURE__ */ jsxs2("label", { className: "mly-relative", children: [
|
|
681
|
+
/* @__PURE__ */ jsx7(
|
|
682
|
+
"input",
|
|
683
|
+
__spreadProps(__spreadValues({}, inputProps), {
|
|
684
|
+
ref,
|
|
685
|
+
value,
|
|
686
|
+
onChange: (e) => {
|
|
687
|
+
setSelectedIndex(0);
|
|
688
|
+
onValueChange(e.target.value);
|
|
689
|
+
},
|
|
690
|
+
type: "text",
|
|
691
|
+
placeholder: "e.g. items",
|
|
692
|
+
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",
|
|
693
|
+
onKeyDown: (e) => {
|
|
694
|
+
if (e.key === "ArrowDown") {
|
|
695
|
+
e.preventDefault();
|
|
696
|
+
setSelectedIndex(
|
|
697
|
+
(prev) => Math.min(prev + 1, autoCompleteOptions.length - 1)
|
|
698
|
+
);
|
|
699
|
+
} else if (e.key === "ArrowUp") {
|
|
700
|
+
e.preventDefault();
|
|
701
|
+
setSelectedIndex((prev) => Math.max(prev - 1, 0));
|
|
702
|
+
} else if (e.key === "Enter") {
|
|
703
|
+
e.preventDefault();
|
|
704
|
+
const _value = autoCompleteOptions[selectedIndex];
|
|
705
|
+
onValueChange(_value);
|
|
706
|
+
onSelectOption == null ? void 0 : onSelectOption(_value);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
})
|
|
710
|
+
),
|
|
711
|
+
/* @__PURE__ */ jsx7("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ jsx7(CornerDownLeft, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
|
|
712
|
+
] }),
|
|
713
|
+
autoCompleteOptions.length > 0 && /* @__PURE__ */ jsx7("div", { className: "mly-absolute mly-left-0 mly-top-8 mly-z-10 mly-w-full mly-rounded-lg mly-bg-white mly-p-0.5 mly-shadow-md", children: autoCompleteOptions.map((option, index) => /* @__PURE__ */ jsx7(
|
|
714
|
+
"button",
|
|
871
715
|
{
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
/* @__PURE__ */ jsx9(TooltipContent, { sideOffset: 8, children: tooltip })
|
|
716
|
+
type: "button",
|
|
717
|
+
className: "mly-w-full mly-truncate mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-midnight-gray aria-selected:mly-bg-soft-gray focus:mly-bg-soft-gray focus:mly-outline-none",
|
|
718
|
+
onClick: () => {
|
|
719
|
+
onValueChange(option);
|
|
720
|
+
onSelectOption == null ? void 0 : onSelectOption(option);
|
|
721
|
+
},
|
|
722
|
+
onMouseEnter: () => setSelectedIndex(index),
|
|
723
|
+
"aria-selected": selectedIndex === index,
|
|
724
|
+
children: option
|
|
725
|
+
},
|
|
726
|
+
option
|
|
727
|
+
)) })
|
|
885
728
|
] });
|
|
886
|
-
}
|
|
729
|
+
});
|
|
730
|
+
InputAutocomplete.displayName = "InputAutocomplete";
|
|
887
731
|
|
|
888
|
-
// src/editor/
|
|
889
|
-
import {
|
|
732
|
+
// src/editor/provider.tsx
|
|
733
|
+
import { createContext, useContext } from "react";
|
|
734
|
+
|
|
735
|
+
// src/blocks/button.tsx
|
|
736
|
+
import { MousePointer, ArrowUpRightSquare } from "lucide-react";
|
|
737
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
738
|
+
var button = {
|
|
739
|
+
title: "Button",
|
|
740
|
+
description: "Add a call to action button to email.",
|
|
741
|
+
searchTerms: ["link", "button", "cta"],
|
|
742
|
+
icon: /* @__PURE__ */ jsx8(MousePointer, { className: "mly-h-4 mly-w-4" }),
|
|
743
|
+
command: ({ editor, range }) => {
|
|
744
|
+
editor.chain().focus().deleteRange(range).setButton().run();
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
var linkCard = {
|
|
748
|
+
title: "Link Card",
|
|
749
|
+
description: "Add a link card to email.",
|
|
750
|
+
searchTerms: ["link", "button", "image"],
|
|
751
|
+
icon: /* @__PURE__ */ jsx8(ArrowUpRightSquare, { className: "mly-h-4 mly-w-4" }),
|
|
752
|
+
command: ({ editor, range }) => {
|
|
753
|
+
editor.chain().focus().deleteRange(range).setLinkCard().run();
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
// src/blocks/image.tsx
|
|
758
|
+
import { ImageIcon } from "lucide-react";
|
|
759
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
760
|
+
var image = {
|
|
761
|
+
title: "Image",
|
|
762
|
+
description: "Full width image",
|
|
763
|
+
searchTerms: ["image"],
|
|
764
|
+
icon: /* @__PURE__ */ jsx9(ImageIcon, { className: "mly-h-4 mly-w-4" }),
|
|
765
|
+
command: ({ editor, range }) => {
|
|
766
|
+
editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
|
|
767
|
+
}
|
|
768
|
+
};
|
|
769
|
+
var logo = {
|
|
770
|
+
title: "Logo",
|
|
771
|
+
description: "Add your brand logo",
|
|
772
|
+
searchTerms: ["image", "logo"],
|
|
773
|
+
icon: /* @__PURE__ */ jsx9(ImageIcon, { className: "mly-h-4 mly-w-4" }),
|
|
774
|
+
command: ({ editor, range }) => {
|
|
775
|
+
editor.chain().focus().deleteRange(range).setLogoImage({ src: "" }).run();
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
// src/blocks/layout.tsx
|
|
780
|
+
import {
|
|
781
|
+
ColumnsIcon,
|
|
782
|
+
Repeat2,
|
|
783
|
+
MoveVertical,
|
|
784
|
+
RectangleHorizontal,
|
|
785
|
+
Minus
|
|
786
|
+
} from "lucide-react";
|
|
787
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
788
|
+
var columns = {
|
|
789
|
+
title: "Columns",
|
|
790
|
+
description: "Add columns to email.",
|
|
791
|
+
searchTerms: ["layout", "columns"],
|
|
792
|
+
icon: /* @__PURE__ */ jsx10(ColumnsIcon, { className: "mly-h-4 mly-w-4" }),
|
|
793
|
+
shouldBeHidden: (editor) => {
|
|
794
|
+
return editor.isActive("columns");
|
|
795
|
+
},
|
|
796
|
+
command: ({ editor, range }) => {
|
|
797
|
+
editor.chain().focus().deleteRange(range).setColumns().focus(editor.state.selection.head - 2).run();
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
var section = {
|
|
801
|
+
title: "Section",
|
|
802
|
+
description: "Add a section to email.",
|
|
803
|
+
searchTerms: ["layout", "section"],
|
|
804
|
+
icon: /* @__PURE__ */ jsx10(RectangleHorizontal, { className: "mly-h-4 mly-w-4" }),
|
|
805
|
+
command: ({ editor, range }) => {
|
|
806
|
+
editor.chain().focus().deleteRange(range).setSection().run();
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
var forLoop = {
|
|
810
|
+
title: "For",
|
|
811
|
+
description: "Loop over an array of items.",
|
|
812
|
+
searchTerms: ["for", "loop"],
|
|
813
|
+
icon: /* @__PURE__ */ jsx10(Repeat2, { className: "mly-h-4 mly-w-4" }),
|
|
814
|
+
shouldBeHidden: (editor) => {
|
|
815
|
+
return editor.isActive("for");
|
|
816
|
+
},
|
|
817
|
+
command: ({ editor, range }) => {
|
|
818
|
+
editor.chain().focus().deleteRange(range).setFor().run();
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
var spacer = {
|
|
822
|
+
title: "Spacer",
|
|
823
|
+
description: "Add space between blocks.",
|
|
824
|
+
searchTerms: ["space", "gap", "divider"],
|
|
825
|
+
icon: /* @__PURE__ */ jsx10(MoveVertical, { className: "mly-h-4 mly-w-4" }),
|
|
826
|
+
command: ({ editor, range }) => {
|
|
827
|
+
editor.chain().focus().deleteRange(range).setSpacer({ height: "sm" }).run();
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
var divider = {
|
|
831
|
+
title: "Divider",
|
|
832
|
+
description: "Add a horizontal divider.",
|
|
833
|
+
searchTerms: ["divider", "line"],
|
|
834
|
+
icon: /* @__PURE__ */ jsx10(Minus, { className: "mly-h-4 mly-w-4" }),
|
|
835
|
+
command: ({ editor, range }) => {
|
|
836
|
+
editor.chain().focus().deleteRange(range).setHorizontalRule().run();
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
// src/blocks/list.tsx
|
|
841
|
+
import { List, ListOrdered } from "lucide-react";
|
|
842
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
843
|
+
var bulletList = {
|
|
844
|
+
title: "Bullet List",
|
|
845
|
+
description: "Create a simple bullet list.",
|
|
846
|
+
searchTerms: ["unordered", "point"],
|
|
847
|
+
icon: /* @__PURE__ */ jsx11(List, { className: "mly-h-4 mly-w-4" }),
|
|
848
|
+
command: ({ editor, range }) => {
|
|
849
|
+
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
850
|
+
}
|
|
851
|
+
};
|
|
852
|
+
var orderedList = {
|
|
853
|
+
title: "Numbered List",
|
|
854
|
+
description: "Create a list with numbering.",
|
|
855
|
+
searchTerms: ["ordered"],
|
|
856
|
+
icon: /* @__PURE__ */ jsx11(ListOrdered, { className: "mly-h-4 mly-w-4" }),
|
|
857
|
+
command: ({ editor, range }) => {
|
|
858
|
+
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
// src/blocks/typography.tsx
|
|
863
|
+
import {
|
|
864
|
+
Text,
|
|
865
|
+
Heading1,
|
|
866
|
+
Heading2,
|
|
867
|
+
Heading3,
|
|
868
|
+
DivideIcon,
|
|
869
|
+
TextQuote,
|
|
870
|
+
FootprintsIcon,
|
|
871
|
+
EraserIcon
|
|
872
|
+
} from "lucide-react";
|
|
873
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
874
|
+
var text = {
|
|
875
|
+
title: "Text",
|
|
876
|
+
description: "Just start typing with plain text.",
|
|
877
|
+
searchTerms: ["p", "paragraph"],
|
|
878
|
+
icon: /* @__PURE__ */ jsx12(Text, { className: "mly-h-4 mly-w-4" }),
|
|
879
|
+
command: ({ editor, range }) => {
|
|
880
|
+
editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").run();
|
|
881
|
+
}
|
|
882
|
+
};
|
|
883
|
+
var heading1 = {
|
|
884
|
+
title: "Heading 1",
|
|
885
|
+
description: "Big heading.",
|
|
886
|
+
searchTerms: ["title", "big", "large"],
|
|
887
|
+
icon: /* @__PURE__ */ jsx12(Heading1, { className: "mly-h-4 mly-w-4" }),
|
|
888
|
+
command: ({ editor, range }) => {
|
|
889
|
+
editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
var heading2 = {
|
|
893
|
+
title: "Heading 2",
|
|
894
|
+
description: "Medium heading.",
|
|
895
|
+
searchTerms: ["subtitle", "medium"],
|
|
896
|
+
icon: /* @__PURE__ */ jsx12(Heading2, { className: "mly-h-4 mly-w-4" }),
|
|
897
|
+
command: ({ editor, range }) => {
|
|
898
|
+
editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
var heading3 = {
|
|
902
|
+
title: "Heading 3",
|
|
903
|
+
description: "Small heading.",
|
|
904
|
+
searchTerms: ["subtitle", "small"],
|
|
905
|
+
icon: /* @__PURE__ */ jsx12(Heading3, { className: "mly-h-4 mly-w-4" }),
|
|
906
|
+
command: ({ editor, range }) => {
|
|
907
|
+
editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
var hardBreak = {
|
|
911
|
+
title: "Hard Break",
|
|
912
|
+
description: "Add a break between lines.",
|
|
913
|
+
searchTerms: ["break", "line"],
|
|
914
|
+
icon: /* @__PURE__ */ jsx12(DivideIcon, { className: "mly-h-4 mly-w-4" }),
|
|
915
|
+
command: ({ editor, range }) => {
|
|
916
|
+
editor.chain().focus().deleteRange(range).setHardBreak().run();
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
var blockquote = {
|
|
920
|
+
title: "Blockquote",
|
|
921
|
+
description: "Add blockquote.",
|
|
922
|
+
searchTerms: ["quote", "blockquote"],
|
|
923
|
+
icon: /* @__PURE__ */ jsx12(TextQuote, { className: "mly-h-4 mly-w-4" }),
|
|
924
|
+
command: ({ editor, range }) => {
|
|
925
|
+
editor.chain().focus().deleteRange(range).toggleBlockquote().run();
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
var footer = {
|
|
929
|
+
title: "Footer",
|
|
930
|
+
description: "Add a footer text to email.",
|
|
931
|
+
searchTerms: ["footer", "text"],
|
|
932
|
+
icon: /* @__PURE__ */ jsx12(FootprintsIcon, { className: "mly-h-4 mly-w-4" }),
|
|
933
|
+
command: ({ editor, range }) => {
|
|
934
|
+
editor.chain().focus().deleteRange(range).setFooter().run();
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
var clearLine = {
|
|
938
|
+
title: "Clear Line",
|
|
939
|
+
description: "Clear the current line.",
|
|
940
|
+
searchTerms: ["clear", "line"],
|
|
941
|
+
icon: /* @__PURE__ */ jsx12(EraserIcon, { className: "mly-h-4 mly-w-4" }),
|
|
942
|
+
command: ({ editor, range }) => {
|
|
943
|
+
editor.chain().focus().selectParentNode().deleteSelection().run();
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
// src/editor/extensions/slash-command/default-slash-commands.ts
|
|
948
|
+
var DEFAULT_SLASH_COMMANDS = [
|
|
949
|
+
text,
|
|
950
|
+
heading1,
|
|
951
|
+
heading2,
|
|
952
|
+
heading3,
|
|
953
|
+
bulletList,
|
|
954
|
+
orderedList,
|
|
955
|
+
image,
|
|
956
|
+
logo,
|
|
957
|
+
columns,
|
|
958
|
+
section,
|
|
959
|
+
forLoop,
|
|
960
|
+
divider,
|
|
961
|
+
spacer,
|
|
962
|
+
button,
|
|
963
|
+
linkCard,
|
|
964
|
+
hardBreak,
|
|
965
|
+
blockquote,
|
|
966
|
+
footer,
|
|
967
|
+
clearLine
|
|
968
|
+
];
|
|
969
|
+
|
|
970
|
+
// src/editor/provider.tsx
|
|
971
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
972
|
+
var DEFAULT_VARIABLE_TRIGGER_CHAR = "@";
|
|
973
|
+
var DEFAULT_VARIABLES = [];
|
|
974
|
+
var MailyContext = createContext({
|
|
975
|
+
variableTriggerCharacter: DEFAULT_VARIABLE_TRIGGER_CHAR,
|
|
976
|
+
variables: DEFAULT_VARIABLES,
|
|
977
|
+
blocks: DEFAULT_SLASH_COMMANDS
|
|
978
|
+
});
|
|
979
|
+
function MailyProvider(props) {
|
|
980
|
+
const _a = props, { children } = _a, defaultValues = __objRest(_a, ["children"]);
|
|
981
|
+
if (defaultValues.variableTriggerCharacter === "") {
|
|
982
|
+
throw new Error("variableTriggerCharacter cannot be an empty string");
|
|
983
|
+
}
|
|
984
|
+
return /* @__PURE__ */ jsx13(MailyContext.Provider, { value: defaultValues, children });
|
|
985
|
+
}
|
|
986
|
+
function useMailyContext() {
|
|
987
|
+
const values = useContext(MailyContext);
|
|
988
|
+
if (!values) {
|
|
989
|
+
throw new Error("Missing MailyContext.Provider in the component tree");
|
|
990
|
+
}
|
|
991
|
+
return values;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
// src/editor/components/show-popover.tsx
|
|
995
|
+
import { useMemo as useMemo2 } from "react";
|
|
996
|
+
import { memo } from "react";
|
|
997
|
+
|
|
998
|
+
// src/editor/utils/variable.ts
|
|
999
|
+
function processVariables(variables, options) {
|
|
1000
|
+
const { query } = options;
|
|
1001
|
+
const queryLower = query.toLowerCase();
|
|
1002
|
+
let filteredVariables = [];
|
|
1003
|
+
if (Array.isArray(variables)) {
|
|
1004
|
+
filteredVariables = variables.filter(
|
|
1005
|
+
(variable) => variable.name.toLowerCase().startsWith(queryLower)
|
|
1006
|
+
);
|
|
1007
|
+
if (query.length > 0 && !filteredVariables.some((variable) => variable.name === query)) {
|
|
1008
|
+
filteredVariables.push({ name: query, required: true });
|
|
1009
|
+
}
|
|
1010
|
+
return filteredVariables;
|
|
1011
|
+
} else if (typeof variables === "function") {
|
|
1012
|
+
return variables(options);
|
|
1013
|
+
} else {
|
|
1014
|
+
throw new Error(`Invalid variables type. Expected 'Array' or 'Function', but received '${typeof variables}'.
|
|
1015
|
+
|
|
1016
|
+
You can check out the documentation for more information: https://github.com/arikchakma/maily.to/blob/main/packages/core/readme.md`);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
// src/editor/components/show-popover.tsx
|
|
1021
|
+
import { jsx as jsx14, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1022
|
+
function _ShowPopover(props) {
|
|
1023
|
+
const { showIfKey = "", onShowIfKeyValueChange, editor } = props;
|
|
1024
|
+
const { variables = [] } = useMailyContext();
|
|
1025
|
+
const [isUpdatingKey, setIsUpdatingKey] = useState2(false);
|
|
1026
|
+
const inputRef = useRef2(null);
|
|
1027
|
+
const autoCompleteOptions = useMemo2(() => {
|
|
1028
|
+
return processVariables(variables, {
|
|
1029
|
+
query: showIfKey || "",
|
|
1030
|
+
from: "variable",
|
|
1031
|
+
editor
|
|
1032
|
+
}).map((variable) => variable.name).slice(0, 5);
|
|
1033
|
+
}, [variables, showIfKey, editor]);
|
|
1034
|
+
const isValidWhenKey = showIfKey || autoCompleteOptions.includes(showIfKey);
|
|
1035
|
+
return /* @__PURE__ */ jsxs3(
|
|
1036
|
+
Popover,
|
|
1037
|
+
{
|
|
1038
|
+
onOpenChange: (open) => {
|
|
1039
|
+
if (open) {
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
setIsUpdatingKey(false);
|
|
1043
|
+
},
|
|
1044
|
+
children: [
|
|
1045
|
+
/* @__PURE__ */ jsx14(
|
|
1046
|
+
PopoverTrigger,
|
|
1047
|
+
{
|
|
1048
|
+
className: cn(
|
|
1049
|
+
"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
|
+
showIfKey && "mly-bg-rose-100 mly-text-rose-800 data-[state=open]:mly-bg-rose-100 hover:mly-bg-rose-100"
|
|
1051
|
+
),
|
|
1052
|
+
children: /* @__PURE__ */ jsx14(Eye, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" })
|
|
1053
|
+
}
|
|
1054
|
+
),
|
|
1055
|
+
/* @__PURE__ */ jsxs3(
|
|
1056
|
+
PopoverContent,
|
|
1057
|
+
{
|
|
1058
|
+
className: "mly-flex mly-w-max mly-rounded-lg !mly-p-0.5",
|
|
1059
|
+
side: "top",
|
|
1060
|
+
sideOffset: 8,
|
|
1061
|
+
align: "end",
|
|
1062
|
+
onOpenAutoFocus: (e) => {
|
|
1063
|
+
e.preventDefault();
|
|
1064
|
+
},
|
|
1065
|
+
onCloseAutoFocus: (e) => {
|
|
1066
|
+
e.preventDefault();
|
|
1067
|
+
},
|
|
1068
|
+
children: [
|
|
1069
|
+
/* @__PURE__ */ jsx14("span", { className: "mly-flex mly-items-center mly-px-1.5 mly-text-sm mly-leading-none", children: "Show if" }),
|
|
1070
|
+
!isUpdatingKey && /* @__PURE__ */ jsxs3(
|
|
1071
|
+
"button",
|
|
1072
|
+
{
|
|
1073
|
+
className: cn(
|
|
1074
|
+
"mly-flex mly-h-7 mly-min-w-28 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",
|
|
1075
|
+
!isValidWhenKey && "mly-border-rose-400 mly-bg-rose-50 mly-text-rose-600 hover:mly-bg-rose-100"
|
|
1076
|
+
),
|
|
1077
|
+
onClick: () => {
|
|
1078
|
+
setIsUpdatingKey(true);
|
|
1079
|
+
setTimeout(() => {
|
|
1080
|
+
var _a;
|
|
1081
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
1082
|
+
}, 0);
|
|
1083
|
+
},
|
|
1084
|
+
children: [
|
|
1085
|
+
/* @__PURE__ */ jsx14(Braces, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
1086
|
+
/* @__PURE__ */ jsx14("span", { children: showIfKey })
|
|
1087
|
+
]
|
|
1088
|
+
}
|
|
1089
|
+
),
|
|
1090
|
+
isUpdatingKey && /* @__PURE__ */ jsx14(
|
|
1091
|
+
"form",
|
|
1092
|
+
{
|
|
1093
|
+
onSubmit: (e) => {
|
|
1094
|
+
e.preventDefault();
|
|
1095
|
+
setIsUpdatingKey(false);
|
|
1096
|
+
},
|
|
1097
|
+
onKeyDown: (e) => {
|
|
1098
|
+
if (e.key === "Escape") {
|
|
1099
|
+
setIsUpdatingKey(false);
|
|
1100
|
+
}
|
|
1101
|
+
},
|
|
1102
|
+
children: /* @__PURE__ */ jsx14(
|
|
1103
|
+
InputAutocomplete,
|
|
1104
|
+
{
|
|
1105
|
+
value: showIfKey || "",
|
|
1106
|
+
onValueChange: (value) => {
|
|
1107
|
+
onShowIfKeyValueChange == null ? void 0 : onShowIfKeyValueChange(value);
|
|
1108
|
+
},
|
|
1109
|
+
onOutsideClick: () => {
|
|
1110
|
+
setIsUpdatingKey(false);
|
|
1111
|
+
},
|
|
1112
|
+
onSelectOption: () => {
|
|
1113
|
+
setIsUpdatingKey(false);
|
|
1114
|
+
},
|
|
1115
|
+
autoCompleteOptions,
|
|
1116
|
+
ref: inputRef
|
|
1117
|
+
}
|
|
1118
|
+
)
|
|
1119
|
+
}
|
|
1120
|
+
)
|
|
1121
|
+
]
|
|
1122
|
+
}
|
|
1123
|
+
)
|
|
1124
|
+
]
|
|
1125
|
+
}
|
|
1126
|
+
);
|
|
1127
|
+
}
|
|
1128
|
+
var ShowPopover = memo(_ShowPopover);
|
|
1129
|
+
|
|
1130
|
+
// src/editor/components/column-menu/columns-width-config.tsx
|
|
1131
|
+
import { Columns2, SlidersVertical, Columns3 } from "lucide-react";
|
|
1132
|
+
import { jsx as jsx15, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1133
|
+
function ColumnsWidthConfig(props) {
|
|
1134
|
+
const {
|
|
1135
|
+
columnsCount = 2,
|
|
1136
|
+
onColumnsCountChange,
|
|
1137
|
+
columnWidths,
|
|
1138
|
+
onColumnWidthChange
|
|
1139
|
+
} = props;
|
|
1140
|
+
return /* @__PURE__ */ jsxs4(Popover, { children: [
|
|
1141
|
+
/* @__PURE__ */ jsx15(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__ */ jsx15(SlidersVertical, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5]" }) }),
|
|
1142
|
+
/* @__PURE__ */ jsxs4(
|
|
1143
|
+
PopoverContent,
|
|
1144
|
+
{
|
|
1145
|
+
className: "mly-w-[300px] mly-rounded-lg !mly-p-0.5",
|
|
1146
|
+
side: "top",
|
|
1147
|
+
sideOffset: 8,
|
|
1148
|
+
align: "center",
|
|
1149
|
+
onOpenAutoFocus: (e) => {
|
|
1150
|
+
e.preventDefault();
|
|
1151
|
+
},
|
|
1152
|
+
onCloseAutoFocus: (e) => {
|
|
1153
|
+
e.preventDefault();
|
|
1154
|
+
},
|
|
1155
|
+
children: [
|
|
1156
|
+
/* @__PURE__ */ jsxs4("div", { className: "mly-grid mly-grid-cols-2 mly-gap-1", children: [
|
|
1157
|
+
/* @__PURE__ */ jsxs4(
|
|
1158
|
+
SwitchButton,
|
|
1159
|
+
{
|
|
1160
|
+
onClick: () => onColumnsCountChange(2),
|
|
1161
|
+
isActive: columnsCount === 2,
|
|
1162
|
+
children: [
|
|
1163
|
+
/* @__PURE__ */ jsx15(Columns2, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" }),
|
|
1164
|
+
/* @__PURE__ */ jsx15("span", { children: "2 Columns" })
|
|
1165
|
+
]
|
|
1166
|
+
}
|
|
1167
|
+
),
|
|
1168
|
+
/* @__PURE__ */ jsxs4(
|
|
1169
|
+
SwitchButton,
|
|
1170
|
+
{
|
|
1171
|
+
onClick: () => onColumnsCountChange(3),
|
|
1172
|
+
isActive: columnsCount === 3,
|
|
1173
|
+
children: [
|
|
1174
|
+
/* @__PURE__ */ jsx15(Columns3, { className: "mly-h-4 mly-w-4 mly-stroke-[2.5]" }),
|
|
1175
|
+
/* @__PURE__ */ jsx15("span", { children: "3 Columns" })
|
|
1176
|
+
]
|
|
1177
|
+
}
|
|
1178
|
+
)
|
|
1179
|
+
] }),
|
|
1180
|
+
/* @__PURE__ */ jsx15("hr", { className: "mly-my-0.5 mly-border-gray-200" }),
|
|
1181
|
+
/* @__PURE__ */ jsx15(
|
|
1182
|
+
"div",
|
|
1183
|
+
{
|
|
1184
|
+
className: "mly-grid mly-gap-1 mly-p-1",
|
|
1185
|
+
style: { gridTemplateColumns: `repeat(${columnsCount}, 1fr)` },
|
|
1186
|
+
children: Array.from({ length: columnsCount }).map((_, index) => {
|
|
1187
|
+
const value = columnWidths[index] === "auto" ? "" : columnWidths[index];
|
|
1188
|
+
const label = columnsCount === 2 ? index === 0 ? "Left" : "Right" : index === 0 ? "Left" : index === 1 ? "Middle" : "Right";
|
|
1189
|
+
return /* @__PURE__ */ jsxs4("div", { className: "mly-flex mly-flex-col mly-gap-1", children: [
|
|
1190
|
+
/* @__PURE__ */ jsx15("span", { className: "mly-text-xs mly-text-gray-400", children: label }),
|
|
1191
|
+
/* @__PURE__ */ jsxs4("label", { className: "mly-relative", children: [
|
|
1192
|
+
/* @__PURE__ */ jsx15(
|
|
1193
|
+
"input",
|
|
1194
|
+
{
|
|
1195
|
+
placeholder: "auto",
|
|
1196
|
+
min: 1,
|
|
1197
|
+
max: 90,
|
|
1198
|
+
type: "number",
|
|
1199
|
+
className: "hide-number-controls mly-w-full mly-appearance-none mly-rounded-md mly-bg-soft-gray mly-px-1.5 mly-py-1 mly-pr-6 mly-text-sm mly-tabular-nums mly-outline-none focus:mly-bg-soft-gray focus:mly-outline-none focus:mly-ring-1 focus:mly-ring-midnight-gray/50",
|
|
1200
|
+
value,
|
|
1201
|
+
onChange: (e) => {
|
|
1202
|
+
const value2 = e.target.value;
|
|
1203
|
+
onColumnWidthChange == null ? void 0 : onColumnWidthChange(index, value2);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
),
|
|
1207
|
+
/* @__PURE__ */ jsx15("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
|
+
] })
|
|
1209
|
+
] }, index);
|
|
1210
|
+
})
|
|
1211
|
+
}
|
|
1212
|
+
)
|
|
1213
|
+
]
|
|
1214
|
+
}
|
|
1215
|
+
)
|
|
1216
|
+
] });
|
|
1217
|
+
}
|
|
1218
|
+
function SwitchButton(props) {
|
|
1219
|
+
const { onClick, isActive = false, children } = props;
|
|
1220
|
+
return /* @__PURE__ */ jsx15(
|
|
1221
|
+
"button",
|
|
1222
|
+
{
|
|
1223
|
+
className: cn(
|
|
1224
|
+
"mly-flex mly-h-7 mly-items-center mly-gap-1 mly-rounded-md mly-px-2 mly-text-sm mly-text-gray-500 hover:mly-bg-soft-gray hover:mly-text-midnight-gray",
|
|
1225
|
+
isActive && "mly-bg-soft-gray mly-text-midnight-gray"
|
|
1226
|
+
),
|
|
1227
|
+
onClick,
|
|
1228
|
+
children
|
|
1229
|
+
}
|
|
1230
|
+
);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
// src/editor/components/ui/select.tsx
|
|
1234
|
+
import { useId } from "react";
|
|
1235
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
1236
|
+
import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1237
|
+
function Select(props) {
|
|
1238
|
+
const {
|
|
1239
|
+
label,
|
|
1240
|
+
options,
|
|
1241
|
+
value,
|
|
1242
|
+
onValueChange,
|
|
1243
|
+
tooltip,
|
|
1244
|
+
className,
|
|
1245
|
+
icon: Icon,
|
|
1246
|
+
iconClassName
|
|
1247
|
+
} = props;
|
|
1248
|
+
const selectId = `mly${useId()}`;
|
|
1249
|
+
const content = /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
|
|
1250
|
+
/* @__PURE__ */ jsx16("label", { htmlFor: selectId, className: "sr-only", children: label }),
|
|
1251
|
+
Icon && /* @__PURE__ */ jsx16("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__ */ jsx16(Icon, { className: cn("mly-size-3", iconClassName) }) }),
|
|
1252
|
+
/* @__PURE__ */ jsx16(
|
|
1253
|
+
"select",
|
|
1254
|
+
{
|
|
1255
|
+
id: selectId,
|
|
1256
|
+
className: cn(
|
|
1257
|
+
"mly-flex mly-min-h-7 mly-max-w-max mly-appearance-none mly-items-center mly-rounded-md mly-px-1.5 mly-py-0.5 mly-pr-7 mly-text-sm mly-text-midnight-gray mly-ring-offset-white mly-transition-colors 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 active:mly-bg-soft-gray",
|
|
1258
|
+
!!Icon && "mly-pl-7",
|
|
1259
|
+
className
|
|
1260
|
+
),
|
|
1261
|
+
value,
|
|
1262
|
+
onChange: (event) => onValueChange(event.target.value),
|
|
1263
|
+
children: options.map((option) => /* @__PURE__ */ jsx16("option", { value: option.value, children: option.label }, option.value))
|
|
1264
|
+
}
|
|
1265
|
+
),
|
|
1266
|
+
/* @__PURE__ */ jsx16("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__ */ jsx16(
|
|
1267
|
+
ChevronDownIcon,
|
|
1268
|
+
{
|
|
1269
|
+
size: 16,
|
|
1270
|
+
strokeWidth: 2,
|
|
1271
|
+
"aria-hidden": "true",
|
|
1272
|
+
role: "img"
|
|
1273
|
+
}
|
|
1274
|
+
) })
|
|
1275
|
+
] });
|
|
1276
|
+
if (!tooltip) {
|
|
1277
|
+
return content;
|
|
1278
|
+
}
|
|
1279
|
+
return /* @__PURE__ */ jsxs5(Tooltip, { children: [
|
|
1280
|
+
/* @__PURE__ */ jsx16(TooltipTrigger, { asChild: true, children: content }),
|
|
1281
|
+
/* @__PURE__ */ jsx16(TooltipContent, { sideOffset: 8, children: tooltip })
|
|
1282
|
+
] });
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
// src/editor/components/column-menu/columns-bubble-menu-content.tsx
|
|
1286
|
+
import { Space, Trash } from "lucide-react";
|
|
890
1287
|
|
|
891
1288
|
// src/editor/utils/delete-node.ts
|
|
892
1289
|
import { findParentNode as findParentNode2 } from "@tiptap/core";
|
|
@@ -906,7 +1303,7 @@ function deleteNode(editor, nodeType) {
|
|
|
906
1303
|
}
|
|
907
1304
|
|
|
908
1305
|
// src/editor/components/column-menu/columns-bubble-menu-content.tsx
|
|
909
|
-
import { Fragment as Fragment2, jsx as
|
|
1306
|
+
import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
910
1307
|
function ColumnsBubbleMenuContent(props) {
|
|
911
1308
|
const { editor } = props;
|
|
912
1309
|
if (!editor) {
|
|
@@ -914,9 +1311,9 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
914
1311
|
}
|
|
915
1312
|
const state = useColumnsState(editor);
|
|
916
1313
|
const currentColumnCount = state.columnsCount;
|
|
917
|
-
return /* @__PURE__ */
|
|
918
|
-
state.isColumnActive && /* @__PURE__ */
|
|
919
|
-
/* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ jsx17(TooltipProvider, { children: /* @__PURE__ */ jsxs6("div", { className: "mly-flex mly-items-stretch", children: [
|
|
1315
|
+
state.isColumnActive && /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1316
|
+
/* @__PURE__ */ jsx17(
|
|
920
1317
|
ColumnsWidthConfig,
|
|
921
1318
|
{
|
|
922
1319
|
columnsCount: currentColumnCount,
|
|
@@ -933,9 +1330,9 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
933
1330
|
}
|
|
934
1331
|
}
|
|
935
1332
|
),
|
|
936
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ jsx17(Divider, {})
|
|
937
1334
|
] }),
|
|
938
|
-
/* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ jsx17(
|
|
939
1336
|
VerticalAlignmentSwitch,
|
|
940
1337
|
{
|
|
941
1338
|
alignment: state.currentVerticalAlignment,
|
|
@@ -946,8 +1343,8 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
946
1343
|
}
|
|
947
1344
|
}
|
|
948
1345
|
),
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ jsx17(Divider, {}),
|
|
1347
|
+
/* @__PURE__ */ jsx17(
|
|
951
1348
|
Select,
|
|
952
1349
|
{
|
|
953
1350
|
icon: Space,
|
|
@@ -968,8 +1365,8 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
968
1365
|
tooltip: "Columns Gap"
|
|
969
1366
|
}
|
|
970
1367
|
),
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ jsx17(Divider, {}),
|
|
1369
|
+
/* @__PURE__ */ jsx17(
|
|
973
1370
|
BubbleMenuButton,
|
|
974
1371
|
{
|
|
975
1372
|
icon: Trash,
|
|
@@ -979,8 +1376,8 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
979
1376
|
}
|
|
980
1377
|
}
|
|
981
1378
|
),
|
|
982
|
-
/* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ jsx17(Divider, {}),
|
|
1380
|
+
/* @__PURE__ */ jsx17(
|
|
984
1381
|
ShowPopover,
|
|
985
1382
|
{
|
|
986
1383
|
showIfKey: state.currentShowIfKey,
|
|
@@ -988,20 +1385,21 @@ function ColumnsBubbleMenuContent(props) {
|
|
|
988
1385
|
editor.commands.updateColumns({
|
|
989
1386
|
showIfKey: value
|
|
990
1387
|
});
|
|
991
|
-
}
|
|
1388
|
+
},
|
|
1389
|
+
editor
|
|
992
1390
|
}
|
|
993
1391
|
)
|
|
994
1392
|
] }) });
|
|
995
1393
|
}
|
|
996
1394
|
|
|
997
1395
|
// src/editor/components/column-menu/columns-bubble-menu.tsx
|
|
998
|
-
import { jsx as
|
|
1396
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
999
1397
|
function ColumnsBubbleMenu(props) {
|
|
1000
1398
|
const { appendTo, editor } = props;
|
|
1001
1399
|
if (!editor) {
|
|
1002
1400
|
return null;
|
|
1003
1401
|
}
|
|
1004
|
-
const getReferenceClientRect =
|
|
1402
|
+
const getReferenceClientRect = useCallback2(() => {
|
|
1005
1403
|
const renderContainer = getRenderContainer(editor, "columns");
|
|
1006
1404
|
const rect = (renderContainer == null ? void 0 : renderContainer.getBoundingClientRect()) || new DOMRect(-1e3, -1e3, 0, 0);
|
|
1007
1405
|
return rect;
|
|
@@ -1026,26 +1424,26 @@ function ColumnsBubbleMenu(props) {
|
|
|
1026
1424
|
},
|
|
1027
1425
|
pluginKey: "columnsBubbleMenu"
|
|
1028
1426
|
});
|
|
1029
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ jsx18(
|
|
1030
1428
|
BubbleMenu,
|
|
1031
1429
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
1032
1430
|
className: "mly-rounded-lg mly-border mly-border-slate-200 mly-bg-white mly-p-0.5 mly-shadow-md",
|
|
1033
|
-
children: /* @__PURE__ */
|
|
1431
|
+
children: /* @__PURE__ */ jsx18(ColumnsBubbleMenuContent, { editor })
|
|
1034
1432
|
})
|
|
1035
1433
|
);
|
|
1036
1434
|
}
|
|
1037
1435
|
|
|
1038
1436
|
// src/editor/components/content-menu.tsx
|
|
1039
|
-
import { useCallback as
|
|
1437
|
+
import { useCallback as useCallback3, useEffect as useEffect3, useState as useState4 } from "react";
|
|
1040
1438
|
import { Copy, GripVertical, Plus, Trash2 } from "lucide-react";
|
|
1041
1439
|
|
|
1042
1440
|
// src/editor/components/drag-handle.tsx
|
|
1043
|
-
import { useState as
|
|
1441
|
+
import { useState as useState3, useRef as useRef3, useEffect as useEffect2 } from "react";
|
|
1044
1442
|
import {
|
|
1045
1443
|
DragHandlePlugin,
|
|
1046
1444
|
dragHandlePluginDefaultKey
|
|
1047
1445
|
} from "echo-drag-handle-plugin";
|
|
1048
|
-
import { jsx as
|
|
1446
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1049
1447
|
function DragHandle(props) {
|
|
1050
1448
|
const {
|
|
1051
1449
|
className = "drag-handle",
|
|
@@ -1055,9 +1453,9 @@ function DragHandle(props) {
|
|
|
1055
1453
|
onNodeChange,
|
|
1056
1454
|
tippyOptions = {}
|
|
1057
1455
|
} = props;
|
|
1058
|
-
const [element, setElement] =
|
|
1059
|
-
const pluginRef =
|
|
1060
|
-
|
|
1456
|
+
const [element, setElement] = useState3(null);
|
|
1457
|
+
const pluginRef = useRef3(null);
|
|
1458
|
+
useEffect2(() => {
|
|
1061
1459
|
if (!element) {
|
|
1062
1460
|
return () => {
|
|
1063
1461
|
pluginRef.current = null;
|
|
@@ -1083,17 +1481,17 @@ function DragHandle(props) {
|
|
|
1083
1481
|
pluginRef.current = null;
|
|
1084
1482
|
};
|
|
1085
1483
|
}, [element, editor, onNodeChange, pluginKey]);
|
|
1086
|
-
return /* @__PURE__ */
|
|
1484
|
+
return /* @__PURE__ */ jsx19("div", { className, ref: setElement, children });
|
|
1087
1485
|
}
|
|
1088
1486
|
|
|
1089
1487
|
// src/editor/components/content-menu.tsx
|
|
1090
|
-
import { jsx as
|
|
1488
|
+
import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1091
1489
|
function ContentMenu(props) {
|
|
1092
1490
|
const { editor } = props;
|
|
1093
|
-
const [menuOpen, setMenuOpen] =
|
|
1094
|
-
const [currentNode, setCurrentNode] =
|
|
1095
|
-
const [currentNodePos, setCurrentNodePos] =
|
|
1096
|
-
const handleNodeChange =
|
|
1491
|
+
const [menuOpen, setMenuOpen] = useState4(false);
|
|
1492
|
+
const [currentNode, setCurrentNode] = useState4(null);
|
|
1493
|
+
const [currentNodePos, setCurrentNodePos] = useState4(-1);
|
|
1494
|
+
const handleNodeChange = useCallback3(
|
|
1097
1495
|
(data) => {
|
|
1098
1496
|
if (data.node) {
|
|
1099
1497
|
setCurrentNode(data.node);
|
|
@@ -1141,7 +1539,7 @@ function ContentMenu(props) {
|
|
|
1141
1539
|
}).focus(focusPos).run();
|
|
1142
1540
|
}
|
|
1143
1541
|
}
|
|
1144
|
-
|
|
1542
|
+
useEffect3(() => {
|
|
1145
1543
|
if (menuOpen) {
|
|
1146
1544
|
editor.commands.setMeta("lockDragHandle", true);
|
|
1147
1545
|
} else {
|
|
@@ -1151,53 +1549,54 @@ function ContentMenu(props) {
|
|
|
1151
1549
|
editor.commands.setMeta("lockDragHandle", false);
|
|
1152
1550
|
};
|
|
1153
1551
|
}, [editor, menuOpen]);
|
|
1154
|
-
return /* @__PURE__ */
|
|
1552
|
+
return /* @__PURE__ */ jsx20(
|
|
1155
1553
|
DragHandle,
|
|
1156
1554
|
{
|
|
1157
1555
|
pluginKey: "ContentMenu",
|
|
1158
1556
|
editor,
|
|
1159
1557
|
tippyOptions: {
|
|
1160
|
-
offset: [
|
|
1558
|
+
offset: [2, 0],
|
|
1161
1559
|
zIndex: 99
|
|
1162
1560
|
},
|
|
1163
1561
|
onNodeChange: handleNodeChange,
|
|
1164
|
-
children: /* @__PURE__ */
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
/* @__PURE__ */
|
|
1562
|
+
children: /* @__PURE__ */ jsx20(TooltipProvider, { children: /* @__PURE__ */ jsxs7("div", { className: "mly-flex mly-items-center mly-pr-1.5", children: [
|
|
1563
|
+
/* @__PURE__ */ jsxs7(Tooltip, { children: [
|
|
1564
|
+
/* @__PURE__ */ jsx20(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx20(
|
|
1167
1565
|
BaseButton,
|
|
1168
1566
|
{
|
|
1169
1567
|
variant: "ghost",
|
|
1170
1568
|
size: "icon",
|
|
1171
|
-
className: "!mly-size-
|
|
1569
|
+
className: "!mly-size-5 mly-cursor-grab mly-text-gray-500 hover:mly-text-black",
|
|
1172
1570
|
onClick: handleAddNewNode,
|
|
1173
1571
|
type: "button",
|
|
1174
|
-
children: /* @__PURE__ */
|
|
1572
|
+
children: /* @__PURE__ */ jsx20(Plus, { className: "mly-size-3.5 mly-shrink-0" })
|
|
1175
1573
|
}
|
|
1176
1574
|
) }),
|
|
1177
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx20(TooltipContent, { sideOffset: 8, children: "Add new node" })
|
|
1178
1576
|
] }),
|
|
1179
|
-
/* @__PURE__ */
|
|
1180
|
-
/* @__PURE__ */
|
|
1181
|
-
/* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ jsxs7(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
1578
|
+
/* @__PURE__ */ jsxs7("div", { className: "mly-relative mly-flex mly-flex-col", children: [
|
|
1579
|
+
/* @__PURE__ */ jsxs7(Tooltip, { children: [
|
|
1580
|
+
/* @__PURE__ */ jsx20(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx20(
|
|
1183
1581
|
BaseButton,
|
|
1184
1582
|
{
|
|
1185
1583
|
variant: "ghost",
|
|
1186
1584
|
size: "icon",
|
|
1187
|
-
className: "mly-relative mly-z-[1] !mly-size-
|
|
1585
|
+
className: "mly-relative mly-z-[1] !mly-size-5 mly-cursor-grab mly-text-gray-500 hover:mly-text-black",
|
|
1188
1586
|
onClick: (e) => {
|
|
1189
1587
|
e.preventDefault();
|
|
1190
1588
|
setMenuOpen(true);
|
|
1589
|
+
editor.commands.setNodeSelection(currentNodePos);
|
|
1191
1590
|
},
|
|
1192
1591
|
type: "button",
|
|
1193
|
-
children: /* @__PURE__ */
|
|
1592
|
+
children: /* @__PURE__ */ jsx20(GripVertical, { className: "mly-size-3.5 mly-shrink-0" })
|
|
1194
1593
|
}
|
|
1195
1594
|
) }),
|
|
1196
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ jsx20(TooltipContent, { sideOffset: 8, children: "Node actions" })
|
|
1197
1596
|
] }),
|
|
1198
|
-
/* @__PURE__ */
|
|
1597
|
+
/* @__PURE__ */ jsx20(PopoverTrigger, { className: "mly-absolute mly-left-0 mly-top-0 mly-z-0 mly-h-5 mly-w-5" })
|
|
1199
1598
|
] }),
|
|
1200
|
-
/* @__PURE__ */
|
|
1599
|
+
/* @__PURE__ */ jsxs7(
|
|
1201
1600
|
PopoverContent,
|
|
1202
1601
|
{
|
|
1203
1602
|
align: "start",
|
|
@@ -1205,26 +1604,26 @@ function ContentMenu(props) {
|
|
|
1205
1604
|
sideOffset: 8,
|
|
1206
1605
|
className: "mly-flex mly-w-max mly-flex-col mly-rounded-md mly-p-1",
|
|
1207
1606
|
children: [
|
|
1208
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ jsxs7(
|
|
1209
1608
|
BaseButton,
|
|
1210
1609
|
{
|
|
1211
1610
|
variant: "ghost",
|
|
1212
1611
|
onClick: duplicateNode,
|
|
1213
1612
|
className: "mly-h-auto mly-justify-start mly-gap-2 !mly-rounded mly-px-2 mly-py-1 mly-text-sm mly-font-normal",
|
|
1214
1613
|
children: [
|
|
1215
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsx20(Copy, { className: "mly-size-[15px] mly-shrink-0" }),
|
|
1216
1615
|
"Duplicate"
|
|
1217
1616
|
]
|
|
1218
1617
|
}
|
|
1219
1618
|
),
|
|
1220
|
-
/* @__PURE__ */
|
|
1221
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ jsx20(Divider, { type: "horizontal" }),
|
|
1620
|
+
/* @__PURE__ */ jsxs7(
|
|
1222
1621
|
BaseButton,
|
|
1223
1622
|
{
|
|
1224
1623
|
onClick: deleteCurrentNode,
|
|
1225
1624
|
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",
|
|
1226
1625
|
children: [
|
|
1227
|
-
/* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ jsx20(Trash2, { className: "mly-size-[15px] mly-shrink-0" }),
|
|
1228
1627
|
"Delete"
|
|
1229
1628
|
]
|
|
1230
1629
|
}
|
|
@@ -1239,23 +1638,23 @@ function ContentMenu(props) {
|
|
|
1239
1638
|
}
|
|
1240
1639
|
|
|
1241
1640
|
// src/editor/components/editor-menu-bar.tsx
|
|
1242
|
-
import { useMemo } from "react";
|
|
1641
|
+
import { useMemo as useMemo3 } from "react";
|
|
1243
1642
|
import {
|
|
1244
1643
|
AlignCenter,
|
|
1245
1644
|
AlignLeft,
|
|
1246
1645
|
AlignRight,
|
|
1247
1646
|
BoldIcon,
|
|
1248
|
-
EraserIcon,
|
|
1647
|
+
EraserIcon as EraserIcon2,
|
|
1249
1648
|
ItalicIcon,
|
|
1250
1649
|
LinkIcon,
|
|
1251
1650
|
SeparatorHorizontal,
|
|
1252
1651
|
StrikethroughIcon,
|
|
1253
1652
|
UnderlineIcon
|
|
1254
1653
|
} from "lucide-react";
|
|
1255
|
-
import { jsx as
|
|
1654
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1256
1655
|
var EditorMenuBar = (props) => {
|
|
1257
1656
|
const { editor, config } = props;
|
|
1258
|
-
const items =
|
|
1657
|
+
const items = useMemo3(
|
|
1259
1658
|
() => [
|
|
1260
1659
|
{
|
|
1261
1660
|
name: "bold",
|
|
@@ -1290,7 +1689,7 @@ var EditorMenuBar = (props) => {
|
|
|
1290
1689
|
command: () => editor.chain().focus().selectParentNode().deleteSelection().run(),
|
|
1291
1690
|
isActive: () => false,
|
|
1292
1691
|
group: "mark",
|
|
1293
|
-
icon:
|
|
1692
|
+
icon: EraserIcon2
|
|
1294
1693
|
},
|
|
1295
1694
|
{
|
|
1296
1695
|
name: "divider",
|
|
@@ -1309,417 +1708,70 @@ var EditorMenuBar = (props) => {
|
|
|
1309
1708
|
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
1310
1709
|
return;
|
|
1311
1710
|
}
|
|
1312
|
-
editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
|
|
1313
|
-
},
|
|
1314
|
-
isActive: () => editor.isActive("link"),
|
|
1315
|
-
group: "custom",
|
|
1316
|
-
icon: LinkIcon
|
|
1317
|
-
},
|
|
1318
|
-
{
|
|
1319
|
-
name: "left",
|
|
1320
|
-
command: () => editor.chain().focus().setTextAlign("left").run(),
|
|
1321
|
-
isActive: () => editor.isActive({ textAlign: "left" }),
|
|
1322
|
-
group: "alignment",
|
|
1323
|
-
icon: AlignLeft
|
|
1324
|
-
},
|
|
1325
|
-
{
|
|
1326
|
-
name: "center",
|
|
1327
|
-
command: () => editor.chain().focus().setTextAlign("center").run(),
|
|
1328
|
-
isActive: () => editor.isActive({ textAlign: "center" }),
|
|
1329
|
-
group: "alignment",
|
|
1330
|
-
icon: AlignCenter
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
name: "right",
|
|
1334
|
-
command: () => editor.chain().focus().setTextAlign("right").run(),
|
|
1335
|
-
isActive: () => editor.isActive({ textAlign: "right" }),
|
|
1336
|
-
group: "alignment",
|
|
1337
|
-
icon: AlignRight
|
|
1338
|
-
}
|
|
1339
|
-
],
|
|
1340
|
-
[editor]
|
|
1341
|
-
);
|
|
1342
|
-
const groups =
|
|
1343
|
-
() => items.reduce((acc, item) => {
|
|
1344
|
-
if (!acc.includes(item.group)) {
|
|
1345
|
-
acc.push(item.group);
|
|
1346
|
-
}
|
|
1347
|
-
return acc;
|
|
1348
|
-
}, []),
|
|
1349
|
-
[items]
|
|
1350
|
-
);
|
|
1351
|
-
if (!editor) {
|
|
1352
|
-
return null;
|
|
1353
|
-
}
|
|
1354
|
-
return /* @__PURE__ */ jsx14(
|
|
1355
|
-
"div",
|
|
1356
|
-
{
|
|
1357
|
-
className: `mly-flex mly-items-center mly-gap-3 ${config == null ? void 0 : config.toolbarClassName}`,
|
|
1358
|
-
children: groups.map((group, index) => /* @__PURE__ */ jsx14(
|
|
1359
|
-
"div",
|
|
1360
|
-
{
|
|
1361
|
-
className: "mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-border mly-bg-white mly-p-1",
|
|
1362
|
-
children: items.filter((item) => item.group === group).map((item, index2) => /* @__PURE__ */ jsx14(BubbleMenuButton, __spreadValues({}, item), index2))
|
|
1363
|
-
},
|
|
1364
|
-
index
|
|
1365
|
-
))
|
|
1366
|
-
}
|
|
1367
|
-
);
|
|
1368
|
-
};
|
|
1369
|
-
|
|
1370
|
-
// src/editor/provider.tsx
|
|
1371
|
-
import { createContext, useContext } from "react";
|
|
1372
|
-
|
|
1373
|
-
// src/blocks/button.tsx
|
|
1374
|
-
import { MousePointer, ArrowUpRightSquare } from "lucide-react";
|
|
1375
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1376
|
-
var button = {
|
|
1377
|
-
title: "Button",
|
|
1378
|
-
description: "Add a call to action button to email.",
|
|
1379
|
-
searchTerms: ["link", "button", "cta"],
|
|
1380
|
-
icon: /* @__PURE__ */ jsx15(MousePointer, { className: "mly-h-4 mly-w-4" }),
|
|
1381
|
-
command: ({ editor, range }) => {
|
|
1382
|
-
editor.chain().focus().deleteRange(range).setButton().run();
|
|
1383
|
-
}
|
|
1384
|
-
};
|
|
1385
|
-
var linkCard = {
|
|
1386
|
-
title: "Link Card",
|
|
1387
|
-
description: "Add a link card to email.",
|
|
1388
|
-
searchTerms: ["link", "button", "image"],
|
|
1389
|
-
icon: /* @__PURE__ */ jsx15(ArrowUpRightSquare, { className: "mly-h-4 mly-w-4" }),
|
|
1390
|
-
command: ({ editor, range }) => {
|
|
1391
|
-
editor.chain().focus().deleteRange(range).setLinkCard().run();
|
|
1392
|
-
}
|
|
1393
|
-
};
|
|
1394
|
-
|
|
1395
|
-
// src/blocks/image.tsx
|
|
1396
|
-
import { ImageIcon } from "lucide-react";
|
|
1397
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1398
|
-
var image = {
|
|
1399
|
-
title: "Image",
|
|
1400
|
-
description: "Full width image",
|
|
1401
|
-
searchTerms: ["image"],
|
|
1402
|
-
icon: /* @__PURE__ */ jsx16(ImageIcon, { className: "mly-h-4 mly-w-4" }),
|
|
1403
|
-
command: ({ editor, range }) => {
|
|
1404
|
-
editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
|
|
1405
|
-
}
|
|
1406
|
-
};
|
|
1407
|
-
var logo = {
|
|
1408
|
-
title: "Logo",
|
|
1409
|
-
description: "Add your brand logo",
|
|
1410
|
-
searchTerms: ["image", "logo"],
|
|
1411
|
-
icon: /* @__PURE__ */ jsx16(ImageIcon, { className: "mly-h-4 mly-w-4" }),
|
|
1412
|
-
command: ({ editor, range }) => {
|
|
1413
|
-
editor.chain().focus().deleteRange(range).setLogoImage({ src: "" }).run();
|
|
1414
|
-
}
|
|
1415
|
-
};
|
|
1416
|
-
|
|
1417
|
-
// src/blocks/layout.tsx
|
|
1418
|
-
import {
|
|
1419
|
-
ColumnsIcon,
|
|
1420
|
-
Repeat2,
|
|
1421
|
-
MoveVertical,
|
|
1422
|
-
RectangleHorizontal,
|
|
1423
|
-
Minus
|
|
1424
|
-
} from "lucide-react";
|
|
1425
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1426
|
-
var columns = {
|
|
1427
|
-
title: "Columns",
|
|
1428
|
-
description: "Add columns to email.",
|
|
1429
|
-
searchTerms: ["layout", "columns"],
|
|
1430
|
-
icon: /* @__PURE__ */ jsx17(ColumnsIcon, { className: "mly-h-4 mly-w-4" }),
|
|
1431
|
-
shouldBeHidden: (editor) => {
|
|
1432
|
-
return editor.isActive("columns");
|
|
1433
|
-
},
|
|
1434
|
-
command: ({ editor, range }) => {
|
|
1435
|
-
editor.chain().focus().deleteRange(range).setColumns().focus(editor.state.selection.head - 2).run();
|
|
1436
|
-
}
|
|
1437
|
-
};
|
|
1438
|
-
var section = {
|
|
1439
|
-
title: "Section",
|
|
1440
|
-
description: "Add a section to email.",
|
|
1441
|
-
searchTerms: ["layout", "section"],
|
|
1442
|
-
icon: /* @__PURE__ */ jsx17(RectangleHorizontal, { className: "mly-h-4 mly-w-4" }),
|
|
1443
|
-
command: ({ editor, range }) => {
|
|
1444
|
-
editor.chain().focus().deleteRange(range).setSection().run();
|
|
1445
|
-
}
|
|
1446
|
-
};
|
|
1447
|
-
var forLoop = {
|
|
1448
|
-
title: "For",
|
|
1449
|
-
description: "Loop over an array of items.",
|
|
1450
|
-
searchTerms: ["for", "loop"],
|
|
1451
|
-
icon: /* @__PURE__ */ jsx17(Repeat2, { className: "mly-h-4 mly-w-4" }),
|
|
1452
|
-
shouldBeHidden: (editor) => {
|
|
1453
|
-
return editor.isActive("for");
|
|
1454
|
-
},
|
|
1455
|
-
command: ({ editor, range }) => {
|
|
1456
|
-
editor.chain().focus().deleteRange(range).setFor().run();
|
|
1457
|
-
}
|
|
1458
|
-
};
|
|
1459
|
-
var spacer = {
|
|
1460
|
-
title: "Spacer",
|
|
1461
|
-
description: "Add space between blocks.",
|
|
1462
|
-
searchTerms: ["space", "gap", "divider"],
|
|
1463
|
-
icon: /* @__PURE__ */ jsx17(MoveVertical, { className: "mly-h-4 mly-w-4" }),
|
|
1464
|
-
command: ({ editor, range }) => {
|
|
1465
|
-
editor.chain().focus().deleteRange(range).setSpacer({ height: "sm" }).run();
|
|
1466
|
-
}
|
|
1467
|
-
};
|
|
1468
|
-
var divider = {
|
|
1469
|
-
title: "Divider",
|
|
1470
|
-
description: "Add a horizontal divider.",
|
|
1471
|
-
searchTerms: ["divider", "line"],
|
|
1472
|
-
icon: /* @__PURE__ */ jsx17(Minus, { className: "mly-h-4 mly-w-4" }),
|
|
1473
|
-
command: ({ editor, range }) => {
|
|
1474
|
-
editor.chain().focus().deleteRange(range).setHorizontalRule().run();
|
|
1475
|
-
}
|
|
1476
|
-
};
|
|
1477
|
-
|
|
1478
|
-
// src/blocks/list.tsx
|
|
1479
|
-
import { List, ListOrdered } from "lucide-react";
|
|
1480
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1481
|
-
var bulletList = {
|
|
1482
|
-
title: "Bullet List",
|
|
1483
|
-
description: "Create a simple bullet list.",
|
|
1484
|
-
searchTerms: ["unordered", "point"],
|
|
1485
|
-
icon: /* @__PURE__ */ jsx18(List, { className: "mly-h-4 mly-w-4" }),
|
|
1486
|
-
command: ({ editor, range }) => {
|
|
1487
|
-
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
1488
|
-
}
|
|
1489
|
-
};
|
|
1490
|
-
var orderedList = {
|
|
1491
|
-
title: "Numbered List",
|
|
1492
|
-
description: "Create a list with numbering.",
|
|
1493
|
-
searchTerms: ["ordered"],
|
|
1494
|
-
icon: /* @__PURE__ */ jsx18(ListOrdered, { className: "mly-h-4 mly-w-4" }),
|
|
1495
|
-
command: ({ editor, range }) => {
|
|
1496
|
-
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
1497
|
-
}
|
|
1498
|
-
};
|
|
1499
|
-
|
|
1500
|
-
// src/blocks/typography.tsx
|
|
1501
|
-
import {
|
|
1502
|
-
Text,
|
|
1503
|
-
Heading1,
|
|
1504
|
-
Heading2,
|
|
1505
|
-
Heading3,
|
|
1506
|
-
DivideIcon,
|
|
1507
|
-
TextQuote,
|
|
1508
|
-
FootprintsIcon,
|
|
1509
|
-
EraserIcon as EraserIcon2
|
|
1510
|
-
} from "lucide-react";
|
|
1511
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1512
|
-
var text = {
|
|
1513
|
-
title: "Text",
|
|
1514
|
-
description: "Just start typing with plain text.",
|
|
1515
|
-
searchTerms: ["p", "paragraph"],
|
|
1516
|
-
icon: /* @__PURE__ */ jsx19(Text, { className: "mly-h-4 mly-w-4" }),
|
|
1517
|
-
command: ({ editor, range }) => {
|
|
1518
|
-
editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph").run();
|
|
1519
|
-
}
|
|
1520
|
-
};
|
|
1521
|
-
var heading1 = {
|
|
1522
|
-
title: "Heading 1",
|
|
1523
|
-
description: "Big heading.",
|
|
1524
|
-
searchTerms: ["title", "big", "large"],
|
|
1525
|
-
icon: /* @__PURE__ */ jsx19(Heading1, { className: "mly-h-4 mly-w-4" }),
|
|
1526
|
-
command: ({ editor, range }) => {
|
|
1527
|
-
editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
|
|
1528
|
-
}
|
|
1529
|
-
};
|
|
1530
|
-
var heading2 = {
|
|
1531
|
-
title: "Heading 2",
|
|
1532
|
-
description: "Medium heading.",
|
|
1533
|
-
searchTerms: ["subtitle", "medium"],
|
|
1534
|
-
icon: /* @__PURE__ */ jsx19(Heading2, { className: "mly-h-4 mly-w-4" }),
|
|
1535
|
-
command: ({ editor, range }) => {
|
|
1536
|
-
editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
|
|
1537
|
-
}
|
|
1538
|
-
};
|
|
1539
|
-
var heading3 = {
|
|
1540
|
-
title: "Heading 3",
|
|
1541
|
-
description: "Small heading.",
|
|
1542
|
-
searchTerms: ["subtitle", "small"],
|
|
1543
|
-
icon: /* @__PURE__ */ jsx19(Heading3, { className: "mly-h-4 mly-w-4" }),
|
|
1544
|
-
command: ({ editor, range }) => {
|
|
1545
|
-
editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
|
|
1546
|
-
}
|
|
1547
|
-
};
|
|
1548
|
-
var hardBreak = {
|
|
1549
|
-
title: "Hard Break",
|
|
1550
|
-
description: "Add a break between lines.",
|
|
1551
|
-
searchTerms: ["break", "line"],
|
|
1552
|
-
icon: /* @__PURE__ */ jsx19(DivideIcon, { className: "mly-h-4 mly-w-4" }),
|
|
1553
|
-
command: ({ editor, range }) => {
|
|
1554
|
-
editor.chain().focus().deleteRange(range).setHardBreak().run();
|
|
1555
|
-
}
|
|
1556
|
-
};
|
|
1557
|
-
var blockquote = {
|
|
1558
|
-
title: "Blockquote",
|
|
1559
|
-
description: "Add blockquote.",
|
|
1560
|
-
searchTerms: ["quote", "blockquote"],
|
|
1561
|
-
icon: /* @__PURE__ */ jsx19(TextQuote, { className: "mly-h-4 mly-w-4" }),
|
|
1562
|
-
command: ({ editor, range }) => {
|
|
1563
|
-
editor.chain().focus().deleteRange(range).toggleBlockquote().run();
|
|
1564
|
-
}
|
|
1565
|
-
};
|
|
1566
|
-
var footer = {
|
|
1567
|
-
title: "Footer",
|
|
1568
|
-
description: "Add a footer text to email.",
|
|
1569
|
-
searchTerms: ["footer", "text"],
|
|
1570
|
-
icon: /* @__PURE__ */ jsx19(FootprintsIcon, { className: "mly-h-4 mly-w-4" }),
|
|
1571
|
-
command: ({ editor, range }) => {
|
|
1572
|
-
editor.chain().focus().deleteRange(range).setFooter().run();
|
|
1573
|
-
}
|
|
1574
|
-
};
|
|
1575
|
-
var clearLine = {
|
|
1576
|
-
title: "Clear Line",
|
|
1577
|
-
description: "Clear the current line.",
|
|
1578
|
-
searchTerms: ["clear", "line"],
|
|
1579
|
-
icon: /* @__PURE__ */ jsx19(EraserIcon2, { className: "mly-h-4 mly-w-4" }),
|
|
1580
|
-
command: ({ editor, range }) => {
|
|
1581
|
-
editor.chain().focus().selectParentNode().deleteSelection().run();
|
|
1711
|
+
editor.chain().focus().extendMarkRange("link").setLink({ href: url }).run();
|
|
1712
|
+
},
|
|
1713
|
+
isActive: () => editor.isActive("link"),
|
|
1714
|
+
group: "custom",
|
|
1715
|
+
icon: LinkIcon
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
name: "left",
|
|
1719
|
+
command: () => editor.chain().focus().setTextAlign("left").run(),
|
|
1720
|
+
isActive: () => editor.isActive({ textAlign: "left" }),
|
|
1721
|
+
group: "alignment",
|
|
1722
|
+
icon: AlignLeft
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
name: "center",
|
|
1726
|
+
command: () => editor.chain().focus().setTextAlign("center").run(),
|
|
1727
|
+
isActive: () => editor.isActive({ textAlign: "center" }),
|
|
1728
|
+
group: "alignment",
|
|
1729
|
+
icon: AlignCenter
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
name: "right",
|
|
1733
|
+
command: () => editor.chain().focus().setTextAlign("right").run(),
|
|
1734
|
+
isActive: () => editor.isActive({ textAlign: "right" }),
|
|
1735
|
+
group: "alignment",
|
|
1736
|
+
icon: AlignRight
|
|
1737
|
+
}
|
|
1738
|
+
],
|
|
1739
|
+
[editor]
|
|
1740
|
+
);
|
|
1741
|
+
const groups = useMemo3(
|
|
1742
|
+
() => items.reduce((acc, item) => {
|
|
1743
|
+
if (!acc.includes(item.group)) {
|
|
1744
|
+
acc.push(item.group);
|
|
1745
|
+
}
|
|
1746
|
+
return acc;
|
|
1747
|
+
}, []),
|
|
1748
|
+
[items]
|
|
1749
|
+
);
|
|
1750
|
+
if (!editor) {
|
|
1751
|
+
return null;
|
|
1582
1752
|
}
|
|
1753
|
+
return /* @__PURE__ */ jsx21(
|
|
1754
|
+
"div",
|
|
1755
|
+
{
|
|
1756
|
+
className: `mly-flex mly-items-center mly-gap-3 ${config == null ? void 0 : config.toolbarClassName}`,
|
|
1757
|
+
children: groups.map((group, index) => /* @__PURE__ */ jsx21(
|
|
1758
|
+
"div",
|
|
1759
|
+
{
|
|
1760
|
+
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__ */ jsx21(BubbleMenuButton, __spreadValues({}, item), index2))
|
|
1762
|
+
},
|
|
1763
|
+
index
|
|
1764
|
+
))
|
|
1765
|
+
}
|
|
1766
|
+
);
|
|
1583
1767
|
};
|
|
1584
1768
|
|
|
1585
|
-
// src/editor/extensions/slash-command/default-slash-commands.ts
|
|
1586
|
-
var DEFAULT_SLASH_COMMANDS = [
|
|
1587
|
-
text,
|
|
1588
|
-
heading1,
|
|
1589
|
-
heading2,
|
|
1590
|
-
heading3,
|
|
1591
|
-
bulletList,
|
|
1592
|
-
orderedList,
|
|
1593
|
-
image,
|
|
1594
|
-
logo,
|
|
1595
|
-
columns,
|
|
1596
|
-
section,
|
|
1597
|
-
forLoop,
|
|
1598
|
-
divider,
|
|
1599
|
-
spacer,
|
|
1600
|
-
button,
|
|
1601
|
-
linkCard,
|
|
1602
|
-
hardBreak,
|
|
1603
|
-
blockquote,
|
|
1604
|
-
footer,
|
|
1605
|
-
clearLine
|
|
1606
|
-
];
|
|
1607
|
-
|
|
1608
|
-
// src/editor/provider.tsx
|
|
1609
|
-
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1610
|
-
var DEFAULT_TRIGGER_SUGGESTION_CHAR = "@";
|
|
1611
|
-
var MailyContext = createContext({
|
|
1612
|
-
triggerSuggestionCharacter: DEFAULT_TRIGGER_SUGGESTION_CHAR,
|
|
1613
|
-
variables: [],
|
|
1614
|
-
blocks: DEFAULT_SLASH_COMMANDS
|
|
1615
|
-
});
|
|
1616
|
-
function MailyProvider(props) {
|
|
1617
|
-
const _a = props, { children } = _a, defaultValues = __objRest(_a, ["children"]);
|
|
1618
|
-
if (defaultValues.triggerSuggestionCharacter === "") {
|
|
1619
|
-
throw new Error("triggerSuggestionCharacter cannot be an empty string");
|
|
1620
|
-
}
|
|
1621
|
-
return /* @__PURE__ */ jsx20(MailyContext.Provider, { value: defaultValues, children });
|
|
1622
|
-
}
|
|
1623
|
-
function useMailyContext() {
|
|
1624
|
-
const values = useContext(MailyContext);
|
|
1625
|
-
if (!values) {
|
|
1626
|
-
throw new Error("Missing MailyContext.Provider in the component tree");
|
|
1627
|
-
}
|
|
1628
|
-
return values;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
1769
|
// src/editor/components/for-menu/for-bubble-menu.tsx
|
|
1632
1770
|
import { BubbleMenu as BubbleMenu2, findChildren } from "@tiptap/react";
|
|
1633
1771
|
import { Braces as Braces2 } from "lucide-react";
|
|
1634
|
-
import { useCallback as
|
|
1772
|
+
import { useCallback as useCallback4, useMemo as useMemo4, useRef as useRef4, useState as useState5 } from "react";
|
|
1635
1773
|
import { sticky as sticky2 } from "tippy.js";
|
|
1636
1774
|
|
|
1637
|
-
// src/editor/components/ui/input-autocomplete.tsx
|
|
1638
|
-
import { CornerDownLeft as CornerDownLeft2 } from "lucide-react";
|
|
1639
|
-
import { useRef as useRef3, useMemo as useMemo2, useState as useState4 } from "react";
|
|
1640
|
-
import { jsx as jsx21, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1641
|
-
function InputAutocomplete(props) {
|
|
1642
|
-
const _a = props, {
|
|
1643
|
-
value = "",
|
|
1644
|
-
onValueChange,
|
|
1645
|
-
className,
|
|
1646
|
-
onBlur: onInputBlur,
|
|
1647
|
-
onSelectOption,
|
|
1648
|
-
autoCompleteOptions = []
|
|
1649
|
-
} = _a, inputProps = __objRest(_a, [
|
|
1650
|
-
"value",
|
|
1651
|
-
"onValueChange",
|
|
1652
|
-
"className",
|
|
1653
|
-
"onBlur",
|
|
1654
|
-
"onSelectOption",
|
|
1655
|
-
"autoCompleteOptions"
|
|
1656
|
-
]);
|
|
1657
|
-
const [selectedIndex, setSelectedIndex] = useState4(0);
|
|
1658
|
-
const inputRef = useRef3(null);
|
|
1659
|
-
const filteredAutoCompleteOptions = useMemo2(() => {
|
|
1660
|
-
const filteredOptions = autoCompleteOptions.filter((option) => option.toLowerCase().startsWith(value.toLowerCase())).slice(0, 4);
|
|
1661
|
-
if (value.length > 0 && !filteredOptions.includes(value)) {
|
|
1662
|
-
filteredOptions.push(value);
|
|
1663
|
-
}
|
|
1664
|
-
return filteredOptions;
|
|
1665
|
-
}, [autoCompleteOptions, value]);
|
|
1666
|
-
return /* @__PURE__ */ jsxs7("div", { className: cn("mly-relative", className), children: [
|
|
1667
|
-
/* @__PURE__ */ jsxs7("label", { className: "mly-relative", children: [
|
|
1668
|
-
/* @__PURE__ */ jsx21(
|
|
1669
|
-
"input",
|
|
1670
|
-
__spreadProps(__spreadValues({}, inputProps), {
|
|
1671
|
-
value,
|
|
1672
|
-
onChange: (e) => {
|
|
1673
|
-
setSelectedIndex(0);
|
|
1674
|
-
onValueChange(e.target.value);
|
|
1675
|
-
},
|
|
1676
|
-
onBlur: onInputBlur,
|
|
1677
|
-
ref: inputRef,
|
|
1678
|
-
type: "text",
|
|
1679
|
-
placeholder: "e.g. items",
|
|
1680
|
-
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",
|
|
1681
|
-
onKeyDown: (e) => {
|
|
1682
|
-
var _a2;
|
|
1683
|
-
if (e.key === "ArrowDown") {
|
|
1684
|
-
e.preventDefault();
|
|
1685
|
-
setSelectedIndex(
|
|
1686
|
-
(prev) => Math.min(prev + 1, filteredAutoCompleteOptions.length - 1)
|
|
1687
|
-
);
|
|
1688
|
-
} else if (e.key === "ArrowUp") {
|
|
1689
|
-
e.preventDefault();
|
|
1690
|
-
setSelectedIndex((prev) => Math.max(prev - 1, 0));
|
|
1691
|
-
} else if (e.key === "Enter") {
|
|
1692
|
-
e.preventDefault();
|
|
1693
|
-
const _value = filteredAutoCompleteOptions[selectedIndex];
|
|
1694
|
-
onValueChange(_value);
|
|
1695
|
-
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
1696
|
-
onSelectOption == null ? void 0 : onSelectOption(_value);
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
})
|
|
1700
|
-
),
|
|
1701
|
-
/* @__PURE__ */ jsx21("div", { className: "mly-absolute mly-inset-y-0 mly-right-1 mly-flex mly-items-center", children: /* @__PURE__ */ jsx21(CornerDownLeft2, { className: "mly-h-3 mly-w-3 mly-stroke-[2.5] mly-text-midnight-gray" }) })
|
|
1702
|
-
] }),
|
|
1703
|
-
filteredAutoCompleteOptions.length > 0 && /* @__PURE__ */ jsx21("div", { className: "mly-absolute mly-left-0 mly-top-8 mly-z-10 mly-w-full mly-rounded-lg mly-bg-white mly-p-0.5 mly-shadow-md", children: filteredAutoCompleteOptions.map((option, index) => /* @__PURE__ */ jsx21(
|
|
1704
|
-
"button",
|
|
1705
|
-
{
|
|
1706
|
-
type: "button",
|
|
1707
|
-
className: "mly-w-full mly-truncate mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-midnight-gray aria-selected:mly-bg-soft-gray focus:mly-bg-soft-gray focus:mly-outline-none",
|
|
1708
|
-
onClick: () => {
|
|
1709
|
-
var _a2;
|
|
1710
|
-
onValueChange(option);
|
|
1711
|
-
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
1712
|
-
onSelectOption == null ? void 0 : onSelectOption(option);
|
|
1713
|
-
},
|
|
1714
|
-
onMouseEnter: () => setSelectedIndex(index),
|
|
1715
|
-
"aria-selected": selectedIndex === index,
|
|
1716
|
-
children: option
|
|
1717
|
-
},
|
|
1718
|
-
option
|
|
1719
|
-
)) })
|
|
1720
|
-
] });
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
1775
|
// src/editor/components/for-menu/use-for-state.ts
|
|
1724
1776
|
import { useEditorState as useEditorState2 } from "@tiptap/react";
|
|
1725
1777
|
import deepEql2 from "fast-deep-equal";
|
|
@@ -1747,7 +1799,7 @@ function ForBubbleMenu(props) {
|
|
|
1747
1799
|
return null;
|
|
1748
1800
|
}
|
|
1749
1801
|
const state = useForState(editor);
|
|
1750
|
-
const getReferenceClientRect =
|
|
1802
|
+
const getReferenceClientRect = useCallback4(() => {
|
|
1751
1803
|
const renderContainer = getRenderContainer(editor, "for");
|
|
1752
1804
|
const rect = (renderContainer == null ? void 0 : renderContainer.getBoundingClientRect()) || new DOMRect(-1e3, -1e3, 0, 0);
|
|
1753
1805
|
return rect;
|
|
@@ -1781,10 +1833,15 @@ function ForBubbleMenu(props) {
|
|
|
1781
1833
|
const { variables = [] } = useMailyContext();
|
|
1782
1834
|
const inputRef = useRef4(null);
|
|
1783
1835
|
const [isUpdatingKey, setIsUpdatingKey] = useState5(false);
|
|
1784
|
-
const
|
|
1785
|
-
const autoCompleteOptions =
|
|
1786
|
-
return variables
|
|
1787
|
-
|
|
1836
|
+
const eachKey = (state == null ? void 0 : state.each) || "";
|
|
1837
|
+
const autoCompleteOptions = useMemo4(() => {
|
|
1838
|
+
return processVariables(variables, {
|
|
1839
|
+
query: eachKey || "",
|
|
1840
|
+
editor,
|
|
1841
|
+
from: "for"
|
|
1842
|
+
}).map((variable) => variable.name).slice(0, 5);
|
|
1843
|
+
}, [variables, eachKey, editor]);
|
|
1844
|
+
const isValidEachKey = eachKey || autoCompleteOptions.includes(eachKey);
|
|
1788
1845
|
return /* @__PURE__ */ jsx22(
|
|
1789
1846
|
BubbleMenu2,
|
|
1790
1847
|
__spreadProps(__spreadValues({}, bubbleMenuProps), {
|
|
@@ -1807,7 +1864,7 @@ function ForBubbleMenu(props) {
|
|
|
1807
1864
|
},
|
|
1808
1865
|
children: [
|
|
1809
1866
|
/* @__PURE__ */ jsx22(Braces2, { className: "mly-h-3 mly-w-3 mly-shrink-0 mly-stroke-[2.5] mly-text-rose-600" }),
|
|
1810
|
-
/* @__PURE__ */ jsx22("span", { className: "mly-min-w-0 mly-truncate", children: state == null ? void 0 : state.each })
|
|
1867
|
+
/* @__PURE__ */ jsx22("span", { className: "mly-min-w-0 mly-truncate mly-text-left", children: state == null ? void 0 : state.each })
|
|
1811
1868
|
]
|
|
1812
1869
|
}
|
|
1813
1870
|
),
|
|
@@ -1832,13 +1889,14 @@ function ForBubbleMenu(props) {
|
|
|
1832
1889
|
each: value
|
|
1833
1890
|
});
|
|
1834
1891
|
},
|
|
1835
|
-
|
|
1892
|
+
onOutsideClick: () => {
|
|
1836
1893
|
setIsUpdatingKey(false);
|
|
1837
1894
|
},
|
|
1838
1895
|
onSelectOption: () => {
|
|
1839
1896
|
setIsUpdatingKey(false);
|
|
1840
1897
|
},
|
|
1841
|
-
autoCompleteOptions
|
|
1898
|
+
autoCompleteOptions,
|
|
1899
|
+
ref: inputRef
|
|
1842
1900
|
}
|
|
1843
1901
|
)
|
|
1844
1902
|
}
|
|
@@ -1852,7 +1910,8 @@ function ForBubbleMenu(props) {
|
|
|
1852
1910
|
editor.commands.updateFor({
|
|
1853
1911
|
showIfKey: value
|
|
1854
1912
|
});
|
|
1855
|
-
}
|
|
1913
|
+
},
|
|
1914
|
+
editor
|
|
1856
1915
|
}
|
|
1857
1916
|
)
|
|
1858
1917
|
] })
|
|
@@ -2314,7 +2373,7 @@ var SectionExtension = Node3.create({
|
|
|
2314
2373
|
border: 0,
|
|
2315
2374
|
cellpadding: 0,
|
|
2316
2375
|
cellspacing: 0,
|
|
2317
|
-
class: "mly-w-full mly-border-separate",
|
|
2376
|
+
class: "mly-w-full mly-border-separate mly-relative",
|
|
2318
2377
|
style: `margin-top: ${marginTop}px; margin-right: ${marginRight}px; margin-bottom: ${marginBottom}px; margin-left: ${marginLeft}px;`
|
|
2319
2378
|
},
|
|
2320
2379
|
[
|
|
@@ -2351,17 +2410,17 @@ var SectionExtension = Node3.create({
|
|
|
2351
2410
|
|
|
2352
2411
|
// src/editor/nodes/logo/logo-view.tsx
|
|
2353
2412
|
import { NodeViewWrapper as NodeViewWrapper2 } from "@tiptap/react";
|
|
2354
|
-
import { useEffect as
|
|
2413
|
+
import { useEffect as useEffect5 } from "react";
|
|
2355
2414
|
import { useState as useState8 } from "react";
|
|
2356
2415
|
|
|
2357
2416
|
// src/editor/utils/use-event.ts
|
|
2358
|
-
import { useCallback as
|
|
2417
|
+
import { useCallback as useCallback5, useLayoutEffect, useRef as useRef6 } from "react";
|
|
2359
2418
|
var useEvent = (handler) => {
|
|
2360
2419
|
const handlerRef = useRef6(null);
|
|
2361
2420
|
useLayoutEffect(() => {
|
|
2362
2421
|
handlerRef.current = handler;
|
|
2363
2422
|
}, [handler]);
|
|
2364
|
-
return
|
|
2423
|
+
return useCallback5((...args) => {
|
|
2365
2424
|
if (handlerRef.current === null) {
|
|
2366
2425
|
throw new Error("Handler is not assigned");
|
|
2367
2426
|
}
|
|
@@ -2372,7 +2431,7 @@ var useEvent = (handler) => {
|
|
|
2372
2431
|
// src/editor/nodes/image/image-view.tsx
|
|
2373
2432
|
import { NodeViewWrapper } from "@tiptap/react";
|
|
2374
2433
|
import { Ban, ImageOffIcon, Loader2 } from "lucide-react";
|
|
2375
|
-
import { useEffect as
|
|
2434
|
+
import { useEffect as useEffect4, useRef as useRef7, useState as useState7 } from "react";
|
|
2376
2435
|
import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2377
2436
|
var MIN_WIDTH = 20;
|
|
2378
2437
|
var MAX_WIDTH = 600;
|
|
@@ -2445,7 +2504,7 @@ function ImageView(props) {
|
|
|
2445
2504
|
let { alignment = "center", width, height, src } = node.attrs || {};
|
|
2446
2505
|
const _a = node.attrs || {}, { externalLink, showIfKey } = _a, attrs = __objRest(_a, ["externalLink", "showIfKey"]);
|
|
2447
2506
|
const hasImageSrc = !!attrs.src;
|
|
2448
|
-
|
|
2507
|
+
useEffect4(() => {
|
|
2449
2508
|
if (!src) {
|
|
2450
2509
|
return;
|
|
2451
2510
|
}
|
|
@@ -2582,7 +2641,7 @@ function LogoView(props) {
|
|
|
2582
2641
|
size = "sm"
|
|
2583
2642
|
} = node.attrs || {};
|
|
2584
2643
|
const hasImageSrc = !!logoSrc;
|
|
2585
|
-
|
|
2644
|
+
useEffect5(() => {
|
|
2586
2645
|
if (!logoSrc) {
|
|
2587
2646
|
return;
|
|
2588
2647
|
}
|
|
@@ -2720,7 +2779,9 @@ var LogoExtension = TiptapImage.extend({
|
|
|
2720
2779
|
];
|
|
2721
2780
|
},
|
|
2722
2781
|
addNodeView() {
|
|
2723
|
-
return ReactNodeViewRenderer(LogoView
|
|
2782
|
+
return ReactNodeViewRenderer(LogoView, {
|
|
2783
|
+
className: "mly-relative"
|
|
2784
|
+
});
|
|
2724
2785
|
}
|
|
2725
2786
|
});
|
|
2726
2787
|
|
|
@@ -2870,7 +2931,8 @@ function ImageBubbleMenu(props) {
|
|
|
2870
2931
|
editor == null ? void 0 : editor.chain().updateAttributes(state.isLogoActive ? "logo" : "image", {
|
|
2871
2932
|
showIfKey: value
|
|
2872
2933
|
}).run();
|
|
2873
|
-
}
|
|
2934
|
+
},
|
|
2935
|
+
editor
|
|
2874
2936
|
}
|
|
2875
2937
|
)
|
|
2876
2938
|
] })
|
|
@@ -2881,7 +2943,7 @@ function ImageBubbleMenu(props) {
|
|
|
2881
2943
|
// src/editor/components/section-menu/section-bubble-menu.tsx
|
|
2882
2944
|
import { BubbleMenu as BubbleMenu4, findChildren as findChildren2 } from "@tiptap/react";
|
|
2883
2945
|
import { ChevronUp as ChevronUp2, Trash as Trash3 } from "lucide-react";
|
|
2884
|
-
import { useCallback as
|
|
2946
|
+
import { useCallback as useCallback6 } from "react";
|
|
2885
2947
|
import { sticky as sticky4 } from "tippy.js";
|
|
2886
2948
|
|
|
2887
2949
|
// src/editor/components/icons/border-color.tsx
|
|
@@ -3074,7 +3136,7 @@ function SectionBubbleMenu(props) {
|
|
|
3074
3136
|
if (!editor) {
|
|
3075
3137
|
return null;
|
|
3076
3138
|
}
|
|
3077
|
-
const getReferenceClientRect =
|
|
3139
|
+
const getReferenceClientRect = useCallback6(() => {
|
|
3078
3140
|
const renderContainer = getRenderContainer(editor, "section");
|
|
3079
3141
|
const rect = (renderContainer == null ? void 0 : renderContainer.getBoundingClientRect()) || new DOMRect(-1e3, -1e3, 0, 0);
|
|
3080
3142
|
return rect;
|
|
@@ -3294,7 +3356,8 @@ function SectionBubbleMenu(props) {
|
|
|
3294
3356
|
editor.commands.updateSection({
|
|
3295
3357
|
showIfKey: value
|
|
3296
3358
|
});
|
|
3297
|
-
}
|
|
3359
|
+
},
|
|
3360
|
+
editor
|
|
3298
3361
|
}
|
|
3299
3362
|
),
|
|
3300
3363
|
state.isColumnsActive && /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
@@ -3406,7 +3469,7 @@ var Spacer = Node4.create({
|
|
|
3406
3469
|
this.options.HTMLAttributes,
|
|
3407
3470
|
HTMLAttributes2,
|
|
3408
3471
|
{
|
|
3409
|
-
class: "spacer relative z-50",
|
|
3472
|
+
class: "spacer mly-relative mly-z-50",
|
|
3410
3473
|
contenteditable: false
|
|
3411
3474
|
}
|
|
3412
3475
|
)
|
|
@@ -3477,7 +3540,8 @@ function SpacerBubbleMenu(props) {
|
|
|
3477
3540
|
showIfKey: state.currentShowIfKey,
|
|
3478
3541
|
onShowIfKeyValueChange: (value) => {
|
|
3479
3542
|
editor.commands.setSpacerShowIfKey(value);
|
|
3480
|
-
}
|
|
3543
|
+
},
|
|
3544
|
+
editor
|
|
3481
3545
|
}
|
|
3482
3546
|
)
|
|
3483
3547
|
]
|
|
@@ -3538,6 +3602,13 @@ var HorizontalRule = TipTapHorizontalRule.extend({
|
|
|
3538
3602
|
}
|
|
3539
3603
|
})
|
|
3540
3604
|
];
|
|
3605
|
+
},
|
|
3606
|
+
addOptions() {
|
|
3607
|
+
return {
|
|
3608
|
+
HTMLAttributes: {
|
|
3609
|
+
class: "mly-relative"
|
|
3610
|
+
}
|
|
3611
|
+
};
|
|
3541
3612
|
}
|
|
3542
3613
|
});
|
|
3543
3614
|
|
|
@@ -3832,7 +3903,9 @@ var LinkCardExtension = Node5.create({
|
|
|
3832
3903
|
};
|
|
3833
3904
|
},
|
|
3834
3905
|
addNodeView() {
|
|
3835
|
-
return ReactNodeViewRenderer2(LinkCardComponent
|
|
3906
|
+
return ReactNodeViewRenderer2(LinkCardComponent, {
|
|
3907
|
+
className: "mly-relative"
|
|
3908
|
+
});
|
|
3836
3909
|
}
|
|
3837
3910
|
});
|
|
3838
3911
|
|
|
@@ -4020,7 +4093,8 @@ function ButtonView(props) {
|
|
|
4020
4093
|
updateAttributes2({
|
|
4021
4094
|
showIfKey: value
|
|
4022
4095
|
});
|
|
4023
|
-
}
|
|
4096
|
+
},
|
|
4097
|
+
editor
|
|
4024
4098
|
}
|
|
4025
4099
|
)
|
|
4026
4100
|
] }) })
|
|
@@ -4222,7 +4296,8 @@ var ButtonExtension = Node6.create({
|
|
|
4222
4296
|
},
|
|
4223
4297
|
addNodeView() {
|
|
4224
4298
|
return ReactNodeViewRenderer3(ButtonView, {
|
|
4225
|
-
contentDOMElementTag: "div"
|
|
4299
|
+
contentDOMElementTag: "div",
|
|
4300
|
+
className: "mly-relative"
|
|
4226
4301
|
});
|
|
4227
4302
|
}
|
|
4228
4303
|
});
|
|
@@ -4236,13 +4311,23 @@ import Suggestion from "@tiptap/suggestion";
|
|
|
4236
4311
|
// src/editor/nodes/variable/variable-view.tsx
|
|
4237
4312
|
import { NodeViewWrapper as NodeViewWrapper5 } from "@tiptap/react";
|
|
4238
4313
|
import { AlertTriangle, Braces as Braces3, Pencil as Pencil2 } from "lucide-react";
|
|
4314
|
+
import { useMemo as useMemo5 } from "react";
|
|
4239
4315
|
import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4240
4316
|
function VariableView(props) {
|
|
4241
|
-
var _a
|
|
4317
|
+
var _a;
|
|
4242
4318
|
const { node, selected, updateAttributes: updateAttributes2, editor } = props;
|
|
4243
4319
|
const { id, fallback, showIfKey = "" } = node.attrs;
|
|
4244
4320
|
const { variables = [] } = useMailyContext();
|
|
4245
|
-
const
|
|
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]);
|
|
4246
4331
|
return /* @__PURE__ */ jsx39(
|
|
4247
4332
|
NodeViewWrapper5,
|
|
4248
4333
|
{
|
|
@@ -4318,7 +4403,8 @@ function VariableView(props) {
|
|
|
4318
4403
|
updateAttributes2({
|
|
4319
4404
|
showIfKey: value
|
|
4320
4405
|
});
|
|
4321
|
-
}
|
|
4406
|
+
},
|
|
4407
|
+
editor
|
|
4322
4408
|
}
|
|
4323
4409
|
)
|
|
4324
4410
|
] }) })
|
|
@@ -4488,7 +4574,9 @@ var VariableExtension = Node7.create({
|
|
|
4488
4574
|
];
|
|
4489
4575
|
},
|
|
4490
4576
|
addNodeView() {
|
|
4491
|
-
return ReactNodeViewRenderer4(VariableView
|
|
4577
|
+
return ReactNodeViewRenderer4(VariableView, {
|
|
4578
|
+
className: "mly-relative"
|
|
4579
|
+
});
|
|
4492
4580
|
}
|
|
4493
4581
|
});
|
|
4494
4582
|
|
|
@@ -4497,67 +4585,191 @@ import TiptapImage2 from "@tiptap/extension-image";
|
|
|
4497
4585
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer5 } from "@tiptap/react";
|
|
4498
4586
|
var ImageExtension = TiptapImage2.extend({
|
|
4499
4587
|
addAttributes() {
|
|
4500
|
-
var _a;
|
|
4501
|
-
return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
|
|
4502
|
-
width: {
|
|
4503
|
-
default: "auto",
|
|
4504
|
-
parseHTML: (element) => {
|
|
4505
|
-
const width = element.style.width;
|
|
4506
|
-
return width ? { width } : null;
|
|
4507
|
-
},
|
|
4508
|
-
renderHTML: ({ width }) => ({ style: `width: ${width}` })
|
|
4509
|
-
},
|
|
4510
|
-
height: {
|
|
4511
|
-
default: "auto",
|
|
4588
|
+
var _a;
|
|
4589
|
+
return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
|
|
4590
|
+
width: {
|
|
4591
|
+
default: "auto",
|
|
4592
|
+
parseHTML: (element) => {
|
|
4593
|
+
const width = element.style.width;
|
|
4594
|
+
return width ? { width } : null;
|
|
4595
|
+
},
|
|
4596
|
+
renderHTML: ({ width }) => ({ style: `width: ${width}` })
|
|
4597
|
+
},
|
|
4598
|
+
height: {
|
|
4599
|
+
default: "auto",
|
|
4600
|
+
parseHTML: (element) => {
|
|
4601
|
+
const height = element.style.height;
|
|
4602
|
+
return height ? { height } : null;
|
|
4603
|
+
},
|
|
4604
|
+
renderHTML: ({ height }) => ({ style: `height: ${height}` })
|
|
4605
|
+
},
|
|
4606
|
+
alignment: {
|
|
4607
|
+
default: "center",
|
|
4608
|
+
renderHTML: ({ alignment }) => ({ "data-alignment": alignment }),
|
|
4609
|
+
parseHTML: (element) => element.getAttribute("data-alignment") || "center"
|
|
4610
|
+
},
|
|
4611
|
+
externalLink: {
|
|
4612
|
+
default: null,
|
|
4613
|
+
renderHTML: ({ externalLink }) => {
|
|
4614
|
+
if (!externalLink) {
|
|
4615
|
+
return {};
|
|
4616
|
+
}
|
|
4617
|
+
return {
|
|
4618
|
+
"data-external-link": externalLink
|
|
4619
|
+
};
|
|
4620
|
+
},
|
|
4621
|
+
parseHTML: (element) => {
|
|
4622
|
+
const externalLink = element.getAttribute("data-external-link");
|
|
4623
|
+
return externalLink ? { externalLink } : null;
|
|
4624
|
+
}
|
|
4625
|
+
},
|
|
4626
|
+
showIfKey: {
|
|
4627
|
+
default: DEFAULT_SECTION_SHOW_IF_KEY,
|
|
4628
|
+
parseHTML: (element) => {
|
|
4629
|
+
return element.getAttribute("data-show-if-key") || DEFAULT_SECTION_SHOW_IF_KEY;
|
|
4630
|
+
},
|
|
4631
|
+
renderHTML(attributes) {
|
|
4632
|
+
if (!attributes.showIfKey) {
|
|
4633
|
+
return {};
|
|
4634
|
+
}
|
|
4635
|
+
return {
|
|
4636
|
+
"data-show-if-key": attributes.showIfKey
|
|
4637
|
+
};
|
|
4638
|
+
}
|
|
4639
|
+
}
|
|
4640
|
+
});
|
|
4641
|
+
},
|
|
4642
|
+
addNodeView() {
|
|
4643
|
+
return ReactNodeViewRenderer5(ImageView, {
|
|
4644
|
+
className: "mly-relative"
|
|
4645
|
+
});
|
|
4646
|
+
}
|
|
4647
|
+
});
|
|
4648
|
+
|
|
4649
|
+
// src/editor/utils/is-custom-node-selected.ts
|
|
4650
|
+
var isCustomNodeSelected = (editor, node) => {
|
|
4651
|
+
const customNodes = [
|
|
4652
|
+
HorizontalRule.name,
|
|
4653
|
+
Image2.name,
|
|
4654
|
+
Spacer.name,
|
|
4655
|
+
ImageExtension.name,
|
|
4656
|
+
VariableExtension.name,
|
|
4657
|
+
LinkCardExtension.name,
|
|
4658
|
+
LogoExtension.name,
|
|
4659
|
+
ButtonExtension.name
|
|
4660
|
+
];
|
|
4661
|
+
return customNodes.some((type) => editor.isActive(type));
|
|
4662
|
+
};
|
|
4663
|
+
|
|
4664
|
+
// src/editor/nodes/columns/columns.ts
|
|
4665
|
+
import { mergeAttributes as mergeAttributes7 } from "@tiptap/core";
|
|
4666
|
+
import { Node as Node8 } from "@tiptap/core";
|
|
4667
|
+
import { v4 as uuid3 } from "uuid";
|
|
4668
|
+
var DEFAULT_COLUMNS_GAP = 8;
|
|
4669
|
+
var ColumnsExtension = Node8.create({
|
|
4670
|
+
name: "columns",
|
|
4671
|
+
group: "columns",
|
|
4672
|
+
content: "column+",
|
|
4673
|
+
defining: true,
|
|
4674
|
+
isolating: true,
|
|
4675
|
+
addAttributes() {
|
|
4676
|
+
return {
|
|
4677
|
+
showIfKey: {
|
|
4678
|
+
default: DEFAULT_SECTION_SHOW_IF_KEY,
|
|
4512
4679
|
parseHTML: (element) => {
|
|
4513
|
-
|
|
4514
|
-
return height ? { height } : null;
|
|
4680
|
+
return element.getAttribute("data-show-if-key") || DEFAULT_SECTION_SHOW_IF_KEY;
|
|
4515
4681
|
},
|
|
4516
|
-
renderHTML
|
|
4517
|
-
|
|
4518
|
-
alignment: {
|
|
4519
|
-
default: "center",
|
|
4520
|
-
renderHTML: ({ alignment }) => ({ "data-alignment": alignment }),
|
|
4521
|
-
parseHTML: (element) => element.getAttribute("data-alignment") || "center"
|
|
4522
|
-
},
|
|
4523
|
-
externalLink: {
|
|
4524
|
-
default: null,
|
|
4525
|
-
renderHTML: ({ externalLink }) => {
|
|
4526
|
-
if (!externalLink) {
|
|
4682
|
+
renderHTML(attributes) {
|
|
4683
|
+
if (!attributes.showIfKey) {
|
|
4527
4684
|
return {};
|
|
4528
4685
|
}
|
|
4529
4686
|
return {
|
|
4530
|
-
"data-
|
|
4687
|
+
"data-show-if-key": attributes.showIfKey
|
|
4531
4688
|
};
|
|
4532
|
-
},
|
|
4533
|
-
parseHTML: (element) => {
|
|
4534
|
-
const externalLink = element.getAttribute("data-external-link");
|
|
4535
|
-
return externalLink ? { externalLink } : null;
|
|
4536
4689
|
}
|
|
4537
4690
|
},
|
|
4538
|
-
|
|
4539
|
-
default:
|
|
4691
|
+
gap: {
|
|
4692
|
+
default: DEFAULT_COLUMNS_GAP,
|
|
4540
4693
|
parseHTML: (element) => {
|
|
4541
|
-
return element.
|
|
4694
|
+
return Number(element.style.gap) || DEFAULT_COLUMNS_GAP;
|
|
4542
4695
|
},
|
|
4543
4696
|
renderHTML(attributes) {
|
|
4544
|
-
if (!attributes.
|
|
4697
|
+
if (!attributes.gap) {
|
|
4545
4698
|
return {};
|
|
4546
4699
|
}
|
|
4547
4700
|
return {
|
|
4548
|
-
|
|
4701
|
+
style: `gap: ${attributes.gap}px`
|
|
4549
4702
|
};
|
|
4550
4703
|
}
|
|
4551
4704
|
}
|
|
4552
|
-
}
|
|
4705
|
+
};
|
|
4553
4706
|
},
|
|
4554
|
-
|
|
4555
|
-
return
|
|
4707
|
+
addCommands() {
|
|
4708
|
+
return {
|
|
4709
|
+
setColumns: () => ({ commands }) => {
|
|
4710
|
+
return commands.insertContent({
|
|
4711
|
+
type: this.name,
|
|
4712
|
+
attrs: {},
|
|
4713
|
+
content: [
|
|
4714
|
+
{
|
|
4715
|
+
type: "column",
|
|
4716
|
+
attrs: {
|
|
4717
|
+
columnId: uuid3()
|
|
4718
|
+
},
|
|
4719
|
+
content: [
|
|
4720
|
+
{
|
|
4721
|
+
type: "paragraph"
|
|
4722
|
+
}
|
|
4723
|
+
]
|
|
4724
|
+
},
|
|
4725
|
+
{
|
|
4726
|
+
type: "column",
|
|
4727
|
+
attrs: {
|
|
4728
|
+
columnId: uuid3()
|
|
4729
|
+
},
|
|
4730
|
+
content: [
|
|
4731
|
+
{
|
|
4732
|
+
type: "paragraph"
|
|
4733
|
+
}
|
|
4734
|
+
]
|
|
4735
|
+
}
|
|
4736
|
+
]
|
|
4737
|
+
});
|
|
4738
|
+
},
|
|
4739
|
+
updateColumns: (attrs) => updateAttributes(this.name, attrs)
|
|
4740
|
+
};
|
|
4741
|
+
},
|
|
4742
|
+
renderHTML({ HTMLAttributes: HTMLAttributes2 }) {
|
|
4743
|
+
return [
|
|
4744
|
+
"div",
|
|
4745
|
+
mergeAttributes7(HTMLAttributes2, {
|
|
4746
|
+
"data-type": "columns",
|
|
4747
|
+
class: "mly-relative"
|
|
4748
|
+
}),
|
|
4749
|
+
0
|
|
4750
|
+
];
|
|
4751
|
+
},
|
|
4752
|
+
parseHTML() {
|
|
4753
|
+
return [
|
|
4754
|
+
{
|
|
4755
|
+
tag: 'div[data-type="columns"]'
|
|
4756
|
+
}
|
|
4757
|
+
];
|
|
4758
|
+
},
|
|
4759
|
+
addKeyboardShortcuts() {
|
|
4760
|
+
return {
|
|
4761
|
+
Tab: () => {
|
|
4762
|
+
return goToColumn(this.editor, "next");
|
|
4763
|
+
},
|
|
4764
|
+
"Shift-Tab": () => {
|
|
4765
|
+
return goToColumn(this.editor, "previous");
|
|
4766
|
+
}
|
|
4767
|
+
};
|
|
4556
4768
|
}
|
|
4557
4769
|
});
|
|
4558
4770
|
|
|
4559
4771
|
// src/editor/nodes/for/for.ts
|
|
4560
|
-
import { mergeAttributes as
|
|
4772
|
+
import { mergeAttributes as mergeAttributes8, Node as Node9 } from "@tiptap/core";
|
|
4561
4773
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer6 } from "@tiptap/react";
|
|
4562
4774
|
|
|
4563
4775
|
// src/editor/nodes/for/for-view.tsx
|
|
@@ -4597,7 +4809,7 @@ function ForView(props) {
|
|
|
4597
4809
|
}
|
|
4598
4810
|
|
|
4599
4811
|
// src/editor/nodes/for/for.ts
|
|
4600
|
-
var ForExtension =
|
|
4812
|
+
var ForExtension = Node9.create({
|
|
4601
4813
|
name: "for",
|
|
4602
4814
|
group: "block",
|
|
4603
4815
|
content: "(block|columns)+",
|
|
@@ -4648,7 +4860,7 @@ var ForExtension = Node8.create({
|
|
|
4648
4860
|
renderHTML({ HTMLAttributes: HTMLAttributes2 }) {
|
|
4649
4861
|
return [
|
|
4650
4862
|
"div",
|
|
4651
|
-
|
|
4863
|
+
mergeAttributes8(HTMLAttributes2, {
|
|
4652
4864
|
"data-type": this.name
|
|
4653
4865
|
}),
|
|
4654
4866
|
0
|
|
@@ -4672,136 +4884,12 @@ var ForExtension = Node8.create({
|
|
|
4672
4884
|
},
|
|
4673
4885
|
addNodeView() {
|
|
4674
4886
|
return ReactNodeViewRenderer6(ForView, {
|
|
4675
|
-
contentDOMElementTag: "div"
|
|
4887
|
+
contentDOMElementTag: "div",
|
|
4888
|
+
className: "mly-relative"
|
|
4676
4889
|
});
|
|
4677
4890
|
}
|
|
4678
4891
|
});
|
|
4679
4892
|
|
|
4680
|
-
// src/editor/nodes/columns/columns.ts
|
|
4681
|
-
import { mergeAttributes as mergeAttributes8 } from "@tiptap/core";
|
|
4682
|
-
import { Node as Node9 } from "@tiptap/core";
|
|
4683
|
-
import { v4 as uuid3 } from "uuid";
|
|
4684
|
-
var DEFAULT_COLUMNS_GAP = 8;
|
|
4685
|
-
var ColumnsExtension = Node9.create({
|
|
4686
|
-
name: "columns",
|
|
4687
|
-
group: "columns",
|
|
4688
|
-
content: "column+",
|
|
4689
|
-
defining: true,
|
|
4690
|
-
isolating: true,
|
|
4691
|
-
addAttributes() {
|
|
4692
|
-
return {
|
|
4693
|
-
showIfKey: {
|
|
4694
|
-
default: DEFAULT_SECTION_SHOW_IF_KEY,
|
|
4695
|
-
parseHTML: (element) => {
|
|
4696
|
-
return element.getAttribute("data-show-if-key") || DEFAULT_SECTION_SHOW_IF_KEY;
|
|
4697
|
-
},
|
|
4698
|
-
renderHTML(attributes) {
|
|
4699
|
-
if (!attributes.showIfKey) {
|
|
4700
|
-
return {};
|
|
4701
|
-
}
|
|
4702
|
-
return {
|
|
4703
|
-
"data-show-if-key": attributes.showIfKey
|
|
4704
|
-
};
|
|
4705
|
-
}
|
|
4706
|
-
},
|
|
4707
|
-
gap: {
|
|
4708
|
-
default: DEFAULT_COLUMNS_GAP,
|
|
4709
|
-
parseHTML: (element) => {
|
|
4710
|
-
return Number(element.style.gap) || DEFAULT_COLUMNS_GAP;
|
|
4711
|
-
},
|
|
4712
|
-
renderHTML(attributes) {
|
|
4713
|
-
if (!attributes.gap) {
|
|
4714
|
-
return {};
|
|
4715
|
-
}
|
|
4716
|
-
return {
|
|
4717
|
-
style: `gap: ${attributes.gap}px`
|
|
4718
|
-
};
|
|
4719
|
-
}
|
|
4720
|
-
}
|
|
4721
|
-
};
|
|
4722
|
-
},
|
|
4723
|
-
addCommands() {
|
|
4724
|
-
return {
|
|
4725
|
-
setColumns: () => ({ commands }) => {
|
|
4726
|
-
return commands.insertContent({
|
|
4727
|
-
type: this.name,
|
|
4728
|
-
attrs: {},
|
|
4729
|
-
content: [
|
|
4730
|
-
{
|
|
4731
|
-
type: "column",
|
|
4732
|
-
attrs: {
|
|
4733
|
-
columnId: uuid3()
|
|
4734
|
-
},
|
|
4735
|
-
content: [
|
|
4736
|
-
{
|
|
4737
|
-
type: "paragraph"
|
|
4738
|
-
}
|
|
4739
|
-
]
|
|
4740
|
-
},
|
|
4741
|
-
{
|
|
4742
|
-
type: "column",
|
|
4743
|
-
attrs: {
|
|
4744
|
-
columnId: uuid3()
|
|
4745
|
-
},
|
|
4746
|
-
content: [
|
|
4747
|
-
{
|
|
4748
|
-
type: "paragraph"
|
|
4749
|
-
}
|
|
4750
|
-
]
|
|
4751
|
-
}
|
|
4752
|
-
]
|
|
4753
|
-
});
|
|
4754
|
-
},
|
|
4755
|
-
updateColumns: (attrs) => updateAttributes(this.name, attrs)
|
|
4756
|
-
};
|
|
4757
|
-
},
|
|
4758
|
-
renderHTML({ HTMLAttributes: HTMLAttributes2 }) {
|
|
4759
|
-
return [
|
|
4760
|
-
"div",
|
|
4761
|
-
mergeAttributes8(HTMLAttributes2, {
|
|
4762
|
-
"data-type": "columns"
|
|
4763
|
-
}),
|
|
4764
|
-
0
|
|
4765
|
-
];
|
|
4766
|
-
},
|
|
4767
|
-
parseHTML() {
|
|
4768
|
-
return [
|
|
4769
|
-
{
|
|
4770
|
-
tag: 'div[data-type="columns"]'
|
|
4771
|
-
}
|
|
4772
|
-
];
|
|
4773
|
-
},
|
|
4774
|
-
addKeyboardShortcuts() {
|
|
4775
|
-
return {
|
|
4776
|
-
Tab: () => {
|
|
4777
|
-
return goToColumn(this.editor, "next");
|
|
4778
|
-
},
|
|
4779
|
-
"Shift-Tab": () => {
|
|
4780
|
-
return goToColumn(this.editor, "previous");
|
|
4781
|
-
}
|
|
4782
|
-
};
|
|
4783
|
-
}
|
|
4784
|
-
});
|
|
4785
|
-
|
|
4786
|
-
// src/editor/utils/is-custom-node-selected.ts
|
|
4787
|
-
var isCustomNodeSelected = (editor, node) => {
|
|
4788
|
-
const customNodes = [
|
|
4789
|
-
HorizontalRule.name,
|
|
4790
|
-
Image2.name,
|
|
4791
|
-
Spacer.name,
|
|
4792
|
-
ImageExtension.name,
|
|
4793
|
-
VariableExtension.name,
|
|
4794
|
-
LinkCardExtension.name,
|
|
4795
|
-
LogoExtension.name,
|
|
4796
|
-
ButtonExtension.name,
|
|
4797
|
-
ForExtension.name,
|
|
4798
|
-
ColumnsExtension.name,
|
|
4799
|
-
ColumnExtension.name,
|
|
4800
|
-
SectionExtension.name
|
|
4801
|
-
];
|
|
4802
|
-
return customNodes.some((type) => editor.isActive(type));
|
|
4803
|
-
};
|
|
4804
|
-
|
|
4805
4893
|
// src/editor/components/text-menu/text-bubble-menu.tsx
|
|
4806
4894
|
import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4807
4895
|
function TextBubbleMenu(props) {
|
|
@@ -4849,7 +4937,8 @@ function TextBubbleMenu(props) {
|
|
|
4849
4937
|
];
|
|
4850
4938
|
const bubbleMenuProps = __spreadProps(__spreadValues(__spreadValues({}, props), appendTo ? { appendTo: appendTo.current } : {}), {
|
|
4851
4939
|
pluginKey: "textMenu",
|
|
4852
|
-
shouldShow: ({ editor: editor2,
|
|
4940
|
+
shouldShow: ({ editor: editor2, from, view }) => {
|
|
4941
|
+
var _a2;
|
|
4853
4942
|
if (!view || editor2.view.dragging) {
|
|
4854
4943
|
return false;
|
|
4855
4944
|
}
|
|
@@ -4859,7 +4948,14 @@ function TextBubbleMenu(props) {
|
|
|
4859
4948
|
if (isCustomNodeSelected(editor2, node)) {
|
|
4860
4949
|
return false;
|
|
4861
4950
|
}
|
|
4862
|
-
|
|
4951
|
+
const nestedNodes = [
|
|
4952
|
+
ForExtension.name,
|
|
4953
|
+
SectionExtension.name,
|
|
4954
|
+
ColumnsExtension.name,
|
|
4955
|
+
ColumnExtension.name
|
|
4956
|
+
];
|
|
4957
|
+
const isNestedNodeSelected = nestedNodes.some((name) => editor2.isActive(name)) && ((_a2 = node == null ? void 0 : node.classList) == null ? void 0 : _a2.contains("ProseMirror-selectednode"));
|
|
4958
|
+
return isTextSelected(editor2) && !isNestedNodeSelected;
|
|
4863
4959
|
},
|
|
4864
4960
|
tippyOptions: {
|
|
4865
4961
|
popperOptions: {
|
|
@@ -4926,11 +5022,15 @@ function TextBubbleMenu(props) {
|
|
|
4926
5022
|
{
|
|
4927
5023
|
defaultValue: (_a = state == null ? void 0 : state.linkUrl) != null ? _a : "",
|
|
4928
5024
|
onValueChange: (value) => {
|
|
4929
|
-
|
|
4930
|
-
|
|
5025
|
+
const defaultValueWithoutProtocol = value.replace(
|
|
5026
|
+
/https?:\/\//,
|
|
5027
|
+
""
|
|
5028
|
+
);
|
|
5029
|
+
if (!defaultValueWithoutProtocol) {
|
|
5030
|
+
editor == null ? void 0 : editor.chain().focus().extendMarkRange("link").unsetLink().unsetUnderline().run();
|
|
4931
5031
|
return;
|
|
4932
5032
|
}
|
|
4933
|
-
editor == null ? void 0 : editor.chain().extendMarkRange("link").setLink({ href: value }).run();
|
|
5033
|
+
editor == null ? void 0 : editor.chain().extendMarkRange("link").setLink({ href: value }).setUnderline().run();
|
|
4934
5034
|
},
|
|
4935
5035
|
tooltip: "External URL"
|
|
4936
5036
|
}
|
|
@@ -5018,7 +5118,7 @@ var Footer = Node10.create({
|
|
|
5018
5118
|
return [
|
|
5019
5119
|
"small",
|
|
5020
5120
|
mergeAttributes9(this.options.HTMLAttributes, HTMLAttributes2, {
|
|
5021
|
-
class: "footer mly-block mly-text-[13px] mly-text-slate-500"
|
|
5121
|
+
class: "footer mly-block mly-text-[13px] mly-text-slate-500 mly-relative"
|
|
5022
5122
|
}),
|
|
5023
5123
|
0
|
|
5024
5124
|
];
|
|
@@ -5027,17 +5127,22 @@ var Footer = Node10.create({
|
|
|
5027
5127
|
|
|
5028
5128
|
// src/editor/nodes/variable/variable-suggestions.tsx
|
|
5029
5129
|
import { ReactRenderer } from "@tiptap/react";
|
|
5030
|
-
import { ArrowDown, ArrowUp, Braces as Braces4, CornerDownLeft as CornerDownLeft4 } from "lucide-react";
|
|
5031
5130
|
import {
|
|
5032
|
-
|
|
5033
|
-
|
|
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,
|
|
5034
5139
|
useImperativeHandle,
|
|
5035
5140
|
useState as useState9,
|
|
5036
5141
|
useRef as useRef8
|
|
5037
5142
|
} from "react";
|
|
5038
5143
|
import tippy from "tippy.js";
|
|
5039
5144
|
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5040
|
-
var VariableList =
|
|
5145
|
+
var VariableList = forwardRef7((props, ref) => {
|
|
5041
5146
|
const { items = [] } = props;
|
|
5042
5147
|
const [selectedIndex, setSelectedIndex] = useState9(0);
|
|
5043
5148
|
const scrollContainerRef = useRef8(null);
|
|
@@ -5064,14 +5169,14 @@ var VariableList = forwardRef6((props, ref) => {
|
|
|
5064
5169
|
container.scrollTop += itemRect.top - containerRect.top - padding;
|
|
5065
5170
|
}
|
|
5066
5171
|
};
|
|
5067
|
-
|
|
5172
|
+
useEffect6(() => {
|
|
5068
5173
|
setSelectedIndex(0);
|
|
5069
5174
|
if (scrollContainerRef.current) {
|
|
5070
5175
|
scrollContainerRef.current.scrollTop = 0;
|
|
5071
5176
|
}
|
|
5072
5177
|
itemRefs.current = props.items.map(() => null);
|
|
5073
5178
|
}, [props.items]);
|
|
5074
|
-
|
|
5179
|
+
useEffect6(() => {
|
|
5075
5180
|
scrollSelectedIntoView(selectedIndex);
|
|
5076
5181
|
}, [selectedIndex]);
|
|
5077
5182
|
useImperativeHandle(ref, () => ({
|
|
@@ -5146,23 +5251,15 @@ function VariableIcon(props) {
|
|
|
5146
5251
|
);
|
|
5147
5252
|
}
|
|
5148
5253
|
VariableList.displayName = "VariableList";
|
|
5149
|
-
function getVariableSuggestions(variables =
|
|
5150
|
-
const defaultVariables = variables.filter((v) => !v.iterable).map((variable) => variable.name);
|
|
5254
|
+
function getVariableSuggestions(variables = DEFAULT_VARIABLES, char = DEFAULT_VARIABLE_TRIGGER_CHAR) {
|
|
5151
5255
|
return {
|
|
5152
5256
|
char,
|
|
5153
5257
|
items: ({ query, editor }) => {
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
(name) => name.toLowerCase().startsWith(queryLower)
|
|
5160
|
-
);
|
|
5161
|
-
const combinedKeys = [...associatedVariableKeys, ...filteredVariableKeys];
|
|
5162
|
-
if (query.length > 0 && !filteredVariableKeys.includes(query)) {
|
|
5163
|
-
combinedKeys.push(query);
|
|
5164
|
-
}
|
|
5165
|
-
return combinedKeys;
|
|
5258
|
+
return processVariables(variables, {
|
|
5259
|
+
query,
|
|
5260
|
+
editor,
|
|
5261
|
+
from: "variable"
|
|
5262
|
+
}).map((variable) => variable.name);
|
|
5166
5263
|
},
|
|
5167
5264
|
render: () => {
|
|
5168
5265
|
let component;
|
|
@@ -5260,8 +5357,8 @@ var updateScrollView = (container, item) => {
|
|
|
5260
5357
|
// src/editor/extensions/slash-command/slash-command-view.tsx
|
|
5261
5358
|
import { ReactRenderer as ReactRenderer2 } from "@tiptap/react";
|
|
5262
5359
|
import {
|
|
5263
|
-
useCallback as
|
|
5264
|
-
useEffect as
|
|
5360
|
+
useCallback as useCallback7,
|
|
5361
|
+
useEffect as useEffect7,
|
|
5265
5362
|
useLayoutEffect as useLayoutEffect2,
|
|
5266
5363
|
useRef as useRef9,
|
|
5267
5364
|
useState as useState10
|
|
@@ -5271,7 +5368,7 @@ import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
|
5271
5368
|
function CommandList(props) {
|
|
5272
5369
|
const { items, command, editor } = props;
|
|
5273
5370
|
const [selectedIndex, setSelectedIndex] = useState10(0);
|
|
5274
|
-
const selectItem =
|
|
5371
|
+
const selectItem = useCallback7(
|
|
5275
5372
|
(index) => {
|
|
5276
5373
|
const item = items[index];
|
|
5277
5374
|
if (item) {
|
|
@@ -5281,7 +5378,7 @@ function CommandList(props) {
|
|
|
5281
5378
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5282
5379
|
[command, editor, items]
|
|
5283
5380
|
);
|
|
5284
|
-
|
|
5381
|
+
useEffect7(() => {
|
|
5285
5382
|
const navigationKeys = ["ArrowUp", "ArrowDown", "Enter"];
|
|
5286
5383
|
const onKeyDown = (e) => {
|
|
5287
5384
|
if (navigationKeys.includes(e.key)) {
|
|
@@ -5306,7 +5403,7 @@ function CommandList(props) {
|
|
|
5306
5403
|
document.removeEventListener("keydown", onKeyDown);
|
|
5307
5404
|
};
|
|
5308
5405
|
}, [items, selectedIndex, setSelectedIndex, selectItem]);
|
|
5309
|
-
|
|
5406
|
+
useEffect7(() => {
|
|
5310
5407
|
setSelectedIndex(0);
|
|
5311
5408
|
}, [items]);
|
|
5312
5409
|
const commandListContainer = useRef9(null);
|
|
@@ -5424,7 +5521,7 @@ function getSlashCommandSuggestions(commands = []) {
|
|
|
5424
5521
|
|
|
5425
5522
|
// src/editor/extensions/index.ts
|
|
5426
5523
|
function extensions(props) {
|
|
5427
|
-
const { variables, blocks,
|
|
5524
|
+
const { variables, blocks, variableTriggerCharacter } = props;
|
|
5428
5525
|
return [
|
|
5429
5526
|
Document.extend({
|
|
5430
5527
|
content: "(block|columns)+"
|
|
@@ -5433,16 +5530,34 @@ function extensions(props) {
|
|
|
5433
5530
|
ColumnExtension,
|
|
5434
5531
|
StarterKit.configure({
|
|
5435
5532
|
heading: {
|
|
5436
|
-
levels: [1, 2, 3]
|
|
5533
|
+
levels: [1, 2, 3],
|
|
5534
|
+
HTMLAttributes: {
|
|
5535
|
+
class: "mly-relative"
|
|
5536
|
+
}
|
|
5437
5537
|
},
|
|
5438
5538
|
code: {
|
|
5439
5539
|
HTMLAttributes: {
|
|
5440
|
-
class: "mly-px-1 mly-py-0.5 mly-bg-[#efefef] mly-text-sm mly-rounded-md mly-tracking-normal mly-font-normal"
|
|
5540
|
+
class: "mly-px-1 mly-relative mly-py-0.5 mly-bg-[#efefef] mly-text-sm mly-rounded-md mly-tracking-normal mly-font-normal"
|
|
5441
5541
|
}
|
|
5442
5542
|
},
|
|
5443
5543
|
blockquote: {
|
|
5444
5544
|
HTMLAttributes: {
|
|
5445
|
-
class: "mly-not-prose mly-border-l-4 mly-border-gray-300 mly-pl-4 mly-mt-4 mly-mb-4"
|
|
5545
|
+
class: "mly-not-prose mly-border-l-4 mly-border-gray-300 mly-pl-4 mly-mt-4 mly-mb-4 mly-relative"
|
|
5546
|
+
}
|
|
5547
|
+
},
|
|
5548
|
+
paragraph: {
|
|
5549
|
+
HTMLAttributes: {
|
|
5550
|
+
class: "mly-relative"
|
|
5551
|
+
}
|
|
5552
|
+
},
|
|
5553
|
+
bulletList: {
|
|
5554
|
+
HTMLAttributes: {
|
|
5555
|
+
class: "mly-relative"
|
|
5556
|
+
}
|
|
5557
|
+
},
|
|
5558
|
+
orderedList: {
|
|
5559
|
+
HTMLAttributes: {
|
|
5560
|
+
class: "mly-relative"
|
|
5446
5561
|
}
|
|
5447
5562
|
},
|
|
5448
5563
|
horizontalRule: false,
|
|
@@ -5459,9 +5574,14 @@ function extensions(props) {
|
|
|
5459
5574
|
placeholder: ({ node }) => {
|
|
5460
5575
|
if (node.type.name === "heading") {
|
|
5461
5576
|
return `Heading ${node.attrs.level}`;
|
|
5462
|
-
} else if ([
|
|
5463
|
-
|
|
5464
|
-
|
|
5577
|
+
} else if ([
|
|
5578
|
+
"columns",
|
|
5579
|
+
"column",
|
|
5580
|
+
"section",
|
|
5581
|
+
"for",
|
|
5582
|
+
"show",
|
|
5583
|
+
"blockquote"
|
|
5584
|
+
].includes(node.type.name)) {
|
|
5465
5585
|
return "";
|
|
5466
5586
|
}
|
|
5467
5587
|
return "Write something or / to see commands";
|
|
@@ -5476,7 +5596,8 @@ function extensions(props) {
|
|
|
5476
5596
|
TiptapLink.configure({
|
|
5477
5597
|
HTMLAttributes: {
|
|
5478
5598
|
target: "_blank",
|
|
5479
|
-
rel: "noopener noreferrer nofollow"
|
|
5599
|
+
rel: "noopener noreferrer nofollow",
|
|
5600
|
+
class: "mly-no-underline"
|
|
5480
5601
|
},
|
|
5481
5602
|
openOnClick: false
|
|
5482
5603
|
}),
|
|
@@ -5492,7 +5613,7 @@ function extensions(props) {
|
|
|
5492
5613
|
}),
|
|
5493
5614
|
ButtonExtension,
|
|
5494
5615
|
VariableExtension.configure({
|
|
5495
|
-
suggestion: getVariableSuggestions(variables,
|
|
5616
|
+
suggestion: getVariableSuggestions(variables, variableTriggerCharacter)
|
|
5496
5617
|
})
|
|
5497
5618
|
];
|
|
5498
5619
|
}
|
|
@@ -5515,9 +5636,9 @@ function Editor8(props) {
|
|
|
5515
5636
|
extensions: extensions2,
|
|
5516
5637
|
contentHtml,
|
|
5517
5638
|
contentJson,
|
|
5518
|
-
variables,
|
|
5639
|
+
variables = DEFAULT_VARIABLES,
|
|
5519
5640
|
blocks = DEFAULT_SLASH_COMMANDS,
|
|
5520
|
-
|
|
5641
|
+
variableTriggerCharacter = DEFAULT_VARIABLE_TRIGGER_CHAR
|
|
5521
5642
|
} = props;
|
|
5522
5643
|
let formattedContent = null;
|
|
5523
5644
|
if (contentJson) {
|
|
@@ -5567,7 +5688,7 @@ function Editor8(props) {
|
|
|
5567
5688
|
...extensions({
|
|
5568
5689
|
variables,
|
|
5569
5690
|
blocks,
|
|
5570
|
-
|
|
5691
|
+
variableTriggerCharacter
|
|
5571
5692
|
}),
|
|
5572
5693
|
...extensions2 || []
|
|
5573
5694
|
],
|
|
@@ -5582,7 +5703,7 @@ function Editor8(props) {
|
|
|
5582
5703
|
{
|
|
5583
5704
|
variables,
|
|
5584
5705
|
blocks,
|
|
5585
|
-
|
|
5706
|
+
variableTriggerCharacter,
|
|
5586
5707
|
children: /* @__PURE__ */ jsxs25(
|
|
5587
5708
|
"div",
|
|
5588
5709
|
{
|