responsive-media 1.2.4 → 1.2.6
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 +2 -2
- package/package.json +16 -8
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/>
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
|
-
Reactive boolean state from CSS media queries and element dimensions for Vanilla JS, Vue 3, and React
|
|
12
|
+
Reactive boolean state from CSS media queries and element dimensions for Vanilla JS, Vue 3, and React 19+ — AND/OR conditions, container queries, ordered breakpoint helpers, rich subscription API, CSS vars sync, SSR-safe — with no required peer dependencies.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -46,7 +46,7 @@ Reactive boolean state from CSS media queries and element dimensions for Vanilla
|
|
|
46
46
|
- **Ordered breakpoint helpers** — `current`, `isAbove()`, `isBelow()`, `between()` for semantic viewport comparisons; order derived from config key insertion or explicit `order` option
|
|
47
47
|
- **Utilities** — `syncCSSVars` (CSS custom properties), `emitDOMEvents` (DOM CustomEvents), `toSignal` (any signals library — Preact, Angular, SolidJS, Vue), `match` (pick value by first active breakpoint), `subscribeMediaQuery` (raw single query)
|
|
48
48
|
- **Vue 3 adapter** — `useResponsive`, `useBreakpoints`, `useMediaQuery`, `useContainerState`; fully reactive in templates and `computed`; `ResponsivePlugin` for global config
|
|
49
|
-
- **React
|
|
49
|
+
- **React 19+ adapter** — same four hooks; `useSyncExternalStore` for safe concurrent rendering; SSR-safe (`false` on server)
|
|
50
50
|
- **Presets** — `TailwindPreset`, `BootstrapPreset`, `AccessibilityPreset` out of the box; user-preference queries (`dark`, `reducedMotion`, `highContrast`, `print`, …)
|
|
51
51
|
- **SSR-safe** — all APIs check for `window` / `matchMedia` / `ResizeObserver` before use; `hydrate()` prevents layout shift on the client
|
|
52
52
|
- **TypeScript** — full generics; `ConfigToState<T>` infers a boolean-state type from any config object
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "responsive-media",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.2.6",
|
|
4
|
+
"description": "Reactive state from CSS media and container queries — breakpoint helpers, AND/OR conditions and CSS-var sync, SSR-safe. Vanilla JS / Vue 3 / React.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -27,8 +27,13 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
|
-
"dist"
|
|
30
|
+
"dist",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
31
33
|
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18"
|
|
36
|
+
},
|
|
32
37
|
"scripts": {
|
|
33
38
|
"build": "tsc",
|
|
34
39
|
"prepublishOnly": "npm run build",
|
|
@@ -40,20 +45,23 @@
|
|
|
40
45
|
"type": "git",
|
|
41
46
|
"url": "git+https://github.com/macrulezru/responsive-media.git"
|
|
42
47
|
},
|
|
43
|
-
"homepage": "https://
|
|
48
|
+
"homepage": "https://github.com/macrulezru/responsive-media#readme",
|
|
44
49
|
"bugs": {
|
|
45
50
|
"url": "https://github.com/macrulezru/responsive-media/issues"
|
|
46
51
|
},
|
|
47
52
|
"keywords": [
|
|
48
53
|
"responsive",
|
|
49
54
|
"media-query",
|
|
50
|
-
"
|
|
55
|
+
"container-query",
|
|
56
|
+
"breakpoints",
|
|
51
57
|
"reactive",
|
|
52
|
-
"
|
|
58
|
+
"ssr",
|
|
53
59
|
"vue",
|
|
54
|
-
"
|
|
60
|
+
"vue3",
|
|
61
|
+
"react",
|
|
62
|
+
"typescript"
|
|
55
63
|
],
|
|
56
|
-
"author": "",
|
|
64
|
+
"author": "macrulez <macrulezru@gmail.com> (https://macrulez.ru/en)",
|
|
57
65
|
"license": "MIT",
|
|
58
66
|
"devDependencies": {
|
|
59
67
|
"@types/react": "^18.3.0",
|