@openpkg-ts/doc-generator 0.4.0 → 0.5.1
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.d.ts +111 -12
- package/dist/react-styled.js +553 -344
- package/package.json +1 -1
package/dist/react-styled.js
CHANGED
|
@@ -4195,7 +4195,7 @@ function TypeTable({
|
|
|
4195
4195
|
// src/components/styled/index.ts
|
|
4196
4196
|
import { CodeTabs, ImportSection } from "@doccov/ui/api";
|
|
4197
4197
|
|
|
4198
|
-
// src/components/styled/
|
|
4198
|
+
// src/components/styled/sections/ClassSection.tsx
|
|
4199
4199
|
import {
|
|
4200
4200
|
APIParameterItem,
|
|
4201
4201
|
APISection,
|
|
@@ -4328,7 +4328,7 @@ function buildImportStatement(exp, spec) {
|
|
|
4328
4328
|
return `import { ${alias} } from '${importPath}'`;
|
|
4329
4329
|
}
|
|
4330
4330
|
|
|
4331
|
-
// src/components/styled/
|
|
4331
|
+
// src/components/styled/sections/ClassSection.tsx
|
|
4332
4332
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4333
4333
|
|
|
4334
4334
|
function formatMethodSignature(member) {
|
|
@@ -4352,7 +4352,7 @@ function getMemberBadges(member) {
|
|
|
4352
4352
|
badges.push("async");
|
|
4353
4353
|
return badges;
|
|
4354
4354
|
}
|
|
4355
|
-
function
|
|
4355
|
+
function ClassSection({ export: exp, spec }) {
|
|
4356
4356
|
const constructors = exp.members?.filter((m) => m.kind === "constructor") ?? [];
|
|
4357
4357
|
const properties = exp.members?.filter((m) => m.kind === "property" || m.kind === "field") ?? [];
|
|
4358
4358
|
const methods = exp.members?.filter((m) => m.kind === "method") ?? [];
|
|
@@ -4377,104 +4377,114 @@ const instance = new ${exp.name}(${constructorParams.map((p) => p.name).join(",
|
|
|
4377
4377
|
exp.extends && `extends ${exp.extends}`,
|
|
4378
4378
|
exp.implements?.length && `implements ${exp.implements.join(", ")}`
|
|
4379
4379
|
].filter(Boolean).join(" ");
|
|
4380
|
-
return /* @__PURE__ */
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
description: /* @__PURE__ */ jsxs7("div", {
|
|
4386
|
-
className: "space-y-3",
|
|
4387
|
-
children: [
|
|
4388
|
-
inheritance && /* @__PURE__ */ jsx8("p", {
|
|
4389
|
-
className: "font-mono text-sm text-muted-foreground",
|
|
4390
|
-
children: inheritance
|
|
4391
|
-
}),
|
|
4392
|
-
exp.description && /* @__PURE__ */ jsx8("p", {
|
|
4393
|
-
children: exp.description
|
|
4394
|
-
}),
|
|
4395
|
-
/* @__PURE__ */ jsx8("code", {
|
|
4396
|
-
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
4397
|
-
children: importStatement
|
|
4398
|
-
})
|
|
4399
|
-
]
|
|
4400
|
-
}),
|
|
4401
|
-
languages: displayLanguages,
|
|
4402
|
-
examples: displayExamples,
|
|
4403
|
-
codePanelTitle: `new ${exp.name}()`,
|
|
4380
|
+
return /* @__PURE__ */ jsxs7(APISection, {
|
|
4381
|
+
id: exp.id || exp.name,
|
|
4382
|
+
title: `class ${exp.name}`,
|
|
4383
|
+
description: /* @__PURE__ */ jsxs7("div", {
|
|
4384
|
+
className: "space-y-3",
|
|
4404
4385
|
children: [
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
children:
|
|
4408
|
-
const apiParam = specParamToAPIParam(param);
|
|
4409
|
-
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4410
|
-
name: apiParam.name,
|
|
4411
|
-
type: apiParam.type,
|
|
4412
|
-
required: apiParam.required,
|
|
4413
|
-
description: apiParam.description,
|
|
4414
|
-
children: apiParam.children
|
|
4415
|
-
}, param.name ?? index);
|
|
4416
|
-
})
|
|
4386
|
+
inheritance && /* @__PURE__ */ jsx8("p", {
|
|
4387
|
+
className: "font-mono text-sm text-muted-foreground",
|
|
4388
|
+
children: inheritance
|
|
4417
4389
|
}),
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
className: "mt-6",
|
|
4421
|
-
children: [
|
|
4422
|
-
staticProperties.map((member) => {
|
|
4423
|
-
const badges = getMemberBadges(member);
|
|
4424
|
-
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4425
|
-
name: member.name,
|
|
4426
|
-
type: formatSchema(member.schema),
|
|
4427
|
-
description: badges.length > 0 ? `[${badges.join(", ")}] ${member.description || ""}` : member.description
|
|
4428
|
-
}, member.name);
|
|
4429
|
-
}),
|
|
4430
|
-
staticMethods.map((member) => {
|
|
4431
|
-
const badges = getMemberBadges(member);
|
|
4432
|
-
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4433
|
-
name: `${member.name}()`,
|
|
4434
|
-
type: formatMethodSignature(member),
|
|
4435
|
-
description: badges.length > 0 ? `[${badges.join(", ")}] ${member.description || ""}` : member.description
|
|
4436
|
-
}, member.name);
|
|
4437
|
-
})
|
|
4438
|
-
]
|
|
4390
|
+
exp.description && /* @__PURE__ */ jsx8("p", {
|
|
4391
|
+
children: exp.description
|
|
4439
4392
|
}),
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4393
|
+
/* @__PURE__ */ jsx8("code", {
|
|
4394
|
+
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
4395
|
+
children: importStatement
|
|
4396
|
+
})
|
|
4397
|
+
]
|
|
4398
|
+
}),
|
|
4399
|
+
languages: displayLanguages,
|
|
4400
|
+
examples: displayExamples,
|
|
4401
|
+
codePanelTitle: `new ${exp.name}()`,
|
|
4402
|
+
children: [
|
|
4403
|
+
constructorParams.length > 0 && /* @__PURE__ */ jsx8(ParameterList, {
|
|
4404
|
+
title: "Constructor",
|
|
4405
|
+
children: constructorParams.map((param, index) => {
|
|
4406
|
+
const apiParam = specParamToAPIParam(param);
|
|
4407
|
+
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4408
|
+
name: apiParam.name,
|
|
4409
|
+
type: apiParam.type,
|
|
4410
|
+
required: apiParam.required,
|
|
4411
|
+
description: apiParam.description,
|
|
4412
|
+
children: apiParam.children
|
|
4413
|
+
}, param.name ?? index);
|
|
4414
|
+
})
|
|
4415
|
+
}),
|
|
4416
|
+
(staticProperties.length > 0 || staticMethods.length > 0) && /* @__PURE__ */ jsxs7(ParameterList, {
|
|
4417
|
+
title: "Static Members",
|
|
4418
|
+
className: "mt-6",
|
|
4419
|
+
children: [
|
|
4420
|
+
staticProperties.map((member) => {
|
|
4444
4421
|
const badges = getMemberBadges(member);
|
|
4445
4422
|
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4446
|
-
name:
|
|
4447
|
-
type:
|
|
4423
|
+
name: member.name,
|
|
4424
|
+
type: formatSchema(member.schema),
|
|
4448
4425
|
description: badges.length > 0 ? `[${badges.join(", ")}] ${member.description || ""}` : member.description
|
|
4449
4426
|
}, member.name);
|
|
4450
|
-
})
|
|
4451
|
-
|
|
4452
|
-
instanceProperties.length > 0 && /* @__PURE__ */ jsx8(ParameterList, {
|
|
4453
|
-
title: "Properties",
|
|
4454
|
-
className: "mt-6",
|
|
4455
|
-
children: instanceProperties.map((member) => {
|
|
4427
|
+
}),
|
|
4428
|
+
staticMethods.map((member) => {
|
|
4456
4429
|
const badges = getMemberBadges(member);
|
|
4457
4430
|
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4458
|
-
name: member.name
|
|
4459
|
-
type:
|
|
4431
|
+
name: `${member.name}()`,
|
|
4432
|
+
type: formatMethodSignature(member),
|
|
4460
4433
|
description: badges.length > 0 ? `[${badges.join(", ")}] ${member.description || ""}` : member.description
|
|
4461
4434
|
}, member.name);
|
|
4462
4435
|
})
|
|
4436
|
+
]
|
|
4437
|
+
}),
|
|
4438
|
+
instanceMethods.length > 0 && /* @__PURE__ */ jsx8(ParameterList, {
|
|
4439
|
+
title: "Methods",
|
|
4440
|
+
className: "mt-6",
|
|
4441
|
+
children: instanceMethods.map((member) => {
|
|
4442
|
+
const badges = getMemberBadges(member);
|
|
4443
|
+
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4444
|
+
name: `${member.name}()`,
|
|
4445
|
+
type: formatMethodSignature(member),
|
|
4446
|
+
description: badges.length > 0 ? `[${badges.join(", ")}] ${member.description || ""}` : member.description
|
|
4447
|
+
}, member.name);
|
|
4463
4448
|
})
|
|
4464
|
-
|
|
4449
|
+
}),
|
|
4450
|
+
instanceProperties.length > 0 && /* @__PURE__ */ jsx8(ParameterList, {
|
|
4451
|
+
title: "Properties",
|
|
4452
|
+
className: "mt-6",
|
|
4453
|
+
children: instanceProperties.map((member) => {
|
|
4454
|
+
const badges = getMemberBadges(member);
|
|
4455
|
+
return /* @__PURE__ */ jsx8(APIParameterItem, {
|
|
4456
|
+
name: member.name,
|
|
4457
|
+
type: formatSchema(member.schema),
|
|
4458
|
+
description: badges.length > 0 ? `[${badges.join(", ")}] ${member.description || ""}` : member.description
|
|
4459
|
+
}, member.name);
|
|
4460
|
+
})
|
|
4461
|
+
})
|
|
4462
|
+
]
|
|
4463
|
+
});
|
|
4464
|
+
}
|
|
4465
|
+
|
|
4466
|
+
// src/components/styled/ClassPage.tsx
|
|
4467
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4468
|
+
|
|
4469
|
+
function ClassPage({ export: exp, spec }) {
|
|
4470
|
+
return /* @__PURE__ */ jsx9("div", {
|
|
4471
|
+
className: "doccov-class-page not-prose",
|
|
4472
|
+
children: /* @__PURE__ */ jsx9(ClassSection, {
|
|
4473
|
+
export: exp,
|
|
4474
|
+
spec
|
|
4465
4475
|
})
|
|
4466
4476
|
});
|
|
4467
4477
|
}
|
|
4468
4478
|
|
|
4469
|
-
// src/components/styled/
|
|
4479
|
+
// src/components/styled/sections/EnumSection.tsx
|
|
4470
4480
|
import {
|
|
4471
4481
|
APIParameterItem as APIParameterItem2,
|
|
4472
4482
|
APISection as APISection2,
|
|
4473
4483
|
ParameterList as ParameterList2
|
|
4474
4484
|
} from "@doccov/ui/docskit";
|
|
4475
|
-
import { jsx as
|
|
4485
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4476
4486
|
|
|
4477
|
-
function
|
|
4487
|
+
function EnumSection({ export: exp, spec }) {
|
|
4478
4488
|
const members = exp.members ?? [];
|
|
4479
4489
|
const languages = getLanguagesFromExamples(exp.examples);
|
|
4480
4490
|
const examples = specExamplesToCodeExamples(exp.examples);
|
|
@@ -4494,50 +4504,60 @@ ${enumDefinition}`,
|
|
|
4494
4504
|
highlightLang: "ts"
|
|
4495
4505
|
}];
|
|
4496
4506
|
const displayLanguages = languages.length > 0 ? languages : [{ id: "typescript", label: "TypeScript" }];
|
|
4497
|
-
return /* @__PURE__ */
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
4519
|
-
children: importStatement
|
|
4520
|
-
})
|
|
4521
|
-
]
|
|
4522
|
-
}),
|
|
4523
|
-
languages: displayLanguages,
|
|
4524
|
-
examples: displayExamples,
|
|
4525
|
-
codePanelTitle: exp.name,
|
|
4526
|
-
children: members.length > 0 && /* @__PURE__ */ jsx9(ParameterList2, {
|
|
4527
|
-
title: "Members",
|
|
4528
|
-
children: members.map((member, index) => {
|
|
4529
|
-
const value = member.schema !== undefined ? typeof member.schema === "object" && member.schema !== null ? member.schema.const ?? member.schema.default ?? undefined : member.schema : undefined;
|
|
4530
|
-
return /* @__PURE__ */ jsx9(APIParameterItem2, {
|
|
4531
|
-
name: member.name,
|
|
4532
|
-
type: value !== undefined ? String(value) : "auto",
|
|
4533
|
-
description: member.description
|
|
4534
|
-
}, member.name ?? index);
|
|
4507
|
+
return /* @__PURE__ */ jsx10(APISection2, {
|
|
4508
|
+
id: exp.id || exp.name,
|
|
4509
|
+
title: `enum ${exp.name}`,
|
|
4510
|
+
description: /* @__PURE__ */ jsxs8("div", {
|
|
4511
|
+
className: "space-y-3",
|
|
4512
|
+
children: [
|
|
4513
|
+
exp.description && /* @__PURE__ */ jsx10("p", {
|
|
4514
|
+
children: exp.description
|
|
4515
|
+
}),
|
|
4516
|
+
exp.deprecated && /* @__PURE__ */ jsxs8("div", {
|
|
4517
|
+
className: "rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
|
|
4518
|
+
children: [
|
|
4519
|
+
/* @__PURE__ */ jsx10("strong", {
|
|
4520
|
+
children: "Deprecated:"
|
|
4521
|
+
}),
|
|
4522
|
+
" This export is deprecated."
|
|
4523
|
+
]
|
|
4524
|
+
}),
|
|
4525
|
+
/* @__PURE__ */ jsx10("code", {
|
|
4526
|
+
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
4527
|
+
children: importStatement
|
|
4535
4528
|
})
|
|
4529
|
+
]
|
|
4530
|
+
}),
|
|
4531
|
+
languages: displayLanguages,
|
|
4532
|
+
examples: displayExamples,
|
|
4533
|
+
codePanelTitle: exp.name,
|
|
4534
|
+
children: members.length > 0 && /* @__PURE__ */ jsx10(ParameterList2, {
|
|
4535
|
+
title: "Members",
|
|
4536
|
+
children: members.map((member, index) => {
|
|
4537
|
+
const value = member.schema !== undefined ? typeof member.schema === "object" && member.schema !== null ? member.schema.const ?? member.schema.default ?? undefined : member.schema : undefined;
|
|
4538
|
+
return /* @__PURE__ */ jsx10(APIParameterItem2, {
|
|
4539
|
+
name: member.name,
|
|
4540
|
+
type: value !== undefined ? String(value) : "auto",
|
|
4541
|
+
description: member.description
|
|
4542
|
+
}, member.name ?? index);
|
|
4536
4543
|
})
|
|
4537
4544
|
})
|
|
4538
4545
|
});
|
|
4539
4546
|
}
|
|
4540
4547
|
|
|
4548
|
+
// src/components/styled/EnumPage.tsx
|
|
4549
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4550
|
+
|
|
4551
|
+
function EnumPage({ export: exp, spec }) {
|
|
4552
|
+
return /* @__PURE__ */ jsx11("div", {
|
|
4553
|
+
className: "doccov-enum-page not-prose",
|
|
4554
|
+
children: /* @__PURE__ */ jsx11(EnumSection, {
|
|
4555
|
+
export: exp,
|
|
4556
|
+
spec
|
|
4557
|
+
})
|
|
4558
|
+
});
|
|
4559
|
+
}
|
|
4560
|
+
|
|
4541
4561
|
// src/components/styled/ExportIndexPage.tsx
|
|
4542
4562
|
import { cn as cn2 } from "@doccov/ui/lib/utils";
|
|
4543
4563
|
|
|
@@ -22578,7 +22598,7 @@ import { useState as useState4, useMemo } from "react";
|
|
|
22578
22598
|
// src/components/styled/ExportCard.tsx
|
|
22579
22599
|
var import_link3 = __toESM(require_link(), 1);
|
|
22580
22600
|
import { cn } from "@doccov/ui/lib/utils";
|
|
22581
|
-
import { jsx as
|
|
22601
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
22582
22602
|
|
|
22583
22603
|
var KIND_COLORS = {
|
|
22584
22604
|
function: "group-hover:text-blue-600 dark:group-hover:text-blue-400",
|
|
@@ -22613,21 +22633,21 @@ function ExportCard({
|
|
|
22613
22633
|
/* @__PURE__ */ jsxs9("div", {
|
|
22614
22634
|
className: "flex items-center gap-2 mb-2",
|
|
22615
22635
|
children: [
|
|
22616
|
-
/* @__PURE__ */
|
|
22636
|
+
/* @__PURE__ */ jsx12("span", {
|
|
22617
22637
|
className: cn("font-mono text-base font-medium text-foreground transition-colors duration-200", hoverColor),
|
|
22618
22638
|
children: name
|
|
22619
22639
|
}),
|
|
22620
|
-
isFunction && /* @__PURE__ */
|
|
22640
|
+
isFunction && /* @__PURE__ */ jsx12("span", {
|
|
22621
22641
|
className: "font-mono text-base text-muted-foreground",
|
|
22622
22642
|
children: "()"
|
|
22623
22643
|
}),
|
|
22624
|
-
/* @__PURE__ */
|
|
22644
|
+
/* @__PURE__ */ jsx12("span", {
|
|
22625
22645
|
className: cn("ml-auto text-xs px-2 py-0.5 rounded-full font-medium", badgeColor),
|
|
22626
22646
|
children: kind
|
|
22627
22647
|
})
|
|
22628
22648
|
]
|
|
22629
22649
|
}),
|
|
22630
|
-
description && /* @__PURE__ */
|
|
22650
|
+
description && /* @__PURE__ */ jsx12("p", {
|
|
22631
22651
|
className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed group-hover:text-muted-foreground/80 transition-colors",
|
|
22632
22652
|
children: description
|
|
22633
22653
|
})
|
|
@@ -22636,7 +22656,7 @@ function ExportCard({
|
|
|
22636
22656
|
}
|
|
22637
22657
|
|
|
22638
22658
|
// src/components/styled/ExportIndexPage.tsx
|
|
22639
|
-
import { jsx as
|
|
22659
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
22640
22660
|
|
|
22641
22661
|
var KIND_ORDER = ["function", "class", "interface", "type", "enum", "variable"];
|
|
22642
22662
|
var KIND_LABELS = {
|
|
@@ -22692,11 +22712,11 @@ function ExportIndexPage({
|
|
|
22692
22712
|
children: [
|
|
22693
22713
|
/* @__PURE__ */ jsxs10("div", {
|
|
22694
22714
|
children: [
|
|
22695
|
-
/* @__PURE__ */
|
|
22715
|
+
/* @__PURE__ */ jsx13("h1", {
|
|
22696
22716
|
className: "text-3xl font-bold text-foreground mb-3",
|
|
22697
22717
|
children: spec.meta.name || "API Reference"
|
|
22698
22718
|
}),
|
|
22699
|
-
(description || spec.meta.description) && /* @__PURE__ */
|
|
22719
|
+
(description || spec.meta.description) && /* @__PURE__ */ jsx13("p", {
|
|
22700
22720
|
className: "text-muted-foreground text-lg leading-relaxed max-w-3xl",
|
|
22701
22721
|
children: description || spec.meta.description
|
|
22702
22722
|
})
|
|
@@ -22708,11 +22728,11 @@ function ExportIndexPage({
|
|
|
22708
22728
|
showSearch && /* @__PURE__ */ jsxs10("div", {
|
|
22709
22729
|
className: "relative max-w-md",
|
|
22710
22730
|
children: [
|
|
22711
|
-
/* @__PURE__ */
|
|
22731
|
+
/* @__PURE__ */ jsx13(Search, {
|
|
22712
22732
|
size: 18,
|
|
22713
22733
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
22714
22734
|
}),
|
|
22715
|
-
/* @__PURE__ */
|
|
22735
|
+
/* @__PURE__ */ jsx13("input", {
|
|
22716
22736
|
type: "text",
|
|
22717
22737
|
placeholder: "Search exports...",
|
|
22718
22738
|
value: searchQuery,
|
|
@@ -22724,13 +22744,13 @@ function ExportIndexPage({
|
|
|
22724
22744
|
showFilters && availableKinds.length > 1 && /* @__PURE__ */ jsxs10("div", {
|
|
22725
22745
|
className: "flex flex-wrap gap-2",
|
|
22726
22746
|
children: [
|
|
22727
|
-
/* @__PURE__ */
|
|
22747
|
+
/* @__PURE__ */ jsx13("button", {
|
|
22728
22748
|
type: "button",
|
|
22729
22749
|
onClick: () => setActiveFilter("all"),
|
|
22730
22750
|
className: cn2("px-3 py-1.5 text-sm rounded-md transition-all cursor-pointer", activeFilter === "all" ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),
|
|
22731
22751
|
children: "All"
|
|
22732
22752
|
}),
|
|
22733
|
-
availableKinds.map((kind) => /* @__PURE__ */
|
|
22753
|
+
availableKinds.map((kind) => /* @__PURE__ */ jsx13("button", {
|
|
22734
22754
|
type: "button",
|
|
22735
22755
|
onClick: () => setActiveFilter(kind),
|
|
22736
22756
|
className: cn2("px-3 py-1.5 text-sm rounded-md transition-all cursor-pointer", activeFilter === kind ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),
|
|
@@ -22751,13 +22771,13 @@ function ExportIndexPage({
|
|
|
22751
22771
|
}),
|
|
22752
22772
|
filteredGroups.map((group) => /* @__PURE__ */ jsxs10("section", {
|
|
22753
22773
|
children: [
|
|
22754
|
-
/* @__PURE__ */
|
|
22774
|
+
/* @__PURE__ */ jsx13("h2", {
|
|
22755
22775
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
22756
22776
|
children: group.label
|
|
22757
22777
|
}),
|
|
22758
|
-
/* @__PURE__ */
|
|
22778
|
+
/* @__PURE__ */ jsx13("div", {
|
|
22759
22779
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
22760
|
-
children: group.exports.map((exp) => /* @__PURE__ */
|
|
22780
|
+
children: group.exports.map((exp) => /* @__PURE__ */ jsx13(ExportCard, {
|
|
22761
22781
|
name: exp.name,
|
|
22762
22782
|
description: exp.description,
|
|
22763
22783
|
href: `${baseHref}/${group.kind}s/${exp.id}`,
|
|
@@ -22769,11 +22789,11 @@ function ExportIndexPage({
|
|
|
22769
22789
|
filteredGroups.length === 0 && /* @__PURE__ */ jsxs10("div", {
|
|
22770
22790
|
className: "rounded-lg border border-border bg-card/50 p-8 text-center",
|
|
22771
22791
|
children: [
|
|
22772
|
-
/* @__PURE__ */
|
|
22792
|
+
/* @__PURE__ */ jsx13("p", {
|
|
22773
22793
|
className: "text-muted-foreground",
|
|
22774
22794
|
children: searchQuery || activeFilter !== "all" ? "No exports match your search." : "No exports found in this package."
|
|
22775
22795
|
}),
|
|
22776
|
-
(searchQuery || activeFilter !== "all") && /* @__PURE__ */
|
|
22796
|
+
(searchQuery || activeFilter !== "all") && /* @__PURE__ */ jsx13("button", {
|
|
22777
22797
|
type: "button",
|
|
22778
22798
|
onClick: () => {
|
|
22779
22799
|
setSearchQuery("");
|
|
@@ -22788,22 +22808,21 @@ function ExportIndexPage({
|
|
|
22788
22808
|
});
|
|
22789
22809
|
}
|
|
22790
22810
|
|
|
22791
|
-
// src/components/styled/
|
|
22811
|
+
// src/components/styled/sections/FunctionSection.tsx
|
|
22792
22812
|
import {
|
|
22793
22813
|
APIParameterItem as APIParameterItem3,
|
|
22794
22814
|
APISection as APISection3,
|
|
22795
22815
|
ParameterList as ParameterList3,
|
|
22796
22816
|
ResponseBlock
|
|
22797
22817
|
} from "@doccov/ui/docskit";
|
|
22798
|
-
import { jsx as
|
|
22818
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
22799
22819
|
|
|
22800
|
-
function
|
|
22820
|
+
function FunctionSection({
|
|
22801
22821
|
export: exp,
|
|
22802
22822
|
spec
|
|
22803
22823
|
}) {
|
|
22804
22824
|
const sig = exp.signatures?.[0];
|
|
22805
22825
|
const hasParams = sig?.parameters && sig.parameters.length > 0;
|
|
22806
|
-
const hasExamples = exp.examples && exp.examples.length > 0;
|
|
22807
22826
|
const languages = getLanguagesFromExamples(exp.examples);
|
|
22808
22827
|
const examples = specExamplesToCodeExamples(exp.examples);
|
|
22809
22828
|
const importStatement = buildImportStatement(exp, spec);
|
|
@@ -22816,76 +22835,89 @@ ${exp.name}(${sig?.parameters?.map((p) => p.name).join(", ") || ""})`,
|
|
|
22816
22835
|
highlightLang: "ts"
|
|
22817
22836
|
}];
|
|
22818
22837
|
const displayLanguages = languages.length > 0 ? languages : [{ id: "typescript", label: "TypeScript" }];
|
|
22819
|
-
return /* @__PURE__ */
|
|
22820
|
-
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
description: /* @__PURE__ */ jsxs11("div", {
|
|
22825
|
-
className: "space-y-3",
|
|
22826
|
-
children: [
|
|
22827
|
-
exp.description && /* @__PURE__ */ jsx12("p", {
|
|
22828
|
-
children: exp.description
|
|
22829
|
-
}),
|
|
22830
|
-
/* @__PURE__ */ jsx12("code", {
|
|
22831
|
-
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
22832
|
-
children: importStatement
|
|
22833
|
-
})
|
|
22834
|
-
]
|
|
22835
|
-
}),
|
|
22836
|
-
languages: displayLanguages,
|
|
22837
|
-
examples: displayExamples,
|
|
22838
|
-
codePanelTitle: `${exp.name}()`,
|
|
22838
|
+
return /* @__PURE__ */ jsxs11(APISection3, {
|
|
22839
|
+
id: exp.id || exp.name,
|
|
22840
|
+
title: `${exp.name}()`,
|
|
22841
|
+
description: /* @__PURE__ */ jsxs11("div", {
|
|
22842
|
+
className: "space-y-3",
|
|
22839
22843
|
children: [
|
|
22840
|
-
|
|
22841
|
-
|
|
22842
|
-
children: sig.parameters.map((param, index) => {
|
|
22843
|
-
const apiParam = specParamToAPIParam(param);
|
|
22844
|
-
return /* @__PURE__ */ jsx12(APIParameterItem3, {
|
|
22845
|
-
name: apiParam.name,
|
|
22846
|
-
type: apiParam.type,
|
|
22847
|
-
required: apiParam.required,
|
|
22848
|
-
description: apiParam.description,
|
|
22849
|
-
children: apiParam.children
|
|
22850
|
-
}, param.name ?? index);
|
|
22851
|
-
})
|
|
22844
|
+
exp.description && /* @__PURE__ */ jsx14("p", {
|
|
22845
|
+
children: exp.description
|
|
22852
22846
|
}),
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22856
|
-
/* @__PURE__ */ jsx12("span", {
|
|
22857
|
-
className: "font-mono text-sm font-medium",
|
|
22858
|
-
children: formatSchema(sig.returns.schema)
|
|
22859
|
-
}),
|
|
22860
|
-
sig.returns.description && /* @__PURE__ */ jsx12("span", {
|
|
22861
|
-
className: "ml-2 text-muted-foreground",
|
|
22862
|
-
children: sig.returns.description
|
|
22863
|
-
})
|
|
22864
|
-
]
|
|
22865
|
-
}),
|
|
22866
|
-
className: "mt-6"
|
|
22867
|
-
}),
|
|
22868
|
-
exp.typeParameters && exp.typeParameters.length > 0 && /* @__PURE__ */ jsx12(ParameterList3, {
|
|
22869
|
-
title: "Type Parameters",
|
|
22870
|
-
className: "mt-6",
|
|
22871
|
-
children: exp.typeParameters.map((tp) => /* @__PURE__ */ jsx12(APIParameterItem3, {
|
|
22872
|
-
name: tp.name,
|
|
22873
|
-
type: tp.constraint || "unknown",
|
|
22874
|
-
description: tp.default ? `Default: ${tp.default}` : undefined
|
|
22875
|
-
}, tp.name))
|
|
22847
|
+
/* @__PURE__ */ jsx14("code", {
|
|
22848
|
+
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
22849
|
+
children: importStatement
|
|
22876
22850
|
})
|
|
22877
22851
|
]
|
|
22852
|
+
}),
|
|
22853
|
+
languages: displayLanguages,
|
|
22854
|
+
examples: displayExamples,
|
|
22855
|
+
codePanelTitle: `${exp.name}()`,
|
|
22856
|
+
children: [
|
|
22857
|
+
hasParams && /* @__PURE__ */ jsx14(ParameterList3, {
|
|
22858
|
+
title: "Parameters",
|
|
22859
|
+
children: sig.parameters.map((param, index) => {
|
|
22860
|
+
const apiParam = specParamToAPIParam(param);
|
|
22861
|
+
return /* @__PURE__ */ jsx14(APIParameterItem3, {
|
|
22862
|
+
name: apiParam.name,
|
|
22863
|
+
type: apiParam.type,
|
|
22864
|
+
required: apiParam.required,
|
|
22865
|
+
description: apiParam.description,
|
|
22866
|
+
children: apiParam.children
|
|
22867
|
+
}, param.name ?? index);
|
|
22868
|
+
})
|
|
22869
|
+
}),
|
|
22870
|
+
sig?.returns && /* @__PURE__ */ jsx14(ResponseBlock, {
|
|
22871
|
+
description: /* @__PURE__ */ jsxs11("span", {
|
|
22872
|
+
children: [
|
|
22873
|
+
/* @__PURE__ */ jsx14("span", {
|
|
22874
|
+
className: "font-mono text-sm font-medium",
|
|
22875
|
+
children: formatSchema(sig.returns.schema)
|
|
22876
|
+
}),
|
|
22877
|
+
sig.returns.description && /* @__PURE__ */ jsx14("span", {
|
|
22878
|
+
className: "ml-2 text-muted-foreground",
|
|
22879
|
+
children: sig.returns.description
|
|
22880
|
+
})
|
|
22881
|
+
]
|
|
22882
|
+
}),
|
|
22883
|
+
className: "mt-6"
|
|
22884
|
+
}),
|
|
22885
|
+
exp.typeParameters && exp.typeParameters.length > 0 && /* @__PURE__ */ jsx14(ParameterList3, {
|
|
22886
|
+
title: "Type Parameters",
|
|
22887
|
+
className: "mt-6",
|
|
22888
|
+
children: exp.typeParameters.map((tp) => /* @__PURE__ */ jsx14(APIParameterItem3, {
|
|
22889
|
+
name: tp.name,
|
|
22890
|
+
type: tp.constraint || "unknown",
|
|
22891
|
+
description: tp.default ? `Default: ${tp.default}` : undefined
|
|
22892
|
+
}, tp.name))
|
|
22893
|
+
})
|
|
22894
|
+
]
|
|
22895
|
+
});
|
|
22896
|
+
}
|
|
22897
|
+
|
|
22898
|
+
// src/components/styled/FunctionPage.tsx
|
|
22899
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
22900
|
+
|
|
22901
|
+
function FunctionPage({
|
|
22902
|
+
export: exp,
|
|
22903
|
+
spec
|
|
22904
|
+
}) {
|
|
22905
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
22906
|
+
className: "doccov-function-page not-prose",
|
|
22907
|
+
children: /* @__PURE__ */ jsx15(FunctionSection, {
|
|
22908
|
+
export: exp,
|
|
22909
|
+
spec
|
|
22878
22910
|
})
|
|
22879
22911
|
});
|
|
22880
22912
|
}
|
|
22881
22913
|
|
|
22882
|
-
// src/components/styled/
|
|
22914
|
+
// src/components/styled/sections/InterfaceSection.tsx
|
|
22883
22915
|
import {
|
|
22884
22916
|
APIParameterItem as APIParameterItem4,
|
|
22885
22917
|
APISection as APISection4,
|
|
22886
22918
|
ParameterList as ParameterList4
|
|
22887
22919
|
} from "@doccov/ui/docskit";
|
|
22888
|
-
import { jsx as
|
|
22920
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
22889
22921
|
|
|
22890
22922
|
function formatMethodSignature2(member) {
|
|
22891
22923
|
const sig = member.signatures?.[0];
|
|
@@ -22894,7 +22926,7 @@ function formatMethodSignature2(member) {
|
|
|
22894
22926
|
const paramStr = params.map((p) => `${p.name}${p.required === false ? "?" : ""}: ${formatSchema(p.schema)}`).join(", ");
|
|
22895
22927
|
return `(${paramStr}): ${returnType}`;
|
|
22896
22928
|
}
|
|
22897
|
-
function
|
|
22929
|
+
function InterfaceSection({
|
|
22898
22930
|
export: exp,
|
|
22899
22931
|
spec
|
|
22900
22932
|
}) {
|
|
@@ -22916,81 +22948,94 @@ ${typeDefinition}`,
|
|
|
22916
22948
|
}];
|
|
22917
22949
|
const displayLanguages = languages.length > 0 ? languages : [{ id: "typescript", label: "TypeScript" }];
|
|
22918
22950
|
const kindLabel = exp.kind === "type" ? "type" : "interface";
|
|
22919
|
-
return /* @__PURE__ */
|
|
22920
|
-
|
|
22921
|
-
|
|
22922
|
-
|
|
22923
|
-
|
|
22924
|
-
description: /* @__PURE__ */ jsxs12("div", {
|
|
22925
|
-
className: "space-y-3",
|
|
22926
|
-
children: [
|
|
22927
|
-
exp.extends && /* @__PURE__ */ jsxs12("p", {
|
|
22928
|
-
className: "font-mono text-sm text-muted-foreground",
|
|
22929
|
-
children: [
|
|
22930
|
-
"extends ",
|
|
22931
|
-
exp.extends
|
|
22932
|
-
]
|
|
22933
|
-
}),
|
|
22934
|
-
exp.description && /* @__PURE__ */ jsx13("p", {
|
|
22935
|
-
children: exp.description
|
|
22936
|
-
}),
|
|
22937
|
-
exp.deprecated && /* @__PURE__ */ jsxs12("div", {
|
|
22938
|
-
className: "rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
|
|
22939
|
-
children: [
|
|
22940
|
-
/* @__PURE__ */ jsx13("strong", {
|
|
22941
|
-
children: "Deprecated:"
|
|
22942
|
-
}),
|
|
22943
|
-
" This export is deprecated."
|
|
22944
|
-
]
|
|
22945
|
-
}),
|
|
22946
|
-
/* @__PURE__ */ jsx13("code", {
|
|
22947
|
-
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
22948
|
-
children: importStatement
|
|
22949
|
-
})
|
|
22950
|
-
]
|
|
22951
|
-
}),
|
|
22952
|
-
languages: displayLanguages,
|
|
22953
|
-
examples: displayExamples,
|
|
22954
|
-
codePanelTitle: exp.name,
|
|
22951
|
+
return /* @__PURE__ */ jsxs12(APISection4, {
|
|
22952
|
+
id: exp.id || exp.name,
|
|
22953
|
+
title: `${kindLabel} ${exp.name}`,
|
|
22954
|
+
description: /* @__PURE__ */ jsxs12("div", {
|
|
22955
|
+
className: "space-y-3",
|
|
22955
22956
|
children: [
|
|
22956
|
-
|
|
22957
|
-
|
|
22958
|
-
children:
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
|
|
22964
|
-
|
|
22965
|
-
|
|
22966
|
-
|
|
22967
|
-
|
|
22968
|
-
|
|
22969
|
-
|
|
22957
|
+
exp.extends && /* @__PURE__ */ jsxs12("p", {
|
|
22958
|
+
className: "font-mono text-sm text-muted-foreground",
|
|
22959
|
+
children: [
|
|
22960
|
+
"extends ",
|
|
22961
|
+
exp.extends
|
|
22962
|
+
]
|
|
22963
|
+
}),
|
|
22964
|
+
exp.description && /* @__PURE__ */ jsx16("p", {
|
|
22965
|
+
children: exp.description
|
|
22966
|
+
}),
|
|
22967
|
+
exp.deprecated && /* @__PURE__ */ jsxs12("div", {
|
|
22968
|
+
className: "rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
|
|
22969
|
+
children: [
|
|
22970
|
+
/* @__PURE__ */ jsx16("strong", {
|
|
22971
|
+
children: "Deprecated:"
|
|
22972
|
+
}),
|
|
22973
|
+
" This export is deprecated."
|
|
22974
|
+
]
|
|
22970
22975
|
}),
|
|
22971
|
-
|
|
22972
|
-
|
|
22973
|
-
|
|
22974
|
-
children: methods.map((method, index) => /* @__PURE__ */ jsx13(APIParameterItem4, {
|
|
22975
|
-
name: `${method.name}()`,
|
|
22976
|
-
type: formatMethodSignature2(method),
|
|
22977
|
-
description: method.description
|
|
22978
|
-
}, method.name ?? index))
|
|
22976
|
+
/* @__PURE__ */ jsx16("code", {
|
|
22977
|
+
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
22978
|
+
children: importStatement
|
|
22979
22979
|
})
|
|
22980
22980
|
]
|
|
22981
|
+
}),
|
|
22982
|
+
languages: displayLanguages,
|
|
22983
|
+
examples: displayExamples,
|
|
22984
|
+
codePanelTitle: exp.name,
|
|
22985
|
+
children: [
|
|
22986
|
+
properties.length > 0 && /* @__PURE__ */ jsx16(ParameterList4, {
|
|
22987
|
+
title: "Properties",
|
|
22988
|
+
children: properties.map((prop, index) => {
|
|
22989
|
+
const type = formatSchema(prop.schema);
|
|
22990
|
+
const children = specSchemaToAPISchema(prop.schema);
|
|
22991
|
+
const hasNestedProperties = children?.properties && Object.keys(children.properties).length > 0;
|
|
22992
|
+
return /* @__PURE__ */ jsx16(APIParameterItem4, {
|
|
22993
|
+
name: prop.name,
|
|
22994
|
+
type,
|
|
22995
|
+
required: prop.required !== false,
|
|
22996
|
+
description: prop.description,
|
|
22997
|
+
children: hasNestedProperties ? children : undefined
|
|
22998
|
+
}, prop.name ?? index);
|
|
22999
|
+
})
|
|
23000
|
+
}),
|
|
23001
|
+
methods.length > 0 && /* @__PURE__ */ jsx16(ParameterList4, {
|
|
23002
|
+
title: "Methods",
|
|
23003
|
+
className: "mt-6",
|
|
23004
|
+
children: methods.map((method, index) => /* @__PURE__ */ jsx16(APIParameterItem4, {
|
|
23005
|
+
name: `${method.name}()`,
|
|
23006
|
+
type: formatMethodSignature2(method),
|
|
23007
|
+
description: method.description
|
|
23008
|
+
}, method.name ?? index))
|
|
23009
|
+
})
|
|
23010
|
+
]
|
|
23011
|
+
});
|
|
23012
|
+
}
|
|
23013
|
+
|
|
23014
|
+
// src/components/styled/InterfacePage.tsx
|
|
23015
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
23016
|
+
|
|
23017
|
+
function InterfacePage({
|
|
23018
|
+
export: exp,
|
|
23019
|
+
spec
|
|
23020
|
+
}) {
|
|
23021
|
+
return /* @__PURE__ */ jsx17("div", {
|
|
23022
|
+
className: "doccov-interface-page not-prose",
|
|
23023
|
+
children: /* @__PURE__ */ jsx17(InterfaceSection, {
|
|
23024
|
+
export: exp,
|
|
23025
|
+
spec
|
|
22981
23026
|
})
|
|
22982
23027
|
});
|
|
22983
23028
|
}
|
|
22984
23029
|
|
|
22985
|
-
// src/components/styled/
|
|
23030
|
+
// src/components/styled/sections/VariableSection.tsx
|
|
22986
23031
|
import {
|
|
22987
23032
|
APIParameterItem as APIParameterItem5,
|
|
22988
23033
|
APISection as APISection5,
|
|
22989
23034
|
ParameterList as ParameterList5
|
|
22990
23035
|
} from "@doccov/ui/docskit";
|
|
22991
|
-
import { jsx as
|
|
23036
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
22992
23037
|
|
|
22993
|
-
function
|
|
23038
|
+
function VariableSection({
|
|
22994
23039
|
export: exp,
|
|
22995
23040
|
spec
|
|
22996
23041
|
}) {
|
|
@@ -23007,58 +23052,71 @@ console.log(${exp.name}); // ${constValue !== undefined ? JSON.stringify(constVa
|
|
|
23007
23052
|
highlightLang: "ts"
|
|
23008
23053
|
}];
|
|
23009
23054
|
const displayLanguages = languages.length > 0 ? languages : [{ id: "typescript", label: "TypeScript" }];
|
|
23010
|
-
return /* @__PURE__ */
|
|
23011
|
-
|
|
23012
|
-
|
|
23013
|
-
|
|
23014
|
-
|
|
23015
|
-
|
|
23016
|
-
|
|
23017
|
-
|
|
23018
|
-
|
|
23019
|
-
|
|
23020
|
-
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
|
|
23030
|
-
|
|
23031
|
-
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
23032
|
-
children: importStatement
|
|
23033
|
-
})
|
|
23034
|
-
]
|
|
23035
|
-
}),
|
|
23036
|
-
languages: displayLanguages,
|
|
23037
|
-
examples: displayExamples,
|
|
23038
|
-
codePanelTitle: exp.name,
|
|
23039
|
-
children: /* @__PURE__ */ jsx14(ParameterList5, {
|
|
23040
|
-
title: "Type",
|
|
23041
|
-
children: /* @__PURE__ */ jsx14(APIParameterItem5, {
|
|
23042
|
-
name: exp.name,
|
|
23043
|
-
type: typeValue,
|
|
23044
|
-
description: constValue !== undefined ? `Value: ${JSON.stringify(constValue)}` : undefined
|
|
23055
|
+
return /* @__PURE__ */ jsx18(APISection5, {
|
|
23056
|
+
id: exp.id || exp.name,
|
|
23057
|
+
title: `const ${exp.name}`,
|
|
23058
|
+
description: /* @__PURE__ */ jsxs13("div", {
|
|
23059
|
+
className: "space-y-3",
|
|
23060
|
+
children: [
|
|
23061
|
+
exp.description && /* @__PURE__ */ jsx18("p", {
|
|
23062
|
+
children: exp.description
|
|
23063
|
+
}),
|
|
23064
|
+
exp.deprecated && /* @__PURE__ */ jsxs13("div", {
|
|
23065
|
+
className: "rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
|
|
23066
|
+
children: [
|
|
23067
|
+
/* @__PURE__ */ jsx18("strong", {
|
|
23068
|
+
children: "Deprecated:"
|
|
23069
|
+
}),
|
|
23070
|
+
" This export is deprecated."
|
|
23071
|
+
]
|
|
23072
|
+
}),
|
|
23073
|
+
/* @__PURE__ */ jsx18("code", {
|
|
23074
|
+
className: "text-sm font-mono bg-muted px-2 py-1 rounded inline-block",
|
|
23075
|
+
children: importStatement
|
|
23045
23076
|
})
|
|
23077
|
+
]
|
|
23078
|
+
}),
|
|
23079
|
+
languages: displayLanguages,
|
|
23080
|
+
examples: displayExamples,
|
|
23081
|
+
codePanelTitle: exp.name,
|
|
23082
|
+
children: /* @__PURE__ */ jsx18(ParameterList5, {
|
|
23083
|
+
title: "Type",
|
|
23084
|
+
children: /* @__PURE__ */ jsx18(APIParameterItem5, {
|
|
23085
|
+
name: exp.name,
|
|
23086
|
+
type: typeValue,
|
|
23087
|
+
description: constValue !== undefined ? `Value: ${JSON.stringify(constValue)}` : undefined
|
|
23046
23088
|
})
|
|
23047
23089
|
})
|
|
23048
23090
|
});
|
|
23049
23091
|
}
|
|
23050
23092
|
|
|
23093
|
+
// src/components/styled/VariablePage.tsx
|
|
23094
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
23095
|
+
|
|
23096
|
+
function VariablePage({
|
|
23097
|
+
export: exp,
|
|
23098
|
+
spec
|
|
23099
|
+
}) {
|
|
23100
|
+
return /* @__PURE__ */ jsx19("div", {
|
|
23101
|
+
className: "doccov-variable-page not-prose",
|
|
23102
|
+
children: /* @__PURE__ */ jsx19(VariableSection, {
|
|
23103
|
+
export: exp,
|
|
23104
|
+
spec
|
|
23105
|
+
})
|
|
23106
|
+
});
|
|
23107
|
+
}
|
|
23108
|
+
|
|
23051
23109
|
// src/components/styled/APIPage.tsx
|
|
23052
|
-
import { jsx as
|
|
23110
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
23053
23111
|
|
|
23054
23112
|
function NotFound({ id }) {
|
|
23055
|
-
return /* @__PURE__ */
|
|
23113
|
+
return /* @__PURE__ */ jsx20("div", {
|
|
23056
23114
|
className: "rounded-lg border border-border bg-card p-6 text-center",
|
|
23057
23115
|
children: /* @__PURE__ */ jsxs14("p", {
|
|
23058
23116
|
className: "text-muted-foreground",
|
|
23059
23117
|
children: [
|
|
23060
23118
|
"Export ",
|
|
23061
|
-
/* @__PURE__ */
|
|
23119
|
+
/* @__PURE__ */ jsx20("code", {
|
|
23062
23120
|
className: "font-mono text-primary",
|
|
23063
23121
|
children: id
|
|
23064
23122
|
}),
|
|
@@ -23068,17 +23126,17 @@ function NotFound({ id }) {
|
|
|
23068
23126
|
});
|
|
23069
23127
|
}
|
|
23070
23128
|
function NoSpec() {
|
|
23071
|
-
return /* @__PURE__ */
|
|
23129
|
+
return /* @__PURE__ */ jsx20("div", {
|
|
23072
23130
|
className: "rounded-lg border border-red-500/20 bg-red-500/10 p-6 text-center",
|
|
23073
23131
|
children: /* @__PURE__ */ jsxs14("p", {
|
|
23074
23132
|
className: "text-red-600 dark:text-red-400",
|
|
23075
23133
|
children: [
|
|
23076
23134
|
"No spec provided. Pass either ",
|
|
23077
|
-
/* @__PURE__ */
|
|
23135
|
+
/* @__PURE__ */ jsx20("code", {
|
|
23078
23136
|
children: "spec"
|
|
23079
23137
|
}),
|
|
23080
23138
|
" or ",
|
|
23081
|
-
/* @__PURE__ */
|
|
23139
|
+
/* @__PURE__ */ jsx20("code", {
|
|
23082
23140
|
children: "instance"
|
|
23083
23141
|
}),
|
|
23084
23142
|
" prop."
|
|
@@ -23096,10 +23154,10 @@ function APIPage({
|
|
|
23096
23154
|
}) {
|
|
23097
23155
|
const resolvedSpec = spec ?? instance?.spec;
|
|
23098
23156
|
if (!resolvedSpec) {
|
|
23099
|
-
return /* @__PURE__ */
|
|
23157
|
+
return /* @__PURE__ */ jsx20(NoSpec, {});
|
|
23100
23158
|
}
|
|
23101
23159
|
if (!id) {
|
|
23102
|
-
return /* @__PURE__ */
|
|
23160
|
+
return /* @__PURE__ */ jsx20(ExportIndexPage, {
|
|
23103
23161
|
spec: resolvedSpec,
|
|
23104
23162
|
baseHref,
|
|
23105
23163
|
description
|
|
@@ -23107,39 +23165,183 @@ function APIPage({
|
|
|
23107
23165
|
}
|
|
23108
23166
|
const exp = resolvedSpec.exports.find((e) => e.id === id);
|
|
23109
23167
|
if (!exp) {
|
|
23110
|
-
return /* @__PURE__ */
|
|
23168
|
+
return /* @__PURE__ */ jsx20(NotFound, {
|
|
23111
23169
|
id
|
|
23112
23170
|
});
|
|
23113
23171
|
}
|
|
23114
23172
|
const pageProps = { export: exp, spec: resolvedSpec, renderExample };
|
|
23115
23173
|
switch (exp.kind) {
|
|
23116
23174
|
case "function":
|
|
23117
|
-
return /* @__PURE__ */
|
|
23175
|
+
return /* @__PURE__ */ jsx20(FunctionPage, {
|
|
23118
23176
|
...pageProps
|
|
23119
23177
|
});
|
|
23120
23178
|
case "class":
|
|
23121
|
-
return /* @__PURE__ */
|
|
23179
|
+
return /* @__PURE__ */ jsx20(ClassPage, {
|
|
23122
23180
|
...pageProps
|
|
23123
23181
|
});
|
|
23124
23182
|
case "interface":
|
|
23125
23183
|
case "type":
|
|
23126
|
-
return /* @__PURE__ */
|
|
23184
|
+
return /* @__PURE__ */ jsx20(InterfacePage, {
|
|
23127
23185
|
...pageProps
|
|
23128
23186
|
});
|
|
23129
23187
|
case "enum":
|
|
23130
|
-
return /* @__PURE__ */
|
|
23188
|
+
return /* @__PURE__ */ jsx20(EnumPage, {
|
|
23131
23189
|
...pageProps
|
|
23132
23190
|
});
|
|
23133
23191
|
default:
|
|
23134
|
-
return /* @__PURE__ */
|
|
23192
|
+
return /* @__PURE__ */ jsx20(VariablePage, {
|
|
23135
23193
|
...pageProps
|
|
23136
23194
|
});
|
|
23137
23195
|
}
|
|
23138
23196
|
}
|
|
23139
|
-
// src/components/styled/
|
|
23197
|
+
// src/components/styled/FullAPIReferencePage.tsx
|
|
23198
|
+
import { APIReferencePage } from "@doccov/ui/docskit";
|
|
23140
23199
|
import { cn as cn3 } from "@doccov/ui/lib/utils";
|
|
23141
|
-
import { useState as useState5 } from "react";
|
|
23142
|
-
|
|
23200
|
+
import { useState as useState5, useMemo as useMemo2 } from "react";
|
|
23201
|
+
|
|
23202
|
+
// src/components/styled/sections/ExportSection.tsx
|
|
23203
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
23204
|
+
|
|
23205
|
+
function ExportSection({ export: exp, spec }) {
|
|
23206
|
+
const props = { export: exp, spec };
|
|
23207
|
+
switch (exp.kind) {
|
|
23208
|
+
case "function":
|
|
23209
|
+
return /* @__PURE__ */ jsx21(FunctionSection, {
|
|
23210
|
+
...props
|
|
23211
|
+
});
|
|
23212
|
+
case "class":
|
|
23213
|
+
return /* @__PURE__ */ jsx21(ClassSection, {
|
|
23214
|
+
...props
|
|
23215
|
+
});
|
|
23216
|
+
case "interface":
|
|
23217
|
+
case "type":
|
|
23218
|
+
return /* @__PURE__ */ jsx21(InterfaceSection, {
|
|
23219
|
+
...props
|
|
23220
|
+
});
|
|
23221
|
+
case "enum":
|
|
23222
|
+
return /* @__PURE__ */ jsx21(EnumSection, {
|
|
23223
|
+
...props
|
|
23224
|
+
});
|
|
23225
|
+
default:
|
|
23226
|
+
return /* @__PURE__ */ jsx21(VariableSection, {
|
|
23227
|
+
...props
|
|
23228
|
+
});
|
|
23229
|
+
}
|
|
23230
|
+
}
|
|
23231
|
+
|
|
23232
|
+
// src/components/styled/FullAPIReferencePage.tsx
|
|
23233
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
23234
|
+
|
|
23235
|
+
var KIND_ORDER2 = ["function", "class", "interface", "type", "enum", "variable"];
|
|
23236
|
+
var KIND_LABELS2 = {
|
|
23237
|
+
function: "Functions",
|
|
23238
|
+
class: "Classes",
|
|
23239
|
+
interface: "Interfaces",
|
|
23240
|
+
type: "Types",
|
|
23241
|
+
enum: "Enums",
|
|
23242
|
+
variable: "Variables"
|
|
23243
|
+
};
|
|
23244
|
+
function FullAPIReferencePage({
|
|
23245
|
+
spec,
|
|
23246
|
+
kinds,
|
|
23247
|
+
showFilters = true,
|
|
23248
|
+
title,
|
|
23249
|
+
description,
|
|
23250
|
+
className
|
|
23251
|
+
}) {
|
|
23252
|
+
const [activeFilter, setActiveFilter] = useState5("all");
|
|
23253
|
+
const availableKinds = useMemo2(() => {
|
|
23254
|
+
const kindSet = new Set;
|
|
23255
|
+
for (const exp of spec.exports) {
|
|
23256
|
+
const kind = exp.kind;
|
|
23257
|
+
if (KIND_ORDER2.includes(kind)) {
|
|
23258
|
+
kindSet.add(kind);
|
|
23259
|
+
}
|
|
23260
|
+
}
|
|
23261
|
+
return KIND_ORDER2.filter((k) => kindSet.has(k));
|
|
23262
|
+
}, [spec.exports]);
|
|
23263
|
+
const filteredExports = useMemo2(() => {
|
|
23264
|
+
let exports = spec.exports;
|
|
23265
|
+
if (kinds?.length) {
|
|
23266
|
+
exports = exports.filter((e) => kinds.includes(e.kind));
|
|
23267
|
+
}
|
|
23268
|
+
if (activeFilter !== "all") {
|
|
23269
|
+
exports = exports.filter((e) => e.kind === activeFilter);
|
|
23270
|
+
}
|
|
23271
|
+
return exports.sort((a, b) => {
|
|
23272
|
+
const kindOrderA = KIND_ORDER2.indexOf(a.kind);
|
|
23273
|
+
const kindOrderB = KIND_ORDER2.indexOf(b.kind);
|
|
23274
|
+
if (kindOrderA !== kindOrderB) {
|
|
23275
|
+
return kindOrderA - kindOrderB;
|
|
23276
|
+
}
|
|
23277
|
+
return a.name.localeCompare(b.name);
|
|
23278
|
+
});
|
|
23279
|
+
}, [spec.exports, kinds, activeFilter]);
|
|
23280
|
+
const defaultDescription = /* @__PURE__ */ jsxs15("div", {
|
|
23281
|
+
children: [
|
|
23282
|
+
spec.meta.description && /* @__PURE__ */ jsx22("p", {
|
|
23283
|
+
children: spec.meta.description
|
|
23284
|
+
}),
|
|
23285
|
+
spec.meta.version && /* @__PURE__ */ jsxs15("p", {
|
|
23286
|
+
className: "text-sm text-muted-foreground mt-2",
|
|
23287
|
+
children: [
|
|
23288
|
+
"Version ",
|
|
23289
|
+
spec.meta.version
|
|
23290
|
+
]
|
|
23291
|
+
})
|
|
23292
|
+
]
|
|
23293
|
+
});
|
|
23294
|
+
const shouldShowFilters = showFilters && !kinds?.length && availableKinds.length > 1;
|
|
23295
|
+
return /* @__PURE__ */ jsx22("div", {
|
|
23296
|
+
className: cn3("not-prose", className),
|
|
23297
|
+
children: /* @__PURE__ */ jsxs15(APIReferencePage, {
|
|
23298
|
+
title: title || spec.meta.name || "API Reference",
|
|
23299
|
+
description: description || defaultDescription,
|
|
23300
|
+
children: [
|
|
23301
|
+
shouldShowFilters && /* @__PURE__ */ jsxs15("div", {
|
|
23302
|
+
className: "flex flex-wrap gap-2 mb-8 -mt-4",
|
|
23303
|
+
children: [
|
|
23304
|
+
/* @__PURE__ */ jsx22("button", {
|
|
23305
|
+
type: "button",
|
|
23306
|
+
onClick: () => setActiveFilter("all"),
|
|
23307
|
+
className: cn3("px-3 py-1.5 text-sm rounded-md transition-all cursor-pointer", activeFilter === "all" ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),
|
|
23308
|
+
children: "All"
|
|
23309
|
+
}),
|
|
23310
|
+
availableKinds.map((kind) => /* @__PURE__ */ jsx22("button", {
|
|
23311
|
+
type: "button",
|
|
23312
|
+
onClick: () => setActiveFilter(kind),
|
|
23313
|
+
className: cn3("px-3 py-1.5 text-sm rounded-md transition-all cursor-pointer", activeFilter === kind ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"),
|
|
23314
|
+
children: KIND_LABELS2[kind]
|
|
23315
|
+
}, kind))
|
|
23316
|
+
]
|
|
23317
|
+
}),
|
|
23318
|
+
filteredExports.map((exp) => /* @__PURE__ */ jsx22(ExportSection, {
|
|
23319
|
+
export: exp,
|
|
23320
|
+
spec
|
|
23321
|
+
}, exp.id || exp.name)),
|
|
23322
|
+
filteredExports.length === 0 && /* @__PURE__ */ jsxs15("div", {
|
|
23323
|
+
className: "rounded-lg border border-border bg-card/50 p-8 text-center",
|
|
23324
|
+
children: [
|
|
23325
|
+
/* @__PURE__ */ jsx22("p", {
|
|
23326
|
+
className: "text-muted-foreground",
|
|
23327
|
+
children: activeFilter !== "all" ? `No ${KIND_LABELS2[activeFilter].toLowerCase()} found.` : "No exports found in this package."
|
|
23328
|
+
}),
|
|
23329
|
+
activeFilter !== "all" && /* @__PURE__ */ jsx22("button", {
|
|
23330
|
+
type: "button",
|
|
23331
|
+
onClick: () => setActiveFilter("all"),
|
|
23332
|
+
className: "mt-3 text-sm text-primary hover:underline cursor-pointer",
|
|
23333
|
+
children: "Show all exports"
|
|
23334
|
+
})
|
|
23335
|
+
]
|
|
23336
|
+
})
|
|
23337
|
+
]
|
|
23338
|
+
})
|
|
23339
|
+
});
|
|
23340
|
+
}
|
|
23341
|
+
// src/components/styled/ParameterItem.tsx
|
|
23342
|
+
import { cn as cn4 } from "@doccov/ui/lib/utils";
|
|
23343
|
+
import { useState as useState6 } from "react";
|
|
23344
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
23143
23345
|
|
|
23144
23346
|
function getNestedProperties2(schema) {
|
|
23145
23347
|
if (!schema || typeof schema !== "object")
|
|
@@ -23169,55 +23371,55 @@ function NestedPropertyItem({
|
|
|
23169
23371
|
required = false,
|
|
23170
23372
|
depth = 0
|
|
23171
23373
|
}) {
|
|
23172
|
-
const [expanded, setExpanded] =
|
|
23374
|
+
const [expanded, setExpanded] = useState6(false);
|
|
23173
23375
|
const type = formatSchema(schema);
|
|
23174
23376
|
const nestedProps = getNestedProperties2(schema);
|
|
23175
23377
|
const nestedCount = countProperties2(schema);
|
|
23176
23378
|
const hasNested = nestedCount > 0;
|
|
23177
23379
|
const schemaObj = schema;
|
|
23178
23380
|
const description = schemaObj?.description;
|
|
23179
|
-
return /* @__PURE__ */
|
|
23180
|
-
className:
|
|
23381
|
+
return /* @__PURE__ */ jsxs16("div", {
|
|
23382
|
+
className: cn4("border-t border-border first:border-t-0", depth > 0 && "ml-4"),
|
|
23181
23383
|
children: [
|
|
23182
|
-
/* @__PURE__ */
|
|
23384
|
+
/* @__PURE__ */ jsx23("div", {
|
|
23183
23385
|
className: "py-3",
|
|
23184
|
-
children: /* @__PURE__ */
|
|
23386
|
+
children: /* @__PURE__ */ jsxs16("div", {
|
|
23185
23387
|
className: "flex items-start gap-2",
|
|
23186
23388
|
children: [
|
|
23187
|
-
hasNested && /* @__PURE__ */
|
|
23389
|
+
hasNested && /* @__PURE__ */ jsx23("button", {
|
|
23188
23390
|
type: "button",
|
|
23189
23391
|
onClick: () => setExpanded(!expanded),
|
|
23190
23392
|
className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
23191
23393
|
"aria-label": expanded ? "Collapse" : "Expand",
|
|
23192
|
-
children: /* @__PURE__ */
|
|
23394
|
+
children: /* @__PURE__ */ jsx23(ChevronRight, {
|
|
23193
23395
|
size: 14,
|
|
23194
|
-
className:
|
|
23396
|
+
className: cn4("transition-transform duration-200", expanded && "rotate-90")
|
|
23195
23397
|
})
|
|
23196
23398
|
}),
|
|
23197
|
-
!hasNested && /* @__PURE__ */
|
|
23399
|
+
!hasNested && /* @__PURE__ */ jsx23("div", {
|
|
23198
23400
|
className: "w-5"
|
|
23199
23401
|
}),
|
|
23200
|
-
/* @__PURE__ */
|
|
23402
|
+
/* @__PURE__ */ jsxs16("div", {
|
|
23201
23403
|
className: "flex-1 min-w-0",
|
|
23202
23404
|
children: [
|
|
23203
|
-
/* @__PURE__ */
|
|
23405
|
+
/* @__PURE__ */ jsxs16("div", {
|
|
23204
23406
|
className: "flex items-baseline gap-2 flex-wrap",
|
|
23205
23407
|
children: [
|
|
23206
|
-
/* @__PURE__ */
|
|
23408
|
+
/* @__PURE__ */ jsxs16("span", {
|
|
23207
23409
|
className: "font-mono text-sm text-foreground",
|
|
23208
23410
|
children: [
|
|
23209
23411
|
name,
|
|
23210
|
-
!required && /* @__PURE__ */
|
|
23412
|
+
!required && /* @__PURE__ */ jsx23("span", {
|
|
23211
23413
|
className: "text-muted-foreground",
|
|
23212
23414
|
children: "?"
|
|
23213
23415
|
})
|
|
23214
23416
|
]
|
|
23215
23417
|
}),
|
|
23216
|
-
/* @__PURE__ */
|
|
23418
|
+
/* @__PURE__ */ jsx23("span", {
|
|
23217
23419
|
className: "font-mono text-sm text-muted-foreground",
|
|
23218
23420
|
children: hasNested ? "object" : type
|
|
23219
23421
|
}),
|
|
23220
|
-
hasNested && /* @__PURE__ */
|
|
23422
|
+
hasNested && /* @__PURE__ */ jsxs16("button", {
|
|
23221
23423
|
type: "button",
|
|
23222
23424
|
onClick: () => setExpanded(!expanded),
|
|
23223
23425
|
className: "text-xs text-primary hover:underline cursor-pointer",
|
|
@@ -23229,7 +23431,7 @@ function NestedPropertyItem({
|
|
|
23229
23431
|
})
|
|
23230
23432
|
]
|
|
23231
23433
|
}),
|
|
23232
|
-
description && /* @__PURE__ */
|
|
23434
|
+
description && /* @__PURE__ */ jsx23("p", {
|
|
23233
23435
|
className: "text-sm text-muted-foreground mt-1",
|
|
23234
23436
|
children: description
|
|
23235
23437
|
})
|
|
@@ -23238,9 +23440,9 @@ function NestedPropertyItem({
|
|
|
23238
23440
|
]
|
|
23239
23441
|
})
|
|
23240
23442
|
}),
|
|
23241
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
23443
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx23("div", {
|
|
23242
23444
|
className: "border-l border-border ml-2",
|
|
23243
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
23445
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx23(NestedPropertyItem, {
|
|
23244
23446
|
name: propName,
|
|
23245
23447
|
schema: propSchema,
|
|
23246
23448
|
required: getRequiredFields2(schema).includes(propName),
|
|
@@ -23255,52 +23457,52 @@ function ParameterItem({
|
|
|
23255
23457
|
depth = 0,
|
|
23256
23458
|
className
|
|
23257
23459
|
}) {
|
|
23258
|
-
const [expanded, setExpanded] =
|
|
23460
|
+
const [expanded, setExpanded] = useState6(false);
|
|
23259
23461
|
const type = formatSchema(param.schema);
|
|
23260
23462
|
const isRequired = param.required !== false;
|
|
23261
23463
|
const nestedProps = getNestedProperties2(param.schema);
|
|
23262
23464
|
const nestedCount = countProperties2(param.schema);
|
|
23263
23465
|
const hasNested = nestedCount > 0;
|
|
23264
|
-
return /* @__PURE__ */
|
|
23265
|
-
className:
|
|
23466
|
+
return /* @__PURE__ */ jsxs16("div", {
|
|
23467
|
+
className: cn4("border-b border-border last:border-b-0", className),
|
|
23266
23468
|
children: [
|
|
23267
|
-
/* @__PURE__ */
|
|
23469
|
+
/* @__PURE__ */ jsx23("div", {
|
|
23268
23470
|
className: "py-3",
|
|
23269
|
-
children: /* @__PURE__ */
|
|
23471
|
+
children: /* @__PURE__ */ jsxs16("div", {
|
|
23270
23472
|
className: "flex items-start gap-2",
|
|
23271
23473
|
children: [
|
|
23272
|
-
hasNested && /* @__PURE__ */
|
|
23474
|
+
hasNested && /* @__PURE__ */ jsx23("button", {
|
|
23273
23475
|
type: "button",
|
|
23274
23476
|
onClick: () => setExpanded(!expanded),
|
|
23275
23477
|
className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
23276
23478
|
"aria-label": expanded ? "Collapse" : "Expand",
|
|
23277
|
-
children: /* @__PURE__ */
|
|
23479
|
+
children: /* @__PURE__ */ jsx23(ChevronRight, {
|
|
23278
23480
|
size: 14,
|
|
23279
|
-
className:
|
|
23481
|
+
className: cn4("transition-transform duration-200", expanded && "rotate-90")
|
|
23280
23482
|
})
|
|
23281
23483
|
}),
|
|
23282
|
-
!hasNested && /* @__PURE__ */
|
|
23484
|
+
!hasNested && /* @__PURE__ */ jsx23("div", {
|
|
23283
23485
|
className: "w-5"
|
|
23284
23486
|
}),
|
|
23285
|
-
/* @__PURE__ */
|
|
23487
|
+
/* @__PURE__ */ jsxs16("div", {
|
|
23286
23488
|
className: "flex-1 min-w-0",
|
|
23287
23489
|
children: [
|
|
23288
|
-
/* @__PURE__ */
|
|
23490
|
+
/* @__PURE__ */ jsxs16("div", {
|
|
23289
23491
|
className: "flex items-baseline gap-2 flex-wrap",
|
|
23290
23492
|
children: [
|
|
23291
|
-
/* @__PURE__ */
|
|
23493
|
+
/* @__PURE__ */ jsx23("span", {
|
|
23292
23494
|
className: "font-mono text-sm font-medium text-foreground",
|
|
23293
23495
|
children: param.name
|
|
23294
23496
|
}),
|
|
23295
|
-
isRequired && /* @__PURE__ */
|
|
23497
|
+
isRequired && /* @__PURE__ */ jsx23("span", {
|
|
23296
23498
|
className: "text-[10px] font-semibold px-1.5 py-0.5 rounded border border-border bg-muted text-muted-foreground uppercase tracking-wide",
|
|
23297
23499
|
children: "Required"
|
|
23298
23500
|
}),
|
|
23299
|
-
/* @__PURE__ */
|
|
23501
|
+
/* @__PURE__ */ jsx23("span", {
|
|
23300
23502
|
className: "font-mono text-sm text-muted-foreground",
|
|
23301
23503
|
children: hasNested ? "object" : type
|
|
23302
23504
|
}),
|
|
23303
|
-
hasNested && /* @__PURE__ */
|
|
23505
|
+
hasNested && /* @__PURE__ */ jsxs16("button", {
|
|
23304
23506
|
type: "button",
|
|
23305
23507
|
onClick: () => setExpanded(!expanded),
|
|
23306
23508
|
className: "text-xs text-primary hover:underline cursor-pointer",
|
|
@@ -23312,7 +23514,7 @@ function ParameterItem({
|
|
|
23312
23514
|
})
|
|
23313
23515
|
]
|
|
23314
23516
|
}),
|
|
23315
|
-
param.description && /* @__PURE__ */
|
|
23517
|
+
param.description && /* @__PURE__ */ jsx23("p", {
|
|
23316
23518
|
className: "text-sm text-muted-foreground mt-1",
|
|
23317
23519
|
children: param.description
|
|
23318
23520
|
})
|
|
@@ -23321,9 +23523,9 @@ function ParameterItem({
|
|
|
23321
23523
|
]
|
|
23322
23524
|
})
|
|
23323
23525
|
}),
|
|
23324
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
23526
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx23("div", {
|
|
23325
23527
|
className: "border-l border-border ml-2 mb-3",
|
|
23326
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
23528
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx23(NestedPropertyItem, {
|
|
23327
23529
|
name: propName,
|
|
23328
23530
|
schema: propSchema,
|
|
23329
23531
|
required: getRequiredFields2(param.schema).includes(propName),
|
|
@@ -23339,6 +23541,7 @@ export {
|
|
|
23339
23541
|
getExampleLanguage,
|
|
23340
23542
|
getExampleCode,
|
|
23341
23543
|
cleanCode,
|
|
23544
|
+
VariableSection,
|
|
23342
23545
|
VariablePage,
|
|
23343
23546
|
TypeTable,
|
|
23344
23547
|
Signature,
|
|
@@ -23348,16 +23551,22 @@ export {
|
|
|
23348
23551
|
NestedProperty,
|
|
23349
23552
|
MembersTable,
|
|
23350
23553
|
MemberRow,
|
|
23554
|
+
InterfaceSection,
|
|
23351
23555
|
InterfacePage,
|
|
23352
23556
|
ImportSection,
|
|
23557
|
+
FunctionSection,
|
|
23353
23558
|
FunctionPage,
|
|
23559
|
+
FullAPIReferencePage,
|
|
23560
|
+
ExportSection,
|
|
23354
23561
|
ExportIndexPage,
|
|
23355
23562
|
ExportCard,
|
|
23356
23563
|
ExpandableProperty,
|
|
23357
23564
|
ExampleBlock,
|
|
23565
|
+
EnumSection,
|
|
23358
23566
|
EnumPage,
|
|
23359
23567
|
CollapsibleMethod,
|
|
23360
23568
|
CodeTabs,
|
|
23569
|
+
ClassSection,
|
|
23361
23570
|
ClassPage,
|
|
23362
23571
|
APIPage
|
|
23363
23572
|
};
|