diff --git a/.changeset/gorgeous-rings-collect.md b/.changeset/gorgeous-rings-collect.md new file mode 100644 index 000000000..0a1324057 --- /dev/null +++ b/.changeset/gorgeous-rings-collect.md @@ -0,0 +1,6 @@ +--- +'mexit-webapp': patch +'mexit': patch +--- + +Upgrade mex-search package version to 0.0.9 diff --git a/apps/webapp/src/Components/CreateTodoModal/TaskEditor/styled.tsx b/apps/webapp/src/Components/CreateTodoModal/TaskEditor/styled.tsx index 9fe0c4039..2dfb869e7 100644 --- a/apps/webapp/src/Components/CreateTodoModal/TaskEditor/styled.tsx +++ b/apps/webapp/src/Components/CreateTodoModal/TaskEditor/styled.tsx @@ -7,7 +7,7 @@ import { ModalSection } from '../../../Style/Refactor' export const TaskEditorWrapper = styled.section<{ withMaxHeight?: boolean }>` padding: ${({ theme }) => theme.spacing.medium}; border-radius: ${({ theme }) => theme.borderRadius.small}; - background: ${({ theme }) => theme.tokens.surfaces.app}; + background-color: ${({ theme }) => theme.tokens.surfaces.s[0]}; margin: ${({ theme }) => theme.spacing.large} 0; ${({ withMaxHeight }) => withMaxHeight && `height: 22vh;`} max-height: 24vh; diff --git a/apps/webapp/src/Components/Modals/CreateTodoModal.tsx b/apps/webapp/src/Components/Modals/CreateTodoModal.tsx index b0de7d3ac..045bc3482 100644 --- a/apps/webapp/src/Components/Modals/CreateTodoModal.tsx +++ b/apps/webapp/src/Components/Modals/CreateTodoModal.tsx @@ -10,7 +10,7 @@ import { Button, DisplayShortcut, LoadingButton } from '@workduck-io/mex-compone import { tinykeys } from '@workduck-io/tinykeys' import { getDefaultContent, ModalsType, mog, useModalStore } from '@mexit/core' -import { DefaultMIcons, IconDisplay, InsertMenu, PrimaryText } from '@mexit/shared' +import { DefaultMIcons, IconDisplay, InsertMenu, MexIcon, PrimaryText } from '@mexit/shared' import useUpdateBlock from '../../Editor/Hooks/useUpdateBlock' import { useApi } from '../../Hooks/API/useNodeAPI' @@ -105,14 +105,14 @@ const CreateTodoModal = ({ children }) => { '$mod+Enter': (event) => { if (isOpen) { event.preventDefault() - onCreateTask() + handleCreate() } } }) return () => { unsubscribe() } - }, [isOpen]) + }, [isOpen, selectedNoteId]) if (!isOpen) return <> @@ -157,6 +157,14 @@ const CreateTodoModal = ({ children }) => { ? + diff --git a/apps/webapp/src/Components/Modals/DeleteSpaceModal/index.tsx b/apps/webapp/src/Components/Modals/DeleteSpaceModal/index.tsx index bef6e7b90..57516e3ed 100644 --- a/apps/webapp/src/Components/Modals/DeleteSpaceModal/index.tsx +++ b/apps/webapp/src/Components/Modals/DeleteSpaceModal/index.tsx @@ -9,14 +9,13 @@ import { tinykeys } from '@workduck-io/tinykeys' import { API, - DefaultMIcons, ModalsType, useDataStore, useLayoutStore, useModalStore, userPreferenceStore as useUserPreferenceStore } from '@mexit/core' -import { Group, IconDisplay, PrimaryText } from '@mexit/shared' +import { DefaultMIcons, Group, IconDisplay, MexIcon, PrimaryText } from '@mexit/shared' import { useNamespaceApi } from '../../../Hooks/API/useNamespaceAPI' import { useNamespaces } from '../../../Hooks/useNamespaces' @@ -116,6 +115,14 @@ const DeleteSpaceModal = () => { ? + All ({notesSize}) Note(s) created within this Space will be permanently deleted.{' '} diff --git a/apps/webapp/src/Components/Refactor/DeleteModal.tsx b/apps/webapp/src/Components/Refactor/DeleteModal.tsx index 90b880f79..4756013ca 100644 --- a/apps/webapp/src/Components/Refactor/DeleteModal.tsx +++ b/apps/webapp/src/Components/Refactor/DeleteModal.tsx @@ -4,19 +4,21 @@ import { useLocation } from 'react-router-dom' import archiveLine from '@iconify/icons-ri/archive-line' import { Icon } from '@iconify/react' +import { useTheme } from 'styled-components' import create from 'zustand' import { Button, DisplayShortcut, PrimaryButton } from '@workduck-io/mex-components' import { tinykeys } from '@workduck-io/tinykeys' import { isReserved, RefactorPath, useEditorStore, useHelpStore } from '@mexit/core' -import { isOnEditableElement } from '@mexit/shared' +import { DefaultMIcons, isOnEditableElement, MexIcon } from '@mexit/shared' import { useKeyListener } from '../../Hooks/useChangeShortcutListener' import { useDelete } from '../../Hooks/useDelete' import { useEditorBuffer } from '../../Hooks/useEditorBuffer' import { NavigationType, ROUTE_PATHS, useRouting } from '../../Hooks/useRouting' -import { DeleteIcon, MockRefactorMap, ModalControls, ModalHeader, MRMHead, MRMRow } from '../../Style/Refactor' +import { DeleteIcon, MockRefactorMap, ModalControls, MRMHead, MRMRow } from '../../Style/Refactor' +import { Header, Title } from '../Modals/DeleteSpaceModal/styled' import { QuickLink, WrappedNodeSelect } from '../NodeSelect/NodeSelect' interface DeleteStoreState { @@ -63,8 +65,9 @@ const Delete = () => { const { getMockArchive, execArchive } = useDelete() const shortcuts = useHelpStore((store) => store.shortcuts) - const location = useLocation() + const theme = useTheme() const { goTo } = useRouting() + const location = useLocation() const openModal = useDeleteStore((store) => store.openModal) const closeModal = useDeleteStore((store) => store.closeModal) @@ -141,7 +144,17 @@ const Delete = () => { return ( - Archive +
+ Archive + +
{ + const theme = useTheme() const { getILinkFromNodeid } = useLinks() const { toggleOpen, open, data } = useModalStore() @@ -93,18 +96,32 @@ const TemplateModal = () => { toggleOpen(ModalsType.template) } + const onRequestClose = () => { + toggleOpen(ModalsType.template) + } + return ( toggleOpen(ModalsType.template)} + onRequestClose={onRequestClose} isOpen={open === ModalsType.template} > {templates.length !== 0 ? ( !currentTemplate ? ( <> - Set Template for {getTitleFromPath(node?.path)} + + Set Template for {getTitleFromPath(node?.path)} + +

Auto fill new notes using template

) : ( diff --git a/apps/webapp/src/Components/Todo/Todo.tsx b/apps/webapp/src/Components/Todo/Todo.tsx index c1c615d33..ddf77fd83 100644 --- a/apps/webapp/src/Components/Todo/Todo.tsx +++ b/apps/webapp/src/Components/Todo/Todo.tsx @@ -96,7 +96,7 @@ export const TodoBase = ({ return ( diff --git a/libs/shared/src/Components/AIPreview/index.tsx b/libs/shared/src/Components/AIPreview/index.tsx index ddbcb27c5..4cd061863 100644 --- a/libs/shared/src/Components/AIPreview/index.tsx +++ b/libs/shared/src/Components/AIPreview/index.tsx @@ -133,7 +133,7 @@ const AIPreviewContainer: React.FC = (props) => { Replace )} - + diff --git a/libs/shared/src/Components/FloatingElements/Autocomplete.tsx b/libs/shared/src/Components/FloatingElements/Autocomplete.tsx index 7a27e98f7..9d30e27dc 100644 --- a/libs/shared/src/Components/FloatingElements/Autocomplete.tsx +++ b/libs/shared/src/Components/FloatingElements/Autocomplete.tsx @@ -169,6 +169,7 @@ export const AutoComplete: React.FC = (props) => { {open && items.length > 0 && !disableMenu && ( ({ open, onOpenChange: setOpen, - middleware: [offset({ mainAxis: 4, alignmentAxis: nested ? -5 : 0 }), flip(), shift()], + middleware: [ + offset({ mainAxis: 4, alignmentAxis: nested ? -5 : 0 }), + flip(), + shift({ + padding: 25 + }) + ], placement: nested ? 'right-start' : 'bottom-start', nodeId // whileElementsMounted: autoUpdate @@ -216,7 +222,8 @@ export const MenuComponent = forwardRef