sunpeak 0.5.10 → 0.5.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.
package/dist/index.js CHANGED
@@ -7360,7 +7360,7 @@ SegmentedControl.Option = Segment;
7360
7360
  function SimpleSidebar({ children, controls }) {
7361
7361
  return /* @__PURE__ */ jsxs("div", { className: "flex h-screen w-full overflow-hidden", children: [
7362
7362
  /* @__PURE__ */ jsx("aside", { className: "hidden md:flex w-56 flex-col border-r border-subtle bg-background h-screen overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxs("div", { children: [
7363
- /* @__PURE__ */ jsx("h2", { className: "text-xs font-semibold mb-2 sticky top-0 bg-background pb-1 z-10", children: "Controls" }),
7363
+ /* @__PURE__ */ jsx("h2", { className: "text-xs font-semibold sticky top-0 bg-background z-10", children: "Controls" }),
7364
7364
  controls
7365
7365
  ] }) }) }) }),
7366
7366
  /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-auto h-screen", children })
@@ -11051,11 +11051,30 @@ function ChatGPTSimulator({
11051
11051
  SidebarSelect,
11052
11052
  {
11053
11053
  value: (userAgent == null ? void 0 : userAgent.device.type) ?? "desktop",
11054
- onChange: (value) => mock.setUserAgent({
11055
- ...userAgent,
11056
- device: { type: value },
11057
- capabilities: (userAgent == null ? void 0 : userAgent.capabilities) ?? { hover: true, touch: false }
11058
- }),
11054
+ onChange: (value) => {
11055
+ const deviceType = value;
11056
+ let capabilities;
11057
+ switch (deviceType) {
11058
+ case "mobile":
11059
+ capabilities = { hover: false, touch: true };
11060
+ break;
11061
+ case "tablet":
11062
+ capabilities = { hover: false, touch: true };
11063
+ break;
11064
+ case "desktop":
11065
+ capabilities = { hover: true, touch: false };
11066
+ break;
11067
+ case "unknown":
11068
+ default:
11069
+ capabilities = { hover: true, touch: false };
11070
+ break;
11071
+ }
11072
+ mock.setUserAgent({
11073
+ ...userAgent,
11074
+ device: { type: deviceType },
11075
+ capabilities
11076
+ });
11077
+ },
11059
11078
  options: [
11060
11079
  { value: "mobile", label: "Mobile" },
11061
11080
  { value: "tablet", label: "Tablet" },
@@ -11064,7 +11083,7 @@ function ChatGPTSimulator({
11064
11083
  ]
11065
11084
  }
11066
11085
  ) }),
11067
- /* @__PURE__ */ jsx(SidebarControl, { label: "Capabilities", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
11086
+ /* @__PURE__ */ jsx("div", { className: "pl-4", children: /* @__PURE__ */ jsx(SidebarControl, { label: "Capabilities", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
11068
11087
  /* @__PURE__ */ jsx(
11069
11088
  SidebarCheckbox,
11070
11089
  {
@@ -11095,7 +11114,7 @@ function ChatGPTSimulator({
11095
11114
  label: "Touch"
11096
11115
  }
11097
11116
  )
11098
- ] }) }),
11117
+ ] }) }) }),
11099
11118
  /* @__PURE__ */ jsx(SidebarControl, { label: "Safe Area Insets", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-1", children: [
11100
11119
  /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
11101
11120
  /* @__PURE__ */ jsx("label", { className: "text-[9px] text-secondary", children: "Top" }),