jsswift 1.0.54 → 2.0.0
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/AI.md +10 -2
- package/README.md +2 -2
- package/dist/css/animation.css +36 -36
- package/dist/css/base.css +374 -374
- package/dist/css/docs.css +54 -54
- package/dist/css/fonts-nunito.css +2 -2
- package/dist/css/min-ui.css +1 -1
- package/dist/css/responsive-base.css +549 -549
- package/dist/css/responsive.css +3225 -3225
- package/dist/css/ui-components.css +2902 -2930
- package/dist/css/ui-light.css +3853 -3881
- package/dist/css/ui-light.min.css +1 -1
- package/dist/css/ui.css +6530 -6558
- package/dist/css/ui.min.css +1 -1
- package/dist/documentions/AI.md +10 -2
- package/dist/documentions/README.md +1 -0
- package/dist/documentions/application-rules.md +2 -2
- package/dist/documentions/components/toolbar.md +1 -1
- package/dist/documentions/examples/crud.md +5 -3
- package/dist/documentions/getting-started.md +4 -0
- package/dist/documentions/knowledge-map.json +22 -1
- package/dist/documentions/ui/themes.md +39 -0
- package/dist/jsswift.js +5685 -12485
- package/dist/jsswift.min.js +12 -12
- package/dist/min-jsswift.js +12 -12
- package/package.json +2 -2
package/AI.md
CHANGED
|
@@ -87,7 +87,9 @@ Dialog returns an API object, not a node to mount: `open(overrides?)`, `close()`
|
|
|
87
87
|
|
|
88
88
|
## Existing CSS and optional assets
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
CSS classes and theme variables use `jss-` (for example `--jss-primary`). Update old `cms-` overrides when upgrading; do not mix JS and CSS namespace versions.
|
|
91
|
+
|
|
92
|
+
The UI stylesheet includes component styles, theme variables, and responsive rules. Start with native components. Prefer documented `color`, `dense`, `padding`, `radius`, `shadow`, and breakpoint props to overrides of internal `.jss-*` classes. Read [common props](ui/common-props.md) only for an additional inherited prop; component-specific definitions take precedence. Use custom CSS for remaining page requirements.
|
|
91
93
|
|
|
92
94
|
For pages using component defaults and application-owned media queries, import `jsswift/css/ui-light.css` instead of `ui.css`. It retains base tokens, colors, `dense`/`outline`, layout and unprefixed sizing/spacing utilities. For `tablet`, `pc`/`desktop` or legacy breakpoint classes, additionally import `jsswift/css/responsive.css` **after** the light stylesheet. `ui.css` remains the complete compatible entry; do not import both full and light. The light entry keeps component-specific mobile rules and does not remove JavaScript props. `ui-light.min.css` is also available.
|
|
93
95
|
|
|
@@ -141,8 +143,14 @@ For taller catalogue fields, set the shared height variable on their application
|
|
|
141
143
|
|
|
142
144
|
```css
|
|
143
145
|
.catalogue-filters {
|
|
144
|
-
--
|
|
146
|
+
--jss-input-height-default: 40px;
|
|
145
147
|
}
|
|
146
148
|
```
|
|
147
149
|
|
|
148
150
|
Check the border, floating label, error message and keyboard focus at desktop and mobile sizes. A passing CRUD test does not verify these visual states. Keep failed server startup, retry incidents, cached input and uncached input separate when comparing repeated benchmark runs.
|
|
151
|
+
|
|
152
|
+
## Theme and lifecycle essentials
|
|
153
|
+
|
|
154
|
+
base.css is already included. Use `_.setTheme('dark')` or `_.setTheme('light')`; persistence defaults to `jsswift:theme`. At startup restore with `_.setTheme(_.getTheme())`. Customize the existing `--jss-primary-600`/`--jss-primary-700` palette values after the UI import. See [base CSS and themes](ui/themes.md) only for additional theme requirements.
|
|
155
|
+
|
|
156
|
+
Replace component subtrees with `_.mount(host, nextContent)` (default clear:true), which cleans up previous effects and subscriptions. Native `replaceChildren`/`innerHTML` alone do not run JSswift cleanup. Keep shared models owned by the application alive.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# JSswift
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**First read only [AI.md](AI.md), in a separate read operation.** It covers imports, rod field models, Input, Select, Button, Card, Table and Dialog. Implement its supported examples before opening additional contracts.
|
|
4
4
|
|
|
5
5
|
For an API absent from that guide, use [knowledge-map.json](dist/documentions/knowledge-map.json) to locate the exact document. Read only the relevant contract; avoid concatenating the component catalog or searching runtime bundles for documentation.
|
|
6
6
|
|
|
7
|
-
Import `jsswift` and `jsswift/css/ui.css
|
|
7
|
+
Import `jsswift` and `jsswift/css/ui-light.css`; add `jsswift/css/responsive.css` when using breakpoint props. `ui.css` remains the complete alternative. Component CSS is included; fonts and Tabler are optional. The read-only `@jsswift/knowledge-mcp` is an optional discovery interface when configured in your AI client.
|
package/dist/css/animation.css
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
2
|
+
--jss-anim-dur: 500ms;
|
|
3
|
+
--jss-anim-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
|
|
4
|
+
--jss-anim-distance: 12px;
|
|
5
|
+
--jss-anim-scale: 0.98;
|
|
6
|
+
--jss-anim-in: jss-fade-in;
|
|
7
|
+
--jss-anim-out: jss-fade-out;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
11
|
-
animation-duration: var(--
|
|
12
|
-
animation-timing-function: var(--
|
|
10
|
+
.jss-animate {
|
|
11
|
+
animation-duration: var(--jss-anim-dur);
|
|
12
|
+
animation-timing-function: var(--jss-anim-ease);
|
|
13
13
|
animation-fill-mode: both;
|
|
14
14
|
will-change: opacity, transform;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.
|
|
18
|
-
animation-name: var(--
|
|
17
|
+
.jss-animate.in {
|
|
18
|
+
animation-name: var(--jss-anim-in);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
22
|
-
animation-name: var(--
|
|
21
|
+
.jss-animate.out {
|
|
22
|
+
animation-name: var(--jss-anim-out);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.
|
|
26
|
-
animation-name:
|
|
25
|
+
.jss-animate.fade.in {
|
|
26
|
+
animation-name: jss-fade-in;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
30
|
-
animation-name:
|
|
29
|
+
.jss-animate.fade.out {
|
|
30
|
+
animation-name: jss-fade-out;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.
|
|
34
|
-
animation-name:
|
|
33
|
+
.jss-animate.slide.in {
|
|
34
|
+
animation-name: jss-slide-in;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.
|
|
38
|
-
animation-name:
|
|
37
|
+
.jss-animate.slide.out {
|
|
38
|
+
animation-name: jss-slide-out;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.
|
|
42
|
-
animation-name:
|
|
41
|
+
.jss-animate.scale.in {
|
|
42
|
+
animation-name: jss-scale-in;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.
|
|
46
|
-
animation-name:
|
|
45
|
+
.jss-animate.scale.out {
|
|
46
|
+
animation-name: jss-scale-out;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
@keyframes
|
|
49
|
+
@keyframes jss-fade-in {
|
|
50
50
|
from {
|
|
51
51
|
opacity: 0;
|
|
52
52
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
@keyframes
|
|
59
|
+
@keyframes jss-fade-out {
|
|
60
60
|
from {
|
|
61
61
|
opacity: 1;
|
|
62
62
|
}
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
@keyframes
|
|
69
|
+
@keyframes jss-slide-in {
|
|
70
70
|
from {
|
|
71
71
|
opacity: 0;
|
|
72
|
-
transform: translateY(var(--
|
|
72
|
+
transform: translateY(var(--jss-anim-distance));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
to {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
@keyframes
|
|
81
|
+
@keyframes jss-slide-out {
|
|
82
82
|
from {
|
|
83
83
|
opacity: 1;
|
|
84
84
|
transform: translateY(0);
|
|
@@ -86,14 +86,14 @@
|
|
|
86
86
|
|
|
87
87
|
to {
|
|
88
88
|
opacity: 0;
|
|
89
|
-
transform: translateY(var(--
|
|
89
|
+
transform: translateY(var(--jss-anim-distance));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
@keyframes
|
|
93
|
+
@keyframes jss-scale-in {
|
|
94
94
|
from {
|
|
95
95
|
opacity: 0;
|
|
96
|
-
transform: scale(var(--
|
|
96
|
+
transform: scale(var(--jss-anim-scale));
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
to {
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
@keyframes
|
|
105
|
+
@keyframes jss-scale-out {
|
|
106
106
|
from {
|
|
107
107
|
opacity: 1;
|
|
108
108
|
transform: scale(1);
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
|
|
111
111
|
to {
|
|
112
112
|
opacity: 0;
|
|
113
|
-
transform: scale(var(--
|
|
113
|
+
transform: scale(var(--jss-anim-scale));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
@media (prefers-reduced-motion: reduce) {
|
|
118
|
-
.
|
|
118
|
+
.jss-animate {
|
|
119
119
|
animation-duration: 1ms;
|
|
120
120
|
}
|
|
121
121
|
}
|