MCPcopy Index your code

hub / github.com/cosZone/astro-koharu / functions

Functions813 in github.com/cosZone/astro-koharu

↓ 156 callersFunctiont
(locale: Locale, key: TranslationKey, params?: TranslationParams)
src/i18n/utils.ts:41
↓ 101 callersFunctioncn
(...inputs: ClassValue[])
src/lib/utils.ts:5
↓ 45 callersFunctionuseTranslation
()
src/hooks/useTranslation.ts:19
↓ 41 callersFunctioncn
(...inputs: ClassValue[])
cms/src/lib/utils.ts:7
↓ 24 callersFunctiongitSafe
* 安全执行 Git 命令(不抛出异常)
scripts/koharu/utils/update-operations.ts:39
↓ 23 callersFunctionescapeHtml
(text: string)
src/lib/markdown/shoka-renderers.ts:8
↓ 18 callersFunctiongit
* 执行 Git 命令
scripts/koharu/utils/update-operations.ts:21
↓ 16 callersFunctioncloseModal
()
src/store/modal.ts:95
↓ 12 callersFunctiongetSortedPosts
(locale?: string)
src/lib/content/posts.ts:98
↓ 12 callersFunctionlocalizedPath
(path: string, locale: Locale = defaultLocale)
src/i18n/utils.ts:114
↓ 11 callersFunctiongetPostSlug
(post: BlogPost)
src/lib/content/locale.ts:63
↓ 11 callersFunctionopenModal
( type: T, data?: T extends 'codeFullscreen' ? CodeBlockData : T extends 'diagramFullscreen'
src/store/modal.ts:76
↓ 10 callersFunctionencodeSlug
(slug: string)
src/lib/route.ts:14
↓ 9 callersFunctionuseKeyboardShortcut
(options: KeyboardShortcutOptions)
src/hooks/useKeyboardShortcut.ts:128
↓ 8 callersFunctionflushTabs
()
src/lib/markdown/shoka-preprocessor.ts:54
↓ 8 callersFunctionsanitizeText
* Sanitize text content by removing all HTML tags * Uses sanitize-html to ensure security
src/lib/markdown/remark-link-embed.ts:163
↓ 8 callersFunctionusePressAnyKey
(enabled: boolean, onPress: () => void)
scripts/koharu/hooks/usePressAnyKey.ts:4
↓ 8 callersFunctionuseRetimer
()
scripts/koharu/hooks/useRetimer.ts:9
↓ 7 callersFunctiongenerateSlug
(title: string)
scripts/koharu/utils/new-operations.ts:15
↓ 7 callersFunctionreset
()
src/lib/playback-time-store.ts:28
↓ 7 callersFunctionsanitizeHtml
* Lightweight client-side HTML sanitizer for quiz content. * Strips event handler attributes (onclick, onerror, etc.) and javascript: URLs * from al
src/lib/quiz/parse-quiz.ts:9
↓ 7 callersFunctionuseIsMounted
()
src/hooks/useIsMounted.ts:3
↓ 6 callersFunctionescapeHtml
* Escape HTML special characters
cms/src/lib/marked-link-embed.ts:34
↓ 6 callersFunctionfindHeadingById
(headings: Heading[], id: string)
src/hooks/useHeadingTree.ts:150
↓ 6 callersFunctionformatDate
* Format a date using the site's configured timezone * @internal Used by displayDate and formatForSeo
src/lib/date.ts:32
↓ 6 callersFunctiongetLocaleFromUrl
(pathname: string)
src/i18n/utils.ts:90
↓ 6 callersFunctionresolve
()
src/components/bgm/GlobalBGMPlayer.tsx:59
↓ 6 callersFunctionsyncChristmasClass
* Sync christmas class on html element
src/store/christmas.ts:68
↓ 6 callersFunctionuseMediaQuery
(query: string)
src/hooks/useMediaQuery.ts:27
↓ 5 callersFunctiongetHtmlLang
(locale: Locale)
src/i18n/utils.ts:179
↓ 5 callersFunctionisPathSafe
(filePath: string)
cms/src/lib/validation.ts:16
↓ 5 callersFunctionmemoize
(namespace: string, key: string, fn: () => Promise<T>)
src/lib/content/cache.ts:20
↓ 5 callersFunctionnormalizeTag
* 规范化版本号为带 v 前缀的格式
scripts/koharu/utils/update-operations.ts:171
↓ 5 callersFunctionsanitizeUrl
* Sanitize URL to prevent XSS attacks * Only allows http/https protocols
src/lib/markdown/remark-link-embed.ts:174
↓ 5 callersFunctionshuffleArray
(array: T[])
src/lib/utils.ts:88
↓ 5 callersFunctionupdateHeading
(newHeading: CurrentHeading | null)
src/hooks/useCurrentHeading.ts:50
↓ 5 callersFunctionyamlQuote
Wrap value in single quotes if it contains YAML-special characters
scripts/koharu/utils/new-operations.ts:136
↓ 4 callersFunctionapplyAttrs
Apply parsed attributes to an element
src/lib/markdown/rehype-shoka-attrs.ts:34
↓ 4 callersFunctionescapeHtml
* Escape HTML special characters
cms/src/lib/markdown-render.ts:70
↓ 4 callersFunctionformatSize
(bytes: number)
scripts/koharu/utils/format.ts:4
↓ 4 callersFunctiongetBackupList
()
scripts/koharu/utils/backup.ts:38
↓ 4 callersFunctionhandleTabChange
(key: SubjectTypeKey)
src/components/bangumi/BangumiCollection.tsx:70
↓ 4 callersFunctionhasValidMarkdownExtension
(filePath: string)
cms/src/lib/validation.ts:27
↓ 4 callersFunctionparseAttrs
Parse {.class1 .class2 #id key=value} into properties
src/lib/markdown/rehype-shoka-attrs.ts:13
↓ 4 callersFunctionpickPost
( post: BlogPost, keys: readonly K[], locale: string = defaultLocale, )
src/lib/content/transforms.ts:63
↓ 4 callersFunctiontranslateCategoryName
(name: string, locale: Locale)
src/lib/content/category-translate.ts:9
↓ 3 callersFunctionaddCategoryRecursively
(rootCategories: Category[], parentNames: string[], name: string)
src/lib/content/categories.ts:74
↓ 3 callersFunctioncopyToClipboard
* Copy text to clipboard
cms/src/lib/preview-enhancer.ts:27
↓ 3 callersFunctioncreateCheckmarkSvg
* Create checkmark SVG for copy success animation
cms/src/lib/preview-enhancer.ts:68
↓ 3 callersFunctionextractCodeContent
* Extract code content from a code block wrapper
cms/src/lib/preview-enhancer.ts:92
↓ 3 callersFunctionextractCodePenId
(url: string)
cms/src/lib/link-utils.ts:57
↓ 3 callersFunctionextractTweetId
(url: string)
cms/src/lib/link-utils.ts:24
↓ 3 callersFunctionflushGroup
()
src/lib/image-enhancer.ts:177
↓ 3 callersFunctionfromBase64
(base64: string)
src/lib/crypto/decrypt.ts:23
↓ 3 callersFunctiongenerateCategorySlug
(name: string)
cms/src/lib/category.ts:36
↓ 3 callersFunctiongenerateSlug
(title: string)
cms/src/lib/slug.ts:20
↓ 3 callersFunctiongetAnnouncementColor
(announcement: Announcement)
src/components/announcement/AnnouncementToaster.tsx:31
↓ 3 callersFunctiongetCategoryMap
()
scripts/koharu/utils/new-operations.ts:41
↓ 3 callersFunctiongetEnabledSeries
()
src/lib/content/posts.ts:308
↓ 3 callersFunctiongetPostLocale
(post: BlogPost)
src/lib/content/locale.ts:54
↓ 3 callersFunctiongetPostReadingTime
(post: CollectionEntry<'blog'>)
src/lib/content/posts.ts:25
↓ 3 callersFunctiongetPostsByCategory
(categoryName: string, locale?: string)
src/lib/content/posts.ts:164
↓ 3 callersFunctiongetSelectableItems
* Get selectable items from the Pagefind search results DOM
src/hooks/useSearchKeyboardNav.ts:17
↓ 3 callersFunctiongetStoredVolume
()
src/store/player.ts:41
↓ 3 callersFunctiongetVersion
()
scripts/koharu/utils/version.ts:12
↓ 3 callersFunctionisPostInCategory
* 检查文章是否属于特定分类 * @param post 文章 * @param categoryName 分类名 * @returns 是否属于该分类
src/lib/content/posts.ts:287
↓ 3 callersFunctionnotify
()
src/lib/playback-time-store.ts:15
↓ 3 callersFunctionnotifyListeners
()
src/hooks/useActiveHeading.ts:47
↓ 3 callersFunctionparseCommits
* 解析提交信息
scripts/koharu/utils/update-operations.ts:154
↓ 3 callersFunctionpickPosts
( posts: BlogPost[], keys: readonly K[], locale: string = defaultLocale, )
src/lib/content/transforms.ts:80
↓ 3 callersFunctionrender
()
src/components/markdown/InfographicToolbar.tsx:79
↓ 3 callersFunctionresolveNavName
(nameKey: string | undefined, fallbackName: string | undefined, locale: Locale)
src/i18n/utils.ts:195
↓ 3 callersFunctionrouteBuilder
(route: T, param: RouteParams<typeof route>)
src/lib/route.ts:16
↓ 3 callersFunctionsetCategoryMap
(map: Record<string, string>)
cms/src/lib/category.ts:16
↓ 3 callersFunctionstripLocaleFromPath
(pathname: string)
src/i18n/utils.ts:135
↓ 3 callersFunctiontoArrayBuffer
Convert Uint8Array to a fresh ArrayBuffer (fixes TS strict typing with crypto.subtle)
src/lib/crypto/decrypt.ts:17
↓ 3 callersFunctiontoBase64
(buffer: ArrayBuffer)
src/lib/crypto/encrypt.ts:19
↓ 3 callersFunctiontoHex
(n: number)
src/scripts/generateLqips.ts:35
↓ 3 callersFunctiontoggleChristmas
()
src/store/christmas.ts:76
↓ 3 callersFunctionupdateState
(newState: Partial<ScrollTriggerState>)
src/hooks/useScrollTrigger.ts:93
↓ 3 callersFunctionuseControlledState
({ value: controlledValue, defaultValue, onChange, }: UseControlledStateOptions<T>)
src/hooks/useControlledState.ts:40
↓ 3 callersFunctionuseIsDarkTheme
()
src/hooks/useIsDarkTheme.ts:28
↓ 3 callersFunctionusePlaybackProgress
( timeStore: PlaybackTimeStore, progressBarRef: RefObject<HTMLElement | null>, sliderRef?: RefObject<HTM
src/hooks/usePlaybackTime.ts:18
↓ 3 callersFunctionuseRetimer
()
src/hooks/useRetimer.ts:9
↓ 3 callersFunctionuseScrollTrigger
(options: UseScrollTriggerOptions = {})
src/hooks/useScrollTrigger.ts:207
↓ 3 callersFunctionvalidateBackupFilePath
(filePath: string)
scripts/koharu/utils/validation.ts:56
↓ 3 callersFunctionwrapElement
(preElement: HTMLElement, wrapperClass: string)
src/lib/content-enhancer-utils.ts:50
↓ 2 callersFunctionaddCategoryMappings
(projectRoot: string, mappings: Record<string, string>)
cms/src/lib/config.ts:25
↓ 2 callersFunctionblocksToMarkdown
* Converts BlockNote blocks to markdown
cms/src/components/PostEditor.tsx:93
↓ 2 callersFunctionbuildCategoryPath
(categoryNames: string | string[])
src/lib/content/category-path.ts:14
↓ 2 callersFunctionbuildReleaseUrl
(version: string)
scripts/koharu/utils/update-operations.ts:676
↓ 2 callersFunctionbuildRssItemFields
(post: BlogPost, locale: string)
src/lib/rss-utils.ts:11
↓ 2 callersFunctioncleanup
()
src/lib/heading-scroll-lock.ts:5
↓ 2 callersFunctioncreateInlinePlugin
Generic inline syntax replacer for remark AST
src/lib/markdown/remark-shoka-effects.ts:50
↓ 2 callersFunctioncreateUmamiStatsConfig
(config: UmamiConfig, path?: string)
src/lib/umami-stats.ts:112
↓ 2 callersFunctiondecryptContent
(cipher: string, iv: string, salt: string, password: string)
src/lib/crypto/decrypt.ts:45
↓ 2 callersFunctionencryptContent
(plaintext: string, password: string)
src/lib/crypto/encrypt.ts:36
↓ 2 callersFunctionexpandLineRanges
Expand line ranges like "1,3-5,7" into a Set of line numbers
src/lib/markdown/shiki-meta-transformer.ts:54
↓ 2 callersFunctionextractCodePenId
(url: string)
src/lib/markdown/link-utils.ts:63
↓ 2 callersFunctionextractHeadings
(editor: BlockNoteEditor<any, any, any>)
cms/src/hooks/useEditorHeadings.ts:44
next →1–100 of 813, ranked by callers