@abraca/nuxt 2.36.0 → 2.37.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/dist/module.d.mts +6 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/ADocPickModal.vue +1 -1
- package/dist/runtime/components/ADocSubPageList.d.vue.ts +46 -0
- package/dist/runtime/components/ADocSubPageList.vue +1006 -0
- package/dist/runtime/components/ADocSubPageList.vue.d.ts +46 -0
- package/dist/runtime/components/ADocumentTree.vue +3 -2
- package/dist/runtime/components/AEditor.d.vue.ts +9 -0
- package/dist/runtime/components/AEditor.vue +14 -2
- package/dist/runtime/components/AEditor.vue.d.ts +9 -0
- package/dist/runtime/components/AIconPicker.vue +27 -180
- package/dist/runtime/components/ANodePanel.d.vue.ts +8 -5
- package/dist/runtime/components/ANodePanel.vue +1 -1
- package/dist/runtime/components/ANodePanel.vue.d.ts +8 -5
- package/dist/runtime/components/AWindowLayer.vue +4 -2
- package/dist/runtime/components/aware/AMedia.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AMedia.vue.d.ts +1 -1
- package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +2 -2
- package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +2 -2
- package/dist/runtime/components/editor/ADocSuggestMenu.vue +1 -1
- package/dist/runtime/components/editor/ALocationPickerPopover.vue +31 -16
- package/dist/runtime/components/renderers/ACalendarRenderer.d.vue.ts +1 -0
- package/dist/runtime/components/renderers/ACalendarRenderer.vue +309 -68
- package/dist/runtime/components/renderers/ACalendarRenderer.vue.d.ts +1 -0
- package/dist/runtime/components/renderers/AChecklistRenderer.vue +259 -40
- package/dist/runtime/components/renderers/ADashboardRenderer.vue +493 -89
- package/dist/runtime/components/renderers/AGraphRenderer.d.vue.ts +2 -0
- package/dist/runtime/components/renderers/AGraphRenderer.vue +2113 -576
- package/dist/runtime/components/renderers/AGraphRenderer.vue.d.ts +2 -0
- package/dist/runtime/components/renderers/AKanbanRenderer.vue +460 -86
- package/dist/runtime/components/renderers/AMapRenderer.d.vue.ts +7 -1
- package/dist/runtime/components/renderers/AMapRenderer.vue +999 -166
- package/dist/runtime/components/renderers/AMapRenderer.vue.d.ts +7 -1
- package/dist/runtime/components/renderers/AOutlineRenderer.d.vue.ts +2 -0
- package/dist/runtime/components/renderers/AOutlineRenderer.vue +285 -81
- package/dist/runtime/components/renderers/AOutlineRenderer.vue.d.ts +2 -0
- package/dist/runtime/components/renderers/AOverviewRenderer.vue +3 -2
- package/dist/runtime/components/renderers/ASheetsRenderer.client.vue +255 -87
- package/dist/runtime/components/renderers/ATimelineRenderer.d.vue.ts +1 -0
- package/dist/runtime/components/renderers/ATimelineRenderer.vue +224 -31
- package/dist/runtime/components/renderers/ATimelineRenderer.vue.d.ts +1 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.d.vue.ts +8 -0
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue +12 -1
- package/dist/runtime/components/renderers/calendar/ACalendarDayCell.vue.d.ts +8 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue +15 -3
- package/dist/runtime/components/renderers/calendar/ACalendarEventChip.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/calendar/ACalendarMonthView.d.vue.ts +14 -0
- package/dist/runtime/components/renderers/calendar/ACalendarMonthView.vue +6 -1
- package/dist/runtime/components/renderers/calendar/ACalendarMonthView.vue.d.ts +14 -0
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.d.vue.ts +6 -6
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue +25 -7
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue.d.ts +6 -6
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.d.vue.ts +2 -2
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.vue.d.ts +2 -2
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.d.vue.ts +6 -0
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue +130 -23
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue.d.ts +6 -0
- package/dist/runtime/components/renderers/timeline/ATimelineAxis.vue +5 -3
- package/dist/runtime/components/renderers/timeline/ATimelineBar.vue +1 -1
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.d.vue.ts +0 -2
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue +16 -14
- package/dist/runtime/components/renderers/timeline/ATimelineBarArea.vue.d.ts +0 -2
- package/dist/runtime/components/renderers/timeline/ATimelineLabelPanel.vue +4 -2
- package/dist/runtime/composables/useCalendarView.js +34 -11
- package/dist/runtime/composables/useConnectionStatus.d.ts +1 -1
- package/dist/runtime/composables/useGraphReferenceEdges.d.ts +26 -0
- package/dist/runtime/composables/useGraphReferenceEdges.js +138 -0
- package/dist/runtime/composables/useGraphSim.d.ts +79 -0
- package/dist/runtime/composables/useGraphSim.js +231 -0
- package/dist/runtime/composables/useSheetsDependencyGraph.d.ts +26 -0
- package/dist/runtime/composables/useSheetsDependencyGraph.js +76 -0
- package/dist/runtime/composables/useSheetsFormulas.d.ts +4 -3
- package/dist/runtime/composables/useSheetsFormulas.js +575 -26
- package/dist/runtime/composables/useTimelineView.d.ts +4 -0
- package/dist/runtime/composables/useTimelineView.js +45 -11
- package/dist/runtime/composables/useWindowManager.d.ts +4 -0
- package/dist/runtime/composables/useWindowManager.js +11 -0
- package/dist/runtime/utils/dateField.d.ts +17 -0
- package/dist/runtime/utils/dateField.js +19 -0
- package/dist/runtime/utils/itemLabel.d.ts +27 -0
- package/dist/runtime/utils/itemLabel.js +8 -0
- package/dist/runtime/utils/localDate.d.ts +15 -0
- package/dist/runtime/utils/localDate.js +16 -0
- package/dist/runtime/utils/lucideIcons.d.ts +16 -10
- package/dist/runtime/utils/lucideIcons.js +1391 -69
- package/dist/runtime/utils/resolveDocColor.d.ts +7 -0
- package/dist/runtime/utils/resolveDocColor.js +32 -0
- package/dist/runtime/utils/resolveDocIcon.d.ts +10 -0
- package/dist/runtime/utils/resolveDocIcon.js +44 -0
- package/dist/runtime/utils/rowEdges.d.ts +22 -0
- package/dist/runtime/utils/rowEdges.js +29 -0
- package/package.json +1 -1
|
@@ -3,6 +3,10 @@ export interface AxisLabel {
|
|
|
3
3
|
label: string;
|
|
4
4
|
offset: number;
|
|
5
5
|
tier: 'coarse' | 'fine';
|
|
6
|
+
/** Coarse context label pinned to the viewport's left edge. */
|
|
7
|
+
sticky?: boolean;
|
|
8
|
+
/** Where to render the text (defaults to `offset`); used to pin sticky labels. */
|
|
9
|
+
labelOffset?: number;
|
|
6
10
|
}
|
|
7
11
|
export interface UseTimelineViewOptions {
|
|
8
12
|
containerRef: Ref<HTMLElement | null>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
|
|
2
|
+
import { tlStart, tlEnd } from "../utils/dateField.js";
|
|
2
3
|
const TIER_MILLENNIA = 5e-3;
|
|
3
4
|
const TIER_CENTURIES = 0.05;
|
|
4
5
|
const TIER_DECADES = 0.5;
|
|
@@ -9,6 +10,7 @@ const ZOOM_MIN = 5e-4;
|
|
|
9
10
|
const ZOOM_MAX = 120;
|
|
10
11
|
const ZOOM_WHEEL_FACTOR = 1.08;
|
|
11
12
|
const PAN_KEYBOARD_PX = 100;
|
|
13
|
+
const STICKY_PAD = 6;
|
|
12
14
|
const MS_PER_DAY = 24 * 60 * 60 * 1e3;
|
|
13
15
|
function toDateStr(d) {
|
|
14
16
|
const y = d.getFullYear();
|
|
@@ -47,8 +49,8 @@ export function useTimelineView(options) {
|
|
|
47
49
|
let maxDate = -Infinity;
|
|
48
50
|
let hasAnyDate = false;
|
|
49
51
|
for (const item of items) {
|
|
50
|
-
const start = item.meta
|
|
51
|
-
const end = item.meta
|
|
52
|
+
const start = tlStart(item.meta);
|
|
53
|
+
const end = tlEnd(item.meta);
|
|
52
54
|
if (start) {
|
|
53
55
|
const t = new Date(start).getTime();
|
|
54
56
|
if (!Number.isNaN(t)) {
|
|
@@ -286,31 +288,62 @@ export function useTimelineView(options) {
|
|
|
286
288
|
addYearTierLabels(labels, start, end, 1e3, "fine");
|
|
287
289
|
} else if (ppd < TIER_CENTURIES) {
|
|
288
290
|
addYearTierLabels(labels, start, end, 100, "fine");
|
|
289
|
-
|
|
291
|
+
addCoarseTier(labels, start, "year", 1e3);
|
|
290
292
|
} else if (ppd < TIER_DECADES) {
|
|
291
293
|
addYearTierLabels(labels, start, end, 10, "fine");
|
|
292
|
-
|
|
294
|
+
addCoarseTier(labels, start, "year", 100);
|
|
293
295
|
} else if (ppd < TIER_YEARS) {
|
|
294
296
|
addYearTierLabels(labels, start, end, 1, "fine");
|
|
295
|
-
|
|
297
|
+
addCoarseTier(labels, start, "year", 10);
|
|
296
298
|
} else if (ppd < TIER_MONTHS) {
|
|
297
299
|
addMonthLabels(labels, start, end, "fine");
|
|
298
|
-
|
|
300
|
+
addCoarseTier(labels, start, "year", 1);
|
|
299
301
|
} else if (ppd < TIER_WEEKS) {
|
|
300
302
|
addWeekLabels(labels, start, end, "fine");
|
|
301
|
-
|
|
303
|
+
addCoarseTier(labels, start, "month");
|
|
302
304
|
} else {
|
|
303
305
|
addDayLabels(labels, start, end, "fine");
|
|
304
|
-
|
|
306
|
+
addCoarseTier(labels, start, "month");
|
|
305
307
|
}
|
|
306
308
|
return labels;
|
|
307
309
|
});
|
|
310
|
+
function addCoarseTier(labels, start, kind, step = 1) {
|
|
311
|
+
const locale = typeof navigator !== "undefined" ? navigator.language : "en-US";
|
|
312
|
+
const limit = containerWidth.value + 200;
|
|
313
|
+
let cur = kind === "year" ? yearStartDate(Math.floor(start.getFullYear() / step) * step) : new Date(start.getFullYear(), start.getMonth(), 1);
|
|
314
|
+
let first = true;
|
|
315
|
+
for (let guard = 0; guard < 2e3; guard++) {
|
|
316
|
+
const offset = dateToX(toDateStr(cur));
|
|
317
|
+
if (offset > limit) break;
|
|
318
|
+
const label = kind === "year" ? String(cur.getFullYear()) : cur.toLocaleDateString(locale, { month: "long", year: "numeric" });
|
|
319
|
+
const next = kind === "year" ? yearStartDate(cur.getFullYear() + step) : new Date(cur.getFullYear(), cur.getMonth() + 1, 1);
|
|
320
|
+
if (first) {
|
|
321
|
+
const nextOffset = dateToX(toDateStr(next));
|
|
322
|
+
const estWidth = label.length * 6.5 + 14;
|
|
323
|
+
labels.push({
|
|
324
|
+
label,
|
|
325
|
+
offset,
|
|
326
|
+
tier: "coarse",
|
|
327
|
+
sticky: true,
|
|
328
|
+
labelOffset: Math.min(STICKY_PAD, nextOffset - estWidth)
|
|
329
|
+
});
|
|
330
|
+
first = false;
|
|
331
|
+
} else {
|
|
332
|
+
labels.push({ label, offset, tier: "coarse" });
|
|
333
|
+
}
|
|
334
|
+
cur = next;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function yearStartDate(year) {
|
|
338
|
+
const d = new Date(0, 0, 1);
|
|
339
|
+
d.setFullYear(year, 0, 1);
|
|
340
|
+
return d;
|
|
341
|
+
}
|
|
308
342
|
function addYearTierLabels(labels, start, end, step, tier) {
|
|
309
343
|
const startYear = Math.floor(start.getFullYear() / step) * step;
|
|
310
344
|
const endYear = end.getFullYear();
|
|
311
345
|
for (let y = startYear; y <= endYear + step; y += step) {
|
|
312
|
-
const d =
|
|
313
|
-
d.setFullYear(y, 0, 1);
|
|
346
|
+
const d = yearStartDate(y);
|
|
314
347
|
const offset = dateToX(toDateStr(d));
|
|
315
348
|
if (offset >= -200 && offset <= containerWidth.value + 200) {
|
|
316
349
|
labels.push({ label: String(y), offset, tier });
|
|
@@ -369,7 +402,8 @@ export function useTimelineView(options) {
|
|
|
369
402
|
return end >= visibleStartDate.value && start <= visibleEndDate.value;
|
|
370
403
|
}
|
|
371
404
|
function isMilestone(entry) {
|
|
372
|
-
|
|
405
|
+
const end = tlEnd(entry.meta);
|
|
406
|
+
return !end || end === tlStart(entry.meta);
|
|
373
407
|
}
|
|
374
408
|
function onKeydown(e) {
|
|
375
409
|
if (e.target?.tagName === "INPUT" || e.target?.tagName === "TEXTAREA") return;
|
|
@@ -35,6 +35,8 @@ export interface FloatingWindowState {
|
|
|
35
35
|
initialTab?: 'editor' | 'chat';
|
|
36
36
|
meta?: Record<string, any>;
|
|
37
37
|
}
|
|
38
|
+
export declare function registerWindowLayer(): void;
|
|
39
|
+
export declare function unregisterWindowLayer(): void;
|
|
38
40
|
export declare function useWindowManager(): {
|
|
39
41
|
windows: import("vue").Reactive<Map<string, FloatingWindowState>>;
|
|
40
42
|
activeWindows: import("vue").ComputedRef<{
|
|
@@ -91,6 +93,8 @@ export declare function useWindowManager(): {
|
|
|
91
93
|
initialTab?: "editor" | "chat" | undefined;
|
|
92
94
|
meta?: Record<string, any> | undefined;
|
|
93
95
|
}[]>;
|
|
96
|
+
windowLayerMounted: import("vue").ComputedRef<boolean>;
|
|
97
|
+
floatWindowsAvailable: import("vue").ComputedRef<boolean>;
|
|
94
98
|
openWindow: (opts: {
|
|
95
99
|
id: string;
|
|
96
100
|
title: string;
|
|
@@ -4,6 +4,13 @@ const windows = reactive(/* @__PURE__ */ new Map());
|
|
|
4
4
|
const topZIndex = ref(30);
|
|
5
5
|
let cascadeOffset = 0;
|
|
6
6
|
let _saveDebounce = null;
|
|
7
|
+
const windowLayerCount = ref(0);
|
|
8
|
+
export function registerWindowLayer() {
|
|
9
|
+
windowLayerCount.value++;
|
|
10
|
+
}
|
|
11
|
+
export function unregisterWindowLayer() {
|
|
12
|
+
windowLayerCount.value = Math.max(0, windowLayerCount.value - 1);
|
|
13
|
+
}
|
|
7
14
|
export function useWindowManager() {
|
|
8
15
|
function bringToFront(id) {
|
|
9
16
|
const win = windows.get(id);
|
|
@@ -131,6 +138,8 @@ export function useWindowManager() {
|
|
|
131
138
|
const minimizedWindows = computed(
|
|
132
139
|
() => [...windows.values()].filter((w) => w.isMinimized)
|
|
133
140
|
);
|
|
141
|
+
const windowLayerMounted = computed(() => windowLayerCount.value > 0);
|
|
142
|
+
const floatWindowsAvailable = windowLayerMounted;
|
|
134
143
|
function _saveLayout() {
|
|
135
144
|
if (_saveDebounce) clearTimeout(_saveDebounce);
|
|
136
145
|
_saveDebounce = setTimeout(() => {
|
|
@@ -188,6 +197,8 @@ export function useWindowManager() {
|
|
|
188
197
|
windows,
|
|
189
198
|
activeWindows,
|
|
190
199
|
minimizedWindows,
|
|
200
|
+
windowLayerMounted,
|
|
201
|
+
floatWindowsAvailable,
|
|
191
202
|
openWindow,
|
|
192
203
|
closeWindow,
|
|
193
204
|
closeAll,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** A bare `YYYY-MM-DD` (no time component). */
|
|
2
|
+
export declare function isDateOnly(s: unknown): s is string;
|
|
3
|
+
/**
|
|
4
|
+
* The calendar "day" (`YYYY-MM-DD`) a value belongs to: an all-day / date-only
|
|
5
|
+
* value floats on its literal stored date (slice, no timezone math); a timed
|
|
6
|
+
* instant resolves to its LOCAL day. Used by the type-switch normalization to
|
|
7
|
+
* convert a Calendar `datetimeStart` into a Timeline `dateStart`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function calendarDayOf(value: string, allDay: boolean): string;
|
|
10
|
+
/** The opposite date-family key. `daterange` (Timeline) ⇄ `datetimerange` (Calendar). */
|
|
11
|
+
export declare const DATE_SIBLING_KEY: Record<string, string>;
|
|
12
|
+
type AnyMeta = Record<string, unknown> | null | undefined;
|
|
13
|
+
/** Tolerant start read — daterange (Timeline-native) first, datetimerange fallback. */
|
|
14
|
+
export declare function tlStart(meta: AnyMeta): string | undefined;
|
|
15
|
+
/** Tolerant end read — daterange (Timeline-native) first, datetimerange fallback. */
|
|
16
|
+
export declare function tlEnd(meta: AnyMeta): string | undefined;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { toLocalDateStr } from "./localDate.js";
|
|
2
|
+
export function isDateOnly(s) {
|
|
3
|
+
return typeof s === "string" && /^\d{4}-\d{2}-\d{2}$/.test(s);
|
|
4
|
+
}
|
|
5
|
+
export function calendarDayOf(value, allDay) {
|
|
6
|
+
return allDay || isDateOnly(value) ? value.slice(0, 10) : toLocalDateStr(new Date(value));
|
|
7
|
+
}
|
|
8
|
+
export const DATE_SIBLING_KEY = {
|
|
9
|
+
dateStart: "datetimeStart",
|
|
10
|
+
dateEnd: "datetimeEnd",
|
|
11
|
+
datetimeStart: "dateStart",
|
|
12
|
+
datetimeEnd: "dateEnd"
|
|
13
|
+
};
|
|
14
|
+
export function tlStart(meta) {
|
|
15
|
+
return meta?.dateStart ?? meta?.datetimeStart;
|
|
16
|
+
}
|
|
17
|
+
export function tlEnd(meta) {
|
|
18
|
+
return meta?.dateEnd ?? meta?.datetimeEnd;
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for item-label display across the doc renderers.
|
|
3
|
+
*
|
|
4
|
+
* Brand-new collection items (checklist tasks, table rows, sheet cells, kanban
|
|
5
|
+
* cards, gallery items) are created with an EMPTY label and renamed inline. The
|
|
6
|
+
* doc-tree stores that empty string verbatim, so renderers must distinguish
|
|
7
|
+
* "awaiting a name" (show a muted ghost placeholder) from a doc a user genuinely
|
|
8
|
+
* titled "Untitled". An empty label must never be persisted or rendered as the
|
|
9
|
+
* literal word "Untitled" — that is a display concern, decided per renderer.
|
|
10
|
+
*
|
|
11
|
+
* Ported verbatim from cou-sh/app/utils/itemLabel.ts.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* True when a label carries no real title: empty, whitespace-only, or the legacy
|
|
15
|
+
* "Untitled"/"untitled" sentinel (case-insensitive — the lowercase form is what
|
|
16
|
+
* a lost label round-trips back to through `untitled.md`).
|
|
17
|
+
*/
|
|
18
|
+
export declare function isPlaceholderLabel(label: unknown): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Display fallback for contexts that need a non-empty string for a possibly
|
|
21
|
+
* unnamed entity (breadcrumbs, calendar/map/graph/timeline chips). Returns
|
|
22
|
+
* `fallback` for placeholder labels, otherwise the label unchanged.
|
|
23
|
+
*
|
|
24
|
+
* Editable list items should NOT use this — they show a muted ghost placeholder
|
|
25
|
+
* via their own label so empty reads as "type here", not as a fake title.
|
|
26
|
+
*/
|
|
27
|
+
export declare function displayLabel(label: unknown, fallback?: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function isPlaceholderLabel(label) {
|
|
2
|
+
if (typeof label !== "string") return label == null;
|
|
3
|
+
const t = label.trim();
|
|
4
|
+
return t === "" || t.toLowerCase() === "untitled";
|
|
5
|
+
}
|
|
6
|
+
export function displayLabel(label, fallback = "Untitled") {
|
|
7
|
+
return isPlaceholderLabel(label) ? fallback : label;
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local-time date helpers shared by the date-bearing renderers (calendar,
|
|
3
|
+
* timeline, checklist). Ported verbatim from cou-sh/app/utils/localDate.ts.
|
|
4
|
+
*
|
|
5
|
+
* `new Date('YYYY-MM-DD')` parses as UTC midnight, which lands on the previous
|
|
6
|
+
* calendar day in negative-offset timezones; `Date#toISOString().slice(0,10)`
|
|
7
|
+
* emits the UTC date, a different wall-clock day in any non-zero offset. These
|
|
8
|
+
* helpers use LOCAL calendar components so events never render a day early/late.
|
|
9
|
+
*/
|
|
10
|
+
/** Parse a date string in LOCAL time. */
|
|
11
|
+
export declare function parseLocalDate(dateStr: string): Date;
|
|
12
|
+
/** Whole calendar days between today and the date (negative = past). */
|
|
13
|
+
export declare function daysFromToday(dateStr: string): number;
|
|
14
|
+
/** Format a Date as `YYYY-MM-DD` using LOCAL calendar components. */
|
|
15
|
+
export declare function toLocalDateStr(d: Date): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function parseLocalDate(dateStr) {
|
|
2
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateStr);
|
|
3
|
+
if (m) return new Date(+m[1], +m[2] - 1, +m[3]);
|
|
4
|
+
return new Date(dateStr);
|
|
5
|
+
}
|
|
6
|
+
export function daysFromToday(dateStr) {
|
|
7
|
+
const due = parseLocalDate(dateStr);
|
|
8
|
+
const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
|
|
9
|
+
return Math.round((startOfDay(due) - startOfDay(/* @__PURE__ */ new Date())) / 864e5);
|
|
10
|
+
}
|
|
11
|
+
export function toLocalDateStr(d) {
|
|
12
|
+
const y = d.getFullYear();
|
|
13
|
+
const m = String(d.getMonth() + 1).padStart(2, "0");
|
|
14
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
15
|
+
return `${y}-${m}-${day}`;
|
|
16
|
+
}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LUCIDE_ICON_NAMES —
|
|
2
|
+
* LUCIDE_ICON_NAMES — the full Lucide icon set (names only).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `@iconify-json/lucide
|
|
6
|
-
* bundle that dependency to keep its install footprint small, so we ship a
|
|
7
|
-
* static curated subset (~250 of the most useful Lucide icons) instead.
|
|
4
|
+
* GENERATED FILE — do not edit by hand. Regenerate after bumping the
|
|
5
|
+
* `@iconify-json/lucide` devDependency with:
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
* dep is added, replace this file with a single `Object.keys(...).sort()` call
|
|
11
|
-
* so that consumers get the full icon set.
|
|
7
|
+
* node scripts/gen-lucide-icons.mjs
|
|
12
8
|
*
|
|
13
|
-
*
|
|
14
|
-
* the
|
|
9
|
+
* Mirrors cou-sh's `Object.keys(lucideData.icons).sort()` so the module's
|
|
10
|
+
* IconPicker exposes the SAME 1771-icon set as the reference app —
|
|
11
|
+
* NOT a curated subset. We ship only the kebab-case NAMES (no SVG path
|
|
12
|
+
* bodies), so this adds ~30KB of strings to the bundle instead of the
|
|
13
|
+
* multi-hundred-KB `icons.json`. Nuxt Icon resolves the actual glyphs at
|
|
14
|
+
* render time (from a consumer-installed `@iconify-json/lucide` or the
|
|
15
|
+
* Iconify API), exactly as in cou-sh.
|
|
16
|
+
*
|
|
17
|
+
* Names are kebab-case, without the `i-lucide-` prefix. The IconPicker
|
|
18
|
+
* prepends the prefix when rendering.
|
|
19
|
+
*
|
|
20
|
+
* Count: 1771 icons (lucide `icons` keys; aliases excluded, matching cou-sh).
|
|
15
21
|
*/
|
|
16
22
|
export declare const LUCIDE_ICON_NAMES: string[];
|