@dxos/plugin-registry 0.9.1-staging.ee54ba693a → 0.11.0
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/RegistryPlugin.mjs +15 -0
- package/dist/lib/RegistryPlugin.mjs.map +1 -0
- package/dist/lib/RegistryPlugin.node.mjs +770 -0
- package/dist/lib/RegistryPlugin.node.mjs.map +1 -0
- package/dist/lib/RegistryPlugin.workerd.mjs +8 -0
- package/dist/lib/RegistryPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +11 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-BaseRegistryArticle.mjs +103 -0
- package/dist/lib/chunk-BaseRegistryArticle.mjs.map +1 -0
- package/dist/lib/chunk-LoadPluginDialog.mjs +2 -0
- package/dist/lib/chunk-PluginArticle.mjs +87 -0
- package/dist/lib/chunk-PluginArticle.mjs.map +1 -0
- package/dist/lib/chunk-PublicRegistryArticle.mjs +152 -0
- package/dist/lib/chunk-PublicRegistryArticle.mjs.map +1 -0
- package/dist/lib/chunk-RegistryArticle.mjs +29 -0
- package/dist/lib/chunk-RegistryArticle.mjs.map +1 -0
- package/dist/lib/chunk-RegistrySettingsContainer.mjs +37 -0
- package/dist/lib/chunk-RegistrySettingsContainer.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +202 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-categories.mjs +23 -0
- package/dist/lib/chunk-categories.mjs.map +1 -0
- package/dist/lib/chunk-components.mjs +537 -0
- package/dist/lib/chunk-components.mjs.map +1 -0
- package/dist/lib/chunk-containers.mjs +80 -0
- package/dist/lib/chunk-containers.mjs.map +1 -0
- package/dist/lib/chunk-dev-plugin-loader.mjs +40 -0
- package/dist/lib/chunk-dev-plugin-loader.mjs.map +1 -0
- package/dist/lib/chunk-hooks.mjs +345 -0
- package/dist/lib/chunk-hooks.mjs.map +1 -0
- package/dist/lib/chunk-meta.mjs +40 -0
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-open-plugin-registry.mjs +12 -0
- package/dist/lib/chunk-open-plugin-registry.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +11 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +109 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-settings.mjs +24 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/chunk-storage.mjs +36 -0
- package/dist/lib/chunk-storage.mjs.map +1 -0
- package/dist/lib/components.mjs +2 -0
- package/dist/lib/containers.mjs +2 -0
- package/dist/lib/index.mjs +3 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +7 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/translations.mjs +66 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +29 -0
- package/dist/lib/types.mjs.map +1 -0
- package/dist/types/src/capabilities/RegistryCategoryArticle.d.ts +11 -0
- package/dist/types/src/capabilities/RegistryCategoryArticle.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/dev-plugin-loader.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/categories.d.ts.map +1 -1
- package/dist/types/src/categories.test.d.ts +2 -0
- package/dist/types/src/categories.test.d.ts.map +1 -0
- package/dist/types/src/commands/registry/util.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +1 -1
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +1 -1
- package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts +1 -1
- package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts.map +1 -1
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -1
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -1
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +4 -1
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -1
- package/dist/types/src/containers/PublicRegistryArticle/PublicRegistryArticle.d.ts +1 -1
- package/dist/types/src/containers/PublicRegistryArticle/PublicRegistryArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts +1 -1
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts.map +1 -1
- package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts +4 -7
- package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts.map +1 -1
- package/dist/types/src/hooks/usePluginActions.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +2 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -37
- package/src/capabilities/RegistryCategoryArticle.tsx +46 -0
- package/src/capabilities/app-graph-builder.ts +80 -74
- package/src/capabilities/react-surface.ts +85 -0
- package/src/categories.test.ts +45 -0
- package/src/categories.ts +10 -7
- package/src/commands/registry/util.ts +1 -1
- package/src/components/PluginList/PluginItem.tsx +5 -3
- package/src/components/PluginList/PluginList.stories.tsx +1 -1
- package/src/components/RegistrySettings/RegistrySettings.tsx +2 -2
- package/src/containers/BaseRegistryArticle/BaseRegistryArticle.tsx +2 -2
- package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +2 -0
- package/src/containers/PluginArticle/PluginArticle.tsx +5 -1
- package/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.tsx +2 -0
- package/src/hooks/usePluginActions.ts +8 -4
- package/src/meta.ts +5 -8
- package/src/operations/open-plugin-registry.ts +2 -2
- package/src/types.ts +2 -1
- package/dist/lib/neutral/RegistryPlugin.mjs +0 -27
- package/dist/lib/neutral/RegistryPlugin.mjs.map +0 -7
- package/dist/lib/neutral/RegistryPlugin.node.mjs +0 -844
- package/dist/lib/neutral/RegistryPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/RegistryPlugin.workerd.mjs +0 -10
- package/dist/lib/neutral/RegistryPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XK2JMH3H.mjs +0 -33
- package/dist/lib/neutral/chunk-XK2JMH3H.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZY37XLVF.mjs +0 -46
- package/dist/lib/neutral/chunk-ZY37XLVF.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -25
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/open-plugin-registry-ID7LV3SF.mjs +0 -15
- package/dist/lib/neutral/open-plugin-registry-ID7LV3SF.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -18
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -72
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/src/capabilities/react-surface.tsx +0 -123
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// src/translations.ts
|
|
2
|
-
import { meta } from "#meta";
|
|
3
|
-
var translations = [
|
|
4
|
-
{
|
|
5
|
-
"en-US": {
|
|
6
|
-
[meta.profile.key]: {
|
|
7
|
-
"plugin.name": "Registry",
|
|
8
|
-
"details.label": "Details",
|
|
9
|
-
"description.label": "Description",
|
|
10
|
-
"preview.label": "Preview",
|
|
11
|
-
"home-page.label": "Website",
|
|
12
|
-
"source.label": "Source",
|
|
13
|
-
"resources.label": "Resources",
|
|
14
|
-
"plugin-registry.label": "Plugins",
|
|
15
|
-
"plugin-settings.label": "Plugin Settings",
|
|
16
|
-
"bundled-plugins.label": "Bundled",
|
|
17
|
-
"installed-plugins.label": "Enabled",
|
|
18
|
-
"recommended-plugins.label": "Recommended",
|
|
19
|
-
"labs-plugins.label": "Labs",
|
|
20
|
-
"registry-plugins.label": "Registry",
|
|
21
|
-
"load-by-url.label": "Load from URL",
|
|
22
|
-
"load-by-url-dialog.title": "Load Plugin from URL",
|
|
23
|
-
"plugin-url.label": "Plugin URL",
|
|
24
|
-
"load-plugin.label": "Load Plugin",
|
|
25
|
-
"loading.label": "Loading...",
|
|
26
|
-
"filter.label": "Filter plugins",
|
|
27
|
-
"filter.placeholder": "Filter\u2026",
|
|
28
|
-
"registry.loading.label": "Loading registry plugins\u2026",
|
|
29
|
-
"registry.error.label": "Failed to load registry plugins: {{message}}",
|
|
30
|
-
"registry.empty.label": "No registry plugins available.",
|
|
31
|
-
"dev-plugin.section.title": "Dev Server",
|
|
32
|
-
"dev-plugin.description": "Load a plugin from a local Vite dev server (the `composerPlugin` defaults to port 3967). Composer re-attaches it on every reload, surviving HMR \u2014 useful when iterating on a community plugin against a live registry version.",
|
|
33
|
-
"dev-plugin.url.label": "Manifest URL",
|
|
34
|
-
"dev-plugin.url.description": "Defaults to the local dev server. Edit if your dev server runs on a different port.",
|
|
35
|
-
"dev-plugin.toggle.label": "Dev plugin",
|
|
36
|
-
"dev-plugin.toggle.description": "Stays on across reloads. If the dev server is offline at boot, a warning is logged and the next reload retries.",
|
|
37
|
-
"dev-plugin.enable.label": "Enable",
|
|
38
|
-
"dev-plugin.disable.label": "Disable",
|
|
39
|
-
"dev-plugin.busy.label": "Loading\u2026",
|
|
40
|
-
"dev-plugin.not-loaded.message": "Dev plugin is enabled but not currently loaded. Check that the dev server is running, then reload.",
|
|
41
|
-
"coming-soon.label": "Coming soon!",
|
|
42
|
-
"open-plugin-registry.label": "Open plugin registry",
|
|
43
|
-
"install.label": "Install",
|
|
44
|
-
"installing.label": "Installing\u2026",
|
|
45
|
-
"uninstall.label": "Uninstall",
|
|
46
|
-
"update.label": "Update",
|
|
47
|
-
"updating.label": "Updating\u2026",
|
|
48
|
-
"versions.label": "Versions",
|
|
49
|
-
"installed.label": "installed",
|
|
50
|
-
"install-version.label": "Install version",
|
|
51
|
-
"failure-badge.label": "Plugin failure details",
|
|
52
|
-
"failure-title.label": "Plugin {{phase}} failed ({{reason}})",
|
|
53
|
-
"failure-phase-load.label": "load",
|
|
54
|
-
"failure-phase-activation.label": "activation",
|
|
55
|
-
"failure-reason-timeout.label": "Timed out",
|
|
56
|
-
"failure-reason-error.label": "Error",
|
|
57
|
-
"dependencies.label": "Dependencies",
|
|
58
|
-
"dependents.label": "Required by",
|
|
59
|
-
"spec.label": "Specification",
|
|
60
|
-
"open-spec.label": "Open Specification",
|
|
61
|
-
"disable-dependents-dialog.title": "Disable dependent plugins?",
|
|
62
|
-
"disable-dependents-dialog.description": "Disabling {{plugin}} will also disable the following plugins that depend on it:",
|
|
63
|
-
"disable-dependents-dialog.confirm.label": "Disable",
|
|
64
|
-
"cancel.label": "Cancel"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
export {
|
|
70
|
-
translations
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=translations.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.profile.key]: {\n 'plugin.name': 'Registry',\n 'details.label': 'Details',\n 'description.label': 'Description',\n 'preview.label': 'Preview',\n 'home-page.label': 'Website',\n 'source.label': 'Source',\n 'resources.label': 'Resources',\n 'plugin-registry.label': 'Plugins',\n 'plugin-settings.label': 'Plugin Settings',\n 'bundled-plugins.label': 'Bundled',\n 'installed-plugins.label': 'Enabled',\n 'recommended-plugins.label': 'Recommended',\n 'labs-plugins.label': 'Labs',\n 'registry-plugins.label': 'Registry',\n 'load-by-url.label': 'Load from URL',\n 'load-by-url-dialog.title': 'Load Plugin from URL',\n 'plugin-url.label': 'Plugin URL',\n 'load-plugin.label': 'Load Plugin',\n 'loading.label': 'Loading...',\n 'filter.label': 'Filter plugins',\n 'filter.placeholder': 'Filter…',\n 'registry.loading.label': 'Loading registry plugins…',\n 'registry.error.label': 'Failed to load registry plugins: {{message}}',\n 'registry.empty.label': 'No registry plugins available.',\n 'dev-plugin.section.title': 'Dev Server',\n 'dev-plugin.description':\n 'Load a plugin from a local Vite dev server (the `composerPlugin` defaults to port 3967). Composer re-attaches it on every reload, surviving HMR — useful when iterating on a community plugin against a live registry version.',\n 'dev-plugin.url.label': 'Manifest URL',\n 'dev-plugin.url.description':\n 'Defaults to the local dev server. Edit if your dev server runs on a different port.',\n 'dev-plugin.toggle.label': 'Dev plugin',\n 'dev-plugin.toggle.description':\n 'Stays on across reloads. If the dev server is offline at boot, a warning is logged and the next reload retries.',\n 'dev-plugin.enable.label': 'Enable',\n 'dev-plugin.disable.label': 'Disable',\n 'dev-plugin.busy.label': 'Loading…',\n 'dev-plugin.not-loaded.message':\n 'Dev plugin is enabled but not currently loaded. Check that the dev server is running, then reload.',\n 'coming-soon.label': 'Coming soon!',\n 'open-plugin-registry.label': 'Open plugin registry',\n 'install.label': 'Install',\n 'installing.label': 'Installing…',\n 'uninstall.label': 'Uninstall',\n 'update.label': 'Update',\n 'updating.label': 'Updating…',\n 'versions.label': 'Versions',\n 'installed.label': 'installed',\n 'install-version.label': 'Install version',\n 'failure-badge.label': 'Plugin failure details',\n 'failure-title.label': 'Plugin {{phase}} failed ({{reason}})',\n 'failure-phase-load.label': 'load',\n 'failure-phase-activation.label': 'activation',\n 'failure-reason-timeout.label': 'Timed out',\n 'failure-reason-error.label': 'Error',\n 'dependencies.label': 'Dependencies',\n 'dependents.label': 'Required by',\n 'spec.label': 'Specification',\n 'open-spec.label': 'Open Specification',\n 'disable-dependents-dialog.title': 'Disable dependent plugins?',\n 'disable-dependents-dialog.description':\n 'Disabling {{plugin}} will also disable the following plugins that depend on it:',\n 'disable-dependents-dialog.confirm.label': 'Disable',\n 'cancel.label': 'Cancel',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,QAAQC,GAAG,GAAG;QAClB,eAAe;QACf,iBAAiB;QACjB,qBAAqB;QACrB,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,mBAAmB;QACnB,yBAAyB;QACzB,yBAAyB;QACzB,yBAAyB;QACzB,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,0BAA0B;QAC1B,qBAAqB;QACrB,4BAA4B;QAC5B,oBAAoB;QACpB,qBAAqB;QACrB,iBAAiB;QACjB,gBAAgB;QAChB,sBAAsB;QACtB,0BAA0B;QAC1B,wBAAwB;QACxB,wBAAwB;QACxB,4BAA4B;QAC5B,0BACE;QACF,wBAAwB;QACxB,8BACE;QACF,2BAA2B;QAC3B,iCACE;QACF,2BAA2B;QAC3B,4BAA4B;QAC5B,yBAAyB;QACzB,iCACE;QACF,qBAAqB;QACrB,8BAA8B;QAC9B,iBAAiB;QACjB,oBAAoB;QACpB,mBAAmB;QACnB,gBAAgB;QAChB,kBAAkB;QAClB,kBAAkB;QAClB,mBAAmB;QACnB,yBAAyB;QACzB,uBAAuB;QACvB,uBAAuB;QACvB,4BAA4B;QAC5B,kCAAkC;QAClC,gCAAgC;QAChC,8BAA8B;QAC9B,sBAAsB;QACtB,oBAAoB;QACpB,cAAc;QACd,mBAAmB;QACnB,mCAAmC;QACnC,yCACE;QACF,2CAA2C;QAC3C,gBAAgB;MAClB;IACF;EACF;;",
|
|
6
|
-
"names": ["meta", "translations", "profile", "key"]
|
|
7
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React, { type ComponentProps, useMemo } from 'react';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
9
|
-
import { Surface, usePluginManager } from '@dxos/app-framework/ui';
|
|
10
|
-
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
-
|
|
12
|
-
import { DisableDependentsAlert } from '#components';
|
|
13
|
-
import {
|
|
14
|
-
LOAD_PLUGIN_DIALOG,
|
|
15
|
-
LoadPluginDialog,
|
|
16
|
-
PluginArticle,
|
|
17
|
-
PublicRegistryArticle,
|
|
18
|
-
RegistryArticle,
|
|
19
|
-
RegistrySettingsContainer,
|
|
20
|
-
} from '#containers';
|
|
21
|
-
import { DISABLE_DEPENDENTS_DIALOG, meta, registryCategoryId } from '#meta';
|
|
22
|
-
|
|
23
|
-
import { type PluginPredicate, getCategoryPredicate } from '../categories';
|
|
24
|
-
import { useAutoTags, useRegistryPlugins, useRemotePluginIds } from '../hooks';
|
|
25
|
-
|
|
26
|
-
export default Capability.makeModule(() =>
|
|
27
|
-
Effect.succeed(
|
|
28
|
-
Capability.contributes(Capabilities.ReactSurface, [
|
|
29
|
-
Surface.create({
|
|
30
|
-
id: 'bundled',
|
|
31
|
-
filter: AppSurface.literal(AppSurface.Article, registryCategoryId('bundled')),
|
|
32
|
-
component: () => {
|
|
33
|
-
const predicate = useCategoryPredicate(registryCategoryId('bundled'));
|
|
34
|
-
return <FilteredRegistryArticle id={registryCategoryId('bundled')} filter={predicate} />;
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
Surface.create({
|
|
38
|
-
id: 'installed',
|
|
39
|
-
filter: AppSurface.literal(AppSurface.Article, registryCategoryId('installed')),
|
|
40
|
-
component: () => {
|
|
41
|
-
const predicate = useCategoryPredicate(registryCategoryId('installed'));
|
|
42
|
-
return <FilteredRegistryArticle id={registryCategoryId('installed')} filter={predicate} />;
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
45
|
-
Surface.create({
|
|
46
|
-
id: 'recommended',
|
|
47
|
-
filter: AppSurface.literal(AppSurface.Article, registryCategoryId('recommended')),
|
|
48
|
-
component: () => {
|
|
49
|
-
const predicate = useCategoryPredicate(registryCategoryId('recommended'));
|
|
50
|
-
return <FilteredRegistryArticle id={registryCategoryId('recommended')} filter={predicate} />;
|
|
51
|
-
},
|
|
52
|
-
}),
|
|
53
|
-
Surface.create({
|
|
54
|
-
id: 'labs',
|
|
55
|
-
filter: AppSurface.literal(AppSurface.Article, registryCategoryId('labs')),
|
|
56
|
-
component: () => {
|
|
57
|
-
const predicate = useCategoryPredicate(registryCategoryId('labs'));
|
|
58
|
-
return <FilteredRegistryArticle id={registryCategoryId('labs')} filter={predicate} />;
|
|
59
|
-
},
|
|
60
|
-
}),
|
|
61
|
-
Surface.create({
|
|
62
|
-
id: 'registry',
|
|
63
|
-
filter: AppSurface.literal(AppSurface.Article, registryCategoryId('registry')),
|
|
64
|
-
component: () => <PublicRegistryArticle id={registryCategoryId('registry')} />,
|
|
65
|
-
}),
|
|
66
|
-
Surface.create({
|
|
67
|
-
id: 'pluginDetails',
|
|
68
|
-
filter: AppSurface.subject(AppSurface.Article, Plugin.isPlugin),
|
|
69
|
-
component: ({ data: { subject } }) => {
|
|
70
|
-
return <PluginArticle subject={subject} />;
|
|
71
|
-
},
|
|
72
|
-
}),
|
|
73
|
-
Surface.create({
|
|
74
|
-
id: LOAD_PLUGIN_DIALOG,
|
|
75
|
-
filter: AppSurface.component(AppSurface.Dialog, LOAD_PLUGIN_DIALOG),
|
|
76
|
-
component: () => <LoadPluginDialog />,
|
|
77
|
-
}),
|
|
78
|
-
Surface.create({
|
|
79
|
-
id: DISABLE_DEPENDENTS_DIALOG,
|
|
80
|
-
filter: AppSurface.component<ComponentProps<typeof DisableDependentsAlert>>(
|
|
81
|
-
AppSurface.Dialog,
|
|
82
|
-
DISABLE_DEPENDENTS_DIALOG,
|
|
83
|
-
),
|
|
84
|
-
component: ({ data }) => <DisableDependentsAlert {...data.props} />,
|
|
85
|
-
}),
|
|
86
|
-
Surface.create({
|
|
87
|
-
id: 'pluginSettings',
|
|
88
|
-
filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
|
|
89
|
-
component: ({ data: { subject } }) => <RegistrySettingsContainer subject={subject} />,
|
|
90
|
-
}),
|
|
91
|
-
]),
|
|
92
|
-
),
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Resolves the {@link PluginPredicate} for a registry category against the live plugin list.
|
|
97
|
-
* Shared with the graph builder via {@link getCategoryPredicate} so the category lists and their counts agree.
|
|
98
|
-
*/
|
|
99
|
-
const useCategoryPredicate = (category: string): PluginPredicate => {
|
|
100
|
-
const manager = usePluginManager();
|
|
101
|
-
const remoteIds = useRemotePluginIds();
|
|
102
|
-
const core = useMemo(() => manager.getCore(), [manager]);
|
|
103
|
-
const enabled = useMemo(() => manager.getEnabled(), [manager]);
|
|
104
|
-
return useMemo(
|
|
105
|
-
() => getCategoryPredicate(category, { core, enabled, remoteIds }),
|
|
106
|
-
[category, core, enabled, remoteIds],
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Renders the {@link RegistryArticle} surface filtered by an arbitrary
|
|
112
|
-
* predicate computed against the live plugin list. Centralises the
|
|
113
|
-
* `usePluginManager` + `useRegistryPlugins` + `useAutoTags` wiring shared
|
|
114
|
-
* by every category surface.
|
|
115
|
-
*/
|
|
116
|
-
const FilteredRegistryArticle = ({ id, filter }: { id: string; filter: PluginPredicate }) => {
|
|
117
|
-
const manager = usePluginManager();
|
|
118
|
-
const { entries } = useRegistryPlugins();
|
|
119
|
-
const extraTagsById = useAutoTags(entries);
|
|
120
|
-
const filtered = useMemo(() => manager.getPlugins().filter(filter), [manager, filter]);
|
|
121
|
-
|
|
122
|
-
return <RegistryArticle id={id} plugins={filtered} extraTagsById={extraTagsById} />;
|
|
123
|
-
};
|