@stackshift-ui/image 6.1.0-beta.3 → 7.0.0-beta.5
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/package.json +5 -5
- package/src/image.tsx +4 -1
- package/dist/chunk-NQ52GWT6.mjs +0 -13
- package/dist/chunk-YTWR6D52.mjs +0 -1
- package/dist/helper/index.d.ts +0 -2
- package/dist/helper/index.js +0 -1
- package/dist/helper/index.mjs +0 -1
- package/dist/image.d.ts +0 -6
- package/dist/image.js +0 -1
- package/dist/image.mjs +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/types.d.ts +0 -10
- package/dist/types.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/image",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-beta.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"typescript": "^5.6.2",
|
|
28
28
|
"vite-tsconfig-paths": "^5.0.1",
|
|
29
29
|
"vitest": "^2.1.1",
|
|
30
|
-
"@stackshift-ui/
|
|
31
|
-
"@stackshift-ui/
|
|
30
|
+
"@stackshift-ui/eslint-config": "6.0.10",
|
|
31
|
+
"@stackshift-ui/typescript-config": "6.0.10"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stackshift-ui/scripts": "
|
|
35
|
-
"@stackshift-ui/system": "
|
|
34
|
+
"@stackshift-ui/scripts": "7.0.0-beta.3",
|
|
35
|
+
"@stackshift-ui/system": "7.0.0-beta.4"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@types/react": "16.8 - 19",
|
package/src/image.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
|
2
2
|
import type { HTMLProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
export interface ImageProps extends HTMLProps<HTMLImageElement> {
|
|
5
|
+
priority?: boolean;
|
|
5
6
|
loading?: "lazy" | "eager" | undefined;
|
|
6
7
|
children?: ReactNode;
|
|
7
8
|
}
|
|
@@ -21,8 +22,10 @@ export const Image = ({ children, loading = "lazy", ...props }: ImageProps) => {
|
|
|
21
22
|
const components = useStackShiftUIComponents();
|
|
22
23
|
const { [displayName]: Component = "img" } = components;
|
|
23
24
|
|
|
25
|
+
const handleLoading = props.priority ? undefined : loading;
|
|
26
|
+
|
|
24
27
|
return (
|
|
25
|
-
<Component loading={
|
|
28
|
+
<Component loading={handleLoading} {...props} data-testid="image">
|
|
26
29
|
{children}
|
|
27
30
|
</Component>
|
|
28
31
|
);
|
package/dist/chunk-NQ52GWT6.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// src/image.tsx
|
|
2
|
-
import { useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var displayName = "Image";
|
|
5
|
-
var Image = ({ children, loading = "lazy", ...props }) => {
|
|
6
|
-
const components = useStackShiftUIComponents();
|
|
7
|
-
const { [displayName]: Component = "img" } = components;
|
|
8
|
-
return /* @__PURE__ */ jsx(Component, { loading, ...props, children });
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
Image
|
|
13
|
-
};
|
package/dist/chunk-YTWR6D52.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useStackShiftUIComponents as m}from"@stackshift-ui/system";import{jsx as r}from"react/jsx-runtime";var p="Image",c=({children:e,loading:o="lazy",...n})=>{let t=m(),{[p]:a="img"}=t;return r(a,{loading:o,...n,children:e})};export{c as a};
|
package/dist/helper/index.d.ts
DELETED
package/dist/helper/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var u=(n,e)=>{for(var r in e)L(n,r,{get:e[r],enumerable:!0})},f=(n,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of k(e))!s.call(n,i)&&i!==r&&L(n,i,{get:()=>e[i],enumerable:!(t=a(e,i))||t.enumerable});return n};var p=n=>f(L({},"__esModule",{value:!0}),n);var m={};u(m,{logoLink:()=>x});module.exports=p(m);var x=n=>{var e,r,t;return n!=null&&n.internalLink&&(n==null?void 0:n.type)==="linkInternal"?(r=(e=n==null?void 0:n.internalLink)==null?void 0:e.toLowerCase())!=null&&r.includes("home")?"/":`/${n.internalLink}`:n!=null&&n.externalLink&&(n==null?void 0:n.type)==="linkExternal"&&(t=n==null?void 0:n.externalLink)!=null?t:"/"};0&&(module.exports={logoLink});
|
package/dist/helper/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=n=>{var e,r,t;return n!=null&&n.internalLink&&(n==null?void 0:n.type)==="linkInternal"?(r=(e=n==null?void 0:n.internalLink)==null?void 0:e.toLowerCase())!=null&&r.includes("home")?"/":`/${n.internalLink}`:n!=null&&n.externalLink&&(n==null?void 0:n.type)==="linkExternal"&&(t=n==null?void 0:n.externalLink)!=null?t:"/"};export{i as logoLink};
|
package/dist/image.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { HTMLProps, ReactNode } from "react";
|
|
2
|
-
export interface ImageProps extends HTMLProps<HTMLImageElement> {
|
|
3
|
-
loading?: "lazy" | "eager" | undefined;
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare const Image: ({ children, loading, ...props }: ImageProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/image.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var t in e)m(o,t,{get:e[t],enumerable:!0})},i=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of c(e))!d.call(o,n)&&n!==t&&m(o,n,{get:()=>e[n],enumerable:!(a=s(e,n))||a.enumerable});return o};var l=o=>i(m({},"__esModule",{value:!0}),o);var y={};g(y,{Image:()=>f});module.exports=l(y);var p=require("@stackshift-ui/system"),r=require("react/jsx-runtime"),I="Image",f=({children:o,loading:e="lazy",...t})=>{let a=(0,p.useStackShiftUIComponents)(),{[I]:n="img"}=a;return(0,r.jsx)(n,{loading:e,...t,children:o})};0&&(module.exports={Image});
|
package/dist/image.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-YTWR6D52.mjs";export{a as Image};
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./image";
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var m=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var n in e)m(o,n,{get:e[n],enumerable:!0})},g=(o,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of c(e))!i.call(o,t)&&t!==n&&m(o,t,{get:()=>e[t],enumerable:!(a=s(e,t))||a.enumerable});return o};var l=o=>g(m({},"__esModule",{value:!0}),o);var y={};d(y,{Image:()=>I});module.exports=l(y);var r=require("@stackshift-ui/system"),p=require("react/jsx-runtime"),f="Image",I=({children:o,loading:e="lazy",...n})=>{let a=(0,r.useStackShiftUIComponents)(),{[f]:t="img"}=a;return(0,p.jsx)(t,{loading:e,...n,children:o})};0&&(module.exports={Image});
|
package/dist/index.mjs
DELETED
package/dist/types.d.ts
DELETED
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var s=(i,n,l,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of g(n))!o.call(i,t)&&t!==l&&r(i,t,{get:()=>n[t],enumerable:!(e=a(n,t))||e.enumerable});return i};var k=i=>s(r({},"__esModule",{value:!0}),i);var L={};module.exports=k(L);
|