@pixzle/react 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/README.md +48 -56
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -12,66 +12,58 @@ npm i @pixzle/react
12
12
 
13
13
  ### PixzleImage
14
14
 
15
- Single image restoration component.
16
-
17
15
  ```tsx
18
16
  import { PixzleImage } from '@pixzle/react';
17
+ ```
19
18
 
20
- // Using manifest URL
21
- const MyComponentWithManifest = () => {
22
- return (
23
- <PixzleImage
24
- manifest="https://example.com/manifest.json"
25
- image="https://example.com/fragment.png"
26
- />
27
- );
28
- };
19
+ ### Using manifest URL
29
20
 
30
- // Using manifest URL (with multiple images)
31
- const MyComponentWithMultipleImages = () => {
32
- return (
33
- <>
34
- {/* #1 */}
35
- <PixzleImage
36
- manifest="https://example.com/manifest.json"
37
- image="https://example.com/fragment1.png"
38
- // imageIndex={0}
39
- />
40
- {/* #2 */}
41
- <PixzleImage
42
- manifest="https://example.com/manifest.json"
43
- image="https://example.com/fragment2.png"
44
- imageIndex={1}
45
- />
46
- {/* #3 */}
47
- <PixzleImage
48
- manifest="https://example.com/manifest.json"
49
- image="https://example.com/fragment3.png"
50
- imageIndex={2}
51
- />
52
- </>
53
- );
54
- };
21
+ ```tsx
22
+ <PixzleImage
23
+ manifest="https://example.com/manifest.json"
24
+ image="https://example.com/fragment.png"
25
+ />
26
+ ```
27
+
28
+ ### Using manifest URL with multiple images
29
+
30
+ ```tsx
31
+ {/* #1 */}
32
+ <PixzleImage
33
+ manifest="https://example.com/manifest.json"
34
+ image="https://example.com/fragment1.png"
35
+ // imageIndex={0}
36
+ />
55
37
 
56
- // Using manifest data
57
- const MyComponentWithManifestData = () => {
58
- return (
59
- <PixzleImage
60
- manifestData={manifestData}
61
- image="https://example.com/fragment.png"
62
- />
63
- );
64
- };
38
+ {/* #2 */}
39
+ <PixzleImage
40
+ manifest="https://example.com/manifest.json"
41
+ image="https://example.com/fragment2.png"
42
+ imageIndex={1}
43
+ />
65
44
 
66
- // Using explicit parameters
67
- const MyComponent = () => {
68
- return (
69
- <PixzleImage
70
- blockSize={2}
71
- seed={72411}
72
- imageInfo={{ w: 500, h: 500 }}
73
- image="https://example.com/fragment.png"
74
- />
75
- );
76
- };
45
+ {/* #3 */}
46
+ <PixzleImage
47
+ manifest="https://example.com/manifest.json"
48
+ image="https://example.com/fragment3.png"
49
+ imageIndex={2}
50
+ />
51
+ ```
52
+
53
+ ### Using manifest data
54
+ ```tsx
55
+ <PixzleImage
56
+ manifestData={manifestData}
57
+ image="https://example.com/fragment.png"
58
+ />
59
+ ```
60
+
61
+ ### Using explicit parameters
62
+ ```tsx
63
+ <PixzleImage
64
+ blockSize={2}
65
+ seed={72411}
66
+ imageInfo={{ w: 500, h: 500 }}
67
+ image="https://example.com/fragment.png"
68
+ />
77
69
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixzle/react",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "React components for pixzle",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,8 +34,8 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@pixzle/browser": "0.1.5",
38
- "@pixzle/core": "0.1.5"
37
+ "@pixzle/browser": "0.1.6",
38
+ "@pixzle/core": "0.1.6"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8.0",