@react-email/editor 0.0.0-experimental.4 → 0.0.0-experimental.41
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/core/index.cjs +9 -0
- package/dist/core/index.d.cts +2 -0
- package/dist/core/index.d.mts +3 -0
- package/dist/core/index.mjs +4 -0
- package/dist/create-paste-handler-B8BtjBk3.d.cts +14 -0
- package/dist/create-paste-handler-B8BtjBk3.d.cts.map +1 -0
- package/dist/create-paste-handler-CGR738bC.d.mts +14 -0
- package/dist/create-paste-handler-CGR738bC.d.mts.map +1 -0
- package/dist/event-bus-CHEzOS_O.mjs +329 -0
- package/dist/event-bus-CHEzOS_O.mjs.map +1 -0
- package/dist/event-bus-fb8U7hrl.cjs +450 -0
- package/dist/extension-DyY8_bh4.mjs +1110 -0
- package/dist/extension-DyY8_bh4.mjs.map +1 -0
- package/dist/extension-w5VaUeSw.cjs +1235 -0
- package/dist/extensions/index.cjs +51 -0
- package/dist/extensions/index.d.cts +399 -0
- package/dist/extensions/index.d.cts.map +1 -0
- package/dist/extensions/index.d.mts +400 -0
- package/dist/extensions/index.d.mts.map +1 -0
- package/dist/extensions/index.mjs +5 -0
- package/dist/extensions-BvfmaKCn.mjs +2088 -0
- package/dist/extensions-BvfmaKCn.mjs.map +1 -0
- package/dist/extensions-CkjPj2JO.cjs +2369 -0
- package/dist/global-content-D_WYaFgX.mjs +78 -0
- package/dist/global-content-D_WYaFgX.mjs.map +1 -0
- package/dist/global-content-bJgotqmA.cjs +89 -0
- package/dist/index-C4KcMQ0R.d.cts +161 -0
- package/dist/index-C4KcMQ0R.d.cts.map +1 -0
- package/dist/index-CxX7W63O.d.mts +161 -0
- package/dist/index-CxX7W63O.d.mts.map +1 -0
- package/dist/index.cjs +74 -0
- package/dist/index.css +832 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +33 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +31 -277
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +64 -1377
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/index.cjs +23 -0
- package/dist/plugins/index.d.cts +191 -0
- package/dist/plugins/index.d.cts.map +1 -0
- package/dist/plugins/index.d.mts +191 -0
- package/dist/plugins/index.d.mts.map +1 -0
- package/dist/plugins/index.mjs +3 -0
- package/dist/root-Jq1R3tkX.cjs +2832 -0
- package/dist/root-pS4l8bVZ.mjs +2316 -0
- package/dist/root-pS4l8bVZ.mjs.map +1 -0
- package/dist/set-text-alignment-Cv72txmv.cjs +24 -0
- package/dist/set-text-alignment-OA8IMWmO.mjs +19 -0
- package/dist/set-text-alignment-OA8IMWmO.mjs.map +1 -0
- package/dist/styles-C-cCyJCn.cjs +211 -0
- package/dist/styles-_TMw3YxC.mjs +194 -0
- package/dist/styles-_TMw3YxC.mjs.map +1 -0
- package/dist/ui/bubble-menu/bubble-menu.css +285 -0
- package/dist/ui/index.cjs +147 -0
- package/dist/ui/index.d.cts +939 -0
- package/dist/ui/index.d.cts.map +1 -0
- package/dist/ui/index.d.mts +939 -0
- package/dist/ui/index.d.mts.map +1 -0
- package/dist/ui/index.mjs +60 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/ui/slash-command/slash-command.css +44 -0
- package/dist/ui/themes/default.css +830 -0
- package/dist/utils/index.cjs +3 -0
- package/dist/utils/index.d.cts +7 -0
- package/dist/utils/index.d.cts.map +1 -0
- package/dist/utils/index.d.mts +7 -0
- package/dist/utils/index.d.mts.map +1 -0
- package/dist/utils/index.mjs +3 -0
- package/package.json +109 -21
- package/dist/index.d.ts +0 -279
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1436
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.css","names":[],"sources":["../src/ui/bubble-menu/bubble-menu.css","../src/ui/slash-command/slash-command.css","../src/ui/themes/default.css"],"sourcesContent":["/* Minimal functional styles for BubbleMenu compound components.\n * This file handles layout and positioning only - no visual design.\n * Import this optionally: import '@react-email/editor/styles/bubble-menu.css';\n */\n\n[data-re-bubble-menu] {\n display: flex;\n align-items: center;\n gap: 0.125rem;\n}\n\n[data-re-bubble-menu-group] {\n display: flex;\n align-items: center;\n gap: 0.125rem;\n padding: 0 0.125rem;\n border: none;\n margin: 0;\n min-width: 0;\n}\n\n[data-re-bubble-menu-separator] {\n align-self: stretch;\n width: 1px;\n margin: 0.25rem 0;\n}\n\n[data-re-bubble-menu-item] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.375rem;\n}\n\n[data-re-bubble-menu-item] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n[data-re-node-selector] {\n position: relative;\n}\n\n[data-re-node-selector-trigger] {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n cursor: pointer;\n border: none;\n background: none;\n white-space: nowrap;\n font-size: 0.8125rem;\n padding: 0.375rem 0.5rem;\n}\n\n[data-re-node-selector-trigger] svg {\n width: 0.75rem;\n height: 0.75rem;\n opacity: 0.5;\n}\n\n[data-re-node-selector-content] {\n display: flex;\n flex-direction: column;\n min-width: 10rem;\n}\n\n[data-re-node-selector-item] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.375rem 0.5rem;\n font-size: 0.8125rem;\n width: 100%;\n text-align: left;\n}\n\n[data-re-node-selector-item] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n[data-re-link-selector] {\n display: flex;\n position: relative;\n}\n\n[data-re-link-selector-trigger] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.375rem;\n}\n\n[data-re-link-selector-trigger] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n[data-re-link-selector-form] {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n position: absolute;\n top: 100%;\n left: 0;\n margin-top: 0.25rem;\n width: max-content;\n min-width: 16rem;\n padding: 0.25rem;\n}\n\n[data-re-link-selector-input] {\n flex: 1;\n border: none;\n outline: none;\n font-size: 0.8125rem;\n padding: 0.25rem;\n background: transparent;\n}\n\n[data-re-link-selector-apply],\n[data-re-link-selector-unlink] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.25rem;\n}\n\n[data-re-link-selector-apply] svg,\n[data-re-link-selector-unlink] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n/* Button bubble menu */\n\n[data-re-btn-bm-toolbar] {\n display: flex;\n align-items: center;\n}\n\n[data-re-btn-bm-item] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.375rem;\n}\n\n[data-re-btn-bm-item] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n[data-re-btn-bm-form] {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n min-width: 16rem;\n padding: 0.25rem;\n}\n\n[data-re-btn-bm-input] {\n flex: 1;\n border: none;\n outline: none;\n font-size: 0.8125rem;\n padding: 0.25rem;\n background: transparent;\n}\n\n[data-re-btn-bm-apply],\n[data-re-btn-bm-unlink] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.25rem;\n}\n\n[data-re-btn-bm-apply] svg,\n[data-re-btn-bm-unlink] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n/* Link bubble menu */\n\n[data-re-link-bm-toolbar] {\n display: flex;\n align-items: center;\n}\n\n[data-re-link-bm-item] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.375rem;\n}\n\n[data-re-link-bm-item] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\na[data-re-link-bm-item] {\n text-decoration: none;\n color: inherit;\n}\n\n[data-re-link-bm-form] {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n min-width: 16rem;\n padding: 0.25rem;\n}\n\n[data-re-link-bm-input] {\n flex: 1;\n border: none;\n outline: none;\n font-size: 0.8125rem;\n padding: 0.25rem;\n background: transparent;\n}\n\n[data-re-link-bm-apply],\n[data-re-link-bm-unlink] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.25rem;\n}\n\n[data-re-link-bm-apply] svg,\n[data-re-link-bm-unlink] svg {\n width: 0.875rem;\n height: 0.875rem;\n}\n\n/* Image bubble menu */\n\n[data-re-img-bm-toolbar] {\n display: flex;\n align-items: center;\n}\n\n[data-re-img-bm-item] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0.5rem;\n}\n\n[data-re-img-bm-item] svg {\n width: 1rem;\n height: 1rem;\n}\n","/* Minimal functional styles for SlashCommand components.\n * Layout and positioning only - no visual design.\n * Import optionally: import '@react-email/editor/styles/slash-command.css';\n */\n\n[data-re-slash-command] {\n max-height: 330px;\n overflow-y: auto;\n width: 256px;\n padding: 0.25rem;\n}\n\n[data-re-slash-command-item] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n width: 100%;\n padding: 0.375rem 0.5rem;\n border: none;\n border-radius: 0.375rem;\n background: none;\n cursor: pointer;\n font-size: 0.875rem;\n line-height: 1.25rem;\n text-align: left;\n}\n\n[data-re-slash-command-item] svg {\n flex-shrink: 0;\n}\n\n[data-re-slash-command-category] {\n font-size: 0.6875rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n padding: 0.5rem 0.5rem 0.25rem;\n}\n\n[data-re-slash-command-empty] {\n padding: 0.75rem 0.5rem;\n font-size: 0.875rem;\n text-align: center;\n}\n","/* Default theme for @react-email/editor bubble menu primitives.\n *\n * Opt-in: import '@react-email/editor/themes/default.css';\n *\n * Override any variable on a parent element:\n * .my-editor { --re-bg: #1a1a1a; --re-border: #333; }\n */\n\n/* Layer 0: layout (inlined at build time via postcss-import) */\n@import \"../bubble-menu/bubble-menu.css\";\n@import \"../slash-command/slash-command.css\";\n\n/* ----------------------------------------------------------------\n * CSS custom properties — light defaults\n * ---------------------------------------------------------------- */\n\n:root {\n --re-bg: #fff;\n --re-border: #e5e5e5;\n --re-text: #1c1c1c;\n --re-text-muted: #6b6b6b;\n --re-hover: rgba(0, 0, 0, 0.04);\n --re-active: rgba(0, 0, 0, 0.06);\n --re-pressed: rgba(0, 0, 0, 0.06);\n --re-separator: #e5e5e5;\n --re-radius: 0.75rem;\n --re-radius-sm: 0.5rem;\n --re-shadow:\n 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n --re-danger: #dc2626;\n --re-danger-hover: rgba(220, 38, 38, 0.1);\n}\n\n/* ----------------------------------------------------------------\n * Dark mode — prefers-color-scheme\n * ---------------------------------------------------------------- */\n\n@media (prefers-color-scheme: dark) {\n :root {\n --re-bg: #1c1c1c;\n --re-border: #2e2e2e;\n --re-text: #ececec;\n --re-text-muted: #a0a0a0;\n --re-hover: rgba(255, 255, 255, 0.06);\n --re-active: rgba(255, 255, 255, 0.09);\n --re-pressed: rgba(255, 255, 255, 0.09);\n --re-separator: #2e2e2e;\n --re-shadow:\n 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);\n --re-danger: #f87171;\n --re-danger-hover: rgba(248, 113, 113, 0.15);\n }\n}\n\n/* ----------------------------------------------------------------\n * Dark mode — .dark class override\n * ---------------------------------------------------------------- */\n\n.dark {\n --re-bg: #1c1c1c;\n --re-border: #2e2e2e;\n --re-text: #ececec;\n --re-text-muted: #a0a0a0;\n --re-hover: rgba(255, 255, 255, 0.06);\n --re-active: rgba(255, 255, 255, 0.09);\n --re-pressed: rgba(255, 255, 255, 0.09);\n --re-separator: #2e2e2e;\n --re-shadow:\n 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);\n --re-danger: #f87171;\n --re-danger-hover: rgba(248, 113, 113, 0.15);\n}\n\n/* ----------------------------------------------------------------\n * Root containers\n * ---------------------------------------------------------------- */\n\n[data-re-bubble-menu] {\n background: var(--re-bg);\n border: 1px solid var(--re-border);\n border-radius: var(--re-radius);\n box-shadow: var(--re-shadow);\n z-index: 50;\n padding: 0.125rem;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 0.8125rem;\n line-height: 1;\n}\n\n/* ----------------------------------------------------------------\n * Toolbars (link, button, image bubble menus)\n * ---------------------------------------------------------------- */\n\n[data-re-img-bm-toolbar] > * + * {\n border-left: 1px solid var(--re-border);\n}\n\n/* ----------------------------------------------------------------\n * Item buttons (all bubble menus)\n * ---------------------------------------------------------------- */\n\n[data-re-bubble-menu-item],\n[data-re-link-bm-item],\n[data-re-btn-bm-item],\n[data-re-img-bm-item] {\n color: var(--re-text-muted);\n border-radius: var(--re-radius-sm);\n transition:\n background-color 0.15s,\n color 0.15s;\n}\n\n[data-re-bubble-menu-item]:hover,\n[data-re-link-bm-item]:hover,\n[data-re-btn-bm-item]:hover,\n[data-re-img-bm-item]:hover {\n background: var(--re-hover);\n color: var(--re-text);\n}\n\n[data-re-bubble-menu-item]:active,\n[data-re-link-bm-item]:active,\n[data-re-btn-bm-item]:active,\n[data-re-img-bm-item]:active {\n background: var(--re-active);\n}\n\n/* Active / pressed state */\n[data-re-bubble-menu-item][data-active],\n[data-re-bubble-menu-item][aria-pressed=\"true\"] {\n background: var(--re-pressed);\n color: var(--re-text);\n}\n\n/* ----------------------------------------------------------------\n * Separator (text bubble menu)\n * ---------------------------------------------------------------- */\n\n[data-re-bubble-menu-separator] {\n background: var(--re-separator);\n}\n\n/* ----------------------------------------------------------------\n * Node Selector\n * ---------------------------------------------------------------- */\n\n[data-re-node-selector-trigger] {\n color: var(--re-text);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n font-weight: 500;\n}\n\n[data-re-node-selector-trigger]:hover {\n background: var(--re-hover);\n}\n\n[data-re-node-selector-trigger]:active {\n background: var(--re-active);\n}\n\n[data-re-node-selector-content] {\n background: var(--re-bg);\n border: 1px solid var(--re-border);\n border-radius: var(--re-radius);\n box-shadow: var(--re-shadow);\n padding: 0.25rem;\n margin-top: 0.25rem;\n z-index: 50;\n}\n\n[data-re-node-selector-item] {\n color: var(--re-text-muted);\n border-radius: var(--re-radius-sm);\n transition:\n background-color 0.15s,\n color 0.15s;\n}\n\n[data-re-node-selector-item]:hover {\n background: var(--re-hover);\n color: var(--re-text);\n}\n\n[data-re-node-selector-item][data-active] {\n color: var(--re-text);\n}\n\n/* ----------------------------------------------------------------\n * Link Selector (text bubble menu)\n * ---------------------------------------------------------------- */\n\n[data-re-link-selector-trigger] {\n color: var(--re-text-muted);\n border-radius: var(--re-radius-sm);\n transition:\n background-color 0.15s,\n color 0.15s;\n}\n\n[data-re-link-selector-trigger]:hover {\n background: var(--re-hover);\n color: var(--re-text);\n}\n\n[data-re-link-selector-trigger][aria-pressed=\"true\"] {\n background: var(--re-pressed);\n}\n\n[data-re-link-selector-form] {\n background: var(--re-bg);\n border: 1px solid var(--re-border);\n border-radius: var(--re-radius);\n box-shadow: var(--re-shadow);\n padding: 0.25rem;\n}\n\n[data-re-link-selector-input] {\n color: var(--re-text);\n}\n\n[data-re-link-selector-input]::placeholder {\n color: var(--re-text-muted);\n}\n\n[data-re-link-selector-apply] {\n color: var(--re-text);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n}\n\n[data-re-link-selector-apply]:hover {\n background: var(--re-hover);\n}\n\n[data-re-link-selector-unlink] {\n color: var(--re-danger);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n}\n\n[data-re-link-selector-unlink]:hover {\n background: var(--re-danger-hover);\n}\n\n/* ----------------------------------------------------------------\n * Link Bubble Menu Form\n * ---------------------------------------------------------------- */\n\n[data-re-link-bm-form] {\n background: var(--re-bg);\n padding: 0.25rem;\n}\n\n[data-re-link-bm-input] {\n color: var(--re-text);\n}\n\n[data-re-link-bm-input]::placeholder {\n color: var(--re-text-muted);\n}\n\n[data-re-link-bm-apply] {\n color: var(--re-text);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n}\n\n[data-re-link-bm-apply]:hover {\n background: var(--re-hover);\n}\n\n[data-re-link-bm-unlink] {\n color: var(--re-danger);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n}\n\n[data-re-link-bm-unlink]:hover {\n background: var(--re-danger-hover);\n}\n\n/* ----------------------------------------------------------------\n * Button Bubble Menu Form\n * ---------------------------------------------------------------- */\n\n[data-re-btn-bm-form] {\n background: var(--re-bg);\n padding: 0.25rem;\n}\n\n[data-re-btn-bm-input] {\n color: var(--re-text);\n}\n\n[data-re-btn-bm-input]::placeholder {\n color: var(--re-text-muted);\n}\n\n[data-re-btn-bm-apply] {\n color: var(--re-text);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n}\n\n[data-re-btn-bm-apply]:hover {\n background: var(--re-hover);\n}\n\n[data-re-btn-bm-unlink] {\n color: var(--re-danger);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n}\n\n[data-re-btn-bm-unlink]:hover {\n background: var(--re-danger-hover);\n}\n\n/* ----------------------------------------------------------------\n * Slash Command\n * ---------------------------------------------------------------- */\n\n[data-re-slash-command] {\n background: var(--re-bg);\n border: 1px solid var(--re-border);\n border-radius: var(--re-radius);\n box-shadow: var(--re-shadow);\n font-family: system-ui, -apple-system, sans-serif;\n}\n\n[data-re-slash-command-item] {\n color: var(--re-text);\n border-radius: var(--re-radius-sm);\n transition: background-color 0.15s;\n}\n\n[data-re-slash-command-item]:hover {\n background: var(--re-hover);\n}\n\n[data-re-slash-command-item][data-selected] {\n background: var(--re-hover);\n}\n\n[data-re-slash-command-item]:active {\n background: var(--re-active);\n}\n\n[data-re-slash-command-item] svg {\n color: var(--re-text-muted);\n}\n\n[data-re-slash-command-category] {\n color: var(--re-text-muted);\n}\n\n[data-re-slash-command-empty] {\n color: var(--re-text-muted);\n}\n\n/* ----------------------------------------------------------------\n * Editor content — alignment attribute\n * ---------------------------------------------------------------- */\n\n.tiptap [alignment=\"left\"] {\n text-align: left;\n}\n\n.tiptap [alignment=\"center\"] {\n text-align: center;\n}\n\n.tiptap [alignment=\"right\"] {\n text-align: right;\n}\n\n.tiptap [alignment=\"justify\"] {\n text-align: justify;\n}\n\n/* ----------------------------------------------------------------\n * Editor content — columns\n * ---------------------------------------------------------------- */\n\n.tiptap .node-columns {\n display: flex;\n gap: 0.5rem;\n width: 100%;\n}\n\n.tiptap .node-column {\n flex: 1;\n min-width: 0;\n}\n\n/* ----------------------------------------------------------------\n * Editor content — base typography\n * ---------------------------------------------------------------- */\n\n.tiptap {\n outline: none;\n color: var(--re-text);\n}\n\n.tiptap p {\n margin: 0.25em 0;\n}\n\n.tiptap h1,\n.tiptap h2,\n.tiptap h3 {\n margin: 0.5em 0 0.25em;\n font-weight: 700;\n}\n\n.tiptap h1 {\n font-size: 2em;\n}\n\n.tiptap h2 {\n font-size: 1.5em;\n}\n\n.tiptap h3 {\n font-size: 1.17em;\n}\n\n.tiptap a:not(.node-button) {\n color: #2563eb;\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: text;\n}\n\n.tiptap .node-button {\n display: inline-block;\n padding: 0.625em 1.25em;\n background-color: #000;\n color: #fff;\n border-radius: 0.375em;\n font-weight: 500;\n font-size: 0.875em;\n text-decoration: none;\n text-align: center;\n cursor: text;\n}\n\n.tiptap blockquote {\n border-left: 3px solid var(--re-border);\n margin: 0.5em 0;\n padding-left: 1em;\n color: var(--re-text-muted);\n}\n\n.tiptap hr {\n border: none;\n border-top: 1px solid var(--re-border);\n margin: 1em 0;\n}\n\n.tiptap code {\n background: var(--re-hover);\n border-radius: 0.25rem;\n padding: 0.125rem 0.375rem;\n font-size: 0.875em;\n}\n\n.tiptap pre {\n background: var(--re-hover);\n border-radius: var(--re-radius-sm);\n padding: 0.75rem 1rem;\n overflow-x: auto;\n}\n\n.tiptap pre code {\n background: none;\n padding: 0;\n border-radius: 0;\n}\n\n.tiptap ul {\n list-style-type: disc;\n padding-left: 1.5em;\n margin: 0.25em 0;\n}\n\n.tiptap ol {\n list-style-type: decimal;\n padding-left: 1.5em;\n margin: 0.25em 0;\n}\n\n.tiptap .node-placeholder::before {\n color: var(--re-text-muted);\n content: attr(data-placeholder);\n float: left;\n height: 0;\n pointer-events: none;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AC5RA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { n as UploadImageHandler } from "./create-paste-handler-B8BtjBk3.cjs";
|
|
2
|
+
import { Content, Editor, Extensions, JSONContent } from "@tiptap/core";
|
|
3
|
+
import * as react0 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/email-editor/email-editor.d.ts
|
|
6
|
+
interface EmailEditorRef {
|
|
7
|
+
export: () => Promise<{
|
|
8
|
+
html: string;
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
getJSON: () => JSONContent;
|
|
12
|
+
getHTML: () => string;
|
|
13
|
+
editor: Editor | null;
|
|
14
|
+
}
|
|
15
|
+
interface EmailEditorProps {
|
|
16
|
+
content?: Content;
|
|
17
|
+
onChange?: (editor: Editor) => void;
|
|
18
|
+
onUploadImage?: UploadImageHandler;
|
|
19
|
+
onReady?: (editor: Editor) => void;
|
|
20
|
+
theme?: 'basic' | 'minimal';
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
bubbleMenu?: {
|
|
24
|
+
hideWhenActiveNodes?: string[];
|
|
25
|
+
hideWhenActiveMarks?: string[];
|
|
26
|
+
};
|
|
27
|
+
extensions?: Extensions;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
declare const EmailEditor: react0.ForwardRefExoticComponent<EmailEditorProps & react0.RefAttributes<EmailEditorRef>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { EmailEditor, type EmailEditorProps, type EmailEditorRef };
|
|
33
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/email-editor/email-editor.tsx"],"sourcesContent":[],"mappings":";;;;;UAuBiB,cAAA;gBACD;IADC,IAAA,EAAA,MAAA;IACD,IAAA,EAAA,MAAA;EACC,CAAA,CAAA;EAEP,OAAA,EAAA,GAAA,GAFO,WAEP;EAAM,OAAA,EAAA,GAAA,GAAA,MAAA;EAGC,MAAA,EAHP,MAGO,GAAA,IAAgB;;AAEX,UAFL,gBAAA,CAEK;EACJ,OAAA,CAAA,EAFN,OAEM;EACG,QAAA,CAAA,EAAA,CAAA,MAAA,EAFC,MAED,EAAA,GAAA,IAAA;EAQN,aAAA,CAAA,EATG,kBASH;EAAU,OAAA,CAAA,EAAA,CAAA,MAAA,EARJ,MAQI,EAAA,GAAA,IAAA;EA0BZ,KAAA,CAAA,EAAA,OAmEZ,GAAA,SAAA;EAnEuB,QAAA,CAAA,EAAA,OAAA;EAAA,WAAA,CAAA,EAAA,MAAA;EAAA,UAAA,CAAA,EAAA;IAAA,mBAAA,CAAA,EAAA,MAAA,EAAA;IAAA,mBAAA,CAAA,EAAA,MAAA,EAAA;;eA1BT;;;cA0BF,aAAW,MAAA,CAAA,0BAAA,mBAAA,MAAA,CAAA,cAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,279 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import * as _tiptap_extension_placeholder0 from "@tiptap/extension-placeholder";
|
|
5
|
-
import { Node as Node$1 } from "@tiptap/pm/model";
|
|
6
|
-
import * as React$1 from "react";
|
|
1
|
+
import { n as UploadImageHandler } from "./create-paste-handler-CGR738bC.mjs";
|
|
2
|
+
import * as react20 from "react";
|
|
3
|
+
import { Content, Editor, Extensions, JSONContent } from "@tiptap/core";
|
|
7
4
|
|
|
8
|
-
//#region src/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
name: string;
|
|
37
|
-
options: ExtendedOptions;
|
|
38
|
-
storage: ExtendedStorage;
|
|
39
|
-
editor: Editor;
|
|
40
|
-
type: NodeType;
|
|
41
|
-
}>)): EmailNode<ExtendedOptions, ExtendedStorage>;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/extensions/alignment-attribute.d.ts
|
|
45
|
-
interface AlignmentOptions {
|
|
46
|
-
types: string[];
|
|
47
|
-
alignments: string[];
|
|
48
|
-
}
|
|
49
|
-
declare module '@tiptap/core' {
|
|
50
|
-
interface Commands<ReturnType> {
|
|
51
|
-
alignment: {
|
|
52
|
-
/**
|
|
53
|
-
* Set the text align attribute
|
|
54
|
-
*/
|
|
55
|
-
setAlignment: (alignment: string) => ReturnType;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
declare const AlignmentAttribute: Extension<AlignmentOptions, any>;
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/extensions/body.d.ts
|
|
62
|
-
interface BodyOptions {
|
|
63
|
-
HTMLAttributes: Record<string, unknown>;
|
|
64
|
-
}
|
|
65
|
-
declare const Body: EmailNode<BodyOptions, Record<string, never>>;
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/extensions/bold.d.ts
|
|
68
|
-
interface BoldOptions {
|
|
69
|
-
/**
|
|
70
|
-
* HTML attributes to add to the bold element.
|
|
71
|
-
* @default {}
|
|
72
|
-
* @example { class: 'foo' }
|
|
73
|
-
*/
|
|
74
|
-
HTMLAttributes: Record<string, unknown>;
|
|
75
|
-
}
|
|
76
|
-
declare module '@tiptap/core' {
|
|
77
|
-
interface Commands<ReturnType> {
|
|
78
|
-
bold: {
|
|
79
|
-
/**
|
|
80
|
-
* Set a bold mark
|
|
81
|
-
*/
|
|
82
|
-
setBold: () => ReturnType;
|
|
83
|
-
/**
|
|
84
|
-
* Toggle a bold mark
|
|
85
|
-
*/
|
|
86
|
-
toggleBold: () => ReturnType;
|
|
87
|
-
/**
|
|
88
|
-
* Unset a bold mark
|
|
89
|
-
*/
|
|
90
|
-
unsetBold: () => ReturnType;
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* This extension allows you to mark text as bold.
|
|
96
|
-
* @see https://tiptap.dev/api/marks/bold
|
|
97
|
-
*/
|
|
98
|
-
declare const Bold: Mark<BoldOptions, any>;
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/extensions/button.d.ts
|
|
101
|
-
interface EditorButtonOptions {
|
|
102
|
-
HTMLAttributes: Record<string, unknown>;
|
|
103
|
-
[key: string]: unknown;
|
|
104
|
-
}
|
|
105
|
-
declare module '@tiptap/core' {
|
|
106
|
-
interface Commands<ReturnType> {
|
|
107
|
-
button: {
|
|
108
|
-
setButton: () => ReturnType;
|
|
109
|
-
updateButton: (attributes: Record<string, unknown>) => ReturnType;
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
declare const Button: EmailNode<EditorButtonOptions, Record<string, never>>;
|
|
114
|
-
//#endregion
|
|
115
|
-
//#region src/extensions/class-attribute.d.ts
|
|
116
|
-
interface ClassAttributeOptions {
|
|
117
|
-
types: string[];
|
|
118
|
-
class: string[];
|
|
119
|
-
}
|
|
120
|
-
declare module '@tiptap/core' {
|
|
121
|
-
interface Commands<ReturnType> {
|
|
122
|
-
class: {
|
|
123
|
-
/**
|
|
124
|
-
* Set the class attribute
|
|
125
|
-
*/
|
|
126
|
-
setClass: (classList: string) => ReturnType;
|
|
127
|
-
/**
|
|
128
|
-
* Unset the class attribute
|
|
129
|
-
*/
|
|
130
|
-
unsetClass: () => ReturnType;
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
declare const ClassAttribute: Extension<ClassAttributeOptions, any>;
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/extensions/code-block.d.ts
|
|
137
|
-
interface CodeBlockPrismOptions extends CodeBlockOptions {
|
|
138
|
-
defaultLanguage: string;
|
|
139
|
-
defaultTheme: string;
|
|
140
|
-
}
|
|
141
|
-
declare const CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region src/extensions/div.d.ts
|
|
144
|
-
interface DivOptions {
|
|
145
|
-
HTMLAttributes: Record<string, unknown>;
|
|
146
|
-
}
|
|
147
|
-
declare const Div: EmailNode<DivOptions, Record<string, never>>;
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region src/extensions/max-nesting.d.ts
|
|
150
|
-
interface MaxNestingOptions {
|
|
151
|
-
maxDepth: number;
|
|
152
|
-
nodeTypes?: string[];
|
|
153
|
-
}
|
|
154
|
-
declare const MaxNesting: Extension<MaxNestingOptions, any>;
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/extensions/placeholder.d.ts
|
|
157
|
-
interface PlaceholderOptions {
|
|
158
|
-
placeholder?: string | ((props: {
|
|
159
|
-
node: Node$1;
|
|
160
|
-
}) => string);
|
|
161
|
-
includeChildren?: boolean;
|
|
162
|
-
}
|
|
163
|
-
declare const Placeholder: _tiptap_core0.Extension<_tiptap_extension_placeholder0.PlaceholderOptions, any>;
|
|
164
|
-
//#endregion
|
|
165
|
-
//#region src/extensions/preserved-style.d.ts
|
|
166
|
-
declare const PreservedStyle: Mark<any, any>;
|
|
167
|
-
/**
|
|
168
|
-
* Processes styles when unlinking:
|
|
169
|
-
* - Has background (button-like): preserve all styles
|
|
170
|
-
* - No background: strip link-indicator styles (color, text-decoration), keep the rest
|
|
171
|
-
*/
|
|
172
|
-
declare function processStylesForUnlink(styleString: string | null | undefined): string | null;
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/extensions/preview-text.d.ts
|
|
175
|
-
interface PreviewTextOptions {
|
|
176
|
-
HTMLAttributes: Record<string, unknown>;
|
|
177
|
-
}
|
|
178
|
-
declare const PreviewText: Node<PreviewTextOptions, any>;
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region src/extensions/section.d.ts
|
|
181
|
-
interface SectionOptions {
|
|
182
|
-
HTMLAttributes: Record<string, unknown>;
|
|
183
|
-
[key: string]: unknown;
|
|
184
|
-
}
|
|
185
|
-
declare module '@tiptap/core' {
|
|
186
|
-
interface Commands<ReturnType> {
|
|
187
|
-
section: {
|
|
188
|
-
insertSection: () => ReturnType;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
declare const Section: EmailNode<SectionOptions, Record<string, never>>;
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/extensions/style-attribute.d.ts
|
|
195
|
-
interface StyleAttributeOptions {
|
|
196
|
-
types: string[];
|
|
197
|
-
style: string[];
|
|
198
|
-
}
|
|
199
|
-
declare module '@tiptap/core' {
|
|
200
|
-
interface Commands<ReturnType> {
|
|
201
|
-
textAlign: {
|
|
202
|
-
/**
|
|
203
|
-
* Set the style attribute
|
|
204
|
-
*/
|
|
205
|
-
setStyle: (style: string) => ReturnType;
|
|
206
|
-
/**
|
|
207
|
-
* Unset the style attribute
|
|
208
|
-
*/
|
|
209
|
-
unsetStyle: () => ReturnType;
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
declare const StyleAttribute: Extension<StyleAttributeOptions, any>;
|
|
214
|
-
//#endregion
|
|
215
|
-
//#region src/extensions/sup.d.ts
|
|
216
|
-
interface SupOptions {
|
|
217
|
-
/**
|
|
218
|
-
* HTML attributes to add to the sup element.
|
|
219
|
-
* @default {}
|
|
220
|
-
* @example { class: 'foo' }
|
|
221
|
-
*/
|
|
222
|
-
HTMLAttributes: Record<string, unknown>;
|
|
223
|
-
}
|
|
224
|
-
declare module '@tiptap/core' {
|
|
225
|
-
interface Commands<ReturnType> {
|
|
226
|
-
sup: {
|
|
227
|
-
/**
|
|
228
|
-
* Set a superscript mark
|
|
229
|
-
*/
|
|
230
|
-
setSup: () => ReturnType;
|
|
231
|
-
/**
|
|
232
|
-
* Toggle a superscript mark
|
|
233
|
-
*/
|
|
234
|
-
toggleSup: () => ReturnType;
|
|
235
|
-
/**
|
|
236
|
-
* Unset a superscript mark
|
|
237
|
-
*/
|
|
238
|
-
unsetSup: () => ReturnType;
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* This extension allows you to mark text as superscript.
|
|
244
|
-
* @see https://tiptap.dev/api/marks/superscript
|
|
245
|
-
*/
|
|
246
|
-
declare const Sup: Mark<SupOptions, any>;
|
|
247
|
-
//#endregion
|
|
248
|
-
//#region src/extensions/table.d.ts
|
|
249
|
-
declare module '@tiptap/core' {
|
|
250
|
-
interface NodeConfig<Options, Storage> {
|
|
251
|
-
/**
|
|
252
|
-
* A string or function to determine the role of the table.
|
|
253
|
-
* @default 'table'
|
|
254
|
-
* @example () => 'table'
|
|
255
|
-
*/
|
|
256
|
-
tableRole?: string | ((this: {
|
|
257
|
-
name: string;
|
|
258
|
-
options: Options;
|
|
259
|
-
storage: Storage;
|
|
260
|
-
parent: ParentConfig<NodeConfig<Options>>['tableRole'];
|
|
261
|
-
}) => string);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
interface TableOptions {
|
|
265
|
-
HTMLAttributes: Record<string, unknown>;
|
|
266
|
-
}
|
|
267
|
-
declare const Table: EmailNode<TableOptions, Record<string, never>>;
|
|
268
|
-
interface TableRowOptions extends Record<string, unknown> {
|
|
269
|
-
HTMLAttributes?: Record<string, unknown>;
|
|
270
|
-
}
|
|
271
|
-
declare const TableRow: EmailNode<TableRowOptions, Record<string, never>>;
|
|
272
|
-
interface TableCellOptions extends Record<string, unknown> {
|
|
273
|
-
HTMLAttributes?: Record<string, unknown>;
|
|
274
|
-
}
|
|
275
|
-
declare const TableCell: EmailNode<TableCellOptions, Record<string, never>>;
|
|
276
|
-
declare const TableHeader: Node<any, any>;
|
|
277
|
-
//#endregion
|
|
278
|
-
export { AlignmentAttribute, Body, BodyOptions, Bold, BoldOptions, Button, ClassAttribute, CodeBlockPrism, CodeBlockPrismOptions, Div, DivOptions, EmailNode, EmailNodeConfig, MaxNesting, Placeholder, PlaceholderOptions, PreservedStyle, PreviewText, PreviewTextOptions, RendererComponent, Section, StyleAttribute, Sup, SupOptions, Table, TableCell, TableHeader, TableOptions, TableRow, processStylesForUnlink };
|
|
5
|
+
//#region src/email-editor/email-editor.d.ts
|
|
6
|
+
interface EmailEditorRef {
|
|
7
|
+
export: () => Promise<{
|
|
8
|
+
html: string;
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
getJSON: () => JSONContent;
|
|
12
|
+
getHTML: () => string;
|
|
13
|
+
editor: Editor | null;
|
|
14
|
+
}
|
|
15
|
+
interface EmailEditorProps {
|
|
16
|
+
content?: Content;
|
|
17
|
+
onChange?: (editor: Editor) => void;
|
|
18
|
+
onUploadImage?: UploadImageHandler;
|
|
19
|
+
onReady?: (editor: Editor) => void;
|
|
20
|
+
theme?: 'basic' | 'minimal';
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
bubbleMenu?: {
|
|
24
|
+
hideWhenActiveNodes?: string[];
|
|
25
|
+
hideWhenActiveMarks?: string[];
|
|
26
|
+
};
|
|
27
|
+
extensions?: Extensions;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
declare const EmailEditor: react20.ForwardRefExoticComponent<EmailEditorProps & react20.RefAttributes<EmailEditorRef>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { EmailEditor, type EmailEditorProps, type EmailEditorRef };
|
|
279
33
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/email-editor/email-editor.tsx"],"sourcesContent":[],"mappings":";;;;;UAuBiB,cAAA;gBACD;IADC,IAAA,EAAA,MAAA;IACD,IAAA,EAAA,MAAA;EACC,CAAA,CAAA;EAEP,OAAA,EAAA,GAAA,GAFO,WAEP;EAAM,OAAA,EAAA,GAAA,GAAA,MAAA;EAGC,MAAA,EAHP,MAGO,GAAA,IAAgB;;AAEX,UAFL,gBAAA,CAEK;EACJ,OAAA,CAAA,EAFN,OAEM;EACG,QAAA,CAAA,EAAA,CAAA,MAAA,EAFC,MAED,EAAA,GAAA,IAAA;EAQN,aAAA,CAAA,EATG,kBASH;EAAU,OAAA,CAAA,EAAA,CAAA,MAAA,EARJ,MAQI,EAAA,GAAA,IAAA;EA0BZ,KAAA,CAAA,EAAA,OAmEZ,GAAA,SAAA;EAnEuB,QAAA,CAAA,EAAA,OAAA;EAAA,WAAA,CAAA,EAAA,MAAA;EAAA,UAAA,CAAA,EAAA;IAAA,mBAAA,CAAA,EAAA,MAAA,EAAA;IAAA,mBAAA,CAAA,EAAA,MAAA,EAAA;;eA1BT;;;cA0BF,aAAW,OAAA,CAAA,0BAAA,mBAAA,OAAA,CAAA,cAAA"}
|