+
+ Insert Mode
-
- {/* Split Percentage */}
-
-
-
-
- {splitPercentage}% / {100 - splitPercentage}%
-
-
-
setSplitPercentage(Number(e.target.value))}
- className="w-full h-2 bg-muted rounded-lg appearance-none cursor-pointer accent-primary"
- />
-
- Existing content gets {splitPercentage}%
- New window gets {100 - splitPercentage}%
-
-
-
- {/* Insertion Position */}
-
-
-
-
-
-
-
-
-
- {/* Preview */}
-
-
Preview:
-
-
- {insertionMode === "smart" && "Smart mode"}
- {insertionMode === "row" && "Horizontal splits"}
- {insertionMode === "column" && "Vertical splits"}
-
- {" · "}
-
- {splitPercentage}%/{100 - splitPercentage}% split
-
- {" · "}
-
- New window on{" "}
- {insertionPosition === "first" ? "left/top" : "right/bottom"}
-
-
+
+ {modes.map((mode) => {
+ const Icon = mode.icon;
+ const isActive = config.insertionMode === mode.id;
+ return (
+
+ );
+ })}
- {/* Footer */}
-
-
-
-
-
+
+
+ Split
+
+ {config.splitPercentage}/{100 - config.splitPercentage}
+
+
setSplitPercentage(Number(e.target.value))}
+ className="w-full h-1.5 bg-muted rounded-lg appearance-none cursor-pointer accent-accent"
+ />
-
-
+
+
);
}
diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx
new file mode 100644
index 0000000..f906c34
--- /dev/null
+++ b/src/components/ui/popover.tsx
@@ -0,0 +1,30 @@
+import * as React from "react";
+import * as PopoverPrimitive from "@radix-ui/react-popover";
+import { cn } from "@/lib/utils";
+
+const Popover = PopoverPrimitive.Root;
+
+const PopoverTrigger = PopoverPrimitive.Trigger;
+
+const PopoverAnchor = PopoverPrimitive.Anchor;
+
+const PopoverContent = React.forwardRef<
+ React.ElementRef
,
+ React.ComponentPropsWithoutRef
+>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
+
+
+
+));
+PopoverContent.displayName = PopoverPrimitive.Content.displayName;
+
+export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
diff --git a/src/index.css b/src/index.css
index 1453f9f..598aacf 100644
--- a/src/index.css
+++ b/src/index.css
@@ -123,6 +123,11 @@
background: hsl(var(--background));
}
+/* Smooth animations for window resizing and repositioning */
+.mosaic.mosaic-blueprint-theme.mosaic-blueprint-theme .mosaic-tile {
+ transition: width 0.2s ease-out, height 0.2s ease-out, top 0.2s ease-out, left 0.2s ease-out;
+}
+
.mosaic.mosaic-blueprint-theme.mosaic-blueprint-theme
.mosaic-window
.mosaic-window-toolbar {