Compare commits

..

7 Commits

Author SHA1 Message Date
github-actions[bot] 6f8355a0f0 chore(deps): bump algoliasearch from 5.55.1 to 5.56.0 (#824) 2026-09-01 10:34:40 +08:00
github-actions[bot] ba8fd91871 chore(deps): bump pangu from 7.2.1 to 9.1.0 (#823) 2026-09-01 10:30:36 +08:00
github-actions[bot] 84c9c61455 chore(deps): bump katex from 0.17.0 to 0.18.1 (#822) 2026-09-01 10:28:11 +08:00
github-actions[bot] 20c51703c7 chore(deps): bump @fortawesome/fontawesome-free from 7.3.0 to 7.3.1 (#820) 2026-09-01 10:21:26 +08:00
github-actions[bot] 2ca4917371 chore(deps): bump mapbox-gl from 3.25.0 to 3.27.0 (#821) 2026-09-01 10:19:29 +08:00
github-actions[bot] ce5bcbaecf chore(deps): bump fuse.js from 7.4.2 to 7.5.0 (#819) 2026-09-01 10:18:10 +08:00
github-actions[bot] 1b9beb90bb chore(deps): bump twikoo from 1.7.13 to 1.7.15 (#818) 2026-09-01 10:08:24 +08:00
16 changed files with 954 additions and 981 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.37.9
uses: github/codeql-action/init@v4.37.3
with:
languages: ${{ matrix.language }}
config-file: ./.github/configs/codeql.yml
@@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v4.37.9
uses: github/codeql-action/autobuild@v4.37.3
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -69,4 +69,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.37.9
uses: github/codeql-action/analyze@v4.37.3
+14 -14
View File
@@ -6,8 +6,8 @@ prefix:
# simple-icons@16.24.1 https://github.com/simple-icons/simple-icons
simpleIcons: https://cdn.jsdelivr.net/npm/simple-icons@16.24.1/icons/
libFiles:
# algoliasearch@5.55.1 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@5.55.1/dist/lite/builds/browser.umd.js
# algoliasearch@5.56.0 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@5.56.0/dist/lite/builds/browser.umd.js
# animate.css@4.1.1 https://github.com/daneden/animate.css
animateCSS: animate.css@4.1.1/animate.min.css
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
@@ -27,8 +27,8 @@ libFiles:
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# echarts@6.1.0 https://github.com/apache/echarts
echartsJS: echarts@6.1.0/dist/echarts.min.js
# @fortawesome/fontawesome-free@7.3.0 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@7.3.0/css/all.min.css'
# @fortawesome/fontawesome-free@7.3.1 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@7.3.1/css/all.min.css'
# gitalk@1.8.0 https://github.com/gitalk/gitalk
gitalkCSS: gitalk@1.8.0/dist/gitalk.min.css
gitalkJS: gitalk@1.8.0/dist/gitalk.min.js
@@ -36,25 +36,25 @@ libFiles:
instantPage: instant.page@5.2.0/instantpage.min.js
# json-viewer-element@1.0.6 https://github.com/Lruihao/json-viewer-element
jsonViewerElementJS: json-viewer-element@1.0.6/dist/json-viewer-element.umd.js
# katex@0.17.0 https://github.com/KaTeX/KaTeX
katexCopyTexJS: katex@0.17.0/dist/contrib/copy-tex.min.js
katexCSS: katex@0.17.0/dist/katex.min.css
# katex@0.18.1 https://github.com/KaTeX/KaTeX
katexCopyTexJS: katex@0.18.1/dist/contrib/copy-tex.min.js
katexCSS: katex@0.18.1/dist/katex.min.css
# lightgallery@2.9.0 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.9.0/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.9.0/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.9.0/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.9.0/plugins/zoom/lg-zoom.min.js
# mapbox-gl@3.25.0 https://docs.mapbox.com/mapbox-gl-js
mapboxGLCSS: mapbox-gl@3.25.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@3.25.0/dist/mapbox-gl.js
# mapbox-gl@3.27.0 https://docs.mapbox.com/mapbox-gl-js
mapboxGLCSS: mapbox-gl@3.27.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@3.27.0/dist/mapbox-gl.js
# meting@2.0.2 https://github.com/metowolf/MetingJS
metingJS: meting@2.0.2/dist/Meting.min.js
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# pangu@7.2.1 https://github.com/vinta/pangu.js
panguJS: pangu@7.2.1/dist/browser/pangu.min.js
# pangu@9.1.0 https://github.com/vinta/pangu.js
panguJS: pangu@9.1.0/dist/browser/pangu.min.js
# @panzoom/panzoom@4.6.2 https://github.com/timmywil/panzoom
panzoomJS: '@panzoom/panzoom@4.6.2/dist/panzoom.min.js'
# sharer.js@0.5.4 https://github.com/ellisonleao/sharer.js
@@ -63,8 +63,8 @@ libFiles:
tabContainerElementJS: '@github/tab-container-element@4.8.2/dist/bundle.min.js'
# twemoji@14.0.2 https://github.com/twitter/twemoji
twemojiJS: twemoji@14.0.2/dist/twemoji.min.js
# twikoo@1.7.13 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.7.13/dist/twikoo.all.min.js
# twikoo@1.7.15 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.7.15/dist/twikoo.all.min.js
# typeit@8.8.7 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.8.7/dist/index.umd.js
# valine@1.5.3 https://github.com/xCss/Valine
+14 -14
View File
@@ -6,8 +6,8 @@ prefix:
# simple-icons@16.24.1 https://github.com/simple-icons/simple-icons
simpleIcons: https://unpkg.com/simple-icons@16.24.1/icons/
libFiles:
# algoliasearch@5.55.1 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@5.55.1/dist/lite/builds/browser.umd.js
# algoliasearch@5.56.0 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@5.56.0/dist/lite/builds/browser.umd.js
# animate.css@4.1.1 https://github.com/daneden/animate.css
animateCSS: animate.css@4.1.1/animate.min.css
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
@@ -27,8 +27,8 @@ libFiles:
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# echarts@6.1.0 https://github.com/apache/echarts
echartsJS: echarts@6.1.0/dist/echarts.min.js
# @fortawesome/fontawesome-free@7.3.0 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@7.3.0/css/all.min.css'
# @fortawesome/fontawesome-free@7.3.1 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@7.3.1/css/all.min.css'
# gitalk@1.8.0 https://github.com/gitalk/gitalk
gitalkCSS: gitalk@1.8.0/dist/gitalk.min.css
gitalkJS: gitalk@1.8.0/dist/gitalk.min.js
@@ -36,25 +36,25 @@ libFiles:
instantPage: instant.page@5.2.0/instantpage.js
# json-viewer-element@1.0.6 https://github.com/Lruihao/json-viewer-element
jsonViewerElementJS: json-viewer-element@1.0.6/dist/json-viewer-element.umd.js
# katex@0.17.0 https://github.com/KaTeX/KaTeX
katexCopyTexJS: katex@0.17.0/dist/contrib/copy-tex.min.js
katexCSS: katex@0.17.0/dist/katex.min.css
# katex@0.18.1 https://github.com/KaTeX/KaTeX
katexCopyTexJS: katex@0.18.1/dist/contrib/copy-tex.min.js
katexCSS: katex@0.18.1/dist/katex.min.css
# lightgallery@2.9.0 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.9.0/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.9.0/lightgallery.min.js
lightgalleryThumbnailJS: lightgallery@2.9.0/plugins/thumbnail/lg-thumbnail.min.js
lightgalleryZoomJS: lightgallery@2.9.0/plugins/zoom/lg-zoom.min.js
# mapbox-gl@3.25.0 https://docs.mapbox.com/mapbox-gl-js
mapboxGLCSS: mapbox-gl@3.25.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@3.25.0/dist/mapbox-gl.js
# mapbox-gl@3.27.0 https://docs.mapbox.com/mapbox-gl-js
mapboxGLCSS: mapbox-gl@3.27.0/dist/mapbox-gl.css
mapboxGLJS: mapbox-gl@3.27.0/dist/mapbox-gl.js
# meting@2.0.2 https://github.com/metowolf/MetingJS
metingJS: meting@2.0.2/dist/Meting.min.js
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# pangu@7.2.1 https://github.com/vinta/pangu.js
panguJS: pangu@7.2.1/dist/browser/pangu.min.js
# pangu@9.1.0 https://github.com/vinta/pangu.js
panguJS: pangu@9.1.0/dist/browser/pangu.min.js
# @panzoom/panzoom@4.6.2 https://github.com/timmywil/panzoom
panzoomJS: '@panzoom/panzoom@4.6.2/dist/panzoom.min.js'
# sharer.js@0.5.4 https://github.com/ellisonleao/sharer.js
@@ -63,8 +63,8 @@ libFiles:
tabContainerElementJS: '@github/tab-container-element@4.8.2/dist/bundle.min.js'
# twemoji@14.0.2 https://github.com/twitter/twemoji
twemojiJS: twemoji@14.0.2/dist/twemoji.min.js
# twikoo@1.7.13 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.7.13/dist/twikoo.all.min.js
# twikoo@1.7.15 https://github.com/imaegoo/twikoo
twikooJS: twikoo@1.7.15/dist/twikoo.all.min.js
# typeit@8.8.7 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.8.7/dist/index.umd.js
# valine@1.5.3 https://github.com/xCss/Valine
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+39 -26
View File
@@ -1,5 +1,5 @@
/**
* Fuse.js v7.4.2 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v7.5.0 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2026 Kiro Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
@@ -186,19 +186,23 @@ const Config = Object.freeze({
//#endregion
//#region src/tools/fieldNorm.ts
function isWordSeparator(code) {
return code >= 9 && code <= 13 || code === 32 || code === 160;
}
function norm(weight = 1, mantissa = 3) {
const cache = /* @__PURE__ */ new Map();
const m = Math.pow(10, mantissa);
return {
get(value) {
let numTokens = 1;
let inSpace = false;
for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) === 32) {
if (!inSpace) {
let numTokens = 0;
let inWord = false;
for (let i = 0; i < value.length; i++) if (!isWordSeparator(value.charCodeAt(i))) {
if (!inWord) {
numTokens++;
inSpace = true;
inWord = true;
}
} else inSpace = false;
} else inWord = false;
if (numTokens === 0) numTokens = 1;
if (cache.has(numTokens)) return cache.get(numTokens);
const n = Math.round(m / Math.pow(numTokens, .5 * weight)) / m;
cache.set(numTokens, n);
@@ -570,6 +574,10 @@ var BitapSearch = class {
text = isCaseSensitive ? text : text.toLowerCase();
text = ignoreDiacritics ? stripDiacritics(text) : text;
if (this.pattern === text) {
if (text.length < this.options.minMatchCharLength) return {
isMatch: false,
score: 1
};
const result = {
isMatch: true,
score: 0
@@ -995,33 +1003,31 @@ function computeScore(results, { ignoreFieldNorm = Config.ignoreFieldNorm }) {
//#endregion
//#region src/tools/MaxHeap.ts
var MaxHeap = class {
constructor(limit) {
constructor(limit, comparator) {
this.limit = limit;
this.heap = [];
this.comparator = comparator;
}
get size() {
return this.heap.length;
}
shouldInsert(score) {
return this.size < this.limit || score < this.heap[0].score;
}
insert(item) {
if (this.size < this.limit) {
this.heap.push(item);
this._bubbleUp(this.size - 1);
} else if (item.score < this.heap[0].score) {
} else if (this.comparator(item, this.heap[0]) < 0) {
this.heap[0] = item;
this._sinkDown(0);
}
}
extractSorted(sortFn) {
return this.heap.sort(sortFn);
extractSorted() {
return this.heap.sort(this.comparator);
}
_bubbleUp(i) {
const heap = this.heap;
while (i > 0) {
const parent = i - 1 >> 1;
if (heap[i].score <= heap[parent].score) break;
if (this.comparator(heap[i], heap[parent]) <= 0) break;
const tmp = heap[i];
heap[i] = heap[parent];
heap[parent] = tmp;
@@ -1036,8 +1042,8 @@ var MaxHeap = class {
i = largest;
const left = 2 * i + 1;
const right = 2 * i + 2;
if (left < len && heap[left].score > heap[largest].score) largest = left;
if (right < len && heap[right].score > heap[largest].score) largest = right;
if (left < len && this.comparator(heap[left], heap[largest]) > 0) largest = left;
if (right < len && this.comparator(heap[right], heap[largest]) > 0) largest = right;
if (largest !== i) {
const tmp = heap[i];
heap[i] = heap[largest];
@@ -1368,6 +1374,9 @@ var Fuse = class {
getIndex() {
return this._myIndex;
}
_normalizedKeys() {
return this._myIndex.keys.map((key) => this._keyStore.get(key.id) || key);
}
search(query, options) {
const { limit = -1 } = options || {};
const { includeMatches, includeScore, shouldSort, sortFn, ignoreFieldNorm } = this.options;
@@ -1379,10 +1388,12 @@ var Fuse = class {
if (isNumber(limit) && limit > -1) docs = docs.slice(0, limit);
return docs;
}
const useHeap = isNumber(limit) && limit > 0 && isString(query);
const useHeap = shouldSort && isNumber(limit) && limit > 0 && isString(query);
const comparator = sortFn;
const stable = (a, b) => comparator(a, b) || a.idx - b.idx;
let results;
if (useHeap) {
const heap = new MaxHeap(limit);
const heap = new MaxHeap(limit, stable);
if (isString(this._docs[0])) this._searchStringList(query, {
heap,
ignoreFieldNorm
@@ -1391,11 +1402,11 @@ var Fuse = class {
heap,
ignoreFieldNorm
});
results = heap.extractSorted(sortFn);
results = heap.extractSorted();
} else {
results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore(results, { ignoreFieldNorm });
if (shouldSort) results.sort(sortFn);
if (shouldSort) results.sort(isString(query) ? stable : comparator);
if (isNumber(limit) && limit > -1) results = results.slice(0, limit);
}
return format(results, this._docs, {
@@ -1432,7 +1443,7 @@ var Fuse = class {
};
if (heap) {
result.score = computeScoreSingle(result.matches, { ignoreFieldNorm });
if (heap.shouldInsert(result.score)) heap.insert(result);
heap.insert(result);
} else results.push(result);
}
}
@@ -1441,13 +1452,14 @@ var Fuse = class {
}
_searchLogical(query) {
const expression = parse(query, this.options);
const keys = this._normalizedKeys();
const evaluate = (node, item, idx) => {
if (!("children" in node)) {
const { keyId, searcher } = node;
let matches;
if (keyId === null) {
matches = [];
this._myIndex.keys.forEach((key, keyIndex) => {
keys.forEach((key, keyIndex) => {
matches.push(...this._findMatches({
key,
value: item[keyIndex],
@@ -1502,7 +1514,8 @@ var Fuse = class {
_searchObjectList(query, { heap, ignoreFieldNorm } = {}) {
const searcher = this._getSearcher(query);
const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
const { keys, records } = this._myIndex;
const { records } = this._myIndex;
const keys = this._normalizedKeys();
const results = heap ? null : [];
records.forEach(({ $: item, i: idx }) => {
if (!isDefined(item)) return;
@@ -1529,7 +1542,7 @@ var Fuse = class {
};
if (heap) {
result.score = computeScoreSingle(result.matches, { ignoreFieldNorm });
if (heap.shouldInsert(result.score)) heap.insert(result);
heap.insert(result);
} else results.push(result);
}
});
@@ -1600,7 +1613,7 @@ var Fuse = class {
//#endregion
//#region src/entry.ts
Fuse.version = "7.4.2";
Fuse.version = "7.5.0";
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+26 -6
View File
File diff suppressed because one or more lines are too long
+839 -899
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+7 -7
View File
@@ -8,7 +8,7 @@ libraries:
- from: dist/umd/index.production.js
to: autocomplete-js/index.production.js
- npm: algoliasearch
version: 5.55.1
version: 5.56.0
local:
items:
- from: dist/lite/builds/browser.umd.js
@@ -54,7 +54,7 @@ libraries:
- from: dist/echarts.min.js
to: echarts/echarts.min.js
- npm: '@fortawesome/fontawesome-free'
version: 7.3.0
version: 7.3.1
local:
items:
- from: css/all.min.css
@@ -65,7 +65,7 @@ libraries:
baseDir: static/lib
clean: true
- npm: fuse.js
version: 7.4.2
version: 7.5.0
local:
items:
- from: dist/fuse.mjs
@@ -91,7 +91,7 @@ libraries:
- from: dist/json-viewer-element.umd.js
to: json-viewer-element/json-viewer-element.umd.js
- npm: katex
version: 0.17.0
version: 0.18.1
local:
items:
- from: dist/contrib/copy-tex.min.js
@@ -126,7 +126,7 @@ libraries:
baseDir: static/lib
clean: true
- npm: mapbox-gl
version: 3.25.0
version: 3.27.0
local:
items:
- from: dist/mapbox-gl.css
@@ -146,7 +146,7 @@ libraries:
- from: pace.min.js
to: pace/pace.min.js
- npm: pangu
version: 7.2.1
version: 9.1.0
local:
items:
- from: dist/browser/pangu.umd.js
@@ -184,7 +184,7 @@ libraries:
- from: dist/twemoji.min.js
to: twemoji/twemoji.min.js
- npm: twikoo
version: 1.7.13
version: 1.7.15
local:
items:
- from: dist/twikoo.all.min.js
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.