remosidian 0.1.7 → 0.1.9
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 +8 -0
- package/dist/remosidian.mjs +66 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/remosidian.mjs
CHANGED
|
@@ -21149,7 +21149,7 @@ function runFileBackedPluginTurn(input, prompt, options, onDelta) {
|
|
|
21149
21149
|
}
|
|
21150
21150
|
//# sourceMappingURL=chat-plugin-runtime.js.map
|
|
21151
21151
|
;// CONCATENATED MODULE: ../../packages/remosidian-server/dist/version.js
|
|
21152
|
-
const VERSION = '0.1.
|
|
21152
|
+
const VERSION = '0.1.9';
|
|
21153
21153
|
//# sourceMappingURL=version.js.map
|
|
21154
21154
|
;// CONCATENATED MODULE: ../../packages/remosidian-server/dist/chat-runtime.js
|
|
21155
21155
|
|
|
@@ -26913,7 +26913,7 @@ function groupValues(task, groupBy, labels = {}) {
|
|
|
26913
26913
|
const index = task.file.lastIndexOf('/');
|
|
26914
26914
|
return [index < 0 ? labels.root || 'Root' : task.file.slice(0, index)];
|
|
26915
26915
|
}
|
|
26916
|
-
function
|
|
26916
|
+
function timeline_stackTimelineItems(items) {
|
|
26917
26917
|
const lanes = [];
|
|
26918
26918
|
const sorted = [...items].sort((left, right) => left.startDay - right.startDay || right.durationDays - left.durationDays);
|
|
26919
26919
|
const pushLane = (lane) => {
|
|
@@ -26959,7 +26959,7 @@ function stackTimelineItems(items) {
|
|
|
26959
26959
|
return { items: result, stackCount };
|
|
26960
26960
|
}
|
|
26961
26961
|
function buildTaskTimelineData(tasks, options) {
|
|
26962
|
-
const range = buildTaskTimelineRange(options.anchor, options.zoom);
|
|
26962
|
+
const range = options.range ?? buildTaskTimelineRange(options.anchor, options.zoom);
|
|
26963
26963
|
const groups = new Map();
|
|
26964
26964
|
const inboxTasks = [];
|
|
26965
26965
|
for (const task of tasks) {
|
|
@@ -26970,13 +26970,19 @@ function buildTaskTimelineData(tasks, options) {
|
|
|
26970
26970
|
inboxTasks.push(task);
|
|
26971
26971
|
continue;
|
|
26972
26972
|
}
|
|
26973
|
+
const taskGroups = groupValues(task, options.groupBy, options.labels);
|
|
26974
|
+
if (options.includeEmptyGroups) {
|
|
26975
|
+
for (const group of taskGroups)
|
|
26976
|
+
if (!groups.has(group))
|
|
26977
|
+
groups.set(group, []);
|
|
26978
|
+
}
|
|
26973
26979
|
if (window.end < range.from || window.start > range.to)
|
|
26974
26980
|
continue;
|
|
26975
26981
|
const visibleStart = window.start < range.from ? range.from : window.start;
|
|
26976
26982
|
const visibleEnd = window.end > range.to ? range.to : window.end;
|
|
26977
26983
|
const startDay = diffPlanningDays(range.from, visibleStart) ?? 0;
|
|
26978
26984
|
const durationDays = (diffPlanningDays(visibleStart, visibleEnd) ?? 0) + 1;
|
|
26979
|
-
for (const group of
|
|
26985
|
+
for (const group of taskGroups) {
|
|
26980
26986
|
const bucket = groups.get(group) ?? [];
|
|
26981
26987
|
bucket.push({ task, start: window.start, end: window.end, startDay, durationDays, stackIndex: 0 });
|
|
26982
26988
|
groups.set(group, bucket);
|
|
@@ -26985,12 +26991,65 @@ function buildTaskTimelineData(tasks, options) {
|
|
|
26985
26991
|
const rows = Array.from(groups.entries())
|
|
26986
26992
|
.sort(([left], [right]) => left.localeCompare(right))
|
|
26987
26993
|
.map(([title, items]) => {
|
|
26988
|
-
const stacked =
|
|
26989
|
-
return { id: title, title, color: timeline_colorFor(title), ...stacked };
|
|
26994
|
+
const stacked = timeline_stackTimelineItems(items);
|
|
26995
|
+
return { id: title, title, color: timeline_colorFor(options.groupBy === 'tag' ? title.split('/')[0] : title), ...stacked };
|
|
26990
26996
|
});
|
|
26991
26997
|
return { range, rows, inboxTasks: sortPlanningTasks(inboxTasks, options.sortBy) };
|
|
26992
26998
|
}
|
|
26993
26999
|
|
|
27000
|
+
;// CONCATENATED MODULE: ../../packages/task-core/dist/timeline-groups.js
|
|
27001
|
+
|
|
27002
|
+
/** Tag parents start expanded, nested parents start collapsed, matching Desktop. */
|
|
27003
|
+
function buildTaskTimelineGroups(rows, groupBy, toggled = new Set()) {
|
|
27004
|
+
if (groupBy !== 'tag')
|
|
27005
|
+
return rows.map((row) => ({ ...row, level: 0, hasChildren: false, expanded: true }));
|
|
27006
|
+
const nodes = new Map();
|
|
27007
|
+
const roots = [];
|
|
27008
|
+
for (const row of rows) {
|
|
27009
|
+
const parts = row.id.split('/');
|
|
27010
|
+
for (let level = 0; level < parts.length; level++) {
|
|
27011
|
+
const id = parts.slice(0, level + 1).join('/');
|
|
27012
|
+
if (!nodes.has(id)) {
|
|
27013
|
+
const node = { id, title: parts[level], color: row.color, level, items: [], children: [] };
|
|
27014
|
+
nodes.set(id, node);
|
|
27015
|
+
if (level === 0)
|
|
27016
|
+
roots.push(node);
|
|
27017
|
+
else
|
|
27018
|
+
nodes.get(parts.slice(0, level).join('/')).children.push(node);
|
|
27019
|
+
}
|
|
27020
|
+
}
|
|
27021
|
+
nodes.get(row.id).items = row.items;
|
|
27022
|
+
}
|
|
27023
|
+
const collect = (node) => {
|
|
27024
|
+
const unique = new Map();
|
|
27025
|
+
for (const item of [...node.items, ...node.children.flatMap(collect)]) {
|
|
27026
|
+
unique.set(`${item.task.id}:${item.start}:${item.end}`, item);
|
|
27027
|
+
}
|
|
27028
|
+
return [...unique.values()];
|
|
27029
|
+
};
|
|
27030
|
+
const result = [];
|
|
27031
|
+
const visit = (siblings) => {
|
|
27032
|
+
for (const node of siblings.sort((a, b) => a.title.localeCompare(b.title))) {
|
|
27033
|
+
const expanded = node.level === 0 ? !toggled.has(node.id) : toggled.has(node.id);
|
|
27034
|
+
const hasChildren = node.children.length > 0;
|
|
27035
|
+
const items = hasChildren && !expanded ? collect(node) : node.items;
|
|
27036
|
+
result.push({
|
|
27037
|
+
id: node.id,
|
|
27038
|
+
title: node.title,
|
|
27039
|
+
color: node.color,
|
|
27040
|
+
level: node.level,
|
|
27041
|
+
hasChildren,
|
|
27042
|
+
expanded,
|
|
27043
|
+
...stackTimelineItems(items),
|
|
27044
|
+
});
|
|
27045
|
+
if (hasChildren && expanded)
|
|
27046
|
+
visit(node.children);
|
|
27047
|
+
}
|
|
27048
|
+
};
|
|
27049
|
+
visit(roots);
|
|
27050
|
+
return result;
|
|
27051
|
+
}
|
|
27052
|
+
|
|
26994
27053
|
;// CONCATENATED MODULE: ../../packages/task-core/dist/views.js
|
|
26995
27054
|
|
|
26996
27055
|
const BUILT_IN_TASK_VIEWS = [
|
|
@@ -27477,6 +27536,7 @@ function updateTaskView(settings, viewId, patch) {
|
|
|
27477
27536
|
|
|
27478
27537
|
|
|
27479
27538
|
|
|
27539
|
+
|
|
27480
27540
|
;// CONCATENATED MODULE: ../../packages/query-core/dist/recordQueries.js
|
|
27481
27541
|
|
|
27482
27542
|
|