astrogators-shared-ui 0.17.3 → 0.17.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/THIRD-PARTY-LICENSES.md +107 -0
- package/dist/index.css +1 -1
- package/dist/index.js +295 -271
- package/dist/src/services/safeStorage.d.ts +21 -0
- package/package.json +4 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* localStorage that cannot take the app down. Internal — not exported from the
|
|
3
|
+
* package barrel.
|
|
4
|
+
*
|
|
5
|
+
* Merely touching `localStorage` throws a SecurityError when the browser blocks
|
|
6
|
+
* site data ("block all cookies", some in-app browsers, locked-down profiles),
|
|
7
|
+
* and `setItem` throws when the quota is full. `AuthProvider` reads the access
|
|
8
|
+
* token on mount, so an unguarded read here meant every app in the suite died
|
|
9
|
+
* before rendering anything.
|
|
10
|
+
*
|
|
11
|
+
* When storage is unavailable this falls back to an in-memory map for the life
|
|
12
|
+
* of the page: a login still works for the session (rather than silently not
|
|
13
|
+
* sticking) and nothing throws. It is deliberately not persistent — a reload
|
|
14
|
+
* or a full-page hop to another app starts logged out, which is the honest
|
|
15
|
+
* outcome when the browser won't let us store anything.
|
|
16
|
+
*/
|
|
17
|
+
export declare const safeStorage: {
|
|
18
|
+
getItem(key: string): string | null;
|
|
19
|
+
setItem(key: string, value: string): void;
|
|
20
|
+
removeItem(key: string): void;
|
|
21
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astrogators-shared-ui",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
4
4
|
"description": "Shared UI components and utilities for Astrogator's Table applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"./styles": "./dist/index.css"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"THIRD-PARTY-LICENSES.md"
|
|
18
19
|
],
|
|
19
20
|
"engines": {
|
|
20
21
|
"node": ">=24 <25"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
48
|
+
"@fontsource-variable/orbitron": "^5.3.0",
|
|
47
49
|
"@types/react": "^19.2.14",
|
|
48
50
|
"@types/react-dom": "^19.2.3",
|
|
49
51
|
"@vitejs/plugin-react": "^6.0.1",
|