@flightdev/image 0.0.2 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +13 -13
  2. package/package.json +102 -96
  3. package/LICENSE +0 -21
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # @flight-framework/image
1
+ # @flightdev/image
2
2
 
3
3
  Image optimization package for Flight Framework with Sharp, Squoosh, and CDN adapters.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @flight-framework/image
8
+ npm install @flightdev/image
9
9
 
10
10
  # Install your preferred processor:
11
11
  npm install sharp # For Node.js (fastest)
@@ -15,8 +15,8 @@ npm install sharp # For Node.js (fastest)
15
15
  ## Quick Start
16
16
 
17
17
  ```typescript
18
- import { createImage } from '@flight-framework/image';
19
- import { sharp } from '@flight-framework/image/sharp';
18
+ import { createImage } from '@flightdev/image';
19
+ import { sharp } from '@flightdev/image/sharp';
20
20
 
21
21
  const image = createImage(sharp());
22
22
 
@@ -44,7 +44,7 @@ const responsive = await image.responsive('./hero.jpg', {
44
44
  Fastest option for Node.js environments.
45
45
 
46
46
  ```typescript
47
- import { sharp } from '@flight-framework/image/sharp';
47
+ import { sharp } from '@flightdev/image/sharp';
48
48
 
49
49
  const adapter = sharp({
50
50
  cache: true, // Enable internal cache
@@ -58,7 +58,7 @@ const adapter = sharp({
58
58
  Works on Edge runtimes (Cloudflare Workers, Vercel Edge).
59
59
 
60
60
  ```typescript
61
- import { squoosh } from '@flight-framework/image/squoosh';
61
+ import { squoosh } from '@flightdev/image/squoosh';
62
62
 
63
63
  const adapter = squoosh();
64
64
  ```
@@ -68,7 +68,7 @@ const adapter = squoosh();
68
68
  CDN-based optimization, no local processing.
69
69
 
70
70
  ```typescript
71
- import { cloudinary } from '@flight-framework/image/cloudinary';
71
+ import { cloudinary } from '@flightdev/image/cloudinary';
72
72
 
73
73
  const adapter = cloudinary({
74
74
  cloudName: 'my-cloud',
@@ -80,7 +80,7 @@ const adapter = cloudinary({
80
80
  ### Imgix (CDN)
81
81
 
82
82
  ```typescript
83
- import { imgix } from '@flight-framework/image/imgix';
83
+ import { imgix } from '@flightdev/image/imgix';
84
84
 
85
85
  const adapter = imgix({
86
86
  domain: 'my-source.imgix.net',
@@ -93,7 +93,7 @@ const adapter = imgix({
93
93
  ### React
94
94
 
95
95
  ```tsx
96
- import { Image } from '@flight-framework/image/react';
96
+ import { Image } from '@flightdev/image/react';
97
97
 
98
98
  <Image
99
99
  src="/hero.jpg"
@@ -110,7 +110,7 @@ import { Image } from '@flight-framework/image/react';
110
110
 
111
111
  ```vue
112
112
  <script setup>
113
- import { FlightImage } from '@flight-framework/image/vue';
113
+ import { FlightImage } from '@flightdev/image/vue';
114
114
  </script>
115
115
 
116
116
  <template>
@@ -129,7 +129,7 @@ import { FlightImage } from '@flight-framework/image/vue';
129
129
 
130
130
  ```svelte
131
131
  <script>
132
- import { createImageProps, lazyImage } from '@flight-framework/image/svelte';
132
+ import { createImageProps, lazyImage } from '@flightdev/image/svelte';
133
133
 
134
134
  const props = createImageProps({
135
135
  src: '/hero.jpg',
@@ -145,7 +145,7 @@ import { FlightImage } from '@flight-framework/image/vue';
145
145
  ### Solid
146
146
 
147
147
  ```tsx
148
- import { Image } from '@flight-framework/image/solid';
148
+ import { Image } from '@flightdev/image/solid';
149
149
 
150
150
  <Image
151
151
  src="/hero.jpg"
@@ -185,7 +185,7 @@ import { Image } from '@flight-framework/image/solid';
185
185
  Implement the `ImageAdapter` interface:
186
186
 
187
187
  ```typescript
188
- import type { ImageAdapter } from '@flight-framework/image';
188
+ import type { ImageAdapter } from '@flightdev/image';
189
189
 
190
190
  export function myAdapter(config: MyConfig): ImageAdapter {
191
191
  return {
package/package.json CHANGED
@@ -1,97 +1,103 @@
1
- {
2
- "name": "@flightdev/image",
3
- "version": "0.0.2",
4
- "description": "Agnostic image optimization for Flight Framework. Choose your processor: Sharp, Squoosh, Cloudinary, or custom.",
5
- "type": "module",
6
- "exports": {
7
- ".": {
8
- "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js"
10
- },
11
- "./sharp": {
12
- "types": "./dist/adapters/sharp.d.ts",
13
- "import": "./dist/adapters/sharp.js"
14
- },
15
- "./squoosh": {
16
- "types": "./dist/adapters/squoosh.d.ts",
17
- "import": "./dist/adapters/squoosh.js"
18
- },
19
- "./cloudinary": {
20
- "types": "./dist/adapters/cloudinary.d.ts",
21
- "import": "./dist/adapters/cloudinary.js"
22
- },
23
- "./imgix": {
24
- "types": "./dist/adapters/imgix.d.ts",
25
- "import": "./dist/adapters/imgix.js"
26
- },
27
- "./react": {
28
- "types": "./dist/components/react.d.ts",
29
- "import": "./dist/components/react.js"
30
- },
31
- "./vue": {
32
- "types": "./dist/components/vue.d.ts",
33
- "import": "./dist/components/vue.js"
34
- },
35
- "./svelte": {
36
- "types": "./dist/components/svelte.d.ts",
37
- "import": "./dist/components/svelte.js"
38
- },
39
- "./solid": {
40
- "types": "./dist/components/solid.d.ts",
41
- "import": "./dist/components/solid.js"
42
- }
43
- },
44
- "files": [
45
- "dist"
46
- ],
47
- "dependencies": {},
48
- "peerDependencies": {
49
- "sharp": ">=0.33.0",
50
- "react": ">=18.0.0",
51
- "vue": ">=3.0.0",
52
- "svelte": ">=4.0.0",
53
- "solid-js": ">=1.0.0"
54
- },
55
- "peerDependenciesMeta": {
56
- "sharp": {
57
- "optional": true
58
- },
59
- "react": {
60
- "optional": true
61
- },
62
- "vue": {
63
- "optional": true
64
- },
65
- "svelte": {
66
- "optional": true
67
- },
68
- "solid-js": {
69
- "optional": true
70
- }
71
- },
72
- "devDependencies": {
73
- "@types/node": "^22.0.0",
74
- "tsup": "^8.0.0",
75
- "typescript": "^5.7.0",
76
- "vitest": "^2.0.0"
77
- },
78
- "keywords": [
79
- "flight",
80
- "image",
81
- "optimization",
82
- "sharp",
83
- "webp",
84
- "avif",
85
- "responsive",
86
- "agnostic"
87
- ],
88
- "author": "Flight Contributors",
89
- "license": "MIT",
90
- "scripts": {
91
- "build": "tsup",
92
- "dev": "tsup --watch",
93
- "test": "vitest run",
94
- "test:watch": "vitest",
95
- "typecheck": "tsc --noEmit"
96
- }
1
+ {
2
+ "name": "@flightdev/image",
3
+ "version": "0.1.0",
4
+ "description": "Agnostic image optimization for Flight Framework. Choose your processor: Sharp, Squoosh, Cloudinary, or custom.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.js"
10
+ },
11
+ "./sharp": {
12
+ "types": "./dist/adapters/sharp.d.ts",
13
+ "import": "./dist/adapters/sharp.js"
14
+ },
15
+ "./squoosh": {
16
+ "types": "./dist/adapters/squoosh.d.ts",
17
+ "import": "./dist/adapters/squoosh.js"
18
+ },
19
+ "./cloudinary": {
20
+ "types": "./dist/adapters/cloudinary.d.ts",
21
+ "import": "./dist/adapters/cloudinary.js"
22
+ },
23
+ "./imgix": {
24
+ "types": "./dist/adapters/imgix.d.ts",
25
+ "import": "./dist/adapters/imgix.js"
26
+ },
27
+ "./react": {
28
+ "types": "./dist/components/react.d.ts",
29
+ "import": "./dist/components/react.js"
30
+ },
31
+ "./vue": {
32
+ "types": "./dist/components/vue.d.ts",
33
+ "import": "./dist/components/vue.js"
34
+ },
35
+ "./svelte": {
36
+ "types": "./dist/components/svelte.d.ts",
37
+ "import": "./dist/components/svelte.js"
38
+ },
39
+ "./solid": {
40
+ "types": "./dist/components/solid.d.ts",
41
+ "import": "./dist/components/solid.js"
42
+ }
43
+ },
44
+ "files": [
45
+ "dist"
46
+ ],
47
+ "scripts": {
48
+ "build": "tsup",
49
+ "dev": "tsup --watch",
50
+ "test": "vitest run",
51
+ "test:watch": "vitest",
52
+ "typecheck": "tsc --noEmit"
53
+ },
54
+ "dependencies": {},
55
+ "peerDependencies": {
56
+ "sharp": "\u003e=0.33.0",
57
+ "react": "\u003e=18.0.0",
58
+ "vue": "\u003e=3.0.0",
59
+ "svelte": "\u003e=4.0.0",
60
+ "solid-js": "\u003e=1.0.0"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "sharp": {
64
+ "optional": true
65
+ },
66
+ "react": {
67
+ "optional": true
68
+ },
69
+ "vue": {
70
+ "optional": true
71
+ },
72
+ "svelte": {
73
+ "optional": true
74
+ },
75
+ "solid-js": {
76
+ "optional": true
77
+ }
78
+ },
79
+ "devDependencies": {
80
+ "@types/node": "^22.0.0",
81
+ "tsup": "^8.0.0",
82
+ "typescript": "^5.7.0",
83
+ "vitest": "^2.0.0"
84
+ },
85
+ "keywords": [
86
+ "flight",
87
+ "image",
88
+ "optimization",
89
+ "sharp",
90
+ "webp",
91
+ "avif",
92
+ "responsive",
93
+ "agnostic"
94
+ ],
95
+ "author": "Flight Contributors",
96
+ "license": "MIT",
97
+ "homepage": "https://github.com/EliosLT/FlightDev",
98
+ "repository": {
99
+ "url": "https://github.com/EliosLT/FlightDev.git",
100
+ "directory": "packages/image",
101
+ "type": "git"
102
+ }
97
103
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024-2026 Flight Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.