instaui 0.1.15__tar.gz → 0.1.16__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.
- {instaui-0.1.15 → instaui-0.1.16}/PKG-INFO +1 -1
- instaui-0.1.16/instaui/action/__init__.py +10 -0
- instaui-0.1.16/instaui/action/cookie.py +25 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/radio.py +19 -6
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/radio_group.py +2 -3
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/component.py +2 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/__init__.py +2 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/label.py +9 -7
- instaui-0.1.16/instaui/components/html/radio.py +37 -0
- instaui-0.1.16/instaui/components/timer/timer.js +48 -0
- instaui-0.1.16/instaui/components/timer/timer.py +94 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/event/js_event.py +2 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/event/vue_event.py +3 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/event/web_event.py +2 -4
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/scope.py +11 -2
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui/__init__.py +2 -2
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui/__init__.pyi +2 -2
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/js_computed.py +16 -1
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/mixin_types/element_binding.py +7 -1
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/path_var.py +3 -3
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/vue_computed.py +17 -1
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/web_computed.py +5 -4
- {instaui-0.1.15 → instaui-0.1.16}/instaui/watch/js_watch.py +2 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/watch/web_watch.py +2 -6
- {instaui-0.1.15 → instaui-0.1.16}/pyproject.toml +2 -6
- {instaui-0.1.15 → instaui-0.1.16}/.gitignore +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/LICENSE +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/README.md +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/_helper/observable_helper.py +0 -0
- {instaui-0.1.15/instaui/ui_functions → instaui-0.1.16/instaui/action}/url_location.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/_settings.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/_use_tools/locale.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/component_types.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/_utils.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/affix.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/alert.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/anchor.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/auto_complete.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/avatar.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/back_top.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/badge.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/breadcrumb.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/button.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/calendar.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/card.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/carousel.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/cascader.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/checkbox.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/collapse.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/color_picker.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/comment.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/config_provider.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/date_picker.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/descriptions.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/divider.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/drawer.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/dropdown.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/empty.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/form.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/icon.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/image.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/input.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/input_number.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/input_password.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/input_search.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/input_tag.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/layout.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/layout_content.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/layout_footer.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/layout_header.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/layout_sider.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/link.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/list.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/mention.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/menu.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/modal.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/overflow_list.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/page_header.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/pagination.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/pop_confirm.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/popover.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/progress.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/rate.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/resize_box.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/result.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/select.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/skeleton.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/slider.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/space.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/spin.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/split.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/statistic.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/steps.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/switch.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/tab_pane.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/table.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/tabs.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/tag.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/textarea.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/time_picker.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/timeline.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/tooltip.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/transfer.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/tree.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/tree_select.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/trigger.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/typography.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/upload.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/verification_code.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/components/watermark.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/locales/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/locales/_index.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/locales/en_us.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/locales/zh_cn.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/setup.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/static/instaui-arco.css +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/static/instaui-arco.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/arco/types.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/boot_info.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/common/jsonable.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/column.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/content.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/directive.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/element.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/grid.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/_mixins.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/_preset.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/button.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/checkbox.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/date.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/div.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/form.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/heading.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/input.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/li.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/link.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/number.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/paragraph.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/range.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/select.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/span.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/table.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/textarea.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/html/ul.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/label.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/markdown/markdown.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/markdown/markdown.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/markdown/static/github-markdown.css +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/markdown/static/marked.esm.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/match.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/row.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/shiki_code.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/shiki_code.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/langs/css.mjs +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/langs/markdown.mjs +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/langs/python.mjs +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/langs/shell.mjs +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/langs/shellscript.mjs +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/shiki-core.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/shiki-style.css +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/shiki-transformers.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/themes/vitesse-dark.mjs +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/shiki_code/static/themes/vitesse-light.mjs +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/slot.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/transition_group.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/value_element.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/vfor.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/components/vif.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/consts.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/dependencies/component_dependency.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/dependencies/plugin_dependency.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/event/event_mixin.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/experimental/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/experimental/debug.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/extra_libs/_echarts.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/extra_libs/_import_error.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/extra_libs/_mermaid.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/extra_libs/_shiki_code.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/_utils.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/_uvicorn.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/debug_mode_router.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/dependency_router.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/event_router.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/middlewares.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/request_context.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/resource.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/server.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/fastapi_server/watch_router.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/handlers/_utils.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/handlers/event_handler.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/handlers/watch_handler.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/html_tools.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/inject.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/js/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/js/js_output.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/js/lambda_func.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/launch_collector.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/page_info.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/_app.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/_inner_helper.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/_link_manager.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/context.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/dataclass.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/resource.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/runtime/ui_state_scope.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/settings/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/settings/__settings.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/shadcn_classless/_index.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/shadcn_classless/static/shadcn-classless.css +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/skip.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_components.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_file_base_utils.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_functions.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_install.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_route_model.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_router_box.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_router_output.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_router_param_var.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/_types.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/spa_router/templates/page_routes +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/insta-ui.css +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/insta-ui.esm-browser.prod.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/insta-ui.ico +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/insta-ui.js.map +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/instaui-tools-browser.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/templates/debug/sse.html +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/templates/web.html +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/templates/webview.html +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/templates/zero.html +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/vue.esm-browser.prod.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/vue.global.prod.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/static/vue.runtime.esm-browser.prod.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/systems/file_system.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/systems/func_system.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/systems/js_system.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/systems/module_system.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/systems/pydantic_system.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/systems/string_system.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/tailwind/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/tailwind/_index.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/tailwind/static/tailwindcss-v3.min.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/tailwind/static/tailwindcss-v4.min.js +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/template/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/template/_utils.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/template/env.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/template/web_template.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/template/webview_template.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/template/zero_template.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui/events.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui_functions/input_slient_data.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui_functions/server.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui_functions/str_format.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui_functions/ui_page.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/ui_functions/ui_types.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/_types.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/data.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/element_ref.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/event_context.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/event_extend.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/mixin_types/common_type.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/mixin_types/observable.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/mixin_types/pathable.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/mixin_types/py_binding.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/mixin_types/str_format_binding.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/mixin_types/var_type.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/ref.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/slot_prop.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/state.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/types.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/vfor_item.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/vars/web_view_computed.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/version.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/watch/_types.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/watch/_utils.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/watch/vue_watch.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/webview/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/webview/_utils.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/webview/api.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/webview/func.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/webview/index.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/webview/resource.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/zero/__init__.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/zero/func.py +0 -0
- {instaui-0.1.15 → instaui-0.1.16}/instaui/zero/scope.py +0 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
from datetime import datetime
|
2
|
+
from typing import Optional, Union
|
3
|
+
from instaui.runtime.context import get_context
|
4
|
+
|
5
|
+
|
6
|
+
def cookie_output():
|
7
|
+
if not get_context().app_mode == "web":
|
8
|
+
raise ValueError("cookie_output can only be used in web mode")
|
9
|
+
|
10
|
+
|
11
|
+
def cookie_input():
|
12
|
+
pass
|
13
|
+
|
14
|
+
|
15
|
+
def set_cookie(
|
16
|
+
key: str,
|
17
|
+
value: str,
|
18
|
+
*,
|
19
|
+
max_age: Optional[int] = None,
|
20
|
+
expires: Optional[Union[int, datetime]] = None,
|
21
|
+
secure: bool = False,
|
22
|
+
httponly: bool = False,
|
23
|
+
samesite: Optional[str] = None,
|
24
|
+
):
|
25
|
+
pass
|
@@ -1,3 +1,4 @@
|
|
1
|
+
from __future__ import annotations
|
1
2
|
import typing
|
2
3
|
from typing_extensions import Unpack
|
3
4
|
import pydantic
|
@@ -6,13 +7,16 @@ from instaui.vars.types import TMaybeRef
|
|
6
7
|
from instaui.vars.state import StateModel
|
7
8
|
from instaui.arco import component_types
|
8
9
|
from instaui.event.event_mixin import EventMixin
|
9
|
-
from ._utils import handle_props
|
10
|
+
from ._utils import handle_props
|
11
|
+
from .radio_group import RadioGroup
|
12
|
+
|
13
|
+
_TValue = typing.Union[str, float]
|
10
14
|
|
11
15
|
|
12
16
|
class Radio(Element):
|
13
17
|
def __init__(
|
14
18
|
self,
|
15
|
-
value: typing.Optional[TMaybeRef[
|
19
|
+
value: typing.Optional[TMaybeRef[_TValue]] = None,
|
16
20
|
**kwargs: Unpack[component_types.TRadio],
|
17
21
|
):
|
18
22
|
super().__init__("a-radio")
|
@@ -33,8 +37,17 @@ class Radio(Element):
|
|
33
37
|
)
|
34
38
|
return self
|
35
39
|
|
40
|
+
@staticmethod
|
41
|
+
def from_list(options: TMaybeRef[typing.List[_TValue]], value: TMaybeRef[_TValue]):
|
42
|
+
return RadioGroup(value=value, options=options) # type: ignore
|
43
|
+
|
44
|
+
@staticmethod
|
45
|
+
def from_options(
|
46
|
+
options: TMaybeRef[typing.List[RadioOption]], value: TMaybeRef[_TValue]
|
47
|
+
):
|
48
|
+
return RadioGroup(value=value, options=options) # type: ignore
|
36
49
|
|
37
|
-
class RadioOption(StateModel):
|
38
|
-
|
39
|
-
|
40
|
-
|
50
|
+
class RadioOption(StateModel):
|
51
|
+
label: str
|
52
|
+
value: typing.Union[str, int]
|
53
|
+
disabled: bool = pydantic.Field(default=False)
|
@@ -4,7 +4,6 @@ from instaui.components.element import Element
|
|
4
4
|
from instaui.vars.types import TMaybeRef
|
5
5
|
from instaui.event.event_mixin import EventMixin
|
6
6
|
from ._utils import handle_props, try_setup_vmodel
|
7
|
-
from .radio import RadioOption
|
8
7
|
|
9
8
|
|
10
9
|
class TRadioGroup(TypedDict, total=False):
|
@@ -12,7 +11,7 @@ class TRadioGroup(TypedDict, total=False):
|
|
12
11
|
default_value: typing.Union[str, int, bool]
|
13
12
|
type: typing.Literal["radio", "button"]
|
14
13
|
size: typing.Literal["mini", "small", "medium", "large"]
|
15
|
-
options: typing.List[typing.Union[str, int
|
14
|
+
options: typing.List[typing.Union[str, int]]
|
16
15
|
direction: typing.Literal["horizontal", "vertical"]
|
17
16
|
disabled: bool
|
18
17
|
|
@@ -20,7 +19,7 @@ class TRadioGroup(TypedDict, total=False):
|
|
20
19
|
class RadioGroup(Element):
|
21
20
|
def __init__(
|
22
21
|
self,
|
23
|
-
value: typing.Optional[TMaybeRef[typing.Union[str,
|
22
|
+
value: typing.Optional[TMaybeRef[typing.Union[str, float]]] = None,
|
24
23
|
**kwargs: Unpack[TRadioGroup],
|
25
24
|
):
|
26
25
|
super().__init__("a-radio-group")
|
@@ -6,6 +6,7 @@ __all__ = [
|
|
6
6
|
"number",
|
7
7
|
"button",
|
8
8
|
"checkbox",
|
9
|
+
"radio",
|
9
10
|
"form",
|
10
11
|
"select",
|
11
12
|
"option",
|
@@ -32,6 +33,7 @@ from .input import Input as input
|
|
32
33
|
from .number import Number as number
|
33
34
|
from .button import Button as button
|
34
35
|
from .checkbox import Checkbox as checkbox
|
36
|
+
from .radio import Radio as radio
|
35
37
|
from .form import Form as form
|
36
38
|
from .select import Select as select
|
37
39
|
from .ul import Ul as ul
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from __future__ import annotations
|
2
|
-
from typing import TYPE_CHECKING, Any, Union
|
2
|
+
from typing import TYPE_CHECKING, Any, Optional, Union
|
3
3
|
from instaui.components.element import Element
|
4
4
|
|
5
5
|
if TYPE_CHECKING:
|
@@ -10,12 +10,14 @@ class Label(Element):
|
|
10
10
|
def __init__(
|
11
11
|
self,
|
12
12
|
text: Union[Any, TMaybeRef[Any], None] = None,
|
13
|
+
*,
|
14
|
+
for_: Optional[TMaybeRef[str]] = None,
|
13
15
|
):
|
14
16
|
super().__init__("label")
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
self.props(
|
19
|
+
{
|
20
|
+
"innerText": text,
|
21
|
+
"for": for_,
|
22
|
+
}
|
23
|
+
)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from typing import TYPE_CHECKING, Optional, Union
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.components.value_element import ValueElement
|
5
|
+
from ._mixins import InputEventMixin
|
6
|
+
|
7
|
+
if TYPE_CHECKING:
|
8
|
+
from instaui.vars.types import TMaybeRef
|
9
|
+
|
10
|
+
|
11
|
+
_T_value = str
|
12
|
+
|
13
|
+
|
14
|
+
class Radio(InputEventMixin, ValueElement[_T_value]):
|
15
|
+
def __init__(
|
16
|
+
self,
|
17
|
+
value: Optional[TMaybeRef[_T_value]] = None,
|
18
|
+
*,
|
19
|
+
model_value: Optional[_T_value] = None,
|
20
|
+
id: Optional[TMaybeRef[str]] = None,
|
21
|
+
name: Optional[TMaybeRef[str]] = None,
|
22
|
+
):
|
23
|
+
super().__init__("input", value, is_html_component=True)
|
24
|
+
self.props({"type": "radio"})
|
25
|
+
|
26
|
+
self.props(
|
27
|
+
{
|
28
|
+
"id": id,
|
29
|
+
"name": name,
|
30
|
+
}
|
31
|
+
)
|
32
|
+
|
33
|
+
if model_value is not None:
|
34
|
+
self.props({"value": model_value})
|
35
|
+
|
36
|
+
def _input_event_mixin_element(self) -> Element:
|
37
|
+
return self
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { ref, watch, onMounted, onUnmounted, toRef } from 'vue'
|
2
|
+
|
3
|
+
|
4
|
+
export default {
|
5
|
+
props: ['intervalSeconds', 'active', 'once', 'immediate'],
|
6
|
+
setup(props, { emit }) {
|
7
|
+
const { intervalSeconds, once = false, immediate = true } = props
|
8
|
+
const intervalId = ref(null)
|
9
|
+
const isActive = toRef(() => props.active ?? true)
|
10
|
+
const emitTick = once ? () => { emit('tick'); stopInterval() } : () => emit('tick')
|
11
|
+
|
12
|
+
if (once === false) {
|
13
|
+
watch(isActive, (value) => {
|
14
|
+
if (value) {
|
15
|
+
startInterval()
|
16
|
+
} else {
|
17
|
+
stopInterval()
|
18
|
+
}
|
19
|
+
})
|
20
|
+
}
|
21
|
+
|
22
|
+
const startInterval = () => {
|
23
|
+
if (immediate) {
|
24
|
+
emitTick()
|
25
|
+
}
|
26
|
+
|
27
|
+
intervalId.value = setInterval(() => {
|
28
|
+
emitTick()
|
29
|
+
}, intervalSeconds * 1000)
|
30
|
+
}
|
31
|
+
|
32
|
+
const stopInterval = () => {
|
33
|
+
clearInterval(intervalId.value)
|
34
|
+
emit('stop')
|
35
|
+
}
|
36
|
+
|
37
|
+
onMounted(() => {
|
38
|
+
if (isActive.value) {
|
39
|
+
startInterval()
|
40
|
+
}
|
41
|
+
})
|
42
|
+
|
43
|
+
onUnmounted(() => {
|
44
|
+
stopInterval()
|
45
|
+
})
|
46
|
+
}
|
47
|
+
|
48
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from typing import List, Optional
|
3
|
+
from instaui.components.element import Element
|
4
|
+
from instaui.vars.types import TMaybeRef
|
5
|
+
from instaui.event.event_mixin import EventMixin
|
6
|
+
|
7
|
+
|
8
|
+
class Timer(Element, esm="./timer.js"):
|
9
|
+
"""
|
10
|
+
A timer component that triggers events at specified intervals.
|
11
|
+
|
12
|
+
Args:
|
13
|
+
interval_seconds (float): Time in seconds between repeated events.
|
14
|
+
active (Optional[TMaybeRef[bool]], optional): If True, starts the timer immediately.
|
15
|
+
Accepts reactive values (e.g., state references) for dynamic control. Defaults to None (equivalent to True).
|
16
|
+
immediate (Optional[bool], optional): If True, triggers the first event immediately. Defaults to None (equivalent to True).
|
17
|
+
|
18
|
+
Example:
|
19
|
+
.. code-block:: python
|
20
|
+
from instaui import ui, html
|
21
|
+
|
22
|
+
@ui.page('/')
|
23
|
+
def index():
|
24
|
+
x = ui.state(0)
|
25
|
+
active = ui.state(True)
|
26
|
+
|
27
|
+
@ui.event(inputs=[x], outputs=[x])
|
28
|
+
def on_tick(x):
|
29
|
+
return x + 1
|
30
|
+
|
31
|
+
ui.timer(1, active=active).on_tick(on_tick)
|
32
|
+
|
33
|
+
html.checkbox(active)
|
34
|
+
html.span(x)
|
35
|
+
"""
|
36
|
+
|
37
|
+
def __init__(
|
38
|
+
self,
|
39
|
+
interval_seconds: float,
|
40
|
+
*,
|
41
|
+
active: Optional[TMaybeRef[bool]] = None,
|
42
|
+
immediate: Optional[bool] = None,
|
43
|
+
):
|
44
|
+
super().__init__("template")
|
45
|
+
|
46
|
+
self.props(
|
47
|
+
{
|
48
|
+
"intervalSeconds": interval_seconds,
|
49
|
+
"active": active,
|
50
|
+
"immediate": immediate,
|
51
|
+
}
|
52
|
+
)
|
53
|
+
|
54
|
+
def on_tick(
|
55
|
+
self,
|
56
|
+
handler: EventMixin,
|
57
|
+
*,
|
58
|
+
extends: Optional[List] = None,
|
59
|
+
):
|
60
|
+
"""
|
61
|
+
Registers an event handler for the "tick" event.
|
62
|
+
"""
|
63
|
+
return self.on("tick", handler, extends=extends)
|
64
|
+
|
65
|
+
def on_stop(
|
66
|
+
self,
|
67
|
+
handler: EventMixin,
|
68
|
+
*,
|
69
|
+
extends: Optional[List] = None,
|
70
|
+
):
|
71
|
+
"""
|
72
|
+
Registers an event handler for the "stop" event.
|
73
|
+
"""
|
74
|
+
|
75
|
+
return self.on("stop", handler, extends=extends)
|
76
|
+
|
77
|
+
@classmethod
|
78
|
+
def once(cls, delay_seconds: float):
|
79
|
+
"""
|
80
|
+
Creates a timer that triggers only once.
|
81
|
+
|
82
|
+
Args:
|
83
|
+
delay_seconds (float): Time in seconds before the timer triggers.
|
84
|
+
|
85
|
+
Example:
|
86
|
+
.. code-block:: python
|
87
|
+
msg = ui.state('')
|
88
|
+
on_done = ui.js_event(outputs=[msg],code="()=> 'Done!'")
|
89
|
+
|
90
|
+
ui.timer.once(1).on_tick(on_done)
|
91
|
+
html.span(msg) # will show "Done!" after 1 second
|
92
|
+
|
93
|
+
"""
|
94
|
+
return cls(delay_seconds, immediate=False).props({"once": True})
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import typing
|
2
2
|
from instaui.vars.mixin_types.py_binding import CanInputMixin, CanOutputMixin
|
3
|
+
from instaui.vars.mixin_types.element_binding import _try_mark_inputs_used
|
3
4
|
from instaui.common.jsonable import Jsonable
|
4
5
|
from .event_mixin import EventMixin
|
5
6
|
|
@@ -26,6 +27,7 @@ class JsEvent(Jsonable, EventMixin):
|
|
26
27
|
def _to_json_dict(self):
|
27
28
|
data = super()._to_json_dict()
|
28
29
|
data["type"] = self.event_type()
|
30
|
+
_try_mark_inputs_used(self._org_inputs)
|
29
31
|
|
30
32
|
if self._inputs:
|
31
33
|
data["inputs"] = self._inputs
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import typing
|
2
2
|
from instaui.common.jsonable import Jsonable
|
3
3
|
from instaui.vars.mixin_types.observable import ObservableMixin
|
4
|
+
from instaui.vars.mixin_types.element_binding import _try_mark_inputs_used
|
4
5
|
from .event_mixin import EventMixin
|
5
6
|
|
6
7
|
|
@@ -59,6 +60,8 @@ class VueEvent(Jsonable, EventMixin):
|
|
59
60
|
|
60
61
|
def _to_json_dict(self):
|
61
62
|
data = super()._to_json_dict()
|
63
|
+
|
64
|
+
_try_mark_inputs_used((self._bindings or {}).values())
|
62
65
|
data["type"] = self.event_type()
|
63
66
|
return data
|
64
67
|
|
@@ -4,7 +4,7 @@ from typing_extensions import ParamSpec
|
|
4
4
|
from instaui.common.jsonable import Jsonable
|
5
5
|
from instaui.runtime._app import get_current_scope, get_app_slot
|
6
6
|
from instaui.vars.mixin_types.py_binding import CanInputMixin, CanOutputMixin
|
7
|
-
from instaui.vars.mixin_types.element_binding import
|
7
|
+
from instaui.vars.mixin_types.element_binding import _try_mark_inputs_used
|
8
8
|
from instaui.handlers import event_handler
|
9
9
|
from .event_mixin import EventMixin
|
10
10
|
|
@@ -47,9 +47,7 @@ class WebEvent(Jsonable, EventMixin, typing.Generic[P, R]):
|
|
47
47
|
def _to_json_dict(self):
|
48
48
|
app = get_app_slot()
|
49
49
|
|
50
|
-
|
51
|
-
if isinstance(_input, ElementBindingMixin):
|
52
|
-
_input._mark_used()
|
50
|
+
_try_mark_inputs_used(self._inputs)
|
53
51
|
|
54
52
|
hkey = event_handler.create_handler_key(
|
55
53
|
page_path=app.page_path, handler=self._fn
|
@@ -97,14 +97,23 @@ class Scope(Jsonable):
|
|
97
97
|
if self._element_refs:
|
98
98
|
data["eRefs"] = self._element_refs
|
99
99
|
|
100
|
+
# web computeds
|
100
101
|
_web_computeds = [
|
101
102
|
computed for computed in self._web_computeds if computed._is_used()
|
102
103
|
]
|
103
104
|
|
104
105
|
if _web_computeds:
|
105
106
|
data["web_computed"] = _web_computeds
|
106
|
-
|
107
|
-
|
107
|
+
|
108
|
+
# js computeds
|
109
|
+
_js_computeds = [
|
110
|
+
computed for computed in self._js_computeds if computed._is_used()
|
111
|
+
]
|
112
|
+
|
113
|
+
if _js_computeds:
|
114
|
+
data["js_computed"] = _js_computeds
|
115
|
+
|
116
|
+
# vue computeds
|
108
117
|
if self._vue_computeds:
|
109
118
|
data["vue_computed"] = self._vue_computeds
|
110
119
|
if self._const_data:
|
@@ -61,7 +61,6 @@ __all__ = [
|
|
61
61
|
"skip_output",
|
62
62
|
"js_output",
|
63
63
|
"str_format",
|
64
|
-
"url_location",
|
65
64
|
"on_page_request_lifespan",
|
66
65
|
"webview",
|
67
66
|
"code",
|
@@ -69,6 +68,7 @@ __all__ = [
|
|
69
68
|
"echarts",
|
70
69
|
"use_shadcn_classless",
|
71
70
|
"mermaid",
|
71
|
+
"timer",
|
72
72
|
]
|
73
73
|
|
74
74
|
# -- static imports
|
@@ -107,6 +107,7 @@ from instaui.components.vif import VIf as vif
|
|
107
107
|
from instaui.components.match import Match as match
|
108
108
|
from instaui.components.content import Content as content
|
109
109
|
from instaui.components.label import label
|
110
|
+
from instaui.components.timer.timer import Timer as timer
|
110
111
|
|
111
112
|
from instaui.event.web_event import event, WebEvent as TEventFn
|
112
113
|
from instaui.event.js_event import js_event
|
@@ -126,7 +127,6 @@ import instaui.experimental as experimental
|
|
126
127
|
|
127
128
|
from instaui.ui_functions.server import create_server as server
|
128
129
|
from instaui.ui_functions.ui_page import page
|
129
|
-
from instaui.ui_functions.url_location import UrlLocation as url_location
|
130
130
|
from instaui.ui_functions.str_format import str_format
|
131
131
|
from instaui.ui_functions.ui_types import TBindable, is_bindable
|
132
132
|
|
@@ -61,7 +61,6 @@ __all__ = [
|
|
61
61
|
"skip_output",
|
62
62
|
"js_output",
|
63
63
|
"str_format",
|
64
|
-
"url_location",
|
65
64
|
"on_page_request_lifespan",
|
66
65
|
"webview",
|
67
66
|
"code",
|
@@ -69,6 +68,7 @@ __all__ = [
|
|
69
68
|
"echarts",
|
70
69
|
"use_shadcn_classless",
|
71
70
|
"mermaid",
|
71
|
+
"timer",
|
72
72
|
]
|
73
73
|
|
74
74
|
# -- static imports
|
@@ -107,6 +107,7 @@ from instaui.components.vif import VIf as vif
|
|
107
107
|
from instaui.components.match import Match as match
|
108
108
|
from instaui.components.content import Content as content
|
109
109
|
from instaui.components.label import label
|
110
|
+
from instaui.components.timer.timer import Timer as timer
|
110
111
|
|
111
112
|
from instaui.event.web_event import event, WebEvent as TEventFn
|
112
113
|
from instaui.event.js_event import js_event
|
@@ -126,7 +127,6 @@ import instaui.experimental as experimental
|
|
126
127
|
|
127
128
|
from instaui.ui_functions.server import create_server as server
|
128
129
|
from instaui.ui_functions.ui_page import page
|
129
|
-
from instaui.ui_functions.url_location import UrlLocation as url_location
|
130
130
|
from instaui.ui_functions.str_format import str_format
|
131
131
|
from instaui.ui_functions.ui_types import TBindable, is_bindable
|
132
132
|
|
@@ -6,7 +6,10 @@ from instaui.common.jsonable import Jsonable
|
|
6
6
|
from instaui.runtime._app import get_current_scope
|
7
7
|
from instaui.vars.path_var import PathVar
|
8
8
|
from instaui.vars.mixin_types.var_type import VarMixin
|
9
|
-
from instaui.vars.mixin_types.element_binding import
|
9
|
+
from instaui.vars.mixin_types.element_binding import (
|
10
|
+
ElementBindingMixin,
|
11
|
+
_try_mark_inputs_used,
|
12
|
+
)
|
10
13
|
from instaui.vars.mixin_types.py_binding import CanInputMixin
|
11
14
|
from instaui.vars.mixin_types.pathable import CanPathPropMixin
|
12
15
|
from instaui.vars.mixin_types.str_format_binding import StrFormatBindingMixin
|
@@ -55,6 +58,7 @@ class JsComputed(
|
|
55
58
|
deep_compare_on_input: bool = False,
|
56
59
|
) -> None:
|
57
60
|
self.code = code
|
61
|
+
self._org_inputs = inputs or []
|
58
62
|
|
59
63
|
scope = get_current_scope()
|
60
64
|
scope.register_js_computed(self)
|
@@ -67,6 +71,7 @@ class JsComputed(
|
|
67
71
|
|
68
72
|
self._async_init_value = async_init_value
|
69
73
|
self._deep_compare_on_input = deep_compare_on_input
|
74
|
+
self.__be_used = False
|
70
75
|
|
71
76
|
def __to_binding_config(self):
|
72
77
|
return {
|
@@ -90,6 +95,16 @@ class JsComputed(
|
|
90
95
|
def _to_observable_config(self):
|
91
96
|
return self.__to_binding_config()
|
92
97
|
|
98
|
+
def _mark_used(self):
|
99
|
+
if self.__be_used:
|
100
|
+
return
|
101
|
+
|
102
|
+
self.__be_used = True
|
103
|
+
_try_mark_inputs_used(self._org_inputs)
|
104
|
+
|
105
|
+
def _is_used(self):
|
106
|
+
return self.__be_used
|
107
|
+
|
93
108
|
def _to_json_dict(self):
|
94
109
|
data = super()._to_json_dict()
|
95
110
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Dict, Generic, TypeVar
|
1
|
+
from typing import Dict, Generic, Iterable, TypeVar
|
2
2
|
from abc import ABC, abstractmethod
|
3
3
|
|
4
4
|
T = TypeVar("T")
|
@@ -14,3 +14,9 @@ class ElementBindingMixin(ABC, Generic[T]):
|
|
14
14
|
|
15
15
|
def _is_used(self):
|
16
16
|
return True
|
17
|
+
|
18
|
+
|
19
|
+
def _try_mark_inputs_used(inputs: Iterable):
|
20
|
+
for input_ in inputs:
|
21
|
+
if isinstance(input_, ElementBindingMixin):
|
22
|
+
input_._mark_used()
|
@@ -13,8 +13,8 @@ class PathVar(PathableMixin):
|
|
13
13
|
def __getitem__(self, item: Union[str, int, CanPathPropMixin]):
|
14
14
|
return PathTrackerBindable(self)[item]
|
15
15
|
|
16
|
-
def
|
17
|
-
return PathTrackerBindable(self).
|
16
|
+
def not_(self):
|
17
|
+
return PathTrackerBindable(self).not_()
|
18
18
|
|
19
19
|
def __add__(self, other: str):
|
20
20
|
return PathTrackerBindable(self) + other
|
@@ -33,7 +33,7 @@ class PathTracker:
|
|
33
33
|
def __getattr__(self, key) -> Self:
|
34
34
|
return self.__new_self__([*self.paths, key])
|
35
35
|
|
36
|
-
def
|
36
|
+
def not_(self) -> Self:
|
37
37
|
return self.__new_self__([*self.paths, ["!"]])
|
38
38
|
|
39
39
|
def __add__(self, other: str) -> Self:
|
@@ -6,7 +6,10 @@ from instaui.common.jsonable import Jsonable
|
|
6
6
|
from instaui.runtime._app import get_current_scope
|
7
7
|
from instaui.vars.path_var import PathVar
|
8
8
|
from instaui.vars.mixin_types.var_type import VarMixin
|
9
|
-
from instaui.vars.mixin_types.element_binding import
|
9
|
+
from instaui.vars.mixin_types.element_binding import (
|
10
|
+
ElementBindingMixin,
|
11
|
+
_try_mark_inputs_used,
|
12
|
+
)
|
10
13
|
from instaui.vars.mixin_types.py_binding import CanInputMixin
|
11
14
|
from instaui.vars.mixin_types.pathable import CanPathPropMixin
|
12
15
|
from instaui.vars.mixin_types.str_format_binding import StrFormatBindingMixin
|
@@ -31,11 +34,13 @@ class VueComputed(
|
|
31
34
|
bindings: Optional[Mapping[str, Union[ElementBindingMixin, Any]]] = None,
|
32
35
|
) -> None:
|
33
36
|
self.code = fn_code
|
37
|
+
self._bindings = bindings
|
34
38
|
scope = get_current_scope()
|
35
39
|
scope.register_vue_computed(self)
|
36
40
|
|
37
41
|
self._sid = scope.id
|
38
42
|
self._id = scope.generate_vars_id()
|
43
|
+
self.__be_used = False
|
39
44
|
|
40
45
|
if bindings:
|
41
46
|
const_bind = []
|
@@ -71,10 +76,21 @@ class VueComputed(
|
|
71
76
|
def _to_observable_config(self):
|
72
77
|
return self.__to_binding_config()
|
73
78
|
|
79
|
+
def _mark_used(self):
|
80
|
+
if self.__be_used:
|
81
|
+
return
|
82
|
+
|
83
|
+
self.__be_used = True
|
84
|
+
_try_mark_inputs_used((self._bindings or {}).values())
|
85
|
+
|
86
|
+
def _is_used(self):
|
87
|
+
return self.__be_used
|
88
|
+
|
74
89
|
def _to_json_dict(self):
|
75
90
|
data = super()._to_json_dict()
|
76
91
|
data["sid"] = self._sid
|
77
92
|
data["id"] = self._id
|
93
|
+
_try_mark_inputs_used((self._bindings or {}).values())
|
78
94
|
return data
|
79
95
|
|
80
96
|
|
@@ -17,7 +17,10 @@ from instaui.handlers import watch_handler
|
|
17
17
|
|
18
18
|
from instaui.vars.path_var import PathVar
|
19
19
|
from instaui.vars.mixin_types.py_binding import CanInputMixin, CanOutputMixin
|
20
|
-
from instaui.vars.mixin_types.element_binding import
|
20
|
+
from instaui.vars.mixin_types.element_binding import (
|
21
|
+
ElementBindingMixin,
|
22
|
+
_try_mark_inputs_used,
|
23
|
+
)
|
21
24
|
from instaui.vars.mixin_types.pathable import CanPathPropMixin
|
22
25
|
from instaui.vars.mixin_types.str_format_binding import StrFormatBindingMixin
|
23
26
|
from instaui.vars.mixin_types.observable import ObservableMixin
|
@@ -146,9 +149,7 @@ class WebComputed(
|
|
146
149
|
return
|
147
150
|
|
148
151
|
self.__be_used = True
|
149
|
-
|
150
|
-
if isinstance(input_, ElementBindingMixin):
|
151
|
-
input_._mark_used()
|
152
|
+
_try_mark_inputs_used(self._org_inputs)
|
152
153
|
|
153
154
|
def _is_used(self):
|
154
155
|
return self.__be_used
|
@@ -6,6 +6,7 @@ from instaui.common.jsonable import Jsonable
|
|
6
6
|
from instaui.runtime._app import get_current_scope
|
7
7
|
|
8
8
|
from instaui.vars.mixin_types.py_binding import CanOutputMixin
|
9
|
+
from instaui.vars.mixin_types.element_binding import _try_mark_inputs_used
|
9
10
|
from instaui.vars.mixin_types.common_type import TObservableInput
|
10
11
|
from instaui._helper import observable_helper
|
11
12
|
|
@@ -21,6 +22,7 @@ class JsWatch(Jsonable):
|
|
21
22
|
once: bool = False,
|
22
23
|
flush: typing.Optional[_types.TFlush] = None,
|
23
24
|
) -> None:
|
25
|
+
_try_mark_inputs_used(inputs or [])
|
24
26
|
inputs = observable_helper.auto_made_inputs_to_slient(inputs, outputs)
|
25
27
|
|
26
28
|
get_current_scope().register_js_watch(self)
|