sunpeak 0.5.10 → 0.5.13
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/sunpeak.js +11 -1
- package/dist/index.cjs +27 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -8
- package/dist/index.js.map +1 -1
- package/dist/style.css +12 -4
- package/package.json +1 -1
- package/template/_gitignore +47 -0
- package/template/dist/chatgpt/albums.js +49 -0
- package/template/dist/chatgpt/carousel.js +49 -0
- package/template/dist/chatgpt/counter.js +49 -0
- package/template/node_modules/.bin/eslint +21 -0
- package/template/node_modules/.bin/eslint-config-prettier +21 -0
- package/template/node_modules/.bin/nodemon +21 -0
- package/template/node_modules/.bin/prettier +21 -0
- package/template/node_modules/.bin/sunpeak +21 -0
- package/template/node_modules/.bin/ts-node +21 -0
- package/template/node_modules/.bin/ts-node-cwd +21 -0
- package/template/node_modules/.bin/ts-node-esm +21 -0
- package/template/node_modules/.bin/ts-node-script +21 -0
- package/template/node_modules/.bin/ts-node-transpile-only +21 -0
- package/template/node_modules/.bin/ts-script +21 -0
- package/template/node_modules/.bin/tsc +21 -0
- package/template/node_modules/.bin/tsserver +21 -0
- package/template/node_modules/.bin/tsx +21 -0
- package/template/node_modules/.bin/vite +21 -0
- package/template/node_modules/.bin/vitest +21 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +20 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js.map +7 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js +33 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js.map +7 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Icon.js +1498 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Icon.js.map +7 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Input.js +13 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Input.js.map +7 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +103 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js.map +7 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +1019 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js.map +7 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +95 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js.map +7 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js +45 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js.map +7 -0
- package/template/node_modules/.vite/deps/_metadata.json +151 -0
- package/template/node_modules/.vite/deps/chunk-4TLBUCVB.js +1004 -0
- package/template/node_modules/.vite/deps/chunk-4TLBUCVB.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-BAG6OO6S.js +115 -0
- package/template/node_modules/.vite/deps/chunk-BAG6OO6S.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-CNYJBM5F.js +21 -0
- package/template/node_modules/.vite/deps/chunk-CNYJBM5F.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-CQ3GYAYB.js +112 -0
- package/template/node_modules/.vite/deps/chunk-CQ3GYAYB.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-EGRHWZRV.js +1 -0
- package/template/node_modules/.vite/deps/chunk-EGRHWZRV.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-EVJ3DVH5.js +628 -0
- package/template/node_modules/.vite/deps/chunk-EVJ3DVH5.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-ILHRZGIS.js +46 -0
- package/template/node_modules/.vite/deps/chunk-ILHRZGIS.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-KFGKZMLK.js +280 -0
- package/template/node_modules/.vite/deps/chunk-KFGKZMLK.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-PTVT3RFX.js +292 -0
- package/template/node_modules/.vite/deps/chunk-PTVT3RFX.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-QPJAV452.js +13 -0
- package/template/node_modules/.vite/deps/chunk-QPJAV452.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-SGWD4VEU.js +15195 -0
- package/template/node_modules/.vite/deps/chunk-SGWD4VEU.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-XB525PXG.js +4480 -0
- package/template/node_modules/.vite/deps/chunk-XB525PXG.js.map +7 -0
- package/template/node_modules/.vite/deps/chunk-YOJ6QPGS.js +231 -0
- package/template/node_modules/.vite/deps/chunk-YOJ6QPGS.js.map +7 -0
- package/template/node_modules/.vite/deps/clsx.js +10 -0
- package/template/node_modules/.vite/deps/clsx.js.map +7 -0
- package/template/node_modules/.vite/deps/embla-carousel-react.js +1712 -0
- package/template/node_modules/.vite/deps/embla-carousel-react.js.map +7 -0
- package/template/node_modules/.vite/deps/embla-carousel-wheel-gestures.js +589 -0
- package/template/node_modules/.vite/deps/embla-carousel-wheel-gestures.js.map +7 -0
- package/template/node_modules/.vite/deps/package.json +3 -0
- package/template/node_modules/.vite/deps/react-dom.js +7 -0
- package/template/node_modules/.vite/deps/react-dom.js.map +7 -0
- package/template/node_modules/.vite/deps/react-dom_client.js +20217 -0
- package/template/node_modules/.vite/deps/react-dom_client.js.map +7 -0
- package/template/node_modules/.vite/deps/react.js +6 -0
- package/template/node_modules/.vite/deps/react.js.map +7 -0
- package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js +278 -0
- package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +7 -0
- package/template/node_modules/.vite/deps/react_jsx-runtime.js +7 -0
- package/template/node_modules/.vite/deps/react_jsx-runtime.js.map +7 -0
- package/template/node_modules/.vite/deps/tailwind-merge.js +3095 -0
- package/template/node_modules/.vite/deps/tailwind-merge.js.map +7 -0
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/template/src/components/album/album-card.tsx +3 -1
- package/template/src/components/album/albums.test.tsx +47 -0
- package/template/src/components/album/albums.tsx +15 -2
- package/template/src/components/album/fullscreen-viewer.test.tsx +30 -1
- package/template/src/components/album/fullscreen-viewer.tsx +17 -3
- package/template/src/components/card/card.tsx +3 -0
- package/template/src/components/resources/albums-resource.test.tsx +81 -0
- package/template/src/components/resources/albums-resource.tsx +18 -1
- package/template/src/components/resources/carousel-resource.test.tsx +156 -0
- package/template/src/components/resources/carousel-resource.tsx +17 -2
- package/template/src/components/resources/counter-resource.test.tsx +116 -0
- package/template/src/components/resources/counter-resource.tsx +30 -5
- /package/template/{.prettierignore → _prettierignore} +0 -0
- /package/template/{.prettierrc → _prettierrc} +0 -0
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useTimeout
|
|
3
|
+
} from "./chunk-YOJ6QPGS.js";
|
|
4
|
+
import {
|
|
5
|
+
handlePressableMouseEnter,
|
|
6
|
+
isDev,
|
|
7
|
+
isTest,
|
|
8
|
+
toCssVariables,
|
|
9
|
+
toFilterProperty,
|
|
10
|
+
toMsDurationProperty,
|
|
11
|
+
toOpacityProperty,
|
|
12
|
+
toTransformProperty,
|
|
13
|
+
waitForAnimationFrame
|
|
14
|
+
} from "./chunk-BAG6OO6S.js";
|
|
15
|
+
import {
|
|
16
|
+
Check_default,
|
|
17
|
+
Copy_default
|
|
18
|
+
} from "./chunk-XB525PXG.js";
|
|
19
|
+
import {
|
|
20
|
+
o
|
|
21
|
+
} from "./chunk-QPJAV452.js";
|
|
22
|
+
import {
|
|
23
|
+
clsx_default
|
|
24
|
+
} from "./chunk-CNYJBM5F.js";
|
|
25
|
+
import {
|
|
26
|
+
require_jsx_runtime
|
|
27
|
+
} from "./chunk-PTVT3RFX.js";
|
|
28
|
+
import {
|
|
29
|
+
require_react
|
|
30
|
+
} from "./chunk-4TLBUCVB.js";
|
|
31
|
+
import {
|
|
32
|
+
__toESM
|
|
33
|
+
} from "./chunk-ILHRZGIS.js";
|
|
34
|
+
|
|
35
|
+
// ../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/Button/Button.js
|
|
36
|
+
var import_jsx_runtime6 = __toESM(require_jsx_runtime());
|
|
37
|
+
var import_react8 = __toESM(require_react());
|
|
38
|
+
|
|
39
|
+
// ../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/lib/renderHelpers.js
|
|
40
|
+
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
|
41
|
+
var import_react = __toESM(require_react());
|
|
42
|
+
var flattenTextNodes = (children) => {
|
|
43
|
+
const nodes = import_react.Children.toArray(children);
|
|
44
|
+
const result = [];
|
|
45
|
+
let buffer = "";
|
|
46
|
+
const flush = () => {
|
|
47
|
+
if (buffer !== "") {
|
|
48
|
+
result.push(buffer);
|
|
49
|
+
buffer = "";
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
for (const node of nodes) {
|
|
53
|
+
if (node == null || typeof node === "boolean") {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (typeof node === "string" || typeof node === "number") {
|
|
57
|
+
buffer += String(node);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
flush();
|
|
61
|
+
result.push(node);
|
|
62
|
+
}
|
|
63
|
+
flush();
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
var wrapTextNodeSiblings = (children) => {
|
|
67
|
+
const flattenedChildren = flattenTextNodes(children);
|
|
68
|
+
const childrenCount = import_react.Children.count(flattenedChildren);
|
|
69
|
+
return import_react.Children.map(flattenedChildren, (child) => {
|
|
70
|
+
if (typeof child === "string" && !!child.trim()) {
|
|
71
|
+
if (childrenCount <= 1) {
|
|
72
|
+
return child;
|
|
73
|
+
}
|
|
74
|
+
return (0, import_jsx_runtime.jsx)("span", { children: child });
|
|
75
|
+
}
|
|
76
|
+
if ((0, import_react.isValidElement)(child)) {
|
|
77
|
+
const element = child;
|
|
78
|
+
const { children: innerChildren, ...restProps } = element.props;
|
|
79
|
+
if (innerChildren != null) {
|
|
80
|
+
return (0, import_react.cloneElement)(element, restProps, wrapTextNodeSiblings(innerChildren));
|
|
81
|
+
}
|
|
82
|
+
return element;
|
|
83
|
+
}
|
|
84
|
+
return child;
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// ../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/AppsSDKUIProvider/internal.js
|
|
89
|
+
var import_react3 = __toESM(require_react());
|
|
90
|
+
|
|
91
|
+
// ../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/AppsSDKUIProvider/AppsSDKUIContext.js
|
|
92
|
+
var import_react2 = __toESM(require_react());
|
|
93
|
+
var AppsSDKUIContext = (0, import_react2.createContext)(null);
|
|
94
|
+
|
|
95
|
+
// ../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/AppsSDKUIProvider/internal.js
|
|
96
|
+
function useLinkComponent() {
|
|
97
|
+
const context = (0, import_react3.useContext)(AppsSDKUIContext);
|
|
98
|
+
return (context == null ? void 0 : context.linkComponent) ?? "a";
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// ../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/Indicator/CircularProgress.js
|
|
102
|
+
var import_jsx_runtime2 = __toESM(require_jsx_runtime());
|
|
103
|
+
var import_react5 = __toESM(require_react());
|
|
104
|
+
|
|
105
|
+
// ../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/hooks/useSimulatedProgress.js
|
|
106
|
+
var import_react4 = __toESM(require_react());
|
|
107
|
+
|
|
108
|
+
// ../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/Indicator/CircularProgress.js
|
|
109
|
+
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/Indicator/CircularProgress.module.css";
|
|
110
|
+
|
|
111
|
+
// ../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/Indicator/LoadingDots.js
|
|
112
|
+
var import_jsx_runtime3 = __toESM(require_jsx_runtime());
|
|
113
|
+
import s2 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/Indicator/LoadingDots.module.css";
|
|
114
|
+
|
|
115
|
+
// ../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/Indicator/LoadingIndicator.js
|
|
116
|
+
var import_jsx_runtime4 = __toESM(require_jsx_runtime());
|
|
117
|
+
import s3 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/Indicator/LoadingIndicator.module.css";
|
|
118
|
+
var LoadingIndicator = ({ className, size, strokeWidth, style, ...restProps }) => {
|
|
119
|
+
return (0, import_jsx_runtime4.jsx)("div", { ...restProps, className: clsx_default(s3.LoadingIndicator, className), style: style || toCssVariables({
|
|
120
|
+
"indicator-size": size,
|
|
121
|
+
"indicator-stroke": strokeWidth
|
|
122
|
+
}) });
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// ../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/Transition/TransitionGroup.js
|
|
126
|
+
var import_jsx_runtime5 = __toESM(require_jsx_runtime());
|
|
127
|
+
var import_react7 = __toESM(require_react());
|
|
128
|
+
|
|
129
|
+
// ../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/Transition/getDisableAnimations.js
|
|
130
|
+
var getDisableAnimations_default = () => isTest;
|
|
131
|
+
|
|
132
|
+
// ../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/Transition/shared.js
|
|
133
|
+
var import_react6 = __toESM(require_react());
|
|
134
|
+
var ChildrenWithKeys = (children, shouldThrow = false, componentName = "TransitionGroup") => {
|
|
135
|
+
const validChildren = [];
|
|
136
|
+
import_react6.Children.forEach(children, (child) => {
|
|
137
|
+
if (child && typeof child === "object" && "key" in child && !!child.key) {
|
|
138
|
+
validChildren.push(child);
|
|
139
|
+
} else if (shouldThrow) {
|
|
140
|
+
throw new Error(`Child elements of <${componentName} /> must include a \`key\``);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
return validChildren;
|
|
144
|
+
};
|
|
145
|
+
var noop = () => {
|
|
146
|
+
};
|
|
147
|
+
var useChildCallback = (cb) => {
|
|
148
|
+
const ref = (0, import_react6.useRef)(cb);
|
|
149
|
+
ref.current = cb;
|
|
150
|
+
return (0, import_react6.useCallback)((element) => ref.current(element), []);
|
|
151
|
+
};
|
|
152
|
+
function computeNextRenderChildren(propChildrenArray, currentRenderChildren, createDefaultRenderChildProps, insertMethod) {
|
|
153
|
+
const propChildKeyMap = propChildrenArray.reduce((acc, child) => ({ ...acc, [child.key]: 1 }), {});
|
|
154
|
+
const currentRenderChildKeyMap = currentRenderChildren.reduce((acc, child) => ({ ...acc, [child.component.key]: 1 }), {});
|
|
155
|
+
const newRenderChildren = propChildrenArray.filter((propChild) => !currentRenderChildKeyMap[propChild.key]).map(createDefaultRenderChildProps);
|
|
156
|
+
const updatedCurrentChildren = currentRenderChildren.map((childProps) => ({
|
|
157
|
+
...childProps,
|
|
158
|
+
component: propChildrenArray.find(({ key }) => key === childProps.component.key) || childProps.component,
|
|
159
|
+
shouldRender: !!propChildKeyMap[childProps.component.key]
|
|
160
|
+
}));
|
|
161
|
+
return insertMethod === "append" ? updatedCurrentChildren.concat(newRenderChildren) : newRenderChildren.concat(updatedCurrentChildren);
|
|
162
|
+
}
|
|
163
|
+
function assertSingleChildWhenRef(componentName, ref, childrenCount) {
|
|
164
|
+
if ((isTest || isDev) && ref && childrenCount > 1) {
|
|
165
|
+
throw new Error(`Cannot use forwardRef with multiple children in <${componentName} />`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// ../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/Transition/TransitionGroup.js
|
|
170
|
+
import s4 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/Transition/TransitionGroup.module.css";
|
|
171
|
+
|
|
172
|
+
// ../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/Transition/transitionReducer.js
|
|
173
|
+
var RESTING_TRANSITION_STATE = {
|
|
174
|
+
enter: false,
|
|
175
|
+
enterActive: false,
|
|
176
|
+
exit: false,
|
|
177
|
+
exitActive: false,
|
|
178
|
+
interrupted: false
|
|
179
|
+
};
|
|
180
|
+
var getInitialTransitionState = (preventMountTransition) => ({
|
|
181
|
+
...RESTING_TRANSITION_STATE,
|
|
182
|
+
enter: !preventMountTransition
|
|
183
|
+
});
|
|
184
|
+
var transitionReducer = (state, action) => {
|
|
185
|
+
switch (action.type) {
|
|
186
|
+
case "enter-before":
|
|
187
|
+
return {
|
|
188
|
+
enter: true,
|
|
189
|
+
enterActive: false,
|
|
190
|
+
exit: false,
|
|
191
|
+
exitActive: false,
|
|
192
|
+
interrupted: state.interrupted || state.exit
|
|
193
|
+
};
|
|
194
|
+
case "enter-active":
|
|
195
|
+
return {
|
|
196
|
+
enter: true,
|
|
197
|
+
enterActive: true,
|
|
198
|
+
exit: false,
|
|
199
|
+
exitActive: false,
|
|
200
|
+
interrupted: false
|
|
201
|
+
};
|
|
202
|
+
case "exit-before":
|
|
203
|
+
return {
|
|
204
|
+
enter: false,
|
|
205
|
+
enterActive: false,
|
|
206
|
+
exit: true,
|
|
207
|
+
exitActive: false,
|
|
208
|
+
interrupted: state.interrupted || state.enter
|
|
209
|
+
};
|
|
210
|
+
case "exit-active":
|
|
211
|
+
return {
|
|
212
|
+
enter: false,
|
|
213
|
+
enterActive: false,
|
|
214
|
+
exit: true,
|
|
215
|
+
exitActive: true,
|
|
216
|
+
interrupted: false
|
|
217
|
+
};
|
|
218
|
+
case "done":
|
|
219
|
+
default:
|
|
220
|
+
return RESTING_TRANSITION_STATE;
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// ../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/Transition/TransitionGroup.js
|
|
225
|
+
var TransitionGroupChildInner = ({ ref: forwardedRef, as: TagName, children, className, transitionId, style, preventMountTransition, shouldRender, enterDuration, exitDuration, removeChild, onEnter, onEnterActive, onEnterComplete, onExit, onExitActive, onExitComplete }) => {
|
|
226
|
+
const [state, dispatch] = (0, import_react7.useReducer)(transitionReducer, getInitialTransitionState(preventMountTransition || false));
|
|
227
|
+
const preventedMountTransition = (0, import_react7.useRef)(false);
|
|
228
|
+
const elementRef = (0, import_react7.useRef)(null);
|
|
229
|
+
const enterDurationRef = (0, import_react7.useRef)(enterDuration);
|
|
230
|
+
enterDurationRef.current = enterDuration;
|
|
231
|
+
const exitDurationRef = (0, import_react7.useRef)(exitDuration);
|
|
232
|
+
exitDurationRef.current = exitDuration;
|
|
233
|
+
const lastCallbackRef = (0, import_react7.useRef)(null);
|
|
234
|
+
const triggerCallback = (0, import_react7.useCallback)((callbackType) => {
|
|
235
|
+
const element = elementRef.current;
|
|
236
|
+
if (!element || callbackType === lastCallbackRef.current) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
lastCallbackRef.current = callbackType;
|
|
240
|
+
switch (callbackType) {
|
|
241
|
+
case "enter":
|
|
242
|
+
onEnter(element);
|
|
243
|
+
break;
|
|
244
|
+
case "enter-active":
|
|
245
|
+
onEnterActive(element);
|
|
246
|
+
break;
|
|
247
|
+
case "enter-complete":
|
|
248
|
+
onEnterComplete(element);
|
|
249
|
+
break;
|
|
250
|
+
case "exit":
|
|
251
|
+
onExit(element);
|
|
252
|
+
break;
|
|
253
|
+
case "exit-active":
|
|
254
|
+
onExitActive(element);
|
|
255
|
+
break;
|
|
256
|
+
case "exit-complete":
|
|
257
|
+
onExitComplete(element);
|
|
258
|
+
break;
|
|
259
|
+
default:
|
|
260
|
+
callbackType;
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
}, [onEnter, onEnterActive, onEnterComplete, onExit, onExitActive, onExitComplete]);
|
|
264
|
+
import_react7.default.useLayoutEffect(() => {
|
|
265
|
+
if (!shouldRender) {
|
|
266
|
+
let exitTimeout;
|
|
267
|
+
dispatch({ type: "exit-before" });
|
|
268
|
+
triggerCallback("exit");
|
|
269
|
+
const cancelAnimationFrame2 = waitForAnimationFrame(() => {
|
|
270
|
+
dispatch({ type: "exit-active" });
|
|
271
|
+
triggerCallback("exit-active");
|
|
272
|
+
exitTimeout = window.setTimeout(() => {
|
|
273
|
+
triggerCallback("exit-complete");
|
|
274
|
+
removeChild();
|
|
275
|
+
}, exitDurationRef.current);
|
|
276
|
+
});
|
|
277
|
+
return () => {
|
|
278
|
+
cancelAnimationFrame2();
|
|
279
|
+
if (exitTimeout !== void 0)
|
|
280
|
+
clearTimeout(exitTimeout);
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
if (preventMountTransition && !preventedMountTransition.current) {
|
|
284
|
+
preventedMountTransition.current = true;
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
let enterTimeout;
|
|
288
|
+
dispatch({ type: "enter-before" });
|
|
289
|
+
triggerCallback("enter");
|
|
290
|
+
const cancelAnimationFrame = waitForAnimationFrame(() => {
|
|
291
|
+
dispatch({ type: "enter-active" });
|
|
292
|
+
triggerCallback("enter-active");
|
|
293
|
+
enterTimeout = window.setTimeout(() => {
|
|
294
|
+
dispatch({ type: "done" });
|
|
295
|
+
triggerCallback("enter-complete");
|
|
296
|
+
}, enterDurationRef.current);
|
|
297
|
+
});
|
|
298
|
+
return () => {
|
|
299
|
+
cancelAnimationFrame();
|
|
300
|
+
if (enterTimeout !== void 0)
|
|
301
|
+
clearTimeout(enterTimeout);
|
|
302
|
+
};
|
|
303
|
+
}, [
|
|
304
|
+
shouldRender,
|
|
305
|
+
// This value is immutable after <TransitionGroup> is created, and does not change on re-renders.
|
|
306
|
+
preventMountTransition,
|
|
307
|
+
removeChild,
|
|
308
|
+
triggerCallback
|
|
309
|
+
]);
|
|
310
|
+
(0, import_react7.useEffect)(() => {
|
|
311
|
+
return () => {
|
|
312
|
+
preventedMountTransition.current = false;
|
|
313
|
+
};
|
|
314
|
+
}, []);
|
|
315
|
+
return (0, import_jsx_runtime5.jsx)(TagName, { ref: o([elementRef, forwardedRef]), className: clsx_default(className, s4.TransitionGroupChild), "data-transition-id": transitionId, style, "data-entering": state.enter ? "" : void 0, "data-entering-active": state.enterActive ? "" : void 0, "data-exiting": state.exit ? "" : void 0, "data-exiting-active": state.exitActive ? "" : void 0, "data-interrupted": state.interrupted ? "" : void 0, children });
|
|
316
|
+
};
|
|
317
|
+
var TransitionGroupChild = (props) => {
|
|
318
|
+
const { enterMountDelay, preventMountTransition } = props;
|
|
319
|
+
const mountDelay = !preventMountTransition && enterMountDelay != null ? enterMountDelay : null;
|
|
320
|
+
const [mounted, setMounted] = (0, import_react7.useState)(mountDelay == null);
|
|
321
|
+
useTimeout(() => setMounted(true), mounted ? null : mountDelay);
|
|
322
|
+
return mounted ? (0, import_jsx_runtime5.jsx)(TransitionGroupChildInner, { ...props }) : null;
|
|
323
|
+
};
|
|
324
|
+
var TransitionGroup = (props) => {
|
|
325
|
+
const { ref: forwardedRef, as: TagName = "span", children, className, transitionId, style, enterDuration = 0, exitDuration = 0, preventInitialTransition = true, enterMountDelay, insertMethod = "append", disableAnimations = getDisableAnimations_default() } = props;
|
|
326
|
+
const onEnter = useChildCallback(props.onEnter ?? noop);
|
|
327
|
+
const onEnterActive = useChildCallback(props.onEnterActive ?? noop);
|
|
328
|
+
const onEnterComplete = useChildCallback(props.onEnterComplete ?? noop);
|
|
329
|
+
const onExit = useChildCallback(props.onExit ?? noop);
|
|
330
|
+
const onExitActive = useChildCallback(props.onExitActive ?? noop);
|
|
331
|
+
const onExitComplete = useChildCallback(props.onExitComplete ?? noop);
|
|
332
|
+
import_react7.Children.forEach(children, (child) => {
|
|
333
|
+
if (child && !child.key) {
|
|
334
|
+
throw new Error("Child elements of <TransitionGroup /> must include a `key`");
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const createDefaultRenderChildProps = (0, import_react7.useCallback)((child) => ({
|
|
338
|
+
component: child,
|
|
339
|
+
shouldRender: true,
|
|
340
|
+
removeChild: () => {
|
|
341
|
+
setRenderChildren((currentRenderChildren) => currentRenderChildren.filter((c) => child.key !== c.component.key));
|
|
342
|
+
},
|
|
343
|
+
onEnter,
|
|
344
|
+
onEnterActive,
|
|
345
|
+
onEnterComplete,
|
|
346
|
+
onExit,
|
|
347
|
+
onExitActive,
|
|
348
|
+
onExitComplete
|
|
349
|
+
}), [onEnter, onEnterActive, onEnterComplete, onExit, onExitActive, onExitComplete]);
|
|
350
|
+
const [renderChildren, setRenderChildren] = (0, import_react7.useState)(() => {
|
|
351
|
+
return ChildrenWithKeys(children).map((child) => ({
|
|
352
|
+
...createDefaultRenderChildProps(child),
|
|
353
|
+
// Lock this value to whatever the value was on initial render of the TransitionGroup.
|
|
354
|
+
// It doesn't make sense to change this once it is mounted.
|
|
355
|
+
preventMountTransition: preventInitialTransition
|
|
356
|
+
}));
|
|
357
|
+
});
|
|
358
|
+
(0, import_react7.useLayoutEffect)(() => {
|
|
359
|
+
setRenderChildren((currentRenderChildren) => {
|
|
360
|
+
const propChildrenArray = ChildrenWithKeys(children);
|
|
361
|
+
return computeNextRenderChildren(propChildrenArray, currentRenderChildren, createDefaultRenderChildProps, insertMethod);
|
|
362
|
+
});
|
|
363
|
+
}, [children, insertMethod, createDefaultRenderChildProps]);
|
|
364
|
+
assertSingleChildWhenRef("TransitionGroup", forwardedRef, import_react7.Children.count(children));
|
|
365
|
+
if (disableAnimations) {
|
|
366
|
+
return (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: import_react7.Children.map(children, (child) => (0, import_jsx_runtime5.jsx)(
|
|
367
|
+
TagName,
|
|
368
|
+
{
|
|
369
|
+
// @ts-expect-error -- TS is not happy about this forwardedRef, but it's fine.
|
|
370
|
+
ref: forwardedRef,
|
|
371
|
+
className,
|
|
372
|
+
style,
|
|
373
|
+
"data-transition-id": transitionId,
|
|
374
|
+
children: child
|
|
375
|
+
}
|
|
376
|
+
)) });
|
|
377
|
+
}
|
|
378
|
+
return (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: renderChildren.map(({ component, ...restProps }) => (0, import_jsx_runtime5.jsx)(TransitionGroupChild, { ...restProps, as: TagName, className, transitionId, enterDuration, exitDuration, enterMountDelay, style, ref: forwardedRef, children: component }, component.key)) });
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
// ../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/Button/Button.js
|
|
382
|
+
import s5 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/Button/Button.module.css";
|
|
383
|
+
var Button = (props) => {
|
|
384
|
+
const {
|
|
385
|
+
type = "button",
|
|
386
|
+
color = "primary",
|
|
387
|
+
variant = "solid",
|
|
388
|
+
pill = true,
|
|
389
|
+
uniform = false,
|
|
390
|
+
size = "md",
|
|
391
|
+
iconSize,
|
|
392
|
+
gutterSize,
|
|
393
|
+
loading,
|
|
394
|
+
selected,
|
|
395
|
+
block,
|
|
396
|
+
opticallyAlign,
|
|
397
|
+
children,
|
|
398
|
+
className,
|
|
399
|
+
onClick,
|
|
400
|
+
disabled,
|
|
401
|
+
disabledTone,
|
|
402
|
+
// Defaults to `loading` state
|
|
403
|
+
inert = loading,
|
|
404
|
+
...restProps
|
|
405
|
+
} = props;
|
|
406
|
+
const isInert = disabled || inert;
|
|
407
|
+
const handleClick = (0, import_react8.useCallback)((e) => {
|
|
408
|
+
if (disabled) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
onClick == null ? void 0 : onClick(e);
|
|
412
|
+
}, [onClick, disabled]);
|
|
413
|
+
return (0, import_jsx_runtime6.jsxs)("button", {
|
|
414
|
+
type,
|
|
415
|
+
className: clsx_default(s5.Button, className),
|
|
416
|
+
"data-color": color,
|
|
417
|
+
"data-variant": variant,
|
|
418
|
+
"data-pill": pill ? "" : void 0,
|
|
419
|
+
"data-uniform": uniform ? "" : void 0,
|
|
420
|
+
"data-size": size,
|
|
421
|
+
"data-gutter-size": gutterSize,
|
|
422
|
+
"data-icon-size": iconSize,
|
|
423
|
+
"data-loading": loading ? "" : void 0,
|
|
424
|
+
"data-selected": selected ? "" : void 0,
|
|
425
|
+
"data-block": block ? "" : void 0,
|
|
426
|
+
"data-optically-align": opticallyAlign,
|
|
427
|
+
onPointerEnter: handlePressableMouseEnter,
|
|
428
|
+
// Non-visual, accessible disablement
|
|
429
|
+
// NOTE: Do not use literal `inert` because that is incorrect semantically
|
|
430
|
+
disabled: isInert,
|
|
431
|
+
"aria-disabled": isInert,
|
|
432
|
+
tabIndex: isInert ? -1 : void 0,
|
|
433
|
+
"data-disabled": disabled ? "" : void 0,
|
|
434
|
+
"data-disabled-tone": disabled ? disabledTone : void 0,
|
|
435
|
+
onClick: handleClick,
|
|
436
|
+
...restProps,
|
|
437
|
+
children: [(0, import_jsx_runtime6.jsx)(TransitionGroup, { className: s5.ButtonLoader, enterDuration: 250, exitDuration: 150, children: loading && (0, import_jsx_runtime6.jsx)(LoadingIndicator, {}, "loader") }), (0, import_jsx_runtime6.jsx)("span", { className: s5.ButtonInner, children: wrapTextNodeSiblings(children) })]
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
var ButtonLink = (props) => {
|
|
441
|
+
const { color = "primary", variant = "solid", pill = true, size = "md", gutterSize, iconSize, external, block, opticallyAlign, children, className, disabled, disabledTone, onClick, onPointerEnter, as: OverrideComponent, href, to, ...restProps } = props;
|
|
442
|
+
const isExternal = external ?? /^https?:\/\//.test(href ?? to ?? "");
|
|
443
|
+
const DefaultComponent = useLinkComponent();
|
|
444
|
+
const LinkComponent = OverrideComponent || (isExternal ? "a" : DefaultComponent);
|
|
445
|
+
const sharedProps = {
|
|
446
|
+
"className": clsx_default(s5.Button, className),
|
|
447
|
+
disabled,
|
|
448
|
+
"aria-disabled": disabled,
|
|
449
|
+
"tabIndex": disabled ? -1 : void 0,
|
|
450
|
+
// Visual disablement (inert not supported in links, always applied)
|
|
451
|
+
"data-disabled": disabled ? "" : void 0,
|
|
452
|
+
"data-disabled-tone": disabled ? disabledTone : void 0,
|
|
453
|
+
"data-color": color,
|
|
454
|
+
"data-variant": variant,
|
|
455
|
+
"data-pill": pill ? "" : void 0,
|
|
456
|
+
"data-block": block ? "" : void 0,
|
|
457
|
+
"data-optically-align": opticallyAlign,
|
|
458
|
+
"data-size": size,
|
|
459
|
+
"data-gutter-size": gutterSize,
|
|
460
|
+
"data-icon-size": iconSize,
|
|
461
|
+
"onClick": disabled ? void 0 : onClick,
|
|
462
|
+
"onPointerEnter": (evt) => {
|
|
463
|
+
handlePressableMouseEnter(evt);
|
|
464
|
+
onPointerEnter == null ? void 0 : onPointerEnter(evt);
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
if (disabled) {
|
|
468
|
+
const eventProps = Object.fromEntries(Object.entries(restProps).filter(([key, value]) => key.startsWith("on") && typeof value === "function"));
|
|
469
|
+
return (0, import_jsx_runtime6.jsx)("span", { role: "link", ...sharedProps, ...eventProps, children: (0, import_jsx_runtime6.jsx)("span", { className: s5.ButtonInner, children: wrapTextNodeSiblings(children) }) });
|
|
470
|
+
}
|
|
471
|
+
const linkProps = {
|
|
472
|
+
...isExternal ? { target: "_blank", rel: "noopener noreferrer", href: href ?? to } : { href, to },
|
|
473
|
+
...sharedProps,
|
|
474
|
+
...restProps
|
|
475
|
+
};
|
|
476
|
+
return (0, import_jsx_runtime6.jsx)(LinkComponent, { ...linkProps, children: (0, import_jsx_runtime6.jsx)("span", { className: s5.ButtonInner, children: wrapTextNodeSiblings(children) }) });
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
// ../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/Button/CopyButton.js
|
|
480
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime());
|
|
481
|
+
var import_react13 = __toESM(require_react());
|
|
482
|
+
|
|
483
|
+
// ../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/lib/copyToClipboard.js
|
|
484
|
+
var supportsRichClipboard = () => {
|
|
485
|
+
var _a;
|
|
486
|
+
return typeof ClipboardItem !== "undefined" && !!((_a = navigator.clipboard) == null ? void 0 : _a.write);
|
|
487
|
+
};
|
|
488
|
+
function toClipboardItem(content) {
|
|
489
|
+
const { "text/plain": text, ...rest } = content;
|
|
490
|
+
return new ClipboardItem({
|
|
491
|
+
...rest,
|
|
492
|
+
...text ? { "text/plain": new Blob([text], { type: "text/plain" }) } : null
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
async function copyToClipboard(content, container = document.body) {
|
|
496
|
+
if (typeof content === "string") {
|
|
497
|
+
return copyText(content, container);
|
|
498
|
+
}
|
|
499
|
+
try {
|
|
500
|
+
if (supportsRichClipboard()) {
|
|
501
|
+
await navigator.clipboard.write([toClipboardItem(content)]);
|
|
502
|
+
return true;
|
|
503
|
+
}
|
|
504
|
+
if (content["text/plain"]) {
|
|
505
|
+
return copyText(content["text/plain"], container);
|
|
506
|
+
}
|
|
507
|
+
return false;
|
|
508
|
+
} catch (error) {
|
|
509
|
+
return false;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
async function copyText(text, container = document.body) {
|
|
513
|
+
if (navigator.clipboard) {
|
|
514
|
+
try {
|
|
515
|
+
await navigator.clipboard.writeText(text);
|
|
516
|
+
return true;
|
|
517
|
+
} catch (error) {
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
const textArea = document.createElement("textarea");
|
|
521
|
+
textArea.value = text;
|
|
522
|
+
textArea.style.position = "fixed";
|
|
523
|
+
textArea.style.top = "0";
|
|
524
|
+
textArea.style.left = "0";
|
|
525
|
+
textArea.style.opacity = "0";
|
|
526
|
+
container.appendChild(textArea);
|
|
527
|
+
textArea.focus();
|
|
528
|
+
textArea.select();
|
|
529
|
+
let succeeded = false;
|
|
530
|
+
try {
|
|
531
|
+
succeeded = document.execCommand("copy");
|
|
532
|
+
} catch (error) {
|
|
533
|
+
}
|
|
534
|
+
container.removeChild(textArea);
|
|
535
|
+
return succeeded;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// ../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/Transition/Animate.js
|
|
539
|
+
var import_jsx_runtime7 = __toESM(require_jsx_runtime());
|
|
540
|
+
var import_react9 = __toESM(require_react());
|
|
541
|
+
import s6 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/Transition/Animate.module.css";
|
|
542
|
+
var Animate = (props) => {
|
|
543
|
+
const { as: TagName = "span", className, children, preventInitialTransition, insertMethod, transitionClassName, transitionPosition = "absolute" } = props;
|
|
544
|
+
const { enterTotalDuration, exitTotalDuration, variables } = getAnimationProperties(props);
|
|
545
|
+
return (0, import_jsx_runtime7.jsx)(TagName, { className: clsx_default("block", transitionPosition === "absolute" && "relative", className), "data-transition-position": transitionPosition, style: variables, children: (0, import_jsx_runtime7.jsx)(TransitionGroup, { as: TagName, className: clsx_default(s6.TransitionItem, transitionClassName), enterDuration: enterTotalDuration, exitDuration: exitTotalDuration, insertMethod, preventInitialTransition, children }) });
|
|
546
|
+
};
|
|
547
|
+
var DEFAULT_ENTER_DURATION_MS_EASE = 400;
|
|
548
|
+
var DEFAULT_ENTER_DURATION_MS_CUBIC = 500;
|
|
549
|
+
var DEFAULT_EXIT_DURATION_MS_EASE = 200;
|
|
550
|
+
var DEFAULT_EXIT_DURATION_MS_CUBIC = 300;
|
|
551
|
+
function getAnimationProperties({ initial, enter, exit, forceCompositeLayer }) {
|
|
552
|
+
const initialTransform = toTransformProperty(initial);
|
|
553
|
+
const enterTransform = toTransformProperty(enter);
|
|
554
|
+
const exitTransform = toTransformProperty(exit);
|
|
555
|
+
const isCubicTransition = [initialTransform, exitTransform, enterTransform].some((t) => t !== "none");
|
|
556
|
+
const enterDuration = (enter == null ? void 0 : enter.duration) ?? (isCubicTransition ? DEFAULT_ENTER_DURATION_MS_CUBIC : DEFAULT_ENTER_DURATION_MS_EASE);
|
|
557
|
+
const enterTimingFunction = (enter == null ? void 0 : enter.timingFunction) ?? (isCubicTransition ? "var(--cubic-enter)" : "ease");
|
|
558
|
+
const exitDuration = (exit == null ? void 0 : exit.duration) ?? (isCubicTransition ? DEFAULT_EXIT_DURATION_MS_CUBIC : DEFAULT_EXIT_DURATION_MS_EASE);
|
|
559
|
+
const exitTimingFunction = (exit == null ? void 0 : exit.timingFunction) ?? (isCubicTransition ? "var(--cubic-exit)" : "ease");
|
|
560
|
+
const variables = toCssVariables({
|
|
561
|
+
"tg-will-change": forceCompositeLayer ? "transform, opacity" : "auto",
|
|
562
|
+
"tg-enter-opacity": toOpacityProperty((enter == null ? void 0 : enter.opacity) ?? 1),
|
|
563
|
+
"tg-enter-transform": enterTransform,
|
|
564
|
+
"tg-enter-filter": toFilterProperty(enter),
|
|
565
|
+
"tg-enter-duration": toMsDurationProperty(enterDuration),
|
|
566
|
+
"tg-enter-delay": toMsDurationProperty((enter == null ? void 0 : enter.delay) ?? 0),
|
|
567
|
+
"tg-enter-timing-function": enterTimingFunction,
|
|
568
|
+
"tg-exit-opacity": toOpacityProperty((exit == null ? void 0 : exit.opacity) ?? 0),
|
|
569
|
+
"tg-exit-transform": exitTransform,
|
|
570
|
+
"tg-exit-filter": toFilterProperty(exit),
|
|
571
|
+
"tg-exit-duration": toMsDurationProperty(exitDuration),
|
|
572
|
+
"tg-exit-delay": toMsDurationProperty((exit == null ? void 0 : exit.delay) ?? 0),
|
|
573
|
+
"tg-exit-timing-function": exitTimingFunction,
|
|
574
|
+
"tg-initial-opacity": toOpacityProperty((initial == null ? void 0 : initial.opacity) ?? (exit == null ? void 0 : exit.opacity) ?? 0),
|
|
575
|
+
"tg-initial-transform": initialTransform === "none" ? exitTransform : initialTransform,
|
|
576
|
+
"tg-initial-filter": toFilterProperty(initial ?? exit ?? {})
|
|
577
|
+
});
|
|
578
|
+
const enterTotalDuration = ((enter == null ? void 0 : enter.delay) ?? 0) + enterDuration;
|
|
579
|
+
const exitTotalDuration = ((exit == null ? void 0 : exit.delay) ?? 0) + exitDuration;
|
|
580
|
+
return { enterTotalDuration, exitTotalDuration, variables };
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
// ../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/Transition/AnimateLayout.js
|
|
584
|
+
var import_jsx_runtime8 = __toESM(require_jsx_runtime());
|
|
585
|
+
var import_react10 = __toESM(require_react());
|
|
586
|
+
import s7 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/Transition/AnimateLayout.module.css";
|
|
587
|
+
|
|
588
|
+
// ../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/Transition/AnimateLayoutGroup.js
|
|
589
|
+
var import_jsx_runtime9 = __toESM(require_jsx_runtime());
|
|
590
|
+
var import_react11 = __toESM(require_react());
|
|
591
|
+
import s8 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/Transition/AnimateLayoutGroup.module.css";
|
|
592
|
+
|
|
593
|
+
// ../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/Transition/SlotTransitionGroup.js
|
|
594
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime());
|
|
595
|
+
var import_react12 = __toESM(require_react());
|
|
596
|
+
|
|
597
|
+
// ../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/Button/CopyButton.js
|
|
598
|
+
var CopyButton = ({ children, copyValue, onClick, ...restProps }) => {
|
|
599
|
+
const [copied, setCopied] = (0, import_react13.useState)(false);
|
|
600
|
+
const copiedTimeout = (0, import_react13.useRef)(null);
|
|
601
|
+
const handleClick = (evt) => {
|
|
602
|
+
if (copied) {
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
setCopied(true);
|
|
606
|
+
onClick == null ? void 0 : onClick(evt);
|
|
607
|
+
copyToClipboard(typeof copyValue === "function" ? copyValue() : copyValue);
|
|
608
|
+
copiedTimeout.current = window.setTimeout(() => {
|
|
609
|
+
setCopied(false);
|
|
610
|
+
}, 1300);
|
|
611
|
+
};
|
|
612
|
+
(0, import_react13.useEffect)(() => {
|
|
613
|
+
return () => {
|
|
614
|
+
if (copiedTimeout.current)
|
|
615
|
+
clearTimeout(copiedTimeout.current);
|
|
616
|
+
};
|
|
617
|
+
}, []);
|
|
618
|
+
return (0, import_jsx_runtime11.jsxs)(Button, { ...restProps, onClick: handleClick, children: [(0, import_jsx_runtime11.jsx)(Animate, { className: "w-[var(--button-icon-size)] h-[var(--button-icon-size)]", initial: { scale: 0.6 }, enter: { scale: 1, delay: 150, duration: 300 }, exit: { scale: 0.6, duration: 150 }, forceCompositeLayer: true, children: copied ? (0, import_jsx_runtime11.jsx)(Check_default, {}, "copied-icon") : (0, import_jsx_runtime11.jsx)(Copy_default, {}, "copy-icon") }), typeof children === "function" ? children({ copied }) : children] });
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
export {
|
|
622
|
+
LoadingIndicator,
|
|
623
|
+
TransitionGroup,
|
|
624
|
+
Button,
|
|
625
|
+
ButtonLink,
|
|
626
|
+
CopyButton
|
|
627
|
+
};
|
|
628
|
+
//# sourceMappingURL=chunk-EVJ3DVH5.js.map
|