@maily-to/core 2.0.0-beta.13 → 2.0.0-beta.15
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/blocks/index.cjs +1 -1
- package/dist/extensions/index.cjs +46 -15
- package/dist/extensions/index.mjs +1 -1
- package/dist/index.cjs +8137 -2944
- package/dist/index.mjs +1 -1
- package/dist/{use-maily-editor-CByaDhmT.cjs → use-maily-editor-BUx2DA-B.cjs} +6 -2
- package/dist/{use-maily-editor-Atvy2kSO.cjs → use-maily-editor-CSK-D87G.cjs} +6 -2
- package/dist/{use-maily-editor-idL0RNsG.mjs → use-maily-editor-Dus8ORG0.mjs} +6 -2
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Tooltip, A as ProtectVariableTrigger, B as MIN_SPACER_HEIGHT, F as addColumn, H as SPACING_PRESETS, I as getColumnWidths, K as filterVariableSuggestions, L as removeColumn, R as updateColumnWidth, U as VariableExtension, V as SPACER_SPACING, W as getVariableSuggestions, X as getNodeTheme, Y as getNodeStyleState, Z as getShellNodes, at as FLOATING_ELEMENT_HEIGHT, ct as clearInitialNodeSelection, dt as useOnSelectionUpdate, et as TooltipArrow, ft as useFloatingStore, g as VisuallyHidden, ht as useValueAsRef, i as mergeExtensions, it as TooltipTrigger, j as VISIBILITY_SUPPORTED_TYPES, lt as FLOATING_ELEMENT_IDS, mt as ArrowIcon, n as useMailyEditor, nt as TooltipPositioner, ot as FLOATING_ELEMENT_PADDING, pt as useEditorInstance, q as Document, r as getNormalizedHtml, rt as TooltipProvider, st as FloatingElement, t as DEFAULT_EXTENSIONS, tt as TooltipPopup, ut as FLOATING_ELEMENT_ORDER, z as MAX_SPACER_HEIGHT } from "./use-maily-editor-
|
|
1
|
+
import { $ as Tooltip, A as ProtectVariableTrigger, B as MIN_SPACER_HEIGHT, F as addColumn, H as SPACING_PRESETS, I as getColumnWidths, K as filterVariableSuggestions, L as removeColumn, R as updateColumnWidth, U as VariableExtension, V as SPACER_SPACING, W as getVariableSuggestions, X as getNodeTheme, Y as getNodeStyleState, Z as getShellNodes, at as FLOATING_ELEMENT_HEIGHT, ct as clearInitialNodeSelection, dt as useOnSelectionUpdate, et as TooltipArrow, ft as useFloatingStore, g as VisuallyHidden, ht as useValueAsRef, i as mergeExtensions, it as TooltipTrigger, j as VISIBILITY_SUPPORTED_TYPES, lt as FLOATING_ELEMENT_IDS, mt as ArrowIcon, n as useMailyEditor, nt as TooltipPositioner, ot as FLOATING_ELEMENT_PADDING, pt as useEditorInstance, q as Document, r as getNormalizedHtml, rt as TooltipProvider, st as FloatingElement, t as DEFAULT_EXTENSIONS, tt as TooltipPopup, ut as FLOATING_ELEMENT_ORDER, z as MAX_SPACER_HEIGHT } from "./use-maily-editor-Dus8ORG0.mjs";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { ColorPicker as ColorPicker$1 } from "cromia";
|
|
4
4
|
import { Fragment, createContext, forwardRef, use, useCallback, useEffect, useId, useImperativeHandle, useRef, useState } from "react";
|
|
@@ -474,9 +474,13 @@ const FloatingElement = (0, react.forwardRef)((props, ref) => {
|
|
|
474
474
|
t11 = () => {
|
|
475
475
|
const preventShow = preventShowRef.current;
|
|
476
476
|
const rect = getCurrentSelectionRect(editor);
|
|
477
|
+
const reference = {
|
|
478
|
+
contextElement: editor.view.dom,
|
|
479
|
+
getBoundingClientRect: () => getCurrentSelectionRect(editor) ?? rect
|
|
480
|
+
};
|
|
477
481
|
if (rect && defaultOpen !== void 0 && !preventShow) {
|
|
478
482
|
setIsOpen(defaultOpen);
|
|
479
|
-
refs.setReference(
|
|
483
|
+
refs.setReference(reference);
|
|
480
484
|
return;
|
|
481
485
|
}
|
|
482
486
|
if (!isValidSelection(editor, NOT_ALLOWED_NODES) || preventShow || !editor.isEditable) {
|
|
@@ -484,7 +488,7 @@ const FloatingElement = (0, react.forwardRef)((props, ref) => {
|
|
|
484
488
|
return;
|
|
485
489
|
}
|
|
486
490
|
setIsOpen(true);
|
|
487
|
-
refs.setReference(
|
|
491
|
+
refs.setReference(reference);
|
|
488
492
|
};
|
|
489
493
|
$[24] = defaultOpen;
|
|
490
494
|
$[25] = editor;
|
|
@@ -363,9 +363,13 @@ const FloatingElement = (0, react.forwardRef)((props, ref) => {
|
|
|
363
363
|
const handleSelectionChange = (0, react.useCallback)(() => {
|
|
364
364
|
const preventShow = preventShowRef.current;
|
|
365
365
|
const rect = getCurrentSelectionRect(editor);
|
|
366
|
+
const reference = {
|
|
367
|
+
contextElement: editor.view.dom,
|
|
368
|
+
getBoundingClientRect: () => getCurrentSelectionRect(editor) ?? rect
|
|
369
|
+
};
|
|
366
370
|
if (rect && defaultOpen !== void 0 && !preventShow) {
|
|
367
371
|
setIsOpen(defaultOpen);
|
|
368
|
-
refs.setReference(
|
|
372
|
+
refs.setReference(reference);
|
|
369
373
|
return;
|
|
370
374
|
}
|
|
371
375
|
if (!isValidSelection(editor, NOT_ALLOWED_NODES) || preventShow || !editor.isEditable) {
|
|
@@ -373,7 +377,7 @@ const FloatingElement = (0, react.forwardRef)((props, ref) => {
|
|
|
373
377
|
return;
|
|
374
378
|
}
|
|
375
379
|
setIsOpen(true);
|
|
376
|
-
refs.setReference(
|
|
380
|
+
refs.setReference(reference);
|
|
377
381
|
}, [
|
|
378
382
|
defaultOpen,
|
|
379
383
|
editor,
|
|
@@ -442,9 +442,13 @@ const FloatingElement = forwardRef((props, ref) => {
|
|
|
442
442
|
t11 = () => {
|
|
443
443
|
const preventShow = preventShowRef.current;
|
|
444
444
|
const rect = getCurrentSelectionRect(editor);
|
|
445
|
+
const reference = {
|
|
446
|
+
contextElement: editor.view.dom,
|
|
447
|
+
getBoundingClientRect: () => getCurrentSelectionRect(editor) ?? rect
|
|
448
|
+
};
|
|
445
449
|
if (rect && defaultOpen !== void 0 && !preventShow) {
|
|
446
450
|
setIsOpen(defaultOpen);
|
|
447
|
-
refs.setReference(
|
|
451
|
+
refs.setReference(reference);
|
|
448
452
|
return;
|
|
449
453
|
}
|
|
450
454
|
if (!isValidSelection(editor, NOT_ALLOWED_NODES) || preventShow || !editor.isEditable) {
|
|
@@ -452,7 +456,7 @@ const FloatingElement = forwardRef((props, ref) => {
|
|
|
452
456
|
return;
|
|
453
457
|
}
|
|
454
458
|
setIsOpen(true);
|
|
455
|
-
refs.setReference(
|
|
459
|
+
refs.setReference(reference);
|
|
456
460
|
};
|
|
457
461
|
$[24] = defaultOpen;
|
|
458
462
|
$[25] = editor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maily-to/core",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Powerful editor for creating beautiful, pre-designed, mobile-ready emails.",
|
|
6
6
|
"keywords": [
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"lucide-react": "^1.28.0",
|
|
88
88
|
"unit-field": "^0.0.3",
|
|
89
89
|
"zustand": "^5.0.14",
|
|
90
|
-
"@maily-to/shared": "2.0.0-beta.
|
|
90
|
+
"@maily-to/shared": "2.0.0-beta.15"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@react-email/components": "^1.0.12",
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
"vite-plus": "0.3.0",
|
|
109
109
|
"yjs": "^13.6.33",
|
|
110
110
|
"@maily-to/extension-ai-actions": "0.0.1",
|
|
111
|
-
"@maily-to/extension-inline-suggestion": "0.0.1",
|
|
112
111
|
"@maily-to/extension-variable": "0.0.1",
|
|
113
|
-
"@maily-to/
|
|
112
|
+
"@maily-to/extension-inline-suggestion": "0.0.1",
|
|
113
|
+
"@maily-to/render": "2.0.0-beta.15",
|
|
114
114
|
"@maily-to/tsconfig": "0.0.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|