@edifice.io/react 2.0.0-develop-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +110 -0
- package/dist/audience.js +16 -0
- package/dist/components/ActionBar/ActionBar.d.ts +10 -0
- package/dist/components/ActionBar/ActionBar.js +8 -0
- package/dist/components/ActionBar/index.d.ts +2 -0
- package/dist/components/Alert/Alert.d.ts +60 -0
- package/dist/components/Alert/Alert.js +78 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/AppHeader/AppHeader.d.ts +17 -0
- package/dist/components/AppHeader/AppHeader.js +22 -0
- package/dist/components/AppHeader/index.d.ts +2 -0
- package/dist/components/AppIcon/AppIcon.d.ts +45 -0
- package/dist/components/AppIcon/AppIcon.js +49 -0
- package/dist/components/AppIcon/index.d.ts +1 -0
- package/dist/components/Attachment/Attachment.d.ts +14 -0
- package/dist/components/Attachment/Attachment.js +15 -0
- package/dist/components/Attachment/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +32 -0
- package/dist/components/Avatar/Avatar.js +33 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +47 -0
- package/dist/components/Badge/Badge.js +31 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +28 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +13 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +14 -0
- package/dist/components/Breadcrumb/BreadcrumbList.d.ts +13 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js +13 -0
- package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +18 -0
- package/dist/components/Breadcrumb/BreadcrumbNav.js +22 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +63 -0
- package/dist/components/Button/Button.js +35 -0
- package/dist/components/Button/IconButton.d.ts +11 -0
- package/dist/components/Button/IconButton.js +18 -0
- package/dist/components/Button/SearchButton.d.ts +21 -0
- package/dist/components/Button/SearchButton.js +17 -0
- package/dist/components/Button/index.d.ts +6 -0
- package/dist/components/Card/Card.d.ts +83 -0
- package/dist/components/Card/Card.js +51 -0
- package/dist/components/Card/CardBody.d.ts +10 -0
- package/dist/components/Card/CardBody.js +18 -0
- package/dist/components/Card/CardContext.d.ts +12 -0
- package/dist/components/Card/CardContext.js +11 -0
- package/dist/components/Card/CardFooter.d.ts +8 -0
- package/dist/components/Card/CardFooter.js +7 -0
- package/dist/components/Card/CardHeader.d.ts +5 -0
- package/dist/components/Card/CardHeader.js +19 -0
- package/dist/components/Card/CardImage.d.ts +9 -0
- package/dist/components/Card/CardImage.js +21 -0
- package/dist/components/Card/CardText.d.ts +9 -0
- package/dist/components/Card/CardText.js +12 -0
- package/dist/components/Card/CardTitle.d.ts +9 -0
- package/dist/components/Card/CardTitle.js +12 -0
- package/dist/components/Card/CardUser.d.ts +8 -0
- package/dist/components/Card/CardUser.js +10 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +21 -0
- package/dist/components/Checkbox/Checkbox.js +35 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPalette.d.ts +46 -0
- package/dist/components/ColorPicker/ColorPalette.js +171 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +18 -0
- package/dist/components/ColorPicker/ColorPicker.js +37 -0
- package/dist/components/ColorPicker/ColorPickerItem.d.ts +20 -0
- package/dist/components/ColorPicker/ColorPickerItem.js +13 -0
- package/dist/components/ColorPicker/index.d.ts +5 -0
- package/dist/components/Combobox/Combobox.d.ts +31 -0
- package/dist/components/Combobox/Combobox.js +41 -0
- package/dist/components/Combobox/ComboboxTrigger.d.ts +9 -0
- package/dist/components/Combobox/ComboboxTrigger.js +30 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts +79 -0
- package/dist/components/Dropdown/Dropdown.js +60 -0
- package/dist/components/Dropdown/DropdownCheckboxItem.d.ts +24 -0
- package/dist/components/Dropdown/DropdownCheckboxItem.js +34 -0
- package/dist/components/Dropdown/DropdownContext.d.ts +8 -0
- package/dist/components/Dropdown/DropdownContext.js +11 -0
- package/dist/components/Dropdown/DropdownItem.d.ts +29 -0
- package/dist/components/Dropdown/DropdownItem.js +33 -0
- package/dist/components/Dropdown/DropdownMenu.d.ts +35 -0
- package/dist/components/Dropdown/DropdownMenu.js +26 -0
- package/dist/components/Dropdown/DropdownMenuGroup.d.ts +13 -0
- package/dist/components/Dropdown/DropdownMenuGroup.js +12 -0
- package/dist/components/Dropdown/DropdownRadioItem.d.ts +24 -0
- package/dist/components/Dropdown/DropdownRadioItem.js +34 -0
- package/dist/components/Dropdown/DropdownSeparator.d.ts +5 -0
- package/dist/components/Dropdown/DropdownSeparator.js +5 -0
- package/dist/components/Dropdown/DropdownTrigger.d.ts +38 -0
- package/dist/components/Dropdown/DropdownTrigger.js +34 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Dropzone/Dropzone.d.ts +28 -0
- package/dist/components/Dropzone/Dropzone.js +56 -0
- package/dist/components/Dropzone/DropzoneContext.d.ts +10 -0
- package/dist/components/Dropzone/DropzoneContext.js +12 -0
- package/dist/components/Dropzone/DropzoneDrag.d.ts +5 -0
- package/dist/components/Dropzone/DropzoneDrag.js +11 -0
- package/dist/components/Dropzone/DropzoneFile.d.ts +8 -0
- package/dist/components/Dropzone/DropzoneFile.js +32 -0
- package/dist/components/Dropzone/DropzoneImport.d.ts +5 -0
- package/dist/components/Dropzone/DropzoneImport.js +28 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/EmptyScreen/EmptyScreen.d.ts +27 -0
- package/dist/components/EmptyScreen/EmptyScreen.js +20 -0
- package/dist/components/EmptyScreen/index.d.ts +2 -0
- package/dist/components/FileCard/FileCard.d.ts +13 -0
- package/dist/components/FileCard/FileCard.js +91 -0
- package/dist/components/FileCard/FileIcon.d.ts +6 -0
- package/dist/components/FileCard/FileIcon.js +15 -0
- package/dist/components/FileCard/index.d.ts +2 -0
- package/dist/components/Form/FormContext.d.ts +6 -0
- package/dist/components/Form/FormContext.js +11 -0
- package/dist/components/Form/FormControl.d.ts +42 -0
- package/dist/components/Form/FormControl.js +32 -0
- package/dist/components/Form/FormText.d.ts +8 -0
- package/dist/components/Form/FormText.js +17 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Grid/Grid.d.ts +56 -0
- package/dist/components/Grid/Grid.js +32 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Heading/Heading.d.ts +27 -0
- package/dist/components/Heading/Heading.js +16 -0
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +17 -0
- package/dist/components/Icon/Icon.js +10 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +29 -0
- package/dist/components/Image/Image.js +41 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +38 -0
- package/dist/components/ImagePicker/ImagePicker.js +58 -0
- package/dist/components/ImagePicker/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +33 -0
- package/dist/components/Input/Input.js +31 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Label/Label.d.ts +26 -0
- package/dist/components/Label/Label.js +37 -0
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/Loading/Loading.d.ts +29 -0
- package/dist/components/Loading/Loading.js +27 -0
- package/dist/components/Loading/index.d.ts +2 -0
- package/dist/components/LoadingScreen/LoadingScreen.d.ts +7 -0
- package/dist/components/LoadingScreen/LoadingScreen.js +25 -0
- package/dist/components/LoadingScreen/index.d.ts +1 -0
- package/dist/components/Logo/Logo.d.ts +8 -0
- package/dist/components/Logo/Logo.js +14 -0
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +14 -0
- package/dist/components/Menu/Menu.js +58 -0
- package/dist/components/Menu/MenuButton.d.ts +5 -0
- package/dist/components/Menu/MenuButton.js +21 -0
- package/dist/components/Menu/MenuContext.d.ts +10 -0
- package/dist/components/Menu/MenuContext.js +12 -0
- package/dist/components/Menu/MenuItem.d.ts +4 -0
- package/dist/components/Menu/MenuItem.js +19 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Modal/Modal.d.ts +56 -0
- package/dist/components/Modal/Modal.js +72 -0
- package/dist/components/Modal/ModalBody.d.ts +19 -0
- package/dist/components/Modal/ModalBody.js +15 -0
- package/dist/components/Modal/ModalContext.d.ts +8 -0
- package/dist/components/Modal/ModalContext.js +15 -0
- package/dist/components/Modal/ModalFooter.d.ts +12 -0
- package/dist/components/Modal/ModalFooter.js +5 -0
- package/dist/components/Modal/ModalHeader.d.ts +19 -0
- package/dist/components/Modal/ModalHeader.js +27 -0
- package/dist/components/Modal/ModalSubtitle.d.ts +12 -0
- package/dist/components/Modal/ModalSubtitle.js +5 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +33 -0
- package/dist/components/Popover/Popover.js +51 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +25 -0
- package/dist/components/Radio/Radio.js +31 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/SearchBar/SearchBar.d.ts +51 -0
- package/dist/components/SearchBar/SearchBar.js +36 -0
- package/dist/components/SearchBar/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +39 -0
- package/dist/components/Select/Select.js +37 -0
- package/dist/components/Select/SelectTrigger.d.ts +8 -0
- package/dist/components/Select/SelectTrigger.js +6 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Table/TableExplorer.d.ts +14 -0
- package/dist/components/Table/TableExplorer.js +8 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +42 -0
- package/dist/components/Tabs/Tabs.js +75 -0
- package/dist/components/Tabs/TabsContext.d.ts +12 -0
- package/dist/components/Tabs/TabsContext.js +12 -0
- package/dist/components/Tabs/TabsItem.d.ts +26 -0
- package/dist/components/Tabs/TabsItem.js +26 -0
- package/dist/components/Tabs/TabsList.d.ts +6 -0
- package/dist/components/Tabs/TabsList.js +24 -0
- package/dist/components/Tabs/TabsPanel.d.ts +17 -0
- package/dist/components/Tabs/TabsPanel.js +14 -0
- package/dist/components/Tabs/index.d.ts +3 -0
- package/dist/components/TextArea/TextArea.d.ts +33 -0
- package/dist/components/TextArea/TextArea.js +34 -0
- package/dist/components/TextArea/TextareaCounter.d.ts +4 -0
- package/dist/components/TextArea/TextareaCounter.js +8 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/Toolbar/Toolbar.d.ts +76 -0
- package/dist/components/Toolbar/Toolbar.js +77 -0
- package/dist/components/Toolbar/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip/Tooltip.js +40 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/TreeView/TreeItem.d.ts +52 -0
- package/dist/components/TreeView/TreeItem.js +54 -0
- package/dist/components/TreeView/TreeNode.d.ts +22 -0
- package/dist/components/TreeView/TreeView.d.ts +40 -0
- package/dist/components/TreeView/TreeView.js +39 -0
- package/dist/components/TreeView/hooks/useTreeItemEvents.d.ts +8 -0
- package/dist/components/TreeView/hooks/useTreeItemEvents.js +28 -0
- package/dist/components/TreeView/index.d.ts +3 -0
- package/dist/components/UploadCard/UploadCard.d.ts +42 -0
- package/dist/components/UploadCard/UploadCard.js +72 -0
- package/dist/components/UploadCard/index.d.ts +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +6 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -0
- package/dist/components/VisuallyHidden/index.d.ts +1 -0
- package/dist/components/index.d.ts +42 -0
- package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +28 -0
- package/dist/core/OdeClientProvider/OdeClientProvider.js +62 -0
- package/dist/core/OdeClientProvider/index.d.ts +1 -0
- package/dist/core/ThemeProvider/ThemeProvider.d.ts +11 -0
- package/dist/core/ThemeProvider/ThemeProvider.js +52 -0
- package/dist/core/ThemeProvider/index.d.ts +1 -0
- package/dist/core/index.d.ts +24 -0
- package/dist/core/useAvatar/index.d.ts +1 -0
- package/dist/core/useAvatar/useAvatar.d.ts +6 -0
- package/dist/core/useAvatar/useAvatar.js +30 -0
- package/dist/core/useBookmark/index.d.ts +1 -0
- package/dist/core/useBookmark/useBookmark.d.ts +2 -0
- package/dist/core/useBookmark/useBookmark.js +14 -0
- package/dist/core/useConf/index.d.ts +1 -0
- package/dist/core/useConf/useConf.d.ts +4 -0
- package/dist/core/useConf/useConf.js +13 -0
- package/dist/core/useConversation/index.d.ts +1 -0
- package/dist/core/useConversation/useConversation.d.ts +6 -0
- package/dist/core/useConversation/useConversation.js +43 -0
- package/dist/core/useCookiesConsent/index.d.ts +1 -0
- package/dist/core/useCookiesConsent/useCookiesConsent.d.ts +5 -0
- package/dist/core/useCookiesConsent/useCookiesConsent.js +29 -0
- package/dist/core/useDate/index.d.ts +2 -0
- package/dist/core/useDate/useDate.d.ts +13 -0
- package/dist/core/useDate/useDate.js +65 -0
- package/dist/core/useHasWorkflow/index.d.ts +1 -0
- package/dist/core/useHasWorkflow/useHasWorkflow.d.ts +1 -0
- package/dist/core/useHasWorkflow/useHasWorkflow.js +22 -0
- package/dist/core/useHeader/index.d.ts +1 -0
- package/dist/core/useHeader/useHeader.d.ts +5 -0
- package/dist/core/useHeader/useHeader.js +46 -0
- package/dist/core/useHttpErrorToast/index.d.ts +1 -0
- package/dist/core/useHttpErrorToast/useHttpErrorToast.d.ts +2 -0
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js +21 -0
- package/dist/core/useIsAdml/index.d.ts +1 -0
- package/dist/core/useIsAdml/useIsAdml.d.ts +3 -0
- package/dist/core/useIsAdml/useIsAdml.js +18 -0
- package/dist/core/useLibraryUrl/index.d.ts +1 -0
- package/dist/core/useLibraryUrl/useLibraryUrl.d.ts +7 -0
- package/dist/core/useLibraryUrl/useLibraryUrl.js +21 -0
- package/dist/core/useMediaLibrary/index.d.ts +1 -0
- package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +12 -0
- package/dist/core/useMediaLibrary/useMediaLibrary.js +58 -0
- package/dist/core/useOdeIcons/index.d.ts +1 -0
- package/dist/core/useOdeIcons/useOdeIcons.d.ts +9 -0
- package/dist/core/useOdeIcons/useOdeIcons.js +92 -0
- package/dist/core/usePaths/index.d.ts +1 -0
- package/dist/core/usePaths/usePaths.d.ts +1 -0
- package/dist/core/usePaths/usePaths.js +6 -0
- package/dist/core/usePreferences/index.d.ts +1 -0
- package/dist/core/usePreferences/usePreferences.d.ts +4 -0
- package/dist/core/usePreferences/usePreferences.js +10 -0
- package/dist/core/useResource/index.d.ts +1 -0
- package/dist/core/useResource/useResource.d.ts +3 -0
- package/dist/core/useResource/useResource.js +25 -0
- package/dist/core/useResourceSearch/index.d.ts +1 -0
- package/dist/core/useResourceSearch/useResourceSearch.d.ts +18 -0
- package/dist/core/useResourceSearch/useResourceSearch.js +34 -0
- package/dist/core/useSession/index.d.ts +1 -0
- package/dist/core/useSession/useSession.d.ts +1 -0
- package/dist/core/useSession/useSession.js +11 -0
- package/dist/core/useTrashedResource/index.d.ts +1 -0
- package/dist/core/useTrashedResource/useTrashedResource.d.ts +6 -0
- package/dist/core/useTrashedResource/useTrashedResource.js +27 -0
- package/dist/core/useUpload/index.d.ts +1 -0
- package/dist/core/useUpload/useUpload.d.ts +18 -0
- package/dist/core/useUpload/useUpload.js +106 -0
- package/dist/core/useUploadFiles/index.d.ts +1 -0
- package/dist/core/useUploadFiles/useUploadFiles.d.ts +25 -0
- package/dist/core/useUploadFiles/useUploadFiles.js +101 -0
- package/dist/core/useUser/index.d.ts +1 -0
- package/dist/core/useUser/useUser.d.ts +7 -0
- package/dist/core/useUser/useUser.js +22 -0
- package/dist/core/useWorkspaceFile/index.d.ts +1 -0
- package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +21 -0
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js +49 -0
- package/dist/core/useWorkspaceSearch/index.d.ts +1 -0
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +9 -0
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +58 -0
- package/dist/core/useXitiTrackPageLoad/index.d.ts +1 -0
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.d.ts +4 -0
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +28 -0
- package/dist/core/useZendeskGuide/index.d.ts +1 -0
- package/dist/core/useZendeskGuide/useZendeskGuide.d.ts +2 -0
- package/dist/core/useZendeskGuide/useZendeskGuide.js +101 -0
- package/dist/editor.js +58 -0
- package/dist/hooks/index.d.ts +14 -0
- package/dist/hooks/useBrowserInfo/index.d.ts +1 -0
- package/dist/hooks/useBrowserInfo/useBrowserInfo.d.ts +9 -0
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js +16 -0
- package/dist/hooks/useClickOutside/index.d.ts +1 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +2 -0
- package/dist/hooks/useClickOutside/useClickOutside.js +26 -0
- package/dist/hooks/useDebounce/index.d.ts +1 -0
- package/dist/hooks/useDebounce/useDebounce.d.ts +2 -0
- package/dist/hooks/useDebounce/useDebounce.js +15 -0
- package/dist/hooks/useDropdown/index.d.ts +1 -0
- package/dist/hooks/useDropdown/useDropdown.d.ts +32 -0
- package/dist/hooks/useDropdown/useDropdown.js +158 -0
- package/dist/hooks/useDropzone/index.d.ts +1 -0
- package/dist/hooks/useDropzone/useDropzone.d.ts +34 -0
- package/dist/hooks/useDropzone/useDropzone.js +76 -0
- package/dist/hooks/useHover/index.d.ts +1 -0
- package/dist/hooks/useHover/useHover.d.ts +2 -0
- package/dist/hooks/useHover/useHover.js +22 -0
- package/dist/hooks/useImage/index.d.ts +1 -0
- package/dist/hooks/useImage/useImage.d.ts +9 -0
- package/dist/hooks/useImage/useImage.js +18 -0
- package/dist/hooks/useImageResizer/index.d.ts +1 -0
- package/dist/hooks/useImageResizer/useImageResizer.d.ts +8 -0
- package/dist/hooks/useImageResizer/useImageResizer.js +42 -0
- package/dist/hooks/useKeyPress/index.d.ts +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.d.ts +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.js +14 -0
- package/dist/hooks/useScrollToTop/index.d.ts +1 -0
- package/dist/hooks/useScrollToTop/useScrollToTop.d.ts +1 -0
- package/dist/hooks/useScrollToTop/useScrollToTop.js +9 -0
- package/dist/hooks/useThumbnail/index.d.ts +1 -0
- package/dist/hooks/useThumbnail/useThumbnail.d.ts +14 -0
- package/dist/hooks/useThumbnail/useThumbnail.js +29 -0
- package/dist/hooks/useTitle/index.d.ts +1 -0
- package/dist/hooks/useTitle/useTitle.d.ts +1 -0
- package/dist/hooks/useTitle/useTitle.js +10 -0
- package/dist/hooks/useToast/index.d.ts +1 -0
- package/dist/hooks/useToast/useToast.d.ts +17 -0
- package/dist/hooks/useToast/useToast.js +34 -0
- package/dist/hooks/useToggle/index.d.ts +1 -0
- package/dist/hooks/useToggle/useToggle.d.ts +1 -0
- package/dist/hooks/useToggle/useToggle.js +10 -0
- package/dist/hooks/useTrapFocus/index.d.ts +1 -0
- package/dist/hooks/useTrapFocus/useTrapFocus.d.ts +2 -0
- package/dist/hooks/useTrapFocus/useTrapFocus.js +16 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +227 -0
- package/dist/modals.js +18 -0
- package/dist/modules/audience/ReactionChoice.d.ts +11 -0
- package/dist/modules/audience/ReactionChoice.js +33 -0
- package/dist/modules/audience/ReactionModal.Card.d.ts +4 -0
- package/dist/modules/audience/ReactionModal.Card.js +34 -0
- package/dist/modules/audience/ReactionModal.d.ts +20 -0
- package/dist/modules/audience/ReactionModal.js +73 -0
- package/dist/modules/audience/ReactionSummary.d.ts +10 -0
- package/dist/modules/audience/ReactionSummary.js +27 -0
- package/dist/modules/audience/ViewsByProfileCard.d.ts +9 -0
- package/dist/modules/audience/ViewsByProfileCard.js +35 -0
- package/dist/modules/audience/ViewsCounter.d.ts +11 -0
- package/dist/modules/audience/ViewsCounter.js +18 -0
- package/dist/modules/audience/ViewsModal.d.ts +11 -0
- package/dist/modules/audience/ViewsModal.js +40 -0
- package/dist/modules/audience/hooks/useReactionIcons.d.ts +5 -0
- package/dist/modules/audience/hooks/useReactionIcons.js +37 -0
- package/dist/modules/audience/hooks/useReactions.d.ts +15 -0
- package/dist/modules/audience/hooks/useReactions.js +35 -0
- package/dist/modules/audience/hooks/useViews.d.ts +11 -0
- package/dist/modules/audience/index.d.ts +12 -0
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.d.ts +8 -0
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +132 -0
- package/dist/modules/editor/components/BubbleMenuEditImage/index.d.ts +1 -0
- package/dist/modules/editor/components/Editor/Editor.d.ts +45 -0
- package/dist/modules/editor/components/Editor/Editor.js +83 -0
- package/dist/modules/editor/components/Editor/MathsModal.d.ts +8 -0
- package/dist/modules/editor/components/Editor/MathsModal.js +50 -0
- package/dist/modules/editor/components/Editor/index.d.ts +2 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.d.ts +22 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +17 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.d.ts +14 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +54 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.d.ts +14 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +47 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.d.ts +9 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +18 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.d.ts +14 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +50 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.d.ts +10 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +62 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.d.ts +10 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +52 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +10 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +319 -0
- package/dist/modules/editor/components/EditorToolbar/index.d.ts +1 -0
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/AudioNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/AudioNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/ImageNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/LinkerNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/VideoNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/VideoNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/index.d.ts +5 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.d.ts +7 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +34 -0
- package/dist/modules/editor/components/Renderer/AudioRenderer.d.ts +7 -0
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +11 -0
- package/dist/modules/editor/components/Renderer/LinkerRenderer.d.ts +9 -0
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js +34 -0
- package/dist/modules/editor/components/Renderer/MediaRenderer.d.ts +2 -0
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +69 -0
- package/dist/modules/editor/components/Renderer/index.d.ts +4 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +2 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +8 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +15 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js +59 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.d.ts +9 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +28 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.d.ts +13 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +45 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.d.ts +9 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +27 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.d.ts +9 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.js +88 -0
- package/dist/modules/editor/components/Toolbar/index.d.ts +2 -0
- package/dist/modules/editor/components/index.d.ts +6 -0
- package/dist/modules/editor/hooks/index.d.ts +12 -0
- package/dist/modules/editor/hooks/useActionOptions.d.ts +5 -0
- package/dist/modules/editor/hooks/useActionOptions.js +75 -0
- package/dist/modules/editor/hooks/useCommentEditor.d.ts +13 -0
- package/dist/modules/editor/hooks/useCommentEditor.js +37 -0
- package/dist/modules/editor/hooks/useEditorContext.d.ts +37 -0
- package/dist/modules/editor/hooks/useEditorContext.js +12 -0
- package/dist/modules/editor/hooks/useImageModal.d.ts +31 -0
- package/dist/modules/editor/hooks/useImageModal.js +46 -0
- package/dist/modules/editor/hooks/useImageSelection.d.ts +21 -0
- package/dist/modules/editor/hooks/useImageSelection.js +46 -0
- package/dist/modules/editor/hooks/useLinkToolbar.d.ts +17 -0
- package/dist/modules/editor/hooks/useLinkToolbar.js +37 -0
- package/dist/modules/editor/hooks/useMathsModal.d.ts +17 -0
- package/dist/modules/editor/hooks/useMathsModal.js +17 -0
- package/dist/modules/editor/hooks/useMathsStyles.d.ts +1 -0
- package/dist/modules/editor/hooks/useMathsStyles.js +20 -0
- package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +19 -0
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js +152 -0
- package/dist/modules/editor/hooks/useResizeMedia.d.ts +10 -0
- package/dist/modules/editor/hooks/useResizeMedia.js +47 -0
- package/dist/modules/editor/hooks/useSpeechRecognition.d.ts +6 -0
- package/dist/modules/editor/hooks/useSpeechRecognition.js +21 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.d.ts +12 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js +20 -0
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +15 -0
- package/dist/modules/editor/hooks/useTipTapEditor.js +75 -0
- package/dist/modules/editor/index.d.ts +3 -0
- package/dist/modules/editor/utils/has-extension.d.ts +2 -0
- package/dist/modules/editor/utils/has-extension.js +4 -0
- package/dist/modules/editor/utils/has-mark.d.ts +2 -0
- package/dist/modules/editor/utils/has-mark.js +4 -0
- package/dist/modules/editor/utils/has-text-style.d.ts +2 -0
- package/dist/modules/editor/utils/has-text-style.js +5 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +43 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +59 -0
- package/dist/modules/modals/OnboardingModal/index.d.ts +1 -0
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.d.ts +7 -0
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +30 -0
- package/dist/modules/modals/PublishModal/PublishModal.d.ts +9 -0
- package/dist/modules/modals/PublishModal/PublishModal.js +120 -0
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.d.ts +7 -0
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +29 -0
- package/dist/modules/modals/PublishModal/components/AgeSelect.d.ts +8 -0
- package/dist/modules/modals/PublishModal/components/AgeSelect.js +20 -0
- package/dist/modules/modals/PublishModal/components/LangSelect.d.ts +5 -0
- package/dist/modules/modals/PublishModal/components/LangSelect.js +19 -0
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.d.ts +1 -0
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +23 -0
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.d.ts +7 -0
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +29 -0
- package/dist/modules/modals/PublishModal/components/ToastError.d.ts +5 -0
- package/dist/modules/modals/PublishModal/components/ToastError.js +24 -0
- package/dist/modules/modals/PublishModal/components/ToastSuccess.d.ts +4 -0
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js +18 -0
- package/dist/modules/modals/PublishModal/constants/ageOptions.d.ts +1 -0
- package/dist/modules/modals/PublishModal/constants/ageOptions.js +4 -0
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.d.ts +4 -0
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js +34 -0
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.d.ts +4 -0
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +43 -0
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.d.ts +38 -0
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +106 -0
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.d.ts +4 -0
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js +118 -0
- package/dist/modules/modals/PublishModal/index.d.ts +1 -0
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +30 -0
- package/dist/modules/modals/ResourceModal/ResourceModal.js +156 -0
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.d.ts +13 -0
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +62 -0
- package/dist/modules/modals/ResourceModal/hooks/useSlug.d.ts +17 -0
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js +41 -0
- package/dist/modules/modals/ResourceModal/hooks/useThumb.d.ts +11 -0
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js +17 -0
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +7 -0
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +12 -0
- package/dist/modules/modals/ResourceModal/index.d.ts +3 -0
- package/dist/modules/modals/ShareModal/ShareBookmark.d.ts +8 -0
- package/dist/modules/modals/ShareModal/ShareBookmark.js +22 -0
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.d.ts +9 -0
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.js +42 -0
- package/dist/modules/modals/ShareModal/ShareModal.d.ts +41 -0
- package/dist/modules/modals/ShareModal/ShareModal.js +128 -0
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +8 -0
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js +42 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +24 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.js +178 -0
- package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +54 -0
- package/dist/modules/modals/ShareModal/hooks/useShare.js +192 -0
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +23 -0
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +67 -0
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +13 -0
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +15 -0
- package/dist/modules/modals/ShareModal/index.d.ts +3 -0
- package/dist/modules/modals/ShareModal/utils/hasRight.d.ts +2 -0
- package/dist/modules/modals/ShareModal/utils/hasRight.js +4 -0
- package/dist/modules/modals/ShareModal/utils/showShareRightLine.d.ts +2 -0
- package/dist/modules/modals/ShareModal/utils/showShareRightLine.js +4 -0
- package/dist/modules/modals/index.d.ts +4 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +12 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +49 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.d.ts +10 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +24 -0
- package/dist/modules/multimedia/AudioRecorder/index.d.ts +1 -0
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +16 -0
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +307 -0
- package/dist/modules/multimedia/Embed/Embed.d.ts +5 -0
- package/dist/modules/multimedia/Embed/Embed.js +32 -0
- package/dist/modules/multimedia/Embed/index.d.ts +2 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.d.ts +27 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +116 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.d.ts +7 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +69 -0
- package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +19 -0
- package/dist/modules/multimedia/ImageEditor/effects/blur.js +72 -0
- package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +28 -0
- package/dist/modules/multimedia/ImageEditor/effects/crop.js +155 -0
- package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +154 -0
- package/dist/modules/multimedia/ImageEditor/effects/misc.js +162 -0
- package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +25 -0
- package/dist/modules/multimedia/ImageEditor/effects/resize.js +157 -0
- package/dist/modules/multimedia/ImageEditor/effects/rotate.d.ts +8 -0
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js +33 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.d.ts +32 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +66 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +30 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +76 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.d.ts +23 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +52 -0
- package/dist/modules/multimedia/ImageEditor/index.d.ts +1 -0
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.d.ts +9 -0
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +13 -0
- package/dist/modules/multimedia/ImageEditor/utils/debounceAggregate.d.ts +10 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +46 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +39 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/index.d.ts +2 -0
- package/dist/modules/multimedia/Linker/ExternalLinker.d.ts +28 -0
- package/dist/modules/multimedia/Linker/ExternalLinker.js +45 -0
- package/dist/modules/multimedia/Linker/InternalLinker.d.ts +28 -0
- package/dist/modules/multimedia/Linker/InternalLinker.js +114 -0
- package/dist/modules/multimedia/Linker/index.d.ts +4 -0
- package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +13 -0
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js +38 -0
- package/dist/modules/multimedia/LinkerCard/index.d.ts +2 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +84 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +211 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +60 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +12 -0
- package/dist/modules/multimedia/MediaLibrary/index.d.ts +3 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +19 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.d.ts +6 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +17 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +14 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +11 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +35 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +34 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +22 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +14 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +31 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +10 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +21 -0
- package/dist/modules/multimedia/UploadFiles/UploadFiles.d.ts +9 -0
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js +56 -0
- package/dist/modules/multimedia/UploadFiles/index.d.ts +2 -0
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.d.ts +5 -0
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +77 -0
- package/dist/modules/multimedia/VideoEmbed/index.d.ts +1 -0
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +14 -0
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +259 -0
- package/dist/modules/multimedia/VideoRecorder/index.d.ts +1 -0
- package/dist/modules/multimedia/Workspace/Workspace.d.ts +33 -0
- package/dist/modules/multimedia/Workspace/Workspace.js +169 -0
- package/dist/modules/multimedia/Workspace/index.d.ts +2 -0
- package/dist/modules/multimedia/index.d.ts +8 -0
- package/dist/multimedia.js +20 -0
- package/dist/portal/Header/Badge.d.ts +5 -0
- package/dist/portal/Header/Badge.js +9 -0
- package/dist/portal/Header/Header.d.ts +9 -0
- package/dist/portal/Header/Header.js +170 -0
- package/dist/portal/Header/NavItem.d.ts +6 -0
- package/dist/portal/Header/NavItem.js +14 -0
- package/dist/portal/Header/NavLink.d.ts +24 -0
- package/dist/portal/Header/NavLink.js +19 -0
- package/dist/portal/Header/Navbar.d.ts +6 -0
- package/dist/portal/Header/Navbar.js +13 -0
- package/dist/portal/Header/NavbarNav.d.ts +6 -0
- package/dist/portal/Header/NavbarNav.js +13 -0
- package/dist/portal/Header/WidgetApps.d.ts +9 -0
- package/dist/portal/Header/WidgetApps.js +23 -0
- package/dist/portal/Header/index.d.ts +5 -0
- package/dist/portal/Help/Help.d.ts +9 -0
- package/dist/portal/Help/Help.js +25 -0
- package/dist/portal/Help/hooks/useHelp.d.ts +10 -0
- package/dist/portal/Help/hooks/useHelp.js +85 -0
- package/dist/portal/Help/index.d.ts +1 -0
- package/dist/portal/Layout/Layout.d.ts +12 -0
- package/dist/portal/Layout/Layout.js +42 -0
- package/dist/portal/Layout/index.d.ts +1 -0
- package/dist/portal/Main/Main.d.ts +16 -0
- package/dist/portal/Main/index.d.ts +2 -0
- package/dist/portal/SearchEngine/SearchEngine.d.ts +5 -0
- package/dist/portal/SearchEngine/SearchEngine.js +33 -0
- package/dist/portal/SearchEngine/index.d.ts +1 -0
- package/dist/portal/index.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/size.d.ts +1 -0
- package/dist/types/status.d.ts +1 -0
- package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +28 -0
- package/dist/utils/MockedDataProvider/MockedDataProvider.js +26 -0
- package/dist/utils/MockedDataProvider/index.d.ts +1 -0
- package/dist/utils/StringUtils.d.ts +5 -0
- package/dist/utils/StringUtils.js +14 -0
- package/dist/utils/addTimestampToUrl.d.ts +6 -0
- package/dist/utils/addTimestampToUrl.js +7 -0
- package/dist/utils/blob.d.ts +9 -0
- package/dist/utils/blob.js +15 -0
- package/dist/utils/checkUserRight.d.ts +11 -0
- package/dist/utils/checkUserRight.js +44 -0
- package/dist/utils/fileSize.d.ts +1 -0
- package/dist/utils/fileSize.js +8 -0
- package/dist/utils/findTreeNode.d.ts +9 -0
- package/dist/utils/findTreeNode.js +11 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/isActionAvailable.d.ts +2 -0
- package/dist/utils/isActionAvailable.js +7 -0
- package/dist/utils/libraryMaps.d.ts +4 -0
- package/dist/utils/libraryMaps.js +12 -0
- package/dist/utils/noop.d.ts +4 -0
- package/dist/utils/noop.js +5 -0
- package/dist/utils/ref.d.ts +5 -0
- package/dist/utils/ref.js +14 -0
- package/dist/utils/thumbnail.d.ts +8 -0
- package/dist/utils/thumbnail.js +6 -0
- package/dist/utils/time.d.ts +2 -0
- package/dist/utils/time.js +11 -0
- package/dist/utils/treeview.d.ts +33 -0
- package/dist/utils/treeview.js +133 -0
- package/dist/utils/video.d.ts +1 -0
- package/dist/utils/video.js +4 -0
- package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +8 -0
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js +8 -0
- package/dist/widgets/BookmarkedApps/index.d.ts +2 -0
- package/dist/widgets/Widget/Widget.d.ts +17 -0
- package/dist/widgets/Widget/Widget.js +22 -0
- package/dist/widgets/Widget/index.d.ts +2 -0
- package/dist/widgets/index.d.ts +2 -0
- package/package.json +134 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
export type CornerType = 'TOP_LEFT' | 'TOP_RIGHT' | 'BOTTOM_LEFT' | 'BOTTOM_RIGHT';
|
|
3
|
+
/**
|
|
4
|
+
* This function draw all graphics controls used to crop an image:
|
|
5
|
+
* - 4 corners to select the cropped area
|
|
6
|
+
* - A background with an transparent backdrop effect
|
|
7
|
+
* - A mask applied to the original image
|
|
8
|
+
*
|
|
9
|
+
* @param application The PIXI.Application context
|
|
10
|
+
* @param {spriteName:string} {spriteName} The sprite name identifying the original image
|
|
11
|
+
*/
|
|
12
|
+
export declare function start(application: PIXI.Application, { spriteName }: {
|
|
13
|
+
spriteName: string;
|
|
14
|
+
}): void;
|
|
15
|
+
/**
|
|
16
|
+
* This function remove all graphics controls if exists. And it also remove any mouse event on this stage
|
|
17
|
+
*
|
|
18
|
+
* @param application The PIXI.Application context
|
|
19
|
+
*/
|
|
20
|
+
export declare function stop(application: PIXI.Application): void;
|
|
21
|
+
/**
|
|
22
|
+
* This function apply a crop to the imageSrc and return the result as a PIXI.Sprite object
|
|
23
|
+
*
|
|
24
|
+
* @param application
|
|
25
|
+
* @param imageSrc a string URI of the image to crop
|
|
26
|
+
* @returns a PIXI.Sprite with a imageSrc cropped or undefined if the image has not been cropped
|
|
27
|
+
*/
|
|
28
|
+
export declare function save(application: PIXI.Application): PIXI.Sprite | undefined;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
import { getApplicationScale } from "./misc.js";
|
|
3
|
+
const CORNERS = ["TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT"], PADDING = 0, POINT_RADIUS = 20, CROP_BACKGROUND_NAME = "CROP_BACKGROUND_NAME", CROP_MASK_NAME = "CROP_MASK_NAME";
|
|
4
|
+
function getCornerName(corner) {
|
|
5
|
+
return "CROP_CORNER_" + corner;
|
|
6
|
+
}
|
|
7
|
+
function drawBackground(application, {
|
|
8
|
+
spriteName
|
|
9
|
+
}) {
|
|
10
|
+
removeBackground(application);
|
|
11
|
+
const sprite = application.stage.getChildByName(spriteName);
|
|
12
|
+
if (sprite == null) return;
|
|
13
|
+
const spriteBounds = sprite.getBounds(), stageTexture = application.renderer.generateTexture(application.stage).clone(), clonedStage = new PIXI.Sprite(stageTexture);
|
|
14
|
+
clonedStage.height = spriteBounds.height, clonedStage.width = spriteBounds.width, clonedStage.position = new PIXI.Point(0, 0);
|
|
15
|
+
const background = new PIXI.Graphics();
|
|
16
|
+
background.beginFill(16777215, 0.5), background.drawRect(0, 0, spriteBounds.width, spriteBounds.height), background.endFill(), background.name = CROP_BACKGROUND_NAME, background.position = new PIXI.Point(spriteBounds.x, spriteBounds.y);
|
|
17
|
+
const rectMask = new PIXI.Graphics();
|
|
18
|
+
rectMask.beginFill(0, 1), rectMask.drawRect(0, 0, spriteBounds.width - 2 * PADDING, spriteBounds.height - 2 * PADDING), rectMask.endFill(), rectMask.position = new PIXI.Point(PADDING, PADDING), rectMask.name = CROP_MASK_NAME, clonedStage.mask = rectMask, application.stage.addChild(background), background.addChild(rectMask), background.addChild(clonedStage);
|
|
19
|
+
}
|
|
20
|
+
function removeBackground(application) {
|
|
21
|
+
const child = application.stage.getChildByName(CROP_BACKGROUND_NAME, !0);
|
|
22
|
+
child == null || child.removeFromParent();
|
|
23
|
+
}
|
|
24
|
+
function computeCornerPosition(cornerType, bounds) {
|
|
25
|
+
switch (cornerType) {
|
|
26
|
+
case "TOP_LEFT":
|
|
27
|
+
return {
|
|
28
|
+
x: bounds.x,
|
|
29
|
+
y: bounds.y,
|
|
30
|
+
start: 0,
|
|
31
|
+
end: Math.PI / 2
|
|
32
|
+
};
|
|
33
|
+
case "TOP_RIGHT":
|
|
34
|
+
return {
|
|
35
|
+
x: bounds.x + bounds.width,
|
|
36
|
+
y: bounds.y,
|
|
37
|
+
start: Math.PI / 2,
|
|
38
|
+
end: Math.PI
|
|
39
|
+
};
|
|
40
|
+
case "BOTTOM_LEFT":
|
|
41
|
+
return {
|
|
42
|
+
x: bounds.x,
|
|
43
|
+
y: bounds.y + bounds.height,
|
|
44
|
+
start: 3 * Math.PI / 2,
|
|
45
|
+
end: 2 * Math.PI
|
|
46
|
+
};
|
|
47
|
+
case "BOTTOM_RIGHT":
|
|
48
|
+
return {
|
|
49
|
+
x: bounds.x + bounds.width,
|
|
50
|
+
y: bounds.y + bounds.height,
|
|
51
|
+
start: Math.PI,
|
|
52
|
+
end: 3 * Math.PI / 2
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function refreshCorners(application) {
|
|
57
|
+
const mask = application.stage.getChildByName(CROP_MASK_NAME, !0);
|
|
58
|
+
mask != null && CORNERS.forEach((cornerType) => {
|
|
59
|
+
const corner = application.stage.getChildByName(getCornerName(cornerType), !0);
|
|
60
|
+
if (corner == null) return;
|
|
61
|
+
const position = computeCornerPosition(cornerType, {
|
|
62
|
+
height: mask.height,
|
|
63
|
+
width: mask.width,
|
|
64
|
+
x: mask.x,
|
|
65
|
+
y: mask.y
|
|
66
|
+
});
|
|
67
|
+
corner.position = new PIXI.Point(position.x, position.y);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function drawCorner(application, cornerType, {
|
|
71
|
+
spriteName
|
|
72
|
+
}) {
|
|
73
|
+
const previous = application.stage.getChildByName(getCornerName(cornerType), !0), scale = getApplicationScale(application);
|
|
74
|
+
previous == null || previous.removeFromParent();
|
|
75
|
+
const background = application.stage.getChildByName(CROP_BACKGROUND_NAME, !0), mask = application.stage.getChildByName(CROP_MASK_NAME, !0), sprite = application.stage.getChildByName(spriteName);
|
|
76
|
+
if (sprite == null || background === null || background === void 0 || mask === void 0 || mask === null)
|
|
77
|
+
return;
|
|
78
|
+
const position = computeCornerPosition(cornerType, {
|
|
79
|
+
height: mask.height,
|
|
80
|
+
width: mask.width,
|
|
81
|
+
x: mask.x,
|
|
82
|
+
y: mask.y
|
|
83
|
+
}), corner = new PIXI.Graphics();
|
|
84
|
+
corner.beginFill(4960213, 1), corner.arc(0, 0, POINT_RADIUS / scale, position.start, position.end), corner.lineTo(0, 0), corner.endFill(), corner.position = new PIXI.Point(position.x, position.y), corner.name = getCornerName(cornerType), corner.interactive = !0;
|
|
85
|
+
let enable = !1;
|
|
86
|
+
application.stage.on("pointermove", (event) => {
|
|
87
|
+
if (enable === !1) return;
|
|
88
|
+
const localPosition = background.toLocal(event.global);
|
|
89
|
+
corner.position.x = localPosition.x, corner.position.y = localPosition.y, moveMask(application, cornerType, localPosition);
|
|
90
|
+
});
|
|
91
|
+
const handlePointerDown = () => {
|
|
92
|
+
enable = !0;
|
|
93
|
+
};
|
|
94
|
+
corner.on("pointerdown", handlePointerDown);
|
|
95
|
+
const handlePointerUp = () => {
|
|
96
|
+
enable = !1;
|
|
97
|
+
};
|
|
98
|
+
globalThis.addEventListener("pointerup", handlePointerUp), corner.once("destroyed", () => {
|
|
99
|
+
corner.off("pointerdown"), globalThis.removeEventListener("pointerup", handlePointerUp);
|
|
100
|
+
}), background.addChild(corner);
|
|
101
|
+
}
|
|
102
|
+
function moveMask(application, cornerType, position) {
|
|
103
|
+
const mask = application.stage.getChildByName(CROP_MASK_NAME, !0);
|
|
104
|
+
if (mask == null) return;
|
|
105
|
+
const right = mask.position.x + mask.width, bottom = mask.position.y + mask.height;
|
|
106
|
+
switch (cornerType) {
|
|
107
|
+
case "TOP_LEFT": {
|
|
108
|
+
mask.position.x = position.x, mask.position.y = position.y, mask.width = right - position.x, mask.height = bottom - position.y;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case "TOP_RIGHT": {
|
|
112
|
+
mask.position.y = position.y, mask.width = position.x - mask.position.x, mask.height = bottom - position.y;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
case "BOTTOM_LEFT": {
|
|
116
|
+
mask.position.x = position.x, mask.width = right - position.x, mask.height = position.y - mask.position.y;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case "BOTTOM_RIGHT": {
|
|
120
|
+
mask.width = position.x - mask.position.x, mask.height = position.y - mask.position.y;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
refreshCorners(application);
|
|
125
|
+
}
|
|
126
|
+
function start(application, {
|
|
127
|
+
spriteName
|
|
128
|
+
}) {
|
|
129
|
+
stop(application), application.stage.interactive = !0, application.stage.interactiveChildren = !0, drawBackground(application, {
|
|
130
|
+
spriteName
|
|
131
|
+
}), drawCorner(application, "BOTTOM_LEFT", {
|
|
132
|
+
spriteName
|
|
133
|
+
}), drawCorner(application, "BOTTOM_RIGHT", {
|
|
134
|
+
spriteName
|
|
135
|
+
}), drawCorner(application, "TOP_LEFT", {
|
|
136
|
+
spriteName
|
|
137
|
+
}), drawCorner(application, "TOP_RIGHT", {
|
|
138
|
+
spriteName
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function stop(application) {
|
|
142
|
+
removeBackground(application), application.stage.off("pointermove"), application.render();
|
|
143
|
+
}
|
|
144
|
+
function save(application) {
|
|
145
|
+
const mask = application.stage.getChildByName(CROP_MASK_NAME, !0);
|
|
146
|
+
if (mask == null) return;
|
|
147
|
+
stop(application);
|
|
148
|
+
const stageTexture = application.renderer.generateTexture(application.stage).clone(), clonedStage = new PIXI.Sprite(stageTexture), maskBounds = mask.getBounds(), bounds = new PIXI.Rectangle(Math.floor(maskBounds.x), Math.floor(maskBounds.y), Math.floor(maskBounds.width), Math.floor(maskBounds.height)), cropped = new PIXI.Texture(clonedStage.texture.baseTexture, bounds);
|
|
149
|
+
return new PIXI.Sprite(cropped);
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
save,
|
|
153
|
+
start,
|
|
154
|
+
stop
|
|
155
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
export declare const DEFAULT_SPRITE_NAME = "image";
|
|
3
|
+
/**
|
|
4
|
+
* A structure that define all setting of an image
|
|
5
|
+
* - positon
|
|
6
|
+
* - scale
|
|
7
|
+
* - size
|
|
8
|
+
* - size of the stage
|
|
9
|
+
*/
|
|
10
|
+
export interface ImageSettings {
|
|
11
|
+
stage: {
|
|
12
|
+
size: {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
scale: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
sprite: {
|
|
22
|
+
rotation: number;
|
|
23
|
+
size: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
scale: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
position: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
anchor: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* This function update the image content using Blob datasource
|
|
43
|
+
*
|
|
44
|
+
* @param application the PIXI.Application context
|
|
45
|
+
* @param param.spriteName the name of the sprite in the context
|
|
46
|
+
* @param param.imgDatasource the img data could be one of: string url, HTMLImageElement, PIXI.Sprite
|
|
47
|
+
* @param param.stageSize?: { width: number; height: number };
|
|
48
|
+
* @param param.spriteSize?: { width: number; height: number };
|
|
49
|
+
*/
|
|
50
|
+
export declare function updateImageFromBlob(application: PIXI.Application, { spriteName, imgDatasource, settings, }: {
|
|
51
|
+
spriteName: string;
|
|
52
|
+
imgDatasource: Blob;
|
|
53
|
+
settings?: ImageSettings;
|
|
54
|
+
}): Promise<PIXI.Sprite | null>;
|
|
55
|
+
/**
|
|
56
|
+
* This function update the image content for the sprite in the PIXI.Application context
|
|
57
|
+
*
|
|
58
|
+
* @param application the PIXI.Application context
|
|
59
|
+
* @param param.spriteName the name of the sprite in the context
|
|
60
|
+
* @param param.imgDatasource the img data could be one of: string url, HTMLImageElement, PIXI.Sprite
|
|
61
|
+
* @param param.spriteSize
|
|
62
|
+
* @param param.stageSize
|
|
63
|
+
*/
|
|
64
|
+
export declare function updateImage(application: PIXI.Application, { spriteName, imgDatasource, settings, }: {
|
|
65
|
+
spriteName: string;
|
|
66
|
+
imgDatasource: string | HTMLImageElement | PIXI.Sprite;
|
|
67
|
+
settings?: ImageSettings;
|
|
68
|
+
}): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* This function resize the sprite according to the container width
|
|
71
|
+
*
|
|
72
|
+
* @param application The PIXI.Application context
|
|
73
|
+
* @param sprite The sprite object representing the image to resize
|
|
74
|
+
*/
|
|
75
|
+
export declare function autoResize(application: PIXI.Application, sprite: PIXI.Sprite): void;
|
|
76
|
+
export declare function constraintSize(size: {
|
|
77
|
+
width: number;
|
|
78
|
+
height: number;
|
|
79
|
+
}, constraints: {
|
|
80
|
+
width: {
|
|
81
|
+
max: number;
|
|
82
|
+
min: number;
|
|
83
|
+
};
|
|
84
|
+
height: {
|
|
85
|
+
max: number;
|
|
86
|
+
min: number;
|
|
87
|
+
};
|
|
88
|
+
}): {
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* This function transform the stage into a blob
|
|
94
|
+
*
|
|
95
|
+
* @param application the PIXI.Application context
|
|
96
|
+
* @returns A promise of the generated blob
|
|
97
|
+
*/
|
|
98
|
+
export declare function saveAsBlob(application: PIXI.Application): Promise<Blob>;
|
|
99
|
+
/**
|
|
100
|
+
* This function transform the stage into a data URL encoded image
|
|
101
|
+
*
|
|
102
|
+
* @param application the PIXI.Application context
|
|
103
|
+
* @returns the generated image as Data URL or undefined if failed
|
|
104
|
+
*/
|
|
105
|
+
export declare function saveAsDataURL(application: PIXI.Application): string | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Calculates the scale percentage for a PIXI.Sprite or the application view based on the parent container's dimensions.
|
|
108
|
+
* @param application - The PIXI.Application instance.
|
|
109
|
+
* @param sprite - The PIXI.Sprite instance (optional).
|
|
110
|
+
* @returns The scale percentage.
|
|
111
|
+
*/
|
|
112
|
+
export declare function getApplicationScale(application: PIXI.Application): number;
|
|
113
|
+
export declare function toBlob(application: PIXI.Application): Promise<Blob>;
|
|
114
|
+
export declare function createImageSettings({ application, sprite, }: {
|
|
115
|
+
sprite: PIXI.Sprite;
|
|
116
|
+
application: PIXI.Application;
|
|
117
|
+
}): {
|
|
118
|
+
sprite: {
|
|
119
|
+
rotation: number;
|
|
120
|
+
size: {
|
|
121
|
+
width: number;
|
|
122
|
+
height: number;
|
|
123
|
+
};
|
|
124
|
+
position: {
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
};
|
|
128
|
+
scale: {
|
|
129
|
+
x: number;
|
|
130
|
+
y: number;
|
|
131
|
+
};
|
|
132
|
+
anchor: {
|
|
133
|
+
x: number;
|
|
134
|
+
y: number;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
stage: {
|
|
138
|
+
size: {
|
|
139
|
+
width: number;
|
|
140
|
+
height: number;
|
|
141
|
+
};
|
|
142
|
+
scale: {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
export declare function trimStage(application: PIXI.Application, sprite: PIXI.Sprite): void;
|
|
149
|
+
export declare function resizeStage({ application, sprite, newHeight, newWidth, }: {
|
|
150
|
+
newHeight: number;
|
|
151
|
+
newWidth: number;
|
|
152
|
+
application: PIXI.Application;
|
|
153
|
+
sprite: PIXI.Sprite;
|
|
154
|
+
}): void;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
const MIN_HEIGHT = 100, MIN_WIDTH = 100, MODAL_VERTICAL_PADDING = 450, MODAL_HORIZONTAL_PADDING = 64, DEFAULT_QUALITY = 0.5, DEFAULT_SPRITE_NAME = "image";
|
|
3
|
+
function updateImageFromBlob(application, {
|
|
4
|
+
spriteName,
|
|
5
|
+
imgDatasource,
|
|
6
|
+
settings
|
|
7
|
+
}) {
|
|
8
|
+
const imageUrl = URL.createObjectURL(imgDatasource), image = new Image();
|
|
9
|
+
return image.src = imageUrl, new Promise((resolve) => {
|
|
10
|
+
image.onload = async () => {
|
|
11
|
+
await updateImage(application, {
|
|
12
|
+
spriteName,
|
|
13
|
+
imgDatasource: image,
|
|
14
|
+
settings
|
|
15
|
+
});
|
|
16
|
+
const newSprite = application == null ? void 0 : application.stage.getChildByName(spriteName, !0);
|
|
17
|
+
resolve(newSprite);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
async function updateImage(application, {
|
|
22
|
+
spriteName,
|
|
23
|
+
imgDatasource,
|
|
24
|
+
settings
|
|
25
|
+
}) {
|
|
26
|
+
if (application === void 0 || application.stage === null)
|
|
27
|
+
return;
|
|
28
|
+
const previous = application.stage.getChildByName(spriteName, !0);
|
|
29
|
+
previous == null || previous.removeFromParent();
|
|
30
|
+
const texture = imgDatasource instanceof HTMLImageElement ? PIXI.Texture.from(imgDatasource) : imgDatasource instanceof PIXI.Sprite ? imgDatasource : await PIXI.Texture.fromURL(imgDatasource), sprite = texture instanceof PIXI.Sprite ? texture : PIXI.Sprite.from(texture, {});
|
|
31
|
+
if (sprite.interactive = !0, sprite.name = spriteName, settings) {
|
|
32
|
+
const {
|
|
33
|
+
sprite: {
|
|
34
|
+
anchor,
|
|
35
|
+
position,
|
|
36
|
+
scale,
|
|
37
|
+
size: spriteSize,
|
|
38
|
+
rotation
|
|
39
|
+
},
|
|
40
|
+
stage: {
|
|
41
|
+
size: stageSize
|
|
42
|
+
}
|
|
43
|
+
} = settings, isRotated = rotation % Math.PI !== 0;
|
|
44
|
+
sprite.anchor.x = anchor.x, sprite.anchor.y = anchor.y, sprite.position.x = position.x, sprite.position.y = position.y, sprite.scale.x = scale.x, sprite.scale.y = scale.y, sprite.width = isRotated ? spriteSize.height : spriteSize.width, sprite.height = isRotated ? spriteSize.width : spriteSize.height, application.stage.height = stageSize.height, application.stage.width = stageSize.width, application.renderer.resize(stageSize.width, stageSize.height), application.stage.addChild(sprite);
|
|
45
|
+
} else
|
|
46
|
+
application.stage.addChild(sprite), application.renderer.resize(sprite.width, sprite.height);
|
|
47
|
+
autoResize(application, sprite);
|
|
48
|
+
}
|
|
49
|
+
function autoResize(application, sprite) {
|
|
50
|
+
var _a;
|
|
51
|
+
const parent = application.view.parentNode, maxMobileWidth = window.innerWidth - MODAL_HORIZONTAL_PADDING, parentWidth = Math.max((parent == null ? void 0 : parent.offsetWidth) ?? 0, MIN_WIDTH), newSize = constraintSize({
|
|
52
|
+
width: sprite.width,
|
|
53
|
+
height: sprite.height
|
|
54
|
+
}, {
|
|
55
|
+
width: {
|
|
56
|
+
max: Math.min(parentWidth, maxMobileWidth),
|
|
57
|
+
min: MIN_WIDTH
|
|
58
|
+
},
|
|
59
|
+
height: {
|
|
60
|
+
min: MIN_HEIGHT,
|
|
61
|
+
max: window.innerHeight - MODAL_VERTICAL_PADDING
|
|
62
|
+
}
|
|
63
|
+
}), {
|
|
64
|
+
height: newHeight,
|
|
65
|
+
width: newWidth
|
|
66
|
+
} = newSize;
|
|
67
|
+
(_a = application.view) != null && _a.style && (application.view.style.width = `${newWidth}px`, application.view.style.height = `${newHeight}px`);
|
|
68
|
+
}
|
|
69
|
+
function constraintSize(size, constraints) {
|
|
70
|
+
const {
|
|
71
|
+
height,
|
|
72
|
+
width
|
|
73
|
+
} = size, ratio = width / height, {
|
|
74
|
+
height: constraintHeight,
|
|
75
|
+
width: constraintWidth
|
|
76
|
+
} = constraints;
|
|
77
|
+
let newWidth = constraintWidth.max, newHeight = constraintWidth.max / ratio;
|
|
78
|
+
return width > constraintWidth.max && (newWidth = constraintWidth.max, newHeight = newWidth / ratio), newHeight > constraintHeight.max && (newHeight = constraintHeight.max, newWidth = newHeight * ratio), newWidth < constraintWidth.min && (newWidth = constraintWidth.min, newHeight = newWidth / ratio), newHeight < constraintHeight.min && (newHeight = constraintHeight.min, newWidth = newHeight * ratio), {
|
|
79
|
+
width: newWidth,
|
|
80
|
+
height: newHeight
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function saveAsBlob(application) {
|
|
84
|
+
return new Promise((resolve, reject) => {
|
|
85
|
+
var _a;
|
|
86
|
+
(_a = application == null ? void 0 : application.view) != null && _a.toBlob ? application.view.toBlob((blob) => {
|
|
87
|
+
blob ? resolve(blob) : reject("EXTRACT_FAILED");
|
|
88
|
+
}, "image/jpeg", DEFAULT_QUALITY) : reject("EXTRACT_FAILED");
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function saveAsDataURL(application) {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
return (_b = (_a = application.view).toDataURL) == null ? void 0 : _b.call(_a);
|
|
94
|
+
}
|
|
95
|
+
function getApplicationScale(application) {
|
|
96
|
+
return application.view.getBoundingClientRect ? application.view.getBoundingClientRect().width / application.view.width : 1;
|
|
97
|
+
}
|
|
98
|
+
function toBlob(application) {
|
|
99
|
+
return new Promise((resolve, reject) => {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
(_b = (_a = application.view).toBlob) == null || _b.call(_a, (blob) => {
|
|
102
|
+
blob ? resolve(blob) : reject("EXTRACT_FAIL");
|
|
103
|
+
}, "image/png", 1);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function createImageSettings({
|
|
107
|
+
application,
|
|
108
|
+
sprite
|
|
109
|
+
}) {
|
|
110
|
+
return {
|
|
111
|
+
sprite: {
|
|
112
|
+
rotation: sprite.rotation,
|
|
113
|
+
size: {
|
|
114
|
+
width: sprite.width,
|
|
115
|
+
height: sprite.height
|
|
116
|
+
},
|
|
117
|
+
position: {
|
|
118
|
+
x: sprite.position.x,
|
|
119
|
+
y: sprite.position.y
|
|
120
|
+
},
|
|
121
|
+
scale: {
|
|
122
|
+
x: sprite.scale.x,
|
|
123
|
+
y: sprite.scale.y
|
|
124
|
+
},
|
|
125
|
+
anchor: {
|
|
126
|
+
x: sprite.anchor.x,
|
|
127
|
+
y: sprite.anchor.y
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
stage: {
|
|
131
|
+
size: {
|
|
132
|
+
width: application.stage.width,
|
|
133
|
+
height: application.stage.height
|
|
134
|
+
},
|
|
135
|
+
scale: {
|
|
136
|
+
x: application.stage.scale.x,
|
|
137
|
+
y: application.stage.scale.y
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function resizeStage({
|
|
143
|
+
application,
|
|
144
|
+
sprite,
|
|
145
|
+
newHeight,
|
|
146
|
+
newWidth
|
|
147
|
+
}) {
|
|
148
|
+
sprite.anchor.x = 0.5, sprite.anchor.y = 0.5, sprite.position = new PIXI.Point(newWidth / 2, newHeight / 2), application.stage.height = newHeight, application.stage.width = newWidth, application.renderer.resize(newWidth, newHeight);
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
DEFAULT_SPRITE_NAME,
|
|
152
|
+
autoResize,
|
|
153
|
+
constraintSize,
|
|
154
|
+
createImageSettings,
|
|
155
|
+
getApplicationScale,
|
|
156
|
+
resizeStage,
|
|
157
|
+
saveAsBlob,
|
|
158
|
+
saveAsDataURL,
|
|
159
|
+
toBlob,
|
|
160
|
+
updateImage,
|
|
161
|
+
updateImageFromBlob
|
|
162
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
/**
|
|
3
|
+
* Draw all graphical object to control the resize
|
|
4
|
+
*
|
|
5
|
+
* @param application the PIXI.Application context
|
|
6
|
+
* @param spriteName the name of the sprite representing the image
|
|
7
|
+
*/
|
|
8
|
+
export declare function start(application: PIXI.Application, spriteName: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* If {saveChanges} is true remove all graphical controls then resize the sprite
|
|
11
|
+
* If {saveChanges} is false remove all graphical controls and keep original size
|
|
12
|
+
*
|
|
13
|
+
* @param application the PIXI.Application context
|
|
14
|
+
* @param param.saveChanges true if we should save the resize
|
|
15
|
+
* @param param.spriteName the name of the sprite representing the original image
|
|
16
|
+
*/
|
|
17
|
+
export declare function stop(application: PIXI.Application): void;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param application the PIXI.Application context
|
|
21
|
+
* @param spriteName the name of the sprite representing the image
|
|
22
|
+
* @param size the target size of the image {width, height}
|
|
23
|
+
* @returns a PIXI.Sprite with a image resized or undefined if not found
|
|
24
|
+
*/
|
|
25
|
+
export declare function save(application: PIXI.Application): PIXI.Sprite | undefined;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
const POINT_RADIUS = 20, CONTROL_NAME = "CONTROL_NAME";
|
|
3
|
+
function getCornerName(index) {
|
|
4
|
+
return "RESIZE_CORNER_" + index;
|
|
5
|
+
}
|
|
6
|
+
function computeCornerPosition(position, sprite) {
|
|
7
|
+
const left = sprite.x, top = sprite.y;
|
|
8
|
+
switch (position) {
|
|
9
|
+
case "TOP_LEFT":
|
|
10
|
+
return {
|
|
11
|
+
x: left,
|
|
12
|
+
y: top,
|
|
13
|
+
start: 0,
|
|
14
|
+
end: Math.PI / 2
|
|
15
|
+
};
|
|
16
|
+
case "TOP_RIGHT":
|
|
17
|
+
return {
|
|
18
|
+
x: left + sprite.width,
|
|
19
|
+
y: top,
|
|
20
|
+
start: Math.PI / 2,
|
|
21
|
+
end: Math.PI
|
|
22
|
+
};
|
|
23
|
+
case "BOTTOM_LEFT":
|
|
24
|
+
return {
|
|
25
|
+
x: left,
|
|
26
|
+
y: top + sprite.height,
|
|
27
|
+
start: 3 * Math.PI / 2,
|
|
28
|
+
end: 2 * Math.PI
|
|
29
|
+
};
|
|
30
|
+
case "BOTTOM_RIGHT":
|
|
31
|
+
return {
|
|
32
|
+
x: left + sprite.width,
|
|
33
|
+
y: top + sprite.height,
|
|
34
|
+
start: Math.PI,
|
|
35
|
+
end: 3 * Math.PI / 2
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function resizeContainer(application, {
|
|
40
|
+
container,
|
|
41
|
+
cornerType,
|
|
42
|
+
position,
|
|
43
|
+
spriteName
|
|
44
|
+
}) {
|
|
45
|
+
const sprite = application.stage.getChildByName(spriteName, !0);
|
|
46
|
+
if (sprite == null) return;
|
|
47
|
+
const isRotated = sprite.rotation % Math.PI !== 0, spriteWidth = isRotated ? sprite.height : sprite.width, spriteHeight = isRotated ? sprite.width : sprite.height;
|
|
48
|
+
switch (cornerType) {
|
|
49
|
+
case "TOP_LEFT": {
|
|
50
|
+
container.position = new PIXI.Point(position.x, position.y), container.width = spriteWidth - 2 * position.x, container.height = spriteHeight - 2 * position.y;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case "TOP_RIGHT": {
|
|
54
|
+
const newX = spriteWidth - position.x;
|
|
55
|
+
container.position = new PIXI.Point(newX, position.y), container.width = spriteWidth - 2 * newX, container.height = spriteHeight - 2 * position.y;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case "BOTTOM_LEFT": {
|
|
59
|
+
const newY = spriteHeight - position.y;
|
|
60
|
+
container.position = new PIXI.Point(position.x, newY), container.width = spriteWidth - 2 * position.x, container.height = spriteHeight - 2 * newY;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
case "BOTTOM_RIGHT": {
|
|
64
|
+
const newY = spriteHeight - position.y, newX = spriteWidth - position.x;
|
|
65
|
+
container.position = new PIXI.Point(newX, newY), container.width = spriteWidth - 2 * newX, container.height = spriteHeight - 2 * newY;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function removeCorner(application, cornerType) {
|
|
71
|
+
const previous = application.stage.getChildByName(getCornerName(cornerType), !0);
|
|
72
|
+
previous == null || previous.removeFromParent();
|
|
73
|
+
}
|
|
74
|
+
function drawCorner(application, cornerType, {
|
|
75
|
+
spriteName
|
|
76
|
+
}) {
|
|
77
|
+
removeCorner(application, cornerType);
|
|
78
|
+
const sprite = application.stage.getChildByName(spriteName, !0), container = application.stage.getChildByName(CONTROL_NAME, !0);
|
|
79
|
+
if (sprite == null || container === null || container === void 0) return;
|
|
80
|
+
const position = computeCornerPosition(cornerType, container), corner = new PIXI.Graphics();
|
|
81
|
+
corner.beginFill(4960213, 1), corner.arc(0, 0, POINT_RADIUS, position.start, position.end), corner.lineTo(0, 0), corner.endFill(), corner.position = new PIXI.Point(position.x, position.y), corner.name = getCornerName(cornerType), corner.interactive = !0;
|
|
82
|
+
let enable = !1;
|
|
83
|
+
application.stage.on("pointermove", (event) => {
|
|
84
|
+
if (enable === !1) return;
|
|
85
|
+
const localPosition = application.stage.toLocal(event.global);
|
|
86
|
+
resizeContainer(application, {
|
|
87
|
+
cornerType,
|
|
88
|
+
position: localPosition,
|
|
89
|
+
container,
|
|
90
|
+
spriteName
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
const handlePointerUp = () => {
|
|
94
|
+
enable = !1;
|
|
95
|
+
};
|
|
96
|
+
globalThis.addEventListener("pointerup", handlePointerUp), corner.once("destroyed", () => {
|
|
97
|
+
corner.off("pointerdown"), globalThis.removeEventListener("pointerup", handlePointerUp);
|
|
98
|
+
});
|
|
99
|
+
const handlePointerDown = () => {
|
|
100
|
+
enable = !0;
|
|
101
|
+
};
|
|
102
|
+
corner.on("pointerdown", handlePointerDown), container.addChild(corner);
|
|
103
|
+
}
|
|
104
|
+
function drawContainer(application, spriteName) {
|
|
105
|
+
removeContainer(application);
|
|
106
|
+
const sprite = application.stage.getChildByName(spriteName, !0);
|
|
107
|
+
if (sprite == null) return;
|
|
108
|
+
const stageTexture = application.renderer.generateTexture(application.stage), clonedStage = new PIXI.Sprite(stageTexture);
|
|
109
|
+
application.stage.children.forEach((child) => {
|
|
110
|
+
child.alpha = 0;
|
|
111
|
+
});
|
|
112
|
+
const container = new PIXI.Graphics();
|
|
113
|
+
container.drawRect(0, 0, sprite.width, sprite.height), container.name = CONTROL_NAME, container.interactive = !0, container.interactiveChildren = !0, application.stage.interactive = !0, application.stage.interactiveChildren = !0, application.stage.addChild(container), container.addChild(clonedStage);
|
|
114
|
+
}
|
|
115
|
+
function removeContainer(application) {
|
|
116
|
+
const container = application.stage.getChildByName(CONTROL_NAME, !0);
|
|
117
|
+
container == null || container.removeFromParent(), application.stage.children.forEach((child) => {
|
|
118
|
+
child.alpha = 1;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function drawControl(application, spriteName) {
|
|
122
|
+
drawContainer(application, spriteName), drawCorner(application, "BOTTOM_LEFT", {
|
|
123
|
+
spriteName
|
|
124
|
+
}), drawCorner(application, "BOTTOM_RIGHT", {
|
|
125
|
+
spriteName
|
|
126
|
+
}), drawCorner(application, "TOP_LEFT", {
|
|
127
|
+
spriteName
|
|
128
|
+
}), drawCorner(application, "TOP_RIGHT", {
|
|
129
|
+
spriteName
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function removeControl(application) {
|
|
133
|
+
removeContainer(application), removeCorner(application, "BOTTOM_LEFT"), removeCorner(application, "BOTTOM_RIGHT"), removeCorner(application, "TOP_LEFT"), removeCorner(application, "TOP_RIGHT"), application.stage.off("pointermove");
|
|
134
|
+
}
|
|
135
|
+
function start(application, spriteName) {
|
|
136
|
+
drawControl(application, spriteName);
|
|
137
|
+
}
|
|
138
|
+
function stop(application) {
|
|
139
|
+
removeControl(application), application.stage.off("pointermove"), application.render();
|
|
140
|
+
}
|
|
141
|
+
function save(application) {
|
|
142
|
+
var _a;
|
|
143
|
+
const container = (_a = application == null ? void 0 : application.stage) == null ? void 0 : _a.getChildByName(CONTROL_NAME, !0), size = container ? {
|
|
144
|
+
height: container.height,
|
|
145
|
+
width: container.width
|
|
146
|
+
} : void 0;
|
|
147
|
+
if (removeControl(application), size) {
|
|
148
|
+
const stageTexture = application.renderer.generateTexture(application.stage).clone(), clonedStage = new PIXI.Sprite(stageTexture);
|
|
149
|
+
return clonedStage.width = size.width, clonedStage.height = size.height, clonedStage;
|
|
150
|
+
} else
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
save,
|
|
155
|
+
start,
|
|
156
|
+
stop
|
|
157
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
/**
|
|
3
|
+
* This function rotate the sprite by adding PI/2
|
|
4
|
+
*
|
|
5
|
+
* @param application The PIXI.Application context
|
|
6
|
+
* @param spriteName The name of the sprite representing the image
|
|
7
|
+
*/
|
|
8
|
+
export declare function rotate(application: PIXI.Application, spriteName: string): Promise<void>;
|