sunpeak 0.5.35 → 0.5.39

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.
Files changed (64) hide show
  1. package/bin/commands/build.mjs +10 -0
  2. package/bin/commands/dev.mjs +13 -1
  3. package/dist/index.cjs +62 -25
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +62 -25
  6. package/dist/index.js.map +1 -1
  7. package/dist/style.css +86 -40
  8. package/package.json +1 -1
  9. package/template/dist/chatgpt/albums.js +14 -54
  10. package/template/dist/chatgpt/carousel.js +14 -54
  11. package/template/dist/chatgpt/counter.js +14 -54
  12. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +13 -858
  13. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js.map +4 -4
  14. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js +33 -0
  15. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js.map +7 -0
  16. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Icon.js +4 -4
  17. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Input.js +13 -0
  18. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +103 -0
  19. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js.map +7 -0
  20. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +1019 -0
  21. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js.map +7 -0
  22. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +95 -0
  23. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js.map +7 -0
  24. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js +45 -0
  25. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js.map +7 -0
  26. package/template/node_modules/.vite/deps/_metadata.json +82 -25
  27. package/template/node_modules/.vite/deps/{chunk-TNWQ7JGO.js → chunk-4TLBUCVB.js} +2 -2
  28. package/template/node_modules/.vite/deps/chunk-BAG6OO6S.js +115 -0
  29. package/template/node_modules/.vite/deps/chunk-BAG6OO6S.js.map +7 -0
  30. package/template/node_modules/.vite/deps/chunk-CQ3GYAYB.js +112 -0
  31. package/template/node_modules/.vite/deps/chunk-CQ3GYAYB.js.map +7 -0
  32. package/template/node_modules/.vite/deps/chunk-EGRHWZRV.js +1 -0
  33. package/template/node_modules/.vite/deps/chunk-EGRHWZRV.js.map +7 -0
  34. package/template/node_modules/.vite/deps/chunk-EVJ3DVH5.js +628 -0
  35. package/template/node_modules/.vite/deps/chunk-EVJ3DVH5.js.map +7 -0
  36. package/template/node_modules/.vite/deps/{chunk-5WRI5ZAA.js → chunk-ILHRZGIS.js} +17 -2
  37. package/template/node_modules/.vite/deps/chunk-ILHRZGIS.js.map +7 -0
  38. package/template/node_modules/.vite/deps/{chunk-DUV225XW.js → chunk-KFGKZMLK.js} +3 -3
  39. package/template/node_modules/.vite/deps/{chunk-7IRBE5E4.js → chunk-PTVT3RFX.js} +3 -3
  40. package/template/node_modules/.vite/deps/chunk-QPJAV452.js +13 -0
  41. package/template/node_modules/.vite/deps/chunk-QPJAV452.js.map +7 -0
  42. package/template/node_modules/.vite/deps/chunk-SGWD4VEU.js +15195 -0
  43. package/template/node_modules/.vite/deps/chunk-SGWD4VEU.js.map +7 -0
  44. package/template/node_modules/.vite/deps/{chunk-D3BYX6F4.js → chunk-XB525PXG.js} +3 -3
  45. package/template/node_modules/.vite/deps/chunk-YOJ6QPGS.js +231 -0
  46. package/template/node_modules/.vite/deps/chunk-YOJ6QPGS.js.map +7 -0
  47. package/template/node_modules/.vite/deps/clsx.js +1 -1
  48. package/template/node_modules/.vite/deps/embla-carousel-react.js +2 -2
  49. package/template/node_modules/.vite/deps/embla-carousel-wheel-gestures.js +1 -1
  50. package/template/node_modules/.vite/deps/react-dom.js +3 -3
  51. package/template/node_modules/.vite/deps/react-dom_client.js +3 -3
  52. package/template/node_modules/.vite/deps/react.js +2 -2
  53. package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js +2 -2
  54. package/template/node_modules/.vite/deps/react_jsx-runtime.js +3 -3
  55. package/template/node_modules/.vite/deps/tailwind-merge.js +1 -1
  56. package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  57. package/template/src/components/album/fullscreen-viewer.tsx +78 -16
  58. package/template/src/components/resources/counter-resource.test.tsx +4 -4
  59. package/template/src/components/resources/counter-resource.tsx +5 -5
  60. /package/template/node_modules/.vite/deps/{chunk-5WRI5ZAA.js.map → @openai_apps-sdk-ui_components_Input.js.map} +0 -0
  61. /package/template/node_modules/.vite/deps/{chunk-TNWQ7JGO.js.map → chunk-4TLBUCVB.js.map} +0 -0
  62. /package/template/node_modules/.vite/deps/{chunk-DUV225XW.js.map → chunk-KFGKZMLK.js.map} +0 -0
  63. /package/template/node_modules/.vite/deps/{chunk-7IRBE5E4.js.map → chunk-PTVT3RFX.js.map} +0 -0
  64. /package/template/node_modules/.vite/deps/{chunk-D3BYX6F4.js.map → chunk-XB525PXG.js.map} +0 -0
package/dist/index.js CHANGED
@@ -7492,23 +7492,37 @@ function Conversation({
7492
7492
  api.requestDisplayMode({ mode: "inline" });
7493
7493
  }
7494
7494
  };
7495
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1", children: [
7496
- /* @__PURE__ */ jsxs("div", { className: "border-subtle bg-surface z-10 grid h-12 grid-cols-[1fr_auto_1fr] border-b px-2", children: [
7497
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-start gap-3", children: /* @__PURE__ */ jsx(
7498
- "button",
7499
- {
7500
- onClick: handleClose,
7501
- "aria-label": "Close",
7502
- className: "h-7 w-7 flex items-center justify-center hover:bg-subtle rounded-md transition-colors text-primary",
7503
- type: "button",
7504
- children: /* @__PURE__ */ jsx(CloseBold, {})
7505
- }
7506
- ) }),
7507
- /* @__PURE__ */ jsx("div", { className: "text-primary flex items-center justify-center text-base", children: appName }),
7508
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end" })
7509
- ] }),
7510
- /* @__PURE__ */ jsx("div", { className: "relative overflow-hidden flex-1", children: /* @__PURE__ */ jsx("div", { className: "h-full w-full max-w-full overflow-auto", children }) }),
7511
- /* @__PURE__ */ jsx("footer", { className: "bg-surface", children: /* @__PURE__ */ jsx("div", { className: "max-w-[48rem] mx-auto px-4 py-4", children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
7495
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1 items-center", children: [
7496
+ /* @__PURE__ */ jsxs(
7497
+ "div",
7498
+ {
7499
+ className: "w-full border-subtle bg-surface z-10 grid h-12 grid-cols-[1fr_auto_1fr] border-b px-2",
7500
+ style: { maxWidth: containerWidth },
7501
+ children: [
7502
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-start gap-3", children: /* @__PURE__ */ jsx(
7503
+ "button",
7504
+ {
7505
+ onClick: handleClose,
7506
+ "aria-label": "Close",
7507
+ className: "h-7 w-7 flex items-center justify-center hover:bg-subtle rounded-md transition-colors text-primary",
7508
+ type: "button",
7509
+ children: /* @__PURE__ */ jsx(CloseBold, {})
7510
+ }
7511
+ ) }),
7512
+ /* @__PURE__ */ jsx("div", { className: "text-primary flex items-center justify-center text-base", children: appName }),
7513
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end" })
7514
+ ]
7515
+ }
7516
+ ),
7517
+ /* @__PURE__ */ jsx(
7518
+ "div",
7519
+ {
7520
+ className: "relative overflow-hidden flex-1 w-full",
7521
+ style: { maxWidth: containerWidth },
7522
+ children: /* @__PURE__ */ jsx("div", { className: "h-full w-full max-w-full overflow-auto", children })
7523
+ }
7524
+ ),
7525
+ /* @__PURE__ */ jsx("footer", { className: "bg-surface w-full", style: { maxWidth: containerWidth }, children: /* @__PURE__ */ jsx("div", { className: "px-4 py-4", children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
7512
7526
  "input",
7513
7527
  {
7514
7528
  type: "text",
@@ -7520,18 +7534,25 @@ function Conversation({
7520
7534
  ) }) }) })
7521
7535
  ] });
7522
7536
  }
7523
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1", children: [
7524
- /* @__PURE__ */ jsx("header", { className: "h-12 bg-surface flex items-center px-4 text-lg sticky top-0 z-40", children: /* @__PURE__ */ jsx("span", { className: "text-primary", children: "SimGPT" }) }),
7537
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1 items-center", children: [
7538
+ /* @__PURE__ */ jsx(
7539
+ "header",
7540
+ {
7541
+ className: "h-12 bg-surface flex items-center px-4 text-lg sticky top-0 z-40 w-full",
7542
+ style: { maxWidth: containerWidth },
7543
+ children: /* @__PURE__ */ jsx("span", { className: "text-primary", children: "SimGPT" })
7544
+ }
7545
+ ),
7525
7546
  /* @__PURE__ */ jsxs(
7526
7547
  "div",
7527
7548
  {
7528
- className: "flex flex-col flex-1 mx-auto w-full transition-all duration-200 overflow-hidden",
7549
+ className: "flex flex-col flex-1 w-full transition-all duration-200 overflow-hidden",
7529
7550
  style: { maxWidth: containerWidth },
7530
7551
  children: [
7531
7552
  /* @__PURE__ */ jsxs("main", { className: "flex-1 overflow-y-auto overflow-x-hidden", children: [
7532
7553
  /* @__PURE__ */ jsxs("article", { className: "text-primary w-full focus:outline-none", dir: "auto", "data-turn": "user", children: [
7533
7554
  /* @__PURE__ */ jsx("h5", { className: "sr-only", children: "You said:" }),
7534
- /* @__PURE__ */ jsx("div", { className: "text-base my-auto mx-auto pt-12 px-4", children: /* @__PURE__ */ jsx("div", { className: "max-w-[48rem] mx-auto flex-1 relative flex w-full min-w-0 flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex max-w-full flex-col grow", children: /* @__PURE__ */ jsx(
7555
+ /* @__PURE__ */ jsx("div", { className: "text-base my-auto mx-auto md:pt-8 px-4", children: /* @__PURE__ */ jsx("div", { className: "max-w-[48rem] mx-auto flex-1 relative flex w-full min-w-0 flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex max-w-full flex-col grow", children: /* @__PURE__ */ jsx(
7535
7556
  "div",
7536
7557
  {
7537
7558
  "data-message-author-role": "user",
@@ -7552,7 +7573,7 @@ function Conversation({
7552
7573
  " said:"
7553
7574
  ] }),
7554
7575
  /* @__PURE__ */ jsx("div", { className: "text-base my-auto mx-auto pb-10 px-4", children: /* @__PURE__ */ jsx("div", { className: "max-w-[48rem] mx-auto flex-1 relative flex w-full min-w-0 flex-col", children: /* @__PURE__ */ jsxs("div", { className: "flex max-w-full flex-col grow", children: [
7555
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
7576
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 my-3", children: [
7556
7577
  appIcon ? /* @__PURE__ */ jsx("div", { className: "size-6 flex items-center justify-center text-base", children: appIcon }) : /* @__PURE__ */ jsx("div", { className: "size-6 rounded-full bg-primary flex items-center justify-center text-primary-foreground font-medium text-xs", children: "AI" }),
7557
7578
  /* @__PURE__ */ jsx("span", { className: "font-semibold text-sm", children: appName })
7558
7579
  ] }),
@@ -7564,8 +7585,11 @@ function Conversation({
7564
7585
  children: /* @__PURE__ */ jsx("div", { className: "flex w-full flex-col gap-1 empty:hidden", children: displayMode === "pip" ? /* @__PURE__ */ jsxs(
7565
7586
  "div",
7566
7587
  {
7567
- className: "fixed start-4 end-4 top-14 z-50 mx-auto max-w-[48rem] md:start-60 md:end-4 sm:start-0 sm:end-0 sm:w-full overflow-visible",
7568
- style: { maxHeight: "429px" },
7588
+ className: "fixed top-14 z-50 overflow-visible left-1/2 md:left-[calc(50vw+7rem)] -translate-x-1/2 max-w-[calc(100vw-2rem)] md:max-w-[calc(100vw-16rem)]",
7589
+ style: {
7590
+ maxHeight: "429px",
7591
+ width: containerWidth
7592
+ },
7569
7593
  children: [
7570
7594
  /* @__PURE__ */ jsx(
7571
7595
  "button",
@@ -7799,6 +7823,7 @@ function ChatGPTSimulator({
7799
7823
  appIcon
7800
7824
  }) {
7801
7825
  const [screenWidth, setScreenWidth] = React.useState("full");
7826
+ const isMobileWidth = (width) => width === "mobile-s" || width === "mobile-l";
7802
7827
  const getSimulationKey = (sim) => `${sim.resource.name}-${sim.tool.name}`;
7803
7828
  const [selectedKey, setSelectedKey] = React.useState(
7804
7829
  simulations.length > 0 ? getSimulationKey(simulations[0]) : ""
@@ -7897,6 +7922,11 @@ function ChatGPTSimulator({
7897
7922
  }
7898
7923
  };
7899
7924
  }, []);
7925
+ useEffect(() => {
7926
+ if (isMobileWidth(screenWidth) && displayMode === "pip") {
7927
+ mock.setDisplayMode("fullscreen");
7928
+ }
7929
+ }, [screenWidth, displayMode, mock]);
7900
7930
  useEffect(() => {
7901
7931
  if (editingField !== "toolInput") {
7902
7932
  setToolInputJson(JSON.stringify(toolInput ?? {}, null, 2));
@@ -7998,7 +8028,14 @@ function ChatGPTSimulator({
7998
8028
  SidebarToggle,
7999
8029
  {
8000
8030
  value: displayMode,
8001
- onChange: (value) => mock.setDisplayMode(value),
8031
+ onChange: (value) => {
8032
+ const newMode = value;
8033
+ if (isMobileWidth(screenWidth) && newMode === "pip") {
8034
+ mock.setDisplayMode("fullscreen");
8035
+ } else {
8036
+ mock.setDisplayMode(newMode);
8037
+ }
8038
+ },
8002
8039
  options: [
8003
8040
  { value: "inline", label: "Inline" },
8004
8041
  { value: "pip", label: "PiP" },