feat: decouple PageController from PageAgent

This commit is contained in:
Simon
2026-01-19 17:14:09 +08:00
parent 3ce4d8e3fe
commit 4c5dd23fcd
3 changed files with 11 additions and 18 deletions

View File

@@ -3,6 +3,7 @@
* All rights reserved.
*/
import { type PageAgentConfig, PageAgentCore } from '@page-agent/core'
import { PageController } from '@page-agent/page-controller'
import { Panel } from '@page-agent/ui'
export type { PageAgentConfig }
@@ -11,7 +12,13 @@ export class PageAgent extends PageAgentCore {
panel: Panel
constructor(config: PageAgentConfig) {
super(config)
const pageController = new PageController({
...config,
enableMask: config.enableMask ?? true,
})
super({ ...config, pageController })
this.panel = new Panel(this, {
language: config.language,
})