├── .github ├── FUNDING.yml └── dependabot.yml ├── .gitignore ├── .prettierrc.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bun.lockb ├── package-lock.json ├── package.json ├── src ├── angular │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ ├── index.js.map │ ├── index.ts │ ├── optimized-image.component.d.ts │ ├── optimized-image.component.d.ts.map │ ├── optimized-image.component.js │ ├── optimized-image.component.js.map │ └── optimized-image.component.ts ├── index.d.ts ├── index.d.ts.map ├── index.js ├── index.js.map ├── index.ts ├── optimizer.d.ts ├── optimizer.d.ts.map ├── optimizer.js ├── optimizer.js.map ├── optimizer.ts ├── react │ ├── OptimizedImage.d.ts │ ├── OptimizedImage.d.ts.map │ ├── OptimizedImage.js │ ├── OptimizedImage.js.map │ ├── OptimizedImage.tsx │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ ├── index.js.map │ └── index.ts ├── shims-vue.d.ts └── vue │ ├── OptimizedImage.vue │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ ├── index.js.map │ └── index.ts └── tsconfig.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [muhammad-fiaz] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "npm" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # IntelliJ project files 3 | .idea 4 | *.iml 5 | out 6 | gen 7 | # Logs 8 | logs 9 | *.log 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | lerna-debug.log* 14 | .pnpm-debug.log* 15 | 16 | # Diagnostic reports (https://nodejs.org/api/report.html) 17 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 18 | 19 | # Runtime data 20 | pids 21 | *.pid 22 | *.seed 23 | *.pid.lock 24 | 25 | # Directory for instrumented libs generated by jscoverage/JSCover 26 | lib-cov 27 | 28 | # Coverage directory used by tools like istanbul 29 | coverage 30 | *.lcov 31 | 32 | # nyc test coverage 33 | .nyc_output 34 | 35 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 36 | .grunt 37 | 38 | # Bower dependency directory (https://bower.io/) 39 | bower_components 40 | 41 | # node-waf configuration 42 | .lock-wscript 43 | 44 | # Compiled binary addons (https://nodejs.org/api/addons.html) 45 | build/Release 46 | 47 | # Dependency directories 48 | node_modules/ 49 | jspm_packages/ 50 | 51 | # Snowpack dependency directory (https://snowpack.dev/) 52 | web_modules/ 53 | 54 | # TypeScript cache 55 | *.tsbuildinfo 56 | 57 | # Optional npm cache directory 58 | .npm 59 | 60 | # Optional eslint cache 61 | .eslintcache 62 | 63 | # Optional stylelint cache 64 | .stylelintcache 65 | 66 | # Microbundle cache 67 | .rpt2_cache/ 68 | .rts2_cache_cjs/ 69 | .rts2_cache_es/ 70 | .rts2_cache_umd/ 71 | 72 | # Optional REPL history 73 | .node_repl_history 74 | 75 | # Output of 'npm pack' 76 | *.tgz 77 | 78 | # Yarn Integrity file 79 | .yarn-integrity 80 | 81 | # dotenv environment variable files 82 | .env 83 | .env.development.local 84 | .env.test.local 85 | .env.production.local 86 | .env.local 87 | 88 | # parcel-bundler cache (https://parceljs.org/) 89 | .cache 90 | .parcel-cache 91 | 92 | # Next.js build output 93 | .next 94 | out 95 | 96 | # Nuxt.js build / generate output 97 | .nuxt 98 | dist 99 | 100 | # Gatsby files 101 | .cache/ 102 | # Comment in the public line in if your project uses Gatsby and not Next.js 103 | # https://nextjs.org/blog/next-9-1#public-directory-support 104 | # public 105 | 106 | # vuepress build output 107 | .vuepress/dist 108 | 109 | # vuepress v2.x temp and cache directory 110 | .temp 111 | .cache 112 | 113 | # Docusaurus cache and generated files 114 | .docusaurus 115 | 116 | # Serverless directories 117 | .serverless/ 118 | 119 | # FuseBox cache 120 | .fusebox/ 121 | 122 | # DynamoDB Local files 123 | .dynamodb/ 124 | 125 | # TernJS port file 126 | .tern-port 127 | 128 | # Stores VSCode versions used for testing VSCode extensions 129 | .vscode-test 130 | 131 | # yarn v2 132 | .yarn/cache 133 | .yarn/unplugged 134 | .yarn/build-state.yml 135 | .yarn/install-state.gz 136 | .pnp.* 137 | 138 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/prettierrc", 3 | "semi": false, 4 | "tabWidth": 2, 5 | "singleQuote": true, 6 | "printWidth": 100, 7 | "trailingComma": "none" 8 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | . 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to `image-optimize-cli` 2 | 3 | Thank you for your interest in contributing to `image-optimize-cli`! We welcome contributions of all types, from bug fixes and features to documentation improvements. Please follow these guidelines to help us maintain a high-quality project. 4 | 5 | ## Getting Started 6 | 7 | 1. **Fork the Repository**: Click the "Fork" button at the top right of the repository page to create your own copy of the project. 8 | 9 | 2. **Clone Your Fork**: Clone your forked repository to your local machine using: 10 | ```sh 11 | git clone https://github.com/your-username/image-optimize-cli.git 12 | ``` 13 | 14 | 3. **Create a New Branch**: Create a new branch for your work. It's good practice to name your branch descriptively based on the changes you're making. 15 | ```sh 16 | git checkout -b my-feature-branch 17 | ``` 18 | 19 | 4. **Make Changes**: Implement your changes in the code. If you're adding a new feature or fixing a bug, make sure to write clear and concise commit messages. 20 | 21 | 5. **Run Tests**: Ensure that all tests pass before submitting your changes. If you’re adding new features, consider writing tests for them as well. 22 | ```sh 23 | npm test 24 | ``` 25 | 26 | 6. **Commit Your Changes**: Commit your changes with a descriptive message. 27 | ```sh 28 | git add . 29 | git commit -m "Describe your changes here" 30 | ``` 31 | 32 | 7. **Push Your Branch**: Push your changes to your forked repository. 33 | ```sh 34 | git push origin my-feature-branch 35 | ``` 36 | 37 | 8. **Open a Pull Request**: Go to the original repository and open a pull request from your forked repository and branch. Provide a clear description of your changes and why they are needed. 38 | 39 | ## Coding Guidelines 40 | 41 | - **Follow the Code Style**: Ensure your code adheres to the existing code style of the project. This includes formatting, naming conventions, and coding practices. 42 | 43 | - **Write Tests**: If you're adding new features or fixing bugs, include tests to cover your changes. Ensure that all existing tests pass. 44 | 45 | - **Documentation**: Update the documentation if your changes affect how the project is used or configured. This includes README, code comments, and inline documentation. 46 | 47 | ## Reporting Issues 48 | 49 | If you find a bug or have a feature request, please open an issue on the [issue tracker](https://github.com/muhammad-fiaz/image-optimize-cli/issues). Provide as much detail as possible, including steps to reproduce the issue, expected behavior, and actual behavior. 50 | 51 | ## Contact 52 | 53 | For any questions or additional help, feel free to reach out to the maintainers via the [issue tracker](https://github.com/muhammad-fiaz/image-optimize-cli/issues) or join [discord](https://discord.com/invite/pMw7nfBzXz) directly. 54 | 55 | --- 56 | 57 | Thank you for contributing to `image-optimize-cli`! 58 | 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Muhammad Fiaz 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # `image-optimize-cli` 4 | 5 | [![Contributors](https://img.shields.io/github/contributors/muhammad-fiaz/image-optimize-cli.svg)](https://github.com/muhammad-fiaz/image-optimize-cli/graphs/contributors) 6 | [![Last Commit](https://img.shields.io/github/last-commit/muhammad-fiaz/image-optimize-cli/main.svg)](https://github.com/muhammad-fiaz/image-optimize-cli/commits/main) 7 | [![npm version](https://badge.fury.io/js/image-optimize-cli.svg)](https://badge.fury.io/js/image-optimize-cli) 8 | [![GitHub issues](https://img.shields.io/github/issues/muhammad-fiaz/image-optimize-cli.svg)](https://github.com/muhammad-fiaz/image-optimize-cli/issues) 9 | [![GitHub pull requests](https://img.shields.io/github/issues-pr/muhammad-fiaz/image-optimize-cli)](https://github.com/muhammad-fiaz/image-optimize-cli/pulls) 10 | [![GitHub forks](https://img.shields.io/github/forks/muhammad-fiaz/image-optimize-cli.svg)](https://github.com/muhammad-fiaz/image-optimize-cli/network) 11 | [![GitHub stars](https://img.shields.io/github/stars/muhammad-fiaz/image-optimize-cli.svg)](https://github.com/muhammad-fiaz/image-optimize-cli/stargazers) 12 | [![GitHub followers](https://img.shields.io/github/followers/muhammad-fiaz?label=Follow)](https://github.com/muhammad-fiaz?tab=followers) 13 | [![Sponsor on GitHub](https://img.shields.io/badge/Sponsor%20on%20GitHub-Become%20a%20Sponsor-blue)](https://github.com/sponsors/muhammad-fiaz) 14 | 15 |
16 |

Join our Discord Community:

17 | 18 | [![Join Our Discord](https://img.shields.io/badge/Discord-Join_us!-blue?style=flat&logo=discord)](https://discord.com/invite/pMw7nfBzXz) 19 | 20 |
21 |
22 |
23 | `image-optimize-cli` is a library that dynamically optimizes images based on user internet speed and quality settings. It provides components for React, Vue, and Angular, and also supports plain JavaScript usage. 24 | 25 | ## Installation 26 | 27 | To install `image-optimize-cli`, run: 28 | 29 | ```bash 30 | npm install image-optimize-cli 31 | ``` 32 | 33 | ## Usage 34 | 35 | ### React 36 | 37 | To use `image-optimize-cli` with React, import the `OptimizeImage` component and use it in your components: 38 | 39 | ```jsx 40 | import React from 'react'; 41 | import { OptimizeImage } from 'image-optimize-cli/react'; 42 | 43 | function App() { 44 | return ( 45 |
46 | 47 |
48 | ); 49 | } 50 | ``` 51 | 52 | ### Vue 53 | 54 | To use `image-optimize-cli` with Vue, import the `OptimizeImage` component and use it in your components: 55 | 56 | ```vue 57 | 62 | 63 | 72 | ``` 73 | 74 | ### Angular 75 | 76 | To use `image-optimize-cli` with Angular, import the `OptimizeImage` component and use it in your components: 77 | 78 | ```typescript 79 | import { Component } from '@angular/core'; 80 | import { OptimizeImage } from 'image-optimize-cli/angular'; 81 | 82 | @Component({ 83 | selector: 'app-root', 84 | template: ` 85 |
86 | 87 |
88 | `, 89 | }) 90 | export class AppComponent {} 91 | ``` 92 | 93 | ### JavaScript 94 | 95 | To use `image-optimize-cli` with plain JavaScript, import the `OptimizeImage` class and use it in your scripts: 96 | 97 | ```javascript 98 | import { OptimizeImage } from 'image-optimize-cli'; 99 | 100 | const OptimizeImage = new OptimizeImage('image.jpg', 'Image'); 101 | document.body.appendChild(OptimizeImage); 102 | ``` 103 | 104 | 105 | 106 | 107 | ## Contributing 108 | 109 | We welcome contributions to the project! Please follow the guidelines in [CONTRIBUTING.md](CONTRIBUTING.md) for submitting issues and pull requests. 110 | 111 | ## License 112 | 113 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 114 | include. -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey531/image-optimize-cli/cd9ac5ce70e78e176cf8a1b591611f1cf52edbd6/bun.lockb -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "image-optimize-cli", 3 | "version": "0.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "image-optimize-cli", 9 | "version": "0.0.0", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "prettier": "^3.3.3", 13 | "typescript": "^5.5.4", 14 | "vue-tsc": "^2.0.28" 15 | }, 16 | "peerDependencies": { 17 | "@angular/core": "^18.1.1", 18 | "react": "^18.0.0", 19 | "vue": "^3.4.33" 20 | } 21 | }, 22 | "node_modules/@angular/core": { 23 | "version": "18.1.1", 24 | "license": "MIT", 25 | "peer": true, 26 | "dependencies": { 27 | "tslib": "^2.3.0" 28 | }, 29 | "engines": { 30 | "node": "^18.19.1 || ^20.11.1 || >=22.0.0" 31 | }, 32 | "peerDependencies": { 33 | "rxjs": "^6.5.3 || ^7.4.0", 34 | "zone.js": "~0.14.0" 35 | } 36 | }, 37 | "node_modules/@babel/helper-string-parser": { 38 | "version": "7.25.9", 39 | "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", 40 | "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", 41 | "engines": { 42 | "node": ">=6.9.0" 43 | } 44 | }, 45 | "node_modules/@babel/helper-validator-identifier": { 46 | "version": "7.25.9", 47 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", 48 | "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", 49 | "engines": { 50 | "node": ">=6.9.0" 51 | } 52 | }, 53 | "node_modules/@babel/parser": { 54 | "version": "7.26.2", 55 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", 56 | "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", 57 | "dependencies": { 58 | "@babel/types": "^7.26.0" 59 | }, 60 | "bin": { 61 | "parser": "bin/babel-parser.js" 62 | }, 63 | "engines": { 64 | "node": ">=6.0.0" 65 | } 66 | }, 67 | "node_modules/@babel/types": { 68 | "version": "7.26.0", 69 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", 70 | "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", 71 | "dependencies": { 72 | "@babel/helper-string-parser": "^7.25.9", 73 | "@babel/helper-validator-identifier": "^7.25.9" 74 | }, 75 | "engines": { 76 | "node": ">=6.9.0" 77 | } 78 | }, 79 | "node_modules/@jridgewell/sourcemap-codec": { 80 | "version": "1.5.0", 81 | "license": "MIT", 82 | "peer": true 83 | }, 84 | "node_modules/@volar/language-core": { 85 | "version": "2.4.8", 86 | "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.8.tgz", 87 | "integrity": "sha512-K/GxMOXGq997bO00cdFhTNuR85xPxj0BEEAy+BaqqayTmy9Tmhfgmq2wpJcVspRhcwfgPoE2/mEJa26emUhG/g==", 88 | "dev": true, 89 | "dependencies": { 90 | "@volar/source-map": "2.4.8" 91 | } 92 | }, 93 | "node_modules/@volar/source-map": { 94 | "version": "2.4.8", 95 | "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.8.tgz", 96 | "integrity": "sha512-jeWJBkC/WivdelMwxKkpFL811uH/jJ1kVxa+c7OvG48DXc3VrP7pplSWPP2W1dLMqBxD+awRlg55FQQfiup4cA==", 97 | "dev": true 98 | }, 99 | "node_modules/@volar/typescript": { 100 | "version": "2.4.8", 101 | "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.8.tgz", 102 | "integrity": "sha512-6xkIYJ5xxghVBhVywMoPMidDDAFT1OoQeXwa27HSgJ6AiIKRe61RXLoik+14Z7r0JvnblXVsjsRLmCr42SGzqg==", 103 | "dev": true, 104 | "dependencies": { 105 | "@volar/language-core": "2.4.8", 106 | "path-browserify": "^1.0.1", 107 | "vscode-uri": "^3.0.8" 108 | } 109 | }, 110 | "node_modules/@vue/compiler-core": { 111 | "version": "3.4.33", 112 | "license": "MIT", 113 | "peer": true, 114 | "dependencies": { 115 | "@babel/parser": "^7.24.7", 116 | "@vue/shared": "3.4.33", 117 | "entities": "^4.5.0", 118 | "estree-walker": "^2.0.2", 119 | "source-map-js": "^1.2.0" 120 | } 121 | }, 122 | "node_modules/@vue/compiler-dom": { 123 | "version": "3.4.33", 124 | "license": "MIT", 125 | "peer": true, 126 | "dependencies": { 127 | "@vue/compiler-core": "3.4.33", 128 | "@vue/shared": "3.4.33" 129 | } 130 | }, 131 | "node_modules/@vue/compiler-sfc": { 132 | "version": "3.4.33", 133 | "license": "MIT", 134 | "peer": true, 135 | "dependencies": { 136 | "@babel/parser": "^7.24.7", 137 | "@vue/compiler-core": "3.4.33", 138 | "@vue/compiler-dom": "3.4.33", 139 | "@vue/compiler-ssr": "3.4.33", 140 | "@vue/shared": "3.4.33", 141 | "estree-walker": "^2.0.2", 142 | "magic-string": "^0.30.10", 143 | "postcss": "^8.4.39", 144 | "source-map-js": "^1.2.0" 145 | } 146 | }, 147 | "node_modules/@vue/compiler-ssr": { 148 | "version": "3.4.33", 149 | "license": "MIT", 150 | "peer": true, 151 | "dependencies": { 152 | "@vue/compiler-dom": "3.4.33", 153 | "@vue/shared": "3.4.33" 154 | } 155 | }, 156 | "node_modules/@vue/compiler-vue2": { 157 | "version": "2.7.16", 158 | "resolved": "https://registry.npmjs.org/@vue/compiler-vue2/-/compiler-vue2-2.7.16.tgz", 159 | "integrity": "sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==", 160 | "dev": true, 161 | "dependencies": { 162 | "de-indent": "^1.0.2", 163 | "he": "^1.2.0" 164 | } 165 | }, 166 | "node_modules/@vue/language-core": { 167 | "version": "2.1.10", 168 | "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.1.10.tgz", 169 | "integrity": "sha512-DAI289d0K3AB5TUG3xDp9OuQ71CnrujQwJrQnfuZDwo6eGNf0UoRlPuaVNO+Zrn65PC3j0oB2i7mNmVPggeGeQ==", 170 | "dev": true, 171 | "dependencies": { 172 | "@volar/language-core": "~2.4.8", 173 | "@vue/compiler-dom": "^3.5.0", 174 | "@vue/compiler-vue2": "^2.7.16", 175 | "@vue/shared": "^3.5.0", 176 | "alien-signals": "^0.2.0", 177 | "minimatch": "^9.0.3", 178 | "muggle-string": "^0.4.1", 179 | "path-browserify": "^1.0.1" 180 | }, 181 | "peerDependencies": { 182 | "typescript": "*" 183 | }, 184 | "peerDependenciesMeta": { 185 | "typescript": { 186 | "optional": true 187 | } 188 | } 189 | }, 190 | "node_modules/@vue/language-core/node_modules/@vue/compiler-core": { 191 | "version": "3.5.12", 192 | "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.12.tgz", 193 | "integrity": "sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==", 194 | "dev": true, 195 | "dependencies": { 196 | "@babel/parser": "^7.25.3", 197 | "@vue/shared": "3.5.12", 198 | "entities": "^4.5.0", 199 | "estree-walker": "^2.0.2", 200 | "source-map-js": "^1.2.0" 201 | } 202 | }, 203 | "node_modules/@vue/language-core/node_modules/@vue/compiler-dom": { 204 | "version": "3.5.12", 205 | "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.12.tgz", 206 | "integrity": "sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==", 207 | "dev": true, 208 | "dependencies": { 209 | "@vue/compiler-core": "3.5.12", 210 | "@vue/shared": "3.5.12" 211 | } 212 | }, 213 | "node_modules/@vue/language-core/node_modules/@vue/shared": { 214 | "version": "3.5.12", 215 | "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.12.tgz", 216 | "integrity": "sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==", 217 | "dev": true 218 | }, 219 | "node_modules/@vue/reactivity": { 220 | "version": "3.4.33", 221 | "license": "MIT", 222 | "peer": true, 223 | "dependencies": { 224 | "@vue/shared": "3.4.33" 225 | } 226 | }, 227 | "node_modules/@vue/runtime-core": { 228 | "version": "3.4.33", 229 | "license": "MIT", 230 | "peer": true, 231 | "dependencies": { 232 | "@vue/reactivity": "3.4.33", 233 | "@vue/shared": "3.4.33" 234 | } 235 | }, 236 | "node_modules/@vue/runtime-dom": { 237 | "version": "3.4.33", 238 | "license": "MIT", 239 | "peer": true, 240 | "dependencies": { 241 | "@vue/reactivity": "3.4.33", 242 | "@vue/runtime-core": "3.4.33", 243 | "@vue/shared": "3.4.33", 244 | "csstype": "^3.1.3" 245 | } 246 | }, 247 | "node_modules/@vue/server-renderer": { 248 | "version": "3.4.33", 249 | "license": "MIT", 250 | "peer": true, 251 | "dependencies": { 252 | "@vue/compiler-ssr": "3.4.33", 253 | "@vue/shared": "3.4.33" 254 | }, 255 | "peerDependencies": { 256 | "vue": "3.4.33" 257 | } 258 | }, 259 | "node_modules/@vue/shared": { 260 | "version": "3.4.33", 261 | "license": "MIT", 262 | "peer": true 263 | }, 264 | "node_modules/alien-signals": { 265 | "version": "0.2.0", 266 | "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-0.2.0.tgz", 267 | "integrity": "sha512-StlonZhBBrsPPwrDjiPAiVTf/rolxffLxVPT60Qv/t88BZ81BvUVzHgGqEFvJ1ii8HXtm1+zU2Icr59tfWEcag==", 268 | "dev": true 269 | }, 270 | "node_modules/balanced-match": { 271 | "version": "1.0.2", 272 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 273 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 274 | "dev": true 275 | }, 276 | "node_modules/brace-expansion": { 277 | "version": "2.0.1", 278 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 279 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 280 | "dev": true, 281 | "dependencies": { 282 | "balanced-match": "^1.0.0" 283 | } 284 | }, 285 | "node_modules/csstype": { 286 | "version": "3.1.3", 287 | "license": "MIT", 288 | "peer": true 289 | }, 290 | "node_modules/de-indent": { 291 | "version": "1.0.2", 292 | "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", 293 | "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", 294 | "dev": true 295 | }, 296 | "node_modules/entities": { 297 | "version": "4.5.0", 298 | "license": "BSD-2-Clause", 299 | "engines": { 300 | "node": ">=0.12" 301 | }, 302 | "funding": { 303 | "url": "https://github.com/fb55/entities?sponsor=1" 304 | } 305 | }, 306 | "node_modules/estree-walker": { 307 | "version": "2.0.2", 308 | "license": "MIT" 309 | }, 310 | "node_modules/he": { 311 | "version": "1.2.0", 312 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 313 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 314 | "dev": true, 315 | "bin": { 316 | "he": "bin/he" 317 | } 318 | }, 319 | "node_modules/js-tokens": { 320 | "version": "4.0.0", 321 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 322 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 323 | "peer": true 324 | }, 325 | "node_modules/loose-envify": { 326 | "version": "1.4.0", 327 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", 328 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", 329 | "peer": true, 330 | "dependencies": { 331 | "js-tokens": "^3.0.0 || ^4.0.0" 332 | }, 333 | "bin": { 334 | "loose-envify": "cli.js" 335 | } 336 | }, 337 | "node_modules/magic-string": { 338 | "version": "0.30.10", 339 | "license": "MIT", 340 | "peer": true, 341 | "dependencies": { 342 | "@jridgewell/sourcemap-codec": "^1.4.15" 343 | } 344 | }, 345 | "node_modules/minimatch": { 346 | "version": "9.0.5", 347 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", 348 | "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", 349 | "dev": true, 350 | "dependencies": { 351 | "brace-expansion": "^2.0.1" 352 | }, 353 | "engines": { 354 | "node": ">=16 || 14 >=14.17" 355 | }, 356 | "funding": { 357 | "url": "https://github.com/sponsors/isaacs" 358 | } 359 | }, 360 | "node_modules/muggle-string": { 361 | "version": "0.4.1", 362 | "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", 363 | "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", 364 | "dev": true 365 | }, 366 | "node_modules/nanoid": { 367 | "version": "3.3.8", 368 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", 369 | "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", 370 | "funding": [ 371 | { 372 | "type": "github", 373 | "url": "https://github.com/sponsors/ai" 374 | } 375 | ], 376 | "peer": true, 377 | "bin": { 378 | "nanoid": "bin/nanoid.cjs" 379 | }, 380 | "engines": { 381 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 382 | } 383 | }, 384 | "node_modules/path-browserify": { 385 | "version": "1.0.1", 386 | "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", 387 | "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", 388 | "dev": true 389 | }, 390 | "node_modules/picocolors": { 391 | "version": "1.0.1", 392 | "license": "ISC", 393 | "peer": true 394 | }, 395 | "node_modules/postcss": { 396 | "version": "8.4.39", 397 | "funding": [ 398 | { 399 | "type": "opencollective", 400 | "url": "https://opencollective.com/postcss/" 401 | }, 402 | { 403 | "type": "tidelift", 404 | "url": "https://tidelift.com/funding/github/npm/postcss" 405 | }, 406 | { 407 | "type": "github", 408 | "url": "https://github.com/sponsors/ai" 409 | } 410 | ], 411 | "license": "MIT", 412 | "peer": true, 413 | "dependencies": { 414 | "nanoid": "^3.3.7", 415 | "picocolors": "^1.0.1", 416 | "source-map-js": "^1.2.0" 417 | }, 418 | "engines": { 419 | "node": "^10 || ^12 || >=14" 420 | } 421 | }, 422 | "node_modules/prettier": { 423 | "version": "3.4.2", 424 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", 425 | "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", 426 | "dev": true, 427 | "bin": { 428 | "prettier": "bin/prettier.cjs" 429 | }, 430 | "engines": { 431 | "node": ">=14" 432 | }, 433 | "funding": { 434 | "url": "https://github.com/prettier/prettier?sponsor=1" 435 | } 436 | }, 437 | "node_modules/react": { 438 | "version": "18.3.1", 439 | "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", 440 | "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", 441 | "peer": true, 442 | "dependencies": { 443 | "loose-envify": "^1.1.0" 444 | }, 445 | "engines": { 446 | "node": ">=0.10.0" 447 | } 448 | }, 449 | "node_modules/rxjs": { 450 | "version": "7.8.1", 451 | "license": "Apache-2.0", 452 | "peer": true, 453 | "dependencies": { 454 | "tslib": "^2.1.0" 455 | } 456 | }, 457 | "node_modules/semver": { 458 | "version": "7.6.3", 459 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", 460 | "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", 461 | "dev": true, 462 | "bin": { 463 | "semver": "bin/semver.js" 464 | }, 465 | "engines": { 466 | "node": ">=10" 467 | } 468 | }, 469 | "node_modules/source-map-js": { 470 | "version": "1.2.0", 471 | "license": "BSD-3-Clause", 472 | "engines": { 473 | "node": ">=0.10.0" 474 | } 475 | }, 476 | "node_modules/tslib": { 477 | "version": "2.6.3", 478 | "license": "0BSD", 479 | "peer": true 480 | }, 481 | "node_modules/typescript": { 482 | "version": "5.7.2", 483 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", 484 | "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", 485 | "devOptional": true, 486 | "bin": { 487 | "tsc": "bin/tsc", 488 | "tsserver": "bin/tsserver" 489 | }, 490 | "engines": { 491 | "node": ">=14.17" 492 | } 493 | }, 494 | "node_modules/vscode-uri": { 495 | "version": "3.0.8", 496 | "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", 497 | "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", 498 | "dev": true 499 | }, 500 | "node_modules/vue": { 501 | "version": "3.4.33", 502 | "license": "MIT", 503 | "peer": true, 504 | "dependencies": { 505 | "@vue/compiler-dom": "3.4.33", 506 | "@vue/compiler-sfc": "3.4.33", 507 | "@vue/runtime-dom": "3.4.33", 508 | "@vue/server-renderer": "3.4.33", 509 | "@vue/shared": "3.4.33" 510 | }, 511 | "peerDependencies": { 512 | "typescript": "*" 513 | }, 514 | "peerDependenciesMeta": { 515 | "typescript": { 516 | "optional": true 517 | } 518 | } 519 | }, 520 | "node_modules/vue-tsc": { 521 | "version": "2.1.10", 522 | "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.1.10.tgz", 523 | "integrity": "sha512-RBNSfaaRHcN5uqVqJSZh++Gy/YUzryuv9u1aFWhsammDJXNtUiJMNoJ747lZcQ68wUQFx6E73y4FY3D8E7FGMA==", 524 | "dev": true, 525 | "dependencies": { 526 | "@volar/typescript": "~2.4.8", 527 | "@vue/language-core": "2.1.10", 528 | "semver": "^7.5.4" 529 | }, 530 | "bin": { 531 | "vue-tsc": "bin/vue-tsc.js" 532 | }, 533 | "peerDependencies": { 534 | "typescript": ">=5.0.0" 535 | } 536 | }, 537 | "node_modules/zone.js": { 538 | "version": "0.14.8", 539 | "license": "MIT", 540 | "peer": true 541 | } 542 | } 543 | } 544 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "image-optimize-cli", 3 | "version": "0.0.0", 4 | "description": "A library for optimizing images dynamically based on user internet speed and quality settings.", 5 | "main": "src/index.js", 6 | "module": "src/index.js", 7 | "types": "src/index.d.ts", 8 | "scripts": { 9 | "build": "tsc", 10 | "prepublishOnly": "npm run build", 11 | "format": "prettier --write src/", 12 | "lint": "eslint 'src/**/*.{js,jsx,ts,tsx,vue}' --fix" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/muhammad-fiaz/image-optimize-cli.git" 17 | }, 18 | "keywords": [ 19 | "image-optimization", 20 | "dynamic-image", 21 | "image-processing" 22 | ], 23 | "author": "Muhammad Fiaz", 24 | "license": "MIT", 25 | "bugs": { 26 | "url": "https://github.com/muhammad-fiaz/image-optimize-cli/issues" 27 | }, 28 | "homepage": "https://github.com/muhammad-fiaz/image-optimize-cli#readme", 29 | "peerDependencies": { 30 | "react": "^18.0.0", 31 | "vue": "^3.4.33", 32 | "@angular/core": "^18.1.1" 33 | }, 34 | "devDependencies": { 35 | "typescript": "^5.5.4", 36 | "vue-tsc": "^2.0.28", 37 | "prettier": "^3.3.3" 38 | }, 39 | 40 | "exports": { 41 | ".": "./src/index.js", 42 | "./react": "./src/react/index.js", 43 | "./vue": "./src/vue/index.js", 44 | "./angular": "./src/angular/index.js" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/angular/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './optimized-image.component'; 2 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /src/angular/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"} -------------------------------------------------------------------------------- /src/angular/index.js: -------------------------------------------------------------------------------- 1 | export * from './optimized-image.component'; 2 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /src/angular/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"} -------------------------------------------------------------------------------- /src/angular/index.ts: -------------------------------------------------------------------------------- 1 | export * from './optimized-image.component' 2 | -------------------------------------------------------------------------------- /src/angular/optimized-image.component.d.ts: -------------------------------------------------------------------------------- 1 | export declare class OptimizedImageComponent { 2 | src: string; 3 | alt: string; 4 | quality: number; 5 | width: number; 6 | height: number; 7 | format: string; 8 | get optimizedSrc(): string; 9 | } 10 | //# sourceMappingURL=optimized-image.component.d.ts.map -------------------------------------------------------------------------------- /src/angular/optimized-image.component.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"optimized-image.component.d.ts","sourceRoot":"","sources":["optimized-image.component.ts"],"names":[],"mappings":"AAGA,qBAIa,uBAAuB;IACzB,GAAG,EAAG,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAK;IAChB,OAAO,EAAE,MAAM,CAAK;IACpB,KAAK,EAAE,MAAM,CAAM;IACnB,MAAM,EAAE,MAAM,CAAM;IACpB,MAAM,EAAE,MAAM,CAAK;IAE5B,IAAI,YAAY,WAOf;CACF"} -------------------------------------------------------------------------------- /src/angular/optimized-image.component.js: -------------------------------------------------------------------------------- 1 | var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { 2 | function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } 3 | var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; 4 | var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; 5 | var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); 6 | var _, done = false; 7 | for (var i = decorators.length - 1; i >= 0; i--) { 8 | var context = {}; 9 | for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; 10 | for (var p in contextIn.access) context.access[p] = contextIn.access[p]; 11 | context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; 12 | var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); 13 | if (kind === "accessor") { 14 | if (result === void 0) continue; 15 | if (result === null || typeof result !== "object") throw new TypeError("Object expected"); 16 | if (_ = accept(result.get)) descriptor.get = _; 17 | if (_ = accept(result.set)) descriptor.set = _; 18 | if (_ = accept(result.init)) initializers.unshift(_); 19 | } 20 | else if (_ = accept(result)) { 21 | if (kind === "field") initializers.unshift(_); 22 | else descriptor[key] = _; 23 | } 24 | } 25 | if (target) Object.defineProperty(target, contextIn.name, descriptor); 26 | done = true; 27 | }; 28 | var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { 29 | var useValue = arguments.length > 2; 30 | for (var i = 0; i < initializers.length; i++) { 31 | value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); 32 | } 33 | return useValue ? value : void 0; 34 | }; 35 | var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { 36 | if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; 37 | return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); 38 | }; 39 | import { Component, Input } from '@angular/core'; 40 | import { optimizeImage } from '@/optimizer'; 41 | let OptimizedImageComponent = (() => { 42 | let _classDecorators = [Component({ 43 | selector: 'app-optimized-image', 44 | template: `` 45 | })]; 46 | let _classDescriptor; 47 | let _classExtraInitializers = []; 48 | let _classThis; 49 | let _src_decorators; 50 | let _src_initializers = []; 51 | let _src_extraInitializers = []; 52 | let _alt_decorators; 53 | let _alt_initializers = []; 54 | let _alt_extraInitializers = []; 55 | let _quality_decorators; 56 | let _quality_initializers = []; 57 | let _quality_extraInitializers = []; 58 | let _width_decorators; 59 | let _width_initializers = []; 60 | let _width_extraInitializers = []; 61 | let _height_decorators; 62 | let _height_initializers = []; 63 | let _height_extraInitializers = []; 64 | let _format_decorators; 65 | let _format_initializers = []; 66 | let _format_extraInitializers = []; 67 | var OptimizedImageComponent = _classThis = class { 68 | get optimizedSrc() { 69 | return optimizeImage(this.src, { 70 | quality: this.quality, 71 | width: this.width, 72 | height: this.height, 73 | format: this.format 74 | }); 75 | } 76 | constructor() { 77 | this.src = __runInitializers(this, _src_initializers, void 0); 78 | this.alt = (__runInitializers(this, _src_extraInitializers), __runInitializers(this, _alt_initializers, '')); 79 | this.quality = (__runInitializers(this, _alt_extraInitializers), __runInitializers(this, _quality_initializers, 80)); 80 | this.width = (__runInitializers(this, _quality_extraInitializers), __runInitializers(this, _width_initializers, 800)); 81 | this.height = (__runInitializers(this, _width_extraInitializers), __runInitializers(this, _height_initializers, 600)); 82 | this.format = (__runInitializers(this, _height_extraInitializers), __runInitializers(this, _format_initializers, '')); 83 | __runInitializers(this, _format_extraInitializers); 84 | } 85 | }; 86 | __setFunctionName(_classThis, "OptimizedImageComponent"); 87 | (() => { 88 | const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; 89 | _src_decorators = [Input()]; 90 | _alt_decorators = [Input()]; 91 | _quality_decorators = [Input()]; 92 | _width_decorators = [Input()]; 93 | _height_decorators = [Input()]; 94 | _format_decorators = [Input()]; 95 | __esDecorate(null, null, _src_decorators, { kind: "field", name: "src", static: false, private: false, access: { has: obj => "src" in obj, get: obj => obj.src, set: (obj, value) => { obj.src = value; } }, metadata: _metadata }, _src_initializers, _src_extraInitializers); 96 | __esDecorate(null, null, _alt_decorators, { kind: "field", name: "alt", static: false, private: false, access: { has: obj => "alt" in obj, get: obj => obj.alt, set: (obj, value) => { obj.alt = value; } }, metadata: _metadata }, _alt_initializers, _alt_extraInitializers); 97 | __esDecorate(null, null, _quality_decorators, { kind: "field", name: "quality", static: false, private: false, access: { has: obj => "quality" in obj, get: obj => obj.quality, set: (obj, value) => { obj.quality = value; } }, metadata: _metadata }, _quality_initializers, _quality_extraInitializers); 98 | __esDecorate(null, null, _width_decorators, { kind: "field", name: "width", static: false, private: false, access: { has: obj => "width" in obj, get: obj => obj.width, set: (obj, value) => { obj.width = value; } }, metadata: _metadata }, _width_initializers, _width_extraInitializers); 99 | __esDecorate(null, null, _height_decorators, { kind: "field", name: "height", static: false, private: false, access: { has: obj => "height" in obj, get: obj => obj.height, set: (obj, value) => { obj.height = value; } }, metadata: _metadata }, _height_initializers, _height_extraInitializers); 100 | __esDecorate(null, null, _format_decorators, { kind: "field", name: "format", static: false, private: false, access: { has: obj => "format" in obj, get: obj => obj.format, set: (obj, value) => { obj.format = value; } }, metadata: _metadata }, _format_initializers, _format_extraInitializers); 101 | __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); 102 | OptimizedImageComponent = _classThis = _classDescriptor.value; 103 | if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); 104 | __runInitializers(_classThis, _classExtraInitializers); 105 | })(); 106 | return OptimizedImageComponent = _classThis; 107 | })(); 108 | export { OptimizedImageComponent }; 109 | //# sourceMappingURL=optimized-image.component.js.map -------------------------------------------------------------------------------- /src/angular/optimized-image.component.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"optimized-image.component.js","sourceRoot":"","sources":["optimized-image.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;IAM9B,uBAAuB;4BAJnC,SAAS,CAAC;YACT,QAAQ,EAAE,qBAAqB;YAC/B,QAAQ,EAAE,4EAA4E;SACvF,CAAC;;;;;;;;;;;;;;;;;;;;;;;QASA,IAAI,YAAY;YACd,OAAO,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAA;QACJ,CAAC;;YAdQ,QAAG,sDAAS;YACZ,QAAG,gGAAW,EAAE,GAAA;YAChB,YAAO,oGAAW,EAAE,GAAA;YACpB,UAAK,sGAAW,GAAG,GAAA;YACnB,WAAM,qGAAW,GAAG,GAAA;YACpB,WAAM,sGAAW,EAAE,GAAA;;;;;;;2BAL3B,KAAK,EAAE;2BACP,KAAK,EAAE;+BACP,KAAK,EAAE;6BACP,KAAK,EAAE;8BACP,KAAK,EAAE;8BACP,KAAK,EAAE;QALC,2JAAA,GAAG,6BAAH,GAAG,iFAAS;QACZ,2JAAA,GAAG,6BAAH,GAAG,iFAAa;QAChB,uKAAA,OAAO,6BAAP,OAAO,yFAAa;QACpB,iKAAA,KAAK,6BAAL,KAAK,qFAAc;QACnB,oKAAA,MAAM,6BAAN,MAAM,uFAAc;QACpB,oKAAA,MAAM,6BAAN,MAAM,uFAAa;QAN9B,6KAgBC;;;QAhBY,uDAAuB;;;;SAAvB,uBAAuB"} -------------------------------------------------------------------------------- /src/angular/optimized-image.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core' 2 | import { optimizeImage } from '@/optimizer' 3 | 4 | @Component({ 5 | selector: 'app-optimized-image', 6 | template: `` 7 | }) 8 | export class OptimizedImageComponent { 9 | @Input() src!: string 10 | @Input() alt: string = '' 11 | @Input() quality: number = 80 12 | @Input() width: number = 800 13 | @Input() height: number = 600 14 | @Input() format: string = '' 15 | 16 | get optimizedSrc() { 17 | return optimizeImage(this.src, { 18 | quality: this.quality, 19 | width: this.width, 20 | height: this.height, 21 | format: this.format 22 | }) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/index.d.ts: -------------------------------------------------------------------------------- 1 | export { optimizeImage } from './optimizer'; 2 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /src/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"} -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // src/index.ts 2 | export { optimizeImage } from './optimizer'; 3 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /src/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAe;AAEf,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"} -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | // src/index.ts 2 | 3 | export { optimizeImage } from './optimizer' 4 | -------------------------------------------------------------------------------- /src/optimizer.d.ts: -------------------------------------------------------------------------------- 1 | interface OptimizeOptions { 2 | quality?: number; 3 | width?: number; 4 | height?: number; 5 | format?: string; 6 | } 7 | export declare function optimizeImage(url: string, options?: OptimizeOptions): string; 8 | export {}; 9 | //# sourceMappingURL=optimizer.d.ts.map -------------------------------------------------------------------------------- /src/optimizer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"optimizer.d.ts","sourceRoot":"","sources":["optimizer.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,MAAM,CAuBhF"} -------------------------------------------------------------------------------- /src/optimizer.js: -------------------------------------------------------------------------------- 1 | export function optimizeImage(url, options = {}) { 2 | const { quality, width, height, format } = options; 3 | // Handle dynamic optimization 4 | const connection = navigator.connection || 5 | navigator.mozConnection || 6 | navigator.webkitConnection; 7 | const downloadSpeed = connection ? connection.downlink : 1; // in Mbps 8 | let adjustedQuality = quality !== null && quality !== void 0 ? quality : 80; // Default quality if not specified 9 | let adjustedWidth = width !== null && width !== void 0 ? width : 800; // Default width if not specified 10 | let adjustedHeight = height !== null && height !== void 0 ? height : 600; // Default height if not specified 11 | if (downloadSpeed < 1) { 12 | adjustedQuality = Math.max(adjustedQuality - 20, 30); // lower quality 13 | adjustedWidth = Math.floor(adjustedWidth * 0.8); // reduce width 14 | adjustedHeight = Math.floor(adjustedHeight * 0.8); // reduce height 15 | } 16 | else if (downloadSpeed < 3) { 17 | adjustedQuality = Math.max(adjustedQuality - 10, 50); // moderate quality reduction 18 | } 19 | return `${url}?quality=${adjustedQuality}&width=${adjustedWidth}&height=${adjustedHeight}${format ? `&format=${format}` : ''}`; 20 | } 21 | //# sourceMappingURL=optimizer.js.map -------------------------------------------------------------------------------- /src/optimizer.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"optimizer.js","sourceRoot":"","sources":["optimizer.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,UAA2B,EAAE;IACtE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAElD,8BAA8B;IAC9B,MAAM,UAAU,GACb,SAAiB,CAAC,UAAU;QAC5B,SAAiB,CAAC,aAAa;QAC/B,SAAiB,CAAC,gBAAgB,CAAA;IACrC,MAAM,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,UAAU;IAErE,IAAI,eAAe,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAA,CAAC,mCAAmC;IACvE,IAAI,aAAa,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,GAAG,CAAA,CAAC,iCAAiC;IAClE,IAAI,cAAc,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,GAAG,CAAA,CAAC,kCAAkC;IAErE,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;QACtB,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,GAAG,EAAE,EAAE,EAAE,CAAC,CAAA,CAAC,gBAAgB;QACrE,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC,CAAA,CAAC,eAAe;QAC/D,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,GAAG,CAAC,CAAA,CAAC,gBAAgB;IACpE,CAAC;SAAM,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;QAC7B,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,GAAG,EAAE,EAAE,EAAE,CAAC,CAAA,CAAC,6BAA6B;IACpF,CAAC;IAED,OAAO,GAAG,GAAG,YAAY,eAAe,UAAU,aAAa,WAAW,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,WAAW,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;AAChI,CAAC"} -------------------------------------------------------------------------------- /src/optimizer.ts: -------------------------------------------------------------------------------- 1 | interface OptimizeOptions { 2 | quality?: number 3 | width?: number 4 | height?: number 5 | format?: string 6 | } 7 | 8 | export function optimizeImage(url: string, options: OptimizeOptions = {}): string { 9 | const { quality, width, height, format } = options 10 | 11 | // Handle dynamic optimization 12 | const connection = 13 | (navigator as any).connection || 14 | (navigator as any).mozConnection || 15 | (navigator as any).webkitConnection 16 | const downloadSpeed = connection ? connection.downlink : 1 // in Mbps 17 | 18 | let adjustedQuality = quality ?? 80 // Default quality if not specified 19 | let adjustedWidth = width ?? 800 // Default width if not specified 20 | let adjustedHeight = height ?? 600 // Default height if not specified 21 | 22 | if (downloadSpeed < 1) { 23 | adjustedQuality = Math.max(adjustedQuality - 20, 30) // lower quality 24 | adjustedWidth = Math.floor(adjustedWidth * 0.8) // reduce width 25 | adjustedHeight = Math.floor(adjustedHeight * 0.8) // reduce height 26 | } else if (downloadSpeed < 3) { 27 | adjustedQuality = Math.max(adjustedQuality - 10, 50) // moderate quality reduction 28 | } 29 | 30 | return `${url}?quality=${adjustedQuality}&width=${adjustedWidth}&height=${adjustedHeight}${format ? `&format=${format}` : ''}` 31 | } 32 | -------------------------------------------------------------------------------- /src/react/OptimizedImage.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | interface OptimizedImageProps { 3 | src: string; 4 | alt?: string; 5 | quality?: number; 6 | width?: number; 7 | height?: number; 8 | format?: string; 9 | } 10 | declare const OptimizedImage: React.FC; 11 | export default OptimizedImage; 12 | //# sourceMappingURL=OptimizedImage.d.ts.map -------------------------------------------------------------------------------- /src/react/OptimizedImage.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"OptimizedImage.d.ts","sourceRoot":"","sources":["OptimizedImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAWjD,CAAA;AAED,eAAe,cAAc,CAAA"} -------------------------------------------------------------------------------- /src/react/OptimizedImage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { optimizeImage } from '@/optimizer'; 3 | const OptimizedImage = ({ src, alt = '', quality, width, height, format }) => { 4 | const optimizedSrc = optimizeImage(src, { quality, width, height, format }); 5 | return React.createElement("img", { src: optimizedSrc, alt: alt, width: width, height: height }); 6 | }; 7 | export default OptimizedImage; 8 | //# sourceMappingURL=OptimizedImage.js.map -------------------------------------------------------------------------------- /src/react/OptimizedImage.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"OptimizedImage.js","sourceRoot":"","sources":["OptimizedImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAW3C,MAAM,cAAc,GAAkC,CAAC,EACrD,GAAG,EACH,GAAG,GAAG,EAAE,EACR,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACP,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,aAAa,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAE3E,OAAO,6BAAK,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI,CAAA;AAC3E,CAAC,CAAA;AAED,eAAe,cAAc,CAAA"} -------------------------------------------------------------------------------- /src/react/OptimizedImage.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { optimizeImage } from '@/optimizer' 3 | 4 | interface OptimizedImageProps { 5 | src: string 6 | alt?: string 7 | quality?: number 8 | width?: number 9 | height?: number 10 | format?: string 11 | } 12 | 13 | const OptimizedImage: React.FC = ({ 14 | src, 15 | alt = '', 16 | quality, 17 | width, 18 | height, 19 | format 20 | }) => { 21 | const optimizedSrc = optimizeImage(src, { quality, width, height, format }) 22 | 23 | return {alt} 24 | } 25 | 26 | export default OptimizedImage 27 | -------------------------------------------------------------------------------- /src/react/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as OptimizedImage } from './OptimizedImage'; 2 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /src/react/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA"} -------------------------------------------------------------------------------- /src/react/index.js: -------------------------------------------------------------------------------- 1 | export { default as OptimizedImage } from './OptimizedImage'; 2 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /src/react/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA"} -------------------------------------------------------------------------------- /src/react/index.ts: -------------------------------------------------------------------------------- 1 | export { default as OptimizedImage } from './OptimizedImage' 2 | -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { DefineComponent } from 'vue' 3 | const component: DefineComponent<{}, {}, any> 4 | export default component 5 | } 6 | -------------------------------------------------------------------------------- /src/vue/OptimizedImage.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 34 | -------------------------------------------------------------------------------- /src/vue/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './OptimizedImage.vue'; 2 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /src/vue/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"} -------------------------------------------------------------------------------- /src/vue/index.js: -------------------------------------------------------------------------------- 1 | export * from './OptimizedImage.vue'; 2 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /src/vue/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"} -------------------------------------------------------------------------------- /src/vue/index.ts: -------------------------------------------------------------------------------- 1 | export * from './OptimizedImage.vue' 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "jsx": "react", 7 | "esModuleInterop": true, 8 | "skipLibCheck": true, 9 | "allowJs": true, 10 | "types": ["vue"], 11 | "strict": true, 12 | "baseUrl": "./", 13 | "paths": { 14 | "@/*": ["src/*"] 15 | }, 16 | "declaration": true, // Generate .d.ts files for TypeScript declarations 17 | "declarationMap": true, // Generate sourcemaps for .d.ts files 18 | "sourceMap": true // Generate sourcemaps for .js files 19 | }, 20 | "include": [ 21 | "src/**/*.ts", 22 | "src/**/*.d.ts", 23 | "src/**/*.tsx", 24 | "src/**/*.vue" 25 | ], 26 | "exclude": [ 27 | "node_modules", 28 | "dist" 29 | ] 30 | } 31 | --------------------------------------------------------------------------------