pgwidgets-js 0.2.3__tar.gz → 0.3.0__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.2.3 → pgwidgets_js-0.3.0}/PKG-INFO +1 -1
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/WhatsNew.rst +102 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/for-developers.rst +170 -31
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/package.json +1 -1
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/defs.py +2 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/AbstractScrollArea.js +0 -6
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Box.js +0 -7
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Button.js +0 -8
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Callback.js +11 -6
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Canvas.js +0 -5
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/CheckBox.js +0 -5
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ColorDialog.js +0 -4
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ColorWidget.js +0 -3
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ComboBox.js +0 -18
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ComboBoxNative.js +0 -11
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Dial.js +3 -15
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Dialog.js +0 -7
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ExternalWidget.js +0 -4
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/FileDialog.js +11 -8
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/FixedLayout.js +0 -1
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Frame.js +0 -5
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/GridBox.js +0 -14
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/HtmlView.js +0 -10
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Image.js +0 -5
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Label.js +1 -10
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/MDIWidget.js +0 -40
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Menu.js +0 -9
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/MenuAction.js +0 -10
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/MenuBar.js +1 -8
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ProgressBar.js +0 -4
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/RadioButton.js +1 -7
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/RemoteInterface.js +259 -42
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ScrollArea.js +0 -1
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ScrollBar.js +0 -6
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Slider.js +1 -9
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/SpinBox.js +1 -9
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Splitter.js +6 -8
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/StatusBar.js +0 -4
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TabWidget.js +1 -18
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TableView.js +0 -1
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TextArea.js +0 -10
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TextEntry.js +1 -10
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TextEntrySet.js +0 -3
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TextSource.js +34 -21
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TextWidget.js +0 -5
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Timer.js +0 -11
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ToggleButton.js +1 -7
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ToolBar.js +0 -5
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/ToolBarAction.js +2 -12
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TopLevel.js +0 -16
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/TreeView.js +32 -31
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/VideoWidget.js +0 -19
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Widget.js +25 -32
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js.egg-info/PKG-INFO +1 -1
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/.flake8 +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/.github/workflows/tests.yml +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/.gitignore +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/.readthedocs.yaml +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/LICENSE.md +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/MANIFEST.in +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/README.md +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/Widgets.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/Widgets.js +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/Makefile +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/callbacks.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/conf.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/electron.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/external-widgets.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/frameworks.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/getting-started.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/index.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/pyodide.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/remote.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/styling.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/controls.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/dialogs.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/display.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/index.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/layout.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/menus.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/nonvisual.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/docs/widgets/text.rst +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/all_widgets.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/all_widgets_pyodide.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/all_widgets_pyodide.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/all_widgets_pyscript.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/all_widgets_pyscript.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/box.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/button.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/canvas.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/checkbox.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/colordialog.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/combobox.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/debug_spinbox.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/dial.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/dialog.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/electron/.gitignore +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/electron/.npmrc +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/electron/index.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/electron/main.js +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/electron/package.json +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/expander.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/external_widgets.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/fixedlayout.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/frame.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/gridbox.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/htmlview.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/image.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/label.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/mdi_widget.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/menu.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/progressbar.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/pyodide_demo.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/pyscript.toml +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/radiobutton.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/remote.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/remote_demo.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/remote_demo_async.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/scroll_area.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/scrollable.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/scrollbar.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/slider.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/spinbox.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/splitter.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/tab_widget.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/tableview.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/text_entry.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/textarea.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/textentryset.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/textsource.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/togglebutton.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/toolbar.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/treeview.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/examples/videowidget.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/__init__.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/pyodide/__init__.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/pyodide/log.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/pyodide/widget.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/Widgets.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/Widgets.js +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/AbstractScrollArea.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Box.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Button.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/CheckBox.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ColorDialog.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ComboBox.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Dial.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Dialog.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Expander.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ExternalWidget.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/FixedLayout.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Frame.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/GridBox.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/HtmlView.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Image.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Label.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/MDIWidget.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Menu.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ProgressBar.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/RadioButton.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ScrollArea.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ScrollBar.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Slider.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/SpinBox.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Splitter.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/StatusBar.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/TabWidget.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Text.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/TextArea.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/TextEntrySet.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/TextSource.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ToggleButton.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/ToolBar.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/TopLevel.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/TreeView.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/VideoWidget.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/Widget.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/css/WindowMenu.css +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/icons/file.svg +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/icons/folder.svg +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/icons/hdots.svg +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/icons/pgicon.svg +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/icons/pgwidgets-logo.png +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/icons/pgwidgets-logo.svg +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/icons/vdots.svg +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Expander.js +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/Page.js +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/modules/WindowMenu.js +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js/static/remote.html +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js.egg-info/SOURCES.txt +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js.egg-info/dependency_links.txt +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js.egg-info/requires.txt +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pgwidgets_js.egg-info/top_level.txt +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/pyproject.toml +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/setup.cfg +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/setup.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/tests/__init__.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/tests/test_consistency.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/tests/test_defs.py +0 -0
- {pgwidgets_js-0.2.3 → pgwidgets_js-0.3.0}/tests/test_static_assets.py +0 -0
|
@@ -1,6 +1,108 @@
|
|
|
1
1
|
What's New
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
|
+
Recent changes — since ``v0.2.3``
|
|
5
|
+
---------------------------------
|
|
6
|
+
|
|
7
|
+
Chunked binary transport (both directions, raw frames)
|
|
8
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
9
|
+
|
|
10
|
+
The remote interface gained a unified chunked binary transport
|
|
11
|
+
that works in both directions and ships raw binary WebSocket
|
|
12
|
+
frames by default. A new ``binary-call-chunked`` announce opens
|
|
13
|
+
a transfer; subsequent ``binary-chunk`` messages each carry a
|
|
14
|
+
JSON header plus one raw binary frame (or, optionally, an
|
|
15
|
+
inline base64 payload). Optional ``shape`` + ``dtype`` fields on
|
|
16
|
+
the announce promote the reassembled payload from a raw
|
|
17
|
+
``ArrayBuffer`` to a typed array (``Uint8Array``,
|
|
18
|
+
``Float32Array``, …) before dispatch — the JS-side companion to
|
|
19
|
+
pgwidgets-python's new :class:`pgwidgets.Buffer` descriptor.
|
|
20
|
+
|
|
21
|
+
The browser-side file upload path was migrated to the same
|
|
22
|
+
envelope. Drag-and-drop and ``FileDialog`` now read files with
|
|
23
|
+
``readAsArrayBuffer`` instead of ``readAsDataURL`` and ship the
|
|
24
|
+
bytes via binary frames; the ``payload.files[i].data`` field is
|
|
25
|
+
now an ``ArrayBuffer`` (JavaScript side) / ``bytes`` (Python
|
|
26
|
+
side) rather than a ``"data:<mime>;base64,…"`` string. Each
|
|
27
|
+
file dict carries an explicit ``encoding`` field (currently
|
|
28
|
+
always ``"bytes"``; reserved for future ``"base64"``) so
|
|
29
|
+
receivers can branch on it.
|
|
30
|
+
|
|
31
|
+
**Pre-1.0 API break**: any drop or FileDialog handler that did
|
|
32
|
+
``base64.b64decode(data.split(",", 1)[1])`` should now just use
|
|
33
|
+
``data`` directly.
|
|
34
|
+
|
|
35
|
+
Constructor-bind hack removed
|
|
36
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
37
|
+
|
|
38
|
+
The legacy ``this.foo = this.foo.bind(this)`` constructor lines
|
|
39
|
+
were removed from every widget module — 443 line deletions
|
|
40
|
+
across 48 files. The codebase never relied on bare method
|
|
41
|
+
references (DOM handlers etc. use arrow wrappers), so the
|
|
42
|
+
preemptive binding was redundant. A handful of places that
|
|
43
|
+
*did* register handlers via ``addEventListener("event",
|
|
44
|
+
this.method)`` were converted to class-field arrow methods
|
|
45
|
+
(``onMouseMove = (e) => { ... }``) so the handler identity is
|
|
46
|
+
stable per instance — critical for the paired
|
|
47
|
+
``removeEventListener`` to find the same function.
|
|
48
|
+
|
|
49
|
+
**Pre-1.0 API break**: code outside the library that passed a
|
|
50
|
+
pgwidgets method as a bare reference (``setTimeout(button.set_text,
|
|
51
|
+
0)``, ``el.addEventListener("click", widget.foo)``, etc.) must
|
|
52
|
+
now wrap with an arrow at the call site (``() =>
|
|
53
|
+
button.set_text(s)``) or apply ``.bind`` itself.
|
|
54
|
+
|
|
55
|
+
Wid-collision fix in ``_handleCreate``
|
|
56
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
57
|
+
|
|
58
|
+
When a class registered in ``classMap`` doesn't extend
|
|
59
|
+
``Callback`` (e.g. a plain JS class layered on top of
|
|
60
|
+
pgwidgets-js — gingajs's ``Controller`` is one), its constructor
|
|
61
|
+
doesn't allocate a wid. The next widget's ``super()`` would
|
|
62
|
+
then auto-assign a wid that the previous Python-allocated widget
|
|
63
|
+
was sitting at, silently overwriting it in the registry.
|
|
64
|
+
Two complementary safeguards:
|
|
65
|
+
|
|
66
|
+
- ``_handleCreate`` now bumps ``Callback._nextId`` past
|
|
67
|
+
``msg.wid`` *before* calling ``new cls(...)``.
|
|
68
|
+
- ``Callback``'s constructor skips occupied registry slots when
|
|
69
|
+
allocating, as a defensive backstop.
|
|
70
|
+
|
|
71
|
+
A binding that only ever uses classes which extend ``Callback``
|
|
72
|
+
is safe without either mitigation, but having both removes a
|
|
73
|
+
whole class of mysterious "Unknown widget id" errors.
|
|
74
|
+
|
|
75
|
+
TreeView: per-column ``colwidth``
|
|
76
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
77
|
+
|
|
78
|
+
Column descriptors accept an optional ``colwidth`` field set
|
|
79
|
+
initial column widths declaratively::
|
|
80
|
+
|
|
81
|
+
tree.set_columns([
|
|
82
|
+
{label: "Name", key: "NAME", type: "string", colwidth: 240},
|
|
83
|
+
{label: "Type", key: "TYPE", type: "string", colwidth: "10em"},
|
|
84
|
+
{label: "Size", key: "SIZE", type: "integer"}, // -> 1fr
|
|
85
|
+
])
|
|
86
|
+
|
|
87
|
+
Numbers are treated as pixels; strings pass through as CSS grid
|
|
88
|
+
track values. Columns without ``colwidth`` keep the previous
|
|
89
|
+
default of ``"1fr"``. ``set_column_width(key, w)`` continues to
|
|
90
|
+
work for runtime adjustments.
|
|
91
|
+
|
|
92
|
+
Other improvements
|
|
93
|
+
~~~~~~~~~~~~~~~~~~
|
|
94
|
+
|
|
95
|
+
- ``TextSource`` gained internal ``_setCursorOffset`` /
|
|
96
|
+
``_setSelectionOffsets`` helpers used by the ref-binding
|
|
97
|
+
machinery on reconstruction.
|
|
98
|
+
- For-developers documentation expanded: the "Things That Will
|
|
99
|
+
Bite You" section now covers the wid-collision rule, the
|
|
100
|
+
``encoding`` field on chunks, atomic chunk emission, indexed
|
|
101
|
+
reassembly, dtype-falls-back-to-ArrayBuffer, and the
|
|
102
|
+
``f.data``-is-bytes API break.
|
|
103
|
+
|
|
104
|
+
----
|
|
105
|
+
|
|
4
106
|
Recent changes — since ``v0.2.1``
|
|
5
107
|
---------------------------------
|
|
6
108
|
|
|
@@ -92,10 +92,34 @@ Server → Browser
|
|
|
92
92
|
|
|
93
93
|
``{type: "binary-call", id, wid, method, args}`` (followed by a raw binary WebSocket frame)
|
|
94
94
|
Identical to ``call`` except the binary frame becomes the *first*
|
|
95
|
-
argument to the method. Used for image bytes
|
|
96
|
-
base64-inflated through JSON. Order matters:
|
|
97
|
-
queued FIFO; the next binary frame is paired
|
|
98
|
-
queue.
|
|
95
|
+
argument to the method. Used for small image bytes (JPEG/PNG etc.)
|
|
96
|
+
so the payload isn't base64-inflated through JSON. Order matters:
|
|
97
|
+
the JSON header is queued FIFO; the next binary frame is paired
|
|
98
|
+
with the head of the queue.
|
|
99
|
+
|
|
100
|
+
``{type: "binary-call-chunked", id, wid, method, args, transfer_id, num_chunks}`` (announce; followed by N binary-chunk pairs)
|
|
101
|
+
Opens a chunked transfer for payloads too large to ship in one
|
|
102
|
+
frame. The announce reserves a ``transfer_id``; the receiver
|
|
103
|
+
accumulates exactly ``num_chunks`` paired ``binary-chunk`` messages
|
|
104
|
+
and then dispatches ``widget[method](payload, ...args)``. Optional
|
|
105
|
+
fields ``shape`` (array of ints) and ``dtype`` (one of
|
|
106
|
+
``"uint8"``, ``"uint16"``, ``"uint32"``, ``"int8"``, ``"int16"``,
|
|
107
|
+
``"int32"``, ``"float32"``, ``"float64"``) promote the delivered
|
|
108
|
+
payload from a raw ``ArrayBuffer`` to a typed array of that dtype.
|
|
109
|
+
See *Chunked binary transport* below.
|
|
110
|
+
|
|
111
|
+
``{type: "binary-chunk", transfer_id, chunk_index, num_chunks, encoding, [file_index, file_count, data]}`` (one chunk)
|
|
112
|
+
One chunk of an in-flight transfer. ``encoding`` is per-chunk:
|
|
113
|
+
|
|
114
|
+
* ``"binary"`` (default): the **next** WebSocket frame is the
|
|
115
|
+
chunk's raw bytes. Zero protocol overhead.
|
|
116
|
+
* ``"base64"``: the ``data`` field on this JSON message **is** the
|
|
117
|
+
chunk, base64-encoded. No following binary frame. Useful when
|
|
118
|
+
the transport can't carry raw binary cleanly.
|
|
119
|
+
|
|
120
|
+
The optional ``file_index`` / ``file_count`` fields scope a chunk
|
|
121
|
+
to one file within a multi-file upload; without them the chunks
|
|
122
|
+
belong to a single payload.
|
|
99
123
|
|
|
100
124
|
``{type: "listen", id, wid, action}``
|
|
101
125
|
Subscribe to a callback. The browser wires up a forwarder on the
|
|
@@ -134,8 +158,10 @@ Browser → Server
|
|
|
134
158
|
Sent at session-info time and on every window resize, so the server
|
|
135
159
|
can answer ``get_screen_size()`` locally without a round-trip.
|
|
136
160
|
|
|
137
|
-
``{type: "
|
|
138
|
-
|
|
161
|
+
``{type: "binary-chunk", wid, transfer_id, file_index, file_count, chunk_index, num_chunks, encoding}`` (followed by a raw binary frame, unless ``encoding == "base64"``)
|
|
162
|
+
Same shape as the server-side ``binary-chunk``; used by the
|
|
163
|
+
browser to upload dropped files / picker selections. See *File
|
|
164
|
+
uploads* below.
|
|
139
165
|
|
|
140
166
|
|
|
141
167
|
Serialization Rules
|
|
@@ -163,9 +189,13 @@ Serialization Rules
|
|
|
163
189
|
reconstruction can re-spread it as ``method(*tuple)``.
|
|
164
190
|
|
|
165
191
|
* **Binary payloads** travel out of band. Build the JSON header
|
|
166
|
-
describing the call
|
|
167
|
-
|
|
168
|
-
|
|
192
|
+
describing the call (``binary-call`` for one frame,
|
|
193
|
+
``binary-call-chunked`` + N ``binary-chunk`` for multi-frame
|
|
194
|
+
transfers), send it, then send the raw binary frame(s). Receivers
|
|
195
|
+
pair them by FIFO order on a single connection; ``transfer_id``
|
|
196
|
+
in chunked transfers groups frames belonging to the same payload.
|
|
197
|
+
Do not interleave other binary frames between a chunk header and
|
|
198
|
+
its payload.
|
|
169
199
|
|
|
170
200
|
|
|
171
201
|
Widget Definitions: ``defs.py``
|
|
@@ -532,24 +562,68 @@ deciding which actions to forward; see ``STATE_SYNC_CALLBACKS`` and
|
|
|
532
562
|
``WIDGET_CALLBACK_SYNC`` in ``method_types.py`` for the policy table.
|
|
533
563
|
|
|
534
564
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
565
|
+
Chunked Binary Transport
|
|
566
|
+
------------------------
|
|
567
|
+
|
|
568
|
+
Used in both directions for payloads too large to ship in a single
|
|
569
|
+
WebSocket frame, or when the sender wants to interleave control
|
|
570
|
+
messages with a long transfer. The same ``binary-chunk`` envelope
|
|
571
|
+
is symmetric: server → browser (for ``binary-call-chunked`` —
|
|
572
|
+
e.g. an Image's pixel buffer) and browser → server (for file
|
|
573
|
+
uploads).
|
|
574
|
+
|
|
575
|
+
Wire layout::
|
|
576
|
+
|
|
577
|
+
server→browser (binary-call-chunked):
|
|
578
|
+
|
|
579
|
+
→ {"type": "binary-call-chunked",
|
|
580
|
+
"id": 42, "wid": 7, "method": "load_buffer",
|
|
581
|
+
"args": [[2048, 2048], {...}],
|
|
582
|
+
"transfer_id": 17, "num_chunks": 32,
|
|
583
|
+
"shape": [2048, 2048, 4], "dtype": "uint8"} ← optional
|
|
584
|
+
→ {"type": "binary-chunk", "transfer_id": 17,
|
|
585
|
+
"chunk_index": 0, "num_chunks": 32, "encoding": "binary"}
|
|
586
|
+
→ <raw 524288-byte binary frame>
|
|
587
|
+
→ {"type": "binary-chunk", ..., "chunk_index": 1, ...}
|
|
588
|
+
→ <raw 524288-byte binary frame>
|
|
589
|
+
⋮
|
|
590
|
+
→ {"type": "binary-chunk", ..., "chunk_index": 31, ...}
|
|
591
|
+
→ <raw <=524288-byte binary frame>
|
|
592
|
+
|
|
593
|
+
browser→server (file upload):
|
|
594
|
+
|
|
595
|
+
→ {"type": "callback", "wid": 7, "action": "drop-end",
|
|
596
|
+
"args": [{"transfer_id": 17,
|
|
597
|
+
"files": [{"name": "...", "size": ..., "type": ...}],
|
|
598
|
+
...}]}
|
|
599
|
+
→ {"type": "binary-chunk", "wid": 7,
|
|
600
|
+
"transfer_id": 17, "file_index": 0, "file_count": 1,
|
|
601
|
+
"chunk_index": 0, "num_chunks": N, "encoding": "binary"}
|
|
602
|
+
→ <raw binary frame>
|
|
603
|
+
⋮
|
|
604
|
+
|
|
605
|
+
Per-chunk ``encoding`` lets a sender choose ``"binary"`` (next
|
|
606
|
+
frame is the chunk) or ``"base64"`` (the chunk rides in this JSON
|
|
607
|
+
message's ``data`` field, no following binary frame). Default is
|
|
608
|
+
``"binary"``; both pgwidgets-js and pgwidgets-python only emit the
|
|
609
|
+
binary form, but receivers must accept either.
|
|
610
|
+
|
|
611
|
+
When the announce includes ``shape`` and ``dtype``, the receiver
|
|
612
|
+
constructs a typed array of that dtype (``Uint8Array``,
|
|
613
|
+
``Float32Array``, …) before dispatch instead of a raw
|
|
614
|
+
``ArrayBuffer``. The supported dtypes mirror pgwidgets-python's
|
|
615
|
+
:class:`pgwidgets.Buffer` (``uint8`` / ``uint16`` / ``uint32`` /
|
|
616
|
+
``int8`` / ``int16`` / ``int32`` / ``float32`` / ``float64``).
|
|
617
|
+
|
|
618
|
+
Chunks may arrive out-of-order in principle (a single TCP/WS
|
|
619
|
+
stream preserves order in practice, but receivers should still
|
|
620
|
+
write into indexed slots by ``chunk_index``, not append). The
|
|
621
|
+
transfer completes when every slot is filled; the receiver
|
|
622
|
+
reassembles, dispatches, and discards the transfer.
|
|
623
|
+
|
|
624
|
+
A binding can opt to ignore the chunked path and only support
|
|
625
|
+
single-frame ``binary-call`` if it doesn't need large payloads or
|
|
626
|
+
file uploads.
|
|
553
627
|
|
|
554
628
|
|
|
555
629
|
Session Identity and Reconnection
|
|
@@ -580,31 +654,96 @@ Things That Will Bite You
|
|
|
580
654
|
|
|
581
655
|
In rough order of how easy they are to miss:
|
|
582
656
|
|
|
583
|
-
* **Wid collisions
|
|
584
|
-
``next_wid``
|
|
657
|
+
* **Wid collisions and classMap classes that don't extend Callback.**
|
|
658
|
+
Advancing your allocator past ``next_wid`` (from every ``result``,
|
|
659
|
+
not just the latest) is necessary but not sufficient. If the
|
|
660
|
+
receiving side has a class in ``classMap`` whose constructor
|
|
661
|
+
doesn't call ``super()`` (e.g. a plain JS class layered on top of
|
|
662
|
+
pgwidgets-js — gingajs's ``Controller`` is one), then ``_nextId``
|
|
663
|
+
doesn't advance during that widget's construction. The **next**
|
|
664
|
+
widget's ``super()`` will then auto-assign a wid that the previous
|
|
665
|
+
Python-allocated widget is already sitting at, silently
|
|
666
|
+
overwriting it in the registry. Symptom: subsequent
|
|
667
|
+
``add_widget`` / ``listen`` calls fail with "Unknown widget id".
|
|
668
|
+
Mitigations in the reference implementation (do at least one):
|
|
669
|
+
|
|
670
|
+
- ``_handleCreate`` bumps ``Callback._nextId`` past ``msg.wid``
|
|
671
|
+
*before* calling ``new cls(...)``, so the auto-wid is guaranteed
|
|
672
|
+
to land in unoccupied territory.
|
|
673
|
+
- The ``Callback`` constructor skips occupied registry slots when
|
|
674
|
+
allocating, as a defensive backstop.
|
|
675
|
+
|
|
676
|
+
A binding that only ever uses classes which extend ``Callback`` is
|
|
677
|
+
safe without either mitigation, but it's worth having both.
|
|
678
|
+
|
|
585
679
|
* **Tuple vs single-arg setters.** ``set_position(x, y)`` stores a
|
|
586
680
|
tuple but ``set_text(s)`` stores a string. Your binding must
|
|
587
681
|
normalize so reconstruction can re-spread tuples as multiple args
|
|
588
682
|
and singles as one arg.
|
|
683
|
+
|
|
589
684
|
* **Suppressing callbacks.** Forget to set ``_syncing`` /
|
|
590
685
|
``_reconstructing`` and you'll get echo loops or duplicate state
|
|
591
686
|
updates.
|
|
687
|
+
|
|
592
688
|
* **The ``map`` exception.** Don't apply ``_reconstructing``
|
|
593
689
|
suppression to ``map``. The observers fire once and disconnect; if
|
|
594
690
|
you swallow ``map`` the user's handler is dead until something
|
|
595
691
|
else re-fires it.
|
|
692
|
+
|
|
596
693
|
* **Replaying passively-captured size.** This is the silent killer.
|
|
597
694
|
Capture must be unconditional (for getters), replay must be
|
|
598
695
|
conditional (or you pin every widget to whatever pixel size the
|
|
599
696
|
layout happened to settle at on capture). The same guard applies
|
|
600
697
|
in both the top-level state replay AND ``_transfer_proxy``.
|
|
698
|
+
|
|
601
699
|
* **Order in ``_replay_interleaved``.** ``_children`` and
|
|
602
700
|
``_replay_calls`` carry their own sequence numbers for exactly
|
|
603
701
|
this reason. Replay them merged in seq order.
|
|
702
|
+
|
|
604
703
|
* **Constructor args that are widgets.** Reconstruct them first
|
|
605
704
|
(``_ensure_reconstructed``) before sending the parent's ``create``.
|
|
606
|
-
|
|
607
|
-
|
|
705
|
+
|
|
706
|
+
* **Binary frames are FIFO-paired with headers.** A single
|
|
707
|
+
``binary-call`` JSON header followed by anything other than the
|
|
708
|
+
expected binary frame breaks the pairing for every following
|
|
709
|
+
binary call on that connection. Same applies to chunked
|
|
710
|
+
``binary-chunk`` headers with ``encoding == "binary"``.
|
|
711
|
+
|
|
712
|
+
* **Atomic emission of a chunked transfer.** On the sender side,
|
|
713
|
+
all chunks for one transfer should ship under a single
|
|
714
|
+
coroutine / lock on the WebSocket so other binary calls can't
|
|
715
|
+
splice frames in between. Receivers use ``transfer_id`` to
|
|
716
|
+
disambiguate, so out-of-band interleaving is technically OK —
|
|
717
|
+
but the reference implementation chooses atomic emission anyway
|
|
718
|
+
to keep failure modes simpler.
|
|
719
|
+
|
|
720
|
+
* **Chunk reassembly by index, not append.** WebSocket frames over
|
|
721
|
+
a single TCP stream do arrive in order, so a naive append-based
|
|
722
|
+
reassembler will *work* in practice — but ``chunk_index`` is on
|
|
723
|
+
every chunk header for a reason. Writing chunks into a slotted
|
|
724
|
+
array indexed by ``chunk_index`` is one extra line and bullet-
|
|
725
|
+
proofs you against any future transport that doesn't preserve
|
|
726
|
+
order.
|
|
727
|
+
|
|
728
|
+
* **Mixing encodings within a transfer.** ``"binary"`` and
|
|
729
|
+
``"base64"`` chunks are interchangeable per the protocol, but
|
|
730
|
+
doing both in one transfer is surprising. Pick one per transfer
|
|
731
|
+
and stay consistent.
|
|
732
|
+
|
|
733
|
+
* **Unknown dtypes degrade to raw ArrayBuffer.** If an announce
|
|
734
|
+
carries ``dtype: "float16"`` (or anything else not in the
|
|
735
|
+
standard set), the JS side has no matching TypedArray
|
|
736
|
+
constructor and logs a warning, then delivers the raw
|
|
737
|
+
``ArrayBuffer`` instead. Stick to the documented dtypes
|
|
738
|
+
(``uint8`` / ``uint16`` / ``uint32`` / ``int8`` / ``int16`` /
|
|
739
|
+
``int32`` / ``float32`` / ``float64``).
|
|
740
|
+
|
|
741
|
+
* **API shape: ``f.data`` is bytes.** As of the binary-transport
|
|
742
|
+
unification, ``payload.files[i].data`` in drop / FileDialog
|
|
743
|
+
callbacks is raw bytes (``ArrayBuffer`` on the JS side, ``bytes``
|
|
744
|
+
on the Python side) — not a ``"data:<mime>;base64,…"`` string.
|
|
745
|
+
Old code that did ``base64.b64decode(data.split(",", 1)[1])`` is
|
|
746
|
+
now wrong; just use ``data`` directly.
|
|
608
747
|
|
|
609
748
|
|
|
610
749
|
Where to Look in the Code
|
|
@@ -548,6 +548,8 @@ WIDGETS = {
|
|
|
548
548
|
# browser reconnect). Not part of the user-facing API.
|
|
549
549
|
"_restoreTagIntervals": ["intervals"],
|
|
550
550
|
"_bindNamedRef": ["name", "ref"],
|
|
551
|
+
"_setCursorOffset": ["offset"],
|
|
552
|
+
"_setSelectionOffsets": ["start", "end"],
|
|
551
553
|
"get_ref_start": [],
|
|
552
554
|
"get_ref_end": [],
|
|
553
555
|
"get_ref_bounds": [],
|
|
@@ -63,12 +63,6 @@ class AbstractScrollArea extends ContainerWidget {
|
|
|
63
63
|
this._vVisibility = 'auto';
|
|
64
64
|
|
|
65
65
|
// bind public methods
|
|
66
|
-
this.set_widget = this.set_widget.bind(this);
|
|
67
|
-
this.set_thumb_percent = this.set_thumb_percent.bind(this);
|
|
68
|
-
this.get_thumb_percent = this.get_thumb_percent.bind(this);
|
|
69
|
-
this.set_scroll_percent = this.set_scroll_percent.bind(this);
|
|
70
|
-
this.get_scroll_percent = this.get_scroll_percent.bind(this);
|
|
71
|
-
this.set_scroll_bar_visibility = this.set_scroll_bar_visibility.bind(this);
|
|
72
66
|
|
|
73
67
|
// scrollbar user interaction -> 'scrolled' callback
|
|
74
68
|
this._hScrollBar.add_callback('activated', (w, pct) => {
|
|
@@ -24,12 +24,6 @@ class Box extends ContainerWidget {
|
|
|
24
24
|
this.element.className = 'box-widget';
|
|
25
25
|
this.orientation = this.get_option(options, 'orientation', 'horizontal');
|
|
26
26
|
|
|
27
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
28
|
-
this.add_widget = this.add_widget.bind(this);
|
|
29
|
-
this.insert_widget = this.insert_widget.bind(this);
|
|
30
|
-
this.set_spacing = this.set_spacing.bind(this);
|
|
31
|
-
this.init_style = this.init_style.bind(this);
|
|
32
|
-
|
|
33
27
|
this.init_style();
|
|
34
28
|
}
|
|
35
29
|
|
|
@@ -183,7 +177,6 @@ class ButtonBox extends Box {
|
|
|
183
177
|
this._halign = this.get_option(options, 'halign', 'center');
|
|
184
178
|
this._applyAlign();
|
|
185
179
|
|
|
186
|
-
this.set_halign = this.set_halign.bind(this);
|
|
187
180
|
}
|
|
188
181
|
|
|
189
182
|
/** @private */
|
|
@@ -31,14 +31,6 @@ class Button extends Widget {
|
|
|
31
31
|
this.element.appendChild(this.textElement);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
35
|
-
this.set_text = this.set_text.bind(this);
|
|
36
|
-
this.get_text = this.get_text.bind(this);
|
|
37
|
-
this.set_icon = this.set_icon.bind(this);
|
|
38
|
-
this.get_icon = this.get_icon.bind(this);
|
|
39
|
-
this.set_color = this.set_color.bind(this);
|
|
40
|
-
this._cb_redirect = this._cb_redirect.bind(this);
|
|
41
|
-
|
|
42
34
|
super.init_style();
|
|
43
35
|
|
|
44
36
|
this.element.onclick = () => this._cb_redirect('clicked');
|
|
@@ -14,18 +14,23 @@ class Callback {
|
|
|
14
14
|
static _registry = new Map();
|
|
15
15
|
|
|
16
16
|
constructor() {
|
|
17
|
+
// Skip over any registry slot that's already occupied so we
|
|
18
|
+
// never silently overwrite a widget at an in-use wid. This
|
|
19
|
+
// matters under the remote interface: a class in the classMap
|
|
20
|
+
// that doesn't call super() (e.g. a plain JS class layered on
|
|
21
|
+
// top) leaves _nextId behind the Python-assigned wid range,
|
|
22
|
+
// and the next super() call would otherwise clobber a real
|
|
23
|
+
// widget there. RemoteInterface._handleCreate also bumps
|
|
24
|
+
// _nextId past msg.wid, this is a defensive backstop.
|
|
25
|
+
while (Callback._registry.has(Callback._nextId)) {
|
|
26
|
+
Callback._nextId++;
|
|
27
|
+
}
|
|
17
28
|
this.wid = Callback._nextId++;
|
|
18
29
|
Callback._registry.set(this.wid, this);
|
|
19
30
|
|
|
20
31
|
this.cb = {};
|
|
21
32
|
this._destroyed = false;
|
|
22
33
|
|
|
23
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
24
|
-
this.enable_callback = this.enable_callback.bind(this);
|
|
25
|
-
this.add_callback = this.add_callback.bind(this);
|
|
26
|
-
this.clear_callback = this.clear_callback.bind(this);
|
|
27
|
-
this.remove_callback = this.remove_callback.bind(this);
|
|
28
|
-
this.make_callback = this.make_callback.bind(this);
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
/* CALLBACK HANDLING */
|
|
@@ -41,11 +41,6 @@ class Canvas extends Widget {
|
|
|
41
41
|
this._offscreen.height = this.element.height;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
45
|
-
this.draw_image = this.draw_image.bind(this);
|
|
46
|
-
this.get_draw_context = this.get_draw_context.bind(this);
|
|
47
|
-
this.update = this.update.bind(this);
|
|
48
|
-
|
|
49
44
|
super.init_style();
|
|
50
45
|
if (this.get_option(options, 'interactive', false)) {
|
|
51
46
|
this._initInteractiveEvents({focusable: true, cursor: 'crosshair'});
|
|
@@ -30,11 +30,6 @@ class CheckBox extends Widget {
|
|
|
30
30
|
this.label = document.createTextNode(text);
|
|
31
31
|
this.element.appendChild(this.label);
|
|
32
32
|
|
|
33
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
34
|
-
this.set_state = this.set_state.bind(this);
|
|
35
|
-
this.get_state = this.get_state.bind(this);
|
|
36
|
-
this._cb_redirect = this._cb_redirect.bind(this);
|
|
37
|
-
|
|
38
33
|
this.checkbox.onclick = () => this._cb_redirect('clicked');
|
|
39
34
|
|
|
40
35
|
this.enable_callback('activated');
|
|
@@ -32,10 +32,6 @@ class ColorDialog extends Dialog {
|
|
|
32
32
|
|
|
33
33
|
this.element.classList.add('colordialog-widget');
|
|
34
34
|
|
|
35
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
36
|
-
this.get_color = this.get_color.bind(this);
|
|
37
|
-
this.set_color = this.set_color.bind(this);
|
|
38
|
-
|
|
39
35
|
// Create the embedded color picker widget
|
|
40
36
|
this._colorWidget = new ColorWidget({
|
|
41
37
|
color: options.color || '#ff0000'
|
|
@@ -28,9 +28,6 @@ class ColorWidget extends Widget {
|
|
|
28
28
|
this.element = document.createElement('div');
|
|
29
29
|
this.element.className = 'colorwidget';
|
|
30
30
|
|
|
31
|
-
this.get_color = this.get_color.bind(this);
|
|
32
|
-
this.set_color = this.set_color.bind(this);
|
|
33
|
-
|
|
34
31
|
// internal HSV state (h: 0-360, s: 0-1, v: 0-1)
|
|
35
32
|
this._h = 0;
|
|
36
33
|
this._s = 1;
|
|
@@ -57,24 +57,6 @@ class ComboBox extends Widget {
|
|
|
57
57
|
// user-driven selections set this to true; clear() resets it.
|
|
58
58
|
this._indexExplicit = false;
|
|
59
59
|
|
|
60
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
61
|
-
this.append_text = this.append_text.bind(this);
|
|
62
|
-
this.insert_alpha = this.insert_alpha.bind(this);
|
|
63
|
-
this.delete_alpha = this.delete_alpha.bind(this);
|
|
64
|
-
this.set_text = this.set_text.bind(this);
|
|
65
|
-
this.get_text = this.get_text.bind(this);
|
|
66
|
-
this.set_index = this.set_index.bind(this);
|
|
67
|
-
this.get_index = this.get_index.bind(this);
|
|
68
|
-
this.get_alpha = this.get_alpha.bind(this);
|
|
69
|
-
this.show_text = this.show_text.bind(this);
|
|
70
|
-
this.clear = this.clear.bind(this);
|
|
71
|
-
this.set_length = this.set_length.bind(this);
|
|
72
|
-
this._autoSize = this._autoSize.bind(this);
|
|
73
|
-
this._buildDropdown = this._buildDropdown.bind(this);
|
|
74
|
-
this._showDropdown = this._showDropdown.bind(this);
|
|
75
|
-
this._hideDropdown = this._hideDropdown.bind(this);
|
|
76
|
-
this._toggleDropdown = this._toggleDropdown.bind(this);
|
|
77
|
-
|
|
78
60
|
// toggle dropdown on button or input click (input click only for non-editable)
|
|
79
61
|
this._button.addEventListener('mousedown', (e) => {
|
|
80
62
|
e.preventDefault();
|
|
@@ -23,17 +23,6 @@ class ComboBoxNative extends Widget {
|
|
|
23
23
|
|
|
24
24
|
this.element.className = 'combobox-native-widget';
|
|
25
25
|
|
|
26
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
27
|
-
this.append_text = this.append_text.bind(this);
|
|
28
|
-
this.insert_alpha = this.insert_alpha.bind(this);
|
|
29
|
-
this.delete_alpha = this.delete_alpha.bind(this);
|
|
30
|
-
this.set_text = this.set_text.bind(this);
|
|
31
|
-
this.get_text = this.get_text.bind(this);
|
|
32
|
-
this.get_alpha = this.get_alpha.bind(this);
|
|
33
|
-
this.show_text = this.show_text.bind(this);
|
|
34
|
-
this.clear = this.clear.bind(this);
|
|
35
|
-
this._cb_redirect = this._cb_redirect.bind(this);
|
|
36
|
-
|
|
37
26
|
this.element.onclick = () => this._cb_redirect('clicked');
|
|
38
27
|
this.element.addEventListener('wheel', (e) => {
|
|
39
28
|
e.preventDefault();
|
|
@@ -115,18 +115,6 @@ class Dial extends Widget {
|
|
|
115
115
|
this._applyValuePosition();
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
119
|
-
this.set_value = this.set_value.bind(this);
|
|
120
|
-
this.get_value = this.get_value.bind(this);
|
|
121
|
-
this.set_limits = this.set_limits.bind(this);
|
|
122
|
-
this.set_tracking = this.set_tracking.bind(this);
|
|
123
|
-
this.set_decimals = this.set_decimals.bind(this);
|
|
124
|
-
this.set_knob_diameter = this.set_knob_diameter.bind(this);
|
|
125
|
-
this.set_icon = this.set_icon.bind(this);
|
|
126
|
-
this._onMouseDown = this._onMouseDown.bind(this);
|
|
127
|
-
this._onMouseMove = this._onMouseMove.bind(this);
|
|
128
|
-
this._onMouseUp = this._onMouseUp.bind(this);
|
|
129
|
-
|
|
130
118
|
this._svg.addEventListener('mousedown', this._onMouseDown);
|
|
131
119
|
this._svg.addEventListener('wheel', (e) => {
|
|
132
120
|
e.preventDefault();
|
|
@@ -416,7 +404,7 @@ class Dial extends Widget {
|
|
|
416
404
|
}
|
|
417
405
|
|
|
418
406
|
/** @private */
|
|
419
|
-
_onMouseDown(e) {
|
|
407
|
+
_onMouseDown = (e) => {
|
|
420
408
|
e.preventDefault();
|
|
421
409
|
this.value = this._eventToValue(e);
|
|
422
410
|
this._updateVisual();
|
|
@@ -428,7 +416,7 @@ class Dial extends Widget {
|
|
|
428
416
|
}
|
|
429
417
|
|
|
430
418
|
/** @private */
|
|
431
|
-
_onMouseMove(e) {
|
|
419
|
+
_onMouseMove = (e) => {
|
|
432
420
|
this.value = this._eventToValue(e);
|
|
433
421
|
this._updateVisual();
|
|
434
422
|
if (this.track) {
|
|
@@ -437,7 +425,7 @@ class Dial extends Widget {
|
|
|
437
425
|
}
|
|
438
426
|
|
|
439
427
|
/** @private */
|
|
440
|
-
_onMouseUp(e) {
|
|
428
|
+
_onMouseUp = (e) => {
|
|
441
429
|
document.removeEventListener('mousemove', this._onMouseMove);
|
|
442
430
|
document.removeEventListener('mouseup', this._onMouseUp);
|
|
443
431
|
this.value = this._eventToValue(e);
|
|
@@ -39,13 +39,6 @@ class Dialog extends TopLevel {
|
|
|
39
39
|
this.element.classList.add('dialog-modal');
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
// JavaScript hack to bind "this" correctly for our methods
|
|
43
|
-
this.get_content_area = this.get_content_area.bind(this);
|
|
44
|
-
this.add_widget = this.add_widget.bind(this);
|
|
45
|
-
this.insert_widget = this.insert_widget.bind(this);
|
|
46
|
-
this.add_button = this.add_button.bind(this);
|
|
47
|
-
this.set_spacing = this.set_spacing.bind(this);
|
|
48
|
-
|
|
49
42
|
// main layout: content area + button bar
|
|
50
43
|
this._vbox = new VBox();
|
|
51
44
|
this._vbox.set_spacing(4);
|
|
@@ -33,10 +33,6 @@ class ExternalWidget extends Widget {
|
|
|
33
33
|
}
|
|
34
34
|
this.element.className = 'external-widget';
|
|
35
35
|
|
|
36
|
-
this.set_content = this.set_content.bind(this);
|
|
37
|
-
this.get_content_element = this.get_content_element.bind(this);
|
|
38
|
-
this.clear = this.clear.bind(this);
|
|
39
|
-
|
|
40
36
|
// Inner div where external content is rendered.
|
|
41
37
|
this._content = document.createElement('div');
|
|
42
38
|
this._content.className = 'external-widget-content';
|