@maplat/ui 0.11.8 → 0.11.9

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.
@@ -3335,7 +3335,7 @@ This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;
3335
3335
  registerRoute(
3336
3336
  /(?:maps\/.+\.json|pwa\/.+|pois\/.+\.json|apps\/.+\.json|tmbs\/.+\.jpg|images\/.+\.(?:png|jpg))$/,
3337
3337
  new StaleWhileRevalidate({
3338
- cacheName: "resourcesCache",
3338
+ cacheName: `resourcesCache-${"2026-01-04-16-01"}`,
3339
3339
  plugins: [
3340
3340
  new ExpirationPlugin({
3341
3341
  maxAgeSeconds: 86400,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maplat/ui",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
4
4
  "description": "Maplat is the cool Historical Map/Illustrated Map Viewer.\nIt can transform each map coordinates with nonlinear but homeomorphic projection and makes possible that the maps can collaborate with GPS/accurate maps, without distorting original maps.",
5
5
  "type": "module",
6
6
  "main": "dist/maplat-ui.umd.js",
@@ -79,8 +79,8 @@
79
79
  },
80
80
  "scripts": {
81
81
  "dev": "concurrently \"pnpm watch:sw\" \"vite --host\"",
82
- "build:sw": "esbuild src/service-worker/index.ts --bundle --outfile=dist/service-worker.js --format=iife --define:self.__WB_MANIFEST=[] && node -e \"require('fs').copyFileSync('dist/service-worker.js', 'public/service-worker.js')\"",
83
- "watch:sw": "esbuild src/service-worker/index.ts --bundle --outfile=public/service-worker.js --format=iife --define:self.__WB_MANIFEST=[] --watch",
82
+ "build:sw": "node scripts/build-sw.js",
83
+ "watch:sw": "node scripts/build-sw.js --watch",
84
84
  "build": "cross-env BUILD_MODE=package tsc && cross-env BUILD_MODE=package vite build && pnpm build:sw",
85
85
  "build:demo": "pnpm build:sw && vite build",
86
86
  "preview": "vite preview",
@@ -28,11 +28,13 @@ clientsClaim();
28
28
  */
29
29
  precacheAndRoute((self as any).__WB_MANIFEST as (string | PrecacheEntry)[], {});
30
30
 
31
+ declare const SW_VERSION: string;
32
+
31
33
  registerRoute(
32
34
  /(?:maps\/.+\.json|pwa\/.+|pois\/.+\.json|apps\/.+\.json|tmbs\/.+\.jpg|images\/.+\.(?:png|jpg))$/,
33
35
 
34
36
  new StaleWhileRevalidate({
35
- cacheName: "resourcesCache",
37
+ cacheName: `resourcesCache-${SW_VERSION}`,
36
38
  plugins: [
37
39
  new ExpirationPlugin({
38
40
  maxAgeSeconds: 86400,