@windrun-huaiin/third-ui 5.10.3 → 5.11.0
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/fuma/mdx/index.d.mts +2 -2
- package/dist/fuma/mdx/index.d.ts +2 -2
- package/dist/fuma/mdx/index.js +214 -93
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +213 -92
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.js +44 -58
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +41 -55
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/fuma.css +2 -35
- package/dist/main/index.js +5 -39
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +4 -38
- package/dist/main/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/fuma/mdx/banner.tsx +175 -0
- package/src/fuma/mdx/fuma-banner-suit.tsx +22 -7
- package/src/main/ai-prompt-textarea.tsx +259 -0
- package/src/styles/fuma.css +2 -35
package/dist/fuma/server.mjs
CHANGED
|
@@ -9368,44 +9368,8 @@ function getElementRef(element) {
|
|
|
9368
9368
|
return element.props.ref || element.ref;
|
|
9369
9369
|
}
|
|
9370
9370
|
|
|
9371
|
-
// ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
9372
|
-
import { clsx as clsx2 } from "clsx";
|
|
9373
|
-
var falsyToString = (value2) => typeof value2 === "boolean" ? `${value2}` : value2 === 0 ? "0" : value2;
|
|
9374
|
-
var cx = clsx2;
|
|
9375
|
-
var cva = (base, config) => (props) => {
|
|
9376
|
-
var _config_compoundVariants;
|
|
9377
|
-
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
9378
|
-
const { variants, defaultVariants } = config;
|
|
9379
|
-
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
9380
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
9381
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
9382
|
-
if (variantProp === null) return null;
|
|
9383
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
9384
|
-
return variants[variant][variantKey];
|
|
9385
|
-
});
|
|
9386
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
9387
|
-
let [key, value2] = param;
|
|
9388
|
-
if (value2 === void 0) {
|
|
9389
|
-
return acc;
|
|
9390
|
-
}
|
|
9391
|
-
acc[key] = value2;
|
|
9392
|
-
return acc;
|
|
9393
|
-
}, {});
|
|
9394
|
-
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
9395
|
-
let _a = param, { class: cvClass, className: cvClassName } = _a, compoundVariantOptions = __objRest(_a, ["class", "className"]);
|
|
9396
|
-
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
9397
|
-
let [key, value2] = param2;
|
|
9398
|
-
return Array.isArray(value2) ? value2.includes(__spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key]) : __spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key] === value2;
|
|
9399
|
-
}) ? [
|
|
9400
|
-
...acc,
|
|
9401
|
-
cvClass,
|
|
9402
|
-
cvClassName
|
|
9403
|
-
] : acc;
|
|
9404
|
-
}, []);
|
|
9405
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
9406
|
-
};
|
|
9407
|
-
|
|
9408
9371
|
// ../base-ui/src/ui/button.tsx
|
|
9372
|
+
import { cva } from "class-variance-authority";
|
|
9409
9373
|
import { jsx as jsx39, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
9410
9374
|
var buttonVariants = cva(
|
|
9411
9375
|
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
@@ -9497,42 +9461,64 @@ function LastUpdatedDate({ date }) {
|
|
|
9497
9461
|
] });
|
|
9498
9462
|
}
|
|
9499
9463
|
|
|
9464
|
+
// src/fuma/mdx/banner.tsx
|
|
9465
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
9466
|
+
import { useEffect as useEffect2, useState as useState5 } from "react";
|
|
9467
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9468
|
+
var buttonVariants2 = cva2(
|
|
9469
|
+
"inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50",
|
|
9470
|
+
{
|
|
9471
|
+
variants: {
|
|
9472
|
+
color: {
|
|
9473
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
9474
|
+
outline: "border hover:bg-accent hover:text-accent-foreground",
|
|
9475
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
9476
|
+
secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
|
|
9477
|
+
},
|
|
9478
|
+
size: {
|
|
9479
|
+
sm: "gap-1 px-2 py-1.5 text-xs",
|
|
9480
|
+
icon: "p-1.5 [&_svg]:size-5",
|
|
9481
|
+
"icon-sm": "p-1.5 [&_svg]:size-4.5"
|
|
9482
|
+
}
|
|
9483
|
+
}
|
|
9484
|
+
}
|
|
9485
|
+
);
|
|
9486
|
+
|
|
9500
9487
|
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
9501
|
-
import { Banner } from "fumadocs-ui/components/banner";
|
|
9502
9488
|
import { useTranslations } from "next-intl";
|
|
9503
|
-
import { jsx as
|
|
9489
|
+
import { Fragment as Fragment6, jsx as jsx43 } from "react/jsx-runtime";
|
|
9504
9490
|
|
|
9505
9491
|
// src/fuma/mdx/fuma-github-info.tsx
|
|
9506
|
-
import { useEffect as
|
|
9507
|
-
import { jsx as
|
|
9492
|
+
import { useEffect as useEffect3, useState as useState6 } from "react";
|
|
9493
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9508
9494
|
|
|
9509
9495
|
// src/fuma/mdx/site-x.tsx
|
|
9510
9496
|
import { useTranslations as useTranslations2 } from "next-intl";
|
|
9511
|
-
import { jsx as
|
|
9497
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
9512
9498
|
|
|
9513
9499
|
// src/fuma/mdx/zia-file.tsx
|
|
9514
|
-
import { useState as
|
|
9500
|
+
import { useState as useState7 } from "react";
|
|
9515
9501
|
import {
|
|
9516
9502
|
Collapsible,
|
|
9517
9503
|
CollapsibleContent,
|
|
9518
9504
|
CollapsibleTrigger
|
|
9519
9505
|
} from "fumadocs-ui/components/ui/collapsible";
|
|
9520
9506
|
import Link5 from "next/link";
|
|
9521
|
-
import { jsx as
|
|
9507
|
+
import { jsx as jsx46, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
9522
9508
|
|
|
9523
9509
|
// src/fuma/mdx/toc-footer-wrapper.tsx
|
|
9524
|
-
import { jsx as
|
|
9510
|
+
import { jsx as jsx47, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9525
9511
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
9526
9512
|
const showEdit = githubBaseUrl && editPath;
|
|
9527
|
-
return /* @__PURE__ */
|
|
9528
|
-
/* @__PURE__ */
|
|
9513
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
|
|
9514
|
+
/* @__PURE__ */ jsx47(LastUpdatedDate, { date: lastModified }),
|
|
9529
9515
|
copyButtonComponent,
|
|
9530
|
-
showEdit && /* @__PURE__ */
|
|
9516
|
+
showEdit && /* @__PURE__ */ jsx47(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
|
|
9531
9517
|
] });
|
|
9532
9518
|
}
|
|
9533
9519
|
|
|
9534
9520
|
// src/fuma/fuma-page-genarator.tsx
|
|
9535
|
-
import { jsx as
|
|
9521
|
+
import { jsx as jsx48, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9536
9522
|
function createFumaPage({
|
|
9537
9523
|
sourceKey,
|
|
9538
9524
|
mdxContentSource,
|
|
@@ -9548,10 +9534,10 @@ function createFumaPage({
|
|
|
9548
9534
|
const { slug, locale } = yield params;
|
|
9549
9535
|
const page = mdxContentSource.getPage(slug, locale);
|
|
9550
9536
|
if (!page) {
|
|
9551
|
-
return /* @__PURE__ */
|
|
9537
|
+
return /* @__PURE__ */ jsx48(FallbackPage, { siteIcon });
|
|
9552
9538
|
}
|
|
9553
9539
|
const path2 = githubBaseUrl ? `${mdxSourceDir}/${page.file.path}` : void 0;
|
|
9554
|
-
const tocFooterElement = /* @__PURE__ */
|
|
9540
|
+
const tocFooterElement = /* @__PURE__ */ jsx48(
|
|
9555
9541
|
TocFooterWrapper,
|
|
9556
9542
|
{
|
|
9557
9543
|
lastModified: page.data.date,
|
|
@@ -9561,7 +9547,7 @@ function createFumaPage({
|
|
|
9561
9547
|
}
|
|
9562
9548
|
);
|
|
9563
9549
|
const MDX = page.data.body;
|
|
9564
|
-
return /* @__PURE__ */
|
|
9550
|
+
return /* @__PURE__ */ jsxs20(
|
|
9565
9551
|
DocsPage,
|
|
9566
9552
|
{
|
|
9567
9553
|
tableOfContent: { style: "clerk", single: false, footer: tocFooterElement },
|
|
@@ -9570,9 +9556,9 @@ function createFumaPage({
|
|
|
9570
9556
|
full: page.data.full,
|
|
9571
9557
|
article: { className: "max-sm:pb-16" },
|
|
9572
9558
|
children: [
|
|
9573
|
-
/* @__PURE__ */
|
|
9574
|
-
/* @__PURE__ */
|
|
9575
|
-
/* @__PURE__ */
|
|
9559
|
+
/* @__PURE__ */ jsx48(DocsTitle, { children: page.data.title }),
|
|
9560
|
+
/* @__PURE__ */ jsx48(DocsDescription, { className: "mb-2", children: page.data.description }),
|
|
9561
|
+
/* @__PURE__ */ jsx48(DocsBody, { className: "text-fd-foreground/80", children: /* @__PURE__ */ jsx48(MDX, { components: getMDXComponents() }) })
|
|
9576
9562
|
]
|
|
9577
9563
|
}
|
|
9578
9564
|
);
|