this.me 2.3.3 → 2.3.5
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 +31 -14
- package/package.json +4 -4
- 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/index.js +0 -85
package/main.js
CHANGED
|
@@ -3,19 +3,12 @@
|
|
|
3
3
|
const { exec } = require("child_process");
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const args = process.argv.slice(2);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
console.error(`Could not start Electron: ${error}`);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
console.log(`stdout: ${stdout}`);
|
|
16
|
-
console.error(`stderr: ${stderr}`);
|
|
17
|
-
});
|
|
18
|
-
// Your CLI logic goes here, display welcome message, handle other commands, etc.
|
|
6
|
+
const neuronsMe = require("neurons.me");
|
|
7
|
+
const cleaker = require("cleaker");
|
|
8
|
+
const thisPixels = require("this.pixels");
|
|
9
|
+
const PixelGrid = require('this.pixelgrid');
|
|
10
|
+
const Atom = require("this.atom");
|
|
11
|
+
// Your CLI logic goes here, display welcome message, handle other commands, etc.
|
|
19
12
|
console.log(`
|
|
20
13
|
___________
|
|
21
14
|
[------------]
|
|
@@ -34,4 +27,28 @@ Welcome to .me - Your AI Playground
|
|
|
34
27
|
give me one sec please...
|
|
35
28
|
`);
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
if (args[0] === 'viewer') {
|
|
31
|
+
// Create an instance of the Atom class
|
|
32
|
+
const atom = new Atom();
|
|
33
|
+
// Create a new Electron window with viewer.html inside
|
|
34
|
+
atom.createElectron('viewer', { width: 800, height: 600, viewFile: path.resolve(__dirname, 'viewer.html') });
|
|
35
|
+
// Show the Electron window
|
|
36
|
+
atom.showElectron('viewer');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (args[0] === 'atom') {
|
|
40
|
+
// Create an instance of the Atom class
|
|
41
|
+
const atom = new Atom();
|
|
42
|
+
// Create Electrons for Atom 1
|
|
43
|
+
atom.createElectron('electron1', { width: 800, height: 600, viewFile: './view1.html' });
|
|
44
|
+
atom.createElectron('electron2', { width: 600, height: 400, viewFile: './view2.html' });
|
|
45
|
+
// Create Electrons for Atom 2
|
|
46
|
+
atom.createElectron('electron3', { width: 1000, height: 800, viewFile: './view3.html' });
|
|
47
|
+
// Show the Atom window with electrons
|
|
48
|
+
atom.showAtom();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.me",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"description": "This.me should This.be",
|
|
5
5
|
"bin": {
|
|
6
6
|
".me": "./main.js"
|
|
@@ -20,12 +20,12 @@
|
|
|
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
24
|
"neurons.me": "^2.5.7",
|
|
26
25
|
"this.atom": "^1.0.0",
|
|
27
26
|
"this.be": "^2.1.3",
|
|
28
|
-
"this.
|
|
29
|
-
"v.path": "^2.1.7"
|
|
27
|
+
"this.pixel": "^3.3.3",
|
|
28
|
+
"v.path": "^2.1.7",
|
|
29
|
+
"i.mlearning": "^2.1.7"
|
|
30
30
|
}
|
|
31
31
|
}
|
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
|
-
});
|
package/index.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
//main entry point to .me suite. Happy bizarre coding....
|
|
2
|
-
const readline = require('readline');
|
|
3
|
-
const neurons = require('neurons.me');
|
|
4
|
-
const cleakerShell = require('cleaker/shell');
|
|
5
|
-
const Menu = require('this.me/src/utils');
|
|
6
|
-
// Other imports ...
|
|
7
|
-
console.log(`
|
|
8
|
-
___________
|
|
9
|
-
[------------]
|
|
10
|
-
| .--------. |
|
|
11
|
-
| |01010101| | __________
|
|
12
|
-
| |11010101| | /__________\
|
|
13
|
-
[--------| -------- |------| --*-- |-------]
|
|
14
|
-
| [----_-.-----] |o ====== | |
|
|
15
|
-
| ______|_|_______ |__________| |
|
|
16
|
-
| / %%%%%%%%%%%% \ |
|
|
17
|
-
| / %%%%%%%%%%%%%% \ |
|
|
18
|
-
| ^^^^^^^^^^^^^^^^^^^^ |
|
|
19
|
-
[---------------------------------.me-----------]
|
|
20
|
-
-^^^^^^^^zzzz...
|
|
21
|
-
Welcome to .me - Your AI Playground
|
|
22
|
-
`);
|
|
23
|
-
// .me Main entry function
|
|
24
|
-
function main() {
|
|
25
|
-
const rl = readline.createInterface({
|
|
26
|
-
input: process.stdin,
|
|
27
|
-
output: process.stdout,
|
|
28
|
-
});
|
|
29
|
-
mainMenu(rl);
|
|
30
|
-
rl.setPrompt('Select module (.me)> ');
|
|
31
|
-
rl.prompt();
|
|
32
|
-
rl.on('line', (input) => {
|
|
33
|
-
switch (input.trim()) {
|
|
34
|
-
case '1':
|
|
35
|
-
const neuronsShell = neurons.shell(rl); // Call neurons.shell to get the object
|
|
36
|
-
neurons.shell(rl).init(); // initiate neurons.me
|
|
37
|
-
break;
|
|
38
|
-
case '2':
|
|
39
|
-
cleakerShell(rl);
|
|
40
|
-
break;
|
|
41
|
-
// Add other cases...
|
|
42
|
-
case '/q':
|
|
43
|
-
rl.close();
|
|
44
|
-
break;
|
|
45
|
-
default:
|
|
46
|
-
console.log('Invalid option. Please choose a valid module.');
|
|
47
|
-
rl.prompt();
|
|
48
|
-
}
|
|
49
|
-
}).on('close', () => {
|
|
50
|
-
console.log('Exiting .me');
|
|
51
|
-
process.exit(0);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function mainMenu(rl) {
|
|
55
|
-
console.log('\nChoose a module to get started:');
|
|
56
|
-
console.log('1. neurons.me - Manage neural networks');
|
|
57
|
-
console.log('2. cleaker - Work with Cleaker application');
|
|
58
|
-
console.log('\ntype /q to exit');
|
|
59
|
-
rl.prompt();
|
|
60
|
-
}
|
|
61
|
-
// NEURONS.ME SECTION
|
|
62
|
-
function neuronsModule(rl) {
|
|
63
|
-
class NeuronsMeApp {
|
|
64
|
-
constructor() {
|
|
65
|
-
this.rl = rl;
|
|
66
|
-
this.currentMenu = new neuronsme_MainMenu(this);
|
|
67
|
-
this.currentMenu.display(); // Display the main menu
|
|
68
|
-
}
|
|
69
|
-
// ... Rest of your neurons.me related code
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
class neuronsme_MainMenu extends Menu {
|
|
73
|
-
// ... Your existing code for the neurons menu
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Other neurons classes...
|
|
77
|
-
|
|
78
|
-
const neurons_me_app_init = new NeuronsMeApp();
|
|
79
|
-
neurons_me_app_init.start();
|
|
80
|
-
}
|
|
81
|
-
// CLEAKER SECTION
|
|
82
|
-
function cleakerModule(rl) {
|
|
83
|
-
// Implement the cleaker module here
|
|
84
|
-
}
|
|
85
|
-
main();
|