@ramme-io/ui 5.0.1 → 5.0.3

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 { jsxs as f, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as n } from "react/jsx-runtime";
2
2
  import t from "react";
3
3
  import { Prism as x } from "react-syntax-highlighter";
4
- import { oneDark as k, oneLight as w } from "react-syntax-highlighter/dist/esm/styles/prism";
4
+ import { oneDark as w, oneLight as k } from "react-syntax-highlighter/dist/esm/styles/prism";
5
5
  import { cn as C } from "../../utils/cn.js";
6
6
  import { Icon as S } from "../ui/Icon.js";
7
7
  function T() {
@@ -9,9 +9,9 @@ function T() {
9
9
  () => typeof document < "u" && document.documentElement.classList.contains("dark")
10
10
  );
11
11
  return t.useEffect(() => {
12
- const o = document.documentElement, s = () => e(o.classList.contains("dark"));
13
- s();
14
- const i = new MutationObserver(s);
12
+ const o = document.documentElement, a = () => e(o.classList.contains("dark"));
13
+ a();
14
+ const i = new MutationObserver(a);
15
15
  return i.observe(o, { attributes: !0, attributeFilter: ["class"] }), () => i.disconnect();
16
16
  }, []), r;
17
17
  }
@@ -24,21 +24,21 @@ async function N(r) {
24
24
  const e = document.createElement("textarea");
25
25
  e.value = r, e.setAttribute("readonly", ""), e.style.position = "fixed", e.style.opacity = "0", document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
26
26
  }
27
- const B = ({
27
+ const L = ({
28
28
  code: r,
29
29
  language: e = "tsx",
30
30
  filename: o,
31
- showLineNumbers: s = !1,
31
+ showLineNumbers: a = !1,
32
32
  highlightLines: i,
33
- wrap: b = !1,
33
+ wrap: m = !1,
34
34
  hideCopy: v = !1,
35
35
  className: g
36
36
  }) => {
37
- const y = T(), [a, m] = t.useState(!1), d = t.useRef(), p = t.useMemo(() => r.replace(/^\n+|\s+$/g, ""), [r]), u = o || e;
37
+ const y = T(), [s, p] = t.useState(!1), d = t.useRef(), f = t.useMemo(() => r.replace(/^\n+|\s+$/g, ""), [r]), u = o || e;
38
38
  t.useEffect(() => () => clearTimeout(d.current), []);
39
39
  const h = async () => {
40
40
  try {
41
- await N(p), m(!0), clearTimeout(d.current), d.current = setTimeout(() => m(!1), 2e3);
41
+ await N(f), p(!0), clearTimeout(d.current), d.current = setTimeout(() => p(!1), 2e3);
42
42
  } catch (l) {
43
43
  console.warn("[CodeBlock] Copy failed", l);
44
44
  }
@@ -46,7 +46,7 @@ const B = ({
46
46
  () => new Set(i ?? []),
47
47
  [i]
48
48
  );
49
- return /* @__PURE__ */ f(
49
+ return /* @__PURE__ */ b(
50
50
  "div",
51
51
  {
52
52
  className: C(
@@ -54,7 +54,7 @@ const B = ({
54
54
  g
55
55
  ),
56
56
  children: [
57
- /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2 border-b border-border bg-surface-muted pl-4 pr-1.5", children: [
57
+ /* @__PURE__ */ b("div", { className: "flex items-center justify-between gap-2 border-b border-border bg-surface-muted pl-4 pr-1.5", children: [
58
58
  /* @__PURE__ */ n("span", { className: "truncate py-2 font-mono text-2xs font-medium uppercase tracking-wider text-muted-foreground", children: u }),
59
59
  !v && /* @__PURE__ */ n(
60
60
  "button",
@@ -62,13 +62,13 @@ const B = ({
62
62
  type: "button",
63
63
  onClick: h,
64
64
  className: "inline-flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-surface-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
65
- "aria-label": a ? "Copied" : `Copy ${u} snippet to clipboard`,
65
+ "aria-label": s ? "Copied" : `Copy ${u} snippet to clipboard`,
66
66
  children: /* @__PURE__ */ n(
67
67
  S,
68
68
  {
69
- name: a ? "check" : "copy",
69
+ name: s ? "check" : "copy",
70
70
  size: 16,
71
- className: a ? "text-success" : void 0
71
+ className: s ? "text-success" : void 0
72
72
  }
73
73
  )
74
74
  }
@@ -85,8 +85,8 @@ const B = ({
85
85
  x,
86
86
  {
87
87
  language: e,
88
- style: y ? k : w,
89
- showLineNumbers: s,
88
+ style: y ? w : k,
89
+ showLineNumbers: a,
90
90
  wrapLines: c.size > 0,
91
91
  lineProps: c.size > 0 ? (l) => ({
92
92
  style: {
@@ -111,7 +111,7 @@ const B = ({
111
111
  fontSize: "var(--app-step--1)",
112
112
  lineHeight: "var(--app-leading-relaxed)",
113
113
  tabSize: 2,
114
- ...b ? { whiteSpace: "pre-wrap", wordBreak: "break-word" } : {}
114
+ ...m ? { whiteSpace: "pre-wrap", wordBreak: "break-word" } : {}
115
115
  },
116
116
  codeTagProps: {
117
117
  style: {
@@ -120,19 +120,23 @@ const B = ({
120
120
  fontFamily: "var(--app-font-mono)",
121
121
  // Ligatures off: a tutorial shows the characters you must type,
122
122
  // and a font that draws `=>` as one arrow misleads a beginner.
123
- fontVariantLigatures: "none"
123
+ fontVariantLigatures: "none",
124
+ // Wrap has to be said here too. The theme styles the inner <code>
125
+ // with `white-space: pre`, which beats the <pre>'s pre-wrap above,
126
+ // so for as long as only the <pre> had it, `wrap` wrapped nothing.
127
+ ...m ? { whiteSpace: "pre-wrap", wordBreak: "break-word" } : {}
124
128
  }
125
129
  },
126
- children: p
130
+ children: f
127
131
  }
128
132
  )
129
133
  }
130
134
  ),
131
- /* @__PURE__ */ n("span", { "aria-live": "polite", className: "sr-only", children: a ? "Copied to clipboard" : "" })
135
+ /* @__PURE__ */ n("span", { "aria-live": "polite", className: "sr-only", children: s ? "Copied to clipboard" : "" })
132
136
  ]
133
137
  }
134
138
  );
135
139
  };
136
140
  export {
137
- B as CodeBlock
141
+ L as CodeBlock
138
142
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import { useState as m, useRef as E, useEffect as x, useCallback as S } from "react";
3
- import { createPortal as j } from "react-dom";
4
- import { useDialogFocus as A } from "../../lib/hooks/useDialogFocus.js";
2
+ import { useState as m, useRef as A, useEffect as x, useCallback as E } from "react";
3
+ import { createPortal as S } from "react-dom";
4
+ import { useDialogFocus as j } from "../../lib/hooks/useDialogFocus.js";
5
5
  import { Icon as F } from "../ui/Icon.js";
6
6
  import { cn as y } from "../../utils/cn.js";
7
7
  import { useBodyScrollLock as I } from "../../lib/hooks/useBodyScrollLock.js";
@@ -17,25 +17,25 @@ const Y = ({
17
17
  overlayDismiss: N = !0,
18
18
  className: D
19
19
  }) => {
20
- const [s, b] = m(!1), [g, p] = m(!1), w = E(null), [l] = m(
20
+ const [s, b] = m(!1), [g, p] = m(!1), w = A(null), [c] = m(
21
21
  () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
22
22
  ), i = [...k].sort((o, a) => o - a), t = R({
23
23
  detents: i,
24
24
  // Under reduced motion there is no drag, so a partial height would be a
25
25
  // height the reader can never change. Open fully instead.
26
- initialDetent: l ? i.length - 1 : f,
26
+ initialDetent: c ? i.length - 1 : f,
27
27
  onDismiss: r,
28
- reducedMotion: l
28
+ reducedMotion: c
29
29
  });
30
30
  I(n), x(() => {
31
31
  let o, a;
32
- return n ? (b(!0), t.setHeight(i[l ? i.length - 1 : f] ?? i[0]), o = requestAnimationFrame(() => {
32
+ return n ? (b(!0), t.setHeight(i[c ? i.length - 1 : f] ?? i[0]), o = requestAnimationFrame(() => {
33
33
  a = window.setTimeout(() => p(!0), 10);
34
34
  })) : (p(!1), a = window.setTimeout(() => b(!1), 320)), () => {
35
35
  cancelAnimationFrame(o), clearTimeout(a);
36
36
  };
37
- }, [n]), A(s, w);
38
- const c = S(
37
+ }, [n]), j(s, w);
38
+ const l = E(
39
39
  (o) => {
40
40
  o.key === "Escape" && n && r();
41
41
  },
@@ -43,10 +43,10 @@ const Y = ({
43
43
  );
44
44
  if (x(() => {
45
45
  if (s)
46
- return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
47
- }, [s, c]), !s) return null;
46
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
47
+ }, [s, l]), !s) return null;
48
48
  const P = g ? 1 - t.height : 1;
49
- return j(
49
+ return S(
50
50
  /* @__PURE__ */ u(
51
51
  "div",
52
52
  {
@@ -126,6 +126,7 @@ const Y = ({
126
126
  "div",
127
127
  {
128
128
  onPointerDown: t.onBodyPointerDown,
129
+ style: { touchAction: t.bodyTouchAction },
129
130
  className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-4",
130
131
  children: v
131
132
  }
package/dist/index.js CHANGED
@@ -5,12 +5,12 @@ import { mockChartData as f, mockTableData as x } from "./data/mockData.js";
5
5
  import { Loader as n } from "./blocks/ai/Loader.js";
6
6
  import { Actions as T, Suggestion as s } from "./blocks/ai/Actions.js";
7
7
  import { PromptInput as h } from "./blocks/ai/PromptInput.js";
8
- import { Message as S } from "./blocks/ai/Message.js";
8
+ import { Message as g } from "./blocks/ai/Message.js";
9
9
  import { Conversation as u } from "./blocks/ai/Conversation.js";
10
10
  import { ChatFAB as b } from "./blocks/ai/ChatFAB.js";
11
- import { AIChatThread as I } from "./components/ai/AIChatThread/AIChatThread.js";
11
+ import { AIChatThread as P } from "./components/ai/AIChatThread/AIChatThread.js";
12
12
  import { KeyInjectionOverlay as A } from "./components/ai/KeyInjectionOverlay.js";
13
- import { TAY_DREAMBOAT_THEME as L, ThemeProvider as R, availableThemes as E, useTheme as M } from "./contexts/ThemeContext.js";
13
+ import { TAY_DREAMBOAT_THEME as B, ThemeProvider as R, availableThemes as E, useTheme as M } from "./contexts/ThemeContext.js";
14
14
  import { AuthLayout as y } from "./components/auth/AuthLayout.js";
15
15
  import { LoginPage as w } from "./components/auth/LoginPage.js";
16
16
  import { SignupPage as _ } from "./components/auth/SignupPage.js";
@@ -30,12 +30,12 @@ import { KpiGrid as xr } from "./components/data-display/KpiGrid.js";
30
30
  import { StatusBadge as nr } from "./components/data-display/StatusBadge.js";
31
31
  import { DocumentScanView as Tr } from "./components/data-display/DocumentScanView.js";
32
32
  import { Alert as dr } from "./components/feedback/Alert.js";
33
- import { EmptyState as gr } from "./components/feedback/EmptyState.js";
33
+ import { EmptyState as Sr } from "./components/feedback/EmptyState.js";
34
34
  import { Skeleton as Cr } from "./components/feedback/Skeleton.js";
35
35
  import { Plan as cr } from "./components/feedback/Plan.js";
36
36
  import { TippyTooltip as Dr } from "./components/feedback/TippyTooltip.js";
37
- import { Toast as Pr } from "./components/feedback/Toast.js";
38
- import { ToastProvider as Br, useToast as Lr } from "./components/feedback/ToastProvider.js";
37
+ import { Toast as Ir } from "./components/feedback/Toast.js";
38
+ import { ToastProvider as Lr, useToast as Br } from "./components/feedback/ToastProvider.js";
39
39
  import { Label as Er } from "./components/forms/Label.js";
40
40
  import { ButtonGroup as vr } from "./components/forms/ButtonGroup.js";
41
41
  import { Checkbox as Fr } from "./components/forms/Checkbox.js";
@@ -54,236 +54,237 @@ import { ToggleSwitch as to, ToggleSwitch as mo } from "./components/forms/Toggl
54
54
  import { useDataFetch as ao } from "./lib/hooks/useDataFetch.js";
55
55
  import { useChartTheme as xo } from "./lib/hooks/useChartTheme.js";
56
56
  import { MOBILE_BREAKPOINT_PX as no, MOBILE_BREAKPOINT_QUERY as lo, useIsMobile as To, useMediaQuery as so } from "./lib/hooks/useMediaQuery.js";
57
- import { useBodyScrollLock as go } from "./lib/hooks/useBodyScrollLock.js";
58
- import { DISMISS_THRESHOLD as Co, FLICK_VELOCITY as uo, settleTo as co, useSheetGesture as bo } from "./lib/hooks/useSheetGesture.js";
57
+ import { useBodyScrollLock as So } from "./lib/hooks/useBodyScrollLock.js";
58
+ import { DISMISS_THRESHOLD as Co, DRAG_SLOP as uo, FLICK_VELOCITY as co, settleTo as bo, useSheetGesture as Do } from "./lib/hooks/useSheetGesture.js";
59
59
  import { useDialogFocus as Io } from "./lib/hooks/useDialogFocus.js";
60
- import { CircularDial as Ao } from "./components/hardware/CircularDial.js";
61
- import { HardwareCommandButton as Lo } from "./components/hardware/HardwareCommandButton.js";
62
- import { Sparkline as Eo } from "./components/hardware/Sparkline.js";
63
- import { EdgeInsightTerminal as vo } from "./components/hardware/EdgeInsightTerminal.js";
64
- import { DeviceCard as Fo } from "./blocks/iot/DeviceCard.js";
65
- import { WaterPumpControl as Oo } from "./blocks/iot/WaterPumpControl.js";
66
- import { TelemetryLog as ko } from "./blocks/iot/TelemetryLog.js";
67
- import { DataCard as Go } from "./components/molecular/DataCard.js";
68
- import { StateMatrix as Ko } from "./components/molecular/StateMatrix.js";
69
- import { ConnectorOverlay as Uo } from "./components/molecular/ConnectorOverlay.js";
70
- import { AppShell as zo } from "./components/layout/AppShell.js";
71
- import { SettingsContainer as Wo } from "./components/layout/SettingsContainer.js";
72
- import { DetailDrawer as Xo } from "./components/layout/DetailDrawer.js";
73
- import { RammeInspectorTrigger as Jo } from "./components/layout/RammeInspectorTrigger.js";
74
- import { AboutRamme as $o } from "./components/layout/AboutRamme.js";
75
- import { Header as oe } from "./components/layout/Header.js";
76
- import { Toolbar as te } from "./components/layout/Toolbar.js";
77
- import { FilterPanel as pe } from "./components/layout/FilterPanel.js";
78
- import { Statusbar as fe } from "./components/layout/Statusbar.js";
79
- import { Accordion as ie, AccordionItem as ne } from "./components/layout/Accordion.js";
80
- import { Card as Te, CardContent as se, CardDescription as de, CardFooter as he, CardHeader as ge, CardLabel as Se, CardTitle as Ce } from "./components/layout/Card.js";
81
- import { Drawer as ce } from "./components/layout/Drawer.js";
82
- import { Sheet as De } from "./components/layout/Sheet.js";
83
- import { DefinitionDescription as Pe, DefinitionList as Ae, DefinitionTerm as Be, List as Le, ListItem as Re } from "./components/layout/List.js";
84
- import { Modal as Me } from "./components/layout/Modal.js";
85
- import { Sidebar as ye } from "./components/layout/Sidebar.js";
86
- import { ActionBar as we } from "./components/layout/ActionBar.js";
87
- import { PageContainer as _e } from "./components/layout/PageContainer.js";
88
- import { PageHeader as He } from "./components/layout/PageHeader.js";
89
- import { SectionHeader as Ve } from "./components/layout/SectionHeader.js";
90
- import { ButtonItem as Ne, UserNav as Ue } from "./components/layout/UserNav.js";
91
- import { CollectionLayout as ze } from "./components/layout/CollectionLayout.js";
92
- import { DenseMetricRibbon as We } from "./components/layout/DenseMetricRibbon.js";
93
- import { BreadcrumbItem as Xe, Breadcrumbs as qe } from "./components/navigation/Breadcrumbs.js";
94
- import { Menu as Ze, MenuDivider as $e, MenuItem as rt } from "./components/navigation/Menu.js";
95
- import { MobileNav as et } from "./components/navigation/MobileNav.js";
96
- import { Pagination as mt } from "./components/navigation/Pagination.js";
97
- import { Stepper as at } from "./components/navigation/Stepper.js";
98
- import { TabPanel as xt, Tabs as it } from "./components/navigation/Tabs.js";
99
- import { Avatar as lt } from "./components/ui/Avatar.js";
100
- import { Badge as st, badgeVariants as dt } from "./components/ui/Badge.js";
101
- import { Button as gt, buttonVariants as St } from "./components/ui/Button.js";
102
- import { Icon as ut } from "./components/ui/Icon.js";
103
- import { BrandLogo as bt } from "./components/ui/BrandLogo.js";
60
+ import { CircularDial as Lo } from "./components/hardware/CircularDial.js";
61
+ import { HardwareCommandButton as Ro } from "./components/hardware/HardwareCommandButton.js";
62
+ import { Sparkline as Mo } from "./components/hardware/Sparkline.js";
63
+ import { EdgeInsightTerminal as yo } from "./components/hardware/EdgeInsightTerminal.js";
64
+ import { DeviceCard as wo } from "./blocks/iot/DeviceCard.js";
65
+ import { WaterPumpControl as _o } from "./blocks/iot/WaterPumpControl.js";
66
+ import { TelemetryLog as Ho } from "./blocks/iot/TelemetryLog.js";
67
+ import { DataCard as Vo } from "./components/molecular/DataCard.js";
68
+ import { StateMatrix as No } from "./components/molecular/StateMatrix.js";
69
+ import { ConnectorOverlay as Yo } from "./components/molecular/ConnectorOverlay.js";
70
+ import { AppShell as Qo } from "./components/layout/AppShell.js";
71
+ import { SettingsContainer as jo } from "./components/layout/SettingsContainer.js";
72
+ import { DetailDrawer as qo } from "./components/layout/DetailDrawer.js";
73
+ import { RammeInspectorTrigger as Zo } from "./components/layout/RammeInspectorTrigger.js";
74
+ import { AboutRamme as re } from "./components/layout/AboutRamme.js";
75
+ import { Header as ee } from "./components/layout/Header.js";
76
+ import { Toolbar as me } from "./components/layout/Toolbar.js";
77
+ import { FilterPanel as ae } from "./components/layout/FilterPanel.js";
78
+ import { Statusbar as xe } from "./components/layout/Statusbar.js";
79
+ import { Accordion as ne, AccordionItem as le } from "./components/layout/Accordion.js";
80
+ import { Card as se, CardContent as de, CardDescription as he, CardFooter as Se, CardHeader as ge, CardLabel as Ce, CardTitle as ue } from "./components/layout/Card.js";
81
+ import { Drawer as be } from "./components/layout/Drawer.js";
82
+ import { Sheet as Pe } from "./components/layout/Sheet.js";
83
+ import { DefinitionDescription as Ae, DefinitionList as Le, DefinitionTerm as Be, List as Re, ListItem as Ee } from "./components/layout/List.js";
84
+ import { Modal as ve } from "./components/layout/Modal.js";
85
+ import { Sidebar as Fe } from "./components/layout/Sidebar.js";
86
+ import { ActionBar as Oe } from "./components/layout/ActionBar.js";
87
+ import { PageContainer as ke } from "./components/layout/PageContainer.js";
88
+ import { PageHeader as Ge } from "./components/layout/PageHeader.js";
89
+ import { SectionHeader as Ke } from "./components/layout/SectionHeader.js";
90
+ import { ButtonItem as Ue, UserNav as Ye } from "./components/layout/UserNav.js";
91
+ import { CollectionLayout as Qe } from "./components/layout/CollectionLayout.js";
92
+ import { DenseMetricRibbon as je } from "./components/layout/DenseMetricRibbon.js";
93
+ import { BreadcrumbItem as qe, Breadcrumbs as Je } from "./components/navigation/Breadcrumbs.js";
94
+ import { Menu as $e, MenuDivider as rt, MenuItem as ot } from "./components/navigation/Menu.js";
95
+ import { MobileNav as tt } from "./components/navigation/MobileNav.js";
96
+ import { Pagination as pt } from "./components/navigation/Pagination.js";
97
+ import { Stepper as ft } from "./components/navigation/Stepper.js";
98
+ import { TabPanel as it, Tabs as nt } from "./components/navigation/Tabs.js";
99
+ import { Avatar as Tt } from "./components/ui/Avatar.js";
100
+ import { Badge as dt, badgeVariants as ht } from "./components/ui/Badge.js";
101
+ import { Button as gt, buttonVariants as Ct } from "./components/ui/Button.js";
102
+ import { Icon as ct } from "./components/ui/Icon.js";
103
+ import { BrandLogo as Dt } from "./components/ui/BrandLogo.js";
104
104
  import { cn as It } from "./utils/cn.js";
105
- import { formatValue as At } from "./lib/formatters.js";
106
- import { ThemeSynthesizer as Lt } from "./components/theme/ThemeSynthesizer.js";
107
- import { AestheticProfileGrid as Et } from "./components/theme/AestheticProfileGrid.js";
108
- import { FineTuningControls as vt } from "./components/theme/FineTuningControls.js";
109
- import { PaletteSwatch as Ft, ThemeLivePreview as wt } from "./components/theme/ThemeLivePreview.js";
110
- import { ThemeSettings as _t } from "./components/theme/ThemeSettings.js";
111
- import { ThemeLab as Ht } from "./components/theme/ThemeLab.js";
112
- import { AESTHETIC_PROFILES as Vt, generateFromProfile as Kt, generateFromPrompt as Nt, generateRandom as Ut, hslToCssString as Yt, hslToRgb as zt, hslToRgbString as Qt, lightToDark as Wt, paletteToRgbVars as jt } from "./lib/theme/ThemeGenerator.logic.js";
113
- import { THEME_TOKEN_VARS as qt, applyThemeToDom as Jt, generateRandomTheme as Zt, getContrastColor as $t, hexToRgbTriplet as rm, isCustomTheme as om, loadGoogleFont as em, randomRgb as tm, tokensToVars as mm } from "./lib/theme/themeUtils.js";
114
- import { generateThemeFromPrompt as am } from "./lib/theme/themeAgent.js";
115
- import { TelemetryGraph as xm } from "./components/ai/TelemetryGraph/TelemetryGraph.js";
116
- import { ShowroomContainer as nm } from "./components/showroom/ShowroomContainer.js";
117
- import { ShowroomSidebar as Tm } from "./components/showroom/ShowroomSidebar.js";
118
- import { ShowroomCanvas as dm } from "./components/showroom/ShowroomCanvas.js";
105
+ import { formatValue as Lt } from "./lib/formatters.js";
106
+ import { ThemeSynthesizer as Rt } from "./components/theme/ThemeSynthesizer.js";
107
+ import { AestheticProfileGrid as Mt } from "./components/theme/AestheticProfileGrid.js";
108
+ import { FineTuningControls as yt } from "./components/theme/FineTuningControls.js";
109
+ import { PaletteSwatch as wt, ThemeLivePreview as Ot } from "./components/theme/ThemeLivePreview.js";
110
+ import { ThemeSettings as kt } from "./components/theme/ThemeSettings.js";
111
+ import { ThemeLab as Gt } from "./components/theme/ThemeLab.js";
112
+ import { AESTHETIC_PROFILES as Kt, generateFromProfile as Nt, generateFromPrompt as Ut, generateRandom as Yt, hslToCssString as zt, hslToRgb as Qt, hslToRgbString as Wt, lightToDark as jt, paletteToRgbVars as Xt } from "./lib/theme/ThemeGenerator.logic.js";
113
+ import { THEME_TOKEN_VARS as Jt, applyThemeToDom as Zt, generateRandomTheme as $t, getContrastColor as rm, hexToRgbTriplet as om, isCustomTheme as em, loadGoogleFont as tm, randomRgb as mm, tokensToVars as pm } from "./lib/theme/themeUtils.js";
114
+ import { generateThemeFromPrompt as fm } from "./lib/theme/themeAgent.js";
115
+ import { TelemetryGraph as im } from "./components/ai/TelemetryGraph/TelemetryGraph.js";
116
+ import { ShowroomContainer as lm } from "./components/showroom/ShowroomContainer.js";
117
+ import { ShowroomSidebar as sm } from "./components/showroom/ShowroomSidebar.js";
118
+ import { ShowroomCanvas as hm } from "./components/showroom/ShowroomCanvas.js";
119
119
  import { SkuBadge as gm } from "./components/showroom/SkuBadge.js";
120
- import { resolvePreview as Cm } from "./components/showroom/ShowroomRenderer.js";
120
+ import { resolvePreview as um } from "./components/showroom/ShowroomRenderer.js";
121
121
  export {
122
- Vt as AESTHETIC_PROFILES,
123
- I as AIChatThread,
122
+ Kt as AESTHETIC_PROFILES,
123
+ P as AIChatThread,
124
124
  p as AUTO_REGISTRY,
125
- $o as AboutRamme,
126
- ie as Accordion,
127
- ne as AccordionItem,
128
- we as ActionBar,
125
+ re as AboutRamme,
126
+ ne as Accordion,
127
+ le as AccordionItem,
128
+ Oe as ActionBar,
129
129
  T as Actions,
130
130
  V as ActivityFeed,
131
- Et as AestheticProfileGrid,
131
+ Mt as AestheticProfileGrid,
132
132
  dr as Alert,
133
- zo as AppShell,
133
+ Qo as AppShell,
134
134
  Q as AreaChart,
135
135
  y as AuthLayout,
136
- lt as Avatar,
137
- st as Badge,
136
+ Tt as Avatar,
137
+ dt as Badge,
138
138
  j as BarChart,
139
- bt as BrandLogo,
140
- Xe as BreadcrumbItem,
141
- qe as Breadcrumbs,
139
+ Dt as BrandLogo,
140
+ qe as BreadcrumbItem,
141
+ Je as Breadcrumbs,
142
142
  gt as Button,
143
143
  vr as ButtonGroup,
144
- Ne as ButtonItem,
145
- Te as Card,
146
- se as CardContent,
147
- de as CardDescription,
148
- he as CardFooter,
144
+ Ue as ButtonItem,
145
+ se as Card,
146
+ de as CardContent,
147
+ he as CardDescription,
148
+ Se as CardFooter,
149
149
  ge as CardHeader,
150
- Se as CardLabel,
151
- Ce as CardTitle,
150
+ Ce as CardLabel,
151
+ ue as CardTitle,
152
152
  q as ChartWithTable,
153
153
  b as ChatFAB,
154
154
  Fr as Checkbox,
155
- Ao as CircularDial,
155
+ Lo as CircularDial,
156
156
  mr as CodeBlock,
157
- ze as CollectionLayout,
157
+ Qe as CollectionLayout,
158
158
  Or as ComboBox,
159
- Uo as ConnectorOverlay,
159
+ Yo as ConnectorOverlay,
160
160
  u as Conversation,
161
161
  Co as DISMISS_THRESHOLD,
162
- Go as DataCard,
162
+ uo as DRAG_SLOP,
163
+ Vo as DataCard,
163
164
  H as DataTable,
164
165
  kr as DatePicker,
165
- Pe as DefinitionDescription,
166
- Ae as DefinitionList,
166
+ Ae as DefinitionDescription,
167
+ Le as DefinitionList,
167
168
  Be as DefinitionTerm,
168
- We as DenseMetricRibbon,
169
- Xo as DetailDrawer,
170
- Fo as DeviceCard,
169
+ je as DenseMetricRibbon,
170
+ qo as DetailDrawer,
171
+ wo as DeviceCard,
171
172
  Tr as DocumentScanView,
172
- ce as Drawer,
173
- vo as EdgeInsightTerminal,
174
- gr as EmptyState,
175
- uo as FLICK_VELOCITY,
173
+ be as Drawer,
174
+ yo as EdgeInsightTerminal,
175
+ Sr as EmptyState,
176
+ co as FLICK_VELOCITY,
176
177
  Gr as FileUpload,
177
- pe as FilterPanel,
178
- vt as FineTuningControls,
178
+ ae as FilterPanel,
179
+ yt as FineTuningControls,
179
180
  Kr as FormTemplate,
180
181
  Y as Gallery,
181
- Lo as HardwareCommandButton,
182
- oe as Header,
183
- ut as Icon,
182
+ Ro as HardwareCommandButton,
183
+ ee as Header,
184
+ ct as Icon,
184
185
  Ur as Input,
185
186
  A as KeyInjectionOverlay,
186
187
  xr as KpiGrid,
187
188
  Er as Label,
188
189
  Z as LineChart,
189
- Le as List,
190
- Re as ListItem,
190
+ Re as List,
191
+ Ee as ListItem,
191
192
  n as Loader,
192
193
  w as LoginPage,
193
194
  no as MOBILE_BREAKPOINT_PX,
194
195
  lo as MOBILE_BREAKPOINT_QUERY,
195
- Ze as Menu,
196
- $e as MenuDivider,
197
- rt as MenuItem,
198
- S as Message,
199
- et as MobileNav,
200
- Me as Modal,
196
+ $e as Menu,
197
+ rt as MenuDivider,
198
+ ot as MenuItem,
199
+ g as Message,
200
+ tt as MobileNav,
201
+ ve as Modal,
201
202
  zr as MultiSelect,
202
- _e as PageContainer,
203
- He as PageHeader,
204
- mt as Pagination,
205
- Ft as PaletteSwatch,
203
+ ke as PageContainer,
204
+ Ge as PageHeader,
205
+ pt as Pagination,
206
+ wt as PaletteSwatch,
206
207
  rr as PieChart,
207
208
  cr as Plan,
208
209
  h as PromptInput,
209
210
  Wr as Radio,
210
- Jo as RammeInspectorTrigger,
211
+ Zo as RammeInspectorTrigger,
211
212
  er as ScatterChart,
212
213
  Xr as SearchInput,
213
- Ve as SectionHeader,
214
+ Ke as SectionHeader,
214
215
  Jr as SegmentedControl,
215
216
  $r as Select,
216
- Wo as SettingsContainer,
217
- De as Sheet,
218
- dm as ShowroomCanvas,
219
- nm as ShowroomContainer,
220
- Tm as ShowroomSidebar,
221
- ye as Sidebar,
217
+ jo as SettingsContainer,
218
+ Pe as Sheet,
219
+ hm as ShowroomCanvas,
220
+ lm as ShowroomContainer,
221
+ sm as ShowroomSidebar,
222
+ Fe as Sidebar,
222
223
  _ as SignupPage,
223
224
  Cr as Skeleton,
224
225
  gm as SkuBadge,
225
- Eo as Sparkline,
226
+ Mo as Sparkline,
226
227
  ar as StatCard,
227
- Ko as StateMatrix,
228
+ No as StateMatrix,
228
229
  nr as StatusBadge,
229
- fe as Statusbar,
230
- at as Stepper,
230
+ xe as Statusbar,
231
+ ft as Stepper,
231
232
  s as Suggestion,
232
233
  to as Switch,
233
- L as TAY_DREAMBOAT_THEME,
234
- qt as THEME_TOKEN_VARS,
235
- xt as TabPanel,
234
+ B as TAY_DREAMBOAT_THEME,
235
+ Jt as THEME_TOKEN_VARS,
236
+ it as TabPanel,
236
237
  N as Table,
237
- it as Tabs,
238
- xm as TelemetryGraph,
239
- ko as TelemetryLog,
238
+ nt as Tabs,
239
+ im as TelemetryGraph,
240
+ Ho as TelemetryLog,
240
241
  oo as Textarea,
241
- Ht as ThemeLab,
242
- wt as ThemeLivePreview,
242
+ Gt as ThemeLab,
243
+ Ot as ThemeLivePreview,
243
244
  R as ThemeProvider,
244
- _t as ThemeSettings,
245
- Lt as ThemeSynthesizer,
245
+ kt as ThemeSettings,
246
+ Rt as ThemeSynthesizer,
246
247
  Dr as TippyTooltip,
247
- Pr as Toast,
248
- Br as ToastProvider,
248
+ Ir as Toast,
249
+ Lr as ToastProvider,
249
250
  mo as ToggleSwitch,
250
- te as Toolbar,
251
- Ue as UserNav,
252
- Oo as WaterPumpControl,
253
- Jt as applyThemeToDom,
251
+ me as Toolbar,
252
+ Ye as UserNav,
253
+ _o as WaterPumpControl,
254
+ Zt as applyThemeToDom,
254
255
  E as availableThemes,
255
- dt as badgeVariants,
256
- St as buttonVariants,
256
+ ht as badgeVariants,
257
+ Ct as buttonVariants,
257
258
  It as cn,
258
- At as formatValue,
259
- Kt as generateFromProfile,
260
- Nt as generateFromPrompt,
261
- Ut as generateRandom,
262
- Zt as generateRandomTheme,
263
- am as generateThemeFromPrompt,
264
- $t as getContrastColor,
265
- rm as hexToRgbTriplet,
266
- Yt as hslToCssString,
267
- zt as hslToRgb,
268
- Qt as hslToRgbString,
269
- om as isCustomTheme,
270
- Wt as lightToDark,
271
- em as loadGoogleFont,
259
+ Lt as formatValue,
260
+ Nt as generateFromProfile,
261
+ Ut as generateFromPrompt,
262
+ Yt as generateRandom,
263
+ $t as generateRandomTheme,
264
+ fm as generateThemeFromPrompt,
265
+ rm as getContrastColor,
266
+ om as hexToRgbTriplet,
267
+ zt as hslToCssString,
268
+ Qt as hslToRgb,
269
+ Wt as hslToRgbString,
270
+ em as isCustomTheme,
271
+ jt as lightToDark,
272
+ tm as loadGoogleFont,
272
273
  f as mockChartData,
273
274
  x as mockTableData,
274
- jt as paletteToRgbVars,
275
- tm as randomRgb,
276
- Cm as resolvePreview,
277
- co as settleTo,
278
- mm as tokensToVars,
279
- go as useBodyScrollLock,
275
+ Xt as paletteToRgbVars,
276
+ mm as randomRgb,
277
+ um as resolvePreview,
278
+ bo as settleTo,
279
+ pm as tokensToVars,
280
+ So as useBodyScrollLock,
280
281
  xo as useChartTheme,
281
282
  ao as useDataFetch,
282
283
  Io as useDialogFocus,
283
284
  To as useIsMobile,
284
285
  so as useMediaQuery,
285
- bo as useSheetGesture,
286
+ Do as useSheetGesture,
286
287
  M as useTheme,
287
- Lr as useToast,
288
+ Br as useToast,
288
289
  t as wizardManifest
289
290
  };
@@ -23,6 +23,13 @@
23
23
  * dragging below the smallest detent dismisses, a slow drag snaps to nearest —
24
24
  * is checkable without a browser.
25
25
  */
26
+ /**
27
+ * How far a finger must travel before a press on the sheet becomes a drag.
28
+ * Below it the press is a tap and the sheet does nothing, so the link or button
29
+ * under the finger gets its click. Capturing the pointer on press instead
30
+ * retargets that click at the sheet on some browsers.
31
+ */
32
+ export declare const DRAG_SLOP = 8;
26
33
  /** Pixels per millisecond past which a drag counts as a flick rather than a move. */
27
34
  export declare const FLICK_VELOCITY = 0.5;
28
35
  /**
@@ -67,6 +74,17 @@ export interface SheetGesture {
67
74
  dragging: boolean;
68
75
  /** True when the sheet is at its tallest detent. */
69
76
  expanded: boolean;
77
+ /**
78
+ * The `touch-action` the scrollable body needs. `none` while the sheet is
79
+ * partial, so an upward swipe grows the sheet and nothing else; `pan-y` once
80
+ * it is full, so the content scrolls natively.
81
+ *
82
+ * Without it the browser claims every swipe on the body for a native scroll
83
+ * at the same moment the sheet starts tracking the finger: the sheet grows
84
+ * and the list slides under it, then the browser cancels the pointer and the
85
+ * sheet settles wherever it was (owner's report, 2026-11-01).
86
+ */
87
+ bodyTouchAction: 'none' | 'pan-y';
70
88
  /** Attach to the grabber and header. */
71
89
  onPointerDown: (e: React.PointerEvent) => void;
72
90
  /**
@@ -1,70 +1,78 @@
1
- import { useState as M, useRef as u, useCallback as T, useEffect as C } from "react";
2
- const D = 0.5, P = 0.12;
3
- function y({ current: l, detents: f, velocity: a }) {
1
+ import { useState as I, useRef as u, useCallback as T, useEffect as O } from "react";
2
+ const R = 8, _ = 0.5, G = 0.12;
3
+ function k({ current: l, detents: f, velocity: a }) {
4
4
  if (!f.length) return null;
5
- const s = [...f].sort((r, e) => r - e), n = s[0], c = s[s.length - 1];
6
- if (Math.abs(a) >= D) {
5
+ const o = [...f].sort((r, t) => r - t), n = o[0], c = o[o.length - 1];
6
+ if (Math.abs(a) >= _) {
7
7
  if (a > 0) {
8
- const e = s.filter((g) => g < l - 0.01);
9
- return e.length ? e[e.length - 1] : null;
8
+ const t = o.filter((g) => g < l - 0.01);
9
+ return t.length ? t[t.length - 1] : null;
10
10
  }
11
- const r = s.filter((e) => e > l + 0.01);
11
+ const r = o.filter((t) => t > l + 0.01);
12
12
  return r.length ? r[0] : c;
13
13
  }
14
- return l < n - P ? null : s.reduce(
15
- (r, e) => Math.abs(e - l) < Math.abs(r - l) ? e : r
14
+ return l < n - G ? null : o.reduce(
15
+ (r, t) => Math.abs(t - l) < Math.abs(r - l) ? t : r
16
16
  );
17
17
  }
18
- function R({
18
+ function K({
19
19
  detents: l,
20
20
  initialDetent: f = 0,
21
21
  onDismiss: a,
22
- reducedMotion: s = !1
22
+ reducedMotion: o = !1
23
23
  }) {
24
- const n = [...l].sort((t, i) => t - i), [c, r] = M(n[f] ?? n[0]), [e, g] = M(!1), L = u(0), S = u(0), w = u(0), v = u(0), E = u(0), d = u(null), h = T(
25
- (t, i) => {
26
- if (!s && t.isPrimary) {
27
- if (d.current = i ? t.currentTarget : null, i) {
28
- const o = t.currentTarget.scrollTop <= 0;
29
- if (c >= n[n.length - 1] - 1e-3 && !o) return;
24
+ const n = [...l].sort((e, s) => e - s), [c, r] = I(n[f] ?? n[0]), [t, g] = I(!1), [Y, E] = I(!1), y = u(0), x = u(0), L = u(0), S = u(0), b = u(0), d = u(null), D = u(null), h = u(0), p = T(
25
+ (e, s) => {
26
+ o || e.isPrimary && (s && c >= n[n.length - 1] - 1e-3 || (d.current = s ? e.currentTarget : null, D.current = e.currentTarget, h.current = e.pointerId, y.current = e.clientY, L.current = e.clientY, S.current = e.timeStamp, x.current = c, b.current = 0, E(!0)));
27
+ },
28
+ [c, o, n]
29
+ ), C = T((e) => p(e, !1), [p]), A = T((e) => p(e, !0), [p]);
30
+ return O(() => {
31
+ if (!t && !Y) return;
32
+ const e = (i) => {
33
+ var P;
34
+ if (i.pointerId !== h.current) return;
35
+ const m = window.innerHeight || 1, H = i.clientY - y.current;
36
+ if (!t) {
37
+ if (Math.abs(H) < R) return;
38
+ try {
39
+ (P = D.current) == null || P.setPointerCapture(h.current);
40
+ } catch {
30
41
  }
31
- L.current = t.clientY, w.current = t.clientY, v.current = t.timeStamp, S.current = c, E.current = 0, g(!0), t.currentTarget.setPointerCapture(t.pointerId);
42
+ E(!1), g(!0);
32
43
  }
33
- },
34
- [c, s, n]
35
- ), b = T((t) => h(t, !1), [h]), H = T((t) => h(t, !0), [h]);
36
- return C(() => {
37
- if (!e) return;
38
- const t = (o) => {
39
- const Y = window.innerHeight || 1, I = o.clientY - L.current, x = o.timeStamp - v.current;
40
- x > 0 && (E.current = (o.clientY - w.current) / x), w.current = o.clientY, v.current = o.timeStamp;
41
- let p = S.current - I / Y;
42
- const m = n[n.length - 1];
43
- p > m && (p = m + (p - m) * 0.25), r(Math.max(0, Math.min(p, m + 0.05))), d.current && (d.current.scrollTop = 0);
44
- }, i = () => {
44
+ const M = i.timeStamp - S.current;
45
+ M > 0 && (b.current = (i.clientY - L.current) / M), L.current = i.clientY, S.current = i.timeStamp;
46
+ let w = x.current - H / m;
47
+ const v = n[n.length - 1];
48
+ w > v && (w = v + (w - v) * 0.25), r(Math.max(0, Math.min(w, v + 0.05))), d.current && (d.current.scrollTop = 0);
49
+ }, s = (i) => {
50
+ if (i.pointerId !== h.current || (E(!1), !t)) return;
45
51
  g(!1);
46
- const o = y({
52
+ const m = k({
47
53
  current: c,
48
54
  detents: n,
49
- velocity: E.current
55
+ velocity: b.current
50
56
  });
51
- o === null ? a() : r(o), d.current = null;
57
+ m === null ? a() : r(m), d.current = null;
52
58
  };
53
- return window.addEventListener("pointermove", t), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), () => {
54
- window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i);
59
+ return window.addEventListener("pointermove", e), window.addEventListener("pointerup", s), window.addEventListener("pointercancel", s), () => {
60
+ window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", s), window.removeEventListener("pointercancel", s);
55
61
  };
56
- }, [e, c, a, n]), {
62
+ }, [Y, t, c, a, n]), {
57
63
  height: c,
58
- dragging: e,
64
+ dragging: t,
59
65
  expanded: c >= n[n.length - 1] - 1e-3,
60
- onPointerDown: b,
61
- onBodyPointerDown: H,
66
+ bodyTouchAction: !o && c < n[n.length - 1] - 1e-3 ? "none" : "pan-y",
67
+ onPointerDown: C,
68
+ onBodyPointerDown: A,
62
69
  setHeight: r
63
70
  };
64
71
  }
65
72
  export {
66
- P as DISMISS_THRESHOLD,
67
- D as FLICK_VELOCITY,
68
- y as settleTo,
69
- R as useSheetGesture
73
+ G as DISMISS_THRESHOLD,
74
+ R as DRAG_SLOP,
75
+ _ as FLICK_VELOCITY,
76
+ k as settleTo,
77
+ K as useSheetGesture
70
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramme-io/ui",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "The structural component library for the Ramme Framework.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -58,7 +58,7 @@
58
58
  "tailwind-merge": "^3.3.1",
59
59
  "tippy.js": "^6.3.7",
60
60
  "zod": "^3.23.8",
61
- "@ramme-io/shared": "4.1.0"
61
+ "@ramme-io/shared": "4.2.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@storybook/addon-links": "^10.5.9",