@bazza-ui/react 0.0.0-snapshot-20260205122957
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/command-score-BuKQkUmS.d.cts +36 -0
- package/dist/command-score-C6nHV08C.d.ts +36 -0
- package/dist/data-surface-Dki7544r.d.ts +2136 -0
- package/dist/data-surface-Dyb-d-72.d.cts +2136 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3296 -0
- package/dist/index.d.ts +3296 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/listbox/index.cjs +2 -0
- package/dist/internal/listbox/index.cjs.map +1 -0
- package/dist/internal/listbox/index.d.cts +253 -0
- package/dist/internal/listbox/index.d.ts +253 -0
- package/dist/internal/listbox/index.js +2 -0
- package/dist/internal/listbox/index.js.map +1 -0
- package/dist/internal/popup-menu/index.cjs +2 -0
- package/dist/internal/popup-menu/index.cjs.map +1 -0
- package/dist/internal/popup-menu/index.d.cts +925 -0
- package/dist/internal/popup-menu/index.d.ts +925 -0
- package/dist/internal/popup-menu/index.js +2 -0
- package/dist/internal/popup-menu/index.js.map +1 -0
- package/dist/use-listbox-item-bi01_uzf.d.cts +659 -0
- package/dist/use-listbox-item-bi01_uzf.d.ts +659 -0
- package/package.json +62 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { r as ListboxStore } from './use-listbox-item-bi01_uzf.cjs';
|
|
3
|
+
|
|
4
|
+
interface SurfaceContextValue {
|
|
5
|
+
/** The Listbox store instance */
|
|
6
|
+
store: ListboxStore;
|
|
7
|
+
/** Unique identifier for this surface */
|
|
8
|
+
surfaceId: string;
|
|
9
|
+
}
|
|
10
|
+
declare const SurfaceContext: React.Context<SurfaceContextValue | null>;
|
|
11
|
+
declare function useSurfaceContext(): SurfaceContextValue;
|
|
12
|
+
declare function useMaybeSurfaceContext(): SurfaceContextValue | null;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fuzzy matching algorithm for command palette-style filtering.
|
|
16
|
+
* Vendored from cmdk (https://github.com/pacocoursey/cmdk)
|
|
17
|
+
*
|
|
18
|
+
* The scores are arranged so that a continuous match of characters will
|
|
19
|
+
* result in a total score of 1.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Calculates a fuzzy match score between a string and an abbreviation.
|
|
23
|
+
*
|
|
24
|
+
* @param string - The string to match against
|
|
25
|
+
* @param abbreviation - The search query
|
|
26
|
+
* @param keywords - Optional additional keywords to include in matching
|
|
27
|
+
* @returns A score between 0 and 1, where 1 is a perfect match and 0 is no match
|
|
28
|
+
*/
|
|
29
|
+
declare function commandScore(string: string, abbreviation: string, keywords?: string[]): number;
|
|
30
|
+
/**
|
|
31
|
+
* Default filter function for listbox items.
|
|
32
|
+
* Returns a score > 0 for matches, 0 for non-matches.
|
|
33
|
+
*/
|
|
34
|
+
declare const defaultFilter: typeof commandScore;
|
|
35
|
+
|
|
36
|
+
export { type SurfaceContextValue as S, useSurfaceContext as a, SurfaceContext as b, commandScore as c, defaultFilter as d, useMaybeSurfaceContext as u };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { r as ListboxStore } from './use-listbox-item-bi01_uzf.js';
|
|
3
|
+
|
|
4
|
+
interface SurfaceContextValue {
|
|
5
|
+
/** The Listbox store instance */
|
|
6
|
+
store: ListboxStore;
|
|
7
|
+
/** Unique identifier for this surface */
|
|
8
|
+
surfaceId: string;
|
|
9
|
+
}
|
|
10
|
+
declare const SurfaceContext: React.Context<SurfaceContextValue | null>;
|
|
11
|
+
declare function useSurfaceContext(): SurfaceContextValue;
|
|
12
|
+
declare function useMaybeSurfaceContext(): SurfaceContextValue | null;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fuzzy matching algorithm for command palette-style filtering.
|
|
16
|
+
* Vendored from cmdk (https://github.com/pacocoursey/cmdk)
|
|
17
|
+
*
|
|
18
|
+
* The scores are arranged so that a continuous match of characters will
|
|
19
|
+
* result in a total score of 1.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Calculates a fuzzy match score between a string and an abbreviation.
|
|
23
|
+
*
|
|
24
|
+
* @param string - The string to match against
|
|
25
|
+
* @param abbreviation - The search query
|
|
26
|
+
* @param keywords - Optional additional keywords to include in matching
|
|
27
|
+
* @returns A score between 0 and 1, where 1 is a perfect match and 0 is no match
|
|
28
|
+
*/
|
|
29
|
+
declare function commandScore(string: string, abbreviation: string, keywords?: string[]): number;
|
|
30
|
+
/**
|
|
31
|
+
* Default filter function for listbox items.
|
|
32
|
+
* Returns a score > 0 for matches, 0 for non-matches.
|
|
33
|
+
*/
|
|
34
|
+
declare const defaultFilter: typeof commandScore;
|
|
35
|
+
|
|
36
|
+
export { type SurfaceContextValue as S, useSurfaceContext as a, SurfaceContext as b, commandScore as c, defaultFilter as d, useMaybeSurfaceContext as u };
|