@e1011/es-kit 1.1.24 → 1.1.26

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 (126) hide show
  1. package/dist/hooks/esm/index.css +250 -250
  2. package/dist/hooks/esm/node_modules/gsap/CSSPlugin.js +11 -0
  3. package/dist/hooks/esm/node_modules/gsap/CSSPlugin.js.map +1 -0
  4. package/dist/hooks/esm/node_modules/gsap/gsap-core.js +11 -0
  5. package/dist/hooks/esm/node_modules/gsap/gsap-core.js.map +1 -0
  6. package/dist/hooks/esm/node_modules/gsap/index.js +2 -0
  7. package/dist/hooks/esm/node_modules/gsap/index.js.map +1 -0
  8. package/dist/hooks/esm/src/core/hooks/index.js +1 -1
  9. package/dist/hooks/esm/src/core/hooks/useAnimation.js +2 -0
  10. package/dist/hooks/esm/src/core/hooks/useAnimation.js.map +1 -0
  11. package/dist/hooks/esm/src/core/hooks/useClassNames.js.map +1 -1
  12. package/dist/hooks/esm/src/core/hooks/useIntersectionObserver.js +2 -0
  13. package/dist/hooks/esm/src/core/hooks/useIntersectionObserver.js.map +1 -0
  14. package/dist/hooks/esm/src/core/hooks/useOutsideClick.js.map +1 -1
  15. package/dist/hooks/esm/src/core/hooks/useParseProps.js.map +1 -1
  16. package/dist/hooks/esm/src/core/hooks/useResize.js.map +1 -1
  17. package/dist/hooks/esm/src/core/hooks/useThemePreference.js +1 -1
  18. package/dist/hooks/esm/src/core/hooks/useThemePreference.js.map +1 -1
  19. package/dist/hooks/esm/src/core/hooks/useToggle.js.map +1 -1
  20. package/dist/hooks/index.css +250 -250
  21. package/dist/hooks/node_modules/gsap/CSSPlugin.js +11 -0
  22. package/dist/hooks/node_modules/gsap/CSSPlugin.js.map +1 -0
  23. package/dist/hooks/node_modules/gsap/gsap-core.js +11 -0
  24. package/dist/hooks/node_modules/gsap/gsap-core.js.map +1 -0
  25. package/dist/hooks/node_modules/gsap/index.js +2 -0
  26. package/dist/hooks/node_modules/gsap/index.js.map +1 -0
  27. package/dist/hooks/src/core/hooks/index.js +1 -1
  28. package/dist/hooks/src/core/hooks/useAnimation.js +2 -0
  29. package/dist/hooks/src/core/hooks/useAnimation.js.map +1 -0
  30. package/dist/hooks/src/core/hooks/useClassNames.js.map +1 -1
  31. package/dist/hooks/src/core/hooks/useIntersectionObserver.js +2 -0
  32. package/dist/hooks/src/core/hooks/useIntersectionObserver.js.map +1 -0
  33. package/dist/hooks/src/core/hooks/useOutsideClick.js.map +1 -1
  34. package/dist/hooks/src/core/hooks/useParseProps.js.map +1 -1
  35. package/dist/hooks/src/core/hooks/useResize.js.map +1 -1
  36. package/dist/hooks/src/core/hooks/useThemePreference.js +1 -1
  37. package/dist/hooks/src/core/hooks/useThemePreference.js.map +1 -1
  38. package/dist/hooks/src/core/hooks/useToggle.js.map +1 -1
  39. package/dist/lib/cjs/node_modules/gsap/CSSPlugin.js +11 -0
  40. package/dist/lib/cjs/node_modules/gsap/CSSPlugin.js.map +1 -0
  41. package/dist/lib/cjs/node_modules/gsap/gsap-core.js +11 -0
  42. package/dist/lib/cjs/node_modules/gsap/gsap-core.js.map +1 -0
  43. package/dist/lib/cjs/node_modules/gsap/index.js +2 -0
  44. package/dist/lib/cjs/node_modules/gsap/index.js.map +1 -0
  45. package/dist/lib/cjs/src/core/hooks/useAnimation.js +2 -0
  46. package/dist/lib/cjs/src/core/hooks/useAnimation.js.map +1 -0
  47. package/dist/lib/cjs/src/core/hooks/useClassNames.js.map +1 -1
  48. package/dist/lib/cjs/src/core/hooks/useIntersectionObserver.js +2 -0
  49. package/dist/lib/cjs/src/core/hooks/useIntersectionObserver.js.map +1 -0
  50. package/dist/lib/cjs/src/core/hooks/useOutsideClick.js.map +1 -1
  51. package/dist/lib/cjs/src/core/hooks/useParseProps.js.map +1 -1
  52. package/dist/lib/cjs/src/core/hooks/useResize.js.map +1 -1
  53. package/dist/lib/cjs/src/core/hooks/useThemePreference.js +1 -1
  54. package/dist/lib/cjs/src/core/hooks/useThemePreference.js.map +1 -1
  55. package/dist/lib/cjs/src/core/hooks/useToggle.js.map +1 -1
  56. package/dist/lib/cjs/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  57. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +1 -1
  58. package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js.map +1 -1
  59. package/dist/lib/cjs/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  60. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  61. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  62. package/dist/lib/cjs/src/index.js +1 -1
  63. package/dist/lib/esm/node_modules/gsap/CSSPlugin.js +11 -0
  64. package/dist/lib/esm/node_modules/gsap/CSSPlugin.js.map +1 -0
  65. package/dist/lib/esm/node_modules/gsap/gsap-core.js +11 -0
  66. package/dist/lib/esm/node_modules/gsap/gsap-core.js.map +1 -0
  67. package/dist/lib/esm/node_modules/gsap/index.js +2 -0
  68. package/dist/lib/esm/node_modules/gsap/index.js.map +1 -0
  69. package/dist/lib/esm/src/core/hooks/useAnimation.js +2 -0
  70. package/dist/lib/esm/src/core/hooks/useAnimation.js.map +1 -0
  71. package/dist/lib/esm/src/core/hooks/useClassNames.js.map +1 -1
  72. package/dist/lib/esm/src/core/hooks/useIntersectionObserver.js +2 -0
  73. package/dist/lib/esm/src/core/hooks/useIntersectionObserver.js.map +1 -0
  74. package/dist/lib/esm/src/core/hooks/useOutsideClick.js.map +1 -1
  75. package/dist/lib/esm/src/core/hooks/useParseProps.js.map +1 -1
  76. package/dist/lib/esm/src/core/hooks/useResize.js.map +1 -1
  77. package/dist/lib/esm/src/core/hooks/useThemePreference.js +1 -1
  78. package/dist/lib/esm/src/core/hooks/useThemePreference.js.map +1 -1
  79. package/dist/lib/esm/src/core/hooks/useToggle.js.map +1 -1
  80. package/dist/lib/esm/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  81. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  82. package/dist/lib/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
  83. package/dist/lib/esm/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  84. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  85. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  86. package/dist/lib/esm/src/index.js +1 -1
  87. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  88. package/dist/types/src/core/hooks/index.d.ts +2 -0
  89. package/dist/types/src/core/hooks/index.d.ts.map +1 -1
  90. package/dist/types/src/core/hooks/useAnimation.d.ts +23 -0
  91. package/dist/types/src/core/hooks/useAnimation.d.ts.map +1 -0
  92. package/dist/types/src/core/hooks/useClassNames.d.ts +6 -0
  93. package/dist/types/src/core/hooks/useClassNames.d.ts.map +1 -1
  94. package/dist/types/src/core/hooks/useIntersectionObserver.d.ts +28 -0
  95. package/dist/types/src/core/hooks/useIntersectionObserver.d.ts.map +1 -0
  96. package/dist/types/src/core/hooks/useOutsideClick.d.ts +14 -0
  97. package/dist/types/src/core/hooks/useOutsideClick.d.ts.map +1 -1
  98. package/dist/types/src/core/hooks/useParseProps.d.ts +5 -0
  99. package/dist/types/src/core/hooks/useParseProps.d.ts.map +1 -1
  100. package/dist/types/src/core/hooks/useResize.d.ts +23 -0
  101. package/dist/types/src/core/hooks/useResize.d.ts.map +1 -1
  102. package/dist/types/src/core/hooks/useThemePreference.d.ts +37 -1
  103. package/dist/types/src/core/hooks/useThemePreference.d.ts.map +1 -1
  104. package/dist/types/src/core/hooks/useToggle.d.ts +17 -2
  105. package/dist/types/src/core/hooks/useToggle.d.ts.map +1 -1
  106. package/dist/ui/esm/src/core/hooks/useOutsideClick.js.map +1 -1
  107. package/dist/ui/esm/src/core/hooks/useParseProps.js.map +1 -1
  108. package/dist/ui/esm/src/core/hooks/useResize.js.map +1 -1
  109. package/dist/ui/esm/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  110. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  111. package/dist/ui/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
  112. package/dist/ui/esm/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  113. package/dist/ui/src/core/hooks/useOutsideClick.js.map +1 -1
  114. package/dist/ui/src/core/hooks/useParseProps.js.map +1 -1
  115. package/dist/ui/src/core/hooks/useResize.js.map +1 -1
  116. package/dist/ui/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  117. package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
  118. package/dist/ui/src/core/ui/components/icon/IconWC.js.map +1 -1
  119. package/dist/ui/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  120. package/dist/utils/esm/index.css +250 -250
  121. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  122. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  123. package/dist/utils/index.css +250 -250
  124. package/dist/utils/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  125. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  126. package/package.json +2 -1
@@ -1,3 +1,61 @@
1
+ .divider-module_divider-line__6CesR {
2
+ position: relative;
3
+ display: block;
4
+ transition: opacity, width, height 250ms ease-in-out;
5
+ background-color: var(--color);
6
+ opacity: var(--opacity);
7
+ }
8
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
9
+ height: var(--length);
10
+ left: var(--left);
11
+ width: var(--width);
12
+ margin: var(--margin);
13
+ }
14
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
15
+ width: var(--length);
16
+ left: var(--left);
17
+ height: var(--height);
18
+ margin: var(--margin);
19
+ }
20
+ .errorBoundary-module_errorBoundary__gk9ps {
21
+ background: #EFEFEF;
22
+ width: 100%;
23
+ height: 100%;
24
+ }
25
+
26
+ .errorBoundary-module_StyledIcon__IYHiU {
27
+ margin-right: 10px;
28
+ }
29
+ .icon-module_icon-base-parent__nOMvW {
30
+ line-height: 1px !important;
31
+ }
32
+
33
+ .icon-module_icon-base__S0tHf {
34
+ min-width: var(--min-width);
35
+ min-height: var(--min-height);
36
+ width: var(--width) !important;
37
+ height: var(--height) !important;
38
+ line-height: 1px !important;
39
+ background-color: var(--icon-color);
40
+ color: var(--icon-content-color);
41
+ background-repeat: no-repeat;
42
+ mask-image: var(--icon-url);
43
+ -webkit-mask-image: var(--icon-url);
44
+ mask-repeat: no-repeat;
45
+ -webkit-mask-repeat: no-repeat;
46
+ mask-size: contain;
47
+ -webkit-mask-size: contain;
48
+ mask-position: center;
49
+ -webkit-mask-position: center;
50
+ display: inline-block;
51
+ will-change: transform;
52
+ transform: translate3d(0, 0, 0);
53
+ }
54
+ .icon-module_icon-base__S0tHf svg {
55
+ fill: var(--icon-content-color);
56
+ width: var(--height);
57
+ height: var(--width);
58
+ }
1
59
  .field-module_field__UfKm3 {
2
60
  opacity: 1;
3
61
  pointer-events: auto;
@@ -72,64 +130,6 @@
72
130
  .field-module_field__UfKm3 label {
73
131
  text-align: left;
74
132
  }
75
- .icon-module_icon-base-parent__nOMvW {
76
- line-height: 1px !important;
77
- }
78
-
79
- .icon-module_icon-base__S0tHf {
80
- min-width: var(--min-width);
81
- min-height: var(--min-height);
82
- width: var(--width) !important;
83
- height: var(--height) !important;
84
- line-height: 1px !important;
85
- background-color: var(--icon-color);
86
- color: var(--icon-content-color);
87
- background-repeat: no-repeat;
88
- mask-image: var(--icon-url);
89
- -webkit-mask-image: var(--icon-url);
90
- mask-repeat: no-repeat;
91
- -webkit-mask-repeat: no-repeat;
92
- mask-size: contain;
93
- -webkit-mask-size: contain;
94
- mask-position: center;
95
- -webkit-mask-position: center;
96
- display: inline-block;
97
- will-change: transform;
98
- transform: translate3d(0, 0, 0);
99
- }
100
- .icon-module_icon-base__S0tHf svg {
101
- fill: var(--icon-content-color);
102
- width: var(--height);
103
- height: var(--width);
104
- }
105
- .errorBoundary-module_errorBoundary__gk9ps {
106
- background: #EFEFEF;
107
- width: 100%;
108
- height: 100%;
109
- }
110
-
111
- .errorBoundary-module_StyledIcon__IYHiU {
112
- margin-right: 10px;
113
- }
114
- .divider-module_divider-line__6CesR {
115
- position: relative;
116
- display: block;
117
- transition: opacity, width, height 250ms ease-in-out;
118
- background-color: var(--color);
119
- opacity: var(--opacity);
120
- }
121
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
122
- height: var(--length);
123
- left: var(--left);
124
- width: var(--width);
125
- margin: var(--margin);
126
- }
127
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
128
- width: var(--length);
129
- left: var(--left);
130
- height: var(--height);
131
- margin: var(--margin);
132
- }
133
133
  .CollapsibleContainer-module_collapsible-container__u0Jmm {
134
134
  transform-origin: 0% 0%;
135
135
  opacity: 0;
@@ -234,6 +234,102 @@
234
234
  --divider-line: #4a4b4b;
235
235
  }
236
236
 
237
+ .popup-module_overflow-hidden__uimg4, .popup-module_text-truncate__y-5c1 {
238
+ overflow: hidden !important;
239
+ }
240
+
241
+ .popup-module_text-nowrap__eDCv3, .popup-module_text-truncate__y-5c1 {
242
+ white-space: nowrap !important;
243
+ }
244
+
245
+ .popup-module_text-ellipsis__yu8nx, .popup-module_text-truncate__y-5c1 {
246
+ text-overflow: ellipsis !important;
247
+ }
248
+
249
+ .popup-module_popup-container__PJ0oQ {
250
+ --popup-width: 60vw;
251
+ --popup-height: 50vh;
252
+ position: fixed;
253
+ width: var(--popup-width);
254
+ height: var(--popup-height);
255
+ --slideXFrom: 0;
256
+ --slideYFrom: 0;
257
+ will-change: opacity;
258
+ transition: opacity 300ms ease-in-out;
259
+ opacity: 0;
260
+ visibility: hidden;
261
+ pointer-events: none;
262
+ }
263
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz {
264
+ position: relative;
265
+ flex-direction: column;
266
+ align-items: start;
267
+ width: 100%;
268
+ height: 100%;
269
+ overflow-x: clip;
270
+ background-color: #090A0A;
271
+ border-radius: 4px;
272
+ box-shadow: 0px 10px 20px 4px rgba(0, 0, 0, 0.15);
273
+ transition: transform 350ms ease-out;
274
+ will-change: transform;
275
+ transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
276
+ }
277
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz button {
278
+ margin-bottom: 0;
279
+ }
280
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx {
281
+ cursor: pointer;
282
+ line-height: 1px;
283
+ background-color: rgba(255, 255, 255, 0);
284
+ }
285
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx .icon-base {
286
+ background-color: #FDDA0D;
287
+ width: 9px !important;
288
+ height: 9px !important;
289
+ line-height: 1px !important;
290
+ }
291
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx:hover .icon-base {
292
+ background-color: #FFEA00;
293
+ }
294
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm {
295
+ width: 100%;
296
+ height: 100%;
297
+ padding: 24px;
298
+ overflow-y: auto;
299
+ display: flex;
300
+ }
301
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm > * {
302
+ overflow-y: auto;
303
+ }
304
+ .popup-module_popup-container__PJ0oQ[data-show] {
305
+ opacity: 1;
306
+ visibility: visible;
307
+ pointer-events: all;
308
+ }
309
+ .popup-module_popup-container__PJ0oQ[data-show] .popup-module_popup-container-inner__n83Cz {
310
+ transform: translateX(0) translateY(0);
311
+ }
312
+ .popup-module_popup-container__PJ0oQ[data-show=false] {
313
+ opacity: 0;
314
+ visibility: hidden;
315
+ pointer-events: none;
316
+ }
317
+ .popup-module_popup-container__PJ0oQ[data-show=false] .popup-module_popup-container-inner__n83Cz {
318
+ transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
319
+ }
320
+
321
+ .cui-theme-dark .popup-module_popup-container-inner__n83Cz {
322
+ background-color: #090A0A;
323
+ color: #F4F4F4;
324
+ }
325
+ .cui-theme-light .popup-module_popup-container-inner__n83Cz {
326
+ background-color: #090A0A;
327
+ color: #F4F4F4;
328
+ }
329
+ :root {
330
+ --divider-line: #4a4b4b;
331
+ }
332
+
237
333
  .typography-module_overflow-hidden__UmQ-v, .typography-module_text-truncate__8MgV9 {
238
334
  overflow: hidden !important;
239
335
  }
@@ -300,120 +396,6 @@
300
396
  --divider-line: #4a4b4b;
301
397
  }
302
398
 
303
- .tooltip-module_overflow-hidden__YDzdx, .tooltip-module_text-truncate__CPvp3 {
304
- overflow: hidden !important;
305
- }
306
-
307
- .tooltip-module_text-nowrap__g6kzP, .tooltip-module_text-truncate__CPvp3 {
308
- white-space: nowrap !important;
309
- }
310
-
311
- .tooltip-module_text-ellipsis__AYivV, .tooltip-module_text-truncate__CPvp3 {
312
- text-overflow: ellipsis !important;
313
- }
314
-
315
- .tooltip-module_popover-tooltip__sAhKa {
316
- position: fixed;
317
- z-index: 999;
318
- will-change: opacity;
319
- transition: opacity 450ms ease;
320
- opacity: 0;
321
- visibility: hidden;
322
- border-radius: 4px;
323
- background-color: #1B1D1D;
324
- box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.16);
325
- }
326
- .tooltip-module_popover-tooltip__sAhKa span, .tooltip-module_popover-tooltip__sAhKa p, .tooltip-module_popover-tooltip__sAhKa h3 {
327
- margin: 0;
328
- padding: 0;
329
- }
330
- .tooltip-module_popover-tooltip__sAhKa p {
331
- display: -webkit-box;
332
- -webkit-line-clamp: 4; /* number of lines to show */
333
- line-clamp: 4;
334
- -webkit-box-orient: vertical;
335
- margin: 0;
336
- width: 100%;
337
- white-space: normal;
338
- overflow: auto;
339
- }
340
- .tooltip-module_popover-tooltip__sAhKa[data-show] {
341
- opacity: 1;
342
- visibility: visible;
343
- }
344
- .tooltip-module_popover-tooltip__sAhKa[data-show=false] {
345
- opacity: 0;
346
- visibility: hidden;
347
- }
348
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi {
349
- bottom: -16px;
350
- }
351
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
352
- transform: rotate(0deg);
353
- }
354
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi {
355
- top: -16px;
356
- }
357
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
358
- transform: rotate(180deg);
359
- }
360
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi {
361
- right: -16px;
362
- }
363
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
364
- transform: rotate(-90deg);
365
- }
366
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi {
367
- left: -16px;
368
- }
369
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
370
- transform: rotate(90deg);
371
- }
372
- .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi {
373
- position: absolute;
374
- }
375
- .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
376
- content: "";
377
- border-width: 8px;
378
- border-style: solid;
379
- border-color: #1B1D1D transparent transparent transparent;
380
- }
381
-
382
- .tooltip-module_close-button__o8OBN {
383
- cursor: pointer;
384
- line-height: 1px;
385
- background-color: rgba(255, 255, 255, 0);
386
- }
387
- .tooltip-module_close-button__o8OBN .icon-base {
388
- background-color: #FDDA0D;
389
- width: 9px !important;
390
- height: 9px !important;
391
- line-height: 1px !important;
392
- }
393
- .tooltip-module_close-button__o8OBN:hover .icon-base {
394
- background-color: #FFEA00;
395
- }
396
-
397
- .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa {
398
- background-color: #1B1D1D;
399
- color: #F4F4F4;
400
- }
401
- .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
402
- border-color: #1B1D1D transparent transparent transparent;
403
- }
404
- .cui-theme-light {
405
- color: #1B1D1D;
406
- }
407
- .cui-theme-light .tooltip-module_popover-tooltip__sAhKa {
408
- background-color: #515757;
409
- }
410
- .cui-theme-light .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
411
- border-color: #515757 transparent transparent transparent;
412
- }
413
- :root {
414
- --divider-line: #4a4b4b;
415
- }
416
-
417
399
  .button-module_overflow-hidden__Vc5AU, .button-module_text-truncate__a89Bp {
418
400
  overflow: hidden !important;
419
401
  }
@@ -537,124 +519,142 @@
537
519
  width: 100%;
538
520
  min-width: 0;
539
521
  }
540
- .popup-overlay-module_popup-modal-overlay__dlJqM {
541
- z-index: 1;
542
- position: fixed;
543
- width: 100%;
544
- height: 100%;
545
- top: 0;
546
- left: 0;
547
- background: rgba(40, 80, 120, 0.8) !important;
548
- pointer-events: all;
549
- user-select: none;
550
- will-change: opacity;
551
- transition: opacity 450ms ease-in-out;
552
- opacity: 0;
553
- visibility: hidden;
554
- }
555
- .popup-overlay-module_popup-modal-overlay__dlJqM[data-show] {
556
- opacity: 1;
557
- visibility: visible;
558
- }
559
- .popup-overlay-module_popup-modal-overlay__dlJqM[data-show=false] {
560
- opacity: 0;
561
- visibility: hidden;
562
- }
563
522
  :root {
564
523
  --divider-line: #4a4b4b;
565
524
  }
566
525
 
567
- .popup-module_overflow-hidden__uimg4, .popup-module_text-truncate__y-5c1 {
526
+ .tooltip-module_overflow-hidden__YDzdx, .tooltip-module_text-truncate__CPvp3 {
568
527
  overflow: hidden !important;
569
528
  }
570
529
 
571
- .popup-module_text-nowrap__eDCv3, .popup-module_text-truncate__y-5c1 {
530
+ .tooltip-module_text-nowrap__g6kzP, .tooltip-module_text-truncate__CPvp3 {
572
531
  white-space: nowrap !important;
573
532
  }
574
533
 
575
- .popup-module_text-ellipsis__yu8nx, .popup-module_text-truncate__y-5c1 {
534
+ .tooltip-module_text-ellipsis__AYivV, .tooltip-module_text-truncate__CPvp3 {
576
535
  text-overflow: ellipsis !important;
577
536
  }
578
537
 
579
- .popup-module_popup-container__PJ0oQ {
580
- --popup-width: 60vw;
581
- --popup-height: 50vh;
538
+ .tooltip-module_popover-tooltip__sAhKa {
582
539
  position: fixed;
583
- width: var(--popup-width);
584
- height: var(--popup-height);
585
- --slideXFrom: 0;
586
- --slideYFrom: 0;
540
+ z-index: 999;
587
541
  will-change: opacity;
588
- transition: opacity 300ms ease-in-out;
542
+ transition: opacity 450ms ease;
589
543
  opacity: 0;
590
544
  visibility: hidden;
591
- pointer-events: none;
545
+ border-radius: 4px;
546
+ background-color: #1B1D1D;
547
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.16);
592
548
  }
593
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz {
594
- position: relative;
595
- flex-direction: column;
596
- align-items: start;
549
+ .tooltip-module_popover-tooltip__sAhKa span, .tooltip-module_popover-tooltip__sAhKa p, .tooltip-module_popover-tooltip__sAhKa h3 {
550
+ margin: 0;
551
+ padding: 0;
552
+ }
553
+ .tooltip-module_popover-tooltip__sAhKa p {
554
+ display: -webkit-box;
555
+ -webkit-line-clamp: 4; /* number of lines to show */
556
+ line-clamp: 4;
557
+ -webkit-box-orient: vertical;
558
+ margin: 0;
597
559
  width: 100%;
598
- height: 100%;
599
- overflow-x: clip;
600
- background-color: #090A0A;
601
- border-radius: 4px;
602
- box-shadow: 0px 10px 20px 4px rgba(0, 0, 0, 0.15);
603
- transition: transform 350ms ease-out;
604
- will-change: transform;
605
- transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
560
+ white-space: normal;
561
+ overflow: auto;
606
562
  }
607
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz button {
608
- margin-bottom: 0;
563
+ .tooltip-module_popover-tooltip__sAhKa[data-show] {
564
+ opacity: 1;
565
+ visibility: visible;
609
566
  }
610
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx {
567
+ .tooltip-module_popover-tooltip__sAhKa[data-show=false] {
568
+ opacity: 0;
569
+ visibility: hidden;
570
+ }
571
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi {
572
+ bottom: -16px;
573
+ }
574
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
575
+ transform: rotate(0deg);
576
+ }
577
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi {
578
+ top: -16px;
579
+ }
580
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
581
+ transform: rotate(180deg);
582
+ }
583
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi {
584
+ right: -16px;
585
+ }
586
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
587
+ transform: rotate(-90deg);
588
+ }
589
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi {
590
+ left: -16px;
591
+ }
592
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
593
+ transform: rotate(90deg);
594
+ }
595
+ .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi {
596
+ position: absolute;
597
+ }
598
+ .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
599
+ content: "";
600
+ border-width: 8px;
601
+ border-style: solid;
602
+ border-color: #1B1D1D transparent transparent transparent;
603
+ }
604
+
605
+ .tooltip-module_close-button__o8OBN {
611
606
  cursor: pointer;
612
607
  line-height: 1px;
613
608
  background-color: rgba(255, 255, 255, 0);
614
609
  }
615
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx .icon-base {
610
+ .tooltip-module_close-button__o8OBN .icon-base {
616
611
  background-color: #FDDA0D;
617
612
  width: 9px !important;
618
613
  height: 9px !important;
619
614
  line-height: 1px !important;
620
615
  }
621
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx:hover .icon-base {
616
+ .tooltip-module_close-button__o8OBN:hover .icon-base {
622
617
  background-color: #FFEA00;
623
618
  }
624
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm {
625
- width: 100%;
626
- height: 100%;
627
- padding: 24px;
628
- overflow-y: auto;
629
- display: flex;
619
+
620
+ .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa {
621
+ background-color: #1B1D1D;
622
+ color: #F4F4F4;
630
623
  }
631
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm > * {
632
- overflow-y: auto;
624
+ .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
625
+ border-color: #1B1D1D transparent transparent transparent;
633
626
  }
634
- .popup-module_popup-container__PJ0oQ[data-show] {
635
- opacity: 1;
636
- visibility: visible;
637
- pointer-events: all;
627
+ .cui-theme-light {
628
+ color: #1B1D1D;
638
629
  }
639
- .popup-module_popup-container__PJ0oQ[data-show] .popup-module_popup-container-inner__n83Cz {
640
- transform: translateX(0) translateY(0);
630
+ .cui-theme-light .tooltip-module_popover-tooltip__sAhKa {
631
+ background-color: #515757;
641
632
  }
642
- .popup-module_popup-container__PJ0oQ[data-show=false] {
633
+ .cui-theme-light .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
634
+ border-color: #515757 transparent transparent transparent;
635
+ }
636
+ .popup-overlay-module_popup-modal-overlay__dlJqM {
637
+ z-index: 1;
638
+ position: fixed;
639
+ width: 100%;
640
+ height: 100%;
641
+ top: 0;
642
+ left: 0;
643
+ background: rgba(40, 80, 120, 0.8) !important;
644
+ pointer-events: all;
645
+ user-select: none;
646
+ will-change: opacity;
647
+ transition: opacity 450ms ease-in-out;
643
648
  opacity: 0;
644
649
  visibility: hidden;
645
- pointer-events: none;
646
650
  }
647
- .popup-module_popup-container__PJ0oQ[data-show=false] .popup-module_popup-container-inner__n83Cz {
648
- transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
649
- }
650
-
651
- .cui-theme-dark .popup-module_popup-container-inner__n83Cz {
652
- background-color: #090A0A;
653
- color: #F4F4F4;
651
+ .popup-overlay-module_popup-modal-overlay__dlJqM[data-show] {
652
+ opacity: 1;
653
+ visibility: visible;
654
654
  }
655
- .cui-theme-light .popup-module_popup-container-inner__n83Cz {
656
- background-color: #090A0A;
657
- color: #F4F4F4;
655
+ .popup-overlay-module_popup-modal-overlay__dlJqM[data-show=false] {
656
+ opacity: 0;
657
+ visibility: hidden;
658
658
  }
659
659
  :root {
660
660
  --divider-line: #4a4b4b;
@@ -1 +1 @@
1
- {"version":3,"file":"peregrineMQ.js","sources":["../../../../../../../src/core/utils/appState/peregrineMQ/peregrineMQ.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport { Callback, Config, PeregrineMQApi, SubscribersSet, UnsubscribeOptions } from './peregrineMQ.types'\n\n\nexport class PeregrineMQClearError extends Error {\n constructor() {\n super('Clearing PeregrineMQ is not allowed. Please read the documentation for more information.')\n this.name = 'PeregrineMQClearError'\n }\n}\n\n/**\n * Represents a message queue with publish/subscribe functionality.\n */\nexport class PeregrineMQ implements PeregrineMQApi {\n private id: string\n\n private config: Config = {\n allowAutoPrune: false,\n pruneInterval: 10000,\n allowClear: false,\n }\n\n /**\n * The map of channels and their subscribers sets.\n */\n private channels: Map<string, SubscribersSet> = new Map()\n\n /**\n * The map of listeners and their subscribed channels.\n */\n private listeners: Map<Callback, SubscribersSet[]> = new Map()\n\n /**\n * Adds a callback as a listener to a channel.\n * @param callback The callback function to add as a listener.\n * @param channel The channel to add the listener to.\n */\n private addListener = (callback: Callback, channel: string): void => {\n const listener = this.listeners.get(callback)\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet) {\n if (listener) {\n listener.push(subscribersSet)\n } else {\n this.listeners.set(callback, [subscribersSet])\n }\n }\n }\n\n /**\n * Removes the callback from the listeners collection if it is not subscribed to any channels.\n * @description Removes the callback only when it is not present in any other subscriberSet\n * (Ref to Map<string, SubscribersSet>).\n * @param callback The callback to remove from listeners.\n */\n private removeListener = (callback: Callback): void => {\n const channelSubscriberSets = this.listeners.get(callback)\n let isEmpty = true\n\n // eslint-disable-next-line no-restricted-syntax\n for (const channelSubscriberSet of channelSubscriberSets || []) {\n isEmpty = !channelSubscriberSet.has(callback)\n if (!isEmpty) {\n break\n }\n }\n\n if (isEmpty) {\n this.listeners.delete(callback)\n }\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param isParent Indicates if the channel is a parent channel.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n private publishToChannel = (channel: string, isParent: boolean, data?: unknown): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (!subscribersSet) {\n return isParent\n }\n\n const iterator = subscribersSet[Symbol.iterator]()\n let subscriberFunc = iterator.next().value\n\n // eslint-disable-next-line no-plusplus\n while (subscriberFunc) {\n subscriberFunc(channel, data)\n subscriberFunc = iterator.next().value\n }\n return true\n }\n\n /**\n * Creates a new instance of PeregrineMQ.\n * @param id Specific instance of PeregrineMQ identifier\n * @param config The configuration options for PeregrineMQ.\n */\n constructor(id?: string, config?: Config) {\n this.id = id || uuidv4()\n this.configure(config || {})\n }\n\n /**\n * Gets the total number of subscribers across all channels.\n */\n get length(): number {\n return [...this.channels.values()].reduce((acc, subscribersList) => acc + subscribersList.size, 0)\n }\n\n /**\n * Configures PeregrineMQ with the specified options.\n * @param config The configuration options for PeregrineMQ.\n * @returns An object containing the prune interval handler (if auto prune is enabled).\n */\n configure = (config: Config): {\n clearPruneInterval?: () => void\n restartPruneInterval?: () => void\n } => {\n this.config = config\n const { allowAutoPrune, pruneInterval } = config\n\n let pruneIntervalHandler: ReturnType<typeof setInterval>\n\n if (allowAutoPrune) {\n pruneIntervalHandler = setInterval(() => {\n this.prune()\n }, pruneInterval)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instance: PeregrineMQ = this\n\n return {\n ...(allowAutoPrune\n ? {\n clearPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n },\n restartPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n pruneIntervalHandler = setInterval(() => {\n instance.prune()\n }, pruneInterval)\n },\n }\n : {}),\n }\n }\n\n /**\n * Gets an array of all channels.\n * @returns An array of channel names.\n */\n getChannels = (): string[] => [...this.channels.keys()]\n\n /**\n * Prunes the channels with no subscribers.\n * @returns An array of pruned channel names.\n */\n prune = (): string[] => {\n const iterator = this.channels[Symbol.iterator]()\n let subscribersSet = iterator.next().value\n const prunedChannels: string[] = []\n\n // eslint-disable-next-line no-plusplus\n while (subscribersSet) {\n if (subscribersSet[1]?.size === 0) {\n prunedChannels.push(subscribersSet[0])\n this.channels.delete(subscribersSet[0])\n }\n subscribersSet = iterator.next().value\n }\n\n return prunedChannels\n }\n\n /**\n * Removes a channel and its subscribers.\n * @param channel The channel to remove.\n * @returns A boolean indicating if the channel was successfully removed.\n */\n removeChannel = (channel: string): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet && subscribersSet.size > 0) {\n const channelListeners = [...subscribersSet || []]\n\n subscribersSet.clear()\n\n let index = channelListeners.length\n\n // eslint-disable-next-line no-plusplus\n while (index--) {\n this.removeListener(channelListeners[index])\n }\n }\n\n return this.channels.delete(channel)\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n publish = <T>(channel: string, data?: T): boolean => {\n if (channel.includes('.')) {\n const nestedChannels = channel.split('.')\n\n let { length } = nestedChannels\n let failed = false\n\n // eslint-disable-next-line no-plusplus\n while (length--) {\n const result = this.publishToChannel(\n nestedChannels.slice(0, length + 1).join('.'),\n length !== nestedChannels.length - 1,\n data,\n )\n\n if (!result) {\n failed = true\n }\n }\n return !failed\n }\n\n return this.publishToChannel(channel, false, data)\n }\n\n /**\n * Subscribes a callback to a channel.\n * @param channel The channel to subscribe to.\n * @param callback The callback function to subscribe.\n * @returns A function to unsubscribe the callback.\n */\n subscribe = (channel: string, callback: Callback): () => boolean => {\n const subscribersList = this.channels.get(channel)\n\n if (subscribersList) {\n subscribersList.add(callback)\n } else {\n this.channels.set(channel, new Set([callback]))\n }\n\n this.addListener(callback, channel)\n\n return () => this.unsubscribe(callback, { channel, prune: true })\n }\n\n /**\n * Unsubscribes a callback from a channel or all channels.\n * @param callback The callback function to unsubscribe.\n * @param options Optional unsubscribe options.\n * @returns A boolean indicating if the callback was successfully unsubscribed.\n */\n unsubscribe = (callback: Callback, options?: UnsubscribeOptions): boolean => {\n const { channel, prune } = options || {}\n\n let unsubscribed = false\n\n if (channel) {\n const subscriberSet = this.channels.get(channel)\n\n unsubscribed = subscriberSet ? subscriberSet.delete(callback) : false\n if (prune && subscriberSet?.size === 0) {\n this.channels.delete(channel)\n }\n\n this.removeListener(callback)\n\n return unsubscribed\n }\n\n const subscriberSetArray = this.listeners.get(callback) || []\n\n // remove callback form listeners and all channels\n // TODO remove only if has\n // eslint-disable-next-line no-restricted-syntax\n for (const subscriberSet of subscriberSetArray) {\n unsubscribed = subscriberSet.delete(callback) as boolean\n\n if (prune && subscriberSet.size === 0) {\n this.prune()\n }\n }\n\n this.listeners.delete(callback)\n\n return unsubscribed\n }\n\n /**\n * Checks if a callback is subscribed to a specific channel or any channel.\n * @param callback The callback function to check.\n * @param channel Optional channel name to check subscription for.\n * @returns A boolean indicating if the callback is subscribed.\n */\n isSubscribed = (callback: Callback, channel?: string): boolean => {\n if (channel) {\n const subscribersList = this.channels.get(channel)\n\n return subscribersList ? subscribersList.has(callback) : false\n }\n\n return this.listeners.has(callback)\n }\n\n /**\n * Clears all channels and listeners.\n * @throws {Error} If clearing PeregrineMQ is not allowed.\n */\n clear = (): void => {\n if (this.config.allowClear) {\n this.channels.clear()\n this.listeners.clear()\n } else {\n throw new PeregrineMQClearError()\n }\n }\n\n /**\n * Returns the specific instance of PeregrineMQ.\n * @returns A string identifier of the specific instance of PeregrineMQ.\n */\n getId = (): string => this.id\n}\n"],"names":["PeregrineMQClearError","Error","constructor","super","this","name","id","config","allowAutoPrune","pruneInterval","allowClear","channels","Map","listeners","addListener","callback","channel","listener","get","subscribersSet","push","set","removeListener","channelSubscriberSets","isEmpty","channelSubscriberSet","has","delete","publishToChannel","isParent","data","iterator","Symbol","subscriberFunc","next","value","configure","pruneIntervalHandler","setInterval","prune","instance","clearPruneInterval","clearInterval","restartPruneInterval","getChannels","keys","prunedChannels","size","removeChannel","channelListeners","clear","index","length","publish","includes","nestedChannels","split","failed","slice","join","subscribe","subscribersList","add","Set","unsubscribe","options","unsubscribed","subscriberSet","subscriberSetArray","isSubscribed","getId","uuidv4","values","reduce","acc"],"mappings":"sFAKO,MAAMA,UAA8BC,MACzCC,WAAAA,GACEC,MAAM,4FACNC,KAAKC,KAAO,uBACd,sBAMK,MA0FLH,WAAAA,CAAYI,EAAaC,GAAiBH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jD,EAAoBkD,KACjC,MAAMjD,QAAEA,EAAOuB,MAAEA,GAAU0B,GAAW,CAAA,EAEtC,IAAIC,GAAe,EAEnB,GAAIlD,EAAS,CACX,MAAMmD,EAAgB/D,KAAKO,SAASO,IAAIF,GASxC,OAPAkD,IAAeC,GAAgBA,EAAcxC,OAAOZ,GAChDwB,GAAiC,IAAxB4B,GAAepB,MAC1B3C,KAAKO,SAASgB,OAAOX,GAGvBZ,KAAKkB,eAAeP,GAEbmD,CACT,CAEA,MAAME,EAAqBhE,KAAKS,UAAUK,IAAIH,IAAa,GAK3D,IAAK,MAAMoD,KAAiBC,EAC1BF,EAAeC,EAAcxC,OAAOZ,GAEhCwB,GAAgC,IAAvB4B,EAAcpB,MACzB3C,KAAKmC,QAMT,OAFAnC,KAAKS,UAAUc,OAAOZ,GAEfmD,CAAY,EAGrB9D,KAMAiE,aAAe,CAACtD,EAAoBC,KAClC,GAAIA,EAAS,CACX,MAAM6C,EAAkBzD,KAAKO,SAASO,IAAIF,GAE1C,QAAO6C,GAAkBA,EAAgBnC,IAAIX,EAC/C,CAEA,OAAOX,KAAKS,UAAUa,IAAIX,EAAS,EAGrCX,KAIA8C,MAAQ,KACN,IAAI9C,KAAKG,OAAOG,WAId,MAAM,IAAIV,EAHVI,KAAKO,SAASuC,QACd9C,KAAKS,UAAUqC,OAGjB,EAGF9C,KAIAkE,MAAQ,IAAclE,KAAKE,GApOzBF,KAAKE,GAAKA,GAAMiE,IAChBnE,KAAKgC,UAAU7B,GAAU,CAAA,EAC3B,CAKA,UAAI6C,GACF,MAAO,IAAIhD,KAAKO,SAAS6D,UAAUC,QAAO,CAACC,EAAKb,IAAoBa,EAAMb,EAAgBd,MAAM,EAClG"}
1
+ {"version":3,"file":"peregrineMQ.js","sources":["../../../../../../../src/core/utils/appState/peregrineMQ/peregrineMQ.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport { Callback, Config, PeregrineMQApi, SubscribersSet, UnsubscribeOptions } from './peregrineMQ.types'\n\n\nexport class PeregrineMQClearError extends Error {\n constructor() {\n super('Clearing PeregrineMQ is not allowed. Please read the documentation for more information.')\n this.name = 'PeregrineMQClearError'\n }\n}\n\n/**\n * Represents a message queue with publish/subscribe functionality.\n */\nexport class PeregrineMQ implements PeregrineMQApi {\n private id: string\n\n private config: Config = {\n allowAutoPrune: false,\n pruneInterval: 10000,\n allowClear: false,\n }\n\n /**\n * The map of channels and their subscribers sets.\n */\n private channels: Map<string, SubscribersSet> = new Map()\n\n /**\n * The map of listeners and their subscribed channels.\n */\n private listeners: Map<Callback, SubscribersSet[]> = new Map()\n\n /**\n * Adds a callback as a listener to a channel.\n * @param callback The callback function to add as a listener.\n * @param channel The channel to add the listener to.\n */\n private addListener = (callback: Callback, channel: string): void => {\n const listener = this.listeners.get(callback)\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet) {\n if (listener) {\n listener.push(subscribersSet)\n } else {\n this.listeners.set(callback, [subscribersSet])\n }\n }\n }\n\n /**\n * Removes the callback from the listeners collection if it is not subscribed to any channels.\n * @description Removes the callback only when it is not present in any other subscriberSet\n * (Ref to Map<string, SubscribersSet>).\n * @param callback The callback to remove from listeners.\n */\n private removeListener = (callback: Callback): void => {\n const channelSubscriberSets = this.listeners.get(callback)\n let isEmpty = true\n\n // eslint-disable-next-line no-restricted-syntax\n for (const channelSubscriberSet of channelSubscriberSets || []) {\n isEmpty = !channelSubscriberSet.has(callback)\n if (!isEmpty) {\n break\n }\n }\n\n if (isEmpty) {\n this.listeners.delete(callback)\n }\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param isParent Indicates if the channel is a parent channel.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n private publishToChannel = (channel: string, isParent: boolean, data?: unknown): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (!subscribersSet) {\n return isParent\n }\n\n const iterator = subscribersSet[Symbol.iterator]()\n let subscriberFunc = iterator.next().value\n\n // eslint-disable-next-line no-plusplus\n while (subscriberFunc) {\n subscriberFunc(channel, data)\n subscriberFunc = iterator.next().value\n }\n return true\n }\n\n /**\n * Creates a new instance of PeregrineMQ.\n * @param id Specific instance of PeregrineMQ identifier\n * @param config The configuration options for PeregrineMQ.\n */\n constructor(id?: string, config?: Config) {\n this.id = id || uuidv4()\n this.configure(config || {})\n }\n\n /**\n * Gets the total number of subscribers across all channels.\n */\n get length(): number {\n return [...this.channels.values()].reduce((acc, subscribersList) => acc + subscribersList.size, 0)\n }\n\n /**\n * Configures PeregrineMQ with the specified options.\n * @param config The configuration options for PeregrineMQ.\n * @returns An object containing the prune interval handler (if auto prune is enabled).\n */\n configure = (config: Config): {\n clearPruneInterval?: () => void\n restartPruneInterval?: () => void\n } => {\n this.config = config\n const { allowAutoPrune, pruneInterval } = config\n\n let pruneIntervalHandler: ReturnType<typeof setInterval>\n\n if (allowAutoPrune) {\n pruneIntervalHandler = setInterval(() => {\n this.prune()\n }, pruneInterval)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instance: PeregrineMQ = this\n\n return {\n ...(allowAutoPrune\n ? {\n clearPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n },\n restartPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n pruneIntervalHandler = setInterval(() => {\n instance.prune()\n }, pruneInterval)\n },\n }\n : {}),\n }\n }\n\n /**\n * Gets an array of all channels.\n * @returns An array of channel names.\n */\n getChannels = (): string[] => [...this.channels.keys()]\n\n /**\n * Prunes the channels with no subscribers.\n * @returns An array of pruned channel names.\n */\n prune = (): string[] => {\n const iterator = this.channels[Symbol.iterator]()\n let subscribersSet = iterator.next().value\n const prunedChannels: string[] = []\n\n // eslint-disable-next-line no-plusplus\n while (subscribersSet) {\n if (subscribersSet[1]?.size === 0) {\n prunedChannels.push(subscribersSet[0])\n this.channels.delete(subscribersSet[0])\n }\n subscribersSet = iterator.next().value\n }\n\n return prunedChannels\n }\n\n /**\n * Removes a channel and its subscribers.\n * @param channel The channel to remove.\n * @returns A boolean indicating if the channel was successfully removed.\n */\n removeChannel = (channel: string): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet && subscribersSet.size > 0) {\n const channelListeners = [...subscribersSet || []]\n\n subscribersSet.clear()\n\n let index = channelListeners.length\n\n // eslint-disable-next-line no-plusplus\n while (index--) {\n this.removeListener(channelListeners[index])\n }\n }\n\n return this.channels.delete(channel)\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n publish = <T>(channel: string, data?: T): boolean => {\n if (channel.includes('.')) {\n const nestedChannels = channel.split('.')\n\n let { length } = nestedChannels\n let failed = false\n\n // eslint-disable-next-line no-plusplus\n while (length--) {\n const result = this.publishToChannel(\n nestedChannels.slice(0, length + 1).join('.'),\n length !== nestedChannels.length - 1,\n data,\n )\n\n if (!result) {\n failed = true\n }\n }\n return !failed\n }\n\n return this.publishToChannel(channel, false, data)\n }\n\n /**\n * Subscribes a callback to a channel.\n * @param channel The channel to subscribe to.\n * @param callback The callback function to subscribe.\n * @returns A function to unsubscribe the callback.\n */\n subscribe = (channel: string, callback: Callback): () => boolean => {\n const subscribersList = this.channels.get(channel)\n\n if (subscribersList) {\n subscribersList.add(callback)\n } else {\n this.channels.set(channel, new Set([callback]))\n }\n\n this.addListener(callback, channel)\n\n return () => this.unsubscribe(callback, { channel, prune: true })\n }\n\n /**\n * Unsubscribes a callback from a channel or all channels.\n * @param callback The callback function to unsubscribe.\n * @param options Optional unsubscribe options.\n * @returns A boolean indicating if the callback was successfully unsubscribed.\n */\n unsubscribe = (callback: Callback, options?: UnsubscribeOptions): boolean => {\n const { channel, prune } = options || {}\n\n let unsubscribed = false\n\n if (channel) {\n const subscriberSet = this.channels.get(channel)\n\n unsubscribed = subscriberSet ? subscriberSet.delete(callback) : false\n if (prune && subscriberSet?.size === 0) {\n this.channels.delete(channel)\n }\n\n this.removeListener(callback)\n\n return unsubscribed\n }\n\n const subscriberSetArray = this.listeners.get(callback) || []\n\n // remove callback form listeners and all channels\n // TODO remove only if has\n // eslint-disable-next-line no-restricted-syntax\n for (const subscriberSet of subscriberSetArray) {\n unsubscribed = subscriberSet.delete(callback) as boolean\n\n if (prune && subscriberSet.size === 0) {\n this.prune()\n }\n }\n\n this.listeners.delete(callback)\n\n return unsubscribed\n }\n\n /**\n * Checks if a callback is subscribed to a specific channel or any channel.\n * @param callback The callback function to check.\n * @param channel Optional channel name to check subscription for.\n * @returns A boolean indicating if the callback is subscribed.\n */\n isSubscribed = (callback: Callback, channel?: string): boolean => {\n if (channel) {\n const subscribersList = this.channels.get(channel)\n\n return subscribersList ? subscribersList.has(callback) : false\n }\n\n return this.listeners.has(callback)\n }\n\n /**\n * Clears all channels and listeners.\n * @throws {Error} If clearing PeregrineMQ is not allowed.\n */\n clear = (): void => {\n if (this.config.allowClear) {\n this.channels.clear()\n this.listeners.clear()\n } else {\n throw new PeregrineMQClearError()\n }\n }\n\n /**\n * Returns the specific instance of PeregrineMQ.\n * @returns A string identifier of the specific instance of PeregrineMQ.\n */\n getId = (): string => this.id\n}\n"],"names":["PeregrineMQClearError","Error","constructor","super","this","name","id","config","allowAutoPrune","pruneInterval","allowClear","channels","Map","listeners","addListener","callback","channel","listener","get","subscribersSet","push","set","removeListener","channelSubscriberSets","isEmpty","channelSubscriberSet","has","delete","publishToChannel","isParent","data","iterator","Symbol","subscriberFunc","next","value","configure","pruneIntervalHandler","setInterval","prune","instance","clearPruneInterval","clearInterval","restartPruneInterval","getChannels","keys","prunedChannels","size","removeChannel","channelListeners","clear","index","length","publish","includes","nestedChannels","split","failed","slice","join","subscribe","subscribersList","add","Set","unsubscribe","options","unsubscribed","subscriberSet","subscriberSetArray","isSubscribed","getId","uuidv4","values","reduce","acc"],"mappings":"sFAKO,MAAMA,UAA8BC,MACzCC,WAAAA,GACEC,MAAM,4FACNC,KAAKC,KAAO,uBACd,sBAMK,MA0FLH,WAAAA,C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