instaui 0.1.5__py3-none-any.whl → 0.1.7__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/arco/__init__.py +191 -0
- instaui/arco/_settings.py +25 -0
- instaui/arco/_use_tools/locale.py +50 -0
- instaui/arco/component_types.py +1019 -0
- instaui/arco/components/_utils.py +22 -0
- instaui/arco/components/affix.py +29 -0
- instaui/arco/components/alert.py +42 -0
- instaui/arco/components/anchor.py +42 -0
- instaui/arco/components/auto_complete.py +96 -0
- instaui/arco/components/avatar.py +55 -0
- instaui/arco/components/back_top.py +14 -0
- instaui/arco/components/badge.py +14 -0
- instaui/arco/components/breadcrumb.py +14 -0
- instaui/arco/components/button.py +43 -0
- instaui/arco/components/calendar.py +47 -0
- instaui/arco/components/card.py +14 -0
- instaui/arco/components/carousel.py +33 -0
- instaui/arco/components/cascader.py +111 -0
- instaui/arco/components/checkbox.py +32 -0
- instaui/arco/components/collapse.py +31 -0
- instaui/arco/components/color_picker.py +45 -0
- instaui/arco/components/comment.py +14 -0
- instaui/arco/components/config_provider.py +13 -0
- instaui/arco/components/date_picker.py +111 -0
- instaui/arco/components/descriptions.py +14 -0
- instaui/arco/components/divider.py +13 -0
- instaui/arco/components/drawer.py +98 -0
- instaui/arco/components/dropdown.py +45 -0
- instaui/arco/components/empty.py +14 -0
- instaui/arco/components/form.py +55 -0
- instaui/arco/components/icon.py +17 -0
- instaui/arco/components/image.py +33 -0
- instaui/arco/components/input.py +102 -0
- instaui/arco/components/input_number.py +97 -0
- instaui/arco/components/input_password.py +38 -0
- instaui/arco/components/input_search.py +37 -0
- instaui/arco/components/input_tag.py +110 -0
- instaui/arco/components/layout.py +13 -0
- instaui/arco/components/layout_content.py +6 -0
- instaui/arco/components/layout_footer.py +6 -0
- instaui/arco/components/layout_header.py +6 -0
- instaui/arco/components/layout_sider.py +53 -0
- instaui/arco/components/link.py +36 -0
- instaui/arco/components/list.py +68 -0
- instaui/arco/components/mention.py +97 -0
- instaui/arco/components/menu.py +88 -0
- instaui/arco/components/modal.py +97 -0
- instaui/arco/components/overflow_list.py +29 -0
- instaui/arco/components/page_header.py +29 -0
- instaui/arco/components/pagination.py +45 -0
- instaui/arco/components/pop_confirm.py +58 -0
- instaui/arco/components/popover.py +32 -0
- instaui/arco/components/progress.py +14 -0
- instaui/arco/components/radio.py +40 -0
- instaui/arco/components/radio_group.py +42 -0
- instaui/arco/components/rate.py +45 -0
- instaui/arco/components/resize_box.py +62 -0
- instaui/arco/components/result.py +14 -0
- instaui/arco/components/select.py +179 -0
- instaui/arco/components/skeleton.py +14 -0
- instaui/arco/components/slider.py +38 -0
- instaui/arco/components/space.py +14 -0
- instaui/arco/components/spin.py +14 -0
- instaui/arco/components/split.py +76 -0
- instaui/arco/components/statistic.py +14 -0
- instaui/arco/components/steps.py +32 -0
- instaui/arco/components/switch.py +57 -0
- instaui/arco/components/tab_pane.py +12 -0
- instaui/arco/components/table.py +276 -0
- instaui/arco/components/tabs.py +101 -0
- instaui/arco/components/tag.py +42 -0
- instaui/arco/components/textarea.py +84 -0
- instaui/arco/components/time_picker.py +76 -0
- instaui/arco/components/timeline.py +14 -0
- instaui/arco/components/tooltip.py +29 -0
- instaui/arco/components/transfer.py +58 -0
- instaui/arco/components/tree.py +120 -0
- instaui/arco/components/tree_select.py +86 -0
- instaui/arco/components/trigger.py +58 -0
- instaui/arco/components/typography.py +142 -0
- instaui/arco/components/upload.py +71 -0
- instaui/arco/components/verification_code.py +58 -0
- instaui/arco/components/watermark.py +14 -0
- instaui/arco/locales/__init__.py +4 -0
- instaui/arco/locales/_index.py +31 -0
- instaui/arco/locales/en_us.py +227 -0
- instaui/arco/locales/zh_cn.py +224 -0
- instaui/arco/setup.py +36 -0
- instaui/arco/static/instaui-arco.css +1 -0
- instaui/arco/static/instaui-arco.js +55771 -0
- instaui/arco/types.py +24 -0
- instaui/components/column.py +10 -2
- instaui/components/element.py +0 -2
- instaui/components/grid.py +81 -0
- instaui/components/markdown/static/github-markdown.css +1 -1
- instaui/components/row.py +8 -7
- instaui/components/shiki_code/static/shiki-style.css +179 -175
- instaui/experimental/link_sql/__init__.py +3 -0
- instaui/experimental/link_sql/_base.py +23 -0
- instaui/experimental/link_sql/_duckdb.py +221 -0
- instaui/experimental/link_sql/_types.py +15 -0
- instaui/experimental/link_sql/data_source.js +50 -0
- instaui/fastapi_server/debug_mode_router.py +1 -1
- instaui/html_tools.py +2 -3
- instaui/runtime/scope.py +28 -7
- instaui/static/insta-ui.css +1 -1
- instaui/static/insta-ui.esm-browser.prod.js +3663 -3719
- instaui/static/insta-ui.js.map +1 -1
- instaui/static/templates/debug/sse.html +1 -1
- instaui/tailwind/_index.py +2 -2
- instaui/ui_functions/ui_page.py +1 -1
- instaui/vars/data.py +7 -7
- instaui/vars/element_ref.py +2 -4
- instaui/vars/js_computed.py +6 -8
- instaui/vars/ref.py +6 -6
- instaui/vars/vue_computed.py +6 -7
- instaui/vars/web_computed.py +2 -3
- instaui/watch/vue_watch.py +23 -7
- instaui/zero/scope.py +3 -20
- {instaui-0.1.5.dist-info → instaui-0.1.7.dist-info}/METADATA +8 -5
- {instaui-0.1.5.dist-info → instaui-0.1.7.dist-info}/RECORD +123 -36
- instaui/daisyui/__init__.py +0 -26
- instaui/daisyui/_index.py +0 -20
- instaui/daisyui/button.py +0 -38
- instaui/daisyui/checkbox.py +0 -17
- instaui/daisyui/static/daisyui.css +0 -1
- instaui/daisyui/static/themes.css +0 -1
- instaui/daisyui/table.py +0 -35
- instaui/ui/__build_init.py +0 -73
- instaui/vars/_utils.py +0 -12
- {instaui-0.1.5.dist-info → instaui-0.1.7.dist-info}/LICENSE +0 -0
- {instaui-0.1.5.dist-info → instaui-0.1.7.dist-info}/WHEEL +0 -0
instaui/html_tools.py
CHANGED
@@ -5,6 +5,8 @@ from instaui.common.jsonable import dumps, dumps2dict
|
|
5
5
|
from instaui.runtime._app import get_app_slot
|
6
6
|
from instaui.tailwind._index import use_tailwind
|
7
7
|
|
8
|
+
use_tailwind = use_tailwind
|
9
|
+
|
8
10
|
|
9
11
|
def add_css_link(href: Union[str, Path]):
|
10
12
|
"""Add a link to a CSS file to the HTML document.
|
@@ -52,9 +54,6 @@ def add_style(content: str):
|
|
52
54
|
get_app_slot()._html_resource.add_style_tag(content)
|
53
55
|
|
54
56
|
|
55
|
-
use_tailwind = use_tailwind
|
56
|
-
|
57
|
-
|
58
57
|
def use_page_title(title: str):
|
59
58
|
"""Set the title of the HTML document.
|
60
59
|
|
instaui/runtime/scope.py
CHANGED
@@ -8,6 +8,9 @@ if TYPE_CHECKING:
|
|
8
8
|
from instaui.vars.mixin_types.var_type import VarMixin
|
9
9
|
from instaui.vars.mixin_types.py_binding import CanInputMixin
|
10
10
|
from instaui.vars.web_computed import WebComputed
|
11
|
+
from instaui.vars.js_computed import JsComputed
|
12
|
+
from instaui.vars.vue_computed import VueComputed
|
13
|
+
from instaui.vars.data import ConstData
|
11
14
|
from instaui.watch.web_watch import WebWatch
|
12
15
|
from instaui.watch.js_watch import JsWatch
|
13
16
|
from instaui.watch.vue_watch import VueWatch
|
@@ -20,7 +23,10 @@ class Scope(Jsonable):
|
|
20
23
|
self.id = id
|
21
24
|
self._vars_id_counter = 0
|
22
25
|
self._element_ref_id_counter = 0
|
23
|
-
self.
|
26
|
+
self._refs: List[VarMixin] = []
|
27
|
+
self._const_data: List[ConstData] = []
|
28
|
+
self._js_computeds: List[JsComputed] = []
|
29
|
+
self._vue_computeds: List[VueComputed] = []
|
24
30
|
self._web_computeds: List[WebComputed] = []
|
25
31
|
self._element_refs: List[ElementRef] = []
|
26
32
|
self._run_method_records: List = []
|
@@ -52,8 +58,17 @@ class Scope(Jsonable):
|
|
52
58
|
"on": [v._to_input_config() for v in on],
|
53
59
|
}
|
54
60
|
|
55
|
-
def
|
56
|
-
self.
|
61
|
+
def register_ref(self, var: VarMixin) -> None:
|
62
|
+
self._refs.append(var)
|
63
|
+
|
64
|
+
def register_data(self, data: ConstData) -> None:
|
65
|
+
self._const_data.append(data)
|
66
|
+
|
67
|
+
def register_js_computed(self, computed: JsComputed) -> None:
|
68
|
+
self._js_computeds.append(computed)
|
69
|
+
|
70
|
+
def register_vue_computed(self, computed: VueComputed) -> None:
|
71
|
+
self._vue_computeds.append(computed)
|
57
72
|
|
58
73
|
def register_web_computed(self, computed: WebComputed) -> None:
|
59
74
|
self._web_computeds.append(computed)
|
@@ -69,8 +84,8 @@ class Scope(Jsonable):
|
|
69
84
|
|
70
85
|
def _to_json_dict(self):
|
71
86
|
data = super()._to_json_dict()
|
72
|
-
if self.
|
73
|
-
data["
|
87
|
+
if self._refs:
|
88
|
+
data["refs"] = self._refs
|
74
89
|
if self._query:
|
75
90
|
data["query"] = self._query
|
76
91
|
if self._web_watchs:
|
@@ -83,6 +98,12 @@ class Scope(Jsonable):
|
|
83
98
|
data["eRefs"] = self._element_refs
|
84
99
|
if self._web_computeds:
|
85
100
|
data["web_computed"] = self._web_computeds
|
101
|
+
if self._js_computeds:
|
102
|
+
data["js_computed"] = self._js_computeds
|
103
|
+
if self._vue_computeds:
|
104
|
+
data["vue_computed"] = self._vue_computeds
|
105
|
+
if self._const_data:
|
106
|
+
data["data"] = self._const_data
|
86
107
|
|
87
108
|
return data
|
88
109
|
|
@@ -91,8 +112,8 @@ class GlobalScope(Scope):
|
|
91
112
|
def __init__(self, id: str) -> None:
|
92
113
|
super().__init__(id)
|
93
114
|
|
94
|
-
def
|
95
|
-
raise ValueError("Can not register
|
115
|
+
def register_ref(self, var: VarMixin) -> None:
|
116
|
+
raise ValueError("Can not register ref in global scope")
|
96
117
|
|
97
118
|
def register_web_computed(self, computed: WebComputed) -> None:
|
98
119
|
raise ValueError("Can not register web_computeds in global scope")
|
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
|
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)}
|