@dxos/plugin-registry 0.8.3 → 0.8.4-main.1068cf700f

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 (123) hide show
  1. package/dist/lib/browser/app-graph-builder-YOD5EGAY.mjs +167 -0
  2. package/dist/lib/browser/app-graph-builder-YOD5EGAY.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-VOAOTNGS.mjs +19 -0
  4. package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +7 -0
  5. package/dist/lib/browser/cli/index.mjs +224 -0
  6. package/dist/lib/browser/cli/index.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +28 -36
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs +25 -0
  11. package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs.map +7 -0
  12. package/dist/lib/browser/react-surface-IEGOKKMX.mjs +337 -0
  13. package/dist/lib/browser/react-surface-IEGOKKMX.mjs.map +7 -0
  14. package/dist/lib/node-esm/app-graph-builder-WTIS5KI5.mjs +168 -0
  15. package/dist/lib/node-esm/app-graph-builder-WTIS5KI5.mjs.map +7 -0
  16. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +21 -0
  17. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +7 -0
  18. package/dist/lib/node-esm/cli/index.mjs +225 -0
  19. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  20. package/dist/lib/node-esm/index.mjs +64 -0
  21. package/dist/lib/node-esm/index.mjs.map +7 -0
  22. package/dist/lib/node-esm/meta.json +1 -0
  23. package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs +26 -0
  24. package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs.map +7 -0
  25. package/dist/lib/node-esm/react-surface-SEJBWRMR.mjs +338 -0
  26. package/dist/lib/node-esm/react-surface-SEJBWRMR.mjs.map +7 -0
  27. package/dist/types/src/RegistryPlugin.d.ts +2 -1
  28. package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
  29. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  30. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  32. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  33. package/dist/types/src/capabilities/index.d.ts +3 -3
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  36. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  37. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  38. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  39. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  40. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  41. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  42. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  43. package/dist/types/src/cli/commands/disable.d.ts +11 -0
  44. package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
  45. package/dist/types/src/cli/commands/enable.d.ts +11 -0
  46. package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
  47. package/dist/types/src/cli/commands/index.d.ts +3 -0
  48. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  49. package/dist/types/src/cli/commands/list.d.ts +7 -0
  50. package/dist/types/src/cli/commands/list.d.ts.map +1 -0
  51. package/dist/types/src/cli/commands/util.d.ts +11 -0
  52. package/dist/types/src/cli/commands/util.d.ts.map +1 -0
  53. package/dist/types/src/cli/index.d.ts +3 -0
  54. package/dist/types/src/cli/index.d.ts.map +1 -0
  55. package/dist/types/src/cli/plugin.d.ts +3 -0
  56. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  57. package/dist/types/src/cli/storage.d.ts +18 -0
  58. package/dist/types/src/cli/storage.d.ts.map +1 -0
  59. package/dist/types/src/components/PluginDetail.d.ts +3 -3
  60. package/dist/types/src/components/PluginDetail.d.ts.map +1 -1
  61. package/dist/types/src/components/PluginDetail.stories.d.ts +30 -5
  62. package/dist/types/src/components/PluginDetail.stories.d.ts.map +1 -1
  63. package/dist/types/src/components/PluginItem.d.ts +2 -2
  64. package/dist/types/src/components/PluginItem.d.ts.map +1 -1
  65. package/dist/types/src/components/PluginList.d.ts +1 -1
  66. package/dist/types/src/components/PluginList.d.ts.map +1 -1
  67. package/dist/types/src/components/PluginList.stories.d.ts +31 -8
  68. package/dist/types/src/components/PluginList.stories.d.ts.map +1 -1
  69. package/dist/types/src/components/RegistryContainer.d.ts +4 -3
  70. package/dist/types/src/components/RegistryContainer.d.ts.map +1 -1
  71. package/dist/types/src/meta.d.ts +2 -3
  72. package/dist/types/src/meta.d.ts.map +1 -1
  73. package/dist/types/src/translations.d.ts +19 -19
  74. package/dist/types/src/translations.d.ts.map +1 -1
  75. package/dist/types/src/types.d.ts +3 -1
  76. package/dist/types/src/types.d.ts.map +1 -1
  77. package/dist/types/tsconfig.tsbuildinfo +1 -1
  78. package/package.json +50 -35
  79. package/src/RegistryPlugin.tsx +11 -26
  80. package/src/capabilities/app-graph-builder/app-graph-builder.ts +137 -0
  81. package/src/capabilities/app-graph-builder/index.ts +7 -0
  82. package/src/capabilities/index.ts +3 -5
  83. package/src/capabilities/operation-resolver/index.ts +7 -0
  84. package/src/capabilities/operation-resolver/operation-resolver.ts +24 -0
  85. package/src/capabilities/react-surface/index.ts +7 -0
  86. package/src/capabilities/react-surface/react-surface.tsx +99 -0
  87. package/src/cli/commands/disable.ts +47 -0
  88. package/src/cli/commands/enable.ts +44 -0
  89. package/src/cli/commands/index.ts +14 -0
  90. package/src/cli/commands/list.ts +41 -0
  91. package/src/cli/commands/util.ts +24 -0
  92. package/src/cli/index.ts +6 -0
  93. package/src/cli/plugin.ts +17 -0
  94. package/src/cli/storage.ts +57 -0
  95. package/src/components/PluginDetail.stories.tsx +23 -24
  96. package/src/components/PluginDetail.tsx +61 -43
  97. package/src/components/PluginItem.tsx +55 -54
  98. package/src/components/PluginList.stories.tsx +37 -35
  99. package/src/components/PluginList.tsx +3 -5
  100. package/src/components/RegistryContainer.tsx +53 -51
  101. package/src/meta.ts +8 -5
  102. package/src/translations.ts +6 -4
  103. package/src/types.ts +5 -1
  104. package/dist/lib/browser/app-graph-builder-J5YHAGNI.mjs +0 -161
  105. package/dist/lib/browser/app-graph-builder-J5YHAGNI.mjs.map +0 -7
  106. package/dist/lib/browser/chunk-ISC56E5F.mjs +0 -16
  107. package/dist/lib/browser/chunk-ISC56E5F.mjs.map +0 -7
  108. package/dist/lib/browser/intent-resolver-AQJNBUT3.mjs +0 -23
  109. package/dist/lib/browser/intent-resolver-AQJNBUT3.mjs.map +0 -7
  110. package/dist/lib/browser/react-surface-W5RNDLXV.mjs +0 -335
  111. package/dist/lib/browser/react-surface-W5RNDLXV.mjs.map +0 -7
  112. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  113. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  114. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  115. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  116. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  117. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  118. package/dist/types/src/components/Icon.stories.d.ts +0 -6
  119. package/dist/types/src/components/Icon.stories.d.ts.map +0 -1
  120. package/src/capabilities/app-graph-builder.ts +0 -155
  121. package/src/capabilities/intent-resolver.ts +0 -27
  122. package/src/capabilities/react-surface.tsx +0 -90
  123. package/src/components/Icon.stories.tsx +0 -107
@@ -2,83 +2,85 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ import { useAtomValue } from '@effect-atom/atom-react';
6
+ import * as Effect from 'effect/Effect';
5
7
  import React, { useCallback, useMemo } from 'react';
6
8
 
7
- import {
8
- Capabilities,
9
- createIntent,
10
- LayoutAction,
11
- type Plugin,
12
- SettingsAction,
13
- useCapability,
14
- useIntentDispatcher,
15
- usePluginManager,
16
- } from '@dxos/app-framework';
17
- import { ObservabilityAction } from '@dxos/plugin-observability/types';
18
- import { StackItem } from '@dxos/react-ui-stack';
9
+ import { type Plugin } from '@dxos/app-framework';
10
+ import { useCapabilities, useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';
11
+ import { AppCapabilities, LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';
12
+ import { runAndForwardErrors } from '@dxos/effect';
13
+ import { ObservabilityOperation } from '@dxos/plugin-observability/types';
14
+ import { ScrollArea } from '@dxos/react-ui';
19
15
 
20
16
  import { PluginList } from './PluginList';
21
17
 
22
- const sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin, { meta: { name: b = '' } }: Plugin) => a.localeCompare(b);
18
+ const sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin.Plugin, { meta: { name: b = '' } }: Plugin.Plugin) =>
19
+ a.localeCompare(b);
23
20
 
24
- export const RegistryContainer = ({ id, plugins: _plugins }: { id: string; plugins: Plugin[] }) => {
21
+ export type RegistryContainerProps = {
22
+ id: string;
23
+ plugins: Plugin.Plugin[];
24
+ };
25
+
26
+ export const RegistryContainer = ({ id, plugins: pluginsProp }: RegistryContainerProps) => {
25
27
  const manager = usePluginManager();
26
- const { dispatchPromise: dispatch } = useIntentDispatcher();
27
- const plugins = useMemo(() => _plugins.sort(sortByPluginMeta), [_plugins]);
28
- const settingsStore = useCapability(Capabilities.SettingsStore);
28
+ const { invoke, invokePromise } = useOperationInvoker();
29
+ const plugins = useMemo(() => pluginsProp.sort(sortByPluginMeta), [pluginsProp]);
30
+ const enabled = useAtomValue(manager.enabled);
31
+ const allSettings = useCapabilities(AppCapabilities.Settings);
29
32
 
30
33
  // TODO(wittjosiah): Factor out to an intent?
31
34
  const handleChange = useCallback(
32
- async (id: string, enabled: boolean) => {
33
- if (enabled) {
34
- await manager.enable(id);
35
- } else {
36
- await manager.disable(id);
37
- }
35
+ (id: string, enabled: boolean) =>
36
+ Effect.gen(function* () {
37
+ if (enabled) {
38
+ yield* manager.enable(id);
39
+ } else {
40
+ yield* manager.disable(id);
41
+ }
38
42
 
39
- await dispatch(
40
- createIntent(ObservabilityAction.SendEvent, {
43
+ yield* invoke(ObservabilityOperation.SendEvent, {
41
44
  name: 'plugins.toggle',
42
45
  properties: {
43
46
  plugin: id,
44
47
  enabled,
45
48
  },
46
- }),
47
- );
48
- },
49
- [dispatch, manager],
49
+ });
50
+ }).pipe(runAndForwardErrors),
51
+ [invoke, manager],
50
52
  );
51
53
 
52
54
  const handleClick = useCallback(
53
55
  (pluginId: string) =>
54
- dispatch(
55
- createIntent(LayoutAction.Open, {
56
- part: 'main',
57
- // TODO(wittjosiah): `/` currently is not supported in ids.
58
- subject: [pluginId.replaceAll('/', ':')],
59
- options: { pivotId: id, positioning: 'end' },
60
- }),
61
- ),
62
- [dispatch, id],
56
+ invokePromise(LayoutOperation.Open, {
57
+ // TODO(wittjosiah): `/` currently is not supported in ids.
58
+ subject: [pluginId.replaceAll('/', ':')],
59
+ pivotId: id,
60
+ positioning: 'end',
61
+ }),
62
+ [invokePromise, id],
63
63
  );
64
64
 
65
- const hasSettings = useCallback((pluginId: string) => !!settingsStore.getStore(pluginId), [settingsStore]);
65
+ const hasSettings = useCallback((pluginId: string) => allSettings.some((s) => s.prefix === pluginId), [allSettings]);
66
66
 
67
67
  const handleSettings = useCallback(
68
- (pluginId: string) => dispatch(createIntent(SettingsAction.Open, { plugin: pluginId })),
69
- [dispatch],
68
+ (pluginId: string) => invokePromise(SettingsOperation.Open, { plugin: pluginId }),
69
+ [invokePromise],
70
70
  );
71
71
 
72
72
  return (
73
- <StackItem.Content classNames='min-bs-0 overflow-y-auto scrollbar-thin contain-layout'>
74
- <PluginList
75
- plugins={plugins}
76
- enabled={manager.enabled}
77
- onClick={handleClick}
78
- onChange={handleChange}
79
- hasSettings={hasSettings}
80
- onSettings={handleSettings}
81
- />
82
- </StackItem.Content>
73
+ <ScrollArea.Root orientation='vertical'>
74
+ <ScrollArea.Viewport>
75
+ <PluginList
76
+ plugins={plugins}
77
+ enabled={enabled}
78
+ onClick={handleClick}
79
+ onChange={handleChange}
80
+ hasSettings={hasSettings}
81
+ onSettings={handleSettings}
82
+ />
83
+ </ScrollArea.Viewport>
84
+ </ScrollArea.Root>
83
85
  );
84
86
  };
package/src/meta.ts CHANGED
@@ -2,9 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
6
-
7
- export const REGISTRY_PLUGIN = 'dxos.org/plugin/registry';
5
+ import { type Plugin } from '@dxos/app-framework';
6
+ import { trim } from '@dxos/util';
8
7
 
9
8
  // TODO(wittjosiah): Deck does not currently support `/` in ids.
10
9
  // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
@@ -12,7 +11,11 @@ export const REGISTRY_PLUGIN = 'dxos.org/plugin/registry';
12
11
  export const REGISTRY_ID = '!dxos:plugin-registry';
13
12
  export const REGISTRY_KEY = 'plugin-registry';
14
13
 
15
- export const meta: PluginMeta = {
16
- id: REGISTRY_PLUGIN,
14
+ export const meta: Plugin.Meta = {
15
+ id: 'dxos.org/plugin/registry',
17
16
  name: 'Plugins',
17
+ description: trim`
18
+ Plugin management system for discovering, installing, and configuring workspace extensions.
19
+ Browse available plugins and customize your workspace capabilities.
20
+ `,
18
21
  };
@@ -2,12 +2,14 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { REGISTRY_PLUGIN } from './meta';
5
+ import { type Resource } from '@dxos/react-ui';
6
6
 
7
- export default [
7
+ import { meta } from './meta';
8
+
9
+ export const translations = [
8
10
  {
9
11
  'en-US': {
10
- [REGISTRY_PLUGIN]: {
12
+ [meta.id]: {
11
13
  'plugin name': 'Registry',
12
14
  'details label': 'Details',
13
15
  'home page label': 'Website',
@@ -25,4 +27,4 @@ export default [
25
27
  },
26
28
  },
27
29
  },
28
- ];
30
+ ] as const satisfies Resource[];
package/src/types.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  export const RegistrySettingsSchema = Schema.mutable(
8
8
  Schema.Struct({
@@ -11,3 +11,7 @@ export const RegistrySettingsSchema = Schema.mutable(
11
11
  );
12
12
 
13
13
  export type RegistrySettings = Schema.Schema.Type<typeof RegistrySettingsSchema>;
14
+
15
+ export const RegistryTagType = Schema.Literal('new', 'beta', 'labs', 'popular', 'featured', 'experimental');
16
+
17
+ export type RegistryTagType = Schema.Schema.Type<typeof RegistryTagType>;
@@ -1,161 +0,0 @@
1
- import {
2
- REGISTRY_ID,
3
- REGISTRY_KEY,
4
- REGISTRY_PLUGIN
5
- } from "./chunk-ISC56E5F.mjs";
6
-
7
- // packages/plugins/plugin-registry/src/capabilities/app-graph-builder.ts
8
- import { Rx } from "@effect-rx/rx-react";
9
- import { Option, pipe } from "effect";
10
- import { Capabilities, contributes, createIntent, SettingsAction } from "@dxos/app-framework";
11
- import { createExtension } from "@dxos/plugin-graph";
12
- var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, [
13
- createExtension({
14
- id: REGISTRY_PLUGIN,
15
- actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === "root" ? Option.some(node2) : Option.none()), Option.map((node2) => [
16
- {
17
- id: REGISTRY_PLUGIN,
18
- data: async () => {
19
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
20
- await dispatch(createIntent(SettingsAction.OpenPluginRegistry));
21
- },
22
- properties: {
23
- label: [
24
- "open plugin registry label",
25
- {
26
- ns: REGISTRY_PLUGIN
27
- }
28
- ],
29
- icon: "ph--squares-four--regular",
30
- disposition: "menu"
31
- }
32
- }
33
- ]), Option.getOrElse(() => [])))
34
- }),
35
- createExtension({
36
- id: REGISTRY_PLUGIN,
37
- connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === "root" ? Option.some(node2) : Option.none()), Option.map((node2) => [
38
- {
39
- id: REGISTRY_ID,
40
- type: REGISTRY_PLUGIN,
41
- properties: {
42
- label: [
43
- "plugin registry label",
44
- {
45
- ns: REGISTRY_PLUGIN
46
- }
47
- ],
48
- icon: "ph--squares-four--regular",
49
- disposition: "pin-end",
50
- testId: "treeView.pluginRegistry"
51
- },
52
- nodes: [
53
- {
54
- id: `${REGISTRY_KEY}+all`,
55
- type: "category",
56
- data: `${REGISTRY_KEY}+all`,
57
- properties: {
58
- label: [
59
- "all plugins label",
60
- {
61
- ns: REGISTRY_PLUGIN
62
- }
63
- ],
64
- icon: "ph--squares-four--regular",
65
- key: REGISTRY_KEY,
66
- testId: "pluginRegistry.all"
67
- }
68
- },
69
- {
70
- id: `${REGISTRY_KEY}+installed`,
71
- type: "category",
72
- data: `${REGISTRY_KEY}+installed`,
73
- properties: {
74
- label: [
75
- "installed plugins label",
76
- {
77
- ns: REGISTRY_PLUGIN
78
- }
79
- ],
80
- icon: "ph--check--regular",
81
- key: REGISTRY_KEY,
82
- testId: "pluginRegistry.installed"
83
- }
84
- },
85
- {
86
- id: `${REGISTRY_KEY}+recommended`,
87
- type: "category",
88
- data: `${REGISTRY_KEY}+recommended`,
89
- properties: {
90
- label: [
91
- "recommended plugins label",
92
- {
93
- ns: REGISTRY_PLUGIN
94
- }
95
- ],
96
- icon: "ph--star--regular",
97
- key: REGISTRY_KEY,
98
- testId: "pluginRegistry.recommended"
99
- }
100
- },
101
- {
102
- id: `${REGISTRY_KEY}+labs`,
103
- type: "category",
104
- data: `${REGISTRY_KEY}+labs`,
105
- properties: {
106
- label: [
107
- "labs plugins label",
108
- {
109
- ns: REGISTRY_PLUGIN
110
- }
111
- ],
112
- icon: "ph--flask--regular",
113
- key: REGISTRY_KEY,
114
- testId: "pluginRegistry.labs"
115
- }
116
- }
117
- ]
118
- }
119
- ]), Option.getOrElse(() => [])))
120
- }),
121
- createExtension({
122
- id: `${REGISTRY_PLUGIN}/actions`,
123
- actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === REGISTRY_ID ? Option.some(node2) : Option.none()), Option.map(() => [
124
- {
125
- id: `${REGISTRY_PLUGIN}/load-by-url`,
126
- data: async () => {
127
- },
128
- properties: {
129
- label: [
130
- "load by url label",
131
- {
132
- ns: REGISTRY_PLUGIN
133
- }
134
- ],
135
- icon: "ph--cloud-arrow-down--regular",
136
- disabled: true
137
- }
138
- }
139
- ]), Option.getOrElse(() => [])))
140
- }),
141
- createExtension({
142
- id: `${REGISTRY_PLUGIN}/plugins`,
143
- connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === REGISTRY_ID ? Option.some(node2) : Option.none()), Option.map(() => {
144
- const manager = context.getCapability(Capabilities.PluginManager);
145
- return manager.plugins.map((plugin) => ({
146
- id: plugin.meta.id.replaceAll("/", ":"),
147
- type: "dxos.org/plugin",
148
- data: plugin,
149
- properties: {
150
- label: plugin.meta.name ?? plugin.meta.id,
151
- icon: plugin.meta.icon ?? "ph--circle--regular",
152
- disposition: "hidden"
153
- }
154
- }));
155
- }), Option.getOrElse(() => [])))
156
- })
157
- ]);
158
- export {
159
- app_graph_builder_default as default
160
- };
161
- //# sourceMappingURL=app-graph-builder-J5YHAGNI.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, contributes, createIntent, SettingsAction, type PluginContext } from '@dxos/app-framework';\nimport { createExtension } from '@dxos/plugin-graph';\n\nimport { REGISTRY_ID, REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: REGISTRY_PLUGIN,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: REGISTRY_PLUGIN,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(SettingsAction.OpenPluginRegistry));\n },\n properties: {\n label: ['open plugin registry label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n disposition: 'menu',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: REGISTRY_PLUGIN,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: REGISTRY_ID,\n type: REGISTRY_PLUGIN,\n properties: {\n label: ['plugin registry label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n disposition: 'pin-end',\n testId: 'treeView.pluginRegistry',\n },\n nodes: [\n {\n id: `${REGISTRY_KEY}+all`,\n type: 'category',\n data: `${REGISTRY_KEY}+all`,\n properties: {\n label: ['all plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.all',\n },\n },\n {\n id: `${REGISTRY_KEY}+installed`,\n type: 'category',\n data: `${REGISTRY_KEY}+installed`,\n properties: {\n label: ['installed plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--check--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.installed',\n },\n },\n {\n id: `${REGISTRY_KEY}+recommended`,\n type: 'category',\n data: `${REGISTRY_KEY}+recommended`,\n properties: {\n label: ['recommended plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--star--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.recommended',\n },\n },\n {\n id: `${REGISTRY_KEY}+labs`,\n type: 'category',\n data: `${REGISTRY_KEY}+labs`,\n properties: {\n label: ['labs plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--flask--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.labs',\n },\n },\n ],\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/actions`,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),\n Option.map(() => [\n {\n id: `${REGISTRY_PLUGIN}/load-by-url`,\n data: async () => {},\n properties: {\n label: ['load by url label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--cloud-arrow-down--regular',\n disabled: true,\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/plugins`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const manager = context.getCapability(Capabilities.PluginManager);\n return manager.plugins.map((plugin) => ({\n id: plugin.meta.id.replaceAll('/', ':'),\n type: 'dxos.org/plugin',\n data: plugin,\n properties: {\n label: plugin.meta.name ?? plugin.meta.id,\n icon: plugin.meta.icon ?? 'ph--circle--regular',\n disposition: 'hidden',\n },\n }));\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAcC,aAAaC,cAAcC,sBAA0C;AAC5F,SAASC,uBAAuB;AAIhC,IAAA,4BAAe,CAACC,YACdC,YAAYC,aAAaC,iBAAiB;EACxCC,gBAAgB;IACdC,IAAIC;IACJC,SAAS,CAACC,SACRC,GAAGC,KAA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uB,UAAUxC,QAAQqB,cAAcnB,aAAauC,aAAa;AAChE,aAAOD,QAAQE,QAAQzB,IAAI,CAAC0B,YAAY;QACtCtC,IAAIsC,OAAOC,KAAKvC,GAAGwC,WAAW,KAAK,GAAA;QACnCX,MAAM;QACNhB,MAAMyB;QACNjB,YAAY;UACVC,OAAOgB,OAAOC,KAAKE,QAAQH,OAAOC,KAAKvC;UACvCwB,MAAMc,OAAOC,KAAKf,QAAQ;UAC1BC,aAAa;QACf;MACF,EAAA;IACF,CAAA,GACAjB,OAAOkB,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;CACD;",
6
- "names": ["Rx", "Option", "pipe", "Capabilities", "contributes", "createIntent", "SettingsAction", "createExtension", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "REGISTRY_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "some", "none", "map", "data", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "createIntent", "SettingsAction", "OpenPluginRegistry", "properties", "label", "ns", "icon", "disposition", "getOrElse", "connector", "REGISTRY_ID", "type", "testId", "nodes", "REGISTRY_KEY", "key", "disabled", "manager", "PluginManager", "plugins", "plugin", "meta", "replaceAll", "name"]
7
- }
@@ -1,16 +0,0 @@
1
- // packages/plugins/plugin-registry/src/meta.ts
2
- var REGISTRY_PLUGIN = "dxos.org/plugin/registry";
3
- var REGISTRY_ID = "!dxos:plugin-registry";
4
- var REGISTRY_KEY = "plugin-registry";
5
- var meta = {
6
- id: REGISTRY_PLUGIN,
7
- name: "Plugins"
8
- };
9
-
10
- export {
11
- REGISTRY_PLUGIN,
12
- REGISTRY_ID,
13
- REGISTRY_KEY,
14
- meta
15
- };
16
- //# sourceMappingURL=chunk-ISC56E5F.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 REGISTRY_PLUGIN = 'dxos.org/plugin/registry';\n\n// TODO(wittjosiah): Deck does not currently support `/` in ids.\n// TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n// Ideally this should be worked into the data model in a generic way.\nexport const REGISTRY_ID = '!dxos:plugin-registry';\nexport const REGISTRY_KEY = 'plugin-registry';\n\nexport const meta: PluginMeta = {\n id: REGISTRY_PLUGIN,\n name: 'Plugins',\n};\n"],
5
- "mappings": ";AAMO,IAAMA,kBAAkB;AAKxB,IAAMC,cAAc;AACpB,IAAMC,eAAe;AAErB,IAAMC,OAAmB;EAC9BC,IAAIJ;EACJK,MAAM;AACR;",
6
- "names": ["REGISTRY_PLUGIN", "REGISTRY_ID", "REGISTRY_KEY", "meta", "id", "name"]
7
- }
@@ -1,23 +0,0 @@
1
- import {
2
- REGISTRY_ID
3
- } from "./chunk-ISC56E5F.mjs";
4
-
5
- // packages/plugins/plugin-registry/src/capabilities/intent-resolver.ts
6
- import { contributes, SettingsAction, createResolver, LayoutAction, Capabilities, createIntent } from "@dxos/app-framework";
7
- var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
8
- intent: SettingsAction.OpenPluginRegistry,
9
- resolve: () => {
10
- return {
11
- intents: [
12
- createIntent(LayoutAction.SwitchWorkspace, {
13
- part: "workspace",
14
- subject: REGISTRY_ID
15
- })
16
- ]
17
- };
18
- }
19
- }));
20
- export {
21
- intent_resolver_default as default
22
- };
23
- //# sourceMappingURL=intent-resolver-AQJNBUT3.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n contributes,\n SettingsAction,\n createResolver,\n LayoutAction,\n Capabilities,\n createIntent,\n} from '@dxos/app-framework';\n\nimport { REGISTRY_ID } from '../meta';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: SettingsAction.OpenPluginRegistry,\n resolve: () => {\n return {\n intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: REGISTRY_ID })],\n };\n },\n }),\n );\n"],
5
- "mappings": ";;;;;AAIA,SACEA,aACAC,gBACAC,gBACAC,cACAC,cACAC,oBACK;AAIP,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,eAAeC;EACvBC,SAAS,MAAA;AACP,WAAO;MACLC,SAAS;QAACC,aAAaC,aAAaC,iBAAiB;UAAEC,MAAM;UAAaC,SAASC;QAAY,CAAA;;IACjG;EACF;AACF,CAAA,CAAA;",
6
- "names": ["contributes", "SettingsAction", "createResolver", "LayoutAction", "Capabilities", "createIntent", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "SettingsAction", "OpenPluginRegistry", "resolve", "intents", "createIntent", "LayoutAction", "SwitchWorkspace", "part", "subject", "REGISTRY_ID"]
7
- }