@react-hive/honey-style 1.4.2 → 1.4.3

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,2060 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ var __webpack_modules__ = ({
4
+
5
+ /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
6
+ /*!*****************************************************************!*\
7
+ !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8
+ \*****************************************************************/
9
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
+
11
+ /**
12
+ * @license React
13
+ * react-jsx-runtime.development.js
14
+ *
15
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+
21
+
22
+ true &&
23
+ (function () {
24
+ function getComponentNameFromType(type) {
25
+ if (null == type) return null;
26
+ if ("function" === typeof type)
27
+ return type.$$typeof === REACT_CLIENT_REFERENCE
28
+ ? null
29
+ : type.displayName || type.name || null;
30
+ if ("string" === typeof type) return type;
31
+ switch (type) {
32
+ case REACT_FRAGMENT_TYPE:
33
+ return "Fragment";
34
+ case REACT_PROFILER_TYPE:
35
+ return "Profiler";
36
+ case REACT_STRICT_MODE_TYPE:
37
+ return "StrictMode";
38
+ case REACT_SUSPENSE_TYPE:
39
+ return "Suspense";
40
+ case REACT_SUSPENSE_LIST_TYPE:
41
+ return "SuspenseList";
42
+ case REACT_ACTIVITY_TYPE:
43
+ return "Activity";
44
+ }
45
+ if ("object" === typeof type)
46
+ switch (
47
+ ("number" === typeof type.tag &&
48
+ console.error(
49
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
50
+ ),
51
+ type.$$typeof)
52
+ ) {
53
+ case REACT_PORTAL_TYPE:
54
+ return "Portal";
55
+ case REACT_CONTEXT_TYPE:
56
+ return (type.displayName || "Context") + ".Provider";
57
+ case REACT_CONSUMER_TYPE:
58
+ return (type._context.displayName || "Context") + ".Consumer";
59
+ case REACT_FORWARD_REF_TYPE:
60
+ var innerType = type.render;
61
+ type = type.displayName;
62
+ type ||
63
+ ((type = innerType.displayName || innerType.name || ""),
64
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
65
+ return type;
66
+ case REACT_MEMO_TYPE:
67
+ return (
68
+ (innerType = type.displayName || null),
69
+ null !== innerType
70
+ ? innerType
71
+ : getComponentNameFromType(type.type) || "Memo"
72
+ );
73
+ case REACT_LAZY_TYPE:
74
+ innerType = type._payload;
75
+ type = type._init;
76
+ try {
77
+ return getComponentNameFromType(type(innerType));
78
+ } catch (x) {}
79
+ }
80
+ return null;
81
+ }
82
+ function testStringCoercion(value) {
83
+ return "" + value;
84
+ }
85
+ function checkKeyStringCoercion(value) {
86
+ try {
87
+ testStringCoercion(value);
88
+ var JSCompiler_inline_result = !1;
89
+ } catch (e) {
90
+ JSCompiler_inline_result = !0;
91
+ }
92
+ if (JSCompiler_inline_result) {
93
+ JSCompiler_inline_result = console;
94
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
95
+ var JSCompiler_inline_result$jscomp$0 =
96
+ ("function" === typeof Symbol &&
97
+ Symbol.toStringTag &&
98
+ value[Symbol.toStringTag]) ||
99
+ value.constructor.name ||
100
+ "Object";
101
+ JSCompiler_temp_const.call(
102
+ JSCompiler_inline_result,
103
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
104
+ JSCompiler_inline_result$jscomp$0
105
+ );
106
+ return testStringCoercion(value);
107
+ }
108
+ }
109
+ function getTaskName(type) {
110
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
111
+ if (
112
+ "object" === typeof type &&
113
+ null !== type &&
114
+ type.$$typeof === REACT_LAZY_TYPE
115
+ )
116
+ return "<...>";
117
+ try {
118
+ var name = getComponentNameFromType(type);
119
+ return name ? "<" + name + ">" : "<...>";
120
+ } catch (x) {
121
+ return "<...>";
122
+ }
123
+ }
124
+ function getOwner() {
125
+ var dispatcher = ReactSharedInternals.A;
126
+ return null === dispatcher ? null : dispatcher.getOwner();
127
+ }
128
+ function UnknownOwner() {
129
+ return Error("react-stack-top-frame");
130
+ }
131
+ function hasValidKey(config) {
132
+ if (hasOwnProperty.call(config, "key")) {
133
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
134
+ if (getter && getter.isReactWarning) return !1;
135
+ }
136
+ return void 0 !== config.key;
137
+ }
138
+ function defineKeyPropWarningGetter(props, displayName) {
139
+ function warnAboutAccessingKey() {
140
+ specialPropKeyWarningShown ||
141
+ ((specialPropKeyWarningShown = !0),
142
+ console.error(
143
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
144
+ displayName
145
+ ));
146
+ }
147
+ warnAboutAccessingKey.isReactWarning = !0;
148
+ Object.defineProperty(props, "key", {
149
+ get: warnAboutAccessingKey,
150
+ configurable: !0
151
+ });
152
+ }
153
+ function elementRefGetterWithDeprecationWarning() {
154
+ var componentName = getComponentNameFromType(this.type);
155
+ didWarnAboutElementRef[componentName] ||
156
+ ((didWarnAboutElementRef[componentName] = !0),
157
+ console.error(
158
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
159
+ ));
160
+ componentName = this.props.ref;
161
+ return void 0 !== componentName ? componentName : null;
162
+ }
163
+ function ReactElement(
164
+ type,
165
+ key,
166
+ self,
167
+ source,
168
+ owner,
169
+ props,
170
+ debugStack,
171
+ debugTask
172
+ ) {
173
+ self = props.ref;
174
+ type = {
175
+ $$typeof: REACT_ELEMENT_TYPE,
176
+ type: type,
177
+ key: key,
178
+ props: props,
179
+ _owner: owner
180
+ };
181
+ null !== (void 0 !== self ? self : null)
182
+ ? Object.defineProperty(type, "ref", {
183
+ enumerable: !1,
184
+ get: elementRefGetterWithDeprecationWarning
185
+ })
186
+ : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
187
+ type._store = {};
188
+ Object.defineProperty(type._store, "validated", {
189
+ configurable: !1,
190
+ enumerable: !1,
191
+ writable: !0,
192
+ value: 0
193
+ });
194
+ Object.defineProperty(type, "_debugInfo", {
195
+ configurable: !1,
196
+ enumerable: !1,
197
+ writable: !0,
198
+ value: null
199
+ });
200
+ Object.defineProperty(type, "_debugStack", {
201
+ configurable: !1,
202
+ enumerable: !1,
203
+ writable: !0,
204
+ value: debugStack
205
+ });
206
+ Object.defineProperty(type, "_debugTask", {
207
+ configurable: !1,
208
+ enumerable: !1,
209
+ writable: !0,
210
+ value: debugTask
211
+ });
212
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
213
+ return type;
214
+ }
215
+ function jsxDEVImpl(
216
+ type,
217
+ config,
218
+ maybeKey,
219
+ isStaticChildren,
220
+ source,
221
+ self,
222
+ debugStack,
223
+ debugTask
224
+ ) {
225
+ var children = config.children;
226
+ if (void 0 !== children)
227
+ if (isStaticChildren)
228
+ if (isArrayImpl(children)) {
229
+ for (
230
+ isStaticChildren = 0;
231
+ isStaticChildren < children.length;
232
+ isStaticChildren++
233
+ )
234
+ validateChildKeys(children[isStaticChildren]);
235
+ Object.freeze && Object.freeze(children);
236
+ } else
237
+ console.error(
238
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
239
+ );
240
+ else validateChildKeys(children);
241
+ if (hasOwnProperty.call(config, "key")) {
242
+ children = getComponentNameFromType(type);
243
+ var keys = Object.keys(config).filter(function (k) {
244
+ return "key" !== k;
245
+ });
246
+ isStaticChildren =
247
+ 0 < keys.length
248
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
249
+ : "{key: someKey}";
250
+ didWarnAboutKeySpread[children + isStaticChildren] ||
251
+ ((keys =
252
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
253
+ console.error(
254
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
255
+ isStaticChildren,
256
+ children,
257
+ keys,
258
+ children
259
+ ),
260
+ (didWarnAboutKeySpread[children + isStaticChildren] = !0));
261
+ }
262
+ children = null;
263
+ void 0 !== maybeKey &&
264
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
265
+ hasValidKey(config) &&
266
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
267
+ if ("key" in config) {
268
+ maybeKey = {};
269
+ for (var propName in config)
270
+ "key" !== propName && (maybeKey[propName] = config[propName]);
271
+ } else maybeKey = config;
272
+ children &&
273
+ defineKeyPropWarningGetter(
274
+ maybeKey,
275
+ "function" === typeof type
276
+ ? type.displayName || type.name || "Unknown"
277
+ : type
278
+ );
279
+ return ReactElement(
280
+ type,
281
+ children,
282
+ self,
283
+ source,
284
+ getOwner(),
285
+ maybeKey,
286
+ debugStack,
287
+ debugTask
288
+ );
289
+ }
290
+ function validateChildKeys(node) {
291
+ "object" === typeof node &&
292
+ null !== node &&
293
+ node.$$typeof === REACT_ELEMENT_TYPE &&
294
+ node._store &&
295
+ (node._store.validated = 1);
296
+ }
297
+ var React = __webpack_require__(/*! react */ "react"),
298
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
299
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
300
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
301
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
302
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler");
303
+ Symbol.for("react.provider");
304
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
305
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
306
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
307
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
308
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
309
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
310
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
311
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
312
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
313
+ ReactSharedInternals =
314
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
315
+ hasOwnProperty = Object.prototype.hasOwnProperty,
316
+ isArrayImpl = Array.isArray,
317
+ createTask = console.createTask
318
+ ? console.createTask
319
+ : function () {
320
+ return null;
321
+ };
322
+ React = {
323
+ "react-stack-bottom-frame": function (callStackForError) {
324
+ return callStackForError();
325
+ }
326
+ };
327
+ var specialPropKeyWarningShown;
328
+ var didWarnAboutElementRef = {};
329
+ var unknownOwnerDebugStack = React["react-stack-bottom-frame"].bind(
330
+ React,
331
+ UnknownOwner
332
+ )();
333
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
334
+ var didWarnAboutKeySpread = {};
335
+ exports.Fragment = REACT_FRAGMENT_TYPE;
336
+ exports.jsx = function (type, config, maybeKey, source, self) {
337
+ var trackActualOwner =
338
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
339
+ return jsxDEVImpl(
340
+ type,
341
+ config,
342
+ maybeKey,
343
+ !1,
344
+ source,
345
+ self,
346
+ trackActualOwner
347
+ ? Error("react-stack-top-frame")
348
+ : unknownOwnerDebugStack,
349
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
350
+ );
351
+ };
352
+ exports.jsxs = function (type, config, maybeKey, source, self) {
353
+ var trackActualOwner =
354
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
355
+ return jsxDEVImpl(
356
+ type,
357
+ config,
358
+ maybeKey,
359
+ !0,
360
+ source,
361
+ self,
362
+ trackActualOwner
363
+ ? Error("react-stack-top-frame")
364
+ : unknownOwnerDebugStack,
365
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
366
+ );
367
+ };
368
+ })();
369
+
370
+
371
+ /***/ }),
372
+
373
+ /***/ "./node_modules/react/jsx-runtime.js":
374
+ /*!*******************************************!*\
375
+ !*** ./node_modules/react/jsx-runtime.js ***!
376
+ \*******************************************/
377
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
378
+
379
+
380
+
381
+ if (false) {} else {
382
+ module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
383
+ }
384
+
385
+
386
+ /***/ }),
387
+
388
+ /***/ "./node_modules/stylis/src/Enum.js":
389
+ /*!*****************************************!*\
390
+ !*** ./node_modules/stylis/src/Enum.js ***!
391
+ \*****************************************/
392
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
393
+
394
+ __webpack_require__.r(__webpack_exports__);
395
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
396
+ /* harmony export */ CHARSET: () => (/* binding */ CHARSET),
397
+ /* harmony export */ COMMENT: () => (/* binding */ COMMENT),
398
+ /* harmony export */ COUNTER_STYLE: () => (/* binding */ COUNTER_STYLE),
399
+ /* harmony export */ DECLARATION: () => (/* binding */ DECLARATION),
400
+ /* harmony export */ DOCUMENT: () => (/* binding */ DOCUMENT),
401
+ /* harmony export */ FONT_FACE: () => (/* binding */ FONT_FACE),
402
+ /* harmony export */ FONT_FEATURE_VALUES: () => (/* binding */ FONT_FEATURE_VALUES),
403
+ /* harmony export */ IMPORT: () => (/* binding */ IMPORT),
404
+ /* harmony export */ KEYFRAMES: () => (/* binding */ KEYFRAMES),
405
+ /* harmony export */ LAYER: () => (/* binding */ LAYER),
406
+ /* harmony export */ MEDIA: () => (/* binding */ MEDIA),
407
+ /* harmony export */ MOZ: () => (/* binding */ MOZ),
408
+ /* harmony export */ MS: () => (/* binding */ MS),
409
+ /* harmony export */ NAMESPACE: () => (/* binding */ NAMESPACE),
410
+ /* harmony export */ PAGE: () => (/* binding */ PAGE),
411
+ /* harmony export */ RULESET: () => (/* binding */ RULESET),
412
+ /* harmony export */ SCOPE: () => (/* binding */ SCOPE),
413
+ /* harmony export */ SUPPORTS: () => (/* binding */ SUPPORTS),
414
+ /* harmony export */ VIEWPORT: () => (/* binding */ VIEWPORT),
415
+ /* harmony export */ WEBKIT: () => (/* binding */ WEBKIT)
416
+ /* harmony export */ });
417
+ var MS = '-ms-'
418
+ var MOZ = '-moz-'
419
+ var WEBKIT = '-webkit-'
420
+
421
+ var COMMENT = 'comm'
422
+ var RULESET = 'rule'
423
+ var DECLARATION = 'decl'
424
+
425
+ var PAGE = '@page'
426
+ var MEDIA = '@media'
427
+ var IMPORT = '@import'
428
+ var CHARSET = '@charset'
429
+ var VIEWPORT = '@viewport'
430
+ var SUPPORTS = '@supports'
431
+ var DOCUMENT = '@document'
432
+ var NAMESPACE = '@namespace'
433
+ var KEYFRAMES = '@keyframes'
434
+ var FONT_FACE = '@font-face'
435
+ var COUNTER_STYLE = '@counter-style'
436
+ var FONT_FEATURE_VALUES = '@font-feature-values'
437
+ var LAYER = '@layer'
438
+ var SCOPE = '@scope'
439
+
440
+
441
+ /***/ }),
442
+
443
+ /***/ "./node_modules/stylis/src/Parser.js":
444
+ /*!*******************************************!*\
445
+ !*** ./node_modules/stylis/src/Parser.js ***!
446
+ \*******************************************/
447
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
448
+
449
+ __webpack_require__.r(__webpack_exports__);
450
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
451
+ /* harmony export */ comment: () => (/* binding */ comment),
452
+ /* harmony export */ compile: () => (/* binding */ compile),
453
+ /* harmony export */ declaration: () => (/* binding */ declaration),
454
+ /* harmony export */ parse: () => (/* binding */ parse),
455
+ /* harmony export */ ruleset: () => (/* binding */ ruleset)
456
+ /* harmony export */ });
457
+ /* harmony import */ var _Enum_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enum.js */ "./node_modules/stylis/src/Enum.js");
458
+ /* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/stylis/src/Utility.js");
459
+ /* harmony import */ var _Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tokenizer.js */ "./node_modules/stylis/src/Tokenizer.js");
460
+
461
+
462
+
463
+
464
+ /**
465
+ * @param {string} value
466
+ * @return {object[]}
467
+ */
468
+ function compile (value) {
469
+ return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.dealloc)(parse('', null, null, null, [''], value = (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.alloc)(value), 0, [0], value))
470
+ }
471
+
472
+ /**
473
+ * @param {string} value
474
+ * @param {object} root
475
+ * @param {object?} parent
476
+ * @param {string[]} rule
477
+ * @param {string[]} rules
478
+ * @param {string[]} rulesets
479
+ * @param {number[]} pseudo
480
+ * @param {number[]} points
481
+ * @param {string[]} declarations
482
+ * @return {object}
483
+ */
484
+ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
485
+ var index = 0
486
+ var offset = 0
487
+ var length = pseudo
488
+ var atrule = 0
489
+ var property = 0
490
+ var previous = 0
491
+ var variable = 1
492
+ var scanning = 1
493
+ var ampersand = 1
494
+ var character = 0
495
+ var type = ''
496
+ var props = rules
497
+ var children = rulesets
498
+ var reference = rule
499
+ var characters = type
500
+
501
+ while (scanning)
502
+ switch (previous = character, character = (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.next)()) {
503
+ // (
504
+ case 40:
505
+ if (previous != 108 && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.charat)(characters, length - 1) == 58) {
506
+ if ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.indexof)(characters += (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.delimit)(character), '&', '&\f'), '&\f', (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.abs)(index ? points[index - 1] : 0)) != -1)
507
+ ampersand = -1
508
+ break
509
+ }
510
+ // " ' [
511
+ case 34: case 39: case 91:
512
+ characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.delimit)(character)
513
+ break
514
+ // \t \n \r \s
515
+ case 9: case 10: case 13: case 32:
516
+ characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.whitespace)(previous)
517
+ break
518
+ // \
519
+ case 92:
520
+ characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.escaping)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.caret)() - 1, 7)
521
+ continue
522
+ // /
523
+ case 47:
524
+ switch ((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.peek)()) {
525
+ case 42: case 47:
526
+ ;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(comment((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.commenter)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.next)(), (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.caret)()), root, parent, declarations), declarations)
527
+ if (((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.token)(previous || 1) == 5 || (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.token)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.peek)() || 1) == 5) && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(characters, -1, void 0) !== ' ') characters += ' '
528
+ break
529
+ default:
530
+ characters += '/'
531
+ }
532
+ break
533
+ // {
534
+ case 123 * variable:
535
+ points[index++] = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) * ampersand
536
+ // } ; \0
537
+ case 125 * variable: case 59: case 0:
538
+ switch (character) {
539
+ // \0 }
540
+ case 0: case 125: scanning = 0
541
+ // ;
542
+ case 59 + offset: if (ampersand == -1) characters = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)(characters, /\f/g, '')
543
+ if (property > 0 && ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) - length || (variable === 0 && previous === 47)))
544
+ (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)
545
+ break
546
+ // @ ;
547
+ case 59: characters += ';'
548
+ // { rule/at-rule
549
+ default:
550
+ ;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)
551
+
552
+ if (character === 123)
553
+ if (offset === 0)
554
+ parse(characters, root, reference, reference, props, rulesets, length, points, children)
555
+ else {
556
+ switch (atrule) {
557
+ // c(ontainer)
558
+ case 99:
559
+ if ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.charat)(characters, 3) === 110) break
560
+ // l(ayer)
561
+ case 108:
562
+ if ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.charat)(characters, 2) === 97) break
563
+ default:
564
+ offset = 0
565
+ // d(ocument) m(edia) s(upports)
566
+ case 100: case 109: case 115:
567
+ }
568
+ if (offset) parse(value, reference, reference, rule && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)
569
+ else parse(characters, reference, reference, reference, [''], children, 0, points, children)
570
+ }
571
+ }
572
+
573
+ index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo
574
+ break
575
+ // :
576
+ case 58:
577
+ length = 1 + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters), property = previous
578
+ default:
579
+ if (variable < 1)
580
+ if (character == 123)
581
+ --variable
582
+ else if (character == 125 && variable++ == 0 && (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.prev)() == 125)
583
+ continue
584
+
585
+ switch (characters += (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.from)(character), character * variable) {
586
+ // &
587
+ case 38:
588
+ ampersand = offset > 0 ? 1 : (characters += '\f', -1)
589
+ break
590
+ // ,
591
+ case 44:
592
+ points[index++] = ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) - 1) * ampersand, ampersand = 1
593
+ break
594
+ // @
595
+ case 64:
596
+ // -
597
+ if ((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.peek)() === 45)
598
+ characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.delimit)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.next)())
599
+
600
+ atrule = (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.peek)(), offset = length = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(type = characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.identifier)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.caret)())), character++
601
+ break
602
+ // -
603
+ case 45:
604
+ if (previous === 45 && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) == 2)
605
+ variable = 0
606
+ }
607
+ }
608
+
609
+ return rulesets
610
+ }
611
+
612
+ /**
613
+ * @param {string} value
614
+ * @param {object} root
615
+ * @param {object?} parent
616
+ * @param {number} index
617
+ * @param {number} offset
618
+ * @param {string[]} rules
619
+ * @param {number[]} points
620
+ * @param {string} type
621
+ * @param {string[]} props
622
+ * @param {string[]} children
623
+ * @param {number} length
624
+ * @param {object[]} siblings
625
+ * @return {object}
626
+ */
627
+ function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {
628
+ var post = offset - 1
629
+ var rule = offset === 0 ? rules : ['']
630
+ var size = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.sizeof)(rule)
631
+
632
+ for (var i = 0, j = 0, k = 0; i < index; ++i)
633
+ for (var x = 0, y = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, post + 1, post = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.abs)(j = points[i])), z = value; x < size; ++x)
634
+ if (z = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.trim)(j > 0 ? rule[x] + ' ' + y : (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)(y, /&\f/g, rule[x])))
635
+ props[k++] = z
636
+
637
+ return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.node)(value, root, parent, offset === 0 ? _Enum_js__WEBPACK_IMPORTED_MODULE_2__.RULESET : type, props, children, length, siblings)
638
+ }
639
+
640
+ /**
641
+ * @param {number} value
642
+ * @param {object} root
643
+ * @param {object?} parent
644
+ * @param {object[]} siblings
645
+ * @return {object}
646
+ */
647
+ function comment (value, root, parent, siblings) {
648
+ return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.node)(value, root, parent, _Enum_js__WEBPACK_IMPORTED_MODULE_2__.COMMENT, (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.from)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.char)()), (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, 2, -2), 0, siblings)
649
+ }
650
+
651
+ /**
652
+ * @param {string} value
653
+ * @param {object} root
654
+ * @param {object?} parent
655
+ * @param {number} length
656
+ * @param {object[]} siblings
657
+ * @return {object}
658
+ */
659
+ function declaration (value, root, parent, length, siblings) {
660
+ return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.node)(value, root, parent, _Enum_js__WEBPACK_IMPORTED_MODULE_2__.DECLARATION, (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, 0, length), (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, length + 1, -1), length, siblings)
661
+ }
662
+
663
+
664
+ /***/ }),
665
+
666
+ /***/ "./node_modules/stylis/src/Serializer.js":
667
+ /*!***********************************************!*\
668
+ !*** ./node_modules/stylis/src/Serializer.js ***!
669
+ \***********************************************/
670
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
671
+
672
+ __webpack_require__.r(__webpack_exports__);
673
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
674
+ /* harmony export */ serialize: () => (/* binding */ serialize),
675
+ /* harmony export */ stringify: () => (/* binding */ stringify)
676
+ /* harmony export */ });
677
+ /* harmony import */ var _Enum_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Enum.js */ "./node_modules/stylis/src/Enum.js");
678
+ /* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/stylis/src/Utility.js");
679
+
680
+
681
+
682
+ /**
683
+ * @param {object[]} children
684
+ * @param {function} callback
685
+ * @return {string}
686
+ */
687
+ function serialize (children, callback) {
688
+ var output = ''
689
+
690
+ for (var i = 0; i < children.length; i++)
691
+ output += callback(children[i], i, children, callback) || ''
692
+
693
+ return output
694
+ }
695
+
696
+ /**
697
+ * @param {object} element
698
+ * @param {number} index
699
+ * @param {object[]} children
700
+ * @param {function} callback
701
+ * @return {string}
702
+ */
703
+ function stringify (element, index, children, callback) {
704
+ switch (element.type) {
705
+ case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.LAYER: if (element.children.length) break
706
+ case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.IMPORT: case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.NAMESPACE: case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.DECLARATION: return element.return = element.return || element.value
707
+ case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.COMMENT: return ''
708
+ case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
709
+ case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.RULESET: if (!(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(element.value = element.props.join(','))) return ''
710
+ }
711
+
712
+ return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
713
+ }
714
+
715
+
716
+ /***/ }),
717
+
718
+ /***/ "./node_modules/stylis/src/Tokenizer.js":
719
+ /*!**********************************************!*\
720
+ !*** ./node_modules/stylis/src/Tokenizer.js ***!
721
+ \**********************************************/
722
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
723
+
724
+ __webpack_require__.r(__webpack_exports__);
725
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
726
+ /* harmony export */ alloc: () => (/* binding */ alloc),
727
+ /* harmony export */ caret: () => (/* binding */ caret),
728
+ /* harmony export */ char: () => (/* binding */ char),
729
+ /* harmony export */ character: () => (/* binding */ character),
730
+ /* harmony export */ characters: () => (/* binding */ characters),
731
+ /* harmony export */ column: () => (/* binding */ column),
732
+ /* harmony export */ commenter: () => (/* binding */ commenter),
733
+ /* harmony export */ copy: () => (/* binding */ copy),
734
+ /* harmony export */ dealloc: () => (/* binding */ dealloc),
735
+ /* harmony export */ delimit: () => (/* binding */ delimit),
736
+ /* harmony export */ delimiter: () => (/* binding */ delimiter),
737
+ /* harmony export */ escaping: () => (/* binding */ escaping),
738
+ /* harmony export */ identifier: () => (/* binding */ identifier),
739
+ /* harmony export */ length: () => (/* binding */ length),
740
+ /* harmony export */ lift: () => (/* binding */ lift),
741
+ /* harmony export */ line: () => (/* binding */ line),
742
+ /* harmony export */ next: () => (/* binding */ next),
743
+ /* harmony export */ node: () => (/* binding */ node),
744
+ /* harmony export */ peek: () => (/* binding */ peek),
745
+ /* harmony export */ position: () => (/* binding */ position),
746
+ /* harmony export */ prev: () => (/* binding */ prev),
747
+ /* harmony export */ slice: () => (/* binding */ slice),
748
+ /* harmony export */ token: () => (/* binding */ token),
749
+ /* harmony export */ tokenize: () => (/* binding */ tokenize),
750
+ /* harmony export */ tokenizer: () => (/* binding */ tokenizer),
751
+ /* harmony export */ whitespace: () => (/* binding */ whitespace)
752
+ /* harmony export */ });
753
+ /* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/stylis/src/Utility.js");
754
+
755
+
756
+ var line = 1
757
+ var column = 1
758
+ var length = 0
759
+ var position = 0
760
+ var character = 0
761
+ var characters = ''
762
+
763
+ /**
764
+ * @param {string} value
765
+ * @param {object | null} root
766
+ * @param {object | null} parent
767
+ * @param {string} type
768
+ * @param {string[] | string} props
769
+ * @param {object[] | string} children
770
+ * @param {object[]} siblings
771
+ * @param {number} length
772
+ */
773
+ function node (value, root, parent, type, props, children, length, siblings) {
774
+ return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}
775
+ }
776
+
777
+ /**
778
+ * @param {object} root
779
+ * @param {object} props
780
+ * @return {object}
781
+ */
782
+ function copy (root, props) {
783
+ return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.assign)(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)
784
+ }
785
+
786
+ /**
787
+ * @param {object} root
788
+ */
789
+ function lift (root) {
790
+ while (root.root)
791
+ root = copy(root.root, {children: [root]})
792
+
793
+ ;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)(root, root.siblings)
794
+ }
795
+
796
+ /**
797
+ * @return {number}
798
+ */
799
+ function char () {
800
+ return character
801
+ }
802
+
803
+ /**
804
+ * @return {number}
805
+ */
806
+ function prev () {
807
+ character = position > 0 ? (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(characters, --position) : 0
808
+
809
+ if (column--, character === 10)
810
+ column = 1, line--
811
+
812
+ return character
813
+ }
814
+
815
+ /**
816
+ * @return {number}
817
+ */
818
+ function next () {
819
+ character = position < length ? (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(characters, position++) : 0
820
+
821
+ if (column++, character === 10)
822
+ column = 1, line++
823
+
824
+ return character
825
+ }
826
+
827
+ /**
828
+ * @return {number}
829
+ */
830
+ function peek () {
831
+ return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(characters, position)
832
+ }
833
+
834
+ /**
835
+ * @return {number}
836
+ */
837
+ function caret () {
838
+ return position
839
+ }
840
+
841
+ /**
842
+ * @param {number} begin
843
+ * @param {number} end
844
+ * @return {string}
845
+ */
846
+ function slice (begin, end) {
847
+ return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.substr)(characters, begin, end)
848
+ }
849
+
850
+ /**
851
+ * @param {number} type
852
+ * @return {number}
853
+ */
854
+ function token (type) {
855
+ switch (type) {
856
+ // \0 \t \n \r \s whitespace token
857
+ case 0: case 9: case 10: case 13: case 32:
858
+ return 5
859
+ // ! + , / > @ ~ isolate token
860
+ case 33: case 43: case 44: case 47: case 62: case 64: case 126:
861
+ // ; { } breakpoint token
862
+ case 59: case 123: case 125:
863
+ return 4
864
+ // : accompanied token
865
+ case 58:
866
+ return 3
867
+ // " ' ( [ opening delimit token
868
+ case 34: case 39: case 40: case 91:
869
+ return 2
870
+ // ) ] closing delimit token
871
+ case 41: case 93:
872
+ return 1
873
+ }
874
+
875
+ return 0
876
+ }
877
+
878
+ /**
879
+ * @param {string} value
880
+ * @return {any[]}
881
+ */
882
+ function alloc (value) {
883
+ return line = column = 1, length = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.strlen)(characters = value), position = 0, []
884
+ }
885
+
886
+ /**
887
+ * @param {any} value
888
+ * @return {any}
889
+ */
890
+ function dealloc (value) {
891
+ return characters = '', value
892
+ }
893
+
894
+ /**
895
+ * @param {number} type
896
+ * @return {string}
897
+ */
898
+ function delimit (type) {
899
+ return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.trim)(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
900
+ }
901
+
902
+ /**
903
+ * @param {string} value
904
+ * @return {string[]}
905
+ */
906
+ function tokenize (value) {
907
+ return dealloc(tokenizer(alloc(value)))
908
+ }
909
+
910
+ /**
911
+ * @param {number} type
912
+ * @return {string}
913
+ */
914
+ function whitespace (type) {
915
+ while (character = peek())
916
+ if (character < 33)
917
+ next()
918
+ else
919
+ break
920
+
921
+ return token(type) > 2 || token(character) > 3 ? '' : ' '
922
+ }
923
+
924
+ /**
925
+ * @param {string[]} children
926
+ * @return {string[]}
927
+ */
928
+ function tokenizer (children) {
929
+ while (next())
930
+ switch (token(character)) {
931
+ case 0: (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)(identifier(position - 1), children)
932
+ break
933
+ case 2: ;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)(delimit(character), children)
934
+ break
935
+ default: ;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.from)(character), children)
936
+ }
937
+
938
+ return children
939
+ }
940
+
941
+ /**
942
+ * @param {number} index
943
+ * @param {number} count
944
+ * @return {string}
945
+ */
946
+ function escaping (index, count) {
947
+ while (--count && next())
948
+ // not 0-9 A-F a-f
949
+ if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
950
+ break
951
+
952
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
953
+ }
954
+
955
+ /**
956
+ * @param {number} type
957
+ * @return {number}
958
+ */
959
+ function delimiter (type) {
960
+ while (next())
961
+ switch (character) {
962
+ // ] ) " '
963
+ case type:
964
+ return position
965
+ // " '
966
+ case 34: case 39:
967
+ if (type !== 34 && type !== 39)
968
+ delimiter(character)
969
+ break
970
+ // (
971
+ case 40:
972
+ if (type === 41)
973
+ delimiter(type)
974
+ break
975
+ // \
976
+ case 92:
977
+ next()
978
+ break
979
+ }
980
+
981
+ return position
982
+ }
983
+
984
+ /**
985
+ * @param {number} type
986
+ * @param {number} index
987
+ * @return {number}
988
+ */
989
+ function commenter (type, index) {
990
+ while (next())
991
+ // //
992
+ if (type + character === 47 + 10)
993
+ break
994
+ // /*
995
+ else if (type + character === 42 + 42 && peek() === 47)
996
+ break
997
+
998
+ return '/*' + slice(index, position - 1) + '*' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.from)(type === 47 ? type : next())
999
+ }
1000
+
1001
+ /**
1002
+ * @param {number} index
1003
+ * @return {string}
1004
+ */
1005
+ function identifier (index) {
1006
+ while (!token(peek()))
1007
+ next()
1008
+
1009
+ return slice(index, position)
1010
+ }
1011
+
1012
+
1013
+ /***/ }),
1014
+
1015
+ /***/ "./node_modules/stylis/src/Utility.js":
1016
+ /*!********************************************!*\
1017
+ !*** ./node_modules/stylis/src/Utility.js ***!
1018
+ \********************************************/
1019
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1020
+
1021
+ __webpack_require__.r(__webpack_exports__);
1022
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1023
+ /* harmony export */ abs: () => (/* binding */ abs),
1024
+ /* harmony export */ append: () => (/* binding */ append),
1025
+ /* harmony export */ assign: () => (/* binding */ assign),
1026
+ /* harmony export */ charat: () => (/* binding */ charat),
1027
+ /* harmony export */ combine: () => (/* binding */ combine),
1028
+ /* harmony export */ filter: () => (/* binding */ filter),
1029
+ /* harmony export */ from: () => (/* binding */ from),
1030
+ /* harmony export */ hash: () => (/* binding */ hash),
1031
+ /* harmony export */ indexof: () => (/* binding */ indexof),
1032
+ /* harmony export */ match: () => (/* binding */ match),
1033
+ /* harmony export */ replace: () => (/* binding */ replace),
1034
+ /* harmony export */ sizeof: () => (/* binding */ sizeof),
1035
+ /* harmony export */ strlen: () => (/* binding */ strlen),
1036
+ /* harmony export */ substr: () => (/* binding */ substr),
1037
+ /* harmony export */ trim: () => (/* binding */ trim)
1038
+ /* harmony export */ });
1039
+ /**
1040
+ * @param {number}
1041
+ * @return {number}
1042
+ */
1043
+ var abs = Math.abs
1044
+
1045
+ /**
1046
+ * @param {number}
1047
+ * @return {string}
1048
+ */
1049
+ var from = String.fromCharCode
1050
+
1051
+ /**
1052
+ * @param {object}
1053
+ * @return {object}
1054
+ */
1055
+ var assign = Object.assign
1056
+
1057
+ /**
1058
+ * @param {string} value
1059
+ * @param {number} length
1060
+ * @return {number}
1061
+ */
1062
+ function hash (value, length) {
1063
+ return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
1064
+ }
1065
+
1066
+ /**
1067
+ * @param {string} value
1068
+ * @return {string}
1069
+ */
1070
+ function trim (value) {
1071
+ return value.trim()
1072
+ }
1073
+
1074
+ /**
1075
+ * @param {string} value
1076
+ * @param {RegExp} pattern
1077
+ * @return {string?}
1078
+ */
1079
+ function match (value, pattern) {
1080
+ return (value = pattern.exec(value)) ? value[0] : value
1081
+ }
1082
+
1083
+ /**
1084
+ * @param {string} value
1085
+ * @param {(string|RegExp)} pattern
1086
+ * @param {string} replacement
1087
+ * @return {string}
1088
+ */
1089
+ function replace (value, pattern, replacement) {
1090
+ return value.replace(pattern, replacement)
1091
+ }
1092
+
1093
+ /**
1094
+ * @param {string} value
1095
+ * @param {string} search
1096
+ * @param {number} position
1097
+ * @return {number}
1098
+ */
1099
+ function indexof (value, search, position) {
1100
+ return value.indexOf(search, position)
1101
+ }
1102
+
1103
+ /**
1104
+ * @param {string} value
1105
+ * @param {number} index
1106
+ * @return {number}
1107
+ */
1108
+ function charat (value, index) {
1109
+ return value.charCodeAt(index) | 0
1110
+ }
1111
+
1112
+ /**
1113
+ * @param {string} value
1114
+ * @param {number} begin
1115
+ * @param {number} end
1116
+ * @return {string}
1117
+ */
1118
+ function substr (value, begin, end) {
1119
+ return value.slice(begin, end)
1120
+ }
1121
+
1122
+ /**
1123
+ * @param {string} value
1124
+ * @return {number}
1125
+ */
1126
+ function strlen (value) {
1127
+ return value.length
1128
+ }
1129
+
1130
+ /**
1131
+ * @param {any[]} value
1132
+ * @return {number}
1133
+ */
1134
+ function sizeof (value) {
1135
+ return value.length
1136
+ }
1137
+
1138
+ /**
1139
+ * @param {any} value
1140
+ * @param {any[]} array
1141
+ * @return {any}
1142
+ */
1143
+ function append (value, array) {
1144
+ return array.push(value), value
1145
+ }
1146
+
1147
+ /**
1148
+ * @param {string[]} array
1149
+ * @param {function} callback
1150
+ * @return {string}
1151
+ */
1152
+ function combine (array, callback) {
1153
+ return array.map(callback).join('')
1154
+ }
1155
+
1156
+ /**
1157
+ * @param {string[]} array
1158
+ * @param {RegExp} pattern
1159
+ * @return {string[]}
1160
+ */
1161
+ function filter (array, pattern) {
1162
+ return array.filter(function (value) { return !match(value, pattern) })
1163
+ }
1164
+
1165
+
1166
+ /***/ }),
1167
+
1168
+ /***/ "./src/constants.ts":
1169
+ /*!**************************!*\
1170
+ !*** ./src/constants.ts ***!
1171
+ \**************************/
1172
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1173
+
1174
+ __webpack_require__.r(__webpack_exports__);
1175
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1176
+ /* harmony export */ HONEY_BREAKPOINTS: () => (/* binding */ HONEY_BREAKPOINTS),
1177
+ /* harmony export */ HONEY_GLOBAL_STYLE_ATTR: () => (/* binding */ HONEY_GLOBAL_STYLE_ATTR),
1178
+ /* harmony export */ HONEY_STYLED_COMPONENT_ID_PROP: () => (/* binding */ HONEY_STYLED_COMPONENT_ID_PROP),
1179
+ /* harmony export */ HONEY_STYLE_ATTR: () => (/* binding */ HONEY_STYLE_ATTR),
1180
+ /* harmony export */ VALID_DOM_ELEMENT_ATTRS: () => (/* binding */ VALID_DOM_ELEMENT_ATTRS),
1181
+ /* harmony export */ __DEV__: () => (/* binding */ __DEV__)
1182
+ /* harmony export */ });
1183
+ const ENV = "development" || 0;
1184
+ const __DEV__ = ENV !== 'production';
1185
+ if (__DEV__ && typeof window !== 'undefined' && !process.env.JEST_WORKER_ID) {
1186
+ console.info('[@react-hive/honey-style]: You are running in development mode. ' +
1187
+ 'This build is not optimized for production and may include extra checks or logs.');
1188
+ }
1189
+ const HONEY_STYLED_COMPONENT_ID_PROP = '$$ComponentId';
1190
+ const HONEY_GLOBAL_STYLE_ATTR = 'data-honey-global-style';
1191
+ const HONEY_STYLE_ATTR = 'data-honey-style';
1192
+ const HONEY_BREAKPOINTS = ['xs', 'sm', 'md', 'lg', 'xl'];
1193
+ const VALID_HTML_ATTRS = new Set([
1194
+ 'accept',
1195
+ 'accessKey',
1196
+ 'alt',
1197
+ 'aria',
1198
+ 'as',
1199
+ 'autoCapitalize',
1200
+ 'autoComplete',
1201
+ 'autoFocus',
1202
+ 'capture',
1203
+ 'checked',
1204
+ 'className',
1205
+ 'contentEditable',
1206
+ 'contextMenu',
1207
+ 'controls',
1208
+ 'crossOrigin',
1209
+ 'dangerouslySetInnerHTML',
1210
+ 'data',
1211
+ 'dir',
1212
+ 'disabled',
1213
+ 'download',
1214
+ 'draggable',
1215
+ 'form',
1216
+ 'formAction',
1217
+ 'formEncType',
1218
+ 'formMethod',
1219
+ 'formNoValidate',
1220
+ 'formTarget',
1221
+ 'height',
1222
+ 'hidden',
1223
+ 'href',
1224
+ 'hrefLang',
1225
+ 'id',
1226
+ 'is',
1227
+ 'isMap',
1228
+ 'inert',
1229
+ 'key',
1230
+ 'lang',
1231
+ 'list',
1232
+ 'loop',
1233
+ 'max',
1234
+ 'maxLength',
1235
+ 'media',
1236
+ 'min',
1237
+ 'minLength',
1238
+ 'multiple',
1239
+ 'muted',
1240
+ 'name',
1241
+ 'pattern',
1242
+ 'placeholder',
1243
+ 'readOnly',
1244
+ 'required',
1245
+ 'role',
1246
+ 'size',
1247
+ 'slot',
1248
+ 'spellCheck',
1249
+ 'src',
1250
+ 'srcSet',
1251
+ 'step',
1252
+ 'style',
1253
+ 'tabIndex',
1254
+ 'target',
1255
+ 'title',
1256
+ 'translate',
1257
+ 'type',
1258
+ 'useMap',
1259
+ 'value',
1260
+ 'width',
1261
+ 'ref',
1262
+ 'children',
1263
+ 'class',
1264
+ 'char',
1265
+ 'charOff',
1266
+ 'unselectable',
1267
+ 'inputMode',
1268
+ ]);
1269
+ const VALID_TABLE_ATTRS = new Set([
1270
+ 'colSpan',
1271
+ 'rowSpan',
1272
+ 'headers',
1273
+ 'abbr',
1274
+ 'scope',
1275
+ /**
1276
+ * @deprecated https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement/align
1277
+ */
1278
+ 'align',
1279
+ /**
1280
+ * @deprecated https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement/vAlign
1281
+ */
1282
+ 'valign',
1283
+ ]);
1284
+ const VALID_SVG_ATTRS = new Set([
1285
+ 'viewBox',
1286
+ 'fill',
1287
+ 'stroke',
1288
+ 'strokeWidth',
1289
+ 'strokeLinecap',
1290
+ 'strokeLinejoin',
1291
+ 'strokeDasharray',
1292
+ 'strokeDashoffset',
1293
+ 'strokeOpacity',
1294
+ 'fillOpacity',
1295
+ 'opacity',
1296
+ 'pointerEvents',
1297
+ 'focusable',
1298
+ 'x',
1299
+ 'y',
1300
+ 'x1',
1301
+ 'x2',
1302
+ 'y1',
1303
+ 'y2',
1304
+ 'cx',
1305
+ 'cy',
1306
+ 'r',
1307
+ 'rx',
1308
+ 'ry',
1309
+ 'd',
1310
+ 'points',
1311
+ 'height',
1312
+ 'transform',
1313
+ 'xmlns',
1314
+ 'preserveAspectRatio',
1315
+ 'mask',
1316
+ 'clipPath',
1317
+ 'pathLength',
1318
+ 'markerStart',
1319
+ 'markerMid',
1320
+ 'markerEnd',
1321
+ 'refX',
1322
+ 'refY',
1323
+ 'dominantBaseline',
1324
+ 'textAnchor',
1325
+ ]);
1326
+ const VALID_EVENT_ATTRS = new Set([
1327
+ // Clipboard
1328
+ 'onCopy',
1329
+ 'onCut',
1330
+ 'onPaste',
1331
+ // Composition
1332
+ 'onCompositionEnd',
1333
+ 'onCompositionStart',
1334
+ 'onCompositionUpdate',
1335
+ // Focus
1336
+ 'onFocus',
1337
+ 'onBlur',
1338
+ // Form
1339
+ 'onChange',
1340
+ 'onInput',
1341
+ 'onInvalid',
1342
+ 'onReset',
1343
+ 'onSubmit',
1344
+ // Keyboard
1345
+ 'onKeyDown',
1346
+ 'onKeyPress',
1347
+ 'onKeyUp',
1348
+ // Mouse
1349
+ 'onClick',
1350
+ 'onContextMenu',
1351
+ 'onDoubleClick',
1352
+ 'onMouseDown',
1353
+ 'onMouseEnter',
1354
+ 'onMouseLeave',
1355
+ 'onMouseMove',
1356
+ 'onMouseOut',
1357
+ 'onMouseOver',
1358
+ 'onMouseUp',
1359
+ // Drag & Drop
1360
+ 'onDrag',
1361
+ 'onDragEnd',
1362
+ 'onDragEnter',
1363
+ 'onDragExit',
1364
+ 'onDragLeave',
1365
+ 'onDragOver',
1366
+ 'onDragStart',
1367
+ 'onDrop',
1368
+ // Pointer
1369
+ 'onPointerDown',
1370
+ 'onPointerMove',
1371
+ 'onPointerUp',
1372
+ 'onPointerCancel',
1373
+ 'onPointerEnter',
1374
+ 'onPointerLeave',
1375
+ 'onPointerOver',
1376
+ 'onPointerOut',
1377
+ 'onGotPointerCapture',
1378
+ 'onLostPointerCapture',
1379
+ // Selection
1380
+ 'onSelect',
1381
+ // Touch
1382
+ 'onTouchCancel',
1383
+ 'onTouchEnd',
1384
+ 'onTouchMove',
1385
+ 'onTouchStart',
1386
+ // UI
1387
+ 'onScroll',
1388
+ // Wheel
1389
+ 'onWheel',
1390
+ // Media
1391
+ 'onAbort',
1392
+ 'onCanPlay',
1393
+ 'onCanPlayThrough',
1394
+ 'onDurationChange',
1395
+ 'onEmptied',
1396
+ 'onEncrypted',
1397
+ 'onEnded',
1398
+ 'onLoadedData',
1399
+ 'onLoadedMetadata',
1400
+ 'onLoadStart',
1401
+ 'onPause',
1402
+ 'onPlay',
1403
+ 'onPlaying',
1404
+ 'onProgress',
1405
+ 'onRateChange',
1406
+ 'onSeeked',
1407
+ 'onSeeking',
1408
+ 'onStalled',
1409
+ 'onSuspend',
1410
+ 'onTimeUpdate',
1411
+ 'onVolumeChange',
1412
+ 'onWaiting',
1413
+ // Image
1414
+ 'onLoad',
1415
+ 'onError',
1416
+ ]);
1417
+ const VALID_DOM_ELEMENT_ATTRS = new Set([
1418
+ ...VALID_HTML_ATTRS,
1419
+ ...VALID_TABLE_ATTRS,
1420
+ ...VALID_SVG_ATTRS,
1421
+ ...VALID_EVENT_ATTRS,
1422
+ ]);
1423
+
1424
+
1425
+ /***/ }),
1426
+
1427
+ /***/ "./src/contexts/HoneyStyleContext.ts":
1428
+ /*!*******************************************!*\
1429
+ !*** ./src/contexts/HoneyStyleContext.ts ***!
1430
+ \*******************************************/
1431
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1432
+
1433
+ __webpack_require__.r(__webpack_exports__);
1434
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1435
+ /* harmony export */ HoneyStyleContext: () => (/* binding */ HoneyStyleContext)
1436
+ /* harmony export */ });
1437
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1438
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1439
+
1440
+ const HoneyStyleContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined);
1441
+
1442
+
1443
+ /***/ }),
1444
+
1445
+ /***/ "./src/contexts/index.ts":
1446
+ /*!*******************************!*\
1447
+ !*** ./src/contexts/index.ts ***!
1448
+ \*******************************/
1449
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1450
+
1451
+ __webpack_require__.r(__webpack_exports__);
1452
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1453
+ /* harmony export */ HoneyStyleContext: () => (/* reexport safe */ _HoneyStyleContext__WEBPACK_IMPORTED_MODULE_0__.HoneyStyleContext)
1454
+ /* harmony export */ });
1455
+ /* harmony import */ var _HoneyStyleContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HoneyStyleContext */ "./src/contexts/HoneyStyleContext.ts");
1456
+
1457
+
1458
+
1459
+ /***/ }),
1460
+
1461
+ /***/ "./src/css.ts":
1462
+ /*!********************!*\
1463
+ !*** ./src/css.ts ***!
1464
+ \********************/
1465
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1466
+
1467
+ __webpack_require__.r(__webpack_exports__);
1468
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1469
+ /* harmony export */ css: () => (/* binding */ css)
1470
+ /* harmony export */ });
1471
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
1472
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/utils.ts");
1473
+
1474
+
1475
+ const resolveCssInterpolation = (value, context) => {
1476
+ if (value === '' || value === false || value === undefined || value === null) {
1477
+ return '';
1478
+ }
1479
+ if (typeof value === 'function') {
1480
+ if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.isStyledComponent)(value)) {
1481
+ return `.${value[_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLED_COMPONENT_ID_PROP]}`;
1482
+ }
1483
+ return resolveCssInterpolation(value(context), context);
1484
+ }
1485
+ if (Array.isArray(value)) {
1486
+ return value.map(v => resolveCssInterpolation(v, context)).join('\n');
1487
+ }
1488
+ if (value && typeof value === 'object') {
1489
+ return Object.entries(value)
1490
+ .filter(([, v]) => v !== undefined && v !== false)
1491
+ .map(([k, v]) => `${(0,_utils__WEBPACK_IMPORTED_MODULE_1__.toKebabCase)(k)}: ${v};`)
1492
+ .join('\n');
1493
+ }
1494
+ return value.toString?.() ?? '';
1495
+ };
1496
+ const css = (strings, ...interpolations) => {
1497
+ return (context) => strings.reduce((cssResult, str, index) => cssResult + str + resolveCssInterpolation(interpolations[index], context), '');
1498
+ };
1499
+
1500
+
1501
+ /***/ }),
1502
+
1503
+ /***/ "./src/global-style.ts":
1504
+ /*!*****************************!*\
1505
+ !*** ./src/global-style.ts ***!
1506
+ \*****************************/
1507
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1508
+
1509
+ __webpack_require__.r(__webpack_exports__);
1510
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1511
+ /* harmony export */ createGlobalStyle: () => (/* binding */ createGlobalStyle)
1512
+ /* harmony export */ });
1513
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1514
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1515
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
1516
+ /* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./css */ "./src/css.ts");
1517
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/utils.ts");
1518
+ /* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ "./src/hooks/index.ts");
1519
+
1520
+
1521
+
1522
+
1523
+
1524
+ const createGlobalStyle = (strings, ...interpolations) => {
1525
+ const styleId = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.generateId)('hsg');
1526
+ const computeCss = (0,_css__WEBPACK_IMPORTED_MODULE_2__.css)(strings, ...interpolations);
1527
+ const GlobalStyle = () => {
1528
+ const { theme } = (0,_hooks__WEBPACK_IMPORTED_MODULE_4__.useHoneyStyle)();
1529
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect)(() => {
1530
+ const rawCss = computeCss({ theme });
1531
+ const processedCss = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.processCss)(rawCss);
1532
+ const styleElement = document.createElement('style');
1533
+ styleElement.id = styleId;
1534
+ styleElement.innerHTML = processedCss;
1535
+ styleElement.setAttribute(_constants__WEBPACK_IMPORTED_MODULE_1__.HONEY_GLOBAL_STYLE_ATTR, 'true');
1536
+ document.head.insertBefore(styleElement, document.head.firstChild);
1537
+ return () => {
1538
+ styleElement.remove();
1539
+ };
1540
+ }, [theme]);
1541
+ return null;
1542
+ };
1543
+ return GlobalStyle;
1544
+ };
1545
+
1546
+
1547
+ /***/ }),
1548
+
1549
+ /***/ "./src/hooks/index.ts":
1550
+ /*!****************************!*\
1551
+ !*** ./src/hooks/index.ts ***!
1552
+ \****************************/
1553
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1554
+
1555
+ __webpack_require__.r(__webpack_exports__);
1556
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1557
+ /* harmony export */ useHoneyStyle: () => (/* reexport safe */ _use_honey_style__WEBPACK_IMPORTED_MODULE_0__.useHoneyStyle)
1558
+ /* harmony export */ });
1559
+ /* harmony import */ var _use_honey_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use-honey-style */ "./src/hooks/use-honey-style.ts");
1560
+
1561
+
1562
+
1563
+ /***/ }),
1564
+
1565
+ /***/ "./src/hooks/use-honey-style.ts":
1566
+ /*!**************************************!*\
1567
+ !*** ./src/hooks/use-honey-style.ts ***!
1568
+ \**************************************/
1569
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1570
+
1571
+ __webpack_require__.r(__webpack_exports__);
1572
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1573
+ /* harmony export */ useHoneyStyle: () => (/* binding */ useHoneyStyle)
1574
+ /* harmony export */ });
1575
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1576
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1577
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/utils.ts");
1578
+ /* harmony import */ var _contexts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../contexts */ "./src/contexts/index.ts");
1579
+
1580
+
1581
+
1582
+ const useHoneyStyle = () => {
1583
+ const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts__WEBPACK_IMPORTED_MODULE_2__.HoneyStyleContext);
1584
+ (0,_utils__WEBPACK_IMPORTED_MODULE_1__.assert)(context, 'The `useHoneyStyle()` hook must be used inside <HoneyStyleProvider/> component!');
1585
+ return context;
1586
+ };
1587
+
1588
+
1589
+ /***/ }),
1590
+
1591
+ /***/ "./src/mount-style.ts":
1592
+ /*!****************************!*\
1593
+ !*** ./src/mount-style.ts ***!
1594
+ \****************************/
1595
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1596
+
1597
+ __webpack_require__.r(__webpack_exports__);
1598
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1599
+ /* harmony export */ mountStyle: () => (/* binding */ mountStyle)
1600
+ /* harmony export */ });
1601
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
1602
+
1603
+ /**
1604
+ * Global style registry, shared across reloads and modules.
1605
+ */
1606
+ const getStyleRegistry = () => {
1607
+ if (!window.__honeyStyleRegistry) {
1608
+ window.__honeyStyleRegistry = new Map();
1609
+ }
1610
+ return window.__honeyStyleRegistry;
1611
+ };
1612
+ const styleRegistry = getStyleRegistry();
1613
+ let globalStyleTag = null;
1614
+ /**
1615
+ * Ensures a single <style> tag exists and is attached to <head>.
1616
+ *
1617
+ * @returns The <style> element.
1618
+ */
1619
+ const ensureGlobalStyleTag = () => {
1620
+ if (!globalStyleTag) {
1621
+ globalStyleTag = document.querySelector(`style[${_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_ATTR}="true"]`);
1622
+ if (!globalStyleTag) {
1623
+ globalStyleTag = document.createElement('style');
1624
+ globalStyleTag.setAttribute(_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_ATTR, 'true');
1625
+ document.head.appendChild(globalStyleTag);
1626
+ }
1627
+ }
1628
+ return globalStyleTag;
1629
+ };
1630
+ /**
1631
+ * Updates the global <style> tag with all currently active styles, sorted by priority.
1632
+ */
1633
+ const updateGlobalStyleContent = () => {
1634
+ const styleTag = ensureGlobalStyleTag();
1635
+ const allCss = Array.from(styleRegistry.entries())
1636
+ .sort(([, a], [, b]) => a.priority - b.priority)
1637
+ .map(([, entry]) => entry.css)
1638
+ .join('\n');
1639
+ styleTag.textContent = allCss;
1640
+ };
1641
+ /**
1642
+ * Creates a cleanup function for a style, which decrements usage count and removes it if unused.
1643
+ *
1644
+ * @param className - The key of the style.
1645
+ */
1646
+ const createCleanupFunction = (className) => () => {
1647
+ const entry = styleRegistry.get(className);
1648
+ if (!entry) {
1649
+ return;
1650
+ }
1651
+ entry.usages--;
1652
+ if (entry.usages <= 0) {
1653
+ styleRegistry.delete(className);
1654
+ updateGlobalStyleContent();
1655
+ }
1656
+ };
1657
+ /**
1658
+ * Mounts a CSS string under a given class name. Injects into a global <style> tag and manages its lifecycle.
1659
+ *
1660
+ * @param className - Unique identifier for the style block.
1661
+ * @param css - Full CSS rule string (can include multiple rules, media queries, etc.)
1662
+ * @param priority - Optional number to determine style ordering (lower = earlier = lower specificity)
1663
+ *
1664
+ * @returns A cleanup function to unmount the style when it's no longer needed.
1665
+ */
1666
+ const mountStyle = (className, css, priority = 0) => {
1667
+ const existing = styleRegistry.get(className);
1668
+ if (existing) {
1669
+ existing.usages++;
1670
+ return createCleanupFunction(className);
1671
+ }
1672
+ styleRegistry.set(className, {
1673
+ css,
1674
+ priority,
1675
+ usages: 1,
1676
+ });
1677
+ updateGlobalStyleContent();
1678
+ return createCleanupFunction(className);
1679
+ };
1680
+
1681
+
1682
+ /***/ }),
1683
+
1684
+ /***/ "./src/providers/HoneyStyleProvider.tsx":
1685
+ /*!**********************************************!*\
1686
+ !*** ./src/providers/HoneyStyleProvider.tsx ***!
1687
+ \**********************************************/
1688
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1689
+
1690
+ __webpack_require__.r(__webpack_exports__);
1691
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1692
+ /* harmony export */ HoneyStyleProvider: () => (/* binding */ HoneyStyleProvider)
1693
+ /* harmony export */ });
1694
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1695
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1696
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1697
+ /* harmony import */ var _contexts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../contexts */ "./src/contexts/index.ts");
1698
+
1699
+
1700
+
1701
+ const HoneyStyleProvider = ({ children, theme, }) => {
1702
+ const contextValue = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => ({
1703
+ theme,
1704
+ }), [theme]);
1705
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_contexts__WEBPACK_IMPORTED_MODULE_2__.HoneyStyleContext, { value: contextValue, children: children });
1706
+ };
1707
+
1708
+
1709
+ /***/ }),
1710
+
1711
+ /***/ "./src/providers/index.ts":
1712
+ /*!********************************!*\
1713
+ !*** ./src/providers/index.ts ***!
1714
+ \********************************/
1715
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1716
+
1717
+ __webpack_require__.r(__webpack_exports__);
1718
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1719
+ /* harmony export */ HoneyStyleProvider: () => (/* reexport safe */ _HoneyStyleProvider__WEBPACK_IMPORTED_MODULE_0__.HoneyStyleProvider)
1720
+ /* harmony export */ });
1721
+ /* harmony import */ var _HoneyStyleProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HoneyStyleProvider */ "./src/providers/HoneyStyleProvider.tsx");
1722
+
1723
+
1724
+
1725
+ /***/ }),
1726
+
1727
+ /***/ "./src/styled.ts":
1728
+ /*!***********************!*\
1729
+ !*** ./src/styled.ts ***!
1730
+ \***********************/
1731
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1732
+
1733
+ __webpack_require__.r(__webpack_exports__);
1734
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1735
+ /* harmony export */ styled: () => (/* binding */ styled)
1736
+ /* harmony export */ });
1737
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1738
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1739
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
1740
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./src/utils.ts");
1741
+ /* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./css */ "./src/css.ts");
1742
+ /* harmony import */ var _mount_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mount-style */ "./src/mount-style.ts");
1743
+ /* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks */ "./src/hooks/index.ts");
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+ const evaluateDynamicCss = (interpolation, context) => {
1751
+ if (!interpolation) {
1752
+ return '';
1753
+ }
1754
+ if (typeof interpolation === 'string') {
1755
+ return interpolation;
1756
+ }
1757
+ // @ts-expect-error
1758
+ return (0,_css__WEBPACK_IMPORTED_MODULE_3__.css)([''], [interpolation])(context);
1759
+ };
1760
+ const styled = (target, defaultProps) => {
1761
+ return (strings, ...interpolations) => {
1762
+ const componentId = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.generateId)('hsc');
1763
+ const computeCss = (0,_css__WEBPACK_IMPORTED_MODULE_3__.css)(strings, ...interpolations);
1764
+ const StyledComponent = ({ as, className, __compositionDepth = 0, css: cssProp, ...props }) => {
1765
+ if (_constants__WEBPACK_IMPORTED_MODULE_1__.__DEV__ && cssProp) {
1766
+ console.warn(`[@react-hive/honey-style]: The "css" prop is deprecated. Please use inheritance or composition instead.`);
1767
+ }
1768
+ const { theme } = (0,_hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyStyle)();
1769
+ const cleanedProps = Object.fromEntries(Object.entries(props).filter(([, value]) => value !== undefined));
1770
+ const resolvedDefaultProps = typeof defaultProps === 'function'
1771
+ ? defaultProps({ theme, as, className, ...cleanedProps })
1772
+ : (defaultProps ?? {});
1773
+ const context = {
1774
+ ...resolvedDefaultProps,
1775
+ ...cleanedProps,
1776
+ theme,
1777
+ };
1778
+ const rawCss = computeCss(context);
1779
+ const baseClassName = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.resolveClassName)(rawCss);
1780
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect)(() => {
1781
+ const baseCss = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.processCss)(rawCss, `.${baseClassName}`);
1782
+ return (0,_mount_style__WEBPACK_IMPORTED_MODULE_4__.mountStyle)(baseClassName, baseCss, __compositionDepth);
1783
+ }, [baseClassName]);
1784
+ const cssPropRaw = typeof cssProp === 'function' ? cssProp(context) : cssProp;
1785
+ const cssPropString = evaluateDynamicCss(cssPropRaw, context);
1786
+ const cssPropClassName = cssPropString ? (0,_utils__WEBPACK_IMPORTED_MODULE_2__.resolveClassName)(cssPropString) : '';
1787
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect)(() => {
1788
+ if (cssPropClassName) {
1789
+ const overrideCss = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.processCss)(cssPropString, `.${cssPropClassName}`);
1790
+ return (0,_mount_style__WEBPACK_IMPORTED_MODULE_4__.mountStyle)(cssPropClassName, overrideCss, 1);
1791
+ }
1792
+ }, [cssPropClassName]);
1793
+ const mergedProps = {
1794
+ ...resolvedDefaultProps,
1795
+ ...cleanedProps,
1796
+ className: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.combineClassNames)([componentId, baseClassName, className, cssPropClassName]),
1797
+ };
1798
+ const finalComponent = as || target;
1799
+ if (typeof target === 'string') {
1800
+ const filteredProps = typeof finalComponent === 'string' ? (0,_utils__WEBPACK_IMPORTED_MODULE_2__.filterNonHtmlAttrs)(mergedProps) : mergedProps;
1801
+ return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(finalComponent, filteredProps);
1802
+ }
1803
+ return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(target, {
1804
+ ...mergedProps,
1805
+ ...(as && { as }),
1806
+ ...((0,_utils__WEBPACK_IMPORTED_MODULE_2__.isStyledComponent)(target) && {
1807
+ __compositionDepth: __compositionDepth - 1,
1808
+ }),
1809
+ });
1810
+ };
1811
+ StyledComponent[_constants__WEBPACK_IMPORTED_MODULE_1__.HONEY_STYLED_COMPONENT_ID_PROP] = componentId;
1812
+ if (_constants__WEBPACK_IMPORTED_MODULE_1__.__DEV__) {
1813
+ const componentName = typeof target === 'string' ? target : target.displayName || target.name || 'Component';
1814
+ StyledComponent.displayName = `HoneyStyledComponent(${componentName})`;
1815
+ }
1816
+ return StyledComponent;
1817
+ };
1818
+ };
1819
+
1820
+
1821
+ /***/ }),
1822
+
1823
+ /***/ "./src/types/css.types.ts":
1824
+ /*!********************************!*\
1825
+ !*** ./src/types/css.types.ts ***!
1826
+ \********************************/
1827
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1828
+
1829
+ __webpack_require__.r(__webpack_exports__);
1830
+
1831
+
1832
+
1833
+ /***/ }),
1834
+
1835
+ /***/ "./src/types/index.ts":
1836
+ /*!****************************!*\
1837
+ !*** ./src/types/index.ts ***!
1838
+ \****************************/
1839
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1840
+
1841
+ __webpack_require__.r(__webpack_exports__);
1842
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types */ "./src/types/types.ts");
1843
+ /* harmony import */ var _css_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./css.types */ "./src/types/css.types.ts");
1844
+
1845
+
1846
+
1847
+
1848
+ /***/ }),
1849
+
1850
+ /***/ "./src/types/types.ts":
1851
+ /*!****************************!*\
1852
+ !*** ./src/types/types.ts ***!
1853
+ \****************************/
1854
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1855
+
1856
+ __webpack_require__.r(__webpack_exports__);
1857
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants */ "./src/constants.ts");
1858
+
1859
+
1860
+
1861
+ /***/ }),
1862
+
1863
+ /***/ "./src/utils.ts":
1864
+ /*!**********************!*\
1865
+ !*** ./src/utils.ts ***!
1866
+ \**********************/
1867
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1868
+
1869
+ __webpack_require__.r(__webpack_exports__);
1870
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1871
+ /* harmony export */ assert: () => (/* binding */ assert),
1872
+ /* harmony export */ combineClassNames: () => (/* binding */ combineClassNames),
1873
+ /* harmony export */ filterNonHtmlAttrs: () => (/* binding */ filterNonHtmlAttrs),
1874
+ /* harmony export */ generateId: () => (/* binding */ generateId),
1875
+ /* harmony export */ hashString: () => (/* binding */ hashString),
1876
+ /* harmony export */ isStyledComponent: () => (/* binding */ isStyledComponent),
1877
+ /* harmony export */ processCss: () => (/* binding */ processCss),
1878
+ /* harmony export */ resolveClassName: () => (/* binding */ resolveClassName),
1879
+ /* harmony export */ toKebabCase: () => (/* binding */ toKebabCase)
1880
+ /* harmony export */ });
1881
+ /* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Serializer.js");
1882
+ /* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! stylis */ "./node_modules/stylis/src/Parser.js");
1883
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
1884
+
1885
+
1886
+ function assert(condition, message) {
1887
+ if (!condition) {
1888
+ throw new Error(message);
1889
+ }
1890
+ }
1891
+ const generateId = (prefix) => `${prefix}-${Math.random().toString(36).slice(2, 8)}`;
1892
+ const toKebabCase = (str) => str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
1893
+ const hashString = (str) => {
1894
+ let hash = 5381;
1895
+ for (let i = 0; i < str.length; i++) {
1896
+ hash = (hash * 33) ^ str.charCodeAt(i);
1897
+ }
1898
+ return (hash >>> 0).toString(36);
1899
+ };
1900
+ /**
1901
+ * Combines multiple class names into a single space-separated string
1902
+ *
1903
+ * @param classNames - Array of class names to combine
1904
+ */
1905
+ const combineClassNames = (classNames) => classNames.filter(Boolean).join(' ').trim();
1906
+ const resolveClassName = (css) => `hscn-${hashString(css)}`;
1907
+ const isStyledComponent = (component) => _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLED_COMPONENT_ID_PROP in component;
1908
+ const processCss = (rawCss, selector) => {
1909
+ const scopedCss = selector ? `${selector}{${rawCss}}` : rawCss;
1910
+ return (0,stylis__WEBPACK_IMPORTED_MODULE_1__.serialize)((0,stylis__WEBPACK_IMPORTED_MODULE_2__.compile)(scopedCss), stylis__WEBPACK_IMPORTED_MODULE_1__.stringify);
1911
+ };
1912
+ /**
1913
+ * Filters out non-standard HTML attributes from a props object intended for a native HTML element.
1914
+ *
1915
+ * Retains only valid DOM attributes, including standard HTML attributes and
1916
+ * custom `data-*` or `aria-*` attributes. This helps avoid React warnings due to
1917
+ * invalid props and ensures clean, valid HTML output.
1918
+ *
1919
+ * This function is typically used when rendering polymorphic or styled components
1920
+ * that may receive non-standard props, but only valid attributes should be passed
1921
+ * to underlying DOM elements.
1922
+ *
1923
+ * @template Attrs - The type of the attributes object.
1924
+ *
1925
+ * @param attrs - An object representing all props passed to a component.
1926
+ *
1927
+ * @returns A new object containing only props that are safe and valid for use on native DOM elements.
1928
+ */
1929
+ const filterNonHtmlAttrs = (attrs) => Object.entries(attrs).reduce((allowedAttrs, [name, value]) => {
1930
+ if (_constants__WEBPACK_IMPORTED_MODULE_0__.VALID_DOM_ELEMENT_ATTRS.has(name) || name.startsWith('data-') || name.startsWith('aria-')) {
1931
+ allowedAttrs[name] = value;
1932
+ }
1933
+ return allowedAttrs;
1934
+ }, {});
1935
+
1936
+
1937
+ /***/ }),
1938
+
1939
+ /***/ "react":
1940
+ /*!************************!*\
1941
+ !*** external "react" ***!
1942
+ \************************/
1943
+ /***/ ((module) => {
1944
+
1945
+ module.exports = require("react");
1946
+
1947
+ /***/ })
1948
+
1949
+ /******/ });
1950
+ /************************************************************************/
1951
+ /******/ // The module cache
1952
+ /******/ var __webpack_module_cache__ = {};
1953
+ /******/
1954
+ /******/ // The require function
1955
+ /******/ function __webpack_require__(moduleId) {
1956
+ /******/ // Check if module is in cache
1957
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
1958
+ /******/ if (cachedModule !== undefined) {
1959
+ /******/ return cachedModule.exports;
1960
+ /******/ }
1961
+ /******/ // Create a new module (and put it into the cache)
1962
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1963
+ /******/ // no module.id needed
1964
+ /******/ // no module.loaded needed
1965
+ /******/ exports: {}
1966
+ /******/ };
1967
+ /******/
1968
+ /******/ // Execute the module function
1969
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1970
+ /******/
1971
+ /******/ // Return the exports of the module
1972
+ /******/ return module.exports;
1973
+ /******/ }
1974
+ /******/
1975
+ /************************************************************************/
1976
+ /******/ /* webpack/runtime/compat get default export */
1977
+ /******/ (() => {
1978
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
1979
+ /******/ __webpack_require__.n = (module) => {
1980
+ /******/ var getter = module && module.__esModule ?
1981
+ /******/ () => (module['default']) :
1982
+ /******/ () => (module);
1983
+ /******/ __webpack_require__.d(getter, { a: getter });
1984
+ /******/ return getter;
1985
+ /******/ };
1986
+ /******/ })();
1987
+ /******/
1988
+ /******/ /* webpack/runtime/define property getters */
1989
+ /******/ (() => {
1990
+ /******/ // define getter functions for harmony exports
1991
+ /******/ __webpack_require__.d = (exports, definition) => {
1992
+ /******/ for(var key in definition) {
1993
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1994
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1995
+ /******/ }
1996
+ /******/ }
1997
+ /******/ };
1998
+ /******/ })();
1999
+ /******/
2000
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
2001
+ /******/ (() => {
2002
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
2003
+ /******/ })();
2004
+ /******/
2005
+ /******/ /* webpack/runtime/make namespace object */
2006
+ /******/ (() => {
2007
+ /******/ // define __esModule on exports
2008
+ /******/ __webpack_require__.r = (exports) => {
2009
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2010
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2011
+ /******/ }
2012
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
2013
+ /******/ };
2014
+ /******/ })();
2015
+ /******/
2016
+ /************************************************************************/
2017
+ var __webpack_exports__ = {};
2018
+ // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
2019
+ (() => {
2020
+ /*!**********************!*\
2021
+ !*** ./src/index.ts ***!
2022
+ \**********************/
2023
+ __webpack_require__.r(__webpack_exports__);
2024
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2025
+ /* harmony export */ HONEY_BREAKPOINTS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_BREAKPOINTS),
2026
+ /* harmony export */ HONEY_GLOBAL_STYLE_ATTR: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_GLOBAL_STYLE_ATTR),
2027
+ /* harmony export */ HONEY_STYLED_COMPONENT_ID_PROP: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLED_COMPONENT_ID_PROP),
2028
+ /* harmony export */ HONEY_STYLE_ATTR: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_ATTR),
2029
+ /* harmony export */ HoneyStyleContext: () => (/* reexport safe */ _contexts__WEBPACK_IMPORTED_MODULE_1__.HoneyStyleContext),
2030
+ /* harmony export */ HoneyStyleProvider: () => (/* reexport safe */ _providers__WEBPACK_IMPORTED_MODULE_2__.HoneyStyleProvider),
2031
+ /* harmony export */ VALID_DOM_ELEMENT_ATTRS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.VALID_DOM_ELEMENT_ATTRS),
2032
+ /* harmony export */ __DEV__: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.__DEV__),
2033
+ /* harmony export */ createGlobalStyle: () => (/* reexport safe */ _global_style__WEBPACK_IMPORTED_MODULE_6__.createGlobalStyle),
2034
+ /* harmony export */ css: () => (/* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_5__.css),
2035
+ /* harmony export */ styled: () => (/* reexport safe */ _styled__WEBPACK_IMPORTED_MODULE_7__.styled),
2036
+ /* harmony export */ useHoneyStyle: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_3__.useHoneyStyle)
2037
+ /* harmony export */ });
2038
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
2039
+ /* harmony import */ var _contexts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contexts */ "./src/contexts/index.ts");
2040
+ /* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./providers */ "./src/providers/index.ts");
2041
+ /* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks */ "./src/hooks/index.ts");
2042
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./types */ "./src/types/index.ts");
2043
+ /* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./css */ "./src/css.ts");
2044
+ /* harmony import */ var _global_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./global-style */ "./src/global-style.ts");
2045
+ /* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./styled */ "./src/styled.ts");
2046
+
2047
+
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+ })();
2056
+
2057
+ module.exports = __webpack_exports__;
2058
+ /******/ })()
2059
+ ;
2060
+ //# sourceMappingURL=index.dev.cjs.map