From ae88d14c7dff16ecf4f74399d01e5b40b0b77514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?He=CC=84sperus?= Date: Tue, 24 Mar 2026 02:54:27 +0800 Subject: [PATCH 1/2] chore(docs): correct some outdated usage in docs --- TODO.md | 6 +- docs/.vitepress/config.ts | 5 +- docs/.vitepress/theme/env.d.ts | 1 + docs/components/playground.vue | 5 +- docs/en/basic/types.md | 4 +- docs/en/basic/use-pointeract.md | 16 +- package.json | 30 +- pnpm-lock.yaml | 1703 ++++++++++++++++--------------- src/modules/Swipe.ts | 12 + 9 files changed, 943 insertions(+), 839 deletions(-) create mode 100644 docs/.vitepress/theme/env.d.ts diff --git a/TODO.md b/TODO.md index d1881db..f80152f 100644 --- a/TODO.md +++ b/TODO.md @@ -3,6 +3,6 @@ This file is used to show the current focus of maintainers, your contributions are not limited to these tasks. - [x] transform to adapt modularity practice (main class maintains `pointers` map only, other imports share map and register hooks) -- [ ] add rotate functionality to `multiPointer_zanZoom`. -- [ ] support multi-element init, add / remove monitoring element and API. -- [ ] prototype `PointeractManager`. +- [x] implement `Swipe` module and event. +- [ ] add rotate functionality to `MultiTouchPanZoom`. +- [ ] prototype `PointeractManager` that supports multi-element init, add / remove monitoring element and API. diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index bf5ea91..efcc1a1 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -3,7 +3,8 @@ import { defineConfig } from 'vitepress'; import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'; import { ThemeConfig } from 'vitepress-theme-trito'; -// https://vitepress.dev/reference/site-config +const inDev = process.env.MODE === 'dev'; + export default defineConfig({ cleanUrls: true, lastUpdated: true, @@ -20,7 +21,7 @@ export default defineConfig({ 'script', { defer: '', - src: 'https://analytics.consensia.cc/script.js', + src: inDev ? '' : 'https://analytics.consensia.cc/script.js', 'data-website-id': 'f4ddf973-093c-4660-bda7-65a511d5b26c', }, ], diff --git a/docs/.vitepress/theme/env.d.ts b/docs/.vitepress/theme/env.d.ts new file mode 100644 index 0000000..6a375b7 --- /dev/null +++ b/docs/.vitepress/theme/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/docs/components/playground.vue b/docs/components/playground.vue index 5f34629..32141da 100644 --- a/docs/components/playground.vue +++ b/docs/components/playground.vue @@ -11,7 +11,6 @@