@@ -48,11 +48,15 @@ export type PerspectiveSelectEventDetail = {
4848
4949type ReactPerspectiveViewerAttributes < T > = React . HTMLAttributes < T > ;
5050
51- type JsxPerspectiveViewerElement = { class ?: string } & React . DetailedHTMLProps <
51+ type JsxPerspectiveViewerElement = {
52+ class ?: string ;
53+ } & React . DetailedHTMLProps <
5254 ReactPerspectiveViewerAttributes < HTMLPerspectiveViewerElement > ,
5355 HTMLPerspectiveViewerElement
5456> ;
5557
58+ // React <19
59+
5660declare global {
5761 namespace JSX {
5862 interface IntrinsicElements {
@@ -61,6 +65,39 @@ declare global {
6165 }
6266}
6367
68+ // React >=19
69+
70+ // Why are these `ts-ignore`? React 19 makes choice of JSX runtime in `tsconfig`
71+ // the determination of which runtime this needs to be, but this is chosen
72+ // by the user ... so I'm not sure what the React authors want from me here
73+ // exactly. Divination?
74+
75+ // @ts -ignore
76+ declare module "react/jsx-runtime" {
77+ namespace JSX {
78+ interface IntrinsicElements {
79+ "perspective-viewer" : JsxPerspectiveViewerElement ;
80+ }
81+ }
82+ }
83+
84+ // @ts -ignore
85+ declare module "react/jsx-dev-runtime" {
86+ namespace JSX {
87+ interface IntrinsicElements {
88+ "perspective-viewer" : JsxPerspectiveViewerElement ;
89+ }
90+ }
91+ }
92+
93+ declare module "react" {
94+ namespace JSX {
95+ interface IntrinsicElements {
96+ "perspective-viewer" : JsxPerspectiveViewerElement ;
97+ }
98+ }
99+ }
100+
64101// Custom Elements extensions
65102
66103declare global {
0 commit comments