@underverse-ui/underverse 0.2.85 → 0.2.87
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/index.cjs +169 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +169 -91
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7891,41 +7891,48 @@ function intervalPack(items) {
|
|
|
7891
7891
|
// ../../components/ui/CalendarTimeline/hooks.ts
|
|
7892
7892
|
var React27 = __toESM(require("react"), 1);
|
|
7893
7893
|
function useHorizontalScrollSync(args) {
|
|
7894
|
-
const { bodyRef, headerRef } = args;
|
|
7894
|
+
const { bodyRef, headerRef, leftRef } = args;
|
|
7895
7895
|
React27.useEffect(() => {
|
|
7896
7896
|
const body = bodyRef.current;
|
|
7897
7897
|
const header = headerRef.current;
|
|
7898
|
+
const left = leftRef?.current ?? null;
|
|
7898
7899
|
if (!body || !header) return;
|
|
7899
7900
|
let raf = 0;
|
|
7900
7901
|
let syncing = false;
|
|
7901
|
-
const
|
|
7902
|
+
const syncFrom = (source) => {
|
|
7902
7903
|
if (syncing) return;
|
|
7903
7904
|
syncing = true;
|
|
7904
|
-
header
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
};
|
|
7917
|
-
const onHeaderScroll = () => {
|
|
7905
|
+
if (source === "header") {
|
|
7906
|
+
const x = header.scrollLeft;
|
|
7907
|
+
if (body.scrollLeft !== x) body.scrollLeft = x;
|
|
7908
|
+
} else if (source === "left" && left) {
|
|
7909
|
+
const y = left.scrollTop;
|
|
7910
|
+
if (body.scrollTop !== y) body.scrollTop = y;
|
|
7911
|
+
} else {
|
|
7912
|
+
const x = body.scrollLeft;
|
|
7913
|
+
const y = body.scrollTop;
|
|
7914
|
+
if (header.scrollLeft !== x) header.scrollLeft = x;
|
|
7915
|
+
if (left && left.scrollTop !== y) left.scrollTop = y;
|
|
7916
|
+
}
|
|
7918
7917
|
cancelAnimationFrame(raf);
|
|
7919
|
-
raf = requestAnimationFrame(
|
|
7918
|
+
raf = requestAnimationFrame(() => {
|
|
7919
|
+
syncing = false;
|
|
7920
|
+
});
|
|
7920
7921
|
};
|
|
7922
|
+
const onBodyScroll = () => syncFrom("body");
|
|
7923
|
+
const onHeaderScroll = () => syncFrom("header");
|
|
7924
|
+
const onLeftScroll = () => syncFrom("left");
|
|
7925
|
+
syncFrom("body");
|
|
7921
7926
|
body.addEventListener("scroll", onBodyScroll, { passive: true });
|
|
7922
7927
|
header.addEventListener("scroll", onHeaderScroll, { passive: true });
|
|
7928
|
+
left?.addEventListener("scroll", onLeftScroll, { passive: true });
|
|
7923
7929
|
return () => {
|
|
7924
7930
|
cancelAnimationFrame(raf);
|
|
7925
7931
|
body.removeEventListener("scroll", onBodyScroll);
|
|
7926
7932
|
header.removeEventListener("scroll", onHeaderScroll);
|
|
7933
|
+
left?.removeEventListener("scroll", onLeftScroll);
|
|
7927
7934
|
};
|
|
7928
|
-
}, [bodyRef, headerRef]);
|
|
7935
|
+
}, [bodyRef, headerRef, leftRef]);
|
|
7929
7936
|
}
|
|
7930
7937
|
function useVirtualRows(args) {
|
|
7931
7938
|
const { enabled, overscan, rowHeight, itemCount, scrollRef } = args;
|
|
@@ -7987,6 +7994,7 @@ function defaultEventTime(args) {
|
|
|
7987
7994
|
function CalendarTimeline({
|
|
7988
7995
|
resources,
|
|
7989
7996
|
events,
|
|
7997
|
+
size = "md",
|
|
7990
7998
|
view,
|
|
7991
7999
|
defaultView = "month",
|
|
7992
8000
|
onViewChange,
|
|
@@ -8002,9 +8010,9 @@ function CalendarTimeline({
|
|
|
8002
8010
|
groupCollapsed,
|
|
8003
8011
|
defaultGroupCollapsed,
|
|
8004
8012
|
onGroupCollapsedChange,
|
|
8005
|
-
resourceColumnWidth
|
|
8006
|
-
rowHeight
|
|
8007
|
-
slotMinWidth
|
|
8013
|
+
resourceColumnWidth,
|
|
8014
|
+
rowHeight,
|
|
8015
|
+
slotMinWidth,
|
|
8008
8016
|
dayTimeStepMinutes = 60,
|
|
8009
8017
|
maxLanesPerRow = 3,
|
|
8010
8018
|
now,
|
|
@@ -8027,6 +8035,62 @@ function CalendarTimeline({
|
|
|
8027
8035
|
const detectedLocale = useLocale();
|
|
8028
8036
|
const resolvedLocale = React28.useMemo(() => localeToBCP47(locale ?? detectedLocale), [locale, detectedLocale]);
|
|
8029
8037
|
const resolvedTimeZone = React28.useMemo(() => timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC", [timeZone]);
|
|
8038
|
+
const sizeConfig = React28.useMemo(() => {
|
|
8039
|
+
const cfgBySize = {
|
|
8040
|
+
sm: {
|
|
8041
|
+
resourceColumnWidth: 200,
|
|
8042
|
+
rowHeight: 44,
|
|
8043
|
+
slotMinWidth: 52,
|
|
8044
|
+
eventHeight: 16,
|
|
8045
|
+
laneGap: 3,
|
|
8046
|
+
lanePaddingY: 5,
|
|
8047
|
+
densityClass: "text-xs",
|
|
8048
|
+
headerPaddingClass: "px-3 py-2",
|
|
8049
|
+
titleClass: "text-base",
|
|
8050
|
+
resourceRowClass: "gap-2 px-3",
|
|
8051
|
+
groupRowClass: "gap-2 px-3",
|
|
8052
|
+
slotHeaderClass: "px-1 py-2",
|
|
8053
|
+
controlButtonIconClass: "h-7 w-7",
|
|
8054
|
+
controlButtonTextClass: "h-7 px-2 text-xs"
|
|
8055
|
+
},
|
|
8056
|
+
md: {
|
|
8057
|
+
resourceColumnWidth: 240,
|
|
8058
|
+
rowHeight: 52,
|
|
8059
|
+
slotMinWidth: 64,
|
|
8060
|
+
eventHeight: 18,
|
|
8061
|
+
laneGap: 4,
|
|
8062
|
+
lanePaddingY: 6,
|
|
8063
|
+
densityClass: "text-sm",
|
|
8064
|
+
headerPaddingClass: "px-4 py-3",
|
|
8065
|
+
titleClass: "text-lg",
|
|
8066
|
+
resourceRowClass: "gap-3 px-4",
|
|
8067
|
+
groupRowClass: "gap-3 px-4",
|
|
8068
|
+
slotHeaderClass: "px-1 py-3",
|
|
8069
|
+
controlButtonIconClass: "h-8 w-8",
|
|
8070
|
+
controlButtonTextClass: "h-8 px-3"
|
|
8071
|
+
},
|
|
8072
|
+
xl: {
|
|
8073
|
+
resourceColumnWidth: 280,
|
|
8074
|
+
rowHeight: 60,
|
|
8075
|
+
slotMinWidth: 76,
|
|
8076
|
+
eventHeight: 20,
|
|
8077
|
+
laneGap: 5,
|
|
8078
|
+
lanePaddingY: 8,
|
|
8079
|
+
densityClass: "text-base",
|
|
8080
|
+
headerPaddingClass: "px-5 py-4",
|
|
8081
|
+
titleClass: "text-xl",
|
|
8082
|
+
resourceRowClass: "gap-4 px-5",
|
|
8083
|
+
groupRowClass: "gap-4 px-5",
|
|
8084
|
+
slotHeaderClass: "px-2 py-4",
|
|
8085
|
+
controlButtonIconClass: "h-9 w-9",
|
|
8086
|
+
controlButtonTextClass: "h-9 px-4 text-sm"
|
|
8087
|
+
}
|
|
8088
|
+
};
|
|
8089
|
+
return cfgBySize[size];
|
|
8090
|
+
}, [size]);
|
|
8091
|
+
const effectiveResourceColumnWidth = resourceColumnWidth ?? sizeConfig.resourceColumnWidth;
|
|
8092
|
+
const effectiveRowHeight = rowHeight ?? sizeConfig.rowHeight;
|
|
8093
|
+
const effectiveSlotMinWidth = slotMinWidth ?? sizeConfig.slotMinWidth;
|
|
8030
8094
|
const isControlledView = view !== void 0;
|
|
8031
8095
|
const [internalView, setInternalView] = React28.useState(defaultView);
|
|
8032
8096
|
const activeView = isControlledView ? view : internalView;
|
|
@@ -8156,7 +8220,7 @@ function CalendarTimeline({
|
|
|
8156
8220
|
onRangeChange?.(range);
|
|
8157
8221
|
}, [range.start, range.end, onRangeChange]);
|
|
8158
8222
|
const slotStarts = React28.useMemo(() => slots.map((s) => s.start), [slots]);
|
|
8159
|
-
const slotWidth =
|
|
8223
|
+
const slotWidth = effectiveSlotMinWidth;
|
|
8160
8224
|
const gridWidth = slots.length * slotWidth;
|
|
8161
8225
|
const normalizedEvents = React28.useMemo(() => {
|
|
8162
8226
|
const rangeStart = range.start.getTime();
|
|
@@ -8182,16 +8246,17 @@ function CalendarTimeline({
|
|
|
8182
8246
|
}
|
|
8183
8247
|
return map;
|
|
8184
8248
|
}, [normalizedEvents]);
|
|
8249
|
+
const leftRef = React28.useRef(null);
|
|
8185
8250
|
const bodyRef = React28.useRef(null);
|
|
8186
8251
|
const headerRef = React28.useRef(null);
|
|
8187
|
-
useHorizontalScrollSync({ bodyRef, headerRef });
|
|
8252
|
+
useHorizontalScrollSync({ bodyRef, headerRef, leftRef });
|
|
8188
8253
|
const title = React28.useMemo(() => {
|
|
8189
8254
|
return formatters?.monthTitle?.(activeDate, { locale: resolvedLocale, timeZone: resolvedTimeZone }) ?? defaultMonthTitle(activeDate, resolvedLocale, resolvedTimeZone);
|
|
8190
8255
|
}, [activeDate, formatters, resolvedLocale, resolvedTimeZone]);
|
|
8191
|
-
const densityClass =
|
|
8192
|
-
const eventHeight =
|
|
8193
|
-
const laneGap =
|
|
8194
|
-
const lanePaddingY =
|
|
8256
|
+
const densityClass = sizeConfig.densityClass;
|
|
8257
|
+
const eventHeight = sizeConfig.eventHeight;
|
|
8258
|
+
const laneGap = sizeConfig.laneGap;
|
|
8259
|
+
const lanePaddingY = sizeConfig.lanePaddingY;
|
|
8195
8260
|
const virt = virtualization?.enabled;
|
|
8196
8261
|
const overscan = virtualization?.overscan ?? 8;
|
|
8197
8262
|
const {
|
|
@@ -8202,7 +8267,7 @@ function CalendarTimeline({
|
|
|
8202
8267
|
} = useVirtualRows({
|
|
8203
8268
|
enabled: virt,
|
|
8204
8269
|
overscan,
|
|
8205
|
-
rowHeight,
|
|
8270
|
+
rowHeight: effectiveRowHeight,
|
|
8206
8271
|
itemCount: rows.length,
|
|
8207
8272
|
scrollRef: bodyRef
|
|
8208
8273
|
});
|
|
@@ -8349,8 +8414,9 @@ function CalendarTimeline({
|
|
|
8349
8414
|
type: "button",
|
|
8350
8415
|
onClick: canToggle ? toggle : void 0,
|
|
8351
8416
|
className: cn(
|
|
8352
|
-
"w-full h-full flex items-center
|
|
8353
|
-
|
|
8417
|
+
"w-full h-full flex items-center text-left",
|
|
8418
|
+
sizeConfig.groupRowClass,
|
|
8419
|
+
"bg-linear-to-r from-muted/40 to-muted/20 border-b border-border/40",
|
|
8354
8420
|
"backdrop-blur-sm",
|
|
8355
8421
|
canToggle ? "cursor-pointer hover:from-muted/60 hover:to-muted/30 transition-all duration-200" : "cursor-default"
|
|
8356
8422
|
),
|
|
@@ -8387,7 +8453,8 @@ function CalendarTimeline({
|
|
|
8387
8453
|
"div",
|
|
8388
8454
|
{
|
|
8389
8455
|
className: cn(
|
|
8390
|
-
"
|
|
8456
|
+
"shrink-0 border-l border-border/30 flex items-center justify-center transition-colors duration-150",
|
|
8457
|
+
sizeConfig.slotHeaderClass,
|
|
8391
8458
|
s.isToday && "bg-primary/8 border-l-primary/40"
|
|
8392
8459
|
),
|
|
8393
8460
|
style: { width: slotWidth, minWidth: slotWidth },
|
|
@@ -8406,8 +8473,8 @@ function CalendarTimeline({
|
|
|
8406
8473
|
week: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.CalendarDays, { className: "h-4 w-4" }),
|
|
8407
8474
|
day: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Calendar, { className: "h-4 w-4" })
|
|
8408
8475
|
};
|
|
8409
|
-
const Header = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "sticky top-0 z-30 bg-
|
|
8410
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-4
|
|
8476
|
+
const Header = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "sticky top-0 z-30 bg-linear-to-b from-background via-background to-background/95 border-b border-border/40 backdrop-blur-xl", children: [
|
|
8477
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cn("flex items-center justify-between gap-4", sizeConfig.headerPaddingClass), children: [
|
|
8411
8478
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
8412
8479
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center bg-muted/40 rounded-xl p-1 gap-0.5", children: [
|
|
8413
8480
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
@@ -8417,7 +8484,7 @@ function CalendarTimeline({
|
|
|
8417
8484
|
size: "icon",
|
|
8418
8485
|
onClick: () => navigate(-1),
|
|
8419
8486
|
"aria-label": l.prev,
|
|
8420
|
-
className: "
|
|
8487
|
+
className: cn(sizeConfig.controlButtonIconClass, "rounded-lg hover:bg-background/80 transition-all duration-200"),
|
|
8421
8488
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.ChevronLeft, { className: "h-4 w-4" })
|
|
8422
8489
|
}
|
|
8423
8490
|
),
|
|
@@ -8427,7 +8494,7 @@ function CalendarTimeline({
|
|
|
8427
8494
|
variant: "ghost",
|
|
8428
8495
|
size: "sm",
|
|
8429
8496
|
onClick: goToday,
|
|
8430
|
-
className: "
|
|
8497
|
+
className: cn(sizeConfig.controlButtonTextClass, "rounded-lg hover:bg-background/80 font-medium transition-all duration-200"),
|
|
8431
8498
|
children: l.today
|
|
8432
8499
|
}
|
|
8433
8500
|
),
|
|
@@ -8438,12 +8505,12 @@ function CalendarTimeline({
|
|
|
8438
8505
|
size: "icon",
|
|
8439
8506
|
onClick: () => navigate(1),
|
|
8440
8507
|
"aria-label": l.next,
|
|
8441
|
-
className: "
|
|
8508
|
+
className: cn(sizeConfig.controlButtonIconClass, "rounded-lg hover:bg-background/80 transition-all duration-200"),
|
|
8442
8509
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.ChevronRight, { className: "h-4 w-4" })
|
|
8443
8510
|
}
|
|
8444
8511
|
)
|
|
8445
8512
|
] }),
|
|
8446
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { className: "ml-3
|
|
8513
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { className: cn("ml-3 font-semibold tracking-tight truncate text-foreground", sizeConfig.titleClass), children: title })
|
|
8447
8514
|
] }),
|
|
8448
8515
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center bg-muted/40 rounded-xl p-1 gap-0.5", children: ["month", "week", "day"].map((v) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8449
8516
|
Button_default,
|
|
@@ -8452,7 +8519,8 @@ function CalendarTimeline({
|
|
|
8452
8519
|
size: "sm",
|
|
8453
8520
|
onClick: () => setView(v),
|
|
8454
8521
|
className: cn(
|
|
8455
|
-
|
|
8522
|
+
sizeConfig.controlButtonTextClass,
|
|
8523
|
+
"rounded-lg font-medium transition-all duration-200 gap-1.5",
|
|
8456
8524
|
activeView === v ? "bg-primary text-primary-foreground shadow-sm shadow-primary/25" : "hover:bg-background/80 text-muted-foreground hover:text-foreground"
|
|
8457
8525
|
),
|
|
8458
8526
|
children: [
|
|
@@ -8467,9 +8535,9 @@ function CalendarTimeline({
|
|
|
8467
8535
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8468
8536
|
"div",
|
|
8469
8537
|
{
|
|
8470
|
-
className: "
|
|
8471
|
-
style: { width:
|
|
8472
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-medium text-muted-foreground/70 uppercase tracking-wider", children: "
|
|
8538
|
+
className: "shrink-0 border-r border-border/30 bg-muted/20 flex items-center justify-center",
|
|
8539
|
+
style: { width: effectiveResourceColumnWidth, minWidth: effectiveResourceColumnWidth },
|
|
8540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-medium text-muted-foreground/70 uppercase tracking-wider", children: t("resourcesHeader") })
|
|
8473
8541
|
}
|
|
8474
8542
|
),
|
|
8475
8543
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref: headerRef, className: "overflow-x-auto overflow-y-hidden scrollbar-none", children: slotHeaderNodes })
|
|
@@ -8479,11 +8547,12 @@ function CalendarTimeline({
|
|
|
8479
8547
|
"div",
|
|
8480
8548
|
{
|
|
8481
8549
|
className: cn(
|
|
8482
|
-
"h-full w-full flex items-center
|
|
8550
|
+
"h-full w-full flex items-center border-b border-border/30 bg-linear-to-r from-background to-background/95",
|
|
8551
|
+
sizeConfig.resourceRowClass,
|
|
8483
8552
|
"hover:from-muted/30 hover:to-muted/10 transition-all duration-200 group"
|
|
8484
8553
|
),
|
|
8485
8554
|
children: [
|
|
8486
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "
|
|
8555
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "shrink-0 opacity-0 group-hover:opacity-60 transition-opacity cursor-grab", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.GripVertical, { className: "h-4 w-4 text-muted-foreground" }) }),
|
|
8487
8556
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("flex-1 min-w-0", r.disabled && "opacity-50"), children: renderResource ? renderResource(r) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "font-medium text-sm truncate block", children: r.label }) })
|
|
8488
8557
|
]
|
|
8489
8558
|
}
|
|
@@ -8526,42 +8595,51 @@ function CalendarTimeline({
|
|
|
8526
8595
|
...rest,
|
|
8527
8596
|
children: [
|
|
8528
8597
|
Header,
|
|
8529
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
}
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8598
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex min-h-0", children: [
|
|
8599
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8600
|
+
"div",
|
|
8601
|
+
{
|
|
8602
|
+
ref: leftRef,
|
|
8603
|
+
className: "shrink-0 overflow-y-auto overflow-x-hidden scrollbar-none",
|
|
8604
|
+
style: { width: effectiveResourceColumnWidth, minWidth: effectiveResourceColumnWidth },
|
|
8605
|
+
children: [
|
|
8606
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { height: topSpacer } }),
|
|
8607
|
+
rows.slice(startRow, endRow).map((row, idx) => {
|
|
8608
|
+
const rowIndex = startRow + idx;
|
|
8609
|
+
if (row.kind === "group") {
|
|
8610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { height: effectiveRowHeight }, children: renderGroupRow(row.group) }, `lg_${row.group.id}_${rowIndex}`);
|
|
8611
|
+
}
|
|
8612
|
+
const r = row.resource;
|
|
8613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { height: effectiveRowHeight }, children: ResourceCell(r) }, `lr_${r.id}_${rowIndex}`);
|
|
8614
|
+
}),
|
|
8615
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { height: bottomSpacer } })
|
|
8616
|
+
]
|
|
8617
|
+
}
|
|
8618
|
+
),
|
|
8619
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8620
|
+
"div",
|
|
8621
|
+
{
|
|
8622
|
+
ref: bodyRef,
|
|
8623
|
+
className: "relative flex-1 overflow-auto scrollbar-thin scrollbar-thumb-muted scrollbar-track-transparent",
|
|
8624
|
+
onPointerMove,
|
|
8625
|
+
onPointerUp,
|
|
8626
|
+
children: [
|
|
8627
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { height: topSpacer } }),
|
|
8628
|
+
rows.slice(startRow, endRow).map((row, idx) => {
|
|
8629
|
+
const rowIndex = startRow + idx;
|
|
8630
|
+
if (row.kind === "group") {
|
|
8631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex", style: { height: effectiveRowHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "border-b border-border/30 bg-linear-to-r from-muted/15 to-muted/5", style: { width: gridWidth, minWidth: gridWidth } }) }, `rg_${row.group.id}_${rowIndex}`);
|
|
8632
|
+
}
|
|
8633
|
+
const r = row.resource;
|
|
8634
|
+
const layout = layoutsByResource.get(r.id) ?? { visible: [], hidden: [] };
|
|
8635
|
+
const canMore = layout.hidden.length > 0 && !!onMoreClick;
|
|
8636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8637
|
+
"div",
|
|
8638
|
+
{
|
|
8639
|
+
className: "group/row hover:bg-muted/5 transition-colors duration-150",
|
|
8640
|
+
style: { height: effectiveRowHeight },
|
|
8641
|
+
"data-uv-ct-row": r.id,
|
|
8642
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative shrink-0", style: { width: gridWidth, minWidth: gridWidth, height: "100%" }, children: [
|
|
8565
8643
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0", onPointerDown: onPointerDownCell, "data-uv-ct-timeline": true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0 flex", children: slots.map((s, i2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8566
8644
|
"div",
|
|
8567
8645
|
{
|
|
@@ -8673,15 +8751,15 @@ function CalendarTimeline({
|
|
|
8673
8751
|
}
|
|
8674
8752
|
) : null
|
|
8675
8753
|
] })
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
)
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
)
|
|
8754
|
+
},
|
|
8755
|
+
`rr_${r.id}_${rowIndex}`
|
|
8756
|
+
);
|
|
8757
|
+
}),
|
|
8758
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { height: bottomSpacer } })
|
|
8759
|
+
]
|
|
8760
|
+
}
|
|
8761
|
+
)
|
|
8762
|
+
] })
|
|
8685
8763
|
]
|
|
8686
8764
|
}
|
|
8687
8765
|
);
|
|
@@ -18176,9 +18254,9 @@ var UEditor = ({
|
|
|
18176
18254
|
"[&_ul[data-type='taskList']_li>label>input]:border-2",
|
|
18177
18255
|
"[&_ul[data-type='taskList']_li>label>input]:border-primary/50",
|
|
18178
18256
|
"[&_ul[data-type='taskList']_li>label>input]:accent-primary",
|
|
18179
|
-
"[&_pre]
|
|
18180
|
-
"[&_pre]
|
|
18181
|
-
"[&_pre_code]
|
|
18257
|
+
"[&_pre]:bg-[#1e1e1e]!",
|
|
18258
|
+
"[&_pre]:text-[#d4d4d4]!",
|
|
18259
|
+
"[&_pre_code]:bg-transparent!",
|
|
18182
18260
|
"[&_img.ProseMirror-selectednode]:ring-2",
|
|
18183
18261
|
"[&_img.ProseMirror-selectednode]:ring-primary/60",
|
|
18184
18262
|
"[&_img.ProseMirror-selectednode]:ring-offset-2",
|