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 |
|---|---|---|---|---|---|---|---|---|
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/lib/canvas-gradients.ts | apps/web/src/lib/canvas-gradients.ts | function splitBackgroundLayers(input: string): string[] {
const layers: string[] = [];
let depth = 0;
let start = 0;
for (let i = 0; i < input.length; i += 1) {
const ch = input[i] as string;
if (ch === "(") depth += 1;
else if (ch === ")") depth -= 1;
else if (ch === "," && depth === 0) {
... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/lib/mediabunny-utils.ts | apps/web/src/lib/mediabunny-utils.ts | import { FFmpeg } from "@ffmpeg/ffmpeg";
import { useTimelineStore } from "@/stores/timeline-store";
import { useMediaStore } from "@/stores/media-store";
import { Input, ALL_FORMATS, BlobSource, VideoSampleSink } from "mediabunny";
let ffmpeg: FFmpeg | null = null;
export const initFFmpeg = async (): Promise<FFmpeg>... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/lib/storage/storage-service.ts | apps/web/src/lib/storage/storage-service.ts | import { TProject } from "@/types/project";
import { MediaFile } from "@/types/media";
import { IndexedDBAdapter } from "./indexeddb-adapter";
import { OPFSAdapter } from "./opfs-adapter";
import {
MediaFileData,
StorageConfig,
SerializedProject,
SerializedScene,
TimelineData,
} from "./types";
import { Timel... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/lib/storage/indexeddb-adapter.ts | apps/web/src/lib/storage/indexeddb-adapter.ts | import { StorageAdapter } from "./types";
export class IndexedDBAdapter<T> implements StorageAdapter<T> {
private dbName: string;
private storeName: string;
private version: number;
constructor(dbName: string, storeName: string, version = 1) {
this.dbName = dbName;
this.storeName = storeName;
this... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/lib/storage/types.ts | apps/web/src/lib/storage/types.ts | import { TProject, Scene } from "@/types/project";
import { TimelineTrack } from "@/types/timeline";
export interface StorageAdapter<T> {
get(key: string): Promise<T | null>;
set(key: string, value: T): Promise<void>;
remove(key: string): Promise<void>;
list(): Promise<string[]>;
clear(): Promise<void>;
}
e... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/lib/storage/opfs-adapter.ts | apps/web/src/lib/storage/opfs-adapter.ts | import { StorageAdapter } from "./types";
export class OPFSAdapter implements StorageAdapter<File> {
private directoryName: string;
constructor(directoryName = "media") {
this.directoryName = directoryName;
}
private async getDirectory(): Promise<FileSystemDirectoryHandle> {
const opfsRoot = await na... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/lib/schemas/waitlist.ts | apps/web/src/lib/schemas/waitlist.ts | import { z } from "zod";
export const exportWaitlistSchema = z.object({
email: z.string().email().max(320),
});
export const exportWaitlistResponseSchema = z.object({
success: z.boolean(),
alreadySubscribed: z.boolean().optional(),
});
export type ExportWaitlistInput = z.infer<typeof exportWaitlistSchema>;
exp... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/data/colors/pattern-craft.ts | apps/web/src/data/colors/pattern-craft.ts | // These are the gradients from Pattern Craft (https://patterncraft.fun/)
export const patternCraftGradients = [
// Dreamy Sky Pink Glow
"radial-gradient(circle at 30% 70%, rgba(173, 216, 230, 0.35), transparent 60%), radial-gradient(circle at 70% 30%, rgba(255, 182, 193, 0.4), transparent 60%)",
// Soft Warm P... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/data/colors/syntax-ui.tsx | apps/web/src/data/colors/syntax-ui.tsx | // These are the gradients from Syntax UI (https://syntaxui.com/effects/gradients)
export const syntaxUIGradients = [
// Cyan to Blue gradients
"linear-gradient(to right, #22d3ee, #0ea5e9, #0284c7)",
"linear-gradient(to right, #bfdbfe, #a5f3fc)",
"linear-gradient(to right, #22d3ee, #0ea5e9, #0284c7)",
// Pu... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/data/colors/solid.ts | apps/web/src/data/colors/solid.ts | export const colors = [
"#ffffff",
"#000000",
"#ffe2e2",
"#ffc9c9",
"#ffa2a2",
"#ff6467",
"#fb2c36",
"#e7000b",
"#c10007",
"#9f0712",
"#82181a",
"#460809",
"#fff7ed",
"#ffedd4",
"#ffd6a7",
"#ffb86a",
"#ff8904",
"#ff6900",
"#f54900",
"#ca3500",
"#9f2d00",
"#7e2a0c",
"#441306... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/constants/actions.ts | apps/web/src/constants/actions.ts | /* An `action` is a unique verb that is associated with certain thing that can be done on OpenCut.
* For example, toggling playback or seeking.
*/
import {
useEffect,
useRef,
useState,
useCallback,
MutableRefObject,
} from "react";
// Simple event emitter for action changes
class ActionEmitter {
private... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/constants/font-constants.ts | apps/web/src/constants/font-constants.ts | export interface FontOption {
value: string;
label: string;
category: "system" | "google" | "custom";
weights?: number[];
hasClassName?: boolean;
}
export const FONT_OPTIONS: FontOption[] = [
// System fonts (always available)
{ value: "Arial", label: "Arial", category: "system", hasClassName: false },
... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/constants/site.ts | apps/web/src/constants/site.ts | export const SITE_URL = "https://opencut.app";
export const SITE_INFO = {
title: "OpenCut",
description:
"A simple but powerful video editor that gets the job done. In your browser.",
url: SITE_URL,
openGraphImage: "/open-graph/default.jpg",
twitterImage: "/open-graph/default.jpg",
favicon: "/favicon.i... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/constants/timeline-constants.ts | apps/web/src/constants/timeline-constants.ts | import type { TrackType } from "@/types/timeline";
// Track color definitions
export const TRACK_COLORS: Record<
TrackType,
{ solid: string; background: string; border: string }
> = {
media: {
solid: "bg-blue-500",
background: "",
border: "",
},
text: {
solid: "bg-[#5DBAA0]",
background: ... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/constants/text-constants.ts | apps/web/src/constants/text-constants.ts | import { TextElement } from "@/types/timeline";
import { TIMELINE_CONSTANTS } from "./timeline-constants";
export const DEFAULT_TEXT_ELEMENT: Omit<
TextElement,
"id"
> = {
type: "text",
name: "Text",
content: "Default Text",
fontSize: 48,
fontFamily: "Arial",
color: "#ffffff",
backgroundColor: "trans... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/auth/src/client.ts | packages/auth/src/client.ts | import { createAuthClient } from "better-auth/react";
import { keys } from "./keys";
const { NEXT_PUBLIC_BETTER_AUTH_URL } = keys();
export const { signIn, signUp, useSession } = createAuthClient({
baseURL: NEXT_PUBLIC_BETTER_AUTH_URL,
});
| typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/auth/src/server.ts | packages/auth/src/server.ts | import { betterAuth, RateLimit } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { db } from "@opencut/db";
import { keys } from "./keys";
import { Redis } from "@upstash/redis";
const {
NEXT_PUBLIC_BETTER_AUTH_URL,
BETTER_AUTH_SECRET,
UPSTASH_REDIS_REST_URL,
UPSTASH_R... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/auth/src/keys.ts | packages/auth/src/keys.ts | import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const keys = () =>
createEnv({
server: {
BETTER_AUTH_SECRET: z.string(),
UPSTASH_REDIS_REST_URL: z.string().url(),
UPSTASH_REDIS_REST_TOKEN: z.string(),
},
client: {
NEXT_PUBLIC_BETTER_AUTH_URL: z.stri... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/auth/src/index.ts | packages/auth/src/index.ts | // Re-export server auth
export * from "./server";
// Re-export client auth
export * from "./client";
// Re-export keys
export * from "./keys";
| typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/db/drizzle.config.ts | packages/db/drizzle.config.ts | import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
import { keys } from "./src/keys";
const { NODE_ENV, DATABASE_URL } = keys();
// Load the right env file based on environment
if (NODE_ENV === "production") {
dotenv.config({ path: ".env.production" });
} else {
dotenv.config({ path: ".e... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/db/src/schema.ts | packages/db/src/schema.ts | import { pgTable, text, timestamp, boolean } from "drizzle-orm/pg-core";
export const users = pgTable("users", {
id: text("id").primaryKey(),
name: text("name").notNull(),
email: text("email").notNull().unique(),
emailVerified: boolean("email_verified").default(false).notNull(),
image: text("image"),
creat... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/db/src/keys.ts | packages/db/src/keys.ts | import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";
export const keys = () =>
createEnv({
server: {
NODE_ENV: z
.enum(["development", "production", "test"])
.default("development"),
DATABASE_URL: z
.string()
.startsWith("postgres://")
.or(z... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
OpenCut-app/OpenCut | https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/packages/db/src/index.ts | packages/db/src/index.ts | import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";
import { keys } from "./keys";
const { DATABASE_URL } = keys();
// Create a lazy database instance that only initializes when accessed
let _db: ReturnType<typeof drizzle> | null = null;
function get... | typescript | MIT | 0173db99448d1c4c6415dcf15272e17551b48b04 | 2026-01-04T15:42:54.730143Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/webpack.config.ts | webpack.config.ts | import path from 'path';
import Copy from 'copy-webpack-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import webpack from 'webpack';
const nodeEnv = process.env.NODE_ENV || 'development';
const isProd = nodeEnv === 'production';
const config: webpack.Configuration[] = [
{
mode: 'none',
name: '... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/config.ts | app/config.ts | import {app} from 'electron';
import chokidar from 'chokidar';
import type {parsedConfig, configOptions} from '../typings/config';
import {_import, getDefaultConfig} from './config/import';
import _openConfig from './config/open';
import {cfgPath, cfgDir} from './config/paths';
import notify from './notify';
import ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/notify.ts | app/notify.ts | import {app, Notification} from 'electron';
import {icon} from './config/paths';
export default function notify(title: string, body = '', details: {error?: any} = {}) {
console.log(`[Notification] ${title}: ${body}`);
if (details.error) {
console.error(details.error);
}
if (app.isReady()) {
_createNot... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/commands.ts | app/commands.ts | import {app, Menu} from 'electron';
import type {BrowserWindow} from 'electron';
import {openConfig, getConfig} from './config';
import {updatePlugins} from './plugins';
import {installCLI} from './utils/cli-install';
import * as systemContextMenu from './utils/system-context-menu';
const commands: Record<string, (fo... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/rpc.ts | app/rpc.ts | import {EventEmitter} from 'events';
import {ipcMain} from 'electron';
import type {BrowserWindow, IpcMainEvent} from 'electron';
import {v4 as uuidv4} from 'uuid';
import type {TypedEmitter, MainEvents, RendererEvents, FilterNever} from '../typings/common';
export class Server {
emitter: TypedEmitter<MainEvents>... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/session.ts | app/session.ts | import {EventEmitter} from 'events';
import {dirname} from 'path';
import {StringDecoder} from 'string_decoder';
import defaultShell from 'default-shell';
import type {IPty, IWindowsPtyForkOptions, spawn as npSpawn} from 'node-pty';
import osLocale from 'os-locale';
import shellEnv from 'shell-env';
import * as confi... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/auto-updater-linux.ts | app/auto-updater-linux.ts | import {EventEmitter} from 'events';
import fetch from 'electron-fetch';
class AutoUpdater extends EventEmitter implements Electron.AutoUpdater {
updateURL!: string;
quitAndInstall() {
this.emitError('QuitAndInstall unimplemented');
}
getFeedURL() {
return this.updateURL;
}
setFeedURL(options: El... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/plugins.ts | app/plugins.ts | /* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */
import {exec, execFile} from 'child_process';
import {writeFileSync} from 'fs';
import {resolve, basename} from 'path';
import {promisify} from 'util';... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/updater.ts | app/updater.ts | // Packages
import electron, {app} from 'electron';
import type {BrowserWindow, AutoUpdater} from 'electron';
import retry from 'async-retry';
import ms from 'ms';
// Utilities
import autoUpdaterLinux from './auto-updater-linux';
import {getDefaultProfile} from './config';
import {version} from './package.json';
impo... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/notifications.ts | app/notifications.ts | import type {BrowserWindow} from 'electron';
import fetch from 'electron-fetch';
import ms from 'ms';
import {version} from './package.json';
const NEWS_URL = 'https://hyper-news.now.sh';
export default function fetchNotifications(win: BrowserWindow) {
const {rpc} = win;
const retry = (err?: Error) => {
set... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/index.ts | app/index.ts | // eslint-disable-next-line import/order
import {cfgPath} from './config/paths';
// Print diagnostic information for a few arguments instead of running Hyper.
if (['--help', '-v', '--version'].includes(process.argv[1])) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const {version} = require('./p... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/system-context-menu.ts | app/utils/system-context-menu.ts | import * as Registry from 'native-reg';
import type {HKEY} from 'native-reg';
const appPath = `"${process.execPath}"`;
const regKeys = [
`Software\\Classes\\Directory\\Background\\shell\\Hyper`,
`Software\\Classes\\Directory\\shell\\Hyper`,
`Software\\Classes\\Drive\\shell\\Hyper`
];
const regParts = [
{key: '... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/map-keys.ts | app/utils/map-keys.ts | const generatePrefixedCommand = (command: string, shortcuts: string[]) => {
const result: Record<string, string[]> = {};
const baseCmd = command.replace(/:prefix$/, '');
for (let i = 1; i <= 9; i++) {
// 9 is a special number because it means 'last'
const index = i === 9 ? 'last' : i;
const prefixedSh... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/window-utils.ts | app/utils/window-utils.ts | import electron from 'electron';
export function positionIsValid(position: [number, number]) {
const displays = electron.screen.getAllDisplays();
const [x, y] = position;
return displays.some(({workArea}) => {
return x >= workArea.x && x <= workArea.x + workArea.width && y >= workArea.y && y <= workArea.y +... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/to-electron-background-color.ts | app/utils/to-electron-background-color.ts | // Packages
import Color from 'color';
// returns a background color that's in hex
// format including the alpha channel (e.g.: `#00000050`)
// input can be any css value (rgb, hsl, string…)
const toElectronBackgroundColor = (bgColor: string) => {
const color = Color(bgColor);
if (color.alpha() === 1) {
retur... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/renderer-utils.ts | app/utils/renderer-utils.ts | const rendererTypes: Record<string, string> = {};
function getRendererTypes() {
return rendererTypes;
}
function setRendererType(uid: string, type: string) {
rendererTypes[uid] = type;
}
function unsetRendererType(uid: string) {
delete rendererTypes[uid];
}
export {getRendererTypes, setRendererType, unsetRend... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/colors.ts | app/utils/colors.ts | const colorList = [
'black',
'red',
'green',
'yellow',
'blue',
'magenta',
'cyan',
'white',
'lightBlack',
'lightRed',
'lightGreen',
'lightYellow',
'lightBlue',
'lightMagenta',
'lightCyan',
'lightWhite',
'colorCubes',
'grayscale'
];
export const getColorMap: {
<T>(colors: T): T exte... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/cli-install.ts | app/utils/cli-install.ts | import {existsSync, readlink, symlink} from 'fs';
import path from 'path';
import {promisify} from 'util';
import {clipboard, dialog} from 'electron';
import {mkdirpSync} from 'fs-extra';
import * as Registry from 'native-reg';
import type {ValueType} from 'native-reg';
import sudoPrompt from 'sudo-prompt';
import {... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/utils/shell-fallback.ts | app/utils/shell-fallback.ts | export const getFallBackShellConfig = (
shell: string,
shellArgs: string[],
defaultShell: string,
defaultShellArgs: string[]
): {
shell: string;
shellArgs: string[];
} | null => {
if (shellArgs.length > 0) {
return {
shell,
shellArgs: []
};
}
if (shell != defaultShell) {
retur... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/plugins/install.ts | app/plugins/install.ts | import cp from 'child_process';
import ms from 'ms';
import queue from 'queue';
import {yarn, plugs} from '../config/paths';
export const install = (fn: (err: string | null) => void) => {
const spawnQueue = queue({concurrency: 1});
function yarnFn(args: string[], cb: (err: string | null) => void) {
const env... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/plugins/extensions.ts | app/plugins/extensions.ts | export const availableExtensions = new Set([
'onApp',
'onWindowClass',
'decorateWindowClass',
'onWindow',
'onRendererWindow',
'onUnload',
'decorateSessionClass',
'decorateSessionOptions',
'middleware',
'reduceUI',
'reduceSessions',
'reduceTermGroups',
'decorateBrowserOptions',
'decorateMenu'... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/config/open.ts | app/config/open.ts | import {exec} from 'child_process';
import {shell} from 'electron';
import * as Registry from 'native-reg';
import {cfgPath} from './paths';
const getUserChoiceKey = () => {
try {
// Load FileExts keys for .js files
const fileExtsKeys = Registry.openKey(
Registry.HKCU,
'Software\\Microsoft\\Wi... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/config/import.ts | app/config/import.ts | import {readFileSync, mkdirpSync} from 'fs-extra';
import type {rawConfig} from '../../typings/config';
import notify from '../notify';
import {_init} from './init';
import {migrateHyper3Config} from './migrate';
import {defaultCfg, cfgPath, plugs, defaultPlatformKeyPath} from './paths';
let defaultConfig: rawConfig... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/config/init.ts | app/config/init.ts | import vm from 'vm';
import merge from 'lodash/merge';
import type {parsedConfig, rawConfig, configOptions} from '../../typings/config';
import notify from '../notify';
import mapKeys from '../utils/map-keys';
const _extract = (script?: vm.Script): Record<string, any> => {
const module: Record<string, any> = {};
... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/config/windows.ts | app/config/windows.ts | import type {BrowserWindow} from 'electron';
import Config from 'electron-store';
export const defaults = {
windowPosition: [50, 50] as [number, number],
windowSize: [540, 380] as [number, number]
};
// local storage
const cfg = new Config({defaults});
export function get() {
const position = cfg.get('windowP... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/config/paths.ts | app/config/paths.ts | // This module exports paths, names, and other metadata that is referenced
import {statSync} from 'fs';
import {homedir} from 'os';
import {resolve, join} from 'path';
import {app} from 'electron';
import isDev from 'electron-is-dev';
const cfgFile = 'hyper.json';
const defaultCfgFile = 'config-default.json';
const ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/config/migrate.ts | app/config/migrate.ts | import {dirname, resolve} from 'path';
import {builders, namedTypes} from 'ast-types';
import type {ExpressionKind} from 'ast-types/lib/gen/kinds';
import {copy, copySync, existsSync, readFileSync, writeFileSync} from 'fs-extra';
import merge from 'lodash/merge';
import {parse, prettyPrint} from 'recast';
import * as ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menu.ts | app/menus/menu.ts | // Packages
import {app, dialog, Menu} from 'electron';
import type {BrowserWindow} from 'electron';
// Utilities
import {execCommand} from '../commands';
import {getConfig} from '../config';
import {icon} from '../config/paths';
import {getDecoratedKeymaps} from '../plugins';
import {getRendererTypes} from '../utils/... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menus/window.ts | app/menus/menus/window.ts | import type {BrowserWindow, MenuItemConstructorOptions} from 'electron';
const windowMenu = (
commandKeys: Record<string, string>,
execCommand: (command: string, focusedWindow?: BrowserWindow) => void
): MenuItemConstructorOptions => {
// Generating tab:jump array
const tabJump: MenuItemConstructorOptions[] = ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menus/edit.ts | app/menus/menus/edit.ts | import type {BrowserWindow, MenuItemConstructorOptions} from 'electron';
const editMenu = (
commandKeys: Record<string, string>,
execCommand: (command: string, focusedWindow?: BrowserWindow) => void
) => {
const submenu: MenuItemConstructorOptions[] = [
{
label: 'Undo',
accelerator: commandKeys['... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menus/tools.ts | app/menus/menus/tools.ts | import type {BrowserWindow, MenuItemConstructorOptions} from 'electron';
const toolsMenu = (
commands: Record<string, string>,
execCommand: (command: string, focusedWindow?: BrowserWindow) => void
): MenuItemConstructorOptions => {
return {
label: 'Tools',
submenu: [
{
label: 'Update plugin... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menus/shell.ts | app/menus/menus/shell.ts | import type {BrowserWindow, MenuItemConstructorOptions} from 'electron';
const shellMenu = (
commandKeys: Record<string, string>,
execCommand: (command: string, focusedWindow?: BrowserWindow) => void,
profiles: string[]
): MenuItemConstructorOptions => {
const isMac = process.platform === 'darwin';
return {... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menus/darwin.ts | app/menus/menus/darwin.ts | // This menu label is overrided by OSX to be the appName
// The label is set to appName here so it matches actual behavior
import {app} from 'electron';
import type {BrowserWindow, MenuItemConstructorOptions} from 'electron';
const darwinMenu = (
commandKeys: Record<string, string>,
execCommand: (command: string, ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menus/help.ts | app/menus/menus/help.ts | import {release} from 'os';
import {app, shell, dialog, clipboard} from 'electron';
import type {MenuItemConstructorOptions} from 'electron';
import {getConfig, getPlugins} from '../../config';
import {version} from '../../package.json';
const {arch, env, platform, versions} = process;
const helpMenu = (commands: R... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/menus/menus/view.ts | app/menus/menus/view.ts | import type {BrowserWindow, MenuItemConstructorOptions} from 'electron';
const viewMenu = (
commandKeys: Record<string, string>,
execCommand: (command: string, focusedWindow?: BrowserWindow) => void
): MenuItemConstructorOptions => {
return {
label: 'View',
submenu: [
{
label: 'Reload',
... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/ui/window.ts | app/ui/window.ts | import {existsSync} from 'fs';
import {isAbsolute, normalize, sep} from 'path';
import {URL, fileURLToPath} from 'url';
import {app, BrowserWindow, shell, Menu} from 'electron';
import type {BrowserWindowConstructorOptions} from 'electron';
import {enable as remoteEnable} from '@electron/remote/main';
import isDev fr... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/app/ui/contextmenu.ts | app/ui/contextmenu.ts | import type {MenuItemConstructorOptions, BrowserWindow} from 'electron';
import {execCommand} from '../commands';
import {getProfiles} from '../config';
import editMenu from '../menus/menus/edit';
import shellMenu from '../menus/menus/shell';
import {getDecoratedKeymaps} from '../plugins';
const separator: MenuItemCo... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/test/index.ts | test/index.ts | // Native
import path from 'path';
// Packages
import test from 'ava';
import fs from 'fs-extra';
import {_electron} from 'playwright';
import type {ElectronApplication} from 'playwright';
let app: ElectronApplication;
test.before(async () => {
let pathToBinary;
switch (process.platform) {
case 'linux':
... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/test/unit/to-electron-background-color.test.ts | test/unit/to-electron-background-color.test.ts | import test from 'ava';
import toElectronBackgroundColor from '../../app/utils/to-electron-background-color';
import {isHexColor} from '../testUtils/is-hex-color';
test('toElectronBackgroundColor', (t) => {
t.false(false);
});
test(`returns a color that's in hex`, (t) => {
const hexColor = '#BADA55';
const rgb... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/test/unit/cli-api.test.ts | test/unit/cli-api.test.ts | /* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */
import test from 'ava';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const proxyquire = require('proxyquire').noCallThru();
test('e... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/test/unit/window-utils.test.ts | test/unit/window-utils.test.ts | // eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable @typescript-eslint/no-unsafe-call */
import test from 'ava';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const proxyquire = require('proxyquire').noCallThru();
test('positionIsValid() returns true when window is on on... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/test/testUtils/is-hex-color.ts | test/testUtils/is-hex-color.ts | function isHexColor(color: string) {
return /(^#[0-9A-F]{6,8}$)|(^#[0-9A-F]{3}$)/i.test(color); // https://regex101.com/
}
export {isHexColor};
| typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/terms.ts | lib/terms.ts | import type Term from './components/term';
// react Term components add themselves
// to this object upon mounting / unmounting
// this is to allow imperative access to the
// term API, which is a performance
// optimization for the most common action
// within the system
const terms: Record<string, Term | null> = {}... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/rpc.ts | lib/rpc.ts | import RPC from './utils/rpc';
const rpc = new RPC();
export default rpc;
| typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/command-registry.ts | lib/command-registry.ts | import type {HyperDispatch} from '../typings/hyper';
import {closeSearch} from './actions/sessions';
import {ipcRenderer} from './utils/ipc';
let commands: Record<string, (event: any, dispatch: HyperDispatch) => void> = {
'editor:search-close': (e, dispatch) => {
dispatch(closeSearch(undefined, e));
window.... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/index.tsx | lib/index.tsx | import './v8-snapshot-util';
import {webFrame} from 'electron';
import React from 'react';
import {createRoot} from 'react-dom/client';
import {Provider} from 'react-redux';
import type {configOptions} from '../typings/config';
import {loadConfig, reloadConfig} from './actions/config';
import init from './actions/in... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/v8-snapshot-util.ts | lib/v8-snapshot-util.ts | if (typeof snapshotResult !== 'undefined') {
const Module = __non_webpack_require__('module');
const originalLoad: (module: string, ...args: any[]) => any = Module._load;
Module._load = function _load(module: string, ...args: unknown[]): NodeModule {
let cachedModule = snapshotResult.customRequire.cache[modu... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/selectors.ts | lib/selectors.ts | import {createSelector} from 'reselect';
import type {HyperState} from '../typings/hyper';
const getTermGroups = ({termGroups}: Pick<HyperState, 'termGroups'>) => termGroups.termGroups;
export const getRootGroups = createSelector(getTermGroups, (termGroups) =>
Object.keys(termGroups)
.map((uid) => termGroups[ui... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/store/configure-store.prod.ts | lib/store/configure-store.prod.ts | import {createStore, applyMiddleware} from 'redux';
import _thunk from 'redux-thunk';
import type {ThunkMiddleware} from 'redux-thunk';
import type {HyperState, HyperActions} from '../../typings/hyper';
import rootReducer from '../reducers/index';
import effects from '../utils/effects';
import * as plugins from '../ut... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/store/write-middleware.ts | lib/store/write-middleware.ts | import type {Dispatch, Middleware} from 'redux';
import type {HyperActions, HyperState} from '../../typings/hyper';
import terms from '../terms';
// the only side effect we perform from middleware
// is to write to the react term instance directly
// to avoid a performance hit
const writeMiddleware: Middleware<{}, Hy... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/store/configure-store.ts | lib/store/configure-store.ts | import configureStoreForDevelopment from './configure-store.dev';
import configureStoreForProduction from './configure-store.prod';
const configureStore = () => {
if (process.env.NODE_ENV === 'production') {
return configureStoreForProduction();
}
return configureStoreForDevelopment();
};
export default con... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/store/configure-store.dev.ts | lib/store/configure-store.dev.ts | import {composeWithDevTools} from '@redux-devtools/extension';
import {createStore, applyMiddleware} from 'redux';
import _thunk from 'redux-thunk';
import type {ThunkMiddleware} from 'redux-thunk';
import type {HyperState, HyperActions} from '../../typings/hyper';
import rootReducer from '../reducers/index';
import e... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/reducers/ui.ts | lib/reducers/ui.ts | import {release} from 'os';
import Immutable from 'seamless-immutable';
import type {Immutable as ImmutableType} from 'seamless-immutable';
import {CONFIG_LOAD, CONFIG_RELOAD} from '../../typings/constants/config';
import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../../typings/constants/notifications';
impor... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/reducers/sessions.ts | lib/reducers/sessions.ts | import Immutable from 'seamless-immutable';
import {
SESSION_ADD,
SESSION_PTY_EXIT,
SESSION_USER_EXIT,
SESSION_PTY_DATA,
SESSION_SET_ACTIVE,
SESSION_CLEAR_ACTIVE,
SESSION_RESIZE,
SESSION_SET_XTERM_TITLE,
SESSION_SET_CWD,
SESSION_SEARCH
} from '../../typings/constants/sessions';
import type {session... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/reducers/index.ts | lib/reducers/index.ts | import {combineReducers} from 'redux';
import type {Reducer} from 'redux';
import type {HyperActions, HyperState} from '../../typings/hyper';
import sessions from './sessions';
import termGroups from './term-groups';
import ui from './ui';
export default combineReducers({
ui,
sessions,
termGroups
}) as Reducer... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/reducers/term-groups.ts | lib/reducers/term-groups.ts | import Immutable from 'seamless-immutable';
import type {Immutable as ImmutableType} from 'seamless-immutable';
import {v4 as uuidv4} from 'uuid';
import {SESSION_ADD, SESSION_SET_ACTIVE} from '../../typings/constants/sessions';
import type {SessionAddAction} from '../../typings/constants/sessions';
import {TERM_GROUP... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/style-sheet.tsx | lib/components/style-sheet.tsx | import React, {forwardRef} from 'react';
import type {StyleSheetProps} from '../../typings/hyper';
const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => {
const {borderColor} = props;
return (
<style jsx global ref={ref}>{`
::-webkit-scrollbar {
width: 5px;
}
... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/notifications.tsx | lib/components/notifications.tsx | import React, {forwardRef} from 'react';
import type {NotificationsProps} from '../../typings/hyper';
import {decorate} from '../utils/plugins';
import Notification_ from './notification';
const Notification = decorate(Notification_, 'Notification');
const Notifications = forwardRef<HTMLDivElement, NotificationsPro... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/terms.tsx | lib/components/terms.tsx | import React from 'react';
import type {TermsProps, HyperDispatch} from '../../typings/hyper';
import {registerCommandHandlers} from '../command-registry';
import {ObjectTypedKeys} from '../utils/object';
import {decorate, getTermGroupProps} from '../utils/plugins';
import StyleSheet_ from './style-sheet';
import typ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/tabs.tsx | lib/components/tabs.tsx | import React, {forwardRef} from 'react';
import type {TabsProps} from '../../typings/hyper';
import {decorate, getTabProps} from '../utils/plugins';
import DropdownButton from './new-tab';
import Tab_ from './tab';
const Tab = decorate(Tab_, 'Tab');
const isMac = /Mac/.test(navigator.userAgent);
const Tabs = forwar... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/term.tsx | lib/components/term.tsx | import {clipboard, shell} from 'electron';
import React from 'react';
import Color from 'color';
import isEqual from 'lodash/isEqual';
import pickBy from 'lodash/pickBy';
import {Terminal} from 'xterm';
import type {ITerminalOptions, IDisposable} from 'xterm';
import {CanvasAddon} from 'xterm-addon-canvas';
import {Fi... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/tab.tsx | lib/components/tab.tsx | import React, {forwardRef} from 'react';
import type {TabProps} from '../../typings/hyper';
const Tab = forwardRef<HTMLLIElement, TabProps>((props, ref) => {
const handleClick = (event: React.MouseEvent) => {
const isLeftClick = event.nativeEvent.which === 1;
if (isLeftClick && !props.isActive) {
pro... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/searchBox.tsx | lib/components/searchBox.tsx | import React, {useCallback, useRef, useEffect, forwardRef} from 'react';
import {VscArrowDown} from '@react-icons/all-files/vsc/VscArrowDown';
import {VscArrowUp} from '@react-icons/all-files/vsc/VscArrowUp';
import {VscCaseSensitive} from '@react-icons/all-files/vsc/VscCaseSensitive';
import {VscClose} from '@react-i... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/notification.tsx | lib/components/notification.tsx | import React, {forwardRef, useEffect, useRef, useState} from 'react';
import type {NotificationProps} from '../../typings/hyper';
const Notification = forwardRef<HTMLDivElement, React.PropsWithChildren<NotificationProps>>((props, ref) => {
const dismissTimer = useRef<NodeJS.Timeout | undefined>(undefined);
const ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/new-tab.tsx | lib/components/new-tab.tsx | import React, {useRef, useState} from 'react';
import {VscChevronDown} from '@react-icons/all-files/vsc/VscChevronDown';
import useClickAway from 'react-use/lib/useClickAway';
import type {configOptions} from '../../typings/config';
interface Props {
defaultProfile: string;
profiles: configOptions['profiles'];
... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/term-group.tsx | lib/components/term-group.tsx | import React from 'react';
import {connect} from 'react-redux';
import type {HyperState, HyperDispatch, TermGroupProps, TermGroupOwnProps} from '../../typings/hyper';
import {resizeTermGroup} from '../actions/term-groups';
import {decorate, getTermProps, getTermGroupProps} from '../utils/plugins';
import SplitPane_ ... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/split-pane.tsx | lib/components/split-pane.tsx | import React, {useState, useEffect, useRef, forwardRef} from 'react';
import sum from 'lodash/sum';
import type {SplitPaneProps} from '../../typings/hyper';
const SplitPane = forwardRef<HTMLDivElement, SplitPaneProps>((props, ref) => {
const dragPanePosition = useRef<number>(0);
const dragTarget = useRef<HTMLDiv... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/components/header.tsx | lib/components/header.tsx | import React, {forwardRef, useState} from 'react';
import type {HeaderProps} from '../../typings/hyper';
import {decorate, getTabsProps} from '../utils/plugins';
import Tabs_ from './tabs';
const Tabs = decorate(Tabs_, 'Tabs');
const Header = forwardRef<HTMLElement, HeaderProps>((props, ref) => {
const [headerMou... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/config.ts | lib/actions/config.ts | import type {configOptions} from '../../typings/config';
import {CONFIG_LOAD, CONFIG_RELOAD} from '../../typings/constants/config';
import type {HyperActions} from '../../typings/hyper';
export function loadConfig(config: configOptions): HyperActions {
return {
type: CONFIG_LOAD,
config
};
}
export functi... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/ui.ts | lib/actions/ui.ts | import {stat} from 'fs';
import type {Stats} from 'fs';
import type parseUrl from 'parse-url';
import {php_escapeshellcmd as escapeShellCmd} from 'php-escape-shell';
import {
UI_FONT_SIZE_SET,
UI_FONT_SIZE_INCR,
UI_FONT_SIZE_DECR,
UI_FONT_SIZE_RESET,
UI_FONT_SMOOTHING_SET,
UI_MOVE_LEFT,
UI_MOVE_RIGHT,
... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/header.ts | lib/actions/header.ts | import {CLOSE_TAB, CHANGE_TAB} from '../../typings/constants/tabs';
import {
UI_WINDOW_MAXIMIZE,
UI_WINDOW_UNMAXIMIZE,
UI_OPEN_HAMBURGER_MENU,
UI_WINDOW_MINIMIZE,
UI_WINDOW_CLOSE
} from '../../typings/constants/ui';
import type {HyperDispatch} from '../../typings/hyper';
import rpc from '../rpc';
import {use... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/updater.ts | lib/actions/updater.ts | import {UPDATE_INSTALL, UPDATE_AVAILABLE} from '../../typings/constants/updater';
import type {HyperActions} from '../../typings/hyper';
import rpc from '../rpc';
export function installUpdate(): HyperActions {
return {
type: UPDATE_INSTALL,
effect: () => {
rpc.emit('quit and install');
}
};
}
e... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/notifications.ts | lib/actions/notifications.ts | import {NOTIFICATION_MESSAGE, NOTIFICATION_DISMISS} from '../../typings/constants/notifications';
import type {HyperActions} from '../../typings/hyper';
export function dismissNotification(id: string): HyperActions {
return {
type: NOTIFICATION_DISMISS,
id
};
}
export function addNotificationMessage(text:... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/sessions.ts | lib/actions/sessions.ts | import type {Session} from '../../typings/common';
import {
SESSION_ADD,
SESSION_RESIZE,
SESSION_REQUEST,
SESSION_ADD_DATA,
SESSION_PTY_DATA,
SESSION_PTY_EXIT,
SESSION_USER_EXIT,
SESSION_SET_ACTIVE,
SESSION_CLEAR_ACTIVE,
SESSION_USER_DATA,
SESSION_SET_XTERM_TITLE,
SESSION_SEARCH
} from '../../ty... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/index.ts | lib/actions/index.ts | import {INIT} from '../../typings/constants';
import type {HyperDispatch} from '../../typings/hyper';
import rpc from '../rpc';
export default function init() {
return (dispatch: HyperDispatch) => {
dispatch({
type: INIT,
effect: () => {
rpc.emit('init', null);
}
});
};
}
| typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/actions/term-groups.ts | lib/actions/term-groups.ts | import {SESSION_REQUEST} from '../../typings/constants/sessions';
import {
DIRECTION,
TERM_GROUP_RESIZE,
TERM_GROUP_REQUEST,
TERM_GROUP_EXIT,
TERM_GROUP_EXIT_ACTIVE
} from '../../typings/constants/term-groups';
import type {ITermState, ITermGroup, HyperState, HyperDispatch, HyperActions} from '../../typings/h... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
vercel/hyper | https://github.com/vercel/hyper/blob/2a7bb18259d975f27b30b502af1be7576f6f5656/lib/utils/config.ts | lib/utils/config.ts | import {require as remoteRequire, getCurrentWindow} from '@electron/remote';
// TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31
import {ipcRenderer} from './ipc';
const plugins = remoteRequire('./plugins') as typeof import('../../app/plugins... | typescript | MIT | 2a7bb18259d975f27b30b502af1be7576f6f5656 | 2026-01-04T15:43:12.163196Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.