@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/capabilities/react-surface/react-surface.tsx", "../../../src/components/PluginDetail.tsx", "../../../src/components/PluginList.tsx", "../../../src/components/PluginItem.tsx", "../../../src/components/RegistryContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { Surface, usePluginManager } from '@dxos/app-framework/ui';\nimport { runAndForwardErrors } from '@dxos/effect';\n\nimport { PluginDetail, RegistryContainer } from '../../components';\nimport { REGISTRY_KEY, meta } from '../../meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: `${meta.id}/all`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+all`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () => manager.getPlugins().filter(({ meta }) => !manager.getCore().includes(meta.id)),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+all`} plugins={filtered} />;\n },\n }),\n Surface.create({\n id: `${meta.id}/installed`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+installed`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager\n .getPlugins()\n .filter(({ meta }) => !manager.getCore().includes(meta.id))\n .filter(({ meta }) => manager.getEnabled().includes(meta.id)),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+installed`} plugins={filtered} />;\n },\n }),\n Surface.create({\n id: `${meta.id}/recommended`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+recommended`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager\n .getPlugins()\n .filter(({ meta }) => !manager.getCore().includes(meta.id))\n .filter(({ meta }) => !meta.tags?.includes('labs')),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+recommended`} plugins={filtered} />;\n },\n }),\n Surface.create({\n id: `${meta.id}/labs`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+labs`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(() => manager.getPlugins().filter(({ meta }) => meta.tags?.includes('labs')), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}+labs`} plugins={filtered} />;\n },\n }),\n Surface.create({\n id: `${meta.id}/plugin-details`,\n role: 'article',\n filter: (data): data is { subject: Plugin.Plugin } => Plugin.isPlugin(data.subject),\n component: ({ data: { subject } }) => {\n const manager = usePluginManager();\n const enabled = manager.getEnabled().includes(subject.meta.id);\n const handleEnableChange = useCallback(\n (enabled: boolean) =>\n enabled\n ? runAndForwardErrors(manager.enable(subject.meta.id))\n : runAndForwardErrors(manager.disable(subject.meta.id)),\n [manager, subject.meta.id],\n );\n\n return <PluginDetail plugin={subject} enabled={enabled} onEnabledChange={handleEnableChange} />;\n },\n }),\n ]),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { Icon, Input, Link, useTranslation } from '@dxos/react-ui';\nimport { ScrollArea } from '@dxos/react-ui';\nimport { getStyles, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\n\nexport type PluginDetailProps = {\n plugin: Plugin.Plugin;\n enabled?: boolean;\n onEnabledChange?: (enabled: boolean) => void;\n};\n\nexport const PluginDetail = ({ plugin, enabled, onEnabledChange }: PluginDetailProps) => {\n const { t } = useTranslation(meta.id);\n const {\n id,\n name,\n description,\n homePage,\n source,\n screenshots,\n icon = 'ph--circle--regular',\n iconHue = 'neutral',\n } = plugin.meta;\n const styles = getStyles(iconHue);\n\n return (\n <ScrollArea.Root orientation='vertical'>\n <ScrollArea.Viewport>\n <div role='none' className='grid grid-cols-[min-content_1fr] gap-4 container-max-width p-4'>\n <div role='none'>\n <Icon classNames={mx('p-1 rounded', styles.bg, styles.icon)} icon={icon} size={14} />\n </div>\n <div role='none' className='flex flex-col gap-6'>\n <div role='none' className='grid grid-cols-[1fr_min-content] gap-x-3 is-full pbs-1'>\n <h2 className='text-xl'>{name}</h2>\n <Input.Root>\n <Input.Switch classNames='self-center' checked={enabled} onCheckedChange={onEnabledChange} />\n </Input.Root>\n <p className='pbs-0.5 text-sm text-description'>{id}</p>\n </div>\n <div role='none'>\n <p className='text-description'>{description}</p>\n </div>\n {screenshots && screenshots.length > 0 && (\n <div role='none' className='flex flex-col gap-2'>\n <h2>Preview</h2>\n <img src={screenshots[0]} alt={name} className='aspect-video object-fit' />\n </div>\n )}\n <div role='none' className='flex flex-col gap-2'>\n <h2>Resources</h2>\n <div className='flex gap-2'>\n {homePage && (\n <Link href={homePage} target='_blank' rel='noreferrer' classNames='text-sm text-description'>\n {t('home page label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n\n {source && (\n <Link href={source} target='_blank' rel='noreferrer' classNames='text-sm text-description'>\n {t('source label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n </div>\n </div>\n </div>\n </div>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { List } from '@dxos/react-ui';\n\nimport { PluginItem, type PluginItemProps } from './PluginItem';\n\nexport type PluginListProps = Omit<PluginItemProps, 'plugin'> & {\n plugins?: readonly Plugin.Plugin[];\n};\n\nexport const PluginList = ({ plugins = [], ...props }: PluginListProps) => {\n return (\n <List classNames='grid grid-cols-[repeat(auto-fill,minmax(18rem,1fr))] auto-rows-[max-content] gap-4 p-4'>\n {plugins.map((plugin) => (\n <PluginItem key={plugin.meta.id} plugin={plugin} {...props} />\n ))}\n </List>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type MouseEvent, useCallback } from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { type ChromaticPalette, Icon, IconButton, Input, Link, ListItem, Tag, useTranslation } from '@dxos/react-ui';\nimport { descriptionText, mx } from '@dxos/ui-theme';\nimport { getStyles } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\nimport { type RegistryTagType } from '../types';\n\nexport type PluginItemProps = {\n plugin: Plugin.Plugin;\n installed?: readonly string[];\n enabled?: readonly string[];\n onClick?: (id: string) => void;\n onChange?: (id: string, enabled: boolean) => void;\n hasSettings?: (id: string) => boolean;\n onSettings?: (id: string) => void;\n};\n\nexport const PluginItem = ({\n plugin,\n enabled = [],\n onClick,\n onChange,\n hasSettings: hasSettingsProp,\n onSettings,\n}: PluginItemProps) => {\n const { t } = useTranslation(meta.id);\n const { id, name, description, tags, icon = 'ph--circle--regular', iconHue = 'neutral' } = plugin.meta;\n const isEnabled = enabled.includes(id);\n const inputId = `${id}-input`;\n const labelId = `${id}-label`;\n const descriptionId = `${id}-description`;\n const handleClick = useCallback(() => onClick?.(id), [id, onClick]);\n\n const handleChange = useCallback(\n (event: MouseEvent) => {\n event.stopPropagation();\n onChange?.(id, !isEnabled);\n },\n [id, isEnabled, onChange],\n );\n\n const hasSettings = hasSettingsProp?.(id) ?? false;\n const handleSettings = useCallback(() => onSettings?.(id), [id, onSettings]);\n const styles = getStyles(iconHue);\n const gridCols = 'grid grid-cols-[5rem_1fr]';\n const gridRows = 'grid grid-rows-[40px_1fr_min-content_40px]';\n\n return (\n <ListItem.Root\n key={id}\n labelId={labelId}\n data-testid={`pluginList.${id}`}\n aria-describedby={descriptionId}\n classNames={mx(gridCols, 'bs-[12rem] is-full gap-3 pie-2 border border-separator rounded-md overflow-hidden')}\n >\n <div className={mx(gridRows, 'justify-center rounded-l-md', styles.bg)}>\n <div />\n <Icon classNames={mx('cursor-pointer', styles.icon)} icon={icon} size={14} onClick={handleClick} />\n </div>\n\n <div className={mx(gridRows)}>\n <div className='flex items-center overflow-hidden cursor-pointer' onClick={handleClick}>\n <span className='text-lg truncate'>{name ?? id}</span>\n </div>\n\n <div>\n <p className={mx(descriptionText, 'line-clamp-4 min-is-0')}>{description}</p>\n </div>\n\n <div className='flex -mis-0.5 overflow-x-auto scrollbar-none'>\n {tags?.map((tag) => (\n <Tag key={tag} palette={tagColors[tag as RegistryTagType]} classNames='text-xs uppercase font-thin'>\n {tag}\n </Tag>\n ))}\n </div>\n\n <div className='flex gap-2 items-center text-sm'>\n <IconButton\n aria-describedby={descriptionId}\n classNames='cursor-pointer'\n icon='ph--gear--regular'\n label={t('settings label')}\n iconOnly\n size={4}\n onClick={handleSettings}\n disabled={!hasSettings}\n />\n\n <Link aria-describedby={descriptionId} classNames='text-description cursor-pointer' onClick={handleClick}>\n {t('details label')}\n </Link>\n\n <div className='grow' />\n <div className='pie-1'>\n <Input.Root id={inputId}>\n <Input.Switch classNames='self-center' checked={isEnabled} onClick={handleChange} />\n </Input.Root>\n </div>\n </div>\n </div>\n </ListItem.Root>\n );\n};\n\nconst tagColors: Record<RegistryTagType, ChromaticPalette> = {\n new: 'rose',\n beta: 'teal',\n labs: 'blue',\n popular: 'green',\n featured: 'pink',\n experimental: 'amber',\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { useCapabilities, useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';\nimport { AppCapabilities, LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/types';\nimport { ScrollArea } from '@dxos/react-ui';\n\nimport { PluginList } from './PluginList';\n\nconst sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin.Plugin, { meta: { name: b = '' } }: Plugin.Plugin) =>\n a.localeCompare(b);\n\nexport type RegistryContainerProps = {\n id: string;\n plugins: Plugin.Plugin[];\n};\n\nexport const RegistryContainer = ({ id, plugins: pluginsProp }: RegistryContainerProps) => {\n const manager = usePluginManager();\n const { invoke, invokePromise } = useOperationInvoker();\n const plugins = useMemo(() => pluginsProp.sort(sortByPluginMeta), [pluginsProp]);\n const enabled = useAtomValue(manager.enabled);\n const allSettings = useCapabilities(AppCapabilities.Settings);\n\n // TODO(wittjosiah): Factor out to an intent?\n const handleChange = useCallback(\n (id: string, enabled: boolean) =>\n Effect.gen(function* () {\n if (enabled) {\n yield* manager.enable(id);\n } else {\n yield* manager.disable(id);\n }\n\n yield* invoke(ObservabilityOperation.SendEvent, {\n name: 'plugins.toggle',\n properties: {\n plugin: id,\n enabled,\n },\n });\n }).pipe(runAndForwardErrors),\n [invoke, manager],\n );\n\n const handleClick = useCallback(\n (pluginId: string) =>\n invokePromise(LayoutOperation.Open, {\n // TODO(wittjosiah): `/` currently is not supported in ids.\n subject: [pluginId.replaceAll('/', ':')],\n pivotId: id,\n positioning: 'end',\n }),\n [invokePromise, id],\n );\n\n const hasSettings = useCallback((pluginId: string) => allSettings.some((s) => s.prefix === pluginId), [allSettings]);\n\n const handleSettings = useCallback(\n (pluginId: string) => invokePromise(SettingsOperation.Open, { plugin: pluginId }),\n [invokePromise],\n );\n\n return (\n <ScrollArea.Root orientation='vertical'>\n <ScrollArea.Viewport>\n <PluginList\n plugins={plugins}\n enabled={enabled}\n onClick={handleClick}\n onChange={handleChange}\n hasSettings={hasSettings}\n onSettings={handleSettings}\n />\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,aAAY;AACxB,OAAOC,UAASC,eAAAA,cAAaC,WAAAA,gBAAe;AAE5C,SAASC,cAAcC,YAAYC,cAAc;AACjD,SAASC,SAASC,oBAAAA,yBAAwB;AAC1C,SAASC,uBAAAA,4BAA2B;;;ACLpC,OAAOC,WAAW;AAGlB,SAASC,MAAMC,OAAOC,MAAMC,sBAAsB;AAClD,SAASC,kBAAkB;AAC3B,SAASC,WAAWC,UAAU;AAUvB,IAAMC,eAAe,CAAC,EAAEC,QAAQC,SAASC,gBAAe,MAAqB;AAClF,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,QAAM,EACJA,IACAC,MACAC,aACAC,UACAC,QACAC,aACAC,OAAO,uBACPC,UAAU,UAAS,IACjBb,OAAOK;AACX,QAAMS,SAASC,UAAUF,OAAAA;AAEzB,SACE,sBAAA,cAACG,WAAWC,MAAI;IAACC,aAAY;KAC3B,sBAAA,cAACF,WAAWG,UAAQ,MAClB,sBAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,sBAAA,cAACF,OAAAA;IAAIC,MAAK;KACR,sBAAA,cAACE,MAAAA;IAAKC,YAAYC,GAAG,eAAeX,OAAOY,IAAIZ,OAAOF,IAAI;IAAG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C,WAAW,MAAA;AACT,YAAMC,UAAUC,kBAAAA;AAChB,YAAMC,WAAWC,SAAQ,MAAMH,QAAQI,WAAU,EAAGT,OAAO,CAAC,EAAEF,MAAAA,MAAI,MAAOA,MAAKkB,MAAML,SAAS,MAAA,CAAA,GAAU,CAAA,CAAE;AAEzG,aAAO,gBAAAC,OAAA,cAACC,mBAAAA;QAAkBhB,IAAI,GAAGM,YAAAA;QAAqBW,SAASP;;IACjE;EACF,CAAA;EACAZ,QAAQC,OAAO;IACbC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,SAA6CgB,OAAOC,SAASjB,KAAKC,OAAO;IAClFE,WAAW,CAAC,EAAEH,MAAM,EAAEC,QAAO,EAAE,MAAE;AAC/B,YAAMG,UAAUC,kBAAAA;AAChB,YAAMa,UAAUd,QAAQU,WAAU,EAAGJ,SAAST,QAAQJ,KAAKD,EAAE;AAC7D,YAAMuB,qBAAqBC,aACzB,CAACF,aACCA,WACIG,qBAAoBjB,QAAQkB,OAAOrB,QAAQJ,KAAKD,EAAE,CAAA,IAClDyB,qBAAoBjB,QAAQmB,QAAQtB,QAAQJ,KAAKD,EAAE,CAAA,GACzD;QAACQ;QAASH,QAAQJ,KAAKD;OAAG;AAG5B,aAAO,gBAAAe,OAAA,cAACa,cAAAA;QAAaC,QAAQxB;QAASiB;QAAkBQ,iBAAiBP;;IAC3E;EACF,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "useCallback", "useMemo", "Capabilities", "Capability", "Plugin", "Surface", "usePluginManager", "runAndForwardErrors", "React", "Icon", "Input", "Link", "useTranslation", "ScrollArea", "getStyles", "mx", "PluginDetail", "plugin", "enabled", "onEnabledChange", "t", "useTranslation", "meta", "id", "name", "description", "homePage", "source", "screenshots", "icon", "iconHue", "styles", "getStyles", "ScrollArea", "Root", "orientation", "Viewport", "div", "role", "className", "Icon", "classNames", "mx", "bg", "size", "h2", "Input", "Switch", "checked", "onCheckedChange", "p", "length", "img", "src", "alt", "Link", "href", "target", "rel", "React", "List", "React", "useCallback", "Icon", "IconButton", "Input", "Link", "ListItem", "Tag", "useTranslation", "descriptionText", "mx", "getStyles", "PluginItem", "plugin", "enabled", "onClick", "onChange", "hasSettings", "hasSettingsProp", "onSettings", "t", "useTranslation", "meta", "id", "name", "description", "tags", "icon", "iconHue", "isEnabled", "includes", "inputId", "labelId", "descriptionId", "handleClick", "useCallback", "handleChange", "event", "stopPropagation", "handleSettings", "styles", "getStyles", "gridCols", "gridRows", "React", "ListItem", "Root", "key", "data-testid", "aria-describedby", "classNames", "mx", "div", "className", "bg", "Icon", "size", "span", "p", "descriptionText", "map", "tag", "Tag", "palette", "tagColors", "IconButton", "label", "iconOnly", "disabled", "Link", "Input", "Switch", "checked", "new", "beta", "labs", "popular", "featured", "experimental", "PluginList", "plugins", "props", "React", "List", "classNames", "map", "plugin", "PluginItem", "key", "meta", "id", "useAtomValue", "Effect", "React", "useCallback", "useMemo", "useCapabilities", "useOperationInvoker", "usePluginManager", "AppCapabilities", "LayoutOperation", "SettingsOperation", "runAndForwardErrors", "ObservabilityOperation", "ScrollArea", "sortByPluginMeta", "meta", "name", "a", "b", "localeCompare", "RegistryContainer", "id", "plugins", "pluginsProp", "manager", "usePluginManager", "invoke", "invokePromise", "useOperationInvoker", "useMemo", "sort", "enabled", "useAtomValue", "allSettings", "useCapabilities", "AppCapabilities", "Settings", "handleChange", "useCallback", "gen", "enable", "disable", "ObservabilityOperation", "SendEvent", "properties", "plugin", "pipe", "runAndForwardErrors", "handleClick", "pluginId", "LayoutOperation", "Open", "subject", "replaceAll", "pivotId", "positioning", "hasSettings", "some", "s", "prefix", "handleSettings", "SettingsOperation", "React", "ScrollArea", "Root", "orientation", "Viewport", "PluginList", "onClick", "onChange", "onSettings", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "filter", "data", "subject", "REGISTRY_KEY", "component", "manager", "usePluginManager", "filtered", "useMemo", "getPlugins", "getCore", "includes", "React", "RegistryContainer", "plugins", "getEnabled", "tags", "Plugin", "isPlugin", "enabled", "handleEnableChange", "useCallback", "runAndForwardErrors", "enable", "disable", "PluginDetail", "plugin", "onEnabledChange"]
|
|
7
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
REGISTRY_ID,
|
|
4
|
-
REGISTRY_KEY,
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-SALMIZ2W.mjs";
|
|
7
|
-
|
|
8
|
-
// src/capabilities/app-graph-builder/app-graph-builder.ts
|
|
9
|
-
import * as Effect from "effect/Effect";
|
|
10
|
-
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
11
|
-
import { AppCapabilities, SettingsOperation } from "@dxos/app-toolkit";
|
|
12
|
-
import { Operation } from "@dxos/operation";
|
|
13
|
-
import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
|
|
14
|
-
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
15
|
-
const capabilities = yield* Capability.Service;
|
|
16
|
-
const extensions = yield* Effect.all([
|
|
17
|
-
GraphBuilder.createExtension({
|
|
18
|
-
id: meta.id,
|
|
19
|
-
match: NodeMatcher.whenRoot,
|
|
20
|
-
actions: () => Effect.succeed([
|
|
21
|
-
{
|
|
22
|
-
id: meta.id,
|
|
23
|
-
data: () => Operation.invoke(SettingsOperation.OpenPluginRegistry),
|
|
24
|
-
properties: {
|
|
25
|
-
label: [
|
|
26
|
-
"open plugin registry label",
|
|
27
|
-
{
|
|
28
|
-
ns: meta.id
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
icon: "ph--squares-four--regular",
|
|
32
|
-
disposition: "menu"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
])
|
|
36
|
-
}),
|
|
37
|
-
GraphBuilder.createExtension({
|
|
38
|
-
id: meta.id,
|
|
39
|
-
match: NodeMatcher.whenRoot,
|
|
40
|
-
connector: () => Effect.succeed([
|
|
41
|
-
{
|
|
42
|
-
id: REGISTRY_ID,
|
|
43
|
-
type: meta.id,
|
|
44
|
-
properties: {
|
|
45
|
-
label: [
|
|
46
|
-
"plugin registry label",
|
|
47
|
-
{
|
|
48
|
-
ns: meta.id
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
icon: "ph--squares-four--regular",
|
|
52
|
-
disposition: "pin-end",
|
|
53
|
-
testId: "treeView.pluginRegistry"
|
|
54
|
-
},
|
|
55
|
-
nodes: [
|
|
56
|
-
{
|
|
57
|
-
id: `${REGISTRY_KEY}+all`,
|
|
58
|
-
type: "category",
|
|
59
|
-
data: `${REGISTRY_KEY}+all`,
|
|
60
|
-
properties: {
|
|
61
|
-
label: [
|
|
62
|
-
"all plugins label",
|
|
63
|
-
{
|
|
64
|
-
ns: meta.id
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
icon: "ph--squares-four--regular",
|
|
68
|
-
key: REGISTRY_KEY,
|
|
69
|
-
testId: "pluginRegistry.all"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: `${REGISTRY_KEY}+installed`,
|
|
74
|
-
type: "category",
|
|
75
|
-
data: `${REGISTRY_KEY}+installed`,
|
|
76
|
-
properties: {
|
|
77
|
-
label: [
|
|
78
|
-
"installed plugins label",
|
|
79
|
-
{
|
|
80
|
-
ns: meta.id
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
icon: "ph--check--regular",
|
|
84
|
-
key: REGISTRY_KEY,
|
|
85
|
-
testId: "pluginRegistry.installed"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
id: `${REGISTRY_KEY}+recommended`,
|
|
90
|
-
type: "category",
|
|
91
|
-
data: `${REGISTRY_KEY}+recommended`,
|
|
92
|
-
properties: {
|
|
93
|
-
label: [
|
|
94
|
-
"recommended plugins label",
|
|
95
|
-
{
|
|
96
|
-
ns: meta.id
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
icon: "ph--star--regular",
|
|
100
|
-
key: REGISTRY_KEY,
|
|
101
|
-
testId: "pluginRegistry.recommended"
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: `${REGISTRY_KEY}+labs`,
|
|
106
|
-
type: "category",
|
|
107
|
-
data: `${REGISTRY_KEY}+labs`,
|
|
108
|
-
properties: {
|
|
109
|
-
label: [
|
|
110
|
-
"labs plugins label",
|
|
111
|
-
{
|
|
112
|
-
ns: meta.id
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
icon: "ph--flask--regular",
|
|
116
|
-
key: REGISTRY_KEY,
|
|
117
|
-
testId: "pluginRegistry.labs"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
])
|
|
123
|
-
}),
|
|
124
|
-
GraphBuilder.createExtension({
|
|
125
|
-
id: `${meta.id}/actions`,
|
|
126
|
-
match: NodeMatcher.whenId(REGISTRY_ID),
|
|
127
|
-
actions: () => Effect.succeed([
|
|
128
|
-
{
|
|
129
|
-
id: `${meta.id}/load-by-url`,
|
|
130
|
-
data: Effect.fnUntraced(function* () {
|
|
131
|
-
}),
|
|
132
|
-
properties: {
|
|
133
|
-
label: [
|
|
134
|
-
"load by url label",
|
|
135
|
-
{
|
|
136
|
-
ns: meta.id
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
icon: "ph--cloud-arrow-down--regular",
|
|
140
|
-
disabled: true
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
])
|
|
144
|
-
}),
|
|
145
|
-
GraphBuilder.createExtension({
|
|
146
|
-
id: `${meta.id}/plugins`,
|
|
147
|
-
match: NodeMatcher.whenId(REGISTRY_ID),
|
|
148
|
-
connector: () => {
|
|
149
|
-
const manager = capabilities.get(Capabilities.PluginManager);
|
|
150
|
-
return Effect.succeed(manager.getPlugins().map((plugin) => ({
|
|
151
|
-
id: plugin.meta.id.replaceAll("/", ":"),
|
|
152
|
-
type: "dxos.org/plugin",
|
|
153
|
-
data: plugin,
|
|
154
|
-
properties: {
|
|
155
|
-
label: plugin.meta.name ?? plugin.meta.id,
|
|
156
|
-
icon: plugin.meta.icon ?? "ph--circle--regular",
|
|
157
|
-
disposition: "hidden"
|
|
158
|
-
}
|
|
159
|
-
})));
|
|
160
|
-
}
|
|
161
|
-
})
|
|
162
|
-
]);
|
|
163
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
164
|
-
}));
|
|
165
|
-
export {
|
|
166
|
-
app_graph_builder_default as default
|
|
167
|
-
};
|
|
168
|
-
//# sourceMappingURL=app-graph-builder-WTIS5KI5.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.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 { AppCapabilities, SettingsOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\n\nimport { REGISTRY_ID, REGISTRY_KEY, meta } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: meta.id,\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n {\n id: meta.id,\n data: () => Operation.invoke(SettingsOperation.OpenPluginRegistry),\n properties: {\n label: ['open plugin registry label', { ns: meta.id }],\n icon: 'ph--squares-four--regular',\n disposition: 'menu',\n },\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: meta.id,\n match: NodeMatcher.whenRoot,\n connector: () =>\n Effect.succeed([\n {\n id: REGISTRY_ID,\n type: meta.id,\n properties: {\n label: ['plugin registry label', { ns: meta.id }],\n icon: 'ph--squares-four--regular',\n disposition: 'pin-end',\n testId: 'treeView.pluginRegistry',\n },\n nodes: [\n {\n id: `${REGISTRY_KEY}+all`,\n type: 'category',\n data: `${REGISTRY_KEY}+all`,\n properties: {\n label: ['all plugins label', { ns: meta.id }],\n icon: 'ph--squares-four--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.all',\n },\n },\n {\n id: `${REGISTRY_KEY}+installed`,\n type: 'category',\n data: `${REGISTRY_KEY}+installed`,\n properties: {\n label: ['installed plugins label', { ns: meta.id }],\n icon: 'ph--check--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.installed',\n },\n },\n {\n id: `${REGISTRY_KEY}+recommended`,\n type: 'category',\n data: `${REGISTRY_KEY}+recommended`,\n properties: {\n label: ['recommended plugins label', { ns: meta.id }],\n icon: 'ph--star--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.recommended',\n },\n },\n {\n id: `${REGISTRY_KEY}+labs`,\n type: 'category',\n data: `${REGISTRY_KEY}+labs`,\n properties: {\n label: ['labs plugins label', { ns: meta.id }],\n icon: 'ph--flask--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.labs',\n },\n },\n ],\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: `${meta.id}/actions`,\n match: NodeMatcher.whenId(REGISTRY_ID),\n actions: () =>\n Effect.succeed([\n {\n id: `${meta.id}/load-by-url`,\n data: Effect.fnUntraced(function* () {}),\n properties: {\n label: ['load by url label', { ns: meta.id }],\n icon: 'ph--cloud-arrow-down--regular',\n disabled: true,\n },\n },\n ]),\n }),\n GraphBuilder.createExtension({\n id: `${meta.id}/plugins`,\n match: NodeMatcher.whenId(REGISTRY_ID),\n connector: () => {\n const manager = capabilities.get(Capabilities.PluginManager);\n return Effect.succeed(\n manager.getPlugins().map((plugin) => ({\n id: plugin.meta.id.replaceAll('/', ':'),\n type: 'dxos.org/plugin',\n data: plugin,\n properties: {\n label: plugin.meta.name ?? plugin.meta.id,\n icon: plugin.meta.icon ?? 'ph--circle--regular',\n disposition: 'hidden',\n },\n })),\n );\n },\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,yBAAyB;AACnD,SAASC,iBAAiB;AAC1B,SAASC,cAAcC,mBAAmB;AAI1C,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAOH,WAAWI;AAEvC,QAAMC,aAAa,OAAcC,WAAI;IACnCC,aAAaC,gBAAgB;MAC3BC,IAAIC,KAAKD;MACTE,OAAOC,YAAYC;MACnBC,SAAS,MACAC,eAAQ;QACb;UACEN,IAAIC,KAAKD;UACTO,MAAM,MAAMC,UAAUC,OAAOC,kBAAkBC,kBAAkB;UACjEC,YAAY;YACVC,OAAO;cAAC;cAA8B;gBAAEC,IAAIb,KAAKD;cAAG;;YACpDe,MAAM;YACNC,aAAa;UACf;QACF;OACD;IACL,CAAA;IACAlB,aAAaC,gBAAgB;MAC3BC,IAAIC,KAAKD;MACTE,OAAOC,YAAYC;MACnBa,WAAW,MACFX,eAAQ;QACb;UACEN,IAAIkB;UACJC,MAAMlB,KAAKD;UACXY,YAAY;YACVC,OAAO;cAAC;cAAyB;gBAAEC,IAAIb,KAAKD;cAAG;;YAC/Ce,MAAM;YACNC,aAAa;YACbI,QAAQ;UACV;UACAC,OAAO;YACL;cACErB,IAAI,GAAGsB,YAAAA;cACPH,MAAM;cACNZ,MAAM,GAAGe,YAAAA;cACTV,YAAY;gBACVC,OAAO;kBAAC;kBAAqB;oBAAEC,IAAIb,KAAKD;kBAAG;;gBAC3Ce,MAAM;gBACNQ,KAAKD;gBACLF,QAAQ;cAC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A;UACnCd,MAAM;UACNZ,MAAMyB;UACNpB,YAAY;YACVC,OAAOmB,OAAO/B,KAAKiC,QAAQF,OAAO/B,KAAKD;YACvCe,MAAMiB,OAAO/B,KAAKc,QAAQ;YAC1BC,aAAa;UACf;QACF,EAAA,CAAA;MAEJ;IACF,CAAA;GACD;AAED,SAAOzB,WAAW4C,YAAYC,gBAAgBC,iBAAiBzC,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "SettingsOperation", "Operation", "GraphBuilder", "NodeMatcher", "Capability", "makeModule", "fnUntraced", "capabilities", "Service", "extensions", "all", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenRoot", "actions", "succeed", "data", "Operation", "invoke", "SettingsOperation", "OpenPluginRegistry", "properties", "label", "ns", "icon", "disposition", "connector", "REGISTRY_ID", "type", "testId", "nodes", "REGISTRY_KEY", "key", "whenId", "disabled", "manager", "get", "Capabilities", "PluginManager", "getPlugins", "map", "plugin", "replaceAll", "name", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/meta.ts
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var REGISTRY_ID = "!dxos:plugin-registry";
|
|
6
|
-
var REGISTRY_KEY = "plugin-registry";
|
|
7
|
-
var meta = {
|
|
8
|
-
id: "dxos.org/plugin/registry",
|
|
9
|
-
name: "Plugins",
|
|
10
|
-
description: trim`
|
|
11
|
-
Plugin management system for discovering, installing, and configuring workspace extensions.
|
|
12
|
-
Browse available plugins and customize your workspace capabilities.
|
|
13
|
-
`
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
REGISTRY_ID,
|
|
18
|
-
REGISTRY_KEY,
|
|
19
|
-
meta
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=chunk-SALMIZ2W.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\n// TODO(wittjosiah): Deck does not currently support `/` in ids.\n// TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n// Ideally this should be worked into the data model in a generic way.\nexport const REGISTRY_ID = '!dxos:plugin-registry';\nexport const REGISTRY_KEY = 'plugin-registry';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/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"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,YAAY;AAKd,IAAMC,cAAc;AACpB,IAAMC,eAAe;AAErB,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;",
|
|
6
|
-
"names": ["trim", "REGISTRY_ID", "REGISTRY_KEY", "meta", "id", "name", "description", "trim"]
|
|
7
|
-
}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "../chunk-SALMIZ2W.mjs";
|
|
5
|
-
|
|
6
|
-
// src/cli/plugin.ts
|
|
7
|
-
import { Plugin as Plugin4 } from "@dxos/app-framework";
|
|
8
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
9
|
-
|
|
10
|
-
// src/cli/commands/index.ts
|
|
11
|
-
import * as Command4 from "@effect/cli/Command";
|
|
12
|
-
|
|
13
|
-
// src/cli/commands/disable.ts
|
|
14
|
-
import * as Args from "@effect/cli/Args";
|
|
15
|
-
import * as Command from "@effect/cli/Command";
|
|
16
|
-
import * as Console from "effect/Console";
|
|
17
|
-
import * as Effect2 from "effect/Effect";
|
|
18
|
-
import { Plugin } from "@dxos/app-framework";
|
|
19
|
-
import { CommandConfig } from "@dxos/cli-util";
|
|
20
|
-
import { invariant } from "@dxos/invariant";
|
|
21
|
-
|
|
22
|
-
// src/cli/storage.ts
|
|
23
|
-
import * as FileSystem from "@effect/platform/FileSystem";
|
|
24
|
-
import * as Path from "@effect/platform/Path";
|
|
25
|
-
import * as Effect from "effect/Effect";
|
|
26
|
-
import * as Schema from "effect/Schema";
|
|
27
|
-
import { DX_CONFIG, getProfilePath } from "@dxos/client-protocol";
|
|
28
|
-
var PLUGINS_FILE = "plugins.json";
|
|
29
|
-
var PluginsSchema = Schema.Array(Schema.String);
|
|
30
|
-
var getPluginsPath = (profile) => Effect.gen(function* () {
|
|
31
|
-
const path = yield* Path.Path;
|
|
32
|
-
return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);
|
|
33
|
-
});
|
|
34
|
-
var loadEnabledPlugins = Effect.fn(function* ({ profile }) {
|
|
35
|
-
const fs = yield* FileSystem.FileSystem;
|
|
36
|
-
const pluginsPath = yield* getPluginsPath(profile);
|
|
37
|
-
const content = yield* fs.readFileString(pluginsPath).pipe(Effect.catchTag("SystemError", () => Effect.succeed("[]")));
|
|
38
|
-
const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(Effect.catchAll(() => Effect.succeed([])));
|
|
39
|
-
return parsed;
|
|
40
|
-
});
|
|
41
|
-
var saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }) {
|
|
42
|
-
const fs = yield* FileSystem.FileSystem;
|
|
43
|
-
const pluginsPath = yield* getPluginsPath(profile);
|
|
44
|
-
const profileDir = getProfilePath(DX_CONFIG, profile);
|
|
45
|
-
yield* fs.makeDirectory(profileDir, {
|
|
46
|
-
recursive: true
|
|
47
|
-
});
|
|
48
|
-
const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);
|
|
49
|
-
yield* fs.writeFileString(pluginsPath, encoded + "\n");
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// src/cli/commands/disable.ts
|
|
53
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/disable.ts";
|
|
54
|
-
var handler = Effect2.fn(function* ({ id }) {
|
|
55
|
-
const { json, profile } = yield* CommandConfig;
|
|
56
|
-
const manager = yield* Plugin.Service;
|
|
57
|
-
const plugins = manager.getPlugins();
|
|
58
|
-
const plugin2 = plugins.find((p) => p.meta.id === id);
|
|
59
|
-
invariant(plugin2, `Plugin not found: ${id}`, {
|
|
60
|
-
F: __dxlog_file,
|
|
61
|
-
L: 22,
|
|
62
|
-
S: this,
|
|
63
|
-
A: [
|
|
64
|
-
"plugin",
|
|
65
|
-
"`Plugin not found: ${id}`"
|
|
66
|
-
]
|
|
67
|
-
});
|
|
68
|
-
const core = manager.getCore();
|
|
69
|
-
invariant(!core.includes(id), `Cannot disable core plugin: ${id}`, {
|
|
70
|
-
F: __dxlog_file,
|
|
71
|
-
L: 25,
|
|
72
|
-
S: this,
|
|
73
|
-
A: [
|
|
74
|
-
"!core.includes(id)",
|
|
75
|
-
"`Cannot disable core plugin: ${id}`"
|
|
76
|
-
]
|
|
77
|
-
});
|
|
78
|
-
const disabled = yield* manager.disable(id);
|
|
79
|
-
invariant(disabled, `Failed to disable plugin: ${id}`, {
|
|
80
|
-
F: __dxlog_file,
|
|
81
|
-
L: 28,
|
|
82
|
-
S: this,
|
|
83
|
-
A: [
|
|
84
|
-
"disabled",
|
|
85
|
-
"`Failed to disable plugin: ${id}`"
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
const enabledPlugins = manager.getEnabled();
|
|
89
|
-
yield* saveEnabledPlugins({
|
|
90
|
-
profile,
|
|
91
|
-
enabled: [
|
|
92
|
-
...enabledPlugins
|
|
93
|
-
]
|
|
94
|
-
});
|
|
95
|
-
if (json) {
|
|
96
|
-
yield* Console.log(JSON.stringify({
|
|
97
|
-
id,
|
|
98
|
-
enabled: false
|
|
99
|
-
}, null, 2));
|
|
100
|
-
} else {
|
|
101
|
-
yield* Console.log(`Plugin "${plugin2.meta.name ?? id}" disabled.`);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
var disable = Command.make("disable", {
|
|
105
|
-
id: Args.text({
|
|
106
|
-
name: "id"
|
|
107
|
-
}).pipe(Args.withDescription("The ID of the plugin to disable."))
|
|
108
|
-
}, handler).pipe(Command.withDescription("Disable a plugin."));
|
|
109
|
-
|
|
110
|
-
// src/cli/commands/enable.ts
|
|
111
|
-
import * as Args2 from "@effect/cli/Args";
|
|
112
|
-
import * as Command2 from "@effect/cli/Command";
|
|
113
|
-
import * as Console2 from "effect/Console";
|
|
114
|
-
import * as Effect3 from "effect/Effect";
|
|
115
|
-
import { Plugin as Plugin2 } from "@dxos/app-framework";
|
|
116
|
-
import { CommandConfig as CommandConfig2 } from "@dxos/cli-util";
|
|
117
|
-
import { invariant as invariant2 } from "@dxos/invariant";
|
|
118
|
-
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/enable.ts";
|
|
119
|
-
var handler2 = Effect3.fn(function* ({ id }) {
|
|
120
|
-
const { json, profile } = yield* CommandConfig2;
|
|
121
|
-
const manager = yield* Plugin2.Service;
|
|
122
|
-
const plugins = manager.getPlugins();
|
|
123
|
-
const plugin2 = plugins.find((p) => p.meta.id === id);
|
|
124
|
-
invariant2(plugin2, `Plugin not found: ${id}`, {
|
|
125
|
-
F: __dxlog_file2,
|
|
126
|
-
L: 22,
|
|
127
|
-
S: this,
|
|
128
|
-
A: [
|
|
129
|
-
"plugin",
|
|
130
|
-
"`Plugin not found: ${id}`"
|
|
131
|
-
]
|
|
132
|
-
});
|
|
133
|
-
const enabled = yield* manager.enable(id);
|
|
134
|
-
invariant2(enabled, `Failed to enable plugin: ${id}`, {
|
|
135
|
-
F: __dxlog_file2,
|
|
136
|
-
L: 25,
|
|
137
|
-
S: this,
|
|
138
|
-
A: [
|
|
139
|
-
"enabled",
|
|
140
|
-
"`Failed to enable plugin: ${id}`"
|
|
141
|
-
]
|
|
142
|
-
});
|
|
143
|
-
const enabledPlugins = manager.getEnabled();
|
|
144
|
-
yield* saveEnabledPlugins({
|
|
145
|
-
profile,
|
|
146
|
-
enabled: [
|
|
147
|
-
...enabledPlugins
|
|
148
|
-
]
|
|
149
|
-
});
|
|
150
|
-
if (json) {
|
|
151
|
-
yield* Console2.log(JSON.stringify({
|
|
152
|
-
id,
|
|
153
|
-
enabled: true
|
|
154
|
-
}, null, 2));
|
|
155
|
-
} else {
|
|
156
|
-
yield* Console2.log(`Plugin "${plugin2.meta.name ?? id}" enabled.`);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
var enable = Command2.make("enable", {
|
|
160
|
-
id: Args2.text({
|
|
161
|
-
name: "id"
|
|
162
|
-
}).pipe(Args2.withDescription("The ID of the plugin to enable."))
|
|
163
|
-
}, handler2).pipe(Command2.withDescription("Enable a plugin."));
|
|
164
|
-
|
|
165
|
-
// src/cli/commands/list.ts
|
|
166
|
-
import * as Command3 from "@effect/cli/Command";
|
|
167
|
-
import * as Console3 from "effect/Console";
|
|
168
|
-
import * as Effect4 from "effect/Effect";
|
|
169
|
-
import { Plugin as Plugin3 } from "@dxos/app-framework";
|
|
170
|
-
import { CommandConfig as CommandConfig3, printList } from "@dxos/cli-util";
|
|
171
|
-
|
|
172
|
-
// src/cli/commands/util.ts
|
|
173
|
-
import { FormBuilder } from "@dxos/cli-util";
|
|
174
|
-
var printPlugin = (plugin2) => {
|
|
175
|
-
const status = plugin2.core ? "core" : plugin2.enabled ? "enabled" : "disabled";
|
|
176
|
-
return FormBuilder.make({
|
|
177
|
-
title: plugin2.name
|
|
178
|
-
}).pipe(FormBuilder.set("id", plugin2.id), FormBuilder.set("status", status), FormBuilder.build);
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
// src/cli/commands/list.ts
|
|
182
|
-
var handler3 = Effect4.fn(function* () {
|
|
183
|
-
const { json } = yield* CommandConfig3;
|
|
184
|
-
const manager = yield* Plugin3.Service;
|
|
185
|
-
const plugins = manager.getPlugins();
|
|
186
|
-
const enabled = manager.getEnabled();
|
|
187
|
-
const core = manager.getCore();
|
|
188
|
-
const formattedPlugins = plugins.map((plugin2) => {
|
|
189
|
-
const isEnabled = enabled.includes(plugin2.meta.id);
|
|
190
|
-
const isCore = core.includes(plugin2.meta.id);
|
|
191
|
-
return {
|
|
192
|
-
id: plugin2.meta.id,
|
|
193
|
-
name: plugin2.meta.name ?? plugin2.meta.id,
|
|
194
|
-
enabled: isEnabled,
|
|
195
|
-
core: isCore
|
|
196
|
-
};
|
|
197
|
-
});
|
|
198
|
-
if (json) {
|
|
199
|
-
yield* Console3.log(JSON.stringify(formattedPlugins, null, 2));
|
|
200
|
-
} else {
|
|
201
|
-
const formatted = formattedPlugins.map(printPlugin);
|
|
202
|
-
yield* Console3.log(printList(formatted));
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
var list = Command3.make("list", {}, handler3).pipe(Command3.withDescription("List all available plugins."));
|
|
206
|
-
|
|
207
|
-
// src/cli/commands/index.ts
|
|
208
|
-
var plugin = Command4.make("plugin").pipe(Command4.withDescription("Manage plugins."), Command4.withSubcommands([
|
|
209
|
-
enable,
|
|
210
|
-
disable,
|
|
211
|
-
list
|
|
212
|
-
]));
|
|
213
|
-
|
|
214
|
-
// src/cli/plugin.ts
|
|
215
|
-
var RegistryPlugin = Plugin4.define(meta).pipe(AppPlugin.addCommandModule({
|
|
216
|
-
commands: [
|
|
217
|
-
plugin
|
|
218
|
-
]
|
|
219
|
-
}), Plugin4.make);
|
|
220
|
-
export {
|
|
221
|
-
RegistryPlugin,
|
|
222
|
-
loadEnabledPlugins,
|
|
223
|
-
saveEnabledPlugins
|
|
224
|
-
};
|
|
225
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -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 FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,SAASA,UAAAA,eAAc;AACvB,SAASC,iBAAiB;;;ACD1B,YAAYC,cAAa;;;ACAzB,YAAYC,UAAU;AACtB,YAAYC,aAAa;AACzB,YAAYC,aAAa;AACzB,YAAYC,aAAY;AAExB,SAASC,cAAc;AACvB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;;;ACP1B,YAAYC,gBAAgB;AAC5B,YAAYC,UAAU;AACtB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,WAAWC,sBAAsB;AAI1C,IAAMC,eAAe;AAErB,IAAMC,gBAAuBC,aAAaC,aAAM;AAKhD,IAAMC,iBAAiB,CAACC,YACfC,WAAI,aAAA;AACT,QAAMC,OAAO,OAAYC;AACzB,SAAOD,KAAKE,KAAKC,eAAeC,WAAWN,OAAAA,GAAUL,YAAAA;AACvD,CAAA;AAMK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G,KAAKC;MACtCV,SAASO;MACTL,MAAMS;IACR;EACF,CAAA;AAEA,MAAIlB,MAAM;AACR,WAAeoB,aAAIC,KAAKC,UAAUX,kBAAkB,MAAM,CAAA,CAAA;EAC5D,OAAO;AACL,UAAMY,YAAYZ,iBAAiBC,IAAIY,WAAAA;AACvC,WAAeJ,aAAIK,UAAUF,SAAAA,CAAAA;EAC/B;AACF,CAAA;AAEO,IAAMG,OAAeC,cAAK,QAAQ,CAAC,GAAG7B,QAAAA,EAAS8B,KAAaC,yBAAgB,6BAAA,CAAA;;;AJ9B5E,IAAMC,SAAsDC,cAAK,QAAA,EAAUC,KACxEC,yBAAgB,iBAAA,GAChBC,yBAAgB;EAACC;EAAQC;EAASC;CAAK,CAAA;;;ADD1C,IAAMC,iBAAiBC,QAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,iBAAiB;EACzBC,UAAU;IAACC;;AACb,CAAA,GACAP,QAAOQ,IAAI;",
|
|
6
|
-
"names": ["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,64 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
REGISTRY_ID,
|
|
4
|
-
REGISTRY_KEY,
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-SALMIZ2W.mjs";
|
|
7
|
-
|
|
8
|
-
// src/RegistryPlugin.tsx
|
|
9
|
-
import { Plugin } from "@dxos/app-framework";
|
|
10
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
11
|
-
|
|
12
|
-
// src/capabilities/app-graph-builder/index.ts
|
|
13
|
-
import { Capability } from "@dxos/app-framework";
|
|
14
|
-
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-WTIS5KI5.mjs"));
|
|
15
|
-
|
|
16
|
-
// src/capabilities/operation-resolver/index.ts
|
|
17
|
-
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
18
|
-
var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-B24QW6IF.mjs"));
|
|
19
|
-
|
|
20
|
-
// src/capabilities/react-surface/index.ts
|
|
21
|
-
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
22
|
-
var ReactSurface = Capability3.lazy("ReactSurface", () => import("./react-surface-SEJBWRMR.mjs"));
|
|
23
|
-
|
|
24
|
-
// src/translations.ts
|
|
25
|
-
var translations = [
|
|
26
|
-
{
|
|
27
|
-
"en-US": {
|
|
28
|
-
[meta.id]: {
|
|
29
|
-
"plugin name": "Registry",
|
|
30
|
-
"details label": "Details",
|
|
31
|
-
"home page label": "Website",
|
|
32
|
-
"source label": "Source",
|
|
33
|
-
"plugin registry label": "Plugin Registry",
|
|
34
|
-
"all plugins label": "All",
|
|
35
|
-
"installed plugins label": "Enabled",
|
|
36
|
-
"recommended plugins label": "Recommended",
|
|
37
|
-
"labs plugins label": "Labs",
|
|
38
|
-
"community plugins label": "Community",
|
|
39
|
-
"load by url label": "Load by URL (soon)",
|
|
40
|
-
"coming soon label": "Coming soon!",
|
|
41
|
-
"open plugin registry label": "Open plugin registry",
|
|
42
|
-
"settings label": "Settings"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
// src/RegistryPlugin.tsx
|
|
49
|
-
var RegistryPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
50
|
-
activate: AppGraphBuilder
|
|
51
|
-
}), AppPlugin.addOperationResolverModule({
|
|
52
|
-
activate: OperationResolver
|
|
53
|
-
}), AppPlugin.addSurfaceModule({
|
|
54
|
-
activate: ReactSurface
|
|
55
|
-
}), AppPlugin.addTranslationsModule({
|
|
56
|
-
translations
|
|
57
|
-
}), Plugin.make);
|
|
58
|
-
export {
|
|
59
|
-
REGISTRY_ID,
|
|
60
|
-
REGISTRY_KEY,
|
|
61
|
-
RegistryPlugin,
|
|
62
|
-
meta
|
|
63
|
-
};
|
|
64
|
-
//# 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
|
-
}
|