@sigmela/router 0.8.0 → 0.9.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/dist/router.css CHANGED
@@ -223,7 +223,14 @@
223
223
  isolation: isolate;
224
224
  }
225
225
 
226
+ /* Positioned here as well as by SheetSurface's utility classes, so the scrim
227
+ still covers the shell in apps without Tailwind. */
226
228
  .router-modal-backdrop {
229
+ pointer-events: auto;
230
+ position: absolute;
231
+ inset: 0;
232
+ padding: 0;
233
+ border: 0;
227
234
  background: var(--router-scrim);
228
235
  z-index: 0;
229
236
  }
@@ -491,6 +498,33 @@ html[data-router-shell='desktop-fullscreen'] #root {
491
498
  .router-modal-surface--content-sized {
492
499
  height: auto;
493
500
  }
501
+
502
+ /* A right panel anchors to the viewport edge in either shell mode, so it
503
+ escapes the contained column. Modal.tsx only adds these classes at this
504
+ width; below it the surface is the regular fullscreen modal. */
505
+ .router-overlay-shell.router-modal-shell.router-modal-shell--right {
506
+ inset: 0;
507
+ width: auto;
508
+ max-width: none;
509
+ margin-inline: 0;
510
+ align-items: stretch;
511
+ justify-content: flex-end;
512
+ }
513
+
514
+ .router-modal-shell--right > .router-modal-backdrop {
515
+ background: var(--router-scrim);
516
+ }
517
+
518
+ .router-overlay-shell.router-modal-shell--right
519
+ .router-modal-surface.router-modal-surface--right {
520
+ flex: 0 0 auto;
521
+ width: min(var(--router-modal-width, 393px), calc(100vw - 36px));
522
+ max-width: calc(100vw - 36px);
523
+ height: calc(100dvh - 36px);
524
+ max-height: calc(100dvh - 36px);
525
+ margin: 18px;
526
+ border-radius: 16px;
527
+ }
494
528
  }
495
529
 
496
530
  /* ==================== SPLIT VIEW ==================== */
@@ -0,0 +1,5 @@
1
+ export declare function useMediaQuery(query: string): boolean;
2
+ export declare function useMinWidth(minWidth: number): boolean;
3
+ /** Read once, at the moment an animation starts. */
4
+ export declare function prefersReducedMotion(): boolean;
5
+ //# sourceMappingURL=useMediaQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/utils/useMediaQuery.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CA+BpD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,oDAAoD;AACpD,wBAAgB,oBAAoB,IAAI,OAAO,CAM9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmela/router",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Native-feeling router for React web apps: screen stacks with gesture-driven back, modals, sheets, tab bars, drawers and split views.",
5
5
  "license": "MIT",
6
6
  "author": "Sigmela",