refactor(core): CORE-18 type builtins and own prompt lifetimes

This commit is contained in:
Harvey Zhao committed 2026-09-11 12:31:01 +08:00
1 parent a842058136
commit 98a1800032
55 files changed
+26511 -650

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import type { ComponentHost } from './component/types'
import { appendElement } from './component/dom'
import { isClosing } from './lifecycle/instance'
import Component from './utils/component'
export interface LoadingHost extends ComponentHost {
template: { $player: HTMLElement, $loading: HTMLElement }
icons: { loading: string | Element }
}
export default class Loading extends Component<LoadingHost> {
constructor(art: LoadingHost) {
super(art)
this.name = 'loading'
const icon = art.icons.loading
if (!isClosing(art))
appendElement(art.template.$loading, icon)
}
}