@ai-matrx/canvas 0.2.0 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2
4
+
5
+ - `CanvasToggle` takes `variant` (`"transparent"` default, or `"glass"`). The tap-target placement rules forbid one plain icon in a glass row; a host whose header buttons are glass passes `variant="glass"` so the toggle matches them.
6
+
7
+ ### Consumer action
8
+
9
+ - None. A host with a glass header row should pass `variant="glass"`.
10
+
11
+ ## 0.2.1
12
+
13
+ - `BrowserBar` keeps its own 40px height in a panel body. 0.2.0 gave it `flex: 1 1 auto`, so in a column body it grew and sat in the middle of the panel (seen in the desktop browser panel). It still fills the width in a header's leading slot.
14
+
15
+ ### Consumer action
16
+
17
+ - None.
18
+
3
19
  ## 0.2.0
4
20
 
5
21
  One canvas for the web app and the desktop app: the package now owns the pane chrome everywhere and carries what an Electron host needs (a store in the main process, native views, several windows).
package/dist/react.cjs CHANGED
@@ -2517,14 +2517,18 @@ function SplitChild({ size, handle, children }) {
2517
2517
  ] });
2518
2518
  }
2519
2519
  var isMac2 = () => typeof navigator !== "undefined" && /mac|iphone|ipad/i.test(navigator.platform ?? "");
2520
- function CanvasToggle({ className }) {
2520
+ function CanvasToggle({
2521
+ className,
2522
+ variant = "transparent"
2523
+ }) {
2521
2524
  const { controller, windowId } = useCanvasInternals();
2522
2525
  const isOpen = useCanvasState((s) => selectCanvasIsOpen(s, windowId));
2523
2526
  const count = useCanvasState((s) => selectCanvasWindowItemCount(s, windowId));
2524
2527
  const hint = canvasShortcutHint("canvas.toggle", isMac2());
2528
+ const Button = variant === "glass" ? import_tap_target.TapTargetButton : import_tap_target.TapTargetButtonTransparent;
2525
2529
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: ["mxc-toggle", className].filter(Boolean).join(" "), "data-open": isOpen ? "" : void 0, children: [
2526
2530
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2527
- import_tap_target.TapTargetButtonTransparent,
2531
+ Button,
2528
2532
  {
2529
2533
  ariaLabel: isOpen ? "Hide canvas" : "Show canvas",
2530
2534
  tooltip: `${isOpen ? "Hide canvas" : "Show canvas"}${hint ? ` (${hint})` : ""}`,