@dxos/plugin-debug 0.8.1-staging.391c573 → 0.8.1-staging.5be625a
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/{DebugApp-LQHFFK3Y.mjs → DebugApp-7PFYN52J.mjs} +30 -23
- package/dist/lib/browser/{DebugApp-LQHFFK3Y.mjs.map → DebugApp-7PFYN52J.mjs.map} +4 -4
- package/dist/lib/browser/{SpaceGenerator-SPEJBGP7.mjs → SpaceGenerator-OIK3XDTA.mjs} +6 -5
- package/dist/lib/browser/SpaceGenerator-OIK3XDTA.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-NYB6QZQK.mjs → app-graph-builder-EJHONTKA.mjs} +5 -19
- package/dist/lib/browser/{app-graph-builder-NYB6QZQK.mjs.map → app-graph-builder-EJHONTKA.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-LHJC7LSH.mjs → chunk-F2R7TJCJ.mjs} +1 -2
- package/dist/lib/browser/{chunk-EF3UVAVI.mjs → chunk-RORUXVAC.mjs} +1 -1
- package/dist/lib/browser/chunk-RORUXVAC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -5
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-context-TCD3MNIT.mjs → react-context-ZRLN5KUI.mjs} +2 -2
- package/dist/lib/browser/{react-surface-PQFKDW3V.mjs → react-surface-G43REICD.mjs} +12 -21
- package/dist/lib/browser/react-surface-G43REICD.mjs.map +7 -0
- package/dist/lib/browser/{settings-DLIPIUG7.mjs → settings-R47ZDKXO.mjs} +5 -5
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -9
- package/dist/types/src/meta.d.ts.map +1 -1
- package/package.json +48 -48
- package/src/capabilities/app-graph-builder.ts +0 -9
- package/src/capabilities/react-surface.tsx +3 -23
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +1 -1
- package/src/components/SpaceGenerator/SchemaTable.tsx +1 -1
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +2 -2
- package/src/components/index.ts +0 -1
- package/src/meta.ts +2 -2
- package/dist/lib/browser/DebugSpace-5A2QOKAZ.mjs +0 -277
- package/dist/lib/browser/DebugSpace-5A2QOKAZ.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-SPEJBGP7.mjs.map +0 -7
- package/dist/lib/browser/chunk-EF3UVAVI.mjs.map +0 -7
- package/dist/lib/browser/chunk-GSJS3HEM.mjs +0 -15
- package/dist/lib/browser/chunk-GSJS3HEM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PQFKDW3V.mjs.map +0 -7
- package/dist/types/src/components/DebugSpace/DebugSpace.d.ts +0 -8
- package/dist/types/src/components/DebugSpace/DebugSpace.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/DebugSpace.stories.d.ts +0 -6
- package/dist/types/src/components/DebugSpace/DebugSpace.stories.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts +0 -15
- package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/ObjectCreator.stories.d.ts +0 -6
- package/dist/types/src/components/DebugSpace/ObjectCreator.stories.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/index.d.ts +0 -3
- package/dist/types/src/components/DebugSpace/index.d.ts.map +0 -1
- package/src/components/DebugSpace/DebugSpace.stories.tsx +0 -46
- package/src/components/DebugSpace/DebugSpace.tsx +0 -183
- package/src/components/DebugSpace/ObjectCreator.stories.tsx +0 -51
- package/src/components/DebugSpace/ObjectCreator.tsx +0 -100
- package/src/components/DebugSpace/index.ts +0 -7
- /package/dist/lib/browser/{chunk-LHJC7LSH.mjs.map → chunk-F2R7TJCJ.mjs.map} +0 -0
- /package/dist/lib/browser/{react-context-TCD3MNIT.mjs.map → react-context-ZRLN5KUI.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-DLIPIUG7.mjs.map → settings-R47ZDKXO.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-debug",
|
|
3
|
-
"version": "0.8.1-staging.
|
|
3
|
+
"version": "0.8.1-staging.5be625a",
|
|
4
4
|
"description": "DXOS Surface plugin for testing.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -33,47 +33,47 @@
|
|
|
33
33
|
"react-json-tree": "^0.18.0",
|
|
34
34
|
"react-resize-detector": "^11.0.1",
|
|
35
35
|
"workerize-loader": "^2.0.2",
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/automerge": "0.8.1-staging.
|
|
39
|
-
"@dxos/compute": "0.8.1-staging.
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/conductor": "0.8.1-staging.
|
|
42
|
-
"@dxos/config": "0.8.1-staging.
|
|
43
|
-
"@dxos/devtools": "0.8.1-staging.
|
|
44
|
-
"@dxos/echo-
|
|
45
|
-
"@dxos/echo-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/invariant": "0.8.1-staging.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/keys": "0.8.1-staging.
|
|
50
|
-
"@dxos/live-object": "0.8.1-staging.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/plugin-
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/plugin-
|
|
57
|
-
"@dxos/plugin-
|
|
58
|
-
"@dxos/plugin-
|
|
59
|
-
"@dxos/plugin-
|
|
60
|
-
"@dxos/plugin-
|
|
61
|
-
"@dxos/plugin-
|
|
62
|
-
"@dxos/plugin-theme": "0.8.1-staging.
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/react-client": "0.8.1-staging.
|
|
66
|
-
"@dxos/react-hooks": "0.8.1-staging.
|
|
67
|
-
"@dxos/react-ui-
|
|
68
|
-
"@dxos/react-ui-
|
|
69
|
-
"@dxos/react-ui-form": "0.8.1-staging.
|
|
70
|
-
"@dxos/react-ui-canvas-editor": "0.8.1-staging.
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/react-ui-
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/schema": "0.8.1-staging.
|
|
76
|
-
"@dxos/util": "0.8.1-staging.
|
|
36
|
+
"@dxos/app-framework": "0.8.1-staging.5be625a",
|
|
37
|
+
"@dxos/async": "0.8.1-staging.5be625a",
|
|
38
|
+
"@dxos/automerge": "0.8.1-staging.5be625a",
|
|
39
|
+
"@dxos/compute": "0.8.1-staging.5be625a",
|
|
40
|
+
"@dxos/client-services": "0.8.1-staging.5be625a",
|
|
41
|
+
"@dxos/conductor": "0.8.1-staging.5be625a",
|
|
42
|
+
"@dxos/config": "0.8.1-staging.5be625a",
|
|
43
|
+
"@dxos/devtools": "0.8.1-staging.5be625a",
|
|
44
|
+
"@dxos/echo-generator": "0.8.1-staging.5be625a",
|
|
45
|
+
"@dxos/echo-pipeline": "0.8.1-staging.5be625a",
|
|
46
|
+
"@dxos/functions": "0.8.1-staging.5be625a",
|
|
47
|
+
"@dxos/invariant": "0.8.1-staging.5be625a",
|
|
48
|
+
"@dxos/echo-schema": "0.8.1-staging.5be625a",
|
|
49
|
+
"@dxos/keys": "0.8.1-staging.5be625a",
|
|
50
|
+
"@dxos/live-object": "0.8.1-staging.5be625a",
|
|
51
|
+
"@dxos/local-storage": "0.8.1-staging.5be625a",
|
|
52
|
+
"@dxos/log": "0.8.1-staging.5be625a",
|
|
53
|
+
"@dxos/plugin-deck": "0.8.1-staging.5be625a",
|
|
54
|
+
"@dxos/plugin-graph": "0.8.1-staging.5be625a",
|
|
55
|
+
"@dxos/plugin-client": "0.8.1-staging.5be625a",
|
|
56
|
+
"@dxos/plugin-sheet": "0.8.1-staging.5be625a",
|
|
57
|
+
"@dxos/plugin-markdown": "0.8.1-staging.5be625a",
|
|
58
|
+
"@dxos/plugin-sketch": "0.8.1-staging.5be625a",
|
|
59
|
+
"@dxos/plugin-status-bar": "0.8.1-staging.5be625a",
|
|
60
|
+
"@dxos/plugin-space": "0.8.1-staging.5be625a",
|
|
61
|
+
"@dxos/plugin-table": "0.8.1-staging.5be625a",
|
|
62
|
+
"@dxos/plugin-theme": "0.8.1-staging.5be625a",
|
|
63
|
+
"@dxos/random": "0.8.1-staging.5be625a",
|
|
64
|
+
"@dxos/protocols": "0.8.1-staging.5be625a",
|
|
65
|
+
"@dxos/react-client": "0.8.1-staging.5be625a",
|
|
66
|
+
"@dxos/react-hooks": "0.8.1-staging.5be625a",
|
|
67
|
+
"@dxos/react-ui-attention": "0.8.1-staging.5be625a",
|
|
68
|
+
"@dxos/react-ui-canvas-compute": "0.8.1-staging.5be625a",
|
|
69
|
+
"@dxos/react-ui-form": "0.8.1-staging.5be625a",
|
|
70
|
+
"@dxos/react-ui-canvas-editor": "0.8.1-staging.5be625a",
|
|
71
|
+
"@dxos/react-ui-kanban": "0.8.1-staging.5be625a",
|
|
72
|
+
"@dxos/react-ui-stack": "0.8.1-staging.5be625a",
|
|
73
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.1-staging.5be625a",
|
|
74
|
+
"@dxos/react-ui-table": "0.8.1-staging.5be625a",
|
|
75
|
+
"@dxos/schema": "0.8.1-staging.5be625a",
|
|
76
|
+
"@dxos/util": "0.8.1-staging.5be625a"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -83,17 +83,17 @@
|
|
|
83
83
|
"react": "~18.2.0",
|
|
84
84
|
"react-dom": "~18.2.0",
|
|
85
85
|
"vite": "5.4.7",
|
|
86
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
86
|
+
"@dxos/react-ui-theme": "0.8.1-staging.5be625a",
|
|
87
|
+
"@dxos/storybook-utils": "0.8.1-staging.5be625a",
|
|
88
|
+
"@dxos/react-ui": "0.8.1-staging.5be625a"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@phosphor-icons/react": "^2.1.5",
|
|
92
92
|
"react": "~18.2.0",
|
|
93
93
|
"react-dom": "~18.2.0",
|
|
94
|
-
"@dxos/random": "0.8.1-staging.
|
|
95
|
-
"@dxos/react-ui-theme": "0.8.1-staging.
|
|
96
|
-
"@dxos/react-ui": "0.8.1-staging.
|
|
94
|
+
"@dxos/random": "0.8.1-staging.5be625a",
|
|
95
|
+
"@dxos/react-ui-theme": "0.8.1-staging.5be625a",
|
|
96
|
+
"@dxos/react-ui": "0.8.1-staging.5be625a"
|
|
97
97
|
},
|
|
98
98
|
"publishConfig": {
|
|
99
99
|
"access": "public"
|
|
@@ -272,15 +272,6 @@ export default (context: PluginsContext) =>
|
|
|
272
272
|
icon: 'ph--computer-tower--regular',
|
|
273
273
|
},
|
|
274
274
|
},
|
|
275
|
-
{
|
|
276
|
-
id: Devtools.Agent.Search,
|
|
277
|
-
data: Devtools.Agent.Search,
|
|
278
|
-
type: DEVTOOLS_TYPE,
|
|
279
|
-
properties: {
|
|
280
|
-
label: ['search label', { ns: DEBUG_PLUGIN }],
|
|
281
|
-
icon: 'ph--magnifying-glass--regular',
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
275
|
],
|
|
285
276
|
},
|
|
286
277
|
{
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
TracingPanel,
|
|
35
35
|
DashboardPanel,
|
|
36
36
|
EdgeDashboardPanel,
|
|
37
|
-
SearchPanel,
|
|
38
37
|
AutomergePanel,
|
|
39
38
|
WorkflowPanel,
|
|
40
39
|
QueuesPanel,
|
|
@@ -54,15 +53,7 @@ import {
|
|
|
54
53
|
parseId,
|
|
55
54
|
} from '@dxos/react-client/echo';
|
|
56
55
|
|
|
57
|
-
import {
|
|
58
|
-
DebugApp,
|
|
59
|
-
DebugObjectPanel,
|
|
60
|
-
DebugSettings,
|
|
61
|
-
DebugSpace,
|
|
62
|
-
DebugStatus,
|
|
63
|
-
SpaceGenerator,
|
|
64
|
-
Wireframe,
|
|
65
|
-
} from '../components';
|
|
56
|
+
import { DebugApp, DebugObjectPanel, DebugSettings, DebugStatus, SpaceGenerator, Wireframe } from '../components';
|
|
66
57
|
import { DEBUG_PLUGIN } from '../meta';
|
|
67
58
|
import { type DebugSettingsProps, Devtools } from '../types';
|
|
68
59
|
|
|
@@ -122,12 +113,7 @@ export default (context: PluginsContext) =>
|
|
|
122
113
|
[data.subject.space],
|
|
123
114
|
);
|
|
124
115
|
|
|
125
|
-
|
|
126
|
-
return deprecated ? (
|
|
127
|
-
<DebugSpace space={data.subject.space} onAddObjects={handleCreateObject} />
|
|
128
|
-
) : (
|
|
129
|
-
<SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />
|
|
130
|
-
);
|
|
116
|
+
return <SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />;
|
|
131
117
|
},
|
|
132
118
|
}),
|
|
133
119
|
createSurface({
|
|
@@ -170,7 +156,7 @@ export default (context: PluginsContext) =>
|
|
|
170
156
|
id: `${DEBUG_PLUGIN}/client/config`,
|
|
171
157
|
role: 'article',
|
|
172
158
|
filter: (data): data is any => data.subject === Devtools.Client.Config,
|
|
173
|
-
component: () => <ConfigPanel />,
|
|
159
|
+
component: () => <ConfigPanel vaultSelector={false} />,
|
|
174
160
|
}),
|
|
175
161
|
createSurface({
|
|
176
162
|
id: `${DEBUG_PLUGIN}/client/storage`,
|
|
@@ -310,12 +296,6 @@ export default (context: PluginsContext) =>
|
|
|
310
296
|
filter: (data): data is any => data.subject === Devtools.Agent.Dashboard,
|
|
311
297
|
component: () => <DashboardPanel />,
|
|
312
298
|
}),
|
|
313
|
-
createSurface({
|
|
314
|
-
id: `${DEBUG_PLUGIN}/agent/search`,
|
|
315
|
-
role: 'article',
|
|
316
|
-
filter: (data): data is any => data.subject === Devtools.Agent.Search,
|
|
317
|
-
component: () => <SearchPanel />,
|
|
318
|
-
}),
|
|
319
299
|
createSurface({
|
|
320
300
|
id: `${DEBUG_PLUGIN}/edge/dashboard`,
|
|
321
301
|
role: 'article',
|
|
@@ -150,7 +150,7 @@ export const createGenerator = <T extends BaseObject>(type: TypedObject<T>): Obj
|
|
|
150
150
|
(await space.db.schemaRegistry.register([type]))[0];
|
|
151
151
|
|
|
152
152
|
// Create objects.
|
|
153
|
-
const generate = createAsyncGenerator(generator, schema.
|
|
153
|
+
const generate = createAsyncGenerator(generator, schema.snapshot, { db: space.db });
|
|
154
154
|
const objects = await generate.createObjects(n);
|
|
155
155
|
|
|
156
156
|
// Find or create table and view.
|
|
@@ -15,7 +15,7 @@ export type SchemaTableProps = {
|
|
|
15
15
|
|
|
16
16
|
export const SchemaTable = ({ types, objects = {}, label, onClick }: SchemaTableProps) => {
|
|
17
17
|
return (
|
|
18
|
-
<div className='grid grid-cols-[1fr_80px_40px] gap-1 overflow-
|
|
18
|
+
<div className='grid grid-cols-[1fr_80px_40px] gap-1 overflow-none'>
|
|
19
19
|
<div className='grid grid-cols-subgrid col-span-3'>
|
|
20
20
|
<div className='px-2 text-sm text-primary-500'>{label}</div>
|
|
21
21
|
<div className='px-2 text-xs text-subdued text-right'>count</div>
|
|
@@ -118,7 +118,7 @@ export const SpaceGenerator = ({ space, onCreateObjects }: SpaceGeneratorProps)
|
|
|
118
118
|
const parts = schema.typename.split('/');
|
|
119
119
|
const name = parts[parts.length - 1];
|
|
120
120
|
const table = create(TableType, { name, threads: [] });
|
|
121
|
-
await initializeTable({ space, table,
|
|
121
|
+
await initializeTable({ client, space, table, typename: schema.typename });
|
|
122
122
|
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: table }));
|
|
123
123
|
return table;
|
|
124
124
|
}),
|
|
@@ -145,7 +145,7 @@ export const SpaceGenerator = ({ space, onCreateObjects }: SpaceGeneratorProps)
|
|
|
145
145
|
}, []);
|
|
146
146
|
|
|
147
147
|
return (
|
|
148
|
-
<div role='none' className='flex flex-col divide-y divide-separator'>
|
|
148
|
+
<div role='none' className='flex flex-col divide-y divide-separator overflow-y-auto'>
|
|
149
149
|
<Toolbar.Root classNames='p-1'>
|
|
150
150
|
<IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' onClick={updateInfo} />
|
|
151
151
|
<IconButton
|
package/src/components/index.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { lazy } from 'react';
|
|
6
6
|
|
|
7
7
|
export const DebugApp = lazy(() => import('./DebugApp'));
|
|
8
|
-
export const DebugSpace = lazy(() => import('./DebugSpace'));
|
|
9
8
|
export const SpaceGenerator = lazy(() => import('./SpaceGenerator'));
|
|
10
9
|
|
|
11
10
|
export * from './DebugObjectPanel';
|
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type PluginMeta } from '@dxos/app-framework';
|
|
|
6
6
|
|
|
7
7
|
export const DEBUG_PLUGIN = 'dxos.org/plugin/debug';
|
|
8
8
|
|
|
9
|
-
export const meta = {
|
|
9
|
+
export const meta: PluginMeta = {
|
|
10
10
|
id: DEBUG_PLUGIN,
|
|
11
11
|
name: 'Debug',
|
|
12
12
|
description:
|
|
@@ -15,4 +15,4 @@ export const meta = {
|
|
|
15
15
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug',
|
|
16
16
|
tags: ['experimental'],
|
|
17
17
|
screenshots: ['https://dxos.network/plugin-details-debug-dark.png'],
|
|
18
|
-
}
|
|
18
|
+
};
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Container
|
|
3
|
-
} from "./chunk-GSJS3HEM.mjs";
|
|
4
|
-
import {
|
|
5
|
-
DebugContext
|
|
6
|
-
} from "./chunk-LHJC7LSH.mjs";
|
|
7
|
-
|
|
8
|
-
// packages/plugins/plugin-debug/src/components/DebugSpace/DebugSpace.tsx
|
|
9
|
-
import React2, { useContext, useMemo as useMemo2, useState as useState2 } from "react";
|
|
10
|
-
import { createSpaceObjectGenerator as createSpaceObjectGenerator2 } from "@dxos/echo-generator";
|
|
11
|
-
import { DocumentType } from "@dxos/plugin-markdown/types";
|
|
12
|
-
import { Invitation } from "@dxos/protocols/proto/dxos/client/services";
|
|
13
|
-
import { faker } from "@dxos/random";
|
|
14
|
-
import { useClient } from "@dxos/react-client";
|
|
15
|
-
import { Filter, useSpaceInvitation } from "@dxos/react-client/echo";
|
|
16
|
-
import { InvitationEncoder } from "@dxos/react-client/invitations";
|
|
17
|
-
import { useAsyncEffect } from "@dxos/react-hooks";
|
|
18
|
-
import { Icon, IconButton as IconButton2, Input, Toolbar as Toolbar2, useFileDownload } from "@dxos/react-ui";
|
|
19
|
-
import { safeParseInt } from "@dxos/util";
|
|
20
|
-
|
|
21
|
-
// packages/plugins/plugin-debug/src/components/DebugSpace/ObjectCreator.tsx
|
|
22
|
-
import React, { useMemo, useState } from "react";
|
|
23
|
-
import { TestSchemaType, createSpaceObjectGenerator } from "@dxos/echo-generator";
|
|
24
|
-
import { IconButton, Toolbar } from "@dxos/react-ui";
|
|
25
|
-
import { createColumnBuilder, Table } from "@dxos/react-ui-table/deprecated";
|
|
26
|
-
var BATCH_SIZE = 10;
|
|
27
|
-
var ObjectCreator = ({ space, onAddObjects }) => {
|
|
28
|
-
const generator = useMemo(() => createSpaceObjectGenerator(space), [
|
|
29
|
-
space
|
|
30
|
-
]);
|
|
31
|
-
const [objects, setObjects] = useState(Object.values(TestSchemaType).map((schema) => ({
|
|
32
|
-
schema,
|
|
33
|
-
enabled: true,
|
|
34
|
-
objects: 10,
|
|
35
|
-
mutations: {
|
|
36
|
-
count: 10,
|
|
37
|
-
mutationSize: 10,
|
|
38
|
-
maxContentLength: 1e3
|
|
39
|
-
}
|
|
40
|
-
})));
|
|
41
|
-
const handleCreate = async () => {
|
|
42
|
-
for (const params of objects) {
|
|
43
|
-
if (!params.enabled) {
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
let objectsCreated = 0;
|
|
47
|
-
while (objectsCreated < params.objects) {
|
|
48
|
-
const objects2 = await generator.createObjects({
|
|
49
|
-
[params.schema]: Math.min(BATCH_SIZE, params.objects - objectsCreated)
|
|
50
|
-
});
|
|
51
|
-
await generator.mutateObjects(objects2, params.mutations);
|
|
52
|
-
objectsCreated += objects2.length;
|
|
53
|
-
onAddObjects?.(objects2);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
await space.db.flush();
|
|
57
|
-
};
|
|
58
|
-
const handleUpdate = (row, key, value) => {
|
|
59
|
-
const newObjects = [
|
|
60
|
-
...objects
|
|
61
|
-
];
|
|
62
|
-
Object.assign(newObjects.find((object) => object.schema === row.schema), {
|
|
63
|
-
[key]: value
|
|
64
|
-
});
|
|
65
|
-
setObjects(newObjects);
|
|
66
|
-
};
|
|
67
|
-
const { helper, builder } = createColumnBuilder();
|
|
68
|
-
const columns = [
|
|
69
|
-
helper.accessor("enabled", builder.switch({
|
|
70
|
-
label: "Live",
|
|
71
|
-
onUpdate: handleUpdate
|
|
72
|
-
})),
|
|
73
|
-
helper.accessor("schema", builder.string({
|
|
74
|
-
label: "Schema",
|
|
75
|
-
classNames: "font-mono"
|
|
76
|
-
})),
|
|
77
|
-
helper.accessor("objects", builder.number({
|
|
78
|
-
label: "Objects",
|
|
79
|
-
onUpdate: handleUpdate
|
|
80
|
-
})),
|
|
81
|
-
helper.accessor((obj) => obj.mutations.count, {
|
|
82
|
-
id: "mutations",
|
|
83
|
-
...builder.number({
|
|
84
|
-
label: "Mutations",
|
|
85
|
-
onUpdate: handleUpdate
|
|
86
|
-
})
|
|
87
|
-
}),
|
|
88
|
-
helper.accessor((obj) => obj.mutations.mutationSize, {
|
|
89
|
-
id: "mutationSize",
|
|
90
|
-
...builder.number({
|
|
91
|
-
label: "Mut. Size",
|
|
92
|
-
onUpdate: handleUpdate
|
|
93
|
-
})
|
|
94
|
-
}),
|
|
95
|
-
helper.accessor((obj) => obj.mutations.maxContentLength, {
|
|
96
|
-
id: "mutationMaxContentLength",
|
|
97
|
-
...builder.number({
|
|
98
|
-
label: "Length",
|
|
99
|
-
onUpdate: handleUpdate
|
|
100
|
-
})
|
|
101
|
-
})
|
|
102
|
-
];
|
|
103
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Table.Root, null, /* @__PURE__ */ React.createElement(Table.Viewport, null, /* @__PURE__ */ React.createElement(Table.Main, {
|
|
104
|
-
columns,
|
|
105
|
-
data: objects
|
|
106
|
-
}))), /* @__PURE__ */ React.createElement(Toolbar.Root, {
|
|
107
|
-
classNames: "p-1"
|
|
108
|
-
}, /* @__PURE__ */ React.createElement(IconButton, {
|
|
109
|
-
icon: "ph--plus--regular",
|
|
110
|
-
label: "Create",
|
|
111
|
-
onClick: handleCreate
|
|
112
|
-
})));
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// packages/plugins/plugin-debug/src/components/DebugSpace/DebugSpace.tsx
|
|
116
|
-
var DEFAULT_COUNT = 100;
|
|
117
|
-
var DEFAULT_PERIOD = 500;
|
|
118
|
-
var DEFAULT_JITTER = 50;
|
|
119
|
-
var useRefresh = () => {
|
|
120
|
-
const [update, setUpdate] = useState2({});
|
|
121
|
-
return [
|
|
122
|
-
update,
|
|
123
|
-
() => setUpdate({})
|
|
124
|
-
];
|
|
125
|
-
};
|
|
126
|
-
var CustomInput = ({ icon, ...props }) => {
|
|
127
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
128
|
-
role: "none",
|
|
129
|
-
className: "relative"
|
|
130
|
-
}, /* @__PURE__ */ React2.createElement(Input.Root, null, /* @__PURE__ */ React2.createElement(Input.TextInput, {
|
|
131
|
-
classNames: "w-[100px] text-right pie-[22px]",
|
|
132
|
-
size: 5,
|
|
133
|
-
...props
|
|
134
|
-
})), /* @__PURE__ */ React2.createElement(Icon, {
|
|
135
|
-
icon,
|
|
136
|
-
size: 3,
|
|
137
|
-
classNames: "absolute inline-end-1 block-start-1 mt-[6px]"
|
|
138
|
-
}));
|
|
139
|
-
};
|
|
140
|
-
var DebugSpace = ({ space, onAddObjects }) => {
|
|
141
|
-
const { connect } = useSpaceInvitation(space?.key);
|
|
142
|
-
const client = useClient();
|
|
143
|
-
const [data, setData] = useState2({});
|
|
144
|
-
const [update, handleUpdate] = useRefresh();
|
|
145
|
-
useAsyncEffect(async (isMounted) => {
|
|
146
|
-
const data2 = await client.diagnostics({
|
|
147
|
-
truncate: true
|
|
148
|
-
});
|
|
149
|
-
if (isMounted()) {
|
|
150
|
-
setData(data2?.diagnostics?.spaces?.find(({ key }) => {
|
|
151
|
-
return space.key.toHex().startsWith(key);
|
|
152
|
-
}));
|
|
153
|
-
}
|
|
154
|
-
}, [
|
|
155
|
-
space,
|
|
156
|
-
update
|
|
157
|
-
]);
|
|
158
|
-
const download = useFileDownload();
|
|
159
|
-
const handleDownload = async () => {
|
|
160
|
-
download(new Blob([
|
|
161
|
-
JSON.stringify(data, void 0, 2)
|
|
162
|
-
], {
|
|
163
|
-
type: "text/plain"
|
|
164
|
-
}), `${(/* @__PURE__ */ new Date()).toISOString().replace(/\W/g, "-")}.json`);
|
|
165
|
-
};
|
|
166
|
-
const [mutationCount, setMutationCount] = useState2(String(DEFAULT_COUNT));
|
|
167
|
-
const [mutationInterval, setMutationInterval] = useState2(String(DEFAULT_PERIOD));
|
|
168
|
-
const [mutationJitter, setMutationJitter] = useState2(String(DEFAULT_JITTER));
|
|
169
|
-
const generator = useMemo2(() => createSpaceObjectGenerator2(space), [
|
|
170
|
-
space
|
|
171
|
-
]);
|
|
172
|
-
const { running, start, stop } = useContext(DebugContext);
|
|
173
|
-
const handleToggleRunning = () => {
|
|
174
|
-
if (running) {
|
|
175
|
-
stop();
|
|
176
|
-
handleUpdate();
|
|
177
|
-
} else {
|
|
178
|
-
start(async () => {
|
|
179
|
-
const { objects } = await space.db.query(Filter.schema(DocumentType)).run();
|
|
180
|
-
if (objects.length) {
|
|
181
|
-
const object = faker.helpers.arrayElement(objects);
|
|
182
|
-
await generator.mutateObject(object, {
|
|
183
|
-
count: 10,
|
|
184
|
-
mutationSize: 10,
|
|
185
|
-
maxContentLength: 1e3
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}, {
|
|
189
|
-
count: safeParseInt(mutationCount) ?? 0,
|
|
190
|
-
interval: safeParseInt(mutationInterval) ?? 0,
|
|
191
|
-
jitter: safeParseInt(mutationJitter) ?? 0
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
const handleCreateInvitation = () => {
|
|
196
|
-
const invitation = space.share({
|
|
197
|
-
type: Invitation.Type.INTERACTIVE,
|
|
198
|
-
authMethod: Invitation.AuthMethod.NONE,
|
|
199
|
-
multiUse: true
|
|
200
|
-
});
|
|
201
|
-
connect(invitation);
|
|
202
|
-
const code = InvitationEncoder.encode(invitation.get());
|
|
203
|
-
new URL(window.origin).searchParams.set("spaceInvitationCode", code);
|
|
204
|
-
const url = `${window.origin}?spaceInvitationCode=${code}`;
|
|
205
|
-
void navigator.clipboard.writeText(url);
|
|
206
|
-
};
|
|
207
|
-
const handleCreateEpoch = async () => {
|
|
208
|
-
await space.internal.createEpoch();
|
|
209
|
-
handleUpdate();
|
|
210
|
-
};
|
|
211
|
-
return /* @__PURE__ */ React2.createElement(Container, {
|
|
212
|
-
toolbar: /* @__PURE__ */ React2.createElement(Toolbar2.Root, {
|
|
213
|
-
classNames: "p-1"
|
|
214
|
-
}, /* @__PURE__ */ React2.createElement(CustomInput, {
|
|
215
|
-
icon: "ph--flag--regular",
|
|
216
|
-
autoComplete: "off",
|
|
217
|
-
placeholder: "Count",
|
|
218
|
-
value: mutationCount,
|
|
219
|
-
onChange: ({ target: { value } }) => setMutationCount(value)
|
|
220
|
-
}), /* @__PURE__ */ React2.createElement(CustomInput, {
|
|
221
|
-
icon: "ph--timer--regular",
|
|
222
|
-
autoComplete: "off",
|
|
223
|
-
placeholder: "Interval",
|
|
224
|
-
value: mutationInterval,
|
|
225
|
-
onChange: ({ target: { value } }) => setMutationInterval(value)
|
|
226
|
-
}), /* @__PURE__ */ React2.createElement(CustomInput, {
|
|
227
|
-
icon: "ph--plus-minus--regular",
|
|
228
|
-
autoComplete: "off",
|
|
229
|
-
placeholder: "Jitter",
|
|
230
|
-
value: mutationJitter,
|
|
231
|
-
onChange: ({ target: { value } }) => setMutationJitter(value)
|
|
232
|
-
}), /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
233
|
-
icon: running ? "ph--pause-circle--regular" : "ph--play-circle--regular",
|
|
234
|
-
iconOnly: true,
|
|
235
|
-
label: "Start/stop",
|
|
236
|
-
size: 5,
|
|
237
|
-
onClick: handleToggleRunning
|
|
238
|
-
}), /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
239
|
-
icon: "ph--arrow-clockwise--regular",
|
|
240
|
-
iconOnly: true,
|
|
241
|
-
label: "Refresh",
|
|
242
|
-
size: 5,
|
|
243
|
-
onClick: handleUpdate
|
|
244
|
-
}), /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
245
|
-
icon: "ph--download-simple--regular",
|
|
246
|
-
iconOnly: true,
|
|
247
|
-
label: "Download",
|
|
248
|
-
size: 5,
|
|
249
|
-
onClick: handleDownload
|
|
250
|
-
}), /* @__PURE__ */ React2.createElement(Toolbar2.Separator, {
|
|
251
|
-
variant: "gap"
|
|
252
|
-
}), /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
253
|
-
icon: "ph--flag-pennant--regular",
|
|
254
|
-
iconOnly: true,
|
|
255
|
-
label: "Create epoch",
|
|
256
|
-
size: 5,
|
|
257
|
-
onClick: handleCreateEpoch
|
|
258
|
-
}), /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
259
|
-
icon: "ph--user-circle-plus--regular",
|
|
260
|
-
iconOnly: true,
|
|
261
|
-
iconClassNames: "text-blue-500",
|
|
262
|
-
label: "Create Invitation",
|
|
263
|
-
size: 5,
|
|
264
|
-
onClick: handleCreateInvitation
|
|
265
|
-
}))
|
|
266
|
-
}, /* @__PURE__ */ React2.createElement(ObjectCreator, {
|
|
267
|
-
space,
|
|
268
|
-
onAddObjects
|
|
269
|
-
}));
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// packages/plugins/plugin-debug/src/components/DebugSpace/index.ts
|
|
273
|
-
var DebugSpace_default = DebugSpace;
|
|
274
|
-
export {
|
|
275
|
-
DebugSpace_default as default
|
|
276
|
-
};
|
|
277
|
-
//# sourceMappingURL=DebugSpace-5A2QOKAZ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/DebugSpace/DebugSpace.tsx", "../../../src/components/DebugSpace/ObjectCreator.tsx", "../../../src/components/DebugSpace/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC, useContext, useMemo, useState } from 'react';\n\nimport { createSpaceObjectGenerator } from '@dxos/echo-generator';\nimport { type ReactiveObject } from '@dxos/live-object';\nimport { DocumentType } from '@dxos/plugin-markdown/types';\nimport { Invitation } from '@dxos/protocols/proto/dxos/client/services';\nimport { faker } from '@dxos/random';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, type Space, useSpaceInvitation } from '@dxos/react-client/echo';\nimport { InvitationEncoder } from '@dxos/react-client/invitations';\nimport { useAsyncEffect } from '@dxos/react-hooks';\nimport { Icon, IconButton, Input, type IconProps, type TextInputProps, Toolbar, useFileDownload } from '@dxos/react-ui';\nimport { safeParseInt } from '@dxos/util';\n\nimport { ObjectCreator } from './ObjectCreator';\nimport { DebugContext } from '../../types';\nimport { Container } from '../Container';\n\nconst DEFAULT_COUNT = 100;\nconst DEFAULT_PERIOD = 500;\nconst DEFAULT_JITTER = 50;\n\nconst useRefresh = (): [any, () => void] => {\n const [update, setUpdate] = useState({});\n return [update, () => setUpdate({})];\n};\n\nconst CustomInput = ({ icon, ...props }: Pick<IconProps, 'icon'> & TextInputProps) => {\n return (\n <div role='none' className='relative'>\n <Input.Root>\n <Input.TextInput classNames='w-[100px] text-right pie-[22px]' size={5} {...props} />\n </Input.Root>\n <Icon icon={icon} size={3} classNames='absolute inline-end-1 block-start-1 mt-[6px]' />\n </div>\n );\n};\n\nexport const DebugSpace: FC<{\n space: Space;\n onAddObjects?: (objects: ReactiveObject<any>[]) => void;\n}> = ({ space, onAddObjects }) => {\n const { connect } = useSpaceInvitation(space?.key);\n const client = useClient();\n const [data, setData] = useState<any>({});\n\n const [update, handleUpdate] = useRefresh();\n useAsyncEffect(\n async (isMounted) => {\n const data = await client.diagnostics({ truncate: true });\n if (isMounted()) {\n setData(\n data?.diagnostics?.spaces?.find(({ key }: any) => {\n return space.key.toHex().startsWith(key);\n }),\n );\n }\n },\n [space, update],\n );\n\n const download = useFileDownload();\n const handleDownload = async () => {\n download(\n new Blob([JSON.stringify(data, undefined, 2)], { type: 'text/plain' }),\n `${new Date().toISOString().replace(/\\W/g, '-')}.json`,\n );\n };\n\n const [mutationCount, setMutationCount] = useState(String(DEFAULT_COUNT));\n const [mutationInterval, setMutationInterval] = useState(String(DEFAULT_PERIOD));\n const [mutationJitter, setMutationJitter] = useState(String(DEFAULT_JITTER));\n\n const generator = useMemo(() => createSpaceObjectGenerator(space), [space]);\n\n // TODO(burdon): Note: this is shared across all spaces!\n const { running, start, stop } = useContext(DebugContext);\n const handleToggleRunning = () => {\n if (running) {\n stop();\n handleUpdate();\n } else {\n start(\n async () => {\n const { objects } = await space.db.query(Filter.schema(DocumentType)).run();\n if (objects.length) {\n const object = faker.helpers.arrayElement(objects);\n await generator.mutateObject(object, { count: 10, mutationSize: 10, maxContentLength: 1000 });\n }\n },\n {\n count: safeParseInt(mutationCount) ?? 0,\n interval: safeParseInt(mutationInterval) ?? 0,\n jitter: safeParseInt(mutationJitter) ?? 0,\n },\n );\n }\n };\n\n const handleCreateInvitation = () => {\n const invitation = space.share({\n type: Invitation.Type.INTERACTIVE,\n authMethod: Invitation.AuthMethod.NONE,\n multiUse: true,\n });\n\n // TODO(burdon): Refactor.\n // TODO(burdon): Unsubscribe?\n connect(invitation);\n const code = InvitationEncoder.encode(invitation.get());\n new URL(window.origin).searchParams.set('spaceInvitationCode', code);\n const url = `${window.origin}?spaceInvitationCode=${code}`;\n void navigator.clipboard.writeText(url);\n };\n\n const handleCreateEpoch = async () => {\n await space.internal.createEpoch();\n handleUpdate();\n };\n\n return (\n <Container\n toolbar={\n <Toolbar.Root classNames='p-1'>\n <CustomInput\n icon='ph--flag--regular'\n autoComplete='off'\n placeholder='Count'\n value={mutationCount}\n onChange={({ target: { value } }) => setMutationCount(value)}\n />\n <CustomInput\n icon='ph--timer--regular'\n autoComplete='off'\n placeholder='Interval'\n value={mutationInterval}\n onChange={({ target: { value } }) => setMutationInterval(value)}\n />\n <CustomInput\n icon='ph--plus-minus--regular'\n autoComplete='off'\n placeholder='Jitter'\n value={mutationJitter}\n onChange={({ target: { value } }) => setMutationJitter(value)}\n />\n\n <IconButton\n icon={running ? 'ph--pause-circle--regular' : 'ph--play-circle--regular'}\n iconOnly\n label='Start/stop'\n size={5}\n onClick={handleToggleRunning}\n />\n <IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' size={5} onClick={handleUpdate} />\n <IconButton icon='ph--download-simple--regular' iconOnly label='Download' size={5} onClick={handleDownload} />\n\n <Toolbar.Separator variant='gap' />\n <IconButton\n icon='ph--flag-pennant--regular'\n iconOnly\n label='Create epoch'\n size={5}\n onClick={handleCreateEpoch}\n />\n <IconButton\n icon='ph--user-circle-plus--regular'\n iconOnly\n iconClassNames='text-blue-500'\n label='Create Invitation'\n size={5}\n onClick={handleCreateInvitation}\n />\n </Toolbar.Root>\n }\n >\n <ObjectCreator space={space} onAddObjects={onAddObjects} />\n </Container>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { type MutationsProviderParams, TestSchemaType, createSpaceObjectGenerator } from '@dxos/echo-generator';\nimport { type ReactiveEchoObject, type ReactiveObject, type Space } from '@dxos/react-client/echo';\nimport { IconButton, Toolbar } from '@dxos/react-ui';\nimport { createColumnBuilder, type TableColumnDef, Table } from '@dxos/react-ui-table/deprecated';\n\nconst BATCH_SIZE = 10;\n\nexport type CreateObjectsParams = {\n schema: string;\n enabled: boolean;\n objects: number;\n mutations: Pick<MutationsProviderParams, 'count' | 'mutationSize' | 'maxContentLength'>;\n};\n\nexport type ObjectCreatorProps = {\n space: Space;\n onAddObjects?: (objects: ReactiveObject<any>[]) => void;\n};\n\nexport const ObjectCreator = ({ space, onAddObjects }: ObjectCreatorProps) => {\n const generator = useMemo(() => createSpaceObjectGenerator(space), [space]);\n\n const [objects, setObjects] = useState<CreateObjectsParams[]>(\n Object.values(TestSchemaType).map((schema) => ({\n schema,\n enabled: true,\n objects: 10,\n mutations: {\n count: 10,\n mutationSize: 10,\n maxContentLength: 1000,\n },\n })),\n );\n\n const handleCreate = async () => {\n for (const params of objects) {\n if (!params.enabled) {\n continue;\n }\n\n let objectsCreated = 0;\n while (objectsCreated < params.objects) {\n const objects = (await generator.createObjects({\n [params.schema]: Math.min(BATCH_SIZE, params.objects - objectsCreated),\n })) as ReactiveEchoObject<any>[];\n\n await generator.mutateObjects(objects, params.mutations);\n objectsCreated += objects.length;\n onAddObjects?.(objects);\n }\n }\n\n await space.db.flush();\n };\n\n const handleUpdate = (row: CreateObjectsParams, key: string, value: any) => {\n const newObjects = [...objects];\n Object.assign(newObjects.find((object) => object.schema === row.schema)!, { [key]: value });\n setObjects(newObjects);\n };\n\n const { helper, builder } = createColumnBuilder<CreateObjectsParams>();\n const columns: TableColumnDef<CreateObjectsParams>[] = [\n helper.accessor('enabled', builder.switch({ label: 'Live', onUpdate: handleUpdate })),\n helper.accessor('schema', builder.string({ label: 'Schema', classNames: 'font-mono' })),\n helper.accessor('objects', builder.number({ label: 'Objects', onUpdate: handleUpdate })),\n helper.accessor((obj) => obj.mutations.count, {\n id: 'mutations',\n ...builder.number({ label: 'Mutations', onUpdate: handleUpdate }),\n }),\n helper.accessor((obj) => obj.mutations.mutationSize, {\n id: 'mutationSize',\n ...builder.number({ label: 'Mut. Size', onUpdate: handleUpdate }),\n }),\n helper.accessor((obj) => obj.mutations.maxContentLength, {\n id: 'mutationMaxContentLength',\n ...builder.number({ label: 'Length', onUpdate: handleUpdate }),\n }),\n ];\n\n return (\n <>\n <Table.Root>\n <Table.Viewport>\n <Table.Main<CreateObjectsParams> columns={columns} data={objects} />\n </Table.Viewport>\n </Table.Root>\n <Toolbar.Root classNames='p-1'>\n <IconButton icon='ph--plus--regular' label='Create' onClick={handleCreate} />\n </Toolbar.Root>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { DebugSpace } from './DebugSpace';\n\nexport default DebugSpace;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,OAAOA,UAAkBC,YAAYC,WAAAA,UAASC,YAAAA,iBAAgB;AAE9D,SAASC,8BAAAA,mCAAkC;AAE3C,SAASC,oBAAoB;AAC7B,SAASC,kBAAkB;AAC3B,SAASC,aAAa;AACtB,SAASC,iBAAiB;AAC1B,SAASC,QAAoBC,0BAA0B;AACvD,SAASC,yBAAyB;AAClC,SAASC,sBAAsB;AAC/B,SAASC,MAAMC,cAAAA,aAAYC,OAA4CC,WAAAA,UAASC,uBAAuB;AACvG,SAASC,oBAAoB;;;ACZ7B,OAAOC,SAASC,SAASC,gBAAgB;AAEzC,SAAuCC,gBAAgBC,kCAAkC;AAEzF,SAASC,YAAYC,eAAe;AACpC,SAASC,qBAA0CC,aAAa;AAEhE,IAAMC,aAAa;AAcZ,IAAMC,gBAAgB,CAAC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AY;MACZC,OAAOlE;MACPmE,UAAU,CAAC,EAAEC,QAAQ,EAAEF,MAAK,EAAE,MAAOjE,iBAAiBiE,KAAAA;QAExD,gBAAA1G,OAAA,cAACH,aAAAA;MACCC,MAAK;MACL0G,cAAa;MACbC,aAAY;MACZC,OAAO/D;MACPgE,UAAU,CAAC,EAAEC,QAAQ,EAAEF,MAAK,EAAE,MAAO9D,oBAAoB8D,KAAAA;QAE3D,gBAAA1G,OAAA,cAACH,aAAAA;MACCC,MAAK;MACL0G,cAAa;MACbC,aAAY;MACZC,OAAO7D;MACP8D,UAAU,CAAC,EAAEC,QAAQ,EAAEF,MAAK,EAAE,MAAO5D,kBAAkB4D,KAAAA;QAGzD,gBAAA1G,OAAA,cAAC6G,aAAAA;MACC/G,MAAMoD,UAAU,8BAA8B;MAC9C4D,UAAAA;MACAC,OAAM;MACNvG,MAAM;MACNwG,SAASzD;QAEX,gBAAAvD,OAAA,cAAC6G,aAAAA;MAAW/G,MAAK;MAA+BgH,UAAAA;MAASC,OAAM;MAAUvG,MAAM;MAAGwG,SAAS5F;QAC3F,gBAAApB,OAAA,cAAC6G,aAAAA;MAAW/G,MAAK;MAA+BgH,UAAAA;MAASC,OAAM;MAAWvG,MAAM;MAAGwG,SAASjF;QAE5F,gBAAA/B,OAAA,cAACuG,SAAQU,WAAS;MAACC,SAAQ;QAC3B,gBAAAlH,OAAA,cAAC6G,aAAAA;MACC/G,MAAK;MACLgH,UAAAA;MACAC,OAAM;MACNvG,MAAM;MACNwG,SAASd;QAEX,gBAAAlG,OAAA,cAAC6G,aAAAA;MACC/G,MAAK;MACLgH,UAAAA;MACAK,gBAAe;MACfJ,OAAM;MACNvG,MAAM;MACNwG,SAASrC;;KAKf,gBAAA3E,OAAA,cAACoH,eAAAA;IAAczG;IAAcC;;AAGnC;;;AEhLA,IAAA,qBAAeyG;",
|
|
6
|
-
"names": ["React", "useContext", "useMemo", "useState", "createSpaceObjectGenerator", "DocumentType", "Invitation", "faker", "useClient", "Filter", "useSpaceInvitation", "InvitationEncoder", "useAsyncEffect", "Icon", "IconButton", "Input", "Toolbar", "useFileDownload", "safeParseInt", "React", "useMemo", "useState", "TestSchemaType", "createSpaceObjectGenerator", "IconButton", "Toolbar", "createColumnBuilder", "Table", "BATCH_SIZE", "ObjectCreator", "space", "onAddObjects", "generator", "useMemo", "createSpaceObjectGenerator", "objects", "setObjects", "useState", "Object", "values", "TestSchemaType", "map", "schema", "enabled", "mutations", "count", "mutationSize", "maxContentLength", "handleCreate", "params", "objectsCreated", "createObjects", "Math", "min", "mutateObjects", "length", "db", "flush", "handleUpdate", "row", "key", "value", "newObjects", "assign", "find", "object", "helper", "builder", "createColumnBuilder", "columns", "accessor", "switch", "label", "onUpdate", "string", "classNames", "number", "obj", "id", "Table", "Root", "Viewport", "Main", "data", "Toolbar", "IconButton", "icon", "onClick", "DEFAULT_COUNT", "DEFAULT_PERIOD", "DEFAULT_JITTER", "useRefresh", "update", "setUpdate", "useState", "CustomInput", "icon", "props", "React", "div", "role", "className", "Input", "Root", "TextInput", "classNames", "size", "Icon", "DebugSpace", "space", "onAddObjects", "connect", "useSpaceInvitation", "key", "client", "useClient", "data", "setData", "handleUpdate", "useAsyncEffect", "isMounted", "diagnostics", "truncate", "spaces", "find", "toHex", "startsWith", "download", "useFileDownload", "handleDownload", "Blob", "JSON", "stringify", "undefined", "type", "Date", "toISOString", "replace", "mutationCount", "setMutationCount", "String", "mutationInterval", "setMutationInterval", "mutationJitter", "setMutationJitter", "generator", "useMemo", "createSpaceObjectGenerator", "running", "start", "stop", "useContext", "DebugContext", "handleToggleRunning", "objects", "db", "query", "Filter", "schema", "DocumentType", "run", "length", "object", "faker", "helpers", "arrayElement", "mutateObject", "count", "mutationSize", "maxContentLength", "safeParseInt", "interval", "jitter", "handleCreateInvitation", "invitation", "share", "Invitation", "Type", "INTERACTIVE", "authMethod", "AuthMethod", "NONE", "multiUse", "code", "InvitationEncoder", "encode", "get", "URL", "window", "origin", "searchParams", "set", "url", "navigator", "clipboard", "writeText", "handleCreateEpoch", "internal", "createEpoch", "Container", "toolbar", "Toolbar", "autoComplete", "placeholder", "value", "onChange", "target", "IconButton", "iconOnly", "label", "onClick", "Separator", "variant", "iconClassNames", "ObjectCreator", "DebugSpace"]
|
|
7
|
-
}
|