@bynder/compact-view 5.2.2 → 5.2.4

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 (241) hide show
  1. package/AccessToken2.js +1 -1
  2. package/ActiveFilters.js +49 -50
  3. package/AddMedia.js +19 -18
  4. package/Advanced.js +13 -13
  5. package/App.js +60 -59
  6. package/Arrow.js +1 -1
  7. package/AssetFilter.js +38 -38
  8. package/AssetItem.js +10 -17
  9. package/AssetList.js +5 -5
  10. package/AssetTypeItem.js +21 -21
  11. package/AssetsView.js +13 -13
  12. package/Axios2.js +82 -76
  13. package/AxiosError.js +36 -35
  14. package/ButtonAction.js +1 -1
  15. package/CanceledError.js +15 -8
  16. package/Card.js +1 -1
  17. package/Chip.js +1 -1
  18. package/CollectionCard.js +22 -22
  19. package/CollectionItem.js +9 -9
  20. package/CollectionList.js +5 -5
  21. package/CollectionView.js +11 -11
  22. package/ColorPicker.js +1 -1
  23. package/ColorPickerSolid.js +3 -3
  24. package/ColorPickerWithOpacity.js +3 -3
  25. package/Component.js +158 -0
  26. package/Component2.js +4 -0
  27. package/ConfigContext.js +7 -8
  28. package/Container.js +1 -1
  29. package/ContextAction.js +1 -1
  30. package/ControlGroup.js +6 -6
  31. package/Dat.js +33 -32
  32. package/DatDropdownItem.js +1 -1
  33. package/DesignSystemProvider.js +7 -7
  34. package/DirectionSelect.js +11 -10
  35. package/DomainInput.js +19 -11
  36. package/Draggable.js +337 -0
  37. package/Draggable2.js +4 -0
  38. package/DraggableCore.js +312 -0
  39. package/DraggableCore2.js +4 -0
  40. package/Dropdown.js +37 -37
  41. package/Dropdown2.js +1 -1
  42. package/DropdownListItem.js +1 -1
  43. package/FieldSelect.js +19 -17
  44. package/FileSelector.js +38 -37
  45. package/FontPicker.js +1 -1
  46. package/Form.js +1 -1
  47. package/Header.js +5 -4
  48. package/HttpStatusCode.js +7 -1
  49. package/InfiniteScroll.js +1 -1
  50. package/InlineBanner.js +1 -1
  51. package/Input.js +1 -1
  52. package/InterceptorManager.js +2 -1
  53. package/Item.js +8 -8
  54. package/Item4.js +2 -2
  55. package/LeftArrow.js +1 -1
  56. package/ListItem2.js +1 -1
  57. package/ModalBase.js +15 -15
  58. package/NoResults.js +1 -1
  59. package/Option_new.js +36 -29
  60. package/ReactPropTypesSecret.js +10 -0
  61. package/RightArrow.js +1 -1
  62. package/SearchInput.js +1 -1
  63. package/SearchInput2.js +1 -1
  64. package/SelectionFooter.js +41 -31
  65. package/Shield.js +2 -2
  66. package/Smartfilters_new.js +107 -98
  67. package/StatefulAssetList.js +50 -50
  68. package/StoreInitializer.js +32 -16
  69. package/SwitchNLS.js +1 -1
  70. package/TagItem.js +15 -15
  71. package/Tags.js +1 -1
  72. package/Toolbar.js +23 -20
  73. package/Tooltip2.js +1 -1
  74. package/ViewSwitch.js +17 -15
  75. package/_commonjsHelpers.js +28 -3
  76. package/adapters.js +54 -42
  77. package/api/filterAssets.d.ts +1 -1
  78. package/api/getAssets.d.ts +1 -1
  79. package/api/getFilters.d.ts +1 -1
  80. package/api/rest/index.d.ts +1 -1
  81. package/api/rest/types.d.ts +1 -1
  82. package/api2.js +1 -1
  83. package/asset.type.js +1 -1
  84. package/axios.js +1 -1
  85. package/bodyScrollLock.esm.js +68 -0
  86. package/buildURL.js +13 -15
  87. package/checkGlobals.js +1 -1
  88. package/cjs.js +7 -0
  89. package/cjs2.js +15 -0
  90. package/cjs3.js +4 -0
  91. package/clsx.m.js +6 -0
  92. package/clsx.m2.js +15 -0
  93. package/combineMetaproperties.js +3 -1
  94. package/composeSignals.js +1 -1
  95. package/cookieStore.js +1 -1
  96. package/cookies.js +13 -11
  97. package/currentScopes.js +1 -1
  98. package/data.js +1 -1
  99. package/devUtils.js +1 -1
  100. package/dispatchRequest.js +5 -5
  101. package/domFns.js +151 -0
  102. package/domFns2.js +4 -0
  103. package/factoryWithThrowingShims.js +52 -0
  104. package/fetch2.js +156 -128
  105. package/filter/AssetFilterContext.d.ts +3 -3
  106. package/getPrefix.js +35 -0
  107. package/getPrefix2.js +4 -0
  108. package/goober.modern.js +75 -0
  109. package/handlers.js +1 -1
  110. package/iconBase.js +56 -0
  111. package/iconContext.js +12 -0
  112. package/iconsManifest.js +222 -0
  113. package/index-esm.js +1 -4
  114. package/index.browser.js +1 -1
  115. package/index.m.js +9 -0
  116. package/index.m2.js +17 -0
  117. package/index10.js +1 -1
  118. package/index11.js +181 -15
  119. package/index112.js +1 -1
  120. package/index12.js +313 -36
  121. package/index13.js +5 -2430
  122. package/index14.js +3 -557
  123. package/index15.js +15 -55
  124. package/index16.js +3 -2
  125. package/index17.js +3 -87
  126. package/index18.js +36 -7
  127. package/index19.js +3 -60
  128. package/index20.js +2429 -12
  129. package/index21.js +557 -10
  130. package/index22.js +1 -1
  131. package/index23.js +119 -6
  132. package/index24.js +39 -7
  133. package/index25.js +2 -5
  134. package/index26.js +86 -9
  135. package/index27.js +55 -8
  136. package/index28.js +6 -636
  137. package/index29.js +8692 -74
  138. package/index3.js +1684 -5
  139. package/index30.js +2 -5
  140. package/index31.js +4 -20
  141. package/index310.js +2 -0
  142. package/index32.js +11 -2
  143. package/index33.js +5083 -4
  144. package/index34.js +2 -18
  145. package/index35.js +59 -5
  146. package/index36.js +2 -2
  147. package/index37.js +13 -11
  148. package/index38.js +46 -10
  149. package/index39.js +6 -12
  150. package/index4.js +5 -1684
  151. package/index40.js +8 -11
  152. package/index41.js +26 -18
  153. package/index42.js +2 -64
  154. package/index43.js +63 -5
  155. package/index44.js +9 -55
  156. package/index45.js +7 -67
  157. package/index46.js +8 -31
  158. package/index47.js +5 -11
  159. package/index48.js +10 -121
  160. package/index49.js +9 -86
  161. package/index5.js +215 -23
  162. package/index50.js +636 -7
  163. package/index51.js +74 -11
  164. package/index52.js +4 -13
  165. package/index53.js +19 -13
  166. package/index54.js +4 -6
  167. package/index55.js +18 -7
  168. package/index56.js +5 -14
  169. package/index57.js +10 -28
  170. package/index58.js +10 -15
  171. package/index59.js +15 -0
  172. package/index6.js +250 -299
  173. package/index60.js +13 -0
  174. package/index61.js +21 -0
  175. package/index62.js +8 -0
  176. package/index63.js +57 -0
  177. package/index64.js +4 -0
  178. package/index65.js +69 -0
  179. package/index66.js +33 -0
  180. package/index67.js +13 -0
  181. package/index68.js +123 -0
  182. package/index69.js +88 -0
  183. package/index7.js +25 -2
  184. package/index70.js +10 -0
  185. package/index71.js +13 -0
  186. package/index72.js +13 -225
  187. package/index73.js +16 -0
  188. package/index74.js +9 -0
  189. package/index75.js +228 -0
  190. package/index76.js +9 -0
  191. package/index77.js +17 -0
  192. package/index78.js +31 -0
  193. package/index79.js +18 -0
  194. package/index8.js +1537 -1536
  195. package/index9.js +1 -1
  196. package/isAbsoluteURL.js +1 -1
  197. package/isURLSameOrigin.js +1 -1
  198. package/localization.js +15 -15
  199. package/log.js +14 -0
  200. package/log2.js +4 -0
  201. package/matchRequestUrl.js +1 -1
  202. package/mergeConfig.js +37 -32
  203. package/notify.js +2 -2
  204. package/package.json +1 -1
  205. package/positionFns.js +101 -0
  206. package/positionFns2.js +4 -0
  207. package/react-laag.esm.js +957 -0
  208. package/react.js +8 -8
  209. package/react2.js +9 -9
  210. package/resolveConfig.js +23 -23
  211. package/select/add-media/AddMedia.d.ts +3 -1
  212. package/select/current-selection/SelectedItems.d.ts +1 -1
  213. package/shims.js +29 -0
  214. package/shims2.js +4 -0
  215. package/store/StoreInitializer.d.ts +5 -1
  216. package/store/useAssetFilterStore.d.ts +55 -0
  217. package/store/useSelectionStore.d.ts +47 -0
  218. package/styled-components.browser.esm.js +2 -2
  219. package/throttle.js +1 -1
  220. package/toURLEncodedForm.js +11 -10
  221. package/tokenExpirationHelper.js +1 -1
  222. package/transformData.js +1 -1
  223. package/transitional.js +4 -3
  224. package/useAssetFilterStore.js +152 -0
  225. package/useDatStore.js +1 -1
  226. package/useEffectEvent.js +7 -7
  227. package/useFonts.js +1 -1
  228. package/useOrderingStore.js +1 -1
  229. package/useRouterStore.js +1 -1
  230. package/useSearchStore.js +1 -1
  231. package/useSelectionStore.js +131 -0
  232. package/useSimilaritySearchStore.js +1 -1
  233. package/useTranslate.js +1 -1
  234. package/utils/combineMetaproperties.d.ts +2 -0
  235. package/utils6.js +160 -118
  236. package/xhr.js +47 -46
  237. package/AssetFilterContext.js +0 -161
  238. package/Middleware.js +0 -49
  239. package/SelectionContext.js +0 -143
  240. package/middleware2.js +0 -177
  241. package/select/SelectionContext.d.ts +0 -30
@@ -0,0 +1,222 @@
1
+ var e = [
2
+ {
3
+ id: "ci",
4
+ name: "Circum Icons",
5
+ projectUrl: "https://circumicons.com/",
6
+ license: "MPL-2.0 license",
7
+ licenseUrl: "https://github.com/Klarr-Agency/Circum-Icons/blob/main/LICENSE"
8
+ },
9
+ {
10
+ id: "fa",
11
+ name: "Font Awesome 5",
12
+ projectUrl: "https://fontawesome.com/",
13
+ license: "CC BY 4.0 License",
14
+ licenseUrl: "https://creativecommons.org/licenses/by/4.0/"
15
+ },
16
+ {
17
+ id: "fa6",
18
+ name: "Font Awesome 6",
19
+ projectUrl: "https://fontawesome.com/",
20
+ license: "CC BY 4.0 License",
21
+ licenseUrl: "https://creativecommons.org/licenses/by/4.0/"
22
+ },
23
+ {
24
+ id: "io",
25
+ name: "Ionicons 4",
26
+ projectUrl: "https://ionicons.com/",
27
+ license: "MIT",
28
+ licenseUrl: "https://github.com/ionic-team/ionicons/blob/master/LICENSE"
29
+ },
30
+ {
31
+ id: "io5",
32
+ name: "Ionicons 5",
33
+ projectUrl: "https://ionicons.com/",
34
+ license: "MIT",
35
+ licenseUrl: "https://github.com/ionic-team/ionicons/blob/master/LICENSE"
36
+ },
37
+ {
38
+ id: "md",
39
+ name: "Material Design icons",
40
+ projectUrl: "http://google.github.io/material-design-icons/",
41
+ license: "Apache License Version 2.0",
42
+ licenseUrl: "https://github.com/google/material-design-icons/blob/master/LICENSE"
43
+ },
44
+ {
45
+ id: "ti",
46
+ name: "Typicons",
47
+ projectUrl: "http://s-ings.com/typicons/",
48
+ license: "CC BY-SA 3.0",
49
+ licenseUrl: "https://creativecommons.org/licenses/by-sa/3.0/"
50
+ },
51
+ {
52
+ id: "go",
53
+ name: "Github Octicons icons",
54
+ projectUrl: "https://octicons.github.com/",
55
+ license: "MIT",
56
+ licenseUrl: "https://github.com/primer/octicons/blob/master/LICENSE"
57
+ },
58
+ {
59
+ id: "fi",
60
+ name: "Feather",
61
+ projectUrl: "https://feathericons.com/",
62
+ license: "MIT",
63
+ licenseUrl: "https://github.com/feathericons/feather/blob/master/LICENSE"
64
+ },
65
+ {
66
+ id: "lu",
67
+ name: "Lucide",
68
+ projectUrl: "https://lucide.dev/",
69
+ license: "ISC",
70
+ licenseUrl: "https://github.com/lucide-icons/lucide/blob/main/LICENSE"
71
+ },
72
+ {
73
+ id: "gi",
74
+ name: "Game Icons",
75
+ projectUrl: "https://game-icons.net/",
76
+ license: "CC BY 3.0",
77
+ licenseUrl: "https://creativecommons.org/licenses/by/3.0/"
78
+ },
79
+ {
80
+ id: "wi",
81
+ name: "Weather Icons",
82
+ projectUrl: "https://erikflowers.github.io/weather-icons/",
83
+ license: "SIL OFL 1.1",
84
+ licenseUrl: "http://scripts.sil.org/OFL"
85
+ },
86
+ {
87
+ id: "di",
88
+ name: "Devicons",
89
+ projectUrl: "https://vorillaz.github.io/devicons/",
90
+ license: "MIT",
91
+ licenseUrl: "https://opensource.org/licenses/MIT"
92
+ },
93
+ {
94
+ id: "ai",
95
+ name: "Ant Design Icons",
96
+ projectUrl: "https://github.com/ant-design/ant-design-icons",
97
+ license: "MIT",
98
+ licenseUrl: "https://opensource.org/licenses/MIT"
99
+ },
100
+ {
101
+ id: "bs",
102
+ name: "Bootstrap Icons",
103
+ projectUrl: "https://github.com/twbs/icons",
104
+ license: "MIT",
105
+ licenseUrl: "https://opensource.org/licenses/MIT"
106
+ },
107
+ {
108
+ id: "ri",
109
+ name: "Remix Icon",
110
+ projectUrl: "https://github.com/Remix-Design/RemixIcon",
111
+ license: "Apache License Version 2.0",
112
+ licenseUrl: "http://www.apache.org/licenses/"
113
+ },
114
+ {
115
+ id: "fc",
116
+ name: "Flat Color Icons",
117
+ projectUrl: "https://github.com/icons8/flat-color-icons",
118
+ license: "MIT",
119
+ licenseUrl: "https://opensource.org/licenses/MIT"
120
+ },
121
+ {
122
+ id: "gr",
123
+ name: "Grommet-Icons",
124
+ projectUrl: "https://github.com/grommet/grommet-icons",
125
+ license: "Apache License Version 2.0",
126
+ licenseUrl: "http://www.apache.org/licenses/"
127
+ },
128
+ {
129
+ id: "hi",
130
+ name: "Heroicons",
131
+ projectUrl: "https://github.com/tailwindlabs/heroicons",
132
+ license: "MIT",
133
+ licenseUrl: "https://opensource.org/licenses/MIT"
134
+ },
135
+ {
136
+ id: "hi2",
137
+ name: "Heroicons 2",
138
+ projectUrl: "https://github.com/tailwindlabs/heroicons",
139
+ license: "MIT",
140
+ licenseUrl: "https://opensource.org/licenses/MIT"
141
+ },
142
+ {
143
+ id: "si",
144
+ name: "Simple Icons",
145
+ projectUrl: "https://simpleicons.org/",
146
+ license: "CC0 1.0 Universal",
147
+ licenseUrl: "https://creativecommons.org/publicdomain/zero/1.0/"
148
+ },
149
+ {
150
+ id: "sl",
151
+ name: "Simple Line Icons",
152
+ projectUrl: "https://thesabbir.github.io/simple-line-icons/",
153
+ license: "MIT",
154
+ licenseUrl: "https://opensource.org/licenses/MIT"
155
+ },
156
+ {
157
+ id: "im",
158
+ name: "IcoMoon Free",
159
+ projectUrl: "https://github.com/Keyamoon/IcoMoon-Free",
160
+ license: "CC BY 4.0 License",
161
+ licenseUrl: "https://github.com/Keyamoon/IcoMoon-Free/blob/master/License.txt"
162
+ },
163
+ {
164
+ id: "bi",
165
+ name: "BoxIcons",
166
+ projectUrl: "https://github.com/atisawd/boxicons",
167
+ license: "CC BY 4.0 License",
168
+ licenseUrl: "https://github.com/atisawd/boxicons/blob/master/LICENSE"
169
+ },
170
+ {
171
+ id: "cg",
172
+ name: "css.gg",
173
+ projectUrl: "https://github.com/astrit/css.gg",
174
+ license: "MIT",
175
+ licenseUrl: "https://opensource.org/licenses/MIT"
176
+ },
177
+ {
178
+ id: "vsc",
179
+ name: "VS Code Icons",
180
+ projectUrl: "https://github.com/microsoft/vscode-codicons",
181
+ license: "CC BY 4.0",
182
+ licenseUrl: "https://creativecommons.org/licenses/by/4.0/"
183
+ },
184
+ {
185
+ id: "tb",
186
+ name: "Tabler Icons",
187
+ projectUrl: "https://github.com/tabler/tabler-icons",
188
+ license: "MIT",
189
+ licenseUrl: "https://opensource.org/licenses/MIT"
190
+ },
191
+ {
192
+ id: "tfi",
193
+ name: "Themify Icons",
194
+ projectUrl: "https://github.com/lykmapipo/themify-icons",
195
+ license: "MIT",
196
+ licenseUrl: "https://github.com/thecreation/standard-icons/blob/master/modules/themify-icons/LICENSE"
197
+ },
198
+ {
199
+ id: "rx",
200
+ name: "Radix Icons",
201
+ projectUrl: "https://icons.radix-ui.com",
202
+ license: "MIT",
203
+ licenseUrl: "https://github.com/radix-ui/icons/blob/master/LICENSE"
204
+ },
205
+ {
206
+ id: "pi",
207
+ name: "Phosphor Icons",
208
+ projectUrl: "https://github.com/phosphor-icons/core",
209
+ license: "MIT",
210
+ licenseUrl: "https://github.com/phosphor-icons/core/blob/main/LICENSE"
211
+ },
212
+ {
213
+ id: "lia",
214
+ name: "Icons8 Line Awesome",
215
+ projectUrl: "https://icons8.com/line-awesome",
216
+ license: "MIT",
217
+ licenseUrl: "https://github.com/icons8/line-awesome/blob/master/LICENSE.md"
218
+ }
219
+ ];
220
+ export {
221
+ e as IconsManifest
222
+ };
package/index-esm.js CHANGED
@@ -1,7 +1,4 @@
1
- var Sa = Object.create, da = Object.defineProperty, Ca = Object.getOwnPropertyDescriptor, ja = Object.getOwnPropertyNames, Aa = Object.getPrototypeOf, Oa = Object.prototype.hasOwnProperty, Ia = /* @__PURE__ */ ((l) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(l, {
2
- get: (b, j) => (typeof require < "u" ? require : b)[j]
3
- }) : l)(function(l) {
4
- if (typeof require < "u") return require.apply(this, arguments);
1
+ var Sa = Object.create, da = Object.defineProperty, Ca = Object.getOwnPropertyDescriptor, ja = Object.getOwnPropertyNames, Aa = Object.getPrototypeOf, Oa = Object.prototype.hasOwnProperty, Ia = /* @__PURE__ */ ((l) => {
5
2
  throw Error('Dynamic require of "' + l + '" is not supported');
6
3
  }), Z = (l, b) => function() {
7
4
  return b || (0, l[ja(l)[0]])((b = { exports: {} }).exports, b), b.exports;
package/index.browser.js CHANGED
@@ -1,4 +1,4 @@
1
- import { urlAlphabet as l } from "./index7.js";
1
+ import { urlAlphabet as l } from "./index14.js";
2
2
  let o = (t = 21) => {
3
3
  let e = "", r = crypto.getRandomValues(new Uint8Array(t |= 0));
4
4
  for (; t--; )
package/index.m.js ADDED
@@ -0,0 +1,9 @@
1
+ import { useStatefulRef as a } from "./index.m2.js";
2
+ import s, { useRef as o } from "react";
3
+ function n(t, u = { isStateful: !0 }) {
4
+ const r = a(), f = o(), e = u.isStateful ? r : f;
5
+ return s.useImperativeHandle(t, () => e.current), e;
6
+ }
7
+ export {
8
+ n as useForwardedRef
9
+ };
package/index.m2.js ADDED
@@ -0,0 +1,17 @@
1
+ import u from "react";
2
+ function s(f) {
3
+ let [e, c] = u.useState(f);
4
+ const { current: r } = u.useRef({
5
+ current: e
6
+ });
7
+ return Object.defineProperty(r, "current", {
8
+ get: () => e,
9
+ // eslint-disable-next-line functional/no-return-void
10
+ set: (t) => {
11
+ Object.is(e, t) || (e = t, c(t));
12
+ }
13
+ }), r;
14
+ }
15
+ export {
16
+ s as useStatefulRef
17
+ };
package/index10.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./index12.js";
1
+ import "./index18.js";
2
2
  import r from "./axios.js";
3
3
  const n = (e) => e.data, s = r.create({
4
4
  timeout: 1e4,
package/index11.js CHANGED
@@ -1,18 +1,184 @@
1
- import { object as t, string as e, uuid as o, email as a } from "./schemas.js";
2
- import { domain as m } from "./regexes.js";
3
- function i() {
4
- return document.documentElement.lang.replace(/_/g, "-") || "en-US";
1
+ import u, { useRef as m, useLayoutEffect as Z, useEffect as M, useState as $, useCallback as G, useMemo as ee } from "react";
2
+ function _() {
3
+ return (_ = Object.assign || function(e) {
4
+ for (var r = 1; r < arguments.length; r++) {
5
+ var t = arguments[r];
6
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
7
+ }
8
+ return e;
9
+ }).apply(this, arguments);
5
10
  }
6
- t({
7
- portal_id: o(),
8
- name: e(),
9
- domain: e().regex(m),
10
- date_created: e()
11
- });
12
- t({
13
- id: o(),
14
- email: a()
15
- });
11
+ function j(e, r) {
12
+ if (e == null) return {};
13
+ var t, n, o = {}, a = Object.keys(e);
14
+ for (n = 0; n < a.length; n++) r.indexOf(t = a[n]) >= 0 || (o[t] = e[t]);
15
+ return o;
16
+ }
17
+ function k(e) {
18
+ var r = m(e), t = m(function(n) {
19
+ r.current && r.current(n);
20
+ });
21
+ return r.current = e, t.current;
22
+ }
23
+ var g = function(e, r, t) {
24
+ return r === void 0 && (r = 0), t === void 0 && (t = 1), e > t ? t : e < r ? r : e;
25
+ }, w = function(e) {
26
+ return "touches" in e;
27
+ }, H = function(e) {
28
+ return e && e.ownerDocument.defaultView || self;
29
+ }, L = function(e, r, t) {
30
+ var n = e.getBoundingClientRect(), o = w(r) ? (function(a, c) {
31
+ for (var l = 0; l < a.length; l++) if (a[l].identifier === c) return a[l];
32
+ return a[0];
33
+ })(r.touches, t) : r;
34
+ return { left: g((o.pageX - (n.left + H(e).pageXOffset)) / n.width), top: g((o.pageY - (n.top + H(e).pageYOffset)) / n.height) };
35
+ }, q = function(e) {
36
+ !w(e) && e.preventDefault();
37
+ }, z = u.memo(function(e) {
38
+ var r = e.onMove, t = e.onKey, n = j(e, ["onMove", "onKey"]), o = m(null), a = k(r), c = k(t), l = m(null), f = m(!1), i = ee(function() {
39
+ var J = function(h) {
40
+ q(h), (w(h) ? h.touches.length > 0 : h.buttons > 0) && o.current ? a(L(o.current, h, l.current)) : E(!1);
41
+ }, Q = function() {
42
+ return E(!1);
43
+ };
44
+ function E(h) {
45
+ var v = f.current, p = H(o.current), x = h ? p.addEventListener : p.removeEventListener;
46
+ x(v ? "touchmove" : "mousemove", J), x(v ? "touchend" : "mouseup", Q);
47
+ }
48
+ return [function(h) {
49
+ var v = h.nativeEvent, p = o.current;
50
+ if (p && (q(v), !(function(U, W) {
51
+ return W && !w(U);
52
+ })(v, f.current) && p)) {
53
+ if (w(v)) {
54
+ f.current = !0;
55
+ var x = v.changedTouches || [];
56
+ x.length && (l.current = x[0].identifier);
57
+ }
58
+ p.focus(), a(L(p, v, l.current)), E(!0);
59
+ }
60
+ }, function(h) {
61
+ var v = h.which || h.keyCode;
62
+ v < 37 || v > 40 || (h.preventDefault(), c({ left: v === 39 ? 0.05 : v === 37 ? -0.05 : 0, top: v === 40 ? 0.05 : v === 38 ? -0.05 : 0 }));
63
+ }, E];
64
+ }, [c, a]), d = i[0], b = i[1], K = i[2];
65
+ return M(function() {
66
+ return K;
67
+ }, [K]), u.createElement("div", _({}, n, { onTouchStart: d, onMouseDown: d, className: "react-colorful__interactive", ref: o, onKeyDown: b, tabIndex: 0, role: "slider" }));
68
+ }), C = function(e) {
69
+ return e.filter(Boolean).join(" ");
70
+ }, D = function(e) {
71
+ var r = e.color, t = e.left, n = e.top, o = n === void 0 ? 0.5 : n, a = C(["react-colorful__pointer", e.className]);
72
+ return u.createElement("div", { className: a, style: { top: 100 * o + "%", left: 100 * t + "%" } }, u.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: r } }));
73
+ }, s = function(e, r, t) {
74
+ return r === void 0 && (r = 0), t === void 0 && (t = Math.pow(10, r)), Math.round(t * e) / t;
75
+ }, T = function(e) {
76
+ return ne(I(e));
77
+ }, I = function(e) {
78
+ return e[0] === "#" && (e = e.substring(1)), e.length < 6 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? s(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : { r: parseInt(e.substring(0, 2), 16), g: parseInt(e.substring(2, 4), 16), b: parseInt(e.substring(4, 6), 16), a: e.length === 8 ? s(parseInt(e.substring(6, 8), 16) / 255, 2) : 1 };
79
+ }, A = function(e) {
80
+ return te(re(e));
81
+ }, B = function(e) {
82
+ var r = e.s, t = e.v, n = e.a, o = (200 - r) * t / 100;
83
+ return { h: s(e.h), s: s(o > 0 && o < 200 ? r * t / 100 / (o <= 100 ? o : 200 - o) * 100 : 0), l: s(o / 2), a: s(n, 2) };
84
+ }, O = function(e) {
85
+ var r = B(e);
86
+ return "hsl(" + r.h + ", " + r.s + "%, " + r.l + "%)";
87
+ }, N = function(e) {
88
+ var r = B(e);
89
+ return "hsla(" + r.h + ", " + r.s + "%, " + r.l + "%, " + r.a + ")";
90
+ }, re = function(e) {
91
+ var r = e.h, t = e.s, n = e.v, o = e.a;
92
+ r = r / 360 * 6, t /= 100, n /= 100;
93
+ var a = Math.floor(r), c = n * (1 - t), l = n * (1 - (r - a) * t), f = n * (1 - (1 - r + a) * t), i = a % 6;
94
+ return { r: s(255 * [n, l, c, c, f, n][i]), g: s(255 * [f, n, n, l, c, c][i]), b: s(255 * [c, c, f, n, n, l][i]), a: s(o, 2) };
95
+ }, y = function(e) {
96
+ var r = e.toString(16);
97
+ return r.length < 2 ? "0" + r : r;
98
+ }, te = function(e) {
99
+ var r = e.r, t = e.g, n = e.b, o = e.a, a = o < 1 ? y(s(255 * o)) : "";
100
+ return "#" + y(r) + y(t) + y(n) + a;
101
+ }, ne = function(e) {
102
+ var r = e.r, t = e.g, n = e.b, o = e.a, a = Math.max(r, t, n), c = a - Math.min(r, t, n), l = c ? a === r ? (t - n) / c : a === t ? 2 + (n - r) / c : 4 + (r - t) / c : 0;
103
+ return { h: s(60 * (l < 0 ? l + 6 : l)), s: s(a ? c / a * 100 : 0), v: s(a / 255 * 100), a: o };
104
+ }, P = u.memo(function(e) {
105
+ var r = e.hue, t = e.onChange, n = C(["react-colorful__hue", e.className]);
106
+ return u.createElement("div", { className: n }, u.createElement(z, { onMove: function(o) {
107
+ t({ h: 360 * o.left });
108
+ }, onKey: function(o) {
109
+ t({ h: g(r + 360 * o.left, 0, 360) });
110
+ }, "aria-label": "Hue", "aria-valuenow": s(r), "aria-valuemax": "360", "aria-valuemin": "0" }, u.createElement(D, { className: "react-colorful__hue-pointer", left: r / 360, color: O({ h: r, s: 100, v: 100, a: 1 }) })));
111
+ }), R = u.memo(function(e) {
112
+ var r = e.hsva, t = e.onChange, n = { backgroundColor: O({ h: r.h, s: 100, v: 100, a: 1 }) };
113
+ return u.createElement("div", { className: "react-colorful__saturation", style: n }, u.createElement(z, { onMove: function(o) {
114
+ t({ s: 100 * o.left, v: 100 - 100 * o.top });
115
+ }, onKey: function(o) {
116
+ t({ s: g(r.s + 100 * o.left, 0, 100), v: g(r.v - 100 * o.top, 0, 100) });
117
+ }, "aria-label": "Color", "aria-valuetext": "Saturation " + s(r.s) + "%, Brightness " + s(r.v) + "%" }, u.createElement(D, { className: "react-colorful__saturation-pointer", top: 1 - r.v / 100, left: r.s / 100, color: O(r) })));
118
+ }), X = function(e, r) {
119
+ if (e === r) return !0;
120
+ for (var t in e) if (e[t] !== r[t]) return !1;
121
+ return !0;
122
+ }, Y = function(e, r) {
123
+ return e.toLowerCase() === r.toLowerCase() || X(I(e), I(r));
124
+ };
125
+ function V(e, r, t) {
126
+ var n = k(t), o = $(function() {
127
+ return e.toHsva(r);
128
+ }), a = o[0], c = o[1], l = m({ color: r, hsva: a });
129
+ M(function() {
130
+ if (!e.equal(r, l.current.color)) {
131
+ var i = e.toHsva(r);
132
+ l.current = { hsva: i, color: r }, c(i);
133
+ }
134
+ }, [r, e]), M(function() {
135
+ var i;
136
+ X(a, l.current.hsva) || e.equal(i = e.fromHsva(a), l.current.color) || (l.current = { hsva: a, color: i }, n(i));
137
+ }, [a, e, n]);
138
+ var f = G(function(i) {
139
+ c(function(d) {
140
+ return Object.assign({}, d, i);
141
+ });
142
+ }, []);
143
+ return [a, f];
144
+ }
145
+ var oe = typeof window < "u" ? Z : M, ae = function() {
146
+ return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
147
+ }, S = /* @__PURE__ */ new Map(), F = function(e) {
148
+ oe(function() {
149
+ var r = e.current ? e.current.ownerDocument : document;
150
+ if (r !== void 0 && !S.has(r)) {
151
+ var t = r.createElement("style");
152
+ t.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, S.set(r, t);
153
+ var n = ae();
154
+ n && t.setAttribute("nonce", n), r.head.appendChild(t);
155
+ }
156
+ }, []);
157
+ }, le = function(e) {
158
+ var r = e.className, t = e.colorModel, n = e.color, o = n === void 0 ? t.defaultColor : n, a = e.onChange, c = j(e, ["className", "colorModel", "color", "onChange"]), l = m(null);
159
+ F(l);
160
+ var f = V(t, o, a), i = f[0], d = f[1], b = C(["react-colorful", r]);
161
+ return u.createElement("div", _({}, c, { ref: l, className: b }), u.createElement(R, { hsva: i, onChange: d }), u.createElement(P, { hue: i.h, onChange: d, className: "react-colorful__last-control" }));
162
+ }, ce = { defaultColor: "000", toHsva: T, fromHsva: function(e) {
163
+ return A({ h: e.h, s: e.s, v: e.v, a: 1 });
164
+ }, equal: Y }, ve = function(e) {
165
+ return u.createElement(le, _({}, e, { colorModel: ce }));
166
+ }, ue = function(e) {
167
+ var r = e.className, t = e.hsva, n = e.onChange, o = { backgroundImage: "linear-gradient(90deg, " + N(Object.assign({}, t, { a: 0 })) + ", " + N(Object.assign({}, t, { a: 1 })) + ")" }, a = C(["react-colorful__alpha", r]), c = s(100 * t.a);
168
+ return u.createElement("div", { className: a }, u.createElement("div", { className: "react-colorful__alpha-gradient", style: o }), u.createElement(z, { onMove: function(l) {
169
+ n({ a: l.left });
170
+ }, onKey: function(l) {
171
+ n({ a: g(t.a + l.left) });
172
+ }, "aria-label": "Alpha", "aria-valuetext": c + "%", "aria-valuenow": c, "aria-valuemin": "0", "aria-valuemax": "100" }, u.createElement(D, { className: "react-colorful__alpha-pointer", left: t.a, color: N(t) })));
173
+ }, ie = function(e) {
174
+ var r = e.className, t = e.colorModel, n = e.color, o = n === void 0 ? t.defaultColor : n, a = e.onChange, c = j(e, ["className", "colorModel", "color", "onChange"]), l = m(null);
175
+ F(l);
176
+ var f = V(t, o, a), i = f[0], d = f[1], b = C(["react-colorful", r]);
177
+ return u.createElement("div", _({}, c, { ref: l, className: b }), u.createElement(R, { hsva: i, onChange: d }), u.createElement(P, { hue: i.h, onChange: d }), u.createElement(ue, { hsva: i, onChange: d, className: "react-colorful__last-control" }));
178
+ }, se = { defaultColor: "0001", toHsva: T, fromHsva: A, equal: Y }, he = function(e) {
179
+ return u.createElement(ie, _({}, e, { colorModel: se }));
180
+ };
16
181
  export {
17
- i as getPageLocale
182
+ he as HexAlphaColorPicker,
183
+ ve as HexColorPicker
18
184
  };
package/index112.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { isNodeProcess as o } from "./index92.js";
2
- import "./index42.js";
2
+ import "./index43.js";
3
3
  var t = Object.defineProperty, u = (r, e) => {
4
4
  for (var n in e)
5
5
  t(r, n, { get: e[n], enumerable: !0 });