@floegence/floe-webapp-core 0.39.9 → 0.39.10

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.
@@ -9,6 +9,8 @@ export type SurfaceFloatingLayerSize = Readonly<{
9
9
  }>;
10
10
  export interface SurfaceFloatingLayerProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children' | 'class' | 'style' | 'ref'> {
11
11
  position: SurfaceFloatingLayerPosition;
12
+ /** Stable trigger or anchor used to resolve the owning projected surface. */
13
+ owner?: Element | null;
12
14
  estimatedSize?: SurfaceFloatingLayerSize;
13
15
  clamp?: boolean;
14
16
  class?: string;
@@ -1,11 +1,11 @@
1
1
  import { createComponent as m, Portal as d, use as y, spread as S, mergeProps as P, insert as R, template as v } from "solid-js/web";
2
- import { splitProps as _, createMemo as i } from "solid-js";
2
+ import { splitProps as _, createMemo as a } from "solid-js";
3
3
  import { cn as g } from "../../utils/cn.js";
4
4
  import { LOCAL_INTERACTION_SURFACE_ATTR as h } from "./localInteractionSurface.js";
5
5
  import { clampMenuPosition as A } from "./menuUtils.js";
6
6
  import { resolveSurfacePortalHost as T, SURFACE_FLOATING_LAYER_ATTR as z, resolveSurfacePortalMount as C, resolveSurfacePortalBoundaryRect as x, isSurfacePortalMode as L, projectSurfacePortalPosition as M } from "./dialogSurfaceScope.js";
7
7
  var $ = /* @__PURE__ */ v("<div>");
8
- function E() {
8
+ function w() {
9
9
  return {
10
10
  left: 0,
11
11
  top: 0,
@@ -15,22 +15,24 @@ function E() {
15
15
  height: 0
16
16
  };
17
17
  }
18
- function j(n) {
19
- const [e, l] = _(n, ["position", "estimatedSize", "clamp", "class", "style", "children", "layerRef"]), o = i(() => T()), r = () => L(o()), c = () => x(o()) ?? E(), u = () => e.clamp !== !1 && !!e.estimatedSize, p = i(() => {
18
+ function O(i) {
19
+ const [e, l] = _(i, ["position", "owner", "estimatedSize", "clamp", "class", "style", "children", "layerRef"]), o = a(() => T({
20
+ owner: e.owner ?? null
21
+ })), r = () => L(o()), c = () => x(o()) ?? w(), u = () => e.clamp !== !1 && !!e.estimatedSize, p = a(() => {
20
22
  const t = e.position;
21
23
  return !u() || !e.estimatedSize ? t : A(t, e.estimatedSize, c());
22
- }), s = () => M(p(), o()), f = () => ({
24
+ }), n = () => M(p(), o()), f = () => ({
23
25
  ...e.style ?? {},
24
- left: `${s().x}px`,
25
- top: `${s().y}px`
26
+ left: `${n().x}px`,
27
+ top: `${n().y}px`
26
28
  });
27
29
  return m(d, {
28
30
  get mount() {
29
31
  return C(o());
30
32
  },
31
33
  get children() {
32
- var t = $(), a = e.layerRef;
33
- return typeof a == "function" ? y(a, t) : e.layerRef = t, S(t, P(l, {
34
+ var t = $(), s = e.layerRef;
35
+ return typeof s == "function" ? y(s, t) : e.layerRef = t, S(t, P(l, {
34
36
  get class() {
35
37
  return g(r() ? "absolute z-20" : "fixed z-50", e.class);
36
38
  },
@@ -46,5 +48,5 @@ function j(n) {
46
48
  });
47
49
  }
48
50
  export {
49
- j as SurfaceFloatingLayer
51
+ O as SurfaceFloatingLayer
50
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.39.9",
3
+ "version": "0.39.10",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",