flet 0.20.0.dev2211__tar.gz → 0.20.0.dev2221__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/PKG-INFO +2 -2
  2. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/pyproject.toml +2 -2
  3. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/commands/build.py +2 -1
  4. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/commands/create.py +7 -0
  5. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/commands/pack.py +43 -6
  6. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/flutter_service_worker.js +3 -3
  7. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/index.html +1 -1
  8. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/main.dart.js +50441 -50848
  9. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/README.md +0 -0
  10. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__init__.py +0 -0
  11. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/__init__.py +0 -0
  12. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/config.py +0 -0
  13. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/hook-flet.py +0 -0
  14. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/macos_utils.py +0 -0
  15. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/rthooks/pyi_rth_localhost_fletd.py +0 -0
  16. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/rthooks.dat +0 -0
  17. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/utils.py +0 -0
  18. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/__pyinstaller/win_utils.py +0 -0
  19. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/async_websocket_connection.py +0 -0
  20. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/auth/__init__.py +0 -0
  21. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/auth/providers/__init__.py +0 -0
  22. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/canvas/__init__.py +0 -0
  23. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/cli.py +0 -0
  24. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/commands/base.py +0 -0
  25. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/commands/options.py +0 -0
  26. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/commands/publish.py +0 -0
  27. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/cli/commands/run.py +0 -0
  28. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/constants.py +0 -0
  29. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/matplotlib_chart.py +0 -0
  30. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/plotly_chart.py +0 -0
  31. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/reconnecting_websocket.py +0 -0
  32. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/security.py +0 -0
  33. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/sync_websocket_connection.py +0 -0
  34. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/utils/__init__.py +0 -0
  35. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/version.py +0 -0
  36. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/.last_build_id +0 -0
  37. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/AssetManifest.bin +0 -0
  38. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/AssetManifest.bin.json +0 -0
  39. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/AssetManifest.json +0 -0
  40. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/FontManifest.json +0 -0
  41. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/NOTICES +0 -0
  42. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/fonts/MaterialIcons-Regular.otf +0 -0
  43. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/packages/window_manager/images/ic_chrome_close.png +0 -0
  44. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/packages/window_manager/images/ic_chrome_maximize.png +0 -0
  45. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/packages/window_manager/images/ic_chrome_minimize.png +0 -0
  46. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/packages/window_manager/images/ic_chrome_unmaximize.png +0 -0
  47. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/assets/shaders/ink_sparkle.frag +0 -0
  48. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/favicon.png +0 -0
  49. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/flutter.js +0 -0
  50. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/icons/apple-touch-icon-192.png +0 -0
  51. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/icons/icon-192.png +0 -0
  52. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/icons/icon-512.png +0 -0
  53. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/icons/icon-maskable-192.png +0 -0
  54. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/icons/icon-maskable-512.png +0 -0
  55. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/icons/loading-animation.png +0 -0
  56. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/manifest.json +0 -0
  57. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/python-worker.js +0 -0
  58. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/python.js +0 -0
  59. {flet-0.20.0.dev2211 → flet-0.20.0.dev2221}/src/flet/web/version.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flet
3
- Version: 0.20.0.dev2211
3
+ Version: 0.20.0.dev2221
4
4
  Summary: Flet for Python - easily build interactive multi-platform apps in Python
5
5
  License: Apache-2.0
6
6
  Author: Appveyor Systems Inc.
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Requires-Dist: cookiecutter (>=2.4.0,<3.0.0)
18
- Requires-Dist: flet-runtime (==0.20.0.dev2211)
18
+ Requires-Dist: flet-runtime (==0.20.0.dev2221)
19
19
  Requires-Dist: packaging (>=23.1,<24.0)
20
20
  Requires-Dist: qrcode (>=7.4.2,<8.0.0)
21
21
  Requires-Dist: typing-extensions (>=4.6.2,<5.0.0) ; python_version < "3.8"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "flet"
3
- version = "0.20.0.dev2211"
3
+ version = "0.20.0.dev2221"
4
4
  description = "Flet for Python - easily build interactive multi-platform apps in Python"
5
5
  authors = ["Appveyor Systems Inc. <hello@flet.dev>"]
6
6
  license = "Apache-2.0"
@@ -16,7 +16,7 @@ repository = "https://github.com/flet-dev/flet"
16
16
  documentation = "https://flet.dev/docs"
17
17
 
18
18
  [tool.poetry.dependencies]
19
- flet-runtime = "0.20.0.dev2211"
19
+ flet-runtime = "0.20.0.dev2221"
20
20
  python = "^3.7"
21
21
  typing-extensions = { version = "^4.6.2", python = "<3.8" }
22
22
  websocket-client = "^1.5.2"
@@ -16,6 +16,7 @@ import yaml
16
16
  from flet.cli.commands.base import BaseCommand
17
17
  from flet_core.utils import random_string, slugify
18
18
  from flet_runtime.utils import calculate_file_hash, copy_tree, is_windows
19
+ from packaging import version
19
20
  from rich import print
20
21
 
21
22
  if is_windows():
@@ -362,7 +363,7 @@ class Command(BaseCommand):
362
363
  if not template_url:
363
364
  template_url = DEFAULT_TEMPLATE_URL
364
365
  if flet.version.version and not template_ref:
365
- template_ref = flet.version.version
366
+ template_ref = version.Version(flet.version.version).base_version
366
367
 
367
368
  # create Flutter project from a template
368
369
  print("Creating Flutter bootstrap project...", end="")
@@ -1,8 +1,10 @@
1
1
  import argparse
2
2
  from pathlib import Path
3
3
 
4
+ import flet.version
4
5
  from flet.cli.commands.base import BaseCommand
5
6
  from flet_core.utils import slugify
7
+ from packaging import version
6
8
  from rich import print
7
9
 
8
10
 
@@ -43,6 +45,10 @@ class Command(BaseCommand):
43
45
 
44
46
  template_data = {"template_name": options.template}
45
47
 
48
+ template_ref = None
49
+ if flet.version.version:
50
+ template_ref = version.Version(flet.version.version).base_version
51
+
46
52
  out_dir = Path(options.output_directory).resolve()
47
53
  template_data["out_dir"] = out_dir.name
48
54
 
@@ -57,6 +63,7 @@ class Command(BaseCommand):
57
63
  # print("Template data:", template_data)
58
64
  cookiecutter(
59
65
  f"gh:flet-dev/flet-app-templates",
66
+ checkout=template_ref,
60
67
  directory=options.template,
61
68
  output_dir=str(out_dir.parent),
62
69
  no_input=True,
@@ -114,17 +114,54 @@ class Command(BaseCommand):
114
114
  action="store_true",
115
115
  help="Using this option creates a Manifest that will request elevation upon application start.(Windows)",
116
116
  )
117
+ parser.add_argument(
118
+ "-y",
119
+ "--yes",
120
+ dest="non_interactive",
121
+ default=False,
122
+ action="store_true",
123
+ help="Non-interactive mode.",
124
+ )
117
125
 
118
126
  def handle(self, options: argparse.Namespace) -> None:
127
+ is_dir_not_empty = lambda dir: os.path.isdir(dir) and len(os.listdir(dir)) != 0
128
+
119
129
  # delete "build" directory
120
130
  build_dir = os.path.join(os.getcwd(), "build")
121
- if os.path.exists(build_dir):
122
- shutil.rmtree(build_dir, ignore_errors=True)
131
+ if is_dir_not_empty(build_dir):
132
+ if options.non_interactive:
133
+ shutil.rmtree(build_dir, ignore_errors=True)
134
+ else:
135
+ delete_dir_prompt = input(
136
+ f'Do you want to delete "build" directory? (y/n) '
137
+ )
138
+ if not delete_dir_prompt.lower() == "n":
139
+ shutil.rmtree(build_dir, ignore_errors=True)
140
+ else:
141
+ print('Failing... "build" directory must be empty to proceed.')
142
+ exit(1)
143
+
144
+ # delete "dist" directory or DISTPATH directory
145
+ # if --distpath cli option is specified
146
+ if options.distpath:
147
+ dist_dir = os.path.join(os.getcwd(), options.distpath)
148
+ else:
149
+ dist_dir = os.path.join(os.getcwd(), "dist")
123
150
 
124
- # delete "dist" directory
125
- dist_dir = os.path.join(os.getcwd(), "dist")
126
- if os.path.exists(dist_dir):
127
- shutil.rmtree(dist_dir, ignore_errors=True)
151
+ if is_dir_not_empty(dist_dir):
152
+ if options.non_interactive:
153
+ shutil.rmtree(dist_dir, ignore_errors=True)
154
+ else:
155
+ delete_dir_prompt = input(
156
+ f'Do you want to delete "{os.path.basename(dist_dir)}" directory? (y/n) '
157
+ )
158
+ if not delete_dir_prompt.lower() == "n":
159
+ shutil.rmtree(dist_dir, ignore_errors=True)
160
+ else:
161
+ print(
162
+ f'Failing... DISTPATH "{os.path.basename(dist_dir)}" directory must be empty to proceed.'
163
+ )
164
+ exit(1)
128
165
 
129
166
  try:
130
167
  import PyInstaller.__main__
@@ -17,7 +17,7 @@ const RESOURCES = {"assets/AssetManifest.json": "d9150da08bcab79647bb00a0700488d
17
17
  "favicon.png": "302ac04c14db027d016d1fe74c6a80a0",
18
18
  "manifest.json": "7909dae66a9203092dc86b5a6162e79c",
19
19
  "flutter.js": "7d69e653079438abfbb24b82a655b0a4",
20
- "main.dart.js": "8fca0324a93b9700bbde9880d940d586",
20
+ "main.dart.js": "8101edde66c7c5bad0209322e23a1f62",
21
21
  "version.json": "3fea9d9c7b4ca6955aa03e762e0d2e13",
22
22
  "icons/apple-touch-icon-192.png": "8cf0d5162941f467a77f023c414a1812",
23
23
  "icons/icon-maskable-512.png": "aa798e6d780ff109da17c3a98d5f2619",
@@ -34,8 +34,8 @@ const RESOURCES = {"assets/AssetManifest.json": "d9150da08bcab79647bb00a0700488d
34
34
  "canvaskit/chromium/canvaskit.wasm": "143af6ff368f9cd21c863bfa4274c406",
35
35
  "canvaskit/chromium/canvaskit.js": "0ae8bbcc58155679458a0f7a00f66873",
36
36
  "python-worker.js": "62a4865b3d41771b39660076485879be",
37
- "index.html": "5692d07e56992acf94a6c61edac7d0e3",
38
- "/": "5692d07e56992acf94a6c61edac7d0e3"};
37
+ "index.html": "1fb7c5d1c914efd5a3504f3c33c54f89",
38
+ "/": "1fb7c5d1c914efd5a3504f3c33c54f89"};
39
39
  // The application shell files that are downloaded before a service worker can
40
40
  // start.
41
41
  const CORE = ["main.dart.js",
@@ -37,7 +37,7 @@
37
37
 
38
38
  <script>
39
39
  // The value below is injected by flutter build, do not touch.
40
- const serviceWorkerVersion = "919388047";
40
+ const serviceWorkerVersion = "3302277507";
41
41
  </script>
42
42
  <!-- This script adds the flutter initialization JS code -->
43
43
  <script src="flutter.js" defer></script>