docs: remove translations & update homepage (#904)

* docs: add GitHub buttons and improve option docs

* chore: replace husky with prepush check

* docs: revamp homepage and switch to custom GitHub buttons

- Make the docs English-only by removing all zh-cn content, the language switcher UI, and related JS/config

- Rework homepage feature cards (Safe & Typed, Pure JavaScript, Shopify & Jekyll, Streaming) and refresh section colors/layout

- Replace buttons.github.io with custom Star/Sponsor buttons featuring a live star count and dark-mode support

- Drop the buttons.js script and tidy banner, header, footer, and share partials

Co-authored-by: Cursor <[email protected]>

* fix: restore tsconfig settings and changelog build

Re-add suppressImplicitAnyIndexErrors and downlevelIteration removed in
a75033e2c, which broke the rollup TypeScript build on CI. Drop zh-cn
changelog output now that translations were removed.

Co-authored-by: Cursor <[email protected]>

* fix: resolve TS errors without deprecated tsconfig options

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Yang Jun
2026-06-07 01:37:51 +08:00
committed by GitHub
co-authored by Cursor
parent 705e5d1b6e
commit 499b221f33
159 changed files with 259 additions and 6161 deletions
+6 -12
View File
@@ -4,22 +4,16 @@ interface TrieInput<T> {
[key: string]: T
}
interface TrieLeafNode<T> {
data: T;
end: true;
needBoundary?: true;
}
export interface Trie<T> {
[key: string]: Trie<T> | TrieLeafNode<T>;
}
export type TrieNode<T> = Trie<T> | TrieLeafNode<T>
export type Trie<T> = {
data?: T
end?: true
needBoundary?: true
} & Record<string, any>
export function createTrie<T = any> (input: TrieInput<T>): Trie<T> {
const trie: Trie<T> = {}
for (const [name, data] of Object.entries(input)) {
let node: Trie<T> | TrieLeafNode<T> = trie
let node = trie
for (let i = 0; i < name.length; i++) {
const c = name[i]