Skip to content

Commit

Permalink
Merge branch 'LinwoodDev:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGumpIT authored Feb 5, 2024
2 parents 7ea66c8 + 59c4568 commit 23bf1fa
Show file tree
Hide file tree
Showing 166 changed files with 61,657 additions and 1,667 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compress-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
compressOnly: true
- name: Create New Pull Request If Needed
if: steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
title: Compressed Images Nightly
branch-suffix: timestamp
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

<!--ENTER CHANGELOG HERE-->

## 2.0.3-rc.0 (2024-02-05)

* Fix export pdf print instead of export as file
* Fix scroll in pdf export dialog
* Fix pdf.js on web
* Fix exporting on web
* Fix notch area not being used in full screen ([#368](https://github.com/LinwoodDev/Butterfly/issues/368))
* Fix performance of the eraser tool ([#461](https://github.com/LinwoodDev/Butterfly/issues/461))
* Fix performance of the path eraser tool (partially [#528](https://github.com/LinwoodDev/Butterfly/issues/528))

Read more here: https://linwood.dev/butterfly/2.0.3-rc.0

## 2.0.2 (2024-01-29)

Nothing changed from the nightly build to the stable release.

See all changes since the last stable here: https://linwood.dev/butterfly/2.0.2

## 2.0.2-rc.0 (2024-01-22)

* Use thicker lines for label selection rect
* Restrict input to area bounds when inside area ([#573](https://github.com/LinwoodDev/Butterfly/issues/573))
* Fix template import opens blank document
* Fix zoom view not appearing
* Fix markdown property view not opening
* Fix creating component origin being page origin instead of selection origin

Read more here: https://linwood.dev/butterfly/2.0.2-rc.0

## 2.0.1 (2024-01-15)

Nothing changed from the nightly build to the stable release.
Expand Down
2 changes: 1 addition & 1 deletion FLUTTER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.16.8
3.16.9
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

| Version | Supported | |
| ------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| 2.0.2-dev | :warning: | [Docs](https://docs.butterfly.linwood.dev/docs/2.1/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.1-rc.1) |
| 2.0.1 | :white_check_mark: | [Docs](https://docs.butterfly.linwood.dev/docs/2.0/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.1) |
| 2.0.3-dev | :warning: | [Docs](https://docs.butterfly.linwood.dev/docs/2.1/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.3-rc.0) |
| 2.0.2 | :white_check_mark: | [Docs](https://docs.butterfly.linwood.dev/docs/2.0/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.2) |
| 1.6.1 | :x: | [Docs](https://docs.butterfly.linwood.dev/docs/1.6/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v1.6.1) |
| 1.5.1 | :x: | [Docs](https://docs.butterfly.linwood.dev/docs/1.5/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v1.5.1) |
| 1.4.4 | :x: | [Docs](https://docs.butterfly.linwood.dev/docs/1.4/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v1.4.4) |
Expand Down
4 changes: 2 additions & 2 deletions api/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: butterfly_api
description: The Linwood Butterfly API
version: 2.0.2-rc.0
version: 2.0.3-rc.1

environment:
sdk: '>=3.0.0 <4.0.0'
Expand All @@ -17,6 +17,6 @@ dev_dependencies:
test: ^1.25.0
json_serializable: ^6.7.1
build_runner: ^2.4.7
freezed: ^2.4.6
freezed: ^2.4.7
lints: ^3.0.0
analyzer: ^6.3.0
2 changes: 1 addition & 1 deletion app/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AppDir:
id: dev.linwood.butterfly
name: Linwood Butterfly
icon: dev.linwood.butterfly
version: 2.0.2-rc.0
version: 2.0.3-rc.1
exec: butterfly
exec_args: $@
apt:
Expand Down
59 changes: 29 additions & 30 deletions app/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.876.0)
aws-sdk-core (3.190.1)
aws-partitions (1.887.0)
aws-sdk-core (3.191.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.75.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sdk-kms (1.77.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.142.0)
aws-sdk-core (~> 3, >= 3.189.0)
aws-sdk-s3 (1.143.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
Expand All @@ -32,10 +32,10 @@ GEM
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20231109)
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.108.0)
excon (0.109.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -65,7 +65,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.0)
fastlane (2.217.0)
fastlane (2.218.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -92,7 +92,7 @@ GEM
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
optparse (>= 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
Expand All @@ -106,38 +106,38 @@ GEM
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.2)
google-apis-androidpublisher_v3 (0.56.0)
google-apis-core (>= 0.12.0, < 2.a)
google-apis-core (0.13.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
googleauth (~> 1.9)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.29.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-iamcredentials_v1 (0.18.0)
google-apis-core (>= 0.12.0, < 2.a)
google-apis-playcustomapp_v1 (0.14.0)
google-apis-core (>= 0.12.0, < 2.a)
google-apis-storage_v1 (0.33.0)
google-apis-core (>= 0.12.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (2.1.0)
google-cloud-env (2.1.1)
faraday (>= 1.0, < 3.a)
google-cloud-errors (1.3.1)
google-cloud-storage (1.45.0)
google-cloud-storage (1.48.1)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.29.0)
google-apis-core (~> 0.13)
google-apis-iamcredentials_v1 (~> 0.18)
google-apis-storage_v1 (~> 0.33)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
googleauth (~> 1.9)
mini_mime (~> 1.0)
googleauth (1.9.1)
googleauth (1.9.2)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.1)
jwt (>= 1.4, < 3.0)
Expand All @@ -157,7 +157,7 @@ GEM
multipart-post (2.3.0)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.1.1)
optparse (0.4.0)
os (1.1.4)
plist (3.7.1)
public_suffix (5.0.4)
Expand Down Expand Up @@ -192,9 +192,8 @@ GEM
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.23.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand Down
29 changes: 5 additions & 24 deletions app/lib/api/save.dart
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
import 'dart:io';

import 'package:file_selector/file_selector.dart' as fs;
import 'package:flutter/foundation.dart';
import 'package:butterfly/api/save_stub.dart'
if (dart.library.io) 'package:butterfly/api/save_io.dart'
if (dart.library.js) 'package:butterfly/api/save_html.dart' as save;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:share_plus/share_plus.dart';

Future<void> exportFile(
BuildContext context,
List<int> bytes,
String fileExtension,
String mimeType,
) async {
final file = fs.XFile.fromData(Uint8List.fromList(bytes),
mimeType: mimeType, name: 'output.$fileExtension');
if (kIsWeb || Platform.isAndroid || Platform.isIOS) {
Share.shareXFiles([file]);
return;
}
final result = await fs.getSaveLocation(
acceptedTypeGroups: [
fs.XTypeGroup(
label: AppLocalizations.of(context).export,
extensions: [fileExtension],
mimeTypes: [mimeType],
),
],
);
if (result == null) return;
await file.saveTo(result.path);
}
) =>
save.exportFile(context, bytes, fileExtension, mimeType);

Future<void> exportSvg(BuildContext context, String data) =>
exportFile(context, data.codeUnits, 'svg', 'image/svg');
Expand Down
20 changes: 20 additions & 0 deletions app/lib/api/save_html.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ignore_for_file: avoid_web_libraries_in_flutter

import 'dart:html';

import 'package:flutter/material.dart';

Future<void> exportFile(
BuildContext context,
List<int> bytes,
String fileExtension,
String mimeType,
) async {
final a = document.createElement('a') as AnchorElement;
// Create data URL
final blob = Blob([bytes], 'text/plain');
final url = Url.createObjectUrl(blob);
a.href = url;
a.download = 'output.$fileExtension';
a.click();
}
32 changes: 32 additions & 0 deletions app/lib/api/save_io.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:file_selector/file_selector.dart' as fs;
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:share_plus/share_plus.dart';

Future<void> exportFile(
BuildContext context,
List<int> bytes,
String fileExtension,
String mimeType,
) async {
final file = fs.XFile.fromData(Uint8List.fromList(bytes),
mimeType: mimeType, name: 'output.$fileExtension');
if (Platform.isAndroid || Platform.isIOS) {
Share.shareXFiles([file]);
return;
}
final result = await fs.getSaveLocation(
acceptedTypeGroups: [
fs.XTypeGroup(
label: AppLocalizations.of(context).export,
extensions: [fileExtension],
mimeTypes: [mimeType],
),
],
);
if (result == null) return;
await file.saveTo(result.path);
}
8 changes: 8 additions & 0 deletions app/lib/api/save_stub.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:flutter/material.dart';

Future<void> exportFile(
BuildContext context,
List<int> bytes,
String fileExtension,
String mimeType,
) async {}
Loading

0 comments on commit 23bf1fa

Please sign in to comment.