{"_id":"@codewithahsan/ng-gc","_rev":"6-acf6b91de1dd16ab83f78459ea42fce1","name":"@codewithahsan/ng-gc","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.1":{"name":"@codewithahsan/ng-gc","version":"0.0.1","_id":"@codewithahsan/ng-gc@0.0.1","maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"dist":{"shasum":"788e3a2b0da1d8a0162af69f2cf03b62e4768906","tarball":"https://registry.npmjs.org/@codewithahsan/ng-gc/-/ng-gc-0.0.1.tgz","fileCount":22,"integrity":"sha512-bOhDWbvhsj0jBF+kLsinUVRDyggNOqjvwmcUVLM2tG4ykhyBoGFhmQA5j4hO5qd1HDxr1DwtefQl/NXZlvZNuA==","signatures":[{"sig":"MEUCIAjn/zT7RUdAfm12AXQ/xgIqg1l6yUNAKPRwFDMb3Q0eAiEAuifoXqSVTjMzbO9YmZwBwJpbRGWa2yqLbsXbkZlZ5Jk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12406},"gitHead":"b97b3d36be58e9454df93b2f2c4d556478861fd2","_npmUser":{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"},"_npmVersion":"10.8.3","description":"Angular Components for Gemini","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^18.2.0","@angular/common":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-gc_0.0.1_1727328964702_0.7151920079019511","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@codewithahsan/ng-gc","version":"0.0.2","_id":"@codewithahsan/ng-gc@0.0.2","maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"dist":{"shasum":"b9e9021b24b7154a14f41d04726540e58971463d","tarball":"https://registry.npmjs.org/@codewithahsan/ng-gc/-/ng-gc-0.0.2.tgz","fileCount":17,"integrity":"sha512-hZzgTBC/xUIk9dnp1bt5TidcE7VLNVBT4GgvuLeVaFSWHwWGoxJwKw/WNjoa2MlduVROXX5vKIzL8wLXwt3H7A==","signatures":[{"sig":"MEQCIDKSUiW+G2QoArpl9+3JMAhp3AJllJQs1NmV64dhzd7HAiAKCdsAndAkFP9JSZYzbY5GSEhucGK5O4iEjWVtoQxfIQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35736},"module":"fesm2022/codewithahsan-ng-gc.mjs","exports":{".":{"esm":"./esm2022/codewithahsan-ng-gc.mjs","types":"./index.d.ts","default":"./fesm2022/codewithahsan-ng-gc.mjs","esm2022":"./esm2022/codewithahsan-ng-gc.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"b97b3d36be58e9454df93b2f2c4d556478861fd2","typings":"index.d.ts","_npmUser":{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"},"_npmVersion":"10.8.3","description":"Angular Components for Gemini","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^18.2.0","@angular/common":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-gc_0.0.2_1727330291313_0.030096093873499097","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@codewithahsan/ng-gc","version":"0.0.3","_id":"@codewithahsan/ng-gc@0.0.3","maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"dist":{"shasum":"5ea3ca4157bcbad1311d69caa2c49776f92700e8","tarball":"https://registry.npmjs.org/@codewithahsan/ng-gc/-/ng-gc-0.0.3.tgz","fileCount":17,"integrity":"sha512-wefUtil2V5dU1dtXA4LGDi/ewVH2WwjvB24GPhZhHfcGjKphH7XpiHBLbnBnALvtb4uoFF6sEnZl8ZWriH3O3w==","signatures":[{"sig":"MEUCIQCZts4huhSNMsv+P9bAe9/LP148GghKtwSQQ782UJSqOQIgHF1EJrtPquWCF27xryjG44l5f2jif4MTMC3Ai81sHSY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35776},"module":"fesm2022/codewithahsan-ng-gc.mjs","exports":{".":{"esm":"./esm2022/codewithahsan-ng-gc.mjs","types":"./index.d.ts","default":"./fesm2022/codewithahsan-ng-gc.mjs","esm2022":"./esm2022/codewithahsan-ng-gc.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"b97b3d36be58e9454df93b2f2c4d556478861fd2","typings":"index.d.ts","_npmUser":{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"},"_npmVersion":"10.8.3","description":"Angular Components for Gemini","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^18.2.0","@angular/common":"^18.2.0","@google/generative-ai":"^0.19.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-gc_0.0.3_1727330918238_0.6124950696573865","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@codewithahsan/ng-gc","version":"0.0.4","_id":"@codewithahsan/ng-gc@0.0.4","maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"dist":{"shasum":"dbd4d03e71753c8662ef0afe6f7a72ddcef91aca","tarball":"https://registry.npmjs.org/@codewithahsan/ng-gc/-/ng-gc-0.0.4.tgz","fileCount":17,"integrity":"sha512-bzqRIC5MRqPufcCPY6FUYnzjfWVmvLzfWgy8Tylh/xIyPnASBby523RdPojhMpz2mArQJzy6/HGcJ/NpThoRAw==","signatures":[{"sig":"MEQCIAnRADOzFHh3Mqm5CHSgowSgqr/vwxo7AuYIHGLOPkIqAiAQ+Agv1RGo95HAKUKpjP5SbluwL6HZXSrtGWw4KF3OZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37068},"module":"fesm2022/codewithahsan-ng-gc.mjs","exports":{".":{"esm":"./esm2022/codewithahsan-ng-gc.mjs","types":"./index.d.ts","default":"./fesm2022/codewithahsan-ng-gc.mjs","esm2022":"./esm2022/codewithahsan-ng-gc.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"b97b3d36be58e9454df93b2f2c4d556478861fd2","typings":"index.d.ts","_npmUser":{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"},"_npmVersion":"10.8.3","description":"Angular Components for Gemini","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^18.2.0","@angular/common":"^18.2.0","@google/generative-ai":"^0.19.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-gc_0.0.4_1727331540080_0.3124261639450794","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@codewithahsan/ng-gc","version":"0.0.5","_id":"@codewithahsan/ng-gc@0.0.5","maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"dist":{"shasum":"42bb092b443b31565c2027fe6cc2c10775016335","tarball":"https://registry.npmjs.org/@codewithahsan/ng-gc/-/ng-gc-0.0.5.tgz","fileCount":17,"integrity":"sha512-5nUZj+MQWOHB/WLcbKan23y2tiwZiQpjLjgWtiv5HS130zeYD6U0BMDbqLkOlIktFvxCMh1j6ysQbWWhxKsvjw==","signatures":[{"sig":"MEUCIQC/01rGIwFYmYRc3Bki5FwIvlleZMf9MGWJqQnUQ2IUsgIgaaw7n4ug4lXOqr/gTVI4eE/SYtyLnGao2S7YtXRer20=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38438},"module":"fesm2022/codewithahsan-ng-gc.mjs","exports":{".":{"esm":"./esm2022/codewithahsan-ng-gc.mjs","types":"./index.d.ts","default":"./fesm2022/codewithahsan-ng-gc.mjs","esm2022":"./esm2022/codewithahsan-ng-gc.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"b97b3d36be58e9454df93b2f2c4d556478861fd2","typings":"index.d.ts","_npmUser":{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"},"_npmVersion":"10.8.3","description":"Angular Components for Gemini","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","dependencies":{"tslib":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^18.2.0","@angular/common":"^18.2.0","@google/generative-ai":"^0.19.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-gc_0.0.5_1727344596608_0.3158328800460912","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@codewithahsan/ng-gc","version":"0.0.6","_id":"@codewithahsan/ng-gc@0.0.6","maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"dist":{"shasum":"b9c01602062579d0f0cabb5a27c9e840040bbb0e","tarball":"https://registry.npmjs.org/@codewithahsan/ng-gc/-/ng-gc-0.0.6.tgz","fileCount":22,"integrity":"sha512-dBesCdidV2l9bYxut+VzKakLOt8AXPi2Pydal5WT2EVxlOD7zB5JlXwcjXvEcds/z1h1JoNf5qfRk9VgWwAgvA==","signatures":[{"sig":"MEQCIC7HYTMoQYWQDZDRzrhe45DPSCC7A8jVO1KlbLVYBUMRAiB9R3AushsJaaK9A6Xb5YIj+b1NhPz+gvN4zRG+8fC70w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15141},"gitHead":"bd9bf3aae7a1a2651afea262e66d1b944ee2b3f1","_npmUser":{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"},"_npmVersion":"10.8.3","description":"Angular Components for Gemini","directories":{},"sideEffects":false,"_nodeVersion":"22.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^18.2.0","@angular/common":"^18.2.0","@google/generative-ai":"^0.19.0"},"_npmOperationalInternal":{"tmp":"tmp/ng-gc_0.0.6_1728559704190_0.6124212378846712","host":"s3://npm-registry-packages"}},"0.0.7":{"name":"@codewithahsan/ng-gc","version":"0.0.7","peerDependencies":{"@angular/common":"^18.2.0","@angular/core":"^18.2.0","@google/generative-ai":"^0.19.0"},"sideEffects":false,"publishConfig":{"access":"public"},"_id":"@codewithahsan/ng-gc@0.0.7","gitHead":"4ce2f210c5686414e94334a9723b0690a9f514d5","description":"Angular Components for Gemini","_nodeVersion":"22.0.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-gf3y9HJLslmJpkXcj6C+TI1aExfIjZoj1R+v0Kk+oa0Ftnb0GKM0QTpmJmZYIzOABglWYzAk4C/iWdJN1UJgOQ==","shasum":"9abd62ff839e7fa7e761381716507836a881aa0d","tarball":"https://registry.npmjs.org/@codewithahsan/ng-gc/-/ng-gc-0.0.7.tgz","fileCount":22,"unpackedSize":15143,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEc9CUof8fFAV9AtepqugBBezBU0QtUppe131RaajsfXAiBzXXKWQkW7wVmO+BeB5tC5im84MvuarN/D67T2BFlwDA=="}]},"_npmUser":{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"},"directories":{},"maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-gc_0.0.7_1728566584361_0.565769874412688"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-26T05:36:04.576Z","modified":"2024-10-10T13:23:04.739Z","0.0.1":"2024-09-26T05:36:04.885Z","0.0.2":"2024-09-26T05:58:11.503Z","0.0.3":"2024-09-26T06:08:38.461Z","0.0.4":"2024-09-26T06:19:00.265Z","0.0.5":"2024-09-26T09:56:36.775Z","0.0.6":"2024-10-10T11:28:24.349Z","0.0.7":"2024-10-10T13:23:04.542Z"},"description":"Angular Components for Gemini","maintainers":[{"name":"ahsanayaz","email":"ahsan.ubitian@gmail.com"}],"readme":"# ng-gc\n\nAngular Components for Gemini\n\n## Installation\n\n```shell\nnpm install @codewithahsan/ng-gc @google/generative-ai\n```\n\n## How to use\n\n### Sentiment Analysis Component\n```ts\n// app.config.ts\nimport { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { appRoutes } from './app.routes';\nimport { NGGC_API_CONFIG, NgGCConfig, NgGCSupportedModels } from '@codewithahsan/ng-gc';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideZoneChangeDetection({ eventCoalescing: true }),\n    provideRouter(appRoutes),\n    {\n      provide: NGGC_API_CONFIG,\n      useValue: {\n        model: 'gemini-1.5-flash',\n        apiKey: 'YOUR_GEMINI_API_KEY',\n        debug: true // (optional): enables console log of gemini response\n      } as NgGCConfig,\n    },\n  ],\n};\n\n```\n\n```ts\n// app.component.ts\nimport {\n  GeminiService,\n  NgGCSupportedModels,\n  SentimentAnalyzerComponent,\n} from '@codewithahsan/ng-gc';\n\n@Component({\n  standalone: true,\n  imports: [RouterModule, SentimentAnalyzerComponent, ReactiveFormsModule],\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrl: './app.component.scss',\n}) \nexport class AppComponent {\n  service = inject(GeminiService); // you can use the service directly\n}\n```\n\n```html\n<!-- app.component.html -->\n<!-- Or you can use the sentiment analyzer component -->\n<ng-gc-sentiment-analyzer\n  model=\"'gemini-1.5-pro'\"\n  [additionalContext]=\"context\"\n  [text]=\"inputTextValDebounced()\"\n  (sentimentUpdated)=\"doSomethingWithReceivedSentiment($event)\"/>\n```\n\n## Running unit tests\n\nRun `nx test ng-gc` to execute the unit tests.\n","readmeFilename":"README.md"}