@windrun-huaiin/third-ui 5.13.5 → 5.14.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.js +430 -2674
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +430 -2674
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.js +202 -2463
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +201 -2462
- package/dist/fuma/server.mjs.map +1 -1
- package/package.json +2 -2
- package/src/fuma/mdx/mermaid.tsx +14 -13
package/dist/fuma/mdx/index.js
CHANGED
|
@@ -2739,2477 +2739,19 @@ var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart
|
|
|
2739
2739
|
|
|
2740
2740
|
// src/fuma/mdx/mermaid.tsx
|
|
2741
2741
|
var import_next_themes = require("next-themes");
|
|
2742
|
-
var
|
|
2743
|
-
|
|
2744
|
-
// ../base-ui/src/ui/alert-dialog.tsx
|
|
2745
|
-
var React57 = __toESM(require("react"), 1);
|
|
2746
|
-
|
|
2747
|
-
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
2748
|
-
var React55 = __toESM(require("react"), 1);
|
|
2749
|
-
|
|
2750
|
-
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
2751
|
-
var React33 = __toESM(require("react"), 1);
|
|
2752
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2753
|
-
function createContext2(rootComponentName, defaultContext) {
|
|
2754
|
-
const Context = React33.createContext(defaultContext);
|
|
2755
|
-
const Provider = (props) => {
|
|
2756
|
-
const _a = props, { children } = _a, context = __objRest(_a, ["children"]);
|
|
2757
|
-
const value = React33.useMemo(() => context, Object.values(context));
|
|
2758
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Context.Provider, { value, children });
|
|
2759
|
-
};
|
|
2760
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
2761
|
-
function useContext22(consumerName) {
|
|
2762
|
-
const context = React33.useContext(Context);
|
|
2763
|
-
if (context) return context;
|
|
2764
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
2765
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
2766
|
-
}
|
|
2767
|
-
return [Provider, useContext22];
|
|
2768
|
-
}
|
|
2769
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
2770
|
-
let defaultContexts = [];
|
|
2771
|
-
function createContext32(rootComponentName, defaultContext) {
|
|
2772
|
-
const BaseContext = React33.createContext(defaultContext);
|
|
2773
|
-
const index = defaultContexts.length;
|
|
2774
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
2775
|
-
const Provider = (props) => {
|
|
2776
|
-
var _b;
|
|
2777
|
-
const _a = props, { scope, children } = _a, context = __objRest(_a, ["scope", "children"]);
|
|
2778
|
-
const Context = ((_b = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _b[index]) || BaseContext;
|
|
2779
|
-
const value = React33.useMemo(() => context, Object.values(context));
|
|
2780
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Context.Provider, { value, children });
|
|
2781
|
-
};
|
|
2782
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
2783
|
-
function useContext22(consumerName, scope) {
|
|
2784
|
-
var _a;
|
|
2785
|
-
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
2786
|
-
const context = React33.useContext(Context);
|
|
2787
|
-
if (context) return context;
|
|
2788
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
2789
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
2790
|
-
}
|
|
2791
|
-
return [Provider, useContext22];
|
|
2792
|
-
}
|
|
2793
|
-
const createScope = () => {
|
|
2794
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
2795
|
-
return React33.createContext(defaultContext);
|
|
2796
|
-
});
|
|
2797
|
-
return function useScope(scope) {
|
|
2798
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
2799
|
-
return React33.useMemo(
|
|
2800
|
-
() => ({ [`__scope${scopeName}`]: __spreadProps(__spreadValues({}, scope), { [scopeName]: contexts }) }),
|
|
2801
|
-
[scope, contexts]
|
|
2802
|
-
);
|
|
2803
|
-
};
|
|
2804
|
-
};
|
|
2805
|
-
createScope.scopeName = scopeName;
|
|
2806
|
-
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
2807
|
-
}
|
|
2808
|
-
function composeContextScopes(...scopes) {
|
|
2809
|
-
const baseScope = scopes[0];
|
|
2810
|
-
if (scopes.length === 1) return baseScope;
|
|
2811
|
-
const createScope = () => {
|
|
2812
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
2813
|
-
useScope: createScope2(),
|
|
2814
|
-
scopeName: createScope2.scopeName
|
|
2815
|
-
}));
|
|
2816
|
-
return function useComposedScopes(overrideScopes) {
|
|
2817
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
2818
|
-
const scopeProps = useScope(overrideScopes);
|
|
2819
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
2820
|
-
return __spreadValues(__spreadValues({}, nextScopes2), currentScope);
|
|
2821
|
-
}, {});
|
|
2822
|
-
return React33.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
2823
|
-
};
|
|
2824
|
-
};
|
|
2825
|
-
createScope.scopeName = baseScope.scopeName;
|
|
2826
|
-
return createScope;
|
|
2827
|
-
}
|
|
2828
|
-
|
|
2829
|
-
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
2830
|
-
var React34 = __toESM(require("react"), 1);
|
|
2831
|
-
function setRef(ref, value) {
|
|
2832
|
-
if (typeof ref === "function") {
|
|
2833
|
-
return ref(value);
|
|
2834
|
-
} else if (ref !== null && ref !== void 0) {
|
|
2835
|
-
ref.current = value;
|
|
2836
|
-
}
|
|
2837
|
-
}
|
|
2838
|
-
function composeRefs(...refs) {
|
|
2839
|
-
return (node) => {
|
|
2840
|
-
let hasCleanup = false;
|
|
2841
|
-
const cleanups = refs.map((ref) => {
|
|
2842
|
-
const cleanup = setRef(ref, node);
|
|
2843
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
2844
|
-
hasCleanup = true;
|
|
2845
|
-
}
|
|
2846
|
-
return cleanup;
|
|
2847
|
-
});
|
|
2848
|
-
if (hasCleanup) {
|
|
2849
|
-
return () => {
|
|
2850
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
2851
|
-
const cleanup = cleanups[i];
|
|
2852
|
-
if (typeof cleanup == "function") {
|
|
2853
|
-
cleanup();
|
|
2854
|
-
} else {
|
|
2855
|
-
setRef(refs[i], null);
|
|
2856
|
-
}
|
|
2857
|
-
}
|
|
2858
|
-
};
|
|
2859
|
-
}
|
|
2860
|
-
};
|
|
2861
|
-
}
|
|
2862
|
-
function useComposedRefs(...refs) {
|
|
2863
|
-
return React34.useCallback(composeRefs(...refs), refs);
|
|
2864
|
-
}
|
|
2865
|
-
|
|
2866
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
2867
|
-
var React54 = __toESM(require("react"), 1);
|
|
2868
|
-
|
|
2869
|
-
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
2870
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
2871
|
-
return function handleEvent(event) {
|
|
2872
|
-
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
2873
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
2874
|
-
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
|
2875
|
-
}
|
|
2876
|
-
};
|
|
2877
|
-
}
|
|
2878
|
-
|
|
2879
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
2880
|
-
var React36 = __toESM(require("react"), 1);
|
|
2881
|
-
|
|
2882
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
2883
|
-
var React35 = __toESM(require("react"), 1);
|
|
2884
|
-
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? React35.useLayoutEffect : () => {
|
|
2885
|
-
};
|
|
2886
|
-
|
|
2887
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
2888
|
-
var useReactId = React36[" useId ".trim().toString()] || (() => void 0);
|
|
2889
|
-
var count = 0;
|
|
2890
|
-
function useId(deterministicId) {
|
|
2891
|
-
const [id, setId] = React36.useState(useReactId());
|
|
2892
|
-
useLayoutEffect2(() => {
|
|
2893
|
-
if (!deterministicId) setId((reactId) => reactId != null ? reactId : String(count++));
|
|
2894
|
-
}, [deterministicId]);
|
|
2895
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
2896
|
-
}
|
|
2897
|
-
|
|
2898
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
2899
|
-
var React37 = __toESM(require("react"), 1);
|
|
2900
|
-
var React210 = __toESM(require("react"), 1);
|
|
2901
|
-
var useInsertionEffect = React37[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
2902
|
-
function useControllableState({
|
|
2903
|
-
prop,
|
|
2904
|
-
defaultProp,
|
|
2905
|
-
onChange = () => {
|
|
2906
|
-
},
|
|
2907
|
-
caller
|
|
2908
|
-
}) {
|
|
2909
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
2910
|
-
defaultProp,
|
|
2911
|
-
onChange
|
|
2912
|
-
});
|
|
2913
|
-
const isControlled = prop !== void 0;
|
|
2914
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
2915
|
-
if (true) {
|
|
2916
|
-
const isControlledRef = React37.useRef(prop !== void 0);
|
|
2917
|
-
React37.useEffect(() => {
|
|
2918
|
-
const wasControlled = isControlledRef.current;
|
|
2919
|
-
if (wasControlled !== isControlled) {
|
|
2920
|
-
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
2921
|
-
const to = isControlled ? "controlled" : "uncontrolled";
|
|
2922
|
-
console.warn(
|
|
2923
|
-
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
2924
|
-
);
|
|
2925
|
-
}
|
|
2926
|
-
isControlledRef.current = isControlled;
|
|
2927
|
-
}, [isControlled, caller]);
|
|
2928
|
-
}
|
|
2929
|
-
const setValue = React37.useCallback(
|
|
2930
|
-
(nextValue) => {
|
|
2931
|
-
var _a;
|
|
2932
|
-
if (isControlled) {
|
|
2933
|
-
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
2934
|
-
if (value2 !== prop) {
|
|
2935
|
-
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value2);
|
|
2936
|
-
}
|
|
2937
|
-
} else {
|
|
2938
|
-
setUncontrolledProp(nextValue);
|
|
2939
|
-
}
|
|
2940
|
-
},
|
|
2941
|
-
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
2942
|
-
);
|
|
2943
|
-
return [value, setValue];
|
|
2944
|
-
}
|
|
2945
|
-
function useUncontrolledState({
|
|
2946
|
-
defaultProp,
|
|
2947
|
-
onChange
|
|
2948
|
-
}) {
|
|
2949
|
-
const [value, setValue] = React37.useState(defaultProp);
|
|
2950
|
-
const prevValueRef = React37.useRef(value);
|
|
2951
|
-
const onChangeRef = React37.useRef(onChange);
|
|
2952
|
-
useInsertionEffect(() => {
|
|
2953
|
-
onChangeRef.current = onChange;
|
|
2954
|
-
}, [onChange]);
|
|
2955
|
-
React37.useEffect(() => {
|
|
2956
|
-
var _a;
|
|
2957
|
-
if (prevValueRef.current !== value) {
|
|
2958
|
-
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value);
|
|
2959
|
-
prevValueRef.current = value;
|
|
2960
|
-
}
|
|
2961
|
-
}, [value, prevValueRef]);
|
|
2962
|
-
return [value, setValue, onChangeRef];
|
|
2963
|
-
}
|
|
2964
|
-
function isFunction(value) {
|
|
2965
|
-
return typeof value === "function";
|
|
2966
|
-
}
|
|
2967
|
-
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
2968
|
-
|
|
2969
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
2970
|
-
var React42 = __toESM(require("react"), 1);
|
|
2971
|
-
|
|
2972
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
2973
|
-
var React39 = __toESM(require("react"), 1);
|
|
2974
|
-
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
2975
|
-
|
|
2976
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
2977
|
-
var React38 = __toESM(require("react"), 1);
|
|
2978
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2979
|
-
// @__NO_SIDE_EFFECTS__
|
|
2980
|
-
function createSlot(ownerName) {
|
|
2981
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
2982
|
-
const Slot22 = React38.forwardRef((props, forwardedRef) => {
|
|
2983
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
2984
|
-
const childrenArray = React38.Children.toArray(children);
|
|
2985
|
-
const slottable = childrenArray.find(isSlottable);
|
|
2986
|
-
if (slottable) {
|
|
2987
|
-
const newElement = slottable.props.children;
|
|
2988
|
-
const newChildren = childrenArray.map((child) => {
|
|
2989
|
-
if (child === slottable) {
|
|
2990
|
-
if (React38.Children.count(newElement) > 1) return React38.Children.only(null);
|
|
2991
|
-
return React38.isValidElement(newElement) ? newElement.props.children : null;
|
|
2992
|
-
} else {
|
|
2993
|
-
return child;
|
|
2994
|
-
}
|
|
2995
|
-
});
|
|
2996
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React38.isValidElement(newElement) ? React38.cloneElement(newElement, void 0, newChildren) : null }));
|
|
2997
|
-
}
|
|
2998
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
2999
|
-
});
|
|
3000
|
-
Slot22.displayName = `${ownerName}.Slot`;
|
|
3001
|
-
return Slot22;
|
|
3002
|
-
}
|
|
3003
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3004
|
-
// @__NO_SIDE_EFFECTS__
|
|
3005
|
-
function createSlotClone(ownerName) {
|
|
3006
|
-
const SlotClone = React38.forwardRef((props, forwardedRef) => {
|
|
3007
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3008
|
-
if (React38.isValidElement(children)) {
|
|
3009
|
-
const childrenRef = getElementRef(children);
|
|
3010
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
3011
|
-
if (children.type !== React38.Fragment) {
|
|
3012
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3013
|
-
}
|
|
3014
|
-
return React38.cloneElement(children, props2);
|
|
3015
|
-
}
|
|
3016
|
-
return React38.Children.count(children) > 1 ? React38.Children.only(null) : null;
|
|
3017
|
-
});
|
|
3018
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3019
|
-
return SlotClone;
|
|
3020
|
-
}
|
|
3021
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3022
|
-
// @__NO_SIDE_EFFECTS__
|
|
3023
|
-
function createSlottable(ownerName) {
|
|
3024
|
-
const Slottable2 = ({ children }) => {
|
|
3025
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children });
|
|
3026
|
-
};
|
|
3027
|
-
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
3028
|
-
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
3029
|
-
return Slottable2;
|
|
3030
|
-
}
|
|
3031
|
-
function isSlottable(child) {
|
|
3032
|
-
return React38.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3033
|
-
}
|
|
3034
|
-
function mergeProps(slotProps, childProps) {
|
|
3035
|
-
const overrideProps = __spreadValues({}, childProps);
|
|
3036
|
-
for (const propName in childProps) {
|
|
3037
|
-
const slotPropValue = slotProps[propName];
|
|
3038
|
-
const childPropValue = childProps[propName];
|
|
3039
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
3040
|
-
if (isHandler) {
|
|
3041
|
-
if (slotPropValue && childPropValue) {
|
|
3042
|
-
overrideProps[propName] = (...args) => {
|
|
3043
|
-
const result = childPropValue(...args);
|
|
3044
|
-
slotPropValue(...args);
|
|
3045
|
-
return result;
|
|
3046
|
-
};
|
|
3047
|
-
} else if (slotPropValue) {
|
|
3048
|
-
overrideProps[propName] = slotPropValue;
|
|
3049
|
-
}
|
|
3050
|
-
} else if (propName === "style") {
|
|
3051
|
-
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
3052
|
-
} else if (propName === "className") {
|
|
3053
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3054
|
-
}
|
|
3055
|
-
}
|
|
3056
|
-
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
3057
|
-
}
|
|
3058
|
-
function getElementRef(element) {
|
|
3059
|
-
var _a, _b;
|
|
3060
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3061
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3062
|
-
if (mayWarn) {
|
|
3063
|
-
return element.ref;
|
|
3064
|
-
}
|
|
3065
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3066
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3067
|
-
if (mayWarn) {
|
|
3068
|
-
return element.props.ref;
|
|
3069
|
-
}
|
|
3070
|
-
return element.props.ref || element.ref;
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3074
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3075
|
-
var NODES = [
|
|
3076
|
-
"a",
|
|
3077
|
-
"button",
|
|
3078
|
-
"div",
|
|
3079
|
-
"form",
|
|
3080
|
-
"h2",
|
|
3081
|
-
"h3",
|
|
3082
|
-
"img",
|
|
3083
|
-
"input",
|
|
3084
|
-
"label",
|
|
3085
|
-
"li",
|
|
3086
|
-
"nav",
|
|
3087
|
-
"ol",
|
|
3088
|
-
"p",
|
|
3089
|
-
"select",
|
|
3090
|
-
"span",
|
|
3091
|
-
"svg",
|
|
3092
|
-
"ul"
|
|
3093
|
-
];
|
|
3094
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
3095
|
-
const Slot3 = createSlot(`Primitive.${node}`);
|
|
3096
|
-
const Node2 = React39.forwardRef((props, forwardedRef) => {
|
|
3097
|
-
const _a = props, { asChild } = _a, primitiveProps = __objRest(_a, ["asChild"]);
|
|
3098
|
-
const Comp = asChild ? Slot3 : node;
|
|
3099
|
-
if (typeof window !== "undefined") {
|
|
3100
|
-
window[Symbol.for("radix-ui")] = true;
|
|
3101
|
-
}
|
|
3102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Comp, __spreadProps(__spreadValues({}, primitiveProps), { ref: forwardedRef }));
|
|
3103
|
-
});
|
|
3104
|
-
Node2.displayName = `Primitive.${node}`;
|
|
3105
|
-
return __spreadProps(__spreadValues({}, primitive), { [node]: Node2 });
|
|
3106
|
-
}, {});
|
|
3107
|
-
function dispatchDiscreteCustomEvent(target, event) {
|
|
3108
|
-
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
3109
|
-
}
|
|
3110
|
-
|
|
3111
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
3112
|
-
var React40 = __toESM(require("react"), 1);
|
|
3113
|
-
function useCallbackRef(callback) {
|
|
3114
|
-
const callbackRef = React40.useRef(callback);
|
|
3115
|
-
React40.useEffect(() => {
|
|
3116
|
-
callbackRef.current = callback;
|
|
3117
|
-
});
|
|
3118
|
-
return React40.useMemo(() => (...args) => {
|
|
3119
|
-
var _a;
|
|
3120
|
-
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
3121
|
-
}, []);
|
|
3122
|
-
}
|
|
3123
|
-
|
|
3124
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
3125
|
-
var React41 = __toESM(require("react"), 1);
|
|
3126
|
-
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
3127
|
-
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
3128
|
-
React41.useEffect(() => {
|
|
3129
|
-
const handleKeyDown = (event) => {
|
|
3130
|
-
if (event.key === "Escape") {
|
|
3131
|
-
onEscapeKeyDown(event);
|
|
3132
|
-
}
|
|
3133
|
-
};
|
|
3134
|
-
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
3135
|
-
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
3136
|
-
}, [onEscapeKeyDown, ownerDocument]);
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
3140
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3141
|
-
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
3142
|
-
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
3143
|
-
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
3144
|
-
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
3145
|
-
var originalBodyPointerEvents;
|
|
3146
|
-
var DismissableLayerContext = React42.createContext({
|
|
3147
|
-
layers: /* @__PURE__ */ new Set(),
|
|
3148
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3149
|
-
branches: /* @__PURE__ */ new Set()
|
|
3150
|
-
});
|
|
3151
|
-
var DismissableLayer = React42.forwardRef(
|
|
3152
|
-
(props, forwardedRef) => {
|
|
3153
|
-
var _b;
|
|
3154
|
-
const _a = props, {
|
|
3155
|
-
disableOutsidePointerEvents = false,
|
|
3156
|
-
onEscapeKeyDown,
|
|
3157
|
-
onPointerDownOutside,
|
|
3158
|
-
onFocusOutside,
|
|
3159
|
-
onInteractOutside,
|
|
3160
|
-
onDismiss
|
|
3161
|
-
} = _a, layerProps = __objRest(_a, [
|
|
3162
|
-
"disableOutsidePointerEvents",
|
|
3163
|
-
"onEscapeKeyDown",
|
|
3164
|
-
"onPointerDownOutside",
|
|
3165
|
-
"onFocusOutside",
|
|
3166
|
-
"onInteractOutside",
|
|
3167
|
-
"onDismiss"
|
|
3168
|
-
]);
|
|
3169
|
-
const context = React42.useContext(DismissableLayerContext);
|
|
3170
|
-
const [node, setNode] = React42.useState(null);
|
|
3171
|
-
const ownerDocument = (_b = node == null ? void 0 : node.ownerDocument) != null ? _b : globalThis == null ? void 0 : globalThis.document;
|
|
3172
|
-
const [, force] = React42.useState({});
|
|
3173
|
-
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
3174
|
-
const layers = Array.from(context.layers);
|
|
3175
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
3176
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
3177
|
-
const index = node ? layers.indexOf(node) : -1;
|
|
3178
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
3179
|
-
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
3180
|
-
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
3181
|
-
const target = event.target;
|
|
3182
|
-
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
3183
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
3184
|
-
onPointerDownOutside == null ? void 0 : onPointerDownOutside(event);
|
|
3185
|
-
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
|
3186
|
-
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
3187
|
-
}, ownerDocument);
|
|
3188
|
-
const focusOutside = useFocusOutside((event) => {
|
|
3189
|
-
const target = event.target;
|
|
3190
|
-
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
3191
|
-
if (isFocusInBranch) return;
|
|
3192
|
-
onFocusOutside == null ? void 0 : onFocusOutside(event);
|
|
3193
|
-
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
|
3194
|
-
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
3195
|
-
}, ownerDocument);
|
|
3196
|
-
useEscapeKeydown((event) => {
|
|
3197
|
-
const isHighestLayer = index === context.layers.size - 1;
|
|
3198
|
-
if (!isHighestLayer) return;
|
|
3199
|
-
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event);
|
|
3200
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
3201
|
-
event.preventDefault();
|
|
3202
|
-
onDismiss();
|
|
3203
|
-
}
|
|
3204
|
-
}, ownerDocument);
|
|
3205
|
-
React42.useEffect(() => {
|
|
3206
|
-
if (!node) return;
|
|
3207
|
-
if (disableOutsidePointerEvents) {
|
|
3208
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
3209
|
-
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
3210
|
-
ownerDocument.body.style.pointerEvents = "none";
|
|
3211
|
-
}
|
|
3212
|
-
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
3213
|
-
}
|
|
3214
|
-
context.layers.add(node);
|
|
3215
|
-
dispatchUpdate();
|
|
3216
|
-
return () => {
|
|
3217
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
3218
|
-
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
3219
|
-
}
|
|
3220
|
-
};
|
|
3221
|
-
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
3222
|
-
React42.useEffect(() => {
|
|
3223
|
-
return () => {
|
|
3224
|
-
if (!node) return;
|
|
3225
|
-
context.layers.delete(node);
|
|
3226
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
3227
|
-
dispatchUpdate();
|
|
3228
|
-
};
|
|
3229
|
-
}, [node, context]);
|
|
3230
|
-
React42.useEffect(() => {
|
|
3231
|
-
const handleUpdate = () => force({});
|
|
3232
|
-
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3233
|
-
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3234
|
-
}, []);
|
|
3235
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3236
|
-
Primitive.div,
|
|
3237
|
-
__spreadProps(__spreadValues({}, layerProps), {
|
|
3238
|
-
ref: composedRefs,
|
|
3239
|
-
style: __spreadValues({
|
|
3240
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0
|
|
3241
|
-
}, props.style),
|
|
3242
|
-
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
3243
|
-
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
3244
|
-
onPointerDownCapture: composeEventHandlers(
|
|
3245
|
-
props.onPointerDownCapture,
|
|
3246
|
-
pointerDownOutside.onPointerDownCapture
|
|
3247
|
-
)
|
|
3248
|
-
})
|
|
3249
|
-
);
|
|
3250
|
-
}
|
|
3251
|
-
);
|
|
3252
|
-
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
3253
|
-
var BRANCH_NAME = "DismissableLayerBranch";
|
|
3254
|
-
var DismissableLayerBranch = React42.forwardRef((props, forwardedRef) => {
|
|
3255
|
-
const context = React42.useContext(DismissableLayerContext);
|
|
3256
|
-
const ref = React42.useRef(null);
|
|
3257
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
3258
|
-
React42.useEffect(() => {
|
|
3259
|
-
const node = ref.current;
|
|
3260
|
-
if (node) {
|
|
3261
|
-
context.branches.add(node);
|
|
3262
|
-
return () => {
|
|
3263
|
-
context.branches.delete(node);
|
|
3264
|
-
};
|
|
3265
|
-
}
|
|
3266
|
-
}, [context.branches]);
|
|
3267
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Primitive.div, __spreadProps(__spreadValues({}, props), { ref: composedRefs }));
|
|
3268
|
-
});
|
|
3269
|
-
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
3270
|
-
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
3271
|
-
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
3272
|
-
const isPointerInsideReactTreeRef = React42.useRef(false);
|
|
3273
|
-
const handleClickRef = React42.useRef(() => {
|
|
3274
|
-
});
|
|
3275
|
-
React42.useEffect(() => {
|
|
3276
|
-
const handlePointerDown = (event) => {
|
|
3277
|
-
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
3278
|
-
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
3279
|
-
handleAndDispatchCustomEvent(
|
|
3280
|
-
POINTER_DOWN_OUTSIDE,
|
|
3281
|
-
handlePointerDownOutside,
|
|
3282
|
-
eventDetail,
|
|
3283
|
-
{ discrete: true }
|
|
3284
|
-
);
|
|
3285
|
-
};
|
|
3286
|
-
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
3287
|
-
const eventDetail = { originalEvent: event };
|
|
3288
|
-
if (event.pointerType === "touch") {
|
|
3289
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3290
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
3291
|
-
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
3292
|
-
} else {
|
|
3293
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
3294
|
-
}
|
|
3295
|
-
} else {
|
|
3296
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3297
|
-
}
|
|
3298
|
-
isPointerInsideReactTreeRef.current = false;
|
|
3299
|
-
};
|
|
3300
|
-
const timerId = window.setTimeout(() => {
|
|
3301
|
-
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
3302
|
-
}, 0);
|
|
3303
|
-
return () => {
|
|
3304
|
-
window.clearTimeout(timerId);
|
|
3305
|
-
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
3306
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3307
|
-
};
|
|
3308
|
-
}, [ownerDocument, handlePointerDownOutside]);
|
|
3309
|
-
return {
|
|
3310
|
-
// ensures we check React component tree (not just DOM tree)
|
|
3311
|
-
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
3312
|
-
};
|
|
3313
|
-
}
|
|
3314
|
-
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
3315
|
-
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
3316
|
-
const isFocusInsideReactTreeRef = React42.useRef(false);
|
|
3317
|
-
React42.useEffect(() => {
|
|
3318
|
-
const handleFocus = (event) => {
|
|
3319
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
3320
|
-
const eventDetail = { originalEvent: event };
|
|
3321
|
-
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
3322
|
-
discrete: false
|
|
3323
|
-
});
|
|
3324
|
-
}
|
|
3325
|
-
};
|
|
3326
|
-
ownerDocument.addEventListener("focusin", handleFocus);
|
|
3327
|
-
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
3328
|
-
}, [ownerDocument, handleFocusOutside]);
|
|
3329
|
-
return {
|
|
3330
|
-
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
3331
|
-
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
3332
|
-
};
|
|
3333
|
-
}
|
|
3334
|
-
function dispatchUpdate() {
|
|
3335
|
-
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
3336
|
-
document.dispatchEvent(event);
|
|
3337
|
-
}
|
|
3338
|
-
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
3339
|
-
const target = detail.originalEvent.target;
|
|
3340
|
-
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
3341
|
-
if (handler) target.addEventListener(name, handler, { once: true });
|
|
3342
|
-
if (discrete) {
|
|
3343
|
-
dispatchDiscreteCustomEvent(target, event);
|
|
3344
|
-
} else {
|
|
3345
|
-
target.dispatchEvent(event);
|
|
3346
|
-
}
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.3_@types+react@19.1.2__@types+r_1ff7b04b7c975087a2da2b1568ac976e/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
3350
|
-
var React43 = __toESM(require("react"), 1);
|
|
3351
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3352
|
-
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
3353
|
-
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
3354
|
-
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
3355
|
-
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
3356
|
-
var FocusScope = React43.forwardRef((props, forwardedRef) => {
|
|
3357
|
-
const _a = props, {
|
|
3358
|
-
loop = false,
|
|
3359
|
-
trapped = false,
|
|
3360
|
-
onMountAutoFocus: onMountAutoFocusProp,
|
|
3361
|
-
onUnmountAutoFocus: onUnmountAutoFocusProp
|
|
3362
|
-
} = _a, scopeProps = __objRest(_a, [
|
|
3363
|
-
"loop",
|
|
3364
|
-
"trapped",
|
|
3365
|
-
"onMountAutoFocus",
|
|
3366
|
-
"onUnmountAutoFocus"
|
|
3367
|
-
]);
|
|
3368
|
-
const [container, setContainer] = React43.useState(null);
|
|
3369
|
-
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
3370
|
-
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
3371
|
-
const lastFocusedElementRef = React43.useRef(null);
|
|
3372
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
3373
|
-
const focusScope = React43.useRef({
|
|
3374
|
-
paused: false,
|
|
3375
|
-
pause() {
|
|
3376
|
-
this.paused = true;
|
|
3377
|
-
},
|
|
3378
|
-
resume() {
|
|
3379
|
-
this.paused = false;
|
|
3380
|
-
}
|
|
3381
|
-
}).current;
|
|
3382
|
-
React43.useEffect(() => {
|
|
3383
|
-
if (trapped) {
|
|
3384
|
-
let handleFocusIn2 = function(event) {
|
|
3385
|
-
if (focusScope.paused || !container) return;
|
|
3386
|
-
const target = event.target;
|
|
3387
|
-
if (container.contains(target)) {
|
|
3388
|
-
lastFocusedElementRef.current = target;
|
|
3389
|
-
} else {
|
|
3390
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
3391
|
-
}
|
|
3392
|
-
}, handleFocusOut2 = function(event) {
|
|
3393
|
-
if (focusScope.paused || !container) return;
|
|
3394
|
-
const relatedTarget = event.relatedTarget;
|
|
3395
|
-
if (relatedTarget === null) return;
|
|
3396
|
-
if (!container.contains(relatedTarget)) {
|
|
3397
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
3398
|
-
}
|
|
3399
|
-
}, handleMutations2 = function(mutations) {
|
|
3400
|
-
const focusedElement = document.activeElement;
|
|
3401
|
-
if (focusedElement !== document.body) return;
|
|
3402
|
-
for (const mutation of mutations) {
|
|
3403
|
-
if (mutation.removedNodes.length > 0) focus(container);
|
|
3404
|
-
}
|
|
3405
|
-
};
|
|
3406
|
-
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
|
3407
|
-
document.addEventListener("focusin", handleFocusIn2);
|
|
3408
|
-
document.addEventListener("focusout", handleFocusOut2);
|
|
3409
|
-
const mutationObserver = new MutationObserver(handleMutations2);
|
|
3410
|
-
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
3411
|
-
return () => {
|
|
3412
|
-
document.removeEventListener("focusin", handleFocusIn2);
|
|
3413
|
-
document.removeEventListener("focusout", handleFocusOut2);
|
|
3414
|
-
mutationObserver.disconnect();
|
|
3415
|
-
};
|
|
3416
|
-
}
|
|
3417
|
-
}, [trapped, container, focusScope.paused]);
|
|
3418
|
-
React43.useEffect(() => {
|
|
3419
|
-
if (container) {
|
|
3420
|
-
focusScopesStack.add(focusScope);
|
|
3421
|
-
const previouslyFocusedElement = document.activeElement;
|
|
3422
|
-
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
3423
|
-
if (!hasFocusedCandidate) {
|
|
3424
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
3425
|
-
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
3426
|
-
container.dispatchEvent(mountEvent);
|
|
3427
|
-
if (!mountEvent.defaultPrevented) {
|
|
3428
|
-
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
3429
|
-
if (document.activeElement === previouslyFocusedElement) {
|
|
3430
|
-
focus(container);
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
}
|
|
3434
|
-
return () => {
|
|
3435
|
-
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
3436
|
-
setTimeout(() => {
|
|
3437
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
3438
|
-
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
3439
|
-
container.dispatchEvent(unmountEvent);
|
|
3440
|
-
if (!unmountEvent.defaultPrevented) {
|
|
3441
|
-
focus(previouslyFocusedElement != null ? previouslyFocusedElement : document.body, { select: true });
|
|
3442
|
-
}
|
|
3443
|
-
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
3444
|
-
focusScopesStack.remove(focusScope);
|
|
3445
|
-
}, 0);
|
|
3446
|
-
};
|
|
3447
|
-
}
|
|
3448
|
-
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
3449
|
-
const handleKeyDown = React43.useCallback(
|
|
3450
|
-
(event) => {
|
|
3451
|
-
if (!loop && !trapped) return;
|
|
3452
|
-
if (focusScope.paused) return;
|
|
3453
|
-
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
3454
|
-
const focusedElement = document.activeElement;
|
|
3455
|
-
if (isTabKey && focusedElement) {
|
|
3456
|
-
const container2 = event.currentTarget;
|
|
3457
|
-
const [first, last] = getTabbableEdges(container2);
|
|
3458
|
-
const hasTabbableElementsInside = first && last;
|
|
3459
|
-
if (!hasTabbableElementsInside) {
|
|
3460
|
-
if (focusedElement === container2) event.preventDefault();
|
|
3461
|
-
} else {
|
|
3462
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
3463
|
-
event.preventDefault();
|
|
3464
|
-
if (loop) focus(first, { select: true });
|
|
3465
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
3466
|
-
event.preventDefault();
|
|
3467
|
-
if (loop) focus(last, { select: true });
|
|
3468
|
-
}
|
|
3469
|
-
}
|
|
3470
|
-
}
|
|
3471
|
-
},
|
|
3472
|
-
[loop, trapped, focusScope.paused]
|
|
3473
|
-
);
|
|
3474
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Primitive.div, __spreadProps(__spreadValues({ tabIndex: -1 }, scopeProps), { ref: composedRefs, onKeyDown: handleKeyDown }));
|
|
3475
|
-
});
|
|
3476
|
-
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
3477
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
3478
|
-
const previouslyFocusedElement = document.activeElement;
|
|
3479
|
-
for (const candidate of candidates) {
|
|
3480
|
-
focus(candidate, { select });
|
|
3481
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
3482
|
-
}
|
|
3483
|
-
}
|
|
3484
|
-
function getTabbableEdges(container) {
|
|
3485
|
-
const candidates = getTabbableCandidates(container);
|
|
3486
|
-
const first = findVisible(candidates, container);
|
|
3487
|
-
const last = findVisible(candidates.reverse(), container);
|
|
3488
|
-
return [first, last];
|
|
3489
|
-
}
|
|
3490
|
-
function getTabbableCandidates(container) {
|
|
3491
|
-
const nodes = [];
|
|
3492
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
3493
|
-
acceptNode: (node) => {
|
|
3494
|
-
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
3495
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
3496
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
3497
|
-
}
|
|
3498
|
-
});
|
|
3499
|
-
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
3500
|
-
return nodes;
|
|
3501
|
-
}
|
|
3502
|
-
function findVisible(elements, container) {
|
|
3503
|
-
for (const element of elements) {
|
|
3504
|
-
if (!isHidden(element, { upTo: container })) return element;
|
|
3505
|
-
}
|
|
3506
|
-
}
|
|
3507
|
-
function isHidden(node, { upTo }) {
|
|
3508
|
-
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
3509
|
-
while (node) {
|
|
3510
|
-
if (upTo !== void 0 && node === upTo) return false;
|
|
3511
|
-
if (getComputedStyle(node).display === "none") return true;
|
|
3512
|
-
node = node.parentElement;
|
|
3513
|
-
}
|
|
3514
|
-
return false;
|
|
3515
|
-
}
|
|
3516
|
-
function isSelectableInput(element) {
|
|
3517
|
-
return element instanceof HTMLInputElement && "select" in element;
|
|
3518
|
-
}
|
|
3519
|
-
function focus(element, { select = false } = {}) {
|
|
3520
|
-
if (element && element.focus) {
|
|
3521
|
-
const previouslyFocusedElement = document.activeElement;
|
|
3522
|
-
element.focus({ preventScroll: true });
|
|
3523
|
-
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
3524
|
-
element.select();
|
|
3525
|
-
}
|
|
3526
|
-
}
|
|
3527
|
-
var focusScopesStack = createFocusScopesStack();
|
|
3528
|
-
function createFocusScopesStack() {
|
|
3529
|
-
let stack = [];
|
|
3530
|
-
return {
|
|
3531
|
-
add(focusScope) {
|
|
3532
|
-
const activeFocusScope = stack[0];
|
|
3533
|
-
if (focusScope !== activeFocusScope) {
|
|
3534
|
-
activeFocusScope == null ? void 0 : activeFocusScope.pause();
|
|
3535
|
-
}
|
|
3536
|
-
stack = arrayRemove(stack, focusScope);
|
|
3537
|
-
stack.unshift(focusScope);
|
|
3538
|
-
},
|
|
3539
|
-
remove(focusScope) {
|
|
3540
|
-
var _a;
|
|
3541
|
-
stack = arrayRemove(stack, focusScope);
|
|
3542
|
-
(_a = stack[0]) == null ? void 0 : _a.resume();
|
|
3543
|
-
}
|
|
3544
|
-
};
|
|
3545
|
-
}
|
|
3546
|
-
function arrayRemove(array, item) {
|
|
3547
|
-
const updatedArray = [...array];
|
|
3548
|
-
const index = updatedArray.indexOf(item);
|
|
3549
|
-
if (index !== -1) {
|
|
3550
|
-
updatedArray.splice(index, 1);
|
|
3551
|
-
}
|
|
3552
|
-
return updatedArray;
|
|
3553
|
-
}
|
|
3554
|
-
function removeLinks(items) {
|
|
3555
|
-
return items.filter((item) => item.tagName !== "A");
|
|
3556
|
-
}
|
|
3557
|
-
|
|
3558
|
-
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react@_a0745de0839b0b019298ec068509a840/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
3559
|
-
var React44 = __toESM(require("react"), 1);
|
|
3560
|
-
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
3561
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3562
|
-
var PORTAL_NAME = "Portal";
|
|
3563
|
-
var Portal = React44.forwardRef((props, forwardedRef) => {
|
|
3564
|
-
var _b;
|
|
3565
|
-
const _a = props, { container: containerProp } = _a, portalProps = __objRest(_a, ["container"]);
|
|
3566
|
-
const [mounted, setMounted] = React44.useState(false);
|
|
3567
|
-
useLayoutEffect2(() => setMounted(true), []);
|
|
3568
|
-
const container = containerProp || mounted && ((_b = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _b.body);
|
|
3569
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Primitive.div, __spreadProps(__spreadValues({}, portalProps), { ref: forwardedRef })), container) : null;
|
|
3570
|
-
});
|
|
3571
|
-
Portal.displayName = PORTAL_NAME;
|
|
3572
|
-
|
|
3573
|
-
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.3_@types+react@19.1.2__@types+reac_dbbe976722e7c3e02883ea31c3bbbf14/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
3574
|
-
var React211 = __toESM(require("react"), 1);
|
|
3575
|
-
var React45 = __toESM(require("react"), 1);
|
|
3576
|
-
function useStateMachine(initialState, machine) {
|
|
3577
|
-
return React45.useReducer((state, event) => {
|
|
3578
|
-
const nextState = machine[state][event];
|
|
3579
|
-
return nextState != null ? nextState : state;
|
|
3580
|
-
}, initialState);
|
|
3581
|
-
}
|
|
3582
|
-
var Presence = (props) => {
|
|
3583
|
-
const { present, children } = props;
|
|
3584
|
-
const presence = usePresence(present);
|
|
3585
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React211.Children.only(children);
|
|
3586
|
-
const ref = useComposedRefs(presence.ref, getElementRef2(child));
|
|
3587
|
-
const forceMount = typeof children === "function";
|
|
3588
|
-
return forceMount || presence.isPresent ? React211.cloneElement(child, { ref }) : null;
|
|
3589
|
-
};
|
|
3590
|
-
Presence.displayName = "Presence";
|
|
3591
|
-
function usePresence(present) {
|
|
3592
|
-
const [node, setNode] = React211.useState();
|
|
3593
|
-
const stylesRef = React211.useRef(null);
|
|
3594
|
-
const prevPresentRef = React211.useRef(present);
|
|
3595
|
-
const prevAnimationNameRef = React211.useRef("none");
|
|
3596
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
3597
|
-
const [state, send] = useStateMachine(initialState, {
|
|
3598
|
-
mounted: {
|
|
3599
|
-
UNMOUNT: "unmounted",
|
|
3600
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
3601
|
-
},
|
|
3602
|
-
unmountSuspended: {
|
|
3603
|
-
MOUNT: "mounted",
|
|
3604
|
-
ANIMATION_END: "unmounted"
|
|
3605
|
-
},
|
|
3606
|
-
unmounted: {
|
|
3607
|
-
MOUNT: "mounted"
|
|
3608
|
-
}
|
|
3609
|
-
});
|
|
3610
|
-
React211.useEffect(() => {
|
|
3611
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
3612
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
3613
|
-
}, [state]);
|
|
3614
|
-
useLayoutEffect2(() => {
|
|
3615
|
-
const styles = stylesRef.current;
|
|
3616
|
-
const wasPresent = prevPresentRef.current;
|
|
3617
|
-
const hasPresentChanged = wasPresent !== present;
|
|
3618
|
-
if (hasPresentChanged) {
|
|
3619
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
3620
|
-
const currentAnimationName = getAnimationName(styles);
|
|
3621
|
-
if (present) {
|
|
3622
|
-
send("MOUNT");
|
|
3623
|
-
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
|
3624
|
-
send("UNMOUNT");
|
|
3625
|
-
} else {
|
|
3626
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
3627
|
-
if (wasPresent && isAnimating) {
|
|
3628
|
-
send("ANIMATION_OUT");
|
|
3629
|
-
} else {
|
|
3630
|
-
send("UNMOUNT");
|
|
3631
|
-
}
|
|
3632
|
-
}
|
|
3633
|
-
prevPresentRef.current = present;
|
|
3634
|
-
}
|
|
3635
|
-
}, [present, send]);
|
|
3636
|
-
useLayoutEffect2(() => {
|
|
3637
|
-
var _a;
|
|
3638
|
-
if (node) {
|
|
3639
|
-
let timeoutId;
|
|
3640
|
-
const ownerWindow = (_a = node.ownerDocument.defaultView) != null ? _a : window;
|
|
3641
|
-
const handleAnimationEnd = (event) => {
|
|
3642
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
3643
|
-
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
3644
|
-
if (event.target === node && isCurrentAnimation) {
|
|
3645
|
-
send("ANIMATION_END");
|
|
3646
|
-
if (!prevPresentRef.current) {
|
|
3647
|
-
const currentFillMode = node.style.animationFillMode;
|
|
3648
|
-
node.style.animationFillMode = "forwards";
|
|
3649
|
-
timeoutId = ownerWindow.setTimeout(() => {
|
|
3650
|
-
if (node.style.animationFillMode === "forwards") {
|
|
3651
|
-
node.style.animationFillMode = currentFillMode;
|
|
3652
|
-
}
|
|
3653
|
-
});
|
|
3654
|
-
}
|
|
3655
|
-
}
|
|
3656
|
-
};
|
|
3657
|
-
const handleAnimationStart = (event) => {
|
|
3658
|
-
if (event.target === node) {
|
|
3659
|
-
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
3660
|
-
}
|
|
3661
|
-
};
|
|
3662
|
-
node.addEventListener("animationstart", handleAnimationStart);
|
|
3663
|
-
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
3664
|
-
node.addEventListener("animationend", handleAnimationEnd);
|
|
3665
|
-
return () => {
|
|
3666
|
-
ownerWindow.clearTimeout(timeoutId);
|
|
3667
|
-
node.removeEventListener("animationstart", handleAnimationStart);
|
|
3668
|
-
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
3669
|
-
node.removeEventListener("animationend", handleAnimationEnd);
|
|
3670
|
-
};
|
|
3671
|
-
} else {
|
|
3672
|
-
send("ANIMATION_END");
|
|
3673
|
-
}
|
|
3674
|
-
}, [node, send]);
|
|
3675
|
-
return {
|
|
3676
|
-
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
3677
|
-
ref: React211.useCallback((node2) => {
|
|
3678
|
-
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
3679
|
-
setNode(node2);
|
|
3680
|
-
}, [])
|
|
3681
|
-
};
|
|
3682
|
-
}
|
|
3683
|
-
function getAnimationName(styles) {
|
|
3684
|
-
return (styles == null ? void 0 : styles.animationName) || "none";
|
|
3685
|
-
}
|
|
3686
|
-
function getElementRef2(element) {
|
|
3687
|
-
var _a, _b;
|
|
3688
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3689
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3690
|
-
if (mayWarn) {
|
|
3691
|
-
return element.ref;
|
|
3692
|
-
}
|
|
3693
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3694
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3695
|
-
if (mayWarn) {
|
|
3696
|
-
return element.props.ref;
|
|
3697
|
-
}
|
|
3698
|
-
return element.props.ref || element.ref;
|
|
3699
|
-
}
|
|
3700
|
-
|
|
3701
|
-
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
3702
|
-
var React46 = __toESM(require("react"), 1);
|
|
3703
|
-
var count2 = 0;
|
|
3704
|
-
function useFocusGuards() {
|
|
3705
|
-
React46.useEffect(() => {
|
|
3706
|
-
var _a, _b;
|
|
3707
|
-
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
3708
|
-
document.body.insertAdjacentElement("afterbegin", (_a = edgeGuards[0]) != null ? _a : createFocusGuard());
|
|
3709
|
-
document.body.insertAdjacentElement("beforeend", (_b = edgeGuards[1]) != null ? _b : createFocusGuard());
|
|
3710
|
-
count2++;
|
|
3711
|
-
return () => {
|
|
3712
|
-
if (count2 === 1) {
|
|
3713
|
-
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
3714
|
-
}
|
|
3715
|
-
count2--;
|
|
3716
|
-
};
|
|
3717
|
-
}, []);
|
|
3718
|
-
}
|
|
3719
|
-
function createFocusGuard() {
|
|
3720
|
-
const element = document.createElement("span");
|
|
3721
|
-
element.setAttribute("data-radix-focus-guard", "");
|
|
3722
|
-
element.tabIndex = 0;
|
|
3723
|
-
element.style.outline = "none";
|
|
3724
|
-
element.style.opacity = "0";
|
|
3725
|
-
element.style.position = "fixed";
|
|
3726
|
-
element.style.pointerEvents = "none";
|
|
3727
|
-
return element;
|
|
3728
|
-
}
|
|
3729
|
-
|
|
3730
|
-
// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
3731
|
-
var __assign = function() {
|
|
3732
|
-
__assign = Object.assign || function __assign2(t) {
|
|
3733
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3734
|
-
s = arguments[i];
|
|
3735
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3736
|
-
}
|
|
3737
|
-
return t;
|
|
3738
|
-
};
|
|
3739
|
-
return __assign.apply(this, arguments);
|
|
3740
|
-
};
|
|
3741
|
-
function __rest(s, e) {
|
|
3742
|
-
var t = {};
|
|
3743
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3744
|
-
t[p] = s[p];
|
|
3745
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3746
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3747
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3748
|
-
t[p[i]] = s[p[i]];
|
|
3749
|
-
}
|
|
3750
|
-
return t;
|
|
3751
|
-
}
|
|
3752
|
-
function __spreadArray(to, from, pack) {
|
|
3753
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3754
|
-
if (ar || !(i in from)) {
|
|
3755
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3756
|
-
ar[i] = from[i];
|
|
3757
|
-
}
|
|
3758
|
-
}
|
|
3759
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
3760
|
-
}
|
|
3761
|
-
|
|
3762
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
3763
|
-
var React53 = __toESM(require("react"));
|
|
3764
|
-
|
|
3765
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
3766
|
-
var React49 = __toESM(require("react"));
|
|
3767
|
-
|
|
3768
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
3769
|
-
var zeroRightClassName = "right-scroll-bar-position";
|
|
3770
|
-
var fullWidthClassName = "width-before-scroll-bar";
|
|
3771
|
-
var noScrollbarsClassName = "with-scroll-bars-hidden";
|
|
3772
|
-
var removedBarSizeVariable = "--removed-body-scroll-bar-size";
|
|
3773
|
-
|
|
3774
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
3775
|
-
function assignRef(ref, value) {
|
|
3776
|
-
if (typeof ref === "function") {
|
|
3777
|
-
ref(value);
|
|
3778
|
-
} else if (ref) {
|
|
3779
|
-
ref.current = value;
|
|
3780
|
-
}
|
|
3781
|
-
return ref;
|
|
3782
|
-
}
|
|
3783
|
-
|
|
3784
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
3785
|
-
var import_react35 = require("react");
|
|
3786
|
-
function useCallbackRef2(initialValue, callback) {
|
|
3787
|
-
var ref = (0, import_react35.useState)(function() {
|
|
3788
|
-
return {
|
|
3789
|
-
// value
|
|
3790
|
-
value: initialValue,
|
|
3791
|
-
// last callback
|
|
3792
|
-
callback,
|
|
3793
|
-
// "memoized" public interface
|
|
3794
|
-
facade: {
|
|
3795
|
-
get current() {
|
|
3796
|
-
return ref.value;
|
|
3797
|
-
},
|
|
3798
|
-
set current(value) {
|
|
3799
|
-
var last = ref.value;
|
|
3800
|
-
if (last !== value) {
|
|
3801
|
-
ref.value = value;
|
|
3802
|
-
ref.callback(value, last);
|
|
3803
|
-
}
|
|
3804
|
-
}
|
|
3805
|
-
}
|
|
3806
|
-
};
|
|
3807
|
-
})[0];
|
|
3808
|
-
ref.callback = callback;
|
|
3809
|
-
return ref.facade;
|
|
3810
|
-
}
|
|
3811
|
-
|
|
3812
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
3813
|
-
var React47 = __toESM(require("react"));
|
|
3814
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React47.useLayoutEffect : React47.useEffect;
|
|
3815
|
-
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
3816
|
-
function useMergeRefs(refs, defaultValue) {
|
|
3817
|
-
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
3818
|
-
return refs.forEach(function(ref) {
|
|
3819
|
-
return assignRef(ref, newValue);
|
|
3820
|
-
});
|
|
3821
|
-
});
|
|
3822
|
-
useIsomorphicLayoutEffect(function() {
|
|
3823
|
-
var oldValue = currentValues.get(callbackRef);
|
|
3824
|
-
if (oldValue) {
|
|
3825
|
-
var prevRefs_1 = new Set(oldValue);
|
|
3826
|
-
var nextRefs_1 = new Set(refs);
|
|
3827
|
-
var current_1 = callbackRef.current;
|
|
3828
|
-
prevRefs_1.forEach(function(ref) {
|
|
3829
|
-
if (!nextRefs_1.has(ref)) {
|
|
3830
|
-
assignRef(ref, null);
|
|
3831
|
-
}
|
|
3832
|
-
});
|
|
3833
|
-
nextRefs_1.forEach(function(ref) {
|
|
3834
|
-
if (!prevRefs_1.has(ref)) {
|
|
3835
|
-
assignRef(ref, current_1);
|
|
3836
|
-
}
|
|
3837
|
-
});
|
|
3838
|
-
}
|
|
3839
|
-
currentValues.set(callbackRef, refs);
|
|
3840
|
-
}, [refs]);
|
|
3841
|
-
return callbackRef;
|
|
3842
|
-
}
|
|
3843
|
-
|
|
3844
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/medium.js
|
|
3845
|
-
function ItoI(a) {
|
|
3846
|
-
return a;
|
|
3847
|
-
}
|
|
3848
|
-
function innerCreateMedium(defaults, middleware) {
|
|
3849
|
-
if (middleware === void 0) {
|
|
3850
|
-
middleware = ItoI;
|
|
3851
|
-
}
|
|
3852
|
-
var buffer = [];
|
|
3853
|
-
var assigned = false;
|
|
3854
|
-
var medium = {
|
|
3855
|
-
read: function() {
|
|
3856
|
-
if (assigned) {
|
|
3857
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
3858
|
-
}
|
|
3859
|
-
if (buffer.length) {
|
|
3860
|
-
return buffer[buffer.length - 1];
|
|
3861
|
-
}
|
|
3862
|
-
return defaults;
|
|
3863
|
-
},
|
|
3864
|
-
useMedium: function(data) {
|
|
3865
|
-
var item = middleware(data, assigned);
|
|
3866
|
-
buffer.push(item);
|
|
3867
|
-
return function() {
|
|
3868
|
-
buffer = buffer.filter(function(x) {
|
|
3869
|
-
return x !== item;
|
|
3870
|
-
});
|
|
3871
|
-
};
|
|
3872
|
-
},
|
|
3873
|
-
assignSyncMedium: function(cb) {
|
|
3874
|
-
assigned = true;
|
|
3875
|
-
while (buffer.length) {
|
|
3876
|
-
var cbs = buffer;
|
|
3877
|
-
buffer = [];
|
|
3878
|
-
cbs.forEach(cb);
|
|
3879
|
-
}
|
|
3880
|
-
buffer = {
|
|
3881
|
-
push: function(x) {
|
|
3882
|
-
return cb(x);
|
|
3883
|
-
},
|
|
3884
|
-
filter: function() {
|
|
3885
|
-
return buffer;
|
|
3886
|
-
}
|
|
3887
|
-
};
|
|
3888
|
-
},
|
|
3889
|
-
assignMedium: function(cb) {
|
|
3890
|
-
assigned = true;
|
|
3891
|
-
var pendingQueue = [];
|
|
3892
|
-
if (buffer.length) {
|
|
3893
|
-
var cbs = buffer;
|
|
3894
|
-
buffer = [];
|
|
3895
|
-
cbs.forEach(cb);
|
|
3896
|
-
pendingQueue = buffer;
|
|
3897
|
-
}
|
|
3898
|
-
var executeQueue = function() {
|
|
3899
|
-
var cbs2 = pendingQueue;
|
|
3900
|
-
pendingQueue = [];
|
|
3901
|
-
cbs2.forEach(cb);
|
|
3902
|
-
};
|
|
3903
|
-
var cycle = function() {
|
|
3904
|
-
return Promise.resolve().then(executeQueue);
|
|
3905
|
-
};
|
|
3906
|
-
cycle();
|
|
3907
|
-
buffer = {
|
|
3908
|
-
push: function(x) {
|
|
3909
|
-
pendingQueue.push(x);
|
|
3910
|
-
cycle();
|
|
3911
|
-
},
|
|
3912
|
-
filter: function(filter) {
|
|
3913
|
-
pendingQueue = pendingQueue.filter(filter);
|
|
3914
|
-
return buffer;
|
|
3915
|
-
}
|
|
3916
|
-
};
|
|
3917
|
-
}
|
|
3918
|
-
};
|
|
3919
|
-
return medium;
|
|
3920
|
-
}
|
|
3921
|
-
function createSidecarMedium(options) {
|
|
3922
|
-
if (options === void 0) {
|
|
3923
|
-
options = {};
|
|
3924
|
-
}
|
|
3925
|
-
var medium = innerCreateMedium(null);
|
|
3926
|
-
medium.options = __assign({ async: true, ssr: false }, options);
|
|
3927
|
-
return medium;
|
|
3928
|
-
}
|
|
3929
|
-
|
|
3930
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js
|
|
3931
|
-
var React48 = __toESM(require("react"));
|
|
3932
|
-
var SideCar = function(_a) {
|
|
3933
|
-
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
3934
|
-
if (!sideCar) {
|
|
3935
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
3936
|
-
}
|
|
3937
|
-
var Target = sideCar.read();
|
|
3938
|
-
if (!Target) {
|
|
3939
|
-
throw new Error("Sidecar medium not found");
|
|
3940
|
-
}
|
|
3941
|
-
return React48.createElement(Target, __assign({}, rest));
|
|
3942
|
-
};
|
|
3943
|
-
SideCar.isSideCarExport = true;
|
|
3944
|
-
function exportSidecar(medium, exported) {
|
|
3945
|
-
medium.useMedium(exported);
|
|
3946
|
-
return SideCar;
|
|
3947
|
-
}
|
|
3948
|
-
|
|
3949
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
3950
|
-
var effectCar = createSidecarMedium();
|
|
3951
|
-
|
|
3952
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
3953
|
-
var nothing = function() {
|
|
3954
|
-
return;
|
|
3955
|
-
};
|
|
3956
|
-
var RemoveScroll = React49.forwardRef(function(props, parentRef) {
|
|
3957
|
-
var ref = React49.useRef(null);
|
|
3958
|
-
var _a = React49.useState({
|
|
3959
|
-
onScrollCapture: nothing,
|
|
3960
|
-
onWheelCapture: nothing,
|
|
3961
|
-
onTouchMoveCapture: nothing
|
|
3962
|
-
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
3963
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
3964
|
-
var SideCar2 = sideCar;
|
|
3965
|
-
var containerRef = useMergeRefs([ref, parentRef]);
|
|
3966
|
-
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
3967
|
-
return React49.createElement(
|
|
3968
|
-
React49.Fragment,
|
|
3969
|
-
null,
|
|
3970
|
-
enabled && React49.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
3971
|
-
forwardProps ? React49.cloneElement(React49.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React49.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
3972
|
-
);
|
|
3973
|
-
});
|
|
3974
|
-
RemoveScroll.defaultProps = {
|
|
3975
|
-
enabled: true,
|
|
3976
|
-
removeScrollBar: true,
|
|
3977
|
-
inert: false
|
|
3978
|
-
};
|
|
3979
|
-
RemoveScroll.classNames = {
|
|
3980
|
-
fullWidth: fullWidthClassName,
|
|
3981
|
-
zeroRight: zeroRightClassName
|
|
3982
|
-
};
|
|
3983
|
-
|
|
3984
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
3985
|
-
var React52 = __toESM(require("react"));
|
|
3986
|
-
|
|
3987
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
3988
|
-
var React51 = __toESM(require("react"));
|
|
3989
|
-
|
|
3990
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
3991
|
-
var React50 = __toESM(require("react"));
|
|
3992
|
-
|
|
3993
|
-
// ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
3994
|
-
var currentNonce;
|
|
3995
|
-
var getNonce = function() {
|
|
3996
|
-
if (currentNonce) {
|
|
3997
|
-
return currentNonce;
|
|
3998
|
-
}
|
|
3999
|
-
if (typeof __webpack_nonce__ !== "undefined") {
|
|
4000
|
-
return __webpack_nonce__;
|
|
4001
|
-
}
|
|
4002
|
-
return void 0;
|
|
4003
|
-
};
|
|
4004
|
-
|
|
4005
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
4006
|
-
function makeStyleTag() {
|
|
4007
|
-
if (!document)
|
|
4008
|
-
return null;
|
|
4009
|
-
var tag = document.createElement("style");
|
|
4010
|
-
tag.type = "text/css";
|
|
4011
|
-
var nonce = getNonce();
|
|
4012
|
-
if (nonce) {
|
|
4013
|
-
tag.setAttribute("nonce", nonce);
|
|
4014
|
-
}
|
|
4015
|
-
return tag;
|
|
4016
|
-
}
|
|
4017
|
-
function injectStyles(tag, css) {
|
|
4018
|
-
if (tag.styleSheet) {
|
|
4019
|
-
tag.styleSheet.cssText = css;
|
|
4020
|
-
} else {
|
|
4021
|
-
tag.appendChild(document.createTextNode(css));
|
|
4022
|
-
}
|
|
4023
|
-
}
|
|
4024
|
-
function insertStyleTag(tag) {
|
|
4025
|
-
var head = document.head || document.getElementsByTagName("head")[0];
|
|
4026
|
-
head.appendChild(tag);
|
|
4027
|
-
}
|
|
4028
|
-
var stylesheetSingleton = function() {
|
|
4029
|
-
var counter = 0;
|
|
4030
|
-
var stylesheet = null;
|
|
4031
|
-
return {
|
|
4032
|
-
add: function(style) {
|
|
4033
|
-
if (counter == 0) {
|
|
4034
|
-
if (stylesheet = makeStyleTag()) {
|
|
4035
|
-
injectStyles(stylesheet, style);
|
|
4036
|
-
insertStyleTag(stylesheet);
|
|
4037
|
-
}
|
|
4038
|
-
}
|
|
4039
|
-
counter++;
|
|
4040
|
-
},
|
|
4041
|
-
remove: function() {
|
|
4042
|
-
counter--;
|
|
4043
|
-
if (!counter && stylesheet) {
|
|
4044
|
-
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
4045
|
-
stylesheet = null;
|
|
4046
|
-
}
|
|
4047
|
-
}
|
|
4048
|
-
};
|
|
4049
|
-
};
|
|
4050
|
-
|
|
4051
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
4052
|
-
var styleHookSingleton = function() {
|
|
4053
|
-
var sheet = stylesheetSingleton();
|
|
4054
|
-
return function(styles, isDynamic) {
|
|
4055
|
-
React50.useEffect(function() {
|
|
4056
|
-
sheet.add(styles);
|
|
4057
|
-
return function() {
|
|
4058
|
-
sheet.remove();
|
|
4059
|
-
};
|
|
4060
|
-
}, [styles && isDynamic]);
|
|
4061
|
-
};
|
|
4062
|
-
};
|
|
4063
|
-
|
|
4064
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/component.js
|
|
4065
|
-
var styleSingleton = function() {
|
|
4066
|
-
var useStyle = styleHookSingleton();
|
|
4067
|
-
var Sheet = function(_a) {
|
|
4068
|
-
var styles = _a.styles, dynamic = _a.dynamic;
|
|
4069
|
-
useStyle(styles, dynamic);
|
|
4070
|
-
return null;
|
|
4071
|
-
};
|
|
4072
|
-
return Sheet;
|
|
4073
|
-
};
|
|
4074
|
-
|
|
4075
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
|
|
4076
|
-
var zeroGap = {
|
|
4077
|
-
left: 0,
|
|
4078
|
-
top: 0,
|
|
4079
|
-
right: 0,
|
|
4080
|
-
gap: 0
|
|
4081
|
-
};
|
|
4082
|
-
var parse = function(x) {
|
|
4083
|
-
return parseInt(x || "", 10) || 0;
|
|
4084
|
-
};
|
|
4085
|
-
var getOffset = function(gapMode) {
|
|
4086
|
-
var cs = window.getComputedStyle(document.body);
|
|
4087
|
-
var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
|
|
4088
|
-
var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
|
|
4089
|
-
var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
|
|
4090
|
-
return [parse(left), parse(top), parse(right)];
|
|
4091
|
-
};
|
|
4092
|
-
var getGapWidth = function(gapMode) {
|
|
4093
|
-
if (gapMode === void 0) {
|
|
4094
|
-
gapMode = "margin";
|
|
4095
|
-
}
|
|
4096
|
-
if (typeof window === "undefined") {
|
|
4097
|
-
return zeroGap;
|
|
4098
|
-
}
|
|
4099
|
-
var offsets = getOffset(gapMode);
|
|
4100
|
-
var documentWidth = document.documentElement.clientWidth;
|
|
4101
|
-
var windowWidth = window.innerWidth;
|
|
4102
|
-
return {
|
|
4103
|
-
left: offsets[0],
|
|
4104
|
-
top: offsets[1],
|
|
4105
|
-
right: offsets[2],
|
|
4106
|
-
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
|
|
4107
|
-
};
|
|
4108
|
-
};
|
|
4109
|
-
|
|
4110
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
4111
|
-
var Style = styleSingleton();
|
|
4112
|
-
var lockAttribute = "data-scroll-locked";
|
|
4113
|
-
var getStyles = function(_a, allowRelative, gapMode, important) {
|
|
4114
|
-
var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
|
|
4115
|
-
if (gapMode === void 0) {
|
|
4116
|
-
gapMode = "margin";
|
|
4117
|
-
}
|
|
4118
|
-
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
|
|
4119
|
-
allowRelative && "position: relative ".concat(important, ";"),
|
|
4120
|
-
gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
|
|
4121
|
-
gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
|
|
4122
|
-
].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
|
|
4123
|
-
};
|
|
4124
|
-
var getCurrentUseCounter = function() {
|
|
4125
|
-
var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
|
|
4126
|
-
return isFinite(counter) ? counter : 0;
|
|
4127
|
-
};
|
|
4128
|
-
var useLockAttribute = function() {
|
|
4129
|
-
React51.useEffect(function() {
|
|
4130
|
-
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4131
|
-
return function() {
|
|
4132
|
-
var newCounter = getCurrentUseCounter() - 1;
|
|
4133
|
-
if (newCounter <= 0) {
|
|
4134
|
-
document.body.removeAttribute(lockAttribute);
|
|
4135
|
-
} else {
|
|
4136
|
-
document.body.setAttribute(lockAttribute, newCounter.toString());
|
|
4137
|
-
}
|
|
4138
|
-
};
|
|
4139
|
-
}, []);
|
|
4140
|
-
};
|
|
4141
|
-
var RemoveScrollBar = function(_a) {
|
|
4142
|
-
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
4143
|
-
useLockAttribute();
|
|
4144
|
-
var gap = React51.useMemo(function() {
|
|
4145
|
-
return getGapWidth(gapMode);
|
|
4146
|
-
}, [gapMode]);
|
|
4147
|
-
return React51.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
4148
|
-
};
|
|
4149
|
-
|
|
4150
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
4151
|
-
var passiveSupported = false;
|
|
4152
|
-
if (typeof window !== "undefined") {
|
|
4153
|
-
try {
|
|
4154
|
-
options = Object.defineProperty({}, "passive", {
|
|
4155
|
-
get: function() {
|
|
4156
|
-
passiveSupported = true;
|
|
4157
|
-
return true;
|
|
4158
|
-
}
|
|
4159
|
-
});
|
|
4160
|
-
window.addEventListener("test", options, options);
|
|
4161
|
-
window.removeEventListener("test", options, options);
|
|
4162
|
-
} catch (err) {
|
|
4163
|
-
passiveSupported = false;
|
|
4164
|
-
}
|
|
4165
|
-
}
|
|
4166
|
-
var options;
|
|
4167
|
-
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
4168
|
-
|
|
4169
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
4170
|
-
var alwaysContainsScroll = function(node) {
|
|
4171
|
-
return node.tagName === "TEXTAREA";
|
|
4172
|
-
};
|
|
4173
|
-
var elementCanBeScrolled = function(node, overflow) {
|
|
4174
|
-
if (!(node instanceof Element)) {
|
|
4175
|
-
return false;
|
|
4176
|
-
}
|
|
4177
|
-
var styles = window.getComputedStyle(node);
|
|
4178
|
-
return (
|
|
4179
|
-
// not-not-scrollable
|
|
4180
|
-
styles[overflow] !== "hidden" && // contains scroll inside self
|
|
4181
|
-
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
|
|
4182
|
-
);
|
|
4183
|
-
};
|
|
4184
|
-
var elementCouldBeVScrolled = function(node) {
|
|
4185
|
-
return elementCanBeScrolled(node, "overflowY");
|
|
4186
|
-
};
|
|
4187
|
-
var elementCouldBeHScrolled = function(node) {
|
|
4188
|
-
return elementCanBeScrolled(node, "overflowX");
|
|
4189
|
-
};
|
|
4190
|
-
var locationCouldBeScrolled = function(axis, node) {
|
|
4191
|
-
var ownerDocument = node.ownerDocument;
|
|
4192
|
-
var current = node;
|
|
4193
|
-
do {
|
|
4194
|
-
if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
|
|
4195
|
-
current = current.host;
|
|
4196
|
-
}
|
|
4197
|
-
var isScrollable = elementCouldBeScrolled(axis, current);
|
|
4198
|
-
if (isScrollable) {
|
|
4199
|
-
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
|
|
4200
|
-
if (scrollHeight > clientHeight) {
|
|
4201
|
-
return true;
|
|
4202
|
-
}
|
|
4203
|
-
}
|
|
4204
|
-
current = current.parentNode;
|
|
4205
|
-
} while (current && current !== ownerDocument.body);
|
|
4206
|
-
return false;
|
|
4207
|
-
};
|
|
4208
|
-
var getVScrollVariables = function(_a) {
|
|
4209
|
-
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
4210
|
-
return [
|
|
4211
|
-
scrollTop,
|
|
4212
|
-
scrollHeight,
|
|
4213
|
-
clientHeight
|
|
4214
|
-
];
|
|
4215
|
-
};
|
|
4216
|
-
var getHScrollVariables = function(_a) {
|
|
4217
|
-
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
4218
|
-
return [
|
|
4219
|
-
scrollLeft,
|
|
4220
|
-
scrollWidth,
|
|
4221
|
-
clientWidth
|
|
4222
|
-
];
|
|
4223
|
-
};
|
|
4224
|
-
var elementCouldBeScrolled = function(axis, node) {
|
|
4225
|
-
return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
|
|
4226
|
-
};
|
|
4227
|
-
var getScrollVariables = function(axis, node) {
|
|
4228
|
-
return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
|
|
4229
|
-
};
|
|
4230
|
-
var getDirectionFactor = function(axis, direction) {
|
|
4231
|
-
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
4232
|
-
};
|
|
4233
|
-
var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
4234
|
-
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
4235
|
-
var delta = directionFactor * sourceDelta;
|
|
4236
|
-
var target = event.target;
|
|
4237
|
-
var targetInLock = endTarget.contains(target);
|
|
4238
|
-
var shouldCancelScroll = false;
|
|
4239
|
-
var isDeltaPositive = delta > 0;
|
|
4240
|
-
var availableScroll = 0;
|
|
4241
|
-
var availableScrollTop = 0;
|
|
4242
|
-
do {
|
|
4243
|
-
if (!target) {
|
|
4244
|
-
break;
|
|
4245
|
-
}
|
|
4246
|
-
var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
4247
|
-
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
|
4248
|
-
if (position || elementScroll) {
|
|
4249
|
-
if (elementCouldBeScrolled(axis, target)) {
|
|
4250
|
-
availableScroll += elementScroll;
|
|
4251
|
-
availableScrollTop += position;
|
|
4252
|
-
}
|
|
4253
|
-
}
|
|
4254
|
-
var parent_1 = target.parentNode;
|
|
4255
|
-
target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
|
|
4256
|
-
} while (
|
|
4257
|
-
// portaled content
|
|
4258
|
-
!targetInLock && target !== document.body || // self content
|
|
4259
|
-
targetInLock && (endTarget.contains(target) || endTarget === target)
|
|
4260
|
-
);
|
|
4261
|
-
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
4262
|
-
shouldCancelScroll = true;
|
|
4263
|
-
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
4264
|
-
shouldCancelScroll = true;
|
|
4265
|
-
}
|
|
4266
|
-
return shouldCancelScroll;
|
|
4267
|
-
};
|
|
4268
|
-
|
|
4269
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
4270
|
-
var getTouchXY = function(event) {
|
|
4271
|
-
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
4272
|
-
};
|
|
4273
|
-
var getDeltaXY = function(event) {
|
|
4274
|
-
return [event.deltaX, event.deltaY];
|
|
4275
|
-
};
|
|
4276
|
-
var extractRef = function(ref) {
|
|
4277
|
-
return ref && "current" in ref ? ref.current : ref;
|
|
4278
|
-
};
|
|
4279
|
-
var deltaCompare = function(x, y) {
|
|
4280
|
-
return x[0] === y[0] && x[1] === y[1];
|
|
4281
|
-
};
|
|
4282
|
-
var generateStyle = function(id) {
|
|
4283
|
-
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
|
4284
|
-
};
|
|
4285
|
-
var idCounter = 0;
|
|
4286
|
-
var lockStack = [];
|
|
4287
|
-
function RemoveScrollSideCar(props) {
|
|
4288
|
-
var shouldPreventQueue = React52.useRef([]);
|
|
4289
|
-
var touchStartRef = React52.useRef([0, 0]);
|
|
4290
|
-
var activeAxis = React52.useRef();
|
|
4291
|
-
var id = React52.useState(idCounter++)[0];
|
|
4292
|
-
var Style2 = React52.useState(styleSingleton)[0];
|
|
4293
|
-
var lastProps = React52.useRef(props);
|
|
4294
|
-
React52.useEffect(function() {
|
|
4295
|
-
lastProps.current = props;
|
|
4296
|
-
}, [props]);
|
|
4297
|
-
React52.useEffect(function() {
|
|
4298
|
-
if (props.inert) {
|
|
4299
|
-
document.body.classList.add("block-interactivity-".concat(id));
|
|
4300
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
4301
|
-
allow_1.forEach(function(el) {
|
|
4302
|
-
return el.classList.add("allow-interactivity-".concat(id));
|
|
4303
|
-
});
|
|
4304
|
-
return function() {
|
|
4305
|
-
document.body.classList.remove("block-interactivity-".concat(id));
|
|
4306
|
-
allow_1.forEach(function(el) {
|
|
4307
|
-
return el.classList.remove("allow-interactivity-".concat(id));
|
|
4308
|
-
});
|
|
4309
|
-
};
|
|
4310
|
-
}
|
|
4311
|
-
return;
|
|
4312
|
-
}, [props.inert, props.lockRef.current, props.shards]);
|
|
4313
|
-
var shouldCancelEvent = React52.useCallback(function(event, parent) {
|
|
4314
|
-
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
4315
|
-
return !lastProps.current.allowPinchZoom;
|
|
4316
|
-
}
|
|
4317
|
-
var touch = getTouchXY(event);
|
|
4318
|
-
var touchStart = touchStartRef.current;
|
|
4319
|
-
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
4320
|
-
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
|
4321
|
-
var currentAxis;
|
|
4322
|
-
var target = event.target;
|
|
4323
|
-
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
4324
|
-
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
4325
|
-
return false;
|
|
4326
|
-
}
|
|
4327
|
-
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
4328
|
-
if (!canBeScrolledInMainDirection) {
|
|
4329
|
-
return true;
|
|
4330
|
-
}
|
|
4331
|
-
if (canBeScrolledInMainDirection) {
|
|
4332
|
-
currentAxis = moveDirection;
|
|
4333
|
-
} else {
|
|
4334
|
-
currentAxis = moveDirection === "v" ? "h" : "v";
|
|
4335
|
-
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
4336
|
-
}
|
|
4337
|
-
if (!canBeScrolledInMainDirection) {
|
|
4338
|
-
return false;
|
|
4339
|
-
}
|
|
4340
|
-
if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
|
|
4341
|
-
activeAxis.current = currentAxis;
|
|
4342
|
-
}
|
|
4343
|
-
if (!currentAxis) {
|
|
4344
|
-
return true;
|
|
4345
|
-
}
|
|
4346
|
-
var cancelingAxis = activeAxis.current || currentAxis;
|
|
4347
|
-
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
4348
|
-
}, []);
|
|
4349
|
-
var shouldPrevent = React52.useCallback(function(_event) {
|
|
4350
|
-
var event = _event;
|
|
4351
|
-
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
4352
|
-
return;
|
|
4353
|
-
}
|
|
4354
|
-
var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
|
|
4355
|
-
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
4356
|
-
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
4357
|
-
})[0];
|
|
4358
|
-
if (sourceEvent && sourceEvent.should) {
|
|
4359
|
-
if (event.cancelable) {
|
|
4360
|
-
event.preventDefault();
|
|
4361
|
-
}
|
|
4362
|
-
return;
|
|
4363
|
-
}
|
|
4364
|
-
if (!sourceEvent) {
|
|
4365
|
-
var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
|
|
4366
|
-
return node.contains(event.target);
|
|
4367
|
-
});
|
|
4368
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
4369
|
-
if (shouldStop) {
|
|
4370
|
-
if (event.cancelable) {
|
|
4371
|
-
event.preventDefault();
|
|
4372
|
-
}
|
|
4373
|
-
}
|
|
4374
|
-
}
|
|
4375
|
-
}, []);
|
|
4376
|
-
var shouldCancel = React52.useCallback(function(name, delta, target, should) {
|
|
4377
|
-
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
4378
|
-
shouldPreventQueue.current.push(event);
|
|
4379
|
-
setTimeout(function() {
|
|
4380
|
-
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
4381
|
-
return e !== event;
|
|
4382
|
-
});
|
|
4383
|
-
}, 1);
|
|
4384
|
-
}, []);
|
|
4385
|
-
var scrollTouchStart = React52.useCallback(function(event) {
|
|
4386
|
-
touchStartRef.current = getTouchXY(event);
|
|
4387
|
-
activeAxis.current = void 0;
|
|
4388
|
-
}, []);
|
|
4389
|
-
var scrollWheel = React52.useCallback(function(event) {
|
|
4390
|
-
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4391
|
-
}, []);
|
|
4392
|
-
var scrollTouchMove = React52.useCallback(function(event) {
|
|
4393
|
-
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4394
|
-
}, []);
|
|
4395
|
-
React52.useEffect(function() {
|
|
4396
|
-
lockStack.push(Style2);
|
|
4397
|
-
props.setCallbacks({
|
|
4398
|
-
onScrollCapture: scrollWheel,
|
|
4399
|
-
onWheelCapture: scrollWheel,
|
|
4400
|
-
onTouchMoveCapture: scrollTouchMove
|
|
4401
|
-
});
|
|
4402
|
-
document.addEventListener("wheel", shouldPrevent, nonPassive);
|
|
4403
|
-
document.addEventListener("touchmove", shouldPrevent, nonPassive);
|
|
4404
|
-
document.addEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
4405
|
-
return function() {
|
|
4406
|
-
lockStack = lockStack.filter(function(inst) {
|
|
4407
|
-
return inst !== Style2;
|
|
4408
|
-
});
|
|
4409
|
-
document.removeEventListener("wheel", shouldPrevent, nonPassive);
|
|
4410
|
-
document.removeEventListener("touchmove", shouldPrevent, nonPassive);
|
|
4411
|
-
document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
4412
|
-
};
|
|
4413
|
-
}, []);
|
|
4414
|
-
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
4415
|
-
return React52.createElement(
|
|
4416
|
-
React52.Fragment,
|
|
4417
|
-
null,
|
|
4418
|
-
inert ? React52.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
4419
|
-
removeScrollBar ? React52.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
4420
|
-
);
|
|
4421
|
-
}
|
|
4422
|
-
function getOutermostShadowParent(node) {
|
|
4423
|
-
var shadowParent = null;
|
|
4424
|
-
while (node !== null) {
|
|
4425
|
-
if (node instanceof ShadowRoot) {
|
|
4426
|
-
shadowParent = node.host;
|
|
4427
|
-
node = node.host;
|
|
4428
|
-
}
|
|
4429
|
-
node = node.parentNode;
|
|
4430
|
-
}
|
|
4431
|
-
return shadowParent;
|
|
4432
|
-
}
|
|
4433
|
-
|
|
4434
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
4435
|
-
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
4436
|
-
|
|
4437
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4438
|
-
var ReactRemoveScroll = React53.forwardRef(function(props, ref) {
|
|
4439
|
-
return React53.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
4440
|
-
});
|
|
4441
|
-
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
4442
|
-
var Combination_default = ReactRemoveScroll;
|
|
4443
|
-
|
|
4444
|
-
// ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
|
|
4445
|
-
var getDefaultParent = function(originalTarget) {
|
|
4446
|
-
if (typeof document === "undefined") {
|
|
4447
|
-
return null;
|
|
4448
|
-
}
|
|
4449
|
-
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
4450
|
-
return sampleTarget.ownerDocument.body;
|
|
4451
|
-
};
|
|
4452
|
-
var counterMap = /* @__PURE__ */ new WeakMap();
|
|
4453
|
-
var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
4454
|
-
var markerMap = {};
|
|
4455
|
-
var lockCount = 0;
|
|
4456
|
-
var unwrapHost = function(node) {
|
|
4457
|
-
return node && (node.host || unwrapHost(node.parentNode));
|
|
4458
|
-
};
|
|
4459
|
-
var correctTargets = function(parent, targets) {
|
|
4460
|
-
return targets.map(function(target) {
|
|
4461
|
-
if (parent.contains(target)) {
|
|
4462
|
-
return target;
|
|
4463
|
-
}
|
|
4464
|
-
var correctedTarget = unwrapHost(target);
|
|
4465
|
-
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
4466
|
-
return correctedTarget;
|
|
4467
|
-
}
|
|
4468
|
-
console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
|
|
4469
|
-
return null;
|
|
4470
|
-
}).filter(function(x) {
|
|
4471
|
-
return Boolean(x);
|
|
4472
|
-
});
|
|
4473
|
-
};
|
|
4474
|
-
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
|
|
4475
|
-
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
4476
|
-
if (!markerMap[markerName]) {
|
|
4477
|
-
markerMap[markerName] = /* @__PURE__ */ new WeakMap();
|
|
4478
|
-
}
|
|
4479
|
-
var markerCounter = markerMap[markerName];
|
|
4480
|
-
var hiddenNodes = [];
|
|
4481
|
-
var elementsToKeep = /* @__PURE__ */ new Set();
|
|
4482
|
-
var elementsToStop = new Set(targets);
|
|
4483
|
-
var keep = function(el) {
|
|
4484
|
-
if (!el || elementsToKeep.has(el)) {
|
|
4485
|
-
return;
|
|
4486
|
-
}
|
|
4487
|
-
elementsToKeep.add(el);
|
|
4488
|
-
keep(el.parentNode);
|
|
4489
|
-
};
|
|
4490
|
-
targets.forEach(keep);
|
|
4491
|
-
var deep = function(parent) {
|
|
4492
|
-
if (!parent || elementsToStop.has(parent)) {
|
|
4493
|
-
return;
|
|
4494
|
-
}
|
|
4495
|
-
Array.prototype.forEach.call(parent.children, function(node) {
|
|
4496
|
-
if (elementsToKeep.has(node)) {
|
|
4497
|
-
deep(node);
|
|
4498
|
-
} else {
|
|
4499
|
-
try {
|
|
4500
|
-
var attr = node.getAttribute(controlAttribute);
|
|
4501
|
-
var alreadyHidden = attr !== null && attr !== "false";
|
|
4502
|
-
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
4503
|
-
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
4504
|
-
counterMap.set(node, counterValue);
|
|
4505
|
-
markerCounter.set(node, markerValue);
|
|
4506
|
-
hiddenNodes.push(node);
|
|
4507
|
-
if (counterValue === 1 && alreadyHidden) {
|
|
4508
|
-
uncontrolledNodes.set(node, true);
|
|
4509
|
-
}
|
|
4510
|
-
if (markerValue === 1) {
|
|
4511
|
-
node.setAttribute(markerName, "true");
|
|
4512
|
-
}
|
|
4513
|
-
if (!alreadyHidden) {
|
|
4514
|
-
node.setAttribute(controlAttribute, "true");
|
|
4515
|
-
}
|
|
4516
|
-
} catch (e) {
|
|
4517
|
-
console.error("aria-hidden: cannot operate on ", node, e);
|
|
4518
|
-
}
|
|
4519
|
-
}
|
|
4520
|
-
});
|
|
4521
|
-
};
|
|
4522
|
-
deep(parentNode);
|
|
4523
|
-
elementsToKeep.clear();
|
|
4524
|
-
lockCount++;
|
|
4525
|
-
return function() {
|
|
4526
|
-
hiddenNodes.forEach(function(node) {
|
|
4527
|
-
var counterValue = counterMap.get(node) - 1;
|
|
4528
|
-
var markerValue = markerCounter.get(node) - 1;
|
|
4529
|
-
counterMap.set(node, counterValue);
|
|
4530
|
-
markerCounter.set(node, markerValue);
|
|
4531
|
-
if (!counterValue) {
|
|
4532
|
-
if (!uncontrolledNodes.has(node)) {
|
|
4533
|
-
node.removeAttribute(controlAttribute);
|
|
4534
|
-
}
|
|
4535
|
-
uncontrolledNodes.delete(node);
|
|
4536
|
-
}
|
|
4537
|
-
if (!markerValue) {
|
|
4538
|
-
node.removeAttribute(markerName);
|
|
4539
|
-
}
|
|
4540
|
-
});
|
|
4541
|
-
lockCount--;
|
|
4542
|
-
if (!lockCount) {
|
|
4543
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
4544
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
4545
|
-
uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
4546
|
-
markerMap = {};
|
|
4547
|
-
}
|
|
4548
|
-
};
|
|
4549
|
-
};
|
|
4550
|
-
var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
4551
|
-
if (markerName === void 0) {
|
|
4552
|
-
markerName = "data-aria-hidden";
|
|
4553
|
-
}
|
|
4554
|
-
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
4555
|
-
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
4556
|
-
if (!activeParentNode) {
|
|
4557
|
-
return function() {
|
|
4558
|
-
return null;
|
|
4559
|
-
};
|
|
4560
|
-
}
|
|
4561
|
-
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
|
|
4562
|
-
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
4563
|
-
};
|
|
4564
|
-
|
|
4565
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
4566
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4567
|
-
var DIALOG_NAME = "Dialog";
|
|
4568
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
4569
|
-
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
4570
|
-
var Dialog = (props) => {
|
|
4571
|
-
const {
|
|
4572
|
-
__scopeDialog,
|
|
4573
|
-
children,
|
|
4574
|
-
open: openProp,
|
|
4575
|
-
defaultOpen,
|
|
4576
|
-
onOpenChange,
|
|
4577
|
-
modal = true
|
|
4578
|
-
} = props;
|
|
4579
|
-
const triggerRef = React54.useRef(null);
|
|
4580
|
-
const contentRef = React54.useRef(null);
|
|
4581
|
-
const [open, setOpen] = useControllableState({
|
|
4582
|
-
prop: openProp,
|
|
4583
|
-
defaultProp: defaultOpen != null ? defaultOpen : false,
|
|
4584
|
-
onChange: onOpenChange,
|
|
4585
|
-
caller: DIALOG_NAME
|
|
4586
|
-
});
|
|
4587
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4588
|
-
DialogProvider,
|
|
4589
|
-
{
|
|
4590
|
-
scope: __scopeDialog,
|
|
4591
|
-
triggerRef,
|
|
4592
|
-
contentRef,
|
|
4593
|
-
contentId: useId(),
|
|
4594
|
-
titleId: useId(),
|
|
4595
|
-
descriptionId: useId(),
|
|
4596
|
-
open,
|
|
4597
|
-
onOpenChange: setOpen,
|
|
4598
|
-
onOpenToggle: React54.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
4599
|
-
modal,
|
|
4600
|
-
children
|
|
4601
|
-
}
|
|
4602
|
-
);
|
|
4603
|
-
};
|
|
4604
|
-
Dialog.displayName = DIALOG_NAME;
|
|
4605
|
-
var TRIGGER_NAME = "DialogTrigger";
|
|
4606
|
-
var DialogTrigger = React54.forwardRef(
|
|
4607
|
-
(props, forwardedRef) => {
|
|
4608
|
-
const _a = props, { __scopeDialog } = _a, triggerProps = __objRest(_a, ["__scopeDialog"]);
|
|
4609
|
-
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
4610
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
4611
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4612
|
-
Primitive.button,
|
|
4613
|
-
__spreadProps(__spreadValues({
|
|
4614
|
-
type: "button",
|
|
4615
|
-
"aria-haspopup": "dialog",
|
|
4616
|
-
"aria-expanded": context.open,
|
|
4617
|
-
"aria-controls": context.contentId,
|
|
4618
|
-
"data-state": getState(context.open)
|
|
4619
|
-
}, triggerProps), {
|
|
4620
|
-
ref: composedTriggerRef,
|
|
4621
|
-
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
4622
|
-
})
|
|
4623
|
-
);
|
|
4624
|
-
}
|
|
4625
|
-
);
|
|
4626
|
-
DialogTrigger.displayName = TRIGGER_NAME;
|
|
4627
|
-
var PORTAL_NAME2 = "DialogPortal";
|
|
4628
|
-
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
4629
|
-
forceMount: void 0
|
|
4630
|
-
});
|
|
4631
|
-
var DialogPortal = (props) => {
|
|
4632
|
-
const { __scopeDialog, forceMount, children, container } = props;
|
|
4633
|
-
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
4634
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React54.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
|
4635
|
-
};
|
|
4636
|
-
DialogPortal.displayName = PORTAL_NAME2;
|
|
4637
|
-
var OVERLAY_NAME = "DialogOverlay";
|
|
4638
|
-
var DialogOverlay = React54.forwardRef(
|
|
4639
|
-
(props, forwardedRef) => {
|
|
4640
|
-
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
4641
|
-
const _a = props, { forceMount = portalContext.forceMount } = _a, overlayProps = __objRest(_a, ["forceMount"]);
|
|
4642
|
-
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
4643
|
-
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogOverlayImpl, __spreadProps(__spreadValues({}, overlayProps), { ref: forwardedRef })) }) : null;
|
|
4644
|
-
}
|
|
4645
|
-
);
|
|
4646
|
-
DialogOverlay.displayName = OVERLAY_NAME;
|
|
4647
|
-
var Slot2 = createSlot("DialogOverlay.RemoveScroll");
|
|
4648
|
-
var DialogOverlayImpl = React54.forwardRef(
|
|
4649
|
-
(props, forwardedRef) => {
|
|
4650
|
-
const _a = props, { __scopeDialog } = _a, overlayProps = __objRest(_a, ["__scopeDialog"]);
|
|
4651
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
4652
|
-
return (
|
|
4653
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
4654
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
4655
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4656
|
-
Primitive.div,
|
|
4657
|
-
__spreadProps(__spreadValues({
|
|
4658
|
-
"data-state": getState(context.open)
|
|
4659
|
-
}, overlayProps), {
|
|
4660
|
-
ref: forwardedRef,
|
|
4661
|
-
style: __spreadValues({ pointerEvents: "auto" }, overlayProps.style)
|
|
4662
|
-
})
|
|
4663
|
-
) })
|
|
4664
|
-
);
|
|
4665
|
-
}
|
|
4666
|
-
);
|
|
4667
|
-
var CONTENT_NAME = "DialogContent";
|
|
4668
|
-
var DialogContent = React54.forwardRef(
|
|
4669
|
-
(props, forwardedRef) => {
|
|
4670
|
-
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
4671
|
-
const _a = props, { forceMount = portalContext.forceMount } = _a, contentProps = __objRest(_a, ["forceMount"]);
|
|
4672
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
4673
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogContentModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogContentNonModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) });
|
|
4674
|
-
}
|
|
4675
|
-
);
|
|
4676
|
-
DialogContent.displayName = CONTENT_NAME;
|
|
4677
|
-
var DialogContentModal = React54.forwardRef(
|
|
4678
|
-
(props, forwardedRef) => {
|
|
4679
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
4680
|
-
const contentRef = React54.useRef(null);
|
|
4681
|
-
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
4682
|
-
React54.useEffect(() => {
|
|
4683
|
-
const content = contentRef.current;
|
|
4684
|
-
if (content) return hideOthers(content);
|
|
4685
|
-
}, []);
|
|
4686
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4687
|
-
DialogContentImpl,
|
|
4688
|
-
__spreadProps(__spreadValues({}, props), {
|
|
4689
|
-
ref: composedRefs,
|
|
4690
|
-
trapFocus: context.open,
|
|
4691
|
-
disableOutsidePointerEvents: true,
|
|
4692
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
4693
|
-
var _a;
|
|
4694
|
-
event.preventDefault();
|
|
4695
|
-
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
|
4696
|
-
}),
|
|
4697
|
-
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
4698
|
-
const originalEvent = event.detail.originalEvent;
|
|
4699
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
4700
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
4701
|
-
if (isRightClick) event.preventDefault();
|
|
4702
|
-
}),
|
|
4703
|
-
onFocusOutside: composeEventHandlers(
|
|
4704
|
-
props.onFocusOutside,
|
|
4705
|
-
(event) => event.preventDefault()
|
|
4706
|
-
)
|
|
4707
|
-
})
|
|
4708
|
-
);
|
|
4709
|
-
}
|
|
4710
|
-
);
|
|
4711
|
-
var DialogContentNonModal = React54.forwardRef(
|
|
4712
|
-
(props, forwardedRef) => {
|
|
4713
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
4714
|
-
const hasInteractedOutsideRef = React54.useRef(false);
|
|
4715
|
-
const hasPointerDownOutsideRef = React54.useRef(false);
|
|
4716
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4717
|
-
DialogContentImpl,
|
|
4718
|
-
__spreadProps(__spreadValues({}, props), {
|
|
4719
|
-
ref: forwardedRef,
|
|
4720
|
-
trapFocus: false,
|
|
4721
|
-
disableOutsidePointerEvents: false,
|
|
4722
|
-
onCloseAutoFocus: (event) => {
|
|
4723
|
-
var _a, _b;
|
|
4724
|
-
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
|
4725
|
-
if (!event.defaultPrevented) {
|
|
4726
|
-
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
|
4727
|
-
event.preventDefault();
|
|
4728
|
-
}
|
|
4729
|
-
hasInteractedOutsideRef.current = false;
|
|
4730
|
-
hasPointerDownOutsideRef.current = false;
|
|
4731
|
-
},
|
|
4732
|
-
onInteractOutside: (event) => {
|
|
4733
|
-
var _a, _b;
|
|
4734
|
-
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
|
4735
|
-
if (!event.defaultPrevented) {
|
|
4736
|
-
hasInteractedOutsideRef.current = true;
|
|
4737
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
4738
|
-
hasPointerDownOutsideRef.current = true;
|
|
4739
|
-
}
|
|
4740
|
-
}
|
|
4741
|
-
const target = event.target;
|
|
4742
|
-
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
|
4743
|
-
if (targetIsTrigger) event.preventDefault();
|
|
4744
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
4745
|
-
event.preventDefault();
|
|
4746
|
-
}
|
|
4747
|
-
}
|
|
4748
|
-
})
|
|
4749
|
-
);
|
|
4750
|
-
}
|
|
4751
|
-
);
|
|
4752
|
-
var DialogContentImpl = React54.forwardRef(
|
|
4753
|
-
(props, forwardedRef) => {
|
|
4754
|
-
const _a = props, { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus } = _a, contentProps = __objRest(_a, ["__scopeDialog", "trapFocus", "onOpenAutoFocus", "onCloseAutoFocus"]);
|
|
4755
|
-
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
4756
|
-
const contentRef = React54.useRef(null);
|
|
4757
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
4758
|
-
useFocusGuards();
|
|
4759
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
4760
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4761
|
-
FocusScope,
|
|
4762
|
-
{
|
|
4763
|
-
asChild: true,
|
|
4764
|
-
loop: true,
|
|
4765
|
-
trapped: trapFocus,
|
|
4766
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
4767
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
4768
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4769
|
-
DismissableLayer,
|
|
4770
|
-
__spreadProps(__spreadValues({
|
|
4771
|
-
role: "dialog",
|
|
4772
|
-
id: context.contentId,
|
|
4773
|
-
"aria-describedby": context.descriptionId,
|
|
4774
|
-
"aria-labelledby": context.titleId,
|
|
4775
|
-
"data-state": getState(context.open)
|
|
4776
|
-
}, contentProps), {
|
|
4777
|
-
ref: composedRefs,
|
|
4778
|
-
onDismiss: () => context.onOpenChange(false)
|
|
4779
|
-
})
|
|
4780
|
-
)
|
|
4781
|
-
}
|
|
4782
|
-
),
|
|
4783
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
4784
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
4785
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
4786
|
-
] })
|
|
4787
|
-
] });
|
|
4788
|
-
}
|
|
4789
|
-
);
|
|
4790
|
-
var TITLE_NAME = "DialogTitle";
|
|
4791
|
-
var DialogTitle = React54.forwardRef(
|
|
4792
|
-
(props, forwardedRef) => {
|
|
4793
|
-
const _a = props, { __scopeDialog } = _a, titleProps = __objRest(_a, ["__scopeDialog"]);
|
|
4794
|
-
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
4795
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Primitive.h2, __spreadProps(__spreadValues({ id: context.titleId }, titleProps), { ref: forwardedRef }));
|
|
4796
|
-
}
|
|
4797
|
-
);
|
|
4798
|
-
DialogTitle.displayName = TITLE_NAME;
|
|
4799
|
-
var DESCRIPTION_NAME = "DialogDescription";
|
|
4800
|
-
var DialogDescription = React54.forwardRef(
|
|
4801
|
-
(props, forwardedRef) => {
|
|
4802
|
-
const _a = props, { __scopeDialog } = _a, descriptionProps = __objRest(_a, ["__scopeDialog"]);
|
|
4803
|
-
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
4804
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Primitive.p, __spreadProps(__spreadValues({ id: context.descriptionId }, descriptionProps), { ref: forwardedRef }));
|
|
4805
|
-
}
|
|
4806
|
-
);
|
|
4807
|
-
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
4808
|
-
var CLOSE_NAME = "DialogClose";
|
|
4809
|
-
var DialogClose = React54.forwardRef(
|
|
4810
|
-
(props, forwardedRef) => {
|
|
4811
|
-
const _a = props, { __scopeDialog } = _a, closeProps = __objRest(_a, ["__scopeDialog"]);
|
|
4812
|
-
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
4813
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4814
|
-
Primitive.button,
|
|
4815
|
-
__spreadProps(__spreadValues({
|
|
4816
|
-
type: "button"
|
|
4817
|
-
}, closeProps), {
|
|
4818
|
-
ref: forwardedRef,
|
|
4819
|
-
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
4820
|
-
})
|
|
4821
|
-
);
|
|
4822
|
-
}
|
|
4823
|
-
);
|
|
4824
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
4825
|
-
function getState(open) {
|
|
4826
|
-
return open ? "open" : "closed";
|
|
4827
|
-
}
|
|
4828
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
4829
|
-
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
4830
|
-
contentName: CONTENT_NAME,
|
|
4831
|
-
titleName: TITLE_NAME,
|
|
4832
|
-
docsSlug: "dialog"
|
|
4833
|
-
});
|
|
4834
|
-
var TitleWarning = ({ titleId }) => {
|
|
4835
|
-
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
4836
|
-
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
4837
|
-
|
|
4838
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4839
|
-
|
|
4840
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
4841
|
-
React54.useEffect(() => {
|
|
4842
|
-
if (titleId) {
|
|
4843
|
-
const hasTitle = document.getElementById(titleId);
|
|
4844
|
-
if (!hasTitle) console.error(MESSAGE);
|
|
4845
|
-
}
|
|
4846
|
-
}, [MESSAGE, titleId]);
|
|
4847
|
-
return null;
|
|
4848
|
-
};
|
|
4849
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
4850
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
4851
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
4852
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
4853
|
-
React54.useEffect(() => {
|
|
4854
|
-
var _a;
|
|
4855
|
-
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
|
4856
|
-
if (descriptionId && describedById) {
|
|
4857
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
4858
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
4859
|
-
}
|
|
4860
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
4861
|
-
return null;
|
|
4862
|
-
};
|
|
4863
|
-
var Root = Dialog;
|
|
4864
|
-
var Trigger = DialogTrigger;
|
|
4865
|
-
var Portal2 = DialogPortal;
|
|
4866
|
-
var Overlay = DialogOverlay;
|
|
4867
|
-
var Content = DialogContent;
|
|
4868
|
-
var Title = DialogTitle;
|
|
4869
|
-
var Description = DialogDescription;
|
|
4870
|
-
var Close = DialogClose;
|
|
4871
|
-
|
|
4872
|
-
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
4873
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4874
|
-
var ROOT_NAME = "AlertDialog";
|
|
4875
|
-
var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
4876
|
-
createDialogScope
|
|
4877
|
-
]);
|
|
4878
|
-
var useDialogScope = createDialogScope();
|
|
4879
|
-
var AlertDialog = (props) => {
|
|
4880
|
-
const _a = props, { __scopeAlertDialog } = _a, alertDialogProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4881
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4882
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Root, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), alertDialogProps), { modal: true }));
|
|
4883
|
-
};
|
|
4884
|
-
AlertDialog.displayName = ROOT_NAME;
|
|
4885
|
-
var TRIGGER_NAME2 = "AlertDialogTrigger";
|
|
4886
|
-
var AlertDialogTrigger = React55.forwardRef(
|
|
4887
|
-
(props, forwardedRef) => {
|
|
4888
|
-
const _a = props, { __scopeAlertDialog } = _a, triggerProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4889
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4890
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Trigger, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), triggerProps), { ref: forwardedRef }));
|
|
4891
|
-
}
|
|
4892
|
-
);
|
|
4893
|
-
AlertDialogTrigger.displayName = TRIGGER_NAME2;
|
|
4894
|
-
var PORTAL_NAME3 = "AlertDialogPortal";
|
|
4895
|
-
var AlertDialogPortal = (props) => {
|
|
4896
|
-
const _a = props, { __scopeAlertDialog } = _a, portalProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4897
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4898
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Portal2, __spreadValues(__spreadValues({}, dialogScope), portalProps));
|
|
4899
|
-
};
|
|
4900
|
-
AlertDialogPortal.displayName = PORTAL_NAME3;
|
|
4901
|
-
var OVERLAY_NAME2 = "AlertDialogOverlay";
|
|
4902
|
-
var AlertDialogOverlay = React55.forwardRef(
|
|
4903
|
-
(props, forwardedRef) => {
|
|
4904
|
-
const _a = props, { __scopeAlertDialog } = _a, overlayProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4905
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4906
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Overlay, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), overlayProps), { ref: forwardedRef }));
|
|
4907
|
-
}
|
|
4908
|
-
);
|
|
4909
|
-
AlertDialogOverlay.displayName = OVERLAY_NAME2;
|
|
4910
|
-
var CONTENT_NAME2 = "AlertDialogContent";
|
|
4911
|
-
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME2);
|
|
4912
|
-
var Slottable = createSlottable("AlertDialogContent");
|
|
4913
|
-
var AlertDialogContent = React55.forwardRef(
|
|
4914
|
-
(props, forwardedRef) => {
|
|
4915
|
-
const _a = props, { __scopeAlertDialog, children } = _a, contentProps = __objRest(_a, ["__scopeAlertDialog", "children"]);
|
|
4916
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4917
|
-
const contentRef = React55.useRef(null);
|
|
4918
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
4919
|
-
const cancelRef = React55.useRef(null);
|
|
4920
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4921
|
-
WarningProvider,
|
|
4922
|
-
{
|
|
4923
|
-
contentName: CONTENT_NAME2,
|
|
4924
|
-
titleName: TITLE_NAME2,
|
|
4925
|
-
docsSlug: "alert-dialog",
|
|
4926
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
4927
|
-
Content,
|
|
4928
|
-
__spreadProps(__spreadValues(__spreadValues({
|
|
4929
|
-
role: "alertdialog"
|
|
4930
|
-
}, dialogScope), contentProps), {
|
|
4931
|
-
ref: composedRefs,
|
|
4932
|
-
onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
|
|
4933
|
-
var _a2;
|
|
4934
|
-
event.preventDefault();
|
|
4935
|
-
(_a2 = cancelRef.current) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
4936
|
-
}),
|
|
4937
|
-
onPointerDownOutside: (event) => event.preventDefault(),
|
|
4938
|
-
onInteractOutside: (event) => event.preventDefault(),
|
|
4939
|
-
children: [
|
|
4940
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Slottable, { children }),
|
|
4941
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DescriptionWarning2, { contentRef })
|
|
4942
|
-
]
|
|
4943
|
-
})
|
|
4944
|
-
) })
|
|
4945
|
-
}
|
|
4946
|
-
);
|
|
4947
|
-
}
|
|
4948
|
-
);
|
|
4949
|
-
AlertDialogContent.displayName = CONTENT_NAME2;
|
|
4950
|
-
var TITLE_NAME2 = "AlertDialogTitle";
|
|
4951
|
-
var AlertDialogTitle = React55.forwardRef(
|
|
4952
|
-
(props, forwardedRef) => {
|
|
4953
|
-
const _a = props, { __scopeAlertDialog } = _a, titleProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4954
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4955
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), titleProps), { ref: forwardedRef }));
|
|
4956
|
-
}
|
|
4957
|
-
);
|
|
4958
|
-
AlertDialogTitle.displayName = TITLE_NAME2;
|
|
4959
|
-
var DESCRIPTION_NAME2 = "AlertDialogDescription";
|
|
4960
|
-
var AlertDialogDescription = React55.forwardRef((props, forwardedRef) => {
|
|
4961
|
-
const _a = props, { __scopeAlertDialog } = _a, descriptionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4962
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Description, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), descriptionProps), { ref: forwardedRef }));
|
|
4964
|
-
});
|
|
4965
|
-
AlertDialogDescription.displayName = DESCRIPTION_NAME2;
|
|
4966
|
-
var ACTION_NAME = "AlertDialogAction";
|
|
4967
|
-
var AlertDialogAction = React55.forwardRef(
|
|
4968
|
-
(props, forwardedRef) => {
|
|
4969
|
-
const _a = props, { __scopeAlertDialog } = _a, actionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4970
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4971
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), actionProps), { ref: forwardedRef }));
|
|
4972
|
-
}
|
|
4973
|
-
);
|
|
4974
|
-
AlertDialogAction.displayName = ACTION_NAME;
|
|
4975
|
-
var CANCEL_NAME = "AlertDialogCancel";
|
|
4976
|
-
var AlertDialogCancel = React55.forwardRef(
|
|
4977
|
-
(props, forwardedRef) => {
|
|
4978
|
-
const _a = props, { __scopeAlertDialog } = _a, cancelProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
4979
|
-
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
4980
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
4981
|
-
const ref = useComposedRefs(forwardedRef, cancelRef);
|
|
4982
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), cancelProps), { ref }));
|
|
4983
|
-
}
|
|
4984
|
-
);
|
|
4985
|
-
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
4986
|
-
var DescriptionWarning2 = ({ contentRef }) => {
|
|
4987
|
-
const MESSAGE = `\`${CONTENT_NAME2}\` requires a description for the component to be accessible for screen reader users.
|
|
4988
|
-
|
|
4989
|
-
You can add a description to the \`${CONTENT_NAME2}\` by passing a \`${DESCRIPTION_NAME2}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4990
|
-
|
|
4991
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME2}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
4992
|
-
|
|
4993
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
4994
|
-
React55.useEffect(() => {
|
|
4995
|
-
var _a;
|
|
4996
|
-
const hasDescription = document.getElementById(
|
|
4997
|
-
(_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby")
|
|
4998
|
-
);
|
|
4999
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
5000
|
-
}, [MESSAGE, contentRef]);
|
|
5001
|
-
return null;
|
|
5002
|
-
};
|
|
5003
|
-
var Root2 = AlertDialog;
|
|
5004
|
-
var Portal22 = AlertDialogPortal;
|
|
5005
|
-
var Overlay2 = AlertDialogOverlay;
|
|
5006
|
-
var Content2 = AlertDialogContent;
|
|
5007
|
-
var Action = AlertDialogAction;
|
|
5008
|
-
var Cancel = AlertDialogCancel;
|
|
5009
|
-
var Title2 = AlertDialogTitle;
|
|
5010
|
-
var Description2 = AlertDialogDescription;
|
|
5011
|
-
|
|
5012
|
-
// ../lib/src/utils.ts
|
|
5013
|
-
var import_clsx = require("clsx");
|
|
5014
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
5015
|
-
function cn(...inputs) {
|
|
5016
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
5017
|
-
}
|
|
5018
|
-
|
|
5019
|
-
// ../base-ui/src/ui/button.tsx
|
|
5020
|
-
var React56 = __toESM(require("react"), 1);
|
|
5021
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
5022
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5023
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
5024
|
-
"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",
|
|
5025
|
-
{
|
|
5026
|
-
variants: {
|
|
5027
|
-
variant: {
|
|
5028
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
5029
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
5030
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
5031
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
5032
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
5033
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
5034
|
-
},
|
|
5035
|
-
size: {
|
|
5036
|
-
default: "h-10 px-4 py-2",
|
|
5037
|
-
sm: "h-9 rounded-md px-3",
|
|
5038
|
-
lg: "h-11 rounded-md px-8",
|
|
5039
|
-
icon: "h-10 w-10"
|
|
5040
|
-
}
|
|
5041
|
-
},
|
|
5042
|
-
defaultVariants: {
|
|
5043
|
-
variant: "default",
|
|
5044
|
-
size: "default"
|
|
5045
|
-
}
|
|
5046
|
-
}
|
|
5047
|
-
);
|
|
5048
|
-
var Button = React56.forwardRef(
|
|
5049
|
-
(_a, ref) => {
|
|
5050
|
-
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
5051
|
-
const Comp = asChild ? Slot : "button";
|
|
5052
|
-
if (asChild) {
|
|
5053
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5054
|
-
Comp,
|
|
5055
|
-
__spreadProps(__spreadValues({
|
|
5056
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
5057
|
-
ref,
|
|
5058
|
-
disabled: loading || props.disabled
|
|
5059
|
-
}, props), {
|
|
5060
|
-
children
|
|
5061
|
-
})
|
|
5062
|
-
);
|
|
5063
|
-
}
|
|
5064
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5065
|
-
Comp,
|
|
5066
|
-
__spreadProps(__spreadValues({
|
|
5067
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
5068
|
-
ref,
|
|
5069
|
-
disabled: loading || props.disabled
|
|
5070
|
-
}, props), {
|
|
5071
|
-
children: [
|
|
5072
|
-
children,
|
|
5073
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
5074
|
-
]
|
|
5075
|
-
})
|
|
5076
|
-
);
|
|
5077
|
-
}
|
|
5078
|
-
);
|
|
5079
|
-
Button.displayName = "Button";
|
|
5080
|
-
|
|
5081
|
-
// ../base-ui/src/ui/alert-dialog.tsx
|
|
5082
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5083
|
-
var AlertDialog2 = Root2;
|
|
5084
|
-
var AlertDialogPortal2 = Portal22;
|
|
5085
|
-
var AlertDialogOverlay2 = React57.forwardRef((_a, ref) => {
|
|
5086
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5087
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5088
|
-
Overlay2,
|
|
5089
|
-
__spreadProps(__spreadValues({
|
|
5090
|
-
className: cn(
|
|
5091
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
5092
|
-
className
|
|
5093
|
-
)
|
|
5094
|
-
}, props), {
|
|
5095
|
-
ref
|
|
5096
|
-
})
|
|
5097
|
-
);
|
|
5098
|
-
});
|
|
5099
|
-
AlertDialogOverlay2.displayName = Overlay2.displayName;
|
|
5100
|
-
var AlertDialogContent2 = React57.forwardRef((_a, ref) => {
|
|
5101
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(AlertDialogPortal2, { children: [
|
|
5103
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AlertDialogOverlay2, {}),
|
|
5104
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5105
|
-
Content2,
|
|
5106
|
-
__spreadValues({
|
|
5107
|
-
ref,
|
|
5108
|
-
className: cn(
|
|
5109
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
5110
|
-
className
|
|
5111
|
-
)
|
|
5112
|
-
}, props)
|
|
5113
|
-
)
|
|
5114
|
-
] });
|
|
5115
|
-
});
|
|
5116
|
-
AlertDialogContent2.displayName = Content2.displayName;
|
|
5117
|
-
var AlertDialogHeader = (_a) => {
|
|
5118
|
-
var _b = _a, {
|
|
5119
|
-
className
|
|
5120
|
-
} = _b, props = __objRest(_b, [
|
|
5121
|
-
"className"
|
|
5122
|
-
]);
|
|
5123
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5124
|
-
"div",
|
|
5125
|
-
__spreadValues({
|
|
5126
|
-
className: cn(
|
|
5127
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
5128
|
-
className
|
|
5129
|
-
)
|
|
5130
|
-
}, props)
|
|
5131
|
-
);
|
|
5132
|
-
};
|
|
5133
|
-
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
5134
|
-
var AlertDialogFooter = (_a) => {
|
|
5135
|
-
var _b = _a, {
|
|
5136
|
-
className
|
|
5137
|
-
} = _b, props = __objRest(_b, [
|
|
5138
|
-
"className"
|
|
5139
|
-
]);
|
|
5140
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5141
|
-
"div",
|
|
5142
|
-
__spreadValues({
|
|
5143
|
-
className: cn(
|
|
5144
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
5145
|
-
className
|
|
5146
|
-
)
|
|
5147
|
-
}, props)
|
|
5148
|
-
);
|
|
5149
|
-
};
|
|
5150
|
-
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
5151
|
-
var AlertDialogTitle2 = React57.forwardRef((_a, ref) => {
|
|
5152
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5153
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5154
|
-
Title2,
|
|
5155
|
-
__spreadValues({
|
|
5156
|
-
ref,
|
|
5157
|
-
className: cn("text-lg font-semibold", className)
|
|
5158
|
-
}, props)
|
|
5159
|
-
);
|
|
5160
|
-
});
|
|
5161
|
-
AlertDialogTitle2.displayName = Title2.displayName;
|
|
5162
|
-
var AlertDialogDescription2 = React57.forwardRef((_a, ref) => {
|
|
5163
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5164
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5165
|
-
Description2,
|
|
5166
|
-
__spreadValues({
|
|
5167
|
-
ref,
|
|
5168
|
-
className: cn("text-sm text-muted-foreground", className)
|
|
5169
|
-
}, props)
|
|
5170
|
-
);
|
|
5171
|
-
});
|
|
5172
|
-
AlertDialogDescription2.displayName = Description2.displayName;
|
|
5173
|
-
var AlertDialogAction2 = React57.forwardRef((_a, ref) => {
|
|
5174
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5175
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5176
|
-
Action,
|
|
5177
|
-
__spreadValues({
|
|
5178
|
-
ref,
|
|
5179
|
-
className: cn(buttonVariants(), className)
|
|
5180
|
-
}, props)
|
|
5181
|
-
);
|
|
5182
|
-
});
|
|
5183
|
-
AlertDialogAction2.displayName = Action.displayName;
|
|
5184
|
-
var AlertDialogCancel2 = React57.forwardRef((_a, ref) => {
|
|
5185
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5186
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5187
|
-
Cancel,
|
|
5188
|
-
__spreadValues({
|
|
5189
|
-
ref,
|
|
5190
|
-
className: cn(
|
|
5191
|
-
buttonVariants({ variant: "outline" }),
|
|
5192
|
-
"mt-2 sm:mt-0",
|
|
5193
|
-
className
|
|
5194
|
-
)
|
|
5195
|
-
}, props)
|
|
5196
|
-
);
|
|
5197
|
-
});
|
|
5198
|
-
AlertDialogCancel2.displayName = Cancel.displayName;
|
|
5199
|
-
|
|
5200
|
-
// src/fuma/mdx/mermaid.tsx
|
|
5201
|
-
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2742
|
+
var import_react35 = require("react");
|
|
2743
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5202
2744
|
function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview = true }) {
|
|
5203
|
-
const id = (0,
|
|
5204
|
-
const [svg, setSvg] = (0,
|
|
2745
|
+
const id = (0, import_react35.useId)();
|
|
2746
|
+
const [svg, setSvg] = (0, import_react35.useState)("");
|
|
5205
2747
|
const { resolvedTheme } = (0, import_next_themes.useTheme)();
|
|
5206
|
-
const [open, setOpen] = (0,
|
|
5207
|
-
const [scale, setScale] = (0,
|
|
5208
|
-
const [translate, setTranslate] = (0,
|
|
5209
|
-
const isPanningRef = (0,
|
|
5210
|
-
const startPointRef = (0,
|
|
5211
|
-
const startTranslateRef = (0,
|
|
5212
|
-
(0,
|
|
2748
|
+
const [open, setOpen] = (0, import_react35.useState)(false);
|
|
2749
|
+
const [scale, setScale] = (0, import_react35.useState)(1);
|
|
2750
|
+
const [translate, setTranslate] = (0, import_react35.useState)({ x: 0, y: 0 });
|
|
2751
|
+
const isPanningRef = (0, import_react35.useRef)(false);
|
|
2752
|
+
const startPointRef = (0, import_react35.useRef)({ x: 0, y: 0 });
|
|
2753
|
+
const startTranslateRef = (0, import_react35.useRef)({ x: 0, y: 0 });
|
|
2754
|
+
(0, import_react35.useEffect)(() => {
|
|
5213
2755
|
let isMounted = true;
|
|
5214
2756
|
void renderChart();
|
|
5215
2757
|
function renderChart() {
|
|
@@ -5244,14 +2786,14 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
|
|
|
5244
2786
|
};
|
|
5245
2787
|
}, [chart, id, resolvedTheme, watermarkEnabled, watermarkText]);
|
|
5246
2788
|
const clamp = (v, min, max) => Math.min(Math.max(v, min), max);
|
|
5247
|
-
const resetTransform = (0,
|
|
2789
|
+
const resetTransform = (0, import_react35.useCallback)(() => {
|
|
5248
2790
|
setScale(1);
|
|
5249
2791
|
setTranslate({ x: 0, y: 0 });
|
|
5250
2792
|
}, []);
|
|
5251
|
-
const zoomBy = (0,
|
|
2793
|
+
const zoomBy = (0, import_react35.useCallback)((delta) => {
|
|
5252
2794
|
setScale((prev) => clamp(prev + delta, 0.25, 6));
|
|
5253
2795
|
}, []);
|
|
5254
|
-
const onWheel = (0,
|
|
2796
|
+
const onWheel = (0, import_react35.useCallback)((e) => {
|
|
5255
2797
|
if (e.metaKey || e.ctrlKey) {
|
|
5256
2798
|
e.preventDefault();
|
|
5257
2799
|
const delta = e.deltaY > 0 ? -0.1 : 0.1;
|
|
@@ -5260,120 +2802,139 @@ function Mermaid({ chart, title, watermarkEnabled, watermarkText, enablePreview
|
|
|
5260
2802
|
setTranslate((prev) => ({ x: prev.x, y: prev.y - e.deltaY }));
|
|
5261
2803
|
}
|
|
5262
2804
|
}, []);
|
|
5263
|
-
const onPointerDown = (0,
|
|
2805
|
+
const onPointerDown = (0, import_react35.useCallback)((e) => {
|
|
5264
2806
|
isPanningRef.current = true;
|
|
5265
2807
|
startPointRef.current = { x: e.clientX, y: e.clientY };
|
|
5266
2808
|
startTranslateRef.current = __spreadValues({}, translate);
|
|
5267
2809
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
5268
2810
|
}, [translate]);
|
|
5269
|
-
const onPointerMove = (0,
|
|
2811
|
+
const onPointerMove = (0, import_react35.useCallback)((e) => {
|
|
5270
2812
|
if (!isPanningRef.current) return;
|
|
5271
2813
|
const dx = e.clientX - startPointRef.current.x;
|
|
5272
2814
|
const dy = e.clientY - startPointRef.current.y;
|
|
5273
2815
|
setTranslate({ x: startTranslateRef.current.x + dx, y: startTranslateRef.current.y + dy });
|
|
5274
2816
|
}, []);
|
|
5275
|
-
const onPointerUp = (0,
|
|
2817
|
+
const onPointerUp = (0, import_react35.useCallback)((e) => {
|
|
5276
2818
|
isPanningRef.current = false;
|
|
5277
2819
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
5278
2820
|
}, []);
|
|
5279
|
-
return /* @__PURE__ */ (0,
|
|
5280
|
-
/* @__PURE__ */ (0,
|
|
2821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5281
2823
|
"div",
|
|
5282
2824
|
{
|
|
5283
2825
|
className: enablePreview ? "group relative cursor-zoom-in" : void 0,
|
|
5284
2826
|
onClick: () => enablePreview && svg && setOpen(true),
|
|
5285
2827
|
children: [
|
|
5286
|
-
/* @__PURE__ */ (0,
|
|
5287
|
-
enablePreview && svg && /* @__PURE__ */ (0,
|
|
2828
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { dangerouslySetInnerHTML: { __html: svg } }),
|
|
2829
|
+
enablePreview && svg && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pointer-events-none absolute right-2 top-2 hidden rounded bg-black/50 px-2 py-0.5 text-[12px] text-white group-hover:block", children: "Preview Chart" })
|
|
5288
2830
|
]
|
|
5289
2831
|
}
|
|
5290
2832
|
),
|
|
5291
|
-
title && /* @__PURE__ */ (0,
|
|
2833
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5292
2834
|
"div",
|
|
5293
2835
|
{
|
|
5294
2836
|
className: "mt-2 flex items-center justify-center text-center text-[13px] font-italic text-[#AC62FD]",
|
|
5295
2837
|
children: [
|
|
5296
|
-
/* @__PURE__ */ (0,
|
|
5297
|
-
/* @__PURE__ */ (0,
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.Mmd, { className: "mr-1 h-4 w-4" }),
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: title })
|
|
5298
2840
|
]
|
|
5299
2841
|
}
|
|
5300
2842
|
),
|
|
5301
|
-
enablePreview && /* @__PURE__ */ (0,
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
2843
|
+
enablePreview && open && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2844
|
+
"div",
|
|
2845
|
+
{
|
|
2846
|
+
role: "dialog",
|
|
2847
|
+
"aria-modal": "true",
|
|
2848
|
+
"aria-label": typeof title === "string" ? title : "Mermaid Preview",
|
|
2849
|
+
className: "fixed inset-0 z-[9999] flex items-center justify-center",
|
|
2850
|
+
children: [
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0 bg-black/60", onClick: () => {
|
|
2852
|
+
setOpen(false);
|
|
2853
|
+
resetTransform();
|
|
2854
|
+
} }),
|
|
2855
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative z-[1] max-w-[95vw] w-[95vw] h-[88vh] p-0 bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 rounded-md shadow-2xl overflow-hidden", children: [
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between px-3 py-2 border-b border-neutral-200 dark:border-neutral-700", children: [
|
|
2857
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 text-sm text-neutral-600 dark:text-neutral-300", children: [
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.Mmd, { className: "h-4 w-4" }),
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate max-w-[50vw]", children: title != null ? title : "Mermaid Preview" })
|
|
2860
|
+
] }),
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2863
|
+
"button",
|
|
2864
|
+
{
|
|
2865
|
+
"aria-label": "Zoom out",
|
|
2866
|
+
className: "flex h-6 w-6 items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 text-[13px]",
|
|
2867
|
+
onClick: () => zoomBy(-0.2),
|
|
2868
|
+
children: "\uFF0D"
|
|
2869
|
+
}
|
|
2870
|
+
),
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "mx-0.5 text-[12px] w-12 text-center select-none", children: [
|
|
2872
|
+
Math.round(scale * 100),
|
|
2873
|
+
"%"
|
|
2874
|
+
] }),
|
|
2875
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2876
|
+
"button",
|
|
2877
|
+
{
|
|
2878
|
+
"aria-label": "Zoom in",
|
|
2879
|
+
className: "flex h-6 w-6 items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 text-[13px]",
|
|
2880
|
+
onClick: () => zoomBy(0.2),
|
|
2881
|
+
children: "\uFF0B"
|
|
2882
|
+
}
|
|
2883
|
+
),
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2885
|
+
"button",
|
|
2886
|
+
{
|
|
2887
|
+
"aria-label": "Reset",
|
|
2888
|
+
className: "ml-1 flex h-6 w-6 items-center justify-center rounded text-purple-500 hover:text-purple-600",
|
|
2889
|
+
onClick: resetTransform,
|
|
2890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.RefreshCcw, { className: "h-3.5 w-3.5" })
|
|
2891
|
+
}
|
|
2892
|
+
),
|
|
2893
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2894
|
+
"button",
|
|
2895
|
+
{
|
|
2896
|
+
"aria-label": "Close",
|
|
2897
|
+
className: "ml-1 flex h-6 w-6 items-center justify-center rounded text-purple-500 hover:text-purple-600",
|
|
2898
|
+
onClick: () => {
|
|
2899
|
+
setOpen(false);
|
|
2900
|
+
resetTransform();
|
|
2901
|
+
},
|
|
2902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.X, { className: "h-3.5 w-3.5" })
|
|
2903
|
+
}
|
|
2904
|
+
)
|
|
2905
|
+
] })
|
|
2906
|
+
] }),
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
5365
2908
|
"div",
|
|
5366
2909
|
{
|
|
5367
|
-
className: "
|
|
5368
|
-
|
|
5369
|
-
|
|
2910
|
+
className: "relative h-[calc(88vh-40px)] w-full overflow-hidden bg-white dark:bg-neutral-900",
|
|
2911
|
+
onWheel,
|
|
2912
|
+
onPointerDown,
|
|
2913
|
+
onPointerMove,
|
|
2914
|
+
onPointerUp,
|
|
2915
|
+
children: [
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2917
|
+
"div",
|
|
2918
|
+
{
|
|
2919
|
+
className: "absolute left-1/2 top-1/2",
|
|
2920
|
+
style: { transform: `translate(-50%, -50%) translate(${translate.x}px, ${translate.y}px)` },
|
|
2921
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2922
|
+
"div",
|
|
2923
|
+
{
|
|
2924
|
+
style: { transform: `scale(${scale})`, transformOrigin: "50% 50%" },
|
|
2925
|
+
dangerouslySetInnerHTML: { __html: svg }
|
|
2926
|
+
}
|
|
2927
|
+
)
|
|
2928
|
+
}
|
|
2929
|
+
),
|
|
2930
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pointer-events-none absolute bottom-2 right-3 rounded bg-black/40 px-2 py-1 text-xs text-white", children: "Drag to pan, hold Cmd/Ctrl + scroll to zoom" })
|
|
2931
|
+
]
|
|
5370
2932
|
}
|
|
5371
|
-
)
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
] }) })
|
|
2933
|
+
)
|
|
2934
|
+
] })
|
|
2935
|
+
]
|
|
2936
|
+
}
|
|
2937
|
+
)
|
|
5377
2938
|
] });
|
|
5378
2939
|
}
|
|
5379
2940
|
function addWatermarkToSvg(svg, watermark) {
|
|
@@ -5396,9 +2957,9 @@ function addWatermarkToSvg(svg, watermark) {
|
|
|
5396
2957
|
|
|
5397
2958
|
// src/fuma/mdx/image-zoom.tsx
|
|
5398
2959
|
var import_framework = require("fumadocs-core/framework");
|
|
5399
|
-
var
|
|
2960
|
+
var import_react36 = require("react");
|
|
5400
2961
|
var import_react_medium_image_zoom = __toESM(require("react-medium-image-zoom"));
|
|
5401
|
-
var
|
|
2962
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5402
2963
|
function getImageSrc(src) {
|
|
5403
2964
|
if (typeof src === "string") return src;
|
|
5404
2965
|
if (typeof src === "object") {
|
|
@@ -5421,14 +2982,14 @@ function ImageZoom(_a) {
|
|
|
5421
2982
|
"fallbackSrc"
|
|
5422
2983
|
]);
|
|
5423
2984
|
var _a2;
|
|
5424
|
-
const [imgSrc, setImgSrc] = (0,
|
|
2985
|
+
const [imgSrc, setImgSrc] = (0, import_react36.useState)(getImageSrc(props.src));
|
|
5425
2986
|
const handleError = () => {
|
|
5426
2987
|
console.warn("ImageZoom check error:", imgSrc, fallbackSrc);
|
|
5427
2988
|
if (imgSrc !== fallbackSrc) {
|
|
5428
2989
|
setImgSrc(fallbackSrc);
|
|
5429
2990
|
}
|
|
5430
2991
|
};
|
|
5431
|
-
return /* @__PURE__ */ (0,
|
|
2992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5432
2993
|
import_react_medium_image_zoom.default,
|
|
5433
2994
|
__spreadProps(__spreadValues({
|
|
5434
2995
|
zoomMargin: 20,
|
|
@@ -5440,7 +3001,7 @@ function ImageZoom(_a) {
|
|
|
5440
3001
|
}, zoomInProps), {
|
|
5441
3002
|
onError: handleError
|
|
5442
3003
|
}),
|
|
5443
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
3004
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5444
3005
|
import_framework.Image,
|
|
5445
3006
|
__spreadProps(__spreadValues({}, props), {
|
|
5446
3007
|
src: imgSrc,
|
|
@@ -5457,36 +3018,36 @@ function ImageZoom(_a) {
|
|
|
5457
3018
|
}
|
|
5458
3019
|
|
|
5459
3020
|
// src/fuma/mdx/trophy-card.tsx
|
|
5460
|
-
var
|
|
3021
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5461
3022
|
function TrophyCard({
|
|
5462
|
-
icon = /* @__PURE__ */ (0,
|
|
3023
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(globalLucideIcons.Star, {}),
|
|
5463
3024
|
title,
|
|
5464
3025
|
children
|
|
5465
3026
|
}) {
|
|
5466
|
-
return /* @__PURE__ */ (0,
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
5467
3028
|
"div",
|
|
5468
3029
|
{
|
|
5469
3030
|
className: "\n border-2 rounded-xl px-4 py-2\n border-purple-200 dark:border-gray-500\n ",
|
|
5470
3031
|
children: [
|
|
5471
|
-
/* @__PURE__ */ (0,
|
|
5472
|
-
/* @__PURE__ */ (0,
|
|
5473
|
-
/* @__PURE__ */ (0,
|
|
3032
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center font-bold text-sm", children: [
|
|
3033
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "mr-2", children: icon }),
|
|
3034
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: title })
|
|
5474
3035
|
] }),
|
|
5475
|
-
/* @__PURE__ */ (0,
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-sm -mt-1 leading-none", children })
|
|
5476
3037
|
]
|
|
5477
3038
|
}
|
|
5478
3039
|
);
|
|
5479
3040
|
}
|
|
5480
3041
|
|
|
5481
3042
|
// src/fuma/mdx/image-grid.tsx
|
|
5482
|
-
var
|
|
3043
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5483
3044
|
function ImageGrid({
|
|
5484
3045
|
type = "url",
|
|
5485
3046
|
images,
|
|
5486
3047
|
altPrefix = "",
|
|
5487
3048
|
cdnBaseUrl
|
|
5488
3049
|
}) {
|
|
5489
|
-
return /* @__PURE__ */ (0,
|
|
3050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5490
3051
|
"div",
|
|
5491
3052
|
{
|
|
5492
3053
|
style: {
|
|
@@ -5496,7 +3057,7 @@ function ImageGrid({
|
|
|
5496
3057
|
justifyItems: "center",
|
|
5497
3058
|
alignItems: "center"
|
|
5498
3059
|
},
|
|
5499
|
-
children: images.map((img, idx) => /* @__PURE__ */ (0,
|
|
3060
|
+
children: images.map((img, idx) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5500
3061
|
ImageZoom,
|
|
5501
3062
|
{
|
|
5502
3063
|
src: img.startsWith("http://") || img.startsWith("https://") ? img : type === "url" ? `${cdnBaseUrl == null ? void 0 : cdnBaseUrl.replace(/\/+$/, "")}/${img.replace(/^\/+/, "")}` : img,
|
|
@@ -5508,15 +3069,22 @@ function ImageGrid({
|
|
|
5508
3069
|
);
|
|
5509
3070
|
}
|
|
5510
3071
|
|
|
3072
|
+
// ../lib/src/utils.ts
|
|
3073
|
+
var import_clsx = require("clsx");
|
|
3074
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
3075
|
+
function cn(...inputs) {
|
|
3076
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
3077
|
+
}
|
|
3078
|
+
|
|
5511
3079
|
// src/fuma/mdx/zia-card.tsx
|
|
5512
3080
|
var import_link2 = __toESM(require("next/link"));
|
|
5513
|
-
var
|
|
3081
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5514
3082
|
function ZiaCard(_a) {
|
|
5515
3083
|
var _b = _a, { icon, title, description } = _b, props = __objRest(_b, ["icon", "title", "description"]);
|
|
5516
3084
|
const validHref = typeof props.href === "string" && props.href.trim() !== "";
|
|
5517
3085
|
const validDescription = typeof description === "string" && (description == null ? void 0 : description.trim()) !== "";
|
|
5518
3086
|
if (validHref) {
|
|
5519
|
-
return /* @__PURE__ */ (0,
|
|
3087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5520
3088
|
import_link2.default,
|
|
5521
3089
|
__spreadProps(__spreadValues({
|
|
5522
3090
|
href: props.href,
|
|
@@ -5528,15 +3096,15 @@ function ZiaCard(_a) {
|
|
|
5528
3096
|
)
|
|
5529
3097
|
}, props), {
|
|
5530
3098
|
children: [
|
|
5531
|
-
/* @__PURE__ */ (0,
|
|
5532
|
-
/* @__PURE__ */ (0,
|
|
5533
|
-
validDescription ? /* @__PURE__ */ (0,
|
|
5534
|
-
props.children ? /* @__PURE__ */ (0,
|
|
3099
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "not-prose mb-2 w-fit rounded-md border bg-fd-muted p-1.5 text-fd-muted-foreground [&_svg]:size-4", children: icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(globalLucideIcons.CircleSmall, {}) }),
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "not-prose mb-1 text-sm font-medium line-clamp-2 min-h-[2.5rem]", children: title }),
|
|
3101
|
+
validDescription ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "!my-0 text-sm text-fd-muted-foreground", children: description }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "!my-0 text-sm text-fd-muted-foreground opacity-0 select-none", children: "\xA0" }),
|
|
3102
|
+
props.children ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "text-sm text-fd-muted-foreground prose-no-margin", children: props.children }) : null
|
|
5535
3103
|
]
|
|
5536
3104
|
})
|
|
5537
3105
|
);
|
|
5538
3106
|
}
|
|
5539
|
-
return /* @__PURE__ */ (0,
|
|
3107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5540
3108
|
"div",
|
|
5541
3109
|
__spreadProps(__spreadValues({
|
|
5542
3110
|
"data-card": true,
|
|
@@ -5546,19 +3114,207 @@ function ZiaCard(_a) {
|
|
|
5546
3114
|
)
|
|
5547
3115
|
}, props), {
|
|
5548
3116
|
children: [
|
|
5549
|
-
/* @__PURE__ */ (0,
|
|
5550
|
-
/* @__PURE__ */ (0,
|
|
5551
|
-
validDescription ? /* @__PURE__ */ (0,
|
|
5552
|
-
props.children ? /* @__PURE__ */ (0,
|
|
3117
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "not-prose mb-2 w-fit rounded-md border bg-fd-muted p-1.5 text-fd-muted-foreground [&_svg]:size-4", children: icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(globalLucideIcons.CircleSmall, {}) }),
|
|
3118
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "not-prose mb-1 text-sm font-medium line-clamp-2 min-h-[2.5rem]", children: title }),
|
|
3119
|
+
validDescription ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "!my-0 text-sm text-fd-muted-foreground", children: description }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "!my-0 text-sm text-fd-muted-foreground opacity-0 select-none", children: "\xA0" }),
|
|
3120
|
+
props.children ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "text-sm text-fd-muted-foreground prose-no-margin", children: props.children }) : null
|
|
5553
3121
|
]
|
|
5554
3122
|
})
|
|
5555
3123
|
);
|
|
5556
3124
|
}
|
|
5557
3125
|
|
|
3126
|
+
// ../base-ui/src/ui/button.tsx
|
|
3127
|
+
var React35 = __toESM(require("react"), 1);
|
|
3128
|
+
|
|
3129
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3130
|
+
var React34 = __toESM(require("react"), 1);
|
|
3131
|
+
|
|
3132
|
+
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
3133
|
+
var React33 = __toESM(require("react"), 1);
|
|
3134
|
+
function setRef(ref, value) {
|
|
3135
|
+
if (typeof ref === "function") {
|
|
3136
|
+
return ref(value);
|
|
3137
|
+
} else if (ref !== null && ref !== void 0) {
|
|
3138
|
+
ref.current = value;
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
function composeRefs(...refs) {
|
|
3142
|
+
return (node) => {
|
|
3143
|
+
let hasCleanup = false;
|
|
3144
|
+
const cleanups = refs.map((ref) => {
|
|
3145
|
+
const cleanup = setRef(ref, node);
|
|
3146
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
3147
|
+
hasCleanup = true;
|
|
3148
|
+
}
|
|
3149
|
+
return cleanup;
|
|
3150
|
+
});
|
|
3151
|
+
if (hasCleanup) {
|
|
3152
|
+
return () => {
|
|
3153
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
3154
|
+
const cleanup = cleanups[i];
|
|
3155
|
+
if (typeof cleanup == "function") {
|
|
3156
|
+
cleanup();
|
|
3157
|
+
} else {
|
|
3158
|
+
setRef(refs[i], null);
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
};
|
|
3162
|
+
}
|
|
3163
|
+
};
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3167
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3168
|
+
// @__NO_SIDE_EFFECTS__
|
|
3169
|
+
function createSlot(ownerName) {
|
|
3170
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3171
|
+
const Slot2 = React34.forwardRef((props, forwardedRef) => {
|
|
3172
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3173
|
+
const childrenArray = React34.Children.toArray(children);
|
|
3174
|
+
const slottable = childrenArray.find(isSlottable);
|
|
3175
|
+
if (slottable) {
|
|
3176
|
+
const newElement = slottable.props.children;
|
|
3177
|
+
const newChildren = childrenArray.map((child) => {
|
|
3178
|
+
if (child === slottable) {
|
|
3179
|
+
if (React34.Children.count(newElement) > 1) return React34.Children.only(null);
|
|
3180
|
+
return React34.isValidElement(newElement) ? newElement.props.children : null;
|
|
3181
|
+
} else {
|
|
3182
|
+
return child;
|
|
3183
|
+
}
|
|
3184
|
+
});
|
|
3185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
|
|
3186
|
+
}
|
|
3187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
3188
|
+
});
|
|
3189
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
3190
|
+
return Slot2;
|
|
3191
|
+
}
|
|
3192
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3193
|
+
// @__NO_SIDE_EFFECTS__
|
|
3194
|
+
function createSlotClone(ownerName) {
|
|
3195
|
+
const SlotClone = React34.forwardRef((props, forwardedRef) => {
|
|
3196
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3197
|
+
if (React34.isValidElement(children)) {
|
|
3198
|
+
const childrenRef = getElementRef(children);
|
|
3199
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
3200
|
+
if (children.type !== React34.Fragment) {
|
|
3201
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3202
|
+
}
|
|
3203
|
+
return React34.cloneElement(children, props2);
|
|
3204
|
+
}
|
|
3205
|
+
return React34.Children.count(children) > 1 ? React34.Children.only(null) : null;
|
|
3206
|
+
});
|
|
3207
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3208
|
+
return SlotClone;
|
|
3209
|
+
}
|
|
3210
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3211
|
+
function isSlottable(child) {
|
|
3212
|
+
return React34.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3213
|
+
}
|
|
3214
|
+
function mergeProps(slotProps, childProps) {
|
|
3215
|
+
const overrideProps = __spreadValues({}, childProps);
|
|
3216
|
+
for (const propName in childProps) {
|
|
3217
|
+
const slotPropValue = slotProps[propName];
|
|
3218
|
+
const childPropValue = childProps[propName];
|
|
3219
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
3220
|
+
if (isHandler) {
|
|
3221
|
+
if (slotPropValue && childPropValue) {
|
|
3222
|
+
overrideProps[propName] = (...args) => {
|
|
3223
|
+
const result = childPropValue(...args);
|
|
3224
|
+
slotPropValue(...args);
|
|
3225
|
+
return result;
|
|
3226
|
+
};
|
|
3227
|
+
} else if (slotPropValue) {
|
|
3228
|
+
overrideProps[propName] = slotPropValue;
|
|
3229
|
+
}
|
|
3230
|
+
} else if (propName === "style") {
|
|
3231
|
+
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
3232
|
+
} else if (propName === "className") {
|
|
3233
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
3237
|
+
}
|
|
3238
|
+
function getElementRef(element) {
|
|
3239
|
+
var _a, _b;
|
|
3240
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3241
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3242
|
+
if (mayWarn) {
|
|
3243
|
+
return element.ref;
|
|
3244
|
+
}
|
|
3245
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3246
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3247
|
+
if (mayWarn) {
|
|
3248
|
+
return element.props.ref;
|
|
3249
|
+
}
|
|
3250
|
+
return element.props.ref || element.ref;
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
// ../base-ui/src/ui/button.tsx
|
|
3254
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
3255
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3256
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
3257
|
+
"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",
|
|
3258
|
+
{
|
|
3259
|
+
variants: {
|
|
3260
|
+
variant: {
|
|
3261
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
3262
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
3263
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
3264
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
3265
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
3266
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
3267
|
+
},
|
|
3268
|
+
size: {
|
|
3269
|
+
default: "h-10 px-4 py-2",
|
|
3270
|
+
sm: "h-9 rounded-md px-3",
|
|
3271
|
+
lg: "h-11 rounded-md px-8",
|
|
3272
|
+
icon: "h-10 w-10"
|
|
3273
|
+
}
|
|
3274
|
+
},
|
|
3275
|
+
defaultVariants: {
|
|
3276
|
+
variant: "default",
|
|
3277
|
+
size: "default"
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
);
|
|
3281
|
+
var Button = React35.forwardRef(
|
|
3282
|
+
(_a, ref) => {
|
|
3283
|
+
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
3284
|
+
const Comp = asChild ? Slot : "button";
|
|
3285
|
+
if (asChild) {
|
|
3286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3287
|
+
Comp,
|
|
3288
|
+
__spreadProps(__spreadValues({
|
|
3289
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
3290
|
+
ref,
|
|
3291
|
+
disabled: loading || props.disabled
|
|
3292
|
+
}, props), {
|
|
3293
|
+
children
|
|
3294
|
+
})
|
|
3295
|
+
);
|
|
3296
|
+
}
|
|
3297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3298
|
+
Comp,
|
|
3299
|
+
__spreadProps(__spreadValues({
|
|
3300
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
3301
|
+
ref,
|
|
3302
|
+
disabled: loading || props.disabled
|
|
3303
|
+
}, props), {
|
|
3304
|
+
children: [
|
|
3305
|
+
children,
|
|
3306
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
3307
|
+
]
|
|
3308
|
+
})
|
|
3309
|
+
);
|
|
3310
|
+
}
|
|
3311
|
+
);
|
|
3312
|
+
Button.displayName = "Button";
|
|
3313
|
+
|
|
5558
3314
|
// src/fuma/mdx/gradient-button.tsx
|
|
5559
3315
|
var import_link3 = __toESM(require("next/link"));
|
|
5560
|
-
var
|
|
5561
|
-
var
|
|
3316
|
+
var import_react37 = __toESM(require("react"));
|
|
3317
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5562
3318
|
function GradientButton({
|
|
5563
3319
|
title,
|
|
5564
3320
|
icon,
|
|
@@ -5571,7 +3327,7 @@ function GradientButton({
|
|
|
5571
3327
|
loadingText,
|
|
5572
3328
|
preventDoubleClick = true
|
|
5573
3329
|
}) {
|
|
5574
|
-
const [isLoading, setIsLoading] = (0,
|
|
3330
|
+
const [isLoading, setIsLoading] = (0, import_react37.useState)(false);
|
|
5575
3331
|
const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
|
|
5576
3332
|
const getAlignmentClass = () => {
|
|
5577
3333
|
switch (align) {
|
|
@@ -5606,15 +3362,15 @@ function GradientButton({
|
|
|
5606
3362
|
});
|
|
5607
3363
|
const isDisabled = disabled || isLoading;
|
|
5608
3364
|
const displayTitle = isLoading ? actualLoadingText : title;
|
|
5609
|
-
const displayIcon = isLoading ? /* @__PURE__ */ (0,
|
|
3365
|
+
const displayIcon = isLoading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? import_react37.default.cloneElement(icon, {
|
|
5610
3366
|
className: "h-4 w-4 text-white"
|
|
5611
|
-
}) : /* @__PURE__ */ (0,
|
|
5612
|
-
const buttonContent = onClick ? /* @__PURE__ */ (0,
|
|
5613
|
-
/* @__PURE__ */ (0,
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5615
|
-
] }) : /* @__PURE__ */ (0,
|
|
5616
|
-
/* @__PURE__ */ (0,
|
|
5617
|
-
/* @__PURE__ */ (0,
|
|
3367
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
|
|
3368
|
+
const buttonContent = onClick ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
3369
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: displayIcon }),
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "ml-1", children: displayTitle })
|
|
3371
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
3372
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: displayTitle }),
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "ml-1", children: displayIcon })
|
|
5618
3374
|
] });
|
|
5619
3375
|
const buttonClassName = `
|
|
5620
3376
|
bg-gradient-to-r
|
|
@@ -5628,9 +3384,9 @@ function GradientButton({
|
|
|
5628
3384
|
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
5629
3385
|
${className}
|
|
5630
3386
|
`;
|
|
5631
|
-
return /* @__PURE__ */ (0,
|
|
3387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
|
|
5632
3388
|
// for click
|
|
5633
|
-
/* @__PURE__ */ (0,
|
|
3389
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5634
3390
|
Button,
|
|
5635
3391
|
{
|
|
5636
3392
|
size: "lg",
|
|
@@ -5642,14 +3398,14 @@ function GradientButton({
|
|
|
5642
3398
|
)
|
|
5643
3399
|
) : (
|
|
5644
3400
|
// for Link
|
|
5645
|
-
/* @__PURE__ */ (0,
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5646
3402
|
Button,
|
|
5647
3403
|
{
|
|
5648
3404
|
asChild: true,
|
|
5649
3405
|
size: "lg",
|
|
5650
3406
|
className: buttonClassName,
|
|
5651
3407
|
disabled: isDisabled,
|
|
5652
|
-
children: /* @__PURE__ */ (0,
|
|
3408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5653
3409
|
import_link3.default,
|
|
5654
3410
|
__spreadProps(__spreadValues({
|
|
5655
3411
|
href: href || "#",
|
|
@@ -5665,14 +3421,14 @@ function GradientButton({
|
|
|
5665
3421
|
}
|
|
5666
3422
|
|
|
5667
3423
|
// src/fuma/mdx/toc-base.tsx
|
|
5668
|
-
var
|
|
3424
|
+
var import_react38 = require("react");
|
|
5669
3425
|
var import_navigation = require("next/navigation");
|
|
5670
3426
|
var import_use_copy_button = require("fumadocs-ui/utils/use-copy-button");
|
|
5671
3427
|
var import_link4 = __toESM(require("fumadocs-core/link"));
|
|
5672
|
-
var
|
|
3428
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5673
3429
|
var cache = /* @__PURE__ */ new Map();
|
|
5674
3430
|
function LLMCopyButton({ llmApiUrl, sourceKey } = {}) {
|
|
5675
|
-
const [isLoading, setLoading] = (0,
|
|
3431
|
+
const [isLoading, setLoading] = (0, import_react38.useState)(false);
|
|
5676
3432
|
const params = (0, import_navigation.useParams)();
|
|
5677
3433
|
const locale = params.locale;
|
|
5678
3434
|
const slug = params.slug;
|
|
@@ -5707,7 +3463,7 @@ function LLMCopyButton({ llmApiUrl, sourceKey } = {}) {
|
|
|
5707
3463
|
setLoading(false);
|
|
5708
3464
|
}
|
|
5709
3465
|
}));
|
|
5710
|
-
return /* @__PURE__ */ (0,
|
|
3466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5711
3467
|
Button,
|
|
5712
3468
|
{
|
|
5713
3469
|
variant: "ghost",
|
|
@@ -5715,32 +3471,32 @@ function LLMCopyButton({ llmApiUrl, sourceKey } = {}) {
|
|
|
5715
3471
|
loading: isLoading,
|
|
5716
3472
|
className: "justify-start px-0 text-stone-600 hover:text-stone-500 dark:text-stone-400 dark:hover:text-stone-300",
|
|
5717
3473
|
onClick,
|
|
5718
|
-
children: checked ? /* @__PURE__ */ (0,
|
|
5719
|
-
/* @__PURE__ */ (0,
|
|
3474
|
+
children: checked ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
3475
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.Check, {}),
|
|
5720
3476
|
"Copied!"
|
|
5721
|
-
] }) : /* @__PURE__ */ (0,
|
|
5722
|
-
/* @__PURE__ */ (0,
|
|
3477
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
3478
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.Markdown, {}),
|
|
5723
3479
|
"Copy page as Markdown"
|
|
5724
3480
|
] })
|
|
5725
3481
|
}
|
|
5726
3482
|
);
|
|
5727
3483
|
}
|
|
5728
3484
|
function EditOnGitHub({ url }) {
|
|
5729
|
-
return /* @__PURE__ */ (0,
|
|
3485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5730
3486
|
import_link4.default,
|
|
5731
3487
|
{
|
|
5732
3488
|
className: "flex items-center gap-x-2 text-stone-600 hover:text-stone-500 dark:text-stone-400 dark:hover:text-stone-300 text-sm",
|
|
5733
3489
|
href: url,
|
|
5734
3490
|
children: [
|
|
5735
|
-
/* @__PURE__ */ (0,
|
|
3491
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.GitHub, {}),
|
|
5736
3492
|
"Edit this page on GitHub"
|
|
5737
3493
|
]
|
|
5738
3494
|
}
|
|
5739
3495
|
);
|
|
5740
3496
|
}
|
|
5741
3497
|
function LastUpdatedDate({ date }) {
|
|
5742
|
-
return /* @__PURE__ */ (0,
|
|
5743
|
-
/* @__PURE__ */ (0,
|
|
3498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-x-2 text-stone-600 dark:text-stone-400 text-sm", children: [
|
|
3499
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.LastUpdated, {}),
|
|
5744
3500
|
"Lastest on ",
|
|
5745
3501
|
date ? date : "Ages ago"
|
|
5746
3502
|
] });
|
|
@@ -5751,8 +3507,8 @@ var import_next_intl = require("next-intl");
|
|
|
5751
3507
|
|
|
5752
3508
|
// src/fuma/mdx/banner.tsx
|
|
5753
3509
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
5754
|
-
var
|
|
5755
|
-
var
|
|
3510
|
+
var import_react39 = require("react");
|
|
3511
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5756
3512
|
var buttonVariants2 = (0, import_class_variance_authority2.cva)(
|
|
5757
3513
|
"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",
|
|
5758
3514
|
{
|
|
@@ -5783,15 +3539,15 @@ function Banner(_a) {
|
|
|
5783
3539
|
"changeLayout",
|
|
5784
3540
|
"height"
|
|
5785
3541
|
]);
|
|
5786
|
-
const [open, setOpen] = (0,
|
|
3542
|
+
const [open, setOpen] = (0, import_react39.useState)(true);
|
|
5787
3543
|
const globalKey = id ? `nd-banner-${id}` : null;
|
|
5788
3544
|
const bannerHeight = `${height}rem`;
|
|
5789
3545
|
const headerStartHeight = `${height + 5.5}rem`;
|
|
5790
|
-
(0,
|
|
3546
|
+
(0, import_react39.useEffect)(() => {
|
|
5791
3547
|
if (globalKey) setOpen(localStorage.getItem(globalKey) !== "true");
|
|
5792
3548
|
}, [globalKey]);
|
|
5793
3549
|
if (!open) return null;
|
|
5794
|
-
return /* @__PURE__ */ (0,
|
|
3550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5795
3551
|
"div",
|
|
5796
3552
|
__spreadProps(__spreadValues({
|
|
5797
3553
|
id
|
|
@@ -5816,8 +3572,8 @@ function Banner(_a) {
|
|
|
5816
3572
|
borderRadius: 0
|
|
5817
3573
|
},
|
|
5818
3574
|
children: [
|
|
5819
|
-
globalKey ? /* @__PURE__ */ (0,
|
|
5820
|
-
globalKey ? /* @__PURE__ */ (0,
|
|
3575
|
+
globalKey ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("style", { children: `.${globalKey} #${id} { display: none; }` }) : null,
|
|
3576
|
+
globalKey ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5821
3577
|
"script",
|
|
5822
3578
|
{
|
|
5823
3579
|
dangerouslySetInnerHTML: {
|
|
@@ -5827,7 +3583,7 @@ function Banner(_a) {
|
|
|
5827
3583
|
) : null,
|
|
5828
3584
|
variant === "rainbow" ? rainbowLayer : null,
|
|
5829
3585
|
props.children,
|
|
5830
|
-
id ? /* @__PURE__ */ (0,
|
|
3586
|
+
id ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5831
3587
|
"button",
|
|
5832
3588
|
{
|
|
5833
3589
|
type: "button",
|
|
@@ -5843,7 +3599,7 @@ function Banner(_a) {
|
|
|
5843
3599
|
size: "icon"
|
|
5844
3600
|
})
|
|
5845
3601
|
),
|
|
5846
|
-
children: /* @__PURE__ */ (0,
|
|
3602
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(globalLucideIcons.X, {})
|
|
5847
3603
|
}
|
|
5848
3604
|
) : null
|
|
5849
3605
|
]
|
|
@@ -5851,8 +3607,8 @@ function Banner(_a) {
|
|
|
5851
3607
|
);
|
|
5852
3608
|
}
|
|
5853
3609
|
var maskImage = "linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)";
|
|
5854
|
-
var rainbowLayer = /* @__PURE__ */ (0,
|
|
5855
|
-
/* @__PURE__ */ (0,
|
|
3610
|
+
var rainbowLayer = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3611
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5856
3612
|
"div",
|
|
5857
3613
|
{
|
|
5858
3614
|
className: "absolute inset-0 z-[-1]",
|
|
@@ -5871,7 +3627,7 @@ var rainbowLayer = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_run
|
|
|
5871
3627
|
}
|
|
5872
3628
|
}
|
|
5873
3629
|
),
|
|
5874
|
-
/* @__PURE__ */ (0,
|
|
3630
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5875
3631
|
"div",
|
|
5876
3632
|
{
|
|
5877
3633
|
className: "absolute inset-0 z-[-1]",
|
|
@@ -5889,19 +3645,19 @@ var rainbowLayer = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_run
|
|
|
5889
3645
|
}
|
|
5890
3646
|
}
|
|
5891
3647
|
),
|
|
5892
|
-
/* @__PURE__ */ (0,
|
|
3648
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("style", { children: `@keyframes fd-moving-banner {
|
|
5893
3649
|
from { background-position: 0% 0; }
|
|
5894
3650
|
to { background-position: 100% 0; }
|
|
5895
3651
|
}` })
|
|
5896
3652
|
] });
|
|
5897
3653
|
|
|
5898
3654
|
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
5899
|
-
var
|
|
3655
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5900
3656
|
function FumaBannerSuit({ showBanner }) {
|
|
5901
3657
|
const t = (0, import_next_intl.useTranslations)("home");
|
|
5902
3658
|
const heightValue = showBanner ? 3 : 0.5;
|
|
5903
3659
|
const height = `${heightValue}rem`;
|
|
5904
|
-
return /* @__PURE__ */ (0,
|
|
3660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: showBanner ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Banner, { variant: "rainbow", changeLayout: true, height: heightValue, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xl", children: t("banner") }) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5905
3661
|
"div",
|
|
5906
3662
|
{
|
|
5907
3663
|
className: "fixed top-0 left-0 w-screen z-[1001] m-0 rounded-none bg-neutral-100 dark:bg-neutral-900",
|
|
@@ -5915,19 +3671,19 @@ function FumaBannerSuit({ showBanner }) {
|
|
|
5915
3671
|
}
|
|
5916
3672
|
|
|
5917
3673
|
// src/fuma/mdx/fuma-github-info.tsx
|
|
5918
|
-
var
|
|
5919
|
-
var
|
|
3674
|
+
var import_react40 = require("react");
|
|
3675
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5920
3676
|
function GitHubInfoSkeleton({ owner, repo, className }) {
|
|
5921
|
-
return /* @__PURE__ */ (0,
|
|
5922
|
-
/* @__PURE__ */ (0,
|
|
5923
|
-
/* @__PURE__ */ (0,
|
|
5924
|
-
/* @__PURE__ */ (0,
|
|
3677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: `flex flex-col gap-1.5 p-2 rounded-lg text-sm text-fd-foreground/80 lg:flex-row lg:items-center animate-pulse ${className}`, children: [
|
|
3678
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3679
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "size-3.5 bg-fd-muted rounded" }),
|
|
3680
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-4 bg-fd-muted rounded w-20" })
|
|
5925
3681
|
] }),
|
|
5926
|
-
/* @__PURE__ */ (0,
|
|
3682
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-3 bg-fd-muted rounded w-8" })
|
|
5927
3683
|
] });
|
|
5928
3684
|
}
|
|
5929
3685
|
function GitHubInfoFallback({ owner, repo, className }) {
|
|
5930
|
-
return /* @__PURE__ */ (0,
|
|
3686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
5931
3687
|
"a",
|
|
5932
3688
|
{
|
|
5933
3689
|
href: `https://github.com/${owner}/${repo}`,
|
|
@@ -5935,17 +3691,17 @@ function GitHubInfoFallback({ owner, repo, className }) {
|
|
|
5935
3691
|
target: "_blank",
|
|
5936
3692
|
className: `flex flex-col gap-1.5 p-2 rounded-lg text-sm text-fd-foreground/80 transition-colors lg:flex-row lg:items-center hover:text-fd-accent-foreground hover:bg-fd-accent ${className}`,
|
|
5937
3693
|
children: [
|
|
5938
|
-
/* @__PURE__ */ (0,
|
|
5939
|
-
/* @__PURE__ */ (0,
|
|
5940
|
-
/* @__PURE__ */ (0,
|
|
5941
|
-
/* @__PURE__ */ (0,
|
|
3694
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
|
|
3695
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
|
|
3696
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("title", { children: "GitHub" }),
|
|
3697
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
|
|
5942
3698
|
] }),
|
|
5943
3699
|
owner,
|
|
5944
3700
|
"/",
|
|
5945
3701
|
repo
|
|
5946
3702
|
] }),
|
|
5947
|
-
/* @__PURE__ */ (0,
|
|
5948
|
-
/* @__PURE__ */ (0,
|
|
3703
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.ExternalLink, { className: "size-3" }),
|
|
5949
3705
|
"GitHub"
|
|
5950
3706
|
] })
|
|
5951
3707
|
]
|
|
@@ -5959,7 +3715,7 @@ function GitHubInfoSuccess({
|
|
|
5959
3715
|
className
|
|
5960
3716
|
}) {
|
|
5961
3717
|
const humanizedStars = humanizeNumber(stars);
|
|
5962
|
-
return /* @__PURE__ */ (0,
|
|
3718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
5963
3719
|
"a",
|
|
5964
3720
|
{
|
|
5965
3721
|
href: `https://github.com/${owner}/${repo}`,
|
|
@@ -5967,17 +3723,17 @@ function GitHubInfoSuccess({
|
|
|
5967
3723
|
target: "_blank",
|
|
5968
3724
|
className: `flex flex-col gap-1.5 p-2 rounded-lg text-sm text-fd-foreground/80 transition-colors lg:flex-row lg:items-center hover:text-fd-accent-foreground hover:bg-fd-accent ${className}`,
|
|
5969
3725
|
children: [
|
|
5970
|
-
/* @__PURE__ */ (0,
|
|
5971
|
-
/* @__PURE__ */ (0,
|
|
5972
|
-
/* @__PURE__ */ (0,
|
|
5973
|
-
/* @__PURE__ */ (0,
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex items-center gap-2 truncate", children: [
|
|
3727
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { fill: "currentColor", viewBox: "0 0 24 24", className: "size-3.5", children: [
|
|
3728
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("title", { children: "GitHub" }),
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })
|
|
5974
3730
|
] }),
|
|
5975
3731
|
owner,
|
|
5976
3732
|
"/",
|
|
5977
3733
|
repo
|
|
5978
3734
|
] }),
|
|
5979
|
-
/* @__PURE__ */ (0,
|
|
5980
|
-
/* @__PURE__ */ (0,
|
|
3735
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex text-xs items-center gap-1 text-fd-muted-foreground", children: [
|
|
3736
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.Star, { className: "size-3" }),
|
|
5981
3737
|
humanizedStars
|
|
5982
3738
|
] })
|
|
5983
3739
|
]
|
|
@@ -5999,10 +3755,10 @@ function humanizeNumber(num) {
|
|
|
5999
3755
|
return num.toString();
|
|
6000
3756
|
}
|
|
6001
3757
|
function FumaGithubInfo({ owner, repo, token, className }) {
|
|
6002
|
-
const [data, setData] = (0,
|
|
6003
|
-
const [loading, setLoading] = (0,
|
|
6004
|
-
const [error, setError] = (0,
|
|
6005
|
-
(0,
|
|
3758
|
+
const [data, setData] = (0, import_react40.useState)(null);
|
|
3759
|
+
const [loading, setLoading] = (0, import_react40.useState)(true);
|
|
3760
|
+
const [error, setError] = (0, import_react40.useState)(null);
|
|
3761
|
+
(0, import_react40.useEffect)(() => {
|
|
6006
3762
|
const fetchRepoData = () => __async(null, null, function* () {
|
|
6007
3763
|
try {
|
|
6008
3764
|
setLoading(true);
|
|
@@ -6046,12 +3802,12 @@ function FumaGithubInfo({ owner, repo, token, className }) {
|
|
|
6046
3802
|
fetchRepoData();
|
|
6047
3803
|
}, [owner, repo, token]);
|
|
6048
3804
|
if (loading) {
|
|
6049
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GitHubInfoSkeleton, { owner, repo, className });
|
|
6050
3806
|
}
|
|
6051
3807
|
if (error || !data) {
|
|
6052
|
-
return /* @__PURE__ */ (0,
|
|
3808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(GitHubInfoFallback, { owner, repo, className });
|
|
6053
3809
|
}
|
|
6054
|
-
return /* @__PURE__ */ (0,
|
|
3810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6055
3811
|
GitHubInfoSuccess,
|
|
6056
3812
|
{
|
|
6057
3813
|
owner,
|
|
@@ -6064,7 +3820,7 @@ function FumaGithubInfo({ owner, repo, token, className }) {
|
|
|
6064
3820
|
|
|
6065
3821
|
// src/fuma/mdx/site-x.tsx
|
|
6066
3822
|
var import_next_intl2 = require("next-intl");
|
|
6067
|
-
var
|
|
3823
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6068
3824
|
function SiteX(_a) {
|
|
6069
3825
|
var _b = _a, { type, namespace, tKey, className } = _b, props = __objRest(_b, ["type", "namespace", "tKey", "className"]);
|
|
6070
3826
|
let ns = namespace;
|
|
@@ -6078,7 +3834,7 @@ function SiteX(_a) {
|
|
|
6078
3834
|
const t = (0, import_next_intl2.useTranslations)(ns);
|
|
6079
3835
|
const text = t(key, { defaultValue: type === "site" ? "Site----" : "----@example.com" });
|
|
6080
3836
|
if (type === "site") {
|
|
6081
|
-
return /* @__PURE__ */ (0,
|
|
3837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6082
3838
|
"strong",
|
|
6083
3839
|
__spreadProps(__spreadValues({}, props), {
|
|
6084
3840
|
className: cn(
|
|
@@ -6090,7 +3846,7 @@ function SiteX(_a) {
|
|
|
6090
3846
|
);
|
|
6091
3847
|
}
|
|
6092
3848
|
if (type === "email") {
|
|
6093
|
-
return /* @__PURE__ */ (0,
|
|
3849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6094
3850
|
"a",
|
|
6095
3851
|
__spreadProps(__spreadValues({}, props), {
|
|
6096
3852
|
href: `mailto:${text}`,
|
|
@@ -6106,16 +3862,16 @@ function SiteX(_a) {
|
|
|
6106
3862
|
}
|
|
6107
3863
|
|
|
6108
3864
|
// src/fuma/mdx/zia-file.tsx
|
|
6109
|
-
var
|
|
3865
|
+
var import_react41 = require("react");
|
|
6110
3866
|
var import_collapsible = require("fumadocs-ui/components/ui/collapsible");
|
|
6111
3867
|
var import_link5 = __toESM(require("next/link"));
|
|
6112
|
-
var
|
|
3868
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6113
3869
|
var itemVariants = "flex flex-row items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4";
|
|
6114
3870
|
var anotionClass = "ms-2 px-2 py-0.5 rounded text-xs font-semibold bg-fd-accent/80 text-fd-accent-foreground dark:bg-white/20 dark:text-white";
|
|
6115
3871
|
function ZiaFile(_a) {
|
|
6116
3872
|
var _b = _a, {
|
|
6117
3873
|
name,
|
|
6118
|
-
icon = /* @__PURE__ */ (0,
|
|
3874
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.File, {}),
|
|
6119
3875
|
className,
|
|
6120
3876
|
anotion,
|
|
6121
3877
|
href
|
|
@@ -6129,16 +3885,16 @@ function ZiaFile(_a) {
|
|
|
6129
3885
|
const validHref = typeof href === "string" && href.trim() !== "";
|
|
6130
3886
|
const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
|
|
6131
3887
|
if (validHref) {
|
|
6132
|
-
return /* @__PURE__ */ (0,
|
|
3888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_link5.default, { href, className: cn(itemVariants, className), children: [
|
|
6133
3889
|
icon,
|
|
6134
|
-
/* @__PURE__ */ (0,
|
|
6135
|
-
validAnotion && /* @__PURE__ */ (0,
|
|
3890
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
|
|
3891
|
+
validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
|
|
6136
3892
|
] });
|
|
6137
3893
|
}
|
|
6138
|
-
return /* @__PURE__ */ (0,
|
|
3894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", __spreadProps(__spreadValues({ className: cn(itemVariants, className) }, rest), { children: [
|
|
6139
3895
|
icon,
|
|
6140
|
-
/* @__PURE__ */ (0,
|
|
6141
|
-
validAnotion && /* @__PURE__ */ (0,
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
|
|
3897
|
+
validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
|
|
6142
3898
|
] }));
|
|
6143
3899
|
}
|
|
6144
3900
|
function ZiaFolder(_a) {
|
|
@@ -6155,26 +3911,26 @@ function ZiaFolder(_a) {
|
|
|
6155
3911
|
"className",
|
|
6156
3912
|
"children"
|
|
6157
3913
|
]);
|
|
6158
|
-
const [open, setOpen] = (0,
|
|
3914
|
+
const [open, setOpen] = (0, import_react41.useState)(defaultOpen);
|
|
6159
3915
|
const validAnotion = typeof anotion === "string" && anotion.trim() !== "";
|
|
6160
|
-
return /* @__PURE__ */ (0,
|
|
6161
|
-
/* @__PURE__ */ (0,
|
|
6162
|
-
open ? /* @__PURE__ */ (0,
|
|
6163
|
-
/* @__PURE__ */ (0,
|
|
6164
|
-
validAnotion && /* @__PURE__ */ (0,
|
|
3916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_collapsible.Collapsible, __spreadProps(__spreadValues({ open, onOpenChange: setOpen }, props), { children: [
|
|
3917
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_collapsible.CollapsibleTrigger, { className: cn(itemVariants, className, "w-full"), children: [
|
|
3918
|
+
open ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.FolderOpen, {}) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.Folder, {}),
|
|
3919
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: name }),
|
|
3920
|
+
validAnotion && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: anotionClass, children: anotion })
|
|
6165
3921
|
] }),
|
|
6166
|
-
/* @__PURE__ */ (0,
|
|
3922
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_collapsible.CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "ms-2 flex flex-col border-l ps-2", children }) })
|
|
6167
3923
|
] }));
|
|
6168
3924
|
}
|
|
6169
3925
|
|
|
6170
3926
|
// src/fuma/mdx/toc-footer-wrapper.tsx
|
|
6171
|
-
var
|
|
3927
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6172
3928
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
6173
3929
|
const showEdit = githubBaseUrl && editPath;
|
|
6174
|
-
return /* @__PURE__ */ (0,
|
|
6175
|
-
/* @__PURE__ */ (0,
|
|
3930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
|
|
3931
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LastUpdatedDate, { date: lastModified }),
|
|
6176
3932
|
copyButtonComponent,
|
|
6177
|
-
showEdit && /* @__PURE__ */ (0,
|
|
3933
|
+
showEdit && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
|
|
6178
3934
|
] });
|
|
6179
3935
|
}
|
|
6180
3936
|
// Annotate the CommonJS export names for ESM import in node:
|