You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@typeface-ai/typeface-embed-react

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typeface-ai/typeface-embed-react - npm Package Compare versions

Comparing version

to
0.9.11

4

lib/esm/definitions.d.ts

@@ -40,3 +40,5 @@ import { CSSProperties } from "react";

ON_ERROR = "onError",
ON_IFRAME_URL_UPDATE = "onIframeUrlUpdate"
ON_IFRAME_URL_UPDATE = "onIframeUrlUpdate",
ON_IFRAME_URL_LOAD = "onIframeUrlLoad",
ON_IFRAME_URL_LOAD_FAIL = "onIframeUrlLoadFail"
}

@@ -43,0 +45,0 @@ export declare enum TypefaceChatSendEvent {

@@ -28,2 +28,4 @@ export var BlockType;

TypefaceChatEvent["ON_IFRAME_URL_UPDATE"] = "onIframeUrlUpdate";
TypefaceChatEvent["ON_IFRAME_URL_LOAD"] = "onIframeUrlLoad";
TypefaceChatEvent["ON_IFRAME_URL_LOAD_FAIL"] = "onIframeUrlLoadFail";
})(TypefaceChatEvent || (TypefaceChatEvent = {}));

@@ -30,0 +32,0 @@ export var TypefaceChatSendEvent;

@@ -39,2 +39,20 @@ var __assign = (this && this.__assign) || function () {

]);
var onLoadIframe = function () {
console.log("IFrame loaded with URL:", embedUrl);
if (onEvent && !!embedUrl) {
onEvent({
eventType: TypefaceChatEvent.ON_IFRAME_URL_LOAD,
data: { embedUrl: embedUrl, typefaceOrigin: typefaceOrigin, sourceApp: sourceApp },
});
}
};
var onErrorIframe = function (e) {
console.error("IFrame failed to load URL:", embedUrl);
if (onEvent) {
onEvent({
eventType: TypefaceChatEvent.ON_IFRAME_URL_LOAD_FAIL,
data: { embedUrl: embedUrl, typefaceOrigin: typefaceOrigin, sourceApp: sourceApp, error: e },
});
}
};
useEffect(function () {

@@ -56,3 +74,3 @@ if (onEvent && !!embedUrl) {

React.createElement("div", { className: 'typeface-iframe-container', style: __assign(__assign({}, DEFAULT_STYLES), styles) },
React.createElement("iframe", { id: 'typeface-embed-frame', title: 'Typeface', className: 'typeface-iframe', style: iframeStyles, src: embedUrl, loading: 'lazy' }))));
React.createElement("iframe", { id: 'typeface-embed-frame', title: 'Typeface', className: 'typeface-iframe', style: iframeStyles, src: embedUrl, loading: 'lazy', onLoad: onLoadIframe, onError: onErrorIframe }))));
};

@@ -59,0 +77,0 @@ export var TypefacePluginIFrame = function (props) {

{
"name": "@typeface-ai/typeface-embed-react",
"version": "0.9.10",
"version": "0.9.11",
"description": "React SDK for Typeface Embed Integration",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.