@dxos/plugin-registry 0.8.1 → 0.8.2-main.10c050d

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 (31) hide show
  1. package/dist/lib/browser/{app-graph-builder-V6VVFXFC.mjs → app-graph-builder-J5YHAGNI.mjs} +24 -27
  2. package/dist/lib/browser/app-graph-builder-J5YHAGNI.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +3 -8
  4. package/dist/lib/browser/index.mjs.map +2 -2
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/react-surface-NLJXCVYD.mjs +335 -0
  7. package/dist/lib/browser/react-surface-NLJXCVYD.mjs.map +7 -0
  8. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  9. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  10. package/dist/types/src/capabilities/index.d.ts +1 -177
  11. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  12. package/dist/types/src/components/PluginDetail.d.ts.map +1 -1
  13. package/dist/types/src/components/PluginItem.d.ts.map +1 -1
  14. package/dist/types/src/components/PluginList.d.ts.map +1 -1
  15. package/dist/types/src/components/RegistryContainer.d.ts.map +1 -1
  16. package/dist/types/src/translations.d.ts +1 -6
  17. package/dist/types/src/translations.d.ts.map +1 -1
  18. package/dist/types/src/types.d.ts +4 -4
  19. package/dist/types/src/types.d.ts.map +1 -1
  20. package/dist/types/tsconfig.tsbuildinfo +1 -1
  21. package/package.json +24 -16
  22. package/src/capabilities/app-graph-builder.ts +133 -104
  23. package/src/capabilities/react-surface.tsx +5 -5
  24. package/src/components/PluginItem.tsx +23 -10
  25. package/src/components/PluginList.stories.tsx +2 -2
  26. package/src/components/PluginList.tsx +1 -1
  27. package/src/translations.ts +1 -6
  28. package/src/types.ts +5 -5
  29. package/dist/lib/browser/app-graph-builder-V6VVFXFC.mjs.map +0 -7
  30. package/dist/lib/browser/react-surface-3FJ5KLF6.mjs +0 -305
  31. package/dist/lib/browser/react-surface-3FJ5KLF6.mjs.map +0 -7
@@ -2,125 +2,154 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, createIntent, SettingsAction, type PluginsContext } from '@dxos/app-framework';
6
- import { createExtension, type Node } from '@dxos/plugin-graph';
5
+ import { Rx } from '@effect-rx/rx-react';
6
+ import { Option, pipe } from 'effect';
7
+
8
+ import { Capabilities, contributes, createIntent, SettingsAction, type PluginContext } from '@dxos/app-framework';
9
+ import { createExtension } from '@dxos/plugin-graph';
7
10
 
8
11
  import { REGISTRY_ID, REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';
9
12
 
10
- export default (context: PluginsContext) =>
13
+ export default (context: PluginContext) =>
11
14
  contributes(Capabilities.AppGraphBuilder, [
12
15
  createExtension({
13
16
  id: REGISTRY_PLUGIN,
14
- filter: (node): node is Node<null> => node.id === 'root',
15
- actions: () => [
16
- {
17
- id: REGISTRY_PLUGIN,
18
- data: async () => {
19
- const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
20
- await dispatch(createIntent(SettingsAction.OpenPluginRegistry));
21
- },
22
- properties: {
23
- label: ['open plugin registry label', { ns: REGISTRY_PLUGIN }],
24
- icon: 'ph--squares-four--regular',
25
- },
26
- },
27
- ],
17
+ actions: (node) =>
18
+ Rx.make((get) =>
19
+ pipe(
20
+ get(node),
21
+ Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),
22
+ Option.map((node) => [
23
+ {
24
+ id: REGISTRY_PLUGIN,
25
+ data: async () => {
26
+ const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
27
+ await dispatch(createIntent(SettingsAction.OpenPluginRegistry));
28
+ },
29
+ properties: {
30
+ label: ['open plugin registry label', { ns: REGISTRY_PLUGIN }],
31
+ icon: 'ph--squares-four--regular',
32
+ disposition: 'menu',
33
+ },
34
+ },
35
+ ]),
36
+ Option.getOrElse(() => []),
37
+ ),
38
+ ),
28
39
  }),
29
40
  createExtension({
30
41
  id: REGISTRY_PLUGIN,
31
- filter: (node): node is Node<null> => node.id === 'root',
32
- connector: () => [
33
- {
34
- id: REGISTRY_ID,
35
- type: REGISTRY_PLUGIN,
36
- properties: {
37
- label: ['plugin registry label', { ns: REGISTRY_PLUGIN }],
38
- icon: 'ph--squares-four--regular',
39
- disposition: 'pin-end',
40
- testId: 'treeView.pluginRegistry',
41
- },
42
- nodes: [
43
- {
44
- id: `${REGISTRY_KEY}+all`,
45
- type: 'category',
46
- data: `${REGISTRY_KEY}+all`,
47
- properties: {
48
- label: ['all plugins label', { ns: REGISTRY_PLUGIN }],
49
- icon: 'ph--squares-four--regular',
50
- key: REGISTRY_KEY,
51
- testId: 'pluginRegistry.all',
52
- },
53
- },
54
- {
55
- id: `${REGISTRY_KEY}+installed`,
56
- type: 'category',
57
- data: `${REGISTRY_KEY}+installed`,
58
- properties: {
59
- label: ['installed plugins label', { ns: REGISTRY_PLUGIN }],
60
- icon: 'ph--check--regular',
61
- key: REGISTRY_KEY,
62
- testId: 'pluginRegistry.installed',
63
- },
64
- },
65
- {
66
- id: `${REGISTRY_KEY}+recommended`,
67
- type: 'category',
68
- data: `${REGISTRY_KEY}+recommended`,
69
- properties: {
70
- label: ['recommended plugins label', { ns: REGISTRY_PLUGIN }],
71
- icon: 'ph--star--regular',
72
- key: REGISTRY_KEY,
73
- testId: 'pluginRegistry.recommended',
42
+ connector: (node) =>
43
+ Rx.make((get) =>
44
+ pipe(
45
+ get(node),
46
+ Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),
47
+ Option.map((node) => [
48
+ {
49
+ id: REGISTRY_ID,
50
+ type: REGISTRY_PLUGIN,
51
+ properties: {
52
+ label: ['plugin registry label', { ns: REGISTRY_PLUGIN }],
53
+ icon: 'ph--squares-four--regular',
54
+ disposition: 'pin-end',
55
+ testId: 'treeView.pluginRegistry',
56
+ },
57
+ nodes: [
58
+ {
59
+ id: `${REGISTRY_KEY}+all`,
60
+ type: 'category',
61
+ data: `${REGISTRY_KEY}+all`,
62
+ properties: {
63
+ label: ['all plugins label', { ns: REGISTRY_PLUGIN }],
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: ['installed plugins label', { ns: REGISTRY_PLUGIN }],
75
+ icon: 'ph--check--regular',
76
+ key: REGISTRY_KEY,
77
+ testId: 'pluginRegistry.installed',
78
+ },
79
+ },
80
+ {
81
+ id: `${REGISTRY_KEY}+recommended`,
82
+ type: 'category',
83
+ data: `${REGISTRY_KEY}+recommended`,
84
+ properties: {
85
+ label: ['recommended plugins label', { ns: REGISTRY_PLUGIN }],
86
+ icon: 'ph--star--regular',
87
+ key: REGISTRY_KEY,
88
+ testId: 'pluginRegistry.recommended',
89
+ },
90
+ },
91
+ {
92
+ id: `${REGISTRY_KEY}+labs`,
93
+ type: 'category',
94
+ data: `${REGISTRY_KEY}+labs`,
95
+ properties: {
96
+ label: ['labs plugins label', { ns: REGISTRY_PLUGIN }],
97
+ icon: 'ph--flask--regular',
98
+ key: REGISTRY_KEY,
99
+ testId: 'pluginRegistry.labs',
100
+ },
101
+ },
102
+ ],
74
103
  },
75
- },
76
- {
77
- id: `${REGISTRY_KEY}+experimental`,
78
- type: 'category',
79
- data: `${REGISTRY_KEY}+experimental`,
80
- properties: {
81
- label: ['experimental plugins label', { ns: REGISTRY_PLUGIN }],
82
- icon: 'ph--flask--regular',
83
- key: REGISTRY_KEY,
84
- testId: 'pluginRegistry.experimental',
85
- },
86
- },
87
- ],
88
- },
89
- ],
104
+ ]),
105
+ Option.getOrElse(() => []),
106
+ ),
107
+ ),
90
108
  }),
91
109
  createExtension({
92
110
  id: `${REGISTRY_PLUGIN}/actions`,
93
- filter: (node): node is Node<null> => node.id === REGISTRY_ID,
94
- actions: () => [
95
- {
96
- id: `${REGISTRY_PLUGIN}/load-by-url`,
97
- data: async () => {},
98
- properties: {
99
- label: ['load by url label', { ns: REGISTRY_PLUGIN }],
100
- icon: 'ph--cloud-arrow-down--regular',
101
- disabled: true,
102
- },
103
- },
104
- ],
111
+ actions: (node) =>
112
+ Rx.make((get) =>
113
+ pipe(
114
+ get(node),
115
+ Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),
116
+ Option.map(() => [
117
+ {
118
+ id: `${REGISTRY_PLUGIN}/load-by-url`,
119
+ data: async () => {},
120
+ properties: {
121
+ label: ['load by url label', { ns: REGISTRY_PLUGIN }],
122
+ icon: 'ph--cloud-arrow-down--regular',
123
+ disabled: true,
124
+ },
125
+ },
126
+ ]),
127
+ Option.getOrElse(() => []),
128
+ ),
129
+ ),
105
130
  }),
106
131
  createExtension({
107
132
  id: `${REGISTRY_PLUGIN}/plugins`,
108
- resolver: ({ id }) => {
109
- const manager = context.requestCapability(Capabilities.PluginManager);
110
- const plugin = manager.plugins.find((plugin) => plugin.meta.id === id.replaceAll(':', '/'));
111
- if (!plugin) {
112
- return;
113
- }
114
-
115
- return {
116
- id,
117
- type: 'dxos.org/plugin',
118
- data: plugin,
119
- properties: {
120
- label: plugin.meta.name ?? plugin.meta.id,
121
- icon: plugin.meta.icon ?? 'ph--circle--regular',
122
- },
123
- };
124
- },
133
+ connector: (node) =>
134
+ Rx.make((get) =>
135
+ pipe(
136
+ get(node),
137
+ Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),
138
+ Option.map(() => {
139
+ const manager = context.getCapability(Capabilities.PluginManager);
140
+ return manager.plugins.map((plugin) => ({
141
+ id: plugin.meta.id.replaceAll('/', ':'),
142
+ type: 'dxos.org/plugin',
143
+ data: plugin,
144
+ properties: {
145
+ label: plugin.meta.name ?? plugin.meta.id,
146
+ icon: plugin.meta.icon ?? 'ph--circle--regular',
147
+ disposition: 'hidden',
148
+ },
149
+ }));
150
+ }),
151
+ Option.getOrElse(() => []),
152
+ ),
153
+ ),
125
154
  }),
126
155
  ]);
@@ -50,7 +50,7 @@ export default () =>
50
50
  () =>
51
51
  manager.plugins
52
52
  .filter(({ meta }) => !manager.core.includes(meta.id))
53
- .filter(({ meta }) => !meta.tags?.includes('experimental')),
53
+ .filter(({ meta }) => !meta.tags?.includes('labs')),
54
54
  [],
55
55
  );
56
56
 
@@ -58,14 +58,14 @@ export default () =>
58
58
  },
59
59
  }),
60
60
  createSurface({
61
- id: `${REGISTRY_PLUGIN}/experimental`,
61
+ id: `${REGISTRY_PLUGIN}/labs`,
62
62
  role: 'article',
63
- filter: (data): data is any => data.subject === `${REGISTRY_KEY}+experimental`,
63
+ filter: (data): data is any => data.subject === `${REGISTRY_KEY}+labs`,
64
64
  component: () => {
65
65
  const manager = usePluginManager();
66
- const filtered = useMemo(() => manager.plugins.filter(({ meta }) => meta.tags?.includes('experimental')), []);
66
+ const filtered = useMemo(() => manager.plugins.filter(({ meta }) => meta.tags?.includes('labs')), []);
67
67
 
68
- return <RegistryContainer id={`${REGISTRY_KEY}+experimental`} plugins={filtered} />;
68
+ return <RegistryContainer id={`${REGISTRY_KEY}+labs`} plugins={filtered} />;
69
69
  },
70
70
  }),
71
71
  createSurface({
@@ -2,10 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import React, { useCallback } from 'react';
5
+ import React, { type MouseEvent, useCallback } from 'react';
6
6
 
7
7
  import { type Plugin } from '@dxos/app-framework';
8
- import { Icon, IconButton, Input, Link, ListItem, useTranslation } from '@dxos/react-ui';
8
+ import { Icon, IconButton, Input, Link, ListItem, Tag, useTranslation } from '@dxos/react-ui';
9
9
  import { descriptionText, mx } from '@dxos/react-ui-theme';
10
10
 
11
11
  import { REGISTRY_PLUGIN } from '../meta';
@@ -29,7 +29,7 @@ export const PluginItem = ({
29
29
  onSettings,
30
30
  }: PluginItemProps) => {
31
31
  const { t } = useTranslation(REGISTRY_PLUGIN);
32
- const { id, name, description, icon = 'ph--circle--regular' } = plugin.meta;
32
+ const { id, name, description, tags, icon = 'ph--circle--regular' } = plugin.meta;
33
33
  const isEnabled = enabled.includes(id);
34
34
  const inputId = `${id}-input`;
35
35
  const labelId = `${id}-label`;
@@ -37,7 +37,7 @@ export const PluginItem = ({
37
37
  const handleClick = useCallback(() => onClick?.(id), [id, onClick]);
38
38
 
39
39
  const handleChange = useCallback(
40
- (event: React.MouseEvent) => {
40
+ (event: MouseEvent) => {
41
41
  event.stopPropagation();
42
42
  onChange?.(id, !isEnabled);
43
43
  },
@@ -54,10 +54,10 @@ export const PluginItem = ({
54
54
  data-testid={`pluginList.${id}`}
55
55
  aria-describedby={descriptionId}
56
56
  // TODO(burdon): Use Rail vars.
57
- classNames='w-full h-full grid grid-cols-[48px_1fr_48px] grid-rows-[40px_1fr_32px] p-1 border border-separator rounded-md'
57
+ classNames='is-full bs-full grid grid-cols-[48px_1fr_48px] grid-rows-[40px_1fr_32px] p-1 border border-separator rounded-md'
58
58
  >
59
59
  {/* Header. */}
60
- <div className='flex justify-center items-center'>
60
+ <div className='flex flex-col grow justify-center items-center'>
61
61
  <Icon icon={icon} size={6} onClick={handleClick} classNames='text-subdued cursor-pointer' />
62
62
  </div>
63
63
  <div className='flex items-center overflow-hidden cursor-pointer' onClick={handleClick}>
@@ -71,9 +71,22 @@ export const PluginItem = ({
71
71
 
72
72
  {/* Body. */}
73
73
  <div />
74
- <div id={descriptionId} className='col-span-2 pb-3'>
75
- <p className={mx(descriptionText, 'line-clamp-3 min-w-0 pie-4')}>{description}</p>
76
- </div>
74
+ {(description || tags) && (
75
+ <div id={descriptionId} className='col-span-2 flex flex-col w-full justify-between gap-2 pb-2'>
76
+ <div className='grow'>
77
+ <p className={mx(descriptionText, 'line-clamp-3 min-w-0 pie-2')}>{description}</p>
78
+ </div>
79
+ {tags && tags.length > 0 && (
80
+ <div>
81
+ {tags.map((tag) => (
82
+ <Tag key={tag} palette={'indigo'} classNames='text-xs capitalize'>
83
+ {tag}
84
+ </Tag>
85
+ ))}
86
+ </div>
87
+ )}
88
+ </div>
89
+ )}
77
90
 
78
91
  {/* Footer. */}
79
92
  <div />
@@ -93,7 +106,7 @@ export const PluginItem = ({
93
106
  <IconButton
94
107
  aria-describedby={descriptionId}
95
108
  classNames='text-sm text-description cursor-pointer'
96
- icon='ph--gear--regular'
109
+ icon='ph--faders--regular'
97
110
  label={t('settings label')}
98
111
  iconOnly
99
112
  size={4}
@@ -37,7 +37,7 @@ const DefaultStory = ({ classNames }: ThemedClassName<{}>) => {
37
37
  name: `${faker.commerce.productName()}`,
38
38
  description: faker.lorem.sentences(Math.ceil(Math.random() * 3)),
39
39
  tags: faker.datatype.boolean({ probability: 0.6 })
40
- ? [faker.helpers.arrayElement(['experimental', 'beta', 'alpha', 'stable', 'new', '新発売'])]
40
+ ? [faker.helpers.arrayElement(['labs', 'beta', 'alpha', 'stable', 'new', '新発売'])]
41
41
  : undefined,
42
42
  icon: faker.helpers.arrayElement(icons),
43
43
  homePage: faker.datatype.boolean({ probability: 0.5 }) ? faker.internet.url() : undefined,
@@ -65,7 +65,7 @@ const meta: Meta = {
65
65
  title: 'plugins/plugin-registry/PluginList',
66
66
  component: PluginList,
67
67
  render: DefaultStory,
68
- decorators: [withTheme, withLayout({ tooltips: true, fullscreen: true, classNames: 'justify-center' })],
68
+ decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'justify-center' })],
69
69
  parameters: {
70
70
  translations,
71
71
  },
@@ -15,7 +15,7 @@ export type PluginListProps = Omit<PluginItemProps, 'plugin'> & {
15
15
 
16
16
  export const PluginList = ({ plugins = [], ...props }: PluginListProps) => {
17
17
  return (
18
- <List classNames='grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] auto-rows-[10rem] gap-3 p-3'>
18
+ <List classNames='grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] auto-rows-[12rem] gap-3 p-3'>
19
19
  {plugins.map((plugin) => (
20
20
  <div key={plugin.meta.id} className='flex'>
21
21
  <PluginItem plugin={plugin} {...props} />
@@ -9,11 +9,6 @@ export default [
9
9
  'en-US': {
10
10
  [REGISTRY_PLUGIN]: {
11
11
  'plugin name': 'Registry',
12
- 'reload required message': 'Reload required.',
13
- 'settings show experimental label': 'Show experimental plugins',
14
- 'settings section installed label': 'Enabled',
15
- 'settings section recommended label': 'Recommended',
16
- 'settings section experimental label': 'Experimental',
17
12
  'details label': 'Details',
18
13
  'home page label': 'Website',
19
14
  'source label': 'Source',
@@ -21,7 +16,7 @@ export default [
21
16
  'all plugins label': 'All',
22
17
  'installed plugins label': 'Enabled',
23
18
  'recommended plugins label': 'Recommended',
24
- 'experimental plugins label': 'Experimental',
19
+ 'labs plugins label': 'Labs',
25
20
  'community plugins label': 'Community',
26
21
  'load by url label': 'Load by URL (soon)',
27
22
  'coming soon label': 'Coming soon!',
package/src/types.ts CHANGED
@@ -2,12 +2,12 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { S } from '@dxos/echo-schema';
5
+ import { Schema } from 'effect';
6
6
 
7
- export const RegistrySettingsSchema = S.mutable(
8
- S.Struct({
9
- experimental: S.optional(S.Boolean),
7
+ export const RegistrySettingsSchema = Schema.mutable(
8
+ Schema.Struct({
9
+ experimental: Schema.optional(Schema.Boolean),
10
10
  }),
11
11
  );
12
12
 
13
- export type RegistrySettings = S.Schema.Type<typeof RegistrySettingsSchema>;
13
+ export type RegistrySettings = Schema.Schema.Type<typeof RegistrySettingsSchema>;
@@ -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 { Capabilities, contributes, createIntent, SettingsAction, type PluginsContext } from '@dxos/app-framework';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\n\nimport { REGISTRY_ID, REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';\n\nexport default (context: PluginsContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: REGISTRY_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: REGISTRY_PLUGIN,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(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 },\n },\n ],\n }),\n createExtension({\n id: REGISTRY_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n connector: () => [\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}+experimental`,\n type: 'category',\n data: `${REGISTRY_KEY}+experimental`,\n properties: {\n label: ['experimental plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--flask--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.experimental',\n },\n },\n ],\n },\n ],\n }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/actions`,\n filter: (node): node is Node<null> => node.id === REGISTRY_ID,\n actions: () => [\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 }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/plugins`,\n resolver: ({ id }) => {\n const manager = context.requestCapability(Capabilities.PluginManager);\n const plugin = manager.plugins.find((plugin) => plugin.meta.id === id.replaceAll(':', '/'));\n if (!plugin) {\n return;\n }\n\n return {\n id,\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 },\n };\n },\n }),\n ]);\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,sBAA2C;AAC7F,SAASC,uBAAkC;AAI3C,IAAA,4BAAe,CAACC,YACdC,YAAYC,aAAaC,iBAAiB;EACxCC,gBAAgB;IACdC,IAAIC;IACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;IAClDI,SAAS,MAAM;MACb;QACEJ,IAAIC;QACJI,MAAM,YAAA;AACJ,gBAAM,EAAEC,iBAAiBC,SAAQ,IAAKZ,QAAQa,kBAAkBX,aAAaY,gBAAgB;AAC7F,gBAAMF,SAASG,aAAaC,eAAeC,kBAAkB,CAAA;QAC/D;QACAC,YAAY;UACVC,OAAO;YAAC;YAA8B;cAAEC,IAAId;YAAgB;;UAC5De,MAAM;QACR;MACF;;EAEJ,CAAA;EACAjB,gBAAgB;IACdC,IAAIC;IACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;IAClDiB,WAAW,MAAM;MACf;QACEjB,IAAIkB;QACJC,MAAMlB;QACNY,YAAY;UACVC,OAAO;YAAC;YAAyB;cAAEC,IAAId;YAAgB;;UACvDe,MAAM;UACNI,aAAa;UACbC,QAAQ;QACV;QACAC,OAAO;UACL;YACEtB,IAAI,GAAGuB,YAAAA;YACPJ,MAAM;YACNd,MAAM,GAAGkB,YAAAA;YACTV,YAAY;cACVC,OAAO;gBAAC;gBAAqB;kBAAEC,IAAId;gBAAgB;;cACnDe,MAAM;cACNQ,KAAKD;cACLF,QAAQ;YACV;UACF;UACA;YACErB,IAAI,GAAGuB,YAAAA;YACPJ,MAAM;YACNd,MAAM,GAAGkB,YAAAA;YACTV,YAAY;cACVC,OAAO;gBAAC;gBAA2B;kBAAEC,IAAId;gBAAgB;;cACzDe,MAAM;cACNQ,KAAKD;cACLF,QAAQ;YACV;UACF;UACA;YACErB,IAAI,GAAGuB,YAAAA;YACPJ,MAAM;YACNd,MAAM,GAAGkB,YAAAA;YACTV,YAAY;cACVC,OAAO;gBAAC;gBAA6B;kBAAEC,IAAId;gBAAgB;;cAC3De,MAAM;cACNQ,KAAKD;cACLF,QAAQ;YACV;UACF;UACA;YACErB,IAAI,GAAGuB,YAAAA;YACPJ,MAAM;YACNd,MAAM,GAAGkB,YAAAA;YACTV,YAAY;cACVC,OAAO;gBAAC;gBAA8B;kBAAEC,IAAId;gBAAgB;;cAC5De,MAAM;cACNQ,KAAKD;cACLF,QAAQ;YACV;UACF;;MAEJ;;EAEJ,CAAA;EACAtB,gBAAgB;IACdC,IAAI,GAAGC,eAAAA;IACPC,QAAQ,CAACC,SAA6BA,KAAKH,OAAOkB;IAClDd,SAAS,MAAM;MACb;QACEJ,IAAI,GAAGC,eAAAA;QACPI,MAAM,YAAA;QAAa;QACnBQ,YAAY;UACVC,OAAO;YAAC;YAAqB;cAAEC,IAAId;YAAgB;;UACnDe,MAAM;UACNS,UAAU;QACZ;MACF;;EAEJ,CAAA;EACA1B,gBAAgB;IACdC,IAAI,GAAGC,eAAAA;IACPyB,UAAU,CAAC,EAAE1B,GAAE,MAAE;AACf,YAAM2B,UAAUhC,QAAQa,kBAAkBX,aAAa+B,aAAa;AACpE,YAAMC,SAASF,QAAQG,QAAQC,KAAK,CAACF,YAAWA,QAAOG,KAAKhC,OAAOA,GAAGiC,WAAW,KAAK,GAAA,CAAA;AACtF,UAAI,CAACJ,QAAQ;AACX;MACF;AAEA,aAAO;QACL7B;QACAmB,MAAM;QACNd,MAAMwB;QACNhB,YAAY;UACVC,OAAOe,OAAOG,KAAKE,QAAQL,OAAOG,KAAKhC;UACvCgB,MAAMa,OAAOG,KAAKhB,QAAQ;QAC5B;MACF;IACF;EACF,CAAA;CACD;",
6
- "names": ["Capabilities", "contributes", "createIntent", "SettingsAction", "createExtension", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "REGISTRY_PLUGIN", "filter", "node", "actions", "data", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "createIntent", "SettingsAction", "OpenPluginRegistry", "properties", "label", "ns", "icon", "connector", "REGISTRY_ID", "type", "disposition", "testId", "nodes", "REGISTRY_KEY", "key", "disabled", "resolver", "manager", "PluginManager", "plugin", "plugins", "find", "meta", "replaceAll", "name"]
7
- }