@1kbirds/chidori-mock-gmail 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/README.md +85 -0
- package/dist/api.d.ts +14 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +139 -0
- package/dist/client.d.ts +228 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +50 -0
- package/dist/errors.d.ts +19 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +25 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/seed.d.ts +6 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +127 -0
- package/dist/service.d.ts +41 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +372 -0
- package/dist/state.d.ts +22 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +139 -0
- package/dist/types.d.ts +123 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/ui/GmailMockApp.d.ts +7 -0
- package/dist/ui/GmailMockApp.d.ts.map +1 -0
- package/dist/ui/GmailMockApp.js +93 -0
- package/dist/ui/dev.d.ts +2 -0
- package/dist/ui/dev.d.ts.map +1 -0
- package/dist/ui/dev.js +11 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/styles.css +340 -0
- package/package.json +56 -0
- package/src/__tests__/service.test.ts +120 -0
- package/src/api.ts +157 -0
- package/src/client.ts +54 -0
- package/src/errors.ts +29 -0
- package/src/index.ts +12 -0
- package/src/seed.ts +143 -0
- package/src/service.ts +405 -0
- package/src/state.ts +159 -0
- package/src/types.ts +149 -0
- package/src/ui/GmailMockApp.tsx +236 -0
- package/src/ui/dev.tsx +16 -0
- package/src/ui/index.ts +2 -0
- package/src/ui/styles.css +340 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
margin: 0;
|
|
7
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
8
|
+
color: #202124;
|
|
9
|
+
background: #f6f8fc;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
button,
|
|
13
|
+
input,
|
|
14
|
+
textarea {
|
|
15
|
+
font: inherit;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.gmail-shell {
|
|
19
|
+
min-height: 100vh;
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: 248px 1fr;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.gmail-sidebar {
|
|
25
|
+
padding: 18px 14px;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 18px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.gmail-brand {
|
|
32
|
+
font-size: 23px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
padding-left: 8px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.gmail-compose {
|
|
38
|
+
width: fit-content;
|
|
39
|
+
border: 0;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
padding: 13px 20px;
|
|
42
|
+
background: #c2e7ff;
|
|
43
|
+
color: #001d35;
|
|
44
|
+
box-shadow: 0 1px 2px rgb(60 64 67 / 30%);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.gmail-sidebar nav,
|
|
49
|
+
.gmail-labels {
|
|
50
|
+
display: grid;
|
|
51
|
+
gap: 3px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.gmail-sidebar nav button,
|
|
55
|
+
.gmail-labels button {
|
|
56
|
+
border: 0;
|
|
57
|
+
border-radius: 0 18px 18px 0;
|
|
58
|
+
padding: 8px 12px;
|
|
59
|
+
background: transparent;
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
text-align: left;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.gmail-sidebar nav button.active,
|
|
67
|
+
.gmail-labels button.active {
|
|
68
|
+
background: #d3e3fd;
|
|
69
|
+
font-weight: 700;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.gmail-labels h2 {
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0 12px;
|
|
75
|
+
color: #5f6368;
|
|
76
|
+
font-size: 13px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.gmail-account {
|
|
80
|
+
margin-top: auto;
|
|
81
|
+
display: grid;
|
|
82
|
+
gap: 5px;
|
|
83
|
+
padding: 10px;
|
|
84
|
+
color: #5f6368;
|
|
85
|
+
font-size: 13px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.gmail-account strong {
|
|
89
|
+
color: #202124;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.gmail-account button,
|
|
93
|
+
.gmail-actions button,
|
|
94
|
+
.gmail-composer button {
|
|
95
|
+
border: 1px solid #dadce0;
|
|
96
|
+
background: #fff;
|
|
97
|
+
border-radius: 6px;
|
|
98
|
+
padding: 7px 10px;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.gmail-main {
|
|
103
|
+
min-width: 0;
|
|
104
|
+
display: grid;
|
|
105
|
+
grid-template-rows: auto 1fr;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.gmail-toolbar {
|
|
109
|
+
min-height: 66px;
|
|
110
|
+
display: grid;
|
|
111
|
+
grid-template-columns: minmax(260px, 680px) auto;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 18px;
|
|
114
|
+
padding: 12px 20px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.gmail-toolbar input {
|
|
118
|
+
border: 0;
|
|
119
|
+
border-radius: 8px;
|
|
120
|
+
background: #eaf1fb;
|
|
121
|
+
padding: 13px 16px;
|
|
122
|
+
outline: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.gmail-toolbar div {
|
|
126
|
+
display: grid;
|
|
127
|
+
gap: 2px;
|
|
128
|
+
justify-self: end;
|
|
129
|
+
text-align: right;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.gmail-toolbar span {
|
|
133
|
+
color: #5f6368;
|
|
134
|
+
font-size: 12px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.gmail-workspace {
|
|
138
|
+
min-height: 0;
|
|
139
|
+
display: grid;
|
|
140
|
+
grid-template-columns: minmax(280px, 420px) 1fr;
|
|
141
|
+
gap: 16px;
|
|
142
|
+
padding: 0 20px 20px 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.gmail-list,
|
|
146
|
+
.gmail-reader {
|
|
147
|
+
background: #fff;
|
|
148
|
+
border-radius: 8px;
|
|
149
|
+
border: 1px solid #e0e0e0;
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.gmail-list {
|
|
154
|
+
display: grid;
|
|
155
|
+
align-content: start;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.gmail-list button {
|
|
159
|
+
border: 0;
|
|
160
|
+
border-bottom: 1px solid #f1f3f4;
|
|
161
|
+
background: #fff;
|
|
162
|
+
padding: 12px 14px;
|
|
163
|
+
text-align: left;
|
|
164
|
+
display: grid;
|
|
165
|
+
grid-template-columns: 1fr auto;
|
|
166
|
+
gap: 3px 10px;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.gmail-list button.selected {
|
|
171
|
+
background: #eef4ff;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.gmail-list button.unread strong,
|
|
175
|
+
.gmail-list button.unread span {
|
|
176
|
+
font-weight: 800;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.gmail-list strong,
|
|
180
|
+
.gmail-list small {
|
|
181
|
+
grid-column: 1 / -1;
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
text-overflow: ellipsis;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.gmail-list small,
|
|
188
|
+
.gmail-list time {
|
|
189
|
+
color: #5f6368;
|
|
190
|
+
font-size: 12px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.gmail-reader {
|
|
194
|
+
padding: 22px;
|
|
195
|
+
overflow: auto;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.gmail-reader-head {
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: space-between;
|
|
201
|
+
gap: 18px;
|
|
202
|
+
border-bottom: 1px solid #f1f3f4;
|
|
203
|
+
padding-bottom: 16px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.gmail-reader h1 {
|
|
207
|
+
margin: 0;
|
|
208
|
+
font-size: 24px;
|
|
209
|
+
font-weight: 500;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.gmail-reader p {
|
|
213
|
+
color: #5f6368;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.gmail-actions {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-wrap: wrap;
|
|
219
|
+
align-content: start;
|
|
220
|
+
gap: 8px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.gmail-thread {
|
|
224
|
+
display: grid;
|
|
225
|
+
gap: 12px;
|
|
226
|
+
margin-top: 16px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.gmail-thread-message {
|
|
230
|
+
border: 1px solid #e0e0e0;
|
|
231
|
+
border-radius: 8px;
|
|
232
|
+
padding: 14px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.gmail-thread-message header {
|
|
236
|
+
display: flex;
|
|
237
|
+
justify-content: space-between;
|
|
238
|
+
gap: 12px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.gmail-thread-message header div {
|
|
242
|
+
display: grid;
|
|
243
|
+
gap: 2px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.gmail-thread-message span,
|
|
247
|
+
.gmail-thread-message time {
|
|
248
|
+
color: #5f6368;
|
|
249
|
+
font-size: 12px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.gmail-thread-message p {
|
|
253
|
+
color: #202124;
|
|
254
|
+
white-space: pre-wrap;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.gmail-attachments {
|
|
258
|
+
display: flex;
|
|
259
|
+
flex-wrap: wrap;
|
|
260
|
+
gap: 8px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.gmail-attachments span {
|
|
264
|
+
border: 1px solid #dadce0;
|
|
265
|
+
border-radius: 6px;
|
|
266
|
+
padding: 7px 9px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.gmail-empty {
|
|
270
|
+
display: grid;
|
|
271
|
+
min-height: 300px;
|
|
272
|
+
place-items: center;
|
|
273
|
+
color: #5f6368;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.gmail-composer {
|
|
277
|
+
position: fixed;
|
|
278
|
+
right: 24px;
|
|
279
|
+
bottom: 0;
|
|
280
|
+
width: min(560px, calc(100vw - 32px));
|
|
281
|
+
background: #fff;
|
|
282
|
+
border-radius: 8px 8px 0 0;
|
|
283
|
+
box-shadow: 0 8px 28px rgb(60 64 67 / 32%);
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
display: grid;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.gmail-composer header {
|
|
289
|
+
background: #f2f6fc;
|
|
290
|
+
padding: 10px 12px;
|
|
291
|
+
display: flex;
|
|
292
|
+
justify-content: space-between;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.gmail-composer header button {
|
|
296
|
+
border: 0;
|
|
297
|
+
background: transparent;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.gmail-composer input,
|
|
301
|
+
.gmail-composer textarea {
|
|
302
|
+
border: 0;
|
|
303
|
+
border-bottom: 1px solid #f1f3f4;
|
|
304
|
+
padding: 10px 12px;
|
|
305
|
+
outline: 0;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.gmail-composer textarea {
|
|
309
|
+
min-height: 220px;
|
|
310
|
+
resize: vertical;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.gmail-composer footer {
|
|
314
|
+
padding: 10px 12px;
|
|
315
|
+
display: flex;
|
|
316
|
+
justify-content: flex-end;
|
|
317
|
+
gap: 8px;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.gmail-composer .gmail-send {
|
|
321
|
+
background: #0b57d0;
|
|
322
|
+
color: #fff;
|
|
323
|
+
border-color: #0b57d0;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
@media (max-width: 860px) {
|
|
327
|
+
.gmail-shell,
|
|
328
|
+
.gmail-workspace {
|
|
329
|
+
grid-template-columns: 1fr;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.gmail-toolbar {
|
|
333
|
+
grid-template-columns: 1fr;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.gmail-toolbar div {
|
|
337
|
+
justify-self: start;
|
|
338
|
+
text-align: left;
|
|
339
|
+
}
|
|
340
|
+
}
|