@dxos/plugin-devtools 0.11.1 → 0.12.0-next-2800d0376abcc62d5544afdd744b16b2b960434e
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/{chunk-types.mjs → Devtools.mjs} +5 -14
- package/dist/lib/Devtools.mjs.map +1 -0
- package/dist/lib/DevtoolsEvents.mjs +15 -0
- package/dist/lib/DevtoolsEvents.mjs.map +1 -0
- package/dist/lib/DevtoolsPlugin.mjs +13 -36
- package/dist/lib/DevtoolsPlugin.mjs.map +1 -1
- package/dist/lib/capabilities.mjs +39 -5
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +34 -0
- package/dist/lib/capabilities.node.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +30 -0
- package/dist/lib/capabilities.workerd.mjs.map +1 -0
- package/dist/lib/chunk-CliPanel.mjs +103 -0
- package/dist/lib/chunk-CliPanel.mjs.map +1 -0
- package/dist/lib/chunk-DebugGraph.mjs +2 -2
- package/dist/lib/chunk-DebugGraph.mjs.map +1 -1
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs +14 -13
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs.map +1 -1
- package/dist/lib/chunk-GithubPanel.mjs +36 -30
- package/dist/lib/chunk-GithubPanel.mjs.map +1 -1
- package/dist/lib/chunk-RegistryPanel.mjs +2 -2
- package/dist/lib/chunk-RegistryPanel.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +66 -50
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-react-context.mjs +4 -3
- package/dist/lib/chunk-react-context.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +35 -28
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/containers.mjs +2 -1
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/index.mjs +4 -3
- package/dist/lib/meta.mjs +29 -1
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/plugin.mjs +6 -5
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/translations.mjs +1 -0
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/lib/types.mjs +3 -2
- package/dist/types/src/DevtoolsPlugin.d.ts +36 -3
- package/dist/types/src/DevtoolsPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/node.d.ts +8 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +8 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +2 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/containers/CliPanel/CliPanel.d.ts +6 -0
- package/dist/types/src/containers/CliPanel/CliPanel.d.ts.map +1 -0
- package/dist/types/src/containers/CliPanel/CliPanel.stories.d.ts +89 -0
- package/dist/types/src/containers/CliPanel/CliPanel.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CliPanel/index.d.ts +2 -0
- package/dist/types/src/containers/CliPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/CliPanel/useCliApp.d.ts +29 -0
- package/dist/types/src/containers/CliPanel/useCliApp.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +2 -2
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +9 -4
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +6 -4
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +1 -0
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +2 -1
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/plugin.test.d.ts +2 -0
- package/dist/types/src/plugin.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +6 -4
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Devtools.d.ts +1 -0
- package/dist/types/src/types/Devtools.d.ts.map +1 -1
- package/dist/types/src/types/DevtoolsEvents.d.ts +8 -0
- package/dist/types/src/types/DevtoolsEvents.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +73 -74
- package/src/DevtoolsPlugin.ts +15 -0
- package/src/capabilities/DevtoolsSurfaces.tsx +9 -4
- package/src/capabilities/app-graph-builder.ts +72 -49
- package/src/capabilities/gen/node.ts +49 -0
- package/src/capabilities/gen/workerd.ts +44 -0
- package/src/capabilities/index.ts +50 -4
- package/src/capabilities/react-context.tsx +3 -2
- package/src/capabilities/react-surface.ts +11 -5
- package/src/containers/CliPanel/CliPanel.stories.tsx +75 -0
- package/src/containers/CliPanel/CliPanel.tsx +45 -0
- package/src/containers/CliPanel/index.ts +5 -0
- package/src/containers/CliPanel/useCliApp.ts +103 -0
- package/src/containers/DebugGraph/DebugGraph.tsx +3 -3
- package/src/containers/GithubPanel/GithubComponent.tsx +13 -15
- package/src/containers/RegistryPanel/RegistryPanel.tsx +1 -1
- package/src/containers/index.ts +1 -0
- package/src/index.ts +3 -2
- package/src/meta.ts +1 -1
- package/src/{DevtoolsPlugin.test.ts → plugin.test.ts} +5 -4
- package/src/plugin.tsx +20 -0
- package/src/translations.ts +1 -0
- package/src/types/Devtools.ts +1 -0
- package/src/types/DevtoolsEvents.ts +16 -0
- package/src/types/index.ts +1 -0
- package/dist/lib/DevtoolsPlugin.node.mjs +0 -10
- package/dist/lib/DevtoolsPlugin.node.mjs.map +0 -1
- package/dist/lib/DevtoolsPlugin.workerd.mjs +0 -8
- package/dist/lib/DevtoolsPlugin.workerd.mjs.map +0 -1
- package/dist/lib/chunk-meta.mjs +0 -30
- package/dist/lib/chunk-meta.mjs.map +0 -1
- package/dist/lib/chunk-types.mjs.map +0 -1
- package/dist/types/src/DevtoolsPlugin.node.d.ts +0 -4
- package/dist/types/src/DevtoolsPlugin.node.d.ts.map +0 -1
- package/dist/types/src/DevtoolsPlugin.test.d.ts +0 -2
- package/dist/types/src/DevtoolsPlugin.test.d.ts.map +0 -1
- package/dist/types/src/DevtoolsPlugin.workerd.d.ts +0 -4
- package/dist/types/src/DevtoolsPlugin.workerd.d.ts.map +0 -1
- package/src/DevtoolsPlugin.node.ts +0 -16
- package/src/DevtoolsPlugin.tsx +0 -54
- package/src/DevtoolsPlugin.workerd.ts +0 -11
- package/src/plugin.ts +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { meta } from "#meta";
|
|
2
2
|
import { createContext, useContext, useEffect, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { IconButton, ScrollArea, useTranslation } from "@dxos/react-ui";
|
|
4
|
+
import { Flex, IconButton, ScrollArea, useTranslation } from "@dxos/react-ui";
|
|
5
5
|
//#region src/containers/GithubPanel/GithubComponent.tsx
|
|
6
6
|
var DEFAULT_REPO = "dxos/dxos";
|
|
7
7
|
var DEFAULT_LIMIT = 20;
|
|
@@ -71,10 +71,10 @@ var Header = () => {
|
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
73
|
var RELATIVE_UNITS = [
|
|
74
|
-
["year",
|
|
75
|
-
["month",
|
|
76
|
-
["week",
|
|
77
|
-
["day",
|
|
74
|
+
["year", 31536e3],
|
|
75
|
+
["month", 2592e3],
|
|
76
|
+
["week", 604800],
|
|
77
|
+
["day", 86400],
|
|
78
78
|
["hour", 3600],
|
|
79
79
|
["minute", 60]
|
|
80
80
|
];
|
|
@@ -85,32 +85,38 @@ var formatRelative = (iso) => {
|
|
|
85
85
|
for (const [unit, secondsInUnit] of RELATIVE_UNITS) if (absDiff >= secondsInUnit) return formatter.format(Math.round(diffSeconds / secondsInUnit), unit);
|
|
86
86
|
return formatter.format(Math.round(diffSeconds), "second");
|
|
87
87
|
};
|
|
88
|
-
var PullRow = ({ pull }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
children:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
className: "
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
children: [
|
|
105
|
-
"
|
|
106
|
-
pull.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
88
|
+
var PullRow = ({ pull }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Flex, {
|
|
89
|
+
asChild: true,
|
|
90
|
+
align: "start",
|
|
91
|
+
gap: "sm",
|
|
92
|
+
classNames: "px-trim-sm py-trim-xs rounded-sm hover:bg-hover-surface",
|
|
93
|
+
children: /* @__PURE__ */ jsxs("a", {
|
|
94
|
+
href: pull.html_url,
|
|
95
|
+
target: "_blank",
|
|
96
|
+
rel: "noopener noreferrer",
|
|
97
|
+
children: [/* @__PURE__ */ jsx("img", {
|
|
98
|
+
src: pull.user.avatar_url,
|
|
99
|
+
alt: "",
|
|
100
|
+
className: "size-6 rounded-full shrink-0"
|
|
101
|
+
}), /* @__PURE__ */ jsxs(Flex, {
|
|
102
|
+
column: true,
|
|
103
|
+
classNames: "min-w-0 flex-1",
|
|
104
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
105
|
+
className: "text-sm leading-6 truncate",
|
|
106
|
+
children: pull.title
|
|
107
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
108
|
+
className: "text-xs text-description truncate",
|
|
109
|
+
children: [
|
|
110
|
+
"#",
|
|
111
|
+
pull.number,
|
|
112
|
+
" · ",
|
|
113
|
+
pull.user.login,
|
|
114
|
+
" · ",
|
|
115
|
+
pull.merged_at ? formatRelative(pull.merged_at) : ""
|
|
116
|
+
]
|
|
117
|
+
})]
|
|
112
118
|
})]
|
|
113
|
-
})
|
|
119
|
+
})
|
|
114
120
|
}) });
|
|
115
121
|
var Content = () => {
|
|
116
122
|
const { pulls } = useComponentContext();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-GithubPanel.mjs","names":[],"sources":["../../src/containers/GithubPanel/GithubComponent.tsx","../../src/containers/GithubPanel/GithubPanel.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type ReactNode, createContext, useContext, useEffect, useState } from 'react';\n\nimport { IconButton, ScrollArea, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nconst DEFAULT_REPO = 'dxos/dxos';\nconst DEFAULT_LIMIT = 20;\n\ntype GithubUser = {\n login: string;\n avatar_url: string;\n html_url: string;\n};\n\ntype GithubPullRequest = {\n number: number;\n title: string;\n html_url: string;\n merged_at: string | null;\n user: GithubUser;\n};\n\ntype ComponentContextValue = {\n repo: string;\n pulls: GithubPullRequest[];\n unavailable: boolean;\n};\n\nconst ComponentContext = createContext<ComponentContextValue | null>(null);\n\nconst useComponentContext = () => {\n const ctx = useContext(ComponentContext);\n if (!ctx) {\n throw new Error('GithubComponent.* parts must be rendered inside GithubComponent.Root.');\n }\n return ctx;\n};\n\nexport type GithubComponentRootProps = {\n /** `<owner>/<name>`. Defaults to `dxos/dxos`. */\n repo?: string;\n /** Maximum number of merged PRs to fetch. */\n limit?: number;\n children?: ReactNode;\n};\n\nconst Root = ({ repo = DEFAULT_REPO, limit = DEFAULT_LIMIT, children }: GithubComponentRootProps) => {\n const [pulls, setPulls] = useState<GithubPullRequest[]>([]);\n const [unavailable, setUnavailable] = useState(false);\n\n useEffect(() => {\n const controller = new AbortController();\n setPulls([]);\n setUnavailable(false);\n void (async () => {\n try {\n const url = new URL(`https://api.github.com/repos/${repo}/pulls`);\n url.searchParams.set('state', 'closed');\n url.searchParams.set('sort', 'updated');\n url.searchParams.set('direction', 'desc');\n url.searchParams.set('per_page', String(limit * 2));\n const response = await fetch(url.toString(), {\n signal: controller.signal,\n headers: { Accept: 'application/vnd.github+json' },\n });\n if (!response.ok) {\n setUnavailable(true);\n return;\n }\n const items = (await response.json()) as GithubPullRequest[];\n setPulls(items.filter((pull) => pull.merged_at !== null).slice(0, limit));\n setUnavailable(false);\n } catch {\n if (controller.signal.aborted) {\n return;\n }\n setPulls([]);\n setUnavailable(true);\n }\n })();\n return () => controller.abort();\n }, [repo, limit]);\n\n return <ComponentContext.Provider value={{ repo, pulls, unavailable }}>{children}</ComponentContext.Provider>;\n};\n\nconst Header = () => {\n const { t } = useTranslation(meta.profile.key);\n const { repo, pulls, unavailable } = useComponentContext();\n return (\n <header className='flex items-center justify-between gap-1 px-4 py-3 dx-modal-surface border-b border-subdued-separator'>\n <a\n href={`https://github.com/${repo}`}\n target='_blank'\n rel='noopener noreferrer'\n className='text-sm font-medium truncate'\n >\n @{repo}\n </a>\n <div className='text-xs text-description'>\n {unavailable\n ? t('github-unavailable.message')\n : pulls.length > 0\n ? t('recent-prs.label', { count: pulls.length })\n : t('github-loading.message')}\n </div>\n </header>\n );\n};\n\nconst RELATIVE_UNITS: Array<[Intl.RelativeTimeFormatUnit, number]> = [\n ['year', 60 * 60 * 24 * 365],\n ['month', 60 * 60 * 24 * 30],\n ['week', 60 * 60 * 24 * 7],\n ['day', 60 * 60 * 24],\n ['hour', 60 * 60],\n ['minute', 60],\n];\n\nconst formatRelative = (iso: string): string => {\n const formatter = new Intl.RelativeTimeFormat(undefined, { numeric: 'auto' });\n const diffSeconds = (Date.parse(iso) - Date.now()) / 1000;\n const absDiff = Math.abs(diffSeconds);\n for (const [unit, secondsInUnit] of RELATIVE_UNITS) {\n if (absDiff >= secondsInUnit) {\n return formatter.format(Math.round(diffSeconds / secondsInUnit), unit);\n }\n }\n return formatter.format(Math.round(diffSeconds), 'second');\n};\n\nconst PullRow = ({ pull }: { pull: GithubPullRequest }) => (\n <li>\n <
|
|
1
|
+
{"version":3,"file":"chunk-GithubPanel.mjs","names":[],"sources":["../../src/containers/GithubPanel/GithubComponent.tsx","../../src/containers/GithubPanel/GithubPanel.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type ReactNode, createContext, useContext, useEffect, useState } from 'react';\n\nimport { Flex, IconButton, ScrollArea, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nconst DEFAULT_REPO = 'dxos/dxos';\nconst DEFAULT_LIMIT = 20;\n\ntype GithubUser = {\n login: string;\n avatar_url: string;\n html_url: string;\n};\n\ntype GithubPullRequest = {\n number: number;\n title: string;\n html_url: string;\n merged_at: string | null;\n user: GithubUser;\n};\n\ntype ComponentContextValue = {\n repo: string;\n pulls: GithubPullRequest[];\n unavailable: boolean;\n};\n\nconst ComponentContext = createContext<ComponentContextValue | null>(null);\n\nconst useComponentContext = () => {\n const ctx = useContext(ComponentContext);\n if (!ctx) {\n throw new Error('GithubComponent.* parts must be rendered inside GithubComponent.Root.');\n }\n return ctx;\n};\n\nexport type GithubComponentRootProps = {\n /** `<owner>/<name>`. Defaults to `dxos/dxos`. */\n repo?: string;\n /** Maximum number of merged PRs to fetch. */\n limit?: number;\n children?: ReactNode;\n};\n\nconst Root = ({ repo = DEFAULT_REPO, limit = DEFAULT_LIMIT, children }: GithubComponentRootProps) => {\n const [pulls, setPulls] = useState<GithubPullRequest[]>([]);\n const [unavailable, setUnavailable] = useState(false);\n\n useEffect(() => {\n const controller = new AbortController();\n setPulls([]);\n setUnavailable(false);\n void (async () => {\n try {\n const url = new URL(`https://api.github.com/repos/${repo}/pulls`);\n url.searchParams.set('state', 'closed');\n url.searchParams.set('sort', 'updated');\n url.searchParams.set('direction', 'desc');\n url.searchParams.set('per_page', String(limit * 2));\n const response = await fetch(url.toString(), {\n signal: controller.signal,\n headers: { Accept: 'application/vnd.github+json' },\n });\n if (!response.ok) {\n setUnavailable(true);\n return;\n }\n const items = (await response.json()) as GithubPullRequest[];\n setPulls(items.filter((pull) => pull.merged_at !== null).slice(0, limit));\n setUnavailable(false);\n } catch {\n if (controller.signal.aborted) {\n return;\n }\n setPulls([]);\n setUnavailable(true);\n }\n })();\n return () => controller.abort();\n }, [repo, limit]);\n\n return <ComponentContext.Provider value={{ repo, pulls, unavailable }}>{children}</ComponentContext.Provider>;\n};\n\nconst Header = () => {\n const { t } = useTranslation(meta.profile.key);\n const { repo, pulls, unavailable } = useComponentContext();\n return (\n <header className='flex items-center justify-between gap-1 px-4 py-3 dx-modal-surface border-b border-subdued-separator'>\n <a\n href={`https://github.com/${repo}`}\n target='_blank'\n rel='noopener noreferrer'\n className='text-sm font-medium truncate'\n >\n @{repo}\n </a>\n <div className='text-xs text-description'>\n {unavailable\n ? t('github-unavailable.message')\n : pulls.length > 0\n ? t('recent-prs.label', { count: pulls.length })\n : t('github-loading.message')}\n </div>\n </header>\n );\n};\n\nconst RELATIVE_UNITS: Array<[Intl.RelativeTimeFormatUnit, number]> = [\n ['year', 60 * 60 * 24 * 365],\n ['month', 60 * 60 * 24 * 30],\n ['week', 60 * 60 * 24 * 7],\n ['day', 60 * 60 * 24],\n ['hour', 60 * 60],\n ['minute', 60],\n];\n\nconst formatRelative = (iso: string): string => {\n const formatter = new Intl.RelativeTimeFormat(undefined, { numeric: 'auto' });\n const diffSeconds = (Date.parse(iso) - Date.now()) / 1000;\n const absDiff = Math.abs(diffSeconds);\n for (const [unit, secondsInUnit] of RELATIVE_UNITS) {\n if (absDiff >= secondsInUnit) {\n return formatter.format(Math.round(diffSeconds / secondsInUnit), unit);\n }\n }\n return formatter.format(Math.round(diffSeconds), 'second');\n};\n\nconst PullRow = ({ pull }: { pull: GithubPullRequest }) => (\n <li>\n <Flex asChild align='start' gap='sm' classNames='px-trim-sm py-trim-xs rounded-sm hover:bg-hover-surface'>\n <a href={pull.html_url} target='_blank' rel='noopener noreferrer'>\n <img src={pull.user.avatar_url} alt='' className='size-6 rounded-full shrink-0' />\n <Flex column classNames='min-w-0 flex-1'>\n {/* `leading-6` gives the title the avatar's line box, so the two align on their own. */}\n <span className='text-sm leading-6 truncate'>{pull.title}</span>\n <span className='text-xs text-description truncate'>\n #{pull.number} · {pull.user.login} · {pull.merged_at ? formatRelative(pull.merged_at) : ''}\n </span>\n </Flex>\n </a>\n </Flex>\n </li>\n);\n\nconst Content = () => {\n const { pulls } = useComponentContext();\n return (\n <ScrollArea.Root orientation='vertical'>\n <ScrollArea.Viewport>\n <ul className='flex flex-col p-1'>\n {pulls.map((pull) => (\n <PullRow key={pull.number} pull={pull} />\n ))}\n </ul>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n );\n};\n\nconst StatusBar = () => {\n const { t } = useTranslation(meta.profile.key);\n const { repo } = useComponentContext();\n return (\n <IconButton\n icon='ph--github-logo--regular'\n label={t('view-on-github.button')}\n variant='primary'\n classNames='w-full'\n onClick={() => {\n window.open(`https://github.com/${repo}`, '_blank', 'noopener,noreferrer');\n }}\n />\n );\n};\n\nexport const GithubComponent = {\n Root,\n Header,\n Content,\n StatusBar,\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport { GithubComponent } from './GithubComponent';\n\nexport const GithubPanel = () => (\n <GithubComponent.Root>\n <div className='h-full grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full w-full'>\n <GithubComponent.Header />\n <GithubComponent.Content />\n <GithubComponent.StatusBar />\n </div>\n </GithubComponent.Root>\n);\n\nGithubPanel.displayName = 'GithubPanel';\n"],"mappings":";;;;;AAUA,IAAM,eAAe;AACrB,IAAM,gBAAgB;AAsBtB,IAAM,mBAAmB,cAA4C,IAAI;AAEzE,IAAM,4BAA4B;CAChC,MAAM,MAAM,WAAW,gBAAgB;CACvC,IAAI,CAAC,KACH,MAAM,IAAI,MAAM,uEAAuE;CAEzF,OAAO;AACT;AAUA,IAAM,QAAQ,EAAE,OAAO,cAAc,QAAQ,eAAe,eAAyC;CACnG,MAAM,CAAC,OAAO,YAAY,SAA8B,CAAC,CAAC;CAC1D,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CAEpD,gBAAgB;EACd,MAAM,aAAa,IAAI,gBAAgB;EACvC,SAAS,CAAC,CAAC;EACX,eAAe,KAAK;EACpB,CAAM,YAAY;GAChB,IAAI;IACF,MAAM,MAAM,IAAI,IAAI,gCAAgC,KAAK,OAAO;IAChE,IAAI,aAAa,IAAI,SAAS,QAAQ;IACtC,IAAI,aAAa,IAAI,QAAQ,SAAS;IACtC,IAAI,aAAa,IAAI,aAAa,MAAM;IACxC,IAAI,aAAa,IAAI,YAAY,OAAO,QAAQ,CAAC,CAAC;IAClD,MAAM,WAAW,MAAM,MAAM,IAAI,SAAS,GAAG;KAC3C,QAAQ,WAAW;KACnB,SAAS,EAAE,QAAQ,8BAA8B;IACnD,CAAC;IACD,IAAI,CAAC,SAAS,IAAI;KAChB,eAAe,IAAI;KACnB;IACF;IACA,MAAM,QAAS,MAAM,SAAS,KAAK;IACnC,SAAS,MAAM,QAAQ,SAAS,KAAK,cAAc,IAAI,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;IACxE,eAAe,KAAK;GACtB,QAAQ;IACN,IAAI,WAAW,OAAO,SACpB;IAEF,SAAS,CAAC,CAAC;IACX,eAAe,IAAI;GACrB;EACF,EAAA,CAAG;EACH,a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AA;EACE,oBAAC,gBAAgB,QAAjB,CAAyB,CAAA;EACzB,oBAAC,gBAAgB,SAAjB,CAA0B,CAAA;EAC1B,oBAAC,gBAAgB,WAAjB,CAA4B,CAAA;CACzB;AACe,CAAA,EAAA,CAAA;AAGxB,YAAY,cAAc"}
|
|
@@ -2,9 +2,9 @@ import { useCallback, useEffect, useMemo, useState } from "react";
|
|
|
2
2
|
import { JsonView, Placeholder, Searchbar } from "@dxos/devtools";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Entity, Format, Obj, Type } from "@dxos/echo";
|
|
5
|
-
import { Panel, Toolbar } from "@dxos/react-ui";
|
|
6
|
-
import { Operation } from "@dxos/compute";
|
|
7
5
|
import { useClient } from "@dxos/react-client";
|
|
6
|
+
import { Panel, Toolbar } from "@dxos/react-ui";
|
|
7
|
+
import * as Operation from "@dxos/compute/Operation";
|
|
8
8
|
import { DynamicTable } from "@dxos/react-ui-table";
|
|
9
9
|
import { mx } from "@dxos/ui-theme";
|
|
10
10
|
//#region src/containers/RegistryPanel/RegistryPanel.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-RegistryPanel.mjs","names":[],"sources":["../../src/containers/RegistryPanel/RegistryPanel.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport
|
|
1
|
+
{"version":3,"file":"chunk-RegistryPanel.mjs","names":[],"sources":["../../src/containers/RegistryPanel/RegistryPanel.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport * as Operation from '@dxos/compute/Operation';\nimport { JsonView, Placeholder, Searchbar } from '@dxos/devtools';\nimport { Entity, Format, Obj, Type } from '@dxos/echo';\nimport { useClient } from '@dxos/react-client';\nimport { Panel, Toolbar } from '@dxos/react-ui';\nimport { DynamicTable, type TableFeatures } from '@dxos/react-ui-table';\nimport { mx } from '@dxos/ui-theme';\n\ntype RegistryRow = {\n id: string;\n kind: string;\n label: string;\n _entity: Entity.Unknown;\n};\n\nconst textFilter = (text?: string) => {\n if (!text) {\n return () => true;\n }\n\n const matcher = new RegExp(text, 'i');\n return (entity: Entity.Unknown) => {\n const typename = Entity.getTypename(entity) ?? '';\n const metaKey = Obj.isObject(entity) ? (Obj.getMeta(entity).key ?? '') : '';\n const uri = Type.isType(entity) ? (Type.getURI(entity)?.toString() ?? '') : '';\n const operationKey =\n Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)\n ? (Operation.getKey(entity) ?? '')\n : '';\n const name = Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity) ? entity.name : '';\n return [typename, metaKey, uri, operationKey, name, getEntityId(entity)].some((value) => value.match(matcher));\n };\n};\n\nconst getEntityId = (entity: Entity.Unknown): string => {\n if (entity.id) {\n return entity.id;\n }\n if (Type.isType(entity)) {\n return Type.getURI(entity)?.toString() ?? Type.getTypename(entity) ?? 'unknown-type';\n }\n return Entity.getTypename(entity) ?? 'unknown';\n};\n\nconst getKind = (entity: Entity.Unknown): string => {\n if (Type.isType(entity)) {\n return 'type';\n }\n if (Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)) {\n return 'operation';\n }\n return 'other';\n};\n\nconst getLabel = (entity: Entity.Unknown): string => {\n if (Obj.isObject(entity) && Obj.instanceOf(Operation.PersistentOperation, entity)) {\n return entity.name || Operation.getKey(entity) || getEntityId(entity);\n }\n if (Type.isType(entity)) {\n return Type.getTypename(entity) ?? getEntityId(entity);\n }\n return getEntityId(entity);\n};\n\nconst toDetailJson = (entity: Entity.Unknown): object => {\n if (Type.isType(entity)) {\n return {\n id: getEntityId(entity),\n typename: Type.getTypename(entity),\n uri: Type.getURI(entity)?.toString(),\n version: Type.getVersion(entity),\n jsonSchema: entity.jsonSchema,\n };\n }\n if (Obj.isObject(entity)) {\n return Obj.toJSON(entity);\n }\n return { id: getEntityId(entity), typename: Entity.getTypename(entity) };\n};\n\nexport const RegistryPanel = () => {\n const client = useClient();\n const [entities, setEntities] = useState<Entity.Unknown[]>([]);\n const [filter, setFilter] = useState('');\n const [selected, setSelected] = useState<Entity.Unknown>();\n\n useEffect(() => {\n const registry = client.graph.registry;\n const refresh = () => setEntities([...registry.list()]);\n refresh();\n return registry.changed.on(refresh);\n }, [client]);\n\n const properties = useMemo(\n () => [\n { name: 'kind', format: Format.TypeFormat.String, size: 100 },\n { name: 'label', format: Format.TypeFormat.String },\n { name: 'id', format: Format.TypeFormat.String, size: 280 },\n ],\n [],\n );\n\n const rows = useMemo((): RegistryRow[] => {\n return entities\n .filter(textFilter(filter))\n .map((entity) => ({\n id: getEntityId(entity),\n kind: getKind(entity),\n label: getLabel(entity),\n _entity: entity,\n }))\n .toSorted((left, right) => left.label.localeCompare(right.label));\n }, [entities, filter]);\n\n const handleRowClicked = useCallback((row: RegistryRow | undefined) => {\n if (!row?._entity) {\n return;\n }\n setSelected(row._entity);\n }, []);\n\n const detailJson = useMemo(() => (selected ? toDetailJson(selected) : undefined), [selected]);\n\n const features: Partial<TableFeatures> = useMemo(() => ({ selection: { enabled: true, mode: 'single' } }), []);\n\n return (\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n <Searchbar placeholder='Filter...' onChange={setFilter} />\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content>\n <div className={mx('h-full grid grid-cols-[2fr_1fr] overflow-hidden')}>\n <div className={mx('flex flex-col min-h-0 overflow-hidden')}>\n <DynamicTable properties={properties} rows={rows} features={features} onRowClick={handleRowClicked} />\n </div>\n <div className={mx('min-h-0 h-full overflow-auto border-s border-separator text-sm')}>\n {detailJson ? <JsonView data={detailJson} /> : <Placeholder label='Details' />}\n </div>\n </div>\n </Panel.Content>\n </Panel.Root>\n );\n};\n\nRegistryPanel.displayName = 'RegistryPanel';\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,cAAc,SAAkB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AAiC;EACrE,IAAI,CAAC,KAAK,SACR;EAEF,YAAY,IAAI,OAAO;CACzB,GAAG,CAAC,CAAC;CAEL,MAAM,aAAa,cAAe,WAAW,aAAa,QAAQ,IAAI,KAAA,GAAY,CAAC,QAAQ,CAAC;CAE5F,MAAM,WAAmC,eAAe,EAAE,WAAW;EAAE,SAAS;EAAM,MAAM;CAAS,EAAE,IAAI,CAAC,CAAC;CAE7G,OACE,qBAAC,MAAM,MAAP,EAAA,UAAA,CACE,oBAAC,MAAM,SAAP;EAAe,SAAA;EACb,UAAA,oBAAC,QAAQ,MAAT,EAAA,UACE,oBAAC,WAAD;GAAW,aAAY;GAAY,UAAU;EAAY,CAAA,EAC7C,CAAA;CACD,CAAA,GACf,oBAAC,MAAM,SAAP,EAAA,UACE,qBAAC,OAAD;EAAK,WAAW,GAAG,iDAAiD;EAApE,UAAA,CACE,oBAAC,OAAD;GAAK,WAAW,GAAG,uCAAuC;GACxD,UAAA,oBAAC,cAAD;IAA0B;IAAkB;IAAgB;IAAU,YAAY;GAAmB,CAAA;EAClG,CAAA,GACL,oBAAC,OAAD;GAAK,WAAW,GAAG,gEAAgE;GAChF,UAAA,aAAa,oBAAC,UAAD,EAAU,MAAM,WAAa,CAAA,IAAI,oBAAC,aAAD,EAAa,OAAM,UAAW,CAAA;EAC1E,CAAA,CACF;CACQ,CAAA,EAAA,CAAA,CACL,EAAA,CAAA;AAEhB;AAEA,cAAc,cAAc"}
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import { Capability } from "@dxos/app-framework";
|
|
2
|
-
import { Position } from "@dxos/util";
|
|
3
|
-
import { meta } from "#meta";
|
|
4
1
|
import * as Effect from "effect/Effect";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
4
|
+
import { meta } from "#meta";
|
|
7
5
|
import { Devtools } from "#types";
|
|
6
|
+
import { Position } from "@dxos/util";
|
|
7
|
+
import * as AppGraphBuilder from "@dxos/app-graph/AppGraphBuilder";
|
|
8
|
+
import * as AppGraphNode from "@dxos/app-graph/AppGraphNode";
|
|
9
|
+
import * as AppNode from "@dxos/app-toolkit/AppNode";
|
|
10
|
+
import * as AppNodeMatcher from "@dxos/app-toolkit/AppNodeMatcher";
|
|
11
|
+
import * as GraphPath from "@dxos/app-toolkit/GraphPath";
|
|
12
|
+
import * as GraphNode from "@dxos/graph/GraphNode";
|
|
13
|
+
import * as GraphNodeMatcher from "@dxos/graph/GraphNodeMatcher";
|
|
8
14
|
//#region src/capabilities/app-graph-builder.ts
|
|
9
15
|
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
16
|
+
const appGraphAtom = yield* Capability.atom(AppCapabilities.AppGraph);
|
|
10
17
|
const extensions = yield* Effect.all([
|
|
11
|
-
|
|
18
|
+
AppGraphBuilder.createExtension({
|
|
12
19
|
id: "root",
|
|
13
|
-
match:
|
|
14
|
-
actions: () => Effect.succeed([
|
|
20
|
+
match: GraphNodeMatcher.whenRoot,
|
|
21
|
+
actions: () => Effect.succeed([AppGraphNode.makeAction({
|
|
15
22
|
id: "resetData",
|
|
16
23
|
data: () => Effect.sync(() => {
|
|
17
|
-
window.location.href = "/reset.html
|
|
24
|
+
window.location.href = "/reset.html";
|
|
18
25
|
}),
|
|
19
26
|
properties: {
|
|
20
27
|
label: ["reset-data.label", { ns: meta.profile.key }],
|
|
@@ -22,12 +29,12 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
22
29
|
}
|
|
23
30
|
})])
|
|
24
31
|
}),
|
|
25
|
-
|
|
32
|
+
AppGraphBuilder.createExtension({
|
|
26
33
|
id: "devtools",
|
|
27
|
-
match:
|
|
34
|
+
match: GraphNodeMatcher.whenAny(GraphNodeMatcher.whenRoot, AppNodeMatcher.whenNavTreeGroup(GraphPath.GroupTypes.system)),
|
|
28
35
|
connector: (_nodeOrSpace, get) => Effect.gen(function* () {
|
|
29
|
-
const [graph] = get(
|
|
30
|
-
return [
|
|
36
|
+
const [graph] = get(appGraphAtom);
|
|
37
|
+
return [AppGraphNode.make({
|
|
31
38
|
id: Devtools.nodeId(Devtools.id),
|
|
32
39
|
data: null,
|
|
33
40
|
type: Devtools.id,
|
|
@@ -37,19 +44,19 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
37
44
|
position: Position.last
|
|
38
45
|
},
|
|
39
46
|
nodes: [
|
|
40
|
-
|
|
47
|
+
AppGraphNode.make({
|
|
41
48
|
id: Devtools.nodeId(Devtools.AppGraph),
|
|
42
49
|
type: `${meta.profile.key}.app-graph`,
|
|
43
50
|
data: {
|
|
44
51
|
graph: graph?.graph,
|
|
45
|
-
root:
|
|
52
|
+
root: GraphNode.RootId
|
|
46
53
|
},
|
|
47
54
|
properties: {
|
|
48
55
|
label: ["debug-app-graph.label", { ns: meta.profile.key }],
|
|
49
56
|
icon: "ph--graph--regular"
|
|
50
57
|
}
|
|
51
58
|
}),
|
|
52
|
-
|
|
59
|
+
AppGraphNode.make({
|
|
53
60
|
id: Devtools.nodeId(Devtools.ToolsExplorer),
|
|
54
61
|
data: Devtools.ToolsExplorer,
|
|
55
62
|
type: Devtools.id,
|
|
@@ -58,7 +65,16 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
58
65
|
icon: "ph--toolbox--regular"
|
|
59
66
|
}
|
|
60
67
|
}),
|
|
61
|
-
|
|
68
|
+
AppGraphNode.make({
|
|
69
|
+
id: Devtools.nodeId(Devtools.Cli),
|
|
70
|
+
data: Devtools.Cli,
|
|
71
|
+
type: Devtools.id,
|
|
72
|
+
properties: {
|
|
73
|
+
label: ["cli.label", { ns: meta.profile.key }],
|
|
74
|
+
icon: "ph--terminal-window--regular"
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
AppGraphNode.make({
|
|
62
78
|
id: Devtools.nodeId(Devtools.Client.id),
|
|
63
79
|
data: null,
|
|
64
80
|
type: Devtools.id,
|
|
@@ -67,7 +83,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
67
83
|
icon: "ph--users--regular"
|
|
68
84
|
},
|
|
69
85
|
nodes: [
|
|
70
|
-
|
|
86
|
+
AppGraphNode.make({
|
|
71
87
|
id: Devtools.nodeId(Devtools.Client.Config),
|
|
72
88
|
data: Devtools.Client.Config,
|
|
73
89
|
type: Devtools.id,
|
|
@@ -76,7 +92,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
76
92
|
icon: "ph--gear--regular"
|
|
77
93
|
}
|
|
78
94
|
}),
|
|
79
|
-
|
|
95
|
+
AppGraphNode.make({
|
|
80
96
|
id: Devtools.nodeId(Devtools.Client.Storage),
|
|
81
97
|
data: Devtools.Client.Storage,
|
|
82
98
|
type: Devtools.id,
|
|
@@ -85,7 +101,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
85
101
|
icon: "ph--hard-drives--regular"
|
|
86
102
|
}
|
|
87
103
|
}),
|
|
88
|
-
|
|
104
|
+
AppGraphNode.make({
|
|
89
105
|
id: Devtools.nodeId(Devtools.Client.Sqlite),
|
|
90
106
|
data: Devtools.Client.Sqlite,
|
|
91
107
|
type: Devtools.id,
|
|
@@ -94,7 +110,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
94
110
|
icon: "ph--database--regular"
|
|
95
111
|
}
|
|
96
112
|
}),
|
|
97
|
-
|
|
113
|
+
AppGraphNode.make({
|
|
98
114
|
id: Devtools.nodeId(Devtools.Client.Logs),
|
|
99
115
|
data: Devtools.Client.Logs,
|
|
100
116
|
type: Devtools.id,
|
|
@@ -103,7 +119,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
103
119
|
icon: "ph--file-text--regular"
|
|
104
120
|
}
|
|
105
121
|
}),
|
|
106
|
-
|
|
122
|
+
AppGraphNode.make({
|
|
107
123
|
id: Devtools.nodeId(Devtools.Client.Diagnostics),
|
|
108
124
|
data: Devtools.Client.Diagnostics,
|
|
109
125
|
type: Devtools.id,
|
|
@@ -114,7 +130,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
114
130
|
})
|
|
115
131
|
]
|
|
116
132
|
}),
|
|
117
|
-
|
|
133
|
+
AppGraphNode.make({
|
|
118
134
|
id: Devtools.nodeId(Devtools.Halo.id),
|
|
119
135
|
data: null,
|
|
120
136
|
type: Devtools.id,
|
|
@@ -123,7 +139,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
123
139
|
icon: "ph--identification-badge--regular"
|
|
124
140
|
},
|
|
125
141
|
nodes: [
|
|
126
|
-
|
|
142
|
+
AppGraphNode.make({
|
|
127
143
|
id: Devtools.nodeId(Devtools.Halo.Identity),
|
|
128
144
|
data: Devtools.Halo.Identity,
|
|
129
145
|
type: Devtools.id,
|
|
@@ -132,7 +148,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
132
148
|
icon: "ph--identification-badge--regular"
|
|
133
149
|
}
|
|
134
150
|
}),
|
|
135
|
-
|
|
151
|
+
AppGraphNode.make({
|
|
136
152
|
id: Devtools.nodeId(Devtools.Halo.Devices),
|
|
137
153
|
data: Devtools.Halo.Devices,
|
|
138
154
|
type: Devtools.id,
|
|
@@ -141,7 +157,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
141
157
|
icon: "ph--devices--regular"
|
|
142
158
|
}
|
|
143
159
|
}),
|
|
144
|
-
|
|
160
|
+
AppGraphNode.make({
|
|
145
161
|
id: Devtools.nodeId(Devtools.Halo.Keyring),
|
|
146
162
|
data: Devtools.Halo.Keyring,
|
|
147
163
|
type: Devtools.id,
|
|
@@ -150,7 +166,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
150
166
|
icon: "ph--key--regular"
|
|
151
167
|
}
|
|
152
168
|
}),
|
|
153
|
-
|
|
169
|
+
AppGraphNode.make({
|
|
154
170
|
id: Devtools.nodeId(Devtools.Halo.Credentials),
|
|
155
171
|
data: Devtools.Halo.Credentials,
|
|
156
172
|
type: Devtools.id,
|
|
@@ -161,7 +177,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
161
177
|
})
|
|
162
178
|
]
|
|
163
179
|
}),
|
|
164
|
-
|
|
180
|
+
AppGraphNode.make({
|
|
165
181
|
id: Devtools.nodeId(Devtools.Echo.id),
|
|
166
182
|
data: null,
|
|
167
183
|
type: Devtools.id,
|
|
@@ -170,7 +186,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
170
186
|
icon: "ph--database--regular"
|
|
171
187
|
},
|
|
172
188
|
nodes: [
|
|
173
|
-
|
|
189
|
+
AppGraphNode.make({
|
|
174
190
|
id: Devtools.nodeId(Devtools.Echo.Spaces),
|
|
175
191
|
data: Devtools.Echo.Spaces,
|
|
176
192
|
type: Devtools.id,
|
|
@@ -179,7 +195,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
179
195
|
icon: "ph--graph--regular"
|
|
180
196
|
}
|
|
181
197
|
}),
|
|
182
|
-
|
|
198
|
+
AppGraphNode.make({
|
|
183
199
|
id: Devtools.nodeId(Devtools.Echo.Space),
|
|
184
200
|
data: Devtools.Echo.Space,
|
|
185
201
|
type: Devtools.id,
|
|
@@ -188,7 +204,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
188
204
|
icon: "ph--planet--regular"
|
|
189
205
|
}
|
|
190
206
|
}),
|
|
191
|
-
|
|
207
|
+
AppGraphNode.make({
|
|
192
208
|
id: Devtools.nodeId(Devtools.Echo.Feeds),
|
|
193
209
|
data: Devtools.Echo.Feeds,
|
|
194
210
|
type: Devtools.id,
|
|
@@ -197,7 +213,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
197
213
|
icon: "ph--list-bullets--regular"
|
|
198
214
|
}
|
|
199
215
|
}),
|
|
200
|
-
|
|
216
|
+
AppGraphNode.make({
|
|
201
217
|
id: Devtools.nodeId(Devtools.Echo.Objects),
|
|
202
218
|
data: Devtools.Echo.Objects,
|
|
203
219
|
type: Devtools.id,
|
|
@@ -206,7 +222,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
206
222
|
icon: "ph--cube--regular"
|
|
207
223
|
}
|
|
208
224
|
}),
|
|
209
|
-
|
|
225
|
+
AppGraphNode.make({
|
|
210
226
|
id: Devtools.nodeId(Devtools.Echo.Schema),
|
|
211
227
|
data: Devtools.Echo.Schema,
|
|
212
228
|
type: Devtools.id,
|
|
@@ -215,7 +231,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
215
231
|
icon: "ph--database--regular"
|
|
216
232
|
}
|
|
217
233
|
}),
|
|
218
|
-
|
|
234
|
+
AppGraphNode.make({
|
|
219
235
|
id: Devtools.nodeId(Devtools.Echo.Registry),
|
|
220
236
|
data: Devtools.Echo.Registry,
|
|
221
237
|
type: Devtools.id,
|
|
@@ -224,7 +240,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
224
240
|
icon: "ph--books--regular"
|
|
225
241
|
}
|
|
226
242
|
}),
|
|
227
|
-
|
|
243
|
+
AppGraphNode.make({
|
|
228
244
|
id: Devtools.nodeId(Devtools.Echo.Automerge),
|
|
229
245
|
data: Devtools.Echo.Automerge,
|
|
230
246
|
type: Devtools.id,
|
|
@@ -233,7 +249,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
233
249
|
icon: "ph--gear-six--regular"
|
|
234
250
|
}
|
|
235
251
|
}),
|
|
236
|
-
|
|
252
|
+
AppGraphNode.make({
|
|
237
253
|
id: Devtools.nodeId(Devtools.Echo.Queues),
|
|
238
254
|
data: Devtools.Echo.Queues,
|
|
239
255
|
type: Devtools.id,
|
|
@@ -242,7 +258,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
242
258
|
icon: "ph--queue--regular"
|
|
243
259
|
}
|
|
244
260
|
}),
|
|
245
|
-
|
|
261
|
+
AppGraphNode.make({
|
|
246
262
|
id: Devtools.nodeId(Devtools.Echo.Members),
|
|
247
263
|
data: Devtools.Echo.Members,
|
|
248
264
|
type: Devtools.id,
|
|
@@ -251,7 +267,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
251
267
|
icon: "ph--users--regular"
|
|
252
268
|
}
|
|
253
269
|
}),
|
|
254
|
-
|
|
270
|
+
AppGraphNode.make({
|
|
255
271
|
id: Devtools.nodeId(Devtools.Echo.Metadata),
|
|
256
272
|
data: Devtools.Echo.Metadata,
|
|
257
273
|
type: Devtools.id,
|
|
@@ -262,7 +278,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
262
278
|
})
|
|
263
279
|
]
|
|
264
280
|
}),
|
|
265
|
-
|
|
281
|
+
AppGraphNode.make({
|
|
266
282
|
id: Devtools.nodeId(Devtools.Mesh.id),
|
|
267
283
|
data: null,
|
|
268
284
|
type: Devtools.id,
|
|
@@ -271,7 +287,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
271
287
|
icon: "ph--graph--regular"
|
|
272
288
|
},
|
|
273
289
|
nodes: [
|
|
274
|
-
|
|
290
|
+
AppGraphNode.make({
|
|
275
291
|
id: Devtools.nodeId(Devtools.Mesh.Signal),
|
|
276
292
|
data: Devtools.Mesh.Signal,
|
|
277
293
|
type: Devtools.id,
|
|
@@ -280,7 +296,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
280
296
|
icon: "ph--wifi-high--regular"
|
|
281
297
|
}
|
|
282
298
|
}),
|
|
283
|
-
|
|
299
|
+
AppGraphNode.make({
|
|
284
300
|
id: Devtools.nodeId(Devtools.Mesh.Swarm),
|
|
285
301
|
data: Devtools.Mesh.Swarm,
|
|
286
302
|
type: Devtools.id,
|
|
@@ -289,7 +305,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
289
305
|
icon: "ph--users-three--regular"
|
|
290
306
|
}
|
|
291
307
|
}),
|
|
292
|
-
|
|
308
|
+
AppGraphNode.make({
|
|
293
309
|
id: Devtools.nodeId(Devtools.Mesh.Network),
|
|
294
310
|
data: Devtools.Mesh.Network,
|
|
295
311
|
type: Devtools.id,
|
|
@@ -300,7 +316,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
300
316
|
})
|
|
301
317
|
]
|
|
302
318
|
}),
|
|
303
|
-
|
|
319
|
+
AppGraphNode.make({
|
|
304
320
|
id: Devtools.nodeId(Devtools.Edge.id),
|
|
305
321
|
data: null,
|
|
306
322
|
type: Devtools.id,
|
|
@@ -309,7 +325,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
309
325
|
icon: "ph--cloud--regular"
|
|
310
326
|
},
|
|
311
327
|
nodes: [
|
|
312
|
-
|
|
328
|
+
AppGraphNode.make({
|
|
313
329
|
id: Devtools.nodeId(Devtools.Edge.Dashboard),
|
|
314
330
|
data: Devtools.Edge.Dashboard,
|
|
315
331
|
type: Devtools.id,
|
|
@@ -318,7 +334,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
318
334
|
icon: "ph--computer-tower--regular"
|
|
319
335
|
}
|
|
320
336
|
}),
|
|
321
|
-
|
|
337
|
+
AppGraphNode.make({
|
|
322
338
|
id: Devtools.nodeId(Devtools.Edge.Workflows),
|
|
323
339
|
data: Devtools.Edge.Workflows,
|
|
324
340
|
type: Devtools.id,
|
|
@@ -327,7 +343,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
327
343
|
icon: "ph--function--regular"
|
|
328
344
|
}
|
|
329
345
|
}),
|
|
330
|
-
|
|
346
|
+
AppGraphNode.make({
|
|
331
347
|
id: Devtools.nodeId(Devtools.Edge.Traces),
|
|
332
348
|
data: Devtools.Edge.Traces,
|
|
333
349
|
type: Devtools.id,
|
|
@@ -336,7 +352,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
336
352
|
icon: "ph--line-segments--regular"
|
|
337
353
|
}
|
|
338
354
|
}),
|
|
339
|
-
|
|
355
|
+
AppGraphNode.make({
|
|
340
356
|
id: Devtools.nodeId(Devtools.Edge.Testing),
|
|
341
357
|
data: Devtools.Edge.Testing,
|
|
342
358
|
type: Devtools.id,
|
|
@@ -351,9 +367,9 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
351
367
|
})];
|
|
352
368
|
})
|
|
353
369
|
}),
|
|
354
|
-
|
|
370
|
+
AppGraphBuilder.createExtension({
|
|
355
371
|
id: "devtoolsOverview",
|
|
356
|
-
match:
|
|
372
|
+
match: GraphNodeMatcher.whenRoot,
|
|
357
373
|
connector: () => Effect.succeed([AppNode.makeDeckCompanion({
|
|
358
374
|
id: "devtoolsOverview",
|
|
359
375
|
label: ["devtools-overview.label", { ns: meta.profile.key }],
|
|
@@ -363,7 +379,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
363
379
|
})])
|
|
364
380
|
})
|
|
365
381
|
]);
|
|
366
|
-
return Capability.
|
|
382
|
+
return Capability.contribute(AppCapabilities.AppGraphBuilder, extensions);
|
|
367
383
|
}));
|
|
368
384
|
//#endregion
|
|
369
385
|
export { app_graph_builder_default as default };
|