pgwidgets-js 0.3.0__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.
Files changed (204) hide show
  1. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/PKG-INFO +1 -1
  2. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/WhatsNew.rst +280 -0
  3. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/styling.rst +114 -0
  4. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/display.rst +111 -10
  5. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/layout.rst +27 -3
  6. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/menus.rst +7 -0
  7. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/text.rst +7 -1
  8. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/package.json +1 -1
  9. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/defs.py +70 -11
  10. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/pyodide/widget.py +86 -4
  11. pgwidgets_js-0.3.2/pgwidgets_js/static/css/Image.css +59 -0
  12. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ProgressBar.css +7 -0
  13. pgwidgets_js-0.3.2/pgwidgets_js/static/css/ScrollArea.css +23 -0
  14. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TreeView.css +34 -2
  15. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Widget.css +14 -0
  16. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Box.js +44 -5
  17. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Image.js +48 -17
  18. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Label.js +24 -0
  19. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Menu.js +7 -6
  20. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/MenuBar.js +6 -3
  21. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/RemoteInterface.js +143 -0
  22. pgwidgets_js-0.3.2/pgwidgets_js/static/modules/TableView.js +85 -0
  23. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ToolBar.js +4 -3
  24. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ToolBarAction.js +6 -1
  25. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TreeView.js +925 -24
  26. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Widget.js +42 -3
  27. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/PKG-INFO +1 -1
  28. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/SOURCES.txt +1 -0
  29. pgwidgets_js-0.3.2/tests/test_recent_additions.py +108 -0
  30. pgwidgets_js-0.3.0/pgwidgets_js/static/css/Image.css +0 -23
  31. pgwidgets_js-0.3.0/pgwidgets_js/static/css/ScrollArea.css +0 -14
  32. pgwidgets_js-0.3.0/pgwidgets_js/static/modules/TableView.js +0 -40
  33. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/.flake8 +0 -0
  34. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/.github/workflows/tests.yml +0 -0
  35. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/.gitignore +0 -0
  36. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/.readthedocs.yaml +0 -0
  37. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/LICENSE.md +0 -0
  38. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/MANIFEST.in +0 -0
  39. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/README.md +0 -0
  40. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/Widgets.css +0 -0
  41. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/Widgets.js +0 -0
  42. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/Makefile +0 -0
  43. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/callbacks.rst +0 -0
  44. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/conf.py +0 -0
  45. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/electron.rst +0 -0
  46. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/external-widgets.rst +0 -0
  47. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/for-developers.rst +0 -0
  48. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/frameworks.rst +0 -0
  49. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/getting-started.rst +0 -0
  50. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/index.rst +0 -0
  51. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/pyodide.rst +0 -0
  52. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/remote.rst +0 -0
  53. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/controls.rst +0 -0
  54. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/dialogs.rst +0 -0
  55. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/index.rst +0 -0
  56. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/docs/widgets/nonvisual.rst +0 -0
  57. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/all_widgets.html +0 -0
  58. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/all_widgets_pyodide.html +0 -0
  59. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/all_widgets_pyodide.py +0 -0
  60. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/all_widgets_pyscript.html +0 -0
  61. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/all_widgets_pyscript.py +0 -0
  62. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/box.html +0 -0
  63. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/button.html +0 -0
  64. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/canvas.html +0 -0
  65. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/checkbox.html +0 -0
  66. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/colordialog.html +0 -0
  67. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/combobox.html +0 -0
  68. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/debug_spinbox.html +0 -0
  69. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/dial.html +0 -0
  70. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/dialog.html +0 -0
  71. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/electron/.gitignore +0 -0
  72. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/electron/.npmrc +0 -0
  73. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/electron/index.html +0 -0
  74. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/electron/main.js +0 -0
  75. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/electron/package.json +0 -0
  76. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/expander.html +0 -0
  77. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/external_widgets.html +0 -0
  78. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/fixedlayout.html +0 -0
  79. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/frame.html +0 -0
  80. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/gridbox.html +0 -0
  81. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/htmlview.html +0 -0
  82. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/image.html +0 -0
  83. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/label.html +0 -0
  84. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/mdi_widget.html +0 -0
  85. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/menu.html +0 -0
  86. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/progressbar.html +0 -0
  87. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/pyodide_demo.html +0 -0
  88. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/pyscript.toml +0 -0
  89. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/radiobutton.html +0 -0
  90. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/remote.html +0 -0
  91. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/remote_demo.py +0 -0
  92. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/remote_demo_async.py +0 -0
  93. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/scroll_area.html +0 -0
  94. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/scrollable.html +0 -0
  95. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/scrollbar.html +0 -0
  96. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/slider.html +0 -0
  97. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/spinbox.html +0 -0
  98. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/splitter.html +0 -0
  99. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/tab_widget.html +0 -0
  100. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/tableview.html +0 -0
  101. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/text_entry.html +0 -0
  102. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/textarea.html +0 -0
  103. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/textentryset.html +0 -0
  104. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/textsource.html +0 -0
  105. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/togglebutton.html +0 -0
  106. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/toolbar.html +0 -0
  107. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/treeview.html +0 -0
  108. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/examples/videowidget.html +0 -0
  109. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/__init__.py +0 -0
  110. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/pyodide/__init__.py +0 -0
  111. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/pyodide/log.py +0 -0
  112. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/Widgets.css +0 -0
  113. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/Widgets.js +0 -0
  114. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/AbstractScrollArea.css +0 -0
  115. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Box.css +0 -0
  116. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Button.css +0 -0
  117. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/CheckBox.css +0 -0
  118. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ColorDialog.css +0 -0
  119. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ComboBox.css +0 -0
  120. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Dial.css +0 -0
  121. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Dialog.css +0 -0
  122. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Expander.css +0 -0
  123. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ExternalWidget.css +0 -0
  124. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/FixedLayout.css +0 -0
  125. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Frame.css +0 -0
  126. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/GridBox.css +0 -0
  127. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/HtmlView.css +0 -0
  128. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Label.css +0 -0
  129. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/MDIWidget.css +0 -0
  130. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Menu.css +0 -0
  131. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/RadioButton.css +0 -0
  132. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ScrollBar.css +0 -0
  133. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Slider.css +0 -0
  134. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/SpinBox.css +0 -0
  135. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Splitter.css +0 -0
  136. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/StatusBar.css +0 -0
  137. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TabWidget.css +0 -0
  138. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/Text.css +0 -0
  139. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TextArea.css +0 -0
  140. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TextEntrySet.css +0 -0
  141. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TextSource.css +0 -0
  142. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ToggleButton.css +0 -0
  143. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/ToolBar.css +0 -0
  144. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/TopLevel.css +0 -0
  145. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/VideoWidget.css +0 -0
  146. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/css/WindowMenu.css +0 -0
  147. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/file.svg +0 -0
  148. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/folder.svg +0 -0
  149. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/hdots.svg +0 -0
  150. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/pgicon.svg +0 -0
  151. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/pgwidgets-logo.png +0 -0
  152. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/pgwidgets-logo.svg +0 -0
  153. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/icons/vdots.svg +0 -0
  154. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/AbstractScrollArea.js +0 -0
  155. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Button.js +0 -0
  156. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Callback.js +0 -0
  157. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Canvas.js +0 -0
  158. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/CheckBox.js +0 -0
  159. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ColorDialog.js +0 -0
  160. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ColorWidget.js +0 -0
  161. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ComboBox.js +0 -0
  162. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ComboBoxNative.js +0 -0
  163. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Dial.js +0 -0
  164. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Dialog.js +0 -0
  165. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Expander.js +0 -0
  166. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ExternalWidget.js +0 -0
  167. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/FileDialog.js +0 -0
  168. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/FixedLayout.js +0 -0
  169. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Frame.js +0 -0
  170. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/GridBox.js +0 -0
  171. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/HtmlView.js +0 -0
  172. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/MDIWidget.js +0 -0
  173. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/MenuAction.js +0 -0
  174. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Page.js +0 -0
  175. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ProgressBar.js +0 -0
  176. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/RadioButton.js +0 -0
  177. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ScrollArea.js +0 -0
  178. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ScrollBar.js +0 -0
  179. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Slider.js +0 -0
  180. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/SpinBox.js +0 -0
  181. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Splitter.js +0 -0
  182. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/StatusBar.js +0 -0
  183. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TabWidget.js +0 -0
  184. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextArea.js +0 -0
  185. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextEntry.js +0 -0
  186. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextEntrySet.js +0 -0
  187. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextSource.js +0 -0
  188. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TextWidget.js +0 -0
  189. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/Timer.js +0 -0
  190. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/ToggleButton.js +0 -0
  191. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/TopLevel.js +0 -0
  192. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/VideoWidget.js +0 -0
  193. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/modules/WindowMenu.js +0 -0
  194. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js/static/remote.html +0 -0
  195. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/dependency_links.txt +0 -0
  196. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/requires.txt +0 -0
  197. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pgwidgets_js.egg-info/top_level.txt +0 -0
  198. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/pyproject.toml +0 -0
  199. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/setup.cfg +0 -0
  200. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/setup.py +0 -0
  201. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/tests/__init__.py +0 -0
  202. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/tests/test_consistency.py +0 -0
  203. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/tests/test_defs.py +0 -0
  204. {pgwidgets_js-0.3.0 → pgwidgets_js-0.3.2}/tests/test_static_assets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pgwidgets-js
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: pgwidgets JavaScript widget library — static assets for use with Python servers
5
5
  Author: PGWidgets Developers
6
6
  License: BSD-3-Clause
@@ -1,6 +1,286 @@
1
1
  What's New
2
2
  ==========
3
3
 
4
+ Recent changes — since ``v0.3.0``
5
+ ---------------------------------
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
+
63
+ Custom fonts: ``register-font`` / ``set-default-font``
64
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
+
66
+ Two new remote-protocol message types let the Python side push
67
+ custom font files to the browser and apply a document-wide
68
+ default font.
69
+
70
+ * ``register-font`` -- the JS handler creates a ``FontFace``,
71
+ awaits its ``load()``, and adds it to ``document.fonts``,
72
+ after which any widget ``set_font(family, ...)`` resolves
73
+ against it. The accompanying ``url`` is resolved against
74
+ ``window.location.href`` so the same path works under the
75
+ built-in HTTP server, Flask / nginx, and pyodide.
76
+ * ``set-default-font`` -- manages a single
77
+ ``<style id="pg-default-font">`` element on ``<head>`` that
78
+ writes ``--pg-default-font-{family,size,weight,style}`` CSS
79
+ variables on ``:root``. The base ``body`` rule consumes
80
+ those variables with safe fallbacks
81
+ (``sans-serif`` / ``13px`` / ``normal`` / ``normal``), so
82
+ apps that never opt in see no behavioural change. Per-
83
+ widget ``set_font(...)`` still wins via inline-style
84
+ specificity.
85
+
86
+ Weight / style normalisation in the JS handler translates
87
+ descriptive TTF metadata names -- ``thin``, ``light``,
88
+ ``medium``, ``semibold``, ``extrabold``, ``black``, ``heavy``,
89
+ etc. -- to the numeric CSS values per the CSS Fonts spec, so
90
+ fonts shipped with descriptive weight names load without
91
+ raising ``Invalid font descriptor`` errors. Numeric strings
92
+ and valid CSS keywords pass through unchanged.
93
+
94
+ See :ref:`custom-fonts` for the matching Python-side API.
95
+
96
+ TreeView: column-boundary alignment
97
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98
+
99
+ Three related fixes keep the header columns pinned to the body
100
+ columns in every case:
101
+
102
+ * ``_syncScrollbars`` writes ``this._header.style.width =
103
+ this._body.scrollWidth`` so ``1fr`` grid units resolve to
104
+ identical pixel widths in the header and body grids -- a
105
+ body grown to ``max-content`` by wide row content no longer
106
+ drifts wider than the header.
107
+ * ``_gridTemplate`` wraps every ``fr`` track in
108
+ ``minmax(0, fr)``. Without it a single widget cell whose
109
+ content can't shrink (a ``<button>Reset</button>`` or
110
+ ``<select>``) forces its column wider than the matching
111
+ empty-content header track; ``minmax(0, fr)`` lets the
112
+ ``fr`` distribution dominate. Oversize content is clipped
113
+ by the cell's own ``overflow: hidden``.
114
+ * ``_setupColumnResize`` lowers the minimum drag width from
115
+ 30 px to 5 px so genuinely small icon / checkbox columns
116
+ (``colwidth: 10`` and similar) can be resized instead of
117
+ inflating to 30 the moment a drag starts.
118
+
119
+ Image (animation-frame): wrapper div
120
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
+
122
+ Animation-frame ``Image`` mode wraps its canvas in a
123
+ ``<div class="image-widget">`` and positions the canvas
124
+ ``absolute; inset: 0; width: 100%; height: 100%``. The wrapper
125
+ sits in the layout chain like any plain block, and absolutely-
126
+ positioned children contribute zero to their parent's
127
+ auto-resolved size -- so writing ``canvas.width`` /
128
+ ``canvas.height`` in the resize callback (which the browser
129
+ mirrors back as an ``aspect-ratio: auto W/H`` presentational
130
+ hint) can no longer feed back into layout. Resolves the
131
+ runaway-vertical-growth feedback loop that ``contain: size`` on
132
+ a bare canvas couldn't fully gate.
133
+
134
+ The wrapper has no width/height of its own -- callers must
135
+ give it size via ``set_expanding(True, True)``, packing with
136
+ ``stretch > 0``, or ``resize(w, h)``.
137
+
138
+ Box / Widget: respect user-set min sizes
139
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140
+
141
+ ``Box._applyBoxChildSizing`` (in the ``stretch > 0`` and
142
+ ``mainExpand`` branches) and ``Widget.set_expanding`` were
143
+ both writing ``min-width: 0`` / ``min-height: 0`` unconditionally
144
+ to override the browser's default ``min: auto`` on flex items.
145
+ Either of them running second silently erased a floor declared
146
+ via ``set_min_size``. Both call sites now guard with
147
+ ``if (!s.minWidth) s.minWidth = '0'`` so user-set mins survive
148
+ regardless of call order.
149
+
150
+ TreeView / TableView: widget-typed cells
151
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152
+
153
+ Column descriptors gained an optional ``widget`` field that
154
+ swaps a column's plain-text cells for a real DOM input element:
155
+
156
+ * ``"checkbox"`` -- ``<input type="checkbox">`` bound to a
157
+ boolean cell value;
158
+ * ``"combobox"`` -- ``<select>`` populated from a ``choices``
159
+ array;
160
+ * ``"progress"`` -- ``<progress>`` driven by ``min`` / ``max``
161
+ (read-only);
162
+ * ``"button"`` -- ``<button>`` whose label is the cell value
163
+ (or the column's ``text`` fallback).
164
+
165
+ Editable widget cells fire ``cell_edited(widget, path, col_key,
166
+ old, new)``; buttons fire a new ``cell_action(widget,
167
+ row_values, col_key)`` callback. Two more column-descriptor
168
+ keys gate the per-row widget by row-dict field name:
169
+ ``enabled_key`` (greys the widget out when the named field is
170
+ falsy) and ``visible_key`` (suppresses the widget entirely on
171
+ that row -- the cell stays empty).
172
+
173
+ .. code-block:: javascript
174
+
175
+ table.set_columns([
176
+ {label: "Name", key: "NAME", type: "string"},
177
+ {label: "Done", key: "DONE", type: "bool",
178
+ widget: "checkbox", enabled_key: "CAN_EDIT"},
179
+ {label: "", key: "GO", type: "string",
180
+ widget: "button", text: "Open",
181
+ visible_key: "OPENABLE"},
182
+ ]);
183
+
184
+ Cell / row / column / table colour overrides
185
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186
+
187
+ Four new override layers paint cells without touching the
188
+ underlying data: ``set_cell_color(path, col_key, fg, bg, bold)``,
189
+ ``set_row_color(path, fg, bg, bold)``, ``set_column_color(col_key,
190
+ fg, bg, bold)``, and ``set_table_color(fg, bg, bold)``.
191
+ Specificity cascades cell → row → column → table per-channel,
192
+ so a row-level fg + column-level bg compose into the same
193
+ cell. Each method also accepts an optional ``bold`` argument
194
+ that toggles the cell font weight.
195
+
196
+ Matching ``clear_*_color`` helpers and ``clear_all_colors()``
197
+ drop overrides at any layer.
198
+
199
+ Cell-level selection and clipboard
200
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
201
+
202
+ TreeView / TableView gained two new ``selection_mode`` values --
203
+ ``"single-cell"`` and ``"multiple-cell"`` -- that let the user
204
+ select individual cells rather than whole rows. Cell selections
205
+ fire a new ``cell_selected`` callback with the list of selected
206
+ ``{path, col_key, value}`` cells.
207
+
208
+ Widget-level Ctrl/Cmd+C/X/V keyboard handlers feed three new
209
+ callbacks: ``copy``, ``cut``, ``paste``. The
210
+ ``copy_selection`` / ``cut_selection`` / ``paste_selection``
211
+ methods do the same programmatically. Cell-mode cuts emit a
212
+ TSV payload built from the selected cells; row mode emits the
213
+ whole row.
214
+
215
+ ``activated`` callback now reports the clicked column
216
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
217
+
218
+ The ``activated`` callback signature gained a 4th argument:
219
+ ``(widget, values, path, col_key)``. Handlers that destructure
220
+ the first three keep working; new code can branch on which
221
+ column the user double-clicked.
222
+
223
+ Widget: ``set_bg`` + Label: ``set_valign``
224
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
225
+
226
+ Two small style helpers:
227
+
228
+ * ``Widget.set_bg(color)`` on the base class -- generic
229
+ background-colour setter, accepts a CSS string or ``null``
230
+ to clear. Works on transparent containers (Box / Grid /
231
+ ScrollArea) too.
232
+ * ``Label.set_valign(align)`` -- ``"top"`` / ``"center"`` /
233
+ ``"bottom"`` vertical placement of the label text within
234
+ whatever vertical space the parent allocates. Only visible
235
+ when the label is given more height than its text needs.
236
+
237
+ Box: ``set_align`` (cross-axis)
238
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239
+
240
+ Boxes (and the ``HBox`` / ``VBox`` shortcuts) gained a single
241
+ orientation-aware ``set_align(align)`` method controlling the
242
+ cross-axis placement of children:
243
+
244
+ * horizontal box → ``"top"`` / ``"center"`` / ``"bottom"``;
245
+ * vertical box → ``"left"`` / ``"center"`` / ``"right"``.
246
+
247
+ Mismatched names raise. Maps to flex ``align-items`` on the
248
+ box element.
249
+
250
+ TableView: positional row API
251
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
252
+
253
+ ``TableView`` gained an explicit positional-row API so callers
254
+ that maintain row data as positional arrays (one common
255
+ cross-backend pattern) don't have to wrap every row in a dict:
256
+
257
+ * ``set_data(rows)`` now accepts either a list of dicts
258
+ (preferred, keyed by column key) *or* a list of positional
259
+ arrays mapped to columns in order.
260
+ * ``insert_row(index, values)`` -- new method. ``values`` is
261
+ a dict or an array; ``index`` is the 0-based visible
262
+ position, out-of-range clamps to append. Returns the new
263
+ row's path so the caller can address it afterwards.
264
+ * ``append_row(values)`` is the index-at-end shortcut.
265
+
266
+ The row-key generator stays internal (``row0``, ``row1`` ...);
267
+ sort order, selection, and the per-cell colour overrides all
268
+ follow rows by key rather than by visible index, so positional
269
+ inserts compose with the existing higher-level APIs.
270
+
271
+ Other improvements
272
+ ~~~~~~~~~~~~~~~~~~
273
+
274
+ * TreeView: fix two cell-editing / rendering bugs. The per-
275
+ cell ``dblclick`` handler captured the loop counter ``i``
276
+ from the *outer* scope -- which had already advanced past
277
+ the row by the time the click fired -- and a sibling
278
+ rendering path miscomputed the row index when columns were
279
+ hidden. Both surfaced when wiring inline editing through
280
+ cross-backend table widgets.
281
+
282
+ ----
283
+
4
284
  Recent changes — since ``v0.2.3``
5
285
  ---------------------------------
6
286
 
@@ -132,6 +132,16 @@ override CSS when called:
132
132
  - CSS Properties Affected
133
133
  * - ``set_color(bg, fg)``
134
134
  - ``background-color``, ``color``
135
+ * - ``set_bg(color)``
136
+ - ``background-color`` (base-class helper; ``null`` clears
137
+ the override)
138
+ * - ``Label.set_valign(align)``
139
+ - ``display: flex; flex-direction: column; justify-content:
140
+ flex-start | center | flex-end`` -- vertical placement
141
+ of the label text
142
+ * - ``Box.set_align(align)``
143
+ - ``align-items`` (cross-axis alignment of Box children;
144
+ orientation-aware)
135
145
  * - ``set_font(family, size, weight, style)``
136
146
  - ``font-family``, ``font-size``, ``font-weight``, ``font-style``
137
147
  * - ``set_border_width(w)``
@@ -167,6 +177,110 @@ same property -- use CSS for global theming and programmatic methods for
167
177
  dynamic per-widget changes.
168
178
 
169
179
 
180
+ .. _custom-fonts:
181
+
182
+ Custom Fonts
183
+ ------------
184
+
185
+ Two new application-level methods (added since v0.3.0) let the
186
+ Python side push custom font files to the browser and apply a
187
+ document-wide default font. The mechanism is the
188
+ ``FontFace`` API + ``document.fonts.add()`` plus a small
189
+ managed ``<style>`` element that writes CSS variables on
190
+ ``:root``.
191
+
192
+ Registering a font
193
+ ~~~~~~~~~~~~~~~~~~
194
+
195
+ .. code-block:: python
196
+
197
+ app.register_font('Roboto', '/path/to/Roboto-Regular.ttf')
198
+ app.register_font('Roboto', '/path/to/Roboto-Bold.ttf',
199
+ weight='bold')
200
+ app.register_font('Roboto', '/path/to/Roboto-Italic.ttf',
201
+ style='italic')
202
+
203
+ * ``family`` is the CSS ``font-family`` name you'll reference
204
+ from widget ``set_font(...)`` calls or from CSS. Names are
205
+ passed through verbatim -- pick any case convention and stay
206
+ consistent.
207
+ * ``source`` is a path (``str`` or ``os.PathLike``) or raw
208
+ ``bytes`` (e.g. ``font_path.read_bytes()`` or an in-memory
209
+ font from another library).
210
+ * ``weight`` accepts CSS keywords (``'normal'``, ``'bold'``,
211
+ ``'bolder'``, ``'lighter'``) or numeric strings (``'100'``
212
+ through ``'1000'``). The JS handler also translates common
213
+ TTF metadata names like ``thin``, ``light``, ``medium``,
214
+ ``semibold``, ``extrabold``, ``black``, ``heavy``, etc. to
215
+ their numeric equivalents per the CSS Fonts spec, so passing
216
+ weights straight from a font registry usually Just Works.
217
+ * ``style`` accepts ``'normal'``, ``'italic'``, or
218
+ ``'oblique'`` (synonyms like ``'roman'`` / ``'slanted'`` get
219
+ normalised too).
220
+
221
+ Multiple registrations against the same ``family`` with
222
+ different ``weight`` / ``style`` combine into a single CSS
223
+ font-family with multiple faces -- exactly the same way an
224
+ ``@font-face`` author would express it.
225
+
226
+ The bytes are served via the built-in HTTP server at
227
+ ``/_pgwidgets/font/<id>`` with a long ``Cache-Control:
228
+ immutable`` header. When pgwidgets is embedded behind a Flask
229
+ / nginx stack, the route is served from the same Python process
230
+ so it passes through naturally; under pyodide the URL is
231
+ relative to ``window.location.href``.
232
+
233
+ Default font
234
+ ~~~~~~~~~~~~
235
+
236
+ .. code-block:: python
237
+
238
+ app.set_default_font('Roboto', size=13)
239
+
240
+ Writes ``--pg-default-font-family``,
241
+ ``--pg-default-font-size``, ``--pg-default-font-weight`` and
242
+ ``--pg-default-font-style`` CSS variables on ``:root`` (via a
243
+ managed ``<style id="pg-default-font">`` element). The base
244
+ widget stylesheet consumes them on ``body``::
245
+
246
+ body {
247
+ font-family: var(--pg-default-font-family, sans-serif);
248
+ font-size: var(--pg-default-font-size, 13px);
249
+ font-weight: var(--pg-default-font-weight, normal);
250
+ font-style: var(--pg-default-font-style, normal);
251
+ }
252
+
253
+ Anything that doesn't set a font of its own inherits the
254
+ default. Per-widget ``set_font(...)`` still wins via
255
+ inline-style specificity, and the fallback values in the
256
+ ``var(...)`` calls are what you get when ``set_default_font``
257
+ is never called -- so existing apps see no behavioural change.
258
+
259
+ Pass ``family=None`` to clear the default and fall back to the
260
+ stylesheet values.
261
+
262
+ Reconstruction
263
+ ~~~~~~~~~~~~~~
264
+
265
+ Font registrations are replayed to every new and reconnecting
266
+ session before ``on_connect`` / ``reconstruct`` runs, so a
267
+ widget reconstructed with ``set_font(family, ...)`` always
268
+ finds the face already declared.
269
+
270
+ Caveats
271
+ ~~~~~~~
272
+
273
+ * Browsers may render fallback text in the brief window
274
+ between the ``register-font`` message arriving and
275
+ ``face.load()`` resolving (standard FOUT behaviour). For
276
+ most apps this flash is invisible; if it matters you can
277
+ ``await document.fonts.ready`` in your bootstrap.
278
+ * The bytes are kept in memory on the Python side for the
279
+ lifetime of the ``Application``. A 200 KiB TTF is fine; a
280
+ 4 MiB color-emoji set might warrant chunking or on-disk
281
+ caching.
282
+
283
+
170
284
  Handling CSS Conflicts with Other Libraries
171
285
  -------------------------------------------
172
286
 
@@ -271,6 +271,10 @@ matter how the visible tree is sorted.
271
271
  selection_mode, alternate_row_colors, show_grid, show_row_numbers,
272
272
  sortable, allow_text_selection})``
273
273
 
274
+ ``selection_mode`` is one of ``"single"`` / ``"multiple"`` (rows)
275
+ or ``"single-cell"`` / ``"multiple-cell"`` (cells). See
276
+ "Cell-level selection" below.
277
+
274
278
  **Column descriptors:** each column is a string (label only) or an
275
279
  object with the following keys:
276
280
 
@@ -288,6 +292,22 @@ object with the following keys:
288
292
  - ``editable`` -- whether cells in the column can be edited via
289
293
  double-click.
290
294
  - ``icon_size`` -- pixel size for icon columns (default 16).
295
+ - ``colwidth`` -- initial column width. Numbers are pixels;
296
+ strings pass through as CSS grid track values (e.g.
297
+ ``"10em"``, ``"1fr"``). Default is ``"1fr"``.
298
+ - ``widget`` -- one of ``"checkbox"`` / ``"combobox"`` /
299
+ ``"progress"`` / ``"button"``. Replaces the column's
300
+ plain-text cells with a real DOM input. See "Widget cells"
301
+ below.
302
+ - ``choices`` -- ``Array`` of option strings (combobox only).
303
+ - ``min`` / ``max`` -- numeric bounds (progress only).
304
+ - ``text`` -- default button label when the row value is
305
+ ``null`` (button only).
306
+ - ``enabled_key`` -- name of a row-dict field whose truthiness
307
+ gates the embedded widget's enabled state per row.
308
+ - ``visible_key`` -- name of a row-dict field whose truthiness
309
+ gates whether the widget appears on a given row. When
310
+ falsy, the cell stays empty.
291
311
 
292
312
  **Tree shape (set_tree):**
293
313
 
@@ -376,10 +396,32 @@ supplies no value for it, so most interiors need no
376
396
  - Set column width.
377
397
  * - ``set_optimal_column_widths()``
378
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.
379
403
  * - ``set_show_grid(tf)`` / ``set_show_row_numbers(tf)`` / ``set_sortable(tf)``
380
404
  - Toggle grid lines, row numbers, and click-to-sort.
381
405
  * - ``set_column_editable(col_key, tf)``
382
406
  - Make a column editable.
407
+ * - ``set_cell_color(path, col_key, fg, bg, bold)`` /
408
+ ``set_row_color(path, fg, bg, bold)`` /
409
+ ``set_column_color(col_key, fg, bg, bold)`` /
410
+ ``set_table_color(fg, bg, bold)``
411
+ - Per-cell / row / column / table style overrides. Each
412
+ channel cascades cell → row → column → table. See
413
+ "Colour overrides" below.
414
+ * - ``clear_cell_color`` / ``clear_row_color`` /
415
+ ``clear_column_color`` / ``clear_all_colors``
416
+ - Drop overrides at the matching layer.
417
+ * - ``select_cell(path, col_key, state)`` /
418
+ ``select_cells(cells, state)`` /
419
+ ``clear_cell_selection()``
420
+ - Cell-mode selection API. ``cells`` is an array of
421
+ ``{path, col_key}`` objects.
422
+ * - ``copy_selection()`` / ``cut_selection()`` /
423
+ ``paste_selection(tsv)``
424
+ - Programmatic equivalents of Ctrl/Cmd+C/X/V.
383
425
 
384
426
  **Auto-spanning:** within a row, a column whose key is missing is
385
427
  "absent" and the preceding present cell extends across it via CSS
@@ -390,15 +432,58 @@ across the row.
390
432
 
391
433
  **Callbacks:**
392
434
 
393
- - ``activated`` -- handler signature ``(widget, values, path)``;
394
- fires on row double-click or Enter.
435
+ - ``activated`` -- handler signature ``(widget, values, path,
436
+ col_key)``; fires on row double-click or Enter. ``col_key``
437
+ is the column the click landed on (``null`` for
438
+ keyboard-triggered activation).
395
439
  - ``selected`` -- selection changed; handler receives an array of
396
440
  ``{path, values}`` objects.
397
441
  - ``expanded`` / ``collapsed`` -- handler ``(widget, values, path)``.
398
442
  - ``cell_edited`` -- ``(widget, path, col_key, oldValue, newValue)``.
443
+ - ``cell_selected`` -- cell-mode selection changed; handler
444
+ receives ``(widget, cells)`` where each cell is
445
+ ``{path, col_key, value}``.
446
+ - ``cell_action`` -- ``(widget, row_values, col_key)``; fires
447
+ when the user clicks a ``widget: "button"`` cell.
448
+ - ``copy`` / ``cut`` / ``paste`` -- ``(widget, tsv)``; fire from
449
+ Ctrl/Cmd+C/X/V and from the programmatic helpers.
399
450
  - ``sorted`` -- ``(widget, col_key, ascending)``.
400
451
  - ``scrolled`` -- ``(widget, h_pct, v_pct)``.
401
452
 
453
+ **Widget cells.** A column with ``widget`` set hosts a real
454
+ DOM input per cell:
455
+
456
+ * ``"checkbox"`` -- bound to a boolean cell value; toggling
457
+ fires ``cell_edited``.
458
+ * ``"combobox"`` -- ``<select>`` populated from ``choices``;
459
+ changing fires ``cell_edited``.
460
+ * ``"progress"`` -- read-only ``<progress>`` driven by
461
+ ``min`` / ``max`` and the numeric cell value.
462
+ * ``"button"`` -- ``<button>`` whose label is the cell value
463
+ (or the column's ``text`` fallback when null); clicking
464
+ fires ``cell_action``.
465
+
466
+ ``enabled_key`` and ``visible_key`` name row-dict fields that
467
+ gate the per-row widget. An empty row value of ``null`` /
468
+ ``false`` on a button column suppresses that row's button if
469
+ ``visible_key`` is also unset.
470
+
471
+ **Colour overrides.** Each of the four ``set_*_color`` methods
472
+ takes ``fg`` (text), ``bg`` (background), and ``bold``. All
473
+ three are optional; passing all-null clears that layer's
474
+ override. Resolved style cascades per-channel cell → row →
475
+ column → table, so a row-level fg can compose with a
476
+ column-level bg.
477
+
478
+ **Cell-level selection.** Setting ``selection_mode`` to
479
+ ``"single-cell"`` or ``"multiple-cell"`` switches the
480
+ behaviour from row selection to cell selection. Selection
481
+ state is reported via the new ``cell_selected`` callback;
482
+ ``select_cell`` / ``select_cells`` / ``clear_cell_selection``
483
+ mutate it programmatically. The widget-level
484
+ ``copy_selection`` / ``cut_selection`` honour cell-mode and
485
+ emit a TSV payload.
486
+
402
487
  .. code-block:: javascript
403
488
 
404
489
  let tree = new Widgets.TreeView({
@@ -456,11 +541,27 @@ dicts (preferred) or a list of positional arrays:
456
541
  table.append_row({NAME: "Carol", DEPT: "Sales", SALARY: 71000});
457
542
  table.sort_by_column("SALARY", false); // descending
458
543
 
459
- **Callbacks:**
460
-
461
- - ``activated`` -- ``(widget, values, path)``; fires on row
462
- double-click or Enter.
463
- - ``selected`` -- ``(widget, items)`` where each item is
464
- ``{path, values}``.
465
- - ``cell_edited`` -- ``(widget, path, col_key, oldValue, newValue)``.
466
- - ``sorted``, ``scrolled`` -- as for TreeView.
544
+ **Callbacks:** identical to TreeView, including the new
545
+ ``activated`` 4-arg signature with ``col_key``, the
546
+ ``cell_selected`` / ``cell_action`` / ``copy`` / ``cut`` /
547
+ ``paste`` callbacks, and the per-cell ``cell_edited``
548
+ signature.
549
+
550
+ TableView ``set_columns`` accepts the same column descriptor
551
+ fields as TreeView, including ``widget`` / ``choices`` /
552
+ ``min`` / ``max`` / ``text`` / ``enabled_key`` /
553
+ ``visible_key`` / ``colwidth``. Colour overrides
554
+ (``set_*_color`` / ``clear_*_color``) work identically.
555
+
556
+ For per-row Mute checkbox + Reset button -- the canonical
557
+ "widget cells" use case -- declare two columns::
558
+
559
+ table.set_columns([
560
+ {label: "Time", key: "TIME", type: "string"},
561
+ {label: "ID", key: "ID", type: "string"},
562
+ {label: "Mute", key: "MUTE", type: "bool",
563
+ widget: "checkbox", enabled_key: "CAN_MUTE"},
564
+ {label: "", key: "RESET", type: "string",
565
+ widget: "button", text: "Reset",
566
+ visible_key: "CAN_RESET"},
567
+ ]);
@@ -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,
@@ -115,6 +116,11 @@ Vertical box layout. Children are stacked top to bottom.
115
116
  - Add a child widget. *stretch* (0 or 1) controls whether it expands.
116
117
  * - ``set_spacing(gap)``
117
118
  - Set spacing between children in pixels.
119
+ * - ``set_align(align)``
120
+ - Cross-axis alignment of children. For a vertical box
121
+ this is the horizontal axis -- accepts ``"left"`` /
122
+ ``"center"`` / ``"right"``. Maps to flex
123
+ ``align-items``.
118
124
 
119
125
  **Callbacks:** ``child-added``, ``child-removed`` (from ContainerWidget).
120
126
 
@@ -123,6 +129,7 @@ Vertical box layout. Children are stacked top to bottom.
123
129
  let vbox = new Widgets.VBox();
124
130
  vbox.set_spacing(8);
125
131
  vbox.set_padding(10);
132
+ vbox.set_align("center"); // centre children horizontally
126
133
  vbox.add_widget(label, 0); // fixed size
127
134
  vbox.add_widget(editor, 1); // stretches to fill
128
135
 
@@ -147,6 +154,11 @@ Horizontal box layout. Children are placed left to right.
147
154
  - Add a child widget. *stretch* controls whether it expands.
148
155
  * - ``set_spacing(gap)``
149
156
  - Set spacing between children in pixels.
157
+ * - ``set_align(align)``
158
+ - Cross-axis alignment of children. For a horizontal box
159
+ this is the vertical axis -- accepts ``"top"`` /
160
+ ``"center"`` / ``"bottom"``. Maps to flex
161
+ ``align-items``.
150
162
 
151
163
  **Callbacks:** ``child-added``, ``child-removed``.
152
164
 
@@ -154,6 +166,7 @@ Horizontal box layout. Children are placed left to right.
154
166
 
155
167
  let hbox = new Widgets.HBox();
156
168
  hbox.set_spacing(4);
169
+ hbox.set_align("center"); // centre children vertically
157
170
  hbox.add_widget(button1, 0);
158
171
  hbox.add_widget(button2, 0);
159
172
 
@@ -451,6 +464,15 @@ ScrollArea
451
464
 
452
465
  Scrollable viewport wrapping a single child widget.
453
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
+
454
476
  **Constructor:** ``new Widgets.ScrollArea({hscrollbar, vscrollbar})``
455
477
 
456
478
  **Options:**
@@ -476,7 +498,8 @@ Scrollable viewport wrapping a single child widget.
476
498
  Frame
477
499
  -----
478
500
 
479
- 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.
480
503
 
481
504
  **Constructor:** ``new Widgets.Frame({title})``
482
505
 
@@ -509,7 +532,8 @@ Titled border container for grouping widgets.
509
532
  Expander
510
533
  --------
511
534
 
512
- 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.
513
537
 
514
538
  **Constructor:** ``new Widgets.Expander({title, collapsible, shadow})``
515
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