@ox0/ui 3.6.0 → 3.7.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/components/global-search.d.ts +53 -0
- package/dist/components/global-search.d.ts.map +1 -0
- package/dist/components/global-search.test.d.ts +2 -0
- package/dist/components/global-search.test.d.ts.map +1 -0
- package/dist/components/search-runner.d.ts +75 -0
- package/dist/components/search-runner.d.ts.map +1 -0
- package/dist/components/search-runner.test.d.ts +2 -0
- package/dist/components/search-runner.test.d.ts.map +1 -0
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/theme-root.d.ts +2 -0
- package/dist/components/theme-root.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +975 -17
- package/dist/messages.d.ts +11 -0
- package/dist/messages.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type SearchSource } from "./search-runner";
|
|
3
|
+
export { defineSearchSource, matchSearchItems } from "./search-runner";
|
|
4
|
+
export type { SearchContext, SearchSource } from "./search-runner";
|
|
5
|
+
export interface GlobalSearchControls {
|
|
6
|
+
/** Opens the search, optionally starting with `query`. */
|
|
7
|
+
readonly open: (query?: string) => void;
|
|
8
|
+
readonly close: () => void;
|
|
9
|
+
readonly isOpen: boolean;
|
|
10
|
+
/** The shortcut as shown to this user: "⌘K" on macOS, "Ctrl K" elsewhere. */
|
|
11
|
+
readonly shortcutLabel: string;
|
|
12
|
+
}
|
|
13
|
+
/** Open or close the surrounding `<GlobalSearch>` from app code. */
|
|
14
|
+
export declare function useGlobalSearch(): GlobalSearchControls;
|
|
15
|
+
export interface GlobalSearchProps {
|
|
16
|
+
/** The app. Put `<GlobalSearch.Trigger>` anywhere inside, usually in the top bar. */
|
|
17
|
+
readonly children?: ReactNode;
|
|
18
|
+
/** Result sources, shown as groups in this order. Keep the array stable (memoize it). */
|
|
19
|
+
readonly sources: readonly SearchSource<unknown>[];
|
|
20
|
+
readonly isOpen?: boolean;
|
|
21
|
+
readonly defaultOpen?: boolean;
|
|
22
|
+
readonly onOpenChange?: (isOpen: boolean) => void;
|
|
23
|
+
/** Turns off the ⌘K / Ctrl+K shortcut. */
|
|
24
|
+
readonly isShortcutDisabled?: boolean;
|
|
25
|
+
/** Input placeholder. Default "Search…". */
|
|
26
|
+
readonly placeholder?: string;
|
|
27
|
+
/** Shown instead of the default message when a query has no results. */
|
|
28
|
+
readonly emptyState?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
declare function GlobalSearchRoot({ children, defaultOpen, emptyState, isOpen: isOpenProp, isShortcutDisabled, onOpenChange, placeholder, sources, }: GlobalSearchProps): ReactNode;
|
|
31
|
+
export interface GlobalSearchTriggerProps {
|
|
32
|
+
/** Text in the box. Default "Search…". */
|
|
33
|
+
readonly placeholder?: string;
|
|
34
|
+
}
|
|
35
|
+
/** A search-box-shaped button that opens the search and shows its shortcut. */
|
|
36
|
+
declare function GlobalSearchTrigger({ placeholder }: GlobalSearchTriggerProps): ReactNode;
|
|
37
|
+
export interface SearchResultProps {
|
|
38
|
+
/** Decorative icon or avatar before the text. */
|
|
39
|
+
readonly icon?: ReactNode;
|
|
40
|
+
/** Main line; query matches are highlighted. */
|
|
41
|
+
readonly title: string;
|
|
42
|
+
/** Second line; query matches are highlighted. */
|
|
43
|
+
readonly description?: string;
|
|
44
|
+
/** Trailing content — a badge, amount, date or shortcut. */
|
|
45
|
+
readonly meta?: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
/** Row layout for a `GlobalSearch` result. Use it from a source's `renderItem`. */
|
|
48
|
+
export declare function SearchResult({ description, icon, meta, title }: SearchResultProps): ReactNode;
|
|
49
|
+
export declare const GlobalSearch: typeof GlobalSearchRoot & {
|
|
50
|
+
displayName: string;
|
|
51
|
+
Trigger: typeof GlobalSearchTrigger;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=global-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,EAAE,SAAS,CAAA;CAChC;AAED,iBAAS,gBAAgB,CAAC,EACxB,QAAQ,EACR,WAAmB,EACnB,UAAU,EACV,MAAM,EAAE,UAAU,EAClB,kBAA0B,EAC1B,YAAY,EACZ,WAAW,EACX,OAAO,GACR,EAAE,iBAAiB,GAAG,SAAS,CA8D/B;AAgTD,MAAM,WAAW,wBAAwB;IACvC,0CAA0C;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,+EAA+E;AAC/E,iBAAS,mBAAmB,CAAC,EAAE,WAAW,EAAE,EAAE,wBAAwB,GAAG,SAAS,CAmBjF;AAID,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,kDAAkD;IAClD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAC1B;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,SAAS,CAqB7F;AAsBD,eAAO,MAAM,YAAY;;;CAGvB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-search.test.d.ts","sourceRoot":"","sources":["../../src/components/global-search.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface SearchContext {
|
|
3
|
+
/** Aborted when the query changes or the search closes — pass it to `fetch`. */
|
|
4
|
+
readonly signal: AbortSignal;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* One kind of result in `GlobalSearch` — pages, accounts, commands, … Each source finds and renders
|
|
8
|
+
* its own items, so a search can mix result types that share nothing but a row layout.
|
|
9
|
+
*
|
|
10
|
+
* Members use method syntax on purpose: it keeps `SearchSource<Account>` assignable to the
|
|
11
|
+
* `SearchSource<unknown>` list `GlobalSearch` takes.
|
|
12
|
+
*/
|
|
13
|
+
export interface SearchSource<T> {
|
|
14
|
+
/** Stable id; also prefixes each result's DOM id. */
|
|
15
|
+
readonly id: string;
|
|
16
|
+
/** Group heading shown above this source's results. */
|
|
17
|
+
readonly label: string;
|
|
18
|
+
/** Most results shown for this source. Default 5. */
|
|
19
|
+
readonly limit?: number;
|
|
20
|
+
/** Below this many characters (after trimming) the source is skipped. Default 0. */
|
|
21
|
+
readonly minQueryLength?: number;
|
|
22
|
+
/** Wait this long after typing stops before calling `search`. Set it for network sources. */
|
|
23
|
+
readonly debounceMs?: number;
|
|
24
|
+
/** Find results. Return an array for local data or a promise for remote data. */
|
|
25
|
+
search(query: string, context: SearchContext): readonly T[] | Promise<readonly T[]>;
|
|
26
|
+
/** Unique within the source. */
|
|
27
|
+
getKey(item: T): string;
|
|
28
|
+
/** Plain-text name of the result, used for its accessible name. */
|
|
29
|
+
getTextValue(item: T): string;
|
|
30
|
+
/** The row content — usually a `<SearchResult>`. */
|
|
31
|
+
renderItem(item: T): ReactNode;
|
|
32
|
+
/** Details shown in the side panel while the result is active. */
|
|
33
|
+
renderPreview?(item: T): ReactNode;
|
|
34
|
+
/** Navigation result: where choosing it goes. ⌘/Ctrl+Enter opens it in a new tab. */
|
|
35
|
+
getHref?(item: T): string;
|
|
36
|
+
/** Command result: what choosing it does. */
|
|
37
|
+
onAction?(item: T): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Identity helper that infers `T` from `search`, so inline callbacks (`getKey`, `renderItem`, …)
|
|
41
|
+
* are typed without annotations. Put `search` first in the object literal.
|
|
42
|
+
*/
|
|
43
|
+
export declare function defineSearchSource<T>(source: SearchSource<T>): SearchSource<T>;
|
|
44
|
+
export type SearchGroupStatus = "idle" | "loading" | "ready" | "error";
|
|
45
|
+
export interface SearchGroup {
|
|
46
|
+
readonly source: SearchSource<unknown>;
|
|
47
|
+
readonly items: readonly unknown[];
|
|
48
|
+
readonly status: SearchGroupStatus;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Runs every source for a query and publishes per-source results as an external store, so a slow
|
|
52
|
+
* source never holds back a fast one. A new `run` aborts in-flight requests; a group keeps showing
|
|
53
|
+
* its previous items while its next request loads, so results don't flicker as the user types.
|
|
54
|
+
*/
|
|
55
|
+
export declare class SearchRunner {
|
|
56
|
+
private groups;
|
|
57
|
+
private readonly listeners;
|
|
58
|
+
private controller;
|
|
59
|
+
private timers;
|
|
60
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
61
|
+
readonly getSnapshot: () => readonly SearchGroup[];
|
|
62
|
+
run(sources: readonly SearchSource<unknown>[], query: string): void;
|
|
63
|
+
cancel(): void;
|
|
64
|
+
private start;
|
|
65
|
+
private update;
|
|
66
|
+
private emit;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Filters and ranks local items for a query: every whitespace-separated term must appear in the
|
|
70
|
+
* item's text (case-insensitive). Items whose text starts with the query rank first, then items
|
|
71
|
+
* where a word starts with the first term, then the rest; ties keep their input order.
|
|
72
|
+
* Use it in `search` for sources with data known up front, like pages and commands.
|
|
73
|
+
*/
|
|
74
|
+
export declare function matchSearchItems<T>(items: readonly T[], query: string, getText: (item: T) => string): T[];
|
|
75
|
+
//# sourceMappingURL=search-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-runner.d.ts","sourceRoot":"","sources":["../../src/components/search-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY,CAAC,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S,OAAO,EAAE,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;CACnC;AAID;;;;GAIG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,UAAU,CAA+B;IACjD,OAAO,CAAC,MAAM,CAAsC;IAEpD,QAAQ,CAAC,SAAS,aAAc,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAKxD;IAED,QAAQ,CAAC,WAAW,QAAO,SAAS,WAAW,EAAE,CAAe;IAEhE,GAAG,CAAC,OAAO,EAAE,SAAS,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAsBlE;IAED,MAAM,IAAI,IAAI,CAKb;IAED,OAAO,CAAC,KAAK;IAsBb,OAAO,CAAC,MAAM;IAYd,OAAO,CAAC,IAAI;CAGb;AAID;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAC3B,CAAC,EAAE,CAmBL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-runner.test.d.ts","sourceRoot":"","sources":["../../src/components/search-runner.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAoD,MAAM,OAAO,CAAA;AA0BpG,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,uBAAuB,CAAA;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.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MAAM,CAAA;IAC7B,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,wBAAwB;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAA;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,qEAAqE;IACrE,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAA;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CAC9C;AAED,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AAcjE;;;;GAIG;AACH,eAAO,MAAM,MAAM,2GAwLjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-root.d.ts","sourceRoot":"","sources":["../../src/components/theme-root.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,CAErE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from "./components/dialog";
|
|
|
30
30
|
export * from "./components/disclosure-triangle";
|
|
31
31
|
export * from "./components/drawer";
|
|
32
32
|
export * from "./components/drop-zone";
|
|
33
|
+
export * from "./components/global-search";
|
|
33
34
|
export * from "./components/file-trigger";
|
|
34
35
|
export * from "./components/divider";
|
|
35
36
|
export * from "./components/heading";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kCAAkC,CAAA;AAChD,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACv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C,cAAc,kCAAkC,CAAA"}
|
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,369 @@ 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;
|
|
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
|
+
.footer-umLGpy {
|
|
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
|
+
gap: var(--ox0-space-lg);
|
|
2859
|
+
padding: var(--ox0-space-sm) var(--ox0-space-lg);
|
|
2860
|
+
display: flex;
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
.hint-u3aolN {
|
|
2864
|
+
align-items: center;
|
|
2865
|
+
gap: var(--ox0-space-2xs);
|
|
2866
|
+
display: inline-flex;
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
.visuallyHidden-VtiEjb {
|
|
2870
|
+
clip-path: inset(50%);
|
|
2871
|
+
white-space: nowrap;
|
|
2872
|
+
block-size: 1px;
|
|
2873
|
+
inline-size: 1px;
|
|
2874
|
+
position: absolute;
|
|
2875
|
+
overflow: hidden;
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
@media (width <= 40rem) {
|
|
2879
|
+
.overlay-HEDTMK {
|
|
2880
|
+
padding: 0;
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
.dialog-sr_Xjy, .dialog-sr_Xjy[data-has-preview] {
|
|
2884
|
+
border-radius: 0;
|
|
2885
|
+
width: 100%;
|
|
2886
|
+
height: 100%;
|
|
2887
|
+
max-height: none;
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
|
+
.body-S7OTcn {
|
|
2891
|
+
height: auto;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
.footer-umLGpy {
|
|
2895
|
+
display: none;
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
@keyframes fadeIn-coKaWx {
|
|
2900
|
+
from {
|
|
2901
|
+
opacity: 0;
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
@keyframes dialogIn-Bm3ENg {
|
|
2906
|
+
from {
|
|
2907
|
+
opacity: 0;
|
|
2908
|
+
transform: translateY(-8px) scale(.98);
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
@keyframes spin-PBn2jV {
|
|
2913
|
+
to {
|
|
2914
|
+
transform: rotate(360deg);
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2919
|
+
.overlay-HEDTMK, .dialog-sr_Xjy {
|
|
2920
|
+
animation-duration: 1ms;
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
.spinner-qi9ZHf {
|
|
2924
|
+
animation-duration: 2s;
|
|
2925
|
+
}
|
|
2926
|
+
}
|
|
2927
|
+
`,
|
|
2928
|
+
""
|
|
2929
|
+
]);
|
|
2930
|
+
___CSS_LOADER_EXPORT___.locals = {
|
|
2931
|
+
trigger: "trigger-YKrtGb",
|
|
2932
|
+
triggerText: "triggerText-uoJ7KX",
|
|
2933
|
+
searchIcon: "searchIcon-qhIzf8",
|
|
2934
|
+
overlay: "overlay-HEDTMK",
|
|
2935
|
+
fadeIn: "fadeIn-coKaWx",
|
|
2936
|
+
backdrop: "backdrop-iL0AVx",
|
|
2937
|
+
dialog: "dialog-sr_Xjy",
|
|
2938
|
+
dialogIn: "dialogIn-Bm3ENg",
|
|
2939
|
+
inputRow: "inputRow-cYgfjY",
|
|
2940
|
+
input: "input-DowPQW",
|
|
2941
|
+
spinner: "spinner-qi9ZHf",
|
|
2942
|
+
spin: "spin-PBn2jV",
|
|
2943
|
+
body: "body-S7OTcn",
|
|
2944
|
+
resultsPane: "resultsPane-w6Sm2Y",
|
|
2945
|
+
results: "results-i7cSuv",
|
|
2946
|
+
empty: "empty-J4IAB9",
|
|
2947
|
+
group: "group-L77ngB",
|
|
2948
|
+
groupHeading: "groupHeading-wlm1Bd",
|
|
2949
|
+
groupStatus: "groupStatus-xQbH9H",
|
|
2950
|
+
option: "option-qf4Q7q",
|
|
2951
|
+
preview: "preview-s52x7t",
|
|
2952
|
+
result: "result-HpbdT2",
|
|
2953
|
+
resultIcon: "resultIcon-qmtpm2",
|
|
2954
|
+
resultText: "resultText-wS8CHc",
|
|
2955
|
+
resultTitle: "resultTitle-hu7e5s",
|
|
2956
|
+
resultDescription: "resultDescription-UcRTCD",
|
|
2957
|
+
resultMeta: "resultMeta-wVHGW8",
|
|
2958
|
+
footer: "footer-umLGpy",
|
|
2959
|
+
hint: "hint-u3aolN",
|
|
2960
|
+
visuallyHidden: "visuallyHidden-VtiEjb"
|
|
2961
|
+
};
|
|
2962
|
+
const __rspack_default_export = ___CSS_LOADER_EXPORT___;
|
|
2963
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
2964
|
+
A: __rspack_default_export
|
|
2965
|
+
});
|
|
2966
|
+
},
|
|
2604
2967
|
"../../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
2968
|
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
2969
|
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 +5858,17 @@ const defaultUiMessages = {
|
|
|
5495
5858
|
"ox0.confirm.confirm": "Confirm",
|
|
5496
5859
|
"ox0.dropZone.browse": "Choose file",
|
|
5497
5860
|
"ox0.dropZone.browseMultiple": "Choose files",
|
|
5861
|
+
"ox0.globalSearch.close": "Close",
|
|
5862
|
+
"ox0.globalSearch.error": "Couldn't load results",
|
|
5863
|
+
"ox0.globalSearch.label": "Search",
|
|
5864
|
+
"ox0.globalSearch.loading": "Searching…",
|
|
5865
|
+
"ox0.globalSearch.navigate": "Navigate",
|
|
5866
|
+
"ox0.globalSearch.noResults": "No results for “{query}”",
|
|
5867
|
+
"ox0.globalSearch.open": "Open",
|
|
5868
|
+
"ox0.globalSearch.placeholder": "Search…",
|
|
5869
|
+
"ox0.globalSearch.preview": "Details",
|
|
5870
|
+
"ox0.globalSearch.resultCount": "{count} results",
|
|
5871
|
+
"ox0.globalSearch.resultCountOne": "1 result",
|
|
5498
5872
|
"ox0.heading.anchorLabel": "Link to {id}",
|
|
5499
5873
|
"ox0.heading.anchorMarker": "#",
|
|
5500
5874
|
"ox0.select.selectedCount": "{count} selected",
|
|
@@ -6379,7 +6753,7 @@ function Tooltip({ children, placement = "top", isDisabled = false }) {
|
|
|
6379
6753
|
},
|
|
6380
6754
|
placement,
|
|
6381
6755
|
middleware: [
|
|
6382
|
-
|
|
6756
|
+
react_offset(8),
|
|
6383
6757
|
flip(),
|
|
6384
6758
|
shift({
|
|
6385
6759
|
padding: 8
|
|
@@ -7343,21 +7717,21 @@ const numeric_Numeric = /*#__PURE__*/ forwardRef(function({ align, children, col
|
|
|
7343
7717
|
const TICK = 30000;
|
|
7344
7718
|
let clockNow = Date.now();
|
|
7345
7719
|
const listeners = new Set();
|
|
7346
|
-
let
|
|
7720
|
+
let date_time_timer;
|
|
7347
7721
|
function subscribeClock(listener) {
|
|
7348
7722
|
listeners.add(listener);
|
|
7349
|
-
if (void 0 ===
|
|
7723
|
+
if (void 0 === date_time_timer) {
|
|
7350
7724
|
clockNow = Date.now();
|
|
7351
|
-
|
|
7725
|
+
date_time_timer = setInterval(()=>{
|
|
7352
7726
|
clockNow = Date.now();
|
|
7353
7727
|
for (const notify of listeners)notify();
|
|
7354
7728
|
}, TICK);
|
|
7355
7729
|
}
|
|
7356
7730
|
return ()=>{
|
|
7357
7731
|
listeners.delete(listener);
|
|
7358
|
-
if (0 === listeners.size && void 0 !==
|
|
7359
|
-
clearInterval(
|
|
7360
|
-
|
|
7732
|
+
if (0 === listeners.size && void 0 !== date_time_timer) {
|
|
7733
|
+
clearInterval(date_time_timer);
|
|
7734
|
+
date_time_timer = void 0;
|
|
7361
7735
|
}
|
|
7362
7736
|
};
|
|
7363
7737
|
}
|
|
@@ -8344,7 +8718,7 @@ function ConfirmPopover({ anchor, cancelLabel, children, confirmLabel, isOpen, o
|
|
|
8344
8718
|
},
|
|
8345
8719
|
placement,
|
|
8346
8720
|
middleware: [
|
|
8347
|
-
|
|
8721
|
+
react_offset(8),
|
|
8348
8722
|
flip(),
|
|
8349
8723
|
shift({
|
|
8350
8724
|
padding: 8
|
|
@@ -8744,6 +9118,594 @@ const drop_zone_DropZone = /*#__PURE__*/ forwardRef(function(allProps, ref) {
|
|
|
8744
9118
|
]
|
|
8745
9119
|
});
|
|
8746
9120
|
});
|
|
9121
|
+
function defineSearchSource(source) {
|
|
9122
|
+
return source;
|
|
9123
|
+
}
|
|
9124
|
+
class SearchRunner {
|
|
9125
|
+
groups = [];
|
|
9126
|
+
listeners = new Set();
|
|
9127
|
+
controller = null;
|
|
9128
|
+
timers = [];
|
|
9129
|
+
subscribe = (listener)=>{
|
|
9130
|
+
this.listeners.add(listener);
|
|
9131
|
+
return ()=>{
|
|
9132
|
+
this.listeners.delete(listener);
|
|
9133
|
+
};
|
|
9134
|
+
};
|
|
9135
|
+
getSnapshot = ()=>this.groups;
|
|
9136
|
+
run(sources, query) {
|
|
9137
|
+
this.cancel();
|
|
9138
|
+
const controller = new AbortController();
|
|
9139
|
+
this.controller = controller;
|
|
9140
|
+
const trimmed = query.trim();
|
|
9141
|
+
const previous = new Map(this.groups.map((group)=>[
|
|
9142
|
+
group.source.id,
|
|
9143
|
+
group
|
|
9144
|
+
]));
|
|
9145
|
+
this.groups = sources.map((source)=>{
|
|
9146
|
+
if (trimmed.length < (source.minQueryLength ?? 0)) return {
|
|
9147
|
+
source,
|
|
9148
|
+
items: [],
|
|
9149
|
+
status: "idle"
|
|
9150
|
+
};
|
|
9151
|
+
return {
|
|
9152
|
+
source,
|
|
9153
|
+
items: previous.get(source.id)?.items ?? [],
|
|
9154
|
+
status: "loading"
|
|
9155
|
+
};
|
|
9156
|
+
});
|
|
9157
|
+
sources.forEach((source, index)=>{
|
|
9158
|
+
if (this.groups[index]?.status === "idle") return;
|
|
9159
|
+
const start = ()=>this.start(source, index, trimmed, controller);
|
|
9160
|
+
const delay = source.debounceMs ?? 0;
|
|
9161
|
+
if (delay > 0) this.timers.push(setTimeout(start, delay));
|
|
9162
|
+
else start();
|
|
9163
|
+
});
|
|
9164
|
+
this.emit();
|
|
9165
|
+
}
|
|
9166
|
+
cancel() {
|
|
9167
|
+
for (const timer of this.timers)clearTimeout(timer);
|
|
9168
|
+
this.timers = [];
|
|
9169
|
+
this.controller?.abort();
|
|
9170
|
+
this.controller = null;
|
|
9171
|
+
}
|
|
9172
|
+
start(source, index, query, controller) {
|
|
9173
|
+
let result;
|
|
9174
|
+
try {
|
|
9175
|
+
result = source.search(query, {
|
|
9176
|
+
signal: controller.signal
|
|
9177
|
+
});
|
|
9178
|
+
} catch {
|
|
9179
|
+
this.update(index, controller, {
|
|
9180
|
+
status: "error",
|
|
9181
|
+
items: []
|
|
9182
|
+
});
|
|
9183
|
+
return;
|
|
9184
|
+
}
|
|
9185
|
+
if (!(result instanceof Promise)) return void this.update(index, controller, {
|
|
9186
|
+
status: "ready",
|
|
9187
|
+
items: result
|
|
9188
|
+
});
|
|
9189
|
+
result.then((items)=>this.update(index, controller, {
|
|
9190
|
+
status: "ready",
|
|
9191
|
+
items
|
|
9192
|
+
})).catch(()=>this.update(index, controller, {
|
|
9193
|
+
status: "error",
|
|
9194
|
+
items: []
|
|
9195
|
+
}));
|
|
9196
|
+
}
|
|
9197
|
+
update(index, controller, next) {
|
|
9198
|
+
if (controller.signal.aborted) return;
|
|
9199
|
+
const group = this.groups[index];
|
|
9200
|
+
if (!group) return;
|
|
9201
|
+
this.groups = this.groups.map((g, i)=>i === index ? {
|
|
9202
|
+
...g,
|
|
9203
|
+
...next
|
|
9204
|
+
} : g);
|
|
9205
|
+
this.emit();
|
|
9206
|
+
}
|
|
9207
|
+
emit() {
|
|
9208
|
+
for (const listener of this.listeners)listener();
|
|
9209
|
+
}
|
|
9210
|
+
}
|
|
9211
|
+
function matchSearchItems(items, query, getText) {
|
|
9212
|
+
const normalized = query.trim().toLowerCase();
|
|
9213
|
+
if (0 === normalized.length) return [
|
|
9214
|
+
...items
|
|
9215
|
+
];
|
|
9216
|
+
const terms = normalized.split(/\s+/);
|
|
9217
|
+
const first = terms[0] ?? "";
|
|
9218
|
+
const ranked = [];
|
|
9219
|
+
items.forEach((item, index)=>{
|
|
9220
|
+
const text = getText(item).toLowerCase();
|
|
9221
|
+
if (!terms.every((term)=>text.includes(term))) return;
|
|
9222
|
+
const rank = text.startsWith(normalized) ? 0 : text.split(/[\s\-_/.]+/).some((word)=>word.startsWith(first)) ? 1 : 2;
|
|
9223
|
+
ranked.push({
|
|
9224
|
+
item,
|
|
9225
|
+
rank,
|
|
9226
|
+
index
|
|
9227
|
+
});
|
|
9228
|
+
});
|
|
9229
|
+
ranked.sort((a, b)=>a.rank - b.rank || a.index - b.index);
|
|
9230
|
+
return ranked.map((entry)=>entry.item);
|
|
9231
|
+
}
|
|
9232
|
+
const THEME_SCOPE = "[data-theme], [data-color-scheme], [data-density]";
|
|
9233
|
+
function themeRoot(anchor) {
|
|
9234
|
+
return anchor?.closest(THEME_SCOPE) ?? void 0;
|
|
9235
|
+
}
|
|
9236
|
+
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");
|
|
9237
|
+
var global_search_module_options = {};
|
|
9238
|
+
global_search_module_options.styleTagTransform = styleTagTransform_default();
|
|
9239
|
+
global_search_module_options.setAttributes = setAttributesWithoutAttributes_default();
|
|
9240
|
+
global_search_module_options.insert = insertBySelector_default().bind(null, "head");
|
|
9241
|
+
global_search_module_options.domAPI = styleDomAPI_default();
|
|
9242
|
+
global_search_module_options.insertStyleElement = insertStyleElement_default();
|
|
9243
|
+
injectStylesIntoStyleTag_default()(global_search_module_0.A, global_search_module_options);
|
|
9244
|
+
const global_search_module = global_search_module_0.A && global_search_module_0.A.locals ? global_search_module_0.A.locals : void 0;
|
|
9245
|
+
const DEFAULT_LIMIT = 5;
|
|
9246
|
+
const global_search_FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
9247
|
+
const GlobalSearchContext = /*#__PURE__*/ createContext(null);
|
|
9248
|
+
function useGlobalSearch() {
|
|
9249
|
+
const ctx = useContext(GlobalSearchContext);
|
|
9250
|
+
if (!ctx) throw new Error("useGlobalSearch must be used inside <GlobalSearch>");
|
|
9251
|
+
return ctx;
|
|
9252
|
+
}
|
|
9253
|
+
function GlobalSearchRoot({ children, defaultOpen = false, emptyState, isOpen: isOpenProp, isShortcutDisabled = false, onOpenChange, placeholder, sources }) {
|
|
9254
|
+
const os = useOS();
|
|
9255
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
9256
|
+
defaultValue: defaultOpen,
|
|
9257
|
+
onChange: onOpenChange,
|
|
9258
|
+
value: isOpenProp
|
|
9259
|
+
});
|
|
9260
|
+
const [initialQuery, setInitialQuery] = useState("");
|
|
9261
|
+
const [anchor, setAnchor] = useState(null);
|
|
9262
|
+
const isMac = "mac" === os;
|
|
9263
|
+
const shortcutLabel = isMac ? "⌘K" : "Ctrl K";
|
|
9264
|
+
const open = useCallback((query = "")=>{
|
|
9265
|
+
setInitialQuery(query);
|
|
9266
|
+
setIsOpen(true);
|
|
9267
|
+
}, [
|
|
9268
|
+
setIsOpen
|
|
9269
|
+
]);
|
|
9270
|
+
const close = useCallback(()=>setIsOpen(false), [
|
|
9271
|
+
setIsOpen
|
|
9272
|
+
]);
|
|
9273
|
+
useEffect(()=>{
|
|
9274
|
+
if (isShortcutDisabled) return;
|
|
9275
|
+
const handler = (e)=>{
|
|
9276
|
+
if (e.defaultPrevented || e.isComposing || e.altKey || e.shiftKey) return;
|
|
9277
|
+
if ("k" !== e.key.toLowerCase()) return;
|
|
9278
|
+
const isMod = "mac" === os ? e.metaKey : "mobile" === os ? e.metaKey || e.ctrlKey : e.ctrlKey;
|
|
9279
|
+
if (!isMod) return;
|
|
9280
|
+
e.preventDefault();
|
|
9281
|
+
if (isOpen) close();
|
|
9282
|
+
else open();
|
|
9283
|
+
};
|
|
9284
|
+
window.addEventListener("keydown", handler);
|
|
9285
|
+
return ()=>window.removeEventListener("keydown", handler);
|
|
9286
|
+
}, [
|
|
9287
|
+
close,
|
|
9288
|
+
isOpen,
|
|
9289
|
+
isShortcutDisabled,
|
|
9290
|
+
open,
|
|
9291
|
+
os
|
|
9292
|
+
]);
|
|
9293
|
+
const controls = useMemo(()=>({
|
|
9294
|
+
close,
|
|
9295
|
+
isOpen,
|
|
9296
|
+
open,
|
|
9297
|
+
shortcutLabel
|
|
9298
|
+
}), [
|
|
9299
|
+
close,
|
|
9300
|
+
isOpen,
|
|
9301
|
+
open,
|
|
9302
|
+
shortcutLabel
|
|
9303
|
+
]);
|
|
9304
|
+
return /*#__PURE__*/ jsxs(GlobalSearchContext.Provider, {
|
|
9305
|
+
value: controls,
|
|
9306
|
+
children: [
|
|
9307
|
+
children,
|
|
9308
|
+
/*#__PURE__*/ jsx("span", {
|
|
9309
|
+
ref: setAnchor,
|
|
9310
|
+
hidden: true
|
|
9311
|
+
}),
|
|
9312
|
+
isOpen && anchor ? /*#__PURE__*/ createPortal(/*#__PURE__*/ jsx(SearchPanel, {
|
|
9313
|
+
emptyState: emptyState,
|
|
9314
|
+
initialQuery: initialQuery,
|
|
9315
|
+
placeholder: placeholder,
|
|
9316
|
+
sources: sources,
|
|
9317
|
+
onClose: close
|
|
9318
|
+
}), themeRoot(anchor) ?? document.body) : null
|
|
9319
|
+
]
|
|
9320
|
+
});
|
|
9321
|
+
}
|
|
9322
|
+
function SearchPanel({ emptyState, initialQuery, onClose, placeholder, sources }) {
|
|
9323
|
+
const baseId = useId();
|
|
9324
|
+
const listboxId = `${baseId}-listbox`;
|
|
9325
|
+
const router = useRouter();
|
|
9326
|
+
const dialogRef = useRef(null);
|
|
9327
|
+
const inputRef = useRef(null);
|
|
9328
|
+
const [query, setQuery] = useState(initialQuery);
|
|
9329
|
+
const [activeId, setActiveId] = useState(null);
|
|
9330
|
+
const [runner] = useState(()=>new SearchRunner());
|
|
9331
|
+
const groups = useSyncExternalStore(runner.subscribe, runner.getSnapshot, runner.getSnapshot);
|
|
9332
|
+
const label = useMessage("ox0.globalSearch.label", "Search");
|
|
9333
|
+
const defaultPlaceholder = useMessage("ox0.globalSearch.placeholder", "Search…");
|
|
9334
|
+
const loadingText = useMessage("ox0.globalSearch.loading", "Searching…");
|
|
9335
|
+
const errorText = useMessage("ox0.globalSearch.error", "Couldn't load results");
|
|
9336
|
+
const noResultsText = useMessage("ox0.globalSearch.noResults", "No results for “{query}”", {
|
|
9337
|
+
query: query.trim()
|
|
9338
|
+
});
|
|
9339
|
+
const previewLabel = useMessage("ox0.globalSearch.preview", "Details");
|
|
9340
|
+
const navigateHint = useMessage("ox0.globalSearch.navigate", "Navigate");
|
|
9341
|
+
const openHint = useMessage("ox0.globalSearch.open", "Open");
|
|
9342
|
+
const closeHint = useMessage("ox0.globalSearch.close", "Close");
|
|
9343
|
+
useEffect(()=>{
|
|
9344
|
+
runner.run(sources, query);
|
|
9345
|
+
}, [
|
|
9346
|
+
query,
|
|
9347
|
+
runner,
|
|
9348
|
+
sources
|
|
9349
|
+
]);
|
|
9350
|
+
useEffect(()=>()=>runner.cancel(), [
|
|
9351
|
+
runner
|
|
9352
|
+
]);
|
|
9353
|
+
useEffect(()=>{
|
|
9354
|
+
const previouslyFocused = document.activeElement;
|
|
9355
|
+
inputRef.current?.focus();
|
|
9356
|
+
return ()=>{
|
|
9357
|
+
if (previouslyFocused instanceof HTMLElement) previouslyFocused.focus();
|
|
9358
|
+
};
|
|
9359
|
+
}, []);
|
|
9360
|
+
const options = useMemo(()=>{
|
|
9361
|
+
const result = [];
|
|
9362
|
+
for (const group of groups)for (const item of group.items.slice(0, group.source.limit ?? DEFAULT_LIMIT))result.push({
|
|
9363
|
+
id: `${baseId}-${group.source.id}-${group.source.getKey(item)}`,
|
|
9364
|
+
item,
|
|
9365
|
+
source: group.source
|
|
9366
|
+
});
|
|
9367
|
+
return result;
|
|
9368
|
+
}, [
|
|
9369
|
+
baseId,
|
|
9370
|
+
groups
|
|
9371
|
+
]);
|
|
9372
|
+
const active = options.find((option)=>option.id === activeId) ?? options[0];
|
|
9373
|
+
const isLoading = groups.some((group)=>"loading" === group.status);
|
|
9374
|
+
const hasPreviewPane = sources.some((source)=>void 0 !== source.renderPreview);
|
|
9375
|
+
const terms = useMemo(()=>query.trim().split(/\s+/).filter(Boolean), [
|
|
9376
|
+
query
|
|
9377
|
+
]);
|
|
9378
|
+
const resultCountText = useMessage(1 === options.length ? "ox0.globalSearch.resultCountOne" : "ox0.globalSearch.resultCount", 1 === options.length ? "1 result" : "{count} results", {
|
|
9379
|
+
count: String(options.length)
|
|
9380
|
+
});
|
|
9381
|
+
useEffect(()=>{
|
|
9382
|
+
if (!active) return;
|
|
9383
|
+
document.getElementById(active.id)?.scrollIntoView?.({
|
|
9384
|
+
block: "nearest"
|
|
9385
|
+
});
|
|
9386
|
+
}, [
|
|
9387
|
+
active
|
|
9388
|
+
]);
|
|
9389
|
+
function choose(option, inNewTab) {
|
|
9390
|
+
const href = option.source.getHref?.(option.item);
|
|
9391
|
+
onClose();
|
|
9392
|
+
if (void 0 !== href && isSafeHref(href)) if (inNewTab) window.open(href, "_blank", "noopener,noreferrer");
|
|
9393
|
+
else if (router) router.navigate(href);
|
|
9394
|
+
else window.location.assign(href);
|
|
9395
|
+
option.source.onAction?.(option.item);
|
|
9396
|
+
}
|
|
9397
|
+
function move(offset) {
|
|
9398
|
+
if (0 === options.length || !active) return;
|
|
9399
|
+
const index = options.indexOf(active);
|
|
9400
|
+
const next = options[(index + offset + options.length) % options.length];
|
|
9401
|
+
if (next) setActiveId(next.id);
|
|
9402
|
+
}
|
|
9403
|
+
function handleInputKeyDown(e) {
|
|
9404
|
+
if (e.nativeEvent.isComposing) return;
|
|
9405
|
+
switch(e.key){
|
|
9406
|
+
case "ArrowDown":
|
|
9407
|
+
e.preventDefault();
|
|
9408
|
+
move(1);
|
|
9409
|
+
break;
|
|
9410
|
+
case "ArrowUp":
|
|
9411
|
+
e.preventDefault();
|
|
9412
|
+
move(-1);
|
|
9413
|
+
break;
|
|
9414
|
+
case "Enter":
|
|
9415
|
+
if (!active) return;
|
|
9416
|
+
e.preventDefault();
|
|
9417
|
+
choose(active, e.metaKey || e.ctrlKey);
|
|
9418
|
+
break;
|
|
9419
|
+
case "Escape":
|
|
9420
|
+
e.preventDefault();
|
|
9421
|
+
if (query) setQuery("");
|
|
9422
|
+
else onClose();
|
|
9423
|
+
break;
|
|
9424
|
+
}
|
|
9425
|
+
}
|
|
9426
|
+
function handleDialogKeyDown(e) {
|
|
9427
|
+
if ("Escape" === e.key && e.target !== inputRef.current) {
|
|
9428
|
+
e.preventDefault();
|
|
9429
|
+
onClose();
|
|
9430
|
+
return;
|
|
9431
|
+
}
|
|
9432
|
+
if ("Tab" !== e.key) return;
|
|
9433
|
+
const focusable = Array.from(dialogRef.current?.querySelectorAll(global_search_FOCUSABLE_SELECTOR) ?? []);
|
|
9434
|
+
const first = focusable[0];
|
|
9435
|
+
const last = focusable.at(-1);
|
|
9436
|
+
if (e.shiftKey && document.activeElement === first) {
|
|
9437
|
+
e.preventDefault();
|
|
9438
|
+
last?.focus();
|
|
9439
|
+
} else if (!e.shiftKey && document.activeElement === last) {
|
|
9440
|
+
e.preventDefault();
|
|
9441
|
+
first?.focus();
|
|
9442
|
+
}
|
|
9443
|
+
}
|
|
9444
|
+
const showEmpty = query.trim().length > 0 && 0 === options.length && !isLoading;
|
|
9445
|
+
const preview = active?.source.renderPreview?.(active.item);
|
|
9446
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
9447
|
+
className: global_search_module.overlay,
|
|
9448
|
+
children: [
|
|
9449
|
+
/*#__PURE__*/ jsx("div", {
|
|
9450
|
+
"aria-hidden": "true",
|
|
9451
|
+
className: global_search_module.backdrop,
|
|
9452
|
+
onClick: onClose
|
|
9453
|
+
}),
|
|
9454
|
+
/*#__PURE__*/ jsxs("dialog", {
|
|
9455
|
+
ref: dialogRef,
|
|
9456
|
+
"aria-label": label,
|
|
9457
|
+
"aria-modal": "true",
|
|
9458
|
+
className: global_search_module.dialog,
|
|
9459
|
+
"data-has-preview": hasPreviewPane || void 0,
|
|
9460
|
+
open: true,
|
|
9461
|
+
onKeyDown: handleDialogKeyDown,
|
|
9462
|
+
children: [
|
|
9463
|
+
/*#__PURE__*/ jsxs("div", {
|
|
9464
|
+
className: global_search_module.inputRow,
|
|
9465
|
+
children: [
|
|
9466
|
+
/*#__PURE__*/ jsx(SearchIcon, {}),
|
|
9467
|
+
/*#__PURE__*/ jsx("input", {
|
|
9468
|
+
ref: inputRef,
|
|
9469
|
+
"aria-activedescendant": active?.id,
|
|
9470
|
+
"aria-autocomplete": "list",
|
|
9471
|
+
"aria-controls": listboxId,
|
|
9472
|
+
"aria-expanded": options.length > 0,
|
|
9473
|
+
"aria-label": label,
|
|
9474
|
+
autoComplete: "off",
|
|
9475
|
+
className: global_search_module.input,
|
|
9476
|
+
placeholder: placeholder ?? defaultPlaceholder,
|
|
9477
|
+
role: "combobox",
|
|
9478
|
+
spellCheck: false,
|
|
9479
|
+
type: "text",
|
|
9480
|
+
value: query,
|
|
9481
|
+
onChange: (e)=>setQuery(e.target.value),
|
|
9482
|
+
onKeyDown: handleInputKeyDown
|
|
9483
|
+
}),
|
|
9484
|
+
isLoading ? /*#__PURE__*/ jsx("span", {
|
|
9485
|
+
"aria-hidden": "true",
|
|
9486
|
+
className: global_search_module.spinner
|
|
9487
|
+
}) : null
|
|
9488
|
+
]
|
|
9489
|
+
}),
|
|
9490
|
+
/*#__PURE__*/ jsxs("div", {
|
|
9491
|
+
className: global_search_module.body,
|
|
9492
|
+
children: [
|
|
9493
|
+
/*#__PURE__*/ jsx(MarkProvider, {
|
|
9494
|
+
terms: terms,
|
|
9495
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
9496
|
+
className: global_search_module.resultsPane,
|
|
9497
|
+
children: [
|
|
9498
|
+
/*#__PURE__*/ jsx("div", {
|
|
9499
|
+
"aria-label": label,
|
|
9500
|
+
className: global_search_module.results,
|
|
9501
|
+
id: listboxId,
|
|
9502
|
+
role: "listbox",
|
|
9503
|
+
children: groups.map((group)=>{
|
|
9504
|
+
const groupOptions = options.filter((option)=>option.source === group.source);
|
|
9505
|
+
const status = "error" === group.status ? errorText : "loading" === group.status && 0 === groupOptions.length ? loadingText : null;
|
|
9506
|
+
if (0 === groupOptions.length && null === status) return null;
|
|
9507
|
+
const headingId = `${baseId}-${group.source.id}-heading`;
|
|
9508
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
9509
|
+
className: global_search_module.group,
|
|
9510
|
+
role: "presentation",
|
|
9511
|
+
children: [
|
|
9512
|
+
/*#__PURE__*/ jsxs("div", {
|
|
9513
|
+
className: global_search_module.groupHeading,
|
|
9514
|
+
id: headingId,
|
|
9515
|
+
role: "presentation",
|
|
9516
|
+
children: [
|
|
9517
|
+
/*#__PURE__*/ jsx("span", {
|
|
9518
|
+
children: group.source.label
|
|
9519
|
+
}),
|
|
9520
|
+
status ? /*#__PURE__*/ jsx("span", {
|
|
9521
|
+
className: global_search_module.groupStatus,
|
|
9522
|
+
children: status
|
|
9523
|
+
}) : null
|
|
9524
|
+
]
|
|
9525
|
+
}),
|
|
9526
|
+
/*#__PURE__*/ jsx("div", {
|
|
9527
|
+
"aria-labelledby": headingId,
|
|
9528
|
+
role: "group",
|
|
9529
|
+
children: groupOptions.map((option)=>/*#__PURE__*/ jsx(ResultRow, {
|
|
9530
|
+
isActive: option === active,
|
|
9531
|
+
option: option,
|
|
9532
|
+
onChoose: choose,
|
|
9533
|
+
onHover: setActiveId
|
|
9534
|
+
}, option.id))
|
|
9535
|
+
})
|
|
9536
|
+
]
|
|
9537
|
+
}, group.source.id);
|
|
9538
|
+
})
|
|
9539
|
+
}),
|
|
9540
|
+
showEmpty ? /*#__PURE__*/ jsx("div", {
|
|
9541
|
+
className: global_search_module.empty,
|
|
9542
|
+
children: emptyState ?? noResultsText
|
|
9543
|
+
}) : null
|
|
9544
|
+
]
|
|
9545
|
+
})
|
|
9546
|
+
}),
|
|
9547
|
+
hasPreviewPane ? /*#__PURE__*/ jsx("section", {
|
|
9548
|
+
"aria-label": previewLabel,
|
|
9549
|
+
className: global_search_module.preview,
|
|
9550
|
+
children: preview
|
|
9551
|
+
}) : null
|
|
9552
|
+
]
|
|
9553
|
+
}),
|
|
9554
|
+
/*#__PURE__*/ jsxs("div", {
|
|
9555
|
+
"aria-hidden": "true",
|
|
9556
|
+
className: global_search_module.footer,
|
|
9557
|
+
children: [
|
|
9558
|
+
/*#__PURE__*/ jsxs("span", {
|
|
9559
|
+
className: global_search_module.hint,
|
|
9560
|
+
children: [
|
|
9561
|
+
/*#__PURE__*/ jsx(keyboard_Keyboard, {
|
|
9562
|
+
children: "↑"
|
|
9563
|
+
}),
|
|
9564
|
+
/*#__PURE__*/ jsx(keyboard_Keyboard, {
|
|
9565
|
+
children: "↓"
|
|
9566
|
+
}),
|
|
9567
|
+
navigateHint
|
|
9568
|
+
]
|
|
9569
|
+
}),
|
|
9570
|
+
/*#__PURE__*/ jsxs("span", {
|
|
9571
|
+
className: global_search_module.hint,
|
|
9572
|
+
children: [
|
|
9573
|
+
/*#__PURE__*/ jsx(keyboard_Keyboard, {
|
|
9574
|
+
children: "↵"
|
|
9575
|
+
}),
|
|
9576
|
+
openHint
|
|
9577
|
+
]
|
|
9578
|
+
}),
|
|
9579
|
+
/*#__PURE__*/ jsxs("span", {
|
|
9580
|
+
className: global_search_module.hint,
|
|
9581
|
+
children: [
|
|
9582
|
+
/*#__PURE__*/ jsx(keyboard_Keyboard, {
|
|
9583
|
+
children: "Esc"
|
|
9584
|
+
}),
|
|
9585
|
+
closeHint
|
|
9586
|
+
]
|
|
9587
|
+
})
|
|
9588
|
+
]
|
|
9589
|
+
}),
|
|
9590
|
+
/*#__PURE__*/ jsx("output", {
|
|
9591
|
+
"aria-live": "polite",
|
|
9592
|
+
className: global_search_module.visuallyHidden,
|
|
9593
|
+
children: isLoading ? "" : showEmpty ? noResultsText : query.trim() ? resultCountText : ""
|
|
9594
|
+
})
|
|
9595
|
+
]
|
|
9596
|
+
})
|
|
9597
|
+
]
|
|
9598
|
+
});
|
|
9599
|
+
}
|
|
9600
|
+
function ResultRow({ isActive, onChoose, onHover, option }) {
|
|
9601
|
+
const { pressProps } = usePress({
|
|
9602
|
+
onPress: (e)=>onChoose(option, e.metaKey || e.ctrlKey),
|
|
9603
|
+
preventFocusOnPress: true
|
|
9604
|
+
});
|
|
9605
|
+
return /*#__PURE__*/ jsx("div", {
|
|
9606
|
+
...pressProps,
|
|
9607
|
+
"aria-label": option.source.getTextValue(option.item),
|
|
9608
|
+
"aria-selected": isActive,
|
|
9609
|
+
className: global_search_module.option,
|
|
9610
|
+
"data-active": isActive || void 0,
|
|
9611
|
+
id: option.id,
|
|
9612
|
+
role: "option",
|
|
9613
|
+
tabIndex: -1,
|
|
9614
|
+
onPointerMove: ()=>{
|
|
9615
|
+
if (!isActive) onHover(option.id);
|
|
9616
|
+
},
|
|
9617
|
+
children: option.source.renderItem(option.item)
|
|
9618
|
+
});
|
|
9619
|
+
}
|
|
9620
|
+
function GlobalSearchTrigger({ placeholder }) {
|
|
9621
|
+
const ctx = useContext(GlobalSearchContext);
|
|
9622
|
+
if (!ctx) throw new Error("GlobalSearch.Trigger must be used inside <GlobalSearch>");
|
|
9623
|
+
const { open, shortcutLabel } = ctx;
|
|
9624
|
+
const defaultPlaceholder = useMessage("ox0.globalSearch.placeholder", "Search…");
|
|
9625
|
+
const { pressProps } = usePress({
|
|
9626
|
+
onPress: ()=>open()
|
|
9627
|
+
});
|
|
9628
|
+
return /*#__PURE__*/ jsxs("button", {
|
|
9629
|
+
...pressProps,
|
|
9630
|
+
"aria-keyshortcuts": shortcutLabel.startsWith("⌘") ? "Meta+K" : "Control+K",
|
|
9631
|
+
className: global_search_module.trigger,
|
|
9632
|
+
type: "button",
|
|
9633
|
+
children: [
|
|
9634
|
+
/*#__PURE__*/ jsx(SearchIcon, {}),
|
|
9635
|
+
/*#__PURE__*/ jsx("span", {
|
|
9636
|
+
className: global_search_module.triggerText,
|
|
9637
|
+
children: placeholder ?? defaultPlaceholder
|
|
9638
|
+
}),
|
|
9639
|
+
/*#__PURE__*/ jsx(keyboard_Keyboard, {
|
|
9640
|
+
children: shortcutLabel
|
|
9641
|
+
})
|
|
9642
|
+
]
|
|
9643
|
+
});
|
|
9644
|
+
}
|
|
9645
|
+
function SearchResult({ description, icon, meta, title }) {
|
|
9646
|
+
return /*#__PURE__*/ jsxs("span", {
|
|
9647
|
+
className: global_search_module.result,
|
|
9648
|
+
children: [
|
|
9649
|
+
icon ? /*#__PURE__*/ jsx("span", {
|
|
9650
|
+
"aria-hidden": "true",
|
|
9651
|
+
className: global_search_module.resultIcon,
|
|
9652
|
+
children: icon
|
|
9653
|
+
}) : null,
|
|
9654
|
+
/*#__PURE__*/ jsxs("span", {
|
|
9655
|
+
className: global_search_module.resultText,
|
|
9656
|
+
children: [
|
|
9657
|
+
/*#__PURE__*/ jsx("span", {
|
|
9658
|
+
className: global_search_module.resultTitle,
|
|
9659
|
+
children: /*#__PURE__*/ jsx(Markable, {
|
|
9660
|
+
children: title
|
|
9661
|
+
})
|
|
9662
|
+
}),
|
|
9663
|
+
description ? /*#__PURE__*/ jsx("span", {
|
|
9664
|
+
className: global_search_module.resultDescription,
|
|
9665
|
+
children: /*#__PURE__*/ jsx(Markable, {
|
|
9666
|
+
children: description
|
|
9667
|
+
})
|
|
9668
|
+
}) : null
|
|
9669
|
+
]
|
|
9670
|
+
}),
|
|
9671
|
+
meta ? /*#__PURE__*/ jsx("span", {
|
|
9672
|
+
className: global_search_module.resultMeta,
|
|
9673
|
+
children: meta
|
|
9674
|
+
}) : null
|
|
9675
|
+
]
|
|
9676
|
+
});
|
|
9677
|
+
}
|
|
9678
|
+
function SearchIcon() {
|
|
9679
|
+
return /*#__PURE__*/ jsx("span", {
|
|
9680
|
+
"aria-hidden": "true",
|
|
9681
|
+
className: global_search_module.searchIcon,
|
|
9682
|
+
children: /*#__PURE__*/ jsxs("svg", {
|
|
9683
|
+
fill: "none",
|
|
9684
|
+
height: "14",
|
|
9685
|
+
viewBox: "0 0 14 14",
|
|
9686
|
+
width: "14",
|
|
9687
|
+
children: [
|
|
9688
|
+
/*#__PURE__*/ jsx("circle", {
|
|
9689
|
+
cx: "6",
|
|
9690
|
+
cy: "6",
|
|
9691
|
+
r: "4.25",
|
|
9692
|
+
stroke: "currentColor",
|
|
9693
|
+
strokeWidth: "1.5"
|
|
9694
|
+
}),
|
|
9695
|
+
/*#__PURE__*/ jsx("path", {
|
|
9696
|
+
d: "M9.5 9.5L12.5 12.5",
|
|
9697
|
+
stroke: "currentColor",
|
|
9698
|
+
strokeLinecap: "round",
|
|
9699
|
+
strokeWidth: "1.5"
|
|
9700
|
+
})
|
|
9701
|
+
]
|
|
9702
|
+
})
|
|
9703
|
+
});
|
|
9704
|
+
}
|
|
9705
|
+
const GlobalSearch = Object.assign(GlobalSearchRoot, {
|
|
9706
|
+
displayName: "GlobalSearch",
|
|
9707
|
+
Trigger: GlobalSearchTrigger
|
|
9708
|
+
});
|
|
8747
9709
|
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
9710
|
var divider_module_options = {};
|
|
8749
9711
|
divider_module_options.styleTagTransform = styleTagTransform_default();
|
|
@@ -9230,7 +10192,7 @@ function MenuPanel({ activeIndex, ariaLabel, depth, openChildIndex, rows, selfRe
|
|
|
9230
10192
|
const { refs, floatingStyles } = useFloating({
|
|
9231
10193
|
placement: 0 === depth ? "bottom-end" : "right-start",
|
|
9232
10194
|
middleware: [
|
|
9233
|
-
|
|
10195
|
+
react_offset(0 === depth ? 10 : 8),
|
|
9234
10196
|
flip({
|
|
9235
10197
|
padding: VIEWPORT_MARGIN,
|
|
9236
10198
|
fallbackPlacements: 0 === depth ? [
|
|
@@ -9678,7 +10640,7 @@ function Popover({ children, placement = "bottom-start", isOpen: controlledOpen,
|
|
|
9678
10640
|
onOpenChange: handleOpenChange,
|
|
9679
10641
|
placement,
|
|
9680
10642
|
middleware: [
|
|
9681
|
-
|
|
10643
|
+
react_offset(8),
|
|
9682
10644
|
flip(),
|
|
9683
10645
|
shift({
|
|
9684
10646
|
padding: 8
|
|
@@ -10632,10 +11594,6 @@ const select_Select = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
10632
11594
|
]
|
|
10633
11595
|
});
|
|
10634
11596
|
});
|
|
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
11597
|
function SelectPopover({ children, state, triggerRef }) {
|
|
10640
11598
|
const popoverRef = useRef(null);
|
|
10641
11599
|
const { popoverProps, underlayProps } = usePopover({
|
|
@@ -12514,4 +13472,4 @@ function useDensity(options) {
|
|
|
12514
13472
|
function useFontScale(options) {
|
|
12515
13473
|
return useThemePreference("fontScale", options);
|
|
12516
13474
|
}
|
|
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 };
|
|
13475
|
+
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 };
|
package/dist/messages.d.ts
CHANGED
|
@@ -6,6 +6,17 @@ export declare const defaultUiMessages: {
|
|
|
6
6
|
readonly "ox0.confirm.confirm": "Confirm";
|
|
7
7
|
readonly "ox0.dropZone.browse": "Choose file";
|
|
8
8
|
readonly "ox0.dropZone.browseMultiple": "Choose files";
|
|
9
|
+
readonly "ox0.globalSearch.close": "Close";
|
|
10
|
+
readonly "ox0.globalSearch.error": "Couldn't load results";
|
|
11
|
+
readonly "ox0.globalSearch.label": "Search";
|
|
12
|
+
readonly "ox0.globalSearch.loading": "Searching…";
|
|
13
|
+
readonly "ox0.globalSearch.navigate": "Navigate";
|
|
14
|
+
readonly "ox0.globalSearch.noResults": "No results for “{query}”";
|
|
15
|
+
readonly "ox0.globalSearch.open": "Open";
|
|
16
|
+
readonly "ox0.globalSearch.placeholder": "Search…";
|
|
17
|
+
readonly "ox0.globalSearch.preview": "Details";
|
|
18
|
+
readonly "ox0.globalSearch.resultCount": "{count} results";
|
|
19
|
+
readonly "ox0.globalSearch.resultCountOne": "1 result";
|
|
9
20
|
readonly "ox0.heading.anchorLabel": "Link to {id}";
|
|
10
21
|
readonly "ox0.heading.anchorMarker": "#";
|
|
11
22
|
readonly "ox0.select.selectedCount": "{count} selected";
|
package/dist/messages.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;aAC5B,uBAAuB,EAAE,MAAM;aAC/B,sBAAsB,EAAE,iBAAiB;aACzC,4BAA4B,EAAE,iBAAiB;aAC/C,oBAAoB,EAAE,QAAQ;aAC9B,qBAAqB,EAAE,SAAS;aAChC,qBAAqB,EAAE,aAAa;aACpC,6BAA6B,EAAE,cAAc;aAC7C,yBAAyB,EAAE,cAAc;aACzC,0BAA0B,EAAE,GAAG;aAC/B,0BAA0B,EAAE,kBAAkB;aAC9C,mBAAmB,EAAE,sBAAsB;aAC3C,kBAAkB,EAAE,eAAe;CAC3B,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;aAC5B,uBAAuB,EAAE,MAAM;aAC/B,sBAAsB,EAAE,iBAAiB;aACzC,4BAA4B,EAAE,iBAAiB;aAC/C,oBAAoB,EAAE,QAAQ;aAC9B,qBAAqB,EAAE,SAAS;aAChC,qBAAqB,EAAE,aAAa;aACpC,6BAA6B,EAAE,cAAc;aAC7C,wBAAwB,EAAE,OAAO;aACjC,wBAAwB,EAAE,uBAAuB;aACjD,wBAAwB,EAAE,QAAQ;aAClC,0BAA0B,EAAE,YAAY;aACxC,2BAA2B,EAAE,UAAU;aACvC,4BAA4B,EAAE,0BAA0B;aACxD,uBAAuB,EAAE,MAAM;aAC/B,8BAA8B,EAAE,SAAS;aACzC,0BAA0B,EAAE,SAAS;aACrC,8BAA8B,EAAE,iBAAiB;aACjD,iCAAiC,EAAE,UAAU;aAC7C,yBAAyB,EAAE,cAAc;aACzC,0BAA0B,EAAE,GAAG;aAC/B,0BAA0B,EAAE,kBAAkB;aAC9C,mBAAmB,EAAE,sBAAsB;aAC3C,kBAAkB,EAAE,eAAe;CAC3B,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,iBAAiB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox0/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/esturcke/ox0-platform.git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"react-aria": "^3.52.1",
|
|
27
27
|
"react-stately": "^3.50.0",
|
|
28
28
|
"@ox0/hooks": "0.2.2",
|
|
29
|
-
"@ox0/
|
|
30
|
-
"@ox0/
|
|
29
|
+
"@ox0/tokens": "0.7.0",
|
|
30
|
+
"@ox0/i18n": "0.4.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": "^19.0.0",
|