feat(android): integrate web api & native AI chat button (#10239)

This commit is contained in:
Aki Chang
2025-02-18 16:23:25 +08:00
committed by GitHub
parent 892fd16f52
commit 3f4b7ec51e
15 changed files with 302 additions and 23 deletions

View File

@@ -0,0 +1,3 @@
export interface AffineThemePlugin {
onThemeChanged(options: { darkMode: boolean }): Promise<void>;
}

View File

@@ -0,0 +1,8 @@
import { registerPlugin } from '@capacitor/core';
import type { AffineThemePlugin } from './definitions';
const AffineTheme = registerPlugin<AffineThemePlugin>('AffineTheme');
export * from './definitions';
export { AffineTheme };

View File

@@ -0,0 +1,4 @@
export interface AIButtonPlugin {
present(): Promise<void>;
dismiss(): Promise<void>;
}

View File

@@ -0,0 +1,8 @@
import { registerPlugin } from '@capacitor/core';
import type { AIButtonPlugin } from './definitions';
const AIButton = registerPlugin<AIButtonPlugin>('AIButton');
export * from './definitions';
export { AIButton };