flexdesk 0.14.0 → 0.15.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 (190) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +54 -3
  3. package/THIRD_PARTY_LICENSES.md +0 -0
  4. package/css/base.css +0 -0
  5. package/css/flexdesk.css +34 -0
  6. package/css/overrides.css +0 -0
  7. package/css/reset.css +0 -0
  8. package/css/tokens.css +0 -0
  9. package/dist/canvas.js +0 -0
  10. package/dist/canvas.js.map +0 -0
  11. package/dist/charts.js +2 -2
  12. package/dist/charts.js.map +0 -0
  13. package/dist/chunk-3PHCPZHT.js +0 -0
  14. package/dist/chunk-3PHCPZHT.js.map +0 -0
  15. package/dist/chunk-6JSOVNID.js +0 -0
  16. package/dist/chunk-6JSOVNID.js.map +0 -0
  17. package/dist/chunk-CWPMLX67.js +0 -0
  18. package/dist/chunk-CWPMLX67.js.map +0 -0
  19. package/dist/{chunk-M2L4XW2U.js → chunk-FBGP5KN5.js} +33 -21
  20. package/dist/chunk-FBGP5KN5.js.map +7 -0
  21. package/dist/chunk-FL5KFNQH.js +0 -0
  22. package/dist/chunk-FL5KFNQH.js.map +0 -0
  23. package/dist/chunk-FOOS3T5L.js +0 -0
  24. package/dist/chunk-FOOS3T5L.js.map +0 -0
  25. package/dist/chunk-JYWURG5T.js +0 -0
  26. package/dist/chunk-JYWURG5T.js.map +0 -0
  27. package/dist/chunk-NLTOY57M.js +0 -0
  28. package/dist/chunk-NLTOY57M.js.map +0 -0
  29. package/dist/chunk-NNFTETK3.js +0 -0
  30. package/dist/chunk-NNFTETK3.js.map +0 -0
  31. package/dist/chunk-O5OHMWBB.js +0 -0
  32. package/dist/chunk-O5OHMWBB.js.map +0 -0
  33. package/dist/{chunk-IYMNDPWH.js → chunk-RQM5Z2MU.js} +2 -2
  34. package/dist/{chunk-IYMNDPWH.js.map → chunk-RQM5Z2MU.js.map} +0 -0
  35. package/dist/chunk-SN4LSOAR.js +0 -0
  36. package/dist/chunk-SN4LSOAR.js.map +0 -0
  37. package/dist/chunk-WVFGV5FT.js +0 -0
  38. package/dist/chunk-WVFGV5FT.js.map +0 -0
  39. package/dist/core.js +0 -0
  40. package/dist/core.js.map +0 -0
  41. package/dist/editor.js +0 -0
  42. package/dist/editor.js.map +0 -0
  43. package/dist/flexdesk.css +34 -0
  44. package/dist/flow.js +1 -1
  45. package/dist/flow.js.map +0 -0
  46. package/dist/host.js +28 -5
  47. package/dist/host.js.map +2 -2
  48. package/dist/reset.css +0 -0
  49. package/dist/tile_registry-6WZPTUZV.js +0 -0
  50. package/dist/tile_registry-6WZPTUZV.js.map +0 -0
  51. package/dist/tiles.js +11 -3
  52. package/dist/tiles.js.map +2 -2
  53. package/dist/tokens.css +0 -0
  54. package/dist/widgets.js +101 -10
  55. package/dist/widgets.js.map +2 -2
  56. package/dist/wm.js +0 -0
  57. package/dist/wm.js.map +0 -0
  58. package/package.json +1 -1
  59. package/src/canvas/canvas_adapter.js +0 -0
  60. package/src/canvas/edge_router.js +0 -0
  61. package/src/canvas/graph/connector_router.js +0 -0
  62. package/src/canvas/graph/history_service.js +0 -0
  63. package/src/canvas/graph/node_platform.js +0 -0
  64. package/src/canvas/index.js +0 -0
  65. package/src/charts/chart_types.js +0 -0
  66. package/src/charts/data_series_plot_window.js +0 -0
  67. package/src/charts/downsample.js +0 -0
  68. package/src/charts/plot_config.js +0 -0
  69. package/src/charts/plot_popout_window.js +0 -0
  70. package/src/charts/plotly_wrapper.js +0 -0
  71. package/src/core/event_bus.js +0 -0
  72. package/src/core/logging.js +0 -0
  73. package/src/core/settings.js +0 -0
  74. package/src/core/state_guard.js +0 -0
  75. package/src/core/state_guard_config.js +0 -0
  76. package/src/core/state_machine.js +0 -0
  77. package/src/editor/editor_pane.js +0 -0
  78. package/src/editor/monaco_editor_factory.js +0 -0
  79. package/src/editor/monaco_loader.js +0 -0
  80. package/src/editor/notebook_search.js +0 -0
  81. package/src/editor/notebook_tab_bar.js +0 -0
  82. package/src/editor/notebook_undo_manager.js +0 -0
  83. package/src/editor/split_pane_container.js +0 -0
  84. package/src/flow/canvas_editor/editor.js +0 -0
  85. package/src/flow/canvas_editor/index.js +0 -0
  86. package/src/flow/canvas_editor/layout.js +0 -0
  87. package/src/flow/canvas_editor/strings.js +0 -0
  88. package/src/flow/kit/always_before.js +0 -0
  89. package/src/flow/kit/catalogue.js +0 -0
  90. package/src/flow/kit/chip_input.js +0 -0
  91. package/src/flow/kit/dom.js +0 -0
  92. package/src/flow/kit/findings.js +0 -0
  93. package/src/flow/kit/history.js +0 -0
  94. package/src/flow/kit/index.js +0 -0
  95. package/src/flow/kit/keys.js +0 -0
  96. package/src/flow/kit/logic_graph.js +0 -0
  97. package/src/flow/kit/references.js +0 -0
  98. package/src/flow/kit/settings_panel.js +0 -0
  99. package/src/flow/kit/settings_schema.js +0 -0
  100. package/src/flow/kit/step_picker.js +0 -0
  101. package/src/flow/kit/strings.js +0 -0
  102. package/src/flow/kit/value_picker.js +0 -0
  103. package/src/flow/kit/widgets.js +0 -0
  104. package/src/flow/lanes/editor.js +0 -0
  105. package/src/flow/lanes/index.js +0 -0
  106. package/src/flow/lanes/layout.js +0 -0
  107. package/src/flow/lanes/pipeline.js +0 -0
  108. package/src/flow/lanes/preview.js +0 -0
  109. package/src/flow/lanes/strings.js +0 -0
  110. package/src/flow/outline/editor.js +0 -0
  111. package/src/flow/outline/index.js +0 -0
  112. package/src/flow/outline/mapping.js +0 -0
  113. package/src/flow/outline/menu.js +0 -0
  114. package/src/flow/outline/operations.js +0 -0
  115. package/src/flow/outline/recognise.js +0 -0
  116. package/src/flow/outline/strings.js +0 -0
  117. package/src/help/help_modal.js +0 -0
  118. package/src/help/help_registry.js +0 -0
  119. package/src/host/host.js +2 -1
  120. package/src/host/photino_host.js +31 -3
  121. package/src/host/photino_host.md +56 -3
  122. package/src/host/pywebview_host.js +0 -0
  123. package/src/tiles/chart_tiles.js +14 -1
  124. package/src/tiles/config_schema.js +0 -0
  125. package/src/tiles/layout_persistence.js +0 -0
  126. package/src/tiles/tile_base.js +0 -0
  127. package/src/tiles/tile_grid.js +0 -0
  128. package/src/tiles/tile_registry.js +0 -0
  129. package/src/tiling/bottom_panel_tabs.js +0 -0
  130. package/src/tiling/command_palette.js +0 -0
  131. package/src/tiling/content_registry.js +0 -0
  132. package/src/tiling/desktops.js +0 -0
  133. package/src/tiling/entity_sources.js +0 -0
  134. package/src/tiling/keymap.js +0 -0
  135. package/src/tiling/kind_taxonomy.js +0 -0
  136. package/src/tiling/landing_table.js +0 -0
  137. package/src/tiling/loading_overlay.js +0 -0
  138. package/src/tiling/nav_panel.js +0 -0
  139. package/src/tiling/page_factory.js +0 -0
  140. package/src/tiling/panel_keys.js +0 -0
  141. package/src/tiling/shell.js +0 -0
  142. package/src/tiling/tab_strip.js +0 -0
  143. package/src/tiling/tile_breadcrumb.js +0 -0
  144. package/src/tiling/tile_renderer.js +0 -0
  145. package/src/tiling/tile_tab_menu.js +0 -0
  146. package/src/tiling/tile_tree.js +0 -0
  147. package/src/tiling/wm.js +0 -0
  148. package/src/tiling/zoom.js +0 -0
  149. package/src/ui/base/component_base.js +0 -0
  150. package/src/ui/base/controller_base.js +0 -0
  151. package/src/ui/base/page_base.js +0 -0
  152. package/src/ui/components/about_dialog.js +0 -0
  153. package/src/ui/components/action_dropdown.js +0 -0
  154. package/src/ui/components/alert_log.js +0 -0
  155. package/src/ui/components/alerts_pane.js +0 -0
  156. package/src/ui/components/attribute_list_editor.js +0 -0
  157. package/src/ui/components/autocomplete_field.js +0 -0
  158. package/src/ui/components/column_fit.js +0 -0
  159. package/src/ui/components/computing_status_window.js +0 -0
  160. package/src/ui/components/confirm_dialog.js +0 -0
  161. package/src/ui/components/context_menu.js +0 -0
  162. package/src/ui/components/data_table.js +32 -14
  163. package/src/ui/components/detail_header.js +0 -0
  164. package/src/ui/components/drag_reorder.js +0 -0
  165. package/src/ui/components/fact_table.js +0 -0
  166. package/src/ui/components/gallery_picker.js +0 -0
  167. package/src/ui/components/inline_renamer.js +0 -0
  168. package/src/ui/components/managed_window.js +0 -0
  169. package/src/ui/components/modal.js +0 -0
  170. package/src/ui/components/notification_history.js +0 -0
  171. package/src/ui/components/record_list.js +0 -0
  172. package/src/ui/components/row_activation.js +0 -0
  173. package/src/ui/components/slide_out_panel.js +0 -0
  174. package/src/ui/components/slider_field.js +0 -0
  175. package/src/ui/components/sortable_list.js +0 -0
  176. package/src/ui/components/table_filter_chips.js +0 -0
  177. package/src/ui/components/table_state_store.js +0 -0
  178. package/src/ui/components/table_values.js +0 -0
  179. package/src/ui/components/toast.js +0 -0
  180. package/src/ui/components/tree_view.js +0 -0
  181. package/src/ui/components/window_taskbar.js +0 -0
  182. package/src/ui/controllers/panel_state_machine.js +0 -0
  183. package/src/ui/controllers/window_chrome_controller.js +106 -11
  184. package/src/ui/notification_center.js +0 -0
  185. package/src/ui/utils/auto_scrollbars.js +0 -0
  186. package/src/ui/utils/overlay_scrollbar.js +0 -0
  187. package/src/ui/utils/raf_resize_observer.js +0 -0
  188. package/src/ui/utils/scroll_lock.js +0 -0
  189. package/src/ui/utils/tooltip_service.js +0 -0
  190. package/dist/chunk-M2L4XW2U.js.map +0 -7
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -907,6 +907,20 @@ list.setColumnVisible(3, true);
907
907
  A column sorted on and then hidden keeps the order; its arrow comes back with
908
908
  the column.
909
909
 
910
+ ### DataTable: the CSV button on every table (0.14.1)
911
+
912
+ `showExportButton: true` draws "Download visible rows as CSV" in the pagination
913
+ strip, and now draws the strip for it on a table that fits on one page too (the
914
+ button alone, no page buttons). `exportFilename` — a string, or `(table) =>
915
+ string` — names the file (default `data.csv`). With a `host` that has `dialogs`
916
+ the button opens the native Save dialog, suggesting that name; without one it
917
+ is a browser download.
918
+
919
+ ```js
920
+ DataTable.mount(el, { headers, rows, pagination: true, showExportButton: true,
921
+ exportFilename: 'bugs.csv', host });
922
+ ```
923
+
910
924
  ### DataTable: a select mode (0.12.0)
911
925
 
912
926
  A list whose click opens a row can still let people pick many rows: a toggle
@@ -1737,9 +1751,41 @@ import { createPhotinoHost } from '@flexdesk/host';
1737
1751
  const host = createPhotinoHost({ state: myServerState, onEvent: (name, value) => {} });
1738
1752
  ```
1739
1753
 
1740
- Its `window.chrome()` answers `'native'`, `dialogs.saveFile` falls back to a
1741
- Blob download when the window refuses, and the messages the C# side has to
1742
- answer are in [`src/host/photino_host.md`](src/host/photino_host.md).
1754
+ `dialogs.saveFile` falls back to a Blob download when the window refuses, and
1755
+ the messages the C# side has to answer are in
1756
+ [`src/host/photino_host.md`](src/host/photino_host.md).
1757
+
1758
+ ### A window with its own chrome (0.15.0)
1759
+
1760
+ The same app runs three ways, and the page needs no switch for it:
1761
+
1762
+ | | title bar and borders | FlexDesk draws |
1763
+ |---|---|---|
1764
+ | a browser tab | the browser's | nothing |
1765
+ | a Photino window, native frame | the OS's | nothing |
1766
+ | a Photino window, custom frame | none: your top bar is the title bar | minimise / maximise / close, resize handles, drag |
1767
+
1768
+ ```js
1769
+ import { WindowChromeController } from '@flexdesk/widgets';
1770
+
1771
+ new WindowChromeController({
1772
+ host, // createPhotinoHost(), or any Host
1773
+ topBar: '.my-top-bar', // drags the window (default .twm-global-top-bar)
1774
+ controls: '.my-top-bar .right', // where the three buttons go (default: the bar's .twm-bar-right)
1775
+ noDrag: '.my-search', // more that never starts a drag
1776
+ }).initialize(); // resolves true only with custom chrome
1777
+ ```
1778
+
1779
+ `host.window.chrome()` decides. The Photino host asks its native side once
1780
+ (`host.describe`, its `frame` field) and answers `'custom'` only when the
1781
+ window was made frameless, so a browser tab and a native-frame window get no
1782
+ handles, no buttons and no CSS. With custom chrome, a drag on the top bar and
1783
+ a press on a resize handle go to the host's `startNativeDrag()` /
1784
+ `startNativeResize(edge)`. On Windows the native side hands them to the OS,
1785
+ so the window snaps, takes Win+arrows and resizes like any other.
1786
+ [`photino_host.md`](src/host/photino_host.md) has the native half: keep the
1787
+ frame styles, return the whole window from `WM_NCCALCSIZE`, start gestures with
1788
+ `WM_NCLBUTTONDOWN`. Don't use Photino's `SetChromeless`, which loses all of that.
1743
1789
 
1744
1790
  ## Peer dependencies
1745
1791
 
@@ -1816,6 +1862,11 @@ still drawing. A pie takes `{labels, values}`, a histogram `{values}`. The confi
1816
1862
  `buildOverlayShapes` gained `verticalLines: [{x, label?, color?, lineStyle?}]` for
1817
1863
  the same marker outside a tile.
1818
1864
 
1865
+ A chart tile's **Download PNG** (0.14.1) goes through the grid's `host`
1866
+ (`new TileGrid({ host })`): with `dialogs`, the native Save dialog — a save
1867
+ toasts where the file went, a cancel says nothing — and with no host, or a
1868
+ `saveFile` that answers null, the browser download it always was.
1869
+
1819
1870
  ## Styling
1820
1871
 
1821
1872
  Three stylesheets, and that is the whole CSS contract:
File without changes
package/css/base.css CHANGED
File without changes
package/css/flexdesk.css CHANGED
@@ -1920,6 +1920,40 @@ body.twm-dt-col-resizing {
1920
1920
  body.twm-window-maximized .twm-resize-handle {
1921
1921
  display: none;
1922
1922
  }
1923
+ /* Where the handles are. WindowChromeController creates them only for a
1924
+ window with custom chrome, so none of this reaches a browser tab. */
1925
+ .twm-resize-handle { background: transparent; }
1926
+ .twm-resize-handle.right { top: 0; right: 0; width: 6px; height: 100%; cursor: ew-resize; }
1927
+ .twm-resize-handle.left { top: 0; left: 0; width: 6px; height: 100%; cursor: ew-resize; }
1928
+ .twm-resize-handle.top { top: 0; left: 0; width: 100%; height: 6px; cursor: ns-resize; }
1929
+ .twm-resize-handle.bottom { bottom: 0; left: 0; width: 100%; height: 6px; cursor: ns-resize; }
1930
+ .twm-resize-handle.corner { width: 12px; height: 12px; z-index: 10000; }
1931
+ .twm-resize-handle.corner.br { bottom: 0; right: 0; cursor: nwse-resize; }
1932
+ .twm-resize-handle.corner.tl { top: 0; left: 0; cursor: nwse-resize; }
1933
+ .twm-resize-handle.corner.bl { bottom: 0; left: 0; cursor: nesw-resize; }
1934
+ .twm-resize-handle.corner.tr { top: 0; right: 0; cursor: nesw-resize; }
1935
+ /* Minimise, maximise/restore, close: drawn by WindowChromeController at the
1936
+ right of the top bar, for a window with custom chrome only. */
1937
+ .twm-window-controls {
1938
+ display: flex;
1939
+ align-items: stretch;
1940
+ align-self: stretch;
1941
+ margin-left: 6px;
1942
+ }
1943
+ .twm-window-controls__btn {
1944
+ width: 46px;
1945
+ border: 0;
1946
+ padding: 0;
1947
+ background: transparent;
1948
+ color: var(--text-secondary, #ccc);
1949
+ display: flex;
1950
+ align-items: center;
1951
+ justify-content: center;
1952
+ cursor: default;
1953
+ }
1954
+ .twm-window-controls__btn .material-symbols-outlined { font-size: 18px; }
1955
+ .twm-window-controls__btn:hover { background: rgba(255, 255, 255, 0.08); }
1956
+ .twm-window-controls__btn--close:hover { background: #c42b1c; color: #fff; }
1923
1957
  /* Shared sidebar controls (filter + icon buttons) - used by data, functions, etc. */
1924
1958
  .twm-sidebar-controls {
1925
1959
  display: flex;
package/css/overrides.css CHANGED
File without changes
package/css/reset.css CHANGED
File without changes
package/css/tokens.css CHANGED
File without changes
package/dist/canvas.js CHANGED
File without changes
File without changes
package/dist/charts.js CHANGED
@@ -42,10 +42,10 @@ import {
42
42
  strideIndices,
43
43
  uid,
44
44
  updateChart
45
- } from "./chunk-IYMNDPWH.js";
45
+ } from "./chunk-RQM5Z2MU.js";
46
46
  import {
47
47
  createRafResizeObserver
48
- } from "./chunk-M2L4XW2U.js";
48
+ } from "./chunk-FBGP5KN5.js";
49
49
  import {
50
50
  ManagedWindow
51
51
  } from "./chunk-6JSOVNID.js";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -683,6 +683,7 @@ var DataTable = class {
683
683
  onRowContextMenu: null,
684
684
  onCellContextMenu: null,
685
685
  showExportButton: false,
686
+ exportFilename: null,
686
687
  // The host port. TOP LEVEL, deliberately — NOT inside `services`,
687
688
  // which most call sites never pass. Supplies the native save
688
689
  // dialog for downloadCSV(); absent => Blob fallback.
@@ -2400,7 +2401,7 @@ var DataTable = class {
2400
2401
  const displayedRows = isServerSide ? rows.length : Math.min(pageSize, effectiveTotal - offset);
2401
2402
  const endRow = Math.min(offset + displayedRows, effectiveTotal);
2402
2403
  const totalPages = Math.max(1, Math.ceil(effectiveTotal / pageSize));
2403
- if (totalPages <= 1 && !isFiltered) return null;
2404
+ if (totalPages <= 1 && !isFiltered) return this._createExportOnlyStrip();
2404
2405
  const currentPage = Math.floor(offset / pageSize) + 1;
2405
2406
  const hasPrev = offset > 0;
2406
2407
  const hasNext = offset + pageSize < effectiveTotal;
@@ -2471,15 +2472,33 @@ var DataTable = class {
2471
2472
  el.appendChild(lastBtn);
2472
2473
  el.appendChild(jumpInput);
2473
2474
  el.appendChild(jumpBtn);
2474
- if (this.config.showExportButton) {
2475
- const exportBtn = this._createPaginationBtn(
2476
- "download",
2477
- "Download visible rows as CSV",
2478
- false,
2479
- () => this.downloadCSV("data.csv")
2480
- );
2481
- el.appendChild(exportBtn);
2482
- }
2475
+ if (this.config.showExportButton) el.appendChild(this._createExportBtn());
2476
+ return el;
2477
+ }
2478
+ /** The export button: downloadCSV() under the configured file name. */
2479
+ _createExportBtn() {
2480
+ const name = this.config.exportFilename;
2481
+ const filename = (typeof name === "function" ? name(this) : name) || "data.csv";
2482
+ return this._createPaginationBtn(
2483
+ "download",
2484
+ "Download visible rows as CSV",
2485
+ false,
2486
+ () => this.downloadCSV(filename)
2487
+ );
2488
+ }
2489
+ /**
2490
+ * The strip on a table with one page: nothing, as always, unless the export
2491
+ * button needs somewhere to be. Then the button alone, with no page
2492
+ * buttons (0.14.1).
2493
+ */
2494
+ _createExportOnlyStrip() {
2495
+ if (!this.config.showExportButton) return null;
2496
+ const el = document.createElement("div");
2497
+ el.className = "twm-pagination-controls twm-pagination-controls--export-only";
2498
+ el.style.cssText = "display:flex; align-items:center; gap:6px; padding:2px 8px; border-bottom:1px solid #2a2a2a; font-size:11px;";
2499
+ const spacer = document.createElement("div");
2500
+ spacer.style.flex = "1";
2501
+ el.append(spacer, this._createExportBtn());
2483
2502
  return el;
2484
2503
  }
2485
2504
  _createPaginationBtn(icon, tooltip, disabled, onClick, textLabel = null) {
@@ -4277,8 +4296,8 @@ var DataTable = class {
4277
4296
  const pn = this._pageNav({ offset, held: drawn, total, hasMore: hasMoreKnown, pageSize });
4278
4297
  const { hasPrev, hasNext, page } = pn;
4279
4298
  const totalPages = pn.pages;
4280
- if (known && totalPages <= 1 && !isFiltered && !hasPrev) return null;
4281
- if (!known && !hasPrev && !hasNext) return null;
4299
+ if (known && totalPages <= 1 && !isFiltered && !hasPrev) return this._createExportOnlyStrip();
4300
+ if (!known && !hasPrev && !hasNext) return this._createExportOnlyStrip();
4282
4301
  const maxJump = Number.isFinite(c.maxJumpOffset) ? c.maxJumpOffset : null;
4283
4302
  const go = (newOffset) => {
4284
4303
  if (source) {
@@ -4372,14 +4391,7 @@ var DataTable = class {
4372
4391
  }, "Go");
4373
4392
  jumpBtn.dataset.pager = "go";
4374
4393
  el.append(info, spacer, firstBtn, prevBtn, pageInfo, nextBtn, lastBtn, jumpInput, jumpBtn);
4375
- if (c.showExportButton) {
4376
- el.appendChild(this._createPaginationBtn(
4377
- "download",
4378
- "Download visible rows as CSV",
4379
- false,
4380
- () => this.downloadCSV("data.csv")
4381
- ));
4382
- }
4394
+ if (c.showExportButton) el.appendChild(this._createExportBtn());
4383
4395
  return el;
4384
4396
  }
4385
4397
  // ─────────────────────────────────────────────────────────────────
@@ -6168,4 +6180,4 @@ export {
6168
6180
  resolvePaging,
6169
6181
  DataTable
6170
6182
  };
6171
- //# sourceMappingURL=chunk-M2L4XW2U.js.map
6183
+ //# sourceMappingURL=chunk-FBGP5KN5.js.map