-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
353 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,4 +133,5 @@ data/ | |
|
||
docs/.vitepress/dist | ||
docs/.vitepress/cache | ||
docs/generated | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Theme from 'vitepress/theme' | ||
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' | ||
import '@shikijs/vitepress-twoslash/style.css' | ||
import type { EnhanceAppContext } from 'vitepress' | ||
|
||
export default { | ||
extends: Theme, | ||
enhanceApp({ app }: EnhanceAppContext) { | ||
app.use(TwoslashFloatingVue) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
### useWebAppBackButton | ||
|
||
```ts | ||
```ts twoslash | ||
// Hover to inspect type | ||
import { useWebAppBackButton } from 'vue-tg' | ||
``` | ||
|
||
▸ **useWebAppBackButton**(): `Object` | ||
|
||
#### Returns | ||
|
||
| Name | Type | | ||
| :-------------------- | :----------------------------------- | | ||
| `hideBackButton` | `() => void` | | ||
| `isBackButtonVisible` | `Ref<boolean>` | | ||
| `onBackButtonClicked` | `(eventHandler: () => void) => void` | | ||
| `showBackButton` | `() => void` | | ||
| Name | Description | | ||
| :-------------------- | :-------------------------------------------------------------------------------------------------------------------- | | ||
| `isBackButtonVisible` | <!--@include: @/generated/BackButton-isVisible.md --> <br/> <Badge type="info" text="⚡️ reactive" /> | | ||
| `onBackButtonClicked` | <Badge type="tip" text="Bot API 6.1+" /> A method that sets the `backButtonClicked` [event handler](#event-handling). | | ||
| `showBackButton` | <!--@include: @/generated/BackButton-show.md --> | | ||
| `hideBackButton` | <!--@include: @/generated/BackButton-hide.md --> | |
41 changes: 19 additions & 22 deletions
41
docs/mini-apps/composables/use-web-app-biometric-manager.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
### useWebAppBiometricManager | ||
|
||
```ts | ||
```ts twoslash | ||
// Hover to inspect type | ||
import { useWebAppBiometricManager } from 'vue-tg' | ||
``` | ||
|
||
▸ **useWebAppBiometricManager**(): `Object` | ||
|
||
#### Returns | ||
|
||
| Name | Type | | ||
| :--------------------------- | :---------------------------------------------------------------------------------------------------------------------- | | ||
| `isBiometricInited` | `Readonly<Ref<boolean>>` | | ||
| `isBiometricAvailable` | `Readonly<Ref<boolean>>` | | ||
| `biometricType` | `Readonly<Ref<"finger" \| "face" \| "unknown">>` | | ||
| `isBiometricAccessRequested` | `Readonly<Ref<boolean>>` | | ||
| `isBiometricAccessGranted` | `Readonly<Ref<boolean>>` | | ||
| `isBiometricTokenSaved` | `Readonly<Ref<boolean>>` | | ||
| `biometricDeviceId` | `Readonly<Ref<string>>` | | ||
| `initBiometric` | `(callback?: () => void) => void` | | ||
| `requestBiometricAccess` | `(params: BiometricRequestAccessParams, callback?: (isAccessGranted: boolean) => void) => void` | | ||
| `authenticateBiometric` | `(params: BiometricAuthenticateParams, callback?: (isAuthenticated: boolean, biometricToken?: string) => void) => void` | | ||
| `updateBiometricToken` | `(token: string, callback?: (applied: boolean) => void) => void` | | ||
| `openBiometricSettings` | `() => void` | | ||
| `onBiometricManagerUpdated` | `(eventHandler: () => void) => void` | | ||
| `onBiometricAuthRequested` | `(eventHandler: `[`OnBiometricAuthRequested`](#onbiometricauthrequested)`)) => void` | | ||
| `onBiometricTokenUpdated` | `(eventHandler: `[`OnBiometricTokenUpdated`](#onbiometrictokenupdated)`)) => void` | | ||
| Name | Type | | ||
| :--------------------------- | :---------------------------------------------------------------------------------------------------------------------------- | | ||
| `isBiometricInited` | <!--@include: @/generated/BiometricManager-isInited.md --> <br/> <Badge type="info" text="⚡️ readonly reactive" /> | | ||
| `isBiometricAvailable` | <!--@include: @/generated/BiometricManager-isBiometricAvailable.md --> <br/> <Badge type="info" text="⚡️ readonly reactive" /> | | ||
| `biometricType` | <!--@include: @/generated/BiometricManager-biometricType.md --><br/> <Badge type="info" text="⚡️ readonly reactive" /> | | ||
| `isBiometricAccessRequested` | <!--@include: @/generated/BiometricManager-isAccessRequested.md --><br/> <Badge type="info" text="⚡️ readonly reactive" /> | | ||
| `isBiometricAccessGranted` | <!--@include: @/generated/BiometricManager-isAccessGranted.md --><br/> <Badge type="info" text="⚡️ readonly reactive" /> | | ||
| `isBiometricTokenSaved` | <!--@include: @/generated/BiometricManager-isBiometricTokenSaved.md --><br/> <Badge type="info" text="⚡️ readonly reactive" /> | | ||
| `biometricDeviceId` | <!--@include: @/generated/BiometricManager-deviceId.md --><br/> <Badge type="info" text="⚡️ readonly reactive" /> | | ||
| `initBiometric` | <!--@include: @/generated/BiometricManager-init.md --> | | ||
| `requestBiometricAccess` | <!--@include: @/generated/BiometricManager-requestAccess.md --> | | ||
| `authenticateBiometric` | <!--@include: @/generated/BiometricManager-authenticate.md --> | | ||
| `updateBiometricToken` | <!--@include: @/generated/BiometricManager-updateBiometricToken.md --> | | ||
| `openBiometricSettings` | <!--@include: @/generated/BiometricManager-openSettings.md --> | | ||
| `onBiometricManagerUpdated` | <Badge type="tip" text="Bot API 7.2+" /> A method that sets the `biometricManagerUpdated` [event handler](#event-handling). | | ||
| `onBiometricAuthRequested` | <Badge type="tip" text="Bot API 7.2+" /> A method that sets the `biometricAuthRequested` [event handler](#event-handling). | | ||
| `onBiometricTokenUpdated` | <Badge type="tip" text="Bot API 7.2+" /> A method that sets the `biometricTokenUpdated` [event handler](#event-handling). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
### useWebAppClipboard | ||
|
||
```ts | ||
```ts twoslash | ||
// Hover to inspect type | ||
import { useWebAppClipboard } from 'vue-tg' | ||
``` | ||
|
||
▸ **useWebAppClipboard**(): `Object` | ||
|
||
#### Returns | ||
|
||
| Name | Type | | ||
| :------------------------ | :------------------------------------------------------------------------------------------------ | | ||
| `onClipboardTextReceived` | `(eventHandler:` [`OnClipboardTextReceivedCallback`](#onclipboardtextreceivedcallback)`) => void` | | ||
| `readTextFromClipboard` | `(callback?: (data: null \| string) => void) => void` | | ||
| Name | Type | | ||
| :------------------------ | :------------------------------------------------------------------------------------------------------------------------ | | ||
| `onClipboardTextReceived` | <Badge type="tip" text="Bot API 6.4+" /> A method that sets the `clipboardTextReceived` [event handler](#event-handling). | | ||
| `readTextFromClipboard` | <!--@include: @/generated/WebApp-readTextFromClipboard.md --> | |
17 changes: 7 additions & 10 deletions
17
docs/mini-apps/composables/use-web-app-closing-confirmation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
### useWebAppClosingConfirmation | ||
|
||
```ts | ||
```ts twoslash | ||
// Hover to inspect type | ||
import { useWebAppClosingConfirmation } from 'vue-tg' | ||
``` | ||
|
||
▸ **useWebAppClosingConfirmation**(): `Object` | ||
|
||
#### Returns | ||
|
||
| Name | Type | | ||
| :----------------------------- | :------------- | | ||
| `disableClosingConfirmation` | `() => void` | | ||
| `enableClosingConfirmation` | `() => void` | | ||
| `isClosingConfirmationEnabled` | `Ref<boolean>` | | ||
| Name | Type | | ||
| :----------------------------- | :----------------------------------------------------------------------------------------------------------------- | | ||
| `isClosingConfirmationEnabled` | <!--@include: @/generated/WebApp-isClosingConfirmationEnabled.md --> <br/> <Badge type="info" text="⚡️ reactive" /> | | ||
| `enableClosingConfirmation` | <!--@include: @/generated/WebApp-enableClosingConfirmation.md --> | | ||
| `disableClosingConfirmation` | <!--@include: @/generated/WebApp-disableClosingConfirmation.md --> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
### useWebAppCloudStorage | ||
|
||
```ts | ||
```ts twoslash | ||
// Hover to inspect type | ||
import { useWebAppCloudStorage } from 'vue-tg' | ||
``` | ||
|
||
▸ **useWebAppCloudStorage**(): `Object` | ||
|
||
#### Returns | ||
|
||
| Name | Type | | ||
| :------------------- | :------------------------------------------------------ | | ||
| `getStorageItem` | `(key: string) => Promise<null \| string>` | | ||
| `getStorageItems` | `(keys: string[]) => Promise<Record<string, string>>` | | ||
| `getStorageKeys` | `() => Promise<string[]>` | | ||
| `removeStorageItem` | `(key: string) => Promise<null \| true>` | | ||
| `removeStorageItems` | `(keys: string[]) => Promise<null \| true>` | | ||
| `setStorageItem` | `(key: string, value: string) => Promise<null \| true>` | | ||
| Name | Type | | ||
| :------------------- | :-------------------------------------------------------- | | ||
| `setStorageItem` | <!--@include: @/generated/CloudStorage-setItem.md --> | | ||
| `getStorageItem` | <!--@include: @/generated/CloudStorage-getItem.md --> | | ||
| `getStorageItems` | <!--@include: @/generated/CloudStorage-getItems.md --> | | ||
| `removeStorageItem` | <!--@include: @/generated/CloudStorage-removeItem.md --> | | ||
| `removeStorageItems` | <!--@include: @/generated/CloudStorage-removeItems.md --> | | ||
| `getStorageKeys` | <!--@include: @/generated/CloudStorage-getKeys.md --> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
### useWebAppHapticFeedback | ||
|
||
```ts | ||
```ts twoslash | ||
// Hover to inspect type | ||
import { useWebAppHapticFeedback } from 'vue-tg' | ||
``` | ||
|
||
▸ **useWebAppHapticFeedback**(): `Object` | ||
|
||
#### Returns | ||
|
||
| Name | Type | | ||
| :--------------------- | :--------------------------------------------------------------------------- | | ||
| `impactOccurred` | `(style: "light" \| "medium" \| "heavy" \| "rigid" \| "soft") => () => void` | | ||
| `notificationOccurred` | `(type: "error" \| "success" \| "warning") => () => void` | | ||
| `selectionChanged` | `() => void` | | ||
| Name | Type | | ||
| :--------------------- | :------------------------------------------------------------------- | | ||
| `impactOccurred` | <!--@include: @/generated/HapticFeedback-impactOccurred.md --> | | ||
| `notificationOccurred` | <!--@include: @/generated/HapticFeedback-notificationOccurred.md --> | | ||
| `selectionChanged` | <!--@include: @/generated/HapticFeedback-selectionChanged.md --> | |
Oops, something went wrong.