@dxos/plugin-registry 0.8.4-main.c1de068 → 0.8.4-main.c85a9c8dae
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/PluginArticle-MLBF7AFA.mjs +29 -0
- package/dist/lib/browser/PluginArticle-MLBF7AFA.mjs.map +7 -0
- package/dist/lib/browser/PluginRegistry-ENAI4SAY.mjs +77 -0
- package/dist/lib/browser/PluginRegistry-ENAI4SAY.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-2HXD7SOS.mjs +167 -0
- package/dist/lib/browser/app-graph-builder-2HXD7SOS.mjs.map +7 -0
- package/dist/lib/browser/chunk-TSNK3SAR.mjs +191 -0
- package/dist/lib/browser/chunk-TSNK3SAR.mjs.map +7 -0
- package/dist/lib/browser/chunk-VOAOTNGS.mjs +19 -0
- package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +224 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +23 -31
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs +25 -0
- package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs.map +7 -0
- package/dist/lib/browser/react-surface-DH25DIRH.mjs +85 -0
- package/dist/lib/browser/react-surface-DH25DIRH.mjs.map +7 -0
- package/dist/lib/node-esm/PluginArticle-TP2G6GGI.mjs +30 -0
- package/dist/lib/node-esm/PluginArticle-TP2G6GGI.mjs.map +7 -0
- package/dist/lib/node-esm/PluginRegistry-CWIZIQNX.mjs +78 -0
- package/dist/lib/node-esm/PluginRegistry-CWIZIQNX.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-2LNPN72O.mjs +168 -0
- package/dist/lib/node-esm/app-graph-builder-2LNPN72O.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4XO63XB6.mjs +192 -0
- package/dist/lib/node-esm/chunk-4XO63XB6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +21 -0
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +225 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +64 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs +26 -0
- package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-3YBEVL65.mjs +86 -0
- package/dist/lib/node-esm/react-surface-3YBEVL65.mjs.map +7 -0
- package/dist/types/src/RegistryPlugin.d.ts +2 -1
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/cli/commands/disable.d.ts +11 -0
- package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/enable.d.ts +11 -0
- package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +3 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/list.d.ts +7 -0
- package/dist/types/src/cli/commands/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/util.d.ts +11 -0
- package/dist/types/src/cli/commands/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +3 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/storage.d.ts +18 -0
- package/dist/types/src/cli/storage.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +9 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +33 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
- package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
- package/dist/types/src/components/{PluginItem.d.ts → PluginList/PluginItem.d.ts} +2 -2
- package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
- package/dist/types/src/components/{PluginList.d.ts → PluginList/PluginList.d.ts} +1 -1
- package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts +34 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/index.d.ts +2 -0
- package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PluginArticle/index.d.ts +3 -0
- package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts +8 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts +3 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +3 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +50 -34
- package/src/RegistryPlugin.tsx +10 -25
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +137 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +3 -5
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +24 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +88 -0
- package/src/cli/commands/disable.ts +47 -0
- package/src/cli/commands/enable.ts +44 -0
- package/src/cli/commands/index.ts +14 -0
- package/src/cli/commands/list.ts +41 -0
- package/src/cli/commands/util.ts +24 -0
- package/src/cli/index.ts +6 -0
- package/src/cli/plugin.ts +17 -0
- package/src/cli/storage.ts +57 -0
- package/src/components/PluginDetail/PluginDetail.stories.tsx +44 -0
- package/src/components/PluginDetail/PluginDetail.tsx +81 -0
- package/src/components/PluginDetail/index.ts +5 -0
- package/src/components/PluginList/PluginItem.tsx +124 -0
- package/src/components/PluginList/PluginList.stories.tsx +84 -0
- package/src/components/{PluginList.tsx → PluginList/PluginList.tsx} +3 -5
- package/src/components/PluginList/index.ts +5 -0
- package/src/components/index.ts +0 -1
- package/src/containers/PluginArticle/PluginArticle.tsx +28 -0
- package/src/containers/PluginArticle/index.ts +7 -0
- package/src/containers/PluginRegistry/PluginRegistry.tsx +86 -0
- package/src/containers/PluginRegistry/index.ts +7 -0
- package/src/containers/index.ts +8 -0
- package/src/meta.ts +8 -5
- package/src/types.ts +5 -1
- package/dist/lib/browser/app-graph-builder-LKQBQDUA.mjs +0 -161
- package/dist/lib/browser/app-graph-builder-LKQBQDUA.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEBASNOI.mjs +0 -16
- package/dist/lib/browser/chunk-AEBASNOI.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-W67CIJI3.mjs +0 -23
- package/dist/lib/browser/intent-resolver-W67CIJI3.mjs.map +0 -7
- package/dist/lib/browser/react-surface-3GNB7AOY.mjs +0 -333
- package/dist/lib/browser/react-surface-3GNB7AOY.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/Icon.stories.d.ts +0 -6
- package/dist/types/src/components/Icon.stories.d.ts.map +0 -1
- package/dist/types/src/components/PluginDetail.d.ts +0 -9
- package/dist/types/src/components/PluginDetail.d.ts.map +0 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts +0 -8
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
- package/dist/types/src/components/PluginItem.d.ts.map +0 -1
- package/dist/types/src/components/PluginList.d.ts.map +0 -1
- package/dist/types/src/components/PluginList.stories.d.ts +0 -11
- package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
- package/dist/types/src/components/RegistryContainer.d.ts +0 -7
- package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -155
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/capabilities/react-surface.tsx +0 -90
- package/src/components/Icon.stories.tsx +0 -108
- package/src/components/PluginDetail.stories.tsx +0 -45
- package/src/components/PluginDetail.tsx +0 -63
- package/src/components/PluginItem.tsx +0 -119
- package/src/components/PluginList.stories.tsx +0 -82
- package/src/components/RegistryContainer.tsx +0 -84
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
REGISTRY_ID,
|
|
3
|
-
REGISTRY_KEY,
|
|
4
|
-
REGISTRY_PLUGIN
|
|
5
|
-
} from "./chunk-AEBASNOI.mjs";
|
|
6
|
-
|
|
7
|
-
// 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-LKQBQDUA.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,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAO,SAASQ,OAAOE,KAAKP,KAAAA,IAAQK,OAAOG,KAAI,CAAA,GAC9EH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,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
|
-
// 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-AEBASNOI.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-AEBASNOI.mjs";
|
|
4
|
-
|
|
5
|
-
// 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-W67CIJI3.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
|
-
}
|
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
REGISTRY_KEY,
|
|
3
|
-
REGISTRY_PLUGIN
|
|
4
|
-
} from "./chunk-AEBASNOI.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/react-surface.tsx
|
|
7
|
-
import React5, { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
8
|
-
import { Capabilities as Capabilities2, contributes, createSurface, Plugin, usePluginManager as usePluginManager2 } from "@dxos/app-framework";
|
|
9
|
-
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
10
|
-
|
|
11
|
-
// src/components/PluginDetail.tsx
|
|
12
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
13
|
-
import React from "react";
|
|
14
|
-
import { Icon, Input, Link, useTranslation } from "@dxos/react-ui";
|
|
15
|
-
import { DeprecatedFormContainer } from "@dxos/react-ui-form";
|
|
16
|
-
var PluginDetail = ({ plugin, enabled, onEnable }) => {
|
|
17
|
-
var _effect = _useSignals();
|
|
18
|
-
try {
|
|
19
|
-
const { t } = useTranslation(REGISTRY_PLUGIN);
|
|
20
|
-
const { id, name, description, homePage, source, screenshots } = plugin.meta;
|
|
21
|
-
return /* @__PURE__ */ React.createElement(DeprecatedFormContainer, {
|
|
22
|
-
classNames: "gap-6"
|
|
23
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
24
|
-
role: "none",
|
|
25
|
-
className: "flex justify-between items-center"
|
|
26
|
-
}, /* @__PURE__ */ React.createElement("p", null, id), /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
27
|
-
classNames: "self-center",
|
|
28
|
-
checked: enabled,
|
|
29
|
-
onClick: onEnable
|
|
30
|
-
}))), screenshots && screenshots.length > 0 && /* @__PURE__ */ React.createElement("div", {
|
|
31
|
-
role: "none"
|
|
32
|
-
}, /* @__PURE__ */ React.createElement("h1", {
|
|
33
|
-
className: "text-lg mb-2"
|
|
34
|
-
}, "Preview"), /* @__PURE__ */ React.createElement("img", {
|
|
35
|
-
src: screenshots[0],
|
|
36
|
-
alt: name,
|
|
37
|
-
className: "aspect-video object-fit"
|
|
38
|
-
})), /* @__PURE__ */ React.createElement("div", {
|
|
39
|
-
role: "none"
|
|
40
|
-
}, /* @__PURE__ */ React.createElement("p", null, description)), /* @__PURE__ */ React.createElement("div", {
|
|
41
|
-
role: "none"
|
|
42
|
-
}, /* @__PURE__ */ React.createElement("h1", {
|
|
43
|
-
className: "text-lg mb-2"
|
|
44
|
-
}, "Resources"), /* @__PURE__ */ React.createElement("div", {
|
|
45
|
-
className: "flex gap-2"
|
|
46
|
-
}, homePage && /* @__PURE__ */ React.createElement(Link, {
|
|
47
|
-
href: homePage,
|
|
48
|
-
target: "_blank",
|
|
49
|
-
rel: "noreferrer",
|
|
50
|
-
classNames: "text-sm text-description"
|
|
51
|
-
}, t("home page label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
52
|
-
icon: "ph--arrow-square-out--bold",
|
|
53
|
-
size: 3,
|
|
54
|
-
classNames: "inline-block leading-none mli-1"
|
|
55
|
-
})), source && /* @__PURE__ */ React.createElement(Link, {
|
|
56
|
-
href: source,
|
|
57
|
-
target: "_blank",
|
|
58
|
-
rel: "noreferrer",
|
|
59
|
-
classNames: "text-sm text-description"
|
|
60
|
-
}, t("source label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
61
|
-
icon: "ph--arrow-square-out--bold",
|
|
62
|
-
size: 3,
|
|
63
|
-
classNames: "inline-block leading-none mli-1"
|
|
64
|
-
})))));
|
|
65
|
-
} finally {
|
|
66
|
-
_effect.f();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
// src/components/PluginList.tsx
|
|
71
|
-
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
72
|
-
import React3 from "react";
|
|
73
|
-
import { List } from "@dxos/react-ui";
|
|
74
|
-
|
|
75
|
-
// src/components/PluginItem.tsx
|
|
76
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
77
|
-
import React2, { useCallback } from "react";
|
|
78
|
-
import { Icon as Icon2, IconButton, Input as Input2, Link as Link2, ListItem, Tag, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
79
|
-
import { descriptionText, mx } from "@dxos/react-ui-theme";
|
|
80
|
-
var PluginItem = ({ plugin, enabled = [], onClick, onChange, hasSettings: _hasSettings, onSettings }) => {
|
|
81
|
-
var _effect = _useSignals2();
|
|
82
|
-
try {
|
|
83
|
-
const { t } = useTranslation2(REGISTRY_PLUGIN);
|
|
84
|
-
const { id, name, description, tags, icon = "ph--circle--regular" } = plugin.meta;
|
|
85
|
-
const isEnabled = enabled.includes(id);
|
|
86
|
-
const inputId = `${id}-input`;
|
|
87
|
-
const labelId = `${id}-label`;
|
|
88
|
-
const descriptionId = `${id}-description`;
|
|
89
|
-
const handleClick = useCallback(() => onClick?.(id), [
|
|
90
|
-
id,
|
|
91
|
-
onClick
|
|
92
|
-
]);
|
|
93
|
-
const handleChange = useCallback((event) => {
|
|
94
|
-
event.stopPropagation();
|
|
95
|
-
onChange?.(id, !isEnabled);
|
|
96
|
-
}, [
|
|
97
|
-
id,
|
|
98
|
-
isEnabled,
|
|
99
|
-
onChange
|
|
100
|
-
]);
|
|
101
|
-
const hasSettings = _hasSettings?.(id) ?? false;
|
|
102
|
-
const handleSettings = useCallback(() => onSettings?.(id), [
|
|
103
|
-
id,
|
|
104
|
-
onSettings
|
|
105
|
-
]);
|
|
106
|
-
return /* @__PURE__ */ React2.createElement(ListItem.Root, {
|
|
107
|
-
key: id,
|
|
108
|
-
labelId,
|
|
109
|
-
"data-testid": `pluginList.${id}`,
|
|
110
|
-
"aria-describedby": descriptionId,
|
|
111
|
-
// TODO(burdon): Use Rail vars.
|
|
112
|
-
classNames: "is-full bs-full grid grid-cols-[48px_1fr_48px] grid-rows-[40px_1fr_32px] p-1 border border-separator rounded-md"
|
|
113
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
114
|
-
className: "flex flex-col grow justify-center items-center"
|
|
115
|
-
}, /* @__PURE__ */ React2.createElement(Icon2, {
|
|
116
|
-
icon,
|
|
117
|
-
size: 6,
|
|
118
|
-
onClick: handleClick,
|
|
119
|
-
classNames: "text-subdued cursor-pointer"
|
|
120
|
-
})), /* @__PURE__ */ React2.createElement("div", {
|
|
121
|
-
className: "flex items-center overflow-hidden cursor-pointer",
|
|
122
|
-
onClick: handleClick
|
|
123
|
-
}, /* @__PURE__ */ React2.createElement("span", {
|
|
124
|
-
className: "truncate"
|
|
125
|
-
}, name ?? id)), /* @__PURE__ */ React2.createElement("div", {
|
|
126
|
-
className: "flex justify-center items-center"
|
|
127
|
-
}, /* @__PURE__ */ React2.createElement(Input2.Root, {
|
|
128
|
-
id: inputId
|
|
129
|
-
}, /* @__PURE__ */ React2.createElement(Input2.Switch, {
|
|
130
|
-
classNames: "self-center",
|
|
131
|
-
checked: isEnabled,
|
|
132
|
-
onClick: handleChange
|
|
133
|
-
}))), /* @__PURE__ */ React2.createElement("div", null), (description || tags) && /* @__PURE__ */ React2.createElement("div", {
|
|
134
|
-
id: descriptionId,
|
|
135
|
-
className: "col-span-2 flex flex-col w-full justify-between gap-2 pb-2"
|
|
136
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
137
|
-
className: "grow"
|
|
138
|
-
}, /* @__PURE__ */ React2.createElement("p", {
|
|
139
|
-
className: mx(descriptionText, "line-clamp-3 min-w-0 pie-2")
|
|
140
|
-
}, description)), tags && tags.length > 0 && /* @__PURE__ */ React2.createElement("div", null, tags.map((tag) => /* @__PURE__ */ React2.createElement(Tag, {
|
|
141
|
-
key: tag,
|
|
142
|
-
palette: "indigo",
|
|
143
|
-
classNames: "text-xs capitalize"
|
|
144
|
-
}, tag)))), /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", {
|
|
145
|
-
className: "flex gap-2 items-center pie-1"
|
|
146
|
-
}, /* @__PURE__ */ React2.createElement(Link2, {
|
|
147
|
-
"aria-describedby": descriptionId,
|
|
148
|
-
classNames: "text-sm text-description cursor-pointer",
|
|
149
|
-
onClick: handleClick
|
|
150
|
-
}, t("details label")), /* @__PURE__ */ React2.createElement("div", {
|
|
151
|
-
className: "flex-1"
|
|
152
|
-
})), /* @__PURE__ */ React2.createElement("div", {
|
|
153
|
-
className: "flex justify-center items-center"
|
|
154
|
-
}, hasSettings && /* @__PURE__ */ React2.createElement(IconButton, {
|
|
155
|
-
"aria-describedby": descriptionId,
|
|
156
|
-
classNames: "text-sm text-description cursor-pointer",
|
|
157
|
-
icon: "ph--gear--regular",
|
|
158
|
-
label: t("settings label"),
|
|
159
|
-
iconOnly: true,
|
|
160
|
-
size: 4,
|
|
161
|
-
onClick: handleSettings
|
|
162
|
-
})));
|
|
163
|
-
} finally {
|
|
164
|
-
_effect.f();
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
// src/components/PluginList.tsx
|
|
169
|
-
var PluginList = ({ plugins = [], ...props }) => {
|
|
170
|
-
var _effect = _useSignals3();
|
|
171
|
-
try {
|
|
172
|
-
return /* @__PURE__ */ React3.createElement(List, {
|
|
173
|
-
classNames: "grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] auto-rows-[12rem] gap-3 p-3"
|
|
174
|
-
}, plugins.map((plugin) => /* @__PURE__ */ React3.createElement("div", {
|
|
175
|
-
key: plugin.meta.id,
|
|
176
|
-
className: "flex"
|
|
177
|
-
}, /* @__PURE__ */ React3.createElement(PluginItem, {
|
|
178
|
-
plugin,
|
|
179
|
-
...props
|
|
180
|
-
}))));
|
|
181
|
-
} finally {
|
|
182
|
-
_effect.f();
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
// src/components/RegistryContainer.tsx
|
|
187
|
-
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
188
|
-
import React4, { useCallback as useCallback2, useMemo } from "react";
|
|
189
|
-
import { Capabilities, createIntent, LayoutAction, SettingsAction, useCapability, useIntentDispatcher, usePluginManager } from "@dxos/app-framework";
|
|
190
|
-
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
191
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
192
|
-
var sortByPluginMeta = ({ meta: { name: a = "" } }, { meta: { name: b = "" } }) => a.localeCompare(b);
|
|
193
|
-
var RegistryContainer = ({ id, plugins: _plugins }) => {
|
|
194
|
-
var _effect = _useSignals4();
|
|
195
|
-
try {
|
|
196
|
-
const manager = usePluginManager();
|
|
197
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
198
|
-
const plugins = useMemo(() => _plugins.sort(sortByPluginMeta), [
|
|
199
|
-
_plugins
|
|
200
|
-
]);
|
|
201
|
-
const settingsStore = useCapability(Capabilities.SettingsStore);
|
|
202
|
-
const handleChange = useCallback2(async (id2, enabled) => {
|
|
203
|
-
if (enabled) {
|
|
204
|
-
await manager.enable(id2);
|
|
205
|
-
} else {
|
|
206
|
-
await manager.disable(id2);
|
|
207
|
-
}
|
|
208
|
-
await dispatch(createIntent(ObservabilityAction.SendEvent, {
|
|
209
|
-
name: "plugins.toggle",
|
|
210
|
-
properties: {
|
|
211
|
-
plugin: id2,
|
|
212
|
-
enabled
|
|
213
|
-
}
|
|
214
|
-
}));
|
|
215
|
-
}, [
|
|
216
|
-
dispatch,
|
|
217
|
-
manager
|
|
218
|
-
]);
|
|
219
|
-
const handleClick = useCallback2((pluginId) => dispatch(createIntent(LayoutAction.Open, {
|
|
220
|
-
part: "main",
|
|
221
|
-
// TODO(wittjosiah): `/` currently is not supported in ids.
|
|
222
|
-
subject: [
|
|
223
|
-
pluginId.replaceAll("/", ":")
|
|
224
|
-
],
|
|
225
|
-
options: {
|
|
226
|
-
pivotId: id,
|
|
227
|
-
positioning: "end"
|
|
228
|
-
}
|
|
229
|
-
})), [
|
|
230
|
-
dispatch,
|
|
231
|
-
id
|
|
232
|
-
]);
|
|
233
|
-
const hasSettings = useCallback2((pluginId) => !!settingsStore.getStore(pluginId), [
|
|
234
|
-
settingsStore
|
|
235
|
-
]);
|
|
236
|
-
const handleSettings = useCallback2((pluginId) => dispatch(createIntent(SettingsAction.Open, {
|
|
237
|
-
plugin: pluginId
|
|
238
|
-
})), [
|
|
239
|
-
dispatch
|
|
240
|
-
]);
|
|
241
|
-
return /* @__PURE__ */ React4.createElement(StackItem.Content, {
|
|
242
|
-
classNames: "min-bs-0 overflow-y-auto scrollbar-thin contain-layout"
|
|
243
|
-
}, /* @__PURE__ */ React4.createElement(PluginList, {
|
|
244
|
-
plugins,
|
|
245
|
-
enabled: manager.enabled,
|
|
246
|
-
onClick: handleClick,
|
|
247
|
-
onChange: handleChange,
|
|
248
|
-
hasSettings,
|
|
249
|
-
onSettings: handleSettings
|
|
250
|
-
}));
|
|
251
|
-
} finally {
|
|
252
|
-
_effect.f();
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
// src/capabilities/react-surface.tsx
|
|
257
|
-
var react_surface_default = () => contributes(Capabilities2.ReactSurface, [
|
|
258
|
-
createSurface({
|
|
259
|
-
id: `${REGISTRY_PLUGIN}/all`,
|
|
260
|
-
role: "article",
|
|
261
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+all`,
|
|
262
|
-
component: () => {
|
|
263
|
-
const manager = usePluginManager2();
|
|
264
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)), []);
|
|
265
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
266
|
-
id: `${REGISTRY_KEY}+all`,
|
|
267
|
-
plugins: filtered
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
}),
|
|
271
|
-
createSurface({
|
|
272
|
-
id: `${REGISTRY_PLUGIN}/installed`,
|
|
273
|
-
role: "article",
|
|
274
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+installed`,
|
|
275
|
-
component: () => {
|
|
276
|
-
const manager = usePluginManager2();
|
|
277
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)).filter(({ meta }) => manager.enabled.includes(meta.id)), []);
|
|
278
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
279
|
-
id: `${REGISTRY_KEY}+installed`,
|
|
280
|
-
plugins: filtered
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
}),
|
|
284
|
-
createSurface({
|
|
285
|
-
id: `${REGISTRY_PLUGIN}/recommended`,
|
|
286
|
-
role: "article",
|
|
287
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+recommended`,
|
|
288
|
-
component: () => {
|
|
289
|
-
const manager = usePluginManager2();
|
|
290
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)).filter(({ meta }) => !meta.tags?.includes("labs")), []);
|
|
291
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
292
|
-
id: `${REGISTRY_KEY}+recommended`,
|
|
293
|
-
plugins: filtered
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
}),
|
|
297
|
-
createSurface({
|
|
298
|
-
id: `${REGISTRY_PLUGIN}/labs`,
|
|
299
|
-
role: "article",
|
|
300
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+labs`,
|
|
301
|
-
component: () => {
|
|
302
|
-
const manager = usePluginManager2();
|
|
303
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta }) => meta.tags?.includes("labs")), []);
|
|
304
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
305
|
-
id: `${REGISTRY_KEY}+labs`,
|
|
306
|
-
plugins: filtered
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}),
|
|
310
|
-
createSurface({
|
|
311
|
-
id: `${REGISTRY_PLUGIN}/plugin-details`,
|
|
312
|
-
role: "article",
|
|
313
|
-
filter: (data) => data.subject instanceof Plugin,
|
|
314
|
-
component: ({ data: { subject } }) => {
|
|
315
|
-
const manager = usePluginManager2();
|
|
316
|
-
const enabled = manager.enabled.includes(subject.meta.id);
|
|
317
|
-
const handleEnable = useCallback3(() => enabled ? manager.disable(subject.meta.id) : manager.enable(subject.meta.id), [
|
|
318
|
-
manager,
|
|
319
|
-
subject.meta.id,
|
|
320
|
-
enabled
|
|
321
|
-
]);
|
|
322
|
-
return /* @__PURE__ */ React5.createElement(StackItem2.Content, null, /* @__PURE__ */ React5.createElement(PluginDetail, {
|
|
323
|
-
plugin: subject,
|
|
324
|
-
enabled,
|
|
325
|
-
onEnable: handleEnable
|
|
326
|
-
}));
|
|
327
|
-
}
|
|
328
|
-
})
|
|
329
|
-
]);
|
|
330
|
-
export {
|
|
331
|
-
react_surface_default as default
|
|
332
|
-
};
|
|
333
|
-
//# sourceMappingURL=react-surface-3GNB7AOY.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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('labs')),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+recommended`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/labs`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+labs`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(() => manager.plugins.filter(({ meta }) => meta.tags?.includes('labs')), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}+labs`} 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>\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 && screenshots.length > 0 && (\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-[12rem] gap-3 p-3'>\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, { type MouseEvent, useCallback } from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { Icon, IconButton, Input, Link, ListItem, Tag, 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 hasSettings?: (id: string) => boolean;\n onSettings?: (id: string) => void;\n};\n\nexport const PluginItem = ({\n plugin,\n enabled = [],\n onClick,\n onChange,\n hasSettings: _hasSettings,\n onSettings,\n}: PluginItemProps) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n const { id, name, description, tags, 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\n const handleChange = useCallback(\n (event: MouseEvent) => {\n event.stopPropagation();\n onChange?.(id, !isEnabled);\n },\n [id, isEnabled, onChange],\n );\n\n const hasSettings = _hasSettings?.(id) ?? false;\n const handleSettings = useCallback(() => onSettings?.(id), [id, onSettings]);\n\n return (\n <ListItem.Root\n key={id}\n labelId={labelId}\n data-testid={`pluginList.${id}`}\n aria-describedby={descriptionId}\n // TODO(burdon): Use Rail vars.\n classNames='is-full bs-full grid grid-cols-[48px_1fr_48px] grid-rows-[40px_1fr_32px] p-1 border border-separator rounded-md'\n >\n {/* Header. */}\n <div className='flex flex-col grow justify-center items-center'>\n <Icon icon={icon} size={6} onClick={handleClick} classNames='text-subdued cursor-pointer' />\n </div>\n <div className='flex items-center overflow-hidden cursor-pointer' onClick={handleClick}>\n <span className='truncate'>{name ?? id}</span>\n </div>\n <div className='flex 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 {/* Body. */}\n <div />\n {(description || tags) && (\n <div id={descriptionId} className='col-span-2 flex flex-col w-full justify-between gap-2 pb-2'>\n <div className='grow'>\n <p className={mx(descriptionText, 'line-clamp-3 min-w-0 pie-2')}>{description}</p>\n </div>\n {tags && tags.length > 0 && (\n <div>\n {tags.map((tag) => (\n <Tag key={tag} palette={'indigo'} classNames='text-xs capitalize'>\n {tag}\n </Tag>\n ))}\n </div>\n )}\n </div>\n )}\n\n {/* Footer. */}\n <div />\n <div className='flex gap-2 items-center pie-1'>\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 <div className='flex-1' />\n </div>\n <div className='flex justify-center items-center'>\n {hasSettings && (\n <IconButton\n aria-describedby={descriptionId}\n classNames='text-sm text-description cursor-pointer'\n icon='ph--gear--regular'\n label={t('settings label')}\n iconOnly\n size={4}\n onClick={handleSettings}\n />\n )}\n </div>\n </ListItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n type Plugin,\n SettingsAction,\n useCapability,\n useIntentDispatcher,\n usePluginManager,\n} 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 const settingsStore = useCapability(Capabilities.SettingsStore);\n\n // TODO(wittjosiah): Factor out to an intent?\n const handleChange = useCallback(\n 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: {\n plugin: id,\n enabled,\n },\n }),\n );\n },\n [dispatch, manager],\n );\n\n const handleClick = useCallback(\n (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 [dispatch, id],\n );\n\n const hasSettings = useCallback((pluginId: string) => !!settingsStore.getStore(pluginId), [settingsStore]);\n\n const handleSettings = useCallback(\n (pluginId: string) => dispatch(createIntent(SettingsAction.Open, { plugin: pluginId })),\n [dispatch],\n );\n\n return (\n <StackItem.Content classNames='min-bs-0 overflow-y-auto scrollbar-thin contain-layout'>\n <PluginList\n plugins={plugins}\n enabled={manager.enabled}\n onClick={handleClick}\n onChange={handleChange}\n hasSettings={hasSettings}\n onSettings={handleSettings}\n />\n </StackItem.Content>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,UAASC,eAAAA,cAAaC,WAAAA,gBAAe;AAE5C,SAASC,gBAAAA,eAAcC,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,UAAM,EAAEC,EAAC,IAAKC,eAAeC,eAAAA;AAC7B,UAAM,EAAEC,IAAIC,MAAMC,aAAaC,UAAUC,QAAQC,YAAW,IAAKX,OAAOY;AAExE,WACE,sBAAA,cAACC,yBAAAA;MAAwBC,YAAW;OAClC,sBAAA,cAACC,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,sBAAA,cAACC,KAAAA,MAAGZ,EAAAA,GACJ,sBAAA,cAACa,MAAMC,MAAI,MACT,sBAAA,cAACD,MAAME,QAAM;MAACP,YAAW;MAAcQ,SAASrB;MAASsB,SAASrB;UAIrES,eAAeA,YAAYa,SAAS,KACnC,sBAAA,cAACT,OAAAA;MAAIC,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Item", "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", "length", "h1", "img", "src", "alt", "Link", "href", "target", "rel", "Icon", "icon", "size", "React", "List", "React", "useCallback", "Icon", "IconButton", "Input", "Link", "ListItem", "Tag", "useTranslation", "descriptionText", "mx", "PluginItem", "plugin", "enabled", "onClick", "onChange", "hasSettings", "_hasSettings", "onSettings", "t", "useTranslation", "REGISTRY_PLUGIN", "id", "name", "description", "tags", "icon", "meta", "isEnabled", "includes", "inputId", "labelId", "descriptionId", "handleClick", "useCallback", "handleChange", "event", "stopPropagation", "handleSettings", "React", "ListItem", "Root", "key", "data-testid", "aria-describedby", "classNames", "div", "className", "Icon", "size", "span", "Input", "Switch", "checked", "p", "mx", "descriptionText", "length", "map", "tag", "Tag", "palette", "Link", "IconButton", "label", "iconOnly", "PluginList", "plugins", "props", "React", "List", "classNames", "map", "plugin", "div", "key", "meta", "id", "className", "PluginItem", "React", "useCallback", "useMemo", "Capabilities", "createIntent", "LayoutAction", "SettingsAction", "useCapability", "useIntentDispatcher", "usePluginManager", "ObservabilityAction", "StackItem", "sortByPluginMeta", "meta", "name", "a", "b", "localeCompare", "RegistryContainer", "id", "plugins", "_plugins", "manager", "usePluginManager", "dispatchPromise", "dispatch", "useIntentDispatcher", "useMemo", "sort", "settingsStore", "useCapability", "Capabilities", "SettingsStore", "handleChange", "useCallback", "enabled", "enable", "disable", "createIntent", "ObservabilityAction", "SendEvent", "properties", "plugin", "handleClick", "pluginId", "LayoutAction", "Open", "part", "subject", "replaceAll", "options", "pivotId", "positioning", "hasSettings", "getStore", "handleSettings", "SettingsAction", "React", "StackItem", "Content", "classNames", "PluginList", "onClick", "onChange", "onSettings", "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", "PluginDetail", "plugin", "onEnable"]
|
|
7
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type PluginContext } from '@dxos/app-framework';
|
|
2
|
-
declare const _default: (context: PluginContext) => import("@dxos/app-framework").Capability<import("@dxos/app-graph").BuilderExtensions>;
|
|
3
|
-
export default _default;
|
|
4
|
-
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAOA,OAAO,EAA2D,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;yBAKlG,SAAS,aAAa;AAAtC,wBA8IK"}
|