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 |
|---|---|---|---|---|---|---|---|---|
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/plugin-functions.ts | packages/tailwindcss/src/compat/plugin-functions.ts | import type { DesignSystem } from '../design-system'
import { ThemeOptions, type Theme, type ThemeKey } from '../theme'
import { withAlpha } from '../utilities'
import { DefaultMap } from '../utils/default-map'
import { unescape } from '../utils/escape'
import { toKeyPath } from '../utils/to-key-path'
import { keyPathT... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/default-theme.ts | packages/tailwindcss/src/compat/default-theme.ts | import type { NamedUtilityValue } from '../candidate'
import { isPositiveInteger } from '../utils/infer-data-type'
import { segment } from '../utils/segment'
import colors from './colors'
import type { UserConfig } from './config/types'
function bareValues(fn: (value: NamedUtilityValue) => string | undefined) {
retu... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/apply-config-to-theme.ts | packages/tailwindcss/src/compat/apply-config-to-theme.ts | import type { DesignSystem } from '../design-system'
import { ThemeOptions } from '../theme'
import type { ResolvedConfig } from './config/types'
function resolveThemeValue(value: unknown, subValue: string | null = null): string | null {
if (
Array.isArray(value) &&
value.length === 2 &&
typeof value[1] ... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/theme-variants.ts | packages/tailwindcss/src/compat/theme-variants.ts | import type { DesignSystem } from '../design-system'
import type { ResolvedConfig } from './config/types'
export function registerThemeVariantOverrides(config: ResolvedConfig, designSystem: DesignSystem) {
let ariaVariants = config.theme.aria || {}
let supportsVariants = config.theme.supports || {}
let dataVaria... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/dark-mode.ts | packages/tailwindcss/src/compat/dark-mode.ts | import type { ResolvedConfig } from './config/types'
import type { PluginAPI } from './plugin-api'
export function darkModePlugin({ addVariant, config }: Pick<PluginAPI, 'addVariant' | 'config'>) {
let darkMode = config('darkMode', null) as ResolvedConfig['darkMode']
let [mode, selector = '.dark'] = Array.isArray(... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/apply-config-to-theme.test.ts | packages/tailwindcss/src/compat/apply-config-to-theme.test.ts | import { describe, expect, test } from 'vitest'
import { buildDesignSystem } from '../design-system'
import { Theme, ThemeOptions } from '../theme'
import { applyConfigToTheme, keyPathToCssProperty } from './apply-config-to-theme'
import { resolveConfig } from './config/resolve-config'
test('config values can be merge... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/apply-compat-hooks.ts | packages/tailwindcss/src/compat/apply-compat-hooks.ts | import { Features } from '..'
import { cssContext, styleRule, toCss, type AstNode } from '../ast'
import type { DesignSystem } from '../design-system'
import type { SourceLocation } from '../source-maps/source'
import { segment } from '../utils/segment'
import { walk, WalkAction } from '../walk'
import { applyConfigToT... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/colors.ts | packages/tailwindcss/src/compat/colors.ts | export default {
inherit: 'inherit',
current: 'currentcolor',
transparent: 'transparent',
black: '#000',
white: '#fff',
slate: {
'50': 'oklch(98.4% 0.003 247.858)',
'100': 'oklch(96.8% 0.007 247.896)',
'200': 'oklch(92.9% 0.013 255.508)',
'300': 'oklch(86.9% 0.022 252.894)',
'400': 'oklc... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/legacy-utilities.ts | packages/tailwindcss/src/compat/legacy-utilities.ts | import { decl } from '../ast'
import type { DesignSystem } from '../design-system'
import { isPositiveInteger } from '../utils/infer-data-type'
export function registerLegacyUtilities(designSystem: DesignSystem) {
for (let [value, direction] of [
['t', 'top'],
['tr', 'top right'],
['r', 'right'],
['b... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/flatten-color-palette.ts | packages/tailwindcss/src/compat/flatten-color-palette.ts | import { ThemeOptions } from '../theme'
type Colors = {
[key: string | number]: string | Colors
}
export default function flattenColorPalette(colors: Colors) {
let result: Record<string, string> = {}
for (let [root, children] of Object.entries(colors ?? {})) {
if (root === '__CSS_VALUES__') continue
if... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/config.test.ts | packages/tailwindcss/src/compat/config.test.ts | import { describe, expect, test, vi } from 'vitest'
import { compile, type Config } from '..'
import { default as plugin } from '../plugin'
import flattenColorPalette from './flatten-color-palette'
const css = String.raw
test('Config files can add content', async () => {
let input = css`
@tailwind utilities;
... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | true |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/config/deep-merge.ts | packages/tailwindcss/src/compat/config/deep-merge.ts | export function isPlainObject<T>(value: T): value is T & Record<keyof T, unknown> {
if (Object.prototype.toString.call(value) !== '[object Object]') {
return false
}
const prototype = Object.getPrototypeOf(value)
return prototype === null || Object.getPrototypeOf(prototype) === null
}
export function deep... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/config/resolve-config.ts | packages/tailwindcss/src/compat/config/resolve-config.ts | import type { DesignSystem } from '../../design-system'
import type { SourceLocation } from '../../source-maps/source'
import colors from '../colors'
import type { PluginWithConfig } from '../plugin-api'
import { createThemeFn } from '../plugin-functions'
import { deepMerge, isPlainObject } from './deep-merge'
import {... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/config/create-compat-config.ts | packages/tailwindcss/src/compat/config/create-compat-config.ts | import type { Theme } from '../../theme'
import defaultTheme from '../default-theme'
import type { UserConfig } from './types'
export function createCompatConfig(cssTheme: Theme): UserConfig {
return {
theme: {
...defaultTheme,
// In the defaultTheme config, the `colors` key is not a function but a
... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/config/resolve-config.test.ts | packages/tailwindcss/src/compat/config/resolve-config.test.ts | import { expect, test } from 'vitest'
import { buildDesignSystem } from '../../design-system'
import { Theme } from '../../theme'
import { resolveConfig } from './resolve-config'
test('top level theme keys are replaced', () => {
let design = buildDesignSystem(new Theme())
let { resolvedConfig, replacedThemeKeys }... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/compat/config/types.ts | packages/tailwindcss/src/compat/config/types.ts | import type { Plugin, PluginWithConfig } from '../plugin-api'
import type { PluginUtils } from './resolve-config'
export type ResolvableTo<T> = T | ((utils: PluginUtils) => T)
export interface UserConfig {
presets?: UserConfig[]
theme?: ThemeConfig
plugins?: Plugin[]
}
export type ThemeValue = ResolvableTo<Rec... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/segment.ts | packages/tailwindcss/src/utils/segment.ts | const BACKSLASH = 0x5c
const OPEN_CURLY = 0x7b
const CLOSE_CURLY = 0x7d
const OPEN_PAREN = 0x28
const CLOSE_PAREN = 0x29
const OPEN_BRACKET = 0x5b
const CLOSE_BRACKET = 0x5d
const DOUBLE_QUOTE = 0x22
const SINGLE_QUOTE = 0x27
// This is a shared buffer that is used to keep track of the current nesting level
// of pare... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/escape.test.ts | packages/tailwindcss/src/utils/escape.test.ts | import { describe, expect, test } from 'vitest'
import { escape, unescape } from './escape'
describe('escape', () => {
test('adds backslashes', () => {
expect(escape(String.raw`red-1/2`)).toMatchInlineSnapshot(`"red-1\\/2"`)
})
})
describe('unescape', () => {
test('removes backslashes', () => {
expect(u... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/brace-expansion.test.ts | packages/tailwindcss/src/utils/brace-expansion.test.ts | import { describe, expect, test } from 'vitest'
import { expand } from './brace-expansion'
describe('expand(…)', () => {
test.each([
['a/b/c', ['a/b/c']],
// Groups
['a/{x,y,z}/b', ['a/x/b', 'a/y/b', 'a/z/b']],
['{a,b}/{x,y}', ['a/x', 'a/y', 'b/x', 'b/y']],
['{{xs,sm,md,lg}:,}hidden', ['xs:hidde... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/variables.ts | packages/tailwindcss/src/utils/variables.ts | import * as ValueParser from '../value-parser'
import { walk, WalkAction } from '../walk'
export function extractUsedVariables(raw: string): string[] {
let variables: string[] = []
walk(ValueParser.parse(raw), (node) => {
if (node.kind !== 'function' || node.value !== 'var') return
walk(node.nodes, (child... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/to-key-path.test.ts | packages/tailwindcss/src/utils/to-key-path.test.ts | import { expect, it } from 'vitest'
import { toKeyPath } from './to-key-path'
it('can convert key paths to arrays', () => {
expect(toKeyPath('fontSize.xs')).toEqual(['fontSize', 'xs'])
expect(toKeyPath('fontSize.xs[1].lineHeight')).toEqual(['fontSize', 'xs', '1', 'lineHeight'])
expect(toKeyPath('colors.red.500')... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/infer-data-type.ts | packages/tailwindcss/src/utils/infer-data-type.ts | import { isColor } from './is-color'
import { hasMathFn } from './math-operators'
import { segment } from './segment'
type DataType =
| 'color'
| 'length'
| 'percentage'
| 'ratio'
| 'number'
| 'integer'
| 'url'
| 'position'
| 'bg-size'
| 'line-width'
| 'image'
| 'family-name'
| 'generic-name'... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/dimensions.ts | packages/tailwindcss/src/utils/dimensions.ts | import { DefaultMap } from '../../../tailwindcss/src/utils/default-map'
const DIMENSION_REGEX = /^(?<value>[-+]?(?:\d*\.)?\d+)(?<unit>[a-z]+|%)?$/i
// Parse a dimension such as `64rem` into `[64, 'rem']`.
export const dimensions = new DefaultMap((input) => {
let match = DIMENSION_REGEX.exec(input)
if (!match) ret... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/decode-arbitrary-value.ts | packages/tailwindcss/src/utils/decode-arbitrary-value.ts | import * as ValueParser from '../value-parser'
import { addWhitespaceAroundMathOperators } from './math-operators'
export function decodeArbitraryValue(input: string): string {
// There are definitely no functions in the input, so bail early
if (input.indexOf('(') === -1) {
return convertUnderscoresToWhitespac... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/math-operators.ts | packages/tailwindcss/src/utils/math-operators.ts | const LOWER_A = 0x61
const LOWER_Z = 0x7a
const UPPER_A = 0x41
const UPPER_Z = 0x5a
const LOWER_E = 0x65
const UPPER_E = 0x45
const ZERO = 0x30
const NINE = 0x39
const ADD = 0x2b
const SUB = 0x2d
const MUL = 0x2a
const DIV = 0x2f
const OPEN_PAREN = 0x28
const CLOSE_PAREN = 0x29
const COMMA = 0x2c
const SPACE = 0x20
con... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/brace-expansion.ts | packages/tailwindcss/src/utils/brace-expansion.ts | import { segment } from './segment'
const NUMERICAL_RANGE = /^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/
export function expand(pattern: string): string[] {
let index = pattern.indexOf('{')
if (index === -1) return [pattern]
let result: string[] = []
let pre = pattern.slice(0, index)
let rest = pattern.slice(ind... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/is-color.ts | packages/tailwindcss/src/utils/is-color.ts | const HASH = 0x23
const NAMED_COLORS = new Set([
// CSS Level 1 colors
'black',
'silver',
'gray',
'white',
'maroon',
'red',
'purple',
'fuchsia',
'green',
'lime',
'olive',
'yellow',
'navy',
'blue',
'teal',
'aqua',
// CSS Level 2/3 colors
'aliceblue',
'antiquewhite',
'aqua',
... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/replace-shadow-colors.test.ts | packages/tailwindcss/src/utils/replace-shadow-colors.test.ts | import { describe, expect, it } from 'vitest'
import { replaceAlpha } from '../utilities'
import { replaceShadowColors } from './replace-shadow-colors'
describe('without replacer', () => {
let replacer = (color: string) => `var(--tw-shadow-color, ${color})`
it('should handle var shadow', () => {
let parsed = ... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/escape.ts | packages/tailwindcss/src/utils/escape.ts | // https://drafts.csswg.org/cssom/#serialize-an-identifier
export function escape(value: string) {
if (arguments.length === 0) {
throw new TypeError('`CSS.escape` requires an argument.')
}
let string = String(value)
let length = string.length
let index = -1
let codeUnit: number
let result = ''
let f... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/segment.test.ts | packages/tailwindcss/src/utils/segment.test.ts | import { expect, it } from 'vitest'
import { segment } from './segment'
it('should result in a single segment when the separator is not present', () => {
expect(segment('foo', ':')).toEqual(['foo'])
})
it('should split by the separator', () => {
expect(segment('foo:bar:baz', ':')).toEqual(['foo', 'bar', 'baz'])
}... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/replace-shadow-colors.ts | packages/tailwindcss/src/utils/replace-shadow-colors.ts | import { segment } from './segment'
const KEYWORDS = new Set(['inset', 'inherit', 'initial', 'revert', 'unset'])
const LENGTH = /^-?(\d+|\.\d+)(.*?)$/g
export function replaceShadowColors(input: string, replacement: (color: string) => string) {
let shadows = segment(input, ',').map((shadow) => {
shadow = shadow... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/to-key-path.bench.ts | packages/tailwindcss/src/utils/to-key-path.bench.ts | import { bench } from 'vitest'
import { toKeyPath } from './to-key-path'
bench('toKeyPath', () => {
toKeyPath('fontSize.xs')
toKeyPath('fontSize.xs[1].lineHeight')
toKeyPath('colors.red.500')
toKeyPath('colors[red].500')
toKeyPath('colors[red].[500]')
toKeyPath('colors[red]500')
toKeyPath('colors[red][50... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/to-key-path.ts | packages/tailwindcss/src/utils/to-key-path.ts | import { segment } from './segment'
/**
* Parse a path string into an array of path segments
*
* Square bracket notation `a[b]` may be used to "escape" dots that would
* otherwise be interpreted as path separators.
*
* Example:
* a -> ['a']
* a.b.c -> ['a', 'b', 'c']
* a[b].c -> ['a', 'b', 'c']
* a[b.c].e.f ... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/compare.ts | packages/tailwindcss/src/utils/compare.ts | const ZERO = 48
const NINE = 57
/**
* Compare two strings alphanumerically, where numbers are compared as numbers
* instead of strings.
*/
export function compare(a: string, z: string) {
let aLen = a.length
let zLen = z.length
let minLen = aLen < zLen ? aLen : zLen
for (let i = 0; i < minLen; i++) {
le... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/default-map.ts | packages/tailwindcss/src/utils/default-map.ts | /**
* A Map that can generate default values for keys that don't exist.
* Generated default values are added to the map to avoid recomputation.
*/
export class DefaultMap<T = string, V = any> extends Map<T, V> {
constructor(private factory: (key: T, self: DefaultMap<T, V>) => V) {
super()
}
get(key: T): V... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/brace-expansion.bench.ts | packages/tailwindcss/src/utils/brace-expansion.bench.ts | // import braces from 'braces'
import { bench } from 'vitest'
import { expand } from './brace-expansion'
const PATTERN =
'{{xs,sm,md,lg}:,}{border-{x,y,t,r,b,l,s,e},bg,text,cursor,accent}-{{red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose,slate,gray,zinc,neutral,st... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/topological-sort.ts | packages/tailwindcss/src/utils/topological-sort.ts | export function topologicalSort<Key>(
graph: Map<Key, Set<Key>>,
options: { onCircularDependency: (path: Key[], start: Key) => void },
): Key[] {
let seen = new Set<Key>()
let wip = new Set<Key>()
let sorted: Key[] = []
function visit(node: Key, path: Key[] = []) {
if (!graph.has(node)) return
if ... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/replace-object.ts | packages/tailwindcss/src/utils/replace-object.ts | export function replaceObject<T extends object, U extends object | null>(target: T, source: U): U {
// Clear out the target object, otherwise inspecting the final object will
// look very confusing.
for (let key in target) delete target[key]
return Object.assign(target, source)
}
| typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/compare-breakpoints.ts | packages/tailwindcss/src/utils/compare-breakpoints.ts | export function compareBreakpoints(a: string, z: string, direction: 'asc' | 'desc') {
if (a === z) return 0
// Assumption: when a `(` exists, we are dealing with a CSS function.
//
// E.g.: `calc(100% - 1rem)`
let aIsCssFunction = a.indexOf('(')
let zIsCssFunction = z.indexOf('(')
let aBucket =
aIsC... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/segment.bench.ts | packages/tailwindcss/src/utils/segment.bench.ts | import { bench } from 'vitest'
import { segment } from './segment'
const values = [
['hover:focus:underline', ':'],
['var(--a, 0 0 1px rgb(0, 0, 0)), 0 0 1px rgb(0, 0, 0)', ','],
['var(--some-value,env(safe-area-inset-top,var(--some-other-value,env(safe-area-inset))))', ','],
]
bench('segment', () => {
for (l... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/decode-arbitrary-value.test.ts | packages/tailwindcss/src/utils/decode-arbitrary-value.test.ts | import { describe, expect, it } from 'vitest'
import { decodeArbitraryValue } from './decode-arbitrary-value'
describe('decoding arbitrary values', () => {
it('should replace an underscore with a space', () => {
expect(decodeArbitraryValue('foo_bar')).toBe('foo bar')
})
it('should replace multiple underscor... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/is-valid-arbitrary.ts | packages/tailwindcss/src/utils/is-valid-arbitrary.ts | const BACKSLASH = 0x5c
const OPEN_CURLY = 0x7b
const CLOSE_CURLY = 0x7d
const OPEN_PAREN = 0x28
const CLOSE_PAREN = 0x29
const OPEN_BRACKET = 0x5b
const CLOSE_BRACKET = 0x5d
const DOUBLE_QUOTE = 0x22
const SINGLE_QUOTE = 0x27
const SEMICOLON = 0x3b
// This is a shared buffer that is used to keep track of the current n... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/decode-arbitrary-value.bench.ts | packages/tailwindcss/src/utils/decode-arbitrary-value.bench.ts | import { bench } from 'vitest'
import { decodeArbitraryValue } from './decode-arbitrary-value'
const values = [
'#ffffff',
'calc(1+2)',
'[content-start]_calc(100%-1px)_[content-end]_minmax(1rem,1fr)',
'var(--some-value,env(safe-area-inset-top,var(--some-other-value,env(safe-area-inset))))',
]
bench('decodeArb... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/compare.test.ts | packages/tailwindcss/src/utils/compare.test.ts | import { expect, it } from 'vitest'
import { compare } from './compare'
const LESS = -1
const EQUAL = 0
const GREATER = 1
it.each([
// Same strings
['abc', 'abc', EQUAL],
// Shorter string comes first
['abc', 'abcd', LESS],
// Longer string comes first
['abcd', 'abc', GREATER],
// Numbers
['1', '1'... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/utils/infer-data-type.bench.ts | packages/tailwindcss/src/utils/infer-data-type.bench.ts | import { bench, expect, test } from 'vitest'
import { inferDataType } from './infer-data-type'
const colors = [
'slateblue',
'black',
'orange',
'rgb(255, 255, 255)',
'rgba(255, 255, 255, 1)',
'hsl(0, 0%, 100%)',
'hsla(0, 0%, 100%, 1)',
'hwb(0, 0%, 100%)',
'color(red a(1))',
'lab(0 0 0)',
'lch(0 0... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/source-maps/line-table.ts | packages/tailwindcss/src/source-maps/line-table.ts | /**
* Line offset tables are the key to generating our source maps. They allow us
* to store indexes with our AST nodes and later convert them into positions as
* when given the source that the indexes refer to.
*/
const LINE_BREAK = 0x0a
/**
* A position in source code
*
* https://tc39.es/ecma426/#sec-positio... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/source-maps/translation-map.test.ts | packages/tailwindcss/src/source-maps/translation-map.test.ts | import dedent from 'dedent'
import { assert, expect, test } from 'vitest'
import { toCss, type AstNode } from '../ast'
import * as CSS from '../css-parser'
import { createTranslationMap } from './source-map'
async function analyze(input: string) {
let ast = CSS.parse(input, { from: 'input.css' })
let css = toCss(a... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/source-maps/line-table.bench.ts | packages/tailwindcss/src/source-maps/line-table.bench.ts | import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { bench } from 'vitest'
import { createLineTable } from './line-table'
const currentFolder = fileURLToPath(new URL('..', import.meta.url))
const cssFile = readFileSync(currentFolder + '../preflight.css', 'utf-8')
const table = crea... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/source-maps/source.ts | packages/tailwindcss/src/source-maps/source.ts | /**
* The source code for one or more nodes in the AST
*
* This generally corresponds to a stylesheet
*/
export interface Source {
/**
* The path to the file that contains the referenced source code
*
* If this references the *output* source code, this is `null`.
*/
file: string | null
/**
* T... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/source-maps/source-map.ts | packages/tailwindcss/src/source-maps/source-map.ts | import { type AstNode } from '../ast'
import { DefaultMap } from '../utils/default-map'
import { walk } from '../walk'
import { createLineTable, type LineTable, type Position } from './line-table'
import type { Source } from './source'
// https://tc39.es/ecma426/#sec-original-position-record-type
export interface Orig... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/source-maps/source-map.test.ts | packages/tailwindcss/src/source-maps/source-map.test.ts | import remapping from '@jridgewell/remapping'
import dedent from 'dedent'
import MagicString from 'magic-string'
import * as fs from 'node:fs/promises'
import * as path from 'node:path'
import { SourceMapConsumer, SourceMapGenerator, type RawSourceMap } from 'source-map-js'
import { test } from 'vitest'
import { compil... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/source-maps/line-table.test.ts | packages/tailwindcss/src/source-maps/line-table.test.ts | import dedent from 'dedent'
import { expect, test } from 'vitest'
import { createLineTable } from './line-table'
const css = dedent
test('line tables', () => {
let text = css`
.foo {
color: red;
}
`
let table = createLineTable(`${text}\n`)
// Line 1: `.foo {\n`
expect(table.find(0)).toEqual(... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/test-utils/custom-serializer.ts | packages/tailwindcss/src/test-utils/custom-serializer.ts | import type { SnapshotSerializer } from 'vitest'
// We're reducing the precision of parameters to the `oklab()` function from
// our snapshots as we've observed lightningcss generating different decimal
// places in the last position when run on different operating systems.
const HIGH_PRECISION_COLOR_FUNCTION =
/(ok... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/src/test-utils/run.ts | packages/tailwindcss/src/test-utils/run.ts | import { compile } from '..'
import { optimize } from '../../../@tailwindcss-node/src/optimize'
export async function compileCss(
css: string,
candidates: string[] = [],
options: Parameters<typeof compile>[1] = {},
) {
let { build } = await compile(css, options)
return optimize(build(candidates)).code.trim()... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | false |
tailwindlabs/tailwindcss | https://github.com/tailwindlabs/tailwindcss/blob/9720692edac4b8045b3646b26e47ad7b97a37cbf/packages/tailwindcss/tests/ui.spec.ts | packages/tailwindcss/tests/ui.spec.ts | import { expect, test, type Page } from '@playwright/test'
import { Scanner } from '@tailwindcss/oxide'
import fs from 'node:fs'
import path from 'node:path'
import { optimize } from '../../@tailwindcss-node/src/optimize'
import { compile } from '../src'
import { segment } from '../src/utils/segment'
const html = Stri... | typescript | MIT | 9720692edac4b8045b3646b26e47ad7b97a37cbf | 2026-01-04T15:25:31.821134Z | true |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/build.utils.ts | build.utils.ts | export function createBanner(packageName: string, version: string) {
return `/**
* ${packageName} v${version}
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/`;
}
| typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/scripts/docs.ts | scripts/docs.ts | import fs from "node:fs";
import path from "node:path";
import util from "node:util";
import fg from "fast-glob";
import dox from "dox";
import prettier from "prettier";
import { ReflectionKind, type JSONOutput } from "typedoc";
import ts from "typescript";
type UnknownTag = {
type: string;
string: string;
html... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/scripts/close-no-repro-issues.ts | scripts/close-no-repro-issues.ts | import { execSync } from "node:child_process";
import { parseArgs } from "node:util";
const sleep = (ms: number) =>
new Promise<void>((resolve) => setTimeout(resolve, ms));
const ignoredIssues = new Set([9991, 12570, 13607, 13659, 11940]);
const { values: args } = parseArgs({
options: {
dryRun: {
type:... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/cli-test.ts | integration/cli-test.ts | import { spawnSync } from "node:child_process";
import { existsSync, rmSync } from "node:fs";
import * as path from "node:path";
import { expect, test } from "@playwright/test";
import dedent from "dedent";
import semver from "semver";
import { createProject } from "./helpers/vite";
const nodeBin = process.argv[0];
... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/fetch-globals-test.ts | integration/fetch-globals-test.ts | import { test, expect } from "@playwright/test";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
let fixture: Fixture;
let appFixture: AppFixture;
test.beforeAll(async () => {
fixture = await createFix... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/revalidate-test.ts | integration/revalidate-test.ts | import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("Revalidation", () => {
let app... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/form-data-test.ts | integration/form-data-test.ts | import { test, expect } from "@playwright/test";
import { createFixture, js } from "./helpers/create-fixture.js";
import type { Fixture } from "./helpers/create-fixture.js";
let fixture: Fixture;
test.beforeAll(async () => {
fixture = await createFixture({
files: {
"app/routes/_index.tsx": js`
... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/catch-boundary-test.ts | integration/catch-boundary-test.ts | import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("ErrorBoundary (thrown r... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-preview-test.ts | integration/vite-preview-test.ts | import { expect } from "@playwright/test";
import dedent from "dedent";
import {
reactRouterConfig,
viteConfig,
test,
type Files,
} from "./helpers/vite.js";
const tsx = dedent;
test.describe("Vite preview", () => {
test("serves built app with vite preview", async ({ vitePreview, page }) => {
const fil... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-hmr-hdr-rsc-test.ts | integration/vite-hmr-hdr-rsc-test.ts | import fs from "node:fs/promises";
import path from "node:path";
import { expect } from "@playwright/test";
import type { Files, TemplateName } from "./helpers/vite.js";
import { test, createEditor, viteConfig } from "./helpers/vite.js";
const templateName = "rsc-vite-framework" as const satisfies TemplateName;
test... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/playwright.config.ts | integration/playwright.config.ts | import type { PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
// silence expected warnings in Node 22.12 about `require(esm)`
// when it implicitly uses `react-router`'s `module-sync` export condition
process.env.NODE_OPTIONS =
(process.env.NODE_OPTIONS ?? "") + ` --no-war... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/route-collisions-test.ts | integration/route-collisions-test.ts | import { PassThrough } from "node:stream";
import { test, expect } from "@playwright/test";
import { createFixture, js } from "./helpers/create-fixture.js";
let ROOT_FILE_CONTENTS = js`
import { Outlet, Scripts } from "react-router";
export default function App() {
return (
<html lang="en">
<bo... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/fetcher-test.ts | integration/fetcher-test.ts | import { expect, test } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("useFetcher", () => {
... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-route-exports-modified-offscreen-test.ts | integration/vite-route-exports-modified-offscreen-test.ts | import { test, expect } from "@playwright/test";
import getPort from "get-port";
import {
createProject,
createEditor,
dev,
viteConfig,
} from "./helpers/vite.js";
const files = {
"app/routes/_index.tsx": String.raw`
import { useState, useEffect } from "react";
import { Link } from "react-router";
... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/server-entry-test.ts | integration/server-entry-test.ts | import { test, expect } from "@playwright/test";
import { createFixture, js } from "./helpers/create-fixture.js";
import type { Fixture } from "./helpers/create-fixture.js";
import { selectHtml } from "./helpers/playwright-fixture.js";
test.describe("Custom Server Entry", () => {
let fixture: Fixture;
let DATA_H... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/matches-test.ts | integration/matches-test.ts | import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("useMatches", () => {
... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/error-sanitization-test.ts | integration/error-sanitization-test.ts | import { test, expect } from "@playwright/test";
import {
UNSAFE_ErrorResponseImpl as ErrorResponseImpl,
UNSAFE_ServerMode as ServerMode,
} from "react-router";
import type { Fixture } from "./helpers/create-fixture.js";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
impo... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/prefetch-test.ts | integration/prefetch-test.ts | import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
css,
} from "./helpers/create-fixture.js";
import type {
Fixture,
FixtureInit,
AppFixture,
} from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
import { typ... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-dev-test.ts | integration/vite-dev-test.ts | import fs from "node:fs/promises";
import path from "node:path";
import { expect } from "@playwright/test";
import dedent from "dedent";
import {
reactRouterConfig,
viteConfig,
test,
type TemplateName,
type Files,
} from "./helpers/vite.js";
const tsx = dedent;
const fixtures = [
{
templateName: "vi... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/route-config-test.ts | integration/route-config-test.ts | import fs from "node:fs/promises";
import path from "node:path";
import { expect } from "@playwright/test";
import {
type Files,
createProject,
build,
test,
viteConfig,
createEditor,
viteMajorTemplates,
} from "./helpers/vite.js";
const js = String.raw;
test.describe("route config", () => {
viteMajor... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/http-test.ts | integration/http-test.ts | import { test, expect } from "@playwright/test";
import { UNSAFE_ServerMode as ServerMode } from "react-router";
import { createFixture, js } from "./helpers/create-fixture.js";
import type { Fixture } from "./helpers/create-fixture.js";
test.describe("HTTP behavior", () => {
let appFixture: Fixture;
test.before... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-absolute-base-test.ts | integration/vite-absolute-base-test.ts | import { expect } from "@playwright/test";
import dedent from "dedent";
import type { Files } from "./helpers/vite.js";
import { test, viteConfig } from "./helpers/vite.js";
let files: Files = async ({ port }) => ({
"vite.config.ts": dedent`
import { reactRouter } from "@react-router/dev/vite";
export defa... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/split-route-modules-test.ts | integration/split-route-modules-test.ts | import { test, expect, type Page } from "@playwright/test";
import getPort from "get-port";
import dedent from "dedent";
import {
createProject,
build,
reactRouterServe,
viteConfig,
reactRouterConfig,
} from "./helpers/vite.js";
const js = String.raw;
const files = {
"app/routes/_index.tsx": js`
impo... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/resource-routes-test.ts | integration/resource-routes-test.ts | import { test, expect } from "@playwright/test";
import { UNSAFE_ServerMode as ServerMode } from "react-router";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { AppFixture, Fixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/typegen-test.ts | integration/typegen-test.ts | import fs from "node:fs/promises";
import tsx from "dedent";
import * as Path from "pathe";
import { test } from "./helpers/fixtures";
const viteConfig = ({ rsc }: { rsc: boolean }) => {
const reactRouterImportSpecifier = rsc
? "unstable_reactRouterRSC as reactRouter"
: "reactRouter";
return tsx`
imp... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | true |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/fog-of-war-test.ts | integration/fog-of-war-test.ts | import { test, expect } from "@playwright/test";
import { PassThrough } from "node:stream";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
import { reactRouterConfig } from "./helpers/vite.js";
function get... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | true |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/fetcher-layout-test.ts | integration/fetcher-layout-test.ts | import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
let fixture: Fixture;
let appFixture: ... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/headers-test.ts | integration/headers-test.ts | import { test, expect } from "@playwright/test";
import { UNSAFE_ServerMode as ServerMode } from "react-router";
import { createFixture, js } from "./helpers/create-fixture.js";
import type { Fixture } from "./helpers/create-fixture.js";
test.describe("headers export", () => {
let ROOT_HEADER_KEY = "X-Test";
let ... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/rendering-test.ts | integration/rendering-test.ts | import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture, selectHtml } from "./helpers/playwright-fixture.js";
test.describe("rendering",... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-spa-mode-test.ts | integration/vite-spa-mode-test.ts | import fs from "node:fs";
import path from "node:path";
import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
css,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | true |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-prerender-test.ts | integration/vite-prerender-test.ts | import fs from "node:fs";
import path from "node:path";
import { PassThrough } from "node:stream";
import type { Page } from "@playwright/test";
import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture }... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | true |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/browser-entry-test.ts | integration/browser-entry-test.ts | import { test, expect } from "@playwright/test";
import {
createFixture,
js,
createAppFixture,
} from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test(
"expect to be able to browse backward out of a remix app, then forward " +
"twice in history and h... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-cloudflare-test.ts | integration/vite-cloudflare-test.ts | import type { Page } from "@playwright/test";
import { expect } from "@playwright/test";
import type { Files } from "./helpers/vite.js";
import { reactRouterConfig, test, viteConfig } from "./helpers/vite.js";
function getFiles({
v8_viteEnvironmentApi,
}: {
v8_viteEnvironmentApi: boolean;
}): Files {
return asy... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/session-storage-denied-test.ts | integration/session-storage-denied-test.ts | import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
type AppFixture,
type Fixture,
} from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("sessionStorage denied", () => {
let fixture: Fixture;
let... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/layout-route-test.ts | integration/layout-route-test.ts | import { test } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
test.describe("pathless layout routes", () => {
let a... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/error-data-request-test.ts | integration/error-data-request-test.ts | import { test, expect } from "@playwright/test";
import { UNSAFE_ErrorResponseImpl as ErrorResponseImpl } from "react-router";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
test.describe("ErrorBoundary"... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/redirects-test.ts | integration/redirects-test.ts | import { test, expect } from "@playwright/test";
import {
createFixture,
createAppFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
import type { TemplateName } from "./he... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-plugin-order-validation-test.ts | integration/vite-plugin-order-validation-test.ts | import { test, expect } from "@playwright/test";
import dedent from "dedent";
import { createProject, build, reactRouterConfig } from "./helpers/vite.js";
test.describe("Vite plugin order validation", () => {
test("Framework Mode with MDX plugin after React Router plugin", async () => {
let cwd = await createPr... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-manifests-test.ts | integration/vite-manifests-test.ts | import fs from "node:fs";
import path from "node:path";
import { test, expect } from "@playwright/test";
import getPort from "get-port";
import dedent from "dedent";
import { createProject, build, viteConfig } from "./helpers/vite.js";
const js = String.raw;
function createRoute(path: string) {
return {
[`app/... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/single-fetch-test.ts | integration/single-fetch-test.ts | import { test, expect } from "@playwright/test";
import {
UNSAFE_ServerMode as ServerMode,
UNSAFE_SingleFetchRedirectSymbol as SingleFetchRedirectSymbol,
} from "react-router";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/pla... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | true |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/error-boundary-test.ts | integration/error-boundary-test.ts | import { test, expect } from "@playwright/test";
import { UNSAFE_ServerMode as ServerMode } from "react-router";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | true |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/use-route-test.ts | integration/use-route-test.ts | import tsx from "dedent";
import { expect } from "@playwright/test";
import { test } from "./helpers/fixtures";
import * as Stream from "./helpers/stream";
import getPort from "get-port";
test.use({
files: {
"app/expect-type.ts": tsx`
export type Expect<T extends true> = T
export type Equal<X, Y> =... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-route-added-test.ts | integration/vite-route-added-test.ts | import fs from "node:fs/promises";
import path from "node:path";
import { test, expect } from "@playwright/test";
import getPort from "get-port";
import { createProject, dev, viteConfig } from "./helpers/vite.js";
const files = {
"app/routes/_index.tsx": String.raw`
import { useState, useEffect } from "react";
... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/custom-entry-server-test.ts | integration/custom-entry-server-test.ts | import { expect, test } from "@playwright/test";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
let fixture: Fixture;
let appFixture: ... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
remix-run/react-router | https://github.com/remix-run/react-router/blob/aaa150616e619efc8d26c092e8625962c2fb4246/integration/vite-build-test.ts | integration/vite-build-test.ts | import * as path from "node:path";
import { test, expect } from "@playwright/test";
import getPort from "get-port";
import glob from "glob";
import {
createProject,
build,
reactRouterServe,
reactRouterConfig,
viteConfig,
grep,
viteMajorTemplates,
} from "./helpers/vite.js";
let port: number;
let cwd: st... | typescript | MIT | aaa150616e619efc8d26c092e8625962c2fb4246 | 2026-01-04T15:29:26.871957Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.