repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
misogi/vscode-ruby-rubocop | https://github.com/misogi/vscode-ruby-rubocop/blob/c660296bb5034ea4c3d97993a44ecc5094d77e9c/test/runTest.ts | test/runTest.ts | import * as path from 'path';
import { runTests } from '@vscode/test-electron';
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to the... | typescript | MIT | c660296bb5034ea4c3d97993a44ecc5094d77e9c | 2026-01-05T05:00:31.735993Z | false |
misogi/vscode-ruby-rubocop | https://github.com/misogi/vscode-ruby-rubocop/blob/c660296bb5034ea4c3d97993a44ecc5094d77e9c/test/taskQueue.test.ts | test/taskQueue.test.ts | import { expect } from 'chai';
import { TaskQueue, Task, TaskToken } from '../src/taskQueue';
import * as vscode from 'vscode';
class TestTaskWrapper {
public readonly url: vscode.Uri;
public readonly task: Task;
public token?: TaskToken;
public isBodyCalled = false;
public isCancelCallbackCalled = false;
... | typescript | MIT | c660296bb5034ea4c3d97993a44ecc5094d77e9c | 2026-01-05T05:00:31.735993Z | false |
misogi/vscode-ruby-rubocop | https://github.com/misogi/vscode-ruby-rubocop/blob/c660296bb5034ea4c3d97993a44ecc5094d77e9c/test/configuration.test.ts | test/configuration.test.ts | import { expect } from 'chai';
import * as pq from 'proxyquire';
import * as vsStub from 'vscode';
// override vs.workspace.getConfiguration to return default values for each of the extension's
// defined configuration options, and not depend on what is configured by the user
const { getConfiguration: _getConfiguratio... | typescript | MIT | c660296bb5034ea4c3d97993a44ecc5094d77e9c | 2026-01-05T05:00:31.735993Z | false |
misogi/vscode-ruby-rubocop | https://github.com/misogi/vscode-ruby-rubocop/blob/c660296bb5034ea4c3d97993a44ecc5094d77e9c/test/extension.test.ts | test/extension.test.ts | import { expect } from 'chai';
describe('Extension Tests', () => {
describe('activation', () => {
it('should pass', () => {
expect(true).to.be.true;
});
});
});
| typescript | MIT | c660296bb5034ea4c3d97993a44ecc5094d77e9c | 2026-01-05T05:00:31.735993Z | false |
misogi/vscode-ruby-rubocop | https://github.com/misogi/vscode-ruby-rubocop/blob/c660296bb5034ea4c3d97993a44ecc5094d77e9c/test/rubocop.test.ts | test/rubocop.test.ts | import { expect } from 'chai';
import * as vscode from 'vscode';
import { Rubocop } from '../src/rubocop';
describe('Rubocop', () => {
let instance: Rubocop;
let diagnostics: vscode.DiagnosticCollection;
beforeEach(() => {
diagnostics = vscode.languages.createDiagnosticCollection();
instance = new Ruboc... | typescript | MIT | c660296bb5034ea4c3d97993a44ecc5094d77e9c | 2026-01-05T05:00:31.735993Z | false |
misogi/vscode-ruby-rubocop | https://github.com/misogi/vscode-ruby-rubocop/blob/c660296bb5034ea4c3d97993a44ecc5094d77e9c/test/suite/index.ts | test/suite/index.ts | import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
export function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: 'bdd',
color: true,
});
const testsRoot = path.resolve(__dirname, '..');
return new Promise((c, e) => {
glob(... | typescript | MIT | c660296bb5034ea4c3d97993a44ecc5094d77e9c | 2026-01-05T05:00:31.735993Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/eslint.config.ts | eslint.config.ts | import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import reactPlugin from 'eslint-plugin-react';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['.history', 'dist', 'node_modules... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/vitest.config.ts | vitest.config.ts | import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vitest/config';
const dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
test: {
reporters: '... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/vitest-unit.setup.ts | vitest-unit.setup.ts | import '@testing-library/jest-dom/vitest';
| typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/vitest-e2e.setup.ts | vitest-e2e.setup.ts | import { setProjectAnnotations } from '@storybook/react';
import { beforeAll } from 'vitest';
import * as projectAnnotations from './.storybook/preview';
// This is an important step to apply the right configuration when testing your stories.
// More info at: https://storybook.js.org/docs/api/portable-stories/portabl... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tsup.config.ts | tsup.config.ts | import { defineConfig } from 'tsup';
export default defineConfig({
tsconfig: './src/tsconfig.json',
entry: ['src/index.ts', 'src/rhf/index.ts'],
format: ['esm', 'cjs'],
dts: {
resolve: true,
entry: ['src/index.ts', 'src/rhf/index.ts'],
},
clean: true,
sourcemap: true,
external: ['react', 'react... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/vite.config.ts | vite.config.ts | import { defineConfig, type UserConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
const config: UserConfig = defineConfig({
plugins: [tsconfigPaths()],
});
export default config;
| typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/.storybook/preview.ts | .storybook/preview.ts | import type { Preview } from '@storybook/react';
const preview: Preview = {};
export default preview;
| typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/.storybook/main.ts | .storybook/main.ts | import type { StorybookConfig } from '@storybook/react-vite';
import react from '@vitejs/plugin-react';
import { mergeConfig } from 'vite';
import checker from 'vite-plugin-checker';
const config: StorybookConfig = {
stories: ['../examples/**/*.story.@(ts|tsx)', '../examples/**/*.stories.@(ts|tsx)'],
addons: ['@st... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/LensCore.ts | src/LensCore.ts | import { type Control, type FieldValues, get, set } from 'react-hook-form';
import { LensesStorage, type LensesStorageComplexKey } from './LensesStorage';
import type { Lens } from './types';
export interface LensCoreInteropBinding<T extends FieldValues> {
control: Control<T>;
name: string | undefined;
getTrans... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/useLens.ts | src/useLens.ts | import { type DependencyList, useMemo } from 'react';
import type { Control, FieldValues } from 'react-hook-form';
import { LensCore } from './LensCore';
import { LensesStorage } from './LensesStorage';
import type { Lens } from './types';
export interface UseLensProps<TFieldValues extends FieldValues = FieldValues> ... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/index.ts | src/index.ts | export * from './LensCore';
export * from './LensesStorage';
export type * from './types';
export * from './useLens';
| typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/LensesStorage.ts | src/LensesStorage.ts | import type { Control, FieldValues } from 'react-hook-form';
import type { LensCore } from './LensCore';
export type LensesStorageComplexKey = (...args: any[]) => any;
export interface LensesStorageValue<T extends FieldValues> {
plain?: LensCore<T>;
complex: WeakMap<LensesStorageComplexKey, LensCore<T>>;
}
expo... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/types/Interop.ts | src/types/Interop.ts | import type { Control, FieldValues } from 'react-hook-form';
/**
* This is a trick to allow `control` to have typed `Control<T>` type.
* Because `Lens` doesn't have prop path in its types you can't use it with `Control` as is.
*
* For example this code is not valid:
*
* ```tsx
* function Test({ control }: { con... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/types/Lens.ts | src/types/Lens.ts | import type { BrowserNativeObject, FieldValues } from 'react-hook-form';
import type { ArrayLens } from './ArrayLens';
import type { HookFormControlShim } from './Interop';
import type { ObjectLens } from './ObjectLens';
import type { PrimitiveLens } from './PrimitiveLens';
import type { Toolkit } from './toolkit';
/... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/types/PrimitiveLens.ts | src/types/PrimitiveLens.ts | import type { LensInterop } from './Interop';
import type { Lens, LensesGetter, UnwrapLens } from './Lens';
export interface PrimitiveLensGetter<T, R> {
/**
* A primitive lens restructures function.
*
* @param dictionary - Since primitive values has no key-value pairs, the dictionary is always `never`.
*... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/types/ObjectLens.ts | src/types/ObjectLens.ts | import type { Path, PathValue } from 'react-hook-form';
import type { LensInterop } from './Interop';
import type { Lens, LensesDictionary, LensesGetter, UnwrapLens } from './Lens';
export interface ObjectLensGetter<T, R> {
/**
* An object lens restructures function.
*
* @param dictionary - It is a proxy w... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/types/ArrayLens.ts | src/types/ArrayLens.ts | import type { FieldArray, FieldArrayPath, FieldArrayWithId, FieldValues, Path, PathValue } from 'react-hook-form';
import type { HookFormControlShim, LensInteropBinding, ShimKeyName } from './Interop';
import type { Lens, LensesDictionary, LensesGetter, UnwrapLens } from './Lens';
export interface ArrayLensGetter<T, ... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/types/index.ts | src/types/index.ts | export type * from './ArrayLens';
export type * from './Interop';
export type * from './Lens';
export type * from './ObjectLens';
export type * from './PrimitiveLens';
| typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/types/toolkit.ts | src/types/toolkit.ts | import type { Lens } from './Lens';
export interface Toolkit<T> {
/**
* Manual narrowing helper – lets you tell the type system what branch of the
* union you want without providing a discriminant property/value. This is
* effectively a *type-level cast* that narrows the lens type so you
* can continue c... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/rhf/index.ts | src/rhf/index.ts | export * from './useFieldArray';
| typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/src/rhf/useFieldArray.ts | src/rhf/useFieldArray.ts | import { useMemo } from 'react';
import {
type FieldArray,
type FieldArrayPath,
type FieldArrayWithId,
type FieldValues,
useFieldArray as useFieldArrayOriginal,
type UseFieldArrayProps as UseFieldArrayPropsOriginal,
type UseFieldArrayReturn,
} from 'react-hook-form';
export interface UseFieldArrayProps<
... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/array-map.test.ts | tests/array-map.test.ts | import { useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('map can create a new lens', () => {
const { result } = renderHook(() => {
const form = useForm<{ items: { a: string }... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/lens-extension.test.ts | tests/lens-extension.test.ts | import type { FieldValues } from 'react-hook-form';
import { useForm } from 'react-hook-form';
import { LensCore, LensesStorage } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
// Create a custom LensCore class that extends the base class
class CustomLensCore<T extends FieldValues> exten... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/cache.test.ts | tests/cache.test.ts | import { useCallback } from 'react';
import { useForm } from 'react-hook-form';
import { useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
test('lens focus is equal to itself', () => {
const { result } = renderHook(() => {
const form = useForm<{ a: string }>();
const len... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/primitive-interop.test.ts | tests/primitive-interop.test.ts | import { type Control, useForm } from 'react-hook-form';
import { type HookFormControlShim, type ShimKeyName, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('interop returns name and control', () => {
const { result } = renderHook((... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/types.test-d.ts | tests/types.test-d.ts | /* eslint-disable @typescript-eslint/no-unused-vars */
import { useForm } from 'react-hook-form';
import { type Lens, type UnwrapLens, useLens } from '@hookform/lenses';
import { zodResolver } from '@hookform/resolvers/zod';
import { expectTypeOf } from 'vitest';
import { z } from 'zod';
test('lens should use input ty... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/object-focus.test.ts | tests/object-focus.test.ts | import { useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('lens can focus on a field', () => {
const { result } = renderHook(() => {
const form = useForm<{ a: string }>();
... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/array-interop.test.ts | tests/array-interop.test.ts | import { useForm, useWatch } from 'react-hook-form';
import { type HookFormControlShim, type LensInteropTransformerBinding, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('interop returns name and control', () => {
const { result } ... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/object-reflect.test.ts | tests/object-reflect.test.ts | import { useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('reflect can create a new lens', () => {
const { result } = renderHook(() => {
const form = useForm<{ a: string }>();
... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/primitive-reflect.test.ts | tests/primitive-reflect.test.ts | import { useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('reflect can create a new lens from a field array item', () => {
const { result } = renderHook(() => {
const form = us... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/lens.test.ts | tests/lens.test.ts | import { useForm, useWatch } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('lens can be created', () => {
const { result } = renderHook(() => {
const form = useForm<{ a: string }>();
... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/array-reflect.test.ts | tests/array-reflect.test.ts | import { useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('reflect can create a new lens from a field array item', () => {
con... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/object-interop.test.ts | tests/object-interop.test.ts | import { type Control, useController, useForm } from 'react-hook-form';
import { type HookFormControlShim, type ShimKeyName, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('interop returns name and control', () => {
const { result }... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/tests/array-focus.test.ts | tests/array-focus.test.ts | import { useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { renderHook } from '@testing-library/react';
import { expectTypeOf } from 'vitest';
test('lens can focus on a field array', () => {
const { result } = renderHook(() => {
const form = useForm<{ a: string[] }>... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/Quickstart.story.tsx | examples/Quickstart.story.tsx | import { useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { action } from '@storybook/addon-actions';
import { type Meta } from '@storybook/react';
export default {
title: 'Quickstart',
} satisfies Meta;
export func... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/Complex.story.tsx | examples/Complex.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { action } from '@storybook/addon-actions';
import { type Meta } from '@storybook/react';
import { NumberInput, StringInput } from './compon... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/Demo.story.tsx | examples/Demo.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { action } from '@storybook/addon-actions';
import { type Meta } from '@storybook/react';
export default {
title: 'Demo',
} satisfies Meta... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/typing/Toolkit.story.tsx | examples/typing/Toolkit.story.tsx | import React from 'react';
import { type SubmitHandler, useForm, useWatch } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
const meta = {
ti... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/typing/Union.story.tsx | examples/typing/Union.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { useWatch } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { zodResolver } from '@hookform/resolvers/zod';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/reac... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/typing/Optional.story.tsx | examples/typing/Optional.story.tsx | import { type SubmitHandler, useForm, useWatch } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
import { StringInput } from '../components/Str... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/hook-form/UseController.story.tsx | examples/hook-form/UseController.story.tsx | import { type RegisterOptions, type SubmitErrorHandler, type SubmitHandler, useController, useForm } from 'react-hook-form';
import { type HookFormControlShim, type Lens, useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import ... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/hook-form/Unregister.story.tsx | examples/hook-form/Unregister.story.tsx | import { useState } from 'react';
import { type Path, type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/reac... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/hook-form/Register.story.tsx | examples/hook-form/Register.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } from '@storybook/test';
import { NumberInput, StringInput } from... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/components/Select.tsx | examples/components/Select.tsx | import { type RegisterOptions } from 'react-hook-form';
import { type HookFormControlShim, type Lens } from '@hookform/lenses';
export interface SelectOption<T extends string | number> {
value: T;
label: string;
}
export interface SelectProps<T extends string | number>
extends Omit<RegisterOptions<HookFormContr... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/components/StringInput.tsx | examples/components/StringInput.tsx | import { type RegisterOptions } from 'react-hook-form';
import { type HookFormControlShim, type Lens } from '@hookform/lenses';
export interface StringInputProps
extends Omit<
RegisterOptions<HookFormControlShim<string>>,
'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'onBlur' | 'onChange' | 'value'
> {
... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/components/Checkbox.tsx | examples/components/Checkbox.tsx | import { type RegisterOptions } from 'react-hook-form';
import { type HookFormControlShim, type Lens } from '@hookform/lenses';
export interface CheckboxProps
extends Omit<
RegisterOptions<HookFormControlShim<boolean>>,
'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'onBlur' | 'onChange' | 'value'
> {
... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/components/NumberInput.tsx | examples/components/NumberInput.tsx | import { type RegisterOptions } from 'react-hook-form';
import { type HookFormControlShim, type Lens } from '@hookform/lenses';
export interface NumberInputProps
extends Omit<
RegisterOptions<HookFormControlShim<number>>,
'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'onBlur' | 'onChange' | 'value' | 'pat... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/components/index.ts | examples/components/index.ts | export * from './NumberInput';
export * from './StringInput';
| typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/reflect/object/Spread.story.tsx | examples/reflect/object/Spread.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } from '@storybook/test';
import { NumberInput, StringI... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/reflect/object/Nested.story.tsx | examples/reflect/object/Nested.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } from '@storybook/test';
import { StringInput } from '... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/reflect/object/TopLevel.story.tsx | examples/reflect/object/TopLevel.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } from '@storybook/test';
import { StringInput } from '... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/reflect/array/TopLevel.story.tsx | examples/reflect/array/TopLevel.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } ... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/map/array/Iterate.story.tsx | examples/map/array/Iterate.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } ... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/map/array/Append.story.tsx | examples/map/array/Append.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { type Lens, useLens } from '@hookform/lenses';
import { useFieldArray } from '@hookform/lenses/rhf';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } ... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/focus/array/ByIndex.story.tsx | examples/focus/array/ByIndex.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } from '@storybook/test';
import { StringInput } from '../../compo... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
react-hook-form/lenses | https://github.com/react-hook-form/lenses/blob/4920902b853f20d41f2a44c64f0b0406525f180d/examples/focus/array/ByString.story.tsx | examples/focus/array/ByString.story.tsx | import { type SubmitHandler, useForm } from 'react-hook-form';
import { useLens } from '@hookform/lenses';
import { action } from '@storybook/addon-actions';
import type { Meta, StoryObj } from '@storybook/react';
import { expect, fn, userEvent, within } from '@storybook/test';
import { StringInput } from '../../compo... | typescript | MIT | 4920902b853f20d41f2a44c64f0b0406525f180d | 2026-01-05T05:00:33.065081Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/service-worker.ts | src/extension/service-worker.ts | import './helpers/text-helpers.js'
import { fileExtMap } from './helpers/file-helpers.js'
import { initializeSentry } from './helpers/sentry-helpers.js'
import { createError, isError } from './helpers/error-helpers.js'
import { getCurrentVoice } from './helpers/voice-helpers.js'
// Local state ------------------------... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/content-script.tsx | src/extension/content-script.tsx | import * as React from 'react'
import { createRoot } from 'react-dom/client'
import { GitHub } from 'react-feather'
import { useState } from 'react'
import { Dialog } from '../components/Dialog'
import { OnboardingDialog } from './components/dialogs/OnboardingDialog'
import { Button } from '../components/Button'
import... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/manifest.ts | src/extension/manifest.ts | export default {
name: 'Wavenet for Chrome',
version: process.env.npm_package_version,
key: process.env.GOOGLE_CHROME_EXTENSION_KEY,
manifest_version: 3,
permissions: [
'contextMenus',
'downloads',
'storage',
'activeTab',
'scripting',
'offscreen',
'identity',
],
oauth2: {
c... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/popup.tsx | src/extension/popup.tsx | import React from 'react'
import { createRoot } from 'react-dom/client'
import { MemoryRouter } from 'react-router-dom'
import { Extension } from './extension'
const root = createRoot(document.getElementById('root'))
root.render(
<MemoryRouter>
<Extension />
</MemoryRouter>,
)
| typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/offscreen.ts | src/extension/offscreen.ts | import { initializeSentry } from './helpers/sentry-helpers'
// Local variables -------------------------------------------------------------
let audioElement = new Audio()
let shouldPlay = false
// Bootstrap -------------------------------------------------------------------
initializeSentry()
// Event listeners ---... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/extension.tsx | src/extension/extension.tsx | import React, { useEffect, useState } from 'react'
import { useSync } from '../hooks/useSync'
import { useLocalStorage } from '../hooks/useLocalStorage'
import { useMount } from '../hooks/useMount'
import { Route, Routes, useLocation, useNavigate } from 'react-router-dom'
import { Sidebar } from './components/Sidebar'
... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/helpers/voice-helpers.ts | src/extension/helpers/voice-helpers.ts | export function getVoiceOptions(session, language) {
if (!session?.voices) return []
const voicesInLanguage = session.voices.filter((voice) =>
voice.languageCodes.includes(language),
)
const uniqueVoiceNames = new Set()
const voiceNames = voicesInLanguage
.map(({ name: value, ssmlGender }) => {
... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/helpers/error-helpers.ts | src/extension/helpers/error-helpers.ts | export type TError = TErrorDetails & {
error: true
}
export type TErrorDetails = {
errorCode: string
errorTitle: string
errorMessage: string
}
export function createError(error: TErrorDetails): TError {
return { error: true, ...error }
}
export function isError(value: any): value is TError {
return value... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/helpers/formatting-helpers.ts | src/extension/helpers/formatting-helpers.ts | export const creditFormat = (credits, modifier = 1000000) => {
const number = credits / modifier
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
}).format(number)
}
export function dateFormat(dateString) {
const date = new Date(dateString)
const day = date.getDate().toStr... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/helpers/file-helpers.ts | src/extension/helpers/file-helpers.ts | export const fileExtMap = {
MP3: 'mp3',
MP3_64_KBPS: 'mp3',
OGG_OPUS: 'ogg',
LINEAR16: 'wav',
}
| typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/components/forms/ApiKey.tsx | src/extension/components/forms/ApiKey.tsx | import React from 'react'
import { useState } from 'react'
import { CreditCard, Key } from 'react-feather'
import { Text } from '../../../components/inputs/Text.jsx'
import { Button } from '../../../components/Button.js'
import { useSync } from '../../../hooks/useSync.js'
export function ApiKeyForm() {}
ApiKeyForm.Co... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/components/views/Sandbox.tsx | src/extension/components/views/Sandbox.tsx | import React, { useState } from 'react'
import { Textarea } from '../../../components/inputs/Textarea.jsx'
import { Download, Play } from 'react-feather'
import { Button } from '../../../components/Button.js'
import { useSync } from '../../../hooks/useSync.js'
import { useLocalStorage } from '../../../hooks/useLocalSto... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/components/views/Usage.tsx | src/extension/components/views/Usage.tsx | import React from 'react'
import { creditFormat, dateFormat } from '../../helpers/formatting-helpers.js'
import { useMount } from '../../../hooks/useMount.js'
export function Usage() {
const [user, setUser] = React.useState(null)
const [loadingUser, setLoadingUser] = React.useState(false)
const [usage, setUsage... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/components/views/Billing.tsx | src/extension/components/views/Billing.tsx | import React, { useEffect } from 'react'
import { CreditCard, DollarSign, Key } from 'react-feather'
import { Notice } from '../copy/Notice.jsx'
import { PricingTable } from '../copy/PricingTable.jsx'
import { ApiKeyForm } from '../forms/ApiKey.js'
import { useNavigate } from 'react-router-dom'
import { dateFormat, cre... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/components/views/Preferences.tsx | src/extension/components/views/Preferences.tsx | import React from 'react'
import { Dropdown } from '../../../components/inputs/Dropdown.jsx'
import { Range } from '../../../components/inputs/Range.jsx'
import { Command, Key } from 'react-feather'
import { Button } from '../../../components/Button.js'
import { useSession } from '../../../hooks/useSession.js'
import {... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/extension/components/dialogs/OnboardingDialog.tsx | src/extension/components/dialogs/OnboardingDialog.tsx | import { CreditCard, Key } from 'react-feather'
import { Dialog } from '../../../components/Dialog.js'
import * as React from 'react'
import { FreeNotice, Notice } from '../copy/Notice.jsx'
import { PricingTable } from '../copy/PricingTable.jsx'
import { ApiKeyForm } from '../forms/ApiKey.js'
import { Button } from '..... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/hooks/useSession.ts | src/hooks/useSession.ts | import { useState } from 'react'
import { useMount } from './useMount'
export function useSession() {
const [ready, setReady] = useState(false)
const [value, setValue] = useState<any>({})
useMount(() => {
chrome.storage.session.get(null, handleLoad)
chrome.storage.session.onChanged.addListener(handleOnC... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/hooks/useSync.ts | src/hooks/useSync.ts | import { useState } from 'react'
import { useMount } from './useMount'
// TODO(mike): Chrome has a maximum of syncs per minute. We should
// probably throttle the setter to avoid hitting that limit.
export function useSync() {
const [ready, setReady] = useState(false)
const [value, setValue] = useState<any>({})
... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/hooks/useDebounce.ts | src/hooks/useDebounce.ts | import { useEffect, useState } from 'react'
export function useDebounce(value, delay) {
const [debouncedValue, setDebouncedValue] = useState(value)
useEffect(() => {
const timer = setTimeout(() => setDebouncedValue(value), delay || 500)
return () => clearTimeout(timer)
}, [value, delay])
return debou... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/hooks/useStore.ts | src/hooks/useStore.ts | import { useState } from 'react'
import { useMount } from './useMount'
/**
* Global store that can be used in any component, parent or child and only re-renders itself when updated.
*/
export const useStore = <T>(
store: Store<T>,
rerenderOnEffect: boolean = true,
): [T, (newState: T) => void] => {
const [stat... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/components/Dialog.tsx | src/components/Dialog.tsx | import * as React from 'react'
import { useMount } from '../hooks/useMount'
import { useOutsideClick } from '../hooks/useOutsideClick'
type DialogProps = {
title: string
content: string
onClose: () => void
buttons?: React.ReactNode
}
export function Dialog({
title,
content,
onClose,
buttons,
...args... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/components/Button.tsx | src/components/Button.tsx | import React, { useState } from 'react'
import { Loader } from 'react-feather'
import { twMerge } from 'tailwind-merge'
type ButtonProps = {
children?: React.ReactNode
submitting?: boolean
Icon?: React.ComponentType<any>
type?: 'default' | 'primary' | 'secondary' | 'danger' | 'success' | 'warning'
disabled?:... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/main.tsx | src/website/main.tsx | import { createRoot } from 'react-dom/client'
import './main.css'
import React from 'react'
import { BrowserRouter, Route, Routes } from 'react-router-dom'
import { HomePage } from './pages/HomePage'
import { PrivacyPolicyPage } from './pages/PrivacyPolicyPage'
import { ChangelogPage } from './pages/ChangelogPage'
impo... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/hooks/useScroll.ts | src/website/hooks/useScroll.ts | import { useState, useEffect } from 'react'
export function useScroll() {
const [isScrolled, setIsScrolled] = useState(false)
useEffect(() => {
const handleScroll = () => {
if (window.pageYOffset > 0) {
setIsScrolled(true)
} else {
setIsScrolled(false)
}
}
window.add... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/pages/HomePage.tsx | src/website/pages/HomePage.tsx | import React from 'react'
import { Hero } from '../components/Hero'
import { Features } from '../components/Features'
export function HomePage() {
return (
<div className="w-full flex flex-col items-center">
<Hero />
<Features />
</div>
)
}
| typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/pages/PrivacyPolicyPage.tsx | src/website/pages/PrivacyPolicyPage.tsx | import React from 'react'
export function PrivacyPolicyPage() {
return (
<div className="w-full flex flex-col items-center">
<div className="w-full bg-neutral-100 text-center p-8 pb-24 border-b border-neutral-200 shadow-sm">
<h1 className="w-full text-4xl font-bold">Privacy Policy</h1>
</div>... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/pages/ChangelogPage.tsx | src/website/pages/ChangelogPage.tsx | import React from 'react'
import { twMerge } from 'tailwind-merge'
export function ChangelogPage() {
return (
<div className="w-full flex flex-col items-center">
<div className="w-full bg-neutral-100 border-b border-neutral-200 shadow-sm text-center p-8 pb-24">
<h1 className="w-full text-4xl font-b... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/components/Logo.tsx | src/website/components/Logo.tsx | import React from 'react'
export function Logo() {
return (
<div className="flex items-center text-center">
<img
src={new URL(
'../assets/icons/wavenet-for-chrome.png',
import.meta.url,
).toString()}
className="mr-3 pt-0.5 w-10"
/>
<div>
<div ... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/components/ScrollToTop.tsx | src/website/components/ScrollToTop.tsx | import { useEffect } from 'react'
import { useLocation } from 'react-router-dom'
export function ScrollToTop() {
const { pathname } = useLocation()
const scrollToTop = () => {
document.documentElement.scrollTo({
top: 0,
left: 0,
behavior: 'instant',
})
}
useEffect(scrollToTop, [pathn... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/components/ScrollToHash.tsx | src/website/components/ScrollToHash.tsx | import { useEffect } from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
export function ScrollToHash() {
const navigate = useNavigate()
const location = useLocation()
useEffect(() => {
const hash = location.hash
const removeHashCharacter = (str) => {
return str.slice(1)
... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/components/Hero.tsx | src/website/components/Hero.tsx | import React from 'react'
import { useState } from 'react'
import { StopCircle, Play } from 'react-feather'
import { useMount } from '../../hooks/useMount'
import { Button } from '../../components/Button'
const audio = new Audio(
new URL('../assets/demo.mp3', import.meta.url).toString(),
)
export function Hero() {
... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/components/Footer.tsx | src/website/components/Footer.tsx | import React from 'react'
import { MapPin } from 'react-feather'
import { Link } from 'react-router-dom'
export function Footer() {
const year = new Date().getFullYear()
return (
<div className="w-full flex flex-col items-center mt-8 border-t border-neutral-200">
<div className="flex justify-center items... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/components/Features.tsx | src/website/components/Features.tsx | import React from 'react'
import {
BarChart2,
Box,
Command,
Download,
ExternalLink,
GitHub,
Globe,
Speaker,
Type,
Volume2,
} from 'react-feather'
import { Button } from '../../components/Button'
export function Features() {
return (
<div className="w-full flex flex-col items-center pt-8" id="... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
pgmichael/wavenet-for-chrome | https://github.com/pgmichael/wavenet-for-chrome/blob/94f484276005a52870c9dea561bb68a8d2951646/src/website/components/Header.tsx | src/website/components/Header.tsx | import React from 'react'
import { Link } from 'react-router-dom'
import { Logo } from './Logo'
import { useScroll } from '../hooks/useScroll'
import { Button } from '../../components/Button'
export function Header() {
const isScrolled = useScroll()
return (
<div
className={`flex flex-col items-center w... | typescript | MIT | 94f484276005a52870c9dea561bb68a8d2951646 | 2026-01-05T05:00:10.724244Z | false |
raids-lab/crater | https://github.com/raids-lab/crater/blob/15d5fd1a4c8474310b1cbe7e46c6b85af054e437/frontend/vite.config.ts | frontend/vite.config.ts | /**
* Copyright 2025 RAIDS Lab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | typescript | Apache-2.0 | 15d5fd1a4c8474310b1cbe7e46c6b85af054e437 | 2026-01-05T05:00:16.720559Z | false |
raids-lab/crater | https://github.com/raids-lab/crater/blob/15d5fd1a4c8474310b1cbe7e46c6b85af054e437/frontend/src/routeTree.gen.ts | frontend/src/routeTree.gen.ts | /* eslint-disable */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// This file was automatically generated by TanStack Router.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from bei... | typescript | Apache-2.0 | 15d5fd1a4c8474310b1cbe7e46c6b85af054e437 | 2026-01-05T05:00:16.720559Z | true |
raids-lab/crater | https://github.com/raids-lab/crater/blob/15d5fd1a4c8474310b1cbe7e46c6b85af054e437/frontend/src/main.tsx | frontend/src/main.tsx | /**
* Copyright 2025 RAIDS Lab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | typescript | Apache-2.0 | 15d5fd1a4c8474310b1cbe7e46c6b85af054e437 | 2026-01-05T05:00:16.720559Z | false |
raids-lab/crater | https://github.com/raids-lab/crater/blob/15d5fd1a4c8474310b1cbe7e46c6b85af054e437/frontend/src/router.tsx | frontend/src/router.tsx | import { createRouter } from '@tanstack/react-router'
// Import the generated route tree
import { routeTree } from './routeTree.gen'
export const router = createRouter({
routeTree,
context: {
// will be passed down from App component
auth: undefined!,
queryClient: undefined!,
store: undefined!,
... | typescript | Apache-2.0 | 15d5fd1a4c8474310b1cbe7e46c6b85af054e437 | 2026-01-05T05:00:16.720559Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.