@dxos/plugin-debug 0.8.2-main.fbd8ed0 → 0.8.2-staging.4d6ad0f
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-WSEJPCKY.mjs +225 -0
- package/dist/lib/browser/{DebugApp-7PFYN52J.mjs.map → DebugApp-WSEJPCKY.mjs.map} +1 -1
- package/dist/lib/browser/DevtoolsOverviewContainer-IIIWO77Q.mjs +25 -0
- package/dist/lib/browser/{DevtoolsOverviewContainer-HYNZTH2Z.mjs.map → DevtoolsOverviewContainer-IIIWO77Q.mjs.map} +1 -1
- package/dist/lib/browser/{SpaceGenerator-CGRY2M6A.mjs → SpaceGenerator-RHQLPN44.mjs} +216 -205
- package/dist/lib/browser/SpaceGenerator-RHQLPN44.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-SSTQU7MF.mjs → app-graph-builder-PIPBIN6P.mjs} +3 -3
- package/dist/lib/browser/{chunk-RORUXVAC.mjs → chunk-47JOZTT2.mjs} +1 -4
- package/dist/lib/browser/{chunk-RORUXVAC.mjs.map → chunk-47JOZTT2.mjs.map} +3 -3
- package/dist/lib/browser/chunk-KS3YBEL7.mjs +68 -0
- package/dist/lib/browser/{chunk-ZJTKMYOG.mjs.map → chunk-KS3YBEL7.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +5 -5
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-context-ZRLN5KUI.mjs → react-context-ZQRD2WG2.mjs} +2 -2
- package/dist/lib/browser/{react-surface-BQSJLXPZ.mjs → react-surface-PHUWS5WD.mjs} +292 -253
- package/dist/lib/browser/{react-surface-BQSJLXPZ.mjs.map → react-surface-PHUWS5WD.mjs.map} +1 -1
- package/dist/lib/browser/{settings-6SG54GZO.mjs → settings-N4Q6YB7L.mjs} +3 -3
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/package.json +54 -55
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +0 -1
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +5 -5
- package/src/meta.ts +0 -1
- package/dist/lib/browser/DebugApp-7PFYN52J.mjs +0 -182
- package/dist/lib/browser/DevtoolsOverviewContainer-HYNZTH2Z.mjs +0 -19
- package/dist/lib/browser/SpaceGenerator-CGRY2M6A.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZJTKMYOG.mjs +0 -74
- /package/dist/lib/browser/{app-graph-builder-SSTQU7MF.mjs.map → app-graph-builder-PIPBIN6P.mjs.map} +0 -0
- /package/dist/lib/browser/{react-context-ZRLN5KUI.mjs.map → react-context-ZQRD2WG2.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-6SG54GZO.mjs.map → settings-N4Q6YB7L.mjs.map} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// packages/plugins/plugin-debug/src/components/SpaceGenerator/SpaceGenerator.tsx
|
|
2
|
+
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
2
3
|
import React2, { useCallback, useMemo, useState } from "react";
|
|
3
4
|
import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
4
5
|
import { ComputeGraph as ComputeGraph2 } from "@dxos/conductor";
|
|
5
|
-
import { toEffectSchema } from "@dxos/echo-schema";
|
|
6
|
+
import { Filter as Filter3, toEffectSchema } from "@dxos/echo-schema";
|
|
6
7
|
import { live as live3 } from "@dxos/live-object";
|
|
7
8
|
import { log } from "@dxos/log";
|
|
8
9
|
import { DocumentType as DocumentType2 } from "@dxos/plugin-markdown/types";
|
|
@@ -14,7 +15,7 @@ import { getTypename } from "@dxos/react-client/echo";
|
|
|
14
15
|
import { IconButton as IconButton2, Input, Toolbar, useAsyncEffect } from "@dxos/react-ui";
|
|
15
16
|
import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
|
|
16
17
|
import { initializeTable, TableType as TableType3 } from "@dxos/react-ui-table";
|
|
17
|
-
import {
|
|
18
|
+
import { DataType as DataType2 } from "@dxos/schema";
|
|
18
19
|
import { jsonKeyReplacer, sortKeys } from "@dxos/util";
|
|
19
20
|
|
|
20
21
|
// packages/plugins/plugin-debug/src/components/SpaceGenerator/ObjectGenerator.tsx
|
|
@@ -43,8 +44,7 @@ var staticGenerators = /* @__PURE__ */ new Map([
|
|
|
43
44
|
name: faker.commerce.productName(),
|
|
44
45
|
content: makeRef(live(DataType.Text, {
|
|
45
46
|
content: faker.lorem.sentences(5)
|
|
46
|
-
}))
|
|
47
|
-
threads: []
|
|
47
|
+
}))
|
|
48
48
|
}));
|
|
49
49
|
});
|
|
50
50
|
cb?.(objects);
|
|
@@ -210,31 +210,37 @@ var createGenerator = (type) => {
|
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
// packages/plugins/plugin-debug/src/components/SpaceGenerator/SchemaTable.tsx
|
|
213
|
+
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
213
214
|
import React from "react";
|
|
214
215
|
import { IconButton } from "@dxos/react-ui";
|
|
215
216
|
var SchemaTable = ({ types, objects = {}, label, onClick }) => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
217
|
+
var _effect = _useSignals();
|
|
218
|
+
try {
|
|
219
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
220
|
+
className: "grid grid-cols-[1fr_80px_40px] gap-1 overflow-none"
|
|
221
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
222
|
+
className: "grid grid-cols-subgrid col-span-3"
|
|
223
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
224
|
+
className: "px-2 text-sm text-primary-500"
|
|
225
|
+
}, label), /* @__PURE__ */ React.createElement("div", {
|
|
226
|
+
className: "px-2 text-xs text-subdued text-right"
|
|
227
|
+
}, "count")), types.map((type) => /* @__PURE__ */ React.createElement("div", {
|
|
228
|
+
key: type.typename,
|
|
229
|
+
className: "grid grid-cols-subgrid col-span-3 items-center"
|
|
230
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
231
|
+
className: "px-2 text-sm font-mono text-green-500"
|
|
232
|
+
}, type.typename), /* @__PURE__ */ React.createElement("div", {
|
|
233
|
+
className: "px-2 text-right font-mono"
|
|
234
|
+
}, objects[type.typename] ?? 0), /* @__PURE__ */ React.createElement(IconButton, {
|
|
235
|
+
variant: "ghost",
|
|
236
|
+
icon: "ph--plus--regular",
|
|
237
|
+
iconOnly: true,
|
|
238
|
+
label: "Create data",
|
|
239
|
+
onClick: () => onClick(type.typename)
|
|
240
|
+
}))));
|
|
241
|
+
} finally {
|
|
242
|
+
_effect.f();
|
|
243
|
+
}
|
|
238
244
|
};
|
|
239
245
|
|
|
240
246
|
// packages/plugins/plugin-debug/src/components/SpaceGenerator/presets.ts
|
|
@@ -252,8 +258,7 @@ import { CanvasBoardType, CanvasGraphModel, pointMultiply, pointsToRect, rectToP
|
|
|
252
258
|
import { TableType as TableType2 } from "@dxos/react-ui-table";
|
|
253
259
|
import { range as range2 } from "@dxos/util";
|
|
254
260
|
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-debug/src/components/SpaceGenerator/presets.ts";
|
|
255
|
-
var PresetName
|
|
256
|
-
(function(PresetName2) {
|
|
261
|
+
var PresetName = /* @__PURE__ */ function(PresetName2) {
|
|
257
262
|
PresetName2["EMAIL_TABLE"] = "email-table";
|
|
258
263
|
PresetName2["GPT_QUEUE"] = "webhook-gpt-queue";
|
|
259
264
|
PresetName2["CHAT_GPT"] = "chat-gpt-text";
|
|
@@ -263,7 +268,8 @@ var PresetName;
|
|
|
263
268
|
PresetName2["TIMER_TICK_QUEUE"] = "timerTick-queue";
|
|
264
269
|
PresetName2["DISCORD_MESSAGES"] = "discord-messages";
|
|
265
270
|
PresetName2["KANBAN_QUEUE"] = "kanban-queue";
|
|
266
|
-
|
|
271
|
+
return PresetName2;
|
|
272
|
+
}({});
|
|
267
273
|
var presets = {
|
|
268
274
|
schemas: [
|
|
269
275
|
CanvasBoardType,
|
|
@@ -1050,185 +1056,190 @@ var position = (rect) => {
|
|
|
1050
1056
|
// packages/plugins/plugin-debug/src/components/SpaceGenerator/SpaceGenerator.tsx
|
|
1051
1057
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-debug/src/components/SpaceGenerator/SpaceGenerator.tsx";
|
|
1052
1058
|
var SpaceGenerator = ({ space, onCreateObjects }) => {
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1059
|
+
var _effect = _useSignals2();
|
|
1060
|
+
try {
|
|
1061
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
1062
|
+
const client = useClient();
|
|
1063
|
+
const staticTypes = [
|
|
1064
|
+
DocumentType2,
|
|
1065
|
+
DiagramType2,
|
|
1066
|
+
SheetType2,
|
|
1067
|
+
ComputeGraph2
|
|
1068
|
+
];
|
|
1069
|
+
const mutableTypes = [
|
|
1070
|
+
DataType2.Organization,
|
|
1071
|
+
DataType2.Project,
|
|
1072
|
+
DataType2.Person,
|
|
1073
|
+
DataType2.Message
|
|
1074
|
+
];
|
|
1075
|
+
const [count, setCount] = useState(1);
|
|
1076
|
+
const [info, setInfo] = useState({});
|
|
1077
|
+
const typeMap = useMemo(() => {
|
|
1078
|
+
client.addTypes([
|
|
1079
|
+
...staticTypes,
|
|
1080
|
+
...presets.schemas
|
|
1081
|
+
]);
|
|
1082
|
+
const mutableGenerators = new Map(mutableTypes.map((type) => [
|
|
1083
|
+
type.typename,
|
|
1084
|
+
createGenerator(type)
|
|
1085
|
+
]));
|
|
1086
|
+
return new Map([
|
|
1087
|
+
...staticGenerators,
|
|
1088
|
+
...presets.items,
|
|
1089
|
+
...mutableGenerators
|
|
1090
|
+
]);
|
|
1091
|
+
}, [
|
|
1092
|
+
client,
|
|
1093
|
+
mutableTypes
|
|
1073
1094
|
]);
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1095
|
+
const updateInfo = async () => {
|
|
1096
|
+
const echoSchema = await space.db.schemaRegistry.query().run();
|
|
1097
|
+
const staticSchema = space.db.graph.schemaRegistry.schemas;
|
|
1098
|
+
const { objects } = await space.db.query(Filter3.everything()).run();
|
|
1099
|
+
const objectMap = sortKeys(objects.reduce((map, obj) => {
|
|
1100
|
+
const type = getTypename(obj);
|
|
1101
|
+
if (type) {
|
|
1102
|
+
const count2 = map[type] ?? 0;
|
|
1103
|
+
map[type] = count2 + 1;
|
|
1104
|
+
}
|
|
1105
|
+
return map;
|
|
1106
|
+
}, {}));
|
|
1107
|
+
setInfo({
|
|
1108
|
+
schema: {
|
|
1109
|
+
static: staticSchema.length,
|
|
1110
|
+
mutable: echoSchema.length
|
|
1111
|
+
},
|
|
1112
|
+
objects: objectMap
|
|
1113
|
+
});
|
|
1114
|
+
};
|
|
1115
|
+
useAsyncEffect(updateInfo, [
|
|
1116
|
+
space
|
|
1082
1117
|
]);
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
const echoSchema = await space.db.schemaRegistry.query().run();
|
|
1089
|
-
const staticSchema = space.db.graph.schemaRegistry.schemas;
|
|
1090
|
-
const { objects } = await space.db.query().run();
|
|
1091
|
-
const objectMap = sortKeys(objects.reduce((map, obj) => {
|
|
1092
|
-
const type = getTypename(obj);
|
|
1093
|
-
if (type) {
|
|
1094
|
-
const count2 = map[type] ?? 0;
|
|
1095
|
-
map[type] = count2 + 1;
|
|
1096
|
-
}
|
|
1097
|
-
return map;
|
|
1098
|
-
}, {}));
|
|
1099
|
-
setInfo({
|
|
1100
|
-
schema: {
|
|
1101
|
-
static: staticSchema.length,
|
|
1102
|
-
mutable: echoSchema.length
|
|
1103
|
-
},
|
|
1104
|
-
objects: objectMap
|
|
1105
|
-
});
|
|
1106
|
-
};
|
|
1107
|
-
useAsyncEffect(updateInfo, [
|
|
1108
|
-
space
|
|
1109
|
-
]);
|
|
1110
|
-
const handleCreateData = useCallback(async (typename) => {
|
|
1111
|
-
const constructor = typeMap.get(typename);
|
|
1112
|
-
if (constructor) {
|
|
1113
|
-
await constructor(space, count, onCreateObjects);
|
|
1114
|
-
await updateInfo();
|
|
1115
|
-
}
|
|
1116
|
-
}, [
|
|
1117
|
-
typeMap,
|
|
1118
|
-
count
|
|
1119
|
-
]);
|
|
1120
|
-
const handleLoadTables = useCallback(async () => {
|
|
1121
|
-
const input = document.createElement("input");
|
|
1122
|
-
input.type = "file";
|
|
1123
|
-
input.accept = ".json";
|
|
1124
|
-
input.onchange = async (e) => {
|
|
1125
|
-
const file = e.target.files?.[0];
|
|
1126
|
-
if (!file) {
|
|
1127
|
-
return;
|
|
1118
|
+
const handleCreateData = useCallback(async (typename) => {
|
|
1119
|
+
const constructor = typeMap.get(typename);
|
|
1120
|
+
if (constructor) {
|
|
1121
|
+
await constructor(space, count, onCreateObjects);
|
|
1122
|
+
await updateInfo();
|
|
1128
1123
|
}
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
await
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
await Promise.all(data.objects.map(async ({ id, "@type": typename, ...fields }) => {
|
|
1153
|
-
const schema = schemas.find((s) => `dxn:type:${s.typename}:${s.version}` === typename);
|
|
1154
|
-
if (!schema) {
|
|
1155
|
-
log.warn("Missing schema for object", {
|
|
1156
|
-
id,
|
|
1157
|
-
typename
|
|
1158
|
-
}, {
|
|
1159
|
-
F: __dxlog_file2,
|
|
1160
|
-
L: 125,
|
|
1161
|
-
S: void 0,
|
|
1162
|
-
C: (f, a) => f(...a)
|
|
1124
|
+
}, [
|
|
1125
|
+
typeMap,
|
|
1126
|
+
count
|
|
1127
|
+
]);
|
|
1128
|
+
const handleLoadTables = useCallback(async () => {
|
|
1129
|
+
const input = document.createElement("input");
|
|
1130
|
+
input.type = "file";
|
|
1131
|
+
input.accept = ".json";
|
|
1132
|
+
input.onchange = async (e) => {
|
|
1133
|
+
const file = e.target.files?.[0];
|
|
1134
|
+
if (!file) {
|
|
1135
|
+
return;
|
|
1136
|
+
}
|
|
1137
|
+
try {
|
|
1138
|
+
const content = await file.text();
|
|
1139
|
+
const data = JSON.parse(content);
|
|
1140
|
+
const schemas = await space.db.schemaRegistry.register(data.schemas.map(toEffectSchema));
|
|
1141
|
+
await Promise.all(schemas.map(async (schema) => {
|
|
1142
|
+
const parts = schema.typename.split("/");
|
|
1143
|
+
const name = parts[parts.length - 1];
|
|
1144
|
+
const table = live3(TableType3, {
|
|
1145
|
+
name,
|
|
1146
|
+
threads: []
|
|
1163
1147
|
});
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1148
|
+
await initializeTable({
|
|
1149
|
+
client,
|
|
1150
|
+
space,
|
|
1151
|
+
table,
|
|
1152
|
+
typename: schema.typename
|
|
1153
|
+
});
|
|
1154
|
+
await dispatch(createIntent(SpaceAction.AddObject, {
|
|
1155
|
+
target: space,
|
|
1156
|
+
object: table
|
|
1157
|
+
}));
|
|
1158
|
+
return table;
|
|
1159
|
+
}));
|
|
1160
|
+
await Promise.all(data.objects.map(async ({ id, "@type": typename, ...fields }) => {
|
|
1161
|
+
const schema = schemas.find((s) => `dxn:type:${s.typename}:${s.version}` === typename);
|
|
1162
|
+
if (!schema) {
|
|
1163
|
+
log.warn("Missing schema for object", {
|
|
1164
|
+
id,
|
|
1165
|
+
typename
|
|
1166
|
+
}, {
|
|
1167
|
+
F: __dxlog_file2,
|
|
1168
|
+
L: 125,
|
|
1169
|
+
S: void 0,
|
|
1170
|
+
C: (f, a) => f(...a)
|
|
1171
|
+
});
|
|
1172
|
+
return;
|
|
1173
|
+
}
|
|
1174
|
+
const object = live3(schema, fields);
|
|
1175
|
+
space.db.add(object);
|
|
1176
|
+
return object;
|
|
1177
|
+
}));
|
|
1178
|
+
} catch (err) {
|
|
1179
|
+
log.catch(err, void 0, {
|
|
1180
|
+
F: __dxlog_file2,
|
|
1181
|
+
L: 134,
|
|
1182
|
+
S: void 0,
|
|
1183
|
+
C: (f, a) => f(...a)
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
input.click();
|
|
1188
|
+
}, []);
|
|
1189
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
1190
|
+
role: "none",
|
|
1191
|
+
className: "flex flex-col divide-y divide-separator overflow-y-auto"
|
|
1192
|
+
}, /* @__PURE__ */ React2.createElement(Toolbar.Root, {
|
|
1193
|
+
classNames: "p-1"
|
|
1194
|
+
}, /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
1195
|
+
icon: "ph--arrow-clockwise--regular",
|
|
1196
|
+
iconOnly: true,
|
|
1197
|
+
label: "Refresh",
|
|
1198
|
+
onClick: updateInfo
|
|
1199
|
+
}), /* @__PURE__ */ React2.createElement(IconButton2, {
|
|
1200
|
+
icon: "ph--file-arrow-up--regular",
|
|
1201
|
+
iconOnly: true,
|
|
1202
|
+
label: "Load tables from JSON",
|
|
1203
|
+
onClick: handleLoadTables
|
|
1204
|
+
}), /* @__PURE__ */ React2.createElement(Toolbar.Separator, {
|
|
1205
|
+
variant: "gap"
|
|
1206
|
+
}), /* @__PURE__ */ React2.createElement("div", {
|
|
1207
|
+
className: "flex"
|
|
1208
|
+
}, /* @__PURE__ */ React2.createElement(Input.Root, null, /* @__PURE__ */ React2.createElement(Input.TextInput, {
|
|
1209
|
+
type: "number",
|
|
1210
|
+
min: 1,
|
|
1211
|
+
max: 100,
|
|
1212
|
+
placeholder: "Count",
|
|
1213
|
+
classNames: "w-[80px]",
|
|
1214
|
+
value: count,
|
|
1215
|
+
onChange: (ev) => setCount(parseInt(ev.target.value))
|
|
1216
|
+
})))), /* @__PURE__ */ React2.createElement(SchemaTable, {
|
|
1217
|
+
types: staticTypes,
|
|
1218
|
+
objects: info.objects,
|
|
1219
|
+
label: "Static Types",
|
|
1220
|
+
onClick: handleCreateData
|
|
1221
|
+
}), /* @__PURE__ */ React2.createElement(SchemaTable, {
|
|
1222
|
+
types: mutableTypes,
|
|
1223
|
+
objects: info.objects,
|
|
1224
|
+
label: "Mutable Types",
|
|
1225
|
+
onClick: handleCreateData
|
|
1226
|
+
}), /* @__PURE__ */ React2.createElement(SchemaTable, {
|
|
1227
|
+
types: presets.types,
|
|
1228
|
+
objects: info.objects,
|
|
1229
|
+
label: "Presets",
|
|
1230
|
+
onClick: handleCreateData
|
|
1231
|
+
}), /* @__PURE__ */ React2.createElement(SyntaxHighlighter, {
|
|
1232
|
+
classNames: "flex text-xs",
|
|
1233
|
+
language: "json"
|
|
1234
|
+
}, JSON.stringify({
|
|
1235
|
+
space,
|
|
1236
|
+
...info
|
|
1237
|
+
}, jsonKeyReplacer({
|
|
1238
|
+
truncate: true
|
|
1239
|
+
}), 2)));
|
|
1240
|
+
} finally {
|
|
1241
|
+
_effect.f();
|
|
1242
|
+
}
|
|
1232
1243
|
};
|
|
1233
1244
|
|
|
1234
1245
|
// packages/plugins/plugin-debug/src/components/SpaceGenerator/index.ts
|
|
@@ -1236,4 +1247,4 @@ var SpaceGenerator_default = SpaceGenerator;
|
|
|
1236
1247
|
export {
|
|
1237
1248
|
SpaceGenerator_default as default
|
|
1238
1249
|
};
|
|
1239
|
-
//# sourceMappingURL=SpaceGenerator-
|
|
1250
|
+
//# sourceMappingURL=SpaceGenerator-RHQLPN44.mjs.map
|