@dxos/plugin-registry 0.8.4-main.3eb6e50203 → 0.8.4-main.3fbcb4aa9b
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/neutral/RegistryPlugin.mjs +27 -0
- package/dist/lib/neutral/RegistryPlugin.mjs.map +7 -0
- package/dist/lib/{browser/cli/index.mjs → neutral/RegistryPlugin.node.mjs} +28 -99
- package/dist/lib/neutral/RegistryPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XK2JMH3H.mjs +33 -0
- package/dist/lib/neutral/chunk-XK2JMH3H.mjs.map +7 -0
- package/dist/lib/neutral/chunk-YV7A523U.mjs +29 -0
- package/dist/lib/neutral/chunk-YV7A523U.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +21 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/open-plugin-registry-II735N76.mjs +15 -0
- package/dist/lib/neutral/open-plugin-registry-II735N76.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +18 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +61 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/types/src/RegistryPlugin.d.ts +1 -0
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/{cli/plugin.d.ts → RegistryPlugin.node.d.ts} +2 -1
- package/dist/types/src/RegistryPlugin.node.d.ts.map +1 -0
- package/dist/types/src/RegistryPlugin.test.d.ts +2 -0
- package/dist/types/src/RegistryPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/dev-plugin-loader.d.ts +11 -0
- package/dist/types/src/capabilities/dev-plugin-loader.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +15 -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 +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +14 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/disable.d.ts +2 -2
- package/dist/types/src/commands/disable.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/enable.d.ts +2 -2
- package/dist/types/src/commands/enable.d.ts.map +1 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/commands/list.d.ts +7 -0
- package/dist/types/src/commands/list.d.ts.map +1 -0
- package/dist/types/src/commands/util.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +46 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +68 -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/PluginFailureBadge/PluginFailureBadge.d.ts +20 -0
- package/dist/types/src/components/PluginFailureBadge/PluginFailureBadge.d.ts.map +1 -0
- package/dist/types/src/components/PluginFailureBadge/index.d.ts +2 -0
- package/dist/types/src/components/PluginFailureBadge/index.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginItem.d.ts +40 -0
- package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.d.ts +23 -0
- package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts +67 -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/RegistrySettings/RegistrySettings.d.ts +18 -0
- package/dist/types/src/components/RegistrySettings/RegistrySettings.d.ts.map +1 -0
- package/dist/types/src/components/RegistrySettings/index.d.ts +2 -0
- package/dist/types/src/components/RegistrySettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts +20 -0
- package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts.map +1 -0
- package/dist/types/src/containers/BaseRegistryArticle/index.d.ts +2 -0
- package/dist/types/src/containers/BaseRegistryArticle/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/PublicRegistryArticle/PublicRegistryArticle.d.ts +8 -0
- package/dist/types/src/containers/PublicRegistryArticle/PublicRegistryArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PublicRegistryArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PublicRegistryArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts +14 -0
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RegistryArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts +13 -0
- package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/RegistrySettingsContainer/index.d.ts +2 -0
- package/dist/types/src/containers/RegistrySettingsContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +8 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +4 -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-registry-plugins.d.ts +15 -0
- package/dist/types/src/hooks/use-registry-plugins.d.ts.map +1 -0
- package/dist/types/src/hooks/use-update-available.d.ts +18 -0
- package/dist/types/src/hooks/use-update-available.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +5 -1
- 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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/{cli/storage.d.ts → storage.d.ts} +4 -4
- package/dist/types/src/storage.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +48 -16
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +30 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +57 -35
- package/src/{cli/plugin.ts → RegistryPlugin.node.ts} +3 -1
- package/src/RegistryPlugin.test.ts +24 -0
- package/src/RegistryPlugin.tsx +13 -5
- package/src/capabilities/app-graph-builder.ts +200 -0
- package/src/capabilities/dev-plugin-loader.ts +39 -0
- package/src/capabilities/index.ts +11 -3
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +136 -0
- package/src/capabilities/settings.ts +34 -0
- package/src/components/{PluginDetail.stories.tsx → PluginDetail/PluginDetail.stories.tsx} +5 -5
- package/src/components/PluginDetail/PluginDetail.tsx +196 -0
- package/src/components/PluginDetail/index.ts +5 -0
- package/src/components/PluginFailureBadge/PluginFailureBadge.tsx +68 -0
- package/src/components/PluginFailureBadge/index.ts +5 -0
- package/src/components/PluginList/PluginItem.tsx +226 -0
- package/src/components/{PluginList.stories.tsx → PluginList/PluginList.stories.tsx} +18 -15
- package/src/components/PluginList/PluginList.tsx +52 -0
- package/src/components/PluginList/index.ts +5 -0
- package/src/components/RegistrySettings/RegistrySettings.tsx +120 -0
- package/src/components/RegistrySettings/index.ts +5 -0
- package/src/components/index.ts +2 -1
- package/src/containers/BaseRegistryArticle/BaseRegistryArticle.tsx +163 -0
- package/src/containers/BaseRegistryArticle/index.ts +5 -0
- package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +87 -0
- package/src/containers/LoadPluginDialog/index.ts +5 -0
- package/src/containers/PluginArticle/PluginArticle.tsx +336 -0
- package/src/containers/PluginArticle/index.ts +5 -0
- package/src/containers/PublicRegistryArticle/PublicRegistryArticle.tsx +192 -0
- package/src/containers/PublicRegistryArticle/index.ts +5 -0
- package/src/containers/RegistryArticle/RegistryArticle.tsx +53 -0
- package/src/containers/RegistryArticle/index.ts +5 -0
- package/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.tsx +59 -0
- package/src/containers/RegistrySettingsContainer/index.ts +5 -0
- package/src/containers/index.ts +12 -0
- package/src/hooks/index.ts +7 -0
- package/src/hooks/use-auto-tags.ts +51 -0
- package/src/hooks/use-registry-plugins.ts +29 -0
- package/src/hooks/use-update-available.ts +31 -0
- package/src/index.ts +1 -1
- package/src/meta.ts +14 -5
- package/src/operations/index.ts +7 -0
- package/src/operations/open-plugin-registry.ts +21 -0
- package/src/plugin.ts +11 -0
- package/src/{cli/storage.ts → storage.ts} +14 -21
- package/src/translations.ts +52 -15
- package/src/types.ts +33 -1
- package/dist/lib/browser/app-graph-builder-YOD5EGAY.mjs +0 -167
- package/dist/lib/browser/app-graph-builder-YOD5EGAY.mjs.map +0 -7
- package/dist/lib/browser/chunk-VOAOTNGS.mjs +0 -19
- package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -63
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs +0 -25
- package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IEGOKKMX.mjs +0 -337
- package/dist/lib/browser/react-surface-IEGOKKMX.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-WTIS5KI5.mjs +0 -168
- package/dist/lib/node-esm/app-graph-builder-WTIS5KI5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +0 -21
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +0 -7
- package/dist/lib/node-esm/cli/index.mjs +0 -225
- package/dist/lib/node-esm/cli/index.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -64
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs +0 -26
- package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SEJBWRMR.mjs +0 -338
- package/dist/lib/node-esm/react-surface-SEJBWRMR.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/cli/commands/disable.d.ts.map +0 -1
- package/dist/types/src/cli/commands/enable.d.ts.map +0 -1
- package/dist/types/src/cli/commands/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/list.d.ts +0 -7
- package/dist/types/src/cli/commands/list.d.ts.map +0 -1
- package/dist/types/src/cli/commands/util.d.ts.map +0 -1
- package/dist/types/src/cli/index.d.ts +0 -3
- package/dist/types/src/cli/index.d.ts.map +0 -1
- package/dist/types/src/cli/plugin.d.ts.map +0 -1
- package/dist/types/src/cli/storage.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 -33
- 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 -34
- package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
- package/dist/types/src/components/RegistryContainer.d.ts +0 -8
- package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -137
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -24
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -99
- package/src/cli/index.ts +0 -6
- package/src/components/PluginDetail.tsx +0 -81
- package/src/components/PluginItem.tsx +0 -120
- package/src/components/PluginList.tsx +0 -24
- package/src/components/RegistryContainer.tsx +0 -86
- /package/dist/types/src/{cli/commands → commands}/index.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/util.d.ts +0 -0
- /package/src/{cli/commands → commands}/disable.ts +0 -0
- /package/src/{cli/commands → commands}/enable.ts +0 -0
- /package/src/{cli/commands → commands}/index.ts +0 -0
- /package/src/{cli/commands → commands}/list.ts +0 -0
- /package/src/{cli/commands → commands}/util.ts +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
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';\n\nimport { DX_CONFIG, getProfilePath } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PLUGINS_FILE = 'plugins.json';\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/**\n * Get the path to the plugins configuration file for a profile.\n */\nconst getPluginsPath = (profile: string): Effect.Effect<string, never, Path.Path> =>\n Effect.gen(function* () {\n const path = yield* Path.Path;\n return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);\n });\n\n/**\n * Load enabled plugins from profile storage.\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 = yield* getPluginsPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to profile storage.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n const profileDir = getProfilePath(DX_CONFIG, profile);\n\n yield* fs.makeDirectory(profileDir, { recursive: true });\n const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);\n yield* fs.writeFileString(pluginsPath, encoded + '\\n');\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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["Plugin", "AppPlugin", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "DX_CONFIG", "getProfilePath", "PLUGINS_FILE", "PluginsSchema", "Array", "String", "getPluginsPath", "profile", "gen", "path", "Path", "join", "getProfilePath", "DX_CONFIG", "loadEnabledPlugins", "fn", "fs", "FileSystem", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "parsed", "decodeUnknown", "parseJson", "catchAll", "saveEnabledPlugins", "enabled", "profileDir", "makeDirectory", "recursive", "encoded", "encodeSync", "writeFileString", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "core", "getCore", "includes", "disabled", "disable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "enabled", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "enabled", "enable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "FormBuilder", "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
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
REGISTRY_ID,
|
|
3
|
-
REGISTRY_KEY,
|
|
4
|
-
meta
|
|
5
|
-
} from "./chunk-VOAOTNGS.mjs";
|
|
6
|
-
|
|
7
|
-
// src/RegistryPlugin.tsx
|
|
8
|
-
import { Plugin } from "@dxos/app-framework";
|
|
9
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
10
|
-
|
|
11
|
-
// src/capabilities/app-graph-builder/index.ts
|
|
12
|
-
import { Capability } from "@dxos/app-framework";
|
|
13
|
-
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-YOD5EGAY.mjs"));
|
|
14
|
-
|
|
15
|
-
// src/capabilities/operation-resolver/index.ts
|
|
16
|
-
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
17
|
-
var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-7P3NNVSR.mjs"));
|
|
18
|
-
|
|
19
|
-
// src/capabilities/react-surface/index.ts
|
|
20
|
-
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
21
|
-
var ReactSurface = Capability3.lazy("ReactSurface", () => import("./react-surface-IEGOKKMX.mjs"));
|
|
22
|
-
|
|
23
|
-
// src/translations.ts
|
|
24
|
-
var translations = [
|
|
25
|
-
{
|
|
26
|
-
"en-US": {
|
|
27
|
-
[meta.id]: {
|
|
28
|
-
"plugin name": "Registry",
|
|
29
|
-
"details label": "Details",
|
|
30
|
-
"home page label": "Website",
|
|
31
|
-
"source label": "Source",
|
|
32
|
-
"plugin registry label": "Plugin Registry",
|
|
33
|
-
"all plugins label": "All",
|
|
34
|
-
"installed plugins label": "Enabled",
|
|
35
|
-
"recommended plugins label": "Recommended",
|
|
36
|
-
"labs plugins label": "Labs",
|
|
37
|
-
"community plugins label": "Community",
|
|
38
|
-
"load by url label": "Load by URL (soon)",
|
|
39
|
-
"coming soon label": "Coming soon!",
|
|
40
|
-
"open plugin registry label": "Open plugin registry",
|
|
41
|
-
"settings label": "Settings"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
// src/RegistryPlugin.tsx
|
|
48
|
-
var RegistryPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
49
|
-
activate: AppGraphBuilder
|
|
50
|
-
}), AppPlugin.addOperationResolverModule({
|
|
51
|
-
activate: OperationResolver
|
|
52
|
-
}), AppPlugin.addSurfaceModule({
|
|
53
|
-
activate: ReactSurface
|
|
54
|
-
}), AppPlugin.addTranslationsModule({
|
|
55
|
-
translations
|
|
56
|
-
}), Plugin.make);
|
|
57
|
-
export {
|
|
58
|
-
REGISTRY_ID,
|
|
59
|
-
REGISTRY_KEY,
|
|
60
|
-
RegistryPlugin,
|
|
61
|
-
meta
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RegistryPlugin.tsx", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/operation-resolver/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, OperationResolver, ReactSurface } 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.addOperationResolverModule({ activate: OperationResolver }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\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 'all plugins label': 'All',\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 by URL (soon)',\n 'coming soon label': 'Coming soon!',\n 'open plugin registry label': 'Open plugin registry',\n 'settings label': 'Settings',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;;;ACD1B,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,oBAAoBC,YAAWC,KAAK,qBAAqB,MAAM,OAAO,mCAAA,CAAA;;;ACFnF,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACElE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,qBAAqB;QACrB,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,8BAA8B;QAC9B,kBAAkB;MACpB;IACF;EACF;;;;AJjBK,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,2BAA2B;EAAEF,UAAUG;AAAkB,CAAA,GACnEL,UAAUM,iBAAiB;EAAEJ,UAAUK;AAAa,CAAA,GACpDP,UAAUQ,sBAAsB;EAAEC;AAAa,CAAA,GAC/Cb,OAAOc,IAAI;",
|
|
6
|
-
"names": ["Plugin", "AppPlugin", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "OperationResolver", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "meta", "id", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addOperationResolverModule", "OperationResolver", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "make"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":2360,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytes":18101,"imports":[{"path":"effect/Effect","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/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/app-graph-builder/index.ts":{"bytes":946,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"}],"format":"esm"},"src/capabilities/operation-resolver/operation-resolver.ts":{"bytes":3054,"imports":[{"path":"effect/Effect","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/operation","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/operation-resolver/index.ts":{"bytes":964,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/operation-resolver/operation-resolver.ts","kind":"dynamic-import","original":"./operation-resolver"}],"format":"esm"},"src/components/PluginDetail.tsx":{"bytes":10080,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginItem.tsx":{"bytes":13174,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginList.tsx":{"bytes":2281,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/components/PluginItem.tsx","kind":"import-statement","original":"./PluginItem"}],"format":"esm"},"src/components/RegistryContainer.tsx":{"bytes":9861,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"}],"format":"esm"},"src/components/index.ts":{"bytes":689,"imports":[{"path":"src/components/PluginDetail.tsx","kind":"import-statement","original":"./PluginDetail"},{"path":"src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"},{"path":"src/components/RegistryContainer.tsx","kind":"import-statement","original":"./RegistryContainer"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":13246,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":912,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":712,"imports":[{"path":"src/capabilities/app-graph-builder/index.ts","kind":"import-statement","original":"./app-graph-builder"},{"path":"src/capabilities/operation-resolver/index.ts","kind":"import-statement","original":"./operation-resolver"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":2832,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/RegistryPlugin.tsx":{"bytes":2618,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":557,"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":6743,"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":"@dxos/client-protocol","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/disable.ts":{"bytes":6472,"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":5826,"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":2004,"imports":[{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/list.ts":{"bytes":4966,"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":1598,"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":1561,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/cli/commands/index.ts","kind":"import-statement","original":"./commands"}],"format":"esm"},"src/cli/index.ts":{"bytes":544,"imports":[{"path":"src/cli/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"src/cli/storage.ts","kind":"import-statement","original":"./storage"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3677},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/app-graph-builder-YOD5EGAY.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/operation-resolver-7P3NNVSR.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-IEGOKKMX.mjs","kind":"dynamic-import"}],"exports":["REGISTRY_ID","REGISTRY_KEY","RegistryPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/RegistryPlugin.tsx":{"bytesInOutput":399},"src/capabilities/app-graph-builder/index.ts":{"bytesInOutput":158},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/operation-resolver/index.ts":{"bytesInOutput":179},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/translations.ts":{"bytesInOutput":690}},"bytes":1990},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14157},"dist/lib/browser/cli/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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":"@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":228},"src/cli/commands/index.ts":{"bytesInOutput":196},"src/cli/commands/disable.ts":{"bytesInOutput":1828},"src/cli/storage.ts":{"bytesInOutput":1374},"src/cli/commands/enable.ts":{"bytesInOutput":1633},"src/cli/commands/list.ts":{"bytesInOutput":1133},"src/cli/commands/util.ts":{"bytesInOutput":317},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":7174},"dist/lib/browser/app-graph-builder-YOD5EGAY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7837},"dist/lib/browser/app-graph-builder-YOD5EGAY.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","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/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytesInOutput":4699}},"bytes":4944},"dist/lib/browser/operation-resolver-7P3NNVSR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1632},"dist/lib/browser/operation-resolver-7P3NNVSR.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","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/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/operation-resolver/operation-resolver.ts","inputs":{"src/capabilities/operation-resolver/operation-resolver.ts":{"bytesInOutput":664}},"bytes":889},"dist/lib/browser/react-surface-IEGOKKMX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25534},"dist/lib/browser/react-surface-IEGOKKMX.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":3271},"src/components/PluginDetail.tsx":{"bytesInOutput":3041},"src/components/index.ts":{"bytesInOutput":0},"src/components/PluginList.tsx":{"bytesInOutput":418},"src/components/PluginItem.tsx":{"bytesInOutput":3716},"src/components/RegistryContainer.tsx":{"bytesInOutput":2335}},"bytes":13228},"dist/lib/browser/chunk-VOAOTNGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1072},"dist/lib/browser/chunk-VOAOTNGS.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["REGISTRY_ID","REGISTRY_KEY","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":378}},"bytes":488}}}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
REGISTRY_ID
|
|
3
|
-
} from "./chunk-VOAOTNGS.mjs";
|
|
4
|
-
|
|
5
|
-
// src/capabilities/operation-resolver/operation-resolver.ts
|
|
6
|
-
import * as Effect from "effect/Effect";
|
|
7
|
-
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
8
|
-
import { LayoutOperation, SettingsOperation } from "@dxos/app-toolkit";
|
|
9
|
-
import { Operation, OperationResolver } from "@dxos/operation";
|
|
10
|
-
var operation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
11
|
-
return Capability.contributes(Capabilities.OperationResolver, [
|
|
12
|
-
OperationResolver.make({
|
|
13
|
-
operation: SettingsOperation.OpenPluginRegistry,
|
|
14
|
-
handler: Effect.fnUntraced(function* () {
|
|
15
|
-
yield* Operation.invoke(LayoutOperation.SwitchWorkspace, {
|
|
16
|
-
subject: REGISTRY_ID
|
|
17
|
-
});
|
|
18
|
-
})
|
|
19
|
-
})
|
|
20
|
-
]);
|
|
21
|
-
}));
|
|
22
|
-
export {
|
|
23
|
-
operation_resolver_default as default
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=operation-resolver-7P3NNVSR.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/operation-resolver/operation-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';\nimport { Operation, OperationResolver } from '@dxos/operation';\n\nimport { REGISTRY_ID } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationResolver, [\n OperationResolver.make({\n operation: SettingsOperation.OpenPluginRegistry,\n handler: Effect.fnUntraced(function* () {\n yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: REGISTRY_ID });\n }),\n }),\n ]);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,yBAAyB;AACnD,SAASC,WAAWC,yBAAyB;AAI7C,IAAA,6BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,SAAOF,WAAWG,YAAYC,aAAaC,mBAAmB;IAC5DA,kBAAkBC,KAAK;MACrBC,WAAWC,kBAAkBC;MAC7BC,SAAgBR,kBAAW,aAAA;AACzB,eAAOS,UAAUC,OAAOC,gBAAgBC,iBAAiB;UAAEC,SAASC;QAAY,CAAA;MAClF,CAAA;IACF,CAAA;GACD;AACH,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capabilities", "Capability", "LayoutOperation", "SettingsOperation", "Operation", "OperationResolver", "Capability", "makeModule", "fnUntraced", "contributes", "Capabilities", "OperationResolver", "make", "operation", "SettingsOperation", "OpenPluginRegistry", "handler", "Operation", "invoke", "LayoutOperation", "SwitchWorkspace", "subject", "REGISTRY_ID"]
|
|
7
|
-
}
|
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
REGISTRY_KEY,
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-VOAOTNGS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
7
|
-
import * as Effect2 from "effect/Effect";
|
|
8
|
-
import React5, { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
9
|
-
import { Capabilities, Capability, Plugin } from "@dxos/app-framework";
|
|
10
|
-
import { Surface, usePluginManager as usePluginManager2 } from "@dxos/app-framework/ui";
|
|
11
|
-
import { runAndForwardErrors as runAndForwardErrors2 } from "@dxos/effect";
|
|
12
|
-
|
|
13
|
-
// src/components/PluginDetail.tsx
|
|
14
|
-
import React from "react";
|
|
15
|
-
import { Icon, Input, Link, useTranslation } from "@dxos/react-ui";
|
|
16
|
-
import { ScrollArea } from "@dxos/react-ui";
|
|
17
|
-
import { getStyles, mx } from "@dxos/ui-theme";
|
|
18
|
-
var PluginDetail = ({ plugin, enabled, onEnabledChange }) => {
|
|
19
|
-
const { t } = useTranslation(meta.id);
|
|
20
|
-
const { id, name, description, homePage, source, screenshots, icon = "ph--circle--regular", iconHue = "neutral" } = plugin.meta;
|
|
21
|
-
const styles = getStyles(iconHue);
|
|
22
|
-
return /* @__PURE__ */ React.createElement(ScrollArea.Root, {
|
|
23
|
-
orientation: "vertical"
|
|
24
|
-
}, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement("div", {
|
|
25
|
-
role: "none",
|
|
26
|
-
className: "grid grid-cols-[min-content_1fr] gap-4 container-max-width p-4"
|
|
27
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
28
|
-
role: "none"
|
|
29
|
-
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
30
|
-
classNames: mx("p-1 rounded", styles.bg, styles.icon),
|
|
31
|
-
icon,
|
|
32
|
-
size: 14
|
|
33
|
-
})), /* @__PURE__ */ React.createElement("div", {
|
|
34
|
-
role: "none",
|
|
35
|
-
className: "flex flex-col gap-6"
|
|
36
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
37
|
-
role: "none",
|
|
38
|
-
className: "grid grid-cols-[1fr_min-content] gap-x-3 is-full pbs-1"
|
|
39
|
-
}, /* @__PURE__ */ React.createElement("h2", {
|
|
40
|
-
className: "text-xl"
|
|
41
|
-
}, name), /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
42
|
-
classNames: "self-center",
|
|
43
|
-
checked: enabled,
|
|
44
|
-
onCheckedChange: onEnabledChange
|
|
45
|
-
})), /* @__PURE__ */ React.createElement("p", {
|
|
46
|
-
className: "pbs-0.5 text-sm text-description"
|
|
47
|
-
}, id)), /* @__PURE__ */ React.createElement("div", {
|
|
48
|
-
role: "none"
|
|
49
|
-
}, /* @__PURE__ */ React.createElement("p", {
|
|
50
|
-
className: "text-description"
|
|
51
|
-
}, description)), screenshots && screenshots.length > 0 && /* @__PURE__ */ React.createElement("div", {
|
|
52
|
-
role: "none",
|
|
53
|
-
className: "flex flex-col gap-2"
|
|
54
|
-
}, /* @__PURE__ */ React.createElement("h2", null, "Preview"), /* @__PURE__ */ React.createElement("img", {
|
|
55
|
-
src: screenshots[0],
|
|
56
|
-
alt: name,
|
|
57
|
-
className: "aspect-video object-fit"
|
|
58
|
-
})), /* @__PURE__ */ React.createElement("div", {
|
|
59
|
-
role: "none",
|
|
60
|
-
className: "flex flex-col gap-2"
|
|
61
|
-
}, /* @__PURE__ */ React.createElement("h2", null, "Resources"), /* @__PURE__ */ React.createElement("div", {
|
|
62
|
-
className: "flex gap-2"
|
|
63
|
-
}, homePage && /* @__PURE__ */ React.createElement(Link, {
|
|
64
|
-
href: homePage,
|
|
65
|
-
target: "_blank",
|
|
66
|
-
rel: "noreferrer",
|
|
67
|
-
classNames: "text-sm text-description"
|
|
68
|
-
}, t("home page label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
69
|
-
icon: "ph--arrow-square-out--bold",
|
|
70
|
-
size: 3,
|
|
71
|
-
classNames: "inline-block leading-none mli-1"
|
|
72
|
-
})), source && /* @__PURE__ */ React.createElement(Link, {
|
|
73
|
-
href: source,
|
|
74
|
-
target: "_blank",
|
|
75
|
-
rel: "noreferrer",
|
|
76
|
-
classNames: "text-sm text-description"
|
|
77
|
-
}, t("source label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
78
|
-
icon: "ph--arrow-square-out--bold",
|
|
79
|
-
size: 3,
|
|
80
|
-
classNames: "inline-block leading-none mli-1"
|
|
81
|
-
}))))))));
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// src/components/PluginList.tsx
|
|
85
|
-
import React3 from "react";
|
|
86
|
-
import { List } from "@dxos/react-ui";
|
|
87
|
-
|
|
88
|
-
// src/components/PluginItem.tsx
|
|
89
|
-
import React2, { useCallback } from "react";
|
|
90
|
-
import { Icon as Icon2, IconButton, Input as Input2, Link as Link2, ListItem, Tag, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
91
|
-
import { descriptionText, mx as mx2 } from "@dxos/ui-theme";
|
|
92
|
-
import { getStyles as getStyles2 } from "@dxos/ui-theme";
|
|
93
|
-
var PluginItem = ({ plugin, enabled = [], onClick, onChange, hasSettings: hasSettingsProp, onSettings }) => {
|
|
94
|
-
const { t } = useTranslation2(meta.id);
|
|
95
|
-
const { id, name, description, tags, icon = "ph--circle--regular", iconHue = "neutral" } = plugin.meta;
|
|
96
|
-
const isEnabled = enabled.includes(id);
|
|
97
|
-
const inputId = `${id}-input`;
|
|
98
|
-
const labelId = `${id}-label`;
|
|
99
|
-
const descriptionId = `${id}-description`;
|
|
100
|
-
const handleClick = useCallback(() => onClick?.(id), [
|
|
101
|
-
id,
|
|
102
|
-
onClick
|
|
103
|
-
]);
|
|
104
|
-
const handleChange = useCallback((event) => {
|
|
105
|
-
event.stopPropagation();
|
|
106
|
-
onChange?.(id, !isEnabled);
|
|
107
|
-
}, [
|
|
108
|
-
id,
|
|
109
|
-
isEnabled,
|
|
110
|
-
onChange
|
|
111
|
-
]);
|
|
112
|
-
const hasSettings = hasSettingsProp?.(id) ?? false;
|
|
113
|
-
const handleSettings = useCallback(() => onSettings?.(id), [
|
|
114
|
-
id,
|
|
115
|
-
onSettings
|
|
116
|
-
]);
|
|
117
|
-
const styles = getStyles2(iconHue);
|
|
118
|
-
const gridCols = "grid grid-cols-[5rem_1fr]";
|
|
119
|
-
const gridRows = "grid grid-rows-[40px_1fr_min-content_40px]";
|
|
120
|
-
return /* @__PURE__ */ React2.createElement(ListItem.Root, {
|
|
121
|
-
key: id,
|
|
122
|
-
labelId,
|
|
123
|
-
"data-testid": `pluginList.${id}`,
|
|
124
|
-
"aria-describedby": descriptionId,
|
|
125
|
-
classNames: mx2(gridCols, "bs-[12rem] is-full gap-3 pie-2 border border-separator rounded-md overflow-hidden")
|
|
126
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
127
|
-
className: mx2(gridRows, "justify-center rounded-l-md", styles.bg)
|
|
128
|
-
}, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement(Icon2, {
|
|
129
|
-
classNames: mx2("cursor-pointer", styles.icon),
|
|
130
|
-
icon,
|
|
131
|
-
size: 14,
|
|
132
|
-
onClick: handleClick
|
|
133
|
-
})), /* @__PURE__ */ React2.createElement("div", {
|
|
134
|
-
className: mx2(gridRows)
|
|
135
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
136
|
-
className: "flex items-center overflow-hidden cursor-pointer",
|
|
137
|
-
onClick: handleClick
|
|
138
|
-
}, /* @__PURE__ */ React2.createElement("span", {
|
|
139
|
-
className: "text-lg truncate"
|
|
140
|
-
}, name ?? id)), /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("p", {
|
|
141
|
-
className: mx2(descriptionText, "line-clamp-4 min-is-0")
|
|
142
|
-
}, description)), /* @__PURE__ */ React2.createElement("div", {
|
|
143
|
-
className: "flex -mis-0.5 overflow-x-auto scrollbar-none"
|
|
144
|
-
}, tags?.map((tag) => /* @__PURE__ */ React2.createElement(Tag, {
|
|
145
|
-
key: tag,
|
|
146
|
-
palette: tagColors[tag],
|
|
147
|
-
classNames: "text-xs uppercase font-thin"
|
|
148
|
-
}, tag))), /* @__PURE__ */ React2.createElement("div", {
|
|
149
|
-
className: "flex gap-2 items-center text-sm"
|
|
150
|
-
}, /* @__PURE__ */ React2.createElement(IconButton, {
|
|
151
|
-
"aria-describedby": descriptionId,
|
|
152
|
-
classNames: "cursor-pointer",
|
|
153
|
-
icon: "ph--gear--regular",
|
|
154
|
-
label: t("settings label"),
|
|
155
|
-
iconOnly: true,
|
|
156
|
-
size: 4,
|
|
157
|
-
onClick: handleSettings,
|
|
158
|
-
disabled: !hasSettings
|
|
159
|
-
}), /* @__PURE__ */ React2.createElement(Link2, {
|
|
160
|
-
"aria-describedby": descriptionId,
|
|
161
|
-
classNames: "text-description cursor-pointer",
|
|
162
|
-
onClick: handleClick
|
|
163
|
-
}, t("details label")), /* @__PURE__ */ React2.createElement("div", {
|
|
164
|
-
className: "grow"
|
|
165
|
-
}), /* @__PURE__ */ React2.createElement("div", {
|
|
166
|
-
className: "pie-1"
|
|
167
|
-
}, /* @__PURE__ */ React2.createElement(Input2.Root, {
|
|
168
|
-
id: inputId
|
|
169
|
-
}, /* @__PURE__ */ React2.createElement(Input2.Switch, {
|
|
170
|
-
classNames: "self-center",
|
|
171
|
-
checked: isEnabled,
|
|
172
|
-
onClick: handleChange
|
|
173
|
-
}))))));
|
|
174
|
-
};
|
|
175
|
-
var tagColors = {
|
|
176
|
-
new: "rose",
|
|
177
|
-
beta: "teal",
|
|
178
|
-
labs: "blue",
|
|
179
|
-
popular: "green",
|
|
180
|
-
featured: "pink",
|
|
181
|
-
experimental: "amber"
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
// src/components/PluginList.tsx
|
|
185
|
-
var PluginList = ({ plugins = [], ...props }) => {
|
|
186
|
-
return /* @__PURE__ */ React3.createElement(List, {
|
|
187
|
-
classNames: "grid grid-cols-[repeat(auto-fill,minmax(18rem,1fr))] auto-rows-[max-content] gap-4 p-4"
|
|
188
|
-
}, plugins.map((plugin) => /* @__PURE__ */ React3.createElement(PluginItem, {
|
|
189
|
-
key: plugin.meta.id,
|
|
190
|
-
plugin,
|
|
191
|
-
...props
|
|
192
|
-
})));
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// src/components/RegistryContainer.tsx
|
|
196
|
-
import { useAtomValue } from "@effect-atom/atom-react";
|
|
197
|
-
import * as Effect from "effect/Effect";
|
|
198
|
-
import React4, { useCallback as useCallback2, useMemo } from "react";
|
|
199
|
-
import { useCapabilities, useOperationInvoker, usePluginManager } from "@dxos/app-framework/ui";
|
|
200
|
-
import { AppCapabilities, LayoutOperation, SettingsOperation } from "@dxos/app-toolkit";
|
|
201
|
-
import { runAndForwardErrors } from "@dxos/effect";
|
|
202
|
-
import { ObservabilityOperation } from "@dxos/plugin-observability/types";
|
|
203
|
-
import { ScrollArea as ScrollArea2 } from "@dxos/react-ui";
|
|
204
|
-
var sortByPluginMeta = ({ meta: { name: a = "" } }, { meta: { name: b = "" } }) => a.localeCompare(b);
|
|
205
|
-
var RegistryContainer = ({ id, plugins: pluginsProp }) => {
|
|
206
|
-
const manager = usePluginManager();
|
|
207
|
-
const { invoke, invokePromise } = useOperationInvoker();
|
|
208
|
-
const plugins = useMemo(() => pluginsProp.sort(sortByPluginMeta), [
|
|
209
|
-
pluginsProp
|
|
210
|
-
]);
|
|
211
|
-
const enabled = useAtomValue(manager.enabled);
|
|
212
|
-
const allSettings = useCapabilities(AppCapabilities.Settings);
|
|
213
|
-
const handleChange = useCallback2((id2, enabled2) => Effect.gen(function* () {
|
|
214
|
-
if (enabled2) {
|
|
215
|
-
yield* manager.enable(id2);
|
|
216
|
-
} else {
|
|
217
|
-
yield* manager.disable(id2);
|
|
218
|
-
}
|
|
219
|
-
yield* invoke(ObservabilityOperation.SendEvent, {
|
|
220
|
-
name: "plugins.toggle",
|
|
221
|
-
properties: {
|
|
222
|
-
plugin: id2,
|
|
223
|
-
enabled: enabled2
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
}).pipe(runAndForwardErrors), [
|
|
227
|
-
invoke,
|
|
228
|
-
manager
|
|
229
|
-
]);
|
|
230
|
-
const handleClick = useCallback2((pluginId) => invokePromise(LayoutOperation.Open, {
|
|
231
|
-
// TODO(wittjosiah): `/` currently is not supported in ids.
|
|
232
|
-
subject: [
|
|
233
|
-
pluginId.replaceAll("/", ":")
|
|
234
|
-
],
|
|
235
|
-
pivotId: id,
|
|
236
|
-
positioning: "end"
|
|
237
|
-
}), [
|
|
238
|
-
invokePromise,
|
|
239
|
-
id
|
|
240
|
-
]);
|
|
241
|
-
const hasSettings = useCallback2((pluginId) => allSettings.some((s) => s.prefix === pluginId), [
|
|
242
|
-
allSettings
|
|
243
|
-
]);
|
|
244
|
-
const handleSettings = useCallback2((pluginId) => invokePromise(SettingsOperation.Open, {
|
|
245
|
-
plugin: pluginId
|
|
246
|
-
}), [
|
|
247
|
-
invokePromise
|
|
248
|
-
]);
|
|
249
|
-
return /* @__PURE__ */ React4.createElement(ScrollArea2.Root, {
|
|
250
|
-
orientation: "vertical"
|
|
251
|
-
}, /* @__PURE__ */ React4.createElement(ScrollArea2.Viewport, null, /* @__PURE__ */ React4.createElement(PluginList, {
|
|
252
|
-
plugins,
|
|
253
|
-
enabled,
|
|
254
|
-
onClick: handleClick,
|
|
255
|
-
onChange: handleChange,
|
|
256
|
-
hasSettings,
|
|
257
|
-
onSettings: handleSettings
|
|
258
|
-
})));
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
262
|
-
var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capability.contributes(Capabilities.ReactSurface, [
|
|
263
|
-
Surface.create({
|
|
264
|
-
id: `${meta.id}/all`,
|
|
265
|
-
role: "article",
|
|
266
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+all`,
|
|
267
|
-
component: () => {
|
|
268
|
-
const manager = usePluginManager2();
|
|
269
|
-
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => !manager.getCore().includes(meta2.id)), []);
|
|
270
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
271
|
-
id: `${REGISTRY_KEY}+all`,
|
|
272
|
-
plugins: filtered
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
}),
|
|
276
|
-
Surface.create({
|
|
277
|
-
id: `${meta.id}/installed`,
|
|
278
|
-
role: "article",
|
|
279
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+installed`,
|
|
280
|
-
component: () => {
|
|
281
|
-
const manager = usePluginManager2();
|
|
282
|
-
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => !manager.getCore().includes(meta2.id)).filter(({ meta: meta2 }) => manager.getEnabled().includes(meta2.id)), []);
|
|
283
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
284
|
-
id: `${REGISTRY_KEY}+installed`,
|
|
285
|
-
plugins: filtered
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
}),
|
|
289
|
-
Surface.create({
|
|
290
|
-
id: `${meta.id}/recommended`,
|
|
291
|
-
role: "article",
|
|
292
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+recommended`,
|
|
293
|
-
component: () => {
|
|
294
|
-
const manager = usePluginManager2();
|
|
295
|
-
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => !manager.getCore().includes(meta2.id)).filter(({ meta: meta2 }) => !meta2.tags?.includes("labs")), []);
|
|
296
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
297
|
-
id: `${REGISTRY_KEY}+recommended`,
|
|
298
|
-
plugins: filtered
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}),
|
|
302
|
-
Surface.create({
|
|
303
|
-
id: `${meta.id}/labs`,
|
|
304
|
-
role: "article",
|
|
305
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+labs`,
|
|
306
|
-
component: () => {
|
|
307
|
-
const manager = usePluginManager2();
|
|
308
|
-
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => meta2.tags?.includes("labs")), []);
|
|
309
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
310
|
-
id: `${REGISTRY_KEY}+labs`,
|
|
311
|
-
plugins: filtered
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
}),
|
|
315
|
-
Surface.create({
|
|
316
|
-
id: `${meta.id}/plugin-details`,
|
|
317
|
-
role: "article",
|
|
318
|
-
filter: (data) => Plugin.isPlugin(data.subject),
|
|
319
|
-
component: ({ data: { subject } }) => {
|
|
320
|
-
const manager = usePluginManager2();
|
|
321
|
-
const enabled = manager.getEnabled().includes(subject.meta.id);
|
|
322
|
-
const handleEnableChange = useCallback3((enabled2) => enabled2 ? runAndForwardErrors2(manager.enable(subject.meta.id)) : runAndForwardErrors2(manager.disable(subject.meta.id)), [
|
|
323
|
-
manager,
|
|
324
|
-
subject.meta.id
|
|
325
|
-
]);
|
|
326
|
-
return /* @__PURE__ */ React5.createElement(PluginDetail, {
|
|
327
|
-
plugin: subject,
|
|
328
|
-
enabled,
|
|
329
|
-
onEnabledChange: handleEnableChange
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
})
|
|
333
|
-
])));
|
|
334
|
-
export {
|
|
335
|
-
react_surface_default as default
|
|
336
|
-
};
|
|
337
|
-
//# sourceMappingURL=react-surface-IEGOKKMX.mjs.map
|