@dxos/plugin-registry 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b
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/app-graph-builder-PPWF5KP5.mjs +164 -0
- package/dist/lib/browser/app-graph-builder-PPWF5KP5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CMDU7LPH.mjs → chunk-RGSIE33X.mjs} +5 -1
- package/dist/lib/browser/chunk-RGSIE33X.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +32 -12
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-2JQUQJI5.mjs +23 -0
- package/dist/lib/browser/intent-resolver-2JQUQJI5.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-NRETIUCH.mjs +295 -0
- package/dist/lib/browser/react-surface-NRETIUCH.mjs.map +7 -0
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +179 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/{settings.d.ts → intent-resolver.d.ts} +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail.d.ts +9 -0
- package/dist/types/src/components/PluginDetail.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail.stories.d.ts +8 -0
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +1 -0
- package/dist/types/src/components/PluginItem.d.ts +11 -0
- package/dist/types/src/components/PluginItem.d.ts.map +1 -0
- package/dist/types/src/components/PluginList.d.ts +5 -8
- package/dist/types/src/components/PluginList.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.stories.d.ts +6 -1
- package/dist/types/src/components/PluginList.stories.d.ts.map +1 -1
- package/dist/types/src/components/RegistryContainer.d.ts +7 -0
- package/dist/types/src/components/RegistryContainer.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +10 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +16 -15
- package/src/RegistryPlugin.tsx +12 -7
- package/src/capabilities/app-graph-builder.ts +126 -0
- package/src/capabilities/index.ts +2 -1
- package/src/capabilities/intent-resolver.ts +27 -0
- package/src/capabilities/react-surface.tsx +76 -10
- package/src/components/PluginDetail.stories.tsx +45 -0
- package/src/components/PluginDetail.tsx +63 -0
- package/src/components/PluginItem.tsx +105 -0
- package/src/components/PluginList.stories.tsx +30 -21
- package/src/components/PluginList.tsx +13 -90
- package/src/components/RegistryContainer.tsx +51 -0
- package/src/components/index.ts +2 -1
- package/src/meta.ts +4 -0
- package/src/translations.ts +12 -2
- package/dist/lib/browser/chunk-CMDU7LPH.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HKWZP7OW.mjs +0 -179
- package/dist/lib/browser/react-surface-HKWZP7OW.mjs.map +0 -7
- package/dist/lib/browser/settings-7LOHS2IV.mjs +0 -27
- package/dist/lib/browser/settings-7LOHS2IV.mjs.map +0 -7
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/components/PluginSettings.d.ts +0 -6
- package/dist/types/src/components/PluginSettings.d.ts.map +0 -1
- package/src/capabilities/settings.ts +0 -19
- package/src/components/PluginSettings.tsx +0 -112
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import {
|
|
2
|
+
REGISTRY_KEY,
|
|
3
|
+
REGISTRY_PLUGIN
|
|
4
|
+
} from "./chunk-RGSIE33X.mjs";
|
|
5
|
+
|
|
6
|
+
// packages/plugins/plugin-registry/src/capabilities/react-surface.tsx
|
|
7
|
+
import React5, { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
8
|
+
import { Capabilities, contributes, createSurface, Plugin, usePluginManager as usePluginManager2 } from "@dxos/app-framework";
|
|
9
|
+
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
10
|
+
|
|
11
|
+
// packages/plugins/plugin-registry/src/components/PluginDetail.tsx
|
|
12
|
+
import React from "react";
|
|
13
|
+
import { Icon, Input, Link, useTranslation } from "@dxos/react-ui";
|
|
14
|
+
import { DeprecatedFormContainer } from "@dxos/react-ui-form";
|
|
15
|
+
var PluginDetail = ({ plugin, enabled, onEnable }) => {
|
|
16
|
+
const { t } = useTranslation(REGISTRY_PLUGIN);
|
|
17
|
+
const { id, name, description, homePage, source, screenshots } = plugin.meta;
|
|
18
|
+
return /* @__PURE__ */ React.createElement(DeprecatedFormContainer, {
|
|
19
|
+
classNames: "gap-6"
|
|
20
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
21
|
+
role: "none",
|
|
22
|
+
className: "flex justify-between items-center"
|
|
23
|
+
}, /* @__PURE__ */ React.createElement("p", null, id), /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
24
|
+
classNames: "self-center",
|
|
25
|
+
checked: enabled,
|
|
26
|
+
onClick: onEnable
|
|
27
|
+
}))), screenshots && /* @__PURE__ */ React.createElement("div", {
|
|
28
|
+
role: "none"
|
|
29
|
+
}, /* @__PURE__ */ React.createElement("h1", {
|
|
30
|
+
className: "text-lg mb-2"
|
|
31
|
+
}, "Preview"), /* @__PURE__ */ React.createElement("img", {
|
|
32
|
+
src: screenshots[0],
|
|
33
|
+
alt: name,
|
|
34
|
+
className: "aspect-video object-fit"
|
|
35
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
36
|
+
role: "none"
|
|
37
|
+
}, /* @__PURE__ */ React.createElement("p", null, description)), /* @__PURE__ */ React.createElement("div", {
|
|
38
|
+
role: "none"
|
|
39
|
+
}, /* @__PURE__ */ React.createElement("h1", {
|
|
40
|
+
className: "text-lg mb-2"
|
|
41
|
+
}, "Resources"), /* @__PURE__ */ React.createElement("div", {
|
|
42
|
+
className: "flex gap-2"
|
|
43
|
+
}, homePage && /* @__PURE__ */ React.createElement(Link, {
|
|
44
|
+
href: homePage,
|
|
45
|
+
target: "_blank",
|
|
46
|
+
rel: "noreferrer",
|
|
47
|
+
classNames: "text-sm text-description"
|
|
48
|
+
}, t("home page label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
49
|
+
icon: "ph--arrow-square-out--bold",
|
|
50
|
+
size: 3,
|
|
51
|
+
classNames: "inline-block leading-none mli-1"
|
|
52
|
+
})), source && /* @__PURE__ */ React.createElement(Link, {
|
|
53
|
+
href: source,
|
|
54
|
+
target: "_blank",
|
|
55
|
+
rel: "noreferrer",
|
|
56
|
+
classNames: "text-sm text-description"
|
|
57
|
+
}, t("source label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
58
|
+
icon: "ph--arrow-square-out--bold",
|
|
59
|
+
size: 3,
|
|
60
|
+
classNames: "inline-block leading-none mli-1"
|
|
61
|
+
})))));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// packages/plugins/plugin-registry/src/components/PluginList.tsx
|
|
65
|
+
import React3 from "react";
|
|
66
|
+
import { List } from "@dxos/react-ui";
|
|
67
|
+
|
|
68
|
+
// packages/plugins/plugin-registry/src/components/PluginItem.tsx
|
|
69
|
+
import React2, { useCallback } from "react";
|
|
70
|
+
import { Icon as Icon2, Input as Input2, Link as Link2, ListItem, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
71
|
+
import { descriptionText, mx } from "@dxos/react-ui-theme";
|
|
72
|
+
var PluginItem = ({ plugin, enabled = [], onClick, onChange }) => {
|
|
73
|
+
const { t } = useTranslation2(REGISTRY_PLUGIN);
|
|
74
|
+
const { id, name, description, homePage, source, icon = "ph--circle--regular" } = plugin.meta;
|
|
75
|
+
const isEnabled = enabled.includes(id);
|
|
76
|
+
const inputId = `${id}-input`;
|
|
77
|
+
const labelId = `${id}-label`;
|
|
78
|
+
const descriptionId = `${id}-description`;
|
|
79
|
+
const handleClick = useCallback(() => onClick?.(id), [
|
|
80
|
+
id,
|
|
81
|
+
onClick
|
|
82
|
+
]);
|
|
83
|
+
const handleChange = useCallback((event) => {
|
|
84
|
+
event.stopPropagation();
|
|
85
|
+
onChange?.(id, !isEnabled);
|
|
86
|
+
}, [
|
|
87
|
+
id,
|
|
88
|
+
isEnabled,
|
|
89
|
+
onChange
|
|
90
|
+
]);
|
|
91
|
+
return /* @__PURE__ */ React2.createElement(ListItem.Root, {
|
|
92
|
+
key: id,
|
|
93
|
+
labelId,
|
|
94
|
+
"data-testid": `pluginList.${id}`,
|
|
95
|
+
"aria-describedby": descriptionId,
|
|
96
|
+
classNames: "w-full h-full grid grid-cols-[48px_1fr_48px] grid-rows-[40px_1fr] p-1 rounded-md border border-separator"
|
|
97
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
98
|
+
className: "flex grow justify-center items-center"
|
|
99
|
+
}, /* @__PURE__ */ React2.createElement(Icon2, {
|
|
100
|
+
icon,
|
|
101
|
+
size: 6,
|
|
102
|
+
onClick: handleClick,
|
|
103
|
+
classNames: "text-subdued cursor-pointer"
|
|
104
|
+
})), /* @__PURE__ */ React2.createElement("div", {
|
|
105
|
+
className: "flex grow items-center truncate cursor-pointer",
|
|
106
|
+
onClick: handleClick
|
|
107
|
+
}, name ?? id), /* @__PURE__ */ React2.createElement("div", {
|
|
108
|
+
className: "flex grow justify-center items-center"
|
|
109
|
+
}, /* @__PURE__ */ React2.createElement(Input2.Root, {
|
|
110
|
+
id: inputId
|
|
111
|
+
}, /* @__PURE__ */ React2.createElement(Input2.Switch, {
|
|
112
|
+
classNames: "self-center",
|
|
113
|
+
checked: isEnabled,
|
|
114
|
+
onClick: handleChange
|
|
115
|
+
}))), /* @__PURE__ */ React2.createElement("div", null), (description || homePage || source) && /* @__PURE__ */ React2.createElement("div", {
|
|
116
|
+
id: descriptionId,
|
|
117
|
+
className: "col-span-2 flex flex-col w-full gap-2 pb-3 overflow-y-scroll"
|
|
118
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
119
|
+
className: "grow"
|
|
120
|
+
}, /* @__PURE__ */ React2.createElement("p", {
|
|
121
|
+
className: mx(descriptionText, "line-clamp-3 min-w-0 pie-4")
|
|
122
|
+
}, description)), /* @__PURE__ */ React2.createElement("div", {
|
|
123
|
+
className: "flex gap-2 items-center"
|
|
124
|
+
}, /* @__PURE__ */ React2.createElement(Link2, {
|
|
125
|
+
"aria-describedby": descriptionId,
|
|
126
|
+
classNames: "text-sm text-description cursor-pointer",
|
|
127
|
+
onClick: handleClick
|
|
128
|
+
}, t("details label")), homePage && /* @__PURE__ */ React2.createElement(Link2, {
|
|
129
|
+
href: homePage,
|
|
130
|
+
target: "_blank",
|
|
131
|
+
rel: "noreferrer",
|
|
132
|
+
"aria-describedby": descriptionId,
|
|
133
|
+
classNames: "text-sm text-description",
|
|
134
|
+
onClick: (ev) => ev.stopPropagation()
|
|
135
|
+
}, t("home page label"), /* @__PURE__ */ React2.createElement(Icon2, {
|
|
136
|
+
icon: "ph--arrow-square-out--bold",
|
|
137
|
+
size: 3,
|
|
138
|
+
classNames: "inline-block leading-none mli-1"
|
|
139
|
+
})), source && /* @__PURE__ */ React2.createElement(Link2, {
|
|
140
|
+
href: source,
|
|
141
|
+
target: "_blank",
|
|
142
|
+
rel: "noreferrer",
|
|
143
|
+
"aria-describedby": descriptionId,
|
|
144
|
+
classNames: "text-sm text-description",
|
|
145
|
+
onClick: (ev) => ev.stopPropagation()
|
|
146
|
+
}, t("source label"), /* @__PURE__ */ React2.createElement(Icon2, {
|
|
147
|
+
icon: "ph--arrow-square-out--bold",
|
|
148
|
+
size: 3,
|
|
149
|
+
classNames: "inline-block leading-none mli-1"
|
|
150
|
+
})))));
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// packages/plugins/plugin-registry/src/components/PluginList.tsx
|
|
154
|
+
var PluginList = ({ plugins = [], ...props }) => {
|
|
155
|
+
return /* @__PURE__ */ React3.createElement(List, {
|
|
156
|
+
classNames: "grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] auto-rows-[10rem] gap-3 p-3 overflow-y-auto scrollbar-thin"
|
|
157
|
+
}, plugins.map((plugin) => /* @__PURE__ */ React3.createElement("div", {
|
|
158
|
+
key: plugin.meta.id,
|
|
159
|
+
className: "flex"
|
|
160
|
+
}, /* @__PURE__ */ React3.createElement(PluginItem, {
|
|
161
|
+
plugin,
|
|
162
|
+
...props
|
|
163
|
+
}))));
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// packages/plugins/plugin-registry/src/components/RegistryContainer.tsx
|
|
167
|
+
import React4, { useMemo } from "react";
|
|
168
|
+
import { createIntent, LayoutAction, useIntentDispatcher, usePluginManager } from "@dxos/app-framework";
|
|
169
|
+
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
170
|
+
import { StackItem } from "@dxos/react-ui-stack";
|
|
171
|
+
var sortByPluginMeta = ({ meta: { name: a = "" } }, { meta: { name: b = "" } }) => a.localeCompare(b);
|
|
172
|
+
var RegistryContainer = ({ id, plugins: _plugins }) => {
|
|
173
|
+
const manager = usePluginManager();
|
|
174
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
175
|
+
const plugins = useMemo(() => _plugins.sort(sortByPluginMeta), [
|
|
176
|
+
_plugins
|
|
177
|
+
]);
|
|
178
|
+
const handleChange = async (id2, enabled) => {
|
|
179
|
+
if (enabled) {
|
|
180
|
+
await manager.enable(id2);
|
|
181
|
+
} else {
|
|
182
|
+
await manager.disable(id2);
|
|
183
|
+
}
|
|
184
|
+
await dispatch(createIntent(ObservabilityAction.SendEvent, {
|
|
185
|
+
name: "plugins.toggle",
|
|
186
|
+
properties: {
|
|
187
|
+
plugin: id2,
|
|
188
|
+
enabled
|
|
189
|
+
}
|
|
190
|
+
}));
|
|
191
|
+
};
|
|
192
|
+
const handleClick = (pluginId) => dispatch(createIntent(LayoutAction.Open, {
|
|
193
|
+
part: "main",
|
|
194
|
+
// TODO(wittjosiah): `/` currently is not supported in ids.
|
|
195
|
+
subject: [
|
|
196
|
+
pluginId.replaceAll("/", ":")
|
|
197
|
+
],
|
|
198
|
+
options: {
|
|
199
|
+
pivotId: id,
|
|
200
|
+
positioning: "end"
|
|
201
|
+
}
|
|
202
|
+
}));
|
|
203
|
+
return /* @__PURE__ */ React4.createElement(StackItem.Content, {
|
|
204
|
+
toolbar: false,
|
|
205
|
+
role: "article",
|
|
206
|
+
classNames: "overflow-x-hidden overflow-y-auto"
|
|
207
|
+
}, /* @__PURE__ */ React4.createElement(PluginList, {
|
|
208
|
+
plugins,
|
|
209
|
+
enabled: manager.enabled,
|
|
210
|
+
onClick: handleClick,
|
|
211
|
+
onChange: handleChange
|
|
212
|
+
}));
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// packages/plugins/plugin-registry/src/capabilities/react-surface.tsx
|
|
216
|
+
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
217
|
+
createSurface({
|
|
218
|
+
id: `${REGISTRY_PLUGIN}/all`,
|
|
219
|
+
role: "article",
|
|
220
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}:all`,
|
|
221
|
+
component: () => {
|
|
222
|
+
const manager = usePluginManager2();
|
|
223
|
+
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)), []);
|
|
224
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
225
|
+
id: `${REGISTRY_KEY}:all`,
|
|
226
|
+
plugins: filtered
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}),
|
|
230
|
+
createSurface({
|
|
231
|
+
id: `${REGISTRY_PLUGIN}/installed`,
|
|
232
|
+
role: "article",
|
|
233
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}:installed`,
|
|
234
|
+
component: () => {
|
|
235
|
+
const manager = usePluginManager2();
|
|
236
|
+
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)).filter(({ meta }) => manager.enabled.includes(meta.id)), []);
|
|
237
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
238
|
+
id: `${REGISTRY_KEY}:installed`,
|
|
239
|
+
plugins: filtered
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}),
|
|
243
|
+
createSurface({
|
|
244
|
+
id: `${REGISTRY_PLUGIN}/recommended`,
|
|
245
|
+
role: "article",
|
|
246
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}:recommended`,
|
|
247
|
+
component: () => {
|
|
248
|
+
const manager = usePluginManager2();
|
|
249
|
+
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)).filter(({ meta }) => !meta.tags?.includes("experimental")), []);
|
|
250
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
251
|
+
id: `${REGISTRY_KEY}:recommended`,
|
|
252
|
+
plugins: filtered
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}),
|
|
256
|
+
createSurface({
|
|
257
|
+
id: `${REGISTRY_PLUGIN}/experimental`,
|
|
258
|
+
role: "article",
|
|
259
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}:experimental`,
|
|
260
|
+
component: () => {
|
|
261
|
+
const manager = usePluginManager2();
|
|
262
|
+
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => meta.tags?.includes("experimental")), []);
|
|
263
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
264
|
+
id: `${REGISTRY_KEY}:experimental`,
|
|
265
|
+
plugins: filtered
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}),
|
|
269
|
+
createSurface({
|
|
270
|
+
id: `${REGISTRY_PLUGIN}/plugin-details`,
|
|
271
|
+
role: "article",
|
|
272
|
+
filter: (data) => data.subject instanceof Plugin,
|
|
273
|
+
component: ({ data: { subject } }) => {
|
|
274
|
+
const manager = usePluginManager2();
|
|
275
|
+
const enabled = manager.enabled.includes(subject.meta.id);
|
|
276
|
+
const handleEnable = useCallback2(() => enabled ? manager.disable(subject.meta.id) : manager.enable(subject.meta.id), [
|
|
277
|
+
manager,
|
|
278
|
+
subject.meta.id,
|
|
279
|
+
enabled
|
|
280
|
+
]);
|
|
281
|
+
return /* @__PURE__ */ React5.createElement(StackItem2.Content, {
|
|
282
|
+
role: "article",
|
|
283
|
+
toolbar: false
|
|
284
|
+
}, /* @__PURE__ */ React5.createElement(PluginDetail, {
|
|
285
|
+
plugin: subject,
|
|
286
|
+
enabled,
|
|
287
|
+
onEnable: handleEnable
|
|
288
|
+
}));
|
|
289
|
+
}
|
|
290
|
+
})
|
|
291
|
+
]);
|
|
292
|
+
export {
|
|
293
|
+
react_surface_default as default
|
|
294
|
+
};
|
|
295
|
+
//# sourceMappingURL=react-surface-NRETIUCH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/PluginDetail.tsx", "../../../src/components/PluginList.tsx", "../../../src/components/PluginItem.tsx", "../../../src/components/RegistryContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Capabilities, contributes, createSurface, Plugin, usePluginManager } from '@dxos/app-framework';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { PluginDetail, RegistryContainer } from '../components';\nimport { REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${REGISTRY_PLUGIN}/all`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}:all`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}:all`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/installed`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}:installed`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager.plugins\n .filter(({ meta }) => !manager.core.includes(meta.id))\n .filter(({ meta }) => manager.enabled.includes(meta.id)),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}:installed`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/recommended`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}:recommended`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager.plugins\n .filter(({ meta }) => !manager.core.includes(meta.id))\n .filter(({ meta }) => !meta.tags?.includes('experimental')),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}:recommended`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/experimental`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}:experimental`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(() => manager.plugins.filter(({ meta }) => meta.tags?.includes('experimental')), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}:experimental`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/plugin-details`,\n role: 'article',\n filter: (data): data is { subject: Plugin } => data.subject instanceof Plugin,\n component: ({ data: { subject } }) => {\n const manager = usePluginManager();\n const enabled = manager.enabled.includes(subject.meta.id);\n const handleEnable = useCallback(\n () => (enabled ? manager.disable(subject.meta.id) : manager.enable(subject.meta.id)),\n [manager, subject.meta.id, enabled],\n );\n\n return (\n <StackItem.Content role='article' toolbar={false}>\n <PluginDetail plugin={subject} enabled={enabled} onEnable={handleEnable} />\n </StackItem.Content>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { Icon, Input, Link, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormContainer } from '@dxos/react-ui-form';\n\nimport { REGISTRY_PLUGIN } from '../meta';\n\nexport type PluginDetailProps = {\n plugin: Plugin;\n enabled?: boolean;\n onEnable?: () => void;\n};\n\nexport const PluginDetail = ({ plugin, enabled, onEnable }: PluginDetailProps) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n const { id, name, description, homePage, source, screenshots } = plugin.meta;\n\n return (\n <DeprecatedFormContainer classNames='gap-6'>\n <div role='none' className='flex justify-between items-center'>\n <p>{id}</p>\n <Input.Root>\n <Input.Switch classNames='self-center' checked={enabled} onClick={onEnable} />\n </Input.Root>\n </div>\n\n {screenshots && (\n <div role='none'>\n <h1 className='text-lg mb-2'>Preview</h1>\n <img src={screenshots[0]} alt={name} className='aspect-video object-fit' />\n </div>\n )}\n\n <div role='none'>\n <p>{description}</p>\n </div>\n\n <div role='none'>\n <h1 className='text-lg mb-2'>Resources</h1>\n <div className='flex gap-2'>\n {homePage && (\n <Link href={homePage} target='_blank' rel='noreferrer' classNames='text-sm text-description'>\n {t('home page label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n\n {source && (\n <Link href={source} target='_blank' rel='noreferrer' classNames='text-sm text-description'>\n {t('source label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n </div>\n </div>\n </DeprecatedFormContainer>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { List } from '@dxos/react-ui';\n\nimport { PluginItem, type PluginItemProps } from './PluginItem';\n\nexport type PluginListProps = Omit<PluginItemProps, 'plugin'> & {\n plugins?: readonly Plugin[];\n};\n\nexport const PluginList = ({ plugins = [], ...props }: PluginListProps) => {\n return (\n <List classNames='grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] auto-rows-[10rem] gap-3 p-3 overflow-y-auto scrollbar-thin'>\n {plugins.map((plugin) => (\n <div key={plugin.meta.id} className='flex'>\n <PluginItem plugin={plugin} {...props} />\n </div>\n ))}\n </List>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { Icon, Input, Link, ListItem, useTranslation } from '@dxos/react-ui';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\n\nimport { REGISTRY_PLUGIN } from '../meta';\n\nexport type PluginItemProps = {\n plugin: Plugin;\n installed?: readonly string[];\n enabled?: readonly string[];\n onClick?: (id: string) => void;\n onChange?: (id: string, enabled: boolean) => void;\n};\n\nexport const PluginItem = ({ plugin, enabled = [], onClick, onChange }: PluginItemProps) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n const { id, name, description, homePage, source, icon = 'ph--circle--regular' } = plugin.meta;\n const isEnabled = enabled.includes(id);\n const inputId = `${id}-input`;\n const labelId = `${id}-label`;\n const descriptionId = `${id}-description`;\n const handleClick = useCallback(() => onClick?.(id), [id, onClick]);\n const handleChange = useCallback(\n (event: React.MouseEvent) => {\n event.stopPropagation();\n onChange?.(id, !isEnabled);\n },\n [id, isEnabled, onChange],\n );\n\n return (\n <ListItem.Root\n key={id}\n labelId={labelId}\n data-testid={`pluginList.${id}`}\n aria-describedby={descriptionId}\n classNames='w-full h-full grid grid-cols-[48px_1fr_48px] grid-rows-[40px_1fr] p-1 rounded-md border border-separator'\n >\n <div className='flex grow justify-center items-center'>\n <Icon icon={icon} size={6} onClick={handleClick} classNames='text-subdued cursor-pointer' />\n </div>\n <div className='flex grow items-center truncate cursor-pointer' onClick={handleClick}>\n {name ?? id}\n </div>\n <div className='flex grow justify-center items-center'>\n <Input.Root id={inputId}>\n <Input.Switch classNames='self-center' checked={isEnabled} onClick={handleChange} />\n </Input.Root>\n </div>\n\n <div />\n {(description || homePage || source) && (\n <div id={descriptionId} className='col-span-2 flex flex-col w-full gap-2 pb-3 overflow-y-scroll'>\n <div className='grow'>\n <p className={mx(descriptionText, 'line-clamp-3 min-w-0 pie-4')}>{description}</p>\n </div>\n\n <div className='flex gap-2 items-center'>\n <Link\n aria-describedby={descriptionId}\n classNames='text-sm text-description cursor-pointer'\n onClick={handleClick}\n >\n {t('details label')}\n </Link>\n\n {homePage && (\n <Link\n href={homePage}\n target='_blank'\n rel='noreferrer'\n aria-describedby={descriptionId}\n classNames='text-sm text-description'\n onClick={(ev) => ev.stopPropagation()}\n >\n {t('home page label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n\n {source && (\n <Link\n href={source}\n target='_blank'\n rel='noreferrer'\n aria-describedby={descriptionId}\n classNames='text-sm text-description'\n onClick={(ev) => ev.stopPropagation()}\n >\n {t('source label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n </div>\n </div>\n )}\n </ListItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useMemo } from 'react';\n\nimport { createIntent, LayoutAction, type Plugin, useIntentDispatcher, usePluginManager } from '@dxos/app-framework';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { PluginList } from './PluginList';\n\nconst sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin, { meta: { name: b = '' } }: Plugin) => a.localeCompare(b);\n\nexport const RegistryContainer = ({ id, plugins: _plugins }: { id: string; plugins: Plugin[] }) => {\n const manager = usePluginManager();\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const plugins = useMemo(() => _plugins.sort(sortByPluginMeta), [_plugins]);\n\n // TODO(wittjosiah): Factor out to an intent?\n const handleChange = async (id: string, enabled: boolean) => {\n if (enabled) {\n await manager.enable(id);\n } else {\n await manager.disable(id);\n }\n\n await dispatch(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'plugins.toggle',\n properties: { plugin: id, enabled },\n }),\n );\n };\n\n const handleClick = (pluginId: string) =>\n dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n // TODO(wittjosiah): `/` currently is not supported in ids.\n subject: [pluginId.replaceAll('/', ':')],\n options: { pivotId: id, positioning: 'end' },\n }),\n );\n\n return (\n <StackItem.Content toolbar={false} role='article' classNames='overflow-x-hidden overflow-y-auto'>\n <PluginList plugins={plugins} enabled={manager.enabled} onClick={handleClick} onChange={handleChange} />\n </StackItem.Content>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,OAAOA,UAASC,eAAAA,cAAaC,WAAAA,gBAAe;AAE5C,SAASC,cAAcC,aAAaC,eAAeC,QAAQC,oBAAAA,yBAAwB;AACnF,SAASC,aAAAA,kBAAiB;;;ACH1B,OAAOC,WAAW;AAGlB,SAASC,MAAMC,OAAOC,MAAMC,sBAAsB;AAClD,SAASC,+BAA+B;AAUjC,IAAMC,eAAe,CAAC,EAAEC,QAAQC,SAASC,SAAQ,MAAqB;AAC3E,QAAM,EAAEC,EAAC,IAAKC,eAAeC,eAAAA;AAC7B,QAAM,EAAEC,IAAIC,MAAMC,aAAaC,UAAUC,QAAQC,YAAW,IAAKX,OAAOY;AAExE,SACE,sBAAA,cAACC,yBAAAA;IAAwBC,YAAW;KAClC,sBAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,sBAAA,cAACC,KAAAA,MAAGZ,EAAAA,GACJ,sBAAA,cAACa,MAAMC,MAAI,MACT,sBAAA,cAACD,MAAME,QAAM;IAACP,YAAW;IAAcQ,SAASrB;IAASsB,SAASrB;QAIrES,eACC,sBAAA,cAACI,OAAAA;IAAIC,MAAK;KACR,sBAAA,cAACQ,MAAAA;IAAGP,WAAU;KAAe,SAAA,GAC7B,sBAAA,cAACQ,OAAAA;IAAIC,KAAKf,YAAY,CAAA;IAA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,mBAAmBe;IACvEb,WAAW,CAAC,EAAEH,MAAM,EAAEC,QAAO,EAAE,MAAE;AAC/B,YAAMG,UAAUC,kBAAAA;AAChB,YAAMS,UAAUV,QAAQU,QAAQH,SAASV,QAAQQ,KAAKb,EAAE;AACxD,YAAMqB,eAAeC,aACnB,MAAOJ,UAAUV,QAAQe,QAAQlB,QAAQQ,KAAKb,EAAE,IAAIQ,QAAQgB,OAAOnB,QAAQQ,KAAKb,EAAE,GAClF;QAACQ;QAASH,QAAQQ,KAAKb;QAAIkB;OAAQ;AAGrC,aACE,gBAAAF,OAAA,cAACS,WAAUC,SAAO;QAACxB,MAAK;QAAUyB,SAAS;SACzC,gBAAAX,OAAA,cAACY,cAAAA;QAAaC,QAAQxB;QAASa;QAAkBY,UAAUT;;IAGjE;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "useCallback", "useMemo", "Capabilities", "contributes", "createSurface", "Plugin", "usePluginManager", "StackItem", "React", "Icon", "Input", "Link", "useTranslation", "DeprecatedFormContainer", "PluginDetail", "plugin", "enabled", "onEnable", "t", "useTranslation", "REGISTRY_PLUGIN", "id", "name", "description", "homePage", "source", "screenshots", "meta", "DeprecatedFormContainer", "classNames", "div", "role", "className", "p", "Input", "Root", "Switch", "checked", "onClick", "h1", "img", "src", "alt", "Link", "href", "target", "rel", "Icon", "icon", "size", "React", "List", "React", "useCallback", "Icon", "Input", "Link", "ListItem", "useTranslation", "descriptionText", "mx", "PluginItem", "plugin", "enabled", "onClick", "onChange", "t", "useTranslation", "REGISTRY_PLUGIN", "id", "name", "description", "homePage", "source", "icon", "meta", "isEnabled", "includes", "inputId", "labelId", "descriptionId", "handleClick", "useCallback", "handleChange", "event", "stopPropagation", "React", "ListItem", "Root", "key", "data-testid", "aria-describedby", "classNames", "div", "className", "Icon", "size", "Input", "Switch", "checked", "p", "mx", "descriptionText", "Link", "href", "target", "rel", "ev", "PluginList", "plugins", "props", "React", "List", "classNames", "map", "plugin", "div", "key", "meta", "id", "className", "PluginItem", "React", "useMemo", "createIntent", "LayoutAction", "useIntentDispatcher", "usePluginManager", "ObservabilityAction", "StackItem", "sortByPluginMeta", "meta", "name", "a", "b", "localeCompare", "RegistryContainer", "id", "plugins", "_plugins", "manager", "usePluginManager", "dispatchPromise", "dispatch", "useIntentDispatcher", "useMemo", "sort", "handleChange", "enabled", "enable", "disable", "createIntent", "ObservabilityAction", "SendEvent", "properties", "plugin", "handleClick", "pluginId", "LayoutAction", "Open", "part", "subject", "replaceAll", "options", "pivotId", "positioning", "React", "StackItem", "Content", "toolbar", "role", "classNames", "PluginList", "onClick", "onChange", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "REGISTRY_PLUGIN", "role", "filter", "data", "subject", "REGISTRY_KEY", "component", "manager", "usePluginManager", "filtered", "useMemo", "plugins", "meta", "core", "includes", "React", "RegistryContainer", "enabled", "tags", "Plugin", "handleEnable", "useCallback", "disable", "enable", "StackItem", "Content", "toolbar", "PluginDetail", "plugin", "onEnable"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegistryPlugin.d.ts","sourceRoot":"","sources":["../../../src/RegistryPlugin.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"RegistryPlugin.d.ts","sourceRoot":"","sources":["../../../src/RegistryPlugin.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,4CAsBvB,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { type PluginsContext } from '@dxos/app-framework';
|
|
2
|
+
import { type Node } from '@dxos/plugin-graph';
|
|
3
|
+
declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<Readonly<{
|
|
4
|
+
id: string;
|
|
5
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
6
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
7
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
8
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
9
|
+
type?: string;
|
|
10
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
id: string;
|
|
13
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
14
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
15
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
16
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
17
|
+
type?: string;
|
|
18
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
19
|
+
}>[] | (Readonly<{
|
|
20
|
+
id: string;
|
|
21
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
22
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
23
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
24
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
25
|
+
type?: string;
|
|
26
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
id: string;
|
|
29
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
30
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
31
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
32
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
33
|
+
type?: string;
|
|
34
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
35
|
+
}>[] | (Readonly<{
|
|
36
|
+
id: string;
|
|
37
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
38
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
39
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
40
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
41
|
+
type?: string;
|
|
42
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
id: string;
|
|
45
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
46
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
47
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
48
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
49
|
+
type?: string;
|
|
50
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
51
|
+
}>[] | (Readonly<{
|
|
52
|
+
id: string;
|
|
53
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
54
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
55
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
56
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
57
|
+
type?: string;
|
|
58
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
59
|
+
}> | Readonly<{
|
|
60
|
+
id: string;
|
|
61
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
62
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
63
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
64
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
65
|
+
type?: string;
|
|
66
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
67
|
+
}>[] | (Readonly<{
|
|
68
|
+
id: string;
|
|
69
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
70
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
71
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
72
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
73
|
+
type?: string;
|
|
74
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
75
|
+
}> | Readonly<{
|
|
76
|
+
id: string;
|
|
77
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
78
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
79
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
80
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
81
|
+
type?: string;
|
|
82
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
83
|
+
}>[] | (Readonly<{
|
|
84
|
+
id: string;
|
|
85
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
86
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
87
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
88
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
89
|
+
type?: string;
|
|
90
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
91
|
+
}> | Readonly<{
|
|
92
|
+
id: string;
|
|
93
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
94
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
95
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
96
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
97
|
+
type?: string;
|
|
98
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
99
|
+
}>[] | (Readonly<{
|
|
100
|
+
id: string;
|
|
101
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
102
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
103
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
104
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
105
|
+
type?: string;
|
|
106
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
107
|
+
}> | Readonly<{
|
|
108
|
+
id: string;
|
|
109
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
110
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
111
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
112
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
113
|
+
type?: string;
|
|
114
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
115
|
+
}>[] | (Readonly<{
|
|
116
|
+
id: string;
|
|
117
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
118
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
119
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
120
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
121
|
+
type?: string;
|
|
122
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
123
|
+
}> | Readonly<{
|
|
124
|
+
id: string;
|
|
125
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
126
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
127
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
128
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
129
|
+
type?: string;
|
|
130
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
131
|
+
}>[] | (Readonly<{
|
|
132
|
+
id: string;
|
|
133
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
134
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
135
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
136
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
137
|
+
type?: string;
|
|
138
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
139
|
+
}> | Readonly<{
|
|
140
|
+
id: string;
|
|
141
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
142
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
143
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
144
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
145
|
+
type?: string;
|
|
146
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
147
|
+
}>[] | (Readonly<{
|
|
148
|
+
id: string;
|
|
149
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
150
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
151
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
152
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
153
|
+
type?: string;
|
|
154
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
155
|
+
}> | Readonly<{
|
|
156
|
+
id: string;
|
|
157
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
158
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
159
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
160
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
161
|
+
type?: string;
|
|
162
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
163
|
+
}>[] | (any[] | Readonly<{
|
|
164
|
+
id: string;
|
|
165
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
166
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
167
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
168
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
169
|
+
type?: string;
|
|
170
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
171
|
+
}> | Readonly<{
|
|
172
|
+
id: string;
|
|
173
|
+
position: import("packages/common/util/dist/types/src").Position;
|
|
174
|
+
resolver?: import("@dxos/plugin-graph").ResolverExtension;
|
|
175
|
+
connector?: import("@dxos/plugin-graph").ConnectorExtension;
|
|
176
|
+
relation?: import("@dxos/plugin-graph").Relation;
|
|
177
|
+
type?: string;
|
|
178
|
+
filter?: (node: import("packages/sdk/app-graph/dist/types/src").Node) => boolean;
|
|
179
|
+
}>[])[])[])[])[])[])[])[])[])[])[]>;
|
|
180
|
+
export default _default;
|
|
181
|
+
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2D,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnH,OAAO,EAAmB,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;kCAIvC,cAAc;;qBAmF5B,qCAAqC;sBAC9B,oBAEjB;uBACS,oBAAQ;sBAEN,oBAAe;;2BACD,uCAAiB;;;qBAMnC,qCACe;sBACD,oBACd;uBAAgD,oBAAiB;sBAC/B,oBAAiB;;2BAEjD,uCACV;;;qBAKW,qCAEX;sBAAuC,oBACvC;uBAAgD,oBAC5C;sBAKC,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAwF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;;qBAAqF,qCAAqC;sBAAsC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,uCAAiB;;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