@xyo-network/react-typedoc 7.0.0 → 7.0.2
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/browser/index.mjs
CHANGED
|
@@ -1,62 +1,57 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/CommentViewer.tsx
|
|
5
2
|
import { Typography } from "@mui/material";
|
|
6
3
|
import { FlexCol } from "@xylabs/react-flexbox";
|
|
7
|
-
import
|
|
8
|
-
var CommentViewer =
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
11
|
-
...props
|
|
12
|
-
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
13
|
-
variant: "body2"
|
|
14
|
-
}, comment.summary[0]?.text));
|
|
15
|
-
}, "CommentViewer");
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var CommentViewer = ({ comment, ...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(FlexCol, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: comment.summary[0]?.text }) });
|
|
7
|
+
};
|
|
16
8
|
|
|
17
9
|
// src/JsonViewerButton.tsx
|
|
18
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Dialog,
|
|
12
|
+
DialogActions,
|
|
13
|
+
DialogContent,
|
|
14
|
+
DialogTitle
|
|
15
|
+
} from "@mui/material";
|
|
19
16
|
import { ButtonEx } from "@xylabs/react-button";
|
|
20
17
|
import { JsonViewerEx } from "@xyo-network/react-payload-raw-info";
|
|
21
|
-
import
|
|
22
|
-
|
|
18
|
+
import { useState } from "react";
|
|
19
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var JsonViewerButton = ({
|
|
21
|
+
jsonViewProps,
|
|
22
|
+
src,
|
|
23
|
+
title,
|
|
24
|
+
...props
|
|
25
|
+
}) => {
|
|
23
26
|
const [open, setOpen] = useState(false);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})), /* @__PURE__ */ React2.createElement(DialogActions, null, /* @__PURE__ */ React2.createElement(ButtonEx, {
|
|
34
|
-
onClick: /* @__PURE__ */ __name(() => setOpen(false), "onClick")
|
|
35
|
-
}, "Close"))));
|
|
36
|
-
}, "JsonViewerButton");
|
|
27
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx2(ButtonEx, { onClick: () => setOpen(!open), ...props, children: "JSON" }),
|
|
29
|
+
/* @__PURE__ */ jsxs(Dialog, { open, onClose: () => setOpen(false), children: [
|
|
30
|
+
title ? /* @__PURE__ */ jsx2(DialogTitle, { children: title }) : null,
|
|
31
|
+
/* @__PURE__ */ jsx2(DialogContent, { children: /* @__PURE__ */ jsx2(JsonViewerEx, { value: src, ...jsonViewProps }) }),
|
|
32
|
+
/* @__PURE__ */ jsx2(DialogActions, { children: /* @__PURE__ */ jsx2(ButtonEx, { onClick: () => setOpen(false), children: "Close" }) })
|
|
33
|
+
] })
|
|
34
|
+
] });
|
|
35
|
+
};
|
|
37
36
|
|
|
38
37
|
// src/ProjectTwoPanelReflectionViewer.tsx
|
|
39
38
|
import { assertEx } from "@xylabs/assert";
|
|
40
|
-
import React15 from "react";
|
|
41
|
-
|
|
42
|
-
// src/ReflectionViewer/Container.tsx
|
|
43
|
-
import React8 from "react";
|
|
44
39
|
|
|
45
40
|
// src/createLookup.ts
|
|
46
|
-
var createLookup =
|
|
41
|
+
var createLookup = (reflection) => {
|
|
47
42
|
const lookup = {};
|
|
48
43
|
if (reflection.children) for (const item of reflection.children) lookup[item.id] = item;
|
|
49
44
|
return lookup;
|
|
50
|
-
}
|
|
45
|
+
};
|
|
51
46
|
|
|
52
47
|
// src/ReflectionViewer/ReflectionGroupViewer.tsx
|
|
53
48
|
import { Typography as Typography4 } from "@mui/material";
|
|
54
49
|
import { FlexCol as FlexCol3, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
|
|
55
|
-
import
|
|
50
|
+
import { useEffect } from "react";
|
|
56
51
|
import { useLocation } from "react-router-dom";
|
|
57
52
|
|
|
58
53
|
// src/resolveChildren.ts
|
|
59
|
-
var resolveChildren =
|
|
54
|
+
var resolveChildren = (reflection, lookup = {}) => {
|
|
60
55
|
return reflection.children?.map((child) => {
|
|
61
56
|
switch (typeof child) {
|
|
62
57
|
case "object": {
|
|
@@ -74,31 +69,32 @@ var resolveChildren = /* @__PURE__ */ __name((reflection, lookup = {}) => {
|
|
|
74
69
|
}
|
|
75
70
|
}
|
|
76
71
|
}) ?? [];
|
|
77
|
-
}
|
|
72
|
+
};
|
|
78
73
|
|
|
79
74
|
// src/ReflectionViewer/ReflectionViewer.tsx
|
|
80
75
|
import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
|
|
81
|
-
import React6 from "react";
|
|
82
76
|
|
|
83
77
|
// src/ReflectionViewer/NameViewer.tsx
|
|
84
|
-
import {
|
|
78
|
+
import {
|
|
79
|
+
Chip,
|
|
80
|
+
Stack,
|
|
81
|
+
Typography as Typography3
|
|
82
|
+
} from "@mui/material";
|
|
85
83
|
import { FlexRow } from "@xylabs/react-flexbox";
|
|
86
|
-
import React5 from "react";
|
|
87
84
|
|
|
88
85
|
// src/trimFlagLabel.ts
|
|
89
|
-
var trimFlagLabel =
|
|
86
|
+
var trimFlagLabel = (label) => {
|
|
90
87
|
if (label.startsWith("is")) {
|
|
91
88
|
return label.slice(2);
|
|
92
89
|
}
|
|
93
90
|
return label;
|
|
94
|
-
}
|
|
91
|
+
};
|
|
95
92
|
|
|
96
93
|
// src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx
|
|
97
94
|
import { Typography as Typography2 } from "@mui/material";
|
|
98
|
-
import React4 from "react";
|
|
99
95
|
|
|
100
96
|
// src/ReflectionViewer/SomeTypeViewer/buildArrayString.tsx
|
|
101
|
-
var buildArrayString =
|
|
97
|
+
var buildArrayString = (typeObj, reflectionViewer, typeBuilder) => {
|
|
102
98
|
const parts = [];
|
|
103
99
|
const typeString = typeBuilder(typeObj.elementType, reflectionViewer);
|
|
104
100
|
if (typeof typeString === "string") {
|
|
@@ -106,54 +102,60 @@ var buildArrayString = /* @__PURE__ */ __name((typeObj, reflectionViewer, typeBu
|
|
|
106
102
|
}
|
|
107
103
|
parts.push("[]");
|
|
108
104
|
return parts;
|
|
109
|
-
}
|
|
105
|
+
};
|
|
110
106
|
|
|
111
107
|
// src/ReflectionViewer/SomeTypeViewer/buildIntersectionString.tsx
|
|
112
|
-
var buildIntersectionString =
|
|
108
|
+
var buildIntersectionString = (typeObj, reflectionViewer, typeBuilder) => {
|
|
113
109
|
const parts = [];
|
|
114
110
|
if (typeObj.types) {
|
|
115
|
-
parts.push(
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
parts.push(
|
|
112
|
+
typeObj.types.map((arg) => {
|
|
113
|
+
return typeBuilder(arg, reflectionViewer);
|
|
114
|
+
}).join(" & ")
|
|
115
|
+
);
|
|
118
116
|
}
|
|
119
117
|
return parts;
|
|
120
|
-
}
|
|
118
|
+
};
|
|
121
119
|
|
|
122
120
|
// src/ReflectionViewer/SomeTypeViewer/buildReferenceString.ts
|
|
123
|
-
var buildReferenceString =
|
|
121
|
+
var buildReferenceString = (typeObj, reflectionViewer, typeBuilder) => {
|
|
124
122
|
const parts = [];
|
|
125
123
|
parts.push(typeObj.name);
|
|
126
124
|
if (typeObj.typeArguments) {
|
|
127
|
-
parts.push(
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
parts.push(
|
|
126
|
+
"<",
|
|
127
|
+
typeObj.typeArguments.map((arg) => {
|
|
128
|
+
return typeBuilder(arg, reflectionViewer);
|
|
129
|
+
}).join(", "),
|
|
130
|
+
">"
|
|
131
|
+
);
|
|
130
132
|
}
|
|
131
133
|
return parts;
|
|
132
|
-
}
|
|
134
|
+
};
|
|
133
135
|
|
|
134
136
|
// src/ReflectionViewer/SomeTypeViewer/buildReflectionString.tsx
|
|
135
|
-
import
|
|
136
|
-
var buildReflectionString =
|
|
137
|
+
import { Fragment as Fragment2, jsx as jsx3 } from "react/jsx-runtime";
|
|
138
|
+
var buildReflectionString = (typeObj, reflectionViewer) => {
|
|
137
139
|
if (typeObj.declaration) {
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
reflection: typeObj.declaration
|
|
140
|
-
}));
|
|
140
|
+
return /* @__PURE__ */ jsx3(Fragment2, { children: reflectionViewer({ reflection: typeObj.declaration }) });
|
|
141
141
|
}
|
|
142
|
-
}
|
|
142
|
+
};
|
|
143
143
|
|
|
144
144
|
// src/ReflectionViewer/SomeTypeViewer/buildUnionString.tsx
|
|
145
|
-
var buildUnionString =
|
|
145
|
+
var buildUnionString = (typeObj, reflectionViewer, typeBuilder) => {
|
|
146
146
|
const parts = [];
|
|
147
147
|
if (typeObj.types) {
|
|
148
|
-
parts.push(
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
parts.push(
|
|
149
|
+
typeObj.types.map((arg) => {
|
|
150
|
+
return typeBuilder(arg, reflectionViewer);
|
|
151
|
+
}).join(" | ")
|
|
152
|
+
);
|
|
151
153
|
}
|
|
152
154
|
return parts;
|
|
153
|
-
}
|
|
155
|
+
};
|
|
154
156
|
|
|
155
157
|
// src/ReflectionViewer/SomeTypeViewer/buildTypeString.tsx
|
|
156
|
-
var buildTypeString =
|
|
158
|
+
var buildTypeString = (type, reflectionViewer) => {
|
|
157
159
|
const someType = type;
|
|
158
160
|
const parts = [];
|
|
159
161
|
switch (someType.type) {
|
|
@@ -190,60 +192,52 @@ var buildTypeString = /* @__PURE__ */ __name((type, reflectionViewer) => {
|
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
return parts.join("");
|
|
193
|
-
}
|
|
195
|
+
};
|
|
194
196
|
|
|
195
197
|
// src/ReflectionViewer/SomeTypeViewer/SomeTypeViewer.tsx
|
|
196
|
-
|
|
198
|
+
import { Fragment as Fragment3, jsx as jsx4 } from "react/jsx-runtime";
|
|
199
|
+
var SomeTypeViewer = ({
|
|
200
|
+
opacity = 0.5,
|
|
201
|
+
reflection,
|
|
202
|
+
reflectionViewer,
|
|
203
|
+
...props
|
|
204
|
+
}) => {
|
|
197
205
|
const typeReactNode = reflection.type ? buildTypeString(reflection.type, reflectionViewer) : "";
|
|
198
206
|
if (typeof typeReactNode === "string") {
|
|
199
|
-
return /* @__PURE__ */
|
|
200
|
-
title: "SomeTypeViewer",
|
|
201
|
-
style: {
|
|
202
|
-
opacity
|
|
203
|
-
},
|
|
204
|
-
...props
|
|
205
|
-
}, typeReactNode);
|
|
207
|
+
return /* @__PURE__ */ jsx4(Typography2, { title: "SomeTypeViewer", style: { opacity }, ...props, children: typeReactNode });
|
|
206
208
|
}
|
|
207
|
-
return /* @__PURE__ */
|
|
208
|
-
}
|
|
209
|
+
return /* @__PURE__ */ jsx4(Fragment3, { children: typeReactNode });
|
|
210
|
+
};
|
|
209
211
|
|
|
210
212
|
// src/ReflectionViewer/NameViewer.tsx
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}) : null;
|
|
236
|
-
}) : null), document && document?.location.hostname === "localhost" && /* @__PURE__ */ React5.createElement(JsonViewerButton, {
|
|
237
|
-
size: "small",
|
|
238
|
-
variant: "contained",
|
|
239
|
-
padding: 0,
|
|
240
|
-
marginX: 1,
|
|
241
|
-
src: reflection
|
|
242
|
-
}));
|
|
243
|
-
}, "NameViewer");
|
|
213
|
+
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
214
|
+
var NameViewer = ({
|
|
215
|
+
reflectionViewer,
|
|
216
|
+
variant,
|
|
217
|
+
reflection,
|
|
218
|
+
...props
|
|
219
|
+
}) => {
|
|
220
|
+
return /* @__PURE__ */ jsxs2(FlexRow, { justifyContent: "flex-start", ...props, children: [
|
|
221
|
+
/* @__PURE__ */ jsxs2(FlexRow, { marginRight: 1, children: [
|
|
222
|
+
/* @__PURE__ */ jsxs2(Typography3, { variant, noWrap: true, children: [
|
|
223
|
+
reflection.name,
|
|
224
|
+
reflection.type ? /* @__PURE__ */ jsx5(Fragment4, { children: ":\xA0" }) : null
|
|
225
|
+
] }),
|
|
226
|
+
/* @__PURE__ */ jsx5(SomeTypeViewer, { reflection, reflectionViewer })
|
|
227
|
+
] }),
|
|
228
|
+
/* @__PURE__ */ jsxs2(Stack, { direction: "row", spacing: 1, children: [
|
|
229
|
+
/* @__PURE__ */ jsx5(Chip, { size: "small", label: reflection.kind }),
|
|
230
|
+
reflection.flags ? Object.entries(reflection.flags).map(([flag, value]) => {
|
|
231
|
+
return value ? /* @__PURE__ */ jsx5(Chip, { size: "small", label: trimFlagLabel(flag), variant: "outlined" }, flag) : null;
|
|
232
|
+
}) : null
|
|
233
|
+
] }),
|
|
234
|
+
document && document?.location.hostname === "localhost" && /* @__PURE__ */ jsx5(JsonViewerButton, { size: "small", variant: "contained", padding: 0, marginX: 1, src: reflection })
|
|
235
|
+
] });
|
|
236
|
+
};
|
|
244
237
|
|
|
245
238
|
// src/ReflectionViewer/ReflectionViewer.tsx
|
|
246
|
-
|
|
239
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
240
|
+
var hide = (flags, hiddenFlags = []) => {
|
|
247
241
|
let hide3 = false;
|
|
248
242
|
for (const hiddenFlag of hiddenFlags) {
|
|
249
243
|
if (flags?.[hiddenFlag]) {
|
|
@@ -251,33 +245,29 @@ var hide = /* @__PURE__ */ __name((flags, hiddenFlags = []) => {
|
|
|
251
245
|
}
|
|
252
246
|
}
|
|
253
247
|
return hide3;
|
|
254
|
-
}
|
|
255
|
-
var ReflectionViewer =
|
|
248
|
+
};
|
|
249
|
+
var ReflectionViewer = ({
|
|
250
|
+
variant,
|
|
251
|
+
nameViewer,
|
|
252
|
+
children,
|
|
253
|
+
reflection,
|
|
254
|
+
hiddenFlags,
|
|
255
|
+
...props
|
|
256
|
+
}) => {
|
|
256
257
|
const someReflection = reflection;
|
|
257
|
-
return hide(reflection?.flags, hiddenFlags) ? null : /* @__PURE__ */
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}) : nameViewer, reflection.comment ? /* @__PURE__ */ React6.createElement(CommentViewer, {
|
|
267
|
-
comment: reflection.comment
|
|
268
|
-
}) : null, someReflection.parameters?.map((parameter) => {
|
|
269
|
-
return /* @__PURE__ */ React6.createElement(ReflectionViewer, {
|
|
270
|
-
hiddenFlags,
|
|
271
|
-
marginY: 0.25,
|
|
272
|
-
marginX: 1,
|
|
273
|
-
key: parameter.id,
|
|
274
|
-
reflection: parameter
|
|
275
|
-
});
|
|
276
|
-
}) ?? null, children);
|
|
277
|
-
}, "ReflectionViewer");
|
|
258
|
+
return hide(reflection?.flags, hiddenFlags) ? null : /* @__PURE__ */ jsxs3(FlexCol2, { title: "ReflectionViewer", alignItems: "stretch", ...props, children: [
|
|
259
|
+
nameViewer === void 0 ? /* @__PURE__ */ jsx6(NameViewer, { marginY: 0.25, variant, reflection: someReflection, reflectionViewer: ReflectionViewer }) : nameViewer,
|
|
260
|
+
reflection.comment ? /* @__PURE__ */ jsx6(CommentViewer, { comment: reflection.comment }) : null,
|
|
261
|
+
someReflection.parameters?.map((parameter) => {
|
|
262
|
+
return /* @__PURE__ */ jsx6(ReflectionViewer, { hiddenFlags, marginY: 0.25, marginX: 1, reflection: parameter }, parameter.id);
|
|
263
|
+
}) ?? null,
|
|
264
|
+
children
|
|
265
|
+
] });
|
|
266
|
+
};
|
|
278
267
|
|
|
279
268
|
// src/ReflectionViewer/ReflectionGroupViewer.tsx
|
|
280
|
-
|
|
269
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
270
|
+
var hide2 = (flags, hiddenFlags = []) => {
|
|
281
271
|
let hide3 = false;
|
|
282
272
|
for (const hiddenFlag of hiddenFlags) {
|
|
283
273
|
if (flags?.[hiddenFlag]) {
|
|
@@ -285,8 +275,17 @@ var hide2 = /* @__PURE__ */ __name((flags, hiddenFlags = []) => {
|
|
|
285
275
|
}
|
|
286
276
|
}
|
|
287
277
|
return hide3;
|
|
288
|
-
}
|
|
289
|
-
var ReflectionGroupViewer =
|
|
278
|
+
};
|
|
279
|
+
var ReflectionGroupViewer = ({
|
|
280
|
+
autoScroll = false,
|
|
281
|
+
children,
|
|
282
|
+
hiddenFlags,
|
|
283
|
+
group,
|
|
284
|
+
lookup,
|
|
285
|
+
renderer = ReflectionViewer,
|
|
286
|
+
variant,
|
|
287
|
+
...props
|
|
288
|
+
}) => {
|
|
290
289
|
const resolvedChildren = resolveChildren(group, lookup) ?? [];
|
|
291
290
|
const visibleChildren = hiddenFlags ? resolvedChildren.reduce((acc, item) => {
|
|
292
291
|
return acc + (hide2(item.flags, hiddenFlags) ? 0 : 1);
|
|
@@ -294,354 +293,331 @@ var ReflectionGroupViewer = /* @__PURE__ */ __name(({ autoScroll = false, childr
|
|
|
294
293
|
const { hash } = useLocation();
|
|
295
294
|
useEffect(() => {
|
|
296
295
|
if (hash && autoScroll) {
|
|
297
|
-
document.querySelector(hash)?.scrollIntoView({
|
|
298
|
-
behavior: "smooth"
|
|
299
|
-
});
|
|
296
|
+
document.querySelector(hash)?.scrollIntoView({ behavior: "smooth" });
|
|
300
297
|
}
|
|
301
|
-
}, [
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
})), resolveChildren(group, lookup).map((reflection) => {
|
|
320
|
-
return reflection ? /* @__PURE__ */ React7.createElement("div", {
|
|
321
|
-
id: reflection.name,
|
|
322
|
-
key: reflection.id
|
|
323
|
-
}, renderer({
|
|
324
|
-
hiddenFlags,
|
|
325
|
-
lookup,
|
|
326
|
-
margin: 1,
|
|
327
|
-
padding: 1,
|
|
328
|
-
reflection
|
|
329
|
-
})) : null;
|
|
330
|
-
}), children) : null;
|
|
331
|
-
}, "ReflectionGroupViewer");
|
|
298
|
+
}, [hash, autoScroll]);
|
|
299
|
+
return visibleChildren > 0 ? /* @__PURE__ */ jsxs4(FlexCol3, { title: "ReflectionGroupViewer", ...props, children: [
|
|
300
|
+
/* @__PURE__ */ jsxs4(FlexRow2, { marginY: 1, justifyContent: "flex-start", children: [
|
|
301
|
+
/* @__PURE__ */ jsx7(Typography4, { variant, children: group.title }),
|
|
302
|
+
/* @__PURE__ */ jsx7(JsonViewerButton, { size: "small", variant: "contained", padding: 0, marginX: 1, src: resolveChildren(group, lookup) })
|
|
303
|
+
] }),
|
|
304
|
+
resolveChildren(group, lookup).map((reflection) => {
|
|
305
|
+
return reflection ? /* @__PURE__ */ jsx7("div", { id: reflection.name, children: renderer({
|
|
306
|
+
hiddenFlags,
|
|
307
|
+
lookup,
|
|
308
|
+
margin: 1,
|
|
309
|
+
padding: 1,
|
|
310
|
+
reflection
|
|
311
|
+
}) }, reflection.id) : null;
|
|
312
|
+
}),
|
|
313
|
+
children
|
|
314
|
+
] }) : null;
|
|
315
|
+
};
|
|
332
316
|
|
|
333
317
|
// src/ReflectionViewer/Container.tsx
|
|
334
|
-
|
|
318
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
319
|
+
var ContainerReflectionViewer = ({
|
|
320
|
+
children,
|
|
321
|
+
reflection,
|
|
322
|
+
hiddenFlags,
|
|
323
|
+
itemRenderer = ReflectionViewer,
|
|
324
|
+
...props
|
|
325
|
+
}) => {
|
|
335
326
|
const lookup = createLookup(reflection);
|
|
336
|
-
return /* @__PURE__ */
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
})
|
|
354
|
-
}
|
|
327
|
+
return /* @__PURE__ */ jsxs5(ReflectionViewer, { title: "ContainerReflectionViewer", sources: true, reflection, lookup, ...props, children: [
|
|
328
|
+
reflection.groups?.map((group) => {
|
|
329
|
+
return /* @__PURE__ */ jsx8(
|
|
330
|
+
ReflectionGroupViewer,
|
|
331
|
+
{
|
|
332
|
+
margin: 1,
|
|
333
|
+
lookup,
|
|
334
|
+
renderer: itemRenderer,
|
|
335
|
+
group,
|
|
336
|
+
reflection,
|
|
337
|
+
hiddenFlags,
|
|
338
|
+
alignItems: "stretch"
|
|
339
|
+
},
|
|
340
|
+
group.title
|
|
341
|
+
);
|
|
342
|
+
}),
|
|
343
|
+
children
|
|
344
|
+
] });
|
|
345
|
+
};
|
|
355
346
|
|
|
356
347
|
// src/ReflectionViewer/Declaration.tsx
|
|
357
|
-
import
|
|
358
|
-
var DeclarationReflectionViewer =
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
return /* @__PURE__ */ React9.createElement(ReflectionViewer, {
|
|
372
|
-
key: signature.id,
|
|
348
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
349
|
+
var DeclarationReflectionViewer = ({
|
|
350
|
+
reflection,
|
|
351
|
+
hiddenFlags,
|
|
352
|
+
...props
|
|
353
|
+
}) => {
|
|
354
|
+
const safeSignatures = (signatures) => {
|
|
355
|
+
return Array.isArray(signatures) ? signatures : signatures ? [signatures] : void 0;
|
|
356
|
+
};
|
|
357
|
+
return /* @__PURE__ */ jsxs6(
|
|
358
|
+
ReflectionViewer,
|
|
359
|
+
{
|
|
360
|
+
nameViewer: reflection.signatures || reflection.getSignature || reflection.setSignature ? null : void 0,
|
|
361
|
+
title: "DeclarationReflectionViewer",
|
|
373
362
|
hiddenFlags,
|
|
374
|
-
reflection
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}));
|
|
391
|
-
}, "DeclarationReflectionViewer");
|
|
363
|
+
reflection,
|
|
364
|
+
...props,
|
|
365
|
+
children: [
|
|
366
|
+
reflection.signatures?.map((signature) => {
|
|
367
|
+
return /* @__PURE__ */ jsx9(ReflectionViewer, { hiddenFlags, reflection: signature }, signature.id);
|
|
368
|
+
}),
|
|
369
|
+
safeSignatures(reflection.getSignature)?.map((signature) => {
|
|
370
|
+
return /* @__PURE__ */ jsx9(ReflectionViewer, { marginX: 1, hiddenFlags, reflection: signature }, signature.id);
|
|
371
|
+
}),
|
|
372
|
+
safeSignatures(reflection.setSignature)?.map((signature) => {
|
|
373
|
+
return /* @__PURE__ */ jsx9(ReflectionViewer, { marginX: 1, hiddenFlags, reflection: signature }, signature.id);
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
};
|
|
392
379
|
|
|
393
380
|
// src/ReflectionViewer/DeclarationContainer.tsx
|
|
394
381
|
import { useTheme } from "@mui/material";
|
|
395
|
-
import React10 from "react";
|
|
396
382
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
397
|
-
|
|
383
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
384
|
+
var DeclarationContainerReflectionViewer = ({
|
|
385
|
+
reflection,
|
|
386
|
+
lookup,
|
|
387
|
+
itemRenderer = DeclarationReflectionViewer,
|
|
388
|
+
...props
|
|
389
|
+
}) => {
|
|
398
390
|
const { hash } = useLocation2();
|
|
399
391
|
const theme = useTheme();
|
|
400
|
-
return /* @__PURE__ */
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
392
|
+
return /* @__PURE__ */ jsx10(
|
|
393
|
+
ContainerReflectionViewer,
|
|
394
|
+
{
|
|
395
|
+
title: "DeclarationContainerReflectionViewer",
|
|
396
|
+
paper: hash.slice(1) === reflection.name,
|
|
397
|
+
bgcolor: hash.slice(1) === reflection.name ? theme.vars.palette.background.default : void 0,
|
|
398
|
+
lookup,
|
|
399
|
+
itemRenderer,
|
|
400
|
+
reflection,
|
|
401
|
+
...props
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
};
|
|
410
405
|
|
|
411
406
|
// src/ReflectionViewer/Project.tsx
|
|
412
|
-
import
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}, useMemo(() => {
|
|
407
|
+
import { useMemo } from "react";
|
|
408
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
409
|
+
var ProjectReflectionViewer = ({
|
|
410
|
+
reflection,
|
|
411
|
+
hiddenFlags,
|
|
412
|
+
itemRenderer = ReflectionViewer,
|
|
413
|
+
...props
|
|
414
|
+
}) => {
|
|
415
|
+
const lookup = useMemo(() => createLookup(reflection), [reflection]);
|
|
416
|
+
return /* @__PURE__ */ jsx11(ReflectionViewer, { title: "ProjectReflectionViewer", hiddenFlags, reflection, ...props, children: useMemo(() => {
|
|
423
417
|
return reflection.groups?.map((group) => {
|
|
424
|
-
return /* @__PURE__ */
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
418
|
+
return /* @__PURE__ */ jsx11(
|
|
419
|
+
ReflectionGroupViewer,
|
|
420
|
+
{
|
|
421
|
+
autoScroll: true,
|
|
422
|
+
variant: "h6",
|
|
423
|
+
lookup,
|
|
424
|
+
renderer: itemRenderer,
|
|
425
|
+
group,
|
|
426
|
+
reflection,
|
|
427
|
+
alignItems: "stretch",
|
|
428
|
+
hiddenFlags
|
|
429
|
+
},
|
|
430
|
+
group.title
|
|
431
|
+
);
|
|
435
432
|
});
|
|
436
|
-
}, [
|
|
437
|
-
|
|
438
|
-
reflection,
|
|
439
|
-
hiddenFlags,
|
|
440
|
-
itemRenderer
|
|
441
|
-
]));
|
|
442
|
-
}, "ProjectReflectionViewer");
|
|
433
|
+
}, [lookup, reflection, hiddenFlags, itemRenderer]) });
|
|
434
|
+
};
|
|
443
435
|
|
|
444
436
|
// src/TwoPanelReflectionViewer.tsx
|
|
445
437
|
import { Search } from "@mui/icons-material";
|
|
446
438
|
import { TextField, useTheme as useTheme2 } from "@mui/material";
|
|
447
|
-
import {
|
|
448
|
-
|
|
439
|
+
import {
|
|
440
|
+
FlexCol as FlexCol6,
|
|
441
|
+
FlexGrowCol,
|
|
442
|
+
FlexRow as FlexRow4
|
|
443
|
+
} from "@xylabs/react-flexbox";
|
|
444
|
+
import { useMemo as useMemo2, useState as useState2 } from "react";
|
|
449
445
|
|
|
450
446
|
// src/TreeViewer/Reflection.tsx
|
|
451
447
|
import { Add, Remove } from "@mui/icons-material";
|
|
452
448
|
import { Typography as Typography5 } from "@mui/material";
|
|
453
449
|
import { SimpleTreeView, TreeItem } from "@mui/x-tree-view";
|
|
454
450
|
import { FlexCol as FlexCol4 } from "@xylabs/react-flexbox";
|
|
455
|
-
import React12 from "react";
|
|
456
451
|
import { useNavigate } from "react-router-dom";
|
|
457
|
-
|
|
452
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
453
|
+
var ReflectionTreeViewer = ({
|
|
454
|
+
lookup,
|
|
455
|
+
reflection,
|
|
456
|
+
searchTerm,
|
|
457
|
+
...props
|
|
458
|
+
}) => {
|
|
458
459
|
const navigate = useNavigate();
|
|
459
|
-
return /* @__PURE__ */
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const hash = `#${childReflection.name}`;
|
|
486
|
-
void navigate({
|
|
487
|
-
hash
|
|
488
|
-
});
|
|
489
|
-
document.querySelector(hash)?.scrollIntoView({
|
|
490
|
-
behavior: "smooth"
|
|
491
|
-
});
|
|
492
|
-
}, "onClick")
|
|
493
|
-
}) : null;
|
|
494
|
-
})))));
|
|
495
|
-
}, "ReflectionTreeViewer");
|
|
460
|
+
return /* @__PURE__ */ jsx12(FlexCol4, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx12(
|
|
461
|
+
SimpleTreeView,
|
|
462
|
+
{
|
|
463
|
+
"aria-label": "XYO SDK Documentation",
|
|
464
|
+
slots: { collapseIcon: Remove, expandIcon: Add },
|
|
465
|
+
expandedItems: reflection.groups ? [reflection.groups[0].title] : [],
|
|
466
|
+
children: reflection.groups?.map((group, index) => /* @__PURE__ */ jsx12(TreeItem, { itemId: group.title, label: /* @__PURE__ */ jsx12(Typography5, { variant: "h6", children: group.title }), children: group.children.map((child, jndex) => {
|
|
467
|
+
const searchTermTrimmed = searchTerm?.trim().toLowerCase();
|
|
468
|
+
const childReflection = typeof child === "number" ? lookup?.[child] : child;
|
|
469
|
+
return childReflection && (!searchTermTrimmed || childReflection.name.toLowerCase().includes(searchTermTrimmed)) ? /* @__PURE__ */ jsx12(
|
|
470
|
+
TreeItem,
|
|
471
|
+
{
|
|
472
|
+
itemId: `declaration-${childReflection?.id}`,
|
|
473
|
+
label: childReflection.name,
|
|
474
|
+
onClick: () => {
|
|
475
|
+
const hash = `#${childReflection.name}`;
|
|
476
|
+
void navigate({ hash });
|
|
477
|
+
document.querySelector(hash)?.scrollIntoView({ behavior: "smooth" });
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
`secondary-${index}- ${jndex}`
|
|
481
|
+
) : null;
|
|
482
|
+
}) }, `primary-${index}`))
|
|
483
|
+
}
|
|
484
|
+
) });
|
|
485
|
+
};
|
|
496
486
|
|
|
497
487
|
// src/TreeViewer/ReflectionGroup.tsx
|
|
498
488
|
import { Typography as Typography6 } from "@mui/material";
|
|
499
489
|
import { FlexCol as FlexCol5, FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
|
|
500
|
-
import
|
|
501
|
-
var ReflectionGroupTreeViewer =
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
reflection
|
|
520
|
-
})
|
|
521
|
-
|
|
522
|
-
}
|
|
490
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
491
|
+
var ReflectionGroupTreeViewer = ({
|
|
492
|
+
variant,
|
|
493
|
+
group,
|
|
494
|
+
children,
|
|
495
|
+
lookup,
|
|
496
|
+
renderer = ReflectionViewer,
|
|
497
|
+
...props
|
|
498
|
+
}) => {
|
|
499
|
+
return /* @__PURE__ */ jsxs7(FlexCol5, { ...props, children: [
|
|
500
|
+
/* @__PURE__ */ jsxs7(FlexRow3, { marginY: 1, justifyContent: "flex-start", children: [
|
|
501
|
+
/* @__PURE__ */ jsx13(Typography6, { variant, children: group.title }),
|
|
502
|
+
/* @__PURE__ */ jsx13(JsonViewerButton, { size: "small", variant: "contained", padding: 0, marginX: 1, src: resolveChildren(group, lookup) })
|
|
503
|
+
] }),
|
|
504
|
+
resolveChildren(group, lookup).map((reflection) => {
|
|
505
|
+
return reflection ? /* @__PURE__ */ jsx13("div", { children: renderer({
|
|
506
|
+
lookup,
|
|
507
|
+
margin: 1,
|
|
508
|
+
reflection
|
|
509
|
+
}) }, reflection.id) : null;
|
|
510
|
+
}),
|
|
511
|
+
children
|
|
512
|
+
] });
|
|
513
|
+
};
|
|
523
514
|
|
|
524
515
|
// src/TwoPanelReflectionViewer.tsx
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
516
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
517
|
+
var TwoPanelReflectionViewer = ({
|
|
518
|
+
reflection,
|
|
519
|
+
itemRenderer = ReflectionViewer,
|
|
520
|
+
hiddenFlags,
|
|
521
|
+
...props
|
|
522
|
+
}) => {
|
|
523
|
+
const lookup = useMemo2(() => createLookup(reflection), [reflection]);
|
|
529
524
|
const theme = useTheme2();
|
|
530
525
|
const [searchTerm, setSearchTerm] = useState2();
|
|
531
|
-
const onSearchTermChange =
|
|
526
|
+
const onSearchTermChange = (e) => {
|
|
532
527
|
setSearchTerm(e.target.value);
|
|
533
|
-
}
|
|
528
|
+
};
|
|
534
529
|
const reflectionGroups = useMemo2(() => {
|
|
535
530
|
return reflection.groups?.map((group) => {
|
|
536
|
-
return /* @__PURE__ */
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
531
|
+
return /* @__PURE__ */ jsx14(
|
|
532
|
+
ReflectionGroupViewer,
|
|
533
|
+
{
|
|
534
|
+
autoScroll: true,
|
|
535
|
+
variant: "h6",
|
|
536
|
+
lookup,
|
|
537
|
+
renderer: itemRenderer,
|
|
538
|
+
group,
|
|
539
|
+
reflection,
|
|
540
|
+
alignItems: "stretch",
|
|
541
|
+
hiddenFlags
|
|
542
|
+
},
|
|
543
|
+
group.title
|
|
544
|
+
);
|
|
547
545
|
});
|
|
548
|
-
}, [
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
546
|
+
}, [itemRenderer, lookup, reflection, hiddenFlags]);
|
|
547
|
+
const NavigationCol = (props2) => {
|
|
548
|
+
return /* @__PURE__ */ jsxs8(FlexCol6, { ...props2, children: [
|
|
549
|
+
/* @__PURE__ */ jsx14(
|
|
550
|
+
TextField,
|
|
551
|
+
{
|
|
552
|
+
fullWidth: true,
|
|
553
|
+
onChange: onSearchTermChange,
|
|
554
|
+
slotProps: { input: { startAdornment: /* @__PURE__ */ jsx14(Search, {}) } }
|
|
555
|
+
}
|
|
556
|
+
),
|
|
557
|
+
/* @__PURE__ */ jsx14(FlexGrowCol, { marginTop: 1, alignItems: "stretch", children: /* @__PURE__ */ jsx14(
|
|
558
|
+
ReflectionTreeViewer,
|
|
559
|
+
{
|
|
560
|
+
justifyContent: "flex-start",
|
|
561
|
+
position: "absolute",
|
|
562
|
+
top: 0,
|
|
563
|
+
left: 0,
|
|
564
|
+
right: 0,
|
|
565
|
+
bottom: 0,
|
|
566
|
+
overflow: "scroll",
|
|
567
|
+
searchTerm,
|
|
568
|
+
hiddenFlags,
|
|
569
|
+
reflection,
|
|
570
|
+
lookup,
|
|
571
|
+
border: `1px solid ${theme.vars.palette.grey["300"]}`,
|
|
572
|
+
borderRadius: 1,
|
|
573
|
+
paddingY: 1
|
|
561
574
|
}
|
|
575
|
+
) })
|
|
576
|
+
] });
|
|
577
|
+
};
|
|
578
|
+
const DetailsCol = (props2) => {
|
|
579
|
+
return /* @__PURE__ */ jsx14(FlexGrowCol, { ...props2, children: /* @__PURE__ */ jsx14(FlexGrowCol, { alignItems: "stretch", children: /* @__PURE__ */ jsx14(
|
|
580
|
+
FlexCol6,
|
|
581
|
+
{
|
|
582
|
+
alignItems: "stretch",
|
|
583
|
+
justifyContent: "flex-start",
|
|
584
|
+
position: "absolute",
|
|
585
|
+
top: 0,
|
|
586
|
+
left: 0,
|
|
587
|
+
right: 0,
|
|
588
|
+
bottom: 0,
|
|
589
|
+
overflow: "scroll",
|
|
590
|
+
borderRadius: 1,
|
|
591
|
+
padding: 1,
|
|
592
|
+
border: `1px solid ${theme.vars.palette.grey["300"]}`,
|
|
593
|
+
children: reflectionGroups
|
|
562
594
|
}
|
|
563
|
-
})
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
left: 0,
|
|
571
|
-
right: 0,
|
|
572
|
-
bottom: 0,
|
|
573
|
-
overflow: "scroll",
|
|
574
|
-
searchTerm,
|
|
575
|
-
hiddenFlags,
|
|
576
|
-
reflection,
|
|
577
|
-
lookup,
|
|
578
|
-
border: `1px solid ${theme.vars.palette.grey["300"]}`,
|
|
579
|
-
borderRadius: 1,
|
|
580
|
-
paddingY: 1
|
|
581
|
-
})));
|
|
582
|
-
}, "NavigationCol");
|
|
583
|
-
const DetailsCol = /* @__PURE__ */ __name((props2) => {
|
|
584
|
-
return /* @__PURE__ */ React14.createElement(FlexGrowCol, props2, /* @__PURE__ */ React14.createElement(FlexGrowCol, {
|
|
585
|
-
alignItems: "stretch"
|
|
586
|
-
}, /* @__PURE__ */ React14.createElement(FlexCol6, {
|
|
587
|
-
alignItems: "stretch",
|
|
588
|
-
justifyContent: "flex-start",
|
|
589
|
-
position: "absolute",
|
|
590
|
-
top: 0,
|
|
591
|
-
left: 0,
|
|
592
|
-
right: 0,
|
|
593
|
-
bottom: 0,
|
|
594
|
-
overflow: "scroll",
|
|
595
|
-
borderRadius: 1,
|
|
596
|
-
padding: 1,
|
|
597
|
-
border: `1px solid ${theme.vars.palette.grey["300"]}`
|
|
598
|
-
}, reflectionGroups)));
|
|
599
|
-
}, "DetailsCol");
|
|
600
|
-
return /* @__PURE__ */ React14.createElement(FlexRow4, {
|
|
601
|
-
alignItems: "stretch",
|
|
602
|
-
justifyContent: "start",
|
|
603
|
-
sx: {
|
|
604
|
-
overflowY: "scroll"
|
|
605
|
-
},
|
|
606
|
-
...props
|
|
607
|
-
}, /* @__PURE__ */ React14.createElement(NavigationCol, {
|
|
608
|
-
minWidth: 320,
|
|
609
|
-
alignItems: "stretch",
|
|
610
|
-
justifyContent: "flex-start",
|
|
611
|
-
overflow: "hidden"
|
|
612
|
-
}), /* @__PURE__ */ React14.createElement(DetailsCol, {
|
|
613
|
-
marginLeft: 1,
|
|
614
|
-
alignItems: "stretch",
|
|
615
|
-
justifyContent: "flex-start",
|
|
616
|
-
overflow: "hidden"
|
|
617
|
-
}));
|
|
618
|
-
}, "TwoPanelReflectionViewer");
|
|
595
|
+
) }) });
|
|
596
|
+
};
|
|
597
|
+
return /* @__PURE__ */ jsxs8(FlexRow4, { alignItems: "stretch", justifyContent: "start", sx: { overflowY: "scroll" }, ...props, children: [
|
|
598
|
+
/* @__PURE__ */ jsx14(NavigationCol, { minWidth: 320, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" }),
|
|
599
|
+
/* @__PURE__ */ jsx14(DetailsCol, { marginLeft: 1, alignItems: "stretch", justifyContent: "flex-start", overflow: "hidden" })
|
|
600
|
+
] });
|
|
601
|
+
};
|
|
619
602
|
|
|
620
603
|
// src/ProjectTwoPanelReflectionViewer.tsx
|
|
621
|
-
|
|
604
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
605
|
+
var ProjectTwoPanelReflectionViewer = ({
|
|
606
|
+
reflection,
|
|
607
|
+
itemRenderer = DeclarationContainerReflectionViewer,
|
|
608
|
+
...props
|
|
609
|
+
}) => {
|
|
622
610
|
assertEx(reflection.isProject, () => "Project expected to be Project");
|
|
623
|
-
return /* @__PURE__ */
|
|
624
|
-
|
|
625
|
-
reflection,
|
|
626
|
-
...props
|
|
627
|
-
});
|
|
628
|
-
}, "ProjectTwoPanelReflectionViewer");
|
|
611
|
+
return /* @__PURE__ */ jsx15(TwoPanelReflectionViewer, { itemRenderer, reflection, ...props });
|
|
612
|
+
};
|
|
629
613
|
|
|
630
614
|
// src/SourceViewer.tsx
|
|
631
615
|
import { Typography as Typography7 } from "@mui/material";
|
|
632
616
|
import { FlexCol as FlexCol7 } from "@xylabs/react-flexbox";
|
|
633
|
-
import
|
|
634
|
-
var SourceViewer =
|
|
635
|
-
return /* @__PURE__ */
|
|
636
|
-
|
|
637
|
-
...props
|
|
638
|
-
}, /* @__PURE__ */ React16.createElement(Typography7, {
|
|
639
|
-
style: {
|
|
640
|
-
opacity: 0.5
|
|
641
|
-
},
|
|
642
|
-
variant: "body2"
|
|
643
|
-
}, /* @__PURE__ */ React16.createElement("i", null, source.fileName)));
|
|
644
|
-
}, "SourceViewer");
|
|
617
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
618
|
+
var SourceViewer = ({ source, ...props }) => {
|
|
619
|
+
return /* @__PURE__ */ jsx16(FlexCol7, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx16(Typography7, { style: { opacity: 0.5 }, variant: "body2", children: /* @__PURE__ */ jsx16("i", { children: source.fileName }) }) });
|
|
620
|
+
};
|
|
645
621
|
export {
|
|
646
622
|
CommentViewer,
|
|
647
623
|
ContainerReflectionViewer,
|