@dxos/plugin-settings 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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/dist/lib/browser/SettingsPlugin-RTO4UYCL.mjs +19 -0
- package/dist/lib/browser/SettingsPlugin-RTO4UYCL.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +16 -31
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +15 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs.map +2 -2
- package/dist/lib/node-esm/SettingsPlugin-EQGHMM4D.mjs +21 -0
- package/dist/lib/node-esm/SettingsPlugin-EQGHMM4D.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +16 -31
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/translations.mjs +17 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs.map +2 -2
- package/dist/types/src/SettingsPlugin.d.ts +1 -0
- package/dist/types/src/SettingsPlugin.d.ts.map +1 -1
- package/dist/types/src/SettingsPlugin.test.d.ts +2 -0
- package/dist/types/src/SettingsPlugin.test.d.ts.map +1 -0
- package/dist/types/src/actions.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open-plugin-registry.d.ts +1 -1
- package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts +1 -1
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -4
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -14
- package/src/SettingsPlugin.test.ts +33 -0
- package/src/SettingsPlugin.ts +3 -2
- package/src/capabilities/app-graph-builder.ts +3 -3
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/index.ts +8 -1
- package/src/operations/index.ts +1 -1
- package/src/operations/open-plugin-registry.ts +1 -1
- package/src/operations/open.ts +1 -1
- package/src/translations.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-settings",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.abd8ff62ef",
|
|
4
4
|
"description": "DXOS Settings plugin for managing application settings.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
|
+
"#plugin": "./src/SettingsPlugin.ts",
|
|
16
17
|
"#capabilities": "./src/capabilities/index.ts",
|
|
17
18
|
"#meta": "./src/meta.ts",
|
|
18
19
|
"#operations": "./src/operations/index.ts",
|
|
20
|
+
"#translations": "./src/translations.ts",
|
|
19
21
|
"#types": "./src/types/index.ts"
|
|
20
22
|
},
|
|
21
23
|
"exports": {
|
|
@@ -25,6 +27,12 @@
|
|
|
25
27
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
26
28
|
"types": "./dist/types/src/index.d.ts"
|
|
27
29
|
},
|
|
30
|
+
"./translations": {
|
|
31
|
+
"source": "./src/translations.ts",
|
|
32
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
33
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
34
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
35
|
+
},
|
|
28
36
|
"./types": {
|
|
29
37
|
"source": "./src/types/index.ts",
|
|
30
38
|
"types": "./dist/types/src/types/index.d.ts",
|
|
@@ -33,28 +41,22 @@
|
|
|
33
41
|
}
|
|
34
42
|
},
|
|
35
43
|
"types": "dist/types/src/index.d.ts",
|
|
36
|
-
"typesVersions": {
|
|
37
|
-
"*": {
|
|
38
|
-
"types": [
|
|
39
|
-
"dist/types/src/types/index.d.ts"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
44
|
"files": [
|
|
44
45
|
"dist",
|
|
45
46
|
"src"
|
|
46
47
|
],
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@dxos/app-
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/app-
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/util": "0.8.4-main.
|
|
49
|
+
"@dxos/app-graph": "0.8.4-main.abd8ff62ef",
|
|
50
|
+
"@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
|
|
51
|
+
"@dxos/app-framework": "0.8.4-main.abd8ff62ef",
|
|
52
|
+
"@dxos/compute": "0.8.4-main.abd8ff62ef",
|
|
53
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@types/react": "~19.2.7",
|
|
56
57
|
"effect": "3.20.0",
|
|
57
|
-
"react": "~19.2.3"
|
|
58
|
+
"react": "~19.2.3",
|
|
59
|
+
"@dxos/plugin-graph": "0.8.4-main.abd8ff62ef"
|
|
58
60
|
},
|
|
59
61
|
"peerDependencies": {
|
|
60
62
|
"effect": "3.20.0",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
8
|
+
import { createTestApp } from '@dxos/app-framework/testing';
|
|
9
|
+
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
10
|
+
|
|
11
|
+
import { SettingsPlugin } from '#plugin';
|
|
12
|
+
|
|
13
|
+
import { meta } from './meta';
|
|
14
|
+
|
|
15
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
16
|
+
|
|
17
|
+
describe('SettingsPlugin', () => {
|
|
18
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
19
|
+
// Use createTestApp directly to avoid a circular dep with plugin-testing.
|
|
20
|
+
// GraphPlugin fires SetupAppGraph (via firesBeforeActivation) during Startup,
|
|
21
|
+
// activating SettingsAppGraphBuilder. OperationPlugin fires SetupOperationHandler
|
|
22
|
+
// during Startup, activating OperationHandler.
|
|
23
|
+
await using harness = await createTestApp({
|
|
24
|
+
plugins: [GraphPlugin(), OperationPlugin(), RuntimePlugin(), SettingsPlugin()],
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// SettingsAppGraphBuilder activates on SetupAppGraph (fired by GraphPlugin during Startup).
|
|
28
|
+
// OperationHandler activates on SetupOperationHandler (fired by OperationPlugin during Startup).
|
|
29
|
+
expect(harness.manager.getActive()).toEqual(
|
|
30
|
+
expect.arrayContaining([moduleId('SettingsAppGraphBuilder'), moduleId('OperationHandler')]),
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
});
|
package/src/SettingsPlugin.ts
CHANGED
|
@@ -7,8 +7,7 @@ import { AppPlugin } from '@dxos/app-toolkit';
|
|
|
7
7
|
|
|
8
8
|
import { OperationHandler, SettingsAppGraphBuilder } from '#capabilities';
|
|
9
9
|
import { meta } from '#meta';
|
|
10
|
-
|
|
11
|
-
import { translations } from './translations';
|
|
10
|
+
import { translations } from '#translations';
|
|
12
11
|
|
|
13
12
|
export const SettingsPlugin = Plugin.define(meta).pipe(
|
|
14
13
|
AppPlugin.addAppGraphModule({ activate: SettingsAppGraphBuilder }),
|
|
@@ -16,3 +15,5 @@ export const SettingsPlugin = Plugin.define(meta).pipe(
|
|
|
16
15
|
AppPlugin.addTranslationsModule({ translations }),
|
|
17
16
|
Plugin.make,
|
|
18
17
|
);
|
|
18
|
+
|
|
19
|
+
export default SettingsPlugin;
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capabilities, Capability, type Plugin as Plugin$ } from '@dxos/app-framework';
|
|
8
8
|
import { GraphBuilder, Node, NodeMatcher } from '@dxos/app-graph';
|
|
9
9
|
import { AppCapabilities, SettingsOperation, getSpacePath } from '@dxos/app-toolkit';
|
|
10
|
-
import { Operation } from '@dxos/
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
11
|
import { isNonNullable } from '@dxos/util';
|
|
12
12
|
|
|
13
13
|
import { meta } from '#meta';
|
|
@@ -31,7 +31,7 @@ export default Capability.makeModule(
|
|
|
31
31
|
id: 'root',
|
|
32
32
|
data: () => Operation.invoke(SettingsOperation.Open, {}),
|
|
33
33
|
properties: {
|
|
34
|
-
label: ['
|
|
34
|
+
label: ['plugin-settings.label', { ns: meta.id }],
|
|
35
35
|
icon: 'ph--gear--regular',
|
|
36
36
|
disposition: 'menu',
|
|
37
37
|
keyBinding: {
|
|
@@ -51,7 +51,7 @@ export default Capability.makeModule(
|
|
|
51
51
|
id: SETTINGS_ID,
|
|
52
52
|
type: meta.id,
|
|
53
53
|
properties: {
|
|
54
|
-
label: ['
|
|
54
|
+
label: ['plugin-settings.label', { ns: meta.id }],
|
|
55
55
|
icon: 'ph--gear--regular',
|
|
56
56
|
disposition: 'pin-end',
|
|
57
57
|
position: 'hoist',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
import { OperationHandlerSet } from '@dxos/
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
export const SettingsAppGraphBuilder = Capability.lazy('SettingsAppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
9
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import type { OperationHandlerSet } from '@dxos/
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
9
|
|
|
10
10
|
import { SettingsOperationHandlerSet } from '#operations';
|
|
11
11
|
|
package/src/index.ts
CHANGED
|
@@ -2,5 +2,12 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const SettingsPlugin = Plugin.lazy(meta, () => import('./SettingsPlugin'));
|
|
10
|
+
|
|
11
|
+
export * from './meta';
|
|
12
|
+
|
|
5
13
|
export * from './actions';
|
|
6
|
-
export * from './SettingsPlugin';
|
package/src/operations/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation, SettingsOperation, getSpacePath } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
|
|
11
11
|
import { SETTINGS_ID, SETTINGS_KEY } from '../actions';
|
|
12
12
|
|
package/src/operations/open.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation, SettingsOperation, getSpacePath } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
|
|
11
11
|
import { SETTINGS_ID, SETTINGS_KEY } from '../actions';
|
|
12
12
|
|