mtrl-addons 0.2.2 → 0.2.4
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/{src/components/index.ts → dist/components/index.d.ts} +0 -2
- package/dist/components/vlist/config.d.ts +86 -0
- package/{src/components/vlist/constants.ts → dist/components/vlist/constants.d.ts} +10 -11
- package/dist/components/vlist/features/api.d.ts +7 -0
- package/{src/components/vlist/features/index.ts → dist/components/vlist/features/index.d.ts} +0 -2
- package/dist/components/vlist/features/selection.d.ts +6 -0
- package/dist/components/vlist/features/viewport.d.ts +9 -0
- package/dist/components/vlist/features.d.ts +31 -0
- package/{src/components/vlist/index.ts → dist/components/vlist/index.d.ts} +1 -10
- package/dist/components/vlist/types.d.ts +596 -0
- package/dist/components/vlist/vlist.d.ts +29 -0
- package/dist/core/compose/features/gestures/index.d.ts +86 -0
- package/dist/core/compose/features/gestures/longpress.d.ts +85 -0
- package/dist/core/compose/features/gestures/pan.d.ts +108 -0
- package/dist/core/compose/features/gestures/pinch.d.ts +111 -0
- package/dist/core/compose/features/gestures/rotate.d.ts +111 -0
- package/dist/core/compose/features/gestures/swipe.d.ts +149 -0
- package/dist/core/compose/features/gestures/tap.d.ts +79 -0
- package/{src/core/compose/features/index.ts → dist/core/compose/features/index.d.ts} +1 -2
- package/{src/core/compose/index.ts → dist/core/compose/index.d.ts} +2 -11
- package/{src/core/gestures/index.ts → dist/core/gestures/index.d.ts} +1 -20
- package/dist/core/gestures/longpress.d.ts +23 -0
- package/dist/core/gestures/manager.d.ts +14 -0
- package/dist/core/gestures/pan.d.ts +12 -0
- package/dist/core/gestures/pinch.d.ts +14 -0
- package/dist/core/gestures/rotate.d.ts +14 -0
- package/dist/core/gestures/swipe.d.ts +20 -0
- package/dist/core/gestures/tap.d.ts +12 -0
- package/dist/core/gestures/types.d.ts +320 -0
- package/dist/core/gestures/utils.d.ts +57 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/layout/config.d.ts +33 -0
- package/dist/core/layout/index.d.ts +51 -0
- package/dist/core/layout/jsx.d.ts +65 -0
- package/dist/core/layout/schema.d.ts +112 -0
- package/dist/core/layout/types.d.ts +69 -0
- package/dist/core/viewport/constants.d.ts +105 -0
- package/dist/core/viewport/features/base.d.ts +14 -0
- package/dist/core/viewport/features/collection.d.ts +41 -0
- package/dist/core/viewport/features/events.d.ts +13 -0
- package/{src/core/viewport/features/index.ts → dist/core/viewport/features/index.d.ts} +0 -7
- package/dist/core/viewport/features/item-size.d.ts +30 -0
- package/dist/core/viewport/features/loading.d.ts +34 -0
- package/dist/core/viewport/features/momentum.d.ts +17 -0
- package/dist/core/viewport/features/performance.d.ts +53 -0
- package/dist/core/viewport/features/placeholders.d.ts +38 -0
- package/dist/core/viewport/features/rendering.d.ts +16 -0
- package/dist/core/viewport/features/scrollbar.d.ts +26 -0
- package/dist/core/viewport/features/scrolling.d.ts +16 -0
- package/dist/core/viewport/features/utils.d.ts +43 -0
- package/dist/core/viewport/features/virtual.d.ts +18 -0
- package/{src/core/viewport/index.ts → dist/core/viewport/index.d.ts} +1 -17
- package/dist/core/viewport/types.d.ts +96 -0
- package/dist/core/viewport/utils/speed-tracker.d.ts +22 -0
- package/dist/core/viewport/viewport.d.ts +11 -0
- package/{src/index.ts → dist/index.d.ts} +0 -4
- package/dist/index.js +5143 -0
- package/dist/index.mjs +5111 -0
- package/dist/styles.css +254 -0
- package/dist/styles.css.map +1 -0
- package/package.json +16 -2
- package/.cursorrules +0 -117
- package/AI.md +0 -39
- package/CLAUDE.md +0 -882
- package/build.js +0 -377
- package/index.ts +0 -7
- package/scripts/analyze-orphaned-functions.ts +0 -387
- package/scripts/debug/vlist-selection.ts +0 -121
- package/src/components/vlist/config.ts +0 -323
- package/src/components/vlist/features/api.ts +0 -626
- package/src/components/vlist/features/selection.ts +0 -436
- package/src/components/vlist/features/viewport.ts +0 -59
- package/src/components/vlist/features.ts +0 -112
- package/src/components/vlist/types.ts +0 -723
- package/src/components/vlist/vlist.ts +0 -92
- package/src/core/compose/features/gestures/index.ts +0 -227
- package/src/core/compose/features/gestures/longpress.ts +0 -383
- package/src/core/compose/features/gestures/pan.ts +0 -424
- package/src/core/compose/features/gestures/pinch.ts +0 -475
- package/src/core/compose/features/gestures/rotate.ts +0 -485
- package/src/core/compose/features/gestures/swipe.ts +0 -492
- package/src/core/compose/features/gestures/tap.ts +0 -334
- package/src/core/gestures/longpress.ts +0 -68
- package/src/core/gestures/manager.ts +0 -418
- package/src/core/gestures/pan.ts +0 -48
- package/src/core/gestures/pinch.ts +0 -58
- package/src/core/gestures/rotate.ts +0 -58
- package/src/core/gestures/swipe.ts +0 -66
- package/src/core/gestures/tap.ts +0 -45
- package/src/core/gestures/types.ts +0 -387
- package/src/core/gestures/utils.ts +0 -128
- package/src/core/index.ts +0 -43
- package/src/core/layout/config.ts +0 -102
- package/src/core/layout/index.ts +0 -168
- package/src/core/layout/jsx.ts +0 -174
- package/src/core/layout/schema.ts +0 -1044
- package/src/core/layout/types.ts +0 -95
- package/src/core/viewport/constants.ts +0 -145
- package/src/core/viewport/features/base.ts +0 -73
- package/src/core/viewport/features/collection.ts +0 -1182
- package/src/core/viewport/features/events.ts +0 -130
- package/src/core/viewport/features/item-size.ts +0 -271
- package/src/core/viewport/features/loading.ts +0 -263
- package/src/core/viewport/features/momentum.ts +0 -269
- package/src/core/viewport/features/performance.ts +0 -161
- package/src/core/viewport/features/placeholders.ts +0 -335
- package/src/core/viewport/features/rendering.ts +0 -962
- package/src/core/viewport/features/scrollbar.ts +0 -434
- package/src/core/viewport/features/scrolling.ts +0 -634
- package/src/core/viewport/features/utils.ts +0 -94
- package/src/core/viewport/features/virtual.ts +0 -525
- package/src/core/viewport/types.ts +0 -133
- package/src/core/viewport/utils/speed-tracker.ts +0 -79
- package/src/core/viewport/viewport.ts +0 -265
- package/test/benchmarks/layout/advanced.test.ts +0 -656
- package/test/benchmarks/layout/comparison.test.ts +0 -519
- package/test/benchmarks/layout/performance-comparison.test.ts +0 -274
- package/test/benchmarks/layout/real-components.test.ts +0 -733
- package/test/benchmarks/layout/simple.test.ts +0 -321
- package/test/benchmarks/layout/stress.test.ts +0 -990
- package/test/collection/basic.test.ts +0 -304
- package/test/components/vlist-selection.test.ts +0 -240
- package/test/components/vlist.test.ts +0 -63
- package/test/core/collection/adapter.test.ts +0 -161
- package/test/core/collection/collection.test.ts +0 -394
- package/test/core/layout/layout.test.ts +0 -201
- package/test/utils/dom-helpers.ts +0 -275
- package/test/utils/performance-helpers.ts +0 -392
- package/tsconfig.json +0 -20
package/dist/styles.css
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a color with alpha transparency using RGB values
|
|
3
|
+
* This version uses string.unquote to preserve the rgba function correctly
|
|
4
|
+
* @param {String} $key - Color token name
|
|
5
|
+
* @param {Number} $opacity - Opacity value (0-1)
|
|
6
|
+
* @return {String} rgba CSS function with variable
|
|
7
|
+
*/
|
|
8
|
+
@keyframes placeholder-pulse {
|
|
9
|
+
0%, 100% {
|
|
10
|
+
opacity: 0.6;
|
|
11
|
+
}
|
|
12
|
+
50% {
|
|
13
|
+
opacity: 0.4;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
@keyframes fade-in {
|
|
17
|
+
from {
|
|
18
|
+
opacity: 0.6;
|
|
19
|
+
}
|
|
20
|
+
to {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
@keyframes item-updated {
|
|
25
|
+
0% {
|
|
26
|
+
background-color: rgba(var(--mtrl-sys-color-primary-rgb), 0.25);
|
|
27
|
+
box-shadow: inset 0 0 0 2px rgba(var(--mtrl-sys-color-primary-rgb), 0.4);
|
|
28
|
+
}
|
|
29
|
+
100% {
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
box-shadow: inset 0 0 0 2px transparent;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.mtrl-vlist {
|
|
35
|
+
position: relative;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
min-height: 100px;
|
|
39
|
+
background-color: var(--mtrl-sys-color-surface);
|
|
40
|
+
border: 2px solid var(--mtrl-sys-color-outline-variant);
|
|
41
|
+
border-radius: 3px;
|
|
42
|
+
transition: background-color 400ms cubic-bezier(0.2, 0, 0, 1);
|
|
43
|
+
contain: layout style paint;
|
|
44
|
+
transform: translateZ(0);
|
|
45
|
+
backface-visibility: hidden;
|
|
46
|
+
}
|
|
47
|
+
.mtrl-vlist--selection {
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
.mtrl-vlist--selection .mtrl-viewport-item:hover {
|
|
51
|
+
background-color: rgba(var(--mtrl-sys-color-on-surface-variant-rgb), 0.1);
|
|
52
|
+
}
|
|
53
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected,
|
|
54
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected:hover {
|
|
55
|
+
background-color: var(--mtrl-sys-color-secondary-container);
|
|
56
|
+
color: var(--mtrl-sys-color-on-secondary-container);
|
|
57
|
+
transition: background-color 400ms cubic-bezier(0.2, 0, 0, 1), color 400ms cubic-bezier(0.2, 0, 0, 1);
|
|
58
|
+
}
|
|
59
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected .mtrl-vlist-item-leading, .mtrl-vlist--selection .mtrl-viewport-item--selected .mtrl-vlist-item-trailing, .mtrl-vlist--selection .mtrl-viewport-item--selected .mtrl-vlist-item-supporting, .mtrl-vlist--selection .mtrl-viewport-item--selected .mtrl-vlist-item-overline, .mtrl-vlist--selection .mtrl-viewport-item--selected .mtrl-vlist-item-meta,
|
|
60
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected:hover .mtrl-vlist-item-leading,
|
|
61
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected:hover .mtrl-vlist-item-trailing,
|
|
62
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected:hover .mtrl-vlist-item-supporting,
|
|
63
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected:hover .mtrl-vlist-item-overline,
|
|
64
|
+
.mtrl-vlist--selection .mtrl-viewport-item--selected:hover .mtrl-vlist-item-meta {
|
|
65
|
+
color: var(--mtrl-sys-color-on-secondary-container);
|
|
66
|
+
transition: color 400ms cubic-bezier(0.2, 0, 0, 1);
|
|
67
|
+
}
|
|
68
|
+
.mtrl-vlist--disabled {
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
opacity: 0.38;
|
|
71
|
+
transition: opacity 400ms cubic-bezier(0.2, 0, 0, 1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mtrl-viewport {
|
|
75
|
+
position: relative;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
}
|
|
80
|
+
.mtrl-viewport-items {
|
|
81
|
+
position: relative;
|
|
82
|
+
width: 100%;
|
|
83
|
+
height: 100%;
|
|
84
|
+
padding: 8px 0;
|
|
85
|
+
will-change: transform;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mtrl-viewport-item {
|
|
89
|
+
user-select: none;
|
|
90
|
+
opacity: 1;
|
|
91
|
+
transition: opacity 400ms cubic-bezier(0.2, 0, 0, 1);
|
|
92
|
+
will-change: transform;
|
|
93
|
+
}
|
|
94
|
+
.mtrl-viewport-item--replaced {
|
|
95
|
+
animation: fade-in 0.3s ease-out;
|
|
96
|
+
}
|
|
97
|
+
.mtrl-viewport-item--updated, .mtrl-viewport-item--updated > * {
|
|
98
|
+
animation: item-updated 0.6s ease-out;
|
|
99
|
+
}
|
|
100
|
+
.mtrl-viewport-item .item--updated {
|
|
101
|
+
animation: item-updated 0.6s ease-out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mtrl-viewport-item {
|
|
105
|
+
padding: 11px 12px;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: start;
|
|
108
|
+
transition: background-color 0.2s ease;
|
|
109
|
+
min-height: 48px;
|
|
110
|
+
left: 0;
|
|
111
|
+
right: 0;
|
|
112
|
+
width: 100%;
|
|
113
|
+
will-change: transform;
|
|
114
|
+
contain: layout style;
|
|
115
|
+
gap: 16px;
|
|
116
|
+
color: var(--mtrl-sys-color-on-surface);
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.mtrl-viewport-item__avatar,
|
|
121
|
+
.mtrl-viewport-item__image {
|
|
122
|
+
width: 40px;
|
|
123
|
+
height: 40px;
|
|
124
|
+
margin-top: 4px;
|
|
125
|
+
border-radius: 50%;
|
|
126
|
+
background-color: var(--mtrl-sys-color-primary-container);
|
|
127
|
+
color: white;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
font-weight: bold;
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mtrl-viewport-item__details {
|
|
136
|
+
flex: 1;
|
|
137
|
+
min-width: 0;
|
|
138
|
+
margin-left: 12px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.mtrl-viewport-item__headline {
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.mtrl-viewport-item__text {
|
|
146
|
+
font-size: 14px;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
text-overflow: ellipsis;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.mtrl-viewport-item__meta {
|
|
153
|
+
color: var(--mtrl-sys-color-on-surface-variant);
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
margin-top: 2px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.mtrl-viewport-item--placeholder {
|
|
159
|
+
opacity: 0.6;
|
|
160
|
+
animation: placeholder-pulse 2s ease-in-out infinite;
|
|
161
|
+
}
|
|
162
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__headline,
|
|
163
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__text,
|
|
164
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__meta {
|
|
165
|
+
position: relative;
|
|
166
|
+
display: inline-block;
|
|
167
|
+
font-size: 0.8em;
|
|
168
|
+
color: transparent;
|
|
169
|
+
background-color: var(--mtrl-sys-color-on-surface);
|
|
170
|
+
border-radius: 0.1em;
|
|
171
|
+
opacity: 0.4;
|
|
172
|
+
text-decoration: none;
|
|
173
|
+
line-height: 1;
|
|
174
|
+
padding: 0 0 0.05em;
|
|
175
|
+
vertical-align: middle;
|
|
176
|
+
}
|
|
177
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__text,
|
|
178
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__meta {
|
|
179
|
+
margin-top: 0.2em;
|
|
180
|
+
}
|
|
181
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__meta {
|
|
182
|
+
font-size: 10px;
|
|
183
|
+
}
|
|
184
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__user-headline,
|
|
185
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__user-text {
|
|
186
|
+
text-transform: capitalize;
|
|
187
|
+
}
|
|
188
|
+
.mtrl-viewport-item--placeholder .mtrl-viewport-item__avatar {
|
|
189
|
+
background-color: var(--mtrl-sys-color-primary-container);
|
|
190
|
+
color: var(--mtrl-sys-color-primary-container);
|
|
191
|
+
opacity: 1;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.mtrl-viewport__scrollbar {
|
|
195
|
+
position: absolute;
|
|
196
|
+
top: 0;
|
|
197
|
+
right: 0;
|
|
198
|
+
width: 8px;
|
|
199
|
+
height: 100%;
|
|
200
|
+
padding: 0;
|
|
201
|
+
opacity: 0;
|
|
202
|
+
transition: opacity 0.3s ease;
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
z-index: 10;
|
|
205
|
+
}
|
|
206
|
+
.mtrl-viewport__scrollbar--visible, .mtrl-viewport__scrollbar--dragging, .mtrl-viewport__scrollbar:hover {
|
|
207
|
+
opacity: 1;
|
|
208
|
+
}
|
|
209
|
+
.mtrl-viewport__scrollbar:hover {
|
|
210
|
+
background: rgba(0, 0, 0, 0.05);
|
|
211
|
+
}
|
|
212
|
+
.mtrl-viewport__scrollbar-thumb {
|
|
213
|
+
position: absolute;
|
|
214
|
+
top: 0;
|
|
215
|
+
width: 6px;
|
|
216
|
+
padding: 1px;
|
|
217
|
+
background: rgba(0, 0, 0, 0.3);
|
|
218
|
+
border-radius: 4px;
|
|
219
|
+
will-change: transform;
|
|
220
|
+
cursor: grab;
|
|
221
|
+
transition: background 0.2s ease;
|
|
222
|
+
}
|
|
223
|
+
.mtrl-viewport__scrollbar-thumb:hover {
|
|
224
|
+
background: rgba(0, 0, 0, 0.5);
|
|
225
|
+
}
|
|
226
|
+
.mtrl-viewport__scrollbar-thumb:active, .mtrl-viewport__scrollbar-thumb--dragging {
|
|
227
|
+
cursor: grabbing;
|
|
228
|
+
background: rgba(0, 0, 0, 0.6);
|
|
229
|
+
transition: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media (prefers-color-scheme: dark) {
|
|
233
|
+
.mtrl-viewport__scrollbar {
|
|
234
|
+
background: transparent;
|
|
235
|
+
}
|
|
236
|
+
.mtrl-viewport__scrollbar-thumb {
|
|
237
|
+
background: rgba(255, 255, 255, 0.4);
|
|
238
|
+
}
|
|
239
|
+
.mtrl-viewport__scrollbar-thumb:hover {
|
|
240
|
+
background: rgba(255, 255, 255, 0.6);
|
|
241
|
+
}
|
|
242
|
+
.mtrl-viewport__scrollbar-thumb:active, .mtrl-viewport__scrollbar-thumb--dragging {
|
|
243
|
+
background: rgba(255, 255, 255, 0.4);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
247
|
+
.mtrl-viewport-item {
|
|
248
|
+
text-rendering: optimizeLegibility;
|
|
249
|
+
-webkit-font-smoothing: antialiased;
|
|
250
|
+
-moz-osx-font-smoothing: grayscale;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/*# sourceMappingURL=styles.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../mtrl/src/styles/abstract/_theme.scss","../src/styles/components/_vlist.scss"],"names":[],"mappings":"AAkDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACpBA;EACI;IAEI;;EAEJ;IACI;;;AAIR;EACI;IACI;;EAEJ;IACI;;;AAIR;EACI;IACI;IACA;;EAEJ;IACI;IACA;;;AAQR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAjDY;EAoDZ;EACA;EACA;;AAGA;EACI;;AACA;EACI;;AAGJ;AAAA;EAEI;EACA;EACA;;AASI;AAAA;AAAA;AAAA;AAAA;AAAA;EAKI;EACA,YAnFD;;AA0Ff;EACI;EACA;EACA,YA3Fa;;;AAmGrB;EACI;EACA;EACA;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;;;AAIR;EACI;EACA;EACA,YAtHiB;EAuHjB;;AAEA;EACI;;AAGJ;EAEI;;AAIJ;EACI;;;AAIR;EACI;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;AAAA;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EAEI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAOJ;EACI;EACA;;AAGA;AAAA;AAAA;EAGI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;AAAA;EAEI;;AAGJ;EACI;;AAIJ;AAAA;EAEI;;AAIJ;EACI;EACA;EACA;;;AAQR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EAGI;;AAGJ;EACI;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EAEI;EACA;EACA;;;AASZ;EACI;IACI;;EAEA;IACI;;EAEA;IACI;;EAGJ;IAEI;;;AAWhB;EACI;IACI;IACA;IACA","file":"styles.css"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mtrl-addons",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Additional components and utilities for the mtrl system, featuring forms, specialized elements, and extended functionality for modern applications",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "index.
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./styles": "./dist/styles.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src/styles"
|
|
20
|
+
],
|
|
7
21
|
"scripts": {
|
|
8
22
|
"build": "bun run ./build.js",
|
|
9
23
|
"build:app": "bun run ../mtrl-app/build.js",
|
package/.cursorrules
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# mtrl-addons Package Development Rules
|
|
2
|
-
|
|
3
|
-
## Package Overview
|
|
4
|
-
|
|
5
|
-
mtrl-addons is an extension library for the mtrl Material Design 3 component system, providing specialized elements and extended functionality for modern applications. It maintains the same "less is more" philosophy with zero external dependencies (mtrl as peer dependency only).
|
|
6
|
-
|
|
7
|
-
## Environment & Architecture
|
|
8
|
-
|
|
9
|
-
- Part of workspace alongside mtrl and mtrl-app packages
|
|
10
|
-
- mtrl-app serves as the information hub with documentation and showcases
|
|
11
|
-
- Follows mtrl core architecture patterns and conventions
|
|
12
|
-
- Primary dependency: mtrl
|
|
13
|
-
|
|
14
|
-
## Development Philosophy
|
|
15
|
-
|
|
16
|
-
- Follow "less is more" philosophy - minimalist but complete
|
|
17
|
-
- Optimize for size, memory usage, and speed
|
|
18
|
-
- Keep modules small and reusable for bundling
|
|
19
|
-
- Find root causes and fix problems elegantly with minimal code
|
|
20
|
-
- Avoid over-engineering and workarounds
|
|
21
|
-
|
|
22
|
-
## Pre-Development Checklist
|
|
23
|
-
|
|
24
|
-
1. Check if functionality already exists in mtrl (mtrl/src/core)
|
|
25
|
-
2. Check mtrl styles system (mtrl/src/styles) before creating new styles
|
|
26
|
-
3. Create tests first (mtrl-addons/test/) - test-driven development
|
|
27
|
-
4. Use mtrl-app/docs for all documentation (no .md files in this package)
|
|
28
|
-
|
|
29
|
-
## Code Standards
|
|
30
|
-
|
|
31
|
-
### TypeScript & Structure
|
|
32
|
-
|
|
33
|
-
- Use TypeScript for all components
|
|
34
|
-
- Follow mtrl component and core structure conventions
|
|
35
|
-
- Use pipe pattern for core and component composition
|
|
36
|
-
- Add comprehensive TypeDoc comments for all public APIs
|
|
37
|
-
- Maintain zero external dependencies policy
|
|
38
|
-
|
|
39
|
-
### CSS & Styling
|
|
40
|
-
|
|
41
|
-
- No inline CSS - use external SCSS files in src/styles/
|
|
42
|
-
- Follow BEM naming: mtrl-component\_\_element--modifier
|
|
43
|
-
- Use mtrl styles system as foundation
|
|
44
|
-
|
|
45
|
-
### File Management
|
|
46
|
-
|
|
47
|
-
- Prefer editing existing files over creating new ones
|
|
48
|
-
- Avoid hyphens in filenames if possible
|
|
49
|
-
- Prefer short filenames if clear enough
|
|
50
|
-
- If you need to create html or js debugging files, just ./debugging folder (will be .git ignored)
|
|
51
|
-
- No summary .md files for coding sessions
|
|
52
|
-
- Component and Core usual ts files: index, main(module name), types, constant, api(special feature), features
|
|
53
|
-
- If features become to large, create a folder and split the file by concern ans move api in it if appropriate
|
|
54
|
-
|
|
55
|
-
### Component Development
|
|
56
|
-
|
|
57
|
-
- Follow established mtrl component patterns (config, types, constants, features)
|
|
58
|
-
- Always use functional composition over class inheritance
|
|
59
|
-
- Implement proper lifecycle management
|
|
60
|
-
- Ensure accessibility compliance - this is important!
|
|
61
|
-
- Focus on the specific issue when fixing bugs - avoid enhancements during fixes
|
|
62
|
-
|
|
63
|
-
## Testing Rules
|
|
64
|
-
|
|
65
|
-
- Use Bun test runner for all tests
|
|
66
|
-
- Mock components to avoid circular dependencies
|
|
67
|
-
- Always use JSDOM for DOM testing
|
|
68
|
-
- Comprehensive but lightweight tests
|
|
69
|
-
- Follow test-first development approach
|
|
70
|
-
|
|
71
|
-
## Showcase & Documentation
|
|
72
|
-
|
|
73
|
-
- Create showcases in mtrl-app/client/content only and follow the hierarchy
|
|
74
|
-
- Always use mtrl components via layout system (mtrl-app/docs/layout/usages.md)
|
|
75
|
-
- Prefer array-based layout schema
|
|
76
|
-
- Format schema following the formatting convention (mtrl-app/docs/core/layout/array-schema.md)
|
|
77
|
-
- Avoid manual DOM element creation in showcases
|
|
78
|
-
- Never inline CSS in showcases
|
|
79
|
-
- Focus on demonstrating component capabilities
|
|
80
|
-
- Keep the showcases small, maintainable and readable
|
|
81
|
-
|
|
82
|
-
## Build & Deployment
|
|
83
|
-
|
|
84
|
-
- Build using `bun run build:app` not `bun run build`
|
|
85
|
-
- Fix TypeScript declaration errors immediately
|
|
86
|
-
- Do not start development servers (bun/node)
|
|
87
|
-
- Follow conventional commit format
|
|
88
|
-
- Use `bun run build` for package builds
|
|
89
|
-
- Ensure compatibility with both ES modules and CommonJS
|
|
90
|
-
|
|
91
|
-
## Performance & Optimization
|
|
92
|
-
|
|
93
|
-
- When enhancing/optimizing/refactoring: focus on size, memory usage, and speed
|
|
94
|
-
- Minimize bundle size impact
|
|
95
|
-
- Avoid unnecessary re-renders or DOM manipulations
|
|
96
|
-
- Use efficient algorithms and data structures
|
|
97
|
-
- Design for tree-shaking compatibility
|
|
98
|
-
|
|
99
|
-
## Extension Development
|
|
100
|
-
|
|
101
|
-
- Build upon mtrl core without duplicating functionality
|
|
102
|
-
- Create specialized components not found in base mtrl package
|
|
103
|
-
- Ensure seamless integration with mtrl component ecosystem
|
|
104
|
-
- Maintain API consistency with mtrl patterns
|
|
105
|
-
- Design for modularity - components should be importable individually
|
|
106
|
-
|
|
107
|
-
## Prohibited Actions
|
|
108
|
-
|
|
109
|
-
- Do not use React (pure TypeScript/JavaScript library)
|
|
110
|
-
- Do not create markdown documentation for enhancements
|
|
111
|
-
- Do not run server commands
|
|
112
|
-
- Do not create workarounds or hacks
|
|
113
|
-
- Do not duplicate mtrl core functionality
|
|
114
|
-
- Do not enhance during bug fixes - stay focused on the issue
|
|
115
|
-
- Do not harcode prefix
|
|
116
|
-
- Do not use global Window object to store things
|
|
117
|
-
- Do not build using bun run build (this is used for package build, use bun run build:app)
|
package/AI.md
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# AI Assistant Guide
|
|
2
|
-
|
|
3
|
-
## 👋 Hello AI Assistant!
|
|
4
|
-
|
|
5
|
-
This project uses **CLAUDE.md** as the primary development guide and documentation for AI assistants.
|
|
6
|
-
|
|
7
|
-
### If you are Claude:
|
|
8
|
-
→ **See [CLAUDE.md](./CLAUDE.md)** for complete development guidelines
|
|
9
|
-
|
|
10
|
-
### If you are another AI assistant:
|
|
11
|
-
→ **See [CLAUDE.md](./CLAUDE.md)** for complete development guidelines
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Quick Links
|
|
16
|
-
|
|
17
|
-
- **[CLAUDE.md](./CLAUDE.md)** - Complete development guide
|
|
18
|
-
- Project overview and architecture
|
|
19
|
-
- VList component with virtual scrolling
|
|
20
|
-
- Viewport system for virtual positioning
|
|
21
|
-
- Layout schema for declarative UI (JSX-like)
|
|
22
|
-
- Gesture system for touch interactions
|
|
23
|
-
- Development philosophy and standards
|
|
24
|
-
- TypeScript and SCSS guidelines
|
|
25
|
-
- Testing strategy and performance benchmarks
|
|
26
|
-
- Integration with mtrl core
|
|
27
|
-
- Git commit/push rules
|
|
28
|
-
|
|
29
|
-
- **[mtrl](../mtrl/CLAUDE.md)** - Core Material Design 3 library
|
|
30
|
-
- **[mtrl-app](../mtrl-app/.cursorrules)** - Documentation and showcase
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
**Package:** mtrl-addons - Extended Components for mtrl
|
|
35
|
-
**Philosophy:** "Less is more" - Zero dependencies (mtrl peer only)
|
|
36
|
-
**Key Features:** VList (virtual list), Viewport system, Layout schema, Gesture handling
|
|
37
|
-
**Documentation:** Everything you need is in CLAUDE.md
|
|
38
|
-
|
|
39
|
-
Enjoy building with mtrl-addons! 🚀
|