mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 23:36:20 +00:00
Logseq-like outliner (render/edit Markdown per block, Enter/Tab/Shift-Tab, backspace merge, arrow navigation, drag to reorder, collapse, [[ # (( autocomplete, TODO/DONE), journals feed with prev/next links, page view with linked references and related panel, virtualised CustomPainter timeline, Ctrl+K quick switcher, sidebar with recents, light/dark theme with bundled Inter, Noto Serif and Source Code Pro. Edits are optimistic and serialised to the core through one write queue. Cargokit builds synapse-ffi; its build tool is patched to use the library name (synapse_ffi) of hyphenated crates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
790 B
Dart
25 lines
790 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:path_provider/path_provider.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
import 'src/app.dart';
|
|
import 'src/backend/graph_backend.dart';
|
|
import 'src/editor/block_row.dart' as editor;
|
|
import 'src/rust/frb_generated.dart';
|
|
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await RustLib.init();
|
|
editor.openUrl = (url) {
|
|
final uri = Uri.tryParse(url);
|
|
if (uri != null) launchUrl(uri, mode: LaunchMode.externalApplication);
|
|
};
|
|
final dir =
|
|
Platform.environment['SYNAPSE_GRAPH'] ??
|
|
'${(await getApplicationSupportDirectory()).path}${Platform.pathSeparator}graph';
|
|
final backend = await FfiGraphBackend.open(dir);
|
|
runApp(SynapseApp(backend: backend));
|
|
}
|