sunpeak 0.5.29 → 0.5.30
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/bin/commands/build.mjs +64 -29
- package/bin/commands/dev.mjs +21 -37
- package/bin/commands/mcp.mjs +11 -9
- package/package.json +1 -1
- package/template/dist/chatgpt/albums.js +54 -14
- package/template/dist/chatgpt/carousel.js +54 -14
- package/template/dist/chatgpt/counter.js +54 -14
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +858 -13
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js.map +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Icon.js +4 -4
- package/template/node_modules/.vite/deps/_metadata.json +24 -81
- package/template/node_modules/.vite/deps/{chunk-ILHRZGIS.js → chunk-5WRI5ZAA.js} +2 -17
- package/template/node_modules/.vite/deps/{chunk-PTVT3RFX.js → chunk-7IRBE5E4.js} +3 -3
- package/template/node_modules/.vite/deps/{chunk-XB525PXG.js → chunk-D3BYX6F4.js} +3 -3
- package/template/node_modules/.vite/deps/{chunk-KFGKZMLK.js → chunk-DUV225XW.js} +3 -3
- package/template/node_modules/.vite/deps/{chunk-4TLBUCVB.js → chunk-TNWQ7JGO.js} +2 -2
- package/template/node_modules/.vite/deps/clsx.js +1 -1
- package/template/node_modules/.vite/deps/embla-carousel-react.js +2 -2
- package/template/node_modules/.vite/deps/embla-carousel-wheel-gestures.js +1 -1
- package/template/node_modules/.vite/deps/react-dom.js +3 -3
- package/template/node_modules/.vite/deps/react-dom_client.js +3 -3
- package/template/node_modules/.vite/deps/react.js +2 -2
- package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js +2 -2
- package/template/node_modules/.vite/deps/react_jsx-runtime.js +3 -3
- package/template/node_modules/.vite/deps/tailwind-merge.js +1 -1
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/tsconfig.json +2 -9
- package/template/vitest.config.ts +0 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js +0 -33
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js.map +0 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Input.js +0 -13
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +0 -103
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js.map +0 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +0 -1019
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js.map +0 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +0 -95
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js.map +0 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js +0 -45
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-BAG6OO6S.js +0 -115
- package/template/node_modules/.vite/deps/chunk-BAG6OO6S.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-CQ3GYAYB.js +0 -112
- package/template/node_modules/.vite/deps/chunk-CQ3GYAYB.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-EGRHWZRV.js +0 -1
- package/template/node_modules/.vite/deps/chunk-EGRHWZRV.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-EVJ3DVH5.js +0 -628
- package/template/node_modules/.vite/deps/chunk-EVJ3DVH5.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-ILHRZGIS.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-QPJAV452.js +0 -13
- package/template/node_modules/.vite/deps/chunk-QPJAV452.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-SGWD4VEU.js +0 -15195
- package/template/node_modules/.vite/deps/chunk-SGWD4VEU.js.map +0 -7
- package/template/node_modules/.vite/deps/chunk-YOJ6QPGS.js +0 -231
- package/template/node_modules/.vite/deps/chunk-YOJ6QPGS.js.map +0 -7
- package/template/nodemon.json +0 -7
- package/template/tsconfig.node.json +0 -11
- package/template/vite.config.build.ts +0 -75
- package/template/vite.config.ts +0 -25
- /package/template/node_modules/.vite/deps/{@openai_apps-sdk-ui_components_Input.js.map → chunk-5WRI5ZAA.js.map} +0 -0
- /package/template/node_modules/.vite/deps/{chunk-PTVT3RFX.js.map → chunk-7IRBE5E4.js.map} +0 -0
- /package/template/node_modules/.vite/deps/{chunk-XB525PXG.js.map → chunk-D3BYX6F4.js.map} +0 -0
- /package/template/node_modules/.vite/deps/{chunk-KFGKZMLK.js.map → chunk-DUV225XW.js.map} +0 -0
- /package/template/node_modules/.vite/deps/{chunk-4TLBUCVB.js.map → chunk-TNWQ7JGO.js.map} +0 -0
|
@@ -4,16 +4,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __typeError = (msg) => {
|
|
8
|
-
throw TypeError(msg);
|
|
9
|
-
};
|
|
10
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
11
8
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
9
|
};
|
|
13
|
-
var __export = (target, all) => {
|
|
14
|
-
for (var name in all)
|
|
15
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
-
};
|
|
17
10
|
var __copyProps = (to, from, except, desc) => {
|
|
18
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -30,17 +23,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
23
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
24
|
mod
|
|
32
25
|
));
|
|
33
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
34
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
35
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
36
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
37
26
|
|
|
38
27
|
export {
|
|
39
28
|
__commonJS,
|
|
40
|
-
|
|
41
|
-
__toESM,
|
|
42
|
-
__privateGet,
|
|
43
|
-
__privateAdd,
|
|
44
|
-
__privateSet
|
|
29
|
+
__toESM
|
|
45
30
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-5WRI5ZAA.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TNWQ7JGO.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
7
7
|
|
|
8
8
|
// ../node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react-jsx-runtime.development.js
|
|
9
9
|
var require_react_jsx_runtime_development = __commonJS({
|
|
@@ -289,4 +289,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
289
289
|
* LICENSE file in the root directory of this source tree.
|
|
290
290
|
*)
|
|
291
291
|
*/
|
|
292
|
-
//# sourceMappingURL=chunk-
|
|
292
|
+
//# sourceMappingURL=chunk-7IRBE5E4.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_jsx_runtime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7IRBE5E4.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
7
7
|
|
|
8
8
|
// ../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Icon/svg/AddMember.js
|
|
9
9
|
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
|
@@ -4477,4 +4477,4 @@ export {
|
|
|
4477
4477
|
XXs_default,
|
|
4478
4478
|
XXsCrossed_default
|
|
4479
4479
|
};
|
|
4480
|
-
//# sourceMappingURL=chunk-
|
|
4480
|
+
//# sourceMappingURL=chunk-D3BYX6F4.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TNWQ7JGO.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
7
7
|
|
|
8
8
|
// ../node_modules/.pnpm/react-dom@19.2.0_react@19.2.0/node_modules/react-dom/cjs/react-dom.development.js
|
|
9
9
|
var require_react_dom_development = __commonJS({
|
|
@@ -277,4 +277,4 @@ react-dom/cjs/react-dom.development.js:
|
|
|
277
277
|
* LICENSE file in the root directory of this source tree.
|
|
278
278
|
*)
|
|
279
279
|
*/
|
|
280
|
-
//# sourceMappingURL=chunk-
|
|
280
|
+
//# sourceMappingURL=chunk-DUV225XW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__commonJS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
4
4
|
|
|
5
5
|
// ../node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react.development.js
|
|
6
6
|
var require_react_development = __commonJS({
|
|
@@ -1001,4 +1001,4 @@ react/cjs/react.development.js:
|
|
|
1001
1001
|
* LICENSE file in the root directory of this source tree.
|
|
1002
1002
|
*)
|
|
1003
1003
|
*/
|
|
1004
|
-
//# sourceMappingURL=chunk-
|
|
1004
|
+
//# sourceMappingURL=chunk-TNWQ7JGO.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TNWQ7JGO.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
7
7
|
|
|
8
8
|
// ../node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.0/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js
|
|
9
9
|
var import_react = __toESM(require_react());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react_dom
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-DUV225XW.js";
|
|
4
|
+
import "./chunk-TNWQ7JGO.js";
|
|
5
|
+
import "./chunk-5WRI5ZAA.js";
|
|
6
6
|
export default require_react_dom();
|
|
7
7
|
//# sourceMappingURL=react-dom.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react_dom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DUV225XW.js";
|
|
4
4
|
import {
|
|
5
5
|
require_react
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TNWQ7JGO.js";
|
|
7
7
|
import {
|
|
8
8
|
__commonJS
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
10
10
|
|
|
11
11
|
// ../node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js
|
|
12
12
|
var require_scheduler_development = __commonJS({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TNWQ7JGO.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WRI5ZAA.js";
|
|
7
7
|
|
|
8
8
|
// ../node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
9
9
|
var require_react_jsx_dev_runtime_development = __commonJS({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_jsx_runtime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7IRBE5E4.js";
|
|
4
|
+
import "./chunk-TNWQ7JGO.js";
|
|
5
|
+
import "./chunk-5WRI5ZAA.js";
|
|
6
6
|
export default require_jsx_runtime();
|
|
7
7
|
//# sourceMappingURL=react_jsx-runtime.js.map
|
package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.0.13","results":[[":src/components/album/
|
|
1
|
+
{"version":"4.0.13","results":[[":src/components/album/fullscreen-viewer.test.tsx",{"duration":269.09346600000026,"failed":false}],[":src/components/album/albums.test.tsx",{"duration":333.004915,"failed":false}],[":src/components/resources/carousel-resource.test.tsx",{"duration":258.82853899999986,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":89.38576499999999,"failed":false}],[":src/components/resources/counter-resource.test.tsx",{"duration":301.93197299999974,"failed":false}],[":src/components/resources/albums-resource.test.tsx",{"duration":284.97863299999995,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":470.7201100000002,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":387.06738199999995,"failed":false}],[":src/components/card/card.test.tsx",{"duration":54.93828200000007,"failed":false}]]}
|
package/template/tsconfig.json
CHANGED
|
@@ -16,14 +16,7 @@
|
|
|
16
16
|
"strict": true,
|
|
17
17
|
"noUnusedLocals": true,
|
|
18
18
|
"noUnusedParameters": true,
|
|
19
|
-
"noFallthroughCasesInSwitch": true
|
|
20
|
-
|
|
21
|
-
"declaration": true,
|
|
22
|
-
"declarationMap": true,
|
|
23
|
-
"sourceMap": true,
|
|
24
|
-
|
|
25
|
-
"baseUrl": "."
|
|
19
|
+
"noFallthroughCasesInSwitch": true
|
|
26
20
|
},
|
|
27
|
-
"include": ["src", "dev"]
|
|
28
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
|
21
|
+
"include": ["src", "dev"]
|
|
29
22
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dist_exports2 as dist_exports
|
|
3
|
-
} from "./chunk-SGWD4VEU.js";
|
|
4
|
-
import "./chunk-KFGKZMLK.js";
|
|
5
|
-
import {
|
|
6
|
-
clsx_default
|
|
7
|
-
} from "./chunk-CNYJBM5F.js";
|
|
8
|
-
import {
|
|
9
|
-
require_jsx_runtime
|
|
10
|
-
} from "./chunk-PTVT3RFX.js";
|
|
11
|
-
import {
|
|
12
|
-
require_react
|
|
13
|
-
} from "./chunk-4TLBUCVB.js";
|
|
14
|
-
import {
|
|
15
|
-
__toESM
|
|
16
|
-
} from "./chunk-ILHRZGIS.js";
|
|
17
|
-
|
|
18
|
-
// ../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Checkbox/Checkbox.js
|
|
19
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
|
20
|
-
var import_react = __toESM(require_react());
|
|
21
|
-
import s from "/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Checkbox/Checkbox.module.css";
|
|
22
|
-
var Checkbox = ({ className, label, id: propsId, disabled, orientation = "left", ...restProps }) => {
|
|
23
|
-
const reactId = (0, import_react.useId)();
|
|
24
|
-
const id = propsId ?? reactId;
|
|
25
|
-
return (0, import_jsx_runtime.jsxs)("div", { "data-disabled": disabled ? "" : void 0, "data-has-label": label ? "" : void 0, "data-orientation": orientation, className: clsx_default(className, s.Container), children: [(0, import_jsx_runtime.jsx)(dist_exports.Root, { className: s.Checkbox, id, disabled, ...restProps, children: (0, import_jsx_runtime.jsx)(dist_exports.Indicator, { className: s.CheckMark }) }), label && (0, import_jsx_runtime.jsx)("label", { htmlFor: id, className: s.Label, onMouseDown: (event) => {
|
|
26
|
-
if (!event.defaultPrevented && event.detail > 1)
|
|
27
|
-
event.preventDefault();
|
|
28
|
-
}, children: label })] });
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
Checkbox
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=@openai_apps-sdk-ui_components_Checkbox.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/src/components/Checkbox/Checkbox.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport clsx from \"clsx\"\nimport { Checkbox as RadixCheckbox } from \"radix-ui\"\nimport { type FocusEventHandler, type ReactNode, useId } from \"react\"\nimport s from \"./Checkbox.module.css\"\n\nexport type CheckboxProps = {\n /** The `id` of the checkbox. */\n id?: string\n /** The state of the checkbox when it is initially rendered. Use when you do not need to control its state. */\n defaultChecked?: boolean | \"indeterminate\"\n /** The controlled state of the checkbox. Must be used in conjunction with `onCheckedChange`. */\n checked?: boolean | \"indeterminate\"\n /** Optional accessible label rendered to the right of the checkbox. */\n label?: ReactNode\n /** Event handler called when the state of the checkbox changes. */\n onCheckedChange?: (nextState: boolean) => void\n /** Event handler called when the checkbox looses focus. */\n onBlur?: FocusEventHandler<HTMLButtonElement>\n /** Event handler called when the checkbox gains focus. */\n onFocus?: FocusEventHandler<HTMLButtonElement>\n /** When `true`, prevents the user from interacting with the checkbox. */\n disabled?: boolean\n /** When `true`, indicates that the user must check the checkbox before the owning form can be submitted. */\n required?: boolean\n /** The name of the checkbox. Submitted with its owning form as part of a name/value pair. */\n name?: string\n /** The value given as data when submitted with a `name`. */\n value?: string\n /** CSS classes applied to wrapper node */\n className?: string\n /**\n * The orientation of the checkbox relative to the label.\n *\n * @default \"left\"\n */\n orientation?: \"left\" | \"right\"\n}\n\nexport const Checkbox = ({\n className,\n label,\n id: propsId,\n disabled,\n orientation = \"left\",\n ...restProps\n}: CheckboxProps) => {\n const reactId = useId()\n const id = propsId ?? reactId\n\n return (\n <div\n data-disabled={disabled ? \"\" : undefined}\n data-has-label={label ? \"\" : undefined}\n data-orientation={orientation}\n className={clsx(className, s.Container)}\n >\n <RadixCheckbox.Root className={s.Checkbox} id={id} disabled={disabled} {...restProps}>\n <RadixCheckbox.Indicator className={s.CheckMark} />\n </RadixCheckbox.Root>\n {label && (\n <label\n htmlFor={id}\n className={s.Label}\n onMouseDown={(event) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault()\n }}\n >\n {label}\n </label>\n )}\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAIA,mBAA8D;AAC9D,OAAO,OAAO;AAmCP,IAAM,WAAW,CAAC,EACvB,WACA,OACA,IAAI,SACJ,UACA,cAAc,QACd,GAAG,UAAS,MACM;AAClB,QAAM,cAAU,oBAAK;AACrB,QAAM,KAAK,WAAW;AAEtB,aACE,mBAAAA,MAAA,OAAA,EAAA,iBACiB,WAAW,KAAK,QAAS,kBACxB,QAAQ,KAAK,QAAS,oBACpB,aAClB,WAAW,aAAK,WAAW,EAAE,SAAS,GAAC,UAAA,KAEvC,mBAAAC,KAAC,aAAc,MAAI,EAAC,WAAW,EAAE,UAAU,IAAQ,UAAkB,GAAM,WAAS,cAClF,mBAAAA,KAAC,aAAc,WAAS,EAAC,WAAW,EAAE,UAAS,CAAA,EAAI,CAAA,GAEpD,aACC,mBAAAA,KAAA,SAAA,EACE,SAAS,IACT,WAAW,EAAE,OACb,aAAa,CAAC,UAAS;AACrB,QAAI,CAAC,MAAM,oBAAoB,MAAM,SAAS;AAAG,YAAM,eAAc;EACvE,GAAC,UAEA,MAAK,CAAA,CAET,EAAA,CAAA;AAGP;",
|
|
6
|
-
"names": ["_jsxs", "_jsx"]
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Input
|
|
3
|
-
} from "./chunk-CQ3GYAYB.js";
|
|
4
|
-
import "./chunk-QPJAV452.js";
|
|
5
|
-
import "./chunk-EGRHWZRV.js";
|
|
6
|
-
import "./chunk-CNYJBM5F.js";
|
|
7
|
-
import "./chunk-PTVT3RFX.js";
|
|
8
|
-
import "./chunk-4TLBUCVB.js";
|
|
9
|
-
import "./chunk-ILHRZGIS.js";
|
|
10
|
-
export {
|
|
11
|
-
Input
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=@openai_apps-sdk-ui_components_Input.js.map
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useResizeObserver
|
|
3
|
-
} from "./chunk-YOJ6QPGS.js";
|
|
4
|
-
import {
|
|
5
|
-
handlePressableMouseEnter,
|
|
6
|
-
waitForAnimationFrame
|
|
7
|
-
} from "./chunk-BAG6OO6S.js";
|
|
8
|
-
import {
|
|
9
|
-
dist_exports4 as dist_exports
|
|
10
|
-
} from "./chunk-SGWD4VEU.js";
|
|
11
|
-
import "./chunk-KFGKZMLK.js";
|
|
12
|
-
import "./chunk-EGRHWZRV.js";
|
|
13
|
-
import {
|
|
14
|
-
clsx_default
|
|
15
|
-
} from "./chunk-CNYJBM5F.js";
|
|
16
|
-
import {
|
|
17
|
-
require_jsx_runtime
|
|
18
|
-
} from "./chunk-PTVT3RFX.js";
|
|
19
|
-
import {
|
|
20
|
-
require_react
|
|
21
|
-
} from "./chunk-4TLBUCVB.js";
|
|
22
|
-
import {
|
|
23
|
-
__toESM
|
|
24
|
-
} from "./chunk-ILHRZGIS.js";
|
|
25
|
-
|
|
26
|
-
// ../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/SegmentedControl/SegmentedControl.js
|
|
27
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
|
28
|
-
var import_react = __toESM(require_react());
|
|
29
|
-
import s from "/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/SegmentedControl/SegmentedControl.module.css";
|
|
30
|
-
var SegmentedControl = ({ value, onChange, children, block, pill = true, size = "md", gutterSize, className, onClick, ...restProps }) => {
|
|
31
|
-
const rootRef = (0, import_react.useRef)(null);
|
|
32
|
-
const thumbRef = (0, import_react.useRef)(null);
|
|
33
|
-
const applyThumbSizing = (0, import_react.useCallback)((attemptScroll) => {
|
|
34
|
-
const root = rootRef.current;
|
|
35
|
-
const thumb = thumbRef.current;
|
|
36
|
-
if (!root || !thumb) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const activeNode = root == null ? void 0 : root.querySelector('[data-state="on"]');
|
|
40
|
-
if (!activeNode) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const rootWidth = root.clientWidth;
|
|
44
|
-
let targetWidth = Math.floor(activeNode.clientWidth);
|
|
45
|
-
const targetOffset = activeNode.offsetLeft;
|
|
46
|
-
if (rootWidth - (targetWidth + targetOffset) < 2) {
|
|
47
|
-
targetWidth = targetWidth - 1;
|
|
48
|
-
}
|
|
49
|
-
thumb.style.width = `${Math.floor(targetWidth)}px`;
|
|
50
|
-
thumb.style.transform = `translateX(${targetOffset}px)`;
|
|
51
|
-
if (root.scrollWidth > rootWidth) {
|
|
52
|
-
const buffer = rootWidth * 0.15;
|
|
53
|
-
const scrollLeft = root.scrollLeft;
|
|
54
|
-
const left = activeNode.offsetLeft;
|
|
55
|
-
const right = left + targetWidth;
|
|
56
|
-
if (left < scrollLeft + buffer || right > scrollLeft + rootWidth - buffer) {
|
|
57
|
-
if (attemptScroll) {
|
|
58
|
-
activeNode.scrollIntoView({ block: "nearest", inline: "center", behavior: "smooth" });
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}, []);
|
|
63
|
-
useResizeObserver({
|
|
64
|
-
// @ts-expect-error(2322) -- bug in types: https://github.com/juliencrn/usehooks-ts/issues/663
|
|
65
|
-
ref: rootRef,
|
|
66
|
-
onResize: () => {
|
|
67
|
-
const thumb = thumbRef.current;
|
|
68
|
-
if (!thumb) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const currentTransition = thumb.style.transition;
|
|
72
|
-
thumb.style.transition = "";
|
|
73
|
-
applyThumbSizing(false);
|
|
74
|
-
thumb.style.transition = currentTransition;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
78
|
-
const root = rootRef.current;
|
|
79
|
-
const thumb = thumbRef.current;
|
|
80
|
-
if (!root || !thumb) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
applyThumbSizing(!!thumb.style.transition);
|
|
84
|
-
if (!thumb.style.transition) {
|
|
85
|
-
waitForAnimationFrame(() => {
|
|
86
|
-
thumb.style.transition = "width 300ms var(--cubic-enter), transform 300ms var(--cubic-enter)";
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}, [applyThumbSizing, value, size, gutterSize, pill]);
|
|
90
|
-
const handleValueChange = (nextValue) => {
|
|
91
|
-
if (nextValue && onChange)
|
|
92
|
-
onChange(nextValue);
|
|
93
|
-
};
|
|
94
|
-
return (0, import_jsx_runtime.jsxs)(dist_exports.Root, { ref: rootRef, className: clsx_default(s.SegmentedControl, className), type: "single", value, loop: false, onValueChange: handleValueChange, onClick, "data-block": block ? "" : void 0, "data-pill": pill ? "" : void 0, "data-size": size, "data-gutter-size": gutterSize, ...restProps, children: [(0, import_jsx_runtime.jsx)("div", { className: s.SegmentedControlThumb, ref: thumbRef }), children] });
|
|
95
|
-
};
|
|
96
|
-
var Segment = ({ children, ...restProps }) => {
|
|
97
|
-
return (0, import_jsx_runtime.jsx)(dist_exports.Item, { className: s.SegmentedControlOption, ...restProps, onPointerEnter: handlePressableMouseEnter, children: (0, import_jsx_runtime.jsx)("span", { className: "relative", children }) });
|
|
98
|
-
};
|
|
99
|
-
SegmentedControl.Option = Segment;
|
|
100
|
-
export {
|
|
101
|
-
SegmentedControl
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=@openai_apps-sdk-ui_components_SegmentedControl.js.map
|
package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/src/components/SegmentedControl/SegmentedControl.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport clsx from \"clsx\"\nimport { ToggleGroup } from \"radix-ui\"\nimport { useCallback, useLayoutEffect, useRef } from \"react\"\nimport { useResizeObserver } from \"usehooks-ts\"\nimport { handlePressableMouseEnter, waitForAnimationFrame } from \"../../lib/helpers\"\nimport { type ControlSize, type Sizes } from \"../../types\"\nimport s from \"./SegmentedControl.module.css\"\n\nexport type SizeVariant = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n\nexport type SegmentedControlProps<T extends string> = {\n /**\n * Controlled value for the group\n */\n \"value\": T\n /** Callback for when a new value is selected */\n \"onChange\"?: (nextValue: T) => void\n /** Callback any time the control is clicked (even if a new value was not selected) */\n \"onClick\"?: () => void\n /**\n * Text read aloud to screen readers when the control is focused\n */\n \"aria-label\": string\n /**\n * Controls the size of the segmented control\n *\n * | 3xs | 2xs | xs | sm | md | lg | xl | 2xl | 3xl |\n * | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |\n * | `22px` | `24px` | `26px` | `28px` | `32px` | `36px` | `40px` | `44px` | `48px` |\n *\n * @default md\n */\n \"size\"?: ControlSize\n /**\n * Controls gutter on the edges of the button, defaults to value from `size`.\n *\n * | 2xs | xs | sm | md | lg | xl |\n * | ------ | ------ | ------ | ------ | ------ | ------ |\n * | `6px` | `8px` | `10px` | `12px` | `14px` | `16px` |\n */\n \"gutterSize\"?: Sizes<\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\">\n /** Disable the entire group */\n \"disabled\"?: boolean\n /**\n * Display the control as a block element with equal width segments\n * @default false\n */\n \"block\"?: boolean\n /**\n * Determines if the segment control, and its options, should be a fully rounded pill shape.\n * @default false\n */\n \"pill\"?: boolean\n \"className\"?: string\n \"children\": React.ReactNode\n}\n\nexport const SegmentedControl = <T extends string>({\n value,\n onChange,\n children,\n block,\n pill = true,\n size = \"md\",\n gutterSize,\n className,\n onClick,\n ...restProps\n}: SegmentedControlProps<T>) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const thumbRef = useRef<HTMLDivElement>(null)\n\n const applyThumbSizing = useCallback((attemptScroll: boolean) => {\n const root = rootRef.current\n const thumb = thumbRef.current\n\n if (!root || !thumb) {\n return\n }\n\n // Get selected node\n const activeNode = root?.querySelector<HTMLDivElement>('[data-state=\"on\"]')\n\n // Impossible\n if (!activeNode) {\n return\n }\n\n const rootWidth = root.clientWidth\n let targetWidth = Math.floor(activeNode.clientWidth)\n const targetOffset = activeNode.offsetLeft\n\n // Detect if the thumb is moving too far to the edge of the container.\n // This would most commonly be due to subpixel widths adding up to excessive distance.\n if (rootWidth - (targetWidth + targetOffset) < 2) {\n targetWidth = targetWidth - 1\n }\n\n thumb.style.width = `${Math.floor(targetWidth)}px`\n thumb.style.transform = `translateX(${targetOffset}px)`\n\n // If the control is scrollable, ensure the active option is visible\n if (root.scrollWidth > rootWidth) {\n // Only scroll items near the edge, but not the inner 2/3.\n const buffer = rootWidth * 0.15\n const scrollLeft = root.scrollLeft\n const left = activeNode.offsetLeft\n const right = left + targetWidth\n if (left < scrollLeft + buffer || right > scrollLeft + rootWidth - buffer) {\n // Cheap trick to avoid unintentional scroll on mount - transition is set after mounting\n if (attemptScroll) {\n activeNode.scrollIntoView({ block: \"nearest\", inline: \"center\", behavior: \"smooth\" })\n }\n }\n }\n }, [])\n\n useResizeObserver({\n // @ts-expect-error(2322) -- bug in types: https://github.com/juliencrn/usehooks-ts/issues/663\n ref: rootRef,\n onResize: () => {\n const thumb = thumbRef.current\n\n if (!thumb) {\n return\n }\n\n // Perform the size update instantly\n const currentTransition = thumb.style.transition\n thumb.style.transition = \"\"\n applyThumbSizing(false)\n thumb.style.transition = currentTransition\n },\n })\n\n useLayoutEffect(() => {\n const root = rootRef.current\n const thumb = thumbRef.current\n\n if (!root || !thumb) {\n return\n }\n\n // Cheap trick to avoid unintentional scroll on mount - transition is set after mounting\n applyThumbSizing(!!thumb.style.transition)\n\n // Apply transition after initial calculation is set\n if (!thumb.style.transition) {\n waitForAnimationFrame(() => {\n thumb.style.transition =\n \"width 300ms var(--cubic-enter), transform 300ms var(--cubic-enter)\"\n })\n }\n }, [applyThumbSizing, value, size, gutterSize, pill])\n\n const handleValueChange = (nextValue: T) => {\n // Only trigger onChange when a value exists\n // Disallow toggling off enabled items\n if (nextValue && onChange) onChange(nextValue)\n }\n\n return (\n <ToggleGroup.Root\n ref={rootRef}\n className={clsx(s.SegmentedControl, className)}\n type=\"single\"\n value={value}\n loop={false}\n onValueChange={handleValueChange}\n onClick={onClick}\n data-block={block ? \"\" : undefined}\n data-pill={pill ? \"\" : undefined}\n data-size={size}\n data-gutter-size={gutterSize}\n {...restProps}\n >\n <div className={s.SegmentedControlThumb} ref={thumbRef} />\n {children}\n </ToggleGroup.Root>\n )\n}\n\ntype SegmentedControlOptionProps = {\n /**\n * Option value\n */\n \"value\": string\n /**\n * Text read aloud to screen readers when the option is focused\n */\n \"aria-label\"?: string\n /**\n * Content to render in the option\n */\n \"children\": React.ReactNode\n /**\n * Disable the individual option\n */\n \"disabled\"?: boolean\n}\n\nconst Segment = ({ children, ...restProps }: SegmentedControlOptionProps) => {\n return (\n <ToggleGroup.Item\n className={s.SegmentedControlOption}\n {...restProps}\n onPointerEnter={handlePressableMouseEnter}\n >\n <span className=\"relative\">{children}</span>\n </ToggleGroup.Item>\n )\n}\n\nSegmentedControl.Option = Segment\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAqD;AAIrD,OAAO,OAAO;AAmDP,IAAM,mBAAmB,CAAmB,EACjD,OACA,UACA,UACA,OACA,OAAO,MACP,OAAO,MACP,YACA,WACA,SACA,GAAG,UAAS,MACiB;AAC7B,QAAM,cAAU,qBAAuB,IAAI;AAC3C,QAAM,eAAW,qBAAuB,IAAI;AAE5C,QAAM,uBAAmB,0BAAY,CAAC,kBAA0B;AAC9D,UAAM,OAAO,QAAQ;AACrB,UAAM,QAAQ,SAAS;AAEvB,QAAI,CAAC,QAAQ,CAAC,OAAO;AACnB;IACF;AAGA,UAAM,aAAa,6BAAM,cAA8B;AAGvD,QAAI,CAAC,YAAY;AACf;IACF;AAEA,UAAM,YAAY,KAAK;AACvB,QAAI,cAAc,KAAK,MAAM,WAAW,WAAW;AACnD,UAAM,eAAe,WAAW;AAIhC,QAAI,aAAa,cAAc,gBAAgB,GAAG;AAChD,oBAAc,cAAc;IAC9B;AAEA,UAAM,MAAM,QAAQ,GAAG,KAAK,MAAM,WAAW,CAAC;AAC9C,UAAM,MAAM,YAAY,cAAc,YAAY;AAGlD,QAAI,KAAK,cAAc,WAAW;AAEhC,YAAM,SAAS,YAAY;AAC3B,YAAM,aAAa,KAAK;AACxB,YAAM,OAAO,WAAW;AACxB,YAAM,QAAQ,OAAO;AACrB,UAAI,OAAO,aAAa,UAAU,QAAQ,aAAa,YAAY,QAAQ;AAEzE,YAAI,eAAe;AACjB,qBAAW,eAAe,EAAE,OAAO,WAAW,QAAQ,UAAU,UAAU,SAAQ,CAAE;QACtF;MACF;IACF;EACF,GAAG,CAAA,CAAE;AAEL,oBAAkB;;IAEhB,KAAK;IACL,UAAU,MAAK;AACb,YAAM,QAAQ,SAAS;AAEvB,UAAI,CAAC,OAAO;AACV;MACF;AAGA,YAAM,oBAAoB,MAAM,MAAM;AACtC,YAAM,MAAM,aAAa;AACzB,uBAAiB,KAAK;AACtB,YAAM,MAAM,aAAa;IAC3B;GACD;AAED,oCAAgB,MAAK;AACnB,UAAM,OAAO,QAAQ;AACrB,UAAM,QAAQ,SAAS;AAEvB,QAAI,CAAC,QAAQ,CAAC,OAAO;AACnB;IACF;AAGA,qBAAiB,CAAC,CAAC,MAAM,MAAM,UAAU;AAGzC,QAAI,CAAC,MAAM,MAAM,YAAY;AAC3B,4BAAsB,MAAK;AACzB,cAAM,MAAM,aACV;MACJ,CAAC;IACH;EACF,GAAG,CAAC,kBAAkB,OAAO,MAAM,YAAY,IAAI,CAAC;AAEpD,QAAM,oBAAoB,CAAC,cAAgB;AAGzC,QAAI,aAAa;AAAU,eAAS,SAAS;EAC/C;AAEA,aACE,mBAAAA,MAAC,aAAY,MAAI,EACf,KAAK,SACL,WAAW,aAAK,EAAE,kBAAkB,SAAS,GAC7C,MAAK,UACL,OACA,MAAM,OACN,eAAe,mBACf,SAAgB,cACJ,QAAQ,KAAK,QAAS,aACvB,OAAO,KAAK,QAAS,aACrB,MAAI,oBACG,YAAU,GACxB,WAAS,UAAA,KAEb,mBAAAC,KAAA,OAAA,EAAK,WAAW,EAAE,uBAAuB,KAAK,SAAQ,CAAA,GACrD,QAAQ,EAAA,CAAA;AAGf;AAqBA,IAAM,UAAU,CAAC,EAAE,UAAU,GAAG,UAAS,MAAmC;AAC1E,aACE,mBAAAA,KAAC,aAAY,MAAI,EACf,WAAW,EAAE,wBAAsB,GAC/B,WACJ,gBAAgB,2BAAyB,cAEzC,mBAAAA,KAAA,QAAA,EAAM,WAAU,YAAU,SAAU,CAAA,EAAQ,CAAA;AAGlD;AAEA,iBAAiB,SAAS;",
|
|
6
|
-
"names": ["_jsxs", "_jsx"]
|
|
7
|
-
}
|