import 'package:jadb/_data_ingestion/sql_writable.dart'; /// Enum set in the kvg:position attribute, used by `` elements in the KanjiVG SVG files. enum KanjiPathGroupPosition { bottom, kamae, kamaec, left, middle, nyo, nyoc, right, tare, tarec, top, } /// Contents of a \ element in the KanjiVG SVG files. class KanjiPathGroupTreeNode extends SQLWritable { final String id; final List children; final String? element; final String? original; final KanjiPathGroupPosition? position; final String? radical; final int? part; KanjiPathGroupTreeNode({ required this.id, this.children = const [], this.element, this.original, this.position, this.radical, this.part, }); @override Map get sqlValue => { 'id': id, 'element': element, 'original': original, 'position': position?.name, 'radical': radical, 'part': part, }; } /// Contents of a `` element in the StrokeNumber's group in the KanjiVG SVG files class KanjiStrokeNumber extends SQLWritable { final int num; final double x; final double y; KanjiStrokeNumber(this.num, this.x, this.y); @override Map get sqlValue => {'num': num, 'x': x, 'y': y}; } /// Contents of a `` element in the KanjiVG SVG files class KanjiVGPath extends SQLWritable { final String id; final String type; final String svgPath; KanjiVGPath({required this.id, required this.type, required this.svgPath}); @override Map get sqlValue => { 'id': id, 'type': type, 'svgPath': svgPath, }; } class KanjiVGItem extends SQLWritable { final String character; final List paths; final List strokeNumbers; final List pathGroups; KanjiVGItem({ required this.character, required this.paths, required this.strokeNumbers, required this.pathGroups, }); @override Map get sqlValue => {'character': character}; }