Releases: deptyped/vue-telegram
0.10.0
0.9.0
What's Changed
- Added support for Bot API 9.1
- Added FullscreenViewport component
- Added SecondaryButton component
- Introduced a new API that enforces runtime feature support checks to prevent errors on clients with outdated Bot API support:
const deviceStorage = useDeviceStorage()
// ❌ Type error:
// 'getItem' may not be available — DeviceStorage was introduced in Bot API 9.0
deviceStorage.getItem('token')
if (deviceStorage.isVersionAtLeast('9.0')) {
// ✅ Safe to use
deviceStorage.getItem('token')
}You can opt out of these checks or define a minimum required Bot API version, which disables warnings for features introduced up to that version. See Version Check in the docs for more.
- Added support for async method calls, enabling cleaner control flow:
const miniApp = useMiniApp()
const qrScanner = useQrScanner()
const popup = usePopup()
const url = await qrScanner.show({ text: 'Scan URL' })
const ok = await popup.showConfirm(`Open ${url}?`)
if (ok) {
miniApp.openLink(url)
}⚠️ Breaking changes coming
The old API is still available but marked as deprecated and will be removed in upcoming releases.
0.8.0
0.7.0
What's Changed
-
Added support for Bot API 7.7 in #28
- Added
isVerticalSwipesEnabled,enableVerticalSwipes,disableVerticalSwipesto useWebAppViewport. - Added
onScanQrPopupClosedto useWebAppQrScanner. - ExpandedViewport component in force-mode now also disables vertical swipes.
- Added
-
Added
isFeatureSupportedhelper to useWebApp in #32Usage example:
<script lang="ts" setup> import { useWebApp, useWebAppViewport } from 'vue-tg' const { isFeatureSupported } = useWebApp() const { disableVerticalSwipes } = useWebAppViewport() if (isFeatureSupported('DisableVerticalSwipes')) { disableVerticalSwipes() } else { // some kind of fallback or alert } </script>
ClosingConfirmation,CloudStorage,RequestWriteAccess,RequestContact,SettingsButton,BiometricManager,DisableVerticalSwipesfeatures are available to check. -
Improved types for
isPlatformhelper, added type hints for all official Telegram apps. -
Added Nuxt 3 setup to docs by @IAMSDR in #24
- Available in the documentation: https://vue-tg.deptyped.com/installation.html#using-with-nuxt-3
-
Breaking Change: Removed default export for plugin, use named import for
VueTelegramPlugin:-import VueTelegramPlugin from 'vue-tg' +import { VueTelegramPlugin } from 'vue-tg'
Full Changelog: 0.6.1...0.7.0
0.6.1
Full Changelog: 0.6.0...0.6.1
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
Full Changelog: https://github.com/deptyped/vue-telegram/commits/0.2.0