ecopages 0.1.101 → 0.1.103

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.
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Default View Transition CSS for EcoPages
3
+ *
4
+ * Import this file in your CSS:
5
+ * @import 'ecopages/css/view-transitions.css';
6
+ *
7
+ * Works with both @ecopages/browser-router and @ecopages/react-router.
8
+ */
9
+
10
+ /* Disable root animation to prevent full page flash during transitions */
11
+ ::view-transition-old(root),
12
+ ::view-transition-new(root) {
13
+ animation: none;
14
+ }
15
+
16
+ /* Shared element transitions animate position/size smoothly */
17
+ ::view-transition-group(*) {
18
+ animation-duration: 180ms;
19
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
20
+ }
21
+
22
+ /* Prevent transitioning elements from affecting layout of non-transitioning elements */
23
+ ::view-transition-image-pair(*) {
24
+ isolation: isolate;
25
+ }
26
+
27
+ /* Respect reduced motion preference */
28
+ @media (prefers-reduced-motion: reduce) {
29
+ ::view-transition-group(*),
30
+ ::view-transition-old(*),
31
+ ::view-transition-new(*) {
32
+ animation: none !important;
33
+ }
34
+ }
35
+
36
+ @keyframes eco-fade-out {
37
+ from {
38
+ opacity: 1;
39
+ }
40
+ to {
41
+ opacity: 0;
42
+ }
43
+ }
44
+
45
+ @keyframes eco-fade-in {
46
+ from {
47
+ opacity: 0;
48
+ }
49
+ to {
50
+ opacity: 1;
51
+ }
52
+ }
53
+
54
+ /* Slide transition for elements with view-transition-name: eco-slide */
55
+ ::view-transition-image-pair(eco-slide) {
56
+ isolation: isolate;
57
+ }
58
+
59
+ ::view-transition-old(eco-slide),
60
+ ::view-transition-new(eco-slide) {
61
+ animation-duration: 180ms;
62
+ animation-timing-function: ease-out;
63
+ mix-blend-mode: normal;
64
+ }
65
+
66
+ ::view-transition-old(eco-slide) {
67
+ animation-name: eco-slide-out;
68
+ }
69
+
70
+ ::view-transition-new(eco-slide) {
71
+ animation-name: eco-slide-in;
72
+ }
73
+
74
+ @keyframes eco-slide-out {
75
+ from {
76
+ opacity: 1;
77
+ transform: translateX(0);
78
+ }
79
+ to {
80
+ opacity: 0;
81
+ transform: translateX(-30px);
82
+ }
83
+ }
84
+
85
+ @keyframes eco-slide-in {
86
+ from {
87
+ opacity: 0;
88
+ transform: translateX(30px);
89
+ }
90
+ to {
91
+ opacity: 1;
92
+ transform: translateX(0);
93
+ }
94
+ }
95
+
96
+ /* Persistent elements should not animate */
97
+ [data-eco-persist] {
98
+ view-transition-name: none;
99
+ }
100
+
101
+ /* Declarative transition attributes */
102
+ [data-eco-transition='slide'] {
103
+ view-transition-name: eco-slide;
104
+ }
105
+ [data-eco-transition='fade'] {
106
+ view-transition-name: eco-fade;
107
+ }
108
+ [data-eco-transition='zoom'] {
109
+ view-transition-name: eco-zoom;
110
+ }
111
+ [data-eco-transition='slide-up'] {
112
+ view-transition-name: eco-slide-up;
113
+ }
114
+ [data-eco-transition='slide-down'] {
115
+ view-transition-name: eco-slide-down;
116
+ }
117
+
118
+ /* FADE */
119
+ ::view-transition-old(eco-fade) {
120
+ animation: eco-fade-out 180ms ease-out both;
121
+ }
122
+ ::view-transition-new(eco-fade) {
123
+ animation: eco-fade-in 180ms ease-out both;
124
+ }
125
+
126
+ /* ZOOM */
127
+ ::view-transition-image-pair(eco-zoom) {
128
+ isolation: isolate;
129
+ }
130
+ ::view-transition-old(eco-zoom) {
131
+ animation: eco-zoom-out 180ms ease-in both;
132
+ }
133
+ ::view-transition-new(eco-zoom) {
134
+ animation: eco-zoom-in 180ms ease-out both;
135
+ }
136
+ @keyframes eco-zoom-out {
137
+ from {
138
+ opacity: 1;
139
+ transform: scale(1);
140
+ }
141
+ to {
142
+ opacity: 0;
143
+ transform: scale(0.9);
144
+ }
145
+ }
146
+ @keyframes eco-zoom-in {
147
+ from {
148
+ opacity: 0;
149
+ transform: scale(0.9);
150
+ }
151
+ to {
152
+ opacity: 1;
153
+ transform: scale(1);
154
+ }
155
+ }
156
+
157
+ /* SLIDE UP */
158
+ ::view-transition-image-pair(eco-slide-up) {
159
+ isolation: isolate;
160
+ }
161
+ ::view-transition-old(eco-slide-up) {
162
+ animation: eco-slide-up-out 180ms ease-in both;
163
+ }
164
+ ::view-transition-new(eco-slide-up) {
165
+ animation: eco-slide-up-in 180ms ease-out both;
166
+ }
167
+ @keyframes eco-slide-up-out {
168
+ from {
169
+ opacity: 1;
170
+ transform: translateY(0);
171
+ }
172
+ to {
173
+ opacity: 0;
174
+ transform: translateY(-30px);
175
+ }
176
+ }
177
+ @keyframes eco-slide-up-in {
178
+ from {
179
+ opacity: 0;
180
+ transform: translateY(30px);
181
+ }
182
+ to {
183
+ opacity: 1;
184
+ transform: translateY(0);
185
+ }
186
+ }
187
+
188
+ /* SLIDE DOWN */
189
+ ::view-transition-image-pair(eco-slide-down) {
190
+ isolation: isolate;
191
+ }
192
+ ::view-transition-old(eco-slide-down) {
193
+ animation: eco-slide-down-out 180ms ease-in both;
194
+ }
195
+ ::view-transition-new(eco-slide-down) {
196
+ animation: eco-slide-down-in 180ms ease-out both;
197
+ }
198
+ @keyframes eco-slide-down-out {
199
+ from {
200
+ opacity: 1;
201
+ transform: translateY(0);
202
+ }
203
+ to {
204
+ opacity: 0;
205
+ transform: translateY(30px);
206
+ }
207
+ }
208
+ @keyframes eco-slide-down-in {
209
+ from {
210
+ opacity: 0;
211
+ transform: translateY(-30px);
212
+ }
213
+ to {
214
+ opacity: 1;
215
+ transform: translateY(0);
216
+ }
217
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecopages",
3
- "version": "0.1.101",
3
+ "version": "0.1.103",
4
4
  "description": "CLI utilities for Ecopages",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,6 +30,7 @@
30
30
  },
31
31
  "files": [
32
32
  "bin/",
33
+ "css/",
33
34
  "README.md"
34
35
  ],
35
36
  "dependencies": {