@dxos/plugin-registry 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33
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/cli/index.mjs +179 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +37 -63
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +35 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +181 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +47 -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/translations.mjs +37 -0
- package/dist/lib/node-esm/translations.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.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +7 -0
- package/dist/types/src/capabilities/state.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 +22 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +42 -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/PluginList/PluginItem.d.ts +26 -0
- package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.d.ts +13 -0
- package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts +41 -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/CommunityRegistry/CommunityRegistry.d.ts +8 -0
- package/dist/types/src/containers/CommunityRegistry/CommunityRegistry.d.ts.map +1 -0
- package/dist/types/src/containers/CommunityRegistry/index.d.ts +2 -0
- package/dist/types/src/containers/CommunityRegistry/index.d.ts.map +1 -0
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -0
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -0
- package/dist/types/src/containers/LoadPluginDialog/index.d.ts +2 -0
- package/dist/types/src/containers/LoadPluginDialog/index.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts +14 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts +2 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +3 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/use-auto-tags.d.ts +20 -0
- package/dist/types/src/hooks/use-auto-tags.d.ts.map +1 -0
- package/dist/types/src/hooks/use-community-plugins.d.ts +16 -0
- package/dist/types/src/hooks/use-community-plugins.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +7 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
- package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +22 -16
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +14 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +71 -37
- package/src/RegistryPlugin.tsx +17 -27
- package/src/capabilities/app-graph-builder.ts +173 -135
- package/src/capabilities/index.ts +9 -4
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +108 -78
- package/src/capabilities/state.ts +40 -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 +50 -0
- package/src/components/PluginDetail/PluginDetail.stories.tsx +44 -0
- package/src/components/PluginDetail/PluginDetail.tsx +106 -0
- package/src/components/PluginDetail/index.ts +5 -0
- package/src/components/PluginList/PluginItem.tsx +187 -0
- package/src/components/PluginList/PluginList.stories.tsx +87 -0
- package/src/components/PluginList/PluginList.tsx +29 -0
- package/src/components/PluginList/index.ts +5 -0
- package/src/components/index.ts +0 -1
- package/src/containers/CommunityRegistry/CommunityRegistry.tsx +181 -0
- package/src/containers/CommunityRegistry/index.ts +5 -0
- package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +86 -0
- package/src/containers/LoadPluginDialog/index.ts +5 -0
- package/src/containers/PluginArticle/PluginArticle.tsx +73 -0
- package/src/containers/PluginArticle/index.ts +5 -0
- package/src/containers/PluginRegistry/PluginRegistry.tsx +98 -0
- package/src/containers/PluginRegistry/index.ts +5 -0
- package/src/containers/index.ts +11 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/use-auto-tags.ts +52 -0
- package/src/hooks/use-community-plugins.ts +35 -0
- package/src/meta.ts +19 -9
- package/src/operations/index.ts +7 -0
- package/src/operations/open-plugin-registry.ts +21 -0
- package/src/translations.ts +22 -15
- package/src/types.ts +30 -1
- package/dist/lib/browser/app-graph-builder-6JQNRTEQ.mjs +0 -161
- package/dist/lib/browser/app-graph-builder-6JQNRTEQ.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-UGDFPMAG.mjs +0 -23
- package/dist/lib/browser/intent-resolver-UGDFPMAG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BQPO3F3E.mjs +0 -333
- package/dist/lib/browser/react-surface-BQPO3F3E.mjs.map +0 -7
- 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/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 +0 -13
- package/dist/types/src/components/PluginItem.d.ts.map +0 -1
- package/dist/types/src/components/PluginList.d.ts +0 -8
- 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/intent-resolver.ts +0 -27
- package/src/components/Icon.stories.tsx +0 -108
- package/src/components/PluginDetail.stories.tsx +0 -46
- package/src/components/PluginDetail.tsx +0 -63
- package/src/components/PluginItem.tsx +0 -119
- package/src/components/PluginList.stories.tsx +0 -83
- package/src/components/PluginList.tsx +0 -26
- package/src/components/RegistryContainer.tsx +0 -84
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/cli/plugin.ts
|
|
4
|
+
import { Plugin as Plugin4 } from "@dxos/app-framework";
|
|
5
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { meta } from "#meta";
|
|
7
|
+
|
|
8
|
+
// src/cli/commands/index.ts
|
|
9
|
+
import * as Command4 from "@effect/cli/Command";
|
|
10
|
+
|
|
11
|
+
// src/cli/commands/disable.ts
|
|
12
|
+
import * as Args from "@effect/cli/Args";
|
|
13
|
+
import * as Command from "@effect/cli/Command";
|
|
14
|
+
import * as Console from "effect/Console";
|
|
15
|
+
import * as Effect2 from "effect/Effect";
|
|
16
|
+
import { Plugin } from "@dxos/app-framework";
|
|
17
|
+
import { CommandConfig } from "@dxos/cli-util";
|
|
18
|
+
import { invariant } from "@dxos/invariant";
|
|
19
|
+
|
|
20
|
+
// src/cli/storage.ts
|
|
21
|
+
import * as FileSystem from "@effect/platform/FileSystem";
|
|
22
|
+
import * as Path from "@effect/platform/Path";
|
|
23
|
+
import * as Effect from "effect/Effect";
|
|
24
|
+
import * as Schema from "effect/Schema";
|
|
25
|
+
import * as Yaml from "yaml";
|
|
26
|
+
import { DX_CONFIG } from "@dxos/client-protocol";
|
|
27
|
+
var PluginsSchema = Schema.Array(Schema.String);
|
|
28
|
+
var getPluginsConfigPath = (profile) => `${DX_CONFIG}/plugins/${profile}.yml`;
|
|
29
|
+
var loadEnabledPlugins = Effect.fn(function* ({ profile }) {
|
|
30
|
+
const fs = yield* FileSystem.FileSystem;
|
|
31
|
+
const pluginsPath = getPluginsConfigPath(profile);
|
|
32
|
+
const content = yield* fs.readFileString(pluginsPath).pipe(Effect.catchTag("SystemError", () => Effect.succeed("[]")));
|
|
33
|
+
const raw = Yaml.parse(content);
|
|
34
|
+
const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(Effect.catchAll(() => Effect.succeed([])));
|
|
35
|
+
return parsed;
|
|
36
|
+
});
|
|
37
|
+
var saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }) {
|
|
38
|
+
const fs = yield* FileSystem.FileSystem;
|
|
39
|
+
const path = yield* Path.Path;
|
|
40
|
+
const pluginsPath = getPluginsConfigPath(profile);
|
|
41
|
+
yield* fs.makeDirectory(path.dirname(pluginsPath), {
|
|
42
|
+
recursive: true
|
|
43
|
+
});
|
|
44
|
+
const encoded = Yaml.stringify(enabled);
|
|
45
|
+
yield* fs.writeFileString(pluginsPath, encoded);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// src/cli/commands/disable.ts
|
|
49
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/disable.ts";
|
|
50
|
+
var handler = Effect2.fn(function* ({ id }) {
|
|
51
|
+
const { json, profile } = yield* CommandConfig;
|
|
52
|
+
const manager = yield* Plugin.Service;
|
|
53
|
+
const plugins = manager.getPlugins();
|
|
54
|
+
const plugin2 = plugins.find((p) => p.meta.id === id);
|
|
55
|
+
invariant(plugin2, `Plugin not found: ${id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 17, S: this, A: ["plugin", "`Plugin not found: ${id}`"] });
|
|
56
|
+
const core = manager.getCore();
|
|
57
|
+
invariant(!core.includes(id), `Cannot disable core plugin: ${id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 19, S: this, A: ["!core.includes(id)", "`Cannot disable core plugin: ${id}`"] });
|
|
58
|
+
const disabled = yield* manager.disable(id);
|
|
59
|
+
invariant(disabled, `Failed to disable plugin: ${id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 21, S: this, A: ["disabled", "`Failed to disable plugin: ${id}`"] });
|
|
60
|
+
const enabledPlugins = manager.getEnabled();
|
|
61
|
+
yield* saveEnabledPlugins({
|
|
62
|
+
profile,
|
|
63
|
+
enabled: [
|
|
64
|
+
...enabledPlugins
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
if (json) {
|
|
68
|
+
yield* Console.log(JSON.stringify({
|
|
69
|
+
id,
|
|
70
|
+
enabled: false
|
|
71
|
+
}, null, 2));
|
|
72
|
+
} else {
|
|
73
|
+
yield* Console.log(`Plugin "${plugin2.meta.name ?? id}" disabled.`);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
var disable = Command.make("disable", {
|
|
77
|
+
id: Args.text({
|
|
78
|
+
name: "id"
|
|
79
|
+
}).pipe(Args.withDescription("The ID of the plugin to disable."))
|
|
80
|
+
}, handler).pipe(Command.withDescription("Disable a plugin."));
|
|
81
|
+
|
|
82
|
+
// src/cli/commands/enable.ts
|
|
83
|
+
import * as Args2 from "@effect/cli/Args";
|
|
84
|
+
import * as Command2 from "@effect/cli/Command";
|
|
85
|
+
import * as Console2 from "effect/Console";
|
|
86
|
+
import * as Effect3 from "effect/Effect";
|
|
87
|
+
import { Plugin as Plugin2 } from "@dxos/app-framework";
|
|
88
|
+
import { CommandConfig as CommandConfig2 } from "@dxos/cli-util";
|
|
89
|
+
import { invariant as invariant2 } from "@dxos/invariant";
|
|
90
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/enable.ts";
|
|
91
|
+
var handler2 = Effect3.fn(function* ({ id }) {
|
|
92
|
+
const { json, profile } = yield* CommandConfig2;
|
|
93
|
+
const manager = yield* Plugin2.Service;
|
|
94
|
+
const plugins = manager.getPlugins();
|
|
95
|
+
const plugin2 = plugins.find((p) => p.meta.id === id);
|
|
96
|
+
invariant2(plugin2, `Plugin not found: ${id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 17, S: this, A: ["plugin", "`Plugin not found: ${id}`"] });
|
|
97
|
+
const enabled = yield* manager.enable(id);
|
|
98
|
+
invariant2(enabled, `Failed to enable plugin: ${id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 19, S: this, A: ["enabled", "`Failed to enable plugin: ${id}`"] });
|
|
99
|
+
const enabledPlugins = manager.getEnabled();
|
|
100
|
+
yield* saveEnabledPlugins({
|
|
101
|
+
profile,
|
|
102
|
+
enabled: [
|
|
103
|
+
...enabledPlugins
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
if (json) {
|
|
107
|
+
yield* Console2.log(JSON.stringify({
|
|
108
|
+
id,
|
|
109
|
+
enabled: true
|
|
110
|
+
}, null, 2));
|
|
111
|
+
} else {
|
|
112
|
+
yield* Console2.log(`Plugin "${plugin2.meta.name ?? id}" enabled.`);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
var enable = Command2.make("enable", {
|
|
116
|
+
id: Args2.text({
|
|
117
|
+
name: "id"
|
|
118
|
+
}).pipe(Args2.withDescription("The ID of the plugin to enable."))
|
|
119
|
+
}, handler2).pipe(Command2.withDescription("Enable a plugin."));
|
|
120
|
+
|
|
121
|
+
// src/cli/commands/list.ts
|
|
122
|
+
import * as Command3 from "@effect/cli/Command";
|
|
123
|
+
import * as Console3 from "effect/Console";
|
|
124
|
+
import * as Effect4 from "effect/Effect";
|
|
125
|
+
import { Plugin as Plugin3 } from "@dxos/app-framework";
|
|
126
|
+
import { CommandConfig as CommandConfig3, printList } from "@dxos/cli-util";
|
|
127
|
+
|
|
128
|
+
// src/cli/commands/util.ts
|
|
129
|
+
import { FormBuilder } from "@dxos/cli-util";
|
|
130
|
+
var printPlugin = (plugin2) => {
|
|
131
|
+
const status = plugin2.core ? "core" : plugin2.enabled ? "enabled" : "disabled";
|
|
132
|
+
return FormBuilder.make({
|
|
133
|
+
title: plugin2.name
|
|
134
|
+
}).pipe(FormBuilder.set("id", plugin2.id), FormBuilder.set("status", status), FormBuilder.build);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// src/cli/commands/list.ts
|
|
138
|
+
var handler3 = Effect4.fn(function* () {
|
|
139
|
+
const { json } = yield* CommandConfig3;
|
|
140
|
+
const manager = yield* Plugin3.Service;
|
|
141
|
+
const plugins = manager.getPlugins();
|
|
142
|
+
const enabled = manager.getEnabled();
|
|
143
|
+
const core = manager.getCore();
|
|
144
|
+
const formattedPlugins = plugins.map((plugin2) => {
|
|
145
|
+
const isEnabled = enabled.includes(plugin2.meta.id);
|
|
146
|
+
const isCore = core.includes(plugin2.meta.id);
|
|
147
|
+
return {
|
|
148
|
+
id: plugin2.meta.id,
|
|
149
|
+
name: plugin2.meta.name ?? plugin2.meta.id,
|
|
150
|
+
enabled: isEnabled,
|
|
151
|
+
core: isCore
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
if (json) {
|
|
155
|
+
yield* Console3.log(JSON.stringify(formattedPlugins, null, 2));
|
|
156
|
+
} else {
|
|
157
|
+
const formatted = formattedPlugins.map(printPlugin);
|
|
158
|
+
yield* Console3.log(printList(formatted));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
var list = Command3.make("list", {}, handler3).pipe(Command3.withDescription("List all available plugins."));
|
|
162
|
+
|
|
163
|
+
// src/cli/commands/index.ts
|
|
164
|
+
var plugin = Command4.make("plugin").pipe(Command4.withDescription("Manage plugins."), Command4.withSubcommands([
|
|
165
|
+
enable,
|
|
166
|
+
disable,
|
|
167
|
+
list
|
|
168
|
+
]));
|
|
169
|
+
|
|
170
|
+
// src/cli/plugin.ts
|
|
171
|
+
var RegistryPlugin = Plugin4.define(meta).pipe(AppPlugin.addCommandModule({
|
|
172
|
+
commands: [
|
|
173
|
+
plugin
|
|
174
|
+
]
|
|
175
|
+
}), Plugin4.make);
|
|
176
|
+
export {
|
|
177
|
+
RegistryPlugin,
|
|
178
|
+
loadEnabledPlugins,
|
|
179
|
+
saveEnabledPlugins
|
|
180
|
+
};
|
|
181
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/cli/plugin.ts", "../../../../src/cli/commands/index.ts", "../../../../src/cli/commands/disable.ts", "../../../../src/cli/storage.ts", "../../../../src/cli/commands/enable.ts", "../../../../src/cli/commands/list.ts", "../../../../src/cli/commands/util.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nimport { plugin } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommandModule({\n commands: [plugin],\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { disable } from './disable';\nimport { enable } from './enable';\nimport { list } from './list';\n\nexport const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(\n Command.withDescription('Manage plugins.'),\n Command.withSubcommands([enable, disable, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const core = manager.getCore();\n invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);\n\n const disabled = yield* manager.disable(id);\n invariant(disabled, `Failed to disable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" disabled.`);\n }\n});\n\nexport const disable = Command.make(\n 'disable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),\n },\n handler,\n).pipe(Command.withDescription('Disable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\nimport * as Yaml from 'yaml';\n\nimport { DX_CONFIG } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/** CLI-only: path to plugins/<profile>.yml (sibling to profile/). */\nconst getPluginsConfigPath = (profile: string) => `${DX_CONFIG}/plugins/${profile}.yml`;\n\n/**\n * Load enabled plugins from plugins/<profile>.yml (sibling to profile/).\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = getPluginsConfigPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const raw = Yaml.parse(content);\n const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to plugins/<profile>.yml.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const pluginsPath = getPluginsConfigPath(profile);\n yield* fs.makeDirectory(path.dirname(pluginsPath), { recursive: true });\n const encoded = Yaml.stringify(enabled);\n yield* fs.writeFileString(pluginsPath, encoded);\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const enabled = yield* manager.enable(id);\n invariant(enabled, `Failed to enable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" enabled.`);\n }\n});\n\nexport const enable = Command.make(\n 'enable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),\n },\n handler,\n).pipe(Command.withDescription('Enable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig, printList } from '@dxos/cli-util';\n\nimport { type FormattedPlugin, printPlugin } from './util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const enabled = manager.getEnabled();\n const core = manager.getCore();\n\n const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {\n const isEnabled = enabled.includes(plugin.meta.id);\n const isCore = core.includes(plugin.meta.id);\n return {\n id: plugin.meta.id,\n name: plugin.meta.name ?? plugin.meta.id,\n enabled: isEnabled,\n core: isCore,\n };\n });\n\n if (json) {\n yield* Console.log(JSON.stringify(formattedPlugins, null, 2));\n } else {\n const formatted = formattedPlugins.map(printPlugin);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type FormattedPlugin = {\n id: string;\n name: string;\n enabled: boolean;\n core: boolean;\n};\n\n/**\n * Pretty prints a plugin with ANSI colors.\n */\nexport const printPlugin = (plugin: FormattedPlugin) => {\n const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';\n return FormBuilder.make({ title: plugin.name }).pipe(\n FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "meta", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "Yaml", "DX_CONFIG", "PluginsSchema", "Array", "String", "getPluginsConfigPath", "profile", "loadEnabledPlugins", "fn", "fs", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "raw", "parse", "parsed", "decodeUnknown", "catchAll", "saveEnabledPlugins", "enabled", "path", "makeDirectory", "dirname", "recursive", "encoded", "stringify", "writeFileString", "handler", "manager", "Plugin", "plugins", "getPlugins", "plugin", "find", "p", "invariant", "core", "getCore", "includes", "disabled", "enabledPlugins", "profile", "enabled", "json", "id", "Console", "name", "Args", "withDescription", "pipe", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "__dxlog_file", "handler", "manager", "Plugin", "plugins", "getPlugins", "plugin", "find", "p", "invariant", "enabled", "enable", "id", "enabledPlugins", "profile", "json", "Console", "name", "Args", "withDescription", "pipe", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "make", "title", "name", "pipe", "set", "id", "build", "handler", "fn", "json", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "enabled", "getEnabled", "core", "getCore", "formattedPlugins", "map", "plugin", "isEnabled", "includes", "meta", "id", "isCore", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCommandModule", "commands", "plugin", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/meta.ts
|
|
4
|
+
import { pinnedWorkspaceId } from "@dxos/app-toolkit";
|
|
5
|
+
import { trim } from "@dxos/util";
|
|
6
|
+
var REGISTRY_ID = pinnedWorkspaceId("dxos:plugin-registry");
|
|
7
|
+
var REGISTRY_KEY = "plugin-registry";
|
|
8
|
+
var CATEGORY_SEPARATOR = ">";
|
|
9
|
+
var registryCategoryId = (category) => `${REGISTRY_KEY}${CATEGORY_SEPARATOR}${category}`;
|
|
10
|
+
var getPluginPath = (pluginId) => `root/${REGISTRY_ID}/${pluginId}`;
|
|
11
|
+
var meta = {
|
|
12
|
+
id: "org.dxos.plugin.registry",
|
|
13
|
+
name: "Plugins",
|
|
14
|
+
description: trim`
|
|
15
|
+
Plugin management system for discovering, installing, and configuring workspace extensions.
|
|
16
|
+
Browse available plugins and customize your workspace capabilities.
|
|
17
|
+
`
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/RegistryPlugin.tsx
|
|
21
|
+
import { Plugin } from "@dxos/app-framework";
|
|
22
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
23
|
+
import { ClientEvents } from "@dxos/plugin-client/types";
|
|
24
|
+
import { AppGraphBuilder, OperationHandler, ReactSurface, RegistryState } from "#capabilities";
|
|
25
|
+
import { meta as meta2 } from "#meta";
|
|
26
|
+
import { translations } from "#translations";
|
|
27
|
+
var RegistryPlugin = Plugin.define(meta2).pipe(AppPlugin.addAppGraphModule({
|
|
28
|
+
activate: AppGraphBuilder
|
|
29
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
30
|
+
activate: OperationHandler
|
|
31
|
+
}), AppPlugin.addSurfaceModule({
|
|
32
|
+
activate: ReactSurface
|
|
33
|
+
}), AppPlugin.addTranslationsModule({
|
|
34
|
+
translations
|
|
35
|
+
}), Plugin.addModule({
|
|
36
|
+
activatesOn: ClientEvents.ClientReady,
|
|
37
|
+
activate: RegistryState
|
|
38
|
+
}), Plugin.make);
|
|
39
|
+
export {
|
|
40
|
+
REGISTRY_ID,
|
|
41
|
+
REGISTRY_KEY,
|
|
42
|
+
RegistryPlugin,
|
|
43
|
+
getPluginPath,
|
|
44
|
+
meta,
|
|
45
|
+
registryCategoryId
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/RegistryPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { pinnedWorkspaceId } from '@dxos/app-toolkit';\nimport { trim } from '@dxos/util';\n\nexport const REGISTRY_ID = pinnedWorkspaceId('dxos:plugin-registry');\nexport const REGISTRY_KEY = 'plugin-registry';\n\n// TODO(wittjosiah): Should this be a special separator or use the standard path separator?\nconst CATEGORY_SEPARATOR = '>';\n\n/** Build a registry category node ID. */\nexport const registryCategoryId = (category: string): string => `${REGISTRY_KEY}${CATEGORY_SEPARATOR}${category}`;\n\n/** Qualified graph path to a specific plugin node. */\nexport const getPluginPath = (pluginId: string): string => `root/${REGISTRY_ID}/${pluginId}`;\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.registry',\n name: 'Plugins',\n description: trim`\n Plugin management system for discovering, installing, and configuring workspace extensions.\n Browse available plugins and customize your workspace capabilities.\n `,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { ClientEvents } from '@dxos/plugin-client/types';\n\nimport { AppGraphBuilder, OperationHandler, ReactSurface, RegistryState } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n activate: RegistryState,\n }),\n Plugin.make,\n);\n"],
|
|
5
|
+
"mappings": ";;;AAKA,SAASA,yBAAyB;AAClC,SAASC,YAAY;AAEd,IAAMC,cAAcF,kBAAkB,sBAAA;AACtC,IAAMG,eAAe;AAG5B,IAAMC,qBAAqB;AAGpB,IAAMC,qBAAqB,CAACC,aAA6B,GAAGH,YAAAA,GAAeC,kBAAAA,GAAqBE,QAAAA;AAGhG,IAAMC,gBAAgB,CAACC,aAA6B,QAAQN,WAAAA,IAAeM,QAAAA;AAE3E,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaX;;;;AAIf;;;ACvBA,SAASY,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,oBAAoB;AAE7B,SAASC,iBAAiBC,kBAAkBC,cAAcC,qBAAqB;AAC/E,SAASC,QAAAA,aAAY;AACrB,SAASC,oBAAoB;AAEtB,IAAMC,iBAAiBT,OAAOU,OAAOH,KAAAA,EAAMI,KAChDV,UAAUW,kBAAkB;EAAEC,UAAUV;AAAgB,CAAA,GACxDF,UAAUa,0BAA0B;EAAED,UAAUT;AAAiB,CAAA,GACjEH,UAAUc,iBAAiB;EAAEF,UAAUR;AAAa,CAAA,GACpDJ,UAAUe,sBAAsB;EAAER;AAAa,CAAA,GAC/CR,OAAOiB,UAAU;EACfC,aAAahB,aAAaiB;EAC1BN,UAAUP;AACZ,CAAA,GACAN,OAAOoB,IAAI;",
|
|
6
|
+
"names": ["pinnedWorkspaceId", "trim", "REGISTRY_ID", "REGISTRY_KEY", "CATEGORY_SEPARATOR", "registryCategoryId", "category", "getPluginPath", "pluginId", "meta", "id", "name", "description", "Plugin", "AppPlugin", "ClientEvents", "AppGraphBuilder", "OperationHandler", "ReactSurface", "RegistryState", "meta", "translations", "RegistryPlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "addSurfaceModule", "addTranslationsModule", "addModule", "activatesOn", "ClientReady", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":3282,"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/RegistryPlugin.tsx":{"bytes":3150,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":470,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/RegistryPlugin.tsx","kind":"import-statement","original":"./RegistryPlugin"}],"format":"esm"},"src/cli/storage.ts":{"bytes":6158,"imports":[{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/disable.ts":{"bytes":6262,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/enable.ts":{"bytes":5687,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/util.ts":{"bytes":1905,"imports":[{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/list.ts":{"bytes":4871,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"src/cli/commands/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/cli/commands/index.ts":{"bytes":1502,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"src/cli/commands/disable.ts","kind":"import-statement","original":"./disable"},{"path":"src/cli/commands/enable.ts","kind":"import-statement","original":"./enable"},{"path":"src/cli/commands/list.ts","kind":"import-statement","original":"./list"}],"format":"esm"},"src/cli/plugin.ts":{"bytes":1467,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/cli/commands/index.ts","kind":"import-statement","original":"./commands"}],"format":"esm"},"src/cli/index.ts":{"bytes":457,"imports":[{"path":"src/cli/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"src/cli/storage.ts","kind":"import-statement","original":"./storage"}],"format":"esm"},"src/translations.ts":{"bytes":3690,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3221},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"exports":["REGISTRY_ID","REGISTRY_KEY","RegistryPlugin","getPluginPath","meta","registryCategoryId"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":640},"src/index.ts":{"bytesInOutput":0},"src/RegistryPlugin.tsx":{"bytesInOutput":727}},"bytes":1644},"dist/lib/node-esm/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13652},"dist/lib/node-esm/cli/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"exports":["RegistryPlugin","loadEnabledPlugins","saveEnabledPlugins"],"entryPoint":"src/cli/index.ts","inputs":{"src/cli/plugin.ts":{"bytesInOutput":258},"src/cli/commands/index.ts":{"bytesInOutput":196},"src/cli/commands/disable.ts":{"bytesInOutput":1792},"src/cli/storage.ts":{"bytesInOutput":1230},"src/cli/commands/enable.ts":{"bytesInOutput":1609},"src/cli/commands/list.ts":{"bytesInOutput":1133},"src/cli/commands/util.ts":{"bytesInOutput":317},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":7044},"dist/lib/node-esm/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1726},"dist/lib/node-esm/translations.mjs":{"imports":[{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":1048}},"bytes":1233}}}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/translations.ts
|
|
4
|
+
import { meta } from "#meta";
|
|
5
|
+
var translations = [
|
|
6
|
+
{
|
|
7
|
+
"en-US": {
|
|
8
|
+
[meta.id]: {
|
|
9
|
+
"plugin.name": "Registry",
|
|
10
|
+
"details.label": "Details",
|
|
11
|
+
"home-page.label": "Website",
|
|
12
|
+
"source.label": "Source",
|
|
13
|
+
"plugin-registry.label": "Plugin Registry",
|
|
14
|
+
"plugin-settings.label": "Plugin Settings",
|
|
15
|
+
"official-plugins.label": "Official",
|
|
16
|
+
"installed-plugins.label": "Enabled",
|
|
17
|
+
"recommended-plugins.label": "Recommended",
|
|
18
|
+
"labs-plugins.label": "Labs",
|
|
19
|
+
"community-plugins.label": "Community",
|
|
20
|
+
"load-by-url.label": "Load from URL",
|
|
21
|
+
"load-by-url-dialog.title": "Load Plugin from URL",
|
|
22
|
+
"plugin-url.label": "Plugin URL",
|
|
23
|
+
"load-plugin.label": "Load Plugin",
|
|
24
|
+
"loading.label": "Loading...",
|
|
25
|
+
"coming-soon.label": "Coming soon!",
|
|
26
|
+
"open-plugin-registry.label": "Open plugin registry",
|
|
27
|
+
"install.label": "Install",
|
|
28
|
+
"installing.label": "Installing\u2026",
|
|
29
|
+
"uninstall.label": "Uninstall"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
export {
|
|
35
|
+
translations
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Registry',\n 'details.label': 'Details',\n 'home-page.label': 'Website',\n 'source.label': 'Source',\n 'plugin-registry.label': 'Plugin Registry',\n 'plugin-settings.label': 'Plugin Settings',\n 'official-plugins.label': 'Official',\n 'installed-plugins.label': 'Enabled',\n 'recommended-plugins.label': 'Recommended',\n 'labs-plugins.label': 'Labs',\n 'community-plugins.label': 'Community',\n 'load-by-url.label': 'Load from URL',\n 'load-by-url-dialog.title': 'Load Plugin from URL',\n 'plugin-url.label': 'Plugin URL',\n 'load-plugin.label': 'Load Plugin',\n 'loading.label': 'Loading...',\n 'coming-soon.label': 'Coming soon!',\n 'open-plugin-registry.label': 'Open plugin registry',\n 'install.label': 'Install',\n 'installing.label': 'Installing…',\n 'uninstall.label': 'Uninstall',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,yBAAyB;QACzB,0BAA0B;QAC1B,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,2BAA2B;QAC3B,qBAAqB;QACrB,4BAA4B;QAC5B,oBAAoB;QACpB,qBAAqB;QACrB,iBAAiB;QACjB,qBAAqB;QACrB,8BAA8B;QAC9B,iBAAiB;QACjB,oBAAoB;QACpB,mBAAmB;MACrB;IACF;EACF;;",
|
|
6
|
+
"names": ["meta", "translations", "id"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegistryPlugin.d.ts","sourceRoot":"","sources":["../../../src/RegistryPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RegistryPlugin.d.ts","sourceRoot":"","sources":["../../../src/RegistryPlugin.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ7C,eAAO,MAAM,cAAc,4BAU1B,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import { GraphBuilder } from '@dxos/plugin-graph';
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<GraphBuilder.BuilderExtensions>>, never, Capability.Service>;
|
|
3
5
|
export default _default;
|
|
4
6
|
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
1
|
+
import { Capability } from '@dxos/app-framework';
|
|
2
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
3
|
+
export declare const AppGraphBuilder: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-graph").BuilderExtensions>>, Error>;
|
|
4
|
+
export declare const OperationHandler: Capability.LazyCapability<OperationHandlerSet.OperationHandlerSet, Capability.ModuleReturn, Error>;
|
|
5
|
+
export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
|
|
6
|
+
export declare const RegistryState: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@effect-atom/atom/Atom").Atom<import("../types").CommunityPluginsState>>>, Error>;
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,eAAe,qIAA0E,CAAC;AACvG,eAAO,MAAM,gBAAgB,oGAG5B,CAAC;AACF,eAAO,MAAM,YAAY,iJAAmE,CAAC;AAC7F,eAAO,MAAM,aAAa,yKAA4D,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
4
|
+
declare const _default: (props: OperationHandlerSet.OperationHandlerSet) => Effect.Effect<Capability.ModuleReturn, Error, Capability.Service>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=operation-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/operation-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ReactSurface>>, never, never>;
|
|
3
4
|
export default _default;
|
|
4
5
|
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { Capability } from '@dxos/app-framework';
|
|
4
|
+
import { type CommunityPluginsState } from '#types';
|
|
5
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Atom.Atom<CommunityPluginsState>>>, Error, Capability.Service>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI/D,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Command from '@effect/cli/Command';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { Plugin } from '@dxos/app-framework';
|
|
4
|
+
import { CommandConfig } from '@dxos/cli-util';
|
|
5
|
+
export declare const handler: (args_0: {
|
|
6
|
+
id: string;
|
|
7
|
+
}) => Effect.Effect<void, Error | import("@effect/platform/Error").PlatformError, CommandConfig | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path | Plugin.Service>;
|
|
8
|
+
export declare const disable: Command.Command<"disable", CommandConfig | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path | Plugin.Service, Error | import("@effect/platform/Error").PlatformError, {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=disable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disable.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/disable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAE/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C,eAAO,MAAM,OAAO;QAAsC,MAAM;2MAuB9D,CAAC;AAEH,eAAO,MAAM,OAAO;;EAMgC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Command from '@effect/cli/Command';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { Plugin } from '@dxos/app-framework';
|
|
4
|
+
import { CommandConfig } from '@dxos/cli-util';
|
|
5
|
+
export declare const handler: (args_0: {
|
|
6
|
+
id: string;
|
|
7
|
+
}) => Effect.Effect<void, Error | import("@effect/platform/Error").PlatformError, CommandConfig | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path | Plugin.Service>;
|
|
8
|
+
export declare const enable: Command.Command<"enable", CommandConfig | import("@effect/platform/FileSystem").FileSystem | import("@effect/platform/Path").Path | Plugin.Service, Error | import("@effect/platform/Error").PlatformError, {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=enable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/enable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAE/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAK/C,eAAO,MAAM,OAAO;QAAsC,MAAM;2MAoB9D,CAAC;AAEH,eAAO,MAAM,MAAM;;EAMgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAM/C,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAGtD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Command from '@effect/cli/Command';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { Plugin } from '@dxos/app-framework';
|
|
4
|
+
import { CommandConfig } from '@dxos/cli-util';
|
|
5
|
+
export declare const handler: () => Effect.Effect<void, never, CommandConfig | Plugin.Service>;
|
|
6
|
+
export declare const list: Command.Command<"list", CommandConfig | Plugin.Service, never, {}>;
|
|
7
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAE/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAa,MAAM,gBAAgB,CAAC;AAI1D,eAAO,MAAM,OAAO,kEAyBlB,CAAC;AAEH,eAAO,MAAM,IAAI,oEAAiG,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type FormattedPlugin = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
core: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Pretty prints a plugin with ANSI colors.
|
|
9
|
+
*/
|
|
10
|
+
export declare const printPlugin: (plugin: FormattedPlugin) => import("@effect/printer/Doc").Doc<any>;
|
|
11
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/util.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,WAAY,eAAe,2CAOlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/cli/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO7C,eAAO,MAAM,cAAc,4BAK1B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as FileSystem from '@effect/platform/FileSystem';
|
|
2
|
+
import * as Path from '@effect/platform/Path';
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
/**
|
|
5
|
+
* Load enabled plugins from plugins/<profile>.yml (sibling to profile/).
|
|
6
|
+
* Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.
|
|
7
|
+
*/
|
|
8
|
+
export declare const loadEnabledPlugins: (args_0: {
|
|
9
|
+
profile: string;
|
|
10
|
+
}) => Effect.Effect<string[] | readonly string[], import("@effect/platform/Error").BadArgument, FileSystem.FileSystem>;
|
|
11
|
+
/**
|
|
12
|
+
* Save enabled plugins to plugins/<profile>.yml.
|
|
13
|
+
*/
|
|
14
|
+
export declare const saveEnabledPlugins: (args_0: {
|
|
15
|
+
profile: string;
|
|
16
|
+
enabled: string[];
|
|
17
|
+
}) => Effect.Effect<void, import("@effect/platform/Error").PlatformError, FileSystem.FileSystem | Path.Path>;
|
|
18
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/cli/storage.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAaxC;;;GAGG;AACH,eAAO,MAAM,kBAAkB;aAAgD,MAAM;sHAcnF,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;aAAyD,MAAM;aAAW,MAAM,EAAE;4GAO/G,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
3
|
+
export type PluginDetailProps = {
|
|
4
|
+
plugin: Plugin.Plugin;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
onEnabledChange?: (enabled: boolean) => void;
|
|
7
|
+
/**
|
|
8
|
+
* When provided, an Uninstall button is rendered. Leave undefined for core
|
|
9
|
+
* or non-removable plugins.
|
|
10
|
+
*/
|
|
11
|
+
onUninstall?: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* When provided, the plugin is not installed and an Install button is shown
|
|
14
|
+
* in place of the enable Switch.
|
|
15
|
+
*/
|
|
16
|
+
onInstall?: () => void;
|
|
17
|
+
installing?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const PluginDetail: React.ForwardRefExoticComponent<Omit<PluginDetailProps, "className"> & {
|
|
20
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
21
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
//# sourceMappingURL=PluginDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginDetail.d.ts","sourceRoot":"","sources":["../../../../../src/components/PluginDetail/PluginDetail.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,YAAY;;2HA0ExB,CAAC"}
|