@dxos/plugin-registry 0.8.4-main.70d3990 → 0.8.4-main.74a063c4e0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/cli/index.mjs +219 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +52 -50
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/cli/index.mjs +221 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +73 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/types/src/RegistryPlugin.d.ts +2 -1
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +5 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/cli/commands/disable.d.ts +11 -0
- package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/enable.d.ts +11 -0
- package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +3 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/list.d.ts +7 -0
- package/dist/types/src/cli/commands/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/util.d.ts +11 -0
- package/dist/types/src/cli/commands/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +3 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/storage.d.ts +18 -0
- package/dist/types/src/cli/storage.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +15 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +43 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
- package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
- package/dist/types/src/components/{PluginItem.d.ts → PluginList/PluginItem.d.ts} +2 -2
- package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
- package/dist/types/src/components/{PluginList.d.ts → PluginList/PluginList.d.ts} +1 -1
- package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts +38 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/index.d.ts +2 -0
- package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -0
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -0
- package/dist/types/src/containers/LoadPluginDialog/index.d.ts +2 -0
- package/dist/types/src/containers/LoadPluginDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PluginArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts +14 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts +2 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +6 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +7 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
- package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +19 -15
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +58 -32
- package/src/RegistryPlugin.tsx +12 -25
- package/src/capabilities/app-graph-builder.ts +128 -135
- package/src/capabilities/index.ts +8 -4
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +84 -75
- package/src/cli/commands/disable.ts +47 -0
- package/src/cli/commands/enable.ts +44 -0
- package/src/cli/commands/index.ts +14 -0
- package/src/cli/commands/list.ts +41 -0
- package/src/cli/commands/util.ts +24 -0
- package/src/cli/index.ts +6 -0
- package/src/cli/plugin.ts +17 -0
- package/src/cli/storage.ts +50 -0
- package/src/components/PluginDetail/PluginDetail.stories.tsx +43 -0
- package/src/components/PluginDetail/PluginDetail.tsx +84 -0
- package/src/components/PluginDetail/index.ts +5 -0
- package/src/components/{PluginItem.tsx → PluginList/PluginItem.tsx} +20 -16
- package/src/components/PluginList/PluginList.stories.tsx +87 -0
- package/src/components/{PluginList.tsx → PluginList/PluginList.tsx} +2 -2
- package/src/components/PluginList/index.ts +5 -0
- package/src/components/index.ts +0 -1
- package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +84 -0
- package/src/containers/LoadPluginDialog/index.ts +5 -0
- package/src/containers/PluginArticle/PluginArticle.tsx +28 -0
- package/src/containers/PluginArticle/index.ts +5 -0
- package/src/containers/PluginRegistry/PluginRegistry.tsx +94 -0
- package/src/containers/PluginRegistry/index.ts +5 -0
- package/src/containers/index.ts +10 -0
- package/src/meta.ts +14 -7
- package/src/operations/index.ts +7 -0
- package/src/operations/open-plugin-registry.ts +21 -0
- package/src/translations.ts +19 -15
- package/dist/lib/browser/app-graph-builder-6CNBP3A4.mjs +0 -162
- package/dist/lib/browser/app-graph-builder-6CNBP3A4.mjs.map +0 -7
- package/dist/lib/browser/chunk-XPEFEID2.mjs +0 -19
- package/dist/lib/browser/chunk-XPEFEID2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LKNUYBTN.mjs +0 -23
- package/dist/lib/browser/intent-resolver-LKNUYBTN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IGCXOVE2.mjs +0 -359
- package/dist/lib/browser/react-surface-IGCXOVE2.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/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 -32
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
- package/dist/types/src/components/PluginItem.d.ts.map +0 -1
- package/dist/types/src/components/PluginList.d.ts.map +0 -1
- package/dist/types/src/components/PluginList.stories.d.ts +0 -34
- package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
- package/dist/types/src/components/RegistryContainer.d.ts +0 -7
- package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/components/PluginDetail.stories.tsx +0 -45
- package/src/components/PluginDetail.tsx +0 -82
- package/src/components/PluginList.stories.tsx +0 -80
- package/src/components/RegistryContainer.tsx +0 -76
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { trim } from "@dxos/util";
|
|
3
|
-
var REGISTRY_ID = "!dxos:plugin-registry";
|
|
4
|
-
var REGISTRY_KEY = "plugin-registry";
|
|
5
|
-
var meta = {
|
|
6
|
-
id: "dxos.org/plugin/registry",
|
|
7
|
-
name: "Plugins",
|
|
8
|
-
description: trim`
|
|
9
|
-
Plugin management system for discovering, installing, and configuring workspace extensions.
|
|
10
|
-
Browse available plugins and customize your workspace capabilities.
|
|
11
|
-
`
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
REGISTRY_ID,
|
|
16
|
-
REGISTRY_KEY,
|
|
17
|
-
meta
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=chunk-XPEFEID2.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\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: PluginMeta = {\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,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;",
|
|
6
|
-
"names": ["trim", "REGISTRY_ID", "REGISTRY_KEY", "meta", "id", "name", "description", "trim"]
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
REGISTRY_ID
|
|
3
|
-
} from "./chunk-XPEFEID2.mjs";
|
|
4
|
-
|
|
5
|
-
// src/capabilities/intent-resolver.ts
|
|
6
|
-
import { Capabilities, LayoutAction, SettingsAction, contributes, createIntent, createResolver } from "@dxos/app-framework";
|
|
7
|
-
var intent_resolver_default = (() => contributes(Capabilities.IntentResolver, createResolver({
|
|
8
|
-
intent: SettingsAction.OpenPluginRegistry,
|
|
9
|
-
resolve: () => {
|
|
10
|
-
return {
|
|
11
|
-
intents: [
|
|
12
|
-
createIntent(LayoutAction.SwitchWorkspace, {
|
|
13
|
-
part: "workspace",
|
|
14
|
-
subject: REGISTRY_ID
|
|
15
|
-
})
|
|
16
|
-
]
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
})));
|
|
20
|
-
export {
|
|
21
|
-
intent_resolver_default as default
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=intent-resolver-LKNUYBTN.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n LayoutAction,\n SettingsAction,\n contributes,\n createIntent,\n createResolver,\n} from '@dxos/app-framework';\n\nimport { REGISTRY_ID } from '../meta';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: SettingsAction.OpenPluginRegistry,\n resolve: () => {\n return {\n intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: REGISTRY_ID })],\n };\n },\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SACEA,cACAC,cACAC,gBACAC,aACAC,cACAC,sBACK;AAIP,IAAA,2BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,eAAeC;EACvBC,SAAS,MAAA;AACP,WAAO;MACLC,SAAS;QAACC,aAAaC,aAAaC,iBAAiB;UAAEC,MAAM;UAAaC,SAASC;QAAY,CAAA;;IACjG;EACF;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Capabilities", "LayoutAction", "SettingsAction", "contributes", "createIntent", "createResolver", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "SettingsAction", "OpenPluginRegistry", "resolve", "intents", "createIntent", "LayoutAction", "SwitchWorkspace", "part", "subject", "REGISTRY_ID"]
|
|
7
|
-
}
|
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
REGISTRY_KEY,
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-XPEFEID2.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/react-surface.tsx
|
|
7
|
-
import React5, { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
8
|
-
import { Capabilities as Capabilities2, Plugin, contributes, createSurface } from "@dxos/app-framework";
|
|
9
|
-
import { usePluginManager as usePluginManager2 } from "@dxos/app-framework/react";
|
|
10
|
-
|
|
11
|
-
// src/components/PluginDetail.tsx
|
|
12
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
13
|
-
import React from "react";
|
|
14
|
-
import { Icon, Input, Link, useTranslation } from "@dxos/react-ui";
|
|
15
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
16
|
-
import { getStyles, mx } from "@dxos/react-ui-theme";
|
|
17
|
-
var PluginDetail = ({ plugin, enabled, onEnable }) => {
|
|
18
|
-
var _effect = _useSignals();
|
|
19
|
-
try {
|
|
20
|
-
const { t } = useTranslation(meta.id);
|
|
21
|
-
const { id, name, description, homePage, source, screenshots, icon = "ph--circle--regular", iconHue = "neutral" } = plugin.meta;
|
|
22
|
-
const styles = getStyles(iconHue);
|
|
23
|
-
return /* @__PURE__ */ React.createElement(StackItem.Content, {
|
|
24
|
-
scrollable: true
|
|
25
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
26
|
-
role: "none",
|
|
27
|
-
className: "grid grid-cols-[min-content_1fr] gap-4 container-max-width p-4"
|
|
28
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
29
|
-
role: "none"
|
|
30
|
-
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
31
|
-
classNames: mx("p-1 rounded", styles.bg, styles.icon),
|
|
32
|
-
icon,
|
|
33
|
-
size: 14
|
|
34
|
-
})), /* @__PURE__ */ React.createElement("div", {
|
|
35
|
-
role: "none",
|
|
36
|
-
className: "flex flex-col gap-6"
|
|
37
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
38
|
-
role: "none",
|
|
39
|
-
className: "grid grid-cols-[1fr_min-content] gap-x-3 is-full pbs-1"
|
|
40
|
-
}, /* @__PURE__ */ React.createElement("h2", {
|
|
41
|
-
className: "text-xl"
|
|
42
|
-
}, name), /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
43
|
-
classNames: "self-center",
|
|
44
|
-
checked: enabled,
|
|
45
|
-
onClick: onEnable
|
|
46
|
-
})), /* @__PURE__ */ React.createElement("p", {
|
|
47
|
-
className: "pbs-0.5 text-sm text-description"
|
|
48
|
-
}, id)), /* @__PURE__ */ React.createElement("div", {
|
|
49
|
-
role: "none"
|
|
50
|
-
}, /* @__PURE__ */ React.createElement("p", {
|
|
51
|
-
className: "text-description"
|
|
52
|
-
}, description)), screenshots && screenshots.length > 0 && /* @__PURE__ */ React.createElement("div", {
|
|
53
|
-
role: "none",
|
|
54
|
-
className: "flex flex-col gap-2"
|
|
55
|
-
}, /* @__PURE__ */ React.createElement("h2", null, "Preview"), /* @__PURE__ */ React.createElement("img", {
|
|
56
|
-
src: screenshots[0],
|
|
57
|
-
alt: name,
|
|
58
|
-
className: "aspect-video object-fit"
|
|
59
|
-
})), /* @__PURE__ */ React.createElement("div", {
|
|
60
|
-
role: "none",
|
|
61
|
-
className: "flex flex-col gap-2"
|
|
62
|
-
}, /* @__PURE__ */ React.createElement("h2", null, "Resources"), /* @__PURE__ */ React.createElement("div", {
|
|
63
|
-
className: "flex gap-2"
|
|
64
|
-
}, homePage && /* @__PURE__ */ React.createElement(Link, {
|
|
65
|
-
href: homePage,
|
|
66
|
-
target: "_blank",
|
|
67
|
-
rel: "noreferrer",
|
|
68
|
-
classNames: "text-sm text-description"
|
|
69
|
-
}, t("home page label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
70
|
-
icon: "ph--arrow-square-out--bold",
|
|
71
|
-
size: 3,
|
|
72
|
-
classNames: "inline-block leading-none mli-1"
|
|
73
|
-
})), source && /* @__PURE__ */ React.createElement(Link, {
|
|
74
|
-
href: source,
|
|
75
|
-
target: "_blank",
|
|
76
|
-
rel: "noreferrer",
|
|
77
|
-
classNames: "text-sm text-description"
|
|
78
|
-
}, t("source label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
79
|
-
icon: "ph--arrow-square-out--bold",
|
|
80
|
-
size: 3,
|
|
81
|
-
classNames: "inline-block leading-none mli-1"
|
|
82
|
-
})))))));
|
|
83
|
-
} finally {
|
|
84
|
-
_effect.f();
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
// src/components/PluginList.tsx
|
|
89
|
-
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
90
|
-
import React3 from "react";
|
|
91
|
-
import { List } from "@dxos/react-ui";
|
|
92
|
-
|
|
93
|
-
// src/components/PluginItem.tsx
|
|
94
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
95
|
-
import React2, { useCallback } from "react";
|
|
96
|
-
import { Icon as Icon2, IconButton, Input as Input2, Link as Link2, ListItem, Tag, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
97
|
-
import { descriptionText, mx as mx2 } from "@dxos/react-ui-theme";
|
|
98
|
-
import { getStyles as getStyles2 } from "@dxos/react-ui-theme";
|
|
99
|
-
var PluginItem = ({ plugin, enabled = [], onClick, onChange, hasSettings: hasSettingsParam, onSettings }) => {
|
|
100
|
-
var _effect = _useSignals2();
|
|
101
|
-
try {
|
|
102
|
-
const { t } = useTranslation2(meta.id);
|
|
103
|
-
const { id, name, description, tags, icon = "ph--circle--regular", iconHue = "neutral" } = plugin.meta;
|
|
104
|
-
const isEnabled = enabled.includes(id);
|
|
105
|
-
const inputId = `${id}-input`;
|
|
106
|
-
const labelId = `${id}-label`;
|
|
107
|
-
const descriptionId = `${id}-description`;
|
|
108
|
-
const handleClick = useCallback(() => onClick?.(id), [
|
|
109
|
-
id,
|
|
110
|
-
onClick
|
|
111
|
-
]);
|
|
112
|
-
const handleChange = useCallback((event) => {
|
|
113
|
-
event.stopPropagation();
|
|
114
|
-
onChange?.(id, !isEnabled);
|
|
115
|
-
}, [
|
|
116
|
-
id,
|
|
117
|
-
isEnabled,
|
|
118
|
-
onChange
|
|
119
|
-
]);
|
|
120
|
-
const hasSettings = hasSettingsParam?.(id) ?? false;
|
|
121
|
-
const handleSettings = useCallback(() => onSettings?.(id), [
|
|
122
|
-
id,
|
|
123
|
-
onSettings
|
|
124
|
-
]);
|
|
125
|
-
const styles = getStyles2(iconHue);
|
|
126
|
-
const gridCols = "grid grid-cols-[5rem_1fr]";
|
|
127
|
-
const gridRows = "grid grid-rows-[40px_1fr_min-content_40px]";
|
|
128
|
-
return /* @__PURE__ */ React2.createElement(ListItem.Root, {
|
|
129
|
-
key: id,
|
|
130
|
-
labelId,
|
|
131
|
-
"data-testid": `pluginList.${id}`,
|
|
132
|
-
"aria-describedby": descriptionId,
|
|
133
|
-
classNames: mx2(gridCols, "bs-[12rem] is-full gap-3 pie-2 border border-separator rounded-md overflow-hidden")
|
|
134
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
135
|
-
className: mx2(gridRows, "justify-center rounded-l-md", styles.bg)
|
|
136
|
-
}, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement(Icon2, {
|
|
137
|
-
classNames: mx2("cursor-pointer", styles.icon),
|
|
138
|
-
icon,
|
|
139
|
-
size: 14,
|
|
140
|
-
onClick: handleClick
|
|
141
|
-
})), /* @__PURE__ */ React2.createElement("div", {
|
|
142
|
-
className: mx2(gridRows)
|
|
143
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
144
|
-
className: "flex items-center overflow-hidden cursor-pointer",
|
|
145
|
-
onClick: handleClick
|
|
146
|
-
}, /* @__PURE__ */ React2.createElement("span", {
|
|
147
|
-
className: "text-lg truncate"
|
|
148
|
-
}, name ?? id)), /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("p", {
|
|
149
|
-
className: mx2(descriptionText, "line-clamp-4 min-is-0")
|
|
150
|
-
}, description)), /* @__PURE__ */ React2.createElement("div", {
|
|
151
|
-
className: "flex -mis-0.5 overflow-x-auto scrollbar-none"
|
|
152
|
-
}, tags?.map((tag) => /* @__PURE__ */ React2.createElement(Tag, {
|
|
153
|
-
key: tag,
|
|
154
|
-
palette: tagColors[tag],
|
|
155
|
-
classNames: "text-xs uppercase font-thin"
|
|
156
|
-
}, tag))), /* @__PURE__ */ React2.createElement("div", {
|
|
157
|
-
className: "flex gap-2 items-center text-sm"
|
|
158
|
-
}, /* @__PURE__ */ React2.createElement(IconButton, {
|
|
159
|
-
"aria-describedby": descriptionId,
|
|
160
|
-
classNames: "cursor-pointer",
|
|
161
|
-
icon: "ph--gear--regular",
|
|
162
|
-
label: t("settings label"),
|
|
163
|
-
iconOnly: true,
|
|
164
|
-
size: 4,
|
|
165
|
-
onClick: handleSettings,
|
|
166
|
-
disabled: !hasSettings
|
|
167
|
-
}), /* @__PURE__ */ React2.createElement(Link2, {
|
|
168
|
-
"aria-describedby": descriptionId,
|
|
169
|
-
classNames: "text-description cursor-pointer",
|
|
170
|
-
onClick: handleClick
|
|
171
|
-
}, t("details label")), /* @__PURE__ */ React2.createElement("div", {
|
|
172
|
-
className: "grow"
|
|
173
|
-
}), /* @__PURE__ */ React2.createElement("div", {
|
|
174
|
-
className: "pie-1"
|
|
175
|
-
}, /* @__PURE__ */ React2.createElement(Input2.Root, {
|
|
176
|
-
id: inputId
|
|
177
|
-
}, /* @__PURE__ */ React2.createElement(Input2.Switch, {
|
|
178
|
-
classNames: "self-center",
|
|
179
|
-
checked: isEnabled,
|
|
180
|
-
onClick: handleChange
|
|
181
|
-
}))))));
|
|
182
|
-
} finally {
|
|
183
|
-
_effect.f();
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
var tagColors = {
|
|
187
|
-
new: "rose",
|
|
188
|
-
beta: "teal",
|
|
189
|
-
labs: "blue",
|
|
190
|
-
popular: "green",
|
|
191
|
-
featured: "pink",
|
|
192
|
-
experimental: "amber"
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// src/components/PluginList.tsx
|
|
196
|
-
var PluginList = ({ plugins = [], ...props }) => {
|
|
197
|
-
var _effect = _useSignals3();
|
|
198
|
-
try {
|
|
199
|
-
return /* @__PURE__ */ React3.createElement(List, {
|
|
200
|
-
classNames: "grid grid-cols-[repeat(auto-fill,minmax(18rem,1fr))] gap-4 p-4"
|
|
201
|
-
}, plugins.map((plugin) => /* @__PURE__ */ React3.createElement(PluginItem, {
|
|
202
|
-
key: plugin.meta.id,
|
|
203
|
-
plugin,
|
|
204
|
-
...props
|
|
205
|
-
})));
|
|
206
|
-
} finally {
|
|
207
|
-
_effect.f();
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
// src/components/RegistryContainer.tsx
|
|
212
|
-
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
213
|
-
import React4, { useCallback as useCallback2, useMemo } from "react";
|
|
214
|
-
import { Capabilities, LayoutAction, SettingsAction, createIntent } from "@dxos/app-framework";
|
|
215
|
-
import { useCapability, useIntentDispatcher, usePluginManager } from "@dxos/app-framework/react";
|
|
216
|
-
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
217
|
-
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
218
|
-
var sortByPluginMeta = ({ meta: { name: a = "" } }, { meta: { name: b = "" } }) => a.localeCompare(b);
|
|
219
|
-
var RegistryContainer = ({ id, plugins: _plugins }) => {
|
|
220
|
-
var _effect = _useSignals4();
|
|
221
|
-
try {
|
|
222
|
-
const manager = usePluginManager();
|
|
223
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
224
|
-
const plugins = useMemo(() => _plugins.sort(sortByPluginMeta), [
|
|
225
|
-
_plugins
|
|
226
|
-
]);
|
|
227
|
-
const settingsStore = useCapability(Capabilities.SettingsStore);
|
|
228
|
-
const handleChange = useCallback2(async (id2, enabled) => {
|
|
229
|
-
if (enabled) {
|
|
230
|
-
await manager.enable(id2);
|
|
231
|
-
} else {
|
|
232
|
-
await manager.disable(id2);
|
|
233
|
-
}
|
|
234
|
-
await dispatch(createIntent(ObservabilityAction.SendEvent, {
|
|
235
|
-
name: "plugins.toggle",
|
|
236
|
-
properties: {
|
|
237
|
-
plugin: id2,
|
|
238
|
-
enabled
|
|
239
|
-
}
|
|
240
|
-
}));
|
|
241
|
-
}, [
|
|
242
|
-
dispatch,
|
|
243
|
-
manager
|
|
244
|
-
]);
|
|
245
|
-
const handleClick = useCallback2((pluginId) => dispatch(createIntent(LayoutAction.Open, {
|
|
246
|
-
part: "main",
|
|
247
|
-
// TODO(wittjosiah): `/` currently is not supported in ids.
|
|
248
|
-
subject: [
|
|
249
|
-
pluginId.replaceAll("/", ":")
|
|
250
|
-
],
|
|
251
|
-
options: {
|
|
252
|
-
pivotId: id,
|
|
253
|
-
positioning: "end"
|
|
254
|
-
}
|
|
255
|
-
})), [
|
|
256
|
-
dispatch,
|
|
257
|
-
id
|
|
258
|
-
]);
|
|
259
|
-
const hasSettings = useCallback2((pluginId) => !!settingsStore.getStore(pluginId), [
|
|
260
|
-
settingsStore
|
|
261
|
-
]);
|
|
262
|
-
const handleSettings = useCallback2((pluginId) => dispatch(createIntent(SettingsAction.Open, {
|
|
263
|
-
plugin: pluginId
|
|
264
|
-
})), [
|
|
265
|
-
dispatch
|
|
266
|
-
]);
|
|
267
|
-
return /* @__PURE__ */ React4.createElement(StackItem2.Content, {
|
|
268
|
-
scrollable: true
|
|
269
|
-
}, /* @__PURE__ */ React4.createElement(PluginList, {
|
|
270
|
-
plugins,
|
|
271
|
-
enabled: manager.enabled,
|
|
272
|
-
onClick: handleClick,
|
|
273
|
-
onChange: handleChange,
|
|
274
|
-
hasSettings,
|
|
275
|
-
onSettings: handleSettings
|
|
276
|
-
}));
|
|
277
|
-
} finally {
|
|
278
|
-
_effect.f();
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
// src/capabilities/react-surface.tsx
|
|
283
|
-
var react_surface_default = (() => contributes(Capabilities2.ReactSurface, [
|
|
284
|
-
createSurface({
|
|
285
|
-
id: `${meta.id}/all`,
|
|
286
|
-
role: "article",
|
|
287
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+all`,
|
|
288
|
-
component: () => {
|
|
289
|
-
const manager = usePluginManager2();
|
|
290
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta: meta2 }) => !manager.core.includes(meta2.id)), []);
|
|
291
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
292
|
-
id: `${REGISTRY_KEY}+all`,
|
|
293
|
-
plugins: filtered
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
}),
|
|
297
|
-
createSurface({
|
|
298
|
-
id: `${meta.id}/installed`,
|
|
299
|
-
role: "article",
|
|
300
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+installed`,
|
|
301
|
-
component: () => {
|
|
302
|
-
const manager = usePluginManager2();
|
|
303
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta: meta2 }) => !manager.core.includes(meta2.id)).filter(({ meta: meta2 }) => manager.enabled.includes(meta2.id)), []);
|
|
304
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
305
|
-
id: `${REGISTRY_KEY}+installed`,
|
|
306
|
-
plugins: filtered
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}),
|
|
310
|
-
createSurface({
|
|
311
|
-
id: `${meta.id}/recommended`,
|
|
312
|
-
role: "article",
|
|
313
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+recommended`,
|
|
314
|
-
component: () => {
|
|
315
|
-
const manager = usePluginManager2();
|
|
316
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta: meta2 }) => !manager.core.includes(meta2.id)).filter(({ meta: meta2 }) => !meta2.tags?.includes("labs")), []);
|
|
317
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
318
|
-
id: `${REGISTRY_KEY}+recommended`,
|
|
319
|
-
plugins: filtered
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
}),
|
|
323
|
-
createSurface({
|
|
324
|
-
id: `${meta.id}/labs`,
|
|
325
|
-
role: "article",
|
|
326
|
-
filter: (data) => data.subject === `${REGISTRY_KEY}+labs`,
|
|
327
|
-
component: () => {
|
|
328
|
-
const manager = usePluginManager2();
|
|
329
|
-
const filtered = useMemo2(() => manager.plugins.filter(({ meta: meta2 }) => meta2.tags?.includes("labs")), []);
|
|
330
|
-
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
331
|
-
id: `${REGISTRY_KEY}+labs`,
|
|
332
|
-
plugins: filtered
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
}),
|
|
336
|
-
createSurface({
|
|
337
|
-
id: `${meta.id}/plugin-details`,
|
|
338
|
-
role: "article",
|
|
339
|
-
filter: (data) => data.subject instanceof Plugin,
|
|
340
|
-
component: ({ data: { subject } }) => {
|
|
341
|
-
const manager = usePluginManager2();
|
|
342
|
-
const enabled = manager.enabled.includes(subject.meta.id);
|
|
343
|
-
const handleEnable = useCallback3(() => enabled ? manager.disable(subject.meta.id) : manager.enable(subject.meta.id), [
|
|
344
|
-
manager,
|
|
345
|
-
subject.meta.id,
|
|
346
|
-
enabled
|
|
347
|
-
]);
|
|
348
|
-
return /* @__PURE__ */ React5.createElement(PluginDetail, {
|
|
349
|
-
plugin: subject,
|
|
350
|
-
enabled,
|
|
351
|
-
onEnable: handleEnable
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
})
|
|
355
|
-
]));
|
|
356
|
-
export {
|
|
357
|
-
react_surface_default as default
|
|
358
|
-
};
|
|
359
|
-
//# sourceMappingURL=react-surface-IGCXOVE2.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/PluginDetail.tsx", "../../../src/components/PluginList.tsx", "../../../src/components/PluginItem.tsx", "../../../src/components/RegistryContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Capabilities, Plugin, contributes, createSurface } from '@dxos/app-framework';\nimport { usePluginManager } from '@dxos/app-framework/react';\n\nimport { PluginDetail, RegistryContainer } from '../components';\nimport { REGISTRY_KEY, meta } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\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(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}+all`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${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.plugins\n .filter(({ meta }) => !manager.core.includes(meta.id))\n .filter(({ meta }) => manager.enabled.includes(meta.id)),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+installed`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${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.plugins\n .filter(({ meta }) => !manager.core.includes(meta.id))\n .filter(({ meta }) => !meta.tags?.includes('labs')),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+recommended`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${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.plugins.filter(({ meta }) => meta.tags?.includes('labs')), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}+labs`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${meta.id}/plugin-details`,\n role: 'article',\n filter: (data): data is { subject: Plugin } => data.subject instanceof Plugin,\n component: ({ data: { subject } }) => {\n const manager = usePluginManager();\n const enabled = manager.enabled.includes(subject.meta.id);\n const handleEnable = useCallback(\n () => (enabled ? manager.disable(subject.meta.id) : manager.enable(subject.meta.id)),\n [manager, subject.meta.id, enabled],\n );\n\n return <PluginDetail plugin={subject} enabled={enabled} onEnable={handleEnable} />;\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 { StackItem } from '@dxos/react-ui-stack';\nimport { getStyles, mx } from '@dxos/react-ui-theme';\n\nimport { meta } from '../meta';\n\nexport type PluginDetailProps = {\n plugin: Plugin;\n enabled?: boolean;\n onEnable?: () => void;\n};\n\nexport const PluginDetail = ({ plugin, enabled, onEnable }: PluginDetailProps) => {\n const { t } = useTranslation(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 <StackItem.Content scrollable>\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} onClick={onEnable} />\n </Input.Root>\n <p className='pbs-0.5 text-sm text-description'>{id}</p>\n </div>\n\n <div role='none'>\n <p className='text-description'>{description}</p>\n </div>\n\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\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 </StackItem.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { List } from '@dxos/react-ui';\n\nimport { PluginItem, type PluginItemProps } from './PluginItem';\n\nexport type PluginListProps = Omit<PluginItemProps, 'plugin'> & {\n plugins?: readonly Plugin[];\n};\n\nexport const PluginList = ({ plugins = [], ...props }: PluginListProps) => {\n return (\n <List classNames='grid grid-cols-[repeat(auto-fill,minmax(18rem,1fr))] 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/react-ui-theme';\nimport { getStyles } from '@dxos/react-ui-theme';\n\nimport { meta } from '../meta';\nimport { type RegistryTagType } from '../types';\n\nexport type PluginItemProps = {\n plugin: Plugin;\n installed?: readonly string[];\n enabled?: readonly string[];\n onClick?: (id: string) => void;\n onChange?: (id: string, enabled: boolean) => void;\n hasSettings?: (id: string) => boolean;\n onSettings?: (id: string) => void;\n};\n\nexport const PluginItem = ({\n plugin,\n enabled = [],\n onClick,\n onChange,\n hasSettings: hasSettingsParam,\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 = hasSettingsParam?.(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 React, { useCallback, useMemo } from 'react';\n\nimport { Capabilities, LayoutAction, type Plugin, SettingsAction, createIntent } from '@dxos/app-framework';\nimport { useCapability, useIntentDispatcher, usePluginManager } from '@dxos/app-framework/react';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { PluginList } from './PluginList';\n\nconst sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin, { meta: { name: b = '' } }: Plugin) => a.localeCompare(b);\n\nexport const RegistryContainer = ({ id, plugins: _plugins }: { id: string; plugins: Plugin[] }) => {\n const manager = usePluginManager();\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const plugins = useMemo(() => _plugins.sort(sortByPluginMeta), [_plugins]);\n const settingsStore = useCapability(Capabilities.SettingsStore);\n\n // TODO(wittjosiah): Factor out to an intent?\n const handleChange = useCallback(\n async (id: string, enabled: boolean) => {\n if (enabled) {\n await manager.enable(id);\n } else {\n await manager.disable(id);\n }\n\n await dispatch(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'plugins.toggle',\n properties: {\n plugin: id,\n enabled,\n },\n }),\n );\n },\n [dispatch, manager],\n );\n\n const handleClick = useCallback(\n (pluginId: string) =>\n dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n // TODO(wittjosiah): `/` currently is not supported in ids.\n subject: [pluginId.replaceAll('/', ':')],\n options: { pivotId: id, positioning: 'end' },\n }),\n ),\n [dispatch, id],\n );\n\n const hasSettings = useCallback((pluginId: string) => !!settingsStore.getStore(pluginId), [settingsStore]);\n\n const handleSettings = useCallback(\n (pluginId: string) => dispatch(createIntent(SettingsAction.Open, { plugin: pluginId })),\n [dispatch],\n );\n\n return (\n <StackItem.Content scrollable>\n <PluginList\n plugins={plugins}\n enabled={manager.enabled}\n onClick={handleClick}\n onChange={handleChange}\n hasSettings={hasSettings}\n onSettings={handleSettings}\n />\n </StackItem.Content>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,UAASC,eAAAA,cAAaC,WAAAA,gBAAe;AAE5C,SAASC,gBAAAA,eAAcC,QAAQC,aAAaC,qBAAqB;AACjE,SAASC,oBAAAA,yBAAwB;;;;ACHjC,OAAOC,WAAW;AAGlB,SAASC,MAAMC,OAAOC,MAAMC,sBAAsB;AAClD,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,UAAU;AAUvB,IAAMC,eAAe,CAAC,EAAEC,QAAQC,SAASC,SAAQ,MAAqB;;;AAC3E,UAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,UAAM,EACJA,IACAC,MACAC,aACAC,UACAC,QACAC,aACAC,OAAO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ZC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAY,GAAGC,YAAAA;IACnDC,WAAW,MAAA;AACT,YAAMC,UAAUC,kBAAAA;AAChB,YAAMC,WAAWC,SAAQ,MAAMH,QAAQI,QAAQT,OAAO,CAAC,EAAEF,MAAAA,MAAI,MAAOA,MAAKiB,MAAMJ,SAAS,MAAA,CAAA,GAAU,CAAA,CAAE;AAEpG,aAAO,gBAAAC,OAAA,cAACC,mBAAAA;QAAkBhB,IAAI,GAAGM,YAAAA;QAAqBM,SAASF;;IACjE;EACF,CAAA;EACAX,cAAc;IACZC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,SAAsCA,KAAKC,mBAAmBc;IACvEZ,WAAW,CAAC,EAAEH,MAAM,EAAEC,QAAO,EAAE,MAAE;AAC/B,YAAMG,UAAUC,kBAAAA;AAChB,YAAMQ,UAAUT,QAAQS,QAAQH,SAAST,QAAQJ,KAAKD,EAAE;AACxD,YAAMoB,eAAeC,aACnB,MAAOJ,UAAUT,QAAQc,QAAQjB,QAAQJ,KAAKD,EAAE,IAAIQ,QAAQe,OAAOlB,QAAQJ,KAAKD,EAAE,GAClF;QAACQ;QAASH,QAAQJ,KAAKD;QAAIiB;OAAQ;AAGrC,aAAO,gBAAAF,OAAA,cAACS,cAAAA;QAAaC,QAAQpB;QAASY;QAAkBS,UAAUN;;IACpE;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["React", "useCallback", "useMemo", "Capabilities", "Plugin", "contributes", "createSurface", "usePluginManager", "React", "Icon", "Input", "Link", "useTranslation", "StackItem", "getStyles", "mx", "PluginDetail", "plugin", "enabled", "onEnable", "t", "useTranslation", "meta", "id", "name", "description", "homePage", "source", "screenshots", "icon", "iconHue", "styles", "getStyles", "StackItem", "Content", "scrollable", "div", "role", "className", "Icon", "classNames", "mx", "bg", "size", "h2", "Input", "Root", "Switch", "checked", "onClick", "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", "hasSettingsParam", "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", "React", "useCallback", "useMemo", "Capabilities", "LayoutAction", "SettingsAction", "createIntent", "useCapability", "useIntentDispatcher", "usePluginManager", "ObservabilityAction", "StackItem", "sortByPluginMeta", "meta", "name", "a", "b", "localeCompare", "RegistryContainer", "id", "plugins", "_plugins", "manager", "usePluginManager", "dispatchPromise", "dispatch", "useIntentDispatcher", "useMemo", "sort", "settingsStore", "useCapability", "Capabilities", "SettingsStore", "handleChange", "useCallback", "enabled", "enable", "disable", "createIntent", "ObservabilityAction", "SendEvent", "properties", "plugin", "handleClick", "pluginId", "LayoutAction", "Open", "part", "subject", "replaceAll", "options", "pivotId", "positioning", "hasSettings", "getStore", "handleSettings", "SettingsAction", "React", "StackItem", "Content", "scrollable", "PluginList", "onClick", "onChange", "onSettings", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "subject", "REGISTRY_KEY", "component", "manager", "usePluginManager", "filtered", "useMemo", "plugins", "core", "includes", "React", "RegistryContainer", "enabled", "tags", "Plugin", "handleEnable", "useCallback", "disable", "enable", "PluginDetail", "plugin", "onEnable"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EAMb,MAAM,qBAAqB,CAAC;;AAI7B,wBAWI"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Plugin } from '@dxos/app-framework';
|
|
3
|
-
export type PluginDetailProps = {
|
|
4
|
-
plugin: Plugin;
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
onEnable?: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare const PluginDetail: ({ plugin, enabled, onEnable }: PluginDetailProps) => React.JSX.Element;
|
|
9
|
-
//# sourceMappingURL=PluginDetail.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginDetail.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginDetail.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,+BAA+B,iBAAiB,sBA8D5E,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ plugin, enabled, onEnable }: import("./PluginDetail").PluginDetailProps) => import("react").JSX.Element;
|
|
5
|
-
decorators: import("@storybook/react").Decorator[];
|
|
6
|
-
parameters: {
|
|
7
|
-
translations: [{
|
|
8
|
-
readonly 'en-US': {
|
|
9
|
-
readonly [meta.id]: {
|
|
10
|
-
readonly 'plugin name': "Registry";
|
|
11
|
-
readonly 'details label': "Details";
|
|
12
|
-
readonly 'home page label': "Website";
|
|
13
|
-
readonly 'source label': "Source";
|
|
14
|
-
readonly 'plugin registry label': "Plugin Registry";
|
|
15
|
-
readonly 'all plugins label': "All";
|
|
16
|
-
readonly 'installed plugins label': "Enabled";
|
|
17
|
-
readonly 'recommended plugins label': "Recommended";
|
|
18
|
-
readonly 'labs plugins label': "Labs";
|
|
19
|
-
readonly 'community plugins label': "Community";
|
|
20
|
-
readonly 'load by url label': "Load by URL (soon)";
|
|
21
|
-
readonly 'coming soon label': "Coming soon!";
|
|
22
|
-
readonly 'open plugin registry label': "Open plugin registry";
|
|
23
|
-
readonly 'settings label': "Settings";
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}];
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export default meta;
|
|
30
|
-
type Story = StoryObj<typeof meta>;
|
|
31
|
-
export declare const Default: Story;
|
|
32
|
-
//# sourceMappingURL=PluginDetail.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginDetail.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginDetail.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AASjE,QAAA,MAAM,IAAI;;;;;;;yBANc,CAAS,IAAG,CAAE,EAAC,CAAC;;;;;;;;;;;;;;;;;;;CAaH,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAkBrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginItem.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQlD,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,oFAOxB,eAAe,sBA+EjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginList.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,GAAG;IAC9D,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,uBAA4B,eAAe,sBAQrE,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: ({ plugins, ...props }: import("./PluginList").PluginListProps) => React.JSX.Element;
|
|
6
|
-
render: () => React.JSX.Element;
|
|
7
|
-
parameters: {
|
|
8
|
-
translations: [{
|
|
9
|
-
readonly 'en-US': {
|
|
10
|
-
readonly [meta.id]: {
|
|
11
|
-
readonly 'plugin name': "Registry";
|
|
12
|
-
readonly 'details label': "Details";
|
|
13
|
-
readonly 'home page label': "Website";
|
|
14
|
-
readonly 'source label': "Source";
|
|
15
|
-
readonly 'plugin registry label': "Plugin Registry";
|
|
16
|
-
readonly 'all plugins label': "All";
|
|
17
|
-
readonly 'installed plugins label': "Enabled";
|
|
18
|
-
readonly 'recommended plugins label': "Recommended";
|
|
19
|
-
readonly 'labs plugins label': "Labs";
|
|
20
|
-
readonly 'community plugins label': "Community";
|
|
21
|
-
readonly 'load by url label': "Load by URL (soon)";
|
|
22
|
-
readonly 'coming soon label': "Coming soon!";
|
|
23
|
-
readonly 'open plugin registry label': "Open plugin registry";
|
|
24
|
-
readonly 'settings label': "Settings";
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}];
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export default meta;
|
|
31
|
-
type Story = StoryObj<typeof meta>;
|
|
32
|
-
export declare const Default: Story;
|
|
33
|
-
export declare const FullScreen: Story;
|
|
34
|
-
//# sourceMappingURL=PluginList.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PluginList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAoDxC,QAAA,MAAM,IAAI;;;;;;;yBAlDY,CAAO,IAAI,CAAE,EAAC,CAAC;;;;;;;;;;;;;;;;;;;CAyDF,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RegistryContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/RegistryContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAA8B,KAAK,MAAM,EAAgC,MAAM,qBAAqB,CAAC;AAS5G,eAAO,MAAM,iBAAiB,GAAI,2BAA2B;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,sBA4D7F,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Capabilities,
|
|
7
|
-
LayoutAction,
|
|
8
|
-
SettingsAction,
|
|
9
|
-
contributes,
|
|
10
|
-
createIntent,
|
|
11
|
-
createResolver,
|
|
12
|
-
} from '@dxos/app-framework';
|
|
13
|
-
|
|
14
|
-
import { REGISTRY_ID } from '../meta';
|
|
15
|
-
|
|
16
|
-
export default () =>
|
|
17
|
-
contributes(
|
|
18
|
-
Capabilities.IntentResolver,
|
|
19
|
-
createResolver({
|
|
20
|
-
intent: SettingsAction.OpenPluginRegistry,
|
|
21
|
-
resolve: () => {
|
|
22
|
-
return {
|
|
23
|
-
intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: REGISTRY_ID })],
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
}),
|
|
27
|
-
);
|