@classytic/fluid 0.4.1 → 0.5.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.
Files changed (51) hide show
  1. package/README.md +21 -1
  2. package/dist/client/calendar.d.mts +1 -2
  3. package/dist/client/calendar.mjs +4 -4
  4. package/dist/client/color-picker.d.mts +94 -0
  5. package/dist/client/color-picker.mjs +392 -0
  6. package/dist/client/core.d.mts +243 -557
  7. package/dist/client/core.mjs +351 -1462
  8. package/dist/client/error.d.mts +41 -41
  9. package/dist/client/error.mjs +35 -35
  10. package/dist/client/gallery.d.mts +175 -0
  11. package/dist/client/gallery.mjs +546 -0
  12. package/dist/client/hooks.d.mts +57 -39
  13. package/dist/client/hooks.mjs +29 -7
  14. package/dist/client/spreadsheet.d.mts +30 -27
  15. package/dist/client/spreadsheet.mjs +80 -80
  16. package/dist/client/table.d.mts +66 -33
  17. package/dist/client/table.mjs +87 -54
  18. package/dist/client/theme.mjs +1 -1
  19. package/dist/command.d.mts +6 -4
  20. package/dist/command.mjs +3 -3
  21. package/dist/compact.d.mts +97 -95
  22. package/dist/compact.mjs +336 -322
  23. package/dist/dashboard.d.mts +614 -422
  24. package/dist/dashboard.mjs +1051 -762
  25. package/dist/{dropdown-wrapper-B86u9Fri.mjs → dropdown-wrapper-B9nRDUlz.mjs} +25 -35
  26. package/dist/forms.d.mts +1037 -972
  27. package/dist/forms.mjs +2849 -2721
  28. package/dist/index.d.mts +218 -152
  29. package/dist/index.mjs +357 -264
  30. package/dist/layouts.d.mts +94 -94
  31. package/dist/layouts.mjs +115 -110
  32. package/dist/phone-input-B9_XPNvv.mjs +429 -0
  33. package/dist/phone-input-CLH_UjQZ.d.mts +31 -0
  34. package/dist/{search-context-DR7DBs7S.mjs → search-context-1g3ZmOvx.mjs} +1 -1
  35. package/dist/search.d.mts +168 -164
  36. package/dist/search.mjs +305 -301
  37. package/dist/{sheet-wrapper-C13Y-Q6w.mjs → sheet-wrapper-B2uxookb.mjs} +1 -1
  38. package/dist/timeline-Bgu1mIe9.d.mts +373 -0
  39. package/dist/timeline-HJtWf4Op.mjs +804 -0
  40. package/dist/{use-base-search-BGgWnWaF.d.mts → use-base-search-DFC4QKYU.d.mts} +1 -1
  41. package/dist/{use-media-query-BnVNIKT4.mjs → use-media-query-ChLfFChU.mjs} +6 -7
  42. package/package.json +10 -2
  43. /package/dist/{api-pagination-CJ0vR_w6.d.mts → api-pagination-C30ser2L.d.mts} +0 -0
  44. /package/dist/{filter-utils-DqMmy_v-.mjs → filter-utils-BGIvtq1R.mjs} +0 -0
  45. /package/dist/{filter-utils-IZ0GtuPo.d.mts → filter-utils-DOFTBWm1.d.mts} +0 -0
  46. /package/dist/{use-debounce-xmZucz5e.mjs → use-debounce-BNoNiEon.mjs} +0 -0
  47. /package/dist/{use-keyboard-shortcut-Bl6YM5Q7.mjs → use-keyboard-shortcut-C_Vk-36P.mjs} +0 -0
  48. /package/dist/{use-keyboard-shortcut-_mRCh3QO.d.mts → use-keyboard-shortcut-Q4CSPzSI.d.mts} +0 -0
  49. /package/dist/{use-mobile-BX3SQVo2.mjs → use-mobile-CnEmFiQx.mjs} +0 -0
  50. /package/dist/{use-scroll-detection-CsgsQYvy.mjs → use-scroll-detection-BKfqkmEC.mjs} +0 -0
  51. /package/dist/{utils-CDue7cEt.d.mts → utils-rqvYP1by.d.mts} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as FilterConfig } from "./filter-utils-IZ0GtuPo.mjs";
1
+ import { t as FilterConfig } from "./filter-utils-DOFTBWm1.mjs";
2
2
 
3
3
  //#region src/hooks/use-base-search.d.ts
4
4
  interface UseBaseSearchConfig {
@@ -1,15 +1,14 @@
1
- import { useSyncExternalStore } from "react";
1
+ import { useCallback, useSyncExternalStore } from "react";
2
2
 
3
3
  //#region src/hooks/use-media-query.ts
4
4
  function useMediaQuery(query, defaultValue = false) {
5
+ const subscribe = useCallback((onStoreChange) => {
6
+ const media = window.matchMedia(query);
7
+ media.addEventListener("change", onStoreChange);
8
+ return () => media.removeEventListener("change", onStoreChange);
9
+ }, [query]);
5
10
  const getSnapshot = () => window.matchMedia(query).matches;
6
11
  const getServerSnapshot = () => defaultValue;
7
- const subscribe = (onStoreChange) => {
8
- const media = window.matchMedia(query);
9
- const handler = () => onStoreChange();
10
- media.addEventListener("change", handler);
11
- return () => media.removeEventListener("change", handler);
12
- };
13
12
  return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
14
13
  }
15
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classytic/fluid",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Fluid UI - Custom components built on shadcn/ui and base ui by Classytic",
6
6
  "main": "./dist/index.mjs",
@@ -39,6 +39,14 @@
39
39
  "types": "./dist/client/spreadsheet.d.mts",
40
40
  "default": "./dist/client/spreadsheet.mjs"
41
41
  },
42
+ "./client/color-picker": {
43
+ "types": "./dist/client/color-picker.d.mts",
44
+ "default": "./dist/client/color-picker.mjs"
45
+ },
46
+ "./client/gallery": {
47
+ "types": "./dist/client/gallery.d.mts",
48
+ "default": "./dist/client/gallery.mjs"
49
+ },
42
50
  "./forms": {
43
51
  "types": "./dist/forms.d.mts",
44
52
  "default": "./dist/forms.mjs"
@@ -80,7 +88,7 @@
80
88
  "typecheck": "tsc --noEmit",
81
89
  "lint": "tsc --noEmit",
82
90
  "clean": "rimraf dist",
83
- "prepublishOnly": "npm run typecheck && npm test && npm run clean && npm run build"
91
+ "prepublishOnly": "npm run typecheck && npm test && npm run build"
84
92
  },
85
93
  "peerDependencies": {
86
94
  "@tanstack/react-table": ">=8.21.0",