@dxos/plugin-debug 0.7.1 → 0.7.2-main.f1adc9f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/lib/browser/{DebugGlobal-ZTCBF3XR.mjs → DebugApp-HCHR6GKO.mjs} +18 -16
  2. package/dist/lib/browser/DebugApp-HCHR6GKO.mjs.map +7 -0
  3. package/dist/lib/browser/DebugSpace-HK2GQYIB.mjs +276 -0
  4. package/dist/lib/browser/DebugSpace-HK2GQYIB.mjs.map +7 -0
  5. package/dist/lib/browser/SpaceGenerator-TIBUROQA.mjs +155 -0
  6. package/dist/lib/browser/SpaceGenerator-TIBUROQA.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-GSJS3HEM.mjs +15 -0
  8. package/dist/lib/browser/chunk-GSJS3HEM.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +39 -41
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  13. package/dist/types/src/components/Container.d.ts +5 -0
  14. package/dist/types/src/components/Container.d.ts.map +1 -0
  15. package/dist/types/src/components/{DebugGlobal.d.ts → DebugApp/DebugApp.d.ts} +2 -3
  16. package/dist/types/src/components/DebugApp/DebugApp.d.ts.map +1 -0
  17. package/dist/types/src/components/DebugApp/Tree.d.ts.map +1 -0
  18. package/dist/types/src/components/DebugApp/index.d.ts +3 -0
  19. package/dist/types/src/components/DebugApp/index.d.ts.map +1 -0
  20. package/dist/types/src/components/DebugObjectPanel.d.ts +2 -2
  21. package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
  22. package/dist/types/src/components/{DebugSpace.d.ts → DebugSpace/DebugSpace.d.ts} +1 -2
  23. package/dist/types/src/components/DebugSpace/DebugSpace.d.ts.map +1 -0
  24. package/dist/types/src/components/{DebugSpace.stories.d.ts → DebugSpace/DebugSpace.stories.d.ts} +1 -1
  25. package/dist/types/src/components/DebugSpace/DebugSpace.stories.d.ts.map +1 -0
  26. package/dist/types/src/components/{ObjectCreator.d.ts → DebugSpace/ObjectCreator.d.ts} +4 -6
  27. package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts.map +1 -0
  28. package/dist/types/src/components/{ObjectCreator.stories.d.ts → DebugSpace/ObjectCreator.stories.d.ts} +1 -1
  29. package/dist/types/src/components/DebugSpace/ObjectCreator.stories.d.ts.map +1 -0
  30. package/dist/types/src/components/DebugSpace/index.d.ts +3 -0
  31. package/dist/types/src/components/DebugSpace/index.d.ts.map +1 -0
  32. package/dist/types/src/components/{SurfaceDebug.d.ts → DebugSurface.d.ts} +2 -2
  33. package/dist/types/src/components/{SurfaceDebug.d.ts.map → DebugSurface.d.ts.map} +1 -1
  34. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +9 -0
  35. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -0
  36. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +6 -0
  37. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -0
  38. package/dist/types/src/components/SpaceGenerator/index.d.ts +3 -0
  39. package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -0
  40. package/dist/types/src/components/index.d.ts +2 -1
  41. package/dist/types/src/components/index.d.ts.map +1 -1
  42. package/package.json +41 -38
  43. package/src/DebugPlugin.tsx +61 -48
  44. package/src/components/Container.tsx +15 -0
  45. package/src/components/{DebugGlobal.tsx → DebugApp/DebugApp.tsx} +9 -11
  46. package/src/components/{Tree.tsx → DebugApp/Tree.tsx} +1 -1
  47. package/src/components/DebugApp/index.ts +7 -0
  48. package/src/components/DebugObjectPanel.tsx +4 -3
  49. package/src/components/{DebugSpace.stories.tsx → DebugSpace/DebugSpace.stories.tsx} +8 -6
  50. package/src/components/{DebugSpace.tsx → DebugSpace/DebugSpace.tsx} +70 -82
  51. package/src/components/{ObjectCreator.stories.tsx → DebugSpace/ObjectCreator.stories.tsx} +14 -11
  52. package/src/components/DebugSpace/ObjectCreator.tsx +100 -0
  53. package/src/components/DebugSpace/index.ts +7 -0
  54. package/src/components/{SurfaceDebug.tsx → DebugSurface.tsx} +1 -1
  55. package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +37 -0
  56. package/src/components/SpaceGenerator/SpaceGenerator.tsx +169 -0
  57. package/src/components/SpaceGenerator/index.ts +7 -0
  58. package/src/components/index.ts +2 -1
  59. package/dist/lib/browser/DebugGlobal-ZTCBF3XR.mjs.map +0 -7
  60. package/dist/lib/browser/DebugSpace-6TGT3H4I.mjs +0 -411
  61. package/dist/lib/browser/DebugSpace-6TGT3H4I.mjs.map +0 -7
  62. package/dist/lib/browser/chunk-H3BJHVRD.mjs +0 -24
  63. package/dist/lib/browser/chunk-H3BJHVRD.mjs.map +0 -7
  64. package/dist/types/src/components/DebugGlobal.d.ts.map +0 -1
  65. package/dist/types/src/components/DebugPanel.d.ts +0 -5
  66. package/dist/types/src/components/DebugPanel.d.ts.map +0 -1
  67. package/dist/types/src/components/DebugSpace.d.ts.map +0 -1
  68. package/dist/types/src/components/DebugSpace.stories.d.ts.map +0 -1
  69. package/dist/types/src/components/ObjectCreator.d.ts.map +0 -1
  70. package/dist/types/src/components/ObjectCreator.stories.d.ts.map +0 -1
  71. package/dist/types/src/components/Tree.d.ts.map +0 -1
  72. package/dist/types/src/scaffolding/generator.d.ts +0 -11
  73. package/dist/types/src/scaffolding/generator.d.ts.map +0 -1
  74. package/dist/types/src/scaffolding/index.d.ts +0 -2
  75. package/dist/types/src/scaffolding/index.d.ts.map +0 -1
  76. package/src/components/DebugPanel.tsx +0 -29
  77. package/src/components/ObjectCreator.tsx +0 -99
  78. package/src/scaffolding/generator.ts +0 -146
  79. package/src/scaffolding/index.ts +0 -5
  80. /package/dist/types/src/components/{Tree.d.ts → DebugApp/Tree.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { DebugSpace } from './DebugSpace';
6
+
7
+ export default DebugSpace;
@@ -16,7 +16,7 @@ export type SurfaceDebugProps = ThemedClassName<{}>;
16
16
  * Show surface info.
17
17
  * NOTE: Remove from @dxos/app-framework if removing this.
18
18
  */
19
- export const SurfaceDebug = ({ classNames }: SurfaceDebugProps) => {
19
+ export const DebugSurface = ({ classNames }: SurfaceDebugProps) => {
20
20
  const context = useSurfaceRoot();
21
21
  const [surfaces, setSurfaces] = useState<DebugInfo[]>([]);
22
22
  const renderMap = useMemo(() => new Map<string, { last: number; delta: number }>(), []);
@@ -0,0 +1,37 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import '@dxos-theme';
6
+
7
+ import { type Meta } from '@storybook/react';
8
+ import React from 'react';
9
+
10
+ import { useSpaces } from '@dxos/react-client/echo';
11
+ import { withClientProvider } from '@dxos/react-client/testing';
12
+ import { render, withLayout, withTheme } from '@dxos/storybook-utils';
13
+
14
+ import { SpaceGenerator } from './SpaceGenerator';
15
+
16
+ const DefaultStory = () => {
17
+ const [space] = useSpaces();
18
+ if (!space) {
19
+ return null;
20
+ }
21
+
22
+ return <SpaceGenerator space={space} />;
23
+ };
24
+
25
+ const meta: Meta = {
26
+ title: 'plugins/plugin-debug/SpaceGenerator',
27
+ component: SpaceGenerator,
28
+ render: render(DefaultStory),
29
+ decorators: [withClientProvider({ createSpace: true }), withLayout({ tooltips: true }), withTheme],
30
+ parameters: {
31
+ layout: 'fullscreen',
32
+ },
33
+ };
34
+
35
+ export default meta;
36
+
37
+ export const Default = {};
@@ -0,0 +1,169 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import React, { useCallback, useMemo, useState } from 'react';
6
+
7
+ import { create, type ReactiveObject, type BaseObject } from '@dxos/echo-schema';
8
+ import { DocumentType } from '@dxos/plugin-markdown/types';
9
+ import { SheetType } from '@dxos/plugin-sheet/types';
10
+ import { DiagramType } from '@dxos/plugin-sketch/types';
11
+ import { faker } from '@dxos/random';
12
+ import { useClient } from '@dxos/react-client';
13
+ import { Filter, getTypename, type Space } from '@dxos/react-client/echo';
14
+ import { IconButton, Toolbar, useAsyncEffect } from '@dxos/react-ui';
15
+ import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
16
+ import { TableType } from '@dxos/react-ui-table';
17
+ import { createView } from '@dxos/schema';
18
+ import { createAsyncGenerator, Test, type ValueGenerator } from '@dxos/schema/testing';
19
+ import { jsonKeyReplacer, sortKeys } from '@dxos/util';
20
+
21
+ const generator: ValueGenerator = faker as any;
22
+
23
+ // TODO(burdon): Create docs.
24
+ // TODO(burdon): Create sketches.
25
+ // TODO(burdon): Create sheets.
26
+ // TODO(burdon): Create comments.
27
+
28
+ export type SpaceGeneratorProps = {
29
+ space: Space;
30
+ onAddObjects?: (objects: ReactiveObject<any>[]) => void;
31
+ };
32
+
33
+ // TODO(burdon): Reuse in testbench-app.
34
+ // TODO(burdon): Mutator running in background (factor out): from echo-generator.
35
+ export const SpaceGenerator = ({ space, onAddObjects }: SpaceGeneratorProps) => {
36
+ const client = useClient();
37
+ const staticTypes = [DocumentType, DiagramType, SheetType]; // TODO(burdon): Make extensible.
38
+ const mutableTypes = [Test.OrgType, Test.ProjectType, Test.ContactType];
39
+ const [info, setInfo] = useState<any>({});
40
+
41
+ // Create type generators.
42
+ const typeMap = useMemo(() => {
43
+ client.addTypes([DiagramType, TableType, SheetType]);
44
+
45
+ return new Map<string, (n: number) => Promise<BaseObject<any>>>(
46
+ mutableTypes.map((type) => {
47
+ return [
48
+ type.typename,
49
+ async (n: number) => {
50
+ // Find or create mutable schema.
51
+ const mutableSchema = await space.db.schemaRegistry.query();
52
+ const schema =
53
+ mutableSchema.find((schema) => schema.typename === type.typename) ??
54
+ space.db.schemaRegistry.addSchema(type);
55
+
56
+ // Create objects.
57
+ const generate = createAsyncGenerator(generator, schema.schema, space.db);
58
+ const objects = await generate.createObjects(n);
59
+
60
+ // Find or create table and view.
61
+ const { objects: tables } = await space.db.query(Filter.schema(TableType)).run();
62
+ const table = tables.find((table) => table.view?.query?.typename === type.typename);
63
+ if (!table) {
64
+ const name = type.typename.split('/').pop() ?? type.typename;
65
+ const table = space.db.add(
66
+ create(TableType, {
67
+ name,
68
+ view: createView({
69
+ name,
70
+ typename: type.typename,
71
+ jsonSchema: schema.jsonSchema,
72
+ }),
73
+ }),
74
+ );
75
+
76
+ // Add to UX.
77
+ onAddObjects?.([table]);
78
+ }
79
+
80
+ return objects;
81
+ },
82
+ ];
83
+ }),
84
+ );
85
+ }, [client, mutableTypes]);
86
+
87
+ // Query space to get info.
88
+ const updateInfo = async () => {
89
+ // Create schema map.
90
+ const mutableSchema = await space.db.schemaRegistry.query();
91
+ const staticSchema = space.db.graph.schemaRegistry.schemas;
92
+
93
+ // Create object map.
94
+ const { objects } = await space.db.query().run();
95
+ const objectMap = sortKeys(
96
+ objects.reduce<Record<string, number>>((map, obj) => {
97
+ const type = getTypename(obj);
98
+ if (type) {
99
+ const count = map[type] ?? 0;
100
+ map[type] = count + 1;
101
+ }
102
+ return map;
103
+ }, {}),
104
+ );
105
+
106
+ setInfo({
107
+ schema: {
108
+ static: staticSchema.length,
109
+ mutable: mutableSchema.length,
110
+ },
111
+ objects: objectMap,
112
+ });
113
+ };
114
+
115
+ useAsyncEffect(updateInfo, [space]);
116
+
117
+ const handleCreateData = useCallback(
118
+ async (typename: string) => {
119
+ await typeMap.get(typename)?.(10);
120
+ await updateInfo();
121
+ },
122
+ [typeMap],
123
+ );
124
+
125
+ return (
126
+ <div role='none' className='flex flex-col divide-y divide-separator'>
127
+ <Toolbar.Root classNames='p-1'>
128
+ <IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' onClick={updateInfo} />
129
+ </Toolbar.Root>
130
+
131
+ <SchemaTable types={staticTypes} objects={info.objects} label='Static Types' onClick={handleCreateData} />
132
+ <SchemaTable types={mutableTypes} objects={info.objects} label='Mutable Types' onClick={handleCreateData} />
133
+
134
+ <SyntaxHighlighter classNames='flex text-xs' language='json'>
135
+ {JSON.stringify({ space, ...info }, jsonKeyReplacer({ truncate: true }), 2)}
136
+ </SyntaxHighlighter>
137
+ </div>
138
+ );
139
+ };
140
+
141
+ type SchemaTableProps = {
142
+ types: any[];
143
+ objects?: Record<string, number | undefined>;
144
+ label: string;
145
+ onClick: (typename: string) => void;
146
+ };
147
+
148
+ const SchemaTable = ({ types, objects = {}, label, onClick }: SchemaTableProps) => {
149
+ return (
150
+ <div className='grid grid-cols-[1fr_80px_40px] gap-1 overflow-hidden'>
151
+ <div className='grid grid-cols-subgrid col-span-3'>
152
+ <div className='px-2 py-1 text-sm text-primary-500'>{label}</div>
153
+ </div>
154
+ {types.map((type) => (
155
+ <div key={type.typename} className='grid grid-cols-subgrid col-span-3 items-center'>
156
+ <div className='px-2 py-1 text-sm font-mono text-green-500'>{type.typename}</div>
157
+ <div className='px-2 py-1 text-right font-mono'>{objects[type.typename] ?? 0}</div>
158
+ <IconButton
159
+ variant='ghost'
160
+ icon='ph--plus--regular'
161
+ iconOnly
162
+ label='Create data'
163
+ onClick={() => onClick(type.typename)}
164
+ />
165
+ </div>
166
+ ))}
167
+ </div>
168
+ );
169
+ };
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { SpaceGenerator } from './SpaceGenerator';
6
+
7
+ export default SpaceGenerator;
@@ -4,8 +4,9 @@
4
4
 
5
5
  import { lazy } from 'react';
6
6
 
7
- export const DebugGlobal = lazy(() => import('./DebugGlobal'));
7
+ export const DebugApp = lazy(() => import('./DebugApp'));
8
8
  export const DebugSpace = lazy(() => import('./DebugSpace'));
9
+ export const SpaceGenerator = lazy(() => import('./SpaceGenerator'));
9
10
 
10
11
  export * from './DebugObjectPanel';
11
12
  export * from './DebugSettings';
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/DebugGlobal.tsx", "../../../src/components/Tree.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Gauge, Graph as GraphIcon, Gear, Toolbox, Warning } from '@phosphor-icons/react';\nimport React, { type FC, useEffect, useState } from 'react';\n\nimport { type Graph } from '@dxos/plugin-graph';\nimport { useClient, useConfig } from '@dxos/react-client';\nimport { Button, ToggleGroup, ToggleGroupItem } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { DebugPanel } from './DebugPanel';\nimport { Json, Tree } from './Tree';\n\nconst DebugGlobal: FC<{ graph: Graph }> = ({ graph }) => {\n const [view, setView] = useState<'config' | 'diagnostics' | 'graph'>('graph');\n const [data, setData] = useState<any>({});\n const client = useClient();\n const config = useConfig();\n const handleRefresh = async () => {\n const data = await client.diagnostics({ truncate: true });\n setData(data);\n };\n useEffect(() => {\n void handleRefresh();\n }, []);\n\n const handleResetClient = async (force = false) => {\n if (!force && !window.confirm('Reset storage?')) {\n return;\n }\n\n // TODO(burdon): Throws exception.\n await client.reset();\n window.location.href = window.location.origin;\n };\n\n const handleOpenDevtools = () => {\n const vaultUrl = config.values?.runtime?.client?.remoteSource;\n if (vaultUrl) {\n window.open(`https://devtools.dev.dxos.org/?target=${vaultUrl}`);\n }\n };\n\n return (\n <DebugPanel\n menu={\n <>\n <ToggleGroup type='single' value={view}>\n <ToggleGroupItem value={'graph'} onClick={() => setView('graph')} title={'Plugin graph'}>\n <GraphIcon className={getSize(5)} />\n </ToggleGroupItem>\n <ToggleGroupItem value={'diagnostics'} onClick={() => setView('diagnostics')} title={'Diagnostics'}>\n <Gauge className={getSize(5)} />\n </ToggleGroupItem>\n <ToggleGroupItem value={'config'} onClick={() => setView('config')} title={'Config'}>\n <Gear className={getSize(5)} />\n </ToggleGroupItem>\n </ToggleGroup>\n\n <div className='grow' />\n <Button onClick={(event) => handleResetClient(event.shiftKey)} title='Reset client'>\n <Warning className={mx(getSize(5), 'text-red-700')} />\n </Button>\n <Button onClick={handleOpenDevtools} title='Open Devtools'>\n <Toolbox weight='duotone' className={mx(getSize(5), 'text-700')} />\n </Button>\n </>\n }\n >\n {view === 'graph' && <Tree data={graph.toJSON()} />}\n {view === 'config' && <Json data={data.diagnostics?.config} />}\n {view === 'diagnostics' && <Json data={data} />}\n </DebugPanel>\n );\n};\n\nexport default DebugGlobal;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC, type HTMLAttributes, useState } from 'react';\n\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/react-ui-theme';\nimport { arrayToBuffer } from '@dxos/util';\n\n// TODO(burdon): Copied form devtools.\n\nexport const replacer = (key: any, value: any) => {\n if (typeof value === 'object') {\n if (value instanceof Uint8Array) {\n return arrayToBuffer(value).toString('hex');\n }\n\n if (value?.type === 'Buffer') {\n return Buffer.from(value.data).toString('hex');\n }\n\n if (key === 'downloaded') {\n return undefined;\n }\n }\n\n return value;\n};\n\nexport const Json: FC<{ data?: object }> = ({ data }) => {\n return <SyntaxHighlighter language='json'>{JSON.stringify(data, replacer, 2)}</SyntaxHighlighter>;\n};\n\nexport const Tree: FC<{ data?: object }> = ({ data }) => {\n return (\n <div className='flex overflow-auto ml-2 border-l-2 border-blue-500'>\n <Node data={data} root />\n </div>\n );\n};\n\nexport const Node: FC<{ data?: any; root?: boolean }> = ({ data, root }) => {\n if (typeof data !== 'object' || data === undefined || data === null) {\n return <Scalar value={data} />;\n }\n\n if (Array.isArray(data)) {\n return (\n <div className='flex flex-col space-y-2'>\n {data.map((value, index) => (\n <KeyValue key={index} label={String(index)} data={value} className='bg-teal-50' />\n ))}\n </div>\n );\n }\n\n return (\n <div className='flex flex-col space-y-2'>\n {Object.entries(data).map(([key, value]) => (\n <KeyValue key={key} label={key} data={value} className='bg-blue-50' />\n ))}\n </div>\n );\n};\n\nexport const KeyValue: FC<{ label: string; data?: any; className?: string }> = ({ label, data, className }) => {\n const [open, setOpen] = useState(true);\n if (data === undefined) {\n return null;\n }\n\n return (\n <div className='flex'>\n <Box\n className={mx('border-blue-200 text-sm select-none cursor-pointer', className)}\n onClick={() => setOpen((open) => !open)}\n >\n {label}\n </Box>\n {open && <Node data={data} />}\n </div>\n );\n};\n\nconst Scalar: FC<{ value: any }> = ({ value }) => {\n return (\n <Box className='bg-green-50 border-green-200 rounded-r text-sm font-thin'>\n {(value === undefined && 'undefined') ||\n (value === null && 'null') ||\n (typeof value === 'string' && value) ||\n JSON.stringify(value)}\n </Box>\n );\n};\n\nconst Box: FC<HTMLAttributes<HTMLDivElement>> = ({ children, className, ...props }) => {\n return (\n <div className={mx('flex px-2 border border-l-0 font-mono truncate', className)} {...props}>\n {children}\n </div>\n );\n};\n"],
5
- "mappings": ";;;;;AAIA,SAASA,OAAOC,SAASC,WAAWC,MAAMC,SAASC,eAAe;AAClE,OAAOC,UAAkBC,WAAWC,YAAAA,iBAAgB;AAGpD,SAASC,WAAWC,iBAAiB;AACrC,SAASC,QAAQC,aAAaC,uBAAuB;AACrD,SAASC,SAASC,MAAAA,WAAU;;;ACN5B,OAAOC,SAAuCC,gBAAgB;AAE9D,SAASC,yBAAyB;AAClC,SAASC,UAAU;AACnB,SAASC,qBAAqB;AAIvB,IAAMC,WAAW,CAACC,KAAUC,UAAAA;AACjC,MAAI,OAAOA,UAAU,UAAU;AAC7B,QAAIA,iBAAiBC,YAAY;AAC/B,aAAOC,cAAcF,KAAAA,EAAOG,SAAS,KAAA;IACvC;AAEA,QAAIH,OAAOI,SAAS,UAAU;AAC5B,aAAOC,OAAOC,KAAKN,MAAMO,IAAI,EAAEJ,SAAS,KAAA;IAC1C;AAEA,QAAIJ,QAAQ,cAAc;AACxB,aAAOS;IACT;EACF;AAEA,SAAOR;AACT;AAEO,IAAMS,OAA8B,CAAC,EAAEF,KAAI,MAAE;AAClD,SAAO,sBAAA,cAACG,mBAAAA;IAAkBC,UAAS;KAAQC,KAAKC,UAAUN,MAAMT,UAAU,CAAA,CAAA;AAC5E;AAEO,IAAMgB,OAA8B,CAA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kC,OAAO;OACvE,gBAAAR,OAAA,cAACS,WAAAA;MAAUC,WAAWC,QAAQ,CAAA;SAEhC,gBAAAX,OAAA,cAACM,iBAAAA;MAAgBD,OAAO;MAAeE,SAAS,MAAMjC,QAAQ,aAAA;MAAgBkC,OAAO;OACnF,gBAAAR,OAAA,cAACY,OAAAA;MAAMF,WAAWC,QAAQ,CAAA;SAE5B,gBAAAX,OAAA,cAACM,iBAAAA;MAAgBD,OAAO;MAAUE,SAAS,MAAMjC,QAAQ,QAAA;MAAWkC,OAAO;OACzE,gBAAAR,OAAA,cAACa,MAAAA;MAAKH,WAAWC,QAAQ,CAAA;UAI7B,gBAAAX,OAAA,cAACc,OAAAA;MAAIJ,WAAU;QACf,gBAAAV,OAAA,cAACe,QAAAA;MAAOR,SAAS,CAACS,UAAU9B,kBAAkB8B,MAAMC,QAAQ;MAAGT,OAAM;OACnE,gBAAAR,OAAA,cAACkB,SAAAA;MAAQR,WAAWS,IAAGR,QAAQ,CAAA,GAAI,cAAA;SAErC,gBAAAX,OAAA,cAACe,QAAAA;MAAOR,SAASb;MAAoBc,OAAM;OACzC,gBAAAR,OAAA,cAACoB,SAAAA;MAAQC,QAAO;MAAUX,WAAWS,IAAGR,QAAQ,CAAA,GAAI,UAAA;;KAKzDtC,SAAS,WAAW,gBAAA2B,OAAA,cAACsB,MAAAA;IAAK9C,MAAMJ,MAAMmD,OAAM;MAC5ClD,SAAS,YAAY,gBAAA2B,OAAA,cAACwB,MAAAA;IAAKhD,MAAMA,KAAKO,aAAaH;MACnDP,SAAS,iBAAiB,gBAAA2B,OAAA,cAACwB,MAAAA;IAAKhD;;AAGvC;AAEA,IAAA,sBAAeL;",
6
- "names": ["Gauge", "Graph", "GraphIcon", "Gear", "Toolbox", "Warning", "React", "useEffect", "useState", "useClient", "useConfig", "Button", "ToggleGroup", "ToggleGroupItem", "getSize", "mx", "React", "useState", "SyntaxHighlighter", "mx", "arrayToBuffer", "replacer", "key", "value", "Uint8Array", "arrayToBuffer", "toString", "type", "Buffer", "from", "data", "undefined", "Json", "SyntaxHighlighter", "language", "JSON", "stringify", "Tree", "div", "className", "Node", "root", "Scalar", "Array", "isArray", "map", "index", "KeyValue", "label", "String", "Object", "entries", "open", "setOpen", "useState", "Box", "mx", "onClick", "children", "props", "DebugGlobal", "graph", "view", "setView", "useState", "data", "setData", "client", "useClient", "config", "useConfig", "handleRefresh", "diagnostics", "truncate", "useEffect", "handleResetClient", "force", "window", "confirm", "reset", "location", "href", "origin", "handleOpenDevtools", "vaultUrl", "values", "runtime", "remoteSource", "open", "React", "DebugPanel", "menu", "ToggleGroup", "type", "value", "ToggleGroupItem", "onClick", "title", "GraphIcon", "className", "getSize", "Gauge", "Gear", "div", "Button", "event", "shiftKey", "Warning", "mx", "Toolbox", "weight", "Tree", "toJSON", "Json"]
7
- }