this.gui 0.0.2 → 0.0.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/README.md CHANGED
@@ -1,15 +1,83 @@
1
- Consistent Theming: By wrapping MUI or any other UI framework inside your GUI package, you can set a consistent theme, typography, and other styles that will be common across all the apps where you use this package. This ensures brand consistency.
1
+ # This.GUI
2
2
 
3
- Custom Components: You can build upon MUI components to create higher-level components tailored for your needs. For instance, you might have a custom UserAvatar component that integrates with your user system or a DataGrid tailored for your backend's data format.
3
+ `this.gui` is a comprehensive UI toolkit for web development, providing both pre-styled components and customizable themes for building responsive and modern user interfaces for [all.this](neurons.me/this).
4
4
 
5
- Integrated Logic: The GUI package can contain not just visual components but also logic. For instance, a LoginForm component can have integrated authentication logic that talks to your backend directly. This simplifies the usage in actual apps.
5
+ ## Installation
6
6
 
7
- Utilities & Helpers: Apart from components, you can also have utility functions and hooks. For instance, a useUser() hook that fetches and manages the user's state.
7
+ Install `this.gui` via npm:
8
8
 
9
- Extendability: You can set up your GUI package in a way that while it provides a default theme and behavior, individual projects can customize or extend them as needed.
9
+ ```shell
10
+ npm install this.gui
11
+ ```
10
12
 
11
- Version Control: Changes in the UI/UX can be versioned. If you update a component's look or behavior in the GUI package and bump the version, you can choose when to adopt these changes in your various projects by updating the package version.
13
+ this.gui serve a dual purpose: one as a utility provider for GUI-related functionalities across your technologies and another as a data provider for neural networks. Let's break down how this.gui could serve these two roles:
12
14
 
13
- Documentation: You can maintain a single documentation site/source for your custom GUI package, making it easier for your team (and potentially third-party developers) to understand and use your components.
15
+ GUI Provider (Utility Role): As a utility, this.gui can offer a consistent set of GUI components or services that other parts of your technology stack can use. This can include anything from standard UI elements to complex interaction patterns. By centralizing your GUI logic and components, you ensure consistency and reusability across your projects, which aligns well with it being categorized under utilities.
14
16
 
15
- Dependency Management: With a single GUI package, you can manage the versions of MUI or other dependencies in one place. This can make updates and maintenance easier, especially if breaking changes are introduced in the UI libraries you depend on.
17
+ Data Provider for Neural Networks (Data Role): The more intriguing role of this.gui involves transforming GUI interactions or states into data that can be fed into neural networks. This can be achieved in several ways, depending on what aspects of the GUI you wish to analyze or learn from:
18
+
19
+ Interaction Data: Capturing user interactions with the GUI (clicks, navigation patterns, usage sequences, etc.) can provide valuable data for understanding user behavior or improving user experience.
20
+
21
+ State Data: The state of the GUI at various points in time can offer insights into how users reach certain states, which can be used to optimize workflows or detect common issues.
22
+
23
+ Visual Data: If the neural network is designed to work with visual data, screenshots or GUI element properties can be transformed into a format suitable for neural network input. This can be used for tasks like automated GUI testing, layout analysis, or even generating GUI designs.
24
+
25
+ To facilitate these dual roles, your this.gui package might include different modules or subcomponents dedicated to each function. For instance, one module could focus on providing utility functions and components, while another could handle data extraction and transformation for neural network inputs.
26
+
27
+ ## Usage
28
+ Include `this.gui` styles and scripts in your project to utilize the library.
29
+
30
+ ### Including Styles
31
+ Link the `this.gui.css` in your HTML or import it in your JavaScript entry file:
32
+
33
+ In HTML:
34
+ ```html
35
+ <link rel="stylesheet" href="/node_modules/this.gui/dist/this.gui.css">
36
+ ```
37
+
38
+ In JavaScript:
39
+ ```javascript
40
+ import 'this.gui/dist/this.gui.css';
41
+ ```
42
+
43
+ ### Including Scripts
44
+ Reference the `this.gui.js` in your HTML or import it if you're using a module bundler:
45
+
46
+ In HTML:
47
+ ```html
48
+ <script src="/node_modules/this.gui/dist/this.gui.js"></script>
49
+ ```
50
+
51
+ In JavaScript:
52
+ ```javascript
53
+ import 'this.gui';
54
+ ```
55
+
56
+ ## Themes
57
+ `this.gui` offers light and dark themes that can be toggled using the `data-theme` attribute:
58
+ ```html
59
+ <body data-theme="dark">
60
+ <!-- Content styled with the dark theme -->
61
+ </body>
62
+ ```
63
+
64
+ ## Components
65
+ To use `this.gui` components, add the respective classes to your HTML elements:
66
+
67
+ ```html
68
+ <button class="this-gui-button">Click Me</button>
69
+ <div class="this-gui-card">
70
+ <h3 class="this-gui-card-title">Card Title</h3>
71
+ <p class="this-gui-card-content">Card content...</p>
72
+ </div>
73
+ ```
74
+
75
+ Refer to the official [documentation](https://suign.github.io/GUI) for detailed usage instructions and component references.
76
+
77
+ ## Contribution
78
+
79
+ Contributions are welcome! To contribute to `this.gui`, please visit our [GitHub repository](https://github.com/suiGn/GUI).
80
+
81
+ ## License
82
+
83
+ `this.gui` is available under the MIT license. See the LICENSE file for more info.
package/index.js CHANGED
@@ -0,0 +1,3 @@
1
+ import './src/styles.scss';
2
+
3
+
package/jsdoc.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "source": {
3
- "include": ["./src", "./src/index.ts"],
3
+ "include": ["./src", "./index.js"],
4
4
  "includePattern": "\\.(js|jsx|ts|tsx)$",
5
5
  "excludePattern": "(node_modules/|docs)"
6
6
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "this.gui",
3
- "version": "0.0.2",
3
+ "version": "0.0.5",
4
4
  "description": "This Graphic User Interface.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -9,40 +9,29 @@
9
9
  "url": "git+https://github.com/suiGn/GUI.git"
10
10
  },
11
11
  "scripts": {
12
- "build": "tsc",
13
- "test": "jest"
12
+ "build": "webpack --mode production",
13
+ "test": "jest",
14
+ "build-css": "sass src/styles:dist/css"
14
15
  },
15
16
  "homepage": "https://www.npmjs.com/package/this.gui",
16
17
  "docs": "https://suiGn.github.io/GUI",
17
18
  "author": "suiGn",
18
19
  "license": "MIT",
19
20
  "repoType": "NPM Package",
20
- "devDependencies": {
21
- "@babel/core": "^7.23.6",
22
- "@babel/preset-env": "^7.23.6",
23
- "@babel/preset-react": "^7.23.3",
24
- "@testing-library/jest-dom": "^6.1.6",
25
- "@testing-library/react": "^14.1.2",
26
- "@types/jest": "^29.5.11",
27
- "@types/react": "^18.2.46",
28
- "@types/react-dom": "^18.2.18",
29
- "@types/testing-library__react": "^10.2.0",
30
- "babel-jest": "^29.7.0",
31
- "jest": "^29.7.0",
32
- "jest-environment-jsdom": "^29.7.0",
33
- "jsdom": "^23.0.1",
34
- "ts-jest": "^29.1.1",
35
- "typedoc": "^0.25.4",
36
- "typedoc-material-theme": "^1.0.1",
37
- "typescript": "^5.3.3"
38
- },
21
+ "category": "dataformatter",
39
22
  "dependencies": {
40
- "@emotion/react": "^11.11.3",
41
- "@emotion/styled": "^11.11.0",
42
- "@fontsource/inter": "^5.0.16",
43
- "@mui/joy": "^5.0.0-beta.20",
44
- "@mui/material": "^5.15.2",
45
- "react": "^18.2.0",
46
- "react-dom": "^18.2.0"
23
+ "material-components-web": "^14.0.0",
24
+ "sass": "^1.69.6"
25
+ },
26
+ "devDependencies": {
27
+ "@babel/core": "^7.23.7",
28
+ "@babel/preset-env": "^7.23.7",
29
+ "babel-loader": "^9.1.3",
30
+ "css-loader": "^6.8.1",
31
+ "mini-css-extract-plugin": "^2.7.6",
32
+ "sass-loader": "^13.3.3",
33
+ "style-loader": "^3.3.3",
34
+ "webpack": "^5.89.0",
35
+ "webpack-cli": "^5.1.4"
47
36
  }
48
37
  }
@@ -0,0 +1,34 @@
1
+ const path = require('path');
2
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
+
4
+ module.exports = {
5
+ entry: './index.js', // Main entry point of your library
6
+ output: {
7
+ path: path.resolve(__dirname, 'dist'),
8
+ filename: 'this.gui.js', // Output file
9
+ library: 'thisGui', // Global var when included via script tag
10
+ libraryTarget: 'umd',
11
+ },
12
+ module: {
13
+ rules: [
14
+ {
15
+ test: /\.js$/,
16
+ use: 'babel-loader',
17
+ exclude: /node_modules/,
18
+ },
19
+ {
20
+ test: /\.scss$/,
21
+ use: [
22
+ MiniCssExtractPlugin.loader,
23
+ 'css-loader',
24
+ 'sass-loader'
25
+ ],
26
+ },
27
+ ],
28
+ },
29
+ plugins: [
30
+ new MiniCssExtractPlugin({
31
+ filename: 'this.gui.css', // Output CSS file
32
+ }),
33
+ ],
34
+ };
package/babel.config.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["@babel/preset-env", "@babel/preset-react"]
3
- }
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5", // Specify ECMAScript target version
4
- "module": "commonjs", // Specify module code generation
5
- "lib": ["es6", "dom"], // Specify library files to be included in the compilation
6
- "sourceMap": true, // Generates corresponding '.map' file
7
- "outDir": "./dist", // Redirect output structure to the directory
8
- "rootDir": "./src", // Specify the root directory of input files
9
- "strict": true, // Enable all strict type-checking options
10
- "noImplicitAny": true, // Raise error on expressions and declarations with an implied 'any' type
11
- "moduleResolution": "node", // Select module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)
12
- "esModuleInterop": true, // Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports
13
- "skipLibCheck": true, // Skip type checking of declaration files
14
- "forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file
15
- "jsx": "react" // Support JSX in '.tsx' files: 'preserve', 'react-native', or 'react'
16
- },
17
- "include": ["src/**/*"],
18
- "exclude": ["node_modules", "tests", "dist"]
19
- }
package/typedoc.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "theme": "default",
3
- "entryPoints": ["src/index.ts"],
4
- "out": "./docs",
5
- "exclude": ["**/node_modules/**"],
6
- "readme": "README.md",
7
- "includeVersion": true, // Include TypeScript version in the generated documentation
8
- "excludeExternals": true, // Exclude external dependencies from documentation
9
- "excludePrivate": true, // Exclude private members from documentation
10
- "excludeProtected": true, // Exclude protected members from documentation
11
- "tsconfig": "tsconfig.json" // Path to your TypeScript configuration file
12
- }
13
-