chore: remove 4 dead stub files (ink-elements, ink-jsx, internal-modules, react-compiler-runtime)
This commit is contained in:
parent
7019fb8c97
commit
509b728212
45
src/types/ink-elements.d.ts
vendored
45
src/types/ink-elements.d.ts
vendored
|
|
@ -1,45 +0,0 @@
|
||||||
// Type declarations for custom Ink JSX elements
|
|
||||||
// Note: The detailed prop types are defined in ink-jsx.d.ts via React module augmentation.
|
|
||||||
// This file provides the global JSX namespace fallback declarations.
|
|
||||||
import type { ReactNode, Ref } from 'react';
|
|
||||||
import type { ClickEvent, FocusEvent, KeyboardEvent, Styles, TextStyles, DOMElement } from '@anthropic/ink';
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
namespace JSX {
|
|
||||||
interface IntrinsicElements {
|
|
||||||
'ink-box': {
|
|
||||||
ref?: Ref<DOMElement>;
|
|
||||||
tabIndex?: number;
|
|
||||||
autoFocus?: boolean;
|
|
||||||
onClick?: (event: ClickEvent) => void;
|
|
||||||
onFocus?: (event: FocusEvent) => void;
|
|
||||||
onFocusCapture?: (event: FocusEvent) => void;
|
|
||||||
onBlur?: (event: FocusEvent) => void;
|
|
||||||
onBlurCapture?: (event: FocusEvent) => void;
|
|
||||||
onMouseEnter?: () => void;
|
|
||||||
onMouseLeave?: () => void;
|
|
||||||
onKeyDown?: (event: KeyboardEvent) => void;
|
|
||||||
onKeyDownCapture?: (event: KeyboardEvent) => void;
|
|
||||||
style?: Styles;
|
|
||||||
stickyScroll?: boolean;
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
'ink-text': {
|
|
||||||
style?: Styles;
|
|
||||||
textStyles?: TextStyles;
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
'ink-link': {
|
|
||||||
href?: string;
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
'ink-raw-ansi': {
|
|
||||||
rawText?: string;
|
|
||||||
rawWidth?: number;
|
|
||||||
rawHeight?: number;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export {};
|
|
||||||
50
src/types/ink-jsx.d.ts
vendored
50
src/types/ink-jsx.d.ts
vendored
|
|
@ -1,50 +0,0 @@
|
||||||
/**
|
|
||||||
* Ink custom JSX intrinsic elements.
|
|
||||||
*
|
|
||||||
* With "jsx": "react-jsx", TypeScript resolves JSX types from react/jsx-runtime
|
|
||||||
* whose IntrinsicElements extends React.JSX.IntrinsicElements. We augment the
|
|
||||||
* 'react' module to inject our custom elements into React.JSX.IntrinsicElements.
|
|
||||||
*
|
|
||||||
* This file must be a module (have an import/export) for `declare module`
|
|
||||||
* augmentation to work correctly.
|
|
||||||
*/
|
|
||||||
import type { ReactNode, Ref } from 'react';
|
|
||||||
import type { ClickEvent, FocusEvent, KeyboardEvent, Styles, TextStyles, DOMElement } from '@anthropic/ink';
|
|
||||||
|
|
||||||
declare module 'react' {
|
|
||||||
namespace JSX {
|
|
||||||
interface IntrinsicElements {
|
|
||||||
'ink-box': {
|
|
||||||
ref?: Ref<DOMElement>;
|
|
||||||
tabIndex?: number;
|
|
||||||
autoFocus?: boolean;
|
|
||||||
onClick?: (event: ClickEvent) => void;
|
|
||||||
onFocus?: (event: FocusEvent) => void;
|
|
||||||
onFocusCapture?: (event: FocusEvent) => void;
|
|
||||||
onBlur?: (event: FocusEvent) => void;
|
|
||||||
onBlurCapture?: (event: FocusEvent) => void;
|
|
||||||
onMouseEnter?: () => void;
|
|
||||||
onMouseLeave?: () => void;
|
|
||||||
onKeyDown?: (event: KeyboardEvent) => void;
|
|
||||||
onKeyDownCapture?: (event: KeyboardEvent) => void;
|
|
||||||
style?: Styles;
|
|
||||||
stickyScroll?: boolean;
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
'ink-text': {
|
|
||||||
style?: Styles;
|
|
||||||
textStyles?: TextStyles;
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
'ink-link': {
|
|
||||||
href?: string;
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
'ink-raw-ansi': {
|
|
||||||
rawText?: string;
|
|
||||||
rawWidth?: number;
|
|
||||||
rawHeight?: number;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
31
src/types/internal-modules.d.ts
vendored
31
src/types/internal-modules.d.ts
vendored
|
|
@ -1,31 +0,0 @@
|
||||||
/**
|
|
||||||
* Type declarations for internal Anthropic packages that cannot be installed
|
|
||||||
* from public npm. All exports are typed as `any` to suppress errors while
|
|
||||||
* still allowing IDE navigation for the actual source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ============================================================================
|
|
||||||
// bun:bundle — compile-time macros
|
|
||||||
// ============================================================================
|
|
||||||
declare module "bun:bundle" {
|
|
||||||
export function feature(name: string): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module "bun:ffi" {
|
|
||||||
export function dlopen<T extends Record<string, { args: readonly string[]; returns: string }>>(path: string, symbols: T): { symbols: { [K in keyof T]: (...args: unknown[]) => unknown }; close(): void };
|
|
||||||
}
|
|
||||||
|
|
||||||
// Third-party modules without @types packages
|
|
||||||
declare module 'bidi-js' {
|
|
||||||
function getEmbeddingLevels(text: string, defaultDirection?: string): { paragraphLevel: number; levels: Uint8Array }
|
|
||||||
function getReorderSegments(text: string, embeddingLevels: { paragraphLevel: number; levels: Uint8Array }, start?: number, end?: number): [number, number][]
|
|
||||||
function getVisualOrder(reorderSegments: [number, number][]): number[]
|
|
||||||
export { getEmbeddingLevels, getReorderSegments, getVisualOrder }
|
|
||||||
export default { getEmbeddingLevels, getReorderSegments, getVisualOrder }
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module 'asciichart' {
|
|
||||||
function plot(series: number[] | number[][], config?: Record<string, unknown>): string
|
|
||||||
export { plot }
|
|
||||||
export default { plot }
|
|
||||||
}
|
|
||||||
3
src/types/react-compiler-runtime.d.ts
vendored
3
src/types/react-compiler-runtime.d.ts
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
declare module 'react/compiler-runtime' {
|
|
||||||
export function c(size: number): unknown[]
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user