@bynder/compact-view 5.2.3 → 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.
- package/AccessToken2.js +1 -1
- package/ActiveFilters.js +49 -50
- package/AddMedia.js +19 -18
- package/Advanced.js +13 -13
- package/App.js +60 -59
- package/Arrow.js +1 -1
- package/AssetFilter.js +38 -38
- package/AssetItem.js +10 -17
- package/AssetList.js +5 -5
- package/AssetTypeItem.js +21 -21
- package/AssetsView.js +13 -13
- package/Axios2.js +82 -76
- package/AxiosError.js +36 -35
- package/ButtonAction.js +1 -1
- package/CanceledError.js +15 -8
- package/Card.js +1 -1
- package/Chip.js +1 -1
- package/CollectionCard.js +22 -22
- package/CollectionItem.js +9 -9
- package/CollectionList.js +5 -5
- package/CollectionView.js +11 -11
- package/ColorPicker.js +1 -1
- package/ColorPickerSolid.js +3 -3
- package/ColorPickerWithOpacity.js +3 -3
- package/Component.js +158 -0
- package/Component2.js +4 -0
- package/ConfigContext.js +7 -8
- package/Container.js +1 -1
- package/ContextAction.js +1 -1
- package/ControlGroup.js +6 -6
- package/Dat.js +33 -32
- package/DatDropdownItem.js +1 -1
- package/DesignSystemProvider.js +7 -7
- package/DirectionSelect.js +11 -10
- package/DomainInput.js +19 -11
- package/Draggable.js +337 -0
- package/Draggable2.js +4 -0
- package/DraggableCore.js +312 -0
- package/DraggableCore2.js +4 -0
- package/Dropdown.js +37 -37
- package/Dropdown2.js +1 -1
- package/DropdownListItem.js +1 -1
- package/FieldSelect.js +19 -17
- package/FileSelector.js +38 -37
- package/FontPicker.js +1 -1
- package/Form.js +1 -1
- package/Header.js +5 -4
- package/HttpStatusCode.js +7 -1
- package/InfiniteScroll.js +1 -1
- package/InlineBanner.js +1 -1
- package/Input.js +1 -1
- package/InterceptorManager.js +2 -1
- package/Item.js +8 -8
- package/Item4.js +2 -2
- package/LeftArrow.js +1 -1
- package/ListItem2.js +1 -1
- package/ModalBase.js +15 -15
- package/NoResults.js +1 -1
- package/Option_new.js +36 -29
- package/ReactPropTypesSecret.js +10 -0
- package/RightArrow.js +1 -1
- package/SearchInput.js +1 -1
- package/SearchInput2.js +1 -1
- package/SelectionFooter.js +41 -31
- package/Shield.js +2 -2
- package/Smartfilters_new.js +107 -98
- package/StatefulAssetList.js +50 -50
- package/StoreInitializer.js +32 -16
- package/SwitchNLS.js +1 -1
- package/TagItem.js +15 -15
- package/Tags.js +1 -1
- package/Toolbar.js +23 -20
- package/Tooltip2.js +1 -1
- package/ViewSwitch.js +17 -15
- package/_commonjsHelpers.js +28 -3
- package/adapters.js +54 -42
- package/api/filterAssets.d.ts +1 -1
- package/api/getAssets.d.ts +1 -1
- package/api/getFilters.d.ts +1 -1
- package/api/rest/index.d.ts +1 -1
- package/api/rest/types.d.ts +1 -1
- package/api2.js +1 -1
- package/asset.type.js +1 -1
- package/autocomplete.js +1 -1
- package/axios.js +1 -1
- package/bodyScrollLock.esm.js +68 -0
- package/buildURL.js +13 -15
- package/checkGlobals.js +1 -1
- package/cjs.js +7 -0
- package/cjs2.js +15 -0
- package/cjs3.js +4 -0
- package/clsx.m.js +6 -0
- package/clsx.m2.js +15 -0
- package/combineMetaproperties.js +3 -1
- package/composeSignals.js +1 -1
- package/cookieStore.js +1 -1
- package/cookies.js +13 -11
- package/currentScopes.js +1 -1
- package/data.js +1 -1
- package/devUtils.js +1 -1
- package/dispatchRequest.js +5 -5
- package/domFns.js +151 -0
- package/domFns2.js +4 -0
- package/factoryWithThrowingShims.js +52 -0
- package/fetch2.js +156 -128
- package/filter/AssetFilterContext.d.ts +3 -3
- package/filterAssets.js +1 -1
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +1 -1
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getPrefix.js +35 -0
- package/getPrefix2.js +4 -0
- package/getSimilarityAssets.js +1 -1
- package/goober.modern.js +75 -0
- package/handlers.js +1 -1
- package/iconBase.js +56 -0
- package/iconContext.js +12 -0
- package/iconsManifest.js +222 -0
- package/index-esm.js +1 -4
- package/index.browser.js +1 -1
- package/index.m.js +9 -0
- package/index.m2.js +17 -0
- package/index10.js +18 -2
- package/index11.js +181 -15
- package/index112.js +1 -1
- package/index12.js +313 -36
- package/index13.js +5 -2430
- package/index14.js +3 -557
- package/index15.js +15 -55
- package/index16.js +3 -2
- package/index17.js +3 -87
- package/index18.js +36 -60
- package/index19.js +3 -7
- package/index20.js +2429 -12
- package/index21.js +557 -10
- package/index22.js +1 -1
- package/index23.js +119 -6
- package/index24.js +39 -7
- package/index25.js +2 -5
- package/index26.js +86 -9
- package/index27.js +55 -8
- package/index28.js +6 -636
- package/index29.js +8692 -74
- package/index3.js +1684 -5
- package/index30.js +2 -5
- package/index31.js +4 -20
- package/index310.js +2 -0
- package/index32.js +11 -2
- package/index33.js +5083 -4
- package/index34.js +2 -18
- package/index35.js +59 -5
- package/index36.js +2 -2
- package/index37.js +13 -11
- package/index38.js +46 -10
- package/index39.js +6 -12
- package/index4.js +5 -1684
- package/index40.js +8 -11
- package/index41.js +26 -18
- package/index42.js +2 -64
- package/index43.js +63 -5
- package/index44.js +9 -55
- package/index45.js +7 -67
- package/index46.js +8 -31
- package/index47.js +5 -11
- package/index48.js +10 -121
- package/index49.js +9 -86
- package/index5.js +215 -23
- package/index50.js +636 -7
- package/index51.js +74 -11
- package/index52.js +4 -13
- package/index53.js +19 -13
- package/index54.js +4 -6
- package/index55.js +18 -7
- package/index56.js +5 -14
- package/index57.js +10 -28
- package/index58.js +10 -15
- package/index59.js +15 -0
- package/index6.js +250 -299
- package/index60.js +13 -0
- package/index61.js +21 -0
- package/index62.js +8 -0
- package/index63.js +57 -0
- package/index64.js +4 -0
- package/index65.js +69 -0
- package/index66.js +33 -0
- package/index67.js +13 -0
- package/index68.js +123 -0
- package/index69.js +88 -0
- package/index7.js +22 -5047
- package/index70.js +10 -0
- package/index71.js +13 -0
- package/index72.js +13 -225
- package/index73.js +16 -0
- package/index74.js +9 -0
- package/index75.js +228 -0
- package/index76.js +9 -0
- package/index77.js +17 -0
- package/index78.js +31 -0
- package/index79.js +18 -0
- package/index8.js +5044 -47
- package/index9.js +50 -15
- package/isAbsoluteURL.js +1 -1
- package/isURLSameOrigin.js +1 -1
- package/localization.js +15 -15
- package/log.js +14 -0
- package/log2.js +4 -0
- package/matchRequestUrl.js +1 -1
- package/mergeConfig.js +37 -32
- package/notify.js +2 -2
- package/package.json +1 -1
- package/positionFns.js +101 -0
- package/positionFns2.js +4 -0
- package/react-laag.esm.js +957 -0
- package/react.js +8 -8
- package/react2.js +9 -9
- package/resolveConfig.js +23 -23
- package/select/add-media/AddMedia.d.ts +3 -1
- package/select/current-selection/SelectedItems.d.ts +1 -1
- package/shims.js +29 -0
- package/shims2.js +4 -0
- package/store/StoreInitializer.d.ts +5 -1
- package/store/useAssetFilterStore.d.ts +55 -0
- package/store/useSelectionStore.d.ts +47 -0
- package/styled-components.browser.esm.js +2 -2
- package/throttle.js +1 -1
- package/toURLEncodedForm.js +11 -10
- package/tokenExpirationHelper.js +1 -1
- package/transformData.js +1 -1
- package/transitional.js +4 -3
- package/useAssetFilterStore.js +152 -0
- package/useDatStore.js +1 -1
- package/useEffectEvent.js +7 -7
- package/useFonts.js +2 -2
- package/useOrderingStore.js +1 -1
- package/useRouterStore.js +1 -1
- package/useSearchStore.js +1 -1
- package/useSelectionStore.js +131 -0
- package/useSimilaritySearchStore.js +1 -1
- package/useTranslate.js +1 -1
- package/utils/combineMetaproperties.d.ts +2 -0
- package/utils6.js +160 -118
- package/utils7.js +7 -68
- package/utils8.js +68 -7
- package/xhr.js +47 -46
- package/AssetFilterContext.js +0 -161
- package/SelectionContext.js +0 -143
- package/select/SelectionContext.d.ts +0 -30
- /package/{Middleware.js → Middleware2.js} +0 -0
- /package/{middleware2.js → middleware.js} +0 -0
package/iconsManifest.js
ADDED
|
@@ -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) =>
|
|
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
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,20 @@
|
|
|
1
|
-
|
|
1
|
+
import "./index18.js";
|
|
2
|
+
import r from "./axios.js";
|
|
3
|
+
const n = (e) => e.data, s = r.create({
|
|
4
|
+
timeout: 1e4,
|
|
5
|
+
headers: {
|
|
6
|
+
Accept: "application/json",
|
|
7
|
+
"Content-Type": "application/json"
|
|
8
|
+
}
|
|
9
|
+
}), i = async (e, o) => {
|
|
10
|
+
try {
|
|
11
|
+
const t = await s.get(e, o);
|
|
12
|
+
return n(t);
|
|
13
|
+
} catch (t) {
|
|
14
|
+
throw console.error("GET request error:", t), t;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
2
17
|
export {
|
|
3
|
-
|
|
18
|
+
i as getRequest,
|
|
19
|
+
n as onSuccess
|
|
4
20
|
};
|
package/index11.js
CHANGED
|
@@ -1,18 +1,184 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
182
|
+
he as HexAlphaColorPicker,
|
|
183
|
+
ve as HexColorPicker
|
|
18
184
|
};
|
package/index112.js
CHANGED