feat: add live draw feature and clean up docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jjbruntonandClaude Opus 4.5 committed 2026-02-01 14:35:16 +00:00
1 parent 520d0a8444
commit 4c18afaeae
63 files changed
+6728 -12854

No files matched your search

@@ -0,0 +1,22 @@
import { Platform } from 'react-native';
import { setWidgetData, reloadWidgets } from '../../../../modules/widget-bridge';
import type { StrokeSegment } from '../types';
import { renderStrokesToBase64 } from './widgetImageExport';
export async function updateWidget(strokes: StrokeSegment[]): Promise<void> {
try {
const base64 = renderStrokesToBase64(strokes);
if (!base64) return;
if (Platform.OS === 'ios') {
setWidgetData('LiveDrawImage', base64);
reloadWidgets();
} else if (Platform.OS === 'android') {
setWidgetData('LiveDrawImage', base64);
reloadWidgets();
}
} catch (e) {
// Widget update is non-critical; don't crash the app
console.warn('Failed to update widget:', e);
}
}