@uniformdev/mesh-sdk-react 20.6.1-alpha.0 → 20.6.1
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.esm.js +8 -3
- package/dist/index.js +7 -1
- package/dist/index.mjs +8 -3
- package/package.json +11 -11
package/dist/index.esm.js
CHANGED
|
@@ -668,7 +668,7 @@ import {
|
|
|
668
668
|
LexicalTypeaheadMenuPlugin,
|
|
669
669
|
MenuOption
|
|
670
670
|
} from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
671
|
-
import { mergeRegister } from "@lexical/utils";
|
|
671
|
+
import { $dfs, mergeRegister } from "@lexical/utils";
|
|
672
672
|
import { AiFillPlusCircle } from "@react-icons/all-files/ai/AiFillPlusCircle";
|
|
673
673
|
import { createVariableReference as createVariableReference2 } from "@uniformdev/canvas";
|
|
674
674
|
import { HorizontalRhythm as HorizontalRhythm2, MenuGroup, MenuItemInner, MenuItemSeparator } from "@uniformdev/design-system";
|
|
@@ -681,7 +681,6 @@ import {
|
|
|
681
681
|
$getSelection,
|
|
682
682
|
$insertNodes,
|
|
683
683
|
$isNodeSelection,
|
|
684
|
-
$nodesOfType as $nodesOfType2,
|
|
685
684
|
$setSelection,
|
|
686
685
|
COMMAND_PRIORITY_NORMAL,
|
|
687
686
|
createCommand
|
|
@@ -1460,8 +1459,14 @@ function VariablesPlugin({
|
|
|
1460
1459
|
[canEditVariable]
|
|
1461
1460
|
);
|
|
1462
1461
|
useEffect4(() => {
|
|
1462
|
+
let selection;
|
|
1463
|
+
editor.read(() => {
|
|
1464
|
+
selection = $getSelection();
|
|
1465
|
+
});
|
|
1463
1466
|
editor.update(() => {
|
|
1464
|
-
|
|
1467
|
+
var _a;
|
|
1468
|
+
$setSelection((_a = selection == null ? void 0 : selection.clone()) != null ? _a : null);
|
|
1469
|
+
$dfs().filter(({ node }) => $isVariableNode(node)).forEach(({ node: variableNode }) => {
|
|
1465
1470
|
updateExistingNodeIfChanged(variableNode);
|
|
1466
1471
|
});
|
|
1467
1472
|
});
|
package/dist/index.js
CHANGED
|
@@ -1606,8 +1606,14 @@ function VariablesPlugin({
|
|
|
1606
1606
|
[canEditVariable]
|
|
1607
1607
|
);
|
|
1608
1608
|
(0, import_react15.useEffect)(() => {
|
|
1609
|
+
let selection;
|
|
1610
|
+
editor.read(() => {
|
|
1611
|
+
selection = (0, import_lexical4.$getSelection)();
|
|
1612
|
+
});
|
|
1609
1613
|
editor.update(() => {
|
|
1610
|
-
|
|
1614
|
+
var _a;
|
|
1615
|
+
(0, import_lexical4.$setSelection)((_a = selection == null ? void 0 : selection.clone()) != null ? _a : null);
|
|
1616
|
+
(0, import_utils.$dfs)().filter(({ node }) => $isVariableNode(node)).forEach(({ node: variableNode }) => {
|
|
1611
1617
|
updateExistingNodeIfChanged(variableNode);
|
|
1612
1618
|
});
|
|
1613
1619
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -668,7 +668,7 @@ import {
|
|
|
668
668
|
LexicalTypeaheadMenuPlugin,
|
|
669
669
|
MenuOption
|
|
670
670
|
} from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
671
|
-
import { mergeRegister } from "@lexical/utils";
|
|
671
|
+
import { $dfs, mergeRegister } from "@lexical/utils";
|
|
672
672
|
import { AiFillPlusCircle } from "@react-icons/all-files/ai/AiFillPlusCircle";
|
|
673
673
|
import { createVariableReference as createVariableReference2 } from "@uniformdev/canvas";
|
|
674
674
|
import { HorizontalRhythm as HorizontalRhythm2, MenuGroup, MenuItemInner, MenuItemSeparator } from "@uniformdev/design-system";
|
|
@@ -681,7 +681,6 @@ import {
|
|
|
681
681
|
$getSelection,
|
|
682
682
|
$insertNodes,
|
|
683
683
|
$isNodeSelection,
|
|
684
|
-
$nodesOfType as $nodesOfType2,
|
|
685
684
|
$setSelection,
|
|
686
685
|
COMMAND_PRIORITY_NORMAL,
|
|
687
686
|
createCommand
|
|
@@ -1460,8 +1459,14 @@ function VariablesPlugin({
|
|
|
1460
1459
|
[canEditVariable]
|
|
1461
1460
|
);
|
|
1462
1461
|
useEffect4(() => {
|
|
1462
|
+
let selection;
|
|
1463
|
+
editor.read(() => {
|
|
1464
|
+
selection = $getSelection();
|
|
1465
|
+
});
|
|
1463
1466
|
editor.update(() => {
|
|
1464
|
-
|
|
1467
|
+
var _a;
|
|
1468
|
+
$setSelection((_a = selection == null ? void 0 : selection.clone()) != null ? _a : null);
|
|
1469
|
+
$dfs().filter(({ node }) => $isVariableNode(node)).forEach(({ node: variableNode }) => {
|
|
1465
1470
|
updateExistingNodeIfChanged(variableNode);
|
|
1466
1471
|
});
|
|
1467
1472
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "20.6.1
|
|
3
|
+
"version": "20.6.1",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@hookform/resolvers": "^3.3.1",
|
|
48
|
-
"@lexical/clipboard": "0.
|
|
49
|
-
"@lexical/react": "0.
|
|
50
|
-
"@lexical/selection": "0.
|
|
51
|
-
"@lexical/utils": "0.
|
|
48
|
+
"@lexical/clipboard": "0.25.0",
|
|
49
|
+
"@lexical/react": "0.25.0",
|
|
50
|
+
"@lexical/selection": "0.25.0",
|
|
51
|
+
"@lexical/utils": "0.25.0",
|
|
52
52
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.2.1/react-icons-all-files-5.2.1.tgz",
|
|
53
|
-
"@uniformdev/canvas": "20.6.1
|
|
54
|
-
"@uniformdev/design-system": "20.6.1
|
|
55
|
-
"@uniformdev/mesh-sdk": "20.6.1
|
|
56
|
-
"@uniformdev/richtext": "20.6.1
|
|
53
|
+
"@uniformdev/canvas": "20.6.1",
|
|
54
|
+
"@uniformdev/design-system": "20.6.1",
|
|
55
|
+
"@uniformdev/mesh-sdk": "20.6.1",
|
|
56
|
+
"@uniformdev/richtext": "20.6.1",
|
|
57
57
|
"dequal": "^2.0.3",
|
|
58
|
-
"lexical": "0.
|
|
58
|
+
"lexical": "0.25.0",
|
|
59
59
|
"mitt": "3.0.1",
|
|
60
60
|
"react-beautiful-dnd": "13.1.1",
|
|
61
61
|
"react-hook-form": "^7.47.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "6416edea60b972d5b18ec052c401d1a39f8df667"
|
|
90
90
|
}
|