create-skybridge 2.0.0-alpha.ea364cb → 2.0.0-alpha.ff0caf0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skybridge",
3
- "version": "2.0.0-alpha.ea364cb",
3
+ "version": "2.0.0-alpha.ff0caf0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Alpic",
@@ -12,7 +12,7 @@
12
12
  "deploy": "alpic deploy"
13
13
  },
14
14
  "dependencies": {
15
- "skybridge": "^2.0.0-alpha.ea364cb",
15
+ "skybridge": "^2.0.0-alpha.ff0caf0",
16
16
  "vite": "^8.1.5"
17
17
  },
18
18
  "devDependencies": {
@@ -16,7 +16,7 @@
16
16
  "lucide-react": "^1.25.0",
17
17
  "react": "^19.2.7",
18
18
  "react-dom": "^19.2.7",
19
- "skybridge": "^2.0.0-alpha.ea364cb",
19
+ "skybridge": "^2.0.0-alpha.ff0caf0",
20
20
  "sonner": "^2.0.7",
21
21
  "tw-animate-css": "^1.4.0",
22
22
  "vite": "^8.1.5",
@@ -1,7 +1,7 @@
1
1
  import "@/index.css";
2
2
 
3
3
  import { useState } from "react";
4
- import { useLayout } from "skybridge/web";
4
+ import { useUser } from "skybridge/web";
5
5
  import Nav from "./components/nav.js";
6
6
  import Progress from "./components/progress.js";
7
7
  import Outro from "./components/steps/outro.js";
@@ -18,8 +18,8 @@ const STEPS = [
18
18
  ] as const;
19
19
 
20
20
  export default function Onboarding() {
21
- // useLayout: read host layout info (theme, display mode, locale, ...).
22
- const { theme } = useLayout();
21
+ // useUser: read user environment info (theme, locale, user agent).
22
+ const { theme } = useUser();
23
23
 
24
24
  const [step, setStep] = useState(0);
25
25
  const { img } = useMascot();
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "react": "^19.2.4",
18
18
  "react-dom": "^19.2.4",
19
- "skybridge": "^2.0.0-alpha.ea364cb",
19
+ "skybridge": "^2.0.0-alpha.ff0caf0",
20
20
  "vite": "^8.1.3",
21
21
  "zod": "^4.4.3"
22
22
  },
@@ -1,5 +1,5 @@
1
1
  import type { HTMLAttributes } from "react";
2
- import { useLayout } from "skybridge/web";
2
+ import { useUser } from "skybridge/web";
3
3
  import { darkTheme, lightTheme } from "../design/tokens";
4
4
  import { cx } from "../lib/cx";
5
5
  import { viewFrame } from "./view-frame.css";
@@ -10,8 +10,8 @@ import { viewFrame } from "./view-frame.css";
10
10
  * variables the color contract declares) and paints the base surface + font +
11
11
  * content color so descendants inherit from the DS instead of the host page.
12
12
  *
13
- * It follows the host theme via useLayout(). To lock the widget to one palette
14
- * (e.g. always light), drop useLayout and hardcode the theme class.
13
+ * It follows the host theme via useUser(). To lock the widget to one palette
14
+ * (e.g. always light), drop useUser and hardcode the theme class.
15
15
  *
16
16
  * Keep view entry files thin: render <ViewFrame> at the root and let this carry
17
17
  * the theme + base-style boilerplate.
@@ -19,7 +19,7 @@ import { viewFrame } from "./view-frame.css";
19
19
  type ViewFrameProps = HTMLAttributes<HTMLDivElement>;
20
20
 
21
21
  export function ViewFrame({ className, ...rest }: ViewFrameProps) {
22
- const { theme } = useLayout();
22
+ const { theme } = useUser();
23
23
  const themeClass = theme === "dark" ? darkTheme : lightTheme;
24
24
 
25
25
  return <div {...rest} className={cx(themeClass, viewFrame, className)} />;