@maily-to/core 2.0.0-beta.16 → 2.0.0-beta.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.cjs +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -4822,8 +4822,14 @@ function DragContextMenu(props) {
|
|
|
4822
4822
|
setIsVisibilityOpen(false);
|
|
4823
4823
|
onOpenChange(nextOpen);
|
|
4824
4824
|
};
|
|
4825
|
+
const isKeyboardOnTriggerRef = (0, react.useRef)(false);
|
|
4825
4826
|
const getInitialFocus = (openType) => {
|
|
4826
|
-
|
|
4827
|
+
const isShortcut = openSourceRef.current === "shortcut";
|
|
4828
|
+
isKeyboardOnTriggerRef.current = !isShortcut && openType === "keyboard";
|
|
4829
|
+
return isShortcut || openType === "keyboard";
|
|
4830
|
+
};
|
|
4831
|
+
const getFinalFocus = () => {
|
|
4832
|
+
return isKeyboardOnTriggerRef.current || editor.view.dom;
|
|
4827
4833
|
};
|
|
4828
4834
|
const handleItemsKeyDown = (event) => {
|
|
4829
4835
|
if (!NAVIGATION_KEYS.includes(event.key)) return;
|
|
@@ -5039,6 +5045,7 @@ function DragContextMenu(props) {
|
|
|
5039
5045
|
side: "bottom",
|
|
5040
5046
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PopoverPopup, {
|
|
5041
5047
|
"data-variant": "drag-context",
|
|
5048
|
+
finalFocus: getFinalFocus,
|
|
5042
5049
|
initialFocus: getInitialFocus,
|
|
5043
5050
|
children: [
|
|
5044
5051
|
isFontStyleOpen && nodeType ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FontStyleConfig, {
|
package/dist/index.mjs
CHANGED
|
@@ -4833,8 +4833,14 @@ function DragContextMenu(props) {
|
|
|
4833
4833
|
setIsVisibilityOpen(false);
|
|
4834
4834
|
onOpenChange(nextOpen);
|
|
4835
4835
|
};
|
|
4836
|
+
const isKeyboardOnTriggerRef = useRef(false);
|
|
4836
4837
|
const getInitialFocus = (openType) => {
|
|
4837
|
-
|
|
4838
|
+
const isShortcut = openSourceRef.current === "shortcut";
|
|
4839
|
+
isKeyboardOnTriggerRef.current = !isShortcut && openType === "keyboard";
|
|
4840
|
+
return isShortcut || openType === "keyboard";
|
|
4841
|
+
};
|
|
4842
|
+
const getFinalFocus = () => {
|
|
4843
|
+
return isKeyboardOnTriggerRef.current || editor.view.dom;
|
|
4838
4844
|
};
|
|
4839
4845
|
const handleItemsKeyDown = (event) => {
|
|
4840
4846
|
if (!NAVIGATION_KEYS.includes(event.key)) return;
|
|
@@ -5050,6 +5056,7 @@ function DragContextMenu(props) {
|
|
|
5050
5056
|
side: "bottom",
|
|
5051
5057
|
children: /* @__PURE__ */ jsxs(PopoverPopup, {
|
|
5052
5058
|
"data-variant": "drag-context",
|
|
5059
|
+
finalFocus: getFinalFocus,
|
|
5053
5060
|
initialFocus: getInitialFocus,
|
|
5054
5061
|
children: [
|
|
5055
5062
|
isFontStyleOpen && nodeType ? /* @__PURE__ */ jsx(FontStyleConfig, {
|
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.18",
|
|
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.18"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@react-email/components": "^1.0.12",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
"typescript": "^7.0.2",
|
|
108
108
|
"vite-plus": "0.3.0",
|
|
109
109
|
"yjs": "^13.6.33",
|
|
110
|
+
"@maily-to/extension-ai-actions": "0.0.1",
|
|
110
111
|
"@maily-to/extension-inline-suggestion": "0.0.1",
|
|
111
112
|
"@maily-to/extension-variable": "0.0.1",
|
|
112
|
-
"@maily-to/
|
|
113
|
-
"@maily-to/render": "2.0.0-beta.16",
|
|
113
|
+
"@maily-to/render": "2.0.0-beta.18",
|
|
114
114
|
"@maily-to/tsconfig": "0.0.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|