instaui 0.1.8__py3-none-any.whl → 0.1.10__py3-none-any.whl
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.
- instaui/_helper/observable_helper.py +11 -1
- instaui/arco/components/select.py +4 -1
- instaui/arco/static/instaui-arco.css +1 -1
- instaui/arco/static/instaui-arco.js +55771 -55771
- instaui/components/echarts/echarts.js +7 -5
- instaui/components/echarts/echarts.py +1 -1
- instaui/components/element.py +12 -22
- instaui/components/grid.py +63 -11
- instaui/components/html/paragraph.py +10 -0
- instaui/components/html/select.py +0 -5
- instaui/components/html/table.py +1 -1
- instaui/components/label.py +5 -0
- instaui/components/row.py +0 -3
- instaui/components/shiki_code/static/shiki-style.css +179 -179
- instaui/event/js_event.py +24 -0
- instaui/event/vue_event.py +66 -0
- instaui/event/web_event.py +36 -25
- instaui/experimental/__init__.py +1 -2
- instaui/handlers/_utils.py +27 -5
- instaui/shadcn_classless/static/shadcn-classless.css +403 -403
- instaui/spa_router/_file_base_utils.py +20 -16
- instaui/static/insta-ui.css +1 -1
- instaui/static/insta-ui.esm-browser.prod.js +3683 -3663
- instaui/static/insta-ui.js.map +1 -1
- instaui/systems/func_system.py +15 -0
- instaui/template/webview_template.py +0 -2
- instaui/ui/__init__.py +5 -1
- instaui/ui/__init__.pyi +5 -1
- instaui/ui_functions/ui_page.py +3 -3
- instaui/vars/js_computed.py +25 -1
- instaui/vars/state.py +15 -0
- instaui/vars/web_computed.py +42 -0
- instaui/watch/js_watch.py +37 -1
- instaui/watch/web_watch.py +53 -0
- instaui/webview/__init__.py +1 -0
- instaui/webview/index.py +0 -1
- instaui-0.1.10.dist-info/METADATA +153 -0
- {instaui-0.1.8.dist-info → instaui-0.1.10.dist-info}/RECORD +70 -73
- {instaui-0.1.8.dist-info → instaui-0.1.10.dist-info}/WHEEL +1 -1
- instaui/experimental/link_sql/__init__.py +0 -3
- instaui/experimental/link_sql/_base.py +0 -23
- instaui/experimental/link_sql/_duckdb.py +0 -221
- instaui/experimental/link_sql/_types.py +0 -15
- instaui/experimental/link_sql/data_source.js +0 -50
- instaui-0.1.8.dist-info/METADATA +0 -160
- {instaui-0.1.8.dist-info → instaui-0.1.10.dist-info/licenses}/LICENSE +0 -0
@@ -4,9 +4,9 @@ from datetime import datetime
|
|
4
4
|
import importlib.util
|
5
5
|
from pathlib import Path
|
6
6
|
import typing
|
7
|
-
from pydantic import BaseModel, Field
|
8
7
|
import jinja2
|
9
8
|
import inspect
|
9
|
+
from dataclasses import dataclass, field
|
10
10
|
|
11
11
|
|
12
12
|
def build_routes_from_files(
|
@@ -26,26 +26,28 @@ def build_routes_from_files(
|
|
26
26
|
print(f"Build _routes from files in {global_args.base_folder_path}...")
|
27
27
|
|
28
28
|
|
29
|
-
|
29
|
+
@dataclass
|
30
|
+
class _GlobalArgs:
|
30
31
|
base_folder_path: Path
|
31
32
|
module_name: str
|
32
33
|
route_config_var_name: str
|
33
34
|
|
34
35
|
|
35
36
|
class _model_utils:
|
36
|
-
|
37
|
+
@dataclass
|
38
|
+
class FileRouteInfo:
|
37
39
|
file: Path
|
38
40
|
base_folder: Path
|
39
41
|
global_args: _GlobalArgs
|
40
|
-
children: typing.List[_model_utils.FileRouteInfo] =
|
41
|
-
path: str =
|
42
|
-
name: str =
|
43
|
-
fn_path: typing.Optional[str] =
|
42
|
+
children: typing.List[_model_utils.FileRouteInfo] = field(default_factory=list)
|
43
|
+
path: str = field(init=False, default="")
|
44
|
+
name: str = field(init=False, default="")
|
45
|
+
fn_path: typing.Optional[str] = field(init=False, default=None)
|
44
46
|
|
45
|
-
params: str =
|
46
|
-
meta: typing.Dict =
|
47
|
+
params: str = field(init=False, default="")
|
48
|
+
meta: typing.Dict = field(init=False, default_factory=dict)
|
47
49
|
|
48
|
-
def
|
50
|
+
def __post_init__(self):
|
49
51
|
self.params = self._extract_params()
|
50
52
|
self.meta = self._extract_meta()
|
51
53
|
self.path, self.name = self._extra_path_name()
|
@@ -118,10 +120,11 @@ class _model_utils:
|
|
118
120
|
return ""
|
119
121
|
return self.name.replace(".", "_").replace(" ", "_")
|
120
122
|
|
121
|
-
|
123
|
+
@dataclass
|
124
|
+
class FileRouteRoot:
|
122
125
|
folder: str
|
123
126
|
module_name: str
|
124
|
-
infos: list[_model_utils.FileRouteInfo] =
|
127
|
+
infos: list[_model_utils.FileRouteInfo] = field(default_factory=list)
|
125
128
|
|
126
129
|
@staticmethod
|
127
130
|
def create_root(global_args: _GlobalArgs) -> FileRouteRoot:
|
@@ -196,10 +199,11 @@ class _code_gen:
|
|
196
199
|
loader=jinja2.PackageLoader("instaui.spa_router", "templates"),
|
197
200
|
)
|
198
201
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
202
|
+
@dataclass
|
203
|
+
class TemplateModel:
|
204
|
+
update_time: datetime = field(default_factory=datetime.now)
|
205
|
+
route_names: typing.List[str] = field(default_factory=list)
|
206
|
+
routes: typing.List[_model_utils.FileRouteInfo] = field(default_factory=list)
|
203
207
|
|
204
208
|
def get_all_main_import(self):
|
205
209
|
return [
|
instaui/static/insta-ui.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{color-scheme:light dark}:where(body){--insta-column-gap: 1rem;height:100vh}:where(*){box-sizing:border-box}:where(#app){height:100%}:where(.app-box,.insta-main){height:100%;overflow-y:auto}:where(.insta-main){--insta-padding: 16px;padding:var(--insta-padding, 16px)}
|
1
|
+
:root{color-scheme:light dark}:where(body){--insta-column-gap: 1rem;height:100vh}:where(*){box-sizing:border-box;margin:0;padding:0}:where(#app){height:100%}:where(.app-box,.insta-main){height:100%;overflow-y:auto}:where(.insta-main){--insta-padding: 16px;padding:var(--insta-padding, 16px)}
|