@onlive.ai/common-121 0.2.70 → 0.2.163
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/README.md +0 -1
- package/components/asset/asset-modal-portal.cjs +550 -0
- package/components/asset/asset-modal-portal.d.cts +22 -0
- package/components/asset/asset-modal-portal.d.ts +22 -0
- package/components/asset/asset-modal-portal.js +550 -0
- package/components/asset/asset.cjs +3536 -0
- package/components/asset/asset.d.cts +37 -0
- package/components/asset/asset.d.ts +37 -0
- package/components/asset/asset.js +3536 -0
- package/components/asset/asset.loaders.cjs +2 -0
- package/components/asset/asset.loaders.d.cts +17 -0
- package/components/asset/asset.loaders.d.ts +17 -0
- package/components/asset/asset.loaders.js +2 -0
- package/components/asset/asset.renderer.cjs +2292 -0
- package/components/asset/asset.renderer.d.cts +29 -0
- package/components/asset/asset.renderer.d.ts +29 -0
- package/components/asset/asset.renderer.js +2292 -0
- package/components/asset/asset.styles.cjs +683 -0
- package/components/asset/asset.styles.d.cts +6 -0
- package/components/asset/asset.styles.d.ts +6 -0
- package/components/asset/asset.styles.js +683 -0
- package/components/asset/asset.types.cjs +2 -0
- package/components/asset/asset.types.d.cts +103 -0
- package/components/asset/asset.types.d.ts +103 -0
- package/components/asset/asset.types.js +1 -0
- package/components/asset/index.cjs +3536 -0
- package/components/asset/index.d.cts +8 -0
- package/components/asset/index.d.ts +8 -0
- package/components/asset/index.js +3536 -0
- package/components/player/player.cjs +2044 -0
- package/components/player/player.d.cts +25 -0
- package/components/player/player.d.ts +25 -0
- package/components/player/player.js +2044 -0
- package/components/player/player.styles.cjs +16 -0
- package/components/player/player.styles.d.cts +6 -0
- package/components/player/player.styles.d.ts +6 -0
- package/components/player/player.styles.js +16 -0
- package/components/side-bar/index.cjs +3185 -0
- package/components/side-bar/index.d.cts +11 -0
- package/components/side-bar/index.d.ts +11 -0
- package/components/side-bar/index.js +3185 -0
- package/components/side-bar/side-bar.cjs +3185 -0
- package/components/side-bar/side-bar.d.cts +83 -0
- package/components/side-bar/side-bar.d.ts +83 -0
- package/components/side-bar/side-bar.js +3185 -0
- package/components/side-bar/side-bar.styles.cjs +801 -0
- package/components/side-bar/side-bar.styles.d.cts +6 -0
- package/components/side-bar/side-bar.styles.d.ts +6 -0
- package/components/side-bar/side-bar.styles.js +801 -0
- package/components/side-bar/side-bar.types.cjs +2 -0
- package/components/side-bar/side-bar.types.d.cts +105 -0
- package/components/side-bar/side-bar.types.d.ts +105 -0
- package/components/side-bar/side-bar.types.js +2 -0
- package/components/upload/index.cjs +83 -0
- package/components/upload/index.d.cts +4 -0
- package/components/upload/index.d.ts +4 -0
- package/components/upload/index.js +83 -0
- package/components/upload/upload.cjs +83 -0
- package/components/upload/upload.d.cts +28 -0
- package/components/upload/upload.d.ts +28 -0
- package/components/upload/upload.js +83 -0
- package/components/upload/upload.styles.cjs +65 -0
- package/components/upload/upload.styles.d.cts +6 -0
- package/components/upload/upload.styles.d.ts +6 -0
- package/components/upload/upload.styles.js +65 -0
- package/components/upload/upload.types.cjs +2 -0
- package/components/upload/upload.types.d.cts +16 -0
- package/components/upload/upload.types.d.ts +16 -0
- package/components/upload/upload.types.js +1 -0
- package/index.cjs +4677 -0
- package/index.d.cts +338 -0
- package/index.d.ts +338 -0
- package/index.js +4677 -0
- package/package.json +32 -11
- package/react/components/asset/Asset.cjs +2 -0
- package/react/components/asset/Asset.d.cts +33 -0
- package/react/components/asset/Asset.d.ts +33 -0
- package/react/components/asset/Asset.jsx +2 -0
- package/react/components/side-bar/SideBar.cjs +2 -0
- package/react/components/side-bar/SideBar.d.cts +37 -0
- package/react/components/side-bar/SideBar.d.ts +37 -0
- package/react/components/side-bar/SideBar.jsx +2 -0
- package/react/components/upload/Upload.cjs +2 -0
- package/react/components/upload/Upload.d.cts +23 -0
- package/react/components/upload/Upload.d.ts +23 -0
- package/react/components/upload/Upload.jsx +2 -0
- package/services/audio.service.cjs +2 -2
- package/services/audio.service.d.cts +1 -0
- package/services/audio.service.d.ts +1 -0
- package/services/audio.service.js +2 -2
- package/services/conversation/conversation.service.cjs +2 -0
- package/services/conversation/conversation.service.d.cts +533 -0
- package/services/conversation/conversation.service.d.ts +533 -0
- package/services/conversation/conversation.service.js +2 -0
- package/services/conversation/conversation.types.cjs +2 -0
- package/services/conversation/conversation.types.d.cts +519 -0
- package/services/conversation/conversation.types.d.ts +519 -0
- package/services/conversation/conversation.types.js +2 -0
- package/services/conversation/index.cjs +2 -0
- package/services/conversation/index.d.cts +7 -0
- package/services/conversation/index.d.ts +7 -0
- package/services/conversation/index.js +2 -0
- package/services/faqs/faqs.service.cjs +2 -0
- package/services/faqs/faqs.service.d.cts +16 -0
- package/services/faqs/faqs.service.d.ts +16 -0
- package/services/faqs/faqs.service.js +2 -0
- package/services/faqs/faqs.types.cjs +2 -0
- package/services/faqs/faqs.types.d.cts +60 -0
- package/services/faqs/faqs.types.d.ts +60 -0
- package/services/faqs/faqs.types.js +1 -0
- package/services/faqs/index.cjs +2 -0
- package/services/faqs/index.d.cts +3 -0
- package/services/faqs/index.d.ts +3 -0
- package/services/faqs/index.js +2 -0
- package/services/file/file.service.cjs +2 -0
- package/services/file/file.service.d.cts +66 -0
- package/services/file/file.service.d.ts +66 -0
- package/services/file/file.service.js +2 -0
- package/services/file/file.types.cjs +2 -0
- package/services/file/file.types.d.cts +72 -0
- package/services/file/file.types.d.ts +72 -0
- package/services/file/file.types.js +1 -0
- package/services/file/index.cjs +2 -0
- package/services/file/index.d.cts +3 -0
- package/services/file/index.d.ts +3 -0
- package/services/file/index.js +2 -0
- package/services/firebase/firebase-api.cjs +2 -2
- package/services/firebase/firebase-api.d.cts +25 -9
- package/services/firebase/firebase-api.d.ts +25 -9
- package/services/firebase/firebase-api.js +2 -2
- package/services/multimedia/config.example.cjs +2 -0
- package/services/multimedia/config.example.d.cts +13 -0
- package/services/multimedia/config.example.d.ts +13 -0
- package/services/multimedia/config.example.js +2 -0
- package/services/multimedia/index.cjs +2 -0
- package/services/multimedia/index.d.cts +3 -0
- package/services/multimedia/index.d.ts +3 -0
- package/services/multimedia/index.js +2 -0
- package/services/multimedia/multimedia.service.cjs +2 -0
- package/services/multimedia/multimedia.service.d.cts +28 -0
- package/services/multimedia/multimedia.service.d.ts +28 -0
- package/services/multimedia/multimedia.service.js +2 -0
- package/services/multimedia/multimedia.types.cjs +2 -0
- package/services/multimedia/multimedia.types.d.cts +65 -0
- package/services/multimedia/multimedia.types.d.ts +65 -0
- package/services/multimedia/multimedia.types.js +1 -0
- package/services/product/index.cjs +2 -0
- package/services/product/index.d.cts +3 -0
- package/services/product/index.d.ts +3 -0
- package/services/product/index.js +2 -0
- package/services/product/product.service.cjs +2 -0
- package/services/product/product.service.d.cts +19 -0
- package/services/product/product.service.d.ts +19 -0
- package/services/product/product.service.js +2 -0
- package/services/product/product.types.cjs +2 -0
- package/services/product/product.types.d.cts +78 -0
- package/services/product/product.types.d.ts +78 -0
- package/services/product/product.types.js +1 -0
- package/services/request.provider.cjs +1 -1
- package/services/request.provider.d.cts +1 -0
- package/services/request.provider.d.ts +1 -0
- package/services/request.provider.js +1 -1
- package/services/session.service.cjs +2 -0
- package/services/session.service.d.cts +70 -0
- package/services/session.service.d.ts +70 -0
- package/services/session.service.js +2 -0
- package/services/upload/index.cjs +2 -0
- package/services/upload/index.d.cts +2 -0
- package/services/upload/index.d.ts +2 -0
- package/services/upload/index.js +2 -0
- package/services/upload/upload.service.cjs +2 -0
- package/services/upload/upload.service.d.cts +81 -0
- package/services/upload/upload.service.d.ts +81 -0
- package/services/upload/upload.service.js +2 -0
- package/themes/dark.cjs +4 -1
- package/themes/dark.d.cts +1 -0
- package/themes/dark.d.ts +1 -0
- package/themes/dark.js +4 -1
- package/themes/light.cjs +1 -1
- package/themes/light.d.cts +1 -0
- package/themes/light.d.ts +1 -0
- package/themes/light.js +1 -1
- package/types/globals.cjs +2 -0
- package/types/globals.d.cts +39 -0
- package/types/globals.d.ts +39 -0
- package/types/globals.js +1 -0
- package/types/tracking-options.cjs +2 -2
- package/types/tracking-options.d.cts +8 -6
- package/types/tracking-options.d.ts +8 -6
- package/types/tracking-options.js +1 -1
- package/utils/adopt-styles.cjs +2 -2
- package/utils/adopt-styles.d.cts +1 -0
- package/utils/adopt-styles.d.ts +1 -0
- package/utils/adopt-styles.js +2 -2
- package/utils/browser-preferences.cjs +2 -2
- package/utils/browser-preferences.d.cts +1 -0
- package/utils/browser-preferences.d.ts +1 -0
- package/utils/browser-preferences.js +2 -2
- package/utils/classify-media.cjs +1 -1
- package/utils/classify-media.d.cts +1 -0
- package/utils/classify-media.d.ts +1 -0
- package/utils/classify-media.js +1 -1
- package/utils/decorators.cjs +1 -1
- package/utils/decorators.d.cts +1 -0
- package/utils/decorators.d.ts +1 -0
- package/utils/decorators.js +1 -1
- package/utils/detected-lang.cjs +2 -2
- package/utils/detected-lang.d.cts +1 -0
- package/utils/detected-lang.d.ts +1 -0
- package/utils/detected-lang.js +2 -2
- package/utils/fullscreen.cjs +2 -2
- package/utils/fullscreen.d.cts +6 -5
- package/utils/fullscreen.d.ts +6 -5
- package/utils/fullscreen.js +2 -2
- package/utils/insert-script.cjs +1 -1
- package/utils/insert-script.d.cts +1 -0
- package/utils/insert-script.d.ts +1 -0
- package/utils/insert-script.js +1 -1
- package/utils/is-map-compatible.cjs +1 -1
- package/utils/is-map-compatible.d.cts +1 -0
- package/utils/is-map-compatible.d.ts +1 -0
- package/utils/is-map-compatible.js +1 -1
- package/utils/markdown.cjs +2 -2
- package/utils/markdown.d.cts +1 -0
- package/utils/markdown.d.ts +1 -0
- package/utils/markdown.js +2 -2
- package/utils/merge.cjs +2 -2
- package/utils/merge.d.cts +2 -1
- package/utils/merge.d.ts +2 -1
- package/utils/merge.js +2 -2
- package/utils/multiband-track-volume.cjs +2 -2
- package/utils/multiband-track-volume.d.cts +1 -0
- package/utils/multiband-track-volume.d.ts +1 -0
- package/utils/multiband-track-volume.js +2 -2
- package/utils/onlive-url-params.cjs +1 -1
- package/utils/onlive-url-params.d.cts +1 -0
- package/utils/onlive-url-params.d.ts +1 -0
- package/utils/onlive-url-params.js +1 -1
- package/utils/pretty-distance.cjs +2 -2
- package/utils/pretty-distance.d.cts +2 -1
- package/utils/pretty-distance.d.ts +2 -1
- package/utils/pretty-distance.js +2 -2
- package/utils/pretty-time.cjs +2 -0
- package/utils/pretty-time.d.cts +16 -0
- package/utils/pretty-time.d.ts +16 -0
- package/utils/pretty-time.js +2 -0
- package/utils/random-string.cjs +1 -1
- package/utils/random-string.d.cts +1 -0
- package/utils/random-string.d.ts +1 -0
- package/utils/random-string.js +1 -1
- package/utils/resource-type.cjs +1 -1
- package/utils/resource-type.d.cts +1 -0
- package/utils/resource-type.d.ts +1 -0
- package/utils/resource-type.js +1 -1
- package/utils/round-number.cjs +2 -0
- package/utils/round-number.d.cts +30 -0
- package/utils/round-number.d.ts +30 -0
- package/utils/round-number.js +2 -0
- package/utils/safe-html.cjs +2 -2
- package/utils/safe-html.d.cts +4 -3
- package/utils/safe-html.d.ts +4 -3
- package/utils/safe-html.js +2 -2
- package/utils/sanitize.cjs +2 -2
- package/utils/sanitize.d.cts +1 -0
- package/utils/sanitize.d.ts +1 -0
- package/utils/sanitize.js +2 -2
- package/utils/spread.cjs +2 -2
- package/utils/spread.d.cts +1 -0
- package/utils/spread.d.ts +1 -0
- package/utils/spread.js +2 -2
- package/utils/watch.cjs +1 -1
- package/utils/watch.d.cts +1 -0
- package/utils/watch.d.ts +1 -0
- package/utils/watch.js +1 -1
- package/services/firebase/firebase.service.cjs +0 -2
- package/services/firebase/firebase.service.d.cts +0 -40
- package/services/firebase/firebase.service.d.ts +0 -40
- package/services/firebase/firebase.service.js +0 -2
- package/services/livekit.service.cjs +0 -2
- package/services/livekit.service.d.cts +0 -219
- package/services/livekit.service.d.ts +0 -219
- package/services/livekit.service.js +0 -2
- package/types/window-context.cjs +0 -2
- package/types/window-context.d.cts +0 -8
- package/types/window-context.d.ts +0 -8
- package/types/window-context.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
2
|
var n=async(s,e)=>{let t=await fetch(s,e);if(!t.ok){let r=await t.json().catch(()=>({}));throw new Error(JSON.stringify({status:t.status,statusText:t.statusText,...r}))}return t&&t.json()},o=s=>s.replace(/\/$/,"");export{o as removeTrailingSlash,n as request};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
"use strict";var a=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(s,e)=>{for(var t in e)a(s,t,{get:e[t],enumerable:!0})},h=(s,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!d.call(s,r)&&r!==t&&a(s,r,{get:()=>e[r],enumerable:!(o=S(e,r))||o.enumerable});return s};var C=s=>h(a({},"__esModule",{value:!0}),s);var b={};l(b,{SESSION_KEY:()=>i,SessionService:()=>g});module.exports=C(b);var c=s=>{let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";for(let o=0;o<s;o++)t+=e.charAt(Math.floor(Math.random()*e.length));return t};var n=require("@onlive.ai/tracker"),i="chatbot",g=class s{static hasSession(){return!!n.Session.getCookie(i)}static getSession(e={role:"guest",regenerate:!1}){e.regenerate&&(n.Session.id=n.Generator.uuid(),n.Session.deleteCookie(i));let t=n.Session.getCookie(i);return t&&s.isValidSession(t,e.role)?t:s.createSession(e.role)}static createSession(e){let t={externalId:e==="agent"?String(s.getUserId()||n.Session.id):n.Session.id,secret:c(16),createdAt:new Date().toISOString()};return n.Session.setCookie(i,t,3600*24*365),t}static isValidSession(e,t){if(t==="guest")return!0;let o=s.getUserId();return!!(o&&String(o)===e.externalId)}static getUserId(){return n.Session.getCookie("user-id",{objectKey:"userId",storageKey:"user",storageType:"localStorage",ttl:3600*24*365,preserveData:!0})}static updateSessionWithRegistrationData(e){let t=n.Session.getCookie(i);if(t||(t=s.createSession("guest")),t){let o={...t,registrationData:e};n.Session.setCookie(i,o,3600*24*365)}}static hasRegistrationData(){return!!n.Session.getCookie(i)?.registrationData}static async getAgentInfo(e){return fetch(`${e}/api/v1/auth/user-info`,{credentials:"include"}).then(t=>t.json())}static getRegistrationData(){return n.Session.getCookie(i)?.registrationData}};0&&(module.exports={SESSION_KEY,SessionService});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
declare const SESSION_KEY = "chatbot";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a chat session.
|
|
5
|
+
*
|
|
6
|
+
* @property {string} secret - Secret token for authenticating the session.
|
|
7
|
+
* @property {string} createdAt - ISO timestamp when the session was created.
|
|
8
|
+
* @property {Record<string, unknown>} [registrationData] - User registration data if provided.
|
|
9
|
+
*/
|
|
10
|
+
type ChatbotSession = {
|
|
11
|
+
externalId: string;
|
|
12
|
+
secret: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
registrationData?: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
type AgentInfoResponse = {
|
|
17
|
+
organization: Record<string, unknown>;
|
|
18
|
+
user: {
|
|
19
|
+
id: string;
|
|
20
|
+
fullName: string;
|
|
21
|
+
email?: string;
|
|
22
|
+
username?: string;
|
|
23
|
+
avatar?: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare class SessionService {
|
|
27
|
+
/**
|
|
28
|
+
* Check session for the current agent and language
|
|
29
|
+
* @param role - The role of the user (agent or guest)
|
|
30
|
+
* @returns The session for the current user
|
|
31
|
+
*/
|
|
32
|
+
static hasSession(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Creates or retrieves a session for the current agent and language
|
|
35
|
+
* @param role - The role of the user (agent or guest)
|
|
36
|
+
* @returns The session for the current user
|
|
37
|
+
*/
|
|
38
|
+
static getSession(options?: {
|
|
39
|
+
role: "agent" | "guest";
|
|
40
|
+
regenerate?: boolean;
|
|
41
|
+
}): ChatbotSession;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new session for the given role
|
|
44
|
+
*/
|
|
45
|
+
static createSession(role: "agent" | "guest"): ChatbotSession;
|
|
46
|
+
/**
|
|
47
|
+
* Validates if an existing session is valid for the given role
|
|
48
|
+
*/
|
|
49
|
+
static isValidSession(session: ChatbotSession, role: "agent" | "guest"): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Gets the user ID from storage
|
|
52
|
+
*/
|
|
53
|
+
static getUserId(): object | null;
|
|
54
|
+
/**
|
|
55
|
+
* Updates the current session with registration data
|
|
56
|
+
* Creates a session if one doesn't exist
|
|
57
|
+
*/
|
|
58
|
+
static updateSessionWithRegistrationData(registrationData: Record<string, string>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Checks if the current session has registration data
|
|
61
|
+
*/
|
|
62
|
+
static hasRegistrationData(): boolean;
|
|
63
|
+
static getAgentInfo(serverlessUrl: string): Promise<AgentInfoResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Gets the registration data from the current session
|
|
66
|
+
*/
|
|
67
|
+
static getRegistrationData(): Record<string, string> | undefined;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { type AgentInfoResponse, type ChatbotSession, SESSION_KEY, SessionService };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
declare const SESSION_KEY = "chatbot";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a chat session.
|
|
5
|
+
*
|
|
6
|
+
* @property {string} secret - Secret token for authenticating the session.
|
|
7
|
+
* @property {string} createdAt - ISO timestamp when the session was created.
|
|
8
|
+
* @property {Record<string, unknown>} [registrationData] - User registration data if provided.
|
|
9
|
+
*/
|
|
10
|
+
type ChatbotSession = {
|
|
11
|
+
externalId: string;
|
|
12
|
+
secret: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
registrationData?: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
type AgentInfoResponse = {
|
|
17
|
+
organization: Record<string, unknown>;
|
|
18
|
+
user: {
|
|
19
|
+
id: string;
|
|
20
|
+
fullName: string;
|
|
21
|
+
email?: string;
|
|
22
|
+
username?: string;
|
|
23
|
+
avatar?: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare class SessionService {
|
|
27
|
+
/**
|
|
28
|
+
* Check session for the current agent and language
|
|
29
|
+
* @param role - The role of the user (agent or guest)
|
|
30
|
+
* @returns The session for the current user
|
|
31
|
+
*/
|
|
32
|
+
static hasSession(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Creates or retrieves a session for the current agent and language
|
|
35
|
+
* @param role - The role of the user (agent or guest)
|
|
36
|
+
* @returns The session for the current user
|
|
37
|
+
*/
|
|
38
|
+
static getSession(options?: {
|
|
39
|
+
role: "agent" | "guest";
|
|
40
|
+
regenerate?: boolean;
|
|
41
|
+
}): ChatbotSession;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new session for the given role
|
|
44
|
+
*/
|
|
45
|
+
static createSession(role: "agent" | "guest"): ChatbotSession;
|
|
46
|
+
/**
|
|
47
|
+
* Validates if an existing session is valid for the given role
|
|
48
|
+
*/
|
|
49
|
+
static isValidSession(session: ChatbotSession, role: "agent" | "guest"): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Gets the user ID from storage
|
|
52
|
+
*/
|
|
53
|
+
static getUserId(): object | null;
|
|
54
|
+
/**
|
|
55
|
+
* Updates the current session with registration data
|
|
56
|
+
* Creates a session if one doesn't exist
|
|
57
|
+
*/
|
|
58
|
+
static updateSessionWithRegistrationData(registrationData: Record<string, string>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Checks if the current session has registration data
|
|
61
|
+
*/
|
|
62
|
+
static hasRegistrationData(): boolean;
|
|
63
|
+
static getAgentInfo(serverlessUrl: string): Promise<AgentInfoResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Gets the registration data from the current session
|
|
66
|
+
*/
|
|
67
|
+
static getRegistrationData(): Record<string, string> | undefined;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { type AgentInfoResponse, type ChatbotSession, SESSION_KEY, SessionService };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
var r=o=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="";for(let i=0;i<o;i++)e+=t.charAt(Math.floor(Math.random()*t.length));return e};import{Generator as g,Session as s}from"@onlive.ai/tracker";var n="chatbot",a=class o{static hasSession(){return!!s.getCookie(n)}static getSession(t={role:"guest",regenerate:!1}){t.regenerate&&(s.id=g.uuid(),s.deleteCookie(n));let e=s.getCookie(n);return e&&o.isValidSession(e,t.role)?e:o.createSession(t.role)}static createSession(t){let e={externalId:t==="agent"?String(o.getUserId()||s.id):s.id,secret:r(16),createdAt:new Date().toISOString()};return s.setCookie(n,e,3600*24*365),e}static isValidSession(t,e){if(e==="guest")return!0;let i=o.getUserId();return!!(i&&String(i)===t.externalId)}static getUserId(){return s.getCookie("user-id",{objectKey:"userId",storageKey:"user",storageType:"localStorage",ttl:3600*24*365,preserveData:!0})}static updateSessionWithRegistrationData(t){let e=s.getCookie(n);if(e||(e=o.createSession("guest")),e){let i={...e,registrationData:t};s.setCookie(n,i,3600*24*365)}}static hasRegistrationData(){return!!s.getCookie(n)?.registrationData}static async getAgentInfo(t){return fetch(`${t}/api/v1/auth/user-info`,{credentials:"include"}).then(e=>e.json())}static getRegistrationData(){return s.getCookie(n)?.registrationData}};export{n as SESSION_KEY,a as SessionService};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
"use strict";var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var U=Object.prototype.hasOwnProperty;var m=(s,e)=>{for(var r in e)p(s,r,{get:e[r],enumerable:!0})},h=(s,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of f(e))!U.call(s,n)&&n!==r&&p(s,n,{get:()=>e[n],enumerable:!(t=g(e,n))||t.enumerable});return s};var S=s=>h(p({},"__esModule",{value:!0}),s);var v={};m(v,{UploadService:()=>l,getUploadService:()=>u});module.exports=S(v);var d=async(s,e)=>{let r=await fetch(s,e);if(!r.ok){let t=await r.json().catch(()=>({}));throw new Error(JSON.stringify({status:r.status,statusText:r.statusText,...t}))}return r&&r.json()};var l=class s{constructor(e){this.config=e}static getInstance(e){if(!s.instance&&e&&(s.instance=new s(e)),!s.instance)throw new Error("UploadService must be initialized with config first");return s.instance}static initialize(e){return s.instance=new s(e),s.instance}async uploadFile(e,r={}){try{let t=await this.getSignedUrl(e,r);return await this.uploadToS3(e,t.signedUrl,r.onProgress),{success:!0,fileId:t.fileId,url:t.url,key:t.key}}catch(t){return console.error("Error uploading file:",t),{success:!1,error:t instanceof Error?t.message:"Unknown error"}}}async getSignedUrl(e,r={}){let t={loadDirection:"up",bucketType:"conversations",filename:e.name,mimeType:e.type,path:r.path||"uploads",description:r.description||""},n=`${this.config.baseUrl}/file-upload/signed-url`;return this.makeRequest(n,{method:"POST",body:JSON.stringify(t)})}async uploadToS3(e,r,t){return new Promise((n,o)=>{let i=new XMLHttpRequest;t&&i.upload.addEventListener("progress",a=>{if(a.lengthComputable){let c=a.loaded/a.total*100;t(c)}}),i.addEventListener("load",()=>{i.status===200?n():o(new Error(`S3 upload failed! status: ${i.status}`))}),i.addEventListener("error",()=>{o(new Error("S3 upload failed"))}),i.addEventListener("abort",()=>{o(new Error("Upload cancelled"))}),i.open("PUT",r),i.setRequestHeader("Content-Type",e.type),i.send(e)})}async uploadFileWithRetry(e,r={}){let t=r.maxRetries||3,n=null;for(let o=1;o<=t;o++)try{let i=await this.uploadFile(e,r);if(i.success)return i;throw new Error(i.error||"Upload failed")}catch(i){if(n=i instanceof Error?i:new Error("Unknown error"),o===t)break;let a=2**o*1e3;await new Promise(c=>setTimeout(c,a))}return{success:!1,error:n?.message||"Upload failed after retries"}}cancelUpload(){}async makeRequest(e,r){let t={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return r?.headers&&Object.assign(t,r.headers),d(e,{...r,headers:t})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}},u=()=>l.getInstance();0&&(module.exports={UploadService,getUploadService});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
var p=async(i,e)=>{let r=await fetch(i,e);if(!r.ok){let t=await r.json().catch(()=>({}));throw new Error(JSON.stringify({status:r.status,statusText:r.statusText,...t}))}return r&&r.json()};var l=class i{constructor(e){this.config=e}static getInstance(e){if(!i.instance&&e&&(i.instance=new i(e)),!i.instance)throw new Error("UploadService must be initialized with config first");return i.instance}static initialize(e){return i.instance=new i(e),i.instance}async uploadFile(e,r={}){try{let t=await this.getSignedUrl(e,r);return await this.uploadToS3(e,t.signedUrl,r.onProgress),{success:!0,fileId:t.fileId,url:t.url,key:t.key}}catch(t){return console.error("Error uploading file:",t),{success:!1,error:t instanceof Error?t.message:"Unknown error"}}}async getSignedUrl(e,r={}){let t={loadDirection:"up",bucketType:"conversations",filename:e.name,mimeType:e.type,path:r.path||"uploads",description:r.description||""},o=`${this.config.baseUrl}/file-upload/signed-url`;return this.makeRequest(o,{method:"POST",body:JSON.stringify(t)})}async uploadToS3(e,r,t){return new Promise((o,n)=>{let s=new XMLHttpRequest;t&&s.upload.addEventListener("progress",a=>{if(a.lengthComputable){let c=a.loaded/a.total*100;t(c)}}),s.addEventListener("load",()=>{s.status===200?o():n(new Error(`S3 upload failed! status: ${s.status}`))}),s.addEventListener("error",()=>{n(new Error("S3 upload failed"))}),s.addEventListener("abort",()=>{n(new Error("Upload cancelled"))}),s.open("PUT",r),s.setRequestHeader("Content-Type",e.type),s.send(e)})}async uploadFileWithRetry(e,r={}){let t=r.maxRetries||3,o=null;for(let n=1;n<=t;n++)try{let s=await this.uploadFile(e,r);if(s.success)return s;throw new Error(s.error||"Upload failed")}catch(s){if(o=s instanceof Error?s:new Error("Unknown error"),n===t)break;let a=2**n*1e3;await new Promise(c=>setTimeout(c,a))}return{success:!1,error:o?.message||"Upload failed after retries"}}cancelUpload(){}async makeRequest(e,r){let t={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return r?.headers&&Object.assign(t,r.headers),p(e,{...r,headers:t})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}},d=()=>l.getInstance();export{l as UploadService,d as getUploadService};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
"use strict";var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var U=(i,e)=>{for(var r in e)p(i,r,{get:e[r],enumerable:!0})},m=(i,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!f.call(i,n)&&n!==r&&p(i,n,{get:()=>e[n],enumerable:!(t=u(e,n))||t.enumerable});return i};var h=i=>m(p({},"__esModule",{value:!0}),i);var S={};U(S,{UploadService:()=>l,getUploadService:()=>y});module.exports=h(S);var d=async(i,e)=>{let r=await fetch(i,e);if(!r.ok){let t=await r.json().catch(()=>({}));throw new Error(JSON.stringify({status:r.status,statusText:r.statusText,...t}))}return r&&r.json()};var l=class i{constructor(e){this.config=e}static getInstance(e){if(!i.instance&&e&&(i.instance=new i(e)),!i.instance)throw new Error("UploadService must be initialized with config first");return i.instance}static initialize(e){return i.instance=new i(e),i.instance}async uploadFile(e,r={}){try{let t=await this.getSignedUrl(e,r);return await this.uploadToS3(e,t.signedUrl,r.onProgress),{success:!0,fileId:t.fileId,url:t.url,key:t.key}}catch(t){return console.error("Error uploading file:",t),{success:!1,error:t instanceof Error?t.message:"Unknown error"}}}async getSignedUrl(e,r={}){let t={loadDirection:"up",bucketType:"conversations",filename:e.name,mimeType:e.type,path:r.path||"uploads",description:r.description||""},n=`${this.config.baseUrl}/file-upload/signed-url`;return this.makeRequest(n,{method:"POST",body:JSON.stringify(t)})}async uploadToS3(e,r,t){return new Promise((n,o)=>{let s=new XMLHttpRequest;t&&s.upload.addEventListener("progress",a=>{if(a.lengthComputable){let c=a.loaded/a.total*100;t(c)}}),s.addEventListener("load",()=>{s.status===200?n():o(new Error(`S3 upload failed! status: ${s.status}`))}),s.addEventListener("error",()=>{o(new Error("S3 upload failed"))}),s.addEventListener("abort",()=>{o(new Error("Upload cancelled"))}),s.open("PUT",r),s.setRequestHeader("Content-Type",e.type),s.send(e)})}async uploadFileWithRetry(e,r={}){let t=r.maxRetries||3,n=null;for(let o=1;o<=t;o++)try{let s=await this.uploadFile(e,r);if(s.success)return s;throw new Error(s.error||"Upload failed")}catch(s){if(n=s instanceof Error?s:new Error("Unknown error"),o===t)break;let a=2**o*1e3;await new Promise(c=>setTimeout(c,a))}return{success:!1,error:n?.message||"Upload failed after retries"}}cancelUpload(){}async makeRequest(e,r){let t={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return r?.headers&&Object.assign(t,r.headers),d(e,{...r,headers:t})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}},y=()=>l.getInstance();0&&(module.exports={UploadService,getUploadService});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
interface UploadServiceConfig {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
organizationId: string;
|
|
5
|
+
}
|
|
6
|
+
interface SignedUrlRequest {
|
|
7
|
+
loadDirection: "up" | "down";
|
|
8
|
+
bucketType: "conversations";
|
|
9
|
+
filename: string;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
path?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
}
|
|
14
|
+
interface SignedUrlResponse {
|
|
15
|
+
signedUrl: string;
|
|
16
|
+
key: string;
|
|
17
|
+
url: string;
|
|
18
|
+
fileId: string;
|
|
19
|
+
}
|
|
20
|
+
interface UploadResult {
|
|
21
|
+
success: boolean;
|
|
22
|
+
fileId?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
key?: string;
|
|
25
|
+
error?: string;
|
|
26
|
+
}
|
|
27
|
+
type UploadProgressCallback = (progress: number) => void;
|
|
28
|
+
declare class UploadService {
|
|
29
|
+
private static instance;
|
|
30
|
+
private config;
|
|
31
|
+
private constructor();
|
|
32
|
+
static getInstance(config?: UploadServiceConfig): UploadService;
|
|
33
|
+
static initialize(config: UploadServiceConfig): UploadService;
|
|
34
|
+
/**
|
|
35
|
+
* Upload a file using the signed URL approach
|
|
36
|
+
*/
|
|
37
|
+
uploadFile(file: File, options?: {
|
|
38
|
+
path?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
onProgress?: UploadProgressCallback;
|
|
41
|
+
}): Promise<UploadResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Get signed URL for file upload
|
|
44
|
+
*/
|
|
45
|
+
getSignedUrl(file: File, options?: {
|
|
46
|
+
path?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
}): Promise<SignedUrlResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Upload file to S3 using signed URL
|
|
51
|
+
*/
|
|
52
|
+
uploadToS3(file: File, signedUrl: string, onProgress?: UploadProgressCallback): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Upload file with retry logic
|
|
55
|
+
*/
|
|
56
|
+
uploadFileWithRetry(file: File, options?: {
|
|
57
|
+
path?: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
onProgress?: UploadProgressCallback;
|
|
60
|
+
maxRetries?: number;
|
|
61
|
+
}): Promise<UploadResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Cancel ongoing upload
|
|
64
|
+
*/
|
|
65
|
+
cancelUpload(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Make HTTP request with proper headers
|
|
68
|
+
*/
|
|
69
|
+
private makeRequest;
|
|
70
|
+
/**
|
|
71
|
+
* Update configuration
|
|
72
|
+
*/
|
|
73
|
+
updateConfig(config: Partial<UploadServiceConfig>): void;
|
|
74
|
+
/**
|
|
75
|
+
* Get current configuration
|
|
76
|
+
*/
|
|
77
|
+
getConfig(): UploadServiceConfig;
|
|
78
|
+
}
|
|
79
|
+
declare const getUploadService: () => UploadService;
|
|
80
|
+
|
|
81
|
+
export { type SignedUrlRequest, type SignedUrlResponse, type UploadProgressCallback, type UploadResult, UploadService, type UploadServiceConfig, getUploadService };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
interface UploadServiceConfig {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
organizationId: string;
|
|
5
|
+
}
|
|
6
|
+
interface SignedUrlRequest {
|
|
7
|
+
loadDirection: "up" | "down";
|
|
8
|
+
bucketType: "conversations";
|
|
9
|
+
filename: string;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
path?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
}
|
|
14
|
+
interface SignedUrlResponse {
|
|
15
|
+
signedUrl: string;
|
|
16
|
+
key: string;
|
|
17
|
+
url: string;
|
|
18
|
+
fileId: string;
|
|
19
|
+
}
|
|
20
|
+
interface UploadResult {
|
|
21
|
+
success: boolean;
|
|
22
|
+
fileId?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
key?: string;
|
|
25
|
+
error?: string;
|
|
26
|
+
}
|
|
27
|
+
type UploadProgressCallback = (progress: number) => void;
|
|
28
|
+
declare class UploadService {
|
|
29
|
+
private static instance;
|
|
30
|
+
private config;
|
|
31
|
+
private constructor();
|
|
32
|
+
static getInstance(config?: UploadServiceConfig): UploadService;
|
|
33
|
+
static initialize(config: UploadServiceConfig): UploadService;
|
|
34
|
+
/**
|
|
35
|
+
* Upload a file using the signed URL approach
|
|
36
|
+
*/
|
|
37
|
+
uploadFile(file: File, options?: {
|
|
38
|
+
path?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
onProgress?: UploadProgressCallback;
|
|
41
|
+
}): Promise<UploadResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Get signed URL for file upload
|
|
44
|
+
*/
|
|
45
|
+
getSignedUrl(file: File, options?: {
|
|
46
|
+
path?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
}): Promise<SignedUrlResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Upload file to S3 using signed URL
|
|
51
|
+
*/
|
|
52
|
+
uploadToS3(file: File, signedUrl: string, onProgress?: UploadProgressCallback): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Upload file with retry logic
|
|
55
|
+
*/
|
|
56
|
+
uploadFileWithRetry(file: File, options?: {
|
|
57
|
+
path?: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
onProgress?: UploadProgressCallback;
|
|
60
|
+
maxRetries?: number;
|
|
61
|
+
}): Promise<UploadResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Cancel ongoing upload
|
|
64
|
+
*/
|
|
65
|
+
cancelUpload(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Make HTTP request with proper headers
|
|
68
|
+
*/
|
|
69
|
+
private makeRequest;
|
|
70
|
+
/**
|
|
71
|
+
* Update configuration
|
|
72
|
+
*/
|
|
73
|
+
updateConfig(config: Partial<UploadServiceConfig>): void;
|
|
74
|
+
/**
|
|
75
|
+
* Get current configuration
|
|
76
|
+
*/
|
|
77
|
+
getConfig(): UploadServiceConfig;
|
|
78
|
+
}
|
|
79
|
+
declare const getUploadService: () => UploadService;
|
|
80
|
+
|
|
81
|
+
export { type SignedUrlRequest, type SignedUrlResponse, type UploadProgressCallback, type UploadResult, UploadService, type UploadServiceConfig, getUploadService };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
var p=async(s,e)=>{let r=await fetch(s,e);if(!r.ok){let t=await r.json().catch(()=>({}));throw new Error(JSON.stringify({status:r.status,statusText:r.statusText,...t}))}return r&&r.json()};var c=class s{constructor(e){this.config=e}static getInstance(e){if(!s.instance&&e&&(s.instance=new s(e)),!s.instance)throw new Error("UploadService must be initialized with config first");return s.instance}static initialize(e){return s.instance=new s(e),s.instance}async uploadFile(e,r={}){try{let t=await this.getSignedUrl(e,r);return await this.uploadToS3(e,t.signedUrl,r.onProgress),{success:!0,fileId:t.fileId,url:t.url,key:t.key}}catch(t){return console.error("Error uploading file:",t),{success:!1,error:t instanceof Error?t.message:"Unknown error"}}}async getSignedUrl(e,r={}){let t={loadDirection:"up",bucketType:"conversations",filename:e.name,mimeType:e.type,path:r.path||"uploads",description:r.description||""},o=`${this.config.baseUrl}/file-upload/signed-url`;return this.makeRequest(o,{method:"POST",body:JSON.stringify(t)})}async uploadToS3(e,r,t){return new Promise((o,n)=>{let i=new XMLHttpRequest;t&&i.upload.addEventListener("progress",a=>{if(a.lengthComputable){let l=a.loaded/a.total*100;t(l)}}),i.addEventListener("load",()=>{i.status===200?o():n(new Error(`S3 upload failed! status: ${i.status}`))}),i.addEventListener("error",()=>{n(new Error("S3 upload failed"))}),i.addEventListener("abort",()=>{n(new Error("Upload cancelled"))}),i.open("PUT",r),i.setRequestHeader("Content-Type",e.type),i.send(e)})}async uploadFileWithRetry(e,r={}){let t=r.maxRetries||3,o=null;for(let n=1;n<=t;n++)try{let i=await this.uploadFile(e,r);if(i.success)return i;throw new Error(i.error||"Upload failed")}catch(i){if(o=i instanceof Error?i:new Error("Unknown error"),n===t)break;let a=2**n*1e3;await new Promise(l=>setTimeout(l,a))}return{success:!1,error:o?.message||"Upload failed after retries"}}cancelUpload(){}async makeRequest(e,r){let t={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return r?.headers&&Object.assign(t,r.headers),p(e,{...r,headers:t})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}},g=()=>c.getInstance();export{c as UploadService,g as getUploadService};
|
package/themes/dark.cjs
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
2
|
"use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var s=(l,o)=>{for(var e in o)a(l,e,{get:o[e],enumerable:!0})},u=(l,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of t(o))!g.call(l,r)&&r!==e&&a(l,r,{get:()=>o[r],enumerable:!(n=c(o,r))||n.enumerable});return l};var p=l=>u(a({},"__esModule",{value:!0}),l);var m={};s(m,{styles:()=>b});module.exports=p(m);var i=require("lit"),b=i.css`
|
|
3
|
+
:root,
|
|
3
4
|
:host,
|
|
4
5
|
.ol-theme-dark {
|
|
5
6
|
-webkit-color-scheme: dark;
|
|
6
7
|
-moz-color-scheme: dark;
|
|
7
8
|
color-scheme: dark;
|
|
9
|
+
color: var(--ol-color-neutral-900);
|
|
10
|
+
background-color: var(--ol-color-neutral-0);
|
|
8
11
|
|
|
9
12
|
/*
|
|
10
13
|
* Color Primitives
|
package/themes/dark.d.cts
CHANGED
package/themes/dark.d.ts
CHANGED
package/themes/dark.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
2
|
import{css as o}from"lit";var r=o`
|
|
3
|
+
:root,
|
|
3
4
|
:host,
|
|
4
5
|
.ol-theme-dark {
|
|
5
6
|
-webkit-color-scheme: dark;
|
|
6
7
|
-moz-color-scheme: dark;
|
|
7
8
|
color-scheme: dark;
|
|
9
|
+
color: var(--ol-color-neutral-900);
|
|
10
|
+
background-color: var(--ol-color-neutral-0);
|
|
8
11
|
|
|
9
12
|
/*
|
|
10
13
|
* Color Primitives
|
package/themes/light.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
2
|
"use strict";var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var s=(l,o)=>{for(var e in o)a(l,e,{get:o[e],enumerable:!0})},u=(l,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of t(o))!g.call(l,r)&&r!==e&&a(l,r,{get:()=>o[r],enumerable:!(n=c(o,r))||n.enumerable});return l};var p=l=>u(a({},"__esModule",{value:!0}),l);var m={};s(m,{styles:()=>b});module.exports=p(m);var i=require("lit"),b=i.css`
|
|
3
3
|
:root,
|
|
4
4
|
:host,
|
package/themes/light.d.cts
CHANGED
package/themes/light.d.ts
CHANGED
package/themes/light.js
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
"use strict";var l=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(n,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s(e))!a.call(n,i)&&i!==o&&l(n,i,{get:()=>e[i],enumerable:!(r=t(e,i))||r.enumerable});return n};var u=n=>c(l({},"__esModule",{value:!0}),n);var m={};module.exports=u(m);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
/**
|
|
3
|
+
* OnliveManager interface defines the structure for Onlive-specific management functionality
|
|
4
|
+
* that gets attached to the global window object.
|
|
5
|
+
*
|
|
6
|
+
* @property {unknown} [config] - Optional configuration object for Onlive services.
|
|
7
|
+
* @property {Record<string, Record<string, (...args: unknown[]) => unknown>>} services - Registry of available services organized by category and method name.
|
|
8
|
+
*/
|
|
9
|
+
interface OnliveManager {
|
|
10
|
+
config?: unknown;
|
|
11
|
+
services: Record<string, Record<string, (...args: unknown[]) => unknown>>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* WindowOnliveContext extends the Window interface with Onlive-specific properties
|
|
15
|
+
* for managing configuration and services in the global context.
|
|
16
|
+
*
|
|
17
|
+
* @property {OnliveManager} onliveManager - Container for Onlive-specific management functionality.
|
|
18
|
+
*/
|
|
19
|
+
interface WindowOnliveContext {
|
|
20
|
+
onliveManager: OnliveManager;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface Window {
|
|
24
|
+
onliveManager?: OnliveManager;
|
|
25
|
+
}
|
|
26
|
+
interface HTMLElement {
|
|
27
|
+
mozRequestFullScreen?: () => Promise<void>;
|
|
28
|
+
webkitRequestFullscreen?: () => Promise<void>;
|
|
29
|
+
msRequestFullscreen?: () => Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
interface Document {
|
|
32
|
+
fullscreenElement?: Element | null;
|
|
33
|
+
mozCancelFullScreen?: () => Promise<void>;
|
|
34
|
+
webkitExitFullscreen?: () => Promise<void>;
|
|
35
|
+
msExitFullscreen?: () => Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type { OnliveManager, WindowOnliveContext };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
/**
|
|
3
|
+
* OnliveManager interface defines the structure for Onlive-specific management functionality
|
|
4
|
+
* that gets attached to the global window object.
|
|
5
|
+
*
|
|
6
|
+
* @property {unknown} [config] - Optional configuration object for Onlive services.
|
|
7
|
+
* @property {Record<string, Record<string, (...args: unknown[]) => unknown>>} services - Registry of available services organized by category and method name.
|
|
8
|
+
*/
|
|
9
|
+
interface OnliveManager {
|
|
10
|
+
config?: unknown;
|
|
11
|
+
services: Record<string, Record<string, (...args: unknown[]) => unknown>>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* WindowOnliveContext extends the Window interface with Onlive-specific properties
|
|
15
|
+
* for managing configuration and services in the global context.
|
|
16
|
+
*
|
|
17
|
+
* @property {OnliveManager} onliveManager - Container for Onlive-specific management functionality.
|
|
18
|
+
*/
|
|
19
|
+
interface WindowOnliveContext {
|
|
20
|
+
onliveManager: OnliveManager;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface Window {
|
|
24
|
+
onliveManager?: OnliveManager;
|
|
25
|
+
}
|
|
26
|
+
interface HTMLElement {
|
|
27
|
+
mozRequestFullScreen?: () => Promise<void>;
|
|
28
|
+
webkitRequestFullscreen?: () => Promise<void>;
|
|
29
|
+
msRequestFullscreen?: () => Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
interface Document {
|
|
32
|
+
fullscreenElement?: Element | null;
|
|
33
|
+
mozCancelFullScreen?: () => Promise<void>;
|
|
34
|
+
webkitExitFullscreen?: () => Promise<void>;
|
|
35
|
+
msExitFullscreen?: () => Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type { OnliveManager, WindowOnliveContext };
|
package/types/globals.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
2
|
-
"use strict";var
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
"use strict";var t=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var b=(e,a,l,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of i(a))!s.call(e,o)&&o!==l&&t(e,o,{get:()=>a[o],enumerable:!(n=r(a,o))||n.enumerable});return e};var d=e=>b(t({},"__esModule",{value:!0}),e);var p={};module.exports=d(p);
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
1
2
|
/**
|
|
2
3
|
* TrackingOptions defines configuration for event tracking behavior.
|
|
3
4
|
*
|
|
5
|
+
* @template T - The type of event data that can be tracked.
|
|
4
6
|
* @property {boolean} [enabled] - Enables or disables tracking functionality.
|
|
5
7
|
* @property {string} [apiUrl] - Base URL for the tracking API to send events.
|
|
6
|
-
* @property {Partial<
|
|
8
|
+
* @property {Partial<T>} [data] - Additional data to include in tracked events.
|
|
7
9
|
* @property {boolean} [removeExtraneousValues] - When true, filters out non-essential data from events.
|
|
8
10
|
* @property {boolean} [allowBotTraffic] - When true, allows tracking of traffic identified as bots.
|
|
9
11
|
* @property {string[]} [adapters] - List of tracking adapters to use.
|
|
10
12
|
* @property {Object} [emitters] - Configuration for various event emission methods.
|
|
11
|
-
* @property {boolean}
|
|
12
|
-
* @property {boolean}
|
|
13
|
-
* @property {boolean}
|
|
13
|
+
* @property {boolean} emitters.windowEvent - Enables emitting events as window events.
|
|
14
|
+
* @property {boolean} emitters.dataLayer - Enables emitting events to dataLayer.
|
|
15
|
+
* @property {boolean} emitters.windowPostMessage - Enables emitting events via window.postMessage.
|
|
14
16
|
*/
|
|
15
|
-
type TrackingOptions<
|
|
17
|
+
type TrackingOptions<T> = {
|
|
16
18
|
enabled?: boolean;
|
|
17
19
|
apiUrl?: string;
|
|
18
|
-
data?: Partial<
|
|
20
|
+
data?: Partial<T>;
|
|
19
21
|
removeExtraneousValues?: boolean;
|
|
20
22
|
allowBotTraffic?: boolean;
|
|
21
23
|
adapters?: string[];
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
1
2
|
/**
|
|
2
3
|
* TrackingOptions defines configuration for event tracking behavior.
|
|
3
4
|
*
|
|
5
|
+
* @template T - The type of event data that can be tracked.
|
|
4
6
|
* @property {boolean} [enabled] - Enables or disables tracking functionality.
|
|
5
7
|
* @property {string} [apiUrl] - Base URL for the tracking API to send events.
|
|
6
|
-
* @property {Partial<
|
|
8
|
+
* @property {Partial<T>} [data] - Additional data to include in tracked events.
|
|
7
9
|
* @property {boolean} [removeExtraneousValues] - When true, filters out non-essential data from events.
|
|
8
10
|
* @property {boolean} [allowBotTraffic] - When true, allows tracking of traffic identified as bots.
|
|
9
11
|
* @property {string[]} [adapters] - List of tracking adapters to use.
|
|
10
12
|
* @property {Object} [emitters] - Configuration for various event emission methods.
|
|
11
|
-
* @property {boolean}
|
|
12
|
-
* @property {boolean}
|
|
13
|
-
* @property {boolean}
|
|
13
|
+
* @property {boolean} emitters.windowEvent - Enables emitting events as window events.
|
|
14
|
+
* @property {boolean} emitters.dataLayer - Enables emitting events to dataLayer.
|
|
15
|
+
* @property {boolean} emitters.windowPostMessage - Enables emitting events via window.postMessage.
|
|
14
16
|
*/
|
|
15
|
-
type TrackingOptions<
|
|
17
|
+
type TrackingOptions<T> = {
|
|
16
18
|
enabled?: boolean;
|
|
17
19
|
apiUrl?: string;
|
|
18
|
-
data?: Partial<
|
|
20
|
+
data?: Partial<T>;
|
|
19
21
|
removeExtraneousValues?: boolean;
|
|
20
22
|
allowBotTraffic?: boolean;
|
|
21
23
|
adapters?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
package/utils/adopt-styles.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
2
|
-
"use strict";var s=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
"use strict";var s=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},i=(e,t,o,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of p(t))!y.call(e,a)&&a!==o&&s(e,a,{get:()=>t[a],enumerable:!(l=S(t,a))||l.enumerable});return e};var n=e=>i(s({},"__esModule",{value:!0}),e);var m={};d(m,{adoptStyles:()=>c});module.exports=n(m);var r=require("lit"),c=(e,t)=>{try{(0,r.adoptStyles)(e,t)}catch(o){console.warn("Failed to adopt styles using lit-adoptStyles:",o)}};0&&(module.exports={adoptStyles});
|
package/utils/adopt-styles.d.cts
CHANGED
package/utils/adopt-styles.d.ts
CHANGED
package/utils/adopt-styles.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
2
|
-
import{adoptStyles as a}from"lit";var
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.163 | © 2026 Onlive.ai */
|
|
2
|
+
import{adoptStyles as a}from"lit";var l=(t,e)=>{try{a(t,e)}catch(o){console.warn("Failed to adopt styles using lit-adoptStyles:",o)}};export{l as adoptStyles};
|