flexdesk 0.17.18 → 0.18.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 (118) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +1 -0
  3. package/css/flexdesk.css +7544 -5916
  4. package/css/reset.css +1 -1
  5. package/css/tokens.css +23 -1
  6. package/dist/charts.js +10 -6
  7. package/dist/charts.js.map +1 -1
  8. package/dist/chunk-5W4EEKSK.js +778 -0
  9. package/dist/chunk-5W4EEKSK.js.map +7 -0
  10. package/dist/chunk-DNJ3N4T4.js +82 -0
  11. package/dist/chunk-DNJ3N4T4.js.map +7 -0
  12. package/dist/{chunk-REJ5HLIM.js → chunk-HYJYYEPK.js} +2 -2
  13. package/dist/{chunk-7U4IB65H.js → chunk-LLBJ2SJH.js} +5 -3
  14. package/dist/{chunk-7U4IB65H.js.map → chunk-LLBJ2SJH.js.map} +1 -1
  15. package/dist/{chunk-7OL6F2AM.js → chunk-P74F6I6P.js} +6 -4
  16. package/dist/{chunk-7OL6F2AM.js.map → chunk-P74F6I6P.js.map} +1 -1
  17. package/dist/chunk-PAI2ZUWV.js +260 -0
  18. package/dist/chunk-PAI2ZUWV.js.map +7 -0
  19. package/dist/chunk-Q7BALEPX.js +527 -0
  20. package/dist/chunk-Q7BALEPX.js.map +7 -0
  21. package/dist/chunk-QXAOTGCC.js +40 -0
  22. package/dist/chunk-QXAOTGCC.js.map +7 -0
  23. package/dist/{chunk-XJNADRGR.js → chunk-RKVYIXDC.js} +664 -91
  24. package/dist/chunk-RKVYIXDC.js.map +7 -0
  25. package/dist/{chunk-2Z2ENHR3.js → chunk-U5GKJUOC.js} +3 -3
  26. package/dist/{chunk-2Z2ENHR3.js.map → chunk-U5GKJUOC.js.map} +1 -1
  27. package/dist/chunk-UKP22RUG.js +219 -0
  28. package/dist/chunk-UKP22RUG.js.map +7 -0
  29. package/dist/chunk-VLOAI3HS.js +43 -0
  30. package/dist/chunk-VLOAI3HS.js.map +7 -0
  31. package/dist/{chunk-WUFLGETN.js → chunk-WVFGV5FT.js} +2 -39
  32. package/dist/{chunk-WUFLGETN.js.map → chunk-WVFGV5FT.js.map} +3 -3
  33. package/dist/{chunk-PGZ4EHSE.js → chunk-ZL3VKINP.js} +41 -390
  34. package/dist/chunk-ZL3VKINP.js.map +7 -0
  35. package/dist/editor.js +3 -2
  36. package/dist/editor.js.map +1 -1
  37. package/dist/flexdesk.css +7544 -5916
  38. package/dist/flow.js +29 -97
  39. package/dist/flow.js.map +3 -3
  40. package/dist/git.js +1356 -0
  41. package/dist/git.js.map +7 -0
  42. package/dist/reset.css +1 -1
  43. package/dist/tiles.js +20 -15
  44. package/dist/tiles.js.map +2 -2
  45. package/dist/tokens.css +23 -1
  46. package/dist/widgets.js +3967 -1188
  47. package/dist/widgets.js.map +4 -4
  48. package/dist/wm.js +120 -32
  49. package/dist/wm.js.map +2 -2
  50. package/docs/README.md +9 -4
  51. package/docs/best-practices.md +2 -2
  52. package/docs/components/chat-shell.md +198 -0
  53. package/docs/components/conversation.md +10 -0
  54. package/docs/components/filter-builder.md +246 -0
  55. package/docs/components/forms-and-dialogs.md +22 -0
  56. package/docs/components/git.md +355 -0
  57. package/docs/components/input-fields.md +167 -2
  58. package/docs/components/keymap.md +8 -0
  59. package/docs/components/menus.md +82 -2
  60. package/docs/components/panels-and-desktops.md +16 -5
  61. package/docs/components/shell.md +104 -1
  62. package/docs/components/workspace-picker.md +149 -0
  63. package/docs/concepts/building-and-packaging.md +2 -2
  64. package/docs/concepts/packages-and-entry-points.md +14 -13
  65. package/docs/concepts/state-guard.md +3 -3
  66. package/docs/quickstart.md +1 -1
  67. package/git.js +13 -0
  68. package/package.json +6 -1
  69. package/src/flow/kit/dom.js +28 -119
  70. package/src/flow/kit/step_picker.js +1 -1
  71. package/src/flow/kit/value_picker.js +1 -1
  72. package/src/flow/outline/menu.js +1 -1
  73. package/src/git/diff_viewer.js +212 -0
  74. package/src/git/diff_window.js +51 -0
  75. package/src/git/git_graph.js +401 -0
  76. package/src/git/git_ops.js +61 -0
  77. package/src/git/git_panel.js +755 -0
  78. package/src/git/index.js +9 -0
  79. package/src/git/line_diff.js +202 -0
  80. package/src/tiles/tile_base.js +5 -4
  81. package/src/tiling/desktops.js +10 -8
  82. package/src/tiling/keymap.js +6 -5
  83. package/src/tiling/kind_taxonomy.js +15 -2
  84. package/src/tiling/shell.js +124 -17
  85. package/src/tiling/tile_renderer.js +2 -3
  86. package/src/ui/components/action_dropdown.js +4 -78
  87. package/src/ui/components/anchored_layer.js +255 -0
  88. package/src/ui/components/chat_shell.js +920 -0
  89. package/src/ui/components/chat_state_machine.js +223 -0
  90. package/src/ui/components/choice_controls.js +45 -2
  91. package/src/ui/components/color_field.js +3 -2
  92. package/src/ui/components/color_list_field.js +3 -2
  93. package/src/ui/components/combobox.js +422 -0
  94. package/src/ui/components/conversation_view.js +17 -2
  95. package/src/ui/components/data_table.js +2 -2
  96. package/src/ui/components/filter_builder.js +766 -0
  97. package/src/ui/components/filter_model.js +614 -0
  98. package/src/ui/components/managed_window.js +24 -47
  99. package/src/ui/components/modal.js +79 -109
  100. package/src/ui/components/option_list.js +160 -0
  101. package/src/ui/components/popover.js +94 -0
  102. package/src/ui/components/recent_items.js +169 -0
  103. package/src/ui/components/select.js +322 -0
  104. package/src/ui/components/tag_input.js +77 -8
  105. package/src/ui/components/workspace_picker.js +1155 -0
  106. package/src/ui/utils/fire_event.js +17 -0
  107. package/src/ui/utils/focusable.js +25 -0
  108. package/src/ui/utils/modal_host.js +27 -0
  109. package/widgets.js +12 -2
  110. package/css/base.css +0 -10547
  111. package/css/overrides.css +0 -2596
  112. package/dist/chunk-7JI7HHSY.js +0 -107
  113. package/dist/chunk-7JI7HHSY.js.map +0 -7
  114. package/dist/chunk-MIW7D6WC.js +0 -526
  115. package/dist/chunk-MIW7D6WC.js.map +0 -7
  116. package/dist/chunk-PGZ4EHSE.js.map +0 -7
  117. package/dist/chunk-XJNADRGR.js.map +0 -7
  118. /package/dist/{chunk-REJ5HLIM.js.map → chunk-HYJYYEPK.js.map} +0 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Fire a DOM event on `target`, built by `target`'s own window.
3
+ *
4
+ * `dispatchEvent` takes only an event from the target's realm. A bare
5
+ * `new Event(...)` reads whatever global the running code sees, and that is a
6
+ * different realm from the element's in an iframe, and under jsdom on any Node
7
+ * with a global `Event` of its own: there it throws "parameter 1 is not of type
8
+ * 'Event'" in the middle of whatever fired it.
9
+ *
10
+ * @param {EventTarget & Node} target an element
11
+ * @param {string} type
12
+ * @param {CustomEventInit} [init]
13
+ */
14
+ export function fireEvent(target, type, init) {
15
+ const view = target.ownerDocument.defaultView;
16
+ target.dispatchEvent(new view.CustomEvent(type, init));
17
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Collect the focusable elements inside `root`, in DOM order: what a focus trap
3
+ * cycles through. Hidden and zero-size elements are skipped, since Tab visits only
4
+ * what the reader can see.
5
+ *
6
+ * @param {HTMLElement|null} root
7
+ * @returns {HTMLElement[]}
8
+ */
9
+ export function collectFocusable(root) {
10
+ if (!root) return [];
11
+ const sel = [
12
+ 'a[href]',
13
+ 'button:not([disabled])',
14
+ 'input:not([disabled]):not([type="hidden"])',
15
+ 'select:not([disabled])',
16
+ 'textarea:not([disabled])',
17
+ '[tabindex]:not([tabindex="-1"])',
18
+ ].join(',');
19
+ return Array.from(root.querySelectorAll(sel)).filter((el) => {
20
+ if (el.hidden) return false;
21
+ if (el.closest('[hidden]')) return false;
22
+ const r = el.getBoundingClientRect();
23
+ return r.width > 0 || r.height > 0;
24
+ });
25
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * C25. WHERE A DIALOG OR A FLOATING PANEL OPENS, when the application spans more
3
+ * than one window.
4
+ *
5
+ * Every modal is a `ManagedWindow` with no `container`, so it mounts into
6
+ * `document.body` — and "document" is the document the MODULE was loaded in. A
7
+ * consumer that opens a second browser window with `window.open` and builds its
8
+ * DOM from the opener's realm (which is how a pop-out grid works: same modules,
9
+ * same JS context, a different document) therefore gets its dialogs in the
10
+ * window it popped OUT of. The user presses "Add column" on their second monitor
11
+ * and a dialog appears on the first, behind whatever is there.
12
+ *
13
+ * Passing a container at each call site was the other option and it is worse:
14
+ * twenty-one of them across eleven files, every one of which would have to be
15
+ * given a document it has no other reason to know about, and any one missed is
16
+ * this bug again with no way to see it from here.
17
+ *
18
+ * So the HOST is ambient and the consumer sets it when its focus moves. Null —
19
+ * every consumer today — means `document.body`, exactly as before.
20
+ *
21
+ * A module of its own because modals and the anchored layers both ask it, and
22
+ * `openForm` draws its combobox on an anchored layer. `modal.js` re-exports both
23
+ * names: that is where they are public.
24
+ */
25
+ let host = null;
26
+ export function setModalHost(el) { host = el || null; }
27
+ export function modalHost() { return host; }
package/widgets.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @flexdesk/widgets — The widget set: DataTable, modals, managed windows, toasts, trees,
3
- * context menus, menu bars, panels, section stacks, a step wizard, the help modal and the notification centre.
3
+ * context menus, menu bars, panels, section stacks, a rich select, a combobox, a popover, a step wizard, a workspace picker, a filter builder, an assistant chat shell, the help modal and the notification centre.
4
4
  *
5
5
  * GENERATED by scripts/gen_barrels.py. Do not hand-edit.
6
6
  *
7
- * 60 modules.
7
+ * 71 modules.
8
8
  */
9
9
 
10
10
  export * from './src/ui/base/component_base.js';
@@ -14,6 +14,7 @@ export * from './src/ui/components/about_dialog.js';
14
14
  export * from './src/ui/components/alert_log.js';
15
15
  export * from './src/ui/components/alerts_pane.js';
16
16
  export * from './src/ui/components/action_dropdown.js';
17
+ export * from './src/ui/components/anchored_layer.js';
17
18
  export * from './src/ui/components/attribute_list_editor.js';
18
19
  export * from './src/ui/components/autocomplete_field.js';
19
20
  export * from './src/ui/components/category_picker.js';
@@ -23,24 +24,32 @@ export * from './src/ui/components/cell_selection.js';
23
24
  export * from './src/ui/components/color_field.js';
24
25
  export * from './src/ui/components/color_list_field.js';
25
26
  export * from './src/ui/components/column_fit.js';
27
+ export * from './src/ui/components/combobox.js';
26
28
  export * from './src/ui/components/computing_status_window.js';
27
29
  export * from './src/ui/components/confirm_dialog.js';
28
30
  export * from './src/ui/components/context_menu.js';
31
+ export * from './src/ui/components/chat_shell.js';
32
+ export * from './src/ui/components/chat_state_machine.js';
29
33
  export * from './src/ui/components/conversation_view.js';
30
34
  export * from './src/ui/components/data_table.js';
31
35
  export * from './src/ui/components/detail_header.js';
32
36
  export * from './src/ui/components/document_outline.js';
33
37
  export * from './src/ui/components/drag_reorder.js';
34
38
  export * from './src/ui/components/fact_table.js';
39
+ export * from './src/ui/components/filter_builder.js';
40
+ export * from './src/ui/components/filter_model.js';
35
41
  export * from './src/ui/components/gallery_picker.js';
36
42
  export * from './src/ui/components/inline_renamer.js';
37
43
  export * from './src/ui/components/managed_window.js';
38
44
  export * from './src/ui/components/menu_bar.js';
39
45
  export * from './src/ui/components/modal.js';
40
46
  export * from './src/ui/components/notification_history.js';
47
+ export * from './src/ui/components/popover.js';
41
48
  export * from './src/ui/components/progress.js';
49
+ export * from './src/ui/components/recent_items.js';
42
50
  export * from './src/ui/components/record_list.js';
43
51
  export * from './src/ui/components/section_stack.js';
52
+ export * from './src/ui/components/select.js';
44
53
  export * from './src/ui/components/series.js';
45
54
  export * from './src/ui/components/settings_view.js';
46
55
  export * from './src/ui/components/slide_out_panel.js';
@@ -56,6 +65,7 @@ export * from './src/ui/components/tree_view.js';
56
65
  export * from './src/ui/components/tsv.js';
57
66
  export * from './src/ui/components/window_taskbar.js';
58
67
  export * from './src/ui/components/wizard.js';
68
+ export * from './src/ui/components/workspace_picker.js';
59
69
  export * from './src/ui/controllers/window_chrome_controller.js';
60
70
  export * from './src/ui/notification_center.js';
61
71
  export * from './src/ui/utils/auto_scrollbars.js';