stx-router 0.2.327 → 0.2.328

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.
Files changed (2) hide show
  1. package/dist/client.js +5 -2
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -810,7 +810,7 @@ else {
810
810
  if(!target||!target.focus)return;
811
811
  // The container is not naturally focusable. tabindex="-1" makes it
812
812
  // programmatically focusable without inserting it into the tab order.
813
- if(!target.hasAttribute('tabindex'))target.setAttribute('tabindex','-1');
813
+ if(!target.hasAttribute('tabindex')){target.setAttribute('tabindex','-1');target.setAttribute('data-stx-route-focus','')}
814
814
  // preventScroll because scroll position is already decided just above \u2014
815
815
  // focusing would otherwise fight scrollToTop and the hash scrollIntoView.
816
816
  try{target.focus({preventScroll:true})}catch(e){try{target.focus()}catch(e2){}}
@@ -2003,7 +2003,10 @@ else {
2003
2003
  var sanitize=function(v){return String(v).replace(/[;{}()"'\\\\<>\\n\\r\\t]/g,'')};
2004
2004
  var pc=sanitize(o.progressColor);
2005
2005
  var ph=sanitize(o.progressHeight);
2006
- var css='.stx-navigating{cursor:wait}.stx-navigating a,.stx-navigating button{pointer-events:none}#stx-router-progress{position:fixed;top:0;left:0;right:0;height:'+ph+';background:'+pc+';box-shadow:0 0 8px '+pc+',0 0 4px '+pc+';transform:scaleX(0);transform-origin:left;transition:transform .18s ease-out,opacity .26s ease;opacity:0;pointer-events:none;z-index:999999}';
2006
+ // The container the router focuses after a navigation is not a
2007
+ // control, so it draws no focus ring: Safari drew one around the whole
2008
+ // page, a blue line along its bottom edge on every screen.
2009
+ var css='[data-stx-route-focus]:focus{outline:none}.stx-navigating{cursor:wait}.stx-navigating a,.stx-navigating button{pointer-events:none}#stx-router-progress{position:fixed;top:0;left:0;right:0;height:'+ph+';background:'+pc+';box-shadow:0 0 8px '+pc+',0 0 4px '+pc+';transform:scaleX(0);transform-origin:left;transition:transform .18s ease-out,opacity .26s ease;opacity:0;pointer-events:none;z-index:999999}';
2007
2010
  if(o.viewTransitions&&'startViewTransition' in document){
2008
2011
  var dur=(o.viewTransitionDuration||220)+'ms';
2009
2012
  var ease=o.viewTransitionEasing||'cubic-bezier(0.16, 1, 0.3, 1)';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stx-router",
3
3
  "type": "module",
4
- "version": "0.2.327",
4
+ "version": "0.2.328",
5
5
  "description": "File-based router for STX — .stx template discovery, nested layouts, typed route params, middleware, and client-side SPA navigation.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",