-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract types and util into core package
- Loading branch information
1 parent
4f08490
commit 255b904
Showing
18 changed files
with
77 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
// export type * from './types.ts'; | ||
export type * from './types.ts'; | ||
export { findMatchingImage } from './match.ts'; |
2 changes: 1 addition & 1 deletion
2
...ember-responsive-image/src/utils/match.ts → packages/core/src/match.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
export type ImageType = 'png' | 'jpeg' | 'webp' | 'avif'; | ||
|
||
export interface LqipBase { | ||
type: string; | ||
} | ||
|
||
export interface LqipInline extends LqipBase { | ||
type: 'inline'; | ||
class: string; | ||
} | ||
|
||
export interface LqipColor extends LqipBase { | ||
type: 'color'; | ||
class: string; | ||
} | ||
|
||
export interface LqipBlurhash extends LqipBase { | ||
type: 'blurhash'; | ||
hash: string; | ||
width: number; | ||
height: number; | ||
} | ||
|
||
export interface ImageData { | ||
imageTypes: ImageType[]; | ||
availableWidths?: number[]; | ||
aspectRatio?: number; | ||
imageUrlFor(width: number, type?: ImageType): string; | ||
fingerprint?: string; | ||
lqip?: LqipInline | LqipColor | LqipBlurhash; | ||
} | ||
|
||
export interface ImageOutputResult { | ||
url: string; | ||
width: number; | ||
format: ImageType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
export { default as ResponsiveImage } from './components/responsive-image.ts'; | ||
export { default as ResponsiveImageService } from './services/responsive-image.ts'; | ||
export { default as resolve } from './helpers/responsive-image-resolve.ts'; | ||
export * from './types.ts'; | ||
export { findMatchingImage } from './utils/match.ts'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.