@polymarket-developers/clob-client 1.0.7

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +78 -0
  4. package/cache/LICENSE +21 -0
  5. package/cache/README.md +62 -0
  6. package/cache/dist/declarations/src/index.d.ts +2 -0
  7. package/cache/dist/declarations/types/index.d.ts +45 -0
  8. package/cache/dist/emotion-cache.browser.cjs.default.js +1 -0
  9. package/cache/dist/emotion-cache.browser.cjs.js +471 -0
  10. package/cache/dist/emotion-cache.browser.cjs.mjs +2 -0
  11. package/cache/dist/emotion-cache.browser.development.cjs.default.js +1 -0
  12. package/cache/dist/emotion-cache.browser.development.cjs.js +616 -0
  13. package/cache/dist/emotion-cache.browser.development.cjs.mjs +2 -0
  14. package/cache/dist/emotion-cache.browser.development.esm.js +612 -0
  15. package/cache/dist/emotion-cache.browser.esm.js +467 -0
  16. package/cache/dist/emotion-cache.cjs.d.mts +3 -0
  17. package/cache/dist/emotion-cache.cjs.d.ts +3 -0
  18. package/cache/dist/emotion-cache.cjs.default.d.ts +1 -0
  19. package/cache/dist/emotion-cache.cjs.default.js +1 -0
  20. package/cache/dist/emotion-cache.cjs.js +565 -0
  21. package/cache/dist/emotion-cache.cjs.mjs +2 -0
  22. package/cache/dist/emotion-cache.development.cjs.default.js +1 -0
  23. package/cache/dist/emotion-cache.development.cjs.js +714 -0
  24. package/cache/dist/emotion-cache.development.cjs.mjs +2 -0
  25. package/cache/dist/emotion-cache.development.edge-light.cjs.default.js +1 -0
  26. package/cache/dist/emotion-cache.development.edge-light.cjs.js +621 -0
  27. package/cache/dist/emotion-cache.development.edge-light.cjs.mjs +2 -0
  28. package/cache/dist/emotion-cache.development.edge-light.esm.js +612 -0
  29. package/cache/dist/emotion-cache.development.esm.js +705 -0
  30. package/cache/dist/emotion-cache.edge-light.cjs.default.js +1 -0
  31. package/cache/dist/emotion-cache.edge-light.cjs.js +490 -0
  32. package/cache/dist/emotion-cache.edge-light.cjs.mjs +2 -0
  33. package/cache/dist/emotion-cache.edge-light.esm.js +481 -0
  34. package/cache/dist/emotion-cache.esm.js +556 -0
  35. package/cache/package.json +100 -0
  36. package/cache/src/conditions/false.js +1 -0
  37. package/cache/src/conditions/is-browser.js +1 -0
  38. package/cache/src/conditions/true.js +1 -0
  39. package/cache/src/index.d.ts +2 -0
  40. package/cache/src/index.js +257 -0
  41. package/cache/src/prefixer.js +340 -0
  42. package/cache/src/stylis-plugins.js +269 -0
  43. package/cache/src/types.js +26 -0
  44. package/cache/types/index.d.ts +45 -0
  45. package/index.d.ts +63 -0
  46. package/index.js +204 -0
  47. package/package.json +27 -0
  48. package/utils.js +15 -0
@@ -0,0 +1,2 @@
1
+ import "./emotion-cache.development.cjs.js";
2
+ export { _default as default } from "./emotion-cache.development.cjs.default.js";
@@ -0,0 +1 @@
1
+ exports._default = require("./emotion-cache.development.edge-light.cjs.js").default;
@@ -0,0 +1,621 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var sheet = require('@emotion/sheet');
6
+ var stylis = require('stylis');
7
+ var weakMemoize = require('@emotion/weak-memoize');
8
+ var memoize = require('@emotion/memoize');
9
+
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
11
+
12
+ var weakMemoize__default = /*#__PURE__*/_interopDefault(weakMemoize);
13
+ var memoize__default = /*#__PURE__*/_interopDefault(memoize);
14
+
15
+ var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
16
+ var previous = 0;
17
+ var character = 0;
18
+
19
+ while (true) {
20
+ previous = character;
21
+ character = stylis.peek(); // &\f
22
+
23
+ if (previous === 38 && character === 12) {
24
+ points[index] = 1;
25
+ }
26
+
27
+ if (stylis.token(character)) {
28
+ break;
29
+ }
30
+
31
+ stylis.next();
32
+ }
33
+
34
+ return stylis.slice(begin, stylis.position);
35
+ };
36
+
37
+ var toRules = function toRules(parsed, points) {
38
+ // pretend we've started with a comma
39
+ var index = -1;
40
+ var character = 44;
41
+
42
+ do {
43
+ switch (stylis.token(character)) {
44
+ case 0:
45
+ // &\f
46
+ if (character === 38 && stylis.peek() === 12) {
47
+ // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
48
+ // stylis inserts \f after & to know when & where it should replace this sequence with the context selector
49
+ // and when it should just concatenate the outer and inner selectors
50
+ // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
51
+ points[index] = 1;
52
+ }
53
+
54
+ parsed[index] += identifierWithPointTracking(stylis.position - 1, points, index);
55
+ break;
56
+
57
+ case 2:
58
+ parsed[index] += stylis.delimit(character);
59
+ break;
60
+
61
+ case 4:
62
+ // comma
63
+ if (character === 44) {
64
+ // colon
65
+ parsed[++index] = stylis.peek() === 58 ? '&\f' : '';
66
+ points[index] = parsed[index].length;
67
+ break;
68
+ }
69
+
70
+ // fallthrough
71
+
72
+ default:
73
+ parsed[index] += stylis.from(character);
74
+ }
75
+ } while (character = stylis.next());
76
+
77
+ return parsed;
78
+ };
79
+
80
+ var getRules = function getRules(value, points) {
81
+ return stylis.dealloc(toRules(stylis.alloc(value), points));
82
+ }; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
83
+
84
+
85
+ var fixedElements = /* #__PURE__ */new WeakMap();
86
+ var compat = function compat(element) {
87
+ if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
88
+ // negative .length indicates that this rule has been already prefixed
89
+ element.length < 1) {
90
+ return;
91
+ }
92
+
93
+ var value = element.value,
94
+ parent = element.parent;
95
+ var isImplicitRule = element.column === parent.column && element.line === parent.line;
96
+
97
+ while (parent.type !== 'rule') {
98
+ parent = parent.parent;
99
+ if (!parent) return;
100
+ } // short-circuit for the simplest case
101
+
102
+
103
+ if (element.props.length === 1 && value.charCodeAt(0) !== 58
104
+ /* colon */
105
+ && !fixedElements.get(parent)) {
106
+ return;
107
+ } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
108
+ // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
109
+
110
+
111
+ if (isImplicitRule) {
112
+ return;
113
+ }
114
+
115
+ fixedElements.set(element, true);
116
+ var points = [];
117
+ var rules = getRules(value, points);
118
+ var parentRules = parent.props;
119
+
120
+ for (var i = 0, k = 0; i < rules.length; i++) {
121
+ for (var j = 0; j < parentRules.length; j++, k++) {
122
+ element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
123
+ }
124
+ }
125
+ };
126
+ var removeLabel = function removeLabel(element) {
127
+ if (element.type === 'decl') {
128
+ var value = element.value;
129
+
130
+ if ( // charcode for l
131
+ value.charCodeAt(0) === 108 && // charcode for b
132
+ value.charCodeAt(2) === 98) {
133
+ // this ignores label
134
+ element["return"] = '';
135
+ element.value = '';
136
+ }
137
+ }
138
+ };
139
+ var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
140
+
141
+ var isIgnoringComment = function isIgnoringComment(element) {
142
+ return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
143
+ };
144
+
145
+ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
146
+ return function (element, index, children) {
147
+ if (element.type !== 'rule' || cache.compat) return;
148
+ var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
149
+
150
+ if (unsafePseudoClasses) {
151
+ var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
152
+ //
153
+ // considering this input:
154
+ // .a {
155
+ // .b /* comm */ {}
156
+ // color: hotpink;
157
+ // }
158
+ // we get output corresponding to this:
159
+ // .a {
160
+ // & {
161
+ // /* comm */
162
+ // color: hotpink;
163
+ // }
164
+ // .b {}
165
+ // }
166
+
167
+ var commentContainer = isNested ? element.parent.children : // global rule at the root level
168
+ children;
169
+
170
+ for (var i = commentContainer.length - 1; i >= 0; i--) {
171
+ var node = commentContainer[i];
172
+
173
+ if (node.line < element.line) {
174
+ break;
175
+ } // it is quite weird but comments are *usually* put at `column: element.column - 1`
176
+ // so we seek *from the end* for the node that is earlier than the rule's `element` and check that
177
+ // this will also match inputs like this:
178
+ // .a {
179
+ // /* comm */
180
+ // .b {}
181
+ // }
182
+ //
183
+ // but that is fine
184
+ //
185
+ // it would be the easiest to change the placement of the comment to be the first child of the rule:
186
+ // .a {
187
+ // .b { /* comm */ }
188
+ // }
189
+ // with such inputs we wouldn't have to search for the comment at all
190
+ // TODO: consider changing this comment placement in the next major version
191
+
192
+
193
+ if (node.column < element.column) {
194
+ if (isIgnoringComment(node)) {
195
+ return;
196
+ }
197
+
198
+ break;
199
+ }
200
+ }
201
+
202
+ unsafePseudoClasses.forEach(function (unsafePseudoClass) {
203
+ console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
204
+ });
205
+ }
206
+ };
207
+ };
208
+
209
+ var isImportRule = function isImportRule(element) {
210
+ return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
211
+ };
212
+
213
+ var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
214
+ for (var i = index - 1; i >= 0; i--) {
215
+ if (!isImportRule(children[i])) {
216
+ return true;
217
+ }
218
+ }
219
+
220
+ return false;
221
+ }; // use this to remove incorrect elements from further processing
222
+ // so they don't get handed to the `sheet` (or anything else)
223
+ // as that could potentially lead to additional logs which in turn could be overhelming to the user
224
+
225
+
226
+ var nullifyElement = function nullifyElement(element) {
227
+ element.type = '';
228
+ element.value = '';
229
+ element["return"] = '';
230
+ element.children = '';
231
+ element.props = '';
232
+ };
233
+
234
+ var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
235
+ if (!isImportRule(element)) {
236
+ return;
237
+ }
238
+
239
+ if (element.parent) {
240
+ console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
241
+ nullifyElement(element);
242
+ } else if (isPrependedWithRegularRules(index, children)) {
243
+ console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
244
+ nullifyElement(element);
245
+ }
246
+ };
247
+
248
+ /* eslint-disable no-fallthrough */
249
+
250
+ function prefix(value, length) {
251
+ switch (stylis.hash(value, length)) {
252
+ // color-adjust
253
+ case 5103:
254
+ return stylis.WEBKIT + 'print-' + value + value;
255
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
256
+
257
+ case 5737:
258
+ case 4201:
259
+ case 3177:
260
+ case 3433:
261
+ case 1641:
262
+ case 4457:
263
+ case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
264
+
265
+ case 5572:
266
+ case 6356:
267
+ case 5844:
268
+ case 3191:
269
+ case 6645:
270
+ case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
271
+
272
+ case 6391:
273
+ case 5879:
274
+ case 5623:
275
+ case 6135:
276
+ case 4599:
277
+ case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
278
+
279
+ case 4215:
280
+ case 6389:
281
+ case 5109:
282
+ case 5365:
283
+ case 5621:
284
+ case 3829:
285
+ return stylis.WEBKIT + value + value;
286
+ // appearance, user-select, transform, hyphens, text-size-adjust
287
+
288
+ case 5349:
289
+ case 4246:
290
+ case 4810:
291
+ case 6968:
292
+ case 2756:
293
+ return stylis.WEBKIT + value + stylis.MOZ + value + stylis.MS + value + value;
294
+ // flex, flex-direction
295
+
296
+ case 6828:
297
+ case 4268:
298
+ return stylis.WEBKIT + value + stylis.MS + value + value;
299
+ // order
300
+
301
+ case 6165:
302
+ return stylis.WEBKIT + value + stylis.MS + 'flex-' + value + value;
303
+ // align-items
304
+
305
+ case 5187:
306
+ return stylis.WEBKIT + value + stylis.replace(value, /(\w+).+(:[^]+)/, stylis.WEBKIT + 'box-$1$2' + stylis.MS + 'flex-$1$2') + value;
307
+ // align-self
308
+
309
+ case 5443:
310
+ return stylis.WEBKIT + value + stylis.MS + 'flex-item-' + stylis.replace(value, /flex-|-self/, '') + value;
311
+ // align-content
312
+
313
+ case 4675:
314
+ return stylis.WEBKIT + value + stylis.MS + 'flex-line-pack' + stylis.replace(value, /align-content|flex-|-self/, '') + value;
315
+ // flex-shrink
316
+
317
+ case 5548:
318
+ return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, 'shrink', 'negative') + value;
319
+ // flex-basis
320
+
321
+ case 5292:
322
+ return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, 'basis', 'preferred-size') + value;
323
+ // flex-grow
324
+
325
+ case 6060:
326
+ return stylis.WEBKIT + 'box-' + stylis.replace(value, '-grow', '') + stylis.WEBKIT + value + stylis.MS + stylis.replace(value, 'grow', 'positive') + value;
327
+ // transition
328
+
329
+ case 4554:
330
+ return stylis.WEBKIT + stylis.replace(value, /([^-])(transform)/g, '$1' + stylis.WEBKIT + '$2') + value;
331
+ // cursor
332
+
333
+ case 6187:
334
+ return stylis.replace(stylis.replace(stylis.replace(value, /(zoom-|grab)/, stylis.WEBKIT + '$1'), /(image-set)/, stylis.WEBKIT + '$1'), value, '') + value;
335
+ // background, background-image
336
+
337
+ case 5495:
338
+ case 3959:
339
+ return stylis.replace(value, /(image-set\([^]*)/, stylis.WEBKIT + '$1' + '$`$1');
340
+ // justify-content
341
+
342
+ case 4968:
343
+ return stylis.replace(stylis.replace(value, /(.+:)(flex-)?(.*)/, stylis.WEBKIT + 'box-pack:$3' + stylis.MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + stylis.WEBKIT + value + value;
344
+ // (margin|padding)-inline-(start|end)
345
+
346
+ case 4095:
347
+ case 3583:
348
+ case 4068:
349
+ case 2532:
350
+ return stylis.replace(value, /(.+)-inline(.+)/, stylis.WEBKIT + '$1$2') + value;
351
+ // (min|max)?(width|height|inline-size|block-size)
352
+
353
+ case 8116:
354
+ case 7059:
355
+ case 5753:
356
+ case 5535:
357
+ case 5445:
358
+ case 5701:
359
+ case 4933:
360
+ case 4677:
361
+ case 5533:
362
+ case 5789:
363
+ case 5021:
364
+ case 4765:
365
+ // stretch, max-content, min-content, fill-available
366
+ if (stylis.strlen(value) - 1 - length > 6) switch (stylis.charat(value, length + 1)) {
367
+ // (m)ax-content, (m)in-content
368
+ case 109:
369
+ // -
370
+ if (stylis.charat(value, length + 4) !== 45) break;
371
+ // (f)ill-available, (f)it-content
372
+
373
+ case 102:
374
+ return stylis.replace(value, /(.+:)(.+)-([^]+)/, '$1' + stylis.WEBKIT + '$2-$3' + '$1' + stylis.MOZ + (stylis.charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
375
+ // (s)tretch
376
+
377
+ case 115:
378
+ return ~stylis.indexof(value, 'stretch') ? prefix(stylis.replace(value, 'stretch', 'fill-available'), length) + value : value;
379
+ }
380
+ break;
381
+ // position: sticky
382
+
383
+ case 4949:
384
+ // (s)ticky?
385
+ if (stylis.charat(value, length + 1) !== 115) break;
386
+ // display: (flex|inline-flex)
387
+
388
+ case 6444:
389
+ switch (stylis.charat(value, stylis.strlen(value) - 3 - (~stylis.indexof(value, '!important') && 10))) {
390
+ // stic(k)y
391
+ case 107:
392
+ return stylis.replace(value, ':', ':' + stylis.WEBKIT) + value;
393
+ // (inline-)?fl(e)x
394
+
395
+ case 101:
396
+ return stylis.replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + stylis.WEBKIT + (stylis.charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + stylis.WEBKIT + '$2$3' + '$1' + stylis.MS + '$2box$3') + value;
397
+ }
398
+
399
+ break;
400
+ // writing-mode
401
+
402
+ case 5936:
403
+ switch (stylis.charat(value, length + 11)) {
404
+ // vertical-l(r)
405
+ case 114:
406
+ return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
407
+ // vertical-r(l)
408
+
409
+ case 108:
410
+ return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
411
+ // horizontal(-)tb
412
+
413
+ case 45:
414
+ return stylis.WEBKIT + value + stylis.MS + stylis.replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
415
+ }
416
+
417
+ return stylis.WEBKIT + value + stylis.MS + value + value;
418
+ }
419
+
420
+ return value;
421
+ }
422
+
423
+ var prefixer = function prefixer(element, index, children, callback) {
424
+ if (element.length > -1) if (!element["return"]) switch (element.type) {
425
+ case stylis.DECLARATION:
426
+ element["return"] = prefix(element.value, element.length);
427
+ break;
428
+
429
+ case stylis.KEYFRAMES:
430
+ return stylis.serialize([stylis.copy(element, {
431
+ value: stylis.replace(element.value, '@', '@' + stylis.WEBKIT)
432
+ })], callback);
433
+
434
+ case stylis.RULESET:
435
+ if (element.length) return stylis.combine(element.props, function (value) {
436
+ switch (stylis.match(value, /(::plac\w+|:read-\w+)/)) {
437
+ // :read-(only|write)
438
+ case ':read-only':
439
+ case ':read-write':
440
+ return stylis.serialize([stylis.copy(element, {
441
+ props: [stylis.replace(value, /:(read-\w+)/, ':' + stylis.MOZ + '$1')]
442
+ })], callback);
443
+ // :placeholder
444
+
445
+ case '::placeholder':
446
+ return stylis.serialize([stylis.copy(element, {
447
+ props: [stylis.replace(value, /:(plac\w+)/, ':' + stylis.WEBKIT + 'input-$1')]
448
+ }), stylis.copy(element, {
449
+ props: [stylis.replace(value, /:(plac\w+)/, ':' + stylis.MOZ + '$1')]
450
+ }), stylis.copy(element, {
451
+ props: [stylis.replace(value, /:(plac\w+)/, stylis.MS + 'input-$1')]
452
+ })], callback);
453
+ }
454
+
455
+ return '';
456
+ });
457
+ }
458
+ };
459
+
460
+ /* import type { StylisPlugin } from './types' */
461
+
462
+ /*
463
+ export type Options = {
464
+ nonce?: string,
465
+ stylisPlugins?: StylisPlugin[],
466
+ key: string,
467
+ container?: HTMLElement,
468
+ speedy?: boolean,
469
+ prepend?: boolean,
470
+ insertionPoint?: HTMLElement
471
+ }
472
+ */
473
+
474
+ var getServerStylisCache = weakMemoize__default["default"](function () {
475
+ return memoize__default["default"](function () {
476
+ var cache = {};
477
+ return function (name) {
478
+ return cache[name];
479
+ };
480
+ });
481
+ });
482
+ var defaultStylisPlugins = [prefixer];
483
+
484
+ var createCache = function
485
+ /*: EmotionCache */
486
+ createCache(options
487
+ /*: Options */
488
+ ) {
489
+ var key = options.key;
490
+
491
+ if (!key) {
492
+ throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
493
+ }
494
+
495
+ var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
496
+
497
+ {
498
+ if (/[^a-z-]/.test(key)) {
499
+ throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
500
+ }
501
+ }
502
+
503
+ var inserted = {};
504
+ var container;
505
+ /* : Node */
506
+
507
+ var nodesToHydrate = [];
508
+
509
+ var _insert;
510
+ /*: (
511
+ selector: string,
512
+ serialized: SerializedStyles,
513
+ sheet: StyleSheet,
514
+ shouldCache: boolean
515
+ ) => string | void */
516
+
517
+
518
+ var omnipresentPlugins = [compat, removeLabel];
519
+
520
+ {
521
+ omnipresentPlugins.push(createUnsafeSelectorsAlarm({
522
+ get compat() {
523
+ return cache.compat;
524
+ }
525
+
526
+ }), incorrectImportAlarm);
527
+ }
528
+
529
+ {
530
+ var _finalizingPlugins = [stylis.stringify];
531
+
532
+ var _serializer = stylis.middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
533
+
534
+ var _stylis = function _stylis(styles) {
535
+ return stylis.serialize(stylis.compile(styles), _serializer);
536
+ };
537
+
538
+ var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
539
+
540
+ var getRules = function
541
+ /*: string */
542
+ getRules(selector
543
+ /*: string */
544
+ , serialized
545
+ /*: SerializedStyles */
546
+ ) {
547
+ var name = serialized.name;
548
+
549
+ if (serverStylisCache[name] === undefined) {
550
+ serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
551
+ }
552
+
553
+ return serverStylisCache[name];
554
+ };
555
+
556
+ _insert = function
557
+ /*: string | void */
558
+ _insert(selector
559
+ /*: string */
560
+ , serialized
561
+ /*: SerializedStyles */
562
+ , sheet
563
+ /*: StyleSheet */
564
+ , shouldCache
565
+ /*: boolean */
566
+ ) {
567
+ var name = serialized.name;
568
+ var rules = getRules(selector, serialized);
569
+
570
+ if (cache.compat === undefined) {
571
+ // in regular mode, we don't set the styles on the inserted cache
572
+ // since we don't need to and that would be wasting memory
573
+ // we return them so that they are rendered in a style tag
574
+ if (shouldCache) {
575
+ cache.inserted[name] = true;
576
+ }
577
+
578
+ if (serialized.map !== undefined) {
579
+ return rules + serialized.map;
580
+ }
581
+
582
+ return rules;
583
+ } else {
584
+ // in compat mode, we put the styles on the inserted cache so
585
+ // that emotion-server can pull out the styles
586
+ // except when we don't want to cache it which was in Global but now
587
+ // is nowhere but we don't want to do a major right now
588
+ // and just in case we're going to leave the case here
589
+ // it's also not affecting client side bundle size
590
+ // so it's really not a big deal
591
+ if (shouldCache) {
592
+ cache.inserted[name] = rules;
593
+ } else {
594
+ return rules;
595
+ }
596
+ }
597
+ };
598
+ }
599
+
600
+ var cache
601
+ /*: EmotionCache */
602
+ = {
603
+ key: key,
604
+ sheet: new sheet.StyleSheet({
605
+ key: key,
606
+ container: container,
607
+ nonce: options.nonce,
608
+ speedy: options.speedy,
609
+ prepend: options.prepend,
610
+ insertionPoint: options.insertionPoint
611
+ }),
612
+ nonce: options.nonce,
613
+ inserted: inserted,
614
+ registered: {},
615
+ insert: _insert
616
+ };
617
+ cache.sheet.hydrate(nodesToHydrate);
618
+ return cache;
619
+ };
620
+
621
+ exports["default"] = createCache;
@@ -0,0 +1,2 @@
1
+ import "./emotion-cache.development.edge-light.cjs.js";
2
+ export { _default as default } from "./emotion-cache.development.edge-light.cjs.default.js";