sunrize 2.6.1 → 2.6.3

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/README.md CHANGED
@@ -15,7 +15,7 @@ Sunrize is based on [X_ITE](https://create3000.github.io/x_ite/) and is a basic
15
15
 
16
16
  ## Installer Packages
17
17
 
18
- The latest builds of Sunrize are available as installer packages on the [Sunrize Releases](https://github.com/create3000/sunrize/releases) page on GitHub. From there, you can download precompiled binaries, but currently only for Windows.
18
+ The latest builds of Sunrize are available as installer packages on the [Sunrize releases](https://github.com/create3000/sunrize/releases) page on GitHub. From there, you can download precompiled binaries for Windows, macOS, and Linux.
19
19
 
20
20
  ## Run from Console
21
21
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "2.6.1",
4
+ "version": "2.6.3",
5
5
  "description": "Sunrize — A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -14,6 +14,7 @@
14
14
  ],
15
15
  "scripts": {
16
16
  "start": "electron .",
17
+ "start:linux": "electron . --ozone-platform=x11",
17
18
  "development": "SUNRISE_ENVIRONMENT=DEVELOPMENT electron .",
18
19
  "release": "node build/release.js",
19
20
  "X3DUOM": "sh build/X3DUOM.sh",
@@ -77,6 +78,10 @@
77
78
  "name": "John Carlson",
78
79
  "email": "yottzumm@gmail.com",
79
80
  "url": "https://github.com/coderextreme"
81
+ },
82
+ {
83
+ "name": "SpacingBat3",
84
+ "url": "https://github.com/SpacingBat3"
80
85
  }
81
86
  ],
82
87
  "funding": {
@@ -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");
@@ -66,6 +65,7 @@ module .exports = class Application
66
65
  };
67
66
 
68
67
  this .config .setDefaultValues ({
68
+ themeSource: "system",
69
69
  autoSave: true,
70
70
  browserUpdate: false,
71
71
  expandExternProtoDeclarations: true,
@@ -79,8 +79,7 @@ module .exports = class Application
79
79
  size: [1100, 680],
80
80
  });
81
81
 
82
- Template .create (path .join (__dirname, "../assets/themes/media-template.css"));
83
- Template .create (path .join (__dirname, "../assets/themes/prompt-template.css"));
82
+ electron .nativeTheme .themeSource = this .config .themeSource;
84
83
 
85
84
  this .setup ();
86
85
  }
@@ -604,6 +603,48 @@ module .exports = class Application
604
603
  accelerator: "CmdOrCtrl+J",
605
604
  click: () => this .mainWindow .webContents .send ("toggle-footer", !this .menuOptions .footer),
606
605
  },
606
+ { type: "separator" },
607
+ {
608
+ label: _("Theme"),
609
+ submenu: [
610
+ {
611
+ label: _("Light"),
612
+ type: "radio",
613
+ checked: this .config .themeSource === "light",
614
+ click: () =>
615
+ {
616
+ this .config .themeSource = "light";
617
+ electron .nativeTheme .themeSource = "light";
618
+
619
+ this .updateMenu ();
620
+ },
621
+ },
622
+ {
623
+ label: _("Dark"),
624
+ type: "radio",
625
+ checked: this .config .themeSource === "dark",
626
+ click: () =>
627
+ {
628
+ this .config .themeSource = "dark";
629
+ electron .nativeTheme .themeSource = "dark";
630
+
631
+ this .updateMenu ();
632
+ },
633
+ },
634
+ {
635
+ label: _("System"),
636
+ type: "radio",
637
+ checked: this .config .themeSource === "system",
638
+ click: () =>
639
+ {
640
+ this .config .themeSource = "system";
641
+ electron .nativeTheme .themeSource = "system";
642
+
643
+ this .updateMenu ();
644
+ },
645
+ },
646
+ ],
647
+ },
607
648
  ],
608
649
  },
609
650
  {
@@ -1234,7 +1275,6 @@ module .exports = class Application
1234
1275
 
1235
1276
  quit ()
1236
1277
  {
1237
- Template .removeAll ();
1238
1278
  electron .app .quit ();
1239
1279
  }
1240
1280
  };
@@ -195,7 +195,7 @@ module .exports = class Dashboard extends Interface
195
195
 
196
196
  if (value === 0)
197
197
  this .volumeButton .text ("volume_off");
198
- else if (value < 0.75)
198
+ else if (value < 0.5)
199
199
  this .volumeButton .text ("volume_down");
200
200
  else
201
201
  this .volumeButton .text ("volume_up");
@@ -220,6 +220,8 @@ module .exports = class Document extends Interface
220
220
 
221
221
  console .info (`Welcome to ${pkg .productName} v${pkg .version}.`);
222
222
 
223
+ this .checkReleases ();
224
+
223
225
  await this .restoreFile ();
224
226
 
225
227
  if (!this .isInitialScene)
@@ -457,6 +459,42 @@ module .exports = class Document extends Interface
457
459
  }
458
460
  }
459
461
 
462
+ async checkReleases ()
463
+ {
464
+ try
465
+ {
466
+ const
467
+ response = await fetch ("https://api.github.com/repos/create3000/sunrize/releases/latest"),
468
+ json = await response .json (),
469
+ pkg = require ("../../package.json");
470
+
471
+ if (json .name === `v${pkg .version}`)
472
+ return setTimeout (() => this .checkReleases (), 24 * 60 * 60 * 1_000);
473
+
474
+ let file;
475
+
476
+ switch (process .platform)
477
+ {
478
+ case "win32":
479
+ file = `Sunrize.X3D.Editor-${json .name .substring (1)}.Setup.exe`;
480
+ break;
481
+ case "darwin":
482
+ file = `Sunrize.X3D.Editor-darwin-arm64-${json .name .substring (1)}.zip`;
483
+ break;
484
+ default:
485
+ file = `Sunrize.X3D.Editor-${json .name .substring (1)}-x64.AppImage`;
486
+ break;
487
+ }
488
+
489
+ this .footer .console .addSplitter ();
490
+ this .footer .console .addMessage ("info", "", 0, `A new Sunrize version ${json .name} is now available on GitHub.`);
491
+ this .footer .console .addMessage ("info", "", 0, `Download new version: <a download href="https://github.com/create3000/sunrize/releases/download/${json .name}/${file}">${file}</a>`, true);
492
+ this .footer .console .addSplitter ();
493
+ }
494
+ catch
495
+ { }
496
+ }
497
+
460
498
  /*
461
499
  * File Menu
462
500
  */
@@ -17,7 +17,7 @@ module .exports = class Registry
17
17
  const
18
18
  exe = electron .app .getPath ("exe"),
19
19
  reg = fs .readFileSync (path .join (__dirname, "../assets/X3D.reg"), { encoding: "utf-8" }),
20
- tmp = path .join (__dirname, "../assets/X3D-tmp.reg");
20
+ tmp = path .join (electron .app .getAppPath ("temp"), "Sunrize-X3D.reg");
21
21
 
22
22
  const out = reg .replaceAll ("SUNRIZE_EXE", exe .replaceAll ("\\", "\\\\"));
23
23
 
@@ -20,7 +20,7 @@ module .exports = class Console extends Interface
20
20
  this .suspendConsole = false;
21
21
  this .historyIndex = 0;
22
22
  this .history = [ ];
23
- this .addMessageCallback = this .addMessage .bind (this);
23
+ this .addMessageCallback = (event, ... args) => this .addMessage (... args);
24
24
 
25
25
  this .left = $("<div></div>")
26
26
  .addClass ("console-left")
@@ -188,18 +188,22 @@ module .exports = class Console extends Interface
188
188
  "error",
189
189
  ];
190
190
 
191
- addMessage (event, level, sourceId, line, message)
191
+ addMessage (level, sourceId, line, message, html = false)
192
192
  {
193
193
  if (this .excludes .some (exclude => message .includes (exclude)))
194
194
  return;
195
195
 
196
196
  const text = $("<p></p>")
197
- .addClass (this .logLevels [level] ?? "log")
198
- .attr ("title", sourceId ? `${sourceId}:${line}`: "")
199
- .text (message);
197
+ .addClass (typeof level === "string" ? level : (this .logLevels [level] ?? "log"))
198
+ .attr ("title", sourceId ? `${sourceId}:${line}`: "");
200
199
 
201
- if (performance .now () - this .messageTime > 1000)
202
- this .output .append ($("<p></p>") .addClass ("splitter"));
200
+ if (html)
201
+ text .html (message);
202
+ else
203
+ text .text (message);
204
+
205
+ if (performance .now () - this .messageTime > 1_000)
206
+ this .addSplitter ();
203
207
 
204
208
  this .messageTime = performance .now ();
205
209
 
@@ -210,6 +214,11 @@ module .exports = class Console extends Interface
210
214
  this .findElements (text, this .currentElement, false);
211
215
  }
212
216
 
217
+ addSplitter ()
218
+ {
219
+ this .output .append ($("<p></p>") .addClass ("splitter"));
220
+ }
221
+
213
222
  setSuspendConsole (value)
214
223
  {
215
224
  this .suspendConsole = value;
@@ -217,13 +226,13 @@ module .exports = class Console extends Interface
217
226
  if (value)
218
227
  {
219
228
  electron .ipcRenderer .off ("console-message", this .addMessageCallback);
220
- this .addMessage (null, "info", __filename, 0, `Console output suspended at ${new Date () .toLocaleTimeString ()}.`);
229
+ this .addMessage ("info", __filename, 0, `Console output suspended at ${new Date () .toLocaleTimeString ()}.`);
221
230
  this .suspendButton .addClass ("active");
222
231
  }
223
232
  else
224
233
  {
225
234
  electron .ipcRenderer .on ("console-message", this .addMessageCallback);
226
- this .addMessage (null, "info", __filename, 0, `Console output enabled at ${new Date () .toLocaleTimeString ()}.`);
235
+ this .addMessage ("info", __filename, 0, `Console output enabled at ${new Date () .toLocaleTimeString ()}.`);
227
236
  this .suspendButton .removeClass ("active");
228
237
  }
229
238
  }
@@ -233,7 +242,7 @@ module .exports = class Console extends Interface
233
242
  this .messageTime = 0;
234
243
 
235
244
  this .output .empty ();
236
- this .addMessage (null, "info", __filename, 0, `Console cleared at ${new Date () .toLocaleTimeString ()}.`);
245
+ this .addMessage ("info", __filename, 0, `Console cleared at ${new Date () .toLocaleTimeString ()}.`);
237
246
  this .searchString ();
238
247
  }
239
248
 
@@ -654,6 +654,32 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
654
654
  menu .push ({
655
655
  label: _("Add Parent Group"),
656
656
  submenu: [
657
+ {
658
+ label: "CADAssembly",
659
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADAssembly", "children"],
660
+ },
661
+ {
662
+ label: "CADFace",
663
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADFace", "shape"],
664
+ },
665
+ {
666
+ label: "CADLayer",
667
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADLayer", "children"],
668
+ },
669
+ {
670
+ label: "CADPart",
671
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADPart", "children"],
672
+ },
673
+ { type: "separator" },
674
+ {
675
+ label: "GeoLocation",
676
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Geospatial", "GeoLocation", "children"],
677
+ },
678
+ {
679
+ label: "GeoTransform",
680
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Geospatial", "GeoTransform", "children"],
681
+ },
682
+ { type: "separator" },
657
683
  {
658
684
  label: "Group",
659
685
  args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Grouping", "Group", "children"],
@@ -672,77 +698,63 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
672
698
  },
673
699
  { type: "separator" },
674
700
  {
675
- label: "Billboard",
676
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "Billboard", "children"],
701
+ label: "HAnimJoint",
702
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "HAnim", "HAnimJoint", "children"],
677
703
  },
678
704
  {
679
- label: "Collision",
680
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "Collision", "children"],
705
+ label: "HAnimSegment",
706
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "HAnim", "HAnimSegment", "children"],
681
707
  },
682
708
  {
683
- label: "LOD",
684
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "LOD", "children"],
709
+ label: "HAnimSite",
710
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "HAnim", "HAnimSite", "children"],
685
711
  },
712
+ { type: "separator" },
686
713
  {
687
- label: "ViewpointGroup",
688
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "ViewpointGroup", "children"],
714
+ label: "Layer",
715
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layering", "Layer", "children"],
689
716
  },
690
- { type: "separator" },
691
717
  {
692
- label: "Anchor",
693
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "Anchor", "children"],
718
+ label: "LayerSet",
719
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layering", "LayerSet", "layers"],
694
720
  },
695
- { type: "separator" },
696
721
  {
697
- label: "LayoutLayer",
698
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "LayoutLayer", "children"],
722
+ label: "Viewport",
723
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layering", "Viewport", "children"],
699
724
  },
725
+ { type: "separator" },
700
726
  {
701
727
  label: "LayoutGroup",
702
728
  args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "LayoutGroup", "children"],
703
729
  },
704
730
  {
705
- label: "ScreenGroup",
706
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "ScreenGroup", "children"],
707
- },
708
- { type: "separator" },
709
- {
710
- label: "GeoTransform",
711
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Geospatial", "GeoTransform", "children"],
731
+ label: "LayoutLayer",
732
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "LayoutLayer", "children"],
712
733
  },
713
734
  {
714
- label: "GeoLocation",
715
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Geospatial", "GeoLocation", "children"],
735
+ label: "ScreenGroup",
736
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "ScreenGroup", "children"],
716
737
  },
717
738
  { type: "separator" },
718
739
  {
719
- label: "CADLayer",
720
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADLayer", "children"],
721
- },
722
- {
723
- label: "CADAssembly",
724
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADAssembly", "children"],
725
- },
726
- {
727
- label: "CADPart",
728
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADPart", "children"],
740
+ label: "Anchor",
741
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "Anchor", "children"],
729
742
  },
730
743
  {
731
- label: "CADFace",
732
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "CADGeometry", "CADFace", "shape"],
744
+ label: "Billboard",
745
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "Billboard", "children"],
733
746
  },
734
- { type: "separator" },
735
747
  {
736
- label: "LayerSet",
737
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layering", "LayerSet", "layers"],
748
+ label: "Collision",
749
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "Collision", "children"],
738
750
  },
739
751
  {
740
- label: "Layer",
741
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layering", "Layer", "children"],
752
+ label: "LOD",
753
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "LOD", "children"],
742
754
  },
743
755
  {
744
- label: "Viewport",
745
- args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layering", "Viewport", "children"],
756
+ label: "ViewpointGroup",
757
+ args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Navigation", "ViewpointGroup", "children"],
746
758
  },
747
759
  { type: "separator" },
748
760
  {
@@ -1576,6 +1576,8 @@ module .exports = class RouteGraph extends Interface
1576
1576
  $(document) .on ("mouseup.lasso", event => this .drawLassoEnd (event));
1577
1577
  }
1578
1578
 
1579
+ #lassoBorderRadius = 10;
1580
+
1579
1581
  drawLasso (event)
1580
1582
  {
1581
1583
  if (event .button !== 0)
@@ -1601,20 +1603,20 @@ module .exports = class RouteGraph extends Interface
1601
1603
  fillStyle = this .#style .getPropertyValue ("--lasso-fill"),
1602
1604
  strokeStyle = this .#style .getPropertyValue ("--lasso-stroke");
1603
1605
 
1604
- context .fillStyle = fillStyle;
1605
- context .strokeStyle = strokeStyle;
1606
- context .lineWidth = 2;
1607
-
1608
1606
  context .save ();
1609
1607
  context .scale (contentScale, contentScale);
1610
1608
  context .clearRect (0, 0, width, height);
1611
1609
 
1610
+ context .fillStyle = fillStyle;
1611
+ context .strokeStyle = strokeStyle;
1612
+ context .lineWidth = 2;
1613
+
1612
1614
  context .beginPath ();
1613
- context .rect (... start, ... size);
1615
+ context .roundRect (... start, ... size, this .#lassoBorderRadius);
1614
1616
  context .fill ();
1615
1617
 
1616
1618
  context .beginPath ();
1617
- context .rect (... start, ... size);
1619
+ context .roundRect (... start, ... size, this .#lassoBorderRadius);
1618
1620
  context .stroke ();
1619
1621
 
1620
1622
  context .restore ();
@@ -2079,19 +2081,22 @@ module .exports = class RouteGraph extends Interface
2079
2081
  }
2080
2082
 
2081
2083
  #gridSize = 20;
2084
+ #gridPointFactor = 2;
2082
2085
 
2083
2086
  drawGrid (context, width, height, offsetX, offsetY)
2084
2087
  {
2085
2088
  const
2086
- size = this .#gridSize,
2087
- color = this .#style .getPropertyValue ("--system-gray5");
2089
+ lineSpacing = this .#gridSize,
2090
+ lineColor = this .#style .getPropertyValue ("--system-gray6"),
2091
+ pointSpacing = lineSpacing * this .#gridPointFactor,
2092
+ pointColor = this .#style .getPropertyValue ("--system-gray2");
2088
2093
 
2089
2094
  context .clearRect (0, 0, width, height);
2090
2095
 
2091
- context .strokeStyle = color;
2096
+ context .strokeStyle = lineColor;
2092
2097
  context .lineWidth = 1;
2093
2098
 
2094
- for (let x = -offsetX % size; x <= width; x += size)
2099
+ for (let x = -offsetX % lineSpacing; x <= width; x += lineSpacing)
2095
2100
  {
2096
2101
  context .beginPath ();
2097
2102
  context .moveTo (x, 0);
@@ -2099,13 +2104,25 @@ module .exports = class RouteGraph extends Interface
2099
2104
  context .stroke ();
2100
2105
  }
2101
2106
 
2102
- for (let y = -offsetY % size; y <= height; y += size)
2107
+ for (let y = -offsetY % lineSpacing; y <= height; y += lineSpacing)
2103
2108
  {
2104
2109
  context .beginPath ();
2105
2110
  context .moveTo (0, y);
2106
2111
  context .lineTo (width, y);
2107
2112
  context .stroke ();
2108
2113
  }
2114
+
2115
+ // Points
2116
+
2117
+ context .fillStyle = pointColor;
2118
+
2119
+ for (let y = -offsetY % pointSpacing - lineSpacing - 0.5; y <= height; y += pointSpacing)
2120
+ {
2121
+ for (let x = -offsetX % pointSpacing - 0.5; x < width; x += pointSpacing)
2122
+ context .rect (x, y, 1, 1);
2123
+ }
2124
+
2125
+ context .fill ();
2109
2126
  }
2110
2127
 
2111
2128
  drawRoutes (context)
@@ -1260,10 +1260,18 @@ body.dark .ui-widget .library-list .component {
1260
1260
  padding: 0px;
1261
1261
  }
1262
1262
 
1263
+ .console-output p.splitter + p.splitter {
1264
+ display: none;
1265
+ }
1266
+
1263
1267
  .console-output p.splitter:first-child {
1264
1268
  display: none;
1265
1269
  }
1266
1270
 
1271
+ .console-output a {
1272
+ color: var(--system-orange);
1273
+ }
1274
+
1267
1275
  .console-input {
1268
1276
  position: absolute;
1269
1277
  box-sizing: border-box;
@@ -199,7 +199,7 @@
199
199
  /* Qtip */
200
200
 
201
201
  --qtip-background-color: black;
202
- --qtip-border: 1px solid var(--system-gray4);
202
+ --qtip-border: 1px solid var(--system-gray6);
203
203
  --qtip-highlight-color: white;
204
204
 
205
205
  /* TweakPanel colors */
@@ -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
- }