@underverse-ui/underverse 1.0.161 → 1.0.163
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/api-reference.json +1 -1
- package/dist/index.cjs +166 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -1
- package/dist/index.d.ts +58 -1
- package/dist/index.js +166 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -771,6 +771,9 @@ var en_default = {
|
|
|
771
771
|
loading: "Loading",
|
|
772
772
|
noData: "No data",
|
|
773
773
|
clearFilter: "Clear filter",
|
|
774
|
+
selectAll: "Select all",
|
|
775
|
+
default: "Default",
|
|
776
|
+
other: "Other",
|
|
774
777
|
headerAlign: "Header alignment",
|
|
775
778
|
alignLeft: "Align left",
|
|
776
779
|
alignCenter: "Align center",
|
|
@@ -1166,6 +1169,9 @@ var vi_default = {
|
|
|
1166
1169
|
loading: "\u0110ang t\u1EA3i",
|
|
1167
1170
|
noData: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u",
|
|
1168
1171
|
clearFilter: "X\xF3a b\u1ED9 l\u1ECDc",
|
|
1172
|
+
selectAll: "Ch\u1ECDn t\u1EA5t c\u1EA3",
|
|
1173
|
+
default: "M\u1EB7c \u0111\u1ECBnh",
|
|
1174
|
+
other: "Kh\xE1c",
|
|
1169
1175
|
headerAlign: "C\u0103n ch\u1EC9nh ti\xEAu \u0111\u1EC1",
|
|
1170
1176
|
alignLeft: "C\u0103n tr\xE1i",
|
|
1171
1177
|
alignCenter: "C\u0103n gi\u1EEFa",
|
|
@@ -1561,6 +1567,9 @@ var ko_default = {
|
|
|
1561
1567
|
loading: "\uB85C\uB529 \uC911",
|
|
1562
1568
|
noData: "\uB370\uC774\uD130 \uC5C6\uC74C",
|
|
1563
1569
|
clearFilter: "\uD544\uD130 \uC9C0\uC6B0\uAE30",
|
|
1570
|
+
selectAll: "\uC804\uCCB4 \uC120\uD0DD",
|
|
1571
|
+
default: "\uAE30\uBCF8\uAC12",
|
|
1572
|
+
other: "\uAE30\uD0C0",
|
|
1564
1573
|
headerAlign: "\uD5E4\uB354 \uC815\uB82C",
|
|
1565
1574
|
alignLeft: "\uC67C\uCABD \uC815\uB82C",
|
|
1566
1575
|
alignCenter: "\uAC00\uC6B4\uB370 \uC815\uB82C",
|
|
@@ -1956,6 +1965,9 @@ var ja_default = {
|
|
|
1956
1965
|
loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D",
|
|
1957
1966
|
noData: "\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
1958
1967
|
clearFilter: "\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u30AF\u30EA\u30A2",
|
|
1968
|
+
selectAll: "\u3059\u3079\u3066\u9078\u629E",
|
|
1969
|
+
default: "\u30C7\u30D5\u30A9\u30EB\u30C8",
|
|
1970
|
+
other: "\u305D\u306E\u4ED6",
|
|
1959
1971
|
headerAlign: "\u30D8\u30C3\u30C0\u30FC\u914D\u7F6E",
|
|
1960
1972
|
alignLeft: "\u5DE6\u63C3\u3048",
|
|
1961
1973
|
alignCenter: "\u4E2D\u592E\u63C3\u3048",
|
|
@@ -23095,6 +23107,88 @@ function DataTableBodyRows({
|
|
|
23095
23107
|
// src/components/DataTable/components/DataTableHeader.tsx
|
|
23096
23108
|
var import_react30 = __toESM(require("react"), 1);
|
|
23097
23109
|
var import_lucide_react36 = require("lucide-react");
|
|
23110
|
+
|
|
23111
|
+
// src/components/DataTable/utils/colorTag.ts
|
|
23112
|
+
function parseColor(color) {
|
|
23113
|
+
if (!color) return null;
|
|
23114
|
+
const c = color.trim().toLowerCase();
|
|
23115
|
+
if (c.startsWith("#")) {
|
|
23116
|
+
let hex = c.substring(1);
|
|
23117
|
+
if (hex.length === 3) {
|
|
23118
|
+
hex = hex.split("").map((char) => char + char).join("");
|
|
23119
|
+
}
|
|
23120
|
+
if (hex.length === 6) {
|
|
23121
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
23122
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
23123
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
23124
|
+
if (!isNaN(r) && !isNaN(g) && !isNaN(b)) {
|
|
23125
|
+
return [r, g, b];
|
|
23126
|
+
}
|
|
23127
|
+
}
|
|
23128
|
+
return null;
|
|
23129
|
+
}
|
|
23130
|
+
if (c.startsWith("rgb")) {
|
|
23131
|
+
const match = c.match(/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);
|
|
23132
|
+
if (match) {
|
|
23133
|
+
const r = parseInt(match[1], 10);
|
|
23134
|
+
const g = parseInt(match[2], 10);
|
|
23135
|
+
const b = parseInt(match[3], 10);
|
|
23136
|
+
if (!isNaN(r) && !isNaN(g) && !isNaN(b)) {
|
|
23137
|
+
return [r, g, b];
|
|
23138
|
+
}
|
|
23139
|
+
}
|
|
23140
|
+
return null;
|
|
23141
|
+
}
|
|
23142
|
+
return null;
|
|
23143
|
+
}
|
|
23144
|
+
function toRgba(r, g, b, alpha) {
|
|
23145
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
23146
|
+
}
|
|
23147
|
+
function getHeaderBgColor(colorTag) {
|
|
23148
|
+
const rgb = parseColor(colorTag);
|
|
23149
|
+
if (!rgb) return colorTag;
|
|
23150
|
+
return toRgba(rgb[0], rgb[1], rgb[2], 1);
|
|
23151
|
+
}
|
|
23152
|
+
function getReadableForeground(colorTag) {
|
|
23153
|
+
const rgb = parseColor(colorTag);
|
|
23154
|
+
if (!rgb) return void 0;
|
|
23155
|
+
const toLinear = (c) => {
|
|
23156
|
+
const s = c / 255;
|
|
23157
|
+
return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
23158
|
+
};
|
|
23159
|
+
const L = 0.2126 * toLinear(rgb[0]) + 0.7152 * toLinear(rgb[1]) + 0.0722 * toLinear(rgb[2]);
|
|
23160
|
+
return L > 0.5 ? "rgba(15, 23, 42, 0.92)" : "rgba(255, 255, 255, 0.95)";
|
|
23161
|
+
}
|
|
23162
|
+
function groupColumnsByColorTag(leafCols, colorGroups) {
|
|
23163
|
+
const groupsMap = /* @__PURE__ */ new Map();
|
|
23164
|
+
const ungrouped = [];
|
|
23165
|
+
for (const col of leafCols) {
|
|
23166
|
+
if (col.colorTag && colorGroups && colorGroups[col.colorTag]) {
|
|
23167
|
+
const tag = col.colorTag;
|
|
23168
|
+
if (!groupsMap.has(tag)) {
|
|
23169
|
+
groupsMap.set(tag, []);
|
|
23170
|
+
}
|
|
23171
|
+
groupsMap.get(tag).push(col);
|
|
23172
|
+
} else {
|
|
23173
|
+
ungrouped.push(col);
|
|
23174
|
+
}
|
|
23175
|
+
}
|
|
23176
|
+
const groups = [];
|
|
23177
|
+
if (colorGroups) {
|
|
23178
|
+
for (const [tag, groupConfig] of Object.entries(colorGroups)) {
|
|
23179
|
+
if (groupsMap.has(tag)) {
|
|
23180
|
+
groups.push({
|
|
23181
|
+
colorTag: tag,
|
|
23182
|
+
label: groupConfig.label,
|
|
23183
|
+
columns: groupsMap.get(tag)
|
|
23184
|
+
});
|
|
23185
|
+
}
|
|
23186
|
+
}
|
|
23187
|
+
}
|
|
23188
|
+
return { groups, ungrouped };
|
|
23189
|
+
}
|
|
23190
|
+
|
|
23191
|
+
// src/components/DataTable/components/DataTableHeader.tsx
|
|
23098
23192
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
23099
23193
|
function getColumnLabel(title) {
|
|
23100
23194
|
if (typeof title === "string" || typeof title === "number") {
|
|
@@ -23126,7 +23220,8 @@ function DataTableHeader({
|
|
|
23126
23220
|
getStickyHeaderClass,
|
|
23127
23221
|
getStickyHeaderCellStyle,
|
|
23128
23222
|
sortByLabel,
|
|
23129
|
-
t
|
|
23223
|
+
t,
|
|
23224
|
+
columnColorGroups
|
|
23130
23225
|
}) {
|
|
23131
23226
|
const gi18n = useGlobalI18n();
|
|
23132
23227
|
const renderFilterControl = import_react30.default.useCallback(
|
|
@@ -23275,7 +23370,7 @@ function DataTableHeader({
|
|
|
23275
23370
|
title: gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
|
|
23276
23371
|
className: cn(
|
|
23277
23372
|
"p-1.5 rounded-lg transition-all duration-200 hover:bg-accent",
|
|
23278
|
-
filters[col.key] ? "bg-accent
|
|
23373
|
+
filters[col.key] ? "bg-accent opacity-100" : "opacity-60 hover:opacity-100"
|
|
23279
23374
|
),
|
|
23280
23375
|
"aria-label": gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
|
|
23281
23376
|
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react36.Filter, { className: "w-4 h-4" })
|
|
@@ -23343,6 +23438,8 @@ function DataTableHeader({
|
|
|
23343
23438
|
const isAfterFixedLeft = prevCol?.fixed === "left";
|
|
23344
23439
|
const showBorderLeft = columnDividers && cellIndex > 0 && !isAfterFixedLeft && !col.fixed;
|
|
23345
23440
|
const isLastCell = cellIndex === row.length - 1;
|
|
23441
|
+
const headerBackgroundColor = isLeaf && col.colorTag ? getHeaderBgColor(col.colorTag) : "var(--muted)";
|
|
23442
|
+
const headerColor = isLeaf && col.colorTag ? columnColorGroups?.[col.colorTag]?.headerTextColor ?? getReadableForeground(col.colorTag) : void 0;
|
|
23346
23443
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
23347
23444
|
TableHead,
|
|
23348
23445
|
{
|
|
@@ -23351,6 +23448,8 @@ function DataTableHeader({
|
|
|
23351
23448
|
"data-underverse-column-key": isLeaf ? col.key : void 0,
|
|
23352
23449
|
style: {
|
|
23353
23450
|
width: col.width,
|
|
23451
|
+
backgroundColor: headerBackgroundColor,
|
|
23452
|
+
color: headerColor,
|
|
23354
23453
|
...getStickyHeaderCellStyle(headerCell)
|
|
23355
23454
|
},
|
|
23356
23455
|
className: cn(
|
|
@@ -23427,7 +23526,6 @@ function DataTablePagination({
|
|
|
23427
23526
|
result.push(totalPages);
|
|
23428
23527
|
return result;
|
|
23429
23528
|
}, [curPage, totalPages]);
|
|
23430
|
-
if (!(totalItems > 0 && totalPages > 1)) return null;
|
|
23431
23529
|
const controlButtonSize = size === "lg" ? "md" : "sm";
|
|
23432
23530
|
const navBtnClass = size === "sm" ? "h-6 w-6 p-0 rounded-full" : size === "lg" ? "h-8 w-8 p-0 rounded-full" : "h-7 w-7 p-0 rounded-full";
|
|
23433
23531
|
const navIconClass = size === "sm" ? "h-3.5 w-3.5" : size === "lg" ? "h-5 w-5" : "h-4 w-4";
|
|
@@ -23609,13 +23707,18 @@ function DataTableToolbar({
|
|
|
23609
23707
|
setDensity,
|
|
23610
23708
|
setHeaderAlign,
|
|
23611
23709
|
labels,
|
|
23612
|
-
t
|
|
23710
|
+
t,
|
|
23711
|
+
columnColorGroups,
|
|
23712
|
+
defaultVisibleKeys
|
|
23613
23713
|
}) {
|
|
23614
23714
|
const controlButtonSize = size === "lg" ? "md" : "sm";
|
|
23615
23715
|
const controlButtonClass = size === "sm" ? "h-7 px-2 text-xs" : size === "lg" ? "h-9 px-3 text-sm" : "h-8 px-2";
|
|
23616
23716
|
const iconClass = size === "sm" ? "w-3.5 h-3.5 mr-1" : "w-4 h-4 mr-1";
|
|
23617
23717
|
const captionClass = size === "sm" ? "text-xs" : size === "lg" ? "text-sm" : "text-sm";
|
|
23618
23718
|
const leafCols = import_react32.default.useMemo(() => getLeafColumns(columns), [columns]);
|
|
23719
|
+
const { groups, ungrouped } = import_react32.default.useMemo(() => groupColumnsByColorTag(leafCols, columnColorGroups), [leafCols, columnColorGroups]);
|
|
23720
|
+
const handleSelectAll = () => setVisibleCols(leafCols.map((c) => c.key));
|
|
23721
|
+
const handleDefault = () => setVisibleCols(defaultVisibleKeys);
|
|
23619
23722
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center justify-between gap-4 mb-1", children: [
|
|
23620
23723
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: captionClass + " text-muted-foreground", children: caption }),
|
|
23621
23724
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
@@ -23633,7 +23736,7 @@ function DataTableToolbar({
|
|
|
23633
23736
|
]
|
|
23634
23737
|
}
|
|
23635
23738
|
),
|
|
23636
|
-
enableColumnVisibilityToggle && /* @__PURE__ */ (0, import_jsx_runtime67.
|
|
23739
|
+
enableColumnVisibilityToggle && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
23637
23740
|
DropdownMenu_default,
|
|
23638
23741
|
{
|
|
23639
23742
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Button_default, { variant: "ghost", size: controlButtonSize, className: controlButtonClass, children: [
|
|
@@ -23648,19 +23751,49 @@ function DataTableToolbar({
|
|
|
23648
23751
|
) }),
|
|
23649
23752
|
labels?.columns || t("columns")
|
|
23650
23753
|
] }),
|
|
23651
|
-
children:
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
onClick: ()
|
|
23655
|
-
|
|
23656
|
-
|
|
23657
|
-
children: [
|
|
23658
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23754
|
+
children: [
|
|
23755
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center gap-2 px-2 py-1.5 mb-1", children: [
|
|
23756
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button_default, { variant: "outline", size: "sm", className: "h-7 text-xs flex-1", onClick: handleSelectAll, children: labels?.selectAll || t("selectAll") || "Select All" }),
|
|
23757
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Button_default, { variant: "outline", size: "sm", className: "h-7 text-xs flex-1", onClick: handleDefault, children: labels?.default || t("default") || "Default" })
|
|
23758
|
+
] }),
|
|
23759
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "max-h-80 overflow-y-auto min-w-50", children: [
|
|
23760
|
+
groups.length > 0 && groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react32.default.Fragment, { children: [
|
|
23761
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "px-3 py-1.5 text-[11px] font-semibold uppercase text-muted-foreground flex items-center gap-2 mt-1 bg-accent/30 sticky top-0 z-10 backdrop-blur-sm", children: [
|
|
23762
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "w-2.5 h-2.5 rounded-full shadow-sm", style: { backgroundColor: group.colorTag } }),
|
|
23763
|
+
group.label
|
|
23764
|
+
] }),
|
|
23765
|
+
group.columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
23766
|
+
DropdownMenuItem,
|
|
23767
|
+
{
|
|
23768
|
+
onClick: () => {
|
|
23769
|
+
setVisibleCols((prev) => prev.includes(c.key) ? prev.filter((k) => k !== c.key) : [...prev, c.key]);
|
|
23770
|
+
},
|
|
23771
|
+
closeOnSelect: false,
|
|
23772
|
+
children: [
|
|
23773
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("input", { type: "checkbox", className: "mr-2 rounded-md border-border/50", readOnly: true, checked: visibleCols.includes(c.key) }),
|
|
23774
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "truncate", children: c.title })
|
|
23775
|
+
]
|
|
23776
|
+
},
|
|
23777
|
+
c.key
|
|
23778
|
+
))
|
|
23779
|
+
] }, group.colorTag)),
|
|
23780
|
+
groups.length > 0 && ungrouped.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "px-3 py-1.5 text-[11px] font-semibold uppercase text-muted-foreground mt-1 bg-accent/30 sticky top-0 z-10 backdrop-blur-sm", children: t("other") || "Other" }),
|
|
23781
|
+
ungrouped.map((c) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
23782
|
+
DropdownMenuItem,
|
|
23783
|
+
{
|
|
23784
|
+
onClick: () => {
|
|
23785
|
+
setVisibleCols((prev) => prev.includes(c.key) ? prev.filter((k) => k !== c.key) : [...prev, c.key]);
|
|
23786
|
+
},
|
|
23787
|
+
closeOnSelect: false,
|
|
23788
|
+
children: [
|
|
23789
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("input", { type: "checkbox", className: "mr-2 rounded-md border-border/50", readOnly: true, checked: visibleCols.includes(c.key) }),
|
|
23790
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "truncate", children: c.title })
|
|
23791
|
+
]
|
|
23792
|
+
},
|
|
23793
|
+
c.key
|
|
23794
|
+
))
|
|
23795
|
+
] })
|
|
23796
|
+
]
|
|
23664
23797
|
}
|
|
23665
23798
|
),
|
|
23666
23799
|
enableHeaderAlignToggle && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
@@ -23956,7 +24089,7 @@ function useStickyColumns(visibleColumns) {
|
|
|
23956
24089
|
const getStickyHeaderClass = import_react37.default.useCallback(
|
|
23957
24090
|
(col) => {
|
|
23958
24091
|
if (!col.fixed) return "";
|
|
23959
|
-
return cn("sticky", col.fixed === "left" && "left-0", col.fixed === "right" && "right-0", getBoundaryShadowClass(col), "z-50
|
|
24092
|
+
return cn("sticky", col.fixed === "left" && "left-0", col.fixed === "right" && "right-0", getBoundaryShadowClass(col), "z-50");
|
|
23960
24093
|
},
|
|
23961
24094
|
[getBoundaryShadowClass]
|
|
23962
24095
|
);
|
|
@@ -24161,7 +24294,8 @@ function DataTable({
|
|
|
24161
24294
|
estimatedRowHeight,
|
|
24162
24295
|
overscan = 8,
|
|
24163
24296
|
enableHeaderAutoFit = true,
|
|
24164
|
-
labels
|
|
24297
|
+
labels,
|
|
24298
|
+
columnColorGroups
|
|
24165
24299
|
}) {
|
|
24166
24300
|
const t = useSmartTranslations("Common");
|
|
24167
24301
|
const [columnWidthOverrides, setColumnWidthOverrides] = import_react38.default.useState({});
|
|
@@ -24169,6 +24303,9 @@ function DataTable({
|
|
|
24169
24303
|
() => applyColumnWidthOverrides(columns, columnWidthOverrides),
|
|
24170
24304
|
[columnWidthOverrides, columns]
|
|
24171
24305
|
);
|
|
24306
|
+
const defaultVisibleKeys = import_react38.default.useMemo(() => {
|
|
24307
|
+
return getLeafColumns(columnsWithWidthOverrides).filter((col) => col.visible !== false).map((col) => col.key);
|
|
24308
|
+
}, [columnsWithWidthOverrides]);
|
|
24172
24309
|
const {
|
|
24173
24310
|
headerAlign,
|
|
24174
24311
|
setHeaderAlign,
|
|
@@ -24309,7 +24446,9 @@ function DataTable({
|
|
|
24309
24446
|
setDensity,
|
|
24310
24447
|
setHeaderAlign,
|
|
24311
24448
|
labels,
|
|
24312
|
-
t
|
|
24449
|
+
t,
|
|
24450
|
+
columnColorGroups,
|
|
24451
|
+
defaultVisibleKeys
|
|
24313
24452
|
}
|
|
24314
24453
|
),
|
|
24315
24454
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
@@ -24358,7 +24497,8 @@ function DataTable({
|
|
|
24358
24497
|
getStickyHeaderClass,
|
|
24359
24498
|
getStickyHeaderCellStyle,
|
|
24360
24499
|
sortByLabel: labels?.sortBy,
|
|
24361
|
-
t
|
|
24500
|
+
t,
|
|
24501
|
+
columnColorGroups
|
|
24362
24502
|
}
|
|
24363
24503
|
) }),
|
|
24364
24504
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
@@ -24963,7 +25103,7 @@ var CalloutView = ({ node, updateAttributes, selected }) => {
|
|
|
24963
25103
|
children: currentEmoji
|
|
24964
25104
|
}
|
|
24965
25105
|
),
|
|
24966
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex flex-col gap-3 w-64 max-h-
|
|
25106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex flex-col gap-3 w-64 max-h-90 overflow-y-auto p-1", children: [
|
|
24967
25107
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-1", children: t("callout.selectEmoji") }),
|
|
24968
25108
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "h-44 overflow-y-auto border border-border/40 rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(EmojiPicker2, { onSelect: (emoji) => updateAttributes({ emoji }) }) }),
|
|
24969
25109
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "border-t border-border/50 pt-2 mt-1", children: [
|
|
@@ -25147,7 +25287,7 @@ var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
|
|
|
25147
25287
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "h-4 w-5/6 bg-muted-foreground/20 rounded" })
|
|
25148
25288
|
] }),
|
|
25149
25289
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "h-20 w-32 bg-muted-foreground/20 rounded-lg flex-shrink-0" })
|
|
25150
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-col sm:flex-row items-stretch justify-between min-h-
|
|
25290
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-col sm:flex-row items-stretch justify-between min-h-25", children: [
|
|
25151
25291
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex-1 p-4 flex flex-col justify-between gap-1 min-w-0", children: [
|
|
25152
25292
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
25153
25293
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "text-xs text-muted-foreground font-medium flex items-center gap-1.5 truncate", children: [
|
|
@@ -25430,7 +25570,7 @@ var FileCardView = ({ node, selected, editor, updateAttributes }) => {
|
|
|
25430
25570
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "text-xs text-muted-foreground flex items-center gap-2 mt-0.5", children: [
|
|
25431
25571
|
fileSize ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: formatBytes(fileSize) }) : null,
|
|
25432
25572
|
isUploading && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: cn(
|
|
25433
|
-
"font-medium truncate max-w-
|
|
25573
|
+
"font-medium truncate max-w-50",
|
|
25434
25574
|
uploadError ? "text-destructive" : "text-primary animate-pulse"
|
|
25435
25575
|
), children: uploadError ? `${t("fileCard.uploadFailed") || "T\u1EA3i l\xEAn th\u1EA5t b\u1EA1i"}: ${uploadError}` : t("fileCard.uploading") }),
|
|
25436
25576
|
isUploading && uploadError && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
@@ -32212,7 +32352,7 @@ var LinkPreviewContent = ({ editor, onEdit }) => {
|
|
|
32212
32352
|
editor.chain().focus().unsetLink().run();
|
|
32213
32353
|
};
|
|
32214
32354
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex items-center gap-1 p-1 max-w-sm", children: [
|
|
32215
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-xs text-muted-foreground font-mono px-2 truncate max-w-
|
|
32355
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-xs text-muted-foreground font-mono px-2 truncate max-w-45", children: url }),
|
|
32216
32356
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
|
|
32217
32357
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ToolbarButton, { onClick: handleOpen, title: t("linkPreview.open") || "Open link", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react50.ExternalLink, { className: "w-4 h-4" }) }),
|
|
32218
32358
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ToolbarButton, { onClick: onEdit, title: t("linkPreview.edit") || "Edit link", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react50.Edit2, { className: "w-4 h-4" }) }),
|