@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/main/index.mjs
CHANGED
|
@@ -2854,48 +2854,14 @@ function getElementRef(element) {
|
|
|
2854
2854
|
return element.props.ref || element.ref;
|
|
2855
2855
|
}
|
|
2856
2856
|
|
|
2857
|
-
//
|
|
2858
|
-
import {
|
|
2859
|
-
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
2860
|
-
var cx = clsx;
|
|
2861
|
-
var cva = (base, config) => (props) => {
|
|
2862
|
-
var _config_compoundVariants;
|
|
2863
|
-
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);
|
|
2864
|
-
const { variants, defaultVariants } = config;
|
|
2865
|
-
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
2866
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
2867
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
2868
|
-
if (variantProp === null) return null;
|
|
2869
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
2870
|
-
return variants[variant][variantKey];
|
|
2871
|
-
});
|
|
2872
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
2873
|
-
let [key, value] = param;
|
|
2874
|
-
if (value === void 0) {
|
|
2875
|
-
return acc;
|
|
2876
|
-
}
|
|
2877
|
-
acc[key] = value;
|
|
2878
|
-
return acc;
|
|
2879
|
-
}, {});
|
|
2880
|
-
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) => {
|
|
2881
|
-
let _a = param, { class: cvClass, className: cvClassName } = _a, compoundVariantOptions = __objRest(_a, ["class", "className"]);
|
|
2882
|
-
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
2883
|
-
let [key, value] = param2;
|
|
2884
|
-
return Array.isArray(value) ? value.includes(__spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key]) : __spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key] === value;
|
|
2885
|
-
}) ? [
|
|
2886
|
-
...acc,
|
|
2887
|
-
cvClass,
|
|
2888
|
-
cvClassName
|
|
2889
|
-
] : acc;
|
|
2890
|
-
}, []);
|
|
2891
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2892
|
-
};
|
|
2857
|
+
// ../base-ui/src/ui/button.tsx
|
|
2858
|
+
import { cva } from "class-variance-authority";
|
|
2893
2859
|
|
|
2894
2860
|
// ../lib/src/utils.ts
|
|
2895
|
-
import { clsx
|
|
2861
|
+
import { clsx } from "clsx";
|
|
2896
2862
|
import { twMerge } from "tailwind-merge";
|
|
2897
2863
|
function cn(...inputs) {
|
|
2898
|
-
return twMerge(
|
|
2864
|
+
return twMerge(clsx(inputs));
|
|
2899
2865
|
}
|
|
2900
2866
|
|
|
2901
2867
|
// ../base-ui/src/ui/button.tsx
|