@cms0/shared 0.0.5 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cms0/shared",
3
- "version": "0.0.5",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -10,7 +10,8 @@
10
10
  "module": "./dist/esm/index.js",
11
11
  "types": "./dist/types/index.d.ts",
12
12
  "files": [
13
- "dist"
13
+ "dist",
14
+ "src/responsive-break.css"
14
15
  ],
15
16
  "exports": {
16
17
  ".": {
@@ -22,7 +23,8 @@
22
23
  "types": "./dist/types/*.d.ts",
23
24
  "import": "./dist/esm/*.js",
24
25
  "require": "./dist/cjs/*.js"
25
- }
26
+ },
27
+ "./responsive-break.css": "./src/responsive-break.css"
26
28
  },
27
29
  "dependencies": {
28
30
  "zod": "^4.1.12"
@@ -0,0 +1,65 @@
1
+ /*
2
+ cms0 responsive break contract:
3
+ - mode is persisted on each <br> via data-cms0-break
4
+ - default Tailwind breakpoints:
5
+ sm: 640px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px
6
+ - cms0 semantic aliases:
7
+ mobile-only: 0..<md
8
+ tablet-only: md..<lg
9
+ desktop-only: lg+
10
+ */
11
+
12
+ br[data-cms0-break="mobile-only"],
13
+ br[data-cms0-break="tablet-only"],
14
+ br[data-cms0-break="desktop-only"],
15
+ br[data-cms0-break="sm-only"],
16
+ br[data-cms0-break="md-only"],
17
+ br[data-cms0-break="lg-only"],
18
+ br[data-cms0-break="xl-only"],
19
+ br[data-cms0-break="2xl-only"] {
20
+ display: none;
21
+ }
22
+
23
+ @media (max-width: 767.98px) {
24
+ br[data-cms0-break="mobile-only"] {
25
+ display: revert;
26
+ }
27
+ }
28
+
29
+ @media (min-width: 640px) and (max-width: 767.98px) {
30
+ br[data-cms0-break="sm-only"] {
31
+ display: revert;
32
+ }
33
+ }
34
+
35
+ @media (min-width: 768px) and (max-width: 1023.98px) {
36
+ br[data-cms0-break="tablet-only"],
37
+ br[data-cms0-break="md-only"] {
38
+ display: revert;
39
+ }
40
+ }
41
+
42
+ @media (min-width: 1024px) {
43
+ br[data-cms0-break="desktop-only"],
44
+ br[data-cms0-break="lg-only"] {
45
+ display: revert;
46
+ }
47
+ }
48
+
49
+ @media (min-width: 1280px) {
50
+ br[data-cms0-break="lg-only"] {
51
+ display: none;
52
+ }
53
+ }
54
+
55
+ @media (min-width: 1280px) and (max-width: 1535.98px) {
56
+ br[data-cms0-break="xl-only"] {
57
+ display: revert;
58
+ }
59
+ }
60
+
61
+ @media (min-width: 1536px) {
62
+ br[data-cms0-break="2xl-only"] {
63
+ display: revert;
64
+ }
65
+ }