@ox0/ui 3.6.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Children, Fragment as external_react_Fragment, cloneElement, createContext, createElement, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { isFocusVisible as hooks_isFocusVisible, useControllableState, useMediaQuery, usePress } from "@ox0/hooks";
3
+ import { isFocusVisible as hooks_isFocusVisible, useControllableState, useMediaQuery, useOS, usePress } from "@ox0/hooks";
4
4
  import { Ox0I18nProvider, toDateTimeAttribute, useDateFormat, useMessage } from "@ox0/i18n";
5
5
  import { createPortal } from "react-dom";
6
- import { FloatingFocusManager, FloatingPortal, autoUpdate, flip, offset, shift, size as react_size, useClick, useDismiss, useFloating, useInteractions, useListNavigation, useMergeRefs, useRole } from "@floating-ui/react";
6
+ import { FloatingFocusManager, FloatingPortal, autoUpdate, flip, offset as react_offset, shift, size as react_size, useClick, useDismiss, useFloating, useInteractions, useListNavigation, useMergeRefs, useRole } from "@floating-ui/react";
7
7
  import { DismissButton, HiddenSelect, Overlay, mergeProps, useButton, useDateField, useDateSegment, useFocusRing, useListBox, useListBoxSection, useObjectRef, useOption, usePopover, useSelect } from "react-aria";
8
8
  import { Item, Section, useDateFieldState, useListState, useSelectState } from "react-stately";
9
9
  import { createCalendar, parseDate } from "@internationalized/date";
@@ -2601,6 +2601,382 @@ label:hover > .control-TGnWDN[aria-invalid="true"]:not(:disabled) {
2601
2601
  A: __rspack_default_export
2602
2602
  });
2603
2603
  },
2604
+ "../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[4].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[4].use[2]!./src/components/global-search.module.css" (module, __webpack_exports__, __webpack_require__) {
2605
+ var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
2606
+ var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
2607
+ var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/api.js");
2608
+ var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
2609
+ var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
2610
+ ___CSS_LOADER_EXPORT___.push([
2611
+ module.id,
2612
+ `.trigger-YKrtGb {
2613
+ background: var(--ox0-color-surface);
2614
+ border: 1px solid var(--ox0-color-border);
2615
+ border-radius: var(--ox0-radius-sm);
2616
+ box-sizing: border-box;
2617
+ color: var(--ox0-color-muted);
2618
+ cursor: pointer;
2619
+ font: inherit;
2620
+ font-size: var(--ox0-font-size-sm);
2621
+ align-items: center;
2622
+ gap: var(--ox0-space-sm);
2623
+ height: var(--ox0-control-height-md);
2624
+ min-inline-size: 14rem;
2625
+ padding-inline: var(--ox0-space-md) var(--ox0-space-sm);
2626
+ transition: border-color var(--ox0-duration-fast) var(--ox0-ease-crisp);
2627
+ display: inline-flex;
2628
+ }
2629
+
2630
+ .trigger-YKrtGb:hover {
2631
+ border-color: var(--ox0-color-border-strong);
2632
+ }
2633
+
2634
+ .trigger-YKrtGb:focus-visible {
2635
+ border-color: var(--ox0-color-accent);
2636
+ box-shadow: 0 0 0 3px var(--ox0-color-focus-ring);
2637
+ outline: none;
2638
+ }
2639
+
2640
+ .triggerText-uoJ7KX {
2641
+ text-align: start;
2642
+ flex: auto;
2643
+ }
2644
+
2645
+ .searchIcon-qhIzf8 {
2646
+ color: var(--ox0-color-muted);
2647
+ flex: none;
2648
+ display: inline-flex;
2649
+ }
2650
+
2651
+ .overlay-HEDTMK {
2652
+ animation: fadeIn-coKaWx var(--ox0-duration-fast) var(--ox0-ease-enter);
2653
+ padding: 12vh var(--ox0-space-lg) var(--ox0-space-lg);
2654
+ z-index: var(--ox0-z-overlay);
2655
+ place-items: start center;
2656
+ display: grid;
2657
+ position: fixed;
2658
+ inset: 0;
2659
+ }
2660
+
2661
+ .backdrop-iL0AVx {
2662
+ background: #00000080;
2663
+ position: fixed;
2664
+ inset: 0;
2665
+ }
2666
+
2667
+ .dialog-sr_Xjy {
2668
+ max-width: none;
2669
+ animation: dialogIn-Bm3ENg var(--ox0-duration-fast) var(--ox0-ease-enter);
2670
+ background: var(--ox0-color-surface-raised);
2671
+ border: 1px solid var(--ox0-color-border);
2672
+ border-radius: var(--ox0-radius-lg);
2673
+ box-shadow: var(--ox0-shadow-modal);
2674
+ color: var(--ox0-color-foreground);
2675
+ grid-template-rows: auto minmax(0, 1fr) auto auto;
2676
+ width: min(100%, 40rem);
2677
+ max-height: min(76vh, 36rem);
2678
+ margin: 0;
2679
+ padding: 0;
2680
+ display: grid;
2681
+ position: relative;
2682
+ inset: auto;
2683
+ overflow: hidden;
2684
+ container-type: inline-size;
2685
+ }
2686
+
2687
+ .dialog-sr_Xjy[data-has-preview] {
2688
+ width: min(100%, 60rem);
2689
+ }
2690
+
2691
+ .inputRow-cYgfjY {
2692
+ border-bottom: 1px solid var(--ox0-color-border-subtle);
2693
+ align-items: center;
2694
+ gap: var(--ox0-space-sm);
2695
+ padding: var(--ox0-space-md) var(--ox0-space-lg);
2696
+ display: flex;
2697
+ }
2698
+
2699
+ .input-DowPQW {
2700
+ color: inherit;
2701
+ font: inherit;
2702
+ font-size: var(--ox0-font-size-lg);
2703
+ background: none;
2704
+ border: none;
2705
+ outline: none;
2706
+ flex: auto;
2707
+ min-inline-size: 0;
2708
+ padding: 0;
2709
+ }
2710
+
2711
+ .input-DowPQW::placeholder {
2712
+ color: var(--ox0-color-disabled);
2713
+ }
2714
+
2715
+ .spinner-qi9ZHf {
2716
+ border: 2px solid var(--ox0-color-border);
2717
+ border-radius: var(--ox0-radius-full);
2718
+ border-top-color: var(--ox0-color-accent);
2719
+ flex: none;
2720
+ width: .875rem;
2721
+ height: .875rem;
2722
+ animation: .7s linear infinite spin-PBn2jV;
2723
+ }
2724
+
2725
+ .body-S7OTcn {
2726
+ grid-template-columns: minmax(0, 1fr);
2727
+ height: min(52vh, 26rem);
2728
+ min-height: 0;
2729
+ display: grid;
2730
+ }
2731
+
2732
+ .dialog-sr_Xjy[data-has-preview] .body-S7OTcn {
2733
+ grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
2734
+ }
2735
+
2736
+ .resultsPane-w6Sm2Y {
2737
+ overscroll-behavior: contain;
2738
+ min-height: 0;
2739
+ scroll-padding-block: var(--ox0-space-xl);
2740
+ overflow-y: auto;
2741
+ }
2742
+
2743
+ .results-i7cSuv {
2744
+ padding: var(--ox0-space-xs);
2745
+ }
2746
+
2747
+ .empty-J4IAB9 {
2748
+ color: var(--ox0-color-muted);
2749
+ font-size: var(--ox0-font-size-sm);
2750
+ padding: var(--ox0-space-xl) var(--ox0-space-lg);
2751
+ text-align: center;
2752
+ }
2753
+
2754
+ .group-L77ngB + .group-L77ngB {
2755
+ margin-top: var(--ox0-space-xs);
2756
+ }
2757
+
2758
+ .groupHeading-wlm1Bd {
2759
+ color: var(--ox0-color-muted);
2760
+ font-size: var(--ox0-font-size-xs);
2761
+ font-weight: var(--ox0-font-weight-medium);
2762
+ align-items: baseline;
2763
+ gap: var(--ox0-space-sm);
2764
+ letter-spacing: var(--ox0-tracking-wider);
2765
+ padding: var(--ox0-space-sm) var(--ox0-space-sm) var(--ox0-space-2xs);
2766
+ text-transform: uppercase;
2767
+ justify-content: space-between;
2768
+ display: flex;
2769
+ }
2770
+
2771
+ .groupStatus-xQbH9H {
2772
+ font-weight: var(--ox0-font-weight-normal);
2773
+ letter-spacing: normal;
2774
+ text-transform: none;
2775
+ }
2776
+
2777
+ .option-qf4Q7q {
2778
+ border-radius: var(--ox0-radius-sm);
2779
+ cursor: pointer;
2780
+ padding: var(--ox0-space-xs) var(--ox0-space-sm);
2781
+ }
2782
+
2783
+ .option-qf4Q7q[data-active] {
2784
+ background: color-mix(in srgb, var(--ox0-color-foreground) 10%, transparent);
2785
+ }
2786
+
2787
+ .preview-s52x7t {
2788
+ border-inline-start: 1px solid var(--ox0-color-border-subtle);
2789
+ min-height: 0;
2790
+ padding: var(--ox0-space-lg);
2791
+ overflow-y: auto;
2792
+ }
2793
+
2794
+ @container (width <= 40rem) {
2795
+ .dialog-sr_Xjy[data-has-preview] .body-S7OTcn {
2796
+ grid-template-columns: minmax(0, 1fr);
2797
+ }
2798
+
2799
+ .preview-s52x7t {
2800
+ display: none;
2801
+ }
2802
+ }
2803
+
2804
+ .result-HpbdT2 {
2805
+ align-items: center;
2806
+ gap: var(--ox0-space-sm);
2807
+ min-width: 0;
2808
+ display: flex;
2809
+ }
2810
+
2811
+ .resultIcon-qmtpm2 {
2812
+ color: var(--ox0-color-muted);
2813
+ width: var(--ox0-icon-lg);
2814
+ flex: none;
2815
+ justify-content: center;
2816
+ align-items: center;
2817
+ display: inline-flex;
2818
+ }
2819
+
2820
+ .resultText-wS8CHc {
2821
+ flex: auto;
2822
+ min-width: 0;
2823
+ display: grid;
2824
+ }
2825
+
2826
+ .resultTitle-hu7e5s, .resultDescription-UcRTCD {
2827
+ text-overflow: ellipsis;
2828
+ white-space: nowrap;
2829
+ overflow: hidden;
2830
+ }
2831
+
2832
+ .resultTitle-hu7e5s {
2833
+ font-size: var(--ox0-font-size-sm);
2834
+ font-weight: var(--ox0-font-weight-medium);
2835
+ }
2836
+
2837
+ .resultDescription-UcRTCD {
2838
+ color: var(--ox0-color-muted);
2839
+ font-size: var(--ox0-font-size-xs);
2840
+ }
2841
+
2842
+ .resultText-wS8CHc mark {
2843
+ background: color-mix(in srgb, var(--ox0-color-accent) 28%, transparent);
2844
+ color: inherit;
2845
+ font-weight: var(--ox0-font-weight-semibold);
2846
+ }
2847
+
2848
+ .resultMeta-wVHGW8 {
2849
+ color: var(--ox0-color-muted);
2850
+ font-size: var(--ox0-font-size-xs);
2851
+ flex: none;
2852
+ }
2853
+
2854
+ .status-ZysnH5 {
2855
+ border-top: 1px solid var(--ox0-color-border-subtle);
2856
+ color: var(--ox0-color-muted);
2857
+ font-size: var(--ox0-font-size-xs);
2858
+ padding: var(--ox0-space-sm) var(--ox0-space-lg);
2859
+ }
2860
+
2861
+ .status-ZysnH5:empty {
2862
+ border-top: none;
2863
+ padding: 0;
2864
+ }
2865
+
2866
+ .footer-umLGpy {
2867
+ border-top: 1px solid var(--ox0-color-border-subtle);
2868
+ color: var(--ox0-color-muted);
2869
+ font-size: var(--ox0-font-size-xs);
2870
+ gap: var(--ox0-space-lg);
2871
+ padding: var(--ox0-space-sm) var(--ox0-space-lg);
2872
+ display: flex;
2873
+ }
2874
+
2875
+ .hint-u3aolN {
2876
+ align-items: center;
2877
+ gap: var(--ox0-space-2xs);
2878
+ display: inline-flex;
2879
+ }
2880
+
2881
+ .visuallyHidden-VtiEjb {
2882
+ clip-path: inset(50%);
2883
+ white-space: nowrap;
2884
+ block-size: 1px;
2885
+ inline-size: 1px;
2886
+ position: absolute;
2887
+ overflow: hidden;
2888
+ }
2889
+
2890
+ @media (width <= 40rem) {
2891
+ .overlay-HEDTMK {
2892
+ padding: 0;
2893
+ }
2894
+
2895
+ .dialog-sr_Xjy, .dialog-sr_Xjy[data-has-preview] {
2896
+ border-radius: 0;
2897
+ width: 100%;
2898
+ height: 100%;
2899
+ max-height: none;
2900
+ }
2901
+
2902
+ .body-S7OTcn {
2903
+ height: auto;
2904
+ }
2905
+
2906
+ .footer-umLGpy {
2907
+ display: none;
2908
+ }
2909
+ }
2910
+
2911
+ @keyframes fadeIn-coKaWx {
2912
+ from {
2913
+ opacity: 0;
2914
+ }
2915
+ }
2916
+
2917
+ @keyframes dialogIn-Bm3ENg {
2918
+ from {
2919
+ opacity: 0;
2920
+ transform: translateY(-8px) scale(.98);
2921
+ }
2922
+ }
2923
+
2924
+ @keyframes spin-PBn2jV {
2925
+ to {
2926
+ transform: rotate(360deg);
2927
+ }
2928
+ }
2929
+
2930
+ @media (prefers-reduced-motion: reduce) {
2931
+ .overlay-HEDTMK, .dialog-sr_Xjy {
2932
+ animation-duration: 1ms;
2933
+ }
2934
+
2935
+ .spinner-qi9ZHf {
2936
+ animation-duration: 2s;
2937
+ }
2938
+ }
2939
+ `,
2940
+ ""
2941
+ ]);
2942
+ ___CSS_LOADER_EXPORT___.locals = {
2943
+ trigger: "trigger-YKrtGb",
2944
+ triggerText: "triggerText-uoJ7KX",
2945
+ searchIcon: "searchIcon-qhIzf8",
2946
+ overlay: "overlay-HEDTMK",
2947
+ fadeIn: "fadeIn-coKaWx",
2948
+ backdrop: "backdrop-iL0AVx",
2949
+ dialog: "dialog-sr_Xjy",
2950
+ dialogIn: "dialogIn-Bm3ENg",
2951
+ inputRow: "inputRow-cYgfjY",
2952
+ input: "input-DowPQW",
2953
+ spinner: "spinner-qi9ZHf",
2954
+ spin: "spin-PBn2jV",
2955
+ body: "body-S7OTcn",
2956
+ resultsPane: "resultsPane-w6Sm2Y",
2957
+ results: "results-i7cSuv",
2958
+ empty: "empty-J4IAB9",
2959
+ group: "group-L77ngB",
2960
+ groupHeading: "groupHeading-wlm1Bd",
2961
+ groupStatus: "groupStatus-xQbH9H",
2962
+ option: "option-qf4Q7q",
2963
+ preview: "preview-s52x7t",
2964
+ result: "result-HpbdT2",
2965
+ resultIcon: "resultIcon-qmtpm2",
2966
+ resultText: "resultText-wS8CHc",
2967
+ resultTitle: "resultTitle-hu7e5s",
2968
+ resultDescription: "resultDescription-UcRTCD",
2969
+ resultMeta: "resultMeta-wVHGW8",
2970
+ status: "status-ZysnH5",
2971
+ footer: "footer-umLGpy",
2972
+ hint: "hint-u3aolN",
2973
+ visuallyHidden: "visuallyHidden-VtiEjb"
2974
+ };
2975
+ const __rspack_default_export = ___CSS_LOADER_EXPORT___;
2976
+ __webpack_require__.d(__webpack_exports__, {}, {
2977
+ A: __rspack_default_export
2978
+ });
2979
+ },
2604
2980
  "../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[4].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[4].use[2]!./src/components/heading.module.css" (module, __webpack_exports__, __webpack_require__) {
2605
2981
  var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js");
2606
2982
  var _node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_pnpm_rsbuild_core_2_1_13_core_js_3_47_0_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
@@ -5495,6 +5871,17 @@ const defaultUiMessages = {
5495
5871
  "ox0.confirm.confirm": "Confirm",
5496
5872
  "ox0.dropZone.browse": "Choose file",
5497
5873
  "ox0.dropZone.browseMultiple": "Choose files",
5874
+ "ox0.globalSearch.close": "Close",
5875
+ "ox0.globalSearch.error": "Couldn't load results",
5876
+ "ox0.globalSearch.label": "Search",
5877
+ "ox0.globalSearch.loading": "Searching…",
5878
+ "ox0.globalSearch.navigate": "Navigate",
5879
+ "ox0.globalSearch.noResults": "No results for “{query}”",
5880
+ "ox0.globalSearch.open": "Open",
5881
+ "ox0.globalSearch.placeholder": "Search…",
5882
+ "ox0.globalSearch.preview": "Details",
5883
+ "ox0.globalSearch.resultCount": "{count} results",
5884
+ "ox0.globalSearch.resultCountOne": "1 result",
5498
5885
  "ox0.heading.anchorLabel": "Link to {id}",
5499
5886
  "ox0.heading.anchorMarker": "#",
5500
5887
  "ox0.select.selectedCount": "{count} selected",
@@ -6379,7 +6766,7 @@ function Tooltip({ children, placement = "top", isDisabled = false }) {
6379
6766
  },
6380
6767
  placement,
6381
6768
  middleware: [
6382
- offset(8),
6769
+ react_offset(8),
6383
6770
  flip(),
6384
6771
  shift({
6385
6772
  padding: 8
@@ -7343,21 +7730,21 @@ const numeric_Numeric = /*#__PURE__*/ forwardRef(function({ align, children, col
7343
7730
  const TICK = 30000;
7344
7731
  let clockNow = Date.now();
7345
7732
  const listeners = new Set();
7346
- let timer;
7733
+ let date_time_timer;
7347
7734
  function subscribeClock(listener) {
7348
7735
  listeners.add(listener);
7349
- if (void 0 === timer) {
7736
+ if (void 0 === date_time_timer) {
7350
7737
  clockNow = Date.now();
7351
- timer = setInterval(()=>{
7738
+ date_time_timer = setInterval(()=>{
7352
7739
  clockNow = Date.now();
7353
7740
  for (const notify of listeners)notify();
7354
7741
  }, TICK);
7355
7742
  }
7356
7743
  return ()=>{
7357
7744
  listeners.delete(listener);
7358
- if (0 === listeners.size && void 0 !== timer) {
7359
- clearInterval(timer);
7360
- timer = void 0;
7745
+ if (0 === listeners.size && void 0 !== date_time_timer) {
7746
+ clearInterval(date_time_timer);
7747
+ date_time_timer = void 0;
7361
7748
  }
7362
7749
  };
7363
7750
  }
@@ -8344,7 +8731,7 @@ function ConfirmPopover({ anchor, cancelLabel, children, confirmLabel, isOpen, o
8344
8731
  },
8345
8732
  placement,
8346
8733
  middleware: [
8347
- offset(8),
8734
+ react_offset(8),
8348
8735
  flip(),
8349
8736
  shift({
8350
8737
  padding: 8
@@ -8744,6 +9131,627 @@ const drop_zone_DropZone = /*#__PURE__*/ forwardRef(function(allProps, ref) {
8744
9131
  ]
8745
9132
  });
8746
9133
  });
9134
+ function defineSearchSource(source) {
9135
+ return source;
9136
+ }
9137
+ class SearchRunner {
9138
+ groups = [];
9139
+ listeners = new Set();
9140
+ controller = null;
9141
+ timers = [];
9142
+ last = null;
9143
+ subscribe = (listener)=>{
9144
+ this.listeners.add(listener);
9145
+ return ()=>{
9146
+ this.listeners.delete(listener);
9147
+ };
9148
+ };
9149
+ getSnapshot = ()=>this.groups;
9150
+ run(sources, query) {
9151
+ this.execute(sources, query, false);
9152
+ }
9153
+ refresh() {
9154
+ if (this.last) this.execute(this.last.sources, this.last.query, true);
9155
+ }
9156
+ execute(sources, query, isBackground) {
9157
+ this.cancel();
9158
+ this.last = {
9159
+ sources,
9160
+ query
9161
+ };
9162
+ const controller = new AbortController();
9163
+ this.controller = controller;
9164
+ const trimmed = query.trim();
9165
+ const previous = new Map(this.groups.map((group)=>[
9166
+ group.source.id,
9167
+ group
9168
+ ]));
9169
+ this.groups = sources.map((source)=>{
9170
+ if (trimmed.length < (source.minQueryLength ?? 0)) return {
9171
+ source,
9172
+ items: [],
9173
+ status: "idle"
9174
+ };
9175
+ const prior = previous.get(source.id);
9176
+ if (isBackground && prior && "idle" !== prior.status) return prior;
9177
+ return {
9178
+ source,
9179
+ items: prior?.items ?? [],
9180
+ status: "loading"
9181
+ };
9182
+ });
9183
+ sources.forEach((source, index)=>{
9184
+ if (this.groups[index]?.status === "idle") return;
9185
+ const start = ()=>this.startSource(source, index, trimmed, controller);
9186
+ const delay = isBackground ? 0 : source.debounceMs ?? 0;
9187
+ if (delay > 0) this.timers.push(setTimeout(start, delay));
9188
+ else start();
9189
+ });
9190
+ this.emit();
9191
+ }
9192
+ cancel() {
9193
+ for (const timer of this.timers)clearTimeout(timer);
9194
+ this.timers = [];
9195
+ this.controller?.abort();
9196
+ this.controller = null;
9197
+ }
9198
+ startSource(source, index, query, controller) {
9199
+ let result;
9200
+ try {
9201
+ result = source.search(query, {
9202
+ signal: controller.signal
9203
+ });
9204
+ } catch {
9205
+ this.update(index, controller, {
9206
+ status: "error",
9207
+ items: []
9208
+ });
9209
+ return;
9210
+ }
9211
+ if (!(result instanceof Promise)) return void this.update(index, controller, {
9212
+ status: "ready",
9213
+ items: result
9214
+ });
9215
+ result.then((items)=>this.update(index, controller, {
9216
+ status: "ready",
9217
+ items
9218
+ })).catch(()=>this.update(index, controller, {
9219
+ status: "error",
9220
+ items: []
9221
+ }));
9222
+ }
9223
+ update(index, controller, next) {
9224
+ if (controller.signal.aborted) return;
9225
+ const group = this.groups[index];
9226
+ if (!group) return;
9227
+ this.groups = this.groups.map((g, i)=>i === index ? {
9228
+ ...g,
9229
+ ...next
9230
+ } : g);
9231
+ this.emit();
9232
+ }
9233
+ emit() {
9234
+ for (const listener of this.listeners)listener();
9235
+ }
9236
+ }
9237
+ function matchSearchItems(items, query, getText) {
9238
+ const normalized = query.trim().toLowerCase();
9239
+ if (0 === normalized.length) return [
9240
+ ...items
9241
+ ];
9242
+ const terms = normalized.split(/\s+/);
9243
+ const first = terms[0] ?? "";
9244
+ const ranked = [];
9245
+ items.forEach((item, index)=>{
9246
+ const text = getText(item).toLowerCase();
9247
+ if (!terms.every((term)=>text.includes(term))) return;
9248
+ const rank = text.startsWith(normalized) ? 0 : text.split(/[\s\-_/.]+/).some((word)=>word.startsWith(first)) ? 1 : 2;
9249
+ ranked.push({
9250
+ item,
9251
+ rank,
9252
+ index
9253
+ });
9254
+ });
9255
+ ranked.sort((a, b)=>a.rank - b.rank || a.index - b.index);
9256
+ return ranked.map((entry)=>entry.item);
9257
+ }
9258
+ const THEME_SCOPE = "[data-theme], [data-color-scheme], [data-density]";
9259
+ function themeRoot(anchor) {
9260
+ return anchor?.closest(THEME_SCOPE) ?? void 0;
9261
+ }
9262
+ const global_search_module_0 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[4].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[4].use[2]!./src/components/global-search.module.css");
9263
+ var global_search_module_options = {};
9264
+ global_search_module_options.styleTagTransform = styleTagTransform_default();
9265
+ global_search_module_options.setAttributes = setAttributesWithoutAttributes_default();
9266
+ global_search_module_options.insert = insertBySelector_default().bind(null, "head");
9267
+ global_search_module_options.domAPI = styleDomAPI_default();
9268
+ global_search_module_options.insertStyleElement = insertStyleElement_default();
9269
+ injectStylesIntoStyleTag_default()(global_search_module_0.A, global_search_module_options);
9270
+ const global_search_module = global_search_module_0.A && global_search_module_0.A.locals ? global_search_module_0.A.locals : void 0;
9271
+ const DEFAULT_LIMIT = 5;
9272
+ const global_search_FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
9273
+ const GlobalSearchContext = /*#__PURE__*/ createContext(null);
9274
+ function useGlobalSearch() {
9275
+ const ctx = useContext(GlobalSearchContext);
9276
+ if (!ctx) throw new Error("useGlobalSearch must be used inside <GlobalSearch>");
9277
+ return ctx;
9278
+ }
9279
+ function GlobalSearchRoot({ children, defaultOpen = false, emptyState, isOpen: isOpenProp, isShortcutDisabled = false, onOpenChange, placeholder, sources, status }) {
9280
+ const os = useOS();
9281
+ const [isOpen, setIsOpen] = useControllableState({
9282
+ defaultValue: defaultOpen,
9283
+ onChange: onOpenChange,
9284
+ value: isOpenProp
9285
+ });
9286
+ const [initialQuery, setInitialQuery] = useState("");
9287
+ const [anchor, setAnchor] = useState(null);
9288
+ const isMac = "mac" === os;
9289
+ const shortcutLabel = isMac ? "⌘K" : "Ctrl K";
9290
+ const open = useCallback((query = "")=>{
9291
+ setInitialQuery(query);
9292
+ setIsOpen(true);
9293
+ }, [
9294
+ setIsOpen
9295
+ ]);
9296
+ const close = useCallback(()=>setIsOpen(false), [
9297
+ setIsOpen
9298
+ ]);
9299
+ const refreshRef = useRef(null);
9300
+ const refresh = useCallback(()=>refreshRef.current?.(), []);
9301
+ useEffect(()=>{
9302
+ if (isShortcutDisabled) return;
9303
+ const handler = (e)=>{
9304
+ if (e.defaultPrevented || e.isComposing || e.altKey || e.shiftKey) return;
9305
+ if ("k" !== e.key.toLowerCase()) return;
9306
+ const isMod = "mac" === os ? e.metaKey : "mobile" === os ? e.metaKey || e.ctrlKey : e.ctrlKey;
9307
+ if (!isMod) return;
9308
+ e.preventDefault();
9309
+ if (isOpen) close();
9310
+ else open();
9311
+ };
9312
+ window.addEventListener("keydown", handler);
9313
+ return ()=>window.removeEventListener("keydown", handler);
9314
+ }, [
9315
+ close,
9316
+ isOpen,
9317
+ isShortcutDisabled,
9318
+ open,
9319
+ os
9320
+ ]);
9321
+ const controls = useMemo(()=>({
9322
+ close,
9323
+ isOpen,
9324
+ open,
9325
+ refresh,
9326
+ shortcutLabel
9327
+ }), [
9328
+ close,
9329
+ isOpen,
9330
+ open,
9331
+ refresh,
9332
+ shortcutLabel
9333
+ ]);
9334
+ return /*#__PURE__*/ jsxs(GlobalSearchContext.Provider, {
9335
+ value: controls,
9336
+ children: [
9337
+ children,
9338
+ /*#__PURE__*/ jsx("span", {
9339
+ ref: setAnchor,
9340
+ hidden: true
9341
+ }),
9342
+ isOpen && anchor ? /*#__PURE__*/ createPortal(/*#__PURE__*/ jsx(SearchPanel, {
9343
+ emptyState: emptyState,
9344
+ initialQuery: initialQuery,
9345
+ placeholder: placeholder,
9346
+ refreshRef: refreshRef,
9347
+ sources: sources,
9348
+ status: status,
9349
+ onClose: close
9350
+ }), themeRoot(anchor) ?? document.body) : null
9351
+ ]
9352
+ });
9353
+ }
9354
+ function SearchPanel({ emptyState, initialQuery, onClose, placeholder, refreshRef, sources, status }) {
9355
+ const baseId = useId();
9356
+ const listboxId = `${baseId}-listbox`;
9357
+ const router = useRouter();
9358
+ const dialogRef = useRef(null);
9359
+ const inputRef = useRef(null);
9360
+ const [query, setQuery] = useState(initialQuery);
9361
+ const [activeId, setActiveId] = useState(null);
9362
+ const [runner] = useState(()=>new SearchRunner());
9363
+ const groups = useSyncExternalStore(runner.subscribe, runner.getSnapshot, runner.getSnapshot);
9364
+ const label = useMessage("ox0.globalSearch.label", "Search");
9365
+ const defaultPlaceholder = useMessage("ox0.globalSearch.placeholder", "Search…");
9366
+ const loadingText = useMessage("ox0.globalSearch.loading", "Searching…");
9367
+ const errorText = useMessage("ox0.globalSearch.error", "Couldn't load results");
9368
+ const noResultsText = useMessage("ox0.globalSearch.noResults", "No results for “{query}”", {
9369
+ query: query.trim()
9370
+ });
9371
+ const previewLabel = useMessage("ox0.globalSearch.preview", "Details");
9372
+ const navigateHint = useMessage("ox0.globalSearch.navigate", "Navigate");
9373
+ const openHint = useMessage("ox0.globalSearch.open", "Open");
9374
+ const closeHint = useMessage("ox0.globalSearch.close", "Close");
9375
+ useEffect(()=>{
9376
+ runner.run(sources, query);
9377
+ }, [
9378
+ query,
9379
+ runner,
9380
+ sources
9381
+ ]);
9382
+ useEffect(()=>()=>runner.cancel(), [
9383
+ runner
9384
+ ]);
9385
+ useEffect(()=>{
9386
+ refreshRef.current = ()=>runner.refresh();
9387
+ return ()=>{
9388
+ refreshRef.current = null;
9389
+ };
9390
+ }, [
9391
+ refreshRef,
9392
+ runner
9393
+ ]);
9394
+ useEffect(()=>{
9395
+ const previouslyFocused = document.activeElement;
9396
+ inputRef.current?.focus();
9397
+ return ()=>{
9398
+ if (previouslyFocused instanceof HTMLElement) previouslyFocused.focus();
9399
+ };
9400
+ }, []);
9401
+ const options = useMemo(()=>{
9402
+ const result = [];
9403
+ for (const group of groups)for (const item of group.items.slice(0, group.source.limit ?? DEFAULT_LIMIT))result.push({
9404
+ id: `${baseId}-${group.source.id}-${group.source.getKey(item)}`,
9405
+ item,
9406
+ source: group.source
9407
+ });
9408
+ return result;
9409
+ }, [
9410
+ baseId,
9411
+ groups
9412
+ ]);
9413
+ const active = options.find((option)=>option.id === activeId) ?? options[0];
9414
+ const isLoading = groups.some((group)=>"loading" === group.status);
9415
+ const hasPreviewPane = sources.some((source)=>void 0 !== source.renderPreview);
9416
+ const terms = useMemo(()=>query.trim().split(/\s+/).filter(Boolean), [
9417
+ query
9418
+ ]);
9419
+ const resultCountText = useMessage(1 === options.length ? "ox0.globalSearch.resultCountOne" : "ox0.globalSearch.resultCount", 1 === options.length ? "1 result" : "{count} results", {
9420
+ count: String(options.length)
9421
+ });
9422
+ useEffect(()=>{
9423
+ if (!active) return;
9424
+ document.getElementById(active.id)?.scrollIntoView?.({
9425
+ block: "nearest"
9426
+ });
9427
+ }, [
9428
+ active
9429
+ ]);
9430
+ function choose(option, inNewTab) {
9431
+ const href = option.source.getHref?.(option.item);
9432
+ onClose();
9433
+ if (void 0 !== href && isSafeHref(href)) if (inNewTab) window.open(href, "_blank", "noopener,noreferrer");
9434
+ else if (router) router.navigate(href);
9435
+ else window.location.assign(href);
9436
+ option.source.onAction?.(option.item);
9437
+ }
9438
+ function move(offset) {
9439
+ if (0 === options.length || !active) return;
9440
+ const index = options.indexOf(active);
9441
+ const next = options[(index + offset + options.length) % options.length];
9442
+ if (next) setActiveId(next.id);
9443
+ }
9444
+ function handleInputKeyDown(e) {
9445
+ if (e.nativeEvent.isComposing) return;
9446
+ switch(e.key){
9447
+ case "ArrowDown":
9448
+ e.preventDefault();
9449
+ move(1);
9450
+ break;
9451
+ case "ArrowUp":
9452
+ e.preventDefault();
9453
+ move(-1);
9454
+ break;
9455
+ case "Enter":
9456
+ if (!active) return;
9457
+ e.preventDefault();
9458
+ choose(active, e.metaKey || e.ctrlKey);
9459
+ break;
9460
+ case "Escape":
9461
+ e.preventDefault();
9462
+ if (query) setQuery("");
9463
+ else onClose();
9464
+ break;
9465
+ }
9466
+ }
9467
+ function handleDialogKeyDown(e) {
9468
+ if ("Escape" === e.key && e.target !== inputRef.current) {
9469
+ e.preventDefault();
9470
+ onClose();
9471
+ return;
9472
+ }
9473
+ if ("Tab" !== e.key) return;
9474
+ const focusable = Array.from(dialogRef.current?.querySelectorAll(global_search_FOCUSABLE_SELECTOR) ?? []);
9475
+ const first = focusable[0];
9476
+ const last = focusable.at(-1);
9477
+ if (e.shiftKey && document.activeElement === first) {
9478
+ e.preventDefault();
9479
+ last?.focus();
9480
+ } else if (!e.shiftKey && document.activeElement === last) {
9481
+ e.preventDefault();
9482
+ first?.focus();
9483
+ }
9484
+ }
9485
+ const showEmpty = query.trim().length > 0 && 0 === options.length && !isLoading;
9486
+ const preview = active?.source.renderPreview?.(active.item);
9487
+ return /*#__PURE__*/ jsxs("div", {
9488
+ className: global_search_module.overlay,
9489
+ children: [
9490
+ /*#__PURE__*/ jsx("div", {
9491
+ "aria-hidden": "true",
9492
+ className: global_search_module.backdrop,
9493
+ onClick: onClose
9494
+ }),
9495
+ /*#__PURE__*/ jsxs("dialog", {
9496
+ ref: dialogRef,
9497
+ "aria-label": label,
9498
+ "aria-modal": "true",
9499
+ className: global_search_module.dialog,
9500
+ "data-has-preview": hasPreviewPane || void 0,
9501
+ open: true,
9502
+ onKeyDown: handleDialogKeyDown,
9503
+ children: [
9504
+ /*#__PURE__*/ jsxs("div", {
9505
+ className: global_search_module.inputRow,
9506
+ children: [
9507
+ /*#__PURE__*/ jsx(SearchIcon, {}),
9508
+ /*#__PURE__*/ jsx("input", {
9509
+ ref: inputRef,
9510
+ "aria-activedescendant": active?.id,
9511
+ "aria-autocomplete": "list",
9512
+ "aria-controls": listboxId,
9513
+ "aria-expanded": options.length > 0,
9514
+ "aria-label": label,
9515
+ autoComplete: "off",
9516
+ className: global_search_module.input,
9517
+ placeholder: placeholder ?? defaultPlaceholder,
9518
+ role: "combobox",
9519
+ spellCheck: false,
9520
+ type: "text",
9521
+ value: query,
9522
+ onChange: (e)=>setQuery(e.target.value),
9523
+ onKeyDown: handleInputKeyDown
9524
+ }),
9525
+ isLoading ? /*#__PURE__*/ jsx("span", {
9526
+ "aria-hidden": "true",
9527
+ className: global_search_module.spinner
9528
+ }) : null
9529
+ ]
9530
+ }),
9531
+ /*#__PURE__*/ jsxs("div", {
9532
+ className: global_search_module.body,
9533
+ children: [
9534
+ /*#__PURE__*/ jsx(MarkProvider, {
9535
+ terms: terms,
9536
+ children: /*#__PURE__*/ jsxs("div", {
9537
+ className: global_search_module.resultsPane,
9538
+ children: [
9539
+ /*#__PURE__*/ jsx("div", {
9540
+ "aria-label": label,
9541
+ className: global_search_module.results,
9542
+ id: listboxId,
9543
+ role: "listbox",
9544
+ children: groups.map((group)=>{
9545
+ const groupOptions = options.filter((option)=>option.source === group.source);
9546
+ const groupStatus = "error" === group.status ? errorText : "loading" === group.status && 0 === groupOptions.length ? loadingText : null;
9547
+ if (0 === groupOptions.length && null === groupStatus) return null;
9548
+ const headingId = `${baseId}-${group.source.id}-heading`;
9549
+ return /*#__PURE__*/ jsxs("div", {
9550
+ className: global_search_module.group,
9551
+ role: "presentation",
9552
+ children: [
9553
+ /*#__PURE__*/ jsxs("div", {
9554
+ className: global_search_module.groupHeading,
9555
+ id: headingId,
9556
+ role: "presentation",
9557
+ children: [
9558
+ /*#__PURE__*/ jsx("span", {
9559
+ children: group.source.label
9560
+ }),
9561
+ groupStatus ? /*#__PURE__*/ jsx("span", {
9562
+ className: global_search_module.groupStatus,
9563
+ children: groupStatus
9564
+ }) : null
9565
+ ]
9566
+ }),
9567
+ /*#__PURE__*/ jsx("div", {
9568
+ "aria-labelledby": headingId,
9569
+ role: "group",
9570
+ children: groupOptions.map((option)=>/*#__PURE__*/ jsx(ResultRow, {
9571
+ isActive: option === active,
9572
+ option: option,
9573
+ onChoose: choose,
9574
+ onHover: setActiveId
9575
+ }, option.id))
9576
+ })
9577
+ ]
9578
+ }, group.source.id);
9579
+ })
9580
+ }),
9581
+ showEmpty ? /*#__PURE__*/ jsx("div", {
9582
+ className: global_search_module.empty,
9583
+ children: emptyState ?? noResultsText
9584
+ }) : null
9585
+ ]
9586
+ })
9587
+ }),
9588
+ hasPreviewPane ? /*#__PURE__*/ jsx("section", {
9589
+ "aria-label": previewLabel,
9590
+ className: global_search_module.preview,
9591
+ children: preview
9592
+ }) : null
9593
+ ]
9594
+ }),
9595
+ /*#__PURE__*/ jsx("div", {
9596
+ "aria-live": "polite",
9597
+ className: global_search_module.status,
9598
+ children: status
9599
+ }),
9600
+ /*#__PURE__*/ jsxs("div", {
9601
+ "aria-hidden": "true",
9602
+ className: global_search_module.footer,
9603
+ children: [
9604
+ /*#__PURE__*/ jsxs("span", {
9605
+ className: global_search_module.hint,
9606
+ children: [
9607
+ /*#__PURE__*/ jsx(keyboard_Keyboard, {
9608
+ children: "↑"
9609
+ }),
9610
+ /*#__PURE__*/ jsx(keyboard_Keyboard, {
9611
+ children: "↓"
9612
+ }),
9613
+ navigateHint
9614
+ ]
9615
+ }),
9616
+ /*#__PURE__*/ jsxs("span", {
9617
+ className: global_search_module.hint,
9618
+ children: [
9619
+ /*#__PURE__*/ jsx(keyboard_Keyboard, {
9620
+ children: "↵"
9621
+ }),
9622
+ openHint
9623
+ ]
9624
+ }),
9625
+ /*#__PURE__*/ jsxs("span", {
9626
+ className: global_search_module.hint,
9627
+ children: [
9628
+ /*#__PURE__*/ jsx(keyboard_Keyboard, {
9629
+ children: "Esc"
9630
+ }),
9631
+ closeHint
9632
+ ]
9633
+ })
9634
+ ]
9635
+ }),
9636
+ /*#__PURE__*/ jsx("output", {
9637
+ "aria-live": "polite",
9638
+ className: global_search_module.visuallyHidden,
9639
+ children: isLoading ? "" : showEmpty ? noResultsText : query.trim() ? resultCountText : ""
9640
+ })
9641
+ ]
9642
+ })
9643
+ ]
9644
+ });
9645
+ }
9646
+ function ResultRow({ isActive, onChoose, onHover, option }) {
9647
+ const { pressProps } = usePress({
9648
+ onPress: (e)=>onChoose(option, e.metaKey || e.ctrlKey),
9649
+ preventFocusOnPress: true
9650
+ });
9651
+ return /*#__PURE__*/ jsx("div", {
9652
+ ...pressProps,
9653
+ "aria-label": option.source.getTextValue(option.item),
9654
+ "aria-selected": isActive,
9655
+ className: global_search_module.option,
9656
+ "data-active": isActive || void 0,
9657
+ id: option.id,
9658
+ role: "option",
9659
+ tabIndex: -1,
9660
+ onPointerMove: ()=>{
9661
+ if (!isActive) onHover(option.id);
9662
+ },
9663
+ children: option.source.renderItem(option.item)
9664
+ });
9665
+ }
9666
+ function GlobalSearchTrigger({ placeholder }) {
9667
+ const ctx = useContext(GlobalSearchContext);
9668
+ if (!ctx) throw new Error("GlobalSearch.Trigger must be used inside <GlobalSearch>");
9669
+ const { open, shortcutLabel } = ctx;
9670
+ const defaultPlaceholder = useMessage("ox0.globalSearch.placeholder", "Search…");
9671
+ const { pressProps } = usePress({
9672
+ onPress: ()=>open()
9673
+ });
9674
+ return /*#__PURE__*/ jsxs("button", {
9675
+ ...pressProps,
9676
+ "aria-keyshortcuts": shortcutLabel.startsWith("⌘") ? "Meta+K" : "Control+K",
9677
+ className: global_search_module.trigger,
9678
+ type: "button",
9679
+ children: [
9680
+ /*#__PURE__*/ jsx(SearchIcon, {}),
9681
+ /*#__PURE__*/ jsx("span", {
9682
+ className: global_search_module.triggerText,
9683
+ children: placeholder ?? defaultPlaceholder
9684
+ }),
9685
+ /*#__PURE__*/ jsx(keyboard_Keyboard, {
9686
+ children: shortcutLabel
9687
+ })
9688
+ ]
9689
+ });
9690
+ }
9691
+ function SearchResult({ description, icon, meta, title }) {
9692
+ return /*#__PURE__*/ jsxs("span", {
9693
+ className: global_search_module.result,
9694
+ children: [
9695
+ icon ? /*#__PURE__*/ jsx("span", {
9696
+ "aria-hidden": "true",
9697
+ className: global_search_module.resultIcon,
9698
+ children: icon
9699
+ }) : null,
9700
+ /*#__PURE__*/ jsxs("span", {
9701
+ className: global_search_module.resultText,
9702
+ children: [
9703
+ /*#__PURE__*/ jsx("span", {
9704
+ className: global_search_module.resultTitle,
9705
+ children: /*#__PURE__*/ jsx(Markable, {
9706
+ children: title
9707
+ })
9708
+ }),
9709
+ description ? /*#__PURE__*/ jsx("span", {
9710
+ className: global_search_module.resultDescription,
9711
+ children: /*#__PURE__*/ jsx(Markable, {
9712
+ children: description
9713
+ })
9714
+ }) : null
9715
+ ]
9716
+ }),
9717
+ meta ? /*#__PURE__*/ jsx("span", {
9718
+ className: global_search_module.resultMeta,
9719
+ children: meta
9720
+ }) : null
9721
+ ]
9722
+ });
9723
+ }
9724
+ function SearchIcon() {
9725
+ return /*#__PURE__*/ jsx("span", {
9726
+ "aria-hidden": "true",
9727
+ className: global_search_module.searchIcon,
9728
+ children: /*#__PURE__*/ jsxs("svg", {
9729
+ fill: "none",
9730
+ height: "14",
9731
+ viewBox: "0 0 14 14",
9732
+ width: "14",
9733
+ children: [
9734
+ /*#__PURE__*/ jsx("circle", {
9735
+ cx: "6",
9736
+ cy: "6",
9737
+ r: "4.25",
9738
+ stroke: "currentColor",
9739
+ strokeWidth: "1.5"
9740
+ }),
9741
+ /*#__PURE__*/ jsx("path", {
9742
+ d: "M9.5 9.5L12.5 12.5",
9743
+ stroke: "currentColor",
9744
+ strokeLinecap: "round",
9745
+ strokeWidth: "1.5"
9746
+ })
9747
+ ]
9748
+ })
9749
+ });
9750
+ }
9751
+ const GlobalSearch = Object.assign(GlobalSearchRoot, {
9752
+ displayName: "GlobalSearch",
9753
+ Trigger: GlobalSearchTrigger
9754
+ });
8747
9755
  const divider_module_0 = __webpack_require__("../../node_modules/.pnpm/@rsbuild+core@2.1.13_core-js@3.47.0/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[4].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[4].use[2]!./src/components/divider.module.css");
8748
9756
  var divider_module_options = {};
8749
9757
  divider_module_options.styleTagTransform = styleTagTransform_default();
@@ -9230,7 +10238,7 @@ function MenuPanel({ activeIndex, ariaLabel, depth, openChildIndex, rows, selfRe
9230
10238
  const { refs, floatingStyles } = useFloating({
9231
10239
  placement: 0 === depth ? "bottom-end" : "right-start",
9232
10240
  middleware: [
9233
- offset(0 === depth ? 10 : 8),
10241
+ react_offset(0 === depth ? 10 : 8),
9234
10242
  flip({
9235
10243
  padding: VIEWPORT_MARGIN,
9236
10244
  fallbackPlacements: 0 === depth ? [
@@ -9678,7 +10686,7 @@ function Popover({ children, placement = "bottom-start", isOpen: controlledOpen,
9678
10686
  onOpenChange: handleOpenChange,
9679
10687
  placement,
9680
10688
  middleware: [
9681
- offset(8),
10689
+ react_offset(8),
9682
10690
  flip(),
9683
10691
  shift({
9684
10692
  padding: 8
@@ -10632,10 +11640,6 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
10632
11640
  ]
10633
11641
  });
10634
11642
  });
10635
- const THEME_SCOPE = "[data-theme], [data-color-scheme], [data-density]";
10636
- function themeRoot(trigger) {
10637
- return trigger?.closest(THEME_SCOPE) ?? void 0;
10638
- }
10639
11643
  function SelectPopover({ children, state, triggerRef }) {
10640
11644
  const popoverRef = useRef(null);
10641
11645
  const { popoverProps, underlayProps } = usePopover({
@@ -12514,4 +13518,4 @@ function useDensity(options) {
12514
13518
  function useFontScale(options) {
12515
13519
  return useThemePreference("fontScale", options);
12516
13520
  }
12517
- export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AppShell, BreadcrumbItem, Breadcrumbs, ConfirmDialog, ConfirmPopover, ConfirmProvider, DateField, Dialog, Drawer, ListBox, ListBoxFilter, ListItem, ListItemDivider, ListItemGroup, ListItemStatic, MarkProvider, Markable, Menu, MenuItem, MenuSection, MenuSeparator, MenuSubTrigger, Nav, NavItem, Ox0Provider, Popover, PopoverContent, PopoverTrigger, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, TagGroup, ToastProvider, Tooltip, TooltipContent, TooltipTrigger, badge_Badge as Badge, banner_Banner as Banner, box_Box as Box, button_Button as Button, button_group_ButtonGroup as ButtonGroup, caption_Caption as Caption, card_Card as Card, checkbox_Checkbox as Checkbox, checkbox_group_CheckboxGroup as CheckboxGroup, checkbox_group_GroupCheckbox as GroupCheckbox, code_Code as Code, code_block_CodeBlock as CodeBlock, combobox_Combobox as Combobox, createTextStyles, date_time_DateRange as DateRange, date_time_DateTime as DateTime, defaultUiMessages, disclosure_triangle_DisclosureTriangle as DisclosureTriangle, divider_Divider as Divider, drop_zone_DropZone as DropZone, field_group_FieldGroup as FieldGroup, file_trigger_FileTrigger as FileTrigger, grid_Grid as Grid, heading_Heading as Heading, icon_button_IconButton as IconButton, icon_label_IconLabel as IconLabel, icon_toggle_IconToggle as IconToggle, inline_Inline as Inline, keyboard_Keyboard as Keyboard, label_Label as Label, link_Link as Link, matchesAccept, number_field_NumberField as NumberField, numeric_Numeric as Numeric, page_Page as Page, page_PageHeader as PageHeader, radio_group_Radio as Radio, radio_group_RadioGroup as RadioGroup, search_field_SearchField as SearchField, select_Select as Select, skeleton_Skeleton as Skeleton, slider_Slider as Slider, spinner_Spinner as Spinner, splitLayoutItemProps, split_Split as Split, stack_Stack as Stack, surface_Surface as Surface, switch_Switch as Switch, tag_group_Tag as Tag, text_Text as Text, text_area_TextArea as TextArea, text_field_TextField as TextField, useBorders, useBreakpointUp, useColorScheme, useConfirm, useDateFormat, useDensity, useFlexItem, useFontScale, useGridItem, useLayoutItem, useListItemState, useMark, useNeutralTheme, usePlacement, useResponsiveValue, useSizing, useSpacing, useSurface, useToast };
13521
+ export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AppShell, BreadcrumbItem, Breadcrumbs, ConfirmDialog, ConfirmPopover, ConfirmProvider, DateField, Dialog, Drawer, GlobalSearch, ListBox, ListBoxFilter, ListItem, ListItemDivider, ListItemGroup, ListItemStatic, MarkProvider, Markable, Menu, MenuItem, MenuSection, MenuSeparator, MenuSubTrigger, Nav, NavItem, Ox0Provider, Popover, PopoverContent, PopoverTrigger, SearchResult, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tabs, TagGroup, ToastProvider, Tooltip, TooltipContent, TooltipTrigger, badge_Badge as Badge, banner_Banner as Banner, box_Box as Box, button_Button as Button, button_group_ButtonGroup as ButtonGroup, caption_Caption as Caption, card_Card as Card, checkbox_Checkbox as Checkbox, checkbox_group_CheckboxGroup as CheckboxGroup, checkbox_group_GroupCheckbox as GroupCheckbox, code_Code as Code, code_block_CodeBlock as CodeBlock, combobox_Combobox as Combobox, createTextStyles, date_time_DateRange as DateRange, date_time_DateTime as DateTime, defaultUiMessages, defineSearchSource, disclosure_triangle_DisclosureTriangle as DisclosureTriangle, divider_Divider as Divider, drop_zone_DropZone as DropZone, field_group_FieldGroup as FieldGroup, file_trigger_FileTrigger as FileTrigger, grid_Grid as Grid, heading_Heading as Heading, icon_button_IconButton as IconButton, icon_label_IconLabel as IconLabel, icon_toggle_IconToggle as IconToggle, inline_Inline as Inline, keyboard_Keyboard as Keyboard, label_Label as Label, link_Link as Link, matchSearchItems, matchesAccept, number_field_NumberField as NumberField, numeric_Numeric as Numeric, page_Page as Page, page_PageHeader as PageHeader, radio_group_Radio as Radio, radio_group_RadioGroup as RadioGroup, search_field_SearchField as SearchField, select_Select as Select, skeleton_Skeleton as Skeleton, slider_Slider as Slider, spinner_Spinner as Spinner, splitLayoutItemProps, split_Split as Split, stack_Stack as Stack, surface_Surface as Surface, switch_Switch as Switch, tag_group_Tag as Tag, text_Text as Text, text_area_TextArea as TextArea, text_field_TextField as TextField, useBorders, useBreakpointUp, useColorScheme, useConfirm, useDateFormat, useDensity, useFlexItem, useFontScale, useGlobalSearch, useGridItem, useLayoutItem, useListItemState, useMark, useNeutralTheme, usePlacement, useResponsiveValue, useSizing, useSpacing, useSurface, useToast };