Initial commit

This commit is contained in:
JB
2026-01-14 20:21:44 -05:00
commit e9865d3ee8
237 changed files with 15121 additions and 0 deletions

246
types/jsx.d.ts vendored Normal file
View File

@@ -0,0 +1,246 @@
import {
type ActionRow,
type Button,
type ChannelSelectMenu,
type GuildChannelTypes,
type MentionableSelectMenu,
type PartialEmoji,
type RoleSelectMenu,
type StringSelectMenu,
type TextInput,
type UserSelectMenu,
type LabelComponent,
type ContainerComponent,
type TextDisplayComponent,
type SectionComponent,
type MediaGalleryComponent,
type SeparatorComponent,
type FileComponent,
type InteractionButton,
type URLButton,
type PremiumButton,
type ThumbnailComponent,
} from "@projectdysnomia/dysnomia";
declare namespace JSX {
type Component =
| Button
| StringSelectMenu
| UserSelectMenu
| RoleSelectMenu
| MentionableSelectMenu
| ChannelSelectMenu
| TextInput
| LabelComponent
| ContainerComponent
| TextDisplayComponent
| SectionComponent
| MediaGalleryComponent
| SeparatorComponent
| FileComponent
| InteractionButton
| URLButton
| PremiumButton
| ThumbnailComponent;
type Element = Component | Promise<Component>;
interface ElementClass {
render: any;
}
interface ElementAttributesProperty {
props: {};
}
// This tells TypeScript to check children against the 'children' property
interface ElementChildrenAttribute {
children: {};
}
interface IntrinsicElements {
// Known elements - no index signature to enforce type safety
actionRow: { children: Element | Element[] };
button: {
label: string;
customId: string;
style: number;
emoji?: PartialEmoji;
disabled?: boolean;
};
container: {
accent?: number;
spoiler?: boolean;
children: Element | Element[];
};
textDisplay: { content: string };
modal: { customId?: string; title?: string; children: Element | Element[] };
label: { label: string; children: Element };
stringSelect: {
customId: string;
placeholder?: string;
minValues?: number;
maxValues?: number;
children: Element | Element[];
};
option: {
label: string;
value: string;
description?: string;
emoji?: PartialEmoji;
default?: boolean;
};
}
}
declare module "@star-kitten/lib/discord/jsx-runtime" {
export namespace JSX {
type Component =
| Button
| StringSelectMenu
| UserSelectMenu
| RoleSelectMenu
| MentionableSelectMenu
| ChannelSelectMenu
| TextInput
| LabelComponent
| ContainerComponent
| TextDisplayComponent
| SectionComponent
| MediaGalleryComponent
| SeparatorComponent
| FileComponent
| InteractionButton
| URLButton
| PremiumButton
| ThumbnailComponent;
type Element = Component | Promise<Component>;
interface ElementClass {
render: any;
}
interface ElementAttributesProperty {
props: {};
}
// This tells TypeScript to check children against the 'children' property
interface ElementChildrenAttribute {
children: {};
}
interface IntrinsicElements {
actionRow: { children: Element | Element[] };
button: {
label: string;
customId: string;
style: number;
emoji?: PartialEmoji;
disabled?: boolean;
};
container: {
accent?: number;
spoiler?: boolean;
children: Element | Element[];
};
textDisplay: { content: string };
modal: {
customId?: string;
title?: string;
children: Element | Element[];
};
label: { label: string; children: Element };
stringSelect: {
customId: string;
placeholder?: string;
minValues?: number;
maxValues?: number;
children: Element | Element[];
};
option: {
label: string;
value: string;
description?: string;
emoji?: PartialEmoji;
default?: boolean;
};
}
}
}
declare module "@star-kitten/lib/discord/jsx-dev-runtime" {
export namespace JSX {
type Component =
| Button
| StringSelectMenu
| UserSelectMenu
| RoleSelectMenu
| MentionableSelectMenu
| ChannelSelectMenu
| TextInput
| LabelComponent
| ContainerComponent
| TextDisplayComponent
| SectionComponent
| MediaGalleryComponent
| SeparatorComponent
| FileComponent
| InteractionButton
| URLButton
| PremiumButton
| ThumbnailComponent;
type Element = Component | Promise<Component>;
interface ElementClass {
render: any;
}
interface ElementAttributesProperty {
props: {};
}
// This tells TypeScript to check children against the 'children' property
interface ElementChildrenAttribute {
children: {};
}
interface IntrinsicElements {
actionRow: { children: Element | Element[] };
button: {
label: string;
customId: string;
style: number;
emoji?: PartialEmoji;
disabled?: boolean;
};
container: {
accent?: number;
spoiler?: boolean;
children: Element | Element[];
};
textDisplay: { content: string };
modal: {
customId?: string;
title?: string;
children: Element | Element[];
};
label: { label: string; children: Element };
stringSelect: {
customId: string;
placeholder?: string;
minValues?: number;
maxValues?: number;
children: Element | Element[];
};
option: {
label: string;
value: string;
description?: string;
emoji?: PartialEmoji;
default?: boolean;
};
}
}
}