@dxos/plugin-registry 0.8.4-main.7ace549 → 0.8.4-main.937b3ca
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs +166 -0
- package/dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XPEFEID2.mjs → chunk-VOAOTNGS.mjs} +1 -1
- package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +223 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +22 -29
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-P5PKLPRT.mjs +24 -0
- package/dist/lib/browser/operation-resolver-P5PKLPRT.mjs.map +7 -0
- package/dist/lib/browser/react-surface-IIM6T7IA.mjs +337 -0
- package/dist/lib/browser/react-surface-IIM6T7IA.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-56JXLOGZ.mjs +167 -0
- package/dist/lib/node-esm/app-graph-builder-56JXLOGZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +21 -0
- package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +224 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +63 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/operation-resolver-3ZB5W3T3.mjs +25 -0
- package/dist/lib/node-esm/operation-resolver-3ZB5W3T3.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-F67P7RC3.mjs +338 -0
- package/dist/lib/node-esm/react-surface-F67P7RC3.mjs.map +7 -0
- package/dist/types/src/RegistryPlugin.d.ts +2 -1
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/cli/commands/disable.d.ts +11 -0
- package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/enable.d.ts +11 -0
- package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +3 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/list.d.ts +7 -0
- package/dist/types/src/cli/commands/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/util.d.ts +11 -0
- package/dist/types/src/cli/commands/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +3 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/storage.d.ts +18 -0
- package/dist/types/src/cli/storage.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail.d.ts +3 -3
- package/dist/types/src/components/PluginDetail.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts +1 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginItem.d.ts +2 -2
- package/dist/types/src/components/PluginItem.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.d.ts +1 -1
- package/dist/types/src/components/PluginList.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.stories.d.ts.map +1 -1
- package/dist/types/src/components/RegistryContainer.d.ts +4 -3
- package/dist/types/src/components/RegistryContainer.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +47 -31
- package/src/RegistryPlugin.tsx +9 -24
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +136 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +3 -5
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +23 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +99 -0
- package/src/cli/commands/disable.ts +47 -0
- package/src/cli/commands/enable.ts +44 -0
- package/src/cli/commands/index.ts +14 -0
- package/src/cli/commands/list.ts +41 -0
- package/src/cli/commands/util.ts +24 -0
- package/src/cli/index.ts +6 -0
- package/src/cli/plugin.ts +16 -0
- package/src/cli/storage.ts +57 -0
- package/src/components/PluginDetail.stories.tsx +14 -16
- package/src/components/PluginDetail.tsx +8 -11
- package/src/components/PluginItem.tsx +5 -5
- package/src/components/PluginList.stories.tsx +14 -17
- package/src/components/PluginList.tsx +2 -2
- package/src/components/RegistryContainer.tsx +43 -36
- package/src/meta.ts +2 -2
- package/dist/lib/browser/app-graph-builder-6CNBP3A4.mjs +0 -162
- package/dist/lib/browser/app-graph-builder-6CNBP3A4.mjs.map +0 -7
- package/dist/lib/browser/chunk-XPEFEID2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LKNUYBTN.mjs +0 -23
- package/dist/lib/browser/intent-resolver-LKNUYBTN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IGCXOVE2.mjs +0 -359
- package/dist/lib/browser/react-surface-IGCXOVE2.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -156
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/capabilities/react-surface.tsx +0 -86
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":2364,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/app-graph-builder.ts":{"bytes":21463,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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/intent-resolver.ts":{"bytes":2395,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginDetail.tsx":{"bytes":10120,"imports":[{"path":"@preact-signals/safe-react/tracking","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-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginItem.tsx":{"bytes":13702,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginList.tsx":{"bytes":2423,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"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":9200,"imports":[{"path":"@preact-signals/safe-react/tracking","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/react","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","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.tsx":{"bytes":11855,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","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/index.ts":{"bytes":1302,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","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":3978,"imports":[{"path":"@dxos/app-framework","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"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3697},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XPEFEID2.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/app-graph-builder-6CNBP3A4.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/intent-resolver-LKNUYBTN.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/react-surface-IGCXOVE2.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":750},"src/capabilities/index.ts":{"bytesInOutput":268},"src/translations.ts":{"bytesInOutput":690}},"bytes":1997},"dist/lib/browser/app-graph-builder-6CNBP3A4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9191},"dist/lib/browser/app-graph-builder-6CNBP3A4.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XPEFEID2.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder.ts":{"bytesInOutput":4828}},"bytes":5055},"dist/lib/browser/intent-resolver-LKNUYBTN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1264},"dist/lib/browser/intent-resolver-LKNUYBTN.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XPEFEID2.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/intent-resolver.ts","inputs":{"src/capabilities/intent-resolver.ts":{"bytesInOutput":463}},"bytes":660},"dist/lib/browser/react-surface-IGCXOVE2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23815},"dist/lib/browser/react-surface-IGCXOVE2.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XPEFEID2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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/react","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":3028},"src/components/PluginDetail.tsx":{"bytesInOutput":3242},"src/components/index.ts":{"bytesInOutput":0},"src/components/PluginList.tsx":{"bytesInOutput":565},"src/components/PluginItem.tsx":{"bytesInOutput":4047},"src/components/RegistryContainer.tsx":{"bytesInOutput":2346}},"bytes":13647},"dist/lib/browser/chunk-XPEFEID2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1075},"dist/lib/browser/chunk-XPEFEID2.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":2360,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytes":17933,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":2923,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":9779,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","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":9572,"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","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","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-mosaic","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":13293,"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/react","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":2595,"imports":[{"path":"@dxos/app-framework","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":1462,"imports":[{"path":"@dxos/app-framework","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":3658},"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-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/operation-resolver-P5PKLPRT.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-IIM6T7IA.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":376},"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":1967},"dist/lib/browser/cli/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14108},"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":"@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":193},"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":7139},"dist/lib/browser/app-graph-builder-P3ZGGFAR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7727},"dist/lib/browser/app-graph-builder-P3ZGGFAR.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/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":4647}},"bytes":4892},"dist/lib/browser/operation-resolver-P5PKLPRT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1544},"dist/lib/browser/operation-resolver-P5PKLPRT.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/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":617}},"bytes":842},"dist/lib/browser/react-surface-IIM6T7IA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25150},"dist/lib/browser/react-surface-IIM6T7IA.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/react","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-mosaic","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","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","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-mosaic","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":3311},"src/components/PluginDetail.tsx":{"bytesInOutput":2974},"src/components/index.ts":{"bytesInOutput":0},"src/components/PluginList.tsx":{"bytesInOutput":418},"src/components/PluginItem.tsx":{"bytesInOutput":3716},"src/components/RegistryContainer.tsx":{"bytesInOutput":2250}},"bytes":13116},"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}}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
REGISTRY_ID
|
|
3
|
+
} from "./chunk-VOAOTNGS.mjs";
|
|
4
|
+
|
|
5
|
+
// src/capabilities/operation-resolver/operation-resolver.ts
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { Capability, Common, SettingsOperation } from "@dxos/app-framework";
|
|
8
|
+
import { Operation, OperationResolver } from "@dxos/operation";
|
|
9
|
+
var operation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
10
|
+
return Capability.contributes(Common.Capability.OperationResolver, [
|
|
11
|
+
OperationResolver.make({
|
|
12
|
+
operation: SettingsOperation.OpenPluginRegistry,
|
|
13
|
+
handler: Effect.fnUntraced(function* () {
|
|
14
|
+
yield* Operation.invoke(Common.LayoutOperation.SwitchWorkspace, {
|
|
15
|
+
subject: REGISTRY_ID
|
|
16
|
+
});
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
]);
|
|
20
|
+
}));
|
|
21
|
+
export {
|
|
22
|
+
operation_resolver_default as default
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=operation-resolver-P5PKLPRT.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/operation-resolver/operation-resolver.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common, SettingsOperation } from '@dxos/app-framework';\nimport { Operation, OperationResolver } from '@dxos/operation';\n\nimport { REGISTRY_ID } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Common.Capability.OperationResolver, [\n OperationResolver.make({\n operation: SettingsOperation.OpenPluginRegistry,\n handler: Effect.fnUntraced(function* () {\n yield* Operation.invoke(Common.LayoutOperation.SwitchWorkspace, { subject: REGISTRY_ID });\n }),\n }),\n ]);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,QAAQC,yBAAyB;AACtD,SAASC,WAAWC,yBAAyB;AAI7C,IAAA,6BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,SAAOF,WAAWG,YAAYC,OAAOJ,WAAWK,mBAAmB;IACjEA,kBAAkBC,KAAK;MACrBC,WAAWC,kBAAkBC;MAC7BC,SAAgBR,kBAAW,aAAA;AACzB,eAAOS,UAAUC,OAAOR,OAAOS,gBAAgBC,iBAAiB;UAAEC,SAASC;QAAY,CAAA;MACzF,CAAA;IACF,CAAA;GACD;AACH,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capability", "Common", "SettingsOperation", "Operation", "OperationResolver", "Capability", "makeModule", "fnUntraced", "contributes", "Common", "OperationResolver", "make", "operation", "SettingsOperation", "OpenPluginRegistry", "handler", "Operation", "invoke", "LayoutOperation", "SwitchWorkspace", "subject", "REGISTRY_ID"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import {
|
|
2
|
+
REGISTRY_KEY,
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-VOAOTNGS.mjs";
|
|
5
|
+
|
|
6
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
7
|
+
import * as Effect2 from "effect/Effect";
|
|
8
|
+
import React5, { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
9
|
+
import { Capability, Common as Common2, Plugin } from "@dxos/app-framework";
|
|
10
|
+
import { usePluginManager as usePluginManager2 } from "@dxos/app-framework/react";
|
|
11
|
+
import { runAndForwardErrors as runAndForwardErrors2 } from "@dxos/effect";
|
|
12
|
+
|
|
13
|
+
// src/components/PluginDetail.tsx
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Icon, Input, Link, useTranslation } from "@dxos/react-ui";
|
|
16
|
+
import { Layout } from "@dxos/react-ui-mosaic";
|
|
17
|
+
import { getStyles, mx } from "@dxos/ui-theme";
|
|
18
|
+
var PluginDetail = ({ plugin, enabled, onEnabledChange }) => {
|
|
19
|
+
const { t } = useTranslation(meta.id);
|
|
20
|
+
const { id, name, description, homePage, source, screenshots, icon = "ph--circle--regular", iconHue = "neutral" } = plugin.meta;
|
|
21
|
+
const styles = getStyles(iconHue);
|
|
22
|
+
return /* @__PURE__ */ React.createElement(Layout.Container, {
|
|
23
|
+
scrollable: true
|
|
24
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
25
|
+
role: "none",
|
|
26
|
+
className: "grid grid-cols-[min-content_1fr] gap-4 container-max-width p-4"
|
|
27
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
28
|
+
role: "none"
|
|
29
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
30
|
+
classNames: mx("p-1 rounded", styles.bg, styles.icon),
|
|
31
|
+
icon,
|
|
32
|
+
size: 14
|
|
33
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
34
|
+
role: "none",
|
|
35
|
+
className: "flex flex-col gap-6"
|
|
36
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
37
|
+
role: "none",
|
|
38
|
+
className: "grid grid-cols-[1fr_min-content] gap-x-3 is-full pbs-1"
|
|
39
|
+
}, /* @__PURE__ */ React.createElement("h2", {
|
|
40
|
+
className: "text-xl"
|
|
41
|
+
}, name), /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
42
|
+
classNames: "self-center",
|
|
43
|
+
checked: enabled,
|
|
44
|
+
onCheckedChange: onEnabledChange
|
|
45
|
+
})), /* @__PURE__ */ React.createElement("p", {
|
|
46
|
+
className: "pbs-0.5 text-sm text-description"
|
|
47
|
+
}, id)), /* @__PURE__ */ React.createElement("div", {
|
|
48
|
+
role: "none"
|
|
49
|
+
}, /* @__PURE__ */ React.createElement("p", {
|
|
50
|
+
className: "text-description"
|
|
51
|
+
}, description)), screenshots && screenshots.length > 0 && /* @__PURE__ */ React.createElement("div", {
|
|
52
|
+
role: "none",
|
|
53
|
+
className: "flex flex-col gap-2"
|
|
54
|
+
}, /* @__PURE__ */ React.createElement("h2", null, "Preview"), /* @__PURE__ */ React.createElement("img", {
|
|
55
|
+
src: screenshots[0],
|
|
56
|
+
alt: name,
|
|
57
|
+
className: "aspect-video object-fit"
|
|
58
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
59
|
+
role: "none",
|
|
60
|
+
className: "flex flex-col gap-2"
|
|
61
|
+
}, /* @__PURE__ */ React.createElement("h2", null, "Resources"), /* @__PURE__ */ React.createElement("div", {
|
|
62
|
+
className: "flex gap-2"
|
|
63
|
+
}, homePage && /* @__PURE__ */ React.createElement(Link, {
|
|
64
|
+
href: homePage,
|
|
65
|
+
target: "_blank",
|
|
66
|
+
rel: "noreferrer",
|
|
67
|
+
classNames: "text-sm text-description"
|
|
68
|
+
}, t("home page label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
69
|
+
icon: "ph--arrow-square-out--bold",
|
|
70
|
+
size: 3,
|
|
71
|
+
classNames: "inline-block leading-none mli-1"
|
|
72
|
+
})), source && /* @__PURE__ */ React.createElement(Link, {
|
|
73
|
+
href: source,
|
|
74
|
+
target: "_blank",
|
|
75
|
+
rel: "noreferrer",
|
|
76
|
+
classNames: "text-sm text-description"
|
|
77
|
+
}, t("source label"), /* @__PURE__ */ React.createElement(Icon, {
|
|
78
|
+
icon: "ph--arrow-square-out--bold",
|
|
79
|
+
size: 3,
|
|
80
|
+
classNames: "inline-block leading-none mli-1"
|
|
81
|
+
})))))));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// src/components/PluginList.tsx
|
|
85
|
+
import React3 from "react";
|
|
86
|
+
import { List } from "@dxos/react-ui";
|
|
87
|
+
|
|
88
|
+
// src/components/PluginItem.tsx
|
|
89
|
+
import React2, { useCallback } from "react";
|
|
90
|
+
import { Icon as Icon2, IconButton, Input as Input2, Link as Link2, ListItem, Tag, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
91
|
+
import { descriptionText, mx as mx2 } from "@dxos/ui-theme";
|
|
92
|
+
import { getStyles as getStyles2 } from "@dxos/ui-theme";
|
|
93
|
+
var PluginItem = ({ plugin, enabled = [], onClick, onChange, hasSettings: hasSettingsProp, onSettings }) => {
|
|
94
|
+
const { t } = useTranslation2(meta.id);
|
|
95
|
+
const { id, name, description, tags, icon = "ph--circle--regular", iconHue = "neutral" } = plugin.meta;
|
|
96
|
+
const isEnabled = enabled.includes(id);
|
|
97
|
+
const inputId = `${id}-input`;
|
|
98
|
+
const labelId = `${id}-label`;
|
|
99
|
+
const descriptionId = `${id}-description`;
|
|
100
|
+
const handleClick = useCallback(() => onClick?.(id), [
|
|
101
|
+
id,
|
|
102
|
+
onClick
|
|
103
|
+
]);
|
|
104
|
+
const handleChange = useCallback((event) => {
|
|
105
|
+
event.stopPropagation();
|
|
106
|
+
onChange?.(id, !isEnabled);
|
|
107
|
+
}, [
|
|
108
|
+
id,
|
|
109
|
+
isEnabled,
|
|
110
|
+
onChange
|
|
111
|
+
]);
|
|
112
|
+
const hasSettings = hasSettingsProp?.(id) ?? false;
|
|
113
|
+
const handleSettings = useCallback(() => onSettings?.(id), [
|
|
114
|
+
id,
|
|
115
|
+
onSettings
|
|
116
|
+
]);
|
|
117
|
+
const styles = getStyles2(iconHue);
|
|
118
|
+
const gridCols = "grid grid-cols-[5rem_1fr]";
|
|
119
|
+
const gridRows = "grid grid-rows-[40px_1fr_min-content_40px]";
|
|
120
|
+
return /* @__PURE__ */ React2.createElement(ListItem.Root, {
|
|
121
|
+
key: id,
|
|
122
|
+
labelId,
|
|
123
|
+
"data-testid": `pluginList.${id}`,
|
|
124
|
+
"aria-describedby": descriptionId,
|
|
125
|
+
classNames: mx2(gridCols, "bs-[12rem] is-full gap-3 pie-2 border border-separator rounded-md overflow-hidden")
|
|
126
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
127
|
+
className: mx2(gridRows, "justify-center rounded-l-md", styles.bg)
|
|
128
|
+
}, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement(Icon2, {
|
|
129
|
+
classNames: mx2("cursor-pointer", styles.icon),
|
|
130
|
+
icon,
|
|
131
|
+
size: 14,
|
|
132
|
+
onClick: handleClick
|
|
133
|
+
})), /* @__PURE__ */ React2.createElement("div", {
|
|
134
|
+
className: mx2(gridRows)
|
|
135
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
136
|
+
className: "flex items-center overflow-hidden cursor-pointer",
|
|
137
|
+
onClick: handleClick
|
|
138
|
+
}, /* @__PURE__ */ React2.createElement("span", {
|
|
139
|
+
className: "text-lg truncate"
|
|
140
|
+
}, name ?? id)), /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement("p", {
|
|
141
|
+
className: mx2(descriptionText, "line-clamp-4 min-is-0")
|
|
142
|
+
}, description)), /* @__PURE__ */ React2.createElement("div", {
|
|
143
|
+
className: "flex -mis-0.5 overflow-x-auto scrollbar-none"
|
|
144
|
+
}, tags?.map((tag) => /* @__PURE__ */ React2.createElement(Tag, {
|
|
145
|
+
key: tag,
|
|
146
|
+
palette: tagColors[tag],
|
|
147
|
+
classNames: "text-xs uppercase font-thin"
|
|
148
|
+
}, tag))), /* @__PURE__ */ React2.createElement("div", {
|
|
149
|
+
className: "flex gap-2 items-center text-sm"
|
|
150
|
+
}, /* @__PURE__ */ React2.createElement(IconButton, {
|
|
151
|
+
"aria-describedby": descriptionId,
|
|
152
|
+
classNames: "cursor-pointer",
|
|
153
|
+
icon: "ph--gear--regular",
|
|
154
|
+
label: t("settings label"),
|
|
155
|
+
iconOnly: true,
|
|
156
|
+
size: 4,
|
|
157
|
+
onClick: handleSettings,
|
|
158
|
+
disabled: !hasSettings
|
|
159
|
+
}), /* @__PURE__ */ React2.createElement(Link2, {
|
|
160
|
+
"aria-describedby": descriptionId,
|
|
161
|
+
classNames: "text-description cursor-pointer",
|
|
162
|
+
onClick: handleClick
|
|
163
|
+
}, t("details label")), /* @__PURE__ */ React2.createElement("div", {
|
|
164
|
+
className: "grow"
|
|
165
|
+
}), /* @__PURE__ */ React2.createElement("div", {
|
|
166
|
+
className: "pie-1"
|
|
167
|
+
}, /* @__PURE__ */ React2.createElement(Input2.Root, {
|
|
168
|
+
id: inputId
|
|
169
|
+
}, /* @__PURE__ */ React2.createElement(Input2.Switch, {
|
|
170
|
+
classNames: "self-center",
|
|
171
|
+
checked: isEnabled,
|
|
172
|
+
onClick: handleChange
|
|
173
|
+
}))))));
|
|
174
|
+
};
|
|
175
|
+
var tagColors = {
|
|
176
|
+
new: "rose",
|
|
177
|
+
beta: "teal",
|
|
178
|
+
labs: "blue",
|
|
179
|
+
popular: "green",
|
|
180
|
+
featured: "pink",
|
|
181
|
+
experimental: "amber"
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// src/components/PluginList.tsx
|
|
185
|
+
var PluginList = ({ plugins = [], ...props }) => {
|
|
186
|
+
return /* @__PURE__ */ React3.createElement(List, {
|
|
187
|
+
classNames: "grid grid-cols-[repeat(auto-fill,minmax(18rem,1fr))] auto-rows-[max-content] gap-4 p-4"
|
|
188
|
+
}, plugins.map((plugin) => /* @__PURE__ */ React3.createElement(PluginItem, {
|
|
189
|
+
key: plugin.meta.id,
|
|
190
|
+
plugin,
|
|
191
|
+
...props
|
|
192
|
+
})));
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// src/components/RegistryContainer.tsx
|
|
196
|
+
import { useAtomValue } from "@effect-atom/atom-react";
|
|
197
|
+
import * as Effect from "effect/Effect";
|
|
198
|
+
import React4, { useCallback as useCallback2, useMemo } from "react";
|
|
199
|
+
import { Common, SettingsOperation } from "@dxos/app-framework";
|
|
200
|
+
import { useCapabilities, useOperationInvoker, usePluginManager } from "@dxos/app-framework/react";
|
|
201
|
+
import { runAndForwardErrors } from "@dxos/effect";
|
|
202
|
+
import { ObservabilityOperation } from "@dxos/plugin-observability/types";
|
|
203
|
+
import { Layout as Layout2 } from "@dxos/react-ui-mosaic";
|
|
204
|
+
var sortByPluginMeta = ({ meta: { name: a = "" } }, { meta: { name: b = "" } }) => a.localeCompare(b);
|
|
205
|
+
var RegistryContainer = ({ id, plugins: pluginsProp }) => {
|
|
206
|
+
const manager = usePluginManager();
|
|
207
|
+
const { invoke, invokePromise } = useOperationInvoker();
|
|
208
|
+
const plugins = useMemo(() => pluginsProp.sort(sortByPluginMeta), [
|
|
209
|
+
pluginsProp
|
|
210
|
+
]);
|
|
211
|
+
const enabled = useAtomValue(manager.enabled);
|
|
212
|
+
const allSettings = useCapabilities(Common.Capability.Settings);
|
|
213
|
+
const handleChange = useCallback2((id2, enabled2) => Effect.gen(function* () {
|
|
214
|
+
if (enabled2) {
|
|
215
|
+
yield* manager.enable(id2);
|
|
216
|
+
} else {
|
|
217
|
+
yield* manager.disable(id2);
|
|
218
|
+
}
|
|
219
|
+
yield* invoke(ObservabilityOperation.SendEvent, {
|
|
220
|
+
name: "plugins.toggle",
|
|
221
|
+
properties: {
|
|
222
|
+
plugin: id2,
|
|
223
|
+
enabled: enabled2
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}).pipe(runAndForwardErrors), [
|
|
227
|
+
invoke,
|
|
228
|
+
manager
|
|
229
|
+
]);
|
|
230
|
+
const handleClick = useCallback2((pluginId) => invokePromise(Common.LayoutOperation.Open, {
|
|
231
|
+
// TODO(wittjosiah): `/` currently is not supported in ids.
|
|
232
|
+
subject: [
|
|
233
|
+
pluginId.replaceAll("/", ":")
|
|
234
|
+
],
|
|
235
|
+
pivotId: id,
|
|
236
|
+
positioning: "end"
|
|
237
|
+
}), [
|
|
238
|
+
invokePromise,
|
|
239
|
+
id
|
|
240
|
+
]);
|
|
241
|
+
const hasSettings = useCallback2((pluginId) => allSettings.some((s) => s.prefix === pluginId), [
|
|
242
|
+
allSettings
|
|
243
|
+
]);
|
|
244
|
+
const handleSettings = useCallback2((pluginId) => invokePromise(SettingsOperation.Open, {
|
|
245
|
+
plugin: pluginId
|
|
246
|
+
}), [
|
|
247
|
+
invokePromise
|
|
248
|
+
]);
|
|
249
|
+
return /* @__PURE__ */ React4.createElement(Layout2.Container, {
|
|
250
|
+
scrollable: true
|
|
251
|
+
}, /* @__PURE__ */ React4.createElement(PluginList, {
|
|
252
|
+
plugins,
|
|
253
|
+
enabled,
|
|
254
|
+
onClick: handleClick,
|
|
255
|
+
onChange: handleChange,
|
|
256
|
+
hasSettings,
|
|
257
|
+
onSettings: handleSettings
|
|
258
|
+
}));
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
262
|
+
var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capability.contributes(Common2.Capability.ReactSurface, [
|
|
263
|
+
Common2.createSurface({
|
|
264
|
+
id: `${meta.id}/all`,
|
|
265
|
+
role: "article",
|
|
266
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}+all`,
|
|
267
|
+
component: () => {
|
|
268
|
+
const manager = usePluginManager2();
|
|
269
|
+
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => !manager.getCore().includes(meta2.id)), []);
|
|
270
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
271
|
+
id: `${REGISTRY_KEY}+all`,
|
|
272
|
+
plugins: filtered
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
}),
|
|
276
|
+
Common2.createSurface({
|
|
277
|
+
id: `${meta.id}/installed`,
|
|
278
|
+
role: "article",
|
|
279
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}+installed`,
|
|
280
|
+
component: () => {
|
|
281
|
+
const manager = usePluginManager2();
|
|
282
|
+
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => !manager.getCore().includes(meta2.id)).filter(({ meta: meta2 }) => manager.getEnabled().includes(meta2.id)), []);
|
|
283
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
284
|
+
id: `${REGISTRY_KEY}+installed`,
|
|
285
|
+
plugins: filtered
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}),
|
|
289
|
+
Common2.createSurface({
|
|
290
|
+
id: `${meta.id}/recommended`,
|
|
291
|
+
role: "article",
|
|
292
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}+recommended`,
|
|
293
|
+
component: () => {
|
|
294
|
+
const manager = usePluginManager2();
|
|
295
|
+
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => !manager.getCore().includes(meta2.id)).filter(({ meta: meta2 }) => !meta2.tags?.includes("labs")), []);
|
|
296
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
297
|
+
id: `${REGISTRY_KEY}+recommended`,
|
|
298
|
+
plugins: filtered
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}),
|
|
302
|
+
Common2.createSurface({
|
|
303
|
+
id: `${meta.id}/labs`,
|
|
304
|
+
role: "article",
|
|
305
|
+
filter: (data) => data.subject === `${REGISTRY_KEY}+labs`,
|
|
306
|
+
component: () => {
|
|
307
|
+
const manager = usePluginManager2();
|
|
308
|
+
const filtered = useMemo2(() => manager.getPlugins().filter(({ meta: meta2 }) => meta2.tags?.includes("labs")), []);
|
|
309
|
+
return /* @__PURE__ */ React5.createElement(RegistryContainer, {
|
|
310
|
+
id: `${REGISTRY_KEY}+labs`,
|
|
311
|
+
plugins: filtered
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}),
|
|
315
|
+
Common2.createSurface({
|
|
316
|
+
id: `${meta.id}/plugin-details`,
|
|
317
|
+
role: "article",
|
|
318
|
+
filter: (data) => Plugin.isPlugin(data.subject),
|
|
319
|
+
component: ({ data: { subject } }) => {
|
|
320
|
+
const manager = usePluginManager2();
|
|
321
|
+
const enabled = manager.getEnabled().includes(subject.meta.id);
|
|
322
|
+
const handleEnableChange = useCallback3((enabled2) => enabled2 ? runAndForwardErrors2(manager.enable(subject.meta.id)) : runAndForwardErrors2(manager.disable(subject.meta.id)), [
|
|
323
|
+
manager,
|
|
324
|
+
subject.meta.id
|
|
325
|
+
]);
|
|
326
|
+
return /* @__PURE__ */ React5.createElement(PluginDetail, {
|
|
327
|
+
plugin: subject,
|
|
328
|
+
enabled,
|
|
329
|
+
onEnabledChange: handleEnableChange
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
})
|
|
333
|
+
])));
|
|
334
|
+
export {
|
|
335
|
+
react_surface_default as default
|
|
336
|
+
};
|
|
337
|
+
//# sourceMappingURL=react-surface-IIM6T7IA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/components/PluginDetail.tsx", "../../../src/components/PluginList.tsx", "../../../src/components/PluginItem.tsx", "../../../src/components/RegistryContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Capability, Common, Plugin } from '@dxos/app-framework';\nimport { usePluginManager } from '@dxos/app-framework/react';\nimport { runAndForwardErrors } from '@dxos/effect';\n\nimport { PluginDetail, RegistryContainer } from '../../components';\nimport { REGISTRY_KEY, meta } from '../../meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.createSurface({\n id: `${meta.id}/all`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+all`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () => manager.getPlugins().filter(({ meta }) => !manager.getCore().includes(meta.id)),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+all`} plugins={filtered} />;\n },\n }),\n Common.createSurface({\n id: `${meta.id}/installed`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+installed`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager\n .getPlugins()\n .filter(({ meta }) => !manager.getCore().includes(meta.id))\n .filter(({ meta }) => manager.getEnabled().includes(meta.id)),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+installed`} plugins={filtered} />;\n },\n }),\n Common.createSurface({\n id: `${meta.id}/recommended`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+recommended`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager\n .getPlugins()\n .filter(({ meta }) => !manager.getCore().includes(meta.id))\n .filter(({ meta }) => !meta.tags?.includes('labs')),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+recommended`} plugins={filtered} />;\n },\n }),\n Common.createSurface({\n id: `${meta.id}/labs`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+labs`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(() => manager.getPlugins().filter(({ meta }) => meta.tags?.includes('labs')), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}+labs`} plugins={filtered} />;\n },\n }),\n Common.createSurface({\n id: `${meta.id}/plugin-details`,\n role: 'article',\n filter: (data): data is { subject: Plugin.Plugin } => Plugin.isPlugin(data.subject),\n component: ({ data: { subject } }) => {\n const manager = usePluginManager();\n const enabled = manager.getEnabled().includes(subject.meta.id);\n const handleEnableChange = useCallback(\n (enabled: boolean) =>\n enabled\n ? runAndForwardErrors(manager.enable(subject.meta.id))\n : runAndForwardErrors(manager.disable(subject.meta.id)),\n [manager, subject.meta.id],\n );\n\n return <PluginDetail plugin={subject} enabled={enabled} onEnabledChange={handleEnableChange} />;\n },\n }),\n ]),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { Icon, Input, Link, useTranslation } from '@dxos/react-ui';\nimport { Layout } from '@dxos/react-ui-mosaic';\nimport { getStyles, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\n\nexport type PluginDetailProps = {\n plugin: Plugin.Plugin;\n enabled?: boolean;\n onEnabledChange?: (enabled: boolean) => void;\n};\n\nexport const PluginDetail = ({ plugin, enabled, onEnabledChange }: PluginDetailProps) => {\n const { t } = useTranslation(meta.id);\n const {\n id,\n name,\n description,\n homePage,\n source,\n screenshots,\n icon = 'ph--circle--regular',\n iconHue = 'neutral',\n } = plugin.meta;\n const styles = getStyles(iconHue);\n\n return (\n <Layout.Container scrollable>\n <div role='none' className='grid grid-cols-[min-content_1fr] gap-4 container-max-width p-4'>\n <div role='none'>\n <Icon classNames={mx('p-1 rounded', styles.bg, styles.icon)} icon={icon} size={14} />\n </div>\n <div role='none' className='flex flex-col gap-6'>\n <div role='none' className='grid grid-cols-[1fr_min-content] gap-x-3 is-full pbs-1'>\n <h2 className='text-xl'>{name}</h2>\n <Input.Root>\n <Input.Switch classNames='self-center' checked={enabled} onCheckedChange={onEnabledChange} />\n </Input.Root>\n <p className='pbs-0.5 text-sm text-description'>{id}</p>\n </div>\n <div role='none'>\n <p className='text-description'>{description}</p>\n </div>\n {screenshots && screenshots.length > 0 && (\n <div role='none' className='flex flex-col gap-2'>\n <h2>Preview</h2>\n <img src={screenshots[0]} alt={name} className='aspect-video object-fit' />\n </div>\n )}\n <div role='none' className='flex flex-col gap-2'>\n <h2>Resources</h2>\n <div className='flex gap-2'>\n {homePage && (\n <Link href={homePage} target='_blank' rel='noreferrer' classNames='text-sm text-description'>\n {t('home page label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n\n {source && (\n <Link href={source} target='_blank' rel='noreferrer' classNames='text-sm text-description'>\n {t('source label')}\n <Icon icon='ph--arrow-square-out--bold' size={3} classNames='inline-block leading-none mli-1' />\n </Link>\n )}\n </div>\n </div>\n </div>\n </div>\n </Layout.Container>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { List } from '@dxos/react-ui';\n\nimport { PluginItem, type PluginItemProps } from './PluginItem';\n\nexport type PluginListProps = Omit<PluginItemProps, 'plugin'> & {\n plugins?: readonly Plugin.Plugin[];\n};\n\nexport const PluginList = ({ plugins = [], ...props }: PluginListProps) => {\n return (\n <List classNames='grid grid-cols-[repeat(auto-fill,minmax(18rem,1fr))] auto-rows-[max-content] gap-4 p-4'>\n {plugins.map((plugin) => (\n <PluginItem key={plugin.meta.id} plugin={plugin} {...props} />\n ))}\n </List>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type MouseEvent, useCallback } from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { type ChromaticPalette, Icon, IconButton, Input, Link, ListItem, Tag, useTranslation } from '@dxos/react-ui';\nimport { descriptionText, mx } from '@dxos/ui-theme';\nimport { getStyles } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\nimport { type RegistryTagType } from '../types';\n\nexport type PluginItemProps = {\n plugin: Plugin.Plugin;\n installed?: readonly string[];\n enabled?: readonly string[];\n onClick?: (id: string) => void;\n onChange?: (id: string, enabled: boolean) => void;\n hasSettings?: (id: string) => boolean;\n onSettings?: (id: string) => void;\n};\n\nexport const PluginItem = ({\n plugin,\n enabled = [],\n onClick,\n onChange,\n hasSettings: hasSettingsProp,\n onSettings,\n}: PluginItemProps) => {\n const { t } = useTranslation(meta.id);\n const { id, name, description, tags, icon = 'ph--circle--regular', iconHue = 'neutral' } = plugin.meta;\n const isEnabled = enabled.includes(id);\n const inputId = `${id}-input`;\n const labelId = `${id}-label`;\n const descriptionId = `${id}-description`;\n const handleClick = useCallback(() => onClick?.(id), [id, onClick]);\n\n const handleChange = useCallback(\n (event: MouseEvent) => {\n event.stopPropagation();\n onChange?.(id, !isEnabled);\n },\n [id, isEnabled, onChange],\n );\n\n const hasSettings = hasSettingsProp?.(id) ?? false;\n const handleSettings = useCallback(() => onSettings?.(id), [id, onSettings]);\n const styles = getStyles(iconHue);\n const gridCols = 'grid grid-cols-[5rem_1fr]';\n const gridRows = 'grid grid-rows-[40px_1fr_min-content_40px]';\n\n return (\n <ListItem.Root\n key={id}\n labelId={labelId}\n data-testid={`pluginList.${id}`}\n aria-describedby={descriptionId}\n classNames={mx(gridCols, 'bs-[12rem] is-full gap-3 pie-2 border border-separator rounded-md overflow-hidden')}\n >\n <div className={mx(gridRows, 'justify-center rounded-l-md', styles.bg)}>\n <div />\n <Icon classNames={mx('cursor-pointer', styles.icon)} icon={icon} size={14} onClick={handleClick} />\n </div>\n\n <div className={mx(gridRows)}>\n <div className='flex items-center overflow-hidden cursor-pointer' onClick={handleClick}>\n <span className='text-lg truncate'>{name ?? id}</span>\n </div>\n\n <div>\n <p className={mx(descriptionText, 'line-clamp-4 min-is-0')}>{description}</p>\n </div>\n\n <div className='flex -mis-0.5 overflow-x-auto scrollbar-none'>\n {tags?.map((tag) => (\n <Tag key={tag} palette={tagColors[tag as RegistryTagType]} classNames='text-xs uppercase font-thin'>\n {tag}\n </Tag>\n ))}\n </div>\n\n <div className='flex gap-2 items-center text-sm'>\n <IconButton\n aria-describedby={descriptionId}\n classNames='cursor-pointer'\n icon='ph--gear--regular'\n label={t('settings label')}\n iconOnly\n size={4}\n onClick={handleSettings}\n disabled={!hasSettings}\n />\n\n <Link aria-describedby={descriptionId} classNames='text-description cursor-pointer' onClick={handleClick}>\n {t('details label')}\n </Link>\n\n <div className='grow' />\n <div className='pie-1'>\n <Input.Root id={inputId}>\n <Input.Switch classNames='self-center' checked={isEnabled} onClick={handleChange} />\n </Input.Root>\n </div>\n </div>\n </div>\n </ListItem.Root>\n );\n};\n\nconst tagColors: Record<RegistryTagType, ChromaticPalette> = {\n new: 'rose',\n beta: 'teal',\n labs: 'blue',\n popular: 'green',\n featured: 'pink',\n experimental: 'amber',\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Common, type Plugin, SettingsOperation } from '@dxos/app-framework';\nimport { useCapabilities, useOperationInvoker, usePluginManager } from '@dxos/app-framework/react';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/types';\nimport { Layout } from '@dxos/react-ui-mosaic';\n\nimport { PluginList } from './PluginList';\n\nconst sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin.Plugin, { meta: { name: b = '' } }: Plugin.Plugin) =>\n a.localeCompare(b);\n\nexport type RegistryContainerProps = {\n id: string;\n plugins: Plugin.Plugin[];\n};\n\nexport const RegistryContainer = ({ id, plugins: pluginsProp }: RegistryContainerProps) => {\n const manager = usePluginManager();\n const { invoke, invokePromise } = useOperationInvoker();\n const plugins = useMemo(() => pluginsProp.sort(sortByPluginMeta), [pluginsProp]);\n const enabled = useAtomValue(manager.enabled);\n const allSettings = useCapabilities(Common.Capability.Settings);\n\n // TODO(wittjosiah): Factor out to an intent?\n const handleChange = useCallback(\n (id: string, enabled: boolean) =>\n Effect.gen(function* () {\n if (enabled) {\n yield* manager.enable(id);\n } else {\n yield* manager.disable(id);\n }\n\n yield* invoke(ObservabilityOperation.SendEvent, {\n name: 'plugins.toggle',\n properties: {\n plugin: id,\n enabled,\n },\n });\n }).pipe(runAndForwardErrors),\n [invoke, manager],\n );\n\n const handleClick = useCallback(\n (pluginId: string) =>\n invokePromise(Common.LayoutOperation.Open, {\n // TODO(wittjosiah): `/` currently is not supported in ids.\n subject: [pluginId.replaceAll('/', ':')],\n pivotId: id,\n positioning: 'end',\n }),\n [invokePromise, id],\n );\n\n const hasSettings = useCallback((pluginId: string) => allSettings.some((s) => s.prefix === pluginId), [allSettings]);\n\n const handleSettings = useCallback(\n (pluginId: string) => invokePromise(SettingsOperation.Open, { plugin: pluginId }),\n [invokePromise],\n );\n\n return (\n <Layout.Container scrollable>\n <PluginList\n plugins={plugins}\n enabled={enabled}\n onClick={handleClick}\n onChange={handleChange}\n hasSettings={hasSettings}\n onSettings={handleSettings}\n />\n </Layout.Container>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,YAAYA,aAAY;AACxB,OAAOC,UAASC,eAAAA,cAAaC,WAAAA,gBAAe;AAE5C,SAASC,YAAYC,UAAAA,SAAQC,cAAc;AAC3C,SAASC,oBAAAA,yBAAwB;AACjC,SAASC,uBAA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AE,CAAA,IAClDyB,qBAAoBjB,QAAQmB,QAAQtB,QAAQJ,KAAKD,EAAE,CAAA,GACzD;QAACQ;QAASH,QAAQJ,KAAKD;OAAG;AAG5B,aAAO,gBAAAe,OAAA,cAACa,cAAAA;QAAaC,QAAQxB;QAASiB;QAAkBQ,iBAAiBP;;IAC3E;EACF,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "useCallback", "useMemo", "Capability", "Common", "Plugin", "usePluginManager", "runAndForwardErrors", "React", "Icon", "Input", "Link", "useTranslation", "Layout", "getStyles", "mx", "PluginDetail", "plugin", "enabled", "onEnabledChange", "t", "useTranslation", "meta", "id", "name", "description", "homePage", "source", "screenshots", "icon", "iconHue", "styles", "getStyles", "Layout", "Container", "scrollable", "div", "role", "className", "Icon", "classNames", "mx", "bg", "size", "h2", "Input", "Root", "Switch", "checked", "onCheckedChange", "p", "length", "img", "src", "alt", "Link", "href", "target", "rel", "React", "List", "React", "useCallback", "Icon", "IconButton", "Input", "Link", "ListItem", "Tag", "useTranslation", "descriptionText", "mx", "getStyles", "PluginItem", "plugin", "enabled", "onClick", "onChange", "hasSettings", "hasSettingsProp", "onSettings", "t", "useTranslation", "meta", "id", "name", "description", "tags", "icon", "iconHue", "isEnabled", "includes", "inputId", "labelId", "descriptionId", "handleClick", "useCallback", "handleChange", "event", "stopPropagation", "handleSettings", "styles", "getStyles", "gridCols", "gridRows", "React", "ListItem", "Root", "key", "data-testid", "aria-describedby", "classNames", "mx", "div", "className", "bg", "Icon", "size", "span", "p", "descriptionText", "map", "tag", "Tag", "palette", "tagColors", "IconButton", "label", "iconOnly", "disabled", "Link", "Input", "Switch", "checked", "new", "beta", "labs", "popular", "featured", "experimental", "PluginList", "plugins", "props", "React", "List", "classNames", "map", "plugin", "PluginItem", "key", "meta", "id", "useAtomValue", "Effect", "React", "useCallback", "useMemo", "Common", "SettingsOperation", "useCapabilities", "useOperationInvoker", "usePluginManager", "runAndForwardErrors", "ObservabilityOperation", "Layout", "sortByPluginMeta", "meta", "name", "a", "b", "localeCompare", "RegistryContainer", "id", "plugins", "pluginsProp", "manager", "usePluginManager", "invoke", "invokePromise", "useOperationInvoker", "useMemo", "sort", "enabled", "useAtomValue", "allSettings", "useCapabilities", "Common", "Capability", "Settings", "handleChange", "useCallback", "gen", "enable", "disable", "ObservabilityOperation", "SendEvent", "properties", "plugin", "pipe", "runAndForwardErrors", "handleClick", "pluginId", "LayoutOperation", "Open", "subject", "replaceAll", "pivotId", "positioning", "hasSettings", "some", "s", "prefix", "handleSettings", "SettingsOperation", "React", "Layout", "Container", "scrollable", "PluginList", "onClick", "onChange", "onSettings", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "subject", "REGISTRY_KEY", "component", "manager", "usePluginManager", "filtered", "useMemo", "getPlugins", "getCore", "includes", "React", "RegistryContainer", "plugins", "getEnabled", "tags", "Plugin", "isPlugin", "enabled", "handleEnableChange", "useCallback", "runAndForwardErrors", "enable", "disable", "PluginDetail", "plugin", "onEnabledChange"]
|
|
7
|
+
}
|