jazz-react-auth-clerk 0.7.33-new-auth.1

Sign up to get free protection for your applications and to get access to all the features.
package/.eslintrc.cjs ADDED
@@ -0,0 +1,24 @@
1
+ module.exports = {
2
+ extends: [
3
+ "eslint:recommended",
4
+ "plugin:@typescript-eslint/recommended",
5
+ "plugin:require-extensions/recommended",
6
+ "prettier"
7
+ ],
8
+ parser: "@typescript-eslint/parser",
9
+ plugins: ["@typescript-eslint", "require-extensions"],
10
+ parserOptions: {
11
+ project: "./tsconfig.json",
12
+ tsconfigRootDir: __dirname,
13
+ },
14
+ ignorePatterns: [".eslint.cjs"],
15
+ root: true,
16
+ rules: {
17
+ "no-unused-vars": "off",
18
+ "@typescript-eslint/no-unused-vars": [
19
+ "error",
20
+ { argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
21
+ ],
22
+ "@typescript-eslint/no-floating-promises": "error",
23
+ },
24
+ }
package/.prettierrc.js ADDED
@@ -0,0 +1,9 @@
1
+ /** @type {import("prettier").Config} */
2
+ const config = {
3
+ trailingComma: "all",
4
+ tabWidth: 4,
5
+ semi: true,
6
+ singleQuote: false,
7
+ };
8
+
9
+ export default config;
@@ -0,0 +1,8 @@
1
+
2
+ > jazz-react-auth-clerk@0.7.33-new-auth.0 build /Users/anselm/jazz/jazz/packages/jazz-react-auth-clerk
3
+ > npm run lint && rm -rf ./dist && tsc --sourceMap --outDir dist
4
+
5
+
6
+ > jazz-react-auth-clerk@0.7.33-new-auth.0 lint
7
+ > eslint . --ext ts,tsx
8
+
package/CHANGELOG.md ADDED
@@ -0,0 +1,672 @@
1
+ # jazz-browser-media-images
2
+
3
+ ## 0.7.33-new-auth.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - jazz-react@0.7.35-new-auth.1
9
+
10
+ ## 0.7.33-new-auth.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Implement Clerk auth method + example
15
+ - Updated dependencies
16
+ - jazz-react@0.7.35-new-auth.0
17
+ - jazz-tools@0.7.35-new-auth.0
18
+ - jazz-browser-auth-clerk@0.7.33-new-auth.0
19
+
20
+ ## 0.7.32
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+ - jazz-tools@0.7.32
26
+ - jazz-browser@0.7.32
27
+
28
+ ## 0.7.31
29
+
30
+ ### Patch Changes
31
+
32
+ - jazz-browser@0.7.31
33
+ - jazz-tools@0.7.31
34
+
35
+ ## 0.7.30
36
+
37
+ ### Patch Changes
38
+
39
+ - jazz-browser@0.7.30
40
+
41
+ ## 0.7.29
42
+
43
+ ### Patch Changes
44
+
45
+ - jazz-browser@0.7.29
46
+ - jazz-tools@0.7.29
47
+
48
+ ## 0.7.28
49
+
50
+ ### Patch Changes
51
+
52
+ - jazz-browser@0.7.28
53
+ - jazz-tools@0.7.28
54
+
55
+ ## 0.7.27
56
+
57
+ ### Patch Changes
58
+
59
+ - jazz-browser@0.7.27
60
+
61
+ ## 0.7.26
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies
66
+ - jazz-browser@0.7.26
67
+ - jazz-tools@0.7.26
68
+
69
+ ## 0.7.25
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies
74
+ - jazz-tools@0.7.25
75
+ - jazz-browser@0.7.25
76
+
77
+ ## 0.7.24
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies
82
+ - jazz-tools@0.7.24
83
+ - jazz-browser@0.7.24
84
+
85
+ ## 0.7.23
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies
90
+ - jazz-tools@0.7.23
91
+ - jazz-browser@0.7.23
92
+
93
+ ## 0.7.22
94
+
95
+ ### Patch Changes
96
+
97
+ - jazz-browser@0.7.22
98
+
99
+ ## 0.7.21
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies
104
+ - jazz-tools@0.7.21
105
+ - jazz-browser@0.7.21
106
+
107
+ ## 0.7.20
108
+
109
+ ### Patch Changes
110
+
111
+ - Updated dependencies
112
+ - jazz-tools@0.7.20
113
+ - jazz-browser@0.7.20
114
+
115
+ ## 0.7.19
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies
120
+ - jazz-tools@0.7.19
121
+ - jazz-browser@0.7.19
122
+
123
+ ## 0.7.18
124
+
125
+ ### Patch Changes
126
+
127
+ - jazz-browser@0.7.18
128
+ - jazz-tools@0.7.18
129
+
130
+ ## 0.7.17
131
+
132
+ ### Patch Changes
133
+
134
+ - jazz-browser@0.7.17
135
+ - jazz-tools@0.7.17
136
+
137
+ ## 0.7.16
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies
142
+ - jazz-tools@0.7.16
143
+ - jazz-browser@0.7.16
144
+
145
+ ## 0.7.14
146
+
147
+ ### Patch Changes
148
+
149
+ - Updated dependencies
150
+ - jazz-tools@0.7.14
151
+ - jazz-browser@0.7.14
152
+
153
+ ## 0.7.13
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies
158
+ - jazz-tools@0.7.13
159
+ - jazz-browser@0.7.13
160
+
161
+ ## 0.7.12
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies
166
+ - jazz-tools@0.7.12
167
+ - jazz-browser@0.7.12
168
+
169
+ ## 0.7.11
170
+
171
+ ### Patch Changes
172
+
173
+ - jazz-browser@0.7.11
174
+ - jazz-tools@0.7.11
175
+
176
+ ## 0.7.10
177
+
178
+ ### Patch Changes
179
+
180
+ - jazz-browser@0.7.10
181
+ - jazz-tools@0.7.10
182
+
183
+ ## 0.7.9
184
+
185
+ ### Patch Changes
186
+
187
+ - jazz-browser@0.7.9
188
+ - jazz-tools@0.7.9
189
+
190
+ ## 0.7.8
191
+
192
+ ### Patch Changes
193
+
194
+ - Updated dependencies
195
+ - jazz-tools@0.7.8
196
+ - jazz-browser@0.7.8
197
+
198
+ ## 0.7.6
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies
203
+ - jazz-tools@0.7.6
204
+ - jazz-browser@0.7.6
205
+
206
+ ## 0.7.5
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies
211
+ - jazz-browser@0.7.5
212
+
213
+ ## 0.7.3
214
+
215
+ ### Patch Changes
216
+
217
+ - Updated dependencies
218
+ - jazz-tools@0.7.3
219
+ - jazz-browser@0.7.3
220
+
221
+ ## 0.7.1
222
+
223
+ ### Patch Changes
224
+
225
+ - Updated dependencies
226
+ - jazz-tools@0.7.1
227
+ - jazz-browser@0.7.1
228
+
229
+ ## 0.7.0
230
+
231
+ ### Minor Changes
232
+
233
+ - e299c3e: New simplified API
234
+
235
+ ### Patch Changes
236
+
237
+ - 59c18c3: CoMap fix
238
+ - c4151fc: Support stricter TS lint rules
239
+ - 952982e: Consistent proxy based API
240
+ - d2e03ff: Fix variance of ID.\_\_type
241
+ - 354bdcd: Even friendlier for subclassing CoMap
242
+ - 69ac514: Use effect schema much less
243
+ - f0f6f1b: Clean up API more & re-add jazz-nodejs
244
+ - 1a44f87: Refactoring
245
+ - 627d895: Get rid of Co namespace
246
+ - 85d2b62: More subclass-friendly types in CoMap
247
+ - Updated dependencies [8636319]
248
+ - Updated dependencies [1a35307]
249
+ - Updated dependencies [8636319]
250
+ - Updated dependencies [1a35307]
251
+ - Updated dependencies [96c494f]
252
+ - Updated dependencies [59c18c3]
253
+ - Updated dependencies [19f52b7]
254
+ - Updated dependencies [8636319]
255
+ - Updated dependencies [d8fe2b1]
256
+ - Updated dependencies [19004b4]
257
+ - Updated dependencies [a78f168]
258
+ - Updated dependencies [52675c9]
259
+ - Updated dependencies [129e2c1]
260
+ - Updated dependencies [1cfa279]
261
+ - Updated dependencies [704af7d]
262
+ - Updated dependencies [460478f]
263
+ - Updated dependencies [6b0418f]
264
+ - Updated dependencies [e299c3e]
265
+ - Updated dependencies [ed5643a]
266
+ - Updated dependencies [bde684f]
267
+ - Updated dependencies [c4151fc]
268
+ - Updated dependencies [63374cc]
269
+ - Updated dependencies [01ac646]
270
+ - Updated dependencies [a5e68a4]
271
+ - Updated dependencies [daee49c]
272
+ - Updated dependencies [952982e]
273
+ - Updated dependencies [1a35307]
274
+ - Updated dependencies [5fa277c]
275
+ - Updated dependencies [60d5ca2]
276
+ - Updated dependencies [21771c4]
277
+ - Updated dependencies [77c2b56]
278
+ - Updated dependencies [63374cc]
279
+ - Updated dependencies [d2e03ff]
280
+ - Updated dependencies [354bdcd]
281
+ - Updated dependencies [60d5ca2]
282
+ - Updated dependencies [69ac514]
283
+ - Updated dependencies [f8a5c46]
284
+ - Updated dependencies [f0f6f1b]
285
+ - Updated dependencies [e5eed5b]
286
+ - Updated dependencies [1a44f87]
287
+ - Updated dependencies [627d895]
288
+ - Updated dependencies [1200aae]
289
+ - Updated dependencies [63374cc]
290
+ - Updated dependencies [ece35b3]
291
+ - Updated dependencies [38d4410]
292
+ - Updated dependencies [85d2b62]
293
+ - Updated dependencies [fd86c11]
294
+ - Updated dependencies [52675c9]
295
+ - jazz-tools@0.7.0
296
+ - jazz-browser@0.7.0
297
+
298
+ ## 0.7.0-alpha.40
299
+
300
+ ### Patch Changes
301
+
302
+ - Updated dependencies
303
+ - jazz-tools@0.7.0-alpha.42
304
+ - jazz-browser@0.7.0-alpha.42
305
+
306
+ ## 0.7.0-alpha.39
307
+
308
+ ### Patch Changes
309
+
310
+ - jazz-tools@0.7.0-alpha.41
311
+ - jazz-browser@0.7.0-alpha.41
312
+
313
+ ## 0.7.0-alpha.38
314
+
315
+ ### Patch Changes
316
+
317
+ - jazz-browser@0.7.0-alpha.39
318
+ - jazz-tools@0.7.0-alpha.39
319
+
320
+ ## 0.7.0-alpha.37
321
+
322
+ ### Patch Changes
323
+
324
+ - Updated dependencies
325
+ - Updated dependencies
326
+ - Updated dependencies
327
+ - jazz-tools@0.7.0-alpha.38
328
+ - jazz-browser@0.7.0-alpha.38
329
+
330
+ ## 0.7.0-alpha.36
331
+
332
+ ### Patch Changes
333
+
334
+ - Updated dependencies
335
+ - jazz-browser@0.7.0-alpha.37
336
+ - jazz-tools@0.7.0-alpha.37
337
+
338
+ ## 0.7.0-alpha.35
339
+
340
+ ### Patch Changes
341
+
342
+ - Updated dependencies [1a35307]
343
+ - Updated dependencies [1a35307]
344
+ - Updated dependencies [6b0418f]
345
+ - Updated dependencies [1a35307]
346
+ - jazz-browser@0.7.0-alpha.36
347
+ - jazz-tools@0.7.0-alpha.36
348
+
349
+ ## 0.7.0-alpha.34
350
+
351
+ ### Patch Changes
352
+
353
+ - Updated dependencies
354
+ - jazz-tools@0.7.0-alpha.35
355
+ - jazz-browser@0.7.0-alpha.35
356
+
357
+ ## 0.7.0-alpha.33
358
+
359
+ ### Patch Changes
360
+
361
+ - Updated dependencies
362
+ - jazz-tools@0.7.0-alpha.34
363
+ - jazz-browser@0.7.0-alpha.34
364
+
365
+ ## 0.7.0-alpha.32
366
+
367
+ ### Patch Changes
368
+
369
+ - Updated dependencies
370
+ - Updated dependencies
371
+ - jazz-tools@0.7.0-alpha.32
372
+ - jazz-browser@0.7.0-alpha.32
373
+
374
+ ## 0.7.0-alpha.31
375
+
376
+ ### Patch Changes
377
+
378
+ - Updated dependencies
379
+ - jazz-tools@0.7.0-alpha.31
380
+ - jazz-browser@0.7.0-alpha.31
381
+
382
+ ## 0.7.0-alpha.30
383
+
384
+ ### Patch Changes
385
+
386
+ - Updated dependencies
387
+ - jazz-tools@0.7.0-alpha.30
388
+ - jazz-browser@0.7.0-alpha.30
389
+
390
+ ## 0.7.0-alpha.29
391
+
392
+ ### Patch Changes
393
+
394
+ - Updated dependencies
395
+ - jazz-tools@0.7.0-alpha.29
396
+ - jazz-browser@0.7.0-alpha.29
397
+
398
+ ## 0.7.0-alpha.28
399
+
400
+ ### Patch Changes
401
+
402
+ - Updated dependencies
403
+ - jazz-tools@0.7.0-alpha.28
404
+ - jazz-browser@0.7.0-alpha.28
405
+
406
+ ## 0.7.0-alpha.27
407
+
408
+ ### Patch Changes
409
+
410
+ - Updated dependencies
411
+ - Updated dependencies
412
+ - jazz-tools@0.7.0-alpha.27
413
+ - jazz-browser@0.7.0-alpha.27
414
+
415
+ ## 0.7.0-alpha.26
416
+
417
+ ### Patch Changes
418
+
419
+ - Updated dependencies
420
+ - jazz-tools@0.7.0-alpha.26
421
+ - jazz-browser@0.7.0-alpha.26
422
+
423
+ ## 0.7.0-alpha.25
424
+
425
+ ### Patch Changes
426
+
427
+ - Updated dependencies
428
+ - jazz-tools@0.7.0-alpha.25
429
+ - jazz-browser@0.7.0-alpha.25
430
+
431
+ ## 0.7.0-alpha.24
432
+
433
+ ### Patch Changes
434
+
435
+ - Updated dependencies
436
+ - Updated dependencies
437
+ - Updated dependencies
438
+ - jazz-tools@0.7.0-alpha.24
439
+ - jazz-browser@0.7.0-alpha.24
440
+
441
+ ## 0.7.0-alpha.23
442
+
443
+ ### Patch Changes
444
+
445
+ - Updated dependencies
446
+ - jazz-tools@0.7.0-alpha.23
447
+ - jazz-browser@0.7.0-alpha.23
448
+
449
+ ## 0.7.0-alpha.22
450
+
451
+ ### Patch Changes
452
+
453
+ - Updated dependencies
454
+ - jazz-tools@0.7.0-alpha.22
455
+ - jazz-browser@0.7.0-alpha.22
456
+
457
+ ## 0.7.0-alpha.21
458
+
459
+ ### Patch Changes
460
+
461
+ - Updated dependencies
462
+ - jazz-tools@0.7.0-alpha.21
463
+ - jazz-browser@0.7.0-alpha.21
464
+
465
+ ## 0.7.0-alpha.20
466
+
467
+ ### Patch Changes
468
+
469
+ - Updated dependencies
470
+ - jazz-tools@0.7.0-alpha.20
471
+ - jazz-browser@0.7.0-alpha.20
472
+
473
+ ## 0.7.0-alpha.19
474
+
475
+ ### Patch Changes
476
+
477
+ - Updated dependencies
478
+ - jazz-tools@0.7.0-alpha.19
479
+ - jazz-browser@0.7.0-alpha.19
480
+
481
+ ## 0.7.0-alpha.18
482
+
483
+ ### Patch Changes
484
+
485
+ - Updated dependencies
486
+ - jazz-browser@0.7.0-alpha.18
487
+
488
+ ## 0.7.0-alpha.17
489
+
490
+ ### Patch Changes
491
+
492
+ - Updated dependencies
493
+ - jazz-tools@0.7.0-alpha.17
494
+ - jazz-browser@0.7.0-alpha.17
495
+
496
+ ## 0.7.0-alpha.16
497
+
498
+ ### Patch Changes
499
+
500
+ - Updated dependencies
501
+ - jazz-tools@0.7.0-alpha.16
502
+ - jazz-browser@0.7.0-alpha.16
503
+
504
+ ## 0.7.0-alpha.15
505
+
506
+ ### Patch Changes
507
+
508
+ - Updated dependencies
509
+ - jazz-tools@0.7.0-alpha.15
510
+ - jazz-browser@0.7.0-alpha.15
511
+
512
+ ## 0.7.0-alpha.14
513
+
514
+ ### Patch Changes
515
+
516
+ - Updated dependencies
517
+ - jazz-tools@0.7.0-alpha.14
518
+ - jazz-browser@0.7.0-alpha.14
519
+
520
+ ## 0.7.0-alpha.13
521
+
522
+ ### Patch Changes
523
+
524
+ - Updated dependencies
525
+ - jazz-tools@0.7.0-alpha.13
526
+ - jazz-browser@0.7.0-alpha.13
527
+
528
+ ## 0.7.0-alpha.12
529
+
530
+ ### Patch Changes
531
+
532
+ - Fix variance of ID.\_\_type
533
+ - Updated dependencies
534
+ - jazz-browser@0.7.0-alpha.12
535
+ - jazz-tools@0.7.0-alpha.12
536
+
537
+ ## 0.7.0-alpha.11
538
+
539
+ ### Patch Changes
540
+
541
+ - Support stricter TS lint rules
542
+ - Updated dependencies
543
+ - jazz-browser@0.7.0-alpha.11
544
+ - jazz-tools@0.7.0-alpha.11
545
+
546
+ ## 0.7.0-alpha.10
547
+
548
+ ### Patch Changes
549
+
550
+ - Clean up API more & re-add jazz-nodejs
551
+ - Updated dependencies
552
+ - jazz-browser@0.7.0-alpha.10
553
+ - jazz-tools@0.7.0-alpha.10
554
+
555
+ ## 0.7.0-alpha.9
556
+
557
+ ### Patch Changes
558
+
559
+ - Even friendlier for subclassing CoMap
560
+ - Updated dependencies
561
+ - jazz-browser@0.7.0-alpha.9
562
+ - jazz-tools@0.7.0-alpha.9
563
+
564
+ ## 0.7.0-alpha.8
565
+
566
+ ### Patch Changes
567
+
568
+ - More subclass-friendly types in CoMap
569
+ - Updated dependencies
570
+ - jazz-browser@0.7.0-alpha.8
571
+ - jazz-tools@0.7.0-alpha.8
572
+
573
+ ## 0.7.0-alpha.7
574
+
575
+ ### Patch Changes
576
+
577
+ - Consistent proxy based API
578
+ - Updated dependencies
579
+ - jazz-browser@0.7.0-alpha.7
580
+ - jazz-tools@0.7.0-alpha.7
581
+
582
+ ## 0.7.0-alpha.6
583
+
584
+ ### Patch Changes
585
+
586
+ - CoMap fix
587
+ - Updated dependencies
588
+ - jazz-browser@0.7.0-alpha.6
589
+ - jazz-tools@0.7.0-alpha.6
590
+
591
+ ## 0.7.0-alpha.5
592
+
593
+ ### Patch Changes
594
+
595
+ - Refactoring
596
+ - Updated dependencies
597
+ - jazz-browser@0.7.0-alpha.5
598
+ - jazz-tools@0.7.0-alpha.5
599
+
600
+ ## 0.7.0-alpha.4
601
+
602
+ ### Patch Changes
603
+
604
+ - Updated dependencies
605
+ - jazz-tools@0.7.0-alpha.4
606
+ - jazz-browser@0.7.0-alpha.4
607
+
608
+ ## 0.7.0-alpha.3
609
+
610
+ ### Patch Changes
611
+
612
+ - Updated dependencies
613
+ - jazz-tools@0.7.0-alpha.3
614
+ - jazz-browser@0.7.0-alpha.3
615
+
616
+ ## 0.7.0-alpha.2
617
+
618
+ ### Patch Changes
619
+
620
+ - Get rid of Co namespace
621
+ - Updated dependencies
622
+ - jazz-browser@0.7.0-alpha.2
623
+ - jazz-tools@0.7.0-alpha.2
624
+
625
+ ## 0.7.0-alpha.1
626
+
627
+ ### Patch Changes
628
+
629
+ - Use effect schema much less
630
+ - Updated dependencies
631
+ - jazz-browser@0.7.0-alpha.1
632
+ - jazz-tools@0.7.0-alpha.1
633
+
634
+ ## 0.7.0-alpha.0
635
+
636
+ ### Minor Changes
637
+
638
+ - New simplified API
639
+
640
+ ### Patch Changes
641
+
642
+ - Updated dependencies
643
+ - jazz-browser@0.7.0-alpha.0
644
+ - jazz-tools@0.7.0-alpha.0
645
+
646
+ ## 0.6.0
647
+
648
+ ### Minor Changes
649
+
650
+ - Parametrize BrowserImage for maxWidth
651
+
652
+ ## 0.5.1
653
+
654
+ ### Patch Changes
655
+
656
+ - Updated dependencies
657
+ - jazz-autosub@0.6.0
658
+ - jazz-browser@0.6.0
659
+ - cojson@0.6.0
660
+
661
+ ## 0.5.0
662
+
663
+ ### Minor Changes
664
+
665
+ - Adding a lot of performance improvements to cojson, add a stresstest for the twit example and make that run smoother in a lot of ways.
666
+
667
+ ### Patch Changes
668
+
669
+ - Updated dependencies
670
+ - jazz-autosub@0.5.0
671
+ - jazz-browser@0.5.0
672
+ - cojson@0.5.0
package/LICENSE.txt ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2024, Garden Computing, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # `jazz-browser-media-images`
2
+
3
+ This is an optional add-on for `jazz-browser` or `jazz-react` that provides support for creating `ImageDefinition`-compatible image sets from images provided as `File` or `Blob` objects.
4
+
5
+ In particular, it implements multi-resolution resizing based on `pica`.
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SignedOut, SignInButton, useClerk } from "@clerk/clerk-react";
3
+ import { BrowserClerkAuth } from "jazz-browser-auth-clerk";
4
+ import { AuthMethodCtx } from "jazz-react";
5
+ import { useState, useMemo, useContext, createContext } from "react";
6
+ export const JazzClerkAuthCtx = createContext({
7
+ errors: [],
8
+ });
9
+ export function JazzClerkAuth({ children }) {
10
+ const clerk = useClerk();
11
+ const [errors, setErrors] = useState([]);
12
+ const authMethod = useMemo(() => {
13
+ return new BrowserClerkAuth({
14
+ onError: (error) => {
15
+ void clerk.signOut();
16
+ setErrors((errors) => [...errors, error.toString()]);
17
+ },
18
+ }, clerk);
19
+ }, [clerk]);
20
+ return (_jsx(JazzClerkAuthCtx.Provider, { value: { errors }, children: _jsx(AuthMethodCtx.Provider, { value: authMethod, children: children }) }));
21
+ }
22
+ const JazzClerkBasicUI = ({ appName }) => {
23
+ const { errors } = useContext(JazzClerkAuthCtx);
24
+ const darkMode = typeof window !== "undefined"
25
+ ? window.matchMedia("(prefers-color-scheme: dark)").matches
26
+ : false;
27
+ return (_jsx(SignedOut, { children: _jsx("div", { style: {
28
+ width: "100vw",
29
+ height: "100vh",
30
+ display: "flex",
31
+ alignItems: "center",
32
+ justifyContent: "center",
33
+ ...(darkMode ? { background: "#000" } : {}),
34
+ }, children: _jsxs("div", { style: {
35
+ width: "18rem",
36
+ display: "flex",
37
+ flexDirection: "column",
38
+ gap: "2rem",
39
+ }, children: [_jsx("h1", { style: {
40
+ color: darkMode ? "#fff" : "#000",
41
+ textAlign: "center",
42
+ }, children: appName }), _jsx(SignInButton, {}), errors.map((error) => (_jsx("div", { style: { color: "red" }, children: error }, error)))] }) }) }));
43
+ };
44
+ // eslint-disable-next-line @typescript-eslint/no-namespace
45
+ (function (JazzClerkAuth) {
46
+ JazzClerkAuth.BasicUI = JazzClerkBas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-clerk",
3
+ "version": "0.7.33-new-auth.1",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "src/index.tsx",
7
+ "license": "MIT",
8
+ "dependencies": {},
9
+ "peerDependencies": {
10
+ "@clerk/clerk-react": "^4.0.0",
11
+ "react": "^18.2.0",
12
+ "cojson": "0.7.34",
13
+ "jazz-tools": "0.7.35-new-auth.0",
14
+ "jazz-react": "0.7.35-new-auth.1",
15
+ "jazz-browser-auth-clerk": "0.7.33-new-auth.0"
16
+ },
17
+ "devDependencies": {
18
+ "typescript": "^5.1.6",
19
+ "@types/react": "^18.2.19"
20
+ },
21
+ "lint-staged": {
22
+ "*.{ts,tsx}": "eslint --fix",
23
+ "*.{js,jsx,mdx,json}": "prettier --write"
24
+ },
25
+ "scripts": {
26
+ "lint": "eslint . --ext ts,tsx",
27
+ "format": "prettier --write './src/**/*.{ts,tsx}'",
28
+ "build": "npm run lint && rm -rf ./dist && tsc --sourceMap --outDir dist"
29
+ }
30
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,86 @@
1
+ import { SignedOut, SignInButton, useClerk } from "@clerk/clerk-react";
2
+ import { BrowserClerkAuth } from "jazz-browser-auth-clerk";
3
+ import { AuthMethodCtx } from "jazz-react";
4
+ import { useState, useMemo, ReactNode, useContext, createContext } from "react";
5
+
6
+ export const JazzClerkAuthCtx = createContext<{
7
+ errors: string[];
8
+ }>({
9
+ errors: [],
10
+ });
11
+
12
+ export function JazzClerkAuth({ children }: { children: ReactNode }) {
13
+ const clerk = useClerk();
14
+ const [errors, setErrors] = useState<string[]>([]);
15
+
16
+ const authMethod = useMemo(() => {
17
+ return new BrowserClerkAuth(
18
+ {
19
+ onError: (error) => {
20
+ void clerk.signOut();
21
+ setErrors((errors) => [...errors, error.toString()]);
22
+ },
23
+ },
24
+ clerk,
25
+ );
26
+ }, [clerk]);
27
+
28
+ return (
29
+ <JazzClerkAuthCtx.Provider value={{ errors }}>
30
+ <AuthMethodCtx.Provider value={authMethod}>
31
+ {children}
32
+ </AuthMethodCtx.Provider>
33
+ </JazzClerkAuthCtx.Provider>
34
+ );
35
+ }
36
+
37
+ const JazzClerkBasicUI = ({ appName }: { appName: string }) => {
38
+ const { errors } = useContext(JazzClerkAuthCtx);
39
+ const darkMode =
40
+ typeof window !== "undefined"
41
+ ? window.matchMedia("(prefers-color-scheme: dark)").matches
42
+ : false;
43
+ return (
44
+ <SignedOut>
45
+ <div
46
+ style={{
47
+ width: "100vw",
48
+ height: "100vh",
49
+ display: "flex",
50
+ alignItems: "center",
51
+ justifyContent: "center",
52
+ ...(darkMode ? { background: "#000" } : {}),
53
+ }}
54
+ >
55
+ <div
56
+ style={{
57
+ width: "18rem",
58
+ display: "flex",
59
+ flexDirection: "column",
60
+ gap: "2rem",
61
+ }}
62
+ >
63
+ <h1
64
+ style={{
65
+ color: darkMode ? "#fff" : "#000",
66
+ textAlign: "center",
67
+ }}
68
+ >
69
+ {appName}
70
+ </h1>
71
+ <SignInButton />
72
+ {errors.map((error) => (
73
+ <div key={error} style={{ color: "red" }}>
74
+ {error}
75
+ </div>
76
+ ))}
77
+ </div>
78
+ </div>
79
+ </SignedOut>
80
+ );
81
+ };
82
+
83
+ // eslint-disable-next-line @typescript-eslint/no-namespace
84
+ export namespace JazzClerkAuth {
85
+ export const BasicUI = JazzClerkBasicUI;
86
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["ESNext", "DOM"],
4
+ "module": "esnext",
5
+ "target": "ES2020",
6
+ "moduleResolution": "bundler",
7
+ "moduleDetection": "force",
8
+ "strict": true,
9
+ "skipLibCheck": true,
10
+ "jsx": "react-jsx",
11
+ "forceConsistentCasingInFileNames": true,
12
+ "noUncheckedIndexedAccess": true,
13
+ "esModuleInterop": true,
14
+ },
15
+ "include": ["./src/**/*"],
16
+ }