@chronoter/main 0.1.10 → 0.1.11

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.
@@ -7533,33 +7533,20 @@ var createLucideIcon = (iconName, iconNode) => {
7533
7533
  return Component;
7534
7534
  };
7535
7535
 
7536
- // ../../node_modules/.pnpm/lucide-react@0.553.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/bell.js
7537
- var __iconNode = [
7538
- ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
7539
- [
7540
- "path",
7541
- {
7542
- d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
7543
- key: "11g9vi"
7544
- }
7545
- ]
7546
- ];
7547
- var Bell = createLucideIcon("bell", __iconNode);
7548
-
7549
7536
  // ../../node_modules/.pnpm/lucide-react@0.553.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js
7550
- var __iconNode2 = [
7537
+ var __iconNode = [
7551
7538
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
7552
7539
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
7553
7540
  ["path", { d: "M12 17h.01", key: "p32p05" }]
7554
7541
  ];
7555
- var CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode2);
7542
+ var CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode);
7556
7543
 
7557
7544
  // ../../node_modules/.pnpm/lucide-react@0.553.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
7558
- var __iconNode3 = [
7545
+ var __iconNode2 = [
7559
7546
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
7560
7547
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
7561
7548
  ];
7562
- var X = createLucideIcon("x", __iconNode3);
7549
+ var X = createLucideIcon("x", __iconNode2);
7563
7550
 
7564
7551
  // src/core/hooks/use-mobile.tsx
7565
7552
  var React3 = __toESM(require_react(), 1);
@@ -10886,10 +10873,10 @@ var NODES = [
10886
10873
  "ul"
10887
10874
  ];
10888
10875
  var Primitive = NODES.reduce((primitive, node) => {
10889
- const Slot4 = createSlot2(`Primitive.${node}`);
10876
+ const Slot3 = createSlot2(`Primitive.${node}`);
10890
10877
  const Node2 = React10.forwardRef((props, forwardedRef) => {
10891
10878
  const { asChild, ...primitiveProps } = props;
10892
- const Comp = asChild ? Slot4 : node;
10879
+ const Comp = asChild ? Slot3 : node;
10893
10880
  if (typeof window !== "undefined") {
10894
10881
  window[Symbol.for("radix-ui")] = true;
10895
10882
  }
@@ -15904,7 +15891,7 @@ function SidebarMenuSubButton({
15904
15891
  }
15905
15892
 
15906
15893
  // src/core/components/layout/ChronoterHeader.tsx
15907
- var React42 = __toESM(require_react(), 1);
15894
+ var React39 = __toESM(require_react(), 1);
15908
15895
 
15909
15896
  // ../../node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@18.3.7_@types+react@18.3.26__@types+r_tqpeediw4apzeruvopnk34mhqu/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
15910
15897
  var React38 = __toESM(require_react(), 1);
@@ -15926,7 +15913,7 @@ __toESM(require_react(), 1);
15926
15913
  __toESM(require_jsx_runtime(), 1);
15927
15914
  function createCollection(name) {
15928
15915
  const PROVIDER_NAME2 = name + "CollectionProvider";
15929
- const [createCollectionContext, createCollectionScope4] = createContextScope(PROVIDER_NAME2);
15916
+ const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
15930
15917
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
15931
15918
  PROVIDER_NAME2,
15932
15919
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -15966,7 +15953,7 @@ function createCollection(name) {
15966
15953
  }
15967
15954
  );
15968
15955
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
15969
- function useCollection4(scope) {
15956
+ function useCollection2(scope) {
15970
15957
  const context = useCollectionContext(name + "CollectionConsumer", scope);
15971
15958
  const getItems = import_react5.default.useCallback(() => {
15972
15959
  const collectionNode = context.collectionRef.current;
@@ -15982,8 +15969,8 @@ function createCollection(name) {
15982
15969
  }
15983
15970
  return [
15984
15971
  { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
15985
- useCollection4,
15986
- createCollectionScope4
15972
+ useCollection2,
15973
+ createCollectionScope2
15987
15974
  ];
15988
15975
  }
15989
15976
 
@@ -16903,1418 +16890,32 @@ var HamburgerIcon = ({
16903
16890
  }
16904
16891
  );
16905
16892
 
16906
- // ../../node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@18.3.7_@types+react@18.3.26__@types+rea_iaecsfbcg4zg4kegr2ujb7doey/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
16907
- var React41 = __toESM(require_react(), 1);
16908
-
16909
- // ../../node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@18.3.7_@types+react@18.3.26__@types+react@18.3.2_y3hbfiku5rjtwg3ibyxwi2eup4/node_modules/@radix-ui/react-menu/dist/index.mjs
16910
- var React40 = __toESM(require_react(), 1);
16911
-
16912
- // ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@18.3.7_@types+react@18.3.26__@types+reac_ipyy2w45uopecj6ozew45icviu/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
16913
- var React39 = __toESM(require_react(), 1);
16914
- var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
16915
- var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
16916
- var EVENT_OPTIONS2 = { bubbles: false, cancelable: true };
16917
- var GROUP_NAME = "RovingFocusGroup";
16918
- var [Collection2, useCollection2, createCollectionScope2] = createCollection(GROUP_NAME);
16919
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
16920
- GROUP_NAME,
16921
- [createCollectionScope2]
16922
- );
16923
- var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
16924
- var RovingFocusGroup = React39.forwardRef(
16925
- (props, forwardedRef) => {
16926
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Collection2.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Collection2.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
16927
- }
16928
- );
16929
- RovingFocusGroup.displayName = GROUP_NAME;
16930
- var RovingFocusGroupImpl = React39.forwardRef((props, forwardedRef) => {
16931
- const {
16932
- __scopeRovingFocusGroup,
16933
- orientation,
16934
- loop = false,
16935
- dir,
16936
- currentTabStopId: currentTabStopIdProp,
16937
- defaultCurrentTabStopId,
16938
- onCurrentTabStopIdChange,
16939
- onEntryFocus,
16940
- preventScrollOnEntryFocus = false,
16941
- ...groupProps
16942
- } = props;
16943
- const ref = React39.useRef(null);
16944
- const composedRefs = useComposedRefs(forwardedRef, ref);
16945
- const direction = useDirection(dir);
16946
- const [currentTabStopId, setCurrentTabStopId] = useControllableState({
16947
- prop: currentTabStopIdProp,
16948
- defaultProp: defaultCurrentTabStopId ?? null,
16949
- onChange: onCurrentTabStopIdChange,
16950
- caller: GROUP_NAME
16951
- });
16952
- const [isTabbingBackOut, setIsTabbingBackOut] = React39.useState(false);
16953
- const handleEntryFocus = useCallbackRef(onEntryFocus);
16954
- const getItems = useCollection2(__scopeRovingFocusGroup);
16955
- const isClickFocusRef = React39.useRef(false);
16956
- const [focusableItemsCount, setFocusableItemsCount] = React39.useState(0);
16957
- React39.useEffect(() => {
16958
- const node = ref.current;
16959
- if (node) {
16960
- node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
16961
- return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
16962
- }
16963
- }, [handleEntryFocus]);
16964
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
16965
- RovingFocusProvider,
16966
- {
16967
- scope: __scopeRovingFocusGroup,
16968
- orientation,
16969
- dir: direction,
16970
- loop,
16971
- currentTabStopId,
16972
- onItemFocus: React39.useCallback(
16973
- (tabStopId) => setCurrentTabStopId(tabStopId),
16974
- [setCurrentTabStopId]
16975
- ),
16976
- onItemShiftTab: React39.useCallback(() => setIsTabbingBackOut(true), []),
16977
- onFocusableItemAdd: React39.useCallback(
16978
- () => setFocusableItemsCount((prevCount) => prevCount + 1),
16979
- []
16980
- ),
16981
- onFocusableItemRemove: React39.useCallback(
16982
- () => setFocusableItemsCount((prevCount) => prevCount - 1),
16983
- []
16984
- ),
16985
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
16986
- Primitive.div,
16987
- {
16988
- tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
16989
- "data-orientation": orientation,
16990
- ...groupProps,
16991
- ref: composedRefs,
16992
- style: { outline: "none", ...props.style },
16993
- onMouseDown: composeEventHandlers(props.onMouseDown, () => {
16994
- isClickFocusRef.current = true;
16995
- }),
16996
- onFocus: composeEventHandlers(props.onFocus, (event) => {
16997
- const isKeyboardFocus = !isClickFocusRef.current;
16998
- if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
16999
- const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS2);
17000
- event.currentTarget.dispatchEvent(entryFocusEvent);
17001
- if (!entryFocusEvent.defaultPrevented) {
17002
- const items = getItems().filter((item) => item.focusable);
17003
- const activeItem = items.find((item) => item.active);
17004
- const currentItem = items.find((item) => item.id === currentTabStopId);
17005
- const candidateItems = [activeItem, currentItem, ...items].filter(
17006
- Boolean
17007
- );
17008
- const candidateNodes = candidateItems.map((item) => item.ref.current);
17009
- focusFirst3(candidateNodes, preventScrollOnEntryFocus);
17010
- }
17011
- }
17012
- isClickFocusRef.current = false;
17013
- }),
17014
- onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
17015
- }
17016
- )
17017
- }
17018
- );
17019
- });
17020
- var ITEM_NAME2 = "RovingFocusGroupItem";
17021
- var RovingFocusGroupItem = React39.forwardRef(
17022
- (props, forwardedRef) => {
17023
- const {
17024
- __scopeRovingFocusGroup,
17025
- focusable = true,
17026
- active = false,
17027
- tabStopId,
17028
- children,
17029
- ...itemProps
17030
- } = props;
17031
- const autoId = useId();
17032
- const id = tabStopId || autoId;
17033
- const context = useRovingFocusContext(ITEM_NAME2, __scopeRovingFocusGroup);
17034
- const isCurrentTabStop = context.currentTabStopId === id;
17035
- const getItems = useCollection2(__scopeRovingFocusGroup);
17036
- const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
17037
- React39.useEffect(() => {
17038
- if (focusable) {
17039
- onFocusableItemAdd();
17040
- return () => onFocusableItemRemove();
17041
- }
17042
- }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
17043
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
17044
- Collection2.ItemSlot,
17045
- {
17046
- scope: __scopeRovingFocusGroup,
17047
- id,
17048
- focusable,
17049
- active,
17050
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
17051
- Primitive.span,
17052
- {
17053
- tabIndex: isCurrentTabStop ? 0 : -1,
17054
- "data-orientation": context.orientation,
17055
- ...itemProps,
17056
- ref: forwardedRef,
17057
- onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
17058
- if (!focusable) event.preventDefault();
17059
- else context.onItemFocus(id);
17060
- }),
17061
- onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
17062
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
17063
- if (event.key === "Tab" && event.shiftKey) {
17064
- context.onItemShiftTab();
17065
- return;
17066
- }
17067
- if (event.target !== event.currentTarget) return;
17068
- const focusIntent = getFocusIntent(event, context.orientation, context.dir);
17069
- if (focusIntent !== void 0) {
17070
- if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
17071
- event.preventDefault();
17072
- const items = getItems().filter((item) => item.focusable);
17073
- let candidateNodes = items.map((item) => item.ref.current);
17074
- if (focusIntent === "last") candidateNodes.reverse();
17075
- else if (focusIntent === "prev" || focusIntent === "next") {
17076
- if (focusIntent === "prev") candidateNodes.reverse();
17077
- const currentIndex = candidateNodes.indexOf(event.currentTarget);
17078
- candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
17079
- }
17080
- setTimeout(() => focusFirst3(candidateNodes));
17081
- }
17082
- }),
17083
- children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
17084
- }
17085
- )
17086
- }
17087
- );
17088
- }
17089
- );
17090
- RovingFocusGroupItem.displayName = ITEM_NAME2;
17091
- var MAP_KEY_TO_FOCUS_INTENT = {
17092
- ArrowLeft: "prev",
17093
- ArrowUp: "prev",
17094
- ArrowRight: "next",
17095
- ArrowDown: "next",
17096
- PageUp: "first",
17097
- Home: "first",
17098
- PageDown: "last",
17099
- End: "last"
17100
- };
17101
- function getDirectionAwareKey(key, dir) {
17102
- if (dir !== "rtl") return key;
17103
- return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
17104
- }
17105
- function getFocusIntent(event, orientation, dir) {
17106
- const key = getDirectionAwareKey(event.key, dir);
17107
- if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
17108
- if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
17109
- return MAP_KEY_TO_FOCUS_INTENT[key];
17110
- }
17111
- function focusFirst3(candidates, preventScroll = false) {
17112
- const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
17113
- for (const candidate of candidates) {
17114
- if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
17115
- candidate.focus({ preventScroll });
17116
- if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
17117
- }
17118
- }
17119
- function wrapArray(array, startIndex) {
17120
- return array.map((_, index2) => array[(startIndex + index2) % array.length]);
17121
- }
17122
- var Root4 = RovingFocusGroup;
17123
- var Item2 = RovingFocusGroupItem;
17124
-
17125
- // ../../node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@18.3.7_@types+react@18.3.26__@types+react@18.3.2_y3hbfiku5rjtwg3ibyxwi2eup4/node_modules/@radix-ui/react-menu/dist/index.mjs
17126
- var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
17127
- var SELECTION_KEYS = ["Enter", " "];
17128
- var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"];
17129
- var LAST_KEYS = ["ArrowUp", "PageDown", "End"];
17130
- var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
17131
- var SUB_OPEN_KEYS = {
17132
- ltr: [...SELECTION_KEYS, "ArrowRight"],
17133
- rtl: [...SELECTION_KEYS, "ArrowLeft"]
17134
- };
17135
- var SUB_CLOSE_KEYS = {
17136
- ltr: ["ArrowLeft"],
17137
- rtl: ["ArrowRight"]
17138
- };
17139
- var MENU_NAME = "Menu";
17140
- var [Collection3, useCollection3, createCollectionScope3] = createCollection(MENU_NAME);
17141
- var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
17142
- createCollectionScope3,
17143
- createPopperScope,
17144
- createRovingFocusGroupScope
17145
- ]);
17146
- var usePopperScope2 = createPopperScope();
17147
- var useRovingFocusGroupScope = createRovingFocusGroupScope();
17148
- var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);
17149
- var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
17150
- var Menu = (props) => {
17151
- const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
17152
- const popperScope = usePopperScope2(__scopeMenu);
17153
- const [content, setContent] = React40.useState(null);
17154
- const isUsingKeyboardRef = React40.useRef(false);
17155
- const handleOpenChange = useCallbackRef(onOpenChange);
17156
- const direction = useDirection(dir);
17157
- React40.useEffect(() => {
17158
- const handleKeyDown = () => {
17159
- isUsingKeyboardRef.current = true;
17160
- document.addEventListener("pointerdown", handlePointer, { capture: true, once: true });
17161
- document.addEventListener("pointermove", handlePointer, { capture: true, once: true });
17162
- };
17163
- const handlePointer = () => isUsingKeyboardRef.current = false;
17164
- document.addEventListener("keydown", handleKeyDown, { capture: true });
17165
- return () => {
17166
- document.removeEventListener("keydown", handleKeyDown, { capture: true });
17167
- document.removeEventListener("pointerdown", handlePointer, { capture: true });
17168
- document.removeEventListener("pointermove", handlePointer, { capture: true });
17169
- };
17170
- }, []);
17171
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Root22, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17172
- MenuProvider,
17173
- {
17174
- scope: __scopeMenu,
17175
- open,
17176
- onOpenChange: handleOpenChange,
17177
- content,
17178
- onContentChange: setContent,
17179
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17180
- MenuRootProvider,
17181
- {
17182
- scope: __scopeMenu,
17183
- onClose: React40.useCallback(() => handleOpenChange(false), [handleOpenChange]),
17184
- isUsingKeyboardRef,
17185
- dir: direction,
17186
- modal,
17187
- children
17188
- }
17189
- )
17190
- }
17191
- ) });
17192
- };
17193
- Menu.displayName = MENU_NAME;
17194
- var ANCHOR_NAME2 = "MenuAnchor";
17195
- var MenuAnchor = React40.forwardRef(
17196
- (props, forwardedRef) => {
17197
- const { __scopeMenu, ...anchorProps } = props;
17198
- const popperScope = usePopperScope2(__scopeMenu);
17199
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
17200
- }
17201
- );
17202
- MenuAnchor.displayName = ANCHOR_NAME2;
17203
- var PORTAL_NAME4 = "MenuPortal";
17204
- var [PortalProvider3, usePortalContext3] = createMenuContext(PORTAL_NAME4, {
17205
- forceMount: void 0
17206
- });
17207
- var MenuPortal = (props) => {
17208
- const { __scopeMenu, forceMount, children, container } = props;
17209
- const context = useMenuContext(PORTAL_NAME4, __scopeMenu);
17210
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PortalProvider3, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Portal, { asChild: true, container, children }) }) });
17211
- };
17212
- MenuPortal.displayName = PORTAL_NAME4;
17213
- var CONTENT_NAME5 = "MenuContent";
17214
- var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME5);
17215
- var MenuContent = React40.forwardRef(
17216
- (props, forwardedRef) => {
17217
- const portalContext = usePortalContext3(CONTENT_NAME5, props.__scopeMenu);
17218
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
17219
- const context = useMenuContext(CONTENT_NAME5, props.__scopeMenu);
17220
- const rootContext = useMenuRootContext(CONTENT_NAME5, props.__scopeMenu);
17221
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Collection3.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Collection3.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
17222
- }
17223
- );
17224
- var MenuRootContentModal = React40.forwardRef(
17225
- (props, forwardedRef) => {
17226
- const context = useMenuContext(CONTENT_NAME5, props.__scopeMenu);
17227
- const ref = React40.useRef(null);
17228
- const composedRefs = useComposedRefs(forwardedRef, ref);
17229
- React40.useEffect(() => {
17230
- const content = ref.current;
17231
- if (content) return hideOthers(content);
17232
- }, []);
17233
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17234
- MenuContentImpl,
17235
- {
17236
- ...props,
17237
- ref: composedRefs,
17238
- trapFocus: context.open,
17239
- disableOutsidePointerEvents: context.open,
17240
- disableOutsideScroll: true,
17241
- onFocusOutside: composeEventHandlers(
17242
- props.onFocusOutside,
17243
- (event) => event.preventDefault(),
17244
- { checkForDefaultPrevented: false }
17245
- ),
17246
- onDismiss: () => context.onOpenChange(false)
17247
- }
17248
- );
17249
- }
17250
- );
17251
- var MenuRootContentNonModal = React40.forwardRef((props, forwardedRef) => {
17252
- const context = useMenuContext(CONTENT_NAME5, props.__scopeMenu);
17253
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17254
- MenuContentImpl,
17255
- {
17256
- ...props,
17257
- ref: forwardedRef,
17258
- trapFocus: false,
17259
- disableOutsidePointerEvents: false,
17260
- disableOutsideScroll: false,
17261
- onDismiss: () => context.onOpenChange(false)
17262
- }
17263
- );
17264
- });
17265
- var Slot3 = createSlot2("MenuContent.ScrollLock");
17266
- var MenuContentImpl = React40.forwardRef(
17267
- (props, forwardedRef) => {
17268
- const {
17269
- __scopeMenu,
17270
- loop = false,
17271
- trapFocus,
17272
- onOpenAutoFocus,
17273
- onCloseAutoFocus,
17274
- disableOutsidePointerEvents,
17275
- onEntryFocus,
17276
- onEscapeKeyDown,
17277
- onPointerDownOutside,
17278
- onFocusOutside,
17279
- onInteractOutside,
17280
- onDismiss,
17281
- disableOutsideScroll,
17282
- ...contentProps
17283
- } = props;
17284
- const context = useMenuContext(CONTENT_NAME5, __scopeMenu);
17285
- const rootContext = useMenuRootContext(CONTENT_NAME5, __scopeMenu);
17286
- const popperScope = usePopperScope2(__scopeMenu);
17287
- const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
17288
- const getItems = useCollection3(__scopeMenu);
17289
- const [currentItemId, setCurrentItemId] = React40.useState(null);
17290
- const contentRef = React40.useRef(null);
17291
- const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);
17292
- const timerRef = React40.useRef(0);
17293
- const searchRef = React40.useRef("");
17294
- const pointerGraceTimerRef = React40.useRef(0);
17295
- const pointerGraceIntentRef = React40.useRef(null);
17296
- const pointerDirRef = React40.useRef("right");
17297
- const lastPointerXRef = React40.useRef(0);
17298
- const ScrollLockWrapper = disableOutsideScroll ? Combination_default : React40.Fragment;
17299
- const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot3, allowPinchZoom: true } : void 0;
17300
- const handleTypeaheadSearch = (key) => {
17301
- const search = searchRef.current + key;
17302
- const items = getItems().filter((item) => !item.disabled);
17303
- const currentItem = document.activeElement;
17304
- const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;
17305
- const values = items.map((item) => item.textValue);
17306
- const nextMatch = getNextMatch(values, search, currentMatch);
17307
- const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;
17308
- (function updateSearch(value) {
17309
- searchRef.current = value;
17310
- window.clearTimeout(timerRef.current);
17311
- if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
17312
- })(search);
17313
- if (newItem) {
17314
- setTimeout(() => newItem.focus());
17315
- }
17316
- };
17317
- React40.useEffect(() => {
17318
- return () => window.clearTimeout(timerRef.current);
17319
- }, []);
17320
- useFocusGuards();
17321
- const isPointerMovingToSubmenu = React40.useCallback((event) => {
17322
- const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
17323
- return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
17324
- }, []);
17325
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17326
- MenuContentProvider,
17327
- {
17328
- scope: __scopeMenu,
17329
- searchRef,
17330
- onItemEnter: React40.useCallback(
17331
- (event) => {
17332
- if (isPointerMovingToSubmenu(event)) event.preventDefault();
17333
- },
17334
- [isPointerMovingToSubmenu]
17335
- ),
17336
- onItemLeave: React40.useCallback(
17337
- (event) => {
17338
- if (isPointerMovingToSubmenu(event)) return;
17339
- contentRef.current?.focus();
17340
- setCurrentItemId(null);
17341
- },
17342
- [isPointerMovingToSubmenu]
17343
- ),
17344
- onTriggerLeave: React40.useCallback(
17345
- (event) => {
17346
- if (isPointerMovingToSubmenu(event)) event.preventDefault();
17347
- },
17348
- [isPointerMovingToSubmenu]
17349
- ),
17350
- pointerGraceTimerRef,
17351
- onPointerGraceIntentChange: React40.useCallback((intent) => {
17352
- pointerGraceIntentRef.current = intent;
17353
- }, []),
17354
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17355
- FocusScope,
17356
- {
17357
- asChild: true,
17358
- trapped: trapFocus,
17359
- onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {
17360
- event.preventDefault();
17361
- contentRef.current?.focus({ preventScroll: true });
17362
- }),
17363
- onUnmountAutoFocus: onCloseAutoFocus,
17364
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17365
- DismissableLayer,
17366
- {
17367
- asChild: true,
17368
- disableOutsidePointerEvents,
17369
- onEscapeKeyDown,
17370
- onPointerDownOutside,
17371
- onFocusOutside,
17372
- onInteractOutside,
17373
- onDismiss,
17374
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17375
- Root4,
17376
- {
17377
- asChild: true,
17378
- ...rovingFocusGroupScope,
17379
- dir: rootContext.dir,
17380
- orientation: "vertical",
17381
- loop,
17382
- currentTabStopId: currentItemId,
17383
- onCurrentTabStopIdChange: setCurrentItemId,
17384
- onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {
17385
- if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
17386
- }),
17387
- preventScrollOnEntryFocus: true,
17388
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17389
- Content2,
17390
- {
17391
- role: "menu",
17392
- "aria-orientation": "vertical",
17393
- "data-state": getOpenState2(context.open),
17394
- "data-radix-menu-content": "",
17395
- dir: rootContext.dir,
17396
- ...popperScope,
17397
- ...contentProps,
17398
- ref: composedRefs,
17399
- style: { outline: "none", ...contentProps.style },
17400
- onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {
17401
- const target = event.target;
17402
- const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
17403
- const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
17404
- const isCharacterKey = event.key.length === 1;
17405
- if (isKeyDownInside) {
17406
- if (event.key === "Tab") event.preventDefault();
17407
- if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
17408
- }
17409
- const content = contentRef.current;
17410
- if (event.target !== content) return;
17411
- if (!FIRST_LAST_KEYS.includes(event.key)) return;
17412
- event.preventDefault();
17413
- const items = getItems().filter((item) => !item.disabled);
17414
- const candidateNodes = items.map((item) => item.ref.current);
17415
- if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();
17416
- focusFirst4(candidateNodes);
17417
- }),
17418
- onBlur: composeEventHandlers(props.onBlur, (event) => {
17419
- if (!event.currentTarget.contains(event.target)) {
17420
- window.clearTimeout(timerRef.current);
17421
- searchRef.current = "";
17422
- }
17423
- }),
17424
- onPointerMove: composeEventHandlers(
17425
- props.onPointerMove,
17426
- whenMouse2((event) => {
17427
- const target = event.target;
17428
- const pointerXHasChanged = lastPointerXRef.current !== event.clientX;
17429
- if (event.currentTarget.contains(target) && pointerXHasChanged) {
17430
- const newDir = event.clientX > lastPointerXRef.current ? "right" : "left";
17431
- pointerDirRef.current = newDir;
17432
- lastPointerXRef.current = event.clientX;
17433
- }
17434
- })
17435
- )
17436
- }
17437
- )
17438
- }
17439
- )
17440
- }
17441
- )
17442
- }
17443
- ) })
17444
- }
17445
- );
17446
- }
17447
- );
17448
- MenuContent.displayName = CONTENT_NAME5;
17449
- var GROUP_NAME2 = "MenuGroup";
17450
- var MenuGroup = React40.forwardRef(
17451
- (props, forwardedRef) => {
17452
- const { __scopeMenu, ...groupProps } = props;
17453
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
17454
- }
17455
- );
17456
- MenuGroup.displayName = GROUP_NAME2;
17457
- var LABEL_NAME = "MenuLabel";
17458
- var MenuLabel = React40.forwardRef(
17459
- (props, forwardedRef) => {
17460
- const { __scopeMenu, ...labelProps } = props;
17461
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Primitive.div, { ...labelProps, ref: forwardedRef });
17462
- }
17463
- );
17464
- MenuLabel.displayName = LABEL_NAME;
17465
- var ITEM_NAME3 = "MenuItem";
17466
- var ITEM_SELECT = "menu.itemSelect";
17467
- var MenuItem = React40.forwardRef(
17468
- (props, forwardedRef) => {
17469
- const { disabled = false, onSelect, ...itemProps } = props;
17470
- const ref = React40.useRef(null);
17471
- const rootContext = useMenuRootContext(ITEM_NAME3, props.__scopeMenu);
17472
- const contentContext = useMenuContentContext(ITEM_NAME3, props.__scopeMenu);
17473
- const composedRefs = useComposedRefs(forwardedRef, ref);
17474
- const isPointerDownRef = React40.useRef(false);
17475
- const handleSelect = () => {
17476
- const menuItem = ref.current;
17477
- if (!disabled && menuItem) {
17478
- const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });
17479
- menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });
17480
- dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);
17481
- if (itemSelectEvent.defaultPrevented) {
17482
- isPointerDownRef.current = false;
17483
- } else {
17484
- rootContext.onClose();
17485
- }
17486
- }
17487
- };
17488
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17489
- MenuItemImpl,
17490
- {
17491
- ...itemProps,
17492
- ref: composedRefs,
17493
- disabled,
17494
- onClick: composeEventHandlers(props.onClick, handleSelect),
17495
- onPointerDown: (event) => {
17496
- props.onPointerDown?.(event);
17497
- isPointerDownRef.current = true;
17498
- },
17499
- onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
17500
- if (!isPointerDownRef.current) event.currentTarget?.click();
17501
- }),
17502
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
17503
- const isTypingAhead = contentContext.searchRef.current !== "";
17504
- if (disabled || isTypingAhead && event.key === " ") return;
17505
- if (SELECTION_KEYS.includes(event.key)) {
17506
- event.currentTarget.click();
17507
- event.preventDefault();
17508
- }
17509
- })
17510
- }
17511
- );
17512
- }
17513
- );
17514
- MenuItem.displayName = ITEM_NAME3;
17515
- var MenuItemImpl = React40.forwardRef(
17516
- (props, forwardedRef) => {
17517
- const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
17518
- const contentContext = useMenuContentContext(ITEM_NAME3, __scopeMenu);
17519
- const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
17520
- const ref = React40.useRef(null);
17521
- const composedRefs = useComposedRefs(forwardedRef, ref);
17522
- const [isFocused, setIsFocused] = React40.useState(false);
17523
- const [textContent, setTextContent] = React40.useState("");
17524
- React40.useEffect(() => {
17525
- const menuItem = ref.current;
17526
- if (menuItem) {
17527
- setTextContent((menuItem.textContent ?? "").trim());
17528
- }
17529
- }, [itemProps.children]);
17530
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17531
- Collection3.ItemSlot,
17532
- {
17533
- scope: __scopeMenu,
17534
- disabled,
17535
- textValue: textValue ?? textContent,
17536
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Item2, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17537
- Primitive.div,
17538
- {
17539
- role: "menuitem",
17540
- "data-highlighted": isFocused ? "" : void 0,
17541
- "aria-disabled": disabled || void 0,
17542
- "data-disabled": disabled ? "" : void 0,
17543
- ...itemProps,
17544
- ref: composedRefs,
17545
- onPointerMove: composeEventHandlers(
17546
- props.onPointerMove,
17547
- whenMouse2((event) => {
17548
- if (disabled) {
17549
- contentContext.onItemLeave(event);
17550
- } else {
17551
- contentContext.onItemEnter(event);
17552
- if (!event.defaultPrevented) {
17553
- const item = event.currentTarget;
17554
- item.focus({ preventScroll: true });
17555
- }
17556
- }
17557
- })
17558
- ),
17559
- onPointerLeave: composeEventHandlers(
17560
- props.onPointerLeave,
17561
- whenMouse2((event) => contentContext.onItemLeave(event))
17562
- ),
17563
- onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),
17564
- onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))
17565
- }
17566
- ) })
17567
- }
17568
- );
17569
- }
17570
- );
17571
- var CHECKBOX_ITEM_NAME = "MenuCheckboxItem";
17572
- var MenuCheckboxItem = React40.forwardRef(
17573
- (props, forwardedRef) => {
17574
- const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
17575
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17576
- MenuItem,
17577
- {
17578
- role: "menuitemcheckbox",
17579
- "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
17580
- ...checkboxItemProps,
17581
- ref: forwardedRef,
17582
- "data-state": getCheckedState(checked),
17583
- onSelect: composeEventHandlers(
17584
- checkboxItemProps.onSelect,
17585
- () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),
17586
- { checkForDefaultPrevented: false }
17587
- )
17588
- }
17589
- ) });
17590
- }
17591
- );
17592
- MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
17593
- var RADIO_GROUP_NAME = "MenuRadioGroup";
17594
- var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
17595
- RADIO_GROUP_NAME,
17596
- { value: void 0, onValueChange: () => {
17597
- } }
17598
- );
17599
- var MenuRadioGroup = React40.forwardRef(
17600
- (props, forwardedRef) => {
17601
- const { value, onValueChange, ...groupProps } = props;
17602
- const handleValueChange = useCallbackRef(onValueChange);
17603
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenuGroup, { ...groupProps, ref: forwardedRef }) });
17604
- }
17605
- );
17606
- MenuRadioGroup.displayName = RADIO_GROUP_NAME;
17607
- var RADIO_ITEM_NAME = "MenuRadioItem";
17608
- var MenuRadioItem = React40.forwardRef(
17609
- (props, forwardedRef) => {
17610
- const { value, ...radioItemProps } = props;
17611
- const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);
17612
- const checked = value === context.value;
17613
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17614
- MenuItem,
17615
- {
17616
- role: "menuitemradio",
17617
- "aria-checked": checked,
17618
- ...radioItemProps,
17619
- ref: forwardedRef,
17620
- "data-state": getCheckedState(checked),
17621
- onSelect: composeEventHandlers(
17622
- radioItemProps.onSelect,
17623
- () => context.onValueChange?.(value),
17624
- { checkForDefaultPrevented: false }
17625
- )
17626
- }
17627
- ) });
17628
- }
17629
- );
17630
- MenuRadioItem.displayName = RADIO_ITEM_NAME;
17631
- var ITEM_INDICATOR_NAME = "MenuItemIndicator";
17632
- var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(
17633
- ITEM_INDICATOR_NAME,
17634
- { checked: false }
17635
- );
17636
- var MenuItemIndicator = React40.forwardRef(
17637
- (props, forwardedRef) => {
17638
- const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
17639
- const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
17640
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17641
- Presence,
17642
- {
17643
- present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
17644
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17645
- Primitive.span,
17646
- {
17647
- ...itemIndicatorProps,
17648
- ref: forwardedRef,
17649
- "data-state": getCheckedState(indicatorContext.checked)
17650
- }
17651
- )
17652
- }
17653
- );
17654
- }
17655
- );
17656
- MenuItemIndicator.displayName = ITEM_INDICATOR_NAME;
17657
- var SEPARATOR_NAME = "MenuSeparator";
17658
- var MenuSeparator = React40.forwardRef(
17659
- (props, forwardedRef) => {
17660
- const { __scopeMenu, ...separatorProps } = props;
17661
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17662
- Primitive.div,
17663
- {
17664
- role: "separator",
17665
- "aria-orientation": "horizontal",
17666
- ...separatorProps,
17667
- ref: forwardedRef
17668
- }
17669
- );
17670
- }
17671
- );
17672
- MenuSeparator.displayName = SEPARATOR_NAME;
17673
- var ARROW_NAME3 = "MenuArrow";
17674
- var MenuArrow = React40.forwardRef(
17675
- (props, forwardedRef) => {
17676
- const { __scopeMenu, ...arrowProps } = props;
17677
- const popperScope = usePopperScope2(__scopeMenu);
17678
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
17679
- }
17680
- );
17681
- MenuArrow.displayName = ARROW_NAME3;
17682
- var SUB_NAME2 = "MenuSub";
17683
- var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME2);
17684
- var SUB_TRIGGER_NAME = "MenuSubTrigger";
17685
- var MenuSubTrigger = React40.forwardRef(
17686
- (props, forwardedRef) => {
17687
- const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);
17688
- const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);
17689
- const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);
17690
- const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);
17691
- const openTimerRef = React40.useRef(null);
17692
- const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;
17693
- const scope = { __scopeMenu: props.__scopeMenu };
17694
- const clearOpenTimer = React40.useCallback(() => {
17695
- if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
17696
- openTimerRef.current = null;
17697
- }, []);
17698
- React40.useEffect(() => clearOpenTimer, [clearOpenTimer]);
17699
- React40.useEffect(() => {
17700
- const pointerGraceTimer = pointerGraceTimerRef.current;
17701
- return () => {
17702
- window.clearTimeout(pointerGraceTimer);
17703
- onPointerGraceIntentChange(null);
17704
- };
17705
- }, [pointerGraceTimerRef, onPointerGraceIntentChange]);
17706
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17707
- MenuItemImpl,
17708
- {
17709
- id: subContext.triggerId,
17710
- "aria-haspopup": "menu",
17711
- "aria-expanded": context.open,
17712
- "aria-controls": subContext.contentId,
17713
- "data-state": getOpenState2(context.open),
17714
- ...props,
17715
- ref: composeRefs(forwardedRef, subContext.onTriggerChange),
17716
- onClick: (event) => {
17717
- props.onClick?.(event);
17718
- if (props.disabled || event.defaultPrevented) return;
17719
- event.currentTarget.focus();
17720
- if (!context.open) context.onOpenChange(true);
17721
- },
17722
- onPointerMove: composeEventHandlers(
17723
- props.onPointerMove,
17724
- whenMouse2((event) => {
17725
- contentContext.onItemEnter(event);
17726
- if (event.defaultPrevented) return;
17727
- if (!props.disabled && !context.open && !openTimerRef.current) {
17728
- contentContext.onPointerGraceIntentChange(null);
17729
- openTimerRef.current = window.setTimeout(() => {
17730
- context.onOpenChange(true);
17731
- clearOpenTimer();
17732
- }, 100);
17733
- }
17734
- })
17735
- ),
17736
- onPointerLeave: composeEventHandlers(
17737
- props.onPointerLeave,
17738
- whenMouse2((event) => {
17739
- clearOpenTimer();
17740
- const contentRect = context.content?.getBoundingClientRect();
17741
- if (contentRect) {
17742
- const side = context.content?.dataset.side;
17743
- const rightSide = side === "right";
17744
- const bleed = rightSide ? -5 : 5;
17745
- const contentNearEdge = contentRect[rightSide ? "left" : "right"];
17746
- const contentFarEdge = contentRect[rightSide ? "right" : "left"];
17747
- contentContext.onPointerGraceIntentChange({
17748
- area: [
17749
- // Apply a bleed on clientX to ensure that our exit point is
17750
- // consistently within polygon bounds
17751
- { x: event.clientX + bleed, y: event.clientY },
17752
- { x: contentNearEdge, y: contentRect.top },
17753
- { x: contentFarEdge, y: contentRect.top },
17754
- { x: contentFarEdge, y: contentRect.bottom },
17755
- { x: contentNearEdge, y: contentRect.bottom }
17756
- ],
17757
- side
17758
- });
17759
- window.clearTimeout(pointerGraceTimerRef.current);
17760
- pointerGraceTimerRef.current = window.setTimeout(
17761
- () => contentContext.onPointerGraceIntentChange(null),
17762
- 300
17763
- );
17764
- } else {
17765
- contentContext.onTriggerLeave(event);
17766
- if (event.defaultPrevented) return;
17767
- contentContext.onPointerGraceIntentChange(null);
17768
- }
17769
- })
17770
- ),
17771
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
17772
- const isTypingAhead = contentContext.searchRef.current !== "";
17773
- if (props.disabled || isTypingAhead && event.key === " ") return;
17774
- if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
17775
- context.onOpenChange(true);
17776
- context.content?.focus();
17777
- event.preventDefault();
17778
- }
17779
- })
17780
- }
17781
- ) });
17782
- }
17783
- );
17784
- MenuSubTrigger.displayName = SUB_TRIGGER_NAME;
17785
- var SUB_CONTENT_NAME = "MenuSubContent";
17786
- var MenuSubContent = React40.forwardRef(
17787
- (props, forwardedRef) => {
17788
- const portalContext = usePortalContext3(CONTENT_NAME5, props.__scopeMenu);
17789
- const { forceMount = portalContext.forceMount, ...subContentProps } = props;
17790
- const context = useMenuContext(CONTENT_NAME5, props.__scopeMenu);
17791
- const rootContext = useMenuRootContext(CONTENT_NAME5, props.__scopeMenu);
17792
- const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
17793
- const ref = React40.useRef(null);
17794
- const composedRefs = useComposedRefs(forwardedRef, ref);
17795
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Collection3.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Collection3.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
17796
- MenuContentImpl,
17797
- {
17798
- id: subContext.contentId,
17799
- "aria-labelledby": subContext.triggerId,
17800
- ...subContentProps,
17801
- ref: composedRefs,
17802
- align: "start",
17803
- side: rootContext.dir === "rtl" ? "left" : "right",
17804
- disableOutsidePointerEvents: false,
17805
- disableOutsideScroll: false,
17806
- trapFocus: false,
17807
- onOpenAutoFocus: (event) => {
17808
- if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();
17809
- event.preventDefault();
17810
- },
17811
- onCloseAutoFocus: (event) => event.preventDefault(),
17812
- onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {
17813
- if (event.target !== subContext.trigger) context.onOpenChange(false);
17814
- }),
17815
- onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {
17816
- rootContext.onClose();
17817
- event.preventDefault();
17818
- }),
17819
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
17820
- const isKeyDownInside = event.currentTarget.contains(event.target);
17821
- const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
17822
- if (isKeyDownInside && isCloseKey) {
17823
- context.onOpenChange(false);
17824
- subContext.trigger?.focus();
17825
- event.preventDefault();
17826
- }
17827
- })
17828
- }
17829
- ) }) }) });
17830
- }
17831
- );
17832
- MenuSubContent.displayName = SUB_CONTENT_NAME;
17833
- function getOpenState2(open) {
17834
- return open ? "open" : "closed";
17835
- }
17836
- function isIndeterminate(checked) {
17837
- return checked === "indeterminate";
17838
- }
17839
- function getCheckedState(checked) {
17840
- return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
17841
- }
17842
- function focusFirst4(candidates) {
17843
- const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
17844
- for (const candidate of candidates) {
17845
- if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
17846
- candidate.focus();
17847
- if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
17848
- }
17849
- }
17850
- function wrapArray2(array, startIndex) {
17851
- return array.map((_, index2) => array[(startIndex + index2) % array.length]);
17852
- }
17853
- function getNextMatch(values, search, currentMatch) {
17854
- const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
17855
- const normalizedSearch = isRepeated ? search[0] : search;
17856
- const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
17857
- let wrappedValues = wrapArray2(values, Math.max(currentMatchIndex, 0));
17858
- const excludeCurrentMatch = normalizedSearch.length === 1;
17859
- if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);
17860
- const nextMatch = wrappedValues.find(
17861
- (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())
17862
- );
17863
- return nextMatch !== currentMatch ? nextMatch : void 0;
17864
- }
17865
- function isPointInPolygon2(point, polygon) {
17866
- const { x, y } = point;
17867
- let inside = false;
17868
- for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
17869
- const ii = polygon[i];
17870
- const jj = polygon[j];
17871
- const xi = ii.x;
17872
- const yi = ii.y;
17873
- const xj = jj.x;
17874
- const yj = jj.y;
17875
- const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
17876
- if (intersect) inside = !inside;
17877
- }
17878
- return inside;
17879
- }
17880
- function isPointerInGraceArea(event, area) {
17881
- if (!area) return false;
17882
- const cursorPos = { x: event.clientX, y: event.clientY };
17883
- return isPointInPolygon2(cursorPos, area);
17884
- }
17885
- function whenMouse2(handler) {
17886
- return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
17887
- }
17888
- var Root33 = Menu;
17889
- var Anchor2 = MenuAnchor;
17890
- var Portal4 = MenuPortal;
17891
- var Content23 = MenuContent;
17892
- var Group = MenuGroup;
17893
- var Label = MenuLabel;
17894
- var Item22 = MenuItem;
17895
- var CheckboxItem = MenuCheckboxItem;
17896
- var RadioGroup = MenuRadioGroup;
17897
- var RadioItem = MenuRadioItem;
17898
- var ItemIndicator = MenuItemIndicator;
17899
- var Separator2 = MenuSeparator;
17900
- var Arrow23 = MenuArrow;
17901
- var SubTrigger = MenuSubTrigger;
17902
- var SubContent = MenuSubContent;
17903
-
17904
- // ../../node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@18.3.7_@types+react@18.3.26__@types+rea_iaecsfbcg4zg4kegr2ujb7doey/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
17905
- var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
17906
- var DROPDOWN_MENU_NAME = "DropdownMenu";
17907
- var [createDropdownMenuContext] = createContextScope(
17908
- DROPDOWN_MENU_NAME,
17909
- [createMenuScope]
17910
- );
17911
- var useMenuScope = createMenuScope();
17912
- var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
17913
- var DropdownMenu = (props) => {
17914
- const {
17915
- __scopeDropdownMenu,
17916
- children,
17917
- dir,
17918
- open: openProp,
17919
- defaultOpen,
17920
- onOpenChange,
17921
- modal = true
17922
- } = props;
17923
- const menuScope = useMenuScope(__scopeDropdownMenu);
17924
- const triggerRef = React41.useRef(null);
17925
- const [open, setOpen] = useControllableState({
17926
- prop: openProp,
17927
- defaultProp: defaultOpen ?? false,
17928
- onChange: onOpenChange,
17929
- caller: DROPDOWN_MENU_NAME
17930
- });
17931
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
17932
- DropdownMenuProvider,
17933
- {
17934
- scope: __scopeDropdownMenu,
17935
- triggerId: useId(),
17936
- triggerRef,
17937
- contentId: useId(),
17938
- open,
17939
- onOpenChange: setOpen,
17940
- onOpenToggle: React41.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
17941
- modal,
17942
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Root33, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
17943
- }
17944
- );
17945
- };
17946
- DropdownMenu.displayName = DROPDOWN_MENU_NAME;
17947
- var TRIGGER_NAME4 = "DropdownMenuTrigger";
17948
- var DropdownMenuTrigger = React41.forwardRef(
17949
- (props, forwardedRef) => {
17950
- const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
17951
- const context = useDropdownMenuContext(TRIGGER_NAME4, __scopeDropdownMenu);
17952
- const menuScope = useMenuScope(__scopeDropdownMenu);
17953
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
17954
- Primitive.button,
17955
- {
17956
- type: "button",
17957
- id: context.triggerId,
17958
- "aria-haspopup": "menu",
17959
- "aria-expanded": context.open,
17960
- "aria-controls": context.open ? context.contentId : void 0,
17961
- "data-state": context.open ? "open" : "closed",
17962
- "data-disabled": disabled ? "" : void 0,
17963
- disabled,
17964
- ...triggerProps,
17965
- ref: composeRefs(forwardedRef, context.triggerRef),
17966
- onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
17967
- if (!disabled && event.button === 0 && event.ctrlKey === false) {
17968
- context.onOpenToggle();
17969
- if (!context.open) event.preventDefault();
17970
- }
17971
- }),
17972
- onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
17973
- if (disabled) return;
17974
- if (["Enter", " "].includes(event.key)) context.onOpenToggle();
17975
- if (event.key === "ArrowDown") context.onOpenChange(true);
17976
- if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault();
17977
- })
17978
- }
17979
- ) });
17980
- }
17981
- );
17982
- DropdownMenuTrigger.displayName = TRIGGER_NAME4;
17983
- var PORTAL_NAME5 = "DropdownMenuPortal";
17984
- var DropdownMenuPortal = (props) => {
17985
- const { __scopeDropdownMenu, ...portalProps } = props;
17986
- const menuScope = useMenuScope(__scopeDropdownMenu);
17987
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Portal4, { ...menuScope, ...portalProps });
17988
- };
17989
- DropdownMenuPortal.displayName = PORTAL_NAME5;
17990
- var CONTENT_NAME6 = "DropdownMenuContent";
17991
- var DropdownMenuContent = React41.forwardRef(
17992
- (props, forwardedRef) => {
17993
- const { __scopeDropdownMenu, ...contentProps } = props;
17994
- const context = useDropdownMenuContext(CONTENT_NAME6, __scopeDropdownMenu);
17995
- const menuScope = useMenuScope(__scopeDropdownMenu);
17996
- const hasInteractedOutsideRef = React41.useRef(false);
17997
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
17998
- Content23,
17999
- {
18000
- id: context.contentId,
18001
- "aria-labelledby": context.triggerId,
18002
- ...menuScope,
18003
- ...contentProps,
18004
- ref: forwardedRef,
18005
- onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
18006
- if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
18007
- hasInteractedOutsideRef.current = false;
18008
- event.preventDefault();
18009
- }),
18010
- onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {
18011
- const originalEvent = event.detail.originalEvent;
18012
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
18013
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
18014
- if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
18015
- }),
18016
- style: {
18017
- ...props.style,
18018
- // re-namespace exposed content custom properties
18019
- ...{
18020
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
18021
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
18022
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
18023
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
18024
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
18025
- }
18026
- }
18027
- }
18028
- );
18029
- }
18030
- );
18031
- DropdownMenuContent.displayName = CONTENT_NAME6;
18032
- var GROUP_NAME3 = "DropdownMenuGroup";
18033
- var DropdownMenuGroup = React41.forwardRef(
18034
- (props, forwardedRef) => {
18035
- const { __scopeDropdownMenu, ...groupProps } = props;
18036
- const menuScope = useMenuScope(__scopeDropdownMenu);
18037
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
18038
- }
18039
- );
18040
- DropdownMenuGroup.displayName = GROUP_NAME3;
18041
- var LABEL_NAME2 = "DropdownMenuLabel";
18042
- var DropdownMenuLabel = React41.forwardRef(
18043
- (props, forwardedRef) => {
18044
- const { __scopeDropdownMenu, ...labelProps } = props;
18045
- const menuScope = useMenuScope(__scopeDropdownMenu);
18046
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
18047
- }
18048
- );
18049
- DropdownMenuLabel.displayName = LABEL_NAME2;
18050
- var ITEM_NAME4 = "DropdownMenuItem";
18051
- var DropdownMenuItem = React41.forwardRef(
18052
- (props, forwardedRef) => {
18053
- const { __scopeDropdownMenu, ...itemProps } = props;
18054
- const menuScope = useMenuScope(__scopeDropdownMenu);
18055
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Item22, { ...menuScope, ...itemProps, ref: forwardedRef });
18056
- }
18057
- );
18058
- DropdownMenuItem.displayName = ITEM_NAME4;
18059
- var CHECKBOX_ITEM_NAME2 = "DropdownMenuCheckboxItem";
18060
- var DropdownMenuCheckboxItem = React41.forwardRef((props, forwardedRef) => {
18061
- const { __scopeDropdownMenu, ...checkboxItemProps } = props;
18062
- const menuScope = useMenuScope(__scopeDropdownMenu);
18063
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
18064
- });
18065
- DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME2;
18066
- var RADIO_GROUP_NAME2 = "DropdownMenuRadioGroup";
18067
- var DropdownMenuRadioGroup = React41.forwardRef((props, forwardedRef) => {
18068
- const { __scopeDropdownMenu, ...radioGroupProps } = props;
18069
- const menuScope = useMenuScope(__scopeDropdownMenu);
18070
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
18071
- });
18072
- DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME2;
18073
- var RADIO_ITEM_NAME2 = "DropdownMenuRadioItem";
18074
- var DropdownMenuRadioItem = React41.forwardRef((props, forwardedRef) => {
18075
- const { __scopeDropdownMenu, ...radioItemProps } = props;
18076
- const menuScope = useMenuScope(__scopeDropdownMenu);
18077
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
18078
- });
18079
- DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME2;
18080
- var INDICATOR_NAME2 = "DropdownMenuItemIndicator";
18081
- var DropdownMenuItemIndicator = React41.forwardRef((props, forwardedRef) => {
18082
- const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
18083
- const menuScope = useMenuScope(__scopeDropdownMenu);
18084
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
18085
- });
18086
- DropdownMenuItemIndicator.displayName = INDICATOR_NAME2;
18087
- var SEPARATOR_NAME2 = "DropdownMenuSeparator";
18088
- var DropdownMenuSeparator = React41.forwardRef((props, forwardedRef) => {
18089
- const { __scopeDropdownMenu, ...separatorProps } = props;
18090
- const menuScope = useMenuScope(__scopeDropdownMenu);
18091
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Separator2, { ...menuScope, ...separatorProps, ref: forwardedRef });
18092
- });
18093
- DropdownMenuSeparator.displayName = SEPARATOR_NAME2;
18094
- var ARROW_NAME4 = "DropdownMenuArrow";
18095
- var DropdownMenuArrow = React41.forwardRef(
18096
- (props, forwardedRef) => {
18097
- const { __scopeDropdownMenu, ...arrowProps } = props;
18098
- const menuScope = useMenuScope(__scopeDropdownMenu);
18099
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Arrow23, { ...menuScope, ...arrowProps, ref: forwardedRef });
18100
- }
18101
- );
18102
- DropdownMenuArrow.displayName = ARROW_NAME4;
18103
- var SUB_TRIGGER_NAME2 = "DropdownMenuSubTrigger";
18104
- var DropdownMenuSubTrigger = React41.forwardRef((props, forwardedRef) => {
18105
- const { __scopeDropdownMenu, ...subTriggerProps } = props;
18106
- const menuScope = useMenuScope(__scopeDropdownMenu);
18107
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
18108
- });
18109
- DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME2;
18110
- var SUB_CONTENT_NAME2 = "DropdownMenuSubContent";
18111
- var DropdownMenuSubContent = React41.forwardRef((props, forwardedRef) => {
18112
- const { __scopeDropdownMenu, ...subContentProps } = props;
18113
- const menuScope = useMenuScope(__scopeDropdownMenu);
18114
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
18115
- SubContent,
18116
- {
18117
- ...menuScope,
18118
- ...subContentProps,
18119
- ref: forwardedRef,
18120
- style: {
18121
- ...props.style,
18122
- // re-namespace exposed content custom properties
18123
- ...{
18124
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
18125
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
18126
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
18127
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
18128
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
18129
- }
18130
- }
18131
- }
18132
- );
18133
- });
18134
- DropdownMenuSubContent.displayName = SUB_CONTENT_NAME2;
18135
- var Root24 = DropdownMenu;
18136
- var Trigger4 = DropdownMenuTrigger;
18137
- var Portal22 = DropdownMenuPortal;
18138
- var Content24 = DropdownMenuContent;
18139
- var Label2 = DropdownMenuLabel;
18140
- var Item23 = DropdownMenuItem;
18141
- var Separator22 = DropdownMenuSeparator;
18142
-
18143
- // src/core/components/ui/dropdown-menu.tsx
18144
- var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
18145
- function DropdownMenu2({
18146
- ...props
18147
- }) {
18148
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Root24, { "data-slot": "dropdown-menu", ...props });
18149
- }
18150
- function DropdownMenuTrigger2({
18151
- ...props
18152
- }) {
18153
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18154
- Trigger4,
18155
- {
18156
- "data-slot": "dropdown-menu-trigger",
18157
- ...props
18158
- }
18159
- );
18160
- }
18161
- function DropdownMenuContent2({
18162
- className,
18163
- sideOffset = 4,
18164
- ...props
18165
- }) {
18166
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Portal22, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18167
- Content24,
18168
- {
18169
- "data-slot": "dropdown-menu-content",
18170
- sideOffset,
18171
- className: cn(
18172
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
18173
- className
18174
- ),
18175
- ...props
18176
- }
18177
- ) });
18178
- }
18179
- function DropdownMenuItem2({
18180
- className,
18181
- inset,
18182
- variant = "default",
18183
- ...props
18184
- }) {
18185
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18186
- Item23,
18187
- {
18188
- "data-slot": "dropdown-menu-item",
18189
- "data-inset": inset,
18190
- "data-variant": variant,
18191
- className: cn(
18192
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
18193
- className
18194
- ),
18195
- ...props
18196
- }
18197
- );
18198
- }
18199
- function DropdownMenuLabel2({
18200
- className,
18201
- inset,
18202
- ...props
18203
- }) {
18204
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18205
- Label2,
18206
- {
18207
- "data-slot": "dropdown-menu-label",
18208
- "data-inset": inset,
18209
- className: cn(
18210
- "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
18211
- className
18212
- ),
18213
- ...props
18214
- }
18215
- );
18216
- }
18217
- function DropdownMenuSeparator2({
18218
- className,
18219
- ...props
18220
- }) {
18221
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18222
- Separator22,
18223
- {
18224
- "data-slot": "dropdown-menu-separator",
18225
- className: cn("bg-border -mx-1 my-1 h-px", className),
18226
- ...props
18227
- }
18228
- );
18229
- }
18230
-
18231
16893
  // src/core/components/layout/InfoMenu.tsx
18232
- var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
18233
- var InfoMenu = ({
18234
- onItemClick
18235
- }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DropdownMenu2, { children: [
18236
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
18237
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CircleQuestionMark, { className: "h-4 w-4" }),
18238
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sr-only", children: "Help and Information" })
18239
- ] }) }),
18240
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DropdownMenuContent2, { align: "end", className: "w-56", children: [
18241
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuLabel2, { children: "Help & Support" }),
18242
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuSeparator2, {}),
18243
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("help"), children: "Help Center" }),
18244
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("documentation"), children: "Documentation" }),
18245
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("contact"), children: "Contact Support" }),
18246
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("feedback"), children: "Send Feedback" })
18247
- ] })
18248
- ] });
18249
-
18250
- // src/core/components/ui/badge.tsx
18251
- var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
18252
- var badgeVariants = cva(
18253
- "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
16894
+ var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
16895
+ var InfoMenu = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
16896
+ Button,
18254
16897
  {
18255
- variants: {
18256
- variant: {
18257
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
18258
- secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
18259
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
18260
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
16898
+ variant: "ghost",
16899
+ size: "icon",
16900
+ className: "h-9 w-9",
16901
+ asChild: true,
16902
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
16903
+ "a",
16904
+ {
16905
+ href: "https://chronoter.com/docs",
16906
+ target: "_blank",
16907
+ rel: "noopener noreferrer",
16908
+ children: [
16909
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CircleQuestionMark, { className: "h-4 w-4" }),
16910
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Documentation" })
16911
+ ]
18261
16912
  }
18262
- },
18263
- defaultVariants: {
18264
- variant: "default"
18265
- }
16913
+ )
18266
16914
  }
18267
16915
  );
18268
- function Badge({
18269
- className,
18270
- variant,
18271
- asChild = false,
18272
- ...props
18273
- }) {
18274
- const Comp = asChild ? Slot : "span";
18275
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
18276
- Comp,
18277
- {
18278
- "data-slot": "badge",
18279
- className: cn(badgeVariants({ variant }), className),
18280
- ...props
18281
- }
18282
- );
18283
- }
18284
-
18285
- // src/core/components/layout/NotificationMenu.tsx
18286
- var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
18287
- var NotificationMenu = ({
18288
- notificationCount = 3,
18289
- onItemClick
18290
- }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenu2, { children: [
18291
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Button, { variant: "ghost", size: "icon", className: "h-9 w-9 relative", children: [
18292
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Bell, { className: "h-4 w-4" }),
18293
- notificationCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Badge, { className: "absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center p-0 text-xs", children: notificationCount > 9 ? "9+" : notificationCount }),
18294
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "sr-only", children: "Notifications" })
18295
- ] }) }),
18296
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenuContent2, { align: "end", className: "w-80", children: [
18297
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuLabel2, { children: "Notifications" }),
18298
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuSeparator2, {}),
18299
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("notification1"), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-1", children: [
18300
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm font-medium", children: "New message received" }),
18301
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-muted-foreground", children: "2 minutes ago" })
18302
- ] }) }),
18303
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("notification2"), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-1", children: [
18304
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm font-medium", children: "System update available" }),
18305
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-muted-foreground", children: "1 hour ago" })
18306
- ] }) }),
18307
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("notification3"), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-1", children: [
18308
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm font-medium", children: "Weekly report ready" }),
18309
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-muted-foreground", children: "3 hours ago" })
18310
- ] }) }),
18311
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuSeparator2, {}),
18312
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuItem2, { onClick: () => onItemClick?.("view-all"), children: "View all notifications" })
18313
- ] })
18314
- ] });
18315
16916
 
18316
16917
  // src/core/components/ChronoterLogo.tsx
18317
- var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
16918
+ var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
18318
16919
  var logoClass = cva("h-auto", {
18319
16920
  variants: {
18320
16921
  variant: {
@@ -18330,8 +16931,8 @@ var ChronoterLogo = (props) => {
18330
16931
  const lightImgSrc = props.variant === "small" ? "/chronoter-assets/media/Chronoter_favicon.svg" : "/chronoter-assets/media/Chronoter.png";
18331
16932
  const darkImgSrc = props.variant === "small" ? "/chronoter-assets/media/Chronoter_favicon-dark.svg" : "/chronoter-assets/media/Chronoter-dark.png";
18332
16933
  const alt = props.variant === "small" ? `Chronoter small logo` : `Chronoter logo`;
18333
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
18334
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16934
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
16935
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18335
16936
  "img",
18336
16937
  {
18337
16938
  alt,
@@ -18345,7 +16946,7 @@ var ChronoterLogo = (props) => {
18345
16946
  width: props.variant === "small" ? 40 : 508
18346
16947
  }
18347
16948
  ),
18348
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16949
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
18349
16950
  "img",
18350
16951
  {
18351
16952
  alt,
@@ -18363,7 +16964,7 @@ var ChronoterLogo = (props) => {
18363
16964
  };
18364
16965
 
18365
16966
  // src/core/components/SiteLogo.tsx
18366
- var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
16967
+ var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
18367
16968
  var resolveLogoPath = (path) => {
18368
16969
  if (path.startsWith("./")) {
18369
16970
  return `/chronoter-assets/project/${path.slice(2)}`;
@@ -18378,8 +16979,8 @@ var SiteLogo = ({
18378
16979
  if (logoPath && logoPath.trim() !== "") {
18379
16980
  const lightSrc = resolveLogoPath(logoPath);
18380
16981
  const darkSrc = logoPathDark ? resolveLogoPath(logoPathDark) : lightSrc;
18381
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
18382
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
16982
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
16983
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
18383
16984
  "img",
18384
16985
  {
18385
16986
  alt: "Site logo",
@@ -18390,7 +16991,7 @@ var SiteLogo = ({
18390
16991
  width: 150
18391
16992
  }
18392
16993
  ),
18393
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
16994
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
18394
16995
  "img",
18395
16996
  {
18396
16997
  alt: "Site logo",
@@ -18403,32 +17004,28 @@ var SiteLogo = ({
18403
17004
  )
18404
17005
  ] });
18405
17006
  }
18406
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChronoterLogo, { variant: "default", className });
17007
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChronoterLogo, { variant: "default", className });
18407
17008
  };
18408
17009
 
18409
17010
  // src/core/components/layout/ChronoterHeader.tsx
18410
- var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
17011
+ var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
18411
17012
  var defaultNavigationLinks = [
18412
- { href: "#", label: "Home" },
18413
17013
  { href: "#", label: "Features" },
18414
17014
  { href: "#", label: "Pricing" },
18415
17015
  { href: "#", label: "About" }
18416
17016
  ];
18417
- var ChronoterHeader = React42.forwardRef(
17017
+ var ChronoterHeader = React39.forwardRef(
18418
17018
  ({
18419
17019
  className,
18420
17020
  logoHref = "#",
18421
17021
  navigationLinks = defaultNavigationLinks,
18422
- notificationCount = 3,
18423
17022
  onNavItemClick,
18424
- onInfoItemClick,
18425
- onNotificationItemClick,
18426
17023
  platformComponent,
18427
17024
  config: config2,
18428
17025
  ...props
18429
17026
  }, ref) => {
18430
17027
  const { toggleSidebar } = useSidebar();
18431
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
17028
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18432
17029
  "header",
18433
17030
  {
18434
17031
  ref,
@@ -18437,9 +17034,9 @@ var ChronoterHeader = React42.forwardRef(
18437
17034
  className
18438
17035
  ),
18439
17036
  ...props,
18440
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex h-16 items-center justify-between gap-4 px-4 md:px-6", children: [
18441
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
18442
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
17037
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex h-16 items-center justify-between gap-4 px-4 md:px-6", children: [
17038
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2", children: [
17039
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18443
17040
  Button,
18444
17041
  {
18445
17042
  className: "group h-9 w-9 hover:bg-accent hover:text-accent-foreground md:hidden",
@@ -18449,16 +17046,16 @@ var ChronoterHeader = React42.forwardRef(
18449
17046
  event.preventDefault();
18450
17047
  toggleSidebar();
18451
17048
  },
18452
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HamburgerIcon, {})
17049
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HamburgerIcon, {})
18453
17050
  }
18454
17051
  ),
18455
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-6", children: [
18456
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
17052
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-6", children: [
17053
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18457
17054
  "a",
18458
17055
  {
18459
17056
  href: logoHref,
18460
17057
  className: "flex items-center text-primary hover:text-primary/90 transition-colors cursor-pointer",
18461
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
17058
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18462
17059
  SiteLogo,
18463
17060
  {
18464
17061
  logoPath: config2?.theme?.logo,
@@ -18467,7 +17064,7 @@ var ChronoterHeader = React42.forwardRef(
18467
17064
  )
18468
17065
  }
18469
17066
  ),
18470
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavigationMenu2, { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavigationMenuList2, { className: "gap-1", children: navigationLinks.map((link) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavigationMenuItem2, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
17067
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NavigationMenu2, { className: "hidden md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NavigationMenuList2, { className: "gap-1", children: navigationLinks.map((link) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NavigationMenuItem2, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
18471
17068
  NavigationMenuLink2,
18472
17069
  {
18473
17070
  href: link.href,
@@ -18482,17 +17079,8 @@ var ChronoterHeader = React42.forwardRef(
18482
17079
  ) }, link.href || link.label)) }) })
18483
17080
  ] })
18484
17081
  ] }),
18485
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-4", children: [
18486
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
18487
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(InfoMenu, { onItemClick: onInfoItemClick }),
18488
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
18489
- NotificationMenu,
18490
- {
18491
- notificationCount,
18492
- onItemClick: onNotificationItemClick
18493
- }
18494
- )
18495
- ] }),
17082
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-4", children: [
17083
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(InfoMenu, {}),
18496
17084
  platformComponent
18497
17085
  ] })
18498
17086
  ] })
@@ -18503,23 +17091,23 @@ var ChronoterHeader = React42.forwardRef(
18503
17091
  ChronoterHeader.displayName = "ChronoterHeader";
18504
17092
 
18505
17093
  // src/core/components/layout/ChronoterSidebar.tsx
18506
- var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
17094
+ var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
18507
17095
  var renderNavigationItems = (items, currentPath, isActive, showStatus, getStatusByPath, StatusIndicator, depth = 1) => {
18508
17096
  return items.map((item) => {
18509
17097
  const hasPath = !!item.path;
18510
17098
  const hasChildren = item.items && item.items.length > 0;
18511
17099
  const status = hasPath && showStatus ? getStatusByPath(item.path) : void 0;
18512
17100
  const isCompact = depth >= 2;
18513
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(SidebarMenuSubItem, { children: [
18514
- hasPath ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
17101
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(SidebarMenuSubItem, { children: [
17102
+ hasPath ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
18515
17103
  SidebarMenuSubButton,
18516
17104
  {
18517
17105
  asChild: true,
18518
17106
  isActive: isActive(item.path),
18519
17107
  size: isCompact ? "sm" : "md",
18520
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("a", { href: item.path, className: "relative flex items-center", children: [
18521
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "truncate pr-4", children: item.title }),
18522
- status && StatusIndicator && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
17108
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("a", { href: item.path, className: "relative flex items-center", children: [
17109
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate pr-4", children: item.title }),
17110
+ status && StatusIndicator && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
18523
17111
  StatusIndicator,
18524
17112
  {
18525
17113
  isUnread: status.isUnread,
@@ -18529,8 +17117,8 @@ var renderNavigationItems = (items, currentPath, isActive, showStatus, getStatus
18529
17117
  )
18530
17118
  ] })
18531
17119
  }
18532
- ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarMenuSubButton, { size: isCompact ? "sm" : "md", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: depth > 0 ? "font-normal" : "font-semibold", children: item.title }) }),
18533
- hasChildren && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarMenuSub, { children: renderNavigationItems(
17120
+ ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenuSubButton, { size: isCompact ? "sm" : "md", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: depth > 0 ? "font-normal" : "font-semibold", children: item.title }) }),
17121
+ hasChildren && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenuSub, { children: renderNavigationItems(
18534
17122
  item.items,
18535
17123
  currentPath,
18536
17124
  isActive,
@@ -18554,20 +17142,20 @@ var ChronoterSidebar = ({
18554
17142
  if (!path) return false;
18555
17143
  return currentPath === path;
18556
17144
  };
18557
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Sidebar, { className: "md:top-16 md:h-[calc(100svh-4rem)]", children: [
18558
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarMenu, { children: navigation.map((item) => {
17145
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Sidebar, { className: "md:top-16 md:h-[calc(100svh-4rem)]", children: [
17146
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenu, { children: navigation.map((item) => {
18559
17147
  const hasPath = !!item.path;
18560
17148
  const hasChildren = item.items && item.items.length > 0;
18561
17149
  const status = hasPath && showStatus ? getStatusByPath(item.path) : void 0;
18562
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(SidebarMenuItem, { children: [
18563
- hasPath ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarMenuButton, { asChild: true, isActive: isActive(item.path), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
17150
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(SidebarMenuItem, { children: [
17151
+ hasPath ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenuButton, { asChild: true, isActive: isActive(item.path), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
18564
17152
  "a",
18565
17153
  {
18566
17154
  href: item.path,
18567
17155
  className: "relative flex items-center",
18568
17156
  children: [
18569
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "truncate pr-4", children: item.title }),
18570
- status && StatusIndicator && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
17157
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate pr-4", children: item.title }),
17158
+ status && StatusIndicator && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
18571
17159
  StatusIndicator,
18572
17160
  {
18573
17161
  isUnread: status.isUnread,
@@ -18577,8 +17165,8 @@ var ChronoterSidebar = ({
18577
17165
  )
18578
17166
  ]
18579
17167
  }
18580
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarMenuButton, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-semibold", children: item.title }) }),
18581
- hasChildren && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SidebarMenuSub, { children: renderNavigationItems(
17168
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenuButton, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "font-semibold", children: item.title }) }),
17169
+ hasChildren && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenuSub, { children: renderNavigationItems(
18582
17170
  item.items,
18583
17171
  currentPath,
18584
17172
  isActive,
@@ -18589,15 +17177,19 @@ var ChronoterSidebar = ({
18589
17177
  ) })
18590
17178
  ] }, item.path || item.title);
18591
17179
  }) }) }) }) }),
18592
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(SidebarFooter, { children: [
17180
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(SidebarFooter, { children: [
18593
17181
  platformComponent,
18594
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "px-2 py-2 text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { children: "\xA9 2025 Chronoter" }) })
17182
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "px-2 py-2 text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("p", { children: [
17183
+ "\xA9 ",
17184
+ (/* @__PURE__ */ new Date()).getFullYear(),
17185
+ " Chronoter"
17186
+ ] }) })
18595
17187
  ] })
18596
17188
  ] });
18597
17189
  };
18598
17190
 
18599
17191
  // src/core/components/layout/ChronoterLayout.tsx
18600
- var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
17192
+ var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
18601
17193
  var ChronoterLayout = ({
18602
17194
  config: config2,
18603
17195
  currentPath = "",
@@ -18613,13 +17205,13 @@ var ChronoterLayout = ({
18613
17205
  getStatusByPath
18614
17206
  }) => {
18615
17207
  const navigation = navigationProp || config2.navigation || [];
18616
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SidebarProvider, { defaultOpen: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("flex flex-col min-h-screen w-full", className), children: [
18617
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
17208
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SidebarProvider, { defaultOpen: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex flex-col min-h-screen w-full", className), children: [
17209
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
18618
17210
  ChronoterHeader,
18619
17211
  {
18620
17212
  config: config2,
18621
17213
  logoHref: "/",
18622
- navigationLinks: [{ href: "/", label: "Home" }],
17214
+ navigationLinks: [],
18623
17215
  notificationCount: 0,
18624
17216
  onNavItemClick,
18625
17217
  onInfoItemClick,
@@ -18627,8 +17219,8 @@ var ChronoterLayout = ({
18627
17219
  platformComponent: platformHeaderComponent
18628
17220
  }
18629
17221
  ),
18630
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-1", children: [
18631
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
17222
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-1", children: [
17223
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
18632
17224
  ChronoterSidebar,
18633
17225
  {
18634
17226
  navigation,
@@ -18638,7 +17230,7 @@ var ChronoterLayout = ({
18638
17230
  getStatusByPath
18639
17231
  }
18640
17232
  ),
18641
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SidebarInset, { className: "flex flex-col flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("main", { className: "flex-1 p-4 md:p-6 lg:p-8", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mx-auto max-w-4xl", children }) }) })
17233
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SidebarInset, { className: "flex flex-col flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("main", { className: "flex-1 p-4 md:p-6 lg:p-8", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mx-auto max-w-4xl", children }) }) })
18642
17234
  ] })
18643
17235
  ] }) });
18644
17236
  };
@@ -18646,15 +17238,18 @@ var ChronoterLayout = ({
18646
17238
  // src/core/components/ui/avatar.tsx
18647
17239
  __toESM(require_jsx_runtime(), 1);
18648
17240
 
17241
+ // src/core/components/ui/dropdown-menu.tsx
17242
+ __toESM(require_jsx_runtime(), 1);
17243
+
18649
17244
  // src/core/components/MDXContent.tsx
18650
17245
  var import_react7 = __toESM(require_react(), 1);
18651
- var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
17246
+ var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
18652
17247
  var defaultMDXComponents = {
18653
- ul: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ul", { ...props, children: import_react7.default.Children.map(
17248
+ ul: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { ...props, children: import_react7.default.Children.map(
18654
17249
  children,
18655
17250
  (child, index2) => import_react7.default.isValidElement(child) ? import_react7.default.cloneElement(child, { key: index2 }) : child
18656
17251
  ) }),
18657
- ol: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ol", { ...props, children: import_react7.default.Children.map(
17252
+ ol: ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ol", { ...props, children: import_react7.default.Children.map(
18658
17253
  children,
18659
17254
  (child, index2) => import_react7.default.isValidElement(child) ? import_react7.default.cloneElement(child, { key: index2 }) : child
18660
17255
  ) })
@@ -18705,16 +17300,16 @@ var MDXContent = ({
18705
17300
  } catch (renderError) {
18706
17301
  console.error("Failed to render MDX:", renderError);
18707
17302
  console.error("MDX Code:", code);
18708
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "rounded-md border border-red-500 bg-red-50 p-4 text-red-900", children: [
18709
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "font-semibold", children: "MDX Rendering Error" }),
18710
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mt-2 text-sm", children: renderError instanceof Error ? renderError.message : String(renderError) }),
18711
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("details", { className: "mt-2", children: [
18712
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Stack Trace" }),
18713
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: renderError instanceof Error ? renderError.stack : "No stack trace available" })
17303
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "rounded-md border border-red-500 bg-red-50 p-4 text-red-900", children: [
17304
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "font-semibold", children: "MDX Rendering Error" }),
17305
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-2 text-sm", children: renderError instanceof Error ? renderError.message : String(renderError) }),
17306
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("details", { className: "mt-2", children: [
17307
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Stack Trace" }),
17308
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: renderError instanceof Error ? renderError.stack : "No stack trace available" })
18714
17309
  ] }),
18715
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("details", { className: "mt-2", children: [
18716
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "MDX Code" }),
18717
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words", children: code })
17310
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("details", { className: "mt-2", children: [
17311
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "MDX Code" }),
17312
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words", children: code })
18718
17313
  ] })
18719
17314
  ] });
18720
17315
  }
@@ -18722,33 +17317,33 @@ var MDXContent = ({
18722
17317
  } catch (error) {
18723
17318
  console.error("Failed to execute MDX:", error);
18724
17319
  console.error("MDX Code:", code);
18725
- return () => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "rounded-md border border-red-500 bg-red-50 p-4 text-red-900", children: [
18726
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "font-semibold", children: "MDX Execution Error" }),
18727
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mt-2 text-sm", children: error instanceof Error ? error.message : String(error) }),
18728
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("details", { className: "mt-2", children: [
18729
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Stack Trace" }),
18730
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: error instanceof Error ? error.stack : "No stack trace available" })
17320
+ return () => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "rounded-md border border-red-500 bg-red-50 p-4 text-red-900", children: [
17321
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "font-semibold", children: "MDX Execution Error" }),
17322
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-2 text-sm", children: error instanceof Error ? error.message : String(error) }),
17323
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("details", { className: "mt-2", children: [
17324
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Stack Trace" }),
17325
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: error instanceof Error ? error.stack : "No stack trace available" })
18731
17326
  ] }),
18732
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("details", { className: "mt-2", children: [
18733
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "MDX Code" }),
18734
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words", children: code })
17327
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("details", { className: "mt-2", children: [
17328
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "MDX Code" }),
17329
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words", children: code })
18735
17330
  ] })
18736
17331
  ] });
18737
17332
  }
18738
17333
  }, [code, components]);
18739
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MDXComponent, {});
17334
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(MDXComponent, {});
18740
17335
  };
18741
17336
 
18742
17337
  // src/core/components/NotFound.tsx
18743
- var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
17338
+ var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
18744
17339
  var NotFound = ({ onNavigateHome }) => {
18745
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex flex-col items-center justify-center min-h-[60vh] px-4 text-center", children: [
18746
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mb-8", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h1", { className: "text-9xl font-bold text-muted-foreground/20", children: "404" }) }),
18747
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "mb-8 space-y-2", children: [
18748
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { className: "text-3xl font-bold tracking-tight", children: "\u30DA\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093" }),
18749
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-muted-foreground max-w-md", children: "\u304A\u63A2\u3057\u306E\u30DA\u30FC\u30B8\u306F\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u79FB\u52D5\u307E\u305F\u306F\u524A\u9664\u3055\u308C\u305F\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002" })
17340
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col items-center justify-center min-h-[60vh] px-4 text-center", children: [
17341
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-8", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h1", { className: "text-9xl font-bold text-muted-foreground/20", children: "404" }) }),
17342
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mb-8 space-y-2", children: [
17343
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { className: "text-3xl font-bold tracking-tight", children: "\u30DA\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093" }),
17344
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-muted-foreground max-w-md", children: "\u304A\u63A2\u3057\u306E\u30DA\u30FC\u30B8\u306F\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u79FB\u52D5\u307E\u305F\u306F\u524A\u9664\u3055\u308C\u305F\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002" })
18750
17345
  ] }),
18751
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mb-8", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { size: "lg", onClick: onNavigateHome, className: "min-w-[200px]", children: "\u30DB\u30FC\u30E0\u3078\u623B\u308B" }) })
17346
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-8", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { size: "lg", onClick: onNavigateHome, className: "min-w-[200px]", children: "\u30DB\u30FC\u30E0\u3078\u623B\u308B" }) })
18752
17347
  ] });
18753
17348
  };
18754
17349
 
@@ -18756,7 +17351,7 @@ var NotFound = ({ onNavigateHome }) => {
18756
17351
  __toESM(require_jsx_runtime(), 1);
18757
17352
 
18758
17353
  // src/server/client/Page.tsx
18759
- var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
17354
+ var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
18760
17355
  var Page = ({ route, config: config2 }) => {
18761
17356
  const [processedMDX, setProcessedMDX] = (0, import_react8.useState)(null);
18762
17357
  const [loading, setLoading] = (0, import_react8.useState)(true);
@@ -18796,22 +17391,22 @@ var Page = ({ route, config: config2 }) => {
18796
17391
  fetchMDX();
18797
17392
  }, [route.path, route.filePath, route.frontmatter, config2.site.title]);
18798
17393
  if (loading) {
18799
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChronoterLayout, { config: config2, currentPath: route.path, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "text-center", children: [
18800
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary" }),
18801
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "mt-4 text-muted-foreground", children: "Loading..." })
17394
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChronoterLayout, { config: config2, currentPath: route.path, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "text-center", children: [
17395
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary" }),
17396
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "mt-4 text-muted-foreground", children: "Loading..." })
18802
17397
  ] }) }) });
18803
17398
  }
18804
17399
  if (error || !processedMDX) {
18805
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChronoterLayout, { config: config2, currentPath: route.path, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "rounded-md border border-red-500 bg-red-50 p-6 text-red-900", children: [
18806
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { className: "text-xl font-semibold mb-2", children: "Error Loading Page" }),
18807
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "mb-4", children: error?.message || "Failed to load the page content." }),
18808
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("details", { className: "mt-4", children: [
18809
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Technical Details" }),
18810
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: error?.stack || "No stack trace available" })
17400
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChronoterLayout, { config: config2, currentPath: route.path, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "rounded-md border border-red-500 bg-red-50 p-6 text-red-900", children: [
17401
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", { className: "text-xl font-semibold mb-2", children: "Error Loading Page" }),
17402
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "mb-4", children: error?.message || "Failed to load the page content." }),
17403
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("details", { className: "mt-4", children: [
17404
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Technical Details" }),
17405
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: error?.stack || "No stack trace available" })
18811
17406
  ] })
18812
17407
  ] }) });
18813
17408
  }
18814
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ChronoterLayout, { config: config2, currentPath: route.path, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("article", { className: "prose prose-slate dark:prose-invert max-w-none", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
17409
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChronoterLayout, { config: config2, currentPath: route.path, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("article", { className: "prose prose-slate dark:prose-invert max-w-none", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
18815
17410
  MDXContent,
18816
17411
  {
18817
17412
  code: processedMDX.code,
@@ -18949,7 +17544,7 @@ var generateNavigationFromRoutes = (routes) => {
18949
17544
  };
18950
17545
 
18951
17546
  // src/server/client/App.tsx
18952
- var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
17547
+ var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
18953
17548
  var DEFAULT_CONFIG = {
18954
17549
  site: {
18955
17550
  title: "Chronoter"
@@ -19055,33 +17650,33 @@ var App = ({ initialPath }) => {
19055
17650
  fetchRoute();
19056
17651
  }, [currentPath]);
19057
17652
  if (loading) {
19058
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "text-center", children: [
19059
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "inline-block animate-spin rounded-full h-16 w-16 border-b-2 border-primary" }),
19060
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-4 text-lg text-muted-foreground", children: "Loading..." })
17653
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "text-center", children: [
17654
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "inline-block animate-spin rounded-full h-16 w-16 border-b-2 border-primary" }),
17655
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mt-4 text-lg text-muted-foreground", children: "Loading..." })
19061
17656
  ] }) });
19062
17657
  }
19063
17658
  if (error) {
19064
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex items-center justify-center min-h-screen p-4", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "max-w-2xl w-full rounded-md border border-red-500 bg-red-50 p-6 text-red-900", children: [
19065
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: "text-2xl font-semibold mb-2", children: "Application Error" }),
19066
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mb-4", children: error.message }),
19067
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("details", { className: "mt-4", children: [
19068
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Technical Details" }),
19069
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: error.stack || "No stack trace available" })
17659
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center justify-center min-h-screen p-4", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "max-w-2xl w-full rounded-md border border-red-500 bg-red-50 p-6 text-red-900", children: [
17660
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: "text-2xl font-semibold mb-2", children: "Application Error" }),
17661
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mb-4", children: error.message }),
17662
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("details", { className: "mt-4", children: [
17663
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("summary", { className: "cursor-pointer text-sm font-medium", children: "Technical Details" }),
17664
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "mt-2 text-xs bg-red-100 p-2 rounded overflow-x-auto", children: error.stack || "No stack trace available" })
19070
17665
  ] })
19071
17666
  ] }) });
19072
17667
  }
19073
17668
  if (!route) {
19074
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NotFound, {});
17669
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(NotFound, {});
19075
17670
  }
19076
17671
  const configWithNavigation = {
19077
17672
  ...config,
19078
17673
  navigation
19079
17674
  };
19080
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Page, { route, config: configWithNavigation });
17675
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Page, { route, config: configWithNavigation });
19081
17676
  };
19082
17677
 
19083
17678
  // src/server/client/main.tsx
19084
- var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
17679
+ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
19085
17680
  var mountApp = () => {
19086
17681
  const rootElement = document.getElementById("root");
19087
17682
  if (!rootElement) {
@@ -19091,7 +17686,7 @@ var mountApp = () => {
19091
17686
  }
19092
17687
  const root = (0, import_client.createRoot)(rootElement);
19093
17688
  root.render(
19094
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react10.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(App, { initialPath: window.location.pathname }) })
17689
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react10.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(App, { initialPath: window.location.pathname }) })
19095
17690
  );
19096
17691
  };
19097
17692
  if (document.readyState === "loading") {
@@ -19149,7 +17744,6 @@ lucide-react/dist/esm/shared/src/utils.js:
19149
17744
  lucide-react/dist/esm/defaultAttributes.js:
19150
17745
  lucide-react/dist/esm/Icon.js:
19151
17746
  lucide-react/dist/esm/createLucideIcon.js:
19152
- lucide-react/dist/esm/icons/bell.js:
19153
17747
  lucide-react/dist/esm/icons/circle-question-mark.js:
19154
17748
  lucide-react/dist/esm/icons/x.js:
19155
17749
  lucide-react/dist/esm/lucide-react.js: