@openpkg-ts/doc-generator 0.2.1 → 0.2.3
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 +653 -817
- package/dist/react.js +201 -201
- package/package.json +1 -1
package/dist/react-styled.js
CHANGED
|
@@ -209,15 +209,7 @@ var require_format_url = __commonJS((exports) => {
|
|
|
209
209
|
"slashes"
|
|
210
210
|
];
|
|
211
211
|
function formatWithValidation(url) {
|
|
212
|
-
if (
|
|
213
|
-
if (url !== null && typeof url === "object") {
|
|
214
|
-
Object.keys(url).forEach((key) => {
|
|
215
|
-
if (!urlObjectKeys.includes(key)) {
|
|
216
|
-
console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
}
|
|
212
|
+
if (false) {}
|
|
221
213
|
return formatUrl(url);
|
|
222
214
|
}
|
|
223
215
|
});
|
|
@@ -351,16 +343,7 @@ var require_utils = __commonJS((exports) => {
|
|
|
351
343
|
return urlNoQuery.replace(/\\/g, "/").replace(/\/\/+/g, "/") + (urlParts[1] ? `?${urlParts.slice(1).join("?")}` : "");
|
|
352
344
|
}
|
|
353
345
|
async function loadGetInitialProps(App, ctx) {
|
|
354
|
-
if (
|
|
355
|
-
if (App.prototype?.getInitialProps) {
|
|
356
|
-
const message = `"${getDisplayName(App)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;
|
|
357
|
-
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
358
|
-
value: "E394",
|
|
359
|
-
enumerable: false,
|
|
360
|
-
configurable: true
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
}
|
|
346
|
+
if (false) {}
|
|
364
347
|
const res = ctx.res || ctx.ctx && ctx.ctx.res;
|
|
365
348
|
if (!App.getInitialProps) {
|
|
366
349
|
if (ctx.ctx && ctx.Component) {
|
|
@@ -382,11 +365,7 @@ var require_utils = __commonJS((exports) => {
|
|
|
382
365
|
configurable: true
|
|
383
366
|
});
|
|
384
367
|
}
|
|
385
|
-
if (
|
|
386
|
-
if (Object.keys(props).length === 0 && !ctx.ctx) {
|
|
387
|
-
console.warn(`${getDisplayName(App)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
368
|
+
if (false) {}
|
|
390
369
|
return props;
|
|
391
370
|
}
|
|
392
371
|
var SP = typeof performance !== "undefined";
|
|
@@ -2767,9 +2746,7 @@ var require_router_context_shared_runtime = __commonJS((exports) => {
|
|
|
2767
2746
|
var _interop_require_default = require__interop_require_default();
|
|
2768
2747
|
var _react = /* @__PURE__ */ _interop_require_default._(react);
|
|
2769
2748
|
var RouterContext = _react.default.createContext(null);
|
|
2770
|
-
if (
|
|
2771
|
-
RouterContext.displayName = "RouterContext";
|
|
2772
|
-
}
|
|
2749
|
+
if (false) {}
|
|
2773
2750
|
});
|
|
2774
2751
|
|
|
2775
2752
|
// ../../node_modules/next/dist/client/request-idle-callback.js
|
|
@@ -3179,15 +3156,7 @@ var require_error_once = __commonJS((exports) => {
|
|
|
3179
3156
|
}
|
|
3180
3157
|
});
|
|
3181
3158
|
var errorOnce = (_) => {};
|
|
3182
|
-
if (
|
|
3183
|
-
const errors = new Set;
|
|
3184
|
-
errorOnce = (msg) => {
|
|
3185
|
-
if (!errors.has(msg)) {
|
|
3186
|
-
console.error(msg);
|
|
3187
|
-
}
|
|
3188
|
-
errors.add(msg);
|
|
3189
|
-
};
|
|
3190
|
-
}
|
|
3159
|
+
if (false) {}
|
|
3191
3160
|
});
|
|
3192
3161
|
|
|
3193
3162
|
// ../../node_modules/next/dist/client/link.js
|
|
@@ -3243,9 +3212,7 @@ var require_link = __commonJS((exports, module) => {
|
|
|
3243
3212
|
prefetched.add(prefetchedKey);
|
|
3244
3213
|
}
|
|
3245
3214
|
router.prefetch(href, as, options).catch((err) => {
|
|
3246
|
-
if (
|
|
3247
|
-
throw err;
|
|
3248
|
-
}
|
|
3215
|
+
if (false) {}
|
|
3249
3216
|
});
|
|
3250
3217
|
}
|
|
3251
3218
|
function isModifiedEvent(event) {
|
|
@@ -3311,93 +3278,8 @@ var require_link = __commonJS((exports, module) => {
|
|
|
3311
3278
|
}
|
|
3312
3279
|
const router = _react3.default.useContext(_routercontextsharedruntime.RouterContext);
|
|
3313
3280
|
const prefetchEnabled = prefetchProp !== false;
|
|
3314
|
-
if (
|
|
3315
|
-
let createPropError = function(args) {
|
|
3316
|
-
return Object.defineProperty(new Error(`Failed prop type: The prop \`${args.key}\` expects a ${args.expected} in \`<Link>\`, but got \`${args.actual}\` instead.` + (typeof window !== "undefined" ? `
|
|
3317
|
-
Open your browser's console to view the Component stack trace.` : "")), "__NEXT_ERROR_CODE", {
|
|
3318
|
-
value: "E319",
|
|
3319
|
-
enumerable: false,
|
|
3320
|
-
configurable: true
|
|
3321
|
-
});
|
|
3322
|
-
};
|
|
3323
|
-
const requiredPropsGuard = {
|
|
3324
|
-
href: true
|
|
3325
|
-
};
|
|
3326
|
-
const requiredProps = Object.keys(requiredPropsGuard);
|
|
3327
|
-
requiredProps.forEach((key) => {
|
|
3328
|
-
if (key === "href") {
|
|
3329
|
-
if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
|
|
3330
|
-
throw createPropError({
|
|
3331
|
-
key,
|
|
3332
|
-
expected: "`string` or `object`",
|
|
3333
|
-
actual: props[key] === null ? "null" : typeof props[key]
|
|
3334
|
-
});
|
|
3335
|
-
}
|
|
3336
|
-
} else {
|
|
3337
|
-
const _ = key;
|
|
3338
|
-
}
|
|
3339
|
-
});
|
|
3340
|
-
const optionalPropsGuard = {
|
|
3341
|
-
as: true,
|
|
3342
|
-
replace: true,
|
|
3343
|
-
scroll: true,
|
|
3344
|
-
shallow: true,
|
|
3345
|
-
passHref: true,
|
|
3346
|
-
prefetch: true,
|
|
3347
|
-
locale: true,
|
|
3348
|
-
onClick: true,
|
|
3349
|
-
onMouseEnter: true,
|
|
3350
|
-
onTouchStart: true,
|
|
3351
|
-
legacyBehavior: true,
|
|
3352
|
-
onNavigate: true
|
|
3353
|
-
};
|
|
3354
|
-
const optionalProps = Object.keys(optionalPropsGuard);
|
|
3355
|
-
optionalProps.forEach((key) => {
|
|
3356
|
-
const valType = typeof props[key];
|
|
3357
|
-
if (key === "as") {
|
|
3358
|
-
if (props[key] && valType !== "string" && valType !== "object") {
|
|
3359
|
-
throw createPropError({
|
|
3360
|
-
key,
|
|
3361
|
-
expected: "`string` or `object`",
|
|
3362
|
-
actual: valType
|
|
3363
|
-
});
|
|
3364
|
-
}
|
|
3365
|
-
} else if (key === "locale") {
|
|
3366
|
-
if (props[key] && valType !== "string") {
|
|
3367
|
-
throw createPropError({
|
|
3368
|
-
key,
|
|
3369
|
-
expected: "`string`",
|
|
3370
|
-
actual: valType
|
|
3371
|
-
});
|
|
3372
|
-
}
|
|
3373
|
-
} else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
|
|
3374
|
-
if (props[key] && valType !== "function") {
|
|
3375
|
-
throw createPropError({
|
|
3376
|
-
key,
|
|
3377
|
-
expected: "`function`",
|
|
3378
|
-
actual: valType
|
|
3379
|
-
});
|
|
3380
|
-
}
|
|
3381
|
-
} else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
|
|
3382
|
-
if (props[key] != null && valType !== "boolean") {
|
|
3383
|
-
throw createPropError({
|
|
3384
|
-
key,
|
|
3385
|
-
expected: "`boolean`",
|
|
3386
|
-
actual: valType
|
|
3387
|
-
});
|
|
3388
|
-
}
|
|
3389
|
-
} else if (key === "prefetch") {
|
|
3390
|
-
if (props[key] != null && valType !== "boolean" && props[key] !== "auto") {
|
|
3391
|
-
throw createPropError({
|
|
3392
|
-
key,
|
|
3393
|
-
expected: '`boolean | "auto"`',
|
|
3394
|
-
actual: valType
|
|
3395
|
-
});
|
|
3396
|
-
}
|
|
3397
|
-
} else {
|
|
3398
|
-
const _ = key;
|
|
3399
|
-
}
|
|
3400
|
-
});
|
|
3281
|
+
if (false) {
|
|
3282
|
+
let createPropError = function(args) {};
|
|
3401
3283
|
}
|
|
3402
3284
|
const { href, as } = _react3.default.useMemo(() => {
|
|
3403
3285
|
if (!router) {
|
|
@@ -3421,42 +3303,11 @@ Open your browser's console to view the Component stack trace.` : "")), "__NEXT_
|
|
|
3421
3303
|
const previousAs = _react3.default.useRef(as);
|
|
3422
3304
|
let child;
|
|
3423
3305
|
if (legacyBehavior) {
|
|
3424
|
-
if (
|
|
3425
|
-
|
|
3426
|
-
console.warn(`"onClick" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link`);
|
|
3427
|
-
}
|
|
3428
|
-
if (onMouseEnterProp) {
|
|
3429
|
-
console.warn(`"onMouseEnter" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`);
|
|
3430
|
-
}
|
|
3431
|
-
try {
|
|
3432
|
-
child = _react3.default.Children.only(children);
|
|
3433
|
-
} catch (err) {
|
|
3434
|
-
if (!children) {
|
|
3435
|
-
throw Object.defineProperty(new Error(`No children were passed to <Link> with \`href\` of \`${hrefProp}\` but one child is required https://nextjs.org/docs/messages/link-no-children`), "__NEXT_ERROR_CODE", {
|
|
3436
|
-
value: "E320",
|
|
3437
|
-
enumerable: false,
|
|
3438
|
-
configurable: true
|
|
3439
|
-
});
|
|
3440
|
-
}
|
|
3441
|
-
throw Object.defineProperty(new Error(`Multiple children were passed to <Link> with \`href\` of \`${hrefProp}\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + (typeof window !== "undefined" ? `
|
|
3442
|
-
Open your browser's console to view the Component stack trace.` : "")), "__NEXT_ERROR_CODE", {
|
|
3443
|
-
value: "E266",
|
|
3444
|
-
enumerable: false,
|
|
3445
|
-
configurable: true
|
|
3446
|
-
});
|
|
3447
|
-
}
|
|
3448
|
-
} else {}
|
|
3449
|
-
} else {
|
|
3450
|
-
if (true) {
|
|
3451
|
-
if (children?.type === "a") {
|
|
3452
|
-
throw Object.defineProperty(new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
|
|
3453
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`), "__NEXT_ERROR_CODE", {
|
|
3454
|
-
value: "E209",
|
|
3455
|
-
enumerable: false,
|
|
3456
|
-
configurable: true
|
|
3457
|
-
});
|
|
3458
|
-
}
|
|
3306
|
+
if (false) {} else {
|
|
3307
|
+
child = _react3.default.Children.only(children);
|
|
3459
3308
|
}
|
|
3309
|
+
} else {
|
|
3310
|
+
if (false) {}
|
|
3460
3311
|
}
|
|
3461
3312
|
const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
|
|
3462
3313
|
const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
|
|
@@ -3477,9 +3328,7 @@ Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`
|
|
|
3477
3328
|
]);
|
|
3478
3329
|
const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
|
|
3479
3330
|
_react3.default.useEffect(() => {
|
|
3480
|
-
if (
|
|
3481
|
-
return;
|
|
3482
|
-
}
|
|
3331
|
+
if (false) {}
|
|
3483
3332
|
if (!router) {
|
|
3484
3333
|
return;
|
|
3485
3334
|
}
|
|
@@ -3501,15 +3350,7 @@ Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`
|
|
|
3501
3350
|
const childProps = {
|
|
3502
3351
|
ref: setRef,
|
|
3503
3352
|
onClick(e) {
|
|
3504
|
-
if (
|
|
3505
|
-
if (!e) {
|
|
3506
|
-
throw Object.defineProperty(new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", {
|
|
3507
|
-
value: "E312",
|
|
3508
|
-
enumerable: false,
|
|
3509
|
-
configurable: true
|
|
3510
|
-
});
|
|
3511
|
-
}
|
|
3512
|
-
}
|
|
3353
|
+
if (false) {}
|
|
3513
3354
|
if (!legacyBehavior && typeof onClick === "function") {
|
|
3514
3355
|
onClick(e);
|
|
3515
3356
|
}
|
|
@@ -3565,13 +3406,7 @@ Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`
|
|
|
3565
3406
|
childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router?.defaultLocale));
|
|
3566
3407
|
}
|
|
3567
3408
|
if (legacyBehavior) {
|
|
3568
|
-
if (
|
|
3569
|
-
(0, _erroronce.errorOnce)("`legacyBehavior` is deprecated and will be removed in a future " + `release. A codemod is available to upgrade your components:
|
|
3570
|
-
|
|
3571
|
-
` + `npx @next/codemod@latest new-link .
|
|
3572
|
-
|
|
3573
|
-
` + "Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components");
|
|
3574
|
-
}
|
|
3409
|
+
if (false) {}
|
|
3575
3410
|
return /* @__PURE__ */ _react3.default.cloneElement(child, childProps);
|
|
3576
3411
|
}
|
|
3577
3412
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
|
|
@@ -3698,7 +3533,7 @@ function buildSignatureString(exp, sigIndex = 0) {
|
|
|
3698
3533
|
}
|
|
3699
3534
|
|
|
3700
3535
|
// src/components/headless/CollapsibleMethod.tsx
|
|
3701
|
-
import {
|
|
3536
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3702
3537
|
|
|
3703
3538
|
function formatReturnType2(returns) {
|
|
3704
3539
|
if (!returns)
|
|
@@ -3741,96 +3576,96 @@ function CollapsibleMethod({
|
|
|
3741
3576
|
badges.push("static");
|
|
3742
3577
|
if (isAsync)
|
|
3743
3578
|
badges.push("async");
|
|
3744
|
-
return /* @__PURE__ */
|
|
3579
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
3745
3580
|
id: member.name,
|
|
3746
3581
|
className,
|
|
3747
3582
|
"data-expanded": expanded,
|
|
3748
3583
|
children: [
|
|
3749
|
-
renderHeader ? renderHeader(member, expanded, toggle) : /* @__PURE__ */
|
|
3584
|
+
renderHeader ? renderHeader(member, expanded, toggle) : /* @__PURE__ */ jsxs("button", {
|
|
3750
3585
|
type: "button",
|
|
3751
3586
|
onClick: toggle,
|
|
3752
3587
|
"data-header": true,
|
|
3753
3588
|
children: [
|
|
3754
|
-
/* @__PURE__ */
|
|
3589
|
+
/* @__PURE__ */ jsxs("span", {
|
|
3755
3590
|
"data-name": true,
|
|
3756
3591
|
children: [
|
|
3757
3592
|
member.name,
|
|
3758
|
-
/* @__PURE__ */
|
|
3593
|
+
/* @__PURE__ */ jsxs("span", {
|
|
3759
3594
|
"data-params": true,
|
|
3760
3595
|
children: [
|
|
3761
3596
|
"(",
|
|
3762
3597
|
paramPreview,
|
|
3763
3598
|
")"
|
|
3764
3599
|
]
|
|
3765
|
-
}
|
|
3600
|
+
})
|
|
3766
3601
|
]
|
|
3767
|
-
}
|
|
3768
|
-
/* @__PURE__ */
|
|
3602
|
+
}),
|
|
3603
|
+
/* @__PURE__ */ jsx("span", {
|
|
3769
3604
|
"data-return": true,
|
|
3770
3605
|
children: returnType
|
|
3771
|
-
}
|
|
3772
|
-
badges.length > 0 && /* @__PURE__ */
|
|
3606
|
+
}),
|
|
3607
|
+
badges.length > 0 && /* @__PURE__ */ jsx("span", {
|
|
3773
3608
|
"data-badges": true,
|
|
3774
|
-
children: badges.map((badge) => /* @__PURE__ */
|
|
3609
|
+
children: badges.map((badge) => /* @__PURE__ */ jsx("span", {
|
|
3775
3610
|
"data-badge": badge,
|
|
3776
3611
|
children: badge
|
|
3777
|
-
}, badge
|
|
3778
|
-
}
|
|
3612
|
+
}, badge))
|
|
3613
|
+
})
|
|
3779
3614
|
]
|
|
3780
|
-
}
|
|
3781
|
-
expanded && (renderContent ? renderContent(member) : /* @__PURE__ */
|
|
3615
|
+
}),
|
|
3616
|
+
expanded && (renderContent ? renderContent(member) : /* @__PURE__ */ jsxs("div", {
|
|
3782
3617
|
"data-content": true,
|
|
3783
3618
|
children: [
|
|
3784
|
-
member.description && /* @__PURE__ */
|
|
3619
|
+
member.description && /* @__PURE__ */ jsx("p", {
|
|
3785
3620
|
children: member.description
|
|
3786
|
-
}
|
|
3787
|
-
hasParams && /* @__PURE__ */
|
|
3621
|
+
}),
|
|
3622
|
+
hasParams && /* @__PURE__ */ jsxs("div", {
|
|
3788
3623
|
"data-params-section": true,
|
|
3789
3624
|
children: [
|
|
3790
|
-
/* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ jsx("h4", {
|
|
3791
3626
|
children: "Parameters"
|
|
3792
|
-
}
|
|
3793
|
-
/* @__PURE__ */
|
|
3794
|
-
children: sig.parameters.map((param, index) => /* @__PURE__ */
|
|
3627
|
+
}),
|
|
3628
|
+
/* @__PURE__ */ jsx("ul", {
|
|
3629
|
+
children: sig.parameters.map((param, index) => /* @__PURE__ */ jsxs("li", {
|
|
3795
3630
|
children: [
|
|
3796
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ jsxs("code", {
|
|
3797
3632
|
children: [
|
|
3798
3633
|
param.name,
|
|
3799
3634
|
param.required === false && "?",
|
|
3800
3635
|
": ",
|
|
3801
3636
|
formatSchema(param.schema)
|
|
3802
3637
|
]
|
|
3803
|
-
}
|
|
3804
|
-
param.description && /* @__PURE__ */
|
|
3638
|
+
}),
|
|
3639
|
+
param.description && /* @__PURE__ */ jsx("span", {
|
|
3805
3640
|
children: param.description
|
|
3806
|
-
}
|
|
3641
|
+
})
|
|
3807
3642
|
]
|
|
3808
|
-
}, param.name ?? index
|
|
3809
|
-
}
|
|
3643
|
+
}, param.name ?? index))
|
|
3644
|
+
})
|
|
3810
3645
|
]
|
|
3811
|
-
}
|
|
3812
|
-
sig?.returns && returnType !== "void" && /* @__PURE__ */
|
|
3646
|
+
}),
|
|
3647
|
+
sig?.returns && returnType !== "void" && /* @__PURE__ */ jsxs("div", {
|
|
3813
3648
|
"data-returns-section": true,
|
|
3814
3649
|
children: [
|
|
3815
|
-
/* @__PURE__ */
|
|
3650
|
+
/* @__PURE__ */ jsx("h4", {
|
|
3816
3651
|
children: "Returns"
|
|
3817
|
-
}
|
|
3818
|
-
/* @__PURE__ */
|
|
3652
|
+
}),
|
|
3653
|
+
/* @__PURE__ */ jsx("code", {
|
|
3819
3654
|
children: returnType
|
|
3820
|
-
}
|
|
3821
|
-
sig.returns.description && /* @__PURE__ */
|
|
3655
|
+
}),
|
|
3656
|
+
sig.returns.description && /* @__PURE__ */ jsx("p", {
|
|
3822
3657
|
children: sig.returns.description
|
|
3823
|
-
}
|
|
3658
|
+
})
|
|
3824
3659
|
]
|
|
3825
|
-
}
|
|
3660
|
+
})
|
|
3826
3661
|
]
|
|
3827
|
-
}
|
|
3662
|
+
}))
|
|
3828
3663
|
]
|
|
3829
|
-
}
|
|
3664
|
+
});
|
|
3830
3665
|
}
|
|
3831
3666
|
// src/components/headless/ExampleBlock.tsx
|
|
3832
3667
|
import { useState as useState2 } from "react";
|
|
3833
|
-
import {
|
|
3668
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
3834
3669
|
|
|
3835
3670
|
function getExampleCode(example) {
|
|
3836
3671
|
if (typeof example === "string")
|
|
@@ -3873,46 +3708,46 @@ function ExampleBlock({
|
|
|
3873
3708
|
const currentExample = examples[activeIndex];
|
|
3874
3709
|
const code = cleanCode(getExampleCode(currentExample));
|
|
3875
3710
|
if (renderExample) {
|
|
3876
|
-
return /* @__PURE__ */
|
|
3711
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
3877
3712
|
className,
|
|
3878
3713
|
children: [
|
|
3879
|
-
showTabs && /* @__PURE__ */
|
|
3714
|
+
showTabs && /* @__PURE__ */ jsx2("div", {
|
|
3880
3715
|
"data-tabs": true,
|
|
3881
|
-
children: examples.map((example, index) => /* @__PURE__ */
|
|
3716
|
+
children: examples.map((example, index) => /* @__PURE__ */ jsx2("button", {
|
|
3882
3717
|
type: "button",
|
|
3883
3718
|
onClick: () => setActiveIndex(index),
|
|
3884
3719
|
"data-active": activeIndex === index,
|
|
3885
3720
|
children: getExampleTitle(example) ?? `Example ${index + 1}`
|
|
3886
|
-
}, index
|
|
3887
|
-
}
|
|
3721
|
+
}, index))
|
|
3722
|
+
}),
|
|
3888
3723
|
renderExample(currentExample, activeIndex)
|
|
3889
3724
|
]
|
|
3890
|
-
}
|
|
3725
|
+
});
|
|
3891
3726
|
}
|
|
3892
|
-
return /* @__PURE__ */
|
|
3727
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
3893
3728
|
className,
|
|
3894
3729
|
children: [
|
|
3895
|
-
showTabs && /* @__PURE__ */
|
|
3730
|
+
showTabs && /* @__PURE__ */ jsx2("div", {
|
|
3896
3731
|
"data-tabs": true,
|
|
3897
|
-
children: examples.map((example, index) => /* @__PURE__ */
|
|
3732
|
+
children: examples.map((example, index) => /* @__PURE__ */ jsx2("button", {
|
|
3898
3733
|
type: "button",
|
|
3899
3734
|
onClick: () => setActiveIndex(index),
|
|
3900
3735
|
"data-active": activeIndex === index,
|
|
3901
3736
|
children: getExampleTitle(example) ?? `Example ${index + 1}`
|
|
3902
|
-
}, index
|
|
3903
|
-
}
|
|
3904
|
-
/* @__PURE__ */
|
|
3905
|
-
children: /* @__PURE__ */
|
|
3737
|
+
}, index))
|
|
3738
|
+
}),
|
|
3739
|
+
/* @__PURE__ */ jsx2("pre", {
|
|
3740
|
+
children: /* @__PURE__ */ jsx2("code", {
|
|
3906
3741
|
"data-language": getExampleLanguage(currentExample),
|
|
3907
3742
|
children: code
|
|
3908
|
-
}
|
|
3909
|
-
}
|
|
3743
|
+
})
|
|
3744
|
+
})
|
|
3910
3745
|
]
|
|
3911
|
-
}
|
|
3746
|
+
});
|
|
3912
3747
|
}
|
|
3913
3748
|
// src/components/headless/ExpandableProperty.tsx
|
|
3914
3749
|
import { useState as useState3 } from "react";
|
|
3915
|
-
import {
|
|
3750
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
3916
3751
|
|
|
3917
3752
|
function getNestedProperties(schema) {
|
|
3918
3753
|
if (!schema || typeof schema !== "object")
|
|
@@ -3949,30 +3784,30 @@ function NestedProperty({
|
|
|
3949
3784
|
const hasNested = nestedCount > 0;
|
|
3950
3785
|
const schemaObj = schema;
|
|
3951
3786
|
const description = schemaObj?.description;
|
|
3952
|
-
return /* @__PURE__ */
|
|
3787
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
3953
3788
|
"data-property": name,
|
|
3954
3789
|
"data-depth": depth,
|
|
3955
3790
|
children: [
|
|
3956
|
-
/* @__PURE__ */
|
|
3791
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
3957
3792
|
"data-row": true,
|
|
3958
3793
|
children: [
|
|
3959
|
-
/* @__PURE__ */
|
|
3794
|
+
/* @__PURE__ */ jsxs3("span", {
|
|
3960
3795
|
"data-name": true,
|
|
3961
3796
|
children: [
|
|
3962
3797
|
name,
|
|
3963
3798
|
!required && "?",
|
|
3964
3799
|
":"
|
|
3965
3800
|
]
|
|
3966
|
-
}
|
|
3967
|
-
/* @__PURE__ */
|
|
3801
|
+
}),
|
|
3802
|
+
/* @__PURE__ */ jsx3("span", {
|
|
3968
3803
|
"data-type": true,
|
|
3969
3804
|
children: hasNested ? "object" : type
|
|
3970
|
-
}
|
|
3971
|
-
description && /* @__PURE__ */
|
|
3805
|
+
}),
|
|
3806
|
+
description && /* @__PURE__ */ jsx3("span", {
|
|
3972
3807
|
"data-description": true,
|
|
3973
3808
|
children: description
|
|
3974
|
-
}
|
|
3975
|
-
hasNested && /* @__PURE__ */
|
|
3809
|
+
}),
|
|
3810
|
+
hasNested && /* @__PURE__ */ jsxs3("button", {
|
|
3976
3811
|
type: "button",
|
|
3977
3812
|
onClick: () => setExpanded(!expanded),
|
|
3978
3813
|
"data-expand": true,
|
|
@@ -3980,20 +3815,20 @@ function NestedProperty({
|
|
|
3980
3815
|
nestedCount,
|
|
3981
3816
|
" properties"
|
|
3982
3817
|
]
|
|
3983
|
-
}
|
|
3818
|
+
})
|
|
3984
3819
|
]
|
|
3985
|
-
}
|
|
3986
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
3820
|
+
}),
|
|
3821
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx3("div", {
|
|
3987
3822
|
"data-nested": true,
|
|
3988
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
3823
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx3(NestedProperty, {
|
|
3989
3824
|
name: propName,
|
|
3990
3825
|
schema: propSchema,
|
|
3991
3826
|
required: getRequiredFields(schema).includes(propName),
|
|
3992
3827
|
depth: depth + 1
|
|
3993
|
-
}, propName
|
|
3994
|
-
}
|
|
3828
|
+
}, propName))
|
|
3829
|
+
})
|
|
3995
3830
|
]
|
|
3996
|
-
}
|
|
3831
|
+
});
|
|
3997
3832
|
}
|
|
3998
3833
|
function ExpandableProperty({
|
|
3999
3834
|
param,
|
|
@@ -4006,31 +3841,31 @@ function ExpandableProperty({
|
|
|
4006
3841
|
const nestedProps = getNestedProperties(param.schema);
|
|
4007
3842
|
const nestedCount = countProperties(param.schema);
|
|
4008
3843
|
const hasNested = nestedCount > 0;
|
|
4009
|
-
return /* @__PURE__ */
|
|
3844
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
4010
3845
|
className,
|
|
4011
3846
|
"data-param": param.name,
|
|
4012
3847
|
"data-depth": depth,
|
|
4013
3848
|
children: [
|
|
4014
|
-
/* @__PURE__ */
|
|
3849
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
4015
3850
|
"data-row": true,
|
|
4016
3851
|
children: [
|
|
4017
|
-
/* @__PURE__ */
|
|
3852
|
+
/* @__PURE__ */ jsxs3("span", {
|
|
4018
3853
|
"data-name": true,
|
|
4019
3854
|
children: [
|
|
4020
3855
|
param.name,
|
|
4021
3856
|
isOptional && "?",
|
|
4022
3857
|
":"
|
|
4023
3858
|
]
|
|
4024
|
-
}
|
|
4025
|
-
/* @__PURE__ */
|
|
3859
|
+
}),
|
|
3860
|
+
/* @__PURE__ */ jsx3("span", {
|
|
4026
3861
|
"data-type": true,
|
|
4027
3862
|
children: hasNested ? "object" : type
|
|
4028
|
-
}
|
|
4029
|
-
param.description && /* @__PURE__ */
|
|
3863
|
+
}),
|
|
3864
|
+
param.description && /* @__PURE__ */ jsx3("span", {
|
|
4030
3865
|
"data-description": true,
|
|
4031
3866
|
children: param.description
|
|
4032
|
-
}
|
|
4033
|
-
hasNested && /* @__PURE__ */
|
|
3867
|
+
}),
|
|
3868
|
+
hasNested && /* @__PURE__ */ jsxs3("button", {
|
|
4034
3869
|
type: "button",
|
|
4035
3870
|
onClick: () => setExpanded(!expanded),
|
|
4036
3871
|
"data-expand": true,
|
|
@@ -4038,23 +3873,23 @@ function ExpandableProperty({
|
|
|
4038
3873
|
nestedCount,
|
|
4039
3874
|
" properties"
|
|
4040
3875
|
]
|
|
4041
|
-
}
|
|
3876
|
+
})
|
|
4042
3877
|
]
|
|
4043
|
-
}
|
|
4044
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
3878
|
+
}),
|
|
3879
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx3("div", {
|
|
4045
3880
|
"data-nested": true,
|
|
4046
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
3881
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx3(NestedProperty, {
|
|
4047
3882
|
name: propName,
|
|
4048
3883
|
schema: propSchema,
|
|
4049
3884
|
required: getRequiredFields(param.schema).includes(propName),
|
|
4050
3885
|
depth: depth + 1
|
|
4051
|
-
}, propName
|
|
4052
|
-
}
|
|
3886
|
+
}, propName))
|
|
3887
|
+
})
|
|
4053
3888
|
]
|
|
4054
|
-
}
|
|
3889
|
+
});
|
|
4055
3890
|
}
|
|
4056
3891
|
// src/components/headless/MembersTable.tsx
|
|
4057
|
-
import {
|
|
3892
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4058
3893
|
|
|
4059
3894
|
function groupMembersByKind(members) {
|
|
4060
3895
|
const groups = {
|
|
@@ -4106,33 +3941,33 @@ function MemberRow({ member }) {
|
|
|
4106
3941
|
badges.push("abstract");
|
|
4107
3942
|
if (isReadonly)
|
|
4108
3943
|
badges.push("readonly");
|
|
4109
|
-
return /* @__PURE__ */
|
|
3944
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
4110
3945
|
"data-member": member.name,
|
|
4111
3946
|
children: [
|
|
4112
|
-
/* @__PURE__ */
|
|
3947
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
4113
3948
|
children: [
|
|
4114
|
-
/* @__PURE__ */
|
|
3949
|
+
/* @__PURE__ */ jsxs4("code", {
|
|
4115
3950
|
children: [
|
|
4116
3951
|
member.name,
|
|
4117
3952
|
signature
|
|
4118
3953
|
]
|
|
4119
|
-
}
|
|
4120
|
-
badges.length > 0 && /* @__PURE__ */
|
|
4121
|
-
children: badges.map((badge) => /* @__PURE__ */
|
|
3954
|
+
}),
|
|
3955
|
+
badges.length > 0 && /* @__PURE__ */ jsx4("span", {
|
|
3956
|
+
children: badges.map((badge) => /* @__PURE__ */ jsx4("span", {
|
|
4122
3957
|
"data-badge": badge,
|
|
4123
3958
|
children: badge
|
|
4124
|
-
}, badge
|
|
4125
|
-
}
|
|
3959
|
+
}, badge))
|
|
3960
|
+
})
|
|
4126
3961
|
]
|
|
4127
|
-
}
|
|
4128
|
-
!signature && type !== "unknown" && /* @__PURE__ */
|
|
3962
|
+
}),
|
|
3963
|
+
!signature && type !== "unknown" && /* @__PURE__ */ jsx4("code", {
|
|
4129
3964
|
children: type
|
|
4130
|
-
}
|
|
4131
|
-
member.description && /* @__PURE__ */
|
|
3965
|
+
}),
|
|
3966
|
+
member.description && /* @__PURE__ */ jsx4("p", {
|
|
4132
3967
|
children: member.description
|
|
4133
|
-
}
|
|
3968
|
+
})
|
|
4134
3969
|
]
|
|
4135
|
-
}
|
|
3970
|
+
});
|
|
4136
3971
|
}
|
|
4137
3972
|
function MembersTable({
|
|
4138
3973
|
members,
|
|
@@ -4143,66 +3978,66 @@ function MembersTable({
|
|
|
4143
3978
|
if (!members?.length)
|
|
4144
3979
|
return null;
|
|
4145
3980
|
if (!groupByKind) {
|
|
4146
|
-
return /* @__PURE__ */
|
|
3981
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
4147
3982
|
className,
|
|
4148
|
-
children: members.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
3983
|
+
children: members.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
4149
3984
|
member
|
|
4150
|
-
}, member.name ?? index
|
|
4151
|
-
}
|
|
3985
|
+
}, member.name ?? index))
|
|
3986
|
+
});
|
|
4152
3987
|
}
|
|
4153
3988
|
const groups = groupMembersByKind(members);
|
|
4154
|
-
return /* @__PURE__ */
|
|
3989
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
4155
3990
|
className,
|
|
4156
3991
|
children: [
|
|
4157
|
-
groups.constructors.length > 0 && /* @__PURE__ */
|
|
3992
|
+
groups.constructors.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
4158
3993
|
"data-group": "constructors",
|
|
4159
3994
|
children: [
|
|
4160
|
-
/* @__PURE__ */
|
|
3995
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
4161
3996
|
children: "Constructor"
|
|
4162
|
-
}
|
|
4163
|
-
groups.constructors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
3997
|
+
}),
|
|
3998
|
+
groups.constructors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
4164
3999
|
member
|
|
4165
|
-
}, member.name ?? index
|
|
4000
|
+
}, member.name ?? index))
|
|
4166
4001
|
]
|
|
4167
|
-
}
|
|
4168
|
-
groups.properties.length > 0 && /* @__PURE__ */
|
|
4002
|
+
}),
|
|
4003
|
+
groups.properties.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
4169
4004
|
"data-group": "properties",
|
|
4170
4005
|
children: [
|
|
4171
|
-
/* @__PURE__ */
|
|
4006
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
4172
4007
|
children: "Properties"
|
|
4173
|
-
}
|
|
4174
|
-
groups.properties.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
4008
|
+
}),
|
|
4009
|
+
groups.properties.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
4175
4010
|
member
|
|
4176
|
-
}, member.name ?? index
|
|
4011
|
+
}, member.name ?? index))
|
|
4177
4012
|
]
|
|
4178
|
-
}
|
|
4179
|
-
groups.methods.length > 0 && /* @__PURE__ */
|
|
4013
|
+
}),
|
|
4014
|
+
groups.methods.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
4180
4015
|
"data-group": "methods",
|
|
4181
4016
|
children: [
|
|
4182
|
-
/* @__PURE__ */
|
|
4017
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
4183
4018
|
children: "Methods"
|
|
4184
|
-
}
|
|
4185
|
-
groups.methods.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
4019
|
+
}),
|
|
4020
|
+
groups.methods.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
4186
4021
|
member
|
|
4187
|
-
}, member.name ?? index
|
|
4022
|
+
}, member.name ?? index))
|
|
4188
4023
|
]
|
|
4189
|
-
}
|
|
4190
|
-
groups.accessors.length > 0 && /* @__PURE__ */
|
|
4024
|
+
}),
|
|
4025
|
+
groups.accessors.length > 0 && /* @__PURE__ */ jsxs4("section", {
|
|
4191
4026
|
"data-group": "accessors",
|
|
4192
4027
|
children: [
|
|
4193
|
-
/* @__PURE__ */
|
|
4028
|
+
/* @__PURE__ */ jsx4("h4", {
|
|
4194
4029
|
children: "Accessors"
|
|
4195
|
-
}
|
|
4196
|
-
groups.accessors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */
|
|
4030
|
+
}),
|
|
4031
|
+
groups.accessors.map((member, index) => renderMember ? renderMember(member, index) : /* @__PURE__ */ jsx4(MemberRow, {
|
|
4197
4032
|
member
|
|
4198
|
-
}, member.name ?? index
|
|
4033
|
+
}, member.name ?? index))
|
|
4199
4034
|
]
|
|
4200
|
-
}
|
|
4035
|
+
})
|
|
4201
4036
|
]
|
|
4202
|
-
}
|
|
4037
|
+
});
|
|
4203
4038
|
}
|
|
4204
4039
|
// src/components/headless/ParamTable.tsx
|
|
4205
|
-
import {
|
|
4040
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
4206
4041
|
|
|
4207
4042
|
function isParameter(item) {
|
|
4208
4043
|
return "required" in item;
|
|
@@ -4212,31 +4047,31 @@ function ParamRow({ item, showRequired = true }) {
|
|
|
4212
4047
|
const type = formatSchema(item.schema);
|
|
4213
4048
|
const description = item.description ?? "";
|
|
4214
4049
|
const required = isParameter(item) ? item.required : true;
|
|
4215
|
-
return /* @__PURE__ */
|
|
4050
|
+
return /* @__PURE__ */ jsxs5("tr", {
|
|
4216
4051
|
children: [
|
|
4217
|
-
/* @__PURE__ */
|
|
4052
|
+
/* @__PURE__ */ jsxs5("td", {
|
|
4218
4053
|
children: [
|
|
4219
|
-
/* @__PURE__ */
|
|
4054
|
+
/* @__PURE__ */ jsx5("code", {
|
|
4220
4055
|
children: name
|
|
4221
|
-
}
|
|
4222
|
-
showRequired && required && /* @__PURE__ */
|
|
4056
|
+
}),
|
|
4057
|
+
showRequired && required && /* @__PURE__ */ jsx5("span", {
|
|
4223
4058
|
children: "*"
|
|
4224
|
-
}
|
|
4225
|
-
showRequired && !required && /* @__PURE__ */
|
|
4059
|
+
}),
|
|
4060
|
+
showRequired && !required && /* @__PURE__ */ jsx5("span", {
|
|
4226
4061
|
children: "?"
|
|
4227
|
-
}
|
|
4062
|
+
})
|
|
4228
4063
|
]
|
|
4229
|
-
}
|
|
4230
|
-
/* @__PURE__ */
|
|
4231
|
-
children: /* @__PURE__ */
|
|
4064
|
+
}),
|
|
4065
|
+
/* @__PURE__ */ jsx5("td", {
|
|
4066
|
+
children: /* @__PURE__ */ jsx5("code", {
|
|
4232
4067
|
children: type
|
|
4233
|
-
}
|
|
4234
|
-
}
|
|
4235
|
-
/* @__PURE__ */
|
|
4068
|
+
})
|
|
4069
|
+
}),
|
|
4070
|
+
/* @__PURE__ */ jsx5("td", {
|
|
4236
4071
|
children: description
|
|
4237
|
-
}
|
|
4072
|
+
})
|
|
4238
4073
|
]
|
|
4239
|
-
}
|
|
4074
|
+
});
|
|
4240
4075
|
}
|
|
4241
4076
|
function ParamTable({
|
|
4242
4077
|
items,
|
|
@@ -4246,35 +4081,35 @@ function ParamTable({
|
|
|
4246
4081
|
}) {
|
|
4247
4082
|
if (!items?.length)
|
|
4248
4083
|
return null;
|
|
4249
|
-
return /* @__PURE__ */
|
|
4084
|
+
return /* @__PURE__ */ jsxs5("table", {
|
|
4250
4085
|
className,
|
|
4251
4086
|
children: [
|
|
4252
|
-
/* @__PURE__ */
|
|
4253
|
-
children: /* @__PURE__ */
|
|
4087
|
+
/* @__PURE__ */ jsx5("thead", {
|
|
4088
|
+
children: /* @__PURE__ */ jsxs5("tr", {
|
|
4254
4089
|
children: [
|
|
4255
|
-
/* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ jsx5("th", {
|
|
4256
4091
|
children: "Name"
|
|
4257
|
-
}
|
|
4258
|
-
/* @__PURE__ */
|
|
4092
|
+
}),
|
|
4093
|
+
/* @__PURE__ */ jsx5("th", {
|
|
4259
4094
|
children: "Type"
|
|
4260
|
-
}
|
|
4261
|
-
/* @__PURE__ */
|
|
4095
|
+
}),
|
|
4096
|
+
/* @__PURE__ */ jsx5("th", {
|
|
4262
4097
|
children: "Description"
|
|
4263
|
-
}
|
|
4098
|
+
})
|
|
4264
4099
|
]
|
|
4265
|
-
}
|
|
4266
|
-
}
|
|
4267
|
-
/* @__PURE__ */
|
|
4268
|
-
children: items.map((item, index) => renderRow ? renderRow(item, index) : /* @__PURE__ */
|
|
4100
|
+
})
|
|
4101
|
+
}),
|
|
4102
|
+
/* @__PURE__ */ jsx5("tbody", {
|
|
4103
|
+
children: items.map((item, index) => renderRow ? renderRow(item, index) : /* @__PURE__ */ jsx5(ParamRow, {
|
|
4269
4104
|
item,
|
|
4270
4105
|
showRequired
|
|
4271
|
-
}, item.name ?? index
|
|
4272
|
-
}
|
|
4106
|
+
}, item.name ?? index))
|
|
4107
|
+
})
|
|
4273
4108
|
]
|
|
4274
|
-
}
|
|
4109
|
+
});
|
|
4275
4110
|
}
|
|
4276
4111
|
// src/components/headless/Signature.tsx
|
|
4277
|
-
import {
|
|
4112
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
4278
4113
|
|
|
4279
4114
|
function Signature({
|
|
4280
4115
|
export: exp,
|
|
@@ -4286,13 +4121,13 @@ function Signature({
|
|
|
4286
4121
|
if (children) {
|
|
4287
4122
|
return children(signature);
|
|
4288
4123
|
}
|
|
4289
|
-
return /* @__PURE__ */
|
|
4124
|
+
return /* @__PURE__ */ jsx6("code", {
|
|
4290
4125
|
className,
|
|
4291
4126
|
children: signature
|
|
4292
|
-
}
|
|
4127
|
+
});
|
|
4293
4128
|
}
|
|
4294
4129
|
// src/components/headless/TypeTable.tsx
|
|
4295
|
-
import {
|
|
4130
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
4296
4131
|
|
|
4297
4132
|
function isParameter2(item) {
|
|
4298
4133
|
return "required" in item;
|
|
@@ -4305,25 +4140,25 @@ function TypeTable({
|
|
|
4305
4140
|
}) {
|
|
4306
4141
|
if (!items?.length)
|
|
4307
4142
|
return null;
|
|
4308
|
-
return /* @__PURE__ */
|
|
4143
|
+
return /* @__PURE__ */ jsxs6("table", {
|
|
4309
4144
|
className,
|
|
4310
4145
|
children: [
|
|
4311
|
-
/* @__PURE__ */
|
|
4312
|
-
children: /* @__PURE__ */
|
|
4146
|
+
/* @__PURE__ */ jsx7("thead", {
|
|
4147
|
+
children: /* @__PURE__ */ jsxs6("tr", {
|
|
4313
4148
|
children: [
|
|
4314
|
-
/* @__PURE__ */
|
|
4149
|
+
/* @__PURE__ */ jsx7("th", {
|
|
4315
4150
|
children: "Name"
|
|
4316
|
-
}
|
|
4317
|
-
/* @__PURE__ */
|
|
4151
|
+
}),
|
|
4152
|
+
/* @__PURE__ */ jsx7("th", {
|
|
4318
4153
|
children: "Type"
|
|
4319
|
-
}
|
|
4320
|
-
/* @__PURE__ */
|
|
4154
|
+
}),
|
|
4155
|
+
/* @__PURE__ */ jsx7("th", {
|
|
4321
4156
|
children: "Description"
|
|
4322
|
-
}
|
|
4157
|
+
})
|
|
4323
4158
|
]
|
|
4324
|
-
}
|
|
4325
|
-
}
|
|
4326
|
-
/* @__PURE__ */
|
|
4159
|
+
})
|
|
4160
|
+
}),
|
|
4161
|
+
/* @__PURE__ */ jsx7("tbody", {
|
|
4327
4162
|
children: items.map((item, index) => {
|
|
4328
4163
|
if (renderRow) {
|
|
4329
4164
|
return renderRow(item, index);
|
|
@@ -4332,38 +4167,38 @@ function TypeTable({
|
|
|
4332
4167
|
const type = formatSchema(item.schema);
|
|
4333
4168
|
const description = item.description ?? "";
|
|
4334
4169
|
const required = isParameter2(item) ? item.required : true;
|
|
4335
|
-
return /* @__PURE__ */
|
|
4170
|
+
return /* @__PURE__ */ jsxs6("tr", {
|
|
4336
4171
|
children: [
|
|
4337
|
-
/* @__PURE__ */
|
|
4172
|
+
/* @__PURE__ */ jsxs6("td", {
|
|
4338
4173
|
children: [
|
|
4339
|
-
/* @__PURE__ */
|
|
4174
|
+
/* @__PURE__ */ jsx7("code", {
|
|
4340
4175
|
children: name
|
|
4341
|
-
}
|
|
4342
|
-
showRequired && required && /* @__PURE__ */
|
|
4176
|
+
}),
|
|
4177
|
+
showRequired && required && /* @__PURE__ */ jsx7("span", {
|
|
4343
4178
|
children: "*"
|
|
4344
|
-
}
|
|
4345
|
-
showRequired && !required && /* @__PURE__ */
|
|
4179
|
+
}),
|
|
4180
|
+
showRequired && !required && /* @__PURE__ */ jsx7("span", {
|
|
4346
4181
|
children: "?"
|
|
4347
|
-
}
|
|
4182
|
+
})
|
|
4348
4183
|
]
|
|
4349
|
-
}
|
|
4350
|
-
/* @__PURE__ */
|
|
4351
|
-
children: /* @__PURE__ */
|
|
4184
|
+
}),
|
|
4185
|
+
/* @__PURE__ */ jsx7("td", {
|
|
4186
|
+
children: /* @__PURE__ */ jsx7("code", {
|
|
4352
4187
|
children: type
|
|
4353
|
-
}
|
|
4354
|
-
}
|
|
4355
|
-
/* @__PURE__ */
|
|
4188
|
+
})
|
|
4189
|
+
}),
|
|
4190
|
+
/* @__PURE__ */ jsx7("td", {
|
|
4356
4191
|
children: description
|
|
4357
|
-
}
|
|
4192
|
+
})
|
|
4358
4193
|
]
|
|
4359
|
-
}, name
|
|
4194
|
+
}, name);
|
|
4360
4195
|
})
|
|
4361
|
-
}
|
|
4196
|
+
})
|
|
4362
4197
|
]
|
|
4363
|
-
}
|
|
4198
|
+
});
|
|
4364
4199
|
}
|
|
4365
4200
|
// src/components/styled/ClassPage.tsx
|
|
4366
|
-
import {
|
|
4201
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4367
4202
|
|
|
4368
4203
|
function PropertyItem({ member }) {
|
|
4369
4204
|
const visibility = member.visibility ?? "public";
|
|
@@ -4371,43 +4206,43 @@ function PropertyItem({ member }) {
|
|
|
4371
4206
|
const isStatic = flags?.static;
|
|
4372
4207
|
const isReadonly = flags?.readonly;
|
|
4373
4208
|
const type = formatSchema(member.schema);
|
|
4374
|
-
return /* @__PURE__ */
|
|
4209
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
4375
4210
|
className: "py-3 border-b border-border last:border-0",
|
|
4376
4211
|
children: [
|
|
4377
|
-
/* @__PURE__ */
|
|
4212
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
4378
4213
|
className: "flex items-baseline gap-2 flex-wrap",
|
|
4379
4214
|
children: [
|
|
4380
|
-
/* @__PURE__ */
|
|
4215
|
+
/* @__PURE__ */ jsxs7("span", {
|
|
4381
4216
|
className: "font-semibold text-foreground",
|
|
4382
4217
|
children: [
|
|
4383
4218
|
member.name,
|
|
4384
4219
|
":"
|
|
4385
4220
|
]
|
|
4386
|
-
}
|
|
4387
|
-
/* @__PURE__ */
|
|
4221
|
+
}),
|
|
4222
|
+
/* @__PURE__ */ jsx8("span", {
|
|
4388
4223
|
className: "text-muted-foreground font-mono text-sm",
|
|
4389
4224
|
children: type
|
|
4390
|
-
}
|
|
4391
|
-
visibility !== "public" && /* @__PURE__ */
|
|
4225
|
+
}),
|
|
4226
|
+
visibility !== "public" && /* @__PURE__ */ jsx8("span", {
|
|
4392
4227
|
className: "text-xs px-1.5 py-0.5 rounded bg-muted text-muted-foreground",
|
|
4393
4228
|
children: visibility
|
|
4394
|
-
}
|
|
4395
|
-
isStatic && /* @__PURE__ */
|
|
4229
|
+
}),
|
|
4230
|
+
isStatic && /* @__PURE__ */ jsx8("span", {
|
|
4396
4231
|
className: "text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
4397
4232
|
children: "static"
|
|
4398
|
-
}
|
|
4399
|
-
isReadonly && /* @__PURE__ */
|
|
4233
|
+
}),
|
|
4234
|
+
isReadonly && /* @__PURE__ */ jsx8("span", {
|
|
4400
4235
|
className: "text-xs px-1.5 py-0.5 rounded bg-purple-500/10 text-purple-600 dark:text-purple-400",
|
|
4401
4236
|
children: "readonly"
|
|
4402
|
-
}
|
|
4237
|
+
})
|
|
4403
4238
|
]
|
|
4404
|
-
}
|
|
4405
|
-
member.description && /* @__PURE__ */
|
|
4239
|
+
}),
|
|
4240
|
+
member.description && /* @__PURE__ */ jsx8("p", {
|
|
4406
4241
|
className: "text-sm text-muted-foreground mt-1",
|
|
4407
4242
|
children: member.description
|
|
4408
|
-
}
|
|
4243
|
+
})
|
|
4409
4244
|
]
|
|
4410
|
-
}
|
|
4245
|
+
});
|
|
4411
4246
|
}
|
|
4412
4247
|
function ClassPage({ export: exp, spec, renderExample }) {
|
|
4413
4248
|
const hasExamples = exp.examples && exp.examples.length > 0;
|
|
@@ -4417,16 +4252,16 @@ function ClassPage({ export: exp, spec, renderExample }) {
|
|
|
4417
4252
|
const constructorSig = constructors[0]?.signatures?.[0];
|
|
4418
4253
|
const constructorParams = constructorSig?.parameters ?? [];
|
|
4419
4254
|
const exampleCode = hasExamples ? typeof exp.examples[0] === "string" ? exp.examples[0] : exp.examples[0].code : "";
|
|
4420
|
-
return /* @__PURE__ */
|
|
4255
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
4421
4256
|
className: "space-y-8",
|
|
4422
4257
|
children: [
|
|
4423
|
-
exp.description && /* @__PURE__ */
|
|
4258
|
+
exp.description && /* @__PURE__ */ jsx8("p", {
|
|
4424
4259
|
className: "text-muted-foreground text-lg leading-relaxed",
|
|
4425
4260
|
children: exp.description
|
|
4426
|
-
}
|
|
4427
|
-
/* @__PURE__ */
|
|
4261
|
+
}),
|
|
4262
|
+
/* @__PURE__ */ jsx8("div", {
|
|
4428
4263
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
4429
|
-
children: /* @__PURE__ */
|
|
4264
|
+
children: /* @__PURE__ */ jsxs7("code", {
|
|
4430
4265
|
className: "font-mono text-sm text-foreground whitespace-pre",
|
|
4431
4266
|
children: [
|
|
4432
4267
|
"class ",
|
|
@@ -4434,205 +4269,205 @@ function ClassPage({ export: exp, spec, renderExample }) {
|
|
|
4434
4269
|
exp.extends ? ` extends ${exp.extends}` : "",
|
|
4435
4270
|
exp.implements?.length ? ` implements ${exp.implements.join(", ")}` : ""
|
|
4436
4271
|
]
|
|
4437
|
-
}
|
|
4438
|
-
}
|
|
4439
|
-
/* @__PURE__ */
|
|
4272
|
+
})
|
|
4273
|
+
}),
|
|
4274
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
4440
4275
|
className: `grid gap-8 ${hasExamples ? "lg:grid-cols-2" : "grid-cols-1"}`,
|
|
4441
4276
|
children: [
|
|
4442
|
-
/* @__PURE__ */
|
|
4277
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
4443
4278
|
className: "space-y-8",
|
|
4444
4279
|
children: [
|
|
4445
|
-
constructorParams.length > 0 && /* @__PURE__ */
|
|
4280
|
+
constructorParams.length > 0 && /* @__PURE__ */ jsxs7("section", {
|
|
4446
4281
|
children: [
|
|
4447
|
-
/* @__PURE__ */
|
|
4282
|
+
/* @__PURE__ */ jsx8("h3", {
|
|
4448
4283
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
4449
4284
|
children: "Constructor"
|
|
4450
|
-
}
|
|
4451
|
-
/* @__PURE__ */
|
|
4285
|
+
}),
|
|
4286
|
+
/* @__PURE__ */ jsx8("div", {
|
|
4452
4287
|
className: "ml-2 border-l-2 border-border pl-4",
|
|
4453
|
-
children: constructorParams.map((param, index) => /* @__PURE__ */
|
|
4288
|
+
children: constructorParams.map((param, index) => /* @__PURE__ */ jsx8(ExpandableProperty, {
|
|
4454
4289
|
param
|
|
4455
|
-
}, param.name ?? index
|
|
4456
|
-
}
|
|
4290
|
+
}, param.name ?? index))
|
|
4291
|
+
})
|
|
4457
4292
|
]
|
|
4458
|
-
}
|
|
4459
|
-
methods.length > 0 && /* @__PURE__ */
|
|
4293
|
+
}),
|
|
4294
|
+
methods.length > 0 && /* @__PURE__ */ jsxs7("section", {
|
|
4460
4295
|
children: [
|
|
4461
|
-
/* @__PURE__ */
|
|
4296
|
+
/* @__PURE__ */ jsx8("h3", {
|
|
4462
4297
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
4463
4298
|
children: "Methods"
|
|
4464
|
-
}
|
|
4465
|
-
/* @__PURE__ */
|
|
4299
|
+
}),
|
|
4300
|
+
/* @__PURE__ */ jsx8("div", {
|
|
4466
4301
|
className: "rounded-lg border border-border overflow-hidden",
|
|
4467
|
-
children: methods.map((member, index) => /* @__PURE__ */
|
|
4302
|
+
children: methods.map((member, index) => /* @__PURE__ */ jsx8(CollapsibleMethod, {
|
|
4468
4303
|
member,
|
|
4469
4304
|
defaultExpanded: index === 0
|
|
4470
|
-
}, member.name ?? index
|
|
4471
|
-
}
|
|
4305
|
+
}, member.name ?? index))
|
|
4306
|
+
})
|
|
4472
4307
|
]
|
|
4473
|
-
}
|
|
4474
|
-
properties.length > 0 && /* @__PURE__ */
|
|
4308
|
+
}),
|
|
4309
|
+
properties.length > 0 && /* @__PURE__ */ jsxs7("section", {
|
|
4475
4310
|
children: [
|
|
4476
|
-
/* @__PURE__ */
|
|
4311
|
+
/* @__PURE__ */ jsx8("h3", {
|
|
4477
4312
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
4478
4313
|
children: "Properties"
|
|
4479
|
-
}
|
|
4480
|
-
/* @__PURE__ */
|
|
4314
|
+
}),
|
|
4315
|
+
/* @__PURE__ */ jsx8("div", {
|
|
4481
4316
|
className: "rounded-lg border border-border bg-card px-4",
|
|
4482
|
-
children: properties.map((member, index) => /* @__PURE__ */
|
|
4317
|
+
children: properties.map((member, index) => /* @__PURE__ */ jsx8(PropertyItem, {
|
|
4483
4318
|
member
|
|
4484
|
-
}, member.name ?? index
|
|
4485
|
-
}
|
|
4319
|
+
}, member.name ?? index))
|
|
4320
|
+
})
|
|
4486
4321
|
]
|
|
4487
|
-
}
|
|
4322
|
+
})
|
|
4488
4323
|
]
|
|
4489
|
-
}
|
|
4490
|
-
hasExamples && /* @__PURE__ */
|
|
4324
|
+
}),
|
|
4325
|
+
hasExamples && /* @__PURE__ */ jsxs7("div", {
|
|
4491
4326
|
className: "lg:sticky lg:top-20 lg:self-start",
|
|
4492
4327
|
children: [
|
|
4493
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ jsx8("h3", {
|
|
4494
4329
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
4495
4330
|
children: "Example"
|
|
4496
|
-
}
|
|
4497
|
-
renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */
|
|
4331
|
+
}),
|
|
4332
|
+
renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */ jsx8("pre", {
|
|
4498
4333
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
4499
|
-
children: /* @__PURE__ */
|
|
4334
|
+
children: /* @__PURE__ */ jsx8("code", {
|
|
4500
4335
|
className: "font-mono text-sm text-foreground",
|
|
4501
4336
|
children: exampleCode
|
|
4502
|
-
}
|
|
4503
|
-
}
|
|
4337
|
+
})
|
|
4338
|
+
})
|
|
4504
4339
|
]
|
|
4505
|
-
}
|
|
4340
|
+
})
|
|
4506
4341
|
]
|
|
4507
|
-
}
|
|
4342
|
+
})
|
|
4508
4343
|
]
|
|
4509
|
-
}
|
|
4344
|
+
});
|
|
4510
4345
|
}
|
|
4511
4346
|
|
|
4512
4347
|
// src/components/styled/EnumPage.tsx
|
|
4513
|
-
import {
|
|
4348
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4514
4349
|
|
|
4515
4350
|
function EnumPage({ export: exp, spec, renderExample }) {
|
|
4516
4351
|
const members = exp.members ?? [];
|
|
4517
4352
|
const hasExamples = exp.examples && exp.examples.length > 0;
|
|
4518
4353
|
const signature = buildSignatureString(exp);
|
|
4519
|
-
return /* @__PURE__ */
|
|
4354
|
+
return /* @__PURE__ */ jsxs8("div", {
|
|
4520
4355
|
className: "space-y-6",
|
|
4521
4356
|
children: [
|
|
4522
|
-
exp.description && /* @__PURE__ */
|
|
4357
|
+
exp.description && /* @__PURE__ */ jsx9("p", {
|
|
4523
4358
|
className: "text-muted-foreground text-base leading-relaxed",
|
|
4524
4359
|
children: exp.description
|
|
4525
|
-
}
|
|
4526
|
-
/* @__PURE__ */
|
|
4360
|
+
}),
|
|
4361
|
+
/* @__PURE__ */ jsxs8("section", {
|
|
4527
4362
|
children: [
|
|
4528
|
-
/* @__PURE__ */
|
|
4363
|
+
/* @__PURE__ */ jsx9("h2", {
|
|
4529
4364
|
className: "text-xl font-semibold mb-2",
|
|
4530
4365
|
children: "Declaration"
|
|
4531
|
-
}
|
|
4532
|
-
/* @__PURE__ */
|
|
4366
|
+
}),
|
|
4367
|
+
/* @__PURE__ */ jsx9("div", {
|
|
4533
4368
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
4534
|
-
children: /* @__PURE__ */
|
|
4369
|
+
children: /* @__PURE__ */ jsx9("code", {
|
|
4535
4370
|
className: "font-mono text-sm text-foreground",
|
|
4536
4371
|
children: signature
|
|
4537
|
-
}
|
|
4538
|
-
}
|
|
4539
|
-
exp.deprecated && /* @__PURE__ */
|
|
4372
|
+
})
|
|
4373
|
+
}),
|
|
4374
|
+
exp.deprecated && /* @__PURE__ */ jsxs8("div", {
|
|
4540
4375
|
className: "mt-2 rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
|
|
4541
4376
|
children: [
|
|
4542
|
-
/* @__PURE__ */
|
|
4377
|
+
/* @__PURE__ */ jsx9("strong", {
|
|
4543
4378
|
children: "Deprecated:"
|
|
4544
|
-
}
|
|
4379
|
+
}),
|
|
4545
4380
|
" This export is deprecated."
|
|
4546
4381
|
]
|
|
4547
|
-
}
|
|
4382
|
+
})
|
|
4548
4383
|
]
|
|
4549
|
-
}
|
|
4550
|
-
members.length > 0 && /* @__PURE__ */
|
|
4384
|
+
}),
|
|
4385
|
+
members.length > 0 && /* @__PURE__ */ jsxs8("section", {
|
|
4551
4386
|
children: [
|
|
4552
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx9("h2", {
|
|
4553
4388
|
className: "text-xl font-semibold mb-2",
|
|
4554
4389
|
children: "Members"
|
|
4555
|
-
}
|
|
4556
|
-
/* @__PURE__ */
|
|
4390
|
+
}),
|
|
4391
|
+
/* @__PURE__ */ jsx9("div", {
|
|
4557
4392
|
className: "overflow-x-auto",
|
|
4558
|
-
children: /* @__PURE__ */
|
|
4393
|
+
children: /* @__PURE__ */ jsxs8("table", {
|
|
4559
4394
|
className: "w-full text-sm border-collapse",
|
|
4560
4395
|
children: [
|
|
4561
|
-
/* @__PURE__ */
|
|
4562
|
-
children: /* @__PURE__ */
|
|
4396
|
+
/* @__PURE__ */ jsx9("thead", {
|
|
4397
|
+
children: /* @__PURE__ */ jsxs8("tr", {
|
|
4563
4398
|
className: "border-b border-border",
|
|
4564
4399
|
children: [
|
|
4565
|
-
/* @__PURE__ */
|
|
4400
|
+
/* @__PURE__ */ jsx9("th", {
|
|
4566
4401
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
4567
4402
|
children: "Name"
|
|
4568
|
-
}
|
|
4569
|
-
/* @__PURE__ */
|
|
4403
|
+
}),
|
|
4404
|
+
/* @__PURE__ */ jsx9("th", {
|
|
4570
4405
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
4571
4406
|
children: "Value"
|
|
4572
|
-
}
|
|
4573
|
-
/* @__PURE__ */
|
|
4407
|
+
}),
|
|
4408
|
+
/* @__PURE__ */ jsx9("th", {
|
|
4574
4409
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
4575
4410
|
children: "Description"
|
|
4576
|
-
}
|
|
4411
|
+
})
|
|
4577
4412
|
]
|
|
4578
|
-
}
|
|
4579
|
-
}
|
|
4580
|
-
/* @__PURE__ */
|
|
4413
|
+
})
|
|
4414
|
+
}),
|
|
4415
|
+
/* @__PURE__ */ jsx9("tbody", {
|
|
4581
4416
|
children: members.map((member, index) => {
|
|
4582
4417
|
const value = member.schema !== undefined ? typeof member.schema === "object" && member.schema !== null ? member.schema.const ?? member.schema.default ?? "-" : member.schema : "-";
|
|
4583
|
-
return /* @__PURE__ */
|
|
4418
|
+
return /* @__PURE__ */ jsxs8("tr", {
|
|
4584
4419
|
className: "border-b border-border last:border-0",
|
|
4585
4420
|
children: [
|
|
4586
|
-
/* @__PURE__ */
|
|
4421
|
+
/* @__PURE__ */ jsx9("td", {
|
|
4587
4422
|
className: "py-2 px-3 align-top",
|
|
4588
|
-
children: /* @__PURE__ */
|
|
4423
|
+
children: /* @__PURE__ */ jsx9("code", {
|
|
4589
4424
|
className: "text-primary font-mono text-xs bg-secondary px-1.5 py-0.5 rounded",
|
|
4590
4425
|
children: member.name
|
|
4591
|
-
}
|
|
4592
|
-
}
|
|
4593
|
-
/* @__PURE__ */
|
|
4426
|
+
})
|
|
4427
|
+
}),
|
|
4428
|
+
/* @__PURE__ */ jsx9("td", {
|
|
4594
4429
|
className: "py-2 px-3 align-top",
|
|
4595
|
-
children: /* @__PURE__ */
|
|
4430
|
+
children: /* @__PURE__ */ jsx9("code", {
|
|
4596
4431
|
className: "font-mono text-xs text-muted-foreground",
|
|
4597
4432
|
children: String(value)
|
|
4598
|
-
}
|
|
4599
|
-
}
|
|
4600
|
-
/* @__PURE__ */
|
|
4433
|
+
})
|
|
4434
|
+
}),
|
|
4435
|
+
/* @__PURE__ */ jsx9("td", {
|
|
4601
4436
|
className: "py-2 px-3 align-top text-muted-foreground",
|
|
4602
4437
|
children: member.description ?? ""
|
|
4603
|
-
}
|
|
4438
|
+
})
|
|
4604
4439
|
]
|
|
4605
|
-
}, member.name ?? index
|
|
4440
|
+
}, member.name ?? index);
|
|
4606
4441
|
})
|
|
4607
|
-
}
|
|
4442
|
+
})
|
|
4608
4443
|
]
|
|
4609
|
-
}
|
|
4610
|
-
}
|
|
4444
|
+
})
|
|
4445
|
+
})
|
|
4611
4446
|
]
|
|
4612
|
-
}
|
|
4613
|
-
hasExamples && /* @__PURE__ */
|
|
4447
|
+
}),
|
|
4448
|
+
hasExamples && /* @__PURE__ */ jsxs8("section", {
|
|
4614
4449
|
children: [
|
|
4615
|
-
/* @__PURE__ */
|
|
4450
|
+
/* @__PURE__ */ jsx9("h2", {
|
|
4616
4451
|
className: "text-xl font-semibold mb-2",
|
|
4617
4452
|
children: "Examples"
|
|
4618
|
-
}
|
|
4453
|
+
}),
|
|
4619
4454
|
exp.examples.map((example, index) => {
|
|
4620
4455
|
const code = typeof example === "string" ? example : example.code;
|
|
4621
|
-
return /* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsx9("div", {
|
|
4622
4457
|
className: "mb-4",
|
|
4623
|
-
children: renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */
|
|
4458
|
+
children: renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */ jsx9("pre", {
|
|
4624
4459
|
className: "rounded-lg border border-border bg-secondary p-4 overflow-x-auto",
|
|
4625
|
-
children: /* @__PURE__ */
|
|
4460
|
+
children: /* @__PURE__ */ jsx9("code", {
|
|
4626
4461
|
className: "font-mono text-sm text-foreground",
|
|
4627
4462
|
children: code
|
|
4628
|
-
}
|
|
4629
|
-
}
|
|
4630
|
-
}, index
|
|
4463
|
+
})
|
|
4464
|
+
})
|
|
4465
|
+
}, index);
|
|
4631
4466
|
})
|
|
4632
4467
|
]
|
|
4633
|
-
}
|
|
4468
|
+
})
|
|
4634
4469
|
]
|
|
4635
|
-
}
|
|
4470
|
+
});
|
|
4636
4471
|
}
|
|
4637
4472
|
|
|
4638
4473
|
// ../../node_modules/clsx/dist/clsx.mjs
|
|
@@ -5980,7 +5815,7 @@ function cn(...inputs) {
|
|
|
5980
5815
|
|
|
5981
5816
|
// src/components/styled/ExportCard.tsx
|
|
5982
5817
|
var import_link = __toESM(require_link(), 1);
|
|
5983
|
-
import {
|
|
5818
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5984
5819
|
|
|
5985
5820
|
function ExportCard({
|
|
5986
5821
|
name,
|
|
@@ -5990,33 +5825,33 @@ function ExportCard({
|
|
|
5990
5825
|
className
|
|
5991
5826
|
}) {
|
|
5992
5827
|
const isFunction = kind === "function";
|
|
5993
|
-
return /* @__PURE__ */
|
|
5828
|
+
return /* @__PURE__ */ jsxs9(import_link.default, {
|
|
5994
5829
|
href,
|
|
5995
5830
|
className: cn("group block rounded-lg border border-border bg-card/50 p-4", "transition-all duration-200", "hover:border-border/80 hover:bg-card hover:shadow-md", "hover:-translate-y-0.5", className),
|
|
5996
5831
|
children: [
|
|
5997
|
-
/* @__PURE__ */
|
|
5832
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
5998
5833
|
className: "flex items-baseline gap-1 mb-2",
|
|
5999
5834
|
children: [
|
|
6000
|
-
/* @__PURE__ */
|
|
5835
|
+
/* @__PURE__ */ jsx10("span", {
|
|
6001
5836
|
className: "font-mono text-base font-medium text-foreground group-hover:text-primary transition-colors",
|
|
6002
5837
|
children: name
|
|
6003
|
-
}
|
|
6004
|
-
isFunction && /* @__PURE__ */
|
|
5838
|
+
}),
|
|
5839
|
+
isFunction && /* @__PURE__ */ jsx10("span", {
|
|
6005
5840
|
className: "font-mono text-base text-muted-foreground",
|
|
6006
5841
|
children: "()"
|
|
6007
|
-
}
|
|
5842
|
+
})
|
|
6008
5843
|
]
|
|
6009
|
-
}
|
|
6010
|
-
description && /* @__PURE__ */
|
|
5844
|
+
}),
|
|
5845
|
+
description && /* @__PURE__ */ jsx10("p", {
|
|
6011
5846
|
className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed",
|
|
6012
5847
|
children: description
|
|
6013
|
-
}
|
|
5848
|
+
})
|
|
6014
5849
|
]
|
|
6015
|
-
}
|
|
5850
|
+
});
|
|
6016
5851
|
}
|
|
6017
5852
|
|
|
6018
5853
|
// src/components/styled/ExportIndexPage.tsx
|
|
6019
|
-
import {
|
|
5854
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
6020
5855
|
|
|
6021
5856
|
var KIND_ORDER = ["function", "class", "interface", "type", "enum", "variable"];
|
|
6022
5857
|
var KIND_LABELS = {
|
|
@@ -6048,48 +5883,49 @@ function ExportIndexPage({
|
|
|
6048
5883
|
description,
|
|
6049
5884
|
className
|
|
6050
5885
|
}) {
|
|
5886
|
+
if (false) {}
|
|
6051
5887
|
const groups = groupByKind(spec.exports);
|
|
6052
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsxs10("div", {
|
|
6053
5889
|
className: cn("space-y-10 not-prose", className),
|
|
6054
5890
|
children: [
|
|
6055
|
-
/* @__PURE__ */
|
|
5891
|
+
/* @__PURE__ */ jsxs10("div", {
|
|
6056
5892
|
children: [
|
|
6057
|
-
/* @__PURE__ */
|
|
5893
|
+
/* @__PURE__ */ jsx11("h1", {
|
|
6058
5894
|
className: "text-3xl font-bold text-foreground mb-3",
|
|
6059
5895
|
children: spec.name || "API Reference"
|
|
6060
|
-
}
|
|
6061
|
-
(description || spec.description) && /* @__PURE__ */
|
|
5896
|
+
}),
|
|
5897
|
+
(description || spec.description) && /* @__PURE__ */ jsx11("p", {
|
|
6062
5898
|
className: "text-muted-foreground text-lg leading-relaxed max-w-3xl",
|
|
6063
5899
|
children: description || spec.description
|
|
6064
|
-
}
|
|
5900
|
+
})
|
|
6065
5901
|
]
|
|
6066
|
-
}
|
|
6067
|
-
groups.map((group) => /* @__PURE__ */
|
|
5902
|
+
}),
|
|
5903
|
+
groups.map((group) => /* @__PURE__ */ jsxs10("section", {
|
|
6068
5904
|
children: [
|
|
6069
|
-
/* @__PURE__ */
|
|
5905
|
+
/* @__PURE__ */ jsx11("h2", {
|
|
6070
5906
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
6071
5907
|
children: group.label
|
|
6072
|
-
}
|
|
6073
|
-
/* @__PURE__ */
|
|
5908
|
+
}),
|
|
5909
|
+
/* @__PURE__ */ jsx11("div", {
|
|
6074
5910
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
6075
|
-
children: group.exports.map((exp) => /* @__PURE__ */
|
|
5911
|
+
children: group.exports.map((exp) => /* @__PURE__ */ jsx11(ExportCard, {
|
|
6076
5912
|
name: exp.name,
|
|
6077
5913
|
description: exp.description,
|
|
6078
5914
|
href: `${baseHref}/${exp.id}`,
|
|
6079
5915
|
kind: exp.kind
|
|
6080
|
-
}, exp.id
|
|
6081
|
-
}
|
|
5916
|
+
}, exp.id))
|
|
5917
|
+
})
|
|
6082
5918
|
]
|
|
6083
|
-
}, group.kind
|
|
6084
|
-
groups.length === 0 && /* @__PURE__ */
|
|
5919
|
+
}, group.kind)),
|
|
5920
|
+
groups.length === 0 && /* @__PURE__ */ jsx11("div", {
|
|
6085
5921
|
className: "rounded-lg border border-border bg-card/50 p-8 text-center",
|
|
6086
|
-
children: /* @__PURE__ */
|
|
5922
|
+
children: /* @__PURE__ */ jsx11("p", {
|
|
6087
5923
|
className: "text-muted-foreground",
|
|
6088
5924
|
children: "No exports found in this package."
|
|
6089
|
-
}
|
|
6090
|
-
}
|
|
5925
|
+
})
|
|
5926
|
+
})
|
|
6091
5927
|
]
|
|
6092
|
-
}
|
|
5928
|
+
});
|
|
6093
5929
|
}
|
|
6094
5930
|
|
|
6095
5931
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
@@ -24128,7 +23964,7 @@ import { useState as useState7 } from "react";
|
|
|
24128
23964
|
|
|
24129
23965
|
// src/components/styled/CodeTabs.tsx
|
|
24130
23966
|
import { useState as useState4 } from "react";
|
|
24131
|
-
import {
|
|
23967
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
24132
23968
|
|
|
24133
23969
|
function CodeTabs({
|
|
24134
23970
|
tabs,
|
|
@@ -24147,45 +23983,45 @@ function CodeTabs({
|
|
|
24147
23983
|
};
|
|
24148
23984
|
if (!tabs.length)
|
|
24149
23985
|
return null;
|
|
24150
|
-
return /* @__PURE__ */
|
|
23986
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
24151
23987
|
className: cn("group rounded-lg border border-border overflow-hidden", className),
|
|
24152
23988
|
children: [
|
|
24153
|
-
/* @__PURE__ */
|
|
23989
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
24154
23990
|
className: "flex items-center border-b border-border bg-muted/30",
|
|
24155
23991
|
children: [
|
|
24156
|
-
/* @__PURE__ */
|
|
23992
|
+
/* @__PURE__ */ jsx12("div", {
|
|
24157
23993
|
className: "flex-1 flex items-stretch",
|
|
24158
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
23994
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx12("button", {
|
|
24159
23995
|
type: "button",
|
|
24160
23996
|
onClick: () => setActiveIndex(index),
|
|
24161
23997
|
className: cn("px-4 py-2 text-sm font-mono transition-colors", "border-r border-border last:border-r-0", index === activeIndex ? "text-foreground bg-background/50" : "text-muted-foreground hover:text-foreground"),
|
|
24162
23998
|
children: tab.label
|
|
24163
|
-
}, tab.label
|
|
24164
|
-
}
|
|
24165
|
-
/* @__PURE__ */
|
|
23999
|
+
}, tab.label))
|
|
24000
|
+
}),
|
|
24001
|
+
/* @__PURE__ */ jsx12("button", {
|
|
24166
24002
|
type: "button",
|
|
24167
24003
|
onClick: handleCopy,
|
|
24168
24004
|
className: cn("p-2 mx-2", "text-muted-foreground hover:text-foreground", "opacity-0 group-hover:opacity-100 transition-opacity", "cursor-pointer"),
|
|
24169
24005
|
"aria-label": "Copy code",
|
|
24170
|
-
children: copied ? /* @__PURE__ */
|
|
24006
|
+
children: copied ? /* @__PURE__ */ jsx12(Check, {
|
|
24171
24007
|
size: 16
|
|
24172
|
-
}
|
|
24008
|
+
}) : /* @__PURE__ */ jsx12(Copy, {
|
|
24173
24009
|
size: 16
|
|
24174
|
-
}
|
|
24175
|
-
}
|
|
24010
|
+
})
|
|
24011
|
+
})
|
|
24176
24012
|
]
|
|
24177
|
-
}
|
|
24178
|
-
/* @__PURE__ */
|
|
24013
|
+
}),
|
|
24014
|
+
/* @__PURE__ */ jsx12("div", {
|
|
24179
24015
|
className: "bg-background",
|
|
24180
24016
|
children: activeTab?.content
|
|
24181
|
-
}
|
|
24017
|
+
})
|
|
24182
24018
|
]
|
|
24183
|
-
}
|
|
24019
|
+
});
|
|
24184
24020
|
}
|
|
24185
24021
|
|
|
24186
24022
|
// src/components/styled/ImportSection.tsx
|
|
24187
24023
|
import { useState as useState5 } from "react";
|
|
24188
|
-
import {
|
|
24024
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
24189
24025
|
|
|
24190
24026
|
function ImportSection({
|
|
24191
24027
|
importStatement,
|
|
@@ -24197,31 +24033,31 @@ function ImportSection({
|
|
|
24197
24033
|
setCopied(true);
|
|
24198
24034
|
setTimeout(() => setCopied(false), 1200);
|
|
24199
24035
|
};
|
|
24200
|
-
return /* @__PURE__ */
|
|
24036
|
+
return /* @__PURE__ */ jsxs12("div", {
|
|
24201
24037
|
className: cn("group flex items-center justify-between gap-3", "rounded-lg border border-border bg-muted/30 px-4 py-3", className),
|
|
24202
24038
|
children: [
|
|
24203
|
-
/* @__PURE__ */
|
|
24039
|
+
/* @__PURE__ */ jsx13("code", {
|
|
24204
24040
|
className: "font-mono text-sm text-foreground overflow-x-auto",
|
|
24205
24041
|
children: importStatement
|
|
24206
|
-
}
|
|
24207
|
-
/* @__PURE__ */
|
|
24042
|
+
}),
|
|
24043
|
+
/* @__PURE__ */ jsx13("button", {
|
|
24208
24044
|
type: "button",
|
|
24209
24045
|
onClick: handleCopy,
|
|
24210
24046
|
className: cn("shrink-0 p-1.5 rounded", "text-muted-foreground hover:text-foreground", "opacity-0 group-hover:opacity-100 transition-opacity duration-200", "cursor-pointer"),
|
|
24211
24047
|
"aria-label": "Copy import statement",
|
|
24212
|
-
children: copied ? /* @__PURE__ */
|
|
24048
|
+
children: copied ? /* @__PURE__ */ jsx13(Check, {
|
|
24213
24049
|
size: 16
|
|
24214
|
-
}
|
|
24050
|
+
}) : /* @__PURE__ */ jsx13(Copy, {
|
|
24215
24051
|
size: 16
|
|
24216
|
-
}
|
|
24217
|
-
}
|
|
24052
|
+
})
|
|
24053
|
+
})
|
|
24218
24054
|
]
|
|
24219
|
-
}
|
|
24055
|
+
});
|
|
24220
24056
|
}
|
|
24221
24057
|
|
|
24222
24058
|
// src/components/styled/ParameterItem.tsx
|
|
24223
24059
|
import { useState as useState6 } from "react";
|
|
24224
|
-
import {
|
|
24060
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
24225
24061
|
|
|
24226
24062
|
function getNestedProperties2(schema) {
|
|
24227
24063
|
if (!schema || typeof schema !== "object")
|
|
@@ -24258,48 +24094,48 @@ function NestedPropertyItem({
|
|
|
24258
24094
|
const hasNested = nestedCount > 0;
|
|
24259
24095
|
const schemaObj = schema;
|
|
24260
24096
|
const description = schemaObj?.description;
|
|
24261
|
-
return /* @__PURE__ */
|
|
24097
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
24262
24098
|
className: cn("border-t border-border first:border-t-0", depth > 0 && "ml-4"),
|
|
24263
24099
|
children: [
|
|
24264
|
-
/* @__PURE__ */
|
|
24100
|
+
/* @__PURE__ */ jsx14("div", {
|
|
24265
24101
|
className: "py-3",
|
|
24266
|
-
children: /* @__PURE__ */
|
|
24102
|
+
children: /* @__PURE__ */ jsxs13("div", {
|
|
24267
24103
|
className: "flex items-start gap-2",
|
|
24268
24104
|
children: [
|
|
24269
|
-
hasNested && /* @__PURE__ */
|
|
24105
|
+
hasNested && /* @__PURE__ */ jsx14("button", {
|
|
24270
24106
|
type: "button",
|
|
24271
24107
|
onClick: () => setExpanded(!expanded),
|
|
24272
24108
|
className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
24273
24109
|
"aria-label": expanded ? "Collapse" : "Expand",
|
|
24274
|
-
children: /* @__PURE__ */
|
|
24110
|
+
children: /* @__PURE__ */ jsx14(ChevronRight, {
|
|
24275
24111
|
size: 14,
|
|
24276
24112
|
className: cn("transition-transform duration-200", expanded && "rotate-90")
|
|
24277
|
-
}
|
|
24278
|
-
}
|
|
24279
|
-
!hasNested && /* @__PURE__ */
|
|
24113
|
+
})
|
|
24114
|
+
}),
|
|
24115
|
+
!hasNested && /* @__PURE__ */ jsx14("div", {
|
|
24280
24116
|
className: "w-5"
|
|
24281
|
-
}
|
|
24282
|
-
/* @__PURE__ */
|
|
24117
|
+
}),
|
|
24118
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24283
24119
|
className: "flex-1 min-w-0",
|
|
24284
24120
|
children: [
|
|
24285
|
-
/* @__PURE__ */
|
|
24121
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24286
24122
|
className: "flex items-baseline gap-2 flex-wrap",
|
|
24287
24123
|
children: [
|
|
24288
|
-
/* @__PURE__ */
|
|
24124
|
+
/* @__PURE__ */ jsxs13("span", {
|
|
24289
24125
|
className: "font-mono text-sm text-foreground",
|
|
24290
24126
|
children: [
|
|
24291
24127
|
name,
|
|
24292
|
-
!required && /* @__PURE__ */
|
|
24128
|
+
!required && /* @__PURE__ */ jsx14("span", {
|
|
24293
24129
|
className: "text-muted-foreground",
|
|
24294
24130
|
children: "?"
|
|
24295
|
-
}
|
|
24131
|
+
})
|
|
24296
24132
|
]
|
|
24297
|
-
}
|
|
24298
|
-
/* @__PURE__ */
|
|
24133
|
+
}),
|
|
24134
|
+
/* @__PURE__ */ jsx14("span", {
|
|
24299
24135
|
className: "font-mono text-sm text-muted-foreground",
|
|
24300
24136
|
children: hasNested ? "object" : type
|
|
24301
|
-
}
|
|
24302
|
-
hasNested && /* @__PURE__ */
|
|
24137
|
+
}),
|
|
24138
|
+
hasNested && /* @__PURE__ */ jsxs13("button", {
|
|
24303
24139
|
type: "button",
|
|
24304
24140
|
onClick: () => setExpanded(!expanded),
|
|
24305
24141
|
className: "text-xs text-primary hover:underline cursor-pointer",
|
|
@@ -24308,29 +24144,29 @@ function NestedPropertyItem({
|
|
|
24308
24144
|
" ",
|
|
24309
24145
|
nestedCount === 1 ? "property" : "properties"
|
|
24310
24146
|
]
|
|
24311
|
-
}
|
|
24147
|
+
})
|
|
24312
24148
|
]
|
|
24313
|
-
}
|
|
24314
|
-
description && /* @__PURE__ */
|
|
24149
|
+
}),
|
|
24150
|
+
description && /* @__PURE__ */ jsx14("p", {
|
|
24315
24151
|
className: "text-sm text-muted-foreground mt-1",
|
|
24316
24152
|
children: description
|
|
24317
|
-
}
|
|
24153
|
+
})
|
|
24318
24154
|
]
|
|
24319
|
-
}
|
|
24155
|
+
})
|
|
24320
24156
|
]
|
|
24321
|
-
}
|
|
24322
|
-
}
|
|
24323
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
24157
|
+
})
|
|
24158
|
+
}),
|
|
24159
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx14("div", {
|
|
24324
24160
|
className: "border-l border-border ml-2",
|
|
24325
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
24161
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx14(NestedPropertyItem, {
|
|
24326
24162
|
name: propName,
|
|
24327
24163
|
schema: propSchema,
|
|
24328
24164
|
required: getRequiredFields2(schema).includes(propName),
|
|
24329
24165
|
depth: depth + 1
|
|
24330
|
-
}, propName
|
|
24331
|
-
}
|
|
24166
|
+
}, propName))
|
|
24167
|
+
})
|
|
24332
24168
|
]
|
|
24333
|
-
}
|
|
24169
|
+
});
|
|
24334
24170
|
}
|
|
24335
24171
|
function ParameterItem({
|
|
24336
24172
|
param,
|
|
@@ -24343,46 +24179,46 @@ function ParameterItem({
|
|
|
24343
24179
|
const nestedProps = getNestedProperties2(param.schema);
|
|
24344
24180
|
const nestedCount = countProperties2(param.schema);
|
|
24345
24181
|
const hasNested = nestedCount > 0;
|
|
24346
|
-
return /* @__PURE__ */
|
|
24182
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
24347
24183
|
className: cn("border-b border-border last:border-b-0", className),
|
|
24348
24184
|
children: [
|
|
24349
|
-
/* @__PURE__ */
|
|
24185
|
+
/* @__PURE__ */ jsx14("div", {
|
|
24350
24186
|
className: "py-3",
|
|
24351
|
-
children: /* @__PURE__ */
|
|
24187
|
+
children: /* @__PURE__ */ jsxs13("div", {
|
|
24352
24188
|
className: "flex items-start gap-2",
|
|
24353
24189
|
children: [
|
|
24354
|
-
hasNested && /* @__PURE__ */
|
|
24190
|
+
hasNested && /* @__PURE__ */ jsx14("button", {
|
|
24355
24191
|
type: "button",
|
|
24356
24192
|
onClick: () => setExpanded(!expanded),
|
|
24357
24193
|
className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
24358
24194
|
"aria-label": expanded ? "Collapse" : "Expand",
|
|
24359
|
-
children: /* @__PURE__ */
|
|
24195
|
+
children: /* @__PURE__ */ jsx14(ChevronRight, {
|
|
24360
24196
|
size: 14,
|
|
24361
24197
|
className: cn("transition-transform duration-200", expanded && "rotate-90")
|
|
24362
|
-
}
|
|
24363
|
-
}
|
|
24364
|
-
!hasNested && /* @__PURE__ */
|
|
24198
|
+
})
|
|
24199
|
+
}),
|
|
24200
|
+
!hasNested && /* @__PURE__ */ jsx14("div", {
|
|
24365
24201
|
className: "w-5"
|
|
24366
|
-
}
|
|
24367
|
-
/* @__PURE__ */
|
|
24202
|
+
}),
|
|
24203
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24368
24204
|
className: "flex-1 min-w-0",
|
|
24369
24205
|
children: [
|
|
24370
|
-
/* @__PURE__ */
|
|
24206
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24371
24207
|
className: "flex items-baseline gap-2 flex-wrap",
|
|
24372
24208
|
children: [
|
|
24373
|
-
/* @__PURE__ */
|
|
24209
|
+
/* @__PURE__ */ jsx14("span", {
|
|
24374
24210
|
className: "font-mono text-sm font-medium text-foreground",
|
|
24375
24211
|
children: param.name
|
|
24376
|
-
}
|
|
24377
|
-
isRequired && /* @__PURE__ */
|
|
24212
|
+
}),
|
|
24213
|
+
isRequired && /* @__PURE__ */ jsx14("span", {
|
|
24378
24214
|
className: "text-[10px] font-semibold px-1.5 py-0.5 rounded border border-border bg-muted text-muted-foreground uppercase tracking-wide",
|
|
24379
24215
|
children: "Required"
|
|
24380
|
-
}
|
|
24381
|
-
/* @__PURE__ */
|
|
24216
|
+
}),
|
|
24217
|
+
/* @__PURE__ */ jsx14("span", {
|
|
24382
24218
|
className: "font-mono text-sm text-muted-foreground",
|
|
24383
24219
|
children: hasNested ? "object" : type
|
|
24384
|
-
}
|
|
24385
|
-
hasNested && /* @__PURE__ */
|
|
24220
|
+
}),
|
|
24221
|
+
hasNested && /* @__PURE__ */ jsxs13("button", {
|
|
24386
24222
|
type: "button",
|
|
24387
24223
|
onClick: () => setExpanded(!expanded),
|
|
24388
24224
|
className: "text-xs text-primary hover:underline cursor-pointer",
|
|
@@ -24391,33 +24227,33 @@ function ParameterItem({
|
|
|
24391
24227
|
" ",
|
|
24392
24228
|
nestedCount === 1 ? "property" : "properties"
|
|
24393
24229
|
]
|
|
24394
|
-
}
|
|
24230
|
+
})
|
|
24395
24231
|
]
|
|
24396
|
-
}
|
|
24397
|
-
param.description && /* @__PURE__ */
|
|
24232
|
+
}),
|
|
24233
|
+
param.description && /* @__PURE__ */ jsx14("p", {
|
|
24398
24234
|
className: "text-sm text-muted-foreground mt-1",
|
|
24399
24235
|
children: param.description
|
|
24400
|
-
}
|
|
24236
|
+
})
|
|
24401
24237
|
]
|
|
24402
|
-
}
|
|
24238
|
+
})
|
|
24403
24239
|
]
|
|
24404
|
-
}
|
|
24405
|
-
}
|
|
24406
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
24240
|
+
})
|
|
24241
|
+
}),
|
|
24242
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx14("div", {
|
|
24407
24243
|
className: "border-l border-border ml-2 mb-3",
|
|
24408
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
24244
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx14(NestedPropertyItem, {
|
|
24409
24245
|
name: propName,
|
|
24410
24246
|
schema: propSchema,
|
|
24411
24247
|
required: getRequiredFields2(param.schema).includes(propName),
|
|
24412
24248
|
depth: depth + 1
|
|
24413
|
-
}, propName
|
|
24414
|
-
}
|
|
24249
|
+
}, propName))
|
|
24250
|
+
})
|
|
24415
24251
|
]
|
|
24416
|
-
}
|
|
24252
|
+
});
|
|
24417
24253
|
}
|
|
24418
24254
|
|
|
24419
24255
|
// src/components/styled/FunctionPage.tsx
|
|
24420
|
-
import {
|
|
24256
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
24421
24257
|
|
|
24422
24258
|
function FunctionPage({
|
|
24423
24259
|
export: exp,
|
|
@@ -24442,120 +24278,120 @@ function FunctionPage({
|
|
|
24442
24278
|
return {
|
|
24443
24279
|
label: title,
|
|
24444
24280
|
code,
|
|
24445
|
-
content: renderExample ? renderExample(code, filename) : /* @__PURE__ */
|
|
24281
|
+
content: renderExample ? renderExample(code, filename) : /* @__PURE__ */ jsx15("pre", {
|
|
24446
24282
|
className: "p-4 overflow-x-auto",
|
|
24447
|
-
children: /* @__PURE__ */
|
|
24283
|
+
children: /* @__PURE__ */ jsx15("code", {
|
|
24448
24284
|
className: "font-mono text-sm text-foreground",
|
|
24449
24285
|
children: code
|
|
24450
|
-
}
|
|
24451
|
-
}
|
|
24286
|
+
})
|
|
24287
|
+
})
|
|
24452
24288
|
};
|
|
24453
24289
|
}) : [];
|
|
24454
|
-
return /* @__PURE__ */
|
|
24290
|
+
return /* @__PURE__ */ jsxs14("div", {
|
|
24455
24291
|
className: "space-y-6 not-prose",
|
|
24456
24292
|
children: [
|
|
24457
|
-
/* @__PURE__ */
|
|
24293
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24458
24294
|
className: "flex items-center gap-3",
|
|
24459
24295
|
children: [
|
|
24460
|
-
/* @__PURE__ */
|
|
24296
|
+
/* @__PURE__ */ jsxs14("h1", {
|
|
24461
24297
|
className: "font-mono text-2xl font-semibold text-foreground",
|
|
24462
24298
|
children: [
|
|
24463
24299
|
exp.name,
|
|
24464
|
-
/* @__PURE__ */
|
|
24300
|
+
/* @__PURE__ */ jsx15("span", {
|
|
24465
24301
|
className: "text-muted-foreground",
|
|
24466
24302
|
children: "()"
|
|
24467
|
-
}
|
|
24303
|
+
})
|
|
24468
24304
|
]
|
|
24469
|
-
}
|
|
24470
|
-
/* @__PURE__ */
|
|
24305
|
+
}),
|
|
24306
|
+
/* @__PURE__ */ jsx15("button", {
|
|
24471
24307
|
type: "button",
|
|
24472
24308
|
onClick: handleCopyName,
|
|
24473
24309
|
className: cn("p-1.5 rounded", "text-muted-foreground hover:text-foreground", "transition-colors cursor-pointer"),
|
|
24474
24310
|
"aria-label": "Copy function name",
|
|
24475
|
-
children: copied ? /* @__PURE__ */
|
|
24311
|
+
children: copied ? /* @__PURE__ */ jsx15(Check, {
|
|
24476
24312
|
size: 16
|
|
24477
|
-
}
|
|
24313
|
+
}) : /* @__PURE__ */ jsx15(Copy, {
|
|
24478
24314
|
size: 16
|
|
24479
|
-
}
|
|
24480
|
-
}
|
|
24315
|
+
})
|
|
24316
|
+
})
|
|
24481
24317
|
]
|
|
24482
|
-
}
|
|
24483
|
-
exp.description && /* @__PURE__ */
|
|
24318
|
+
}),
|
|
24319
|
+
exp.description && /* @__PURE__ */ jsx15("p", {
|
|
24484
24320
|
className: "text-muted-foreground leading-relaxed text-base",
|
|
24485
24321
|
children: exp.description
|
|
24486
|
-
}
|
|
24487
|
-
/* @__PURE__ */
|
|
24322
|
+
}),
|
|
24323
|
+
/* @__PURE__ */ jsx15(ImportSection, {
|
|
24488
24324
|
importStatement
|
|
24489
|
-
}
|
|
24490
|
-
/* @__PURE__ */
|
|
24325
|
+
}),
|
|
24326
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24491
24327
|
className: cn("grid gap-8", hasExamples ? "lg:grid-cols-2" : "grid-cols-1"),
|
|
24492
24328
|
children: [
|
|
24493
|
-
/* @__PURE__ */
|
|
24329
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24494
24330
|
className: "space-y-8",
|
|
24495
24331
|
children: [
|
|
24496
|
-
hasParams && /* @__PURE__ */
|
|
24332
|
+
hasParams && /* @__PURE__ */ jsxs14("section", {
|
|
24497
24333
|
children: [
|
|
24498
|
-
/* @__PURE__ */
|
|
24334
|
+
/* @__PURE__ */ jsx15("h2", {
|
|
24499
24335
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
24500
24336
|
children: "Parameters"
|
|
24501
|
-
}
|
|
24502
|
-
/* @__PURE__ */
|
|
24337
|
+
}),
|
|
24338
|
+
/* @__PURE__ */ jsx15("div", {
|
|
24503
24339
|
className: "rounded-lg border border-border bg-card/50",
|
|
24504
|
-
children: sig.parameters.map((param, index) => /* @__PURE__ */
|
|
24340
|
+
children: sig.parameters.map((param, index) => /* @__PURE__ */ jsx15(ParameterItem, {
|
|
24505
24341
|
param
|
|
24506
|
-
}, param.name ?? index
|
|
24507
|
-
}
|
|
24342
|
+
}, param.name ?? index))
|
|
24343
|
+
})
|
|
24508
24344
|
]
|
|
24509
|
-
}
|
|
24510
|
-
sig?.returns && /* @__PURE__ */
|
|
24345
|
+
}),
|
|
24346
|
+
sig?.returns && /* @__PURE__ */ jsxs14("section", {
|
|
24511
24347
|
children: [
|
|
24512
|
-
/* @__PURE__ */
|
|
24348
|
+
/* @__PURE__ */ jsx15("h2", {
|
|
24513
24349
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
24514
24350
|
children: "Returns"
|
|
24515
|
-
}
|
|
24516
|
-
/* @__PURE__ */
|
|
24351
|
+
}),
|
|
24352
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24517
24353
|
className: "rounded-lg border border-border bg-card/50 p-4",
|
|
24518
24354
|
children: [
|
|
24519
|
-
/* @__PURE__ */
|
|
24355
|
+
/* @__PURE__ */ jsx15("div", {
|
|
24520
24356
|
className: "flex items-baseline gap-2 mb-2",
|
|
24521
|
-
children: /* @__PURE__ */
|
|
24357
|
+
children: /* @__PURE__ */ jsx15("span", {
|
|
24522
24358
|
className: "font-mono text-sm text-foreground",
|
|
24523
24359
|
children: formatSchema(sig.returns.schema)
|
|
24524
|
-
}
|
|
24525
|
-
}
|
|
24526
|
-
sig.returns.description && /* @__PURE__ */
|
|
24360
|
+
})
|
|
24361
|
+
}),
|
|
24362
|
+
sig.returns.description && /* @__PURE__ */ jsx15("p", {
|
|
24527
24363
|
className: "text-sm text-muted-foreground",
|
|
24528
24364
|
children: sig.returns.description
|
|
24529
|
-
}
|
|
24365
|
+
})
|
|
24530
24366
|
]
|
|
24531
|
-
}
|
|
24367
|
+
})
|
|
24532
24368
|
]
|
|
24533
|
-
}
|
|
24369
|
+
})
|
|
24534
24370
|
]
|
|
24535
|
-
}
|
|
24536
|
-
hasExamples && /* @__PURE__ */
|
|
24371
|
+
}),
|
|
24372
|
+
hasExamples && /* @__PURE__ */ jsxs14("div", {
|
|
24537
24373
|
className: "lg:sticky lg:top-20 lg:self-start",
|
|
24538
24374
|
children: [
|
|
24539
|
-
/* @__PURE__ */
|
|
24375
|
+
/* @__PURE__ */ jsx15("h2", {
|
|
24540
24376
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
24541
24377
|
children: "Examples"
|
|
24542
|
-
}
|
|
24543
|
-
codeTabs.length === 1 ? /* @__PURE__ */
|
|
24378
|
+
}),
|
|
24379
|
+
codeTabs.length === 1 ? /* @__PURE__ */ jsx15("div", {
|
|
24544
24380
|
className: "rounded-lg border border-border overflow-hidden bg-background",
|
|
24545
24381
|
children: codeTabs[0].content
|
|
24546
|
-
}
|
|
24382
|
+
}) : /* @__PURE__ */ jsx15(CodeTabs, {
|
|
24547
24383
|
tabs: codeTabs
|
|
24548
|
-
}
|
|
24384
|
+
})
|
|
24549
24385
|
]
|
|
24550
|
-
}
|
|
24386
|
+
})
|
|
24551
24387
|
]
|
|
24552
|
-
}
|
|
24388
|
+
})
|
|
24553
24389
|
]
|
|
24554
|
-
}
|
|
24390
|
+
});
|
|
24555
24391
|
}
|
|
24556
24392
|
|
|
24557
24393
|
// src/components/styled/InterfacePage.tsx
|
|
24558
|
-
import {
|
|
24394
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
24559
24395
|
|
|
24560
24396
|
function InterfacePage({
|
|
24561
24397
|
export: exp,
|
|
@@ -24566,128 +24402,128 @@ function InterfacePage({
|
|
|
24566
24402
|
const methods = exp.members?.filter((m) => m.kind === "method" || m.kind === "function");
|
|
24567
24403
|
const hasExamples = exp.examples && exp.examples.length > 0;
|
|
24568
24404
|
const signature = buildSignatureString(exp);
|
|
24569
|
-
return /* @__PURE__ */
|
|
24405
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
24570
24406
|
className: "space-y-6",
|
|
24571
24407
|
children: [
|
|
24572
|
-
exp.description && /* @__PURE__ */
|
|
24408
|
+
exp.description && /* @__PURE__ */ jsx16("p", {
|
|
24573
24409
|
className: "text-muted-foreground text-base leading-relaxed",
|
|
24574
24410
|
children: exp.description
|
|
24575
|
-
}
|
|
24576
|
-
/* @__PURE__ */
|
|
24411
|
+
}),
|
|
24412
|
+
/* @__PURE__ */ jsxs15("section", {
|
|
24577
24413
|
children: [
|
|
24578
|
-
/* @__PURE__ */
|
|
24414
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24579
24415
|
className: "text-xl font-semibold mb-2",
|
|
24580
24416
|
children: "Declaration"
|
|
24581
|
-
}
|
|
24582
|
-
/* @__PURE__ */
|
|
24417
|
+
}),
|
|
24418
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24583
24419
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
24584
|
-
children: /* @__PURE__ */
|
|
24420
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24585
24421
|
className: "font-mono text-sm text-foreground",
|
|
24586
24422
|
children: signature
|
|
24587
|
-
}
|
|
24588
|
-
}
|
|
24589
|
-
exp.deprecated && /* @__PURE__ */
|
|
24423
|
+
})
|
|
24424
|
+
}),
|
|
24425
|
+
exp.deprecated && /* @__PURE__ */ jsxs15("div", {
|
|
24590
24426
|
className: "mt-2 rounded-md bg-yellow-500/10 border border-yellow-500/20 px-3 py-2 text-sm text-yellow-600 dark:text-yellow-400",
|
|
24591
24427
|
children: [
|
|
24592
|
-
/* @__PURE__ */
|
|
24428
|
+
/* @__PURE__ */ jsx16("strong", {
|
|
24593
24429
|
children: "Deprecated:"
|
|
24594
|
-
}
|
|
24430
|
+
}),
|
|
24595
24431
|
" This export is deprecated."
|
|
24596
24432
|
]
|
|
24597
|
-
}
|
|
24433
|
+
})
|
|
24598
24434
|
]
|
|
24599
|
-
}
|
|
24600
|
-
exp.extends && /* @__PURE__ */
|
|
24435
|
+
}),
|
|
24436
|
+
exp.extends && /* @__PURE__ */ jsxs15("section", {
|
|
24601
24437
|
children: [
|
|
24602
|
-
/* @__PURE__ */
|
|
24438
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24603
24439
|
className: "text-xl font-semibold mb-2",
|
|
24604
24440
|
children: "Extends"
|
|
24605
|
-
}
|
|
24606
|
-
/* @__PURE__ */
|
|
24441
|
+
}),
|
|
24442
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24607
24443
|
className: "rounded-lg border border-border bg-card p-4",
|
|
24608
|
-
children: /* @__PURE__ */
|
|
24444
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24609
24445
|
className: "font-mono text-sm text-primary",
|
|
24610
24446
|
children: exp.extends
|
|
24611
|
-
}
|
|
24612
|
-
}
|
|
24447
|
+
})
|
|
24448
|
+
})
|
|
24613
24449
|
]
|
|
24614
|
-
}
|
|
24615
|
-
properties && properties.length > 0 && /* @__PURE__ */
|
|
24450
|
+
}),
|
|
24451
|
+
properties && properties.length > 0 && /* @__PURE__ */ jsxs15("section", {
|
|
24616
24452
|
children: [
|
|
24617
|
-
/* @__PURE__ */
|
|
24453
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24618
24454
|
className: "text-xl font-semibold mb-2",
|
|
24619
24455
|
children: "Properties"
|
|
24620
|
-
}
|
|
24621
|
-
/* @__PURE__ */
|
|
24456
|
+
}),
|
|
24457
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24622
24458
|
className: "overflow-x-auto",
|
|
24623
|
-
children: /* @__PURE__ */
|
|
24459
|
+
children: /* @__PURE__ */ jsxs15("table", {
|
|
24624
24460
|
className: "w-full text-sm border-collapse",
|
|
24625
24461
|
children: [
|
|
24626
|
-
/* @__PURE__ */
|
|
24627
|
-
children: /* @__PURE__ */
|
|
24462
|
+
/* @__PURE__ */ jsx16("thead", {
|
|
24463
|
+
children: /* @__PURE__ */ jsxs15("tr", {
|
|
24628
24464
|
className: "border-b border-border",
|
|
24629
24465
|
children: [
|
|
24630
|
-
/* @__PURE__ */
|
|
24466
|
+
/* @__PURE__ */ jsx16("th", {
|
|
24631
24467
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
24632
24468
|
children: "Name"
|
|
24633
|
-
}
|
|
24634
|
-
/* @__PURE__ */
|
|
24469
|
+
}),
|
|
24470
|
+
/* @__PURE__ */ jsx16("th", {
|
|
24635
24471
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
24636
24472
|
children: "Type"
|
|
24637
|
-
}
|
|
24638
|
-
/* @__PURE__ */
|
|
24473
|
+
}),
|
|
24474
|
+
/* @__PURE__ */ jsx16("th", {
|
|
24639
24475
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
24640
24476
|
children: "Description"
|
|
24641
|
-
}
|
|
24477
|
+
})
|
|
24642
24478
|
]
|
|
24643
|
-
}
|
|
24644
|
-
}
|
|
24645
|
-
/* @__PURE__ */
|
|
24646
|
-
children: properties.map((prop, index) => /* @__PURE__ */
|
|
24479
|
+
})
|
|
24480
|
+
}),
|
|
24481
|
+
/* @__PURE__ */ jsx16("tbody", {
|
|
24482
|
+
children: properties.map((prop, index) => /* @__PURE__ */ jsxs15("tr", {
|
|
24647
24483
|
className: "border-b border-border last:border-0",
|
|
24648
24484
|
children: [
|
|
24649
|
-
/* @__PURE__ */
|
|
24485
|
+
/* @__PURE__ */ jsx16("td", {
|
|
24650
24486
|
className: "py-2 px-3 align-top",
|
|
24651
|
-
children: /* @__PURE__ */
|
|
24487
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24652
24488
|
className: "text-primary font-mono text-xs bg-secondary px-1.5 py-0.5 rounded",
|
|
24653
24489
|
children: prop.name
|
|
24654
|
-
}
|
|
24655
|
-
}
|
|
24656
|
-
/* @__PURE__ */
|
|
24490
|
+
})
|
|
24491
|
+
}),
|
|
24492
|
+
/* @__PURE__ */ jsx16("td", {
|
|
24657
24493
|
className: "py-2 px-3 align-top",
|
|
24658
|
-
children: /* @__PURE__ */
|
|
24494
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24659
24495
|
className: "font-mono text-xs text-muted-foreground",
|
|
24660
24496
|
children: formatSchema(prop.schema)
|
|
24661
|
-
}
|
|
24662
|
-
}
|
|
24663
|
-
/* @__PURE__ */
|
|
24497
|
+
})
|
|
24498
|
+
}),
|
|
24499
|
+
/* @__PURE__ */ jsx16("td", {
|
|
24664
24500
|
className: "py-2 px-3 align-top text-muted-foreground",
|
|
24665
24501
|
children: prop.description ?? ""
|
|
24666
|
-
}
|
|
24502
|
+
})
|
|
24667
24503
|
]
|
|
24668
|
-
}, prop.name ?? index
|
|
24669
|
-
}
|
|
24504
|
+
}, prop.name ?? index))
|
|
24505
|
+
})
|
|
24670
24506
|
]
|
|
24671
|
-
}
|
|
24672
|
-
}
|
|
24507
|
+
})
|
|
24508
|
+
})
|
|
24673
24509
|
]
|
|
24674
|
-
}
|
|
24675
|
-
methods && methods.length > 0 && /* @__PURE__ */
|
|
24510
|
+
}),
|
|
24511
|
+
methods && methods.length > 0 && /* @__PURE__ */ jsxs15("section", {
|
|
24676
24512
|
children: [
|
|
24677
|
-
/* @__PURE__ */
|
|
24513
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24678
24514
|
className: "text-xl font-semibold mb-2",
|
|
24679
24515
|
children: "Methods"
|
|
24680
|
-
}
|
|
24681
|
-
/* @__PURE__ */
|
|
24516
|
+
}),
|
|
24517
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24682
24518
|
className: "space-y-4",
|
|
24683
24519
|
children: methods.map((method, index) => {
|
|
24684
24520
|
const sig = method.signatures?.[0];
|
|
24685
24521
|
const params = sig?.parameters ?? [];
|
|
24686
24522
|
const returnType = formatSchema(sig?.returns?.schema);
|
|
24687
|
-
return /* @__PURE__ */
|
|
24523
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
24688
24524
|
className: "rounded-lg border border-border p-4",
|
|
24689
24525
|
children: [
|
|
24690
|
-
/* @__PURE__ */
|
|
24526
|
+
/* @__PURE__ */ jsxs15("code", {
|
|
24691
24527
|
className: "font-mono text-sm text-primary",
|
|
24692
24528
|
children: [
|
|
24693
24529
|
method.name,
|
|
@@ -24700,51 +24536,51 @@ function InterfacePage({
|
|
|
24700
24536
|
"): ",
|
|
24701
24537
|
returnType
|
|
24702
24538
|
]
|
|
24703
|
-
}
|
|
24704
|
-
method.description && /* @__PURE__ */
|
|
24539
|
+
}),
|
|
24540
|
+
method.description && /* @__PURE__ */ jsx16("p", {
|
|
24705
24541
|
className: "text-sm text-muted-foreground mt-2",
|
|
24706
24542
|
children: method.description
|
|
24707
|
-
}
|
|
24543
|
+
})
|
|
24708
24544
|
]
|
|
24709
|
-
}, method.name ?? index
|
|
24545
|
+
}, method.name ?? index);
|
|
24710
24546
|
})
|
|
24711
|
-
}
|
|
24547
|
+
})
|
|
24712
24548
|
]
|
|
24713
|
-
}
|
|
24714
|
-
hasExamples && /* @__PURE__ */
|
|
24549
|
+
}),
|
|
24550
|
+
hasExamples && /* @__PURE__ */ jsxs15("section", {
|
|
24715
24551
|
children: [
|
|
24716
|
-
/* @__PURE__ */
|
|
24552
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24717
24553
|
className: "text-xl font-semibold mb-2",
|
|
24718
24554
|
children: "Examples"
|
|
24719
|
-
}
|
|
24555
|
+
}),
|
|
24720
24556
|
exp.examples.map((example, index) => {
|
|
24721
24557
|
const code = typeof example === "string" ? example : example.code;
|
|
24722
24558
|
const title = typeof example === "string" ? undefined : example.title;
|
|
24723
|
-
return /* @__PURE__ */
|
|
24559
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
24724
24560
|
className: "mb-4",
|
|
24725
24561
|
children: [
|
|
24726
|
-
title && /* @__PURE__ */
|
|
24562
|
+
title && /* @__PURE__ */ jsx16("h3", {
|
|
24727
24563
|
className: "text-sm font-medium mb-2",
|
|
24728
24564
|
children: title
|
|
24729
|
-
}
|
|
24730
|
-
renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */
|
|
24565
|
+
}),
|
|
24566
|
+
renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */ jsx16("pre", {
|
|
24731
24567
|
className: "rounded-lg border border-border bg-secondary p-4 overflow-x-auto",
|
|
24732
|
-
children: /* @__PURE__ */
|
|
24568
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24733
24569
|
className: "font-mono text-sm text-foreground",
|
|
24734
24570
|
children: code
|
|
24735
|
-
}
|
|
24736
|
-
}
|
|
24571
|
+
})
|
|
24572
|
+
})
|
|
24737
24573
|
]
|
|
24738
|
-
}, index
|
|
24574
|
+
}, index);
|
|
24739
24575
|
})
|
|
24740
24576
|
]
|
|
24741
|
-
}
|
|
24577
|
+
})
|
|
24742
24578
|
]
|
|
24743
|
-
}
|
|
24579
|
+
});
|
|
24744
24580
|
}
|
|
24745
24581
|
|
|
24746
24582
|
// src/components/styled/VariablePage.tsx
|
|
24747
|
-
import {
|
|
24583
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
24748
24584
|
|
|
24749
24585
|
function VariablePage({
|
|
24750
24586
|
export: exp,
|
|
@@ -24754,16 +24590,16 @@ function VariablePage({
|
|
|
24754
24590
|
const typeValue = typeof exp.type === "string" ? exp.type : formatSchema(exp.schema);
|
|
24755
24591
|
const hasExamples = exp.examples && exp.examples.length > 0;
|
|
24756
24592
|
const exampleCode = hasExamples ? typeof exp.examples[0] === "string" ? exp.examples[0] : exp.examples[0].code : "";
|
|
24757
|
-
return /* @__PURE__ */
|
|
24593
|
+
return /* @__PURE__ */ jsxs16("div", {
|
|
24758
24594
|
className: "space-y-8",
|
|
24759
24595
|
children: [
|
|
24760
|
-
exp.description && /* @__PURE__ */
|
|
24596
|
+
exp.description && /* @__PURE__ */ jsx17("p", {
|
|
24761
24597
|
className: "text-muted-foreground text-lg leading-relaxed",
|
|
24762
24598
|
children: exp.description
|
|
24763
|
-
}
|
|
24764
|
-
/* @__PURE__ */
|
|
24599
|
+
}),
|
|
24600
|
+
/* @__PURE__ */ jsx17("div", {
|
|
24765
24601
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
24766
|
-
children: /* @__PURE__ */
|
|
24602
|
+
children: /* @__PURE__ */ jsxs16("code", {
|
|
24767
24603
|
className: "font-mono text-sm text-foreground whitespace-pre",
|
|
24768
24604
|
children: [
|
|
24769
24605
|
"const ",
|
|
@@ -24771,99 +24607,99 @@ function VariablePage({
|
|
|
24771
24607
|
": ",
|
|
24772
24608
|
typeValue
|
|
24773
24609
|
]
|
|
24774
|
-
}
|
|
24775
|
-
}
|
|
24776
|
-
exp.deprecated && /* @__PURE__ */
|
|
24610
|
+
})
|
|
24611
|
+
}),
|
|
24612
|
+
exp.deprecated && /* @__PURE__ */ jsxs16("div", {
|
|
24777
24613
|
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",
|
|
24778
24614
|
children: [
|
|
24779
|
-
/* @__PURE__ */
|
|
24615
|
+
/* @__PURE__ */ jsx17("strong", {
|
|
24780
24616
|
children: "Deprecated:"
|
|
24781
|
-
}
|
|
24617
|
+
}),
|
|
24782
24618
|
" This export is deprecated."
|
|
24783
24619
|
]
|
|
24784
|
-
}
|
|
24785
|
-
/* @__PURE__ */
|
|
24620
|
+
}),
|
|
24621
|
+
/* @__PURE__ */ jsxs16("div", {
|
|
24786
24622
|
className: `grid gap-8 ${hasExamples ? "lg:grid-cols-2" : "grid-cols-1"}`,
|
|
24787
24623
|
children: [
|
|
24788
|
-
/* @__PURE__ */
|
|
24624
|
+
/* @__PURE__ */ jsx17("div", {
|
|
24789
24625
|
className: "space-y-6",
|
|
24790
|
-
children: /* @__PURE__ */
|
|
24626
|
+
children: /* @__PURE__ */ jsxs16("div", {
|
|
24791
24627
|
children: [
|
|
24792
|
-
/* @__PURE__ */
|
|
24628
|
+
/* @__PURE__ */ jsx17("h3", {
|
|
24793
24629
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-3",
|
|
24794
24630
|
children: "Type"
|
|
24795
|
-
}
|
|
24796
|
-
/* @__PURE__ */
|
|
24631
|
+
}),
|
|
24632
|
+
/* @__PURE__ */ jsx17("div", {
|
|
24797
24633
|
className: "rounded-lg border border-border bg-card p-4",
|
|
24798
|
-
children: /* @__PURE__ */
|
|
24634
|
+
children: /* @__PURE__ */ jsx17("code", {
|
|
24799
24635
|
className: "font-mono text-sm text-primary",
|
|
24800
24636
|
children: typeValue
|
|
24801
|
-
}
|
|
24802
|
-
}
|
|
24637
|
+
})
|
|
24638
|
+
})
|
|
24803
24639
|
]
|
|
24804
|
-
}
|
|
24805
|
-
}
|
|
24806
|
-
hasExamples && /* @__PURE__ */
|
|
24640
|
+
})
|
|
24641
|
+
}),
|
|
24642
|
+
hasExamples && /* @__PURE__ */ jsxs16("div", {
|
|
24807
24643
|
children: [
|
|
24808
|
-
/* @__PURE__ */
|
|
24644
|
+
/* @__PURE__ */ jsxs16("h3", {
|
|
24809
24645
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-3",
|
|
24810
24646
|
children: [
|
|
24811
24647
|
exp.name,
|
|
24812
24648
|
" usage"
|
|
24813
24649
|
]
|
|
24814
|
-
}
|
|
24815
|
-
renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */
|
|
24650
|
+
}),
|
|
24651
|
+
renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */ jsx17("pre", {
|
|
24816
24652
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
24817
|
-
children: /* @__PURE__ */
|
|
24653
|
+
children: /* @__PURE__ */ jsx17("code", {
|
|
24818
24654
|
className: "font-mono text-sm text-foreground",
|
|
24819
24655
|
children: exampleCode
|
|
24820
|
-
}
|
|
24821
|
-
}
|
|
24656
|
+
})
|
|
24657
|
+
})
|
|
24822
24658
|
]
|
|
24823
|
-
}
|
|
24659
|
+
})
|
|
24824
24660
|
]
|
|
24825
|
-
}
|
|
24661
|
+
})
|
|
24826
24662
|
]
|
|
24827
|
-
}
|
|
24663
|
+
});
|
|
24828
24664
|
}
|
|
24829
24665
|
|
|
24830
24666
|
// src/components/styled/APIPage.tsx
|
|
24831
|
-
import {
|
|
24667
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
24832
24668
|
|
|
24833
24669
|
function NotFound({ id }) {
|
|
24834
|
-
return /* @__PURE__ */
|
|
24670
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
24835
24671
|
className: "rounded-lg border border-border bg-card p-6 text-center",
|
|
24836
|
-
children: /* @__PURE__ */
|
|
24672
|
+
children: /* @__PURE__ */ jsxs17("p", {
|
|
24837
24673
|
className: "text-muted-foreground",
|
|
24838
24674
|
children: [
|
|
24839
24675
|
"Export ",
|
|
24840
|
-
/* @__PURE__ */
|
|
24676
|
+
/* @__PURE__ */ jsx18("code", {
|
|
24841
24677
|
className: "font-mono text-primary",
|
|
24842
24678
|
children: id
|
|
24843
|
-
}
|
|
24679
|
+
}),
|
|
24844
24680
|
" not found in spec."
|
|
24845
24681
|
]
|
|
24846
|
-
}
|
|
24847
|
-
}
|
|
24682
|
+
})
|
|
24683
|
+
});
|
|
24848
24684
|
}
|
|
24849
24685
|
function NoSpec() {
|
|
24850
|
-
return /* @__PURE__ */
|
|
24686
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
24851
24687
|
className: "rounded-lg border border-red-500/20 bg-red-500/10 p-6 text-center",
|
|
24852
|
-
children: /* @__PURE__ */
|
|
24688
|
+
children: /* @__PURE__ */ jsxs17("p", {
|
|
24853
24689
|
className: "text-red-600 dark:text-red-400",
|
|
24854
24690
|
children: [
|
|
24855
24691
|
"No spec provided. Pass either ",
|
|
24856
|
-
/* @__PURE__ */
|
|
24692
|
+
/* @__PURE__ */ jsx18("code", {
|
|
24857
24693
|
children: "spec"
|
|
24858
|
-
}
|
|
24694
|
+
}),
|
|
24859
24695
|
" or ",
|
|
24860
|
-
/* @__PURE__ */
|
|
24696
|
+
/* @__PURE__ */ jsx18("code", {
|
|
24861
24697
|
children: "instance"
|
|
24862
|
-
}
|
|
24698
|
+
}),
|
|
24863
24699
|
" prop."
|
|
24864
24700
|
]
|
|
24865
|
-
}
|
|
24866
|
-
}
|
|
24701
|
+
})
|
|
24702
|
+
});
|
|
24867
24703
|
}
|
|
24868
24704
|
function APIPage({
|
|
24869
24705
|
spec,
|
|
@@ -24875,44 +24711,44 @@ function APIPage({
|
|
|
24875
24711
|
}) {
|
|
24876
24712
|
const resolvedSpec = spec ?? instance?.spec;
|
|
24877
24713
|
if (!resolvedSpec) {
|
|
24878
|
-
return /* @__PURE__ */
|
|
24714
|
+
return /* @__PURE__ */ jsx18(NoSpec, {});
|
|
24879
24715
|
}
|
|
24880
24716
|
if (!id) {
|
|
24881
|
-
return /* @__PURE__ */
|
|
24717
|
+
return /* @__PURE__ */ jsx18(ExportIndexPage, {
|
|
24882
24718
|
spec: resolvedSpec,
|
|
24883
24719
|
baseHref,
|
|
24884
24720
|
description
|
|
24885
|
-
}
|
|
24721
|
+
});
|
|
24886
24722
|
}
|
|
24887
24723
|
const exp = resolvedSpec.exports.find((e) => e.id === id);
|
|
24888
24724
|
if (!exp) {
|
|
24889
|
-
return /* @__PURE__ */
|
|
24725
|
+
return /* @__PURE__ */ jsx18(NotFound, {
|
|
24890
24726
|
id
|
|
24891
|
-
}
|
|
24727
|
+
});
|
|
24892
24728
|
}
|
|
24893
24729
|
const pageProps = { export: exp, spec: resolvedSpec, renderExample };
|
|
24894
24730
|
switch (exp.kind) {
|
|
24895
24731
|
case "function":
|
|
24896
|
-
return /* @__PURE__ */
|
|
24732
|
+
return /* @__PURE__ */ jsx18(FunctionPage, {
|
|
24897
24733
|
...pageProps
|
|
24898
|
-
}
|
|
24734
|
+
});
|
|
24899
24735
|
case "class":
|
|
24900
|
-
return /* @__PURE__ */
|
|
24736
|
+
return /* @__PURE__ */ jsx18(ClassPage, {
|
|
24901
24737
|
...pageProps
|
|
24902
|
-
}
|
|
24738
|
+
});
|
|
24903
24739
|
case "interface":
|
|
24904
24740
|
case "type":
|
|
24905
|
-
return /* @__PURE__ */
|
|
24741
|
+
return /* @__PURE__ */ jsx18(InterfacePage, {
|
|
24906
24742
|
...pageProps
|
|
24907
|
-
}
|
|
24743
|
+
});
|
|
24908
24744
|
case "enum":
|
|
24909
|
-
return /* @__PURE__ */
|
|
24745
|
+
return /* @__PURE__ */ jsx18(EnumPage, {
|
|
24910
24746
|
...pageProps
|
|
24911
|
-
}
|
|
24747
|
+
});
|
|
24912
24748
|
default:
|
|
24913
|
-
return /* @__PURE__ */
|
|
24749
|
+
return /* @__PURE__ */ jsx18(VariablePage, {
|
|
24914
24750
|
...pageProps
|
|
24915
|
-
}
|
|
24751
|
+
});
|
|
24916
24752
|
}
|
|
24917
24753
|
}
|
|
24918
24754
|
export {
|