Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@veltdev/react

Package Overview
Dependencies
Maintainers
2
Versions
575
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@veltdev/react - npm Package Compare versions

Comparing version
1.0.12
to
1.0.13
+22
-2
cjs/index.js

@@ -92,6 +92,6 @@ 'use strict';

var VELT_SDK_VERSION = '1.0.15';
var VELT_SDK_VERSION = '1.0.16';
var SnippylyProvider = function (props) {
var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, onClientLoad = props.onClientLoad, children = props.children;
var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, onClientLoad = props.onClientLoad, children = props.children;
var _a = React.useState(null), client = _a[0], setClient = _a[1];

@@ -127,2 +127,22 @@ React.useEffect(function () {

case 4:
// Set language
if (language && (velt === null || velt === void 0 ? void 0 : velt.setLanguage)) {
velt === null || velt === void 0 ? void 0 : velt.setLanguage(language);
}
// Set translations
if (translations && (velt === null || velt === void 0 ? void 0 : velt.setTranslations)) {
if (typeof translations === 'object') {
Object.keys(translations).forEach(function (languageCode) {
velt === null || velt === void 0 ? void 0 : velt.setTranslations(languageCode, translations[languageCode] || {});
});
}
}
if ([true, false].includes(autoTranslation)) {
if (autoTranslation && (velt === null || velt === void 0 ? void 0 : velt.enableAutoTranslation)) {
velt === null || velt === void 0 ? void 0 : velt.enableAutoTranslation();
}
else if (!autoTranslation && (velt === null || velt === void 0 ? void 0 : velt.disableAutoTranslation)) {
velt === null || velt === void 0 ? void 0 : velt.disableAutoTranslation();
}
}
if (velt === null || velt === void 0 ? void 0 : velt.st) {

@@ -129,0 +149,0 @@ velt === null || velt === void 0 ? void 0 : velt.st('react');

@@ -8,2 +8,9 @@ import React from 'react';

documentId?: string;
language?: string;
translations?: {
[languageCode: string]: {
[input: string]: string;
};
};
autoTranslation?: boolean;
onClientLoad?: (veltClient?: Velt) => any;

@@ -10,0 +17,0 @@ }

+1
-1

@@ -1,1 +0,1 @@

export declare const VELT_SDK_VERSION = "1.0.15";
export declare const VELT_SDK_VERSION = "1.0.16";

@@ -84,6 +84,6 @@ import React, { createContext, useContext, useState, useEffect, useRef } from 'react';

var VELT_SDK_VERSION = '1.0.15';
var VELT_SDK_VERSION = '1.0.16';
var SnippylyProvider = function (props) {
var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, onClientLoad = props.onClientLoad, children = props.children;
var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, onClientLoad = props.onClientLoad, children = props.children;
var _a = useState(null), client = _a[0], setClient = _a[1];

@@ -119,2 +119,22 @@ useEffect(function () {

case 4:
// Set language
if (language && (velt === null || velt === void 0 ? void 0 : velt.setLanguage)) {
velt === null || velt === void 0 ? void 0 : velt.setLanguage(language);
}
// Set translations
if (translations && (velt === null || velt === void 0 ? void 0 : velt.setTranslations)) {
if (typeof translations === 'object') {
Object.keys(translations).forEach(function (languageCode) {
velt === null || velt === void 0 ? void 0 : velt.setTranslations(languageCode, translations[languageCode] || {});
});
}
}
if ([true, false].includes(autoTranslation)) {
if (autoTranslation && (velt === null || velt === void 0 ? void 0 : velt.enableAutoTranslation)) {
velt === null || velt === void 0 ? void 0 : velt.enableAutoTranslation();
}
else if (!autoTranslation && (velt === null || velt === void 0 ? void 0 : velt.disableAutoTranslation)) {
velt === null || velt === void 0 ? void 0 : velt.disableAutoTranslation();
}
}
if (velt === null || velt === void 0 ? void 0 : velt.st) {

@@ -121,0 +141,0 @@ velt === null || velt === void 0 ? void 0 : velt.st('react');

@@ -8,2 +8,9 @@ import React from 'react';

documentId?: string;
language?: string;
translations?: {
[languageCode: string]: {
[input: string]: string;
};
};
autoTranslation?: boolean;
onClientLoad?: (veltClient?: Velt) => any;

@@ -10,0 +17,0 @@ }

@@ -1,1 +0,1 @@

export declare const VELT_SDK_VERSION = "1.0.15";
export declare const VELT_SDK_VERSION = "1.0.16";

@@ -10,2 +10,9 @@ /// <reference types="react" />

documentId?: string;
language?: string;
translations?: {
[languageCode: string]: {
[input: string]: string;
};
};
autoTranslation?: boolean;
onClientLoad?: (veltClient?: Velt) => any;

@@ -12,0 +19,0 @@ }

{
"name": "@veltdev/react",
"version": "1.0.12",
"version": "1.0.13",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display