@dxos/plugin-settings 0.6.14-main.7bd9c89 → 0.8.4-main.1c7ec43d41

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.
Files changed (94) hide show
  1. package/dist/lib/browser/SettingsPlugin-H7MYSTLT.mjs +9 -0
  2. package/dist/lib/browser/chunk-YMWZWP5N.mjs +20 -0
  3. package/dist/lib/browser/chunk-YMWZWP5N.mjs.map +7 -0
  4. package/dist/lib/browser/index.mjs +34 -247
  5. package/dist/lib/browser/index.mjs.map +4 -4
  6. package/dist/lib/browser/meta.json +1 -1
  7. package/dist/lib/browser/plugin.mjs +7 -0
  8. package/dist/lib/browser/translations.mjs +15 -0
  9. package/dist/lib/browser/translations.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +9 -0
  11. package/dist/lib/browser/types/index.mjs.map +7 -0
  12. package/dist/lib/node-esm/SettingsPlugin-LSWDBQHF.mjs +10 -0
  13. package/dist/lib/node-esm/SettingsPlugin-LSWDBQHF.mjs.map +7 -0
  14. package/dist/lib/node-esm/chunk-H4MBYZ3E.mjs +22 -0
  15. package/dist/lib/node-esm/chunk-H4MBYZ3E.mjs.map +7 -0
  16. package/dist/lib/node-esm/index.mjs +34 -246
  17. package/dist/lib/node-esm/index.mjs.map +4 -4
  18. package/dist/lib/node-esm/meta.json +1 -1
  19. package/dist/lib/node-esm/plugin.mjs +8 -0
  20. package/dist/lib/node-esm/plugin.mjs.map +7 -0
  21. package/dist/lib/node-esm/translations.mjs +17 -0
  22. package/dist/lib/node-esm/translations.mjs.map +7 -0
  23. package/dist/lib/node-esm/types/index.mjs +11 -0
  24. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  25. package/dist/types/src/SettingsPlugin.d.ts +3 -6
  26. package/dist/types/src/SettingsPlugin.d.ts.map +1 -1
  27. package/dist/types/src/SettingsPlugin.test.d.ts +2 -0
  28. package/dist/types/src/SettingsPlugin.test.d.ts.map +1 -0
  29. package/dist/types/src/actions.d.ts +25 -0
  30. package/dist/types/src/actions.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  32. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  33. package/dist/types/src/capabilities/index.d.ts +5 -0
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  35. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  36. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  37. package/dist/types/src/index.d.ts +4 -4
  38. package/dist/types/src/index.d.ts.map +1 -1
  39. package/dist/types/src/meta.d.ts +2 -5
  40. package/dist/types/src/meta.d.ts.map +1 -1
  41. package/dist/types/src/operations/index.d.ts +3 -0
  42. package/dist/types/src/operations/index.d.ts.map +1 -0
  43. package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
  44. package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
  45. package/dist/types/src/operations/open.d.ts +5 -0
  46. package/dist/types/src/operations/open.d.ts.map +1 -0
  47. package/dist/types/src/plugin.d.ts +2 -0
  48. package/dist/types/src/plugin.d.ts.map +1 -0
  49. package/dist/types/src/translations.d.ts +5 -9
  50. package/dist/types/src/translations.d.ts.map +1 -1
  51. package/dist/types/src/types/index.d.ts +3 -0
  52. package/dist/types/src/types/index.d.ts.map +1 -0
  53. package/dist/types/tsconfig.tsbuildinfo +1 -0
  54. package/package.json +46 -36
  55. package/src/SettingsPlugin.test.ts +33 -0
  56. package/src/SettingsPlugin.ts +19 -0
  57. package/src/actions.ts +24 -0
  58. package/src/capabilities/app-graph-builder.ts +99 -0
  59. package/src/capabilities/index.ts +12 -0
  60. package/src/capabilities/operation-handler.ts +16 -0
  61. package/src/index.ts +7 -7
  62. package/src/meta.ts +7 -7
  63. package/src/operations/index.ts +10 -0
  64. package/src/operations/open-plugin-registry.ts +28 -0
  65. package/src/operations/open.ts +29 -0
  66. package/src/plugin.ts +7 -0
  67. package/src/translations.ts +8 -9
  68. package/src/types/index.ts +8 -0
  69. package/README.md +0 -15
  70. package/dist/lib/browser/chunk-PD3C4TDW.mjs +0 -11
  71. package/dist/lib/browser/chunk-PD3C4TDW.mjs.map +0 -7
  72. package/dist/lib/browser/meta.mjs +0 -9
  73. package/dist/lib/node/chunk-AHM6OLF2.cjs +0 -34
  74. package/dist/lib/node/chunk-AHM6OLF2.cjs.map +0 -7
  75. package/dist/lib/node/index.cjs +0 -278
  76. package/dist/lib/node/index.cjs.map +0 -7
  77. package/dist/lib/node/meta.cjs +0 -30
  78. package/dist/lib/node/meta.cjs.map +0 -7
  79. package/dist/lib/node/meta.json +0 -1
  80. package/dist/lib/node-esm/chunk-PPOEIFFE.mjs +0 -13
  81. package/dist/lib/node-esm/chunk-PPOEIFFE.mjs.map +0 -7
  82. package/dist/lib/node-esm/meta.mjs +0 -10
  83. package/dist/types/src/components/SettingsDialog.d.ts +0 -6
  84. package/dist/types/src/components/SettingsDialog.d.ts.map +0 -1
  85. package/dist/types/src/components/SettingsValue.d.ts +0 -9
  86. package/dist/types/src/components/SettingsValue.d.ts.map +0 -1
  87. package/dist/types/src/components/index.d.ts +0 -3
  88. package/dist/types/src/components/index.d.ts.map +0 -1
  89. package/src/SettingsPlugin.tsx +0 -122
  90. package/src/components/SettingsDialog.tsx +0 -126
  91. package/src/components/SettingsValue.tsx +0 -49
  92. package/src/components/index.ts +0 -6
  93. /package/dist/lib/browser/{meta.mjs.map → SettingsPlugin-H7MYSTLT.mjs.map} +0 -0
  94. /package/dist/lib/{node-esm/meta.mjs.map → browser/plugin.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,62 +1,72 @@
1
1
  {
2
2
  "name": "@dxos/plugin-settings",
3
- "version": "0.6.14-main.7bd9c89",
4
- "description": "DXOS app plugin for aggregating and rendering plugin settings.",
3
+ "version": "0.8.4-main.1c7ec43d41",
4
+ "description": "DXOS Settings plugin for managing application settings.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
13
+ "sideEffects": true,
14
+ "type": "module",
15
+ "imports": {
16
+ "#plugin": "./src/SettingsPlugin.ts",
17
+ "#capabilities": "./src/capabilities/index.ts",
18
+ "#meta": "./src/meta.ts",
19
+ "#operations": "./src/operations/index.ts",
20
+ "#translations": "./src/translations.ts",
21
+ "#types": "./src/types/index.ts"
22
+ },
9
23
  "exports": {
10
24
  ".": {
25
+ "source": "./src/index.ts",
11
26
  "browser": "./dist/lib/browser/index.mjs",
12
- "node": {
13
- "require": "./dist/lib/node/index.cjs",
14
- "default": "./dist/lib/node-esm/index.mjs"
15
- },
27
+ "node": "./dist/lib/node-esm/index.mjs",
16
28
  "types": "./dist/types/src/index.d.ts"
17
29
  },
18
- "./meta": {
19
- "browser": "./dist/lib/browser/meta.mjs",
20
- "node": {
21
- "require": "./dist/lib/node/meta.cjs",
22
- "default": "./dist/lib/node-esm/meta.mjs"
23
- },
24
- "types": "./dist/types/src/meta.d.ts"
30
+ "./plugin": {
31
+ "source": "./src/plugin.ts",
32
+ "types": "./dist/types/src/plugin.d.ts",
33
+ "browser": "./dist/lib/browser/plugin.mjs",
34
+ "node": "./dist/lib/node-esm/plugin.mjs"
35
+ },
36
+ "./translations": {
37
+ "source": "./src/translations.ts",
38
+ "types": "./dist/types/src/translations.d.ts",
39
+ "browser": "./dist/lib/browser/translations.mjs",
40
+ "node": "./dist/lib/node-esm/translations.mjs"
41
+ },
42
+ "./types": {
43
+ "source": "./src/types/index.ts",
44
+ "types": "./dist/types/src/types/index.d.ts",
45
+ "browser": "./dist/lib/browser/types/index.mjs",
46
+ "node": "./dist/lib/node-esm/types/index.mjs"
25
47
  }
26
48
  },
27
49
  "types": "dist/types/src/index.d.ts",
28
- "typesVersions": {
29
- "*": {
30
- "meta": [
31
- "dist/types/src/meta.d.ts"
32
- ]
33
- }
34
- },
35
50
  "files": [
36
51
  "dist",
37
52
  "src"
38
53
  ],
39
54
  "dependencies": {
40
- "@dxos/app-framework": "0.6.14-main.7bd9c89",
41
- "@dxos/local-storage": "0.6.14-main.7bd9c89",
42
- "@dxos/react-ui-tabs": "0.6.14-main.7bd9c89",
43
- "@dxos/plugin-graph": "0.6.14-main.7bd9c89",
44
- "@dxos/util": "0.6.14-main.7bd9c89"
55
+ "@dxos/app-framework": "0.8.4-main.1c7ec43d41",
56
+ "@dxos/app-toolkit": "0.8.4-main.1c7ec43d41",
57
+ "@dxos/compute": "0.8.4-main.1c7ec43d41",
58
+ "@dxos/app-graph": "0.8.4-main.1c7ec43d41",
59
+ "@dxos/util": "0.8.4-main.1c7ec43d41"
45
60
  },
46
61
  "devDependencies": {
47
- "@phosphor-icons/react": "^2.1.5",
48
- "@types/react": "~18.2.0",
49
- "react": "~18.2.0",
50
- "vite": "5.4.7",
51
- "@dxos/react-ui": "0.6.14-main.7bd9c89",
52
- "@dxos/react-ui-theme": "0.6.14-main.7bd9c89",
53
- "@dxos/storybook-utils": "0.6.14-main.7bd9c89"
62
+ "@types/react": "~19.2.7",
63
+ "effect": "3.20.0",
64
+ "react": "~19.2.3",
65
+ "@dxos/plugin-graph": "0.8.4-main.1c7ec43d41"
54
66
  },
55
67
  "peerDependencies": {
56
- "@phosphor-icons/react": "^2.1.5",
57
- "react": "~18.2.0",
58
- "@dxos/react-ui": "0.6.14-main.7bd9c89",
59
- "@dxos/react-ui-theme": "0.6.14-main.7bd9c89"
68
+ "effect": "3.20.0",
69
+ "react": "~19.2.3"
60
70
  },
61
71
  "publishConfig": {
62
72
  "access": "public"
@@ -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
+ });
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
7
+
8
+ import { OperationHandler, SettingsAppGraphBuilder } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
11
+
12
+ export const SettingsPlugin = Plugin.define(meta).pipe(
13
+ AppPlugin.addAppGraphModule({ activate: SettingsAppGraphBuilder }),
14
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
15
+ AppPlugin.addTranslationsModule({ translations }),
16
+ Plugin.make,
17
+ );
18
+
19
+ export default SettingsPlugin;
package/src/actions.ts ADDED
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+
7
+ import { meta } from '#meta';
8
+ import { SETTINGS_ID, SETTINGS_KEY } from '#types';
9
+
10
+ export { SETTINGS_ID, SETTINGS_KEY };
11
+
12
+ export namespace SettingsAction {
13
+ export class Open extends Schema.TaggedClass<Open>()(`${meta.id}.open`, {
14
+ input: Schema.Struct({
15
+ plugin: Schema.optional(Schema.String),
16
+ }),
17
+ output: Schema.Void,
18
+ }) {}
19
+
20
+ export class OpenPluginRegistry extends Schema.TaggedClass<OpenPluginRegistry>()(`${meta.id}.open-plugin-registry`, {
21
+ input: Schema.Void,
22
+ output: Schema.Void,
23
+ }) {}
24
+ }
@@ -0,0 +1,99 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability, type Plugin as Plugin$ } from '@dxos/app-framework';
8
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/app-graph';
9
+ import { AppCapabilities, SettingsOperation, getSpacePath } from '@dxos/app-toolkit';
10
+ import { Operation } from '@dxos/compute';
11
+ import { isNonNullable } from '@dxos/util';
12
+
13
+ import { meta } from '#meta';
14
+
15
+ import { SETTINGS_ID, SETTINGS_KEY } from '../actions';
16
+
17
+ export default Capability.makeModule(
18
+ Effect.fnUntraced(function* () {
19
+ // Get context for lazy capability access in callbacks.
20
+ const capabilities = yield* Capability.Service;
21
+ const managerAtom = capabilities.atom(Capabilities.PluginManager);
22
+ const settingsAtom = capabilities.atom(AppCapabilities.Settings);
23
+
24
+ const extensions = yield* Effect.all([
25
+ GraphBuilder.createExtension({
26
+ id: 'action',
27
+ match: NodeMatcher.whenRoot,
28
+ actions: () =>
29
+ Effect.succeed([
30
+ {
31
+ id: 'root',
32
+ data: () => Operation.invoke(SettingsOperation.Open, {}),
33
+ properties: {
34
+ label: ['plugin-settings.label', { ns: meta.id }],
35
+ icon: 'ph--gear--regular',
36
+ disposition: 'menu',
37
+ keyBinding: {
38
+ macos: 'meta+,',
39
+ windows: 'alt+,',
40
+ },
41
+ },
42
+ },
43
+ ]),
44
+ }),
45
+ GraphBuilder.createExtension({
46
+ id: 'core',
47
+ match: NodeMatcher.whenRoot,
48
+ connector: () =>
49
+ Effect.succeed([
50
+ Node.make({
51
+ id: SETTINGS_ID,
52
+ type: meta.id,
53
+ properties: {
54
+ label: ['plugin-settings.label', { ns: meta.id }],
55
+ icon: 'ph--gear--regular',
56
+ disposition: 'pin-end',
57
+ position: 'hoist',
58
+ testId: 'treeView.appSettings',
59
+ },
60
+ }),
61
+ ]),
62
+ }),
63
+ GraphBuilder.createExtension({
64
+ id: 'plugins',
65
+ match: NodeMatcher.whenId(getSpacePath(SETTINGS_ID)),
66
+ connector: (node, get) => {
67
+ const [manager] = get(managerAtom);
68
+ const allSettings = get(settingsAtom);
69
+ return Effect.succeed(
70
+ manager
71
+ .getPlugins()
72
+ .map((plugin: Plugin$.Plugin): [Plugin$.Meta, AppCapabilities.Settings] | null => {
73
+ const settings = allSettings.find((s) => s.prefix === plugin.meta.id);
74
+ if (!settings) {
75
+ return null;
76
+ }
77
+
78
+ return [plugin.meta, settings];
79
+ })
80
+ .filter(isNonNullable)
81
+ .map(([meta, settings]: [Plugin$.Meta, AppCapabilities.Settings]) =>
82
+ Node.make({
83
+ id: `${SETTINGS_KEY}:${meta.id.replaceAll('/', ':')}`,
84
+ type: 'category',
85
+ data: settings,
86
+ properties: {
87
+ label: meta.name ?? meta.id,
88
+ icon: meta.icon ?? 'ph--circle--regular',
89
+ },
90
+ }),
91
+ ),
92
+ );
93
+ },
94
+ }),
95
+ ]);
96
+
97
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
98
+ }),
99
+ );
@@ -0,0 +1,12 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { OperationHandlerSet } from '@dxos/compute';
7
+
8
+ export const SettingsAppGraphBuilder = Capability.lazy('SettingsAppGraphBuilder', () => import('./app-graph-builder'));
9
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
10
+ 'OperationHandler',
11
+ () => import('./operation-handler'),
12
+ );
@@ -0,0 +1,16 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import type { OperationHandlerSet } from '@dxos/compute';
9
+
10
+ import { SettingsOperationHandlerSet } from '#operations';
11
+
12
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
13
+ Effect.fnUntraced(function* () {
14
+ return Capability.contributes(Capabilities.OperationHandler, SettingsOperationHandlerSet);
15
+ }),
16
+ );
package/src/index.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  //
2
- // Copyright 2023 DXOS.org
2
+ // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { SettingsPlugin } from './SettingsPlugin';
5
+ import { Plugin } from '@dxos/app-framework';
6
6
 
7
- export default SettingsPlugin;
7
+ import { meta } from './meta';
8
8
 
9
- export * from './SettingsPlugin';
9
+ export const SettingsPlugin = Plugin.lazy(meta, () => import('./SettingsPlugin'));
10
10
 
11
- // TODO(wittjosiah): Remove.
12
- // Settings should be exposed from plugins as state and intents rather than components.
13
- export * from './components';
11
+ export * from './meta';
12
+
13
+ export * from './actions';
package/src/meta.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  //
2
- // Copyright 2023 DXOS.org
2
+ // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { type Plugin } from '@dxos/app-framework';
6
6
 
7
- export const SETTINGS_PLUGIN = 'dxos.org/plugin/settings';
8
-
9
- export default {
10
- id: SETTINGS_PLUGIN,
11
- } satisfies PluginMeta;
7
+ export const meta: Plugin.Meta = {
8
+ id: 'org.dxos.plugin.settings',
9
+ name: 'Settings',
10
+ tags: ['system'],
11
+ };
@@ -0,0 +1,10 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { OperationHandlerSet } from '@dxos/compute';
6
+
7
+ export const SettingsOperationHandlerSet = OperationHandlerSet.lazy(
8
+ () => import('./open'),
9
+ () => import('./open-plugin-registry'),
10
+ );
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { LayoutOperation, SettingsOperation, getSpacePath } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
10
+
11
+ import { SETTINGS_ID, SETTINGS_KEY } from '../actions';
12
+
13
+ const handler: Operation.WithHandler<typeof SettingsOperation.OpenPluginRegistry> =
14
+ SettingsOperation.OpenPluginRegistry.pipe(
15
+ Operation.withHandler(() =>
16
+ Effect.gen(function* () {
17
+ const { invoke } = yield* Capability.get(Capabilities.OperationInvoker);
18
+ yield* invoke(LayoutOperation.SwitchWorkspace, { subject: getSpacePath(SETTINGS_ID) });
19
+ yield* Effect.fork(
20
+ invoke(LayoutOperation.Open, {
21
+ subject: [`${getSpacePath(SETTINGS_ID)}/${SETTINGS_KEY}:plugins`],
22
+ }),
23
+ );
24
+ }),
25
+ ),
26
+ );
27
+
28
+ export default handler;
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { LayoutOperation, SettingsOperation, getSpacePath } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
10
+
11
+ import { SETTINGS_ID, SETTINGS_KEY } from '../actions';
12
+
13
+ const handler: Operation.WithHandler<typeof SettingsOperation.Open> = SettingsOperation.Open.pipe(
14
+ Operation.withHandler((input) =>
15
+ Effect.gen(function* () {
16
+ const { invoke } = yield* Capability.get(Capabilities.OperationInvoker);
17
+ yield* invoke(LayoutOperation.SwitchWorkspace, { subject: getSpacePath(SETTINGS_ID) });
18
+ if (input.plugin) {
19
+ yield* Effect.fork(
20
+ invoke(LayoutOperation.Open, {
21
+ subject: [`${getSpacePath(SETTINGS_ID)}/${SETTINGS_KEY}:${input.plugin.replaceAll('/', ':')}`],
22
+ }),
23
+ );
24
+ }
25
+ }),
26
+ ),
27
+ );
28
+
29
+ export default handler;
package/src/plugin.ts ADDED
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ // Eager re-export of `SettingsPlugin`. See `@dxos/plugin-testing/src/core.ts`
6
+ // for the rationale.
7
+ export * from './SettingsPlugin';
@@ -1,18 +1,17 @@
1
1
  //
2
- // Copyright 2023 DXOS.org
2
+ // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { SETTINGS_PLUGIN } from './meta';
5
+ import { type Resource } from '@dxos/app-toolkit';
6
6
 
7
- export default [
7
+ import { meta } from '#meta';
8
+
9
+ export const translations = [
8
10
  {
9
11
  'en-US': {
10
- [SETTINGS_PLUGIN]: {
11
- 'open settings label': 'Show settings',
12
- 'settings dialog title': 'Settings',
13
- 'back label': 'Back',
14
- 'click to return to tablist description': 'Click the title to return to the settings menu',
12
+ [meta.id]: {
13
+ 'plugin-settings.label': 'Plugin Settings',
15
14
  },
16
15
  },
17
16
  },
18
- ];
17
+ ] as const satisfies Resource[];
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { pinnedWorkspaceId } from '@dxos/app-toolkit';
6
+
7
+ export const SETTINGS_ID = pinnedWorkspaceId('dxos:settings');
8
+ export const SETTINGS_KEY = 'settings';
package/README.md DELETED
@@ -1,15 +0,0 @@
1
- # @dxos/plugin-settings
2
-
3
- DXOS app plugin for aggregating and rendering plugin settings.
4
-
5
- ## DXOS Resources
6
-
7
- - [Website](https://dxos.org)
8
- - [Developer Documentation](https://docs.dxos.org)
9
- - Talk to us on [Discord](https://dxos.org/discord)
10
-
11
- ## Contributions
12
-
13
- Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
14
-
15
- License: [MIT](./LICENSE) Copyright 2023 © DXOS
@@ -1,11 +0,0 @@
1
- // packages/plugins/plugin-settings/src/meta.ts
2
- var SETTINGS_PLUGIN = "dxos.org/plugin/settings";
3
- var meta_default = {
4
- id: SETTINGS_PLUGIN
5
- };
6
-
7
- export {
8
- SETTINGS_PLUGIN,
9
- meta_default
10
- };
11
- //# sourceMappingURL=chunk-PD3C4TDW.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 { type PluginMeta } from '@dxos/app-framework';\n\nexport const SETTINGS_PLUGIN = 'dxos.org/plugin/settings';\n\nexport default {\n id: SETTINGS_PLUGIN,\n} satisfies PluginMeta;\n"],
5
- "mappings": ";AAMO,IAAMA,kBAAkB;AAE/B,IAAA,eAAe;EACbC,IAAID;AACN;",
6
- "names": ["SETTINGS_PLUGIN", "id"]
7
- }
@@ -1,9 +0,0 @@
1
- import {
2
- SETTINGS_PLUGIN,
3
- meta_default
4
- } from "./chunk-PD3C4TDW.mjs";
5
- export {
6
- SETTINGS_PLUGIN,
7
- meta_default as default
8
- };
9
- //# sourceMappingURL=meta.mjs.map
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_AHM6OLF2_exports = {};
20
- __export(chunk_AHM6OLF2_exports, {
21
- SETTINGS_PLUGIN: () => SETTINGS_PLUGIN,
22
- meta_default: () => meta_default
23
- });
24
- module.exports = __toCommonJS(chunk_AHM6OLF2_exports);
25
- var SETTINGS_PLUGIN = "dxos.org/plugin/settings";
26
- var meta_default = {
27
- id: SETTINGS_PLUGIN
28
- };
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
31
- SETTINGS_PLUGIN,
32
- meta_default
33
- });
34
- //# sourceMappingURL=chunk-AHM6OLF2.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const SETTINGS_PLUGIN = 'dxos.org/plugin/settings';\n\nexport default {\n id: SETTINGS_PLUGIN,\n} satisfies PluginMeta;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,kBAAkB;AAE/B,IAAA,eAAe;EACbC,IAAID;AACN;",
6
- "names": ["SETTINGS_PLUGIN", "id"]
7
- }