From b85a6efe95693c331568c1e9c208d085bbe0ec85 Mon Sep 17 00:00:00 2001 From: VK ID Date: Fri, 16 Feb 2024 12:15:25 +0300 Subject: [PATCH] Release v1.1.0 --- .eslintrc-ts.js | 2 + .github/ISSUE_TEMPLATE/bug_report.yml | 55 + .github/ISSUE_TEMPLATE/documentation.yml | 12 + .github/ISSUE_TEMPLATE/feature_request.yml | 17 + .husky/pre-commit | 2 +- .wiki/README.md | 124 -- .wiki/classes/auth.Auth.md | 47 - .wiki/classes/core_config.Config.md | 48 - .../widgets_floatingOneTap.FloatingOneTap.md | 165 -- .wiki/classes/widgets_oauthList.OAuthList.md | 165 -- .wiki/classes/widgets_oneTap.OneTap.md | 165 -- .wiki/enums/auth.AuthErrorCode.md | 46 - .wiki/enums/types.Languages.md | 66 - .wiki/enums/types.Scheme.md | 24 - ..._floatingOneTap.FloatingOneTapContentId.md | 64 - .wiki/enums/widgets_oauthList.OAuthName.md | 31 - .wiki/interfaces/auth.AuthError.md | 37 - .wiki/interfaces/auth.AuthParams.md | 28 - .wiki/interfaces/auth.AuthResponse.md | 37 - .wiki/interfaces/core_config.ConfigData.md | 31 - ...ets_floatingOneTap.FloatingOneTapIndent.md | 37 - ...ets_floatingOneTap.FloatingOneTapParams.md | 87 -- .../widgets_oauthList.OAuthListParams.md | 73 - .../widgets_oauthList.OAuthListStyles.md | 28 - .../interfaces/widgets_oneTap.OneTapParams.md | 91 -- .../interfaces/widgets_oneTap.OneTapStyles.md | 37 - .wiki/modules.md | 14 - .wiki/modules/auth.md | 19 - .wiki/modules/core_config.md | 13 - .wiki/modules/types.md | 10 - .wiki/modules/widgets_floatingOneTap.md | 18 - .wiki/modules/widgets_oauthList.md | 18 - .wiki/modules/widgets_oneTap.md | 14 - CHANGELOG.md | 10 + CONTRIBUTING.md | 2 +- README.md | 4 +- __tests__/auth/auth.tests.ts | 125 +- __tests__/auth/authDataService.tests.ts | 100 ++ .../core/dataService/dataService.tests.ts | 60 + __tests__/jest-global-mock.js | 6 + __tests__/widgets/oneTap/oneTap.tests.ts | 6 +- demo/index.html | 79 +- demo/index.ts | 161 +- demo/styles.css | 66 +- demo/styles/button.css | 4 +- demo/styles/snackbar.css | 8 +- demo/styles/variables.css | 34 +- demo/types.ts | 16 + demo/utils/createModule.ts | 61 + demo/utils/handleAuth.ts | 17 + demo/utils/initAuthButtons.ts | 46 + demo/utils/initFloatingOneTap.ts | 18 + demo/utils/initModuleEnabledList.ts | 18 + demo/utils/initModuleParamsList.ts | 82 + demo/utils/initOauthList.ts | 17 + demo/utils/initOneTap.ts | 17 + demo/utils/localstorage.ts | 36 + {.wiki => docs}/.nojekyll | 0 docs/assets/highlight.css | 113 ++ docs/assets/main.js | 58 + docs/assets/search.js | 1 + docs/assets/style.css | 1367 +++++++++++++++++ docs/classes/auth.Auth.html | 127 ++ docs/classes/core_config.Config.html | 135 ++ ...widgets_floatingOneTap.FloatingOneTap.html | 190 +++ docs/classes/widgets_oauthList.OAuthList.html | 190 +++ docs/classes/widgets_oneTap.OneTap.html | 190 +++ docs/enums/auth.AuthErrorCode.html | 125 ++ docs/enums/core_config.ConfigAuthMode.html | 107 ++ docs/enums/types.Languages.html | 137 ++ docs/enums/types.Scheme.html | 107 ++ ...loatingOneTap.FloatingOneTapContentId.html | 139 ++ docs/enums/widgets_oauthList.OAuthName.html | 112 ++ docs/enums/widgets_oneTap.OneTapSkin.html | 107 ++ docs/index.html | 164 ++ docs/interfaces/auth.AuthError.html | 122 ++ docs/interfaces/auth.AuthParams.html | 115 ++ docs/interfaces/auth.AuthResponse.html | 122 ++ docs/interfaces/core_config.ConfigData.html | 121 ++ ...s_floatingOneTap.FloatingOneTapIndent.html | 122 ++ ...s_floatingOneTap.FloatingOneTapParams.html | 154 ++ .../widgets_oauthList.OAuthListParams.html | 141 ++ .../widgets_oauthList.OAuthListStyles.html | 115 ++ .../widgets_oneTap.OneTapParams.html | 155 ++ .../widgets_oneTap.OneTapStyles.html | 122 ++ docs/modules/auth.html | 99 ++ docs/modules/core_config.html | 97 ++ docs/modules/types.html | 90 ++ docs/modules/widgets_floatingOneTap.html | 98 ++ docs/modules/widgets_oauthList.html | 98 ++ docs/modules/widgets_oneTap.html | 98 ++ package.json | 18 +- src/auth/auth.ts | 101 +- src/auth/authDataService.ts | 45 + src/auth/index.ts | 3 +- src/auth/types.ts | 2 + src/core/config/config.ts | 3 +- src/core/config/index.ts | 1 + src/core/config/types.ts | 6 + src/core/dataService/dataService.ts | 35 + src/core/dataService/index.ts | 1 + src/core/widget/widget.ts | 6 + src/index.ts | 10 +- src/utils/url.ts | 2 +- src/widgets/floatingOneTap/template.ts | 86 +- src/widgets/oauthList/template.ts | 18 +- src/widgets/oneTap/index.ts | 2 +- src/widgets/oneTap/template.ts | 110 +- src/widgets/oneTap/types.ts | 7 +- yarn.lock | 36 +- 110 files changed, 6418 insertions(+), 1930 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/documentation.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 .wiki/README.md delete mode 100644 .wiki/classes/auth.Auth.md delete mode 100644 .wiki/classes/core_config.Config.md delete mode 100644 .wiki/classes/widgets_floatingOneTap.FloatingOneTap.md delete mode 100644 .wiki/classes/widgets_oauthList.OAuthList.md delete mode 100644 .wiki/classes/widgets_oneTap.OneTap.md delete mode 100644 .wiki/enums/auth.AuthErrorCode.md delete mode 100644 .wiki/enums/types.Languages.md delete mode 100644 .wiki/enums/types.Scheme.md delete mode 100644 .wiki/enums/widgets_floatingOneTap.FloatingOneTapContentId.md delete mode 100644 .wiki/enums/widgets_oauthList.OAuthName.md delete mode 100644 .wiki/interfaces/auth.AuthError.md delete mode 100644 .wiki/interfaces/auth.AuthParams.md delete mode 100644 .wiki/interfaces/auth.AuthResponse.md delete mode 100644 .wiki/interfaces/core_config.ConfigData.md delete mode 100644 .wiki/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.md delete mode 100644 .wiki/interfaces/widgets_floatingOneTap.FloatingOneTapParams.md delete mode 100644 .wiki/interfaces/widgets_oauthList.OAuthListParams.md delete mode 100644 .wiki/interfaces/widgets_oauthList.OAuthListStyles.md delete mode 100644 .wiki/interfaces/widgets_oneTap.OneTapParams.md delete mode 100644 .wiki/interfaces/widgets_oneTap.OneTapStyles.md delete mode 100644 .wiki/modules.md delete mode 100644 .wiki/modules/auth.md delete mode 100644 .wiki/modules/core_config.md delete mode 100644 .wiki/modules/types.md delete mode 100644 .wiki/modules/widgets_floatingOneTap.md delete mode 100644 .wiki/modules/widgets_oauthList.md delete mode 100644 .wiki/modules/widgets_oneTap.md create mode 100644 __tests__/auth/authDataService.tests.ts create mode 100644 __tests__/core/dataService/dataService.tests.ts create mode 100644 demo/types.ts create mode 100644 demo/utils/createModule.ts create mode 100644 demo/utils/handleAuth.ts create mode 100644 demo/utils/initAuthButtons.ts create mode 100644 demo/utils/initFloatingOneTap.ts create mode 100644 demo/utils/initModuleEnabledList.ts create mode 100644 demo/utils/initModuleParamsList.ts create mode 100644 demo/utils/initOauthList.ts create mode 100644 demo/utils/initOneTap.ts create mode 100644 demo/utils/localstorage.ts rename {.wiki => docs}/.nojekyll (100%) create mode 100644 docs/assets/highlight.css create mode 100644 docs/assets/main.js create mode 100644 docs/assets/search.js create mode 100644 docs/assets/style.css create mode 100644 docs/classes/auth.Auth.html create mode 100644 docs/classes/core_config.Config.html create mode 100644 docs/classes/widgets_floatingOneTap.FloatingOneTap.html create mode 100644 docs/classes/widgets_oauthList.OAuthList.html create mode 100644 docs/classes/widgets_oneTap.OneTap.html create mode 100644 docs/enums/auth.AuthErrorCode.html create mode 100644 docs/enums/core_config.ConfigAuthMode.html create mode 100644 docs/enums/types.Languages.html create mode 100644 docs/enums/types.Scheme.html create mode 100644 docs/enums/widgets_floatingOneTap.FloatingOneTapContentId.html create mode 100644 docs/enums/widgets_oauthList.OAuthName.html create mode 100644 docs/enums/widgets_oneTap.OneTapSkin.html create mode 100644 docs/index.html create mode 100644 docs/interfaces/auth.AuthError.html create mode 100644 docs/interfaces/auth.AuthParams.html create mode 100644 docs/interfaces/auth.AuthResponse.html create mode 100644 docs/interfaces/core_config.ConfigData.html create mode 100644 docs/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html create mode 100644 docs/interfaces/widgets_floatingOneTap.FloatingOneTapParams.html create mode 100644 docs/interfaces/widgets_oauthList.OAuthListParams.html create mode 100644 docs/interfaces/widgets_oauthList.OAuthListStyles.html create mode 100644 docs/interfaces/widgets_oneTap.OneTapParams.html create mode 100644 docs/interfaces/widgets_oneTap.OneTapStyles.html create mode 100644 docs/modules/auth.html create mode 100644 docs/modules/core_config.html create mode 100644 docs/modules/types.html create mode 100644 docs/modules/widgets_floatingOneTap.html create mode 100644 docs/modules/widgets_oauthList.html create mode 100644 docs/modules/widgets_oneTap.html create mode 100644 src/auth/authDataService.ts create mode 100644 src/core/dataService/dataService.ts create mode 100644 src/core/dataService/index.ts diff --git a/.eslintrc-ts.js b/.eslintrc-ts.js index 183b2fc..aacb721 100644 --- a/.eslintrc-ts.js +++ b/.eslintrc-ts.js @@ -23,6 +23,8 @@ module.exports = { }, ], + '@typescript-eslint/await-thenable': 'off', + // Disabled because: no configurable options for .length > 0, arr[0] and similar constructions. 'no-magic-numbers': 'off', '@typescript-eslint/no-magic-numbers': 'off', diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..9c9b3f2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,55 @@ +name: Bug Report +description: Сообщите о проблеме, если что-то работает не так, как ожидалось. +title: '[Bug]: ' +labels: ['bug'] +body: + - type: textarea + id: description + attributes: + label: Описание + description: Подробное описание проблемы. + validations: + required: true + - type: textarea + id: steps + attributes: + label: Шаги воспроизведения + description: Последовательность, при которой ошибка стабильно воспроизводится. + validations: + required: true + - type: input + id: version + attributes: + label: Версия vkid/sdk + description: Поможет локализовать проблему. + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: В каких браузерах воспроизводится проблема? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - Yandex Browser + - Другое (укажите в описании) + validations: + required: true + - type: textarea + id: expectations + attributes: + label: Ожидаемое поведение + description: Если считаете, что из описания ожидаемое поведение непонятно. + - type: textarea + id: screenshots + attributes: + label: Скриншоты + description: Прикрепите скриншоты, если есть такая возможность. + - type: textarea + id: example + attributes: + label: Пример с воспроизведением + description: Приложите ссылку (например из https://codesandbox.io). Сильно ускоряет поиск причин проблемы. diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 0000000..c0fdad0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,12 @@ +name: Documentation +description: Сообщите об ошибке в документации или идею по ее улучшению, нам очень важна обратная связь +title: '[Doc]: ' +labels: ['doc'] +body: + - type: textarea + id: description + attributes: + label: Описание + description: Подробное описание ошибки/желаемого поведения. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..44e4d28 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,17 @@ +name: Feature request +description: Отправьте свое предложение по новой функциональности. +title: '[Feature]: ' +labels: ['feature'] +body: + - type: textarea + id: description + attributes: + label: Описание + description: Описание новой или улучшения текущей функциональности. + validations: + required: true + - type: textarea + id: screenshots + attributes: + label: Скриншоты + description: Примеры того, как это будет выглядеть. diff --git a/.husky/pre-commit b/.husky/pre-commit index ee3e5fe..b323de0 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" . "$(dirname "$0")/common.sh" -yarn lint-staged && yarn docs:prod && git add ./.wiki +yarn lint-staged && yarn docs:prod && git add ./docs diff --git a/.wiki/README.md b/.wiki/README.md deleted file mode 100644 index 76a4bc7..0000000 --- a/.wiki/README.md +++ /dev/null @@ -1,124 +0,0 @@ -@vkid/sdk / [Modules](modules.md) - -
-

- -

-

- - - - - - - - - - - npm - - - npm bundle size - -

-

- VK ID SDK — это библиотека для безопасной и удобной авторизации пользователей в вашем сервисе через VK ID. -

-
- ---- - -:information_source: VK ID SDK сейчас находится в бета-тестировании. О проблемах вы можете сообщить с помощью issues репозитория. - ---- - -## Установка - -**NPM:** - -```sh -npm i @vkid/sdk -``` - -**YARN:** - -```sh -yarn add @vkid/sdk -``` - -**PNPM:** - -```sh -pnpm add @vkid/sdk -``` - -**CDN:** - -```html - -``` - -> Обратите внимание: Для работы авторизации нужен APP_ID. Вы получите его, когда [создадите](https://id.vk.com/business/go/docs/ru/vkid/latest/vk-id/connection/create-application) приложение в кабинете подключения VK ID. - -## Пример - -
- Базовая авторизация - -```javascript -import * as VKID from '@vkid/sdk'; - -VKID.Config.set({ - app: APP_ID, - redirectUrl: 'https://example.com' -}); - -const authButton = document.createElement('button'); -authButton.onclick = () => { - VKID.Auth.login(); // После авторизации будет редирект на адрес, указанный в параметре redirect_uri -}; - -document.getElementById('container').appendChild(authButton); -``` -
- -
- OneTap - -```javascript -import * as VKID from '@vkid/sdk'; - -VKID.Config.set({ - app: APP_ID, - redirectUrl: 'https://example.com' -}); - -const oneTap = new VKID.OneTap(); - -const container = document.getElementById('VkIdSdkOneTap'); - -if (container) { - oneTap.render({ container }); -} -``` -
- -## Документация - -- [Что такое VK ID](https://id.vk.com/business/go/docs/ru/vkid/latest/vk-id/intro/start-page) -- [Создание приложения](https://id.vk.com/business/go/docs/ru/vkid/latest/vk-id/connection/create-application) -- [Требования к дизайну](https://id.vk.com/business/go/docs/ru/vkid/archive/1.60/vk-id/guidelines/design-rules) -- [Спецификация](.wiki/README.md) - -## Contributing - -Проект VK ID SDK имеет открытый исходный код на GitHub, и вы можете присоединиться к его доработке — мы будем благодарны за внесение улучшений и исправление возможных ошибок. - -### Code of Conduct - -Если вы собираетесь вносить изменения в проект VK ID SDK, следуйте правилам [разработки](CODE_OF_CONDUCT.md). Они помогут понять, какие действия возможны, а какие недопустимы. - -### Contributing Guide - -В [руководстве](CONTRIBUTING.md) вы можете подробно ознакомиться с процессом разработки и узнать, как предлагать улучшения и исправления, а ещё — как добавлять и тестировать свои изменения в VK ID SDK. -Также рекомендуем ознакомиться с общими [правилами оформления кода](CODE_STYLE.md) в проекте. diff --git a/.wiki/classes/auth.Auth.md b/.wiki/classes/auth.Auth.md deleted file mode 100644 index 6a6cec5..0000000 --- a/.wiki/classes/auth.Auth.md +++ /dev/null @@ -1,47 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / Auth - -# Class: Auth - -[auth](../modules/auth.md).Auth - -## Table of contents - -### Constructors - -- [constructor](auth.Auth.md#constructor) - -### Properties - -- [\_\_config](auth.Auth.md#__config) - -### Methods - -- [login](auth.Auth.md#login) - -## Constructors - -### constructor - -• **new Auth**() - -## Properties - -### \_\_config - -▪ `Static` **\_\_config**: [`Config`](core_config.Config.md) - -## Methods - -### login - -▸ `Readonly` **login**(`params?`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `params?` | [`AuthParams`](../interfaces/auth.AuthParams.md) | - -#### Returns - -`void` diff --git a/.wiki/classes/core_config.Config.md b/.wiki/classes/core_config.Config.md deleted file mode 100644 index e7adeaa..0000000 --- a/.wiki/classes/core_config.Config.md +++ /dev/null @@ -1,48 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [core/config](../modules/core_config.md) / Config - -# Class: Config - -[core/config](../modules/core_config.md).Config - -## Table of contents - -### Constructors - -- [constructor](core_config.Config.md#constructor) - -### Methods - -- [get](core_config.Config.md#get) -- [set](core_config.Config.md#set) - -## Constructors - -### constructor - -• **new Config**() - -## Methods - -### get - -▸ **get**(): [`ConfigData`](../interfaces/core_config.ConfigData.md) - -#### Returns - -[`ConfigData`](../interfaces/core_config.ConfigData.md) - -___ - -### set - -▸ **set**(`config`): [`Config`](core_config.Config.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `config` | `Partial`<[`ConfigData`](../interfaces/core_config.ConfigData.md)\> | - -#### Returns - -[`Config`](core_config.Config.md) diff --git a/.wiki/classes/widgets_floatingOneTap.FloatingOneTap.md b/.wiki/classes/widgets_floatingOneTap.FloatingOneTap.md deleted file mode 100644 index fcdf290..0000000 --- a/.wiki/classes/widgets_floatingOneTap.FloatingOneTap.md +++ /dev/null @@ -1,165 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/floatingOneTap](../modules/widgets_floatingOneTap.md) / FloatingOneTap - -# Class: FloatingOneTap - -[widgets/floatingOneTap](../modules/widgets_floatingOneTap.md).FloatingOneTap - -## Hierarchy - -- `Widget`<`Omit`<[`FloatingOneTapParams`](../interfaces/widgets_floatingOneTap.FloatingOneTapParams.md), ``"appName"``\>\> - - ↳ **`FloatingOneTap`** - -## Table of contents - -### Constructors - -- [constructor](widgets_floatingOneTap.FloatingOneTap.md#constructor) - -### Properties - -- [\_\_auth](widgets_floatingOneTap.FloatingOneTap.md#__auth) -- [\_\_config](widgets_floatingOneTap.FloatingOneTap.md#__config) - -### Methods - -- [close](widgets_floatingOneTap.FloatingOneTap.md#close) -- [hide](widgets_floatingOneTap.FloatingOneTap.md#hide) -- [off](widgets_floatingOneTap.FloatingOneTap.md#off) -- [on](widgets_floatingOneTap.FloatingOneTap.md#on) -- [render](widgets_floatingOneTap.FloatingOneTap.md#render) -- [show](widgets_floatingOneTap.FloatingOneTap.md#show) - -## Constructors - -### constructor - -• **new FloatingOneTap**() - -#### Inherited from - -Widget\>.constructor - -## Properties - -### \_\_auth - -▪ `Static` **\_\_auth**: [`Auth`](auth.Auth.md) - -#### Inherited from - -Widget.\_\_auth - -___ - -### \_\_config - -▪ `Static` **\_\_config**: [`Config`](core_config.Config.md) - -#### Inherited from - -Widget.\_\_config - -## Methods - -### close - -▸ **close**(): `void` - -#### Returns - -`void` - -#### Inherited from - -Widget.close - -___ - -### hide - -▸ **hide**(): [`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Returns - -[`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Inherited from - -Widget.hide - -___ - -### off - -▸ **off**(`event`, `handler`): [`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `string` | -| `handler` | `any` | - -#### Returns - -[`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Inherited from - -Widget.off - -___ - -### on - -▸ **on**(`event`, `handler`): [`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `string` | -| `handler` | `any` | - -#### Returns - -[`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Inherited from - -Widget.on - -___ - -### render - -▸ **render**(`params`): [`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `params` | [`FloatingOneTapParams`](../interfaces/widgets_floatingOneTap.FloatingOneTapParams.md) | - -#### Returns - -[`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Overrides - -Widget.render - -___ - -### show - -▸ **show**(): [`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Returns - -[`FloatingOneTap`](widgets_floatingOneTap.FloatingOneTap.md) - -#### Inherited from - -Widget.show diff --git a/.wiki/classes/widgets_oauthList.OAuthList.md b/.wiki/classes/widgets_oauthList.OAuthList.md deleted file mode 100644 index 27a1995..0000000 --- a/.wiki/classes/widgets_oauthList.OAuthList.md +++ /dev/null @@ -1,165 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/oauthList](../modules/widgets_oauthList.md) / OAuthList - -# Class: OAuthList - -[widgets/oauthList](../modules/widgets_oauthList.md).OAuthList - -## Hierarchy - -- `Widget`<[`OAuthListParams`](../interfaces/widgets_oauthList.OAuthListParams.md)\> - - ↳ **`OAuthList`** - -## Table of contents - -### Constructors - -- [constructor](widgets_oauthList.OAuthList.md#constructor) - -### Properties - -- [\_\_auth](widgets_oauthList.OAuthList.md#__auth) -- [\_\_config](widgets_oauthList.OAuthList.md#__config) - -### Methods - -- [close](widgets_oauthList.OAuthList.md#close) -- [hide](widgets_oauthList.OAuthList.md#hide) -- [off](widgets_oauthList.OAuthList.md#off) -- [on](widgets_oauthList.OAuthList.md#on) -- [render](widgets_oauthList.OAuthList.md#render) -- [show](widgets_oauthList.OAuthList.md#show) - -## Constructors - -### constructor - -• **new OAuthList**() - -#### Inherited from - -Widget.constructor - -## Properties - -### \_\_auth - -▪ `Static` **\_\_auth**: [`Auth`](auth.Auth.md) - -#### Inherited from - -Widget.\_\_auth - -___ - -### \_\_config - -▪ `Static` **\_\_config**: [`Config`](core_config.Config.md) - -#### Inherited from - -Widget.\_\_config - -## Methods - -### close - -▸ **close**(): `void` - -#### Returns - -`void` - -#### Inherited from - -Widget.close - -___ - -### hide - -▸ **hide**(): [`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Returns - -[`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Inherited from - -Widget.hide - -___ - -### off - -▸ **off**(`event`, `handler`): [`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `string` | -| `handler` | `any` | - -#### Returns - -[`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Inherited from - -Widget.off - -___ - -### on - -▸ **on**(`event`, `handler`): [`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `string` | -| `handler` | `any` | - -#### Returns - -[`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Inherited from - -Widget.on - -___ - -### render - -▸ **render**(`params`): [`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `params` | [`OAuthListParams`](../interfaces/widgets_oauthList.OAuthListParams.md) | - -#### Returns - -[`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Overrides - -Widget.render - -___ - -### show - -▸ **show**(): [`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Returns - -[`OAuthList`](widgets_oauthList.OAuthList.md) - -#### Inherited from - -Widget.show diff --git a/.wiki/classes/widgets_oneTap.OneTap.md b/.wiki/classes/widgets_oneTap.OneTap.md deleted file mode 100644 index 046c18a..0000000 --- a/.wiki/classes/widgets_oneTap.OneTap.md +++ /dev/null @@ -1,165 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTap - -# Class: OneTap - -[widgets/oneTap](../modules/widgets_oneTap.md).OneTap - -## Hierarchy - -- `Widget`<[`OneTapParams`](../interfaces/widgets_oneTap.OneTapParams.md)\> - - ↳ **`OneTap`** - -## Table of contents - -### Constructors - -- [constructor](widgets_oneTap.OneTap.md#constructor) - -### Properties - -- [\_\_auth](widgets_oneTap.OneTap.md#__auth) -- [\_\_config](widgets_oneTap.OneTap.md#__config) - -### Methods - -- [close](widgets_oneTap.OneTap.md#close) -- [hide](widgets_oneTap.OneTap.md#hide) -- [off](widgets_oneTap.OneTap.md#off) -- [on](widgets_oneTap.OneTap.md#on) -- [render](widgets_oneTap.OneTap.md#render) -- [show](widgets_oneTap.OneTap.md#show) - -## Constructors - -### constructor - -• **new OneTap**() - -#### Inherited from - -Widget.constructor - -## Properties - -### \_\_auth - -▪ `Static` **\_\_auth**: [`Auth`](auth.Auth.md) - -#### Inherited from - -Widget.\_\_auth - -___ - -### \_\_config - -▪ `Static` **\_\_config**: [`Config`](core_config.Config.md) - -#### Inherited from - -Widget.\_\_config - -## Methods - -### close - -▸ **close**(): `void` - -#### Returns - -`void` - -#### Inherited from - -Widget.close - -___ - -### hide - -▸ **hide**(): [`OneTap`](widgets_oneTap.OneTap.md) - -#### Returns - -[`OneTap`](widgets_oneTap.OneTap.md) - -#### Inherited from - -Widget.hide - -___ - -### off - -▸ **off**(`event`, `handler`): [`OneTap`](widgets_oneTap.OneTap.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `string` | -| `handler` | `any` | - -#### Returns - -[`OneTap`](widgets_oneTap.OneTap.md) - -#### Inherited from - -Widget.off - -___ - -### on - -▸ **on**(`event`, `handler`): [`OneTap`](widgets_oneTap.OneTap.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `string` | -| `handler` | `any` | - -#### Returns - -[`OneTap`](widgets_oneTap.OneTap.md) - -#### Inherited from - -Widget.on - -___ - -### render - -▸ **render**(`params`): [`OneTap`](widgets_oneTap.OneTap.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `params` | [`OneTapParams`](../interfaces/widgets_oneTap.OneTapParams.md) | - -#### Returns - -[`OneTap`](widgets_oneTap.OneTap.md) - -#### Overrides - -Widget.render - -___ - -### show - -▸ **show**(): [`OneTap`](widgets_oneTap.OneTap.md) - -#### Returns - -[`OneTap`](widgets_oneTap.OneTap.md) - -#### Inherited from - -Widget.show diff --git a/.wiki/enums/auth.AuthErrorCode.md b/.wiki/enums/auth.AuthErrorCode.md deleted file mode 100644 index c843c53..0000000 --- a/.wiki/enums/auth.AuthErrorCode.md +++ /dev/null @@ -1,46 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthErrorCode - -# Enumeration: AuthErrorCode - -[auth](../modules/auth.md).AuthErrorCode - -## Table of contents - -### Enumeration Members - -- [AuthorizationFailed](auth.AuthErrorCode.md#authorizationfailed) -- [CannotCreateNewTab](auth.AuthErrorCode.md#cannotcreatenewtab) -- [EventNotSupported](auth.AuthErrorCode.md#eventnotsupported) -- [NewTabHasBeenClosed](auth.AuthErrorCode.md#newtabhasbeenclosed) - -## Enumeration Members - -### AuthorizationFailed - -• **AuthorizationFailed** = ``103`` - -Авторизация завершилась ошибкой - -___ - -### CannotCreateNewTab - -• **CannotCreateNewTab** = ``101`` - -Новая вкладка не создалась - -___ - -### EventNotSupported - -• **EventNotSupported** = ``100`` - -Неизвестное событие - -___ - -### NewTabHasBeenClosed - -• **NewTabHasBeenClosed** = ``102`` - -Новая вкладка была закрыта diff --git a/.wiki/enums/types.Languages.md b/.wiki/enums/types.Languages.md deleted file mode 100644 index 31d2930..0000000 --- a/.wiki/enums/types.Languages.md +++ /dev/null @@ -1,66 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [types](../modules/types.md) / Languages - -# Enumeration: Languages - -[types](../modules/types.md).Languages - -## Table of contents - -### Enumeration Members - -- [ENG](types.Languages.md#eng) -- [FRA](types.Languages.md#fra) -- [GERMAN](types.Languages.md#german) -- [POL](types.Languages.md#pol) -- [RUS](types.Languages.md#rus) -- [SPA](types.Languages.md#spa) -- [TURKEY](types.Languages.md#turkey) -- [UKR](types.Languages.md#ukr) - -## Enumeration Members - -### ENG - -• **ENG** = ``3`` - -___ - -### FRA - -• **FRA** = ``16`` - -___ - -### GERMAN - -• **GERMAN** = ``6`` - -___ - -### POL - -• **POL** = ``15`` - -___ - -### RUS - -• **RUS** = ``0`` - -___ - -### SPA - -• **SPA** = ``4`` - -___ - -### TURKEY - -• **TURKEY** = ``82`` - -___ - -### UKR - -• **UKR** = ``1`` diff --git a/.wiki/enums/types.Scheme.md b/.wiki/enums/types.Scheme.md deleted file mode 100644 index 7304a37..0000000 --- a/.wiki/enums/types.Scheme.md +++ /dev/null @@ -1,24 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [types](../modules/types.md) / Scheme - -# Enumeration: Scheme - -[types](../modules/types.md).Scheme - -## Table of contents - -### Enumeration Members - -- [DARK](types.Scheme.md#dark) -- [LIGHT](types.Scheme.md#light) - -## Enumeration Members - -### DARK - -• **DARK** = ``"dark"`` - -___ - -### LIGHT - -• **LIGHT** = ``"light"`` diff --git a/.wiki/enums/widgets_floatingOneTap.FloatingOneTapContentId.md b/.wiki/enums/widgets_floatingOneTap.FloatingOneTapContentId.md deleted file mode 100644 index 3853791..0000000 --- a/.wiki/enums/widgets_floatingOneTap.FloatingOneTapContentId.md +++ /dev/null @@ -1,64 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/floatingOneTap](../modules/widgets_floatingOneTap.md) / FloatingOneTapContentId - -# Enumeration: FloatingOneTapContentId - -[widgets/floatingOneTap](../modules/widgets_floatingOneTap.md).FloatingOneTapContentId - -## Table of contents - -### Enumeration Members - -- [MAKE\_ORDER\_WITHOUT\_SERVICE](widgets_floatingOneTap.FloatingOneTapContentId.md#make_order_without_service) -- [MAKE\_ORDER\_WITH\_SERVICE](widgets_floatingOneTap.FloatingOneTapContentId.md#make_order_with_service) -- [REGISTRATION\_FOR\_EVENT](widgets_floatingOneTap.FloatingOneTapContentId.md#registration_for_event) -- [SIGN\_IN\_TO\_ACCOUNT](widgets_floatingOneTap.FloatingOneTapContentId.md#sign_in_to_account) -- [SIGN\_IN\_TO\_SERVICE](widgets_floatingOneTap.FloatingOneTapContentId.md#sign_in_to_service) -- [SUBMIT\_APPLICATIONS](widgets_floatingOneTap.FloatingOneTapContentId.md#submit_applications) - -## Enumeration Members - -### MAKE\_ORDER\_WITHOUT\_SERVICE - -• **MAKE\_ORDER\_WITHOUT\_SERVICE** = ``5`` - -Оформление заказа - -___ - -### MAKE\_ORDER\_WITH\_SERVICE - -• **MAKE\_ORDER\_WITH\_SERVICE** = ``4`` - -Оформление заказа в сервисе - -___ - -### REGISTRATION\_FOR\_EVENT - -• **REGISTRATION\_FOR\_EVENT** = ``2`` - -Регистрация на мероприятие - -___ - -### SIGN\_IN\_TO\_ACCOUNT - -• **SIGN\_IN\_TO\_ACCOUNT** = ``1`` - -Войти в учетную запись сервиса - -___ - -### SIGN\_IN\_TO\_SERVICE - -• **SIGN\_IN\_TO\_SERVICE** = ``0`` - -Войти или зарегистрироваться - -___ - -### SUBMIT\_APPLICATIONS - -• **SUBMIT\_APPLICATIONS** = ``3`` - -Подача заявки diff --git a/.wiki/enums/widgets_oauthList.OAuthName.md b/.wiki/enums/widgets_oauthList.OAuthName.md deleted file mode 100644 index fbe23e5..0000000 --- a/.wiki/enums/widgets_oauthList.OAuthName.md +++ /dev/null @@ -1,31 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/oauthList](../modules/widgets_oauthList.md) / OAuthName - -# Enumeration: OAuthName - -[widgets/oauthList](../modules/widgets_oauthList.md).OAuthName - -## Table of contents - -### Enumeration Members - -- [MAIL](widgets_oauthList.OAuthName.md#mail) -- [OK](widgets_oauthList.OAuthName.md#ok) -- [VK](widgets_oauthList.OAuthName.md#vk) - -## Enumeration Members - -### MAIL - -• **MAIL** = ``"mail_ru"`` - -___ - -### OK - -• **OK** = ``"ok_ru"`` - -___ - -### VK - -• **VK** = ``"vkid"`` diff --git a/.wiki/interfaces/auth.AuthError.md b/.wiki/interfaces/auth.AuthError.md deleted file mode 100644 index 459f4fa..0000000 --- a/.wiki/interfaces/auth.AuthError.md +++ /dev/null @@ -1,37 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthError - -# Interface: AuthError - -[auth](../modules/auth.md).AuthError - -## Table of contents - -### Properties - -- [code](auth.AuthError.md#code) -- [details](auth.AuthError.md#details) -- [text](auth.AuthError.md#text) - -## Properties - -### code - -• **code**: [`AuthErrorCode`](../enums/auth.AuthErrorCode.md) - -Код ошибки - -___ - -### details - -• `Optional` **details**: `any` - -Расширенная информация об ошибке - -___ - -### text - -• **text**: `string` - -Текст ошибки diff --git a/.wiki/interfaces/auth.AuthParams.md b/.wiki/interfaces/auth.AuthParams.md deleted file mode 100644 index d019806..0000000 --- a/.wiki/interfaces/auth.AuthParams.md +++ /dev/null @@ -1,28 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthParams - -# Interface: AuthParams - -[auth](../modules/auth.md).AuthParams - -## Table of contents - -### Properties - -- [lang](auth.AuthParams.md#lang) -- [scheme](auth.AuthParams.md#scheme) - -## Properties - -### lang - -• `Optional` **lang**: [`Languages`](../enums/types.Languages.md) - -Локализация, в которой будет отображена страница авторизации - -___ - -### scheme - -• `Optional` **scheme**: [`Scheme`](../enums/types.Scheme.md) - -Цветовая тема, в которой будет отображена страница авторизации diff --git a/.wiki/interfaces/auth.AuthResponse.md b/.wiki/interfaces/auth.AuthResponse.md deleted file mode 100644 index c842f2c..0000000 --- a/.wiki/interfaces/auth.AuthResponse.md +++ /dev/null @@ -1,37 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [auth](../modules/auth.md) / AuthResponse - -# Interface: AuthResponse - -[auth](../modules/auth.md).AuthResponse - -## Table of contents - -### Properties - -- [token](auth.AuthResponse.md#token) -- [ttl](auth.AuthResponse.md#ttl) -- [type](auth.AuthResponse.md#type) - -## Properties - -### token - -• **token**: `string` - -Токен, полученный после прохождения авторизации - -___ - -### ttl - -• **ttl**: `number` - -Время жизни токена - -___ - -### type - -• **type**: ``"silent_token"`` - -Вид токена diff --git a/.wiki/interfaces/core_config.ConfigData.md b/.wiki/interfaces/core_config.ConfigData.md deleted file mode 100644 index 3154470..0000000 --- a/.wiki/interfaces/core_config.ConfigData.md +++ /dev/null @@ -1,31 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [core/config](../modules/core_config.md) / ConfigData - -# Interface: ConfigData - -[core/config](../modules/core_config.md).ConfigData - -## Table of contents - -### Properties - -- [app](core_config.ConfigData.md#app) -- [redirectUrl](core_config.ConfigData.md#redirecturl) -- [state](core_config.ConfigData.md#state) - -## Properties - -### app - -• **app**: `number` - -___ - -### redirectUrl - -• **redirectUrl**: `string` - -___ - -### state - -• `Optional` **state**: `string` diff --git a/.wiki/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.md b/.wiki/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.md deleted file mode 100644 index ed0ae34..0000000 --- a/.wiki/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.md +++ /dev/null @@ -1,37 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/floatingOneTap](../modules/widgets_floatingOneTap.md) / FloatingOneTapIndent - -# Interface: FloatingOneTapIndent - -[widgets/floatingOneTap](../modules/widgets_floatingOneTap.md).FloatingOneTapIndent - -## Table of contents - -### Properties - -- [bottom](widgets_floatingOneTap.FloatingOneTapIndent.md#bottom) -- [right](widgets_floatingOneTap.FloatingOneTapIndent.md#right) -- [top](widgets_floatingOneTap.FloatingOneTapIndent.md#top) - -## Properties - -### bottom - -• `Optional` **bottom**: `number` - -Отступы от нижней границы окна (учитывается только в мобильном отображении) - -___ - -### right - -• `Optional` **right**: `number` - -Отступы от правой границы окна (не учитывается в мобильном отображении) - -___ - -### top - -• `Optional` **top**: `number` - -Отступ от верхней границы окна (не учитывается в мобильном отображении) diff --git a/.wiki/interfaces/widgets_floatingOneTap.FloatingOneTapParams.md b/.wiki/interfaces/widgets_floatingOneTap.FloatingOneTapParams.md deleted file mode 100644 index bcf316a..0000000 --- a/.wiki/interfaces/widgets_floatingOneTap.FloatingOneTapParams.md +++ /dev/null @@ -1,87 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/floatingOneTap](../modules/widgets_floatingOneTap.md) / FloatingOneTapParams - -# Interface: FloatingOneTapParams - -[widgets/floatingOneTap](../modules/widgets_floatingOneTap.md).FloatingOneTapParams - -## Hierarchy - -- `Omit`<`WidgetParams`, ``"container"``\> - - ↳ **`FloatingOneTapParams`** - -## Table of contents - -### Properties - -- [appName](widgets_floatingOneTap.FloatingOneTapParams.md#appname) -- [contentId](widgets_floatingOneTap.FloatingOneTapParams.md#contentid) -- [indent](widgets_floatingOneTap.FloatingOneTapParams.md#indent) -- [lang](widgets_floatingOneTap.FloatingOneTapParams.md#lang) -- [oauthList](widgets_floatingOneTap.FloatingOneTapParams.md#oauthlist) -- [scheme](widgets_floatingOneTap.FloatingOneTapParams.md#scheme) -- [showAlternativeLogin](widgets_floatingOneTap.FloatingOneTapParams.md#showalternativelogin) - -## Properties - -### appName - -• **appName**: `string` - -Имя приложения из конфигурации приложения VK ID - -___ - -### contentId - -• `Optional` **contentId**: [`FloatingOneTapContentId`](../enums/widgets_floatingOneTap.FloatingOneTapContentId.md) - -Тип отображаемого контента - -___ - -### indent - -• `Optional` **indent**: [`FloatingOneTapIndent`](widgets_floatingOneTap.FloatingOneTapIndent.md) - -Отступы от границ окна - -___ - -### lang - -• `Optional` **lang**: [`Languages`](../enums/types.Languages.md) - -Локализация - -#### Inherited from - -Omit.lang - -___ - -### oauthList - -• `Optional` **oauthList**: [`OAuthName`](../enums/widgets_oauthList.OAuthName.md)[] - -Список внешних сервисов авторизации - -___ - -### scheme - -• `Optional` **scheme**: [`Scheme`](../enums/types.Scheme.md) - -Цветовая схема виджета - -#### Inherited from - -Omit.scheme - -___ - -### showAlternativeLogin - -• `Optional` **showAlternativeLogin**: `boolean` \| ``0`` \| ``1`` - -Отображение кнопки входа другим способом diff --git a/.wiki/interfaces/widgets_oauthList.OAuthListParams.md b/.wiki/interfaces/widgets_oauthList.OAuthListParams.md deleted file mode 100644 index 7bb7b23..0000000 --- a/.wiki/interfaces/widgets_oauthList.OAuthListParams.md +++ /dev/null @@ -1,73 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/oauthList](../modules/widgets_oauthList.md) / OAuthListParams - -# Interface: OAuthListParams - -[widgets/oauthList](../modules/widgets_oauthList.md).OAuthListParams - -## Hierarchy - -- `WidgetParams` - - ↳ **`OAuthListParams`** - -## Table of contents - -### Properties - -- [container](widgets_oauthList.OAuthListParams.md#container) -- [lang](widgets_oauthList.OAuthListParams.md#lang) -- [oauthList](widgets_oauthList.OAuthListParams.md#oauthlist) -- [scheme](widgets_oauthList.OAuthListParams.md#scheme) -- [styles](widgets_oauthList.OAuthListParams.md#styles) - -## Properties - -### container - -• **container**: `HTMLElement` - -HTML элемент, в который будет вставлен виджет - -#### Inherited from - -WidgetParams.container - -___ - -### lang - -• `Optional` **lang**: [`Languages`](../enums/types.Languages.md) - -Локализация - -#### Inherited from - -WidgetParams.lang - -___ - -### oauthList - -• **oauthList**: [`OAuthName`](../enums/widgets_oauthList.OAuthName.md)[] - -Список внешних сервисов авторизации - -___ - -### scheme - -• `Optional` **scheme**: [`Scheme`](../enums/types.Scheme.md) - -Цветовая схема виджета - -#### Inherited from - -WidgetParams.scheme - -___ - -### styles - -• `Optional` **styles**: [`OAuthListStyles`](widgets_oauthList.OAuthListStyles.md) - -Настройки внешнего вида diff --git a/.wiki/interfaces/widgets_oauthList.OAuthListStyles.md b/.wiki/interfaces/widgets_oauthList.OAuthListStyles.md deleted file mode 100644 index e37de21..0000000 --- a/.wiki/interfaces/widgets_oauthList.OAuthListStyles.md +++ /dev/null @@ -1,28 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/oauthList](../modules/widgets_oauthList.md) / OAuthListStyles - -# Interface: OAuthListStyles - -[widgets/oauthList](../modules/widgets_oauthList.md).OAuthListStyles - -## Table of contents - -### Properties - -- [borderRadius](widgets_oauthList.OAuthListStyles.md#borderradius) -- [height](widgets_oauthList.OAuthListStyles.md#height) - -## Properties - -### borderRadius - -• `Optional` **borderRadius**: `number` - -Скругление иконок - -___ - -### height - -• `Optional` **height**: ``32`` \| ``34`` \| ``36`` \| ``38`` \| ``40`` \| ``42`` \| ``44`` \| ``46`` \| ``48`` \| ``50`` \| ``52`` \| ``54`` \| ``56`` - -Высота кнопки diff --git a/.wiki/interfaces/widgets_oneTap.OneTapParams.md b/.wiki/interfaces/widgets_oneTap.OneTapParams.md deleted file mode 100644 index a2e612b..0000000 --- a/.wiki/interfaces/widgets_oneTap.OneTapParams.md +++ /dev/null @@ -1,91 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTapParams - -# Interface: OneTapParams - -[widgets/oneTap](../modules/widgets_oneTap.md).OneTapParams - -## Hierarchy - -- `WidgetParams` - - ↳ **`OneTapParams`** - -## Table of contents - -### Properties - -- [container](widgets_oneTap.OneTapParams.md#container) -- [lang](widgets_oneTap.OneTapParams.md#lang) -- [oauthList](widgets_oneTap.OneTapParams.md#oauthlist) -- [scheme](widgets_oneTap.OneTapParams.md#scheme) -- [showAlternativeLogin](widgets_oneTap.OneTapParams.md#showalternativelogin) -- [skin](widgets_oneTap.OneTapParams.md#skin) -- [styles](widgets_oneTap.OneTapParams.md#styles) - -## Properties - -### container - -• **container**: `HTMLElement` - -HTML элемент, в который будет вставлен виджет - -#### Inherited from - -WidgetParams.container - -___ - -### lang - -• `Optional` **lang**: [`Languages`](../enums/types.Languages.md) - -Локализация - -#### Inherited from - -WidgetParams.lang - -___ - -### oauthList - -• `Optional` **oauthList**: [`OAuthName`](../enums/widgets_oauthList.OAuthName.md)[] - -Список внешних сервисов авторизации - -___ - -### scheme - -• `Optional` **scheme**: [`Scheme`](../enums/types.Scheme.md) - -Цветовая схема виджета - -#### Inherited from - -WidgetParams.scheme - -___ - -### showAlternativeLogin - -• `Optional` **showAlternativeLogin**: `boolean` \| ``0`` \| ``1`` - -Отображение кнопки входа другим способом - -___ - -### skin - -• `Optional` **skin**: ``"primary"`` \| ``"secondary"`` - -Стиль отображения кнопки - -___ - -### styles - -• `Optional` **styles**: [`OneTapStyles`](widgets_oneTap.OneTapStyles.md) - -Настройки внешнего вида diff --git a/.wiki/interfaces/widgets_oneTap.OneTapStyles.md b/.wiki/interfaces/widgets_oneTap.OneTapStyles.md deleted file mode 100644 index f4d43ca..0000000 --- a/.wiki/interfaces/widgets_oneTap.OneTapStyles.md +++ /dev/null @@ -1,37 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / [widgets/oneTap](../modules/widgets_oneTap.md) / OneTapStyles - -# Interface: OneTapStyles - -[widgets/oneTap](../modules/widgets_oneTap.md).OneTapStyles - -## Table of contents - -### Properties - -- [borderRadius](widgets_oneTap.OneTapStyles.md#borderradius) -- [height](widgets_oneTap.OneTapStyles.md#height) -- [width](widgets_oneTap.OneTapStyles.md#width) - -## Properties - -### borderRadius - -• `Optional` **borderRadius**: `number` - -Скругление кнопки - -___ - -### height - -• `Optional` **height**: ``32`` \| ``34`` \| ``36`` \| ``38`` \| ``40`` \| ``42`` \| ``44`` \| ``46`` \| ``48`` \| ``50`` \| ``52`` \| ``54`` \| ``56`` - -Высота кнопки - -___ - -### width - -• `Optional` **width**: `number` - -Ширина кнопки diff --git a/.wiki/modules.md b/.wiki/modules.md deleted file mode 100644 index e386e97..0000000 --- a/.wiki/modules.md +++ /dev/null @@ -1,14 +0,0 @@ -[@vkid/sdk - v1.0.3](README.md) / Modules - -# @vkid/sdk - v1.0.3 - -## Table of contents - -### Modules - -- [auth](modules/auth.md) -- [core/config](modules/core_config.md) -- [types](modules/types.md) -- [widgets/floatingOneTap](modules/widgets_floatingOneTap.md) -- [widgets/oauthList](modules/widgets_oauthList.md) -- [widgets/oneTap](modules/widgets_oneTap.md) diff --git a/.wiki/modules/auth.md b/.wiki/modules/auth.md deleted file mode 100644 index dcb46cd..0000000 --- a/.wiki/modules/auth.md +++ /dev/null @@ -1,19 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / auth - -# Module: auth - -## Table of contents - -### Enumerations - -- [AuthErrorCode](../enums/auth.AuthErrorCode.md) - -### Classes - -- [Auth](../classes/auth.Auth.md) - -### Interfaces - -- [AuthError](../interfaces/auth.AuthError.md) -- [AuthParams](../interfaces/auth.AuthParams.md) -- [AuthResponse](../interfaces/auth.AuthResponse.md) diff --git a/.wiki/modules/core_config.md b/.wiki/modules/core_config.md deleted file mode 100644 index 9f6412d..0000000 --- a/.wiki/modules/core_config.md +++ /dev/null @@ -1,13 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / core/config - -# Module: core/config - -## Table of contents - -### Classes - -- [Config](../classes/core_config.Config.md) - -### Interfaces - -- [ConfigData](../interfaces/core_config.ConfigData.md) diff --git a/.wiki/modules/types.md b/.wiki/modules/types.md deleted file mode 100644 index 6d88a90..0000000 --- a/.wiki/modules/types.md +++ /dev/null @@ -1,10 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / types - -# Module: types - -## Table of contents - -### Enumerations - -- [Languages](../enums/types.Languages.md) -- [Scheme](../enums/types.Scheme.md) diff --git a/.wiki/modules/widgets_floatingOneTap.md b/.wiki/modules/widgets_floatingOneTap.md deleted file mode 100644 index d6e2504..0000000 --- a/.wiki/modules/widgets_floatingOneTap.md +++ /dev/null @@ -1,18 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / widgets/floatingOneTap - -# Module: widgets/floatingOneTap - -## Table of contents - -### Enumerations - -- [FloatingOneTapContentId](../enums/widgets_floatingOneTap.FloatingOneTapContentId.md) - -### Classes - -- [FloatingOneTap](../classes/widgets_floatingOneTap.FloatingOneTap.md) - -### Interfaces - -- [FloatingOneTapIndent](../interfaces/widgets_floatingOneTap.FloatingOneTapIndent.md) -- [FloatingOneTapParams](../interfaces/widgets_floatingOneTap.FloatingOneTapParams.md) diff --git a/.wiki/modules/widgets_oauthList.md b/.wiki/modules/widgets_oauthList.md deleted file mode 100644 index ee17be4..0000000 --- a/.wiki/modules/widgets_oauthList.md +++ /dev/null @@ -1,18 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / widgets/oauthList - -# Module: widgets/oauthList - -## Table of contents - -### Enumerations - -- [OAuthName](../enums/widgets_oauthList.OAuthName.md) - -### Classes - -- [OAuthList](../classes/widgets_oauthList.OAuthList.md) - -### Interfaces - -- [OAuthListParams](../interfaces/widgets_oauthList.OAuthListParams.md) -- [OAuthListStyles](../interfaces/widgets_oauthList.OAuthListStyles.md) diff --git a/.wiki/modules/widgets_oneTap.md b/.wiki/modules/widgets_oneTap.md deleted file mode 100644 index 1ca0bf9..0000000 --- a/.wiki/modules/widgets_oneTap.md +++ /dev/null @@ -1,14 +0,0 @@ -[@vkid/sdk - v1.0.3](../README.md) / [Modules](../modules.md) / widgets/oneTap - -# Module: widgets/oneTap - -## Table of contents - -### Classes - -- [OneTap](../classes/widgets_oneTap.OneTap.md) - -### Interfaces - -- [OneTapParams](../interfaces/widgets_oneTap.OneTapParams.md) -- [OneTapStyles](../interfaces/widgets_oneTap.OneTapStyles.md) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2db26a4..adb0d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Change Log +## 1.1.0 + +### Новое +- Добавлена возможность открытия авторизации в новой вкладке для всех модулей. + +### Исправления +- Исправлен конфликт `css tokens`, который приводил к некорректному отображению стилей. + ## 1.0.3 + +### Исправления - Исправлены текста в [шторке авторизации](https://id.vk.com/business/go/docs/ru/vkid/latest/vk-id/connection/web/auth) - Исправлено падение сборки в проектах не использующих babel diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 78274e4..82ec41e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ yarn tests ## 🖊️ Документация -> Автосгенерированная документация находится в папке `.wiki/` +> Автосгенерированная документация находится в папке `./docs/` Документация собирается с помощью [typedoc](https://typedoc.org/). diff --git a/README.md b/README.md index df79446..9219687 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ --- -:information_source: VK ID SDK сейчас находится в бета-тестировании. О проблемах вы можете сообщить с помощью issues репозитория. +VK ID SDK сейчас находится в бета-тестировании. О проблемах вы можете сообщить с помощью issues репозитория. --- @@ -107,7 +107,7 @@ if (container) { - [Что такое VK ID](https://id.vk.com/business/go/docs/ru/vkid/latest/vk-id/intro/start-page) - [Создание приложения](https://id.vk.com/business/go/docs/ru/vkid/latest/vk-id/connection/create-application) - [Требования к дизайну](https://id.vk.com/business/go/docs/ru/vkid/archive/1.60/vk-id/guidelines/design-rules) -- [Спецификация](.wiki/README.md) +- [Спецификация](https://vkcom.github.io/vkid-web-sdk/) ## Contributing diff --git a/__tests__/auth/auth.tests.ts b/__tests__/auth/auth.tests.ts index 6642d32..ff43b57 100644 --- a/__tests__/auth/auth.tests.ts +++ b/__tests__/auth/auth.tests.ts @@ -1,11 +1,12 @@ -import { AUTH_RESPONSE_TOKEN } from '#/auth/constants'; -import { Auth, AuthParams, Config, Languages } from '#/index'; +import { AUTH_RESPONSE_TOKEN, AUTH_VK_CONNECT_RESPONSE } from '#/auth/constants'; +import { Auth, AuthParams, AuthResponse, Config, ConfigAuthMode, Languages, Scheme } from '#/index'; import { version } from '../../package.json'; const APP_ID = 100; const openFn = jest.fn(); +const closeFn = jest.fn(); const assignFn = jest.fn(); const eventListenerFn = jest.fn(); @@ -26,7 +27,7 @@ describe('Auth', () => { }); beforeEach(() => { - Config.set({ app: APP_ID, redirectUrl: 'test', state: 'test' }); + Config.set({ app: APP_ID, redirectUrl: 'https://id.vk.com', state: 'test' }); reporter .addLabel('layer', 'unit') .feature('Units') @@ -36,7 +37,7 @@ describe('Auth', () => { .addLabel('Suite', 'Units'); }); - test('Should redirect to url with default fields', async () => { + test('Should redirect to url with default fields', () => { Auth.login(); expect(assignFn).toHaveBeenCalled(); @@ -45,22 +46,22 @@ describe('Auth', () => { const expectArr = [ expect(location[0]).toEqual(''), - expect(location[1]).toEqual(`response_type=${AUTH_RESPONSE_TOKEN}`), - expect(location[2]).toContain('uuid'), + expect(location[1]).toContain('uuid'), + expect(location[2]).toEqual(`response_type=${AUTH_RESPONSE_TOKEN}`), expect(location[3]).toEqual(`v=%22${version}%22`), expect(location[4]).toEqual('sdk_type=vkid'), expect(location[5]).toEqual(`app_id=${APP_ID}`), - expect(location[6]).toEqual('redirect_uri=test'), + expect(location[6]).toEqual('redirect_uri=https%3A%2F%2Fid.vk.com'), expect(location[7]).toEqual('redirect_state=test'), ]; expect(location.length).toEqual(expectArr.length); }); - test('Should redirect to url with additional fields', async () => { + test('Should redirect to url with additional fields', () => { const params: AuthParams = { - scheme: 'bright_light', - lang: '0' as Languages, + scheme: Scheme.LIGHT, + lang: Languages.RUS, screen: 'phone', }; @@ -72,18 +73,112 @@ describe('Auth', () => { const expectArr = [ expect(location[0]).toEqual(''), - expect(location[1]).toEqual(`lang_id=${params.lang}`), - expect(location[2]).toEqual(`scheme=${params.scheme}`), - expect(location[3]).toEqual('screen=phone'), + expect(location[1]).toContain('uuid'), + expect(location[2]).toEqual(`lang_id=${params.lang}`), + expect(location[3]).toEqual(`scheme=${params.scheme}`), + expect(location[4]).toEqual('screen=phone'), + expect(location[5]).toEqual(`response_type=${AUTH_RESPONSE_TOKEN}`), + expect(location[6]).toEqual(`v=%22${version}%22`), + expect(location[7]).toEqual('sdk_type=vkid'), + expect(location[8]).toEqual(`app_id=${APP_ID}`), + expect(location[9]).toEqual('redirect_uri=https%3A%2F%2Fid.vk.com'), + expect(location[10]).toEqual('redirect_state=test'), + ]; + + expect(location.length).toEqual(expectArr.length); + }); + + test('Opens a window with default fields', () => { + Config.set({ mode: ConfigAuthMode.InNewTab }); + Auth.login(); + expect(openFn).toHaveBeenCalled(); + + const callArgs: string[] = openFn.mock.calls[0]; + const location = new URL(callArgs[0]).search.split(/[?&]/); + + const expectArr = [ + expect(location[0]).toEqual(''), + expect(location[1]).toContain('uuid'), + expect(location[2]).toEqual(`response_type=${AUTH_RESPONSE_TOKEN}`), + expect(location[3]).toContain('origin'), + expect(location[4]).toEqual(`v=%22${version}%22`), + expect(location[5]).toEqual('sdk_type=vkid'), + expect(location[6]).toEqual(`app_id=${APP_ID}`), + expect(location[7]).toEqual('redirect_uri=https%3A%2F%2Fid.vk.com'), + expect(location[8]).toEqual('redirect_state=test'), + ]; + + expect(location.length).toEqual(expectArr.length); + }); + + test('Opens a window with additional fields', () => { + Config.set({ mode: ConfigAuthMode.InNewTab }); + const params: AuthParams = { + scheme: Scheme.LIGHT, + lang: Languages.RUS, + }; + + Auth.login(params); + expect(openFn).toHaveBeenCalled(); + + const callArgs: string[] = openFn.mock.calls[0]; + const location = new URL(callArgs[0]).search.split(/[?&]/); + + const expectArr = [ + expect(location[0]).toEqual(''), + expect(location[1]).toContain('uuid'), + expect(location[2]).toEqual(`lang_id=${params.lang}`), + expect(location[3]).toEqual(`scheme=${params.scheme}`), expect(location[4]).toEqual(`response_type=${AUTH_RESPONSE_TOKEN}`), - expect(location[5]).toContain('uuid'), + expect(location[5]).toContain('origin'), expect(location[6]).toEqual(`v=%22${version}%22`), expect(location[7]).toEqual('sdk_type=vkid'), expect(location[8]).toEqual(`app_id=${APP_ID}`), - expect(location[9]).toEqual('redirect_uri=test'), + expect(location[9]).toEqual('redirect_uri=https%3A%2F%2Fid.vk.com'), expect(location[10]).toEqual('redirect_state=test'), ]; expect(location.length).toEqual(expectArr.length); }); + + test('Must redirect with payload', async () => { + Config.set({ mode: ConfigAuthMode.InNewTab }); + + const response: AuthResponse = { + token: 'token', + type: 'silent_token', + ttl: 500, + }; + const opener = { + closed: false, + close: closeFn, + }; + openFn.mockReturnValue(opener); + eventListenerFn.mockImplementation((event, callback) => { + callback({ + origin: 'vk.com', + source: opener, + data: { + action: AUTH_VK_CONNECT_RESPONSE + 'abc', + payload: response, + }, + }); + }); + + await Auth.login(); + expect(openFn).toHaveBeenCalled(); + expect(closeFn).toHaveBeenCalled(); + expect(assignFn).toHaveBeenCalled(); + + const callArgs: string[] = assignFn.mock.calls[0]; + const location = new URL(callArgs[0]).search.split(/[?&]/); + + const expectArr = [ + expect(location[0]).toEqual(''), + expect(location[1]).toEqual('payload=%7B%22type%22%3A%22silent_token%22%2C%22token%22%3A%22token%22%2C%22ttl%22%3A500%7D'), + expect(location[2]).toEqual('state=test'), + ]; + + expect(location.length).toEqual(expectArr.length); + }); }); diff --git a/__tests__/auth/authDataService.tests.ts b/__tests__/auth/authDataService.tests.ts new file mode 100644 index 0000000..e7e1650 --- /dev/null +++ b/__tests__/auth/authDataService.tests.ts @@ -0,0 +1,100 @@ +import { AuthDataService } from '#/auth/authDataService'; +import { AUTH_ERROR_TEXT } from '#/auth/constants'; +import { AuthErrorCode } from '#/auth/types'; + +describe('AuthDataService', () => { + beforeEach(() => { + reporter + .addLabel('Layer', 'unit') + .feature('Units') + .addLabel('Platform', 'Web') + .addLabel('Product', 'VK ID SDK') + .addLabel('Component', 'AuthDataService') + .addLabel('Suite', 'Units'); + }); + + test('Must return data on successful completion', async () => { + const dataService = new AuthDataService(); + const successData = { + additionally: 'additionally', + token: 'token', + type: 'type', + ttl: 600, + }; + dataService.sendSuccessData(successData); + + const data = await dataService.value; + expect(data).toEqual({ + token: 'token', + type: 'type', + ttl: 600, + }); + }); + + test('Must return error: new tab has been closed', async () => { + const dataService = new AuthDataService(); + const error = { + code: AuthErrorCode.NewTabHasBeenClosed, + text: AUTH_ERROR_TEXT[AuthErrorCode.NewTabHasBeenClosed], + }; + + dataService.sendNewTabHasBeenClosed(); + + try { + await dataService.value; + } catch (e) { + expect(e).toEqual(error); + } + }); + + test('Must return error: event not supported', async () => { + const dataService = new AuthDataService(); + const error = { + code: AuthErrorCode.EventNotSupported, + text: AUTH_ERROR_TEXT[AuthErrorCode.EventNotSupported], + }; + + dataService.sendEventNotSupported(); + + try { + await dataService.value; + } catch (e) { + expect(e).toEqual(error); + } + }); + + test('Must return error: cannot create new tab', async () => { + const dataService = new AuthDataService(); + const error = { + code: AuthErrorCode.CannotCreateNewTab, + text: AUTH_ERROR_TEXT[AuthErrorCode.CannotCreateNewTab], + }; + + dataService.sendCannotCreateNewTab(); + + try { + await dataService.value; + } catch (e) { + expect(e).toEqual(error); + } + }); + + test('Must return error: authorization failed', async () => { + const dataService = new AuthDataService(); + const additionally = { + additionally: 'additionally', + }; + const error = { + code: AuthErrorCode.AuthorizationFailed, + text: AUTH_ERROR_TEXT[AuthErrorCode.AuthorizationFailed], + }; + + dataService.sendAuthorizationFailed(additionally); + + try { + await dataService.value; + } catch (e) { + expect(e).toEqual({ ...error, details: additionally }); + } + }); +}); diff --git a/__tests__/core/dataService/dataService.tests.ts b/__tests__/core/dataService/dataService.tests.ts new file mode 100644 index 0000000..192cf08 --- /dev/null +++ b/__tests__/core/dataService/dataService.tests.ts @@ -0,0 +1,60 @@ +import { DataService } from '#/core/dataService'; + +describe('DataService', () => { + beforeEach(() => { + reporter + .addLabel('Layer', 'unit') + .feature('Units') + .addLabel('Platform', 'Web') + .addLabel('Product', 'VK ID SDK') + .addLabel('Component', 'DataService') + .addLabel('Suite', 'Units'); + }); + test('Must return data on successful completion', async () => { + const dataService = new DataService(); + const successData = 'success'; + dataService.sendSuccess(successData); + + const data = await dataService.value; + expect(data).toBe(successData); + }); + + test('Must return error data', async () => { + const dataService = new DataService(); + const errorData = 'error'; + dataService.sendError(errorData); + + try { + await dataService.value; + } catch (e) { + expect(e).toBe(errorData); + } + }); + + test('Must return data on successful completion and execute a callback', async () => { + const dataService = new DataService(); + const successData = 'success'; + const callback = jest.fn(); + dataService.setCallback(callback); + dataService.sendSuccess(successData); + + const data = await dataService.value; + expect(data).toBe(successData); + expect(callback).toBeCalled(); + }); + + test('Must return error data and execute a callback', async () => { + const dataService = new DataService(); + const errorData = 'error'; + const callback = jest.fn(); + dataService.setCallback(callback); + dataService.sendError(errorData); + + try { + await dataService.value; + } catch (e) { + expect(e).toBe(errorData); + expect(callback).toBeCalled(); + } + }); +}); diff --git a/__tests__/jest-global-mock.js b/__tests__/jest-global-mock.js index 11d6954..090ef86 100644 --- a/__tests__/jest-global-mock.js +++ b/__tests__/jest-global-mock.js @@ -14,11 +14,17 @@ jest.mock('crypto-js/enc-base64', () => ({ default: { stringify: (str) => `stringified_${str}` }, })); +jest.mock('nanoid/non-secure', () => ({ + nanoid: () => 'verifier', + customAlphabet: (data, length) => () => `abc` +})); + /** * mock ENV */ const isProduction = process.env.NODE_ENV === 'production'; const { version } = require('../package.json'); +const { nanoid } = require('nanoid/non-secure'); window.env = { PRODUCTION: isProduction, VERSION: JSON.stringify(version), diff --git a/__tests__/widgets/oneTap/oneTap.tests.ts b/__tests__/widgets/oneTap/oneTap.tests.ts index d77163c..9e7191a 100644 --- a/__tests__/widgets/oneTap/oneTap.tests.ts +++ b/__tests__/widgets/oneTap/oneTap.tests.ts @@ -197,7 +197,7 @@ describe('OneTap', () => { }, 0); }); const oneTapEl = document.querySelector('[data-test-id="oneTap"]'); - const oauthListEl = oneTapEl.querySelector('[data-test-id="oauthList"]'); + const oauthListEl = oneTapEl?.querySelector('[data-test-id="oauthList"]'); expect(oauthListEl).toBeTruthy(); }); @@ -212,7 +212,7 @@ describe('OneTap', () => { }, 0); }); const oneTapEl = document.querySelector('[data-test-id="oneTap"]'); - const oauthListEl = oneTapEl.querySelector('[data-test-id="oauthList"]'); + const oauthListEl = oneTapEl?.querySelector('[data-test-id="oauthList"]'); expect(oauthListEl).toBeFalsy(); }); @@ -226,7 +226,7 @@ describe('OneTap', () => { }, 0); }); const oneTapEl = document.querySelector('[data-test-id="oneTap"]'); - const oauthListEl = oneTapEl.querySelector('[data-test-id="oauthList"]'); + const oauthListEl = oneTapEl?.querySelector('[data-test-id="oauthList"]'); expect(oauthListEl).toBeFalsy(); }); }); diff --git a/demo/index.html b/demo/index.html index ab67146..59ad803 100644 --- a/demo/index.html +++ b/demo/index.html @@ -9,82 +9,9 @@ VK ID WEB SDK -
-
-
- - -

- - -

- - -

- - -
-

Basic Auth

- -
- -
- - -
- -
- - -

OneTap Button

-
- - - -

OAuth List

-
-
+
+
+
diff --git a/demo/index.ts b/demo/index.ts index d582747..02783ec 100644 --- a/demo/index.ts +++ b/demo/index.ts @@ -1,12 +1,16 @@ import './styles.css'; import * as VKID from '@vkid/sdk'; -import { OAuthName } from '@vkid/sdk'; -import { - showAuthSuccessSnackbar, - showAuthErrorSnackbar, - showInitErrorSnackbar, -} from '#demo/components/snackbar'; +import { initHandleAuth } from './utils/handleAuth'; +import { initAuthButtons } from './utils/initAuthButtons'; +import { initFloatingOneTap } from './utils/initFloatingOneTap'; +import { initModuleEnabledList } from './utils/initModuleEnabledList'; +import { initModuleParamsList } from './utils/initModuleParamsList'; +import { initOauthList } from './utils/initOauthList'; +import { initOneTap } from './utils/initOneTap'; +import { getDemoStoreFromLS, saveDemoStoreInLS } from './utils/localstorage'; + +let demoStore = getDemoStoreFromLS(); /** * General settings @@ -15,122 +19,77 @@ VKID.Config.set({ app: 7303035, state: 'test', redirectUrl: `${window.location.protocol}//${window.location.hostname}${window.location.pathname}`, + mode: demoStore.mode, }); -const urlParams = new URLSearchParams(window.location.search); -try { - const payloadStr = urlParams.get('payload'); - if (payloadStr) { - const payload = JSON.parse(payloadStr); - if (payload && payload.token) { - showAuthSuccessSnackbar(); - window.history.pushState({}, document.title, window.location.pathname); - } else { - showAuthErrorSnackbar(); - } - } -} catch {} +initHandleAuth(); +initModuleParamsList(demoStore); +initModuleEnabledList(demoStore); +document.querySelector('html')?.setAttribute('data-scheme', demoStore.scheme); /** * Custom auth */ -const authButtonIds = ['authIconButton', 'authButtonWithIcon']; - -authButtonIds.forEach((item) => { - const button = document.getElementById(item) as HTMLElement; - - button.onclick = () => VKID.Auth.login(); -}); - -let demoStore = { - contentId: VKID.FloatingOneTapContentId.SIGN_IN_TO_SERVICE, - lang: VKID.Languages.RUS, - scheme: VKID.Scheme.LIGHT, - oauthes: '', -}; +initAuthButtons(demoStore); /** * Widgets integration */ -const createOneTap = () => { - const container = document.getElementById('oneTap') as HTMLElement; - - const params = { - container: container, - showAlternativeLogin: true, - contentId: Number(demoStore.contentId), - lang: Number(demoStore.lang), - scheme: demoStore.scheme, - oauthList: demoStore.oauthes ? demoStore.oauthes.split(',') as OAuthName[] : undefined, - }; - - const oneTap = new VKID.OneTap(); - oneTap.on(VKID.WidgetEvents.ERROR, showInitErrorSnackbar) - .render(params); - - return oneTap; +const createOneTap = initOneTap(demoStore); +let oneTap = demoStore.enable_oneTap && createOneTap(); +const resetOneTap = () => { + if (oneTap) { + oneTap.close(); + oneTap = createOneTap(); + } }; -const createFloatingOneTap = () => { - const params = { - appName: 'VK ID Demo', - showAlternativeLogin: true, - contentId: Number(demoStore.contentId), - lang: Number(demoStore.lang), - scheme: demoStore.scheme, - oauthList: demoStore.oauthes ? demoStore.oauthes.split(',') as OAuthName[] : undefined, - }; - - const floatingOneTap = new VKID.FloatingOneTap(); - floatingOneTap.on(VKID.WidgetEvents.ERROR, showInitErrorSnackbar) - .render(params); - - return floatingOneTap; +const createFloatingOneTap = initFloatingOneTap(demoStore); +let floatingOneTap = demoStore.enable_floatingOneTap && createFloatingOneTap(); +const resetFloatingOneTap = () => { + if (floatingOneTap) { + floatingOneTap.close(); + floatingOneTap = createFloatingOneTap(); + } }; -const createOAuthList = () => { - const container = document.getElementById('oauthList') as HTMLElement; - - const oauthList = new VKID.OAuthList(); - oauthList.on(VKID.WidgetEvents.ERROR, showInitErrorSnackbar) - .render({ - container, - scheme: demoStore.scheme, - lang: Number(demoStore.lang), - oauthList: [ - VKID.OAuthName.VK, - VKID.OAuthName.MAIL, - VKID.OAuthName.OK, - ], - }); - - return oauthList; +const createOauthList = initOauthList(demoStore); +let oauthList = demoStore.enable_oauthList && createOauthList(); +const resetOauthList = () => { + if (oauthList) { + oauthList.close(); + oauthList = createOauthList(); + } }; -let oneTap = createOneTap(); -let floatingOneTap = createFloatingOneTap(); -let oauthList = createOAuthList(); - function handleSelectParamsChange() { demoStore = Object.assign(demoStore, { [this.name]: this.value }); - oneTap.close(); - oneTap = createOneTap(); - - oauthList.close(); - oauthList = createOAuthList(); + saveDemoStoreInLS(demoStore); - floatingOneTap.close(); - floatingOneTap = createFloatingOneTap(); + resetOneTap(); + resetOauthList(); + resetFloatingOneTap(); document.querySelector('html')?.setAttribute('data-scheme', demoStore.scheme); } +['lang', 'scheme', 'contentId', 'oauthes', 'onetapSkin'].forEach((item) => { + document.getElementById(item)?.addEventListener('change', handleSelectParamsChange); +}); -const langEl = document.getElementById('lang'); -const schemeEl = document.getElementById('scheme'); -const contentIdEl = document.getElementById('contentId'); -const oauthesEl = document.getElementById('oauthes'); -[langEl, schemeEl, contentIdEl, oauthesEl].forEach((item) => { - if (item) { - item.addEventListener('change', handleSelectParamsChange); - } +function handleConfigParamsChange() { + VKID.Config.set({ + [this.name]: this.value, + }); + demoStore = Object.assign(demoStore, { [this.name]: this.value }); + saveDemoStoreInLS(demoStore); +} +const modeEl = document.getElementById('mode'); +modeEl && modeEl.addEventListener('change', handleConfigParamsChange); + +function handleModuleEnabledCheckboxChange() { + demoStore = Object.assign(demoStore, { [this.name]: this.checked }); + saveDemoStoreInLS(demoStore); +} +['enable_oauthList', 'enable_basicAuth', 'enable_oneTap', 'enable_floatingOneTap'].forEach((name) => { + document.getElementById(name)?.addEventListener('change', handleModuleEnabledCheckboxChange); }); diff --git a/demo/styles.css b/demo/styles.css index 13e5cd4..8645b6c 100644 --- a/demo/styles.css +++ b/demo/styles.css @@ -5,13 +5,21 @@ html, body { margin: 0; padding: 0; - background: var(--background_page); + background: var(--demo_background_page); + font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif; } html[data-scheme="dark"], html[data-scheme="dark"] body { background: black; } +select { + display: block; + width: 100%; + margin-top: 8px; + padding: 4px; +} + .VkIdWebSdk__container { display: flex; justify-content: center; @@ -19,7 +27,8 @@ html[data-scheme="dark"], html[data-scheme="dark"] body { border: 1px solid #ddd; box-sizing: border-box; margin: 25px auto; - max-width: 380px; + width: 90%; + max-width: 1080px; background: #fff; border-radius: 12px; } @@ -34,6 +43,7 @@ html[data-scheme="dark"] .VkIdWebSdk__container { padding: 15px; background: #f1f1f1; border-radius: 5px; + min-width: 180px; } html[data-scheme="dark"] .VkIdWebSdk_controls { @@ -42,15 +52,57 @@ html[data-scheme="dark"] .VkIdWebSdk_controls { } .VkIdWebSdk__content { - max-width: 650px; - width: 300px; + width: 100%; + padding: 0 24px; border-radius: 12px; } -.VkIdWebSdk__content > *:not(:first-child) { +.VkIdWebSdk__content > section > *:not(:first-child) { margin: 24px 0; } -.VkIdWebSdk__content > h1 { - font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif; +.enableModule { + padding: 12px 0 0; + display: flex; + flex-direction: column; +} + +.VkIdWebSdk_controls > *:not(:first-child) { + margin-top: 12px; +} + +.VkIdWebSdk__floating_separator { + display: flex; + align-items: center; + justify-content: center; + background: var(--demo_accent_alternate); + border-radius: 8px; +} + +.VkIdWebSdk__floating_separator.top { + height: 260px; + display: flex; +} +.VkIdWebSdk__floating_separator.bottom { + display: none; +} + +@media (max-width: 768px) { + .VkIdWebSdk__container { + flex-direction: column-reverse; + } + .VkIdWebSdk__content { + padding: 0; + } +} + +@media (max-width: 480px) { + .VkIdWebSdk__floating_separator.top { + display: none; + } + .VkIdWebSdk__floating_separator.bottom { + height: 380px; + display: flex; + margin-top: 12px; + } } diff --git a/demo/styles/button.css b/demo/styles/button.css index 4d0fcb4..ecbe298 100644 --- a/demo/styles/button.css +++ b/demo/styles/button.css @@ -16,7 +16,7 @@ .VkIdWebSdk__button, .VkIdWebSdk__iconButton { - background: var(--accent_alternate); + background: var(--demo_accent_alternate); cursor: pointer; transition: all .1s ease-out; } @@ -69,5 +69,5 @@ font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif; flex: 1; justify-content: center; - color: var(--vkui-light-text-text-contrast); + color: var(--demo_vkui-light-text-text-contrast); } diff --git a/demo/styles/snackbar.css b/demo/styles/snackbar.css index 18b6260..0aa1508 100644 --- a/demo/styles/snackbar.css +++ b/demo/styles/snackbar.css @@ -4,15 +4,15 @@ min-width: 351px; padding: 16px 16px 16px 56px; box-sizing: border-box; - background: var(--vkui--color_background_content); - border-radius: var(--vkui--size_border_radius--regular); - box-shadow: var(--vkui--elevation4); + background: var(--demo_vkui--color_background_content); + border-radius: var(--demo_vkui--size_border_radius--regular); + box-shadow: var(--demo_vkui--elevation4); font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif; position: fixed; bottom: 24px; left: 0; transform: translate(-100%, 0); - transition: transform 320ms var(--vkui--animation_easing_platform); + transition: transform 320ms var(--demo_vkui--animation_easing_platform); } .VkIdWebSdk__snackbar_active { diff --git a/demo/styles/variables.css b/demo/styles/variables.css index b9628a3..b7919f7 100644 --- a/demo/styles/variables.css +++ b/demo/styles/variables.css @@ -1,23 +1,23 @@ :root { - --accent_alternate: #0077ff; + --demo_accent_alternate: #0077ff; - --vkui--color_background_accent: #2688EB; - --vkui--color_background_accent--hover: #2483E4; - --vkui--color_background_accent--active: #237EDD; - --vkui--color_background_secondary: #f5f5f5; - --vkui--color_background_content: #ffffff; - --vkui--color_field_border_alpha: rgba(0, 0, 0, .12); - --vkui--color_field_border_alpha--dark: rgba(255, 255, 255, 0.12); - --vkui--color_text_secondary--dark: #76787a; - --vkui--color_text_primary--dark: #e1e3e6; + --demo_vkui--color_background_accent: #2688EB; + --demo_vkui--color_background_accent--hover: #2483E4; + --demo_vkui--color_background_accent--active: #237EDD; + --demo_vkui--color_background_secondary: #f5f5f5; + --demo_vkui--color_background_content: #ffffff; + --demo_vkui--color_field_border_alpha: rgba(0, 0, 0, .12); + --demo_vkui--color_field_border_alpha--dark: rgba(255, 255, 255, 0.12); + --demo_vkui--color_text_secondary--dark: #76787a; + --demo_vkui--color_text_primary--dark: #e1e3e6; - --vkui-light-text-secondary: #818C99; - --vkui-light-text-text-contrast: #ffffff; + --demo_vkui-light-text-secondary: #818C99; + --demo_vkui-light-text-text-contrast: #ffffff; - --vkui--size_border_radius--regular: 8px; - --vkui--animation_easing_platform: cubic-bezier(0.4,0,0.2,1); - --vkui--elevation4: 0px 0px 8px rgba(0,0,0,.12),0px 16px 16px rgba(0,0,0,.16); + --demo_vkui--size_border_radius--regular: 8px; + --demo_vkui--animation_easing_platform: cubic-bezier(0.4,0,0.2,1); + --demo_vkui--elevation4: 0px 0px 8px rgba(0,0,0,.12),0px 16px 16px rgba(0,0,0,.16); - --background_page: #ebedf0; - --light-button-primary-foreground: #FFF; + --demo_background_page: #ebedf0; + --demo_light-button-primary-foreground: #FFF; } diff --git a/demo/types.ts b/demo/types.ts new file mode 100644 index 0000000..631f256 --- /dev/null +++ b/demo/types.ts @@ -0,0 +1,16 @@ +import { ConfigAuthMode } from '#/core/config'; +import { Languages, Scheme } from '#/types'; +import { FloatingOneTapContentId } from '#/widgets/floatingOneTap'; + +export interface DemoStore { + contentId: FloatingOneTapContentId; + lang: Languages; + scheme: Scheme; + onetapSkin: 'primary' | 'secondary'; + oauthes: '' | 'mail_ru' |'ok_ru' | 'mail_ru,ok_ru'; + mode: ConfigAuthMode; + enable_oauthList: boolean; + enable_basicAuth: boolean; + enable_oneTap: boolean; + enable_floatingOneTap: boolean; +} diff --git a/demo/utils/createModule.ts b/demo/utils/createModule.ts new file mode 100644 index 0000000..5d6094b --- /dev/null +++ b/demo/utils/createModule.ts @@ -0,0 +1,61 @@ +import * as VKID from '#/index'; +import { OAuthName } from '#/index'; + +import { showInitErrorSnackbar } from '#demo/components/snackbar'; +import { DemoStore } from '#demo/types'; + +export const createOneTap = (demoStore: DemoStore) => { + const container = document.getElementById('oneTap') as HTMLElement; + + const params = { + container: container, + showAlternativeLogin: true, + contentId: Number(demoStore.contentId), + lang: Number(demoStore.lang), + scheme: demoStore.scheme, + skin: demoStore.onetapSkin, + oauthList: demoStore.oauthes ? demoStore.oauthes.split(',') as OAuthName[] : undefined, + }; + + const oneTap = new VKID.OneTap(); + oneTap.on(VKID.WidgetEvents.ERROR, showInitErrorSnackbar) + .render(params as VKID.OneTapParams); + + return oneTap; +}; + +export const createFloatingOneTap = (demoStore: DemoStore) => { + const params = { + appName: 'VK ID Demo', + showAlternativeLogin: true, + contentId: Number(demoStore.contentId), + lang: Number(demoStore.lang), + scheme: demoStore.scheme, + oauthList: demoStore.oauthes ? demoStore.oauthes.split(',') as OAuthName[] : undefined, + }; + + const floatingOneTap = new VKID.FloatingOneTap(); + floatingOneTap.on(VKID.WidgetEvents.ERROR, showInitErrorSnackbar) + .render(params); + + return floatingOneTap; +}; + +export const createOAuthList = (demoStore: DemoStore) => { + const container = document.getElementById('oauthList') as HTMLElement; + + const oauthList = new VKID.OAuthList(); + oauthList.on(VKID.WidgetEvents.ERROR, showInitErrorSnackbar) + .render({ + container, + scheme: demoStore.scheme, + lang: Number(demoStore.lang), + oauthList: [ + VKID.OAuthName.VK, + VKID.OAuthName.MAIL, + VKID.OAuthName.OK, + ], + }); + + return oauthList; +}; diff --git a/demo/utils/handleAuth.ts b/demo/utils/handleAuth.ts new file mode 100644 index 0000000..98ae0dc --- /dev/null +++ b/demo/utils/handleAuth.ts @@ -0,0 +1,17 @@ +import { showAuthErrorSnackbar, showAuthSuccessSnackbar } from '#demo/components/snackbar'; + +export const initHandleAuth = () => { + const urlParams = new URLSearchParams(window.location.search); + try { + const payloadStr = urlParams.get('payload'); + if (payloadStr) { + const payload = JSON.parse(payloadStr); + if (payload && payload.token) { + showAuthSuccessSnackbar(); + window.history.pushState({}, document.title, window.location.pathname); + } else { + showAuthErrorSnackbar(); + } + } + } catch {} +}; diff --git a/demo/utils/initAuthButtons.ts b/demo/utils/initAuthButtons.ts new file mode 100644 index 0000000..dcbaa41 --- /dev/null +++ b/demo/utils/initAuthButtons.ts @@ -0,0 +1,46 @@ +import * as VKID from '#/index'; + +import { DemoStore } from '#demo/types'; + +export const initAuthButtons = (demoStore: DemoStore) => { + if (!demoStore.enable_basicAuth) { return; } + const html = `
+

Basic Auth

+ +
+ +
+ + +
+ +
+
+`; + document.querySelector('.VkIdWebSdk__content')?.insertAdjacentHTML('beforeend', html); + const authButtonIds = ['authIconButton', 'authButtonWithIcon']; + + authButtonIds.forEach((item) => { + const button = document.getElementById(item) as HTMLElement; + + button.onclick = () => VKID.Auth.login(); + }); +}; + diff --git a/demo/utils/initFloatingOneTap.ts b/demo/utils/initFloatingOneTap.ts new file mode 100644 index 0000000..e32b17d --- /dev/null +++ b/demo/utils/initFloatingOneTap.ts @@ -0,0 +1,18 @@ +import { DemoStore } from '#demo/types'; +import { createFloatingOneTap } from '#demo/utils/createModule'; + +export const initFloatingOneTap = (demoStore: DemoStore) => { + let alreadyInsertedToDocument = !demoStore.enable_floatingOneTap; + return () => { + const htmlSeparator = (className: string) => `
+ + + + +
`; + !alreadyInsertedToDocument && document.querySelector('.VkIdWebSdk__content')?.insertAdjacentHTML('afterbegin', htmlSeparator('top')); + !alreadyInsertedToDocument && document.querySelector('#demo')?.insertAdjacentHTML('afterbegin', htmlSeparator('bottom')); + alreadyInsertedToDocument = true; + return createFloatingOneTap(demoStore); + }; +}; diff --git a/demo/utils/initModuleEnabledList.ts b/demo/utils/initModuleEnabledList.ts new file mode 100644 index 0000000..f9bf7f4 --- /dev/null +++ b/demo/utils/initModuleEnabledList.ts @@ -0,0 +1,18 @@ +const enabledModulesOptions = [ + { value: 'enable_basicAuth', text: 'Basic Auth' }, + { value: 'enable_oneTap', text: 'OneTap Button' }, + { value: 'enable_floatingOneTap', text: 'Floating OneTap' }, + { value: 'enable_oauthList', text: 'OauthList' }, +]; + +export const initModuleEnabledList = (store: Record) => { + const html = `
+ Включение модулей +
+ ${enabledModulesOptions.map(({ text, value }) => `
`).join('')} +
+ +
`; + document.querySelector('.VkIdWebSdk_controls')?.insertAdjacentHTML('beforeend', html); +}; diff --git a/demo/utils/initModuleParamsList.ts b/demo/utils/initModuleParamsList.ts new file mode 100644 index 0000000..b892bba --- /dev/null +++ b/demo/utils/initModuleParamsList.ts @@ -0,0 +1,82 @@ +import { Languages, Scheme, ConfigAuthMode, FloatingOneTapContentId, OneTapSkin, OAuthName } from '@vkid/sdk'; + +const langOptions = [ + { value: Languages.RUS, text: 'RUS' }, + { value: Languages.UKR, text: 'UKR' }, + { value: Languages.ENG, text: 'ENG' }, + { value: Languages.SPA, text: 'SPA' }, + { value: Languages.GERMAN, text: 'GERMAN' }, + { value: Languages.POL, text: 'POL' }, + { value: Languages.FRA, text: 'FRA' }, + { value: Languages.TURKEY, text: 'TURKEY' }, +]; + +const schemeOptions = [ + { value: Scheme.LIGHT, text: 'Light' }, + { value: Scheme.DARK, text: 'Dark' }, +]; + +const modeOptions = [ + { value: ConfigAuthMode.Redirect, text: 'Текущая вкладка' }, + { value: ConfigAuthMode.InNewTab, text: 'Новая вкладка' }, +]; + +const contentIdOptions = [ + { value: FloatingOneTapContentId.SIGN_IN_TO_SERVICE, text: 'Войти в сервис' }, + { value: FloatingOneTapContentId.SIGN_IN_TO_ACCOUNT, text: 'Войти в аккаунт' }, + { value: FloatingOneTapContentId.REGISTRATION_FOR_EVENT, text: 'Регистрация на мероприятие' }, + { value: FloatingOneTapContentId.SUBMIT_APPLICATIONS, text: 'Подача заявки' }, + { value: FloatingOneTapContentId.MAKE_ORDER_WITH_SERVICE, text: 'Оформление заказа 1' }, + { value: FloatingOneTapContentId.MAKE_ORDER_WITHOUT_SERVICE, text: 'Оформление заказа 2' }, +]; + +const onetapSkinOptions = [ + { value: OneTapSkin.Primary, text: 'Основной' }, + { value: OneTapSkin.Secondary, text: 'Вторичный' }, +]; + +const oauthesOptions = [ + { value: '', text: 'Нет' }, + { value: OAuthName.MAIL, text: 'Mail.ru' }, + { value: OAuthName.OK, text: 'OK.ru' }, + { value: OAuthName.MAIL + ',' + OAuthName.OK, text: 'Mail.ru + OK.ru' }, +]; + +export const initModuleParamsList = (store: Record) => { + const html = `
+ Параметры модулей + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ `; + document.querySelector('.VkIdWebSdk_controls')?.insertAdjacentHTML('beforeend', html); +}; diff --git a/demo/utils/initOauthList.ts b/demo/utils/initOauthList.ts new file mode 100644 index 0000000..8bf36b5 --- /dev/null +++ b/demo/utils/initOauthList.ts @@ -0,0 +1,17 @@ +import { DemoStore } from '#demo/types'; +import { createOAuthList } from '#demo/utils/createModule'; + +export const initOauthList = (demoStore: DemoStore) => { + let alreadyInsertedToDocument = !demoStore.enable_oauthList; + return () => { + const html = ` +
+

OAuth List

+
+
+`; + !alreadyInsertedToDocument && document.querySelector('.VkIdWebSdk__content')?.insertAdjacentHTML('beforeend', html); + alreadyInsertedToDocument = true; + return createOAuthList(demoStore); + }; +}; diff --git a/demo/utils/initOneTap.ts b/demo/utils/initOneTap.ts new file mode 100644 index 0000000..1c51f99 --- /dev/null +++ b/demo/utils/initOneTap.ts @@ -0,0 +1,17 @@ +import { DemoStore } from '#demo/types'; +import { createOneTap } from '#demo/utils/createModule'; + +export const initOneTap = (demoStore: DemoStore) => { + let alreadyInsertedToDocument = !demoStore.enable_oneTap; + return () => { + const html = ` +
+

OneTap Button

+
+
+`; + !alreadyInsertedToDocument && document.querySelector('.VkIdWebSdk__content')?.insertAdjacentHTML('beforeend', html); + alreadyInsertedToDocument = true; + return createOneTap(demoStore); + }; +}; diff --git a/demo/utils/localstorage.ts b/demo/utils/localstorage.ts new file mode 100644 index 0000000..19d830b --- /dev/null +++ b/demo/utils/localstorage.ts @@ -0,0 +1,36 @@ +import * as VKID from '#/index'; +import { ConfigAuthMode } from '#/index'; + +import { DemoStore } from '#demo/types'; + +export const saveDemoStoreInLS = (store: DemoStore) => { + try { + localStorage.setItem('vkid_demo:store', JSON.stringify(store)); + } catch (e) {} +}; + +export const getDemoStoreFromLS = (): DemoStore => { + const defaultDemoStore: DemoStore = { + contentId: VKID.FloatingOneTapContentId.SIGN_IN_TO_SERVICE, + lang: VKID.Languages.RUS, + scheme: VKID.Scheme.LIGHT, + onetapSkin: 'primary', + oauthes: '', + mode: ConfigAuthMode.Redirect, + + enable_oauthList: true, + enable_basicAuth: true, + enable_oneTap: true, + enable_floatingOneTap: true, + }; + + try { + const stringStore = localStorage.getItem('vkid_demo:store'); + if (stringStore) { + return JSON.parse(stringStore); + } + saveDemoStoreInLS(defaultDemoStore); + } catch (e) {} + return defaultDemoStore; +}; + diff --git a/.wiki/.nojekyll b/docs/.nojekyll similarity index 100% rename from .wiki/.nojekyll rename to docs/.nojekyll diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css new file mode 100644 index 0000000..a59a7c0 --- /dev/null +++ b/docs/assets/highlight.css @@ -0,0 +1,113 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #800000; + --dark-hl-3: #808080; + --light-hl-4: #800000; + --dark-hl-4: #569CD6; + --light-hl-5: #000000FF; + --dark-hl-5: #D4D4D4; + --light-hl-6: #E50000; + --dark-hl-6: #9CDCFE; + --light-hl-7: #0000FF; + --dark-hl-7: #CE9178; + --light-hl-8: #AF00DB; + --dark-hl-8: #C586C0; + --light-hl-9: #0000FF; + --dark-hl-9: #569CD6; + --light-hl-10: #001080; + --dark-hl-10: #9CDCFE; + --light-hl-11: #0070C1; + --dark-hl-11: #4FC1FF; + --light-hl-12: #008000; + --dark-hl-12: #6A9955; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +.hl-12 { color: var(--hl-12); } +pre, code { background: var(--code-background); } diff --git a/docs/assets/main.js b/docs/assets/main.js new file mode 100644 index 0000000..4c8fa61 --- /dev/null +++ b/docs/assets/main.js @@ -0,0 +1,58 @@ +"use strict"; +"use strict";(()=>{var Se=Object.create;var re=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Pe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ie=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Te(e))!Qe.call(t,i)&&i!==r&&re(t,i,{get:()=>e[i],enumerable:!(n=we(e,i))||n.enumerable});return t};var Ce=(t,e,r)=>(r=t!=null?Se(ke(t)):{},Ie(e||!t||!t.__esModule?re(r,"default",{value:t,enumerable:!0}):r,t));var ae=Pe((se,oe)=>{(function(){var t=function(e){var r=new t.Builder;return r.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),r.searchPipeline.add(t.stemmer),e.call(r,r),r.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(r){e.console&&console.warn&&console.warn(r)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var r=Object.create(null),n=Object.keys(e),i=0;i0){var d=t.utils.clone(r)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(n.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,r){r in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+r),e.label=r,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var r=e.label&&e.label in this.registeredFunctions;r||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var r=new t.Pipeline;return e.forEach(function(n){var i=t.Pipeline.registeredFunctions[n];if(i)r.add(i);else throw new Error("Cannot load unregistered function: "+n)}),r},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(r){t.Pipeline.warnIfFunctionNotRegistered(r),this._stack.push(r)},this)},t.Pipeline.prototype.after=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n=n+1,this._stack.splice(n,0,r)},t.Pipeline.prototype.before=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,r)},t.Pipeline.prototype.remove=function(e){var r=this._stack.indexOf(e);r!=-1&&this._stack.splice(r,1)},t.Pipeline.prototype.run=function(e){for(var r=this._stack.length,n=0;n1&&(oe&&(n=s),o!=e);)i=n-r,s=r+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(r+=n[u+1]*i[d+1],u+=2,d+=2);return r},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),r=1,n=0;r0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),y;m in s.node.edges?y=s.node.edges[m]:(y=new t.TokenSet,s.node.edges[m]=y),s.str.length==1&&(y.final=!0),i.push({node:y,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return n},t.TokenSet.fromString=function(e){for(var r=new t.TokenSet,n=r,i=0,s=e.length;i=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof se=="object"?oe.exports=r():e.lunr=r()}(this,function(){return t})})()});var ne=[];function G(t,e){ne.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){ne.forEach(r=>{e.querySelectorAll(r.selector).forEach(n=>{n.dataset.hasInstance||(new r.constructor({el:n,app:this}),n.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),r=e?.parentElement;for(;r&&!r.classList.contains(".tsd-navigation");)r instanceof HTMLDetailsElement&&(r.open=!0),r=r.parentElement;if(e){let n=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=n}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let r=e.parentElement;for(;r&&r.tagName!=="SECTION";)r=r.parentElement;if(r&&r.offsetParent==null){this.alwaysVisibleMember=r,r.classList.add("always-visible");let n=document.createElement("p");n.classList.add("warning"),n.textContent="This member is normally hidden due to your filter settings.",r.prepend(n)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let r;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(r),r=setTimeout(()=>{e.classList.remove("visible"),r=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout(()=>t(),e)}};var ce=Ce(ae());function de(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("tsd-search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let r=document.querySelector("#tsd-search input"),n=document.querySelector("#tsd-search .results");if(!r||!n)throw new Error("The input field or the result list wrapper was not found");let i=!1;n.addEventListener("mousedown",()=>i=!0),n.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Oe(t,n,r,s)}function Oe(t,e,r,n){r.addEventListener("input",ie(()=>{Re(t,e,r,n)},200));let i=!1;r.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Fe(e,r):s.key=="Escape"?r.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),r.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!r.matches(":focus")&&s.key==="/"&&(r.focus(),s.preventDefault())})}function _e(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=ce.Index.load(window.searchData.index))}function Re(t,e,r,n){if(_e(n,t),!n.index||!n.data)return;e.textContent="";let i=r.value.trim(),s=i?n.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${le(l.parent,i)}.${u}`);let d=document.createElement("li");d.classList.value=l.classes??"";let m=document.createElement("a");m.href=n.base+l.url,m.innerHTML=u,d.append(m),e.appendChild(d)}}function ue(t,e){let r=t.querySelector(".current");if(!r)r=t.querySelector(e==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let n=r;if(e===1)do n=n.nextElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);else do n=n.previousElementSibling??void 0;while(n instanceof HTMLElement&&n.offsetParent==null);n&&(r.classList.remove("current"),n.classList.add("current"))}}function Fe(t,e){let r=t.querySelector(".current");if(r||(r=t.querySelector("li:first-child")),r){let n=r.querySelector("a");n&&(window.location.href=n.href),e.blur()}}function le(t,e){if(e==="")return t;let r=t.toLocaleLowerCase(),n=e.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(K(t.substring(s))),i.join("")}var Me={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Me[e])}var P=class{constructor(e){this.el=e.el,this.app=e.app}};var M="mousedown",fe="mousemove",N="mouseup",J={x:0,y:0},he=!1,ee=!1,De=!1,D=!1,pe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(pe?"is-mobile":"not-mobile");pe&&"ontouchstart"in document.documentElement&&(De=!0,M="touchstart",fe="touchmove",N="touchend");document.addEventListener(M,t=>{ee=!0,D=!1;let e=M=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=M=="touchstart"?t.targetTouches[0]:t,r=J.x-(e.pageX||0),n=J.y-(e.pageY||0);D=Math.sqrt(r*r+n*n)>10}});document.addEventListener(N,()=>{ee=!1});document.addEventListener("click",t=>{he&&(t.preventDefault(),t.stopImmediatePropagation(),he=!1)});var X=class extends P{constructor(r){super(r);this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(M,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(r){if(this.active==r)return;this.active=r,document.documentElement.classList.toggle("has-"+this.className,r),this.el.classList.toggle("active",r);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(r){D||(this.setActive(!0),r.preventDefault())}onDocumentPointerDown(r){if(this.active){if(r.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(r){if(!D&&this.active&&r.target.closest(".col-sidebar")){let n=r.target.closest("a");if(n){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),n.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var me=document.head.appendChild(document.createElement("style"));me.dataset.for="filters";var Y=class extends P{constructor(r){super(r);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),me.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`}fromLocalStorage(){let r=Q.getItem(this.key);return r?r==="true":this.el.checked}setLocalStorage(r){Q.setItem(this.key,r.toString()),this.value=r,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let n=Array.from(r.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);r.style.display=n?"none":"block"})}};var Z=class extends P{constructor(r){super(r);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update()),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ve(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}de();G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var ge=document.getElementById("tsd-theme");ge&&ve(ge);var Ae=new U;Object.defineProperty(window,"app",{value:Ae});document.querySelectorAll("summary a").forEach(t=>{t.addEventListener("click",()=>{location.assign(t.href)})});})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/docs/assets/search.js b/docs/assets/search.js new file mode 100644 index 0000000..1a555b4 --- /dev/null +++ b/docs/assets/search.js @@ -0,0 +1 @@ +window.searchData = JSON.parse("{\"rows\":[{\"kind\":2,\"name\":\"core/config\",\"url\":\"modules/core_config.html\",\"classes\":\"\"},{\"kind\":2,\"name\":\"auth\",\"url\":\"modules/auth.html\",\"classes\":\"\"},{\"kind\":2,\"name\":\"widgets/oneTap\",\"url\":\"modules/widgets_oneTap.html\",\"classes\":\"\"},{\"kind\":2,\"name\":\"widgets/floatingOneTap\",\"url\":\"modules/widgets_floatingOneTap.html\",\"classes\":\"\"},{\"kind\":2,\"name\":\"widgets/oauthList\",\"url\":\"modules/widgets_oauthList.html\",\"classes\":\"\"},{\"kind\":2,\"name\":\"types\",\"url\":\"modules/types.html\",\"classes\":\"\"},{\"kind\":8,\"name\":\"Languages\",\"url\":\"enums/types.Languages.html\",\"classes\":\"\",\"parent\":\"types\"},{\"kind\":16,\"name\":\"RUS\",\"url\":\"enums/types.Languages.html#RUS\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":16,\"name\":\"UKR\",\"url\":\"enums/types.Languages.html#UKR\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":16,\"name\":\"ENG\",\"url\":\"enums/types.Languages.html#ENG\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":16,\"name\":\"SPA\",\"url\":\"enums/types.Languages.html#SPA\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":16,\"name\":\"GERMAN\",\"url\":\"enums/types.Languages.html#GERMAN\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":16,\"name\":\"POL\",\"url\":\"enums/types.Languages.html#POL\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":16,\"name\":\"FRA\",\"url\":\"enums/types.Languages.html#FRA\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":16,\"name\":\"TURKEY\",\"url\":\"enums/types.Languages.html#TURKEY\",\"classes\":\"\",\"parent\":\"types.Languages\"},{\"kind\":8,\"name\":\"Scheme\",\"url\":\"enums/types.Scheme.html\",\"classes\":\"\",\"parent\":\"types\"},{\"kind\":16,\"name\":\"LIGHT\",\"url\":\"enums/types.Scheme.html#LIGHT\",\"classes\":\"\",\"parent\":\"types.Scheme\"},{\"kind\":16,\"name\":\"DARK\",\"url\":\"enums/types.Scheme.html#DARK\",\"classes\":\"\",\"parent\":\"types.Scheme\"},{\"kind\":128,\"name\":\"Config\",\"url\":\"classes/core_config.Config.html\",\"classes\":\"\",\"parent\":\"core/config\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/core_config.Config.html#constructor\",\"classes\":\"\",\"parent\":\"core/config.Config\"},{\"kind\":2048,\"name\":\"set\",\"url\":\"classes/core_config.Config.html#set\",\"classes\":\"\",\"parent\":\"core/config.Config\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/core_config.Config.html#get\",\"classes\":\"\",\"parent\":\"core/config.Config\"},{\"kind\":8,\"name\":\"ConfigAuthMode\",\"url\":\"enums/core_config.ConfigAuthMode.html\",\"classes\":\"\",\"parent\":\"core/config\"},{\"kind\":16,\"name\":\"Redirect\",\"url\":\"enums/core_config.ConfigAuthMode.html#Redirect\",\"classes\":\"\",\"parent\":\"core/config.ConfigAuthMode\"},{\"kind\":16,\"name\":\"InNewTab\",\"url\":\"enums/core_config.ConfigAuthMode.html#InNewTab\",\"classes\":\"\",\"parent\":\"core/config.ConfigAuthMode\"},{\"kind\":256,\"name\":\"ConfigData\",\"url\":\"interfaces/core_config.ConfigData.html\",\"classes\":\"\",\"parent\":\"core/config\"},{\"kind\":1024,\"name\":\"app\",\"url\":\"interfaces/core_config.ConfigData.html#app\",\"classes\":\"\",\"parent\":\"core/config.ConfigData\"},{\"kind\":1024,\"name\":\"redirectUrl\",\"url\":\"interfaces/core_config.ConfigData.html#redirectUrl\",\"classes\":\"\",\"parent\":\"core/config.ConfigData\"},{\"kind\":1024,\"name\":\"state\",\"url\":\"interfaces/core_config.ConfigData.html#state\",\"classes\":\"\",\"parent\":\"core/config.ConfigData\"},{\"kind\":1024,\"name\":\"mode\",\"url\":\"interfaces/core_config.ConfigData.html#mode\",\"classes\":\"\",\"parent\":\"core/config.ConfigData\"},{\"kind\":128,\"name\":\"Auth\",\"url\":\"classes/auth.Auth.html\",\"classes\":\"\",\"parent\":\"auth\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/auth.Auth.html#constructor\",\"classes\":\"\",\"parent\":\"auth.Auth\"},{\"kind\":2048,\"name\":\"login\",\"url\":\"classes/auth.Auth.html#login\",\"classes\":\"\",\"parent\":\"auth.Auth\"},{\"kind\":8,\"name\":\"AuthErrorCode\",\"url\":\"enums/auth.AuthErrorCode.html\",\"classes\":\"\",\"parent\":\"auth\"},{\"kind\":16,\"name\":\"EventNotSupported\",\"url\":\"enums/auth.AuthErrorCode.html#EventNotSupported\",\"classes\":\"\",\"parent\":\"auth.AuthErrorCode\"},{\"kind\":16,\"name\":\"CannotCreateNewTab\",\"url\":\"enums/auth.AuthErrorCode.html#CannotCreateNewTab\",\"classes\":\"\",\"parent\":\"auth.AuthErrorCode\"},{\"kind\":16,\"name\":\"NewTabHasBeenClosed\",\"url\":\"enums/auth.AuthErrorCode.html#NewTabHasBeenClosed\",\"classes\":\"\",\"parent\":\"auth.AuthErrorCode\"},{\"kind\":16,\"name\":\"AuthorizationFailed\",\"url\":\"enums/auth.AuthErrorCode.html#AuthorizationFailed\",\"classes\":\"\",\"parent\":\"auth.AuthErrorCode\"},{\"kind\":256,\"name\":\"AuthParams\",\"url\":\"interfaces/auth.AuthParams.html\",\"classes\":\"\",\"parent\":\"auth\"},{\"kind\":1024,\"name\":\"scheme\",\"url\":\"interfaces/auth.AuthParams.html#scheme\",\"classes\":\"\",\"parent\":\"auth.AuthParams\"},{\"kind\":1024,\"name\":\"lang\",\"url\":\"interfaces/auth.AuthParams.html#lang\",\"classes\":\"\",\"parent\":\"auth.AuthParams\"},{\"kind\":256,\"name\":\"AuthError\",\"url\":\"interfaces/auth.AuthError.html\",\"classes\":\"\",\"parent\":\"auth\"},{\"kind\":1024,\"name\":\"code\",\"url\":\"interfaces/auth.AuthError.html#code\",\"classes\":\"\",\"parent\":\"auth.AuthError\"},{\"kind\":1024,\"name\":\"text\",\"url\":\"interfaces/auth.AuthError.html#text\",\"classes\":\"\",\"parent\":\"auth.AuthError\"},{\"kind\":1024,\"name\":\"details\",\"url\":\"interfaces/auth.AuthError.html#details\",\"classes\":\"\",\"parent\":\"auth.AuthError\"},{\"kind\":256,\"name\":\"AuthResponse\",\"url\":\"interfaces/auth.AuthResponse.html\",\"classes\":\"\",\"parent\":\"auth\"},{\"kind\":1024,\"name\":\"token\",\"url\":\"interfaces/auth.AuthResponse.html#token\",\"classes\":\"\",\"parent\":\"auth.AuthResponse\"},{\"kind\":1024,\"name\":\"type\",\"url\":\"interfaces/auth.AuthResponse.html#type\",\"classes\":\"\",\"parent\":\"auth.AuthResponse\"},{\"kind\":1024,\"name\":\"ttl\",\"url\":\"interfaces/auth.AuthResponse.html#ttl\",\"classes\":\"\",\"parent\":\"auth.AuthResponse\"},{\"kind\":128,\"name\":\"OneTap\",\"url\":\"classes/widgets_oneTap.OneTap.html\",\"classes\":\"\",\"parent\":\"widgets/oneTap\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/widgets_oneTap.OneTap.html#constructor\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTap\"},{\"kind\":2048,\"name\":\"render\",\"url\":\"classes/widgets_oneTap.OneTap.html#render\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTap\"},{\"kind\":2048,\"name\":\"close\",\"url\":\"classes/widgets_oneTap.OneTap.html#close\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTap\"},{\"kind\":2048,\"name\":\"show\",\"url\":\"classes/widgets_oneTap.OneTap.html#show\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTap\"},{\"kind\":2048,\"name\":\"hide\",\"url\":\"classes/widgets_oneTap.OneTap.html#hide\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTap\"},{\"kind\":2048,\"name\":\"on\",\"url\":\"classes/widgets_oneTap.OneTap.html#on\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTap\"},{\"kind\":2048,\"name\":\"off\",\"url\":\"classes/widgets_oneTap.OneTap.html#off\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTap\"},{\"kind\":256,\"name\":\"OneTapParams\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html\",\"classes\":\"\",\"parent\":\"widgets/oneTap\"},{\"kind\":1024,\"name\":\"showAlternativeLogin\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html#showAlternativeLogin\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapParams\"},{\"kind\":1024,\"name\":\"styles\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html#styles\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapParams\"},{\"kind\":1024,\"name\":\"skin\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html#skin\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapParams\"},{\"kind\":1024,\"name\":\"oauthList\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html#oauthList\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapParams\"},{\"kind\":1024,\"name\":\"container\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html#container\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTapParams\"},{\"kind\":1024,\"name\":\"scheme\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html#scheme\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTapParams\"},{\"kind\":1024,\"name\":\"lang\",\"url\":\"interfaces/widgets_oneTap.OneTapParams.html#lang\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oneTap.OneTapParams\"},{\"kind\":256,\"name\":\"OneTapStyles\",\"url\":\"interfaces/widgets_oneTap.OneTapStyles.html\",\"classes\":\"\",\"parent\":\"widgets/oneTap\"},{\"kind\":1024,\"name\":\"width\",\"url\":\"interfaces/widgets_oneTap.OneTapStyles.html#width\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapStyles\"},{\"kind\":1024,\"name\":\"height\",\"url\":\"interfaces/widgets_oneTap.OneTapStyles.html#height\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapStyles\"},{\"kind\":1024,\"name\":\"borderRadius\",\"url\":\"interfaces/widgets_oneTap.OneTapStyles.html#borderRadius\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapStyles\"},{\"kind\":8,\"name\":\"OneTapSkin\",\"url\":\"enums/widgets_oneTap.OneTapSkin.html\",\"classes\":\"\",\"parent\":\"widgets/oneTap\"},{\"kind\":16,\"name\":\"Primary\",\"url\":\"enums/widgets_oneTap.OneTapSkin.html#Primary\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapSkin\"},{\"kind\":16,\"name\":\"Secondary\",\"url\":\"enums/widgets_oneTap.OneTapSkin.html#Secondary\",\"classes\":\"\",\"parent\":\"widgets/oneTap.OneTapSkin\"},{\"kind\":128,\"name\":\"FloatingOneTap\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html#constructor\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTap\"},{\"kind\":2048,\"name\":\"render\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html#render\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTap\"},{\"kind\":2048,\"name\":\"close\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html#close\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTap\"},{\"kind\":2048,\"name\":\"show\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html#show\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTap\"},{\"kind\":2048,\"name\":\"hide\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html#hide\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTap\"},{\"kind\":2048,\"name\":\"on\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html#on\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTap\"},{\"kind\":2048,\"name\":\"off\",\"url\":\"classes/widgets_floatingOneTap.FloatingOneTap.html#off\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTap\"},{\"kind\":256,\"name\":\"FloatingOneTapParams\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap\"},{\"kind\":1024,\"name\":\"indent\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html#indent\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapParams\"},{\"kind\":1024,\"name\":\"contentId\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html#contentId\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapParams\"},{\"kind\":1024,\"name\":\"showAlternativeLogin\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html#showAlternativeLogin\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapParams\"},{\"kind\":1024,\"name\":\"appName\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html#appName\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapParams\"},{\"kind\":1024,\"name\":\"oauthList\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html#oauthList\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapParams\"},{\"kind\":1024,\"name\":\"lang\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html#lang\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapParams\"},{\"kind\":1024,\"name\":\"scheme\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapParams.html#scheme\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapParams\"},{\"kind\":8,\"name\":\"FloatingOneTapContentId\",\"url\":\"enums/widgets_floatingOneTap.FloatingOneTapContentId.html\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap\"},{\"kind\":16,\"name\":\"SIGN_IN_TO_SERVICE\",\"url\":\"enums/widgets_floatingOneTap.FloatingOneTapContentId.html#SIGN_IN_TO_SERVICE\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapContentId\"},{\"kind\":16,\"name\":\"SIGN_IN_TO_ACCOUNT\",\"url\":\"enums/widgets_floatingOneTap.FloatingOneTapContentId.html#SIGN_IN_TO_ACCOUNT\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapContentId\"},{\"kind\":16,\"name\":\"REGISTRATION_FOR_EVENT\",\"url\":\"enums/widgets_floatingOneTap.FloatingOneTapContentId.html#REGISTRATION_FOR_EVENT\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapContentId\"},{\"kind\":16,\"name\":\"SUBMIT_APPLICATIONS\",\"url\":\"enums/widgets_floatingOneTap.FloatingOneTapContentId.html#SUBMIT_APPLICATIONS\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapContentId\"},{\"kind\":16,\"name\":\"MAKE_ORDER_WITH_SERVICE\",\"url\":\"enums/widgets_floatingOneTap.FloatingOneTapContentId.html#MAKE_ORDER_WITH_SERVICE\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapContentId\"},{\"kind\":16,\"name\":\"MAKE_ORDER_WITHOUT_SERVICE\",\"url\":\"enums/widgets_floatingOneTap.FloatingOneTapContentId.html#MAKE_ORDER_WITHOUT_SERVICE\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapContentId\"},{\"kind\":256,\"name\":\"FloatingOneTapIndent\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap\"},{\"kind\":1024,\"name\":\"top\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html#top\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapIndent\"},{\"kind\":1024,\"name\":\"right\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html#right\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapIndent\"},{\"kind\":1024,\"name\":\"bottom\",\"url\":\"interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html#bottom\",\"classes\":\"\",\"parent\":\"widgets/floatingOneTap.FloatingOneTapIndent\"},{\"kind\":128,\"name\":\"OAuthList\",\"url\":\"classes/widgets_oauthList.OAuthList.html\",\"classes\":\"\",\"parent\":\"widgets/oauthList\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/widgets_oauthList.OAuthList.html#constructor\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthList\"},{\"kind\":2048,\"name\":\"render\",\"url\":\"classes/widgets_oauthList.OAuthList.html#render\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthList\"},{\"kind\":2048,\"name\":\"close\",\"url\":\"classes/widgets_oauthList.OAuthList.html#close\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthList\"},{\"kind\":2048,\"name\":\"show\",\"url\":\"classes/widgets_oauthList.OAuthList.html#show\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthList\"},{\"kind\":2048,\"name\":\"hide\",\"url\":\"classes/widgets_oauthList.OAuthList.html#hide\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthList\"},{\"kind\":2048,\"name\":\"on\",\"url\":\"classes/widgets_oauthList.OAuthList.html#on\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthList\"},{\"kind\":2048,\"name\":\"off\",\"url\":\"classes/widgets_oauthList.OAuthList.html#off\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthList\"},{\"kind\":256,\"name\":\"OAuthListParams\",\"url\":\"interfaces/widgets_oauthList.OAuthListParams.html\",\"classes\":\"\",\"parent\":\"widgets/oauthList\"},{\"kind\":1024,\"name\":\"styles\",\"url\":\"interfaces/widgets_oauthList.OAuthListParams.html#styles\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthListParams\"},{\"kind\":1024,\"name\":\"oauthList\",\"url\":\"interfaces/widgets_oauthList.OAuthListParams.html#oauthList\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthListParams\"},{\"kind\":1024,\"name\":\"container\",\"url\":\"interfaces/widgets_oauthList.OAuthListParams.html#container\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthListParams\"},{\"kind\":1024,\"name\":\"scheme\",\"url\":\"interfaces/widgets_oauthList.OAuthListParams.html#scheme\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthListParams\"},{\"kind\":1024,\"name\":\"lang\",\"url\":\"interfaces/widgets_oauthList.OAuthListParams.html#lang\",\"classes\":\"tsd-is-inherited\",\"parent\":\"widgets/oauthList.OAuthListParams\"},{\"kind\":8,\"name\":\"OAuthName\",\"url\":\"enums/widgets_oauthList.OAuthName.html\",\"classes\":\"\",\"parent\":\"widgets/oauthList\"},{\"kind\":16,\"name\":\"OK\",\"url\":\"enums/widgets_oauthList.OAuthName.html#OK\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthName\"},{\"kind\":16,\"name\":\"MAIL\",\"url\":\"enums/widgets_oauthList.OAuthName.html#MAIL\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthName\"},{\"kind\":16,\"name\":\"VK\",\"url\":\"enums/widgets_oauthList.OAuthName.html#VK\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthName\"},{\"kind\":256,\"name\":\"OAuthListStyles\",\"url\":\"interfaces/widgets_oauthList.OAuthListStyles.html\",\"classes\":\"\",\"parent\":\"widgets/oauthList\"},{\"kind\":1024,\"name\":\"height\",\"url\":\"interfaces/widgets_oauthList.OAuthListStyles.html#height\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthListStyles\"},{\"kind\":1024,\"name\":\"borderRadius\",\"url\":\"interfaces/widgets_oauthList.OAuthListStyles.html#borderRadius\",\"classes\":\"\",\"parent\":\"widgets/oauthList.OAuthListStyles\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,43.903]],[\"comment/0\",[]],[\"name/1\",[1,38.795]],[\"comment/1\",[]],[\"name/2\",[2,43.903]],[\"comment/2\",[]],[\"name/3\",[3,43.903]],[\"comment/3\",[]],[\"name/4\",[4,43.903]],[\"comment/4\",[]],[\"name/5\",[5,43.903]],[\"comment/5\",[]],[\"name/6\",[6,43.903]],[\"comment/6\",[]],[\"name/7\",[7,43.903]],[\"comment/7\",[]],[\"name/8\",[8,43.903]],[\"comment/8\",[]],[\"name/9\",[9,43.903]],[\"comment/9\",[]],[\"name/10\",[10,43.903]],[\"comment/10\",[]],[\"name/11\",[11,43.903]],[\"comment/11\",[]],[\"name/12\",[12,43.903]],[\"comment/12\",[]],[\"name/13\",[13,43.903]],[\"comment/13\",[]],[\"name/14\",[14,43.903]],[\"comment/14\",[]],[\"name/15\",[15,30.91]],[\"comment/15\",[]],[\"name/16\",[16,43.903]],[\"comment/16\",[]],[\"name/17\",[17,43.903]],[\"comment/17\",[]],[\"name/18\",[18,43.903]],[\"comment/18\",[]],[\"name/19\",[19,30.91]],[\"comment/19\",[]],[\"name/20\",[20,43.903]],[\"comment/20\",[]],[\"name/21\",[21,43.903]],[\"comment/21\",[]],[\"name/22\",[22,43.903]],[\"comment/22\",[]],[\"name/23\",[23,43.903]],[\"comment/23\",[]],[\"name/24\",[24,43.903]],[\"comment/24\",[]],[\"name/25\",[25,43.903]],[\"comment/25\",[]],[\"name/26\",[26,43.903]],[\"comment/26\",[]],[\"name/27\",[27,43.903]],[\"comment/27\",[]],[\"name/28\",[28,43.903]],[\"comment/28\",[]],[\"name/29\",[29,43.903]],[\"comment/29\",[]],[\"name/30\",[1,38.795]],[\"comment/30\",[]],[\"name/31\",[19,30.91]],[\"comment/31\",[]],[\"name/32\",[30,43.903]],[\"comment/32\",[]],[\"name/33\",[31,43.903]],[\"comment/33\",[]],[\"name/34\",[32,43.903]],[\"comment/34\",[]],[\"name/35\",[33,43.903]],[\"comment/35\",[]],[\"name/36\",[34,43.903]],[\"comment/36\",[]],[\"name/37\",[35,43.903]],[\"comment/37\",[]],[\"name/38\",[36,43.903]],[\"comment/38\",[]],[\"name/39\",[15,30.91]],[\"comment/39\",[]],[\"name/40\",[37,32.917]],[\"comment/40\",[]],[\"name/41\",[38,43.903]],[\"comment/41\",[]],[\"name/42\",[39,43.903]],[\"comment/42\",[]],[\"name/43\",[40,43.903]],[\"comment/43\",[]],[\"name/44\",[41,43.903]],[\"comment/44\",[]],[\"name/45\",[42,43.903]],[\"comment/45\",[]],[\"name/46\",[43,43.903]],[\"comment/46\",[]],[\"name/47\",[44,43.903]],[\"comment/47\",[]],[\"name/48\",[45,43.903]],[\"comment/48\",[]],[\"name/49\",[46,43.903]],[\"comment/49\",[]],[\"name/50\",[19,30.91]],[\"comment/50\",[]],[\"name/51\",[47,35.43]],[\"comment/51\",[]],[\"name/52\",[48,35.43]],[\"comment/52\",[]],[\"name/53\",[49,35.43]],[\"comment/53\",[]],[\"name/54\",[50,35.43]],[\"comment/54\",[]],[\"name/55\",[51,35.43]],[\"comment/55\",[]],[\"name/56\",[52,35.43]],[\"comment/56\",[]],[\"name/57\",[53,43.903]],[\"comment/57\",[]],[\"name/58\",[54,38.795]],[\"comment/58\",[]],[\"name/59\",[55,38.795]],[\"comment/59\",[]],[\"name/60\",[56,43.903]],[\"comment/60\",[]],[\"name/61\",[57,32.917]],[\"comment/61\",[]],[\"name/62\",[58,38.795]],[\"comment/62\",[]],[\"name/63\",[15,30.91]],[\"comment/63\",[]],[\"name/64\",[37,32.917]],[\"comment/64\",[]],[\"name/65\",[59,43.903]],[\"comment/65\",[]],[\"name/66\",[60,43.903]],[\"comment/66\",[]],[\"name/67\",[61,38.795]],[\"comment/67\",[]],[\"name/68\",[62,38.795]],[\"comment/68\",[]],[\"name/69\",[63,43.903]],[\"comment/69\",[]],[\"name/70\",[64,43.903]],[\"comment/70\",[]],[\"name/71\",[65,43.903]],[\"comment/71\",[]],[\"name/72\",[66,43.903]],[\"comment/72\",[]],[\"name/73\",[19,30.91]],[\"comment/73\",[]],[\"name/74\",[47,35.43]],[\"comment/74\",[]],[\"name/75\",[48,35.43]],[\"comment/75\",[]],[\"name/76\",[49,35.43]],[\"comment/76\",[]],[\"name/77\",[50,35.43]],[\"comment/77\",[]],[\"name/78\",[51,35.43]],[\"comment/78\",[]],[\"name/79\",[52,35.43]],[\"comment/79\",[]],[\"name/80\",[67,43.903]],[\"comment/80\",[]],[\"name/81\",[68,43.903]],[\"comment/81\",[]],[\"name/82\",[69,43.903]],[\"comment/82\",[]],[\"name/83\",[54,38.795]],[\"comment/83\",[]],[\"name/84\",[70,43.903]],[\"comment/84\",[]],[\"name/85\",[57,32.917]],[\"comment/85\",[]],[\"name/86\",[37,32.917]],[\"comment/86\",[]],[\"name/87\",[15,30.91]],[\"comment/87\",[]],[\"name/88\",[71,43.903]],[\"comment/88\",[]],[\"name/89\",[72,43.903]],[\"comment/89\",[]],[\"name/90\",[73,43.903]],[\"comment/90\",[]],[\"name/91\",[74,43.903]],[\"comment/91\",[]],[\"name/92\",[75,43.903]],[\"comment/92\",[]],[\"name/93\",[76,43.903]],[\"comment/93\",[]],[\"name/94\",[77,43.903]],[\"comment/94\",[]],[\"name/95\",[78,43.903]],[\"comment/95\",[]],[\"name/96\",[79,43.903]],[\"comment/96\",[]],[\"name/97\",[80,43.903]],[\"comment/97\",[]],[\"name/98\",[81,43.903]],[\"comment/98\",[]],[\"name/99\",[57,32.917]],[\"comment/99\",[]],[\"name/100\",[19,30.91]],[\"comment/100\",[]],[\"name/101\",[47,35.43]],[\"comment/101\",[]],[\"name/102\",[48,35.43]],[\"comment/102\",[]],[\"name/103\",[49,35.43]],[\"comment/103\",[]],[\"name/104\",[50,35.43]],[\"comment/104\",[]],[\"name/105\",[51,35.43]],[\"comment/105\",[]],[\"name/106\",[52,35.43]],[\"comment/106\",[]],[\"name/107\",[82,43.903]],[\"comment/107\",[]],[\"name/108\",[55,38.795]],[\"comment/108\",[]],[\"name/109\",[57,32.917]],[\"comment/109\",[]],[\"name/110\",[58,38.795]],[\"comment/110\",[]],[\"name/111\",[15,30.91]],[\"comment/111\",[]],[\"name/112\",[37,32.917]],[\"comment/112\",[]],[\"name/113\",[83,43.903]],[\"comment/113\",[]],[\"name/114\",[84,43.903]],[\"comment/114\",[]],[\"name/115\",[85,43.903]],[\"comment/115\",[]],[\"name/116\",[86,43.903]],[\"comment/116\",[]],[\"name/117\",[87,43.903]],[\"comment/117\",[]],[\"name/118\",[61,38.795]],[\"comment/118\",[]],[\"name/119\",[62,38.795]],[\"comment/119\",[]]],\"invertedIndex\":[[\"app\",{\"_index\":26,\"name\":{\"26\":{}},\"comment\":{}}],[\"appname\",{\"_index\":70,\"name\":{\"84\":{}},\"comment\":{}}],[\"auth\",{\"_index\":1,\"name\":{\"1\":{},\"30\":{}},\"comment\":{}}],[\"autherror\",{\"_index\":38,\"name\":{\"41\":{}},\"comment\":{}}],[\"autherrorcode\",{\"_index\":31,\"name\":{\"33\":{}},\"comment\":{}}],[\"authorizationfailed\",{\"_index\":35,\"name\":{\"37\":{}},\"comment\":{}}],[\"authparams\",{\"_index\":36,\"name\":{\"38\":{}},\"comment\":{}}],[\"authresponse\",{\"_index\":42,\"name\":{\"45\":{}},\"comment\":{}}],[\"borderradius\",{\"_index\":62,\"name\":{\"68\":{},\"119\":{}},\"comment\":{}}],[\"bottom\",{\"_index\":81,\"name\":{\"98\":{}},\"comment\":{}}],[\"cannotcreatenewtab\",{\"_index\":33,\"name\":{\"35\":{}},\"comment\":{}}],[\"close\",{\"_index\":48,\"name\":{\"52\":{},\"75\":{},\"102\":{}},\"comment\":{}}],[\"code\",{\"_index\":39,\"name\":{\"42\":{}},\"comment\":{}}],[\"config\",{\"_index\":18,\"name\":{\"18\":{}},\"comment\":{}}],[\"configauthmode\",{\"_index\":22,\"name\":{\"22\":{}},\"comment\":{}}],[\"configdata\",{\"_index\":25,\"name\":{\"25\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":19,\"name\":{\"19\":{},\"31\":{},\"50\":{},\"73\":{},\"100\":{}},\"comment\":{}}],[\"container\",{\"_index\":58,\"name\":{\"62\":{},\"110\":{}},\"comment\":{}}],[\"contentid\",{\"_index\":69,\"name\":{\"82\":{}},\"comment\":{}}],[\"core/config\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"dark\",{\"_index\":17,\"name\":{\"17\":{}},\"comment\":{}}],[\"details\",{\"_index\":41,\"name\":{\"44\":{}},\"comment\":{}}],[\"eng\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"eventnotsupported\",{\"_index\":32,\"name\":{\"34\":{}},\"comment\":{}}],[\"floatingonetap\",{\"_index\":66,\"name\":{\"72\":{}},\"comment\":{}}],[\"floatingonetapcontentid\",{\"_index\":71,\"name\":{\"88\":{}},\"comment\":{}}],[\"floatingonetapindent\",{\"_index\":78,\"name\":{\"95\":{}},\"comment\":{}}],[\"floatingonetapparams\",{\"_index\":67,\"name\":{\"80\":{}},\"comment\":{}}],[\"fra\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}],[\"german\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"get\",{\"_index\":21,\"name\":{\"21\":{}},\"comment\":{}}],[\"height\",{\"_index\":61,\"name\":{\"67\":{},\"118\":{}},\"comment\":{}}],[\"hide\",{\"_index\":50,\"name\":{\"54\":{},\"77\":{},\"104\":{}},\"comment\":{}}],[\"indent\",{\"_index\":68,\"name\":{\"81\":{}},\"comment\":{}}],[\"innewtab\",{\"_index\":24,\"name\":{\"24\":{}},\"comment\":{}}],[\"lang\",{\"_index\":37,\"name\":{\"40\":{},\"64\":{},\"86\":{},\"112\":{}},\"comment\":{}}],[\"languages\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"light\",{\"_index\":16,\"name\":{\"16\":{}},\"comment\":{}}],[\"login\",{\"_index\":30,\"name\":{\"32\":{}},\"comment\":{}}],[\"mail\",{\"_index\":85,\"name\":{\"115\":{}},\"comment\":{}}],[\"make_order_with_service\",{\"_index\":76,\"name\":{\"93\":{}},\"comment\":{}}],[\"make_order_without_service\",{\"_index\":77,\"name\":{\"94\":{}},\"comment\":{}}],[\"mode\",{\"_index\":29,\"name\":{\"29\":{}},\"comment\":{}}],[\"newtabhasbeenclosed\",{\"_index\":34,\"name\":{\"36\":{}},\"comment\":{}}],[\"oauthlist\",{\"_index\":57,\"name\":{\"61\":{},\"85\":{},\"99\":{},\"109\":{}},\"comment\":{}}],[\"oauthlistparams\",{\"_index\":82,\"name\":{\"107\":{}},\"comment\":{}}],[\"oauthliststyles\",{\"_index\":87,\"name\":{\"117\":{}},\"comment\":{}}],[\"oauthname\",{\"_index\":83,\"name\":{\"113\":{}},\"comment\":{}}],[\"off\",{\"_index\":52,\"name\":{\"56\":{},\"79\":{},\"106\":{}},\"comment\":{}}],[\"ok\",{\"_index\":84,\"name\":{\"114\":{}},\"comment\":{}}],[\"on\",{\"_index\":51,\"name\":{\"55\":{},\"78\":{},\"105\":{}},\"comment\":{}}],[\"onetap\",{\"_index\":46,\"name\":{\"49\":{}},\"comment\":{}}],[\"onetapparams\",{\"_index\":53,\"name\":{\"57\":{}},\"comment\":{}}],[\"onetapskin\",{\"_index\":63,\"name\":{\"69\":{}},\"comment\":{}}],[\"onetapstyles\",{\"_index\":59,\"name\":{\"65\":{}},\"comment\":{}}],[\"pol\",{\"_index\":12,\"name\":{\"12\":{}},\"comment\":{}}],[\"primary\",{\"_index\":64,\"name\":{\"70\":{}},\"comment\":{}}],[\"redirect\",{\"_index\":23,\"name\":{\"23\":{}},\"comment\":{}}],[\"redirecturl\",{\"_index\":27,\"name\":{\"27\":{}},\"comment\":{}}],[\"registration_for_event\",{\"_index\":74,\"name\":{\"91\":{}},\"comment\":{}}],[\"render\",{\"_index\":47,\"name\":{\"51\":{},\"74\":{},\"101\":{}},\"comment\":{}}],[\"right\",{\"_index\":80,\"name\":{\"97\":{}},\"comment\":{}}],[\"rus\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"scheme\",{\"_index\":15,\"name\":{\"15\":{},\"39\":{},\"63\":{},\"87\":{},\"111\":{}},\"comment\":{}}],[\"secondary\",{\"_index\":65,\"name\":{\"71\":{}},\"comment\":{}}],[\"set\",{\"_index\":20,\"name\":{\"20\":{}},\"comment\":{}}],[\"show\",{\"_index\":49,\"name\":{\"53\":{},\"76\":{},\"103\":{}},\"comment\":{}}],[\"showalternativelogin\",{\"_index\":54,\"name\":{\"58\":{},\"83\":{}},\"comment\":{}}],[\"sign_in_to_account\",{\"_index\":73,\"name\":{\"90\":{}},\"comment\":{}}],[\"sign_in_to_service\",{\"_index\":72,\"name\":{\"89\":{}},\"comment\":{}}],[\"skin\",{\"_index\":56,\"name\":{\"60\":{}},\"comment\":{}}],[\"spa\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"state\",{\"_index\":28,\"name\":{\"28\":{}},\"comment\":{}}],[\"styles\",{\"_index\":55,\"name\":{\"59\":{},\"108\":{}},\"comment\":{}}],[\"submit_applications\",{\"_index\":75,\"name\":{\"92\":{}},\"comment\":{}}],[\"text\",{\"_index\":40,\"name\":{\"43\":{}},\"comment\":{}}],[\"token\",{\"_index\":43,\"name\":{\"46\":{}},\"comment\":{}}],[\"top\",{\"_index\":79,\"name\":{\"96\":{}},\"comment\":{}}],[\"ttl\",{\"_index\":45,\"name\":{\"48\":{}},\"comment\":{}}],[\"turkey\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"type\",{\"_index\":44,\"name\":{\"47\":{}},\"comment\":{}}],[\"types\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"ukr\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"vk\",{\"_index\":86,\"name\":{\"116\":{}},\"comment\":{}}],[\"widgets/floatingonetap\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"widgets/oauthlist\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"widgets/onetap\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"width\",{\"_index\":60,\"name\":{\"66\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css new file mode 100644 index 0000000..18b4f8f --- /dev/null +++ b/docs/assets/style.css @@ -0,0 +1,1367 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + /* object literal not included as it is not used and will be removed in 0.25 */ + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a, +h2 > a, +h3 > a, +h4 > a, +h5 > a, +h6 > a { + text-decoration: none; + color: var(--color-text); +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography h4, +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; + margin: 0; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.5rem); +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: inline-flex; + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: calc(100% - 1.75rem - 0.5rem); +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + padding: 0 10px; + background-color: var(--color-background); +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current, +#tsd-search .results li:hover { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: block; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: opacity 0.1s, background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/docs/classes/auth.Auth.html b/docs/classes/auth.Auth.html new file mode 100644 index 0000000..5c2e584 --- /dev/null +++ b/docs/classes/auth.Auth.html @@ -0,0 +1,127 @@ +Auth | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Class Auth

+
+

Hierarchy

+
    +
  • Auth
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Methods

+
+ +
    + +
  • +
    +

    Parameters

    +
    +

    Returns void

+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/classes/core_config.Config.html b/docs/classes/core_config.Config.html new file mode 100644 index 0000000..37fce53 --- /dev/null +++ b/docs/classes/core_config.Config.html @@ -0,0 +1,135 @@ +Config | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Class Config

+
+

Hierarchy

+
    +
  • Config
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
get +set +
+
+

Constructors

+
+ +
+
+

Methods

+
+ +
+
+ +
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/classes/widgets_floatingOneTap.FloatingOneTap.html b/docs/classes/widgets_floatingOneTap.FloatingOneTap.html new file mode 100644 index 0000000..fb83323 --- /dev/null +++ b/docs/classes/widgets_floatingOneTap.FloatingOneTap.html @@ -0,0 +1,190 @@ +FloatingOneTap | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Class FloatingOneTap

+
+

Hierarchy

+
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
+
+

Constructors

+
+ +
+
+

Methods

+
+ +
    + +
  • +

    Returns void

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/classes/widgets_oauthList.OAuthList.html b/docs/classes/widgets_oauthList.OAuthList.html new file mode 100644 index 0000000..2dfdd77 --- /dev/null +++ b/docs/classes/widgets_oauthList.OAuthList.html @@ -0,0 +1,190 @@ +OAuthList | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Class OAuthList

+
+

Hierarchy

+
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +

    Returns OAuthList

+
+

Methods

+
+ +
    + +
  • +

    Returns void

+
+ +
+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      event: string
    • +
    • +
      handler: any
    +

    Returns OAuthList

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      event: string
    • +
    • +
      handler: any
    +

    Returns OAuthList

+
+ +
+
+ +
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/classes/widgets_oneTap.OneTap.html b/docs/classes/widgets_oneTap.OneTap.html new file mode 100644 index 0000000..f436d7d --- /dev/null +++ b/docs/classes/widgets_oneTap.OneTap.html @@ -0,0 +1,190 @@ +OneTap | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Class OneTap

+
+

Hierarchy

+
+
+
+
+ +
+
+

Constructors

+
+
+

Methods

+
+
+

Constructors

+
+ +
    + +
  • +

    Returns OneTap

+
+

Methods

+
+ +
    + +
  • +

    Returns void

+
+ +
    + +
  • +

    Returns OneTap

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      event: string
    • +
    • +
      handler: any
    +

    Returns OneTap

+
+ +
    + +
  • +
    +

    Parameters

    +
      +
    • +
      event: string
    • +
    • +
      handler: any
    +

    Returns OneTap

+
+ +
+
+ +
    + +
  • +

    Returns OneTap

+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/enums/auth.AuthErrorCode.html b/docs/enums/auth.AuthErrorCode.html new file mode 100644 index 0000000..b9dde8f --- /dev/null +++ b/docs/enums/auth.AuthErrorCode.html @@ -0,0 +1,125 @@ +AuthErrorCode | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Enumeration AuthErrorCode

+
+
+
+ +
+
+

Enumeration Members

+
+ +
AuthorizationFailed: 103
+

Авторизация завершилась ошибкой

+
+
+ +
CannotCreateNewTab: 101
+

Новая вкладка не создалась

+
+
+ +
EventNotSupported: 100
+

Неизвестное событие

+
+
+ +
NewTabHasBeenClosed: 102
+

Новая вкладка была закрыта

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/enums/core_config.ConfigAuthMode.html b/docs/enums/core_config.ConfigAuthMode.html new file mode 100644 index 0000000..73d067e --- /dev/null +++ b/docs/enums/core_config.ConfigAuthMode.html @@ -0,0 +1,107 @@ +ConfigAuthMode | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Enumeration ConfigAuthMode

+
+
+
+ +
+
+

Enumeration Members

+
+
+

Enumeration Members

+
+ +
InNewTab: "new_tab"
+
+ +
Redirect: "redirect"
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/enums/types.Languages.html b/docs/enums/types.Languages.html new file mode 100644 index 0000000..24d2006 --- /dev/null +++ b/docs/enums/types.Languages.html @@ -0,0 +1,137 @@ +Languages | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Enumeration Languages

+
+
+
+ +
+
+

Enumeration Members

+
+
+

Enumeration Members

+
+ +
ENG: 3
+
+ +
FRA: 16
+
+ +
GERMAN: 6
+
+ +
POL: 15
+
+ +
RUS: 0
+
+ +
SPA: 4
+
+ +
TURKEY: 82
+
+ +
UKR: 1
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/enums/types.Scheme.html b/docs/enums/types.Scheme.html new file mode 100644 index 0000000..5cede52 --- /dev/null +++ b/docs/enums/types.Scheme.html @@ -0,0 +1,107 @@ +Scheme | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Enumeration Scheme

+
+
+
+ +
+
+

Enumeration Members

+
+
+

Enumeration Members

+
+ +
DARK: "dark"
+
+ +
LIGHT: "light"
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/enums/widgets_floatingOneTap.FloatingOneTapContentId.html b/docs/enums/widgets_floatingOneTap.FloatingOneTapContentId.html new file mode 100644 index 0000000..ef9202f --- /dev/null +++ b/docs/enums/widgets_floatingOneTap.FloatingOneTapContentId.html @@ -0,0 +1,139 @@ +FloatingOneTapContentId | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Enumeration FloatingOneTapContentId

+
+
+
+ +
+
+

Enumeration Members

+
+ +
MAKE_ORDER_WITHOUT_SERVICE: 5
+

Оформление заказа

+
+
+ +
MAKE_ORDER_WITH_SERVICE: 4
+

Оформление заказа в сервисе

+
+
+ +
REGISTRATION_FOR_EVENT: 2
+

Регистрация на мероприятие

+
+
+ +
SIGN_IN_TO_ACCOUNT: 1
+

Войти в учетную запись сервиса

+
+
+ +
SIGN_IN_TO_SERVICE: 0
+

Войти или зарегистрироваться

+
+
+ +
SUBMIT_APPLICATIONS: 3
+

Подача заявки

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/enums/widgets_oauthList.OAuthName.html b/docs/enums/widgets_oauthList.OAuthName.html new file mode 100644 index 0000000..f0f4882 --- /dev/null +++ b/docs/enums/widgets_oauthList.OAuthName.html @@ -0,0 +1,112 @@ +OAuthName | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Enumeration OAuthName

+
+
+
+ +
+
+

Enumeration Members

+
MAIL +OK +VK +
+
+

Enumeration Members

+
+ +
MAIL: "mail_ru"
+
+ +
OK: "ok_ru"
+
+ +
VK: "vkid"
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/enums/widgets_oneTap.OneTapSkin.html b/docs/enums/widgets_oneTap.OneTapSkin.html new file mode 100644 index 0000000..98a4cd3 --- /dev/null +++ b/docs/enums/widgets_oneTap.OneTapSkin.html @@ -0,0 +1,107 @@ +OneTapSkin | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Enumeration OneTapSkin

+
+
+
+ +
+
+

Enumeration Members

+
+
+

Enumeration Members

+
+ +
Primary: "primary"
+
+ +
Secondary: "secondary"
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..8781b1b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,164 @@ +@vkid/sdk - v1.1.0
+
+ +
+
+
+
+

@vkid/sdk - v1.1.0

+
+

+ +

+

+ + + + + + + + + + + npm + + + npm bundle size + +

+

+ VK ID SDK — это библиотека для безопасной и удобной авторизации пользователей в вашем сервисе через VK ID. +

+
+ +
+

VK ID SDK сейчас находится в бета-тестировании. О проблемах вы можете сообщить с помощью issues репозитория.

+
+

Установка

NPM:

+
npm i @vkid/sdk
+
+

YARN:

+
yarn add @vkid/sdk
+
+

PNPM:

+
pnpm add @vkid/sdk
+
+

CDN:

+
<script src="https://unpkg.com/@vkid/sdk@latest/dist-sdk/umd/index.js"></script>
+
+
+

Обратите внимание: Для работы авторизации нужен APP_ID. Вы получите его, когда создадите приложение в кабинете подключения VK ID.

+
+

Пример

+ Базовая авторизация + +
import * as VKID from '@vkid/sdk';

VKID.Config.set({
app: APP_ID,
redirectUrl: 'https://example.com'
});


const authButton = document.createElement('button');
authButton.onclick = () => {
VKID.Auth.login(); // После авторизации будет редирект на адрес, указанный в параметре redirect_uri
};

document.getElementById('container').appendChild(authButton); +
+
+ +
+ OneTap + +
import * as VKID from '@vkid/sdk';

VKID.Config.set({
app: APP_ID,
redirectUrl: 'https://example.com'
});

const oneTap = new VKID.OneTap();

const container = document.getElementById('VkIdSdkOneTap');

if (container) {
oneTap.render({ container });
} +
+
+ +

Документация

+

Contributing

Проект VK ID SDK имеет открытый исходный код на GitHub, и вы можете присоединиться к его доработке — мы будем благодарны за внесение улучшений и исправление возможных ошибок.

+

Code of Conduct

Если вы собираетесь вносить изменения в проект VK ID SDK, следуйте правилам разработки. Они помогут понять, какие действия возможны, а какие недопустимы.

+

Contributing Guide

В руководстве вы можете подробно ознакомиться с процессом разработки и узнать, как предлагать улучшения и исправления, а ещё — как добавлять и тестировать свои изменения в VK ID SDK. +Также рекомендуем ознакомиться с общими правилами оформления кода в проекте.

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/auth.AuthError.html b/docs/interfaces/auth.AuthError.html new file mode 100644 index 0000000..55d1418 --- /dev/null +++ b/docs/interfaces/auth.AuthError.html @@ -0,0 +1,122 @@ +AuthError | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface AuthError

+
+

Hierarchy

+
    +
  • AuthError
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ + +

Код ошибки

+
+
+ +
details?: any
+

Расширенная информация об ошибке

+
+
+ +
text: string
+

Текст ошибки

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/auth.AuthParams.html b/docs/interfaces/auth.AuthParams.html new file mode 100644 index 0000000..9868529 --- /dev/null +++ b/docs/interfaces/auth.AuthParams.html @@ -0,0 +1,115 @@ +AuthParams | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface AuthParams

+
+

Hierarchy

+
    +
  • AuthParams
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ +
lang?: Languages
+

Локализация, в которой будет отображена страница авторизации

+
+
+ +
scheme?: Scheme
+

Цветовая тема, в которой будет отображена страница авторизации

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/auth.AuthResponse.html b/docs/interfaces/auth.AuthResponse.html new file mode 100644 index 0000000..f39e9a2 --- /dev/null +++ b/docs/interfaces/auth.AuthResponse.html @@ -0,0 +1,122 @@ +AuthResponse | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface AuthResponse

+
+

Hierarchy

+
    +
  • AuthResponse
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ +
token: string
+

Токен, полученный после прохождения авторизации

+
+
+ +
ttl: number
+

Время жизни токена

+
+
+ +
type: "silent_token"
+

Вид токена

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/core_config.ConfigData.html b/docs/interfaces/core_config.ConfigData.html new file mode 100644 index 0000000..c4b1ed9 --- /dev/null +++ b/docs/interfaces/core_config.ConfigData.html @@ -0,0 +1,121 @@ +ConfigData | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface ConfigData

+
+

Hierarchy

+
    +
  • ConfigData
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ +
app: number
+
+ +
+
+ +
redirectUrl: string
+
+ +
state?: string
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html b/docs/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html new file mode 100644 index 0000000..06a0334 --- /dev/null +++ b/docs/interfaces/widgets_floatingOneTap.FloatingOneTapIndent.html @@ -0,0 +1,122 @@ +FloatingOneTapIndent | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface FloatingOneTapIndent

+
+

Hierarchy

+
    +
  • FloatingOneTapIndent
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ +
bottom?: number
+

Отступы от нижней границы окна (учитывается только в мобильном отображении)

+
+
+ +
right?: number
+

Отступы от правой границы окна (не учитывается в мобильном отображении)

+
+
+ +
top?: number
+

Отступ от верхней границы окна (не учитывается в мобильном отображении)

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/widgets_floatingOneTap.FloatingOneTapParams.html b/docs/interfaces/widgets_floatingOneTap.FloatingOneTapParams.html new file mode 100644 index 0000000..3d26883 --- /dev/null +++ b/docs/interfaces/widgets_floatingOneTap.FloatingOneTapParams.html @@ -0,0 +1,154 @@ +FloatingOneTapParams | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface FloatingOneTapParams

+
+

Hierarchy

+
    +
  • Omit<WidgetParams, "container"> +
      +
    • FloatingOneTapParams
+
+
+
+ +
+
+

Properties

+
+ +
appName: string
+

Имя приложения из конфигурации приложения VK ID

+
+
+ + +

Тип отображаемого контента

+
+
+ + +

Отступы от границ окна

+
+
+ +
lang?: Languages
+

Локализация

+
+
+ +
oauthList?: OAuthName[]
+

Список внешних сервисов авторизации

+
+
+ +
scheme?: Scheme
+

Цветовая схема виджета

+
+
+ +
showAlternativeLogin?: boolean | 0 | 1
+

Отображение кнопки входа другим способом

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/widgets_oauthList.OAuthListParams.html b/docs/interfaces/widgets_oauthList.OAuthListParams.html new file mode 100644 index 0000000..b63a079 --- /dev/null +++ b/docs/interfaces/widgets_oauthList.OAuthListParams.html @@ -0,0 +1,141 @@ +OAuthListParams | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface OAuthListParams

+
+

Hierarchy

+
    +
  • WidgetParams +
      +
    • OAuthListParams
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ +
container: HTMLElement
+

HTML элемент, в который будет вставлен виджет

+
+
+ +
lang?: Languages
+

Локализация

+
+
+ +
oauthList: OAuthName[]
+

Список внешних сервисов авторизации

+
+
+ +
scheme?: Scheme
+

Цветовая схема виджета

+
+
+ + +

Настройки внешнего вида

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/widgets_oauthList.OAuthListStyles.html b/docs/interfaces/widgets_oauthList.OAuthListStyles.html new file mode 100644 index 0000000..a8f0439 --- /dev/null +++ b/docs/interfaces/widgets_oauthList.OAuthListStyles.html @@ -0,0 +1,115 @@ +OAuthListStyles | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface OAuthListStyles

+
+

Hierarchy

+
    +
  • OAuthListStyles
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ +
borderRadius?: number
+

Скругление иконок

+
+
+ +
height?: 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56
+

Высота кнопки

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/widgets_oneTap.OneTapParams.html b/docs/interfaces/widgets_oneTap.OneTapParams.html new file mode 100644 index 0000000..6b04702 --- /dev/null +++ b/docs/interfaces/widgets_oneTap.OneTapParams.html @@ -0,0 +1,155 @@ +OneTapParams | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface OneTapParams

+
+

Hierarchy

+
    +
  • WidgetParams +
      +
    • OneTapParams
+
+
+
+ +
+
+

Properties

+
+ +
container: HTMLElement
+

HTML элемент, в который будет вставлен виджет

+
+
+ +
lang?: Languages
+

Локализация

+
+
+ +
oauthList?: OAuthName[]
+

Список внешних сервисов авторизации

+
+
+ +
scheme?: Scheme
+

Цветовая схема виджета

+
+
+ +
showAlternativeLogin?: boolean | 0 | 1
+

Отображение кнопки входа другим способом

+
+
+ +
skin?: OneTapSkin
+

Стиль отображения кнопки

+
+
+ +
styles?: OneTapStyles
+

Настройки внешнего вида

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/interfaces/widgets_oneTap.OneTapStyles.html b/docs/interfaces/widgets_oneTap.OneTapStyles.html new file mode 100644 index 0000000..9975a3e --- /dev/null +++ b/docs/interfaces/widgets_oneTap.OneTapStyles.html @@ -0,0 +1,122 @@ +OneTapStyles | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Interface OneTapStyles

+
+

Hierarchy

+
    +
  • OneTapStyles
+
+
+
+ +
+
+

Properties

+
+
+

Properties

+
+ +
borderRadius?: number
+

Скругление кнопки

+
+
+ +
height?: 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56
+

Высота кнопки

+
+
+ +
width?: number
+

Ширина кнопки

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/modules/auth.html b/docs/modules/auth.html new file mode 100644 index 0000000..bd20a10 --- /dev/null +++ b/docs/modules/auth.html @@ -0,0 +1,99 @@ +auth | @vkid/sdk - v1.1.0
+
+ +
+ +
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/modules/core_config.html b/docs/modules/core_config.html new file mode 100644 index 0000000..1a48e50 --- /dev/null +++ b/docs/modules/core_config.html @@ -0,0 +1,97 @@ +core/config | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Module core/config

+
+
+

Index

+
+

Enumerations

+
+
+

Classes

+
+
+

Interfaces

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/modules/types.html b/docs/modules/types.html new file mode 100644 index 0000000..535b00e --- /dev/null +++ b/docs/modules/types.html @@ -0,0 +1,90 @@ +types | @vkid/sdk - v1.1.0
+
+ +
+ +
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/modules/widgets_floatingOneTap.html b/docs/modules/widgets_floatingOneTap.html new file mode 100644 index 0000000..419a863 --- /dev/null +++ b/docs/modules/widgets_floatingOneTap.html @@ -0,0 +1,98 @@ +widgets/floatingOneTap | @vkid/sdk - v1.1.0
+
+ +
+ +
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/modules/widgets_oauthList.html b/docs/modules/widgets_oauthList.html new file mode 100644 index 0000000..9b37cdd --- /dev/null +++ b/docs/modules/widgets_oauthList.html @@ -0,0 +1,98 @@ +widgets/oauthList | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Module widgets/oauthList

+
+
+

Index

+
+

Enumerations

+
+
+

Classes

+
+
+

Interfaces

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/docs/modules/widgets_oneTap.html b/docs/modules/widgets_oneTap.html new file mode 100644 index 0000000..dc1c5c4 --- /dev/null +++ b/docs/modules/widgets_oneTap.html @@ -0,0 +1,98 @@ +widgets/oneTap | @vkid/sdk - v1.1.0
+
+ +
+
+
+
+ +

Module widgets/oneTap

+
+
+

Index

+
+

Enumerations

+
+
+

Classes

+
+
+

Interfaces

+
+
+
+

Generated using TypeDoc

+
\ No newline at end of file diff --git a/package.json b/package.json index 096a4d9..439d0aa 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,23 @@ { "name": "@vkid/sdk", - "version": "1.0.3", + "version": "1.1.0", "description": "VK ID Web SDK", "main": "dist-sdk/cjs/index.js", "module": "dist-sdk/esm/index.js", "types": "dist-sdk/types/index.d.ts", + "sideEffects": false, "scripts": { "sdk:types": "tspc --emitDeclarationOnly -p tsconfig.sdk.json", "sdk:base": "rollup -c rollup.sdk.config.js --bundleConfigAsCjs", "sdk:dev": "yarn sdk:base -w", "sdk:prod": "yarn clear:sdk && cross-env NODE_ENV=production yarn sdk:base && yarn sdk:types", - "docs:dev": "typedoc --plugin typedoc-plugin-markdown --watch --out ./.wiki", - "docs:prod": "yarn clear:docs && typedoc --plugin typedoc-plugin-markdown --out ./.wiki", + "docs:dev": "typedoc --watch --out ./docs", + "docs:prod": "yarn clear:docs && typedoc --out ./docs", "lint:check:ts": "eslint --cache \"./**/*.{ts,tsx}\"", "tests": "jest --coverage=true", "clear:sdk": "rimraf dist-sdk", "clear:demo": "rimraf dist-demo", - "clear:docs": "rimraf ./.wiki", + "clear:docs": "rimraf ./docs", "demo:base": "rollup -c rollup.demo.config.js --bundleConfigAsCjs", "demo:dev": "yarn demo:base -w", "demo:prod": "yarn clear:demo && cross-env NODE_ENV=production yarn demo:base", @@ -29,7 +30,7 @@ }, "files": [ "dist-sdk", - ".wiki", + "docs", "CHANGELOG.md", "CONTRIBUTING.md", "CODE_OF_CONDUCT.md", @@ -42,6 +43,12 @@ }, "author": "VK ID ", "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/VKCOM/vkid-web-sdk.git" + }, + "bugs": "https://github.com/VKCOM/vkid-web-sdk/issues", + "homepage": "https://id.vk.com/about/business/demo/", "devDependencies": { "@rollup/plugin-commonjs": "^25.0.4", "@rollup/plugin-node-resolve": "^15.2.1", @@ -86,7 +93,6 @@ "ts-node": "^10.9.1", "ts-patch": "^3.0.2", "typedoc": "^0.24.7", - "typedoc-plugin-markdown": "^3.15.3", "typescript": "5.0.4", "typescript-transform-paths": "^3.4.6" }, diff --git a/src/auth/auth.ts b/src/auth/auth.ts index 3580412..5774e7e 100644 --- a/src/auth/auth.ts +++ b/src/auth/auth.ts @@ -1,14 +1,94 @@ -import { Config } from '#/core/config'; -import { getVKIDUrl } from '#/utils/url'; +import { AuthDataService } from '#/auth/authDataService'; +import { Config, ConfigAuthMode } from '#/core/config'; +import { isDomainAllowed } from '#/utils/domain'; +import { getRedirectWithPayloadUrl, getVKIDUrl } from '#/utils/url'; +import { uuid } from '#/utils/uuid'; -import { AUTH_RESPONSE_TOKEN } from './constants'; +import { AUTH_RESPONSE_TOKEN, AUTH_VK_CONNECT_RESPONSE } from './constants'; import { AuthParams, AuthQueryParams } from './types'; export class Auth { + /** + * @ignore + */ public static __config: Config; + private uuid: string; + private dataService: AuthDataService; + + private opener: Window | null; + private interval: number; + + private readonly close = () => { + this.opener && this.opener.close(); + } + + private readonly handleMessage = ({ origin, source, data }: MessageEvent) => { + if (source !== this.opener || !this.opener || !isDomainAllowed(origin)) { + return; + } + + this.unsubscribe(); + + if (data.payload.error) { + this.dataService.sendAuthorizationFailed(data.payload.error); + return; + } + + if (data.action === AUTH_VK_CONNECT_RESPONSE + this.uuid) { + this.dataService.sendSuccessData(data.payload); + return; + } + + this.dataService.sendEventNotSupported(); + } + + private readonly handleInterval = () => { + if (this.opener?.closed) { + this.unsubscribe(); + this.dataService.sendNewTabHasBeenClosed(); + } + }; + + private readonly subscribe = () => { + this.interval = window.setInterval(this.handleInterval, 1000); + window.addEventListener('message', this.handleMessage); + this.dataService.removeCallback(); + } + + private readonly unsubscribe = () => { + window.removeEventListener('message', this.handleMessage); + clearInterval(this.interval); + this.dataService.setCallback(this.close); + } + + private readonly loginInNewTab = (url: string): void => { + this.dataService = new AuthDataService(); + this.opener = window.open(url, '_blank'); + + if (this.opener) { + this.subscribe(); + } else { + this.dataService.sendCannotCreateNewTab(); + } + + this.dataService.value + .then((payload) => { + this.redirectWithPayload(payload); + }) + .catch(console.error); + } + + private readonly loginByRedirect = (url: string): void => { + location.assign(url); + } + public readonly login = (params?: AuthParams): void => { + const config = Auth.__config.get(); + this.uuid = uuid(); + const queryParams: AuthQueryParams = { + uuid: this.uuid, lang_id: params?.lang, scheme: params?.scheme, screen: params?.screen, @@ -16,7 +96,18 @@ export class Auth { action: params?.action ? btoa(JSON.stringify(params.action)) : undefined, }; - const url = getVKIDUrl('auth', queryParams, Auth.__config.get()); - location.assign(url); + const getUrl = () => getVKIDUrl('auth', queryParams, config); + + if (config.mode === ConfigAuthMode.InNewTab) { + queryParams.origin = location.protocol + '//' + location.hostname; + this.loginInNewTab(getUrl()); + } else { + this.loginByRedirect(getUrl()); + } + } + + // TODO: добавить типы + protected redirectWithPayload(payload: any) { + location.assign(getRedirectWithPayloadUrl(payload, Auth.__config)); } } diff --git a/src/auth/authDataService.ts b/src/auth/authDataService.ts new file mode 100644 index 0000000..023425b --- /dev/null +++ b/src/auth/authDataService.ts @@ -0,0 +1,45 @@ +import { DataService } from '#/core/dataService'; + +import { AUTH_ERROR_TEXT } from './constants'; +import { AuthError, AuthErrorCode, AuthResponse } from './types'; + +export class AuthDataService extends DataService { + // TODO: Типизировать payload + public readonly sendSuccessData = (payload: any) => { + this.sendSuccess({ + type: payload.type, + token: payload.token, + ttl: payload.ttl, + }); + } + + public readonly sendNewTabHasBeenClosed = () => { + this.sendError({ + code: AuthErrorCode.NewTabHasBeenClosed, + text: AUTH_ERROR_TEXT[AuthErrorCode.NewTabHasBeenClosed], + }); + } + + // TODO: Типизировать details + public readonly sendAuthorizationFailed = (details: any) => { + this.sendError({ + code: AuthErrorCode.AuthorizationFailed, + text: AUTH_ERROR_TEXT[AuthErrorCode.AuthorizationFailed], + details, + }); + } + + public readonly sendEventNotSupported = () => { + this.sendError({ + code: AuthErrorCode.EventNotSupported, + text: AUTH_ERROR_TEXT[AuthErrorCode.EventNotSupported], + }); + } + + public readonly sendCannotCreateNewTab = () => { + this.sendError({ + code: AuthErrorCode.CannotCreateNewTab, + text: AUTH_ERROR_TEXT[AuthErrorCode.CannotCreateNewTab], + }); + } +} diff --git a/src/auth/index.ts b/src/auth/index.ts index 2f82598..3a3c063 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -1,2 +1,3 @@ export { Auth } from './auth'; -export type { AuthParams, AuthError, AuthResponse, AuthErrorCode } from './types'; +export { AuthErrorCode } from './types'; +export type { AuthParams, AuthError, AuthResponse } from './types'; diff --git a/src/auth/types.ts b/src/auth/types.ts index c608ede..9e78ea8 100644 --- a/src/auth/types.ts +++ b/src/auth/types.ts @@ -90,9 +90,11 @@ interface AuthAction { } export interface AuthQueryParams { + uuid?: string; lang_id?: Languages; scheme?: Scheme; screen?: string; response_type: string; // и под токены action?: string; + origin?: string; } diff --git a/src/core/config/config.ts b/src/core/config/config.ts index b490a2e..772b6c7 100644 --- a/src/core/config/config.ts +++ b/src/core/config/config.ts @@ -1,11 +1,12 @@ import { LOGIN_DOMAIN, OAUTH_DOMAIN, VKID_DOMAIN } from '#/constants'; -import { ConfigData } from './types'; +import { ConfigAuthMode, ConfigData } from './types'; export class Config { private store: ConfigData = { app: 0, redirectUrl: '', + mode: ConfigAuthMode.Redirect, __loginDomain: LOGIN_DOMAIN, __oauthDomain: OAUTH_DOMAIN, diff --git a/src/core/config/index.ts b/src/core/config/index.ts index 3998972..1ea600a 100644 --- a/src/core/config/index.ts +++ b/src/core/config/index.ts @@ -1,2 +1,3 @@ export { Config } from './config'; +export { ConfigAuthMode } from './types'; export type { ConfigData } from './types'; diff --git a/src/core/config/types.ts b/src/core/config/types.ts index 5902715..d0b5f30 100644 --- a/src/core/config/types.ts +++ b/src/core/config/types.ts @@ -1,7 +1,13 @@ +export enum ConfigAuthMode { + Redirect = 'redirect', + InNewTab = 'new_tab' +} + export interface ConfigData { app: number; redirectUrl: string; state?: string; + mode?: ConfigAuthMode; /** * @ignore diff --git a/src/core/dataService/dataService.ts b/src/core/dataService/dataService.ts new file mode 100644 index 0000000..1dab2e4 --- /dev/null +++ b/src/core/dataService/dataService.ts @@ -0,0 +1,35 @@ +export class DataService { + private readonly promise: Promise; + private callback?: VoidFunction | null; + private resolve: (value: Res) => void; + private reject: (value: Rej) => void; + + public constructor() { + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + } + + public readonly setCallback = (callback: VoidFunction): void => { + this.callback = callback; + } + + public readonly removeCallback = (): void => { + this.callback = null; + } + + public readonly sendSuccess = (value: Res): void => { + this.resolve(value); + this.callback && this.callback(); + } + + public readonly sendError = (value: Rej): void => { + this.reject(value); + this.callback && this.callback(); + } + + public get value() { + return this.promise; + } +} diff --git a/src/core/dataService/index.ts b/src/core/dataService/index.ts new file mode 100644 index 0000000..907136a --- /dev/null +++ b/src/core/dataService/index.ts @@ -0,0 +1 @@ +export { DataService } from './dataService'; diff --git a/src/core/widget/widget.ts b/src/core/widget/widget.ts index a7fbd8c..7a557a4 100644 --- a/src/core/widget/widget.ts +++ b/src/core/widget/widget.ts @@ -19,7 +19,13 @@ const MODULE_CHANGE_STATE_TIMEOUT = 300; const CODE_CHALLENGE_METHOD = 's256'; export class Widget

extends Dispatcher { + /** + * @ignore + */ public static __config: Config; + /** + * @ignore + */ public static __auth: Auth; protected readonly id: string = uuid(); diff --git a/src/index.ts b/src/index.ts index 014d9f9..ae2afd0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,17 @@ import { Auth, AuthParams, AuthError, AuthResponse, AuthErrorCode } from './auth'; -import { Config, ConfigData } from './core/config'; +import { Config, ConfigData, ConfigAuthMode } from './core/config'; import { Widget } from './core/widget'; export { Languages, Scheme } from './types'; const globalConfig = new Config(); -export { globalConfig as Config }; +export { globalConfig as Config, ConfigAuthMode }; export type { ConfigData }; /** Export Auth */ Auth.__config = globalConfig; const globalAuth = new Auth(); -export { globalAuth as Auth }; -export type { AuthParams, AuthError, AuthResponse, AuthErrorCode }; +export { globalAuth as Auth, AuthErrorCode }; +export type { AuthParams, AuthError, AuthResponse }; /** Export Core Widget */ Widget.__config = globalConfig; @@ -19,7 +19,7 @@ Widget.__auth = globalAuth; export { WidgetEvents } from './core/widget'; /** Export OneTap */ -export { OneTap } from './widgets/oneTap'; +export { OneTap, OneTapSkin } from './widgets/oneTap'; export type { OneTapParams, OneTapStyles } from './widgets/oneTap'; /** Export FloatingOneTap */ diff --git a/src/utils/url.ts b/src/utils/url.ts index e530fbc..97a12ba 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -7,7 +7,7 @@ import { uuid } from '#/utils/uuid'; export const getVKIDUrl = (module: string, params: Record, config: ConfigData): string => { const queryParams: Record = { ...params, - uuid: uuid(), + uuid: params.uuid || uuid(), v: VERSION, sdk_type: 'vkid', app_id: config.app, diff --git a/src/widgets/floatingOneTap/template.ts b/src/widgets/floatingOneTap/template.ts index 401fe9b..b336338 100644 --- a/src/widgets/floatingOneTap/template.ts +++ b/src/widgets/floatingOneTap/template.ts @@ -15,8 +15,8 @@ Pick const logoVkIdSvg = ` - - + + @@ -174,35 +174,35 @@ export const getFloatingOneTapTemplate = ({