Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/3.2 #463

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23,487 changes: 6,192 additions & 17,295 deletions source/elegant/package-lock.json

Large diffs are not rendered by default.

51 changes: 1 addition & 50 deletions source/elegant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"dependencies": {
"@apollo/client": "^3.7.17",
"@brandonowens/elegant-ui": "^1.2.6",
"@docsearch/react": "^3.5.1",
"@hapi/iron": "^7.0.1",
"@heroicons/react": "^2.0.18",
"@hookform/resolvers": "^2.9.11",
Expand All @@ -29,12 +28,8 @@
"@radix-ui/react-popover": "^1.0.7",
"@tippyjs/react": "^4.2.6",
"@tiptap/core": "2.1.10",
"@tiptap/extension-bullet-list": "2.1.10",
"@tiptap/extension-code-block": "2.2.4",
"@tiptap/extension-code-block-lowlight": "2.1.10",
"@tiptap/extension-collaboration": "2.1.10",
"@tiptap/extension-collaboration-cursor": "2.1.10",
"@tiptap/extension-color": "2.2.4",
"@tiptap/extension-document": "^2.2.1",
"@tiptap/extension-dropcursor": "2.1.10",
"@tiptap/extension-focus": "2.1.10",
Expand All @@ -43,8 +38,6 @@
"@tiptap/extension-horizontal-rule": "2.1.10",
"@tiptap/extension-image": "2.1.10",
"@tiptap/extension-link": "^2.2.4",
"@tiptap/extension-ordered-list": "2.1.10",
"@tiptap/extension-paragraph": "2.1.10",
"@tiptap/extension-placeholder": "2.2.4",
"@tiptap/extension-subscript": "2.1.10",
"@tiptap/extension-superscript": "2.1.10",
Expand All @@ -66,19 +59,13 @@
"clsx": "^2.1.0",
"cookie": "^0.5.0",
"cross-fetch": "^4.0.0",
"cross-spawn": "^7.0.3",
"dompurify": "^3.0.3",
"dotenv": "^16.0.3",
"eslint-config-next": "^14.1.4",
"fs": "^0.0.1-security",
"glob": "^8.1.0",
"graphql": "^16.8.1",
"gray-matter": "^4.0.3",
"js-base64": "^3.7.5",
"lowlight": "^2.9.0",
"lucide-react": "^0.303.0",
"moment": "^2.29.4",
"net": "^1.0.2",
"next": "13.5",
"next-connect": "^1.0.0",
"next-router-mock": "^0.9.11",
Expand All @@ -91,32 +78,21 @@
"react-dom": "^18.2.0",
"react-hook-form": "^7.45.1",
"react-hot-toast": "^2.4.1",
"react-select": "^5.8.0",
"react-textarea-autosize": "^8.5.3",
"schema-to-yup": "^1.12.15",
"sharp": "^0.33.3",
"swr": "^2.2.0",
"tippy.js": "^6.3.7",
"tiptap-markdown": "^0.8.9",
"url-slug": "^4.0.1",
"util": "^0.12.5",
"uuid": "^9.0.1",
"yup": "^1.4.0",
"zustand": "^4.3.9"
},
"devDependencies": {
"@babel/preset-env": "^7.22.7",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.22.5",
"@badrap/bar-of-progress": "^0.1.1",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/typed-document-node": "^5.0.1",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
"@headlessui/react": "^1.7.2",
"@jsdevtools/rehype-toc": "^3.0.2",
"@svgr/webpack": "^8.0.1",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/line-clamp": "^0.3.1",
Expand All @@ -126,9 +102,7 @@
"@testing-library/user-event": "^14.4.3",
"@types/cookie": "^0.5.1",
"@types/dompurify": "^3.0.2",
"@types/imurmurhash": "^0.1.4",
"@types/jest": "^29.5.3",
"@types/json-stable-stringify": "^1.0.34",
"@types/lowlight": "^0.0.3",
"@types/node": "^20.12.7",
"@types/pluralize": "^0.0.33",
Expand All @@ -138,31 +112,13 @@
"@types/react-test-renderer": "^18.0.7",
"@types/testing-library__jest-dom": "^5.14.5",
"@types/uuid": "^9.0.7",
"@types/video.js": "^5.16.1",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.62.0",
"autoprefixer": "^10.4.14",
"cheerio": "^1.0.0-rc.12",
"concurrently": "^8.2.0",
"cypress": "^13.6.3",
"debounce": "^1.2.0",
"elegant-cli": "^3.1.4",
"encoding": "^0.1.13",
"eslint": "^8.44.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"exec-sh": "^0.3.4",
"feed": "^4.2.2",
"file-loader": "^6.0.0",
"focus-visible": "^5.1.0",
"follow-redirects": "^1.15.4",
"framer-motion": "2.9.5",
"glyphhanger": "^5.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"mini-svg-data-uri": "^1.4.3",
Expand All @@ -173,13 +129,10 @@
"postcss": "^8.4.33",
"postcss-focus-visible": "^5.0.0",
"postcss-import": "^14.0.1",
"prettier": "^2.5.0",
"react-intersection-observer": "^8.29.0",
"react-test-renderer": "^18.2.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-highlight": "^7.0.0",
"rehype-parse": "^8.0.2",
"rehype-prism-plus": "^1.6.1",
"rehype-react": "^7.2.0",
"rehype-rewrite": "^3.0.6",
"rehype-slug": "^5.1.0",
"rehype-stringify": "^9.0.3",
Expand All @@ -188,9 +141,7 @@
"remark-rehype": "^10.1.0",
"remark-smartypants": "^2.0.0",
"remark-unwrap-images": "^3.0.1",
"seedrandom": "^3.0.5",
"start-server-and-test": "^2.0.0",
"stringify-object": "^3.3.0",
"tailwindcss": "^3.2.7",
"ts-jest": "^29.1.1",
"typescript": "^5.0.2",
Expand Down
16 changes: 0 additions & 16 deletions source/elegant/src/components/Editor/Menus/TextMenu/TextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,6 @@ export const TextMenu = ({ editor }: TextMenuProps) => {
</Surface>
</Popover.Content>
</Popover.Root>
<Popover.Root>
<Popover.Trigger asChild>
<MemoButton active={!!states.currentColor} tooltip="Text color">
<Icon name="Palette" />
</MemoButton>
</Popover.Trigger>
<Popover.Content side="top" sideOffset={8} asChild>
<Surface className="p-1">
<MemoColorPicker
color={states.currentColor}
onChange={commands.onChangeColor}
onClear={commands.onClearColor}
/>
</Surface>
</Popover.Content>
</Popover.Root>
<Popover.Root>
<Popover.Trigger asChild>
<MemoButton tooltip="More options">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ export const useTextmenuCommands = (editor: Editor) => {
const onAlignRight = useCallback(() => editor.chain().focus().setTextAlign('right').run(), [editor])
const onAlignJustify = useCallback(() => editor.chain().focus().setTextAlign('justify').run(), [editor])

const onChangeColor = useCallback((color: string) => editor.chain().setColor(color).run(), [editor])
const onClearColor = useCallback(() => editor.chain().focus().unsetColor().run(), [editor])

const onChangeHighlight = useCallback((color: string) => editor.chain().setHighlight({ color }).run(), [editor])
const onClearHighlight = useCallback(() => editor.chain().focus().unsetHighlight().run(), [editor])

Expand Down Expand Up @@ -65,8 +62,6 @@ export const useTextmenuCommands = (editor: Editor) => {
onAlignCenter,
onAlignRight,
onAlignJustify,
onChangeColor,
onClearColor,
onChangeHighlight,
onClearHighlight,
onSetFont,
Expand Down
1 change: 1 addition & 0 deletions source/elegant/src/components/Headers/SplashHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const SplashHeader = ({
href={gitHubUrl}
className="ml-6 block text-slate-400 hover:text-slate-500 dark:hover:text-slate-300"
target="_blank"
rel="noopener noreferrer"
>
<span className="sr-only">
{appName} on GitHub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ exports[`Splash Header component renders a splash header component properly 1`]
<a
className="ml-6 block text-slate-400 hover:text-slate-500 dark:hover:text-slate-300"
href="hello.com"
rel="noopener noreferrer"
target="_blank"
>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const NavPopover = ({
href={Config('app.repository')}
className="hover:text-primary-500 dark:hover:text-primary-400"
target="_blank"
rel="noopener noreferrer"
>
GitHub
</a>
Expand Down
1 change: 1 addition & 0 deletions source/elegant/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const Header = () => {
href={Config('app.repository')}
className="ml-6 block text-slate-400 hover:text-slate-500 dark:hover:text-slate-300"
target="_blank"
rel="noopener noreferrer"
>
<span className="sr-only">{Config('app.name')} on GitHub</span>
<GitHubIcon className="w-5 h-5 text-slate-400 hover:text-slate-500 dark:hover:text-slate-300"/>
Expand Down
2 changes: 0 additions & 2 deletions source/elegant/src/utils/Hooks/useEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import HorizontalRule from '@/components/Editor/Extensions/HorizontalRule';
import { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight';
import { TextStyle } from '@tiptap/extension-text-style';
import { Typography } from '@tiptap/extension-typography';
import { Color } from '@tiptap/extension-color';
import { TrailingNode } from '@/components/Editor/Extensions/TrailingNode';
import { Highlight } from '@tiptap/extension-highlight';
import { Underline } from '@tiptap/extension-underline';
Expand Down Expand Up @@ -66,7 +65,6 @@ export const useEditor = ({ ...rhfMethods }) => {
defaultLanguage: null,
}),
TextStyle,
Color,
TrailingNode,
Link.configure({
openOnClick: false,
Expand Down
Loading