this.gui 0.0.2 → 0.0.42

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,85 @@
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
+ Or using Yarn:
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
+ ```shell
16
+ yarn add this.gui
17
+ ```
14
18
 
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.
19
+ ## Usage
20
+
21
+ Include `this.gui` styles and scripts in your project to utilize the library.
22
+
23
+ ### Including Styles
24
+
25
+ Link the `this.gui.css` in your HTML or import it in your JavaScript entry file:
26
+
27
+ In HTML:
28
+
29
+ ```html
30
+ <link rel="stylesheet" href="/node_modules/this.gui/dist/this.gui.css">
31
+ ```
32
+
33
+ In JavaScript:
34
+
35
+ ```javascript
36
+ import 'this.gui/dist/this.gui.css';
37
+ ```
38
+
39
+ ### Including Scripts
40
+
41
+ Reference the `this.gui.js` in your HTML or import it if you're using a module bundler:
42
+
43
+ In HTML:
44
+
45
+ ```html
46
+ <script src="/node_modules/this.gui/dist/this.gui.js"></script>
47
+ ```
48
+
49
+ In JavaScript:
50
+
51
+ ```javascript
52
+ import 'this.gui';
53
+ ```
54
+
55
+ ## Themes
56
+
57
+ `this.gui` offers light and dark themes that can be toggled using the `data-theme` attribute:
58
+
59
+ ```html
60
+ <body data-theme="dark">
61
+ <!-- Content styled with the dark theme -->
62
+ </body>
63
+ ```
64
+
65
+ ## Components
66
+
67
+ To use `this.gui` components, add the respective classes to your HTML elements:
68
+
69
+ ```html
70
+ <button class="this-gui-button">Click Me</button>
71
+ <div class="this-gui-card">
72
+ <h3 class="this-gui-card-title">Card Title</h3>
73
+ <p class="this-gui-card-content">Card content...</p>
74
+ </div>
75
+ ```
76
+
77
+ Refer to the official [documentation](https://suign.github.io/GUI) for detailed usage instructions and component references.
78
+
79
+ ## Contribution
80
+
81
+ Contributions are welcome! To contribute to `this.gui`, please visit our [GitHub repository](https://github.com/suiGn/GUI).
82
+
83
+ ## License
84
+
85
+ `this.gui` is available under the MIT license. See the LICENSE file for more info.
@@ -0,0 +1 @@
1
+ :root{--primary: $primary-light;--secondary: $secondary-light}:root[data-theme=dark]{--primary: #bb86fc;--secondary: #03dac6}.my-custom-component{background-color:var(--primary);color:#fff}:root[data-theme=light]{--primary: #6200ee;--secondary: #03dac6}.my-custom-component{background-color:var(--primary);color:#000}.my-element{background-color:var(--primary)}:root[data-theme=dark]{--primary: #bb86fc;--secondary: #03dac6}.my-custom-component{background-color:var(--primary);color:#fff}:root[data-theme=light]{--primary: #6200ee;--secondary: #03dac6}.my-custom-component{background-color:var(--primary);color:#000}
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.thisGui=t():e.thisGui=t()}(self,(()=>(()=>{"use strict";var e={};return(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),e})()));
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.42",
4
4
  "description": "This Graphic User Interface.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -9,40 +9,28 @@
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
- },
39
21
  "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"
22
+ "material-components-web": "^14.0.0",
23
+ "sass": "^1.69.6"
24
+ },
25
+ "devDependencies": {
26
+ "@babel/core": "^7.23.7",
27
+ "@babel/preset-env": "^7.23.7",
28
+ "babel-loader": "^9.1.3",
29
+ "css-loader": "^6.8.1",
30
+ "mini-css-extract-plugin": "^2.7.6",
31
+ "sass-loader": "^13.3.3",
32
+ "style-loader": "^3.3.3",
33
+ "webpack": "^5.89.0",
34
+ "webpack-cli": "^5.1.4"
47
35
  }
48
36
  }
@@ -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
-