@webstudio-is/image 0.74.0 → 0.76.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/image",
3
- "version": "0.74.0",
3
+ "version": "0.76.0",
4
4
  "description": "Image optimization",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "devDependencies": {
13
13
  "@jest/globals": "^29.3.1",
14
- "@storybook/react": "^6.5.16",
14
+ "@storybook/react": "^7.0.23",
15
15
  "@types/react": "^18.0.35",
16
16
  "jest": "^29.3.1",
17
17
  "react": "^18.2.0",
@@ -28,9 +28,9 @@
28
28
  },
29
29
  "exports": {
30
30
  "source": "./src/index.ts",
31
+ "types": "./lib/types/index.d.ts",
31
32
  "import": "./lib/index.js",
32
- "require": "./lib/cjs/index.js",
33
- "types": "./lib/types/index.d.ts"
33
+ "require": "./lib/cjs/index.js"
34
34
  },
35
35
  "files": [
36
36
  "lib/*",
@@ -43,12 +43,11 @@
43
43
  "scripts": {
44
44
  "typecheck": "tsc --noEmit --emitDeclarationOnly false",
45
45
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
46
- "checks": "pnpm typecheck && pnpm lint && pnpm test",
46
+ "checks": "pnpm typecheck && pnpm test",
47
47
  "dev": "build-package --watch",
48
48
  "build": "build-package",
49
- "dts": "tsc --declarationDir lib/types",
50
- "lint": "eslint ./src --ext .ts,.tsx --max-warnings 0",
51
- "storybook:run": "start-storybook -p 6006",
52
- "storybook:build": "build-storybook"
49
+ "dts": "tsc --project tsconfig.dts.json",
50
+ "storybook:dev": "storybook dev -p 6006",
51
+ "storybook:build": "storybook build"
53
52
  }
54
53
  }
@@ -1,34 +0,0 @@
1
- import type * as React from "react";
2
- import type { ComponentMeta, ComponentStory } from "@storybook/react";
3
- declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLImageElement> & React.ImgHTMLAttributes<HTMLImageElement> & {
4
- quality?: number | undefined;
5
- optimize?: boolean | undefined;
6
- loader: import("./image-optimize").ImageLoader;
7
- }, "ref"> & React.RefAttributes<HTMLImageElement>>>;
8
- export default _default;
9
- /**
10
- * Load images depending on image width and device per pixel ratio.
11
- **/
12
- export declare const FixedWidthImage: ComponentStory<React.FunctionComponent>;
13
- /**
14
- * Preserve ratio using object-fit: cover. Load images depending on image width and device per pixel ratio.
15
- **/
16
- export declare const FixedWidthImageCover: ComponentStory<React.FunctionComponent>;
17
- /**
18
- * Load images depending on the viewport width.
19
- **/
20
- export declare const UnknownWidthImage: ComponentStory<React.FunctionComponent>;
21
- /**
22
- * Fit width of the parent container, has own aspect-ratio and object-fit=cover.
23
- * Load images depending on the viewport width.
24
- **/
25
- export declare const AspectRatioImage: ComponentStory<React.FunctionComponent>;
26
- /**
27
- * Fill width and height of the relative parent container, object-fit=cover. Load images depending on the viewport width.
28
- **/
29
- export declare const FillParentImage: ComponentStory<React.FunctionComponent>;
30
- /**
31
- * "sizes" attribute explicitly equal to 100vw allowing to skip the default behavior.
32
- * See DEFAULT_SIZES in the Image component. Load images depending on the viewport width.
33
- **/
34
- export declare const HeroImage: ComponentStory<React.FunctionComponent>;