@uniformdev/mesh-sdk-react 20.75.1-alpha.0 → 20.75.1-alpha.16
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.js +2 -2
- package/dist/index.mjs +3 -3
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -804,7 +804,8 @@ declare function serializeVariablesEditorSerializedState(serializedEditorState:
|
|
|
804
804
|
*
|
|
805
805
|
* If newValue is undefined, the editor will be set to an empty state.
|
|
806
806
|
* If newValue is a string, it will be treated as a variable-reference-containing string, and parsed to a Lexical AST
|
|
807
|
-
* If newValue is a serialized Lexical AST,
|
|
807
|
+
* If newValue is a serialized Lexical AST, omitted Lexical defaults are restored before parse.
|
|
808
|
+
* If the AST is invalid, the editor will be set to an empty state.
|
|
808
809
|
*/
|
|
809
810
|
declare function setVariablesEditorValue(editor: LexicalEditor, newValue: string | undefined | null | SerializedEditorState<SerializedLexicalNode>, tag?: string): void;
|
|
810
811
|
|
package/dist/index.d.ts
CHANGED
|
@@ -804,7 +804,8 @@ declare function serializeVariablesEditorSerializedState(serializedEditorState:
|
|
|
804
804
|
*
|
|
805
805
|
* If newValue is undefined, the editor will be set to an empty state.
|
|
806
806
|
* If newValue is a string, it will be treated as a variable-reference-containing string, and parsed to a Lexical AST
|
|
807
|
-
* If newValue is a serialized Lexical AST,
|
|
807
|
+
* If newValue is a serialized Lexical AST, omitted Lexical defaults are restored before parse.
|
|
808
|
+
* If the AST is invalid, the editor will be set to an empty state.
|
|
808
809
|
*/
|
|
809
810
|
declare function setVariablesEditorValue(editor: LexicalEditor, newValue: string | undefined | null | SerializedEditorState<SerializedLexicalNode>, tag?: string): void;
|
|
810
811
|
|
package/dist/index.esm.js
CHANGED
|
@@ -504,7 +504,7 @@ function serializeRecursive(node, buffer) {
|
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
// src/components/Variables/util/setVariablesEditorValue.ts
|
|
507
|
-
import { emptyRichTextValue } from "@uniformdev/richtext";
|
|
507
|
+
import { emptyRichTextValue, rehydrateDefaultRichTextProperties } from "@uniformdev/richtext";
|
|
508
508
|
|
|
509
509
|
// src/components/Variables/util/deserializeVariablesEditorState.ts
|
|
510
510
|
import { parseVariableExpression } from "@uniformdev/canvas";
|
|
@@ -576,7 +576,7 @@ function setVariablesEditorValue(editor, newValue, tag) {
|
|
|
576
576
|
});
|
|
577
577
|
} else {
|
|
578
578
|
try {
|
|
579
|
-
const parsedState = editor.parseEditorState(newValue);
|
|
579
|
+
const parsedState = editor.parseEditorState(rehydrateDefaultRichTextProperties(newValue));
|
|
580
580
|
editor.setEditorState(parsedState.clone(null), {
|
|
581
581
|
tag
|
|
582
582
|
});
|
|
@@ -1907,7 +1907,7 @@ function PasteTransformerPlugin({ transformPaste }) {
|
|
|
1907
1907
|
(event) => {
|
|
1908
1908
|
var _a;
|
|
1909
1909
|
const selection = $getSelection3();
|
|
1910
|
-
const pastedText = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain");
|
|
1910
|
+
const pastedText = event instanceof ClipboardEvent ? (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain") : void 0;
|
|
1911
1911
|
if (pastedText && transformPaste && $isRangeSelection2(selection)) {
|
|
1912
1912
|
const result = transformPaste(pastedText);
|
|
1913
1913
|
if (result !== void 0) {
|
package/dist/index.js
CHANGED
|
@@ -759,7 +759,7 @@ function setVariablesEditorValue(editor, newValue, tag) {
|
|
|
759
759
|
});
|
|
760
760
|
} else {
|
|
761
761
|
try {
|
|
762
|
-
const parsedState = editor.parseEditorState(newValue);
|
|
762
|
+
const parsedState = editor.parseEditorState((0, import_richtext.rehydrateDefaultRichTextProperties)(newValue));
|
|
763
763
|
editor.setEditorState(parsedState.clone(null), {
|
|
764
764
|
tag
|
|
765
765
|
});
|
|
@@ -2054,7 +2054,7 @@ function PasteTransformerPlugin({ transformPaste }) {
|
|
|
2054
2054
|
(event) => {
|
|
2055
2055
|
var _a;
|
|
2056
2056
|
const selection = (0, import_lexical6.$getSelection)();
|
|
2057
|
-
const pastedText = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain");
|
|
2057
|
+
const pastedText = event instanceof ClipboardEvent ? (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain") : void 0;
|
|
2058
2058
|
if (pastedText && transformPaste && (0, import_lexical6.$isRangeSelection)(selection)) {
|
|
2059
2059
|
const result = transformPaste(pastedText);
|
|
2060
2060
|
if (result !== void 0) {
|
package/dist/index.mjs
CHANGED
|
@@ -504,7 +504,7 @@ function serializeRecursive(node, buffer) {
|
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
// src/components/Variables/util/setVariablesEditorValue.ts
|
|
507
|
-
import { emptyRichTextValue } from "@uniformdev/richtext";
|
|
507
|
+
import { emptyRichTextValue, rehydrateDefaultRichTextProperties } from "@uniformdev/richtext";
|
|
508
508
|
|
|
509
509
|
// src/components/Variables/util/deserializeVariablesEditorState.ts
|
|
510
510
|
import { parseVariableExpression } from "@uniformdev/canvas";
|
|
@@ -576,7 +576,7 @@ function setVariablesEditorValue(editor, newValue, tag) {
|
|
|
576
576
|
});
|
|
577
577
|
} else {
|
|
578
578
|
try {
|
|
579
|
-
const parsedState = editor.parseEditorState(newValue);
|
|
579
|
+
const parsedState = editor.parseEditorState(rehydrateDefaultRichTextProperties(newValue));
|
|
580
580
|
editor.setEditorState(parsedState.clone(null), {
|
|
581
581
|
tag
|
|
582
582
|
});
|
|
@@ -1907,7 +1907,7 @@ function PasteTransformerPlugin({ transformPaste }) {
|
|
|
1907
1907
|
(event) => {
|
|
1908
1908
|
var _a;
|
|
1909
1909
|
const selection = $getSelection3();
|
|
1910
|
-
const pastedText = (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain");
|
|
1910
|
+
const pastedText = event instanceof ClipboardEvent ? (_a = event.clipboardData) == null ? void 0 : _a.getData("text/plain") : void 0;
|
|
1911
1911
|
if (pastedText && transformPaste && $isRangeSelection2(selection)) {
|
|
1912
1912
|
const result = transformPaste(pastedText);
|
|
1913
1913
|
if (result !== void 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "20.75.1-alpha.
|
|
3
|
+
"version": "20.75.1-alpha.16+4e56d1cd21",
|
|
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
|
"dependencies": {
|
|
46
46
|
"@hello-pangea/dnd": "18.0.1",
|
|
47
47
|
"@hookform/resolvers": "^5.4.0",
|
|
48
|
-
"@lexical/clipboard": "0.
|
|
49
|
-
"@lexical/react": "0.
|
|
50
|
-
"@lexical/selection": "0.
|
|
51
|
-
"@lexical/utils": "0.
|
|
48
|
+
"@lexical/clipboard": "0.49.0",
|
|
49
|
+
"@lexical/react": "0.49.0",
|
|
50
|
+
"@lexical/selection": "0.49.0",
|
|
51
|
+
"@lexical/utils": "0.49.0",
|
|
52
52
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.5.0/react-icons-all-files-5.5.0.tgz",
|
|
53
|
-
"@uniformdev/canvas": "20.75.1-alpha.
|
|
54
|
-
"@uniformdev/design-system": "20.75.1-alpha.
|
|
55
|
-
"@uniformdev/mesh-sdk": "20.75.1-alpha.
|
|
56
|
-
"@uniformdev/richtext": "20.75.1-alpha.
|
|
53
|
+
"@uniformdev/canvas": "20.75.1-alpha.16+4e56d1cd21",
|
|
54
|
+
"@uniformdev/design-system": "20.75.1-alpha.16+4e56d1cd21",
|
|
55
|
+
"@uniformdev/mesh-sdk": "20.75.1-alpha.16+4e56d1cd21",
|
|
56
|
+
"@uniformdev/richtext": "20.75.1-alpha.16+4e56d1cd21",
|
|
57
57
|
"dequal": "^2.0.3",
|
|
58
|
-
"lexical": "0.
|
|
58
|
+
"lexical": "0.49.0",
|
|
59
59
|
"mitt": "3.0.1",
|
|
60
60
|
"react-hook-form": "7.80.0",
|
|
61
61
|
"react-use": "17.6.1",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "4e56d1cd21f2d4a02b13d733e51fb71441cac298"
|
|
89
89
|
}
|