@mt-gloss/ui 0.1.89 → 0.1.90

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,7 +1,7 @@
1
- import { jsx as i, jsxs as f, Fragment as v } from "react/jsx-runtime";
2
- import { createContext as _, useContext as p, useReducer as h, useRef as u, useEffect as s, useMemo as E, useCallback as g, useState as P, useLayoutEffect as C } from "react";
3
- const d = _(null);
4
- function S() {
1
+ import { jsx as i, jsxs as f, Fragment as I } from "react/jsx-runtime";
2
+ import { createContext as h, useContext as p, useReducer as m, useRef as u, useEffect as a, useMemo as E, useCallback as g, useSyncExternalStore as S, useLayoutEffect as _ } from "react";
3
+ const d = h(null);
4
+ function P() {
5
5
  const e = p(d);
6
6
  if (!e)
7
7
  throw new Error(
@@ -9,10 +9,10 @@ function S() {
9
9
  );
10
10
  return e;
11
11
  }
12
- function F() {
12
+ function V() {
13
13
  return p(d);
14
14
  }
15
- const m = {
15
+ const y = {
16
16
  activePanelId: null,
17
17
  activeTrigger: null,
18
18
  bellCutoutOpen: !1,
@@ -20,8 +20,8 @@ const m = {
20
20
  lockHint: null,
21
21
  lastClose: null,
22
22
  pendingSideEffects: []
23
- }, y = /* @__PURE__ */ new Set(["settings"]);
24
- function O(e, n) {
23
+ }, O = /* @__PURE__ */ new Set(["settings"]);
24
+ function L(e, n) {
25
25
  if (e == null || e.kind !== n.kind) return !1;
26
26
  switch (e.kind) {
27
27
  case "bell":
@@ -34,7 +34,7 @@ function O(e, n) {
34
34
  return e.global === n.global && e.align === n.align;
35
35
  }
36
36
  }
37
- function L(e, n) {
37
+ function T(e, n) {
38
38
  switch (n.type) {
39
39
  case "OPEN_PANEL": {
40
40
  if (e.activePanelId && e.isDirty)
@@ -52,7 +52,7 @@ function L(e, n) {
52
52
  }
53
53
  ]
54
54
  };
55
- if (e.activePanelId === n.panelId && O(e.activeTrigger, n.trigger))
55
+ if (e.activePanelId === n.panelId && L(e.activeTrigger, n.trigger))
56
56
  return e;
57
57
  const t = e.activePanelId != null ? [
58
58
  {
@@ -101,7 +101,7 @@ function L(e, n) {
101
101
  case "CLOSE_BELL_CUTOUT":
102
102
  return e.bellCutoutOpen ? { ...e, bellCutoutOpen: !1 } : e;
103
103
  case "BUFFER_BECOMES_DIRTY":
104
- return e.activePanelId == null || !y.has(e.activePanelId) ? {
104
+ return e.activePanelId == null || !O.has(e.activePanelId) ? {
105
105
  ...e,
106
106
  pendingSideEffects: [
107
107
  ...e.pendingSideEffects,
@@ -134,14 +134,14 @@ function L(e, n) {
134
134
  return e;
135
135
  }
136
136
  }
137
- function T(e) {
137
+ function D(e) {
138
138
  return e.activePanelId === "notification-center" ? "notif-center" : e.activePanelId != null && e.bellCutoutOpen ? e.isDirty ? "panel-dirty+cutout" : "panel-clean+cutout" : e.activePanelId != null ? e.isDirty ? "panel-dirty" : "panel-clean" : e.bellCutoutOpen ? "bell-cutout-only" : "idle";
139
139
  }
140
- function D() {
141
- const [e, n] = h(L, m), t = u([]), l = u(null);
142
- s(() => () => {
140
+ function N() {
141
+ const [e, n] = m(T, y), t = u([]), l = u(null);
142
+ a(() => () => {
143
143
  l.current != null && (window.clearTimeout(l.current), l.current = null);
144
- }, []), s(() => {
144
+ }, []), a(() => {
145
145
  if (e.pendingSideEffects.length !== 0) {
146
146
  for (const r of e.pendingSideEffects)
147
147
  r.type === "SCHEDULE_TIMER" ? (l.current != null && window.clearTimeout(l.current), l.current = window.setTimeout(() => {
@@ -157,7 +157,7 @@ function D() {
157
157
  ] : r.type === "INVALID_DISPATCH" && process.env.NODE_ENV !== "production" && console.warn("[panels] INVALID_DISPATCH:", r.reason);
158
158
  n({ type: "DRAIN_SIDE_EFFECTS" });
159
159
  }
160
- }, [e.pendingSideEffects, n]), s(() => {
160
+ }, [e.pendingSideEffects, n]), a(() => {
161
161
  if (!e.lastClose) return;
162
162
  const r = {
163
163
  panelId: e.lastClose.panelId,
@@ -170,15 +170,14 @@ function D() {
170
170
  r
171
171
  ];
172
172
  }, [e.lastClose]);
173
- const o = E(
174
- () => T(e),
175
- // eslint-disable-next-line react-hooks/exhaustive-deps
173
+ const c = E(
174
+ () => D(e),
176
175
  [e.activePanelId, e.bellCutoutOpen, e.isDirty]
177
- ), a = g(() => t.current.slice(), []);
178
- return { state: e, surfaceState: o, dispatch: n, getCloseLog: a };
176
+ ), s = g(() => t.current.slice(), []);
177
+ return { state: e, surfaceState: c, dispatch: n, getCloseLog: s };
179
178
  }
180
- function k({ children: e }) {
181
- const n = D(), t = E(
179
+ function j({ children: e }) {
180
+ const n = N(), t = E(
182
181
  () => n,
183
182
  // Re-publish only when one of the four coordinator fields changes identity.
184
183
  // dispatch + getCloseLog are stable. state + surfaceState change on dispatch.
@@ -186,24 +185,19 @@ function k({ children: e }) {
186
185
  );
187
186
  return /* @__PURE__ */ i(d.Provider, { value: t, children: e });
188
187
  }
189
- const N = {
188
+ const w = {
190
189
  position: "relative",
191
190
  pointerEvents: "auto"
192
191
  };
193
- function x({ children: e, onClose: n, isOpen: t = !0, footer: l }) {
194
- const [o, a] = P(!1);
195
- return C(() => {
196
- const r = requestAnimationFrame(() => a(t));
197
- return () => cancelAnimationFrame(r);
198
- }, [t]), /* @__PURE__ */ f(
192
+ function x({ children: e, onClose: n, footer: t }) {
193
+ return /* @__PURE__ */ f(
199
194
  "div",
200
195
  {
201
196
  "data-chrome": "panel",
202
- "data-open": o ? "true" : "false",
203
197
  role: "dialog",
204
198
  "aria-modal": "true",
205
199
  className: "gloss-panel-chrome",
206
- style: N,
200
+ style: w,
207
201
  children: [
208
202
  /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__header", children: /* @__PURE__ */ i(
209
203
  "button",
@@ -217,23 +211,60 @@ function x({ children: e, onClose: n, isOpen: t = !0, footer: l }) {
217
211
  }
218
212
  ) }),
219
213
  /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__body", children: e }),
220
- l != null && /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__footer", children: l })
214
+ t != null && /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__footer", children: t })
221
215
  ]
222
216
  }
223
217
  );
224
218
  }
225
- const H = {
219
+ const H = "(prefers-reduced-motion: reduce)";
220
+ function v() {
221
+ return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia(H);
222
+ }
223
+ function b(e) {
224
+ const n = v();
225
+ return n ? (n.addEventListener("change", e), () => {
226
+ n.removeEventListener("change", e);
227
+ }) : () => {
228
+ };
229
+ }
230
+ function A() {
231
+ const e = v();
232
+ return e ? e.matches : !1;
233
+ }
234
+ function F() {
235
+ return !1;
236
+ }
237
+ function R() {
238
+ return S(b, A, F);
239
+ }
240
+ function k({ isOpen: e, children: n }) {
241
+ const t = R(), l = [
242
+ "gloss-panel-mount",
243
+ e ? "has-panel" : "",
244
+ t ? "reduced-motion" : ""
245
+ ].filter(Boolean).join(" ");
246
+ return /* @__PURE__ */ i(
247
+ "div",
248
+ {
249
+ className: l,
250
+ "data-mount": "panel",
251
+ "data-open": e ? "true" : "false",
252
+ children: n
253
+ }
254
+ );
255
+ }
256
+ const M = {
226
257
  position: "fixed",
227
258
  top: 0,
228
259
  left: 0,
229
260
  right: 0,
230
261
  height: "var(--tb-h, 60px)",
231
- perspective: "1200px",
262
+ perspective: "var(--panel-perspective, 1500px)",
232
263
  perspectiveOrigin: "center bottom",
233
264
  overflow: "visible",
234
265
  pointerEvents: "none",
235
266
  zIndex: 55
236
- }, b = {
267
+ }, U = {
237
268
  position: "fixed",
238
269
  top: "var(--tb-h, 60px)",
239
270
  left: 0,
@@ -249,57 +280,57 @@ const H = {
249
280
  pointerEvents: "none",
250
281
  background: "rgba(0, 0, 0, 0.04)"
251
282
  };
252
- function R({ panelComponents: e }) {
253
- const { state: n, dispatch: t, getCloseLog: l } = S(), o = n.activePanelId ? e[n.activePanelId] : null;
254
- n.activePanelId && !o && process.env.NODE_ENV !== "production" && console.error(
283
+ function q({ panelComponents: e }) {
284
+ const { state: n, dispatch: t, getCloseLog: l } = P(), c = n.activePanelId ? e[n.activePanelId] : null;
285
+ n.activePanelId && !c && process.env.NODE_ENV !== "production" && console.error(
255
286
  "[panels] No panel component registered for activePanelId:",
256
287
  n.activePanelId
257
- ), s(() => {
288
+ ), a(() => {
258
289
  if (n.activePanelId == null) return;
259
- function c(I) {
260
- I.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
290
+ function o(C) {
291
+ C.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
261
292
  }
262
- return document.addEventListener("keydown", c), () => {
263
- document.removeEventListener("keydown", c);
293
+ return document.addEventListener("keydown", o), () => {
294
+ document.removeEventListener("keydown", o);
264
295
  };
265
296
  }, [n.activePanelId, t]);
266
- const a = u(n);
267
- C(() => {
268
- a.current = n;
269
- }), s(() => {
297
+ const s = u(n);
298
+ _(() => {
299
+ s.current = n;
300
+ }), a(() => {
270
301
  if (process.env.NODE_ENV === "production") return;
271
- const c = window;
272
- return c.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), c.__panelsHostHandle = {
302
+ const o = window;
303
+ return o.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), o.__panelsHostHandle = {
273
304
  dispatch: t,
274
- getState: () => a.current,
305
+ getState: () => s.current,
275
306
  getCloseLog: l
276
307
  }, () => {
277
- c.__panelsHostHandle?.dispatch === t && delete c.__panelsHostHandle;
308
+ o.__panelsHostHandle?.dispatch === t && delete o.__panelsHostHandle;
278
309
  };
279
310
  }, [t, l]);
280
311
  const r = g(() => {
281
312
  t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
282
313
  }, [t]);
283
- return /* @__PURE__ */ i("div", { "data-panel-host": "true", style: H, children: n.activePanelId != null && o != null && /* @__PURE__ */ f(v, { children: [
314
+ return /* @__PURE__ */ i("div", { "data-panel-host": "true", style: M, children: n.activePanelId != null && c != null && /* @__PURE__ */ f(I, { children: [
284
315
  /* @__PURE__ */ i(
285
316
  "div",
286
317
  {
287
318
  "data-panel-scrim": "true",
288
- style: b,
319
+ style: U,
289
320
  onClick: r
290
321
  }
291
322
  ),
292
- /* @__PURE__ */ i(
323
+ /* @__PURE__ */ i(k, { isOpen: !0, children: /* @__PURE__ */ i(
293
324
  x,
294
325
  {
295
326
  isOpen: !0,
296
327
  onClose: () => t({ type: "CLOSE_PANEL", reason: "header-x" }),
297
- children: /* @__PURE__ */ i(o, { isOpen: !0 })
328
+ children: /* @__PURE__ */ i(c, { isOpen: !0 })
298
329
  }
299
- )
330
+ ) })
300
331
  ] }) });
301
332
  }
302
- const U = {
333
+ const z = {
303
334
  "apply-button": !0,
304
335
  // the ONLY commit reason
305
336
  "cancel-button": !1,
@@ -313,14 +344,16 @@ const U = {
313
344
  "nav-escape-hatch": !1
314
345
  };
315
346
  export {
316
- U as C,
317
- k as P,
318
- F as a,
319
- R as b,
347
+ z as C,
348
+ j as P,
349
+ V as a,
350
+ q as b,
320
351
  x as c,
321
- D as d,
322
- T as e,
323
- m as i,
324
- L as r,
325
- S as u
352
+ N as d,
353
+ D as e,
354
+ k as f,
355
+ R as g,
356
+ y as i,
357
+ T as r,
358
+ P as u
326
359
  };
@@ -1,20 +1,20 @@
1
- import { a as i, u, c as p } from "./COMMITS-CoGFzpf4.js";
2
- import { C as I, b as H, P as N, e as k, i as O, r as w, d as A } from "./COMMITS-CoGFzpf4.js";
3
- import { jsxs as c, jsx as s, Fragment as f } from "react/jsx-runtime";
4
- import { useEffect as r, useRef as m, useLayoutEffect as h, useCallback as P } from "react";
5
- function E({ isOpen: t }) {
6
- const n = i()?.state.activeTrigger, o = n?.kind === "card-overflow" ? n.cardId : null;
7
- return /* @__PURE__ */ c("div", { "data-shell": "settings", "aria-hidden": !t, children: [
8
- /* @__PURE__ */ s("p", { style: { margin: 0, fontSize: 14, color: "#495057" }, children: o ? `Settings for card: ${o}` : "Settings" }),
9
- /* @__PURE__ */ s("p", { style: { margin: "8px 0 0", fontSize: 12, color: "#adb5bd" }, children: "Configuration options coming soon." })
1
+ import { a as r, u, f as p, c as f } from "./COMMITS-qn5rIipN.js";
2
+ import { C as H, b as N, P as O, e as w, i as A, r as z, d as M, g as D } from "./COMMITS-qn5rIipN.js";
3
+ import { jsxs as c, jsx as a, Fragment as m } from "react/jsx-runtime";
4
+ import { useEffect as i, useRef as P, useLayoutEffect as h, useCallback as v } from "react";
5
+ function _({ isOpen: e }) {
6
+ const t = r()?.state.activeTrigger, o = t?.kind === "card-overflow" ? t.cardId : null;
7
+ return /* @__PURE__ */ c("div", { "data-shell": "settings", "aria-hidden": !e, children: [
8
+ /* @__PURE__ */ a("p", { style: { margin: 0, fontSize: 14, color: "#495057" }, children: o ? `Settings for card: ${o}` : "Settings" }),
9
+ /* @__PURE__ */ a("p", { style: { margin: "8px 0 0", fontSize: 12, color: "#adb5bd" }, children: "Configuration options coming soon." })
10
10
  ] });
11
11
  }
12
- const g = {
12
+ const y = {
13
13
  position: "fixed",
14
14
  inset: 0,
15
15
  pointerEvents: "none",
16
16
  zIndex: 55
17
- }, v = {
17
+ }, g = {
18
18
  position: "absolute",
19
19
  inset: 0,
20
20
  zIndex: 1,
@@ -23,54 +23,54 @@ const g = {
23
23
  pointerEvents: "none",
24
24
  background: "rgba(0, 0, 0, 0.04)"
25
25
  };
26
- function _() {
27
- const { state: t, dispatch: e, getCloseLog: n } = u();
28
- r(() => {
29
- if (t.activePanelId == null) return;
30
- function a(d) {
31
- d.key === "Escape" && e({ type: "CLOSE_PANEL", reason: "escape-key" });
26
+ function b() {
27
+ const { state: e, dispatch: n, getCloseLog: t } = u();
28
+ i(() => {
29
+ if (e.activePanelId == null) return;
30
+ function l(d) {
31
+ d.key === "Escape" && n({ type: "CLOSE_PANEL", reason: "escape-key" });
32
32
  }
33
- return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
34
- }, [t.activePanelId, e]);
35
- const o = m(t);
33
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
34
+ }, [e.activePanelId, n]);
35
+ const o = P(e);
36
36
  h(() => {
37
- o.current = t;
38
- }), r(() => {
37
+ o.current = e;
38
+ }), i(() => {
39
39
  if (process.env.NODE_ENV === "production") return;
40
- const a = window;
41
- return a.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), a.__panelsHostHandle = {
42
- dispatch: e,
40
+ const l = window;
41
+ return l.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), l.__panelsHostHandle = {
42
+ dispatch: n,
43
43
  getState: () => o.current,
44
- getCloseLog: n
44
+ getCloseLog: t
45
45
  }, () => {
46
- a.__panelsHostHandle?.dispatch === e && delete window.__panelsHostHandle;
46
+ l.__panelsHostHandle?.dispatch === n && delete window.__panelsHostHandle;
47
47
  };
48
- }, [e, n]);
49
- const l = P(() => {
50
- e({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
51
- }, [e]);
52
- return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: g, children: t.activePanelId != null && /* @__PURE__ */ s(
48
+ }, [n, t]);
49
+ const s = v(() => {
50
+ n({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
51
+ }, [n]);
52
+ return /* @__PURE__ */ a("div", { "data-panel-host": "true", style: y, children: e.activePanelId != null && /* @__PURE__ */ a(
53
53
  "div",
54
54
  {
55
55
  "data-panel-scrim": "true",
56
- style: v,
57
- onClick: l
56
+ style: g,
57
+ onClick: s
58
58
  }
59
59
  ) });
60
60
  }
61
- function b({ panelComponents: t }) {
62
- const e = i();
63
- if (e == null) return null;
64
- const { state: n, dispatch: o } = e;
65
- if (n.activePanelId == null) return null;
66
- const l = t[n.activePanelId];
67
- if (l == null)
61
+ function x({ panelComponents: e }) {
62
+ const n = r();
63
+ if (n == null) return null;
64
+ const { state: t, dispatch: o } = n;
65
+ if (t.activePanelId == null) return null;
66
+ const s = e[t.activePanelId];
67
+ if (s == null)
68
68
  return process.env.NODE_ENV !== "production" && console.error(
69
69
  "[panels] No panel component registered for activePanelId:",
70
- n.activePanelId
70
+ t.activePanelId
71
71
  ), null;
72
- const a = n.activePanelId === "settings" ? /* @__PURE__ */ c(f, { children: [
73
- /* @__PURE__ */ s(
72
+ const l = t.activePanelId === "settings" ? /* @__PURE__ */ c(m, { children: [
73
+ /* @__PURE__ */ a(
74
74
  "button",
75
75
  {
76
76
  id: "settings-cancel",
@@ -80,7 +80,7 @@ function b({ panelComponents: t }) {
80
80
  children: "Cancel"
81
81
  }
82
82
  ),
83
- /* @__PURE__ */ s(
83
+ /* @__PURE__ */ a(
84
84
  "button",
85
85
  {
86
86
  id: "settings-apply",
@@ -91,28 +91,34 @@ function b({ panelComponents: t }) {
91
91
  }
92
92
  )
93
93
  ] }) : null;
94
- return /* @__PURE__ */ s(
95
- p,
94
+ return /* @__PURE__ */ a(p, { isOpen: !0, children: /* @__PURE__ */ a(
95
+ f,
96
96
  {
97
97
  isOpen: !0,
98
98
  onClose: () => o({ type: "CLOSE_PANEL", reason: "header-x" }),
99
- footer: a,
100
- children: /* @__PURE__ */ s(l, { isOpen: !0 })
99
+ footer: l,
100
+ children: /* @__PURE__ */ a(s, { isOpen: !0 })
101
101
  }
102
- );
102
+ ) });
103
+ }
104
+ function k(e) {
105
+ return e === null ? null : e.kind === "manage-pages-action" ? `global-${e.align ?? "left"}` : e.kind === "card-overflow" || e.kind === "empty-cell" ? `section-${e.sectionIndex}` : null;
103
106
  }
104
107
  export {
105
- I as COMMITS,
106
- p as PanelChrome,
107
- H as PanelHost,
108
- _ as PanelHostShell,
109
- N as PanelProvider,
110
- b as PanelSlot,
111
- E as SettingsShell,
112
- k as deriveSurfaceState,
113
- O as initialState,
114
- w as reducer,
108
+ H as COMMITS,
109
+ f as PanelChrome,
110
+ N as PanelHost,
111
+ b as PanelHostShell,
112
+ p as PanelMount,
113
+ O as PanelProvider,
114
+ x as PanelSlot,
115
+ _ as SettingsShell,
116
+ w as deriveSurfaceState,
117
+ A as initialState,
118
+ k as positionKey,
119
+ z as reducer,
115
120
  u as usePanelContext,
116
- i as usePanelContextOptional,
117
- A as usePanelCoordinator
121
+ r as usePanelContextOptional,
122
+ M as usePanelCoordinator,
123
+ D as useReducedMotionPanel
118
124
  };
package/index.js CHANGED
@@ -6,7 +6,7 @@ import F, { useRef as P, useEffect as A, useState as E, useCallback as C, useId
6
6
  import { motion as G, useMotionValue as tt, AnimatePresence as at, useDragControls as nt } from "framer-motion";
7
7
  import { B as rt, a as X, b as ce, U as fe } from "./UIContext-DP6JGCto.js";
8
8
  import { c as Wo, u as Vo } from "./UIContext-DP6JGCto.js";
9
- import { C as Uo, c as Yo, b as Zo, P as qo, e as Qo, i as Xo, r as Jo, u as el, a as tl, d as al } from "./COMMITS-CoGFzpf4.js";
9
+ import { C as Uo, c as Yo, b as Zo, P as qo, e as Qo, i as Xo, r as Jo, u as el, a as tl, d as al } from "./COMMITS-qn5rIipN.js";
10
10
  import { createPortal as st } from "react-dom";
11
11
  import { DEFAULT_MARKET_PRESETS as rl, DEFAULT_PINNED as sl, PERIOD_OPTIONS as il, ROLLING_OPTIONS as ol, TODAY_PRESET as ll, findPreset as cl, formatDateRange as dl, formatMarketDates as ul, formatTrend as ml, formatValue as gl, generateMarketId as pl, getAllPresets as hl, getDateRangeForPreset as fl, getPresetLabel as bl, isInRange as vl, isMarketActive as yl, isSameDay as wl, normalizePresetId as _l, toUppercasePresetId as Cl } from "@mt-gloss/utils";
12
12
  import it from "@mui/icons-material/AccessTime";
@@ -2,8 +2,12 @@ import { ReactNode } from 'react';
2
2
  export interface PanelChromeProps {
3
3
  children: ReactNode;
4
4
  onClose: () => void;
5
+ /**
6
+ * @deprecated No-op since Phase 11.5 P3a. PanelMount owns all enter/exit motion.
7
+ * Kept for back-compat with P1/P2 call sites; has no rendering effect.
8
+ */
5
9
  isOpen?: boolean;
6
10
  /** P2 — optional footer slot. Notification-center keeps null (no footer). */
7
11
  footer?: ReactNode;
8
12
  }
9
- export declare function PanelChrome({ children, onClose, isOpen, footer }: PanelChromeProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function PanelChrome({ children, onClose, footer }: PanelChromeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PanelMountProps {
3
+ /** Whether the panel is open. Maps to .has-panel class toggle. */
4
+ isOpen: boolean;
5
+ children: ReactNode;
6
+ }
7
+ export declare function PanelMount({ isOpen, children }: PanelMountProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns `true` when the user's system preference is `prefers-reduced-motion: reduce`.
3
+ * SSR-safe (returns false during server render).
4
+ * Reactive — re-renders the host component when the system pref changes.
5
+ */
6
+ export declare function useReducedMotionPanel(): boolean;
@@ -17,6 +17,10 @@ export type { PanelHostProps, PanelShellProps } from './PanelHost';
17
17
  export type { PanelSlotProps } from './PanelSlot';
18
18
  export type { PanelProviderProps } from './PanelProvider';
19
19
  export type { PanelChromeProps } from './PanelChrome';
20
+ export { positionKey } from './utils/positionKey';
21
+ export { useReducedMotionPanel } from './hooks/useReducedMotionPanel';
22
+ export { PanelMount } from './PanelMount';
23
+ export type { PanelMountProps } from './PanelMount';
20
24
  export { usePanelCoordinator } from './hooks/usePanelCoordinator';
21
25
  export type { UsePanelCoordinatorReturn } from './hooks/usePanelCoordinator';
22
26
  export { reducer, initialState } from './coordinator/coordinator';
@@ -0,0 +1,2 @@
1
+ import { TriggerContext } from '../coordinator/types';
2
+ export declare function positionKey(trigger: TriggerContext | null): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"