@dxos/plugin-pwa 0.9.0 → 0.9.1-main.c7dcc2e112

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/dx.config.ts ADDED
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Config2 } from '@dxos/app-framework/config';
6
+ import { trim } from '@dxos/util';
7
+
8
+ export default Config2.make({
9
+ plugin: {
10
+ key: 'org.dxos.plugin.pwa',
11
+ name: 'PWA',
12
+ author: 'DXOS',
13
+ description: trim`
14
+ Progressive Web App capabilities enabling offline functionality and app-like experience.
15
+ Install to home screen and use the workspace without internet connection.
16
+ `,
17
+ tags: ['system'],
18
+ },
19
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-pwa",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-main.c7dcc2e112",
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",
@@ -49,15 +49,16 @@
49
49
  "types": "dist/types/src/index.d.ts",
50
50
  "files": [
51
51
  "dist",
52
+ "dx.config.ts",
52
53
  "src"
53
54
  ],
54
55
  "dependencies": {
55
56
  "effect": "3.21.3",
56
- "@dxos/app-framework": "0.9.0",
57
- "@dxos/app-toolkit": "0.9.0",
58
- "@dxos/keys": "0.9.0",
59
- "@dxos/log": "0.9.0",
60
- "@dxos/util": "0.9.0"
57
+ "@dxos/app-framework": "0.9.1-main.c7dcc2e112",
58
+ "@dxos/app-toolkit": "0.9.1-main.c7dcc2e112",
59
+ "@dxos/keys": "0.9.1-main.c7dcc2e112",
60
+ "@dxos/util": "0.9.1-main.c7dcc2e112",
61
+ "@dxos/log": "0.9.1-main.c7dcc2e112"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@types/react": "~19.2.7",
@@ -67,17 +68,17 @@
67
68
  "vite": "^8.0.16",
68
69
  "vite-plugin-pwa": "^1.2.0",
69
70
  "workbox-window": "^7.4.0",
70
- "@dxos/plugin-testing": "0.9.0",
71
- "@dxos/react-ui": "0.9.0",
72
- "@dxos/storybook-utils": "0.9.0",
73
- "@dxos/ui-theme": "0.9.0"
71
+ "@dxos/react-ui": "0.9.1-main.c7dcc2e112",
72
+ "@dxos/plugin-testing": "0.9.1-main.c7dcc2e112",
73
+ "@dxos/ui-theme": "0.9.1-main.c7dcc2e112",
74
+ "@dxos/storybook-utils": "0.9.1-main.c7dcc2e112"
74
75
  },
75
76
  "peerDependencies": {
76
77
  "effect": "3.21.3",
77
78
  "react": "~19.2.3",
78
79
  "react-dom": "~19.2.3",
79
- "@dxos/react-ui": "0.9.0",
80
- "@dxos/ui-theme": "0.9.0"
80
+ "@dxos/react-ui": "0.9.1-main.c7dcc2e112",
81
+ "@dxos/ui-theme": "0.9.1-main.c7dcc2e112"
81
82
  },
82
83
  "publishConfig": {
83
84
  "access": "public"
package/src/PwaPlugin.tsx CHANGED
@@ -23,20 +23,20 @@ export const PwaPlugin = Plugin.define(meta).pipe(
23
23
  const updateSW = registerSW({
24
24
  onNeedRefresh: () => {
25
25
  void invokePromise(LayoutOperation.AddToast, {
26
- id: `${meta.id}.need-refresh`,
27
- title: ['need-refresh.label', { ns: meta.id }],
28
- description: ['need-refresh.description', { ns: meta.id }],
26
+ id: `${meta.profile.key}.need-refresh`,
27
+ title: ['need-refresh.label', { ns: meta.profile.key }],
28
+ description: ['need-refresh.description', { ns: meta.profile.key }],
29
29
  duration: 4 * 60 * 1000, // 4m
30
- actionLabel: ['refresh.label', { ns: meta.id }],
31
- actionAlt: ['refresh.alt', { ns: meta.id }],
30
+ actionLabel: ['refresh.label', { ns: meta.profile.key }],
31
+ actionAlt: ['refresh.alt', { ns: meta.profile.key }],
32
32
  onAction: () => updateSW(true),
33
33
  });
34
34
  },
35
35
  onOfflineReady: () => {
36
36
  void invokePromise(LayoutOperation.AddToast, {
37
- id: `${meta.id}.offline-ready`,
38
- title: ['offline-ready.label', { ns: meta.id }],
39
- closeLabel: ['confirm.label', { ns: meta.id }],
37
+ id: `${meta.profile.key}.offline-ready`,
38
+ title: ['offline-ready.label', { ns: meta.profile.key }],
39
+ closeLabel: ['confirm.label', { ns: meta.profile.key }],
40
40
  });
41
41
  },
42
42
  onRegisterError: (err) => {
package/src/meta.ts CHANGED
@@ -3,16 +3,7 @@
3
3
  //
4
4
 
5
5
  import { Plugin } from '@dxos/app-framework';
6
- import { DXN } from '@dxos/keys';
7
- import { trim } from '@dxos/util';
8
6
 
9
- export const meta = Plugin.makeMeta({
10
- key: DXN.make('org.dxos.plugin.pwa'),
11
- name: 'PWA',
12
- author: 'DXOS',
13
- description: trim`
14
- Progressive Web App capabilities enabling offline functionality and app-like experience.
15
- Install to home screen and use the workspace without internet connection.
16
- `,
17
- tags: ['system'],
18
- });
7
+ import config from '../dx.config';
8
+
9
+ export const meta = Plugin.getMetaFromConfig(config);
@@ -9,7 +9,7 @@ import { meta } from '#meta';
9
9
  export const translations = [
10
10
  {
11
11
  'en-US': {
12
- [meta.id]: {
12
+ [meta.profile.key]: {
13
13
  'need-refresh.label': 'Refresh now to get app updates',
14
14
  'need-refresh.description': 'You’ll need these updates to continue without interruption.',
15
15
  'refresh.label': 'Refresh',
@@ -1,21 +0,0 @@
1
- // src/meta.ts
2
- import { Plugin } from "@dxos/app-framework";
3
- import { DXN } from "@dxos/keys";
4
- import { trim } from "@dxos/util";
5
- var meta = Plugin.makeMeta({
6
- key: DXN.make("org.dxos.plugin.pwa"),
7
- name: "PWA",
8
- author: "DXOS",
9
- description: trim`
10
- Progressive Web App capabilities enabling offline functionality and app-like experience.
11
- Install to home screen and use the workspace without internet connection.
12
- `,
13
- tags: [
14
- "system"
15
- ]
16
- });
17
-
18
- export {
19
- meta
20
- };
21
- //# sourceMappingURL=chunk-JVPBIURT.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.pwa'),\n name: 'PWA',\n author: 'DXOS',\n description: trim`\n Progressive Web App capabilities enabling offline functionality and app-like experience.\n Install to home screen and use the workspace without internet connection.\n `,\n tags: ['system'],\n});\n"],
5
- "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,qBAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;EAIbQ,MAAM;IAAC;;AACT,CAAA;",
6
- "names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "tags"]
7
- }