@layers-app/shared 0.2.6 → 0.2.8-test
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/dist/assets/svg/socials/instagram.svg.js +3 -3
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +21 -20
- package/dist/components/AppContainer/AppContainer.js +3 -3
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +40 -32
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +41 -33
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +58 -49
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +151 -51
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +46 -43
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
- package/dist/components/AppContainer/types.d.ts +2 -1
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.module.css.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +14 -14
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
- package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/Copyright.module.css.js +1 -1
- package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +28 -29
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
- package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
- package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
- package/dist/components/FeatureProgress/FeatureProgress.d.ts +11 -0
- package/dist/components/FeatureProgress/FeatureProgress.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgress.js +148 -0
- package/dist/components/FeatureProgress/FeatureProgress.module.css.js +81 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts +2 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.js +88 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts +9 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts.map +1 -0
- package/dist/components/FeatureProgress/FeatureProgressCompleteModal.js +35 -0
- package/dist/components/FeatureProgress/constants.d.ts +4 -0
- package/dist/components/FeatureProgress/constants.d.ts.map +1 -0
- package/dist/components/FeatureProgress/constants.js +4 -0
- package/dist/components/FeatureProgress/index.d.ts +3 -0
- package/dist/components/FeatureProgress/index.d.ts.map +1 -0
- package/dist/components/FilePicker/FilePicker.d.ts +4 -2
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +247 -229
- package/dist/components/FilePicker/FilePicker.module.css.js +12 -10
- package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGallery.js +59 -33
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +38 -38
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +18 -15
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +39 -39
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +51 -35
- package/dist/components/FilePicker/api/giphyApi.js +10 -10
- package/dist/components/FilePicker/coverCollections.d.ts +4 -0
- package/dist/components/FilePicker/coverCollections.d.ts.map +1 -0
- package/dist/components/FilePicker/coverCollections.js +164 -0
- package/dist/components/FilePicker/index.d.ts +1 -0
- package/dist/components/FilePicker/index.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
- package/dist/components/FormViewer/components/OneSlideLayput.js +39 -37
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +42 -42
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
- package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStoreApi.js +13 -13
- package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.js +185 -183
- package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
- package/dist/components/ImageCropper/index.d.ts +1 -1
- package/dist/components/ImageCropper/index.d.ts.map +1 -1
- package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -1
- package/dist/components/ImageCropper/useCropInteraction.js +13 -2
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +7 -7
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +3 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -1
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +3 -1
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +45 -35
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
- package/dist/components/Loaders/styles.module.css.js +6 -6
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -1
- package/dist/components/MediaLibrary/MediaLibraryRow.js +16 -4
- package/dist/components/NavMenu/NavMenu.d.ts +2 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.module.css.js +16 -16
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +2 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +128 -106
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
- package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
- package/dist/components/OnBoarding/styles.module.css.js +7 -7
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts +17 -0
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts.map +1 -0
- package/dist/components/OnboardingTour/OnboardingTourFooter.js +40 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +13 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -0
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +164 -0
- package/dist/components/OnboardingTour/index.d.ts +4 -0
- package/dist/components/OnboardingTour/index.d.ts.map +1 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +14 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -0
- package/dist/components/OnboardingTour/useOnboardingTour.js +50 -0
- package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
- package/dist/components/SettingsSection/styles.module.css.js +1 -1
- package/dist/components/SocialLinkRow/index.d.ts.map +1 -1
- package/dist/components/SocialLinkRow/index.js +80 -58
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
- package/dist/components/TimezonePicker/index.d.ts.map +1 -1
- package/dist/components/TimezonePicker/index.js +42 -41
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +11 -10
- package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +21 -21
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +74 -74
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +1 -1
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/platform.d.ts +14 -0
- package/dist/helpers/platform.d.ts.map +1 -0
- package/dist/helpers/platform.js +33 -0
- package/dist/helpers/showFeatureFeedback.d.ts +16 -0
- package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
- package/dist/helpers/showFeatureFeedback.js +109 -0
- package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +81 -113
- package/dist/helpers/showNotifications.module.css.js +10 -10
- package/dist/hooks/useFeatureFeedback.d.ts +23 -0
- package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
- package/dist/hooks/useFeatureFeedback.js +45 -0
- package/dist/hooks/usePlatform.d.ts +3 -0
- package/dist/hooks/usePlatform.d.ts.map +1 -0
- package/dist/hooks/usePlatform.js +10 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +373 -334
- package/dist/lang/locales/ui_en.json.js +15 -15
- package/dist/lang/locales/ui_es.json.js +13 -13
- package/dist/lang/locales/ui_ru.json.js +12 -12
- package/dist/lib/contentImport/lexicalSerializer.js +59 -47
- package/dist/lib/contentImport/utils.d.ts.map +1 -1
- package/dist/lib/layersVisitData.d.ts +13 -0
- package/dist/lib/layersVisitData.d.ts.map +1 -0
- package/dist/lib/layersVisitData.js +37 -0
- package/dist/store/featureProgress.d.ts +39 -0
- package/dist/store/featureProgress.d.ts.map +1 -0
- package/dist/store/featureProgress.js +68 -0
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +8 -6
- package/docs/README.md +499 -499
- package/package.json +75 -74
|
@@ -1 +1 @@
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAD7hO,CAAC"}
|
|
@@ -6,11 +6,11 @@ const O = (e) => {
|
|
|
6
6
|
...t,
|
|
7
7
|
...n
|
|
8
8
|
}));
|
|
9
|
-
},
|
|
10
|
-
e.getState().onConfigChange?.(
|
|
9
|
+
}, l = () => e.getState().config, s = () => {
|
|
10
|
+
e.getState().onConfigChange?.(l());
|
|
11
11
|
}, u = (n) => {
|
|
12
12
|
e.setState({ layout: n });
|
|
13
|
-
},
|
|
13
|
+
}, m = (n) => {
|
|
14
14
|
e.setState((t) => ({
|
|
15
15
|
...t,
|
|
16
16
|
config: {
|
|
@@ -122,7 +122,7 @@ const O = (e) => {
|
|
|
122
122
|
steps: o
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
|
-
}),
|
|
125
|
+
}), S(n.id), s();
|
|
126
126
|
}, A = (n) => {
|
|
127
127
|
e.setState((i) => ({
|
|
128
128
|
...i,
|
|
@@ -130,7 +130,7 @@ const O = (e) => {
|
|
|
130
130
|
...i.config,
|
|
131
131
|
steps: i.config.steps.filter((o) => o.id !== n) || []
|
|
132
132
|
}
|
|
133
|
-
})), E(e.getState()) === n &&
|
|
133
|
+
})), E(e.getState()) === n && h(), s();
|
|
134
134
|
}, F = (n, t) => {
|
|
135
135
|
n === "list" ? e.setState((i) => ({
|
|
136
136
|
...i,
|
|
@@ -291,7 +291,7 @@ const O = (e) => {
|
|
|
291
291
|
...o,
|
|
292
292
|
initialConfigSnapshot: n
|
|
293
293
|
})), t || s();
|
|
294
|
-
},
|
|
294
|
+
}, S = (n) => {
|
|
295
295
|
e.setState((t) => {
|
|
296
296
|
const i = [
|
|
297
297
|
...t.activeStep.history.slice(0, t.activeStep.current + 1),
|
|
@@ -324,10 +324,10 @@ const O = (e) => {
|
|
|
324
324
|
)
|
|
325
325
|
}
|
|
326
326
|
}));
|
|
327
|
-
},
|
|
327
|
+
}, h = () => {
|
|
328
328
|
e.setState({
|
|
329
329
|
activeStep: {
|
|
330
|
-
history: [],
|
|
330
|
+
history: [null],
|
|
331
331
|
current: 0
|
|
332
332
|
}
|
|
333
333
|
});
|
|
@@ -343,7 +343,7 @@ const O = (e) => {
|
|
|
343
343
|
})), s();
|
|
344
344
|
},
|
|
345
345
|
setLayout: u,
|
|
346
|
-
patchSettingsData:
|
|
346
|
+
patchSettingsData: m,
|
|
347
347
|
patchThemeData: C,
|
|
348
348
|
patchContainerTheme: y,
|
|
349
349
|
patchTitleProperties: b,
|
|
@@ -363,19 +363,19 @@ const O = (e) => {
|
|
|
363
363
|
removeCondition: V,
|
|
364
364
|
setIsMobile: _,
|
|
365
365
|
setConfig: $,
|
|
366
|
-
setActiveStepId:
|
|
366
|
+
setActiveStepId: S,
|
|
367
367
|
setFormLayout: (n) => {
|
|
368
|
-
|
|
368
|
+
m({ layout: n }), s();
|
|
369
369
|
},
|
|
370
370
|
scrollToControl: (n) => {
|
|
371
371
|
const t = document.querySelector(`[data-control-id='${n}']`);
|
|
372
372
|
t && t.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
373
373
|
},
|
|
374
|
-
getConfig:
|
|
374
|
+
getConfig: l,
|
|
375
375
|
setProps: r,
|
|
376
376
|
forwardActiveStep: z,
|
|
377
377
|
backActiveStep: j,
|
|
378
|
-
resetActiveStep:
|
|
378
|
+
resetActiveStep: h
|
|
379
379
|
};
|
|
380
380
|
};
|
|
381
381
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageCropper.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCropper/ImageCropper.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9C,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AASD,eAAO,MAAM,YAAY,GAAI,oFAQ1B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ImageCropper.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCropper/ImageCropper.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9C,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AASD,eAAO,MAAM,YAAY,GAAI,oFAQ1B,iBAAiB,4CAqjBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,250 +1,252 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { useElementSize as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
src:
|
|
8
|
-
variant:
|
|
9
|
-
aspectRatio:
|
|
10
|
-
minSize:
|
|
11
|
-
maxSize:
|
|
12
|
-
onCropComplete:
|
|
13
|
-
onCropDataChange:
|
|
1
|
+
import { jsxs as b, jsx as a, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as ne, useState as H, useMemo as ce, useEffect as j, useCallback as G } from "react";
|
|
3
|
+
import { Box as oe } from "@mantine/core";
|
|
4
|
+
import { useElementSize as ae } from "@mantine/hooks";
|
|
5
|
+
import h from "./ImageCropper.module.css.js";
|
|
6
|
+
const fe = ({
|
|
7
|
+
src: ie,
|
|
8
|
+
variant: I = "square",
|
|
9
|
+
aspectRatio: o = 1,
|
|
10
|
+
minSize: m = 50,
|
|
11
|
+
maxSize: X,
|
|
12
|
+
onCropComplete: J,
|
|
13
|
+
onCropDataChange: K
|
|
14
14
|
}) => {
|
|
15
15
|
const {
|
|
16
|
-
ref:
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
19
|
-
} =
|
|
20
|
-
if (!
|
|
21
|
-
return { x: 0, y: 0, width:
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
const
|
|
16
|
+
ref: he,
|
|
17
|
+
width: v,
|
|
18
|
+
height: M
|
|
19
|
+
} = ae(), W = ne(null), Q = ne(null), [Y, se] = H(!1), [f, de] = H({ width: 0, height: 0 }), r = ce(() => {
|
|
20
|
+
if (!Y || v === 0 || M === 0 || f.width === 0)
|
|
21
|
+
return { x: 0, y: 0, width: v, height: M };
|
|
22
|
+
const n = v / M, i = f.width / f.height;
|
|
23
|
+
if (i > n) {
|
|
24
|
+
const s = v / i;
|
|
25
25
|
return {
|
|
26
26
|
x: 0,
|
|
27
|
-
y: (
|
|
28
|
-
width:
|
|
29
|
-
height:
|
|
27
|
+
y: (M - s) / 2,
|
|
28
|
+
width: v,
|
|
29
|
+
height: s
|
|
30
30
|
};
|
|
31
31
|
} else {
|
|
32
|
-
const
|
|
32
|
+
const s = M * i;
|
|
33
33
|
return {
|
|
34
|
-
x: (
|
|
34
|
+
x: (v - s) / 2,
|
|
35
35
|
y: 0,
|
|
36
|
-
width:
|
|
37
|
-
height:
|
|
36
|
+
width: s,
|
|
37
|
+
height: M
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
}, [
|
|
40
|
+
}, [Y, v, M, f]), [t, U] = H({
|
|
41
41
|
x: 0,
|
|
42
42
|
y: 0,
|
|
43
43
|
width: 200,
|
|
44
44
|
height: 200
|
|
45
|
-
}), [
|
|
45
|
+
}), [P, Z] = H(!1), [T, _] = H(!1), [l, S] = H(null), [V, R] = H({ x: 0, y: 0 }), [e, z] = H({
|
|
46
46
|
x: 0,
|
|
47
47
|
y: 0,
|
|
48
48
|
width: 0,
|
|
49
49
|
height: 0
|
|
50
50
|
});
|
|
51
|
-
|
|
52
|
-
if (!
|
|
51
|
+
j(() => {
|
|
52
|
+
if (!Y || v === 0 || M === 0 || r.width === 0)
|
|
53
53
|
return;
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
const u =
|
|
57
|
-
|
|
54
|
+
let n, i, s = Math.min(r.width, r.height) * 0.8;
|
|
55
|
+
X && (s = Math.min(s, X)), o >= 1 ? (n = s, i = s / o) : (i = s, n = s * o);
|
|
56
|
+
const u = r.x + (r.width - n) / 2, k = r.y + (r.height - i) / 2;
|
|
57
|
+
U({ x: u, y: k, width: n, height: i });
|
|
58
58
|
}, [
|
|
59
|
-
|
|
60
|
-
c,
|
|
61
|
-
M,
|
|
62
|
-
L,
|
|
59
|
+
Y,
|
|
63
60
|
o,
|
|
64
|
-
v
|
|
61
|
+
v,
|
|
62
|
+
M,
|
|
63
|
+
r,
|
|
64
|
+
X
|
|
65
65
|
]);
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
width:
|
|
69
|
-
height:
|
|
70
|
-
}),
|
|
71
|
-
}, []),
|
|
72
|
-
(
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
66
|
+
const re = G(() => {
|
|
67
|
+
W.current && (de({
|
|
68
|
+
width: W.current.naturalWidth,
|
|
69
|
+
height: W.current.naturalHeight
|
|
70
|
+
}), se(!0));
|
|
71
|
+
}, []), ee = G(
|
|
72
|
+
(n) => {
|
|
73
|
+
n.preventDefault(), n.stopPropagation();
|
|
74
|
+
const i = "touches" in n ? n.touches[0].clientX : n.clientX, s = "touches" in n ? n.touches[0].clientY : n.clientY;
|
|
75
|
+
Z(!0), R({ x: i, y: s }), z({ ...t });
|
|
76
76
|
},
|
|
77
77
|
[t]
|
|
78
|
-
),
|
|
79
|
-
(
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
78
|
+
), q = G(
|
|
79
|
+
(n) => (i) => {
|
|
80
|
+
i.preventDefault(), i.stopPropagation();
|
|
81
|
+
const s = "touches" in i ? i.touches[0].clientX : i.clientX, u = "touches" in i ? i.touches[0].clientY : i.clientY;
|
|
82
|
+
_(!0), S(n), R({ x: s, y: u }), z({ ...t });
|
|
83
83
|
},
|
|
84
84
|
[t]
|
|
85
85
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
if (!
|
|
89
|
-
const u = "touches" in
|
|
90
|
-
if (
|
|
91
|
-
let
|
|
92
|
-
|
|
86
|
+
j(() => {
|
|
87
|
+
const n = (s) => {
|
|
88
|
+
if (!P && !T) return;
|
|
89
|
+
const u = "touches" in s ? s.touches[0].clientX : s.clientX, k = "touches" in s ? s.touches[0].clientY : s.clientY, y = u - V.x, D = k - V.y, B = r.x, L = r.y, N = r.x + r.width, A = r.y + r.height;
|
|
90
|
+
if (P) {
|
|
91
|
+
let g = e.x + y, w = e.y + D;
|
|
92
|
+
g = Math.max(B, Math.min(g, N - t.width)), w = Math.max(L, Math.min(w, A - t.height)), U((d) => ({ ...d, x: g, y: w }));
|
|
93
93
|
}
|
|
94
|
-
if (
|
|
95
|
-
let
|
|
96
|
-
switch (
|
|
94
|
+
if (T && l) {
|
|
95
|
+
let g = e.x, w = e.y, d = e.width, c = e.height;
|
|
96
|
+
switch (l) {
|
|
97
97
|
case "se":
|
|
98
|
-
|
|
98
|
+
d = Math.max(m, e.width + y), c = d / o;
|
|
99
99
|
break;
|
|
100
100
|
case "sw":
|
|
101
|
-
|
|
101
|
+
d = Math.max(m, e.width - y), c = d / o, g = e.x + e.width - d;
|
|
102
102
|
break;
|
|
103
103
|
case "ne":
|
|
104
|
-
|
|
104
|
+
d = Math.max(m, e.width + y), c = d / o, w = e.y + e.height - c;
|
|
105
105
|
break;
|
|
106
106
|
case "nw":
|
|
107
|
-
|
|
107
|
+
d = Math.max(m, e.width - y), c = d / o, g = e.x + e.width - d, w = e.y + e.height - c;
|
|
108
108
|
break;
|
|
109
109
|
case "e":
|
|
110
|
-
|
|
110
|
+
d = Math.max(m, e.width + y), c = d / o, w = e.y + (e.height - c) / 2;
|
|
111
111
|
break;
|
|
112
112
|
case "w":
|
|
113
|
-
|
|
113
|
+
d = Math.max(m, e.width - y), c = d / o, g = e.x + e.width - d, w = e.y + (e.height - c) / 2;
|
|
114
114
|
break;
|
|
115
115
|
case "s":
|
|
116
|
-
|
|
116
|
+
c = Math.max(m, e.height + D), d = c * o, g = e.x + (e.width - d) / 2;
|
|
117
117
|
break;
|
|
118
118
|
case "n":
|
|
119
|
-
|
|
119
|
+
c = Math.max(m, e.height - D), d = c * o, g = e.x + (e.width - d) / 2, w = e.y + e.height - c;
|
|
120
120
|
break;
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
const p = l.includes("w") ? e.x + e.width : l.includes("e") ? e.x : e.x + e.width / 2, $ = l.includes("n") ? e.y + e.height : l.includes("s") ? e.y : e.y + e.height / 2;
|
|
123
|
+
let x, E;
|
|
124
|
+
l.includes("w") ? x = p - B : l.includes("e") ? x = N - p : x = Math.min(p - B, N - p) * 2, l.includes("n") ? E = $ - L : l.includes("s") ? E = A - $ : E = Math.min($ - L, A - $) * 2, X && (o >= 1 ? x = Math.min(x, X) : E = Math.min(E, X)), x / o < E ? E = x / o : x = E * o, d > x && (d = x, c = d / o), l.includes("w") ? g = p - d : l.includes("e") ? g = p : g = p - d / 2, l.includes("n") ? w = $ - c : l.includes("s") ? w = $ : w = $ - c / 2, d >= m && c >= m && U({ x: g, y: w, width: d, height: c });
|
|
123
125
|
}
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
+
}, i = () => {
|
|
127
|
+
Z(!1), _(!1), S(null);
|
|
126
128
|
};
|
|
127
|
-
return (
|
|
128
|
-
window.removeEventListener("mousemove",
|
|
129
|
+
return (P || T) && (window.addEventListener("mousemove", n), window.addEventListener("mouseup", i), window.addEventListener("touchmove", n), window.addEventListener("touchend", i)), () => {
|
|
130
|
+
window.removeEventListener("mousemove", n), window.removeEventListener("mouseup", i), window.removeEventListener("touchmove", n), window.removeEventListener("touchend", i);
|
|
129
131
|
};
|
|
130
132
|
}, [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
P,
|
|
134
|
+
T,
|
|
135
|
+
l,
|
|
136
|
+
V,
|
|
135
137
|
e,
|
|
136
|
-
|
|
138
|
+
r,
|
|
137
139
|
t.width,
|
|
138
140
|
t.height,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
]),
|
|
143
|
-
if (
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
x: (t.x -
|
|
147
|
-
y: (t.y -
|
|
148
|
-
width: t.width *
|
|
149
|
-
height: t.height *
|
|
150
|
-
scale:
|
|
141
|
+
o,
|
|
142
|
+
m,
|
|
143
|
+
X
|
|
144
|
+
]), j(() => {
|
|
145
|
+
if (K && Y && r.width > 0) {
|
|
146
|
+
const n = f.width / r.width, i = f.height / r.height;
|
|
147
|
+
K({
|
|
148
|
+
x: (t.x - r.x) * n,
|
|
149
|
+
y: (t.y - r.y) * i,
|
|
150
|
+
width: t.width * n,
|
|
151
|
+
height: t.height * i,
|
|
152
|
+
scale: n
|
|
151
153
|
});
|
|
152
154
|
}
|
|
153
|
-
}, [t,
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
|
|
155
|
+
}, [t, f, r, Y, K]);
|
|
156
|
+
const te = G(() => new Promise((n, i) => {
|
|
157
|
+
if (!W.current || !Q.current) {
|
|
158
|
+
i(new Error("Image or canvas not ready"));
|
|
157
159
|
return;
|
|
158
160
|
}
|
|
159
|
-
const
|
|
161
|
+
const s = Q.current, u = s.getContext("2d");
|
|
160
162
|
if (!u) {
|
|
161
|
-
|
|
163
|
+
i(new Error("Could not get canvas context"));
|
|
162
164
|
return;
|
|
163
165
|
}
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
const k = f.width / r.width, y = f.height / r.height, D = (t.x - r.x) * k, B = (t.y - r.y) * y, L = t.width * k, N = t.height * y;
|
|
167
|
+
s.width = L, s.height = N, I === "rounded" && (u.beginPath(), u.arc(
|
|
168
|
+
L / 2,
|
|
167
169
|
N / 2,
|
|
168
|
-
Math.min(
|
|
170
|
+
Math.min(L, N) / 2,
|
|
169
171
|
0,
|
|
170
172
|
Math.PI * 2
|
|
171
173
|
), u.closePath(), u.clip()), u.drawImage(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
W.current,
|
|
175
|
+
D,
|
|
176
|
+
B,
|
|
177
|
+
L,
|
|
176
178
|
N,
|
|
177
179
|
0,
|
|
178
180
|
0,
|
|
179
|
-
|
|
181
|
+
L,
|
|
180
182
|
N
|
|
181
|
-
),
|
|
182
|
-
(
|
|
183
|
-
|
|
183
|
+
), s.toBlob(
|
|
184
|
+
(A) => {
|
|
185
|
+
A ? n(A) : i(new Error("Failed to create blob"));
|
|
184
186
|
},
|
|
185
187
|
"image/png",
|
|
186
188
|
1
|
|
187
189
|
);
|
|
188
|
-
}), [t,
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
}), [t, f, r, I]);
|
|
191
|
+
j(() => {
|
|
192
|
+
J && te().then(J).catch(() => {
|
|
191
193
|
});
|
|
192
|
-
}, [
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
nw:
|
|
196
|
-
ne:
|
|
197
|
-
sw:
|
|
198
|
-
se:
|
|
194
|
+
}, [te, J]);
|
|
195
|
+
const C = (n) => {
|
|
196
|
+
const i = {
|
|
197
|
+
nw: h.handleNW,
|
|
198
|
+
ne: h.handleNE,
|
|
199
|
+
sw: h.handleSW,
|
|
200
|
+
se: h.handleSE
|
|
199
201
|
};
|
|
200
|
-
return /* @__PURE__ */
|
|
202
|
+
return /* @__PURE__ */ b(
|
|
201
203
|
"div",
|
|
202
204
|
{
|
|
203
|
-
className: `${
|
|
204
|
-
onMouseDown:
|
|
205
|
-
onTouchStart:
|
|
205
|
+
className: `${h.cornerHandle} ${i[n]}`,
|
|
206
|
+
onMouseDown: q(n),
|
|
207
|
+
onTouchStart: q(n),
|
|
206
208
|
children: [
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ a("div", { className: h.cornerHandleArm, "data-direction": "horizontal" }),
|
|
210
|
+
/* @__PURE__ */ a("div", { className: h.cornerHandleArm, "data-direction": "vertical" })
|
|
209
211
|
]
|
|
210
212
|
}
|
|
211
213
|
);
|
|
212
|
-
},
|
|
213
|
-
const
|
|
214
|
-
n:
|
|
215
|
-
s:
|
|
216
|
-
e:
|
|
217
|
-
w:
|
|
214
|
+
}, F = (n) => {
|
|
215
|
+
const i = {
|
|
216
|
+
n: h.handleN,
|
|
217
|
+
s: h.handleS,
|
|
218
|
+
e: h.handleE,
|
|
219
|
+
w: h.handleW
|
|
218
220
|
};
|
|
219
|
-
return /* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ a(
|
|
220
222
|
"div",
|
|
221
223
|
{
|
|
222
|
-
className: `${
|
|
223
|
-
onMouseDown:
|
|
224
|
-
onTouchStart:
|
|
225
|
-
children: /* @__PURE__ */
|
|
224
|
+
className: `${h.edgeHandle} ${i[n]}`,
|
|
225
|
+
onMouseDown: q(n),
|
|
226
|
+
onTouchStart: q(n),
|
|
227
|
+
children: /* @__PURE__ */ a("div", { className: h.edgeHandleBar })
|
|
226
228
|
}
|
|
227
229
|
);
|
|
228
230
|
};
|
|
229
|
-
return /* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
return /* @__PURE__ */ b(oe, { className: h.container, ref: he, children: [
|
|
232
|
+
/* @__PURE__ */ a("canvas", { ref: Q, style: { display: "none" } }),
|
|
233
|
+
/* @__PURE__ */ a(
|
|
232
234
|
"img",
|
|
233
235
|
{
|
|
234
|
-
ref:
|
|
235
|
-
src:
|
|
236
|
+
ref: W,
|
|
237
|
+
src: ie,
|
|
236
238
|
alt: "Crop preview",
|
|
237
|
-
className:
|
|
238
|
-
onLoad:
|
|
239
|
+
className: h.image,
|
|
240
|
+
onLoad: re,
|
|
239
241
|
draggable: !1
|
|
240
242
|
}
|
|
241
243
|
),
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
/* @__PURE__ */
|
|
244
|
+
Y && /* @__PURE__ */ b(O, { children: [
|
|
245
|
+
I === "square" ? /* @__PURE__ */ b(O, { children: [
|
|
246
|
+
/* @__PURE__ */ a(
|
|
245
247
|
"div",
|
|
246
248
|
{
|
|
247
|
-
className:
|
|
249
|
+
className: h.overlay,
|
|
248
250
|
style: {
|
|
249
251
|
top: 0,
|
|
250
252
|
left: 0,
|
|
@@ -253,10 +255,10 @@ const ge = ({
|
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
),
|
|
256
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ a(
|
|
257
259
|
"div",
|
|
258
260
|
{
|
|
259
|
-
className:
|
|
261
|
+
className: h.overlay,
|
|
260
262
|
style: {
|
|
261
263
|
top: t.y + t.height,
|
|
262
264
|
left: 0,
|
|
@@ -265,10 +267,10 @@ const ge = ({
|
|
|
265
267
|
}
|
|
266
268
|
}
|
|
267
269
|
),
|
|
268
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ a(
|
|
269
271
|
"div",
|
|
270
272
|
{
|
|
271
|
-
className:
|
|
273
|
+
className: h.overlay,
|
|
272
274
|
style: {
|
|
273
275
|
top: t.y,
|
|
274
276
|
left: 0,
|
|
@@ -277,10 +279,10 @@ const ge = ({
|
|
|
277
279
|
}
|
|
278
280
|
}
|
|
279
281
|
),
|
|
280
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ a(
|
|
281
283
|
"div",
|
|
282
284
|
{
|
|
283
|
-
className:
|
|
285
|
+
className: h.overlay,
|
|
284
286
|
style: {
|
|
285
287
|
top: t.y,
|
|
286
288
|
left: t.x + t.width,
|
|
@@ -289,10 +291,10 @@ const ge = ({
|
|
|
289
291
|
}
|
|
290
292
|
}
|
|
291
293
|
)
|
|
292
|
-
] }) : /* @__PURE__ */
|
|
294
|
+
] }) : /* @__PURE__ */ a(
|
|
293
295
|
"div",
|
|
294
296
|
{
|
|
295
|
-
className:
|
|
297
|
+
className: h.circularOverlay,
|
|
296
298
|
style: {
|
|
297
299
|
left: t.x + t.width / 2,
|
|
298
300
|
top: t.y + t.height / 2,
|
|
@@ -301,49 +303,49 @@ const ge = ({
|
|
|
301
303
|
}
|
|
302
304
|
}
|
|
303
305
|
),
|
|
304
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ b(
|
|
305
307
|
"div",
|
|
306
308
|
{
|
|
307
|
-
className: `${
|
|
309
|
+
className: `${h.cropArea} ${I === "rounded" ? h.cropAreaRounded : ""}`,
|
|
308
310
|
style: {
|
|
309
311
|
left: t.x,
|
|
310
312
|
top: t.y,
|
|
311
313
|
width: t.width,
|
|
312
314
|
height: t.height
|
|
313
315
|
},
|
|
314
|
-
onMouseDown:
|
|
315
|
-
onTouchStart:
|
|
316
|
+
onMouseDown: ee,
|
|
317
|
+
onTouchStart: ee,
|
|
316
318
|
children: [
|
|
317
|
-
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */
|
|
319
|
+
I === "square" ? /* @__PURE__ */ a("div", { className: h.dashedBorder }) : /* @__PURE__ */ b(O, { children: [
|
|
320
|
+
/* @__PURE__ */ a("div", { className: `${h.edgeLine} ${h.edgeLineTop}` }),
|
|
321
|
+
/* @__PURE__ */ a(
|
|
320
322
|
"div",
|
|
321
323
|
{
|
|
322
|
-
className: `${
|
|
324
|
+
className: `${h.edgeLine} ${h.edgeLineBottom}`
|
|
323
325
|
}
|
|
324
326
|
),
|
|
325
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ a(
|
|
326
328
|
"div",
|
|
327
329
|
{
|
|
328
|
-
className: `${
|
|
330
|
+
className: `${h.edgeLine} ${h.edgeLineLeft}`
|
|
329
331
|
}
|
|
330
332
|
),
|
|
331
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ a(
|
|
332
334
|
"div",
|
|
333
335
|
{
|
|
334
|
-
className: `${
|
|
336
|
+
className: `${h.edgeLine} ${h.edgeLineRight}`
|
|
335
337
|
}
|
|
336
338
|
)
|
|
337
339
|
] }),
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
340
|
+
C("nw"),
|
|
341
|
+
C("ne"),
|
|
342
|
+
C("sw"),
|
|
343
|
+
C("se"),
|
|
344
|
+
I === "square" && /* @__PURE__ */ b(O, { children: [
|
|
345
|
+
F("n"),
|
|
346
|
+
F("s"),
|
|
347
|
+
F("e"),
|
|
348
|
+
F("w")
|
|
347
349
|
] })
|
|
348
350
|
]
|
|
349
351
|
}
|
|
@@ -352,5 +354,5 @@ const ge = ({
|
|
|
352
354
|
] });
|
|
353
355
|
};
|
|
354
356
|
export {
|
|
355
|
-
|
|
357
|
+
fe as ImageCropper
|
|
356
358
|
};
|