@floegence/floe-webapp-core 0.52.10 → 0.52.12

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.
@@ -1,17 +1,17 @@
1
- import { spread as c, mergeProps as d, insert as n, createComponent as t, memo as l, Dynamic as u, template as g } from "solid-js/web";
2
- import { splitProps as m, Show as h } from "solid-js";
1
+ import { spread as d, mergeProps as c, insert as n, createComponent as t, memo as g, Dynamic as u, template as l } from "solid-js/web";
2
+ import { splitProps as m, Show as b } from "solid-js";
3
3
  import { cn as a } from "../../utils/cn.js";
4
4
  import { Loader2 as p } from "../icons/index.js";
5
- var v = /* @__PURE__ */ g("<button type=button data-floe-surface-part=action>");
6
- const f = {
7
- default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:scale-[0.98]",
8
- primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:scale-[0.98]",
9
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 active:scale-[0.98]",
10
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground active:scale-[0.98]",
11
- ghost: "hover:bg-accent hover:text-accent-foreground active:scale-[0.98]",
12
- "ghost-destructive": "bg-transparent text-muted-foreground hover:bg-error hover:text-error-foreground active:scale-[0.98]",
13
- destructive: "bg-error text-error-foreground shadow-sm hover:bg-error/90 active:scale-[0.98]"
14
- }, b = {
5
+ var h = /* @__PURE__ */ l("<button type=button data-floe-surface-part=action>");
6
+ const v = {
7
+ default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:bg-primary/80",
8
+ primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:bg-primary/80",
9
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 active:bg-secondary/70",
10
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground active:bg-accent/80",
11
+ ghost: "hover:bg-accent hover:text-accent-foreground active:bg-accent/80",
12
+ "ghost-destructive": "bg-transparent text-muted-foreground hover:bg-error hover:text-error-foreground active:bg-error/80",
13
+ destructive: "bg-error text-error-foreground shadow-sm hover:bg-error/90 active:bg-error/80"
14
+ }, f = {
15
15
  xs: "h-6 px-2 text-[11px] rounded",
16
16
  sm: "h-7 px-2.5 text-xs rounded",
17
17
  md: "h-8 px-3 text-xs rounded-md",
@@ -24,28 +24,28 @@ const f = {
24
24
  lg: "w-4 h-4",
25
25
  icon: "w-4 h-4"
26
26
  };
27
- function k(s) {
28
- const [e, i] = m(s, ["variant", "size", "loading", "icon", "class", "children", "disabled"]), o = () => x[e.size ?? "md"];
27
+ function k(i) {
28
+ const [r, s] = m(i, ["variant", "size", "loading", "icon", "class", "children", "disabled"]), o = () => x[r.size ?? "md"];
29
29
  return (() => {
30
- var r = v();
31
- return c(r, d({
30
+ var e = h();
31
+ return d(e, c({
32
32
  get "data-floe-surface"() {
33
- return e.variant === "ghost" || e.variant === "ghost-destructive" ? void 0 : "raised";
33
+ return r.variant === "ghost" || r.variant === "ghost-destructive" ? void 0 : "raised";
34
34
  },
35
35
  get class() {
36
- return a("inline-flex items-center justify-center gap-1.5 font-medium cursor-pointer", "transition-colors duration-150", "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed", f[e.variant ?? "default"], b[e.size ?? "md"], e.class);
36
+ return a("inline-flex items-center justify-center gap-1.5 font-medium cursor-pointer", "transition-[color,background-color,border-color,box-shadow] duration-120", "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed", v[r.variant ?? "default"], f[r.size ?? "md"], r.class);
37
37
  },
38
38
  get disabled() {
39
- return e.disabled || e.loading;
39
+ return r.disabled || r.loading;
40
40
  }
41
- }, i), !1, !0), n(r, t(h, {
41
+ }, s), !1, !0), n(e, t(b, {
42
42
  get when() {
43
- return e.loading;
43
+ return r.loading;
44
44
  },
45
45
  get fallback() {
46
- return l(() => !!e.icon)() && t(u, {
46
+ return g(() => !!r.icon)() && t(u, {
47
47
  get component() {
48
- return e.icon;
48
+ return r.icon;
49
49
  },
50
50
  get class() {
51
51
  return o();
@@ -59,7 +59,7 @@ function k(s) {
59
59
  }
60
60
  });
61
61
  }
62
- }), null), n(r, () => e.children, null), r;
62
+ }), null), n(e, () => r.children, null), e;
63
63
  })();
64
64
  }
65
65
  export {
@@ -37,9 +37,9 @@ function oe(l) {
37
37
  B(() => {
38
38
  s !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(s), s = null);
39
39
  });
40
- const k = "rounded-lg duration-300 ease-out", P = () => e.enableTilt || r() === "hover-lift" ? "transition-[color,background-color,border-color,box-shadow,transform]" : "transition-[color,background-color,border-color,box-shadow]", j = {
41
- default: "bg-card border border-border shadow-sm hover:shadow-md",
42
- "hover-lift": "bg-card border border-border shadow-sm hover:shadow-xl hover:-translate-y-1",
40
+ const k = "rounded-lg duration-180 ease-out", P = () => e.enableTilt || r() === "hover-lift" ? "transition-[color,background-color,border-color,box-shadow,transform]" : "transition-[color,background-color,border-color,box-shadow]", j = {
41
+ default: "bg-card border border-border shadow-sm hover:shadow-sm",
42
+ "hover-lift": "bg-card border border-border shadow-sm hover:shadow-md hover:-translate-y-0.5",
43
43
  "gradient-border": "relative bg-card overflow-hidden",
44
44
  glass: "backdrop-blur-xl bg-card/30 border border-border/50 shadow-lg",
45
45
  spotlight: "relative bg-card border border-border overflow-hidden",
@@ -1,5 +1,6 @@
1
1
  import { type JSX } from 'solid-js';
2
2
  import { type FloatingWindowViewportInsets } from './floatingWindowGeometry';
3
+ import { type SurfaceFloatingBoundary } from './surfaceFloatingBoundary';
3
4
  export interface FloatingWindowProps {
4
5
  /** Whether the window is open */
5
6
  open: boolean;
@@ -35,6 +36,16 @@ export interface FloatingWindowProps {
35
36
  };
36
37
  /** Safe area inside the browser viewport that the floating window should avoid */
37
38
  viewportInsets?: FloatingWindowViewportInsets;
39
+ /** Optional visible content boundary, measured in client coordinates by Floe. */
40
+ boundary?: SurfaceFloatingBoundary;
41
+ /** Fill the available boundary below this width, without drag/resize controls. Disabled by default. */
42
+ compactBelow?: number;
43
+ /** Localized native window control labels. */
44
+ labels?: {
45
+ close: string;
46
+ maximize: string;
47
+ restore: string;
48
+ };
38
49
  /** Whether the window can be resized */
39
50
  resizable?: boolean;
40
51
  /** Whether the window can be dragged */