@akohn/dashql-react 0.0.0-stage → 0.0.20-dev.661.gda3ac9a7e

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 (342) hide show
  1. package/LICENSE +373 -0
  2. package/NOTICE +66 -0
  3. package/README.md +46 -2
  4. package/dist/_virtual/_vite/preload-helper.js +100 -0
  5. package/dist/brand/brand.d.ts +13 -0
  6. package/dist/brand/brand.js +14 -0
  7. package/dist/brand/landing_backdrop.d.ts +56 -0
  8. package/dist/brand/landing_backdrop.js +1019 -0
  9. package/dist/brand/wobble_morph.d.ts +54 -0
  10. package/dist/brand/wobble_morph.js +439 -0
  11. package/dist/components/action_list.d.ts +31 -0
  12. package/dist/components/action_list.js +63 -0
  13. package/dist/components/action_list.module.js +11 -0
  14. package/dist/components/anchored_overlay.d.ts +28 -0
  15. package/dist/components/anchored_overlay.js +93 -0
  16. package/dist/components/button.d.ts +42 -0
  17. package/dist/components/button.js +97 -0
  18. package/dist/components/button.module.js +20 -0
  19. package/dist/components/button_group.d.ts +7 -0
  20. package/dist/components/button_group.js +18 -0
  21. package/dist/components/button_group.module.js +3 -0
  22. package/dist/components/card_placeholder.d.ts +9 -0
  23. package/dist/components/card_placeholder.js +39 -0
  24. package/dist/components/card_placeholder.module.js +6 -0
  25. package/dist/components/clipboard.d.ts +19 -0
  26. package/dist/components/clipboard.js +54 -0
  27. package/dist/components/data_table/computation_tables.d.ts +12 -0
  28. package/dist/components/data_table/computation_tables.js +42 -0
  29. package/dist/components/data_table/data_table.d.ts +38 -0
  30. package/dist/components/data_table/data_table.js +378 -0
  31. package/dist/components/data_table/data_table.module.js +41 -0
  32. package/dist/components/data_table/data_table_cell.d.ts +7 -0
  33. package/dist/components/data_table/data_table_cell.js +9 -0
  34. package/dist/components/data_table/data_table_cell_data.d.ts +21 -0
  35. package/dist/components/data_table/data_table_cell_data.js +99 -0
  36. package/dist/components/data_table/data_table_cell_header_name.d.ts +17 -0
  37. package/dist/components/data_table/data_table_cell_header_name.js +73 -0
  38. package/dist/components/data_table/data_table_cell_header_plots.d.ts +31 -0
  39. package/dist/components/data_table/data_table_cell_header_plots.js +122 -0
  40. package/dist/components/data_table/data_table_colors.d.ts +19 -0
  41. package/dist/components/data_table/data_table_colors.js +27 -0
  42. package/dist/components/data_table/data_table_column_resize.d.ts +21 -0
  43. package/dist/components/data_table/data_table_column_resize.js +121 -0
  44. package/dist/components/data_table/data_table_focus.d.ts +15 -0
  45. package/dist/components/data_table/data_table_focus.js +53 -0
  46. package/dist/components/data_table/data_table_layout.d.ts +18 -0
  47. package/dist/components/data_table/data_table_layout.js +103 -0
  48. package/dist/components/data_table/data_table_ordering.d.ts +9 -0
  49. package/dist/components/data_table/data_table_ordering.js +39 -0
  50. package/dist/components/data_table/data_table_portals.d.ts +9 -0
  51. package/dist/components/data_table/data_table_portals.js +29 -0
  52. package/dist/components/data_table/data_table_sticky_views.d.ts +34 -0
  53. package/dist/components/data_table/data_table_sticky_views.js +161 -0
  54. package/dist/components/data_table/data_table_window.d.ts +18 -0
  55. package/dist/components/data_table/data_table_window.js +118 -0
  56. package/dist/components/data_table/format_peek.d.ts +2 -0
  57. package/dist/components/data_table/format_peek.js +17 -0
  58. package/dist/components/data_table/histogram_bars.d.ts +36 -0
  59. package/dist/components/data_table/histogram_bars.js +100 -0
  60. package/dist/components/data_table/histogram_brush.d.ts +23 -0
  61. package/dist/components/data_table/histogram_brush.js +107 -0
  62. package/dist/components/data_table/histogram_cell.d.ts +19 -0
  63. package/dist/components/data_table/histogram_cell.js +325 -0
  64. package/dist/components/data_table/histogram_cell.module.js +9 -0
  65. package/dist/components/data_table/histogram_label.d.ts +1 -0
  66. package/dist/components/data_table/histogram_label.js +7 -0
  67. package/dist/components/data_table/memo_props.d.ts +1 -0
  68. package/dist/components/data_table/memo_props.js +17 -0
  69. package/dist/components/data_table/mostfrequent_cell.d.ts +17 -0
  70. package/dist/components/data_table/mostfrequent_cell.js +316 -0
  71. package/dist/components/data_table/mostfrequent_cell.module.js +10 -0
  72. package/dist/components/data_table/use_cross_filters.d.ts +14 -0
  73. package/dist/components/data_table/use_cross_filters.js +47 -0
  74. package/dist/components/deferred.d.ts +11 -0
  75. package/dist/components/deferred.js +41 -0
  76. package/dist/components/deferred.module.js +5 -0
  77. package/dist/components/error_boundary.d.ts +18 -0
  78. package/dist/components/error_boundary.js +15 -0
  79. package/dist/components/graph.module.js +15 -0
  80. package/dist/components/graph_port.d.ts +10 -0
  81. package/dist/components/graph_port.js +34 -0
  82. package/dist/components/inspector_overlay.d.ts +32 -0
  83. package/dist/components/inspector_overlay.js +72 -0
  84. package/dist/components/inspector_overlay.module.js +18 -0
  85. package/dist/components/json/json_arrow_symbol.d.ts +4 -0
  86. package/dist/components/json/json_arrow_symbol.js +25 -0
  87. package/dist/components/json/json_copy_button.d.ts +11 -0
  88. package/dist/components/json/json_copy_button.js +61 -0
  89. package/dist/components/json/json_ellipsis_symbol.d.ts +7 -0
  90. package/dist/components/json/json_ellipsis_symbol.js +11 -0
  91. package/dist/components/json/json_item_count.d.ts +5 -0
  92. package/dist/components/json/json_item_count.js +12 -0
  93. package/dist/components/json/json_key_name.d.ts +6 -0
  94. package/dist/components/json/json_key_name.js +40 -0
  95. package/dist/components/json/json_key_values.d.ts +12 -0
  96. package/dist/components/json/json_key_values.js +99 -0
  97. package/dist/components/json/json_literal.d.ts +8 -0
  98. package/dist/components/json/json_literal.js +140 -0
  99. package/dist/components/json/json_nested_close.d.ts +11 -0
  100. package/dist/components/json/json_nested_close.js +31 -0
  101. package/dist/components/json/json_nested_open.d.ts +18 -0
  102. package/dist/components/json/json_nested_open.js +150 -0
  103. package/dist/components/json/json_nested_state.d.ts +14 -0
  104. package/dist/components/json/json_nested_state.js +28 -0
  105. package/dist/components/json/json_tool_state.d.ts +18 -0
  106. package/dist/components/json/json_tool_state.js +46 -0
  107. package/dist/components/json/json_value.d.ts +10 -0
  108. package/dist/components/json/json_value.js +46 -0
  109. package/dist/components/json/json_view.d.ts +14 -0
  110. package/dist/components/json/json_view.js +37 -0
  111. package/dist/components/json/json_view.module.js +41 -0
  112. package/dist/components/json/json_view_state.d.ts +14 -0
  113. package/dist/components/json/json_view_state.js +32 -0
  114. package/dist/components/json/unique_key.d.ts +1 -0
  115. package/dist/components/json/unique_key.js +8 -0
  116. package/dist/components/keyvalue_list.d.ts +25 -0
  117. package/dist/components/keyvalue_list.js +106 -0
  118. package/dist/components/keyvalue_list.module.js +15 -0
  119. package/dist/components/name_input.d.ts +11 -0
  120. package/dist/components/name_input.js +51 -0
  121. package/dist/components/overlay.d.ts +53 -0
  122. package/dist/components/overlay.js +183 -0
  123. package/dist/components/overlay.module.js +32 -0
  124. package/dist/components/panel_resize_handle.d.ts +12 -0
  125. package/dist/components/panel_resize_handle.js +39 -0
  126. package/dist/components/portal.d.ts +8 -0
  127. package/dist/components/portal.js +53 -0
  128. package/dist/components/progress_bar.d.ts +7 -0
  129. package/dist/components/progress_bar.js +21 -0
  130. package/dist/components/progress_bar.module.js +3 -0
  131. package/dist/components/query_history_viewer.d.ts +33 -0
  132. package/dist/components/query_history_viewer.js +268 -0
  133. package/dist/components/query_history_viewer.module.js +7 -0
  134. package/dist/components/query_profile/engine_profile_view.d.ts +19 -0
  135. package/dist/components/query_profile/engine_profile_view.js +94 -0
  136. package/dist/components/query_profile/numeric_limits.d.ts +1 -0
  137. package/dist/components/query_profile/numeric_limits.js +2 -0
  138. package/dist/components/query_profile/profile_execution_controller.d.ts +14 -0
  139. package/dist/components/query_profile/profile_execution_controller.js +56 -0
  140. package/dist/components/query_profile/profile_fit.d.ts +24 -0
  141. package/dist/components/query_profile/profile_fit.js +22 -0
  142. package/dist/components/query_profile/profile_navigation.d.ts +3 -0
  143. package/dist/components/query_profile/profile_navigation.js +34 -0
  144. package/dist/components/query_profile/profile_scene.d.ts +64 -0
  145. package/dist/components/query_profile/profile_scene.js +422 -0
  146. package/dist/components/query_profile/query_profile_view.d.ts +44 -0
  147. package/dist/components/query_profile/query_profile_view.js +961 -0
  148. package/dist/components/query_profile/query_profile_view.module.js +23 -0
  149. package/dist/components/query_progress/query_profile_overlay.d.ts +7 -0
  150. package/dist/components/query_progress/query_profile_overlay.js +67 -0
  151. package/dist/components/query_progress/query_profile_overlay.module.js +6 -0
  152. package/dist/components/query_progress/query_progress_panel.d.ts +14 -0
  153. package/dist/components/query_progress/query_progress_panel.js +255 -0
  154. package/dist/components/query_progress/query_progress_panel.module.js +10 -0
  155. package/dist/components/query_result/cell_detail_overlay.d.ts +34 -0
  156. package/dist/components/query_result/cell_detail_overlay.js +277 -0
  157. package/dist/components/query_result/cell_detail_overlay.module.js +21 -0
  158. package/dist/components/query_result/query_result_action_menu.d.ts +12 -0
  159. package/dist/components/query_result/query_result_action_menu.js +62 -0
  160. package/dist/components/query_result/query_result_action_menu.module.js +2 -0
  161. package/dist/components/query_result/query_result_details.d.ts +17 -0
  162. package/dist/components/query_result/query_result_details.js +46 -0
  163. package/dist/components/query_result/query_result_details.module.js +5 -0
  164. package/dist/components/query_result/query_result_download_button.d.ts +8 -0
  165. package/dist/components/query_result/query_result_download_button.js +38 -0
  166. package/dist/components/query_result/query_result_header.d.ts +21 -0
  167. package/dist/components/query_result/query_result_header.js +71 -0
  168. package/dist/components/query_result/query_result_header.module.js +3 -0
  169. package/dist/components/query_result/query_result_search_controls.d.ts +12 -0
  170. package/dist/components/query_result/query_result_search_controls.js +141 -0
  171. package/dist/components/query_result/query_result_search_controls.module.js +7 -0
  172. package/dist/components/query_result/query_result_toolbar.d.ts +21 -0
  173. package/dist/components/query_result/query_result_toolbar.js +74 -0
  174. package/dist/components/query_result/result_table_overlay.d.ts +9 -0
  175. package/dist/components/query_result/result_table_overlay.js +73 -0
  176. package/dist/components/query_result/result_table_overlay.module.js +6 -0
  177. package/dist/components/query_result/use_query_result_search.d.ts +8 -0
  178. package/dist/components/query_result/use_query_result_search.js +28 -0
  179. package/dist/components/segmented_control.d.ts +58 -0
  180. package/dist/components/segmented_control.js +116 -0
  181. package/dist/components/segmented_control.module.js +17 -0
  182. package/dist/components/separator.d.ts +21 -0
  183. package/dist/components/separator.js +79 -0
  184. package/dist/components/separator.module.js +7 -0
  185. package/dist/components/size_observer.d.ts +7 -0
  186. package/dist/components/size_observer.js +57 -0
  187. package/dist/components/skeleton.d.ts +2 -0
  188. package/dist/components/skeleton.js +14 -0
  189. package/dist/components/skeleton.module.js +2 -0
  190. package/dist/components/spinners.d.ts +8 -0
  191. package/dist/components/spinners.js +33 -0
  192. package/dist/components/spinners.module.js +8 -0
  193. package/dist/components/status_indicator.d.ts +36 -0
  194. package/dist/components/status_indicator.js +182 -0
  195. package/dist/components/status_indicator.module.js +3 -0
  196. package/dist/components/symbol_icon.d.ts +65 -0
  197. package/dist/components/symbol_icon.js +213 -0
  198. package/dist/components/tab_header.d.ts +11 -0
  199. package/dist/components/tab_header.js +55 -0
  200. package/dist/components/tab_header.module.js +7 -0
  201. package/dist/components/tag.d.ts +10 -0
  202. package/dist/components/tag.js +17 -0
  203. package/dist/components/tag.module.js +4 -0
  204. package/dist/components/text_field.d.ts +44 -0
  205. package/dist/components/text_field.js +159 -0
  206. package/dist/components/text_field.module.js +15 -0
  207. package/dist/components/text_input.d.ts +25 -0
  208. package/dist/components/text_input.js +90 -0
  209. package/dist/components/text_input.module.js +13 -0
  210. package/dist/components/text_input_action.d.ts +19 -0
  211. package/dist/components/text_input_action.js +33 -0
  212. package/dist/components/text_input_action.module.js +2 -0
  213. package/dist/components/toggle_switch.d.ts +7 -0
  214. package/dist/components/toggle_switch.js +22 -0
  215. package/dist/components/toggle_switch.module.js +6 -0
  216. package/dist/components/tooltip.d.ts +22 -0
  217. package/dist/components/tooltip.js +139 -0
  218. package/dist/components/tooltip.module.js +2 -0
  219. package/dist/components/tree_entry.d.ts +17 -0
  220. package/dist/components/tree_entry.js +48 -0
  221. package/dist/components/tree_entry.module.js +9 -0
  222. package/dist/components/value_list.d.ts +17 -0
  223. package/dist/components/value_list.js +70 -0
  224. package/dist/components/value_list.module.js +8 -0
  225. package/dist/components/vegalite_chart.d.ts +18 -0
  226. package/dist/components/vegalite_chart.js +151 -0
  227. package/dist/components/vegalite_chart.module.js +3 -0
  228. package/dist/components/vegalite_view.d.ts +27 -0
  229. package/dist/components/vegalite_view.js +248 -0
  230. package/dist/components/vegalite_view.module.js +5 -0
  231. package/dist/components/vertical_scroll_shadows.d.ts +14 -0
  232. package/dist/components/vertical_scroll_shadows.js +55 -0
  233. package/dist/components/vertical_scroll_shadows.module.js +5 -0
  234. package/dist/components/vertical_split.d.ts +15 -0
  235. package/dist/components/vertical_split.js +112 -0
  236. package/dist/components/vertical_split.module.js +5 -0
  237. package/dist/components/vertical_tabs.d.ts +36 -0
  238. package/dist/components/vertical_tabs.js +169 -0
  239. package/dist/components/vertical_tabs.module.js +23 -0
  240. package/dist/components/visualization/capped_rows.d.ts +9 -0
  241. package/dist/components/visualization/capped_rows.js +23 -0
  242. package/dist/components/visualization/capped_rows.module.js +3 -0
  243. package/dist/components/visualization/chart_download_button.d.ts +12 -0
  244. package/dist/components/visualization/chart_download_button.js +41 -0
  245. package/dist/components/visualization/kpi_view.d.ts +10 -0
  246. package/dist/components/visualization/kpi_view.js +215 -0
  247. package/dist/components/visualization/kpi_view.module.js +17 -0
  248. package/dist/components/visualization/markdown_view.d.ts +17 -0
  249. package/dist/components/visualization/markdown_view.js +154 -0
  250. package/dist/components/visualization/markdown_view.module.js +4 -0
  251. package/dist/components/visualization/result_rows.d.ts +17 -0
  252. package/dist/components/visualization/result_rows.js +82 -0
  253. package/dist/components/visualization/vegalite_preview.d.ts +8 -0
  254. package/dist/components/visualization/vegalite_preview.js +17 -0
  255. package/dist/components/visualization/vegalite_preview.module.js +2 -0
  256. package/dist/components/visualization/visualization_dispatch.d.ts +14 -0
  257. package/dist/components/visualization/visualization_dispatch.js +41 -0
  258. package/dist/components/visualization/visualization_panel.d.ts +10 -0
  259. package/dist/components/visualization/visualization_panel.js +37 -0
  260. package/dist/components/visualization/visualization_panel.module.js +3 -0
  261. package/dist/dom/anchored_position.d.ts +42 -0
  262. package/dist/dom/anchored_position.js +255 -0
  263. package/dist/dom/app_host.d.ts +6 -0
  264. package/dist/dom/app_host.js +13 -0
  265. package/dist/dom/calm_frames.d.ts +24 -0
  266. package/dist/dom/calm_frames.js +96 -0
  267. package/dist/dom/classnames.d.ts +8 -0
  268. package/dist/dom/classnames.js +20 -0
  269. package/dist/dom/download_file.d.ts +1 -0
  270. package/dist/dom/download_file.js +12 -0
  271. package/dist/dom/focus.d.ts +29 -0
  272. package/dist/dom/focus.js +84 -0
  273. package/dist/dom/graph_edges.d.ts +53 -0
  274. package/dist/dom/graph_edges.js +450 -0
  275. package/dist/dom/key_events.d.ts +9 -0
  276. package/dist/dom/key_events.js +33 -0
  277. package/dist/dom/media_query.d.ts +2 -0
  278. package/dist/dom/media_query.js +15 -0
  279. package/dist/dom/outside_click.d.ts +8 -0
  280. package/dist/dom/outside_click.js +32 -0
  281. package/dist/dom/rerender_ref.d.ts +2 -0
  282. package/dist/dom/rerender_ref.js +11 -0
  283. package/dist/dom/row_context_menu.d.ts +7 -0
  284. package/dist/dom/row_context_menu.js +32 -0
  285. package/dist/dom/scrollbar.d.ts +3 -0
  286. package/dist/dom/scrollbar.js +23 -0
  287. package/dist/format/format.d.ts +11 -0
  288. package/dist/format/format.js +72 -0
  289. package/dist/format/query_progress_format.d.ts +17 -0
  290. package/dist/format/query_progress_format.js +69 -0
  291. package/dist/format/time_format.d.ts +5 -0
  292. package/dist/format/time_format.js +45 -0
  293. package/dist/hooks.d.ts +71 -0
  294. package/dist/hooks.js +302 -0
  295. package/dist/host.d.ts +10 -0
  296. package/dist/host.js +12 -0
  297. package/dist/logger.d.ts +4 -0
  298. package/dist/logger.js +6 -0
  299. package/dist/models/computation_model.d.ts +14 -0
  300. package/dist/models/computation_model.js +27 -0
  301. package/dist/models/query_model.d.ts +12 -0
  302. package/dist/models/query_model.js +27 -0
  303. package/dist/models/script_model.d.ts +17 -0
  304. package/dist/models/script_model.js +69 -0
  305. package/dist/style.css +4226 -0
  306. package/dist/svg_symbols.d.ts +2 -0
  307. package/dist/svg_symbols.js +2 -0
  308. package/dist/symbols.svg +1197 -0
  309. package/dist/theme/color_scheme.d.ts +4 -0
  310. package/dist/theme/color_scheme.js +28 -0
  311. package/dist/theme/xcode_palette.d.ts +22 -0
  312. package/dist/theme/xcode_palette.js +4 -0
  313. package/dist/theme/xcode_palettes.js +41 -0
  314. package/dist/utils/plan_engine.d.ts +2 -0
  315. package/dist/utils/plan_engine.js +13 -0
  316. package/dist/vegalite/vegalite_check.d.ts +1 -0
  317. package/dist/vegalite/vegalite_check.js +7 -0
  318. package/dist/vegalite/vegalite_crossfilter.d.ts +54 -0
  319. package/dist/vegalite/vegalite_crossfilter.js +187 -0
  320. package/dist/vegalite/vegalite_image.d.ts +16 -0
  321. package/dist/vegalite/vegalite_image.js +28 -0
  322. package/dist/vegalite/vegalite_loader.d.ts +7 -0
  323. package/dist/vegalite/vegalite_loader.js +15 -0
  324. package/dist/vegalite/vegalite_rows.d.ts +3 -0
  325. package/dist/vegalite/vegalite_rows.js +17 -0
  326. package/dist/vegalite/vegalite_theme.d.ts +11 -0
  327. package/dist/vegalite/vegalite_theme.js +125 -0
  328. package/fonts/InstrumentSans-Bold.ttf +0 -0
  329. package/fonts/InstrumentSans-Medium.ttf +0 -0
  330. package/fonts/InstrumentSans-OFL.txt +93 -0
  331. package/fonts/InstrumentSans-Regular.ttf +0 -0
  332. package/fonts/InstrumentSans-SemiBold.ttf +0 -0
  333. package/fonts/JetBrainsMono-Bold.ttf +0 -0
  334. package/fonts/JetBrainsMono-Medium.ttf +0 -0
  335. package/fonts/JetBrainsMono-OFL.txt +93 -0
  336. package/fonts/JetBrainsMono-Regular.ttf +0 -0
  337. package/fonts/JetBrainsMono-SemiBold.ttf +0 -0
  338. package/fonts/fonts.css +61 -0
  339. package/package.json +43 -4
  340. package/styles/colors.css +110 -0
  341. package/styles/flavors/dbcom.css +48 -0
  342. package/styles/tokens.css +192 -0
@@ -0,0 +1,316 @@
1
+ import { axis_label_left, axis_label_overlay, axis_label_right, axis_labels_container, header_container, plot_container, plot_svg, root } from "./mostfrequent_cell.module.js";
2
+ import { useObservedSize } from "../size_observer.js";
3
+ import "./histogram_cell.js";
4
+ import "./histogram_bars.js";
5
+ import { COLUMN_SUMMARY_BASELINE_COLOR, COLUMN_SUMMARY_COLORS, getFilteredBarColor, getTotalBarColor } from "./data_table_colors.js";
6
+ import { formatHistogramFocusDescription } from "./histogram_label.js";
7
+ import { arePropsEqualWithStyle } from "./memo_props.js";
8
+ import * as React from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { STRING_COLUMN } from "@akohn/dashql/platform/compute/computation_types";
11
+ import { dataTypeToString } from "@akohn/dashql/platform/compute/arrow_formatter";
12
+ import * as d3 from "d3";
13
+ var MAX_FOCUSED_VALUE_LENGTH = 100;
14
+ function truncateFocusedValue(value) {
15
+ if (value.length <= 100) return value;
16
+ return `${value.slice(0, 97)}...`;
17
+ }
18
+ function resolveRowUsingOffset(offsets, offset) {
19
+ for (let i = 0; i < offsets.length; ++i) if (offsets[i] > offset) return Math.max(i - 1, 0);
20
+ return Math.max(offsets.length - 1, 0);
21
+ }
22
+ function MostFrequentCellImpl(props) {
23
+ const svgContainer = React.useRef(null);
24
+ const svgContainerSize = useObservedSize(svgContainer);
25
+ const pendingFilterFrame = React.useRef(null);
26
+ const pendingFilters = React.useRef([]);
27
+ const diagonalStripesId = React.useId();
28
+ const roundedBarClipId = React.useId();
29
+ const margin = {
30
+ top: 4,
31
+ right: 8,
32
+ bottom: 20,
33
+ left: 8
34
+ }, width = (svgContainerSize?.width ?? 130) - margin.left - margin.right, height = (svgContainerSize?.height ?? 50) - margin.top - margin.bottom;
35
+ const frequentValues = props.columnAggregate.frequentValuesTable;
36
+ const frequentValueStrings = props.columnAggregate.analysis.frequentValueStrings;
37
+ const frequentValueCounts = props.columnAggregate.analysis.frequentValueCounts;
38
+ const frequentValuePercentages = props.columnAggregate.analysis.frequentValuePercentages;
39
+ const isUnique = props.columnAggregate.analysis.isUnique;
40
+ const hasMore = props.columnAggregate.analysis.hasMore;
41
+ const barWidth = Math.max(width - (hasMore ? 8 : 0), 0);
42
+ let nullRow = null;
43
+ for (let i = 0; i < frequentValueStrings.length; ++i) if (frequentValueStrings[i] == null) nullRow = i;
44
+ const [xScale, xOffsets, xCounts, xSum] = React.useMemo(() => {
45
+ console.assert(frequentValues.schema.fields[1].name == "count" || frequentValues.schema.fields[2].name == "count");
46
+ const xCounts = frequentValueCounts;
47
+ const xOffsets = new BigInt64Array(xCounts.length);
48
+ let xSum = BigInt(0);
49
+ for (let i = 0; i < xCounts.length; ++i) {
50
+ xOffsets[i] = xSum;
51
+ xSum += xCounts[i];
52
+ }
53
+ return [
54
+ d3.scaleLinear().range([0, barWidth]).domain([0, Number(xSum)]),
55
+ xOffsets,
56
+ xCounts,
57
+ Number(xSum)
58
+ ];
59
+ }, [
60
+ frequentValues,
61
+ frequentValueCounts,
62
+ barWidth
63
+ ]);
64
+ const filteredCountByValueId = React.useMemo(() => {
65
+ if (props.filteredColumnAggregation?.type !== STRING_COLUMN) return null;
66
+ const filteredAgg = props.filteredColumnAggregation.value;
67
+ const map = /* @__PURE__ */ new Map();
68
+ const filteredIds = filteredAgg.analysis.frequentValueIds;
69
+ const filteredCounts = filteredAgg.analysis.frequentValueCounts;
70
+ for (let i = 0; i < filteredIds.length; ++i) map.set(filteredIds[i], filteredCounts[i]);
71
+ return map;
72
+ }, [props.filteredColumnAggregation]);
73
+ const filteredRowCount = props.filteredColumnAggregation?.type === STRING_COLUMN ? props.filteredColumnAggregation.value.analysis.totalCount : null;
74
+ const frequentValueIds = props.columnAggregate.analysis.frequentValueIds;
75
+ const xUB = xScale(xSum);
76
+ const xPadding = .5;
77
+ const [focusedRow, setFocusedRow] = React.useState(null);
78
+ let focusedValue = null;
79
+ let focusDescription = null;
80
+ if (focusedRow != null) {
81
+ const value = frequentValueStrings[focusedRow];
82
+ focusedValue = value == null ? null : truncateFocusedValue(value);
83
+ const valueId = frequentValueIds[focusedRow];
84
+ const filteredCount = filteredCountByValueId == null ? null : filteredCountByValueId.get(valueId) ?? 0n;
85
+ focusDescription = formatHistogramFocusDescription(frequentValueCounts[focusedRow], props.columnAggregate.analysis.totalCount, filteredCount, filteredRowCount);
86
+ }
87
+ const onFilterRef = React.useRef(props.onFilter);
88
+ const tableAggregationRef = React.useRef(props.tableAggregation);
89
+ const columnIndexRef = React.useRef(props.columnIndex);
90
+ const columnAggregateRef = React.useRef(props.columnAggregate);
91
+ onFilterRef.current = props.onFilter;
92
+ tableAggregationRef.current = props.tableAggregation;
93
+ columnIndexRef.current = props.columnIndex;
94
+ columnAggregateRef.current = props.columnAggregate;
95
+ const queueFilter = React.useCallback((valueId) => {
96
+ if (valueId == null) pendingFilters.current = [null];
97
+ else pendingFilters.current.push(valueId);
98
+ if (pendingFilterFrame.current != null) return;
99
+ pendingFilterFrame.current = requestAnimationFrame(() => {
100
+ pendingFilterFrame.current = null;
101
+ const filters = pendingFilters.current;
102
+ pendingFilters.current = [];
103
+ for (const valueId of filters) onFilterRef.current(tableAggregationRef.current, columnIndexRef.current, columnAggregateRef.current, valueId);
104
+ });
105
+ }, []);
106
+ React.useEffect(() => () => {
107
+ if (pendingFilterFrame.current != null) cancelAnimationFrame(pendingFilterFrame.current);
108
+ }, []);
109
+ const onPointerOver = React.useCallback((elem) => {
110
+ const boundingBox = elem.currentTarget.getBoundingClientRect();
111
+ const relativeX = elem.clientX - boundingBox.left;
112
+ if (relativeX < 0 || relativeX >= barWidth || frequentValueStrings.length == 0) {
113
+ setFocusedRow(null);
114
+ return;
115
+ }
116
+ const invertedX = xScale.invert(relativeX);
117
+ const row = Math.min(resolveRowUsingOffset(xOffsets, invertedX), frequentValueStrings.length - 1);
118
+ setFocusedRow(row);
119
+ }, [
120
+ barWidth,
121
+ frequentValueStrings.length,
122
+ xOffsets,
123
+ xScale
124
+ ]);
125
+ const onPointerOut = React.useCallback((_elem) => {
126
+ setFocusedRow(null);
127
+ }, []);
128
+ const onClick = React.useCallback((elem) => {
129
+ const boundingBox = elem.currentTarget.getBoundingClientRect();
130
+ const relativeX = elem.clientX - boundingBox.left;
131
+ if (relativeX < 0 || relativeX >= barWidth || frequentValueStrings.length == 0) return;
132
+ const invertedX = xScale.invert(relativeX);
133
+ const row = Math.min(resolveRowUsingOffset(xOffsets, invertedX), frequentValueStrings.length - 1);
134
+ elem.stopPropagation();
135
+ queueFilter(Number(frequentValueIds[row]));
136
+ }, [
137
+ barWidth,
138
+ frequentValueIds,
139
+ frequentValueStrings.length,
140
+ queueFilter,
141
+ xOffsets,
142
+ xScale
143
+ ]);
144
+ const percentageLeft = frequentValuePercentages[0] ?? 0;
145
+ const percentageRight = frequentValuePercentages[frequentValuePercentages.length - 1] ?? 0;
146
+ const labelLeft = `${Math.round(percentageLeft * 100 * 100) / 100}%`;
147
+ const labelRight = `${Math.round(percentageRight * 100 * 100) / 100}%`;
148
+ return /* @__PURE__ */ jsx("div", {
149
+ className: props.className,
150
+ style: {
151
+ ...props.style,
152
+ zIndex: focusedRow != null ? 100 : props.style?.zIndex
153
+ },
154
+ onClick: () => queueFilter(null),
155
+ children: /* @__PURE__ */ jsxs("div", {
156
+ className: root,
157
+ children: [/* @__PURE__ */ jsx("div", {
158
+ className: header_container,
159
+ children: focusDescription ?? dataTypeToString(props.columnAggregate.columnEntry.inputFieldType)
160
+ }), /* @__PURE__ */ jsxs("div", {
161
+ className: plot_container,
162
+ ref: svgContainer,
163
+ children: [
164
+ /* @__PURE__ */ jsxs("svg", {
165
+ className: plot_svg,
166
+ width: width + margin.left + margin.right,
167
+ height: height + margin.top + margin.bottom,
168
+ children: [
169
+ /* @__PURE__ */ jsxs("defs", { children: [/* @__PURE__ */ jsx("pattern", {
170
+ id: diagonalStripesId,
171
+ patternUnits: "userSpaceOnUse",
172
+ width: "4",
173
+ height: "4",
174
+ children: /* @__PURE__ */ jsx("path", {
175
+ d: "M-1,1 l2,-2 M0,4 l4,-4 M3,5 l2,-2",
176
+ style: {
177
+ stroke: COLUMN_SUMMARY_COLORS.totalBar,
178
+ strokeOpacity: .8,
179
+ strokeWidth: 1
180
+ }
181
+ })
182
+ }), /* @__PURE__ */ jsx("clipPath", {
183
+ id: roundedBarClipId,
184
+ children: /* @__PURE__ */ jsx("rect", {
185
+ x: 0,
186
+ y: 0,
187
+ width,
188
+ height,
189
+ rx: 3,
190
+ ry: 3
191
+ })
192
+ })] }),
193
+ /* @__PURE__ */ jsxs("g", {
194
+ "data-part": "bars",
195
+ transform: `translate(${margin.left},${margin.top})`,
196
+ clipPath: `url(#${roundedBarClipId})`,
197
+ children: [
198
+ /* @__PURE__ */ jsx("rect", {
199
+ x: 0,
200
+ y: 0,
201
+ width,
202
+ height,
203
+ style: { fill: COLUMN_SUMMARY_COLORS.totalBarWithFilter }
204
+ }),
205
+ [...Array(frequentValueStrings.length)].map((_, i) => {
206
+ const barX = Math.min(xScale(Number(xOffsets[i])) + xPadding, xUB);
207
+ const barWidth = Math.max(xScale(Number(xCounts[i])) - 2 * xPadding, 0);
208
+ if (isNaN(barX) || isNaN(barWidth)) return null;
209
+ const totalCount = xCounts[i];
210
+ const isNull = i == nullRow;
211
+ const isFocused = i == focusedRow;
212
+ const hasFilter = filteredCountByValueId != null;
213
+ let fillHeight = 0;
214
+ if (hasFilter && totalCount > 0n) {
215
+ const valueId = frequentValueIds[i];
216
+ const filteredCount = filteredCountByValueId.get(valueId) ?? 0n;
217
+ fillHeight = height * Number(filteredCount) / Number(totalCount);
218
+ }
219
+ return /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("rect", {
220
+ x: barX,
221
+ y: 0,
222
+ width: barWidth,
223
+ height,
224
+ style: { fill: getTotalBarColor(hasFilter, isFocused, isNull) }
225
+ }), hasFilter && fillHeight > 0 && /* @__PURE__ */ jsx("rect", {
226
+ x: barX,
227
+ y: height - fillHeight,
228
+ width: barWidth,
229
+ height: fillHeight,
230
+ style: { fill: getFilteredBarColor(isFocused, isNull) }
231
+ })] }, i);
232
+ }),
233
+ nullRow != null && /* @__PURE__ */ jsx("rect", {
234
+ x: Math.min(xScale(Number(xOffsets[nullRow])) + xPadding, xUB),
235
+ y: 0,
236
+ width: Math.max(xScale(Number(xCounts[nullRow])) - 2 * xPadding, 0),
237
+ height,
238
+ fill: `url(#${diagonalStripesId})`
239
+ }),
240
+ hasMore && /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("rect", {
241
+ x: barWidth + xPadding,
242
+ height,
243
+ width: 7.5,
244
+ style: { fill: getTotalBarColor(filteredCountByValueId != null, false) }
245
+ }) })
246
+ ]
247
+ }),
248
+ /* @__PURE__ */ jsx("g", {
249
+ transform: `translate(${margin.left},${margin.top})`,
250
+ children: /* @__PURE__ */ jsx("rect", {
251
+ x: 0,
252
+ y: 0,
253
+ width,
254
+ height,
255
+ rx: 3,
256
+ ry: 3,
257
+ style: { stroke: COLUMN_SUMMARY_BASELINE_COLOR },
258
+ strokeWidth: 1,
259
+ fill: "transparent"
260
+ })
261
+ }),
262
+ /* @__PURE__ */ jsx("g", {
263
+ "data-part": "pointer",
264
+ transform: `translate(${margin.left},${margin.top})`,
265
+ onPointerOver,
266
+ onPointerMove: onPointerOver,
267
+ onPointerOut,
268
+ onClick,
269
+ children: /* @__PURE__ */ jsx("rect", {
270
+ x: 0,
271
+ y: 0,
272
+ width,
273
+ height: height + margin.bottom - 1,
274
+ fillOpacity: 0
275
+ })
276
+ })
277
+ ]
278
+ }),
279
+ isUnique && /* @__PURE__ */ jsx("span", {
280
+ className: "dashql_plot_label_overlay_C48fk7",
281
+ style: {
282
+ top: `${margin.top + height / 2}px`,
283
+ left: `${margin.left + width / 2}px`
284
+ },
285
+ children: "all distinct"
286
+ }),
287
+ focusedRow == null ? /* @__PURE__ */ jsxs("div", {
288
+ className: axis_labels_container,
289
+ style: {
290
+ position: "absolute",
291
+ top: `${margin.top + height + 2}px`,
292
+ left: `${margin.left}px`,
293
+ width: `${width}px`
294
+ },
295
+ children: [/* @__PURE__ */ jsx("span", {
296
+ className: axis_label_left,
297
+ children: labelLeft
298
+ }), /* @__PURE__ */ jsx("span", {
299
+ className: axis_label_right,
300
+ children: labelRight
301
+ })]
302
+ }) : /* @__PURE__ */ jsx("span", {
303
+ className: axis_label_overlay,
304
+ style: {
305
+ top: `${margin.top + height + 13 - 12}px`,
306
+ left: `${margin.left + xScale(Number(xOffsets[focusedRow])) + xScale(Number(xCounts[focusedRow]) / 2)}px`
307
+ },
308
+ children: focusedValue ?? "∅"
309
+ })
310
+ ]
311
+ })]
312
+ })
313
+ });
314
+ }
315
+ var MostFrequentCell = React.memo(MostFrequentCellImpl, arePropsEqualWithStyle);
316
+ export { MAX_FOCUSED_VALUE_LENGTH, MostFrequentCell, truncateFocusedValue };
@@ -0,0 +1,10 @@
1
+ var root = "dashql_root_o-bgGf";
2
+ var header_container = "dashql_header_container_ncglC3";
3
+ var plot_container = "dashql_plot_container_2fh1NB";
4
+ var plot_svg = "dashql_plot_svg_HCjgKI";
5
+ var axis_labels_container = "dashql_axis_labels_container_1ee2-2";
6
+ var axis_label_left = "dashql_axis_label_left_yX1Eq6";
7
+ var axis_label_right = "dashql_axis_label_right_qIhkg5";
8
+ var axis_label_overlay = "dashql_axis_label_overlay_Fl9GFo";
9
+ var plot_label_overlay = "dashql_plot_label_overlay_C48fk7";
10
+ export { axis_label_left, axis_label_overlay, axis_label_right, axis_labels_container, header_container, plot_container, plot_label_overlay, plot_svg, root };
@@ -0,0 +1,14 @@
1
+ import type * as core from '@akohn/dashql';
2
+ import type { ComputationView } from '@akohn/dashql';
3
+ import { HistogramFilterCallback } from './histogram_cell.js';
4
+ import { MostFrequentValueFilterCallback } from './mostfrequent_cell.js';
5
+ import { DataTableLayout } from './data_table_layout.js';
6
+ export type ComputationDispatch = (action: core.ComputationAction) => core.DispatchOutcome;
7
+ export interface CrossFilterController {
8
+ crossFilters: core.ComputationCrossFilter[];
9
+ histogramFilter: HistogramFilterCallback;
10
+ mostFrequentValueFilter: MostFrequentValueFilterCallback;
11
+ requestFilteredColumnAggregation: (columnId: number) => void;
12
+ }
13
+ export declare function useCrossFilters(computationState: ComputationView | null, dispatchComputation: ComputationDispatch, gridLayout: DataTableLayout): CrossFilterController;
14
+ export declare function crossFilterOf(crossFilters: core.ComputationCrossFilter[], columnGroup: number): core.ComputationCrossFilter | null;
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import { ORDINAL_COLUMN, STRING_COLUMN } from "@akohn/dashql/platform/compute/computation_types";
3
+ function useCrossFilters(computationState, dispatchComputation, gridLayout) {
4
+ const crossFilters = computationState?.crossFilters ?? EMPTY_CROSS_FILTERS;
5
+ const gridLayoutRef = React.useRef(gridLayout);
6
+ const columnGroupsRef = React.useRef(computationState?.columnGroups ?? EMPTY_COLUMN_GROUPS);
7
+ gridLayoutRef.current = gridLayout;
8
+ columnGroupsRef.current = computationState?.columnGroups ?? EMPTY_COLUMN_GROUPS;
9
+ return {
10
+ crossFilters,
11
+ histogramFilter: React.useCallback((_table, columnIndex, _column, brush) => {
12
+ const columnGroupId = gridLayoutRef.current.columnGroupByColumnIndex[columnIndex];
13
+ if (columnGroupsRef.current[columnGroupId]?.type !== ORDINAL_COLUMN) return;
14
+ dispatchComputation({
15
+ kind: "histogramFilter",
16
+ value: {
17
+ columnGroup: columnGroupId,
18
+ selection: brush
19
+ }
20
+ });
21
+ }, [dispatchComputation]),
22
+ mostFrequentValueFilter: React.useCallback((_table, columnIndex, _column, frequentValueId) => {
23
+ const columnGroupId = gridLayoutRef.current.columnGroupByColumnIndex[columnIndex];
24
+ const columnGroup = columnGroupsRef.current[columnGroupId];
25
+ if (columnGroup?.type !== STRING_COLUMN || columnGroup.value.valueIdFieldName == null) return;
26
+ dispatchComputation({
27
+ kind: "mostFrequentValueFilter",
28
+ value: {
29
+ columnGroup: columnGroupId,
30
+ valueId: frequentValueId
31
+ }
32
+ });
33
+ }, [dispatchComputation]),
34
+ requestFilteredColumnAggregation: React.useCallback((columnId) => {
35
+ dispatchComputation({
36
+ kind: "requestFilteredColumnAggregation",
37
+ value: { columnGroup: columnId }
38
+ });
39
+ }, [dispatchComputation])
40
+ };
41
+ }
42
+ function crossFilterOf(crossFilters, columnGroup) {
43
+ return crossFilters.find((filter) => filter.column === columnGroup) ?? null;
44
+ }
45
+ var EMPTY_CROSS_FILTERS = [];
46
+ var EMPTY_COLUMN_GROUPS = [];
47
+ export { crossFilterOf, useCrossFilters };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { type RenderSchedule } from '../dom/calm_frames.js';
3
+ export declare const RenderScheduleContext: React.Context<RenderSchedule>;
4
+ export declare function useRenderSchedule(): RenderSchedule;
5
+ interface DeferredProps {
6
+ fallback: React.ReactNode;
7
+ children: React.ReactNode;
8
+ immediate?: boolean;
9
+ }
10
+ export declare function Deferred(props: DeferredProps): React.ReactNode;
11
+ export {};
@@ -0,0 +1,41 @@
1
+ import { content, content_hidden, root } from "./deferred.module.js";
2
+ import { CALM_FRAMES } from "../dom/calm_frames.js";
3
+ import * as React from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { perfMarks } from "@akohn/dashql";
6
+ var RenderScheduleContext = React.createContext(CALM_FRAMES);
7
+ function useRenderSchedule() {
8
+ return React.useContext(RenderScheduleContext);
9
+ }
10
+ function Deferred(props) {
11
+ const schedule = useRenderSchedule();
12
+ const suspended = React.useSyncExternalStore(schedule.subscribe, schedule.suspended);
13
+ const [mounted, setMounted] = React.useState(props.immediate === true);
14
+ const [shown, setShown] = React.useState(props.immediate === true);
15
+ if (suspended && shown) setShown(false);
16
+ React.useEffect(() => {
17
+ if (shown || suspended) return;
18
+ const waitStarted = perfMarks.start();
19
+ return schedule.schedule(() => {
20
+ perfMarks.end("render:deferredWait", waitStarted);
21
+ setMounted(true);
22
+ setShown(true);
23
+ });
24
+ }, [
25
+ schedule,
26
+ shown,
27
+ suspended
28
+ ]);
29
+ if (!mounted) return props.fallback;
30
+ return /* @__PURE__ */ jsxs("div", {
31
+ className: root,
32
+ children: [/* @__PURE__ */ jsx("div", {
33
+ className: shown ? content : content_hidden,
34
+ children: props.children
35
+ }), !shown && /* @__PURE__ */ jsx("div", {
36
+ className: "dashql_fallback_tqcpPh",
37
+ children: props.fallback
38
+ })]
39
+ });
40
+ }
41
+ export { Deferred, RenderScheduleContext, useRenderSchedule };
@@ -0,0 +1,5 @@
1
+ var root = "dashql_root_TwILJ0";
2
+ var content = "dashql_content_wsCyy_";
3
+ var content_hidden = "dashql_content_hidden_gX7mwt";
4
+ var fallback = "dashql_fallback_tqcpPh";
5
+ export { content, content_hidden, fallback, root };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ interface Props {
3
+ fallback: (error: unknown) => React.ReactNode;
4
+ onError?: (error: unknown, info: React.ErrorInfo) => void;
5
+ children: React.ReactNode;
6
+ }
7
+ interface State {
8
+ failure: {
9
+ error: unknown;
10
+ } | null;
11
+ }
12
+ export declare class ErrorBoundary extends React.Component<Props, State> {
13
+ state: State;
14
+ static getDerivedStateFromError(error: unknown): State;
15
+ componentDidCatch(error: unknown, info: React.ErrorInfo): void;
16
+ render(): React.ReactNode;
17
+ }
18
+ export {};
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ var ErrorBoundary = class extends React.Component {
3
+ state = { failure: null };
4
+ static getDerivedStateFromError(error) {
5
+ return { failure: { error } };
6
+ }
7
+ componentDidCatch(error, info) {
8
+ this.props.onError?.(error, info);
9
+ }
10
+ render() {
11
+ const { failure } = this.state;
12
+ return failure != null ? this.props.fallback(failure.error) : this.props.children;
13
+ }
14
+ };
15
+ export { ErrorBoundary };
@@ -0,0 +1,15 @@
1
+ var edge = "dashql_edge_oeHc8l";
2
+ var edgeBadgeLayer = "dashql_edgeBadgeLayer_C_Vte6";
3
+ var edgeBadge = "dashql_edgeBadge_rJ0gWg";
4
+ var crossEdge = "dashql_crossEdge_P0_WiY";
5
+ var edgeHighlightLayer = "dashql_edgeHighlightLayer_Bg7lou";
6
+ var edgeHighlight = "dashql_edgeHighlight_IE3O8Y";
7
+ var crossEdgeHighlight = "dashql_crossEdgeHighlight_L_cmuy";
8
+ var fragment_colors = "dashql_fragment_colors_7Wc_EO";
9
+ var fragment = "dashql_fragment_uePHdG";
10
+ var node_frame = "dashql_node_frame_CzZiel";
11
+ var port = "dashql_port_RVYh31";
12
+ var port_border = "dashql_port_border_6-2NFm";
13
+ var port_mask = "dashql_port_mask_twJ0PO";
14
+ var port_dot = "dashql_port_dot_AG2aon";
15
+ export { crossEdge, crossEdgeHighlight, edge, edgeBadge, edgeBadgeLayer, edgeHighlight, edgeHighlightLayer, fragment, fragment_colors, node_frame, port, port_border, port_dot, port_mask };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export type GraphPortSide = 'top' | 'bottom' | 'left' | 'right';
3
+ export interface GraphPortProps {
4
+ x: number;
5
+ y: number;
6
+ side: GraphPortSide;
7
+ highlighted?: boolean;
8
+ [attribute: `data-${string}`]: string | undefined;
9
+ }
10
+ export declare function GraphPort(props: GraphPortProps): React.ReactElement;
@@ -0,0 +1,34 @@
1
+ import { port, port_border, port_dot, port_mask } from "./graph.module.js";
2
+ import "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var PORT_BORDER = {
5
+ top: "M -5 0 A 5 5 0 0 1 5 0",
6
+ bottom: "M -5 0 A 5 5 0 0 0 5 0",
7
+ left: "M 0 -5 A 5 5 0 0 0 0 5",
8
+ right: "M 0 -5 A 5 5 0 0 1 0 5"
9
+ };
10
+ function GraphPort(props) {
11
+ const { x, y, side, highlighted, ...data } = props;
12
+ return /* @__PURE__ */ jsxs("g", {
13
+ className: port,
14
+ transform: `translate(${x}, ${y})`,
15
+ "data-highlighted": highlighted || void 0,
16
+ "aria-hidden": "true",
17
+ ...data,
18
+ children: [
19
+ /* @__PURE__ */ jsx("path", {
20
+ className: port_border,
21
+ d: PORT_BORDER[side]
22
+ }),
23
+ /* @__PURE__ */ jsx("circle", {
24
+ className: port_mask,
25
+ r: 4
26
+ }),
27
+ /* @__PURE__ */ jsx("circle", {
28
+ className: port_dot,
29
+ r: 2.5
30
+ })
31
+ ]
32
+ });
33
+ }
34
+ export { GraphPort };
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ export interface InspectorHeaderProps {
3
+ title: React.ReactNode;
4
+ status?: React.ReactNode;
5
+ actions?: React.ReactNode;
6
+ className?: string;
7
+ titleClassName?: string;
8
+ }
9
+ export declare function InspectorHeader(props: InspectorHeaderProps): React.ReactElement;
10
+ export interface InspectorOverlayProps {
11
+ title: React.ReactNode;
12
+ status?: React.ReactNode;
13
+ actions?: React.ReactNode;
14
+ columns?: React.ReactNode;
15
+ columnsClassName?: string;
16
+ bodyClassName?: string;
17
+ bodyRef?: React.Ref<HTMLDivElement>;
18
+ className?: string;
19
+ children?: React.ReactNode;
20
+ }
21
+ export declare function InspectorOverlay(props: InspectorOverlayProps): React.ReactElement;
22
+ export declare function inspectorRowClassName(selected: boolean, className?: string): string;
23
+ export declare function InspectorEmpty(props: {
24
+ children: React.ReactNode;
25
+ }): React.ReactElement;
26
+ export interface InspectorDetailProps {
27
+ sidebarTop?: React.ReactNode;
28
+ sidebarBottom?: React.ReactNode;
29
+ contentClassName?: string;
30
+ children?: React.ReactNode;
31
+ }
32
+ export declare function InspectorDetail(props: InspectorDetailProps): React.ReactElement;
@@ -0,0 +1,72 @@
1
+ import { body, detail, detail_content, detail_main, detail_sidebar, detail_sidebar_bottom, detail_sidebar_top, empty, header, header_left, header_right, overlay, overlay_with_columns, row, row_selected, title } from "./inspector_overlay.module.js";
2
+ import { classNames } from "../dom/classnames.js";
3
+ import "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ function InspectorHeader(props) {
6
+ return /* @__PURE__ */ jsxs("div", {
7
+ className: classNames(header, props.className),
8
+ children: [/* @__PURE__ */ jsxs("div", {
9
+ className: header_left,
10
+ children: [/* @__PURE__ */ jsx("div", {
11
+ className: classNames(title, props.titleClassName),
12
+ children: props.title
13
+ }), props.status]
14
+ }), /* @__PURE__ */ jsx("div", {
15
+ className: header_right,
16
+ children: props.actions
17
+ })]
18
+ });
19
+ }
20
+ function InspectorOverlay(props) {
21
+ return /* @__PURE__ */ jsxs("div", {
22
+ className: classNames(overlay, { [overlay_with_columns]: props.columns != null }, props.className),
23
+ "data-electron-drag-region": "false",
24
+ children: [
25
+ /* @__PURE__ */ jsx(InspectorHeader, {
26
+ title: props.title,
27
+ status: props.status,
28
+ actions: props.actions
29
+ }),
30
+ props.columns != null && /* @__PURE__ */ jsx("div", {
31
+ className: classNames("dashql_columns_KvQa-k", props.columnsClassName),
32
+ children: props.columns
33
+ }),
34
+ /* @__PURE__ */ jsx("div", {
35
+ className: classNames(body, props.bodyClassName),
36
+ ref: props.bodyRef,
37
+ children: props.children
38
+ })
39
+ ]
40
+ });
41
+ }
42
+ function inspectorRowClassName(selected, className) {
43
+ return classNames(row, { [row_selected]: selected }, className);
44
+ }
45
+ function InspectorEmpty(props) {
46
+ return /* @__PURE__ */ jsx("div", {
47
+ className: empty,
48
+ children: props.children
49
+ });
50
+ }
51
+ function InspectorDetail(props) {
52
+ return /* @__PURE__ */ jsxs("div", {
53
+ className: detail,
54
+ children: [/* @__PURE__ */ jsx("div", {
55
+ className: detail_main,
56
+ children: /* @__PURE__ */ jsx("div", {
57
+ className: classNames(detail_content, props.contentClassName),
58
+ children: props.children
59
+ })
60
+ }), /* @__PURE__ */ jsxs("div", {
61
+ className: detail_sidebar,
62
+ children: [/* @__PURE__ */ jsx("div", {
63
+ className: detail_sidebar_top,
64
+ children: props.sidebarTop
65
+ }), /* @__PURE__ */ jsx("div", {
66
+ className: detail_sidebar_bottom,
67
+ children: props.sidebarBottom
68
+ })]
69
+ })]
70
+ });
71
+ }
72
+ export { InspectorDetail, InspectorEmpty, InspectorHeader, InspectorOverlay, inspectorRowClassName };
@@ -0,0 +1,18 @@
1
+ var overlay = "dashql_overlay_g1V50x";
2
+ var overlay_with_columns = "dashql_overlay_with_columns_5ht6Qo";
3
+ var header = "dashql_header_uW9wLo";
4
+ var header_left = "dashql_header_left_3Lu4LT";
5
+ var header_right = "dashql_header_right_H3xpgg";
6
+ var title = "dashql_title_gjPGGH";
7
+ var columns = "dashql_columns_KvQa-k";
8
+ var body = "dashql_body_Oyp2FK";
9
+ var row = "dashql_row_CcHSBC";
10
+ var row_selected = "dashql_row_selected_At1sBH";
11
+ var empty = "dashql_empty_YD0UVz";
12
+ var detail = "dashql_detail_3Dyx2z";
13
+ var detail_main = "dashql_detail_main_DSxnST";
14
+ var detail_content = "dashql_detail_content_WRACzO";
15
+ var detail_sidebar = "dashql_detail_sidebar_UEUC-u";
16
+ var detail_sidebar_top = "dashql_detail_sidebar_top_WV_Gpf";
17
+ var detail_sidebar_bottom = "dashql_detail_sidebar_bottom_uM3veI";
18
+ export { body, columns, detail, detail_content, detail_main, detail_sidebar, detail_sidebar_bottom, detail_sidebar_top, empty, header, header_left, header_right, overlay, overlay_with_columns, row, row_selected, title };