@openpkg-ts/doc-generator 0.2.2 → 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 -820
- 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,51 +5883,49 @@ function ExportIndexPage({
|
|
|
6048
5883
|
description,
|
|
6049
5884
|
className
|
|
6050
5885
|
}) {
|
|
6051
|
-
if (
|
|
6052
|
-
console.warn("[ExportIndexPage] baseHref is undefined - links will be broken");
|
|
6053
|
-
}
|
|
5886
|
+
if (false) {}
|
|
6054
5887
|
const groups = groupByKind(spec.exports);
|
|
6055
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsxs10("div", {
|
|
6056
5889
|
className: cn("space-y-10 not-prose", className),
|
|
6057
5890
|
children: [
|
|
6058
|
-
/* @__PURE__ */
|
|
5891
|
+
/* @__PURE__ */ jsxs10("div", {
|
|
6059
5892
|
children: [
|
|
6060
|
-
/* @__PURE__ */
|
|
5893
|
+
/* @__PURE__ */ jsx11("h1", {
|
|
6061
5894
|
className: "text-3xl font-bold text-foreground mb-3",
|
|
6062
5895
|
children: spec.name || "API Reference"
|
|
6063
|
-
}
|
|
6064
|
-
(description || spec.description) && /* @__PURE__ */
|
|
5896
|
+
}),
|
|
5897
|
+
(description || spec.description) && /* @__PURE__ */ jsx11("p", {
|
|
6065
5898
|
className: "text-muted-foreground text-lg leading-relaxed max-w-3xl",
|
|
6066
5899
|
children: description || spec.description
|
|
6067
|
-
}
|
|
5900
|
+
})
|
|
6068
5901
|
]
|
|
6069
|
-
}
|
|
6070
|
-
groups.map((group) => /* @__PURE__ */
|
|
5902
|
+
}),
|
|
5903
|
+
groups.map((group) => /* @__PURE__ */ jsxs10("section", {
|
|
6071
5904
|
children: [
|
|
6072
|
-
/* @__PURE__ */
|
|
5905
|
+
/* @__PURE__ */ jsx11("h2", {
|
|
6073
5906
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
6074
5907
|
children: group.label
|
|
6075
|
-
}
|
|
6076
|
-
/* @__PURE__ */
|
|
5908
|
+
}),
|
|
5909
|
+
/* @__PURE__ */ jsx11("div", {
|
|
6077
5910
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
6078
|
-
children: group.exports.map((exp) => /* @__PURE__ */
|
|
5911
|
+
children: group.exports.map((exp) => /* @__PURE__ */ jsx11(ExportCard, {
|
|
6079
5912
|
name: exp.name,
|
|
6080
5913
|
description: exp.description,
|
|
6081
5914
|
href: `${baseHref}/${exp.id}`,
|
|
6082
5915
|
kind: exp.kind
|
|
6083
|
-
}, exp.id
|
|
6084
|
-
}
|
|
5916
|
+
}, exp.id))
|
|
5917
|
+
})
|
|
6085
5918
|
]
|
|
6086
|
-
}, group.kind
|
|
6087
|
-
groups.length === 0 && /* @__PURE__ */
|
|
5919
|
+
}, group.kind)),
|
|
5920
|
+
groups.length === 0 && /* @__PURE__ */ jsx11("div", {
|
|
6088
5921
|
className: "rounded-lg border border-border bg-card/50 p-8 text-center",
|
|
6089
|
-
children: /* @__PURE__ */
|
|
5922
|
+
children: /* @__PURE__ */ jsx11("p", {
|
|
6090
5923
|
className: "text-muted-foreground",
|
|
6091
5924
|
children: "No exports found in this package."
|
|
6092
|
-
}
|
|
6093
|
-
}
|
|
5925
|
+
})
|
|
5926
|
+
})
|
|
6094
5927
|
]
|
|
6095
|
-
}
|
|
5928
|
+
});
|
|
6096
5929
|
}
|
|
6097
5930
|
|
|
6098
5931
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
@@ -24131,7 +23964,7 @@ import { useState as useState7 } from "react";
|
|
|
24131
23964
|
|
|
24132
23965
|
// src/components/styled/CodeTabs.tsx
|
|
24133
23966
|
import { useState as useState4 } from "react";
|
|
24134
|
-
import {
|
|
23967
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
24135
23968
|
|
|
24136
23969
|
function CodeTabs({
|
|
24137
23970
|
tabs,
|
|
@@ -24150,45 +23983,45 @@ function CodeTabs({
|
|
|
24150
23983
|
};
|
|
24151
23984
|
if (!tabs.length)
|
|
24152
23985
|
return null;
|
|
24153
|
-
return /* @__PURE__ */
|
|
23986
|
+
return /* @__PURE__ */ jsxs11("div", {
|
|
24154
23987
|
className: cn("group rounded-lg border border-border overflow-hidden", className),
|
|
24155
23988
|
children: [
|
|
24156
|
-
/* @__PURE__ */
|
|
23989
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
24157
23990
|
className: "flex items-center border-b border-border bg-muted/30",
|
|
24158
23991
|
children: [
|
|
24159
|
-
/* @__PURE__ */
|
|
23992
|
+
/* @__PURE__ */ jsx12("div", {
|
|
24160
23993
|
className: "flex-1 flex items-stretch",
|
|
24161
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
23994
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx12("button", {
|
|
24162
23995
|
type: "button",
|
|
24163
23996
|
onClick: () => setActiveIndex(index),
|
|
24164
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"),
|
|
24165
23998
|
children: tab.label
|
|
24166
|
-
}, tab.label
|
|
24167
|
-
}
|
|
24168
|
-
/* @__PURE__ */
|
|
23999
|
+
}, tab.label))
|
|
24000
|
+
}),
|
|
24001
|
+
/* @__PURE__ */ jsx12("button", {
|
|
24169
24002
|
type: "button",
|
|
24170
24003
|
onClick: handleCopy,
|
|
24171
24004
|
className: cn("p-2 mx-2", "text-muted-foreground hover:text-foreground", "opacity-0 group-hover:opacity-100 transition-opacity", "cursor-pointer"),
|
|
24172
24005
|
"aria-label": "Copy code",
|
|
24173
|
-
children: copied ? /* @__PURE__ */
|
|
24006
|
+
children: copied ? /* @__PURE__ */ jsx12(Check, {
|
|
24174
24007
|
size: 16
|
|
24175
|
-
}
|
|
24008
|
+
}) : /* @__PURE__ */ jsx12(Copy, {
|
|
24176
24009
|
size: 16
|
|
24177
|
-
}
|
|
24178
|
-
}
|
|
24010
|
+
})
|
|
24011
|
+
})
|
|
24179
24012
|
]
|
|
24180
|
-
}
|
|
24181
|
-
/* @__PURE__ */
|
|
24013
|
+
}),
|
|
24014
|
+
/* @__PURE__ */ jsx12("div", {
|
|
24182
24015
|
className: "bg-background",
|
|
24183
24016
|
children: activeTab?.content
|
|
24184
|
-
}
|
|
24017
|
+
})
|
|
24185
24018
|
]
|
|
24186
|
-
}
|
|
24019
|
+
});
|
|
24187
24020
|
}
|
|
24188
24021
|
|
|
24189
24022
|
// src/components/styled/ImportSection.tsx
|
|
24190
24023
|
import { useState as useState5 } from "react";
|
|
24191
|
-
import {
|
|
24024
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
24192
24025
|
|
|
24193
24026
|
function ImportSection({
|
|
24194
24027
|
importStatement,
|
|
@@ -24200,31 +24033,31 @@ function ImportSection({
|
|
|
24200
24033
|
setCopied(true);
|
|
24201
24034
|
setTimeout(() => setCopied(false), 1200);
|
|
24202
24035
|
};
|
|
24203
|
-
return /* @__PURE__ */
|
|
24036
|
+
return /* @__PURE__ */ jsxs12("div", {
|
|
24204
24037
|
className: cn("group flex items-center justify-between gap-3", "rounded-lg border border-border bg-muted/30 px-4 py-3", className),
|
|
24205
24038
|
children: [
|
|
24206
|
-
/* @__PURE__ */
|
|
24039
|
+
/* @__PURE__ */ jsx13("code", {
|
|
24207
24040
|
className: "font-mono text-sm text-foreground overflow-x-auto",
|
|
24208
24041
|
children: importStatement
|
|
24209
|
-
}
|
|
24210
|
-
/* @__PURE__ */
|
|
24042
|
+
}),
|
|
24043
|
+
/* @__PURE__ */ jsx13("button", {
|
|
24211
24044
|
type: "button",
|
|
24212
24045
|
onClick: handleCopy,
|
|
24213
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"),
|
|
24214
24047
|
"aria-label": "Copy import statement",
|
|
24215
|
-
children: copied ? /* @__PURE__ */
|
|
24048
|
+
children: copied ? /* @__PURE__ */ jsx13(Check, {
|
|
24216
24049
|
size: 16
|
|
24217
|
-
}
|
|
24050
|
+
}) : /* @__PURE__ */ jsx13(Copy, {
|
|
24218
24051
|
size: 16
|
|
24219
|
-
}
|
|
24220
|
-
}
|
|
24052
|
+
})
|
|
24053
|
+
})
|
|
24221
24054
|
]
|
|
24222
|
-
}
|
|
24055
|
+
});
|
|
24223
24056
|
}
|
|
24224
24057
|
|
|
24225
24058
|
// src/components/styled/ParameterItem.tsx
|
|
24226
24059
|
import { useState as useState6 } from "react";
|
|
24227
|
-
import {
|
|
24060
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
24228
24061
|
|
|
24229
24062
|
function getNestedProperties2(schema) {
|
|
24230
24063
|
if (!schema || typeof schema !== "object")
|
|
@@ -24261,48 +24094,48 @@ function NestedPropertyItem({
|
|
|
24261
24094
|
const hasNested = nestedCount > 0;
|
|
24262
24095
|
const schemaObj = schema;
|
|
24263
24096
|
const description = schemaObj?.description;
|
|
24264
|
-
return /* @__PURE__ */
|
|
24097
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
24265
24098
|
className: cn("border-t border-border first:border-t-0", depth > 0 && "ml-4"),
|
|
24266
24099
|
children: [
|
|
24267
|
-
/* @__PURE__ */
|
|
24100
|
+
/* @__PURE__ */ jsx14("div", {
|
|
24268
24101
|
className: "py-3",
|
|
24269
|
-
children: /* @__PURE__ */
|
|
24102
|
+
children: /* @__PURE__ */ jsxs13("div", {
|
|
24270
24103
|
className: "flex items-start gap-2",
|
|
24271
24104
|
children: [
|
|
24272
|
-
hasNested && /* @__PURE__ */
|
|
24105
|
+
hasNested && /* @__PURE__ */ jsx14("button", {
|
|
24273
24106
|
type: "button",
|
|
24274
24107
|
onClick: () => setExpanded(!expanded),
|
|
24275
24108
|
className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
24276
24109
|
"aria-label": expanded ? "Collapse" : "Expand",
|
|
24277
|
-
children: /* @__PURE__ */
|
|
24110
|
+
children: /* @__PURE__ */ jsx14(ChevronRight, {
|
|
24278
24111
|
size: 14,
|
|
24279
24112
|
className: cn("transition-transform duration-200", expanded && "rotate-90")
|
|
24280
|
-
}
|
|
24281
|
-
}
|
|
24282
|
-
!hasNested && /* @__PURE__ */
|
|
24113
|
+
})
|
|
24114
|
+
}),
|
|
24115
|
+
!hasNested && /* @__PURE__ */ jsx14("div", {
|
|
24283
24116
|
className: "w-5"
|
|
24284
|
-
}
|
|
24285
|
-
/* @__PURE__ */
|
|
24117
|
+
}),
|
|
24118
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24286
24119
|
className: "flex-1 min-w-0",
|
|
24287
24120
|
children: [
|
|
24288
|
-
/* @__PURE__ */
|
|
24121
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24289
24122
|
className: "flex items-baseline gap-2 flex-wrap",
|
|
24290
24123
|
children: [
|
|
24291
|
-
/* @__PURE__ */
|
|
24124
|
+
/* @__PURE__ */ jsxs13("span", {
|
|
24292
24125
|
className: "font-mono text-sm text-foreground",
|
|
24293
24126
|
children: [
|
|
24294
24127
|
name,
|
|
24295
|
-
!required && /* @__PURE__ */
|
|
24128
|
+
!required && /* @__PURE__ */ jsx14("span", {
|
|
24296
24129
|
className: "text-muted-foreground",
|
|
24297
24130
|
children: "?"
|
|
24298
|
-
}
|
|
24131
|
+
})
|
|
24299
24132
|
]
|
|
24300
|
-
}
|
|
24301
|
-
/* @__PURE__ */
|
|
24133
|
+
}),
|
|
24134
|
+
/* @__PURE__ */ jsx14("span", {
|
|
24302
24135
|
className: "font-mono text-sm text-muted-foreground",
|
|
24303
24136
|
children: hasNested ? "object" : type
|
|
24304
|
-
}
|
|
24305
|
-
hasNested && /* @__PURE__ */
|
|
24137
|
+
}),
|
|
24138
|
+
hasNested && /* @__PURE__ */ jsxs13("button", {
|
|
24306
24139
|
type: "button",
|
|
24307
24140
|
onClick: () => setExpanded(!expanded),
|
|
24308
24141
|
className: "text-xs text-primary hover:underline cursor-pointer",
|
|
@@ -24311,29 +24144,29 @@ function NestedPropertyItem({
|
|
|
24311
24144
|
" ",
|
|
24312
24145
|
nestedCount === 1 ? "property" : "properties"
|
|
24313
24146
|
]
|
|
24314
|
-
}
|
|
24147
|
+
})
|
|
24315
24148
|
]
|
|
24316
|
-
}
|
|
24317
|
-
description && /* @__PURE__ */
|
|
24149
|
+
}),
|
|
24150
|
+
description && /* @__PURE__ */ jsx14("p", {
|
|
24318
24151
|
className: "text-sm text-muted-foreground mt-1",
|
|
24319
24152
|
children: description
|
|
24320
|
-
}
|
|
24153
|
+
})
|
|
24321
24154
|
]
|
|
24322
|
-
}
|
|
24155
|
+
})
|
|
24323
24156
|
]
|
|
24324
|
-
}
|
|
24325
|
-
}
|
|
24326
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
24157
|
+
})
|
|
24158
|
+
}),
|
|
24159
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx14("div", {
|
|
24327
24160
|
className: "border-l border-border ml-2",
|
|
24328
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
24161
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx14(NestedPropertyItem, {
|
|
24329
24162
|
name: propName,
|
|
24330
24163
|
schema: propSchema,
|
|
24331
24164
|
required: getRequiredFields2(schema).includes(propName),
|
|
24332
24165
|
depth: depth + 1
|
|
24333
|
-
}, propName
|
|
24334
|
-
}
|
|
24166
|
+
}, propName))
|
|
24167
|
+
})
|
|
24335
24168
|
]
|
|
24336
|
-
}
|
|
24169
|
+
});
|
|
24337
24170
|
}
|
|
24338
24171
|
function ParameterItem({
|
|
24339
24172
|
param,
|
|
@@ -24346,46 +24179,46 @@ function ParameterItem({
|
|
|
24346
24179
|
const nestedProps = getNestedProperties2(param.schema);
|
|
24347
24180
|
const nestedCount = countProperties2(param.schema);
|
|
24348
24181
|
const hasNested = nestedCount > 0;
|
|
24349
|
-
return /* @__PURE__ */
|
|
24182
|
+
return /* @__PURE__ */ jsxs13("div", {
|
|
24350
24183
|
className: cn("border-b border-border last:border-b-0", className),
|
|
24351
24184
|
children: [
|
|
24352
|
-
/* @__PURE__ */
|
|
24185
|
+
/* @__PURE__ */ jsx14("div", {
|
|
24353
24186
|
className: "py-3",
|
|
24354
|
-
children: /* @__PURE__ */
|
|
24187
|
+
children: /* @__PURE__ */ jsxs13("div", {
|
|
24355
24188
|
className: "flex items-start gap-2",
|
|
24356
24189
|
children: [
|
|
24357
|
-
hasNested && /* @__PURE__ */
|
|
24190
|
+
hasNested && /* @__PURE__ */ jsx14("button", {
|
|
24358
24191
|
type: "button",
|
|
24359
24192
|
onClick: () => setExpanded(!expanded),
|
|
24360
24193
|
className: "mt-0.5 p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
24361
24194
|
"aria-label": expanded ? "Collapse" : "Expand",
|
|
24362
|
-
children: /* @__PURE__ */
|
|
24195
|
+
children: /* @__PURE__ */ jsx14(ChevronRight, {
|
|
24363
24196
|
size: 14,
|
|
24364
24197
|
className: cn("transition-transform duration-200", expanded && "rotate-90")
|
|
24365
|
-
}
|
|
24366
|
-
}
|
|
24367
|
-
!hasNested && /* @__PURE__ */
|
|
24198
|
+
})
|
|
24199
|
+
}),
|
|
24200
|
+
!hasNested && /* @__PURE__ */ jsx14("div", {
|
|
24368
24201
|
className: "w-5"
|
|
24369
|
-
}
|
|
24370
|
-
/* @__PURE__ */
|
|
24202
|
+
}),
|
|
24203
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24371
24204
|
className: "flex-1 min-w-0",
|
|
24372
24205
|
children: [
|
|
24373
|
-
/* @__PURE__ */
|
|
24206
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
24374
24207
|
className: "flex items-baseline gap-2 flex-wrap",
|
|
24375
24208
|
children: [
|
|
24376
|
-
/* @__PURE__ */
|
|
24209
|
+
/* @__PURE__ */ jsx14("span", {
|
|
24377
24210
|
className: "font-mono text-sm font-medium text-foreground",
|
|
24378
24211
|
children: param.name
|
|
24379
|
-
}
|
|
24380
|
-
isRequired && /* @__PURE__ */
|
|
24212
|
+
}),
|
|
24213
|
+
isRequired && /* @__PURE__ */ jsx14("span", {
|
|
24381
24214
|
className: "text-[10px] font-semibold px-1.5 py-0.5 rounded border border-border bg-muted text-muted-foreground uppercase tracking-wide",
|
|
24382
24215
|
children: "Required"
|
|
24383
|
-
}
|
|
24384
|
-
/* @__PURE__ */
|
|
24216
|
+
}),
|
|
24217
|
+
/* @__PURE__ */ jsx14("span", {
|
|
24385
24218
|
className: "font-mono text-sm text-muted-foreground",
|
|
24386
24219
|
children: hasNested ? "object" : type
|
|
24387
|
-
}
|
|
24388
|
-
hasNested && /* @__PURE__ */
|
|
24220
|
+
}),
|
|
24221
|
+
hasNested && /* @__PURE__ */ jsxs13("button", {
|
|
24389
24222
|
type: "button",
|
|
24390
24223
|
onClick: () => setExpanded(!expanded),
|
|
24391
24224
|
className: "text-xs text-primary hover:underline cursor-pointer",
|
|
@@ -24394,33 +24227,33 @@ function ParameterItem({
|
|
|
24394
24227
|
" ",
|
|
24395
24228
|
nestedCount === 1 ? "property" : "properties"
|
|
24396
24229
|
]
|
|
24397
|
-
}
|
|
24230
|
+
})
|
|
24398
24231
|
]
|
|
24399
|
-
}
|
|
24400
|
-
param.description && /* @__PURE__ */
|
|
24232
|
+
}),
|
|
24233
|
+
param.description && /* @__PURE__ */ jsx14("p", {
|
|
24401
24234
|
className: "text-sm text-muted-foreground mt-1",
|
|
24402
24235
|
children: param.description
|
|
24403
|
-
}
|
|
24236
|
+
})
|
|
24404
24237
|
]
|
|
24405
|
-
}
|
|
24238
|
+
})
|
|
24406
24239
|
]
|
|
24407
|
-
}
|
|
24408
|
-
}
|
|
24409
|
-
hasNested && expanded && nestedProps && /* @__PURE__ */
|
|
24240
|
+
})
|
|
24241
|
+
}),
|
|
24242
|
+
hasNested && expanded && nestedProps && /* @__PURE__ */ jsx14("div", {
|
|
24410
24243
|
className: "border-l border-border ml-2 mb-3",
|
|
24411
|
-
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */
|
|
24244
|
+
children: Object.entries(nestedProps).map(([propName, propSchema]) => /* @__PURE__ */ jsx14(NestedPropertyItem, {
|
|
24412
24245
|
name: propName,
|
|
24413
24246
|
schema: propSchema,
|
|
24414
24247
|
required: getRequiredFields2(param.schema).includes(propName),
|
|
24415
24248
|
depth: depth + 1
|
|
24416
|
-
}, propName
|
|
24417
|
-
}
|
|
24249
|
+
}, propName))
|
|
24250
|
+
})
|
|
24418
24251
|
]
|
|
24419
|
-
}
|
|
24252
|
+
});
|
|
24420
24253
|
}
|
|
24421
24254
|
|
|
24422
24255
|
// src/components/styled/FunctionPage.tsx
|
|
24423
|
-
import {
|
|
24256
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
24424
24257
|
|
|
24425
24258
|
function FunctionPage({
|
|
24426
24259
|
export: exp,
|
|
@@ -24445,120 +24278,120 @@ function FunctionPage({
|
|
|
24445
24278
|
return {
|
|
24446
24279
|
label: title,
|
|
24447
24280
|
code,
|
|
24448
|
-
content: renderExample ? renderExample(code, filename) : /* @__PURE__ */
|
|
24281
|
+
content: renderExample ? renderExample(code, filename) : /* @__PURE__ */ jsx15("pre", {
|
|
24449
24282
|
className: "p-4 overflow-x-auto",
|
|
24450
|
-
children: /* @__PURE__ */
|
|
24283
|
+
children: /* @__PURE__ */ jsx15("code", {
|
|
24451
24284
|
className: "font-mono text-sm text-foreground",
|
|
24452
24285
|
children: code
|
|
24453
|
-
}
|
|
24454
|
-
}
|
|
24286
|
+
})
|
|
24287
|
+
})
|
|
24455
24288
|
};
|
|
24456
24289
|
}) : [];
|
|
24457
|
-
return /* @__PURE__ */
|
|
24290
|
+
return /* @__PURE__ */ jsxs14("div", {
|
|
24458
24291
|
className: "space-y-6 not-prose",
|
|
24459
24292
|
children: [
|
|
24460
|
-
/* @__PURE__ */
|
|
24293
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24461
24294
|
className: "flex items-center gap-3",
|
|
24462
24295
|
children: [
|
|
24463
|
-
/* @__PURE__ */
|
|
24296
|
+
/* @__PURE__ */ jsxs14("h1", {
|
|
24464
24297
|
className: "font-mono text-2xl font-semibold text-foreground",
|
|
24465
24298
|
children: [
|
|
24466
24299
|
exp.name,
|
|
24467
|
-
/* @__PURE__ */
|
|
24300
|
+
/* @__PURE__ */ jsx15("span", {
|
|
24468
24301
|
className: "text-muted-foreground",
|
|
24469
24302
|
children: "()"
|
|
24470
|
-
}
|
|
24303
|
+
})
|
|
24471
24304
|
]
|
|
24472
|
-
}
|
|
24473
|
-
/* @__PURE__ */
|
|
24305
|
+
}),
|
|
24306
|
+
/* @__PURE__ */ jsx15("button", {
|
|
24474
24307
|
type: "button",
|
|
24475
24308
|
onClick: handleCopyName,
|
|
24476
24309
|
className: cn("p-1.5 rounded", "text-muted-foreground hover:text-foreground", "transition-colors cursor-pointer"),
|
|
24477
24310
|
"aria-label": "Copy function name",
|
|
24478
|
-
children: copied ? /* @__PURE__ */
|
|
24311
|
+
children: copied ? /* @__PURE__ */ jsx15(Check, {
|
|
24479
24312
|
size: 16
|
|
24480
|
-
}
|
|
24313
|
+
}) : /* @__PURE__ */ jsx15(Copy, {
|
|
24481
24314
|
size: 16
|
|
24482
|
-
}
|
|
24483
|
-
}
|
|
24315
|
+
})
|
|
24316
|
+
})
|
|
24484
24317
|
]
|
|
24485
|
-
}
|
|
24486
|
-
exp.description && /* @__PURE__ */
|
|
24318
|
+
}),
|
|
24319
|
+
exp.description && /* @__PURE__ */ jsx15("p", {
|
|
24487
24320
|
className: "text-muted-foreground leading-relaxed text-base",
|
|
24488
24321
|
children: exp.description
|
|
24489
|
-
}
|
|
24490
|
-
/* @__PURE__ */
|
|
24322
|
+
}),
|
|
24323
|
+
/* @__PURE__ */ jsx15(ImportSection, {
|
|
24491
24324
|
importStatement
|
|
24492
|
-
}
|
|
24493
|
-
/* @__PURE__ */
|
|
24325
|
+
}),
|
|
24326
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24494
24327
|
className: cn("grid gap-8", hasExamples ? "lg:grid-cols-2" : "grid-cols-1"),
|
|
24495
24328
|
children: [
|
|
24496
|
-
/* @__PURE__ */
|
|
24329
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24497
24330
|
className: "space-y-8",
|
|
24498
24331
|
children: [
|
|
24499
|
-
hasParams && /* @__PURE__ */
|
|
24332
|
+
hasParams && /* @__PURE__ */ jsxs14("section", {
|
|
24500
24333
|
children: [
|
|
24501
|
-
/* @__PURE__ */
|
|
24334
|
+
/* @__PURE__ */ jsx15("h2", {
|
|
24502
24335
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
24503
24336
|
children: "Parameters"
|
|
24504
|
-
}
|
|
24505
|
-
/* @__PURE__ */
|
|
24337
|
+
}),
|
|
24338
|
+
/* @__PURE__ */ jsx15("div", {
|
|
24506
24339
|
className: "rounded-lg border border-border bg-card/50",
|
|
24507
|
-
children: sig.parameters.map((param, index) => /* @__PURE__ */
|
|
24340
|
+
children: sig.parameters.map((param, index) => /* @__PURE__ */ jsx15(ParameterItem, {
|
|
24508
24341
|
param
|
|
24509
|
-
}, param.name ?? index
|
|
24510
|
-
}
|
|
24342
|
+
}, param.name ?? index))
|
|
24343
|
+
})
|
|
24511
24344
|
]
|
|
24512
|
-
}
|
|
24513
|
-
sig?.returns && /* @__PURE__ */
|
|
24345
|
+
}),
|
|
24346
|
+
sig?.returns && /* @__PURE__ */ jsxs14("section", {
|
|
24514
24347
|
children: [
|
|
24515
|
-
/* @__PURE__ */
|
|
24348
|
+
/* @__PURE__ */ jsx15("h2", {
|
|
24516
24349
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
24517
24350
|
children: "Returns"
|
|
24518
|
-
}
|
|
24519
|
-
/* @__PURE__ */
|
|
24351
|
+
}),
|
|
24352
|
+
/* @__PURE__ */ jsxs14("div", {
|
|
24520
24353
|
className: "rounded-lg border border-border bg-card/50 p-4",
|
|
24521
24354
|
children: [
|
|
24522
|
-
/* @__PURE__ */
|
|
24355
|
+
/* @__PURE__ */ jsx15("div", {
|
|
24523
24356
|
className: "flex items-baseline gap-2 mb-2",
|
|
24524
|
-
children: /* @__PURE__ */
|
|
24357
|
+
children: /* @__PURE__ */ jsx15("span", {
|
|
24525
24358
|
className: "font-mono text-sm text-foreground",
|
|
24526
24359
|
children: formatSchema(sig.returns.schema)
|
|
24527
|
-
}
|
|
24528
|
-
}
|
|
24529
|
-
sig.returns.description && /* @__PURE__ */
|
|
24360
|
+
})
|
|
24361
|
+
}),
|
|
24362
|
+
sig.returns.description && /* @__PURE__ */ jsx15("p", {
|
|
24530
24363
|
className: "text-sm text-muted-foreground",
|
|
24531
24364
|
children: sig.returns.description
|
|
24532
|
-
}
|
|
24365
|
+
})
|
|
24533
24366
|
]
|
|
24534
|
-
}
|
|
24367
|
+
})
|
|
24535
24368
|
]
|
|
24536
|
-
}
|
|
24369
|
+
})
|
|
24537
24370
|
]
|
|
24538
|
-
}
|
|
24539
|
-
hasExamples && /* @__PURE__ */
|
|
24371
|
+
}),
|
|
24372
|
+
hasExamples && /* @__PURE__ */ jsxs14("div", {
|
|
24540
24373
|
className: "lg:sticky lg:top-20 lg:self-start",
|
|
24541
24374
|
children: [
|
|
24542
|
-
/* @__PURE__ */
|
|
24375
|
+
/* @__PURE__ */ jsx15("h2", {
|
|
24543
24376
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-4",
|
|
24544
24377
|
children: "Examples"
|
|
24545
|
-
}
|
|
24546
|
-
codeTabs.length === 1 ? /* @__PURE__ */
|
|
24378
|
+
}),
|
|
24379
|
+
codeTabs.length === 1 ? /* @__PURE__ */ jsx15("div", {
|
|
24547
24380
|
className: "rounded-lg border border-border overflow-hidden bg-background",
|
|
24548
24381
|
children: codeTabs[0].content
|
|
24549
|
-
}
|
|
24382
|
+
}) : /* @__PURE__ */ jsx15(CodeTabs, {
|
|
24550
24383
|
tabs: codeTabs
|
|
24551
|
-
}
|
|
24384
|
+
})
|
|
24552
24385
|
]
|
|
24553
|
-
}
|
|
24386
|
+
})
|
|
24554
24387
|
]
|
|
24555
|
-
}
|
|
24388
|
+
})
|
|
24556
24389
|
]
|
|
24557
|
-
}
|
|
24390
|
+
});
|
|
24558
24391
|
}
|
|
24559
24392
|
|
|
24560
24393
|
// src/components/styled/InterfacePage.tsx
|
|
24561
|
-
import {
|
|
24394
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
24562
24395
|
|
|
24563
24396
|
function InterfacePage({
|
|
24564
24397
|
export: exp,
|
|
@@ -24569,128 +24402,128 @@ function InterfacePage({
|
|
|
24569
24402
|
const methods = exp.members?.filter((m) => m.kind === "method" || m.kind === "function");
|
|
24570
24403
|
const hasExamples = exp.examples && exp.examples.length > 0;
|
|
24571
24404
|
const signature = buildSignatureString(exp);
|
|
24572
|
-
return /* @__PURE__ */
|
|
24405
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
24573
24406
|
className: "space-y-6",
|
|
24574
24407
|
children: [
|
|
24575
|
-
exp.description && /* @__PURE__ */
|
|
24408
|
+
exp.description && /* @__PURE__ */ jsx16("p", {
|
|
24576
24409
|
className: "text-muted-foreground text-base leading-relaxed",
|
|
24577
24410
|
children: exp.description
|
|
24578
|
-
}
|
|
24579
|
-
/* @__PURE__ */
|
|
24411
|
+
}),
|
|
24412
|
+
/* @__PURE__ */ jsxs15("section", {
|
|
24580
24413
|
children: [
|
|
24581
|
-
/* @__PURE__ */
|
|
24414
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24582
24415
|
className: "text-xl font-semibold mb-2",
|
|
24583
24416
|
children: "Declaration"
|
|
24584
|
-
}
|
|
24585
|
-
/* @__PURE__ */
|
|
24417
|
+
}),
|
|
24418
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24586
24419
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
24587
|
-
children: /* @__PURE__ */
|
|
24420
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24588
24421
|
className: "font-mono text-sm text-foreground",
|
|
24589
24422
|
children: signature
|
|
24590
|
-
}
|
|
24591
|
-
}
|
|
24592
|
-
exp.deprecated && /* @__PURE__ */
|
|
24423
|
+
})
|
|
24424
|
+
}),
|
|
24425
|
+
exp.deprecated && /* @__PURE__ */ jsxs15("div", {
|
|
24593
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",
|
|
24594
24427
|
children: [
|
|
24595
|
-
/* @__PURE__ */
|
|
24428
|
+
/* @__PURE__ */ jsx16("strong", {
|
|
24596
24429
|
children: "Deprecated:"
|
|
24597
|
-
}
|
|
24430
|
+
}),
|
|
24598
24431
|
" This export is deprecated."
|
|
24599
24432
|
]
|
|
24600
|
-
}
|
|
24433
|
+
})
|
|
24601
24434
|
]
|
|
24602
|
-
}
|
|
24603
|
-
exp.extends && /* @__PURE__ */
|
|
24435
|
+
}),
|
|
24436
|
+
exp.extends && /* @__PURE__ */ jsxs15("section", {
|
|
24604
24437
|
children: [
|
|
24605
|
-
/* @__PURE__ */
|
|
24438
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24606
24439
|
className: "text-xl font-semibold mb-2",
|
|
24607
24440
|
children: "Extends"
|
|
24608
|
-
}
|
|
24609
|
-
/* @__PURE__ */
|
|
24441
|
+
}),
|
|
24442
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24610
24443
|
className: "rounded-lg border border-border bg-card p-4",
|
|
24611
|
-
children: /* @__PURE__ */
|
|
24444
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24612
24445
|
className: "font-mono text-sm text-primary",
|
|
24613
24446
|
children: exp.extends
|
|
24614
|
-
}
|
|
24615
|
-
}
|
|
24447
|
+
})
|
|
24448
|
+
})
|
|
24616
24449
|
]
|
|
24617
|
-
}
|
|
24618
|
-
properties && properties.length > 0 && /* @__PURE__ */
|
|
24450
|
+
}),
|
|
24451
|
+
properties && properties.length > 0 && /* @__PURE__ */ jsxs15("section", {
|
|
24619
24452
|
children: [
|
|
24620
|
-
/* @__PURE__ */
|
|
24453
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24621
24454
|
className: "text-xl font-semibold mb-2",
|
|
24622
24455
|
children: "Properties"
|
|
24623
|
-
}
|
|
24624
|
-
/* @__PURE__ */
|
|
24456
|
+
}),
|
|
24457
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24625
24458
|
className: "overflow-x-auto",
|
|
24626
|
-
children: /* @__PURE__ */
|
|
24459
|
+
children: /* @__PURE__ */ jsxs15("table", {
|
|
24627
24460
|
className: "w-full text-sm border-collapse",
|
|
24628
24461
|
children: [
|
|
24629
|
-
/* @__PURE__ */
|
|
24630
|
-
children: /* @__PURE__ */
|
|
24462
|
+
/* @__PURE__ */ jsx16("thead", {
|
|
24463
|
+
children: /* @__PURE__ */ jsxs15("tr", {
|
|
24631
24464
|
className: "border-b border-border",
|
|
24632
24465
|
children: [
|
|
24633
|
-
/* @__PURE__ */
|
|
24466
|
+
/* @__PURE__ */ jsx16("th", {
|
|
24634
24467
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
24635
24468
|
children: "Name"
|
|
24636
|
-
}
|
|
24637
|
-
/* @__PURE__ */
|
|
24469
|
+
}),
|
|
24470
|
+
/* @__PURE__ */ jsx16("th", {
|
|
24638
24471
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
24639
24472
|
children: "Type"
|
|
24640
|
-
}
|
|
24641
|
-
/* @__PURE__ */
|
|
24473
|
+
}),
|
|
24474
|
+
/* @__PURE__ */ jsx16("th", {
|
|
24642
24475
|
className: "text-left py-2 px-3 font-medium text-muted-foreground",
|
|
24643
24476
|
children: "Description"
|
|
24644
|
-
}
|
|
24477
|
+
})
|
|
24645
24478
|
]
|
|
24646
|
-
}
|
|
24647
|
-
}
|
|
24648
|
-
/* @__PURE__ */
|
|
24649
|
-
children: properties.map((prop, index) => /* @__PURE__ */
|
|
24479
|
+
})
|
|
24480
|
+
}),
|
|
24481
|
+
/* @__PURE__ */ jsx16("tbody", {
|
|
24482
|
+
children: properties.map((prop, index) => /* @__PURE__ */ jsxs15("tr", {
|
|
24650
24483
|
className: "border-b border-border last:border-0",
|
|
24651
24484
|
children: [
|
|
24652
|
-
/* @__PURE__ */
|
|
24485
|
+
/* @__PURE__ */ jsx16("td", {
|
|
24653
24486
|
className: "py-2 px-3 align-top",
|
|
24654
|
-
children: /* @__PURE__ */
|
|
24487
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24655
24488
|
className: "text-primary font-mono text-xs bg-secondary px-1.5 py-0.5 rounded",
|
|
24656
24489
|
children: prop.name
|
|
24657
|
-
}
|
|
24658
|
-
}
|
|
24659
|
-
/* @__PURE__ */
|
|
24490
|
+
})
|
|
24491
|
+
}),
|
|
24492
|
+
/* @__PURE__ */ jsx16("td", {
|
|
24660
24493
|
className: "py-2 px-3 align-top",
|
|
24661
|
-
children: /* @__PURE__ */
|
|
24494
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24662
24495
|
className: "font-mono text-xs text-muted-foreground",
|
|
24663
24496
|
children: formatSchema(prop.schema)
|
|
24664
|
-
}
|
|
24665
|
-
}
|
|
24666
|
-
/* @__PURE__ */
|
|
24497
|
+
})
|
|
24498
|
+
}),
|
|
24499
|
+
/* @__PURE__ */ jsx16("td", {
|
|
24667
24500
|
className: "py-2 px-3 align-top text-muted-foreground",
|
|
24668
24501
|
children: prop.description ?? ""
|
|
24669
|
-
}
|
|
24502
|
+
})
|
|
24670
24503
|
]
|
|
24671
|
-
}, prop.name ?? index
|
|
24672
|
-
}
|
|
24504
|
+
}, prop.name ?? index))
|
|
24505
|
+
})
|
|
24673
24506
|
]
|
|
24674
|
-
}
|
|
24675
|
-
}
|
|
24507
|
+
})
|
|
24508
|
+
})
|
|
24676
24509
|
]
|
|
24677
|
-
}
|
|
24678
|
-
methods && methods.length > 0 && /* @__PURE__ */
|
|
24510
|
+
}),
|
|
24511
|
+
methods && methods.length > 0 && /* @__PURE__ */ jsxs15("section", {
|
|
24679
24512
|
children: [
|
|
24680
|
-
/* @__PURE__ */
|
|
24513
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24681
24514
|
className: "text-xl font-semibold mb-2",
|
|
24682
24515
|
children: "Methods"
|
|
24683
|
-
}
|
|
24684
|
-
/* @__PURE__ */
|
|
24516
|
+
}),
|
|
24517
|
+
/* @__PURE__ */ jsx16("div", {
|
|
24685
24518
|
className: "space-y-4",
|
|
24686
24519
|
children: methods.map((method, index) => {
|
|
24687
24520
|
const sig = method.signatures?.[0];
|
|
24688
24521
|
const params = sig?.parameters ?? [];
|
|
24689
24522
|
const returnType = formatSchema(sig?.returns?.schema);
|
|
24690
|
-
return /* @__PURE__ */
|
|
24523
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
24691
24524
|
className: "rounded-lg border border-border p-4",
|
|
24692
24525
|
children: [
|
|
24693
|
-
/* @__PURE__ */
|
|
24526
|
+
/* @__PURE__ */ jsxs15("code", {
|
|
24694
24527
|
className: "font-mono text-sm text-primary",
|
|
24695
24528
|
children: [
|
|
24696
24529
|
method.name,
|
|
@@ -24703,51 +24536,51 @@ function InterfacePage({
|
|
|
24703
24536
|
"): ",
|
|
24704
24537
|
returnType
|
|
24705
24538
|
]
|
|
24706
|
-
}
|
|
24707
|
-
method.description && /* @__PURE__ */
|
|
24539
|
+
}),
|
|
24540
|
+
method.description && /* @__PURE__ */ jsx16("p", {
|
|
24708
24541
|
className: "text-sm text-muted-foreground mt-2",
|
|
24709
24542
|
children: method.description
|
|
24710
|
-
}
|
|
24543
|
+
})
|
|
24711
24544
|
]
|
|
24712
|
-
}, method.name ?? index
|
|
24545
|
+
}, method.name ?? index);
|
|
24713
24546
|
})
|
|
24714
|
-
}
|
|
24547
|
+
})
|
|
24715
24548
|
]
|
|
24716
|
-
}
|
|
24717
|
-
hasExamples && /* @__PURE__ */
|
|
24549
|
+
}),
|
|
24550
|
+
hasExamples && /* @__PURE__ */ jsxs15("section", {
|
|
24718
24551
|
children: [
|
|
24719
|
-
/* @__PURE__ */
|
|
24552
|
+
/* @__PURE__ */ jsx16("h2", {
|
|
24720
24553
|
className: "text-xl font-semibold mb-2",
|
|
24721
24554
|
children: "Examples"
|
|
24722
|
-
}
|
|
24555
|
+
}),
|
|
24723
24556
|
exp.examples.map((example, index) => {
|
|
24724
24557
|
const code = typeof example === "string" ? example : example.code;
|
|
24725
24558
|
const title = typeof example === "string" ? undefined : example.title;
|
|
24726
|
-
return /* @__PURE__ */
|
|
24559
|
+
return /* @__PURE__ */ jsxs15("div", {
|
|
24727
24560
|
className: "mb-4",
|
|
24728
24561
|
children: [
|
|
24729
|
-
title && /* @__PURE__ */
|
|
24562
|
+
title && /* @__PURE__ */ jsx16("h3", {
|
|
24730
24563
|
className: "text-sm font-medium mb-2",
|
|
24731
24564
|
children: title
|
|
24732
|
-
}
|
|
24733
|
-
renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */
|
|
24565
|
+
}),
|
|
24566
|
+
renderExample ? renderExample(code, `${exp.name.toLowerCase()}-${index}.ts`) : /* @__PURE__ */ jsx16("pre", {
|
|
24734
24567
|
className: "rounded-lg border border-border bg-secondary p-4 overflow-x-auto",
|
|
24735
|
-
children: /* @__PURE__ */
|
|
24568
|
+
children: /* @__PURE__ */ jsx16("code", {
|
|
24736
24569
|
className: "font-mono text-sm text-foreground",
|
|
24737
24570
|
children: code
|
|
24738
|
-
}
|
|
24739
|
-
}
|
|
24571
|
+
})
|
|
24572
|
+
})
|
|
24740
24573
|
]
|
|
24741
|
-
}, index
|
|
24574
|
+
}, index);
|
|
24742
24575
|
})
|
|
24743
24576
|
]
|
|
24744
|
-
}
|
|
24577
|
+
})
|
|
24745
24578
|
]
|
|
24746
|
-
}
|
|
24579
|
+
});
|
|
24747
24580
|
}
|
|
24748
24581
|
|
|
24749
24582
|
// src/components/styled/VariablePage.tsx
|
|
24750
|
-
import {
|
|
24583
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
24751
24584
|
|
|
24752
24585
|
function VariablePage({
|
|
24753
24586
|
export: exp,
|
|
@@ -24757,16 +24590,16 @@ function VariablePage({
|
|
|
24757
24590
|
const typeValue = typeof exp.type === "string" ? exp.type : formatSchema(exp.schema);
|
|
24758
24591
|
const hasExamples = exp.examples && exp.examples.length > 0;
|
|
24759
24592
|
const exampleCode = hasExamples ? typeof exp.examples[0] === "string" ? exp.examples[0] : exp.examples[0].code : "";
|
|
24760
|
-
return /* @__PURE__ */
|
|
24593
|
+
return /* @__PURE__ */ jsxs16("div", {
|
|
24761
24594
|
className: "space-y-8",
|
|
24762
24595
|
children: [
|
|
24763
|
-
exp.description && /* @__PURE__ */
|
|
24596
|
+
exp.description && /* @__PURE__ */ jsx17("p", {
|
|
24764
24597
|
className: "text-muted-foreground text-lg leading-relaxed",
|
|
24765
24598
|
children: exp.description
|
|
24766
|
-
}
|
|
24767
|
-
/* @__PURE__ */
|
|
24599
|
+
}),
|
|
24600
|
+
/* @__PURE__ */ jsx17("div", {
|
|
24768
24601
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
24769
|
-
children: /* @__PURE__ */
|
|
24602
|
+
children: /* @__PURE__ */ jsxs16("code", {
|
|
24770
24603
|
className: "font-mono text-sm text-foreground whitespace-pre",
|
|
24771
24604
|
children: [
|
|
24772
24605
|
"const ",
|
|
@@ -24774,99 +24607,99 @@ function VariablePage({
|
|
|
24774
24607
|
": ",
|
|
24775
24608
|
typeValue
|
|
24776
24609
|
]
|
|
24777
|
-
}
|
|
24778
|
-
}
|
|
24779
|
-
exp.deprecated && /* @__PURE__ */
|
|
24610
|
+
})
|
|
24611
|
+
}),
|
|
24612
|
+
exp.deprecated && /* @__PURE__ */ jsxs16("div", {
|
|
24780
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",
|
|
24781
24614
|
children: [
|
|
24782
|
-
/* @__PURE__ */
|
|
24615
|
+
/* @__PURE__ */ jsx17("strong", {
|
|
24783
24616
|
children: "Deprecated:"
|
|
24784
|
-
}
|
|
24617
|
+
}),
|
|
24785
24618
|
" This export is deprecated."
|
|
24786
24619
|
]
|
|
24787
|
-
}
|
|
24788
|
-
/* @__PURE__ */
|
|
24620
|
+
}),
|
|
24621
|
+
/* @__PURE__ */ jsxs16("div", {
|
|
24789
24622
|
className: `grid gap-8 ${hasExamples ? "lg:grid-cols-2" : "grid-cols-1"}`,
|
|
24790
24623
|
children: [
|
|
24791
|
-
/* @__PURE__ */
|
|
24624
|
+
/* @__PURE__ */ jsx17("div", {
|
|
24792
24625
|
className: "space-y-6",
|
|
24793
|
-
children: /* @__PURE__ */
|
|
24626
|
+
children: /* @__PURE__ */ jsxs16("div", {
|
|
24794
24627
|
children: [
|
|
24795
|
-
/* @__PURE__ */
|
|
24628
|
+
/* @__PURE__ */ jsx17("h3", {
|
|
24796
24629
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-3",
|
|
24797
24630
|
children: "Type"
|
|
24798
|
-
}
|
|
24799
|
-
/* @__PURE__ */
|
|
24631
|
+
}),
|
|
24632
|
+
/* @__PURE__ */ jsx17("div", {
|
|
24800
24633
|
className: "rounded-lg border border-border bg-card p-4",
|
|
24801
|
-
children: /* @__PURE__ */
|
|
24634
|
+
children: /* @__PURE__ */ jsx17("code", {
|
|
24802
24635
|
className: "font-mono text-sm text-primary",
|
|
24803
24636
|
children: typeValue
|
|
24804
|
-
}
|
|
24805
|
-
}
|
|
24637
|
+
})
|
|
24638
|
+
})
|
|
24806
24639
|
]
|
|
24807
|
-
}
|
|
24808
|
-
}
|
|
24809
|
-
hasExamples && /* @__PURE__ */
|
|
24640
|
+
})
|
|
24641
|
+
}),
|
|
24642
|
+
hasExamples && /* @__PURE__ */ jsxs16("div", {
|
|
24810
24643
|
children: [
|
|
24811
|
-
/* @__PURE__ */
|
|
24644
|
+
/* @__PURE__ */ jsxs16("h3", {
|
|
24812
24645
|
className: "text-sm font-semibold uppercase tracking-wide text-muted-foreground mb-3",
|
|
24813
24646
|
children: [
|
|
24814
24647
|
exp.name,
|
|
24815
24648
|
" usage"
|
|
24816
24649
|
]
|
|
24817
|
-
}
|
|
24818
|
-
renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */
|
|
24650
|
+
}),
|
|
24651
|
+
renderExample ? renderExample(exampleCode, `${exp.name.toLowerCase()}.ts`) : /* @__PURE__ */ jsx17("pre", {
|
|
24819
24652
|
className: "rounded-lg border border-border bg-muted/30 p-4 overflow-x-auto",
|
|
24820
|
-
children: /* @__PURE__ */
|
|
24653
|
+
children: /* @__PURE__ */ jsx17("code", {
|
|
24821
24654
|
className: "font-mono text-sm text-foreground",
|
|
24822
24655
|
children: exampleCode
|
|
24823
|
-
}
|
|
24824
|
-
}
|
|
24656
|
+
})
|
|
24657
|
+
})
|
|
24825
24658
|
]
|
|
24826
|
-
}
|
|
24659
|
+
})
|
|
24827
24660
|
]
|
|
24828
|
-
}
|
|
24661
|
+
})
|
|
24829
24662
|
]
|
|
24830
|
-
}
|
|
24663
|
+
});
|
|
24831
24664
|
}
|
|
24832
24665
|
|
|
24833
24666
|
// src/components/styled/APIPage.tsx
|
|
24834
|
-
import {
|
|
24667
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
24835
24668
|
|
|
24836
24669
|
function NotFound({ id }) {
|
|
24837
|
-
return /* @__PURE__ */
|
|
24670
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
24838
24671
|
className: "rounded-lg border border-border bg-card p-6 text-center",
|
|
24839
|
-
children: /* @__PURE__ */
|
|
24672
|
+
children: /* @__PURE__ */ jsxs17("p", {
|
|
24840
24673
|
className: "text-muted-foreground",
|
|
24841
24674
|
children: [
|
|
24842
24675
|
"Export ",
|
|
24843
|
-
/* @__PURE__ */
|
|
24676
|
+
/* @__PURE__ */ jsx18("code", {
|
|
24844
24677
|
className: "font-mono text-primary",
|
|
24845
24678
|
children: id
|
|
24846
|
-
}
|
|
24679
|
+
}),
|
|
24847
24680
|
" not found in spec."
|
|
24848
24681
|
]
|
|
24849
|
-
}
|
|
24850
|
-
}
|
|
24682
|
+
})
|
|
24683
|
+
});
|
|
24851
24684
|
}
|
|
24852
24685
|
function NoSpec() {
|
|
24853
|
-
return /* @__PURE__ */
|
|
24686
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
24854
24687
|
className: "rounded-lg border border-red-500/20 bg-red-500/10 p-6 text-center",
|
|
24855
|
-
children: /* @__PURE__ */
|
|
24688
|
+
children: /* @__PURE__ */ jsxs17("p", {
|
|
24856
24689
|
className: "text-red-600 dark:text-red-400",
|
|
24857
24690
|
children: [
|
|
24858
24691
|
"No spec provided. Pass either ",
|
|
24859
|
-
/* @__PURE__ */
|
|
24692
|
+
/* @__PURE__ */ jsx18("code", {
|
|
24860
24693
|
children: "spec"
|
|
24861
|
-
}
|
|
24694
|
+
}),
|
|
24862
24695
|
" or ",
|
|
24863
|
-
/* @__PURE__ */
|
|
24696
|
+
/* @__PURE__ */ jsx18("code", {
|
|
24864
24697
|
children: "instance"
|
|
24865
|
-
}
|
|
24698
|
+
}),
|
|
24866
24699
|
" prop."
|
|
24867
24700
|
]
|
|
24868
|
-
}
|
|
24869
|
-
}
|
|
24701
|
+
})
|
|
24702
|
+
});
|
|
24870
24703
|
}
|
|
24871
24704
|
function APIPage({
|
|
24872
24705
|
spec,
|
|
@@ -24878,44 +24711,44 @@ function APIPage({
|
|
|
24878
24711
|
}) {
|
|
24879
24712
|
const resolvedSpec = spec ?? instance?.spec;
|
|
24880
24713
|
if (!resolvedSpec) {
|
|
24881
|
-
return /* @__PURE__ */
|
|
24714
|
+
return /* @__PURE__ */ jsx18(NoSpec, {});
|
|
24882
24715
|
}
|
|
24883
24716
|
if (!id) {
|
|
24884
|
-
return /* @__PURE__ */
|
|
24717
|
+
return /* @__PURE__ */ jsx18(ExportIndexPage, {
|
|
24885
24718
|
spec: resolvedSpec,
|
|
24886
24719
|
baseHref,
|
|
24887
24720
|
description
|
|
24888
|
-
}
|
|
24721
|
+
});
|
|
24889
24722
|
}
|
|
24890
24723
|
const exp = resolvedSpec.exports.find((e) => e.id === id);
|
|
24891
24724
|
if (!exp) {
|
|
24892
|
-
return /* @__PURE__ */
|
|
24725
|
+
return /* @__PURE__ */ jsx18(NotFound, {
|
|
24893
24726
|
id
|
|
24894
|
-
}
|
|
24727
|
+
});
|
|
24895
24728
|
}
|
|
24896
24729
|
const pageProps = { export: exp, spec: resolvedSpec, renderExample };
|
|
24897
24730
|
switch (exp.kind) {
|
|
24898
24731
|
case "function":
|
|
24899
|
-
return /* @__PURE__ */
|
|
24732
|
+
return /* @__PURE__ */ jsx18(FunctionPage, {
|
|
24900
24733
|
...pageProps
|
|
24901
|
-
}
|
|
24734
|
+
});
|
|
24902
24735
|
case "class":
|
|
24903
|
-
return /* @__PURE__ */
|
|
24736
|
+
return /* @__PURE__ */ jsx18(ClassPage, {
|
|
24904
24737
|
...pageProps
|
|
24905
|
-
}
|
|
24738
|
+
});
|
|
24906
24739
|
case "interface":
|
|
24907
24740
|
case "type":
|
|
24908
|
-
return /* @__PURE__ */
|
|
24741
|
+
return /* @__PURE__ */ jsx18(InterfacePage, {
|
|
24909
24742
|
...pageProps
|
|
24910
|
-
}
|
|
24743
|
+
});
|
|
24911
24744
|
case "enum":
|
|
24912
|
-
return /* @__PURE__ */
|
|
24745
|
+
return /* @__PURE__ */ jsx18(EnumPage, {
|
|
24913
24746
|
...pageProps
|
|
24914
|
-
}
|
|
24747
|
+
});
|
|
24915
24748
|
default:
|
|
24916
|
-
return /* @__PURE__ */
|
|
24749
|
+
return /* @__PURE__ */ jsx18(VariablePage, {
|
|
24917
24750
|
...pageProps
|
|
24918
|
-
}
|
|
24751
|
+
});
|
|
24919
24752
|
}
|
|
24920
24753
|
}
|
|
24921
24754
|
export {
|