unplugin-docubook 1.1.3 → 1.2.1
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/README.md +187 -212
- package/dist/components/index.cjs +1643 -422
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +1590 -422
- package/dist/components/index.js.map +1 -1
- package/package.json +3 -2
|
@@ -13,26 +13,26 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
13
13
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
14
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
15
|
var __spreadValues = (a, b) => {
|
|
16
|
-
for (var
|
|
17
|
-
if (__hasOwnProp.call(b,
|
|
18
|
-
__defNormalProp(a,
|
|
16
|
+
for (var prop17 in b || (b = {}))
|
|
17
|
+
if (__hasOwnProp.call(b, prop17))
|
|
18
|
+
__defNormalProp(a, prop17, b[prop17]);
|
|
19
19
|
if (__getOwnPropSymbols)
|
|
20
|
-
for (var
|
|
21
|
-
if (__propIsEnum.call(b,
|
|
22
|
-
__defNormalProp(a,
|
|
20
|
+
for (var prop17 of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop17))
|
|
22
|
+
__defNormalProp(a, prop17, b[prop17]);
|
|
23
23
|
}
|
|
24
24
|
return a;
|
|
25
25
|
};
|
|
26
26
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
27
|
var __objRest = (source, exclude) => {
|
|
28
28
|
var target = {};
|
|
29
|
-
for (var
|
|
30
|
-
if (__hasOwnProp.call(source,
|
|
31
|
-
target[
|
|
29
|
+
for (var prop17 in source)
|
|
30
|
+
if (__hasOwnProp.call(source, prop17) && exclude.indexOf(prop17) < 0)
|
|
31
|
+
target[prop17] = source[prop17];
|
|
32
32
|
if (source != null && __getOwnPropSymbols)
|
|
33
|
-
for (var
|
|
34
|
-
if (exclude.indexOf(
|
|
35
|
-
target[
|
|
33
|
+
for (var prop17 of __getOwnPropSymbols(source)) {
|
|
34
|
+
if (exclude.indexOf(prop17) < 0 && __propIsEnum.call(source, prop17))
|
|
35
|
+
target[prop17] = source[prop17];
|
|
36
36
|
}
|
|
37
37
|
return target;
|
|
38
38
|
};
|
|
@@ -125,6 +125,59 @@ __export(index_exports, {
|
|
|
125
125
|
Separator: () => Separator5,
|
|
126
126
|
Stepper: () => Stepper,
|
|
127
127
|
StepperItem: () => StepperItem,
|
|
128
|
+
SvelteAccordion: () => Accordion3,
|
|
129
|
+
SvelteAccordionContent: () => import_accordion4.default,
|
|
130
|
+
SvelteAccordionGroup: () => AccordionGroup2,
|
|
131
|
+
SvelteAccordionItem: () => import_accordion2.default,
|
|
132
|
+
SvelteAccordionRoot: () => import_accordion.default,
|
|
133
|
+
SvelteAccordionTrigger: () => import_accordion3.default,
|
|
134
|
+
SvelteButton: () => Button2,
|
|
135
|
+
SvelteCard: () => Card2,
|
|
136
|
+
SvelteCardGroup: () => CardGroup2,
|
|
137
|
+
SvelteCheckbox: () => import_checkbox.default,
|
|
138
|
+
SvelteCollapsible: () => import_collapsible.default,
|
|
139
|
+
SvelteCollapsibleContent: () => import_collapsible3.default,
|
|
140
|
+
SvelteCollapsibleTrigger: () => import_collapsible2.default,
|
|
141
|
+
SvelteCopy: () => Copy2,
|
|
142
|
+
SvelteDialog: () => import_dialog.default,
|
|
143
|
+
SvelteDialogContent: () => import_dialog3.default,
|
|
144
|
+
SvelteDialogDescription: () => import_dialog6.default,
|
|
145
|
+
SvelteDialogFooter: () => import_dialog7.default,
|
|
146
|
+
SvelteDialogHeader: () => import_dialog4.default,
|
|
147
|
+
SvelteDialogTitle: () => import_dialog5.default,
|
|
148
|
+
SvelteDialogTrigger: () => import_dialog2.default,
|
|
149
|
+
SvelteDropdownMenu: () => import_dropdown_menu.default,
|
|
150
|
+
SvelteDropdownMenuContent: () => import_dropdown_menu3.default,
|
|
151
|
+
SvelteDropdownMenuItem: () => import_dropdown_menu4.default,
|
|
152
|
+
SvelteDropdownMenuSeparator: () => import_dropdown_menu5.default,
|
|
153
|
+
SvelteDropdownMenuTrigger: () => import_dropdown_menu2.default,
|
|
154
|
+
SvelteFileTree: () => FileTree,
|
|
155
|
+
SvelteImage: () => Image,
|
|
156
|
+
SvelteKbd: () => Kbd2,
|
|
157
|
+
SvelteLink: () => Link,
|
|
158
|
+
SvelteNote: () => Note2,
|
|
159
|
+
SveltePre: () => Pre2,
|
|
160
|
+
SvelteRadioGroup: () => import_radio_group.default,
|
|
161
|
+
SvelteRadioGroupItem: () => import_radio_group2.default,
|
|
162
|
+
SvelteRelease: () => Release2,
|
|
163
|
+
SvelteSelect: () => import_select.default,
|
|
164
|
+
SvelteSelectContent: () => import_select3.default,
|
|
165
|
+
SvelteSelectItem: () => import_select4.default,
|
|
166
|
+
SvelteSelectTrigger: () => import_select2.default,
|
|
167
|
+
SvelteSelectValue: () => import_select5.default,
|
|
168
|
+
SvelteSeparator: () => import_separator.default,
|
|
169
|
+
SvelteStepper: () => Stepper2,
|
|
170
|
+
SvelteSwitch: () => import_switch.default,
|
|
171
|
+
SvelteTabs: () => import_tabs.default,
|
|
172
|
+
SvelteTabsContent: () => import_tabs4.default,
|
|
173
|
+
SvelteTabsList: () => import_tabs2.default,
|
|
174
|
+
SvelteTabsTrigger: () => import_tabs3.default,
|
|
175
|
+
SvelteTooltip: () => Tooltip4,
|
|
176
|
+
SvelteTooltipContent: () => import_tooltip3.default,
|
|
177
|
+
SvelteTooltipProvider: () => import_tooltip4.default,
|
|
178
|
+
SvelteTooltipRoot: () => import_tooltip.default,
|
|
179
|
+
SvelteTooltipTrigger: () => import_tooltip2.default,
|
|
180
|
+
SvelteYoutube: () => Youtube2,
|
|
128
181
|
Switch: () => Switch2,
|
|
129
182
|
Tabs: () => Tabs2,
|
|
130
183
|
TabsContent: () => TabsContent2,
|
|
@@ -659,12 +712,12 @@ function createSlot(ownerName) {
|
|
|
659
712
|
const slottable = childrenArray.find(isSlottable);
|
|
660
713
|
if (slottable) {
|
|
661
714
|
const newElement = slottable.props.children;
|
|
662
|
-
const newChildren = childrenArray.map((
|
|
663
|
-
if (
|
|
715
|
+
const newChildren = childrenArray.map((child16) => {
|
|
716
|
+
if (child16 === slottable) {
|
|
664
717
|
if (React4.Children.count(newElement) > 1) return React4.Children.only(null);
|
|
665
718
|
return React4.isValidElement(newElement) ? newElement.props.children : null;
|
|
666
719
|
} else {
|
|
667
|
-
return
|
|
720
|
+
return child16;
|
|
668
721
|
}
|
|
669
722
|
});
|
|
670
723
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React4.isValidElement(newElement) ? React4.cloneElement(newElement, void 0, newChildren) : null }));
|
|
@@ -701,8 +754,8 @@ function createSlottable(ownerName) {
|
|
|
701
754
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
702
755
|
return Slottable2;
|
|
703
756
|
}
|
|
704
|
-
function isSlottable(
|
|
705
|
-
return React4.isValidElement(
|
|
757
|
+
function isSlottable(child16) {
|
|
758
|
+
return React4.isValidElement(child16) && typeof child16.type === "function" && "__radixId" in child16.type && child16.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
706
759
|
}
|
|
707
760
|
function mergeProps(slotProps, childProps) {
|
|
708
761
|
const overrideProps = __spreadValues({}, childProps);
|
|
@@ -813,10 +866,10 @@ function createCollection(name) {
|
|
|
813
866
|
// node_modules/@radix-ui/primitive/dist/index.mjs
|
|
814
867
|
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
815
868
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
816
|
-
return function handleEvent(
|
|
817
|
-
originalEventHandler == null ? void 0 : originalEventHandler(
|
|
818
|
-
if (checkForDefaultPrevented === false || !
|
|
819
|
-
return ourEventHandler == null ? void 0 : ourEventHandler(
|
|
869
|
+
return function handleEvent(event2) {
|
|
870
|
+
originalEventHandler == null ? void 0 : originalEventHandler(event2);
|
|
871
|
+
if (checkForDefaultPrevented === false || !event2.defaultPrevented) {
|
|
872
|
+
return ourEventHandler == null ? void 0 : ourEventHandler(event2);
|
|
820
873
|
}
|
|
821
874
|
};
|
|
822
875
|
}
|
|
@@ -833,7 +886,7 @@ var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? Rea
|
|
|
833
886
|
var React23 = __toESM(require("react"), 1);
|
|
834
887
|
var useInsertionEffect = React7[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
835
888
|
function useControllableState({
|
|
836
|
-
prop,
|
|
889
|
+
prop: prop17,
|
|
837
890
|
defaultProp,
|
|
838
891
|
onChange = () => {
|
|
839
892
|
},
|
|
@@ -843,10 +896,10 @@ function useControllableState({
|
|
|
843
896
|
defaultProp,
|
|
844
897
|
onChange
|
|
845
898
|
});
|
|
846
|
-
const isControlled =
|
|
847
|
-
const value = isControlled ?
|
|
899
|
+
const isControlled = prop17 !== void 0;
|
|
900
|
+
const value = isControlled ? prop17 : uncontrolledProp;
|
|
848
901
|
if (true) {
|
|
849
|
-
const isControlledRef = React7.useRef(
|
|
902
|
+
const isControlledRef = React7.useRef(prop17 !== void 0);
|
|
850
903
|
React7.useEffect(() => {
|
|
851
904
|
const wasControlled = isControlledRef.current;
|
|
852
905
|
if (wasControlled !== isControlled) {
|
|
@@ -863,15 +916,15 @@ function useControllableState({
|
|
|
863
916
|
(nextValue) => {
|
|
864
917
|
var _a;
|
|
865
918
|
if (isControlled) {
|
|
866
|
-
const value2 = isFunction(nextValue) ? nextValue(
|
|
867
|
-
if (value2 !==
|
|
919
|
+
const value2 = isFunction(nextValue) ? nextValue(prop17) : nextValue;
|
|
920
|
+
if (value2 !== prop17) {
|
|
868
921
|
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value2);
|
|
869
922
|
}
|
|
870
923
|
} else {
|
|
871
924
|
setUncontrolledProp(nextValue);
|
|
872
925
|
}
|
|
873
926
|
},
|
|
874
|
-
[isControlled,
|
|
927
|
+
[isControlled, prop17, setUncontrolledProp, onChangeRef]
|
|
875
928
|
);
|
|
876
929
|
return [value, setValue];
|
|
877
930
|
}
|
|
@@ -934,8 +987,8 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
934
987
|
Node2.displayName = `Primitive.${node}`;
|
|
935
988
|
return __spreadProps(__spreadValues({}, primitive), { [node]: Node2 });
|
|
936
989
|
}, {});
|
|
937
|
-
function dispatchDiscreteCustomEvent(target,
|
|
938
|
-
if (target) ReactDOM.flushSync(() => target.dispatchEvent(
|
|
990
|
+
function dispatchDiscreteCustomEvent(target, event2) {
|
|
991
|
+
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event2));
|
|
939
992
|
}
|
|
940
993
|
|
|
941
994
|
// node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
@@ -945,18 +998,18 @@ var React11 = __toESM(require("react"), 1);
|
|
|
945
998
|
var React24 = __toESM(require("react"), 1);
|
|
946
999
|
var React9 = __toESM(require("react"), 1);
|
|
947
1000
|
function useStateMachine(initialState, machine) {
|
|
948
|
-
return React9.useReducer((
|
|
949
|
-
const nextState = machine[
|
|
950
|
-
return nextState != null ? nextState :
|
|
1001
|
+
return React9.useReducer((state4, event2) => {
|
|
1002
|
+
const nextState = machine[state4][event2];
|
|
1003
|
+
return nextState != null ? nextState : state4;
|
|
951
1004
|
}, initialState);
|
|
952
1005
|
}
|
|
953
1006
|
var Presence = (props) => {
|
|
954
1007
|
const { present, children } = props;
|
|
955
1008
|
const presence = usePresence(present);
|
|
956
|
-
const
|
|
957
|
-
const ref = useComposedRefs(presence.ref, getElementRef2(
|
|
1009
|
+
const child16 = typeof children === "function" ? children({ present: presence.isPresent }) : React24.Children.only(children);
|
|
1010
|
+
const ref = useComposedRefs(presence.ref, getElementRef2(child16));
|
|
958
1011
|
const forceMount = typeof children === "function";
|
|
959
|
-
return forceMount || presence.isPresent ? React24.cloneElement(
|
|
1012
|
+
return forceMount || presence.isPresent ? React24.cloneElement(child16, { ref }) : null;
|
|
960
1013
|
};
|
|
961
1014
|
Presence.displayName = "Presence";
|
|
962
1015
|
function usePresence(present) {
|
|
@@ -965,7 +1018,7 @@ function usePresence(present) {
|
|
|
965
1018
|
const prevPresentRef = React24.useRef(present);
|
|
966
1019
|
const prevAnimationNameRef = React24.useRef("none");
|
|
967
1020
|
const initialState = present ? "mounted" : "unmounted";
|
|
968
|
-
const [
|
|
1021
|
+
const [state4, send] = useStateMachine(initialState, {
|
|
969
1022
|
mounted: {
|
|
970
1023
|
UNMOUNT: "unmounted",
|
|
971
1024
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -980,8 +1033,8 @@ function usePresence(present) {
|
|
|
980
1033
|
});
|
|
981
1034
|
React24.useEffect(() => {
|
|
982
1035
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
983
|
-
prevAnimationNameRef.current =
|
|
984
|
-
}, [
|
|
1036
|
+
prevAnimationNameRef.current = state4 === "mounted" ? currentAnimationName : "none";
|
|
1037
|
+
}, [state4]);
|
|
985
1038
|
useLayoutEffect2(() => {
|
|
986
1039
|
const styles = stylesRef.current;
|
|
987
1040
|
const wasPresent = prevPresentRef.current;
|
|
@@ -1009,10 +1062,10 @@ function usePresence(present) {
|
|
|
1009
1062
|
if (node) {
|
|
1010
1063
|
let timeoutId;
|
|
1011
1064
|
const ownerWindow = (_a = node.ownerDocument.defaultView) != null ? _a : window;
|
|
1012
|
-
const handleAnimationEnd = (
|
|
1065
|
+
const handleAnimationEnd = (event2) => {
|
|
1013
1066
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
1014
|
-
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(
|
|
1015
|
-
if (
|
|
1067
|
+
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event2.animationName));
|
|
1068
|
+
if (event2.target === node && isCurrentAnimation) {
|
|
1016
1069
|
send("ANIMATION_END");
|
|
1017
1070
|
if (!prevPresentRef.current) {
|
|
1018
1071
|
const currentFillMode = node.style.animationFillMode;
|
|
@@ -1025,8 +1078,8 @@ function usePresence(present) {
|
|
|
1025
1078
|
}
|
|
1026
1079
|
}
|
|
1027
1080
|
};
|
|
1028
|
-
const handleAnimationStart = (
|
|
1029
|
-
if (
|
|
1081
|
+
const handleAnimationStart = (event2) => {
|
|
1082
|
+
if (event2.target === node) {
|
|
1030
1083
|
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
1031
1084
|
}
|
|
1032
1085
|
};
|
|
@@ -1044,7 +1097,7 @@ function usePresence(present) {
|
|
|
1044
1097
|
}
|
|
1045
1098
|
}, [node, send]);
|
|
1046
1099
|
return {
|
|
1047
|
-
isPresent: ["mounted", "unmountSuspended"].includes(
|
|
1100
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state4),
|
|
1048
1101
|
ref: React24.useCallback((node2) => {
|
|
1049
1102
|
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
1050
1103
|
setNode(node2);
|
|
@@ -1330,10 +1383,10 @@ var AccordionImpl = import_react4.default.forwardRef(
|
|
|
1330
1383
|
const getItems = useCollection(__scopeAccordion);
|
|
1331
1384
|
const direction = useDirection(dir);
|
|
1332
1385
|
const isDirectionLTR = direction === "ltr";
|
|
1333
|
-
const handleKeyDown = composeEventHandlers(props.onKeyDown, (
|
|
1386
|
+
const handleKeyDown = composeEventHandlers(props.onKeyDown, (event2) => {
|
|
1334
1387
|
var _a2;
|
|
1335
|
-
if (!ACCORDION_KEYS.includes(
|
|
1336
|
-
const target =
|
|
1388
|
+
if (!ACCORDION_KEYS.includes(event2.key)) return;
|
|
1389
|
+
const target = event2.target;
|
|
1337
1390
|
const triggerCollection = getItems().filter((item) => {
|
|
1338
1391
|
var _a3;
|
|
1339
1392
|
return !((_a3 = item.ref.current) == null ? void 0 : _a3.disabled);
|
|
@@ -1341,7 +1394,7 @@ var AccordionImpl = import_react4.default.forwardRef(
|
|
|
1341
1394
|
const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);
|
|
1342
1395
|
const triggerCount = triggerCollection.length;
|
|
1343
1396
|
if (triggerIndex === -1) return;
|
|
1344
|
-
|
|
1397
|
+
event2.preventDefault();
|
|
1345
1398
|
let nextIndex = triggerIndex;
|
|
1346
1399
|
const homeIndex = 0;
|
|
1347
1400
|
const endIndex = triggerCount - 1;
|
|
@@ -1357,7 +1410,7 @@ var AccordionImpl = import_react4.default.forwardRef(
|
|
|
1357
1410
|
nextIndex = endIndex;
|
|
1358
1411
|
}
|
|
1359
1412
|
};
|
|
1360
|
-
switch (
|
|
1413
|
+
switch (event2.key) {
|
|
1361
1414
|
case "Home":
|
|
1362
1415
|
nextIndex = homeIndex;
|
|
1363
1416
|
break;
|
|
@@ -1594,9 +1647,9 @@ var AccordionGroup = ({
|
|
|
1594
1647
|
type = "single",
|
|
1595
1648
|
collapsible = true
|
|
1596
1649
|
}) => {
|
|
1597
|
-
const processedChildren = import_react6.Children.map(children, (
|
|
1598
|
-
if (!(0, import_react6.isValidElement)(
|
|
1599
|
-
const childElement =
|
|
1650
|
+
const processedChildren = import_react6.Children.map(children, (child16, index2) => {
|
|
1651
|
+
if (!(0, import_react6.isValidElement)(child16)) return null;
|
|
1652
|
+
const childElement = child16;
|
|
1600
1653
|
const childProps = childElement.props;
|
|
1601
1654
|
const value = childProps.value || `item-${index2 + 1}`;
|
|
1602
1655
|
const Icon2 = childProps.icon ? Icons2[childProps.icon] : null;
|
|
@@ -1641,7 +1694,7 @@ var Button = ({
|
|
|
1641
1694
|
variation = "primary",
|
|
1642
1695
|
className
|
|
1643
1696
|
}) => {
|
|
1644
|
-
const { Link } = useDocuBook();
|
|
1697
|
+
const { Link: Link2 } = useDocuBook();
|
|
1645
1698
|
const buttonClasses = cn(
|
|
1646
1699
|
componentStyles.button.base,
|
|
1647
1700
|
componentStyles.button.sizes[size4],
|
|
@@ -1650,7 +1703,7 @@ var Button = ({
|
|
|
1650
1703
|
);
|
|
1651
1704
|
const Icon2 = icon ? Icons3[icon] : null;
|
|
1652
1705
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1653
|
-
|
|
1706
|
+
Link2,
|
|
1654
1707
|
{
|
|
1655
1708
|
href,
|
|
1656
1709
|
target,
|
|
@@ -1669,7 +1722,7 @@ var Button_default = Button;
|
|
|
1669
1722
|
var Icons4 = __toESM(require("lucide-react"), 1);
|
|
1670
1723
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1671
1724
|
var Card = ({ title, icon, href, horizontal, children, className }) => {
|
|
1672
|
-
const { Link } = useDocuBook();
|
|
1725
|
+
const { Link: Link2 } = useDocuBook();
|
|
1673
1726
|
const Icon2 = icon ? Icons4[icon] : null;
|
|
1674
1727
|
const content = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1675
1728
|
"div",
|
|
@@ -1689,7 +1742,7 @@ var Card = ({ title, icon, href, horizontal, children, className }) => {
|
|
|
1689
1742
|
]
|
|
1690
1743
|
}
|
|
1691
1744
|
);
|
|
1692
|
-
return href ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1745
|
+
return href ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Link2, { className: "no-underline block", href, children: content }) : content;
|
|
1693
1746
|
};
|
|
1694
1747
|
var Card_default = Card;
|
|
1695
1748
|
|
|
@@ -1882,9 +1935,9 @@ function Files({ children }) {
|
|
|
1882
1935
|
"backdrop-blur-sm shadow-sm overflow-hidden transition-all duration-200 hover:shadow-md"
|
|
1883
1936
|
),
|
|
1884
1937
|
onKeyDown: (e) => e.preventDefault(),
|
|
1885
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "p-2", children: import_react10.Children.map(children, (
|
|
1886
|
-
if ((0, import_react10.isValidElement)(
|
|
1887
|
-
return (0, import_react10.cloneElement)(
|
|
1938
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "p-2", children: import_react10.Children.map(children, (child16, index2) => {
|
|
1939
|
+
if ((0, import_react10.isValidElement)(child16)) {
|
|
1940
|
+
return (0, import_react10.cloneElement)(child16, { key: index2 });
|
|
1888
1941
|
}
|
|
1889
1942
|
return null;
|
|
1890
1943
|
}) })
|
|
@@ -1916,7 +1969,7 @@ function DocuImage(_a) {
|
|
|
1916
1969
|
"height",
|
|
1917
1970
|
"className"
|
|
1918
1971
|
]);
|
|
1919
|
-
const { Image } = useDocuBook();
|
|
1972
|
+
const { Image: Image2 } = useDocuBook();
|
|
1920
1973
|
const [isOpen, setIsOpen] = (0, import_react11.useState)(false);
|
|
1921
1974
|
(0, import_react11.useEffect)(() => {
|
|
1922
1975
|
if (isOpen) {
|
|
@@ -1943,7 +1996,7 @@ function DocuImage(_a) {
|
|
|
1943
1996
|
children: [
|
|
1944
1997
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/5 transition-colors z-10 flex items-center justify-center opacity-0 group-hover:opacity-100 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react6.Search, { className: "w-8 h-8 text-white drop-shadow-md" }) }),
|
|
1945
1998
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1946
|
-
|
|
1999
|
+
Image2,
|
|
1947
2000
|
__spreadValues({
|
|
1948
2001
|
src,
|
|
1949
2002
|
alt,
|
|
@@ -1977,7 +2030,7 @@ function DocuImage(_a) {
|
|
|
1977
2030
|
}
|
|
1978
2031
|
),
|
|
1979
2032
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative max-w-7xl w-full h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1980
|
-
|
|
2033
|
+
Image2,
|
|
1981
2034
|
{
|
|
1982
2035
|
src,
|
|
1983
2036
|
alt,
|
|
@@ -2064,10 +2117,10 @@ var Kbd_default = Kbd;
|
|
|
2064
2117
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2065
2118
|
function DocuLink(_a) {
|
|
2066
2119
|
var _b = _a, { href, className } = _b, props = __objRest(_b, ["href", "className"]);
|
|
2067
|
-
const { Link } = useDocuBook();
|
|
2120
|
+
const { Link: Link2 } = useDocuBook();
|
|
2068
2121
|
if (!href) return null;
|
|
2069
2122
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2070
|
-
|
|
2123
|
+
Link2,
|
|
2071
2124
|
__spreadValues({
|
|
2072
2125
|
href,
|
|
2073
2126
|
target: "_blank",
|
|
@@ -2203,8 +2256,8 @@ function Changes({ type, children }) {
|
|
|
2203
2256
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon2, { className: "w-3.5 h-3.5" }),
|
|
2204
2257
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: config.label })
|
|
2205
2258
|
] }) }),
|
|
2206
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { className: "list-none pl-0 space-y-2 text-foreground/80", children: import_react12.default.Children.map(children, (
|
|
2207
|
-
const processedChild = typeof
|
|
2259
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { className: "list-none pl-0 space-y-2 text-foreground/80", children: import_react12.default.Children.map(children, (child16, index2) => {
|
|
2260
|
+
const processedChild = typeof child16 === "string" ? child16.trim().replace(/^[-*]\s+/, "") : child16;
|
|
2208
2261
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("li", { className: componentStyles.release.changeItem, children: processedChild }, index2);
|
|
2209
2262
|
}) })
|
|
2210
2263
|
] });
|
|
@@ -2215,7 +2268,7 @@ var import_react13 = require("react");
|
|
|
2215
2268
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2216
2269
|
function Stepper({ children, className }) {
|
|
2217
2270
|
const length = import_react13.Children.count(children);
|
|
2218
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn(componentStyles.stepper.base, "flex-col", className), children: import_react13.Children.map(children, (
|
|
2271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn(componentStyles.stepper.base, "flex-col", className), children: import_react13.Children.map(children, (child16, index2) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2219
2272
|
"div",
|
|
2220
2273
|
{
|
|
2221
2274
|
className: cn(
|
|
@@ -2234,7 +2287,7 @@ function Stepper({ children, className }) {
|
|
|
2234
2287
|
children: index2 + 1
|
|
2235
2288
|
}
|
|
2236
2289
|
),
|
|
2237
|
-
|
|
2290
|
+
child16
|
|
2238
2291
|
]
|
|
2239
2292
|
}
|
|
2240
2293
|
)) });
|
|
@@ -2273,9 +2326,9 @@ var React27 = __toESM(require("react"), 1);
|
|
|
2273
2326
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
2274
2327
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
2275
2328
|
React27.useEffect(() => {
|
|
2276
|
-
const handleKeyDown = (
|
|
2277
|
-
if (
|
|
2278
|
-
onEscapeKeyDown(
|
|
2329
|
+
const handleKeyDown = (event2) => {
|
|
2330
|
+
if (event2.key === "Escape") {
|
|
2331
|
+
onEscapeKeyDown(event2);
|
|
2279
2332
|
}
|
|
2280
2333
|
};
|
|
2281
2334
|
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
@@ -2324,28 +2377,28 @@ var DismissableLayer = React28.forwardRef(
|
|
|
2324
2377
|
const index2 = node ? layers.indexOf(node) : -1;
|
|
2325
2378
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
2326
2379
|
const isPointerEventsEnabled = index2 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
2327
|
-
const pointerDownOutside = usePointerDownOutside((
|
|
2328
|
-
const target =
|
|
2380
|
+
const pointerDownOutside = usePointerDownOutside((event2) => {
|
|
2381
|
+
const target = event2.target;
|
|
2329
2382
|
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
2330
2383
|
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
2331
|
-
onPointerDownOutside == null ? void 0 : onPointerDownOutside(
|
|
2332
|
-
onInteractOutside == null ? void 0 : onInteractOutside(
|
|
2333
|
-
if (!
|
|
2384
|
+
onPointerDownOutside == null ? void 0 : onPointerDownOutside(event2);
|
|
2385
|
+
onInteractOutside == null ? void 0 : onInteractOutside(event2);
|
|
2386
|
+
if (!event2.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
2334
2387
|
}, ownerDocument);
|
|
2335
|
-
const focusOutside = useFocusOutside((
|
|
2336
|
-
const target =
|
|
2388
|
+
const focusOutside = useFocusOutside((event2) => {
|
|
2389
|
+
const target = event2.target;
|
|
2337
2390
|
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
2338
2391
|
if (isFocusInBranch) return;
|
|
2339
|
-
onFocusOutside == null ? void 0 : onFocusOutside(
|
|
2340
|
-
onInteractOutside == null ? void 0 : onInteractOutside(
|
|
2341
|
-
if (!
|
|
2392
|
+
onFocusOutside == null ? void 0 : onFocusOutside(event2);
|
|
2393
|
+
onInteractOutside == null ? void 0 : onInteractOutside(event2);
|
|
2394
|
+
if (!event2.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
2342
2395
|
}, ownerDocument);
|
|
2343
|
-
useEscapeKeydown((
|
|
2396
|
+
useEscapeKeydown((event2) => {
|
|
2344
2397
|
const isHighestLayer = index2 === context.layers.size - 1;
|
|
2345
2398
|
if (!isHighestLayer) return;
|
|
2346
|
-
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(
|
|
2347
|
-
if (!
|
|
2348
|
-
|
|
2399
|
+
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event2);
|
|
2400
|
+
if (!event2.defaultPrevented && onDismiss) {
|
|
2401
|
+
event2.preventDefault();
|
|
2349
2402
|
onDismiss();
|
|
2350
2403
|
}
|
|
2351
2404
|
}, ownerDocument);
|
|
@@ -2420,8 +2473,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis
|
|
|
2420
2473
|
const handleClickRef = React28.useRef(() => {
|
|
2421
2474
|
});
|
|
2422
2475
|
React28.useEffect(() => {
|
|
2423
|
-
const handlePointerDown = (
|
|
2424
|
-
if (
|
|
2476
|
+
const handlePointerDown = (event2) => {
|
|
2477
|
+
if (event2.target && !isPointerInsideReactTreeRef.current) {
|
|
2425
2478
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
2426
2479
|
handleAndDispatchCustomEvent(
|
|
2427
2480
|
POINTER_DOWN_OUTSIDE,
|
|
@@ -2431,8 +2484,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis
|
|
|
2431
2484
|
);
|
|
2432
2485
|
};
|
|
2433
2486
|
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
2434
|
-
const eventDetail = { originalEvent:
|
|
2435
|
-
if (
|
|
2487
|
+
const eventDetail = { originalEvent: event2 };
|
|
2488
|
+
if (event2.pointerType === "touch") {
|
|
2436
2489
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
2437
2490
|
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
2438
2491
|
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
@@ -2462,9 +2515,9 @@ function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? vo
|
|
|
2462
2515
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
2463
2516
|
const isFocusInsideReactTreeRef = React28.useRef(false);
|
|
2464
2517
|
React28.useEffect(() => {
|
|
2465
|
-
const handleFocus = (
|
|
2466
|
-
if (
|
|
2467
|
-
const eventDetail = { originalEvent:
|
|
2518
|
+
const handleFocus = (event2) => {
|
|
2519
|
+
if (event2.target && !isFocusInsideReactTreeRef.current) {
|
|
2520
|
+
const eventDetail = { originalEvent: event2 };
|
|
2468
2521
|
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
2469
2522
|
discrete: false
|
|
2470
2523
|
});
|
|
@@ -2479,17 +2532,17 @@ function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? vo
|
|
|
2479
2532
|
};
|
|
2480
2533
|
}
|
|
2481
2534
|
function dispatchUpdate() {
|
|
2482
|
-
const
|
|
2483
|
-
document.dispatchEvent(
|
|
2535
|
+
const event2 = new CustomEvent(CONTEXT_UPDATE);
|
|
2536
|
+
document.dispatchEvent(event2);
|
|
2484
2537
|
}
|
|
2485
2538
|
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
2486
2539
|
const target = detail.originalEvent.target;
|
|
2487
|
-
const
|
|
2540
|
+
const event2 = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
2488
2541
|
if (handler) target.addEventListener(name, handler, { once: true });
|
|
2489
2542
|
if (discrete) {
|
|
2490
|
-
dispatchDiscreteCustomEvent(target,
|
|
2543
|
+
dispatchDiscreteCustomEvent(target, event2);
|
|
2491
2544
|
} else {
|
|
2492
|
-
target.dispatchEvent(
|
|
2545
|
+
target.dispatchEvent(event2);
|
|
2493
2546
|
}
|
|
2494
2547
|
}
|
|
2495
2548
|
|
|
@@ -2683,7 +2736,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
2683
2736
|
}
|
|
2684
2737
|
return coords;
|
|
2685
2738
|
}
|
|
2686
|
-
async function detectOverflow(
|
|
2739
|
+
async function detectOverflow(state4, options) {
|
|
2687
2740
|
var _await$platform$isEle;
|
|
2688
2741
|
if (options === void 0) {
|
|
2689
2742
|
options = {};
|
|
@@ -2695,14 +2748,14 @@ async function detectOverflow(state, options) {
|
|
|
2695
2748
|
rects,
|
|
2696
2749
|
elements,
|
|
2697
2750
|
strategy
|
|
2698
|
-
} =
|
|
2751
|
+
} = state4;
|
|
2699
2752
|
const {
|
|
2700
2753
|
boundary = "clippingAncestors",
|
|
2701
2754
|
rootBoundary = "viewport",
|
|
2702
2755
|
elementContext = "floating",
|
|
2703
2756
|
altBoundary = false,
|
|
2704
2757
|
padding = 0
|
|
2705
|
-
} = evaluate(options,
|
|
2758
|
+
} = evaluate(options, state4);
|
|
2706
2759
|
const paddingObject = getPaddingObject(padding);
|
|
2707
2760
|
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
2708
2761
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
@@ -2770,7 +2823,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
2770
2823
|
x: nextX,
|
|
2771
2824
|
y: nextY,
|
|
2772
2825
|
data,
|
|
2773
|
-
reset
|
|
2826
|
+
reset: reset16
|
|
2774
2827
|
} = await fn({
|
|
2775
2828
|
x,
|
|
2776
2829
|
y,
|
|
@@ -2792,18 +2845,18 @@ var computePosition = async (reference, floating, config) => {
|
|
|
2792
2845
|
middlewareData = __spreadProps(__spreadValues({}, middlewareData), {
|
|
2793
2846
|
[name]: __spreadValues(__spreadValues({}, middlewareData[name]), data)
|
|
2794
2847
|
});
|
|
2795
|
-
if (
|
|
2848
|
+
if (reset16 && resetCount <= 50) {
|
|
2796
2849
|
resetCount++;
|
|
2797
|
-
if (typeof
|
|
2798
|
-
if (
|
|
2799
|
-
statefulPlacement =
|
|
2850
|
+
if (typeof reset16 === "object") {
|
|
2851
|
+
if (reset16.placement) {
|
|
2852
|
+
statefulPlacement = reset16.placement;
|
|
2800
2853
|
}
|
|
2801
|
-
if (
|
|
2802
|
-
rects =
|
|
2854
|
+
if (reset16.rects) {
|
|
2855
|
+
rects = reset16.rects === true ? await platform2.getElementRects({
|
|
2803
2856
|
reference,
|
|
2804
2857
|
floating,
|
|
2805
2858
|
strategy
|
|
2806
|
-
}) :
|
|
2859
|
+
}) : reset16.rects;
|
|
2807
2860
|
}
|
|
2808
2861
|
({
|
|
2809
2862
|
x,
|
|
@@ -2824,7 +2877,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
2824
2877
|
var arrow = (options) => ({
|
|
2825
2878
|
name: "arrow",
|
|
2826
2879
|
options,
|
|
2827
|
-
async fn(
|
|
2880
|
+
async fn(state4) {
|
|
2828
2881
|
const {
|
|
2829
2882
|
x,
|
|
2830
2883
|
y,
|
|
@@ -2833,11 +2886,11 @@ var arrow = (options) => ({
|
|
|
2833
2886
|
platform: platform2,
|
|
2834
2887
|
elements,
|
|
2835
2888
|
middlewareData
|
|
2836
|
-
} =
|
|
2889
|
+
} = state4;
|
|
2837
2890
|
const {
|
|
2838
2891
|
element,
|
|
2839
2892
|
padding = 0
|
|
2840
|
-
} = evaluate(options,
|
|
2893
|
+
} = evaluate(options, state4) || {};
|
|
2841
2894
|
if (element == null) {
|
|
2842
2895
|
return {};
|
|
2843
2896
|
}
|
|
@@ -2889,7 +2942,7 @@ var flip = function(options) {
|
|
|
2889
2942
|
return {
|
|
2890
2943
|
name: "flip",
|
|
2891
2944
|
options,
|
|
2892
|
-
async fn(
|
|
2945
|
+
async fn(state4) {
|
|
2893
2946
|
var _middlewareData$arrow, _middlewareData$flip;
|
|
2894
2947
|
const {
|
|
2895
2948
|
placement,
|
|
@@ -2898,8 +2951,8 @@ var flip = function(options) {
|
|
|
2898
2951
|
initialPlacement,
|
|
2899
2952
|
platform: platform2,
|
|
2900
2953
|
elements
|
|
2901
|
-
} =
|
|
2902
|
-
const _a = evaluate(options,
|
|
2954
|
+
} = state4;
|
|
2955
|
+
const _a = evaluate(options, state4), {
|
|
2903
2956
|
mainAxis: checkMainAxis = true,
|
|
2904
2957
|
crossAxis: checkCrossAxis = true,
|
|
2905
2958
|
fallbackPlacements: specifiedFallbackPlacements,
|
|
@@ -2927,7 +2980,7 @@ var flip = function(options) {
|
|
|
2927
2980
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
2928
2981
|
}
|
|
2929
2982
|
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
2930
|
-
const overflow = await platform2.detectOverflow(
|
|
2983
|
+
const overflow = await platform2.detectOverflow(state4, detectOverflowOptions);
|
|
2931
2984
|
const overflows = [];
|
|
2932
2985
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
2933
2986
|
if (checkMainAxis) {
|
|
@@ -3015,19 +3068,19 @@ var hide = function(options) {
|
|
|
3015
3068
|
return {
|
|
3016
3069
|
name: "hide",
|
|
3017
3070
|
options,
|
|
3018
|
-
async fn(
|
|
3071
|
+
async fn(state4) {
|
|
3019
3072
|
const {
|
|
3020
3073
|
rects,
|
|
3021
3074
|
platform: platform2
|
|
3022
|
-
} =
|
|
3023
|
-
const _a = evaluate(options,
|
|
3075
|
+
} = state4;
|
|
3076
|
+
const _a = evaluate(options, state4), {
|
|
3024
3077
|
strategy = "referenceHidden"
|
|
3025
3078
|
} = _a, detectOverflowOptions = __objRest(_a, [
|
|
3026
3079
|
"strategy"
|
|
3027
3080
|
]);
|
|
3028
3081
|
switch (strategy) {
|
|
3029
3082
|
case "referenceHidden": {
|
|
3030
|
-
const overflow = await platform2.detectOverflow(
|
|
3083
|
+
const overflow = await platform2.detectOverflow(state4, __spreadProps(__spreadValues({}, detectOverflowOptions), {
|
|
3031
3084
|
elementContext: "reference"
|
|
3032
3085
|
}));
|
|
3033
3086
|
const offsets = getSideOffsets(overflow, rects.reference);
|
|
@@ -3039,7 +3092,7 @@ var hide = function(options) {
|
|
|
3039
3092
|
};
|
|
3040
3093
|
}
|
|
3041
3094
|
case "escaped": {
|
|
3042
|
-
const overflow = await platform2.detectOverflow(
|
|
3095
|
+
const overflow = await platform2.detectOverflow(state4, __spreadProps(__spreadValues({}, detectOverflowOptions), {
|
|
3043
3096
|
altBoundary: true
|
|
3044
3097
|
}));
|
|
3045
3098
|
const offsets = getSideOffsets(overflow, rects.floating);
|
|
@@ -3058,19 +3111,19 @@ var hide = function(options) {
|
|
|
3058
3111
|
};
|
|
3059
3112
|
};
|
|
3060
3113
|
var originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
3061
|
-
async function convertValueToCoords(
|
|
3114
|
+
async function convertValueToCoords(state4, options) {
|
|
3062
3115
|
const {
|
|
3063
3116
|
placement,
|
|
3064
3117
|
platform: platform2,
|
|
3065
3118
|
elements
|
|
3066
|
-
} =
|
|
3119
|
+
} = state4;
|
|
3067
3120
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
3068
3121
|
const side = getSide(placement);
|
|
3069
3122
|
const alignment = getAlignment(placement);
|
|
3070
3123
|
const isVertical = getSideAxis(placement) === "y";
|
|
3071
3124
|
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
3072
3125
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
3073
|
-
const rawValue = evaluate(options,
|
|
3126
|
+
const rawValue = evaluate(options, state4);
|
|
3074
3127
|
let {
|
|
3075
3128
|
mainAxis,
|
|
3076
3129
|
crossAxis,
|
|
@@ -3102,15 +3155,15 @@ var offset = function(options) {
|
|
|
3102
3155
|
return {
|
|
3103
3156
|
name: "offset",
|
|
3104
3157
|
options,
|
|
3105
|
-
async fn(
|
|
3158
|
+
async fn(state4) {
|
|
3106
3159
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
3107
3160
|
const {
|
|
3108
3161
|
x,
|
|
3109
3162
|
y,
|
|
3110
3163
|
placement,
|
|
3111
3164
|
middlewareData
|
|
3112
|
-
} =
|
|
3113
|
-
const diffCoords = await convertValueToCoords(
|
|
3165
|
+
} = state4;
|
|
3166
|
+
const diffCoords = await convertValueToCoords(state4, options);
|
|
3114
3167
|
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
3115
3168
|
return {};
|
|
3116
3169
|
}
|
|
@@ -3131,14 +3184,14 @@ var shift = function(options) {
|
|
|
3131
3184
|
return {
|
|
3132
3185
|
name: "shift",
|
|
3133
3186
|
options,
|
|
3134
|
-
async fn(
|
|
3187
|
+
async fn(state4) {
|
|
3135
3188
|
const {
|
|
3136
3189
|
x,
|
|
3137
3190
|
y,
|
|
3138
3191
|
placement,
|
|
3139
3192
|
platform: platform2
|
|
3140
|
-
} =
|
|
3141
|
-
const _a = evaluate(options,
|
|
3193
|
+
} = state4;
|
|
3194
|
+
const _a = evaluate(options, state4), {
|
|
3142
3195
|
mainAxis: checkMainAxis = true,
|
|
3143
3196
|
crossAxis: checkCrossAxis = false,
|
|
3144
3197
|
limiter = {
|
|
@@ -3162,7 +3215,7 @@ var shift = function(options) {
|
|
|
3162
3215
|
x,
|
|
3163
3216
|
y
|
|
3164
3217
|
};
|
|
3165
|
-
const overflow = await platform2.detectOverflow(
|
|
3218
|
+
const overflow = await platform2.detectOverflow(state4, detectOverflowOptions);
|
|
3166
3219
|
const crossAxis = getSideAxis(getSide(placement));
|
|
3167
3220
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
3168
3221
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -3181,7 +3234,7 @@ var shift = function(options) {
|
|
|
3181
3234
|
const max2 = crossAxisCoord - overflow[maxSide];
|
|
3182
3235
|
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
3183
3236
|
}
|
|
3184
|
-
const limitedCoords = limiter.fn(__spreadProps(__spreadValues({},
|
|
3237
|
+
const limitedCoords = limiter.fn(__spreadProps(__spreadValues({}, state4), {
|
|
3185
3238
|
[mainAxis]: mainAxisCoord,
|
|
3186
3239
|
[crossAxis]: crossAxisCoord
|
|
3187
3240
|
}));
|
|
@@ -3204,19 +3257,19 @@ var limitShift = function(options) {
|
|
|
3204
3257
|
}
|
|
3205
3258
|
return {
|
|
3206
3259
|
options,
|
|
3207
|
-
fn(
|
|
3260
|
+
fn(state4) {
|
|
3208
3261
|
const {
|
|
3209
3262
|
x,
|
|
3210
3263
|
y,
|
|
3211
3264
|
placement,
|
|
3212
3265
|
rects,
|
|
3213
3266
|
middlewareData
|
|
3214
|
-
} =
|
|
3267
|
+
} = state4;
|
|
3215
3268
|
const {
|
|
3216
3269
|
offset: offset4 = 0,
|
|
3217
3270
|
mainAxis: checkMainAxis = true,
|
|
3218
3271
|
crossAxis: checkCrossAxis = true
|
|
3219
|
-
} = evaluate(options,
|
|
3272
|
+
} = evaluate(options, state4);
|
|
3220
3273
|
const coords = {
|
|
3221
3274
|
x,
|
|
3222
3275
|
y
|
|
@@ -3225,7 +3278,7 @@ var limitShift = function(options) {
|
|
|
3225
3278
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
3226
3279
|
let mainAxisCoord = coords[mainAxis];
|
|
3227
3280
|
let crossAxisCoord = coords[crossAxis];
|
|
3228
|
-
const rawOffset = evaluate(offset4,
|
|
3281
|
+
const rawOffset = evaluate(offset4, state4);
|
|
3229
3282
|
const computedOffset = typeof rawOffset === "number" ? {
|
|
3230
3283
|
mainAxis: rawOffset,
|
|
3231
3284
|
crossAxis: 0
|
|
@@ -3269,21 +3322,21 @@ var size = function(options) {
|
|
|
3269
3322
|
return {
|
|
3270
3323
|
name: "size",
|
|
3271
3324
|
options,
|
|
3272
|
-
async fn(
|
|
3325
|
+
async fn(state4) {
|
|
3273
3326
|
var _state$middlewareData, _state$middlewareData2;
|
|
3274
3327
|
const {
|
|
3275
3328
|
placement,
|
|
3276
3329
|
rects,
|
|
3277
3330
|
platform: platform2,
|
|
3278
3331
|
elements
|
|
3279
|
-
} =
|
|
3280
|
-
const _a = evaluate(options,
|
|
3332
|
+
} = state4;
|
|
3333
|
+
const _a = evaluate(options, state4), {
|
|
3281
3334
|
apply = () => {
|
|
3282
3335
|
}
|
|
3283
3336
|
} = _a, detectOverflowOptions = __objRest(_a, [
|
|
3284
3337
|
"apply"
|
|
3285
3338
|
]);
|
|
3286
|
-
const overflow = await platform2.detectOverflow(
|
|
3339
|
+
const overflow = await platform2.detectOverflow(state4, detectOverflowOptions);
|
|
3287
3340
|
const side = getSide(placement);
|
|
3288
3341
|
const alignment = getAlignment(placement);
|
|
3289
3342
|
const isYAxis = getSideAxis(placement) === "y";
|
|
@@ -3304,13 +3357,13 @@ var size = function(options) {
|
|
|
3304
3357
|
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
3305
3358
|
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
3306
3359
|
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
3307
|
-
const noShift = !
|
|
3360
|
+
const noShift = !state4.middlewareData.shift;
|
|
3308
3361
|
let availableHeight = overflowAvailableHeight;
|
|
3309
3362
|
let availableWidth = overflowAvailableWidth;
|
|
3310
|
-
if ((_state$middlewareData =
|
|
3363
|
+
if ((_state$middlewareData = state4.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
3311
3364
|
availableWidth = maximumClippingWidth;
|
|
3312
3365
|
}
|
|
3313
|
-
if ((_state$middlewareData2 =
|
|
3366
|
+
if ((_state$middlewareData2 = state4.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
3314
3367
|
availableHeight = maximumClippingHeight;
|
|
3315
3368
|
}
|
|
3316
3369
|
if (noShift && !alignment) {
|
|
@@ -3324,7 +3377,7 @@ var size = function(options) {
|
|
|
3324
3377
|
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
3325
3378
|
}
|
|
3326
3379
|
}
|
|
3327
|
-
await apply(__spreadProps(__spreadValues({},
|
|
3380
|
+
await apply(__spreadProps(__spreadValues({}, state4), {
|
|
3328
3381
|
availableWidth,
|
|
3329
3382
|
availableHeight
|
|
3330
3383
|
}));
|
|
@@ -3525,10 +3578,10 @@ function getScale(element) {
|
|
|
3525
3578
|
const {
|
|
3526
3579
|
width,
|
|
3527
3580
|
height,
|
|
3528
|
-
$
|
|
3581
|
+
$: $28
|
|
3529
3582
|
} = getCssDimensions(domElement);
|
|
3530
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
3531
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
3583
|
+
let x = ($28 ? round(rect.width) : rect.width) / width;
|
|
3584
|
+
let y = ($28 ? round(rect.height) : rect.height) / height;
|
|
3532
3585
|
if (!x || !Number.isFinite(x)) {
|
|
3533
3586
|
x = 1;
|
|
3534
3587
|
}
|
|
@@ -3943,7 +3996,7 @@ function rectsAreEqual(a, b) {
|
|
|
3943
3996
|
function observeMove(element, onMove) {
|
|
3944
3997
|
let io = null;
|
|
3945
3998
|
let timeoutId;
|
|
3946
|
-
const
|
|
3999
|
+
const root11 = getDocumentElement(element);
|
|
3947
4000
|
function cleanup() {
|
|
3948
4001
|
var _io;
|
|
3949
4002
|
clearTimeout(timeoutId);
|
|
@@ -3972,8 +4025,8 @@ function observeMove(element, onMove) {
|
|
|
3972
4025
|
return;
|
|
3973
4026
|
}
|
|
3974
4027
|
const insetTop = floor(top);
|
|
3975
|
-
const insetRight = floor(
|
|
3976
|
-
const insetBottom = floor(
|
|
4028
|
+
const insetRight = floor(root11.clientWidth - (left + width));
|
|
4029
|
+
const insetBottom = floor(root11.clientHeight - (top + height));
|
|
3977
4030
|
const insetLeft = floor(left);
|
|
3978
4031
|
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
3979
4032
|
const options = {
|
|
@@ -4003,7 +4056,7 @@ function observeMove(element, onMove) {
|
|
|
4003
4056
|
try {
|
|
4004
4057
|
io = new IntersectionObserver(handleObserve, __spreadProps(__spreadValues({}, options), {
|
|
4005
4058
|
// Handle <iframe>s
|
|
4006
|
-
root:
|
|
4059
|
+
root: root11.ownerDocument
|
|
4007
4060
|
}));
|
|
4008
4061
|
} catch (_e) {
|
|
4009
4062
|
io = new IntersectionObserver(handleObserve, options);
|
|
@@ -4327,17 +4380,17 @@ var arrow$1 = (options) => {
|
|
|
4327
4380
|
return {
|
|
4328
4381
|
name: "arrow",
|
|
4329
4382
|
options,
|
|
4330
|
-
fn(
|
|
4383
|
+
fn(state4) {
|
|
4331
4384
|
const {
|
|
4332
4385
|
element,
|
|
4333
4386
|
padding
|
|
4334
|
-
} = typeof options === "function" ? options(
|
|
4387
|
+
} = typeof options === "function" ? options(state4) : options;
|
|
4335
4388
|
if (element && isRef(element)) {
|
|
4336
4389
|
if (element.current != null) {
|
|
4337
4390
|
return arrow2({
|
|
4338
4391
|
element: element.current,
|
|
4339
4392
|
padding
|
|
4340
|
-
}).fn(
|
|
4393
|
+
}).fn(state4);
|
|
4341
4394
|
}
|
|
4342
4395
|
return {};
|
|
4343
4396
|
}
|
|
@@ -4345,7 +4398,7 @@ var arrow$1 = (options) => {
|
|
|
4345
4398
|
return arrow2({
|
|
4346
4399
|
element,
|
|
4347
4400
|
padding
|
|
4348
|
-
}).fn(
|
|
4401
|
+
}).fn(state4);
|
|
4349
4402
|
}
|
|
4350
4403
|
return {};
|
|
4351
4404
|
}
|
|
@@ -4921,8 +4974,8 @@ var TooltipTrigger = React35.forwardRef(
|
|
|
4921
4974
|
"data-state": context.stateAttribute
|
|
4922
4975
|
}, triggerProps), {
|
|
4923
4976
|
ref: composedRefs,
|
|
4924
|
-
onPointerMove: composeEventHandlers(props.onPointerMove, (
|
|
4925
|
-
if (
|
|
4977
|
+
onPointerMove: composeEventHandlers(props.onPointerMove, (event2) => {
|
|
4978
|
+
if (event2.pointerType === "touch") return;
|
|
4926
4979
|
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
|
4927
4980
|
context.onTriggerEnter();
|
|
4928
4981
|
hasPointerMoveOpenedRef.current = true;
|
|
@@ -4982,9 +5035,9 @@ var TooltipContentHoverable = React35.forwardRef((props, forwardedRef) => {
|
|
|
4982
5035
|
onPointerInTransitChange(false);
|
|
4983
5036
|
}, [onPointerInTransitChange]);
|
|
4984
5037
|
const handleCreateGraceArea = React35.useCallback(
|
|
4985
|
-
(
|
|
4986
|
-
const currentTarget =
|
|
4987
|
-
const exitPoint = { x:
|
|
5038
|
+
(event2, hoverTarget) => {
|
|
5039
|
+
const currentTarget = event2.currentTarget;
|
|
5040
|
+
const exitPoint = { x: event2.clientX, y: event2.clientY };
|
|
4988
5041
|
const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
|
|
4989
5042
|
const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);
|
|
4990
5043
|
const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());
|
|
@@ -4999,8 +5052,8 @@ var TooltipContentHoverable = React35.forwardRef((props, forwardedRef) => {
|
|
|
4999
5052
|
}, [handleRemoveGraceArea]);
|
|
5000
5053
|
React35.useEffect(() => {
|
|
5001
5054
|
if (trigger && content) {
|
|
5002
|
-
const handleTriggerLeave = (
|
|
5003
|
-
const handleContentLeave = (
|
|
5055
|
+
const handleTriggerLeave = (event2) => handleCreateGraceArea(event2, content);
|
|
5056
|
+
const handleContentLeave = (event2) => handleCreateGraceArea(event2, trigger);
|
|
5004
5057
|
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
5005
5058
|
content.addEventListener("pointerleave", handleContentLeave);
|
|
5006
5059
|
return () => {
|
|
@@ -5011,9 +5064,9 @@ var TooltipContentHoverable = React35.forwardRef((props, forwardedRef) => {
|
|
|
5011
5064
|
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
5012
5065
|
React35.useEffect(() => {
|
|
5013
5066
|
if (pointerGraceArea) {
|
|
5014
|
-
const handleTrackPointerGrace = (
|
|
5015
|
-
const target =
|
|
5016
|
-
const pointerPosition = { x:
|
|
5067
|
+
const handleTrackPointerGrace = (event2) => {
|
|
5068
|
+
const target = event2.target;
|
|
5069
|
+
const pointerPosition = { x: event2.clientX, y: event2.clientY };
|
|
5017
5070
|
const hasEnteredTarget = (trigger == null ? void 0 : trigger.contains(target)) || (content == null ? void 0 : content.contains(target));
|
|
5018
5071
|
const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);
|
|
5019
5072
|
if (hasEnteredTarget) {
|
|
@@ -5055,8 +5108,8 @@ var TooltipContentImpl = React35.forwardRef(
|
|
|
5055
5108
|
}, [onClose]);
|
|
5056
5109
|
React35.useEffect(() => {
|
|
5057
5110
|
if (context.trigger) {
|
|
5058
|
-
const handleScroll2 = (
|
|
5059
|
-
const target =
|
|
5111
|
+
const handleScroll2 = (event2) => {
|
|
5112
|
+
const target = event2.target;
|
|
5060
5113
|
if (target == null ? void 0 : target.contains(context.trigger)) onClose();
|
|
5061
5114
|
};
|
|
5062
5115
|
window.addEventListener("scroll", handleScroll2, { capture: true });
|
|
@@ -5070,7 +5123,7 @@ var TooltipContentImpl = React35.forwardRef(
|
|
|
5070
5123
|
disableOutsidePointerEvents: false,
|
|
5071
5124
|
onEscapeKeyDown,
|
|
5072
5125
|
onPointerDownOutside,
|
|
5073
|
-
onFocusOutside: (
|
|
5126
|
+
onFocusOutside: (event2) => event2.preventDefault(),
|
|
5074
5127
|
onDismiss: onClose,
|
|
5075
5128
|
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
5076
5129
|
Content3,
|
|
@@ -5396,11 +5449,11 @@ var RovingFocusGroupImpl = React37.forwardRef((props, forwardedRef) => {
|
|
|
5396
5449
|
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
5397
5450
|
isClickFocusRef.current = true;
|
|
5398
5451
|
}),
|
|
5399
|
-
onFocus: composeEventHandlers(props.onFocus, (
|
|
5452
|
+
onFocus: composeEventHandlers(props.onFocus, (event2) => {
|
|
5400
5453
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
5401
|
-
if (
|
|
5454
|
+
if (event2.target === event2.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
5402
5455
|
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
5403
|
-
|
|
5456
|
+
event2.currentTarget.dispatchEvent(entryFocusEvent);
|
|
5404
5457
|
if (!entryFocusEvent.defaultPrevented) {
|
|
5405
5458
|
const items = getItems().filter((item) => item.focusable);
|
|
5406
5459
|
const activeItem = items.find((item) => item.active);
|
|
@@ -5462,27 +5515,27 @@ var RovingFocusGroupItem = React37.forwardRef(
|
|
|
5462
5515
|
"data-orientation": context.orientation
|
|
5463
5516
|
}, itemProps), {
|
|
5464
5517
|
ref: forwardedRef,
|
|
5465
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (
|
|
5466
|
-
if (!focusable)
|
|
5518
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event2) => {
|
|
5519
|
+
if (!focusable) event2.preventDefault();
|
|
5467
5520
|
else context.onItemFocus(id);
|
|
5468
5521
|
}),
|
|
5469
5522
|
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
5470
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (
|
|
5471
|
-
if (
|
|
5523
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event2) => {
|
|
5524
|
+
if (event2.key === "Tab" && event2.shiftKey) {
|
|
5472
5525
|
context.onItemShiftTab();
|
|
5473
5526
|
return;
|
|
5474
5527
|
}
|
|
5475
|
-
if (
|
|
5476
|
-
const focusIntent = getFocusIntent(
|
|
5528
|
+
if (event2.target !== event2.currentTarget) return;
|
|
5529
|
+
const focusIntent = getFocusIntent(event2, context.orientation, context.dir);
|
|
5477
5530
|
if (focusIntent !== void 0) {
|
|
5478
|
-
if (
|
|
5479
|
-
|
|
5531
|
+
if (event2.metaKey || event2.ctrlKey || event2.altKey || event2.shiftKey) return;
|
|
5532
|
+
event2.preventDefault();
|
|
5480
5533
|
const items = getItems().filter((item) => item.focusable);
|
|
5481
5534
|
let candidateNodes = items.map((item) => item.ref.current);
|
|
5482
5535
|
if (focusIntent === "last") candidateNodes.reverse();
|
|
5483
5536
|
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
5484
5537
|
if (focusIntent === "prev") candidateNodes.reverse();
|
|
5485
|
-
const currentIndex = candidateNodes.indexOf(
|
|
5538
|
+
const currentIndex = candidateNodes.indexOf(event2.currentTarget);
|
|
5486
5539
|
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
5487
5540
|
}
|
|
5488
5541
|
setTimeout(() => focusFirst(candidateNodes));
|
|
@@ -5510,8 +5563,8 @@ function getDirectionAwareKey(key, dir) {
|
|
|
5510
5563
|
if (dir !== "rtl") return key;
|
|
5511
5564
|
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
5512
5565
|
}
|
|
5513
|
-
function getFocusIntent(
|
|
5514
|
-
const key = getDirectionAwareKey(
|
|
5566
|
+
function getFocusIntent(event2, orientation, dir) {
|
|
5567
|
+
const key = getDirectionAwareKey(event2.key, dir);
|
|
5515
5568
|
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
5516
5569
|
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
5517
5570
|
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
@@ -5645,15 +5698,15 @@ var TabsTrigger = React38.forwardRef(
|
|
|
5645
5698
|
id: triggerId
|
|
5646
5699
|
}, triggerProps), {
|
|
5647
5700
|
ref: forwardedRef,
|
|
5648
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (
|
|
5649
|
-
if (!disabled &&
|
|
5701
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event2) => {
|
|
5702
|
+
if (!disabled && event2.button === 0 && event2.ctrlKey === false) {
|
|
5650
5703
|
context.onValueChange(value);
|
|
5651
5704
|
} else {
|
|
5652
|
-
|
|
5705
|
+
event2.preventDefault();
|
|
5653
5706
|
}
|
|
5654
5707
|
}),
|
|
5655
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (
|
|
5656
|
-
if ([" ", "Enter"].includes(
|
|
5708
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event2) => {
|
|
5709
|
+
if ([" ", "Enter"].includes(event2.key)) context.onValueChange(value);
|
|
5657
5710
|
}),
|
|
5658
5711
|
onFocus: composeEventHandlers(props.onFocus, () => {
|
|
5659
5712
|
const isAutomaticActivation = context.activationMode !== "manual";
|
|
@@ -5809,17 +5862,17 @@ var FocusScope = React40.forwardRef((props, forwardedRef) => {
|
|
|
5809
5862
|
}).current;
|
|
5810
5863
|
React40.useEffect(() => {
|
|
5811
5864
|
if (trapped) {
|
|
5812
|
-
let handleFocusIn2 = function(
|
|
5865
|
+
let handleFocusIn2 = function(event2) {
|
|
5813
5866
|
if (focusScope.paused || !container) return;
|
|
5814
|
-
const target =
|
|
5867
|
+
const target = event2.target;
|
|
5815
5868
|
if (container.contains(target)) {
|
|
5816
5869
|
lastFocusedElementRef.current = target;
|
|
5817
5870
|
} else {
|
|
5818
5871
|
focus(lastFocusedElementRef.current, { select: true });
|
|
5819
5872
|
}
|
|
5820
|
-
}, handleFocusOut2 = function(
|
|
5873
|
+
}, handleFocusOut2 = function(event2) {
|
|
5821
5874
|
if (focusScope.paused || !container) return;
|
|
5822
|
-
const relatedTarget =
|
|
5875
|
+
const relatedTarget = event2.relatedTarget;
|
|
5823
5876
|
if (relatedTarget === null) return;
|
|
5824
5877
|
if (!container.contains(relatedTarget)) {
|
|
5825
5878
|
focus(lastFocusedElementRef.current, { select: true });
|
|
@@ -5875,23 +5928,23 @@ var FocusScope = React40.forwardRef((props, forwardedRef) => {
|
|
|
5875
5928
|
}
|
|
5876
5929
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
5877
5930
|
const handleKeyDown = React40.useCallback(
|
|
5878
|
-
(
|
|
5931
|
+
(event2) => {
|
|
5879
5932
|
if (!loop && !trapped) return;
|
|
5880
5933
|
if (focusScope.paused) return;
|
|
5881
|
-
const isTabKey =
|
|
5934
|
+
const isTabKey = event2.key === "Tab" && !event2.altKey && !event2.ctrlKey && !event2.metaKey;
|
|
5882
5935
|
const focusedElement = document.activeElement;
|
|
5883
5936
|
if (isTabKey && focusedElement) {
|
|
5884
|
-
const container2 =
|
|
5937
|
+
const container2 = event2.currentTarget;
|
|
5885
5938
|
const [first, last] = getTabbableEdges(container2);
|
|
5886
5939
|
const hasTabbableElementsInside = first && last;
|
|
5887
5940
|
if (!hasTabbableElementsInside) {
|
|
5888
|
-
if (focusedElement === container2)
|
|
5941
|
+
if (focusedElement === container2) event2.preventDefault();
|
|
5889
5942
|
} else {
|
|
5890
|
-
if (!
|
|
5891
|
-
|
|
5943
|
+
if (!event2.shiftKey && focusedElement === last) {
|
|
5944
|
+
event2.preventDefault();
|
|
5892
5945
|
if (loop) focus(first, { select: true });
|
|
5893
|
-
} else if (
|
|
5894
|
-
|
|
5946
|
+
} else if (event2.shiftKey && focusedElement === first) {
|
|
5947
|
+
event2.preventDefault();
|
|
5895
5948
|
if (loop) focus(last, { select: true });
|
|
5896
5949
|
}
|
|
5897
5950
|
}
|
|
@@ -6515,10 +6568,10 @@ var getScrollVariables = function(axis, node) {
|
|
|
6515
6568
|
var getDirectionFactor = function(axis, direction) {
|
|
6516
6569
|
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
6517
6570
|
};
|
|
6518
|
-
var handleScroll = function(axis, endTarget,
|
|
6571
|
+
var handleScroll = function(axis, endTarget, event2, sourceDelta, noOverscroll) {
|
|
6519
6572
|
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
6520
6573
|
var delta = directionFactor * sourceDelta;
|
|
6521
|
-
var target =
|
|
6574
|
+
var target = event2.target;
|
|
6522
6575
|
var targetInLock = endTarget.contains(target);
|
|
6523
6576
|
var shouldCancelScroll = false;
|
|
6524
6577
|
var isDeltaPositive = delta > 0;
|
|
@@ -6552,11 +6605,11 @@ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
|
6552
6605
|
};
|
|
6553
6606
|
|
|
6554
6607
|
// node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
6555
|
-
var getTouchXY = function(
|
|
6556
|
-
return "changedTouches" in
|
|
6608
|
+
var getTouchXY = function(event2) {
|
|
6609
|
+
return "changedTouches" in event2 ? [event2.changedTouches[0].clientX, event2.changedTouches[0].clientY] : [0, 0];
|
|
6557
6610
|
};
|
|
6558
|
-
var getDeltaXY = function(
|
|
6559
|
-
return [
|
|
6611
|
+
var getDeltaXY = function(event2) {
|
|
6612
|
+
return [event2.deltaX, event2.deltaY];
|
|
6560
6613
|
};
|
|
6561
6614
|
var extractRef = function(ref) {
|
|
6562
6615
|
return ref && "current" in ref ? ref.current : ref;
|
|
@@ -6595,18 +6648,18 @@ function RemoveScrollSideCar(props) {
|
|
|
6595
6648
|
}
|
|
6596
6649
|
return;
|
|
6597
6650
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
6598
|
-
var shouldCancelEvent = React47.useCallback(function(
|
|
6599
|
-
if ("touches" in
|
|
6651
|
+
var shouldCancelEvent = React47.useCallback(function(event2, parent) {
|
|
6652
|
+
if ("touches" in event2 && event2.touches.length === 2 || event2.type === "wheel" && event2.ctrlKey) {
|
|
6600
6653
|
return !lastProps.current.allowPinchZoom;
|
|
6601
6654
|
}
|
|
6602
|
-
var touch = getTouchXY(
|
|
6655
|
+
var touch = getTouchXY(event2);
|
|
6603
6656
|
var touchStart = touchStartRef.current;
|
|
6604
|
-
var deltaX = "deltaX" in
|
|
6605
|
-
var deltaY = "deltaY" in
|
|
6657
|
+
var deltaX = "deltaX" in event2 ? event2.deltaX : touchStart[0] - touch[0];
|
|
6658
|
+
var deltaY = "deltaY" in event2 ? event2.deltaY : touchStart[1] - touch[1];
|
|
6606
6659
|
var currentAxis;
|
|
6607
|
-
var target =
|
|
6660
|
+
var target = event2.target;
|
|
6608
6661
|
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
6609
|
-
if ("touches" in
|
|
6662
|
+
if ("touches" in event2 && moveDirection === "h" && target.type === "range") {
|
|
6610
6663
|
return false;
|
|
6611
6664
|
}
|
|
6612
6665
|
var selection = window.getSelection();
|
|
@@ -6628,60 +6681,60 @@ function RemoveScrollSideCar(props) {
|
|
|
6628
6681
|
if (!canBeScrolledInMainDirection) {
|
|
6629
6682
|
return false;
|
|
6630
6683
|
}
|
|
6631
|
-
if (!activeAxis.current && "changedTouches" in
|
|
6684
|
+
if (!activeAxis.current && "changedTouches" in event2 && (deltaX || deltaY)) {
|
|
6632
6685
|
activeAxis.current = currentAxis;
|
|
6633
6686
|
}
|
|
6634
6687
|
if (!currentAxis) {
|
|
6635
6688
|
return true;
|
|
6636
6689
|
}
|
|
6637
6690
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
6638
|
-
return handleScroll(cancelingAxis, parent,
|
|
6691
|
+
return handleScroll(cancelingAxis, parent, event2, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
6639
6692
|
}, []);
|
|
6640
6693
|
var shouldPrevent = React47.useCallback(function(_event) {
|
|
6641
|
-
var
|
|
6694
|
+
var event2 = _event;
|
|
6642
6695
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
6643
6696
|
return;
|
|
6644
6697
|
}
|
|
6645
|
-
var delta = "deltaY" in
|
|
6698
|
+
var delta = "deltaY" in event2 ? getDeltaXY(event2) : getTouchXY(event2);
|
|
6646
6699
|
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
6647
|
-
return e.name ===
|
|
6700
|
+
return e.name === event2.type && (e.target === event2.target || event2.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
6648
6701
|
})[0];
|
|
6649
6702
|
if (sourceEvent && sourceEvent.should) {
|
|
6650
|
-
if (
|
|
6651
|
-
|
|
6703
|
+
if (event2.cancelable) {
|
|
6704
|
+
event2.preventDefault();
|
|
6652
6705
|
}
|
|
6653
6706
|
return;
|
|
6654
6707
|
}
|
|
6655
6708
|
if (!sourceEvent) {
|
|
6656
6709
|
var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
|
|
6657
|
-
return node.contains(
|
|
6710
|
+
return node.contains(event2.target);
|
|
6658
6711
|
});
|
|
6659
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(
|
|
6712
|
+
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event2, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
6660
6713
|
if (shouldStop) {
|
|
6661
|
-
if (
|
|
6662
|
-
|
|
6714
|
+
if (event2.cancelable) {
|
|
6715
|
+
event2.preventDefault();
|
|
6663
6716
|
}
|
|
6664
6717
|
}
|
|
6665
6718
|
}
|
|
6666
6719
|
}, []);
|
|
6667
6720
|
var shouldCancel = React47.useCallback(function(name, delta, target, should) {
|
|
6668
|
-
var
|
|
6669
|
-
shouldPreventQueue.current.push(
|
|
6721
|
+
var event2 = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
6722
|
+
shouldPreventQueue.current.push(event2);
|
|
6670
6723
|
setTimeout(function() {
|
|
6671
6724
|
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
6672
|
-
return e !==
|
|
6725
|
+
return e !== event2;
|
|
6673
6726
|
});
|
|
6674
6727
|
}, 1);
|
|
6675
6728
|
}, []);
|
|
6676
|
-
var scrollTouchStart = React47.useCallback(function(
|
|
6677
|
-
touchStartRef.current = getTouchXY(
|
|
6729
|
+
var scrollTouchStart = React47.useCallback(function(event2) {
|
|
6730
|
+
touchStartRef.current = getTouchXY(event2);
|
|
6678
6731
|
activeAxis.current = void 0;
|
|
6679
6732
|
}, []);
|
|
6680
|
-
var scrollWheel = React47.useCallback(function(
|
|
6681
|
-
shouldCancel(
|
|
6733
|
+
var scrollWheel = React47.useCallback(function(event2) {
|
|
6734
|
+
shouldCancel(event2.type, getDeltaXY(event2), event2.target, shouldCancelEvent(event2, props.lockRef.current));
|
|
6682
6735
|
}, []);
|
|
6683
|
-
var scrollTouchMove = React47.useCallback(function(
|
|
6684
|
-
shouldCancel(
|
|
6736
|
+
var scrollTouchMove = React47.useCallback(function(event2) {
|
|
6737
|
+
shouldCancel(event2.type, getTouchXY(event2), event2.target, shouldCancelEvent(event2, props.lockRef.current));
|
|
6685
6738
|
}, []);
|
|
6686
6739
|
React47.useEffect(function() {
|
|
6687
6740
|
lockStack.push(Style2);
|
|
@@ -6922,7 +6975,7 @@ var [PortalProvider2, usePortalContext2] = createDialogContext(PORTAL_NAME3, {
|
|
|
6922
6975
|
var DialogPortal = (props) => {
|
|
6923
6976
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
6924
6977
|
const context = useDialogContext(PORTAL_NAME3, __scopeDialog);
|
|
6925
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PortalProvider2, { scope: __scopeDialog, forceMount, children: React49.Children.map(children, (
|
|
6978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PortalProvider2, { scope: __scopeDialog, forceMount, children: React49.Children.map(children, (child16) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Portal, { asChild: true, container, children: child16 }) })) });
|
|
6926
6979
|
};
|
|
6927
6980
|
DialogPortal.displayName = PORTAL_NAME3;
|
|
6928
6981
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -6980,20 +7033,20 @@ var DialogContentModal = React49.forwardRef(
|
|
|
6980
7033
|
ref: composedRefs,
|
|
6981
7034
|
trapFocus: context.open,
|
|
6982
7035
|
disableOutsidePointerEvents: true,
|
|
6983
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (
|
|
7036
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event2) => {
|
|
6984
7037
|
var _a;
|
|
6985
|
-
|
|
7038
|
+
event2.preventDefault();
|
|
6986
7039
|
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
|
6987
7040
|
}),
|
|
6988
|
-
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (
|
|
6989
|
-
const originalEvent =
|
|
7041
|
+
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event2) => {
|
|
7042
|
+
const originalEvent = event2.detail.originalEvent;
|
|
6990
7043
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
6991
7044
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
6992
|
-
if (isRightClick)
|
|
7045
|
+
if (isRightClick) event2.preventDefault();
|
|
6993
7046
|
}),
|
|
6994
7047
|
onFocusOutside: composeEventHandlers(
|
|
6995
7048
|
props.onFocusOutside,
|
|
6996
|
-
(
|
|
7049
|
+
(event2) => event2.preventDefault()
|
|
6997
7050
|
)
|
|
6998
7051
|
})
|
|
6999
7052
|
);
|
|
@@ -7010,30 +7063,30 @@ var DialogContentNonModal = React49.forwardRef(
|
|
|
7010
7063
|
ref: forwardedRef,
|
|
7011
7064
|
trapFocus: false,
|
|
7012
7065
|
disableOutsidePointerEvents: false,
|
|
7013
|
-
onCloseAutoFocus: (
|
|
7066
|
+
onCloseAutoFocus: (event2) => {
|
|
7014
7067
|
var _a, _b;
|
|
7015
|
-
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props,
|
|
7016
|
-
if (!
|
|
7068
|
+
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event2);
|
|
7069
|
+
if (!event2.defaultPrevented) {
|
|
7017
7070
|
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
|
7018
|
-
|
|
7071
|
+
event2.preventDefault();
|
|
7019
7072
|
}
|
|
7020
7073
|
hasInteractedOutsideRef.current = false;
|
|
7021
7074
|
hasPointerDownOutsideRef.current = false;
|
|
7022
7075
|
},
|
|
7023
|
-
onInteractOutside: (
|
|
7076
|
+
onInteractOutside: (event2) => {
|
|
7024
7077
|
var _a, _b;
|
|
7025
|
-
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props,
|
|
7026
|
-
if (!
|
|
7078
|
+
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event2);
|
|
7079
|
+
if (!event2.defaultPrevented) {
|
|
7027
7080
|
hasInteractedOutsideRef.current = true;
|
|
7028
|
-
if (
|
|
7081
|
+
if (event2.detail.originalEvent.type === "pointerdown") {
|
|
7029
7082
|
hasPointerDownOutsideRef.current = true;
|
|
7030
7083
|
}
|
|
7031
7084
|
}
|
|
7032
|
-
const target =
|
|
7085
|
+
const target = event2.target;
|
|
7033
7086
|
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
|
7034
|
-
if (targetIsTrigger)
|
|
7035
|
-
if (
|
|
7036
|
-
|
|
7087
|
+
if (targetIsTrigger) event2.preventDefault();
|
|
7088
|
+
if (event2.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
7089
|
+
event2.preventDefault();
|
|
7037
7090
|
}
|
|
7038
7091
|
}
|
|
7039
7092
|
})
|
|
@@ -7365,7 +7418,7 @@ var MenuRootContentModal = React51.forwardRef(
|
|
|
7365
7418
|
disableOutsideScroll: true,
|
|
7366
7419
|
onFocusOutside: composeEventHandlers(
|
|
7367
7420
|
props.onFocusOutside,
|
|
7368
|
-
(
|
|
7421
|
+
(event2) => event2.preventDefault(),
|
|
7369
7422
|
{ checkForDefaultPrevented: false }
|
|
7370
7423
|
),
|
|
7371
7424
|
onDismiss: () => context.onOpenChange(false)
|
|
@@ -7456,10 +7509,10 @@ var MenuContentImpl = React51.forwardRef(
|
|
|
7456
7509
|
return () => window.clearTimeout(timerRef.current);
|
|
7457
7510
|
}, []);
|
|
7458
7511
|
useFocusGuards();
|
|
7459
|
-
const isPointerMovingToSubmenu = React51.useCallback((
|
|
7512
|
+
const isPointerMovingToSubmenu = React51.useCallback((event2) => {
|
|
7460
7513
|
var _a2, _b;
|
|
7461
7514
|
const isMovingTowards = pointerDirRef.current === ((_a2 = pointerGraceIntentRef.current) == null ? void 0 : _a2.side);
|
|
7462
|
-
return isMovingTowards && isPointerInGraceArea(
|
|
7515
|
+
return isMovingTowards && isPointerInGraceArea(event2, (_b = pointerGraceIntentRef.current) == null ? void 0 : _b.area);
|
|
7463
7516
|
}, []);
|
|
7464
7517
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7465
7518
|
MenuContentProvider,
|
|
@@ -7467,23 +7520,23 @@ var MenuContentImpl = React51.forwardRef(
|
|
|
7467
7520
|
scope: __scopeMenu,
|
|
7468
7521
|
searchRef,
|
|
7469
7522
|
onItemEnter: React51.useCallback(
|
|
7470
|
-
(
|
|
7471
|
-
if (isPointerMovingToSubmenu(
|
|
7523
|
+
(event2) => {
|
|
7524
|
+
if (isPointerMovingToSubmenu(event2)) event2.preventDefault();
|
|
7472
7525
|
},
|
|
7473
7526
|
[isPointerMovingToSubmenu]
|
|
7474
7527
|
),
|
|
7475
7528
|
onItemLeave: React51.useCallback(
|
|
7476
|
-
(
|
|
7529
|
+
(event2) => {
|
|
7477
7530
|
var _a2;
|
|
7478
|
-
if (isPointerMovingToSubmenu(
|
|
7531
|
+
if (isPointerMovingToSubmenu(event2)) return;
|
|
7479
7532
|
(_a2 = contentRef.current) == null ? void 0 : _a2.focus();
|
|
7480
7533
|
setCurrentItemId(null);
|
|
7481
7534
|
},
|
|
7482
7535
|
[isPointerMovingToSubmenu]
|
|
7483
7536
|
),
|
|
7484
7537
|
onTriggerLeave: React51.useCallback(
|
|
7485
|
-
(
|
|
7486
|
-
if (isPointerMovingToSubmenu(
|
|
7538
|
+
(event2) => {
|
|
7539
|
+
if (isPointerMovingToSubmenu(event2)) event2.preventDefault();
|
|
7487
7540
|
},
|
|
7488
7541
|
[isPointerMovingToSubmenu]
|
|
7489
7542
|
),
|
|
@@ -7496,9 +7549,9 @@ var MenuContentImpl = React51.forwardRef(
|
|
|
7496
7549
|
{
|
|
7497
7550
|
asChild: true,
|
|
7498
7551
|
trapped: trapFocus,
|
|
7499
|
-
onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (
|
|
7552
|
+
onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event2) => {
|
|
7500
7553
|
var _a2;
|
|
7501
|
-
|
|
7554
|
+
event2.preventDefault();
|
|
7502
7555
|
(_a2 = contentRef.current) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
7503
7556
|
}),
|
|
7504
7557
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
@@ -7522,8 +7575,8 @@ var MenuContentImpl = React51.forwardRef(
|
|
|
7522
7575
|
loop,
|
|
7523
7576
|
currentTabStopId: currentItemId,
|
|
7524
7577
|
onCurrentTabStopIdChange: setCurrentItemId,
|
|
7525
|
-
onEntryFocus: composeEventHandlers(onEntryFocus, (
|
|
7526
|
-
if (!rootContext.isUsingKeyboardRef.current)
|
|
7578
|
+
onEntryFocus: composeEventHandlers(onEntryFocus, (event2) => {
|
|
7579
|
+
if (!rootContext.isUsingKeyboardRef.current) event2.preventDefault();
|
|
7527
7580
|
}),
|
|
7528
7581
|
preventScrollOnEntryFocus: true,
|
|
7529
7582
|
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
@@ -7537,39 +7590,39 @@ var MenuContentImpl = React51.forwardRef(
|
|
|
7537
7590
|
}, popperScope), contentProps), {
|
|
7538
7591
|
ref: composedRefs,
|
|
7539
7592
|
style: __spreadValues({ outline: "none" }, contentProps.style),
|
|
7540
|
-
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (
|
|
7541
|
-
const target =
|
|
7542
|
-
const isKeyDownInside = target.closest("[data-radix-menu-content]") ===
|
|
7543
|
-
const isModifierKey =
|
|
7544
|
-
const isCharacterKey =
|
|
7593
|
+
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event2) => {
|
|
7594
|
+
const target = event2.target;
|
|
7595
|
+
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event2.currentTarget;
|
|
7596
|
+
const isModifierKey = event2.ctrlKey || event2.altKey || event2.metaKey;
|
|
7597
|
+
const isCharacterKey = event2.key.length === 1;
|
|
7545
7598
|
if (isKeyDownInside) {
|
|
7546
|
-
if (
|
|
7547
|
-
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(
|
|
7599
|
+
if (event2.key === "Tab") event2.preventDefault();
|
|
7600
|
+
if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event2.key);
|
|
7548
7601
|
}
|
|
7549
7602
|
const content = contentRef.current;
|
|
7550
|
-
if (
|
|
7551
|
-
if (!FIRST_LAST_KEYS.includes(
|
|
7552
|
-
|
|
7603
|
+
if (event2.target !== content) return;
|
|
7604
|
+
if (!FIRST_LAST_KEYS.includes(event2.key)) return;
|
|
7605
|
+
event2.preventDefault();
|
|
7553
7606
|
const items = getItems().filter((item) => !item.disabled);
|
|
7554
7607
|
const candidateNodes = items.map((item) => item.ref.current);
|
|
7555
|
-
if (LAST_KEYS.includes(
|
|
7608
|
+
if (LAST_KEYS.includes(event2.key)) candidateNodes.reverse();
|
|
7556
7609
|
focusFirst3(candidateNodes);
|
|
7557
7610
|
}),
|
|
7558
|
-
onBlur: composeEventHandlers(props.onBlur, (
|
|
7559
|
-
if (!
|
|
7611
|
+
onBlur: composeEventHandlers(props.onBlur, (event2) => {
|
|
7612
|
+
if (!event2.currentTarget.contains(event2.target)) {
|
|
7560
7613
|
window.clearTimeout(timerRef.current);
|
|
7561
7614
|
searchRef.current = "";
|
|
7562
7615
|
}
|
|
7563
7616
|
}),
|
|
7564
7617
|
onPointerMove: composeEventHandlers(
|
|
7565
7618
|
props.onPointerMove,
|
|
7566
|
-
whenMouse((
|
|
7567
|
-
const target =
|
|
7568
|
-
const pointerXHasChanged = lastPointerXRef.current !==
|
|
7569
|
-
if (
|
|
7570
|
-
const newDir =
|
|
7619
|
+
whenMouse((event2) => {
|
|
7620
|
+
const target = event2.target;
|
|
7621
|
+
const pointerXHasChanged = lastPointerXRef.current !== event2.clientX;
|
|
7622
|
+
if (event2.currentTarget.contains(target) && pointerXHasChanged) {
|
|
7623
|
+
const newDir = event2.clientX > lastPointerXRef.current ? "right" : "left";
|
|
7571
7624
|
pointerDirRef.current = newDir;
|
|
7572
|
-
lastPointerXRef.current =
|
|
7625
|
+
lastPointerXRef.current = event2.clientX;
|
|
7573
7626
|
}
|
|
7574
7627
|
})
|
|
7575
7628
|
)
|
|
@@ -7616,7 +7669,7 @@ var MenuItem = React51.forwardRef(
|
|
|
7616
7669
|
const menuItem = ref.current;
|
|
7617
7670
|
if (!disabled && menuItem) {
|
|
7618
7671
|
const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });
|
|
7619
|
-
menuItem.addEventListener(ITEM_SELECT, (
|
|
7672
|
+
menuItem.addEventListener(ITEM_SELECT, (event2) => onSelect == null ? void 0 : onSelect(event2), { once: true });
|
|
7620
7673
|
dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);
|
|
7621
7674
|
if (itemSelectEvent.defaultPrevented) {
|
|
7622
7675
|
isPointerDownRef.current = false;
|
|
@@ -7631,21 +7684,21 @@ var MenuItem = React51.forwardRef(
|
|
|
7631
7684
|
ref: composedRefs,
|
|
7632
7685
|
disabled,
|
|
7633
7686
|
onClick: composeEventHandlers(props.onClick, handleSelect),
|
|
7634
|
-
onPointerDown: (
|
|
7687
|
+
onPointerDown: (event2) => {
|
|
7635
7688
|
var _a2;
|
|
7636
|
-
(_a2 = props.onPointerDown) == null ? void 0 : _a2.call(props,
|
|
7689
|
+
(_a2 = props.onPointerDown) == null ? void 0 : _a2.call(props, event2);
|
|
7637
7690
|
isPointerDownRef.current = true;
|
|
7638
7691
|
},
|
|
7639
|
-
onPointerUp: composeEventHandlers(props.onPointerUp, (
|
|
7692
|
+
onPointerUp: composeEventHandlers(props.onPointerUp, (event2) => {
|
|
7640
7693
|
var _a2;
|
|
7641
|
-
if (!isPointerDownRef.current) (_a2 =
|
|
7694
|
+
if (!isPointerDownRef.current) (_a2 = event2.currentTarget) == null ? void 0 : _a2.click();
|
|
7642
7695
|
}),
|
|
7643
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (
|
|
7696
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event2) => {
|
|
7644
7697
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
7645
|
-
if (disabled || isTypingAhead &&
|
|
7646
|
-
if (SELECTION_KEYS.includes(
|
|
7647
|
-
|
|
7648
|
-
|
|
7698
|
+
if (disabled || isTypingAhead && event2.key === " ") return;
|
|
7699
|
+
if (SELECTION_KEYS.includes(event2.key)) {
|
|
7700
|
+
event2.currentTarget.click();
|
|
7701
|
+
event2.preventDefault();
|
|
7649
7702
|
}
|
|
7650
7703
|
})
|
|
7651
7704
|
})
|
|
@@ -7686,13 +7739,13 @@ var MenuItemImpl = React51.forwardRef(
|
|
|
7686
7739
|
ref: composedRefs,
|
|
7687
7740
|
onPointerMove: composeEventHandlers(
|
|
7688
7741
|
props.onPointerMove,
|
|
7689
|
-
whenMouse((
|
|
7742
|
+
whenMouse((event2) => {
|
|
7690
7743
|
if (disabled) {
|
|
7691
|
-
contentContext.onItemLeave(
|
|
7744
|
+
contentContext.onItemLeave(event2);
|
|
7692
7745
|
} else {
|
|
7693
|
-
contentContext.onItemEnter(
|
|
7694
|
-
if (!
|
|
7695
|
-
const item =
|
|
7746
|
+
contentContext.onItemEnter(event2);
|
|
7747
|
+
if (!event2.defaultPrevented) {
|
|
7748
|
+
const item = event2.currentTarget;
|
|
7696
7749
|
item.focus({ preventScroll: true });
|
|
7697
7750
|
}
|
|
7698
7751
|
}
|
|
@@ -7700,7 +7753,7 @@ var MenuItemImpl = React51.forwardRef(
|
|
|
7700
7753
|
),
|
|
7701
7754
|
onPointerLeave: composeEventHandlers(
|
|
7702
7755
|
props.onPointerLeave,
|
|
7703
|
-
whenMouse((
|
|
7756
|
+
whenMouse((event2) => contentContext.onItemLeave(event2))
|
|
7704
7757
|
),
|
|
7705
7758
|
onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),
|
|
7706
7759
|
onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))
|
|
@@ -7891,18 +7944,18 @@ var MenuSubTrigger = React51.forwardRef(
|
|
|
7891
7944
|
"data-state": getOpenState(context.open)
|
|
7892
7945
|
}, props), {
|
|
7893
7946
|
ref: composeRefs(forwardedRef, subContext.onTriggerChange),
|
|
7894
|
-
onClick: (
|
|
7947
|
+
onClick: (event2) => {
|
|
7895
7948
|
var _a;
|
|
7896
|
-
(_a = props.onClick) == null ? void 0 : _a.call(props,
|
|
7897
|
-
if (props.disabled ||
|
|
7898
|
-
|
|
7949
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props, event2);
|
|
7950
|
+
if (props.disabled || event2.defaultPrevented) return;
|
|
7951
|
+
event2.currentTarget.focus();
|
|
7899
7952
|
if (!context.open) context.onOpenChange(true);
|
|
7900
7953
|
},
|
|
7901
7954
|
onPointerMove: composeEventHandlers(
|
|
7902
7955
|
props.onPointerMove,
|
|
7903
|
-
whenMouse((
|
|
7904
|
-
contentContext.onItemEnter(
|
|
7905
|
-
if (
|
|
7956
|
+
whenMouse((event2) => {
|
|
7957
|
+
contentContext.onItemEnter(event2);
|
|
7958
|
+
if (event2.defaultPrevented) return;
|
|
7906
7959
|
if (!props.disabled && !context.open && !openTimerRef.current) {
|
|
7907
7960
|
contentContext.onPointerGraceIntentChange(null);
|
|
7908
7961
|
openTimerRef.current = window.setTimeout(() => {
|
|
@@ -7914,7 +7967,7 @@ var MenuSubTrigger = React51.forwardRef(
|
|
|
7914
7967
|
),
|
|
7915
7968
|
onPointerLeave: composeEventHandlers(
|
|
7916
7969
|
props.onPointerLeave,
|
|
7917
|
-
whenMouse((
|
|
7970
|
+
whenMouse((event2) => {
|
|
7918
7971
|
var _a, _b;
|
|
7919
7972
|
clearOpenTimer();
|
|
7920
7973
|
const contentRect = (_a = context.content) == null ? void 0 : _a.getBoundingClientRect();
|
|
@@ -7928,7 +7981,7 @@ var MenuSubTrigger = React51.forwardRef(
|
|
|
7928
7981
|
area: [
|
|
7929
7982
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
7930
7983
|
// consistently within polygon bounds
|
|
7931
|
-
{ x:
|
|
7984
|
+
{ x: event2.clientX + bleed, y: event2.clientY },
|
|
7932
7985
|
{ x: contentNearEdge, y: contentRect.top },
|
|
7933
7986
|
{ x: contentFarEdge, y: contentRect.top },
|
|
7934
7987
|
{ x: contentFarEdge, y: contentRect.bottom },
|
|
@@ -7942,20 +7995,20 @@ var MenuSubTrigger = React51.forwardRef(
|
|
|
7942
7995
|
300
|
|
7943
7996
|
);
|
|
7944
7997
|
} else {
|
|
7945
|
-
contentContext.onTriggerLeave(
|
|
7946
|
-
if (
|
|
7998
|
+
contentContext.onTriggerLeave(event2);
|
|
7999
|
+
if (event2.defaultPrevented) return;
|
|
7947
8000
|
contentContext.onPointerGraceIntentChange(null);
|
|
7948
8001
|
}
|
|
7949
8002
|
})
|
|
7950
8003
|
),
|
|
7951
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (
|
|
8004
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event2) => {
|
|
7952
8005
|
var _a;
|
|
7953
8006
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
7954
|
-
if (props.disabled || isTypingAhead &&
|
|
7955
|
-
if (SUB_OPEN_KEYS[rootContext.dir].includes(
|
|
8007
|
+
if (props.disabled || isTypingAhead && event2.key === " ") return;
|
|
8008
|
+
if (SUB_OPEN_KEYS[rootContext.dir].includes(event2.key)) {
|
|
7956
8009
|
context.onOpenChange(true);
|
|
7957
8010
|
(_a = context.content) == null ? void 0 : _a.focus();
|
|
7958
|
-
|
|
8011
|
+
event2.preventDefault();
|
|
7959
8012
|
}
|
|
7960
8013
|
})
|
|
7961
8014
|
})
|
|
@@ -7985,27 +8038,27 @@ var MenuSubContent = React51.forwardRef(
|
|
|
7985
8038
|
disableOutsidePointerEvents: false,
|
|
7986
8039
|
disableOutsideScroll: false,
|
|
7987
8040
|
trapFocus: false,
|
|
7988
|
-
onOpenAutoFocus: (
|
|
8041
|
+
onOpenAutoFocus: (event2) => {
|
|
7989
8042
|
var _a2;
|
|
7990
8043
|
if (rootContext.isUsingKeyboardRef.current) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
7991
|
-
|
|
8044
|
+
event2.preventDefault();
|
|
7992
8045
|
},
|
|
7993
|
-
onCloseAutoFocus: (
|
|
7994
|
-
onFocusOutside: composeEventHandlers(props.onFocusOutside, (
|
|
7995
|
-
if (
|
|
8046
|
+
onCloseAutoFocus: (event2) => event2.preventDefault(),
|
|
8047
|
+
onFocusOutside: composeEventHandlers(props.onFocusOutside, (event2) => {
|
|
8048
|
+
if (event2.target !== subContext.trigger) context.onOpenChange(false);
|
|
7996
8049
|
}),
|
|
7997
|
-
onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (
|
|
8050
|
+
onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event2) => {
|
|
7998
8051
|
rootContext.onClose();
|
|
7999
|
-
|
|
8052
|
+
event2.preventDefault();
|
|
8000
8053
|
}),
|
|
8001
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (
|
|
8054
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event2) => {
|
|
8002
8055
|
var _a2;
|
|
8003
|
-
const isKeyDownInside =
|
|
8004
|
-
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(
|
|
8056
|
+
const isKeyDownInside = event2.currentTarget.contains(event2.target);
|
|
8057
|
+
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event2.key);
|
|
8005
8058
|
if (isKeyDownInside && isCloseKey) {
|
|
8006
8059
|
context.onOpenChange(false);
|
|
8007
8060
|
(_a2 = subContext.trigger) == null ? void 0 : _a2.focus();
|
|
8008
|
-
|
|
8061
|
+
event2.preventDefault();
|
|
8009
8062
|
}
|
|
8010
8063
|
})
|
|
8011
8064
|
})
|
|
@@ -8060,13 +8113,13 @@ function isPointInPolygon2(point, polygon) {
|
|
|
8060
8113
|
}
|
|
8061
8114
|
return inside;
|
|
8062
8115
|
}
|
|
8063
|
-
function isPointerInGraceArea(
|
|
8116
|
+
function isPointerInGraceArea(event2, area) {
|
|
8064
8117
|
if (!area) return false;
|
|
8065
|
-
const cursorPos = { x:
|
|
8118
|
+
const cursorPos = { x: event2.clientX, y: event2.clientY };
|
|
8066
8119
|
return isPointInPolygon2(cursorPos, area);
|
|
8067
8120
|
}
|
|
8068
8121
|
function whenMouse(handler) {
|
|
8069
|
-
return (
|
|
8122
|
+
return (event2) => event2.pointerType === "mouse" ? handler(event2) : void 0;
|
|
8070
8123
|
}
|
|
8071
8124
|
var Root33 = Menu;
|
|
8072
8125
|
var Anchor2 = MenuAnchor;
|
|
@@ -8147,17 +8200,17 @@ var DropdownMenuTrigger = React52.forwardRef(
|
|
|
8147
8200
|
disabled
|
|
8148
8201
|
}, triggerProps), {
|
|
8149
8202
|
ref: composeRefs(forwardedRef, context.triggerRef),
|
|
8150
|
-
onPointerDown: composeEventHandlers(props.onPointerDown, (
|
|
8151
|
-
if (!disabled &&
|
|
8203
|
+
onPointerDown: composeEventHandlers(props.onPointerDown, (event2) => {
|
|
8204
|
+
if (!disabled && event2.button === 0 && event2.ctrlKey === false) {
|
|
8152
8205
|
context.onOpenToggle();
|
|
8153
|
-
if (!context.open)
|
|
8206
|
+
if (!context.open) event2.preventDefault();
|
|
8154
8207
|
}
|
|
8155
8208
|
}),
|
|
8156
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (
|
|
8209
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event2) => {
|
|
8157
8210
|
if (disabled) return;
|
|
8158
|
-
if (["Enter", " "].includes(
|
|
8159
|
-
if (
|
|
8160
|
-
if (["Enter", " ", "ArrowDown"].includes(
|
|
8211
|
+
if (["Enter", " "].includes(event2.key)) context.onOpenToggle();
|
|
8212
|
+
if (event2.key === "ArrowDown") context.onOpenChange(true);
|
|
8213
|
+
if (["Enter", " ", "ArrowDown"].includes(event2.key)) event2.preventDefault();
|
|
8161
8214
|
})
|
|
8162
8215
|
})
|
|
8163
8216
|
) }));
|
|
@@ -8185,14 +8238,14 @@ var DropdownMenuContent = React52.forwardRef(
|
|
|
8185
8238
|
"aria-labelledby": context.triggerId
|
|
8186
8239
|
}, menuScope), contentProps), {
|
|
8187
8240
|
ref: forwardedRef,
|
|
8188
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (
|
|
8241
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event2) => {
|
|
8189
8242
|
var _a2;
|
|
8190
8243
|
if (!hasInteractedOutsideRef.current) (_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
|
|
8191
8244
|
hasInteractedOutsideRef.current = false;
|
|
8192
|
-
|
|
8245
|
+
event2.preventDefault();
|
|
8193
8246
|
}),
|
|
8194
|
-
onInteractOutside: composeEventHandlers(props.onInteractOutside, (
|
|
8195
|
-
const originalEvent =
|
|
8247
|
+
onInteractOutside: composeEventHandlers(props.onInteractOutside, (event2) => {
|
|
8248
|
+
const originalEvent = event2.detail.originalEvent;
|
|
8196
8249
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
8197
8250
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
8198
8251
|
if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
|
|
@@ -8626,7 +8679,7 @@ var Select = (props) => {
|
|
|
8626
8679
|
name,
|
|
8627
8680
|
autoComplete,
|
|
8628
8681
|
value,
|
|
8629
|
-
onChange: (
|
|
8682
|
+
onChange: (event2) => setValue(event2.target.value),
|
|
8630
8683
|
disabled,
|
|
8631
8684
|
form,
|
|
8632
8685
|
children: [
|
|
@@ -8687,31 +8740,31 @@ var SelectTrigger = React56.forwardRef(
|
|
|
8687
8740
|
"data-placeholder": shouldShowPlaceholder(context.value) ? "" : void 0
|
|
8688
8741
|
}, triggerProps), {
|
|
8689
8742
|
ref: composedRefs,
|
|
8690
|
-
onClick: composeEventHandlers(triggerProps.onClick, (
|
|
8691
|
-
|
|
8743
|
+
onClick: composeEventHandlers(triggerProps.onClick, (event2) => {
|
|
8744
|
+
event2.currentTarget.focus();
|
|
8692
8745
|
if (pointerTypeRef.current !== "mouse") {
|
|
8693
|
-
handleOpen(
|
|
8746
|
+
handleOpen(event2);
|
|
8694
8747
|
}
|
|
8695
8748
|
}),
|
|
8696
|
-
onPointerDown: composeEventHandlers(triggerProps.onPointerDown, (
|
|
8697
|
-
pointerTypeRef.current =
|
|
8698
|
-
const target =
|
|
8699
|
-
if (target.hasPointerCapture(
|
|
8700
|
-
target.releasePointerCapture(
|
|
8749
|
+
onPointerDown: composeEventHandlers(triggerProps.onPointerDown, (event2) => {
|
|
8750
|
+
pointerTypeRef.current = event2.pointerType;
|
|
8751
|
+
const target = event2.target;
|
|
8752
|
+
if (target.hasPointerCapture(event2.pointerId)) {
|
|
8753
|
+
target.releasePointerCapture(event2.pointerId);
|
|
8701
8754
|
}
|
|
8702
|
-
if (
|
|
8703
|
-
handleOpen(
|
|
8704
|
-
|
|
8755
|
+
if (event2.button === 0 && event2.ctrlKey === false && event2.pointerType === "mouse") {
|
|
8756
|
+
handleOpen(event2);
|
|
8757
|
+
event2.preventDefault();
|
|
8705
8758
|
}
|
|
8706
8759
|
}),
|
|
8707
|
-
onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (
|
|
8760
|
+
onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (event2) => {
|
|
8708
8761
|
const isTypingAhead = searchRef.current !== "";
|
|
8709
|
-
const isModifierKey =
|
|
8710
|
-
if (!isModifierKey &&
|
|
8711
|
-
if (isTypingAhead &&
|
|
8712
|
-
if (OPEN_KEYS.includes(
|
|
8762
|
+
const isModifierKey = event2.ctrlKey || event2.altKey || event2.metaKey;
|
|
8763
|
+
if (!isModifierKey && event2.key.length === 1) handleTypeaheadSearch(event2.key);
|
|
8764
|
+
if (isTypingAhead && event2.key === " ") return;
|
|
8765
|
+
if (OPEN_KEYS.includes(event2.key)) {
|
|
8713
8766
|
handleOpen();
|
|
8714
|
-
|
|
8767
|
+
event2.preventDefault();
|
|
8715
8768
|
}
|
|
8716
8769
|
})
|
|
8717
8770
|
})
|
|
@@ -8858,18 +8911,18 @@ var SelectContentImpl = React56.forwardRef(
|
|
|
8858
8911
|
React56.useEffect(() => {
|
|
8859
8912
|
if (content) {
|
|
8860
8913
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
8861
|
-
const handlePointerMove = (
|
|
8914
|
+
const handlePointerMove = (event2) => {
|
|
8862
8915
|
var _a2, _b, _c, _d;
|
|
8863
8916
|
pointerMoveDelta = {
|
|
8864
|
-
x: Math.abs(Math.round(
|
|
8865
|
-
y: Math.abs(Math.round(
|
|
8917
|
+
x: Math.abs(Math.round(event2.pageX) - ((_b = (_a2 = triggerPointerDownPosRef.current) == null ? void 0 : _a2.x) != null ? _b : 0)),
|
|
8918
|
+
y: Math.abs(Math.round(event2.pageY) - ((_d = (_c = triggerPointerDownPosRef.current) == null ? void 0 : _c.y) != null ? _d : 0))
|
|
8866
8919
|
};
|
|
8867
8920
|
};
|
|
8868
|
-
const handlePointerUp = (
|
|
8921
|
+
const handlePointerUp = (event2) => {
|
|
8869
8922
|
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {
|
|
8870
|
-
|
|
8923
|
+
event2.preventDefault();
|
|
8871
8924
|
} else {
|
|
8872
|
-
if (!content.contains(
|
|
8925
|
+
if (!content.contains(event2.target)) {
|
|
8873
8926
|
onOpenChange(false);
|
|
8874
8927
|
}
|
|
8875
8928
|
}
|
|
@@ -8959,13 +9012,13 @@ var SelectContentImpl = React56.forwardRef(
|
|
|
8959
9012
|
{
|
|
8960
9013
|
asChild: true,
|
|
8961
9014
|
trapped: context.open,
|
|
8962
|
-
onMountAutoFocus: (
|
|
8963
|
-
|
|
9015
|
+
onMountAutoFocus: (event2) => {
|
|
9016
|
+
event2.preventDefault();
|
|
8964
9017
|
},
|
|
8965
|
-
onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (
|
|
9018
|
+
onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event2) => {
|
|
8966
9019
|
var _a2;
|
|
8967
9020
|
(_a2 = context.trigger) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
8968
|
-
|
|
9021
|
+
event2.preventDefault();
|
|
8969
9022
|
}),
|
|
8970
9023
|
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8971
9024
|
DismissableLayer,
|
|
@@ -8974,7 +9027,7 @@ var SelectContentImpl = React56.forwardRef(
|
|
|
8974
9027
|
disableOutsidePointerEvents: true,
|
|
8975
9028
|
onEscapeKeyDown,
|
|
8976
9029
|
onPointerDownOutside,
|
|
8977
|
-
onFocusOutside: (
|
|
9030
|
+
onFocusOutside: (event2) => event2.preventDefault(),
|
|
8978
9031
|
onDismiss: () => context.onOpenChange(false),
|
|
8979
9032
|
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8980
9033
|
SelectPosition,
|
|
@@ -8983,7 +9036,7 @@ var SelectContentImpl = React56.forwardRef(
|
|
|
8983
9036
|
id: context.contentId,
|
|
8984
9037
|
"data-state": context.open ? "open" : "closed",
|
|
8985
9038
|
dir: context.dir,
|
|
8986
|
-
onContextMenu: (
|
|
9039
|
+
onContextMenu: (event2) => event2.preventDefault()
|
|
8987
9040
|
}, contentProps), popperContentProps), {
|
|
8988
9041
|
onPlaced: () => setIsPositioned(true),
|
|
8989
9042
|
ref: composedRefs,
|
|
@@ -8994,23 +9047,23 @@ var SelectContentImpl = React56.forwardRef(
|
|
|
8994
9047
|
// reset the outline by default as the content MAY get focused
|
|
8995
9048
|
outline: "none"
|
|
8996
9049
|
}, contentProps.style),
|
|
8997
|
-
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (
|
|
8998
|
-
const isModifierKey =
|
|
8999
|
-
if (
|
|
9000
|
-
if (!isModifierKey &&
|
|
9001
|
-
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(
|
|
9050
|
+
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event2) => {
|
|
9051
|
+
const isModifierKey = event2.ctrlKey || event2.altKey || event2.metaKey;
|
|
9052
|
+
if (event2.key === "Tab") event2.preventDefault();
|
|
9053
|
+
if (!isModifierKey && event2.key.length === 1) handleTypeaheadSearch(event2.key);
|
|
9054
|
+
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(event2.key)) {
|
|
9002
9055
|
const items = getItems().filter((item) => !item.disabled);
|
|
9003
9056
|
let candidateNodes = items.map((item) => item.ref.current);
|
|
9004
|
-
if (["ArrowUp", "End"].includes(
|
|
9057
|
+
if (["ArrowUp", "End"].includes(event2.key)) {
|
|
9005
9058
|
candidateNodes = candidateNodes.slice().reverse();
|
|
9006
9059
|
}
|
|
9007
|
-
if (["ArrowUp", "ArrowDown"].includes(
|
|
9008
|
-
const currentElement =
|
|
9060
|
+
if (["ArrowUp", "ArrowDown"].includes(event2.key)) {
|
|
9061
|
+
const currentElement = event2.target;
|
|
9009
9062
|
const currentIndex = candidateNodes.indexOf(currentElement);
|
|
9010
9063
|
candidateNodes = candidateNodes.slice(currentIndex + 1);
|
|
9011
9064
|
}
|
|
9012
9065
|
setTimeout(() => focusFirst4(candidateNodes));
|
|
9013
|
-
|
|
9066
|
+
event2.preventDefault();
|
|
9014
9067
|
}
|
|
9015
9068
|
})
|
|
9016
9069
|
})
|
|
@@ -9256,8 +9309,8 @@ var SelectViewport = React56.forwardRef(
|
|
|
9256
9309
|
// https://developer.chrome.com/blog/vertical-form-controls
|
|
9257
9310
|
overflow: "hidden auto"
|
|
9258
9311
|
}, viewportProps.style),
|
|
9259
|
-
onScroll: composeEventHandlers(viewportProps.onScroll, (
|
|
9260
|
-
const viewport =
|
|
9312
|
+
onScroll: composeEventHandlers(viewportProps.onScroll, (event2) => {
|
|
9313
|
+
const viewport = event2.currentTarget;
|
|
9261
9314
|
const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;
|
|
9262
9315
|
if ((shouldExpandOnScrollRef == null ? void 0 : shouldExpandOnScrollRef.current) && contentWrapper) {
|
|
9263
9316
|
const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);
|
|
@@ -9387,30 +9440,30 @@ var SelectItem = React56.forwardRef(
|
|
|
9387
9440
|
onPointerUp: composeEventHandlers(itemProps.onPointerUp, () => {
|
|
9388
9441
|
if (pointerTypeRef.current === "mouse") handleSelect();
|
|
9389
9442
|
}),
|
|
9390
|
-
onPointerDown: composeEventHandlers(itemProps.onPointerDown, (
|
|
9391
|
-
pointerTypeRef.current =
|
|
9443
|
+
onPointerDown: composeEventHandlers(itemProps.onPointerDown, (event2) => {
|
|
9444
|
+
pointerTypeRef.current = event2.pointerType;
|
|
9392
9445
|
}),
|
|
9393
|
-
onPointerMove: composeEventHandlers(itemProps.onPointerMove, (
|
|
9446
|
+
onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event2) => {
|
|
9394
9447
|
var _a2;
|
|
9395
|
-
pointerTypeRef.current =
|
|
9448
|
+
pointerTypeRef.current = event2.pointerType;
|
|
9396
9449
|
if (disabled) {
|
|
9397
9450
|
(_a2 = contentContext.onItemLeave) == null ? void 0 : _a2.call(contentContext);
|
|
9398
9451
|
} else if (pointerTypeRef.current === "mouse") {
|
|
9399
|
-
|
|
9452
|
+
event2.currentTarget.focus({ preventScroll: true });
|
|
9400
9453
|
}
|
|
9401
9454
|
}),
|
|
9402
|
-
onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (
|
|
9455
|
+
onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event2) => {
|
|
9403
9456
|
var _a2;
|
|
9404
|
-
if (
|
|
9457
|
+
if (event2.currentTarget === document.activeElement) {
|
|
9405
9458
|
(_a2 = contentContext.onItemLeave) == null ? void 0 : _a2.call(contentContext);
|
|
9406
9459
|
}
|
|
9407
9460
|
}),
|
|
9408
|
-
onKeyDown: composeEventHandlers(itemProps.onKeyDown, (
|
|
9461
|
+
onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event2) => {
|
|
9409
9462
|
var _a2;
|
|
9410
9463
|
const isTypingAhead = ((_a2 = contentContext.searchRef) == null ? void 0 : _a2.current) !== "";
|
|
9411
|
-
if (isTypingAhead &&
|
|
9412
|
-
if (SELECTION_KEYS2.includes(
|
|
9413
|
-
if (
|
|
9464
|
+
if (isTypingAhead && event2.key === " ") return;
|
|
9465
|
+
if (SELECTION_KEYS2.includes(event2.key)) handleSelect();
|
|
9466
|
+
if (event2.key === " ") event2.preventDefault();
|
|
9414
9467
|
})
|
|
9415
9468
|
})
|
|
9416
9469
|
)
|
|
@@ -9612,9 +9665,9 @@ var SelectBubbleInput = React56.forwardRef(
|
|
|
9612
9665
|
);
|
|
9613
9666
|
const setValue = descriptor.set;
|
|
9614
9667
|
if (prevValue !== value && setValue) {
|
|
9615
|
-
const
|
|
9668
|
+
const event2 = new Event("change", { bubbles: true });
|
|
9616
9669
|
setValue.call(select, value);
|
|
9617
|
-
select.dispatchEvent(
|
|
9670
|
+
select.dispatchEvent(event2);
|
|
9618
9671
|
}
|
|
9619
9672
|
}, [prevValue, value]);
|
|
9620
9673
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
@@ -9892,9 +9945,9 @@ var CheckboxTrigger = React58.forwardRef(
|
|
|
9892
9945
|
React58.useEffect(() => {
|
|
9893
9946
|
const form = control == null ? void 0 : control.form;
|
|
9894
9947
|
if (form) {
|
|
9895
|
-
const
|
|
9896
|
-
form.addEventListener("reset",
|
|
9897
|
-
return () => form.removeEventListener("reset",
|
|
9948
|
+
const reset16 = () => setChecked(initialCheckedStateRef.current);
|
|
9949
|
+
form.addEventListener("reset", reset16);
|
|
9950
|
+
return () => form.removeEventListener("reset", reset16);
|
|
9898
9951
|
}
|
|
9899
9952
|
}, [control, setChecked]);
|
|
9900
9953
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -9910,14 +9963,14 @@ var CheckboxTrigger = React58.forwardRef(
|
|
|
9910
9963
|
value
|
|
9911
9964
|
}, checkboxProps), {
|
|
9912
9965
|
ref: composedRefs,
|
|
9913
|
-
onKeyDown: composeEventHandlers(onKeyDown, (
|
|
9914
|
-
if (
|
|
9966
|
+
onKeyDown: composeEventHandlers(onKeyDown, (event2) => {
|
|
9967
|
+
if (event2.key === "Enter") event2.preventDefault();
|
|
9915
9968
|
}),
|
|
9916
|
-
onClick: composeEventHandlers(onClick, (
|
|
9969
|
+
onClick: composeEventHandlers(onClick, (event2) => {
|
|
9917
9970
|
setChecked((prevChecked) => isIndeterminate2(prevChecked) ? true : !prevChecked);
|
|
9918
9971
|
if (bubbleInput && isFormControl) {
|
|
9919
|
-
hasConsumerStoppedPropagationRef.current =
|
|
9920
|
-
if (!hasConsumerStoppedPropagationRef.current)
|
|
9972
|
+
hasConsumerStoppedPropagationRef.current = event2.isPropagationStopped();
|
|
9973
|
+
if (!hasConsumerStoppedPropagationRef.current) event2.stopPropagation();
|
|
9921
9974
|
}
|
|
9922
9975
|
})
|
|
9923
9976
|
})
|
|
@@ -10035,10 +10088,10 @@ var CheckboxBubbleInput = React58.forwardRef(
|
|
|
10035
10088
|
const setChecked = descriptor.set;
|
|
10036
10089
|
const bubbles = !hasConsumerStoppedPropagationRef.current;
|
|
10037
10090
|
if (prevChecked !== checked && setChecked) {
|
|
10038
|
-
const
|
|
10091
|
+
const event2 = new Event("click", { bubbles });
|
|
10039
10092
|
input.indeterminate = isIndeterminate2(checked);
|
|
10040
10093
|
setChecked.call(input, isIndeterminate2(checked) ? false : checked);
|
|
10041
|
-
input.dispatchEvent(
|
|
10094
|
+
input.dispatchEvent(event2);
|
|
10042
10095
|
}
|
|
10043
10096
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
10044
10097
|
const defaultCheckedRef = React58.useRef(isIndeterminate2(checked) ? false : checked);
|
|
@@ -10156,11 +10209,11 @@ var Switch = React60.forwardRef(
|
|
|
10156
10209
|
value
|
|
10157
10210
|
}, switchProps), {
|
|
10158
10211
|
ref: composedRefs,
|
|
10159
|
-
onClick: composeEventHandlers(props.onClick, (
|
|
10212
|
+
onClick: composeEventHandlers(props.onClick, (event2) => {
|
|
10160
10213
|
setChecked((prevChecked) => !prevChecked);
|
|
10161
10214
|
if (isFormControl) {
|
|
10162
|
-
hasConsumerStoppedPropagationRef.current =
|
|
10163
|
-
if (!hasConsumerStoppedPropagationRef.current)
|
|
10215
|
+
hasConsumerStoppedPropagationRef.current = event2.isPropagationStopped();
|
|
10216
|
+
if (!hasConsumerStoppedPropagationRef.current) event2.stopPropagation();
|
|
10164
10217
|
}
|
|
10165
10218
|
})
|
|
10166
10219
|
})
|
|
@@ -10228,9 +10281,9 @@ var SwitchBubbleInput = React60.forwardRef(
|
|
|
10228
10281
|
);
|
|
10229
10282
|
const setChecked = descriptor.set;
|
|
10230
10283
|
if (prevChecked !== checked && setChecked) {
|
|
10231
|
-
const
|
|
10284
|
+
const event2 = new Event("click", { bubbles });
|
|
10232
10285
|
setChecked.call(input, checked);
|
|
10233
|
-
input.dispatchEvent(
|
|
10286
|
+
input.dispatchEvent(event2);
|
|
10234
10287
|
}
|
|
10235
10288
|
}, [prevChecked, checked, bubbles]);
|
|
10236
10289
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
@@ -10326,11 +10379,11 @@ var Radio = React62.forwardRef(
|
|
|
10326
10379
|
value
|
|
10327
10380
|
}, radioProps), {
|
|
10328
10381
|
ref: composedRefs,
|
|
10329
|
-
onClick: composeEventHandlers(props.onClick, (
|
|
10382
|
+
onClick: composeEventHandlers(props.onClick, (event2) => {
|
|
10330
10383
|
if (!checked) onCheck == null ? void 0 : onCheck();
|
|
10331
10384
|
if (isFormControl) {
|
|
10332
|
-
hasConsumerStoppedPropagationRef.current =
|
|
10333
|
-
if (!hasConsumerStoppedPropagationRef.current)
|
|
10385
|
+
hasConsumerStoppedPropagationRef.current = event2.isPropagationStopped();
|
|
10386
|
+
if (!hasConsumerStoppedPropagationRef.current) event2.stopPropagation();
|
|
10334
10387
|
}
|
|
10335
10388
|
})
|
|
10336
10389
|
})
|
|
@@ -10398,9 +10451,9 @@ var RadioBubbleInput = React62.forwardRef(
|
|
|
10398
10451
|
);
|
|
10399
10452
|
const setChecked = descriptor.set;
|
|
10400
10453
|
if (prevChecked !== checked && setChecked) {
|
|
10401
|
-
const
|
|
10454
|
+
const event2 = new Event("click", { bubbles });
|
|
10402
10455
|
setChecked.call(input, checked);
|
|
10403
|
-
input.dispatchEvent(
|
|
10456
|
+
input.dispatchEvent(event2);
|
|
10404
10457
|
}
|
|
10405
10458
|
}, [prevChecked, checked, bubbles]);
|
|
10406
10459
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
@@ -10517,8 +10570,8 @@ var RadioGroupItem = React210.forwardRef(
|
|
|
10517
10570
|
const checked = context.value === itemProps.value;
|
|
10518
10571
|
const isArrowKeyPressedRef = React210.useRef(false);
|
|
10519
10572
|
React210.useEffect(() => {
|
|
10520
|
-
const handleKeyDown = (
|
|
10521
|
-
if (ARROW_KEYS.includes(
|
|
10573
|
+
const handleKeyDown = (event2) => {
|
|
10574
|
+
if (ARROW_KEYS.includes(event2.key)) {
|
|
10522
10575
|
isArrowKeyPressedRef.current = true;
|
|
10523
10576
|
}
|
|
10524
10577
|
};
|
|
@@ -10547,8 +10600,8 @@ var RadioGroupItem = React210.forwardRef(
|
|
|
10547
10600
|
name: context.name,
|
|
10548
10601
|
ref: composedRefs,
|
|
10549
10602
|
onCheck: () => context.onValueChange(itemProps.value),
|
|
10550
|
-
onKeyDown: composeEventHandlers((
|
|
10551
|
-
if (
|
|
10603
|
+
onKeyDown: composeEventHandlers((event2) => {
|
|
10604
|
+
if (event2.key === "Enter") event2.preventDefault();
|
|
10552
10605
|
}),
|
|
10553
10606
|
onFocus: composeEventHandlers(itemProps.onFocus, () => {
|
|
10554
10607
|
var _a2;
|
|
@@ -10640,12 +10693,12 @@ function createSlot2(ownerName) {
|
|
|
10640
10693
|
const slottable = childrenArray.find(isSlottable2);
|
|
10641
10694
|
if (slottable) {
|
|
10642
10695
|
const newElement = slottable.props.children;
|
|
10643
|
-
const newChildren = childrenArray.map((
|
|
10644
|
-
if (
|
|
10696
|
+
const newChildren = childrenArray.map((child16) => {
|
|
10697
|
+
if (child16 === slottable) {
|
|
10645
10698
|
if (React64.Children.count(newElement) > 1) return React64.Children.only(null);
|
|
10646
10699
|
return React64.isValidElement(newElement) ? newElement.props.children : null;
|
|
10647
10700
|
} else {
|
|
10648
|
-
return
|
|
10701
|
+
return child16;
|
|
10649
10702
|
}
|
|
10650
10703
|
});
|
|
10651
10704
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React64.isValidElement(newElement) ? React64.cloneElement(newElement, void 0, newChildren) : null }));
|
|
@@ -10676,8 +10729,8 @@ function createSlotClone2(ownerName) {
|
|
|
10676
10729
|
return SlotClone;
|
|
10677
10730
|
}
|
|
10678
10731
|
var SLOTTABLE_IDENTIFIER2 = /* @__PURE__ */ Symbol("radix.slottable");
|
|
10679
|
-
function isSlottable2(
|
|
10680
|
-
return React64.isValidElement(
|
|
10732
|
+
function isSlottable2(child16) {
|
|
10733
|
+
return React64.isValidElement(child16) && typeof child16.type === "function" && "__radixId" in child16.type && child16.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
10681
10734
|
}
|
|
10682
10735
|
function mergeProps2(slotProps, childProps) {
|
|
10683
10736
|
const overrideProps = __spreadValues({}, childProps);
|
|
@@ -10799,6 +10852,1121 @@ var Separator5 = import_react24.default.forwardRef(
|
|
|
10799
10852
|
}
|
|
10800
10853
|
);
|
|
10801
10854
|
Separator5.displayName = Root8.displayName;
|
|
10855
|
+
|
|
10856
|
+
// src/components/svelte/content/Button.svelte
|
|
10857
|
+
var import_disclose_version = require("svelte/internal/disclose-version");
|
|
10858
|
+
var $ = __toESM(require("svelte/internal/client"));
|
|
10859
|
+
|
|
10860
|
+
// src/adapters/svelte.ts
|
|
10861
|
+
var import_store = require("svelte/store");
|
|
10862
|
+
function createDefaultLink(props) {
|
|
10863
|
+
return { type: "a", href: props.href };
|
|
10864
|
+
}
|
|
10865
|
+
function createDefaultImage(props) {
|
|
10866
|
+
return { type: "img", src: props.src, alt: props.alt };
|
|
10867
|
+
}
|
|
10868
|
+
var defaultConfig = {
|
|
10869
|
+
Link: createDefaultLink,
|
|
10870
|
+
Image: createDefaultImage
|
|
10871
|
+
};
|
|
10872
|
+
var docuBookStore = (0, import_store.writable)(defaultConfig);
|
|
10873
|
+
function getDocuBook() {
|
|
10874
|
+
return (0, import_store.get)(docuBookStore);
|
|
10875
|
+
}
|
|
10876
|
+
|
|
10877
|
+
// src/components/svelte/content/Button.svelte
|
|
10878
|
+
var root_5 = $.from_html(`<span> </span>`);
|
|
10879
|
+
var root_3 = $.from_html(`<!> <!>`, 1);
|
|
10880
|
+
var root_8 = $.from_html(`<span> </span>`);
|
|
10881
|
+
var root_6 = $.from_html(`<a><!> <!></a>`);
|
|
10882
|
+
function Button2($$anchor, $$props) {
|
|
10883
|
+
$.push($$props, true);
|
|
10884
|
+
let href = $.prop($$props, "href", 3, ""), text = $.prop($$props, "text", 3, ""), target = $.prop($$props, "target", 3, "_self"), size4 = $.prop($$props, "size", 3, "md"), variation = $.prop($$props, "variation", 3, "primary"), className = $.prop($$props, "className", 3, "");
|
|
10885
|
+
let LinkComponent = $.derived(() => {
|
|
10886
|
+
var _a;
|
|
10887
|
+
return ((_a = getDocuBook()) == null ? void 0 : _a.Link) || null;
|
|
10888
|
+
});
|
|
10889
|
+
const rel = $.derived(() => target() === "_blank" ? "noopener noreferrer" : void 0);
|
|
10890
|
+
const buttonClasses = $.derived(() => [
|
|
10891
|
+
componentStyles.button.base,
|
|
10892
|
+
componentStyles.button.sizes[size4()],
|
|
10893
|
+
componentStyles.button.variations[variation()],
|
|
10894
|
+
className()
|
|
10895
|
+
].join(" "));
|
|
10896
|
+
var fragment = $.comment();
|
|
10897
|
+
var node = $.first_child(fragment);
|
|
10898
|
+
{
|
|
10899
|
+
var consequent_5 = ($$anchor2) => {
|
|
10900
|
+
var fragment_1 = $.comment();
|
|
10901
|
+
var node_1 = $.first_child(fragment_1);
|
|
10902
|
+
{
|
|
10903
|
+
var consequent_2 = ($$anchor3) => {
|
|
10904
|
+
var fragment_2 = $.comment();
|
|
10905
|
+
var node_2 = $.first_child(fragment_2);
|
|
10906
|
+
$.component(node_2, () => $.get(LinkComponent), ($$anchor4, LinkComponent_1) => {
|
|
10907
|
+
LinkComponent_1($$anchor4, {
|
|
10908
|
+
get href() {
|
|
10909
|
+
return href();
|
|
10910
|
+
},
|
|
10911
|
+
get target() {
|
|
10912
|
+
return target();
|
|
10913
|
+
},
|
|
10914
|
+
get rel() {
|
|
10915
|
+
return $.get(rel);
|
|
10916
|
+
},
|
|
10917
|
+
get class() {
|
|
10918
|
+
return $.get(buttonClasses);
|
|
10919
|
+
},
|
|
10920
|
+
children: ($$anchor5, $$slotProps) => {
|
|
10921
|
+
var fragment_3 = root_3();
|
|
10922
|
+
var node_3 = $.first_child(fragment_3);
|
|
10923
|
+
{
|
|
10924
|
+
var consequent = ($$anchor6) => {
|
|
10925
|
+
var fragment_4 = $.comment();
|
|
10926
|
+
var node_4 = $.first_child(fragment_4);
|
|
10927
|
+
$.snippet(node_4, () => $$props.icon);
|
|
10928
|
+
$.append($$anchor6, fragment_4);
|
|
10929
|
+
};
|
|
10930
|
+
$.if(node_3, ($$render) => {
|
|
10931
|
+
if ($$props.icon) $$render(consequent);
|
|
10932
|
+
});
|
|
10933
|
+
}
|
|
10934
|
+
var node_5 = $.sibling(node_3, 2);
|
|
10935
|
+
{
|
|
10936
|
+
var consequent_1 = ($$anchor6) => {
|
|
10937
|
+
var span = root_5();
|
|
10938
|
+
var text_1 = $.child(span, true);
|
|
10939
|
+
$.reset(span);
|
|
10940
|
+
$.template_effect(() => $.set_text(text_1, text()));
|
|
10941
|
+
$.append($$anchor6, span);
|
|
10942
|
+
};
|
|
10943
|
+
$.if(node_5, ($$render) => {
|
|
10944
|
+
if (text()) $$render(consequent_1);
|
|
10945
|
+
});
|
|
10946
|
+
}
|
|
10947
|
+
$.append($$anchor5, fragment_3);
|
|
10948
|
+
},
|
|
10949
|
+
$$slots: { default: true }
|
|
10950
|
+
});
|
|
10951
|
+
});
|
|
10952
|
+
$.append($$anchor3, fragment_2);
|
|
10953
|
+
};
|
|
10954
|
+
var alternate = ($$anchor3) => {
|
|
10955
|
+
var a = root_6();
|
|
10956
|
+
var node_6 = $.child(a);
|
|
10957
|
+
{
|
|
10958
|
+
var consequent_3 = ($$anchor4) => {
|
|
10959
|
+
var fragment_5 = $.comment();
|
|
10960
|
+
var node_7 = $.first_child(fragment_5);
|
|
10961
|
+
$.snippet(node_7, () => $$props.icon);
|
|
10962
|
+
$.append($$anchor4, fragment_5);
|
|
10963
|
+
};
|
|
10964
|
+
$.if(node_6, ($$render) => {
|
|
10965
|
+
if ($$props.icon) $$render(consequent_3);
|
|
10966
|
+
});
|
|
10967
|
+
}
|
|
10968
|
+
var node_8 = $.sibling(node_6, 2);
|
|
10969
|
+
{
|
|
10970
|
+
var consequent_4 = ($$anchor4) => {
|
|
10971
|
+
var span_1 = root_8();
|
|
10972
|
+
var text_2 = $.child(span_1, true);
|
|
10973
|
+
$.reset(span_1);
|
|
10974
|
+
$.template_effect(() => $.set_text(text_2, text()));
|
|
10975
|
+
$.append($$anchor4, span_1);
|
|
10976
|
+
};
|
|
10977
|
+
$.if(node_8, ($$render) => {
|
|
10978
|
+
if (text()) $$render(consequent_4);
|
|
10979
|
+
});
|
|
10980
|
+
}
|
|
10981
|
+
$.reset(a);
|
|
10982
|
+
$.template_effect(() => {
|
|
10983
|
+
$.set_attribute(a, "href", href());
|
|
10984
|
+
$.set_attribute(a, "target", target());
|
|
10985
|
+
$.set_attribute(a, "rel", $.get(rel));
|
|
10986
|
+
$.set_class(a, 1, $.clsx($.get(buttonClasses)));
|
|
10987
|
+
});
|
|
10988
|
+
$.append($$anchor3, a);
|
|
10989
|
+
};
|
|
10990
|
+
$.if(node_1, ($$render) => {
|
|
10991
|
+
if ($.get(LinkComponent)) $$render(consequent_2);
|
|
10992
|
+
else $$render(alternate, false);
|
|
10993
|
+
});
|
|
10994
|
+
}
|
|
10995
|
+
$.append($$anchor2, fragment_1);
|
|
10996
|
+
};
|
|
10997
|
+
$.if(node, ($$render) => {
|
|
10998
|
+
if (href()) $$render(consequent_5);
|
|
10999
|
+
});
|
|
11000
|
+
}
|
|
11001
|
+
$.append($$anchor, fragment);
|
|
11002
|
+
$.pop();
|
|
11003
|
+
}
|
|
11004
|
+
|
|
11005
|
+
// src/components/svelte/content/Card.svelte
|
|
11006
|
+
var import_disclose_version2 = require("svelte/internal/disclose-version");
|
|
11007
|
+
var $2 = __toESM(require("svelte/internal/client"));
|
|
11008
|
+
var root_32 = $2.from_html(`<div><!> <div class="flex-1 min-w-0 my-auto h-full"><span class="text-base font-semibold text-foreground"> </span> <div class="text-sm text-muted-foreground"><!></div></div></div>`);
|
|
11009
|
+
var root_62 = $2.from_html(`<a class="no-underline block"><div><!> <div class="flex-1 min-w-0 my-auto h-full"><span class="text-base font-semibold text-foreground"> </span> <div class="text-sm text-muted-foreground"><!></div></div></div></a>`);
|
|
11010
|
+
var root_9 = $2.from_html(`<div><!> <div class="flex-1 min-w-0 my-auto h-full"><span class="text-base font-semibold text-foreground"> </span> <div class="text-sm text-muted-foreground"><!></div></div></div>`);
|
|
11011
|
+
function Card2($$anchor, $$props) {
|
|
11012
|
+
$2.push($$props, true);
|
|
11013
|
+
let title = $2.prop($$props, "title", 3, ""), href = $2.prop($$props, "href", 3, ""), horizontal = $2.prop($$props, "horizontal", 3, false), className = $2.prop($$props, "className", 3, "");
|
|
11014
|
+
let LinkComponent = $2.derived(() => {
|
|
11015
|
+
var _a;
|
|
11016
|
+
return ((_a = getDocuBook()) == null ? void 0 : _a.Link) || null;
|
|
11017
|
+
});
|
|
11018
|
+
const containerClass = $2.derived(() => [
|
|
11019
|
+
"border rounded-lg shadow-sm p-4 transition-all duration-200 bg-card text-card-foreground border-border hover:bg-accent/5 hover:border-accent/30",
|
|
11020
|
+
horizontal() ? "flex-row items-center gap-1" : "flex-col space-y-1",
|
|
11021
|
+
className()
|
|
11022
|
+
].join(" "));
|
|
11023
|
+
var fragment = $2.comment();
|
|
11024
|
+
var node = $2.first_child(fragment);
|
|
11025
|
+
{
|
|
11026
|
+
var consequent_5 = ($$anchor2) => {
|
|
11027
|
+
var fragment_1 = $2.comment();
|
|
11028
|
+
var node_1 = $2.first_child(fragment_1);
|
|
11029
|
+
{
|
|
11030
|
+
var consequent_2 = ($$anchor3) => {
|
|
11031
|
+
var fragment_2 = $2.comment();
|
|
11032
|
+
var node_2 = $2.first_child(fragment_2);
|
|
11033
|
+
$2.component(node_2, () => $2.get(LinkComponent), ($$anchor4, LinkComponent_1) => {
|
|
11034
|
+
LinkComponent_1($$anchor4, {
|
|
11035
|
+
get href() {
|
|
11036
|
+
return href();
|
|
11037
|
+
},
|
|
11038
|
+
class: "no-underline block",
|
|
11039
|
+
children: ($$anchor5, $$slotProps) => {
|
|
11040
|
+
var div = root_32();
|
|
11041
|
+
var node_3 = $2.child(div);
|
|
11042
|
+
{
|
|
11043
|
+
var consequent = ($$anchor6) => {
|
|
11044
|
+
var fragment_3 = $2.comment();
|
|
11045
|
+
var node_4 = $2.first_child(fragment_3);
|
|
11046
|
+
$2.snippet(node_4, () => $$props.iconSnippet);
|
|
11047
|
+
$2.append($$anchor6, fragment_3);
|
|
11048
|
+
};
|
|
11049
|
+
$2.if(node_3, ($$render) => {
|
|
11050
|
+
if ($$props.iconSnippet) $$render(consequent);
|
|
11051
|
+
});
|
|
11052
|
+
}
|
|
11053
|
+
var div_1 = $2.sibling(node_3, 2);
|
|
11054
|
+
var span = $2.child(div_1);
|
|
11055
|
+
var text = $2.child(span, true);
|
|
11056
|
+
$2.reset(span);
|
|
11057
|
+
var div_2 = $2.sibling(span, 2);
|
|
11058
|
+
var node_5 = $2.child(div_2);
|
|
11059
|
+
{
|
|
11060
|
+
var consequent_1 = ($$anchor6) => {
|
|
11061
|
+
var fragment_4 = $2.comment();
|
|
11062
|
+
var node_6 = $2.first_child(fragment_4);
|
|
11063
|
+
$2.snippet(node_6, () => $$props.children);
|
|
11064
|
+
$2.append($$anchor6, fragment_4);
|
|
11065
|
+
};
|
|
11066
|
+
$2.if(node_5, ($$render) => {
|
|
11067
|
+
if ($$props.children) $$render(consequent_1);
|
|
11068
|
+
});
|
|
11069
|
+
}
|
|
11070
|
+
$2.reset(div_2);
|
|
11071
|
+
$2.reset(div_1);
|
|
11072
|
+
$2.reset(div);
|
|
11073
|
+
$2.template_effect(() => {
|
|
11074
|
+
$2.set_class(div, 1, $2.clsx($2.get(containerClass)));
|
|
11075
|
+
$2.set_text(text, title());
|
|
11076
|
+
});
|
|
11077
|
+
$2.append($$anchor5, div);
|
|
11078
|
+
},
|
|
11079
|
+
$$slots: { default: true }
|
|
11080
|
+
});
|
|
11081
|
+
});
|
|
11082
|
+
$2.append($$anchor3, fragment_2);
|
|
11083
|
+
};
|
|
11084
|
+
var alternate = ($$anchor3) => {
|
|
11085
|
+
var a = root_62();
|
|
11086
|
+
var div_3 = $2.child(a);
|
|
11087
|
+
var node_7 = $2.child(div_3);
|
|
11088
|
+
{
|
|
11089
|
+
var consequent_3 = ($$anchor4) => {
|
|
11090
|
+
var fragment_5 = $2.comment();
|
|
11091
|
+
var node_8 = $2.first_child(fragment_5);
|
|
11092
|
+
$2.snippet(node_8, () => $$props.iconSnippet);
|
|
11093
|
+
$2.append($$anchor4, fragment_5);
|
|
11094
|
+
};
|
|
11095
|
+
$2.if(node_7, ($$render) => {
|
|
11096
|
+
if ($$props.iconSnippet) $$render(consequent_3);
|
|
11097
|
+
});
|
|
11098
|
+
}
|
|
11099
|
+
var div_4 = $2.sibling(node_7, 2);
|
|
11100
|
+
var span_1 = $2.child(div_4);
|
|
11101
|
+
var text_1 = $2.child(span_1, true);
|
|
11102
|
+
$2.reset(span_1);
|
|
11103
|
+
var div_5 = $2.sibling(span_1, 2);
|
|
11104
|
+
var node_9 = $2.child(div_5);
|
|
11105
|
+
{
|
|
11106
|
+
var consequent_4 = ($$anchor4) => {
|
|
11107
|
+
var fragment_6 = $2.comment();
|
|
11108
|
+
var node_10 = $2.first_child(fragment_6);
|
|
11109
|
+
$2.snippet(node_10, () => $$props.children);
|
|
11110
|
+
$2.append($$anchor4, fragment_6);
|
|
11111
|
+
};
|
|
11112
|
+
$2.if(node_9, ($$render) => {
|
|
11113
|
+
if ($$props.children) $$render(consequent_4);
|
|
11114
|
+
});
|
|
11115
|
+
}
|
|
11116
|
+
$2.reset(div_5);
|
|
11117
|
+
$2.reset(div_4);
|
|
11118
|
+
$2.reset(div_3);
|
|
11119
|
+
$2.reset(a);
|
|
11120
|
+
$2.template_effect(() => {
|
|
11121
|
+
$2.set_attribute(a, "href", href());
|
|
11122
|
+
$2.set_class(div_3, 1, $2.clsx($2.get(containerClass)));
|
|
11123
|
+
$2.set_text(text_1, title());
|
|
11124
|
+
});
|
|
11125
|
+
$2.append($$anchor3, a);
|
|
11126
|
+
};
|
|
11127
|
+
$2.if(node_1, ($$render) => {
|
|
11128
|
+
if ($2.get(LinkComponent)) $$render(consequent_2);
|
|
11129
|
+
else $$render(alternate, false);
|
|
11130
|
+
});
|
|
11131
|
+
}
|
|
11132
|
+
$2.append($$anchor2, fragment_1);
|
|
11133
|
+
};
|
|
11134
|
+
var alternate_1 = ($$anchor2) => {
|
|
11135
|
+
var div_6 = root_9();
|
|
11136
|
+
var node_11 = $2.child(div_6);
|
|
11137
|
+
{
|
|
11138
|
+
var consequent_6 = ($$anchor3) => {
|
|
11139
|
+
var fragment_7 = $2.comment();
|
|
11140
|
+
var node_12 = $2.first_child(fragment_7);
|
|
11141
|
+
$2.snippet(node_12, () => $$props.iconSnippet);
|
|
11142
|
+
$2.append($$anchor3, fragment_7);
|
|
11143
|
+
};
|
|
11144
|
+
$2.if(node_11, ($$render) => {
|
|
11145
|
+
if ($$props.iconSnippet) $$render(consequent_6);
|
|
11146
|
+
});
|
|
11147
|
+
}
|
|
11148
|
+
var div_7 = $2.sibling(node_11, 2);
|
|
11149
|
+
var span_2 = $2.child(div_7);
|
|
11150
|
+
var text_2 = $2.child(span_2, true);
|
|
11151
|
+
$2.reset(span_2);
|
|
11152
|
+
var div_8 = $2.sibling(span_2, 2);
|
|
11153
|
+
var node_13 = $2.child(div_8);
|
|
11154
|
+
{
|
|
11155
|
+
var consequent_7 = ($$anchor3) => {
|
|
11156
|
+
var fragment_8 = $2.comment();
|
|
11157
|
+
var node_14 = $2.first_child(fragment_8);
|
|
11158
|
+
$2.snippet(node_14, () => $$props.children);
|
|
11159
|
+
$2.append($$anchor3, fragment_8);
|
|
11160
|
+
};
|
|
11161
|
+
$2.if(node_13, ($$render) => {
|
|
11162
|
+
if ($$props.children) $$render(consequent_7);
|
|
11163
|
+
});
|
|
11164
|
+
}
|
|
11165
|
+
$2.reset(div_8);
|
|
11166
|
+
$2.reset(div_7);
|
|
11167
|
+
$2.reset(div_6);
|
|
11168
|
+
$2.template_effect(() => {
|
|
11169
|
+
$2.set_class(div_6, 1, $2.clsx($2.get(containerClass)));
|
|
11170
|
+
$2.set_text(text_2, title());
|
|
11171
|
+
});
|
|
11172
|
+
$2.append($$anchor2, div_6);
|
|
11173
|
+
};
|
|
11174
|
+
$2.if(node, ($$render) => {
|
|
11175
|
+
if (href()) $$render(consequent_5);
|
|
11176
|
+
else $$render(alternate_1, false);
|
|
11177
|
+
});
|
|
11178
|
+
}
|
|
11179
|
+
$2.append($$anchor, fragment);
|
|
11180
|
+
$2.pop();
|
|
11181
|
+
}
|
|
11182
|
+
|
|
11183
|
+
// src/components/svelte/content/CardGroup.svelte
|
|
11184
|
+
var import_disclose_version3 = require("svelte/internal/disclose-version");
|
|
11185
|
+
var $3 = __toESM(require("svelte/internal/client"));
|
|
11186
|
+
var root = $3.from_html(`<div><!></div>`);
|
|
11187
|
+
function CardGroup2($$anchor, $$props) {
|
|
11188
|
+
let className = $3.prop($$props, "className", 3, "");
|
|
11189
|
+
var div = root();
|
|
11190
|
+
var node = $3.child(div);
|
|
11191
|
+
$3.snippet(node, () => $$props.children);
|
|
11192
|
+
$3.reset(div);
|
|
11193
|
+
$3.template_effect(() => $3.set_class(div, 1, "grid gap-4 " + className()));
|
|
11194
|
+
$3.append($$anchor, div);
|
|
11195
|
+
}
|
|
11196
|
+
|
|
11197
|
+
// src/components/svelte/content/Note.svelte
|
|
11198
|
+
var import_disclose_version4 = require("svelte/internal/disclose-version");
|
|
11199
|
+
var $4 = __toESM(require("svelte/internal/client"));
|
|
11200
|
+
var import_lucide_svelte = require("lucide-svelte");
|
|
11201
|
+
var root2 = $4.from_html(`<div><div><!></div> <div><h5> </h5> <div><!></div></div></div>`);
|
|
11202
|
+
function Note2($$anchor, $$props) {
|
|
11203
|
+
$4.push($$props, true);
|
|
11204
|
+
const iconMap2 = {
|
|
11205
|
+
note: import_lucide_svelte.Info,
|
|
11206
|
+
danger: import_lucide_svelte.AlertCircle,
|
|
11207
|
+
warning: import_lucide_svelte.AlertTriangle,
|
|
11208
|
+
success: import_lucide_svelte.CheckCircle
|
|
11209
|
+
};
|
|
11210
|
+
let type = $4.prop($$props, "type", 3, "note"), title = $4.prop($$props, "title", 3, "Note"), className = $4.prop($$props, "className", 3, "");
|
|
11211
|
+
const Icon2 = $4.derived(() => iconMap2[type()]);
|
|
11212
|
+
const noteClasses = $4.derived(() => [
|
|
11213
|
+
componentStyles.note.base,
|
|
11214
|
+
componentStyles.note.variants[type()],
|
|
11215
|
+
className()
|
|
11216
|
+
].join(" "));
|
|
11217
|
+
var div = root2();
|
|
11218
|
+
var div_1 = $4.child(div);
|
|
11219
|
+
var node = $4.child(div_1);
|
|
11220
|
+
$4.component(node, () => $4.get(Icon2), ($$anchor2, Icon_1) => {
|
|
11221
|
+
Icon_1($$anchor2, { class: "w-5 h-5" });
|
|
11222
|
+
});
|
|
11223
|
+
$4.reset(div_1);
|
|
11224
|
+
var div_2 = $4.sibling(div_1, 2);
|
|
11225
|
+
var h5 = $4.child(div_2);
|
|
11226
|
+
var text = $4.child(h5, true);
|
|
11227
|
+
$4.reset(h5);
|
|
11228
|
+
var div_3 = $4.sibling(h5, 2);
|
|
11229
|
+
var node_1 = $4.child(div_3);
|
|
11230
|
+
$4.snippet(node_1, () => $$props.children);
|
|
11231
|
+
$4.reset(div_3);
|
|
11232
|
+
$4.reset(div_2);
|
|
11233
|
+
$4.reset(div);
|
|
11234
|
+
$4.template_effect(() => {
|
|
11235
|
+
$4.set_class(div, 1, $4.clsx($4.get(noteClasses)));
|
|
11236
|
+
$4.set_class(div_1, 1, $4.clsx(componentStyles.note.icon));
|
|
11237
|
+
$4.set_class(div_2, 1, $4.clsx(componentStyles.note.content));
|
|
11238
|
+
$4.set_class(h5, 1, $4.clsx(componentStyles.note.title));
|
|
11239
|
+
$4.set_text(text, title());
|
|
11240
|
+
$4.set_class(div_3, 1, $4.clsx(componentStyles.note.description));
|
|
11241
|
+
});
|
|
11242
|
+
$4.append($$anchor, div);
|
|
11243
|
+
$4.pop();
|
|
11244
|
+
}
|
|
11245
|
+
|
|
11246
|
+
// src/components/svelte/content/Link.svelte
|
|
11247
|
+
var import_disclose_version5 = require("svelte/internal/disclose-version");
|
|
11248
|
+
var $5 = __toESM(require("svelte/internal/client"));
|
|
11249
|
+
var root_4 = $5.from_html(`<a target="_blank" rel="noopener noreferrer"><!></a>`);
|
|
11250
|
+
function Link($$anchor, $$props) {
|
|
11251
|
+
$5.push($$props, true);
|
|
11252
|
+
let href = $5.prop($$props, "href", 3, ""), className = $5.prop($$props, "className", 3, "");
|
|
11253
|
+
let LinkComponent = $5.derived(() => {
|
|
11254
|
+
var _a;
|
|
11255
|
+
return ((_a = getDocuBook()) == null ? void 0 : _a.Link) || null;
|
|
11256
|
+
});
|
|
11257
|
+
const linkClasses = $5.derived(() => [componentStyles.link.base, className()].join(" "));
|
|
11258
|
+
var fragment = $5.comment();
|
|
11259
|
+
var node = $5.first_child(fragment);
|
|
11260
|
+
{
|
|
11261
|
+
var consequent_1 = ($$anchor2) => {
|
|
11262
|
+
var fragment_1 = $5.comment();
|
|
11263
|
+
var node_1 = $5.first_child(fragment_1);
|
|
11264
|
+
{
|
|
11265
|
+
var consequent = ($$anchor3) => {
|
|
11266
|
+
var fragment_2 = $5.comment();
|
|
11267
|
+
var node_2 = $5.first_child(fragment_2);
|
|
11268
|
+
$5.component(node_2, () => $5.get(LinkComponent), ($$anchor4, LinkComponent_1) => {
|
|
11269
|
+
LinkComponent_1($$anchor4, {
|
|
11270
|
+
get href() {
|
|
11271
|
+
return href();
|
|
11272
|
+
},
|
|
11273
|
+
target: "_blank",
|
|
11274
|
+
rel: "noopener noreferrer",
|
|
11275
|
+
get class() {
|
|
11276
|
+
return $5.get(linkClasses);
|
|
11277
|
+
},
|
|
11278
|
+
children: ($$anchor5, $$slotProps) => {
|
|
11279
|
+
var fragment_3 = $5.comment();
|
|
11280
|
+
var node_3 = $5.first_child(fragment_3);
|
|
11281
|
+
$5.snippet(node_3, () => $$props.children);
|
|
11282
|
+
$5.append($$anchor5, fragment_3);
|
|
11283
|
+
},
|
|
11284
|
+
$$slots: { default: true }
|
|
11285
|
+
});
|
|
11286
|
+
});
|
|
11287
|
+
$5.append($$anchor3, fragment_2);
|
|
11288
|
+
};
|
|
11289
|
+
var alternate = ($$anchor3) => {
|
|
11290
|
+
var a = root_4();
|
|
11291
|
+
var node_4 = $5.child(a);
|
|
11292
|
+
$5.snippet(node_4, () => $$props.children);
|
|
11293
|
+
$5.reset(a);
|
|
11294
|
+
$5.template_effect(() => {
|
|
11295
|
+
$5.set_attribute(a, "href", href());
|
|
11296
|
+
$5.set_class(a, 1, $5.clsx($5.get(linkClasses)));
|
|
11297
|
+
});
|
|
11298
|
+
$5.append($$anchor3, a);
|
|
11299
|
+
};
|
|
11300
|
+
$5.if(node_1, ($$render) => {
|
|
11301
|
+
if ($5.get(LinkComponent)) $$render(consequent);
|
|
11302
|
+
else $$render(alternate, false);
|
|
11303
|
+
});
|
|
11304
|
+
}
|
|
11305
|
+
$5.append($$anchor2, fragment_1);
|
|
11306
|
+
};
|
|
11307
|
+
$5.if(node, ($$render) => {
|
|
11308
|
+
if (href()) $$render(consequent_1);
|
|
11309
|
+
});
|
|
11310
|
+
}
|
|
11311
|
+
$5.append($$anchor, fragment);
|
|
11312
|
+
$5.pop();
|
|
11313
|
+
}
|
|
11314
|
+
|
|
11315
|
+
// src/components/svelte/content/Image.svelte
|
|
11316
|
+
var import_disclose_version6 = require("svelte/internal/disclose-version");
|
|
11317
|
+
var $6 = __toESM(require("svelte/internal/client"));
|
|
11318
|
+
var import_lucide_svelte2 = require("lucide-svelte");
|
|
11319
|
+
var root_33 = $6.from_html(`<img/>`);
|
|
11320
|
+
var root_63 = $6.from_html(`<img class="object-contain max-h-[90vh] w-auto h-auto rounded-md shadow-2xl"/>`);
|
|
11321
|
+
var root_7 = $6.from_html(`<div class="absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-full text-sm font-medium backdrop-blur-md border border-white/10"> </div>`);
|
|
11322
|
+
var root_42 = $6.from_html(`<div class="fixed inset-0 z-[99999] flex items-center justify-center bg-black/90 backdrop-blur-md p-4 md:p-10 cursor-zoom-out" role="button" tabindex="0"><button class="absolute top-4 right-4 z-50 p-2 text-white/70 hover:text-white bg-black/20 hover:bg-white/10 rounded-full transition-colors"><!></button> <div class="relative max-w-7xl w-full h-full flex items-center justify-center"><!></div> <!></div>`);
|
|
11323
|
+
var root_1 = $6.from_html(`<button type="button" class="relative group cursor-zoom-in my-6 w-full flex justify-center rounded-lg" aria-label="Zoom image"><span class="absolute inset-0 bg-black/0 group-hover:bg-black/5 transition-colors z-10 flex items-center justify-center opacity-0 group-hover:opacity-100 rounded-lg"><!></span> <!></button> <!>`, 1);
|
|
11324
|
+
function Image($$anchor, $$props) {
|
|
11325
|
+
$6.push($$props, true);
|
|
11326
|
+
let src = $6.prop($$props, "src", 3, ""), alt = $6.prop($$props, "alt", 3, ""), width = $6.prop($$props, "width", 3, 800), height = $6.prop($$props, "height", 3, 350), className = $6.prop($$props, "className", 3, "");
|
|
11327
|
+
let isOpen = $6.state(false);
|
|
11328
|
+
let ImageComponent = $6.derived(() => {
|
|
11329
|
+
var _a;
|
|
11330
|
+
return ((_a = getDocuBook()) == null ? void 0 : _a.Image) || null;
|
|
11331
|
+
});
|
|
11332
|
+
function handleKeydown(e) {
|
|
11333
|
+
if (e.key === "Escape") {
|
|
11334
|
+
$6.set(isOpen, false);
|
|
11335
|
+
}
|
|
11336
|
+
}
|
|
11337
|
+
const imageClasses = $6.derived(() => [
|
|
11338
|
+
componentStyles.image.base,
|
|
11339
|
+
"w-full h-auto transition-transform duration-300 group-hover:scale-[1.01]",
|
|
11340
|
+
className()
|
|
11341
|
+
].join(" "));
|
|
11342
|
+
function handleClick() {
|
|
11343
|
+
if (src()) {
|
|
11344
|
+
$6.set(isOpen, true);
|
|
11345
|
+
document.body.style.overflow = "hidden";
|
|
11346
|
+
}
|
|
11347
|
+
}
|
|
11348
|
+
function closeLightbox() {
|
|
11349
|
+
$6.set(isOpen, false);
|
|
11350
|
+
document.body.style.overflow = "auto";
|
|
11351
|
+
}
|
|
11352
|
+
var fragment = $6.comment();
|
|
11353
|
+
$6.event("keydown", $6.window, handleKeydown);
|
|
11354
|
+
var node = $6.first_child(fragment);
|
|
11355
|
+
{
|
|
11356
|
+
var consequent_4 = ($$anchor2) => {
|
|
11357
|
+
var fragment_1 = root_1();
|
|
11358
|
+
var button = $6.first_child(fragment_1);
|
|
11359
|
+
var span = $6.child(button);
|
|
11360
|
+
var node_1 = $6.child(span);
|
|
11361
|
+
(0, import_lucide_svelte2.Search)(node_1, { class: "w-8 h-8 text-white drop-shadow-md" });
|
|
11362
|
+
$6.reset(span);
|
|
11363
|
+
var node_2 = $6.sibling(span, 2);
|
|
11364
|
+
{
|
|
11365
|
+
var consequent = ($$anchor3) => {
|
|
11366
|
+
var fragment_2 = $6.comment();
|
|
11367
|
+
var node_3 = $6.first_child(fragment_2);
|
|
11368
|
+
$6.component(node_3, () => $6.get(ImageComponent), ($$anchor4, ImageComponent_1) => {
|
|
11369
|
+
ImageComponent_1($$anchor4, {
|
|
11370
|
+
get src() {
|
|
11371
|
+
return src();
|
|
11372
|
+
},
|
|
11373
|
+
get alt() {
|
|
11374
|
+
return alt();
|
|
11375
|
+
},
|
|
11376
|
+
get width() {
|
|
11377
|
+
return width();
|
|
11378
|
+
},
|
|
11379
|
+
get height() {
|
|
11380
|
+
return height();
|
|
11381
|
+
},
|
|
11382
|
+
get class() {
|
|
11383
|
+
return $6.get(imageClasses);
|
|
11384
|
+
}
|
|
11385
|
+
});
|
|
11386
|
+
});
|
|
11387
|
+
$6.append($$anchor3, fragment_2);
|
|
11388
|
+
};
|
|
11389
|
+
var alternate = ($$anchor3) => {
|
|
11390
|
+
var img = root_33();
|
|
11391
|
+
$6.template_effect(() => {
|
|
11392
|
+
$6.set_attribute(img, "src", src());
|
|
11393
|
+
$6.set_attribute(img, "alt", alt());
|
|
11394
|
+
$6.set_attribute(img, "width", width());
|
|
11395
|
+
$6.set_attribute(img, "height", height());
|
|
11396
|
+
$6.set_class(img, 1, $6.clsx($6.get(imageClasses)));
|
|
11397
|
+
});
|
|
11398
|
+
$6.append($$anchor3, img);
|
|
11399
|
+
};
|
|
11400
|
+
$6.if(node_2, ($$render) => {
|
|
11401
|
+
if ($6.get(ImageComponent)) $$render(consequent);
|
|
11402
|
+
else $$render(alternate, false);
|
|
11403
|
+
});
|
|
11404
|
+
}
|
|
11405
|
+
$6.reset(button);
|
|
11406
|
+
var node_4 = $6.sibling(button, 2);
|
|
11407
|
+
{
|
|
11408
|
+
var consequent_3 = ($$anchor3) => {
|
|
11409
|
+
var div = root_42();
|
|
11410
|
+
var button_1 = $6.child(div);
|
|
11411
|
+
var node_5 = $6.child(button_1);
|
|
11412
|
+
(0, import_lucide_svelte2.X)(node_5, { class: "w-6 h-6" });
|
|
11413
|
+
$6.reset(button_1);
|
|
11414
|
+
var div_1 = $6.sibling(button_1, 2);
|
|
11415
|
+
var node_6 = $6.child(div_1);
|
|
11416
|
+
{
|
|
11417
|
+
var consequent_1 = ($$anchor4) => {
|
|
11418
|
+
var fragment_3 = $6.comment();
|
|
11419
|
+
var node_7 = $6.first_child(fragment_3);
|
|
11420
|
+
$6.component(node_7, () => $6.get(ImageComponent), ($$anchor5, ImageComponent_2) => {
|
|
11421
|
+
ImageComponent_2($$anchor5, {
|
|
11422
|
+
get src() {
|
|
11423
|
+
return src();
|
|
11424
|
+
},
|
|
11425
|
+
get alt() {
|
|
11426
|
+
return alt();
|
|
11427
|
+
},
|
|
11428
|
+
width: 1920,
|
|
11429
|
+
height: 1080,
|
|
11430
|
+
class: "object-contain max-h-[90vh] w-auto h-auto rounded-md shadow-2xl"
|
|
11431
|
+
});
|
|
11432
|
+
});
|
|
11433
|
+
$6.append($$anchor4, fragment_3);
|
|
11434
|
+
};
|
|
11435
|
+
var alternate_1 = ($$anchor4) => {
|
|
11436
|
+
var img_1 = root_63();
|
|
11437
|
+
$6.set_attribute(img_1, "width", 1920);
|
|
11438
|
+
$6.set_attribute(img_1, "height", 1080);
|
|
11439
|
+
$6.template_effect(() => {
|
|
11440
|
+
$6.set_attribute(img_1, "src", src());
|
|
11441
|
+
$6.set_attribute(img_1, "alt", alt());
|
|
11442
|
+
});
|
|
11443
|
+
$6.append($$anchor4, img_1);
|
|
11444
|
+
};
|
|
11445
|
+
$6.if(node_6, ($$render) => {
|
|
11446
|
+
if ($6.get(ImageComponent)) $$render(consequent_1);
|
|
11447
|
+
else $$render(alternate_1, false);
|
|
11448
|
+
});
|
|
11449
|
+
}
|
|
11450
|
+
$6.reset(div_1);
|
|
11451
|
+
var node_8 = $6.sibling(div_1, 2);
|
|
11452
|
+
{
|
|
11453
|
+
var consequent_2 = ($$anchor4) => {
|
|
11454
|
+
var div_2 = root_7();
|
|
11455
|
+
var text = $6.child(div_2, true);
|
|
11456
|
+
$6.reset(div_2);
|
|
11457
|
+
$6.template_effect(() => $6.set_text(text, alt()));
|
|
11458
|
+
$6.append($$anchor4, div_2);
|
|
11459
|
+
};
|
|
11460
|
+
$6.if(node_8, ($$render) => {
|
|
11461
|
+
if (alt() && alt() !== "alt") $$render(consequent_2);
|
|
11462
|
+
});
|
|
11463
|
+
}
|
|
11464
|
+
$6.reset(div);
|
|
11465
|
+
$6.delegated("click", div, closeLightbox);
|
|
11466
|
+
$6.delegated("keydown", div, (e) => e.key === "Enter" && closeLightbox());
|
|
11467
|
+
$6.delegated("click", button_1, (e) => {
|
|
11468
|
+
e.stopPropagation();
|
|
11469
|
+
closeLightbox();
|
|
11470
|
+
});
|
|
11471
|
+
$6.append($$anchor3, div);
|
|
11472
|
+
};
|
|
11473
|
+
$6.if(node_4, ($$render) => {
|
|
11474
|
+
if ($6.get(isOpen)) $$render(consequent_3);
|
|
11475
|
+
});
|
|
11476
|
+
}
|
|
11477
|
+
$6.delegated("click", button, handleClick);
|
|
11478
|
+
$6.append($$anchor2, fragment_1);
|
|
11479
|
+
};
|
|
11480
|
+
$6.if(node, ($$render) => {
|
|
11481
|
+
if (src()) $$render(consequent_4);
|
|
11482
|
+
});
|
|
11483
|
+
}
|
|
11484
|
+
$6.append($$anchor, fragment);
|
|
11485
|
+
$6.pop();
|
|
11486
|
+
}
|
|
11487
|
+
$6.delegate(["click", "keydown"]);
|
|
11488
|
+
|
|
11489
|
+
// src/components/svelte/content/Pre.svelte
|
|
11490
|
+
var import_disclose_version7 = require("svelte/internal/disclose-version");
|
|
11491
|
+
var $7 = __toESM(require("svelte/internal/client"));
|
|
11492
|
+
var import_lucide_svelte3 = require("lucide-svelte");
|
|
11493
|
+
var root_12 = $7.from_html(`<button type="button"><!></button>`);
|
|
11494
|
+
var root_43 = $7.from_html(`<div class="flex items-center gap-2 px-4 py-2 text-sm font-medium border-b border-border bg-muted/50"><span> </span></div>`);
|
|
11495
|
+
var root3 = $7.from_html(`<div><div class="absolute top-2 right-2 z-10"><!></div> <!> <div class="overflow-x-auto"><pre>
|
|
11496
|
+
<!>
|
|
11497
|
+
</pre></div></div>`);
|
|
11498
|
+
function Pre2($$anchor, $$props) {
|
|
11499
|
+
$7.push($$props, true);
|
|
11500
|
+
let raw = $7.prop($$props, "raw", 3, ""), dataTitle = $7.prop($$props, "dataTitle", 3, ""), className = $7.prop($$props, "className", 3, "");
|
|
11501
|
+
let isCopied = $7.state(false);
|
|
11502
|
+
async function handleCopy() {
|
|
11503
|
+
if (raw()) {
|
|
11504
|
+
await navigator.clipboard.writeText(raw());
|
|
11505
|
+
$7.set(isCopied, true);
|
|
11506
|
+
setTimeout(
|
|
11507
|
+
() => {
|
|
11508
|
+
$7.set(isCopied, false);
|
|
11509
|
+
},
|
|
11510
|
+
2e3
|
|
11511
|
+
);
|
|
11512
|
+
}
|
|
11513
|
+
}
|
|
11514
|
+
const hasTitle = $7.derived(() => !!dataTitle());
|
|
11515
|
+
var div = root3();
|
|
11516
|
+
var div_1 = $7.child(div);
|
|
11517
|
+
var node = $7.child(div_1);
|
|
11518
|
+
{
|
|
11519
|
+
var consequent_1 = ($$anchor2) => {
|
|
11520
|
+
var button = root_12();
|
|
11521
|
+
var node_1 = $7.child(button);
|
|
11522
|
+
{
|
|
11523
|
+
var consequent = ($$anchor3) => {
|
|
11524
|
+
(0, import_lucide_svelte3.Check)($$anchor3, {
|
|
11525
|
+
get class() {
|
|
11526
|
+
return componentStyles.copy.icon;
|
|
11527
|
+
}
|
|
11528
|
+
});
|
|
11529
|
+
};
|
|
11530
|
+
var alternate = ($$anchor3) => {
|
|
11531
|
+
(0, import_lucide_svelte3.Copy)($$anchor3, {
|
|
11532
|
+
get class() {
|
|
11533
|
+
return componentStyles.copy.icon;
|
|
11534
|
+
}
|
|
11535
|
+
});
|
|
11536
|
+
};
|
|
11537
|
+
$7.if(node_1, ($$render) => {
|
|
11538
|
+
if ($7.get(isCopied)) $$render(consequent);
|
|
11539
|
+
else $$render(alternate, false);
|
|
11540
|
+
});
|
|
11541
|
+
}
|
|
11542
|
+
$7.reset(button);
|
|
11543
|
+
$7.template_effect(() => $7.set_class(button, 1, componentStyles.copy.base + " cursor-copy"));
|
|
11544
|
+
$7.delegated("click", button, handleCopy);
|
|
11545
|
+
$7.append($$anchor2, button);
|
|
11546
|
+
};
|
|
11547
|
+
$7.if(node, ($$render) => {
|
|
11548
|
+
if (raw()) $$render(consequent_1);
|
|
11549
|
+
});
|
|
11550
|
+
}
|
|
11551
|
+
$7.reset(div_1);
|
|
11552
|
+
var node_2 = $7.sibling(div_1, 2);
|
|
11553
|
+
{
|
|
11554
|
+
var consequent_2 = ($$anchor2) => {
|
|
11555
|
+
var div_2 = root_43();
|
|
11556
|
+
var span = $7.child(div_2);
|
|
11557
|
+
var text = $7.child(span, true);
|
|
11558
|
+
$7.reset(span);
|
|
11559
|
+
$7.reset(div_2);
|
|
11560
|
+
$7.template_effect(() => $7.set_text(text, dataTitle()));
|
|
11561
|
+
$7.append($$anchor2, div_2);
|
|
11562
|
+
};
|
|
11563
|
+
$7.if(node_2, ($$render) => {
|
|
11564
|
+
if ($7.get(hasTitle)) $$render(consequent_2);
|
|
11565
|
+
});
|
|
11566
|
+
}
|
|
11567
|
+
var div_3 = $7.sibling(node_2, 2);
|
|
11568
|
+
var pre = $7.child(div_3);
|
|
11569
|
+
let classes;
|
|
11570
|
+
var node_3 = $7.sibling($7.child(pre));
|
|
11571
|
+
$7.snippet(node_3, () => $$props.children);
|
|
11572
|
+
$7.next();
|
|
11573
|
+
$7.reset(pre);
|
|
11574
|
+
$7.reset(div_3);
|
|
11575
|
+
$7.reset(div);
|
|
11576
|
+
$7.template_effect(() => {
|
|
11577
|
+
$7.set_class(div, 1, componentStyles.pre.base + " border border-border rounded-lg my-4 overflow-hidden");
|
|
11578
|
+
classes = $7.set_class(pre, 1, $7.clsx(className()), null, classes, { "pr-12": $7.get(hasTitle) });
|
|
11579
|
+
});
|
|
11580
|
+
$7.append($$anchor, div);
|
|
11581
|
+
$7.pop();
|
|
11582
|
+
}
|
|
11583
|
+
$7.delegate(["click"]);
|
|
11584
|
+
|
|
11585
|
+
// src/components/svelte/content/Copy.svelte
|
|
11586
|
+
var import_disclose_version8 = require("svelte/internal/disclose-version");
|
|
11587
|
+
var $8 = __toESM(require("svelte/internal/client"));
|
|
11588
|
+
var import_lucide_svelte4 = require("lucide-svelte");
|
|
11589
|
+
var root4 = $8.from_html(`<button type="button"><!></button>`);
|
|
11590
|
+
function Copy2($$anchor, $$props) {
|
|
11591
|
+
$8.push($$props, true);
|
|
11592
|
+
let content = $8.prop($$props, "content", 3, "");
|
|
11593
|
+
let isCopied = $8.state(false);
|
|
11594
|
+
async function handleCopy() {
|
|
11595
|
+
if (content()) {
|
|
11596
|
+
await navigator.clipboard.writeText(content());
|
|
11597
|
+
$8.set(isCopied, true);
|
|
11598
|
+
setTimeout(
|
|
11599
|
+
() => {
|
|
11600
|
+
$8.set(isCopied, false);
|
|
11601
|
+
},
|
|
11602
|
+
2e3
|
|
11603
|
+
);
|
|
11604
|
+
}
|
|
11605
|
+
}
|
|
11606
|
+
var button = root4();
|
|
11607
|
+
var node = $8.child(button);
|
|
11608
|
+
{
|
|
11609
|
+
var consequent = ($$anchor2) => {
|
|
11610
|
+
(0, import_lucide_svelte4.Check)($$anchor2, {
|
|
11611
|
+
get class() {
|
|
11612
|
+
return componentStyles.copy.icon;
|
|
11613
|
+
}
|
|
11614
|
+
});
|
|
11615
|
+
};
|
|
11616
|
+
var alternate = ($$anchor2) => {
|
|
11617
|
+
(0, import_lucide_svelte4.Copy)($$anchor2, {
|
|
11618
|
+
get class() {
|
|
11619
|
+
return componentStyles.copy.icon;
|
|
11620
|
+
}
|
|
11621
|
+
});
|
|
11622
|
+
};
|
|
11623
|
+
$8.if(node, ($$render) => {
|
|
11624
|
+
if ($8.get(isCopied)) $$render(consequent);
|
|
11625
|
+
else $$render(alternate, false);
|
|
11626
|
+
});
|
|
11627
|
+
}
|
|
11628
|
+
$8.reset(button);
|
|
11629
|
+
$8.template_effect(() => $8.set_class(button, 1, componentStyles.copy.base + " cursor-copy"));
|
|
11630
|
+
$8.delegated("click", button, handleCopy);
|
|
11631
|
+
$8.append($$anchor, button);
|
|
11632
|
+
$8.pop();
|
|
11633
|
+
}
|
|
11634
|
+
$8.delegate(["click"]);
|
|
11635
|
+
|
|
11636
|
+
// src/components/svelte/content/Kbd.svelte
|
|
11637
|
+
var import_disclose_version9 = require("svelte/internal/disclose-version");
|
|
11638
|
+
var $9 = __toESM(require("svelte/internal/client"));
|
|
11639
|
+
var root5 = $9.from_html(`<kbd><!></kbd>`);
|
|
11640
|
+
function Kbd2($$anchor, $$props) {
|
|
11641
|
+
$9.push($$props, true);
|
|
11642
|
+
let className = $9.prop($$props, "className", 3, "");
|
|
11643
|
+
var kbd = root5();
|
|
11644
|
+
var node = $9.child(kbd);
|
|
11645
|
+
$9.snippet(node, () => $$props.children);
|
|
11646
|
+
$9.reset(kbd);
|
|
11647
|
+
$9.template_effect(() => $9.set_class(kbd, 1, componentStyles.kbd.base + " " + className()));
|
|
11648
|
+
$9.append($$anchor, kbd);
|
|
11649
|
+
$9.pop();
|
|
11650
|
+
}
|
|
11651
|
+
|
|
11652
|
+
// src/components/svelte/content/Accordion.svelte
|
|
11653
|
+
var import_disclose_version10 = require("svelte/internal/disclose-version");
|
|
11654
|
+
var $10 = __toESM(require("svelte/internal/client"));
|
|
11655
|
+
var root6 = $10.from_html(`<div><!></div>`);
|
|
11656
|
+
function Accordion3($$anchor, $$props) {
|
|
11657
|
+
let className = $10.prop($$props, "className", 3, "");
|
|
11658
|
+
var div = root6();
|
|
11659
|
+
var node = $10.child(div);
|
|
11660
|
+
$10.snippet(node, () => $$props.children);
|
|
11661
|
+
$10.reset(div);
|
|
11662
|
+
$10.template_effect(() => $10.set_class(div, 1, $10.clsx(className())));
|
|
11663
|
+
$10.append($$anchor, div);
|
|
11664
|
+
}
|
|
11665
|
+
|
|
11666
|
+
// src/components/svelte/content/AccordionGroup.svelte
|
|
11667
|
+
var import_disclose_version22 = require("svelte/internal/disclose-version");
|
|
11668
|
+
var $22 = __toESM(require("svelte/internal/client"));
|
|
11669
|
+
|
|
11670
|
+
// src/components/svelte/ui/Accordion.svelte
|
|
11671
|
+
var import_disclose_version11 = require("svelte/internal/disclose-version");
|
|
11672
|
+
var import_legacy = require("svelte/internal/flags/legacy");
|
|
11673
|
+
var $11 = __toESM(require("svelte/internal/client"));
|
|
11674
|
+
var import_accordion = __toESM(require("bits-ui/accordion"));
|
|
11675
|
+
var import_accordion2 = __toESM(require("bits-ui/accordion"));
|
|
11676
|
+
var import_accordion3 = __toESM(require("bits-ui/accordion"));
|
|
11677
|
+
var import_accordion4 = __toESM(require("bits-ui/accordion"));
|
|
11678
|
+
|
|
11679
|
+
// src/components/svelte/ui/Dialog.svelte
|
|
11680
|
+
var import_disclose_version12 = require("svelte/internal/disclose-version");
|
|
11681
|
+
var import_legacy2 = require("svelte/internal/flags/legacy");
|
|
11682
|
+
var $12 = __toESM(require("svelte/internal/client"));
|
|
11683
|
+
var import_dialog = __toESM(require("bits-ui/dialog"));
|
|
11684
|
+
var import_dialog2 = __toESM(require("bits-ui/dialog"));
|
|
11685
|
+
var import_dialog3 = __toESM(require("bits-ui/dialog"));
|
|
11686
|
+
var import_dialog4 = __toESM(require("bits-ui/dialog"));
|
|
11687
|
+
var import_dialog5 = __toESM(require("bits-ui/dialog"));
|
|
11688
|
+
var import_dialog6 = __toESM(require("bits-ui/dialog"));
|
|
11689
|
+
var import_dialog7 = __toESM(require("bits-ui/dialog"));
|
|
11690
|
+
|
|
11691
|
+
// src/components/svelte/ui/Tabs.svelte
|
|
11692
|
+
var import_disclose_version13 = require("svelte/internal/disclose-version");
|
|
11693
|
+
var import_legacy3 = require("svelte/internal/flags/legacy");
|
|
11694
|
+
var $13 = __toESM(require("svelte/internal/client"));
|
|
11695
|
+
var import_tabs = __toESM(require("bits-ui/tabs"));
|
|
11696
|
+
var import_tabs2 = __toESM(require("bits-ui/tabs"));
|
|
11697
|
+
var import_tabs3 = __toESM(require("bits-ui/tabs"));
|
|
11698
|
+
var import_tabs4 = __toESM(require("bits-ui/tabs"));
|
|
11699
|
+
|
|
11700
|
+
// src/components/svelte/ui/Checkbox.svelte
|
|
11701
|
+
var import_disclose_version14 = require("svelte/internal/disclose-version");
|
|
11702
|
+
var import_legacy4 = require("svelte/internal/flags/legacy");
|
|
11703
|
+
var $14 = __toESM(require("svelte/internal/client"));
|
|
11704
|
+
var import_checkbox = __toESM(require("bits-ui/checkbox"));
|
|
11705
|
+
|
|
11706
|
+
// src/components/svelte/ui/Switch.svelte
|
|
11707
|
+
var import_disclose_version15 = require("svelte/internal/disclose-version");
|
|
11708
|
+
var import_legacy5 = require("svelte/internal/flags/legacy");
|
|
11709
|
+
var $15 = __toESM(require("svelte/internal/client"));
|
|
11710
|
+
var import_switch = __toESM(require("bits-ui/switch"));
|
|
11711
|
+
|
|
11712
|
+
// src/components/svelte/ui/RadioGroup.svelte
|
|
11713
|
+
var import_disclose_version16 = require("svelte/internal/disclose-version");
|
|
11714
|
+
var import_legacy6 = require("svelte/internal/flags/legacy");
|
|
11715
|
+
var $16 = __toESM(require("svelte/internal/client"));
|
|
11716
|
+
var import_radio_group = __toESM(require("bits-ui/radio-group"));
|
|
11717
|
+
var import_radio_group2 = __toESM(require("bits-ui/radio-group"));
|
|
11718
|
+
|
|
11719
|
+
// src/components/svelte/ui/Collapsible.svelte
|
|
11720
|
+
var import_disclose_version17 = require("svelte/internal/disclose-version");
|
|
11721
|
+
var import_legacy7 = require("svelte/internal/flags/legacy");
|
|
11722
|
+
var $17 = __toESM(require("svelte/internal/client"));
|
|
11723
|
+
var import_collapsible = __toESM(require("bits-ui/collapsible"));
|
|
11724
|
+
var import_collapsible2 = __toESM(require("bits-ui/collapsible"));
|
|
11725
|
+
var import_collapsible3 = __toESM(require("bits-ui/collapsible"));
|
|
11726
|
+
|
|
11727
|
+
// src/components/svelte/ui/Select.svelte
|
|
11728
|
+
var import_disclose_version18 = require("svelte/internal/disclose-version");
|
|
11729
|
+
var import_legacy8 = require("svelte/internal/flags/legacy");
|
|
11730
|
+
var $18 = __toESM(require("svelte/internal/client"));
|
|
11731
|
+
var import_select = __toESM(require("bits-ui/select"));
|
|
11732
|
+
var import_select2 = __toESM(require("bits-ui/select"));
|
|
11733
|
+
var import_select3 = __toESM(require("bits-ui/select"));
|
|
11734
|
+
var import_select4 = __toESM(require("bits-ui/select"));
|
|
11735
|
+
var import_select5 = __toESM(require("bits-ui/select"));
|
|
11736
|
+
|
|
11737
|
+
// src/components/svelte/ui/DropdownMenu.svelte
|
|
11738
|
+
var import_disclose_version19 = require("svelte/internal/disclose-version");
|
|
11739
|
+
var import_legacy9 = require("svelte/internal/flags/legacy");
|
|
11740
|
+
var $19 = __toESM(require("svelte/internal/client"));
|
|
11741
|
+
var import_dropdown_menu = __toESM(require("bits-ui/dropdown-menu"));
|
|
11742
|
+
var import_dropdown_menu2 = __toESM(require("bits-ui/dropdown-menu"));
|
|
11743
|
+
var import_dropdown_menu3 = __toESM(require("bits-ui/dropdown-menu"));
|
|
11744
|
+
var import_dropdown_menu4 = __toESM(require("bits-ui/dropdown-menu"));
|
|
11745
|
+
var import_dropdown_menu5 = __toESM(require("bits-ui/dropdown-menu"));
|
|
11746
|
+
|
|
11747
|
+
// src/components/svelte/ui/Tooltip.svelte
|
|
11748
|
+
var import_disclose_version20 = require("svelte/internal/disclose-version");
|
|
11749
|
+
var import_legacy10 = require("svelte/internal/flags/legacy");
|
|
11750
|
+
var $20 = __toESM(require("svelte/internal/client"));
|
|
11751
|
+
var import_tooltip = __toESM(require("bits-ui/tooltip"));
|
|
11752
|
+
var import_tooltip2 = __toESM(require("bits-ui/tooltip"));
|
|
11753
|
+
var import_tooltip3 = __toESM(require("bits-ui/tooltip"));
|
|
11754
|
+
var import_tooltip4 = __toESM(require("bits-ui/tooltip"));
|
|
11755
|
+
|
|
11756
|
+
// src/components/svelte/ui/Separator.svelte
|
|
11757
|
+
var import_disclose_version21 = require("svelte/internal/disclose-version");
|
|
11758
|
+
var import_legacy11 = require("svelte/internal/flags/legacy");
|
|
11759
|
+
var $21 = __toESM(require("svelte/internal/client"));
|
|
11760
|
+
var import_separator = __toESM(require("bits-ui/separator"));
|
|
11761
|
+
|
|
11762
|
+
// src/components/svelte/content/AccordionGroup.svelte
|
|
11763
|
+
var import_lucide_svelte5 = require("lucide-svelte");
|
|
11764
|
+
var root7 = $22.from_html(`<div><!></div>`);
|
|
11765
|
+
function AccordionGroup2($$anchor, $$props) {
|
|
11766
|
+
$22.push($$props, true);
|
|
11767
|
+
let type = $22.prop($$props, "type", 3, "single"), value = $22.prop($$props, "value", 15), defaultValue = $22.prop($$props, "defaultValue", 3, ""), collapsible = $22.prop($$props, "collapsible", 3, true), className = $22.prop($$props, "className", 3, "");
|
|
11768
|
+
var div = root7();
|
|
11769
|
+
var node = $22.child(div);
|
|
11770
|
+
$22.component(node, () => import_accordion.default.Root, ($$anchor2, Accordion_Root) => {
|
|
11771
|
+
Accordion_Root($$anchor2, {
|
|
11772
|
+
get type() {
|
|
11773
|
+
return type();
|
|
11774
|
+
},
|
|
11775
|
+
get defaultValue() {
|
|
11776
|
+
return defaultValue();
|
|
11777
|
+
},
|
|
11778
|
+
get collapsible() {
|
|
11779
|
+
return collapsible();
|
|
11780
|
+
},
|
|
11781
|
+
get class() {
|
|
11782
|
+
return componentStyles.accordion.base;
|
|
11783
|
+
},
|
|
11784
|
+
get value() {
|
|
11785
|
+
return value();
|
|
11786
|
+
},
|
|
11787
|
+
set value($$value) {
|
|
11788
|
+
value($$value);
|
|
11789
|
+
},
|
|
11790
|
+
children: ($$anchor3, $$slotProps) => {
|
|
11791
|
+
var fragment = $22.comment();
|
|
11792
|
+
var node_1 = $22.first_child(fragment);
|
|
11793
|
+
$22.snippet(node_1, () => {
|
|
11794
|
+
var _a;
|
|
11795
|
+
return (_a = $$props.children) != null ? _a : $22.noop;
|
|
11796
|
+
});
|
|
11797
|
+
$22.append($$anchor3, fragment);
|
|
11798
|
+
},
|
|
11799
|
+
$$slots: { default: true }
|
|
11800
|
+
});
|
|
11801
|
+
});
|
|
11802
|
+
$22.reset(div);
|
|
11803
|
+
$22.template_effect(() => $22.set_class(div, 1, "border rounded-lg overflow-hidden " + className()));
|
|
11804
|
+
$22.append($$anchor, div);
|
|
11805
|
+
$22.pop();
|
|
11806
|
+
}
|
|
11807
|
+
|
|
11808
|
+
// src/components/svelte/content/FileTree.svelte
|
|
11809
|
+
var import_disclose_version23 = require("svelte/internal/disclose-version");
|
|
11810
|
+
var $23 = __toESM(require("svelte/internal/client"));
|
|
11811
|
+
var root8 = $23.from_html(`<div><!></div>`);
|
|
11812
|
+
function FileTree($$anchor, $$props) {
|
|
11813
|
+
$23.push($$props, true);
|
|
11814
|
+
let className = $23.prop($$props, "className", 3, "");
|
|
11815
|
+
var div = root8();
|
|
11816
|
+
var node = $23.child(div);
|
|
11817
|
+
$23.snippet(node, () => $$props.children);
|
|
11818
|
+
$23.reset(div);
|
|
11819
|
+
$23.template_effect(() => $23.set_class(div, 1, componentStyles.fileTree.base + " " + className()));
|
|
11820
|
+
$23.append($$anchor, div);
|
|
11821
|
+
$23.pop();
|
|
11822
|
+
}
|
|
11823
|
+
|
|
11824
|
+
// src/components/svelte/content/Stepper.svelte
|
|
11825
|
+
var import_disclose_version24 = require("svelte/internal/disclose-version");
|
|
11826
|
+
var $24 = __toESM(require("svelte/internal/client"));
|
|
11827
|
+
var import_lucide_svelte6 = require("lucide-svelte");
|
|
11828
|
+
var root9 = $24.from_html(`<div><!></div>`);
|
|
11829
|
+
function Stepper2($$anchor, $$props) {
|
|
11830
|
+
$24.push($$props, true);
|
|
11831
|
+
let className = $24.prop($$props, "className", 3, "");
|
|
11832
|
+
var div = root9();
|
|
11833
|
+
var node = $24.child(div);
|
|
11834
|
+
$24.snippet(node, () => $$props.children);
|
|
11835
|
+
$24.reset(div);
|
|
11836
|
+
$24.template_effect(() => $24.set_class(div, 1, componentStyles.stepper.base + " " + className()));
|
|
11837
|
+
$24.append($$anchor, div);
|
|
11838
|
+
$24.pop();
|
|
11839
|
+
}
|
|
11840
|
+
|
|
11841
|
+
// src/components/svelte/content/Release.svelte
|
|
11842
|
+
var import_disclose_version25 = require("svelte/internal/disclose-version");
|
|
11843
|
+
var $25 = __toESM(require("svelte/internal/client"));
|
|
11844
|
+
var root_13 = $25.from_html(`<div> </div>`);
|
|
11845
|
+
var root_2 = $25.from_html(`<div> </div>`);
|
|
11846
|
+
var root10 = $25.from_html(`<div><!> <!> <div><!></div></div>`);
|
|
11847
|
+
function Release2($$anchor, $$props) {
|
|
11848
|
+
$25.push($$props, true);
|
|
11849
|
+
let version = $25.prop($$props, "version", 3, ""), date = $25.prop($$props, "date", 3, ""), className = $25.prop($$props, "className", 3, "");
|
|
11850
|
+
var div = root10();
|
|
11851
|
+
var node = $25.child(div);
|
|
11852
|
+
{
|
|
11853
|
+
var consequent = ($$anchor2) => {
|
|
11854
|
+
var div_1 = root_13();
|
|
11855
|
+
var text = $25.child(div_1);
|
|
11856
|
+
$25.reset(div_1);
|
|
11857
|
+
$25.template_effect(() => {
|
|
11858
|
+
var _a;
|
|
11859
|
+
$25.set_class(div_1, 1, $25.clsx(componentStyles.release.version));
|
|
11860
|
+
$25.set_text(text, `v${(_a = version()) != null ? _a : ""}`);
|
|
11861
|
+
});
|
|
11862
|
+
$25.append($$anchor2, div_1);
|
|
11863
|
+
};
|
|
11864
|
+
$25.if(node, ($$render) => {
|
|
11865
|
+
if (version()) $$render(consequent);
|
|
11866
|
+
});
|
|
11867
|
+
}
|
|
11868
|
+
var node_1 = $25.sibling(node, 2);
|
|
11869
|
+
{
|
|
11870
|
+
var consequent_1 = ($$anchor2) => {
|
|
11871
|
+
var div_2 = root_2();
|
|
11872
|
+
var text_1 = $25.child(div_2, true);
|
|
11873
|
+
$25.reset(div_2);
|
|
11874
|
+
$25.template_effect(() => {
|
|
11875
|
+
$25.set_class(div_2, 1, $25.clsx(componentStyles.release.date));
|
|
11876
|
+
$25.set_text(text_1, date());
|
|
11877
|
+
});
|
|
11878
|
+
$25.append($$anchor2, div_2);
|
|
11879
|
+
};
|
|
11880
|
+
$25.if(node_1, ($$render) => {
|
|
11881
|
+
if (date()) $$render(consequent_1);
|
|
11882
|
+
});
|
|
11883
|
+
}
|
|
11884
|
+
var div_3 = $25.sibling(node_1, 2);
|
|
11885
|
+
var node_2 = $25.child(div_3);
|
|
11886
|
+
$25.snippet(node_2, () => $$props.children);
|
|
11887
|
+
$25.reset(div_3);
|
|
11888
|
+
$25.reset(div);
|
|
11889
|
+
$25.template_effect(() => {
|
|
11890
|
+
$25.set_class(div, 1, componentStyles.release.base + " " + className());
|
|
11891
|
+
$25.set_class(div_3, 1, $25.clsx(componentStyles.release.changes));
|
|
11892
|
+
});
|
|
11893
|
+
$25.append($$anchor, div);
|
|
11894
|
+
$25.pop();
|
|
11895
|
+
}
|
|
11896
|
+
|
|
11897
|
+
// src/components/svelte/content/Youtube.svelte
|
|
11898
|
+
var import_disclose_version26 = require("svelte/internal/disclose-version");
|
|
11899
|
+
var $26 = __toESM(require("svelte/internal/client"));
|
|
11900
|
+
var root_14 = $26.from_html(`<div><iframe title="YouTube video" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>`);
|
|
11901
|
+
function Youtube2($$anchor, $$props) {
|
|
11902
|
+
$26.push($$props, true);
|
|
11903
|
+
let videoId = $26.prop($$props, "videoId", 3, ""), className = $26.prop($$props, "className", 3, "");
|
|
11904
|
+
const youtubeUrl = $26.derived(() => videoId() ? `https://www.youtube.com/embed/${videoId()}` : "");
|
|
11905
|
+
var fragment = $26.comment();
|
|
11906
|
+
var node = $26.first_child(fragment);
|
|
11907
|
+
{
|
|
11908
|
+
var consequent = ($$anchor2) => {
|
|
11909
|
+
var div = root_14();
|
|
11910
|
+
var iframe = $26.child(div);
|
|
11911
|
+
$26.reset(div);
|
|
11912
|
+
$26.template_effect(() => {
|
|
11913
|
+
$26.set_class(div, 1, componentStyles.youtube.container + " " + className());
|
|
11914
|
+
$26.set_attribute(iframe, "src", $26.get(youtubeUrl));
|
|
11915
|
+
$26.set_class(iframe, 1, $26.clsx(componentStyles.youtube.iframe));
|
|
11916
|
+
});
|
|
11917
|
+
$26.append($$anchor2, div);
|
|
11918
|
+
};
|
|
11919
|
+
$26.if(node, ($$render) => {
|
|
11920
|
+
if (videoId()) $$render(consequent);
|
|
11921
|
+
});
|
|
11922
|
+
}
|
|
11923
|
+
$26.append($$anchor, fragment);
|
|
11924
|
+
$26.pop();
|
|
11925
|
+
}
|
|
11926
|
+
|
|
11927
|
+
// src/components/svelte/content/Tooltip.svelte
|
|
11928
|
+
var import_disclose_version27 = require("svelte/internal/disclose-version");
|
|
11929
|
+
var $27 = __toESM(require("svelte/internal/client"));
|
|
11930
|
+
var root_15 = $27.from_html(`<!> <!>`, 1);
|
|
11931
|
+
function Tooltip4($$anchor, $$props) {
|
|
11932
|
+
let className = $27.prop($$props, "className", 3, "");
|
|
11933
|
+
(0, import_tooltip.default)($$anchor, {
|
|
11934
|
+
children: ($$anchor2, $$slotProps) => {
|
|
11935
|
+
var fragment_1 = root_15();
|
|
11936
|
+
var node = $27.first_child(fragment_1);
|
|
11937
|
+
(0, import_tooltip2.default)(node, {
|
|
11938
|
+
get class() {
|
|
11939
|
+
return className();
|
|
11940
|
+
},
|
|
11941
|
+
children: ($$anchor3, $$slotProps2) => {
|
|
11942
|
+
var fragment_2 = $27.comment();
|
|
11943
|
+
var node_1 = $27.first_child(fragment_2);
|
|
11944
|
+
$27.snippet(node_1, () => {
|
|
11945
|
+
var _a;
|
|
11946
|
+
return (_a = $$props.trigger) != null ? _a : $27.noop;
|
|
11947
|
+
});
|
|
11948
|
+
$27.append($$anchor3, fragment_2);
|
|
11949
|
+
},
|
|
11950
|
+
$$slots: { default: true }
|
|
11951
|
+
});
|
|
11952
|
+
var node_2 = $27.sibling(node, 2);
|
|
11953
|
+
(0, import_tooltip3.default)(node_2, {
|
|
11954
|
+
children: ($$anchor3, $$slotProps2) => {
|
|
11955
|
+
var fragment_3 = $27.comment();
|
|
11956
|
+
var node_3 = $27.first_child(fragment_3);
|
|
11957
|
+
$27.snippet(node_3, () => {
|
|
11958
|
+
var _a;
|
|
11959
|
+
return (_a = $$props.children) != null ? _a : $27.noop;
|
|
11960
|
+
});
|
|
11961
|
+
$27.append($$anchor3, fragment_3);
|
|
11962
|
+
},
|
|
11963
|
+
$$slots: { default: true }
|
|
11964
|
+
});
|
|
11965
|
+
$27.append($$anchor2, fragment_1);
|
|
11966
|
+
},
|
|
11967
|
+
$$slots: { default: true }
|
|
11968
|
+
});
|
|
11969
|
+
}
|
|
10802
11970
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10803
11971
|
0 && (module.exports = {
|
|
10804
11972
|
Accordion,
|
|
@@ -10865,6 +12033,59 @@ Separator5.displayName = Root8.displayName;
|
|
|
10865
12033
|
Separator,
|
|
10866
12034
|
Stepper,
|
|
10867
12035
|
StepperItem,
|
|
12036
|
+
SvelteAccordion,
|
|
12037
|
+
SvelteAccordionContent,
|
|
12038
|
+
SvelteAccordionGroup,
|
|
12039
|
+
SvelteAccordionItem,
|
|
12040
|
+
SvelteAccordionRoot,
|
|
12041
|
+
SvelteAccordionTrigger,
|
|
12042
|
+
SvelteButton,
|
|
12043
|
+
SvelteCard,
|
|
12044
|
+
SvelteCardGroup,
|
|
12045
|
+
SvelteCheckbox,
|
|
12046
|
+
SvelteCollapsible,
|
|
12047
|
+
SvelteCollapsibleContent,
|
|
12048
|
+
SvelteCollapsibleTrigger,
|
|
12049
|
+
SvelteCopy,
|
|
12050
|
+
SvelteDialog,
|
|
12051
|
+
SvelteDialogContent,
|
|
12052
|
+
SvelteDialogDescription,
|
|
12053
|
+
SvelteDialogFooter,
|
|
12054
|
+
SvelteDialogHeader,
|
|
12055
|
+
SvelteDialogTitle,
|
|
12056
|
+
SvelteDialogTrigger,
|
|
12057
|
+
SvelteDropdownMenu,
|
|
12058
|
+
SvelteDropdownMenuContent,
|
|
12059
|
+
SvelteDropdownMenuItem,
|
|
12060
|
+
SvelteDropdownMenuSeparator,
|
|
12061
|
+
SvelteDropdownMenuTrigger,
|
|
12062
|
+
SvelteFileTree,
|
|
12063
|
+
SvelteImage,
|
|
12064
|
+
SvelteKbd,
|
|
12065
|
+
SvelteLink,
|
|
12066
|
+
SvelteNote,
|
|
12067
|
+
SveltePre,
|
|
12068
|
+
SvelteRadioGroup,
|
|
12069
|
+
SvelteRadioGroupItem,
|
|
12070
|
+
SvelteRelease,
|
|
12071
|
+
SvelteSelect,
|
|
12072
|
+
SvelteSelectContent,
|
|
12073
|
+
SvelteSelectItem,
|
|
12074
|
+
SvelteSelectTrigger,
|
|
12075
|
+
SvelteSelectValue,
|
|
12076
|
+
SvelteSeparator,
|
|
12077
|
+
SvelteStepper,
|
|
12078
|
+
SvelteSwitch,
|
|
12079
|
+
SvelteTabs,
|
|
12080
|
+
SvelteTabsContent,
|
|
12081
|
+
SvelteTabsList,
|
|
12082
|
+
SvelteTabsTrigger,
|
|
12083
|
+
SvelteTooltip,
|
|
12084
|
+
SvelteTooltipContent,
|
|
12085
|
+
SvelteTooltipProvider,
|
|
12086
|
+
SvelteTooltipRoot,
|
|
12087
|
+
SvelteTooltipTrigger,
|
|
12088
|
+
SvelteYoutube,
|
|
10868
12089
|
Switch,
|
|
10869
12090
|
Tabs,
|
|
10870
12091
|
TabsContent,
|