Skip to content

Commit

Permalink
[Breaking] Use CSS from the Trinsic's CDN (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasamonrc authored Dec 13, 2024
1 parent fd29345 commit 0a78cfc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 222 deletions.
215 changes: 0 additions & 215 deletions ui-web/sdk/src/iframeCss.ts

This file was deleted.

12 changes: 6 additions & 6 deletions ui-web/sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { detectUserAgents } from "./detectUserAgents";
import MicroModal from "micromodal";
import { CSSString } from "./iframeCss";

export interface TrinsicSessionResult {
success: boolean;
Expand All @@ -15,10 +14,11 @@ export async function launchIframe(
launchUrl: string
): Promise<TrinsicSessionResult> {
launchUrl += "&embed=iframe";
const style = document.createElement("style");
style.id = "trinsic-ui-style";
style.textContent = CSSString;
document.head.appendChild(style);
const cssLink = document.createElement("link");
cssLink.href = "https://content.trinsic.id/connect/assets/widget-iframe.css";
cssLink.rel = "stylesheet";

document.head.appendChild(cssLink);

if (!launchUrl) {
throw new Error(
Expand Down Expand Up @@ -73,7 +73,7 @@ export async function launchPopup(
}

const launchUrl = await getLaunchUrl();
if(!launchUrl) {
if (!launchUrl) {
throw new Error("Invalid launch URL " + launchUrl);
}

Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"flutterUIVersion": "1.0.0",
"expoUIVersion": "1.0.0",
"reactNativeUIVersion": "1.0.0",
"webUIVersion": "1.2.12"
"webUIVersion": "2.0.0"
}

0 comments on commit 0a78cfc

Please sign in to comment.