@openpkg-ts/doc-generator 0.2.2 → 0.2.4
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/react-styled.js +654 -821
- package/dist/react.js +201 -201
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -121,7 +121,7 @@ function buildSignatureString(exp, sigIndex = 0) {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// src/components/headless/CollapsibleMethod.tsx
|
|
124
|
-
import {
|
|
124
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
125
125
|
|
|
126
126
|
function formatReturnType2(returns) {
|
|
127
127
|
if (!returns)
|
|
@@ -164,96 +164,96 @@ function CollapsibleMethod({
|
|
|
164
164
|
badges.push("static");
|
|
165
165
|
if (isAsync)
|
|
166
166
|
badges.push("async");
|
|
167
|
-
return /* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
168
168
|
id: member.name,
|
|
169
169
|
className,
|
|
170
170
|
"data-expanded": expanded,
|
|
171
171
|
children: [
|
|
172
|
-
renderHeader ? renderHeader(member, expanded, toggle) : /* @__PURE__ */
|
|
172
|
+
renderHeader ? renderHeader(member, expanded, toggle) : /* @__PURE__ */ jsxs("button", {
|
|
173
173
|
type: "button",
|
|
174
174
|
onClick: toggle,
|
|
175
175
|
"data-header": true,
|
|
176
176
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ jsxs("span", {
|
|
178
178
|
"data-name": true,
|
|
179
179
|
children: [
|
|
180
180
|
member.name,
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ jsxs("span", {
|
|
182
182
|
"data-params": true,
|
|
183
183
|
children: [
|
|
184
184
|
"(",
|
|
185
185
|
paramPreview,
|
|
186
186
|
")"
|
|
187
187
|
]
|
|
188
|
-
}
|
|
188
|
+
})
|
|
189
189
|
]
|
|
190
|
-
}
|
|
191
|
-
/* @__PURE__ */
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ jsx("span", {
|
|
192
192
|
"data-return": true,
|
|
193
193
|
children: returnType
|
|
194
|
-
}
|
|
195
|
-
badges.length > 0 && /* @__PURE__ */
|
|
194
|
+
}),
|
|
195
|
+
badges.length > 0 && /* @__PURE__ */ jsx("span", {
|
|
196
196
|
"data-badges": true,
|
|
197
|
-
children: badges.map((badge) => /* @__PURE__ */
|
|
197
|
+
children: badges.map((badge) => /* @__PURE__ */ jsx("span", {
|
|
198
198
|
"data-badge": badge,
|
|
199
199
|
children: badge
|
|
200
|
-
}, badge
|
|
201
|
-
}
|
|
200
|
+
}, badge))
|
|
201
|
+
})
|
|
202
202
|
]
|
|
203
|
-
}
|
|
204
|
-
expanded && (renderContent ? renderContent(member) : /* @__PURE__ */
|
|
203
|
+
}),
|
|
204
|
+
expanded && (renderContent ? renderContent(member) : /* @__PURE__ */ jsxs("div", {
|
|
205
205
|
"data-content": true,
|
|
206
206
|
children: [
|
|
207
|
-
member.description && /* @__PURE__ */
|
|
207
|
+
member.description && /* @__PURE__ */ jsx("p", {
|
|
208
208
|
children: member.description
|
|
209
|
-
}
|
|
210
|
-
hasParams && /* @__PURE__ */
|
|
209
|
+
}),
|
|
210
|
+
hasParams && /* @__PURE__ */ jsxs("div", {
|
|
211
211
|
"data-params-section": true,
|
|
212
212
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ jsx("h4", {
|
|
214
214
|
children: "Parameters"
|
|
215
|
-
}
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
children: sig.parameters.map((param, index) => /* @__PURE__ */
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ jsx("ul", {
|
|
217
|
+
children: sig.parameters.map((param, index) => /* @__PURE__ */ jsxs("li", {
|
|
218
218
|
children: [
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ jsxs("code", {
|
|
220
220
|
children: [
|
|
221
221
|
param.name,
|
|
222
222
|
param.required === false && "?",
|
|
223
223
|
": ",
|
|
224
224
|
formatSchema(param.schema)
|
|
225
225
|
]
|
|
226
|
-
}
|
|
227
|
-
param.description && /* @__PURE__ */
|
|
226
|
+
}),
|
|
227
|
+
param.description && /* @__PURE__ */ jsx("span", {
|
|
228
228
|
children: param.description
|
|
229
|
-
}
|
|
229
|
+
})
|
|
230
230
|
]
|
|
231
|
-
}, param.name ?? index
|
|
232
|
-
}
|
|
231
|
+
}, param.name ?? index))
|
|
232
|
+
})
|
|
233
233
|
]
|
|
234
|
-
}
|
|
235
|
-
sig?.returns && returnType !== "void" && /* @__PURE__ */
|
|
234
|
+
}),
|
|
235
|
+
sig?.returns && returnType !== "void" && /* @__PURE__ */ jsxs("div", {
|
|
236
236
|
"data-returns-section": true,
|
|
237
237
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ jsx("h4", {
|
|
239
239
|
children: "Returns"
|
|
240
|
-
}
|
|
241
|
-
/* @__PURE__ */
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ jsx("code", {
|
|
242
242
|
children: returnType
|
|
243
|
-
}
|
|
244
|
-
sig.returns.description && /* @__PURE__ */
|
|
243
|
+
}),
|
|
244
|
+
sig.returns.description && /* @__PURE__ */ jsx("p", {
|
|
245
245
|
children: sig.returns.description
|
|
246
|
-
}
|
|
246
|
+
})
|
|
247
247
|
]
|
|
248
|
-
}
|
|
248
|
+
})
|
|
249
249
|
]
|
|
250
|
-
}
|
|
250
|
+
}))
|
|
251
251
|
]
|
|
252
|
-
}
|
|
252
|
+
});
|
|
253
253
|
}
|
|
254
254
|
// src/components/headless/ExampleBlock.tsx
|
|
255
255
|
import { useState as useState2 } from "react";
|
|
256
|
-
import {
|
|
256
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
257
257
|
|
|
258
258
|
function getExampleCode(example) {
|
|
259
259
|
if (typeof example === "string")
|
|
@@ -296,46 +296,46 @@ function ExampleBlock({
|
|
|
296
296
|
const currentExample = examples[activeIndex];
|
|
297
297
|
const code = cleanCode(getExampleCode(currentExample));
|
|
298
298
|
if (renderExample) {
|
|
299
|
-
return /* @__PURE__ */
|
|
299
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
300
300
|
className,
|
|
301
301
|
children: [
|
|
302
|
-
showTabs && /* @__PURE__ */
|
|
302
|
+
showTabs && /* @__PURE__ */ jsx2("div", {
|
|
303
303
|
"data-tabs": true,
|
|
304
|
-
children: examples.map((example, index) => /* @__PURE__ */
|
|
304
|
+
children: examples.map((example, index) => /* @__PURE__ */ jsx2("button", {
|
|
305
305
|
type: "button",
|
|
306
306
|
onClick: () => setActiveIndex(index),
|
|
307
307
|
"data-active": activeIndex === index,
|
|
308
308
|
children: getExampleTitle(example) ?? `Example ${index + 1}`
|
|
309
|
-
}, index
|
|
310
|
-
}
|
|
309
|
+
}, index))
|
|
310
|
+
}),
|
|
311
311
|
renderExample(currentExample, activeIndex)
|
|
312
312
|
]
|
|
313
|
-
}
|
|
313
|
+
});
|
|
314
314
|
}
|
|
315
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
316
316
|
className,
|
|
317
317
|
children: [
|
|
318
|
-
showTabs && /* @__PURE__ */
|
|
318
|
+
showTabs && /* @__PURE__ */ jsx2("div", {
|
|
319
319
|
"data-tabs": true,
|
|
320
|
-
children: examples.map((example, index) => /* @__PURE__ */
|
|
320
|
+
children: examples.map((example, index) => /* @__PURE__ */ jsx2("button", {
|
|
321
321
|
type: "button",
|
|
322
322
|
onClick: () => setActiveIndex(index),
|
|
323
323
|
"data-active": activeIndex === index,
|
|
324
324
|
children: getExampleTitle(example) ?? `Example ${index + 1}`
|
|
325
|
-
}, index
|
|
326
|
-
}
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
children: /* @__PURE__ */
|
|
325
|
+
}, index))
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ jsx2("pre", {
|
|
328
|
+
children: /* @__PURE__ */ jsx2("code", {
|
|
329
329
|
"data-language": getExampleLanguage(currentExample),
|
|
330
330
|
children: code
|
|
331
|
-
}
|
|
332
|
-
}
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
333
|
]
|
|
334
|
-
}
|
|
334
|
+
});
|
|
335
335
|
}
|
|
336
336
|
// src/components/headless/ExpandableProperty.tsx
|
|
337
337
|
import { useState as useState3 } from "react";
|
|
338
|
-
import {
|
|
338
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
339
339
|
|
|
340
340
|
function getNestedProperties(schema) {
|
|
341
341
|
if (!schema || typeof schema !== "object")
|
|
@@ -372,30 +372,30 @@ function NestedProperty({
|
|
|
372
372
|
const hasNested = nestedCount > 0;
|
|
373
373
|
const schemaObj = schema;
|
|
374
374
|
const description = schemaObj?.description;
|
|
375
|
-
return /* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
376
376
|
"data-property": name,
|
|
377
377
|
"data-depth": depth,
|
|
378
378
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
380
380
|
"data-row": true,
|
|
381
381
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ jsxs3("span", {
|
|
383
383
|
"data-name": true,
|
|
384
384
|
children: [
|
|
385
385
|
name,
|
|
386
386
|
!required && "?",
|
|
387
387
|
":"
|
|
388
388
|
]
|
|
389
|
-
}
|
|
390
|
-
/* @__PURE__ */
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ jsx3("span", {
|
|
391
391
|
"data-type": true,
|
|
392
392
|
children: hasNested ? "object" : type
|
|
393
|
-
}
|
|
394
|
-
description && /* @__PURE__ */
|
|
393
|
+
}),
|
|
394
|
+
description && /* @__PURE__ */ jsx3("span", {
|
|
395
395
|
"data-description": true,
|
|
396
396
|
children: description
|
|
397
|
-
}
|
|
398
|
-
hasNested && /* @__PURE__ */
|
|
397
|
+
}),
|
|
398
|
+
hasNested && /* @__PURE__ */ jsxs3("button", {
|
|
399
399
|
type: "button",
|
|
400
400
|
onClick: () => setExpanded(!expanded),
|
|
401
401
|
"data-expand": true,
|
|
@@ -403,20 +403,20 @@ function NestedProperty({
|
|
|
403
403
|
nestedCount,
|
|
404
404
|
" properties"
|
|
405
405
|
]
|
|
406
|
-
}
|
|
406
|
+
})
|
|
407
407
|
]
|
|
408
|
-
}
|
|
409
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
408
|
+
}),
|
|
409
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx3("div", {
|
|
410
410
|
"data-nested": true,
|
|
411
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
411
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx3(NestedProperty, {
|
|
412
412
|
name: propName,
|
|
413
413
|
schema: propSchema,
|
|
414
414
|
required: getRequiredFields(schema).includes(propName),
|
|
415
415
|
depth: depth + 1
|
|
416
|
-
}, propName
|
|
417
|
-
}
|
|
416
|
+
}, propName))
|
|
417
|
+
})
|
|
418
418
|
]
|
|
419
|
-
}
|
|
419
|
+
});
|
|
420
420
|
}
|
|
421
421
|
function ExpandableProperty({
|
|
422
422
|
param,
|
|
@@ -429,31 +429,31 @@ function ExpandableProperty({
|
|
|
429
429
|
const nestedProps = getNestedProperties(param.schema);
|
|
430
430
|
const nestedCount = countProperties(param.schema);
|
|
431
431
|
const hasNested = nestedCount > 0;
|
|
432
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
433
433
|
className,
|
|
434
434
|
"data-param": param.name,
|
|
435
435
|
"data-depth": depth,
|
|
436
436
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
438
438
|
"data-row": true,
|
|
439
439
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ jsxs3("span", {
|
|
441
441
|
"data-name": true,
|
|
442
442
|
children: [
|
|
443
443
|
param.name,
|
|
444
444
|
isOptional && "?",
|
|
445
445
|
":"
|
|
446
446
|
]
|
|
447
|
-
}
|
|
448
|
-
/* @__PURE__ */
|
|
447
|
+
}),
|
|
448
|
+
/* @__PURE__ */ jsx3("span", {
|
|
449
449
|
"data-type": true,
|
|
450
450
|
children: hasNested ? "object" : type
|
|
451
|
-
}
|
|
452
|
-
param.description && /* @__PURE__ */
|
|
451
|
+
}),
|
|
452
|
+
param.description && /* @__PURE__ */ jsx3("span", {
|
|
453
453
|
"data-description": true,
|
|
454
454
|
children: param.description
|
|
455
|
-
}
|
|
456
|
-
hasNested && /* @__PURE__ */
|
|
455
|
+
}),
|
|
456
|
+
hasNested && /* @__PURE__ */ jsxs3("button", {
|
|
457
457
|
type: "button",
|
|
458
458
|
onClick: () => setExpanded(!expanded),
|
|
459
459
|
"data-expand": true,
|
|
@@ -461,23 +461,23 @@ function ExpandableProperty({
|
|
|
461
461
|
nestedCount,
|
|
462
462
|
" properties"
|
|
463
463
|
]
|
|
464
|
-
}
|
|
464
|
+
})
|
|
465
465
|
]
|
|
466
|
-
}
|
|
467
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
466
|
+
}),
|
|
467
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx3("div", {
|
|
468
468
|
"data-nested": true,
|
|
469
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
469
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx3(NestedProperty, {
|
|
470
470
|
name: propName,
|
|
471
471
|
schema: propSchema,
|
|
472
472
|
required: getRequiredFields(param.schema).includes(propName),
|
|
473
473
|
depth: depth + 1
|
|
474
|
-
}, propName
|
|
475
|
-
}
|
|
474
|
+
}, propName))
|
|
475
|
+
})
|
|
476
476
|
]
|
|
477
|
-
}
|
|
477
|
+
});
|
|
478
478
|
}
|
|
479
479
|
// src/components/headless/MembersTable.tsx
|
|
480
|
-
import {
|
|
480
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
481
481
|
|
|
482
482
|
function groupMembersByKind(members) {
|
|
483
483
|
const groups = {
|
|
@@ -529,33 +529,33 @@ function MemberRow({ member }) {
|
|
|
529
529
|
badges.push("abstract");
|
|
530
530
|
if (isReadonly)
|
|
531
531
|
badges.push("readonly");
|
|
532
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
533
533
|
"data-member": member.name,
|
|
534
534
|
children: [
|
|
535
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
536
536
|
children: [
|
|
537
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ jsxs4("code", {
|
|
538
538
|
children: [
|
|
539
539
|
member.name,
|
|
540
540
|
signature
|
|
541
541
|
]
|
|
542
|
-
}
|
|
543
|
-
badges.length > 0 && /* @__PURE__ */
|
|
544
|
-
children: badges.map((badge) => /* @__PURE__ */
|
|
542
|
+
}),
|
|
543
|
+
badges.length > 0 && /* @__PURE__ */ jsx4("span", {
|
|
544
|
+
children: badges.map((badge) => /* @__PURE__ */ jsx4("span", {
|
|
545
545
|
"data-badge": badge,
|
|
546
546
|
children: badge
|
|
547
|
-
}, badge
|
|
548
|
-
}
|
|
547
|
+
}, badge))
|
|
548
|
+
})
|
|
549
549
|
]
|
|
550
|
-
}
|
|
551
|
-
!signature && type !== "unknown" && /* @__PURE__ */
|
|
550
|
+
}),
|
|
551
|
+
!signature && type !== "unknown" && /* @__PURE__ */ jsx4("code", {
|
|
552
552
|
children: type
|
|
553
|
-
}
|
|
554
|
-
member.description && /* @__PURE__ */
|
|
553
|
+
}),
|
|
554
|
+
member.description && /* @__PURE__ */ jsx4("p", {
|
|
555
555
|
children: member.description
|
|
556
|
-
}
|
|
556
|
+
})
|
|
557
557
|
]
|
|
558
|
-
}
|
|
558
|
+
});
|
|
559
559
|
}
|
|
560
560
|
function MembersTable({
|
|
561
561
|
members,
|
|
@@ -566,66 +566,66 @@ function MembersTable({
|
|
|
566
566
|
if (!members?.length)
|
|
567
567
|
return null;
|
|
568
568
|
if (!groupByKind) {
|
|
569
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
570
570
|
className,
|
|
571
|
-
children: members.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
571
|
+
children: members.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
572
572
|
member
|
|
573
|
-
}, member.name ?? index
|
|
574
|
-
}
|
|
573
|
+
}, member.name ?? index))
|
|
574
|
+
});
|
|
575
575
|
}
|
|
576
576
|
const groups = groupMembersByKind(members);
|
|
577
|
-
return /* @__PURE__ */
|
|
577
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
578
578
|
className,
|
|
579
579
|
children: [
|
|
580
|
-
groups.constructors.length > 0 && /* @__PURE__ */
|
|
580
|
+
groups.constructors.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
581
581
|
"data-group": "constructors",
|
|
582
582
|
children: [
|
|
583
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
584
584
|
children: "Constructor"
|
|
585
|
-
}
|
|
586
|
-
groups.constructors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
585
|
+
}),
|
|
586
|
+
groups.constructors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
587
587
|
member
|
|
588
|
-
}, member.name ?? index
|
|
588
|
+
}, member.name ?? index))
|
|
589
589
|
]
|
|
590
|
-
}
|
|
591
|
-
groups.properties.length > 0 && /* @__PURE__ */
|
|
590
|
+
}),
|
|
591
|
+
groups.properties.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
592
592
|
"data-group": "properties",
|
|
593
593
|
children: [
|
|
594
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
595
595
|
children: "Properties"
|
|
596
|
-
}
|
|
597
|
-
groups.properties.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
596
|
+
}),
|
|
597
|
+
groups.properties.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
598
598
|
member
|
|
599
|
-
}, member.name ?? index
|
|
599
|
+
}, member.name ?? index))
|
|
600
600
|
]
|
|
601
|
-
}
|
|
602
|
-
groups.methods.length > 0 && /* @__PURE__ */
|
|
601
|
+
}),
|
|
602
|
+
groups.methods.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
603
603
|
"data-group": "methods",
|
|
604
604
|
children: [
|
|
605
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
606
606
|
children: "Methods"
|
|
607
|
-
}
|
|
608
|
-
groups.methods.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
607
|
+
}),
|
|
608
|
+
groups.methods.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
609
609
|
member
|
|
610
|
-
}, member.name ?? index
|
|
610
|
+
}, member.name ?? index))
|
|
611
611
|
]
|
|
612
|
-
}
|
|
613
|
-
groups.accessors.length > 0 && /* @__PURE__ */
|
|
612
|
+
}),
|
|
613
|
+
groups.accessors.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
614
614
|
"data-group": "accessors",
|
|
615
615
|
children: [
|
|
616
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
617
617
|
children: "Accessors"
|
|
618
|
-
}
|
|
619
|
-
groups.accessors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
618
|
+
}),
|
|
619
|
+
groups.accessors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
620
620
|
member
|
|
621
|
-
}, member.name ?? index
|
|
621
|
+
}, member.name ?? index))
|
|
622
622
|
]
|
|
623
|
-
}
|
|
623
|
+
})
|
|
624
624
|
]
|
|
625
|
-
}
|
|
625
|
+
});
|
|
626
626
|
}
|
|
627
627
|
// src/components/headless/ParamTable.tsx
|
|
628
|
-
import {
|
|
628
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
629
629
|
|
|
630
630
|
function isParameter(item) {
|
|
631
631
|
return "required" in item;
|
|
@@ -635,31 +635,31 @@ function ParamRow({ item, showRequired = true }) {
|
|
|
635
635
|
const type = formatSchema(item.schema);
|
|
636
636
|
const description = item.description ?? "";
|
|
637
637
|
const required = isParameter(item) ? item.required : true;
|
|
638
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ jsxs5("tr", {
|
|
639
639
|
children: [
|
|
640
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ jsxs5("td", {
|
|
641
641
|
children: [
|
|
642
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ jsx5("code", {
|
|
643
643
|
children: name
|
|
644
|
-
}
|
|
645
|
-
showRequired && required && /* @__PURE__ */
|
|
644
|
+
}),
|
|
645
|
+
showRequired && required && /* @__PURE__ */ jsx5("span", {
|
|
646
646
|
children: "*"
|
|
647
|
-
}
|
|
648
|
-
showRequired && !required && /* @__PURE__ */
|
|
647
|
+
}),
|
|
648
|
+
showRequired && !required && /* @__PURE__ */ jsx5("span", {
|
|
649
649
|
children: "?"
|
|
650
|
-
}
|
|
650
|
+
})
|
|
651
651
|
]
|
|
652
|
-
}
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
children: /* @__PURE__ */
|
|
652
|
+
}),
|
|
653
|
+
/* @__PURE__ */ jsx5("td", {
|
|
654
|
+
children: /* @__PURE__ */ jsx5("code", {
|
|
655
655
|
children: type
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
/* @__PURE__ */
|
|
656
|
+
})
|
|
657
|
+
}),
|
|
658
|
+
/* @__PURE__ */ jsx5("td", {
|
|
659
659
|
children: description
|
|
660
|
-
}
|
|
660
|
+
})
|
|
661
661
|
]
|
|
662
|
-
}
|
|
662
|
+
});
|
|
663
663
|
}
|
|
664
664
|
function ParamTable({
|
|
665
665
|
items,
|
|
@@ -669,35 +669,35 @@ function ParamTable({
|
|
|
669
669
|
}) {
|
|
670
670
|
if (!items?.length)
|
|
671
671
|
return null;
|
|
672
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ jsxs5("table", {
|
|
673
673
|
className,
|
|
674
674
|
children: [
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
children: /* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ jsx5("thead", {
|
|
676
|
+
children: /* @__PURE__ */ jsxs5("tr", {
|
|
677
677
|
children: [
|
|
678
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ jsx5("th", {
|
|
679
679
|
children: "Name"
|
|
680
|
-
}
|
|
681
|
-
/* @__PURE__ */
|
|
680
|
+
}),
|
|
681
|
+
/* @__PURE__ */ jsx5("th", {
|
|
682
682
|
children: "Type"
|
|
683
|
-
}
|
|
684
|
-
/* @__PURE__ */
|
|
683
|
+
}),
|
|
684
|
+
/* @__PURE__ */ jsx5("th", {
|
|
685
685
|
children: "Description"
|
|
686
|
-
}
|
|
686
|
+
})
|
|
687
687
|
]
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
children: items.map((item, index) => renderRow ? renderRow(item, index) : /* @__PURE__ */
|
|
688
|
+
})
|
|
689
|
+
}),
|
|
690
|
+
/* @__PURE__ */ jsx5("tbody", {
|
|
691
|
+
children: items.map((item, index) => renderRow ? renderRow(item, index) : /* @__PURE__ */ jsx5(ParamRow, {
|
|
692
692
|
item,
|
|
693
693
|
showRequired
|
|
694
|
-
}, item.name ?? index
|
|
695
|
-
}
|
|
694
|
+
}, item.name ?? index))
|
|
695
|
+
})
|
|
696
696
|
]
|
|
697
|
-
}
|
|
697
|
+
});
|
|
698
698
|
}
|
|
699
699
|
// src/components/headless/Signature.tsx
|
|
700
|
-
import {
|
|
700
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
701
701
|
|
|
702
702
|
function Signature({
|
|
703
703
|
export: exp,
|
|
@@ -709,13 +709,13 @@ function Signature({
|
|
|
709
709
|
if (children) {
|
|
710
710
|
return children(signature);
|
|
711
711
|
}
|
|
712
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ jsx6("code", {
|
|
713
713
|
className,
|
|
714
714
|
children: signature
|
|
715
|
-
}
|
|
715
|
+
});
|
|
716
716
|
}
|
|
717
717
|
// src/components/headless/TypeTable.tsx
|
|
718
|
-
import {
|
|
718
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
719
719
|
|
|
720
720
|
function isParameter2(item) {
|
|
721
721
|
return "required" in item;
|
|
@@ -728,25 +728,25 @@ function TypeTable({
|
|
|
728
728
|
}) {
|
|
729
729
|
if (!items?.length)
|
|
730
730
|
return null;
|
|
731
|
-
return /* @__PURE__ */
|
|
731
|
+
return /* @__PURE__ */ jsxs6("table", {
|
|
732
732
|
className,
|
|
733
733
|
children: [
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
-
children: /* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ jsx7("thead", {
|
|
735
|
+
children: /* @__PURE__ */ jsxs6("tr", {
|
|
736
736
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ jsx7("th", {
|
|
738
738
|
children: "Name"
|
|
739
|
-
}
|
|
740
|
-
/* @__PURE__ */
|
|
739
|
+
}),
|
|
740
|
+
/* @__PURE__ */ jsx7("th", {
|
|
741
741
|
children: "Type"
|
|
742
|
-
}
|
|
743
|
-
/* @__PURE__ */
|
|
742
|
+
}),
|
|
743
|
+
/* @__PURE__ */ jsx7("th", {
|
|
744
744
|
children: "Description"
|
|
745
|
-
}
|
|
745
|
+
})
|
|
746
746
|
]
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
/* @__PURE__ */
|
|
747
|
+
})
|
|
748
|
+
}),
|
|
749
|
+
/* @__PURE__ */ jsx7("tbody", {
|
|
750
750
|
children: items.map((item, index) => {
|
|
751
751
|
if (renderRow) {
|
|
752
752
|
return renderRow(item, index);
|
|
@@ -755,35 +755,35 @@ function TypeTable({
|
|
|
755
755
|
const type = formatSchema(item.schema);
|
|
756
756
|
const description = item.description ?? "";
|
|
757
757
|
const required = isParameter2(item) ? item.required : true;
|
|
758
|
-
return /* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ jsxs6("tr", {
|
|
759
759
|
children: [
|
|
760
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ jsxs6("td", {
|
|
761
761
|
children: [
|
|
762
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ jsx7("code", {
|
|
763
763
|
children: name
|
|
764
|
-
}
|
|
765
|
-
showRequired && required && /* @__PURE__ */
|
|
764
|
+
}),
|
|
765
|
+
showRequired && required && /* @__PURE__ */ jsx7("span", {
|
|
766
766
|
children: "*"
|
|
767
|
-
}
|
|
768
|
-
showRequired && !required && /* @__PURE__ */
|
|
767
|
+
}),
|
|
768
|
+
showRequired && !required && /* @__PURE__ */ jsx7("span", {
|
|
769
769
|
children: "?"
|
|
770
|
-
}
|
|
770
|
+
})
|
|
771
771
|
]
|
|
772
|
-
}
|
|
773
|
-
/* @__PURE__ */
|
|
774
|
-
children: /* @__PURE__ */
|
|
772
|
+
}),
|
|
773
|
+
/* @__PURE__ */ jsx7("td", {
|
|
774
|
+
children: /* @__PURE__ */ jsx7("code", {
|
|
775
775
|
children: type
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
/* @__PURE__ */
|
|
776
|
+
})
|
|
777
|
+
}),
|
|
778
|
+
/* @__PURE__ */ jsx7("td", {
|
|
779
779
|
children: description
|
|
780
|
-
}
|
|
780
|
+
})
|
|
781
781
|
]
|
|
782
|
-
}, name
|
|
782
|
+
}, name);
|
|
783
783
|
})
|
|
784
|
-
}
|
|
784
|
+
})
|
|
785
785
|
]
|
|
786
|
-
}
|
|
786
|
+
});
|
|
787
787
|
}
|
|
788
788
|
export {
|
|
789
789
|
groupMembersByKind,
|