@perspective-dev/viewer 4.0.0

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 (394) hide show
  1. package/LICENSE.md +193 -0
  2. package/README.md +4 -0
  3. package/dist/cdn/perspective-viewer.js +3 -0
  4. package/dist/cdn/perspective-viewer.js.map +7 -0
  5. package/dist/css/dracula.css +1 -0
  6. package/dist/css/gruvbox-dark.css +1 -0
  7. package/dist/css/gruvbox.css +1 -0
  8. package/dist/css/icons.css +1 -0
  9. package/dist/css/intl/de.css +1 -0
  10. package/dist/css/intl/es.css +1 -0
  11. package/dist/css/intl/fr.css +1 -0
  12. package/dist/css/intl/ja.css +1 -0
  13. package/dist/css/intl/pt.css +1 -0
  14. package/dist/css/intl/zh.css +1 -0
  15. package/dist/css/intl.css +1 -0
  16. package/dist/css/monokai.css +1 -0
  17. package/dist/css/pro-dark.css +1 -0
  18. package/dist/css/pro.css +1 -0
  19. package/dist/css/solarized-dark.css +1 -0
  20. package/dist/css/solarized.css +1 -0
  21. package/dist/css/themes.css +1 -0
  22. package/dist/css/vaporwave.css +1 -0
  23. package/dist/css/variables.css +0 -0
  24. package/dist/esm/bootstrap.d.ts +1 -0
  25. package/dist/esm/extensions.d.ts +70 -0
  26. package/dist/esm/perspective-viewer.d.ts +39 -0
  27. package/dist/esm/perspective-viewer.inline.js +3 -0
  28. package/dist/esm/perspective-viewer.inline.js.map +7 -0
  29. package/dist/esm/perspective-viewer.js +3 -0
  30. package/dist/esm/perspective-viewer.js.map +7 -0
  31. package/dist/esm/plugin.d.ts +195 -0
  32. package/dist/esm/ts-rs/Aggregate.d.ts +1 -0
  33. package/dist/esm/ts-rs/ColumnConfigValues.d.ts +31 -0
  34. package/dist/esm/ts-rs/CustomDatetimeFormat.d.ts +1 -0
  35. package/dist/esm/ts-rs/CustomDatetimeStyleConfig.d.ts +15 -0
  36. package/dist/esm/ts-rs/CustomNumberFormatConfig.d.ts +18 -0
  37. package/dist/esm/ts-rs/DatetimeColorMode.d.ts +1 -0
  38. package/dist/esm/ts-rs/DatetimeFormatType.d.ts +6 -0
  39. package/dist/esm/ts-rs/Expressions.d.ts +3 -0
  40. package/dist/esm/ts-rs/Filter.d.ts +2 -0
  41. package/dist/esm/ts-rs/FilterReducer.d.ts +1 -0
  42. package/dist/esm/ts-rs/FilterTerm.d.ts +2 -0
  43. package/dist/esm/ts-rs/FormatMode.d.ts +1 -0
  44. package/dist/esm/ts-rs/FormatUnit.d.ts +1 -0
  45. package/dist/esm/ts-rs/NumberBackgroundMode.d.ts +1 -0
  46. package/dist/esm/ts-rs/NumberForegroundMode.d.ts +1 -0
  47. package/dist/esm/ts-rs/OptionalUpdate.d.ts +1 -0
  48. package/dist/esm/ts-rs/PluginConfig.d.ts +2 -0
  49. package/dist/esm/ts-rs/RoundingMode.d.ts +1 -0
  50. package/dist/esm/ts-rs/RoundingPriority.d.ts +1 -0
  51. package/dist/esm/ts-rs/Scalar.d.ts +5 -0
  52. package/dist/esm/ts-rs/SignDisplay.d.ts +1 -0
  53. package/dist/esm/ts-rs/SimpleDatetimeFormat.d.ts +1 -0
  54. package/dist/esm/ts-rs/SimpleDatetimeStyleConfig.d.ts +6 -0
  55. package/dist/esm/ts-rs/Sort.d.ts +2 -0
  56. package/dist/esm/ts-rs/SortDir.d.ts +1 -0
  57. package/dist/esm/ts-rs/StringColorMode.d.ts +1 -0
  58. package/dist/esm/ts-rs/TrailingZeroDisplay.d.ts +1 -0
  59. package/dist/esm/ts-rs/UseGrouping.d.ts +1 -0
  60. package/dist/esm/ts-rs/ViewerConfigUpdate.d.ts +102 -0
  61. package/dist/esm/ts-rs/serde_json/JsonValue.d.ts +3 -0
  62. package/dist/wasm/perspective-viewer.d.ts +1291 -0
  63. package/dist/wasm/perspective-viewer.js +3883 -0
  64. package/dist/wasm/perspective-viewer.wasm +0 -0
  65. package/dist/wasm/perspective-viewer.wasm.d.ts +142 -0
  66. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline0.js +1 -0
  67. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline1.js +1 -0
  68. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline2.js +1 -0
  69. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline3.js +44 -0
  70. package/dist/wasm/snippets/perspective-viewer-c69283f6f62a5f14/inline4.js +1 -0
  71. package/package.json +55 -0
  72. package/src/less/aggregate-selector.less +72 -0
  73. package/src/less/column-dropdown.less +95 -0
  74. package/src/less/column-selector.less +551 -0
  75. package/src/less/column-settings-panel.less +255 -0
  76. package/src/less/column-style.less +319 -0
  77. package/src/less/column-symbol-attributes.less +73 -0
  78. package/src/less/config-selector.less +363 -0
  79. package/src/less/containers/dropdown-menu.less +94 -0
  80. package/src/less/containers/pairs-list.less +46 -0
  81. package/src/less/containers/radio-list.less +29 -0
  82. package/src/less/containers/scroll-panel.less +27 -0
  83. package/src/less/containers/split-panel.less +80 -0
  84. package/src/less/containers/tabs.less +90 -0
  85. package/src/less/dom/checkbox.less +100 -0
  86. package/src/less/dom/scrollbar.less +35 -0
  87. package/src/less/dom/select.less +63 -0
  88. package/src/less/empty-column.less +72 -0
  89. package/src/less/expression-editor.less +152 -0
  90. package/src/less/filter-dropdown.less +53 -0
  91. package/src/less/filter-item.less +126 -0
  92. package/src/less/form/code-editor.less +137 -0
  93. package/src/less/form/debug.less +88 -0
  94. package/src/less/function-dropdown.less +45 -0
  95. package/src/less/plugin-selector.less +173 -0
  96. package/src/less/render-warning.less +81 -0
  97. package/src/less/status-bar.less +551 -0
  98. package/src/less/type-icon.less +68 -0
  99. package/src/less/viewer.less +368 -0
  100. package/src/rust/components/column_dropdown.rs +162 -0
  101. package/src/rust/components/column_selector/active_column.rs +462 -0
  102. package/src/rust/components/column_selector/add_expression_button.rs +59 -0
  103. package/src/rust/components/column_selector/aggregate_selector.rs +186 -0
  104. package/src/rust/components/column_selector/config_selector.rs +674 -0
  105. package/src/rust/components/column_selector/empty_column.rs +134 -0
  106. package/src/rust/components/column_selector/expression_toolbar.rs +45 -0
  107. package/src/rust/components/column_selector/filter_column.rs +530 -0
  108. package/src/rust/components/column_selector/inactive_column.rs +221 -0
  109. package/src/rust/components/column_selector/invalid_column.rs +37 -0
  110. package/src/rust/components/column_selector/pivot_column.rs +93 -0
  111. package/src/rust/components/column_selector/sort_column.rs +135 -0
  112. package/src/rust/components/column_selector.rs +426 -0
  113. package/src/rust/components/column_settings_sidebar/attributes_tab.rs +34 -0
  114. package/src/rust/components/column_settings_sidebar/mod.rs +17 -0
  115. package/src/rust/components/column_settings_sidebar/save_settings.rs +68 -0
  116. package/src/rust/components/column_settings_sidebar/sidebar.rs +396 -0
  117. package/src/rust/components/column_settings_sidebar/style_tab/column_style.rs +177 -0
  118. package/src/rust/components/column_settings_sidebar/style_tab/stub.rs +34 -0
  119. package/src/rust/components/column_settings_sidebar/style_tab/symbol/row_selector.rs +101 -0
  120. package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_config.rs +24 -0
  121. package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_pairs.rs +185 -0
  122. package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_selector.rs +55 -0
  123. package/src/rust/components/column_settings_sidebar/style_tab/symbol.rs +131 -0
  124. package/src/rust/components/column_settings_sidebar/style_tab.rs +231 -0
  125. package/src/rust/components/containers/dragdrop_list.rs +325 -0
  126. package/src/rust/components/containers/dropdown_menu.rs +104 -0
  127. package/src/rust/components/containers/kvpair.rs +47 -0
  128. package/src/rust/components/containers/mod.rs +28 -0
  129. package/src/rust/components/containers/scroll_panel.rs +311 -0
  130. package/src/rust/components/containers/scroll_panel_item.rs +111 -0
  131. package/src/rust/components/containers/select.rs +269 -0
  132. package/src/rust/components/containers/sidebar.rs +89 -0
  133. package/src/rust/components/containers/split_panel.rs +483 -0
  134. package/src/rust/components/containers/tab_list.rs +104 -0
  135. package/src/rust/components/containers/tests/mod.rs +11 -0
  136. package/src/rust/components/containers/tests/split_panel.rs +91 -0
  137. package/src/rust/components/containers/trap_door_panel.rs +50 -0
  138. package/src/rust/components/copy_dropdown.rs +136 -0
  139. package/src/rust/components/datetime_column_style/custom.rs +222 -0
  140. package/src/rust/components/datetime_column_style/simple.rs +122 -0
  141. package/src/rust/components/datetime_column_style.rs +284 -0
  142. package/src/rust/components/editable_header.rs +183 -0
  143. package/src/rust/components/empty_row.rs +169 -0
  144. package/src/rust/components/error_message.rs +56 -0
  145. package/src/rust/components/export_dropdown.rs +153 -0
  146. package/src/rust/components/expression_editor.rs +153 -0
  147. package/src/rust/components/filter_dropdown.rs +144 -0
  148. package/src/rust/components/font_loader.rs +254 -0
  149. package/src/rust/components/form/code_editor.rs +286 -0
  150. package/src/rust/components/form/color_range_selector.rs +115 -0
  151. package/src/rust/components/form/color_selector.rs +54 -0
  152. package/src/rust/components/form/debug.rs +253 -0
  153. package/src/rust/components/form/highlight.rs +50 -0
  154. package/src/rust/components/form/mod.rs +29 -0
  155. package/src/rust/components/form/number_field.rs +72 -0
  156. package/src/rust/components/form/number_input.rs +45 -0
  157. package/src/rust/components/form/number_range_field.rs +77 -0
  158. package/src/rust/components/form/optional_field.rs +53 -0
  159. package/src/rust/components/form/select_field.rs +104 -0
  160. package/src/rust/components/function_dropdown.rs +151 -0
  161. package/src/rust/components/mod.rs +45 -0
  162. package/src/rust/components/modal.rs +171 -0
  163. package/src/rust/components/number_column_style.rs +522 -0
  164. package/src/rust/components/plugin_selector.rs +196 -0
  165. package/src/rust/components/render_warning.rs +178 -0
  166. package/src/rust/components/status_bar.rs +315 -0
  167. package/src/rust/components/status_bar_counter.rs +229 -0
  168. package/src/rust/components/status_indicator.rs +164 -0
  169. package/src/rust/components/string_column_style.rs +186 -0
  170. package/src/rust/components/style/local_style.rs +35 -0
  171. package/src/rust/components/style/mod.rs +52 -0
  172. package/src/rust/components/style/style_cache.rs +132 -0
  173. package/src/rust/components/style/style_provider.rs +65 -0
  174. package/src/rust/components/style_controls/number_string_format/digits_section.rs +140 -0
  175. package/src/rust/components/style_controls/number_string_format/misc_section.rs +56 -0
  176. package/src/rust/components/style_controls/number_string_format/style_section.rs +69 -0
  177. package/src/rust/components/style_controls/number_string_format/types.rs +31 -0
  178. package/src/rust/components/style_controls/number_string_format.rs +259 -0
  179. package/src/rust/components/style_controls.rs +15 -0
  180. package/src/rust/components/type_icon.rs +53 -0
  181. package/src/rust/components/viewer.rs +668 -0
  182. package/src/rust/config/columns_config.rs +132 -0
  183. package/src/rust/config/datetime_column_style/color_mode.rs +62 -0
  184. package/src/rust/config/datetime_column_style/custom.rs +121 -0
  185. package/src/rust/config/datetime_column_style/custom_format.rs +90 -0
  186. package/src/rust/config/datetime_column_style/simple.rs +55 -0
  187. package/src/rust/config/datetime_column_style/simple_format.rs +86 -0
  188. package/src/rust/config/datetime_column_style.rs +104 -0
  189. package/src/rust/config/mod.rs +30 -0
  190. package/src/rust/config/number_column_style.rs +138 -0
  191. package/src/rust/config/number_string_format/enums.rs +298 -0
  192. package/src/rust/config/number_string_format.rs +269 -0
  193. package/src/rust/config/string_column_style.rs +140 -0
  194. package/src/rust/config/view_config.rs +24 -0
  195. package/src/rust/config/viewer_config.rs +337 -0
  196. package/src/rust/custom_elements/column_dropdown.rs +123 -0
  197. package/src/rust/custom_elements/copy_dropdown.rs +112 -0
  198. package/src/rust/custom_elements/debug_plugin.rs +114 -0
  199. package/src/rust/custom_elements/export_dropdown.rs +112 -0
  200. package/src/rust/custom_elements/filter_dropdown.rs +179 -0
  201. package/src/rust/custom_elements/function_dropdown.rs +115 -0
  202. package/src/rust/custom_elements/mod.rs +24 -0
  203. package/src/rust/custom_elements/modal.rs +395 -0
  204. package/src/rust/custom_elements/viewer.rs +880 -0
  205. package/src/rust/custom_events.rs +214 -0
  206. package/src/rust/dragdrop.rs +362 -0
  207. package/src/rust/exprtk/cursor.rs +81 -0
  208. package/src/rust/exprtk/mod.rs +17 -0
  209. package/src/rust/exprtk/tokenize/comment.rs +21 -0
  210. package/src/rust/exprtk/tokenize/number.rs +44 -0
  211. package/src/rust/exprtk/tokenize/string.rs +98 -0
  212. package/src/rust/exprtk/tokenize/symbol.rs +26 -0
  213. package/src/rust/exprtk/tokenize.rs +190 -0
  214. package/src/rust/js/clipboard.rs +77 -0
  215. package/src/rust/js/clipboard_item.rs +21 -0
  216. package/src/rust/js/intersection_observer.rs +32 -0
  217. package/src/rust/js/mimetype.rs +42 -0
  218. package/src/rust/js/mod.rs +29 -0
  219. package/src/rust/js/plugin.rs +167 -0
  220. package/src/rust/js/resize_observer.rs +37 -0
  221. package/src/rust/js/testing.rs +149 -0
  222. package/src/rust/lib.rs +116 -0
  223. package/src/rust/model/columns_iter_set.rs +340 -0
  224. package/src/rust/model/copy_export.rs +157 -0
  225. package/src/rust/model/create_col.rs +59 -0
  226. package/src/rust/model/edit_expression.rs +95 -0
  227. package/src/rust/model/export_app.rs +58 -0
  228. package/src/rust/model/export_method.rs +151 -0
  229. package/src/rust/model/get_viewer_config.rs +85 -0
  230. package/src/rust/model/intersection_observer.rs +81 -0
  231. package/src/rust/model/is_invalid_drop.rs +36 -0
  232. package/src/rust/model/mod.rs +93 -0
  233. package/src/rust/model/plugin_column_styles.rs +106 -0
  234. package/src/rust/model/resize_observer.rs +98 -0
  235. package/src/rust/model/restore_and_render.rs +113 -0
  236. package/src/rust/model/structural.rs +73 -0
  237. package/src/rust/model/update_and_render.rs +74 -0
  238. package/src/rust/presentation.rs +370 -0
  239. package/src/rust/renderer/activate.rs +49 -0
  240. package/src/rust/renderer/limits.rs +200 -0
  241. package/src/rust/renderer/plugin_store.rs +45 -0
  242. package/src/rust/renderer/registry.rs +135 -0
  243. package/src/rust/renderer/render_timer.rs +185 -0
  244. package/src/rust/renderer.rs +463 -0
  245. package/src/rust/session/column_defaults_update.rs +141 -0
  246. package/src/rust/session/drag_drop_update.rs +179 -0
  247. package/src/rust/session/metadata.rs +308 -0
  248. package/src/rust/session/replace_expression_update.rs +131 -0
  249. package/src/rust/session/view_subscription.rs +189 -0
  250. package/src/rust/session.rs +794 -0
  251. package/src/rust/utils/browser/blob.rs +49 -0
  252. package/src/rust/utils/browser/download.rs +26 -0
  253. package/src/rust/utils/browser/mod.rs +24 -0
  254. package/src/rust/utils/browser/request_animation_frame.rs +76 -0
  255. package/src/rust/utils/browser/selection.rs +79 -0
  256. package/src/rust/utils/browser/tests/debounce.rs +114 -0
  257. package/src/rust/utils/browser/tests/mod.rs +13 -0
  258. package/src/rust/utils/custom_element.rs +85 -0
  259. package/src/rust/utils/datetime.rs +49 -0
  260. package/src/rust/utils/debounce.rs +54 -0
  261. package/src/rust/utils/hooks/mod.rs +15 -0
  262. package/src/rust/utils/hooks/use_async_callback.rs +53 -0
  263. package/src/rust/utils/mod.rs +114 -0
  264. package/src/rust/utils/number_format.rs +48 -0
  265. package/src/rust/utils/pubsub.rs +222 -0
  266. package/src/rust/utils/scope.rs +54 -0
  267. package/src/rust/utils/tee.rs +88 -0
  268. package/src/rust/utils/tests/mod.rs +14 -0
  269. package/src/rust/utils/tests/pubsub.rs +95 -0
  270. package/src/rust/utils/tests/request_animation_frame.rs +42 -0
  271. package/src/rust/utils/wasm_abi.rs +61 -0
  272. package/src/rust/utils/weak_scope.rs +39 -0
  273. package/src/svg/align-scroll-icon.svg +7 -0
  274. package/src/svg/bg-pattern.png +0 -0
  275. package/src/svg/boolean-type.svg +3 -0
  276. package/src/svg/checkbox-checked-icon.svg +7 -0
  277. package/src/svg/checkbox-hover.svg +4 -0
  278. package/src/svg/checkbox-off.svg +4 -0
  279. package/src/svg/checkbox-on.svg +4 -0
  280. package/src/svg/checkbox-unchecked-icon.svg +3 -0
  281. package/src/svg/close-icon.svg +6 -0
  282. package/src/svg/column-settings-icon.svg +6 -0
  283. package/src/svg/datagrid-select-column.svg +15 -0
  284. package/src/svg/datagrid-select-region.svg +15 -0
  285. package/src/svg/datagrid-select-row.svg +13 -0
  286. package/src/svg/datagrid.svg +13 -0
  287. package/src/svg/date-type.svg +23 -0
  288. package/src/svg/downloading.gif +0 -0
  289. package/src/svg/drag-handle.svg +10 -0
  290. package/src/svg/drawer-bg-pattern-hidpi.png +0 -0
  291. package/src/svg/drawer-tab-hover.svg +8 -0
  292. package/src/svg/drawer-tab-invert-hover.svg +9 -0
  293. package/src/svg/drawer-tab-invert.svg +8 -0
  294. package/src/svg/drawer-tab.svg +7 -0
  295. package/src/svg/dropdown-selector-light.svg +3 -0
  296. package/src/svg/dropdown-selector.svg +3 -0
  297. package/src/svg/duplicate-icon.svg +4 -0
  298. package/src/svg/editable-icon.svg +5 -0
  299. package/src/svg/export-icon.svg +4 -0
  300. package/src/svg/expression.svg +10 -0
  301. package/src/svg/free-scroll-icon.svg +5 -0
  302. package/src/svg/inactive-mouseover.svg +4 -0
  303. package/src/svg/mega-menu-icons-candlestick.svg +38 -0
  304. package/src/svg/mega-menu-icons-datagrid.svg +38 -0
  305. package/src/svg/mega-menu-icons-heatmap.svg +60 -0
  306. package/src/svg/mega-menu-icons-map-scatter.svg +43 -0
  307. package/src/svg/mega-menu-icons-ohlc.svg +40 -0
  308. package/src/svg/mega-menu-icons-sunburst.svg +39 -0
  309. package/src/svg/mega-menu-icons-treemap.svg +44 -0
  310. package/src/svg/mega-menu-icons-x-bar.svg +36 -0
  311. package/src/svg/mega-menu-icons-x-y-line.svg +38 -0
  312. package/src/svg/mega-menu-icons-x-y-scatter.svg +72 -0
  313. package/src/svg/mega-menu-icons-y-area.svg +73 -0
  314. package/src/svg/mega-menu-icons-y-bar.svg +36 -0
  315. package/src/svg/mega-menu-icons-y-line.svg +36 -0
  316. package/src/svg/mega-menu-icons-y-scatter.svg +72 -0
  317. package/src/svg/number-type.svg +4 -0
  318. package/src/svg/radio-hover.svg +4 -0
  319. package/src/svg/radio-off.svg +3 -0
  320. package/src/svg/radio-on.svg +4 -0
  321. package/src/svg/read-only-icon.svg +6 -0
  322. package/src/svg/revert-icon.svg +4 -0
  323. package/src/svg/sort-abs-asc-icon.svg +3 -0
  324. package/src/svg/sort-abs-col-asc-icon.svg +3 -0
  325. package/src/svg/sort-abs-col-desc-icon.svg +3 -0
  326. package/src/svg/sort-abs-desc-icon.svg +3 -0
  327. package/src/svg/sort-asc-icon.svg +4 -0
  328. package/src/svg/sort-col-asc-icon.svg +4 -0
  329. package/src/svg/sort-col-desc-icon.svg +4 -0
  330. package/src/svg/sort-desc-icon.svg +4 -0
  331. package/src/svg/sort-none-icon.svg +3 -0
  332. package/src/svg/status_error.svg +70 -0
  333. package/src/svg/status_ok.svg +26 -0
  334. package/src/svg/string-type.svg +8 -0
  335. package/src/svg/theme-icon.svg +5 -0
  336. package/src/svg/updating.gif +0 -0
  337. package/src/themes/dracula.less +101 -0
  338. package/src/themes/gruvbox-dark.less +116 -0
  339. package/src/themes/gruvbox.less +152 -0
  340. package/src/themes/icons.less +130 -0
  341. package/src/themes/intl/de.less +102 -0
  342. package/src/themes/intl/es.less +102 -0
  343. package/src/themes/intl/fr.less +102 -0
  344. package/src/themes/intl/ja.less +102 -0
  345. package/src/themes/intl/pt.less +102 -0
  346. package/src/themes/intl/zh.less +102 -0
  347. package/src/themes/intl.less +102 -0
  348. package/src/themes/monokai.less +107 -0
  349. package/src/themes/pro-dark.less +147 -0
  350. package/src/themes/pro.less +186 -0
  351. package/src/themes/solarized-dark.less +78 -0
  352. package/src/themes/solarized.less +102 -0
  353. package/src/themes/themes.less +21 -0
  354. package/src/themes/vaporwave.less +145 -0
  355. package/src/themes/variables.less +24 -0
  356. package/src/ts/bootstrap.ts +26 -0
  357. package/src/ts/extensions.ts +124 -0
  358. package/src/ts/perspective-viewer.cdn.ts +19 -0
  359. package/src/ts/perspective-viewer.inline.ts +23 -0
  360. package/src/ts/perspective-viewer.ts +59 -0
  361. package/src/ts/plugin.ts +279 -0
  362. package/src/ts/ts-rs/Aggregate.ts +3 -0
  363. package/src/ts/ts-rs/ColumnConfigValues.ts +14 -0
  364. package/src/ts/ts-rs/CustomDatetimeFormat.ts +3 -0
  365. package/src/ts/ts-rs/CustomDatetimeStyleConfig.ts +5 -0
  366. package/src/ts/ts-rs/CustomNumberFormatConfig.ts +8 -0
  367. package/src/ts/ts-rs/DatetimeColorMode.ts +3 -0
  368. package/src/ts/ts-rs/DatetimeFormatType.ts +8 -0
  369. package/src/ts/ts-rs/Expressions.ts +3 -0
  370. package/src/ts/ts-rs/Filter.ts +4 -0
  371. package/src/ts/ts-rs/FilterReducer.ts +3 -0
  372. package/src/ts/ts-rs/FilterTerm.ts +4 -0
  373. package/src/ts/ts-rs/FormatMode.ts +3 -0
  374. package/src/ts/ts-rs/FormatUnit.ts +3 -0
  375. package/src/ts/ts-rs/NumberBackgroundMode.ts +3 -0
  376. package/src/ts/ts-rs/NumberForegroundMode.ts +3 -0
  377. package/src/ts/ts-rs/OnUpdateData.ts +8 -0
  378. package/src/ts/ts-rs/OptionalUpdate.ts +3 -0
  379. package/src/ts/ts-rs/PluginConfig.ts +4 -0
  380. package/src/ts/ts-rs/RoundingMode.ts +3 -0
  381. package/src/ts/ts-rs/RoundingPriority.ts +3 -0
  382. package/src/ts/ts-rs/Scalar.ts +7 -0
  383. package/src/ts/ts-rs/SignDisplay.ts +3 -0
  384. package/src/ts/ts-rs/SimpleDatetimeFormat.ts +3 -0
  385. package/src/ts/ts-rs/SimpleDatetimeStyleConfig.ts +4 -0
  386. package/src/ts/ts-rs/Sort.ts +4 -0
  387. package/src/ts/ts-rs/SortDir.ts +3 -0
  388. package/src/ts/ts-rs/StringColorMode.ts +3 -0
  389. package/src/ts/ts-rs/TrailingZeroDisplay.ts +3 -0
  390. package/src/ts/ts-rs/UseGrouping.ts +3 -0
  391. package/src/ts/ts-rs/ViewOnUpdateResp.ts +3 -0
  392. package/src/ts/ts-rs/ViewerConfigUpdate.ts +90 -0
  393. package/src/ts/ts-rs/serde_json/JsonValue.ts +3 -0
  394. package/tsconfig.json +15 -0
@@ -0,0 +1,1291 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Register a plugin globally.
5
+ */
6
+ export function registerPlugin(name: string): void;
7
+ /**
8
+ * Register this crate's Custom Elements in the browser's current session.
9
+ *
10
+ * This must occur before calling any public API methods on these Custom
11
+ * Elements from JavaScript, as the methods themselves won't be defined yet.
12
+ * By default, this crate does not register `PerspectiveViewerElement` (as to
13
+ * preserve backwards-compatible synchronous API).
14
+ */
15
+ export function init(): void;
16
+
17
+ import type {
18
+ TableInitOptions,
19
+ ColumnWindow,
20
+ ViewWindow,
21
+ OnUpdateOptions,
22
+ UpdateOptions,
23
+ DeleteOptions,
24
+ ViewConfigUpdate,
25
+ SystemInfo,
26
+ } from "@perspective-dev/client";
27
+
28
+
29
+ /**
30
+ * An instance of a [`Client`] is a connection to a single
31
+ * `perspective_server::Server`, whether locally in-memory or remote over some
32
+ * transport like a WebSocket.
33
+ *
34
+ * The browser and node.js libraries both support the `websocket(url)`
35
+ * constructor, which connects to a remote `perspective_server::Server`
36
+ * instance over a WebSocket transport.
37
+ *
38
+ * In the browser, the `worker()` constructor creates a new Web Worker
39
+ * `perspective_server::Server` and returns a [`Client`] connected to it.
40
+ *
41
+ * In node.js, a pre-instantied [`Client`] connected synhronously to a global
42
+ * singleton `perspective_server::Server` is the default module export.
43
+ *
44
+ * # JavaScript Examples
45
+ *
46
+ * Create a Web Worker `perspective_server::Server` in the browser and return a
47
+ * [`Client`] instance connected for it:
48
+ *
49
+ * ```javascript
50
+ * import perspective from "@perspective-dev/client";
51
+ * const client = await perspective.worker();
52
+ * ```
53
+ *
54
+ * Create a WebSocket connection to a remote `perspective_server::Server`:
55
+ *
56
+ * ```javascript
57
+ * import perspective from "@perspective-dev/client";
58
+ * const client = await perspective.websocket("ws://locahost:8080/ws");
59
+ * ```
60
+ *
61
+ * Access the synchronous client in node.js:
62
+ *
63
+ * ```javascript
64
+ * import { default as client } from "@perspective-dev/client";
65
+ * ```
66
+ */
67
+ export class Client {
68
+ free(): void;
69
+ __getClassname(): string;
70
+ constructor(send_request: Function, close?: Function | null);
71
+ new_proxy_session(on_response: Function): ProxySession;
72
+ handle_response(value: any): Promise<void>;
73
+ handle_error(error: string, reconnect?: Function | null): Promise<void>;
74
+ on_error(callback: Function): Promise<number>;
75
+ /**
76
+ * Creates a new [`Table`] from either a _schema_ or _data_.
77
+ *
78
+ * The [`Client::table`] factory function can be initialized with either a
79
+ * _schema_ (see [`Table::schema`]), or data in one of these formats:
80
+ *
81
+ * - Apache Arrow
82
+ * - CSV
83
+ * - JSON row-oriented
84
+ * - JSON column-oriented
85
+ * - NDJSON
86
+ *
87
+ * When instantiated with _data_, the schema is inferred from this data.
88
+ * While this is convenient, inferrence is sometimes imperfect e.g.
89
+ * when the input is empty, null or ambiguous. For these cases,
90
+ * [`Client::table`] can first be instantiated with a explicit schema.
91
+ *
92
+ * When instantiated with a _schema_, the resulting [`Table`] is empty but
93
+ * with known column names and column types. When subsqeuently
94
+ * populated with [`Table::update`], these columns will be _coerced_ to
95
+ * the schema's type. This behavior can be useful when
96
+ * [`Client::table`]'s column type inferences doesn't work.
97
+ *
98
+ * The resulting [`Table`] is _virtual_, and invoking its methods
99
+ * dispatches events to the `perspective_server::Server` this
100
+ * [`Client`] connects to, where the data is stored and all calculation
101
+ * occurs.
102
+ *
103
+ * # Arguments
104
+ *
105
+ * - `arg` - Either _schema_ or initialization _data_.
106
+ * - `options` - Optional configuration which provides one of:
107
+ * - `limit` - The max number of rows the resulting [`Table`] can
108
+ * store.
109
+ * - `index` - The column name to use as an _index_ column. If this
110
+ * `Table` is being instantiated by _data_, this column name must be
111
+ * present in the data.
112
+ * - `name` - The name of the table. This will be generated if it is
113
+ * not provided.
114
+ * - `format` - The explicit format of the input data, can be one of
115
+ * `"json"`, `"columns"`, `"csv"` or `"arrow"`. This overrides
116
+ * language-specific type dispatch behavior, which allows stringified
117
+ * and byte array alternative inputs.
118
+ *
119
+ * # JavaScript Examples
120
+ *
121
+ * Load a CSV from a `string`:
122
+ *
123
+ * ```javascript
124
+ * const table = await client.table("x,y\n1,2\n3,4");
125
+ * ```
126
+ *
127
+ * Load an Arrow from an `ArrayBuffer`:
128
+ *
129
+ * ```javascript
130
+ * import * as fs from "node:fs/promises";
131
+ * const table2 = await client.table(await fs.readFile("superstore.arrow"));
132
+ * ```
133
+ *
134
+ * Load a CSV from a `UInt8Array` (the default for this type is Arrow)
135
+ * using a format override:
136
+ *
137
+ * ```javascript
138
+ * const enc = new TextEncoder();
139
+ * const table = await client.table(enc.encode("x,y\n1,2\n3,4"), {
140
+ * format: "csv",
141
+ * });
142
+ * ```
143
+ *
144
+ * Create a table with an `index`:
145
+ *
146
+ * ```javascript
147
+ * const table = await client.table(data, { index: "Row ID" });
148
+ * ```
149
+ */
150
+ table(value: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[], options?: TableInitOptions | null): Promise<Table>;
151
+ /**
152
+ * Terminates this [`Client`], cleaning up any [`crate::View`] handles the
153
+ * [`Client`] has open as well as its callbacks.
154
+ */
155
+ terminate(): any;
156
+ /**
157
+ * Opens a [`Table`] that is hosted on the `perspective_server::Server`
158
+ * that is connected to this [`Client`].
159
+ *
160
+ * The `name` property of [`TableInitOptions`] is used to identify each
161
+ * [`Table`]. [`Table`] `name`s can be looked up for each [`Client`]
162
+ * via [`Client::get_hosted_table_names`].
163
+ *
164
+ * # JavaScript Examples
165
+ *
166
+ * Get a virtual [`Table`] named "table_one" from this [`Client`]
167
+ *
168
+ * ```javascript
169
+ * const tables = await client.open_table("table_one");
170
+ * ```
171
+ */
172
+ open_table(entity_id: string): Promise<Table>;
173
+ /**
174
+ * Retrieves the names of all tables that this client has access to.
175
+ *
176
+ * `name` is a string identifier unique to the [`Table`] (per [`Client`]),
177
+ * which can be used in conjunction with [`Client::open_table`] to get
178
+ * a [`Table`] instance without the use of [`Client::table`]
179
+ * constructor directly (e.g., one created by another [`Client`]).
180
+ *
181
+ * # JavaScript Examples
182
+ *
183
+ * ```javascript
184
+ * const tables = await client.get_hosted_table_names();
185
+ * ```
186
+ */
187
+ get_hosted_table_names(): Promise<any>;
188
+ /**
189
+ * Register a callback which is invoked whenever [`Client::table`] (on this
190
+ * [`Client`]) or [`Table::delete`] (on a [`Table`] belinging to this
191
+ * [`Client`]) are called.
192
+ */
193
+ on_hosted_tables_update(on_update_js: Function): Promise<number>;
194
+ /**
195
+ * Remove a callback previously registered via
196
+ * `Client::on_hosted_tables_update`.
197
+ */
198
+ remove_hosted_tables_update(update_id: number): Promise<void>;
199
+ /**
200
+ * Provides the [`SystemInfo`] struct, implementation-specific metadata
201
+ * about the [`perspective_server::Server`] runtime such as Memory and
202
+ * CPU usage.
203
+ *
204
+ * For WebAssembly servers, this method includes the WebAssembly heap size.
205
+ *
206
+ * # JavaScript Examples
207
+ *
208
+ * ```javascript
209
+ * const info = await client.system_info();
210
+ * ```
211
+ */
212
+ system_info(): Promise<SystemInfo>;
213
+ }
214
+ export class ColumnDropDownElement {
215
+ private constructor();
216
+ free(): void;
217
+ }
218
+ export class CopyDropDownMenuElement {
219
+ free(): void;
220
+ constructor(elem: HTMLElement);
221
+ open(target: HTMLElement): void;
222
+ hide(): void;
223
+ /**
224
+ * Internal Only.
225
+ *
226
+ * Set this custom element model's raw pointer.
227
+ */
228
+ set_model(parent: PerspectiveViewerElement): void;
229
+ connected_callback(): void;
230
+ }
231
+ export class ExportDropDownMenuElement {
232
+ free(): void;
233
+ constructor(elem: HTMLElement);
234
+ open(target: HTMLElement): void;
235
+ hide(): void;
236
+ /**
237
+ * Internal Only.
238
+ *
239
+ * Set this custom element model's raw pointer.
240
+ */
241
+ set_model(parent: PerspectiveViewerElement): void;
242
+ connected_callback(): void;
243
+ }
244
+ export class FilterDropDownElement {
245
+ private constructor();
246
+ free(): void;
247
+ }
248
+ export class FunctionDropDownElement {
249
+ private constructor();
250
+ free(): void;
251
+ }
252
+ /**
253
+ * The `<perspective-viewer-plugin>` element.
254
+ *
255
+ * The default perspective plugin which is registered and activated
256
+ * automcatically when a `<perspective-viewer>` is loaded without plugins.
257
+ * While you will not typically instantiate this class directly, it is simple
258
+ * enough to function as a good "default" plugin implementation which can be
259
+ * extended to create custom plugins.
260
+ *
261
+ * # Example
262
+ * ```javascript
263
+ * class MyPlugin extends customElements.get("perspective-viewer-plugin") {
264
+ * // Custom plugin overrides
265
+ * }
266
+ * ```
267
+ */
268
+ export class PerspectiveDebugPluginElement {
269
+ free(): void;
270
+ constructor(elem: HTMLElement);
271
+ update(view: View): Promise<any>;
272
+ /**
273
+ * # Notes
274
+ *
275
+ * When you pass a `wasm_bindgen` wrapped type _into_ Rust, it acts like a
276
+ * move. Ergo, if you replace the `&` in the `view` argument, the JS copy
277
+ * of the `View` will be invalid
278
+ */
279
+ draw(view: View): Promise<any>;
280
+ clear(): Promise<any>;
281
+ resize(): Promise<any>;
282
+ restyle(): Promise<any>;
283
+ save(): Promise<any>;
284
+ restore(): Promise<any>;
285
+ delete(): Promise<any>;
286
+ connectedCallback(): void;
287
+ readonly name: string;
288
+ readonly select_mode: string;
289
+ readonly min_config_columns: any;
290
+ readonly config_column_names: any;
291
+ }
292
+ /**
293
+ * The `<perspective-viewer>` custom element.
294
+ *
295
+ * # JavaScript Examples
296
+ *
297
+ * Create a new `<perspective-viewer>`:
298
+ *
299
+ * ```javascript
300
+ * const viewer = document.createElement("perspective-viewer");
301
+ * window.body.appendChild(viewer);
302
+ * ```
303
+ */
304
+ export class PerspectiveViewerElement {
305
+ free(): void;
306
+ constructor(elem: HTMLElement);
307
+ connectedCallback(): void;
308
+ /**
309
+ * Loads a [`Table`] (or rather, a Javascript `Promise` which returns a
310
+ * [`Table`]) in this viewer.
311
+ *
312
+ * When [`PerspectiveViewerElement::load`] resolves, the first frame of the
313
+ * UI + visualization is guaranteed to have been drawn. Awaiting the result
314
+ * of this method in a `try`/`catch` block will capture any errors
315
+ * thrown during the loading process, or from the [`Table`] `Promise`
316
+ * itself.
317
+ *
318
+ * A [`Table`] can be created using the
319
+ * [`@perspective-dev/client`](https://www.npmjs.com/package/@perspective-dev/client)
320
+ * library from NPM (see [`perspective_js`] documentation for details).
321
+ *
322
+ * # JavaScript Examples
323
+ *
324
+ * ```javascript
325
+ * import perspective from "@perspective-dev/client";
326
+ *
327
+ * const worker = await perspective.worker();
328
+ * viewer.load(worker.table("x,y\n1,2"));
329
+ * ```
330
+ */
331
+ load(table: any): Promise<any>;
332
+ /**
333
+ * Delete the internal [`View`] and all associated state, rendering this
334
+ * `<perspective-viewer>` unusable and freeing all associated resources.
335
+ * Does not delete the supplied [`Table`] (as this is constructed by the
336
+ * callee).
337
+ *
338
+ * Calling _any_ method on a `<perspective-viewer>` after [`Self::delete`]
339
+ * will throw.
340
+ *
341
+ * <div class="warning">
342
+ *
343
+ * Allowing a `<perspective-viewer>` to be garbage-collected
344
+ * without calling [`PerspectiveViewerElement::delete`] will leak WASM
345
+ * memory!
346
+ *
347
+ * </div>
348
+ *
349
+ * # JavaScript Examples
350
+ *
351
+ * ```javascript
352
+ * await viewer.delete();
353
+ * ```
354
+ */
355
+ delete(): Promise<any>;
356
+ /**
357
+ * Restart this `<perspective-viewer>` to its initial state, before
358
+ * `load()`.
359
+ *
360
+ * Use `Self::restart` if you plan to call `Self::load` on this viewer
361
+ * again, or alternatively `Self::delete` if this viewer is no longer
362
+ * needed.
363
+ */
364
+ eject(): Promise<any>;
365
+ /**
366
+ * Get the underlying [`View`] for this viewer.
367
+ *
368
+ * Use this method to get promgrammatic access to the [`View`] as currently
369
+ * configured by the user, for e.g. serializing as an
370
+ * [Apache Arrow](https://arrow.apache.org/) before passing to another
371
+ * library.
372
+ *
373
+ * The [`View`] returned by this method is owned by the
374
+ * [`PerspectiveViewerElement`] and may be _invalidated_ by
375
+ * [`View::delete`] at any time. Plugins which rely on this [`View`] for
376
+ * their [`HTMLPerspectiveViewerPluginElement::draw`] implementations
377
+ * should treat this condition as a _cancellation_ by silently aborting on
378
+ * "View already deleted" errors from method calls.
379
+ *
380
+ * # JavaScript Examples
381
+ *
382
+ * ```javascript
383
+ * const view = await viewer.getView();
384
+ * ```
385
+ */
386
+ getView(): Promise<any>;
387
+ /**
388
+ * Get the underlying [`Table`] for this viewer (as passed to
389
+ * [`PerspectiveViewerElement::load`]).
390
+ *
391
+ * # Arguments
392
+ *
393
+ * - `wait_for_table` - whether to wait for
394
+ * [`PerspectiveViewerElement::load`] to be called, or fail immediately
395
+ * if [`PerspectiveViewerElement::load`] has not yet been called.
396
+ *
397
+ * # JavaScript Examples
398
+ *
399
+ * ```javascript
400
+ * const table = await viewer.getTable();
401
+ * ```
402
+ */
403
+ getTable(wait_for_table?: boolean | null): Promise<any>;
404
+ /**
405
+ * Get render statistics. Some fields of the returned stats object are
406
+ * relative to the last time [`PerspectiveViewerElement::getRenderStats`]
407
+ * was called, ergo calling this method resets these fields.
408
+ *
409
+ * # JavaScript Examples
410
+ *
411
+ * ```javascript
412
+ * const {virtual_fps, actual_fps} = await viewer.getRenderStats();
413
+ * ```
414
+ */
415
+ getRenderStats(): any;
416
+ /**
417
+ * Flush any pending modifications to this `<perspective-viewer>`. Since
418
+ * `<perspective-viewer>`'s API is almost entirely `async`, it may take
419
+ * some milliseconds before any user-initiated changes to the [`View`]
420
+ * affects the rendered element. If you want to make sure all pending
421
+ * actions have been rendered, call and await [`Self::flush`].
422
+ *
423
+ * [`Self::flush`] will resolve immediately if there is no [`Table`] set.
424
+ *
425
+ * # JavaScript Examples
426
+ *
427
+ * In this example, [`Self::restore`] is called without `await`, but the
428
+ * eventual render which results from this call can still be awaited by
429
+ * immediately awaiting [`Self::flush`] instead.
430
+ *
431
+ * ```javascript
432
+ * viewer.restore(config);
433
+ * await viewer.flush();
434
+ * ```
435
+ */
436
+ flush(): Promise<any>;
437
+ /**
438
+ * Restores this element from a full/partial
439
+ * [`perspective_js::JsViewConfig`].
440
+ *
441
+ * One of the best ways to use [`Self::restore`] is by first configuring
442
+ * a `<perspective-viewer>` as you wish, then using either the `Debug`
443
+ * panel or "Copy" -> "config.json" from the toolbar menu to snapshot
444
+ * the [`Self::restore`] argument as JSON.
445
+ *
446
+ * # Arguments
447
+ *
448
+ * - `update` - The config to restore to, as returned by [`Self::save`] in
449
+ * either "json", "string" or "arraybuffer" format.
450
+ *
451
+ * # JavaScript Examples
452
+ *
453
+ * Apply a `group_by` to the current [`View`], without modifying/resetting
454
+ * other fields:
455
+ *
456
+ * ```javascript
457
+ * await viewer.restore({group_by: ["State"]});
458
+ * ```
459
+ */
460
+ restore(update: any): Promise<any>;
461
+ resetError(): Promise<any>;
462
+ /**
463
+ * Save this element to serialized state object, one which can be restored
464
+ * via the [`Self::restore`] method.
465
+ *
466
+ * # Arguments
467
+ *
468
+ * - `format` - Supports "json" (default), "arraybuffer" or "string".
469
+ *
470
+ * # JavaScript Examples
471
+ *
472
+ * Get the current `group_by` setting:
473
+ *
474
+ * ```javascript
475
+ * const {group_by} = await viewer.restore();
476
+ * ```
477
+ *
478
+ * Reset workflow attached to an external button `myResetButton`:
479
+ *
480
+ * ```javascript
481
+ * const token = await viewer.save();
482
+ * myResetButton.addEventListener("clien", async () => {
483
+ * await viewer.restore(token);
484
+ * });
485
+ * ```
486
+ */
487
+ save(format?: string | null): Promise<any>;
488
+ /**
489
+ * Download this viewer's internal [`View`] data as a `.csv` file.
490
+ *
491
+ * # Arguments
492
+ *
493
+ * - `flat` - Whether to use the current [`perspective_js::JsViewConfig`]
494
+ * to generate this data, or use the default.
495
+ *
496
+ * # JavaScript Examples
497
+ *
498
+ * ```javascript
499
+ * myDownloadButton.addEventListener("click", async () => {
500
+ * await viewer.download();
501
+ * })
502
+ * ```
503
+ */
504
+ download(flat?: boolean | null): Promise<any>;
505
+ /**
506
+ * Copy this viewer's `View` or `Table` data as CSV to the system
507
+ * clipboard.
508
+ *
509
+ * # Arguments
510
+ *
511
+ * - `method` - The `ExportMethod` (serialized as a `String`) to use to
512
+ * render the data to the Clipboard.
513
+ *
514
+ * # JavaScript Examples
515
+ *
516
+ * ```javascript
517
+ * myDownloadButton.addEventListener("click", async () => {
518
+ * await viewer.copy();
519
+ * })
520
+ * ```
521
+ */
522
+ copy(method?: string | null): Promise<any>;
523
+ /**
524
+ * Reset the viewer's `ViewerConfig` to the default.
525
+ *
526
+ * # Arguments
527
+ *
528
+ * - `reset_all` - If set, will clear expressions and column settings as
529
+ * well.
530
+ *
531
+ * # JavaScript Examples
532
+ *
533
+ * ```javascript
534
+ * await viewer.reset();
535
+ * ```
536
+ */
537
+ reset(reset_all?: boolean | null): Promise<any>;
538
+ /**
539
+ * Recalculate the viewer's dimensions and redraw.
540
+ *
541
+ * Use this method to tell `<perspective-viewer>` its dimensions have
542
+ * changed when auto-size mode has been disabled via [`Self::setAutoSize`].
543
+ * [`Self::resize`] resolves when the resize-initiated redraw of this
544
+ * element has completed.
545
+ *
546
+ * # Arguments
547
+ *
548
+ * - `force` - If [`Self::resize`] is called with `false` or without an
549
+ * argument, and _auto-size_ mode is enabled via [`Self::setAutoSize`],
550
+ * [`Self::resize`] will log a warning and auto-disable auto-size mode.
551
+ *
552
+ * # JavaScript Examples
553
+ *
554
+ * ```javascript
555
+ * await viewer.resize(true)
556
+ * ```
557
+ */
558
+ resize(force?: boolean | null): Promise<any>;
559
+ /**
560
+ * Sets the auto-size behavior of this component.
561
+ *
562
+ * When `true`, this `<perspective-viewer>` will register a
563
+ * `ResizeObserver` on itself and call [`Self::resize`] whenever its own
564
+ * dimensions change. However, when embedded in a larger application
565
+ * context, you may want to call [`Self::resize`] manually to avoid
566
+ * over-rendering; in this case auto-sizing can be disabled via this
567
+ * method. Auto-size behavior is enabled by default.
568
+ *
569
+ * # Arguments
570
+ *
571
+ * - `autosize` - Whether to enable `auto-size` behavior or not.
572
+ *
573
+ * # JavaScript Examples
574
+ *
575
+ * Disable auto-size behavior:
576
+ *
577
+ * ```javascript
578
+ * viewer.setAutoSize(false);
579
+ * ```
580
+ */
581
+ setAutoSize(autosize: boolean): void;
582
+ /**
583
+ * Sets the auto-pause behavior of this component.
584
+ *
585
+ * When `true`, this `<perspective-viewer>` will register an
586
+ * `IntersectionObserver` on itself and subsequently skip rendering
587
+ * whenever its viewport visibility changes. Auto-pause is enabled by
588
+ * default.
589
+ *
590
+ * # Arguments
591
+ *
592
+ * - `autopause` Whether to enable `auto-pause` behavior or not.
593
+ *
594
+ * # JavaScript Examples
595
+ *
596
+ * Disable auto-size behavior:
597
+ *
598
+ * ```javascript
599
+ * viewer.setAutoPause(false);
600
+ * ```
601
+ */
602
+ setAutoPause(autopause: boolean): void;
603
+ /**
604
+ * Return a [`perspective_js::JsViewWindow`] for the currently selected
605
+ * region.
606
+ */
607
+ getSelection(): ViewWindow | undefined;
608
+ /**
609
+ * Set the selection [`perspective_js::JsViewWindow`] for this element.
610
+ */
611
+ setSelection(window?: ViewWindow | null): void;
612
+ /**
613
+ * Get this viewer's edit port for the currently loaded [`Table`] (see
614
+ * [`Table::update`] for details on ports).
615
+ */
616
+ getEditPort(): number;
617
+ /**
618
+ * Restyle all plugins from current document.
619
+ *
620
+ * <div class="warning">
621
+ *
622
+ * [`Self::restyleElement`] _must_ be called for many runtime changes to
623
+ * CSS properties to be reflected in an already-rendered
624
+ * `<perspective-viewer>`.
625
+ *
626
+ * </div>
627
+ *
628
+ * # JavaScript Examples
629
+ *
630
+ * ```javascript
631
+ * viewer.style = "--icon--color: red";
632
+ * await viewer.restyleElement();
633
+ * ```
634
+ */
635
+ restyleElement(): Promise<any>;
636
+ /**
637
+ * Set the available theme names available in the status bar UI.
638
+ *
639
+ * Calling [`Self::resetThemes`] may cause the current theme to switch,
640
+ * if e.g. the new theme set does not contain the current theme.
641
+ *
642
+ * # JavaScript Examples
643
+ *
644
+ * Restrict `<perspective-viewer>` theme options to _only_ default light
645
+ * and dark themes, regardless of what is auto-detected from the page's
646
+ * CSS:
647
+ *
648
+ * ```javascript
649
+ * viewer.resetThemes(["Pro Light", "Pro Dark"])
650
+ * ```
651
+ */
652
+ resetThemes(themes?: any[] | null): Promise<any>;
653
+ /**
654
+ * Determines the render throttling behavior. Can be an integer, for
655
+ * millisecond window to throttle render event; or, if `None`, adaptive
656
+ * throttling will be calculated from the measured render time of the
657
+ * last 5 frames.
658
+ *
659
+ * # Arguments
660
+ *
661
+ * - `throttle` - The throttle rate in milliseconds (f64), or `None` for
662
+ * adaptive throttling.
663
+ *
664
+ * # JavaScript Examples
665
+ *
666
+ * Only draws at most 1 frame/sec:
667
+ *
668
+ * ```rust
669
+ * viewer.setThrottle(1000);
670
+ * ```
671
+ */
672
+ setThrottle(val?: number | null): void;
673
+ /**
674
+ * Toggle (or force) the config panel open/closed.
675
+ *
676
+ * # Arguments
677
+ *
678
+ * - `force` - Force the state of the panel open or closed, or `None` to
679
+ * toggle.
680
+ *
681
+ * # JavaScript Examples
682
+ *
683
+ * ```javascript
684
+ * await viewer.toggleConfig();
685
+ * ```
686
+ */
687
+ toggleConfig(force?: boolean | null): Promise<any>;
688
+ /**
689
+ * Get an `Array` of all of the plugin custom elements registered for this
690
+ * element. This may not include plugins which called
691
+ * [`registerPlugin`] after the host has rendered for the first time.
692
+ */
693
+ getAllPlugins(): Array<any>;
694
+ /**
695
+ * Gets a plugin Custom Element with the `name` field, or get the active
696
+ * plugin if no `name` is provided.
697
+ *
698
+ * # Arguments
699
+ *
700
+ * - `name` - The `name` property of a perspective plugin Custom Element,
701
+ * or `None` for the active plugin's Custom Element.
702
+ */
703
+ getPlugin(name?: string | null): any;
704
+ /**
705
+ * Create a new JavaScript Heap reference for this model instance.
706
+ */
707
+ get_model(): PerspectiveViewerElement;
708
+ /**
709
+ * Asynchronously opens the column settings for a specific column.
710
+ * When finished, the `<perspective-viewer>` element will emit a
711
+ * "perspective-toggle-column-settings" CustomEvent.
712
+ * The event's details property has two fields: `{open: bool, column_name?:
713
+ * string}`. The CustomEvent is also fired whenever the user toggles the
714
+ * sidebar manually.
715
+ */
716
+ toggleColumnSettings(column_name: string): Promise<any>;
717
+ /**
718
+ * Force open the settings for a particular column. Pass `null` to close
719
+ * the column settings panel. See [`Self::toggleColumnSettings`] for more.
720
+ */
721
+ openColumnSettings(column_name?: string | null, toggle?: boolean | null): Promise<any>;
722
+ }
723
+ export class ProxySession {
724
+ free(): void;
725
+ constructor(client: Client, on_response: Function);
726
+ handle_request(value: any): Promise<void>;
727
+ close(): Promise<void>;
728
+ }
729
+ export class Table {
730
+ private constructor();
731
+ free(): void;
732
+ __getClassname(): string;
733
+ /**
734
+ * Returns the name of the index column for the table.
735
+ *
736
+ * # JavaScript Examples
737
+ *
738
+ * ```javascript
739
+ * const table = await client.table("x,y\n1,2\n3,4", { index: "x" });
740
+ * const index = table.get_index(); // "x"
741
+ * ```
742
+ */
743
+ get_index(): Promise<string | undefined>;
744
+ /**
745
+ * Get a copy of the [`Client`] this [`Table`] came from.
746
+ */
747
+ get_client(): Promise<Client>;
748
+ /**
749
+ * Returns the user-specified name for this table, or the auto-generated
750
+ * name if a name was not specified when the table was created.
751
+ */
752
+ get_name(): Promise<string>;
753
+ /**
754
+ * Returns the user-specified row limit for this table.
755
+ */
756
+ get_limit(): Promise<number | undefined>;
757
+ /**
758
+ * Removes all the rows in the [`Table`], but preserves everything else
759
+ * including the schema, index, and any callbacks or registered
760
+ * [`View`] instances.
761
+ *
762
+ * Calling [`Table::clear`], like [`Table::update`] and [`Table::remove`],
763
+ * will trigger an update event to any registered listeners via
764
+ * [`View::on_update`].
765
+ */
766
+ clear(): Promise<void>;
767
+ /**
768
+ * Delete this [`Table`] and cleans up associated resources.
769
+ *
770
+ * [`Table`]s do not stop consuming resources or processing updates when
771
+ * they are garbage collected in their host language - you must call
772
+ * this method to reclaim these.
773
+ *
774
+ * # Arguments
775
+ *
776
+ * - `options` An options dictionary.
777
+ * - `lazy` Whether to delete this [`Table`] _lazily_. When false (the
778
+ * default), the delete will occur immediately, assuming it has no
779
+ * [`View`] instances registered to it (which must be deleted first,
780
+ * otherwise this method will throw an error). When true, the
781
+ * [`Table`] will only be marked for deltion once its [`View`]
782
+ * dependency count reaches 0.
783
+ *
784
+ * # JavaScript Examples
785
+ *
786
+ * ```javascript
787
+ * const table = await client.table("x,y\n1,2\n3,4");
788
+ *
789
+ * // ...
790
+ *
791
+ * await table.delete({ lazy: true });
792
+ * ```
793
+ */
794
+ delete(options?: DeleteOptions | null): Promise<void>;
795
+ /**
796
+ * Returns the number of rows in a [`Table`].
797
+ */
798
+ size(): Promise<number>;
799
+ /**
800
+ * Returns a table's [`Schema`], a mapping of column names to column types.
801
+ *
802
+ * The mapping of a [`Table`]'s column names to data types is referred to
803
+ * as a [`Schema`]. Each column has a unique name and a data type, one
804
+ * of:
805
+ *
806
+ * - `"boolean"` - A boolean type
807
+ * - `"date"` - A timesonze-agnostic date type (month/day/year)
808
+ * - `"datetime"` - A millisecond-precision datetime type in the UTC
809
+ * timezone
810
+ * - `"float"` - A 64 bit float
811
+ * - `"integer"` - A signed 32 bit integer (the integer type supported by
812
+ * JavaScript)
813
+ * - `"string"` - A [`String`] data type (encoded internally as a
814
+ * _dictionary_)
815
+ *
816
+ * Note that all [`Table`] columns are _nullable_, regardless of the data
817
+ * type.
818
+ */
819
+ schema(): Promise<any>;
820
+ /**
821
+ * Returns the column names of this [`Table`] in "natural" order (the
822
+ * ordering implied by the input format).
823
+ *
824
+ * # JavaScript Examples
825
+ *
826
+ * ```javascript
827
+ * const columns = await table.columns();
828
+ * ```
829
+ */
830
+ columns(): Promise<any>;
831
+ /**
832
+ * Create a unique channel ID on this [`Table`], which allows
833
+ * `View::on_update` callback calls to be associated with the
834
+ * `Table::update` which caused them.
835
+ */
836
+ make_port(): Promise<number>;
837
+ /**
838
+ * Register a callback which is called exactly once, when this [`Table`] is
839
+ * deleted with the [`Table::delete`] method.
840
+ *
841
+ * [`Table::on_delete`] resolves when the subscription message is sent, not
842
+ * when the _delete_ event occurs.
843
+ */
844
+ on_delete(on_delete: Function): Promise<any>;
845
+ /**
846
+ * Removes a listener with a given ID, as returned by a previous call to
847
+ * [`Table::on_delete`].
848
+ */
849
+ remove_delete(callback_id: number): Promise<any>;
850
+ /**
851
+ * Removes rows from this [`Table`] with the `index` column values
852
+ * supplied.
853
+ *
854
+ * # Arguments
855
+ *
856
+ * - `indices` - A list of `index` column values for rows that should be
857
+ * removed.
858
+ *
859
+ * # JavaScript Examples
860
+ *
861
+ * ```javascript
862
+ * await table.remove([1, 2, 3]);
863
+ * ```
864
+ */
865
+ remove(value: any, options?: UpdateOptions | null): Promise<void>;
866
+ /**
867
+ * Replace all rows in this [`Table`] with the input data, coerced to this
868
+ * [`Table`]'s existing [`perspective_client::Schema`], notifying any
869
+ * derived [`View`] and [`View::on_update`] callbacks.
870
+ *
871
+ * Calling [`Table::replace`] is an easy way to replace _all_ the data in a
872
+ * [`Table`] without losing any derived [`View`] instances or
873
+ * [`View::on_update`] callbacks. [`Table::replace`] does _not_ infer
874
+ * data types like [`Client::table`] does, rather it _coerces_ input
875
+ * data to the `Schema` like [`Table::update`]. If you need a [`Table`]
876
+ * with a different `Schema`, you must create a new one.
877
+ *
878
+ * # JavaScript Examples
879
+ *
880
+ * ```javascript
881
+ * await table.replace("x,y\n1,2");
882
+ * ```
883
+ */
884
+ replace(input: any, options?: UpdateOptions | null): Promise<void>;
885
+ /**
886
+ * Updates the rows of this table and any derived [`View`] instances.
887
+ *
888
+ * Calling [`Table::update`] will trigger the [`View::on_update`] callbacks
889
+ * register to derived [`View`], and the call itself will not resolve until
890
+ * _all_ derived [`View`]'s are notified.
891
+ *
892
+ * When updating a [`Table`] with an `index`, [`Table::update`] supports
893
+ * partial updates, by omitting columns from the update data.
894
+ *
895
+ * # Arguments
896
+ *
897
+ * - `input` - The input data for this [`Table`]. The schema of a [`Table`]
898
+ * is immutable after creation, so this method cannot be called with a
899
+ * schema.
900
+ * - `options` - Options for this update step - see [`UpdateOptions`].
901
+ *
902
+ * # JavaScript Examples
903
+ *
904
+ * ```javascript
905
+ * await table.update("x,y\n1,2");
906
+ * ```
907
+ */
908
+ update(input: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[], options?: UpdateOptions | null): Promise<any>;
909
+ /**
910
+ * Create a new [`View`] from this table with a specified
911
+ * [`ViewConfigUpdate`].
912
+ *
913
+ * See [`View`] struct.
914
+ *
915
+ * # JavaScript Examples
916
+ *
917
+ * ```javascript
918
+ * const view = await table.view({
919
+ * columns: ["Sales"],
920
+ * aggregates: { Sales: "sum" },
921
+ * group_by: ["Region", "Country"],
922
+ * filter: [["Category", "in", ["Furniture", "Technology"]]],
923
+ * });
924
+ * ```
925
+ */
926
+ view(config?: ViewConfigUpdate | null): Promise<View>;
927
+ /**
928
+ * Validates the given expressions.
929
+ */
930
+ validate_expressions(exprs: any): Promise<any>;
931
+ }
932
+ /**
933
+ * The [`View`] struct is Perspective's query and serialization interface. It
934
+ * represents a query on the `Table`'s dataset and is always created from an
935
+ * existing `Table` instance via the [`Table::view`] method.
936
+ *
937
+ * [`View`]s are immutable with respect to the arguments provided to the
938
+ * [`Table::view`] method; to change these parameters, you must create a new
939
+ * [`View`] on the same [`Table`]. However, each [`View`] is _live_ with
940
+ * respect to the [`Table`]'s data, and will (within a conflation window)
941
+ * update with the latest state as its parent [`Table`] updates, including
942
+ * incrementally recalculating all aggregates, pivots, filters, etc. [`View`]
943
+ * query parameters are composable, in that each parameter works independently
944
+ * _and_ in conjunction with each other, and there is no limit to the number of
945
+ * pivots, filters, etc. which can be applied.
946
+ */
947
+ export class View {
948
+ private constructor();
949
+ free(): void;
950
+ __get_model(): View;
951
+ /**
952
+ * Returns an array of strings containing the column paths of the [`View`]
953
+ * without any of the source columns.
954
+ *
955
+ * A column path shows the columns that a given cell belongs to after
956
+ * pivots are applied.
957
+ */
958
+ column_paths(window?: ColumnWindow | null): Promise<any>;
959
+ /**
960
+ * Delete this [`View`] and clean up all resources associated with it.
961
+ * [`View`] objects do not stop consuming resources or processing
962
+ * updates when they are garbage collected - you must call this method
963
+ * to reclaim these.
964
+ */
965
+ delete(): Promise<void>;
966
+ /**
967
+ * Returns this [`View`]'s _dimensions_, row and column count, as well as
968
+ * those of the [`crate::Table`] from which it was derived.
969
+ *
970
+ * - `num_table_rows` - The number of rows in the underlying
971
+ * [`crate::Table`].
972
+ * - `num_table_columns` - The number of columns in the underlying
973
+ * [`crate::Table`] (including the `index` column if this
974
+ * [`crate::Table`] was constructed with one).
975
+ * - `num_view_rows` - The number of rows in this [`View`]. If this
976
+ * [`View`] has a `group_by` clause, `num_view_rows` will also include
977
+ * aggregated rows.
978
+ * - `num_view_columns` - The number of columns in this [`View`]. If this
979
+ * [`View`] has a `split_by` clause, `num_view_columns` will include all
980
+ * _column paths_, e.g. the number of `columns` clause times the number
981
+ * of `split_by` groups.
982
+ */
983
+ dimensions(): Promise<any>;
984
+ /**
985
+ * The expression schema of this [`View`], which contains only the
986
+ * expressions created on this [`View`]. See [`View::schema`] for
987
+ * details.
988
+ */
989
+ expression_schema(): Promise<any>;
990
+ /**
991
+ * A copy of the config object passed to the [`Table::view`] method which
992
+ * created this [`View`].
993
+ */
994
+ get_config(): Promise<any>;
995
+ /**
996
+ * Calculates the [min, max] of the leaf nodes of a column `column_name`.
997
+ *
998
+ * # Returns
999
+ *
1000
+ * A tuple of [min, max], whose types are column and aggregate dependent.
1001
+ */
1002
+ get_min_max(name: string): Promise<Array<any>>;
1003
+ /**
1004
+ * The number of aggregated rows in this [`View`]. This is affected by the
1005
+ * "group_by" configuration parameter supplied to this view's contructor.
1006
+ *
1007
+ * # Returns
1008
+ *
1009
+ * The number of aggregated rows.
1010
+ */
1011
+ num_rows(): Promise<number>;
1012
+ /**
1013
+ * The schema of this [`View`].
1014
+ *
1015
+ * The [`View`] schema differs from the `schema` returned by
1016
+ * [`Table::schema`]; it may have different column names due to
1017
+ * `expressions` or `columns` configs, or it maye have _different
1018
+ * column types_ due to the application og `group_by` and `aggregates`
1019
+ * config. You can think of [`Table::schema`] as the _input_ schema and
1020
+ * [`View::schema`] as the _output_ schema of a Perspective pipeline.
1021
+ */
1022
+ schema(): Promise<any>;
1023
+ /**
1024
+ * Serializes a [`View`] to the Apache Arrow data format.
1025
+ */
1026
+ to_arrow(window?: ViewWindow | null): Promise<ArrayBuffer>;
1027
+ /**
1028
+ * Serializes this [`View`] to a string of JSON data. Useful if you want to
1029
+ * save additional round trip serialize/deserialize cycles.
1030
+ */
1031
+ to_columns_string(window?: ViewWindow | null): Promise<string>;
1032
+ /**
1033
+ * Serializes this [`View`] to JavaScript objects in a column-oriented
1034
+ * format.
1035
+ */
1036
+ to_columns(window?: ViewWindow | null): Promise<object>;
1037
+ /**
1038
+ * Render this `View` as a JSON string.
1039
+ */
1040
+ to_json_string(window?: ViewWindow | null): Promise<string>;
1041
+ /**
1042
+ * Serializes this [`View`] to JavaScript objects in a row-oriented
1043
+ * format.
1044
+ */
1045
+ to_json(window?: ViewWindow | null): Promise<Array<any>>;
1046
+ /**
1047
+ * Renders this [`View`] as an [NDJSON](https://github.com/ndjson/ndjson-spec)
1048
+ * formatted [`String`].
1049
+ */
1050
+ to_ndjson(window?: ViewWindow | null): Promise<string>;
1051
+ /**
1052
+ * Serializes this [`View`] to CSV data in a standard format.
1053
+ */
1054
+ to_csv(window?: ViewWindow | null): Promise<string>;
1055
+ /**
1056
+ * Register a callback with this [`View`]. Whenever the view's underlying
1057
+ * table emits an update, this callback will be invoked with an object
1058
+ * containing `port_id`, indicating which port the update fired on, and
1059
+ * optionally `delta`, which is the new data that was updated for each
1060
+ * cell or each row.
1061
+ *
1062
+ * # Arguments
1063
+ *
1064
+ * - `on_update` - A callback function invoked on update, which receives an
1065
+ * object with two keys: `port_id`, indicating which port the update was
1066
+ * triggered on, and `delta`, whose value is dependent on the mode
1067
+ * parameter.
1068
+ * - `options` - If this is provided as `OnUpdateOptions { mode:
1069
+ * Some(OnUpdateMode::Row) }`, then `delta` is an Arrow of the updated
1070
+ * rows. Otherwise `delta` will be [`Option::None`].
1071
+ *
1072
+ * # JavaScript Examples
1073
+ *
1074
+ * ```javascript
1075
+ * // Attach an `on_update` callback
1076
+ * view.on_update((updated) => console.log(updated.port_id));
1077
+ * ```
1078
+ *
1079
+ * ```javascript
1080
+ * // `on_update` with row deltas
1081
+ * view.on_update((updated) => console.log(updated.delta), { mode: "row" });
1082
+ * ```
1083
+ */
1084
+ on_update(on_update_js: Function, options?: OnUpdateOptions | null): Promise<any>;
1085
+ /**
1086
+ * Unregister a previously registered update callback with this [`View`].
1087
+ *
1088
+ * # Arguments
1089
+ *
1090
+ * - `id` - A callback `id` as returned by a recipricol call to
1091
+ * [`View::on_update`].
1092
+ */
1093
+ remove_update(callback_id: number): Promise<void>;
1094
+ /**
1095
+ * Register a callback with this [`View`]. Whenever the [`View`] is
1096
+ * deleted, this callback will be invoked.
1097
+ */
1098
+ on_delete(on_delete: Function): Promise<any>;
1099
+ /**
1100
+ * The number of aggregated columns in this [`View`]. This is affected by
1101
+ * the "split_by" configuration parameter supplied to this view's
1102
+ * contructor.
1103
+ *
1104
+ * # Returns
1105
+ *
1106
+ * The number of aggregated columns.
1107
+ */
1108
+ num_columns(): Promise<number>;
1109
+ /**
1110
+ * Unregister a previously registered [`View::on_delete`] callback.
1111
+ */
1112
+ remove_delete(callback_id: number): Promise<any>;
1113
+ /**
1114
+ * Collapses the `group_by` row at `row_index`.
1115
+ */
1116
+ collapse(row_index: number): Promise<number>;
1117
+ /**
1118
+ * Expand the `group_by` row at `row_index`.
1119
+ */
1120
+ expand(row_index: number): Promise<number>;
1121
+ /**
1122
+ * Set expansion `depth` of the `group_by` tree.
1123
+ */
1124
+ set_depth(depth: number): Promise<void>;
1125
+ }
1126
+
1127
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
1128
+
1129
+ export interface InitOutput {
1130
+ readonly memory: WebAssembly.Memory;
1131
+ readonly __wbg_columndropdownelement_free: (a: number, b: number) => void;
1132
+ readonly __wbg_copydropdownmenuelement_free: (a: number, b: number) => void;
1133
+ readonly copydropdownmenuelement_new: (a: number) => number;
1134
+ readonly copydropdownmenuelement_open: (a: number, b: number) => void;
1135
+ readonly copydropdownmenuelement_hide: (a: number, b: number) => void;
1136
+ readonly copydropdownmenuelement_set_model: (a: number, b: number) => void;
1137
+ readonly copydropdownmenuelement_connected_callback: (a: number) => void;
1138
+ readonly __wbg_perspectivedebugpluginelement_free: (a: number, b: number) => void;
1139
+ readonly perspectivedebugpluginelement_new: (a: number) => number;
1140
+ readonly perspectivedebugpluginelement_name: (a: number, b: number) => void;
1141
+ readonly perspectivedebugpluginelement_select_mode: (a: number, b: number) => void;
1142
+ readonly perspectivedebugpluginelement_config_column_names: (a: number) => number;
1143
+ readonly perspectivedebugpluginelement_draw: (a: number, b: number) => number;
1144
+ readonly perspectivedebugpluginelement_clear: (a: number) => number;
1145
+ readonly perspectivedebugpluginelement_connectedCallback: (a: number) => void;
1146
+ readonly exportdropdownmenuelement_open: (a: number, b: number) => void;
1147
+ readonly exportdropdownmenuelement_hide: (a: number, b: number) => void;
1148
+ readonly exportdropdownmenuelement_set_model: (a: number, b: number) => void;
1149
+ readonly __wbg_filterdropdownelement_free: (a: number, b: number) => void;
1150
+ readonly __wbg_functiondropdownelement_free: (a: number, b: number) => void;
1151
+ readonly __wbg_perspectiveviewerelement_free: (a: number, b: number) => void;
1152
+ readonly perspectiveviewerelement_new: (a: number) => number;
1153
+ readonly perspectiveviewerelement_connectedCallback: (a: number) => void;
1154
+ readonly perspectiveviewerelement_load: (a: number, b: number) => number;
1155
+ readonly perspectiveviewerelement_delete: (a: number) => number;
1156
+ readonly perspectiveviewerelement_eject: (a: number) => number;
1157
+ readonly perspectiveviewerelement_getView: (a: number) => number;
1158
+ readonly perspectiveviewerelement_getTable: (a: number, b: number) => number;
1159
+ readonly perspectiveviewerelement_getRenderStats: (a: number, b: number) => void;
1160
+ readonly perspectiveviewerelement_flush: (a: number) => number;
1161
+ readonly perspectiveviewerelement_restore: (a: number, b: number) => number;
1162
+ readonly perspectiveviewerelement_resetError: (a: number) => number;
1163
+ readonly perspectiveviewerelement_save: (a: number, b: number, c: number) => number;
1164
+ readonly perspectiveviewerelement_download: (a: number, b: number) => number;
1165
+ readonly perspectiveviewerelement_copy: (a: number, b: number) => number;
1166
+ readonly perspectiveviewerelement_reset: (a: number, b: number) => number;
1167
+ readonly perspectiveviewerelement_resize: (a: number, b: number) => number;
1168
+ readonly perspectiveviewerelement_setAutoSize: (a: number, b: number) => void;
1169
+ readonly perspectiveviewerelement_setAutoPause: (a: number, b: number) => void;
1170
+ readonly perspectiveviewerelement_getSelection: (a: number) => number;
1171
+ readonly perspectiveviewerelement_setSelection: (a: number, b: number, c: number) => void;
1172
+ readonly perspectiveviewerelement_getEditPort: (a: number, b: number) => void;
1173
+ readonly perspectiveviewerelement_restyleElement: (a: number) => number;
1174
+ readonly perspectiveviewerelement_resetThemes: (a: number, b: number, c: number) => number;
1175
+ readonly perspectiveviewerelement_setThrottle: (a: number, b: number, c: number) => void;
1176
+ readonly perspectiveviewerelement_toggleConfig: (a: number, b: number) => number;
1177
+ readonly perspectiveviewerelement_getAllPlugins: (a: number) => number;
1178
+ readonly perspectiveviewerelement_getPlugin: (a: number, b: number, c: number, d: number) => void;
1179
+ readonly perspectiveviewerelement_get_model: (a: number) => number;
1180
+ readonly perspectiveviewerelement_toggleColumnSettings: (a: number, b: number, c: number) => number;
1181
+ readonly perspectiveviewerelement_openColumnSettings: (a: number, b: number, c: number, d: number) => number;
1182
+ readonly registerPlugin: (a: number, b: number) => void;
1183
+ readonly init: () => void;
1184
+ readonly perspectivedebugpluginelement_min_config_columns: (a: number) => number;
1185
+ readonly perspectivedebugpluginelement_update: (a: number, b: number) => number;
1186
+ readonly perspectivedebugpluginelement_resize: (a: number) => number;
1187
+ readonly perspectivedebugpluginelement_restyle: (a: number) => number;
1188
+ readonly perspectivedebugpluginelement_save: (a: number) => number;
1189
+ readonly perspectivedebugpluginelement_restore: (a: number) => number;
1190
+ readonly perspectivedebugpluginelement_delete: (a: number) => number;
1191
+ readonly exportdropdownmenuelement_new: (a: number) => number;
1192
+ readonly __wbg_exportdropdownmenuelement_free: (a: number, b: number) => void;
1193
+ readonly exportdropdownmenuelement_connected_callback: (a: number) => void;
1194
+ readonly __wbg_proxysession_free: (a: number, b: number) => void;
1195
+ readonly proxysession_handle_request: (a: number, b: number) => number;
1196
+ readonly proxysession_close: (a: number) => number;
1197
+ readonly __wbg_client_free: (a: number, b: number) => void;
1198
+ readonly client___getClassname: (a: number, b: number) => void;
1199
+ readonly client_new: (a: number, b: number, c: number) => void;
1200
+ readonly client_new_proxy_session: (a: number, b: number) => number;
1201
+ readonly client_handle_response: (a: number, b: number) => number;
1202
+ readonly client_handle_error: (a: number, b: number, c: number, d: number) => number;
1203
+ readonly client_on_error: (a: number, b: number) => number;
1204
+ readonly client_table: (a: number, b: number, c: number) => number;
1205
+ readonly client_terminate: (a: number, b: number) => void;
1206
+ readonly client_open_table: (a: number, b: number, c: number) => number;
1207
+ readonly client_get_hosted_table_names: (a: number) => number;
1208
+ readonly client_on_hosted_tables_update: (a: number, b: number) => number;
1209
+ readonly client_remove_hosted_tables_update: (a: number, b: number) => number;
1210
+ readonly client_system_info: (a: number) => number;
1211
+ readonly table___getClassname: (a: number, b: number) => void;
1212
+ readonly __wbg_table_free: (a: number, b: number) => void;
1213
+ readonly table_get_index: (a: number) => number;
1214
+ readonly table_get_client: (a: number) => number;
1215
+ readonly table_get_name: (a: number) => number;
1216
+ readonly table_get_limit: (a: number) => number;
1217
+ readonly table_clear: (a: number) => number;
1218
+ readonly table_delete: (a: number, b: number) => number;
1219
+ readonly table_size: (a: number) => number;
1220
+ readonly table_schema: (a: number) => number;
1221
+ readonly table_columns: (a: number) => number;
1222
+ readonly table_make_port: (a: number) => number;
1223
+ readonly table_on_delete: (a: number, b: number) => number;
1224
+ readonly table_remove_delete: (a: number, b: number) => number;
1225
+ readonly table_remove: (a: number, b: number, c: number) => number;
1226
+ readonly table_replace: (a: number, b: number, c: number) => number;
1227
+ readonly table_update: (a: number, b: number, c: number) => number;
1228
+ readonly table_view: (a: number, b: number) => number;
1229
+ readonly table_validate_expressions: (a: number, b: number) => number;
1230
+ readonly __wbg_view_free: (a: number, b: number) => void;
1231
+ readonly view___get_model: (a: number) => number;
1232
+ readonly view_column_paths: (a: number, b: number) => number;
1233
+ readonly view_delete: (a: number) => number;
1234
+ readonly view_dimensions: (a: number) => number;
1235
+ readonly view_expression_schema: (a: number) => number;
1236
+ readonly view_get_config: (a: number) => number;
1237
+ readonly view_get_min_max: (a: number, b: number, c: number) => number;
1238
+ readonly view_num_rows: (a: number) => number;
1239
+ readonly view_schema: (a: number) => number;
1240
+ readonly view_to_arrow: (a: number, b: number) => number;
1241
+ readonly view_to_columns_string: (a: number, b: number) => number;
1242
+ readonly view_to_columns: (a: number, b: number) => number;
1243
+ readonly view_to_json_string: (a: number, b: number) => number;
1244
+ readonly view_to_json: (a: number, b: number) => number;
1245
+ readonly view_to_ndjson: (a: number, b: number) => number;
1246
+ readonly view_to_csv: (a: number, b: number) => number;
1247
+ readonly view_on_update: (a: number, b: number, c: number) => number;
1248
+ readonly view_remove_update: (a: number, b: number) => number;
1249
+ readonly view_on_delete: (a: number, b: number) => number;
1250
+ readonly view_num_columns: (a: number) => number;
1251
+ readonly view_remove_delete: (a: number, b: number) => number;
1252
+ readonly view_collapse: (a: number, b: number) => number;
1253
+ readonly view_expand: (a: number, b: number) => number;
1254
+ readonly view_set_depth: (a: number, b: number) => number;
1255
+ readonly proxysession_new: (a: number, b: number) => number;
1256
+ readonly __wbindgen_export_0: (a: number, b: number) => number;
1257
+ readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
1258
+ readonly __wbindgen_export_2: (a: number) => void;
1259
+ readonly __wbindgen_export_3: (a: number, b: number, c: number) => void;
1260
+ readonly __wbindgen_export_4: WebAssembly.Table;
1261
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1262
+ readonly __wbindgen_export_5: (a: number, b: number, c: number) => void;
1263
+ readonly __wbindgen_export_6: (a: number, b: number, c: number) => void;
1264
+ readonly __wbindgen_export_7: (a: number, b: number, c: number) => void;
1265
+ readonly __wbindgen_export_8: (a: number, b: number) => number;
1266
+ readonly __wbindgen_export_9: (a: number, b: number, c: number) => void;
1267
+ readonly __wbindgen_export_10: (a: number, b: number) => void;
1268
+ readonly __wbindgen_export_11: (a: number, b: number, c: number) => void;
1269
+ readonly __wbindgen_export_12: (a: number, b: number, c: number, d: number) => void;
1270
+ }
1271
+
1272
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
1273
+ /**
1274
+ * Instantiates the given `module`, which can either be bytes or
1275
+ * a precompiled `WebAssembly.Module`.
1276
+ *
1277
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1278
+ *
1279
+ * @returns {InitOutput}
1280
+ */
1281
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
1282
+
1283
+ /**
1284
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1285
+ * for everything else, calls `WebAssembly.instantiate` directly.
1286
+ *
1287
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1288
+ *
1289
+ * @returns {Promise<InitOutput>}
1290
+ */
1291
+ export default function __wbg_init (module_or_path: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;