@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.
- package/README.md +21 -1
- package/dist/client/calendar.d.mts +1 -2
- package/dist/client/calendar.mjs +4 -4
- package/dist/client/color-picker.d.mts +94 -0
- package/dist/client/color-picker.mjs +392 -0
- package/dist/client/core.d.mts +243 -557
- package/dist/client/core.mjs +351 -1462
- package/dist/client/error.d.mts +41 -41
- package/dist/client/error.mjs +35 -35
- package/dist/client/gallery.d.mts +175 -0
- package/dist/client/gallery.mjs +546 -0
- package/dist/client/hooks.d.mts +57 -39
- package/dist/client/hooks.mjs +29 -7
- package/dist/client/spreadsheet.d.mts +30 -27
- package/dist/client/spreadsheet.mjs +80 -80
- package/dist/client/table.d.mts +66 -33
- package/dist/client/table.mjs +87 -54
- package/dist/client/theme.mjs +1 -1
- package/dist/command.d.mts +6 -4
- package/dist/command.mjs +3 -3
- package/dist/compact.d.mts +97 -95
- package/dist/compact.mjs +336 -322
- package/dist/dashboard.d.mts +614 -422
- package/dist/dashboard.mjs +1051 -762
- package/dist/{dropdown-wrapper-B86u9Fri.mjs → dropdown-wrapper-B9nRDUlz.mjs} +25 -35
- package/dist/forms.d.mts +1037 -972
- package/dist/forms.mjs +2849 -2721
- package/dist/index.d.mts +218 -152
- package/dist/index.mjs +357 -264
- package/dist/layouts.d.mts +94 -94
- package/dist/layouts.mjs +115 -110
- package/dist/phone-input-B9_XPNvv.mjs +429 -0
- package/dist/phone-input-CLH_UjQZ.d.mts +31 -0
- package/dist/{search-context-DR7DBs7S.mjs → search-context-1g3ZmOvx.mjs} +1 -1
- package/dist/search.d.mts +168 -164
- package/dist/search.mjs +305 -301
- package/dist/{sheet-wrapper-C13Y-Q6w.mjs → sheet-wrapper-B2uxookb.mjs} +1 -1
- package/dist/timeline-Bgu1mIe9.d.mts +373 -0
- package/dist/timeline-HJtWf4Op.mjs +804 -0
- package/dist/{use-base-search-BGgWnWaF.d.mts → use-base-search-DFC4QKYU.d.mts} +1 -1
- package/dist/{use-media-query-BnVNIKT4.mjs → use-media-query-ChLfFChU.mjs} +6 -7
- package/package.json +10 -2
- /package/dist/{api-pagination-CJ0vR_w6.d.mts → api-pagination-C30ser2L.d.mts} +0 -0
- /package/dist/{filter-utils-DqMmy_v-.mjs → filter-utils-BGIvtq1R.mjs} +0 -0
- /package/dist/{filter-utils-IZ0GtuPo.d.mts → filter-utils-DOFTBWm1.d.mts} +0 -0
- /package/dist/{use-debounce-xmZucz5e.mjs → use-debounce-BNoNiEon.mjs} +0 -0
- /package/dist/{use-keyboard-shortcut-Bl6YM5Q7.mjs → use-keyboard-shortcut-C_Vk-36P.mjs} +0 -0
- /package/dist/{use-keyboard-shortcut-_mRCh3QO.d.mts → use-keyboard-shortcut-Q4CSPzSI.d.mts} +0 -0
- /package/dist/{use-mobile-BX3SQVo2.mjs → use-mobile-CnEmFiQx.mjs} +0 -0
- /package/dist/{use-scroll-detection-CsgsQYvy.mjs → use-scroll-detection-BKfqkmEC.mjs} +0 -0
- /package/dist/{utils-CDue7cEt.d.mts → utils-rqvYP1by.d.mts} +0 -0
|
@@ -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.
|
|
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
|
|
91
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run build"
|
|
84
92
|
},
|
|
85
93
|
"peerDependencies": {
|
|
86
94
|
"@tanstack/react-table": ">=8.21.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|