@returningai/widget-sdk 1.8.10 → 1.8.11
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 +11 -0
- package/README.md +14 -1
- package/dist/rai-banner.iife.js +1 -1
- package/dist/rai-banner.js +1 -1
- package/dist/rai-widget.iife.js +1 -1
- package/dist/rai-widget.js +2 -2
- package/dist/types/jsx.d.ts +7 -31
- package/dist/types/react18.d.ts +13 -0
- package/dist/types/react19.d.ts +15 -0
- package/package.json +18 -2
package/dist/rai-widget.js
CHANGED
|
@@ -15570,7 +15570,7 @@ class CustomWidget extends BaseWidget {
|
|
|
15570
15570
|
}
|
|
15571
15571
|
}
|
|
15572
15572
|
}
|
|
15573
|
-
console.log(`[rai-widget] v${"1.8.
|
|
15573
|
+
console.log(`[rai-widget] v${"1.8.11"}`);
|
|
15574
15574
|
class StoreWidgetCompat extends StoreWidget {
|
|
15575
15575
|
}
|
|
15576
15576
|
const WIDGET_REGISTRY = [
|
|
@@ -15634,7 +15634,7 @@ function exposePublicApi() {
|
|
|
15634
15634
|
})();
|
|
15635
15635
|
const widget = container == null ? void 0 : container.querySelector(ALL_WIDGET_SELECTOR);
|
|
15636
15636
|
window.ReturningAIWidget = {
|
|
15637
|
-
version: "1.8.
|
|
15637
|
+
version: "1.8.11",
|
|
15638
15638
|
reload: () => (widget == null ? void 0 : widget.reload()) ?? Promise.resolve(),
|
|
15639
15639
|
logout: () => (widget == null ? void 0 : widget.logoutPublic()) ?? Promise.resolve(),
|
|
15640
15640
|
isAuthenticated: () => (widget == null ? void 0 : widget.isAuthenticated()) ?? false,
|
package/dist/types/jsx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface RaiSharedWidgetAttributes {
|
|
1
|
+
export interface RaiSharedWidgetAttributes {
|
|
2
2
|
'data-email'?: string
|
|
3
3
|
'widget-type'?: 'store' | 'channel' | 'milestone' | 'social' | 'currency-view' | 'referral-conditions' | 'custom'
|
|
4
4
|
theme?: 'light' | 'dark'
|
|
@@ -20,30 +20,30 @@ interface RaiSharedWidgetAttributes {
|
|
|
20
20
|
style?: string
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
interface RaiCommunityWidgetAttributes extends RaiSharedWidgetAttributes {
|
|
23
|
+
export interface RaiCommunityWidgetAttributes extends RaiSharedWidgetAttributes {
|
|
24
24
|
'community-id': string
|
|
25
25
|
'channel-id'?: string
|
|
26
26
|
/** @deprecated Standard widgets should use community-id. */
|
|
27
27
|
'widget-id'?: string
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
interface RaiCustomWidgetAttributes extends RaiSharedWidgetAttributes {
|
|
30
|
+
export interface RaiCustomWidgetAttributes extends RaiSharedWidgetAttributes {
|
|
31
31
|
'widget-id': string
|
|
32
32
|
'community-id'?: never
|
|
33
33
|
'channel-id'?: never
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
type RaiWidgetElementAttributes<TAttributes> = TAttributes & {
|
|
36
|
+
export type RaiWidgetElementAttributes<TAttributes> = TAttributes & {
|
|
37
37
|
[attributeName: string]: unknown
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
type RaiCommunityWidgetElementAttributes =
|
|
40
|
+
export type RaiCommunityWidgetElementAttributes =
|
|
41
41
|
RaiWidgetElementAttributes<RaiCommunityWidgetAttributes>
|
|
42
42
|
|
|
43
|
-
type RaiCustomWidgetElementAttributes =
|
|
43
|
+
export type RaiCustomWidgetElementAttributes =
|
|
44
44
|
RaiWidgetElementAttributes<RaiCustomWidgetAttributes>
|
|
45
45
|
|
|
46
|
-
interface RaiWidgetIntrinsicElements {
|
|
46
|
+
export interface RaiWidgetIntrinsicElements {
|
|
47
47
|
'rai-store-widget': RaiCommunityWidgetElementAttributes
|
|
48
48
|
'rai-channel-widget': RaiCommunityWidgetElementAttributes
|
|
49
49
|
'rai-milestone-widget': RaiCommunityWidgetElementAttributes
|
|
@@ -54,30 +54,6 @@ interface RaiWidgetIntrinsicElements {
|
|
|
54
54
|
'rai-widget': RaiCommunityWidgetElementAttributes
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
type RaiGlobalIntrinsicElements = JSX.IntrinsicElements
|
|
58
|
-
|
|
59
|
-
declare global {
|
|
60
|
-
namespace React {
|
|
61
|
-
namespace JSX {
|
|
62
|
-
interface ElementChildrenAttribute {
|
|
63
|
-
children: {}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface IntrinsicElements
|
|
67
|
-
extends RaiGlobalIntrinsicElements,
|
|
68
|
-
RaiWidgetIntrinsicElements {}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
namespace JSX {
|
|
73
|
-
interface ElementChildrenAttribute {
|
|
74
|
-
children: {}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
interface IntrinsicElements extends RaiWidgetIntrinsicElements {}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
57
|
declare module '@vue/runtime-core' {
|
|
82
58
|
interface GlobalComponents {
|
|
83
59
|
RaiStoreWidget: { $props: RaiCommunityWidgetElementAttributes }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RaiWidgetIntrinsicElements } from './jsx'
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace React {
|
|
5
|
+
namespace JSX {
|
|
6
|
+
interface ElementChildrenAttribute {
|
|
7
|
+
children: {}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IntrinsicElements extends RaiWidgetIntrinsicElements {}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@returningai/widget-sdk",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.11",
|
|
4
4
|
"description": "Shadow DOM isolated widget SDK for ReturningAI",
|
|
5
5
|
"main": "dist/rai-widget.iife.js",
|
|
6
6
|
"module": "dist/rai-widget.js",
|
|
@@ -11,6 +11,22 @@
|
|
|
11
11
|
"types": "./dist/types/index.d.ts",
|
|
12
12
|
"import": "./dist/rai-widget.js",
|
|
13
13
|
"default": "./dist/rai-widget.iife.js"
|
|
14
|
+
},
|
|
15
|
+
"./react18": {
|
|
16
|
+
"types": "./dist/types/react18.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./react19": {
|
|
19
|
+
"types": "./dist/types/react19.d.ts"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"typesVersions": {
|
|
23
|
+
"*": {
|
|
24
|
+
"react18": [
|
|
25
|
+
"dist/types/react18.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"react19": [
|
|
28
|
+
"dist/types/react19.d.ts"
|
|
29
|
+
]
|
|
14
30
|
}
|
|
15
31
|
},
|
|
16
32
|
"files": [
|
|
@@ -25,7 +41,7 @@
|
|
|
25
41
|
"build:banner:min": "vite build --config vite.banner.config.ts --mode production",
|
|
26
42
|
"build:all": "npm run build && npm run build:banner",
|
|
27
43
|
"build:all:min": "npm run build:min && npm run build:banner:min",
|
|
28
|
-
"types": "tsc --emitDeclarationOnly --outDir dist/types && cp src/jsx.d.ts
|
|
44
|
+
"types": "tsc --emitDeclarationOnly --outDir dist/types && cp src/jsx.d.ts src/react18.d.ts src/react19.d.ts dist/types/",
|
|
29
45
|
"test": "npm run test:host-callback && npm run test:bundle-readiness && npm run test:bundle-runtime-cache && npm run test:bundle-token-sync && npm run test:auth-bootstrap && npm run test:auth-error-reporting && npm run test:auth-refresh-state && npm run test:auth-renewal-recovery && npm run test:auth-session-coordinator && npm run test:startup-performance && npm run test:widget-error-presentation && npm run test:jsx-types",
|
|
30
46
|
"test:host-callback": "rm -rf test/.tmp && tsc -p test/tsconfig.json && node test/.tmp/test/postmessage-host-callback.test.js",
|
|
31
47
|
"test:bundle-readiness": "rm -rf test/.tmp && tsc -p test/tsconfig.json && node test/.tmp/test/bundle-readiness.test.js",
|