cozy-viewer 1.1.1 → 1.1.2
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/CHANGELOG.md +6 -0
- package/babel.config.js +3 -0
- package/dist/stylesheet.css +77 -53
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.2](https://github.com/cozy/cozy-libs/compare/cozy-viewer@1.1.1...cozy-viewer@1.1.2) (2024-09-12)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **Viewer:** Css wasn't publish with hash on classes ([eb050b9](https://github.com/cozy/cozy-libs/commit/eb050b92018631e322b7c76eaceda07a835d31af))
|
|
11
|
+
|
|
6
12
|
## [1.1.1](https://github.com/cozy/cozy-libs/compare/cozy-viewer@1.1.0...cozy-viewer@1.1.1) (2024-09-12)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/babel.config.js
CHANGED
package/dist/stylesheet.css
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* imported from styles.styl */
|
|
2
2
|
|
|
3
|
-
.
|
|
4
|
-
.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
9
|
-
.
|
|
3
|
+
.styles__viewer-imageviewer___2O8pW,
|
|
4
|
+
.styles__viewer-noviewer___3HRGf,
|
|
5
|
+
.styles__viewer-audioviewer___dpxUM,
|
|
6
|
+
.styles__viewer-videoviewer___3yUQ5,
|
|
7
|
+
.styles__viewer-pdfviewer___3MJPk,
|
|
8
|
+
.styles__viewer-textviewer___1fl1c,
|
|
9
|
+
.styles__viewer-canceled___3KRBk {
|
|
10
10
|
position: relative;
|
|
11
11
|
display: flex;
|
|
12
12
|
width: 60%;
|
|
@@ -16,111 +16,135 @@
|
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
margin-top: 4rem;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
20
|
-
.
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
19
|
+
.styles__viewer-imageviewer___2O8pW h2,
|
|
20
|
+
.styles__viewer-noviewer___3HRGf h2,
|
|
21
|
+
.styles__viewer-audioviewer___dpxUM h2,
|
|
22
|
+
.styles__viewer-videoviewer___3yUQ5 h2,
|
|
23
|
+
.styles__viewer-pdfviewer___3MJPk h2,
|
|
24
|
+
.styles__viewer-textviewer___1fl1c h2,
|
|
25
|
+
.styles__viewer-canceled___3KRBk h2 {
|
|
26
26
|
max-width: 90%;
|
|
27
27
|
}
|
|
28
28
|
@media (max-width: 63.938rem) {
|
|
29
|
-
.
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
.
|
|
33
|
-
.
|
|
34
|
-
.
|
|
35
|
-
.
|
|
29
|
+
.styles__viewer-imageviewer___2O8pW,
|
|
30
|
+
.styles__viewer-noviewer___3HRGf,
|
|
31
|
+
.styles__viewer-audioviewer___dpxUM,
|
|
32
|
+
.styles__viewer-videoviewer___3yUQ5,
|
|
33
|
+
.styles__viewer-pdfviewer___3MJPk,
|
|
34
|
+
.styles__viewer-textviewer___1fl1c,
|
|
35
|
+
.styles__viewer-canceled___3KRBk {
|
|
36
36
|
margin-left: 0;
|
|
37
37
|
width: 100%;
|
|
38
38
|
max-height: calc(100% - 6.5rem);
|
|
39
39
|
margin-top: -0.5rem;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.styles__viewer-videoviewer___3yUQ5 video {
|
|
43
43
|
width: 100%;
|
|
44
44
|
max-width: 31.25rem;
|
|
45
45
|
height: auto;
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.styles__viewer-textviewer___1fl1c .styles__viewer-textviewer-content___30dhP {
|
|
48
48
|
white-space: pre-line;
|
|
49
49
|
width: 100%;
|
|
50
50
|
max-height: 70%;
|
|
51
51
|
overflow: auto;
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.styles__viewer-textviewer___1fl1c a {
|
|
54
54
|
color: var(--azure);
|
|
55
55
|
}
|
|
56
56
|
@media (max-width: 63.938rem) {
|
|
57
|
-
.
|
|
57
|
+
.styles__viewer-textviewer___1fl1c {
|
|
58
58
|
width: 90%;
|
|
59
59
|
margin-left: 5%;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.styles__viewer-filename___1-DIz {
|
|
63
63
|
max-width: 90%;
|
|
64
64
|
text-overflow: ellipsis;
|
|
65
65
|
overflow: hidden;
|
|
66
66
|
}
|
|
67
|
-
.
|
|
67
|
+
.styles__viewer-pdfviewer-pdf___3R4jL {
|
|
68
68
|
overflow: auto;
|
|
69
69
|
width: 100%;
|
|
70
70
|
}
|
|
71
|
-
.
|
|
71
|
+
.styles__viewer-pdfviewer-page___VvOF3 > * {
|
|
72
72
|
margin: auto;
|
|
73
73
|
}
|
|
74
|
-
.
|
|
74
|
+
.styles__viewer-pdfviewer-toolbar___2Eat3 {
|
|
75
75
|
position: absolute;
|
|
76
76
|
bottom: 2rem;
|
|
77
77
|
background: var(--charcoalGrey);
|
|
78
78
|
color: var(--white);
|
|
79
79
|
border-radius: 0.5rem;
|
|
80
80
|
}
|
|
81
|
-
.
|
|
81
|
+
.styles__viewer-imageviewer___2O8pW {
|
|
82
82
|
flex: 1 1 100%;
|
|
83
83
|
width: auto;
|
|
84
84
|
max-width: 100%;
|
|
85
85
|
}
|
|
86
|
-
.
|
|
86
|
+
.styles__viewer-imageviewer___2O8pW img {
|
|
87
87
|
display: block;
|
|
88
88
|
max-width: 100%;
|
|
89
89
|
max-height: 100%;
|
|
90
90
|
box-shadow: 0 0.375rem 1.5rem 0 rgba(0,0,0,0.5);
|
|
91
91
|
}
|
|
92
|
-
.
|
|
92
|
+
.styles__viewer-pdfMobile___ym7we {
|
|
93
93
|
width: 100%;
|
|
94
94
|
height: calc(100% - 6.5rem - var(--flagship-top-height));
|
|
95
95
|
margin-top: calc(var(--flagship-top-height, 0rem) + -0.5rem);
|
|
96
96
|
}
|
|
97
|
-
.
|
|
97
|
+
.styles__viewer-pdfMobile--image___3_zsS {
|
|
98
98
|
width: 100%;
|
|
99
99
|
}
|
|
100
100
|
/* imported from styles.styl */
|
|
101
101
|
|
|
102
|
-
.
|
|
102
|
+
.styles__ActionMenuDesktop-ActionMenu___xxTwZ a {
|
|
103
103
|
padding: 0 !important;
|
|
104
104
|
}
|
|
105
|
-
.
|
|
105
|
+
.styles__ActionMenuDesktop-ActionMenu___xxTwZ .styles__ActionMenuDesktop-ActionMenu-link-disabled___93DWz > div {
|
|
106
106
|
cursor: default;
|
|
107
107
|
}
|
|
108
|
-
.
|
|
108
|
+
.styles__ActionMenuDesktop-ActionMenu___xxTwZ .styles__ActionMenuDesktop-ActionMenu-link-disabled___93DWz > div:hover {
|
|
109
109
|
background-color: initial;
|
|
110
110
|
}
|
|
111
|
-
.
|
|
111
|
+
.styles__ActionMenuDesktop-ActionMenu___xxTwZ .styles__ActionMenuDesktop-ActionMenu-link-disabled___93DWz > div > div svg {
|
|
112
112
|
fill: var(--disabledTextColor);
|
|
113
113
|
}
|
|
114
|
-
.
|
|
114
|
+
.styles__ActionMenuDesktop-ActionMenu___xxTwZ .styles__ActionMenuDesktop-ActionMenu-link-disabled___93DWz > div > div p {
|
|
115
115
|
color: var(--disabledTextColor);
|
|
116
116
|
}
|
|
117
117
|
/* imported from styles.styl */
|
|
118
118
|
|
|
119
|
+
.styles__viewer-wrapper___OkRf5 {
|
|
120
|
+
position: absolute;
|
|
121
|
+
left: 0;
|
|
122
|
+
right: 0;
|
|
123
|
+
top: 0;
|
|
124
|
+
bottom: 0;
|
|
125
|
+
z-index: var(--zIndex-overlay);
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
background: var(--charcoalGrey);
|
|
128
|
+
color: var(--white);
|
|
129
|
+
display: flex;
|
|
130
|
+
}
|
|
131
|
+
.styles__flagship-app___2EqfW .styles__viewer-wrapper___OkRf5 {
|
|
132
|
+
padding-top: var(--flagship-top-height);
|
|
133
|
+
padding-bottom: var(--flagship-bottom-height);
|
|
134
|
+
}
|
|
135
|
+
@media (max-width: 63.938rem) {
|
|
136
|
+
.styles__viewer-wrapper___OkRf5 {
|
|
137
|
+
color: var(--primaryTextColor);
|
|
138
|
+
background: var(--paperBackgroundColor);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/* imported from styles.styl */
|
|
142
|
+
|
|
119
143
|
@media (max-width: 48rem) {
|
|
120
144
|
}
|
|
121
145
|
@media (max-width: 63.938rem) {
|
|
122
146
|
}
|
|
123
|
-
.
|
|
147
|
+
.styles__viewer-nav___3V03k {
|
|
124
148
|
position: absolute;
|
|
125
149
|
top: 4rem;
|
|
126
150
|
bottom: 0;
|
|
@@ -135,34 +159,34 @@
|
|
|
135
159
|
justify-content: center;
|
|
136
160
|
flex-direction: column;
|
|
137
161
|
}
|
|
138
|
-
.
|
|
162
|
+
.styles__viewer-nav--visible___4GLTe:hover {
|
|
139
163
|
opacity: 1;
|
|
140
164
|
transition: none;
|
|
141
165
|
}
|
|
142
|
-
.
|
|
166
|
+
.styles__viewer-nav--previous___2LsMS {
|
|
143
167
|
left: 0;
|
|
144
168
|
}
|
|
145
|
-
.
|
|
169
|
+
.styles__viewer-nav--previous___2LsMS .styles__viewer-nav-arrow___Z0ykc {
|
|
146
170
|
align-self: flex-start;
|
|
147
171
|
margin-left: 2.5rem;
|
|
148
172
|
transform: rotate(180deg);
|
|
149
173
|
}
|
|
150
|
-
.
|
|
174
|
+
.styles__viewer-nav--next___3mBHi {
|
|
151
175
|
right: 0;
|
|
152
176
|
}
|
|
153
|
-
.
|
|
177
|
+
.styles__viewer-nav--next___3mBHi .styles__viewer-nav-arrow___Z0ykc {
|
|
154
178
|
align-self: flex-end;
|
|
155
179
|
margin-right: 2.5rem;
|
|
156
180
|
}
|
|
157
181
|
@media (max-width: 63.938rem) {
|
|
158
|
-
.
|
|
182
|
+
.styles__viewer-nav___3V03k {
|
|
159
183
|
display: none;
|
|
160
184
|
}
|
|
161
185
|
}
|
|
162
|
-
.
|
|
186
|
+
.styles__viewer-nav-arrow___Z0ykc {
|
|
163
187
|
opacity: 0.7;
|
|
164
188
|
}
|
|
165
|
-
.
|
|
189
|
+
.styles__viewer-controls___2lf-z {
|
|
166
190
|
position: relative;
|
|
167
191
|
display: flex;
|
|
168
192
|
flex-direction: column;
|
|
@@ -171,17 +195,17 @@
|
|
|
171
195
|
width: 100%;
|
|
172
196
|
height: 100%;
|
|
173
197
|
}
|
|
174
|
-
.
|
|
198
|
+
.styles__viewer-controls___2lf-z.styles__--expanded___1sp4Q .styles__viewer-nav___3V03k {
|
|
175
199
|
margin-top: 0;
|
|
176
200
|
width: 40%;
|
|
177
201
|
}
|
|
178
202
|
@media (max-width: 63.938rem) {
|
|
179
|
-
.
|
|
203
|
+
.styles__viewer-controls--display-content-top___3wszk {
|
|
180
204
|
justify-content: flex-start;
|
|
181
205
|
padding-top: 4.5rem;
|
|
182
206
|
}
|
|
183
207
|
}
|
|
184
|
-
.
|
|
208
|
+
.styles__viewer-toolbar___1GLOA {
|
|
185
209
|
position: absolute;
|
|
186
210
|
top: 0;
|
|
187
211
|
z-index: var(--zIndex-modal-toolbar);
|
|
@@ -195,11 +219,11 @@
|
|
|
195
219
|
justify-content: flex-start;
|
|
196
220
|
align-items: center;
|
|
197
221
|
}
|
|
198
|
-
.
|
|
222
|
+
.styles__viewer-toolbar--hidden___Zq97m {
|
|
199
223
|
opacity: 0;
|
|
200
224
|
}
|
|
201
225
|
@media (max-width: 63.938rem) {
|
|
202
|
-
.
|
|
226
|
+
.styles__viewer-toolbar___1GLOA {
|
|
203
227
|
height: 3rem;
|
|
204
228
|
width: 100%;
|
|
205
229
|
padding: var(--flagship-top-height) 1rem 0 0;
|
|
@@ -207,7 +231,7 @@
|
|
|
207
231
|
border-bottom: 1px solid var(--dividerColor);
|
|
208
232
|
}
|
|
209
233
|
}
|
|
210
|
-
.
|
|
234
|
+
.styles__viewer-footer___iGv8J {
|
|
211
235
|
position: fixed;
|
|
212
236
|
bottom: 0;
|
|
213
237
|
z-index: var(--zIndex-modal-footer);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-viewer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Cozy-Viewer provides a component to show files in a viewer.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "rm -rf ./dist && tsc -p tsconfig-build.json && env BABEL_ENV=transpilation babel --extensions .ts,.tsx,.js,.jsx,.md,.styl,.json,.snap ./src -d ./dist --copy-files --no-copy-ignored --verbose",
|
|
17
17
|
"start": "yarn build --watch",
|
|
18
|
-
"
|
|
18
|
+
"prepublishOnly": "yarn build",
|
|
19
|
+
"test": "env NODE_ENV=test jest",
|
|
19
20
|
"lint": "cd .. && yarn eslint --ext js,jsx packages/cozy-viewer"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
@@ -59,5 +60,5 @@
|
|
|
59
60
|
"react": ">=16.12.0",
|
|
60
61
|
"react-dom": ">=16.12.0"
|
|
61
62
|
},
|
|
62
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "0a9671a836c3831f788d59d3ec7a8307ec0724da"
|
|
63
64
|
}
|