Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Plugins #350

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
node_modules/
babel-preset/
jsx-runtime/
dist/
__test/

jsx-runtime/
!src/jsx-runtime/

plugins/
!src/plugins/
!tests/plugins/

.DS_Store
*.tgz
6 changes: 3 additions & 3 deletions .size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"name": "jsx",
"path": "jsx-runtime/index.js",
"import": "{ jsx }",
"limit": "346 B"
"limit": "302 B"
},
{
"name": "Fragment",
"path": "jsx-runtime/index.js",
"import": "{ Fragment }",
"limit": "81 B"
"limit": "80 B"
},
{
"name": "appendChildren",
Expand All @@ -21,6 +21,6 @@
"name": "core",
"path": "jsx-runtime/index.js",
"import": "{ jsx, Fragment }",
"limit": "365 B"
"limit": "318 B"
}
]
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default ts.config(
ignores: [
'babel-preset/',
'jsx-runtime/',
'plugins/'
],
},
js.configs.recommended,
Expand Down
13 changes: 5 additions & 8 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference lib="dom" />
/// <reference lib="es2023" />
import type { Properties, Property } from 'csstype';
import type { Property } from 'csstype';

export interface RefObject<T> {
readonly current: T
Expand Down Expand Up @@ -99,11 +99,6 @@ export type UIEventHandler<T = Element> = EventHandler<UIEvent, T>
export type WebGLContextEventHandler<T = Element> = EventHandler<WebGLContextEvent, T>
export type WheelEventHandler<T = Element> = EventHandler<WheelEvent, T>

export interface CSSProperties extends Properties<number | string> {
cssText?: string | null
[key: `--${string}`]: number | string
}

export type ControlsList = 'nodownload' | 'nofullscreen' | 'noremoteplayback'

export interface AriaAttributes {
Expand Down Expand Up @@ -531,7 +526,7 @@ declare global {
* @see https://developer.mozilla.org/en-US/docs/Glossary/Enumerated
*/
spellcheck?: 'true' | 'false'
style?: string | CSSProperties
style?: string | {}
tabIndex?: number | `${number}`
title?: string
translate?: 'yes' | 'no'
Expand Down Expand Up @@ -599,7 +594,9 @@ declare global {
writingsuggestions?: boolean | '' | 'true' | 'false'
}

export interface HTMLAttributes<T> extends AriaAttributes, Attributes {
export interface OverrideAttributes extends AriaAttributes, Attributes { }

export interface HTMLAttributes<T> extends OverrideAttributes {
_?: string
$?: Record<string, EventListener<T>>
ref?: Ref<T>
Expand Down
7 changes: 5 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
/** @type {import('jest').Config} */
const config = {
cache: false,
rootDir: 'tests',
rootDir: '.',
transform: {
'\\.tsx?$': 'babel-jest',
},
setupFilesAfterEnv: [
'<rootDir>/utils/jest-setup.ts'
'<rootDir>/tests/utils/jest-setup.ts'
],
modulePathIgnorePatterns: [
'<rootDir>/src/',
],
testEnvironment: 'jest-environment-jsdom',
extensionsToTreatAsEsm: ['.tsx', '.ts'],
Expand Down
Loading
Loading