flet-code-editor 0.1.0__tar.gz → 0.80.6.dev7593__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.
- {flet_code_editor-0.1.0/src/flet_code_editor.egg-info → flet_code_editor-0.80.6.dev7593}/PKG-INFO +4 -4
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/README.md +1 -1
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/pyproject.toml +3 -3
- flet_code_editor-0.80.6.dev7593/src/flet_code_editor/__init__.py +10 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flet_code_editor/code_editor.py +25 -16
- flet_code_editor-0.80.6.dev7593/src/flet_code_editor/types.py +849 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593/src/flet_code_editor.egg-info}/PKG-INFO +4 -4
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flet_code_editor.egg-info/SOURCES.txt +1 -0
- flet_code_editor-0.80.6.dev7593/src/flet_code_editor.egg-info/requires.txt +1 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flutter/flet_code_editor/lib/src/code_editor.dart +58 -70
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flutter/flet_code_editor/lib/src/utils/code_editor.dart +11 -3
- flet_code_editor-0.80.6.dev7593/src/flutter/flet_code_editor/pubspec.lock +1110 -0
- flet_code_editor-0.1.0/src/flet_code_editor/__init__.py +0 -9
- flet_code_editor-0.1.0/src/flet_code_editor/types.py +0 -51
- flet_code_editor-0.1.0/src/flet_code_editor.egg-info/requires.txt +0 -1
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/LICENSE +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/setup.cfg +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flet_code_editor.egg-info/dependency_links.txt +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flet_code_editor.egg-info/top_level.txt +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flutter/flet_code_editor/analysis_options.yaml +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flutter/flet_code_editor/lib/flet_code_editor.dart +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flutter/flet_code_editor/lib/src/extension.dart +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flutter/flet_code_editor/lib/src/utils/flet_code_controller.dart +0 -0
- {flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flutter/flet_code_editor/pubspec.yaml +0 -0
{flet_code_editor-0.1.0/src/flet_code_editor.egg-info → flet_code_editor-0.80.6.dev7593}/PKG-INFO
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flet-code-editor
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.80.6.dev7593
|
|
4
4
|
Summary: Edit and highlight source code inside Flet apps.
|
|
5
5
|
Author-email: Flet contributors <hello@flet.dev>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://flet.dev
|
|
8
|
-
Project-URL: Documentation, https://docs.flet.dev/
|
|
8
|
+
Project-URL: Documentation, https://docs.flet.dev/codeeditor
|
|
9
9
|
Project-URL: Repository, https://github.com/flet-dev/flet/tree/main/sdk/python/packages/flet-code-editor
|
|
10
10
|
Project-URL: Issues, https://github.com/flet-dev/flet/issues
|
|
11
11
|
Requires-Python: >=3.10
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: flet
|
|
14
|
+
Requires-Dist: flet==0.80.6.dev7593
|
|
15
15
|
Dynamic: license-file
|
|
16
16
|
|
|
17
17
|
# flet-code-editor
|
|
@@ -26,7 +26,7 @@ It is based on the [flutter_code_editor](https://pub.dev/packages/flutter_code_e
|
|
|
26
26
|
|
|
27
27
|
## Documentation
|
|
28
28
|
|
|
29
|
-
Detailed documentation to this package can be found [here](https://docs.flet.dev/
|
|
29
|
+
Detailed documentation to this package can be found [here](https://docs.flet.dev/codeeditor/).
|
|
30
30
|
|
|
31
31
|
## Usage
|
|
32
32
|
|
|
@@ -10,7 +10,7 @@ It is based on the [flutter_code_editor](https://pub.dev/packages/flutter_code_e
|
|
|
10
10
|
|
|
11
11
|
## Documentation
|
|
12
12
|
|
|
13
|
-
Detailed documentation to this package can be found [here](https://docs.flet.dev/
|
|
13
|
+
Detailed documentation to this package can be found [here](https://docs.flet.dev/codeeditor/).
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "flet-code-editor"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.80.6.dev7593"
|
|
4
4
|
description = "Edit and highlight source code inside Flet apps."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Flet contributors", email = "hello@flet.dev" }]
|
|
7
7
|
license = "Apache-2.0"
|
|
8
8
|
requires-python = ">=3.10"
|
|
9
9
|
dependencies = [
|
|
10
|
-
"flet",
|
|
10
|
+
"flet==0.80.6.dev7593",
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
[project.urls]
|
|
14
14
|
Homepage = "https://flet.dev"
|
|
15
|
-
Documentation = "https://docs.flet.dev/
|
|
15
|
+
Documentation = "https://docs.flet.dev/codeeditor"
|
|
16
16
|
Repository = "https://github.com/flet-dev/flet/tree/main/sdk/python/packages/flet-code-editor"
|
|
17
17
|
Issues = "https://github.com/flet-dev/flet/issues"
|
|
18
18
|
|
{flet_code_editor-0.1.0 → flet_code_editor-0.80.6.dev7593}/src/flet_code_editor/code_editor.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Optional, Union
|
|
2
2
|
|
|
3
3
|
import flet as ft
|
|
4
|
-
from flet_code_editor.types import CodeTheme,
|
|
4
|
+
from flet_code_editor.types import CodeLanguage, CodeTheme, CustomCodeTheme, GutterStyle
|
|
5
5
|
|
|
6
6
|
__all__ = ["CodeEditor"]
|
|
7
7
|
|
|
@@ -10,11 +10,15 @@ __all__ = ["CodeEditor"]
|
|
|
10
10
|
class CodeEditor(ft.LayoutControl):
|
|
11
11
|
"""Edit and highlight source code."""
|
|
12
12
|
|
|
13
|
-
language: Optional[
|
|
14
|
-
"""
|
|
13
|
+
language: Optional[CodeLanguage] = None
|
|
14
|
+
"""
|
|
15
|
+
Syntax highlighting language.
|
|
16
|
+
"""
|
|
15
17
|
|
|
16
|
-
code_theme: Optional[Union[
|
|
17
|
-
"""
|
|
18
|
+
code_theme: Optional[Union[CodeTheme, CustomCodeTheme]] = None
|
|
19
|
+
"""
|
|
20
|
+
Syntax highlighting theme.
|
|
21
|
+
"""
|
|
18
22
|
|
|
19
23
|
text_style: Optional[ft.TextStyle] = None
|
|
20
24
|
"""Text style for the editor content."""
|
|
@@ -22,34 +26,39 @@ class CodeEditor(ft.LayoutControl):
|
|
|
22
26
|
padding: Optional[ft.PaddingValue] = None
|
|
23
27
|
"""Padding around the editor."""
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
"""
|
|
29
|
+
value: Optional[str] = None
|
|
30
|
+
"""Full text including folded sections and service comments."""
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
"""
|
|
32
|
+
selection: Optional[ft.TextSelection] = None
|
|
33
|
+
"""
|
|
34
|
+
Represents the current text selection or caret position in the editor.
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
Setting this property updates the editor selection and may trigger
|
|
37
|
+
[`on_selection_change`][(c).] when the editor is focused.
|
|
38
|
+
"""
|
|
33
39
|
|
|
34
40
|
gutter_style: Optional[GutterStyle] = None
|
|
35
41
|
"""Gutter styling."""
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
"""Whether
|
|
43
|
+
autocomplete: Optional[bool] = False
|
|
44
|
+
"""Whether autocomplete is enabled."""
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
"""Words offered by
|
|
46
|
+
autocomplete_words: Optional[list[str]] = None
|
|
47
|
+
"""Words offered by autocomplete."""
|
|
42
48
|
|
|
43
49
|
read_only: Optional[bool] = False
|
|
44
50
|
"""Whether the editor is read-only."""
|
|
45
51
|
|
|
52
|
+
autofocus: Optional[bool] = False
|
|
53
|
+
"""Whether this editor should focus itself if nothing else is focused."""
|
|
54
|
+
|
|
46
55
|
on_change: Optional[ft.ControlEventHandler["CodeEditor"]] = None
|
|
47
56
|
"""Called when the editor text changes."""
|
|
48
57
|
|
|
49
58
|
on_selection_change: Optional[
|
|
50
59
|
ft.EventHandler[ft.TextSelectionChangeEvent["CodeEditor"]]
|
|
51
60
|
] = None
|
|
52
|
-
"""Called when the text selection changes."""
|
|
61
|
+
"""Called when the text selection or caret position changes."""
|
|
53
62
|
|
|
54
63
|
on_focus: Optional[ft.ControlEventHandler["CodeEditor"]] = None
|
|
55
64
|
"""Called when the editor receives focus."""
|