comparable_version_sync 1.0.2+7
comparable_version_sync: ^1.0.2+7 copied to clipboard
Compare and merge JSON or SQLite versions with a configurable Flutter diff/merge widget.
Changelog #
1.0.2+7 #
- fixed homepage in pubspec.yaml.
- corrected LICENSE copyright display
1.0.2+6 #
- fixed LICENSE copyright year.
- fixed homepage in pubspec.yaml.
1.0.2+3 #
A-00X #
- Added
ComparableVersionTheme— every hardcoded dimension, colour, and animation parameter is now a named field with a sensible default and full dartdoc. Pass it to any constructor via the newthemeparameter onComparableVersionWidget, or usecopyWithto tweak only what you need. - Threaded
ComparableVersionThemethrough the entire widget tree:ComparableVersionWidget→DiffViewPanel→MergeOverlay→DiffDetailScreenandRawViewPanel. - Exported
ComparableVersionThemefrom the public barrel (comparable_version_sync.dart). - Inlined
dart_json_diffsource intolib/src/vendor/json_diff.dart, eliminating the path dependency that blocked pub.dev publishing. Apache 2.0 copyright header preserved; full license copied toLICENSE-dart-json-diffat the repository root. - Added
collectionas an explicit dependency (previously transitive only). - Removed
cupertino_icons(unused app-only dependency). - Removed
publish_to: none— package is now publishable to pub.dev. - Relaxed SDK lower-bound to
>=3.5.0 <4.0.0for broader compatibility. - Rewrote
README.mdwith full quick-start, API tables, theming reference, architecture diagram, and platform support matrix. - Cleaned up
pubspec.yaml(removed boilerplate comments, tightened description).
1.0.2 #
A-001 #
- Added
parentValueA/parentValueBfields toDiffContext(full parent JSON subtree from each file). - Added
valueAtPath(root, path)helper toContextResolverfor dot-notation navigation of nested JSON/Map structures. - Updated
JsonComparatorto parse root objects and populateparentValueA/parentValueBon everyDiffContext; added_parentPathhelper returning""for top-level diffs so the full root object is captured. - Updated
SqliteComparatorto setparentValueA/parentValueBto the full row map for field-level diffs and to the row map / null for missing-row diffs. - Implemented
lib/src/widgets/diff_detail_screen.dart: read-only git-style side-by-side view with synchronized vertical scroll, independent horizontal scroll per panel, draggable split divider, shared horizontal pan bar, and diff-key highlighting (green = local, amber = incoming).
A-002 #
- Added
showAcceptCompatibleButtonandacceptCompatibleByDefaultparameters toComparableVersionWidget.diffViewand wired through toDiffViewPanel. DiffViewPanelnow auto-resolves all compatible diffs (isCompatible == true) on load whenacceptCompatibleByDefaultis true; toggling theFilterChipoff removes only auto-accepted resolutions, preserving manually-resolved ones.- Added
_compatibleChipBar()toolbar above the diff list showing aFilterChiplabelled"Auto-accept compatible (N)". - Added
showDiffDetailButton,diffDetailButtonAlignment, andtoJsonConverterparameters toComparableVersionWidget.diffView, wired throughDiffViewPaneltoMergeOverlay. MergeOverlaynow shows a "View Raw Diff" button (icon:Icons.difference) — in theAppBaractions when alignment istopRight, or as aFilledButton.iconin aStackoverlay otherwise — that pushesDiffDetailScreen.- Created stub
lib/src/widgets/diff_detail_screen.dartfor compilation; full implementation pending Agent 001.
1.0.1 #
A-001 #
- Implemented
context_resolver.dart:resolveParent(dot-notation parent extraction) andsmallestSharedParent(longest common dot-notation prefix across a set of paths). - Implemented
compatibility_checker.dart:isCompatible(true when exactly one side is null/absent) andfilterIncompatible(retains only true conflicts). - Implemented
json_comparator.dart: reads both JSON files, runsJsonDiffer, recursively walks theDiffNodetree (changed / added / removed / sub-nodes) to produceList<DiffContext>, and filters viaCompatibilityCheckerwhenmode == incompatibleOnly. - Implemented
sqlite_comparator.dart: platform init (FFI on Windows/Linux, FFI-web on web, built-in on mobile), enumerates tables viasqlite_master, pages through records withLIMIT/OFFSET, matches by primary key when available and falls back to positional matching, producesList<DiffContext>with per-column diffs; filters viaCompatibilityCheckerwhen needed. - Fixed
json_comparator.dartfor web safety:dart:ioimport aliased;compare()now throwsUnsupportedErrorwith a clear message on web; addedcompareStrings()as the web-safe alternative for callers with pre-loaded JSON strings.
A-002 #
- Implemented
comparable_version_widget.dart: async comparator init, loading/error states, dispatch to RawViewPanel or DiffViewPanel; JSON and SQLite raw-data loading; merge-result builder with dot-notation path application. - Implemented
raw_view_panel.dart: responsive 2-panel layout (side-by-side ≥ 600 dp / tabbed portrait),_pageCachekeeping current ±1 pages, Prev/Next + jump-to-page dialog. - Implemented
diff_view_panel.dart: paginated diff list with_resolvedChoicesaccumulator, MergeOverlay tap flow, Finalize FAB showing resolved count, optionalmergeResultBuilderhook. - Implemented
merge_overlay.dart: Accept Local / Accept Incoming / Manual Edit cards with animated selection highlight, Confirm FAB. - Fixed
main.darttest harness: replaced non-existent asset paths with inline JSON written toDirectory.systemTemp; web path shows a friendly error via the widget's built-in error view. - Added multi-table SQLite raw view: table selector dropdown (hidden when only one table) above
RawViewPanel; switching table recomputes_rawTotalPagesand rekeys the panel to flush the page cache. - Synced
pubspec.yamlversion to1.0.1+2.
1.0.0 #
A-000 #
- Initial project setup: package skeleton, folder structure, enums, models, widget stubs.
- Cloned
google/dart-json_diff(Apache 2.0) intolib/third_party/dart_json_diff/. - Added dependencies:
sqflite,sqflite_common_ffi,sqflite_common_ffi_web,path, localjson_diff. - Wrote full architecture in
ARCHITECTURE.mdandarchitecture.mdc. - Defined public API via
ComparableVersionWidget.rawViewand.diffViewnamed constructors.