@dxos/plugin-registry 0.8.4-main.1068cf700f → 0.8.4-main.1c7ec43d41

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 (227) hide show
  1. package/dist/lib/browser/cli/index.mjs +12 -204
  2. package/dist/lib/browser/cli/index.mjs.map +4 -4
  3. package/dist/lib/browser/index.mjs +26 -54
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +61 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/node-esm/cli/index.mjs +12 -203
  9. package/dist/lib/node-esm/cli/index.mjs.map +4 -4
  10. package/dist/lib/node-esm/index.mjs +26 -53
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/translations.mjs +63 -0
  14. package/dist/lib/node-esm/translations.mjs.map +7 -0
  15. package/dist/types/src/RegistryPlugin.d.ts +1 -0
  16. package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
  17. package/dist/types/src/{cli/plugin.d.ts → RegistryPlugin.node.d.ts} +2 -1
  18. package/dist/types/src/RegistryPlugin.node.d.ts.map +1 -0
  19. package/dist/types/src/RegistryPlugin.test.d.ts +2 -0
  20. package/dist/types/src/RegistryPlugin.test.d.ts.map +1 -0
  21. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  22. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  23. package/dist/types/src/capabilities/dev-plugin-loader.d.ts +11 -0
  24. package/dist/types/src/capabilities/dev-plugin-loader.d.ts.map +1 -0
  25. package/dist/types/src/capabilities/index.d.ts +15 -3
  26. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  27. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  28. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  29. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  30. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/settings.d.ts +14 -0
  32. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  33. package/dist/types/src/cli/index.d.ts +1 -2
  34. package/dist/types/src/cli/index.d.ts.map +1 -1
  35. package/dist/types/src/{cli/commands → commands}/disable.d.ts +2 -2
  36. package/dist/types/src/commands/disable.d.ts.map +1 -0
  37. package/dist/types/src/{cli/commands → commands}/enable.d.ts +2 -2
  38. package/dist/types/src/commands/enable.d.ts.map +1 -0
  39. package/dist/types/src/commands/index.d.ts.map +1 -0
  40. package/dist/types/src/commands/list.d.ts +7 -0
  41. package/dist/types/src/commands/list.d.ts.map +1 -0
  42. package/dist/types/src/commands/util.d.ts.map +1 -0
  43. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +46 -0
  44. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
  45. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +68 -0
  46. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
  47. package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
  48. package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
  49. package/dist/types/src/components/PluginFailureBadge/PluginFailureBadge.d.ts +20 -0
  50. package/dist/types/src/components/PluginFailureBadge/PluginFailureBadge.d.ts.map +1 -0
  51. package/dist/types/src/components/PluginFailureBadge/index.d.ts +2 -0
  52. package/dist/types/src/components/PluginFailureBadge/index.d.ts.map +1 -0
  53. package/dist/types/src/components/PluginList/PluginItem.d.ts +40 -0
  54. package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
  55. package/dist/types/src/components/PluginList/PluginList.d.ts +23 -0
  56. package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
  57. package/dist/types/src/components/PluginList/PluginList.stories.d.ts +67 -0
  58. package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
  59. package/dist/types/src/components/PluginList/index.d.ts +2 -0
  60. package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
  61. package/dist/types/src/components/RegistrySettings/RegistrySettings.d.ts +18 -0
  62. package/dist/types/src/components/RegistrySettings/RegistrySettings.d.ts.map +1 -0
  63. package/dist/types/src/components/RegistrySettings/index.d.ts +2 -0
  64. package/dist/types/src/components/RegistrySettings/index.d.ts.map +1 -0
  65. package/dist/types/src/components/index.d.ts +2 -1
  66. package/dist/types/src/components/index.d.ts.map +1 -1
  67. package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts +20 -0
  68. package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts.map +1 -0
  69. package/dist/types/src/containers/BaseRegistryArticle/index.d.ts +2 -0
  70. package/dist/types/src/containers/BaseRegistryArticle/index.d.ts.map +1 -0
  71. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -0
  72. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -0
  73. package/dist/types/src/containers/LoadPluginDialog/index.d.ts +2 -0
  74. package/dist/types/src/containers/LoadPluginDialog/index.d.ts.map +1 -0
  75. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
  76. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
  77. package/dist/types/src/containers/PluginArticle/index.d.ts +2 -0
  78. package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
  79. package/dist/types/src/containers/PublicRegistryArticle/PublicRegistryArticle.d.ts +8 -0
  80. package/dist/types/src/containers/PublicRegistryArticle/PublicRegistryArticle.d.ts.map +1 -0
  81. package/dist/types/src/containers/PublicRegistryArticle/index.d.ts +2 -0
  82. package/dist/types/src/containers/PublicRegistryArticle/index.d.ts.map +1 -0
  83. package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts +14 -0
  84. package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts.map +1 -0
  85. package/dist/types/src/containers/RegistryArticle/index.d.ts +2 -0
  86. package/dist/types/src/containers/RegistryArticle/index.d.ts.map +1 -0
  87. package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts +13 -0
  88. package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts.map +1 -0
  89. package/dist/types/src/containers/RegistrySettingsContainer/index.d.ts +2 -0
  90. package/dist/types/src/containers/RegistrySettingsContainer/index.d.ts.map +1 -0
  91. package/dist/types/src/containers/index.d.ts +8 -0
  92. package/dist/types/src/containers/index.d.ts.map +1 -0
  93. package/dist/types/src/hooks/index.d.ts +4 -0
  94. package/dist/types/src/hooks/index.d.ts.map +1 -0
  95. package/dist/types/src/hooks/use-auto-tags.d.ts +20 -0
  96. package/dist/types/src/hooks/use-auto-tags.d.ts.map +1 -0
  97. package/dist/types/src/hooks/use-registry-plugins.d.ts +15 -0
  98. package/dist/types/src/hooks/use-registry-plugins.d.ts.map +1 -0
  99. package/dist/types/src/hooks/use-update-available.d.ts +18 -0
  100. package/dist/types/src/hooks/use-update-available.d.ts.map +1 -0
  101. package/dist/types/src/index.d.ts +2 -1
  102. package/dist/types/src/index.d.ts.map +1 -1
  103. package/dist/types/src/meta.d.ts +5 -1
  104. package/dist/types/src/meta.d.ts.map +1 -1
  105. package/dist/types/src/operations/index.d.ts +3 -0
  106. package/dist/types/src/operations/index.d.ts.map +1 -0
  107. package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
  108. package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
  109. package/dist/types/src/{cli/storage.d.ts → storage.d.ts} +4 -4
  110. package/dist/types/src/storage.d.ts.map +1 -0
  111. package/dist/types/src/translations.d.ts +48 -16
  112. package/dist/types/src/translations.d.ts.map +1 -1
  113. package/dist/types/src/types.d.ts +30 -1
  114. package/dist/types/src/types.d.ts.map +1 -1
  115. package/dist/types/tsconfig.tsbuildinfo +1 -1
  116. package/package.json +50 -29
  117. package/src/{cli/plugin.ts → RegistryPlugin.node.ts} +3 -1
  118. package/src/RegistryPlugin.test.ts +24 -0
  119. package/src/RegistryPlugin.tsx +13 -5
  120. package/src/capabilities/app-graph-builder.ts +200 -0
  121. package/src/capabilities/dev-plugin-loader.ts +39 -0
  122. package/src/capabilities/index.ts +11 -3
  123. package/src/capabilities/operation-handler.ts +16 -0
  124. package/src/capabilities/react-surface.tsx +136 -0
  125. package/src/capabilities/settings.ts +34 -0
  126. package/src/cli/index.ts +1 -2
  127. package/src/components/{PluginDetail.stories.tsx → PluginDetail/PluginDetail.stories.tsx} +5 -5
  128. package/src/components/PluginDetail/PluginDetail.tsx +196 -0
  129. package/src/components/PluginDetail/index.ts +5 -0
  130. package/src/components/PluginFailureBadge/PluginFailureBadge.tsx +68 -0
  131. package/src/components/PluginFailureBadge/index.ts +5 -0
  132. package/src/components/PluginList/PluginItem.tsx +226 -0
  133. package/src/components/{PluginList.stories.tsx → PluginList/PluginList.stories.tsx} +18 -15
  134. package/src/components/PluginList/PluginList.tsx +52 -0
  135. package/src/components/PluginList/index.ts +5 -0
  136. package/src/components/RegistrySettings/RegistrySettings.tsx +120 -0
  137. package/src/components/RegistrySettings/index.ts +5 -0
  138. package/src/components/index.ts +2 -1
  139. package/src/containers/BaseRegistryArticle/BaseRegistryArticle.tsx +163 -0
  140. package/src/containers/BaseRegistryArticle/index.ts +5 -0
  141. package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +87 -0
  142. package/src/containers/LoadPluginDialog/index.ts +5 -0
  143. package/src/containers/PluginArticle/PluginArticle.tsx +336 -0
  144. package/src/containers/PluginArticle/index.ts +5 -0
  145. package/src/containers/PublicRegistryArticle/PublicRegistryArticle.tsx +192 -0
  146. package/src/containers/PublicRegistryArticle/index.ts +5 -0
  147. package/src/containers/RegistryArticle/RegistryArticle.tsx +53 -0
  148. package/src/containers/RegistryArticle/index.ts +5 -0
  149. package/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.tsx +59 -0
  150. package/src/containers/RegistrySettingsContainer/index.ts +5 -0
  151. package/src/containers/index.ts +12 -0
  152. package/src/hooks/index.ts +7 -0
  153. package/src/hooks/use-auto-tags.ts +51 -0
  154. package/src/hooks/use-registry-plugins.ts +29 -0
  155. package/src/hooks/use-update-available.ts +31 -0
  156. package/src/index.ts +5 -1
  157. package/src/meta.ts +14 -5
  158. package/src/operations/index.ts +7 -0
  159. package/src/operations/open-plugin-registry.ts +21 -0
  160. package/src/{cli/storage.ts → storage.ts} +14 -21
  161. package/src/translations.ts +52 -15
  162. package/src/types.ts +33 -1
  163. package/dist/lib/browser/app-graph-builder-YOD5EGAY.mjs +0 -167
  164. package/dist/lib/browser/app-graph-builder-YOD5EGAY.mjs.map +0 -7
  165. package/dist/lib/browser/chunk-VOAOTNGS.mjs +0 -19
  166. package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +0 -7
  167. package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs +0 -25
  168. package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs.map +0 -7
  169. package/dist/lib/browser/react-surface-IEGOKKMX.mjs +0 -337
  170. package/dist/lib/browser/react-surface-IEGOKKMX.mjs.map +0 -7
  171. package/dist/lib/node-esm/app-graph-builder-WTIS5KI5.mjs +0 -168
  172. package/dist/lib/node-esm/app-graph-builder-WTIS5KI5.mjs.map +0 -7
  173. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +0 -21
  174. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +0 -7
  175. package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs +0 -26
  176. package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs.map +0 -7
  177. package/dist/lib/node-esm/react-surface-SEJBWRMR.mjs +0 -338
  178. package/dist/lib/node-esm/react-surface-SEJBWRMR.mjs.map +0 -7
  179. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
  180. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  181. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  182. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  183. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  184. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  185. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  186. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  187. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  188. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  189. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  190. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  191. package/dist/types/src/cli/commands/disable.d.ts.map +0 -1
  192. package/dist/types/src/cli/commands/enable.d.ts.map +0 -1
  193. package/dist/types/src/cli/commands/index.d.ts.map +0 -1
  194. package/dist/types/src/cli/commands/list.d.ts +0 -7
  195. package/dist/types/src/cli/commands/list.d.ts.map +0 -1
  196. package/dist/types/src/cli/commands/util.d.ts.map +0 -1
  197. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  198. package/dist/types/src/cli/storage.d.ts.map +0 -1
  199. package/dist/types/src/components/PluginDetail.d.ts +0 -9
  200. package/dist/types/src/components/PluginDetail.d.ts.map +0 -1
  201. package/dist/types/src/components/PluginDetail.stories.d.ts +0 -33
  202. package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
  203. package/dist/types/src/components/PluginItem.d.ts +0 -13
  204. package/dist/types/src/components/PluginItem.d.ts.map +0 -1
  205. package/dist/types/src/components/PluginList.d.ts +0 -8
  206. package/dist/types/src/components/PluginList.d.ts.map +0 -1
  207. package/dist/types/src/components/PluginList.stories.d.ts +0 -34
  208. package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
  209. package/dist/types/src/components/RegistryContainer.d.ts +0 -8
  210. package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
  211. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -137
  212. package/src/capabilities/app-graph-builder/index.ts +0 -7
  213. package/src/capabilities/operation-resolver/index.ts +0 -7
  214. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -24
  215. package/src/capabilities/react-surface/index.ts +0 -7
  216. package/src/capabilities/react-surface/react-surface.tsx +0 -99
  217. package/src/components/PluginDetail.tsx +0 -81
  218. package/src/components/PluginItem.tsx +0 -120
  219. package/src/components/PluginList.tsx +0 -24
  220. package/src/components/RegistryContainer.tsx +0 -86
  221. /package/dist/types/src/{cli/commands → commands}/index.d.ts +0 -0
  222. /package/dist/types/src/{cli/commands → commands}/util.d.ts +0 -0
  223. /package/src/{cli/commands → commands}/disable.ts +0 -0
  224. /package/src/{cli/commands → commands}/enable.ts +0 -0
  225. /package/src/{cli/commands → commands}/index.ts +0 -0
  226. /package/src/{cli/commands → commands}/list.ts +0 -0
  227. /package/src/{cli/commands → commands}/util.ts +0 -0
@@ -1,223 +1,31 @@
1
- import {
2
- meta
3
- } from "../chunk-VOAOTNGS.mjs";
4
-
5
- // src/cli/plugin.ts
6
- import { Plugin as Plugin4 } from "@dxos/app-framework";
7
- import { AppPlugin } from "@dxos/app-toolkit";
8
-
9
- // src/cli/commands/index.ts
10
- import * as Command4 from "@effect/cli/Command";
11
-
12
- // src/cli/commands/disable.ts
13
- import * as Args from "@effect/cli/Args";
14
- import * as Command from "@effect/cli/Command";
15
- import * as Console from "effect/Console";
16
- import * as Effect2 from "effect/Effect";
17
- import { Plugin } from "@dxos/app-framework";
18
- import { CommandConfig } from "@dxos/cli-util";
19
- import { invariant } from "@dxos/invariant";
20
-
21
- // src/cli/storage.ts
1
+ // src/storage.ts
22
2
  import * as FileSystem from "@effect/platform/FileSystem";
23
3
  import * as Path from "@effect/platform/Path";
24
4
  import * as Effect from "effect/Effect";
25
5
  import * as Schema from "effect/Schema";
26
- import { DX_CONFIG, getProfilePath } from "@dxos/client-protocol";
27
- var PLUGINS_FILE = "plugins.json";
6
+ import * as Yaml from "yaml";
7
+ import { DX_CONFIG } from "@dxos/client-protocol";
28
8
  var PluginsSchema = Schema.Array(Schema.String);
29
- var getPluginsPath = (profile) => Effect.gen(function* () {
30
- const path = yield* Path.Path;
31
- return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);
32
- });
9
+ var getPluginsConfigPath = (profile) => `${DX_CONFIG}/plugins/${profile}.yml`;
33
10
  var loadEnabledPlugins = Effect.fn(function* ({ profile }) {
34
11
  const fs = yield* FileSystem.FileSystem;
35
- const pluginsPath = yield* getPluginsPath(profile);
12
+ const pluginsPath = getPluginsConfigPath(profile);
36
13
  const content = yield* fs.readFileString(pluginsPath).pipe(Effect.catchTag("SystemError", () => Effect.succeed("[]")));
37
- const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(Effect.catchAll(() => Effect.succeed([])));
14
+ const raw = Yaml.parse(content);
15
+ const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(Effect.catchAll(() => Effect.succeed([])));
38
16
  return parsed;
39
17
  });
40
18
  var saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }) {
41
19
  const fs = yield* FileSystem.FileSystem;
42
- const pluginsPath = yield* getPluginsPath(profile);
43
- const profileDir = getProfilePath(DX_CONFIG, profile);
44
- yield* fs.makeDirectory(profileDir, {
20
+ const path = yield* Path.Path;
21
+ const pluginsPath = getPluginsConfigPath(profile);
22
+ yield* fs.makeDirectory(path.dirname(pluginsPath), {
45
23
  recursive: true
46
24
  });
47
- const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);
48
- yield* fs.writeFileString(pluginsPath, encoded + "\n");
49
- });
50
-
51
- // src/cli/commands/disable.ts
52
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/disable.ts";
53
- var handler = Effect2.fn(function* ({ id }) {
54
- const { json, profile } = yield* CommandConfig;
55
- const manager = yield* Plugin.Service;
56
- const plugins = manager.getPlugins();
57
- const plugin2 = plugins.find((p) => p.meta.id === id);
58
- invariant(plugin2, `Plugin not found: ${id}`, {
59
- F: __dxlog_file,
60
- L: 22,
61
- S: this,
62
- A: [
63
- "plugin",
64
- "`Plugin not found: ${id}`"
65
- ]
66
- });
67
- const core = manager.getCore();
68
- invariant(!core.includes(id), `Cannot disable core plugin: ${id}`, {
69
- F: __dxlog_file,
70
- L: 25,
71
- S: this,
72
- A: [
73
- "!core.includes(id)",
74
- "`Cannot disable core plugin: ${id}`"
75
- ]
76
- });
77
- const disabled = yield* manager.disable(id);
78
- invariant(disabled, `Failed to disable plugin: ${id}`, {
79
- F: __dxlog_file,
80
- L: 28,
81
- S: this,
82
- A: [
83
- "disabled",
84
- "`Failed to disable plugin: ${id}`"
85
- ]
86
- });
87
- const enabledPlugins = manager.getEnabled();
88
- yield* saveEnabledPlugins({
89
- profile,
90
- enabled: [
91
- ...enabledPlugins
92
- ]
93
- });
94
- if (json) {
95
- yield* Console.log(JSON.stringify({
96
- id,
97
- enabled: false
98
- }, null, 2));
99
- } else {
100
- yield* Console.log(`Plugin "${plugin2.meta.name ?? id}" disabled.`);
101
- }
102
- });
103
- var disable = Command.make("disable", {
104
- id: Args.text({
105
- name: "id"
106
- }).pipe(Args.withDescription("The ID of the plugin to disable."))
107
- }, handler).pipe(Command.withDescription("Disable a plugin."));
108
-
109
- // src/cli/commands/enable.ts
110
- import * as Args2 from "@effect/cli/Args";
111
- import * as Command2 from "@effect/cli/Command";
112
- import * as Console2 from "effect/Console";
113
- import * as Effect3 from "effect/Effect";
114
- import { Plugin as Plugin2 } from "@dxos/app-framework";
115
- import { CommandConfig as CommandConfig2 } from "@dxos/cli-util";
116
- import { invariant as invariant2 } from "@dxos/invariant";
117
- var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-registry/src/cli/commands/enable.ts";
118
- var handler2 = Effect3.fn(function* ({ id }) {
119
- const { json, profile } = yield* CommandConfig2;
120
- const manager = yield* Plugin2.Service;
121
- const plugins = manager.getPlugins();
122
- const plugin2 = plugins.find((p) => p.meta.id === id);
123
- invariant2(plugin2, `Plugin not found: ${id}`, {
124
- F: __dxlog_file2,
125
- L: 22,
126
- S: this,
127
- A: [
128
- "plugin",
129
- "`Plugin not found: ${id}`"
130
- ]
131
- });
132
- const enabled = yield* manager.enable(id);
133
- invariant2(enabled, `Failed to enable plugin: ${id}`, {
134
- F: __dxlog_file2,
135
- L: 25,
136
- S: this,
137
- A: [
138
- "enabled",
139
- "`Failed to enable plugin: ${id}`"
140
- ]
141
- });
142
- const enabledPlugins = manager.getEnabled();
143
- yield* saveEnabledPlugins({
144
- profile,
145
- enabled: [
146
- ...enabledPlugins
147
- ]
148
- });
149
- if (json) {
150
- yield* Console2.log(JSON.stringify({
151
- id,
152
- enabled: true
153
- }, null, 2));
154
- } else {
155
- yield* Console2.log(`Plugin "${plugin2.meta.name ?? id}" enabled.`);
156
- }
157
- });
158
- var enable = Command2.make("enable", {
159
- id: Args2.text({
160
- name: "id"
161
- }).pipe(Args2.withDescription("The ID of the plugin to enable."))
162
- }, handler2).pipe(Command2.withDescription("Enable a plugin."));
163
-
164
- // src/cli/commands/list.ts
165
- import * as Command3 from "@effect/cli/Command";
166
- import * as Console3 from "effect/Console";
167
- import * as Effect4 from "effect/Effect";
168
- import { Plugin as Plugin3 } from "@dxos/app-framework";
169
- import { CommandConfig as CommandConfig3, printList } from "@dxos/cli-util";
170
-
171
- // src/cli/commands/util.ts
172
- import { FormBuilder } from "@dxos/cli-util";
173
- var printPlugin = (plugin2) => {
174
- const status = plugin2.core ? "core" : plugin2.enabled ? "enabled" : "disabled";
175
- return FormBuilder.make({
176
- title: plugin2.name
177
- }).pipe(FormBuilder.set("id", plugin2.id), FormBuilder.set("status", status), FormBuilder.build);
178
- };
179
-
180
- // src/cli/commands/list.ts
181
- var handler3 = Effect4.fn(function* () {
182
- const { json } = yield* CommandConfig3;
183
- const manager = yield* Plugin3.Service;
184
- const plugins = manager.getPlugins();
185
- const enabled = manager.getEnabled();
186
- const core = manager.getCore();
187
- const formattedPlugins = plugins.map((plugin2) => {
188
- const isEnabled = enabled.includes(plugin2.meta.id);
189
- const isCore = core.includes(plugin2.meta.id);
190
- return {
191
- id: plugin2.meta.id,
192
- name: plugin2.meta.name ?? plugin2.meta.id,
193
- enabled: isEnabled,
194
- core: isCore
195
- };
196
- });
197
- if (json) {
198
- yield* Console3.log(JSON.stringify(formattedPlugins, null, 2));
199
- } else {
200
- const formatted = formattedPlugins.map(printPlugin);
201
- yield* Console3.log(printList(formatted));
202
- }
25
+ const encoded = Yaml.stringify(enabled);
26
+ yield* fs.writeFileString(pluginsPath, encoded);
203
27
  });
204
- var list = Command3.make("list", {}, handler3).pipe(Command3.withDescription("List all available plugins."));
205
-
206
- // src/cli/commands/index.ts
207
- var plugin = Command4.make("plugin").pipe(Command4.withDescription("Manage plugins."), Command4.withSubcommands([
208
- enable,
209
- disable,
210
- list
211
- ]));
212
-
213
- // src/cli/plugin.ts
214
- var RegistryPlugin = Plugin4.define(meta).pipe(AppPlugin.addCommandModule({
215
- commands: [
216
- plugin
217
- ]
218
- }), Plugin4.make);
219
28
  export {
220
- RegistryPlugin,
221
29
  loadEnabledPlugins,
222
30
  saveEnabledPlugins
223
31
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/cli/plugin.ts", "../../../../src/cli/commands/index.ts", "../../../../src/cli/commands/disable.ts", "../../../../src/cli/storage.ts", "../../../../src/cli/commands/enable.ts", "../../../../src/cli/commands/list.ts", "../../../../src/cli/commands/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { meta } from '../meta';\n\nimport { plugin } from './commands';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommandModule({\n commands: [plugin],\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { disable } from './disable';\nimport { enable } from './enable';\nimport { list } from './list';\n\nexport const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(\n Command.withDescription('Manage plugins.'),\n Command.withSubcommands([enable, disable, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const core = manager.getCore();\n invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);\n\n const disabled = yield* manager.disable(id);\n invariant(disabled, `Failed to disable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" disabled.`);\n }\n});\n\nexport const disable = Command.make(\n 'disable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),\n },\n handler,\n).pipe(Command.withDescription('Disable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { DX_CONFIG, getProfilePath } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PLUGINS_FILE = 'plugins.json';\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/**\n * Get the path to the plugins configuration file for a profile.\n */\nconst getPluginsPath = (profile: string): Effect.Effect<string, never, Path.Path> =>\n Effect.gen(function* () {\n const path = yield* Path.Path;\n return path.join(getProfilePath(DX_CONFIG, profile), PLUGINS_FILE);\n });\n\n/**\n * Load enabled plugins from profile storage.\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const parsed = yield* Schema.decodeUnknown(Schema.parseJson(PluginsSchema))(content).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to profile storage.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = yield* getPluginsPath(profile);\n const profileDir = getProfilePath(DX_CONFIG, profile);\n\n yield* fs.makeDirectory(profileDir, { recursive: true });\n const encoded = Schema.encodeSync(Schema.parseJson(PluginsSchema))(enabled);\n yield* fs.writeFileString(pluginsPath, encoded + '\\n');\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig } from '@dxos/cli-util';\nimport { invariant } from '@dxos/invariant';\n\nimport { saveEnabledPlugins } from '../storage';\n\nexport const handler = Effect.fn(function* ({ id }: { id: string }) {\n const { json, profile } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);\n invariant(plugin, `Plugin not found: ${id}`);\n\n const enabled = yield* manager.enable(id);\n invariant(enabled, `Failed to enable plugin: ${id}`);\n\n // Save enabled plugins to storage\n const enabledPlugins = manager.getEnabled();\n yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });\n\n if (json) {\n yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));\n } else {\n yield* Console.log(`Plugin \"${plugin.meta.name ?? id}\" enabled.`);\n }\n});\n\nexport const enable = Command.make(\n 'enable',\n {\n id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),\n },\n handler,\n).pipe(Command.withDescription('Enable a plugin.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { CommandConfig, printList } from '@dxos/cli-util';\n\nimport { type FormattedPlugin, printPlugin } from './util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const manager = yield* Plugin.Service;\n\n const plugins = manager.getPlugins();\n const enabled = manager.getEnabled();\n const core = manager.getCore();\n\n const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {\n const isEnabled = enabled.includes(plugin.meta.id);\n const isCore = core.includes(plugin.meta.id);\n return {\n id: plugin.meta.id,\n name: plugin.meta.name ?? plugin.meta.id,\n enabled: isEnabled,\n core: isCore,\n };\n });\n\n if (json) {\n yield* Console.log(JSON.stringify(formattedPlugins, null, 2));\n } else {\n const formatted = formattedPlugins.map(printPlugin);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type FormattedPlugin = {\n id: string;\n name: string;\n enabled: boolean;\n core: boolean;\n};\n\n/**\n * Pretty prints a plugin with ANSI colors.\n */\nexport const printPlugin = (plugin: FormattedPlugin) => {\n const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';\n return FormBuilder.make({ title: plugin.name }).pipe(\n FormBuilder.set('id', plugin.id),\n FormBuilder.set('status', status),\n FormBuilder.build,\n );\n};\n"],
5
- "mappings": "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",
6
- "names": ["Plugin", "AppPlugin", "Command", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "FileSystem", "Path", "Effect", "Schema", "DX_CONFIG", "getProfilePath", "PLUGINS_FILE", "PluginsSchema", "Array", "String", "getPluginsPath", "profile", "gen", "path", "Path", "join", "getProfilePath", "DX_CONFIG", "loadEnabledPlugins", "fn", "fs", "FileSystem", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "parsed", "decodeUnknown", "parseJson", "catchAll", "saveEnabledPlugins", "enabled", "profileDir", "makeDirectory", "recursive", "encoded", "encodeSync", "writeFileString", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "core", "getCore", "includes", "disabled", "disable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "enabled", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Args", "Command", "Console", "Effect", "Plugin", "CommandConfig", "invariant", "handler", "fn", "id", "json", "profile", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "plugin", "find", "p", "meta", "invariant", "enabled", "enable", "enabledPlugins", "getEnabled", "saveEnabledPlugins", "log", "JSON", "stringify", "name", "make", "text", "pipe", "withDescription", "Command", "Console", "Effect", "Plugin", "CommandConfig", "printList", "FormBuilder", "printPlugin", "plugin", "status", "core", "enabled", "FormBuilder", "make", "title", "name", "pipe", "set", "id", "build", "handler", "fn", "json", "CommandConfig", "manager", "Plugin", "Service", "plugins", "getPlugins", "enabled", "getEnabled", "core", "getCore", "formattedPlugins", "map", "plugin", "isEnabled", "includes", "meta", "id", "isCore", "name", "log", "JSON", "stringify", "formatted", "printPlugin", "printList", "list", "make", "pipe", "withDescription", "plugin", "make", "pipe", "withDescription", "withSubcommands", "enable", "disable", "list", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCommandModule", "commands", "plugin", "make"]
3
+ "sources": ["../../../../src/storage.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\nimport * as Yaml from 'yaml';\n\nimport { DX_CONFIG } from '@dxos/client-protocol';\n\n// TODO(wittjosiah): Factor out to app-framework?\n\nconst PluginsSchema = Schema.Array(Schema.String);\n\n/** CLI-only: path to plugins/<profile>.yml (sibling to profile/). */\nconst getPluginsConfigPath = (profile: string) => `${DX_CONFIG}/plugins/${profile}.yml`;\n\n/**\n * Load enabled plugins from plugins/<profile>.yml (sibling to profile/).\n * Returns the list of enabled plugin IDs, or an empty array if the file doesn't exist.\n */\nexport const loadEnabledPlugins = Effect.fn(function* ({ profile }: { profile: string }) {\n const fs = yield* FileSystem.FileSystem;\n const pluginsPath = getPluginsConfigPath(profile);\n\n const content = yield* fs\n .readFileString(pluginsPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('[]')));\n\n const raw = Yaml.parse(content);\n const parsed = yield* Schema.decodeUnknown(PluginsSchema)(raw ?? []).pipe(\n Effect.catchAll(() => Effect.succeed([] as string[])),\n );\n\n return parsed;\n});\n\n/**\n * Save enabled plugins to plugins/<profile>.yml.\n */\nexport const saveEnabledPlugins = Effect.fn(function* ({ profile, enabled }: { profile: string; enabled: string[] }) {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const pluginsPath = getPluginsConfigPath(profile);\n yield* fs.makeDirectory(path.dirname(pluginsPath), { recursive: true });\n const encoded = Yaml.stringify(enabled);\n yield* fs.writeFileString(pluginsPath, encoded);\n});\n"],
5
+ "mappings": ";AAIA,YAAYA,gBAAgB;AAC5B,YAAYC,UAAU;AACtB,YAAYC,YAAY;AACxB,YAAYC,YAAY;AACxB,YAAYC,UAAU;AAEtB,SAASC,iBAAiB;AAI1B,IAAMC,gBAAuBC,aAAaC,aAAM;AAGhD,IAAMC,uBAAuB,CAACC,YAAoB,GAAGL,SAAAA,YAAqBK,OAAAA;AAMnE,IAAMC,qBAA4BC,UAAG,WAAW,EAAEF,QAAO,GAAuB;AACrF,QAAMG,KAAK,OAAkBb;AAC7B,QAAMc,cAAcL,qBAAqBC,OAAAA;AAEzC,QAAMK,UAAU,OAAOF,GACpBG,eAAeF,WAAAA,EACfG,KAAYC,gBAAS,eAAe,MAAaC,eAAQ,IAAA,CAAA,CAAA;AAE5D,QAAMC,MAAWC,WAAMN,OAAAA;AACvB,QAAMO,SAAS,OAAcC,qBAAcjB,aAAAA,EAAec,OAAO,CAAA,CAAE,EAAEH,KAC5DO,gBAAS,MAAaL,eAAQ,CAAA,CAAE,CAAA,CAAA;AAGzC,SAAOG;AACT,CAAA;AAKO,IAAMG,qBAA4Bb,UAAG,WAAW,EAAEF,SAASgB,QAAO,GAA0C;AACjH,QAAMb,KAAK,OAAkBb;AAC7B,QAAM2B,OAAO,OAAY1B;AACzB,QAAMa,cAAcL,qBAAqBC,OAAAA;AACzC,SAAOG,GAAGe,cAAcD,KAAKE,QAAQf,WAAAA,GAAc;IAAEgB,WAAW;EAAK,CAAA;AACrE,QAAMC,UAAeC,eAAUN,OAAAA;AAC/B,SAAOb,GAAGoB,gBAAgBnB,aAAaiB,OAAAA;AACzC,CAAA;",
6
+ "names": ["FileSystem", "Path", "Effect", "Schema", "Yaml", "DX_CONFIG", "PluginsSchema", "Array", "String", "getPluginsConfigPath", "profile", "loadEnabledPlugins", "fn", "fs", "pluginsPath", "content", "readFileString", "pipe", "catchTag", "succeed", "raw", "parse", "parsed", "decodeUnknown", "catchAll", "saveEnabledPlugins", "enabled", "path", "makeDirectory", "dirname", "recursive", "encoded", "stringify", "writeFileString"]
7
7
  }
@@ -1,63 +1,35 @@
1
- import {
2
- REGISTRY_ID,
3
- REGISTRY_KEY,
4
- meta
5
- } from "./chunk-VOAOTNGS.mjs";
6
-
7
- // src/RegistryPlugin.tsx
1
+ // src/index.ts
8
2
  import { Plugin } from "@dxos/app-framework";
9
- import { AppPlugin } from "@dxos/app-toolkit";
10
-
11
- // src/capabilities/app-graph-builder/index.ts
12
- import { Capability } from "@dxos/app-framework";
13
- var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-YOD5EGAY.mjs"));
14
3
 
15
- // src/capabilities/operation-resolver/index.ts
16
- import { Capability as Capability2 } from "@dxos/app-framework";
17
- var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-7P3NNVSR.mjs"));
18
-
19
- // src/capabilities/react-surface/index.ts
20
- import { Capability as Capability3 } from "@dxos/app-framework";
21
- var ReactSurface = Capability3.lazy("ReactSurface", () => import("./react-surface-IEGOKKMX.mjs"));
22
-
23
- // src/translations.ts
24
- var translations = [
25
- {
26
- "en-US": {
27
- [meta.id]: {
28
- "plugin name": "Registry",
29
- "details label": "Details",
30
- "home page label": "Website",
31
- "source label": "Source",
32
- "plugin registry label": "Plugin Registry",
33
- "all plugins label": "All",
34
- "installed plugins label": "Enabled",
35
- "recommended plugins label": "Recommended",
36
- "labs plugins label": "Labs",
37
- "community plugins label": "Community",
38
- "load by url label": "Load by URL (soon)",
39
- "coming soon label": "Coming soon!",
40
- "open plugin registry label": "Open plugin registry",
41
- "settings label": "Settings"
42
- }
43
- }
44
- }
45
- ];
4
+ // src/meta.ts
5
+ import { pinnedWorkspaceId } from "@dxos/app-toolkit";
6
+ import { trim } from "@dxos/util";
7
+ var REGISTRY_ID = pinnedWorkspaceId("dxos:plugin-registry");
8
+ var REGISTRY_KEY = "plugin-registry";
9
+ var CATEGORY_SEPARATOR = ">";
10
+ var registryCategoryId = (category) => `${REGISTRY_KEY}${CATEGORY_SEPARATOR}${category}`;
11
+ var getPluginPath = (pluginId) => `root/${REGISTRY_ID}/${pluginId}`;
12
+ var meta = {
13
+ id: "org.dxos.plugin.registry",
14
+ name: "Plugins",
15
+ description: trim`
16
+ Plugin management system for discovering, installing, and configuring workspace extensions.
17
+ Browse available plugins and customize your workspace capabilities.
18
+ `,
19
+ icon: "ph--squares-four--regular",
20
+ tags: [
21
+ "system"
22
+ ]
23
+ };
46
24
 
47
- // src/RegistryPlugin.tsx
48
- var RegistryPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
49
- activate: AppGraphBuilder
50
- }), AppPlugin.addOperationResolverModule({
51
- activate: OperationResolver
52
- }), AppPlugin.addSurfaceModule({
53
- activate: ReactSurface
54
- }), AppPlugin.addTranslationsModule({
55
- translations
56
- }), Plugin.make);
25
+ // src/index.ts
26
+ var RegistryPlugin = Plugin.lazy(meta, () => import("#plugin"));
57
27
  export {
58
28
  REGISTRY_ID,
59
29
  REGISTRY_KEY,
60
30
  RegistryPlugin,
61
- meta
31
+ getPluginPath,
32
+ meta,
33
+ registryCategoryId
62
34
  };
63
35
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/RegistryPlugin.tsx", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/operation-resolver/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, OperationResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const RegistryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationResolverModule({ activate: OperationResolver }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Registry',\n 'details label': 'Details',\n 'home page label': 'Website',\n 'source label': 'Source',\n 'plugin registry label': 'Plugin Registry',\n 'all plugins label': 'All',\n 'installed plugins label': 'Enabled',\n 'recommended plugins label': 'Recommended',\n 'labs plugins label': 'Labs',\n 'community plugins label': 'Community',\n 'load by url label': 'Load by URL (soon)',\n 'coming soon label': 'Coming soon!',\n 'open plugin registry label': 'Open plugin registry',\n 'settings label': 'Settings',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;;;ACD1B,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,oBAAoBC,YAAWC,KAAK,qBAAqB,MAAM,OAAO,mCAAA,CAAA;;;ACFnF,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACElE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,qBAAqB;QACrB,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,8BAA8B;QAC9B,kBAAkB;MACpB;IACF;EACF;;;;AJjBK,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,2BAA2B;EAAEF,UAAUG;AAAkB,CAAA,GACnEL,UAAUM,iBAAiB;EAAEJ,UAAUK;AAAa,CAAA,GACpDP,UAAUQ,sBAAsB;EAAEC;AAAa,CAAA,GAC/Cb,OAAOc,IAAI;",
6
- "names": ["Plugin", "AppPlugin", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "OperationResolver", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "meta", "id", "RegistryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addOperationResolverModule", "OperationResolver", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "make"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport * from './meta';\nexport const RegistryPlugin = Plugin.lazy(meta, () => import('#plugin'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { pinnedWorkspaceId } from '@dxos/app-toolkit';\nimport { trim } from '@dxos/util';\n\nexport const REGISTRY_ID = pinnedWorkspaceId('dxos:plugin-registry');\nexport const REGISTRY_KEY = 'plugin-registry';\n\n// TODO(wittjosiah): Should this be a special separator or use the standard path separator?\nconst CATEGORY_SEPARATOR = '>';\n\n/** Build a registry category node ID. */\nexport const registryCategoryId = (category: string): string => `${REGISTRY_KEY}${CATEGORY_SEPARATOR}${category}`;\n\n/** Qualified graph path to a specific plugin node. */\nexport const getPluginPath = (pluginId: string): string => `root/${REGISTRY_ID}/${pluginId}`;\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.registry',\n name: 'Plugins',\n description: trim`\n Plugin management system for discovering, installing, and configuring workspace extensions.\n Browse available plugins and customize your workspace capabilities.\n `,\n icon: 'ph--squares-four--regular',\n tags: ['system'],\n};\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACCvB,SAASC,yBAAyB;AAClC,SAASC,YAAY;AAEd,IAAMC,cAAcF,kBAAkB,sBAAA;AACtC,IAAMG,eAAe;AAG5B,IAAMC,qBAAqB;AAGpB,IAAMC,qBAAqB,CAACC,aAA6B,GAAGH,YAAAA,GAAeC,kBAAAA,GAAqBE,QAAAA;AAGhG,IAAMC,gBAAgB,CAACC,aAA6B,QAAQN,WAAAA,IAAeM,QAAAA;AAE3E,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaX;;;;EAIbY,MAAM;EACNC,MAAM;IAAC;;AACT;;;ADpBO,IAAMC,iBAAiBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
6
+ "names": ["Plugin", "pinnedWorkspaceId", "trim", "REGISTRY_ID", "REGISTRY_KEY", "CATEGORY_SEPARATOR", "registryCategoryId", "category", "getPluginPath", "pluginId", "meta", "id", "name", "description", "icon", "tags", "RegistryPlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":2360,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytes":18101,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/app-graph-builder/index.ts":{"bytes":946,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"}],"format":"esm"},"src/capabilities/operation-resolver/operation-resolver.ts":{"bytes":3054,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/operation-resolver/index.ts":{"bytes":964,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/operation-resolver/operation-resolver.ts","kind":"dynamic-import","original":"./operation-resolver"}],"format":"esm"},"src/components/PluginDetail.tsx":{"bytes":10080,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginItem.tsx":{"bytes":13174,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginList.tsx":{"bytes":2281,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/components/PluginItem.tsx","kind":"import-statement","original":"./PluginItem"}],"format":"esm"},"src/components/RegistryContainer.tsx":{"bytes":9861,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/effect","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":"src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"}],"format":"esm"},"src/components/index.ts":{"bytes":689,"imports":[{"path":"src/components/PluginDetail.tsx","kind":"import-statement","original":"./PluginDetail"},{"path":"src/components/PluginList.tsx","kind":"import-statement","original":"./PluginList"},{"path":"src/components/RegistryContainer.tsx","kind":"import-statement","original":"./RegistryContainer"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":13246,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":912,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":712,"imports":[{"path":"src/capabilities/app-graph-builder/index.ts","kind":"import-statement","original":"./app-graph-builder"},{"path":"src/capabilities/operation-resolver/index.ts","kind":"import-statement","original":"./operation-resolver"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":2832,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/RegistryPlugin.tsx":{"bytes":2618,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":557,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/RegistryPlugin.tsx","kind":"import-statement","original":"./RegistryPlugin"}],"format":"esm"},"src/cli/storage.ts":{"bytes":6743,"imports":[{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/disable.ts":{"bytes":6472,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/enable.ts":{"bytes":5826,"imports":[{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/cli/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/cli/commands/util.ts":{"bytes":2004,"imports":[{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"format":"esm"},"src/cli/commands/list.ts":{"bytes":4966,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"src/cli/commands/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"src/cli/commands/index.ts":{"bytes":1598,"imports":[{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"src/cli/commands/disable.ts","kind":"import-statement","original":"./disable"},{"path":"src/cli/commands/enable.ts","kind":"import-statement","original":"./enable"},{"path":"src/cli/commands/list.ts","kind":"import-statement","original":"./list"}],"format":"esm"},"src/cli/plugin.ts":{"bytes":1561,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/cli/commands/index.ts","kind":"import-statement","original":"./commands"}],"format":"esm"},"src/cli/index.ts":{"bytes":544,"imports":[{"path":"src/cli/plugin.ts","kind":"import-statement","original":"./plugin"},{"path":"src/cli/storage.ts","kind":"import-statement","original":"./storage"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3677},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/app-graph-builder-YOD5EGAY.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/operation-resolver-7P3NNVSR.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-IEGOKKMX.mjs","kind":"dynamic-import"}],"exports":["REGISTRY_ID","REGISTRY_KEY","RegistryPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/RegistryPlugin.tsx":{"bytesInOutput":399},"src/capabilities/app-graph-builder/index.ts":{"bytesInOutput":158},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/operation-resolver/index.ts":{"bytesInOutput":179},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/translations.ts":{"bytesInOutput":690}},"bytes":1990},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14157},"dist/lib/browser/cli/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@effect/cli/Args","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect/cli/Command","kind":"import-statement","external":true},{"path":"effect/Console","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true},{"path":"@dxos/cli-util","kind":"import-statement","external":true}],"exports":["RegistryPlugin","loadEnabledPlugins","saveEnabledPlugins"],"entryPoint":"src/cli/index.ts","inputs":{"src/cli/plugin.ts":{"bytesInOutput":228},"src/cli/commands/index.ts":{"bytesInOutput":196},"src/cli/commands/disable.ts":{"bytesInOutput":1828},"src/cli/storage.ts":{"bytesInOutput":1374},"src/cli/commands/enable.ts":{"bytesInOutput":1633},"src/cli/commands/list.ts":{"bytesInOutput":1133},"src/cli/commands/util.ts":{"bytesInOutput":317},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":7174},"dist/lib/browser/app-graph-builder-YOD5EGAY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7837},"dist/lib/browser/app-graph-builder-YOD5EGAY.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytesInOutput":4699}},"bytes":4944},"dist/lib/browser/operation-resolver-7P3NNVSR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1632},"dist/lib/browser/operation-resolver-7P3NNVSR.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/operation-resolver/operation-resolver.ts","inputs":{"src/capabilities/operation-resolver/operation-resolver.ts":{"bytesInOutput":664}},"bytes":889},"dist/lib/browser/react-surface-IEGOKKMX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25534},"dist/lib/browser/react-surface-IEGOKKMX.mjs":{"imports":[{"path":"dist/lib/browser/chunk-VOAOTNGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/effect","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","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":3271},"src/components/PluginDetail.tsx":{"bytesInOutput":3041},"src/components/index.ts":{"bytesInOutput":0},"src/components/PluginList.tsx":{"bytesInOutput":418},"src/components/PluginItem.tsx":{"bytesInOutput":3716},"src/components/RegistryContainer.tsx":{"bytesInOutput":2335}},"bytes":13228},"dist/lib/browser/chunk-VOAOTNGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1072},"dist/lib/browser/chunk-VOAOTNGS.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["REGISTRY_ID","REGISTRY_KEY","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":378}},"bytes":488}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":3497,"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":941,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/storage.ts":{"bytes":6158,"imports":[{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true}],"format":"esm"},"src/cli/index.ts":{"bytes":376,"imports":[{"path":"src/storage.ts","kind":"import-statement","original":"../storage"}],"format":"esm"},"src/translations.ts":{"bytes":8643,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2109},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["REGISTRY_ID","REGISTRY_KEY","RegistryPlugin","getPluginPath","meta","registryCategoryId"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":111},"src/meta.ts":{"bytesInOutput":705}},"bytes":1007},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3163},"dist/lib/browser/cli/index.mjs":{"imports":[{"path":"@effect/platform/FileSystem","kind":"import-statement","external":true},{"path":"@effect/platform/Path","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"yaml","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true}],"exports":["loadEnabledPlugins","saveEnabledPlugins"],"entryPoint":"src/cli/index.ts","inputs":{"src/storage.ts":{"bytesInOutput":1230},"src/cli/index.ts":{"bytesInOutput":0}},"bytes":1338},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3913},"dist/lib/browser/translations.mjs":{"imports":[{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":2852}},"bytes":2944}}}
@@ -0,0 +1,61 @@
1
+ // src/translations.ts
2
+ import { meta } from "#meta";
3
+ var translations = [
4
+ {
5
+ "en-US": {
6
+ [meta.id]: {
7
+ "plugin.name": "Registry",
8
+ "details.label": "Details",
9
+ "home-page.label": "Website",
10
+ "source.label": "Source",
11
+ "plugin-registry.label": "Plugins",
12
+ "plugin-settings.label": "Plugin Settings",
13
+ "official-plugins.label": "Official",
14
+ "installed-plugins.label": "Enabled",
15
+ "recommended-plugins.label": "Recommended",
16
+ "labs-plugins.label": "Labs",
17
+ "registry-plugins.label": "Registry",
18
+ "load-by-url.label": "Load from URL",
19
+ "load-by-url-dialog.title": "Load Plugin from URL",
20
+ "plugin-url.label": "Plugin URL",
21
+ "load-plugin.label": "Load Plugin",
22
+ "loading.label": "Loading...",
23
+ "filter.label": "Filter plugins",
24
+ "filter.placeholder": "Filter\u2026",
25
+ "registry.loading.label": "Loading registry plugins\u2026",
26
+ "registry.error.label": "Failed to load registry plugins: {{message}}",
27
+ "registry.empty.label": "No registry plugins available.",
28
+ "dev-plugin.section.title": "Dev plugin",
29
+ "dev-plugin.description": "Load a plugin from a local Vite dev server (the `composerPlugin` defaults to port 3967). Composer reattaches it on every reload, surviving HMR \u2014 useful when iterating on a community plugin against a live registry version.",
30
+ "dev-plugin.url.label": "Manifest URL",
31
+ "dev-plugin.url.description": "Defaults to the local dev server. Edit if your dev server runs on a different port.",
32
+ "dev-plugin.toggle.label": "Dev plugin",
33
+ "dev-plugin.toggle.description": "Stays on across reloads. If the dev server is offline at boot, a warning is logged and the next reload retries.",
34
+ "dev-plugin.enable.label": "Enable",
35
+ "dev-plugin.disable.label": "Disable",
36
+ "dev-plugin.busy.label": "Loading\u2026",
37
+ "dev-plugin.not-loaded.message": "Dev plugin is enabled but not currently loaded. Check that the dev server is running, then reload.",
38
+ "coming-soon.label": "Coming soon!",
39
+ "open-plugin-registry.label": "Open plugin registry",
40
+ "install.label": "Install",
41
+ "installing.label": "Installing\u2026",
42
+ "uninstall.label": "Uninstall",
43
+ "update.label": "Update",
44
+ "updating.label": "Updating\u2026",
45
+ "versions.label": "Versions",
46
+ "installed.label": "installed",
47
+ "install-version.label": "Install version",
48
+ "failure-badge.label": "Plugin failure details",
49
+ "failure-title.label": "Plugin {{phase}} failed: {{reason}}",
50
+ "failure-phase-load.label": "load",
51
+ "failure-phase-activation.label": "activation",
52
+ "failure-reason-timeout.label": "timed out",
53
+ "failure-reason-error.label": "error"
54
+ }
55
+ }
56
+ }
57
+ ];
58
+ export {
59
+ translations
60
+ };
61
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Registry',\n 'details.label': 'Details',\n 'home-page.label': 'Website',\n 'source.label': 'Source',\n 'plugin-registry.label': 'Plugins',\n 'plugin-settings.label': 'Plugin Settings',\n 'official-plugins.label': 'Official',\n 'installed-plugins.label': 'Enabled',\n 'recommended-plugins.label': 'Recommended',\n 'labs-plugins.label': 'Labs',\n 'registry-plugins.label': 'Registry',\n 'load-by-url.label': 'Load from URL',\n 'load-by-url-dialog.title': 'Load Plugin from URL',\n 'plugin-url.label': 'Plugin URL',\n 'load-plugin.label': 'Load Plugin',\n 'loading.label': 'Loading...',\n 'filter.label': 'Filter plugins',\n 'filter.placeholder': 'Filter…',\n 'registry.loading.label': 'Loading registry plugins…',\n 'registry.error.label': 'Failed to load registry plugins: {{message}}',\n 'registry.empty.label': 'No registry plugins available.',\n 'dev-plugin.section.title': 'Dev plugin',\n 'dev-plugin.description':\n 'Load a plugin from a local Vite dev server (the `composerPlugin` defaults to port 3967). Composer reattaches it on every reload, surviving HMR — useful when iterating on a community plugin against a live registry version.',\n 'dev-plugin.url.label': 'Manifest URL',\n 'dev-plugin.url.description':\n 'Defaults to the local dev server. Edit if your dev server runs on a different port.',\n 'dev-plugin.toggle.label': 'Dev plugin',\n 'dev-plugin.toggle.description':\n 'Stays on across reloads. If the dev server is offline at boot, a warning is logged and the next reload retries.',\n 'dev-plugin.enable.label': 'Enable',\n 'dev-plugin.disable.label': 'Disable',\n 'dev-plugin.busy.label': 'Loading…',\n 'dev-plugin.not-loaded.message':\n 'Dev plugin is enabled but not currently loaded. Check that the dev server is running, then reload.',\n 'coming-soon.label': 'Coming soon!',\n 'open-plugin-registry.label': 'Open plugin registry',\n 'install.label': 'Install',\n 'installing.label': 'Installing…',\n 'uninstall.label': 'Uninstall',\n 'update.label': 'Update',\n 'updating.label': 'Updating…',\n 'versions.label': 'Versions',\n 'installed.label': 'installed',\n 'install-version.label': 'Install version',\n 'failure-badge.label': 'Plugin failure details',\n 'failure-title.label': 'Plugin {{phase}} failed: {{reason}}',\n 'failure-phase-load.label': 'load',\n 'failure-phase-activation.label': 'activation',\n 'failure-reason-timeout.label': 'timed out',\n 'failure-reason-error.label': 'error',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,EAAE,GAAG;QACT,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,yBAAyB;QACzB,0BAA0B;QAC1B,2BAA2B;QAC3B,6BAA6B;QAC7B,sBAAsB;QACtB,0BAA0B;QAC1B,qBAAqB;QACrB,4BAA4B;QAC5B,oBAAoB;QACpB,qBAAqB;QACrB,iBAAiB;QACjB,gBAAgB;QAChB,sBAAsB;QACtB,0BAA0B;QAC1B,wBAAwB;QACxB,wBAAwB;QACxB,4BAA4B;QAC5B,0BACE;QACF,wBAAwB;QACxB,8BACE;QACF,2BAA2B;QAC3B,iCACE;QACF,2BAA2B;QAC3B,4BAA4B;QAC5B,yBAAyB;QACzB,iCACE;QACF,qBAAqB;QACrB,8BAA8B;QAC9B,iBAAiB;QACjB,oBAAoB;QACpB,mBAAmB;QACnB,gBAAgB;QAChB,kBAAkB;QAClB,kBAAkB;QAClB,mBAAmB;QACnB,yBAAyB;QACzB,uBAAuB;QACvB,uBAAuB;QACvB,4BAA4B;QAC5B,kCAAkC;QAClC,gCAAgC;QAChC,8BAA8B;MAChC;IACF;EACF;;",
6
+ "names": ["meta", "translations", "id"]
7
+ }