@asgardeo/browser 0.1.15 → 0.1.17
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/dist/__legacy__/client.d.ts +2 -1
- package/dist/cjs/index.js +123 -21
- package/dist/cjs/index.js.map +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +123 -21
- package/dist/index.js.map +4 -4
- package/dist/models/config.d.ts +1 -1
- package/dist/theme/getActiveTheme.d.ts +27 -0
- package/dist/utils/navigate.d.ts +42 -0
- package/package.json +3 -2
- /package/dist/{worker.d.ts → web.worker.d.ts} +0 -0
package/dist/models/config.d.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { ThemeMode } from '@asgardeo/javascript';
|
|
19
|
+
import { BrowserThemeDetection } from './themeDetection';
|
|
20
|
+
/**
|
|
21
|
+
* Gets the active theme based on the theme mode preference
|
|
22
|
+
* @param mode - The theme mode preference ('light', 'dark', 'system', or 'class')
|
|
23
|
+
* @param config - Additional configuration for theme detection
|
|
24
|
+
* @returns 'light' or 'dark' based on the resolved theme
|
|
25
|
+
*/
|
|
26
|
+
declare const getActiveTheme: (mode: ThemeMode, config?: BrowserThemeDetection) => ThemeMode;
|
|
27
|
+
export default getActiveTheme;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Navigates to a new URL within the browser.
|
|
20
|
+
*
|
|
21
|
+
* - For same-origin URLs (relative paths or absolute URLs with the same origin),
|
|
22
|
+
* uses the History API and dispatches a `popstate` event (SPA navigation).
|
|
23
|
+
* - For cross-origin URLs, performs a full page load using `window.location.assign`.
|
|
24
|
+
*
|
|
25
|
+
* This allows seamless navigation for both SPA routes and external links.
|
|
26
|
+
*
|
|
27
|
+
* @param url - The target URL to navigate to. Can be a path, query, or absolute URL.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* // SPA navigation (same origin)
|
|
32
|
+
* navigate('/dashboard');
|
|
33
|
+
*
|
|
34
|
+
* // SPA navigation with query
|
|
35
|
+
* navigate('/search?q=asgardeo');
|
|
36
|
+
*
|
|
37
|
+
* // Cross-origin navigation (full page load)
|
|
38
|
+
* navigate('https://accounts.asgardeo.io/t/dxlab/accountrecoveryendpoint/register.do');
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare const navigate: (url: string) => void;
|
|
42
|
+
export default navigate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgardeo/browser",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Browser-specific implementation of Asgardeo JavaScript SDK.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"asgardeo",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@wso2/eslint-plugin": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/eslint-plugin?a1fc6eb570653c999828aea9f5027cba06af4391",
|
|
39
39
|
"@wso2/prettier-config": "https://gitpkg.now.sh/brionmario/wso2-ui-configs/packages/prettier-config?a1fc6eb570653c999828aea9f5027cba06af4391",
|
|
40
40
|
"esbuild": "^0.25.9",
|
|
41
|
+
"esbuild-plugin-inline-worker": "^0.1.1",
|
|
41
42
|
"esbuild-plugins-node-modules-polyfill": "^1.7.0",
|
|
42
43
|
"eslint": "8.57.0",
|
|
43
44
|
"playwright": "^1.52.0",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"randombytes": "^2.1.0",
|
|
60
61
|
"stream-browserify": "^3.0.0",
|
|
61
62
|
"tslib": "^2.8.1",
|
|
62
|
-
"@asgardeo/javascript": "^0.1.
|
|
63
|
+
"@asgardeo/javascript": "^0.1.16"
|
|
63
64
|
},
|
|
64
65
|
"publishConfig": {
|
|
65
66
|
"access": "public"
|
|
File without changes
|