@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.
@@ -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 };