@classytic/fluid 0.2.4 → 0.3.2

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.
Files changed (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +149 -62
  3. package/dist/api-pagination-CJ0vR_w6.d.mts +34 -0
  4. package/dist/api-pagination-DBTE0yk4.mjs +190 -0
  5. package/dist/chunk-DQk6qfdC.mjs +18 -0
  6. package/dist/client/calendar.d.mts +105 -0
  7. package/dist/client/calendar.mjs +202 -0
  8. package/dist/client/core.d.mts +1614 -0
  9. package/dist/client/core.mjs +2779 -0
  10. package/dist/client/error.d.mts +125 -0
  11. package/dist/client/error.mjs +166 -0
  12. package/dist/client/hooks.d.mts +162 -0
  13. package/dist/client/hooks.mjs +447 -0
  14. package/dist/client/table.d.mts +84 -0
  15. package/dist/client/table.mjs +373 -0
  16. package/dist/client/theme.d.mts +6 -0
  17. package/dist/client/theme.mjs +65 -0
  18. package/dist/command.d.mts +134 -0
  19. package/dist/command.mjs +132 -0
  20. package/dist/compact.d.mts +359 -0
  21. package/dist/compact.mjs +892 -0
  22. package/dist/dashboard.d.mts +778 -0
  23. package/dist/dashboard.mjs +1617 -0
  24. package/dist/filter-utils-DqMmy_v-.mjs +72 -0
  25. package/dist/filter-utils-IZ0GtuPo.d.mts +40 -0
  26. package/dist/forms.d.mts +1549 -0
  27. package/dist/forms.mjs +3740 -0
  28. package/dist/index.d.mts +296 -0
  29. package/dist/index.mjs +432 -0
  30. package/dist/layouts.d.mts +215 -0
  31. package/dist/layouts.mjs +460 -0
  32. package/dist/search-context-DR7DBs7S.mjs +19 -0
  33. package/dist/search.d.mts +254 -0
  34. package/dist/search.mjs +523 -0
  35. package/dist/sheet-wrapper-CWNCvYMD.mjs +211 -0
  36. package/dist/use-base-search-BGgWnWaF.d.mts +35 -0
  37. package/dist/use-debounce-xmZucz5e.mjs +53 -0
  38. package/dist/use-keyboard-shortcut-Bl6YM5Q7.mjs +82 -0
  39. package/dist/use-keyboard-shortcut-_mRCh3QO.d.mts +24 -0
  40. package/dist/use-media-query-BnVNIKT4.mjs +17 -0
  41. package/dist/use-mobile-BX3SQVo2.mjs +20 -0
  42. package/dist/use-scroll-detection-CsgsQYvy.mjs +43 -0
  43. package/dist/utils-CDue7cEt.d.mts +6 -0
  44. package/dist/utils-DQ5SCVoW.mjs +10 -0
  45. package/package.json +85 -45
  46. package/styles.css +2 -2
  47. package/dist/chunk-GUHK2DTW.js +0 -15
  48. package/dist/chunk-GUHK2DTW.js.map +0 -1
  49. package/dist/chunk-H3NFL3GJ.js +0 -57
  50. package/dist/chunk-H3NFL3GJ.js.map +0 -1
  51. package/dist/chunk-J2YRTQE4.js +0 -293
  52. package/dist/chunk-J2YRTQE4.js.map +0 -1
  53. package/dist/compact.d.ts +0 -217
  54. package/dist/compact.js +0 -986
  55. package/dist/compact.js.map +0 -1
  56. package/dist/dashboard.d.ts +0 -387
  57. package/dist/dashboard.js +0 -1032
  58. package/dist/dashboard.js.map +0 -1
  59. package/dist/index.d.ts +0 -2140
  60. package/dist/index.js +0 -6422
  61. package/dist/index.js.map +0 -1
  62. package/dist/layout.d.ts +0 -25
  63. package/dist/layout.js +0 -4
  64. package/dist/layout.js.map +0 -1
  65. package/dist/search.d.ts +0 -172
  66. package/dist/search.js +0 -341
  67. package/dist/search.js.map +0 -1
  68. package/dist/use-base-search-AS5Z3SAy.d.ts +0 -64
  69. package/dist/utils-Cbsgs0XP.d.ts +0 -5
@@ -1,64 +0,0 @@
1
- /**
2
- * Filter utilities for building URL parameters
3
- * Simplified approach since backend handles all operator parsing
4
- */
5
- interface FilterConfig {
6
- paramName: string;
7
- type?: "array" | "string" | "number" | "boolean";
8
- defaultValue?: unknown;
9
- }
10
- interface SearchConfig {
11
- basePath: string;
12
- searchFields?: Record<string, string>;
13
- filterFields?: Record<string, FilterConfig>;
14
- defaultSearchType?: string;
15
- }
16
- /**
17
- * Build URL parameters from filters object
18
- */
19
- declare function buildFilterParams(filters: Record<string, unknown>, filterConfig: Record<string, FilterConfig>): URLSearchParams;
20
- /**
21
- * Build search parameters from search state
22
- */
23
- declare function buildSearchParams(searchType: string, searchValue: string, searchFields: Record<string, string>): URLSearchParams;
24
- /**
25
- * Build listing status parameters (inventory-specific)
26
- */
27
- declare function buildListingStatusParams(listingStatus: Record<string, boolean | undefined>): URLSearchParams;
28
- /**
29
- * Clear specific parameter types from URLSearchParams
30
- */
31
- declare function clearSearchAndFilterParams(params: URLSearchParams, config: SearchConfig): void;
32
- /**
33
- * Get API-ready parameters from URL
34
- */
35
- declare function getApiParams(searchParams: URLSearchParams): Record<string, string>;
36
-
37
- interface UseBaseSearchConfig {
38
- basePath: string;
39
- searchFields?: Record<string, string>;
40
- filterFields?: Record<string, FilterConfig>;
41
- defaultSearchType?: string;
42
- }
43
- interface UseBaseSearchReturn {
44
- searchType: string;
45
- setSearchType: (type: string) => void;
46
- searchValue: string;
47
- setSearchValue: (value: string) => void;
48
- filters: Record<string, unknown>;
49
- setFilters: React.Dispatch<React.SetStateAction<Record<string, unknown>>>;
50
- updateFilter: (key: string, value: unknown) => void;
51
- handleSearch: () => void;
52
- clearSearch: () => void;
53
- getSearchParams: () => Record<string, string>;
54
- hasActiveSearch: boolean;
55
- hasActiveFilters: boolean;
56
- }
57
- /**
58
- * Base search hook that provides common search functionality
59
- * Can be extended by specific search hooks for different entities
60
- * Supports bracket syntax: field[operator]=value
61
- */
62
- declare function useBaseSearch(config: UseBaseSearchConfig): UseBaseSearchReturn;
63
-
64
- export { type FilterConfig as F, type SearchConfig as S, type UseBaseSearchReturn as U, buildSearchParams as a, buildFilterParams as b, buildListingStatusParams as c, clearSearchAndFilterParams as d, type UseBaseSearchConfig as e, getApiParams as g, useBaseSearch as u };
@@ -1,5 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
-
3
- declare function cn(...inputs: ClassValue[]): string;
4
-
5
- export { cn as c };