neutralino-python 0.1.0rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (521) hide show
  1. neutralino/__init__.py +88 -0
  2. neutralino/_catalog.py +297 -0
  3. neutralino/_data/LICENSE.neutralino-js-client +21 -0
  4. neutralino/_data/LICENSE.neutralinojs +1066 -0
  5. neutralino/_data/docs/cli.md +315 -0
  6. neutralino/_data/docs/custom-components.md +107 -0
  7. neutralino/_data/docs/custom-frontends.md +80 -0
  8. neutralino/_data/docs/desktop-helpers.md +296 -0
  9. neutralino/_data/docs/guide.md +131 -0
  10. neutralino/_data/docs/llms-full.txt +3921 -0
  11. neutralino/_data/docs/llms.txt +43 -0
  12. neutralino/_data/docs/manifests/components.json +20128 -0
  13. neutralino/_data/docs/manifests/examples.json +52 -0
  14. neutralino/_data/docs/manifests/native.json +3024 -0
  15. neutralino/_data/docs/manifests/schema.json +43 -0
  16. neutralino/_data/docs/manual-checklist.md +189 -0
  17. neutralino/_data/docs/packaging.md +252 -0
  18. neutralino/_data/docs/performance.md +15 -0
  19. neutralino/_data/docs/platforms.md +15 -0
  20. neutralino/_data/docs/reference/components.md +1685 -0
  21. neutralino/_data/docs/reference/native.md +148 -0
  22. neutralino/_data/docs/security.md +60 -0
  23. neutralino/_data/docs/ui.md +249 -0
  24. neutralino/_data/docs/updates.md +366 -0
  25. neutralino/_data/examples/README.md +6 -0
  26. neutralino/_data/examples/crud/README.md +36 -0
  27. neutralino/_data/examples/crud/app.py +243 -0
  28. neutralino/_data/examples/dashboard/README.md +36 -0
  29. neutralino/_data/examples/dashboard/app.py +367 -0
  30. neutralino/_data/examples/editor/README.md +35 -0
  31. neutralino/_data/examples/editor/app.py +190 -0
  32. neutralino/_data/examples/file-manager/README.md +40 -0
  33. neutralino/_data/examples/file-manager/app.py +120 -0
  34. neutralino/_data/examples/file-manager/frontend/index.html +20 -0
  35. neutralino/_data/examples/file-manager/frontend/main.js +55 -0
  36. neutralino/_data/examples/file-manager/frontend/neutralino.js +1 -0
  37. neutralino/_data/examples/file-manager/frontend/python-bridge.d.ts +207 -0
  38. neutralino/_data/examples/file-manager/frontend/python-bridge.mjs +854 -0
  39. neutralino/_data/examples/file-manager/frontend/style.css +4 -0
  40. neutralino/_data/examples/hybrid/README.md +48 -0
  41. neutralino/_data/examples/hybrid/app.py +80 -0
  42. neutralino/_data/examples/hybrid/components/counter.mjs +37 -0
  43. neutralino/_data/examples/hybrid/components/widget.mjs +23 -0
  44. neutralino/_data/examples/hybrid/styles.css +21 -0
  45. neutralino/_data/examples/hybrid/widget/package.json +20 -0
  46. neutralino/_data/examples/hybrid/widget/src/Widget.jsx +25 -0
  47. neutralino/_data/examples/hybrid/widget/vite.config.mjs +19 -0
  48. neutralino/_data/examples/monitor/README.md +36 -0
  49. neutralino/_data/examples/monitor/app.py +375 -0
  50. neutralino/_data/examples/react/README.md +90 -0
  51. neutralino/_data/examples/react/app.py +68 -0
  52. neutralino/_data/examples/react/frontend/.gitignore +5 -0
  53. neutralino/_data/examples/react/frontend/index.html +17 -0
  54. neutralino/_data/examples/react/frontend/package-lock.json +1232 -0
  55. neutralino/_data/examples/react/frontend/package.json +25 -0
  56. neutralino/_data/examples/react/frontend/scripts/prepare-bridge.mjs +49 -0
  57. neutralino/_data/examples/react/frontend/src/App.tsx +157 -0
  58. neutralino/_data/examples/react/frontend/src/backend.ts +21 -0
  59. neutralino/_data/examples/react/frontend/src/calls.test.ts +206 -0
  60. neutralino/_data/examples/react/frontend/src/calls.ts +306 -0
  61. neutralino/_data/examples/react/frontend/src/globals.d.ts +14 -0
  62. neutralino/_data/examples/react/frontend/src/hooks.ts +45 -0
  63. neutralino/_data/examples/react/frontend/src/main.tsx +13 -0
  64. neutralino/_data/examples/react/frontend/src/styles.css +11 -0
  65. neutralino/_data/examples/react/frontend/tsconfig.json +18 -0
  66. neutralino/_data/examples/react/frontend/vite.config.ts +9 -0
  67. neutralino/_data/examples/settings/README.md +38 -0
  68. neutralino/_data/examples/settings/app.py +440 -0
  69. neutralino/_data/examples/updater/.gitignore +2 -0
  70. neutralino/_data/examples/updater/README.md +82 -0
  71. neutralino/_data/examples/updater/app.py +160 -0
  72. neutralino/_data/examples/updater/app.toml +21 -0
  73. neutralino/_data/examples/updater/demo.py +107 -0
  74. neutralino/_data/examples/updater/requirements.txt +2 -0
  75. neutralino/_data/examples/updater/sources/github-private.toml +21 -0
  76. neutralino/_data/examples/updater/sources/github-public.toml +21 -0
  77. neutralino/_data/examples/vanilla/README.md +35 -0
  78. neutralino/_data/examples/vanilla/app.py +46 -0
  79. neutralino/_data/examples/vanilla/frontend/index.html +17 -0
  80. neutralino/_data/examples/vanilla/frontend/main.js +29 -0
  81. neutralino/_data/examples/vanilla/frontend/neutralino.js +1 -0
  82. neutralino/_data/examples/vanilla/frontend/python-bridge.d.ts +207 -0
  83. neutralino/_data/examples/vanilla/frontend/python-bridge.mjs +854 -0
  84. neutralino/_data/examples/vanilla/frontend/style.css +4 -0
  85. neutralino/_data/explorer/app.py +1328 -0
  86. neutralino/_data/explorer/catalogue.json +48179 -0
  87. neutralino/_data/explorer/explorer_previews.py +247 -0
  88. neutralino/_data/explorer/sources/native/always_on_top.py +55 -0
  89. neutralino/_data/explorer/sources/native/binary.py +125 -0
  90. neutralino/_data/explorer/sources/native/borderless.py +99 -0
  91. neutralino/_data/explorer/sources/native/broadcast.py +90 -0
  92. neutralino/_data/explorer/sources/native/config.py +78 -0
  93. neutralino/_data/explorer/sources/native/controls.py +140 -0
  94. neutralino/_data/explorer/sources/native/directory.py +163 -0
  95. neutralino/_data/explorer/sources/native/displays.py +75 -0
  96. neutralino/_data/explorer/sources/native/env.py +98 -0
  97. neutralino/_data/explorer/sources/native/events.py +124 -0
  98. neutralino/_data/explorer/sources/native/exec_command.py +79 -0
  99. neutralino/_data/explorer/sources/native/folder.py +70 -0
  100. neutralino/_data/explorer/sources/native/icon_badge.py +101 -0
  101. neutralino/_data/explorer/sources/native/image.py +119 -0
  102. neutralino/_data/explorer/sources/native/lifecycle.py +99 -0
  103. neutralino/_data/explorer/sources/native/locale.py +70 -0
  104. neutralino/_data/explorer/sources/native/main_menu.py +103 -0
  105. neutralino/_data/explorer/sources/native/message_box.py +101 -0
  106. neutralino/_data/explorer/sources/native/mouse.py +70 -0
  107. neutralino/_data/explorer/sources/native/multi_window.py +134 -0
  108. neutralino/_data/explorer/sources/native/notification.py +74 -0
  109. neutralino/_data/explorer/sources/native/open_external.py +81 -0
  110. neutralino/_data/explorer/sources/native/open_file.py +102 -0
  111. neutralino/_data/explorer/sources/native/paths.py +77 -0
  112. neutralino/_data/explorer/sources/native/print_snapshot.py +84 -0
  113. neutralino/_data/explorer/sources/native/read_write.py +192 -0
  114. neutralino/_data/explorer/sources/native/resources.py +110 -0
  115. neutralino/_data/explorer/sources/native/save_file.py +101 -0
  116. neutralino/_data/explorer/sources/native/server_mount.py +106 -0
  117. neutralino/_data/explorer/sources/native/sound.py +84 -0
  118. neutralino/_data/explorer/sources/native/spawn_process.py +128 -0
  119. neutralino/_data/explorer/sources/native/states.py +122 -0
  120. neutralino/_data/explorer/sources/native/stats_permissions.py +147 -0
  121. neutralino/_data/explorer/sources/native/storage.py +108 -0
  122. neutralino/_data/explorer/sources/native/system_info.py +115 -0
  123. neutralino/_data/explorer/sources/native/text.py +133 -0
  124. neutralino/_data/explorer/sources/native/trash.py +98 -0
  125. neutralino/_data/explorer/sources/native/tray.py +109 -0
  126. neutralino/_data/explorer/sources/native/watcher.py +167 -0
  127. neutralino/_data/explorer/sources/patterns/content_blocks.py +119 -0
  128. neutralino/_data/explorer/sources/patterns/dynamic_dashboard.py +121 -0
  129. neutralino/_data/explorer/sources/patterns/dynamic_form.py +120 -0
  130. neutralino/_data/explorer/sources/patterns/dynamic_table.py +109 -0
  131. neutralino/_data/explorer/sources/patterns/error_reporting.mjs +24 -0
  132. neutralino/_data/explorer/sources/patterns/error_reporting.py +124 -0
  133. neutralino/_data/explorer/sources/patterns/errors_timeouts.py +108 -0
  134. neutralino/_data/explorer/sources/patterns/feature_flags.py +99 -0
  135. neutralino/_data/explorer/sources/patterns/file_drop.py +126 -0
  136. neutralino/_data/explorer/sources/patterns/http_from_python.py +152 -0
  137. neutralino/_data/explorer/sources/patterns/keyboard_shortcuts.py +153 -0
  138. neutralino/_data/explorer/sources/patterns/live_config_reload.py +160 -0
  139. neutralino/_data/explorer/sources/patterns/logging.py +184 -0
  140. neutralino/_data/explorer/sources/patterns/long_tasks.py +121 -0
  141. neutralino/_data/explorer/sources/patterns/multi_window_sync.py +68 -0
  142. neutralino/_data/explorer/sources/patterns/navigation_from_backend.py +109 -0
  143. neutralino/_data/explorer/sources/patterns/onboarding.py +123 -0
  144. neutralino/_data/explorer/sources/patterns/optimistic_updates.py +89 -0
  145. neutralino/_data/explorer/sources/patterns/persistence.py +114 -0
  146. neutralino/_data/explorer/sources/patterns/python_calls_page.mjs +10 -0
  147. neutralino/_data/explorer/sources/patterns/python_calls_page.py +64 -0
  148. neutralino/_data/explorer/sources/patterns/python_push.py +84 -0
  149. neutralino/_data/explorer/sources/patterns/recurring_events.py +114 -0
  150. neutralino/_data/explorer/sources/patterns/roles_permissions.py +104 -0
  151. neutralino/_data/explorer/sources/patterns/scheduled_jobs.py +194 -0
  152. neutralino/_data/explorer/sources/patterns/settings_page.py +165 -0
  153. neutralino/_data/explorer/sources/patterns/sqlite.py +181 -0
  154. neutralino/_data/explorer/sources/patterns/streaming.py +102 -0
  155. neutralino/_data/explorer/sources/patterns/texts_i18n.py +81 -0
  156. neutralino/_data/explorer/sources/patterns/theme_from_backend.py +86 -0
  157. neutralino/_data/explorer/sources/patterns/updater.py +232 -0
  158. neutralino/_data/explorer/sources/workspace/calendar/app.py +547 -0
  159. neutralino/_data/explorer/sources/workspace/customers/app.py +467 -0
  160. neutralino/_data/explorer/sources/workspace/dashboard/README.md +36 -0
  161. neutralino/_data/explorer/sources/workspace/dashboard/app.py +367 -0
  162. neutralino/_data/explorer/sources/workspace/documents/app.py +511 -0
  163. neutralino/_data/explorer/sources/workspace/inbox/app.py +439 -0
  164. neutralino/_data/explorer/sources/workspace/orders/app.py +491 -0
  165. neutralino/_data/explorer/sources/workspace/reports/app.py +386 -0
  166. neutralino/_data/explorer/sources/workspace/settings/README.md +38 -0
  167. neutralino/_data/explorer/sources/workspace/settings/app.py +440 -0
  168. neutralino/_data/explorer/sources/workspace/system/README.md +36 -0
  169. neutralino/_data/explorer/sources/workspace/system/app.py +375 -0
  170. neutralino/_data/explorer/sources/workspace/tasks/app.py +462 -0
  171. neutralino/_data/renderer/LICENSES/@babel__runtime@7.29.17/LICENSE +22 -0
  172. neutralino/_data/renderer/LICENSES/@codemirror__autocomplete@6.20.4/LICENSE +21 -0
  173. neutralino/_data/renderer/LICENSES/@codemirror__commands@6.11.2/LICENSE +21 -0
  174. neutralino/_data/renderer/LICENSES/@codemirror__lang-css@6.3.1/LICENSE +21 -0
  175. neutralino/_data/renderer/LICENSES/@codemirror__lang-html@6.4.12/LICENSE +21 -0
  176. neutralino/_data/renderer/LICENSES/@codemirror__lang-javascript@6.2.5/LICENSE +21 -0
  177. neutralino/_data/renderer/LICENSES/@codemirror__lang-json@6.0.2/LICENSE +21 -0
  178. neutralino/_data/renderer/LICENSES/@codemirror__lang-markdown@6.5.3/LICENSE +21 -0
  179. neutralino/_data/renderer/LICENSES/@codemirror__lang-python@6.2.1/LICENSE +21 -0
  180. neutralino/_data/renderer/LICENSES/@codemirror__lang-sql@6.10.0/LICENSE +21 -0
  181. neutralino/_data/renderer/LICENSES/@codemirror__lang-yaml@6.1.3/LICENSE +21 -0
  182. neutralino/_data/renderer/LICENSES/@codemirror__language@6.13.1/LICENSE +21 -0
  183. neutralino/_data/renderer/LICENSES/@codemirror__search@6.7.3/LICENSE +21 -0
  184. neutralino/_data/renderer/LICENSES/@codemirror__state@6.7.6/LICENSE +21 -0
  185. neutralino/_data/renderer/LICENSES/@codemirror__view@6.44.2/LICENSE +21 -0
  186. neutralino/_data/renderer/LICENSES/@dnd-kit__accessibility@3.1.1/LICENSE +21 -0
  187. neutralino/_data/renderer/LICENSES/@dnd-kit__core@6.3.1/LICENSE +21 -0
  188. neutralino/_data/renderer/LICENSES/@dnd-kit__sortable@10.0.0/LICENSE +21 -0
  189. neutralino/_data/renderer/LICENSES/@dnd-kit__utilities@3.2.2/LICENSE +21 -0
  190. neutralino/_data/renderer/LICENSES/@emoji-mart__data@1.2.1/LICENSE +21 -0
  191. neutralino/_data/renderer/LICENSES/@floating-ui__core@1.8.0/LICENSE +20 -0
  192. neutralino/_data/renderer/LICENSES/@floating-ui__dom@1.8.0/LICENSE +20 -0
  193. neutralino/_data/renderer/LICENSES/@floating-ui__react-dom@2.1.9/LICENSE +20 -0
  194. neutralino/_data/renderer/LICENSES/@floating-ui__react@0.27.20/LICENSE +20 -0
  195. neutralino/_data/renderer/LICENSES/@floating-ui__utils@0.2.12/LICENSE +20 -0
  196. neutralino/_data/renderer/LICENSES/@lezer__common@1.5.7/LICENSE +21 -0
  197. neutralino/_data/renderer/LICENSES/@lezer__css@1.3.9/LICENSE +21 -0
  198. neutralino/_data/renderer/LICENSES/@lezer__highlight@1.2.5/LICENSE +21 -0
  199. neutralino/_data/renderer/LICENSES/@lezer__html@1.3.13/LICENSE +21 -0
  200. neutralino/_data/renderer/LICENSES/@lezer__javascript@1.5.7/LICENSE +21 -0
  201. neutralino/_data/renderer/LICENSES/@lezer__json@1.0.3/LICENSE +21 -0
  202. neutralino/_data/renderer/LICENSES/@lezer__lr@1.4.13/LICENSE +21 -0
  203. neutralino/_data/renderer/LICENSES/@lezer__markdown@1.8.3/LICENSE +21 -0
  204. neutralino/_data/renderer/LICENSES/@lezer__python@1.1.21/LICENSE +21 -0
  205. neutralino/_data/renderer/LICENSES/@lezer__yaml@1.0.4/LICENSE +21 -0
  206. neutralino/_data/renderer/LICENSES/@mantine__carousel@9.8.3/LICENSE +21 -0
  207. neutralino/_data/renderer/LICENSES/@mantine__charts@9.8.3/LICENSE +21 -0
  208. neutralino/_data/renderer/LICENSES/@mantine__code-highlight@9.8.3/LICENSE +21 -0
  209. neutralino/_data/renderer/LICENSES/@mantine__core@9.8.3/LICENSE +21 -0
  210. neutralino/_data/renderer/LICENSES/@mantine__dates@9.8.3/LICENSE +21 -0
  211. neutralino/_data/renderer/LICENSES/@mantine__dropzone@9.8.3/LICENSE +21 -0
  212. neutralino/_data/renderer/LICENSES/@mantine__emoji@9.8.3/LICENSE +21 -0
  213. neutralino/_data/renderer/LICENSES/@mantine__hooks@9.8.3/LICENSE +21 -0
  214. neutralino/_data/renderer/LICENSES/@mantine__lightbox@9.8.3/LICENSE +21 -0
  215. neutralino/_data/renderer/LICENSES/@mantine__notifications@9.8.3/LICENSE +21 -0
  216. neutralino/_data/renderer/LICENSES/@mantine__nprogress@9.8.3/LICENSE +21 -0
  217. neutralino/_data/renderer/LICENSES/@mantine__schedule@9.8.3/LICENSE +21 -0
  218. neutralino/_data/renderer/LICENSES/@mantine__spotlight@9.8.3/LICENSE +21 -0
  219. neutralino/_data/renderer/LICENSES/@mantine__store@9.8.3/LICENSE +21 -0
  220. neutralino/_data/renderer/LICENSES/@mantine__tiptap@9.8.3/LICENSE +21 -0
  221. neutralino/_data/renderer/LICENSES/@marijn__find-cluster-break@1.0.4/LICENSE +21 -0
  222. neutralino/_data/renderer/LICENSES/@reduxjs__toolkit@2.16.0/LICENSE +21 -0
  223. neutralino/_data/renderer/LICENSES/@tabler__icons-react@3.55.0/LICENSE +21 -0
  224. neutralino/_data/renderer/LICENSES/@tanstack__react-virtual@3.14.32/LICENSE +21 -0
  225. neutralino/_data/renderer/LICENSES/@tanstack__virtual-core@3.19.17/LICENSE +21 -0
  226. neutralino/_data/renderer/LICENSES/@tiptap__core@3.35.1/LICENSE.md +21 -0
  227. neutralino/_data/renderer/LICENSES/@tiptap__extension-blockquote@3.35.1/LICENSE.md +21 -0
  228. neutralino/_data/renderer/LICENSES/@tiptap__extension-bold@3.35.1/LICENSE.md +21 -0
  229. neutralino/_data/renderer/LICENSES/@tiptap__extension-code-block@3.35.1/LICENSE.md +21 -0
  230. neutralino/_data/renderer/LICENSES/@tiptap__extension-code@3.35.1/LICENSE.md +21 -0
  231. neutralino/_data/renderer/LICENSES/@tiptap__extension-document@3.35.1/LICENSE.md +21 -0
  232. neutralino/_data/renderer/LICENSES/@tiptap__extension-hard-break@3.35.1/LICENSE.md +21 -0
  233. neutralino/_data/renderer/LICENSES/@tiptap__extension-heading@3.35.1/LICENSE.md +21 -0
  234. neutralino/_data/renderer/LICENSES/@tiptap__extension-horizontal-rule@3.35.1/LICENSE.md +21 -0
  235. neutralino/_data/renderer/LICENSES/@tiptap__extension-italic@3.35.1/LICENSE.md +21 -0
  236. neutralino/_data/renderer/LICENSES/@tiptap__extension-link@3.35.1/LICENSE.md +21 -0
  237. neutralino/_data/renderer/LICENSES/@tiptap__extension-list@3.35.1/LICENSE.md +21 -0
  238. neutralino/_data/renderer/LICENSES/@tiptap__extension-paragraph@3.35.1/LICENSE.md +21 -0
  239. neutralino/_data/renderer/LICENSES/@tiptap__extension-strike@3.35.1/LICENSE.md +21 -0
  240. neutralino/_data/renderer/LICENSES/@tiptap__extension-text@3.35.1/LICENSE.md +21 -0
  241. neutralino/_data/renderer/LICENSES/@tiptap__extension-underline@3.35.1/LICENSE.md +21 -0
  242. neutralino/_data/renderer/LICENSES/@tiptap__extensions@3.35.1/LICENSE.md +21 -0
  243. neutralino/_data/renderer/LICENSES/@tiptap__react@3.35.1/LICENSE.md +21 -0
  244. neutralino/_data/renderer/LICENSES/@tiptap__starter-kit@3.35.1/LICENSE.md +21 -0
  245. neutralino/_data/renderer/LICENSES/attr-accept@4.0.1/LICENSE +22 -0
  246. neutralino/_data/renderer/LICENSES/clsx@2.1.1/license +9 -0
  247. neutralino/_data/renderer/LICENSES/crelt@1.0.7/LICENSE +19 -0
  248. neutralino/_data/renderer/LICENSES/d3-array@3.2.5/LICENSE +13 -0
  249. neutralino/_data/renderer/LICENSES/d3-color@3.1.1/LICENSE +13 -0
  250. neutralino/_data/renderer/LICENSES/d3-format@3.1.3/LICENSE +13 -0
  251. neutralino/_data/renderer/LICENSES/d3-interpolate@3.0.2/LICENSE +13 -0
  252. neutralino/_data/renderer/LICENSES/d3-path@3.1.1/LICENSE +13 -0
  253. neutralino/_data/renderer/LICENSES/d3-scale@4.0.3/LICENSE +13 -0
  254. neutralino/_data/renderer/LICENSES/d3-shape@3.2.1/LICENSE +13 -0
  255. neutralino/_data/renderer/LICENSES/d3-time-format@4.1.1/LICENSE +13 -0
  256. neutralino/_data/renderer/LICENSES/d3-time@3.1.1/LICENSE +13 -0
  257. neutralino/_data/renderer/LICENSES/dayjs@1.11.23/LICENSE +21 -0
  258. neutralino/_data/renderer/LICENSES/decimal.js-light@2.5.1/LICENCE.md +23 -0
  259. neutralino/_data/renderer/LICENSES/diff@9.0.0/LICENSE +29 -0
  260. neutralino/_data/renderer/LICENSES/dompurify@3.5.1/LICENSE +202 -0
  261. neutralino/_data/renderer/LICENSES/dompurify@3.5.1/LICENSE-MPL +373 -0
  262. neutralino/_data/renderer/LICENSES/embla-carousel-react@8.6.0/MIT-embla-carousel.txt +21 -0
  263. neutralino/_data/renderer/LICENSES/embla-carousel-reactive-utils@8.6.0/MIT-embla-carousel.txt +21 -0
  264. neutralino/_data/renderer/LICENSES/embla-carousel@8.6.0/MIT-embla-carousel.txt +21 -0
  265. neutralino/_data/renderer/LICENSES/es-toolkit@1.53.2/LICENSE +21 -0
  266. neutralino/_data/renderer/LICENSES/es-toolkit@1.53.2/NOTICE +39 -0
  267. neutralino/_data/renderer/LICENSES/eventemitter3@5.0.4/LICENSE +21 -0
  268. neutralino/_data/renderer/LICENSES/fast-equals@5.4.7/LICENSE +21 -0
  269. neutralino/_data/renderer/LICENSES/file-selector@5.0.3/LICENSE +21 -0
  270. neutralino/_data/renderer/LICENSES/get-nonce@1.0.1/LICENSE +21 -0
  271. neutralino/_data/renderer/LICENSES/immer@11.2.14/LICENSE +21 -0
  272. neutralino/_data/renderer/LICENSES/linkifyjs@4.4.0/LICENSE +19 -0
  273. neutralino/_data/renderer/LICENSES/marked@18.4.0/LICENSE +44 -0
  274. neutralino/_data/renderer/LICENSES/neutralino.js@6.11.0/LICENSE +21 -0
  275. neutralino/_data/renderer/LICENSES/orderedmap@2.1.1/LICENSE +19 -0
  276. neutralino/_data/renderer/LICENSES/packages.json +1838 -0
  277. neutralino/_data/renderer/LICENSES/prosemirror-commands@1.7.2/LICENSE +19 -0
  278. neutralino/_data/renderer/LICENSES/prosemirror-dropcursor@1.8.4/LICENSE +19 -0
  279. neutralino/_data/renderer/LICENSES/prosemirror-gapcursor@1.4.1/LICENSE +19 -0
  280. neutralino/_data/renderer/LICENSES/prosemirror-history@1.5.2/LICENSE +19 -0
  281. neutralino/_data/renderer/LICENSES/prosemirror-keymap@1.2.3/LICENSE +19 -0
  282. neutralino/_data/renderer/LICENSES/prosemirror-model@1.25.13/LICENSE +19 -0
  283. neutralino/_data/renderer/LICENSES/prosemirror-schema-list@1.6.1/LICENSE +19 -0
  284. neutralino/_data/renderer/LICENSES/prosemirror-state@1.4.4/LICENSE +19 -0
  285. neutralino/_data/renderer/LICENSES/prosemirror-transform@1.12.7/LICENSE +19 -0
  286. neutralino/_data/renderer/LICENSES/prosemirror-view@1.44.0/LICENSE +19 -0
  287. neutralino/_data/renderer/LICENSES/react-dom@19.3.1/LICENSE +21 -0
  288. neutralino/_data/renderer/LICENSES/react-dropzone@20.1.4/LICENSE +22 -0
  289. neutralino/_data/renderer/LICENSES/react-is@19.3.1/LICENSE +21 -0
  290. neutralino/_data/renderer/LICENSES/react-number-format@5.4.5/LICENSE +21 -0
  291. neutralino/_data/renderer/LICENSES/react-redux@9.3.1/LICENSE.md +21 -0
  292. neutralino/_data/renderer/LICENSES/react-remove-scroll-bar@2.3.8/MIT-react-remove-scroll-bar.txt +21 -0
  293. neutralino/_data/renderer/LICENSES/react-remove-scroll@2.7.2/LICENSE +21 -0
  294. neutralino/_data/renderer/LICENSES/react-style-singleton@2.2.3/LICENSE +21 -0
  295. neutralino/_data/renderer/LICENSES/react-transition-group@4.4.5/LICENSE +30 -0
  296. neutralino/_data/renderer/LICENSES/react@19.3.1/LICENSE +21 -0
  297. neutralino/_data/renderer/LICENSES/recharts@3.11.3/LICENSE +22 -0
  298. neutralino/_data/renderer/LICENSES/redux-thunk@3.1.0/LICENSE.md +21 -0
  299. neutralino/_data/renderer/LICENSES/redux@5.0.1/LICENSE.md +21 -0
  300. neutralino/_data/renderer/LICENSES/reselect@5.2.0/LICENSE +21 -0
  301. neutralino/_data/renderer/LICENSES/rolldown@1.3.4/LICENSE +25 -0
  302. neutralino/_data/renderer/LICENSES/rope-sequence@1.3.4/LICENSE +19 -0
  303. neutralino/_data/renderer/LICENSES/rrule@2.8.1/LICENCE +65 -0
  304. neutralino/_data/renderer/LICENSES/scheduler@0.28.0/LICENSE +21 -0
  305. neutralino/_data/renderer/LICENSES/style-mod@4.1.5/LICENSE +19 -0
  306. neutralino/_data/renderer/LICENSES/tiny-invariant@1.3.3/LICENSE +21 -0
  307. neutralino/_data/renderer/LICENSES/tslib@2.9.1/LICENSE.txt +12 -0
  308. neutralino/_data/renderer/LICENSES/use-callback-ref@1.3.3/LICENSE +21 -0
  309. neutralino/_data/renderer/LICENSES/use-sidecar@1.1.3/LICENSE +21 -0
  310. neutralino/_data/renderer/LICENSES/use-sync-external-store@1.7.0/LICENSE +21 -0
  311. neutralino/_data/renderer/LICENSES/victory-vendor@38.1.1/LICENSE.txt +150 -0
  312. neutralino/_data/renderer/LICENSES/vite@8.4.1/LICENSE.md +2320 -0
  313. neutralino/_data/renderer/LICENSES/w3c-keyname@2.2.8/LICENSE +19 -0
  314. neutralino/_data/renderer/assets/IconGripVertical-C2NUKJAE.js +1 -0
  315. neutralino/_data/renderer/assets/carousel-D1j1SkWR.css +1 -0
  316. neutralino/_data/renderer/assets/carousel-DHnOKa8c.js +1 -0
  317. neutralino/_data/renderer/assets/chunk-CCkLOSkX.css +1 -0
  318. neutralino/_data/renderer/assets/chunk-CLVygP7p.js +9 -0
  319. neutralino/_data/renderer/assets/codehighlight-CXJaU0yv.js +10 -0
  320. neutralino/_data/renderer/assets/codehighlight-THJMNDh8.css +1 -0
  321. neutralino/_data/renderer/assets/codemirror-DX0MbxKq.js +2 -0
  322. neutralino/_data/renderer/assets/css-BotC7byr.js +1 -0
  323. neutralino/_data/renderer/assets/dist-3kB5bJpS.js +23 -0
  324. neutralino/_data/renderer/assets/dist-6zrr4MrK.js +1 -0
  325. neutralino/_data/renderer/assets/dist-Beotrn8G.js +1 -0
  326. neutralino/_data/renderer/assets/dist-CCJHv8n0.js +11 -0
  327. neutralino/_data/renderer/assets/dist-CdYA9or5.js +1 -0
  328. neutralino/_data/renderer/assets/dist-D2p_6o_g.js +1 -0
  329. neutralino/_data/renderer/assets/dnd-DkNumIKC.js +5 -0
  330. neutralino/_data/renderer/assets/dropzone-aPCBPjDN.css +1 -0
  331. neutralino/_data/renderer/assets/dropzone-agrigkXv.js +1 -0
  332. neutralino/_data/renderer/assets/embla-carousel-react.esm-_ztrE73N.js +1 -0
  333. neutralino/_data/renderer/assets/emoji-Cj3VQHg8.js +1 -0
  334. neutralino/_data/renderer/assets/emoji-DV8OzU1E.css +1 -0
  335. neutralino/_data/renderer/assets/esm-DbOmMyz5.js +82 -0
  336. neutralino/_data/renderer/assets/highlight-Dlb5DJwL.css +1 -0
  337. neutralino/_data/renderer/assets/highlight-LH6Cyuz6.js +3 -0
  338. neutralino/_data/renderer/assets/html-CpATC083.js +1 -0
  339. neutralino/_data/renderer/assets/icon-chunk-C-4QDF6w.js +1 -0
  340. neutralino/_data/renderer/assets/index-CqHW60Dy.js +69 -0
  341. neutralino/_data/renderer/assets/index-TWpF4Lef.css +1 -0
  342. neutralino/_data/renderer/assets/javascript-D2QSKlDI.js +1 -0
  343. neutralino/_data/renderer/assets/json-D8zfYii3.js +1 -0
  344. neutralino/_data/renderer/assets/lightbox-BijRfmPy.js +1 -0
  345. neutralino/_data/renderer/assets/lightbox-BzKDpkAD.css +1 -0
  346. neutralino/_data/renderer/assets/markdown-Cpthnhzg.js +77 -0
  347. neutralino/_data/renderer/assets/markdown-CsS2tf5C.js +5 -0
  348. neutralino/_data/renderer/assets/python-B477ud9A.js +9 -0
  349. neutralino/_data/renderer/assets/richtext-BwtgvH7-.js +137 -0
  350. neutralino/_data/renderer/assets/richtext-DIAsHMuK.css +1 -0
  351. neutralino/_data/renderer/assets/spotlight-Ccstaz1-.css +1 -0
  352. neutralino/_data/renderer/assets/spotlight-Db1pwUWd.js +1 -0
  353. neutralino/_data/renderer/assets/sql-DbpHRl6F.js +2 -0
  354. neutralino/_data/renderer/assets/with-selector-CUfuSYau.js +1 -0
  355. neutralino/_data/renderer/assets/yaml-BPsr1O3S.js +1 -0
  356. neutralino/_data/renderer/index.html +22 -0
  357. neutralino/_data/renderer/manifest.json +202 -0
  358. neutralino/_data/renderer/neutralino.js +1 -0
  359. neutralino/_data/renderer/shared/mantine-core.mjs +5 -0
  360. neutralino/_data/renderer/shared/mantine-hooks.mjs +5 -0
  361. neutralino/_data/renderer/shared/react-dom-client.mjs +5 -0
  362. neutralino/_data/renderer/shared/react-dom.mjs +6 -0
  363. neutralino/_data/renderer/shared/react-jsx-runtime.mjs +5 -0
  364. neutralino/_data/renderer/shared/react.mjs +6 -0
  365. neutralino/_data/skills/README.md +6 -0
  366. neutralino/_data/skills/neutralino-app-patterns/SKILL.md +101 -0
  367. neutralino/_data/skills/neutralino-app-patterns/references/dashboards-and-background-work.md +55 -0
  368. neutralino/_data/skills/neutralino-app-patterns/references/storage-and-settings.md +57 -0
  369. neutralino/_data/skills/neutralino-app-patterns/references/tables-and-crud.md +81 -0
  370. neutralino/_data/skills/neutralino-frontend/SKILL.md +121 -0
  371. neutralino/_data/skills/neutralino-frontend/references/bridge.md +63 -0
  372. neutralino/_data/skills/neutralino-frontend/references/custom-components.md +84 -0
  373. neutralino/_data/skills/neutralino-frontend/references/frameworks.md +61 -0
  374. neutralino/_data/skills/neutralino-maintenance/SKILL.md +85 -0
  375. neutralino/_data/skills/neutralino-maintenance/references/platforms-and-gates.md +35 -0
  376. neutralino/_data/skills/neutralino-maintenance/references/records.md +38 -0
  377. neutralino/_data/skills/neutralino-maintenance/references/review-process.md +36 -0
  378. neutralino/_data/skills/neutralino-native/SKILL.md +107 -0
  379. neutralino/_data/skills/neutralino-native/references/api-conventions.md +72 -0
  380. neutralino/_data/skills/neutralino-native/references/desktop-helpers.md +53 -0
  381. neutralino/_data/skills/neutralino-native/references/permissions-windows.md +53 -0
  382. neutralino/_data/skills/neutralino-packaging/SKILL.md +99 -0
  383. neutralino/_data/skills/neutralino-packaging/references/build-layout.md +51 -0
  384. neutralino/_data/skills/neutralino-packaging/references/managed-install.md +59 -0
  385. neutralino/_data/skills/neutralino-packaging/references/templates-and-config.md +63 -0
  386. neutralino/_data/skills/neutralino-python/SKILL.md +109 -0
  387. neutralino/_data/skills/neutralino-python/references/architecture.md +53 -0
  388. neutralino/_data/skills/neutralino-python/references/cli.md +60 -0
  389. neutralino/_data/skills/neutralino-python/references/platforms-security.md +44 -0
  390. neutralino/_data/skills/neutralino-rpc/SKILL.md +114 -0
  391. neutralino/_data/skills/neutralino-rpc/references/errors-and-limits.md +44 -0
  392. neutralino/_data/skills/neutralino-rpc/references/expose-and-context.md +74 -0
  393. neutralino/_data/skills/neutralino-rpc/references/streams-and-cancellation.md +53 -0
  394. neutralino/_data/skills/neutralino-ui/SKILL.md +115 -0
  395. neutralino/_data/skills/neutralino-ui/references/components-and-tree.md +74 -0
  396. neutralino/_data/skills/neutralino-ui/references/state-forms-events.md +85 -0
  397. neutralino/_data/skills/neutralino-ui/references/themes-profiles-assets.md +105 -0
  398. neutralino/_data/skills/neutralino-updates/SKILL.md +94 -0
  399. neutralino/_data/skills/neutralino-updates/references/config-and-api.md +80 -0
  400. neutralino/_data/skills/neutralino-updates/references/releases-and-install.md +77 -0
  401. neutralino/_data/skills/neutralino-updates/references/security-rollback.md +48 -0
  402. neutralino/_data/ui/contracts.json +32927 -0
  403. neutralino/_data/ui/emoji.json +1 -0
  404. neutralino/_data/upstream-lock.json +97 -0
  405. neutralino/_managed.py +1099 -0
  406. neutralino/_paths.py +220 -0
  407. neutralino/_platform.py +150 -0
  408. neutralino/_scaffold.py +344 -0
  409. neutralino/api/_base.py +99 -0
  410. neutralino/api/_custom.py +1350 -0
  411. neutralino/api/_dec.py +21 -0
  412. neutralino/api/_enc.py +80 -0
  413. neutralino/api/app.py +119 -0
  414. neutralino/api/clipboard.py +101 -0
  415. neutralino/api/computer.py +261 -0
  416. neutralino/api/custom.py +36 -0
  417. neutralino/api/debug.py +41 -0
  418. neutralino/api/extensions.py +57 -0
  419. neutralino/api/filesystem.py +633 -0
  420. neutralino/api/net.py +22 -0
  421. neutralino/api/os.py +508 -0
  422. neutralino/api/resources.py +124 -0
  423. neutralino/api/server.py +66 -0
  424. neutralino/api/storage.py +98 -0
  425. neutralino/api/types.py +342 -0
  426. neutralino/api/updater.py +22 -0
  427. neutralino/api/window.py +397 -0
  428. neutralino/application.py +1261 -0
  429. neutralino/bundle.py +187 -0
  430. neutralino/cli.py +629 -0
  431. neutralino/client.py +496 -0
  432. neutralino/config.py +671 -0
  433. neutralino/devtools.py +1973 -0
  434. neutralino/errors.py +142 -0
  435. neutralino/events.py +579 -0
  436. neutralino/execution.py +293 -0
  437. neutralino/extension.py +134 -0
  438. neutralino/frontend/python-bridge.d.ts +207 -0
  439. neutralino/frontend/python-bridge.mjs +854 -0
  440. neutralino/protocol.py +456 -0
  441. neutralino/py.typed +0 -0
  442. neutralino/rpc.py +1625 -0
  443. neutralino/runtime.py +591 -0
  444. neutralino/supervisor.py +866 -0
  445. neutralino/sync_client.py +376 -0
  446. neutralino/templates/default/app.py +32 -0
  447. neutralino/templates/default/frontend/app.js +28 -0
  448. neutralino/templates/default/frontend/index.html +26 -0
  449. neutralino/templates/default/frontend/neutralino.js +1 -0
  450. neutralino/templates/default/frontend/styles.css +8 -0
  451. neutralino/templates/default/gitignore.txt +3 -0
  452. neutralino/templates/default/neutralino.config.json +25 -0
  453. neutralino/templates/hybrid/README.md +17 -0
  454. neutralino/templates/hybrid/app.py +49 -0
  455. neutralino/templates/hybrid/components/counter.mjs +37 -0
  456. neutralino/templates/hybrid/styles.css +21 -0
  457. neutralino/templates/python-ui/README.md +15 -0
  458. neutralino/templates/python-ui/app.py +44 -0
  459. neutralino/templates/python-ui/gitignore.txt +3 -0
  460. neutralino/templates/python-ui/requirements.txt +4 -0
  461. neutralino/templates/react/README.md +28 -0
  462. neutralino/templates/react/app.py +52 -0
  463. neutralino/templates/react/components/widget.mjs +23 -0
  464. neutralino/templates/react/widget/package.json +20 -0
  465. neutralino/templates/react/widget/src/Widget.jsx +25 -0
  466. neutralino/templates/react/widget/vite.config.mjs +19 -0
  467. neutralino/transport.py +661 -0
  468. neutralino/types.py +93 -0
  469. neutralino/ui/__init__.py +139 -0
  470. neutralino/ui/_app.py +1529 -0
  471. neutralino/ui/_assets.py +407 -0
  472. neutralino/ui/_bases.py +1210 -0
  473. neutralino/ui/_behaviours.py +1066 -0
  474. neutralino/ui/_charts.py +732 -0
  475. neutralino/ui/_component.py +882 -0
  476. neutralino/ui/_dates.py +168 -0
  477. neutralino/ui/_desktop.py +879 -0
  478. neutralino/ui/_events.py +192 -0
  479. neutralino/ui/_filters.py +427 -0
  480. neutralino/ui/_forms.py +282 -0
  481. neutralino/ui/_protocol.py +201 -0
  482. neutralino/ui/_schedule.py +543 -0
  483. neutralino/ui/_security.py +106 -0
  484. neutralino/ui/_session.py +969 -0
  485. neutralino/ui/_state.py +199 -0
  486. neutralino/ui/_tables.py +256 -0
  487. neutralino/ui/_theme.py +154 -0
  488. neutralino/ui/blocks/__init__.py +19 -0
  489. neutralino/ui/blocks/_data.py +2239 -0
  490. neutralino/ui/blocks/_interactive.py +622 -0
  491. neutralino/ui/blocks/_layout.py +2967 -0
  492. neutralino/ui/components/__init__.py +81 -0
  493. neutralino/ui/components/_dates.py +879 -0
  494. neutralino/ui/components/_editors.py +217 -0
  495. neutralino/ui/components/_extensions.py +790 -0
  496. neutralino/ui/components/_extras.py +303 -0
  497. neutralino/ui/components/_generated.py +30565 -0
  498. neutralino/ui/components/_types.py +17 -0
  499. neutralino/ui/schema.py +824 -0
  500. neutralino/ui/validators.py +362 -0
  501. neutralino/updates/__init__.py +96 -0
  502. neutralino/updates/_http.py +320 -0
  503. neutralino/updates/_layout.py +762 -0
  504. neutralino/updates/archive.py +216 -0
  505. neutralino/updates/config.py +256 -0
  506. neutralino/updates/errors.py +97 -0
  507. neutralino/updates/install.sh.in +201 -0
  508. neutralino/updates/launcher.py +18 -0
  509. neutralino/updates/manager.py +808 -0
  510. neutralino/updates/manifest.py +196 -0
  511. neutralino/updates/release.py +314 -0
  512. neutralino/updates/semver.py +84 -0
  513. neutralino/updates/sources.py +392 -0
  514. neutralino/windows.py +316 -0
  515. neutralino_python-0.1.0rc1.dist-info/METADATA +117 -0
  516. neutralino_python-0.1.0rc1.dist-info/RECORD +521 -0
  517. neutralino_python-0.1.0rc1.dist-info/WHEEL +4 -0
  518. neutralino_python-0.1.0rc1.dist-info/entry_points.txt +3 -0
  519. neutralino_python-0.1.0rc1.dist-info/licenses/LICENSE +21 -0
  520. neutralino_python-0.1.0rc1.dist-info/licenses/THIRD_PARTY_NOTICES.md +16 -0
  521. neutralino_python-0.1.0rc1.dist-info/licenses/src/neutralino/_data/renderer/LICENSES/packages.json +1838 -0
@@ -0,0 +1,3921 @@
1
+ # `neutralino` command line
2
+
3
+ Installed with the `neutralino-python` package (`neutralino = neutralino.cli:main`;
4
+ also `python -m neutralino.cli`). Every command works offline except
5
+ `runtime install` without `--archive`, `build --bundle` without `--offline`,
6
+ `build`/`release --mode managed` without `--wheelhouse` (they download pinned or
7
+ hash-locked artefacts), and `updates check`, which asks the release source
8
+ configured in `app.toml`. Nothing is downloaded on import, and nothing is ever
9
+ published or uploaded.
10
+
11
+ ## Exit codes
12
+
13
+ | Code | Meaning |
14
+ |---|---|
15
+ | 0 | success |
16
+ | 1 | operation failed (a command it ran failed, an app run by `neutralino run`/`explorer` exited non-zero, I/O error, Ctrl-C) |
17
+ | 2 | usage error (unknown command/option, missing argument, options that need each other) |
18
+ | 3 | validation error (project, config, `app.toml`, requirements, wheelhouse, archive, name or path input; a file that would be overwritten without `--force`) |
19
+ | 4 | environment error (runtime missing or not the pinned build, unsupported platform, missing tool such as pip, no network for a download, missing UI assets or Explorer) |
20
+
21
+ `--help` on any command prints its exact options; `neutralino --version` prints
22
+ the SDK and pinned runtime versions.
23
+
24
+ ## `neutralino init`
25
+
26
+ ```
27
+ neutralino init [PATH] [--name NAME] [--force]
28
+ [--template {python-ui,hybrid,vanilla,react}]
29
+ [--app-id APP_ID] [--updates github --repo OWNER/NAME]
30
+ ```
31
+
32
+ Scaffolds an app in `PATH` (default `.`; created if missing).
33
+
34
+ * No `--template`: the original scaffold, unchanged (`app.py` with
35
+ `neutralino.Application`, `neutralino.config.json`, `frontend/` with
36
+ `index.html`, `app.js`, `styles.css`, the pinned `neutralino.js`,
37
+ `python-bridge.mjs` and its `.d.ts`). It writes no `app.toml`.
38
+ * `--template python-ui`: a pure Python `neutralino.ui` app — `app.py`,
39
+ `app.toml`, `requirements.txt` (empty; for `build --mode managed`),
40
+ `README.md`, `.gitignore`. No Node files.
41
+ * `--template hybrid`: `python-ui` plus `components/counter.mjs` (a custom
42
+ component in plain JavaScript, loaded with `app.add_js_module`) and
43
+ `styles.css` (`app.add_css_file`). No Node files, no build step.
44
+ * `--template react`: `python-ui` plus a React custom component:
45
+ `widget/src/Widget.jsx`, `widget/vite.config.mjs`, `widget/package.json`
46
+ (exact React/Mantine/Vite versions from the repository lock) and the
47
+ compiled `components/widget.mjs`, which is committed in the template, so
48
+ running and building need no Node. Node is needed only to change the widget
49
+ (`cd widget && npm install && npm run build`).
50
+ * `--template vanilla`: the original scaffold, byte for byte, plus `app.toml`.
51
+
52
+ Options:
53
+
54
+ * `--name NAME` — display name (1-200 characters, no control characters;
55
+ default: the folder name in title case). It is escaped for each file type
56
+ it lands in (TOML/JSON/Python/JS string, HTML text).
57
+ * `--app-id APP_ID` — application id written to `app.toml` (letters, digits,
58
+ `_`, `.`; starts with a letter or digit; at most 128 characters; no `..`;
59
+ not a reserved Windows device name). Default `org.example.<name>`.
60
+ * `--updates github --repo OWNER/NAME` — also write an `[updates]` section
61
+ (provider `github`, the repository, and the documented defaults). Without
62
+ `--updates` no update section is written and no update code runs.
63
+ * `--force` — replace files that exist and differ.
64
+
65
+ `--app-id`, `--updates` and `--repo` need `--template` (exit 2); `--updates`
66
+ needs `--repo` and `--repo` needs `--updates` (exit 2). An invalid id, name or
67
+ repository is exit 3.
68
+
69
+ Safety (all templates): an existing file with different content is a
70
+ *conflict* — reported with a unified diff and left untouched (exit 3) unless
71
+ `--force`; identical files are reported `unchanged`. A symlink or junction
72
+ among the targets or their parent folders, or a non-regular file, is refused
73
+ even with `--force` (exit 3). Writes are atomic (temp file + rename).
74
+
75
+ ## `neutralino components`
76
+
77
+ ```
78
+ neutralino components list [--json]
79
+ neutralino components describe NAME [--json]
80
+ ```
81
+
82
+ Reads the UI component contracts bundled in the package
83
+ (`neutralino/_data/ui/contracts.json`). `list` prints name, family and
84
+ description (`--json`: a sorted array of `{name, family, base, description}`).
85
+ `describe` prints props (kind, allowed values), events, slots and examples
86
+ (`--json`: the full contract object). An unknown name is exit 3 (with a
87
+ case-insensitive suggestion); a missing or unreadable registry is exit 4.
88
+
89
+ ## `neutralino examples`
90
+
91
+ ```
92
+ neutralino examples list [--json]
93
+ neutralino examples export NAME DEST [--force]
94
+ ```
95
+
96
+ Examples are the subfolders of the installed `neutralino/_data/examples/`
97
+ (each folder's `README.md` first line is its description). `export` copies one
98
+ to `DEST` with the `init` no-overwrite rules; an unknown name (including any
99
+ path such as `../x`) is exit 3. Hidden files and `__pycache__` are skipped; a
100
+ symlink or special file in the installed data fails the export (exit 3).
101
+ `--json`: `[{"name": ..., "description": ...}]`.
102
+
103
+ ## `neutralino skills`
104
+
105
+ ```
106
+ neutralino skills list [--json]
107
+ neutralino skills export DEST [--skill NAME]... [--force]
108
+ ```
109
+
110
+ Skills are the subfolders of `neutralino/_data/skills/` holding a `SKILL.md`
111
+ (description from its front matter). `export` writes `DEST/<skill>/...` for
112
+ every skill, or only the `--skill` ones; same safety rules as `examples export`.
113
+
114
+ ## `neutralino docs`
115
+
116
+ ```
117
+ neutralino docs export DEST [--force]
118
+ ```
119
+
120
+ Copies the offline docs shipped in `neutralino/_data/docs/`: `llms.txt` (index),
121
+ `llms-full.txt` (all docs in one file), the guides, `reference/` and `manifests/`
122
+ (JSON component, native, example and schema manifests). Same safety rules as
123
+ `examples export`; exit 4 when the package carries no docs.
124
+
125
+ ## `neutralino explorer`
126
+
127
+ ```
128
+ neutralino explorer
129
+ ```
130
+
131
+ Runs the installed Explorer (`neutralino/_data/explorer/app.py`) with the
132
+ current Python, like `neutralino run`. If the package was built without the
133
+ Explorer, exit 4 with a message saying so; if the Explorer exits non-zero,
134
+ exit 1.
135
+
136
+ Each entry page shows the row's status, a live preview built with the real
137
+ component or block, its source, props/events/slots, tests and evidence. On an
138
+ entry with a component preview:
139
+
140
+ * **Edit properties** has one control per contract prop of the first preview
141
+ (switch for booleans, select for enums and sizes, number, text, or a JSON
142
+ field for the other kinds). A change is set on the real component; an
143
+ invalid value shows its error under the control and the preview keeps its
144
+ last valid value. **Reset** restores the example's props.
145
+ * **Source** has tabs: the example file (when the row has one), `preview.py`
146
+ (the preview's Python with the current props) and `Example.jsx`, the
147
+ equivalent React + Mantine code (component and prop names as the renderer
148
+ passes them). Native-API rows get `frontend.js` with the equivalent
149
+ `neutralino.js` calls and the routes their `native_allow_list` needs; rows
150
+ where a frontend equivalent is not meaningful say so instead.
151
+ * **Standalone example**: "Export example" writes a runnable `app.py` with the
152
+ current props into the directory typed above it (default
153
+ `~/neutralino-examples/<entry id>/`); it never overwrites an existing
154
+ `app.py` and refuses relative paths and paths that are not directories it
155
+ can create. "Run" then starts that file as its own process.
156
+
157
+ **RPC log** (header) opens a drawer with the last 200 calls between the
158
+ Explorer's window and Python: time, direction, method, status, duration and a
159
+ payload preview cut to 200 characters, with the values of keys such as token,
160
+ password, secret, authorization, api_key and cookie shown as `[redacted]`.
161
+ "Clear" empties it. The Explorer reads calls through the opt-in
162
+ `RpcEndpoint.observer` hook (`neutralino.rpc`), which costs nothing when unset.
163
+
164
+ ## `neutralino runtime`
165
+
166
+ ```
167
+ neutralino runtime install [--version VERSION] [--archive ZIP] [--offline]
168
+ neutralino runtime path [--version VERSION]
169
+ ```
170
+
171
+ `install` downloads (or takes `--archive`, a local copy of the official
172
+ release zip), verifies the SHA-256 from the pinned lock and caches the binary;
173
+ `--offline` never uses the network. A bad `--archive` is exit 3; a download
174
+ that fails its integrity check, size limit or deadline is exit 4; another
175
+ network error (no route, DNS) is exit 1. `path` prints the binary
176
+ the SDK will use (exit 4 if none; a warning on stderr for an override that is
177
+ not the pinned build).
178
+
179
+ The SDK looks for the runtime in this order: an explicit `runtime=` argument,
180
+ the `NEUTRALINO_RUNTIME` environment variable (a path to the binary, used as
181
+ given and reported with its real hash), then the per-user cache
182
+ (`$XDG_CACHE_HOME/neutralino-python/...`, where `install` puts it). Tests
183
+ that use a private `XDG_CACHE_HOME` either run `install --archive ZIP
184
+ --offline` there or set `NEUTRALINO_RUNTIME` to an installed binary
185
+ (`neutralino runtime path` prints it).
186
+
187
+ ## `neutralino doctor`
188
+
189
+ ```
190
+ neutralino doctor [--json] [--config CONFIG] [--smoke]
191
+ ```
192
+
193
+ Read-only checks: `python` (3.11+), `platform`, `runtime` (pinned hash),
194
+ `webview` (WebKitGTK on Linux, WebView2 note on Windows), `display`,
195
+ `libayatana-appindicator3`, `dialog-helper`, `ui-renderer` (every file listed
196
+ in the packaged renderer `manifest.json` present and matching its SHA-256),
197
+ `venv` (ensurepip available, needed by managed installs), `node`/`npm`
198
+ (optional), `cache`, and with `--config` the given `neutralino.config.json`;
199
+ `--smoke` starts the runtime with a hidden window bound to 127.0.0.1 and makes
200
+ one call. `--json` prints `{"sdk", "platform", "ok", "checks": [{check,
201
+ status ok|warn|fail, detail, fix}], "error"?}`. Exit 0 when nothing failed,
202
+ 3 for an invalid `--config`, 4 when another check failed. No secrets are
203
+ printed.
204
+
205
+ ## `neutralino run`
206
+
207
+ ```
208
+ neutralino run [--project DIR] [--app ENTRY] [--frontend DIR] [--watch] [--debounce MS]
209
+ ```
210
+
211
+ Runs `ENTRY` (default `app.py`) of the project with the current Python
212
+ (missing entry: exit 3; the app exiting non-zero: exit 1). `--watch` restarts
213
+ the backend on Python/config changes and reloads the page on `--frontend`
214
+ changes (debounce in milliseconds, default 250, must be >= 0).
215
+
216
+ ## `neutralino build`
217
+
218
+ ```
219
+ neutralino build [--project DIR] [--app ENTRY] [--out DIR] [--frontend DIR]
220
+ [--frontend-cmd CMD ...] [--bundle [--offline]] [--vendor NAME]...
221
+ [--mode {portable,managed}]
222
+ [--requirements FILE] [--wheelhouse DIR]
223
+ [--python-version X.Y] [--platform TAG]...
224
+ ```
225
+
226
+ * `--mode portable` (default; the original behaviour): a self-contained
227
+ directory (default `DIR/dist/<slug>`) run with the target machine's Python
228
+ 3.11+, no Node, no network. `--app` defaults to `app.py`.
229
+ * `--mode managed`: the portable layout plus a wheelhouse, installer and
230
+ uninstaller (default output `DIR/dist/<slug>-managed`). Needs `app.toml`;
231
+ `--app` defaults to its `[app].entry`.
232
+ * `--frontend-cmd`, `--bundle`, `--offline`, `--vendor`: unchanged (see
233
+ `--help`). `--bundle` needs Node at build time and is refused with
234
+ `--mode managed` (exit 2).
235
+ * Managed only (exit 2 with `--mode portable`): `--requirements FILE`
236
+ (default `[package].requirements` of `app.toml`, else `requirements.txt` if
237
+ present; every line `name==version --hash=sha256:...`), `--wheelhouse DIR`
238
+ (use these wheels, no network; default: `pip download` for the target),
239
+ `--python-version X.Y` (target CPython, >= 3.11; default: the running
240
+ interpreter), `--platform TAG` (repeatable; default: this machine's
241
+ manylinux tags).
242
+
243
+ Exit 3: invalid project input (entry outside the project, unsafe files such as
244
+ links leaving the project, invalid `app.toml`, unpinned/unhashed requirement,
245
+ wrong-ABI/platform or hash-mismatched wheel, building the home directory or
246
+ `/`). Exit 4: no pinned runtime, missing pip for a download, no network for a
247
+ download, modified UI renderer assets. Details, layouts and installed paths:
248
+ [packaging.md](packaging.md).
249
+
250
+ ## `neutralino release`
251
+
252
+ ```
253
+ neutralino release --out DIR [--project DIR] [--version X.Y.Z] [--platform KEY]
254
+ [--base-url URL] [--frontend DIR] [--vendor NAME]...
255
+ [--mode {portable,managed}] [--requirements FILE]
256
+ [--wheelhouse DIR] [--python-version X.Y] [--wheel-platform TAG]...
257
+ ```
258
+
259
+ Builds the release assets of a project with `app.toml` for
260
+ `neutralino.updates` into `DIR` (outside the project, or under its `dist/`):
261
+ `<app id>-<version>-<platform>.tar.gz`, `manifest.json`, `install.sh` and
262
+ `SHA256SUMS` ([updates.md](updates.md#releases)). Local files only: nothing
263
+ is uploaded, tagged or published (that is the owner's step, e.g.
264
+ `gh release create`).
265
+
266
+ * `--version` defaults to `[app] version` (portable mode writes another one
267
+ into the built copy only; managed mode refuses a different one, exit 3).
268
+ * `--platform` is the release platform key; only this machine's is accepted
269
+ (the archive ships its pinned runtime).
270
+ * `--base-url` makes the manifest's asset URLs absolute (https, or http for
271
+ loopback hosts).
272
+ * `--mode managed` builds with `build --mode managed`: wheelhouse, lock and
273
+ offline installer inside the archive; updates then build each version's
274
+ venv offline from it (compiled dependencies survive updates). The
275
+ managed-only options are those of `build` (`--wheel-platform` is `build`'s
276
+ `--platform`); with `--mode portable` they are a usage error (exit 2).
277
+
278
+ Exit 3 for invalid input (unknown platform, non-https `--base-url`, output
279
+ inside the project, invalid `app.toml`, wheelhouse problems), 4 for a missing
280
+ pinned runtime or (managed, without `--wheelhouse`) no network/pip.
281
+
282
+ ## `neutralino updates check`
283
+
284
+ ```
285
+ neutralino updates check (--config APP_TOML | --app-id APP_ID) [--stage] [--json]
286
+ ```
287
+
288
+ A manual update check. `--config` checks the project whose `app.toml` is
289
+ given (running version: its `[app] version`; install root: the app's data
290
+ directory). `--app-id` checks an installed application: the version named by
291
+ `<data>/<app id>/current.json` and that version's `app/app.toml`. `--stage`
292
+ also downloads, verifies and stages a newer version (activated at the next
293
+ launch, or after the app's consent with `activation = "prompt"`); the running
294
+ app is never restarted.
295
+
296
+ Prints one line (`version 1.3.0 is available (running 1.2.0)`, `1.2.0 is up
297
+ to date`, `... is ready and starts at the next launch`, `... failed to start
298
+ before and is skipped`, `updates are disabled in app.toml`); `--json` prints
299
+ `{"status", "current", "latest", "message", "root"}`. Exit 0 for every such
300
+ outcome. A failed check prints `error: update check failed: <reason>
301
+ (<what to do>)` on stderr (`--json`: `{"status": "error", "error": <type>,
302
+ "message", "hint"}` on stdout) and exits 1 (network, not found, refused
303
+ credentials, rate limit, checksum, unsafe archive, staging failure), 4 when
304
+ credentials are needed but neither a token nor `gh` is available, 3 for a
305
+ missing or invalid `app.toml` or an app id that is not installed.
306
+
307
+ ## `neutralino frontend export`
308
+
309
+ ```
310
+ neutralino frontend export [DEST] [--with-client] [--force]
311
+ ```
312
+
313
+ Copies `python-bridge.mjs`, `python-bridge.d.ts` and `python-bridge.d.mts`
314
+ (and with `--with-client` the pinned `neutralino.js`) to `DEST` (default
315
+ `frontend`), with the `init` no-overwrite rules.
316
+
317
+ # Custom components and local assets (`neutralino.ui`)
318
+
319
+ Trusted, application-owned CSS, HTML and JavaScript next to the built-in
320
+ components. Everything is local: files are copied into a per-user staging
321
+ directory at start, served with relative URLs, never fetched from a CDN, and
322
+ the installed package is never written to.
323
+
324
+ ## Local files
325
+
326
+ ```python
327
+ app = ui.Application(title="Demo") # app dir = directory of this file
328
+ app.add_css_file("web/app.css") # loaded in every window
329
+ app.add_js_module("web/components.mjs") # ES module, runs before the page renders custom components
330
+ url = app.add_asset("web/logo.png") # -> "custom/files/logo.png" for img src etc.
331
+ app.add_asset_dir("web/img", prefix="img")
332
+ with app.page("/"):
333
+ ui.HtmlFile("web/about.html") # trusted markup (no scripts/inline handlers under the CSP)
334
+ ```
335
+
336
+ Path rules (all of them raise `ValidationError`):
337
+
338
+ * relative paths start at the directory of the file that created the
339
+ application, never the working directory, and may not contain `..`;
340
+ * the real path, symlinks followed, must lie in the application directory or
341
+ in a directory listed in `asset_roots=[...]` (`ui.Application(...,
342
+ asset_roots=[shared_dir])`);
343
+ * files inside the installed `neutralino` package are refused: copy what you
344
+ need into the application;
345
+ * `.css` for stylesheets, `.js`/`.mjs` for modules, regular files only, at most
346
+ 64 MiB; `add_asset_dir` skips hidden files and symlinks.
347
+
348
+ Use `ui.Html(text)` (sanitized) for markup you did not write.
349
+
350
+ ## Plain JavaScript adapter
351
+
352
+ ```js
353
+ // web/components.mjs
354
+ window.NeutralinoUI.registerComponent('star-rating', () => {
355
+ let root;
356
+ return {
357
+ mount(el, props, emit) { root = el; /* build DOM */ el.onclick = () => emit('rate', { stars: 3 }); },
358
+ update(props) { /* new props from Python */ },
359
+ command(name, data) { if (name === 'reset') return 0; }, // send()/request() from Python
360
+ dispose() { /* remove listeners, timers */ },
361
+ };
362
+ });
363
+ ```
364
+
365
+ ```python
366
+ stars = ui.CustomComponent(
367
+ "star-rating",
368
+ props={"max": 5},
369
+ on_event=lambda ev: print(ev.payload), # {"name": "rate", "data": {"stars": 3}}
370
+ on_error=lambda ev: print(ev.payload),
371
+ ) # {"phase": ..., "message": ...}
372
+ stars.update(props={"max": 10}) # -> update(props)
373
+ stars.send("reset") # fire and forget -> command("reset", None)
374
+ value = await stars.request("reset")
375
+ ```
376
+
377
+ Names are lowercase letters, digits and `-`; event names lowercase
378
+ identifiers. `emit(name, data)` accepts JSON only, at most 256 KiB UTF-8
379
+ (`NeutralinoUI.limits.maxEventBytes`); larger or non-JSON data throws in the
380
+ caller and nothing is sent. Python validates the same bounds again.
381
+
382
+ ## Compiled React component
383
+
384
+ Build the component with Vite as an ES library whose shared modules are
385
+ external; the page's import map resolves them to the renderer's own instances,
386
+ so hooks, context and the Mantine theme/provider are shared:
387
+
388
+ ```js
389
+ // vite.config.mjs
390
+ const shared = ['react', 'react/jsx-runtime', 'react-dom', 'react-dom/client', '@mantine/core', '@mantine/hooks'];
391
+ export default defineConfig({ plugins: [react()], build: {
392
+ lib: { entry: 'src/Widget.jsx', formats: ['es'], fileName: () => 'widget.mjs' },
393
+ rollupOptions: { external: shared } } });
394
+ ```
395
+
396
+ ```jsx
397
+ function Widget({ props, emit, onCommand }) {
398
+ const theme = useMantineTheme();
399
+ const [n, setN] = useState(0);
400
+ useEffect(() => { onCommand((name, data) => name === 'get' ? n : null); return () => onCommand(null); }, [n]);
401
+ return <Button onClick={() => emit('inc', { n: n + 1 })}>{n}</Button>;
402
+ }
403
+ window.NeutralinoUI.registerReactComponent('my-widget', Widget);
404
+ ```
405
+
406
+ Use the React and Mantine versions the renderer ships (the `react` template's
407
+ `widget/package.json` pins them). `neutralino init --template react` creates a
408
+ working setup; the committed `components/widget.mjs` needs no Node at run time.
409
+
410
+ ## Lifecycle and errors
411
+
412
+ * `mount` runs once per instance; `update` on every Python props change;
413
+ `dispose` when the component is removed, its page route changes, or the
414
+ window reloads or closes (the page unmounts on `pagehide`).
415
+ * A throwing `mount`, `update`, `command` or `dispose`, a React render error,
416
+ a factory that returns no adapter, or a name that is never registered within
417
+ 10 s, is contained: an error notice replaces that component and the rest of
418
+ the page keeps working. Python receives it as the component's `error` event
419
+ (`on_error`); without one, the application's `app.on_error(fn)` gets a
420
+ `ui.CustomComponentError` (`component`, `phase`, `message`), else it is
421
+ logged. A failing `request()` also raises `RpcError` in the caller.
422
+ * Custom modules are trusted code with the page's privileges (and the
423
+ native API routes your app allows): load only your own files.
424
+
425
+ # Custom frontends (vanilla, React, Vue, Svelte, ...)
426
+
427
+ Without `neutralino.ui` the SDK serves any static frontend you build
428
+ (`neutralino.Application(resources="frontend/dist")`) and connects it to
429
+ Python through one ES module, the canonical bridge `python-bridge.mjs` with
430
+ types in `python-bridge.d.ts`. No framework is required or excluded: the
431
+ bridge only needs the official `neutralino.js` loaded by a script tag.
432
+
433
+ ```sh
434
+ neutralino frontend export src/bridge # python-bridge.mjs + python-bridge.d.mts
435
+ neutralino frontend export src/bridge --with-client # also the pinned neutralino.js
436
+ ```
437
+
438
+ `--with-client` writes `neutralino.js` into the same folder as the bridge.
439
+ In a bundler project move it to the static folder (`public/` in Vite),
440
+ loaded by a script tag, not imported; Vite's warning that a classic script
441
+ "can't be bundled without type=module" is expected for it.
442
+
443
+ Runnable examples: `neutralino examples export vanilla DEST` (plain HTML/JS)
444
+ and `neutralino examples export react DEST` (Vite + React + TypeScript).
445
+
446
+ ## The calls (same in every framework)
447
+
448
+ ```js
449
+ import { PythonBackend, RpcError } from './bridge/python-bridge.mjs';
450
+ Neutralino.init();
451
+ const backend = new PythonBackend(NL_PYTHON_EXTENSION_ID);
452
+ const users = await backend.invoke('get_users', { department: 'IT' });
453
+ for await (const n of backend.stream('count', { n: 10 })) { /* ... */ }
454
+ backend.register('page.add', ({ a, b }) => a + b); // Python: await app.frontend.invoke("page.add", {...})
455
+ ```
456
+
457
+ Errors arrive as `RpcError` with a `code` (`INVALID_PARAMS`, `TIMEOUT`, ...).
458
+
459
+ ## Vue 3
460
+
461
+ Create one backend for the app (a module singleton or `provide`), keep results
462
+ in refs:
463
+
464
+ ```js
465
+ // backend.js
466
+ export const backend = new PythonBackend(NL_PYTHON_EXTENSION_ID);
467
+ // Users.vue <script setup>
468
+ import { ref, onMounted } from 'vue';
469
+ import { backend } from './backend.js';
470
+ const users = ref([]);
471
+ onMounted(async () => { users.value = await backend.invoke('get_users', { department: 'IT' }); });
472
+ ```
473
+
474
+ Call `Neutralino.init()` once in `main.js` before `createApp(App).mount('#app')`.
475
+
476
+ ## Svelte
477
+
478
+ ```svelte
479
+ <script>
480
+ import { onMount } from 'svelte';
481
+ import { backend } from './backend.js';
482
+ let users = [];
483
+ onMount(async () => { users = await backend.invoke('get_users', { department: 'IT' }); });
484
+ </script>
485
+ {#each users as u}<p>{u.name}</p>{/each}
486
+ ```
487
+
488
+ For a stream, append inside the `for await` loop; to stop it early, `break`
489
+ out of the loop (the bridge cancels the Python generator).
490
+
491
+ ## Build settings for any bundler
492
+
493
+ * relative asset URLs (`base: './'` in Vite) and no CDN imports;
494
+ * copy `neutralino.js` into the output and load it with
495
+ `<script src="neutralino.js"></script>` before your bundle;
496
+ * a CSP like the examples': `script-src 'self'`, `connect-src` to
497
+ `ws://127.0.0.1:*`;
498
+ * if the page calls native APIs itself, list them in `native_allow_list`.
499
+
500
+ The framework's own test suite (in its source repository, not the wheel)
501
+ runs a framework-free page shaped like these (reactive store + render, ES
502
+ modules, only the canonical bridge) against the unchanged SDK on the real
503
+ runtime, and type-checks a framework-style TypeScript consumer of the
504
+ declarations.
505
+
506
+ # Desktop helpers (`neutralino.ui`)
507
+
508
+ Per-application directories, an atomic JSON settings file, optional window
509
+ geometry persistence and validated wrappers over the stock runtime's native
510
+ dialogs, notifications, clipboard and `os.open`. The helpers call the existing
511
+ native API (`app.native.os`, `app.native.clipboard`, `app.native.window`). They
512
+ add argument validation and clearer permission errors; they do not add native
513
+ features of their own.
514
+
515
+ ```python
516
+ from neutralino import ui
517
+
518
+ app = ui.Application(
519
+ title="Inventory",
520
+ app_id="org.example.inventory",
521
+ remember_geometry=True,
522
+ native_allow_list=ui.desktop_routes("open_file", "clipboard_text", "open_url"),
523
+ )
524
+ app.settings.set("theme", "dark")
525
+
526
+
527
+ def pick() -> None: # sync callback: runs on a worker thread
528
+ path = app.open_file("Open image", filters=[("Images", ["png", "jpg"])])
529
+ if path is not None:
530
+ app.settings.update(last_file=path)
531
+ ```
532
+
533
+ ## API
534
+
535
+ On both `ui.Application` (blocking) and `ui.AsyncApplication` (async):
536
+
537
+ | Member | Description |
538
+ | --- | --- |
539
+ | `Application(..., app_id: str \| None = None, remember_geometry: bool = False, ...)` | New keyword arguments of both facades. |
540
+ | `app.app_id: str` | The id used for the directories (see below). |
541
+ | `app.paths: AppPaths` | Per-application directories. |
542
+ | `app.settings: Settings` | `paths.config_dir / "settings.json"`, created on first use; the file path is `app.settings.path`. |
543
+ | `app.remember_geometry: bool` | True if geometry persistence is on. |
544
+ | `app.desktop: DesktopHelpers` | The async helpers. Use these in async callbacks of the blocking facade. |
545
+
546
+ Native helpers. On `AsyncApplication` they are coroutines. On `Application`
547
+ they block, and they raise `RuntimeError` when called on the event-loop thread
548
+ (async callbacks); use `await app.desktop.<name>(...)` there. Before `start()`
549
+ they raise `StartupError`.
550
+
551
+ | Helper | Native route | Result |
552
+ | --- | --- | --- |
553
+ | `open_file(title=None, *, filters=None, multiple=False, default_path=None)` | `os.showOpenDialog` | A path, or `None` if cancelled. With `multiple=True`, a list (`[]` if cancelled). |
554
+ | `save_file(title=None, *, filters=None, default_path=None, force_overwrite=False)` | `os.showSaveDialog` | A path or `None` |
555
+ | `select_folder(title=None, *, default_path=None)` | `os.showFolderDialog` | A path or `None` |
556
+ | `message_box(title, message, *, buttons="OK", icon="INFO")` | `os.showMessageBox` | `"OK"`, `"CANCEL"`, `"YES"`, `"NO"`, `"ABORT"`, `"RETRY"` or `"IGNORE"` |
557
+ | `confirm(title, message, *, icon="QUESTION")` | `os.showMessageBox` (`YES_NO`) | `True` only for Yes |
558
+ | `notify_native(title, body, *, icon="INFO")` | `os.showNotification` | `None` |
559
+ | `clipboard_text()` | `clipboard.readText` | The text, or `""` if the clipboard holds no text |
560
+ | `set_clipboard_text(text)` | `clipboard.writeText` | `None` |
561
+ | `open_url(url)` | `os.open` | `None` |
562
+
563
+ The values each argument accepts:
564
+
565
+ * `buttons`: `OK`, `OK_CANCEL`, `YES_NO`, `YES_NO_CANCEL`, `RETRY_CANCEL` or
566
+ `ABORT_RETRY_IGNORE`.
567
+ * `icon`: `INFO`, `WARNING`, `ERROR` or `QUESTION`.
568
+ * `filters`: `[("Name", ["ext", ...]), ...]`, or the native
569
+ `{"name": ..., "extensions": [...]}` form. Each extension is 1 to 32 letters
570
+ or digits (`png`, not `.png` or `*.png`), or `*`. At most 32 filters with 64
571
+ extensions each. Names must be non-empty and printable.
572
+ * Text arguments: titles are limited to 1024 characters, messages and bodies to
573
+ 64 KiB, clipboard text to 16 MiB. NUL characters are rejected.
574
+
575
+ Dialog calls wait up to 24 hours for the user. The SDK's 30-second request
576
+ timeout does not apply to them.
577
+
578
+ Other exports from `neutralino.ui`:
579
+
580
+ * `AppPaths(app_id, *, platform=None, env=None)`, with:
581
+ * `location(kind)`, which returns the path without creating it.
582
+ * `locations()`, which returns all of them.
583
+ * `ensure(kind)`, and the properties `data_dir`, `config_dir`, `cache_dir`,
584
+ `log_dir` and `state_dir`, which create the directory.
585
+ * `Settings(path, *, max_bytes=1 MiB)`, with:
586
+ * `get`, `set`, `update`, `delete`, `clear`, `as_dict` and `reload`.
587
+ * The mapping operators `[]`, `in`, `del` and `len`.
588
+ * `subscribe(fn) -> unsubscribe`, which calls `fn(SettingsChange(changed, removed))`.
589
+ * `desktop_routes(*helpers) -> list[str]`, the native routes the named helpers
590
+ need. With no arguments it returns the routes of all helpers.
591
+ * `DesktopHelpers`, the async helper implementation (`app.desktop`).
592
+
593
+ ## Application id
594
+
595
+ `app.paths` needs a directory-safe id. Ids may contain ASCII letters, digits,
596
+ `_` and `.`. They must start with a letter or digit, be at most 128 characters
597
+ long, and contain no `..`, no trailing `.` and no Windows device name (`CON`,
598
+ `NUL`, ...). These are the characters the runtime's `applicationId` accepts. The
599
+ facade takes the first of these that is set:
600
+
601
+ 1. **`app_id=`.** When the config has no `applicationId`, the facade also
602
+ writes this value into the config, so the runtime's `applicationId` and
603
+ `app.paths` use the same id. If a config sets a different `applicationId`,
604
+ the facade raises `ValidationError`. When `config=` is a file path, the
605
+ facade reads the file at construction.
606
+ 2. **The config's `applicationId`**, from a mapping or a file.
607
+ 3. **A slug of `title`.** For example, `"My Tool"` becomes `my_tool`. The
608
+ runtime keeps its own `applicationId`, which the core derives from the
609
+ project path (independent audit A17). Two projects with the same title
610
+ share their directories. Pass `app_id=` to avoid both issues.
611
+ 4. **No title.** The facade uses the id the core derives from the project
612
+ path, `org.neutralinopython.app.p<hash>`.
613
+
614
+ ## Directories
615
+
616
+ The directories come from the environment the runtime gets: `env=` if it is
617
+ given, otherwise `os.environ`. An isolated environment therefore isolates the
618
+ directories too. On POSIX systems, every directory the helpers create, missing
619
+ parents included, gets mode `0o700`. Existing directories keep their mode.
620
+ Constructing the application creates nothing.
621
+
622
+ | Kind | Linux / BSD (XDG) | macOS | Windows |
623
+ | --- | --- | --- | --- |
624
+ | data | `$XDG_DATA_HOME/<id>` (`~/.local/share/<id>`) | `~/Library/Application Support/<id>/data` | `%APPDATA%\<id>\data` |
625
+ | config | `$XDG_CONFIG_HOME/<id>` (`~/.config/<id>`) | `~/Library/Application Support/<id>/config` | `%APPDATA%\<id>\config` |
626
+ | cache | `$XDG_CACHE_HOME/<id>` (`~/.cache/<id>`) | `~/Library/Caches/<id>` | `%LOCALAPPDATA%\<id>\cache` |
627
+ | state | `$XDG_STATE_HOME/<id>` (`~/.local/state/<id>`) | `~/Library/Application Support/<id>/state` | `%LOCALAPPDATA%\<id>\state` |
628
+ | log | `<state>/log` | `~/Library/Logs/<id>` | `%LOCALAPPDATA%\<id>\log` |
629
+
630
+ * **Unset or relative variables.** Relative `XDG_*` values are ignored, as the
631
+ XDG Base Directory specification requires. If `%APPDATA%` or
632
+ `%LOCALAPPDATA%` is unset or relative, the helpers use
633
+ `%USERPROFILE%\AppData\Roaming` or `%USERPROFILE%\AppData\Local`.
634
+ * **Tested platforms.** The macOS and Windows layouts are unit-tested by
635
+ simulating the platform and environment. They have not been run natively on
636
+ macOS or Windows.
637
+
638
+ ## Settings
639
+
640
+ * **Writes.** Every mutation is a single atomic write. The helper writes a
641
+ temporary file (mode `0o600`) in the same directory, flushes and `fsync`s it,
642
+ replaces the old file with `os.replace`, then `fsync`s the directory on
643
+ POSIX. If the write fails, the old file and the in-memory values stay
644
+ unchanged.
645
+ * **Values.** Only JSON values are accepted: `None`, `bool`, `int`, finite
646
+ `float`, `str`, and lists, tuples and mappings with string keys. Tuples are
647
+ stored as lists. `NaN`, `Infinity`, non-string keys, bytes, sets and other
648
+ objects raise `ValidationError`. Keys must be non-empty strings of at most
649
+ 256 characters.
650
+ * **Size.** The serialized file is capped at `max_bytes` (1 MiB by default).
651
+ A write over the cap raises `ValidationError`.
652
+ * **Corrupt files.** A file that cannot be read is renamed to
653
+ `settings.json.corrupt-<YYYYmmddTHHMMSS>`, and the settings start empty. That
654
+ covers invalid JSON, non-UTF-8 data, a top level that is not an object,
655
+ `NaN`, and files over the cap. The warning names the file and the reason,
656
+ such as `invalid JSON (Expecting value at line 1 column 5)`, but never the
657
+ file's content.
658
+ * **Concurrency.** Settings are thread-safe within one process. Several
659
+ processes writing the same file are not coordinated: the last write wins.
660
+ `reload()` re-reads the file.
661
+ * **Subscribers.** Subscribers run synchronously on the thread that made the
662
+ change, after the write. A failing subscriber is logged and does not undo the
663
+ change.
664
+
665
+ ## Window geometry (`remember_geometry=True`)
666
+
667
+ **What is saved.** The main window's size and position, plus a maximized flag,
668
+ are saved to `paths.state_dir / "window-geometry.json"`.
669
+
670
+ **When it is saved:**
671
+
672
+ * **Polling.** The window is polled once per second through `window.getSize`,
673
+ `window.getPosition`, `window.isMaximized` and `window.isMinimized`. A new
674
+ geometry is written only after it has been the same for two polls.
675
+ * **Orderly stop.** On `shutdown()`, or when `run()` returns after
676
+ `request_stop()`, the geometry is captured and saved once more.
677
+ * **User closes the window.** The runtime process exits, so the last poll
678
+ stands. Changes made in the last second or two before closing can be lost.
679
+ * **Minimized or maximized.** Minimized windows are not saved. When the window
680
+ is maximized, the flag is saved and the last normal size and position are
681
+ kept.
682
+
683
+ **Restore.** The saved geometry is restored at startup through the window
684
+ config, without moving the window after it appears:
685
+
686
+ * `width` and `height`, which replace the `width=` and `height=` arguments.
687
+ * `x` and `y`, with `center` set to false.
688
+ * `maximize`.
689
+
690
+ In bundle mode these are passed as the runtime's `--window-*` flags. The
691
+ runtime's own `useSavedState` is set to false unless you set it, so the two
692
+ mechanisms do not conflict.
693
+
694
+ **Bounds:**
695
+
696
+ * Sizes are clamped to 160–16384 pixels.
697
+ * A saved position with a coordinate beyond ±16384 is dropped.
698
+ * The helpers do not check which monitors are connected. A window saved on a
699
+ monitor that has since been disconnected is not moved back on screen.
700
+
701
+ **Permissions.** The four window routes are added to `native_allow_list`
702
+ automatically:
703
+
704
+ * If you pass a list, they are appended to it.
705
+ * If you pass nothing, they become the list, on top of the SDK minimum.
706
+ * With `"*"`, nothing is added because everything is allowed.
707
+
708
+ If your config sets its own `nativeAllowList` or `nativeBlockList`, nothing is
709
+ added; allow the routes there yourself. A refused route is logged once and
710
+ persistence stops. It never raises. As with every route, the page gets the
711
+ same permissions (ADR-006/017).
712
+
713
+ **Wayland.** GTK cannot read or set a window's global position on Wayland, so
714
+ only the size is saved and restored there. The SDK treats the runtime as
715
+ running on Wayland when `GDK_BACKEND` starts with `wayland`. If `GDK_BACKEND`
716
+ is unset, it treats `WAYLAND_DISPLAY` or `XDG_SESSION_TYPE=wayland` as
717
+ Wayland. `GDK_BACKEND=x11` (XWayland) uses X11 and keeps positions.
718
+
719
+ **Measured.** Verified on X11 under a private Xvfb with no window manager,
720
+ across two runs:
721
+
722
+ * The size and position were restored exactly.
723
+ * The final save on shutdown recorded a move made just before.
724
+
725
+ Not measured: Wayland compositors, real X11 window managers (which may adjust
726
+ positions for decorations), macOS and Windows.
727
+
728
+ ## Platform caveats of the native helpers
729
+
730
+ ### Dialogs (open, save, folder, message box)
731
+
732
+ **Backends.** The stock runtime uses portable-file-dialogs:
733
+
734
+ * Linux: it starts one of `zenity`, `kdialog`, `qarma` or `matedialog`,
735
+ whichever it finds on `PATH`. A desktop without any of them has no dialogs.
736
+ That case was not measured here.
737
+ * macOS: `osascript`.
738
+ * Windows: the native Win32/COM dialogs.
739
+
740
+ **Filters.** The runtime turns each extension into `*.<ext>`, so a custom
741
+ `"*"` becomes `*.*`. Without `filters`, the runtime uses `All files|*`.
742
+ Observed zenity arguments include `--file-filter Images|*.png *.jpg`.
743
+
744
+ **Message box results.** With zenity, an answer the runtime cannot map is
745
+ reported as `OK`. With the test stub, which prints nothing, `message_box(...,
746
+ buttons="YES_NO")` returned `"OK"`, so `confirm()` returns `False`.
747
+
748
+ **Blocking.** Dialogs block until the user answers. Never call them from a
749
+ test against a live session. The native tests use recording stubs.
750
+
751
+ ### Notifications
752
+
753
+ * Linux: portable-file-dialogs ran `zenity --notification --window-icon
754
+ information --text "<title>\n<body>"`. This was observed with the stub.
755
+ * macOS: `NSUserNotificationCenter` when the app runs as an app bundle,
756
+ otherwise `osascript`.
757
+
758
+ ### Clipboard
759
+
760
+ **Backend.** The runtime's `clip` library handles the clipboard. On Linux it
761
+ uses X11 selections.
762
+
763
+ **Measured.** Under Xvfb, a text round trip through `set_clipboard_text` and
764
+ `clipboard_text` works, from both the async and the blocking facade.
765
+
766
+ **Lifetime on X11.** The X11 selection is served by the runtime process. After
767
+ the process exits, the text stays available only if a clipboard manager copied
768
+ it.
769
+
770
+ **Not measured:** Wayland without XWayland, macOS and Windows.
771
+
772
+ ### `open_url`
773
+
774
+ **Accepted URLs.** Only these are opened:
775
+
776
+ * `http` and `https` URLs with a host and without `user:password@`.
777
+ * `mailto:` URLs.
778
+
779
+ `file:`, `javascript:`, `data:` and custom schemes are refused with
780
+ `ValidationError`.
781
+
782
+ **Shell quoting.** On Linux the runtime runs `xdg-open "<url>"` through
783
+ `/bin/sh` (`open "<url>"` on macOS), which follows from upstream
784
+ `api/os/os.cpp`. So the URL must consist only of RFC 3986 characters other than
785
+ `$`. Percent-encode spaces, quotes, `` ` ``, `\`, `$`, control characters and
786
+ non-ASCII text. A stray `%` that is not followed by two hex digits is also
787
+ refused.
788
+
789
+ **Windows.** The runtime uses `ShellExecute`.
790
+
791
+ **Measured.** In the native tests the `xdg-open` stub received exactly the
792
+ accepted URL. Refused URLs never reached the runtime.
793
+
794
+ ## Permissions
795
+
796
+ The UI facade starts from the SDK's minimal native allow list. Each helper
797
+ needs its route; `ui.desktop_routes(...)` lists the routes for the helpers you
798
+ name. When the allow list refuses a route, the helper raises `NativeError`
799
+ (`NE_RT_NATPRME` or `NE_RT_APIPRME`). The message names the route and the
800
+ `native_allow_list=` fix. Upstream applies one policy to the page and to
801
+ Python, so allowing a helper's route also allows the page to call it.
802
+
803
+ # neutralino-python guide
804
+
805
+ ## Pieces
806
+
807
+ | Object | Role |
808
+ |---|---|
809
+ | `Application` / `AsyncApplication` | Python launches the pinned runtime in a private instance directory, connects as an extension, serves exposed functions, and stops everything it owns. |
810
+ | `Extension` / `AsyncExtension` | The runtime started this Python program (`extensions[].command`); adopt the stdin bootstrap, serve, exit when the runtime closes the connection. |
811
+ | `AsyncClient` / `Client` | One authenticated connection to a runtime with typed namespaces (`client.filesystem`, `client.window`, ...), `events`, and `invoke_native` for anything else. |
812
+ | `app.windows` | Managed windows: one extra owned runtime per window. |
813
+ | `app.frontend` | Call functions that pages registered (`backend.register(name, fn)`). |
814
+ | `python-bridge.mjs` | Page side: `PythonBackend(NL_PYTHON_EXTENSION_ID)` with `invoke`, `stream`, `emit`, `discover`, `register`. |
815
+
816
+ ## Native API
817
+
818
+ Every route of `contracts/api-inventory.json` with status `wrapped` is a method named in snake case on the namespace of the same name: `filesystem.readBinaryFile` -> `await client.filesystem.read_binary_file(path, pos=..., size=...)`.
819
+
820
+ - Required arguments are positional; options the official client takes from an object are keyword-only; optional arguments the client takes positionally (`broadcast(event, data)`) stay positional.
821
+ - `UNSET` (the default) omits a field from the wire payload; `None` sends JSON `null` (the runtime treats null as absent, except `storage.set_data(key, None)` which removes the key).
822
+ - Paths accept `os.PathLike` and are passed with `os.fspath`, never normalised. Bytes arguments accept bytes-like objects; binary results are `bytes`.
823
+ - Returns are typed with TypedDicts using the upstream key names (`neutralino.api.types`).
824
+ - Native errors raise `NativeError` with the upstream `code` and `message` (`NE_FS_FILRDER`, ...). Every call takes `timeout=` (seconds); a timeout raises `CallTimeoutError` with `outcome_unknown = True`, and nothing is retried.
825
+ - Client helpers are reproduced exactly: `window.set_size` merges `window.getSize` first; `window.create` builds the same command line as the JS client; `extensions.dispatch` waits for the target to connect; `clipboard.read_image(format)` converts pixels like the client; `net.get/post/...`; `updater.*` (ADR-009).
826
+ - `app.exit()` and `app.kill_process()` get no reply: they return when the connection closes. In window mode on Linux the pinned runtime crashes on `app.exit` (ADR-005); `Application.shutdown()` uses SIGTERM instead.
827
+ - `window.*` calls wait until the runtime's window exists (ADR-011/012); calling them earlier crashes the pinned runtime. The wait counts against the call's `timeout`, and ends with `ConnectionLostError` if the session closes first. Outside window mode the runtime discards window calls: getters (`get_title`, `is_maximized`, ...) then raise `UnsupportedError` instead of returning `None`.
828
+ - Raw `app.restart_process()` and `window.create()` start runtimes the SDK does not own, pointing at the Application's private instance directory (deleted when it stops). Use `Application.restart()` and `app.windows.create()` instead.
829
+
830
+ ## Events
831
+
832
+ ```python
833
+ sub = client.events.on("watchFile", handler) # handler(Event); coroutine or plain function
834
+
835
+
836
+ @client.events.on("spawnedProcess")
837
+ def on_proc(ev): ...
838
+
839
+
840
+ client.events.once("windowFocus", handler)
841
+ async for ev in client.events.stream("openedFile"):
842
+ ...
843
+ await client.events.broadcast("myEvent", {"x": 1}) # native events.broadcast
844
+ client.events.dispatch("local", data) # local Python subscribers only
845
+ ```
846
+
847
+ Each subscription has its own bounded queue (default 512) and runs one event at a time in order. Plain-function handlers run on a daemon worker thread; coroutine handlers on the loop. An exception is logged and reported to `events.on_error`; the subscription keeps running. If a subscription falls behind past its queue size it is stopped and reports `QueueFullError` - events are never dropped silently.
848
+
849
+ ## Exposing functions
850
+
851
+ ```python
852
+ @app.expose() # name = function name
853
+ def get_users(department: str): ...
854
+
855
+
856
+ @app.expose("users.count", schema={"type": "object", "properties": {"min": {"type": "integer"}}})
857
+ async def count_users(ctx: RpcContext, min: int = 0) -> int: ...
858
+
859
+
860
+ @app.expose(stream=True) # generators and async generators stream
861
+ def lines(path: str, ctx: RpcContext):
862
+ with open(path, encoding="utf-8") as f:
863
+ for line in f:
864
+ if ctx.cancelled:
865
+ return
866
+ yield line
867
+ ```
868
+
869
+ - Only registered functions are callable; names are case-sensitive; no module scanning or eval. Discovery lists names, parameters, schema and stream mode, plus `description` only when you pass one (docstrings are never published).
870
+ - Parameters are named (a JSON object). Unknown or missing parameters, and values that do not match simple annotations (`str`, `int`, `float`, `bool`, `list`, `dict`, unions) or the optional JSON-schema subset, fail with `INVALID_PARAMS`.
871
+ - A parameter named `ctx` receives `RpcContext`: `ctx.cancelled`, `await ctx.wait_cancelled()`, `ctx.progress(current=..., total=..., message=...)` (thread-safe, coalesced to 10/s), `ctx.client` (native API of the calling window), `ctx.window`, `ctx.peer`, and `ctx.run(coro)` to call async SDK code from a plain function.
872
+ - Return values must be JSON with integers within +-(2**53-1). In RPC messages, integral floats (`1.0`) count as integers, as in JavaScript. Raise `RpcError(code, message, details)` for an application error; any other exception becomes `INTERNAL_ERROR` without details.
873
+
874
+ ## Threads, loops and cancellation
875
+
876
+ - `AsyncApplication`, `AsyncClient` and `AsyncExtension` run on your asyncio loop. Nothing user-defined runs on the socket reader.
877
+ - Plain-function handlers run on a bounded pool (default 4 workers); at most 32 calls per page are active, further calls get `BUSY`. Sync generators are advanced one item at a time on the pool. A sync generator abandoned while `next()` runs (cancel, timeout) is closed on that same worker as soon as `next()` returns, so its `finally`/`with` blocks run; the CANCELLED/TIMEOUT reply is sent at once and never waits for a free worker.
878
+ - The blocking `Application` and `Client` run a private loop thread. Calling a blocking method from that loop's thread, or from a thread that runs another asyncio loop, raises `RuntimeError` instead of deadlocking. Plain handlers run on worker threads and may use the blocking API.
879
+ - Cancellation is cooperative. Async handlers are cancelled; plain functions see `ctx.cancelled` and their late result is discarded. Threads are never killed; `shutdown()` waits `Limits.shutdown_grace` and logs what is still running.
880
+ - Streams use credit: the producer pauses when the consumer has not granted credit (default window 16, max 64). Producing each item is bounded by the method's `timeout` (or `RpcLimits.stream_idle_timeout`, 30 s); waiting for credit by `stream_idle_timeout`.
881
+ - Stream terminal metadata (the final `result` value, `null` by default) comes from a sync generator's `return value` or `ctx.set_result(value)` (async generators cannot return a value). The page reads it from `await iterable.result` after consuming the stream to the end; leaving the loop early rejects `result` with `CANCELLED`.
882
+ - Cancelling a stream: the page leaves its `for await` loop. Python uses `async with app.frontend.stream(...) as s:` (or `await s.aclose()`), which sends `cancel` even when the loop is left early.
883
+ - A handler deadline produces `TIMEOUT`; a `TimeoutError` the handler raises itself is reported like any other exception (`INTERNAL_ERROR`).
884
+ - Progress (both directions) is rate-limited to 10/s with only the latest value kept, and that latest value is always delivered before the terminal message. Progress is advisory: both consumers tolerate a gap (a lost update) and drop stale or duplicate updates.
885
+ - RPC handlers and plain-function event handlers run on daemon threads: a handler that never returns cannot keep the interpreter from exiting after shutdown. It is reported, not killed.
886
+ - Shutdown is bounded: event handlers (plain functions and coroutines) and RPC tasks still running after `Limits.shutdown_grace` are logged as a warning (`EventBus.aclose()` also returns the names of the event subscriptions whose handlers did not stop) and left behind instead of blocking `close()` forever. `close()` reports event handlers still running after `Limits.shutdown_grace`, plain functions included.
887
+ - When the runtime connection ends on its own, `events.stream()` iterators and pending `events.wait_for()` raise `ConnectionLostError`, and handler subscriptions stop after the events they already accepted.
888
+ - When you close the session yourself, streams simply end (`StopAsyncIteration`) and pending or new `wait_for()` calls raise `NotReadyError`.
889
+ - `events.wait_for("*")` matches any event.
890
+ - `off()`/`unsubscribe()` may be called from any thread, including a plain handler; once they return, no queued event is delivered.
891
+
892
+ ## Lifecycle
893
+
894
+ `Application.run()` blocks until the window closes (the runtime exits) or Ctrl-C, then shuts down: RPC peers get `bye`, the socket closes, the runtime gets SIGTERM, then terminate/kill after the grace period, the private directory is removed. `start()` returns once the session is READY; `shutdown()` is idempotent. `restart()` starts a fresh runtime and session; pending calls fail with `DISCONNECTED`.
895
+
896
+ With `AsyncApplication` (core or `ui`) under `asyncio.run(main())`, Ctrl-C cancels `await app.run()`, which still shuts down as above, and then `asyncio.run` raises `KeyboardInterrupt` (exit status -2 / 130). For a quiet exit 0, catch it at the top: `try: asyncio.run(main()) except KeyboardInterrupt: pass`.
897
+
898
+ Shutdown stops the runtimes the SDK launched, not processes your app started through them. Upstream gives every `os.spawn_process` and `os.exec_command(background=True)` child its own process group and does not stop it when the runtime exits, so such a child keeps running after `shutdown()`. Stop your children before calling `shutdown()` (shown with `AsyncApplication`):
899
+
900
+ ```python
901
+ for proc in await app.client.os.get_spawned_processes():
902
+ await app.client.os.update_spawned_process(proc["id"], "exit") # SIGINT to its process group
903
+ ```
904
+
905
+ Background `exec_command` children are not in that list; use `spawn_process` for anything long-running.
906
+
907
+ SDK-launched runtimes (the application and its managed windows) run with umask 077. Files and directories the app creates through native APIs (`filesystem.write_file`, `create_directory`, `window.snapshot`, programs started by `exec_command`) are therefore 0600 and 0700. Set the mode explicitly (`filesystem.set_permissions`) when other users or groups must read them. A runtime that starts Python as an extension keeps the umask it was started with.
908
+
909
+ ## Configuration
910
+
911
+ `Application(config=...)` takes a dict or a path to `neutralino.config.json`. Without a config the SDK sets `nativeAllowList` to its own minimum (`app.broadcast`, `app.exit`, `extensions.dispatch`, `extensions.getStats`); `native_allow_list=[...]` adds routes and `"*"` allows every route. The same list applies to Python's own native calls (docs/security.md, ADR-006/017). `ui.Application(profile="restricted" | "trusted" | "custom")` picks a list for UI apps. `neutralino init` scaffolds both. The SDK writes a copy into the private instance directory: every key you set is kept, unknown keys included; it forces `enableServer`, `enableNativeAPI`, `enableExtensions`, `exportAuthInfo` (also inside `modes.*`), adds its extension id, mounts your resources at `/app/`, and defaults `port: 0`, `storageLocation: "system"`, `tokenSecurity: "one-time"` when unset. `nativeAllowList`/`nativeBlockList` must allow `extensions.getStats` and `app.broadcast` (startup fails otherwise) and should allow `extensions.dispatch` (page -> Python calls; a warning is logged if it is blocked). Extensions (`Extension`, `from_stdin`, `from_auth_file`) also use `app.getConfig` for the automatic window gate. If it is blocked, connect still succeeds, a warning is logged, and `window.*` calls wait for a window event (pass `window_ready=True` outside window mode).
912
+
913
+ Any `tokenSecurity` other than `"one-time"` is refused (upstream treats every other value as `"none"`, and the runtime's HTTP server would then hand the token to any local process, ADR-016). Cloud mode is never chosen by the SDK; `mode="cloud"` or `defaultMode: "cloud"` works but logs a warning, because the runtime then binds every network interface. Runtime arguments that would undo the instance config (`--path`, `--config-file`, `--res-mode`, `--document-root`, `--enable-server`, `--enable-native-api`, `--enable-extensions`, `--export-auth-info`, `--mode`) are refused. Settings that would break the private instance directory are refused with `ValidationError` as well: `dataLocation` other than `"app"` (the auth token would be exported to a shared per-user directory) and `storageLocation: "app"` (storage would live in the instance directory, which is deleted at shutdown), at top level, under `modes.*` or as `--data-location`/`--storage-location` arguments. `null` for `modes`, `cli`, `logging` or `globalVariables` is refused as well.
914
+
915
+ `app.windows.create()` works only while the application is running; windows still being created when it stops are stopped too. `restart()` may be called while `run()` waits; `run()` then keeps waiting on the new runtime. `request_stop()` is safe from any thread. The blocking `Application` refuses `start()`/`shutdown()`/`restart()` from its own loop thread (an async handler) with `RuntimeError` instead of deadlocking, and Ctrl-C during `start()` stops what was launched.
916
+
917
+ ## Data limits
918
+
919
+ Native messages are limited to 8 MiB (`Limits.max_message_bytes`), RPC messages to 4 MiB, stream items to 256 KiB. For large files use `filesystem.open_file` + `update_opened_file` streaming events, or raise the limit explicitly.
920
+
921
+ ## Loading the page side
922
+
923
+ `python-bridge.mjs` is an ES module and does not bundle the official client. Load the official `neutralino.js` once, call `Neutralino.init()` exactly once, then create one `PythonBackend` per page:
924
+
925
+ - **Script tag (plain HTML).** `<script src="neutralino.js"></script>` defines `window.Neutralino`; `import { PythonBackend } from './python-bridge.mjs'` in a `<script type="module">`, and `new PythonBackend(NL_PYTHON_EXTENSION_ID)` picks up `globalThis.Neutralino`.
926
+ - **ESM / bundler (React, Vue, Svelte).** Copy the files with `neutralino frontend export src/bridge`. It writes `python-bridge.d.mts` next to the `.mjs` so TypeScript resolves the types. The React example does the same copy with its own `npm run prepare-bridge` script. Keep `neutralino.js` as a static asset loaded by a script tag, and import the companion from your sources.
927
+ - **Injection.** Pass the client explicitly: `new PythonBackend(id, { neutralino: myClient })`, for example when the official client is imported as a module (`import * as Neutralino from '@neutralinojs/lib'`) or in tests. The object needs `events.on/off` and `extensions.dispatch/getStats`.
928
+
929
+ Every call's `timeoutMs` and `signal` apply from the moment of the call, including while the handshake is still in progress; a handshake that timed out is retried by the next call. Calls also settle at their deadline, on abort and on `dispose()` when the official `extensions.dispatch()` never settles (it queues messages while the extension is disconnected). `emit()` rejects `TIMEOUT` when the notification is not handed to the runtime within `timeoutMs`, and `DISCONNECTED` on dispose. Strings or keys containing a lone UTF-16 surrogate are rejected with `PROTOCOL_ERROR` before sending, because the runtime cannot parse them. `dispose()` is automatic on `pagehide` and `serverOffline`, safe right after construction (React StrictMode mounts and unmounts at once), and removes every listener the bridge added, including those registered with `backend.on(...)` and those still being registered.
930
+
931
+ ## Packed bundles (resources.neu)
932
+
933
+ `Application(resources="app.neu")` runs the runtime in bundle mode. The runtime then reads `neutralino.config.json` from inside the bundle, not the copy the SDK stages (ADR-015), so the bundle must be built for the SDK: `neutralino build --bundle` packs your config with the required flags and the fixed backend id `org.neutralinopython.backend`, which the SDK uses by default for `.neu` resources. A bundle built otherwise fails at startup with an error naming what its config lacks. The built app's `run.sh`/`run.bat` set `NEUTRALINO_RESOURCES` so the same `app.py` loads `app/resources.neu`. `updater.install()` replaces the bundle the application was started from.
934
+
935
+ # Manual GUI checklist
936
+
937
+ Generated from `reports/manual-checklist.json` by `tools/build_reports.py`. Every item is UNVERIFIED until someone runs it and records the result in the JSON file (`status`, `observed`, `date`, `evidence`).
938
+
939
+ ## MC-PRINT (unverified)
940
+
941
+ Covers: window.print
942
+ Platforms: linux-x11, linux-wayland, windows, macos
943
+
944
+ Steps:
945
+
946
+ 1. From the repository root: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (desktop entries are refused with EXPLORER_DESKTOP_BLOCKED without it)
947
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': window.print
948
+ 3. In the print dialog choose 'Print to File' (PDF) and save it to a temp folder
949
+
950
+ Expected: The system print dialog opens over the app window; the call resolves after the dialog closes; the PDF contains the page.
951
+
952
+ ## MC-WM-STATES (unverified)
953
+
954
+ Covers: window.maximize, window.unmaximize, window.isMaximized, window.minimize, window.unminimize, window.isMinimized, window.setFullScreen, window.exitFullScreen, window.isFullScreen, window.setAlwaysOnTop, window.setBorderless, window.center, window.move
955
+ Platforms: linux-x11, linux-wayland, windows, macos
956
+
957
+ Steps:
958
+
959
+ 1. On a desktop with a window manager, from the repository root: `uv run python examples/api_explorer/app.py` (no opt-in needed: these entries only need their confirmation box)
960
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call', for each window entry in turn
961
+ 3. window.maximize, then window.isMaximized (expect true); window.unmaximize; window.minimize, restore from the taskbar, window.isMinimized (expect false); window.setFullScreen, window.isFullScreen (expect true), window.exitFullScreen; window.setAlwaysOnTop with on_top=true, then false; window.setBorderless with borderless=true, then false; window.move to x=100, y=100; window.center
962
+
963
+ Expected: Each state is visible and the is* getters report it. Under Xvfb (no window manager) the routes run and answer but the states do not change; on Wayland move/center are ignored by the compositor.
964
+
965
+ ## MC-ICON (unverified)
966
+
967
+ Covers: window.setIcon, window.focus
968
+ Platforms: linux-x11, linux-wayland, windows, macos
969
+
970
+ Steps:
971
+
972
+ 1. On a desktop with a window manager, from the repository root: `uv run python examples/multi_window/app.py` (opens the main window and a settings window)
973
+ 2. Put a PNG larger than 1 KiB (e.g. a 64x64 app icon) in `examples/multi_window/frontend/dist/` as `icon.png`; from a Python shell attached to the app, or by adding a temporary `await app.window.set_icon('/icon.png')` after start, set the icon
974
+ 3. Click into the settings window, then call `await app.window.focus()` on the main window and type a key; then focus the settings window with `secondary.focus()` and type a key
975
+
976
+ Expected: The taskbar/title bar shows the new icon. Each focus() call raises that window and keyboard input goes to it alone. Under the private Xvfb (no window manager) no _NET_WM_ICON was observed and only the first focus() took X input focus (2026-12-03), so these are manual.
977
+
978
+ ## MC-DIALOGS (unverified)
979
+
980
+ Covers: os.showOpenDialog, os.showFolderDialog, os.showSaveDialog, os.showMessageBox
981
+ Platforms: linux-kde, linux-gnome, windows, macos
982
+
983
+ Steps:
984
+
985
+ 1. From the repository root: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (desktop entries are refused with EXPLORER_DESKTOP_BLOCKED without it)
986
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': os.showOpenDialog, os.showFolderDialog, os.showSaveDialog (leave default_path empty or use a name inside the temp root shown in the header)
987
+ 3. Pick a file, a folder and a save path in the three dialogs
988
+ 4. os.showMessageBox with title 'Check', content 'Press Yes', choice YES_NO; press Yes, run it again and press No
989
+
990
+ Expected: Native dialogs (kdialog on KDE, zenity on GNOME) appear; selections come back as paths; the message box returns YES / NO. Automated tests prove the routes fire the helper through recording stubs and decode its output.
991
+
992
+ ## MC-NOTIFY (unverified)
993
+
994
+ Covers: os.showNotification
995
+ Platforms: linux-kde, linux-gnome, windows, macos
996
+
997
+ Steps:
998
+
999
+ 1. From the repository root: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (desktop entries are refused with EXPLORER_DESKTOP_BLOCKED without it)
1000
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': os.showNotification with title 'Hello', content 'From the explorer', icon INFO
1001
+
1002
+ Expected: A desktop notification appears. Automated tests prove the helper is invoked with the title and body.
1003
+
1004
+ ## MC-TRAY (unverified)
1005
+
1006
+ Covers: os.setTray
1007
+ Platforms: linux-kde, linux-gnome+appindicator, windows, macos
1008
+
1009
+ Steps:
1010
+
1011
+ 1. From the repository root: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (desktop entries are refused with EXPLORER_DESKTOP_BLOCKED without it)
1012
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': os.setTray with menu_items [{"id": "one", "text": "One"}, {"id": "two", "text": "Two"}] (leave icon empty or give a .png path inside the temp root)
1013
+ 3. Click 'One' in the panel's tray menu and watch the Event monitor
1014
+
1015
+ Expected: Tray icon visible; clicking an item emits trayMenuItemClicked with its id. Automated runs (no session bus) only prove the route answers.
1016
+
1017
+ ## MC-OPEN (unverified)
1018
+
1019
+ Covers: os.open
1020
+ Platforms: linux, windows, macos
1021
+
1022
+ Steps:
1023
+
1024
+ 1. From the repository root: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (desktop entries are refused with EXPLORER_DESKTOP_BLOCKED without it)
1025
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': os.open with url https://neutralino.js.org
1026
+
1027
+ Expected: The default browser opens the URL. Automated tests prove xdg-open is invoked with the URL (stub).
1028
+
1029
+ ## MC-TRASH-HOME (unverified)
1030
+
1031
+ Covers: os.trashItem
1032
+ Platforms: linux, windows, macos
1033
+
1034
+ Steps:
1035
+
1036
+ 1. From the repository root: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (desktop entries are refused with EXPLORER_DESKTOP_BLOCKED without it)
1037
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': filesystem.writeFile with path trash-test.txt and data 'trash me' (the path is relative to the temp root shown in the header; the explorer refuses paths outside it, so ~/... cannot be used)
1038
+ 3. os.trashItem with path trash-test.txt
1039
+ 4. Open the desktop trash in the file manager, check trash-test.txt is there with its original location `<temp root>/trash-test.txt`, and restore it before closing the explorer (the temp root is deleted at shutdown)
1040
+ 5. Back in the explorer: filesystem.readFile with path trash-test.txt returns 'trash me'
1041
+
1042
+ Expected: The file shows up in the user's desktop trash with its original location inside the explorer temp root and can be restored. Automated tests prove the freedesktop trash layout inside a sandbox XDG_DATA_HOME.
1043
+
1044
+ ## MC-DRAG (unverified)
1045
+
1046
+ Covers: window.beginDrag, window.setDraggableRegion, window.unsetDraggableRegion
1047
+ Platforms: linux-x11, linux-wayland, windows, macos
1048
+
1049
+ Steps:
1050
+
1051
+ 1. No example has a draggable region, so scaffold one: `uv run neutralino init <tmp>/mc-drag`
1052
+ 2. In `<tmp>/mc-drag/neutralino.config.json` add `"borderless": true` to `modes.window` (its nativeAllowList already allows window.*)
1053
+ 3. In `<tmp>/mc-drag/frontend/index.html` add, as the first child of `<main>`: `<div id="drag-strip">Drag here <button id="drag-keep" type="button">Release region</button></div>`
1054
+ 4. In `<tmp>/mc-drag/frontend/app.js`, right after `Neutralino.init();`, add: `Neutralino.window.setDraggableRegion('drag-strip', { exclude: ['drag-keep'] }); document.getElementById('drag-keep').addEventListener('click', () => Neutralino.window.unsetDraggableRegion('drag-strip'));`
1055
+ 5. From the repository root: `uv run python <tmp>/mc-drag/app.py`
1056
+ 6. Drag the window by the 'Drag here' strip; click 'Release region'; try to drag the strip again
1057
+
1058
+ Expected: The borderless window follows the pointer while the strip is dragged; the excluded button stays clickable and does not start a drag; after 'Release region' (unsetDraggableRegion) dragging the strip no longer moves the window.
1059
+
1060
+ ## MC-DROP (unverified)
1061
+
1062
+ Covers: filesDropped
1063
+ Platforms: linux, windows, macos
1064
+
1065
+ Steps:
1066
+
1067
+ 1. The explorer takes config only through `create_app(config=...)`. From the repository root run: `uv run python -c "import asyncio, runpy; m = runpy.run_path('examples/api_explorer/app.py'); asyncio.run(m['create_app'](config={'modes': {'window': {'emitDropEvents': True}}}).run())"`
1068
+ 2. Drag two files from the desktop file manager onto the explorer window
1069
+
1070
+ Expected: filesDropped appears in the Event monitor (source native) with both paths.
1071
+
1072
+ ## MC-MENU-MACOS (unverified)
1073
+
1074
+ Covers: window.setMainMenu
1075
+ Platforms: macos
1076
+
1077
+ Steps:
1078
+
1079
+ 1. On macOS, from the repository root: `uv run python examples/api_explorer/app.py` (no opt-in needed: these entries only need their confirmation box)
1080
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': window.setMainMenu with menu [{"id": "file", "text": "File", "menuItems": [{"id": "hello", "text": "Hello"}]}]
1081
+ 3. Click File > Hello in the menu bar and watch the Event monitor
1082
+
1083
+ Expected: The menu bar shows the items; mainMenuItemClicked arrives with id hello. Linux is covered by MC-MENU-LINUX.
1084
+
1085
+ ## MC-MENU-LINUX (unverified)
1086
+
1087
+ Covers: window.setMainMenu
1088
+ Platforms: linux-x11, linux-wayland
1089
+
1090
+ Steps:
1091
+
1092
+ 1. On a Linux desktop, from the repository root: `uv run python examples/api_explorer/app.py` (no opt-in needed: window.setMainMenu only needs its confirmation box)
1093
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': window.setMainMenu with menu [{"id": "file", "text": "File", "menuItems": [{"id": "hello", "text": "Hello"}]}]
1094
+ 3. Click File > Hello in the GTK menu bar and watch the Event monitor
1095
+
1096
+ Expected: A GTK menu bar with File > Hello appears above the page (upstream v6.11.0 inserts it on Linux, window.cpp setMainMenu); clicking Hello emits mainMenuItemClicked with id hello in the Event monitor.
1097
+
1098
+ ## MC-INPUT-LIVE (unverified)
1099
+
1100
+ Covers: computer.setMousePosition, computer.sendKey, computer.setMouseGrabbing
1101
+ Platforms: linux-x11, windows, macos
1102
+
1103
+ Steps:
1104
+
1105
+ 1. Only in an isolated VM: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (input simulation is refused without it)
1106
+ 2. In the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': computer.setMousePosition with x=100, y=100
1107
+ 3. Select computer.sendKey, type 38 into `key`, tick the confirmation box, click into the empty `state` field and press Enter: that submits the form and leaves the cursor in `state`
1108
+
1109
+ Expected: The pointer moves to (100,100); the key's character appears in the `state` field (on X11, keycode 38 is 'a' with a US layout). Verified automatically inside the private Xvfb display; under Wayland sendKey/setMousePosition return errors by design.
1110
+
1111
+ ## MC-CLIPBOARD-LIVE (unverified)
1112
+
1113
+ Covers: clipboard.writeText, clipboard.readText, clipboard.writeImage, clipboard.readImage, clipboard.writeHTML, clipboard.readHTML, clipboard.clear, clipboard.getFormat
1114
+ Platforms: linux-x11, linux-wayland, windows, macos
1115
+
1116
+ Steps:
1117
+
1118
+ 1. From the repository root: `EXPLORER_ALLOW_DESKTOP=1 uv run python examples/api_explorer/app.py` (desktop entries are refused with EXPLORER_DESKTOP_BLOCKED without it); clipboard writes are desktop entries, reads only need confirmation
1119
+ 2. Copy an image in an image viewer, then in the explorer, type the entry id into 'Filter entries' and select it; tick 'I confirm this call may change state' before 'Run through explorer_call': clipboard.getFormat (expect image), clipboard.readImage with format rgba
1120
+ 3. clipboard.writeText with data 'neutralino clipboard check', paste into a text editor
1121
+ 4. clipboard.writeHTML with data `<b>bold</b>`, clipboard.readHTML; clipboard.clear, clipboard.getFormat
1122
+
1123
+ Expected: Image dimensions and pixels match; pasted text matches. Automated tests cover the same routes inside the private Xvfb clipboard.
1124
+
1125
+ # Packaging and installing apps
1126
+
1127
+ Two build modes, both from `neutralino build` (exact syntax: [cli.md](cli.md)).
1128
+ Neither needs Node or network at install or run time; neither is a single
1129
+ executable or a signed installer.
1130
+
1131
+ | | portable (default) | managed (`--mode managed`) |
1132
+ |---|---|---|
1133
+ | Output | directory `dist/<slug>/` | directory `dist/<slug>-managed/` with `install.sh` |
1134
+ | Python at run time | the target machine's Python 3.11+ (`$PYTHON`, else `python3`) | an app-specific venv created at install time from that machine's CPython X.Y |
1135
+ | Third-party packages | pure-Python only, copied with `--vendor NAME` from this environment | any wheels (compiled too) pinned with hashes, for the target ABI/platform |
1136
+ | Install step | none: unpack/copy and run `run.sh` | `install.sh` → versioned install, launcher, menu entry |
1137
+ | Needs `app.toml` | no (recorded when present) | yes (`id`, `name`, `version`, `entry`) |
1138
+
1139
+ ## `app.toml`
1140
+
1141
+ Written by `neutralino init --template ...`; read by `neutralino build` and by
1142
+ `neutralino.updates`. Unknown sections or keys are errors.
1143
+
1144
+ ```toml
1145
+ [app]
1146
+ id = "org.example.inventory" # [A-Za-z0-9][A-Za-z0-9_.]{0,127}, same rule as ui.Application(app_id=)
1147
+ name = "Inventory"
1148
+ version = "1.2.0" # SemVer 2.0.0
1149
+ entry = "app.py" # relative to the project
1150
+
1151
+ [updates] # optional; only with init --updates github --repo owner/name
1152
+ enabled = true
1153
+ provider = "github"
1154
+ repository = "owner/name"
1155
+ auth = "auto"
1156
+ channel = "stable"
1157
+ check_on_startup = true
1158
+ check_interval_hours = 24
1159
+ silent_on_failure = true
1160
+ activation = "next-start"
1161
+ keep_versions = 2
1162
+
1163
+ [package] # optional
1164
+ requirements = "requirements.txt" # --mode managed
1165
+ python = ">=3.11" # --mode managed
1166
+ exclude = ["tests", "docs/*.png"] # every build kind and release: left out
1167
+ ```
1168
+
1169
+ ## What a build ships (both modes)
1170
+
1171
+ Sources are walked from the project folder without following links:
1172
+
1173
+ * shipped: the entry and the project's other files, including the app's own
1174
+ CSS/JS/asset files (`components/*.mjs`, `styles.css`, `driver.mjs` ...) and
1175
+ `app.toml`;
1176
+ * left out (recorded in `manifest.json` under `excluded`): hidden files and
1177
+ folders (`.git`, `.env`, `.venv`, `.pytest_cache`, `.npmrc` ...), any folder
1178
+ holding `pyvenv.cfg`, `venv`, `node_modules`, `__pycache__`, `dist`/`build`
1179
+ outside the frontend folder, `*.pyc`, key files (`*.pem`, `*.key`, `*.p12`,
1180
+ `*.pfx`, `*.jks`, `*.keystore`, `id_rsa` ...), and whatever the project's
1181
+ `[package].exclude` patterns name (reason `app.toml exclude`);
1182
+ * refused (exit 3): a link leaving the project, a symlinked directory, a
1183
+ dangling link, FIFOs/sockets/devices, `--app` outside the project, building
1184
+ the home directory or `/` itself.
1185
+
1186
+ `[package].exclude` in `app.toml` is the project's own exclude list. It
1187
+ applies to the portable build, `--mode managed` and `neutralino release`
1188
+ alike (the same file walk decides for all three). Each entry is a relative
1189
+ POSIX glob (`fnmatch`: `*`, `?`, `[...]`; `*` also matches `/`; case-sensitive)
1190
+ matched against the path from the project folder; a matching folder is left
1191
+ out with everything in it. `"tests"` drops the top-level `tests/` folder,
1192
+ `"*.psd"` every `.psd` file at any depth, `"docs/*.png"` the PNGs under
1193
+ `docs/`. Patterns starting with `/`, containing `\`, or with empty, `.` or
1194
+ `..` parts are errors, and so is a pattern that would exclude `app.toml`, the
1195
+ entry point (`[app].entry`, or `--app`) or the `--frontend` folder. The
1196
+ default exclusions above always apply.
1197
+
1198
+ Layout:
1199
+
1200
+ ```
1201
+ runtime/neutralino-<platform> pinned official binary (hash checked after copy)
1202
+ app/ the project files above (resources.neu with --bundle)
1203
+ vendor/neutralino, websockets the SDK, pure Python; includes the prebuilt UI renderer
1204
+ (vendor/neutralino/_data/renderer, every file checked
1205
+ against its manifest.json digests while building)
1206
+ vendor/<--vendor packages>
1207
+ boot.py, run.sh, run.bat fixed bootstrap and launchers (read manifest.json)
1208
+ licenses/ runtime, client, SDK, websockets and vendored licences
1209
+ manifest.json sdk/runtime/client versions, platform, entry, mode,
1210
+ app (from app.toml), ui (renderer build and digest),
1211
+ distributions and licences, excluded paths
1212
+ checksums.txt SHA-256 of every other file
1213
+ ```
1214
+
1215
+ At run time `ui.Application` stages the renderer plus the app's CSS/JS into a
1216
+ content-addressed folder in the per-user cache
1217
+ (`$XDG_CACHE_HOME/neutralino-python/ui-stage/`), verifying every renderer file
1218
+ again; the build directory itself is never written. A cached stage is reused
1219
+ only if every file still has its expected SHA-256; a missing or damaged file
1220
+ makes the app rebuild the stage and swap it in atomically. Each running app
1221
+ holds an in-use lock on its stage (`ui-stage/.inuse/`), and cache pruning
1222
+ (stages unused for 7 days beyond the newest 8) skips locked stages.
1223
+
1224
+ The build is staged in a temporary sibling folder and swapped into place only
1225
+ when complete; a previous build at `--out` is replaced only if it is
1226
+ recognisably one (manifest + checksums), otherwise the build refuses.
1227
+
1228
+ ## Portable mode
1229
+
1230
+ ```sh
1231
+ neutralino build # -> dist/<slug>/
1232
+ dist/<slug>/run.sh # or run.bat on Windows; PYTHON=python3.12 to choose
1233
+ ```
1234
+
1235
+ Imports are checked statically: anything that is not the standard library,
1236
+ the app's own modules, `neutralino`/`websockets` or a `--vendor`ed package
1237
+ fails the build. Compiled extensions cannot be vendored; use managed mode.
1238
+
1239
+ ## Managed mode
1240
+
1241
+ ```sh
1242
+ neutralino build --mode managed # pip download for this machine
1243
+ neutralino build --mode managed --python-version 3.12 # another CPython on the target
1244
+ neutralino build --mode managed --wheelhouse ./wheels # offline, wheels you provide
1245
+ dist/<slug>-managed/install.sh # on the target machine
1246
+ ```
1247
+
1248
+ ### Requirements and wheels
1249
+
1250
+ * `requirements.txt` (or `[package].requirements`, or `--requirements`) lists
1251
+ every package, transitive ones included, as `name==version` with one or
1252
+ more `--hash=sha256:...` (for example `uv pip compile --generate-hashes`,
1253
+ `pip-compile --generate-hashes`, or `uv export --format requirements-txt`
1254
+ without environment markers). Options (`-r`, `-e`, `--index-url`), URLs,
1255
+ paths, ranges and environment markers are refused.
1256
+ * Without `--wheelhouse`, the build runs `pip download --only-binary=:all:
1257
+ --implementation cp --python-version X.Y --abi cpXY --abi abi3 --abi none
1258
+ --platform <tags> --require-hashes` (the only network step; the pip found is
1259
+ this Python's, `pythonX.Y`'s or `python3`'s, else one bootstrapped offline
1260
+ with `ensurepip` into a throw-away venv). No sdist is ever built.
1261
+ * Every wheel (downloaded or from `--wheelhouse`) is then checked: one wheel
1262
+ per requirement with the same name and version, tags compatible with the
1263
+ target (`cpXY-cpXY`, `cp3Y-abi3` for Y <= X.Y, `py3-none`, platform in the
1264
+ target tags or `any`), and its SHA-256 among the requirement's hashes.
1265
+ Otherwise exit 3: *wrong ABI or platform* (naming the wheel and the
1266
+ target), *hash mismatch*, or *no wheel for name==version*. Unrelated wheels
1267
+ in a `--wheelhouse` are ignored.
1268
+ * The bundle holds `wheelhouse/` (the chosen wheels only),
1269
+ `requirements.lock.txt` (each requirement with the hash of its chosen
1270
+ wheel), and `manifest.json` `target` (python, abi, machine, platform tags)
1271
+ and `wheels` (file, name, version, sha256, import names).
1272
+
1273
+ ### Installing
1274
+
1275
+ `install.sh [--reinstall] [--no-desktop]` runs `install.py` (fixed text, same
1276
+ in every bundle) with `$PYTHON`, else `python3`; if that is not CPython X.Y of
1277
+ the target and `pythonX.Y` is on `PATH`, it re-executes with that. It:
1278
+
1279
+ 1. refuses (exit 3) another interpreter version, another machine, a wheel
1280
+ whose platform this glibc cannot run, a file that does not match
1281
+ `checksums.txt`, or a launcher or menu entry name already used by a file
1282
+ it did not write; refuses (exit 4) a non-Linux system;
1283
+ 2. takes `<data>/install.lock` without waiting (exit 1 if another install or
1284
+ update holds it), copies the bundle to
1285
+ `<data>/versions/.staging-*`, creates `venv/` there with
1286
+ `python -m venv` and runs
1287
+ `venv/bin/python -m pip install --no-index --find-links <bundle>/wheelhouse
1288
+ --require-hashes --only-binary=:all: -r requirements.lock.txt` with
1289
+ `PIP_CONFIG_FILE=/dev/null` and every other `PIP_*`/`PYTHON*` variable
1290
+ removed (no index, no network); a venv without wheels is created
1291
+ `--without-pip`;
1292
+ 3. renames the staging folder to `<data>/versions/<version>/` (an existing
1293
+ one only with `--reinstall`, by renaming it aside and the new one in, and
1294
+ never while the app runs: exit 1 if `<data>/.launch.lock` is held;
1295
+ otherwise the version is left as it is);
1296
+ 4. writes `<data>/current.json` atomically, in the updater's pointer format
1297
+ (schema 1): `{"schema": 1, "current": "<version>", "previous": "<previous
1298
+ current or null>", "pending": null, "staged": null, "trial": null,
1299
+ "quarantined": [...]}` (an explicit install is trusted: no trial; a pending
1300
+ update is dropped; the installed version leaves the quarantine list; the
1301
+ old pointer is kept as `current.json.bak`);
1302
+ 5. copies the update launcher (`vendor/neutralino/updates/_layout.py`) to
1303
+ `<data>/launcher.py` and writes the command `~/.local/bin/<app-id>`, which
1304
+ runs `python -I <data>/launcher.py --app-dir <data> -- ARGS`: the launcher
1305
+ applies pending/trial/rollback (see [updates.md](updates.md)) and execs
1306
+ `versions/<current>/venv/bin/python -I versions/<current>/boot.py`; then
1307
+ the menu entry `<data_home>/applications/<app-id>.desktop` (unless
1308
+ `--no-desktop`), `<data>/install.json` and a copy of `uninstall.py`.
1309
+
1310
+ Exit codes: 0 ok, 1 venv/pip failed, 2 usage, 3 wrong package or interpreter,
1311
+ 4 environment (not Linux, no `ensurepip`: Debian/Ubuntu `python3-venv`).
1312
+
1313
+ ### Installed paths (Linux)
1314
+
1315
+ | What | Path |
1316
+ |---|---|
1317
+ | install root, `<data>` | `$XDG_DATA_HOME/<app-id>` (default `~/.local/share/<app-id>`) |
1318
+ | versions | `<data>/versions/<semver>/` (`app/`, `runtime/`, `vendor/`, `venv/`, `boot.py`, `manifest.json`, `checksums.txt`, `licenses/`) |
1319
+ | pointer | `<data>/current.json` |
1320
+ | command | `~/.local/bin/<app-id>` (starts `<data>/launcher.py`) |
1321
+ | launcher | `<data>/launcher.py` (+ `launcher.log`, `.launch.lock` while running) |
1322
+ | menu entry | `$XDG_DATA_HOME/applications/<app-id>.desktop` |
1323
+ | uninstaller | `<data>/uninstall.py` |
1324
+ | app data | `ui.Application(...).paths`: data `<data>` (beside `versions/`), config `$XDG_CONFIG_HOME/<app-id>`, cache `$XDG_CACHE_HOME/<app-id>`, state/logs `$XDG_STATE_HOME/<app-id>` |
1325
+
1326
+ The app's own files never live inside `versions/`, so installing, upgrading or
1327
+ removing a version does not touch them. Older versions are kept (the updater,
1328
+ `neutralino.updates`, prunes per `keep_versions`); a new install records the
1329
+ old one as `previous`. Rolling back application data is not automatic: an app
1330
+ that migrates its data must declare compatibility and keep its own backups.
1331
+
1332
+ ### Uninstalling
1333
+
1334
+ ```sh
1335
+ python3 ~/.local/share/<app-id>/uninstall.py # or <bundle>/uninstall.sh
1336
+ python3 ~/.local/share/<app-id>/uninstall.py --purge
1337
+ ```
1338
+
1339
+ Refuses (exit 1) while the application runs (it holds `<data>/.launch.lock`)
1340
+ or another install or update holds `<data>/install.lock`, before removing
1341
+ anything. Removes the command and menu entry (only if they carry this installer's
1342
+ marker) and, in `<data>`, exactly the managed names shared with the updater
1343
+ and the release installer (`versions/`, `staging/`, `quarantine/`, `current.json`, `current.json.bak`,
1344
+ `launcher.py`, `launcher.log`, `launcher.log.1`, `.launch.lock`,
1345
+ `install.json`, `uninstall.py`, `install.lock`). The app's data, config,
1346
+ cache and state stay (and are listed as kept); `--purge` removes `<data>`, `$XDG_CONFIG_HOME/<app-id>`,
1347
+ `$XDG_CACHE_HOME/<app-id>` and `$XDG_STATE_HOME/<app-id>` too. Links are
1348
+ removed, never followed.
1349
+
1350
+ ## Dependencies on the target machine
1351
+
1352
+ * Portable: Python 3.11+ (`python3` or `$PYTHON`), the WebView libraries
1353
+ (Debian/Ubuntu: `libwebkit2gtk-4.1-0`; Fedora: `webkit2gtk4.1`), a desktop
1354
+ session (X11 or XWayland). `neutralino doctor` checks them.
1355
+ * Managed: CPython of exactly the target version (`--python-version`) with
1356
+ `venv`/`ensurepip` (Debian/Ubuntu: `python3-venv`), glibc new enough for the
1357
+ bundled wheels' manylinux tags, the same WebView libraries.
1358
+
1359
+ ## Limitations
1360
+
1361
+ * Tested end to end on Linux x86_64 only (Debian 13, glibc 2.41, CPython 3.12
1362
+ and 3.13): template builds started Node-free in a network namespace, managed
1363
+ install of a real NumPy wheel offline, then the app launched on the pinned
1364
+ runtime under Xvfb. Windows and macOS are untested here: `run.bat` exists
1365
+ for portable builds, but managed installs refuse non-Linux systems, and
1366
+ `--platform` accepts Linux tags only (manylinux/musllinux/linux_<arch>;
1367
+ musl systems are refused by the installer's glibc check).
1368
+ * No interpreter is bundled; the target's CPython must match the build's
1369
+ `--python-version`.
1370
+ * No signature: integrity is SHA-256 (`checksums.txt`, wheel hashes), not
1371
+ authenticity. Distribute bundles over a channel you trust.
1372
+ * Environment markers in requirements are not evaluated; export the lock for
1373
+ the target.
1374
+ * Updates of a managed install need managed releases (`neutralino release
1375
+ --mode managed`): the updater builds each new version's venv from the
1376
+ release's wheelhouse offline and refuses a release without one.
1377
+
1378
+ # Performance (measured baseline, Linux x86_64)
1379
+
1380
+ Measured once on one machine: Debian 13 x86_64, WebKitGTK 4.1, private Xvfb, pinned runtime v6.11.0 (ADR-013). No universal guarantee is implied.
1381
+
1382
+ Provenance: the latency figures below come from an uncommitted scratch timing script run on that machine, plus the e2e harness. They are not reproducible from this repository and no recorded artifact holds them. Only the 10,000-item stream time is backed by a recorded test (`tests/e2e/test_rpc_page.py`, about 30.8 s in `reports/test-results/pytest-results.json`); that test asserts only that a page call during the stream answers within 2 s. **No memory baseline was measured** (specs/09 asks for one); memory use is unverified.
1383
+
1384
+ | Path | Cost |
1385
+ |---|---|
1386
+ | Python -> native call (sequential) | 0.22 ms |
1387
+ | Python `app.broadcast` (concurrent) | 0.32 ms each |
1388
+ | Python -> page -> Python RPC call | ~44 ms |
1389
+ | page -> Python call during a 10k stream | <= 90 ms |
1390
+ | 10,000-item stream, default credit | 30 s (batched credit), 60 s without batching |
1391
+
1392
+ The page round trip is dominated by the runtime's missing `TCP_NODELAY` on its WebSocket server: a second runtime->page write waits for the page's delayed ACK. Native calls from Python are unaffected. For bulk data send fewer, larger items (up to 256 KiB each), or raise the stream credit (`{credit: 64}` in JS).
1393
+
1394
+ # Platforms
1395
+
1396
+ | Platform | Status | Notes |
1397
+ |---|---|---|
1398
+ | Linux x86_64, X11 code path | verified under a private Xvfb only | the full test suite runs on a private Xvfb display (`GDK_BACKEND=x11`); a real X11 desktop session was not available |
1399
+ | Linux x86_64, KDE Plasma Wayland | smoke-verified | `tests/e2e/test_wayland_smoke.py` (launch, title, RPC round trip, second window, clean exit) passed under KDE's `kwin_wayland --virtual` on Debian 13 (WebKitGTK 2.54.3), and earlier once on a live KDE session (`reports/test-results/wayland-smoke.json`). The manual GUI checklist has not been run |
1400
+ | Linux x86_64, GNOME Wayland | not verified | never run |
1401
+ | Linux arm64 / armhf | not verified | official binaries exist; CI workflow provided |
1402
+ | Windows Server 2022 x64 (Windows 11 expected the same) | unit- and smoke-verified | the test suite passes there (tests that need the Linux/Xvfb harness or POSIX behaviour are skipped with a reason); a real window on the stock runtime and WebView2 ran page-to-Python RPC, two windows and a clean exit; Python UI examples and a portable `neutralino build` render. Not verified: `run.bat` (needs the `py` launcher), tray, dialogs, notifications, clipboard, the native UI suite. Managed install and update apply are Linux-only. WebView2 required |
1403
+ | macOS arm64 / x64 | not verified | official binaries exist |
1404
+ | Windows arm64 | unsupported | no official runtime binary |
1405
+
1406
+ Linux runtime packages (Debian/Ubuntu names): `libwebkit2gtk-4.1-0`, `libgtk-3-0`, `libayatana-appindicator3-1` (tray), and one of `zenity`/`kdialog`/`qarma`/`matedialog` (file and message dialogs and notifications: upstream runs these helpers through portable-file-dialogs; libnotify is not used). `neutralino doctor` reports what is missing. `window.set_main_menu` adds a GTK menu bar above the webview; `window.set_badge` is accepted but does nothing on Linux/FreeBSD. Exact commands for the unverified platforms are in `reports/platform-matrix.json`.
1407
+
1408
+ Python: 3.11 is the minimum (unit and protocol suites pass on 3.11.18); the locked 3.13 runs the full gate. On Windows the `tzdata` package (a dependency there) supplies the time zones for `ui.DateTimePicker`. Evidence for this table: `maintenance/compatibility.json` and `reports/consolidation/p09/platforms/`.
1409
+
1410
+ # Security model
1411
+
1412
+ Measured behaviour and limits are recorded in `reports/security.md`; this page is the user-facing summary.
1413
+
1414
+ - **Trust domain.** The runtime, every page it serves and the Python backend are one trust domain. RPC peer ids route messages; they do not authenticate anyone. Do not load untrusted remote content into a window that has the native API.
1415
+ - **Same privileges as the page.** Upstream applies `nativeAllowList`, `nativeBlockList`, `commandAllowList` and `filesystemScopes` to the Python extension connection exactly like to the page (ADR-006). Keep the allow list minimal; do privileged work in exposed Python functions that validate their inputs.
1416
+ - **Least-privilege default allow list.** `Application(resources=...)` without a config and without `native_allow_list=` sets `nativeAllowList` to the SDK minimum only: `app.broadcast`, `extensions.getStats` (the backend session), `extensions.dispatch` (page -> Python calls) and `app.exit` (graceful stop). Because the same list applies to the Python backend (ADR-006), Python's own native calls (`app.computer.get_arch()`, `app.window.set_title()`, ...) need their routes too: `native_allow_list=[...]` adds them to the minimum, and `native_allow_list="*"` opts in to upstream's everything-allowed behaviour. A config that sets its own `nativeAllowList`/`nativeBlockList` is used as written (it must still allow the SDK routes). Add `filesystemScopes` when you touch files and give every page a restrictive Content-Security-Policy.
1417
+
1418
+ `filesystemScopes` maps a folder to `"read"`, `"write"` or `"read-write"` (exactly these; the SDK refuses other values, which upstream would silently ignore and so deny every path). Keys may use upstream's path constants (`${NL_PATH}`, `${NL_OSHOMEPATH}`, ...); there are no globs: a scope covers the folder and everything below it. Once the key is set, every `filesystem.*` path outside the scopes fails with `NE_FS_SCOPERR`, for the page and for Python alike:
1419
+
1420
+ ```python
1421
+ app = ui.Application(
1422
+ title="Files",
1423
+ profile="custom",
1424
+ native_allow_list=[*ui.profile_routes("restricted"), "filesystem.readFile"],
1425
+ config={"filesystemScopes": {str(root): "read-write", "${NL_OSHOMEPATH}/Documents": "read"}},
1426
+ )
1427
+ ```
1428
+
1429
+ (`config=` is passed through to the core `neutralino.Application`; tested by `test_ui_app_filesystem_scopes_through_config`.) `neutralino init` scaffolds both. (ADR-017 as amended; checked by `tests/unit/ui/test_ui_security.py::test_no_profile_keeps_core_defaults_and_explicit_lists`.)
1430
+ - **Only explicit functions.** The frontend can call only functions you exposed. The SDK has no eval and no generic native proxy for pages.
1431
+ - **Credentials.** The runtime token and connect token stay in memory, never in argv, environment, logs or `repr`. For SDK-launched runtimes the instance directory is private (0700 / user-only ACL on Windows), the exported auth file is created with umask 077 (0600) and deleted after connecting. Tokens are also kept out of traceback locals (for locals-capturing crash reporters). `AsyncClient.from_auth_file` refuses symlinks, non-regular files, files owned by another user, other-writable files, and group-writable files outside a private directory (`CredentialsError`). It does not delete the file; whoever started the runtime removes it. The runtime itself also hands the token out over HTTP (next point).
1432
+ - **Local server (upstream limitation, ADR-016).** In window, browser and chrome modes the runtime listens on 127.0.0.1 only. Beyond that, upstream v6.11.0 protects little:
1433
+ - The Host check (localhost/127.0.0.1), the connect token and the extension id are checked only on WebSocket upgrades. `Origin` is never checked.
1434
+ - The HTTP server that serves your pages accepts any Host and does not normalise the path: `..%2f`, `%2e%2e%2f`, `%2e%2e/` and plain `../` in a raw request all leave the document root (a browser or curl without `--path-as-is` normalises the last two before sending; a raw client does not). Any local process, of any user, that finds the port can read every file the app's user can read, for as long as the app runs. Re-measured for P05.04: `reports/consolidation/p05/security/adr016-investigation.md`.
1435
+ - `/__neutralino_globals.js` contains the access token. With the default `tokenSecurity: "one-time"` the first requester gets it: in window mode that is normally the app's own page, and the token is not served again afterwards. In browser mode the token is served to anyone who asks before the user's browser loads the page. With `tokenSecurity: "none"` it is served to everyone, always. Whoever holds the token can open a WebSocket from any Origin and call every native route the config allows.
1436
+
1437
+ The SDK cannot fix this without forking the runtime. It keeps `tokenSecurity: "one-time"` and window mode by default, and its config check refuses every `tokenSecurity` other than `"one-time"` (upstream treats any other value as `"none"`). Prefer window mode. Treat any other local user as able to read your files while the app runs, and do not run SDK apps on shared multi-user machines with data other users must not see.
1438
+ - **Cloud mode** binds 0.0.0.0 and skips the Host check, so the file exposure above reaches the whole network. The SDK never selects it (including `doctor --smoke`, which uses a hidden window); an explicit `mode="cloud"` works but logs a warning.
1439
+ - **Desktop helpers.** `os.exec_command`/`spawn_process` run the command string through `/bin/sh -c`. `commandAllowList` is not a shell filter: upstream checks only the first token. It refuses shell metacharacters (`;`, `|`, `&`, `$`, backticks, ...) only outside quotes, and an empty list allows everything. Measured natively with `commandAllowList: ["echo"]`: `echo "$(id -u)"` passed and printed the user id; `echo '$(id -u)'` printed the text literally; unquoted `echo $(id -u)` was refused (`NE_OS_CMDNALW`). Never build a command string from untrusted input, quoted or not. Run fixed commands you control, or do the work in Python.
1440
+ - **Child processes outlive the app.** Upstream starts each `os.spawn_process` / `os.exec_command(background=True)` child in its own process group (`setpgid`) and does not stop it when the runtime exits. `Application.shutdown()` stops the runtime it owns, not these children. Stop them yourself before shutdown: `await client.os.update_spawned_process(p["id"], "exit")` for each `p` in `await client.os.get_spawned_processes()`. Background `exec_command` children are not in that list (the result carries only their `pid`), so prefer `spawn_process` for anything long-running. Upstream's `exit` sends SIGINT to the child's process group: a program that ignores SIGINT, or that moves itself into another group or session, keeps running, and the runtime does not track it.
1441
+ - **Owned runtimes.** The SDK signals only the runtimes it launched, through their process handles. On Linux, if the Python process is killed (even with SIGKILL) its runtimes go down with it (`PR_SET_PDEATHSIG`), and the private instance directory of a dead SDK process is removed on the next SDK start. A forked child of the Python process never stops the parent's runtimes. Windows has no equivalent yet (unverified there). Children the runtime spawned (previous point) are not covered.
1442
+ - **File modes.** SDK-launched runtimes (`Application`, managed windows) run with umask 077, so files the app creates through native APIs (`filesystem.write_file`, `create_directory`, `window.snapshot`, children of `exec_command`) are 0600 and directories 0700. Call `filesystem.set_permissions` or `chmod` if other users or groups must read them. Runtimes that start Python as an extension keep the umask they were started with.
1443
+ - **Runtime integrity.** Runtime archives and binaries are checked against SHA-256 values in the shipped lock; unsafe archives are rejected. Upstream publishes no signatures, so a hash proves the bytes match the reviewed release, not more.
1444
+
1445
+ ## Native permission profiles (`neutralino.ui`)
1446
+
1447
+ `ui.Application` / `ui.AsyncApplication` take `profile=`:
1448
+
1449
+ | Profile | `nativeAllowList` | Use |
1450
+ |---|---|---|
1451
+ | `"restricted"` | `app.broadcast`, `app.exit`, `extensions.dispatch`, `extensions.getStats`, `window.setTitle` | Default of the `neutralino init` UI templates (`python-ui`, `hybrid`, `react`). What the UI engine needs: start-up, RPC both ways, graceful stop and `Window.set_title`. |
1452
+ | `"trusted"` | `"restricted"` plus the routes of every typed desktop helper (`ui.desktop_routes()`): open/save/folder dialogs, message box, notifications, clipboard text, `os.open`, window geometry, full screen, icon | Trusted apps that use `app.open_file()`, `app.clipboard_text()`, `remember_geometry` and friends. Still no `os.execCommand`, `os.spawnProcess`, `filesystem.*`, `storage.*` or `computer.*`. |
1453
+ | `"custom"` | exactly `native_allow_list=` (plus the SDK minimum), or `"*"` for every route | Anything else, e.g. `profile="custom", native_allow_list=[*ui.profile_routes("restricted"), "os.open"]`. |
1454
+
1455
+ `ui.profile_routes("restricted" | "trusted")` returns the list. `profile=None` (the default) keeps the core rules above unchanged, so existing code with `native_allow_list=` or a config list behaves as before. A fixed profile together with `native_allow_list=`, or with a config that sets its own `nativeAllowList`/`nativeBlockList`, is refused (`ValidationError`): permissions are set in one place. `remember_geometry=True` adds its four `window.*` routes to any profile (an explicit opt-in).
1456
+
1457
+ What a profile is and is not:
1458
+
1459
+ - It is the runtime's single permission policy, and it applies to the page **and** to the Python extension connection (ADR-006). An injected script that calls `Neutralino.os.execCommand(...)` or `Neutralino.filesystem.readFile(...)` gets `NE_RT_NATPRME`; so does Python's own `app.native.os.get_env(...)` under `"restricted"` (`tests/ui/test_security_native.py::test_restricted_profile_runs_the_ui_and_refuses_other_native_routes`).
1460
+ - It is **not** a sandbox for Python. Python code runs with every privilege of its process (files, sockets, subprocesses) regardless of the profile. Keep privileged work in Python functions you wrote, validate their inputs, and expose only those.
1461
+ - It does not fix the runtime's HTTP server (ADR-016, above): any local process that finds the port can read the user's files while the app runs, whatever the profile, and so can script that already runs in the page, with `fetch('/..%2f...')` (measured; the CSP allows same-origin `fetch()` for app data assets). A token holder is limited by the profile: with `"restricted"`, a WebSocket holding the token could call `extensions.getStats` but got `NE_RT_NATPRME` for `os.execCommand` (measured, `test_adr016_runtime_http_server_window_mode`).
1462
+
1463
+ The UI page also has, independently of the profile:
1464
+
1465
+ - **CSP** (`<meta http-equiv="Content-Security-Policy">` in the packaged `index.html`): `default-src 'self'; script-src 'self' 'sha256-<import map>'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws://127.0.0.1:* ws://localhost:*; object-src 'none'; frame-src 'none'; base-uri 'self'; form-action 'none'`. No `unsafe-eval`; `style-src 'unsafe-inline'` is needed for Mantine's CSS variables and style props (ADR-019). Injected inline scripts and inline event handlers, also in `ui.Html(..., trusted=True)`, are blocked and reported as violations. The CSP limits what injected code can load or run; it does not stop code that already runs from calling `Neutralino.*` (only the allow list does).
1466
+ - **Sanitising.** `ui.Html` without `trusted=True`, `ui.Markdown` and `ui.RichTextEditor` remove scripts, `on*` handlers, `javascript:` links, forms and inputs, and `iframe`/`object`/`svg` content before rendering (DOMPurify); their links open in the system browser (`os.open`, so the profile must allow it), never in the app window. Server-driven schemas (`ui.schema`) cannot create `CustomComponent`/`Html(trusted=True)` and bind events only to registered `Actions`.
1467
+ - **Window isolation.** Each window's session is bound to its runtime connection; events, submits and queries with another window's ids, a foreign generation or another window's token are refused (`stale`/`UNSUPPORTED`).
1468
+ - **Resources.** The page is served from a per-app staging directory with only the renderer and the files you added (`add_css_file`, `add_js_module`, `add_asset`, `add_asset_dir`); asset names with `..`, absolute or encoded segments are refused and `add_asset_dir` skips symlinks. This limits what the app *serves*; it does not stop the runtime's traversal (ADR-016).
1469
+ - **Logs.** The runtime token, the connect token and UI payload values are not logged; rejected events are logged by reason only. The runtime's own output lines go to the `neutralino.runtime` logger (stdout at INFO), so an app that configures the root logger (`logging.basicConfig(filename=...)`) also records them, including the private instance path (`/tmp/neutralino-py-*/...`), never a token. To keep them out: `logging.getLogger("neutralino.runtime").setLevel(logging.WARNING)`.
1470
+
1471
+ # Python UI (`neutralino.ui`)
1472
+
1473
+ Build a desktop window in Python only: a typed component tree that the bundled React/Mantine
1474
+ renderer draws, events that come back as Python callbacks. No Node.js is needed to develop, run or
1475
+ build. The complete list of components, props, events and slots is the generated reference
1476
+ `reference/components.md` of the installed docs (also `neutralino components list` and
1477
+ `neutralino components describe NAME`).
1478
+
1479
+ ```python
1480
+ from neutralino import ui
1481
+
1482
+ app = ui.Application(title="Inventory", width=520, height=320, profile="restricted")
1483
+
1484
+
1485
+ @app.page("/")
1486
+ def home() -> None:
1487
+ with ui.Stack(gap="md", p="lg"):
1488
+ name = ui.TextInput(label="Name", value="")
1489
+ status = ui.Text("Ready")
1490
+
1491
+ def save() -> None:
1492
+ status.text = f"Saved {name.value}"
1493
+
1494
+ ui.Button("Save", on_click=save)
1495
+
1496
+
1497
+ if __name__ == "__main__":
1498
+ app.run()
1499
+ ```
1500
+
1501
+ ## Application and pages
1502
+
1503
+ `ui.Application` (blocking) and `ui.AsyncApplication` (`await app.run()`) wrap the core application
1504
+ (`app.native`, see [guide.md](guide.md)). Constructor: `title`, `width`, `height`,
1505
+ `theme="system"`, `app_id`, `remember_geometry`, `profile`, `native_allow_list`, `asset_roots`,
1506
+ `ui_limits`, plus the core options (`resources`, `config`, `limits`, ...). Constructing creates no
1507
+ process and downloads nothing.
1508
+
1509
+ - `app.run()` blocks until the window closes; `start()`, `shutdown()`, `request_stop()` as in the core
1510
+ application. `app.expose()` registers functions a page or custom component can call
1511
+ (neutralino RPC).
1512
+ - **Pages**: `with app.page("/"):` or `@app.page("/route")` builds the tree for a route, once per
1513
+ window. Routes are local; an unknown route shows a "Page not found" page. Move with
1514
+ `ui.current_window().navigate("/other")`.
1515
+ - **Windows**: `app.window("/route", title=..., width=..., height=..., state={...})` opens another
1516
+ window; `app.main_window` is the first. Routes take no parameters (`/folder?path=x` is refused):
1517
+ pass what the window should show as `state=`, which is in its `Window.state` before its page is
1518
+ built, and read it in the builder with `ui.current_window().state`. A `ui.Window` has `notify`,
1519
+ `confirm`, `open_modal`, `navigate`, `set_theme`, `set_title`, `set_fullscreen`, `set_icon`,
1520
+ `state` (free per-window dictionary), `close()` (a secondary window stops; the main window stops
1521
+ the application, as when the user closes it) and `native` (the core window).
1522
+ - **Batching**: `with app.batch():` applies several component changes as one patch: nothing is sent to any window of that application until its outermost batch ends (other applications in the same process are not held back). Blocking calls inside a batch still work.
1523
+ - **Patch recovery**: a failed or rejected patch is retried as one fresh snapshot after a backoff
1524
+ (`ui.UiLimits(patch_backoff=0.1, patch_backoff_max=5.0)`, doubling). After `patch_retries`
1525
+ (default 5) failures in a row the window is stalled (`window.session.stalled`, `patch_state`,
1526
+ `stats["stalls"]`; logged once as an error): it stops sending until the page reloads or
1527
+ resyncs, then gets a fresh snapshot.
1528
+ - **Callbacks**: sync callbacks run on worker threads (they may block), async callbacks on the event
1529
+ loop. The blocking facade raises `RuntimeError` instead of deadlocking when a blocking call is made
1530
+ from the loop thread.
1531
+ - **Page builders run on the event-loop thread** (sync or async): a blocking native call there
1532
+ (`app.native.filesystem.read_directory(...)` with the blocking `Application`) raises that
1533
+ `RuntimeError`. Build the tree with placeholders and fill it from a sync callback or a thread
1534
+ (`table.update(rows=...)`), or use `AsyncApplication` and `await` the call. `app.native` exists
1535
+ only after `start()`/`run()`; touching it at import time raises `StartupError`.
1536
+
1537
+ ## Components and the tree
1538
+
1539
+ PascalCase classes, snake_case keyword arguments, typed and validated against the contract (`UNSET`
1540
+ means "not specified"; `None` is an explicit null only where the contract allows). Every component
1541
+ has `id`, `visible`, `classes`, `styles`, `aria_label`, `update(**props)` (atomic), `on(event,
1542
+ handler)` (returns a disposable subscription), `remove()`, `children`, `focus()`.
1543
+
1544
+ ```python
1545
+ from neutralino import ui
1546
+
1547
+ app = ui.Application(title="Tree", profile="restricted")
1548
+ with app.page("/"):
1549
+ with ui.Stack(gap="sm") as stack: # children attach to the innermost open container
1550
+ ui.Title("Items", order=3)
1551
+ ui.Button("Add")
1552
+ with ui.detached(): # constructed without attaching
1553
+ note = ui.Text("later")
1554
+ note.move_to(stack) # explicit reparent; a component has one parent
1555
+ ```
1556
+
1557
+ Cycles and double attachment are refused. A removed or disposed component rejects further updates.
1558
+ `ui.DataTable(provider=...)` serves big tables in bounded pages; `ui.CustomComponent` mounts your own
1559
+ JavaScript or React adapter ([custom-components.md](custom-components.md)).
1560
+
1561
+ Style props (`p`, `m`, `w`, `h`, `c`, `fw`, `bg` ...) exist only on the components whose contract
1562
+ lists them (`Paper` has `w`, `Select` has not); `neutralino components describe NAME` prints the
1563
+ props and, under `keywords:`, every other keyword the class takes (`on_<event>` handlers, `sync`,
1564
+ `validator`, `styles` ...). `styles={...}` sets inline CSS on any component.
1565
+
1566
+ DataTable details: an editable column's cell enters edit mode on double-click (or Enter/F2 when
1567
+ focused); Enter or leaving the cell commits (`on_cell_edit`), Escape cancels. A provider receives
1568
+ `TableQuery.filters` as `{column key: string}` for both `text` and `select` filters (columns
1569
+ without a value are absent). Row actions show on every row; decide in the handler what an action
1570
+ means for that row.
1571
+
1572
+ ### Testing your app on the real runtime
1573
+
1574
+ `await app.wait_for_window()` (blocking: `app.wait_for_window()`) returns once the page has
1575
+ applied its first tree, so the UI is ready for input; before that a click on the native window can
1576
+ land on the loading spinner and be lost. `Window.on_environment_change(handler)` fires on that first
1577
+ report and later changes. Run the app on a private display (`Xvfb -displayfd`, `GDK_BACKEND=x11`,
1578
+ a private `HOME`/`XDG_*` and `NEUTRALINO_RUNTIME` pointing at the installed runtime), drive it with
1579
+ real input (`xdotool`; without a window manager call `windowfocus` before typing) and assert on
1580
+ effects you can observe from Python: component values (`await comp.fetch_value()`), your own data
1581
+ files and logs. There is no public API to inject a page event from Python.
1582
+
1583
+ ## State and binding
1584
+
1585
+ `ui.State[T]` is an observable value with explicit subscriptions, not a reactive framework.
1586
+
1587
+ ```python
1588
+ from neutralino import ui
1589
+
1590
+ count: ui.State[int] = ui.State(0)
1591
+ label = ui.Text()
1592
+ count.bind(label, "text", lambda n: f"clicked {n}") # one way, now and on every change
1593
+ count.set(1) # equal values do not notify
1594
+ ```
1595
+
1596
+ `bind_value(input)` keeps an input and a state in sync both ways without echo loops; `derive`,
1597
+ `debounced`, `throttled` return read-only states; `persist(app.settings, "key", decode=fn)` saves every
1598
+ change to the atomic JSON settings file. Bindings end when the component is removed or the subscription
1599
+ is disposed.
1600
+
1601
+ **`.value` is the last committed value, not live DOM access.** Inputs commit per `sync`: `change`,
1602
+ `debounce` (after a pause, on blur and before any action) or `blur`. Assigning `value` from Python wins
1603
+ and drops older pending edits. A fresh draft: `await input.fetch_value()` (async code) or
1604
+ `input.get_value()` (worker threads; refuses the loop thread). A form submission always carries the
1605
+ current drafts. A click flushes pending drafts before the click event, so reading `.value` in a
1606
+ button's `on_click` (as the `python-ui` template does) sees what was typed; the warning is about
1607
+ reading it at other moments (timers, other windows, `on_change` of a different input).
1608
+
1609
+ ## Forms and validators
1610
+
1611
+ ```python
1612
+ from neutralino import ui
1613
+ from neutralino.ui import validators as v
1614
+
1615
+ with ui.Form(on_submit=lambda ev: print(ev.values)):
1616
+ ui.TextInput(name="email", label="E-mail", validator=v.all_of(v.required(), v.email()))
1617
+ ui.PasswordInput(name="pw", label="Password", validator=v.length(min=8))
1618
+ ui.PasswordInput(name="again", label="Repeat", validator=v.matches_field("pw"))
1619
+ ui.Button("Create", type="submit")
1620
+ ```
1621
+
1622
+ - Fields are the named value components inside the form; `ui.Field` and `ui.FieldList` nest paths
1623
+ (`address.city`, `lines.0.qty`). Hidden fields are neither validated nor submitted
1624
+ (`form.show_when(component, lambda values: ...)`). Overlapping paths (a field `a` next to
1625
+ `a.b`, a field `lines.x` or `lines.0` beside a FieldList `lines`) raise `ValidationError` naming
1626
+ both paths.
1627
+ - Submit validates types, declared constraints (`min`/`max`, `max_length`, date bounds, FieldList
1628
+ `min_items`/`max_items`), `required`, field validators (`validator(value)` or `validator(value,
1629
+ values)`, sync or async, returning `None`, a string or `ui.FieldError`), then `Form(validate=fn)`,
1630
+ commits all values atomically and calls `on_submit` with a `ui.SubmitEvent` (`values` nested by
1631
+ path). Errors go back to their fields. Python is authoritative; client checks are advisory. With
1632
+ `validate_on="change"` only the newest validation of a field is applied (an older, slower result
1633
+ is discarded).
1634
+ - One submission per form at a time; `form.cancel_submit()` stops an async `on_submit`. Also
1635
+ `form.values()`, `await form.snapshot()`, `form.dirty`, `form.reset()`, `form.set_errors({...})`.
1636
+ - Rules: `required`, `not_empty`, `length`, `email`, `url`, `matches`, `integer`, `range`, `one_of`,
1637
+ `matches_field`, `all_of`. Server-driven forms: `ui.Form.from_schema(schema, actions=...)`
1638
+ (nothing in a schema is evaluated; `submit_action` must name a registered action).
1639
+
1640
+ ## Events and handlers
1641
+
1642
+ Subscribe with `on_<event>=` or `component.on("event", handler)`. A handler takes no argument or one
1643
+ typed event (`ui.Event`, `ui.ChangeEvent` with `value` and `previous`, `ui.SubmitEvent`,
1644
+ `ui.TableEvent`, `ui.RowActionEvent`, ...); the signature is checked, not guessed by catching
1645
+ `TypeError`. Sync or async.
1646
+
1647
+ **Ordering (ADR-018, Amendment 5).** Handlers of one (handler, sender, event name) run one at a time in
1648
+ event order, sync handlers on worker threads and coroutines on the loop; handlers of other components or
1649
+ events run concurrently. This is the same guarantee as core event subscriptions ([guide.md](guide.md)).
1650
+ A handler exception is isolated, sanitised and passed to `app.on_error(fn)` (`fn(window, exception)`);
1651
+ the UI keeps working. `@ui.debounce(300)` and `@ui.throttle(200)` limit a handler's rate.
1652
+
1653
+ ## Themes
1654
+
1655
+ ```python
1656
+ from neutralino import ui
1657
+
1658
+ app = ui.Application(title="Themed", theme=ui.theme(color_scheme="dark", primary_color="teal"))
1659
+ app.set_theme(ui.theme(color_scheme="light")) # all windows; Window.set_theme for one
1660
+ ```
1661
+
1662
+ `theme` is `"system"` (default), `"light"`, `"dark"` or a mapping from `ui.theme(...)`, which validates
1663
+ `color_scheme`, `primary_color`, `radius`, `font_family`, `font_family_monospace`, `colors` (name to ten
1664
+ shades), `spacing`, `font_sizes`, `reduced_motion`. `classes=` and `styles=` work on any component;
1665
+ stylesheets come only from your own local files (`add_css_file`).
1666
+
1667
+ ## Ready-made blocks
1668
+
1669
+ `ui.blocks` holds typed compositions that own their children and expose typed props and events:
1670
+ `StatsGrid`/`StatItem`, `SettingsPanel`/`SettingSpec`, `Sidebar`/`NavItem`, `UsersTable`, `TableBlock`,
1671
+ `UploadPanel`, `EmptyState`, `DashboardGrid`, `Header`, `Footer`, `FilterPanel` and more
1672
+ (`dir(ui.blocks)`). Example: `ui.blocks.StatsGrid([ui.blocks.StatItem("orders", "Orders", 42)], cols=3)`.
1673
+
1674
+ ## Profile: native permissions
1675
+
1676
+ `profile=` fixes the runtime's `nativeAllowList` for the page and for Python's own native calls (one
1677
+ policy, ADR-006). It is not a sandbox for Python.
1678
+
1679
+ | Profile | Allows |
1680
+ |---|---|
1681
+ | `"restricted"` | what the UI engine needs: `app.broadcast`, `app.exit`, `extensions.dispatch`, `extensions.getStats`, `window.setTitle` (template default) |
1682
+ | `"trusted"` | `restricted` plus the typed desktop helpers (`ui.desktop_routes()`): dialogs, notifications, clipboard text, `os.open`, window geometry, full screen, icon. No `os.execCommand`, `spawnProcess`, `filesystem.*`, `storage.*`, `computer.*` |
1683
+ | `"custom"` | exactly `native_allow_list=`, or `"*"` |
1684
+
1685
+ ```python
1686
+ from neutralino import ui
1687
+
1688
+ app = ui.Application(
1689
+ profile="custom",
1690
+ native_allow_list=[*ui.profile_routes("restricted"), "os.open"],
1691
+ )
1692
+ ```
1693
+
1694
+ A fixed profile together with `native_allow_list=`, or with a config that sets its own lists, is a
1695
+ `ValidationError`. Without a profile the core rules apply (docs/security.md). Desktop helpers
1696
+ (`open_file`, `save_file`, `message_box`, `clipboard_text`, `app.settings`, `app.paths`) are described in
1697
+ [desktop-helpers.md](desktop-helpers.md).
1698
+
1699
+ ## Local assets
1700
+
1701
+ ```python
1702
+ from neutralino import ui
1703
+
1704
+ app = ui.Application(title="Assets", asset_roots=["../shared"])
1705
+ ```
1706
+
1707
+ `app.add_css_file`, `add_js_module`, `add_asset` and `add_asset_dir` copy your own files into a per-user
1708
+ staging directory and serve them locally (never from a CDN). Relative paths start at the directory of the
1709
+ file that created the application and may not contain `..`; the real path must lie in that directory or in
1710
+ `asset_roots`; files inside the installed package are refused; at most 64 MiB each. Rules and the custom
1711
+ component adapters: [custom-components.md](custom-components.md).
1712
+
1713
+ ## Where to look next
1714
+
1715
+ - Component reference: `reference/components.md` (generated), `neutralino components describe NAME`.
1716
+ - Native API from Python: [guide.md](guide.md); permissions: [security.md](security.md).
1717
+ - Examples: `neutralino examples list`, `neutralino examples export NAME DEST`; repository
1718
+ `examples/patterns/` and `examples/workspace/`.
1719
+ - Packaging and updates: [packaging.md](packaging.md), [updates.md](updates.md).
1720
+
1721
+ # Application updates (`neutralino.updates`)
1722
+
1723
+ Optional, per application. An app that does not configure `[updates]` runs no
1724
+ update code. This is **not** the native runtime updater
1725
+ (`Application.updater`, Neutralino's `updater.*` API), which stays unchanged
1726
+ and separate: `neutralino.updates` installs complete application versions
1727
+ side by side and switches between them when the app is launched.
1728
+
1729
+ Linux x86_64 is the tested platform. Windows and macOS code paths exist
1730
+ (`msvcrt` locks, `venv\Scripts\python.exe`, zip archives, platform keys) but
1731
+ are **untested**; see [Limitations](#limitations).
1732
+
1733
+ ## Configuration (`app.toml`)
1734
+
1735
+ Structure, unknown keys and value types are checked by one shared loader
1736
+ (also used by `neutralino init` and the managed packager; from Python,
1737
+ `neutralino.updates.load_config(path)`); `neutralino.updates` adds the update rules
1738
+ (choices, ranges, provider/repository/url consistency, URL policy, relative
1739
+ paths). Every failure is a `ConfigError`.
1740
+
1741
+ ```toml
1742
+ [app]
1743
+ id = "org.example.inventory" # same rule as ui.Application(app_id=)
1744
+ name = "Inventory"
1745
+ version = "1.2.0" # SemVer 2.0.0
1746
+ entry = "app.py" # relative to the project root
1747
+
1748
+ [updates] # optional; absent or enabled = false: no update code runs
1749
+ enabled = true
1750
+ provider = "github" # "github", or "url" (self-hosted manifest / loopback tests)
1751
+ repository = "owner/name" # github only
1752
+ # github_url = "https://ghe.example.com" # github only: GitHub Enterprise host (default https://github.com)
1753
+ # url = "https://example.org/inventory/manifest.json" # provider = "url" only
1754
+ auth = "auto" # auto | public | private
1755
+ channel = "stable" # stable | prerelease
1756
+ check_on_startup = true
1757
+ check_interval_hours = 24 # 0: no periodic checks (only the startup check, if enabled)
1758
+ silent_on_failure = true # background failures logged at debug level only
1759
+ activation = "next-start" # next-start | prompt
1760
+ keep_versions = 2 # current + previous kept when pruning
1761
+ ```
1762
+
1763
+ `neutralino.updates.load_config(path)` returns a frozen `AppConfig`
1764
+ (`.app`, `.updates`, `.package`).
1765
+
1766
+ ## Using it in an app
1767
+
1768
+ ```python
1769
+ from pathlib import Path
1770
+ from neutralino import Application
1771
+ from neutralino.updates import UpdateManager, load_config, start_background_checks
1772
+
1773
+ config = load_config(Path(__file__).with_name("app.toml"))
1774
+ updates = UpdateManager(config)
1775
+ app = Application(resources="frontend")
1776
+
1777
+
1778
+ @app.expose()
1779
+ def page_ready() -> None: # called by the page once it is usable
1780
+ updates.confirm_healthy() # ends this version's trial (see below)
1781
+ start_background_checks(app, updates)
1782
+
1783
+
1784
+ app.run()
1785
+ ```
1786
+
1787
+ | API | Behaviour |
1788
+ | --- | --- |
1789
+ | `UpdateManager(config, paths=None)` | `paths`: `InstallPaths`, an `AppPaths`, or default `InstallPaths.for_app(config.app.id)` |
1790
+ | `check() -> UpdateResult` | manual check; raises a typed `UpdateError` on failure (message + `hint`) |
1791
+ | `check_quietly()` | same, failures returned as `UpdateStatus.ERROR` |
1792
+ | `download_and_stage(result=None)` | download, verify, extract, stage; `UpdateStatus.STAGED` |
1793
+ | `pending_restart` / `staged_version` | a staged version starts at the next launch |
1794
+ | `activate_staged()` | `activation = "prompt"`: after the user agreed |
1795
+ | `confirm_healthy()` | end the running version's trial (also `neutralino.updates.confirm_healthy()`) |
1796
+ | `relaunch(argv=None)` | on the user's explicit request, after `app.run()` returned: exec the install's `launcher.py`, which starts the pending version as a trial; False if nothing is pending; `UpdateError` if not started by the launcher |
1797
+ | `start_background_checks(app, manager)` | daemon thread; never blocks the event loop, never raises, stops with `stop()` or when `app` (core or `ui.Application`) reaches `STOPPED` |
1798
+
1799
+ In a `ui` app, confirm after the page has rendered: `await
1800
+ app.wait_for_window()` (or the blocking `app.wait_for_window()`) returns
1801
+ once the page has committed and rendered its first tree, past the loading
1802
+ spinner, so a
1803
+ release whose page never renders is not confirmed and rolls back. The
1804
+ packaged example `neutralino examples export updater DEST` does this.
1805
+
1806
+ `UpdateResult(status, current_version, latest_version=None, manifest=None,
1807
+ asset=None, error=None, detail="")` is what `check()`/`check_quietly()`
1808
+ return; `.available` is `status == "available"` and `.message` is a
1809
+ one-line text for the user. Building one yourself (as the example does to
1810
+ report an error) is supported.
1811
+
1812
+ `UpdateStatus`: `disabled`, `no-update`, `available`, `staged`,
1813
+ `quarantined`, `error`. Errors: `NoReleaseError`, `NotFoundError`,
1814
+ `GhMissingError`, `UnauthorizedError`, `RateLimitedError`, `NetworkError`,
1815
+ `UnsafeUrlError`, `InvalidManifestError`, `WrongApplicationError`,
1816
+ `WrongPlatformError`, `IntegrityError`, `UnsafeArchiveError`, `LockedError`,
1817
+ `ConfigError` (all `UpdateError`).
1818
+
1819
+ ### Sources and test isolation (Python API)
1820
+
1821
+ `UpdateManager(config, paths=None, *, source=None, platform=None,
1822
+ running_version=None, http=None, env=None, archive_limits=None)`: by
1823
+ default the source comes from `[updates]` and the paths from the app id.
1824
+ Tests and custom setups pass them explicitly:
1825
+
1826
+ * `InstallPaths(root, cache_dir=None)`: the install folder (`versions/`,
1827
+ `current.json`, ...) and the update cache; `InstallPaths.for_app(app_id)`
1828
+ is the default.
1829
+ * `UrlSource(url, *, application_id)`: a self-hosted `manifest.json`
1830
+ (plain `http` only on loopback).
1831
+ * `GitHubSource(repository, *, application_id, auth="auto",
1832
+ api="https://api.github.com", env=None, gh_timeout=10.0,
1833
+ gh_candidates=(...))`: the GitHub REST API. It calls `GET
1834
+ /repos/{repo}/releases/latest` (with `auth = "auto"` an anonymous
1835
+ `GET /repos/{repo}` after a 404), then fetches `manifest.json` and the
1836
+ archive through each asset's API `url` with `Accept:
1837
+ application/octet-stream`, following the redirect to the storage host
1838
+ without the token. `api=` points it at GitHub Enterprise or a local fake;
1839
+ `app.toml` has no key for this, so the CLI and `install.sh` always use
1840
+ `api.github.com`.
1841
+ * `find_github_token(*, env=None, hostname="github.com", timeout=10.0,
1842
+ gh_candidates=(...))`: the credential lookup described under
1843
+ [Security policy](#security-policy).
1844
+ * `running_version=` overrides the version read from the install pointer.
1845
+
1846
+ To test the private flow without your real credentials, pass an `env`
1847
+ whose `PATH` holds only a fake `gh` (or no `gh`) and `gh_candidates=()`:
1848
+ an explicit `env` is the whole environment, and `gh` is looked up on its
1849
+ `PATH`, then in `gh_candidates`.
1850
+
1851
+ Version rules: strict SemVer 2.0.0 (no `v` prefix, no leading zeros);
1852
+ precedence per semver.org (build metadata ignored); only strictly newer
1853
+ versions are offered (no downgrade); prereleases only with
1854
+ `channel = "prerelease"`; a version that failed its trial is never offered
1855
+ again.
1856
+
1857
+ ## Releases
1858
+
1859
+ `neutralino.updates.release.build_release(project_dir, out_dir, platform=None, version=None, *, base_url=None, runtime_path=None, vendor=(), mode="portable", requirements=None, wheelhouse=None, python_version=None, platforms=None)`
1860
+ (also `neutralino release --out DIR`, see [cli.md](cli.md), or
1861
+ `python -m neutralino.updates.release PROJECT --out DIR`) builds locally,
1862
+ never publishes:
1863
+
1864
+ | File | Content |
1865
+ | --- | --- |
1866
+ | `<app id>-<version>-<platform>.tar.gz` (`.zip` on Windows) | the portable `neutralino build` (frontend, backend, `vendor/` with neutralino + websockets + `--vendor` distributions, pinned runtime, `boot.py`), `release.json`, `app/app.toml` with the release version |
1867
+ | `manifest.json` | schema below |
1868
+ | `install.sh` | first-time installer for Linux, generated from the app's own `app.toml` (the template has no hardcoded identity) |
1869
+ | `SHA256SUMS` | of the three files above |
1870
+
1871
+ `mode="managed"` (`neutralino release --mode managed`) builds the archive
1872
+ with `neutralino build --mode managed` instead: it also holds the wheelhouse,
1873
+ `requirements.lock.txt` and the offline `install.sh`/`install.py`
1874
+ ([packaging.md](packaging.md)), and `release.json` says `"mode": "managed"`.
1875
+ Its version is `[app] version` of `app.toml` (a different `version` is
1876
+ refused). Use it for apps installed with the managed installer and for any
1877
+ app with compiled dependencies:
1878
+
1879
+ * the updater, after verifying and extracting such an archive, creates
1880
+ `venv/` in the new version with a CPython of the build's target version
1881
+ (the running interpreter, its base, or `pythonX.Y` on `PATH`, each probed
1882
+ for `venv`/`ensurepip`) and runs `pip install --no-index --find-links
1883
+ wheelhouse --require-hashes --only-binary=:all: -r requirements.lock.txt`
1884
+ with `PIP_*`/`PYTHON*` cleared: no network, every wheel hash-checked. Only
1885
+ then is the version moved to `versions/` and marked pending; any failure
1886
+ (no interpreter, hash mismatch) is an `UpdateError` with a hint and stages
1887
+ nothing. The wheelhouse is removed afterwards;
1888
+ * a release without a wheelhouse is refused (`InvalidManifestError`) for an
1889
+ install whose running version has a `venv/`;
1890
+ * the first-time `install.sh` hands a managed archive, after its checksum
1891
+ checks, to the bundled offline installer.
1892
+
1893
+ Archives are reproducible (sorted members, uid/gid 0, mtime 0, gzip mtime 0;
1894
+ set `SOURCE_DATE_EPOCH` to fix the build manifest's `built_at`). Only the
1895
+ build machine's platform can be built (the archive ships that machine's
1896
+ pinned runtime).
1897
+
1898
+ Publishing is the owner's step, e.g. `gh release create v1.2.0 out/*` (tag
1899
+ `v<version>` or `<version>`; it must equal the manifest's version).
1900
+
1901
+ ### Manifest (`schema_version` 1)
1902
+
1903
+ ```json
1904
+ {
1905
+ "schema_version": 1,
1906
+ "applicationId": "org.example.inventory",
1907
+ "version": "1.2.0",
1908
+ "assets": {
1909
+ "linux-x86_64": {"name": "org.example.inventory-1.2.0-linux-x86_64.tar.gz",
1910
+ "url": "org.example.inventory-1.2.0-linux-x86_64.tar.gz",
1911
+ "sha256": "<64 lowercase hex>", "size": 123456}
1912
+ }
1913
+ }
1914
+ ```
1915
+
1916
+ Platforms: `linux-x86_64`, `windows-x86_64`, `macos-arm64`, `macos-x86_64`.
1917
+ `url` may be relative to the manifest. The legacy `update.json` format
1918
+ (no `schema_version`, `linux_x64`) is still read.
1919
+
1920
+ ### First install
1921
+
1922
+ ```sh
1923
+ # public repository or any static host
1924
+ curl -fsSLO https://github.com/OWNER/REPO/releases/latest/download/install.sh && sh install.sh
1925
+ # private repository (GitHub CLI logged in with an account that can read it)
1926
+ gh release download -R OWNER/REPO -p install.sh -O - | sh
1927
+ ```
1928
+
1929
+ The installer tries the public download first and falls back to `gh release
1930
+ download` when that fails and `gh` is logged in; it verifies the manifest's
1931
+ application id and the archive against both `manifest.json` and
1932
+ `SHA256SUMS`, unpacks with `tarfile`'s `data` filter (links and devices
1933
+ refused) into its own `staging/<version>.install.*` folder, and hands the
1934
+ rest to the release's launcher (`_layout.py --install`): under `.launch.lock`
1935
+ and `install.lock`, both taken without waiting, it moves the build into
1936
+ `versions/` (a complete version already there is kept; an incomplete one is
1937
+ replaced by renames), records the version and writes `launcher.py`,
1938
+ `~/.local/bin/<app id>` and a `.desktop` entry. `NEUTRALINO_RELEASE_BASE=URL`
1939
+ installs from another location; `sh install.sh --uninstall` runs the
1940
+ installed `launcher.py --uninstall`, which removes only the managed names (see
1941
+ Install layout) and keeps data, settings and logs. Both refuse (exit 1, nothing
1942
+ changed) while the app runs or while another install or update holds
1943
+ `install.lock`, and neither overwrites nor removes a command or menu entry
1944
+ that lacks the installers' marker (`# neutralino-python managed launcher`,
1945
+ `X-Neutralino-Python-App=<app id>`); links are never followed or removed.
1946
+
1947
+ ## Install layout
1948
+
1949
+ The per-app data directory (`AppPaths(app_id).location("data")`, XDG on
1950
+ Linux) is the install root. It is the same layout the managed installer
1951
+ (`neutralino build --mode managed`, P07.03) writes: `versions/<v>/`,
1952
+ `current.json` (`{"current", "previous", "pending"}`, extra keys added by the
1953
+ updater) and `install.lock`. The updater only ever touches the names below;
1954
+ everything else in the directory is the application's own data.
1955
+
1956
+ ```
1957
+ ~/.local/share/<app id>/
1958
+ current.json pointer: current, previous, pending (+ staged, trial, quarantined, schema)
1959
+ current.json.bak the pointer before its last change
1960
+ versions/<semver>/ complete builds (boot.py, app/, vendor/, runtime/, venv/?)
1961
+ staging/ downloads (<sha256>.tar.gz.part, resumable) and extraction
1962
+ quarantine/<semver>/ the most recent version whose trial failed
1963
+ launcher.py the launcher (copy of neutralino/updates/_layout.py)
1964
+ launcher.log launcher decisions (no secrets)
1965
+ install.lock held briefly to change the pointer or versions/ (shared with the managed installer)
1966
+ .launch.lock held by the running app: one copy at a time
1967
+ <anything else> the application's data: never touched by updates
1968
+ ~/.cache/<app id>/updates/http-cache.json ETags and rate-limit backoff
1969
+ ```
1970
+
1971
+ A pointer without `schema` (as older managed installers wrote it) is read as
1972
+ schema 1. Both installers (the release `install.sh` and the managed
1973
+ `install.sh`/`install.py`) write `launcher.py` and a `~/.local/bin/<app id>`
1974
+ command that runs it, so pending/trial/rollback apply to every install. Both
1975
+ uninstallers (`install.sh --uninstall`, `uninstall.py`) remove exactly the
1976
+ managed names (the names listed above plus the managed installer's
1977
+ `install.json`, `uninstall.py` and `install.lock`) and keep everything
1978
+ else.
1979
+
1980
+ The launcher (`python3 -I launcher.py --app-dir ROOT -- ARGS` or
1981
+ `python -m neutralino.updates.launcher`) takes the launch lock (a second
1982
+ launch exits 0 with "already running"), resolves the pointer under the
1983
+ update lock, then execs `versions/<v>/venv/bin/python` (when a managed venv
1984
+ exists, P07.03) or its own interpreter with `-I versions/<v>/boot.py`,
1985
+ exporting `NEUTRALINO_UPDATE_ROOT` and `NEUTRALINO_UPDATE_VERSION`. The
1986
+ exec'd app inherits the launch lock.
1987
+
1988
+ Pointer writes are temp file + fsync + rename + directory fsync; a torn or
1989
+ corrupt pointer is replaced by the backup, else rebuilt from the newest
1990
+ usable version in `versions/`. A version is usable when its `boot.py` exists
1991
+ and, if it has a `venv/`, the venv's interpreter exists (a failed dependency
1992
+ install makes it unusable).
1993
+
1994
+ ## Staging, trial and rollback
1995
+
1996
+ 1. A check finds a newer version. `download_and_stage` downloads into
1997
+ `staging/` (a separate download lock prevents two downloads; an
1998
+ interrupted download resumes with an HTTP Range request, or restarts if
1999
+ the server does not support ranges), verifies size and SHA-256, extracts
2000
+ safely, checks `release.json` (application id, version, platform) and
2001
+ `boot.py`, moves it to `versions/<v>/` and sets `pending` (or `staged` for
2002
+ `activation = "prompt"`). Running files are never replaced; nothing
2003
+ restarts the app.
2004
+ 2. The next launch activates `pending`: `previous = current`, `current =
2005
+ trial = <v>`.
2006
+ 3. The new version calls `confirm_healthy()` once its backend and page are
2007
+ really ready (in a `ui` app: after `wait_for_window()`): the trial ends, old versions are pruned (current, previous
2008
+ if `keep_versions >= 2`, pending/staged, and newer extras up to
2009
+ `keep_versions`), and `launcher.py` is refreshed from the running version.
2010
+ 4. If the app crashes, exits or is closed before confirming, the next launch
2011
+ finds `trial == current`: it switches back to `previous`, moves the failed
2012
+ version to `quarantine/` and never activates or stages it again. With no
2013
+ usable previous version it keeps the current one.
2014
+
2015
+ Rollback restores application **files** only. Application data is never
2016
+ rolled back: data migrations must stay compatible with the previous version
2017
+ or back up their data themselves.
2018
+
2019
+ ## Security policy
2020
+
2021
+ * **Integrity, not authenticity (accepted risk).** Each release asset is
2022
+ checked against the SHA-256 and size in a manifest fetched over HTTPS from
2023
+ the configured repository or URL. There is no signature verification (no
2024
+ crypto dependency, no custom crypto): whoever can publish releases in the
2025
+ repository (or serve the manifest URL) can ship code. Owners who need more
2026
+ must sign out of band. Recorded in the maintenance risk register.
2027
+ * HTTPS only; plain `http` is accepted for loopback hosts only (tests,
2028
+ same-machine manifests), checked on every redirect hop; https -> http
2029
+ redirects are refused; at most 5 redirects; 15 s timeouts; bounded
2030
+ responses (API 4 MiB, manifest 256 KiB, asset size from the manifest, at
2031
+ most 1 GiB).
2032
+ * Archives: relative names only, no `..`, absolute paths, backslashes or
2033
+ control characters, regular files and directories only (links, devices,
2034
+ FIFOs refused), no duplicates (also case-insensitive), at most 50 000
2035
+ members, 2 GiB expanded, ratio 200:1; files written by the updater with
2036
+ modes 0644/0755, byte counts enforced while streaming.
2037
+ * GitHub authentication (`auth`):
2038
+ * `public`: anonymous API only.
2039
+ * `auto` (default): anonymous first; if refused (404/401/403 without a rate
2040
+ limit), the user's own credentials.
2041
+ * `private`: credentials directly.
2042
+
2043
+ Credentials come from `GH_TOKEN` / `GITHUB_TOKEN`, else `gh auth token
2044
+ --hostname github.com` (10 s timeout, `GH_PROMPT_DISABLED=1`, the token
2045
+ read from stdout). The token is sent only to the configured API origin
2046
+ (`https://api.github.com`; with `github_url` set, `<github_url>/api/v3`, the
2047
+ GitHub Enterprise Server layout; the Python API's `GitHubSource(api=...)` can
2048
+ name any other) as `Authorization: Bearer`. For another API address `gh` is
2049
+ asked for that address's host, never for `github.com`, so a test or
2050
+ enterprise API never receives the user's github.com token; a `GH_TOKEN` you
2051
+ set yourself is sent to whichever API you configured. An explicit `env=`
2052
+ mapping is the whole environment: without `PATH` in it no `gh` is found
2053
+ except through `gh_candidates`. The token is never sent to the storage
2054
+ host GitHub redirects asset downloads to, never in a URL, never in the
2055
+ arguments of a process, never logged, and never written to disk (the cache
2056
+ holds public metadata and ETags; for a private repository that includes the
2057
+ release JSON, in the user's 0700 cache directory). No other token sources
2058
+ are searched.
2059
+ * Rate limits: a 403/429 with `X-RateLimit-Remaining: 0` (or `Retry-After`)
2060
+ pauses checks until the reset time, persisted in the cache file; ETags make
2061
+ repeated checks conditional.
2062
+ * Background checks are silent on failure (`debug` log, `warning` if
2063
+ `silent_on_failure = false`); messages contain error types and hosts, not
2064
+ credentials.
2065
+
2066
+ ## Limitations
2067
+
2068
+ * Linux x86_64 is the only platform tested end to end (real runtime, real
2069
+ installer, real launcher). Windows (zip, `msvcrt` locking, no `exec`: the
2070
+ launcher waits for the app) and macOS are implemented but untested; the
2071
+ installer script is Linux only.
2072
+ * No signed manifests (see the accepted risk above).
2073
+ * Cross-platform release builds are not supported: build on each platform.
2074
+ * A trial that the user closes before the page confirmed counts as failed
2075
+ (rolled back at the next launch).
2076
+ * Restart policy: nothing restarts the app on its own. A staged version
2077
+ starts at the next launch; an app may offer "restart now" and call
2078
+ `UpdateManager.relaunch()` after `app.run()` returned (POSIX `exec`; the
2079
+ restarted launcher takes over the inherited launch lock).
2080
+ * Manual checks (`neutralino updates check`, `UpdateManager.check()`) raise
2081
+ or print typed, actionable errors; background checks never raise and log
2082
+ at debug level (`silent_on_failure = true`).
2083
+ * A remote private-repository smoke against github.com is not part of the
2084
+ automated tests (it needs owner-authorized credentials and a fixture
2085
+ repository); the private flow is tested against a local fake API and a fake
2086
+ `gh`.
2087
+
2088
+ # UI component reference
2089
+
2090
+ Generated from the UI contracts of this version.
2091
+
2092
+ ## behaviours
2093
+
2094
+ ### ui.Hotkeys
2095
+
2096
+ Non-visual keyboard shortcuts for the page it is on. Each binding ('mod+s', 'ctrl+k', 'escape') that is pressed emits a hotkey event whose value is the binding; 'mod' is Ctrl, or Cmd on macOS. Hidden (visible=False) or removed Hotkeys stop listening.
2097
+
2098
+ - props: `bindings`, `prevent_default`, `ignore_inputs`
2099
+ - events: `on_hotkey`
2100
+
2101
+ ## buttons
2102
+
2103
+ ### ui.ActionIcon
2104
+
2105
+ Icon button. `icon` is a registry name (for example 'heart', 'trash'; see the renderer icon registry) and always set aria_label for screen readers.
2106
+
2107
+ - props: `icon`, `variant` (filled/light/outline/subtle/transparent/white/default/gradient), `color`, `size`, `radius`, `loading`, `disabled`
2108
+ - events: `on_click`
2109
+
2110
+ ### ui.ActionIconGroup
2111
+
2112
+ Joined row of action icons.
2113
+
2114
+ - props: `orientation` (horizontal/vertical)
2115
+
2116
+ ### ui.Burger
2117
+
2118
+ Menu (hamburger) button; Python owns `opened` and toggles it on `click`.
2119
+
2120
+ - props: `opened`, `size`, `color`, `line_size`, `transition_duration`
2121
+ - events: `on_click`
2122
+
2123
+ ### ui.Button
2124
+
2125
+ Clickable button.
2126
+
2127
+ - props: `label`, `variant` (filled/light/outline/subtle/transparent/white/default/gradient), `color`, `size`, `radius`, `loading`, `disabled`, `full_width`, `type` (button/submit/reset)
2128
+ - events: `on_click`
2129
+ - slots: `left_section`, `right_section`
2130
+
2131
+ ### ui.ButtonGroup
2132
+
2133
+ Joined row of buttons.
2134
+
2135
+ - props: `orientation` (horizontal/vertical)
2136
+
2137
+ ### ui.CloseButton
2138
+
2139
+ Small close (x) button.
2140
+
2141
+ - props: `size`, `radius`, `disabled`, `icon_size`, `variant` (subtle/transparent/filled/light/outline/default)
2142
+ - events: `on_click`
2143
+
2144
+ ### ui.CopyButton
2145
+
2146
+ Button that copies `value` to the system clipboard through the page, then shows `copied_label` for `timeout` ms and fires `copy`. For writes without a user gesture use the native clipboard (Window.copy_text).
2147
+
2148
+ - props: `value`, `label`, `copied_label`, `timeout`, `variant` (filled/light/outline/subtle/transparent/white/default/gradient), `color`, `size`, `radius`, `disabled`
2149
+ - events: `on_copy`
2150
+ - slots: `left_section`
2151
+
2152
+ ### ui.FileButton
2153
+
2154
+ Button that opens the page file chooser. `select` fires with a list of {name, size, type} (contents are never sent). For real paths use the native dialog (app.open_file / Window.pick_files).
2155
+
2156
+ - props: `label`, `accept`, `multiple`, `disabled`, `variant` (filled/light/outline/subtle/transparent/white/default/gradient), `color`, `size`, `radius`
2157
+ - events: `on_select`
2158
+
2159
+ ### ui.UnstyledButton
2160
+
2161
+ Clickable area without button styling; put any content inside.
2162
+
2163
+ - props: `disabled`
2164
+ - events: `on_click`
2165
+
2166
+ ## charts
2167
+
2168
+ ### ui.AreaChart
2169
+
2170
+ Area chart (default, stacked, percent, split, stream) with typed series and gaps. append() streams points into a bounded history (max_points) in coalesced batches; None values are gaps.
2171
+
2172
+ - props: `data`, `data_key`, `series`, `with_x_axis`, `with_y_axis`, `with_legend`, `with_right_y_axis`, `x_axis_label`, `y_axis_label`, `right_y_axis_label`, `tick_line` (x/y/xy/none), `grid_axis` (x/y/xy/none), `stroke_dasharray`, `unit`, `text_color`, `grid_color`, `tooltip_animation_duration`, `reference_lines`, `reference_areas`, `reference_dots`, `with_brush`, `y_min`, `y_max`, `type` (default/stacked/percent/split/stream), `with_gradient`, `curve_type` (bump/linear/natural/monotone/step/stepBefore/stepAfter), `with_dots`, `stroke_width`, `fill_opacity`, `split_colors`, `split_offset`, `connect_nulls`, `with_point_labels`, `orientation` (horizontal/vertical), `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `max_points`, `animate`, `h`, `w`
2173
+ - events: `on_point_click`, `on_legend_click`
2174
+
2175
+ ### ui.BarChart
2176
+
2177
+ Bar chart (default, stacked, percent, waterfall) with typed series; bars with None values are skipped. append() streams points into a bounded history (max_points) in coalesced batches; None values are gaps.
2178
+
2179
+ - props: `data`, `data_key`, `series`, `with_x_axis`, `with_y_axis`, `with_legend`, `with_right_y_axis`, `x_axis_label`, `y_axis_label`, `right_y_axis_label`, `tick_line` (x/y/xy/none), `grid_axis` (x/y/xy/none), `stroke_dasharray`, `unit`, `text_color`, `grid_color`, `tooltip_animation_duration`, `reference_lines`, `reference_areas`, `reference_dots`, `with_brush`, `y_min`, `y_max`, `type` (default/stacked/percent/waterfall), `fill_opacity`, `cursor_fill`, `with_bar_value_label`, `min_bar_size`, `max_bar_width`, `bar_label_color`, `orientation` (horizontal/vertical), `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `max_points`, `animate`, `h`, `w`
2180
+ - events: `on_point_click`, `on_legend_click`
2181
+
2182
+ ### ui.BarsList
2183
+
2184
+ Ranked horizontal bars (name, value, optional color).
2185
+
2186
+ - props: `data`, `bars_label`, `value_label`, `bar_gap`, `min_bar_size`, `bar_height`, `bar_color`, `bar_text_color`, `auto_contrast`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `h`, `w`
2187
+ - events: `on_bar_click`
2188
+
2189
+ ### ui.BubbleChart
2190
+
2191
+ Bubble chart: x, y and bubble size (z) per row.
2192
+
2193
+ - props: `data`, `data_key`, `range`, `color`, `text_color`, `grid_color`, `label`, `with_tooltip`, `accessibility_layer`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `max_points`, `animate`, `h`, `w`
2194
+
2195
+ ### ui.BulletChart
2196
+
2197
+ Bullet chart: a value against a target over qualitative ranges.
2198
+
2199
+ - props: `value`, `target`, `ranges`, `orientation` (horizontal/vertical), `label`, `bar_color`, `target_color`, `size`, `bar_size`, `target_ratio`, `target_size`, `with_tooltip`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `h`, `w`
2200
+
2201
+ ### ui.CandlestickChart
2202
+
2203
+ OHLC candlestick chart; append() streams candles into a bounded history.
2204
+
2205
+ - props: `data`, `data_key`, `data_keys`, `labels`, `up_color`, `down_color`, `max_candle_width`, `candle_stroke_width`, `with_x_axis`, `with_y_axis`, `with_tooltip`, `tick_line` (x/y/xy/none), `grid_axis` (x/y/xy/none), `stroke_dasharray`, `unit`, `text_color`, `grid_color`, `x_axis_label`, `y_axis_label`, `tooltip_animation_duration`, `reference_lines`, `reference_areas`, `reference_dots`, `y_min`, `y_max`, `accessibility_layer`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `max_points`, `animate`, `h`, `w`
2206
+ - events: `on_point_click`
2207
+
2208
+ ### ui.CompositeChart
2209
+
2210
+ Mixes bar, line and area series on one chart (series[].type), optionally with a right y axis. append() streams points into a bounded history (max_points) in coalesced batches; None values are gaps.
2211
+
2212
+ - props: `data`, `data_key`, `series`, `with_x_axis`, `with_y_axis`, `with_legend`, `with_right_y_axis`, `x_axis_label`, `y_axis_label`, `right_y_axis_label`, `tick_line` (x/y/xy/none), `grid_axis` (x/y/xy/none), `stroke_dasharray`, `unit`, `text_color`, `grid_color`, `tooltip_animation_duration`, `reference_lines`, `reference_areas`, `reference_dots`, `with_brush`, `y_min`, `y_max`, `curve_type` (bump/linear/natural/monotone/step/stepBefore/stepAfter), `with_dots`, `stroke_width`, `connect_nulls`, `with_point_labels`, `with_bar_value_label`, `min_bar_size`, `max_bar_width`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `max_points`, `animate`, `h`, `w`
2213
+ - events: `on_point_click`, `on_legend_click`
2214
+
2215
+ ### ui.DonutChart
2216
+
2217
+ Donut chart of named, colored values with an optional centre label.
2218
+
2219
+ - props: `data`, `with_tooltip`, `with_legend`, `tooltip_animation_duration`, `stroke_color`, `label_color`, `padding_angle`, `with_labels`, `with_labels_line`, `size`, `stroke_width`, `start_angle`, `end_angle`, `tooltip_data_source` (segment/all), `labels_type` (value/percent/name), `thickness`, `chart_label`, `accessibility_layer`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `animate`, `h`, `w`
2220
+ - events: `on_slice_click`, `on_legend_click`
2221
+
2222
+ ### ui.FunnelChart
2223
+
2224
+ Funnel chart of named, colored stage values.
2225
+
2226
+ - props: `data`, `with_tooltip`, `with_legend`, `tooltip_animation_duration`, `stroke_color`, `label_color`, `size`, `stroke_width`, `with_labels`, `labels_position` (right/left/inside), `tooltip_data_source` (segment/all), `accessibility_layer`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `animate`, `h`, `w`
2227
+ - events: `on_slice_click`, `on_legend_click`
2228
+
2229
+ ### ui.GaugeChart
2230
+
2231
+ Gauge of a value between min and max, optional target and threshold sections.
2232
+
2233
+ - props: `value`, `min`, `max`, `target`, `sections`, `thickness`, `size`, `start_angle`, `end_angle`, `label`, `track_color`, `filled_color`, `target_color`, `target_size`, `round_caps`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `h`, `w`
2234
+
2235
+ ### ui.Heatmap
2236
+
2237
+ Calendar heatmap of values per day (days absent from data are empty).
2238
+
2239
+ - props: `data`, `domain`, `start_date`, `end_date`, `with_month_labels`, `month_labels_position` (top/bottom), `month_labels`, `with_weekday_labels`, `weekday_labels`, `with_outside_dates`, `first_day_of_week`, `rect_size`, `gap`, `rect_radius`, `colors`, `weekdays_labels_width`, `months_labels_height`, `font_size`, `with_tooltip`, `split_months`, `with_legend`, `legend_labels`, `h`, `w`
2240
+
2241
+ ### ui.LineChart
2242
+
2243
+ Line chart over records with typed series, gaps (None) and streaming appends. append() streams points into a bounded history (max_points) in coalesced batches; None values are gaps.
2244
+
2245
+ - props: `data`, `data_key`, `series`, `with_x_axis`, `with_y_axis`, `with_legend`, `with_right_y_axis`, `x_axis_label`, `y_axis_label`, `right_y_axis_label`, `tick_line` (x/y/xy/none), `grid_axis` (x/y/xy/none), `stroke_dasharray`, `unit`, `text_color`, `grid_color`, `tooltip_animation_duration`, `reference_lines`, `reference_areas`, `reference_dots`, `with_brush`, `y_min`, `y_max`, `type` (default/gradient), `gradient_stops`, `curve_type` (bump/linear/natural/monotone/step/stepBefore/stepAfter), `fill_opacity`, `with_dots`, `stroke_width`, `connect_nulls`, `with_point_labels`, `orientation` (horizontal/vertical), `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `max_points`, `animate`, `h`, `w`
2246
+ - events: `on_point_click`, `on_legend_click`
2247
+
2248
+ ### ui.MatrixChart
2249
+
2250
+ Matrix (cross-tab) of x/y cells with optional null (empty) cells.
2251
+
2252
+ - props: `data`, `x_labels`, `y_labels`, `domain`, `colors`, `cell_size`, `gap`, `cell_radius`, `with_tooltip`, `y_labels_width`, `x_labels_height`, `x_labels_position` (top/bottom), `font_size`, `empty_color`, `with_legend`, `legend_labels`, `with_x_labels`, `with_y_labels`, `x_labels_rotation`, `h`, `w`
2253
+
2254
+ ### ui.PieChart
2255
+
2256
+ Pie chart of named, colored values.
2257
+
2258
+ - props: `data`, `with_tooltip`, `with_legend`, `tooltip_animation_duration`, `stroke_color`, `label_color`, `padding_angle`, `with_labels`, `with_labels_line`, `size`, `stroke_width`, `start_angle`, `end_angle`, `tooltip_data_source` (segment/all), `labels_type` (value/percent/name), `labels_position` (inside/outside), `accessibility_layer`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `animate`, `h`, `w`
2259
+ - events: `on_slice_click`, `on_legend_click`
2260
+
2261
+ ### ui.RadarChart
2262
+
2263
+ Radar chart over categories with typed series.
2264
+
2265
+ - props: `data`, `data_key`, `series`, `grid_color`, `text_color`, `with_polar_grid`, `with_polar_angle_axis`, `with_polar_radius_axis`, `with_tooltip`, `with_legend`, `with_dots`, `tooltip_animation_duration`, `accessibility_layer`, `animate`, `h`, `w`
2266
+ - events: `on_legend_click`
2267
+
2268
+ ### ui.RadialBarChart
2269
+
2270
+ Radial bar chart: one ring per named row.
2271
+
2272
+ - props: `data`, `data_key`, `bar_size`, `with_background`, `with_labels`, `with_legend`, `with_tooltip`, `empty_background_color`, `start_angle`, `end_angle`, `accessibility_layer`, `animate`, `h`, `w`
2273
+ - events: `on_legend_click`
2274
+
2275
+ ### ui.SankeyChart
2276
+
2277
+ Sankey diagram of index-based nodes and links.
2278
+
2279
+ - props: `data`, `height`, `node_width`, `node_padding`, `link_curvature`, `iterations`, `node_color`, `colors`, `link_color`, `link_opacity`, `with_tooltip`, `tooltip_animation_duration`, `text_color`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `animate`, `h`, `w`
2280
+
2281
+ ### ui.ScatterChart
2282
+
2283
+ Scatter chart with one named, colored series of {x, y} points each.
2284
+
2285
+ - props: `data`, `data_key`, `unit`, `labels`, `point_labels` (x/y), `with_x_axis`, `with_y_axis`, `with_legend`, `with_tooltip`, `with_right_y_axis`, `tick_line` (x/y/xy/none), `grid_axis` (x/y/xy/none), `stroke_dasharray`, `text_color`, `grid_color`, `x_axis_label`, `y_axis_label`, `right_y_axis_label`, `tooltip_animation_duration`, `reference_lines`, `reference_areas`, `reference_dots`, `orientation` (horizontal/vertical), `y_min`, `y_max`, `accessibility_layer`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `animate`, `h`, `w`
2286
+ - events: `on_legend_click`
2287
+
2288
+ ### ui.Sparkline
2289
+
2290
+ Tiny trend chart over a list of numbers (None is a gap). append(*values) streams into a bounded history.
2291
+
2292
+ - props: `data`, `color`, `with_gradient`, `fill_opacity`, `curve_type` (bump/linear/natural/monotone/step/stepBefore/stepAfter), `stroke_width`, `trend_colors`, `connect_nulls`, `max_points`, `animate`, `h`, `w`
2293
+
2294
+ ### ui.SunburstChart
2295
+
2296
+ Sunburst of a nested name/value tree.
2297
+
2298
+ - props: `data`, `with_tooltip`, `tooltip_animation_duration`, `stroke_color`, `size`, `inner_radius`, `gap`, `start_angle`, `end_angle`, `with_labels`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `animate`, `h`, `w`
2299
+
2300
+ ### ui.Treemap
2301
+
2302
+ Treemap of a nested name/value tree.
2303
+
2304
+ - props: `data`, `aspect_ratio`, `with_tooltip`, `tooltip_animation_duration`, `stroke_color`, `text_color`, `height`, `stroke_width`, `auto_contrast`, `value_format` (default/integer/one_decimal/two_decimals/percent/percent_value/compact/bytes/usd/eur), `animate`, `h`, `w`
2305
+
2306
+ ### ui.WaffleChart
2307
+
2308
+ Waffle chart of named, colored segment counts.
2309
+
2310
+ - props: `data`, `rows`, `columns`, `total`, `gap`, `cell_radius`, `empty_color`, `with_tooltip`, `with_legend`, `legend_position` (top/bottom/left/right), `fill_direction` (left-to-right/right-to-left/top-to-bottom/bottom-to-top), `size`, `h`, `w`
2311
+
2312
+ ## data
2313
+
2314
+ ### ui.DataTable
2315
+
2316
+ Data table with typed columns (ui.Column) and stable row keys. Pass rows= for small local data or provider= (called with TableQuery offset/limit/sort/search/filters) for server data answered in bounded pages; only the visible page or virtual window is sent to the page. Sorting, per-column filters, search, selection, inline edit and row actions (ui.RowAction, optional confirm) are validated in Python.
2317
+
2318
+ - props: `columns`, `rows`, `row_key`, `page_size`, `total`, `selection` (none/single/multiple), `selected`, `searchable`, `striped`, `highlight_on_hover`, `loading`, `empty_text`, `row_actions`, `height`, `virtual`, `row_height`, `caption`
2319
+ - events: `on_selection_change`, `on_row_click`, `on_row_action`, `on_cell_edit`, `on_sort`
2320
+
2321
+ ## dates
2322
+
2323
+ ### ui.Calendar
2324
+
2325
+ Month calendar without its own value: highlight `selected_dates`, mark days with `indicators`, react to `day_click`; `date` is the shown month (committed when the user navigates).
2326
+
2327
+ - props: `date`, `selected_dates`, `indicators`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `min_date`, `max_date`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `number_of_columns`, `columns_to_scroll`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `full_width`, `size` (xs/sm/md/lg/xl), `min_level` (month/year/decade)
2328
+ - events: `on_date_change`, `on_day_click`
2329
+
2330
+ ### ui.DateInput
2331
+
2332
+ Free-text date input with a calendar dropdown. The value is a `datetime.date` (or a `datetime.datetime` with `with_time=True`); text is parsed with `value_format`.
2333
+
2334
+ - props: `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `value_format`, `with_time`, `fix_on_blur`, `allow_deselect`, `presets`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `min_date`, `max_date`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `size` (xs/sm/md/lg/xl)
2335
+ - events: `on_change`
2336
+
2337
+ ### ui.DatePicker
2338
+
2339
+ Inline calendar picker: one date, several dates (`type='multiple'`) or a range (`type='range'`, a (start, end) tuple). Values are `datetime.date`; min/max/excluded dates are checked again in Python.
2340
+
2341
+ - props: `type` (default/multiple/range), `value`, `date`, `indicators`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `min_date`, `max_date`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `number_of_columns`, `columns_to_scroll`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `full_width`, `size` (xs/sm/md/lg/xl), `allow_deselect`, `allow_single_date_in_range`, `presets`
2342
+ - events: `on_change`, `on_date_change`
2343
+
2344
+ ### ui.DatePickerInput
2345
+
2346
+ Button-like input opening a calendar dropdown; single, multiple or range selection of `datetime.date` values.
2347
+
2348
+ - props: `type` (default/multiple/range), `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `value_format`, `dropdown_type` (popover/modal), `close_on_change`, `sort_dates`, `label_separator`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `min_date`, `max_date`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `number_of_columns`, `columns_to_scroll`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `size` (xs/sm/md/lg/xl), `allow_deselect`, `allow_single_date_in_range`, `presets`
2349
+ - events: `on_change`
2350
+
2351
+ ### ui.DateTimePicker
2352
+
2353
+ Date and time picker input (dropdown calendar + time). Values are `datetime.datetime` (a (start, end) tuple with `type='range'`); see `timezone`.
2354
+
2355
+ - props: `timezone`, `type` (default/range), `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `value_format`, `dropdown_type` (popover/modal), `label_separator`, `with_seconds`, `default_time_value`, `presets`, `allow_single_date_in_range`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `number_of_columns`, `columns_to_scroll`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `size` (xs/sm/md/lg/xl), `min_date`, `max_date`
2356
+ - events: `on_change`
2357
+
2358
+ ### ui.InlineDateTimePicker
2359
+
2360
+ Inline calendar with time inputs and a submit button (`submit` event). Values are `datetime.datetime`; see `timezone`.
2361
+
2362
+ - props: `timezone`, `type` (default/range), `value`, `date`, `with_seconds`, `default_time_value`, `label_separator`, `presets`, `allow_single_date_in_range`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `number_of_columns`, `columns_to_scroll`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `full_width`, `size` (xs/sm/md/lg/xl), `min_date`, `max_date`
2363
+ - events: `on_change`, `on_date_change`, `on_submit`
2364
+
2365
+ ### ui.MaskedDateInput
2366
+
2367
+ Masked date input with separate day/month/year (and time) fields and an optional calendar dropdown. The value is a `datetime.date` (a `datetime.datetime` with `with_time=True`).
2368
+
2369
+ - props: `value`, `label`, `description`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `with_time`, `with_seconds`, `format` (24h/12h), `fields_order`, `date_separator`, `time_separator`, `with_dropdown`, `allow_deselect`, `size` (xs/sm/md/lg/xl), `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `min_date`, `max_date`, `excluded_dates`, `hide_outside_dates`, `highlight_today`
2370
+ - events: `on_change`
2371
+
2372
+ ### ui.MiniCalendar
2373
+
2374
+ Compact strip of days (`number_of_days`) starting at `date`; selecting a day commits it as a `datetime.date`.
2375
+
2376
+ - props: `value`, `date`, `number_of_days`, `min_date`, `max_date`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `size` (xs/sm/md/lg/xl), `month_label_format`
2377
+ - events: `on_change`, `on_date_change`
2378
+
2379
+ ### ui.MonthPicker
2380
+
2381
+ Inline month picker (single, multiple or range); values are `datetime.date` (first day of the month).
2382
+
2383
+ - props: `type` (default/multiple/range), `value`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `min_date`, `max_date`, `allow_deselect`, `allow_single_date_in_range`, `presets`, `size` (xs/sm/md/lg/xl), `full_width`, `number_of_columns`, `months_list_format`, `decade_label_format`, `date`
2384
+ - events: `on_change`, `on_date_change`
2385
+
2386
+ ### ui.MonthPickerInput
2387
+
2388
+ Input opening a month picker dropdown; values are `datetime.date`.
2389
+
2390
+ - props: `type` (default/multiple/range), `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `value_format`, `dropdown_type` (popover/modal), `close_on_change`, `sort_dates`, `label_separator`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `min_date`, `max_date`, `allow_deselect`, `allow_single_date_in_range`, `presets`, `size` (xs/sm/md/lg/xl), `full_width`, `number_of_columns`, `months_list_format`, `decade_label_format`
2391
+ - events: `on_change`
2392
+
2393
+ ### ui.QuarterPicker
2394
+
2395
+ Inline quarter picker (single, multiple or range); values are `datetime.date` (first day of the quarter).
2396
+
2397
+ - props: `type` (default/multiple/range), `value`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `min_date`, `max_date`, `allow_deselect`, `allow_single_date_in_range`, `presets`, `size` (xs/sm/md/lg/xl), `full_width`, `number_of_columns`, `quarters_list_format`, `decade_label_format`, `date`
2398
+ - events: `on_change`, `on_date_change`
2399
+
2400
+ ### ui.QuarterPickerInput
2401
+
2402
+ Input opening a quarter picker dropdown; values are `datetime.date`.
2403
+
2404
+ - props: `type` (default/multiple/range), `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `value_format`, `dropdown_type` (popover/modal), `close_on_change`, `sort_dates`, `label_separator`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `min_date`, `max_date`, `allow_deselect`, `allow_single_date_in_range`, `presets`, `size` (xs/sm/md/lg/xl), `full_width`, `number_of_columns`, `quarters_list_format`, `decade_label_format`
2405
+ - events: `on_change`
2406
+
2407
+ ### ui.TimeGrid
2408
+
2409
+ Grid of time slots (`data`); picking one commits it as a `datetime.time`. Busy slots go in `disable_time` (data, checked again in Python).
2410
+
2411
+ - props: `value`, `data`, `format` (24h/12h), `with_seconds`, `min_time`, `max_time`, `disable_time`, `allow_deselect`, `disabled`, `size` (xs/sm/md/lg/xl), `radius`
2412
+ - events: `on_change`
2413
+
2414
+ ### ui.TimeInput
2415
+
2416
+ Native time input; the value is a `datetime.time` (None when empty). `min_time`/`max_time` are checked again in Python.
2417
+
2418
+ - props: `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `radius`, `variant` (default/filled/unstyled), `with_seconds`, `min_time`, `max_time`, `size` (xs/sm/md/lg/xl)
2419
+ - events: `on_change`
2420
+
2421
+ ### ui.TimePicker
2422
+
2423
+ Segmented time picker (hours/minutes[/seconds], 12h or 24h) with an optional dropdown and preset times; the value is a `datetime.time`.
2424
+
2425
+ - props: `value`, `label`, `description`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `format` (24h/12h), `with_seconds`, `min`, `max`, `hours_step`, `minutes_step`, `seconds_step`, `with_dropdown`, `presets`, `size` (xs/sm/md/lg/xl)
2426
+ - events: `on_change`
2427
+
2428
+ ### ui.TimeValue
2429
+
2430
+ Formatted time text (12h/24h, optional seconds) of a `datetime.time`.
2431
+
2432
+ - props: `value`, `format` (24h/12h), `with_seconds`
2433
+
2434
+ ### ui.WeekPicker
2435
+
2436
+ Inline week picker (single, multiple or range); a week is its first day (`datetime.date`, depends on `first_day_of_week`).
2437
+
2438
+ - props: `type` (default/multiple/range), `value`, `date`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `min_date`, `max_date`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `number_of_columns`, `columns_to_scroll`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `full_width`, `size` (xs/sm/md/lg/xl), `allow_deselect`, `allow_single_date_in_range`, `presets`
2439
+ - events: `on_change`, `on_date_change`
2440
+
2441
+ ### ui.WeekPickerInput
2442
+
2443
+ Input opening a week picker dropdown; weeks are their first day (`datetime.date`).
2444
+
2445
+ - props: `type` (default/multiple/range), `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `value_format`, `dropdown_type` (popover/modal), `close_on_change`, `sort_dates`, `label_separator`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `first_day_of_week`, `weekend_days`, `min_date`, `max_date`, `excluded_dates`, `hide_outside_dates`, `hide_weekdays`, `highlight_today`, `with_week_numbers`, `number_of_columns`, `columns_to_scroll`, `max_level` (month/year/decade), `default_level` (month/year/decade), `month_label_format`, `weekday_format`, `enable_keyboard_navigation`, `size` (xs/sm/md/lg/xl), `allow_deselect`, `allow_single_date_in_range`, `presets`
2446
+ - events: `on_change`
2447
+
2448
+ ### ui.YearPicker
2449
+
2450
+ Inline year picker (single, multiple or range); values are `datetime.date` (first day of the year).
2451
+
2452
+ - props: `type` (default/multiple/range), `value`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `min_date`, `max_date`, `allow_deselect`, `allow_single_date_in_range`, `presets`, `size` (xs/sm/md/lg/xl), `full_width`, `number_of_columns`, `years_list_format`, `decade_label_format`, `date`
2453
+ - events: `on_change`, `on_date_change`
2454
+
2455
+ ### ui.YearPickerInput
2456
+
2457
+ Input opening a year picker dropdown; values are `datetime.date`.
2458
+
2459
+ - props: `type` (default/multiple/range), `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `clearable`, `radius`, `variant` (default/filled/unstyled), `value_format`, `dropdown_type` (popover/modal), `close_on_change`, `sort_dates`, `label_separator`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `min_date`, `max_date`, `allow_deselect`, `allow_single_date_in_range`, `presets`, `size` (xs/sm/md/lg/xl), `full_width`, `number_of_columns`, `years_list_format`, `decade_label_format`
2460
+ - events: `on_change`
2461
+
2462
+ ## display
2463
+
2464
+ ### ui.Accordion
2465
+
2466
+ Expandable items. 'value' (the open item value, or a list when multiple=True) is owned by Python; user toggles emit change.
2467
+
2468
+ - props: `value`, `multiple`, `variant` (default/contained/filled/separated), `chevron_position` (left/right), `chevron_size`, `disable_chevron_rotation`, `transition_duration`, `radius`, `order`, `loop`, `keep_mounted`
2469
+ - events: `on_change`
2470
+
2471
+ ### ui.AccordionItem
2472
+
2473
+ An accordion item: 'label' is the control text, children are the panel.
2474
+
2475
+ - props: `value`, `label`, `icon`, `disabled`
2476
+
2477
+ ### ui.Avatar
2478
+
2479
+ Image, initials (from 'name' with color='initials') or icon avatar.
2480
+
2481
+ - props: `text`, `src`, `alt`, `name`, `color`, `size`, `radius`, `variant` (filled/light/outline/transparent/white/default)
2482
+
2483
+ ### ui.AvatarGroup
2484
+
2485
+ Overlapping group of avatars (add a '+N' Avatar for overflow).
2486
+
2487
+ - props: `spacing`
2488
+
2489
+ ### ui.BackgroundImage
2490
+
2491
+ Container with a background image; content goes on top.
2492
+
2493
+ - props: `src`, `radius`, `h`, `w`
2494
+
2495
+ ### ui.Collapse
2496
+
2497
+ Animated show/hide of its children; 'expanded' is controlled from Python.
2498
+
2499
+ - props: `expanded`, `orientation` (vertical/horizontal), `transition_duration`, `animate_opacity`, `keep_mounted`
2500
+
2501
+ ### ui.ColorSwatch
2502
+
2503
+ Color sample; the click event makes it selectable.
2504
+
2505
+ - props: `color`, `size`, `radius`, `with_shadow`
2506
+ - events: `on_click`
2507
+
2508
+ ### ui.DataList
2509
+
2510
+ Label/value list; add DataListItem children.
2511
+
2512
+ - props: `orientation` (horizontal/vertical), `size`, `gap`, `with_divider`, `label_width`
2513
+
2514
+ ### ui.DataListItem
2515
+
2516
+ One label/value row: 'label' is the label, children are the value.
2517
+
2518
+ - props: `label`
2519
+
2520
+ ### ui.EmptyState
2521
+
2522
+ Placeholder for empty results: icon, title, description and an 'actions' slot.
2523
+
2524
+ - props: `title`, `description`, `icon`, `variant` (filled/light), `align` (left/center/right), `color`, `size`, `with_indicator_background`
2525
+ - slots: `actions`
2526
+
2527
+ ### ui.Image
2528
+
2529
+ Image with fit, radius and a fallback source. Use bundled assets or data URLs (no network needed).
2530
+
2531
+ - props: `src`, `alt`, `fallback_src`, `fit` (contain/cover/fill/none/scale-down), `radius`, `w`, `h`, `maw`
2532
+
2533
+ ### ui.Indicator
2534
+
2535
+ Dot or label badge attached to a corner of its child.
2536
+
2537
+ - props: `label`, `color`, `size`, `radius`, `position` (top-start/top-center/top-end/middle-start/middle-center/middle-end/bottom-start/bottom-center/bottom-end), `offset`, `inline`, `with_border`, `disabled`, `processing`, `max_value`, `show_zero`
2538
+
2539
+ ### ui.Marquee
2540
+
2541
+ Continuously scrolling content.
2542
+
2543
+ - props: `reverse`, `pause_on_hover`, `orientation` (horizontal/vertical), `repeat`, `duration`, `gap`, `fade_edges`, `fade_edge_size`
2544
+
2545
+ ### ui.RollingNumber
2546
+
2547
+ Animated number display.
2548
+
2549
+ - props: `value`, `prefix`, `suffix`, `decimal_scale`, `fixed_decimal_scale`, `thousand_separator`, `decimal_separator`, `animation_duration`, `tabular_numbers`, `with_live_region`
2550
+
2551
+ ### ui.Spoiler
2552
+
2553
+ Collapses tall content with a show/hide control. 'expanded' is owned by Python; the user's toggle emits change.
2554
+
2555
+ - props: `expanded`, `max_height`, `show_label`, `hide_label`, `transition_duration`
2556
+ - events: `on_change`
2557
+
2558
+ ### ui.ThemeIcon
2559
+
2560
+ Colored square/circle holding an Icon.
2561
+
2562
+ - props: `size`, `color`, `radius`, `variant` (filled/light/outline/default/transparent/white/gradient), `gradient`
2563
+
2564
+ ### ui.Timeline
2565
+
2566
+ Vertical timeline; 'active' is the index of the last reached item.
2567
+
2568
+ - props: `active`, `align` (left/right), `bullet_size`, `line_width`, `color`, `radius`, `reverse_active`
2569
+
2570
+ ### ui.TimelineItem
2571
+
2572
+ One timeline entry (bullet icon, title, body children).
2573
+
2574
+ - props: `title`, `bullet`, `opposite`, `color`, `radius`, `line_variant` (solid/dashed/dotted)
2575
+
2576
+ ## editors
2577
+
2578
+ ### ui.CodeEditor
2579
+
2580
+ Code editor (CodeMirror 6, bundled, offline): syntax highlighting for a curated language set loaded on demand, undo/redo history, search (Mod-F), bracket matching and a Mod-S save event. The document commits to Python after a pause or on blur; assigning value from Python replaces it while keeping the caret where possible.
2581
+
2582
+ - props: `value`, `language` (plain/python/javascript/typescript/jsx/tsx/json/markdown/html/css/sql/yaml), `read_only`, `line_numbers`, `tab_size`, `wrap`, `height`, `max_height`, `placeholder`, `label`, `description`, `error`, `name`, `required`, `debounce`
2583
+ - events: `on_change`, `on_save`, `on_selection_change`, `on_focus`, `on_blur`
2584
+
2585
+ ### ui.CodeHighlight
2586
+
2587
+ Read-only highlighted code with copy/expand controls. Highlighting uses the bundled CodeMirror grammars (no CDN, no network); it is a display, not an editor (see CodeEditor). inline=True renders an inline code span.
2588
+
2589
+ - props: `code`, `language` (plain/python/javascript/typescript/jsx/tsx/json/markdown/html/css/sql/yaml), `inline`, `with_copy_button`, `with_line_numbers`, `with_border`, `with_expand_button`, `default_expanded`, `max_collapsed_height`, `radius`, `background`, `code_color_scheme` (light/dark), `copy_label`, `copied_label`, `expand_code_label`, `collapse_code_label`
2590
+
2591
+ ### ui.CodeHighlightTabs
2592
+
2593
+ Several highlighted files in tabs (read-only). value is the active tab index; the change event reports tab switches.
2594
+
2595
+ - props: `code`, `value`, `with_copy_button`, `with_line_numbers`, `with_border`, `with_expand_button`, `default_expanded`, `max_collapsed_height`, `radius`, `background`, `code_color_scheme` (light/dark), `copy_label`, `copied_label`, `expand_code_label`, `collapse_code_label`
2596
+ - events: `on_change`
2597
+
2598
+ ### ui.DiffViewer
2599
+
2600
+ Line diff of two texts (unified or split view) with word/char/line highlights; computed in the page from the two strings (no network).
2601
+
2602
+ - props: `previous_value`, `current_value`, `mode` (unified/split), `diff_method` (chars/words/lines), `context_lines`, `with_line_numbers`, `add_color`, `remove_color`
2603
+
2604
+ ### ui.JsonViewer
2605
+
2606
+ Collapsible tree view of JSON-safe data with types, sizes, copy and line numbers. The select event carries the clicked path (list of keys); resolve the value from your own data.
2607
+
2608
+ - props: `value`, `root_name`, `default_expand_depth`, `max_display_length`, `with_types`, `with_size`, `with_copy`, `with_copy_button`, `with_quotes`, `with_key_quotes`, `collapse_strings_after_length`, `sort_keys`, `group_arrays_after_length`, `radius`, `font_size`, `indent_width`, `with_border`, `with_controls`, `all_expanded`, `with_line_numbers`, `with_chevrons`, `highlight_items`, `copy_label`, `copied_label`, `expand_all_label`, `collapse_all_label`
2609
+ - events: `on_select`
2610
+
2611
+ ### ui.Markdown
2612
+
2613
+ Renders GitHub-flavoured Markdown as sanitised HTML inside Typography styles: raw HTML in the source is filtered (no scripts, frames, styles, forms or inline event handlers), links are limited to http(s), mailto and #fragments and open in the system browser, images only from the app's own files.
2614
+
2615
+ - props: `markdown`, `typography`
2616
+
2617
+ ### ui.MarkdownEditor
2618
+
2619
+ Markdown source editor (CodeMirror, markdown mode) with a live preview that is rendered from GitHub-flavoured Markdown and sanitised (no scripts, frames, inline event handlers or unsafe links). Commits like CodeEditor; Mod-S emits save.
2620
+
2621
+ - props: `value`, `mode` (edit/preview/split), `read_only`, `line_numbers`, `wrap`, `height`, `placeholder`, `label`, `description`, `error`, `name`, `required`, `debounce`
2622
+ - events: `on_change`, `on_save`, `on_focus`, `on_blur`
2623
+
2624
+ ### ui.RichTextEditor
2625
+
2626
+ Rich-text editor (Tiptap StarterKit with the Mantine toolbar). The content is HTML (or Tiptap JSON with output_format='json'), sanitised with DOMPurify on the way in and out; links are limited to http(s), mailto and #fragments, pasted HTML is filtered. Commits after a pause or on blur.
2627
+
2628
+ - props: `value`, `output_format` (html/json), `toolbar`, `read_only`, `variant` (default/subtle), `sticky_toolbar`, `min_height`, `label`, `description`, `error`, `name`, `required`, `debounce`
2629
+ - events: `on_change`, `on_focus`, `on_blur`
2630
+
2631
+ ## extension
2632
+
2633
+ ### ui.CustomComponent
2634
+
2635
+ Mount an application-registered custom component (plain JS adapter or compiled React component loaded with add_js_module). props are passed as JSON; the component's emit(name, data) arrives as an 'event' with payload {name, data} (JSON, at most 256 KiB); send(name, data) calls its command(). Failures in the page are contained and arrive as 'error'.
2636
+
2637
+ - props: `component`, `props`
2638
+ - events: `on_event`, `on_error`
2639
+
2640
+ ### ui.Html
2641
+
2642
+ HTML content. trusted=True renders developer-authored markup as-is (scripts and inline handlers still cannot run under the page CSP); otherwise the markup is sanitized like Markdown (DOMPurify: no scripts, handlers, forms, inputs, media or inline styles; links only http(s), mailto or #) and its links open in the system browser, so user, AI or network content can neither run code nor navigate the app window.
2643
+
2644
+ - props: `html`, `trusted`
2645
+
2646
+ ## extensions
2647
+
2648
+ ### ui.Carousel
2649
+
2650
+ Slides (CarouselSlide children) scrolled with controls, indicators, drag or the arrow/Home/End keys. 'slide' is the active index: the page commits it with 'slide_change' and assigning it from Python scrolls there. Embla options are an allowlist of plain props (loop, align, drag_free, slides_to_scroll, contain_scroll, skip_snaps, duration).
2651
+
2652
+ - props: `slide`, `slide_size`, `slide_gap`, `height`, `orientation` (horizontal/vertical), `type` (media/container), `with_controls`, `with_indicators`, `with_keyboard_events`, `control_size`, `controls_offset`, `include_gap_in_size`, `loop`, `align` (start/center/end), `drag_free`, `slides_to_scroll`, `contain_scroll` (trimSnaps/keepSnaps/none), `skip_snaps`, `duration`
2653
+ - events: `on_slide_change`
2654
+
2655
+ ### ui.CarouselSlide
2656
+
2657
+ One slide of a Carousel; its children are the slide content. Size and gap come from the Carousel's slide_size/slide_gap.
2658
+
2659
+
2660
+ ### ui.DragDropList
2661
+
2662
+ Sortable list (or table when 'columns' is set) of 'items' ({key, label, description?, icon?, disabled?, cells?}). Items are reordered by pointer drag (whole row or the drag handle) or by keyboard (Space to lift, arrow keys to move, Space to drop, Escape to cancel); 'reorder' sends the new key order, which Python validates and stores. Assigning 'items' (or move()) reorders the page.
2663
+
2664
+ - props: `items`, `columns`, `with_handle`, `disabled`, `gap`, `with_border`, `label`
2665
+ - events: `on_reorder`
2666
+
2667
+ ### ui.Dropzone
2668
+
2669
+ Drop area (and in-page file chooser) for files. Python re-validates every file: count (max_files), size (max_size), type (accept MIME types, wildcards like 'image/*' or extensions like '.csv', checked against the file name) and the name itself (no path parts, control characters or reserved names). 'drop' carries the accepted files and the rejections; accepted file content is read on demand in bounded chunks (DroppedFile.read()), never as paths.
2670
+
2671
+ - props: `accept`, `max_size`, `max_files`, `multiple`, `disabled`, `loading`, `radius`, `accept_color`, `reject_color`, `activate_on_click`, `activate_on_drag`, `activate_on_keyboard`, `min_height`
2672
+ - events: `on_drop`
2673
+ - slots: `idle_content`, `accept_content`, `reject_content`
2674
+
2675
+ ### ui.DropzoneFullScreen
2676
+
2677
+ Window-wide drop target shown while files are dragged over the window; same validation and 'drop' event as Dropzone.
2678
+
2679
+ - props: `accept`, `max_size`, `max_files`, `multiple`, `disabled`, `active`, `z_index`, `radius`, `accept_color`, `reject_color`
2680
+ - events: `on_drop`
2681
+ - slots: `idle_content`, `accept_content`, `reject_content`
2682
+
2683
+ ### ui.EmojiPicker
2684
+
2685
+ Emoji grid with search, categories, skin tones and preview, using the emoji data bundled with the renderer (offline, no CDN). 'select' reports the picked emoji as {id, emoji, name}, validated in Python against the same data.
2686
+
2687
+ - props: `columns`, `emoji_size`, `size` (xs/sm/md/lg/xl), `with_search`, `with_category_nav`, `with_preview`, `with_skin_tone_selector`, `skin_tone`, `search_placeholder`, `categories`, `recent`, `auto_focus`
2688
+ - events: `on_select`
2689
+
2690
+ ### ui.EmojiPickerInput
2691
+
2692
+ Input whose value is an emoji id, picked from a popover EmojiPicker (bundled data). The value is committed on pick ('change'); Python accepts only known emoji ids.
2693
+
2694
+ - props: `value`, `label`, `description`, `error`, `placeholder`, `clearable`, `disabled`, `read_only`, `required`, `size` (xs/sm/md/lg/xl), `radius`, `close_on_select`, `name`
2695
+ - events: `on_change`
2696
+
2697
+ ### ui.EmojiPickerPopover
2698
+
2699
+ Opens an EmojiPicker (bundled data) in a popover from its child target (e.g. a button); 'select' reports the picked emoji like EmojiPicker.
2700
+
2701
+ - props: `close_on_select`, `columns`, `with_preview`, `with_skin_tone_selector`, `position` (bottom/top/left/right/bottom-start/bottom-end/top-start/top-end), `recent`
2702
+ - events: `on_select`
2703
+
2704
+ ### ui.Lightbox
2705
+
2706
+ Full-window image/video viewer over 'slides' ({src, alt?, caption?, thumb_src?} images or {type: 'video', src, poster?, label?}). 'opened' and 'index' are owned by Python; the arrows, thumbnails, swipes and the arrow keys commit 'index' ('index_change'); Escape or the close button sends 'close'. Sources are app assets (app.add_asset) or http(s) URLs.
2707
+
2708
+ - props: `opened`, `slides`, `index`, `with_thumbnails`, `with_zoom`, `with_fullscreen`, `with_navigation`, `with_keyboard_events`, `loop`, `close_on_click_outside`
2709
+ - events: `on_close`, `on_index_change`
2710
+
2711
+ ### ui.Notifications
2712
+
2713
+ Options of the window's notifications host while this component is mounted (one per page): position, limit (others queue), auto close, layout. Show notifications with Window.notify / update_notification / hide_notification / clean_notifications.
2714
+
2715
+ - props: `position` (top-left/top-right/top-center/bottom-left/bottom-right/bottom-center), `limit`, `auto_close`, `transition_duration`, `container_width`, `z_index`, `layout` (default/stacked), `with_auto_close_progress`, `allow_drag_dismiss`, `pause_reset_on_hover` (all/notification)
2716
+
2717
+ ### ui.Spotlight
2718
+
2719
+ Command palette over the page, opened by its shortcut (default 'mod+k'), by Spotlight.open() or by assigning 'opened'. 'actions' are typed data ({id, label, description?, group?, keywords?, icon?, disabled?, hotkey?}); choosing one sends 'action' with its id (validated in Python). The query is filtered in the page (filter='page') or committed to Python ('query_change', debounced) which replaces 'actions' (filter='python').
2720
+
2721
+ - props: `opened`, `actions`, `query`, `filter` (page/python), `shortcut`, `limit`, `nothing_found`, `search_placeholder`, `highlight_query`, `close_on_action_trigger`, `clear_query_on_close`, `scrollable`, `max_height`, `debounce`
2722
+ - events: `on_close`, `on_open`, `on_query_change`, `on_action`
2723
+
2724
+ ## feedback
2725
+
2726
+ ### ui.Alert
2727
+
2728
+ Highlighted message; 'text' or children are the body. With with_close_button the close icon sends 'close' (hide it with visible=False).
2729
+
2730
+ - props: `title`, `text`, `color`, `variant` (light/filled/outline/default/transparent/white), `radius`, `with_close_button`, `close_button_label`
2731
+ - events: `on_close`
2732
+ - slots: `icon`
2733
+
2734
+ ### ui.Loader
2735
+
2736
+ Animated loading indicator.
2737
+
2738
+ - props: `type` (oval/bars/dots), `size`, `color`
2739
+
2740
+ ### ui.Notification
2741
+
2742
+ Notification card shown inline (not a toast). Close icon sends 'close'.
2743
+
2744
+ - props: `title`, `text`, `color`, `radius`, `loading`, `with_border`, `with_close_button`
2745
+ - events: `on_close`
2746
+ - slots: `icon`
2747
+
2748
+ ### ui.Progress
2749
+
2750
+ Linear progress bar: 'value' (0..100) or several 'sections' [{value, color?, label?, tooltip?}].
2751
+
2752
+ - props: `value`, `sections`, `color`, `size`, `radius`, `striped`, `animated`, `transition_duration`, `orientation` (horizontal/vertical)
2753
+
2754
+ ### ui.RingProgress
2755
+
2756
+ Ring chart of sections [{value, color, tooltip?}] (values add up to at most 100).
2757
+
2758
+ - props: `sections`, `label`, `size`, `thickness`, `round_caps`, `root_color`, `transition_duration`, `start_angle`
2759
+
2760
+ ### ui.SemiCircleProgress
2761
+
2762
+ Half-circle gauge for 'value' (0..100).
2763
+
2764
+ - props: `value`, `size`, `thickness`, `orientation` (up/down), `fill_direction` (right-to-left/left-to-right), `filled_segment_color`, `empty_segment_color`, `label`, `label_position` (center/bottom), `transition_duration`
2765
+
2766
+ ### ui.Skeleton
2767
+
2768
+ Placeholder block shown while content loads (hidden with visible=False).
2769
+
2770
+ - props: `height`, `width`, `circle`, `radius`, `animate`
2771
+
2772
+ ## forms
2773
+
2774
+ ### ui.Field
2775
+
2776
+ Named field scope inside a Form: the names of the inputs inside are prefixed with this name (nested values, path-keyed errors such as 'company.address.city'). Shows a fieldset with a legend when one is given, and the scope's own error.
2777
+
2778
+ - props: `name`, `legend`, `description`, `error`, `variant` (default/filled/unstyled), `gap`
2779
+
2780
+ ### ui.FieldList
2781
+
2782
+ Repeated field groups inside a Form (order lines, contacts): each item is a FieldListItem built by a Python template; the user adds, removes and reorders items (Python applies it, keeping stable item keys) and values submit as a list of objects ('lines.0.sku').
2783
+
2784
+ - props: `name`, `label`, `description`, `error`, `add_label`, `min_items`, `max_items`, `addable`, `removable`, `reorderable`, `empty_text`
2785
+ - events: `on_add`, `on_remove`, `on_move`
2786
+
2787
+ ### ui.FieldListItem
2788
+
2789
+ One item of a FieldList (its key is the component id); holds the item's inputs in a row.
2790
+
2791
+ - props: `gap`, `align` (flex-start/center/flex-end/stretch/baseline), `wrap` (wrap/nowrap), `grow`
2792
+
2793
+ ### ui.Form
2794
+
2795
+ Form container. Submitting (a Button type='submit' or Enter in a field) sends a complete snapshot of the named fields' current drafts, also text not committed yet; Python validates (types, required, validators, form validate), commits atomically and calls on_submit with values nested by field path, or returns errors to the fields. Field/FieldList scopes nest names; hidden fields are not submitted.
2796
+
2797
+ - props: `disabled`, `error`, `validate_on` (submit/change), `cancelable`, `cancel_label`
2798
+ - events: `on_submit`, `on_cancel`, `on_reset`
2799
+
2800
+ ## icons
2801
+
2802
+ ### ui.Icon
2803
+
2804
+ A named icon from the bundled icon set (works offline). Other components take the same names in their icon props; unknown names show a placeholder icon.
2805
+
2806
+ - props: `name` (activity/adjustments/alert-circle/alert-triangle/align-center/align-left/align-right/archive/arrow-back-up/arrow-down/arrow-forward-up/arrow-left/arrow-right/arrow-up/arrows-maximize/arrows-sort/battery/bell/bluetooth/bold/bolt/book/bookmark/box/briefcase/brush/bug/building-store/bulb/calendar/camera/chart-bar/chart-line/chart-pie/check/checkbox/chevron-down/chevron-left/chevron-right/chevron-up/chevrons-left/chevrons-right/circle/circle-check/circle-plus/circle-x/clipboard/clipboard-check/clock/cloud/cloud-download/cloud-upload/code/compass/copy/cpu/credit-card/currency-dollar/dashboard/database/device-desktop/device-floppy/device-laptop/device-mobile/dots/dots-vertical/download/edit/external-link/eye/eye-off/file/file-code/file-plus/file-text/filter/flag/flame/folder/folder-open/folder-plus/gift/git-branch/git-commit/git-merge/git-pull-request/grip-horizontal/grip-vertical/heart/heart-filled/help-circle/history/home/hourglass/id-badge/inbox/info-circle/italic/key/language/layout-grid/layout-sidebar/link/list/list-details/loader/lock/lock-open/login/logout/mail/map-pin/maximize/menu/menu-2/message/messages/microphone/minimize/minus/moon/music/news/notes/package/palette/paperclip/pencil/phone/photo/pin/player-pause/player-play/player-record/player-skip-back/player-skip-forward/player-stop/playlist/plug/plus/point/power/printer/question-mark/receipt/refresh/reload/robot/rocket/rotate/scale/school/search/selector/send/server/settings/share/shield/shield-check/shopping-cart/sitemap/sort-ascending/sort-descending/square/stack-2/star/star-filled/sun/table/tag/template/terminal-2/thumb-down/thumb-up/timeline/toggle-left/tool/tools/trash/trophy/truck/typography/underline/unlink/upload/user/user-circle/users/video/volume/volume-off/wallet/wifi/world/x/zoom-in/zoom-out), `size`, `color`, `stroke`
2807
+
2808
+ ## inputs
2809
+
2810
+ ### ui.JsonInput
2811
+
2812
+ Text area for JSON. `value` is the text; parsing and schema validation belong to Python (use `error`).
2813
+
2814
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `format_on_blur`, `validation_error`, `autosize`, `min_rows`, `max_rows`, `indent_spaces`, `debounce`
2815
+ - events: `on_change`, `on_blur`, `on_focus`
2816
+
2817
+ ### ui.MaskInput
2818
+
2819
+ Text input constrained to a mask (`9` digit, `a` letter, `A` upper-case letter, `*` letter or digit, `#` digit or sign; other characters are literal). `value` is the masked text; `complete` fires with the masked text when every slot is filled.
2820
+
2821
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `mask`, `slot_char`, `always_show_mask`, `show_mask_on_focus`, `auto_clear`, `separate`, `debounce`
2822
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`, `on_complete`
2823
+ - slots: `left_section`, `right_section`
2824
+
2825
+ ### ui.NumberInput
2826
+
2827
+ Numeric input with step buttons, formatting and clamping. The value is a finite number, or None when the field is empty.
2828
+
2829
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `min`, `max`, `step`, `decimal_scale`, `fixed_decimal_scale`, `thousand_separator`, `decimal_separator`, `prefix`, `suffix`, `allow_negative`, `allow_decimal`, `hide_controls`, `clamp_behavior` (strict/blur/none), `start_value`, `debounce`
2830
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
2831
+ - slots: `left_section`, `right_section`
2832
+
2833
+ ### ui.PasswordInput
2834
+
2835
+ Password field with a show/hide toggle. The value is kept as a page draft and committed after a pause; never log it.
2836
+
2837
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `read_only`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `value`, `default_visible`, `debounce`, `autocomplete`
2838
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
2839
+ - slots: `left_section`
2840
+
2841
+ ### ui.PhoneInput
2842
+
2843
+ International phone number input with country selection. `value` is the raw number text; validate it in Python.
2844
+
2845
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `default_country`, `preferred_countries`, `only_countries`, `exclude_countries`, `searchable`, `international`, `with_extension`, `with_country_auto_detect`, `debounce`
2846
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
2847
+
2848
+ ### ui.PinInput
2849
+
2850
+ One-time code input with one box per character. `change` follows the typed text; `complete` fires when every box is filled.
2851
+
2852
+ - props: `name`, `value`, `length`, `type` (alphanumeric/number), `mask`, `one_time_code`, `placeholder`, `manage_focus`, `disabled`, `read_only`, `error`, `size`, `radius`, `gap`, `required`, `debounce`
2853
+ - events: `on_change`, `on_blur`, `on_focus`, `on_complete`
2854
+
2855
+ ### ui.Rating
2856
+
2857
+ Star rating. `value` is the rating (fractions allowed); read_only displays it.
2858
+
2859
+ - props: `name`, `value`, `count`, `fractions`, `size`, `color`, `read_only`, `highlight_selected_only`, `allow_clear`
2860
+ - events: `on_change`
2861
+
2862
+ ### ui.SearchInput
2863
+
2864
+ Search field: a text input with a search icon and a clear button. Escape clears it. Commits after a pause like TextInput.
2865
+
2866
+ - props: `value`, `placeholder`, `label`, `description`, `error`, `name`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `clearable`, `debounce`
2867
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
2868
+ - slots: `left_section`
2869
+
2870
+ ### ui.TextInput
2871
+
2872
+ Single-line text input. The page owns the draft while typing; the value commits after a pause (debounce) or on blur, and form submissions always use the current draft.
2873
+
2874
+ - props: `value`, `label`, `description`, `placeholder`, `error`, `name`, `required`, `disabled`, `read_only`, `size`, `radius`, `max_length`, `autocomplete`, `debounce`
2875
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
2876
+ - slots: `left_section`, `right_section`
2877
+
2878
+ ### ui.Textarea
2879
+
2880
+ Multi-line text input; the draft stays in the page while typing and commits after a pause or on blur.
2881
+
2882
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `autosize`, `min_rows`, `max_rows`, `resize` (none/vertical/both/horizontal), `max_length`, `debounce`
2883
+ - events: `on_change`, `on_blur`, `on_focus`
2884
+ - slots: `left_section`, `right_section`
2885
+
2886
+ ## inputs-advanced
2887
+
2888
+ ### ui.AlphaSlider
2889
+
2890
+ Alpha (opacity) slider over a colour, 0-1. The value commits when the user releases the thumb (or presses an arrow key); `change_end` is delivered right after.
2891
+
2892
+ - props: `value`, `color`, `size`
2893
+ - events: `on_change`, `on_change_end`
2894
+
2895
+ ### ui.AngleSlider
2896
+
2897
+ Circular slider for an angle in degrees (0-360). The value commits when the user releases the thumb (or presses an arrow key); `change_end` is delivered right after.
2898
+
2899
+ - props: `name`, `value`, `step`, `with_label`, `marks`, `restrict_to_marks`, `size`, `thumb_size`, `disabled`
2900
+ - events: `on_change`, `on_change_end`
2901
+
2902
+ ### ui.ColorInput
2903
+
2904
+ Text input with a colour preview and picker popover. `value` is a colour string in `format`.
2905
+
2906
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `format` (hex/hexa/rgb/rgba/hsl/hsla), `swatches`, `swatches_per_row`, `with_picker`, `with_eye_dropper`, `with_preview`, `fix_on_blur`, `close_on_color_swatch_click`, `disallow_input`, `debounce`
2907
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
2908
+
2909
+ ### ui.ColorPicker
2910
+
2911
+ Colour picker panel. `value` is a colour string in `format`. The value commits when the user releases the thumb (or presses an arrow key); `change_end` is delivered right after.
2912
+
2913
+ - props: `name`, `value`, `format` (hex/hexa/rgb/rgba/hsl/hsla), `swatches`, `swatches_per_row`, `with_picker`, `size`, `full_width`
2914
+ - events: `on_change`, `on_change_end`
2915
+
2916
+ ### ui.FileInput
2917
+
2918
+ File selection inside the page. The value is a list of {name, size, type} for the chosen files; contents are never sent. Python can only clear it (set value=[]). Native file paths come from the native dialog (app.open_file / Window.pick_files), not from this control.
2919
+
2920
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `value`, `multiple`, `accept`, `clearable`
2921
+ - events: `on_change`
2922
+ - slots: `left_section`, `right_section`
2923
+
2924
+ ### ui.HueSlider
2925
+
2926
+ Hue slider (0-360). The value commits when the user releases the thumb (or presses an arrow key); `change_end` is delivered right after.
2927
+
2928
+ - props: `value`, `size`
2929
+ - events: `on_change`, `on_change_end`
2930
+
2931
+ ### ui.Mentions
2932
+
2933
+ Text area with @-style mentions. `value` is the markup text (for example `Hi @[Ada](ada)`); `triggers` list the trigger characters and their suggestions. A `search` event reports queries so Python can replace suggestions.
2934
+
2935
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `triggers`, `single_line`, `min_rows`, `max_rows`, `nothing_found_message`, `debounce`, `search_debounce`
2936
+ - events: `on_change`, `on_blur`, `on_focus`, `on_search`
2937
+
2938
+ ### ui.RangeSlider
2939
+
2940
+ Slider for a [low, high] range. The value commits when the user releases the thumb (or presses an arrow key); `change_end` is delivered right after.
2941
+
2942
+ - props: `value`, `name`, `min`, `max`, `step`, `precision`, `marks`, `label_always_on`, `show_label_on_hover`, `restrict_to_marks`, `inverted`, `thumb_size`, `orientation` (horizontal/vertical), `disabled`, `size`, `radius`, `color`, `min_range`, `max_range`, `push_on_overlap`
2943
+ - events: `on_change`, `on_change_end`
2944
+
2945
+ ### ui.Slider
2946
+
2947
+ Slider for one number. The value commits when the user releases the thumb (or presses an arrow key); `change_end` is delivered right after.
2948
+
2949
+ - props: `value`, `name`, `min`, `max`, `step`, `precision`, `marks`, `label_always_on`, `show_label_on_hover`, `restrict_to_marks`, `inverted`, `thumb_size`, `orientation` (horizontal/vertical), `disabled`, `size`, `radius`, `color`
2950
+ - events: `on_change`, `on_change_end`
2951
+
2952
+ ## inputs-choice
2953
+
2954
+ ### ui.Autocomplete
2955
+
2956
+ Text input with suggestions; the value is free text. `change` follows the typed text (debounced), so it drives server-side suggestions: replace `data` in the handler and set client_filter=False.
2957
+
2958
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `value`, `data`, `client_filter`, `clearable`, `select_first_option_on_change`, `debounce`, `max_dropdown_height`, `limit`
2959
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
2960
+ - slots: `left_section`, `right_section`
2961
+
2962
+ ### ui.Cascader
2963
+
2964
+ Pick a path through nested options. `value` is the list of option values from root to leaf, or None.
2965
+
2966
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `data`, `value`, `change_on_select`, `allow_deselect`, `expand_trigger` (click/hover), `searchable`, `clearable`, `nothing_found_message`, `with_columns`, `separator`
2967
+ - events: `on_change`
2968
+ - slots: `left_section`, `right_section`
2969
+
2970
+ ### ui.Checkbox
2971
+
2972
+ Checkbox. Standalone it commits `checked`; inside a CheckboxGroup it is a member identified by `value`.
2973
+
2974
+ - props: `checked`, `value`, `label`, `description`, `error`, `name`, `required`, `disabled`, `indeterminate`, `size`, `radius`, `color`, `label_position` (left/right)
2975
+ - events: `on_change`
2976
+
2977
+ ### ui.CheckboxCard
2978
+
2979
+ Card that toggles like a checkbox; standalone it commits `checked`, in a CheckboxGroup it is a member by `value`. Put any content inside.
2980
+
2981
+ - props: `checked`, `value`, `with_border`, `radius`, `indeterminate`, `name`
2982
+ - events: `on_change`
2983
+
2984
+ ### ui.CheckboxGroup
2985
+
2986
+ Group of checkboxes; `value` is the list of checked item values. Commit is atomic per click.
2987
+
2988
+ - props: `label`, `description`, `error`, `value`, `name`, `required`, `size`, `with_asterisk`, `max_selected_values`, `read_only`, `disabled`
2989
+ - events: `on_change`
2990
+
2991
+ ### ui.CheckboxIndicator
2992
+
2993
+ Non-interactive checkbox look (for custom cards and rows).
2994
+
2995
+ - props: `checked`, `indeterminate`, `disabled`, `size`, `radius`, `color`
2996
+
2997
+ ### ui.Chip
2998
+
2999
+ Toggle chip. Standalone it commits `checked`; inside a ChipGroup it is a member by `value`.
3000
+
3001
+ - props: `checked`, `value`, `label`, `disabled`, `size`, `radius`, `color`, `variant` (outline/light/filled), `type` (radio/checkbox)
3002
+ - events: `on_change`
3003
+
3004
+ ### ui.ChipGroup
3005
+
3006
+ Group of chips. multiple=True: `value` is a list of values; otherwise one value or None.
3007
+
3008
+ - props: `value`, `multiple`
3009
+ - events: `on_change`
3010
+
3011
+ ### ui.Combobox
3012
+
3013
+ Data-driven dropdown: a button that opens a list with optional search, groups, a footer and a create-option. `value` is the selected option value (or None).
3014
+
3015
+ - props: `value`, `data`, `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `variant`, `searchable`, `search_placeholder`, `client_filter`, `clearable`, `creatable`, `create_label`, `nothing_found_message`, `max_dropdown_height`
3016
+ - events: `on_change`, `on_search`, `on_create`
3017
+ - slots: `footer`
3018
+
3019
+ ### ui.MultiSelect
3020
+
3021
+ Choose several options. `value` is a list of option values.
3022
+
3023
+ - props: `value`, `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `data`, `searchable`, `clearable`, `nothing_found_message`, `client_filter`, `search_debounce`, `with_check_icon`, `check_icon_position` (left/right), `max_dropdown_height`, `limit`, `max_values`, `hide_picked_options`, `with_pills_reorder`
3024
+ - events: `on_change`, `on_search`
3025
+ - slots: `left_section`, `right_section`
3026
+
3027
+ ### ui.NativeSelect
3028
+
3029
+ Browser-native select box.
3030
+
3031
+ - props: `value`, `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `with_asterisk`, `data`
3032
+ - events: `on_change`, `on_blur`, `on_focus`
3033
+ - slots: `left_section`, `right_section`
3034
+
3035
+ ### ui.Pill
3036
+
3037
+ Small pill/tag, optionally removable (`remove` event).
3038
+
3039
+ - props: `label`, `with_remove_button`, `size`, `radius`, `disabled`, `variant` (default/contrast)
3040
+ - events: `on_remove`
3041
+
3042
+ ### ui.PillGroup
3043
+
3044
+ Row of pills.
3045
+
3046
+ - props: `size`, `disabled`, `gap`
3047
+
3048
+ ### ui.PillsInput
3049
+
3050
+ Multi-value input shown as removable pills; Enter or comma adds the typed text, Backspace removes the last pill. `data` offers suggestions. Validate values in Python and report with `error`.
3051
+
3052
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `value`, `data`, `max_values`, `allow_duplicates`
3053
+ - events: `on_change`
3054
+
3055
+ ### ui.Radio
3056
+
3057
+ Radio button. Use inside a RadioGroup (member identified by `value`).
3058
+
3059
+ - props: `checked`, `value`, `label`, `description`, `error`, `disabled`, `size`, `radius`, `color`, `label_position` (left/right)
3060
+ - events: `on_change`
3061
+
3062
+ ### ui.RadioCard
3063
+
3064
+ Card that selects like a radio inside a RadioGroup (member by `value`). Put any content inside.
3065
+
3066
+ - props: `value`, `with_border`, `radius`, `name`, `disabled`
3067
+
3068
+ ### ui.RadioGroup
3069
+
3070
+ Group of radios; `value` is the selected item value (or None).
3071
+
3072
+ - props: `label`, `description`, `error`, `value`, `name`, `required`, `size`, `with_asterisk`, `read_only`, `disabled`
3073
+ - events: `on_change`
3074
+
3075
+ ### ui.RadioIndicator
3076
+
3077
+ Non-interactive radio look.
3078
+
3079
+ - props: `checked`, `disabled`, `size`, `radius`, `color`
3080
+
3081
+ ### ui.SegmentedControl
3082
+
3083
+ Segmented single choice. The indicator is built in.
3084
+
3085
+ - props: `value`, `data`, `name`, `disabled`, `read_only`, `full_width`, `color`, `size`, `radius`, `orientation` (horizontal/vertical), `transition_duration`, `with_items_borders`
3086
+ - events: `on_change`
3087
+
3088
+ ### ui.Select
3089
+
3090
+ Choose one option from a dropdown. Options may carry a `group`. With client_filter=False, answer `search` events by replacing `data`.
3091
+
3092
+ - props: `value`, `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `data`, `searchable`, `clearable`, `nothing_found_message`, `client_filter`, `search_debounce`, `with_check_icon`, `check_icon_position` (left/right), `max_dropdown_height`, `limit`, `allow_deselect`
3093
+ - events: `on_change`, `on_search`
3094
+ - slots: `left_section`, `right_section`
3095
+
3096
+ ### ui.Switch
3097
+
3098
+ On/off switch. Standalone it commits `checked`; inside a SwitchGroup it is a member by `value`.
3099
+
3100
+ - props: `checked`, `value`, `label`, `description`, `error`, `name`, `required`, `disabled`, `size`, `radius`, `color`, `on_label`, `off_label`, `label_position` (left/right), `with_thumb_indicator`
3101
+ - events: `on_change`
3102
+
3103
+ ### ui.SwitchGroup
3104
+
3105
+ Group of switches; `value` is the list of enabled item values.
3106
+
3107
+ - props: `label`, `description`, `error`, `value`, `name`, `required`, `size`, `with_asterisk`, `max_selected_values`, `read_only`, `disabled`
3108
+ - events: `on_change`
3109
+
3110
+ ### ui.TagsInput
3111
+
3112
+ Free-form tags with optional suggestions. `value` is the list of tags.
3113
+
3114
+ - props: `value`, `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `data`, `max_tags`, `split_chars`, `allow_duplicates`, `clearable`, `accept_value_on_blur`, `client_filter`, `search_debounce`, `max_dropdown_height`, `limit`
3115
+ - events: `on_change`, `on_search`
3116
+ - slots: `left_section`, `right_section`
3117
+
3118
+ ### ui.Toggle
3119
+
3120
+ Toggle button; `active` is the on/off state.
3121
+
3122
+ - props: `active`, `label`, `name`, `disabled`, `size`, `radius`, `color`, `variant` (light/filled), `auto_width`
3123
+ - events: `on_change`
3124
+
3125
+ ### ui.ToolbarToggle
3126
+
3127
+ Toggle for toolbars; `active` is the pressed state. Outside a toolbar it renders inside its own.
3128
+
3129
+ - props: `active`, `label`, `name`, `disabled`, `auto_width`
3130
+ - events: `on_change`
3131
+
3132
+ ### ui.TreeSelect
3133
+
3134
+ Select from a tree. mode single: `value` is one option value or None; multiple/checkbox: a list of values.
3135
+
3136
+ - props: `label`, `description`, `error`, `placeholder`, `name`, `required`, `disabled`, `size`, `radius`, `variant` (default/filled/unstyled), `with_asterisk`, `read_only`, `data`, `value`, `mode` (single/multiple/checkbox), `check_strictly`, `checked_strategy` (all/parent/child), `default_expand_all`, `expand_on_click`, `searchable`, `clearable`, `max_values`, `with_lines`, `nothing_found_message`
3137
+ - events: `on_change`
3138
+ - slots: `left_section`, `right_section`
3139
+
3140
+ ## layout
3141
+
3142
+ ### ui.AppShell
3143
+
3144
+ Application frame with header, navbar, aside and footer around the main content (children or 'main'). Regions appear when their slot has content.
3145
+
3146
+ - props: `header_height`, `navbar_width`, `navbar_breakpoint`, `navbar_collapsed`, `aside_width`, `aside_breakpoint`, `aside_collapsed`, `footer_height`, `padding`, `with_border`, `layout` (default/alt), `mode` (fixed/static)
3147
+ - slots: `header`, `navbar`, `aside`, `footer`, `main`
3148
+
3149
+ ### ui.AspectRatio
3150
+
3151
+ Keeps its child at a fixed width/height ratio.
3152
+
3153
+ - props: `ratio`, `w`, `maw`
3154
+
3155
+ ### ui.Box
3156
+
3157
+ Plain container element with style props. 'component' picks the HTML tag from an allowlist.
3158
+
3159
+ - props: `component` (div/section/article/aside/header/footer/main/nav/span/p/ul/ol/li/figure/figcaption/address), `bg`, `c`, `p`, `px`, `py`, `m`, `mx`, `my`, `mt`, `mb`, `ml`, `mr`, `w`, `h`, `maw`, `mah`, `miw`, `mih`, `mod`
3160
+
3161
+ ### ui.Card
3162
+
3163
+ Surface for grouped content; CardSection children can span the full width.
3164
+
3165
+ - props: `shadow`, `radius`, `with_border`, `padding`, `orientation` (vertical/horizontal), `w`, `h`
3166
+
3167
+ ### ui.CardSection
3168
+
3169
+ Full-bleed section inside a Card.
3170
+
3171
+ - props: `with_border`, `inherit_padding`
3172
+
3173
+ ### ui.Center
3174
+
3175
+ Centers its content horizontally and vertically.
3176
+
3177
+ - props: `inline`, `p`, `w`, `h`
3178
+
3179
+ ### ui.Container
3180
+
3181
+ Centers content with a max width.
3182
+
3183
+ - props: `size`, `fluid`, `strategy` (block/grid), `p`
3184
+
3185
+ ### ui.Divider
3186
+
3187
+ Horizontal or vertical separator line with optional label.
3188
+
3189
+ - props: `label`, `label_position` (left/center/right), `orientation` (horizontal/vertical), `variant` (solid/dashed/dotted), `color`, `size`, `my`, `mx`
3190
+
3191
+ ### ui.Fieldset
3192
+
3193
+ Group of form controls with a legend (disabled disables all controls inside).
3194
+
3195
+ - props: `legend`, `variant` (default/filled/unstyled), `disabled`, `radius`
3196
+
3197
+ ### ui.Flex
3198
+
3199
+ Flex container with direction, gap, alignment and wrapping.
3200
+
3201
+ - props: `gap`, `row_gap`, `column_gap`, `direction` (row/column/row-reverse/column-reverse), `align` (stretch/center/flex-start/flex-end/baseline), `justify` (center/flex-start/flex-end/space-between/space-around/space-evenly), `wrap` (wrap/nowrap/wrap-reverse), `p`, `w`, `h`
3202
+
3203
+ ### ui.Grid
3204
+
3205
+ 12-column grid; put GridColumn children inside.
3206
+
3207
+ - props: `gap`, `row_gap`, `column_gap`, `grow`, `justify` (center/flex-start/flex-end/space-between/space-around), `align` (stretch/center/flex-start/flex-end), `columns`, `overflow` (visible/hidden), `type` (media/container)
3208
+
3209
+ ### ui.GridColumn
3210
+
3211
+ A column of a Grid. span/offset/order are numbers or responsive mappings like {"base": 12, "md": 6}.
3212
+
3213
+ - props: `span`, `offset`, `order`, `align` (stretch/center/flex-start/flex-end)
3214
+
3215
+ ### ui.Group
3216
+
3217
+ Horizontal flex row of children.
3218
+
3219
+ - props: `gap`, `align` (stretch/center/flex-start/flex-end/baseline), `justify` (center/flex-start/flex-end/space-between/space-around), `wrap` (wrap/nowrap), `grow`, `p`
3220
+
3221
+ ### ui.Paper
3222
+
3223
+ Surface with optional shadow, border and radius.
3224
+
3225
+ - props: `shadow`, `radius`, `with_border`, `component` (div/section/article/aside/header/footer/main/nav/span/p/ul/ol/li/figure/figcaption/address), `bg`, `p`, `m`, `w`, `h`
3226
+
3227
+ ### ui.ScrollArea
3228
+
3229
+ Scrollable region with styled scrollbars. 'bottom_reached' etc. fire when the edge is reached.
3230
+
3231
+ - props: `h`, `mah`, `w`, `type` (auto/always/scroll/hover/never), `scrollbar_size`, `scroll_hide_delay`, `scrollbars` (x/y/xy), `offset_scrollbars`, `overscroll_behavior` (auto/contain/none), `autosize`
3232
+ - events: `on_bottom_reached`, `on_top_reached`, `on_left_reached`, `on_right_reached`
3233
+
3234
+ ### ui.Scroller
3235
+
3236
+ Horizontally scrolling strip with start/end controls and optional dragging.
3237
+
3238
+ - props: `scroll_amount`, `control_size`, `show_start_control`, `show_end_control`, `draggable`, `start_control_icon`, `end_control_icon`
3239
+
3240
+ ### ui.SimpleGrid
3241
+
3242
+ Equal-width grid; 'cols', 'spacing' accept responsive mappings.
3243
+
3244
+ - props: `cols`, `spacing`, `vertical_spacing`, `type` (media/container), `min_col_width`, `auto_flow` (auto-fit/auto-fill), `auto_rows`
3245
+
3246
+ ### ui.Space
3247
+
3248
+ Empty spacing element.
3249
+
3250
+ - props: `h`, `w`
3251
+
3252
+ ### ui.SplitPane
3253
+
3254
+ Resizable panes (Mantine Splitter). 'sizes' (numbers/percent or px/rem strings) is owned by Python; dragging, arrow keys or double-click reset emit sizes_change with the new sizes.
3255
+
3256
+ - props: `sizes`, `orientation` (horizontal/vertical), `with_handle`, `line_size`, `handle_color`, `reset_on_double_click`, `step`, `shift_step`, `redistribute` (nearest/equal), `h`, `w`
3257
+ - events: `on_sizes_change`
3258
+
3259
+ ### ui.SplitterPane
3260
+
3261
+ One pane of a SplitPane.
3262
+
3263
+ - props: `size`, `min`, `max`, `collapsible`, `collapse_threshold`
3264
+
3265
+ ### ui.Stack
3266
+
3267
+ Vertical flex stack of children.
3268
+
3269
+ - props: `gap`, `align` (stretch/center/flex-start/flex-end), `justify` (center/flex-start/flex-end/space-between/space-around), `p`
3270
+
3271
+ ### ui.Toolbar
3272
+
3273
+ Keyboard-navigable toolbar (arrow keys move between items).
3274
+
3275
+ - props: `orientation` (horizontal/vertical), `loop`, `size`, `radius`, `with_border`, `color`, `variant` (light/filled)
3276
+
3277
+ ### ui.ToolbarDivider
3278
+
3279
+ Separator between toolbar groups.
3280
+
3281
+
3282
+ ### ui.ToolbarGroup
3283
+
3284
+ Group of related toolbar items.
3285
+
3286
+
3287
+ ### ui.ToolbarToggleGroup
3288
+
3289
+ Toolbar toggles with single or multiple selection. value is a string (single, or None) or a list (multiple).
3290
+
3291
+ - props: `type` (single/multiple), `value`, `disabled`
3292
+ - events: `on_change`
3293
+
3294
+ ### ui.ToolbarToggleItem
3295
+
3296
+ One choice inside a ToolbarToggleGroup.
3297
+
3298
+ - props: `value`, `disabled`, `auto_width`
3299
+
3300
+ ### ui.VisuallyHidden
3301
+
3302
+ Content only read by screen readers.
3303
+
3304
+
3305
+ ## misc
3306
+
3307
+ ### ui.ComboboxPopover
3308
+
3309
+ Options popover opened by any target component (slot 'target'): clicking the target toggles a list of options, optionally searchable. value is the selected option value (str | None), or a list of values with multiple=True.
3310
+
3311
+ - props: `value`, `data`, `multiple`, `searchable`, `nothing_found_message`, `with_check_icon`, `check_icon_position` (left/right), `allow_deselect`, `max_dropdown_height`, `limit`, `dropdown_width`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end)
3312
+ - events: `on_change`
3313
+ - slots: `target`
3314
+
3315
+ ### ui.FocusTrap
3316
+
3317
+ Keeps keyboard focus inside its children while active: Tab and Shift+Tab cycle through the focusable elements inside, and activating it moves focus into it.
3318
+
3319
+ - props: `active`
3320
+
3321
+ ### ui.Input
3322
+
3323
+ Bare text input without label (wrap it in InputWrapper for label, description and error). Supports left/right sections and a clear button; the value commits after a pause, on blur or on Enter.
3324
+
3325
+ - props: `value`, `placeholder`, `type` (text/email/search/tel/url/password), `variant` (default/filled/unstyled), `size`, `radius`, `error`, `name`, `required`, `disabled`, `read_only`, `pointer`, `max_length`, `autocomplete`, `clearable`, `debounce`
3326
+ - events: `on_change`, `on_blur`, `on_focus`, `on_enter`
3327
+ - slots: `left_section`, `right_section`
3328
+
3329
+ ### ui.InputWrapper
3330
+
3331
+ Label, description and error message around its children (typically an Input); the label is linked to an Input placed inside.
3332
+
3333
+ - props: `label`, `description`, `error`, `required`, `with_asterisk`, `size`, `label_element` (label/div)
3334
+
3335
+ ### ui.OverflowList
3336
+
3337
+ Row of items (its children) that collapses what does not fit into an overflow indicator: by default a '+N' badge whose popover lists the hidden items. Put your own indicator in the 'overflow' slot.
3338
+
3339
+ - props: `max_visible_items`, `max_rows`, `gap`, `collapse_from` (start/end)
3340
+ - slots: `overflow`
3341
+
3342
+ ### ui.Portal
3343
+
3344
+ Renders its children elsewhere in the page: at the end of the document body, or inside the element whose DOM id or component id is 'target'.
3345
+
3346
+ - props: `target`
3347
+
3348
+ ### ui.ThemeScope
3349
+
3350
+ Applies a nested theme (same keys as ui.theme()) to its children only, through scoped CSS variables; the page theme is unchanged. Keys you omit inherit from the page theme.
3351
+
3352
+ - props: `theme`
3353
+
3354
+ ### ui.Transition
3355
+
3356
+ Animates its children in and out when 'mounted' changes, with one of Mantine's named transitions.
3357
+
3358
+ - props: `mounted`, `transition` (fade/fade-up/fade-down/fade-left/fade-right/scale/scale-y/scale-x/skew-up/skew-down/rotate-left/rotate-right/slide-down/slide-up/slide-left/slide-right/pop/pop-bottom-left/pop-bottom-right/pop-top-left/pop-top-right), `duration`, `exit_duration`, `enter_delay`, `exit_delay`, `timing_function` (ease/ease-in/ease-out/ease-in-out/linear), `keep_mounted`
3359
+
3360
+ ## navigation
3361
+
3362
+ ### ui.Breadcrumbs
3363
+
3364
+ Trail of children (links or text) joined by a separator.
3365
+
3366
+ - props: `separator`, `separator_margin`
3367
+
3368
+ ### ui.NavLink
3369
+
3370
+ Navigation entry; nested NavLinks form a collapsible group. 'opened' (groups) is committed from the page; 'click' fires on activation (mouse or keyboard).
3371
+
3372
+ - props: `opened`, `label`, `description`, `active`, `color`, `disabled`, `variant` (light/filled/subtle), `no_wrap`, `children_offset`, `disable_right_section_rotation`, `keep_mounted`
3373
+ - events: `on_change`, `on_click`
3374
+ - slots: `left_section`, `right_section`
3375
+
3376
+ ### ui.Pagination
3377
+
3378
+ Page selector (1-based). 'value' is the current page and sends 'change'.
3379
+
3380
+ - props: `value`, `total`, `siblings`, `boundaries`, `with_edges`, `with_controls`, `hide_with_one_page`, `disabled`, `size`, `radius`, `color`
3381
+ - events: `on_change`
3382
+
3383
+ ### ui.Stepper
3384
+
3385
+ Wizard steps. Python owns 'active'; clicking an allowed step sends 'step_click' with its index (set 'active' to move).
3386
+
3387
+ - props: `active`, `orientation` (horizontal/vertical), `icon_position` (left/right), `label_position` (right/bottom), `size`, `radius`, `color`, `allow_next_steps_select`, `wrap`, `keep_mounted`
3388
+ - events: `on_step_click`
3389
+ - slots: `completed`
3390
+
3391
+ ### ui.StepperStep
3392
+
3393
+ One step of a Stepper; its children are shown while it is the active step.
3394
+
3395
+ - props: `label`, `description`, `loading`, `allow_step_select`, `color`
3396
+ - slots: `icon`, `completed_icon`, `progress_icon`
3397
+
3398
+ ### ui.TableOfContents
3399
+
3400
+ Scroll-spy outline of headings found in the page by a CSS selector.
3401
+
3402
+ - props: `variant` (filled/light/none), `color`, `size`, `radius`, `scroll_spy_options`, `initial_data`, `min_depth_to_offset`, `depth_offset`, `auto_contrast`
3403
+
3404
+ ### ui.Tabs
3405
+
3406
+ Tabbed sections. 'value' is the active tab; clicking a tab (or arrow keys) changes it and sends 'change'. Children are one TabsList (with TabsTab buttons) and one TabsPanel per tab.
3407
+
3408
+ - props: `value`, `orientation` (horizontal/vertical), `placement` (left/right), `variant` (default/outline/pills), `color`, `radius`, `inverted`, `keep_mounted`, `loop`, `activate_tab_with_keyboard`, `allow_tab_deactivation`
3409
+ - events: `on_change`
3410
+
3411
+ ### ui.TabsList
3412
+
3413
+ The row of tab buttons inside Tabs.
3414
+
3415
+ - props: `grow`, `justify` (flex-start/center/flex-end/space-between)
3416
+
3417
+ ### ui.TabsPanel
3418
+
3419
+ Content of one tab, shown while its value is the active tab.
3420
+
3421
+ - props: `value`, `keep_mounted`
3422
+
3423
+ ### ui.TabsTab
3424
+
3425
+ One tab button. 'value' ties it to the TabsPanel with the same value.
3426
+
3427
+ - props: `value`, `label`, `color`, `disabled`
3428
+ - slots: `left_section`, `right_section`
3429
+
3430
+ ### ui.Tree
3431
+
3432
+ Hierarchical data. 'data' is nested {value, label, children?, has_children?}; nodes with has_children and no children load lazily via the 'load_children' event (replace 'data' in the handler). 'selected' commits from the page ('select' event).
3433
+
3434
+ - props: `data`, `selected`, `expanded`, `checked`, `multiple`, `check_strictly`, `with_checkboxes`, `expand_on_click`, `select_on_click`, `level_offset`
3435
+ - events: `on_select`, `on_expand`, `on_load_children`
3436
+
3437
+ ## overlays
3438
+
3439
+ ### ui.ActionBar
3440
+
3441
+ Bottom bar that slides in with actions (for example when rows are selected). Put buttons and an ActionBarCloseButton inside.
3442
+
3443
+ - props: `opened`, `close_on_escape`, `radius`, `z_index`, `with_border`
3444
+ - events: `on_close`
3445
+
3446
+ ### ui.ActionBarCloseButton
3447
+
3448
+ Close button of an ActionBar (sends the bar's 'close').
3449
+
3450
+
3451
+ ### ui.Affix
3452
+
3453
+ Content fixed to a window position, e.g. {'bottom': 20, 'right': 20}.
3454
+
3455
+ - props: `position`, `z_index`
3456
+
3457
+ ### ui.Dialog
3458
+
3459
+ Small floating dialog fixed to a window corner. Closes through its close button (event 'close').
3460
+
3461
+ - props: `opened`, `position`, `with_close_button`, `size`, `radius`, `with_border`, `z_index`
3462
+ - events: `on_close`
3463
+
3464
+ ### ui.Drawer
3465
+
3466
+ Panel sliding in from a screen edge. 'opened' is owned by Python; Escape, the close button or an outside click request 'close'.
3467
+
3468
+ - props: `opened`, `title`, `position` (left/right/top/bottom), `size`, `close_on_escape`, `close_on_click_outside`, `with_close_button`, `with_overlay`, `trap_focus`, `return_focus`, `lock_scroll`, `padding`, `radius`, `z_index`
3469
+ - events: `on_close`
3470
+
3471
+ ### ui.HoverCard
3472
+
3473
+ Panel shown while the target (slot 'target') is hovered; children are the panel. Events 'open' and 'close' allow lazy loading.
3474
+
3475
+ - props: `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end), `offset`, `with_arrow`, `width`, `shadow`, `radius`, `open_delay`, `close_delay`, `disabled`, `z_index`
3476
+ - events: `on_open`, `on_close`
3477
+ - slots: `target`
3478
+
3479
+ ### ui.LoadingOverlay
3480
+
3481
+ Spinner overlay covering its (positioned) parent while 'visible' is true; hide it with visible=False.
3482
+
3483
+ - props: `loader_props`, `overlay_props`, `z_index`
3484
+
3485
+ ### ui.Modal
3486
+
3487
+ Dialog over the page. 'opened' is owned by Python; Escape, the close button or an outside click request 'close' which sets opened=False and calls on_close. Focus is trapped while open and returns to the opener.
3488
+
3489
+ - props: `opened`, `title`, `size`, `centered`, `full_screen`, `close_on_escape`, `close_on_click_outside`, `with_close_button`, `trap_focus`, `return_focus`, `lock_scroll`, `with_overlay`, `padding`, `radius`, `z_index`
3490
+ - events: `on_close`
3491
+
3492
+ ### ui.Overlay
3493
+
3494
+ Translucent layer over its parent (blur, colour, gradient); children are centred when 'center' is set.
3495
+
3496
+ - props: `background_opacity`, `color`, `blur`, `gradient`, `center`, `fixed`, `radius`, `z_index`
3497
+
3498
+ ### ui.Popover
3499
+
3500
+ Floating panel anchored to a target (slot 'target'); children are the panel. 'opened' is owned by Python and committed when the user toggles it; events 'open'/'close'.
3501
+
3502
+ - props: `opened`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end), `offset`, `with_arrow`, `width`, `shadow`, `radius`, `disabled`, `trap_focus`, `return_focus`, `close_on_click_outside`, `close_on_escape`, `keep_mounted`, `z_index`
3503
+ - events: `on_open`, `on_close`
3504
+ - slots: `target`
3505
+
3506
+ ### ui.Tooltip
3507
+
3508
+ Label shown when the child element is hovered or focused. 'opened' (optional) forces it open or closed.
3509
+
3510
+ - props: `label`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end), `opened`, `with_arrow`, `multiline`, `color`, `radius`, `open_delay`, `close_delay`, `disabled`, `offset`, `w`, `z_index`
3511
+
3512
+ ### ui.TooltipFloating
3513
+
3514
+ Tooltip that follows the cursor over its child.
3515
+
3516
+ - props: `label`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end), `multiline`, `color`, `radius`, `disabled`, `offset`, `z_index`
3517
+
3518
+ ### ui.TooltipGroup
3519
+
3520
+ Groups tooltips so that moving between them skips the open delay.
3521
+
3522
+ - props: `open_delay`, `close_delay`
3523
+
3524
+ ## overlays-extra
3525
+
3526
+ ### ui.FloatingWindow
3527
+
3528
+ Draggable window fixed above the page (optionally resizable). Report size changes with 'size_change' ({width, height}).
3529
+
3530
+ - props: `initial_position`, `axis` (x/y), `constrain_to_viewport`, `drag_handle_selector`, `resizable`, `dimensions`, `radius`, `shadow`, `with_border`, `z_index`
3531
+ - events: `on_size_change`
3532
+
3533
+ ### ui.Menu
3534
+
3535
+ Dropdown menu opened from a target (slot 'target'); children are MenuItem and friends. 'opened' is owned by Python (open()/close()); events 'open'/'close'.
3536
+
3537
+ - props: `opened`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end), `offset`, `width`, `with_arrow`, `shadow`, `radius`, `trigger` (click/hover/click-hover), `close_on_item_click`, `close_on_escape`, `close_on_click_outside`, `trap_focus`, `return_focus`, `loop`, `disabled`, `z_index`
3538
+ - events: `on_open`, `on_close`
3539
+ - slots: `target`
3540
+
3541
+ ### ui.MenuCheckboxItem
3542
+
3543
+ Menu entry with a checkmark; 'checked' is committed from the page.
3544
+
3545
+ - props: `checked`, `label`, `color`, `disabled`, `close_menu_on_click`
3546
+ - events: `on_change`
3547
+
3548
+ ### ui.MenuContextMenu
3549
+
3550
+ Place inside a Menu's 'target' slot: right-click (or long press) on its children opens the menu at the pointer.
3551
+
3552
+ - props: `disabled`, `long_press_delay`
3553
+
3554
+ ### ui.MenuItem
3555
+
3556
+ Menu entry (item_type 'item', default), section label ('label') or divider ('divider'). 'click' fires on mouse or Enter.
3557
+
3558
+ - props: `label`, `item_type` (item/label/divider), `color`, `disabled`, `close_menu_on_click`
3559
+ - events: `on_click`
3560
+ - slots: `left_section`, `right_section`
3561
+
3562
+ ### ui.MenuRadioGroup
3563
+
3564
+ Group of MenuRadioItem entries; 'value' is the selected item and sends 'change'.
3565
+
3566
+ - props: `value`
3567
+ - events: `on_change`
3568
+
3569
+ ### ui.MenuRadioItem
3570
+
3571
+ Radio entry inside a MenuRadioGroup.
3572
+
3573
+ - props: `value`, `label`, `color`, `disabled`, `close_menu_on_click`
3574
+
3575
+ ### ui.MenuSub
3576
+
3577
+ Submenu: 'label' is the entry in the parent menu, children (MenuItem...) open beside it.
3578
+
3579
+ - props: `label`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end), `open_delay`, `close_delay`, `disabled`, `color`
3580
+ - slots: `left_section`, `right_section`
3581
+
3582
+ ### ui.Menubar
3583
+
3584
+ Desktop-style menu bar; children are MenubarMenu entries. 'open_change' reports the opened menu index (or None).
3585
+
3586
+ - props: `trigger` (click/hover), `loop`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end)
3587
+ - events: `on_open_change`
3588
+
3589
+ ### ui.MenubarMenu
3590
+
3591
+ One menu of a Menubar: 'label' is its button, children are the menu entries.
3592
+
3593
+ - props: `label`, `disabled`
3594
+
3595
+ ### ui.Tour
3596
+
3597
+ Guided tour over the page. Python owns 'opened' and 'step'; the page commits 'step' ('change') and requests 'close'. Children are TourStep entries whose 'target' is a CSS selector in the page.
3598
+
3599
+ - props: `opened`, `step`, `mode` (guided/beacon), `with_overlay`, `with_close_button`, `with_keyboard_navigation`, `close_on_escape`, `close_on_overlay_click`, `color`, `spotlight_padding`, `max_width`, `z_index`
3600
+ - events: `on_change`, `on_close`
3601
+
3602
+ ### ui.TourStep
3603
+
3604
+ One step of a Tour: 'target' (CSS selector, optional) is spotlighted; children are the step text.
3605
+
3606
+ - props: `target`, `title`, `position` (top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end/center), `with_overlay`, `spotlight_padding`
3607
+
3608
+ ## schedule
3609
+
3610
+ ### ui.AgendaView
3611
+
3612
+ Events of a date range (`range_start`..`range_end`) listed by day.
3613
+
3614
+ - props: `timezone`, `events`, `range_start`, `range_end`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `date_header_format`, `header_format`, `event_time_format`, `recurrence_expansion_limit`
3615
+ - events: `on_event_click`
3616
+
3617
+ ### ui.DayView
3618
+
3619
+ One day as a time grid with an all-day row; click/drag on slots, drag to move and resize events (typed events, Python decides).
3620
+
3621
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `start_time`, `end_time`, `interval_minutes`, `slot_label_format`, `highlight_business_hours`, `business_hours`, `with_current_time_indicator`, `with_current_time_bubble`, `event_drag_interval`, `event_resize_interval`, `with_events_drag_and_drop`, `with_event_resize`, `with_drag_slot_select`, `prevent_event_overlap`, `with_interactive_background_events`, `with_all_day_slot`, `header_format`, `with_agenda`, `event_time_format`, `start_scroll_time`
3622
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_event_resize`, `on_slot_click`, `on_day_click`, `on_slot_select`
3623
+
3624
+ ### ui.MobileMonthView
3625
+
3626
+ Compact month for small screens with the selected day's event list; selecting a day commits `selected_date`.
3627
+
3628
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `selected_date`, `first_day_of_week`, `weekend_days`, `with_weekend_days`, `with_week_numbers`, `with_outside_days`, `highlight_today`, `events_header_format`, `event_time_format`
3629
+ - events: `on_range_change`, `on_event_click`, `on_day_click`
3630
+
3631
+ ### ui.MonthView
3632
+
3633
+ Month grid with '+N more', drag to move events between days and drag/click days to create.
3634
+
3635
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `with_events_drag_and_drop`, `with_drag_slot_select`, `prevent_event_overlap`, `with_interactive_background_events`, `first_day_of_week`, `weekend_days`, `with_weekend_days`, `highlight_today`, `weekday_format`, `with_week_numbers`, `with_week_days`, `with_outside_days`, `max_events_per_day`, `with_agenda`, `event_time_format`
3636
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_day_click`, `on_slot_select`
3637
+
3638
+ ### ui.ResourcesDayView
3639
+
3640
+ One day with a row per resource; drag events between rooms and times.
3641
+
3642
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `resources`, `groups`, `group_label_width`, `start_time`, `end_time`, `interval_minutes`, `slot_label_format`, `highlight_business_hours`, `business_hours`, `with_current_time_indicator`, `with_current_time_bubble`, `event_drag_interval`, `event_resize_interval`, `with_events_drag_and_drop`, `with_event_resize`, `with_drag_slot_select`, `prevent_event_overlap`, `with_interactive_background_events`, `slot_width`, `row_height`, `header_format`, `max_events_per_time_slot`
3643
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_event_resize`, `on_slot_click`, `on_slot_select`
3644
+
3645
+ ### ui.ResourcesMonthView
3646
+
3647
+ A month with a row per resource; click a day to create, drag to move.
3648
+
3649
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `resources`, `groups`, `group_label_width`, `with_events_drag_and_drop`, `with_event_resize`, `with_drag_slot_select`, `prevent_event_overlap`, `weekday_format`, `weekend_days`, `with_weekend_days`, `highlight_today`, `day_width`, `row_height`, `max_events_per_time_slot`
3650
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_event_resize`, `on_day_click`, `on_slot_select`
3651
+
3652
+ ### ui.ResourcesSchedule
3653
+
3654
+ Resource schedule (rooms, people) switching day/week/month views; events carry `resource_id`, drops between resources report the target resource.
3655
+
3656
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `resources`, `groups`, `group_label_width`, `view` (day/week/month), `first_day_of_week`, `weekend_days`, `with_events_drag_and_drop`, `with_event_resize`, `with_drag_slot_select`, `prevent_event_overlap`, `with_interactive_background_events`, `start_time`, `end_time`, `interval_minutes`
3657
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_event_resize`, `on_slot_click`, `on_day_click`, `on_slot_select`
3658
+
3659
+ ### ui.ResourcesWeekView
3660
+
3661
+ A week with a row per resource, as a time grid or one cell per day (`layout='days'`).
3662
+
3663
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `resources`, `groups`, `group_label_width`, `start_time`, `end_time`, `interval_minutes`, `slot_label_format`, `highlight_business_hours`, `business_hours`, `with_current_time_indicator`, `with_current_time_bubble`, `event_drag_interval`, `event_resize_interval`, `with_events_drag_and_drop`, `with_event_resize`, `with_drag_slot_select`, `prevent_event_overlap`, `with_interactive_background_events`, `first_day_of_week`, `weekend_days`, `with_weekend_days`, `highlight_today`, `weekday_format`, `layout` (time/days), `day_width`, `slot_width`, `row_height`, `week_label_format`, `max_events_per_time_slot`
3664
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_event_resize`, `on_slot_click`, `on_day_click`, `on_slot_select`
3665
+
3666
+ ### ui.Scheduler
3667
+
3668
+ All-in-one schedule (day/week/month/year views, optional agenda) bound to Python events: navigation reports the visible range (`range_change`, bounded loading with `set_provider`), clicks, drag-move, resize and slot selection arrive as typed events that Python accepts or ignores.
3669
+
3670
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `view` (day/week/month/year), `layout` (default/responsive), `with_agenda`, `event_time_format`, `first_day_of_week`, `weekend_days`, `with_events_drag_and_drop`, `with_event_resize`, `with_drag_slot_select`, `prevent_event_overlap`, `with_interactive_background_events`, `start_time`, `end_time`, `interval_minutes`
3671
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_event_resize`, `on_slot_click`, `on_day_click`, `on_slot_select`
3672
+
3673
+ ### ui.WeekView
3674
+
3675
+ Seven-day time grid with all-day row and optional week number.
3676
+
3677
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `start_time`, `end_time`, `interval_minutes`, `slot_label_format`, `highlight_business_hours`, `business_hours`, `with_current_time_indicator`, `with_current_time_bubble`, `event_drag_interval`, `event_resize_interval`, `with_events_drag_and_drop`, `with_event_resize`, `with_drag_slot_select`, `prevent_event_overlap`, `with_interactive_background_events`, `first_day_of_week`, `weekend_days`, `with_weekend_days`, `highlight_today`, `weekday_format`, `with_all_day_slots`, `with_week_number`, `week_label_format`, `with_agenda`, `event_time_format`, `start_scroll_time`
3678
+ - events: `on_range_change`, `on_event_click`, `on_event_drop`, `on_event_resize`, `on_slot_click`, `on_day_click`, `on_slot_select`
3679
+
3680
+ ### ui.YearView
3681
+
3682
+ Twelve-month overview marking days with events; clicking a day reports it.
3683
+
3684
+ - props: `timezone`, `date`, `events`, `locale` (en/en-gb/cs/sk/de/fr/es/it/pt/pt-br/pl/nl/sv/da/nb/fi/hu/ro/ru/uk/tr/el/ja/ko/zh-cn), `radius`, `mode` (default/static), `with_header`, `recurrence_expansion_limit`, `first_day_of_week`, `weekend_days`, `with_week_numbers`, `with_outside_days`, `with_weekend_days`, `highlight_today`, `month_label_format`
3685
+ - events: `on_range_change`, `on_day_click`
3686
+
3687
+ ## typography
3688
+
3689
+ ### ui.Anchor
3690
+
3691
+ A link. Only http, https, mailto and in-page '#' hrefs are used; anything else is rendered as plain text. External links open outside the app window.
3692
+
3693
+ - props: `text`, `href`, `underline` (always/hover/not-hover/never), `target` (_blank/_self), `size`, `c`, `truncate`
3694
+ - events: `on_click`
3695
+
3696
+ ### ui.Badge
3697
+
3698
+ Small label for status or counts; with the click event it acts as a button.
3699
+
3700
+ - props: `text`, `variant` (filled/light/outline/dot/transparent/white/default), `size`, `color`, `radius`, `circle`, `full_width`, `component` (div/button)
3701
+ - events: `on_click`
3702
+ - slots: `left_section`, `right_section`
3703
+
3704
+ ### ui.Blockquote
3705
+
3706
+ Quotation with optional citation and icon.
3707
+
3708
+ - props: `text`, `cite`, `icon`, `icon_size`, `color`, `radius`
3709
+
3710
+ ### ui.Code
3711
+
3712
+ Inline or block monospace text.
3713
+
3714
+ - props: `text`, `block`, `color`
3715
+
3716
+ ### ui.Highlight
3717
+
3718
+ Text with highlighted terms: 'highlight' is a string, a list of strings or a list of {term, color}.
3719
+
3720
+ - props: `text`, `highlight`, `color`, `whole_word`, `case_insensitive`, `accent_insensitive`
3721
+
3722
+ ### ui.Kbd
3723
+
3724
+ Keyboard key.
3725
+
3726
+ - props: `text`, `size`
3727
+
3728
+ ### ui.List
3729
+
3730
+ Ordered or unordered list of ListItem children.
3731
+
3732
+ - props: `type` (ordered/unordered), `size`, `spacing`, `center`, `with_padding`, `icon`, `list_style_type`, `start`, `reversed`
3733
+
3734
+ ### ui.ListItem
3735
+
3736
+ An item of a List (text and/or nested components).
3737
+
3738
+ - props: `text`, `icon`
3739
+
3740
+ ### ui.Mark
3741
+
3742
+ Marked (highlighted) text.
3743
+
3744
+ - props: `text`, `color`
3745
+
3746
+ ### ui.NumberFormatter
3747
+
3748
+ Formats a number for display (prefix, suffix, separators, decimals).
3749
+
3750
+ - props: `value`, `prefix`, `suffix`, `decimal_scale`, `fixed_decimal_scale`, `thousand_separator`, `decimal_separator`, `thousands_group_style` (thousand/lakh/wan/none), `allow_negative`
3751
+
3752
+ ### ui.Table
3753
+
3754
+ Static table from data: {head: [...], body: [[...]], foot: [...], caption: str}. For sortable/paged/selectable tables use DataTable.
3755
+
3756
+ - props: `data`, `striped`, `highlight_on_hover`, `with_table_border`, `with_column_borders`, `with_row_borders`, `horizontal_spacing`, `vertical_spacing`, `sticky_header`, `sticky_header_offset`, `caption_side` (top/bottom), `layout` (auto/fixed), `tabular_nums`, `scroll_min_width`
3757
+
3758
+ ### ui.Text
3759
+
3760
+ A run of text.
3761
+
3762
+ - props: `text`, `size`, `c`, `fw`, `ta` (left/center/right/justify), `truncate`, `line_clamp`, `dimmed`
3763
+
3764
+ ### ui.Title
3765
+
3766
+ Heading h1..h6.
3767
+
3768
+ - props: `text`, `order`, `c`, `ta` (left/center/right)
3769
+
3770
+ ### ui.Typography
3771
+
3772
+ Applies readable typographic styles to the components inside it (headings, paragraphs, lists).
3773
+
3774
+ # Native API reference
3775
+
3776
+ Generated from the API inventory of this version.
3777
+
3778
+ - `app.broadcast` (wrapped): `app.app.broadcast(event, data=...)` -> void
3779
+ - `app.exit` (wrapped): `app.app.exit(code=...)` -> void
3780
+ - `app.getConfig` (wrapped): `app.app.get_config()` -> JSONObject
3781
+ - `app.getProcessId` (wrapped): `app.app.get_process_id()` -> int
3782
+ - `app.killProcess` (wrapped): `app.app.kill_process()` -> void
3783
+ - `app.readProcessInput` (wrapped): `app.app.read_process_input(read_all=...)` -> str
3784
+ - `app.restartProcess` (wrapped): `app.app.restart_process(args=...)` -> void
3785
+ - `app.writeProcessError` (wrapped): `app.app.write_process_error(data)` -> void
3786
+ - `app.writeProcessOutput` (wrapped): `app.app.write_process_output(data)` -> void
3787
+ - `clipboard.clear` (wrapped): `app.clipboard.clear()` -> void
3788
+ - `clipboard.getFormat` (wrapped): `app.clipboard.get_format()` -> str
3789
+ - `clipboard.readHTML` (wrapped): `app.clipboard.read_html()` -> str
3790
+ - `clipboard.readImage` (wrapped): `app.clipboard.read_image(format=...)` -> ClipboardImage | None
3791
+ - `clipboard.readText` (wrapped): `app.clipboard.read_text()` -> str
3792
+ - `clipboard.writeHTML` (wrapped): `app.clipboard.write_html(data)` -> void
3793
+ - `clipboard.writeImage` (wrapped): `app.clipboard.write_image(image)` -> void
3794
+ - `clipboard.writeText` (wrapped): `app.clipboard.write_text(data)` -> void
3795
+ - `computer.getArch` (wrapped): `app.computer.get_arch()` -> str
3796
+ - `computer.getCPUInfo` (wrapped): `app.computer.get_cpu_info()` -> CPUInfo
3797
+ - `computer.getDisks` (wrapped): `app.computer.get_disks()` -> list[Disk]
3798
+ - `computer.getDisplays` (wrapped): `app.computer.get_displays()` -> list[Display]
3799
+ - `computer.getGPUs` (wrapped): `app.computer.get_gpus()` -> list[GPUInfo]
3800
+ - `computer.getHostname` (wrapped): `app.computer.get_hostname()` -> str
3801
+ - `computer.getKernelInfo` (wrapped): `app.computer.get_kernel_info()` -> KernelInfo
3802
+ - `computer.getMachineId` (wrapped): `app.computer.get_machine_id()` -> str
3803
+ - `computer.getMemoryInfo` (wrapped): `app.computer.get_memory_info()` -> MemoryInfo
3804
+ - `computer.getMousePosition` (wrapped): `app.computer.get_mouse_position()` -> MousePosition
3805
+ - `computer.getNetworkInterfaces` (wrapped): `app.computer.get_network_interfaces()` -> dict[str, list[NetworkInterface]]
3806
+ - `computer.getOSInfo` (wrapped): `app.computer.get_os_info()` -> OSInfo
3807
+ - `computer.sendKey` (wrapped): `app.computer.send_key(key, state=...)` -> void
3808
+ - `computer.setMouseGrabbing` (wrapped): `app.computer.set_mouse_grabbing(grabbing)` -> void
3809
+ - `computer.setMousePosition` (wrapped): `app.computer.set_mouse_position(x, y)` -> void
3810
+ - `custom.getMethods` (wrapped): `app.custom.get_methods()` -> list[str]
3811
+ - `debug.log` (wrapped): `app.debug.log(message, type=...)` -> void
3812
+ - `events.broadcast` (wrapped): `app.events.broadcast(event, data=...)` -> void
3813
+ - `events.dispatch` (sdk-equivalent): `app.events.dispatch()` -> void
3814
+ - `events.off` (sdk-equivalent): `app.events.off()` -> void
3815
+ - `events.on` (sdk-equivalent): `app.events.on()` -> void
3816
+ - `extensions.broadcast` (wrapped): `app.extensions.broadcast(event, data=...)` -> void
3817
+ - `extensions.dispatch` (wrapped): `app.extensions.dispatch(extension_id, event, data=...)` -> void
3818
+ - `extensions.getStats` (wrapped): `app.extensions.get_stats()` -> ExtensionStats
3819
+ - `filesystem.access` (wrapped): `app.filesystem.access(path, mode=...)` -> void
3820
+ - `filesystem.appendBinaryFile` (wrapped): `app.filesystem.append_binary_file(path, data)` -> void
3821
+ - `filesystem.appendFile` (wrapped): `app.filesystem.append_file(path, data)` -> void
3822
+ - `filesystem.chmod` (wrapped): `app.filesystem.chmod(path, mode)` -> void
3823
+ - `filesystem.chown` (wrapped): `app.filesystem.chown(path, uid, gid)` -> void
3824
+ - `filesystem.copy` (wrapped): `app.filesystem.copy(source, destination, recursive=..., overwrite=..., skip=...)` -> void
3825
+ - `filesystem.createDirectory` (wrapped): `app.filesystem.create_directory(path)` -> void
3826
+ - `filesystem.createWatcher` (wrapped): `app.filesystem.create_watcher(path)` -> int
3827
+ - `filesystem.getAbsolutePath` (wrapped): `app.filesystem.get_absolute_path(path)` -> str
3828
+ - `filesystem.getJoinedPath` (wrapped): `app.filesystem.get_joined_path(paths)` -> str
3829
+ - `filesystem.getNormalizedPath` (wrapped): `app.filesystem.get_normalized_path(path)` -> str
3830
+ - `filesystem.getOpenedFileInfo` (wrapped): `app.filesystem.get_opened_file_info(file_id)` -> OpenedFileInfo
3831
+ - `filesystem.getOpenedFiles` (wrapped): `app.filesystem.get_opened_files()` -> list[int]
3832
+ - `filesystem.getPathParts` (wrapped): `app.filesystem.get_path_parts(path)` -> PathParts
3833
+ - `filesystem.getPermissions` (wrapped): `app.filesystem.get_permissions(path)` -> Permissions
3834
+ - `filesystem.getRelativePath` (wrapped): `app.filesystem.get_relative_path(path, base=...)` -> str
3835
+ - `filesystem.getStats` (wrapped): `app.filesystem.get_stats(path)` -> Stats
3836
+ - `filesystem.getUnnormalizedPath` (wrapped): `app.filesystem.get_unnormalized_path(path)` -> str
3837
+ - `filesystem.getWatchers` (wrapped): `app.filesystem.get_watchers()` -> list[Watcher]
3838
+ - `filesystem.move` (wrapped): `app.filesystem.move(source, destination)` -> void
3839
+ - `filesystem.openFile` (wrapped): `app.filesystem.open_file(path)` -> int
3840
+ - `filesystem.readBinaryFile` (wrapped): `app.filesystem.read_binary_file(path, pos=..., size=...)` -> bytes
3841
+ - `filesystem.readDirectory` (wrapped): `app.filesystem.read_directory(path, recursive=...)` -> list[DirectoryEntry]
3842
+ - `filesystem.readFile` (wrapped): `app.filesystem.read_file(path, pos=..., size=...)` -> str
3843
+ - `filesystem.remove` (wrapped): `app.filesystem.remove(path)` -> void
3844
+ - `filesystem.removeWatcher` (wrapped): `app.filesystem.remove_watcher(watcher_id)` -> int
3845
+ - `filesystem.setPermissions` (wrapped): `app.filesystem.set_permissions(path, permissions, mode=...)` -> int
3846
+ - `filesystem.updateOpenedFile` (wrapped): `app.filesystem.update_opened_file(file_id, event, data=...)` -> void
3847
+ - `filesystem.writeBinaryFile` (wrapped): `app.filesystem.write_binary_file(path, data)` -> void
3848
+ - `filesystem.writeFile` (wrapped): `app.filesystem.write_file(path, data)` -> void
3849
+ - `init` (sdk-equivalent): `app.init.None()` -> void
3850
+ - `net.delete` (wrapped): `app.net.delete(url, timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3851
+ - `net.get` (wrapped): `app.net.get(url, timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3852
+ - `net.head` (wrapped): `app.net.head(url, timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3853
+ - `net.options` (wrapped): `app.net.options(url, timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3854
+ - `net.patch` (wrapped): `app.net.patch(url, timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3855
+ - `net.post` (wrapped): `app.net.post(url, timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3856
+ - `net.put` (wrapped): `app.net.put(url, timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3857
+ - `net.request` (wrapped): `app.net.request(url, method=..., timeout_ms=..., params=..., headers=..., auth=..., body=..., allow_redirects=..., encode_path=..., keep_alive=..., content_type=...)` -> NetResponse
3858
+ - `os.execCommand` (wrapped): `app.os.exec_command(command, stdin=..., background=..., cwd=..., envs=...)` -> ExecCommandResult
3859
+ - `os.getEnv` (wrapped): `app.os.get_env(key)` -> str
3860
+ - `os.getEnvs` (wrapped): `app.os.get_envs()` -> dict[str, str]
3861
+ - `os.getLocaleInfo` (wrapped): `app.os.get_locale_info()` -> LocaleInfo
3862
+ - `os.getPath` (wrapped): `app.os.get_path(name)` -> str
3863
+ - `os.getSpawnedProcesses` (wrapped): `app.os.get_spawned_processes()` -> list[SpawnedProcess]
3864
+ - `os.open` (wrapped): `app.os.open(url)` -> void
3865
+ - `os.setEnv` (wrapped): `app.os.set_env(key, value)` -> void
3866
+ - `os.setTray` (wrapped): `app.os.set_tray(icon=..., menu_items=..., use_template_icon=...)` -> void
3867
+ - `os.showFolderDialog` (wrapped): `app.os.show_folder_dialog(title=..., default_path=...)` -> str
3868
+ - `os.showMessageBox` (wrapped): `app.os.show_message_box(title, content, choice=..., icon=...)` -> str
3869
+ - `os.showNotification` (wrapped): `app.os.show_notification(title, content, icon=...)` -> void
3870
+ - `os.showOpenDialog` (wrapped): `app.os.show_open_dialog(title=..., multi_selections=..., filters=..., default_path=...)` -> list[str]
3871
+ - `os.showSaveDialog` (wrapped): `app.os.show_save_dialog(title=..., force_overwrite=..., filters=..., default_path=...)` -> str
3872
+ - `os.spawnProcess` (wrapped): `app.os.spawn_process(command, cwd=..., envs=...)` -> SpawnedProcess
3873
+ - `os.trashItem` (wrapped): `app.os.trash_item(path)` -> void
3874
+ - `os.updateSpawnedProcess` (wrapped): `app.os.update_spawned_process(process_id, event, data=...)` -> void
3875
+ - `resources.extractDirectory` (wrapped): `app.resources.extract_directory(path, destination)` -> void
3876
+ - `resources.extractFile` (wrapped): `app.resources.extract_file(path, destination)` -> void
3877
+ - `resources.getFiles` (wrapped): `app.resources.get_files()` -> list[str]
3878
+ - `resources.getStats` (wrapped): `app.resources.get_stats(path)` -> ResourceStats
3879
+ - `resources.readBinaryFile` (wrapped): `app.resources.read_binary_file(path)` -> bytes
3880
+ - `resources.readFile` (wrapped): `app.resources.read_file(path)` -> str
3881
+ - `server.getMounts` (wrapped): `app.server.get_mounts()` -> dict[str, str]
3882
+ - `server.mount` (wrapped): `app.server.mount(path, target)` -> void
3883
+ - `server.unmount` (wrapped): `app.server.unmount(path)` -> void
3884
+ - `storage.clear` (wrapped): `app.storage.clear()` -> void
3885
+ - `storage.getData` (wrapped): `app.storage.get_data(key)` -> str
3886
+ - `storage.getKeys` (wrapped): `app.storage.get_keys()` -> list[str]
3887
+ - `storage.removeData` (wrapped): `app.storage.remove_data(key)` -> void
3888
+ - `storage.setData` (wrapped): `app.storage.set_data(key, data)` -> void
3889
+ - `updater.checkForUpdates` (wrapped): `app.updater.check_for_updates(url)` -> UpdateManifest
3890
+ - `updater.install` (wrapped): `app.updater.install()` -> void
3891
+ - `window.beginDrag` (wrapped): `app.window.begin_drag(screen_x=..., screen_y=...)` -> void
3892
+ - `window.center` (wrapped): `app.window.center()` -> void
3893
+ - `window.create` (wrapped): `app.window.create(url, options=...)` -> void
3894
+ - `window.exitFullScreen` (wrapped): `app.window.exit_full_screen()` -> void
3895
+ - `window.focus` (wrapped): `app.window.focus()` -> void
3896
+ - `window.getPosition` (wrapped): `app.window.get_position()` -> WindowPosition
3897
+ - `window.getSize` (wrapped): `app.window.get_size()` -> WindowSize
3898
+ - `window.getTitle` (wrapped): `app.window.get_title()` -> str
3899
+ - `window.hide` (wrapped): `app.window.hide()` -> void
3900
+ - `window.isFullScreen` (wrapped): `app.window.is_full_screen()` -> bool
3901
+ - `window.isMaximized` (wrapped): `app.window.is_maximized()` -> bool
3902
+ - `window.isMinimized` (wrapped): `app.window.is_minimized()` -> bool
3903
+ - `window.isVisible` (wrapped): `app.window.is_visible()` -> bool
3904
+ - `window.maximize` (wrapped): `app.window.maximize()` -> void
3905
+ - `window.minimize` (wrapped): `app.window.minimize()` -> void
3906
+ - `window.move` (wrapped): `app.window.move(x, y)` -> void
3907
+ - `window.print` (wrapped): `app.window.print()` -> void
3908
+ - `window.setAlwaysOnTop` (wrapped): `app.window.set_always_on_top(on_top)` -> void
3909
+ - `window.setBadge` (wrapped): `app.window.set_badge(count)` -> void
3910
+ - `window.setBorderless` (wrapped): `app.window.set_borderless(borderless)` -> void
3911
+ - `window.setDraggableRegion` (js-only): `app.window.None()` -> void
3912
+ - `window.setFullScreen` (wrapped): `app.window.set_full_screen()` -> void
3913
+ - `window.setIcon` (wrapped): `app.window.set_icon(icon)` -> void
3914
+ - `window.setMainMenu` (wrapped): `app.window.set_main_menu(menu)` -> void
3915
+ - `window.setSize` (wrapped): `app.window.set_size(width=..., height=..., min_width=..., min_height=..., max_width=..., max_height=..., resizable=...)` -> void
3916
+ - `window.setTitle` (wrapped): `app.window.set_title(title)` -> void
3917
+ - `window.show` (wrapped): `app.window.show()` -> void
3918
+ - `window.snapshot` (wrapped): `app.window.snapshot(path)` -> void
3919
+ - `window.unmaximize` (wrapped): `app.window.unmaximize()` -> void
3920
+ - `window.unminimize` (wrapped): `app.window.unminimize()` -> void
3921
+ - `window.unsetDraggableRegion` (js-only): `app.window.None()` -> void