@dxos/plugin-registry 0.8.4-main.c1de068 → 0.8.4-main.dedc0f3
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-LKQBQDUA.mjs → app-graph-builder-6JQNRTEQ.mjs} +2 -2
- package/dist/lib/browser/{app-graph-builder-LKQBQDUA.mjs.map → app-graph-builder-6JQNRTEQ.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +4 -4
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-W67CIJI3.mjs → intent-resolver-UGDFPMAG.mjs} +2 -2
- package/dist/lib/browser/{intent-resolver-W67CIJI3.mjs.map → intent-resolver-UGDFPMAG.mjs.map} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-3GNB7AOY.mjs → react-surface-YATPY47L.mjs} +14 -12
- package/dist/lib/browser/react-surface-YATPY47L.mjs.map +7 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- 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/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Icon.stories.d.ts +11 -3
- package/dist/types/src/components/Icon.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail.d.ts.map +1 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts +29 -4
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +1 -1
- package/dist/types/src/components/PluginList.stories.d.ts +33 -7
- package/dist/types/src/components/PluginList.stories.d.ts.map +1 -1
- package/dist/types/src/components/RegistryContainer.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -20
- package/src/RegistryPlugin.tsx +1 -1
- package/src/capabilities/app-graph-builder.ts +1 -1
- package/src/capabilities/intent-resolver.ts +4 -4
- package/src/capabilities/react-surface.tsx +2 -7
- package/src/components/Icon.stories.tsx +8 -6
- package/src/components/PluginDetail.stories.tsx +6 -5
- package/src/components/PluginDetail.tsx +34 -32
- package/src/components/PluginList.stories.tsx +11 -8
- package/src/components/RegistryContainer.tsx +1 -1
- package/dist/lib/browser/react-surface-3GNB7AOY.mjs.map +0 -7
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
// src/capabilities/app-graph-builder.ts
|
|
8
8
|
import { Rx } from "@effect-rx/rx-react";
|
|
9
9
|
import { Option, pipe } from "effect";
|
|
10
|
-
import { Capabilities, contributes, createIntent
|
|
10
|
+
import { Capabilities, SettingsAction, contributes, createIntent } from "@dxos/app-framework";
|
|
11
11
|
import { createExtension } from "@dxos/plugin-graph";
|
|
12
12
|
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, [
|
|
13
13
|
createExtension({
|
|
@@ -158,4 +158,4 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
158
158
|
export {
|
|
159
159
|
app_graph_builder_default as default
|
|
160
160
|
};
|
|
161
|
-
//# sourceMappingURL=app-graph-builder-
|
|
161
|
+
//# sourceMappingURL=app-graph-builder-6JQNRTEQ.mjs.map
|
package/dist/lib/browser/{app-graph-builder-LKQBQDUA.mjs.map → app-graph-builder-6JQNRTEQ.mjs.map}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities,
|
|
5
|
-
"mappings": ";;;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,
|
|
6
|
-
"names": ["Rx", "Option", "pipe", "Capabilities", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, type PluginContext, SettingsAction, contributes, createIntent } from '@dxos/app-framework';\nimport { createExtension } from '@dxos/plugin-graph';\n\nimport { REGISTRY_ID, REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: REGISTRY_PLUGIN,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: REGISTRY_PLUGIN,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(SettingsAction.OpenPluginRegistry));\n },\n properties: {\n label: ['open plugin registry label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n disposition: 'menu',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: REGISTRY_PLUGIN,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: REGISTRY_ID,\n type: REGISTRY_PLUGIN,\n properties: {\n label: ['plugin registry label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n disposition: 'pin-end',\n testId: 'treeView.pluginRegistry',\n },\n nodes: [\n {\n id: `${REGISTRY_KEY}+all`,\n type: 'category',\n data: `${REGISTRY_KEY}+all`,\n properties: {\n label: ['all plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.all',\n },\n },\n {\n id: `${REGISTRY_KEY}+installed`,\n type: 'category',\n data: `${REGISTRY_KEY}+installed`,\n properties: {\n label: ['installed plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--check--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.installed',\n },\n },\n {\n id: `${REGISTRY_KEY}+recommended`,\n type: 'category',\n data: `${REGISTRY_KEY}+recommended`,\n properties: {\n label: ['recommended plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--star--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.recommended',\n },\n },\n {\n id: `${REGISTRY_KEY}+labs`,\n type: 'category',\n data: `${REGISTRY_KEY}+labs`,\n properties: {\n label: ['labs plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--flask--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.labs',\n },\n },\n ],\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/actions`,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),\n Option.map(() => [\n {\n id: `${REGISTRY_PLUGIN}/load-by-url`,\n data: async () => {},\n properties: {\n label: ['load by url label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--cloud-arrow-down--regular',\n disabled: true,\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/plugins`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const manager = context.getCapability(Capabilities.PluginManager);\n return manager.plugins.map((plugin) => ({\n id: plugin.meta.id.replaceAll('/', ':'),\n type: 'dxos.org/plugin',\n data: plugin,\n properties: {\n label: plugin.meta.name ?? plugin.meta.id,\n icon: plugin.meta.icon ?? 'ph--circle--regular',\n disposition: 'hidden',\n },\n }));\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAkCC,gBAAgBC,aAAaC,oBAAoB;AAC5F,SAASC,uBAAuB;AAIhC,IAAA,4BAAe,CAACC,YACdC,YAAYC,aAAaC,iBAAiB;EACxCC,gBAAgB;IACdC,IAAIC;IACJC,SAAS,CAACC,SACRC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAO,SAASQ,OAAOE,KAAKP,KAAAA,IAAQK,OAAOG,KAAI,CAAA,GAC9EH,OAAOI,IAAI,CAACT,UAAS;MACnB;QACEH,IAAIC;QACJY,MAAM,YAAA;AACJ,gBAAM,EAAEC,iBAAiBC,SAAQ,IAAKpB,QAAQqB,cAAcnB,aAAaoB,gBAAgB;AACzF,gBAAMF,SAASG,aAAaC,eAAeC,kBAAkB,CAAA;QAC/D;QACAC,YAAY;UACVC,OAAO;YAAC;YAA8B;cAAEC,IAAItB;YAAgB;;UAC5DuB,MAAM;UACNC,aAAa;QACf;MACF;KACD,GACDjB,OAAOkB,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACA3B,gBAAgB;IACdC,IAAIC;IACJ0B,WAAW,CAACxB,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAO,SAASQ,OAAOE,KAAKP,KAAAA,IAAQK,OAAOG,KAAI,CAAA,GAC9EH,OAAOI,IAAI,CAACT,UAAS;MACnB;QACEH,IAAI4B;QACJC,MAAM5B;QACNoB,YAAY;UACVC,OAAO;YAAC;YAAyB;cAAEC,IAAItB;YAAgB;;UACvDuB,MAAM;UACNC,aAAa;UACbK,QAAQ;QACV;QACAC,OA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QACZ;MACF;KACD,GACD1B,OAAOkB,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACA3B,gBAAgB;IACdC,IAAI,GAAGC,eAAAA;IACP0B,WAAW,CAACxB,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKH,OAAO4B,cAAcpB,OAAOE,KAAKP,KAAAA,IAAQK,OAAOG,KAAI,CAAA,GACnFH,OAAOI,IAAI,MAAA;AACT,YAAMuB,UAAUxC,QAAQqB,cAAcnB,aAAauC,aAAa;AAChE,aAAOD,QAAQE,QAAQzB,IAAI,CAAC0B,YAAY;QACtCtC,IAAIsC,OAAOC,KAAKvC,GAAGwC,WAAW,KAAK,GAAA;QACnCX,MAAM;QACNhB,MAAMyB;QACNjB,YAAY;UACVC,OAAOgB,OAAOC,KAAKE,QAAQH,OAAOC,KAAKvC;UACvCwB,MAAMc,OAAOC,KAAKf,QAAQ;UAC1BC,aAAa;QACf;MACF,EAAA;IACF,CAAA,GACAjB,OAAOkB,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;CACD;",
|
|
6
|
+
"names": ["Rx", "Option", "pipe", "Capabilities", "SettingsAction", "contributes", "createIntent", "createExtension", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "REGISTRY_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "some", "none", "map", "data", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "createIntent", "SettingsAction", "OpenPluginRegistry", "properties", "label", "ns", "icon", "disposition", "getOrElse", "connector", "REGISTRY_ID", "type", "testId", "nodes", "REGISTRY_KEY", "key", "disabled", "manager", "PluginManager", "plugins", "plugin", "meta", "replaceAll", "name"]
|
|
7
7
|
}
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-AEBASNOI.mjs";
|
|
7
7
|
|
|
8
8
|
// src/RegistryPlugin.tsx
|
|
9
|
-
import { Capabilities, contributes, defineModule, definePlugin
|
|
9
|
+
import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
|
|
10
10
|
|
|
11
11
|
// src/capabilities/index.ts
|
|
12
12
|
import { lazy } from "@dxos/app-framework";
|
|
13
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-
|
|
14
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
15
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
13
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-6JQNRTEQ.mjs"));
|
|
14
|
+
var IntentResolver = lazy(() => import("./intent-resolver-UGDFPMAG.mjs"));
|
|
15
|
+
var ReactSurface = lazy(() => import("./react-surface-YATPY47L.mjs"));
|
|
16
16
|
|
|
17
17
|
// src/translations.ts
|
|
18
18
|
var translations = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/RegistryPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,
|
|
6
|
-
"names": ["Capabilities", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\n\nimport { AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const RegistryPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => 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,cAAcC,QAAQC,aAAaC,cAAcC,oBAAoB;;;ACA9E,SAASC,YAAY;AAEd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACAvC,IAAMG,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;;;;AFlBK,IAAMC,iBAAiB,MAC5BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAUM;EACZ,CAAA;EACAX,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOS;IACpBP,UAAUQ;EACZ,CAAA;EACAb,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOW;IACpBT,UAAUU;EACZ,CAAA;CACD;",
|
|
6
|
+
"names": ["Capabilities", "Events", "contributes", "defineModule", "definePlugin", "lazy", "AppGraphBuilder", "lazy", "IntentResolver", "ReactSurface", "translations", "meta", "id", "RegistryPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupAppGraph", "AppGraphBuilder"]
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-AEBASNOI.mjs";
|
|
4
4
|
|
|
5
5
|
// src/capabilities/intent-resolver.ts
|
|
6
|
-
import {
|
|
6
|
+
import { Capabilities, LayoutAction, SettingsAction, contributes, createIntent, createResolver } from "@dxos/app-framework";
|
|
7
7
|
var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
|
|
8
8
|
intent: SettingsAction.OpenPluginRegistry,
|
|
9
9
|
resolve: () => {
|
|
@@ -20,4 +20,4 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
|
|
|
20
20
|
export {
|
|
21
21
|
intent_resolver_default as default
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=intent-resolver-
|
|
23
|
+
//# sourceMappingURL=intent-resolver-UGDFPMAG.mjs.map
|
package/dist/lib/browser/{intent-resolver-W67CIJI3.mjs.map → intent-resolver-UGDFPMAG.mjs.map}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n
|
|
5
|
-
"mappings": ";;;;;AAIA,SACEA,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n LayoutAction,\n SettingsAction,\n contributes,\n createIntent,\n createResolver,\n} from '@dxos/app-framework';\n\nimport { REGISTRY_ID } from '../meta';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: SettingsAction.OpenPluginRegistry,\n resolve: () => {\n return {\n intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: REGISTRY_ID })],\n };\n },\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SACEA,cACAC,cACAC,gBACAC,aACAC,cACAC,sBACK;AAIP,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,eAAeC;EACvBC,SAAS,MAAA;AACP,WAAO;MACLC,SAAS;QAACC,aAAaC,aAAaC,iBAAiB;UAAEC,MAAM;UAAaC,SAASC;QAAY,CAAA;;IACjG;EACF;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["Capabilities", "LayoutAction", "SettingsAction", "contributes", "createIntent", "createResolver", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "SettingsAction", "OpenPluginRegistry", "resolve", "intents", "createIntent", "LayoutAction", "SwitchWorkspace", "part", "subject", "REGISTRY_ID"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":1893,"imports":[],"format":"esm"},"src/capabilities/app-graph-builder.ts":{"bytes":21253,"imports":[{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"effect","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":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1893,"imports":[],"format":"esm"},"src/capabilities/app-graph-builder.ts":{"bytes":21253,"imports":[{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"effect","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":8065,"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":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginItem.tsx":{"bytes":13093,"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":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/PluginList.tsx":{"bytes":2682,"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":9236,"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/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":11810,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":4042,"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":3744},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-AEBASNOI.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-6JQNRTEQ.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/intent-resolver-UGDFPMAG.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/react-surface-YATPY47L.mjs","kind":"dynamic-import"}],"exports":["REGISTRY_ID","REGISTRY_KEY","REGISTRY_PLUGIN","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":2035},"dist/lib/browser/app-graph-builder-6JQNRTEQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9268},"dist/lib/browser/app-graph-builder-6JQNRTEQ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-AEBASNOI.mjs","kind":"import-statement"},{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"effect","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":4841}},"bytes":5079},"dist/lib/browser/intent-resolver-UGDFPMAG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1264},"dist/lib/browser/intent-resolver-UGDFPMAG.mjs":{"imports":[{"path":"dist/lib/browser/chunk-AEBASNOI.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":461}},"bytes":658},"dist/lib/browser/react-surface-YATPY47L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22471},"dist/lib/browser/react-surface-YATPY47L.mjs":{"imports":[{"path":"dist/lib/browser/chunk-AEBASNOI.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":"@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":"@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/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":2974},"src/components/PluginDetail.tsx":{"bytesInOutput":2552},"src/components/index.ts":{"bytesInOutput":0},"src/components/PluginList.tsx":{"bytesInOutput":661},"src/components/PluginItem.tsx":{"bytesInOutput":3972},"src/components/RegistryContainer.tsx":{"bytesInOutput":2354}},"bytes":12943},"dist/lib/browser/chunk-AEBASNOI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":869},"dist/lib/browser/chunk-AEBASNOI.mjs":{"imports":[],"exports":["REGISTRY_ID","REGISTRY_KEY","REGISTRY_PLUGIN","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":188}},"bytes":317}}}
|
|
@@ -5,21 +5,23 @@ import {
|
|
|
5
5
|
|
|
6
6
|
// src/capabilities/react-surface.tsx
|
|
7
7
|
import React5, { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
8
|
-
import { Capabilities as Capabilities2, contributes, createSurface,
|
|
9
|
-
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
8
|
+
import { Capabilities as Capabilities2, Plugin, contributes, createSurface, usePluginManager as usePluginManager2 } from "@dxos/app-framework";
|
|
10
9
|
|
|
11
10
|
// src/components/PluginDetail.tsx
|
|
12
11
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
13
12
|
import React from "react";
|
|
14
13
|
import { Icon, Input, Link, useTranslation } from "@dxos/react-ui";
|
|
15
|
-
import {
|
|
14
|
+
import { StackItem } from "@dxos/react-ui-stack";
|
|
16
15
|
var PluginDetail = ({ plugin, enabled, onEnable }) => {
|
|
17
16
|
var _effect = _useSignals();
|
|
18
17
|
try {
|
|
19
18
|
const { t } = useTranslation(REGISTRY_PLUGIN);
|
|
20
19
|
const { id, name, description, homePage, source, screenshots } = plugin.meta;
|
|
21
|
-
return /* @__PURE__ */ React.createElement(
|
|
22
|
-
classNames: "
|
|
20
|
+
return /* @__PURE__ */ React.createElement(StackItem.Content, {
|
|
21
|
+
classNames: "block overflow-y-auto"
|
|
22
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
23
|
+
role: "none",
|
|
24
|
+
className: "container-max-width p-4"
|
|
23
25
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
24
26
|
role: "none",
|
|
25
27
|
className: "flex justify-between items-center"
|
|
@@ -61,7 +63,7 @@ var PluginDetail = ({ plugin, enabled, onEnable }) => {
|
|
|
61
63
|
icon: "ph--arrow-square-out--bold",
|
|
62
64
|
size: 3,
|
|
63
65
|
classNames: "inline-block leading-none mli-1"
|
|
64
|
-
})))));
|
|
66
|
+
}))))));
|
|
65
67
|
} finally {
|
|
66
68
|
_effect.f();
|
|
67
69
|
}
|
|
@@ -186,9 +188,9 @@ var PluginList = ({ plugins = [], ...props }) => {
|
|
|
186
188
|
// src/components/RegistryContainer.tsx
|
|
187
189
|
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
188
190
|
import React4, { useCallback as useCallback2, useMemo } from "react";
|
|
189
|
-
import { Capabilities,
|
|
191
|
+
import { Capabilities, LayoutAction, SettingsAction, createIntent, useCapability, useIntentDispatcher, usePluginManager } from "@dxos/app-framework";
|
|
190
192
|
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
191
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
193
|
+
import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
|
|
192
194
|
var sortByPluginMeta = ({ meta: { name: a = "" } }, { meta: { name: b = "" } }) => a.localeCompare(b);
|
|
193
195
|
var RegistryContainer = ({ id, plugins: _plugins }) => {
|
|
194
196
|
var _effect = _useSignals4();
|
|
@@ -238,7 +240,7 @@ var RegistryContainer = ({ id, plugins: _plugins }) => {
|
|
|
238
240
|
})), [
|
|
239
241
|
dispatch
|
|
240
242
|
]);
|
|
241
|
-
return /* @__PURE__ */ React4.createElement(
|
|
243
|
+
return /* @__PURE__ */ React4.createElement(StackItem2.Content, {
|
|
242
244
|
classNames: "min-bs-0 overflow-y-auto scrollbar-thin contain-layout"
|
|
243
245
|
}, /* @__PURE__ */ React4.createElement(PluginList, {
|
|
244
246
|
plugins,
|
|
@@ -319,15 +321,15 @@ var react_surface_default = () => contributes(Capabilities2.ReactSurface, [
|
|
|
319
321
|
subject.meta.id,
|
|
320
322
|
enabled
|
|
321
323
|
]);
|
|
322
|
-
return /* @__PURE__ */ React5.createElement(
|
|
324
|
+
return /* @__PURE__ */ React5.createElement(PluginDetail, {
|
|
323
325
|
plugin: subject,
|
|
324
326
|
enabled,
|
|
325
327
|
onEnable: handleEnable
|
|
326
|
-
})
|
|
328
|
+
});
|
|
327
329
|
}
|
|
328
330
|
})
|
|
329
331
|
]);
|
|
330
332
|
export {
|
|
331
333
|
react_surface_default as default
|
|
332
334
|
};
|
|
333
|
-
//# sourceMappingURL=react-surface-
|
|
335
|
+
//# sourceMappingURL=react-surface-YATPY47L.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/PluginDetail.tsx", "../../../src/components/PluginList.tsx", "../../../src/components/PluginItem.tsx", "../../../src/components/RegistryContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Capabilities, Plugin, contributes, createSurface, usePluginManager } from '@dxos/app-framework';\n\nimport { PluginDetail, RegistryContainer } from '../components';\nimport { REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${REGISTRY_PLUGIN}/all`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+all`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(() => manager.plugins.filter(({ meta }) => !manager.core.includes(meta.id)), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}+all`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/installed`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+installed`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager.plugins\n .filter(({ meta }) => !manager.core.includes(meta.id))\n .filter(({ meta }) => manager.enabled.includes(meta.id)),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+installed`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/recommended`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+recommended`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(\n () =>\n manager.plugins\n .filter(({ meta }) => !manager.core.includes(meta.id))\n .filter(({ meta }) => !meta.tags?.includes('labs')),\n [],\n );\n\n return <RegistryContainer id={`${REGISTRY_KEY}+recommended`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/labs`,\n role: 'article',\n filter: (data): data is any => data.subject === `${REGISTRY_KEY}+labs`,\n component: () => {\n const manager = usePluginManager();\n const filtered = useMemo(() => manager.plugins.filter(({ meta }) => meta.tags?.includes('labs')), []);\n\n return <RegistryContainer id={`${REGISTRY_KEY}+labs`} plugins={filtered} />;\n },\n }),\n createSurface({\n id: `${REGISTRY_PLUGIN}/plugin-details`,\n role: 'article',\n filter: (data): data is { subject: Plugin } => data.subject instanceof Plugin,\n component: ({ data: { subject } }) => {\n const manager = usePluginManager();\n const enabled = manager.enabled.includes(subject.meta.id);\n const handleEnable = useCallback(\n () => (enabled ? manager.disable(subject.meta.id) : manager.enable(subject.meta.id)),\n [manager, subject.meta.id, enabled],\n );\n\n return <PluginDetail plugin={subject} enabled={enabled} onEnable={handleEnable} />;\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { Icon, Input, Link, useTranslation } from '@dxos/react-ui';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { REGISTRY_PLUGIN } from '../meta';\n\nexport type PluginDetailProps = {\n plugin: Plugin;\n enabled?: boolean;\n onEnable?: () => void;\n};\n\nexport const PluginDetail = ({ plugin, enabled, onEnable }: PluginDetailProps) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n const { id, name, description, homePage, source, screenshots } = plugin.meta;\n\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <div role='none' className='container-max-width p-4'>\n <div role='none' className='flex justify-between items-center'>\n <p>{id}</p>\n <Input.Root>\n <Input.Switch classNames='self-center' checked={enabled} onClick={onEnable} />\n </Input.Root>\n </div>\n\n {screenshots && screenshots.length > 0 && (\n <div role='none'>\n <h1 className='text-lg mb-2'>Preview</h1>\n <img src={screenshots[0]} alt={name} className='aspect-video object-fit' />\n </div>\n )}\n\n <div role='none'>\n <p>{description}</p>\n </div>\n\n <div role='none'>\n <h1 className='text-lg mb-2'>Resources</h1>\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 </StackItem.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { List } from '@dxos/react-ui';\n\nimport { PluginItem, type PluginItemProps } from './PluginItem';\n\nexport type PluginListProps = Omit<PluginItemProps, 'plugin'> & {\n plugins?: readonly Plugin[];\n};\n\nexport const PluginList = ({ plugins = [], ...props }: PluginListProps) => {\n return (\n <List classNames='grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] auto-rows-[12rem] gap-3 p-3'>\n {plugins.map((plugin) => (\n <div key={plugin.meta.id} className='flex'>\n <PluginItem plugin={plugin} {...props} />\n </div>\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 { Icon, IconButton, Input, Link, ListItem, Tag, useTranslation } from '@dxos/react-ui';\nimport { descriptionText, mx } from '@dxos/react-ui-theme';\n\nimport { REGISTRY_PLUGIN } from '../meta';\n\nexport type PluginItemProps = {\n plugin: Plugin;\n installed?: readonly string[];\n enabled?: readonly string[];\n onClick?: (id: string) => void;\n onChange?: (id: string, enabled: boolean) => void;\n hasSettings?: (id: string) => boolean;\n onSettings?: (id: string) => void;\n};\n\nexport const PluginItem = ({\n plugin,\n enabled = [],\n onClick,\n onChange,\n hasSettings: _hasSettings,\n onSettings,\n}: PluginItemProps) => {\n const { t } = useTranslation(REGISTRY_PLUGIN);\n const { id, name, description, tags, icon = 'ph--circle--regular' } = 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 = _hasSettings?.(id) ?? false;\n const handleSettings = useCallback(() => onSettings?.(id), [id, onSettings]);\n\n return (\n <ListItem.Root\n key={id}\n labelId={labelId}\n data-testid={`pluginList.${id}`}\n aria-describedby={descriptionId}\n // TODO(burdon): Use Rail vars.\n classNames='is-full bs-full grid grid-cols-[48px_1fr_48px] grid-rows-[40px_1fr_32px] p-1 border border-separator rounded-md'\n >\n {/* Header. */}\n <div className='flex flex-col grow justify-center items-center'>\n <Icon icon={icon} size={6} onClick={handleClick} classNames='text-subdued cursor-pointer' />\n </div>\n <div className='flex items-center overflow-hidden cursor-pointer' onClick={handleClick}>\n <span className='truncate'>{name ?? id}</span>\n </div>\n <div className='flex justify-center items-center'>\n <Input.Root id={inputId}>\n <Input.Switch classNames='self-center' checked={isEnabled} onClick={handleChange} />\n </Input.Root>\n </div>\n\n {/* Body. */}\n <div />\n {(description || tags) && (\n <div id={descriptionId} className='col-span-2 flex flex-col w-full justify-between gap-2 pb-2'>\n <div className='grow'>\n <p className={mx(descriptionText, 'line-clamp-3 min-w-0 pie-2')}>{description}</p>\n </div>\n {tags && tags.length > 0 && (\n <div>\n {tags.map((tag) => (\n <Tag key={tag} palette={'indigo'} classNames='text-xs capitalize'>\n {tag}\n </Tag>\n ))}\n </div>\n )}\n </div>\n )}\n\n {/* Footer. */}\n <div />\n <div className='flex gap-2 items-center pie-1'>\n <Link\n aria-describedby={descriptionId}\n classNames='text-sm text-description cursor-pointer'\n onClick={handleClick}\n >\n {t('details label')}\n </Link>\n\n <div className='flex-1' />\n </div>\n <div className='flex justify-center items-center'>\n {hasSettings && (\n <IconButton\n aria-describedby={descriptionId}\n classNames='text-sm text-description cursor-pointer'\n icon='ph--gear--regular'\n label={t('settings label')}\n iconOnly\n size={4}\n onClick={handleSettings}\n />\n )}\n </div>\n </ListItem.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n type Plugin,\n SettingsAction,\n createIntent,\n useCapability,\n useIntentDispatcher,\n usePluginManager,\n} from '@dxos/app-framework';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { PluginList } from './PluginList';\n\nconst sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin, { meta: { name: b = '' } }: Plugin) => a.localeCompare(b);\n\nexport const RegistryContainer = ({ id, plugins: _plugins }: { id: string; plugins: Plugin[] }) => {\n const manager = usePluginManager();\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const plugins = useMemo(() => _plugins.sort(sortByPluginMeta), [_plugins]);\n const settingsStore = useCapability(Capabilities.SettingsStore);\n\n // TODO(wittjosiah): Factor out to an intent?\n const handleChange = useCallback(\n async (id: string, enabled: boolean) => {\n if (enabled) {\n await manager.enable(id);\n } else {\n await manager.disable(id);\n }\n\n await dispatch(\n createIntent(ObservabilityAction.SendEvent, {\n name: 'plugins.toggle',\n properties: {\n plugin: id,\n enabled,\n },\n }),\n );\n },\n [dispatch, manager],\n );\n\n const handleClick = useCallback(\n (pluginId: string) =>\n dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n // TODO(wittjosiah): `/` currently is not supported in ids.\n subject: [pluginId.replaceAll('/', ':')],\n options: { pivotId: id, positioning: 'end' },\n }),\n ),\n [dispatch, id],\n );\n\n const hasSettings = useCallback((pluginId: string) => !!settingsStore.getStore(pluginId), [settingsStore]);\n\n const handleSettings = useCallback(\n (pluginId: string) => dispatch(createIntent(SettingsAction.Open, { plugin: pluginId })),\n [dispatch],\n );\n\n return (\n <StackItem.Content classNames='min-bs-0 overflow-y-auto scrollbar-thin contain-layout'>\n <PluginList\n plugins={plugins}\n enabled={manager.enabled}\n onClick={handleClick}\n onChange={handleChange}\n hasSettings={hasSettings}\n onSettings={handleSettings}\n />\n </StackItem.Content>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,OAAOA,UAASC,eAAAA,cAAaC,WAAAA,gBAAe;AAE5C,SAASC,gBAAAA,eAAcC,QAAQC,aAAaC,eAAeC,oBAAAA,yBAAwB;;;;ACFnF,OAAOC,WAAW;AAGlB,SAASC,MAAMC,OAAOC,MAAMC,sBAAsB;AAClD,SAASC,iBAAiB;AAUnB,IAAMC,eAAe,CAAC,EAAEC,QAAQC,SAASC,SAAQ,MAAqB;;;AAC3E,UAAM,EAAEC,EAAC,IAAKC,eAAeC,eAAAA;AAC7B,UAAM,EAAEC,IAAIC,MAAMC,aAAaC,UAAUC,QAAQC,YAAW,IAAKX,OAAOY;AAExE,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,sBAAA,cAACF,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACzB,sB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O,gBAAAF,OAAA,cAACS,cAAAA;QAAaC,QAAQrB;QAASa;QAAkBS,UAAUN;;IACpE;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "useCallback", "useMemo", "Capabilities", "Plugin", "contributes", "createSurface", "usePluginManager", "React", "Icon", "Input", "Link", "useTranslation", "StackItem", "PluginDetail", "plugin", "enabled", "onEnable", "t", "useTranslation", "REGISTRY_PLUGIN", "id", "name", "description", "homePage", "source", "screenshots", "meta", "StackItem", "Content", "classNames", "div", "role", "className", "p", "Input", "Root", "Switch", "checked", "onClick", "length", "h1", "img", "src", "alt", "Link", "href", "target", "rel", "Icon", "icon", "size", "React", "List", "React", "useCallback", "Icon", "IconButton", "Input", "Link", "ListItem", "Tag", "useTranslation", "descriptionText", "mx", "PluginItem", "plugin", "enabled", "onClick", "onChange", "hasSettings", "_hasSettings", "onSettings", "t", "useTranslation", "REGISTRY_PLUGIN", "id", "name", "description", "tags", "icon", "meta", "isEnabled", "includes", "inputId", "labelId", "descriptionId", "handleClick", "useCallback", "handleChange", "event", "stopPropagation", "handleSettings", "React", "ListItem", "Root", "key", "data-testid", "aria-describedby", "classNames", "div", "className", "Icon", "size", "span", "Input", "Switch", "checked", "p", "mx", "descriptionText", "length", "map", "tag", "Tag", "palette", "Link", "IconButton", "label", "iconOnly", "PluginList", "plugins", "props", "React", "List", "classNames", "map", "plugin", "div", "key", "meta", "id", "className", "PluginItem", "React", "useCallback", "useMemo", "Capabilities", "LayoutAction", "SettingsAction", "createIntent", "useCapability", "useIntentDispatcher", "usePluginManager", "ObservabilityAction", "StackItem", "sortByPluginMeta", "meta", "name", "a", "b", "localeCompare", "RegistryContainer", "id", "plugins", "_plugins", "manager", "usePluginManager", "dispatchPromise", "dispatch", "useIntentDispatcher", "useMemo", "sort", "settingsStore", "useCapability", "Capabilities", "SettingsStore", "handleChange", "useCallback", "enabled", "enable", "disable", "createIntent", "ObservabilityAction", "SendEvent", "properties", "plugin", "handleClick", "pluginId", "LayoutAction", "Open", "part", "subject", "replaceAll", "options", "pivotId", "positioning", "hasSettings", "getStore", "handleSettings", "SettingsAction", "React", "StackItem", "Content", "classNames", "PluginList", "onClick", "onChange", "onSettings", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "REGISTRY_PLUGIN", "role", "filter", "data", "subject", "REGISTRY_KEY", "component", "manager", "usePluginManager", "filtered", "useMemo", "plugins", "meta", "core", "includes", "React", "RegistryContainer", "enabled", "tags", "Plugin", "handleEnable", "useCallback", "disable", "enable", "PluginDetail", "plugin", "onEnable"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type PluginContext } from '@dxos/app-framework';
|
|
2
|
-
declare const _default: (context: PluginContext) => import("@dxos/app-framework").Capability<import("@dxos/app-graph").BuilderExtensions
|
|
2
|
+
declare const _default: (context: PluginContext) => import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-graph").BuilderExtensions>>;
|
|
3
3
|
export default _default;
|
|
4
4
|
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,KAAK,aAAa,EAA6C,MAAM,qBAAqB,CAAC;yBAKlG,SAAS,aAAa;AAAtC,wBA8IK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const AppGraphBuilder: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-graph").BuilderExtensions
|
|
2
|
-
export declare const IntentResolver: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver
|
|
3
|
-
export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface
|
|
1
|
+
export declare const AppGraphBuilder: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-graph").BuilderExtensions>> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
2
|
+
export declare const IntentResolver: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-framework").Capabilities.IntentResolver>> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
3
|
+
export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-framework").Capabilities.ReactSurface>> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,gRAA4C,CAAC;AACzE,eAAO,MAAM,cAAc,8OAA0C,CAAC;AACtE,eAAO,MAAM,YAAY,4OAAwC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Capabilities } from '@dxos/app-framework';
|
|
2
|
-
declare const _default: () => import("@dxos/app-framework").Capability<Capabilities.IntentResolver
|
|
2
|
+
declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<Capabilities.IntentResolver>>;
|
|
3
3
|
export default _default;
|
|
4
4
|
//# sourceMappingURL=intent-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EAMb,MAAM,qBAAqB,CAAC;;AAI7B,wBAWI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Capabilities } from '@dxos/app-framework';
|
|
2
|
-
declare const _default: () => import("@dxos/app-framework").Capability<Capabilities.ReactSurface
|
|
2
|
+
declare const _default: () => import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<Capabilities.ReactSurface>>;
|
|
3
3
|
export default _default;
|
|
4
4
|
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAwD,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAwD,MAAM,qBAAqB,CAAC;;AAKzG,wBAyEK"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
declare const
|
|
2
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const Default: Story;
|
|
5
|
+
declare const meta: {
|
|
6
|
+
title: string;
|
|
7
|
+
render: () => React.JSX.Element;
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
5
12
|
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
6
14
|
//# sourceMappingURL=Icon.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,
|
|
1
|
+
{"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAuD,MAAM,OAAO,CAAC;AAyF5E,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,QAAA,MAAM,IAAI;;;;;;CAMuB,CAAC;AAElC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginDetail.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginDetail.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,+BAA+B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"PluginDetail.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginDetail.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,+BAA+B,iBAAiB,sBA8C5E,CAAC"}
|
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import { type StoryObj
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ plugin, enabled, onEnable }: import("./PluginDetail").PluginDetailProps) => import("react").JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
parameters: {
|
|
8
|
+
translations: [{
|
|
9
|
+
readonly 'en-US': {
|
|
10
|
+
readonly [meta.id]: {
|
|
11
|
+
readonly 'plugin name': "Registry";
|
|
12
|
+
readonly 'details label': "Details";
|
|
13
|
+
readonly 'home page label': "Website";
|
|
14
|
+
readonly 'source label': "Source";
|
|
15
|
+
readonly 'plugin registry label': "Plugin Registry";
|
|
16
|
+
readonly 'all plugins label': "All";
|
|
17
|
+
readonly 'installed plugins label': "Enabled";
|
|
18
|
+
readonly 'recommended plugins label': "Recommended";
|
|
19
|
+
readonly 'labs plugins label': "Labs";
|
|
20
|
+
readonly 'community plugins label': "Community";
|
|
21
|
+
readonly 'load by url label': "Load by URL (soon)";
|
|
22
|
+
readonly 'coming soon label': "Coming soon!";
|
|
23
|
+
readonly 'open plugin registry label': "Open plugin registry";
|
|
24
|
+
readonly 'settings label': "Settings";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
5
30
|
export default meta;
|
|
6
|
-
type Story = StoryObj<
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
7
32
|
export declare const Default: Story;
|
|
8
33
|
//# sourceMappingURL=PluginDetail.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginDetail.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginDetail.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,
|
|
1
|
+
{"version":3,"file":"PluginDetail.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginDetail.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AASjE,QAAA,MAAM,IAAI;;;;;;;yBANT,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;CAaoB,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC"}
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
5
|
+
declare const meta: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: ({ plugins, ...props }: import("./PluginList").PluginListProps) => React.JSX.Element;
|
|
8
|
+
render: ({ classNames }: ThemedClassName<{}>) => React.JSX.Element;
|
|
9
|
+
decorators: import("@storybook/react").Decorator[];
|
|
10
|
+
parameters: {
|
|
11
|
+
translations: [{
|
|
12
|
+
readonly 'en-US': {
|
|
13
|
+
readonly [meta.id]: {
|
|
14
|
+
readonly 'plugin name': "Registry";
|
|
15
|
+
readonly 'details label': "Details";
|
|
16
|
+
readonly 'home page label': "Website";
|
|
17
|
+
readonly 'source label': "Source";
|
|
18
|
+
readonly 'plugin registry label': "Plugin Registry";
|
|
19
|
+
readonly 'all plugins label': "All";
|
|
20
|
+
readonly 'installed plugins label': "Enabled";
|
|
21
|
+
readonly 'recommended plugins label': "Recommended";
|
|
22
|
+
readonly 'labs plugins label': "Labs";
|
|
23
|
+
readonly 'community plugins label': "Community";
|
|
24
|
+
readonly 'load by url label': "Load by URL (soon)";
|
|
25
|
+
readonly 'coming soon label': "Coming soon!";
|
|
26
|
+
readonly 'open plugin registry label': "Open plugin registry";
|
|
27
|
+
readonly 'settings label': "Settings";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}];
|
|
9
31
|
};
|
|
10
32
|
};
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
export declare const Default: Story;
|
|
36
|
+
export declare const Column: Story;
|
|
11
37
|
//# sourceMappingURL=PluginList.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,
|
|
1
|
+
{"version":3,"file":"PluginList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PluginList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAqDtD,QAAA,MAAM,IAAI;;;6BAlC4B,eAAe,CAAC,EAAE,CAAC;;;;;yBArBzD,CAAO,IAAG,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;CA+DqB,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegistryContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/RegistryContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,
|
|
1
|
+
{"version":3,"file":"RegistryContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/RegistryContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAGL,KAAK,MAAM,EAMZ,MAAM,qBAAqB,CAAC;AAQ7B,eAAO,MAAM,iBAAiB,GAAI,2BAA2B;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,sBA4D7F,CAAC"}
|