@pablozaiden/webapp 1.3.0 → 1.3.2

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
@@ -34,7 +34,8 @@ The web export includes `Presence`, `Collapsible`, `AsyncState`, `AnimatedList`,
34
34
  `Tabs`, `TabPanels`, and `TabPanel`. Use stable React keys with `AnimatedList`;
35
35
  it preserves removed keyed children for the exit duration and marks them
36
36
  inaccessible while they leave. The primitives honor
37
- `prefers-reduced-motion` and skip visual movement when it is enabled.
37
+ `prefers-reduced-motion`; transient appearance animations use opacity-only
38
+ fades, while structural primitives such as `Collapsible` animate their layout.
38
39
 
39
40
  ```tsx
40
41
  <AnimatedList>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pablozaiden/webapp",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Opinionated Bun + React webapp framework for single-server apps",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -143,7 +143,17 @@ export function AppShell({
143
143
  tabIndex={0}
144
144
  aria-label="Close sidebar"
145
145
  aria-hidden={state === "exit" ? true : undefined}
146
- onClick={closeSidebar}
146
+ onPointerDown={(event) => {
147
+ if (event.button === 0) {
148
+ event.preventDefault();
149
+ closeSidebar();
150
+ }
151
+ }}
152
+ onClick={(event) => {
153
+ if (event.detail === 0) {
154
+ closeSidebar();
155
+ }
156
+ }}
147
157
  onKeyDown={(event) => {
148
158
  if (event.key === "Enter" || event.key === " ") {
149
159
  event.preventDefault();
@@ -683,16 +683,22 @@ textarea::placeholder {
683
683
  }
684
684
 
685
685
  @keyframes wapp-view-transition-old {
686
+ from {
687
+ opacity: 1;
688
+ }
689
+
686
690
  to {
687
691
  opacity: 0;
688
- transform: translateY(calc(var(--wapp-motion-distance) * -1));
689
692
  }
690
693
  }
691
694
 
692
695
  @keyframes wapp-view-transition-new {
693
696
  from {
694
697
  opacity: 0;
695
- transform: translateY(var(--wapp-motion-distance));
698
+ }
699
+
700
+ to {
701
+ opacity: 1;
696
702
  }
697
703
  }
698
704
 
@@ -708,24 +714,20 @@ textarea::placeholder {
708
714
  @keyframes wapp-fade-in {
709
715
  from {
710
716
  opacity: 0;
711
- transform: translateY(var(--wapp-motion-distance));
712
717
  }
713
718
 
714
719
  to {
715
720
  opacity: 1;
716
- transform: translateY(0);
717
721
  }
718
722
  }
719
723
 
720
724
  @keyframes wapp-fade-out {
721
725
  from {
722
726
  opacity: 1;
723
- transform: translateY(0);
724
727
  }
725
728
 
726
729
  to {
727
730
  opacity: 0;
728
- transform: translateY(calc(var(--wapp-motion-distance) * -1));
729
731
  }
730
732
  }
731
733
 
@@ -1341,7 +1343,6 @@ textarea::placeholder {
1341
1343
 
1342
1344
  .wapp-floating-panel {
1343
1345
  z-index: 1000;
1344
- transform-origin: top left;
1345
1346
  }
1346
1347
 
1347
1348
  .wapp-floating-panel.wapp-motion-enter {
@@ -1355,58 +1356,48 @@ textarea::placeholder {
1355
1356
  @keyframes wapp-floating-panel-enter {
1356
1357
  from {
1357
1358
  opacity: 0;
1358
- transform: translateY(0.25rem) scale(0.98);
1359
1359
  }
1360
1360
 
1361
1361
  to {
1362
1362
  opacity: 1;
1363
- transform: translateY(0) scale(1);
1364
1363
  }
1365
1364
  }
1366
1365
 
1367
1366
  @keyframes wapp-floating-panel-exit {
1368
1367
  from {
1369
1368
  opacity: 1;
1370
- transform: translateY(0) scale(1);
1371
1369
  }
1372
1370
 
1373
1371
  to {
1374
1372
  opacity: 0;
1375
- transform: translateY(0.25rem) scale(0.98);
1376
1373
  }
1377
1374
  }
1378
1375
 
1379
1376
  .wapp-action-menu.wapp-motion-enter {
1380
- transform-origin: top right;
1381
1377
  animation-name: wapp-menu-enter;
1382
1378
  }
1383
1379
 
1384
1380
  .wapp-action-menu.wapp-motion-exit {
1385
- transform-origin: top right;
1386
1381
  animation-name: wapp-menu-exit;
1387
1382
  }
1388
1383
 
1389
1384
  @keyframes wapp-menu-enter {
1390
1385
  from {
1391
1386
  opacity: 0;
1392
- transform: translateY(-0.25rem) scale(0.98);
1393
1387
  }
1394
1388
 
1395
1389
  to {
1396
1390
  opacity: 1;
1397
- transform: translateY(0) scale(1);
1398
1391
  }
1399
1392
  }
1400
1393
 
1401
1394
  @keyframes wapp-menu-exit {
1402
1395
  from {
1403
1396
  opacity: 1;
1404
- transform: translateY(0) scale(1);
1405
1397
  }
1406
1398
 
1407
1399
  to {
1408
1400
  opacity: 0;
1409
- transform: translateY(-0.25rem) scale(0.98);
1410
1401
  }
1411
1402
  }
1412
1403
 
@@ -1947,12 +1938,10 @@ textarea::placeholder {
1947
1938
  @keyframes wapp-toast-enter {
1948
1939
  from {
1949
1940
  opacity: 0;
1950
- transform: translateY(0.5rem);
1951
1941
  }
1952
1942
 
1953
1943
  to {
1954
1944
  opacity: 1;
1955
- transform: translateY(0);
1956
1945
  }
1957
1946
  }
1958
1947
 
@@ -1966,9 +1955,12 @@ textarea::placeholder {
1966
1955
  }
1967
1956
 
1968
1957
  @keyframes wapp-toast-exit {
1958
+ from {
1959
+ opacity: 1;
1960
+ }
1961
+
1969
1962
  to {
1970
1963
  opacity: 0;
1971
- transform: translateY(0.25rem);
1972
1964
  }
1973
1965
  }
1974
1966
 
@@ -2255,36 +2247,11 @@ textarea::placeholder {
2255
2247
  background: var(--wapp-surface);
2256
2248
  padding: 0;
2257
2249
  box-shadow: 0 24px 55px rgb(0 0 0 / 0.38);
2258
- animation: wapp-dialog-enter var(--wapp-motion-fast) var(--wapp-motion-ease) both;
2259
- }
2260
-
2261
- .wapp-dialog.wapp-motion-exit,
2262
- .wapp-modal.wapp-motion-exit {
2263
- animation-name: wapp-dialog-exit;
2264
- }
2265
-
2266
- @keyframes wapp-dialog-enter {
2267
- from {
2268
- opacity: 0;
2269
- transform: translate(-50%, calc(-50% + 0.5rem)) scale(0.98);
2270
- }
2271
-
2272
- to {
2273
- opacity: 1;
2274
- transform: translate(-50%, -50%) scale(1);
2275
- }
2250
+ animation: wapp-fade-in var(--wapp-motion-fast) var(--wapp-motion-ease) both;
2276
2251
  }
2277
2252
 
2278
- @keyframes wapp-dialog-exit {
2279
- from {
2280
- opacity: 1;
2281
- transform: translate(-50%, -50%) scale(1);
2282
- }
2283
-
2284
- to {
2285
- opacity: 0;
2286
- transform: translate(-50%, calc(-50% + 0.5rem)) scale(0.98);
2287
- }
2253
+ .wapp-dialog.wapp-motion-exit {
2254
+ animation-name: wapp-fade-out;
2288
2255
  }
2289
2256
 
2290
2257
  .wapp-dialog-title {
@@ -2385,7 +2352,11 @@ textarea::placeholder {
2385
2352
  background: var(--wapp-surface);
2386
2353
  box-shadow: 0 24px 55px rgb(0 0 0 / 0.38);
2387
2354
  outline: none;
2388
- animation: wapp-dialog-enter var(--wapp-motion-fast) var(--wapp-motion-ease) both;
2355
+ animation: wapp-fade-in var(--wapp-motion-fast) var(--wapp-motion-ease) both;
2356
+ }
2357
+
2358
+ .wapp-modal.wapp-motion-exit {
2359
+ animation-name: wapp-fade-out;
2389
2360
  }
2390
2361
 
2391
2362
  .wapp-modal-sm {