-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0771799
commit 9c33e6d
Showing
37 changed files
with
109 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { ContentType } from "~/types"; | ||
import { ContentType } from "@/types"; | ||
|
||
export const reSortArrayElements = ( | ||
array: ContentType[], | ||
hoveredIndex: number, | ||
draggingIndex: number | ||
array: ContentType[], | ||
hoveredIndex: number, | ||
draggingIndex: number, | ||
) => { | ||
const stringArray = array.map(({ content }) => content); | ||
const element = stringArray.splice(draggingIndex, 1)[0]; | ||
stringArray.splice(hoveredIndex, 0, element); | ||
const stringArray = array.map(({ content }) => content); | ||
const element = stringArray.splice(draggingIndex, 1)[0]; | ||
stringArray.splice(hoveredIndex, 0, element); | ||
|
||
const reNumberingList: ContentType[] = stringArray.map((content, index) => ({ | ||
id: index, | ||
content, | ||
})); | ||
return reNumberingList; | ||
const reNumberingList: ContentType[] = stringArray.map((content, index) => ({ | ||
id: index, | ||
content, | ||
})); | ||
return reNumberingList; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { useDeleteContent } from "~/features/markdown-editor/model/useDeleteContent"; | ||
export { useDeleteContent } from "@/features/markdown-editor/model/useDeleteContent"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { useSwitchPatternBySeparateLevel } from "~/hooks/useSwitchPatternBySeparateLevel"; | ||
import { useSwitchPatternBySeparateLevel } from "@/hooks/useSwitchPatternBySeparateLevel"; | ||
export const useIsIncludeTag = () => { | ||
const { switchPatternBySeparateLevel } = useSwitchPatternBySeparateLevel(); | ||
const { switchPatternBySeparateLevel } = useSwitchPatternBySeparateLevel(); | ||
|
||
const isIncludeTag = (content: string) => { | ||
return Boolean(switchPatternBySeparateLevel(content)); | ||
}; | ||
return { isIncludeTag }; | ||
const isIncludeTag = (content: string) => { | ||
return Boolean(switchPatternBySeparateLevel(content)); | ||
}; | ||
return { isIncludeTag }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { useSwitchPatternBySeparateLevel } from "~/hooks/useSwitchPatternBySeparateLevel"; | ||
import { useSwitchPatternBySeparateLevel } from "@/hooks/useSwitchPatternBySeparateLevel"; | ||
export const useSplitByTag = () => { | ||
const { switchPatternBySeparateLevel } = useSwitchPatternBySeparateLevel(); | ||
const splitByTag = (content: string) => { | ||
const splitCotent = content.split("\n"); | ||
const { switchPatternBySeparateLevel } = useSwitchPatternBySeparateLevel(); | ||
const splitByTag = (content: string) => { | ||
const splitCotent = content.split("\n"); | ||
|
||
const result: string[][] = []; | ||
for (let row of splitCotent) { | ||
switchPatternBySeparateLevel(row) | ||
? result?.push([row]) | ||
: result[result.length - 1]?.push(row); | ||
} | ||
return result?.map((element) => element.join("\n")); | ||
}; | ||
return { splitByTag }; | ||
const result: string[][] = []; | ||
for (let row of splitCotent) { | ||
switchPatternBySeparateLevel(row) | ||
? result?.push([row]) | ||
: result[result.length - 1]?.push(row); | ||
} | ||
return result?.map((element) => element.join("\n")); | ||
}; | ||
return { splitByTag }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { useRef } from "react"; | ||
import { scrollIntoViewCurrentRef } from "~/libs/common/scrollIntoViewCurrentRef"; | ||
import { scrollIntoViewCurrentRef } from "@/libs/common/scrollIntoViewCurrentRef"; | ||
|
||
export const useViewControl = () => { | ||
const bottomRef = useRef<HTMLDivElement>(null); | ||
const topRef = useRef<HTMLDivElement>(null); | ||
const bottomRef = useRef<HTMLDivElement>(null); | ||
const topRef = useRef<HTMLDivElement>(null); | ||
|
||
const scrollToTop = () => scrollIntoViewCurrentRef(topRef); | ||
const scrollToBottom = () => scrollIntoViewCurrentRef(bottomRef); | ||
const scrollToTop = () => scrollIntoViewCurrentRef(topRef); | ||
const scrollToBottom = () => scrollIntoViewCurrentRef(bottomRef); | ||
|
||
const TopAnchor = (): JSX.Element => <div ref={topRef} />; | ||
const BottomAnchor = (): JSX.Element => <div ref={bottomRef} />; | ||
return { TopAnchor, BottomAnchor, scrollToTop, scrollToBottom }; | ||
const TopAnchor = (): JSX.Element => <div ref={topRef} />; | ||
const BottomAnchor = (): JSX.Element => <div ref={bottomRef} />; | ||
return { TopAnchor, BottomAnchor, scrollToTop, scrollToBottom }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Composition } from "~/types"; | ||
import { Composition } from "@/types"; | ||
export const SubContent = ({ children }: Composition): JSX.Element => ( | ||
<div className="px-6">{children}</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { languageAndReadmeMap } from "~/constants/languageAndReadmeMap"; | ||
import { languageAndReadmeMap } from "@/constants/languageAndReadmeMap"; | ||
type LanguageKeyType = typeof languageAndReadmeMap; | ||
export type LanguageKey = keyof LanguageKeyType; |
Oops, something went wrong.