@underverse-ui/underverse 1.0.134 → 1.0.136
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 +38 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -9343,6 +9343,7 @@ var DatePicker = ({
|
|
|
9343
9343
|
{
|
|
9344
9344
|
ref: inputRef,
|
|
9345
9345
|
type: "text",
|
|
9346
|
+
"aria-label": value ? formatDateDisplay(value) : placeholder || t("placeholder"),
|
|
9346
9347
|
disabled,
|
|
9347
9348
|
placeholder: placeholder || t("placeholder"),
|
|
9348
9349
|
value: isFocused ? inputValue : value ? formatDateDisplay(value) : "",
|
|
@@ -9360,8 +9361,7 @@ var DatePicker = ({
|
|
|
9360
9361
|
},
|
|
9361
9362
|
className: "w-full bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60 min-w-0"
|
|
9362
9363
|
}
|
|
9363
|
-
)
|
|
9364
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "sr-only", children: value ? formatDateDisplay(value) : placeholder || t("placeholder") })
|
|
9364
|
+
)
|
|
9365
9365
|
] }),
|
|
9366
9366
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
9367
9367
|
value && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
@@ -10091,6 +10091,7 @@ var DateRangePicker = ({
|
|
|
10091
10091
|
{
|
|
10092
10092
|
ref: inputRef,
|
|
10093
10093
|
type: "text",
|
|
10094
|
+
"aria-label": tempStart ? displayLabel : placeholder,
|
|
10094
10095
|
disabled,
|
|
10095
10096
|
placeholder,
|
|
10096
10097
|
value: isFocused ? inputValue : tempStart ? displayLabel : "",
|
|
@@ -10108,8 +10109,7 @@ var DateRangePicker = ({
|
|
|
10108
10109
|
},
|
|
10109
10110
|
className: "w-full bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60 min-w-0"
|
|
10110
10111
|
}
|
|
10111
|
-
)
|
|
10112
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "sr-only", children: tempStart ? displayLabel : placeholder })
|
|
10112
|
+
)
|
|
10113
10113
|
] }),
|
|
10114
10114
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
10115
10115
|
]
|
|
@@ -10787,12 +10787,12 @@ function MonthYearPicker({
|
|
|
10787
10787
|
className
|
|
10788
10788
|
),
|
|
10789
10789
|
children: [
|
|
10790
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
10790
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
|
|
10791
10791
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
10792
10792
|
"div",
|
|
10793
10793
|
{
|
|
10794
10794
|
className: cn(
|
|
10795
|
-
"flex items-center justify-center transition-colors duration-300",
|
|
10795
|
+
"flex shrink-0 items-center justify-center transition-colors duration-300",
|
|
10796
10796
|
effectiveError ? "text-destructive" : success ? "text-success" : open ? "text-primary" : "text-muted-foreground group-hover:text-primary"
|
|
10797
10797
|
),
|
|
10798
10798
|
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react16.Calendar, { className: cn(sz.icon, "transition-transform duration-300", open && "rotate-12") })
|
|
@@ -10801,12 +10801,12 @@ function MonthYearPicker({
|
|
|
10801
10801
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
10802
10802
|
"span",
|
|
10803
10803
|
{
|
|
10804
|
-
className: cn("truncate font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
|
|
10804
|
+
className: cn("min-w-0 truncate font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
|
|
10805
10805
|
children: hasValue ? display : placeholder
|
|
10806
10806
|
}
|
|
10807
10807
|
)
|
|
10808
10808
|
] }),
|
|
10809
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: cn("ml-2 transition-all duration-300 text-muted-foreground group-hover:text-foreground", open && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react16.ChevronDown, { className: sz.icon }) })
|
|
10809
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: cn("ml-2 shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", open && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react16.ChevronDown, { className: sz.icon }) })
|
|
10810
10810
|
]
|
|
10811
10811
|
}
|
|
10812
10812
|
);
|
|
@@ -12492,12 +12492,12 @@ function TimePicker({
|
|
|
12492
12492
|
className
|
|
12493
12493
|
),
|
|
12494
12494
|
children: [
|
|
12495
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12495
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
|
|
12496
12496
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12497
12497
|
"div",
|
|
12498
12498
|
{
|
|
12499
12499
|
className: cn(
|
|
12500
|
-
"flex items-center justify-center transition-colors duration-300",
|
|
12500
|
+
"flex shrink-0 items-center justify-center transition-colors duration-300",
|
|
12501
12501
|
effectiveError ? "text-destructive" : success ? "text-success" : open ? "text-primary" : "text-muted-foreground group-hover:text-primary"
|
|
12502
12502
|
),
|
|
12503
12503
|
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react18.Clock, { className: cn(sz.icon, "transition-transform duration-300", open && "rotate-12") })
|
|
@@ -12507,7 +12507,7 @@ function TimePicker({
|
|
|
12507
12507
|
"span",
|
|
12508
12508
|
{
|
|
12509
12509
|
className: cn(
|
|
12510
|
-
"truncate font-medium transition-colors duration-200",
|
|
12510
|
+
"min-w-0 truncate font-medium transition-colors duration-200",
|
|
12511
12511
|
!hasCommittedValue && "text-muted-foreground",
|
|
12512
12512
|
hasCommittedValue ? "text-foreground" : ""
|
|
12513
12513
|
),
|
|
@@ -12515,7 +12515,7 @@ function TimePicker({
|
|
|
12515
12515
|
}
|
|
12516
12516
|
)
|
|
12517
12517
|
] }),
|
|
12518
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("ml-2 transition-all duration-300 text-muted-foreground group-hover:text-foreground", open && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { className: sz.icon, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
12518
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("ml-2 shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", open && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { className: sz.icon, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
12519
12519
|
]
|
|
12520
12520
|
}
|
|
12521
12521
|
);
|
|
@@ -13145,8 +13145,8 @@ var DateTimePicker = ({
|
|
|
13145
13145
|
effectiveError && "border-destructive/60 bg-destructive/5"
|
|
13146
13146
|
),
|
|
13147
13147
|
children: [
|
|
13148
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "truncate", children: displayValue || placeholder || "Select date & time" }),
|
|
13149
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
13148
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: displayValue || placeholder || "Select date & time" }),
|
|
13149
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex shrink-0 items-center gap-2 text-muted-foreground", children: [
|
|
13150
13150
|
value && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13151
13151
|
"span",
|
|
13152
13152
|
{
|
|
@@ -25508,6 +25508,7 @@ var letter_spacing_default = LetterSpacing;
|
|
|
25508
25508
|
|
|
25509
25509
|
// src/components/UEditor/table-align.ts
|
|
25510
25510
|
var import_extension_table = require("@tiptap/extension-table");
|
|
25511
|
+
var import_state4 = require("@tiptap/pm/state");
|
|
25511
25512
|
|
|
25512
25513
|
// src/components/UEditor/table-align-utils.ts
|
|
25513
25514
|
function findTableNodeInfoAtResolvedPos($pos) {
|
|
@@ -25635,6 +25636,24 @@ var UEditorTable = import_extension_table.Table.extend({
|
|
|
25635
25636
|
return true;
|
|
25636
25637
|
}
|
|
25637
25638
|
};
|
|
25639
|
+
},
|
|
25640
|
+
addProseMirrorPlugins() {
|
|
25641
|
+
return [
|
|
25642
|
+
new import_state4.Plugin({
|
|
25643
|
+
appendTransaction(_transactions, _oldState, newState) {
|
|
25644
|
+
const { doc, schema } = newState;
|
|
25645
|
+
const paragraphType = schema.nodes.paragraph;
|
|
25646
|
+
if (!paragraphType) return null;
|
|
25647
|
+
const needsLeading = doc.firstChild?.type.name === "table";
|
|
25648
|
+
const needsTrailing = doc.lastChild?.type.name === "table";
|
|
25649
|
+
if (!needsLeading && !needsTrailing) return null;
|
|
25650
|
+
const tr = newState.tr;
|
|
25651
|
+
if (needsTrailing) tr.insert(doc.content.size, paragraphType.create());
|
|
25652
|
+
if (needsLeading) tr.insert(0, paragraphType.create());
|
|
25653
|
+
return tr;
|
|
25654
|
+
}
|
|
25655
|
+
})
|
|
25656
|
+
];
|
|
25638
25657
|
}
|
|
25639
25658
|
});
|
|
25640
25659
|
var table_align_default = UEditorTable;
|
|
@@ -26070,7 +26089,7 @@ var EditorColorPalette = ({
|
|
|
26070
26089
|
};
|
|
26071
26090
|
|
|
26072
26091
|
// src/components/UEditor/image-commands.ts
|
|
26073
|
-
var
|
|
26092
|
+
var import_state5 = require("@tiptap/pm/state");
|
|
26074
26093
|
var IMAGE_WIDTHS_BY_LAYOUT = {
|
|
26075
26094
|
block: {
|
|
26076
26095
|
sm: 180,
|
|
@@ -26085,12 +26104,12 @@ var IMAGE_WIDTHS_BY_LAYOUT = {
|
|
|
26085
26104
|
};
|
|
26086
26105
|
function isSelectedImage(editor) {
|
|
26087
26106
|
const { selection } = editor.state;
|
|
26088
|
-
return selection instanceof
|
|
26107
|
+
return selection instanceof import_state5.NodeSelection && selection.node.type.name === "image";
|
|
26089
26108
|
}
|
|
26090
26109
|
function applyImageLayout(editor, layout) {
|
|
26091
26110
|
const { state, view } = editor;
|
|
26092
26111
|
const { selection, schema } = state;
|
|
26093
|
-
if (!(selection instanceof
|
|
26112
|
+
if (!(selection instanceof import_state5.NodeSelection) || selection.node.type.name !== "image") {
|
|
26094
26113
|
editor.chain().focus().updateAttributes("image", { imageLayout: layout }).run();
|
|
26095
26114
|
return;
|
|
26096
26115
|
}
|
|
@@ -26108,10 +26127,10 @@ function applyImageLayout(editor, layout) {
|
|
|
26108
26127
|
}
|
|
26109
26128
|
}
|
|
26110
26129
|
const resolvedPos = transaction.doc.resolve(Math.min(nextPos + 1, transaction.doc.content.size));
|
|
26111
|
-
transaction = transaction.setSelection(
|
|
26130
|
+
transaction = transaction.setSelection(import_state5.TextSelection.near(resolvedPos));
|
|
26112
26131
|
} else {
|
|
26113
26132
|
const resolvedPos = transaction.doc.resolve(selection.from);
|
|
26114
|
-
transaction = transaction.setSelection(
|
|
26133
|
+
transaction = transaction.setSelection(import_state5.NodeSelection.create(transaction.doc, resolvedPos.pos));
|
|
26115
26134
|
}
|
|
26116
26135
|
view.dispatch(transaction.scrollIntoView());
|
|
26117
26136
|
view.focus();
|