@sharadox/web-library 0.12.0-repository-standard.51 → 0.12.1-development.55
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of `@sharadox/web-library`, newest first.
|
|
4
4
|
|
|
5
|
+
## 0.12.1
|
|
6
|
+
|
|
7
|
+
isSoftNavigation reads the clock only once a soft navigation began, so pages using it prerender with Cache Components (no Date.now() during the server render).
|
|
8
|
+
|
|
5
9
|
## 0.12.0
|
|
6
10
|
|
|
7
11
|
newTab and leavesSite take the site's own domains: links to them and their subdomains stay in the same tab.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/navigation/soft-navigation/index.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAUhE;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,oBAAoB,SAAO,GAAG,IAAI,CAErE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/navigation/soft-navigation/index.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAUhE;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,oBAAoB,SAAO,GAAG,IAAI,CAErE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAI1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|
|
@@ -21,7 +21,9 @@ export function beginSoftNavigation(durationMilliseconds = 2000) {
|
|
|
21
21
|
* const [skipEntrance] = useState(isSoftNavigation);
|
|
22
22
|
*/
|
|
23
23
|
export function isSoftNavigation() {
|
|
24
|
-
|
|
24
|
+
// The clock is read only once a soft navigation began: never on the server, where a prerender refuses it.
|
|
25
|
+
const until = globalThis[KEY];
|
|
26
|
+
return until !== undefined && Date.now() < until;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* Marks the current document as rendered by a soft navigation (`<html data-soft-navigation>`), so CSS can turn off
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/navigation/soft-navigation/index.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;AAChE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAUhE;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,oBAAoB,GAAG,IAAI;IAC5D,UAAoB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,oBAAoB,CAAC;AACjE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB;IAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/navigation/soft-navigation/index.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;AAChE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAUhE;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,oBAAoB,GAAG,IAAI;IAC5D,UAAoB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,oBAAoB,CAAC;AACjE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB;IAC9B,0GAA0G;IAC1G,MAAM,KAAK,GAAI,UAAoB,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;AACnD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B;IACvC,UAA2B,CAAC,QAAQ,EAAE,eAAe,CAAC,YAAY,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;AACrG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB;IACtC,UAA2B,CAAC,QAAQ,EAAE,eAAe,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAC;AACpG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharadox/web-library",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1-development.55",
|
|
4
4
|
"description": "General TypeScript utilities shared by every Sharadox library and application: type guards, class names, HTML escaping, text joining, identifiers, math helpers and exhaustiveness checks.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|