@dxos/plugin-pwa 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-pwa",
3
- "version": "0.8.4-main.69d29f4",
3
+ "version": "0.8.4-main.6fa680abb7",
4
4
  "description": "DXOS Surface plugin for PWA registration and update handling.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -28,31 +28,32 @@
28
28
  "src"
29
29
  ],
30
30
  "dependencies": {
31
- "effect": "3.19.11",
32
- "@dxos/app-framework": "0.8.4-main.69d29f4",
33
- "@dxos/log": "0.8.4-main.69d29f4",
34
- "@dxos/observability": "0.8.4-main.69d29f4",
35
- "@dxos/util": "0.8.4-main.69d29f4",
36
- "@dxos/operation": "0.8.4-main.69d29f4"
31
+ "effect": "3.19.16",
32
+ "@dxos/app-framework": "0.8.4-main.6fa680abb7",
33
+ "@dxos/app-toolkit": "0.8.4-main.6fa680abb7",
34
+ "@dxos/log": "0.8.4-main.6fa680abb7",
35
+ "@dxos/observability": "0.8.4-main.6fa680abb7",
36
+ "@dxos/util": "0.8.4-main.6fa680abb7",
37
+ "@dxos/operation": "0.8.4-main.6fa680abb7"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/react": "~19.2.7",
40
41
  "@types/react-dom": "~19.2.3",
41
42
  "react": "~19.2.3",
42
43
  "react-dom": "~19.2.3",
43
- "vite": "7.1.9",
44
+ "vite": "^7.1.11",
44
45
  "vite-plugin-pwa": "^1.0.2",
45
46
  "workbox-window": "^7.3.0",
46
- "@dxos/react-ui": "0.8.4-main.69d29f4",
47
- "@dxos/ui-theme": "0.8.4-main.69d29f4",
48
- "@dxos/storybook-utils": "0.8.4-main.69d29f4"
47
+ "@dxos/react-ui": "0.8.4-main.6fa680abb7",
48
+ "@dxos/ui-theme": "0.8.4-main.6fa680abb7",
49
+ "@dxos/storybook-utils": "0.8.4-main.6fa680abb7"
49
50
  },
50
51
  "peerDependencies": {
51
- "effect": "3.19.11",
52
+ "effect": "3.19.16",
52
53
  "react": "~19.2.3",
53
54
  "react-dom": "~19.2.3",
54
- "@dxos/react-ui": "0.8.4-main.69d29f4",
55
- "@dxos/ui-theme": "0.8.4-main.69d29f4"
55
+ "@dxos/react-ui": "0.8.4-main.6fa680abb7",
56
+ "@dxos/ui-theme": "0.8.4-main.6fa680abb7"
56
57
  },
57
58
  "publishConfig": {
58
59
  "access": "public"
package/src/PwaPlugin.tsx CHANGED
@@ -5,25 +5,25 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
  import { registerSW } from 'virtual:pwa-register';
7
7
 
8
- import { Capability, Common, Plugin } from '@dxos/app-framework';
8
+ import { ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';
9
+ import { AppPlugin, LayoutOperation } from '@dxos/app-toolkit';
9
10
  import { log } from '@dxos/log';
10
- import { captureException } from '@dxos/observability/sentry';
11
11
 
12
12
  import { meta } from './meta';
13
13
  import { translations } from './translations';
14
14
 
15
15
  export const PwaPlugin = Plugin.define(meta).pipe(
16
- Common.Plugin.addTranslationsModule({ translations }),
16
+ AppPlugin.addTranslationsModule({ translations }),
17
17
  Plugin.addModule({
18
18
  id: 'register-pwa',
19
- activatesOn: Common.ActivationEvent.OperationInvokerReady,
19
+ activatesOn: ActivationEvents.OperationInvokerReady,
20
20
  activate: Effect.fnUntraced(function* () {
21
- const { invokeSync } = yield* Capability.get(Common.Capability.OperationInvoker);
21
+ const { invokeSync } = yield* Capability.get(Capabilities.OperationInvoker);
22
22
 
23
23
  const updateSW = registerSW({
24
24
  onNeedRefresh: () => {
25
- invokeSync(Common.LayoutOperation.AddToast, {
26
- id: `${meta.id}/need-refresh`,
25
+ invokeSync(LayoutOperation.AddToast, {
26
+ id: `${meta.id}.need-refresh`,
27
27
  title: ['need refresh label', { ns: meta.id }],
28
28
  description: ['need refresh description', { ns: meta.id }],
29
29
  duration: 4 * 60 * 1000, // 4m
@@ -33,14 +33,13 @@ export const PwaPlugin = Plugin.define(meta).pipe(
33
33
  });
34
34
  },
35
35
  onOfflineReady: () => {
36
- invokeSync(Common.LayoutOperation.AddToast, {
37
- id: `${meta.id}/offline-ready`,
36
+ invokeSync(LayoutOperation.AddToast, {
37
+ id: `${meta.id}.offline-ready`,
38
38
  title: ['offline ready label', { ns: meta.id }],
39
39
  closeLabel: ['confirm label', { ns: meta.id }],
40
40
  });
41
41
  },
42
42
  onRegisterError: (err) => {
43
- captureException(err);
44
43
  log.error(err);
45
44
  },
46
45
  });
package/src/meta.ts CHANGED
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
8
  export const meta: Plugin.Meta = {
9
- id: 'dxos.org/plugin/pwa',
9
+ id: 'org.dxos.plugin.pwa',
10
10
  name: 'PWA',
11
11
  description: trim`
12
12
  Progressive Web App capabilities enabling offline functionality and app-like experience.