pgwidgets-js 0.3.1__tar.gz → 0.3.2__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.
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/PKG-INFO +1 -1
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/WhatsNew.rst +56 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/display.rst +4 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/layout.rst +15 -3
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/menus.rst +7 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/package.json +1 -1
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/defs.py +29 -9
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/pyodide/widget.py +86 -4
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ProgressBar.css +7 -0
- pgwidgets_js-0.3.2/pgwidgets_js/static/css/ScrollArea.css +23 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TreeView.css +6 -2
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Menu.js +7 -6
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/MenuBar.js +6 -3
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/RemoteInterface.js +15 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ToolBar.js +4 -3
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ToolBarAction.js +6 -1
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TreeView.js +23 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Widget.js +19 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/PKG-INFO +1 -1
- pgwidgets_js-0.3.1/pgwidgets_js/static/css/ScrollArea.css +0 -14
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/.flake8 +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/.github/workflows/tests.yml +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/.gitignore +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/.readthedocs.yaml +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/LICENSE.md +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/MANIFEST.in +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/README.md +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/Widgets.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/Widgets.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/Makefile +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/callbacks.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/conf.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/electron.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/external-widgets.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/for-developers.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/frameworks.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/getting-started.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/index.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/pyodide.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/remote.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/styling.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/controls.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/dialogs.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/index.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/nonvisual.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/docs/widgets/text.rst +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/all_widgets.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/all_widgets_pyodide.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/all_widgets_pyodide.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/all_widgets_pyscript.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/all_widgets_pyscript.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/box.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/button.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/canvas.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/checkbox.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/colordialog.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/combobox.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/debug_spinbox.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/dial.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/dialog.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/electron/.gitignore +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/electron/.npmrc +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/electron/index.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/electron/main.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/electron/package.json +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/expander.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/external_widgets.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/fixedlayout.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/frame.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/gridbox.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/htmlview.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/image.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/label.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/mdi_widget.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/menu.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/progressbar.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/pyodide_demo.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/pyscript.toml +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/radiobutton.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/remote.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/remote_demo.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/remote_demo_async.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/scroll_area.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/scrollable.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/scrollbar.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/slider.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/spinbox.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/splitter.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/tab_widget.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/tableview.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/text_entry.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/textarea.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/textentryset.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/textsource.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/togglebutton.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/toolbar.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/treeview.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/examples/videowidget.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/__init__.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/pyodide/__init__.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/pyodide/log.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/Widgets.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/Widgets.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/AbstractScrollArea.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Box.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Button.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/CheckBox.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ColorDialog.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ComboBox.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Dial.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Dialog.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Expander.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ExternalWidget.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/FixedLayout.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Frame.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/GridBox.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/HtmlView.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Image.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Label.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/MDIWidget.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Menu.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/RadioButton.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ScrollBar.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Slider.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/SpinBox.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Splitter.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/StatusBar.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TabWidget.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Text.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TextArea.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TextEntrySet.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TextSource.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ToggleButton.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ToolBar.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TopLevel.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/VideoWidget.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Widget.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/WindowMenu.css +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/file.svg +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/folder.svg +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/hdots.svg +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/pgicon.svg +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/pgwidgets-logo.png +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/pgwidgets-logo.svg +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/vdots.svg +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/AbstractScrollArea.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Box.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Button.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Callback.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Canvas.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/CheckBox.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ColorDialog.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ColorWidget.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ComboBox.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ComboBoxNative.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Dial.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Dialog.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Expander.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ExternalWidget.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/FileDialog.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/FixedLayout.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Frame.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/GridBox.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/HtmlView.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Image.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Label.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/MDIWidget.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/MenuAction.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Page.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ProgressBar.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/RadioButton.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ScrollArea.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ScrollBar.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Slider.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/SpinBox.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Splitter.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/StatusBar.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TabWidget.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TableView.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextArea.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextEntry.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextEntrySet.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextSource.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextWidget.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Timer.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ToggleButton.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TopLevel.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/VideoWidget.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/WindowMenu.js +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js/static/remote.html +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/SOURCES.txt +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/dependency_links.txt +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/requires.txt +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/top_level.txt +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/pyproject.toml +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/setup.cfg +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/setup.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/tests/__init__.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/tests/test_consistency.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/tests/test_defs.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/tests/test_recent_additions.py +0 -0
- {pgwidgets_js-0.3.1 → pgwidgets_js-0.3.2}/tests/test_static_assets.py +0 -0
|
@@ -4,6 +4,62 @@ What's New
|
|
|
4
4
|
Recent changes — since ``v0.3.0``
|
|
5
5
|
---------------------------------
|
|
6
6
|
|
|
7
|
+
Containers report their children: ``get_children``
|
|
8
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
9
|
+
|
|
10
|
+
More widgets are now treated as containers and expose the full
|
|
11
|
+
container method set (``get_children`` / ``num_children`` /
|
|
12
|
+
``remove`` / ``remove_widget`` / ``remove_all``):
|
|
13
|
+
|
|
14
|
+
* ``Frame``, ``Expander``, ``TopLevel`` and ``Page`` -- single-child
|
|
15
|
+
containers (one child via ``set_widget``); ``get_children()``
|
|
16
|
+
returns a 0- or 1-element list.
|
|
17
|
+
* ``Menu``, ``MenuBar`` and ``ToolBar`` -- these now extend
|
|
18
|
+
``ContainerWidget`` and route their item additions
|
|
19
|
+
(``add_name`` / ``add_menu`` / ``add_action`` / ``add_widget``)
|
|
20
|
+
through ``add_child``, so the menu actions / submenus / toolbar
|
|
21
|
+
items they hold are reported by ``get_children()``. Separators
|
|
22
|
+
and spacers (which are not widgets) are excluded.
|
|
23
|
+
|
|
24
|
+
This matches the behaviour generic code expects of any container.
|
|
25
|
+
|
|
26
|
+
ScrollArea: content fills the viewport
|
|
27
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
28
|
+
|
|
29
|
+
The scroll content wrapper is now a flex column. A child that opts
|
|
30
|
+
to fill (e.g. via ``set_expanding`` or a ``Box`` stretch factor) now
|
|
31
|
+
fills the viewport when its content is smaller, while still growing
|
|
32
|
+
and scrolling when the content exceeds it. A child with no expand
|
|
33
|
+
policy keeps its natural size (top-aligned), exactly as before.
|
|
34
|
+
|
|
35
|
+
TreeView / TableView: ``set_row_spacing`` / ``set_column_spacing``
|
|
36
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
37
|
+
|
|
38
|
+
Two new methods set the vertical (row) and horizontal (column) cell
|
|
39
|
+
padding, driving the ``--tv-row-pad`` / ``--tv-col-pad`` CSS variables
|
|
40
|
+
that ``.treeview-cell`` consumes (defaults ``2px`` / ``6px``).
|
|
41
|
+
``set_row_spacing`` additionally relaxes the fixed row ``min-height``
|
|
42
|
+
(``--tv-row-minheight``) so rows can tighten to their content +
|
|
43
|
+
padding instead of being held at the 24px floor.
|
|
44
|
+
|
|
45
|
+
``open-url``: open a link in the user's browser
|
|
46
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
47
|
+
|
|
48
|
+
A new remote-protocol message type, ``open-url``, opens a URL in the
|
|
49
|
+
connected browser (``window.open(url, "_blank", "noopener")``) -- so
|
|
50
|
+
host-side code can open a link in the *user's* browser rather than on
|
|
51
|
+
the machine running Python. (Note: a popup blocker may suppress it
|
|
52
|
+
if the user-activation from the originating click has lapsed.)
|
|
53
|
+
|
|
54
|
+
ProgressBar: visible height inside a vertical box
|
|
55
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
56
|
+
|
|
57
|
+
The progress bar now carries a ``min-height`` so it stays visible
|
|
58
|
+
when packed in a vertical ``Box``. (Its fill / label are absolutely
|
|
59
|
+
positioned, and a vertical ``Box`` forces inline ``height: auto`` on
|
|
60
|
+
children, which previously collapsed the bar to zero height --
|
|
61
|
+
leaving only the border line.)
|
|
62
|
+
|
|
7
63
|
Custom fonts: ``register-font`` / ``set-default-font``
|
|
8
64
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
9
65
|
|
|
@@ -396,6 +396,10 @@ supplies no value for it, so most interiors need no
|
|
|
396
396
|
- Set column width.
|
|
397
397
|
* - ``set_optimal_column_widths()``
|
|
398
398
|
- Auto-size all columns.
|
|
399
|
+
* - ``set_row_spacing(px)`` / ``set_column_spacing(px)``
|
|
400
|
+
- Set the vertical (row) / horizontal (column) cell padding in
|
|
401
|
+
pixels. ``set_row_spacing(0)`` also relaxes the row min-height
|
|
402
|
+
floor, giving tight rows.
|
|
399
403
|
* - ``set_show_grid(tf)`` / ``set_show_row_numbers(tf)`` / ``set_sortable(tf)``
|
|
400
404
|
- Toggle grid lines, row numbers, and click-to-sort.
|
|
401
405
|
* - ``set_column_editable(col_key, tf)``
|
|
@@ -8,7 +8,8 @@ TopLevel
|
|
|
8
8
|
|
|
9
9
|
The root-level container widget. Uses absolute positioning and attaches
|
|
10
10
|
to the document body. Typically the outermost widget in a pgwidgets
|
|
11
|
-
application.
|
|
11
|
+
application. A single-child container: ``get_children()`` returns its
|
|
12
|
+
0- or 1-element child list.
|
|
12
13
|
|
|
13
14
|
**Constructor:** ``new Widgets.TopLevel({title, icon, resizable,
|
|
14
15
|
moveable, closeable, minimizable, maximizable, lowerable,
|
|
@@ -463,6 +464,15 @@ ScrollArea
|
|
|
463
464
|
|
|
464
465
|
Scrollable viewport wrapping a single child widget.
|
|
465
466
|
|
|
467
|
+
If the child opts to fill (via ``set_expanding`` or a ``Box`` stretch
|
|
468
|
+
factor) it fills the viewport when its content is smaller than the
|
|
469
|
+
viewport, and grows (and scrolls) when the content is larger. A child
|
|
470
|
+
with no expand policy keeps its natural size, top-aligned.
|
|
471
|
+
|
|
472
|
+
Like the other single-child containers (:ref:`widget-frame`,
|
|
473
|
+
:ref:`widget-expander`, :ref:`widget-toplevel`), ``ScrollArea`` is a
|
|
474
|
+
container: ``get_children()`` returns its 0- or 1-element child list.
|
|
475
|
+
|
|
466
476
|
**Constructor:** ``new Widgets.ScrollArea({hscrollbar, vscrollbar})``
|
|
467
477
|
|
|
468
478
|
**Options:**
|
|
@@ -488,7 +498,8 @@ Scrollable viewport wrapping a single child widget.
|
|
|
488
498
|
Frame
|
|
489
499
|
-----
|
|
490
500
|
|
|
491
|
-
Titled border container for grouping widgets.
|
|
501
|
+
Titled border container for grouping widgets. A single-child container:
|
|
502
|
+
``get_children()`` returns its 0- or 1-element child list.
|
|
492
503
|
|
|
493
504
|
**Constructor:** ``new Widgets.Frame({title})``
|
|
494
505
|
|
|
@@ -521,7 +532,8 @@ Titled border container for grouping widgets.
|
|
|
521
532
|
Expander
|
|
522
533
|
--------
|
|
523
534
|
|
|
524
|
-
Collapsible section with a clickable header.
|
|
535
|
+
Collapsible section with a clickable header. A single-child container:
|
|
536
|
+
``get_children()`` returns its 0- or 1-element child list.
|
|
525
537
|
|
|
526
538
|
**Constructor:** ``new Widgets.Expander({title, collapsible, shadow})``
|
|
527
539
|
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
Menu & Toolbar Widgets
|
|
2
2
|
======================
|
|
3
3
|
|
|
4
|
+
``MenuBar``, ``Menu`` and ``ToolBar`` are container widgets: the menu
|
|
5
|
+
actions, submenus and toolbar items they hold (added via ``add_name`` /
|
|
6
|
+
``add_menu`` / ``add_action`` / ``add_widget``) are reported by the
|
|
7
|
+
standard container API -- ``get_children()`` / ``num_children()`` /
|
|
8
|
+
``remove(...)``. Separators and spacers are not widgets and are not
|
|
9
|
+
included.
|
|
10
|
+
|
|
4
11
|
.. _widget-menubar:
|
|
5
12
|
|
|
6
13
|
MenuBar
|
|
@@ -37,6 +37,7 @@ WIDGET_METHODS = {
|
|
|
37
37
|
"get_enabled": [],
|
|
38
38
|
"set_tooltip": ["msg"],
|
|
39
39
|
"get_tooltip": [],
|
|
40
|
+
"is_container": [],
|
|
40
41
|
"set_allow_text_selection": ["tf"],
|
|
41
42
|
"show": [],
|
|
42
43
|
"hide": [],
|
|
@@ -163,7 +164,10 @@ WIDGETS = {
|
|
|
163
164
|
},
|
|
164
165
|
|
|
165
166
|
"Frame": {
|
|
166
|
-
|
|
167
|
+
# JS Frame extends ContainerWidget (single child via set_widget),
|
|
168
|
+
# so it needs the container method set (get_children, num_children,
|
|
169
|
+
# remove*). get_children() returns a 0- or 1-element list.
|
|
170
|
+
"base": "container",
|
|
167
171
|
"args": [],
|
|
168
172
|
"options": ["title"],
|
|
169
173
|
"methods": {
|
|
@@ -176,7 +180,10 @@ WIDGETS = {
|
|
|
176
180
|
},
|
|
177
181
|
|
|
178
182
|
"Expander": {
|
|
179
|
-
|
|
183
|
+
# JS Expander extends ContainerWidget (single child via set_widget),
|
|
184
|
+
# so it needs the container method set (get_children, num_children,
|
|
185
|
+
# remove*). get_children() returns a 0- or 1-element list.
|
|
186
|
+
"base": "container",
|
|
180
187
|
"args": [],
|
|
181
188
|
"options": ["title", "collapsible", "shadow", "bg_color"],
|
|
182
189
|
"methods": {
|
|
@@ -189,7 +196,11 @@ WIDGETS = {
|
|
|
189
196
|
},
|
|
190
197
|
|
|
191
198
|
"AbstractScrollArea": {
|
|
192
|
-
|
|
199
|
+
# JS AbstractScrollArea extends ContainerWidget (holds a single
|
|
200
|
+
# child via set_widget), so it needs the container method set
|
|
201
|
+
# (get_children, num_children, remove*) -- callers like ginga's
|
|
202
|
+
# Desktop iterate get_children() on it.
|
|
203
|
+
"base": "container",
|
|
193
204
|
"args": [],
|
|
194
205
|
"options": ["thickness"],
|
|
195
206
|
"methods": {
|
|
@@ -204,7 +215,8 @@ WIDGETS = {
|
|
|
204
215
|
},
|
|
205
216
|
|
|
206
217
|
"ScrollArea": {
|
|
207
|
-
|
|
218
|
+
# extends AbstractScrollArea -> ContainerWidget; see note above.
|
|
219
|
+
"base": "container",
|
|
208
220
|
"args": [],
|
|
209
221
|
"options": ["hscrollbar", "vscrollbar", "thickness"],
|
|
210
222
|
"methods": {
|
|
@@ -305,7 +317,10 @@ WIDGETS = {
|
|
|
305
317
|
# -- Top-level windows --
|
|
306
318
|
|
|
307
319
|
"TopLevel": {
|
|
308
|
-
|
|
320
|
+
# JS TopLevel extends ContainerWidget; container method set needed
|
|
321
|
+
# (get_children, num_children, remove*) -- get_children() returns a
|
|
322
|
+
# 0- or 1-element list (single child via set_widget).
|
|
323
|
+
"base": "container",
|
|
309
324
|
"args": [],
|
|
310
325
|
"options": ["resizable", "title", "icon", "moveable", "closeable",
|
|
311
326
|
"minimizable", "maximizable", "lowerable", "shadeable"],
|
|
@@ -327,7 +342,10 @@ WIDGETS = {
|
|
|
327
342
|
},
|
|
328
343
|
|
|
329
344
|
"Page": {
|
|
330
|
-
|
|
345
|
+
# JS Page extends ContainerWidget; container method set needed
|
|
346
|
+
# (get_children, num_children, remove*) -- get_children() returns a
|
|
347
|
+
# 0- or 1-element list (single child via set_widget).
|
|
348
|
+
"base": "container",
|
|
331
349
|
"args": [],
|
|
332
350
|
"options": [],
|
|
333
351
|
"methods": {
|
|
@@ -745,6 +763,8 @@ WIDGETS = {
|
|
|
745
763
|
"collapse_item": ["path"],
|
|
746
764
|
"get_selected": [],
|
|
747
765
|
"get_subtree": ["status"],
|
|
766
|
+
"set_row_spacing": ["px"],
|
|
767
|
+
"set_column_spacing": ["px"],
|
|
748
768
|
"set_selected": ["paths"],
|
|
749
769
|
"clear_selection": [],
|
|
750
770
|
"select_path": ["path", "state"],
|
|
@@ -963,7 +983,7 @@ WIDGETS = {
|
|
|
963
983
|
# -- Menus & Toolbars --
|
|
964
984
|
|
|
965
985
|
"MenuBar": {
|
|
966
|
-
"base": "
|
|
986
|
+
"base": "container",
|
|
967
987
|
"args": [],
|
|
968
988
|
"options": [],
|
|
969
989
|
"methods": {
|
|
@@ -975,7 +995,7 @@ WIDGETS = {
|
|
|
975
995
|
},
|
|
976
996
|
|
|
977
997
|
"Menu": {
|
|
978
|
-
"base": "
|
|
998
|
+
"base": "container",
|
|
979
999
|
"args": [],
|
|
980
1000
|
"options": [],
|
|
981
1001
|
"methods": {
|
|
@@ -1006,7 +1026,7 @@ WIDGETS = {
|
|
|
1006
1026
|
},
|
|
1007
1027
|
|
|
1008
1028
|
"ToolBar": {
|
|
1009
|
-
"base": "
|
|
1029
|
+
"base": "container",
|
|
1010
1030
|
"args": [],
|
|
1011
1031
|
"options": ["orientation"],
|
|
1012
1032
|
"methods": {
|
|
@@ -9,6 +9,36 @@ from js import Object, Widgets
|
|
|
9
9
|
from pgwidgets_js.defs import (WIDGETS, WIDGET_METHODS, CONTAINER_METHODS,
|
|
10
10
|
CALLBACK_METHODS)
|
|
11
11
|
|
|
12
|
+
# Registry of built widget subclasses, keyed by JS class name. Populated
|
|
13
|
+
# by build_widget_class(). Used by _from_js_val() so that a widget
|
|
14
|
+
# *returned* from a JS call is wrapped in its proper subclass (with the
|
|
15
|
+
# full method set) rather than a bare Widget shell.
|
|
16
|
+
_WIDGET_CLASSES = {}
|
|
17
|
+
|
|
18
|
+
# Registry of live widget *instances*, keyed by their JS ``wid``.
|
|
19
|
+
# Populated in Widget.__init__ and consulted by _from_js_val so that a
|
|
20
|
+
# widget crossing back from JS (e.g. the child delivered to a
|
|
21
|
+
# ``page-switch`` callback) resolves to its *original* Python wrapper --
|
|
22
|
+
# preserving object identity and any subclass mix-ins (e.g. Ginga's
|
|
23
|
+
# WidgetMixin, which adds ``extdata``). Mirrors the wid->widget map the
|
|
24
|
+
# websocket backend keeps. Entries are removed in destroy().
|
|
25
|
+
_WIDGET_INSTANCES = {}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _wid_key(js_obj):
|
|
29
|
+
"""Return a stable dict key for a JS widget's ``wid`` (or None)."""
|
|
30
|
+
try:
|
|
31
|
+
wid = js_obj.wid
|
|
32
|
+
except Exception:
|
|
33
|
+
return None
|
|
34
|
+
if wid is None:
|
|
35
|
+
return None
|
|
36
|
+
# normalize numeric wids (JS numbers may arrive as float)
|
|
37
|
+
try:
|
|
38
|
+
return int(wid)
|
|
39
|
+
except (TypeError, ValueError):
|
|
40
|
+
return wid
|
|
41
|
+
|
|
12
42
|
|
|
13
43
|
def _to_js_val(val):
|
|
14
44
|
"""Convert a Python value to a JS-compatible value.
|
|
@@ -35,14 +65,30 @@ def _from_js_val(val):
|
|
|
35
65
|
JS Widget instances are wrapped in a Python Widget shell."""
|
|
36
66
|
if val is None or val is Widgets:
|
|
37
67
|
return val
|
|
68
|
+
# Newer Pyodide maps JS ``null`` (and ``undefined``) to a ``JsNull``
|
|
69
|
+
# sentinel rather than Python ``None``. Normalize it so that callers'
|
|
70
|
+
# ``x is None`` checks work (e.g. Menu.get_menu returning null).
|
|
71
|
+
if type(val).__name__ in ('JsNull', 'JsUndefined'):
|
|
72
|
+
return None
|
|
38
73
|
# Detect JS Callback/Widget objects (they have 'add_callback' and 'wid')
|
|
39
74
|
if hasattr(val, 'add_callback') and hasattr(val, 'wid'):
|
|
40
|
-
wrapper
|
|
41
|
-
|
|
75
|
+
# If this widget already has a Python wrapper (it was created on
|
|
76
|
+
# the Python side), return that original object so identity and
|
|
77
|
+
# subclass mix-ins (e.g. Ginga's WidgetMixin / extdata) survive
|
|
78
|
+
# the round-trip through JS.
|
|
79
|
+
existing = _WIDGET_INSTANCES.get(_wid_key(val))
|
|
80
|
+
if existing is not None:
|
|
81
|
+
return existing
|
|
82
|
+
# Otherwise (a widget created purely in JS): wrap in the proper
|
|
83
|
+
# built subclass when known, else fall back to a bare Widget.
|
|
42
84
|
try:
|
|
43
|
-
|
|
85
|
+
js_class_name = val.constructor.name
|
|
44
86
|
except Exception:
|
|
45
|
-
|
|
87
|
+
js_class_name = 'Widget'
|
|
88
|
+
cls = _WIDGET_CLASSES.get(js_class_name, Widget)
|
|
89
|
+
wrapper = object.__new__(cls)
|
|
90
|
+
wrapper._js = val
|
|
91
|
+
wrapper._js_class_name = js_class_name
|
|
46
92
|
wrapper._proxies = []
|
|
47
93
|
return wrapper
|
|
48
94
|
# Check if it's a JsProxy with .to_py()
|
|
@@ -90,6 +136,12 @@ class Widget:
|
|
|
90
136
|
self._js_class_name = js_class_name
|
|
91
137
|
self._proxies = [] # prevent GC of callback proxies
|
|
92
138
|
|
|
139
|
+
# Register so this widget resolves back to *this* object when it
|
|
140
|
+
# crosses the JS->Python boundary in a callback (see _from_js_val).
|
|
141
|
+
key = _wid_key(self._js)
|
|
142
|
+
if key is not None:
|
|
143
|
+
_WIDGET_INSTANCES[key] = self
|
|
144
|
+
|
|
93
145
|
# Apply remaining kwargs as setter calls
|
|
94
146
|
for k, v in setter_kwargs.items():
|
|
95
147
|
setter = f"set_{k}"
|
|
@@ -114,6 +166,10 @@ class Widget:
|
|
|
114
166
|
handler(*py_args, *extra_args, **extra_kwargs)
|
|
115
167
|
proxy = create_proxy(wrapper)
|
|
116
168
|
self._proxies.append(proxy)
|
|
169
|
+
# enable_callback first (mirrors the websocket RemoteInterface
|
|
170
|
+
# path): besides registering the action it auto-wires DOM
|
|
171
|
+
# listeners for drag/drop callbacks (see Widget.enable_callback).
|
|
172
|
+
self._js.enable_callback(action)
|
|
117
173
|
self._js.add_callback(action, proxy)
|
|
118
174
|
|
|
119
175
|
def add_callback(self, action, handler, *extra_args, **extra_kwargs):
|
|
@@ -124,6 +180,10 @@ class Widget:
|
|
|
124
180
|
handler(self, *py_args, *extra_args, **extra_kwargs)
|
|
125
181
|
proxy = create_proxy(wrapper)
|
|
126
182
|
self._proxies.append(proxy)
|
|
183
|
+
# enable_callback first (mirrors the websocket RemoteInterface
|
|
184
|
+
# path): besides registering the action it auto-wires DOM
|
|
185
|
+
# listeners for drag/drop callbacks (see Widget.enable_callback).
|
|
186
|
+
self._js.enable_callback(action)
|
|
127
187
|
self._js.add_callback(action, proxy)
|
|
128
188
|
|
|
129
189
|
# -- Common Widget methods --
|
|
@@ -164,6 +224,14 @@ class Widget:
|
|
|
164
224
|
def is_visible(self):
|
|
165
225
|
return self._call("is_visible")
|
|
166
226
|
|
|
227
|
+
def destroy(self):
|
|
228
|
+
# drop our identity-registry entry, then destroy the JS widget
|
|
229
|
+
try:
|
|
230
|
+
_WIDGET_INSTANCES.pop(_wid_key(self._js), None)
|
|
231
|
+
except Exception:
|
|
232
|
+
pass
|
|
233
|
+
self._call("destroy")
|
|
234
|
+
|
|
167
235
|
def __repr__(self):
|
|
168
236
|
return f"<{self._js_class_name}>"
|
|
169
237
|
|
|
@@ -211,6 +279,17 @@ def _make_method(method_name, param_names=()):
|
|
|
211
279
|
return method
|
|
212
280
|
|
|
213
281
|
|
|
282
|
+
# Ensure the base Widget class implements *every* common widget method
|
|
283
|
+
# declared in WIDGET_METHODS, not just the hand-written subset above.
|
|
284
|
+
# This matters because widgets *returned* from a JS call may be wrapped
|
|
285
|
+
# in a bare Widget shell (see _from_js_val) when their JS constructor
|
|
286
|
+
# name does not match a built subclass (e.g. a minified CDN bundle); the
|
|
287
|
+
# bare shell must still expose set_tooltip, set_min_size, set_focus, etc.
|
|
288
|
+
for _mname, _params in WIDGET_METHODS.items():
|
|
289
|
+
if not hasattr(Widget, _mname):
|
|
290
|
+
setattr(Widget, _mname, _make_method(_mname, _params))
|
|
291
|
+
|
|
292
|
+
|
|
214
293
|
# Pyodide-specific overrides for methods whose Python-friendly
|
|
215
294
|
# signature differs from the underlying JS method, or that need
|
|
216
295
|
# special argument conversion. Maps (js_class, method_name)
|
|
@@ -264,6 +343,9 @@ def build_widget_class(js_class, defn):
|
|
|
264
343
|
attrs["__init__"] = __init__
|
|
265
344
|
|
|
266
345
|
cls = type(js_class, (Widget,), attrs)
|
|
346
|
+
# register so widgets returned from JS calls can be wrapped in their
|
|
347
|
+
# proper subclass (see _from_js_val)
|
|
348
|
+
_WIDGET_CLASSES[js_class] = cls
|
|
267
349
|
return cls
|
|
268
350
|
|
|
269
351
|
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 24px;
|
|
5
|
+
/* The fill/label children are absolutely positioned (out of flow),
|
|
6
|
+
so the element has no intrinsic content height. In a vertical
|
|
7
|
+
Box, the layout forces inline ``height: auto`` on children, which
|
|
8
|
+
would collapse this to 0. ``min-height`` survives that override
|
|
9
|
+
(and the Box strips it only for stretch>0 children that should be
|
|
10
|
+
free to shrink), keeping the bar visible. */
|
|
11
|
+
min-height: 24px;
|
|
5
12
|
background-color: #ddd;
|
|
6
13
|
border: 1px solid #aaa;
|
|
7
14
|
border-radius: 3px;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ScrollArea widget styles (extends AbstractScrollArea)
|
|
3
|
+
*/
|
|
4
|
+
.scrollarea-viewport {
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.scrollarea-content {
|
|
9
|
+
/* flex column so a child that opts to fill (set_expanding -> flex:1)
|
|
10
|
+
fills the viewport when its content is smaller, while still growing
|
|
11
|
+
(and scrolling) when the content exceeds the viewport. A child
|
|
12
|
+
without an expand policy keeps its natural size (top-aligned), as
|
|
13
|
+
before. min-width/min-height:100% keep the content at least
|
|
14
|
+
viewport-sized; width:max-content lets it grow for wide content
|
|
15
|
+
(horizontal scroll); the column height is content-driven, floored
|
|
16
|
+
at the viewport by min-height. */
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
width: max-content;
|
|
20
|
+
min-width: 100%;
|
|
21
|
+
min-height: 100%;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
@@ -151,7 +151,9 @@
|
|
|
151
151
|
.treeview-row {
|
|
152
152
|
display: grid;
|
|
153
153
|
align-items: center;
|
|
154
|
-
|
|
154
|
+
/* default 24px floor; set_row_spacing() relaxes this (to 0) so rows
|
|
155
|
+
can tighten to their content + cell padding. */
|
|
156
|
+
min-height: var(--tv-row-minheight, 24px);
|
|
155
157
|
cursor: default;
|
|
156
158
|
border-bottom: 1px solid #f0f0f0;
|
|
157
159
|
}
|
|
@@ -199,7 +201,9 @@
|
|
|
199
201
|
/* ── Cell ───────────────────────────────────────────── */
|
|
200
202
|
|
|
201
203
|
.treeview-cell {
|
|
202
|
-
padding
|
|
204
|
+
/* vertical/horizontal padding overridable via set_row_spacing() /
|
|
205
|
+
set_column_spacing() (the --tv-row-pad / --tv-col-pad vars). */
|
|
206
|
+
padding: var(--tv-row-pad, 2px) var(--tv-col-pad, 6px);
|
|
203
207
|
overflow: hidden;
|
|
204
208
|
text-overflow: ellipsis;
|
|
205
209
|
white-space: nowrap;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use_strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {ContainerWidget} from "./Widget.js";
|
|
4
4
|
import {MenuAction} from "./MenuAction.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A popup menu widget containing menu actions, checkboxes, separators,
|
|
8
8
|
* and submenus arranged in a vertical panel.
|
|
9
|
-
* @extends
|
|
9
|
+
* @extends ContainerWidget
|
|
10
10
|
*/
|
|
11
|
-
class Menu extends
|
|
11
|
+
class Menu extends ContainerWidget {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new Menu widget.
|
|
@@ -23,7 +23,8 @@ class Menu extends Widget {
|
|
|
23
23
|
}
|
|
24
24
|
this.element.className = 'menu-widget';
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// child widgets (actions + submenus) are tracked in
|
|
27
|
+
// ContainerWidget.children; _menus maps submenu name -> Menu
|
|
27
28
|
this._menus = {};
|
|
28
29
|
|
|
29
30
|
// auto-hide when a menu action is selected (for popup menus)
|
|
@@ -38,7 +39,7 @@ class Menu extends Widget {
|
|
|
38
39
|
* @param {Widget} child - The widget to add (e.g. MenuAction, CheckBox).
|
|
39
40
|
*/
|
|
40
41
|
add_widget(child) {
|
|
41
|
-
this.
|
|
42
|
+
this.add_child(child);
|
|
42
43
|
this.element.appendChild(child.get_element());
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -94,7 +95,7 @@ class Menu extends Widget {
|
|
|
94
95
|
}
|
|
95
96
|
});
|
|
96
97
|
|
|
97
|
-
this.
|
|
98
|
+
this.add_child(menu);
|
|
98
99
|
this._menus[name] = menu;
|
|
99
100
|
this.element.appendChild(item);
|
|
100
101
|
return menu;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use_strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {ContainerWidget} from "./Widget.js";
|
|
4
4
|
import {Menu} from "./Menu.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A horizontal menu bar widget. Menus are added by name and pop up
|
|
8
8
|
* when the user clicks the corresponding label on the bar.
|
|
9
|
-
* @extends
|
|
9
|
+
* @extends ContainerWidget
|
|
10
10
|
*/
|
|
11
|
-
class MenuBar extends
|
|
11
|
+
class MenuBar extends ContainerWidget {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new MenuBar widget.
|
|
@@ -116,6 +116,9 @@ class MenuBar extends Widget {
|
|
|
116
116
|
|
|
117
117
|
this.element.appendChild(container);
|
|
118
118
|
this._menus[name] = { menu, button };
|
|
119
|
+
// track the menu as a child so get_children() works (the menu's
|
|
120
|
+
// DOM lives in document.body, not inside the menubar element)
|
|
121
|
+
this.add_child(menu);
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
/**
|
|
@@ -403,6 +403,8 @@ class RemoteInterface {
|
|
|
403
403
|
return this._handleRegisterFont(msg);
|
|
404
404
|
case "set-default-font":
|
|
405
405
|
return this._handleSetDefaultFont(msg);
|
|
406
|
+
case "open-url":
|
|
407
|
+
return this._handleOpenUrl(msg);
|
|
406
408
|
default:
|
|
407
409
|
return {type: "error", id: msg.id,
|
|
408
410
|
error: "Unknown message type: " + msg.type};
|
|
@@ -1015,6 +1017,19 @@ class RemoteInterface {
|
|
|
1015
1017
|
return {type: "result", id: msg.id};
|
|
1016
1018
|
}
|
|
1017
1019
|
|
|
1020
|
+
/**
|
|
1021
|
+
* Opens a URL in the user's browser (a new tab/window).
|
|
1022
|
+
* Note: this is a server-initiated open, so a popup blocker may
|
|
1023
|
+
* suppress it if the user-activation from the originating click has
|
|
1024
|
+
* already lapsed. ``noopener`` keeps the new tab from accessing
|
|
1025
|
+
* this window.
|
|
1026
|
+
* @private
|
|
1027
|
+
*/
|
|
1028
|
+
_handleOpenUrl(msg) {
|
|
1029
|
+
window.open(msg.url, "_blank", "noopener");
|
|
1030
|
+
return {type: "result", id: msg.id};
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1018
1033
|
/**
|
|
1019
1034
|
* Recursively resolves widget references in an arguments array.
|
|
1020
1035
|
* Objects with a __wid__ key are replaced with the actual widget.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use_strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {ContainerWidget} from "./Widget.js";
|
|
4
4
|
import {ToolBarAction} from "./ToolBarAction.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A toolbar widget that arranges actions and other widgets in a
|
|
8
8
|
* horizontal or vertical strip. Supports buttons, toggle actions,
|
|
9
9
|
* separators, and spacers.
|
|
10
|
-
* @extends
|
|
10
|
+
* @extends ContainerWidget
|
|
11
11
|
*/
|
|
12
|
-
class ToolBar extends
|
|
12
|
+
class ToolBar extends ContainerWidget {
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Creates a new ToolBar widget.
|
|
@@ -39,6 +39,7 @@ class ToolBar extends Widget {
|
|
|
39
39
|
* @param {Widget} child - The widget to add.
|
|
40
40
|
*/
|
|
41
41
|
add_widget(child) {
|
|
42
|
+
this.add_child(child);
|
|
42
43
|
let elt = child.get_element();
|
|
43
44
|
elt.classList.add('toolbar-child');
|
|
44
45
|
this.element.appendChild(elt);
|
|
@@ -55,7 +55,12 @@ class ToolBarAction extends Widget {
|
|
|
55
55
|
|
|
56
56
|
let icon_url = this.get_option(options, 'icon_url', null);
|
|
57
57
|
let iconsize = this.get_option(options, 'iconsize', null);
|
|
58
|
-
|
|
58
|
+
// Truthy check (not ``!== null``): an unset icon may arrive as
|
|
59
|
+
// null (JSON, websocket backend) or undefined (to_js(None) in the
|
|
60
|
+
// in-situ/pyodide backend) or ''. Only create the <img> for a
|
|
61
|
+
// real URL, otherwise an empty <img src="undefined"> shows as a
|
|
62
|
+
// broken-image "dot".
|
|
63
|
+
if (icon_url) {
|
|
59
64
|
this.set_icon(icon_url, iconsize);
|
|
60
65
|
}
|
|
61
66
|
|
|
@@ -2365,6 +2365,29 @@ class TreeView extends Widget {
|
|
|
2365
2365
|
return span;
|
|
2366
2366
|
}
|
|
2367
2367
|
|
|
2368
|
+
/**
|
|
2369
|
+
* Set the vertical spacing of rows (the vertical padding inside each
|
|
2370
|
+
* cell, in pixels). Drives the ``--tv-row-pad`` CSS variable that the
|
|
2371
|
+
* stylesheet applies to ``.treeview-cell``.
|
|
2372
|
+
* @param {number} px - Vertical cell padding in pixels.
|
|
2373
|
+
*/
|
|
2374
|
+
set_row_spacing(px) {
|
|
2375
|
+
this.element.style.setProperty('--tv-row-pad', px + 'px');
|
|
2376
|
+
// Also relax the fixed row min-height floor so the row can tighten
|
|
2377
|
+
// to its content + padding; otherwise the default 24px floor leaves
|
|
2378
|
+
// a visible gap when the padding is small.
|
|
2379
|
+
this.element.style.setProperty('--tv-row-minheight', '0px');
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
/**
|
|
2383
|
+
* Set the horizontal spacing of columns (the horizontal padding inside
|
|
2384
|
+
* each cell, in pixels). Drives the ``--tv-col-pad`` CSS variable.
|
|
2385
|
+
* @param {number} px - Horizontal cell padding in pixels.
|
|
2386
|
+
*/
|
|
2387
|
+
set_column_spacing(px) {
|
|
2388
|
+
this.element.style.setProperty('--tv-col-pad', px + 'px');
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2368
2391
|
set_show_grid(tf) {
|
|
2369
2392
|
this._showGrid = !!tf;
|
|
2370
2393
|
this.element.classList.toggle('treeview-grid', this._showGrid);
|