sunpeak 0.5.36 → 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.
- package/dist/index.cjs +61 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +61 -24
- package/dist/index.js.map +1 -1
- package/dist/style.css +82 -40
- package/package.json +1 -1
- package/template/dist/chatgpt/albums.js +10 -10
- package/template/dist/chatgpt/carousel.js +1 -1
- package/template/dist/chatgpt/counter.js +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +19 -19
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +30 -30
- package/template/node_modules/.vite/deps/{chunk-675LFNY2.js → chunk-EVJ3DVH5.js} +8 -8
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/components/album/fullscreen-viewer.tsx +78 -16
- /package/template/node_modules/.vite/deps/{chunk-675LFNY2.js.map → chunk-EVJ3DVH5.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -7511,23 +7511,37 @@ function Conversation({
|
|
|
7511
7511
|
api.requestDisplayMode({ mode: "inline" });
|
|
7512
7512
|
}
|
|
7513
7513
|
};
|
|
7514
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1", children: [
|
|
7515
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
className: "
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7514
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1 items-center", children: [
|
|
7515
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7516
|
+
"div",
|
|
7517
|
+
{
|
|
7518
|
+
className: "w-full border-subtle bg-surface z-10 grid h-12 grid-cols-[1fr_auto_1fr] border-b px-2",
|
|
7519
|
+
style: { maxWidth: containerWidth },
|
|
7520
|
+
children: [
|
|
7521
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-start gap-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7522
|
+
"button",
|
|
7523
|
+
{
|
|
7524
|
+
onClick: handleClose,
|
|
7525
|
+
"aria-label": "Close",
|
|
7526
|
+
className: "h-7 w-7 flex items-center justify-center hover:bg-subtle rounded-md transition-colors text-primary",
|
|
7527
|
+
type: "button",
|
|
7528
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CloseBold, {})
|
|
7529
|
+
}
|
|
7530
|
+
) }),
|
|
7531
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-primary flex items-center justify-center text-base", children: appName }),
|
|
7532
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end" })
|
|
7533
|
+
]
|
|
7534
|
+
}
|
|
7535
|
+
),
|
|
7536
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7537
|
+
"div",
|
|
7538
|
+
{
|
|
7539
|
+
className: "relative overflow-hidden flex-1 w-full",
|
|
7540
|
+
style: { maxWidth: containerWidth },
|
|
7541
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full w-full max-w-full overflow-auto", children })
|
|
7542
|
+
}
|
|
7543
|
+
),
|
|
7544
|
+
/* @__PURE__ */ jsxRuntime.jsx("footer", { className: "bg-surface w-full", style: { maxWidth: containerWidth }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7531
7545
|
"input",
|
|
7532
7546
|
{
|
|
7533
7547
|
type: "text",
|
|
@@ -7539,18 +7553,25 @@ function Conversation({
|
|
|
7539
7553
|
) }) }) })
|
|
7540
7554
|
] });
|
|
7541
7555
|
}
|
|
7542
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1", children: [
|
|
7543
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7556
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1 items-center", children: [
|
|
7557
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7558
|
+
"header",
|
|
7559
|
+
{
|
|
7560
|
+
className: "h-12 bg-surface flex items-center px-4 text-lg sticky top-0 z-40 w-full",
|
|
7561
|
+
style: { maxWidth: containerWidth },
|
|
7562
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "SimGPT" })
|
|
7563
|
+
}
|
|
7564
|
+
),
|
|
7544
7565
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7545
7566
|
"div",
|
|
7546
7567
|
{
|
|
7547
|
-
className: "flex flex-col flex-1
|
|
7568
|
+
className: "flex flex-col flex-1 w-full transition-all duration-200 overflow-hidden",
|
|
7548
7569
|
style: { maxWidth: containerWidth },
|
|
7549
7570
|
children: [
|
|
7550
7571
|
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex-1 overflow-y-auto overflow-x-hidden", children: [
|
|
7551
7572
|
/* @__PURE__ */ jsxRuntime.jsxs("article", { className: "text-primary w-full focus:outline-none", dir: "auto", "data-turn": "user", children: [
|
|
7552
7573
|
/* @__PURE__ */ jsxRuntime.jsx("h5", { className: "sr-only", children: "You said:" }),
|
|
7553
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base my-auto mx-auto md:pt-
|
|
7574
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base my-auto mx-auto md:pt-8 px-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-[48rem] mx-auto flex-1 relative flex w-full min-w-0 flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex max-w-full flex-col grow", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7554
7575
|
"div",
|
|
7555
7576
|
{
|
|
7556
7577
|
"data-message-author-role": "user",
|
|
@@ -7583,8 +7604,11 @@ function Conversation({
|
|
|
7583
7604
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full flex-col gap-1 empty:hidden", children: displayMode === "pip" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7584
7605
|
"div",
|
|
7585
7606
|
{
|
|
7586
|
-
className: "fixed
|
|
7587
|
-
style: {
|
|
7607
|
+
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)]",
|
|
7608
|
+
style: {
|
|
7609
|
+
maxHeight: "429px",
|
|
7610
|
+
width: containerWidth
|
|
7611
|
+
},
|
|
7588
7612
|
children: [
|
|
7589
7613
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7590
7614
|
"button",
|
|
@@ -7818,6 +7842,7 @@ function ChatGPTSimulator({
|
|
|
7818
7842
|
appIcon
|
|
7819
7843
|
}) {
|
|
7820
7844
|
const [screenWidth, setScreenWidth] = React__namespace.useState("full");
|
|
7845
|
+
const isMobileWidth = (width) => width === "mobile-s" || width === "mobile-l";
|
|
7821
7846
|
const getSimulationKey = (sim) => `${sim.resource.name}-${sim.tool.name}`;
|
|
7822
7847
|
const [selectedKey, setSelectedKey] = React__namespace.useState(
|
|
7823
7848
|
simulations.length > 0 ? getSimulationKey(simulations[0]) : ""
|
|
@@ -7916,6 +7941,11 @@ function ChatGPTSimulator({
|
|
|
7916
7941
|
}
|
|
7917
7942
|
};
|
|
7918
7943
|
}, []);
|
|
7944
|
+
React.useEffect(() => {
|
|
7945
|
+
if (isMobileWidth(screenWidth) && displayMode === "pip") {
|
|
7946
|
+
mock.setDisplayMode("fullscreen");
|
|
7947
|
+
}
|
|
7948
|
+
}, [screenWidth, displayMode, mock]);
|
|
7919
7949
|
React.useEffect(() => {
|
|
7920
7950
|
if (editingField !== "toolInput") {
|
|
7921
7951
|
setToolInputJson(JSON.stringify(toolInput ?? {}, null, 2));
|
|
@@ -8017,7 +8047,14 @@ function ChatGPTSimulator({
|
|
|
8017
8047
|
SidebarToggle,
|
|
8018
8048
|
{
|
|
8019
8049
|
value: displayMode,
|
|
8020
|
-
onChange: (value) =>
|
|
8050
|
+
onChange: (value) => {
|
|
8051
|
+
const newMode = value;
|
|
8052
|
+
if (isMobileWidth(screenWidth) && newMode === "pip") {
|
|
8053
|
+
mock.setDisplayMode("fullscreen");
|
|
8054
|
+
} else {
|
|
8055
|
+
mock.setDisplayMode(newMode);
|
|
8056
|
+
}
|
|
8057
|
+
},
|
|
8021
8058
|
options: [
|
|
8022
8059
|
{ value: "inline", label: "Inline" },
|
|
8023
8060
|
{ value: "pip", label: "PiP" },
|