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