@underverse-ui/underverse 1.0.122 → 1.0.124
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 +19 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -19328,6 +19328,7 @@ function Carousel({
|
|
|
19328
19328
|
sideOpacity: effectiveAnimation === "stack" ? 0.8 : 0.86,
|
|
19329
19329
|
farOpacity: effectiveAnimation === "stack" ? 0.5 : 0.48,
|
|
19330
19330
|
sideOffset: effectiveAnimation === "stack" ? 20 : 28,
|
|
19331
|
+
verticalOffset: 0,
|
|
19331
19332
|
rotate: 24,
|
|
19332
19333
|
depthStep: effectiveAnimation === "stack" ? 60 : 90,
|
|
19333
19334
|
blur: 1.1,
|
|
@@ -19497,22 +19498,23 @@ function Carousel({
|
|
|
19497
19498
|
}
|
|
19498
19499
|
if (effectiveAnimation === "stack") {
|
|
19499
19500
|
const xOffset2 = distance * mergedEffectOptions.stackOffset;
|
|
19500
|
-
const
|
|
19501
|
+
const yOffset2 = absDistance * mergedEffectOptions.stackLift;
|
|
19501
19502
|
const scale2 = distance === 0 ? mergedEffectOptions.mainScale : distance === 1 || distance === -1 ? mergedEffectOptions.sideScale : mergedEffectOptions.farScale;
|
|
19502
19503
|
return {
|
|
19503
19504
|
opacity: distance === 0 ? 1 : distance === 1 || distance === -1 ? mergedEffectOptions.sideOpacity : mergedEffectOptions.farOpacity,
|
|
19504
|
-
transform: `translate3d(${xOffset2}px, ${
|
|
19505
|
+
transform: `translate3d(${xOffset2}px, ${yOffset2}px, -${absDistance * mergedEffectOptions.depthStep}px) scale(${scale2})`,
|
|
19505
19506
|
filter: distance === 0 ? "blur(0px)" : `blur(${Math.min(absDistance, 2) * mergedEffectOptions.blur}px)`,
|
|
19506
19507
|
pointerEvents: "auto",
|
|
19507
19508
|
zIndex: 30 - absDistance
|
|
19508
19509
|
};
|
|
19509
19510
|
}
|
|
19510
19511
|
const xOffset = distance * mergedEffectOptions.sideOffset;
|
|
19512
|
+
const yOffset = mergedEffectOptions.verticalOffset ?? 0;
|
|
19511
19513
|
const rotateY = distance * -mergedEffectOptions.rotate;
|
|
19512
19514
|
const scale = distance === 0 ? mergedEffectOptions.mainScale : distance === 1 || distance === -1 ? mergedEffectOptions.sideScale : mergedEffectOptions.farScale;
|
|
19513
19515
|
return {
|
|
19514
19516
|
opacity: distance === 0 ? 1 : distance === 1 || distance === -1 ? mergedEffectOptions.sideOpacity : mergedEffectOptions.farOpacity,
|
|
19515
|
-
transform: `translate3d(${xOffset}%,
|
|
19517
|
+
transform: `translate3d(${xOffset}%, ${yOffset}px, -${absDistance * mergedEffectOptions.depthStep}px) rotateY(${rotateY}deg) scale(${scale})`,
|
|
19516
19518
|
filter: distance === 0 ? "blur(0px)" : `blur(${Math.min(absDistance, 2) * mergedEffectOptions.blur}px)`,
|
|
19517
19519
|
pointerEvents: "auto",
|
|
19518
19520
|
zIndex: 30 - absDistance
|
|
@@ -25369,7 +25371,7 @@ function buildUEditorExtensions({
|
|
|
25369
25371
|
types: ["heading", "paragraph", "image"]
|
|
25370
25372
|
}),
|
|
25371
25373
|
table_align_default.configure({
|
|
25372
|
-
resizable:
|
|
25374
|
+
resizable: editable,
|
|
25373
25375
|
handleWidth: 10,
|
|
25374
25376
|
allowTableNodeSelection: true,
|
|
25375
25377
|
HTMLAttributes: {
|
|
@@ -32907,7 +32909,7 @@ function useTableRowResize({
|
|
|
32907
32909
|
}
|
|
32908
32910
|
|
|
32909
32911
|
// src/components/UEditor/use-table-interactions.ts
|
|
32910
|
-
function useUEditorTableInteractions(editor) {
|
|
32912
|
+
function useUEditorTableInteractions(editor, editable = true) {
|
|
32911
32913
|
const editorContentRef = (0, import_react53.useRef)(null);
|
|
32912
32914
|
const tableColumnGuideRef = (0, import_react53.useRef)(null);
|
|
32913
32915
|
const tableRowGuideRef = (0, import_react53.useRef)(null);
|
|
@@ -33026,7 +33028,7 @@ function useUEditorTableInteractions(editor) {
|
|
|
33026
33028
|
setActiveTableCell(getSelectionTableCell(editor.view));
|
|
33027
33029
|
}, [editor, setActiveTableCell]);
|
|
33028
33030
|
(0, import_react53.useEffect)(() => {
|
|
33029
|
-
if (!editor) return void 0;
|
|
33031
|
+
if (!editor || !editable) return void 0;
|
|
33030
33032
|
const proseMirror = editor.view.dom;
|
|
33031
33033
|
const surface = editorContentRef.current;
|
|
33032
33034
|
let selectionSyncTimeoutId = 0;
|
|
@@ -33175,7 +33177,7 @@ function useUEditorTableInteractions(editor) {
|
|
|
33175
33177
|
clearHoveredTableCell();
|
|
33176
33178
|
clearAllTableResizeHover();
|
|
33177
33179
|
};
|
|
33178
|
-
}, [beginResize, cancelResize, cleanupRowResize, clearActiveTableCell, clearAllTableResizeHover, clearHoveredTableCell, editor, handleRowResizePointerMove, handleRowResizePointerUp, hideColumnGuide, hideRowGuide, isRowResizing, showColumnGuide, showRowGuide, syncActiveRowResizeGuide, syncActiveTableCellFromSelection, updateActiveCellHighlight]);
|
|
33180
|
+
}, [beginResize, cancelResize, cleanupRowResize, clearActiveTableCell, clearAllTableResizeHover, clearHoveredTableCell, editable, editor, handleRowResizePointerMove, handleRowResizePointerUp, hideColumnGuide, hideRowGuide, isRowResizing, showColumnGuide, showRowGuide, syncActiveRowResizeGuide, syncActiveTableCellFromSelection, updateActiveCellHighlight]);
|
|
33179
33181
|
return {
|
|
33180
33182
|
editorContentRef,
|
|
33181
33183
|
tableColumnGuideRef,
|
|
@@ -33278,7 +33280,7 @@ var UEditor = import_react54.default.forwardRef(({
|
|
|
33278
33280
|
tableColumnGuideRef,
|
|
33279
33281
|
tableRowGuideRef,
|
|
33280
33282
|
activeTableCellHighlightRef
|
|
33281
|
-
} = useUEditorTableInteractions(editor);
|
|
33283
|
+
} = useUEditorTableInteractions(editor, editable);
|
|
33282
33284
|
(0, import_react54.useImperativeHandle)(
|
|
33283
33285
|
ref,
|
|
33284
33286
|
() => ({
|
|
@@ -33325,11 +33327,14 @@ var UEditor = import_react54.default.forwardRef(({
|
|
|
33325
33327
|
"div",
|
|
33326
33328
|
{
|
|
33327
33329
|
className: cn(
|
|
33328
|
-
"group relative flex flex-col
|
|
33329
|
-
|
|
33330
|
-
|
|
33331
|
-
|
|
33332
|
-
|
|
33330
|
+
"group relative flex flex-col text-card-foreground",
|
|
33331
|
+
editable ? [
|
|
33332
|
+
"rounded-2xl md:rounded-3xl border border-border/50 bg-card overflow-hidden",
|
|
33333
|
+
"transition-[transform,box-shadow,border-color,background-color] duration-300 ease-soft",
|
|
33334
|
+
"shadow-sm focus-within:shadow-md focus-within:border-primary/15",
|
|
33335
|
+
"backdrop-blur-sm",
|
|
33336
|
+
variant === "notion" && "hover:shadow-md"
|
|
33337
|
+
] : "rounded-none",
|
|
33333
33338
|
className
|
|
33334
33339
|
),
|
|
33335
33340
|
children: [
|
|
@@ -33363,7 +33368,7 @@ var UEditor = import_react54.default.forwardRef(({
|
|
|
33363
33368
|
ref: editorContentRef,
|
|
33364
33369
|
className: "relative flex-1 overflow-y-auto",
|
|
33365
33370
|
style: {
|
|
33366
|
-
minHeight,
|
|
33371
|
+
minHeight: editable ? minHeight : void 0,
|
|
33367
33372
|
maxHeight
|
|
33368
33373
|
},
|
|
33369
33374
|
children: [
|