this.me 2.2.3 → 2.2.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.
@@ -0,0 +1,19 @@
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
+ });
@@ -0,0 +1,73 @@
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 ADDED
@@ -0,0 +1,42 @@
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="https://drive.google.com/uc?export=view&id=1YvgTnelWLsPZW2xun0SiWayrtgEZamgM"></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 ADDED
@@ -0,0 +1,32 @@
1
+ //atom.js
2
+ const { app, BrowserWindow, ipcMain } = require('electron');
3
+
4
+ let win;
5
+
6
+ app.on('ready', () => {
7
+ win = new BrowserWindow({
8
+ width: 377,
9
+ height: 244,
10
+ webPreferences: {
11
+ nodeIntegration: true,
12
+ contextIsolation: false, // Add this line
13
+ },
14
+ frame: false,
15
+ transparent: true,
16
+ //opacity: 0.5
17
+ });
18
+
19
+ win.on('closed', () => {
20
+ win = null;
21
+ });
22
+
23
+ win.loadFile('./atom/view.html');
24
+ });
25
+
26
+ ipcMain.on('minimize-window', () => {
27
+ win.minimize();
28
+ });
29
+
30
+ ipcMain.on('close-window', () => {
31
+ win.close();
32
+ });
package/main.js CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ const { exec } = require("child_process");
3
+ const PixelGrid = require('this.pixels');
2
4
  console.log(`
3
5
  ___________
4
6
  [------------]
@@ -16,3 +18,13 @@ console.log(`
16
18
  Welcome to .me - Your AI Playground
17
19
  `);
18
20
 
21
+ const command = "electron atom.js";
22
+
23
+ exec(command, (error, stdout, stderr) => {
24
+ if (error) {
25
+ console.error(`Could not start Electron: ${error}`);
26
+ return;
27
+ }
28
+ console.log(`stdout: ${stdout}`);
29
+ console.error(`stderr: ${stderr}`);
30
+ });
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "this.me",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "CLI for managing the .me suite.",
5
5
  "bin": {
6
6
  ".me": "./main.js"
7
7
  },
8
8
  "main": "main.js",
9
9
  "scripts": {
10
- "start": "node main.js",
11
10
  "test": "test"
12
11
  },
13
12
  "keywords": [
@@ -19,12 +18,14 @@
19
18
  "author": "suiGn",
20
19
  "license": "MIT",
21
20
  "dependencies": {
22
- "neurons.me": "^2.5.7",
23
21
  "cleaker": "^2.2.9",
22
+ "electron": "^25.4.0",
24
23
  "monadlisa": "^2.1.1",
25
24
  "netget": "^2.1.6",
26
- "v.path": "^2.1.7",
25
+ "neurons.me": "^2.5.7",
27
26
  "this.haiku": "1.2.2",
28
- "this.mlearning": "2.1.6"
27
+ "this.mlearning": "2.1.6",
28
+ "this.pixels": "3.2.6",
29
+ "v.path": "^2.1.7"
29
30
  }
30
- }
31
+ }
package/docs/design.md DELETED
@@ -1,47 +0,0 @@
1
- CLI commands:
2
-
3
- Create a new neuron:
4
- Usage: me newNeuron [options]
5
-
6
- Options:
7
- -n, --name <name> Specify a custom name for the neuron
8
- -d, --date <date> Specify a custom date for the neuron
9
- -t, --time <time> Specify a custom time for the neuron
10
- -c, --color <color> Specify a custom color for the neuron
11
- -a, --activation <function> Specify a custom activation function for the neuron
12
- -w, --weights <weights> Specify custom weights for the neuron
13
- -b, --bias <bias> Specify a custom bias for the neuron
14
- -h, --help display help for command
15
-
16
- Login:
17
- Usage: me login [options]
18
-
19
- Options:
20
- -u, --username <username> Enter your username
21
- -p, --password <password> Enter your password
22
- -h, --help display help for command
23
-
24
- Interact with cleaker:
25
- Usage: me cleaker <command> [options]
26
-
27
- Commands:
28
- register Register a new user on cleaker.me
29
- login Login to your cleaker.me account
30
- publishModel Publish a neural network model to cleaker.me
31
- --help display help for command
32
-
33
- Create a new neural network:
34
- Usage: me newNeuralNetwork [options]
35
-
36
- Options:
37
- -h, --help display help for command
38
-
39
- Access netget functionality:
40
- Usage: me netget <command> [options]
41
-
42
- Commands:
43
- get Get data using netget
44
- ws Establish a WebSocket connection using netget
45
- --help display help for command
46
-
47
- These commands provide a clear and concise way for users to interact with the neurons.me CLI. The options allow users to customize the properties of neurons and neural networks as needed. The cleaker and netget commands are organized under their respective subcommands for easy access to their functionalities.