@dxos/plugin-registry 0.6.13 → 0.6.14-main.1366248
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/{chunk-2FC6QNHB.mjs → chunk-NEMFDAOB.mjs} +1 -1
- package/dist/lib/browser/chunk-NEMFDAOB.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +57 -39
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/types/src/components/Icon.stories.d.ts +3 -9
- package/dist/types/src/components/Icon.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.d.ts +2 -2
- package/dist/types/src/components/PluginList.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.stories.d.ts +3 -11
- package/dist/types/src/components/PluginList.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginSettings.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +22 -21
- package/src/components/Icon.stories.tsx +8 -5
- package/src/components/PluginList.stories.tsx +19 -10
- package/src/components/PluginList.tsx +69 -74
- package/src/components/PluginSettings.tsx +17 -13
- package/src/meta.ts +3 -1
- package/src/translations.ts +1 -0
- package/dist/lib/browser/chunk-2FC6QNHB.mjs.map +0 -7
- package/dist/types/src/sanity.test.d.ts +0 -2
- package/dist/types/src/sanity.test.d.ts.map +0 -1
- package/src/sanity.test.ts +0 -13
|
@@ -0,0 +1,7 @@
|
|
|
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';\n\nexport const REGISTRY_PLUGIN = 'dxos.org/plugin/registry';\n\nexport default {\n id: REGISTRY_PLUGIN,\n name: 'Plugins',\n} satisfies PluginMeta;\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,kBAAkB;AAE/B,IAAA,eAAe;EACbC,IAAID;EACJE,MAAM;AACR;",
|
|
6
|
+
"names": ["REGISTRY_PLUGIN", "id", "name"]
|
|
7
|
+
}
|
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
REGISTRY_PLUGIN,
|
|
3
3
|
meta_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NEMFDAOB.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-registry/src/RegistryPlugin.tsx
|
|
7
7
|
import React3 from "react";
|
|
8
8
|
import { LocalStorageStore } from "@dxos/local-storage";
|
|
9
9
|
|
|
10
10
|
// packages/plugins/plugin-registry/src/components/PluginList.tsx
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
Button,
|
|
15
|
-
DensityProvider,
|
|
16
|
-
Input,
|
|
17
|
-
List,
|
|
18
|
-
ListItem,
|
|
19
|
-
useTranslation
|
|
20
|
-
} from "@dxos/react-ui";
|
|
21
|
-
import { descriptionText, fineBlockSize, getSize, ghostHover, mx } from "@dxos/react-ui-theme";
|
|
11
|
+
import React, { useCallback } from "react";
|
|
12
|
+
import { Button, Icon, Input, Link, List, ListItem, useTranslation } from "@dxos/react-ui";
|
|
13
|
+
import { descriptionText, fineBlockSize, mx } from "@dxos/react-ui-theme";
|
|
22
14
|
var PluginList = ({ plugins = [], loaded = [], enabled = [], onChange, onReload }) => {
|
|
23
15
|
const { t } = useTranslation(REGISTRY_PLUGIN);
|
|
24
|
-
return /* @__PURE__ */ React.createElement(
|
|
25
|
-
density: "fine"
|
|
26
|
-
}, /* @__PURE__ */ React.createElement(List, {
|
|
16
|
+
return /* @__PURE__ */ React.createElement(List, {
|
|
27
17
|
classNames: "mb-4 select-none"
|
|
28
|
-
}, plugins.map(({ id, name, description, homePage,
|
|
18
|
+
}, plugins.map(({ id, name, description, homePage, source, icon = "ph--circle--regular" }) => {
|
|
29
19
|
const isEnabled = enabled.includes(id);
|
|
30
20
|
const isLoaded = loaded.includes(id);
|
|
31
21
|
const reloadRequired = isEnabled !== isLoaded;
|
|
32
22
|
const inputId = `${id}-input`;
|
|
33
23
|
const labelId = `${id}-label`;
|
|
34
24
|
const descriptionId = `${id}-description`;
|
|
25
|
+
const handleChange = useCallback(() => onChange?.(id, !isEnabled), [
|
|
26
|
+
id,
|
|
27
|
+
isEnabled,
|
|
28
|
+
onChange
|
|
29
|
+
]);
|
|
35
30
|
return /* @__PURE__ */ React.createElement(Input.Root, {
|
|
36
31
|
key: id,
|
|
37
32
|
id: inputId
|
|
@@ -39,13 +34,11 @@ var PluginList = ({ plugins = [], loaded = [], enabled = [], onChange, onReload
|
|
|
39
34
|
labelId,
|
|
40
35
|
"data-testid": `pluginList.${id}`,
|
|
41
36
|
"aria-describedby": descriptionId,
|
|
42
|
-
classNames:
|
|
43
|
-
"flex gap-2 cursor-pointer plb-2 pli-2 -mli-2 rounded",
|
|
44
|
-
ghostHover
|
|
45
|
-
]
|
|
37
|
+
classNames: "flex gap-2 plb-2 pli-2 -mli-2 rounded"
|
|
46
38
|
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
icon,
|
|
40
|
+
size: 6,
|
|
41
|
+
classNames: "shrink-0 mbs-1"
|
|
49
42
|
}), /* @__PURE__ */ React.createElement("div", {
|
|
50
43
|
role: "none",
|
|
51
44
|
className: mx(fineBlockSize, "grow pbs-1 pl-1")
|
|
@@ -53,40 +46,64 @@ var PluginList = ({ plugins = [], loaded = [], enabled = [], onChange, onReload
|
|
|
53
46
|
htmlFor: inputId,
|
|
54
47
|
id: labelId,
|
|
55
48
|
className: "truncate"
|
|
56
|
-
}, name ?? id), (description || reloadRequired || homePage) && /* @__PURE__ */ React.createElement("div", {
|
|
49
|
+
}, name ?? id), (description || reloadRequired || homePage || source) && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
57
50
|
id: descriptionId,
|
|
58
51
|
className: "space-b-1 pbs-1 pbe-1"
|
|
59
52
|
}, /* @__PURE__ */ React.createElement("p", {
|
|
60
53
|
className: descriptionText
|
|
61
|
-
}, description),
|
|
54
|
+
}, description), homePage && /* @__PURE__ */ React.createElement(Link, {
|
|
55
|
+
href: homePage,
|
|
56
|
+
target: "_blank",
|
|
57
|
+
rel: "noreferrer",
|
|
58
|
+
"aria-describedby": descriptionId,
|
|
59
|
+
classNames: "text-xs text-description"
|
|
60
|
+
}, t("home page label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
61
|
+
icon: "ph--arrow-square-out--bold",
|
|
62
|
+
size: 3,
|
|
63
|
+
classNames: "inline-block leading-none mli-1"
|
|
64
|
+
})), source && /* @__PURE__ */ React.createElement(Link, {
|
|
65
|
+
href: source,
|
|
66
|
+
target: "_blank",
|
|
67
|
+
rel: "noreferrer",
|
|
68
|
+
"aria-describedby": descriptionId,
|
|
69
|
+
classNames: "text-xs text-description"
|
|
70
|
+
}, t("source label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
71
|
+
icon: "ph--arrow-square-out--bold",
|
|
72
|
+
size: 3,
|
|
73
|
+
classNames: "inline-block leading-none mli-1"
|
|
74
|
+
}))), reloadRequired && /* @__PURE__ */ React.createElement(Button, {
|
|
62
75
|
variant: "ghost",
|
|
63
76
|
classNames: "p-0 gap-2",
|
|
64
77
|
onClick: onReload
|
|
65
|
-
}, /* @__PURE__ */ React.createElement(
|
|
78
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
79
|
+
size: 4,
|
|
80
|
+
icon: "ph--arrow-clockwise--regular"
|
|
81
|
+
}), /* @__PURE__ */ React.createElement("p", {
|
|
66
82
|
className: "text-sm font-medium"
|
|
67
83
|
}, t("reload required message"))))), /* @__PURE__ */ React.createElement("div", {
|
|
68
84
|
className: "pbs-1"
|
|
69
85
|
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
70
86
|
classNames: "self-center",
|
|
71
|
-
checked:
|
|
72
|
-
onClick:
|
|
87
|
+
checked: isEnabled,
|
|
88
|
+
onClick: handleChange
|
|
73
89
|
}))));
|
|
74
|
-
}))
|
|
90
|
+
}));
|
|
75
91
|
};
|
|
76
92
|
|
|
77
93
|
// packages/plugins/plugin-registry/src/components/PluginSettings.tsx
|
|
78
94
|
import React2, { useMemo } from "react";
|
|
79
95
|
import { useIntentDispatcher, usePlugins } from "@dxos/app-framework";
|
|
80
96
|
import { ObservabilityAction } from "@dxos/plugin-observability/meta";
|
|
81
|
-
import { SettingsValue } from "@dxos/plugin-settings";
|
|
82
97
|
import { Input as Input2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
98
|
+
import { DeprecatedFormInput } from "@dxos/react-ui-data";
|
|
99
|
+
var sortPluginMeta = ({ name: a = "" }, { name: b = "" }) => a.localeCompare(b);
|
|
83
100
|
var PluginSettings = ({ settings }) => {
|
|
84
101
|
const { t } = useTranslation2(REGISTRY_PLUGIN);
|
|
85
|
-
const { enabled, core,
|
|
102
|
+
const { plugins, enabled, core, setPlugin, ...pluginContext } = usePlugins();
|
|
86
103
|
const dispatch = useIntentDispatcher();
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const available = useMemo(() => pluginContext.available.filter(({ id }) => !enabled.includes(id)).sort(
|
|
104
|
+
const installed = useMemo(() => plugins.filter(({ meta }) => !core.includes(meta.id)).filter(({ meta }) => enabled.includes(meta.id)).map(({ meta }) => meta).sort(sortPluginMeta), []);
|
|
105
|
+
const pluginIds = plugins.map(({ meta }) => meta.id);
|
|
106
|
+
const available = useMemo(() => pluginContext.available.filter(({ id }) => !enabled.includes(id)).sort(sortPluginMeta), []);
|
|
90
107
|
const recommended = available.filter((meta) => !meta.tags?.includes("experimental"));
|
|
91
108
|
const experimental = available.filter((meta) => meta.tags?.includes("experimental"));
|
|
92
109
|
const handleChange = (id, enabled2) => {
|
|
@@ -105,7 +122,7 @@ var PluginSettings = ({ settings }) => {
|
|
|
105
122
|
const handleReload = () => {
|
|
106
123
|
window.location.reload();
|
|
107
124
|
};
|
|
108
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
125
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
|
|
109
126
|
label: t("settings show experimental label")
|
|
110
127
|
}, /* @__PURE__ */ React2.createElement(Input2.Switch, {
|
|
111
128
|
"data-testid": "pluginSettings.experimental",
|
|
@@ -115,7 +132,7 @@ var PluginSettings = ({ settings }) => {
|
|
|
115
132
|
label: t("settings section installed label")
|
|
116
133
|
}, /* @__PURE__ */ React2.createElement(PluginList, {
|
|
117
134
|
plugins: installed,
|
|
118
|
-
loaded:
|
|
135
|
+
loaded: pluginIds,
|
|
119
136
|
enabled,
|
|
120
137
|
onChange: handleChange,
|
|
121
138
|
onReload: handleReload
|
|
@@ -123,7 +140,7 @@ var PluginSettings = ({ settings }) => {
|
|
|
123
140
|
label: t("settings section recommended label")
|
|
124
141
|
}, /* @__PURE__ */ React2.createElement(PluginList, {
|
|
125
142
|
plugins: recommended,
|
|
126
|
-
loaded:
|
|
143
|
+
loaded: pluginIds,
|
|
127
144
|
enabled,
|
|
128
145
|
onChange: handleChange,
|
|
129
146
|
onReload: handleReload
|
|
@@ -131,7 +148,7 @@ var PluginSettings = ({ settings }) => {
|
|
|
131
148
|
label: t("settings section experimental label")
|
|
132
149
|
}, /* @__PURE__ */ React2.createElement(PluginList, {
|
|
133
150
|
plugins: experimental,
|
|
134
|
-
loaded:
|
|
151
|
+
loaded: pluginIds,
|
|
135
152
|
enabled,
|
|
136
153
|
onChange: handleChange,
|
|
137
154
|
onReload: handleReload
|
|
@@ -139,7 +156,7 @@ var PluginSettings = ({ settings }) => {
|
|
|
139
156
|
};
|
|
140
157
|
var Section = ({ label, children }) => {
|
|
141
158
|
return /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("h2", {
|
|
142
|
-
className: "py-2 text-sm text-
|
|
159
|
+
className: "py-2 text-sm text-subdued"
|
|
143
160
|
}, label), children);
|
|
144
161
|
};
|
|
145
162
|
|
|
@@ -154,7 +171,8 @@ var translations_default = [
|
|
|
154
171
|
"settings section installed label": "Installed",
|
|
155
172
|
"settings section recommended label": "Recommended",
|
|
156
173
|
"settings section experimental label": "Experimental",
|
|
157
|
-
"home page label": "Home page"
|
|
174
|
+
"home page label": "Home page",
|
|
175
|
+
"source label": "Source"
|
|
158
176
|
}
|
|
159
177
|
}
|
|
160
178
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/RegistryPlugin.tsx", "../../../src/components/PluginList.tsx", "../../../src/components/PluginSettings.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport type { PluginDefinition, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';\nimport { LocalStorageStore } from '@dxos/local-storage';\n\nimport { PluginSettings } from './components';\nimport meta, { REGISTRY_PLUGIN } from './meta';\nimport translations from './translations';\n\nexport type RegistrySettingsProps = {\n experimental?: boolean;\n};\n\nexport type RegistryPluginProvides = SurfaceProvides & TranslationsProvides & SettingsProvides<RegistrySettingsProps>;\n\nexport const RegistryPlugin = (): PluginDefinition<RegistryPluginProvides> => {\n const settings = new LocalStorageStore<RegistrySettingsProps>(REGISTRY_PLUGIN);\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'experimental', type: LocalStorageStore.bool({ allowUndefined: true }) });\n },\n provides: {\n settings: settings.values,\n translations,\n surface: {\n component: ({ data, role }) => {\n switch (role) {\n case 'settings':\n return data.plugin === meta.id ? <PluginSettings settings={settings.values} /> : null;\n }\n\n return null;\n },\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,YAAW;AAGlB,SAASC,yBAAyB;;;ACHlC,SAASC,
|
|
6
|
-
"names": ["React", "LocalStorageStore", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport type { PluginDefinition, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';\nimport { LocalStorageStore } from '@dxos/local-storage';\n\nimport { PluginSettings } from './components';\nimport meta, { REGISTRY_PLUGIN } from './meta';\nimport translations from './translations';\n\nexport type RegistrySettingsProps = {\n experimental?: boolean;\n};\n\nexport type RegistryPluginProvides = SurfaceProvides & TranslationsProvides & SettingsProvides<RegistrySettingsProps>;\n\nexport const RegistryPlugin = (): PluginDefinition<RegistryPluginProvides> => {\n const settings = new LocalStorageStore<RegistrySettingsProps>(REGISTRY_PLUGIN);\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'experimental', type: LocalStorageStore.bool({ allowUndefined: true }) });\n },\n provides: {\n settings: settings.values,\n translations,\n surface: {\n component: ({ data, role }) => {\n switch (role) {\n case 'settings':\n return data.plugin === meta.id ? <PluginSettings settings={settings.values} /> : null;\n }\n\n return null;\n },\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { type PluginMeta } from '@dxos/app-framework';\nimport { Button, Icon, Input, Link, List, ListItem, useTranslation } from '@dxos/react-ui';\nimport { descriptionText, fineBlockSize, mx } from '@dxos/react-ui-theme';\n\nimport { REGISTRY_PLUGIN } from '../meta';\n\nexport type PluginListProps = {\n plugins?: PluginMeta[];\n loaded?: string[];\n enabled?: string[];\n onChange?: (id: string, enabled: boolean) => void;\n onReload?: () => void;\n};\n\nexport const PluginList = ({ plugins = [], loaded = [], enabled = [], onChange, onReload }: PluginListProps) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n\n return (\n <List classNames='mb-4 select-none'>\n {plugins.map(({ id, name, description, homePage, source, icon = 'ph--circle--regular' }) => {\n const isEnabled = enabled.includes(id);\n const isLoaded = loaded.includes(id);\n const reloadRequired = isEnabled !== isLoaded;\n const inputId = `${id}-input`;\n const labelId = `${id}-label`;\n const descriptionId = `${id}-description`;\n const handleChange = useCallback(() => onChange?.(id, !isEnabled), [id, isEnabled, onChange]);\n\n return (\n <Input.Root key={id} id={inputId}>\n <ListItem.Root\n labelId={labelId}\n data-testid={`pluginList.${id}`}\n aria-describedby={descriptionId}\n classNames='flex gap-2 plb-2 pli-2 -mli-2 rounded'\n >\n <Icon icon={icon} size={6} classNames='shrink-0 mbs-1' />\n <div role='none' className={mx(fineBlockSize, 'grow pbs-1 pl-1')}>\n <label htmlFor={inputId} id={labelId} className='truncate'>\n {name ?? id}\n </label>\n {(description || reloadRequired || homePage || source) && (\n <>\n <div id={descriptionId} className='space-b-1 pbs-1 pbe-1'>\n <p className={descriptionText}>{description}</p>\n {homePage && (\n <Link\n href={homePage}\n target='_blank'\n rel='noreferrer'\n aria-describedby={descriptionId}\n classNames='text-xs text-description'\n >\n {t('home page label')}\n <Icon\n icon='ph--arrow-square-out--bold'\n size={3}\n classNames='inline-block leading-none mli-1'\n />\n </Link>\n )}\n {source && (\n <Link\n href={source}\n target='_blank'\n rel='noreferrer'\n aria-describedby={descriptionId}\n classNames='text-xs text-description'\n >\n {t('source label')}\n <Icon\n icon='ph--arrow-square-out--bold'\n size={3}\n classNames='inline-block leading-none mli-1'\n />\n </Link>\n )}\n </div>\n {reloadRequired && (\n <Button variant='ghost' classNames='p-0 gap-2' onClick={onReload}>\n <Icon size={4} icon='ph--arrow-clockwise--regular' />\n <p className='text-sm font-medium'>{t('reload required message')}</p>\n </Button>\n )}\n </>\n )}\n </div>\n <div className='pbs-1'>\n <Input.Switch classNames='self-center' checked={isEnabled} onClick={handleChange} />\n </div>\n </ListItem.Root>\n </Input.Root>\n );\n })}\n </List>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useMemo, type PropsWithChildren } from 'react';\n\nimport { type PluginMeta, useIntentDispatcher, usePlugins } from '@dxos/app-framework';\nimport { ObservabilityAction } from '@dxos/plugin-observability/meta';\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-data';\n\nimport { PluginList } from './PluginList';\nimport { type RegistrySettingsProps } from '../RegistryPlugin';\nimport { REGISTRY_PLUGIN } from '../meta';\n\nconst sortPluginMeta = ({ name: a = '' }: PluginMeta, { name: b = '' }: PluginMeta) => a.localeCompare(b);\n\nexport const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n const { plugins, enabled, core, setPlugin, ...pluginContext } = usePlugins();\n const dispatch = useIntentDispatcher();\n\n // Memoize to prevent plugins from disappearing when toggling enabled.\n const installed = useMemo(\n () =>\n plugins\n .filter(({ meta }) => !core.includes(meta.id))\n .filter(({ meta }) => enabled.includes(meta.id))\n .map(({ meta }) => meta)\n .sort(sortPluginMeta),\n [],\n );\n\n const pluginIds = plugins.map(({ meta }) => meta.id);\n const available = useMemo(\n () => pluginContext.available.filter(({ id }) => !enabled.includes(id)).sort(sortPluginMeta),\n [],\n );\n const recommended = available.filter((meta) => !meta.tags?.includes('experimental'));\n const experimental = available.filter((meta) => meta.tags?.includes('experimental'));\n\n const handleChange = (id: string, enabled: boolean) => {\n setPlugin(id, enabled);\n void dispatch({\n action: ObservabilityAction.SEND_EVENT,\n data: {\n name: 'plugins.toggle',\n properties: { plugin: id, enabled },\n },\n });\n };\n\n const handleReload = () => {\n window.location.reload();\n };\n\n return (\n <>\n <DeprecatedFormInput label={t('settings show experimental label')}>\n <Input.Switch\n data-testid='pluginSettings.experimental'\n checked={settings.experimental}\n onCheckedChange={(checked) => (settings.experimental = !!checked)}\n />\n </DeprecatedFormInput>\n\n <Section label={t('settings section installed label')}>\n <PluginList\n plugins={installed}\n loaded={pluginIds}\n enabled={enabled}\n onChange={handleChange}\n onReload={handleReload}\n />\n </Section>\n\n <Section label={t('settings section recommended label')}>\n <PluginList\n plugins={recommended}\n loaded={pluginIds}\n enabled={enabled}\n onChange={handleChange}\n onReload={handleReload}\n />\n </Section>\n\n {settings.experimental && (\n <Section label={t('settings section experimental label')}>\n <PluginList\n plugins={experimental}\n loaded={pluginIds}\n enabled={enabled}\n onChange={handleChange}\n onReload={handleReload}\n />\n </Section>\n )}\n </>\n );\n};\n\nconst Section = ({ label, children }: PropsWithChildren<{ label: string }>) => {\n return (\n <div>\n <h2 className='py-2 text-sm text-subdued'>{label}</h2>\n {children}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { REGISTRY_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [REGISTRY_PLUGIN]: {\n 'plugin name': 'Registry',\n 'reload required message': 'Reload required.',\n 'settings show experimental label': 'Show experimental plugins',\n 'settings section installed label': 'Installed',\n 'settings section recommended label': 'Recommended',\n 'settings section experimental label': 'Experimental',\n 'home page label': 'Home page',\n 'source label': 'Source',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { RegistryPlugin } from './RegistryPlugin';\n\nexport default RegistryPlugin;\n\nexport * from './RegistryPlugin';\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "LocalStorageStore", "React", "useCallback", "Button", "Icon", "Input", "Link", "List", "ListItem", "useTranslation", "descriptionText", "fineBlockSize", "mx", "PluginList", "plugins", "loaded", "enabled", "onChange", "onReload", "t", "useTranslation", "REGISTRY_PLUGIN", "List", "classNames", "map", "id", "name", "description", "homePage", "source", "icon", "isEnabled", "includes", "isLoaded", "reloadRequired", "inputId", "labelId", "descriptionId", "handleChange", "useCallback", "Input", "Root", "key", "ListItem", "data-testid", "aria-describedby", "Icon", "size", "div", "role", "className", "mx", "fineBlockSize", "label", "htmlFor", "p", "descriptionText", "Link", "href", "target", "rel", "Button", "variant", "onClick", "Switch", "checked", "React", "useMemo", "useIntentDispatcher", "usePlugins", "ObservabilityAction", "Input", "useTranslation", "DeprecatedFormInput", "sortPluginMeta", "name", "a", "b", "localeCompare", "PluginSettings", "settings", "t", "useTranslation", "REGISTRY_PLUGIN", "plugins", "enabled", "core", "setPlugin", "pluginContext", "usePlugins", "dispatch", "useIntentDispatcher", "installed", "useMemo", "filter", "meta", "includes", "id", "map", "sort", "pluginIds", "available", "recommended", "tags", "experimental", "handleChange", "action", "ObservabilityAction", "SEND_EVENT", "data", "properties", "plugin", "handleReload", "window", "location", "reload", "React", "DeprecatedFormInput", "label", "Input", "Switch", "data-testid", "checked", "onCheckedChange", "Section", "PluginList", "loaded", "onChange", "onReload", "children", "div", "h2", "className", "REGISTRY_PLUGIN", "RegistryPlugin", "settings", "LocalStorageStore", "REGISTRY_PLUGIN", "meta", "ready", "prop", "key", "type", "bool", "allowUndefined", "provides", "values", "translations", "surface", "component", "data", "role", "plugin", "id", "React", "PluginSettings", "RegistryPlugin"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-registry/src/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-registry/src/meta.ts":{"bytes":959,"imports":[],"format":"esm"},"packages/plugins/plugin-registry/src/components/PluginList.tsx":{"bytes":12963,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-registry/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-registry/src/components/PluginSettings.tsx":{"bytes":11927,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/meta","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-data","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-registry/src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"},{"path":"packages/plugins/plugin-registry/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-registry/src/components/index.ts":{"bytes":627,"imports":[{"path":"packages/plugins/plugin-registry/src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"},{"path":"packages/plugins/plugin-registry/src/components/PluginSettings.tsx","kind":"import-statement","original":"./PluginSettings"}],"format":"esm"},"packages/plugins/plugin-registry/src/translations.ts":{"bytes":2142,"imports":[{"path":"packages/plugins/plugin-registry/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-registry/src/RegistryPlugin.tsx":{"bytes":4337,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-registry/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-registry/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-registry/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-registry/src/index.ts":{"bytes":804,"imports":[{"path":"packages/plugins/plugin-registry/src/RegistryPlugin.tsx","kind":"import-statement","original":"./RegistryPlugin"},{"path":"packages/plugins/plugin-registry/src/RegistryPlugin.tsx","kind":"import-statement","original":"./RegistryPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-registry/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16366},"packages/plugins/plugin-registry/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-registry/dist/lib/browser/chunk-NEMFDAOB.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/meta","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-data","kind":"import-statement","external":true}],"exports":["RegistryPlugin","default"],"entryPoint":"packages/plugins/plugin-registry/src/index.ts","inputs":{"packages/plugins/plugin-registry/src/RegistryPlugin.tsx":{"bytesInOutput":830},"packages/plugins/plugin-registry/src/components/PluginList.tsx":{"bytesInOutput":3357},"packages/plugins/plugin-registry/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-registry/src/components/PluginSettings.tsx":{"bytesInOutput":2997},"packages/plugins/plugin-registry/src/translations.ts":{"bytesInOutput":513},"packages/plugins/plugin-registry/src/index.ts":{"bytesInOutput":34}},"bytes":8260},"packages/plugins/plugin-registry/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-registry/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-registry/dist/lib/browser/chunk-NEMFDAOB.mjs","kind":"import-statement"}],"exports":["REGISTRY_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-registry/src/meta.ts","inputs":{},"bytes":165},"packages/plugins/plugin-registry/dist/lib/browser/chunk-NEMFDAOB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":456},"packages/plugins/plugin-registry/dist/lib/browser/chunk-NEMFDAOB.mjs":{"imports":[],"exports":["REGISTRY_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-registry/src/meta.ts":{"bytesInOutput":115}},"bytes":254}}}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
render: () => React.JSX.Element;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
2
|
+
import { type Meta } from '@storybook/react';
|
|
11
3
|
export declare const Default: {};
|
|
4
|
+
declare const meta: Meta;
|
|
5
|
+
export default meta;
|
|
12
6
|
//# sourceMappingURL=Icon.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,
|
|
1
|
+
{"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAyF7C,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAMX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
3
3
|
export type PluginListProps = {
|
|
4
|
-
plugins?:
|
|
4
|
+
plugins?: PluginMeta[];
|
|
5
5
|
loaded?: string[];
|
|
6
6
|
enabled?: string[];
|
|
7
7
|
onChange?: (id: string, enabled: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginList.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PluginList.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMtD,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,UAAU,qDAAqE,eAAe,sBAkF1G,CAAC"}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: ({ plugins, loaded, enabled, onChange, onReload }: import("./PluginList").PluginListProps) => React.JSX.Element;
|
|
6
|
-
render: () => React.JSX.Element;
|
|
7
|
-
decorators: import("@storybook/react/*").Decorator[];
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
2
|
+
import { type Meta } from '@storybook/react';
|
|
13
3
|
export declare const Default: {};
|
|
4
|
+
declare const meta: Meta;
|
|
5
|
+
export default meta;
|
|
14
6
|
//# sourceMappingURL=PluginList.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"PluginList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAgD7C,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAQX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"PluginSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAK/D,eAAO,MAAM,cAAc,iBAAkB;IAAE,QAAQ,EAAE,qBAAqB,CAAA;CAAE,sBAkF/E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,6BAA6B,CAAC;;;;;AAE1D,wBAGuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAMA,wBAeE"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-registry",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14-main.1366248",
|
|
4
4
|
"description": "Braneframe plugin gallery",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
|
+
"sideEffects": true,
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
12
|
+
"types": "./dist/types/src/index.d.ts",
|
|
13
|
+
"browser": "./dist/lib/browser/index.mjs"
|
|
13
14
|
},
|
|
14
15
|
"./meta": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
16
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
17
|
+
"browser": "./dist/lib/browser/meta.mjs"
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -29,11 +30,11 @@
|
|
|
29
30
|
"src"
|
|
30
31
|
],
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/plugin-observability": "0.6.
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/util": "0.6.
|
|
33
|
+
"@dxos/local-storage": "0.6.14-main.1366248",
|
|
34
|
+
"@dxos/react-ui-data": "0.6.14-main.1366248",
|
|
35
|
+
"@dxos/plugin-observability": "0.6.14-main.1366248",
|
|
36
|
+
"@dxos/app-framework": "0.6.14-main.1366248",
|
|
37
|
+
"@dxos/util": "0.6.14-main.1366248"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -41,20 +42,20 @@
|
|
|
41
42
|
"@types/react-dom": "~18.2.0",
|
|
42
43
|
"react": "~18.2.0",
|
|
43
44
|
"react-dom": "~18.2.0",
|
|
44
|
-
"vite": "
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/react-ui-
|
|
48
|
-
"@dxos/react-ui-
|
|
49
|
-
"@dxos/storybook-utils": "0.6.
|
|
45
|
+
"vite": "5.4.7",
|
|
46
|
+
"@dxos/random": "0.6.14-main.1366248",
|
|
47
|
+
"@dxos/react-ui": "0.6.14-main.1366248",
|
|
48
|
+
"@dxos/react-ui-mosaic": "0.6.14-main.1366248",
|
|
49
|
+
"@dxos/react-ui-theme": "0.6.14-main.1366248",
|
|
50
|
+
"@dxos/storybook-utils": "0.6.14-main.1366248"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"@phosphor-icons/react": "^2.1.5",
|
|
53
|
-
"react": "
|
|
54
|
-
"react-dom": "
|
|
55
|
-
"@dxos/react-ui": "0.6.
|
|
56
|
-
"@dxos/react-ui-mosaic": "0.6.
|
|
57
|
-
"@dxos/react-ui-theme": "0.6.
|
|
54
|
+
"react": "~18.2.0",
|
|
55
|
+
"react-dom": "~18.2.0",
|
|
56
|
+
"@dxos/react-ui": "0.6.14-main.1366248",
|
|
57
|
+
"@dxos/react-ui-mosaic": "0.6.14-main.1366248",
|
|
58
|
+
"@dxos/react-ui-theme": "0.6.14-main.1366248"
|
|
58
59
|
},
|
|
59
60
|
"publishConfig": {
|
|
60
61
|
"access": "public"
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
7
|
import { IconBase, type IconWeight, GithubLogo, type IconProps } from '@phosphor-icons/react';
|
|
8
|
+
import { type Meta } from '@storybook/react';
|
|
8
9
|
import React, { forwardRef, type SVGProps, type ReactElement } from 'react';
|
|
9
10
|
|
|
10
11
|
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
@@ -48,7 +49,7 @@ const createIcon = ({ name, weights }: StoryIconProps) => {
|
|
|
48
49
|
return CustomIcon;
|
|
49
50
|
};
|
|
50
51
|
|
|
51
|
-
const
|
|
52
|
+
const DefaultStory = () => {
|
|
52
53
|
const CustomIcon = createIcon({
|
|
53
54
|
name: 'GithubLogo',
|
|
54
55
|
weights: {
|
|
@@ -93,12 +94,14 @@ const Story = () => {
|
|
|
93
94
|
);
|
|
94
95
|
};
|
|
95
96
|
|
|
96
|
-
export
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
export const Default = {};
|
|
98
|
+
|
|
99
|
+
const meta: Meta = {
|
|
100
|
+
title: 'plugins/plugin-registry/Icon',
|
|
101
|
+
render: DefaultStory,
|
|
99
102
|
parameters: {
|
|
100
103
|
layout: 'centered',
|
|
101
104
|
},
|
|
102
105
|
};
|
|
103
106
|
|
|
104
|
-
export
|
|
107
|
+
export default meta;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { type Meta } from '@storybook/react';
|
|
8
8
|
import React, { useState } from 'react';
|
|
9
9
|
|
|
10
|
-
import type
|
|
10
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
11
11
|
import { faker } from '@dxos/random';
|
|
12
12
|
import { withTheme } from '@dxos/storybook-utils';
|
|
13
13
|
|
|
@@ -15,10 +15,17 @@ import { PluginList } from './PluginList';
|
|
|
15
15
|
|
|
16
16
|
faker.seed(1);
|
|
17
17
|
|
|
18
|
-
const icons = [
|
|
18
|
+
const icons = [
|
|
19
|
+
'ph--bug--regular',
|
|
20
|
+
'ph--compass--regular',
|
|
21
|
+
'ph--kanban--regular',
|
|
22
|
+
'ph--table--regular',
|
|
23
|
+
'ph--gear--regular',
|
|
24
|
+
'ph--github-logo--regular',
|
|
25
|
+
];
|
|
19
26
|
|
|
20
|
-
const
|
|
21
|
-
const [plugins] = useState<
|
|
27
|
+
const DefaultStory = () => {
|
|
28
|
+
const [plugins] = useState<PluginMeta[]>(
|
|
22
29
|
faker.helpers.multiple(
|
|
23
30
|
() => ({
|
|
24
31
|
id: `dxos.org/plugin/plugin-${faker.string.uuid()}`,
|
|
@@ -27,7 +34,7 @@ const Story = () => {
|
|
|
27
34
|
tags: faker.datatype.boolean({ probability: 0.6 })
|
|
28
35
|
? [faker.helpers.arrayElement(['experimental', 'beta', 'alpha', 'stable', 'new', '新発売'])]
|
|
29
36
|
: undefined,
|
|
30
|
-
|
|
37
|
+
icon: faker.helpers.arrayElement(icons),
|
|
31
38
|
}),
|
|
32
39
|
{ count: 16 },
|
|
33
40
|
),
|
|
@@ -45,14 +52,16 @@ const Story = () => {
|
|
|
45
52
|
);
|
|
46
53
|
};
|
|
47
54
|
|
|
48
|
-
export
|
|
49
|
-
|
|
55
|
+
export const Default = {};
|
|
56
|
+
|
|
57
|
+
const meta: Meta = {
|
|
58
|
+
title: 'plugins/plugin-registry/PluginList',
|
|
50
59
|
component: PluginList,
|
|
51
|
-
render:
|
|
60
|
+
render: DefaultStory,
|
|
52
61
|
decorators: [withTheme],
|
|
53
62
|
parameters: {
|
|
54
63
|
layout: 'centered',
|
|
55
64
|
},
|
|
56
65
|
};
|
|
57
66
|
|
|
58
|
-
export
|
|
67
|
+
export default meta;
|
|
@@ -2,37 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import React from 'react';
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
7
6
|
|
|
8
|
-
import type
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
// type ChromaticPalette,
|
|
12
|
-
// type NeutralPalette,
|
|
13
|
-
DensityProvider,
|
|
14
|
-
Input,
|
|
15
|
-
List,
|
|
16
|
-
ListItem,
|
|
17
|
-
useTranslation,
|
|
18
|
-
// Link,
|
|
19
|
-
} from '@dxos/react-ui';
|
|
20
|
-
import { descriptionText, fineBlockSize, getSize, ghostHover, mx } from '@dxos/react-ui-theme';
|
|
7
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
8
|
+
import { Button, Icon, Input, Link, List, ListItem, useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { descriptionText, fineBlockSize, mx } from '@dxos/react-ui-theme';
|
|
21
10
|
|
|
22
11
|
import { REGISTRY_PLUGIN } from '../meta';
|
|
23
12
|
|
|
24
|
-
// TODO(burdon): Reconcile with theme.
|
|
25
|
-
// const palette: { [tag: string]: ChromaticPalette | NeutralPalette } = {
|
|
26
|
-
// default: 'neutral',
|
|
27
|
-
// new: 'green',
|
|
28
|
-
// beta: 'cyan',
|
|
29
|
-
// alpha: 'purple',
|
|
30
|
-
// experimental: 'indigo',
|
|
31
|
-
// 新発売: 'red',
|
|
32
|
-
// };
|
|
33
|
-
|
|
34
13
|
export type PluginListProps = {
|
|
35
|
-
plugins?:
|
|
14
|
+
plugins?: PluginMeta[];
|
|
36
15
|
loaded?: string[];
|
|
37
16
|
enabled?: string[];
|
|
38
17
|
onChange?: (id: string, enabled: boolean) => void;
|
|
@@ -43,66 +22,82 @@ export const PluginList = ({ plugins = [], loaded = [], enabled = [], onChange,
|
|
|
43
22
|
const { t } = useTranslation(REGISTRY_PLUGIN);
|
|
44
23
|
|
|
45
24
|
return (
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
25
|
+
<List classNames='mb-4 select-none'>
|
|
26
|
+
{plugins.map(({ id, name, description, homePage, source, icon = 'ph--circle--regular' }) => {
|
|
27
|
+
const isEnabled = enabled.includes(id);
|
|
28
|
+
const isLoaded = loaded.includes(id);
|
|
29
|
+
const reloadRequired = isEnabled !== isLoaded;
|
|
30
|
+
const inputId = `${id}-input`;
|
|
31
|
+
const labelId = `${id}-label`;
|
|
32
|
+
const descriptionId = `${id}-description`;
|
|
33
|
+
const handleChange = useCallback(() => onChange?.(id, !isEnabled), [id, isEnabled, onChange]);
|
|
55
34
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
35
|
+
return (
|
|
36
|
+
<Input.Root key={id} id={inputId}>
|
|
37
|
+
<ListItem.Root
|
|
38
|
+
labelId={labelId}
|
|
39
|
+
data-testid={`pluginList.${id}`}
|
|
40
|
+
aria-describedby={descriptionId}
|
|
41
|
+
classNames='flex gap-2 plb-2 pli-2 -mli-2 rounded'
|
|
42
|
+
>
|
|
43
|
+
<Icon icon={icon} size={6} classNames='shrink-0 mbs-1' />
|
|
44
|
+
<div role='none' className={mx(fineBlockSize, 'grow pbs-1 pl-1')}>
|
|
45
|
+
<label htmlFor={inputId} id={labelId} className='truncate'>
|
|
46
|
+
{name ?? id}
|
|
47
|
+
</label>
|
|
48
|
+
{(description || reloadRequired || homePage || source) && (
|
|
49
|
+
<>
|
|
70
50
|
<div id={descriptionId} className='space-b-1 pbs-1 pbe-1'>
|
|
71
51
|
<p className={descriptionText}>{description}</p>
|
|
72
|
-
{
|
|
73
|
-
{/* {homePage && (
|
|
52
|
+
{homePage && (
|
|
74
53
|
<Link
|
|
75
54
|
href={homePage}
|
|
76
55
|
target='_blank'
|
|
77
56
|
rel='noreferrer'
|
|
78
57
|
aria-describedby={descriptionId}
|
|
79
|
-
classNames='text-xs'
|
|
58
|
+
classNames='text-xs text-description'
|
|
80
59
|
>
|
|
81
60
|
{t('home page label')}
|
|
82
|
-
<
|
|
61
|
+
<Icon
|
|
62
|
+
icon='ph--arrow-square-out--bold'
|
|
63
|
+
size={3}
|
|
64
|
+
classNames='inline-block leading-none mli-1'
|
|
65
|
+
/>
|
|
66
|
+
</Link>
|
|
67
|
+
)}
|
|
68
|
+
{source && (
|
|
69
|
+
<Link
|
|
70
|
+
href={source}
|
|
71
|
+
target='_blank'
|
|
72
|
+
rel='noreferrer'
|
|
73
|
+
aria-describedby={descriptionId}
|
|
74
|
+
classNames='text-xs text-description'
|
|
75
|
+
>
|
|
76
|
+
{t('source label')}
|
|
77
|
+
<Icon
|
|
78
|
+
icon='ph--arrow-square-out--bold'
|
|
79
|
+
size={3}
|
|
80
|
+
classNames='inline-block leading-none mli-1'
|
|
81
|
+
/>
|
|
83
82
|
</Link>
|
|
84
|
-
)} */}
|
|
85
|
-
{reloadRequired && (
|
|
86
|
-
<Button variant='ghost' classNames='p-0 gap-2' onClick={onReload}>
|
|
87
|
-
<ArrowClockwise />
|
|
88
|
-
<p className='text-sm font-medium'>{t('reload required message')}</p>
|
|
89
|
-
</Button>
|
|
90
83
|
)}
|
|
91
84
|
</div>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
85
|
+
{reloadRequired && (
|
|
86
|
+
<Button variant='ghost' classNames='p-0 gap-2' onClick={onReload}>
|
|
87
|
+
<Icon size={4} icon='ph--arrow-clockwise--regular' />
|
|
88
|
+
<p className='text-sm font-medium'>{t('reload required message')}</p>
|
|
89
|
+
</Button>
|
|
90
|
+
)}
|
|
91
|
+
</>
|
|
92
|
+
)}
|
|
93
|
+
</div>
|
|
94
|
+
<div className='pbs-1'>
|
|
95
|
+
<Input.Switch classNames='self-center' checked={isEnabled} onClick={handleChange} />
|
|
96
|
+
</div>
|
|
97
|
+
</ListItem.Root>
|
|
98
|
+
</Input.Root>
|
|
99
|
+
);
|
|
100
|
+
})}
|
|
101
|
+
</List>
|
|
107
102
|
);
|
|
108
103
|
};
|
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useMemo, type PropsWithChildren } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type PluginMeta, useIntentDispatcher, usePlugins } from '@dxos/app-framework';
|
|
8
8
|
import { ObservabilityAction } from '@dxos/plugin-observability/meta';
|
|
9
|
-
import { SettingsValue } from '@dxos/plugin-settings';
|
|
10
9
|
import { Input, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { DeprecatedFormInput } from '@dxos/react-ui-data';
|
|
11
11
|
|
|
12
12
|
import { PluginList } from './PluginList';
|
|
13
13
|
import { type RegistrySettingsProps } from '../RegistryPlugin';
|
|
14
14
|
import { REGISTRY_PLUGIN } from '../meta';
|
|
15
15
|
|
|
16
|
+
const sortPluginMeta = ({ name: a = '' }: PluginMeta, { name: b = '' }: PluginMeta) => a.localeCompare(b);
|
|
17
|
+
|
|
16
18
|
export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }) => {
|
|
17
19
|
const { t } = useTranslation(REGISTRY_PLUGIN);
|
|
18
|
-
const { enabled, core,
|
|
20
|
+
const { plugins, enabled, core, setPlugin, ...pluginContext } = usePlugins();
|
|
19
21
|
const dispatch = useIntentDispatcher();
|
|
20
22
|
|
|
21
|
-
const sort = (a: Plugin['meta'], b: Plugin['meta']) => a.name?.localeCompare(b.name ?? '') ?? 0;
|
|
22
|
-
|
|
23
23
|
// Memoize to prevent plugins from disappearing when toggling enabled.
|
|
24
24
|
const installed = useMemo(
|
|
25
25
|
() =>
|
|
@@ -27,11 +27,15 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
|
|
|
27
27
|
.filter(({ meta }) => !core.includes(meta.id))
|
|
28
28
|
.filter(({ meta }) => enabled.includes(meta.id))
|
|
29
29
|
.map(({ meta }) => meta)
|
|
30
|
-
.sort(
|
|
30
|
+
.sort(sortPluginMeta),
|
|
31
31
|
[],
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const pluginIds = plugins.map(({ meta }) => meta.id);
|
|
35
|
+
const available = useMemo(
|
|
36
|
+
() => pluginContext.available.filter(({ id }) => !enabled.includes(id)).sort(sortPluginMeta),
|
|
37
|
+
[],
|
|
38
|
+
);
|
|
35
39
|
const recommended = available.filter((meta) => !meta.tags?.includes('experimental'));
|
|
36
40
|
const experimental = available.filter((meta) => meta.tags?.includes('experimental'));
|
|
37
41
|
|
|
@@ -52,18 +56,18 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
|
|
|
52
56
|
|
|
53
57
|
return (
|
|
54
58
|
<>
|
|
55
|
-
<
|
|
59
|
+
<DeprecatedFormInput label={t('settings show experimental label')}>
|
|
56
60
|
<Input.Switch
|
|
57
61
|
data-testid='pluginSettings.experimental'
|
|
58
62
|
checked={settings.experimental}
|
|
59
63
|
onCheckedChange={(checked) => (settings.experimental = !!checked)}
|
|
60
64
|
/>
|
|
61
|
-
</
|
|
65
|
+
</DeprecatedFormInput>
|
|
62
66
|
|
|
63
67
|
<Section label={t('settings section installed label')}>
|
|
64
68
|
<PluginList
|
|
65
69
|
plugins={installed}
|
|
66
|
-
loaded={
|
|
70
|
+
loaded={pluginIds}
|
|
67
71
|
enabled={enabled}
|
|
68
72
|
onChange={handleChange}
|
|
69
73
|
onReload={handleReload}
|
|
@@ -73,7 +77,7 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
|
|
|
73
77
|
<Section label={t('settings section recommended label')}>
|
|
74
78
|
<PluginList
|
|
75
79
|
plugins={recommended}
|
|
76
|
-
loaded={
|
|
80
|
+
loaded={pluginIds}
|
|
77
81
|
enabled={enabled}
|
|
78
82
|
onChange={handleChange}
|
|
79
83
|
onReload={handleReload}
|
|
@@ -84,7 +88,7 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
|
|
|
84
88
|
<Section label={t('settings section experimental label')}>
|
|
85
89
|
<PluginList
|
|
86
90
|
plugins={experimental}
|
|
87
|
-
loaded={
|
|
91
|
+
loaded={pluginIds}
|
|
88
92
|
enabled={enabled}
|
|
89
93
|
onChange={handleChange}
|
|
90
94
|
onReload={handleReload}
|
|
@@ -98,7 +102,7 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
|
|
|
98
102
|
const Section = ({ label, children }: PropsWithChildren<{ label: string }>) => {
|
|
99
103
|
return (
|
|
100
104
|
<div>
|
|
101
|
-
<h2 className='py-2 text-sm text-
|
|
105
|
+
<h2 className='py-2 text-sm text-subdued'>{label}</h2>
|
|
102
106
|
{children}
|
|
103
107
|
</div>
|
|
104
108
|
);
|
package/src/meta.ts
CHANGED
package/src/translations.ts
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport const REGISTRY_PLUGIN = 'dxos.org/plugin/registry';\n\nexport default {\n id: REGISTRY_PLUGIN,\n name: 'Plugins',\n};\n"],
|
|
5
|
-
"mappings": ";AAIO,IAAMA,kBAAkB;AAE/B,IAAA,eAAe;EACbC,IAAID;EACJE,MAAM;AACR;",
|
|
6
|
-
"names": ["REGISTRY_PLUGIN", "id", "name"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sanity.test.d.ts","sourceRoot":"","sources":["../../../src/sanity.test.ts"],"names":[],"mappings":""}
|
package/src/sanity.test.ts
DELETED