@dxos/plugin-debug 0.8.4-main.67995b8 → 0.8.4-main.69d29f4
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/DebugGraph-6VMEOKEV.mjs +15 -0
- package/dist/lib/browser/DebugGraph-6VMEOKEV.mjs.map +7 -0
- package/dist/lib/browser/DevtoolsOverviewContainer-77PKFLYV.mjs +19 -0
- package/dist/lib/browser/DevtoolsOverviewContainer-77PKFLYV.mjs.map +7 -0
- package/dist/lib/browser/{SpaceGenerator-6ZOCEREN.mjs → SpaceGenerator-H33AEFGC.mjs} +382 -211
- package/dist/lib/browser/SpaceGenerator-H33AEFGC.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-FBDRMMYF.mjs +597 -0
- package/dist/lib/browser/app-graph-builder-FBDRMMYF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-AJA6RYN3.mjs → chunk-4UFQXPP7.mjs} +12 -2
- package/dist/lib/browser/chunk-4UFQXPP7.mjs.map +7 -0
- package/dist/lib/browser/chunk-A5H5GRV6.mjs +20 -0
- package/dist/lib/browser/chunk-A5H5GRV6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +36 -41
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-context-FSWBT3MH.mjs +17 -0
- package/dist/lib/browser/react-context-FSWBT3MH.mjs.map +7 -0
- package/dist/lib/browser/react-surface-2N6CPSHR.mjs +757 -0
- package/dist/lib/browser/react-surface-2N6CPSHR.mjs.map +7 -0
- package/dist/lib/browser/settings-KA4GN73K.mjs +31 -0
- package/dist/lib/browser/settings-KA4GN73K.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +2 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +7 -0
- package/dist/types/src/capabilities/react-context/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context/react-context.d.ts +10 -0
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +3 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +5 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/components/DebugGraph.d.ts +9 -0
- package/dist/types/src/components/DebugGraph.d.ts.map +1 -0
- package/dist/types/src/components/DebugObjectPanel.d.ts +1 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings.d.ts +4 -2
- package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +5 -5
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +13 -4
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +4 -4
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/Wireframe.d.ts +2 -2
- package/dist/types/src/components/Wireframe.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +6 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +77 -69
- package/src/DebugPlugin.tsx +17 -33
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +419 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +4 -6
- package/src/capabilities/react-context/index.ts +7 -0
- package/src/capabilities/react-context/react-context.tsx +20 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +409 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +30 -0
- package/src/components/DebugGraph.tsx +15 -0
- package/src/components/DebugObjectPanel.tsx +6 -8
- package/src/components/DebugSettings.tsx +109 -75
- package/src/components/DebugStatus.tsx +2 -2
- package/src/components/DevtoolsOverviewContainer.tsx +1 -1
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +28 -35
- package/src/components/SpaceGenerator/SchemaTable.tsx +2 -2
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +17 -15
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +24 -19
- package/src/components/SpaceGenerator/draw-util.ts +5 -5
- package/src/components/SpaceGenerator/presets.ts +324 -42
- package/src/components/Wireframe.tsx +6 -6
- package/src/components/index.ts +4 -1
- package/src/meta.ts +8 -7
- package/src/translations.ts +3 -1
- package/src/types.ts +9 -1
- package/dist/lib/browser/DebugApp-ZDL4CPY5.mjs +0 -228
- package/dist/lib/browser/DebugApp-ZDL4CPY5.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs +0 -25
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-6ZOCEREN.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-SQXFD2BL.mjs +0 -597
- package/dist/lib/browser/app-graph-builder-SQXFD2BL.mjs.map +0 -7
- package/dist/lib/browser/chunk-5XPIRNQS.mjs +0 -18
- package/dist/lib/browser/chunk-5XPIRNQS.mjs.map +0 -7
- package/dist/lib/browser/chunk-AJA6RYN3.mjs.map +0 -7
- package/dist/lib/browser/react-context-NVAGLAJD.mjs +0 -16
- package/dist/lib/browser/react-context-NVAGLAJD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-CHHHE5CF.mjs +0 -768
- package/dist/lib/browser/react-surface-CHHHE5CF.mjs.map +0 -7
- package/dist/lib/browser/settings-LSSWLM5I.mjs +0 -22
- package/dist/lib/browser/settings-LSSWLM5I.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context.d.ts +0 -8
- package/dist/types/src/capabilities/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/components/DebugApp/DebugApp.d.ts +0 -6
- package/dist/types/src/components/DebugApp/DebugApp.d.ts.map +0 -1
- package/dist/types/src/components/DebugApp/Tree.d.ts +0 -18
- package/dist/types/src/components/DebugApp/Tree.d.ts.map +0 -1
- package/dist/types/src/components/DebugApp/index.d.ts +0 -3
- package/dist/types/src/components/DebugApp/index.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -457
- package/src/capabilities/react-context.tsx +0 -16
- package/src/capabilities/react-surface.tsx +0 -397
- package/src/capabilities/settings.ts +0 -19
- package/src/components/DebugApp/DebugApp.tsx +0 -84
- package/src/components/DebugApp/Tree.tsx +0 -103
- package/src/components/DebugApp/index.ts +0 -7
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
// src/components/SpaceGenerator/SpaceGenerator.tsx
|
|
2
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
3
2
|
import React2, { useCallback, useMemo, useState } from "react";
|
|
4
|
-
import {
|
|
3
|
+
import { useOperationInvoker } from "@dxos/app-framework/react";
|
|
5
4
|
import { ComputeGraph as ComputeGraph2 } from "@dxos/conductor";
|
|
6
|
-
import { Filter as
|
|
7
|
-
import { Markdown as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { Filter as Filter3, Obj as Obj2 } from "@dxos/echo";
|
|
6
|
+
import { Markdown as Markdown3 } from "@dxos/plugin-markdown/types";
|
|
7
|
+
import { Sheet as Sheet2 } from "@dxos/plugin-sheet/types";
|
|
8
|
+
import { Diagram as Diagram2 } from "@dxos/plugin-sketch/types";
|
|
10
9
|
import { useClient } from "@dxos/react-client";
|
|
11
|
-
import { getTypename } from "@dxos/react-client/echo";
|
|
12
10
|
import { IconButton as IconButton2, Input, Toolbar, useAsyncEffect } from "@dxos/react-ui";
|
|
13
11
|
import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
|
|
14
|
-
import {
|
|
12
|
+
import { Organization as Organization2, Person as Person2, Task } from "@dxos/types";
|
|
15
13
|
import { jsonKeyReplacer, sortKeys } from "@dxos/util";
|
|
16
14
|
|
|
17
15
|
// src/components/SpaceGenerator/ObjectGenerator.tsx
|
|
18
|
-
import { createIntent } from "@dxos/app-framework";
|
|
19
16
|
import { addressToA1Notation } from "@dxos/compute";
|
|
20
17
|
import { ComputeGraph, ComputeGraphModel, DEFAULT_OUTPUT, NODE_INPUT, NODE_OUTPUT } from "@dxos/conductor";
|
|
21
|
-
import { DXN, Filter, Key
|
|
18
|
+
import { DXN, Filter, Key } from "@dxos/echo";
|
|
22
19
|
import { Markdown } from "@dxos/plugin-markdown/types";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { SpaceAction } from "@dxos/plugin-space/types";
|
|
20
|
+
import { Sheet } from "@dxos/plugin-sheet/types";
|
|
21
|
+
import { Diagram } from "@dxos/plugin-sketch/types";
|
|
22
|
+
import { SpaceOperation } from "@dxos/plugin-space/types";
|
|
27
23
|
import { faker } from "@dxos/random";
|
|
28
|
-
import {
|
|
24
|
+
import { View, getTypenameFromQuery } from "@dxos/schema";
|
|
29
25
|
import { createAsyncGenerator } from "@dxos/schema/testing";
|
|
30
26
|
import { range } from "@dxos/util";
|
|
31
27
|
var generator = faker;
|
|
32
28
|
var findViewByTypename = async (views, typename) => {
|
|
33
|
-
return views.find((view) => view.query.
|
|
29
|
+
return views.find((view) => getTypenameFromQuery(view.query.ast) === typename);
|
|
34
30
|
};
|
|
35
|
-
var createGenerator = (client,
|
|
36
|
-
return async (space, n
|
|
31
|
+
var createGenerator = (client, invokePromise, schema) => {
|
|
32
|
+
return async (space, n) => {
|
|
37
33
|
const typename = schema.typename;
|
|
38
|
-
const
|
|
34
|
+
const views = await space.db.query(Filter.type(View.View)).run();
|
|
39
35
|
const view = await findViewByTypename(views, typename);
|
|
40
|
-
const staticSchema = client?.graph.schemaRegistry.
|
|
36
|
+
const staticSchema = client?.graph.schemaRegistry.query({
|
|
37
|
+
typename
|
|
38
|
+
}).runSync()[0];
|
|
41
39
|
if (!view && !staticSchema) {
|
|
42
|
-
await
|
|
43
|
-
space,
|
|
44
|
-
schema
|
|
45
|
-
|
|
40
|
+
await invokePromise(SpaceOperation.AddSchema, {
|
|
41
|
+
db: space.db,
|
|
42
|
+
schema,
|
|
43
|
+
show: false
|
|
44
|
+
});
|
|
46
45
|
} else if (!view && staticSchema) {
|
|
47
|
-
await
|
|
48
|
-
space,
|
|
49
|
-
typename
|
|
50
|
-
|
|
46
|
+
await invokePromise(SpaceOperation.UseStaticSchema, {
|
|
47
|
+
db: space.db,
|
|
48
|
+
typename,
|
|
49
|
+
show: false
|
|
50
|
+
});
|
|
51
51
|
}
|
|
52
52
|
const generate = createAsyncGenerator(generator, schema, {
|
|
53
53
|
db: space.db
|
|
@@ -60,7 +60,7 @@ var staticGenerators = /* @__PURE__ */ new Map([
|
|
|
60
60
|
Markdown.Document.typename,
|
|
61
61
|
async (space, n, cb) => {
|
|
62
62
|
const objects = range(n).map(() => {
|
|
63
|
-
return space.db.add(Markdown.
|
|
63
|
+
return space.db.add(Markdown.make({
|
|
64
64
|
name: faker.commerce.productName(),
|
|
65
65
|
content: faker.lorem.sentences(5)
|
|
66
66
|
}));
|
|
@@ -70,14 +70,11 @@ var staticGenerators = /* @__PURE__ */ new Map([
|
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
72
|
[
|
|
73
|
-
|
|
73
|
+
Diagram.Diagram.typename,
|
|
74
74
|
async (space, n, cb) => {
|
|
75
75
|
const objects = range(n).map(() => {
|
|
76
|
-
const obj = space.db.add(
|
|
77
|
-
name: faker.commerce.productName()
|
|
78
|
-
canvas: Ref.make(Obj.make(CanvasType, {
|
|
79
|
-
content: {}
|
|
80
|
-
}))
|
|
76
|
+
const obj = space.db.add(Diagram.make({
|
|
77
|
+
name: faker.commerce.productName()
|
|
81
78
|
}));
|
|
82
79
|
return obj;
|
|
83
80
|
});
|
|
@@ -87,7 +84,7 @@ var staticGenerators = /* @__PURE__ */ new Map([
|
|
|
87
84
|
],
|
|
88
85
|
// TODO(burdon): Create unit tests.
|
|
89
86
|
[
|
|
90
|
-
|
|
87
|
+
Sheet.Sheet.typename,
|
|
91
88
|
async (space, n, cb) => {
|
|
92
89
|
const objects = range(n).map(() => {
|
|
93
90
|
const cells = {};
|
|
@@ -123,7 +120,7 @@ var staticGenerators = /* @__PURE__ */ new Map([
|
|
|
123
120
|
}
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
|
-
return space.db.add(
|
|
123
|
+
return space.db.add(Sheet.make({
|
|
127
124
|
name: faker.commerce.productName(),
|
|
128
125
|
cells
|
|
129
126
|
}));
|
|
@@ -196,64 +193,211 @@ var staticGenerators = /* @__PURE__ */ new Map([
|
|
|
196
193
|
]
|
|
197
194
|
]);
|
|
198
195
|
|
|
199
|
-
// src/components/SpaceGenerator/SchemaTable.tsx
|
|
200
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
201
|
-
import React from "react";
|
|
202
|
-
import { IconButton } from "@dxos/react-ui";
|
|
203
|
-
var SchemaTable = ({ types, objects = {}, label, onClick }) => {
|
|
204
|
-
var _effect = _useSignals();
|
|
205
|
-
try {
|
|
206
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
207
|
-
className: "grid grid-cols-[1fr_80px_40px] gap-1 overflow-none"
|
|
208
|
-
}, /* @__PURE__ */ React.createElement("h2", {
|
|
209
|
-
className: "p-2"
|
|
210
|
-
}, label), types.map((type) => /* @__PURE__ */ React.createElement("div", {
|
|
211
|
-
key: type.typename,
|
|
212
|
-
className: "grid grid-cols-subgrid col-span-3 items-center"
|
|
213
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
214
|
-
className: "px-2 text-sm font-mono text-subdued"
|
|
215
|
-
}, type.typename), /* @__PURE__ */ React.createElement("div", {
|
|
216
|
-
className: "px-2 text-right font-mono"
|
|
217
|
-
}, objects[type.typename] ?? 0), /* @__PURE__ */ React.createElement(IconButton, {
|
|
218
|
-
variant: "ghost",
|
|
219
|
-
icon: "ph--plus--regular",
|
|
220
|
-
iconOnly: true,
|
|
221
|
-
label: "Create data",
|
|
222
|
-
onClick: () => onClick(type.typename)
|
|
223
|
-
}))));
|
|
224
|
-
} finally {
|
|
225
|
-
_effect.f();
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
|
|
229
196
|
// src/components/SpaceGenerator/presets.ts
|
|
230
|
-
import
|
|
197
|
+
import * as Schema from "effect/Schema";
|
|
198
|
+
import { Agent, EntityExtraction, ResearchBlueprint } from "@dxos/assistant-toolkit";
|
|
199
|
+
import { Prompt } from "@dxos/blueprints";
|
|
231
200
|
import { NODE_INPUT as NODE_INPUT2 } from "@dxos/conductor";
|
|
232
|
-
import { DXN as DXN2, Key as Key2, Obj
|
|
233
|
-
import {
|
|
201
|
+
import { DXN as DXN2, Filter as Filter2, Key as Key2, Obj, Query, Ref, Tag, Type } from "@dxos/echo";
|
|
202
|
+
import { Trigger, serializeFunction } from "@dxos/functions";
|
|
234
203
|
import { invariant } from "@dxos/invariant";
|
|
235
|
-
import {
|
|
204
|
+
import { gmail } from "@dxos/plugin-inbox";
|
|
205
|
+
import { Mailbox } from "@dxos/plugin-inbox/types";
|
|
206
|
+
import { Markdown as Markdown2 } from "@dxos/plugin-markdown/types";
|
|
207
|
+
import { createAppend, createChat, createComputeGraph, createConstant, createFunction, createGpt, createQueue, createRandom, createSurface, createTemplate, createText, createTrigger } from "@dxos/react-ui-canvas-compute";
|
|
236
208
|
import { CanvasBoardType, CanvasGraphModel, pointMultiply, pointsToRect, rectToPoints } from "@dxos/react-ui-canvas-editor";
|
|
237
|
-
import {
|
|
209
|
+
import { View as View2 } from "@dxos/schema";
|
|
210
|
+
import { Message, Organization, Person, Project } from "@dxos/types";
|
|
211
|
+
import { range as range2, trim } from "@dxos/util";
|
|
238
212
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-debug/src/components/SpaceGenerator/presets.ts";
|
|
239
|
-
var PresetName = /* @__PURE__ */ function(PresetName2) {
|
|
213
|
+
var PresetName = /* @__PURE__ */ (function(PresetName2) {
|
|
214
|
+
PresetName2["DXOS_TEAM"] = "dxos-team";
|
|
215
|
+
PresetName2["ORG_RESEARCH_PROJECT"] = "org-research-project";
|
|
240
216
|
PresetName2["GPT_QUEUE"] = "webhook-gpt-queue";
|
|
241
217
|
PresetName2["CHAT_GPT"] = "chat-gpt-text";
|
|
242
218
|
PresetName2["OBJECT_CHANGE_QUEUE"] = "objectChange-queue";
|
|
243
|
-
PresetName2["FOREX_FUNCTION_CALL"] = "forex-function-call";
|
|
244
219
|
PresetName2["TIMER_TICK_QUEUE"] = "timerTick-queue";
|
|
220
|
+
PresetName2["FOREX_FUNCTION_CALL"] = "forex-function-call";
|
|
245
221
|
PresetName2["DISCORD_MESSAGES"] = "discord-messages";
|
|
246
222
|
return PresetName2;
|
|
247
|
-
}({});
|
|
223
|
+
})({});
|
|
248
224
|
var generator2 = () => ({
|
|
249
225
|
schemas: [
|
|
250
226
|
CanvasBoardType,
|
|
251
|
-
|
|
227
|
+
Trigger.Trigger
|
|
252
228
|
],
|
|
253
229
|
types: Object.values(PresetName).map((name) => ({
|
|
254
230
|
typename: name
|
|
255
231
|
})),
|
|
256
232
|
items: [
|
|
233
|
+
[
|
|
234
|
+
"dxos-team",
|
|
235
|
+
async (space, n, cb) => {
|
|
236
|
+
const objects = range2(n, () => {
|
|
237
|
+
const org = space.db.add(Obj.make(Organization.Organization, {
|
|
238
|
+
name: "DXOS",
|
|
239
|
+
website: "https://dxos.org"
|
|
240
|
+
}));
|
|
241
|
+
const doc = space.db.add(Markdown2.make({
|
|
242
|
+
name: "DXOS Research",
|
|
243
|
+
content: "DXOS builds Composer, an open-source AI-powered malleable application."
|
|
244
|
+
}));
|
|
245
|
+
const tag = space.db.add(Tag.make({
|
|
246
|
+
label: "Investor"
|
|
247
|
+
}));
|
|
248
|
+
const tagDxn = Obj.getDXN(tag).toString();
|
|
249
|
+
Obj.change(doc, (d) => {
|
|
250
|
+
Obj.getMeta(d).tags = [
|
|
251
|
+
tagDxn
|
|
252
|
+
];
|
|
253
|
+
});
|
|
254
|
+
space.db.add(Obj.make(Person.Person, {
|
|
255
|
+
fullName: "Rich",
|
|
256
|
+
organization: Ref.make(org)
|
|
257
|
+
}, {
|
|
258
|
+
tags: [
|
|
259
|
+
tagDxn
|
|
260
|
+
]
|
|
261
|
+
}));
|
|
262
|
+
space.db.add(Obj.make(Person.Person, {
|
|
263
|
+
fullName: "Josiah",
|
|
264
|
+
organization: Ref.make(org)
|
|
265
|
+
}));
|
|
266
|
+
space.db.add(Obj.make(Person.Person, {
|
|
267
|
+
fullName: "Dima",
|
|
268
|
+
organization: Ref.make(org)
|
|
269
|
+
}));
|
|
270
|
+
space.db.add(Obj.make(Person.Person, {
|
|
271
|
+
fullName: "Mykola",
|
|
272
|
+
organization: Ref.make(org)
|
|
273
|
+
}));
|
|
274
|
+
return doc;
|
|
275
|
+
});
|
|
276
|
+
cb?.(objects);
|
|
277
|
+
return objects;
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
[
|
|
281
|
+
"org-research-project",
|
|
282
|
+
async (space, n, cb) => {
|
|
283
|
+
const mailbox = await space.db.query(Filter2.type(Mailbox.Mailbox)).first();
|
|
284
|
+
const tag = await space.db.query(Filter2.type(Tag.Tag, {
|
|
285
|
+
label: "Investor"
|
|
286
|
+
})).first();
|
|
287
|
+
const tagDxn = Obj.getDXN(tag).toString();
|
|
288
|
+
const objects = range2(n, () => {
|
|
289
|
+
const contactsQuery = Query.select(Filter2.type(Person.Person)).select(Filter2.tag(tagDxn));
|
|
290
|
+
const organizationsQuery = Query.select(Filter2.type(Organization.Organization)).select(Filter2.tag(tagDxn));
|
|
291
|
+
const notesQuery = Query.select(Filter2.type(Markdown2.Document)).select(Filter2.tag(tagDxn));
|
|
292
|
+
space.db.add(Trigger.make({
|
|
293
|
+
enabled: true,
|
|
294
|
+
spec: {
|
|
295
|
+
kind: "timer",
|
|
296
|
+
cron: "* * * * *"
|
|
297
|
+
},
|
|
298
|
+
function: Ref.make(serializeFunction(gmail.sync)),
|
|
299
|
+
input: {
|
|
300
|
+
mailboxId: Obj.getDXN(mailbox).toString()
|
|
301
|
+
}
|
|
302
|
+
}));
|
|
303
|
+
space.db.add(Trigger.make({
|
|
304
|
+
enabled: true,
|
|
305
|
+
// TODO(wittjosiah): Queue trigger doesn't support matching query of the column.
|
|
306
|
+
spec: {
|
|
307
|
+
kind: "queue",
|
|
308
|
+
queue: mailbox.queue.dxn.toString()
|
|
309
|
+
},
|
|
310
|
+
function: Ref.make(serializeFunction(EntityExtraction.extract)),
|
|
311
|
+
input: {
|
|
312
|
+
source: "{{event.item}}"
|
|
313
|
+
}
|
|
314
|
+
}));
|
|
315
|
+
const researchPrompt = space.db.add(Prompt.make({
|
|
316
|
+
name: "Research",
|
|
317
|
+
description: "Research organization",
|
|
318
|
+
input: Schema.Struct({
|
|
319
|
+
org: Schema.Any
|
|
320
|
+
}),
|
|
321
|
+
output: Schema.Any,
|
|
322
|
+
// TODO(dmaretskyi): This mocks research (returns pre-baked result), the actual research might take compute minutes.
|
|
323
|
+
// Remove the mock prompt to do the actual research.
|
|
324
|
+
instructions: trim`
|
|
325
|
+
Research the organization provided as input.
|
|
326
|
+
Create a research note for it at the end.
|
|
327
|
+
NOTE: Do mocked reseach (set mockSearch to true).
|
|
328
|
+
`,
|
|
329
|
+
blueprints: [
|
|
330
|
+
Ref.make(ResearchBlueprint)
|
|
331
|
+
]
|
|
332
|
+
}));
|
|
333
|
+
space.db.add(Trigger.make({
|
|
334
|
+
enabled: true,
|
|
335
|
+
spec: {
|
|
336
|
+
kind: "subscription",
|
|
337
|
+
query: {
|
|
338
|
+
ast: organizationsQuery.ast
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
function: Ref.make(serializeFunction(Agent.prompt)),
|
|
342
|
+
input: {
|
|
343
|
+
prompt: Ref.make(researchPrompt),
|
|
344
|
+
input: "{{event.subject}}"
|
|
345
|
+
}
|
|
346
|
+
}));
|
|
347
|
+
const mailboxView = View2.make({
|
|
348
|
+
query: Query.select(Filter2.type(Message.Message, {
|
|
349
|
+
properties: {
|
|
350
|
+
labels: Filter2.contains("investor")
|
|
351
|
+
}
|
|
352
|
+
})).options({
|
|
353
|
+
queues: [
|
|
354
|
+
mailbox.queue.dxn.toString()
|
|
355
|
+
]
|
|
356
|
+
}),
|
|
357
|
+
jsonSchema: Type.toJsonSchema(Message.Message)
|
|
358
|
+
});
|
|
359
|
+
const contactsView = View2.make({
|
|
360
|
+
query: contactsQuery,
|
|
361
|
+
jsonSchema: Type.toJsonSchema(Person.Person)
|
|
362
|
+
});
|
|
363
|
+
const organizationsView = View2.make({
|
|
364
|
+
query: organizationsQuery,
|
|
365
|
+
jsonSchema: Type.toJsonSchema(Organization.Organization)
|
|
366
|
+
});
|
|
367
|
+
const notesView = View2.make({
|
|
368
|
+
query: notesQuery,
|
|
369
|
+
jsonSchema: Type.toJsonSchema(Markdown2.Document)
|
|
370
|
+
});
|
|
371
|
+
return space.db.add(Project.make({
|
|
372
|
+
name: "Investor Research",
|
|
373
|
+
columns: [
|
|
374
|
+
{
|
|
375
|
+
name: "Mailbox",
|
|
376
|
+
view: Ref.make(mailboxView),
|
|
377
|
+
order: []
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: "Contacts",
|
|
381
|
+
view: Ref.make(contactsView),
|
|
382
|
+
order: []
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: "Organizations",
|
|
386
|
+
view: Ref.make(organizationsView),
|
|
387
|
+
order: []
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: "Notes",
|
|
391
|
+
view: Ref.make(notesView),
|
|
392
|
+
order: []
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
}));
|
|
396
|
+
});
|
|
397
|
+
cb?.(objects.flat());
|
|
398
|
+
return objects.flat();
|
|
399
|
+
}
|
|
400
|
+
],
|
|
257
401
|
[
|
|
258
402
|
"webhook-gpt-queue",
|
|
259
403
|
async (space, n, cb) => {
|
|
@@ -267,7 +411,7 @@ var generator2 = () => ({
|
|
|
267
411
|
})));
|
|
268
412
|
const triggerShape = createTrigger({
|
|
269
413
|
spaceId: space.id,
|
|
270
|
-
triggerKind:
|
|
414
|
+
triggerKind: "webhook",
|
|
271
415
|
...position({
|
|
272
416
|
x: -18,
|
|
273
417
|
y: -2
|
|
@@ -318,8 +462,8 @@ var generator2 = () => ({
|
|
|
318
462
|
"objectChange-queue",
|
|
319
463
|
async (space, n, cb) => {
|
|
320
464
|
const objects = range2(n, () => {
|
|
321
|
-
const { canvasModel, computeModel } = createQueueSinkPreset(space,
|
|
322
|
-
|
|
465
|
+
const { canvasModel, computeModel } = createQueueSinkPreset(space, "subscription", (triggerSpec) => triggerSpec.query = {
|
|
466
|
+
ast: Query.select(Filter2.typename("dxos.org/type/Chess")).ast
|
|
323
467
|
}, "type");
|
|
324
468
|
return addToSpace("objectChange-queue", space, canvasModel, computeModel);
|
|
325
469
|
});
|
|
@@ -331,7 +475,7 @@ var generator2 = () => ({
|
|
|
331
475
|
"timerTick-queue",
|
|
332
476
|
async (space, n, cb) => {
|
|
333
477
|
const objects = range2(n, () => {
|
|
334
|
-
const { canvasModel, computeModel } = createQueueSinkPreset(space,
|
|
478
|
+
const { canvasModel, computeModel } = createQueueSinkPreset(space, "timer", (triggerSpec) => triggerSpec.cron = "*/5 * * * * *", "result");
|
|
335
479
|
return addToSpace("timerTick-queue", space, canvasModel, computeModel);
|
|
336
480
|
});
|
|
337
481
|
cb?.(objects);
|
|
@@ -358,7 +502,7 @@ var generator2 = () => ({
|
|
|
358
502
|
// canvasModel.builder.call((builder) => {
|
|
359
503
|
// const triggerShape = createTrigger({
|
|
360
504
|
// spaceId: space.id,
|
|
361
|
-
// triggerKind:
|
|
505
|
+
// triggerKind: 'email',
|
|
362
506
|
// ...position({ x: -18, y: -2 }),
|
|
363
507
|
// });
|
|
364
508
|
// const trigger = canvasModel.createNode(triggerShape);
|
|
@@ -473,7 +617,7 @@ var generator2 = () => ({
|
|
|
473
617
|
// );
|
|
474
618
|
// const triggerShape = createTrigger({
|
|
475
619
|
// spaceId: space.id,
|
|
476
|
-
// triggerKind:
|
|
620
|
+
// triggerKind: 'email',
|
|
477
621
|
// ...rawPosition({ centerX: -736, centerY: -384, width: 182, height: 192 }),
|
|
478
622
|
// });
|
|
479
623
|
// const trigger = canvasModel.createNode(triggerShape);
|
|
@@ -582,7 +726,7 @@ var generator2 = () => ({
|
|
|
582
726
|
canvasModel.builder.call((builder) => {
|
|
583
727
|
const triggerShape = createTrigger({
|
|
584
728
|
spaceId: space.id,
|
|
585
|
-
triggerKind:
|
|
729
|
+
triggerKind: "timer",
|
|
586
730
|
...position({
|
|
587
731
|
x: -10,
|
|
588
732
|
y: -5
|
|
@@ -718,20 +862,22 @@ var createQueueSinkPreset = (space, triggerKind, initSpec, triggerOutputName) =>
|
|
|
718
862
|
const triggerSpec = functionTrigger.spec;
|
|
719
863
|
invariant(triggerSpec && triggerSpec.kind === triggerKind, "No trigger spec.", {
|
|
720
864
|
F: __dxlog_file,
|
|
721
|
-
L:
|
|
865
|
+
L: 762,
|
|
722
866
|
S: void 0,
|
|
723
867
|
A: [
|
|
724
868
|
"triggerSpec && triggerSpec.kind === triggerKind",
|
|
725
869
|
"'No trigger spec.'"
|
|
726
870
|
]
|
|
727
871
|
});
|
|
728
|
-
|
|
872
|
+
Obj.change(functionTrigger, (ft) => {
|
|
873
|
+
initSpec(ft.spec);
|
|
874
|
+
});
|
|
729
875
|
});
|
|
730
876
|
const computeModel = createComputeGraph(canvasModel);
|
|
731
877
|
const templateComputeNode = computeModel.nodes.find((n) => n.id === template.node);
|
|
732
878
|
invariant(templateComputeNode, "Template compute node was not created.", {
|
|
733
879
|
F: __dxlog_file,
|
|
734
|
-
L:
|
|
880
|
+
L: 771,
|
|
735
881
|
S: void 0,
|
|
736
882
|
A: [
|
|
737
883
|
"templateComputeNode",
|
|
@@ -744,7 +890,7 @@ var createQueueSinkPreset = (space, triggerKind, initSpec, triggerOutputName) =>
|
|
|
744
890
|
' "id": "@{{changeId}}"',
|
|
745
891
|
"}"
|
|
746
892
|
].join("\n");
|
|
747
|
-
templateComputeNode.inputSchema =
|
|
893
|
+
templateComputeNode.inputSchema = Type.toJsonSchema(Schema.Struct({
|
|
748
894
|
type: Schema.String,
|
|
749
895
|
changeId: Schema.String
|
|
750
896
|
}));
|
|
@@ -755,9 +901,9 @@ var createQueueSinkPreset = (space, triggerKind, initSpec, triggerOutputName) =>
|
|
|
755
901
|
};
|
|
756
902
|
};
|
|
757
903
|
var addToSpace = (name, space, canvas, compute) => {
|
|
758
|
-
return space.db.add(
|
|
904
|
+
return space.db.add(Obj.make(CanvasBoardType, {
|
|
759
905
|
name,
|
|
760
|
-
computeGraph:
|
|
906
|
+
computeGraph: Ref.make(compute.root),
|
|
761
907
|
layout: canvas.graph
|
|
762
908
|
}));
|
|
763
909
|
};
|
|
@@ -793,16 +939,18 @@ var setupQueue = (space, canvasModel, args) => {
|
|
|
793
939
|
var attachTrigger = (functionTrigger, computeModel) => {
|
|
794
940
|
invariant(functionTrigger, void 0, {
|
|
795
941
|
F: __dxlog_file,
|
|
796
|
-
L:
|
|
942
|
+
L: 811,
|
|
797
943
|
S: void 0,
|
|
798
944
|
A: [
|
|
799
945
|
"functionTrigger",
|
|
800
946
|
""
|
|
801
947
|
]
|
|
802
948
|
});
|
|
803
|
-
functionTrigger.function = Ref2.make(computeModel.root);
|
|
804
949
|
const inputNode = computeModel.nodes.find((node) => node.type === NODE_INPUT2);
|
|
805
|
-
functionTrigger
|
|
950
|
+
Obj.change(functionTrigger, (t) => {
|
|
951
|
+
t.function = Ref.make(computeModel.root);
|
|
952
|
+
t.inputNodeId = inputNode.id;
|
|
953
|
+
});
|
|
806
954
|
};
|
|
807
955
|
var rawPosition = (args) => {
|
|
808
956
|
return {
|
|
@@ -848,129 +996,152 @@ var position = (rect) => {
|
|
|
848
996
|
}
|
|
849
997
|
};
|
|
850
998
|
|
|
999
|
+
// src/components/SpaceGenerator/SchemaTable.tsx
|
|
1000
|
+
import React from "react";
|
|
1001
|
+
import { IconButton } from "@dxos/react-ui";
|
|
1002
|
+
var SchemaTable = ({ types, objects = {}, label, onClick }) => {
|
|
1003
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
1004
|
+
className: "grid grid-cols-[1fr_80px_40px] gap-1 overflow-none"
|
|
1005
|
+
}, /* @__PURE__ */ React.createElement("h2", {
|
|
1006
|
+
className: "p-2"
|
|
1007
|
+
}, label), types.map((type) => /* @__PURE__ */ React.createElement("div", {
|
|
1008
|
+
key: type.typename,
|
|
1009
|
+
className: "grid grid-cols-subgrid col-span-3 items-center"
|
|
1010
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
1011
|
+
className: "pli-2 text-sm font-mono text-subdued"
|
|
1012
|
+
}, type.typename), /* @__PURE__ */ React.createElement("div", {
|
|
1013
|
+
className: "pli-2 text-right font-mono"
|
|
1014
|
+
}, objects[type.typename] ?? 0), /* @__PURE__ */ React.createElement(IconButton, {
|
|
1015
|
+
variant: "ghost",
|
|
1016
|
+
icon: "ph--plus--regular",
|
|
1017
|
+
iconOnly: true,
|
|
1018
|
+
label: "Create data",
|
|
1019
|
+
onClick: () => onClick(type.typename)
|
|
1020
|
+
}))));
|
|
1021
|
+
};
|
|
1022
|
+
|
|
851
1023
|
// src/components/SpaceGenerator/SpaceGenerator.tsx
|
|
852
1024
|
var SpaceGenerator = ({ space, onCreateObjects }) => {
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
...staticTypes,
|
|
875
|
-
...recordTypes,
|
|
876
|
-
...presets.schemas
|
|
877
|
-
]);
|
|
878
|
-
const recordGenerators = new Map(recordTypes.map((type) => [
|
|
879
|
-
type.typename,
|
|
880
|
-
createGenerator(client, dispatch, type)
|
|
881
|
-
]));
|
|
882
|
-
return new Map([
|
|
883
|
-
...staticGenerators,
|
|
884
|
-
...presets.items,
|
|
885
|
-
...recordGenerators
|
|
886
|
-
]);
|
|
887
|
-
}, [
|
|
888
|
-
client,
|
|
889
|
-
recordTypes
|
|
1025
|
+
const { invokePromise } = useOperationInvoker();
|
|
1026
|
+
const client = useClient();
|
|
1027
|
+
const staticTypes = [
|
|
1028
|
+
Markdown3.Document,
|
|
1029
|
+
Diagram2.Diagram,
|
|
1030
|
+
Sheet2.Sheet,
|
|
1031
|
+
ComputeGraph2
|
|
1032
|
+
];
|
|
1033
|
+
const recordTypes = [
|
|
1034
|
+
Organization2.Organization,
|
|
1035
|
+
Person2.Person,
|
|
1036
|
+
Task.Task
|
|
1037
|
+
];
|
|
1038
|
+
const [count, setCount] = useState(1);
|
|
1039
|
+
const [info, setInfo] = useState({});
|
|
1040
|
+
const presets = useMemo(() => generator2(), []);
|
|
1041
|
+
useAsyncEffect(async () => {
|
|
1042
|
+
await client.addTypes([
|
|
1043
|
+
...staticTypes,
|
|
1044
|
+
...recordTypes,
|
|
1045
|
+
...presets.schemas
|
|
890
1046
|
]);
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
setInfo({
|
|
904
|
-
schema: {
|
|
905
|
-
static: staticSchema.length,
|
|
906
|
-
mutable: echoSchema.length
|
|
907
|
-
},
|
|
908
|
-
objects: objectMap
|
|
909
|
-
});
|
|
910
|
-
};
|
|
911
|
-
useAsyncEffect(updateInfo, [
|
|
912
|
-
space
|
|
1047
|
+
}, [
|
|
1048
|
+
client
|
|
1049
|
+
]);
|
|
1050
|
+
const typeMap = useMemo(() => {
|
|
1051
|
+
const recordGenerators = new Map(recordTypes.map((type) => [
|
|
1052
|
+
type.typename,
|
|
1053
|
+
createGenerator(client, invokePromise, type)
|
|
1054
|
+
]));
|
|
1055
|
+
return new Map([
|
|
1056
|
+
...staticGenerators,
|
|
1057
|
+
...presets.items,
|
|
1058
|
+
...recordGenerators
|
|
913
1059
|
]);
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
1060
|
+
}, [
|
|
1061
|
+
client,
|
|
1062
|
+
recordTypes,
|
|
1063
|
+
invokePromise
|
|
1064
|
+
]);
|
|
1065
|
+
const updateInfo = async () => {
|
|
1066
|
+
const echoSchema = await space.db.schemaRegistry.query().run();
|
|
1067
|
+
const staticSchema = await space.db.graph.schemaRegistry.query().run();
|
|
1068
|
+
const objects = await space.db.query(Filter3.everything()).run();
|
|
1069
|
+
const objectMap = sortKeys(objects.reduce((map, obj) => {
|
|
1070
|
+
const type = Obj2.getTypename(obj);
|
|
1071
|
+
if (type) {
|
|
1072
|
+
const count2 = map[type] ?? 0;
|
|
1073
|
+
map[type] = count2 + 1;
|
|
919
1074
|
}
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
|
|
1075
|
+
return map;
|
|
1076
|
+
}, {}));
|
|
1077
|
+
setInfo({
|
|
1078
|
+
schema: {
|
|
1079
|
+
static: staticSchema.length,
|
|
1080
|
+
mutable: echoSchema.length
|
|
1081
|
+
},
|
|
1082
|
+
objects: objectMap
|
|
1083
|
+
});
|
|
1084
|
+
};
|
|
1085
|
+
useAsyncEffect(updateInfo, [
|
|
1086
|
+
space
|
|
1087
|
+
]);
|
|
1088
|
+
const handleCreateData = useCallback(async (typename) => {
|
|
1089
|
+
const constructor = typeMap.get(typename);
|
|
1090
|
+
if (constructor) {
|
|
1091
|
+
await constructor(space, count, onCreateObjects);
|
|
1092
|
+
await updateInfo();
|
|
1093
|
+
}
|
|
1094
|
+
}, [
|
|
1095
|
+
typeMap,
|
|
1096
|
+
count
|
|
1097
|
+
]);
|
|
1098
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
1099
|
+
role: "none",
|
|
1100
|
+
className: "flex flex-col grow overflow-hidden"
|
|
1101
|
+
}, /* @__PURE__ */ React2.createElement(Toolbar.Root, {
|
|
1102
|
+
classNames: "border-be border-subduedSeparator"
|
|
1103
|
+
}, /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
1104
|
+
icon: "ph--arrow-clockwise--regular",
|
|
1105
|
+
iconOnly: true,
|
|
1106
|
+
label: "Refresh",
|
|
1107
|
+
onClick: updateInfo
|
|
1108
|
+
}), /* @__PURE__ */ React2.createElement(Toolbar.Separator, {
|
|
1109
|
+
variant: "gap"
|
|
1110
|
+
}), /* @__PURE__ */ React2.createElement(Input.Root, null, /* @__PURE__ */ React2.createElement(Input.TextInput, {
|
|
1111
|
+
type: "number",
|
|
1112
|
+
min: 1,
|
|
1113
|
+
max: 100,
|
|
1114
|
+
placeholder: "Count",
|
|
1115
|
+
classNames: "!w-[4rem] !text-right",
|
|
1116
|
+
size: 8,
|
|
1117
|
+
value: count,
|
|
1118
|
+
onChange: (ev) => setCount(parseInt(ev.target.value))
|
|
1119
|
+
}))), /* @__PURE__ */ React2.createElement("div", {
|
|
1120
|
+
className: "flex flex-col overflow-y-auto divide-y divide-separator"
|
|
1121
|
+
}, /* @__PURE__ */ React2.createElement(SchemaTable, {
|
|
1122
|
+
types: staticTypes,
|
|
1123
|
+
objects: info.objects,
|
|
1124
|
+
label: "Static Types",
|
|
1125
|
+
onClick: handleCreateData
|
|
1126
|
+
}), /* @__PURE__ */ React2.createElement(SchemaTable, {
|
|
1127
|
+
types: recordTypes,
|
|
1128
|
+
objects: info.objects,
|
|
1129
|
+
label: "Record Types",
|
|
1130
|
+
onClick: handleCreateData
|
|
1131
|
+
}), /* @__PURE__ */ React2.createElement(SchemaTable, {
|
|
1132
|
+
types: presets.types,
|
|
1133
|
+
objects: info.objects,
|
|
1134
|
+
label: "Presets",
|
|
1135
|
+
onClick: handleCreateData
|
|
1136
|
+
}), /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(SyntaxHighlighter, {
|
|
1137
|
+
language: "json",
|
|
1138
|
+
classNames: "text-xs"
|
|
1139
|
+
}, JSON.stringify({
|
|
1140
|
+
space,
|
|
1141
|
+
...info
|
|
1142
|
+
}, jsonKeyReplacer({
|
|
1143
|
+
truncate: true
|
|
1144
|
+
}), 2)))));
|
|
974
1145
|
};
|
|
975
1146
|
|
|
976
1147
|
// src/components/SpaceGenerator/index.ts
|
|
@@ -978,4 +1149,4 @@ var SpaceGenerator_default = SpaceGenerator;
|
|
|
978
1149
|
export {
|
|
979
1150
|
SpaceGenerator_default as default
|
|
980
1151
|
};
|
|
981
|
-
//# sourceMappingURL=SpaceGenerator-
|
|
1152
|
+
//# sourceMappingURL=SpaceGenerator-H33AEFGC.mjs.map
|