sunrize 2.1.13 → 2.1.14
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.14",
|
|
5
5
|
"description": "Sunrize — A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@electron-forge/maker-zip": "^7.11.2",
|
|
92
92
|
"@electron-forge/publisher-github": "^7.11.2",
|
|
93
93
|
"@eslint/js": "^10.0.1",
|
|
94
|
-
"eslint": "^10.
|
|
94
|
+
"eslint": "^10.7.0",
|
|
95
95
|
"globals": "^17.7.0",
|
|
96
96
|
"shell-tools": "^1.1.9"
|
|
97
97
|
},
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@vscode/codicons": "^0.0.45",
|
|
100
100
|
"capitalize": "^2.0.4",
|
|
101
101
|
"console": "^0.7.2",
|
|
102
|
-
"electron": "^43.1.
|
|
102
|
+
"electron": "^43.1.1",
|
|
103
103
|
"electron-prompt": "^1.7.0",
|
|
104
104
|
"electron-squirrel-startup": "^1.0.1",
|
|
105
105
|
"electron-tabs": "^1.0.4",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"jquery-ui-dist": "^1.13.3",
|
|
109
109
|
"jstree": "^3.3.17",
|
|
110
110
|
"material-icons": "^1.13.14",
|
|
111
|
-
"material-symbols": "^0.45.
|
|
111
|
+
"material-symbols": "^0.45.8",
|
|
112
112
|
"md5": "^2.3.0",
|
|
113
113
|
"mime-types": "^3.0.2",
|
|
114
114
|
"monaco-editor": "^0.55.1",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"string-similarity": "^4.0.4",
|
|
119
119
|
"tweakpane": "^4.0.5",
|
|
120
120
|
"update-electron-app": "^3.3.0",
|
|
121
|
-
"x_ite": "^
|
|
121
|
+
"x_ite": "^16.0.0",
|
|
122
122
|
"x_ite-off-parser": "^1.2.4",
|
|
123
|
-
"x_ite-sog-parser": "^2.0.
|
|
123
|
+
"x_ite-sog-parser": "^2.0.1",
|
|
124
124
|
"x_ite-spz-parser": "^2.0.0",
|
|
125
125
|
"x3d-traverse": "^2.0.1"
|
|
126
126
|
},
|
package/src/Undo/Editor.js
CHANGED
|
@@ -18,10 +18,12 @@ module .exports = class Editor
|
|
|
18
18
|
*/
|
|
19
19
|
static get undoManager () { return UndoManager .shared; }
|
|
20
20
|
|
|
21
|
+
/* eslint-disable no-control-regex */
|
|
21
22
|
/**
|
|
22
23
|
* X3D Id
|
|
23
24
|
*/
|
|
24
25
|
static Id = /(?:^[^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*$|^$)/;
|
|
26
|
+
/* eslint-enable no-control-regex */
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
*
|
|
@@ -2203,25 +2205,29 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2203
2205
|
|
|
2204
2206
|
this .updateInstances (proto, undoManager);
|
|
2205
2207
|
}
|
|
2206
|
-
else
|
|
2208
|
+
else // Script node
|
|
2207
2209
|
{
|
|
2208
|
-
const
|
|
2209
|
-
references = Array .from (field .getReferences ()),
|
|
2210
|
-
inputRoutes = Array .from (field .getInputRoutes ()),
|
|
2211
|
-
outputRoutes = Array .from (field .getOutputRoutes ());
|
|
2212
|
-
|
|
2213
2210
|
// Remove References.
|
|
2214
2211
|
|
|
2215
|
-
|
|
2212
|
+
const proto = executionContext .getOuterNode ();
|
|
2213
|
+
|
|
2214
|
+
if (proto instanceof X3D .X3DProtoDeclaration)
|
|
2216
2215
|
{
|
|
2217
|
-
|
|
2218
|
-
|
|
2216
|
+
const references = Array .from (field .getReferences ());
|
|
2217
|
+
|
|
2218
|
+
for (const reference of references)
|
|
2219
|
+
{
|
|
2220
|
+
if (!reference .isReference (field .getAccessType ()))
|
|
2221
|
+
this .removeReference (proto, reference, node, field, undoManager);
|
|
2222
|
+
}
|
|
2219
2223
|
}
|
|
2220
2224
|
|
|
2221
2225
|
// Remove routes.
|
|
2222
2226
|
|
|
2223
2227
|
if (!field .isInput ())
|
|
2224
2228
|
{
|
|
2229
|
+
const inputRoutes = Array .from (field .getInputRoutes ());
|
|
2230
|
+
|
|
2225
2231
|
for (const route of inputRoutes)
|
|
2226
2232
|
{
|
|
2227
2233
|
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
@@ -2230,6 +2236,8 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2230
2236
|
|
|
2231
2237
|
if (!field .isOutput ())
|
|
2232
2238
|
{
|
|
2239
|
+
const outputRoutes = Array .from (field .getOutputRoutes ());
|
|
2240
|
+
|
|
2233
2241
|
for (const route of outputRoutes)
|
|
2234
2242
|
{
|
|
2235
2243
|
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
@@ -3251,7 +3259,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
3251
3259
|
* @param {number} index
|
|
3252
3260
|
* @param {UndoManager} undoManager
|
|
3253
3261
|
*/
|
|
3254
|
-
static removeValueFromArray (executionContext, node, field, index, undoManager = UndoManager .shared
|
|
3262
|
+
static removeValueFromArray (executionContext, node, field, index, undoManager = UndoManager .shared)
|
|
3255
3263
|
{
|
|
3256
3264
|
node = node .valueOf ();
|
|
3257
3265
|
field = typeof field === "string" ? node .getField (field) : field;
|