text
stringlengths
55
456k
metadata
dict
# Development and contributing The code is at https://github.com/neondatabase/serverless. Most of the interesting stuff is in `shims/net/index.ts` and the `export/` folder. - To update the npm & jsr package: ```bash npm run export cd dist/npm npm version patch # or minor or major npm publish # Copy npm version jq --arg v "$(jq -r .version dist/npm/package.json)" '.version = $v' dist/jsr/jsr.json > dist/jsr/jsr.json.tmp && mv dist/jsr/jsr.json.tmp dist/jsr/jsr.json # Publish jsr package npx jsr publish ``` - To run or deploy the simple test app on Cloudflare, create a `.dev.vars` file containing `NEON_DB_URL=postgres://connection_string`, run `npx wrangler dev --local` or `npx wrangler publish`. - To run the latencies test app in a browser, create a `.dev.vars` file as above, run `npm run browser` and visit `http://localhost:7070/dist/browser/`. To include debug output and avoid minification, use `npm run browserDebug` instead. - To run the latencies test app in node, create a `.dev.vars` file as above and run `npm run node`. To include debug output and avoid minification, use `npm run nodeDebug` instead.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@neondatabase/serverless/DEVELOP.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@neondatabase/serverless/DEVELOP.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 1130 }
# @neondatabase/serverless `@neondatabase/serverless` is [Neon](https://neon.tech)'s PostgreSQL driver for JavaScript and TypeScript. It's: - **Low-latency**, thanks to [message pipelining](https://neon.tech/blog/quicker-serverless-postgres) and other optimizations - **Ideal for serverless/edge** deployment, using https and WebSockets in place of TCP - **A drop-in replacement** for [node-postgres](https://node-postgres.com/), aka [`pg`](https://www.npmjs.com/package/pg) (on which it's based) ## Get started ### Install it Install it with your preferred JavaScript package manager. It's named `@neondatabase/serverless` on npm and `@neon/serverless` on JSR. So, for example: ```bash npm install @neondatabase/serverless ``` or ```bash bunx jsr add @neon/serverless ``` Using TypeScript? No worries: types are included either way. ### Configure it Get your connection string from the [Neon console](https://console.neon.tech/) and set it as an environment variable. Something like: ``` DATABASE_URL=postgres://username:[email protected]/neondb ``` ### Use it For one-shot queries, use the `neon` function. For instance: ```javascript import { neon } from '@neondatabase/serverless'; const sql = neon(process.env.DATABASE_URL); const [post] = await sql`SELECT * FROM posts WHERE id = ${postId}`; // `post` is now { id: 12, title: 'My post', ... } (or undefined) ``` Note: interpolating `${postId}` here is [safe from SQL injection](https://neon.tech/blog/sql-template-tags). ### Deploy it Turn this example into a complete API endpoint deployed on [Vercel Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) at `https://myapp.vercel.dev/api/post?postId=123` by following two simple steps: 1. Create a new file `api/post.ts`: ```javascript import { neon } from '@neondatabase/serverless'; const sql = neon(process.env.DATABASE_URL); export default async (req: Request, ctx: any) => { // get and validate the `postId` query parameter const postId = parseInt(new URL(req.url).searchParams.get('postId'), 10); if (isNaN(postId)) return new Response('Bad request', { status: 400 }); // query and validate the post const [post] = await sql`SELECT * FROM posts WHERE id = ${postId}`; if (!post) return new Response('Not found', { status: 404 }); // return the post as JSON return new Response(JSON.stringify(post), { headers: { 'content-type': 'application/json' } }); } export const config = { runtime: 'edge', regions: ['iad1'], // specify the region nearest your Neon DB }; ``` 2. Test and deploy ```bash npm install -g vercel # install vercel CLI npx vercel env add DATABASE_URL # paste Neon connection string, select all environments npx vercel dev # check working locally, then ... npx vercel deploy ``` The `neon` query function has a few [additional options](CONFIG.md). ## Sessions, transactions, and node-postgres compatibility A query using the `neon` function, as shown above, is carried by an https [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) request. This should work — and work fast — from any modern JavaScript environment. But you can only send one query at a time this way: sessions and transactions are not supported. ### `transaction()` Multiple queries can be issued via fetch request within a single, non-interactive transaction by using the `transaction()` function. This is exposed as a property on the query function. For example: ```javascript import { neon } from '@neondatabase/serverless'; const sql = neon(process.env.DATABASE_URL); const showLatestN = 10; const [posts, tags] = await sql.transaction([ sql`SELECT * FROM posts ORDER BY posted_at DESC LIMIT ${showLatestN}`, sql`SELECT * FROM tags`, ]); ``` There are some [additional options](CONFIG.md) when using `transaction()`. ### `Pool` and `Client` Use the `Pool` or `Client` constructors, instead of the functions described above, when you need: - **session or interactive transaction support**, and/or - **compatibility with node-postgres**, which supports query libraries like [Kysely](https://kysely.dev/) or [Zapatos](https://jawj.github.io/zapatos/). Queries using `Pool` and `Client` are carried by WebSockets. There are **two key things** to know about this: 1. **In Node.js** and some other environments, there's no built-in WebSocket support. In these cases, supply a WebSocket constructor function. 2. **In serverless environments** such as Vercel Edge Functions or Cloudflare Workers, WebSocket connections can't outlive a single request. That means `Pool` or `Client` objects must be connected, used and closed **within a single request handler**. Don't create them outside a request handler; don't create them in one handler and try to reuse them in another; and to avoid exhausting available connections, don't forget to close them. These points are demonstrated in the examples below. ### API - **The full API guide** to `Pool` and `Client` can be found in the [node-postgres docs](https://node-postgres.com/). - There are a few [additional configuration options](CONFIG.md) that apply to `Pool` and `Client` here. ## Example: Node.js with `Pool.connect()` In Node.js, it takes two lines to configure WebSocket support. For example: ```javascript import { Pool, neonConfig } from '@neondatabase/serverless'; import ws from 'ws'; neonConfig.webSocketConstructor = ws; // <-- this is the key bit const pool = new Pool({ connectionString: process.env.DATABASE_URL }); pool.on('error', (err) => console.error(err)); // deal with e.g. re-connect // ... const client = await pool.connect(); try { await client.query('BEGIN'); const { rows: [{ id: postId }], } = await client.query('INSERT INTO posts (title) VALUES ($1) RETURNING id', [ 'Welcome', ]); await client.query('INSERT INTO photos (post_id, url) VALUES ($1, $2)', [ postId, 's3.bucket/photo/url', ]); await client.query('COMMIT'); } catch (err) { await client.query('ROLLBACK'); throw err; } finally { client.release(); } // ... await pool.end(); ``` Other WebSocket libraries are available. For example, you could replace `ws` in the above example with `undici`: ```typescript import { WebSocket } from 'undici'; neonConfig.webSocketConstructor = WebSocket; ``` ## Example: Vercel Edge Function with `Pool.query()` We can rewrite the Vercel Edge Function shown above (under the heading 'Deploy it') to use `Pool`, as follows: ```javascript import { Pool } from '@neondatabase/serverless'; // *don't* create a `Pool` or `Client` here, outside the request handler export default async (req: Request, ctx: any) => { // create a `Pool` inside the request handler const pool = new Pool({ connectionString: process.env.DATABASE_URL }); // get and validate the `postId` query parameter const postId = parseInt(new URL(req.url).searchParams.get('postId'), 10); if (isNaN(postId)) return new Response('Bad request', { status: 400 }); // query and validate the post const [post] = await pool.query('SELECT * FROM posts WHERE id = $1', [postId]); if (!post) return new Response('Not found', { status: 404 }); // end the `Pool` inside the same request handler // (unlike `await`, `ctx.waitUntil` won't hold up the response) ctx.waitUntil(pool.end()); // return the post as JSON return new Response(JSON.stringify(post), { headers: { 'content-type': 'application/json' } }); } export const config = { runtime: 'edge', regions: ['iad1'], // specify the region nearest your Neon DB }; ``` Note: we don't actually use the pooling capabilities of `Pool` in this example. But it's slightly briefer than using `Client` and, because `Pool.query` is designed for one-shot queries, we may in future automatically route these queries over https for lower latency. ## Example: Vercel Edge Function with `Client` Using `Client` instead, the example looks like this: ```javascript import { Client } from '@neondatabase/serverless'; // don't create a `Pool` or `Client` here, outside the request handler export default async (req: Request, ctx: any) => { // create a `Client` inside the request handler const client = new Client(process.env.DATABASE_URL); await client.connect(); // get and validate the `postId` query parameter const postId = parseInt(new URL(req.url).searchParams.get('postId'), 10); if (isNaN(postId)) return new Response('Bad request', { status: 400 }); // query and validate the post const [post] = await client.query('SELECT * FROM posts WHERE id = $1', [postId]); if (!post) return new Response('Not found', { status: 404 }); // end the `Client` inside the same request handler // (unlike `await`, `ctx.waitUntil` won't hold up the response) ctx.waitUntil(client.end()); // return the post as JSON return new Response(JSON.stringify(post), { headers: { 'content-type': 'application/json' } }); } export const config = { runtime: 'edge', regions: ['iad1'], // specify the region nearest your Neon DB }; ``` ## More examples These repos show how to use `@neondatabase/serverless` with a variety of environments and tools: - [Raw SQL + Vercel Edge Functions](https://github.com/neondatabase/neon-vercel-rawsql) - [Raw SQL via https + Vercel Edge Functions](https://github.com/neondatabase/neon-vercel-http) - [Raw SQL + Cloudflare Workers](https://github.com/neondatabase/serverless-cfworker-demo) - [Kysely + Vercel Edge Functions](https://github.com/neondatabase/neon-vercel-kysely) - [Zapatos + Vercel Edge Functions](https://github.com/neondatabase/neon-vercel-zapatos) ## Bring your own Postgres database This package comes configured to connect to a Neon database. But you can also use it to connect to your own Postgres instances if you [run your own WebSocket proxy](DEPLOY.md). ## Open-source This code is released under the [MIT license](LICENSE). ## Feedback and support Please visit [Neon Community](https://community.neon.tech/) or [Support](https://neon.tech/docs/introduction/support).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@neondatabase/serverless/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@neondatabase/serverless/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 10038 }
# @nodelib/fs.scandir > List files and directories inside the specified directory. ## :bulb: Highlights The package is aimed at obtaining information about entries in the directory. * :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). * :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode). * :link: Can safely work with broken symbolic links. ## Install ```console npm install @nodelib/fs.scandir ``` ## Usage ```ts import * as fsScandir from '@nodelib/fs.scandir'; fsScandir.scandir('path', (error, stats) => { /* … */ }); ``` ## API ### .scandir(path, [optionsOrSettings], callback) Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style. ```ts fsScandir.scandir('path', (error, entries) => { /* … */ }); fsScandir.scandir('path', {}, (error, entries) => { /* … */ }); fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ }); ``` ### .scandirSync(path, [optionsOrSettings]) Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path. ```ts const entries = fsScandir.scandirSync('path'); const entries = fsScandir.scandirSync('path', {}); const entries = fsScandir.scandirSync(('path', new fsScandir.Settings()); ``` #### path * Required: `true` * Type: `string | Buffer | URL` A path to a file. If a URL is provided, it must use the `file:` protocol. #### optionsOrSettings * Required: `false` * Type: `Options | Settings` * Default: An instance of `Settings` class An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class. > :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. ### Settings([options]) A class of full settings of the package. ```ts const settings = new fsScandir.Settings({ followSymbolicLinks: false }); const entries = fsScandir.scandirSync('path', settings); ``` ## Entry * `name` — The name of the entry (`unknown.txt`). * `path` — The path of the entry relative to call directory (`root/unknown.txt`). * `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class. * `stats` (optional) — An instance of `fs.Stats` class. For example, the `scandir` call for `tools` directory with one directory inside: ```ts { dirent: Dirent { name: 'typedoc', /* … */ }, name: 'typedoc', path: 'tools/typedoc' } ``` ## Options ### stats * Type: `boolean` * Default: `false` Adds an instance of `fs.Stats` class to the [`Entry`](#entry). > :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO?? ### followSymbolicLinks * Type: `boolean` * Default: `false` Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. ### `throwErrorOnBrokenSymbolicLink` * Type: `boolean` * Default: `true` Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`. ### `pathSegmentSeparator` * Type: `string` * Default: `path.sep` By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. ### `fs` * Type: [`FileSystemAdapter`](./src/adapters/fs.ts) * Default: A default FS methods By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. ```ts interface FileSystemAdapter { lstat?: typeof fs.lstat; stat?: typeof fs.stat; lstatSync?: typeof fs.lstatSync; statSync?: typeof fs.statSync; readdir?: typeof fs.readdir; readdirSync?: typeof fs.readdirSync; } const settings = new fsScandir.Settings({ fs: { lstat: fakeLstat } }); ``` ## `old` and `modern` mode This package has two modes that are used depending on the environment and parameters of use. ### old * Node.js below `10.10` or when the `stats` option is enabled When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links). ### modern * Node.js 10.10+ and the `stats` option is disabled In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present. This mode makes fewer calls to the file system. It's faster. ## Changelog See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. ## License This software is released under the terms of the MIT license.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@nodelib/fs.scandir/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@nodelib/fs.scandir/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 4940 }
# @nodelib/fs.stat > Get the status of a file with some features. ## :bulb: Highlights Wrapper around standard method `fs.lstat` and `fs.stat` with some features. * :beginner: Normally follows symbolic link. * :gear: Can safely work with broken symbolic link. ## Install ```console npm install @nodelib/fs.stat ``` ## Usage ```ts import * as fsStat from '@nodelib/fs.stat'; fsStat.stat('path', (error, stats) => { /* … */ }); ``` ## API ### .stat(path, [optionsOrSettings], callback) Returns an instance of `fs.Stats` class for provided path with standard callback-style. ```ts fsStat.stat('path', (error, stats) => { /* … */ }); fsStat.stat('path', {}, (error, stats) => { /* … */ }); fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ }); ``` ### .statSync(path, [optionsOrSettings]) Returns an instance of `fs.Stats` class for provided path. ```ts const stats = fsStat.stat('path'); const stats = fsStat.stat('path', {}); const stats = fsStat.stat('path', new fsStat.Settings()); ``` #### path * Required: `true` * Type: `string | Buffer | URL` A path to a file. If a URL is provided, it must use the `file:` protocol. #### optionsOrSettings * Required: `false` * Type: `Options | Settings` * Default: An instance of `Settings` class An [`Options`](#options) object or an instance of [`Settings`](#settings) class. > :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. ### Settings([options]) A class of full settings of the package. ```ts const settings = new fsStat.Settings({ followSymbolicLink: false }); const stats = fsStat.stat('path', settings); ``` ## Options ### `followSymbolicLink` * Type: `boolean` * Default: `true` Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`. ### `markSymbolicLink` * Type: `boolean` * Default: `false` Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`). > :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link. ### `throwErrorOnBrokenSymbolicLink` * Type: `boolean` * Default: `true` Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. ### `fs` * Type: [`FileSystemAdapter`](./src/adapters/fs.ts) * Default: A default FS methods By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. ```ts interface FileSystemAdapter { lstat?: typeof fs.lstat; stat?: typeof fs.stat; lstatSync?: typeof fs.lstatSync; statSync?: typeof fs.statSync; } const settings = new fsStat.Settings({ fs: { lstat: fakeLstat } }); ``` ## Changelog See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. ## License This software is released under the terms of the MIT license.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@nodelib/fs.stat/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@nodelib/fs.stat/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 3066 }
# @nodelib/fs.walk > A library for efficiently walking a directory recursively. ## :bulb: Highlights * :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). * :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode). * :gear: Built-in directories/files and error filtering system. * :link: Can safely work with broken symbolic links. ## Install ```console npm install @nodelib/fs.walk ``` ## Usage ```ts import * as fsWalk from '@nodelib/fs.walk'; fsWalk.walk('path', (error, entries) => { /* … */ }); ``` ## API ### .walk(path, [optionsOrSettings], callback) Reads the directory recursively and asynchronously. Requires a callback function. > :book: If you want to use the Promise API, use `util.promisify`. ```ts fsWalk.walk('path', (error, entries) => { /* … */ }); fsWalk.walk('path', {}, (error, entries) => { /* … */ }); fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ }); ``` ### .walkStream(path, [optionsOrSettings]) Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider. ```ts const stream = fsWalk.walkStream('path'); const stream = fsWalk.walkStream('path', {}); const stream = fsWalk.walkStream('path', new fsWalk.Settings()); ``` ### .walkSync(path, [optionsOrSettings]) Reads the directory recursively and synchronously. Returns an array of entries. ```ts const entries = fsWalk.walkSync('path'); const entries = fsWalk.walkSync('path', {}); const entries = fsWalk.walkSync('path', new fsWalk.Settings()); ``` #### path * Required: `true` * Type: `string | Buffer | URL` A path to a file. If a URL is provided, it must use the `file:` protocol. #### optionsOrSettings * Required: `false` * Type: `Options | Settings` * Default: An instance of `Settings` class An [`Options`](#options) object or an instance of [`Settings`](#settings) class. > :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. ### Settings([options]) A class of full settings of the package. ```ts const settings = new fsWalk.Settings({ followSymbolicLinks: true }); const entries = fsWalk.walkSync('path', settings); ``` ## Entry * `name` — The name of the entry (`unknown.txt`). * `path` — The path of the entry relative to call directory (`root/unknown.txt`). * `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. * [`stats`] — An instance of `fs.Stats` class. ## Options ### basePath * Type: `string` * Default: `undefined` By default, all paths are built relative to the root path. You can use this option to set custom root path. In the example below we read the files from the `root` directory, but in the results the root path will be `custom`. ```ts fsWalk.walkSync('root'); // → ['root/file.txt'] fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt'] ``` ### concurrency * Type: `number` * Default: `Infinity` The maximum number of concurrent calls to `fs.readdir`. > :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)). ### deepFilter * Type: [`DeepFilterFunction`](./src/settings.ts) * Default: `undefined` A function that indicates whether the directory will be read deep or not. ```ts // Skip all directories that starts with `node_modules` const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules'); ``` ### entryFilter * Type: [`EntryFilterFunction`](./src/settings.ts) * Default: `undefined` A function that indicates whether the entry will be included to results or not. ```ts // Exclude all `.js` files from results const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js'); ``` ### errorFilter * Type: [`ErrorFilterFunction`](./src/settings.ts) * Default: `undefined` A function that allows you to skip errors that occur when reading directories. For example, you can skip `ENOENT` errors if required: ```ts // Skip all ENOENT errors const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT'; ``` ### stats * Type: `boolean` * Default: `false` Adds an instance of `fs.Stats` class to the [`Entry`](#entry). > :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type. ### followSymbolicLinks * Type: `boolean` * Default: `false` Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. ### `throwErrorOnBrokenSymbolicLink` * Type: `boolean` * Default: `true` Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. ### `pathSegmentSeparator` * Type: `string` * Default: `path.sep` By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. ### `fs` * Type: `FileSystemAdapter` * Default: A default FS methods By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. ```ts interface FileSystemAdapter { lstat: typeof fs.lstat; stat: typeof fs.stat; lstatSync: typeof fs.lstatSync; statSync: typeof fs.statSync; readdir: typeof fs.readdir; readdirSync: typeof fs.readdirSync; } const settings = new fsWalk.Settings({ fs: { lstat: fakeLstat } }); ``` ## Changelog See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. ## License This software is released under the terms of the MIT license.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@nodelib/fs.walk/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@nodelib/fs.walk/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 6118 }
# Changelog ## [0.11.0](https://github.com/pkgjs/parseargs/compare/v0.10.0...v0.11.0) (2022-10-08) ### Features * add `default` option parameter ([#142](https://github.com/pkgjs/parseargs/issues/142)) ([cd20847](https://github.com/pkgjs/parseargs/commit/cd20847a00b2f556aa9c085ac83b942c60868ec1)) ## [0.10.0](https://github.com/pkgjs/parseargs/compare/v0.9.1...v0.10.0) (2022-07-21) ### Features * add parsed meta-data to returned properties ([#129](https://github.com/pkgjs/parseargs/issues/129)) ([91bfb4d](https://github.com/pkgjs/parseargs/commit/91bfb4d3f7b6937efab1b27c91c45d1205f1497e)) ## [0.9.1](https://github.com/pkgjs/parseargs/compare/v0.9.0...v0.9.1) (2022-06-20) ### Bug Fixes * **runtime:** support node 14+ ([#135](https://github.com/pkgjs/parseargs/issues/135)) ([6a1c5a6](https://github.com/pkgjs/parseargs/commit/6a1c5a6f7cadf2f035e004027e2742e3c4ce554b)) ## [0.9.0](https://github.com/pkgjs/parseargs/compare/v0.8.0...v0.9.0) (2022-05-23) ### ⚠ BREAKING CHANGES * drop handling of electron arguments (#121) ### Code Refactoring * drop handling of electron arguments ([#121](https://github.com/pkgjs/parseargs/issues/121)) ([a2ffd53](https://github.com/pkgjs/parseargs/commit/a2ffd537c244a062371522b955acb45a404fc9f2)) ## [0.8.0](https://github.com/pkgjs/parseargs/compare/v0.7.1...v0.8.0) (2022-05-16) ### ⚠ BREAKING CHANGES * switch type:string option arguments to greedy, but with error for suspect cases in strict mode (#88) * positionals now opt-in when strict:true (#116) * create result.values with null prototype (#111) ### Features * create result.values with null prototype ([#111](https://github.com/pkgjs/parseargs/issues/111)) ([9d539c3](https://github.com/pkgjs/parseargs/commit/9d539c3d57f269c160e74e0656ad4fa84ff92ec2)) * positionals now opt-in when strict:true ([#116](https://github.com/pkgjs/parseargs/issues/116)) ([3643338](https://github.com/pkgjs/parseargs/commit/364333826b746e8a7dc5505b4b22fd19ac51df3b)) * switch type:string option arguments to greedy, but with error for suspect cases in strict mode ([#88](https://github.com/pkgjs/parseargs/issues/88)) ([c2b5e72](https://github.com/pkgjs/parseargs/commit/c2b5e72161991dfdc535909f1327cc9b970fe7e8)) ### [0.7.1](https://github.com/pkgjs/parseargs/compare/v0.7.0...v0.7.1) (2022-04-15) ### Bug Fixes * resist pollution ([#106](https://github.com/pkgjs/parseargs/issues/106)) ([ecf2dec](https://github.com/pkgjs/parseargs/commit/ecf2dece0a9f2a76d789384d5d71c68ffe64022a)) ## [0.7.0](https://github.com/pkgjs/parseargs/compare/v0.6.0...v0.7.0) (2022-04-13) ### Features * Add strict mode to parser ([#74](https://github.com/pkgjs/parseargs/issues/74)) ([8267d02](https://github.com/pkgjs/parseargs/commit/8267d02083a87b8b8a71fcce08348d1e031ea91c)) ## [0.6.0](https://github.com/pkgjs/parseargs/compare/v0.5.0...v0.6.0) (2022-04-11) ### ⚠ BREAKING CHANGES * rework results to remove redundant `flags` property and store value true for boolean options (#83) * switch to existing ERR_INVALID_ARG_VALUE (#97) ### Code Refactoring * rework results to remove redundant `flags` property and store value true for boolean options ([#83](https://github.com/pkgjs/parseargs/issues/83)) ([be153db](https://github.com/pkgjs/parseargs/commit/be153dbed1d488cb7b6e27df92f601ba7337713d)) * switch to existing ERR_INVALID_ARG_VALUE ([#97](https://github.com/pkgjs/parseargs/issues/97)) ([084a23f](https://github.com/pkgjs/parseargs/commit/084a23f9fde2da030b159edb1c2385f24579ce40)) ## [0.5.0](https://github.com/pkgjs/parseargs/compare/v0.4.0...v0.5.0) (2022-04-10) ### ⚠ BREAKING CHANGES * Require type to be specified for each supplied option (#95) ### Features * Require type to be specified for each supplied option ([#95](https://github.com/pkgjs/parseargs/issues/95)) ([02cd018](https://github.com/pkgjs/parseargs/commit/02cd01885b8aaa59f2db8308f2d4479e64340068)) ## [0.4.0](https://github.com/pkgjs/parseargs/compare/v0.3.0...v0.4.0) (2022-03-12) ### ⚠ BREAKING CHANGES * parsing, revisit short option groups, add support for combined short and value (#75) * restructure configuration to take options bag (#63) ### Code Refactoring * parsing, revisit short option groups, add support for combined short and value ([#75](https://github.com/pkgjs/parseargs/issues/75)) ([a92600f](https://github.com/pkgjs/parseargs/commit/a92600fa6c214508ab1e016fa55879a314f541af)) * restructure configuration to take options bag ([#63](https://github.com/pkgjs/parseargs/issues/63)) ([b412095](https://github.com/pkgjs/parseargs/commit/b4120957d90e809ee8b607b06e747d3e6a6b213e)) ## [0.3.0](https://github.com/pkgjs/parseargs/compare/v0.2.0...v0.3.0) (2022-02-06) ### Features * **parser:** support short-option groups ([#59](https://github.com/pkgjs/parseargs/issues/59)) ([882067b](https://github.com/pkgjs/parseargs/commit/882067bc2d7cbc6b796f8e5a079a99bc99d4e6ba)) ## [0.2.0](https://github.com/pkgjs/parseargs/compare/v0.1.1...v0.2.0) (2022-02-05) ### Features * basic support for shorts ([#50](https://github.com/pkgjs/parseargs/issues/50)) ([a2f36d7](https://github.com/pkgjs/parseargs/commit/a2f36d7da4145af1c92f76806b7fe2baf6beeceb)) ### Bug Fixes * always store value for a=b ([#43](https://github.com/pkgjs/parseargs/issues/43)) ([a85e8dc](https://github.com/pkgjs/parseargs/commit/a85e8dc06379fd2696ee195cc625de8fac6aee42)) * support single dash as positional ([#49](https://github.com/pkgjs/parseargs/issues/49)) ([d795bf8](https://github.com/pkgjs/parseargs/commit/d795bf877d068fd67aec381f30b30b63f97109ad)) ### [0.1.1](https://github.com/pkgjs/parseargs/compare/v0.1.0...v0.1.1) (2022-01-25) ### Bug Fixes * only use arrays in results for multiples ([#42](https://github.com/pkgjs/parseargs/issues/42)) ([c357584](https://github.com/pkgjs/parseargs/commit/c357584847912506319ed34a0840080116f4fd65)) ## 0.1.0 (2022-01-22) ### Features * expand scenarios covered by default arguments for environments ([#20](https://github.com/pkgjs/parseargs/issues/20)) ([582ada7](https://github.com/pkgjs/parseargs/commit/582ada7be0eca3a73d6e0bd016e7ace43449fa4c)) * update readme and include contributing guidelines ([8edd6fc](https://github.com/pkgjs/parseargs/commit/8edd6fc863cd705f6fac732724159ebe8065a2b0)) ### Bug Fixes * do not strip excess leading dashes on long option names ([#21](https://github.com/pkgjs/parseargs/issues/21)) ([f848590](https://github.com/pkgjs/parseargs/commit/f848590ebf3249ed5979ff47e003fa6e1a8ec5c0)) * name & readme ([3f057c1](https://github.com/pkgjs/parseargs/commit/3f057c1b158a1bdbe878c64b57460c58e56e465f)) * package.json values ([9bac300](https://github.com/pkgjs/parseargs/commit/9bac300e00cd76c77076bf9e75e44f8929512da9)) * update readme name ([957d8d9](https://github.com/pkgjs/parseargs/commit/957d8d96e1dcb48297c0a14345d44c0123b2883e)) ### Build System * first release as minor ([421c6e2](https://github.com/pkgjs/parseargs/commit/421c6e2569a8668ad14fac5a5af5be60479a7571))
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@pkgjs/parseargs/CHANGELOG.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@pkgjs/parseargs/CHANGELOG.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 6957 }
<!-- omit in toc --> # parseArgs [![Coverage][coverage-image]][coverage-url] Polyfill of `util.parseArgs()` ## `util.parseArgs([config])` <!-- YAML added: v18.3.0 changes: - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/43459 description: add support for returning detailed parse information using `tokens` in input `config` and returned properties. --> > Stability: 1 - Experimental * `config` {Object} Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: * `args` {string\[]} array of argument strings. **Default:** `process.argv` with `execPath` and `filename` removed. * `options` {Object} Used to describe arguments known to the parser. Keys of `options` are the long names of options and values are an {Object} accepting the following properties: * `type` {string} Type of argument, which must be either `boolean` or `string`. * `multiple` {boolean} Whether this option can be provided multiple times. If `true`, all values will be collected in an array. If `false`, values for the option are last-wins. **Default:** `false`. * `short` {string} A single character alias for the option. * `default` {string | boolean | string\[] | boolean\[]} The default option value when it is not set by args. It must be of the same type as the the `type` property. When `multiple` is `true`, it must be an array. * `strict` {boolean} Should an error be thrown when unknown arguments are encountered, or when arguments are passed that do not match the `type` configured in `options`. **Default:** `true`. * `allowPositionals` {boolean} Whether this command accepts positional arguments. **Default:** `false` if `strict` is `true`, otherwise `true`. * `tokens` {boolean} Return the parsed tokens. This is useful for extending the built-in behavior, from adding additional checks through to reprocessing the tokens in different ways. **Default:** `false`. * Returns: {Object} The parsed command line arguments: * `values` {Object} A mapping of parsed option names with their {string} or {boolean} values. * `positionals` {string\[]} Positional arguments. * `tokens` {Object\[] | undefined} See [parseArgs tokens](#parseargs-tokens) section. Only returned if `config` includes `tokens: true`. Provides a higher level API for command-line argument parsing than interacting with `process.argv` directly. Takes a specification for the expected arguments and returns a structured object with the parsed options and positionals. ```mjs import { parseArgs } from 'node:util'; const args = ['-f', '--bar', 'b']; const options = { foo: { type: 'boolean', short: 'f' }, bar: { type: 'string' } }; const { values, positionals } = parseArgs({ args, options }); console.log(values, positionals); // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] ``` ```cjs const { parseArgs } = require('node:util'); const args = ['-f', '--bar', 'b']; const options = { foo: { type: 'boolean', short: 'f' }, bar: { type: 'string' } }; const { values, positionals } = parseArgs({ args, options }); console.log(values, positionals); // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] ``` `util.parseArgs` is experimental and behavior may change. Join the conversation in [pkgjs/parseargs][] to contribute to the design. ### `parseArgs` `tokens` Detailed parse information is available for adding custom behaviours by specifying `tokens: true` in the configuration. The returned tokens have properties describing: * all tokens * `kind` {string} One of 'option', 'positional', or 'option-terminator'. * `index` {number} Index of element in `args` containing token. So the source argument for a token is `args[token.index]`. * option tokens * `name` {string} Long name of option. * `rawName` {string} How option used in args, like `-f` of `--foo`. * `value` {string | undefined} Option value specified in args. Undefined for boolean options. * `inlineValue` {boolean | undefined} Whether option value specified inline, like `--foo=bar`. * positional tokens * `value` {string} The value of the positional argument in args (i.e. `args[index]`). * option-terminator token The returned tokens are in the order encountered in the input args. Options that appear more than once in args produce a token for each use. Short option groups like `-xy` expand to a token for each option. So `-xxx` produces three tokens. For example to use the returned tokens to add support for a negated option like `--no-color`, the tokens can be reprocessed to change the value stored for the negated option. ```mjs import { parseArgs } from 'node:util'; const options = { 'color': { type: 'boolean' }, 'no-color': { type: 'boolean' }, 'logfile': { type: 'string' }, 'no-logfile': { type: 'boolean' }, }; const { values, tokens } = parseArgs({ options, tokens: true }); // Reprocess the option tokens and overwrite the returned values. tokens .filter((token) => token.kind === 'option') .forEach((token) => { if (token.name.startsWith('no-')) { // Store foo:false for --no-foo const positiveName = token.name.slice(3); values[positiveName] = false; delete values[token.name]; } else { // Resave value so last one wins if both --foo and --no-foo. values[token.name] = token.value ?? true; } }); const color = values.color; const logfile = values.logfile ?? 'default.log'; console.log({ logfile, color }); ``` ```cjs const { parseArgs } = require('node:util'); const options = { 'color': { type: 'boolean' }, 'no-color': { type: 'boolean' }, 'logfile': { type: 'string' }, 'no-logfile': { type: 'boolean' }, }; const { values, tokens } = parseArgs({ options, tokens: true }); // Reprocess the option tokens and overwrite the returned values. tokens .filter((token) => token.kind === 'option') .forEach((token) => { if (token.name.startsWith('no-')) { // Store foo:false for --no-foo const positiveName = token.name.slice(3); values[positiveName] = false; delete values[token.name]; } else { // Resave value so last one wins if both --foo and --no-foo. values[token.name] = token.value ?? true; } }); const color = values.color; const logfile = values.logfile ?? 'default.log'; console.log({ logfile, color }); ``` Example usage showing negated options, and when an option is used multiple ways then last one wins. ```console $ node negate.js { logfile: 'default.log', color: undefined } $ node negate.js --no-logfile --no-color { logfile: false, color: false } $ node negate.js --logfile=test.log --color { logfile: 'test.log', color: true } $ node negate.js --no-logfile --logfile=test.log --color --no-color { logfile: 'test.log', color: false } ``` ----- <!-- omit in toc --> ## Table of Contents - [`util.parseArgs([config])`](#utilparseargsconfig) - [Scope](#scope) - [Version Matchups](#version-matchups) - [🚀 Getting Started](#-getting-started) - [🙌 Contributing](#-contributing) - [💡 `process.mainArgs` Proposal](#-processmainargs-proposal) - [Implementation:](#implementation) - [📃 Examples](#-examples) - [F.A.Qs](#faqs) - [Links & Resources](#links--resources) ----- ## Scope It is already possible to build great arg parsing modules on top of what Node.js provides; the prickly API is abstracted away by these modules. Thus, process.parseArgs() is not necessarily intended for library authors; it is intended for developers of simple CLI tools, ad-hoc scripts, deployed Node.js applications, and learning materials. It is exceedingly difficult to provide an API which would both be friendly to these Node.js users while being extensible enough for libraries to build upon. We chose to prioritize these use cases because these are currently not well-served by Node.js' API. ---- ## Version Matchups | Node.js | @pkgjs/parseArgs | | -- | -- | | [v18.3.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [v0.9.1](https://github.com/pkgjs/parseargs/tree/v0.9.1#utilparseargsconfig) | | [v16.17.0](https://nodejs.org/dist/latest-v16.x/docs/api/util.html#utilparseargsconfig), [v18.7.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [0.10.0](https://github.com/pkgjs/parseargs/tree/v0.10.0#utilparseargsconfig) | ---- ## 🚀 Getting Started 1. **Install dependencies.** ```bash npm install ``` 2. **Open the index.js file and start editing!** 3. **Test your code by calling parseArgs through our test file** ```bash npm test ``` ---- ## 🙌 Contributing Any person who wants to contribute to the initiative is welcome! Please first read the [Contributing Guide](CONTRIBUTING.md) Additionally, reading the [`Examples w/ Output`](#-examples-w-output) section of this document will be the best way to familiarize yourself with the target expected behavior for parseArgs() once it is fully implemented. This package was implemented using [tape](https://www.npmjs.com/package/tape) as its test harness. ---- ## 💡 `process.mainArgs` Proposal > Note: This can be moved forward independently of the `util.parseArgs()` proposal/work. ### Implementation: ```javascript process.mainArgs = process.argv.slice(process._exec ? 1 : 2) ``` ---- ## 📃 Examples ```js const { parseArgs } = require('@pkgjs/parseargs'); ``` ```js const { parseArgs } = require('@pkgjs/parseargs'); // specify the options that may be used const options = { foo: { type: 'string'}, bar: { type: 'boolean' }, }; const args = ['--foo=a', '--bar']; const { values, positionals } = parseArgs({ args, options }); // values = { foo: 'a', bar: true } // positionals = [] ``` ```js const { parseArgs } = require('@pkgjs/parseargs'); // type:string & multiple const options = { foo: { type: 'string', multiple: true, }, }; const args = ['--foo=a', '--foo', 'b']; const { values, positionals } = parseArgs({ args, options }); // values = { foo: [ 'a', 'b' ] } // positionals = [] ``` ```js const { parseArgs } = require('@pkgjs/parseargs'); // shorts const options = { foo: { short: 'f', type: 'boolean' }, }; const args = ['-f', 'b']; const { values, positionals } = parseArgs({ args, options, allowPositionals: true }); // values = { foo: true } // positionals = ['b'] ``` ```js const { parseArgs } = require('@pkgjs/parseargs'); // unconfigured const options = {}; const args = ['-f', '--foo=a', '--bar', 'b']; const { values, positionals } = parseArgs({ strict: false, args, options, allowPositionals: true }); // values = { f: true, foo: 'a', bar: true } // positionals = ['b'] ``` ---- ## F.A.Qs - Is `cmd --foo=bar baz` the same as `cmd baz --foo=bar`? - yes - Does the parser execute a function? - no - Does the parser execute one of several functions, depending on input? - no - Can subcommands take options that are distinct from the main command? - no - Does it output generated help when no options match? - no - Does it generated short usage? Like: `usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]` - no (no usage/help at all) - Does the user provide the long usage text? For each option? For the whole command? - no - Do subcommands (if implemented) have their own usage output? - no - Does usage print if the user runs `cmd --help`? - no - Does it set `process.exitCode`? - no - Does usage print to stderr or stdout? - N/A - Does it check types? (Say, specify that an option is a boolean, number, etc.) - no - Can an option have more than one type? (string or false, for example) - no - Can the user define a type? (Say, `type: path` to call `path.resolve()` on the argument.) - no - Does a `--foo=0o22` mean 0, 22, 18, or "0o22"? - `"0o22"` - Does it coerce types? - no - Does `--no-foo` coerce to `--foo=false`? For all options? Only boolean options? - no, it sets `{values:{'no-foo': true}}` - Is `--foo` the same as `--foo=true`? Only for known booleans? Only at the end? - no, they are not the same. There is no special handling of `true` as a value so it is just another string. - Does it read environment variables? Ie, is `FOO=1 cmd` the same as `cmd --foo=1`? - no - Do unknown arguments raise an error? Are they parsed? Are they treated as positional arguments? - no, they are parsed, not treated as positionals - Does `--` signal the end of options? - yes - Is `--` included as a positional? - no - Is `program -- foo` the same as `program foo`? - yes, both store `{positionals:['foo']}` - Does the API specify whether a `--` was present/relevant? - no - Is `-bar` the same as `--bar`? - no, `-bar` is a short option or options, with expansion logic that follows the [Utility Syntax Guidelines in POSIX.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). `-bar` expands to `-b`, `-a`, `-r`. - Is `---foo` the same as `--foo`? - no - the first is a long option named `'-foo'` - the second is a long option named `'foo'` - Is `-` a positional? ie, `bash some-test.sh | tap -` - yes ## Links & Resources * [Initial Tooling Issue](https://github.com/nodejs/tooling/issues/19) * [Initial Proposal](https://github.com/nodejs/node/pull/35015) * [parseArgs Proposal](https://github.com/nodejs/node/pull/42675) [coverage-image]: https://img.shields.io/nycrc/pkgjs/parseargs [coverage-url]: https://github.com/pkgjs/parseargs/blob/main/.nycrc [pkgjs/parseargs]: https://github.com/pkgjs/parseargs
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@pkgjs/parseargs/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@pkgjs/parseargs/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 13617 }
# `number` ## Installation ```sh $ yarn add @radix-ui/number # or $ npm install @radix-ui/number ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/number/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/number/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 173 }
# `primitive` ## Installation ```sh $ yarn add @radix-ui/primitive # or $ npm install @radix-ui/primitive ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/primitive/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/primitive/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 182 }
# `react-accordion` ## Installation ```sh $ yarn add @radix-ui/react-accordion # or $ npm install @radix-ui/react-accordion ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/accordion).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-accordion/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-accordion/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 217 }
# `react-alert-dialog` ## Installation ```sh $ yarn add @radix-ui/react-alert-dialog # or $ npm install @radix-ui/react-alert-dialog ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/alert-dialog).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-alert-dialog/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-alert-dialog/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 229 }
# `react-arrow` ## Installation ```sh $ yarn add @radix-ui/react-arrow # or $ npm install @radix-ui/react-arrow ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-arrow/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-arrow/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 188 }
# `react-aspect-ratio` ## Installation ```sh $ yarn add @radix-ui/react-aspect-ratio # or $ npm install @radix-ui/react-aspect-ratio ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/utilities/aspect-ratio).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-aspect-ratio/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-aspect-ratio/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 228 }
# `react-avatar` ## Installation ```sh $ yarn add @radix-ui/react-avatar # or $ npm install @radix-ui/react-avatar ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/avatar).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-avatar/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-avatar/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 205 }
# `react-checkbox` ## Installation ```sh $ yarn add @radix-ui/react-checkbox # or $ npm install @radix-ui/react-checkbox ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/checkbox).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-checkbox/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-checkbox/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 213 }
# `react-collapsible` ## Installation ```sh $ yarn add @radix-ui/react-collapsible # or $ npm install @radix-ui/react-collapsible ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/collapsible).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-collapsible/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-collapsible/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 225 }
# `react-collection` ## Installation ```sh $ yarn add @radix-ui/react-collection # or $ npm install @radix-ui/react-collection ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-collection/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-collection/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 203 }
# `react-compose-refs` ## Installation ```sh $ yarn add @radix-ui/react-compose-refs # or $ npm install @radix-ui/react-compose-refs ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-compose-refs/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-compose-refs/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 209 }
# `react-context-menu` ## Installation ```sh $ yarn add @radix-ui/react-context-menu # or $ npm install @radix-ui/react-context-menu ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/context-menu).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-context-menu/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-context-menu/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 229 }
# `react-context` ## Installation ```sh $ yarn add @radix-ui/react-context # or $ npm install @radix-ui/react-context ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-context/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-context/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 194 }
# `react-dialog` ## Installation ```sh $ yarn add @radix-ui/react-dialog # or $ npm install @radix-ui/react-dialog ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/dialog).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-dialog/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-dialog/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 205 }
# `react-direction` ## Installation ```sh $ yarn add @radix-ui/react-direction # or $ npm install @radix-ui/react-direction ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/utilities/direction).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-direction/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-direction/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 216 }
# `react-dismissable-layer` ## Installation ```sh $ yarn add @radix-ui/react-dismissable-layer # or $ npm install @radix-ui/react-dismissable-layer ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-dismissable-layer/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-dismissable-layer/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 224 }
# `react-dropdown-menu` ## Installation ```sh $ yarn add @radix-ui/react-dropdown-menu # or $ npm install @radix-ui/react-dropdown-menu ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/dropdown-menu).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-dropdown-menu/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-dropdown-menu/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 233 }
# `react-focus-guards` ## Installation ```sh $ yarn add @radix-ui/react-focus-guards # or $ npm install @radix-ui/react-focus-guards ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-focus-guards/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-focus-guards/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 209 }
# `react-focus-scope` ## Installation ```sh $ yarn add @radix-ui/react-focus-scope # or $ npm install @radix-ui/react-focus-scope ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-focus-scope/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-focus-scope/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 206 }
# `react-hover-card` ## Installation ```sh $ yarn add @radix-ui/react-hover-card # or $ npm install @radix-ui/react-hover-card ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/hover-card).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-hover-card/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-hover-card/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 221 }
# `react-id` ## Installation ```sh $ yarn add @radix-ui/react-id # or $ npm install @radix-ui/react-id ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/utilities/id-provider).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-id/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-id/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 197 }
# `react-label` ## Installation ```sh $ yarn add @radix-ui/react-label # or $ npm install @radix-ui/react-label ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/utilities/label).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-label/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-label/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 200 }
# `react-menu` ## Installation ```sh $ yarn add @radix-ui/react-menu # or $ npm install @radix-ui/react-menu ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-menu/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-menu/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 185 }
# `react-menubar` ## Installation ```sh $ yarn add @radix-ui/react-menubar # or $ npm install @radix-ui/react-menubar ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/menubar).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-menubar/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-menubar/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 209 }
# `react-navigation-menu` ## Installation ```sh $ yarn add @radix-ui/react-navigation-menu # or $ npm install @radix-ui/react-navigation-menu ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/navigation-menu).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-navigation-menu/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-navigation-menu/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 241 }
# `react-popover` ## Installation ```sh $ yarn add @radix-ui/react-popover # or $ npm install @radix-ui/react-popover ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/popover).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-popover/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-popover/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 209 }
# `react-popper` ## Installation ```sh $ yarn add @radix-ui/react-popper # or $ npm install @radix-ui/react-popper ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-popper/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-popper/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 191 }
# `react-portal` ## Installation ```sh $ yarn add @radix-ui/react-portal # or $ npm install @radix-ui/react-portal ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/utilities/portal).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-portal/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-portal/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 204 }
# `react-presence` ## Installation ```sh $ yarn add @radix-ui/react-presence # or $ npm install @radix-ui/react-presence ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-presence/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-presence/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 197 }
# `react-primitive` ## Installation ```sh $ yarn add @radix-ui/react-primitive # or $ npm install @radix-ui/react-primitive ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-primitive/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-primitive/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 200 }
# `react-progress` ## Installation ```sh $ yarn add @radix-ui/react-progress # or $ npm install @radix-ui/react-progress ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/progress).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-progress/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-progress/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 213 }
# `react-radio-group` ## Installation ```sh $ yarn add @radix-ui/react-radio-group # or $ npm install @radix-ui/react-radio-group ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/radio-group).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-radio-group/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-radio-group/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 225 }
# `react-roving-focus` ## Installation ```sh $ yarn add @radix-ui/react-roving-focus # or $ npm install @radix-ui/react-roving-focus ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-roving-focus/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-roving-focus/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 209 }
# `react-scroll-area` ## Installation ```sh $ yarn add @radix-ui/react-scroll-area # or $ npm install @radix-ui/react-scroll-area ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/scroll-area).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-scroll-area/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-scroll-area/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 225 }
# `react-select` ## Installation ```sh $ yarn add @radix-ui/react-select # or $ npm install @radix-ui/react-select ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/select).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-select/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-select/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 205 }
# `react-separator` ## Installation ```sh $ yarn add @radix-ui/react-separator # or $ npm install @radix-ui/react-separator ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/separator).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-separator/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-separator/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 217 }
# `react-slider` ## Installation ```sh $ yarn add @radix-ui/react-slider # or $ npm install @radix-ui/react-slider ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/slider).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-slider/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-slider/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 205 }
# `react-slot` ## Installation ```sh $ yarn add @radix-ui/react-slot # or $ npm install @radix-ui/react-slot ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/utilities/slot).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-slot/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-slot/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 196 }
# `react-switch` ## Installation ```sh $ yarn add @radix-ui/react-switch # or $ npm install @radix-ui/react-switch ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/switch).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-switch/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-switch/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 205 }
# `react-tabs` ## Installation ```sh $ yarn add @radix-ui/react-tabs # or $ npm install @radix-ui/react-tabs ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/tabs).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-tabs/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-tabs/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 197 }
# `react-toast` ## Installation ```sh $ yarn add @radix-ui/react-toast # or $ npm install @radix-ui/react-toast ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/toast).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-toast/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-toast/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 201 }
# `react-toggle-group` ## Installation ```sh $ yarn add @radix-ui/react-toggle-group # or $ npm install @radix-ui/react-toggle-group ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/toggle-group).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-toggle-group/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-toggle-group/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 229 }
# `react-toggle` ## Installation ```sh $ yarn add @radix-ui/react-toggle # or $ npm install @radix-ui/react-toggle ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/toggle).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-toggle/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-toggle/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 205 }
# `react-tooltip` ## Installation ```sh $ yarn add @radix-ui/react-tooltip # or $ npm install @radix-ui/react-tooltip ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/components/tooltip).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-tooltip/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-tooltip/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 209 }
# `react-use-callback-ref` ## Installation ```sh $ yarn add @radix-ui/react-use-callback-ref # or $ npm install @radix-ui/react-use-callback-ref ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-use-callback-ref/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-use-callback-ref/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 221 }
# `react-use-controllable-state` ## Installation ```sh $ yarn add @radix-ui/react-use-controllable-state # or $ npm install @radix-ui/react-use-controllable-state ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-use-controllable-state/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-use-controllable-state/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 239 }
# `react-use-escape-keydown` ## Installation ```sh $ yarn add @radix-ui/react-use-escape-keydown # or $ npm install @radix-ui/react-use-escape-keydown ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-use-escape-keydown/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-use-escape-keydown/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 227 }
# `react-use-layout-effect` ## Installation ```sh $ yarn add @radix-ui/react-use-layout-effect # or $ npm install @radix-ui/react-use-layout-effect ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-use-layout-effect/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-use-layout-effect/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 224 }
# `react-use-previous` ## Installation ```sh $ yarn add @radix-ui/react-use-previous # or $ npm install @radix-ui/react-use-previous ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-use-previous/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-use-previous/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 209 }
# `react-use-rect` ## Installation ```sh $ yarn add @radix-ui/react-use-rect # or $ npm install @radix-ui/react-use-rect ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-use-rect/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-use-rect/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 197 }
# `react-use-size` ## Installation ```sh $ yarn add @radix-ui/react-use-size # or $ npm install @radix-ui/react-use-size ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-use-size/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-use-size/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 197 }
# `react-visually-hidden` ## Installation ```sh $ yarn add @radix-ui/react-visually-hidden # or $ npm install @radix-ui/react-visually-hidden ``` ## Usage View docs [here](https://radix-ui.com/primitives/docs/utilities/visually-hidden).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/react-visually-hidden/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/react-visually-hidden/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 240 }
# `rect` ## Installation ```sh $ yarn add @radix-ui/rect # or $ npm install @radix-ui/rect ``` ## Usage This is an internal utility, not intended for public usage.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@radix-ui/rect/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@radix-ui/rect/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 167 }
# `@rollup/rollup-darwin-arm64` This is the **aarch64-apple-darwin** binary for `rollup`
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@rollup/rollup-darwin-arm64/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@rollup/rollup-darwin-arm64/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 89 }
<div align='center'> <h1>TypeBox</h1> <p>Json Schema Type Builder with Static Type Resolution for TypeScript</p> <img src="https://github.com/sinclairzx81/typebox/blob/master/typebox.png?raw=true" /> <br /> <br /> [![npm version](https://badge.fury.io/js/%40sinclair%2Ftypebox.svg)](https://badge.fury.io/js/%40sinclair%2Ftypebox) [![Downloads](https://img.shields.io/npm/dm/%40sinclair%2Ftypebox.svg)](https://www.npmjs.com/package/%40sinclair%2Ftypebox) [![Build](https://github.com/sinclairzx81/typebox/actions/workflows/build.yml/badge.svg)](https://github.com/sinclairzx81/typebox/actions/workflows/build.yml) [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) </div> <a name="Install"></a> ## Install ```bash $ npm install @sinclair/typebox --save ``` ## Example ```typescript import { Type, type Static } from '@sinclair/typebox' const T = Type.Object({ // const T = { x: Type.Number(), // type: 'object', y: Type.Number(), // required: ['x', 'y', 'z'], z: Type.Number() // properties: { }) // x: { type: 'number' }, // y: { type: 'number' }, // z: { type: 'number' } // } // } type T = Static<typeof T> // type T = { // x: number, // y: number, // z: number // } ``` <a name="Overview"></a> ## Overview TypeBox is a runtime type builder that creates in-memory Json Schema objects that infer as TypeScript types. The schematics produced by this library are designed to match the static type checking rules of the TypeScript compiler. TypeBox offers a unified type that can be statically checked by TypeScript and runtime asserted using standard Json Schema validation. This library is designed to allow Json Schema to compose similar to how types compose within TypeScript's type system. It can be used as a simple tool to build up complex schematics or integrated into REST and RPC services to help validate data received over the wire. License MIT ## Contents - [Install](#install) - [Overview](#overview) - [Usage](#usage) - [Types](#types) - [Json](#types-json) - [JavaScript](#types-javascript) - [Import](#types-import) - [Options](#types-options) - [Properties](#types-properties) - [Generics](#types-generics) - [References](#types-references) - [Recursive](#types-recursive) - [Template Literal](#types-template-literal) - [Indexed](#types-indexed) - [Mapped](#types-mapped) - [Conditional](#types-conditional) - [Transform](#types-transform) - [Guard](#types-guard) - [Unsafe](#types-unsafe) - [Values](#values) - [Assert](#values-assert) - [Create](#values-create) - [Clone](#values-clone) - [Check](#values-check) - [Convert](#values-convert) - [Default](#values-default) - [Clean](#values-clean) - [Cast](#values-cast) - [Decode](#values-decode) - [Encode](#values-decode) - [Parse](#values-parse) - [Equal](#values-equal) - [Hash](#values-hash) - [Diff](#values-diff) - [Patch](#values-patch) - [Errors](#values-errors) - [Mutate](#values-mutate) - [Pointer](#values-pointer) - [TypeRegistry](#typeregistry) - [Type](#typeregistry-type) - [Format](#typeregistry-format) - [TypeCheck](#typecheck) - [Ajv](#typecheck-ajv) - [TypeCompiler](#typecheck-typecompiler) - [TypeSystem](#typesystem) - [Policies](#typesystem-policies) - [Error Function](#error-function) - [Workbench](#workbench) - [Codegen](#codegen) - [Ecosystem](#ecosystem) - [Benchmark](#benchmark) - [Compile](#benchmark-compile) - [Validate](#benchmark-validate) - [Compression](#benchmark-compression) - [Contribute](#contribute) <a name="usage"></a> ## Usage The following shows general usage. ```typescript import { Type, type Static } from '@sinclair/typebox' //-------------------------------------------------------------------------------------------- // // Let's say you have the following type ... // //-------------------------------------------------------------------------------------------- type T = { id: string, name: string, timestamp: number } //-------------------------------------------------------------------------------------------- // // ... you can express this type in the following way. // //-------------------------------------------------------------------------------------------- const T = Type.Object({ // const T = { id: Type.String(), // type: 'object', name: Type.String(), // properties: { timestamp: Type.Integer() // id: { }) // type: 'string' // }, // name: { // type: 'string' // }, // timestamp: { // type: 'integer' // } // }, // required: [ // 'id', // 'name', // 'timestamp' // ] // } //-------------------------------------------------------------------------------------------- // // ... then infer back to the original static type this way. // //-------------------------------------------------------------------------------------------- type T = Static<typeof T> // type T = { // id: string, // name: string, // timestamp: number // } //-------------------------------------------------------------------------------------------- // // ... or use the type to parse JavaScript values. // //-------------------------------------------------------------------------------------------- import { Value } from '@sinclair/typebox/value' const R = Value.Parse(T, value) // const R: { // id: string, // name: string, // timestamp: number // } ``` <a name='types'></a> ## Types TypeBox types are Json Schema fragments that compose into more complex types. Each fragment is structured such that any Json Schema compliant validator can runtime assert a value the same way TypeScript will statically assert a type. TypeBox offers a set of Json Types which are used to create Json Schema compliant schematics as well as a JavaScript type set used to create schematics for constructs native to JavaScript. <a name='types-json'></a> ### Json Types The following table lists the supported Json types. These types are fully compatible with the Json Schema Draft 7 specification. ```typescript ┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┐ │ TypeBox │ TypeScript │ Json Schema │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Any() │ type T = any │ const T = { } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Unknown() │ type T = unknown │ const T = { } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.String() │ type T = string │ const T = { │ │ │ │ type: 'string' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Number() │ type T = number │ const T = { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Integer() │ type T = number │ const T = { │ │ │ │ type: 'integer' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Boolean() │ type T = boolean │ const T = { │ │ │ │ type: 'boolean' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Null() │ type T = null │ const T = { │ │ │ │ type: 'null' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Literal(42) │ type T = 42 │ const T = { │ │ │ │ const: 42, │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Array( │ type T = number[] │ const T = { │ │ Type.Number() │ │ type: 'array', │ │ ) │ │ items: { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Object({ │ type T = { │ const T = { │ │ x: Type.Number(), │ x: number, │ type: 'object', │ │ y: Type.Number() │ y: number │ required: ['x', 'y'], │ │ }) │ } │ properties: { │ │ │ │ x: { │ │ │ │ type: 'number' │ │ │ │ }, │ │ │ │ y: { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Tuple([ │ type T = [number, number] │ const T = { │ │ Type.Number(), │ │ type: 'array', │ │ Type.Number() │ │ items: [{ │ │ ]) │ │ type: 'number' │ │ │ │ }, { │ │ │ │ type: 'number' │ │ │ │ }], │ │ │ │ additionalItems: false, │ │ │ │ minItems: 2, │ │ │ │ maxItems: 2 │ │ │ │ } │ │ │ │ │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ enum Foo { │ enum Foo { │ const T = { │ │ A, │ A, │ anyOf: [{ │ │ B │ B │ type: 'number', │ │ } │ } │ const: 0 │ │ │ │ }, { │ │ const T = Type.Enum(Foo) │ type T = Foo │ type: 'number', │ │ │ │ const: 1 │ │ │ │ }] │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Const({ │ type T = { │ const T = { │ │ x: 1, │ readonly x: 1, │ type: 'object', │ │ y: 2, │ readonly y: 2 │ required: ['x', 'y'], │ │ } as const) │ } │ properties: { │ │ │ │ x: { │ │ │ │ type: 'number', │ │ │ │ const: 1 │ │ │ │ }, │ │ │ │ y: { │ │ │ │ type: 'number', │ │ │ │ const: 2 │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.KeyOf( │ type T = keyof { │ const T = { │ │ Type.Object({ │ x: number, │ anyOf: [{ │ │ x: Type.Number(), │ y: number │ type: 'string', │ │ y: Type.Number() │ } │ const: 'x' │ │ }) │ │ }, { │ │ ) │ │ type: 'string', │ │ │ │ const: 'y' │ │ │ │ }] │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Union([ │ type T = string | number │ const T = { │ │ Type.String(), │ │ anyOf: [{ │ │ Type.Number() │ │ type: 'string' │ │ ]) │ │ }, { │ │ │ │ type: 'number' │ │ │ │ }] │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Intersect([ │ type T = { │ const T = { │ │ Type.Object({ │ x: number │ allOf: [{ │ │ x: Type.Number() │ } & { │ type: 'object', │ │ }), │ y: number │ required: ['x'], │ │ Type.Object({ │ } │ properties: { │ │ y: Type.Number() │ │ x: { │ │ ]) │ │ type: 'number' │ │ ]) │ │ } │ │ │ │ } │ │ │ │ }, { │ │ │ │ type: 'object', | │ │ │ required: ['y'], │ │ │ │ properties: { │ │ │ │ y: { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ }] │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Composite([ │ type T = { │ const T = { │ │ Type.Object({ │ x: number, │ type: 'object', │ │ x: Type.Number() │ y: number │ required: ['x', 'y'], │ │ }), │ } │ properties: { │ │ Type.Object({ │ │ x: { │ │ y: Type.Number() │ │ type: 'number' │ │ }) │ │ }, │ │ ]) │ │ y: { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Never() │ type T = never │ const T = { │ │ │ │ not: {} │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Not( | type T = unknown │ const T = { │ │ Type.String() │ │ not: { │ │ ) │ │ type: 'string' │ │ │ │ } │ │ │ │ } │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Extends( │ type T = │ const T = { │ │ Type.String(), │ string extends number │ const: false, │ │ Type.Number(), │ ? true │ type: 'boolean' │ │ Type.Literal(true), │ : false │ } │ │ Type.Literal(false) │ │ │ │ ) │ │ │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Extract( │ type T = Extract< │ const T = { │ │ Type.Union([ │ string | number, │ type: 'string' │ │ Type.String(), │ string │ } │ │ Type.Number(), │ > │ │ │ ]), │ │ │ │ Type.String() │ │ │ │ ) │ │ │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Exclude( │ type T = Exclude< │ const T = { │ │ Type.Union([ │ string | number, │ type: 'number' │ │ Type.String(), │ string │ } │ │ Type.Number(), │ > │ │ │ ]), │ │ │ │ Type.String() │ │ │ │ ) │ │ │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Mapped( │ type T = { │ const T = { │ │ Type.Union([ │ [_ in 'x' | 'y'] : number │ type: 'object', │ │ Type.Literal('x'), │ } │ required: ['x', 'y'], │ │ Type.Literal('y') │ │ properties: { │ │ ]), │ │ x: { │ │ () => Type.Number() │ │ type: 'number' │ │ ) │ │ }, │ │ │ │ y: { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const U = Type.Union([ │ type U = 'open' | 'close' │ const T = { │ │ Type.Literal('open'), │ │ type: 'string', │ │ Type.Literal('close') │ type T = `on${U}` │ pattern: '^on(open|close)$' │ │ ]) │ │ } │ │ │ │ │ │ const T = Type │ │ │ │ .TemplateLiteral([ │ │ │ │ Type.Literal('on'), │ │ │ │ U │ │ │ │ ]) │ │ │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Record( │ type T = Record< │ const T = { │ │ Type.String(), │ string, │ type: 'object', │ │ Type.Number() │ number │ patternProperties: { │ │ ) │ > │ '^.*$': { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Partial( │ type T = Partial<{ │ const T = { │ │ Type.Object({ │ x: number, │ type: 'object', │ │ x: Type.Number(), │ y: number │ properties: { │ │ y: Type.Number() | }> │ x: { │ │ }) │ │ type: 'number' │ │ ) │ │ }, │ │ │ │ y: { │ │ │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Required( │ type T = Required<{ │ const T = { │ │ Type.Object({ │ x?: number, │ type: 'object', │ │ x: Type.Optional( │ y?: number │ required: ['x', 'y'], │ │ Type.Number() | }> │ properties: { │ │ ), │ │ x: { │ │ y: Type.Optional( │ │ type: 'number' │ │ Type.Number() │ │ }, │ │ ) │ │ y: { │ │ }) │ │ type: 'number' │ │ ) │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Pick( │ type T = Pick<{ │ const T = { │ │ Type.Object({ │ x: number, │ type: 'object', │ │ x: Type.Number(), │ y: number │ required: ['x'], │ │ y: Type.Number() │ }, 'x'> │ properties: { │ │ }), ['x'] | │ x: { │ │ ) │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Omit( │ type T = Omit<{ │ const T = { │ │ Type.Object({ │ x: number, │ type: 'object', │ │ x: Type.Number(), │ y: number │ required: ['y'], │ │ y: Type.Number() │ }, 'x'> │ properties: { │ │ }), ['x'] | │ y: { │ │ ) │ │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Index( │ type T = { │ const T = { │ │ Type.Object({ │ x: number, │ type: 'number' │ │ x: Type.Number(), │ y: string │ } │ │ y: Type.String() │ }['x'] │ │ │ }), ['x'] │ │ │ │ ) │ │ │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const A = Type.Tuple([ │ type A = [0, 1] │ const T = { │ │ Type.Literal(0), │ type B = [2, 3] │ type: 'array', │ │ Type.Literal(1) │ type T = [ │ items: [ │ │ ]) │ ...A, │ { const: 0 }, │ │ const B = Type.Tuple([ │ ...B │ { const: 1 }, │ | Type.Literal(2), │ ] │ { const: 2 }, │ | Type.Literal(3) │ │ { const: 3 } │ │ ]) │ │ ], │ │ const T = Type.Tuple([ │ │ additionalItems: false, │ | ...Type.Rest(A), │ │ minItems: 4, │ | ...Type.Rest(B) │ │ maxItems: 4 │ │ ]) │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Uncapitalize( │ type T = Uncapitalize< │ const T = { │ │ Type.Literal('Hello') │ 'Hello' │ type: 'string', │ │ ) │ > │ const: 'hello' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Capitalize( │ type T = Capitalize< │ const T = { │ │ Type.Literal('hello') │ 'hello' │ type: 'string', │ │ ) │ > │ const: 'Hello' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Uppercase( │ type T = Uppercase< │ const T = { │ │ Type.Literal('hello') │ 'hello' │ type: 'string', │ │ ) │ > │ const: 'HELLO' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Lowercase( │ type T = Lowercase< │ const T = { │ │ Type.Literal('HELLO') │ 'HELLO' │ type: 'string', │ │ ) │ > │ const: 'hello' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Object({ │ type T = { │ const R = { │ │ x: Type.Number(), │ x: number, │ $ref: 'T' │ │ y: Type.Number() │ y: number │ } │ │ }, { $id: 'T' }) | } │ │ │ │ │ │ │ const R = Type.Ref(T) │ type R = T │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ ``` <a name='types-javascript'></a> ### JavaScript Types TypeBox provides an extended type set that can be used to create schematics for common JavaScript constructs. These types can not be used with any standard Json Schema validator; but can be used to frame schematics for interfaces that may receive Json validated data. JavaScript types are prefixed with the `[JavaScript]` jsdoc comment for convenience. The following table lists the supported types. ```typescript ┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┐ │ TypeBox │ TypeScript │ Extended Schema │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Constructor([ │ type T = new ( │ const T = { │ │ Type.String(), │ arg0: string, │ type: 'Constructor', │ │ Type.Number() │ arg0: number │ parameters: [{ │ │ ], Type.Boolean()) │ ) => boolean │ type: 'string' │ │ │ │ }, { │ │ │ │ type: 'number' │ │ │ │ }], │ │ │ │ returns: { │ │ │ │ type: 'boolean' │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Function([ │ type T = ( │ const T = { │ | Type.String(), │ arg0: string, │ type: 'Function', │ │ Type.Number() │ arg1: number │ parameters: [{ │ │ ], Type.Boolean()) │ ) => boolean │ type: 'string' │ │ │ │ }, { │ │ │ │ type: 'number' │ │ │ │ }], │ │ │ │ returns: { │ │ │ │ type: 'boolean' │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Promise( │ type T = Promise<string> │ const T = { │ │ Type.String() │ │ type: 'Promise', │ │ ) │ │ item: { │ │ │ │ type: 'string' │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = │ type T = │ const T = { │ │ Type.AsyncIterator( │ AsyncIterableIterator< │ type: 'AsyncIterator', │ │ Type.String() │ string │ items: { │ │ ) │ > │ type: 'string' │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Iterator( │ type T = │ const T = { │ │ Type.String() │ IterableIterator<string> │ type: 'Iterator', │ │ ) │ │ items: { │ │ │ │ type: 'string' │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.RegExp(/abc/i) │ type T = string │ const T = { │ │ │ │ type: 'RegExp' │ │ │ │ source: 'abc' │ │ │ │ flags: 'i' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Uint8Array() │ type T = Uint8Array │ const T = { │ │ │ │ type: 'Uint8Array' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Date() │ type T = Date │ const T = { │ │ │ │ type: 'Date' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Undefined() │ type T = undefined │ const T = { │ │ │ │ type: 'undefined' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Symbol() │ type T = symbol │ const T = { │ │ │ │ type: 'symbol' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.BigInt() │ type T = bigint │ const T = { │ │ │ │ type: 'bigint' │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Void() │ type T = void │ const T = { │ │ │ │ type: 'void' │ │ │ │ } │ │ │ │ │ └────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ ``` <a name='types-import'></a> ### Import Import the Type namespace to bring in the full TypeBox type system. This is recommended for most users. ```typescript import { Type, type Static } from '@sinclair/typebox' ``` You can also selectively import types. This enables modern bundlers to tree shake for unused types. ```typescript import { Object, Number, String, Boolean, type Static } from '@sinclair/typebox' ``` <a name='types-options'></a> ### Options You can pass Json Schema options on the last argument of any given type. Option hints specific to each type are provided for convenience. ```typescript // String must be an email const T = Type.String({ // const T = { format: 'email' // type: 'string', }) // format: 'email' // } // Number must be a multiple of 2 const T = Type.Number({ // const T = { multipleOf: 2 // type: 'number', }) // multipleOf: 2 // } // Array must have at least 5 integer values const T = Type.Array(Type.Integer(), { // const T = { minItems: 5 // type: 'array', }) // minItems: 5, // items: { // type: 'integer' // } // } ``` <a name='types-properties'></a> ### Properties Object properties can be modified with Readonly and Optional. The following table shows how these modifiers map between TypeScript and Json Schema. ```typescript ┌────────────────────────────────┬─────────────────────────────┬────────────────────────────────┐ │ TypeBox │ TypeScript │ Json Schema │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Object({ │ type T = { │ const T = { │ │ name: Type.ReadonlyOptional( │ readonly name?: string │ type: 'object', │ │ Type.String() │ } │ properties: { │ │ ) │ │ name: { │ │ }) │ │ type: 'string' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Object({ │ type T = { │ const T = { │ │ name: Type.Readonly( │ readonly name: string │ type: 'object', │ │ Type.String() │ } │ properties: { │ │ ) │ │ name: { │ │ }) │ │ type: 'string' │ │ │ │ } │ │ │ │ }, │ │ │ │ required: ['name'] │ │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ │ const T = Type.Object({ │ type T = { │ const T = { │ │ name: Type.Optional( │ name?: string │ type: 'object', │ │ Type.String() │ } │ properties: { │ │ ) │ │ name: { │ │ }) │ │ type: 'string' │ │ │ │ } │ │ │ │ } │ │ │ │ } │ │ │ │ │ └────────────────────────────────┴─────────────────────────────┴────────────────────────────────┘ ``` <a name='types-generics'></a> ### Generic Types Generic types can be created with functions. TypeBox types extend the TSchema interface so you should constrain parameters to this type. The following creates a generic Vector type. ```typescript import { Type, type Static, type TSchema } from '@sinclair/typebox' const Vector = <T extends TSchema>(T: T) => Type.Object({ // type Vector<T> = { x: T, // x: T, y: T, // y: T, z: T // z: T }) // } const NumberVector = Vector(Type.Number()) // type NumberVector = Vector<number> ``` Generic types are often used to create aliases for complex types. The following creates a Nullable generic type. ```typescript const Nullable = <T extends TSchema>(schema: T) => Type.Union([schema, Type.Null()]) const T = Nullable(Type.String()) // const T = { // anyOf: [ // { type: 'string' }, // { type: 'null' } // ] // } type T = Static<typeof T> // type T = string | null ``` <a name='types-references'></a> ### Reference Types Reference types can be created with Ref. These types infer the same as the target type but only store a named `$ref` to the target type. ```typescript const Vector = Type.Object({ // const Vector = { x: Type.Number(), // type: 'object', y: Type.Number(), // required: ['x', 'y', 'z'], }, { $id: 'Vector' }) // properties: { // x: { type: 'number' }, // y: { type: 'number' } // }, // $id: 'Vector' // } const VectorRef = Type.Ref(Vector) // const VectorRef = { // $ref: 'Vector' // } type VectorRef = Static<typeof VectorRef> // type VectorRef = { // x: number, // y: number // } ``` Use Deref to dereference a type. This function will replace any interior reference with the target type. ```typescript const Vertex = Type.Object({ // const Vertex = { position: VectorRef, // type: 'object', texcoord: VectorRef, // required: ['position', 'texcoord'], }) // properties: { // position: { $ref: 'Vector' }, // texcoord: { $ref: 'Vector' } // } // } const VertexDeref = Type.Deref(Vertex, [Vector]) // const VertexDeref = { // type: 'object', // required: ['position', 'texcoord'], // properties: { // position: { // type: 'object', // required: ['x', 'y', 'z'], // properties: { // x: { type: 'number' }, // y: { type: 'number' } // } // }, // texcoord: { // type: 'object', // required: ['x', 'y', 'z'], // properties: { // x: { type: 'number' }, // y: { type: 'number' } // } // } // } // } ``` Note that Ref types do not store structural information about the type they're referencing. Because of this, these types cannot be used with some mapping types (such as Partial or Pick). For applications that require mapping on Ref, use Deref to normalize the type first. <a name='types-recursive'></a> ### Recursive Types TypeBox supports recursive data structures with Recursive. This type wraps an interior type and provides it a `this` context that allows the type to reference itself. The following creates a recursive type. Singular recursive inference is also supported. ```typescript const Node = Type.Recursive(This => Type.Object({ // const Node = { id: Type.String(), // $id: 'Node', nodes: Type.Array(This) // type: 'object', }), { $id: 'Node' }) // properties: { // id: { // type: 'string' // }, // nodes: { // type: 'array', // items: { // $ref: 'Node' // } // } // }, // required: [ // 'id', // 'nodes' // ] // } type Node = Static<typeof Node> // type Node = { // id: string // nodes: Node[] // } function test(node: Node) { const id = node.nodes[0].nodes[0].id // id is string } ``` <a name='types-template-literal'></a> ### Template Literal Types TypeBox supports template literal types with the TemplateLiteral function. This type can be created using a syntax similar to the TypeScript template literal syntax or composed from exterior types. TypeBox encodes template literals as regular expressions which enables the template to be checked by Json Schema validators. This type also supports regular expression parsing that enables template patterns to be used for generative types. The following shows both TypeScript and TypeBox usage. ```typescript // TypeScript type K = `prop${'A'|'B'|'C'}` // type T = 'propA' | 'propB' | 'propC' type R = Record<K, string> // type R = { // propA: string // propB: string // propC: string // } // TypeBox const K = Type.TemplateLiteral('prop${A|B|C}') // const K: TTemplateLiteral<[ // TLiteral<'prop'>, // TUnion<[ // TLiteral<'A'>, // TLiteral<'B'>, // TLiteral<'C'>, // ]> // ]> const R = Type.Record(K, Type.String()) // const R: TObject<{ // propA: TString, // propB: TString, // propC: TString, // }> ``` <a name='types-indexed'></a> ### Indexed Access Types TypeBox supports indexed access types with the Index function. This function enables uniform access to interior property and element types without having to extract them from the underlying schema representation. Index types are supported for Object, Array, Tuple, Union and Intersect types. ```typescript const T = Type.Object({ // type T = { x: Type.Number(), // x: number, y: Type.String(), // y: string, z: Type.Boolean() // z: boolean }) // } const A = Type.Index(T, ['x']) // type A = T['x'] // // ... evaluated as // // const A: TNumber const B = Type.Index(T, ['x', 'y']) // type B = T['x' | 'y'] // // ... evaluated as // // const B: TUnion<[ // TNumber, // TString, // ]> const C = Type.Index(T, Type.KeyOf(T)) // type C = T[keyof T] // // ... evaluated as // // const C: TUnion<[ // TNumber, // TString, // TBoolean // ]> ``` <a name='types-mapped'></a> ### Mapped Types TypeBox supports mapped types with the Mapped function. This function accepts two arguments, the first is a union type typically derived from KeyOf, the second is a mapping function that receives a mapping key `K` that can be used to index properties of a type. The following implements a mapped type that remaps each property to be `T | null` ```typescript const T = Type.Object({ // type T = { x: Type.Number(), // x: number, y: Type.String(), // y: string, z: Type.Boolean() // z: boolean }) // } const M = Type.Mapped(Type.KeyOf(T), K => { // type M = { [K in keyof T]: T[K] | null } return Type.Union([Type.Index(T, K), Type.Null()]) // }) // ... evaluated as // // const M: TObject<{ // x: TUnion<[TNumber, TNull]>, // y: TUnion<[TString, TNull]>, // z: TUnion<[TBoolean, TNull]> // }> ``` <a name='types-conditional'></a> ### Conditional Types TypeBox supports runtime conditional types with the Extends function. This function performs a structural assignability check against the first (`left`) and second (`right`) arguments and will return either the third (`true`) or fourth (`false`) argument based on the result. The conditional types Exclude and Extract are also supported. The following shows both TypeScript and TypeBox examples of conditional types. ```typescript // Extends const A = Type.Extends( // type A = string extends number ? 1 : 2 Type.String(), // Type.Number(), // ... evaluated as Type.Literal(1), // Type.Literal(2) // const A: TLiteral<2> ) // Extract const B = Type.Extract( // type B = Extract<1 | 2 | 3, 1> Type.Union([ // Type.Literal(1), // ... evaluated as Type.Literal(2), // Type.Literal(3) // const B: TLiteral<1> ]), Type.Literal(1) ) // Exclude const C = Type.Exclude( // type C = Exclude<1 | 2 | 3, 1> Type.Union([ // Type.Literal(1), // ... evaluated as Type.Literal(2), // Type.Literal(3) // const C: TUnion<[ ]), // TLiteral<2>, Type.Literal(1) // TLiteral<3>, ) // ]> ``` <a name='types-transform'></a> ### Transform Types TypeBox supports value decoding and encoding with Transform types. These types work in tandem with the Encode and Decode functions available on the Value and TypeCompiler submodules. Transform types can be used to convert Json encoded values into constructs more natural to JavaScript. The following creates a Transform type to decode numbers into Dates using the Value submodule. ```typescript import { Value } from '@sinclair/typebox/value' const T = Type.Transform(Type.Number()) .Decode(value => new Date(value)) // decode: number to Date .Encode(value => value.getTime()) // encode: Date to number const D = Value.Decode(T, 0) // const D = Date(1970-01-01T00:00:00.000Z) const E = Value.Encode(T, D) // const E = 0 ``` Use the StaticEncode or StaticDecode types to infer a Transform type. ```typescript import { Static, StaticDecode, StaticEncode } from '@sinclair/typebox' const T = Type.Transform(Type.Array(Type.Number(), { uniqueItems: true })) .Decode(value => new Set(value)) .Encode(value => [...value]) type D = StaticDecode<typeof T> // type D = Set<number> type E = StaticEncode<typeof T> // type E = Array<number> type T = Static<typeof T> // type T = Array<number> ``` <a name='types-unsafe'></a> ### Unsafe Types TypeBox supports user defined types with Unsafe. This type allows you to specify both schema representation and inference type. The following creates an Unsafe type with a number schema that infers as string. ```typescript const T = Type.Unsafe<string>({ type: 'number' }) // const T = { type: 'number' } type T = Static<typeof T> // type T = string - ? ``` The Unsafe type is often used to create schematics for extended specifications like OpenAPI. ```typescript const Nullable = <T extends TSchema>(schema: T) => Type.Unsafe<Static<T> | null>({ ...schema, nullable: true }) const T = Nullable(Type.String()) // const T = { // type: 'string', // nullable: true // } type T = Static<typeof T> // type T = string | null const StringEnum = <T extends string[]>(values: [...T]) => Type.Unsafe<T[number]>({ type: 'string', enum: values }) const S = StringEnum(['A', 'B', 'C']) // const S = { // enum: ['A', 'B', 'C'] // } type S = Static<typeof T> // type S = 'A' | 'B' | 'C' ``` <a name='types-guard'></a> ### TypeGuard TypeBox can check its own types with the TypeGuard module. This module is written for type introspection and provides structural tests for every built-in TypeBox type. Functions of this module return `is` guards which can be used with control flow assertions to obtain schema inference for unknown values. The following guards that the value `T` is TString. ```typescript import { TypeGuard, Kind } from '@sinclair/typebox' const T = { [Kind]: 'String', type: 'string' } if(TypeGuard.IsString(T)) { // T is TString } ``` <a name='values'></a> ## Values TypeBox provides an optional Value submodule that can be used to perform structural operations on JavaScript values. This submodule includes functionality to create, check and cast values from types as well as check equality, clone, diff and patch JavaScript values. This submodule is provided via optional import. ```typescript import { Value } from '@sinclair/typebox/value' ``` <a name='values-assert'></a> ### Assert Use the Assert function to assert a value is valid. ```typescript let value: unknown = 1 Value.Assert(Type.Number(), value) // throws AssertError if invalid ``` <a name='values-create'></a> ### Create Use the Create function to create a value from a type. TypeBox will use default values if specified. ```typescript const T = Type.Object({ x: Type.Number(), y: Type.Number({ default: 42 }) }) const A = Value.Create(T) // const A = { x: 0, y: 42 } ``` <a name='values-clone'></a> ### Clone Use the Clone function to deeply clone a value. ```typescript const A = Value.Clone({ x: 1, y: 2, z: 3 }) // const A = { x: 1, y: 2, z: 3 } ``` <a name='values-check'></a> ### Check Use the Check function to type check a value. ```typescript const T = Type.Object({ x: Type.Number() }) const R = Value.Check(T, { x: 1 }) // const R = true ``` <a name='values-convert'></a> ### Convert Use the Convert function to convert a value into its target type if a reasonable conversion is possible. This function may return an invalid value and should be checked before use. Its return type is `unknown`. ```typescript const T = Type.Object({ x: Type.Number() }) const R1 = Value.Convert(T, { x: '3.14' }) // const R1 = { x: 3.14 } const R2 = Value.Convert(T, { x: 'not a number' }) // const R2 = { x: 'not a number' } ``` <a name='values-clean'></a> ### Clean Use Clean to remove excess properties from a value. This function does not check the value and returns an unknown type. You should Check the result before use. Clean is a mutable operation. To avoid mutation, Clone the value first. ```typescript const T = Type.Object({ x: Type.Number(), y: Type.Number() }) const X = Value.Clean(T, null) // const 'X = null const Y = Value.Clean(T, { x: 1 }) // const 'Y = { x: 1 } const Z = Value.Clean(T, { x: 1, y: 2, z: 3 }) // const 'Z = { x: 1, y: 2 } ``` <a name='values-default'></a> ### Default Use Default to generate missing properties on a value using default schema annotations if available. This function does not check the value and returns an unknown type. You should Check the result before use. Default is a mutable operation. To avoid mutation, Clone the value first. ```typescript const T = Type.Object({ x: Type.Number({ default: 0 }), y: Type.Number({ default: 0 }) }) const X = Value.Default(T, null) // const 'X = null - non-enumerable const Y = Value.Default(T, { }) // const 'Y = { x: 0, y: 0 } const Z = Value.Default(T, { x: 1 }) // const 'Z = { x: 1, y: 0 } ``` <a name='values-cast'></a> ### Cast Use the Cast function to upcast a value into a target type. This function will retain as much infomation as possible from the original value. The Cast function is intended to be used in data migration scenarios where existing values need to be upgraded to match a modified type. ```typescript const T = Type.Object({ x: Type.Number(), y: Type.Number() }, { additionalProperties: false }) const X = Value.Cast(T, null) // const X = { x: 0, y: 0 } const Y = Value.Cast(T, { x: 1 }) // const Y = { x: 1, y: 0 } const Z = Value.Cast(T, { x: 1, y: 2, z: 3 }) // const Z = { x: 1, y: 2 } ``` <a name='values-decode'></a> ### Decode Use the Decode function to decode a value from a type or throw if the value is invalid. The return value will infer as the decoded type. This function will run Transform codecs if available. ```typescript const A = Value.Decode(Type.String(), 'hello') // const A = 'hello' const B = Value.Decode(Type.String(), 42) // throw ``` <a name='values-decode'></a> ### Encode Use the Encode function to encode a value to a type or throw if the value is invalid. The return value will infer as the encoded type. This function will run Transform codecs if available. ```typescript const A = Value.Encode(Type.String(), 'hello') // const A = 'hello' const B = Value.Encode(Type.String(), 42) // throw ``` <a name='values-parse'></a> ### Parse Use the Parse function to parse a value or throw if invalid. This function internally uses Default, Clean, Convert and Decode to make a best effort attempt to parse the value into the expected type. This function should not be used in performance critical code paths. ```typescript const T = Type.Object({ x: Type.Number({ default: 0 }), y: Type.Number({ default: 0 }) }) // Default const A = Value.Parse(T, { }) // const A = { x: 0, y: 0 } // Convert const B = Value.Parse(T, { x: '1', y: '2' }) // const B = { x: 1, y: 2 } // Clean const C = Value.Parse(T, { x: 1, y: 2, z: 3 }) // const C = { x: 1, y: 2 } // Assert const D = Value.Parse(T, undefined) // throws AssertError ``` <a name='values-equal'></a> ### Equal Use the Equal function to deeply check for value equality. ```typescript const R = Value.Equal( // const R = true { x: 1, y: 2, z: 3 }, { x: 1, y: 2, z: 3 } ) ``` <a name='values-hash'></a> ### Hash Use the Hash function to create a [FNV1A-64](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) non cryptographic hash of a value. ```typescript const A = Value.Hash({ x: 1, y: 2, z: 3 }) // const A = 2910466848807138541n const B = Value.Hash({ x: 1, y: 4, z: 3 }) // const B = 1418369778807423581n ``` <a name='values-diff'></a> ### Diff Use the Diff function to generate a sequence of edits that will transform one value into another. ```typescript const E = Value.Diff( // const E = [ { x: 1, y: 2, z: 3 }, // { type: 'update', path: '/y', value: 4 }, { y: 4, z: 5, w: 6 } // { type: 'update', path: '/z', value: 5 }, ) // { type: 'insert', path: '/w', value: 6 }, // { type: 'delete', path: '/x' } // ] ``` <a name='values-patch'></a> ### Patch Use the Patch function to apply a sequence of edits. ```typescript const A = { x: 1, y: 2 } const B = { x: 3 } const E = Value.Diff(A, B) // const E = [ // { type: 'update', path: '/x', value: 3 }, // { type: 'delete', path: '/y' } // ] const C = Value.Patch<typeof B>(A, E) // const C = { x: 3 } ``` <a name='values-errors'></a> ### Errors Use the Errors function to enumerate validation errors. ```typescript const T = Type.Object({ x: Type.Number(), y: Type.Number() }) const R = [...Value.Errors(T, { x: '42' })] // const R = [{ // schema: { type: 'number' }, // path: '/x', // value: '42', // message: 'Expected number' // }, { // schema: { type: 'number' }, // path: '/y', // value: undefined, // message: 'Expected number' // }] ``` <a name='values-mutate'></a> ### Mutate Use the Mutate function to perform a deep mutable value assignment while retaining internal references. ```typescript const Y = { z: 1 } // const Y = { z: 1 } const X = { y: Y } // const X = { y: { z: 1 } } const A = { x: X } // const A = { x: { y: { z: 1 } } } Value.Mutate(A, { x: { y: { z: 2 } } }) // A' = { x: { y: { z: 2 } } } const R0 = A.x.y.z === 2 // const R0 = true const R1 = A.x.y === Y // const R1 = true const R2 = A.x === X // const R2 = true ``` <a name='values-pointer'></a> ### Pointer Use ValuePointer to perform mutable updates on existing values using [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) Json Pointers. ```typescript import { ValuePointer } from '@sinclair/typebox/value' const A = { x: 0, y: 0, z: 0 } ValuePointer.Set(A, '/x', 1) // A' = { x: 1, y: 0, z: 0 } ValuePointer.Set(A, '/y', 1) // A' = { x: 1, y: 1, z: 0 } ValuePointer.Set(A, '/z', 1) // A' = { x: 1, y: 1, z: 1 } ``` <a name='typeregistry'></a> ## TypeRegistry The TypeBox type system can be extended with additional types and formats using the TypeRegistry and FormatRegistry modules. These modules integrate deeply with TypeBox's internal type checking infrastructure and can be used to create application specific types, or register schematics for alternative specifications. <a name='typeregistry-type'></a> ### TypeRegistry Use the TypeRegistry to register a type. The Kind must match the registered type name. ```typescript import { TSchema, Kind, TypeRegistry } from '@sinclair/typebox' TypeRegistry.Set('Foo', (schema, value) => value === 'foo') const Foo = { [Kind]: 'Foo' } as TSchema const A = Value.Check(Foo, 'foo') // const A = true const B = Value.Check(Foo, 'bar') // const B = false ``` <a name='typeregistry-format'></a> ### FormatRegistry Use the FormatRegistry to register a string format. ```typescript import { FormatRegistry } from '@sinclair/typebox' FormatRegistry.Set('foo', (value) => value === 'foo') const T = Type.String({ format: 'foo' }) const A = Value.Check(T, 'foo') // const A = true const B = Value.Check(T, 'bar') // const B = false ``` <a name='typecheck'></a> ## TypeCheck TypeBox types target Json Schema Draft 7 and are compatible with any validator that supports this specification. TypeBox also provides a built in type checking compiler designed specifically for TypeBox types that offers high performance compilation and value checking. The following sections detail using Ajv and the TypeBox compiler infrastructure. <a name='typecheck-ajv'></a> ## Ajv The following shows the recommended setup for Ajv. ```bash $ npm install ajv ajv-formats --save ``` ```typescript import { Type } from '@sinclair/typebox' import addFormats from 'ajv-formats' import Ajv from 'ajv' const ajv = addFormats(new Ajv({}), [ 'date-time', 'time', 'date', 'email', 'hostname', 'ipv4', 'ipv6', 'uri', 'uri-reference', 'uuid', 'uri-template', 'json-pointer', 'relative-json-pointer', 'regex' ]) const validate = ajv.compile(Type.Object({ x: Type.Number(), y: Type.Number(), z: Type.Number() })) const R = validate({ x: 1, y: 2, z: 3 }) // const R = true ``` <a name='typecheck-typecompiler'></a> ### TypeCompiler The TypeBox TypeCompiler is a high performance JIT validation compiler that transforms TypeBox types into optimized JavaScript validation routines. The compiler is tuned for fast compilation as well as fast value assertion. It is built to serve as a validation backend that can be integrated into larger applications. It can also be used for code generation. The TypeCompiler is provided as an optional import. ```typescript import { TypeCompiler } from '@sinclair/typebox/compiler' ``` Use the Compile function to JIT compile a type. Note that compilation is generally an expensive operation and should only be performed once per type during application start up. TypeBox does not cache previously compiled types, and applications are expected to hold references to each compiled type for the lifetime of the application. ```typescript const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck<TObject<{ x: Type.Number(), // x: TNumber; y: Type.Number(), // y: TNumber; z: Type.Number() // z: TNumber; })) // }>> const R = C.Check({ x: 1, y: 2, z: 3 }) // const R = true ``` Use the Errors function to generate diagnostic errors for a value. The Errors function will return an iterator that when enumerated; will perform an exhaustive check across the entire value yielding any error found. For performance, this function should only be called after a failed Check. Applications may also choose to yield only the first value to avoid exhaustive error generation. ```typescript const C = TypeCompiler.Compile(Type.Object({ // const C: TypeCheck<TObject<{ x: Type.Number(), // x: TNumber; y: Type.Number(), // y: TNumber; z: Type.Number() // z: TNumber; })) // }>> const value = { } const first = C.Errors(value).First() // const first = { // schema: { type: 'number' }, // path: '/x', // value: undefined, // message: 'Expected number' // } const all = [...C.Errors(value)] // const all = [{ // schema: { type: 'number' }, // path: '/x', // value: undefined, // message: 'Expected number' // }, { // schema: { type: 'number' }, // path: '/y', // value: undefined, // message: 'Expected number' // }, { // schema: { type: 'number' }, // path: '/z', // value: undefined, // message: 'Expected number' // }] ``` Use the Code function to generate assertion functions as strings. This function can be used to generate code that can be written to disk as importable modules. This technique is sometimes referred to as Ahead of Time (AOT) compilation. The following generates code to check a string. ```typescript const C = TypeCompiler.Code(Type.String()) // const C = `return function check(value) { // return ( // (typeof value === 'string') // ) // }` ``` <a name='typesystem'></a> ## TypeSystem The TypeBox TypeSystem module provides configurations to use either Json Schema or TypeScript type checking semantics. Configurations made to the TypeSystem module are observed by the TypeCompiler, Value and Error modules. <a name='typesystem-policies'></a> ### Policies TypeBox validates using standard Json Schema assertion policies by default. The TypeSystemPolicy module can override some of these to have TypeBox assert values inline with TypeScript static checks. It also provides overrides for certain checking rules related to non-serializable values (such as void) which can be helpful in Json based protocols such as Json Rpc 2.0. The following overrides are available. ```typescript import { TypeSystemPolicy } from '@sinclair/typebox/system' // Disallow undefined values for optional properties (default is false) // // const A: { x?: number } = { x: undefined } - disallowed when enabled TypeSystemPolicy.ExactOptionalPropertyTypes = true // Allow arrays to validate as object types (default is false) // // const A: {} = [] - allowed in TS TypeSystemPolicy.AllowArrayObject = true // Allow numeric values to be NaN or + or - Infinity (default is false) // // const A: number = NaN - allowed in TS TypeSystemPolicy.AllowNaN = true // Allow void types to check with undefined and null (default is false) // // Used to signal void return on Json-Rpc 2.0 protocol TypeSystemPolicy.AllowNullVoid = true ``` <a name='error-function'></a> ## Error Function Error messages in TypeBox can be customized by defining an ErrorFunction. This function allows for the localization of error messages as well as enabling custom error messages for custom types. By default, TypeBox will generate messages using the `en-US` locale. To support additional locales, you can replicate the function found in `src/errors/function.ts` and create a locale specific translation. The function can then be set via SetErrorFunction. The following example shows an inline error function that intercepts errors for String, Number and Boolean only. The DefaultErrorFunction is used to return a default error message. ```typescript import { SetErrorFunction, DefaultErrorFunction, ValueErrorType } from '@sinclair/typebox/errors' SetErrorFunction((error) => { // i18n override switch(error.errorType) { /* en-US */ case ValueErrorType.String: return 'Expected string' /* fr-FR */ case ValueErrorType.Number: return 'Nombre attendu' /* ko-KR */ case ValueErrorType.Boolean: return '예상 부울' /* en-US */ default: return DefaultErrorFunction(error) } }) const T = Type.Object({ // const T: TObject<{ x: Type.String(), // TString, y: Type.Number(), // TNumber, z: Type.Boolean() // TBoolean }) // }> const E = [...Value.Errors(T, { // const E = [{ x: null, // type: 48, y: null, // schema: { ... }, z: null // path: '/x', })] // value: null, // message: 'Expected string' // }, { // type: 34, // schema: { ... }, // path: '/y', // value: null, // message: 'Nombre attendu' // }, { // type: 14, // schema: { ... }, // path: '/z', // value: null, // message: '예상 부울' // }] ``` <a name='workbench'></a> ## TypeBox Workbench TypeBox offers a web based code generation tool that can convert TypeScript types into TypeBox types as well as several other ecosystem libraries. [TypeBox Workbench Link Here](https://sinclairzx81.github.io/typebox-workbench/) <a name='codegen'></a> ## TypeBox Codegen TypeBox provides a code generation library that can be integrated into toolchains to automate type translation between TypeScript and TypeBox. This library also includes functionality to transform TypeScript types to other ecosystem libraries. [TypeBox Codegen Link Here](https://github.com/sinclairzx81/typebox-codegen) <a name='ecosystem'></a> ## Ecosystem The following is a list of community packages that offer general tooling, extended functionality and framework integration support for TypeBox. | Package | Description | | ------------- | ------------- | | [drizzle-typebox](https://www.npmjs.com/package/drizzle-typebox) | Generates TypeBox types from Drizzle ORM schemas | | [elysia](https://github.com/elysiajs/elysia) | Fast and friendly Bun web framework | | [fastify-type-provider-typebox](https://github.com/fastify/fastify-type-provider-typebox) | Fastify TypeBox integration with the Fastify Type Provider | | [feathersjs](https://github.com/feathersjs/feathers) | The API and real-time application framework | | [fetch-typebox](https://github.com/erfanium/fetch-typebox) | Drop-in replacement for fetch that brings easy integration with TypeBox | | [h3-typebox](https://github.com/kevinmarrec/h3-typebox) | Schema validation utilities for h3 using TypeBox & Ajv | | [http-wizard](https://github.com/flodlc/http-wizard) | Type safe http client library for Fastify | | [json2typebox](https://github.com/hacxy/json2typebox) | Creating TypeBox code from Json Data | | [nominal-typebox](https://github.com/Coder-Spirit/nominal/tree/main/%40coderspirit/nominal-typebox) | Allows devs to integrate nominal types into TypeBox schemas | | [openapi-box](https://github.com/geut/openapi-box) | Generate TypeBox types from OpenApi IDL + Http client library | | [prismabox](https://github.com/m1212e/prismabox) | Converts a prisma.schema to typebox schema matching the database models | | [schema2typebox](https://github.com/xddq/schema2typebox) | Creating TypeBox code from Json Schemas | | [sveltekit-superforms](https://github.com/ciscoheat/sveltekit-superforms) | A comprehensive SvelteKit form library for server and client validation | | [ts2typebox](https://github.com/xddq/ts2typebox) | Creating TypeBox code from Typescript types | | [typebox-form-parser](https://github.com/jtlapp/typebox-form-parser) | Parses form and query data based on TypeBox schemas | | [typebox-validators](https://github.com/jtlapp/typebox-validators) | Advanced validators supporting discriminated and heterogeneous unions | <a name='benchmark'></a> ## Benchmark This project maintains a set of benchmarks that measure Ajv, Value and TypeCompiler compilation and validation performance. These benchmarks can be run locally by cloning this repository and running `npm run benchmark`. The results below show for Ajv version 8.12.0 running on Node 20.10.0. For additional comparative benchmarks, please refer to [typescript-runtime-type-benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/). <a name='benchmark-compile'></a> ### Compile This benchmark measures compilation performance for varying types. ```typescript ┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┐ │ (index) │ Iterations │ Ajv │ TypeCompiler │ Performance │ ├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┤ │ Literal_String │ 1000 │ ' 211 ms' │ ' 8 ms' │ ' 26.38 x' │ │ Literal_Number │ 1000 │ ' 185 ms' │ ' 5 ms' │ ' 37.00 x' │ │ Literal_Boolean │ 1000 │ ' 195 ms' │ ' 4 ms' │ ' 48.75 x' │ │ Primitive_Number │ 1000 │ ' 149 ms' │ ' 7 ms' │ ' 21.29 x' │ │ Primitive_String │ 1000 │ ' 135 ms' │ ' 5 ms' │ ' 27.00 x' │ │ Primitive_String_Pattern │ 1000 │ ' 193 ms' │ ' 10 ms' │ ' 19.30 x' │ │ Primitive_Boolean │ 1000 │ ' 152 ms' │ ' 4 ms' │ ' 38.00 x' │ │ Primitive_Null │ 1000 │ ' 147 ms' │ ' 4 ms' │ ' 36.75 x' │ │ Object_Unconstrained │ 1000 │ ' 1065 ms' │ ' 26 ms' │ ' 40.96 x' │ │ Object_Constrained │ 1000 │ ' 1183 ms' │ ' 26 ms' │ ' 45.50 x' │ │ Object_Vector3 │ 1000 │ ' 407 ms' │ ' 9 ms' │ ' 45.22 x' │ │ Object_Box3D │ 1000 │ ' 1777 ms' │ ' 24 ms' │ ' 74.04 x' │ │ Tuple_Primitive │ 1000 │ ' 485 ms' │ ' 11 ms' │ ' 44.09 x' │ │ Tuple_Object │ 1000 │ ' 1344 ms' │ ' 17 ms' │ ' 79.06 x' │ │ Composite_Intersect │ 1000 │ ' 606 ms' │ ' 14 ms' │ ' 43.29 x' │ │ Composite_Union │ 1000 │ ' 522 ms' │ ' 17 ms' │ ' 30.71 x' │ │ Math_Vector4 │ 1000 │ ' 851 ms' │ ' 9 ms' │ ' 94.56 x' │ │ Math_Matrix4 │ 1000 │ ' 406 ms' │ ' 10 ms' │ ' 40.60 x' │ │ Array_Primitive_Number │ 1000 │ ' 367 ms' │ ' 6 ms' │ ' 61.17 x' │ │ Array_Primitive_String │ 1000 │ ' 339 ms' │ ' 7 ms' │ ' 48.43 x' │ │ Array_Primitive_Boolean │ 1000 │ ' 325 ms' │ ' 5 ms' │ ' 65.00 x' │ │ Array_Object_Unconstrained │ 1000 │ ' 1863 ms' │ ' 21 ms' │ ' 88.71 x' │ │ Array_Object_Constrained │ 1000 │ ' 1535 ms' │ ' 18 ms' │ ' 85.28 x' │ │ Array_Tuple_Primitive │ 1000 │ ' 829 ms' │ ' 14 ms' │ ' 59.21 x' │ │ Array_Tuple_Object │ 1000 │ ' 1674 ms' │ ' 14 ms' │ ' 119.57 x' │ │ Array_Composite_Intersect │ 1000 │ ' 789 ms' │ ' 13 ms' │ ' 60.69 x' │ │ Array_Composite_Union │ 1000 │ ' 822 ms' │ ' 15 ms' │ ' 54.80 x' │ │ Array_Math_Vector4 │ 1000 │ ' 1129 ms' │ ' 14 ms' │ ' 80.64 x' │ │ Array_Math_Matrix4 │ 1000 │ ' 673 ms' │ ' 9 ms' │ ' 74.78 x' │ └────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┘ ``` <a name='benchmark-validate'></a> ### Validate This benchmark measures validation performance for varying types. ```typescript ┌────────────────────────────┬────────────┬──────────────┬──────────────┬──────────────┬──────────────┐ │ (index) │ Iterations │ ValueCheck │ Ajv │ TypeCompiler │ Performance │ ├────────────────────────────┼────────────┼──────────────┼──────────────┼──────────────┼──────────────┤ │ Literal_String │ 1000000 │ ' 17 ms' │ ' 5 ms' │ ' 5 ms' │ ' 1.00 x' │ │ Literal_Number │ 1000000 │ ' 14 ms' │ ' 18 ms' │ ' 9 ms' │ ' 2.00 x' │ │ Literal_Boolean │ 1000000 │ ' 14 ms' │ ' 20 ms' │ ' 9 ms' │ ' 2.22 x' │ │ Primitive_Number │ 1000000 │ ' 17 ms' │ ' 19 ms' │ ' 9 ms' │ ' 2.11 x' │ │ Primitive_String │ 1000000 │ ' 17 ms' │ ' 18 ms' │ ' 10 ms' │ ' 1.80 x' │ │ Primitive_String_Pattern │ 1000000 │ ' 172 ms' │ ' 46 ms' │ ' 41 ms' │ ' 1.12 x' │ │ Primitive_Boolean │ 1000000 │ ' 14 ms' │ ' 19 ms' │ ' 10 ms' │ ' 1.90 x' │ │ Primitive_Null │ 1000000 │ ' 16 ms' │ ' 19 ms' │ ' 9 ms' │ ' 2.11 x' │ │ Object_Unconstrained │ 1000000 │ ' 437 ms' │ ' 28 ms' │ ' 14 ms' │ ' 2.00 x' │ │ Object_Constrained │ 1000000 │ ' 653 ms' │ ' 46 ms' │ ' 37 ms' │ ' 1.24 x' │ │ Object_Vector3 │ 1000000 │ ' 201 ms' │ ' 22 ms' │ ' 12 ms' │ ' 1.83 x' │ │ Object_Box3D │ 1000000 │ ' 961 ms' │ ' 37 ms' │ ' 19 ms' │ ' 1.95 x' │ │ Object_Recursive │ 1000000 │ ' 3715 ms' │ ' 363 ms' │ ' 174 ms' │ ' 2.09 x' │ │ Tuple_Primitive │ 1000000 │ ' 107 ms' │ ' 23 ms' │ ' 11 ms' │ ' 2.09 x' │ │ Tuple_Object │ 1000000 │ ' 375 ms' │ ' 28 ms' │ ' 15 ms' │ ' 1.87 x' │ │ Composite_Intersect │ 1000000 │ ' 377 ms' │ ' 22 ms' │ ' 12 ms' │ ' 1.83 x' │ │ Composite_Union │ 1000000 │ ' 337 ms' │ ' 30 ms' │ ' 17 ms' │ ' 1.76 x' │ │ Math_Vector4 │ 1000000 │ ' 137 ms' │ ' 23 ms' │ ' 11 ms' │ ' 2.09 x' │ │ Math_Matrix4 │ 1000000 │ ' 576 ms' │ ' 37 ms' │ ' 28 ms' │ ' 1.32 x' │ │ Array_Primitive_Number │ 1000000 │ ' 145 ms' │ ' 23 ms' │ ' 12 ms' │ ' 1.92 x' │ │ Array_Primitive_String │ 1000000 │ ' 152 ms' │ ' 22 ms' │ ' 13 ms' │ ' 1.69 x' │ │ Array_Primitive_Boolean │ 1000000 │ ' 131 ms' │ ' 20 ms' │ ' 13 ms' │ ' 1.54 x' │ │ Array_Object_Unconstrained │ 1000000 │ ' 2821 ms' │ ' 62 ms' │ ' 45 ms' │ ' 1.38 x' │ │ Array_Object_Constrained │ 1000000 │ ' 2958 ms' │ ' 119 ms' │ ' 134 ms' │ ' 0.89 x' │ │ Array_Object_Recursive │ 1000000 │ ' 14695 ms' │ ' 1621 ms' │ ' 635 ms' │ ' 2.55 x' │ │ Array_Tuple_Primitive │ 1000000 │ ' 478 ms' │ ' 35 ms' │ ' 28 ms' │ ' 1.25 x' │ │ Array_Tuple_Object │ 1000000 │ ' 1623 ms' │ ' 63 ms' │ ' 48 ms' │ ' 1.31 x' │ │ Array_Composite_Intersect │ 1000000 │ ' 1582 ms' │ ' 43 ms' │ ' 30 ms' │ ' 1.43 x' │ │ Array_Composite_Union │ 1000000 │ ' 1331 ms' │ ' 76 ms' │ ' 40 ms' │ ' 1.90 x' │ │ Array_Math_Vector4 │ 1000000 │ ' 564 ms' │ ' 38 ms' │ ' 24 ms' │ ' 1.58 x' │ │ Array_Math_Matrix4 │ 1000000 │ ' 2382 ms' │ ' 111 ms' │ ' 83 ms' │ ' 1.34 x' │ └────────────────────────────┴────────────┴──────────────┴──────────────┴──────────────┴──────────────┘ ``` <a name='benchmark-compression'></a> ### Compression The following table lists esbuild compiled and minified sizes for each TypeBox module. ```typescript ┌──────────────────────┬────────────┬────────────┬─────────────┐ │ (index) │ Compiled │ Minified │ Compression │ ├──────────────────────┼────────────┼────────────┼─────────────┤ │ typebox/compiler │ '119.8 kb' │ ' 52.6 kb' │ '2.28 x' │ │ typebox/errors │ ' 74.4 kb' │ ' 33.1 kb' │ '2.25 x' │ │ typebox/parse │ '115.3 kb' │ ' 48.3 kb' │ '2.39 x' │ │ typebox/system │ ' 7.4 kb' │ ' 3.2 kb' │ '2.33 x' │ │ typebox/value │ '157.2 kb' │ ' 66.1 kb' │ '2.38 x' │ │ typebox │ '127.3 kb' │ ' 53.3 kb' │ '2.39 x' │ └──────────────────────┴────────────┴────────────┴─────────────┘ ``` <a name='contribute'></a> ## Contribute TypeBox is open to community contribution. Please ensure you submit an open issue before submitting your pull request. The TypeBox project prefers open community discussion before accepting new features.
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@sinclair/typebox/readme.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@sinclair/typebox/readme.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 106210 }
<p> <a href="https://tailwindcss.com/docs/typography-plugin" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss-typography/HEAD/.github/logo-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss-typography/HEAD/.github/logo-light.svg"> <img alt="Tailwind CSS Typography" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss-typography/HEAD/.github/logo-light.svg" width="450" height="70" style="max-width: 100%;"> </picture> </a> </p> The official Tailwind CSS Typography plugin provides a set of `prose` classes you can use to add beautiful typographic defaults to any vanilla HTML you don’t control, like HTML rendered from Markdown, or pulled from a CMS. ```html <article class="prose lg:prose-xl">{{ markdown }}</article> ``` To see what it looks like in action, check out our [live demo](https://play.tailwindcss.com/uj1vGACRJA?layout=preview) on Tailwind Play. --- ## Installation Install the plugin from npm: ```shell npm install -D @tailwindcss/typography ``` Then add the plugin to your `tailwind.config.js` file: ```js /** @type {import('tailwindcss').Config} */ module.exports = { theme: { // ... }, plugins: [ require('@tailwindcss/typography'), // ... ], } ``` --- ## Basic usage Now you can use the `prose` classes to add sensible typography styles to any vanilla HTML: ```html <article class="prose lg:prose-xl"> <h1>Garlic bread with cheese: What the science tells us</h1> <p> For years parents have espoused the health benefits of eating garlic bread with cheese to their children, with the food earning such an iconic status in our culture that kids will often dress up as warm, cheesy loaf for Halloween. </p> <p> But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases springing up around the country. </p> <!-- ... --> </article> ``` ### Choosing a gray scale This plugin includes a modifier class for each of the five gray scales Tailwind includes by default so you can easily style your content to match the grays you're using in your project. ```html <article class="prose prose-slate">{{ markdown }}</article> ``` Here are the classes that are generated using a totally default Tailwind CSS v2.0 build: | Class | Gray scale | | ------------------------ | ---------- | | `prose-gray` _(default)_ | Gray | | `prose-slate` | Slate | | `prose-zinc` | Zinc | | `prose-neutral` | Neutral | | `prose-stone` | Stone | Modifier classes are designed to be used with the [multi-class modifier pattern](http://nicolasgallagher.com/about-html-semantics-front-end-architecture/#component-modifiers) and must be used in conjunction with the base `prose` class. > [!NOTE] > Always include the `prose` class when adding a gray scale modifier ```html <article class="prose prose-stone">{{ markdown }}</article> ``` To learn about creating your own color themes, read the [adding custom color themes](#adding-custom-color-themes) documentation. ### Applying a type scale Size modifiers allow you to adjust the overall size of your typography for different contexts. ```html <article class="prose prose-xl">{{ markdown }}</article> ``` Five different typography sizes are included out of the box: | Class | Body font size | | ------------------------ | ----------------- | | `prose-sm` | 0.875rem _(14px)_ | | `prose-base` _(default)_ | 1rem _(16px)_ | | `prose-lg` | 1.125rem _(18px)_ | | `prose-xl` | 1.25rem _(20px)_ | | `prose-2xl` | 1.5rem _(24px)_ | These can be used in combination with Tailwind's [breakpoint modifiers](https://tailwindcss.com/docs/responsive-design) to change the overall font size of a piece of content at different viewport sizes: ```html <article class="prose md:prose-lg lg:prose-xl">{{ markdown }}</article> ``` Everything about the provided size modifiers has been hand-tuned by professional designers to look as beautiful as possible, including the relationships between font sizes, heading spacing, code block padding, and more. Size modifiers are designed to be used with the [multi-class modifier pattern](http://nicolasgallagher.com/about-html-semantics-front-end-architecture/#component-modifiers) and must be used in conjunction with the base `prose` class. > [!NOTE] > Always include the `prose` class when adding a size modifier ```html <article class="prose prose-lg">{{ markdown }}</article> ``` To learn about customizing the included type scales, read the documentation on [customizing the CSS](#customizing-the-css). ### Adapting to dark mode Each default color theme includes a hand-designed dark mode version that you can trigger by adding the `prose-invert` class: ```html <article class="prose dark:prose-invert">{{ markdown }}</article> ``` To learn about creating your own color themes, read the [adding custom color themes](#adding-custom-color-themes) documentation. ### Element modifiers Use element modifiers to customize the style of individual elements in your content directly in your HTML: ```html <article class="prose prose-img:rounded-xl prose-headings:underline prose-a:text-blue-600"> {{ markdown }} </article> ``` This makes it easy to do things like style links to match your brand, add a border radius to images, and tons more. Here's a complete list of available element modifiers: | Modifier | Target | | ---------------------------- | ---------------------------- | | `prose-headings:{utility}` | `h1`, `h2`, `h3`, `h4`, `th` | | `prose-lead:{utility}` | `[class~="lead"]` | | `prose-h1:{utility}` | `h1` | | `prose-h2:{utility}` | `h2` | | `prose-h3:{utility}` | `h3` | | `prose-h4:{utility}` | `h4` | | `prose-p:{utility}` | `p` | | `prose-a:{utility}` | `a` | | `prose-blockquote:{utility}` | `blockquote` | | `prose-figure:{utility}` | `figure` | | `prose-figcaption:{utility}` | `figcaption` | | `prose-strong:{utility}` | `strong` | | `prose-em:{utility}` | `em` | | `prose-kbd:{utility}` | `kbd` | | `prose-code:{utility}` | `code` | | `prose-pre:{utility}` | `pre` | | `prose-ol:{utility}` | `ol` | | `prose-ul:{utility}` | `ul` | | `prose-li:{utility}` | `li` | | `prose-table:{utility}` | `table` | | `prose-thead:{utility}` | `thead` | | `prose-tr:{utility}` | `tr` | | `prose-th:{utility}` | `th` | | `prose-td:{utility}` | `td` | | `prose-img:{utility}` | `img` | | `prose-video:{utility}` | `video` | | `prose-hr:{utility}` | `hr` | When stacking these modifiers with other modifiers like `hover`, you most likely want the other modifier to come first: ```html <article class="prose prose-a:text-blue-600 hover:prose-a:text-blue-500">{{ markdown }}</article> ``` Read the Tailwind CSS documentation on [ordering stacked modifiers](https://tailwindcss.com/docs/hover-focus-and-other-states#ordering-stacked-modifiers) to learn more. ### Overriding max-width Each size modifier comes with a baked in `max-width` designed to keep the content as readable as possible. This isn't always what you want though, and sometimes you'll want the content to just fill the width of its container. In those cases, all you need to do is add `max-w-none` to your content to override the embedded max-width: ```html <div class="grid grid-cols-4"> <div class="col-span-1"> <!-- ... --> </div> <div class="col-span-3"> <article class="prose max-w-none">{{ markdown }}</article> </div> </div> ``` --- ## Advanced topics ### Undoing typography styles If you have a block of markup embedded in some content that shouldn't inherit the `prose` styles, use the `not-prose` class to sandbox it: ```html <article class="prose"> <h1>My Heading</h1> <p>...</p> <div class="not-prose"> <!-- Some example or demo that needs to be prose-free --> </div> <p>...</p> <!-- ... --> </article> ``` Note that you can't nest new `prose` instances within a `not-prose` block at this time. ### Adding custom color themes You can create your own color theme by adding a new key in the `typography` section of your `tailwind.config.js` file and providing your colors under the `css` key: ```js {{ filename: 'tailwind.config.js' }} /** @type {import('tailwindcss').Config} */ module.exports = { theme: { extend: { typography: ({ theme }) => ({ pink: { css: { '--tw-prose-body': theme('colors.pink[800]'), '--tw-prose-headings': theme('colors.pink[900]'), '--tw-prose-lead': theme('colors.pink[700]'), '--tw-prose-links': theme('colors.pink[900]'), '--tw-prose-bold': theme('colors.pink[900]'), '--tw-prose-counters': theme('colors.pink[600]'), '--tw-prose-bullets': theme('colors.pink[400]'), '--tw-prose-hr': theme('colors.pink[300]'), '--tw-prose-quotes': theme('colors.pink[900]'), '--tw-prose-quote-borders': theme('colors.pink[300]'), '--tw-prose-captions': theme('colors.pink[700]'), '--tw-prose-code': theme('colors.pink[900]'), '--tw-prose-pre-code': theme('colors.pink[100]'), '--tw-prose-pre-bg': theme('colors.pink[900]'), '--tw-prose-th-borders': theme('colors.pink[300]'), '--tw-prose-td-borders': theme('colors.pink[200]'), '--tw-prose-invert-body': theme('colors.pink[200]'), '--tw-prose-invert-headings': theme('colors.white'), '--tw-prose-invert-lead': theme('colors.pink[300]'), '--tw-prose-invert-links': theme('colors.white'), '--tw-prose-invert-bold': theme('colors.white'), '--tw-prose-invert-counters': theme('colors.pink[400]'), '--tw-prose-invert-bullets': theme('colors.pink[600]'), '--tw-prose-invert-hr': theme('colors.pink[700]'), '--tw-prose-invert-quotes': theme('colors.pink[100]'), '--tw-prose-invert-quote-borders': theme('colors.pink[700]'), '--tw-prose-invert-captions': theme('colors.pink[400]'), '--tw-prose-invert-code': theme('colors.white'), '--tw-prose-invert-pre-code': theme('colors.pink[300]'), '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)', '--tw-prose-invert-th-borders': theme('colors.pink[600]'), '--tw-prose-invert-td-borders': theme('colors.pink[700]'), }, }, }), }, }, plugins: [ require('@tailwindcss/typography'), // ... ], } ``` See our internal [style definitions](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/src/styles.js) for some more examples. ### Changing the default class name If you need to use a class name other than `prose` for any reason, you can do so using the `className` option when registering the plugin: ```js {{ filename: 'tailwind.config.js' }} /** @type {import('tailwindcss').Config} */ module.exports = { theme: { // ... }, plugins: [ require('@tailwindcss/typography')({ className: 'wysiwyg', }), ] ... } ``` Now every instance of `prose` in the default class names will be replaced by your custom class name: ```html <article class="wysiwyg wysiwyg-slate lg:wysiwyg-xl"> <h1>My Heading</h1> <p>...</p> <div class="not-wysiwyg"> <!-- Some example or demo that needs to be prose-free --> </div> <p>...</p> <!-- ... --> </article> ``` ### Customizing the CSS If you want to customize the raw CSS generated by this plugin, add your overrides under the `typography` key in the `theme` section of your `tailwind.config.js` file: ```js {{ filename: 'tailwind.config.js' }} /** @type {import('tailwindcss').Config} */ module.exports = { theme: { extend: { typography: { DEFAULT: { css: { color: '#333', a: { color: '#3182ce', '&:hover': { color: '#2c5282', }, }, }, }, }, }, }, plugins: [ require('@tailwindcss/typography'), // ... ], } ``` Like with all theme customizations in Tailwind, you can also define the `typography` key as a function if you need access to the `theme` helper: ```js {{ filename: 'tailwind.config.js' }} /** @type {import('tailwindcss').Config} */ module.exports = { theme: { extend: { typography: (theme) => ({ DEFAULT: { css: { color: theme('colors.gray.800'), // ... }, }, }), }, }, plugins: [ require('@tailwindcss/typography'), // ... ], } ``` Customizations should be applied to a specific modifier like `DEFAULT` or `xl`, and must be added under the `css` property. Customizations are authored in the same [CSS-in-JS syntax](https://tailwindcss.com/docs/plugins#css-in-js-syntax) used to write Tailwind plugins. See [the default styles](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/src/styles.js) for this plugin for more in-depth examples of configuring each modifier. --- ## Community For help, discussion about best practices, or any other conversation that would benefit from being searchable: [Discuss the Tailwind CSS Typography plugin on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions) For casual chit-chat with others using the framework: [Join the Tailwind CSS Discord Server](https://tailwindcss.com/discord)
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@tailwindcss/typography/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@tailwindcss/typography/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 14459 }
<img src="https://static.scarf.sh/a.png?x-pxid=be2d8a11-9712-4c1d-9963-580b2d4fb133" /> ![TanStack Query Header](https://github.com/TanStack/query/raw/main/media/repo-header.png) Hooks for fetching, caching and updating asynchronous data in React <a href="https://twitter.com/intent/tweet?button_hashtag=TanStack" target="\_parent"> <img alt="#TanStack" src="https://img.shields.io/twitter/url?color=%2308a0e9&label=%23TanStack&style=social&url=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DTanStack"> </a><a href="https://discord.com/invite/WrRKjPJ" target="\_parent"> <img alt="" src="https://img.shields.io/badge/Discord-TanStack-%235865F2" /> </a><a href="https://github.com/TanStack/query/actions?query=workflow%3A%22react-query+tests%22"> <img src="https://github.com/TanStack/query/workflows/react-query%20tests/badge.svg" /> </a><a href="https://www.npmjs.com/package/@tanstack/query-core" target="\_parent"> <img alt="" src="https://img.shields.io/npm/dm/@tanstack/query-core.svg" /> </a><a href="https://bundlejs.com/?q=%40tanstack%2Freact-query&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&badge=" target="\_parent"> <img alt="" src="https://deno.bundlejs.com/?q=@tanstack/react-query&config={%22esbuild%22:{%22external%22:[%22react%22,%22react-dom%22]}}&badge=detailed" /> </a><a href="#badge"> <img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg"> </a><a href="https://github.com/TanStack/query/discussions"> <img alt="Join the discussion on Github" src="https://img.shields.io/badge/Github%20Discussions%20%26%20Support-Chat%20now!-blue" /> </a><a href="https://bestofjs.org/projects/tanstack-query"><img alt="Best of JS" src="https://img.shields.io/endpoint?url=https://bestofjs-serverless.now.sh/api/project-badge?fullName=TanStack%2Fquery%26since=daily" /></a><a href="https://github.com/TanStack/query/" target="\_parent"> <img alt="" src="https://img.shields.io/github/stars/TanStack/query.svg?style=social&label=Star" /> </a><a href="https://twitter.com/tannerlinsley" target="\_parent"> <img alt="" src="https://img.shields.io/twitter/follow/tannerlinsley.svg?style=social&label=Follow" /> </a> <a href="https://gitpod.io/from-referrer/"> <img src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod" alt="Gitpod Ready-to-Code"/> </a> Enjoy this library? Try the entire [TanStack](https://tanstack.com)! [TanStack Table](https://github.com/TanStack/table), [TanStack Router](https://github.com/tanstack/router), [TanStack Virtual](https://github.com/tanstack/virtual), [React Charts](https://github.com/TanStack/react-charts), [React Ranger](https://github.com/TanStack/ranger) ## Visit [tanstack.com/query](https://tanstack.com/query) for docs, guides, API and more! ## Quick Features - Transport/protocol/backend agnostic data fetching (REST, GraphQL, promises, whatever!) - Auto Caching + Refetching (stale-while-revalidate, Window Refocus, Polling/Realtime) - Parallel + Dependent Queries - Mutations + Reactive Query Refetching - Multi-layer Cache + Automatic Garbage Collection - Paginated + Cursor-based Queries - Load-More + Infinite Scroll Queries w/ Scroll Recovery - Request Cancellation - [React Suspense](https://react.dev/reference/react/Suspense) + Fetch-As-You-Render Query Prefetching - Dedicated Devtools ### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/) <!-- Use the force, Luke -->
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@tanstack/react-query/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@tanstack/react-query/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 3518 }
# Installation > `npm install --save @types/babel__core` # Summary This package contains type definitions for @babel/core (https://github.com/babel/babel/tree/master/packages/babel-core). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core. ### Additional Details * Last updated: Mon, 20 Nov 2023 23:36:23 GMT * Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types), [@types/babel__generator](https://npmjs.com/package/@types/babel__generator), [@types/babel__template](https://npmjs.com/package/@types/babel__template), [@types/babel__traverse](https://npmjs.com/package/@types/babel__traverse) # Credits These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), [Jessica Franco](https://github.com/Jessidhia), and [Ifiok Jr.](https://github.com/ifiokjr).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/babel__core/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/babel__core/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 1029 }
# Installation > `npm install --save @types/babel__generator` # Summary This package contains type definitions for @babel/generator (https://github.com/babel/babel/tree/master/packages/babel-generator). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator. ### Additional Details * Last updated: Sat, 16 Dec 2023 09:06:45 GMT * Dependencies: [@babel/types](https://npmjs.com/package/@babel/types) # Credits These definitions were written by [Troy Gerwien](https://github.com/yortus), [Melvin Groenhoff](https://github.com/mgroenhoff), [Cameron Yan](https://github.com/khell), and [Lyanbin](https://github.com/Lyanbin).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/babel__generator/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/babel__generator/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 692 }
# Installation > `npm install --save @types/babel__template` # Summary This package contains type definitions for @babel/template (https://github.com/babel/babel/tree/master/packages/babel-template). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__template. ### Additional Details * Last updated: Mon, 06 Nov 2023 22:41:04 GMT * Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types) # Credits These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), and [ExE Boss](https://github.com/ExE-Boss).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/babel__template/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/babel__template/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 767 }
# Installation > `npm install --save @types/babel__traverse` # Summary This package contains type definitions for @babel/traverse (https://github.com/babel/babel/tree/main/packages/babel-traverse). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse. ### Additional Details * Last updated: Tue, 21 May 2024 21:07:11 GMT * Dependencies: [@babel/types](https://npmjs.com/package/@babel/types) # Credits These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Ryan Petrich](https://github.com/rpetrich), [Melvin Groenhoff](https://github.com/mgroenhoff), [Dean L.](https://github.com/dlgrit), [Ifiok Jr.](https://github.com/ifiokjr), [ExE Boss](https://github.com/ExE-Boss), and [Daniel Tschinder](https://github.com/danez).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/babel__traverse/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/babel__traverse/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 877 }
# Installation > `npm install --save @types/body-parser` # Summary This package contains type definitions for body-parser (https://github.com/expressjs/body-parser). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser. ### Additional Details * Last updated: Mon, 06 Nov 2023 22:41:05 GMT * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Łaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/body-parser/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/body-parser/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 864 }
# Installation > `npm install --save @types/connect` # Summary This package contains type definitions for connect (https://github.com/senchalabs/connect). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect. ### Additional Details * Last updated: Mon, 06 Nov 2023 22:41:05 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), and [Evan Hahn](https://github.com/EvanHahn).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/connect/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/connect/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 546 }
# Installation > `npm install --save @types/d3-array` # Summary This package contains type definitions for d3-array (https://github.com/d3/d3-array). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: none # Credits These definitions were written by [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [Tom Wanzek](https://github.com/tomwanzek), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-array/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-array/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 722 }
# Installation > `npm install --save @types/d3-color` # Summary This package contains type definitions for d3-color (https://github.com/d3/d3-color/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-color. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: none # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-color/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-color/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 723 }
# Installation > `npm install --save @types/d3-ease` # Summary This package contains type definitions for d3-ease (https://github.com/d3/d3-ease/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-ease. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: none # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-ease/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-ease/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 596 }
# Installation > `npm install --save @types/d3-interpolate` # Summary This package contains type definitions for d3-interpolate (https://github.com/d3/d3-interpolate/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-interpolate. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:37 GMT * Dependencies: [@types/d3-color](https://npmjs.com/package/@types/d3-color) # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-interpolate/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-interpolate/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 723 }
# Installation > `npm install --save @types/d3-path` # Summary This package contains type definitions for d3-path (https://github.com/d3/d3-path/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-path. ### Additional Details * Last updated: Wed, 07 Feb 2024 18:07:36 GMT * Dependencies: none # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-path/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-path/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 596 }
# Installation > `npm install --save @types/d3-scale` # Summary This package contains type definitions for d3-scale (https://github.com/d3/d3-scale/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-scale. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:37 GMT * Dependencies: [@types/d3-time](https://npmjs.com/package/@types/d3-time) # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [rulonder](https://github.com/rulonder), and [Nathan Bierema](https://github.com/Methuselah96).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-scale/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-scale/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 738 }
# Installation > `npm install --save @types/d3-shape` # Summary This package contains type definitions for d3-shape (https://github.com/d3/d3-shape/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-shape. ### Additional Details * Last updated: Mon, 20 Nov 2023 23:36:24 GMT * Dependencies: [@types/d3-path](https://npmjs.com/package/@types/d3-path) # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-shape/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-shape/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 728 }
# Installation > `npm install --save @types/d3-time` # Summary This package contains type definitions for d3-time (https://github.com/d3/d3-time/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-time. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:37 GMT * Dependencies: none # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-time/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-time/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 639 }
# Installation > `npm install --save @types/d3-timer` # Summary This package contains type definitions for d3-timer (https://github.com/d3/d3-timer/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-timer. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:37 GMT * Dependencies: none # Credits These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/d3-timer/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/d3-timer/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 643 }
# Installation > `npm install --save @types/estree` # Summary This package contains type definitions for estree (https://github.com/estree/estree). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. ### Additional Details * Last updated: Wed, 18 Sep 2024 09:37:00 GMT * Dependencies: none # Credits These definitions were written by [RReverser](https://github.com/RReverser).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/estree/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/estree/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 442 }
# Installation > `npm install --save @types/express-serve-static-core` # Summary This package contains type definitions for express-serve-static-core (http://expressjs.com). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core/v4. ### Additional Details * Last updated: Wed, 25 Sep 2024 19:19:36 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/send](https://npmjs.com/package/@types/send) # Credits These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Satana Charuwichitratana](https://github.com/micksatana), [Jose Luis Leon](https://github.com/JoseLion), [David Stephens](https://github.com/dwrss), and [Shin Ando](https://github.com/andoshin11).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/express-serve-static-core/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/express-serve-static-core/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 915 }
# Installation > `npm install --save @types/express-session` # Summary This package contains type definitions for express-session (https://github.com/expressjs/session). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-session. ### Additional Details * Last updated: Mon, 26 Feb 2024 20:07:44 GMT * Dependencies: [@types/express](https://npmjs.com/package/@types/express) # Credits These definitions were written by [Hiroki Horiuchi](https://github.com/horiuchi), [Jacob Bogers](https://github.com/jacobbogers), [Naoto Yokoyama](https://github.com/builtinnya), [Ryan Cannon](https://github.com/ry7n), [Tom Spencer](https://github.com/fiznool), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Ravi van Rooijen](https://github.com/HoldYourWaffle).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/express-session/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/express-session/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 829 }
# Installation > `npm install --save @types/express` # Summary This package contains type definitions for express (http://expressjs.com). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express. ### Additional Details * Last updated: Tue, 07 Nov 2023 03:09:36 GMT * Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/qs](https://npmjs.com/package/@types/qs), [@types/serve-static](https://npmjs.com/package/@types/serve-static) # Credits These definitions were written by [Boris Yankov](https://github.com/borisyankov), [China Medical University Hospital](https://github.com/CMUH), [Puneet Arora](https://github.com/puneetar), and [Dylan Frankland](https://github.com/dfrankland).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/express/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/express/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 877 }
# Installation > `npm install --save @types/http-errors` # Summary This package contains type definitions for http-errors (https://github.com/jshttp/http-errors). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors. ### Additional Details * Last updated: Tue, 07 Nov 2023 03:09:37 GMT * Dependencies: none # Credits These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), and [BendingBender](https://github.com/BendingBender).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/http-errors/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/http-errors/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 521 }
# Installation > `npm install --save @types/mime` # Summary This package contains type definitions for mime (https://github.com/broofa/node-mime). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1. ### Additional Details * Last updated: Tue, 07 Nov 2023 20:08:00 GMT * Dependencies: none # Credits These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/mime/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/mime/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 495 }
# Installation > `npm install --save @types/node` # Summary This package contains type definitions for node (https://nodejs.org/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20. ### Additional Details * Last updated: Mon, 07 Oct 2024 22:07:58 GMT * Dependencies: [undici-types](https://npmjs.com/package/undici-types) # Credits These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/node/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/node/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 2274 }
# Installation > `npm install --save @types/passport-local` # Summary This package contains type definitions for passport-local (https://github.com/jaredhanson/passport-local). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-local. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-local/index.d.ts) ````ts /// <reference types="passport"/> import { Strategy as PassportStrategy } from "passport-strategy"; import express = require("express"); interface IStrategyOptions { usernameField?: string | undefined; passwordField?: string | undefined; session?: boolean | undefined; passReqToCallback?: false | undefined; } interface IStrategyOptionsWithRequest { usernameField?: string | undefined; passwordField?: string | undefined; session?: boolean | undefined; passReqToCallback: true; } interface IVerifyOptions { message: string; } interface VerifyFunctionWithRequest { ( req: express.Request, username: string, password: string, done: (error: any, user?: Express.User | false, options?: IVerifyOptions) => void, ): void; } interface VerifyFunction { ( username: string, password: string, done: (error: any, user?: Express.User | false, options?: IVerifyOptions) => void, ): void; } declare class Strategy extends PassportStrategy { constructor(options: IStrategyOptionsWithRequest, verify: VerifyFunctionWithRequest); constructor(options: IStrategyOptions, verify: VerifyFunction); constructor(verify: VerifyFunction); name: string; } ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 09:09:39 GMT * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/passport](https://npmjs.com/package/@types/passport), [@types/passport-strategy](https://npmjs.com/package/@types/passport-strategy) # Credits These definitions were written by [Maxime LUCE](https://github.com/SomaticIT).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/passport-local/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/passport-local/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 2064 }
# Installation > `npm install --save @types/passport-strategy` # Summary This package contains type definitions for passport-strategy (https://github.com/jaredhanson/passport-strategy). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-strategy. ### Additional Details * Last updated: Tue, 07 Nov 2023 09:09:39 GMT * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/passport](https://npmjs.com/package/@types/passport) # Credits These definitions were written by [Lior Mualem](https://github.com/liorm).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/passport-strategy/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/passport-strategy/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 605 }
# Installation > `npm install --save @types/passport` # Summary This package contains type definitions for passport (http://passportjs.org). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport. ### Additional Details * Last updated: Mon, 28 Oct 2024 20:34:09 GMT * Dependencies: [@types/express](https://npmjs.com/package/@types/express) # Credits These definitions were written by [Horiuchi_H](https://github.com/horiuchi), [Eric Naeseth](https://github.com/enaeseth), [Igor Belagorudsky](https://github.com/theigor), [Tomek Łaziuk](https://github.com/tlaziuk), [Daniel Perez Alvarez](https://github.com/unindented), [Kevin Stiehl](https://github.com/kstiehl), and [Oleg Vaskevich](https://github.com/vaskevich).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/passport/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/passport/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 780 }
# Installation > `npm install --save @types/pg` # Summary This package contains type definitions for pg (https://github.com/brianc/node-postgres). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg. ### Additional Details * Last updated: Sat, 04 May 2024 09:35:34 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [pg-protocol](https://npmjs.com/package/pg-protocol), [pg-types](https://npmjs.com/package/pg-types) # Credits These definitions were written by [Phips Peter](https://github.com/pspeter3), and [Ravi van Rooijen](https://github.com/HoldYourWaffle).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/pg/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/pg/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 647 }
# Installation > `npm install --save @types/prop-types` # Summary This package contains type definitions for prop-types (https://github.com/facebook/prop-types). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types. ### Additional Details * Last updated: Mon, 16 Sep 2024 19:07:13 GMT * Dependencies: none # Credits These definitions were written by [DovydasNavickas](https://github.com/DovydasNavickas), [Ferdy Budhidharma](https://github.com/ferdaber), and [Sebastian Silbermann](https://github.com/eps1lon).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/prop-types/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/prop-types/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 578 }
# Installation > `npm install --save @types/qs` # Summary This package contains type definitions for qs (https://github.com/ljharb/qs). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qs. ### Additional Details * Last updated: Sat, 14 Sep 2024 02:47:27 GMT * Dependencies: none # Credits These definitions were written by [Roman Korneev](https://github.com/RWander), [Leon Yu](https://github.com/leonyu), [Belinda Teh](https://github.com/tehbelinda), [Melvin Lee](https://github.com/zyml), [Arturs Vonda](https://github.com/artursvonda), [Carlos Bonetti](https://github.com/CarlosBonetti), [Dan Smith](https://github.com/dpsmith3), [Hunter Perrin](https://github.com/hperrin), and [Jordan Harband](https://github.com/ljharb).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/qs/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/qs/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 787 }
# Installation > `npm install --save @types/range-parser` # Summary This package contains type definitions for range-parser (https://github.com/jshttp/range-parser). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser/index.d.ts) ````ts /** * When ranges are returned, the array has a "type" property which is the type of * range that is required (most commonly, "bytes"). Each array element is an object * with a "start" and "end" property for the portion of the range. * * @returns `-1` when unsatisfiable and `-2` when syntactically invalid, ranges otherwise. */ declare function RangeParser( size: number, str: string, options?: RangeParser.Options, ): RangeParser.Result | RangeParser.Ranges; declare namespace RangeParser { interface Ranges extends Array<Range> { type: string; } interface Range { start: number; end: number; } interface Options { /** * The "combine" option can be set to `true` and overlapping & adjacent ranges * will be combined into a single range. */ combine?: boolean | undefined; } type ResultUnsatisfiable = -1; type ResultInvalid = -2; type Result = ResultUnsatisfiable | ResultInvalid; } export = RangeParser; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 09:09:39 GMT * Dependencies: none # Credits These definitions were written by [Tomek Łaziuk](https://github.com/tlaziuk).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/range-parser/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/range-parser/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 1619 }
# Installation > `npm install --save @types/react-dom` # Summary This package contains type definitions for react-dom (https://reactjs.org). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom. ### Additional Details * Last updated: Fri, 11 Oct 2024 14:37:45 GMT * Dependencies: [@types/react](https://npmjs.com/package/@types/react) # Credits These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/react-dom/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/react-dom/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 764 }
# Installation > `npm install --save @types/react` # Summary This package contains type definitions for react (https://react.dev/). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react. ### Additional Details * Last updated: Wed, 23 Oct 2024 03:36:41 GMT * Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [csstype](https://npmjs.com/package/csstype) # Credits These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/react/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/react/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 1798 }
# Installation > `npm install --save @types/send` # Summary This package contains type definitions for send (https://github.com/pillarjs/send). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/send. ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: [@types/mime](https://npmjs.com/package/@types/mime), [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Mike Jerred](https://github.com/MikeJerred), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/send/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/send/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 603 }
# Installation > `npm install --save @types/serve-static` # Summary This package contains type definitions for serve-static (https://github.com/expressjs/serve-static). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-static. ### Additional Details * Last updated: Wed, 03 Apr 2024 06:07:52 GMT * Dependencies: [@types/http-errors](https://npmjs.com/package/@types/http-errors), [@types/node](https://npmjs.com/package/@types/node), [@types/send](https://npmjs.com/package/@types/send) # Credits These definitions were written by [Uros Smolnik](https://github.com/urossmolnik), [Linus Unnebäck](https://github.com/LinusU), and [Devansh Jethmalani](https://github.com/devanshj).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/serve-static/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/serve-static/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 744 }
# Installation > `npm install --save @types/ws` # Summary This package contains type definitions for ws (https://github.com/websockets/ws). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws. ### Additional Details * Last updated: Sat, 02 Nov 2024 09:02:36 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@types/ws/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@types/ws/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 794 }
# @vitejs/plugin-react [![npm](https://img.shields.io/npm/v/@vitejs/plugin-react.svg)](https://npmjs.com/package/@vitejs/plugin-react) The default Vite plugin for React projects. - enable [Fast Refresh](https://www.npmjs.com/package/react-refresh) in development (requires react >= 16.9) - use the [automatic JSX runtime](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) - use custom Babel plugins/presets - small installation size ```js // vite.config.js import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], }) ``` ## Options ### include/exclude Includes `.js`, `.jsx`, `.ts` & `.tsx` by default. This option can be used to add fast refresh to `.mdx` files: ```js import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import mdx from '@mdx-js/rollup' export default defineConfig({ plugins: [ { enforce: 'pre', ...mdx() }, react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }), ], }) ``` > `node_modules` are never processed by this plugin (but esbuild will) ### jsxImportSource Control where the JSX factory is imported from. Default to `'react'` ```js react({ jsxImportSource: '@emotion/react' }) ``` ### jsxRuntime By default, the plugin uses the [automatic JSX runtime](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html). However, if you encounter any issues, you may opt out using the `jsxRuntime` option. ```js react({ jsxRuntime: 'classic' }) ``` ### babel The `babel` option lets you add plugins, presets, and [other configuration](https://babeljs.io/docs/en/options) to the Babel transformation performed on each included file. ```js react({ babel: { presets: [...], // Your plugins run before any built-in transform (eg: Fast Refresh) plugins: [...], // Use .babelrc files babelrc: true, // Use babel.config.js files configFile: true, } }) ``` Note: When not using plugins, only esbuild is used for production builds, resulting in faster builds. #### Proposed syntax If you are using ES syntax that are still in proposal status (e.g. class properties), you can selectively enable them with the `babel.parserOpts.plugins` option: ```js react({ babel: { parserOpts: { plugins: ['decorators-legacy'], }, }, }) ``` This option does not enable _code transformation_. That is handled by esbuild. **Note:** TypeScript syntax is handled automatically. Here's the [complete list of Babel parser plugins](https://babeljs.io/docs/en/babel-parser#ecmascript-proposalshttpsgithubcombabelproposals). ## Middleware mode In [middleware mode](https://vitejs.dev/config/server-options.html#server-middlewaremode), you should make sure your entry `index.html` file is transformed by Vite. Here's an example for an Express server: ```js app.get('/', async (req, res, next) => { try { let html = fs.readFileSync(path.resolve(root, 'index.html'), 'utf-8') // Transform HTML using Vite plugins. html = await viteServer.transformIndexHtml(req.url, html) res.send(html) } catch (e) { return next(e) } }) ``` Otherwise, you'll probably get this error: ``` Uncaught Error: @vitejs/plugin-react can't detect preamble. Something is wrong. ``` ## Consistent components exports For React refresh to work correctly, your file should only export React components. You can find a good explanation in the [Gatsby docs](https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/#how-it-works). If an incompatible change in exports is found, the module will be invalidated and HMR will propagate. To make it easier to export simple constants alongside your component, the module is only invalidated when their value changes. You can catch mistakes and get more detailed warning with this [eslint rule](https://github.com/ArnaudBarre/eslint-plugin-react-refresh).
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/@vitejs/plugin-react/README.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/@vitejs/plugin-react/README.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 3929 }
# CDN Starting with v3.6.0, the CDN versions of date-fns are available on [jsDelivr](https://www.jsdelivr.com/package/npm/date-fns) and other CDNs. They expose the date-fns functionality via the `window.dateFns` global variable. Unlike the npm package, the CDN is transpiled to be compatible with IE11, so it supports a wide variety of legacy browsers and environments. ```html <script src="https://cdn.jsdelivr.net/npm/[email protected]/cdn.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/locale/es/cdn.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/locale/ru/cdn.min.js"></script> <script> dateFns.formatRelative(dateFns.subDays(new Date(), 3), new Date()); //=> "last Friday at 7:26 p.m." dateFns.formatRelative(dateFns.subDays(new Date(), 3), new Date(), { locale: dateFns.locale.es, }); //=> "el viernes pasado a las 19:26" dateFns.formatRelative(dateFns.subDays(new Date(), 3), new Date(), { locale: dateFns.locale.ru, }); //=> "в прошлую пятницу в 19:26" </script> ``` The CDN versions are available for the main module, all & individual locales, and the FP submodule. They come in two flavors: `cdn.js` and `cdn.min.js`. The latter is minified and should be used in production. The former is useful for debugging and development. Keep in mind that using the CDN versions in production is suboptimal because they bundle all the date-fns functionality you will never use. It's much better to use the npm package and a tree-shaking-enabled bundler like webpack or Rollup. However, the CDN versions are helpful for quick prototyping, small projects, educational purposes, or working in a legacy environment. ## Main module The main module with all functions bundled: ``` https://cdn.jsdelivr.net/npm/date-fns@VERSION/cdn.js https://cdn.jsdelivr.net/npm/date-fns@VERSION/cdn.min.js ``` You can access it via the `dateFns` global variable: ```html <script src="https://cdn.jsdelivr.net/npm/[email protected]/cdn.min.js"></script> <script> dateFns.addDays(new Date(2014, 1, 11), 10); //=> Tue Feb 21 2014 00:00:00 </script> ``` ## The FP submodule The FP submodule with all functions bundled: ``` https://cdn.jsdelivr.net/npm/date-fns@VERSION/fp/cdn.js https://cdn.jsdelivr.net/npm/date-fns@VERSION/fp/cdn.min.js ``` You can access it via the `dateFns.fp` global variable: ```html <script src="https://cdn.jsdelivr.net/npm/[email protected]/fp/cdn.min.js"></script> <script> dateFns.fp.addDays(10, new Date(2014, 1, 11)); //=> Tue Feb 21 2014 00:00:00 </script> ``` ## Locales All locales bundled: ``` https://cdn.jsdelivr.net/npm/date-fns@VERSION/locale/cdn.js https://cdn.jsdelivr.net/npm/date-fns@VERSION/locale/cdn.min.js ``` You can access them via the `dateFns.locale` global variable: ```html <script src="https://cdn.jsdelivr.net/npm/[email protected]/cdn.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/locale/cdn.min.js"></script> <script> dateFns.formatRelative(dateFns.subDays(new Date(), 3), new Date(), { locale: dateFns.locale.es, }); //=> "el viernes pasado a las 19:26" </script> ``` The locales are also available as individual files. ``` https://cdn.jsdelivr.net/npm/date-fns@VERSION/locale/LOCALE/cdn.js https://cdn.jsdelivr.net/npm/date-fns@VERSION/locale/LOCALE/cdn.min.js ``` You can access them via the `dateFns.locale.LOCALE` global variable: ```html <script src="https://cdn.jsdelivr.net/npm/[email protected]/cdn.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/locale/es/cdn.min.js"></script> <script> dateFns.formatRelative(dateFns.subDays(new Date(), 3), new Date(), { locale: dateFns.locale.es, }); //=> "el viernes pasado a las 19:26" </script> ```
{ "source": "ammaarreshi/Gemini-Search", "title": "node_modules/date-fns/docs/cdn.md", "url": "https://github.com/ammaarreshi/Gemini-Search/blob/main/node_modules/date-fns/docs/cdn.md", "date": "2025-01-04T14:07:19", "stars": 1910, "description": "Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding", "file_size": 3753 }