@dxos/plugin-registry 0.7.4 → 0.7.5-labs.5f04cf6

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.
Files changed (41) hide show
  1. package/dist/lib/browser/{chunk-NEMFDAOB.mjs → chunk-CMDU7LPH.mjs} +3 -3
  2. package/dist/lib/browser/chunk-CMDU7LPH.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +26 -189
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/react-surface-HKWZP7OW.mjs +179 -0
  7. package/dist/lib/browser/react-surface-HKWZP7OW.mjs.map +7 -0
  8. package/dist/lib/browser/settings-7LOHS2IV.mjs +27 -0
  9. package/dist/lib/browser/settings-7LOHS2IV.mjs.map +7 -0
  10. package/dist/types/src/RegistryPlugin.d.ts +1 -6
  11. package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
  12. package/dist/types/src/capabilities/index.d.ts +3 -0
  13. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  14. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  15. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  16. package/dist/types/src/capabilities/settings.d.ts +4 -0
  17. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  18. package/dist/types/src/components/PluginList.d.ts +4 -4
  19. package/dist/types/src/components/PluginList.d.ts.map +1 -1
  20. package/dist/types/src/components/PluginSettings.d.ts +2 -2
  21. package/dist/types/src/components/PluginSettings.d.ts.map +1 -1
  22. package/dist/types/src/index.d.ts +1 -2
  23. package/dist/types/src/index.d.ts.map +1 -1
  24. package/dist/types/src/meta.d.ts +1 -2
  25. package/dist/types/src/meta.d.ts.map +1 -1
  26. package/dist/types/src/types.d.ts +6 -0
  27. package/dist/types/src/types.d.ts.map +1 -0
  28. package/dist/types/tsconfig.tsbuildinfo +1 -0
  29. package/package.json +16 -23
  30. package/src/RegistryPlugin.tsx +21 -36
  31. package/src/capabilities/index.ts +8 -0
  32. package/src/capabilities/react-surface.tsx +24 -0
  33. package/src/capabilities/settings.ts +19 -0
  34. package/src/components/PluginList.tsx +6 -6
  35. package/src/components/PluginSettings.tsx +26 -23
  36. package/src/index.ts +1 -4
  37. package/src/meta.ts +1 -1
  38. package/src/types.ts +13 -0
  39. package/dist/lib/browser/chunk-NEMFDAOB.mjs.map +0 -7
  40. package/dist/lib/browser/meta.mjs +0 -9
  41. package/dist/lib/browser/meta.mjs.map +0 -7
@@ -1,12 +1,12 @@
1
1
  // packages/plugins/plugin-registry/src/meta.ts
2
2
  var REGISTRY_PLUGIN = "dxos.org/plugin/registry";
3
- var meta_default = {
3
+ var meta = {
4
4
  id: REGISTRY_PLUGIN,
5
5
  name: "Plugins"
6
6
  };
7
7
 
8
8
  export {
9
9
  REGISTRY_PLUGIN,
10
- meta_default
10
+ meta
11
11
  };
12
- //# sourceMappingURL=chunk-NEMFDAOB.mjs.map
12
+ //# sourceMappingURL=chunk-CMDU7LPH.mjs.map
@@ -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 const meta = {\n id: REGISTRY_PLUGIN,\n name: 'Plugins',\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";AAMO,IAAMA,kBAAkB;AAExB,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;AACR;",
6
+ "names": ["REGISTRY_PLUGIN", "meta", "id", "name"]
7
+ }
@@ -1,164 +1,15 @@
1
1
  import {
2
2
  REGISTRY_PLUGIN,
3
- meta_default
4
- } from "./chunk-NEMFDAOB.mjs";
3
+ meta
4
+ } from "./chunk-CMDU7LPH.mjs";
5
5
 
6
6
  // packages/plugins/plugin-registry/src/RegistryPlugin.tsx
7
- import React3 from "react";
8
- import { LocalStorageStore } from "@dxos/local-storage";
7
+ import { Capabilities, contributes, defineModule, definePlugin, Events } from "@dxos/app-framework";
9
8
 
10
- // packages/plugins/plugin-registry/src/components/PluginList.tsx
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";
14
- var PluginList = ({ plugins = [], loaded = [], enabled = [], onChange, onReload }) => {
15
- const { t } = useTranslation(REGISTRY_PLUGIN);
16
- return /* @__PURE__ */ React.createElement(List, {
17
- classNames: "mb-4 select-none"
18
- }, plugins.map(({ id, name, description, homePage, source, icon = "ph--circle--regular" }) => {
19
- const isEnabled = enabled.includes(id);
20
- const isLoaded = loaded.includes(id);
21
- const reloadRequired = isEnabled !== isLoaded;
22
- const inputId = `${id}-input`;
23
- const labelId = `${id}-label`;
24
- const descriptionId = `${id}-description`;
25
- const handleChange = useCallback(() => onChange?.(id, !isEnabled), [
26
- id,
27
- isEnabled,
28
- onChange
29
- ]);
30
- return /* @__PURE__ */ React.createElement(Input.Root, {
31
- key: id,
32
- id: inputId
33
- }, /* @__PURE__ */ React.createElement(ListItem.Root, {
34
- labelId,
35
- "data-testid": `pluginList.${id}`,
36
- "aria-describedby": descriptionId,
37
- classNames: "flex gap-2 plb-2 pli-2 -mli-2 rounded"
38
- }, /* @__PURE__ */ React.createElement(Icon, {
39
- icon,
40
- size: 6,
41
- classNames: "shrink-0 mbs-1"
42
- }), /* @__PURE__ */ React.createElement("div", {
43
- role: "none",
44
- className: mx(fineBlockSize, "grow pbs-1 pl-1")
45
- }, /* @__PURE__ */ React.createElement("label", {
46
- htmlFor: inputId,
47
- id: labelId,
48
- className: "truncate"
49
- }, name ?? id), (description || reloadRequired || homePage || source) && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
50
- id: descriptionId,
51
- className: "space-b-1 pbs-1 pbe-1"
52
- }, /* @__PURE__ */ React.createElement("p", {
53
- className: descriptionText
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, {
75
- variant: "ghost",
76
- classNames: "p-0 gap-2",
77
- onClick: onReload
78
- }, /* @__PURE__ */ React.createElement(Icon, {
79
- size: 4,
80
- icon: "ph--arrow-clockwise--regular"
81
- }), /* @__PURE__ */ React.createElement("p", {
82
- className: "text-sm font-medium"
83
- }, t("reload required message"))))), /* @__PURE__ */ React.createElement("div", {
84
- className: "pbs-1"
85
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
86
- classNames: "self-center",
87
- checked: isEnabled,
88
- onClick: handleChange
89
- }))));
90
- }));
91
- };
92
-
93
- // packages/plugins/plugin-registry/src/components/PluginSettings.tsx
94
- import React2, { useMemo } from "react";
95
- import { useIntentDispatcher, usePlugins } from "@dxos/app-framework";
96
- import { ObservabilityAction } from "@dxos/plugin-observability/meta";
97
- import { Input as Input2, useTranslation as useTranslation2 } from "@dxos/react-ui";
98
- import { DeprecatedFormInput } from "@dxos/react-ui-form";
99
- var sortPluginMeta = ({ name: a = "" }, { name: b = "" }) => a.localeCompare(b);
100
- var PluginSettings = ({ settings }) => {
101
- const { t } = useTranslation2(REGISTRY_PLUGIN);
102
- const { plugins, enabled, core, setPlugin, ...pluginContext } = usePlugins();
103
- const dispatch = useIntentDispatcher();
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), []);
107
- const recommended = available.filter((meta) => !meta.tags?.includes("experimental"));
108
- const experimental = available.filter((meta) => meta.tags?.includes("experimental"));
109
- const handleChange = (id, enabled2) => {
110
- setPlugin(id, enabled2);
111
- void dispatch({
112
- action: ObservabilityAction.SEND_EVENT,
113
- data: {
114
- name: "plugins.toggle",
115
- properties: {
116
- plugin: id,
117
- enabled: enabled2
118
- }
119
- }
120
- });
121
- };
122
- const handleReload = () => {
123
- window.location.reload();
124
- };
125
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
126
- label: t("settings show experimental label")
127
- }, /* @__PURE__ */ React2.createElement(Input2.Switch, {
128
- "data-testid": "pluginSettings.experimental",
129
- checked: settings.experimental,
130
- onCheckedChange: (checked) => settings.experimental = !!checked
131
- })), /* @__PURE__ */ React2.createElement(Section, {
132
- label: t("settings section installed label")
133
- }, /* @__PURE__ */ React2.createElement(PluginList, {
134
- plugins: installed,
135
- loaded: pluginIds,
136
- enabled,
137
- onChange: handleChange,
138
- onReload: handleReload
139
- })), /* @__PURE__ */ React2.createElement(Section, {
140
- label: t("settings section recommended label")
141
- }, /* @__PURE__ */ React2.createElement(PluginList, {
142
- plugins: recommended,
143
- loaded: pluginIds,
144
- enabled,
145
- onChange: handleChange,
146
- onReload: handleReload
147
- })), settings.experimental && /* @__PURE__ */ React2.createElement(Section, {
148
- label: t("settings section experimental label")
149
- }, /* @__PURE__ */ React2.createElement(PluginList, {
150
- plugins: experimental,
151
- loaded: pluginIds,
152
- enabled,
153
- onChange: handleChange,
154
- onReload: handleReload
155
- })));
156
- };
157
- var Section = ({ label, children }) => {
158
- return /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("h2", {
159
- className: "py-2 text-sm text-subdued"
160
- }, label), children);
161
- };
9
+ // packages/plugins/plugin-registry/src/capabilities/index.ts
10
+ import { lazy } from "@dxos/app-framework";
11
+ var ReactSurface = lazy(() => import("./react-surface-HKWZP7OW.mjs"));
12
+ var RegistrySettings = lazy(() => import("./settings-7LOHS2IV.mjs"));
162
13
 
163
14
  // packages/plugins/plugin-registry/src/translations.ts
164
15
  var translations_default = [
@@ -179,40 +30,26 @@ var translations_default = [
179
30
  ];
180
31
 
181
32
  // packages/plugins/plugin-registry/src/RegistryPlugin.tsx
182
- var RegistryPlugin = () => {
183
- const settings = new LocalStorageStore(REGISTRY_PLUGIN);
184
- return {
185
- meta: meta_default,
186
- ready: async () => {
187
- settings.prop({
188
- key: "experimental",
189
- type: LocalStorageStore.bool({
190
- allowUndefined: true
191
- })
192
- });
193
- },
194
- provides: {
195
- settings: settings.values,
196
- translations: translations_default,
197
- surface: {
198
- component: ({ data, role }) => {
199
- switch (role) {
200
- case "settings":
201
- return data.plugin === meta_default.id ? /* @__PURE__ */ React3.createElement(PluginSettings, {
202
- settings: settings.values
203
- }) : null;
204
- }
205
- return null;
206
- }
207
- }
208
- }
209
- };
210
- };
211
-
212
- // packages/plugins/plugin-registry/src/index.ts
213
- var src_default = RegistryPlugin;
33
+ var RegistryPlugin = () => definePlugin(meta, [
34
+ defineModule({
35
+ id: `${meta.id}/module/settings`,
36
+ activatesOn: Events.SetupSettings,
37
+ activate: RegistrySettings
38
+ }),
39
+ defineModule({
40
+ id: `${meta.id}/module/translations`,
41
+ activatesOn: Events.SetupTranslations,
42
+ activate: () => contributes(Capabilities.Translations, translations_default)
43
+ }),
44
+ defineModule({
45
+ id: `${meta.id}/module/react-surface`,
46
+ activatesOn: Events.Startup,
47
+ activate: ReactSurface
48
+ })
49
+ ]);
214
50
  export {
51
+ REGISTRY_PLUGIN,
215
52
  RegistryPlugin,
216
- src_default as default
53
+ meta
217
54
  };
218
55
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 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 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-form';\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": ";;;;;;AAIA,OAAOA,YAAW;AAGlB,SAASC,yBAAyB;;;ACHlC,OAAOC,SAASC,mBAAmB;AAGnC,SAASC,QAAQC,MAAMC,OAAOC,MAAMC,MAAMC,UAAUC,sBAAsB;AAC1E,SAASC,iBAAiBC,eAAeC,UAAU;AAY5C,IAAMC,aAAa,CAAC,EAAEC,UAAU,CAAA,GAAIC,SAAS,CAAA,GAAIC,UAAU,CAAA,GAAIC,UAAUC,SAAQ,MAAmB;AACzG,QAAM,EAAEC,EAAC,IAAKC,eAAeC,eAAAA;AAE7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IACCzC,SAASkB;IACTwB,QAAQ1B;IACRf;IACA0C,UAAUtB;IACVuB,UAAUhB;OAIbhC,SAASwB,gBACR,gBAAAY,OAAA,cAACQ,SAAAA;IAAQN,OAAOrC,EAAE,qCAAA;KAChB,gBAAAmC,OAAA,cAACS,YAAAA;IACCzC,SAASoB;IACTsB,QAAQ1B;IACRf;IACA0C,UAAUtB;IACVuB,UAAUhB;;AAMtB;AAEA,IAAMY,UAAU,CAAC,EAAEN,OAAOW,SAAQ,MAAwC;AACxE,SACE,gBAAAb,OAAA,cAACc,OAAAA,MACC,gBAAAd,OAAA,cAACe,MAAAA;IAAGC,WAAU;KAA6Bd,KAAAA,GAC1CW,QAAAA;AAGP;;;ACtGA,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACI,eAAAA,GAAkB;QACjB,eAAe;QACf,2BAA2B;QAC3B,oCAAoC;QACpC,oCAAoC;QACpC,sCAAsC;QACtC,uCAAuC;QACvC,mBAAmB;QACnB,gBAAgB;MAClB;IACF;EACF;;;;AHDK,IAAMC,iBAAiB,MAAA;AAC5B,QAAMC,WAAW,IAAIC,kBAAyCC,eAAAA;AAE9D,SAAO;IACLC;IACAC,OAAO,YAAA;AACLJ,eAASK,KAAK;QAAEC,KAAK;QAAgBC,MAAMN,kBAAkBO,KAAK;UAAEC,gBAAgB;QAAK,CAAA;MAAG,CAAA;IAC9F;IACAC,UAAU;MACRV,UAAUA,SAASW;MACnBC;MACAC,SAAS;QACPC,WAAW,CAAC,EAAEC,MAAMC,KAAI,MAAE;AACxB,kBAAQA,MAAAA;YACN,KAAK;AACH,qBAAOD,KAAKE,WAAWd,aAAKe,KAAK,gBAAAC,OAAA,cAACC,gBAAAA;gBAAepB,UAAUA,SAASW;mBAAa;UACrF;AAEA,iBAAO;QACT;MACF;IACF;EACF;AACF;;;AIpCA,IAAA,cAAeU;",
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"]
3
+ "sources": ["../../../src/RegistryPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';\n\nimport { ReactSurface, RegistrySettings } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\n\nexport const RegistryPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/settings`,\n activatesOn: Events.SetupSettings,\n activate: RegistrySettings,\n }),\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: ReactSurface,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ReactSurface = lazy(() => import('./react-surface'));\nexport const RegistrySettings = lazy(() => import('./settings'));\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"],
5
+ "mappings": ";;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAc;;;ACA9E,SAASC,YAAY;AAEd,IAAMC,eAAeC,KAAK,MAAM,OAAO,8BAAA,CAAA;AACvC,IAAMC,mBAAmBD,KAAK,MAAM,OAAO,yBAAA,CAAA;;;ACDlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,eAAAA,GAAkB;QACjB,eAAe;QACf,2BAA2B;QAC3B,oCAAoC;QACpC,oCAAoC;QACpC,sCAAsC;QACtC,uCAAuC;QACvC,mBAAmB;QACnB,gBAAgB;MAClB;IACF;EACF;;;;AFVK,IAAMC,iBAAiB,MAC5BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAUC;EACZ,CAAA;EACAN,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOI;IACpBF,UAAU,MAAMG,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAX,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOS;IACpBP,UAAUQ;EACZ,CAAA;CACD;",
6
+ "names": ["Capabilities", "contributes", "defineModule", "definePlugin", "Events", "lazy", "ReactSurface", "lazy", "RegistrySettings", "REGISTRY_PLUGIN", "RegistryPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupSettings", "activate", "RegistrySettings", "SetupTranslations", "contributes", "Capabilities", "Translations", "translations", "Startup", "ReactSurface"]
7
7
  }
@@ -1 +1 @@
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-form","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-form","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
+ {"inputs":{"packages/plugins/plugin-registry/src/meta.ts":{"bytes":996,"imports":[],"format":"esm"},"packages/plugins/plugin-registry/src/components/PluginList.tsx":{"bytes":13039,"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":12383,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","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/capabilities/react-surface.tsx":{"bytes":3000,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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"}],"format":"esm"},"packages/plugins/plugin-registry/src/types.ts":{"bytes":1179,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-registry/src/capabilities/settings.ts":{"bytes":1995,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-registry/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-registry/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-registry/src/capabilities/index.ts":{"bytes":1074,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-registry/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"packages/plugins/plugin-registry/src/capabilities/settings.ts","kind":"dynamic-import","original":"./settings"}],"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":3436,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-registry/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":602,"imports":[{"path":"packages/plugins/plugin-registry/src/meta.ts","kind":"import-statement","original":"./meta"},{"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":2905},"packages/plugins/plugin-registry/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-registry/dist/lib/browser/chunk-CMDU7LPH.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-registry/dist/lib/browser/react-surface-HKWZP7OW.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-registry/dist/lib/browser/settings-7LOHS2IV.mjs","kind":"dynamic-import"}],"exports":["REGISTRY_PLUGIN","RegistryPlugin","meta"],"entryPoint":"packages/plugins/plugin-registry/src/index.ts","inputs":{"packages/plugins/plugin-registry/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-registry/src/RegistryPlugin.tsx":{"bytesInOutput":598},"packages/plugins/plugin-registry/src/capabilities/index.ts":{"bytesInOutput":185},"packages/plugins/plugin-registry/src/translations.ts":{"bytesInOutput":513}},"bytes":1693},"packages/plugins/plugin-registry/dist/lib/browser/react-surface-HKWZP7OW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15023},"packages/plugins/plugin-registry/dist/lib/browser/react-surface-HKWZP7OW.mjs":{"imports":[{"path":"packages/plugins/plugin-registry/dist/lib/browser/chunk-CMDU7LPH.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-registry/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-registry/src/capabilities/react-surface.tsx":{"bytesInOutput":542},"packages/plugins/plugin-registry/src/components/PluginList.tsx":{"bytesInOutput":3369},"packages/plugins/plugin-registry/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-registry/src/components/PluginSettings.tsx":{"bytesInOutput":3160}},"bytes":7518},"packages/plugins/plugin-registry/dist/lib/browser/settings-7LOHS2IV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1505},"packages/plugins/plugin-registry/dist/lib/browser/settings-7LOHS2IV.mjs":{"imports":[{"path":"packages/plugins/plugin-registry/dist/lib/browser/chunk-CMDU7LPH.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-registry/src/capabilities/settings.ts","inputs":{"packages/plugins/plugin-registry/src/capabilities/settings.ts":{"bytesInOutput":311},"packages/plugins/plugin-registry/src/types.ts":{"bytesInOutput":132}},"bytes":772},"packages/plugins/plugin-registry/dist/lib/browser/chunk-CMDU7LPH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":471},"packages/plugins/plugin-registry/dist/lib/browser/chunk-CMDU7LPH.mjs":{"imports":[],"exports":["REGISTRY_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-registry/src/meta.ts":{"bytesInOutput":107}},"bytes":238}}}
@@ -0,0 +1,179 @@
1
+ import {
2
+ REGISTRY_PLUGIN,
3
+ meta
4
+ } from "./chunk-CMDU7LPH.mjs";
5
+
6
+ // packages/plugins/plugin-registry/src/capabilities/react-surface.tsx
7
+ import React3 from "react";
8
+ import { Capabilities, contributes, createSurface, useCapability } from "@dxos/app-framework";
9
+
10
+ // packages/plugins/plugin-registry/src/components/PluginList.tsx
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";
14
+ var PluginList = ({ plugins = [], installed = [], enabled = [], onChange, onReload }) => {
15
+ const { t } = useTranslation(REGISTRY_PLUGIN);
16
+ return /* @__PURE__ */ React.createElement(List, {
17
+ classNames: "mb-4 select-none"
18
+ }, plugins.map(({ id, name, description, homePage, source, icon = "ph--circle--regular" }) => {
19
+ const isEnabled = enabled.includes(id);
20
+ const isInstalled = installed.includes(id);
21
+ const reloadRequired = isEnabled !== isInstalled;
22
+ const inputId = `${id}-input`;
23
+ const labelId = `${id}-label`;
24
+ const descriptionId = `${id}-description`;
25
+ const handleChange = useCallback(() => onChange?.(id, !isEnabled), [
26
+ id,
27
+ isEnabled,
28
+ onChange
29
+ ]);
30
+ return /* @__PURE__ */ React.createElement(Input.Root, {
31
+ key: id,
32
+ id: inputId
33
+ }, /* @__PURE__ */ React.createElement(ListItem.Root, {
34
+ labelId,
35
+ "data-testid": `pluginList.${id}`,
36
+ "aria-describedby": descriptionId,
37
+ classNames: "flex gap-2 plb-2 pli-2 -mli-2 rounded"
38
+ }, /* @__PURE__ */ React.createElement(Icon, {
39
+ icon,
40
+ size: 6,
41
+ classNames: "shrink-0 mbs-1"
42
+ }), /* @__PURE__ */ React.createElement("div", {
43
+ role: "none",
44
+ className: mx(fineBlockSize, "grow pbs-1 pl-1")
45
+ }, /* @__PURE__ */ React.createElement("label", {
46
+ htmlFor: inputId,
47
+ id: labelId,
48
+ className: "truncate"
49
+ }, name ?? id), (description || reloadRequired || homePage || source) && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
50
+ id: descriptionId,
51
+ className: "space-b-1 pbs-1 pbe-1"
52
+ }, /* @__PURE__ */ React.createElement("p", {
53
+ className: descriptionText
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, {
75
+ variant: "ghost",
76
+ classNames: "p-0 gap-2",
77
+ onClick: onReload
78
+ }, /* @__PURE__ */ React.createElement(Icon, {
79
+ size: 4,
80
+ icon: "ph--arrow-clockwise--regular"
81
+ }), /* @__PURE__ */ React.createElement("p", {
82
+ className: "text-sm font-medium"
83
+ }, t("reload required message"))))), /* @__PURE__ */ React.createElement("div", {
84
+ className: "pbs-1"
85
+ }, /* @__PURE__ */ React.createElement(Input.Switch, {
86
+ classNames: "self-center",
87
+ checked: isEnabled,
88
+ onClick: handleChange
89
+ }))));
90
+ }));
91
+ };
92
+
93
+ // packages/plugins/plugin-registry/src/components/PluginSettings.tsx
94
+ import React2, { useMemo } from "react";
95
+ import { createIntent, useIntentDispatcher, usePluginManager } from "@dxos/app-framework";
96
+ import { ObservabilityAction } from "@dxos/plugin-observability/types";
97
+ import { Input as Input2, useTranslation as useTranslation2 } from "@dxos/react-ui";
98
+ import { DeprecatedFormInput } from "@dxos/react-ui-form";
99
+ var sortPluginMeta = ({ name: a = "" }, { name: b = "" }) => a.localeCompare(b);
100
+ var PluginSettings = ({ settings }) => {
101
+ const { t } = useTranslation2(REGISTRY_PLUGIN);
102
+ const manager = usePluginManager();
103
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
104
+ const installed = useMemo(() => manager.plugins.filter(({ meta: meta2 }) => !manager.core.includes(meta2.id)).filter(({ meta: meta2 }) => manager.enabled.includes(meta2.id)).map(({ meta: meta2 }) => meta2).sort(sortPluginMeta), []);
105
+ const pluginIds = useMemo(() => installed.map((meta2) => meta2.id), [
106
+ installed
107
+ ]);
108
+ const available = useMemo(() => manager.plugins.map(({ meta: meta2 }) => meta2).filter(({ id }) => !manager.enabled.includes(id)).sort(sortPluginMeta), []);
109
+ const recommended = available.filter((meta2) => !meta2.tags?.includes("experimental"));
110
+ const experimental = available.filter((meta2) => meta2.tags?.includes("experimental"));
111
+ const handleChange = (id, enabled) => {
112
+ enabled ? manager.enable(id) : manager.disable(id);
113
+ void dispatch(createIntent(ObservabilityAction.SendEvent, {
114
+ name: "plugins.toggle",
115
+ properties: {
116
+ plugin: id,
117
+ enabled
118
+ }
119
+ }));
120
+ };
121
+ const handleReload = () => {
122
+ window.location.reload();
123
+ };
124
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DeprecatedFormInput, {
125
+ label: t("settings show experimental label")
126
+ }, /* @__PURE__ */ React2.createElement(Input2.Switch, {
127
+ "data-testid": "pluginSettings.experimental",
128
+ checked: settings.experimental,
129
+ onCheckedChange: (checked) => settings.experimental = !!checked
130
+ })), /* @__PURE__ */ React2.createElement(Section, {
131
+ label: t("settings section installed label")
132
+ }, /* @__PURE__ */ React2.createElement(PluginList, {
133
+ plugins: installed,
134
+ installed: pluginIds,
135
+ enabled: manager.enabled,
136
+ onChange: handleChange,
137
+ onReload: handleReload
138
+ })), /* @__PURE__ */ React2.createElement(Section, {
139
+ label: t("settings section recommended label")
140
+ }, /* @__PURE__ */ React2.createElement(PluginList, {
141
+ plugins: recommended,
142
+ installed: pluginIds,
143
+ enabled: manager.enabled,
144
+ onChange: handleChange,
145
+ onReload: handleReload
146
+ })), settings.experimental && /* @__PURE__ */ React2.createElement(Section, {
147
+ label: t("settings section experimental label")
148
+ }, /* @__PURE__ */ React2.createElement(PluginList, {
149
+ plugins: experimental,
150
+ installed: pluginIds,
151
+ enabled: manager.enabled,
152
+ onChange: handleChange,
153
+ onReload: handleReload
154
+ })));
155
+ };
156
+ var Section = ({ label, children }) => {
157
+ return /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("h2", {
158
+ className: "py-2 text-sm text-subdued"
159
+ }, label), children);
160
+ };
161
+
162
+ // packages/plugins/plugin-registry/src/capabilities/react-surface.tsx
163
+ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
164
+ createSurface({
165
+ id: meta.id,
166
+ role: "settings",
167
+ filter: (data) => data.subject === REGISTRY_PLUGIN,
168
+ component: () => {
169
+ const settings = useCapability(Capabilities.SettingsStore).getStore(REGISTRY_PLUGIN).value;
170
+ return /* @__PURE__ */ React3.createElement(PluginSettings, {
171
+ settings
172
+ });
173
+ }
174
+ })
175
+ ]);
176
+ export {
177
+ react_surface_default as default
178
+ };
179
+ //# sourceMappingURL=react-surface-HKWZP7OW.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/PluginList.tsx", "../../../src/components/PluginSettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';\n\nimport { PluginSettings } from '../components';\nimport { meta, REGISTRY_PLUGIN } from '../meta';\nimport { type RegistrySettings } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: 'settings',\n filter: (data): data is any => data.subject === REGISTRY_PLUGIN,\n component: () => {\n const settings = useCapability(Capabilities.SettingsStore).getStore<RegistrySettings>(REGISTRY_PLUGIN)!.value;\n return <PluginSettings settings={settings} />;\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?: readonly PluginMeta[];\n installed?: readonly string[];\n enabled?: readonly string[];\n onChange?: (id: string, enabled: boolean) => void;\n onReload?: () => void;\n};\n\nexport const PluginList = ({ plugins = [], installed = [], 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 isInstalled = installed.includes(id);\n const reloadRequired = isEnabled !== isInstalled;\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 { createIntent, type PluginMeta, useIntentDispatcher, usePluginManager } from '@dxos/app-framework';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { PluginList } from './PluginList';\nimport { REGISTRY_PLUGIN } from '../meta';\nimport { type RegistrySettings } from '../types';\n\nconst sortPluginMeta = ({ name: a = '' }: PluginMeta, { name: b = '' }: PluginMeta) => a.localeCompare(b);\n\nexport const PluginSettings = ({ settings }: { settings: RegistrySettings }) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n const manager = usePluginManager();\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n // Memoize to prevent plugins from disappearing when toggling enabled.\n const installed = useMemo(\n () =>\n manager.plugins\n .filter(({ meta }) => !manager.core.includes(meta.id))\n .filter(({ meta }) => manager.enabled.includes(meta.id))\n .map(({ meta }) => meta)\n .sort(sortPluginMeta),\n [],\n );\n const pluginIds = useMemo(() => installed.map((meta) => meta.id), [installed]);\n\n const available = useMemo(\n () =>\n manager.plugins\n .map(({ meta }) => meta)\n .filter(({ id }) => !manager.enabled.includes(id))\n .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 enabled ? manager.enable(id) : manager.disable(id);\n void dispatch(\n createIntent(ObservabilityAction.SendEvent, {\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 installed={pluginIds}\n enabled={manager.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 installed={pluginIds}\n enabled={manager.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 installed={pluginIds}\n enabled={manager.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"],
5
+ "mappings": ";;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,aAAaC,eAAeC,qBAAqB;;;ACFxE,OAAOC,SAASC,mBAAmB;AAGnC,SAASC,QAAQC,MAAMC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QAAM;IACXC,eAAY;IACZC,SAAS3C,SAASwB;IAClBoB,iBAAiB,CAACD,YAAa3C,SAASwB,eAAe,CAAC,CAACmB;OAI7D,gBAAAN,OAAA,cAACQ,SAAAA;IAAQN,OAAOtC,EAAE,kCAAA;KAChB,gBAAAoC,OAAA,cAACS,YAAAA;IACCnC,SAASF;IACTA,WAAWW;IACXH,SAASb,QAAQa;IACjB8B,UAAUtB;IACVuB,UAAUf;OAId,gBAAAI,OAAA,cAACQ,SAAAA;IAAQN,OAAOtC,EAAE,oCAAA;KAChB,gBAAAoC,OAAA,cAACS,YAAAA;IACCnC,SAASW;IACTb,WAAWW;IACXH,SAASb,QAAQa;IACjB8B,UAAUtB;IACVuB,UAAUf;OAIbjC,SAASwB,gBACR,gBAAAa,OAAA,cAACQ,SAAAA;IAAQN,OAAOtC,EAAE,qCAAA;KAChB,gBAAAoC,OAAA,cAACS,YAAAA;IACCnC,SAASa;IACTf,WAAWW;IACXH,SAASb,QAAQa;IACjB8B,UAAUtB;IACVuB,UAAUf;;AAMtB;AAEA,IAAMY,UAAU,CAAC,EAAEN,OAAOU,SAAQ,MAAwC;AACxE,SACE,gBAAAZ,OAAA,cAACa,OAAAA,MACC,gBAAAb,OAAA,cAACc,MAAAA;IAAGC,WAAU;KAA6Bb,KAAAA,GAC1CU,QAAAA;AAGP;;;AFnGA,IAAA,wBAAe,MACbI,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAIC,KAAKD;IACTE,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYC;IAChDC,WAAW,MAAA;AACT,YAAMC,WAAWC,cAAcZ,aAAaa,aAAa,EAAEC,SAA2BL,eAAAA,EAAkBM;AACxG,aAAO,gBAAAC,OAAA,cAACC,gBAAAA;QAAeN;;IACzB;EACF,CAAA;CACD;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "useCapability", "React", "useCallback", "Button", "Icon", "Input", "Link", "List", "ListItem", "useTranslation", "descriptionText", "fineBlockSize", "mx", "PluginList", "plugins", "installed", "enabled", "onChange", "onReload", "t", "useTranslation", "REGISTRY_PLUGIN", "List", "classNames", "map", "id", "name", "description", "homePage", "source", "icon", "isEnabled", "includes", "isInstalled", "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", "createIntent", "useIntentDispatcher", "usePluginManager", "ObservabilityAction", "Input", "useTranslation", "DeprecatedFormInput", "sortPluginMeta", "name", "a", "b", "localeCompare", "PluginSettings", "settings", "t", "useTranslation", "REGISTRY_PLUGIN", "manager", "usePluginManager", "dispatchPromise", "dispatch", "useIntentDispatcher", "installed", "useMemo", "plugins", "filter", "meta", "core", "includes", "id", "enabled", "map", "sort", "pluginIds", "available", "recommended", "tags", "experimental", "handleChange", "enable", "disable", "createIntent", "ObservabilityAction", "SendEvent", "properties", "plugin", "handleReload", "window", "location", "reload", "React", "DeprecatedFormInput", "label", "Input", "Switch", "data-testid", "checked", "onCheckedChange", "Section", "PluginList", "onChange", "onReload", "children", "div", "h2", "className", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "subject", "REGISTRY_PLUGIN", "component", "settings", "useCapability", "SettingsStore", "getStore", "value", "React", "PluginSettings"]
7
+ }
@@ -0,0 +1,27 @@
1
+ import {
2
+ REGISTRY_PLUGIN
3
+ } from "./chunk-CMDU7LPH.mjs";
4
+
5
+ // packages/plugins/plugin-registry/src/capabilities/settings.ts
6
+ import { Capabilities, contributes } from "@dxos/app-framework";
7
+ import { create } from "@dxos/live-object";
8
+
9
+ // packages/plugins/plugin-registry/src/types.ts
10
+ import { S } from "@dxos/echo-schema";
11
+ var RegistrySettingsSchema = S.mutable(S.Struct({
12
+ experimental: S.optional(S.Boolean)
13
+ }));
14
+
15
+ // packages/plugins/plugin-registry/src/capabilities/settings.ts
16
+ var settings_default = () => {
17
+ const settings = create({});
18
+ return contributes(Capabilities.Settings, {
19
+ schema: RegistrySettingsSchema,
20
+ prefix: REGISTRY_PLUGIN,
21
+ value: settings
22
+ });
23
+ };
24
+ export {
25
+ settings_default as default
26
+ };
27
+ //# sourceMappingURL=settings-7LOHS2IV.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/settings.ts", "../../../src/types.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { create } from '@dxos/live-object';\n\nimport { REGISTRY_PLUGIN } from '../meta';\nimport { type RegistrySettings, RegistrySettingsSchema } from '../types';\n\nexport default () => {\n const settings = create<RegistrySettings>({});\n\n return contributes(Capabilities.Settings, {\n schema: RegistrySettingsSchema,\n prefix: REGISTRY_PLUGIN,\n value: settings,\n });\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { S } from '@dxos/echo-schema';\n\nexport const RegistrySettingsSchema = S.mutable(\n S.Struct({\n experimental: S.optional(S.Boolean),\n }),\n);\n\nexport type RegistrySettings = S.Schema.Type<typeof RegistrySettingsSchema>;\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,cAAc;;;ACDvB,SAASC,SAAS;AAEX,IAAMC,yBAAyBC,EAAEC,QACtCD,EAAEE,OAAO;EACPC,cAAcH,EAAEI,SAASJ,EAAEK,OAAO;AACpC,CAAA,CAAA;;;ADCF,IAAA,mBAAe,MAAA;AACb,QAAMC,WAAWC,OAAyB,CAAC,CAAA;AAE3C,SAAOC,YAAYC,aAAaC,UAAU;IACxCC,QAAQC;IACRC,QAAQC;IACRC,OAAOT;EACT,CAAA;AACF;",
6
+ "names": ["Capabilities", "contributes", "create", "S", "RegistrySettingsSchema", "S", "mutable", "Struct", "experimental", "optional", "Boolean", "settings", "create", "contributes", "Capabilities", "Settings", "schema", "RegistrySettingsSchema", "prefix", "REGISTRY_PLUGIN", "value"]
7
+ }
@@ -1,7 +1,2 @@
1
- import type { PluginDefinition, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
2
- export type RegistrySettingsProps = {
3
- experimental?: boolean;
4
- };
5
- export type RegistryPluginProvides = SurfaceProvides & TranslationsProvides & SettingsProvides<RegistrySettingsProps>;
6
- export declare const RegistryPlugin: () => PluginDefinition<RegistryPluginProvides>;
1
+ export declare const RegistryPlugin: () => import("@dxos/app-framework").Plugin;
7
2
  //# sourceMappingURL=RegistryPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RegistryPlugin.d.ts","sourceRoot":"","sources":["../../../src/RegistryPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAOrH,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,oBAAoB,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;AAEtH,eAAO,MAAM,cAAc,QAAO,gBAAgB,CAAC,sBAAsB,CAuBxE,CAAC"}
1
+ {"version":3,"file":"RegistryPlugin.d.ts","sourceRoot":"","sources":["../../../src/RegistryPlugin.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,4CAiBvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const ReactSurface: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface>>;
2
+ export declare const RegistrySettings: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.Settings>>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,iIAAwC,CAAC;AAClE,eAAO,MAAM,gBAAgB,6HAAmC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Capabilities } from '@dxos/app-framework';
2
+ declare const _default: () => import("@dxos/app-framework").Capability<Capabilities.ReactSurface>;
3
+ export default _default;
4
+ //# sourceMappingURL=react-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA6C,MAAM,qBAAqB,CAAC;;AAM9F,wBAWK"}
@@ -0,0 +1,4 @@
1
+ import { Capabilities } from '@dxos/app-framework';
2
+ declare const _default: () => import("@dxos/app-framework").Capability<Capabilities.Settings>;
3
+ export default _default;
4
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;;AAMhE,wBAQE"}
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { type PluginMeta } from '@dxos/app-framework';
3
3
  export type PluginListProps = {
4
- plugins?: PluginMeta[];
5
- loaded?: string[];
6
- enabled?: string[];
4
+ plugins?: readonly PluginMeta[];
5
+ installed?: readonly string[];
6
+ enabled?: readonly string[];
7
7
  onChange?: (id: string, enabled: boolean) => void;
8
8
  onReload?: () => void;
9
9
  };
10
- export declare const PluginList: ({ plugins, loaded, enabled, onChange, onReload }: PluginListProps) => React.JSX.Element;
10
+ export declare const PluginList: ({ plugins, installed, enabled, onChange, onReload }: PluginListProps) => React.JSX.Element;
11
11
  //# sourceMappingURL=PluginList.d.ts.map
@@ -1 +1 @@
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
+ {"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,SAAS,UAAU,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,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,wDAAwE,eAAe,sBAkF7G,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type RegistrySettingsProps } from '../RegistryPlugin';
2
+ import { type RegistrySettings } from '../types';
3
3
  export declare const PluginSettings: ({ settings }: {
4
- settings: RegistrySettingsProps;
4
+ settings: RegistrySettings;
5
5
  }) => React.JSX.Element;
6
6
  //# sourceMappingURL=PluginSettings.d.ts.map
@@ -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;AAK/D,eAAO,MAAM,cAAc,iBAAkB;IAAE,QAAQ,EAAE,qBAAqB,CAAA;CAAE,sBAkF/E,CAAC"}
1
+ {"version":3,"file":"PluginSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,cAAc,iBAAkB;IAAE,QAAQ,EAAE,gBAAgB,CAAA;CAAE,sBAqF1E,CAAC"}
@@ -1,4 +1,3 @@
1
- import { RegistryPlugin } from './RegistryPlugin';
2
- export default RegistryPlugin;
1
+ export * from './meta';
3
2
  export * from './RegistryPlugin';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAe,cAAc,CAAC;AAE9B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  export declare const REGISTRY_PLUGIN = "dxos.org/plugin/registry";
2
- declare const _default: {
2
+ export declare const meta: {
3
3
  id: string;
4
4
  name: string;
5
5
  };
6
- export default _default;
7
6
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,6BAA6B,CAAC;;;;;AAE1D,wBAGuB"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,eAAO,MAAM,IAAI;;;CAGK,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { S } from '@dxos/echo-schema';
2
+ export declare const RegistrySettingsSchema: S.mutable<S.Struct<{
3
+ experimental: S.optional<typeof S.Boolean>;
4
+ }>>;
5
+ export type RegistrySettings = S.Schema.Type<typeof RegistrySettingsSchema>;
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,eAAO,MAAM,sBAAsB;;GAIlC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":"5.7.2"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-registry",
3
- "version": "0.7.4",
3
+ "version": "0.7.5-labs.5f04cf6",
4
4
  "description": "Braneframe plugin gallery",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -11,30 +11,23 @@
11
11
  ".": {
12
12
  "types": "./dist/types/src/index.d.ts",
13
13
  "browser": "./dist/lib/browser/index.mjs"
14
- },
15
- "./meta": {
16
- "types": "./dist/types/src/meta.d.ts",
17
- "browser": "./dist/lib/browser/meta.mjs"
18
14
  }
19
15
  },
20
16
  "types": "dist/types/src/index.d.ts",
21
17
  "typesVersions": {
22
- "*": {
23
- "meta": [
24
- "dist/types/src/meta.d.ts"
25
- ]
26
- }
18
+ "*": {}
27
19
  },
28
20
  "files": [
29
21
  "dist",
30
22
  "src"
31
23
  ],
32
24
  "dependencies": {
33
- "@dxos/app-framework": "0.7.4",
34
- "@dxos/local-storage": "0.7.4",
35
- "@dxos/plugin-observability": "0.7.4",
36
- "@dxos/react-ui-form": "0.7.4",
37
- "@dxos/util": "0.7.4"
25
+ "@dxos/app-framework": "0.7.5-labs.5f04cf6",
26
+ "@dxos/echo-schema": "0.7.5-labs.5f04cf6",
27
+ "@dxos/live-object": "0.7.5-labs.5f04cf6",
28
+ "@dxos/react-ui-form": "0.7.5-labs.5f04cf6",
29
+ "@dxos/util": "0.7.5-labs.5f04cf6",
30
+ "@dxos/plugin-observability": "0.7.5-labs.5f04cf6"
38
31
  },
39
32
  "devDependencies": {
40
33
  "@phosphor-icons/react": "^2.1.5",
@@ -43,19 +36,19 @@
43
36
  "react": "~18.2.0",
44
37
  "react-dom": "~18.2.0",
45
38
  "vite": "5.4.7",
46
- "@dxos/random": "0.7.4",
47
- "@dxos/react-ui": "0.7.4",
48
- "@dxos/react-ui-theme": "0.7.4",
49
- "@dxos/react-ui-mosaic": "0.7.4",
50
- "@dxos/storybook-utils": "0.7.4"
39
+ "@dxos/react-ui": "0.7.5-labs.5f04cf6",
40
+ "@dxos/random": "0.7.5-labs.5f04cf6",
41
+ "@dxos/react-ui-mosaic": "0.7.5-labs.5f04cf6",
42
+ "@dxos/react-ui-theme": "0.7.5-labs.5f04cf6",
43
+ "@dxos/storybook-utils": "0.7.5-labs.5f04cf6"
51
44
  },
52
45
  "peerDependencies": {
53
46
  "@phosphor-icons/react": "^2.1.5",
54
47
  "react": "~18.2.0",
55
48
  "react-dom": "~18.2.0",
56
- "@dxos/react-ui": "0.7.4",
57
- "@dxos/react-ui-theme": "0.7.4",
58
- "@dxos/react-ui-mosaic": "0.7.4"
49
+ "@dxos/react-ui": "0.7.5-labs.5f04cf6",
50
+ "@dxos/react-ui-mosaic": "0.7.5-labs.5f04cf6",
51
+ "@dxos/react-ui-theme": "0.7.5-labs.5f04cf6"
59
52
  },
60
53
  "publishConfig": {
61
54
  "access": "public"
@@ -2,42 +2,27 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import React from 'react';
5
+ import { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';
6
6
 
7
- import type { PluginDefinition, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
8
- import { LocalStorageStore } from '@dxos/local-storage';
9
-
10
- import { PluginSettings } from './components';
11
- import meta, { REGISTRY_PLUGIN } from './meta';
7
+ import { ReactSurface, RegistrySettings } from './capabilities';
8
+ import { meta } from './meta';
12
9
  import translations from './translations';
13
10
 
14
- export type RegistrySettingsProps = {
15
- experimental?: boolean;
16
- };
17
-
18
- export type RegistryPluginProvides = SurfaceProvides & TranslationsProvides & SettingsProvides<RegistrySettingsProps>;
19
-
20
- export const RegistryPlugin = (): PluginDefinition<RegistryPluginProvides> => {
21
- const settings = new LocalStorageStore<RegistrySettingsProps>(REGISTRY_PLUGIN);
22
-
23
- return {
24
- meta,
25
- ready: async () => {
26
- settings.prop({ key: 'experimental', type: LocalStorageStore.bool({ allowUndefined: true }) });
27
- },
28
- provides: {
29
- settings: settings.values,
30
- translations,
31
- surface: {
32
- component: ({ data, role }) => {
33
- switch (role) {
34
- case 'settings':
35
- return data.plugin === meta.id ? <PluginSettings settings={settings.values} /> : null;
36
- }
37
-
38
- return null;
39
- },
40
- },
41
- },
42
- };
43
- };
11
+ export const RegistryPlugin = () =>
12
+ definePlugin(meta, [
13
+ defineModule({
14
+ id: `${meta.id}/module/settings`,
15
+ activatesOn: Events.SetupSettings,
16
+ activate: RegistrySettings,
17
+ }),
18
+ defineModule({
19
+ id: `${meta.id}/module/translations`,
20
+ activatesOn: Events.SetupTranslations,
21
+ activate: () => contributes(Capabilities.Translations, translations),
22
+ }),
23
+ defineModule({
24
+ id: `${meta.id}/module/react-surface`,
25
+ activatesOn: Events.Startup,
26
+ activate: ReactSurface,
27
+ }),
28
+ ]);
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { lazy } from '@dxos/app-framework';
6
+
7
+ export const ReactSurface = lazy(() => import('./react-surface'));
8
+ export const RegistrySettings = lazy(() => import('./settings'));
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';
8
+
9
+ import { PluginSettings } from '../components';
10
+ import { meta, REGISTRY_PLUGIN } from '../meta';
11
+ import { type RegistrySettings } from '../types';
12
+
13
+ export default () =>
14
+ contributes(Capabilities.ReactSurface, [
15
+ createSurface({
16
+ id: meta.id,
17
+ role: 'settings',
18
+ filter: (data): data is any => data.subject === REGISTRY_PLUGIN,
19
+ component: () => {
20
+ const settings = useCapability(Capabilities.SettingsStore).getStore<RegistrySettings>(REGISTRY_PLUGIN)!.value;
21
+ return <PluginSettings settings={settings} />;
22
+ },
23
+ }),
24
+ ]);
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capabilities, contributes } from '@dxos/app-framework';
6
+ import { create } from '@dxos/live-object';
7
+
8
+ import { REGISTRY_PLUGIN } from '../meta';
9
+ import { type RegistrySettings, RegistrySettingsSchema } from '../types';
10
+
11
+ export default () => {
12
+ const settings = create<RegistrySettings>({});
13
+
14
+ return contributes(Capabilities.Settings, {
15
+ schema: RegistrySettingsSchema,
16
+ prefix: REGISTRY_PLUGIN,
17
+ value: settings,
18
+ });
19
+ };
@@ -11,22 +11,22 @@ import { descriptionText, fineBlockSize, mx } from '@dxos/react-ui-theme';
11
11
  import { REGISTRY_PLUGIN } from '../meta';
12
12
 
13
13
  export type PluginListProps = {
14
- plugins?: PluginMeta[];
15
- loaded?: string[];
16
- enabled?: string[];
14
+ plugins?: readonly PluginMeta[];
15
+ installed?: readonly string[];
16
+ enabled?: readonly string[];
17
17
  onChange?: (id: string, enabled: boolean) => void;
18
18
  onReload?: () => void;
19
19
  };
20
20
 
21
- export const PluginList = ({ plugins = [], loaded = [], enabled = [], onChange, onReload }: PluginListProps) => {
21
+ export const PluginList = ({ plugins = [], installed = [], enabled = [], onChange, onReload }: PluginListProps) => {
22
22
  const { t } = useTranslation(REGISTRY_PLUGIN);
23
23
 
24
24
  return (
25
25
  <List classNames='mb-4 select-none'>
26
26
  {plugins.map(({ id, name, description, homePage, source, icon = 'ph--circle--regular' }) => {
27
27
  const isEnabled = enabled.includes(id);
28
- const isLoaded = loaded.includes(id);
29
- const reloadRequired = isEnabled !== isLoaded;
28
+ const isInstalled = installed.includes(id);
29
+ const reloadRequired = isEnabled !== isInstalled;
30
30
  const inputId = `${id}-input`;
31
31
  const labelId = `${id}-label`;
32
32
  const descriptionId = `${id}-description`;
@@ -4,50 +4,53 @@
4
4
 
5
5
  import React, { useMemo, type PropsWithChildren } from 'react';
6
6
 
7
- import { type PluginMeta, useIntentDispatcher, usePlugins } from '@dxos/app-framework';
8
- import { ObservabilityAction } from '@dxos/plugin-observability/meta';
7
+ import { createIntent, type PluginMeta, useIntentDispatcher, usePluginManager } from '@dxos/app-framework';
8
+ import { ObservabilityAction } from '@dxos/plugin-observability/types';
9
9
  import { Input, useTranslation } from '@dxos/react-ui';
10
10
  import { DeprecatedFormInput } from '@dxos/react-ui-form';
11
11
 
12
12
  import { PluginList } from './PluginList';
13
- import { type RegistrySettingsProps } from '../RegistryPlugin';
14
13
  import { REGISTRY_PLUGIN } from '../meta';
14
+ import { type RegistrySettings } from '../types';
15
15
 
16
16
  const sortPluginMeta = ({ name: a = '' }: PluginMeta, { name: b = '' }: PluginMeta) => a.localeCompare(b);
17
17
 
18
- export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }) => {
18
+ export const PluginSettings = ({ settings }: { settings: RegistrySettings }) => {
19
19
  const { t } = useTranslation(REGISTRY_PLUGIN);
20
- const { plugins, enabled, core, setPlugin, ...pluginContext } = usePlugins();
21
- const dispatch = useIntentDispatcher();
20
+ const manager = usePluginManager();
21
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
22
22
 
23
23
  // Memoize to prevent plugins from disappearing when toggling enabled.
24
24
  const installed = useMemo(
25
25
  () =>
26
- plugins
27
- .filter(({ meta }) => !core.includes(meta.id))
28
- .filter(({ meta }) => enabled.includes(meta.id))
26
+ manager.plugins
27
+ .filter(({ meta }) => !manager.core.includes(meta.id))
28
+ .filter(({ meta }) => manager.enabled.includes(meta.id))
29
29
  .map(({ meta }) => meta)
30
30
  .sort(sortPluginMeta),
31
31
  [],
32
32
  );
33
+ const pluginIds = useMemo(() => installed.map((meta) => meta.id), [installed]);
33
34
 
34
- const pluginIds = plugins.map(({ meta }) => meta.id);
35
35
  const available = useMemo(
36
- () => pluginContext.available.filter(({ id }) => !enabled.includes(id)).sort(sortPluginMeta),
36
+ () =>
37
+ manager.plugins
38
+ .map(({ meta }) => meta)
39
+ .filter(({ id }) => !manager.enabled.includes(id))
40
+ .sort(sortPluginMeta),
37
41
  [],
38
42
  );
39
43
  const recommended = available.filter((meta) => !meta.tags?.includes('experimental'));
40
44
  const experimental = available.filter((meta) => meta.tags?.includes('experimental'));
41
45
 
42
46
  const handleChange = (id: string, enabled: boolean) => {
43
- setPlugin(id, enabled);
44
- void dispatch({
45
- action: ObservabilityAction.SEND_EVENT,
46
- data: {
47
+ enabled ? manager.enable(id) : manager.disable(id);
48
+ void dispatch(
49
+ createIntent(ObservabilityAction.SendEvent, {
47
50
  name: 'plugins.toggle',
48
51
  properties: { plugin: id, enabled },
49
- },
50
- });
52
+ }),
53
+ );
51
54
  };
52
55
 
53
56
  const handleReload = () => {
@@ -67,8 +70,8 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
67
70
  <Section label={t('settings section installed label')}>
68
71
  <PluginList
69
72
  plugins={installed}
70
- loaded={pluginIds}
71
- enabled={enabled}
73
+ installed={pluginIds}
74
+ enabled={manager.enabled}
72
75
  onChange={handleChange}
73
76
  onReload={handleReload}
74
77
  />
@@ -77,8 +80,8 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
77
80
  <Section label={t('settings section recommended label')}>
78
81
  <PluginList
79
82
  plugins={recommended}
80
- loaded={pluginIds}
81
- enabled={enabled}
83
+ installed={pluginIds}
84
+ enabled={manager.enabled}
82
85
  onChange={handleChange}
83
86
  onReload={handleReload}
84
87
  />
@@ -88,8 +91,8 @@ export const PluginSettings = ({ settings }: { settings: RegistrySettingsProps }
88
91
  <Section label={t('settings section experimental label')}>
89
92
  <PluginList
90
93
  plugins={experimental}
91
- loaded={pluginIds}
92
- enabled={enabled}
94
+ installed={pluginIds}
95
+ enabled={manager.enabled}
93
96
  onChange={handleChange}
94
97
  onReload={handleReload}
95
98
  />
package/src/index.ts CHANGED
@@ -2,8 +2,5 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { RegistryPlugin } from './RegistryPlugin';
6
-
7
- export default RegistryPlugin;
8
-
5
+ export * from './meta';
9
6
  export * from './RegistryPlugin';
package/src/meta.ts CHANGED
@@ -6,7 +6,7 @@ import { type PluginMeta } from '@dxos/app-framework';
6
6
 
7
7
  export const REGISTRY_PLUGIN = 'dxos.org/plugin/registry';
8
8
 
9
- export default {
9
+ export const meta = {
10
10
  id: REGISTRY_PLUGIN,
11
11
  name: 'Plugins',
12
12
  } satisfies PluginMeta;
package/src/types.ts ADDED
@@ -0,0 +1,13 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { S } from '@dxos/echo-schema';
6
+
7
+ export const RegistrySettingsSchema = S.mutable(
8
+ S.Struct({
9
+ experimental: S.optional(S.Boolean),
10
+ }),
11
+ );
12
+
13
+ export type RegistrySettings = S.Schema.Type<typeof RegistrySettingsSchema>;
@@ -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';\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,9 +0,0 @@
1
- import {
2
- REGISTRY_PLUGIN,
3
- meta_default
4
- } from "./chunk-NEMFDAOB.mjs";
5
- export {
6
- REGISTRY_PLUGIN,
7
- meta_default as default
8
- };
9
- //# sourceMappingURL=meta.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }