@aiursoft/uistack 2.0.21 → 2.0.23
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 +76 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
<a name="uistackjs"></a>
|
|
2
|
+
|
|
3
|
+
# Aiursoft UIStack.js
|
|
2
4
|
|
|
3
5
|
[](https://gitlab.aiursoft.com/aiursoft/UIStack.js/-/pipelines) [](https://www.npmjs.com/package/@aiursoft/uistack)
|
|
4
6
|
|
|
5
7
|
Shared styles, scripts, fonts and images for Aiursoft applications.
|
|
6
8
|
|
|
7
|
-
##
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
### What is UIStack.js?
|
|
12
|
+
|
|
13
|
+
Shared styles, scripts, fonts and images for Aiursoft applications.
|
|
14
|
+
|
|
15
|
+
<a name="install"></a>
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Install the package in your project:
|
|
8
20
|
|
|
9
21
|
```bash
|
|
10
22
|
npm install @aiursoft/uistack
|
|
11
23
|
```
|
|
12
24
|
|
|
25
|
+
The npm package contains compiled `dist/` assets. Serve its CSS, JavaScript, fonts and images together so relative asset URLs remain valid. Node.js is needed to install or build the package, not to run the deployed browser assets.
|
|
26
|
+
|
|
13
27
|
## Usage
|
|
14
28
|
|
|
29
|
+
Save the following as `index.html` beside `node_modules/` and serve that directory over HTTP with your existing static-file server:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<!doctype html>
|
|
33
|
+
<html lang="en" data-bs-theme="light">
|
|
34
|
+
<meta charset="utf-8">
|
|
35
|
+
<title>UIStack example</title>
|
|
36
|
+
<link rel="stylesheet" href="./node_modules/@aiursoft/uistack/dist/css/app.css">
|
|
37
|
+
<body>
|
|
38
|
+
<main class="container py-4">
|
|
39
|
+
<h1>UIStack</h1>
|
|
40
|
+
<button class="btn btn-primary" type="button">Styled button</button>
|
|
41
|
+
</main>
|
|
42
|
+
<script src="./node_modules/@aiursoft/uistack/dist/js/app.js" defer></script>
|
|
43
|
+
</body>
|
|
44
|
+
</html>
|
|
45
|
+
```
|
|
46
|
+
|
|
15
47
|
```html
|
|
16
48
|
<link rel="stylesheet" href="./node_modules/@aiursoft/uistack/dist/css/app.css">
|
|
17
49
|
<script src="./node_modules/@aiursoft/uistack/dist/js/app.js" defer></script>
|
|
@@ -21,10 +53,52 @@ The npm package contains compiled `dist/` assets. ASP.NET Core components and th
|
|
|
21
53
|
|
|
22
54
|
UIStack 2.x no longer bundles Quill or exposes `window.Quill`. Applications that need a rich-text editor must provide one separately.
|
|
23
55
|
|
|
56
|
+
### Included assets
|
|
57
|
+
|
|
58
|
+
The bundle includes Bootstrap components, jQuery-based integrations, chart and table helpers, icons, theme controls and UTC timestamp formatting. It is a compiled application stack rather than a set of independently initialized ES modules. Load `app.js` once after the page markup is available; keep the generated asset directory structure intact.
|
|
59
|
+
|
|
60
|
+
### Related projects
|
|
61
|
+
|
|
62
|
+
Use the linked ASP.NET Core UIStack project for server-side components and the application demo. This npm repository supplies the shared static assets; it does not itself host an ASP.NET Core application.
|
|
63
|
+
|
|
64
|
+
## Configuration
|
|
65
|
+
|
|
66
|
+
The compiled assets are configured through page markup and browser state; there is no package-level configuration file or environment variable for consumers.
|
|
67
|
+
|
|
68
|
+
**Theme controls**
|
|
69
|
+
|
|
70
|
+
Set Bootstrap's `data-bs-theme` on the document element for the initial theme. A `.js-theme-toggle` element toggles the document's `data-bs-theme` and `data-sidebar-theme`, persists its choice under `appstack-config-theme`, and refreshes the shared CSS variables. The toggle uses `dark` and `default`; an optional `data-when-changed-post` URL receives JSON `{ "theme": "dark" }` or `{ "theme": "light" }`. The host application is responsible for that endpoint and its authorization/CSRF requirements.
|
|
71
|
+
|
|
72
|
+
**Components and time formatting**
|
|
73
|
+
|
|
74
|
+
Bootstrap popovers and tooltips use `data-bs-toggle`; the bundle exposes `window.bootstrap`. Elements with `data-utc-time` receive full localized timestamps and Bootstrap tooltips, including newly inserted or changed timestamp elements. Exposed `window.cssVariables` values are read from the active CSS custom properties. Other bundled plugins retain their own markup and initialization contracts.
|
|
75
|
+
|
|
76
|
+
**Building a customized bundle**
|
|
77
|
+
|
|
78
|
+
The entry point is [src/js/app.js](src/js/app.js); theme and layout styles are in [src/scss/app.scss](src/scss/app.scss). [webpack.config.js](webpack.config.js) defines generated resources. `NODE_ENV=production` enables the production build; the existing build command sets it automatically. Changing these sources requires rebuilding the package rather than setting runtime consumer options.
|
|
79
|
+
|
|
24
80
|
## Development
|
|
25
81
|
|
|
82
|
+
Install a supported Node.js release compatible with the locked build dependencies. The current build is verified with Node.js 24.
|
|
83
|
+
|
|
84
|
+
From the repository root, install the locked dependencies, run the existing checks and create a package:
|
|
85
|
+
|
|
26
86
|
```bash
|
|
27
87
|
npm ci
|
|
28
88
|
npm run check
|
|
29
89
|
npm pack
|
|
30
90
|
```
|
|
91
|
+
|
|
92
|
+
The existing checks run the production Webpack build. `npm pack` creates a local archive; it does not publish a release.
|
|
93
|
+
|
|
94
|
+
## How to contribute
|
|
95
|
+
|
|
96
|
+
There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.
|
|
97
|
+
|
|
98
|
+
Even if you have push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.
|
|
99
|
+
|
|
100
|
+
We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
Licensed under the [MIT License](LICENSE).
|