2021-11-01 16:42:52 -06:00
|
|
|
{
|
2021-11-02 10:26:07 -06:00
|
|
|
"name": "wrolpi-app",
|
2021-11-01 16:42:52 -06:00
|
|
|
"version": "0.1.0",
|
|
|
|
|
"private": true,
|
|
|
|
|
"dependencies": {
|
2026-03-29 18:58:31 -06:00
|
|
|
"@acalcutt/maplibre-contour-pmtiles": "^0.1.2",
|
2023-01-07 18:31:39 -07:00
|
|
|
"@artsy/fresnel": "^6.1.0",
|
2024-11-02 15:14:02 -06:00
|
|
|
"@cypress/react18": "^2.0.1",
|
2023-01-07 18:53:22 -07:00
|
|
|
"@testing-library/react": "^13.4.0",
|
2023-01-31 18:08:07 -07:00
|
|
|
"@testing-library/user-event": "^13.5.0",
|
2024-11-02 15:14:02 -06:00
|
|
|
"cypress": "^13.15.2",
|
2026-04-04 19:49:36 +00:00
|
|
|
"lodash": "^4.18.1",
|
2026-06-03 18:05:08 -06:00
|
|
|
"maplibre-gl": "^5.24.0",
|
2026-04-10 22:51:14 +00:00
|
|
|
"mathjs": "^15.2.0",
|
2026-06-03 18:05:08 -06:00
|
|
|
"pmtiles": "^4.4.1",
|
2026-03-29 18:58:31 -06:00
|
|
|
"protomaps-themes-base": "^4.5.0",
|
2026-06-03 18:05:08 -06:00
|
|
|
"query-string": "^9.4.0",
|
2023-01-07 18:31:39 -07:00
|
|
|
"react": "^18.2.0",
|
2026-06-03 18:05:08 -06:00
|
|
|
"react-colorful": "^5.7.0",
|
2023-01-07 18:31:39 -07:00
|
|
|
"react-dom": "^18.2.0",
|
2023-01-31 18:08:07 -07:00
|
|
|
"react-dropzone": "^14.2.3",
|
2026-06-03 18:05:08 -06:00
|
|
|
"react-hotkeys-hook": "^5.3.2",
|
|
|
|
|
"react-qr-code": "^2.0.21",
|
|
|
|
|
"react-router": "^7.16.0",
|
2023-01-31 18:08:07 -07:00
|
|
|
"react-scripts": "5.0.1",
|
|
|
|
|
"react-semantic-toasts-2": "^0.6.7",
|
2024-05-08 18:37:46 -06:00
|
|
|
"react-stl-viewer": "^2.5.0",
|
2023-01-31 18:08:07 -07:00
|
|
|
"semantic-ui-offline": "^2.5.0",
|
2026-06-03 18:05:08 -06:00
|
|
|
"semantic-ui-react": "^2.1.5",
|
|
|
|
|
"three": "^0.184",
|
Add PWA: installable app, offline calculators, read-only Inventory
Make the React app an installable PWA whose app shell, calculators
(incl. the One Time Pad), and Inventory work offline. Driving use case:
reference an inventory (e.g. Fasteners) from an iPhone with no connection.
Phase 1 — service worker (Workbox InjectManifest, production build only):
- service-worker.js: precache the shell (calculators work offline),
NavigationRoute for deep links, NetworkFirst cache of GET /api/inventory
and /api/inventory/catalog (wrolpi-inventory), NetworkOnly /api/status.
- serviceWorkerRegistration.js + registration in index.js.
- Add workbox-* runtime deps (pinned 6.5.4 to match CRA's bundled plugin).
Phase 2 — offline hardening + read-only Inventory:
- api.js maps offline fetch failures (TypeError / timeout / !navigator.onLine)
to ApiDownError so the existing nav apiDown indicator lights up.
- toast.js wrapper swallows error toasts while offline; repoint the toast
import in the 13 files that raise them (App.js container left as-is).
- PwaContext (usePwa() -> {offline, isStandalone}), provider mounted in
App.js inside StatusProvider. Default offline:false so components render
without the provider in tests.
- Inventory is read-only offline: InventoryRoute disables the edit buttons
and shows a banner; InventoryTable hides the new-item row, checkboxes and
delete, and disables click-to-edit. Values stay visible for reference.
Phase 3 — iOS Add-to-Home-Screen meta tags in public/index.html.
Verified end-to-end against the real API: SW caches the inventory, then with
the origin stopped the cached inventory still renders read-only (reactively
and on cold reload). All 676 Jest tests pass (incl. new InventoryTable
offline tests).
Media "Save for offline" + a Downloads list are intentionally deferred.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 15:21:25 -06:00
|
|
|
"web-vitals": "^5.3.0",
|
|
|
|
|
"workbox-cacheable-response": "^6.5.4",
|
|
|
|
|
"workbox-core": "^6.5.4",
|
|
|
|
|
"workbox-precaching": "^6.5.4",
|
|
|
|
|
"workbox-routing": "^6.5.4",
|
|
|
|
|
"workbox-strategies": "^6.5.4"
|
2021-11-01 16:42:52 -06:00
|
|
|
},
|
|
|
|
|
"scripts": {
|
|
|
|
|
"start": "react-scripts start",
|
2025-10-29 22:16:33 -06:00
|
|
|
"build": "BROWSERSLIST_IGNORE_OLD_DATA=true react-scripts build",
|
2021-11-01 16:42:52 -06:00
|
|
|
"test": "react-scripts test",
|
2025-10-29 22:16:33 -06:00
|
|
|
"eject": "react-scripts eject",
|
|
|
|
|
"cy:run": "cypress run",
|
|
|
|
|
"cy:open": "cypress open"
|
2021-11-01 16:42:52 -06:00
|
|
|
},
|
|
|
|
|
"eslintConfig": {
|
2023-01-31 18:08:07 -07:00
|
|
|
"extends": [
|
2024-11-02 15:14:02 -06:00
|
|
|
"react-app"
|
2023-01-31 18:08:07 -07:00
|
|
|
]
|
2021-11-01 16:42:52 -06:00
|
|
|
},
|
|
|
|
|
"browserslist": {
|
|
|
|
|
"production": [
|
|
|
|
|
">0.2%",
|
|
|
|
|
"not dead",
|
|
|
|
|
"not op_mini all"
|
|
|
|
|
],
|
|
|
|
|
"development": [
|
|
|
|
|
"last 1 chrome version",
|
|
|
|
|
"last 1 firefox version",
|
|
|
|
|
"last 1 safari version"
|
|
|
|
|
]
|
2025-10-29 22:16:33 -06:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
2025-12-07 11:32:07 -07:00
|
|
|
"@testing-library/jest-dom": "^6.9.1",
|
2026-06-03 18:05:08 -06:00
|
|
|
"@types/lodash": "^4.17.24",
|
|
|
|
|
"@types/node": "^25.9.1",
|
2025-12-07 11:32:07 -07:00
|
|
|
"@types/react": "^18.3.17",
|
|
|
|
|
"@types/react-dom": "^18.3.5",
|
|
|
|
|
"typescript": "^4.9.5"
|
2025-12-26 18:59:13 -07:00
|
|
|
},
|
|
|
|
|
"jest": {
|
|
|
|
|
"transformIgnorePatterns": [
|
|
|
|
|
"node_modules/(?!(react-hotkeys-hook)/)"
|
|
|
|
|
]
|
2021-11-01 16:42:52 -06:00
|
|
|
}
|
|
|
|
|
}
|