nexus-shared 1.1.21 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +262 -0
- package/LICENSE +21 -0
- package/README.md +1000 -0
- package/dist/Client.Index.d.ts +55 -0
- package/dist/Client.Index.js +60 -0
- package/dist/Components/Chats/Chat.d.ts +28 -0
- package/dist/Components/Chats/Chat.js +19 -0
- package/dist/Components/Chats/ChatButton.d.ts +26 -0
- package/dist/Components/Chats/ChatButton.js +41 -0
- package/dist/Components/Chats/ChatComposer.d.ts +41 -0
- package/dist/Components/Chats/ChatComposer.js +177 -0
- package/dist/Components/Chats/ChatConversations.d.ts +35 -0
- package/dist/Components/Chats/ChatConversations.js +38 -0
- package/dist/Components/Chats/ChatPanel.d.ts +66 -0
- package/dist/Components/Chats/ChatPanel.js +94 -0
- package/dist/Components/Chats/ChatParts.d.ts +87 -0
- package/dist/Components/Chats/ChatParts.js +100 -0
- package/dist/Components/Chats/ChatThread.d.ts +22 -0
- package/dist/Components/Chats/ChatThread.js +96 -0
- package/dist/Components/Documents/Button.d.ts +29 -0
- package/dist/Components/Documents/Button.js +11 -0
- package/dist/Components/Documents/Menu.d.ts +102 -0
- package/dist/Components/Documents/Menu.js +242 -0
- package/dist/Components/Documents/SplitButton.d.ts +64 -0
- package/dist/Components/Documents/SplitButton.js +129 -0
- package/dist/Components/Documents/TabButtons.d.ts +80 -0
- package/dist/Components/Documents/TabButtons.js +38 -0
- package/dist/Components/Forms/ApiForm.d.ts +23 -0
- package/dist/Components/Forms/ApiForm.js +100 -0
- package/dist/Components/Forms/Crud.d.ts +17 -0
- package/dist/Components/Forms/Crud.js +708 -0
- package/dist/Components/Forms/CrudParts.d.ts +15 -0
- package/dist/Components/Forms/CrudParts.js +36 -0
- package/dist/Components/Forms/ExcelImport.d.ts +42 -0
- package/dist/Components/Forms/ExcelImport.js +190 -0
- package/dist/Components/Forms/Form.d.ts +52 -0
- package/dist/Components/Forms/Form.js +323 -0
- package/dist/Components/Forms/SubmitForm.d.ts +65 -0
- package/dist/Components/Forms/SubmitForm.js +198 -0
- package/dist/Components/Inputs/Calendar.d.ts +69 -0
- package/dist/Components/Inputs/Calendar.js +258 -0
- package/dist/Components/Inputs/CheckBox.d.ts +53 -0
- package/dist/Components/Inputs/CheckBox.js +87 -0
- package/dist/Components/Inputs/CheckBoxGroup.d.ts +20 -0
- package/dist/Components/Inputs/CheckBoxGroup.js +80 -0
- package/dist/Components/Inputs/ChoiceField.d.ts +122 -0
- package/dist/Components/Inputs/ChoiceField.js +169 -0
- package/dist/Components/Inputs/DatePicker.d.ts +54 -0
- package/dist/Components/Inputs/DatePicker.js +246 -0
- package/dist/Components/Inputs/DateRangePicker.d.ts +62 -0
- package/dist/Components/Inputs/DateRangePicker.js +283 -0
- package/dist/Components/Inputs/DateTimePicker.d.ts +75 -0
- package/dist/Components/Inputs/DateTimePicker.js +400 -0
- package/dist/Components/Inputs/Dropdown.d.ts +117 -0
- package/dist/Components/Inputs/Dropdown.js +839 -0
- package/dist/Components/Inputs/DropdownParts.d.ts +84 -0
- package/dist/Components/Inputs/DropdownParts.js +102 -0
- package/dist/Components/Inputs/EditorShell.d.ts +45 -0
- package/dist/Components/Inputs/EditorShell.js +214 -0
- package/dist/Components/Inputs/Field.d.ts +53 -0
- package/dist/Components/Inputs/Field.js +16 -0
- package/dist/Components/Inputs/GroupForm.d.ts +20 -0
- package/dist/Components/Inputs/GroupForm.js +172 -0
- package/dist/Components/Inputs/InputField.d.ts +59 -0
- package/dist/Components/Inputs/InputField.js +169 -0
- package/dist/Components/Inputs/InputRenderer.d.ts +37 -0
- package/dist/Components/Inputs/InputRenderer.js +99 -0
- package/dist/Components/Inputs/MarkdownEditor.d.ts +67 -0
- package/dist/Components/Inputs/MarkdownEditor.js +289 -0
- package/dist/Components/Inputs/NumberBox.d.ts +53 -0
- package/dist/Components/Inputs/NumberBox.js +228 -0
- package/dist/Components/Inputs/RadioGroup.d.ts +20 -0
- package/dist/Components/Inputs/RadioGroup.js +43 -0
- package/dist/Components/Inputs/ReadOnlyNotice.d.ts +36 -0
- package/dist/Components/Inputs/ReadOnlyNotice.js +117 -0
- package/dist/Components/Inputs/RichTextEditor.d.ts +103 -0
- package/dist/Components/Inputs/RichTextEditor.js +1170 -0
- package/dist/Components/Inputs/RichTextParts.d.ts +63 -0
- package/dist/Components/Inputs/RichTextParts.js +157 -0
- package/dist/Components/Inputs/RowsInput.d.ts +115 -0
- package/dist/Components/Inputs/RowsInput.js +308 -0
- package/dist/Components/Inputs/Slider.d.ts +87 -0
- package/dist/Components/Inputs/Slider.js +216 -0
- package/dist/Components/Inputs/TabularForm.d.ts +27 -0
- package/dist/Components/Inputs/TabularForm.js +348 -0
- package/dist/Components/Inputs/TextArea.d.ts +43 -0
- package/dist/Components/Inputs/TextArea.js +31 -0
- package/dist/Components/Inputs/TextBox.d.ts +52 -0
- package/dist/Components/Inputs/TextBox.js +58 -0
- package/dist/Components/Inputs/TextField.d.ts +31 -0
- package/dist/Components/Inputs/TextField.js +35 -0
- package/dist/Components/Inputs/TimePanel.d.ts +34 -0
- package/dist/Components/Inputs/TimePanel.js +288 -0
- package/dist/Components/Inputs/TimePicker.d.ts +54 -0
- package/dist/Components/Inputs/TimePicker.js +240 -0
- package/dist/Components/Inputs/TreeView.d.ts +160 -0
- package/dist/Components/Inputs/TreeView.js +947 -0
- package/dist/Components/Layouts/MessageBox.d.ts +71 -0
- package/dist/Components/Layouts/MessageBox.js +104 -0
- package/dist/Components/Layouts/Popup.d.ts +92 -0
- package/dist/Components/Layouts/Popup.js +376 -0
- package/dist/Components/Layouts/PopupContext.d.ts +2 -0
- package/dist/Components/Layouts/PopupContext.js +4 -0
- package/dist/Components/Layouts/PopupDock.d.ts +22 -0
- package/dist/Components/Layouts/PopupDock.js +121 -0
- package/dist/Components/Layouts/PopupHost.d.ts +56 -0
- package/dist/Components/Layouts/PopupHost.js +163 -0
- package/dist/Components/Layouts/PopupRules.d.ts +30 -0
- package/dist/Components/Layouts/PopupRules.js +63 -0
- package/dist/Components/Layouts/ThemePicker.d.ts +13 -0
- package/dist/Components/Layouts/ThemePicker.js +22 -0
- package/dist/Components/Layouts/ThemeScript.d.ts +14 -0
- package/dist/Components/Layouts/ThemeScript.js +13 -0
- package/dist/Components/Layouts/ThemeSwitcher.d.ts +13 -0
- package/dist/Components/Layouts/ThemeSwitcher.js +49 -0
- package/dist/Components/Layouts/Toaster.d.ts +76 -0
- package/dist/Components/Layouts/Toaster.js +172 -0
- package/dist/Components/Viewers/DataTable.d.ts +25 -0
- package/dist/Components/Viewers/DataTable.js +596 -0
- package/dist/Components/Viewers/DataTableColumns.d.ts +28 -0
- package/dist/Components/Viewers/DataTableColumns.js +243 -0
- package/dist/Components/Viewers/DataTableParts.d.ts +138 -0
- package/dist/Components/Viewers/DataTableParts.js +157 -0
- package/dist/Components/Viewers/MarkdownView.d.ts +26 -0
- package/dist/Components/Viewers/MarkdownView.js +79 -0
- package/dist/Components/Viewers/RichTextView.d.ts +18 -0
- package/dist/Components/Viewers/RichTextView.js +17 -0
- package/dist/Helpers/AnimationHelpers.d.ts +6 -0
- package/dist/Helpers/AnimationHelpers.js +35 -0
- package/dist/Helpers/ApiClient.d.ts +96 -0
- package/dist/Helpers/ApiClient.js +200 -0
- package/dist/Helpers/ApiFormHelpers.d.ts +49 -0
- package/dist/Helpers/ApiFormHelpers.js +120 -0
- package/dist/Helpers/ApiModules.d.ts +131 -0
- package/dist/Helpers/ApiModules.js +195 -0
- package/dist/Helpers/ApiResponses.d.ts +51 -0
- package/dist/Helpers/ApiResponses.js +250 -0
- package/dist/Helpers/ApiRoutes.d.ts +140 -0
- package/dist/Helpers/ApiRoutes.js +183 -0
- package/dist/Helpers/ApiToasts.d.ts +21 -0
- package/dist/Helpers/ApiToasts.js +22 -0
- package/dist/Helpers/ChatBackend.d.ts +134 -0
- package/dist/Helpers/ChatBackend.js +332 -0
- package/dist/Helpers/ChatHelpers.d.ts +189 -0
- package/dist/Helpers/ChatHelpers.js +486 -0
- package/dist/Helpers/ChatHooks.d.ts +81 -0
- package/dist/Helpers/ChatHooks.js +175 -0
- package/dist/Helpers/ChatStore.d.ts +132 -0
- package/dist/Helpers/ChatStore.js +394 -0
- package/dist/Helpers/ChatSummaries.d.ts +39 -0
- package/dist/Helpers/ChatSummaries.js +118 -0
- package/dist/Helpers/ClassHelpers.d.ts +3 -0
- package/dist/Helpers/ClassHelpers.js +4 -0
- package/dist/Helpers/CrudBackend.d.ts +98 -0
- package/dist/Helpers/CrudBackend.js +214 -0
- package/dist/Helpers/CrudHelpers.d.ts +111 -0
- package/dist/Helpers/CrudHelpers.js +267 -0
- package/dist/Helpers/DateHelpers.d.ts +88 -0
- package/dist/Helpers/DateHelpers.js +363 -0
- package/dist/Helpers/DatePreferences.d.ts +14 -0
- package/dist/Helpers/DatePreferences.js +94 -0
- package/dist/Helpers/DateTimeHelpers.d.ts +87 -0
- package/dist/Helpers/DateTimeHelpers.js +286 -0
- package/dist/Helpers/DragHelpers.d.ts +129 -0
- package/dist/Helpers/DragHelpers.js +281 -0
- package/dist/Helpers/DropdownHelpers.d.ts +56 -0
- package/dist/Helpers/DropdownHelpers.js +180 -0
- package/dist/Helpers/ExcelBackend.d.ts +106 -0
- package/dist/Helpers/ExcelBackend.js +290 -0
- package/dist/Helpers/ExcelHelpers.d.ts +98 -0
- package/dist/Helpers/ExcelHelpers.js +302 -0
- package/dist/Helpers/FormDrafts.d.ts +18 -0
- package/dist/Helpers/FormDrafts.js +76 -0
- package/dist/Helpers/FormStore.d.ts +233 -0
- package/dist/Helpers/FormStore.js +752 -0
- package/dist/Helpers/InputParamsHelpers.d.ts +79 -0
- package/dist/Helpers/InputParamsHelpers.js +388 -0
- package/dist/Helpers/MarkdownEditing.d.ts +27 -0
- package/dist/Helpers/MarkdownEditing.js +250 -0
- package/dist/Helpers/MarkdownHelpers.d.ts +82 -0
- package/dist/Helpers/MarkdownHelpers.js +775 -0
- package/dist/Helpers/MessageBuilder.d.ts +74 -0
- package/dist/Helpers/MessageBuilder.js +252 -0
- package/dist/Helpers/NepaliCalendar.d.ts +25 -0
- package/dist/Helpers/NepaliCalendar.js +107 -0
- package/dist/Helpers/NumberHelpers.d.ts +71 -0
- package/dist/Helpers/NumberHelpers.js +202 -0
- package/dist/Helpers/Permissions.d.ts +62 -0
- package/dist/Helpers/Permissions.js +133 -0
- package/dist/Helpers/PopoverHelpers.d.ts +68 -0
- package/dist/Helpers/PopoverHelpers.js +195 -0
- package/dist/Helpers/RichTextHelpers.d.ts +77 -0
- package/dist/Helpers/RichTextHelpers.js +1072 -0
- package/dist/Helpers/RowsStore.d.ts +166 -0
- package/dist/Helpers/RowsStore.js +606 -0
- package/dist/Helpers/TableColumns.d.ts +47 -0
- package/dist/Helpers/TableColumns.js +282 -0
- package/dist/Helpers/TableExport.d.ts +30 -0
- package/dist/Helpers/TableExport.js +97 -0
- package/dist/Helpers/TableHelpers.d.ts +110 -0
- package/dist/Helpers/TableHelpers.js +301 -0
- package/dist/Helpers/TableStore.d.ts +142 -0
- package/dist/Helpers/TableStore.js +530 -0
- package/dist/Helpers/ThemeHelpers.d.ts +15 -0
- package/dist/Helpers/ThemeHelpers.js +16 -0
- package/dist/Helpers/TimeHelpers.d.ts +73 -0
- package/dist/Helpers/TimeHelpers.js +253 -0
- package/dist/Helpers/TreeStore.d.ts +188 -0
- package/dist/Helpers/TreeStore.js +577 -0
- package/dist/Helpers/ValidationHelpers.d.ts +124 -0
- package/dist/Helpers/ValidationHelpers.js +301 -0
- package/dist/Interfaces/ApiInterfaces.d.ts +174 -0
- package/dist/Interfaces/ApiInterfaces.js +30 -0
- package/dist/Interfaces/ChatInterfaces.d.ts +240 -0
- package/{src/sso-client.tsx → dist/Interfaces/ChatInterfaces.js} +1 -1
- package/dist/Interfaces/CrudInterfaces.d.ts +232 -0
- package/dist/Interfaces/CrudInterfaces.js +1 -0
- package/dist/Interfaces/DateInterfaces.d.ts +154 -0
- package/dist/Interfaces/DateInterfaces.js +29 -0
- package/dist/Interfaces/ExcelInterfaces.d.ts +215 -0
- package/dist/Interfaces/ExcelInterfaces.js +45 -0
- package/dist/Interfaces/FormInterfaces.d.ts +402 -0
- package/dist/Interfaces/FormInterfaces.js +1 -0
- package/dist/Interfaces/InputInterfaces.d.ts +141 -0
- package/dist/Interfaces/InputInterfaces.js +1 -0
- package/dist/Interfaces/MessageInterfaces.d.ts +111 -0
- package/dist/Interfaces/MessageInterfaces.js +5 -0
- package/dist/Interfaces/TableInterfaces.d.ts +351 -0
- package/dist/Interfaces/TableInterfaces.js +1 -0
- package/dist/Interfaces/ThemeInterfaces.d.ts +17 -0
- package/dist/Interfaces/ThemeInterfaces.js +17 -0
- package/dist/Interfaces/TypeInterfaces.d.ts +4 -0
- package/dist/Interfaces/TypeInterfaces.js +1 -0
- package/dist/Server.Index.d.ts +2 -0
- package/dist/Server.Index.js +5 -0
- package/dist/Services/ApiProxy.d.ts +32 -0
- package/dist/Services/ApiProxy.js +111 -0
- package/dist/Services/BrowserApi.d.ts +95 -0
- package/dist/Services/BrowserApi.js +129 -0
- package/dist/Services/ChatApi.d.ts +37 -0
- package/dist/Services/ChatApi.js +98 -0
- package/dist/Services/ExcelApi.d.ts +46 -0
- package/dist/Services/ExcelApi.js +196 -0
- package/dist/Services/ServerApi.d.ts +54 -0
- package/dist/Services/ServerApi.js +78 -0
- package/dist/Services/ThemeService.d.ts +17 -0
- package/dist/Services/ThemeService.js +83 -0
- package/dist/Shared.Index.d.ts +51 -0
- package/dist/Shared.Index.js +55 -0
- package/package.json +85 -33
- package/src/Styles/Nexus.Base.css +70 -0
- package/src/Styles/Nexus.Button.css +153 -0
- package/src/Styles/Nexus.Calendar.css +275 -0
- package/src/Styles/Nexus.Chat.css +1489 -0
- package/src/Styles/Nexus.Choice.css +345 -0
- package/src/Styles/Nexus.Crud.css +161 -0
- package/src/Styles/Nexus.DateTime.css +81 -0
- package/src/Styles/Nexus.Dropdown.css +774 -0
- package/src/Styles/Nexus.Editor.css +297 -0
- package/src/Styles/Nexus.Excel.css +370 -0
- package/src/Styles/Nexus.Form.css +321 -0
- package/src/Styles/Nexus.Index.css +36 -0
- package/src/Styles/Nexus.Input.css +637 -0
- package/src/Styles/Nexus.Markdown.css +265 -0
- package/src/Styles/Nexus.Menu.css +259 -0
- package/src/Styles/Nexus.Popup.css +731 -0
- package/src/Styles/Nexus.RichText.css +463 -0
- package/src/Styles/Nexus.Rows.css +596 -0
- package/src/Styles/Nexus.Slider.css +278 -0
- package/src/Styles/Nexus.Tab.Buttons.css +419 -0
- package/src/Styles/Nexus.Table.css +1296 -0
- package/src/Styles/Nexus.Theme.Picker.css +232 -0
- package/src/Styles/Nexus.Themes.css +194 -0
- package/src/Styles/Nexus.Time.css +147 -0
- package/src/Styles/Nexus.Toast.css +265 -0
- package/src/Styles/Nexus.Tokens.css +72 -0
- package/src/Styles/Nexus.Tree.css +435 -0
- package/src/api-services/authentication-service.tsx +0 -23
- package/src/api-services/preference-service.tsx +0 -5
- package/src/api-services/system-service.tsx +0 -29
- package/src/client.ts +0 -31
- package/src/components/documents/button.tsx +0 -133
- package/src/components/documents/icon-box.tsx +0 -93
- package/src/components/documents/page-title.tsx +0 -7
- package/src/components/documents/tab-button.tsx +0 -172
- package/src/components/documents/tag.tsx +0 -30
- package/src/components/index.js +0 -0
- package/src/components/inputs/checkbox-input.tsx +0 -66
- package/src/components/inputs/input-box.tsx +0 -48
- package/src/components/inputs/input-element.tsx +0 -65
- package/src/components/inputs/input-form.tsx +0 -164
- package/src/components/inputs/input.tsx +0 -181
- package/src/components/inputs/number-input.tsx +0 -108
- package/src/components/inputs/radiobox-input.tsx +0 -53
- package/src/components/inputs/textarea-input.tsx +0 -47
- package/src/components/inputs/textbox-input.tsx +0 -45
- package/src/components/layouts/global-dialogbox.tsx +0 -431
- package/src/components/layouts/global-layout.tsx +0 -64
- package/src/components/layouts/layout-helpers.tsx +0 -20
- package/src/components/layouts/panels/user-panel.tsx +0 -112
- package/src/components/layouts/utility-menu.tsx +0 -49
- package/src/components/panels/theme-panel.tsx +0 -46
- package/src/helpers/bitwise-helpers.tsx +0 -11
- package/src/helpers/browser-helpers.tsx +0 -156
- package/src/helpers/datasource-helpers.tsx +0 -99
- package/src/helpers/element-helpers.tsx +0 -123
- package/src/helpers/input-helpers.tsx +0 -74
- package/src/helpers/string-helpers.tsx +0 -28
- package/src/helpers/utility-helpers.tsx +0 -45
- package/src/helpers/validation-helpers.tsx +0 -302
- package/src/index.ts +0 -26
- package/src/interface.ts +0 -19
- package/src/interfaces/auth-token-interfaces.tsx +0 -6
- package/src/interfaces/browser-interfaces.tsx +0 -36
- package/src/interfaces/button-interfaces.tsx +0 -63
- package/src/interfaces/datasource-interfaces.tsx +0 -22
- package/src/interfaces/datatable-interfaces.tsx +0 -25
- package/src/interfaces/dialogbox-interfaces.tsx +0 -5
- package/src/interfaces/exception-interfaces.tsx +0 -99
- package/src/interfaces/http-interfaces.tsx +0 -129
- package/src/interfaces/icon-interfaces.tsx +0 -129
- package/src/interfaces/input-interfaces.tsx +0 -410
- package/src/interfaces/layout-interfaces.tsx +0 -191
- package/src/interfaces/menu-interfaces.tsx +0 -53
- package/src/interfaces/message-interfaces.tsx +0 -32
- package/src/interfaces/permission-interfaces.tsx +0 -9
- package/src/interfaces/storage-interfaces.tsx +0 -5
- package/src/interfaces/system-interfaces.tsx +0 -22
- package/src/interfaces/theme-interfaces.tsx +0 -123
- package/src/interfaces/type-interfaces.tsx +0 -28
- package/src/interfaces/user-interfaces.tsx +0 -47
- package/src/nexus-client.tsx +0 -21
- package/src/nexus.environments.tsx +0 -66
- package/src/proxy-api/proxy-backend.tsx +0 -60
- package/src/proxy-api/proxy-constants.tsx +0 -28
- package/src/proxy-api/proxy-helpers.tsx +0 -91
- package/src/proxy-api-client.tsx +0 -1
- package/src/proxy-api-server.tsx +0 -2
- package/src/services/http-client-services.tsx +0 -75
- package/src/services/http-services.tsx +0 -158
- package/src/services/loader-service.tsx +0 -185
- package/src/services/localstorage-service.tsx +0 -119
- package/src/services/message-services.tsx +0 -383
- package/src/services/theme-service.tsx +0 -163
- package/src/services/user-services.tsx +0 -10
- package/src/sso-config/auth-token-validation.ts +0 -16
- package/src/sso-config/callback-route.tsx +0 -35
- package/src/sso-config/cookie-encryption.ts +0 -51
- package/src/sso-config/cookie-helpers.tsx +0 -102
- package/src/sso-config/forgot-password-route.tsx +0 -36
- package/src/sso-config/oauth-callback-state.ts +0 -61
- package/src/sso-config/pkce-helpers.ts +0 -9
- package/src/sso-config/provider-complete-route.tsx +0 -18
- package/src/sso-config/redirect-context-actions.tsx +0 -45
- package/src/sso-config/redirect-context-helpers.tsx +0 -159
- package/src/sso-config/redirect-context-persist.tsx +0 -18
- package/src/sso-config/redirect-context-route.tsx +0 -45
- package/src/sso-config/refresh-route.tsx +0 -23
- package/src/sso-config/sign-in-route.tsx +0 -74
- package/src/sso-config/sign-out-route.tsx +0 -57
- package/src/sso-config/sign-up-route.tsx +0 -57
- package/src/sso-config/sso-backend-flow.ts +0 -38
- package/src/sso-config/sso-complete-route.tsx +0 -50
- package/src/sso-config/sso-config.ts +0 -59
- package/src/sso-config/sso-interfaces.tsx +0 -99
- package/src/sso-config/sso-response-helpers.tsx +0 -20
- package/src/sso-server.tsx +0 -21
- package/src/styles/nexus.animation.css +0 -269
- package/src/styles/nexus.core.css +0 -119
- package/src/styles/nexus.dialog.css +0 -144
- package/src/styles/nexus.grid-view.css +0 -42
- package/src/styles/nexus.icon.css +0 -51
- package/src/styles/nexus.input.css +0 -207
- package/src/styles/nexus.loader.css +0 -11
- package/src/styles/nexus.logic.css +0 -47
- package/src/styles/nexus.utility.css +0 -347
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
import { HttpPost } from "../services/http-services";
|
|
3
|
-
import { AUTH_COOKIES, ResolvePostLoginRedirectUrl, SetSsoSessionCookie } from "./cookie-helpers";
|
|
4
|
-
import { DecodeRedirectContext } from "./redirect-context-helpers";
|
|
5
|
-
import { GetClientConfiguration } from "./sso-backend-flow";
|
|
6
|
-
import { SSO_CONFIG } from "./sso-config";
|
|
7
|
-
import { ISignUpRequest } from "./sso-interfaces";
|
|
8
|
-
import { ParseWrappedResult } from "./sso-response-helpers";
|
|
9
|
-
|
|
10
|
-
const mapGender = (gender?: string | null) => {
|
|
11
|
-
const normalized = gender?.trim().toLowerCase();
|
|
12
|
-
if (normalized === "male") return 0;
|
|
13
|
-
if (normalized === "female") return 1;
|
|
14
|
-
return 2;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** POST — register a new account (identity provider app). */
|
|
18
|
-
export async function SignUpPostRoute(req: NextRequest) {
|
|
19
|
-
const body = (await req.json()) as ISignUpRequest & { confirmPassword?: string };
|
|
20
|
-
|
|
21
|
-
if (!body.fullName?.trim() || !body.username?.trim() || !body.email?.trim() || !body.password || !body.confirmPassword) {
|
|
22
|
-
return NextResponse.json({ error: "All required fields must be provided." }, { status: 400 });
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (body.password !== body.confirmPassword) {
|
|
26
|
-
return NextResponse.json({ error: "Passwords do not match." }, { status: 400 });
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const signUpRes = await HttpPost(SSO_CONFIG.BACKEND_ENDPOINTS.SIGN_UP, {
|
|
30
|
-
fullname: body.fullName.trim(),
|
|
31
|
-
username: body.username.trim(),
|
|
32
|
-
password: body.password,
|
|
33
|
-
confirmPassword: body.confirmPassword,
|
|
34
|
-
genderType: mapGender(body.gender),
|
|
35
|
-
emailAddress: body.email.trim(),
|
|
36
|
-
contactNumber: null,
|
|
37
|
-
clientSystemName: SSO_CONFIG.BACKEND_CONFIG.CLIENT_SYSTEM_NAME,
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const signUpResult = ParseWrappedResult<{ ssoSession: string }>(signUpRes);
|
|
41
|
-
if (!signUpRes.isSuccess || !signUpResult?.ssoSession) {
|
|
42
|
-
return NextResponse.json(signUpRes, { status: signUpRes.code ?? 400 });
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const ssoConfiguration = await GetClientConfiguration();
|
|
46
|
-
const redirectContext = DecodeRedirectContext(req.cookies.get(AUTH_COOKIES.redirectContext)?.value);
|
|
47
|
-
|
|
48
|
-
const response = NextResponse.json({
|
|
49
|
-
...signUpRes,
|
|
50
|
-
result: {
|
|
51
|
-
...signUpResult,
|
|
52
|
-
redirectUrl: ResolvePostLoginRedirectUrl(!!redirectContext?.redirectUri),
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
SetSsoSessionCookie(response, signUpResult.ssoSession, ssoConfiguration.ssoSessionLifetime);
|
|
56
|
-
return response;
|
|
57
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { NEXUS_CONFIG } from "../nexus.environments";
|
|
2
|
-
import { HttpGet, HttpPost } from "../services/http-services";
|
|
3
|
-
import { SSO_CONFIG } from "./sso-config";
|
|
4
|
-
import { IClientApplication, PKCE_METHOD_S256, SSOAuthResponse, SsoExchangeInput, TokenExchangeInput } from "./sso-interfaces";
|
|
5
|
-
import { ParseSsoCodeResponse, ParseTokenResponse } from "./sso-response-helpers";
|
|
6
|
-
|
|
7
|
-
/** Server-only: request an authorization code using client policy + PKCE. */
|
|
8
|
-
export async function RequestAuthorizationCode(input: SsoExchangeInput): Promise<string | null> {
|
|
9
|
-
const ssoRes = await HttpPost(SSO_CONFIG.BACKEND_ENDPOINTS.SSO, {
|
|
10
|
-
ssoSession: input.ssoSession,
|
|
11
|
-
redirectUri: input.redirectUri,
|
|
12
|
-
state: input.state,
|
|
13
|
-
returnPath: input.returnPath,
|
|
14
|
-
codeChallenge: input.pkce.challenge,
|
|
15
|
-
codeChallengeMethod: input.pkce.method ?? PKCE_METHOD_S256,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
return ParseSsoCodeResponse(ssoRes);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** Server-only: exchange authorization code for tokens. */
|
|
22
|
-
export async function ExchangeAuthorizationCode(input: TokenExchangeInput): Promise<SSOAuthResponse | null> {
|
|
23
|
-
const tokenRes = await HttpPost(SSO_CONFIG.BACKEND_ENDPOINTS.TOKEN, {
|
|
24
|
-
code: input.code,
|
|
25
|
-
redirectUri: input.redirectUri,
|
|
26
|
-
clientSystemName: SSO_CONFIG.BACKEND_CONFIG.CLIENT_SYSTEM_NAME,
|
|
27
|
-
codeVerifier: input.codeVerifier,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return ParseTokenResponse(tokenRes);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** Server-only: get client configuration from the backend. */
|
|
34
|
-
export async function GetClientConfiguration(): Promise<IClientApplication> {
|
|
35
|
-
const clientConfigRes = await HttpGet(SSO_CONFIG.BACKEND_ENDPOINTS.CLIENT_CONFIG, null, NEXUS_CONFIG.DEFAULT_REVALIDATE_TIME_ONE_DAY);
|
|
36
|
-
if (!clientConfigRes.isSuccess) throw new Error("Failed to get client configuration");
|
|
37
|
-
return clientConfigRes.result;
|
|
38
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
-
import { AUTH_COOKIES, GetDecryptedRequestCookie } from "./cookie-helpers";
|
|
3
|
-
import { EncodeOAuthCallbackState } from "./oauth-callback-state";
|
|
4
|
-
import { ClearRedirectContextCookie, DecodeRedirectContext } from "./redirect-context-helpers";
|
|
5
|
-
import { RequestAuthorizationCode } from "./sso-backend-flow";
|
|
6
|
-
import { BuildAuthenticationSignInUrl, SSO_CONFIG } from "./sso-config";
|
|
7
|
-
import { PKCE_METHOD_S256, PkcePair } from "./sso-interfaces";
|
|
8
|
-
|
|
9
|
-
function buildSignInRedirect(redirectContext: ReturnType<typeof DecodeRedirectContext>) {
|
|
10
|
-
return new URL(BuildAuthenticationSignInUrl(redirectContext?.returnPath));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** Completes SSO after credentials sign-in: exchange session for code and redirect to the client callback. */
|
|
14
|
-
export async function SsoCompleteRoute(req: NextRequest) {
|
|
15
|
-
const ssoSession = GetDecryptedRequestCookie(req, AUTH_COOKIES.ssoSession);
|
|
16
|
-
const redirectContext = DecodeRedirectContext(req.cookies.get(AUTH_COOKIES.redirectContext)?.value);
|
|
17
|
-
|
|
18
|
-
if (!ssoSession) {
|
|
19
|
-
return NextResponse.redirect(buildSignInRedirect(redirectContext));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (!redirectContext?.redirectUri) {
|
|
23
|
-
return NextResponse.redirect(new URL(SSO_CONFIG.FRONTEND_ENDPOINTS.SIGN_IN, req.url));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const pkce: PkcePair = {
|
|
27
|
-
verifier: redirectContext.pkceVerifier,
|
|
28
|
-
challenge: redirectContext.codeChallenge,
|
|
29
|
-
method: (redirectContext.codeChallengeMethod as PkcePair["method"]) ?? PKCE_METHOD_S256,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
const code = await RequestAuthorizationCode({
|
|
34
|
-
ssoSession,
|
|
35
|
-
redirectUri: redirectContext.redirectUri,
|
|
36
|
-
state: redirectContext.state,
|
|
37
|
-
returnPath: redirectContext.returnPath,
|
|
38
|
-
pkce,
|
|
39
|
-
});
|
|
40
|
-
if (!code) return NextResponse.redirect(buildSignInRedirect(redirectContext));
|
|
41
|
-
|
|
42
|
-
const callbackState = EncodeOAuthCallbackState(redirectContext.state, redirectContext.returnPath, pkce.verifier);
|
|
43
|
-
const location = `${redirectContext.redirectUri}?code=${encodeURIComponent(code)}&state=${encodeURIComponent(callbackState)}`;
|
|
44
|
-
const response = NextResponse.redirect(location);
|
|
45
|
-
ClearRedirectContextCookie(response);
|
|
46
|
-
return response;
|
|
47
|
-
} catch {
|
|
48
|
-
return NextResponse.redirect(buildSignInRedirect(redirectContext));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { APIS, URLS } from "nexus-shared";
|
|
2
|
-
|
|
3
|
-
const _callbackPath = `${URLS.CURRENT}/api/auth/callback`;
|
|
4
|
-
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
const processEnv = process.env;
|
|
7
|
-
|
|
8
|
-
export const SSO_CONFIG = {
|
|
9
|
-
COOKIE_CONFIG: {
|
|
10
|
-
COOKIE_SECRET: processEnv.SSO_COOKIE_SECRET as string,
|
|
11
|
-
},
|
|
12
|
-
BACKEND_ENDPOINTS: {
|
|
13
|
-
SIGN_IN: `${APIS.AUTHENTICATION}/Authentication/SignIn`,
|
|
14
|
-
SIGN_UP: `${APIS.AUTHENTICATION}/Authentication/SignUp`,
|
|
15
|
-
SSO: `${APIS.AUTHENTICATION}/Authentication/SSO`,
|
|
16
|
-
TOKEN: `${APIS.AUTHENTICATION}/Authentication/Token`,
|
|
17
|
-
REFRESH: `${APIS.AUTHENTICATION}/Authentication/Refresh`,
|
|
18
|
-
SIGN_OUT: `${APIS.AUTHENTICATION}/Authentication/SignOut`,
|
|
19
|
-
PROVIDERS: `${APIS.AUTHENTICATION}/Authentication/Providers`,
|
|
20
|
-
CLIENT_CONFIG: `${APIS.AUTHENTICATION}/Authentication/ClientConfig/${processEnv.AUTH_CLIENT_SYSTEM_NAME}`,
|
|
21
|
-
FORGOT_PASSWORD: `${APIS.AUTHENTICATION}/Authentication/ForgotPassword`,
|
|
22
|
-
RESET_PASSWORD: `${APIS.AUTHENTICATION}/Authentication/ResetPassword`,
|
|
23
|
-
/** Used by VerifyAccessToken — returns 200 for a valid Bearer token, 401 otherwise. */
|
|
24
|
-
VERIFY: `${APIS.AUTHENTICATION}/Authentication/Verify`,
|
|
25
|
-
PROVIDER_CHALLENGE: (provider: string, returnUrl: string, clientSystemName: string) => `${APIS.AUTHENTICATION}/Provider/${provider}/Challenge?returnUrl=${encodeURIComponent(returnUrl)}&clientSystemName=${encodeURIComponent(clientSystemName)}`,
|
|
26
|
-
},
|
|
27
|
-
BACKEND_CONFIG: {
|
|
28
|
-
/** Matches AuthenticationOptions.DefaultClientSystemName (NEXUS_WEB_APPLICATION_API). */
|
|
29
|
-
CLIENT_SYSTEM_NAME: processEnv.AUTH_CLIENT_SYSTEM_NAME as string,
|
|
30
|
-
/** How long redirect_uri/state survive in a secure httpOnly cookie on the auth app (seconds). */
|
|
31
|
-
REDIRECT_CONTEXT_MAX_AGE: processEnv.REDIRECT_CONTEXT_MAX_AGE as string,
|
|
32
|
-
},
|
|
33
|
-
FRONTEND_ENDPOINTS: {
|
|
34
|
-
CALLBACK: _callbackPath,
|
|
35
|
-
SIGN_IN: `${URLS.CURRENT}/api/auth/sign-in`,
|
|
36
|
-
SIGN_UP: `${URLS.CURRENT}/api/auth/sign-up`,
|
|
37
|
-
SIGN_OUT: `${URLS.CURRENT}/api/auth/sign-out`,
|
|
38
|
-
REFRESH: `${URLS.CURRENT}/api/auth/refresh`,
|
|
39
|
-
SSO_COMPLETE: `${URLS.CURRENT}/api/auth/sso-complete`,
|
|
40
|
-
PROVIDER_COMPLETE: `${URLS.CURRENT}/api/auth/provider-complete`,
|
|
41
|
-
FORGOT_PASSWORD: `${URLS.CURRENT}/api/auth/forgot-password`,
|
|
42
|
-
RESET_PASSWORD: `${URLS.CURRENT}/api/auth/reset-password`,
|
|
43
|
-
},
|
|
44
|
-
} as const;
|
|
45
|
-
|
|
46
|
-
/** Client-app entry URL for centralized sign-in (includes redirect_uri + optional return path). */
|
|
47
|
-
export function BuildAuthenticationSignInUrl(returnPath?: string) {
|
|
48
|
-
const entryUrl = new URL(`${URLS.AUTHENTICATION}/api/auth/redirect-context`);
|
|
49
|
-
entryUrl.searchParams.set("redirect_uri", SSO_CONFIG.FRONTEND_ENDPOINTS.CALLBACK);
|
|
50
|
-
if (returnPath) entryUrl.searchParams.set("state", returnPath);
|
|
51
|
-
return entryUrl.toString();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/** Sign-out URL that returns the user to a page on this app after cookies are cleared. */
|
|
55
|
-
export function BuildSignOutUrl(returnPath?: string) {
|
|
56
|
-
const signOutUrl = new URL(SSO_CONFIG.FRONTEND_ENDPOINTS.SIGN_OUT);
|
|
57
|
-
if (returnPath) signOutUrl.searchParams.set("returnUrl", returnPath);
|
|
58
|
-
return signOutUrl.toString();
|
|
59
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { UN } from "../interfaces/type-interfaces";
|
|
2
|
-
|
|
3
|
-
export const PKCE_METHOD_S256 = "S256";
|
|
4
|
-
|
|
5
|
-
export interface SSOAuthResponse {
|
|
6
|
-
accessToken: string;
|
|
7
|
-
refreshToken: string;
|
|
8
|
-
expiresTokenIn: number;
|
|
9
|
-
expiresRefreshTokenIn: number;
|
|
10
|
-
returnPath?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface CookieInfo {
|
|
14
|
-
ssoSession?: string;
|
|
15
|
-
accessToken?: string | UN;
|
|
16
|
-
refreshToken?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface IRedirectContext {
|
|
20
|
-
redirectUri: string;
|
|
21
|
-
/** OAuth CSRF nonce sent to the client callback. */
|
|
22
|
-
state: string;
|
|
23
|
-
/** Relative path to return to after sign-in completes. */
|
|
24
|
-
returnPath: string;
|
|
25
|
-
/** PKCE code challenge (stored server-side until SSO). */
|
|
26
|
-
codeChallenge: string;
|
|
27
|
-
codeChallengeMethod: string;
|
|
28
|
-
/** PKCE verifier (server-side only; also embedded in signed callback state). */
|
|
29
|
-
pkceVerifier: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface ISignInParams {
|
|
33
|
-
redirect_uri: string | UN;
|
|
34
|
-
state: string | UN;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface ISsoSessionResponse {
|
|
38
|
-
code: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface ILoginRequest {
|
|
42
|
-
username: string;
|
|
43
|
-
password: string;
|
|
44
|
-
rememberMe: boolean;
|
|
45
|
-
clientSystemName: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface ILoginResponse {
|
|
49
|
-
ssoSession: string;
|
|
50
|
-
displayName: string;
|
|
51
|
-
role: string;
|
|
52
|
-
userId: number;
|
|
53
|
-
redirectUrl?: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface ISignUpRequest {
|
|
57
|
-
fullName: string;
|
|
58
|
-
gender?: string | UN;
|
|
59
|
-
username: string;
|
|
60
|
-
email: string;
|
|
61
|
-
password: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface IDemoUserInfo {
|
|
65
|
-
id: number;
|
|
66
|
-
username: string;
|
|
67
|
-
email: string;
|
|
68
|
-
displayName: string;
|
|
69
|
-
role: string;
|
|
70
|
-
passwordHint: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type SsoExchangeInput = {
|
|
74
|
-
ssoSession: string;
|
|
75
|
-
redirectUri: string;
|
|
76
|
-
state?: string;
|
|
77
|
-
returnPath?: string;
|
|
78
|
-
pkce: PkcePair;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export type TokenExchangeInput = {
|
|
82
|
-
code: string;
|
|
83
|
-
redirectUri: string;
|
|
84
|
-
codeVerifier: string;
|
|
85
|
-
};
|
|
86
|
-
export type PkcePair = {
|
|
87
|
-
verifier: string;
|
|
88
|
-
challenge: string;
|
|
89
|
-
method: typeof PKCE_METHOD_S256;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export interface IClientApplication {
|
|
93
|
-
requirePkce: boolean;
|
|
94
|
-
accessTokenLifetime: number;
|
|
95
|
-
refreshTokenLifetime: number;
|
|
96
|
-
authorizationCodeLifetime: number;
|
|
97
|
-
ssoSessionLifetime: number;
|
|
98
|
-
allowOfflineAccess: boolean;
|
|
99
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IErrorRespose, ISuccessResponse } from "../interfaces/http-interfaces";
|
|
2
|
-
import { ISsoSessionResponse, SSOAuthResponse } from "./sso-interfaces";
|
|
3
|
-
|
|
4
|
-
type ApiResponse = ISuccessResponse | IErrorRespose;
|
|
5
|
-
|
|
6
|
-
export function ParseWrappedResult<T>(response: ApiResponse): T | null {
|
|
7
|
-
if (!response.isSuccess) return null;
|
|
8
|
-
return (response.result ?? null) as T | null;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function ParseSsoCodeResponse(response: ApiResponse): string | null {
|
|
12
|
-
const result = ParseWrappedResult<ISsoSessionResponse | { code?: string }>(response);
|
|
13
|
-
if (!result) return null;
|
|
14
|
-
if ("code" in result && result.code) return result.code;
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function ParseTokenResponse(response: ApiResponse): SSOAuthResponse | null {
|
|
19
|
-
return ParseWrappedResult<SSOAuthResponse>(response);
|
|
20
|
-
}
|
package/src/sso-server.tsx
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from "./sso-config/oauth-callback-state";
|
|
2
|
-
export * from "./sso-config/pkce-helpers";
|
|
3
|
-
export * from "./sso-config/sso-backend-flow";
|
|
4
|
-
export * from "./sso-config/auth-token-validation";
|
|
5
|
-
export * from "./sso-config/callback-route";
|
|
6
|
-
export * from "./sso-config/cookie-helpers";
|
|
7
|
-
export * from "./sso-config/redirect-context-actions";
|
|
8
|
-
export * from "./sso-config/redirect-context-helpers";
|
|
9
|
-
export * from "./sso-config/redirect-context-route";
|
|
10
|
-
export * from "./sso-config/redirect-context-persist";
|
|
11
|
-
export * from "./sso-config/refresh-route";
|
|
12
|
-
export * from "./sso-config/sign-in-route";
|
|
13
|
-
export * from "./sso-config/sign-out-route";
|
|
14
|
-
export * from "./sso-config/sign-up-route";
|
|
15
|
-
export * from "./sso-config/sso-response-helpers";
|
|
16
|
-
export * from "./sso-config/forgot-password-route";
|
|
17
|
-
export * from "./sso-config/provider-complete-route";
|
|
18
|
-
export * from "./sso-config/sso-complete-route";
|
|
19
|
-
export * from "./sso-config/sso-config";
|
|
20
|
-
export * from "./sso-config/sso-interfaces";
|
|
21
|
-
export * from "./sso-config/sso-response-helpers";
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EAnimations / EAnimationClasses — nexus.shared/interfaces/layout-interfaces.tsx
|
|
3
|
-
* Legacy transition tokens (nexus.utility `.h`, `.anim`): --ANIM_SPD, --ANIM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
:root {
|
|
7
|
-
--ANIM_SPD: 300ms;
|
|
8
|
-
--anim-ease: cubic-bezier(0.33, 1, 0.68, 1);
|
|
9
|
-
--anim-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
10
|
-
--anim-ease-in: cubic-bezier(0.32, 0, 0.67, 0);
|
|
11
|
-
--ANIM: all var(--ANIM_SPD);
|
|
12
|
-
|
|
13
|
-
--SPIN_BOX_SIZE: 3.5rem;
|
|
14
|
-
--SPIN_BOX_BORDER_SIZE: 0.45rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* ----- One-shot: fade / pulse ----- */
|
|
18
|
-
|
|
19
|
-
.an-fa,
|
|
20
|
-
.an-fo,
|
|
21
|
-
.an-fio,
|
|
22
|
-
.an-pi,
|
|
23
|
-
.an-po {
|
|
24
|
-
animation-duration: var(--ANIM_SPD);
|
|
25
|
-
animation-timing-function: var(--anim-ease-out);
|
|
26
|
-
animation-fill-mode: both;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.an-fa {
|
|
30
|
-
animation-name: fadeIn;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.an-fo {
|
|
34
|
-
animation-name: fadeOut;
|
|
35
|
-
animation-timing-function: var(--anim-ease-in);
|
|
36
|
-
animation-fill-mode: forwards;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.an-fio {
|
|
40
|
-
animation-name: fadeInOut;
|
|
41
|
-
animation-duration: calc(var(--ANIM_SPD) * 2);
|
|
42
|
-
animation-timing-function: var(--anim-ease);
|
|
43
|
-
animation-iteration-count: 1;
|
|
44
|
-
animation-fill-mode: both;
|
|
45
|
-
animation: fadeInOut calc(var(--ANIM_SPD) * 6) ease-in-out infinite;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.an-pi {
|
|
49
|
-
animation-name: pulseIn;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.an-po {
|
|
53
|
-
animation-name: pulseOut;
|
|
54
|
-
animation-timing-function: var(--anim-ease-in);
|
|
55
|
-
animation-fill-mode: forwards;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.an-pio {
|
|
59
|
-
animation-name: pulseInOut;
|
|
60
|
-
animation-duration: calc(var(--ANIM_SPD) * 2);
|
|
61
|
-
animation-iteration-count: infinite;
|
|
62
|
-
animation-direction: alternate;
|
|
63
|
-
animation-timing-function: var(--anim-ease);
|
|
64
|
-
animation-fill-mode: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* ----- Infinite: bounce (vertical), spin (ring), slide bar (L → R) ----- */
|
|
68
|
-
|
|
69
|
-
.an-bounce {
|
|
70
|
-
animation-name: bounce;
|
|
71
|
-
animation-duration: calc(var(--ANIM_SPD) * 4);
|
|
72
|
-
animation-timing-function: linear;
|
|
73
|
-
animation-iteration-count: infinite;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.an-spin {
|
|
77
|
-
display: inline-block;
|
|
78
|
-
box-sizing: border-box;
|
|
79
|
-
width: var(--SPIN_BOX_SIZE);
|
|
80
|
-
height: var(--SPIN_BOX_SIZE);
|
|
81
|
-
vertical-align: middle;
|
|
82
|
-
border-radius: 50%;
|
|
83
|
-
border-style: solid;
|
|
84
|
-
border-width: var(--SPIN_BOX_BORDER_SIZE);
|
|
85
|
-
border-color: var(--B30);
|
|
86
|
-
border-top-color: var(--B20);
|
|
87
|
-
animation-name: spin;
|
|
88
|
-
animation-duration: calc(var(--ANIM_SPD) * 5);
|
|
89
|
-
animation-timing-function: linear;
|
|
90
|
-
animation-iteration-count: infinite;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.an-sbar {
|
|
94
|
-
position: relative;
|
|
95
|
-
display: block;
|
|
96
|
-
width: 100%;
|
|
97
|
-
max-width: 14rem;
|
|
98
|
-
height: 0.28rem;
|
|
99
|
-
min-height: 0.28rem;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
border-radius: 999px;
|
|
102
|
-
background-color: var(--B30);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.an-sbar::after {
|
|
106
|
-
content: "";
|
|
107
|
-
position: absolute;
|
|
108
|
-
top: 0;
|
|
109
|
-
left: -45%;
|
|
110
|
-
width: 45%;
|
|
111
|
-
height: 100%;
|
|
112
|
-
border-radius: inherit;
|
|
113
|
-
background: linear-gradient(90deg, var(--B400), var(--B20), var(--B600), var(--B400));
|
|
114
|
-
background-size: 200% 100%;
|
|
115
|
-
animation: slideBarSweep calc(var(--ANIM_SPD) * 5) ease-in-out infinite;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Pill runs between track walls (alternate = return trip, no jump to 0).
|
|
120
|
-
* --bbar-ball-pct: segment width (unitless %). --bbar-dur: one leg duration.
|
|
121
|
-
* --bbar-ease: slightly slower near each wall; middle stays quicker.
|
|
122
|
-
*/
|
|
123
|
-
.an-bbar {
|
|
124
|
-
position: relative;
|
|
125
|
-
display: block;
|
|
126
|
-
width: 100%;
|
|
127
|
-
max-width: 14rem;
|
|
128
|
-
height: 0.28rem;
|
|
129
|
-
min-height: 0.28rem;
|
|
130
|
-
overflow: hidden;
|
|
131
|
-
border-radius: 999px;
|
|
132
|
-
background-color: var(--B30);
|
|
133
|
-
--bbar-ball-pct: 40;
|
|
134
|
-
--bbar-dur: 1s;
|
|
135
|
-
/** Slight slowdown at each wall (start, far end, and same on the return leg). */
|
|
136
|
-
--bbar-ease: cubic-bezier(0.45, 0.1, 0.55, 0.9);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.an-bbar::after {
|
|
140
|
-
content: "";
|
|
141
|
-
position: absolute;
|
|
142
|
-
top: 0;
|
|
143
|
-
left: 0;
|
|
144
|
-
width: calc(var(--bbar-ball-pct) * 1%);
|
|
145
|
-
height: 100%;
|
|
146
|
-
border-radius: inherit;
|
|
147
|
-
background: linear-gradient(90deg, var(--B400), var(--B20), var(--B600), var(--B400));
|
|
148
|
-
background-size: 200% 100%;
|
|
149
|
-
will-change: transform;
|
|
150
|
-
animation-name: bounceBarBall;
|
|
151
|
-
animation-duration: var(--bbar-dur);
|
|
152
|
-
animation-timing-function: var(--bbar-ease);
|
|
153
|
-
animation-iteration-count: infinite;
|
|
154
|
-
animation-direction: alternate;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/* ----- Keyframes ----- */
|
|
158
|
-
|
|
159
|
-
@keyframes fadeIn {
|
|
160
|
-
from {
|
|
161
|
-
opacity: 0;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
to {
|
|
165
|
-
opacity: 1;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@keyframes fadeOut {
|
|
170
|
-
from {
|
|
171
|
-
opacity: 1;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
to {
|
|
175
|
-
opacity: 0;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@keyframes fadeInOut {
|
|
180
|
-
0% {
|
|
181
|
-
opacity: 1;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
50% {
|
|
185
|
-
opacity: 0.6;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
100% {
|
|
189
|
-
opacity: 1;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
@keyframes pulseInOut {
|
|
194
|
-
from {
|
|
195
|
-
transform: scale3d(1, 1, 1);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
to {
|
|
199
|
-
transform: scale3d(1.04, 1.04, 1);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
@keyframes bounce {
|
|
204
|
-
0%,
|
|
205
|
-
20%,
|
|
206
|
-
50%,
|
|
207
|
-
80%,
|
|
208
|
-
100% {
|
|
209
|
-
transform: translate3d(0, 0, 0);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
40% {
|
|
213
|
-
transform: translate3d(0, -0.5rem, 0);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
60% {
|
|
217
|
-
transform: translate3d(0, -0.25rem, 0);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
@keyframes spin {
|
|
222
|
-
0% {
|
|
223
|
-
transform: rotate3d(0, 0, 1, 0deg);
|
|
224
|
-
border-top-color: var(--B20);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
50% {
|
|
228
|
-
border-top-color: var(--B400);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
75% {
|
|
232
|
-
border-top-color: var(--B600);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
100% {
|
|
236
|
-
transform: rotate3d(0, 0, 1, 360deg);
|
|
237
|
-
border-top-color: var(--B20);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
@keyframes slideBarSweep {
|
|
242
|
-
0% {
|
|
243
|
-
transform: translate3d(0, 0, 0);
|
|
244
|
-
background-position: 0% 50%;
|
|
245
|
-
opacity: 0.85;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
50% {
|
|
249
|
-
opacity: 1;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
100% {
|
|
253
|
-
transform: translate3d(320%, 0, 0);
|
|
254
|
-
background-position: 100% 50%;
|
|
255
|
-
opacity: 0.9;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
@keyframes bounceBarBall {
|
|
260
|
-
0% {
|
|
261
|
-
transform: translate3d(0, 0, 0);
|
|
262
|
-
background-position: 0% 50%;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
100% {
|
|
266
|
-
transform: translate3d(calc((100 - var(--bbar-ball-pct)) / var(--bbar-ball-pct) * 100%), 0, 0);
|
|
267
|
-
background-position: 100% 50%;
|
|
268
|
-
}
|
|
269
|
-
}
|