sunrize 2.6.0 → 2.6.2

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.6.0",
4
+ "version": "2.6.2",
5
5
  "description": "Sunrize — A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -8,7 +8,6 @@ const
8
8
  fs = require ("fs"),
9
9
  util = require ("util"),
10
10
  Registry = require ("./Registry"),
11
- Template = require ("./Template"),
12
11
  LocalStorage = require ("node-localstorage") .LocalStorage,
13
12
  DataStorage = require ("../Application/DataStorage"),
14
13
  _ = require ("../Application/GetText");
@@ -79,9 +78,6 @@ module .exports = class Application
79
78
  size: [1100, 680],
80
79
  });
81
80
 
82
- Template .create (path .join (__dirname, "../assets/themes/media-template.css"));
83
- Template .create (path .join (__dirname, "../assets/themes/prompt-template.css"));
84
-
85
81
  this .setup ();
86
82
  }
87
83
 
@@ -1234,7 +1230,6 @@ module .exports = class Application
1234
1230
 
1235
1231
  quit ()
1236
1232
  {
1237
- Template .removeAll ();
1238
1233
  electron .app .quit ();
1239
1234
  }
1240
1235
  };
@@ -1,5 +1,12 @@
1
- @import url(file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/jquery-ui-dist/jquery-ui.min.css);
2
- @import url(file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/qtip2/dist/jquery.qtip.min.css);
3
- @import url(file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/spectrum-colorpicker2/dist/spectrum.css);
4
- @import url(file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/material-symbols/index.css);
5
- @import url(file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/@vscode/codicons/dist/codicon.css);
1
+ @import url(../../../node_modules/jquery-ui-dist/jquery-ui.min.css);
2
+ @import url(../../../node_modules/qtip2/dist/jquery.qtip.min.css);
3
+ @import url(../../../node_modules/spectrum-colorpicker2/dist/spectrum.css);
4
+ @import url(../../../node_modules/material-symbols/index.css);
5
+ @import url(../../../node_modules/@vscode/codicons/dist/codicon.css);
6
+
7
+ /* npx */
8
+ @import url(../../../../jquery-ui-dist/jquery-ui.min.css);
9
+ @import url(../../../../qtip2/dist/jquery.qtip.min.css);
10
+ @import url(../../../../spectrum-colorpicker2/dist/spectrum.css);
11
+ @import url(../../../../material-symbols/index.css);
12
+ @import url(../../../../@vscode/codicons/dist/codicon.css);
@@ -1,6 +1,10 @@
1
1
  @charset "utf-8";
2
- @import url(file:///Users/holger/Desktop/X_ITE/sunrize/src/assets/themes/fonts.css);
3
- @import url(file:///Users/holger/Desktop/X_ITE/sunrize/src/assets/themes/definitions.css);
2
+ @import url(../../../../src/assets/themes/fonts.css);
3
+ @import url(../../../../src/assets/themes/definitions.css);
4
+
5
+ /* npx */
6
+ @import url(../../../sunrize/src/assets/themes/fonts.css);
7
+ @import url(../../../sunrize/src/assets/themes/definitions.css);
4
8
 
5
9
  body {
6
10
  overflow: hidden !important;
@@ -1,78 +0,0 @@
1
- "use strict";
2
-
3
- const
4
- fs = require ("fs"),
5
- path = require ("path"),
6
- url = require ("url");
7
-
8
- class Template
9
- {
10
- static #templates = new Set ();
11
- static #stats = new Map ();
12
-
13
- static create (template)
14
- {
15
- const
16
- filename = this .filename (template),
17
- dirname = path .dirname (template),
18
- stats = fs .statSync (dirname);
19
-
20
- this .#templates .add (template);
21
- this .#stats .set (dirname, stats);
22
-
23
- const file = fs .readFileSync (template)
24
- .toString ()
25
- .replace (/(url\()(.*?)(\))/sg, (... args) => this .resolve (template, ... args))
26
- .replace (/(href=")(.*?)(")/sg, (... args) => this .resolve (template, ... args));
27
-
28
- fs .writeFileSync (filename, file);
29
- fs .utimesSync (dirname, stats .atime, stats .mtime);
30
-
31
- return filename;
32
- }
33
-
34
- static removeAll ()
35
- {
36
- for (const template of new Set (this .#templates))
37
- this .remove (template);
38
- }
39
-
40
- static remove (template)
41
- {
42
- const
43
- dirname = path .dirname (template),
44
- stats = this .#stats .get (dirname);
45
-
46
- fs .unlinkSync (this .filename (template));
47
- fs .utimesSync (dirname, stats .atime, stats .mtime);
48
-
49
- this .#templates .delete (template);
50
- }
51
-
52
- static filename (template)
53
- {
54
- const
55
- dirname = path .dirname (template),
56
- basename = path .basename (template),
57
- filename = path .resolve (dirname, basename .replace (/-template/, ""));
58
-
59
- return filename;
60
- }
61
-
62
- static resolve (template, all, begin, filename, end)
63
- {
64
- const match = filename .match (/^.*?\/node_modules\/(.*?)$/);
65
-
66
- if (match)
67
- return begin + url .pathToFileURL (require .resolve (match [1])) + end;
68
-
69
- const resolved = new URL (filename, url .pathToFileURL (template));
70
-
71
- if (resolved .protocol === "file:")
72
- return begin + resolved + end;
73
-
74
- return all;
75
- }
76
- }
77
-
78
- module .exports = Template;
@@ -1,5 +0,0 @@
1
- @import url(../../node_modules/jquery-ui-dist/jquery-ui.min.css);
2
- @import url(../../node_modules/qtip2/dist/jquery.qtip.min.css);
3
- @import url(../../node_modules/spectrum-colorpicker2/dist/spectrum.css);
4
- @import url(../../node_modules/material-symbols/index.css);
5
- @import url(../../node_modules/@vscode/codicons/dist/codicon.css);
@@ -1,60 +0,0 @@
1
- @charset "utf-8";
2
- @import url(fonts.css);
3
- @import url(definitions.css);
4
-
5
- body {
6
- overflow: hidden !important;
7
- background-color: var(--background-color);
8
- color: var(--text-color);
9
- font-family: var(--sans-serif);
10
- }
11
-
12
- #container {
13
- overflow: hidden !important;
14
- }
15
-
16
- ::placeholder {
17
- color: var(--system-gray2);
18
- }
19
-
20
- ::selection {
21
- color: var(--system-gray0);
22
- background: var(--system-gray4);
23
- }
24
-
25
- :focus {
26
- outline: none;
27
- }
28
-
29
- #label {
30
- font-size: 80% !important;
31
- }
32
-
33
- input {
34
- border: 1px solid var(--system-gray3) !important;
35
- background: none !important;
36
- color: var(--text-color) !important;
37
- font-family: var(--sans-serif) !important;
38
- }
39
-
40
- input:focus {
41
- border-color: var(--accent-color) !important;
42
- }
43
-
44
- #ok {
45
- background-color: var(--accent-color) !important;
46
- }
47
-
48
- #cancel {
49
- border: 1px solid var(--system-gray3) !important;
50
- background-color: transparent !important;
51
- color: var(--text-color) !important;
52
- }
53
-
54
- #buttons > button,
55
- #buttons > input[type=submit] {
56
- border-radius: 7px !important;
57
- padding: 0.3em 1.8em !important;
58
- width: 100px !important;
59
- font-family: var(--sans-serif) !important;
60
- }