this.gui 0.0.55 → 0.0.56
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 +20 -79
- package/dist/this-gui.es.js +1 -0
- package/dist/this-gui.umd.js +1 -0
- package/package.json +43 -12
- package/index.js +0 -8
- package/jsdoc.json +0 -52
- package/knowledge_files/00_Context.md +0 -27
- package/src/browser/guiFormatter.browser.js +0 -12
- package/src/createGUIFormatter.js +0 -21
- package/src/htmls/html.html +0 -24
- package/src/htmls/layout.html +0 -37
- package/src/htmls/layout2.html +0 -56
- package/src/htmls/layout3.html +0 -80
- package/src/nodejs/guiFormatter.node.js +0 -12
- package/src/this.GUI.js +0 -19
package/README.md
CHANGED
|
@@ -1,99 +1,40 @@
|
|
|
1
1
|
# THIS.GUI
|
|
2
|
-
|
|
3
2
|
-----------
|
|
4
|
-
|
|
5
|
-
### [Project Status : Experimental and Under Development, Subject to Major Changes]
|
|
6
|
-
|
|
7
|
-
The module is in active development, and as such, it is subject to significant changes as we refine our approach and methodologies to best support our goals.
|
|
8
|
-
|
|
9
|
-
visit: https://neurons.me to learn more.
|
|
10
|
-
|
|
11
|
-
----------
|
|
12
|
-
|
|
13
3
|
# Installation
|
|
14
|
-
|
|
15
4
|
Install `this.gui` via **npm**:
|
|
16
|
-
|
|
17
5
|
```shell
|
|
18
6
|
npm install this.gui
|
|
19
7
|
```
|
|
8
|
+
The goal is to automate the UI generation process so users only pass data or configurations, and this.gui handles the rest.
|
|
20
9
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
1. **Automated UI Generation:**
|
|
24
|
-
- `this.gui` Generate basic HTML structures for different parts of your websites or applications based on predefined templates or rules.** For instance, if you're working on a data display section, `this.gui` could provide a standard, yet customizable, table or chart layout based on the data type and context.
|
|
25
|
-
2. **Contextual and Environmental Adaptation:**
|
|
26
|
-
- Detect the environment or context in which it's operating (e.g., mobile, desktop, specific user preferences) and adjust the UI accordingly. **For example,** switch to a mobile-friendly layout when accessed from a phone or alter themes and elements based on user settings or preferences.
|
|
27
|
-
3. **Integration with Development Tools:**
|
|
28
|
-
- By incorporating `this.gui` into your development ecosystem, including neurons.networks and mlearning tools, you can create a cohesive workflow where GUI elements evolve based on insights and data from these tools. For example, if mlearning tools identify a pattern or preference in user interaction, `this.gui` could adjust the UI elements or layouts to better suit those patterns.
|
|
29
|
-
4. **Code-Centric Workflow:**
|
|
30
|
-
- With `this.gui`, your primary focus remains on the backend code or logic, while the system handles the frontend. You can specify UI requirements or structures in a simple, abstracted manner, and `this.gui` would interpret these to produce concrete, functional UIs.
|
|
31
|
-
5. **Learning and Optimization:**
|
|
32
|
-
- Over time, `this.gui` could learn from user interactions, feedback, and other data sources to optimize UI elements for better performance, user engagement, or aesthetics. This learning process could be automated within your development and deployment pipeline, ensuring continuous improvement without manual intervention.
|
|
33
|
-
6. **Rapid Prototyping and Iteration:**
|
|
34
|
-
- `this.gui` could facilitate rapid prototyping and iteration by quickly generating interfaces that can be tested and refined in real-time. This agility would allow for faster development cycles and the ability to experiment with different UI approaches without significant overhead.
|
|
10
|
+
1. The user of this.gui doesn’t need to write React components themselves. They just pass configurations or data structures, and this.gui generates the UI dynamically.
|
|
11
|
+
2. React is still required in the user’s project because the UI components provided by this.gui are React components that need to be rendered by React.
|
|
35
12
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### Neural Network Integration:
|
|
39
|
-
|
|
40
|
-
- **Data Processing and Learning**: Both **All.This DataStructures** serve as inputs to neural network models that analyze, learn, and potentially transform these structures. The neural networks could identify inefficiencies, user experience issues, or opportunities for enhancement based on vast datasets and user interaction logs.
|
|
41
|
-
|
|
42
|
-
- **Output Generation**: The neural networks could output modified or entirely new `this.DOM` and `this.GUI` structures that reflect learned optimizations, adaptations to context or user preferences, or innovative design approaches.
|
|
43
|
-
|
|
44
|
-
- **Continuous Improvement**: As `this.DOM` and `this.GUI` structures are processed and reprocessed through neural networks, they become more refined and aligned with optimal UI/UX practices, user preferences, and context-specific requirements.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### Application and Use Cases:
|
|
49
|
-
|
|
50
|
-
- **Dynamic Interface Generation**: Leveraging neural networks, `this.GUI` could dynamically generate user interfaces that are optimized for the current context, user preferences, and device capabilities.
|
|
51
|
-
- **User Experience Optimization**: Neural networks could analyze `this.DOM` structures to suggest or automatically implement optimizations that enhance usability, accessibility, and user engagement.
|
|
52
|
-
- **Adaptive Interfaces**: Over time, as neural networks learn from a broad spectrum of interactions and contexts, they could guide the evolution of `this.GUI` to create interfaces that adapt in real-time to user needs and environmental factors.
|
|
53
|
-
|
|
54
|
-
In this conceptual framework, `this.DOM` and `this.GUI` are not just static descriptions or libraries but living, evolving structures that are integral to a neural network-driven process of continuous UI/UX optimization and innovation within the neurons.me ecosystem.
|
|
13
|
+
The Key Value of this.gui:
|
|
55
14
|
|
|
15
|
+
• Simplifies UI creation: Users only pass configurations or data; they don’t need to deal with the intricacies of React.
|
|
16
|
+
• Dynamic generation: The components adapt and render based on the input you give them.
|
|
17
|
+
• Automation: You handle all the complexity of component creation, leaving users with a simplified interface to generate UIs.
|
|
56
18
|
|
|
19
|
+
Build the User’s App:
|
|
20
|
+
• When someone uses this.gui in their own application, they import this.gui and use it like any other dependency.
|
|
21
|
+
• They will then build their own application using their own bundler (such as Vite, Webpack, etc.). During this process, the bundler will include the components from this.gui as part of the final build.
|
|
22
|
+
• This app build step will include all the app’s code and the components from this.gui, and it will bundle everything into a final production build.
|
|
57
23
|
|
|
58
24
|
## Contribution
|
|
59
|
-
|
|
60
|
-
Contributions are welcome! To contribute to `this.gui`, please visit our [GitHub repository](https://github.com/suiGn/GUI).
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
25
|
+
Contributions are welcome! To contribute to `this.gui`, please visit our [GitHub repository](https://github.com/neurons-me/GUI).
|
|
64
26
|
----------
|
|
65
|
-
|
|
66
27
|
# About All.This
|
|
67
|
-
|
|
68
|
-
## Modular Data Structures:
|
|
69
|
-
|
|
28
|
+
###### Modular Data Structures
|
|
70
29
|
**[this.me](https://suign.github.io/this.me) - [this.audio](https://suign.github.io/this.audio) - [this.text](https://suign.github.io/this.text) - [this.wallet](https://suign.github.io/this.wallet) - [this.img](https://suign.github.io/this.img) - [this.pixel](https://suign.github.io/Pixels) - [be.this](https://suign.github.io/be.this) - [this.DOM](https://suign.github.io/this.DOM) - [this.env](https://suign.github.io/this.env/) - [this.GUI](https://suign.github.io/this.GUI) - [this.be](https://suign.github.io/this.be) - [this.video](https://suign.github.io/this.video) - [this.atom](https://suign.github.io/this.atom) - [this.dictionaries](https://suign.github.io/this.dictionaries/)**
|
|
71
30
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## **Utils**
|
|
75
|
-
|
|
76
|
-
**[all.this](https://neurons.me/all-this)** not only aggregates these modules but also provides utilities to facilitate the integration, management, and enhancement of these data structures. **For example:**
|
|
77
|
-
|
|
78
|
-
*The integration with [cleaker](https://suign.github.io/cleaker/) ensures each module instance has a **unique cryptographic identity**, enhancing security and data integrity.*
|
|
79
|
-
|
|
80
|
-
### Neurons.me Ecosystem Glossary:
|
|
81
|
-
|
|
82
|
-
visit: [Neurons.me Glossary](https://suign.github.io/neurons.me/Glossary)
|
|
83
|
-
|
|
84
|
-
## License & Policies
|
|
31
|
+
These classes encapsulate the functionalities to **domain-specific data.**
|
|
85
32
|
|
|
33
|
+
## Neurons.me
|
|
34
|
+
### License & Policies
|
|
86
35
|
- **License**: MIT License (see LICENSE for details).
|
|
87
|
-
|
|
88
36
|
- **Privacy Policy**: Respects user privacy; no collection/storage of personal data.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
**Author:** SuiGn
|
|
95
|
-
|
|
96
|
-
[By neurons.me](https://neurons.me)
|
|
97
|
-
|
|
98
|
-
<img src="https://suign.github.io/neurons.me/neurons_logo.png" alt="neurons.me logo" width="123" height="123" style="width123px; height:123px;">
|
|
99
|
-
|
|
37
|
+
- **Terms of Usage**: Use responsibly. No guarantees/warranties provided.
|
|
38
|
+
[Terms](https://www.neurons.me/terms-of-use) | [Privacy](https://www.neurons.me/privacy-policy)
|
|
39
|
+
[neurons.me](https://neurons.me)
|
|
40
|
+
<img src="https://suign.github.io/assets/imgs/neurons_me_logo.png" alt="neurons.me logo" width="89">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log("this.GUI loaded.");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){"use strict";console.log("this.GUI loaded.")});
|
package/package.json
CHANGED
|
@@ -1,26 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.gui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
4
4
|
"description": "This Graphic User Interface.",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "dist/this-gui.umd.js",
|
|
6
|
+
"module": "dist/this-gui.es.js",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/neurons-me/GUI.git"
|
|
9
10
|
},
|
|
10
11
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "vite build",
|
|
14
|
+
"prepublishOnly": "npm run build",
|
|
15
|
+
"storybook": "storybook dev -p 6006",
|
|
16
|
+
"build-storybook": "storybook build"
|
|
12
17
|
},
|
|
13
|
-
"
|
|
14
|
-
"docs": "https://suiGn.github.io/GUI",
|
|
15
|
-
"type":"module",
|
|
18
|
+
"type": "module",
|
|
16
19
|
"author": "suiGn",
|
|
17
20
|
"license": "MIT",
|
|
18
|
-
"repoType": "NPM Package",
|
|
19
|
-
"category": "dataformatter",
|
|
20
21
|
"dependencies": {
|
|
21
|
-
|
|
22
|
+
"@emotion/react": "^11.13.3",
|
|
23
|
+
"@emotion/styled": "^11.13.0",
|
|
24
|
+
"@storybook/addon-docs": "^8.2.9",
|
|
25
|
+
"@storybook/addons": "^7.6.17",
|
|
26
|
+
"@storybook/builder-vite": "^8.2.9",
|
|
27
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
28
|
+
"autoprefixer": "^10.4.20",
|
|
29
|
+
"postcss": "^8.4.45",
|
|
30
|
+
"tailwindcss": "^3.4.10"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": "^18.0.0",
|
|
34
|
+
"react-dom": "^18.0.0"
|
|
22
35
|
},
|
|
23
36
|
"devDependencies": {
|
|
24
|
-
|
|
25
|
-
|
|
37
|
+
"@chromatic-com/storybook": "^1.8.0",
|
|
38
|
+
"@storybook/addon-essentials": "^8.2.9",
|
|
39
|
+
"@storybook/addon-interactions": "^8.2.9",
|
|
40
|
+
"@storybook/addon-links": "^8.2.9",
|
|
41
|
+
"@storybook/addon-onboarding": "^8.2.9",
|
|
42
|
+
"@storybook/blocks": "^8.2.9",
|
|
43
|
+
"@storybook/manager-api": "^8.2.9",
|
|
44
|
+
"@storybook/react": "^8.2.9",
|
|
45
|
+
"@storybook/react-vite": "^8.2.9",
|
|
46
|
+
"@storybook/test": "^8.2.9",
|
|
47
|
+
"@storybook/theming": "^8.2.9",
|
|
48
|
+
"prop-types": "^15.8.1",
|
|
49
|
+
"react": "^18.0.0",
|
|
50
|
+
"react-dom": "^18.0.0",
|
|
51
|
+
"storybook": "^8.2.9",
|
|
52
|
+
"vite": "^4.5.3"
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"dist"
|
|
56
|
+
]
|
|
26
57
|
}
|
package/index.js
DELETED
package/jsdoc.json
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": {
|
|
3
|
-
"include": ["./src", "./index.js", "./README.md"]
|
|
4
|
-
},
|
|
5
|
-
"opts": {
|
|
6
|
-
"destination": "./docs",
|
|
7
|
-
"template": "../../../../../../Sandbox/dev_tools/assets/better-docs",
|
|
8
|
-
"readme": "./README.md"
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
"templates": {
|
|
12
|
-
"cleverLinks": false,
|
|
13
|
-
"monospaceLinks": false,
|
|
14
|
-
"search": true,
|
|
15
|
-
"default": {
|
|
16
|
-
"staticFiles": {
|
|
17
|
-
"include": [
|
|
18
|
-
"./README.md"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"better-docs": {
|
|
23
|
-
"name": "this.GUI",
|
|
24
|
-
"title": "Docs for this.GUI",
|
|
25
|
-
"css": "style.css",
|
|
26
|
-
"trackingCode": "-",
|
|
27
|
-
"hideGenerator": false,
|
|
28
|
-
"navLinks": [
|
|
29
|
-
{
|
|
30
|
-
"label": "All.This",
|
|
31
|
-
"href": "https://suign.github.io/all.this/"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"label": "@Source",
|
|
35
|
-
"href": "https://suign.github.io/"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"label": "Github",
|
|
39
|
-
"href": "https://github.com/suiGn/this.GUI"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"label": "Cleaker.me",
|
|
43
|
-
"href": "https://cleaker.me"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"label": "What is all.this?",
|
|
47
|
-
"href": "https://www.neurons.me/all-this"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Incorporating such a broad spectrum of input types into this.gui makes it incredibly versatile and powerful, allowing for a rich blend of visual design and code. By accepting diverse input formats—ranging from mockups and blueprints to images—this.gui can serve as a comprehensive tool for constructing and refining user interfaces. Here's how you can structure this.gui and this.dom to handle and process these diverse input types:
|
|
2
|
-
|
|
3
|
-
Handling Various Input Types for this.gui:
|
|
4
|
-
Mockups and Blueprints:
|
|
5
|
-
|
|
6
|
-
For graphical mockups and blueprint data, this.gui could utilize image processing and pattern recognition algorithms to interpret layout structures, color schemes, and element relationships. Machine learning models could be trained to translate these visual inputs into actionable GUI structure data.
|
|
7
|
-
Pictures:
|
|
8
|
-
|
|
9
|
-
When provided with pictures, this.gui can employ computer vision techniques to identify common UI patterns, extract color themes, and suggest design elements. Advanced models could even deduce user interaction patterns or preferences based on common UI paradigms present in the images.
|
|
10
|
-
Code Snippets or Descriptions:
|
|
11
|
-
|
|
12
|
-
For more traditional inputs like code snippets (HTML/CSS/JS) or textual specifications, this.gui can parse and interpret the code or text to understand the intended GUI structure or behavior. Natural language processing (NLP) can be employed to extract meaningful information from textual descriptions.
|
|
13
|
-
Integration with Design Tools:
|
|
14
|
-
|
|
15
|
-
this.gui could offer integrations with popular design and prototyping tools, allowing designers to directly export their designs into this.gui for further processing, optimization, or integration into live projects.
|
|
16
|
-
Processing and Output Generation:
|
|
17
|
-
Transformation Engine: Develop a core engine within this.gui that takes the interpreted data from various inputs and transforms it into a standardized format or a set of actionable specifications for GUI construction.
|
|
18
|
-
|
|
19
|
-
Component Library: Maintain a library of UI components that can be dynamically assembled or modified based on the output of the transformation engine. This library should be flexible and extensible to accommodate a wide range of design aesthetics and functionality.
|
|
20
|
-
|
|
21
|
-
Adaptation and Optimization: Utilize machine learning to adapt and optimize GUI components based on user interactions, performance metrics, and design trends, ensuring that the output remains relevant and effective.
|
|
22
|
-
|
|
23
|
-
Output Delivery: Ensure that the final output of this.gui can be easily integrated into development workflows, providing developers with ready-to-use code, assets, and specifications for building or refining the user interface.
|
|
24
|
-
|
|
25
|
-
Extending to this.dom:
|
|
26
|
-
While this.gui focuses on the broader aspects of GUI creation and adaptation, this.dom can specialize in handling and manipulating DOM-specific structures, potentially bridging the gap between raw design inputs and actionable web content.
|
|
27
|
-
By embracing a wide array of input types and leveraging advanced processing techniques, this.gui can become an invaluable tool in the design and development process, seamlessly merging visual design with functional implementation and ongoing optimization.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// In guiFormatter.browser.js
|
|
2
|
-
export default class GUIFormatterBrowser {
|
|
3
|
-
constructor(guiInput) {
|
|
4
|
-
this.guiInput = guiInput;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
async process() {
|
|
8
|
-
// Browser-specific GUI processing logic
|
|
9
|
-
console.log('Processing GUI in Browser environment...');
|
|
10
|
-
return { /* processed GUI data */ };
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// In createGUIFormatter.js
|
|
2
|
-
import GUIFormatterNode from './nodejs/guiFormatter.node.js';
|
|
3
|
-
import GUIFormatterBrowser from './browser/guiFormatter.browser.js';
|
|
4
|
-
|
|
5
|
-
function isNode() {
|
|
6
|
-
return typeof window === 'undefined';
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function isBrowser() {
|
|
10
|
-
return typeof window !== 'undefined';
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export async function createGUIFormatter(guiInput) {
|
|
14
|
-
if (isNode()) {
|
|
15
|
-
return { formatter: new GUIFormatterNode(guiInput), error: null };
|
|
16
|
-
} else if (isBrowser()) {
|
|
17
|
-
return { formatter: new GUIFormatterBrowser(guiInput), error: null };
|
|
18
|
-
} else {
|
|
19
|
-
return { formatter: null, error: 'Unsupported environment' };
|
|
20
|
-
}
|
|
21
|
-
}
|
package/src/htmls/html.html
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>this.GUI HTML</title>
|
|
5
|
-
</head>
|
|
6
|
-
<body>
|
|
7
|
-
<p>Check twice the console for test output.</p>
|
|
8
|
-
<script type="module">
|
|
9
|
-
import thisGUI from '../index.js';
|
|
10
|
-
|
|
11
|
-
// Mock input for testing - replace with actual GUI input data or structure for a real test
|
|
12
|
-
const guiInput = {
|
|
13
|
-
type: 'mock', // Indicate this is mock data
|
|
14
|
-
content: 'This is a mock GUI input for browser test.'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
thisGUI(guiInput).then(processedGUI => {
|
|
18
|
-
console.log('Processed GUI in Browser:', processedGUI);
|
|
19
|
-
}).catch(error => {
|
|
20
|
-
console.error('Error processing GUI in Browser:', error);
|
|
21
|
-
});
|
|
22
|
-
</script>
|
|
23
|
-
</body>
|
|
24
|
-
</html>
|
package/src/htmls/layout.html
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Interactive GUI Layout</title>
|
|
6
|
-
</head>
|
|
7
|
-
<body>
|
|
8
|
-
<h1>Welcome to this.GUI</h1>
|
|
9
|
-
<p>Select a background color:</p>
|
|
10
|
-
<input type="color" id="backgroundColorPicker" onchange="changeBackgroundColor()">
|
|
11
|
-
<button onclick="saveBackgroundColor()">Save Background Color</button>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
// Function to change the background color
|
|
15
|
-
function changeBackgroundColor() {
|
|
16
|
-
var colorPicker = document.getElementById('backgroundColorPicker');
|
|
17
|
-
document.body.style.backgroundColor = colorPicker.value;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Function to save the background color to localStorage
|
|
21
|
-
function saveBackgroundColor() {
|
|
22
|
-
var colorPicker = document.getElementById('backgroundColorPicker');
|
|
23
|
-
localStorage.setItem('backgroundColor', colorPicker.value);
|
|
24
|
-
alert('Background color saved!');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// On load, set the background color from localStorage if it exists
|
|
28
|
-
document.addEventListener('DOMContentLoaded', (event) => {
|
|
29
|
-
var savedColor = localStorage.getItem('backgroundColor');
|
|
30
|
-
if (savedColor) {
|
|
31
|
-
document.body.style.backgroundColor = savedColor;
|
|
32
|
-
document.getElementById('backgroundColorPicker').value = savedColor;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
36
|
-
</body>
|
|
37
|
-
</html>
|
package/src/htmls/layout2.html
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Interactive GUI Layout</title>
|
|
6
|
-
<style>
|
|
7
|
-
/* Define basic themes */
|
|
8
|
-
:root {
|
|
9
|
-
--dark-bg-color: #333;
|
|
10
|
-
--dark-text-color: #f1f1f1;
|
|
11
|
-
|
|
12
|
-
--light-bg-color: #f1f1f1;
|
|
13
|
-
--light-text-color: #333;
|
|
14
|
-
|
|
15
|
-
--contrast-bg-color: #000;
|
|
16
|
-
--contrast-text-color: #fff;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
body.dark {
|
|
20
|
-
background-color: var(--dark-bg-color);
|
|
21
|
-
color: var(--dark-text-color);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
body.light {
|
|
25
|
-
background-color: var(--light-bg-color);
|
|
26
|
-
color: var(--light-text-color);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
body.contrast {
|
|
30
|
-
background-color: var(--contrast-bg-color);
|
|
31
|
-
color: var(--contrast-text-color);
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
34
|
-
</head>
|
|
35
|
-
<body>
|
|
36
|
-
<h1>Welcome to this.GUI</h1>
|
|
37
|
-
<p>Select a theme:</p>
|
|
38
|
-
<button onclick="changeTheme('dark')">Dark</button>
|
|
39
|
-
<button onclick="changeTheme('light')">Light</button>
|
|
40
|
-
<button onclick="changeTheme('contrast')">High Contrast</button>
|
|
41
|
-
|
|
42
|
-
<script>
|
|
43
|
-
// Function to change the theme
|
|
44
|
-
function changeTheme(theme) {
|
|
45
|
-
document.body.className = theme; // Set the class name on the body to change themes
|
|
46
|
-
localStorage.setItem('theme', theme); // Save the theme selection
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// On load, apply the saved theme
|
|
50
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
51
|
-
const savedTheme = localStorage.getItem('theme') || 'light'; // Default to light theme
|
|
52
|
-
document.body.className = savedTheme;
|
|
53
|
-
});
|
|
54
|
-
</script>
|
|
55
|
-
</body>
|
|
56
|
-
</html>
|
package/src/htmls/layout3.html
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Interactive GUI Layout</title>
|
|
6
|
-
<style>
|
|
7
|
-
/* Define basic themes with default colors */
|
|
8
|
-
:root {
|
|
9
|
-
--dark-bg-color: #333;
|
|
10
|
-
--dark-text-color: #f1f1f1;
|
|
11
|
-
|
|
12
|
-
--light-bg-color: #f1f1f1;
|
|
13
|
-
--light-text-color: #333;
|
|
14
|
-
|
|
15
|
-
--contrast-bg-color: #000;
|
|
16
|
-
--contrast-text-color: #fff;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
body.dark {
|
|
20
|
-
background-color: var(--dark-bg-color);
|
|
21
|
-
color: var(--dark-text-color);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
body.light {
|
|
25
|
-
background-color: var(--light-bg-color);
|
|
26
|
-
color: var(--light-text-color);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
body.contrast {
|
|
30
|
-
background-color: var(--contrast-bg-color);
|
|
31
|
-
color: var(--contrast-text-color);
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
34
|
-
</head>
|
|
35
|
-
<body>
|
|
36
|
-
<h1>Welcome to this.GUI</h1>
|
|
37
|
-
<p>Select a theme:</p>
|
|
38
|
-
<button onclick="changeTheme('dark')">Dark</button>
|
|
39
|
-
<button onclick="changeTheme('light')">Light</button>
|
|
40
|
-
<button onclick="changeTheme('contrast')">High Contrast</button>
|
|
41
|
-
|
|
42
|
-
<p>Select a background color for the chosen theme:</p>
|
|
43
|
-
<input type="color" id="backgroundColorPicker" onchange="changeBackgroundColor()">
|
|
44
|
-
<button onclick="saveBackgroundColor()">Save Background Color</button>
|
|
45
|
-
|
|
46
|
-
<script>
|
|
47
|
-
let currentTheme = localStorage.getItem('theme') || 'light';
|
|
48
|
-
|
|
49
|
-
// Function to change the theme and update the color picker and background color
|
|
50
|
-
function changeTheme(theme) {
|
|
51
|
-
currentTheme = theme;
|
|
52
|
-
document.body.className = theme;
|
|
53
|
-
localStorage.setItem('theme', theme);
|
|
54
|
-
|
|
55
|
-
// Load the saved color for the selected theme
|
|
56
|
-
const savedColor = localStorage.getItem(theme + 'BackgroundColor') || document.body.style.backgroundColor;
|
|
57
|
-
document.body.style.backgroundColor = savedColor;
|
|
58
|
-
document.getElementById('backgroundColorPicker').value = savedColor;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Function to change the background color based on the color picker's value
|
|
62
|
-
function changeBackgroundColor() {
|
|
63
|
-
const colorPicker = document.getElementById('backgroundColorPicker');
|
|
64
|
-
document.body.style.backgroundColor = colorPicker.value;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Function to save the background color for the current theme
|
|
68
|
-
function saveBackgroundColor() {
|
|
69
|
-
const colorPicker = document.getElementById('backgroundColorPicker');
|
|
70
|
-
localStorage.setItem(currentTheme + 'BackgroundColor', colorPicker.value);
|
|
71
|
-
alert('Background color saved for ' + currentTheme + ' theme!');
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// On load, apply the saved theme and its background color
|
|
75
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
76
|
-
changeTheme(currentTheme);
|
|
77
|
-
});
|
|
78
|
-
</script>
|
|
79
|
-
</body>
|
|
80
|
-
</html>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// In guiFormatter.node.js
|
|
2
|
-
export default class GUIFormatterNode {
|
|
3
|
-
constructor(guiInput) {
|
|
4
|
-
this.guiInput = guiInput;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
async process() {
|
|
8
|
-
// Node.js-specific GUI processing logic
|
|
9
|
-
console.log('Processing GUI in Node.js environment...');
|
|
10
|
-
return { /* processed GUI data */ };
|
|
11
|
-
}
|
|
12
|
-
}
|
package/src/this.GUI.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// this.GUI.js
|
|
2
|
-
import { createGUIFormatter } from './createGUIFormatter.js';
|
|
3
|
-
|
|
4
|
-
async function thisGUI(guiInput) {
|
|
5
|
-
let { formatter, error } = await createGUIFormatter(guiInput);
|
|
6
|
-
|
|
7
|
-
if (error) {
|
|
8
|
-
return { success: false, error };
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
const processedGUI = await formatter.process();
|
|
13
|
-
return { success: true, data: processedGUI };
|
|
14
|
-
} catch (processingError) {
|
|
15
|
-
return { success: false, error: processingError.message };
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default thisGUI;
|