flexdesk 0.17.18 → 0.18.1
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 +91 -0
- package/README.md +1 -0
- package/css/flexdesk.css +7547 -5891
- package/css/reset.css +1 -1
- package/css/tokens.css +30 -1
- package/dist/charts.js +83 -13
- package/dist/charts.js.map +2 -2
- package/dist/chunk-3BLIVOFD.js +778 -0
- package/dist/chunk-3BLIVOFD.js.map +7 -0
- package/dist/{chunk-7OL6F2AM.js → chunk-4X4SY3CP.js} +7 -5
- package/dist/chunk-4X4SY3CP.js.map +7 -0
- package/dist/chunk-DNJ3N4T4.js +82 -0
- package/dist/chunk-DNJ3N4T4.js.map +7 -0
- package/dist/{chunk-PGZ4EHSE.js → chunk-HL3IIHU3.js} +501 -359
- package/dist/chunk-HL3IIHU3.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-XJNADRGR.js → chunk-NFZJ6P42.js} +188 -96
- package/dist/chunk-NFZJ6P42.js.map +7 -0
- 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-2Z2ENHR3.js → chunk-QRBOIUU3.js} +7 -8
- package/dist/chunk-QRBOIUU3.js.map +7 -0
- package/dist/chunk-QXAOTGCC.js +40 -0
- package/dist/chunk-QXAOTGCC.js.map +7 -0
- 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/editor.js +3 -2
- package/dist/editor.js.map +1 -1
- package/dist/flexdesk.css +7547 -5891
- 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 +30 -1
- package/dist/widgets.js +4146 -1199
- 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/charts.md +40 -0
- package/docs/components/chat-shell.md +204 -0
- package/docs/components/conversation.md +10 -0
- package/docs/components/filter-builder.md +292 -0
- package/docs/components/forms-and-dialogs.md +30 -0
- package/docs/components/git.md +355 -0
- package/docs/components/input-fields.md +191 -2
- package/docs/components/keymap.md +8 -0
- package/docs/components/menus.md +86 -2
- package/docs/components/panels-and-desktops.md +16 -5
- package/docs/components/shell.md +108 -1
- package/docs/components/workspace-picker.md +193 -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/charts/plot_config_editor.js +92 -6
- package/src/charts/plot_grid.js +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 +926 -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/context_menu.js +8 -2
- 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 +791 -0
- package/src/ui/components/filter_model.js +682 -0
- package/src/ui/components/inline_renamer.js +10 -5
- package/src/ui/components/managed_window.js +24 -47
- package/src/ui/components/modal.js +104 -117
- 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 +1253 -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/src/ui/utils/tooltip_service.js +81 -14
- package/widgets.js +12 -2
- package/css/base.css +0 -10547
- package/css/overrides.css +0 -2596
- package/dist/chunk-2Z2ENHR3.js.map +0 -7
- package/dist/chunk-7JI7HHSY.js +0 -107
- package/dist/chunk-7JI7HHSY.js.map +0 -7
- package/dist/chunk-7OL6F2AM.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/css/reset.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ════════════════════════════════════════════════════════════════════
|
|
2
|
-
|
|
2
|
+
reset.css — reset, body, scrollbars, headings.
|
|
3
3
|
|
|
4
4
|
Extracted from the inline block at the top of main_new.css so the
|
|
5
5
|
reset lives separately from the rest of the main stylesheet. Loaded
|
package/css/tokens.css
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
/* ── Text ───────────────────────────────────────────────────── */
|
|
77
77
|
--text-primary: #e0e0e0; /* primary body text */
|
|
78
78
|
--text-secondary: #cccccc; /* lighter secondary (e.g. tree-view rows) */
|
|
79
|
-
--text-body: #d4d4d4; /*
|
|
79
|
+
--text-body: #d4d4d4; /* the body default — between primary & secondary */
|
|
80
80
|
--text-muted: #888888; /* de-facto canonical muted gray (268+ literal uses) */
|
|
81
81
|
--text-dim: #666666;
|
|
82
82
|
--text-bright: #ffffff;
|
|
@@ -109,6 +109,20 @@
|
|
|
109
109
|
--color-danger-hover: #d85858;
|
|
110
110
|
--color-info: #2196f3;
|
|
111
111
|
|
|
112
|
+
/* ── Diff viewer and commit graph (@flexdesk/git) ──────────── */
|
|
113
|
+
--twm-diff-add-bg: rgb(137 209 133 / 9%);
|
|
114
|
+
--twm-diff-add-fg: #89d185;
|
|
115
|
+
--twm-diff-del-bg: rgb(244 135 113 / 9%);
|
|
116
|
+
--twm-diff-del-fg: #f48771;
|
|
117
|
+
--twm-git-lane-0: var(--accent-bright);
|
|
118
|
+
--twm-git-lane-1: #73c991;
|
|
119
|
+
--twm-git-lane-2: #e2b93d;
|
|
120
|
+
--twm-git-lane-3: #cc6633;
|
|
121
|
+
--twm-git-lane-4: #c586c0;
|
|
122
|
+
--twm-git-lane-5: #f14c4c;
|
|
123
|
+
--twm-git-lane-6: #4ec9b0;
|
|
124
|
+
--twm-git-lane-7: #569cd6;
|
|
125
|
+
|
|
112
126
|
/* ── Surface state overlays ────────────────────────────────── */
|
|
113
127
|
--state-hover: rgba(255, 255, 255, 0.05);
|
|
114
128
|
--state-active: rgba(255, 255, 255, 0.08);
|
|
@@ -116,6 +130,21 @@
|
|
|
116
130
|
/* A DataTable row or cell that has just arrived flashes from this to transparent. */
|
|
117
131
|
--twm-dt-new-bg: color-mix(in srgb, var(--accent-bright) 22%, transparent); /* rgba(0, 122, 204, 0.22) */
|
|
118
132
|
|
|
133
|
+
/* ── The page rail (chrome.rail: .twm-fl-bar, .twm-fl-item) ─── */
|
|
134
|
+
--twm-rail-width: 50px;
|
|
135
|
+
--twm-rail-item-height: 44px;
|
|
136
|
+
--twm-rail-icon-size: 22px;
|
|
137
|
+
--twm-rail-bg: #333333;
|
|
138
|
+
--twm-rail-icon: #9e9e9e; /* an item at rest */
|
|
139
|
+
--twm-rail-icon-on: var(--text-bright); /* hovered, and the active item with its bar */
|
|
140
|
+
|
|
141
|
+
/* The workspace picker's field (0.18.1). */
|
|
142
|
+
--twm-wspicker-field-icon: var(--accent-bright);
|
|
143
|
+
--twm-wspicker-field-focus-border: var(--accent-bright); /* focused by keyboard, and open */
|
|
144
|
+
--twm-wspicker-field-muted-icon: var(--text-muted); /* naming nothing */
|
|
145
|
+
--twm-wspicker-field-muted-style: italic;
|
|
146
|
+
--twm-wspicker-field-muted-opacity: 0.55;
|
|
147
|
+
|
|
119
148
|
/* ── Overlay scrollbars (installOverlayScrollbar) ─────────── */
|
|
120
149
|
--scrollbar-size: 6px;
|
|
121
150
|
--scrollbar-radius: 3px;
|
package/dist/charts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createTabs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HYJYYEPK.js";
|
|
4
4
|
import {
|
|
5
5
|
ALL_CHART_TYPES,
|
|
6
6
|
CHART_TYPES_2D,
|
|
@@ -55,20 +55,25 @@ import {
|
|
|
55
55
|
strideIndices,
|
|
56
56
|
uid,
|
|
57
57
|
updateChart
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-4X4SY3CP.js";
|
|
59
59
|
import {
|
|
60
60
|
AutocompleteField,
|
|
61
61
|
createRafResizeObserver
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-QRBOIUU3.js";
|
|
63
|
+
import "./chunk-VLOAI3HS.js";
|
|
63
64
|
import {
|
|
64
65
|
ColorField,
|
|
65
66
|
ManagedWindow,
|
|
66
67
|
ToggleField,
|
|
68
|
+
attachInputOptions
|
|
69
|
+
} from "./chunk-HL3IIHU3.js";
|
|
70
|
+
import {
|
|
67
71
|
selectBox
|
|
68
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-Q7BALEPX.js";
|
|
69
73
|
import "./chunk-HNU6MM2B.js";
|
|
70
74
|
import "./chunk-N7HC3ADV.js";
|
|
71
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-WVFGV5FT.js";
|
|
76
|
+
import "./chunk-QXAOTGCC.js";
|
|
72
77
|
import "./chunk-JYWURG5T.js";
|
|
73
78
|
|
|
74
79
|
// src/charts/data_series_plot_window.js
|
|
@@ -705,6 +710,7 @@ var CHART_TYPE_OPTIONS = Object.freeze([
|
|
|
705
710
|
{ group: "2D", options: CHART_TYPES_2D },
|
|
706
711
|
{ group: "3D", options: CHART_TYPES_3D }
|
|
707
712
|
]);
|
|
713
|
+
var HIDEABLE = Object.freeze(["3d", "stackGroup", "xAxis"]);
|
|
708
714
|
var SCALES = Object.freeze([{ value: "linear", label: "Linear" }, { value: "log", label: "Log" }]);
|
|
709
715
|
var POSITIONS = Object.freeze([{ value: "left", label: "Left" }, { value: "right", label: "Right" }]);
|
|
710
716
|
var DASHES = Object.freeze([
|
|
@@ -825,9 +831,15 @@ function renderPlotConfigEditor(container, config, options = {}) {
|
|
|
825
831
|
overlaySources: null,
|
|
826
832
|
seriesTransforms: null,
|
|
827
833
|
extraSeriesFields: null,
|
|
834
|
+
hide: [],
|
|
835
|
+
constantsProvider: null,
|
|
828
836
|
logger: null,
|
|
829
837
|
...options
|
|
830
838
|
};
|
|
839
|
+
for (const part of opts.hide) {
|
|
840
|
+
if (!HIDEABLE.includes(part)) throw new TypeError(`[plot config editor] cannot hide "${part}"`);
|
|
841
|
+
}
|
|
842
|
+
const hidden = new Set(opts.hide);
|
|
831
843
|
const editorId = `twm-plot-config-${++editorCount}`;
|
|
832
844
|
let fieldCount = 0;
|
|
833
845
|
let active = 0;
|
|
@@ -981,6 +993,7 @@ function renderPlotConfigEditor(container, config, options = {}) {
|
|
|
981
993
|
}
|
|
982
994
|
function normalise(sp) {
|
|
983
995
|
if (!sp.xAxis) sp.xAxis = { useTime: true, variable: "" };
|
|
996
|
+
if (hidden.has("xAxis")) sp.xAxis.useTime = true;
|
|
984
997
|
if (!Array.isArray(sp.yAxes) || !sp.yAxes.length) sp.yAxes = [makeDefaultYAxis(0)];
|
|
985
998
|
for (const axis of sp.yAxes) if (!Array.isArray(axis.series)) axis.series = [];
|
|
986
999
|
if (is3DChart(sp.chartType) && !sp.zAxis) sp.zAxis = makeZAxis();
|
|
@@ -1005,9 +1018,9 @@ function renderPlotConfigEditor(container, config, options = {}) {
|
|
|
1005
1018
|
{ placeholder: "Untitled" }
|
|
1006
1019
|
))),
|
|
1007
1020
|
section("Display", ...displayFields(sp)),
|
|
1008
|
-
section("X axis", ...xAxisFields(sp)),
|
|
1021
|
+
hidden.has("xAxis") ? null : section("X axis", ...xAxisFields(sp)),
|
|
1009
1022
|
section("Y axes", yAxesEditor(sp, is3D, overlaySources)),
|
|
1010
|
-
is3D ? section("Z axis", ...zAxisFields(sp)) : null,
|
|
1023
|
+
is3D && !hidden.has("3d") ? section("Z axis", ...zAxisFields(sp)) : null,
|
|
1011
1024
|
section("Reference lines", referenceLinesEditor(sp)),
|
|
1012
1025
|
section("Shaded bands", shadedBandsEditor(sp)),
|
|
1013
1026
|
transformsSection(sp)
|
|
@@ -1015,7 +1028,7 @@ function renderPlotConfigEditor(container, config, options = {}) {
|
|
|
1015
1028
|
}
|
|
1016
1029
|
function displayFields(sp) {
|
|
1017
1030
|
return [
|
|
1018
|
-
field("Chart type", select(CHART_TYPE_OPTIONS, sp.chartType ?? "line", (v) => {
|
|
1031
|
+
field("Chart type", select(hidden.has("3d") ? CHART_TYPES_2D : CHART_TYPE_OPTIONS, sp.chartType ?? "line", (v) => {
|
|
1019
1032
|
const was3D = is3DChart(sp.chartType);
|
|
1020
1033
|
sp.chartType = v;
|
|
1021
1034
|
const now3D = is3DChart(v);
|
|
@@ -1202,16 +1215,18 @@ function renderPlotConfigEditor(container, config, options = {}) {
|
|
|
1202
1215
|
field("Dash", select(DASHES, s.lineStyle ?? "solid", (v) => {
|
|
1203
1216
|
s.lineStyle = v;
|
|
1204
1217
|
notify();
|
|
1205
|
-
}, { label: "Dash" }))
|
|
1206
|
-
|
|
1218
|
+
}, { label: "Dash" }))
|
|
1219
|
+
);
|
|
1220
|
+
if (!hidden.has("stackGroup")) {
|
|
1221
|
+
fields.appendChild(field("Stack group", textInput(
|
|
1207
1222
|
s.stackGroup,
|
|
1208
1223
|
(v) => {
|
|
1209
1224
|
s.stackGroup = v || null;
|
|
1210
1225
|
notify();
|
|
1211
1226
|
},
|
|
1212
1227
|
{ placeholder: "None", label: "Stack group" }
|
|
1213
|
-
))
|
|
1214
|
-
|
|
1228
|
+
)));
|
|
1229
|
+
}
|
|
1215
1230
|
if (opts.extraSeriesFields) fields.appendChild(extraFields(sp, axis, s));
|
|
1216
1231
|
if (opts.overlaySources) fields.appendChild(overlayEditor(s, overlaySources));
|
|
1217
1232
|
row.append(head, fields);
|
|
@@ -1329,6 +1344,61 @@ function renderPlotConfigEditor(container, config, options = {}) {
|
|
|
1329
1344
|
});
|
|
1330
1345
|
return wrap;
|
|
1331
1346
|
}
|
|
1347
|
+
function constantValueField(line) {
|
|
1348
|
+
const wrap = el("div", "twm-plot-config__constant");
|
|
1349
|
+
const input = el("input", "twm-plot-config__input");
|
|
1350
|
+
input.type = "text";
|
|
1351
|
+
input.spellcheck = false;
|
|
1352
|
+
input.placeholder = "Number or name";
|
|
1353
|
+
input.setAttribute("aria-label", "Value");
|
|
1354
|
+
input.value = line.value ?? "";
|
|
1355
|
+
const now = el("span", "twm-plot-config__constant-value");
|
|
1356
|
+
wrap.append(input, now);
|
|
1357
|
+
const isNumber = (text) => text !== "" && Number.isFinite(Number(text));
|
|
1358
|
+
const sayValue = () => {
|
|
1359
|
+
const named = opts.constantsProvider().find((c) => c.name === input.value.trim());
|
|
1360
|
+
now.textContent = named ? `= ${named.value}` : "";
|
|
1361
|
+
};
|
|
1362
|
+
const settle = () => {
|
|
1363
|
+
const text = input.value.trim();
|
|
1364
|
+
const next = isNumber(text) ? Number(text) : text || null;
|
|
1365
|
+
sayValue();
|
|
1366
|
+
if (next === (line.value ?? null)) return;
|
|
1367
|
+
line.value = next;
|
|
1368
|
+
notify();
|
|
1369
|
+
};
|
|
1370
|
+
const offered = (query) => {
|
|
1371
|
+
const words = (query ?? "").trim().toLowerCase();
|
|
1372
|
+
const groups = /* @__PURE__ */ new Map();
|
|
1373
|
+
for (const c of opts.constantsProvider()) {
|
|
1374
|
+
const text = c.label ?? c.name;
|
|
1375
|
+
if (words && !`${c.name} ${text}`.toLowerCase().includes(words)) continue;
|
|
1376
|
+
if (!groups.has(c.group)) groups.set(c.group, []);
|
|
1377
|
+
groups.get(c.group).push({ value: c.name, label: text, hint: `= ${c.value}` });
|
|
1378
|
+
}
|
|
1379
|
+
return [...groups].flatMap(([group, rows]) => group ? [{ group, options: rows }] : rows);
|
|
1380
|
+
};
|
|
1381
|
+
const list = attachInputOptions(input, {
|
|
1382
|
+
options: offered,
|
|
1383
|
+
debounce: 0,
|
|
1384
|
+
autoHighlight: true,
|
|
1385
|
+
isCandidate: (typed) => isNumber(typed.trim()),
|
|
1386
|
+
openOnFocus: true,
|
|
1387
|
+
isCurrent: (option) => option.value === input.value.trim(),
|
|
1388
|
+
onPick: (option) => {
|
|
1389
|
+
input.value = option.value;
|
|
1390
|
+
settle();
|
|
1391
|
+
},
|
|
1392
|
+
onSettle: settle
|
|
1393
|
+
});
|
|
1394
|
+
input.addEventListener("change", settle);
|
|
1395
|
+
input.addEventListener("keydown", (event) => {
|
|
1396
|
+
if (event.key === "Enter") settle();
|
|
1397
|
+
});
|
|
1398
|
+
track(() => list.destroy());
|
|
1399
|
+
sayValue();
|
|
1400
|
+
return wrap;
|
|
1401
|
+
}
|
|
1332
1402
|
function referenceLinesEditor(sp) {
|
|
1333
1403
|
const axisOptions = sp.yAxes.map((a, i) => ({ value: a.id, label: a.label || `Y axis ${i + 1}` }));
|
|
1334
1404
|
return listEditor(sp, "referenceLines", {
|
|
@@ -1344,7 +1414,7 @@ function renderPlotConfigEditor(container, config, options = {}) {
|
|
|
1344
1414
|
},
|
|
1345
1415
|
{ label: "Axis" }
|
|
1346
1416
|
),
|
|
1347
|
-
numberInput(line.value, (v) => {
|
|
1417
|
+
opts.constantsProvider ? constantValueField(line) : numberInput(line.value, (v) => {
|
|
1348
1418
|
line.value = v;
|
|
1349
1419
|
notify();
|
|
1350
1420
|
}, { placeholder: "Value", label: "Value" }),
|