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.
- package/CHANGELOG.md +53 -0
- package/README.md +1 -0
- package/css/flexdesk.css +7544 -5916
- package/css/reset.css +1 -1
- package/css/tokens.css +23 -1
- package/dist/charts.js +10 -6
- package/dist/charts.js.map +1 -1
- package/dist/chunk-5W4EEKSK.js +778 -0
- package/dist/chunk-5W4EEKSK.js.map +7 -0
- package/dist/chunk-DNJ3N4T4.js +82 -0
- package/dist/chunk-DNJ3N4T4.js.map +7 -0
- package/dist/{chunk-REJ5HLIM.js → chunk-HYJYYEPK.js} +2 -2
- package/dist/{chunk-7U4IB65H.js → chunk-LLBJ2SJH.js} +5 -3
- package/dist/{chunk-7U4IB65H.js.map → chunk-LLBJ2SJH.js.map} +1 -1
- package/dist/{chunk-7OL6F2AM.js → chunk-P74F6I6P.js} +6 -4
- package/dist/{chunk-7OL6F2AM.js.map → chunk-P74F6I6P.js.map} +1 -1
- package/dist/chunk-PAI2ZUWV.js +260 -0
- package/dist/chunk-PAI2ZUWV.js.map +7 -0
- package/dist/chunk-Q7BALEPX.js +527 -0
- package/dist/chunk-Q7BALEPX.js.map +7 -0
- package/dist/chunk-QXAOTGCC.js +40 -0
- package/dist/chunk-QXAOTGCC.js.map +7 -0
- package/dist/{chunk-XJNADRGR.js → chunk-RKVYIXDC.js} +664 -91
- package/dist/chunk-RKVYIXDC.js.map +7 -0
- package/dist/{chunk-2Z2ENHR3.js → chunk-U5GKJUOC.js} +3 -3
- package/dist/{chunk-2Z2ENHR3.js.map → chunk-U5GKJUOC.js.map} +1 -1
- package/dist/chunk-UKP22RUG.js +219 -0
- package/dist/chunk-UKP22RUG.js.map +7 -0
- package/dist/chunk-VLOAI3HS.js +43 -0
- package/dist/chunk-VLOAI3HS.js.map +7 -0
- package/dist/{chunk-WUFLGETN.js → chunk-WVFGV5FT.js} +2 -39
- package/dist/{chunk-WUFLGETN.js.map → chunk-WVFGV5FT.js.map} +3 -3
- package/dist/{chunk-PGZ4EHSE.js → chunk-ZL3VKINP.js} +41 -390
- package/dist/chunk-ZL3VKINP.js.map +7 -0
- package/dist/editor.js +3 -2
- package/dist/editor.js.map +1 -1
- package/dist/flexdesk.css +7544 -5916
- package/dist/flow.js +29 -97
- package/dist/flow.js.map +3 -3
- package/dist/git.js +1356 -0
- package/dist/git.js.map +7 -0
- package/dist/reset.css +1 -1
- package/dist/tiles.js +20 -15
- package/dist/tiles.js.map +2 -2
- package/dist/tokens.css +23 -1
- package/dist/widgets.js +3967 -1188
- package/dist/widgets.js.map +4 -4
- package/dist/wm.js +120 -32
- package/dist/wm.js.map +2 -2
- package/docs/README.md +9 -4
- package/docs/best-practices.md +2 -2
- package/docs/components/chat-shell.md +198 -0
- package/docs/components/conversation.md +10 -0
- package/docs/components/filter-builder.md +246 -0
- package/docs/components/forms-and-dialogs.md +22 -0
- package/docs/components/git.md +355 -0
- package/docs/components/input-fields.md +167 -2
- package/docs/components/keymap.md +8 -0
- package/docs/components/menus.md +82 -2
- package/docs/components/panels-and-desktops.md +16 -5
- package/docs/components/shell.md +104 -1
- package/docs/components/workspace-picker.md +149 -0
- package/docs/concepts/building-and-packaging.md +2 -2
- package/docs/concepts/packages-and-entry-points.md +14 -13
- package/docs/concepts/state-guard.md +3 -3
- package/docs/quickstart.md +1 -1
- package/git.js +13 -0
- package/package.json +6 -1
- package/src/flow/kit/dom.js +28 -119
- package/src/flow/kit/step_picker.js +1 -1
- package/src/flow/kit/value_picker.js +1 -1
- package/src/flow/outline/menu.js +1 -1
- package/src/git/diff_viewer.js +212 -0
- package/src/git/diff_window.js +51 -0
- package/src/git/git_graph.js +401 -0
- package/src/git/git_ops.js +61 -0
- package/src/git/git_panel.js +755 -0
- package/src/git/index.js +9 -0
- package/src/git/line_diff.js +202 -0
- package/src/tiles/tile_base.js +5 -4
- package/src/tiling/desktops.js +10 -8
- package/src/tiling/keymap.js +6 -5
- package/src/tiling/kind_taxonomy.js +15 -2
- package/src/tiling/shell.js +124 -17
- package/src/tiling/tile_renderer.js +2 -3
- package/src/ui/components/action_dropdown.js +4 -78
- package/src/ui/components/anchored_layer.js +255 -0
- package/src/ui/components/chat_shell.js +920 -0
- package/src/ui/components/chat_state_machine.js +223 -0
- package/src/ui/components/choice_controls.js +45 -2
- package/src/ui/components/color_field.js +3 -2
- package/src/ui/components/color_list_field.js +3 -2
- package/src/ui/components/combobox.js +422 -0
- package/src/ui/components/conversation_view.js +17 -2
- package/src/ui/components/data_table.js +2 -2
- package/src/ui/components/filter_builder.js +766 -0
- package/src/ui/components/filter_model.js +614 -0
- package/src/ui/components/managed_window.js +24 -47
- package/src/ui/components/modal.js +79 -109
- package/src/ui/components/option_list.js +160 -0
- package/src/ui/components/popover.js +94 -0
- package/src/ui/components/recent_items.js +169 -0
- package/src/ui/components/select.js +322 -0
- package/src/ui/components/tag_input.js +77 -8
- package/src/ui/components/workspace_picker.js +1155 -0
- package/src/ui/utils/fire_event.js +17 -0
- package/src/ui/utils/focusable.js +25 -0
- package/src/ui/utils/modal_host.js +27 -0
- package/widgets.js +12 -2
- package/css/base.css +0 -10547
- package/css/overrides.css +0 -2596
- package/dist/chunk-7JI7HHSY.js +0 -107
- package/dist/chunk-7JI7HHSY.js.map +0 -7
- package/dist/chunk-MIW7D6WC.js +0 -526
- package/dist/chunk-MIW7D6WC.js.map +0 -7
- package/dist/chunk-PGZ4EHSE.js.map +0 -7
- package/dist/chunk-XJNADRGR.js.map +0 -7
- /package/dist/{chunk-REJ5HLIM.js.map → chunk-HYJYYEPK.js.map} +0 -0
package/dist/flow.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
openPopover
|
|
3
|
+
} from "./chunk-DNJ3N4T4.js";
|
|
4
4
|
import {
|
|
5
5
|
DataTable
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-U5GKJUOC.js";
|
|
7
|
+
import "./chunk-VLOAI3HS.js";
|
|
7
8
|
import {
|
|
8
9
|
choiceList,
|
|
9
10
|
selectBox,
|
|
10
11
|
shownValue,
|
|
11
12
|
toggleChips
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-WUFLGETN.js";
|
|
13
|
+
} from "./chunk-Q7BALEPX.js";
|
|
14
|
+
import "./chunk-QXAOTGCC.js";
|
|
15
15
|
import {
|
|
16
16
|
CONNECTOR_STRINGS,
|
|
17
17
|
CanvasAdapter,
|
|
@@ -161,91 +161,23 @@ function uid(stem = "flow") {
|
|
|
161
161
|
SEQ += 1;
|
|
162
162
|
return `twm-uid-${stem}-${SEQ}`;
|
|
163
163
|
}
|
|
164
|
-
var
|
|
165
|
-
var GAP = 4;
|
|
166
|
-
var ACTIVE = null;
|
|
164
|
+
var OPEN = [];
|
|
167
165
|
function closeFlowPopovers() {
|
|
168
|
-
|
|
166
|
+
OPEN[0]?.close("closed");
|
|
169
167
|
}
|
|
170
168
|
function openFlowPopover() {
|
|
171
|
-
return
|
|
172
|
-
}
|
|
173
|
-
function
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
ACTIVE?.close("replaced");
|
|
181
|
-
const pop = el("div", `twm-flow-popover${className ? ` ${className}` : ""}`);
|
|
182
|
-
pop.setAttribute("role", "dialog");
|
|
183
|
-
pop.setAttribute("aria-label", label || "");
|
|
184
|
-
pop.tabIndex = -1;
|
|
185
|
-
pop.appendChild(content);
|
|
186
|
-
(modalHost() || document.body).appendChild(pop);
|
|
187
|
-
let closed = false;
|
|
188
|
-
const place = () => {
|
|
189
|
-
if (closed) return;
|
|
190
|
-
const view = {
|
|
191
|
-
w: document.documentElement.clientWidth || window.innerWidth || 1024,
|
|
192
|
-
h: document.documentElement.clientHeight || window.innerHeight || 768
|
|
193
|
-
};
|
|
194
|
-
const a = anchor?.getBoundingClientRect?.() || { left: 0, top: 0, bottom: 0, right: 0 };
|
|
195
|
-
const box = pop.getBoundingClientRect();
|
|
196
|
-
let left = a.left;
|
|
197
|
-
if (left + box.width > view.w - EDGE && a.right - box.width >= EDGE) left = a.right - box.width;
|
|
198
|
-
let top = a.bottom + GAP;
|
|
199
|
-
if (top + box.height > view.h - EDGE && a.top - GAP - box.height >= EDGE) top = a.top - GAP - box.height;
|
|
200
|
-
left = Math.max(EDGE, Math.min(left, view.w - box.width - EDGE));
|
|
201
|
-
top = Math.max(EDGE, Math.min(top, view.h - box.height - EDGE));
|
|
202
|
-
pop.style.left = `${Math.round(left)}px`;
|
|
203
|
-
pop.style.top = `${Math.round(top)}px`;
|
|
204
|
-
};
|
|
205
|
-
const onPress = (ev) => {
|
|
206
|
-
if (pop.contains(ev.target)) return;
|
|
207
|
-
if (anchor && anchor.contains?.(ev.target)) return;
|
|
208
|
-
handle.close("outside");
|
|
209
|
-
};
|
|
210
|
-
const onKey = (ev) => {
|
|
211
|
-
if (ev.key !== "Escape") return;
|
|
212
|
-
ev.preventDefault();
|
|
213
|
-
ev.stopPropagation();
|
|
214
|
-
handle.close("escape");
|
|
215
|
-
};
|
|
216
|
-
const onResize = () => place();
|
|
217
|
-
const sized = typeof ResizeObserver === "function" ? new ResizeObserver(() => place()) : null;
|
|
218
|
-
const handle = {
|
|
219
|
-
el: pop,
|
|
220
|
-
anchor,
|
|
221
|
-
toggled: false,
|
|
222
|
-
reposition: place,
|
|
223
|
-
close(reason = "closed") {
|
|
224
|
-
if (closed) return;
|
|
225
|
-
closed = true;
|
|
226
|
-
const held = pop.contains(document.activeElement) || document.activeElement === document.body;
|
|
227
|
-
document.removeEventListener("pointerdown", onPress, true);
|
|
228
|
-
document.removeEventListener("mousedown", onPress, true);
|
|
229
|
-
pop.removeEventListener("keydown", onKey);
|
|
230
|
-
window.removeEventListener("resize", onResize);
|
|
231
|
-
sized?.disconnect();
|
|
232
|
-
pop.remove();
|
|
233
|
-
if (ACTIVE === handle) ACTIVE = null;
|
|
234
|
-
if (held && reason !== "blur" && anchor?.isConnected) anchor.focus?.({ preventScroll: true });
|
|
169
|
+
return OPEN.length ? OPEN[OPEN.length - 1].el : null;
|
|
170
|
+
}
|
|
171
|
+
function openPopover2({ className = "", onClose = null, ...rest }) {
|
|
172
|
+
const handle = openPopover({
|
|
173
|
+
...rest,
|
|
174
|
+
className: `twm-flow-popover${className ? ` ${className}` : ""}`,
|
|
175
|
+
onClose(reason) {
|
|
176
|
+
OPEN.splice(OPEN.indexOf(handle), 1);
|
|
235
177
|
onClose?.(reason);
|
|
236
178
|
}
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
setTimeout(() => {
|
|
240
|
-
if (closed) return;
|
|
241
|
-
document.addEventListener("pointerdown", onPress, true);
|
|
242
|
-
document.addEventListener("mousedown", onPress, true);
|
|
243
|
-
}, 0);
|
|
244
|
-
pop.addEventListener("keydown", onKey);
|
|
245
|
-
window.addEventListener("resize", onResize);
|
|
246
|
-
sized?.observe(pop);
|
|
247
|
-
place();
|
|
248
|
-
(focus || pop).focus?.({ preventScroll: true });
|
|
179
|
+
});
|
|
180
|
+
if (handle.el) OPEN.push(handle);
|
|
249
181
|
return handle;
|
|
250
182
|
}
|
|
251
183
|
function nextOption(listbox, current, step) {
|
|
@@ -2128,7 +2060,7 @@ function openValuePicker({
|
|
|
2128
2060
|
const to = ev.relatedTarget;
|
|
2129
2061
|
if (to && !root.contains(to) && to !== anchor) handle.close("blur");
|
|
2130
2062
|
});
|
|
2131
|
-
const handle =
|
|
2063
|
+
const handle = openPopover2({
|
|
2132
2064
|
anchor,
|
|
2133
2065
|
content: root,
|
|
2134
2066
|
label: title ?? say(S, "insertValue"),
|
|
@@ -2136,7 +2068,7 @@ function openValuePicker({
|
|
|
2136
2068
|
focus: search,
|
|
2137
2069
|
onClose: () => settle(result)
|
|
2138
2070
|
});
|
|
2139
|
-
if (handle.
|
|
2071
|
+
if (!handle.el) settle(null);
|
|
2140
2072
|
else paint();
|
|
2141
2073
|
done.close = () => handle.close("closed");
|
|
2142
2074
|
return done;
|
|
@@ -2739,7 +2671,7 @@ function openStepPicker({
|
|
|
2739
2671
|
const to = ev.relatedTarget;
|
|
2740
2672
|
if (to && !root.contains(to) && to !== anchor) handle.close("blur");
|
|
2741
2673
|
});
|
|
2742
|
-
const handle =
|
|
2674
|
+
const handle = openPopover2({
|
|
2743
2675
|
anchor,
|
|
2744
2676
|
content: root,
|
|
2745
2677
|
label: title ?? say(S, "addStep"),
|
|
@@ -2747,7 +2679,7 @@ function openStepPicker({
|
|
|
2747
2679
|
focus: search,
|
|
2748
2680
|
onClose: () => settle(result)
|
|
2749
2681
|
});
|
|
2750
|
-
if (handle.
|
|
2682
|
+
if (!handle.el) settle(null);
|
|
2751
2683
|
else filter();
|
|
2752
2684
|
done.close = () => handle.close("closed");
|
|
2753
2685
|
return done;
|
|
@@ -8377,7 +8309,7 @@ function openStepMenu({ anchor, label, items, strings = null, onClose = null })
|
|
|
8377
8309
|
break;
|
|
8378
8310
|
}
|
|
8379
8311
|
});
|
|
8380
|
-
const handle =
|
|
8312
|
+
const handle = openPopover2({
|
|
8381
8313
|
anchor,
|
|
8382
8314
|
content: root,
|
|
8383
8315
|
label: label || "",
|
|
@@ -8385,7 +8317,7 @@ function openStepMenu({ anchor, label, items, strings = null, onClose = null })
|
|
|
8385
8317
|
focus: enabled(root)[0] || root,
|
|
8386
8318
|
onClose: () => onClose?.()
|
|
8387
8319
|
});
|
|
8388
|
-
return { el: root, close: () => handle.close("closed"), toggled: handle.toggled };
|
|
8320
|
+
return { el: handle.el ? root : null, close: () => handle.close("closed"), toggled: handle.toggled };
|
|
8389
8321
|
}
|
|
8390
8322
|
|
|
8391
8323
|
// src/flow/outline/editor.js
|
|
@@ -9990,7 +9922,7 @@ var LANE_GEOMETRY = Object.freeze({
|
|
|
9990
9922
|
});
|
|
9991
9923
|
var CW = LANE_GEOMETRY.regular.width;
|
|
9992
9924
|
var CH = LANE_GEOMETRY.regular.height;
|
|
9993
|
-
var
|
|
9925
|
+
var GAP = LANE_GEOMETRY.regular.gap;
|
|
9994
9926
|
var LANE_PAD = LANE_GEOMETRY.regular.lanePad;
|
|
9995
9927
|
var LANE_GAP = LANE_GEOMETRY.regular.laneGap;
|
|
9996
9928
|
var LAYOUT_STRINGS = Object.freeze({
|
|
@@ -12088,7 +12020,7 @@ function createLaneEditor(host, options = {}) {
|
|
|
12088
12020
|
[...params.querySelectorAll("[data-parameter]")].find((c) => c.dataset.parameter === next)?.focus({ preventScroll: true });
|
|
12089
12021
|
return void 0;
|
|
12090
12022
|
});
|
|
12091
|
-
handle =
|
|
12023
|
+
handle = openPopover2({
|
|
12092
12024
|
anchor,
|
|
12093
12025
|
content: form,
|
|
12094
12026
|
label: editing ? say(S, "parameterTitle") : say(S, "addParameter"),
|
|
@@ -12159,7 +12091,7 @@ function createLaneEditor(host, options = {}) {
|
|
|
12159
12091
|
const next = items[(at + (ev.key === "ArrowDown" ? 1 : -1) + items.length) % items.length];
|
|
12160
12092
|
next?.focus();
|
|
12161
12093
|
});
|
|
12162
|
-
handle =
|
|
12094
|
+
handle = openPopover2({
|
|
12163
12095
|
anchor,
|
|
12164
12096
|
content: menu,
|
|
12165
12097
|
label: say(S, "stepMenu", titleOf2(id)),
|
|
@@ -12415,7 +12347,7 @@ export {
|
|
|
12415
12347
|
ID_OK,
|
|
12416
12348
|
LANE_ACTIONS,
|
|
12417
12349
|
CH as LANE_CH,
|
|
12418
|
-
|
|
12350
|
+
GAP as LANE_COLUMN_GAP,
|
|
12419
12351
|
CW as LANE_CW,
|
|
12420
12352
|
LANE_GAP,
|
|
12421
12353
|
LANE_GEOMETRY,
|
|
@@ -12499,7 +12431,7 @@ export {
|
|
|
12499
12431
|
normalisePipeline,
|
|
12500
12432
|
openFlowPopover,
|
|
12501
12433
|
openStepMenu as openOutlineStepMenu,
|
|
12502
|
-
openPopover,
|
|
12434
|
+
openPopover2 as openPopover,
|
|
12503
12435
|
openStepPicker,
|
|
12504
12436
|
openValuePicker,
|
|
12505
12437
|
flatRunOrder as outlineFlatOrder,
|