diff --git a/client/Imports.ts b/client/Imports.ts index 48847a1..15ff7ad 100644 --- a/client/Imports.ts +++ b/client/Imports.ts @@ -2,8 +2,28 @@ import * as React from 'https://esm.sh/react@18.3.1' import * as ReactDOM from 'https://esm.sh/react-dom@18.3.1' import CryptoES from 'https://unpkg.com/crypto-es@3.0.4/dist/index.mjs' +import type { Dialog } from 'https://unpkg.com/mdui@2.1.4/components/dialog/index.d.ts' +import type { TextField } from 'https://unpkg.com/mdui@2.1.4/components/text-field/index.d.ts' +import type { Button } from 'https://unpkg.com/mdui@2.1.4/components/button/index.d.ts' +import type { NavigationRail } from 'https://unpkg.com/mdui@2.1.4/components/navigation-rail/navigation-rail.d.ts' + +declare global { + namespace React { + namespace JSX { + interface IntrinsicAttributes { + id?: string + } + } + } +} + export { React, ReactDOM, CryptoES, + + Dialog as MduiDialog, + TextField as MduiTextField, + Button as MduiButton, + NavigationRail as MduiNavigationRail, } diff --git a/client/index.html b/client/index.html index abaf3ae..cc2dd44 100644 --- a/client/index.html +++ b/client/index.html @@ -99,7 +99,7 @@ alert('很抱歉, 此应用无法在较旧的浏览器运行, 请使用基于 Chromium 89+ 的浏览器(内核)使用 :(')