🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@suspensive/react-image

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@suspensive/react-image - npm Package Compare versions

Comparing version

to
0.0.2

src/Load.spec.tsx

8

dist/Image.js

@@ -34,5 +34,5 @@ "use client"

// src/Load.ts
import { createElement } from "react";
// src/Load.tsx
import { useSyncExternalStore } from "use-sync-external-store/shim";
import { jsx } from "react/jsx-runtime";
var load = (src) => new Promise((resolve, reject) => {

@@ -100,3 +100,3 @@ const image = new Image();

// src/Image.tsx
import { jsx } from "react/jsx-runtime";
import { jsx as jsx2 } from "react/jsx-runtime";
var Image2 = forwardRef(function Image3(_a, ref) {

@@ -108,3 +108,3 @@ var _b = _a, { src } = _b, props = __objRest(_b, ["src"]);

const loaded = useLoad({ src });
return /* @__PURE__ */ jsx("img", __spreadValues({ ref, src: loaded.src }, props));
return /* @__PURE__ */ jsx2("img", __spreadValues({ ref, src: loaded.src }, props));
});

@@ -111,0 +111,0 @@ export {

@@ -34,5 +34,5 @@ "use client"

// src/Load.ts
import { createElement } from "react";
// src/Load.tsx
import { useSyncExternalStore } from "use-sync-external-store/shim";
import { jsx } from "react/jsx-runtime";
var load = (src) => new Promise((resolve, reject) => {

@@ -100,3 +100,3 @@ const image = new Image();

// src/Image.tsx
import { jsx } from "react/jsx-runtime";
import { jsx as jsx2 } from "react/jsx-runtime";
var Image2 = forwardRef(function Image3(_a, ref) {

@@ -108,3 +108,3 @@ var _b = _a, { src } = _b, props = __objRest(_b, ["src"]);

const loaded = useLoad({ src });
return /* @__PURE__ */ jsx("img", __spreadValues({ ref, src: loaded.src }, props));
return /* @__PURE__ */ jsx2("img", __spreadValues({ ref, src: loaded.src }, props));
});

@@ -111,0 +111,0 @@ export {

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

import * as react from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';
import { FunctionComponent } from 'react';

@@ -25,4 +25,4 @@

};
declare const Load: <TLoadSrc extends string>({ src, children }: LoadProps<TLoadSrc>) => react.FunctionComponentElement<LoadState<TLoadSrc>>;
declare const Load: <TLoadSrc extends string>({ src, children: Children }: LoadProps<TLoadSrc>) => react_jsx_runtime.JSX.Element;
export { Load, load, useLoad };
"use client"
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
// src/Load.ts
import { createElement } from "react";
// src/Load.tsx
import { useSyncExternalStore } from "use-sync-external-store/shim";
import { jsx } from "react/jsx-runtime";
var load = (src) => new Promise((resolve, reject) => {

@@ -66,3 +82,3 @@ const image = new Image();

);
var Load = ({ src, children }) => createElement(children, useLoad({ src }));
var Load = ({ src, children: Children }) => /* @__PURE__ */ jsx(Children, __spreadValues({}, useLoad({ src })));
export {

@@ -69,0 +85,0 @@ Load,

{
"name": "@suspensive/react-image",
"version": "0.0.1",
"version": "0.0.2",
"description": "Useful image interfaces for React Suspense",

@@ -51,3 +51,3 @@ "keywords": [

"devDependencies": {
"@types/react": "^18.2.38",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.2.15",

@@ -54,0 +54,0 @@ "@types/use-sync-external-store": "^0.0.6",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet