this.me 2.3.4 → 2.3.6
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/main.js +25 -13
- package/package.json +4 -5
- package/atom/src/scripts.js +0 -19
- package/atom/src/style.css +0 -73
- package/atom/view.html +0 -42
- package/atom.js +0 -11
package/main.js
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
const { exec } = require("child_process");
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const args = process.argv.slice(2);
|
|
6
|
-
const thisPixels = require("this.pixels");
|
|
7
6
|
const neuronsMe = require("neurons.me");
|
|
8
7
|
const cleaker = require("cleaker");
|
|
9
|
-
const
|
|
8
|
+
const Atom = require("this.atom");
|
|
10
9
|
// Your CLI logic goes here, display welcome message, handle other commands, etc.
|
|
11
10
|
console.log(`
|
|
12
11
|
___________
|
|
@@ -26,15 +25,28 @@ Welcome to .me - Your AI Playground
|
|
|
26
25
|
give me one sec please...
|
|
27
26
|
`);
|
|
28
27
|
|
|
29
|
-
if (args[0] ===
|
|
30
|
-
//
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
console.log(`stdout: ${stdout}`);
|
|
38
|
-
console.error(`stderr: ${stderr}`);
|
|
39
|
-
});
|
|
28
|
+
if (args[0] === 'viewer') {
|
|
29
|
+
// Create an instance of the Atom class
|
|
30
|
+
const atom = new Atom();
|
|
31
|
+
// Create a new Electron window with viewer.html inside
|
|
32
|
+
atom.createElectron('viewer', { width: 800, height: 600, viewFile: path.resolve(__dirname, 'viewer.html') });
|
|
33
|
+
// Show the Electron window
|
|
34
|
+
atom.showElectron('viewer');
|
|
40
35
|
}
|
|
36
|
+
|
|
37
|
+
if (args[0] === 'atom') {
|
|
38
|
+
// Create an instance of the Atom class
|
|
39
|
+
const atom = new Atom();
|
|
40
|
+
// Create Electrons for Atom 1
|
|
41
|
+
atom.createElectron('electron1', { width: 800, height: 600, viewFile: './view1.html' });
|
|
42
|
+
atom.createElectron('electron2', { width: 600, height: 400, viewFile: './view2.html' });
|
|
43
|
+
// Create Electrons for Atom 2
|
|
44
|
+
atom.createElectron('electron3', { width: 1000, height: 800, viewFile: './view3.html' });
|
|
45
|
+
// Show the Atom window with electrons
|
|
46
|
+
atom.showAtom();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.me",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
4
4
|
"description": "This.me should This.be",
|
|
5
5
|
"bin": {
|
|
6
6
|
".me": "./main.js"
|
|
@@ -20,12 +20,11 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"cleaker": "^2.2.9",
|
|
23
|
-
"electron": "^25.4.0",
|
|
24
23
|
"netget": "^2.1.6",
|
|
25
|
-
"neurons.me": "^2.
|
|
26
|
-
"this.atom": "^1.0.
|
|
24
|
+
"neurons.me": "^2.6.3",
|
|
25
|
+
"this.atom": "^1.0.3",
|
|
27
26
|
"this.be": "^2.1.3",
|
|
28
|
-
"this.
|
|
27
|
+
"this.pixel": "^3.3.5",
|
|
29
28
|
"v.path": "^2.1.7",
|
|
30
29
|
"i.mlearning": "^2.1.7"
|
|
31
30
|
}
|
package/atom/src/scripts.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//scripts.js
|
|
2
|
-
const { ipcRenderer } = require('electron')
|
|
3
|
-
|
|
4
|
-
document.getElementById("min-btn").addEventListener("click", function (e) {
|
|
5
|
-
ipcRenderer.send('minimize-window');
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
document.getElementById("close-btn").addEventListener("click", function (e) {
|
|
9
|
-
ipcRenderer.send('close-window');
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
document.getElementById("this.me").addEventListener("click", function (e) {
|
|
13
|
-
const menu = document.getElementById("menu");
|
|
14
|
-
if (menu.style.display === "none") {
|
|
15
|
-
menu.style.display = "block";
|
|
16
|
-
} else {
|
|
17
|
-
menu.style.display = "none";
|
|
18
|
-
}
|
|
19
|
-
});
|
package/atom/src/style.css
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
body {
|
|
2
|
-
margin: 0;
|
|
3
|
-
padding: 0;
|
|
4
|
-
background-color: rgba(0,0,255,0.1); /* You can change this color */
|
|
5
|
-
border: 2px solid blue; /* You can change this color */
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100vw;
|
|
8
|
-
display: flex;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
align-items: center;
|
|
12
|
-
}
|
|
13
|
-
#top-bar {
|
|
14
|
-
background-color: #444;
|
|
15
|
-
color: white;
|
|
16
|
-
position: fixed;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 30px;
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: space-between;
|
|
24
|
-
padding: 0 10px;
|
|
25
|
-
-webkit-app-region: drag; /* Make the top bar draggable */
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
#app-region-drag {
|
|
29
|
-
-webkit-app-region: drag;
|
|
30
|
-
height: 30px;
|
|
31
|
-
background: rgba(255, 255, 255, 0.7); /* semi-transparent white */
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
#main-content {
|
|
35
|
-
background: rgba(255, 255, 255, 0.035); /* less transparent white */
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* Define the style for the buttons */
|
|
39
|
-
/* Define the style for the buttons */
|
|
40
|
-
.window-button {
|
|
41
|
-
-webkit-app-region: no-drag; /* Exclude the buttons from the draggable area */
|
|
42
|
-
background-color: rgba(255, 0, 0, 0);
|
|
43
|
-
color: white;
|
|
44
|
-
width: 20px;
|
|
45
|
-
height: 20px;
|
|
46
|
-
text-align: center;
|
|
47
|
-
line-height: 20px;
|
|
48
|
-
border-radius: 50%;
|
|
49
|
-
}
|
|
50
|
-
#myCanvas {
|
|
51
|
-
border: 1px solid #d3d3d3;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
#header {
|
|
55
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
56
|
-
display: flex;
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
padding: 10px;
|
|
59
|
-
-webkit-app-region: drag;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
button {
|
|
63
|
-
-webkit-app-region: no-drag;
|
|
64
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
65
|
-
border: none;
|
|
66
|
-
border-radius: 5px;
|
|
67
|
-
padding: 5px 10px;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
button:hover {
|
|
72
|
-
background-color: rgba(255, 255, 255, 1);
|
|
73
|
-
}
|
package/atom/view.html
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<link rel="stylesheet" type="text/css" href="./src/style.css">
|
|
5
|
-
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
|
|
6
|
-
<script src=""></script>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<div id="app-region-drag">
|
|
10
|
-
<div id="top-bar">
|
|
11
|
-
<!-- Add your app title here -->
|
|
12
|
-
<div>Viewer tab 1</div>
|
|
13
|
-
<!-- Add window control buttons -->
|
|
14
|
-
<div id="header">
|
|
15
|
-
<button class="" id="this.me"> this.me </button>
|
|
16
|
-
<div id="menu" style="display: none;">
|
|
17
|
-
<ul>
|
|
18
|
-
<li><a href="#">Menu Item 1</a></li>
|
|
19
|
-
<li><a href="#">Menu Item 2</a></li>
|
|
20
|
-
<!-- Add more items as necessary -->
|
|
21
|
-
</ul>
|
|
22
|
-
</div>
|
|
23
|
-
<button class="window-button" id="min-btn"> - </button>
|
|
24
|
-
<button class="window-button" id="close-btn"> x </button>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<div id="main-content">
|
|
28
|
-
<!---
|
|
29
|
-
<canvas id="myCanvas" width="400" height="300">
|
|
30
|
-
Your browser does not support the HTML5 canvas tag.
|
|
31
|
-
</canvas>
|
|
32
|
-
-->
|
|
33
|
-
<pixel-grid width="100" height="100"></pixel-grid>
|
|
34
|
-
<!--
|
|
35
|
-
<button id="convert">Convert to Matrix</button>
|
|
36
|
-
-->
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<script src="./this.me/node_modules/this.pixels/PixelGrid.js"></script>
|
|
40
|
-
<script src="./src/scripts.js"></script>
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
package/atom.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//atom.js
|
|
2
|
-
const { exec } = require("child_process");
|
|
3
|
-
const command = "electron tab.js";
|
|
4
|
-
exec(command, (error, stdout, stderr) => {
|
|
5
|
-
if (error) {
|
|
6
|
-
console.error(`Could not start Electron: ${error}`);
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
console.log(`stdout: ${stdout}`);
|
|
10
|
-
console.error(`stderr: ${stderr}`);
|
|
11
|
-
});
|