sunpeak 0.7.10 → 0.8.1
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/README.md +9 -11
- package/bin/commands/deploy.mjs +18 -9
- package/bin/commands/login.mjs +73 -55
- package/bin/commands/logout.mjs +26 -12
- package/bin/commands/pull.mjs +60 -39
- package/bin/commands/push.mjs +73 -49
- package/bin/commands/upgrade.mjs +203 -0
- package/bin/sunpeak.js +62 -31
- package/dist/chatgpt/chatgpt-simulator.d.ts +2 -1
- package/dist/index.cjs +15 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -12
- package/dist/index.js.map +1 -1
- package/dist/mcp/entry.cjs +41 -9
- package/dist/mcp/entry.cjs.map +1 -1
- package/dist/mcp/entry.js +42 -10
- package/dist/mcp/entry.js.map +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/server-B9YgCQdS.cjs +5067 -0
- package/dist/server-B9YgCQdS.cjs.map +1 -0
- package/dist/server-DVmTC-SF.js +5068 -0
- package/dist/server-DVmTC-SF.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/simulation.d.ts +1 -1
- package/package.json +17 -17
- package/template/.sunpeak/dev.tsx +78 -15
- package/template/.sunpeak/vite-env.d.ts +1 -0
- package/template/README.md +6 -6
- package/template/dist/albums.js +4 -4
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.js +8 -8
- package/template/dist/carousel.json +1 -1
- package/template/dist/counter.js +4 -4
- package/template/dist/counter.json +1 -1
- package/template/dist/map.js +4 -4
- package/template/dist/map.json +1 -1
- package/template/node_modules/.bin/tsx +2 -2
- package/template/node_modules/.bin/vite +2 -2
- package/template/node_modules/.bin/vitest +2 -2
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Avatar.js +7 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Avatar.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +6 -6
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js +6 -6
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Checkbox.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Icon.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Input.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +9 -9
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +33 -33
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +7 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js.map +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js +2 -2
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_theme.js.map +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +60 -60
- package/template/node_modules/.vite/deps/{chunk-CQ3GYAYB.js → chunk-2DZGWGIP.js} +5 -5
- package/template/node_modules/.vite/deps/{chunk-CQ3GYAYB.js.map → chunk-2DZGWGIP.js.map} +1 -1
- package/template/node_modules/.vite/deps/{chunk-4TLBUCVB.js → chunk-BUOVMFCD.js} +6 -6
- package/template/node_modules/.vite/deps/{chunk-4TLBUCVB.js.map → chunk-BUOVMFCD.js.map} +2 -2
- package/template/node_modules/.vite/deps/{chunk-BAG6OO6S.js → chunk-DYQDWJMS.js} +5 -5
- package/template/node_modules/.vite/deps/{chunk-BAG6OO6S.js.map → chunk-DYQDWJMS.js.map} +1 -1
- package/template/node_modules/.vite/deps/{chunk-YOJ6QPGS.js → chunk-JAGHY6H6.js} +3 -3
- package/template/node_modules/.vite/deps/{chunk-YOJ6QPGS.js.map → chunk-JAGHY6H6.js.map} +1 -1
- package/template/node_modules/.vite/deps/{chunk-PTVT3RFX.js → chunk-JGVISENQ.js} +6 -6
- package/template/node_modules/.vite/deps/{chunk-PTVT3RFX.js.map → chunk-JGVISENQ.js.map} +1 -1
- package/template/node_modules/.vite/deps/{chunk-LR7NKCX5.js → chunk-SPYXUHEY.js} +44 -44
- package/template/node_modules/.vite/deps/{chunk-LR7NKCX5.js.map → chunk-SPYXUHEY.js.map} +1 -1
- package/template/node_modules/.vite/deps/{chunk-SGWD4VEU.js → chunk-TSEQUROC.js} +113 -107
- package/template/node_modules/.vite/deps/chunk-TSEQUROC.js.map +7 -0
- package/template/node_modules/.vite/deps/{chunk-XB525PXG.js → chunk-UM3ZGDFR.js} +747 -747
- package/template/node_modules/.vite/deps/{chunk-XB525PXG.js.map → chunk-UM3ZGDFR.js.map} +1 -1
- package/template/node_modules/.vite/deps/{chunk-KFGKZMLK.js → chunk-XZTIOEPG.js} +7 -7
- package/template/node_modules/.vite/deps/{chunk-KFGKZMLK.js.map → chunk-XZTIOEPG.js.map} +2 -2
- package/template/node_modules/.vite/deps/embla-carousel-react.js +3 -3
- package/template/node_modules/.vite/deps/embla-carousel-react.js.map +1 -1
- package/template/node_modules/.vite/deps/react-dom.js +2 -2
- package/template/node_modules/.vite/deps/react-dom_client.js +11 -11
- package/template/node_modules/.vite/deps/react-dom_client.js.map +2 -2
- package/template/node_modules/.vite/deps/react.js +1 -1
- package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js +5 -5
- package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +1 -1
- package/template/node_modules/.vite/deps/react_jsx-runtime.js +2 -2
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/package.json +11 -11
- package/template/src/components/map/map-view.test.tsx +1 -1
- package/template/src/components/map/map-view.tsx +1 -1
- package/template/src/components/map/map.tsx +1 -1
- package/template/src/components/map/place-card.test.tsx +1 -1
- package/template/src/components/map/place-card.tsx +1 -1
- package/template/src/components/map/place-carousel.test.tsx +1 -1
- package/template/src/components/map/place-carousel.tsx +1 -1
- package/template/src/components/map/place-inspector.test.tsx +1 -1
- package/template/src/components/map/place-inspector.tsx +1 -1
- package/template/src/components/map/place-list.test.tsx +1 -1
- package/template/src/components/map/place-list.tsx +1 -1
- package/template/src/components/map/types.ts +18 -0
- package/template/src/resources/index.ts +39 -4
- package/template/src/simulations/albums-show-simulation.json +131 -0
- package/template/src/simulations/carousel-show-simulation.json +68 -0
- package/template/src/simulations/counter-show-simulation.json +20 -0
- package/template/src/simulations/index.ts +17 -12
- package/template/src/simulations/map-show-simulation.json +123 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/tsconfig.json +1 -1
- package/dist/server-BOYwNazb.cjs +0 -930
- package/dist/server-BOYwNazb.cjs.map +0 -1
- package/dist/server-C6vMGV6H.js +0 -931
- package/dist/server-C6vMGV6H.js.map +0 -1
- package/template/node_modules/.vite/deps/chunk-SGWD4VEU.js.map +0 -7
- package/template/src/simulations/albums-simulation.ts +0 -147
- package/template/src/simulations/carousel-simulation.ts +0 -84
- package/template/src/simulations/counter-simulation.ts +0 -34
- package/template/src/simulations/map-simulation.ts +0 -154
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BUOVMFCD.js";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS
|
|
6
6
|
} from "./chunk-ILHRZGIS.js";
|
|
7
7
|
|
|
8
|
-
// ../node_modules/.pnpm/react@19.2.
|
|
8
|
+
// ../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
9
9
|
var require_react_jsx_dev_runtime_development = __commonJS({
|
|
10
|
-
"../node_modules/.pnpm/react@19.2.
|
|
10
|
+
"../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-dev-runtime.development.js"(exports) {
|
|
11
11
|
"use strict";
|
|
12
12
|
(function() {
|
|
13
13
|
function getComponentNameFromType(type) {
|
|
@@ -251,9 +251,9 @@ var require_react_jsx_dev_runtime_development = __commonJS({
|
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
253
|
|
|
254
|
-
// ../node_modules/.pnpm/react@19.2.
|
|
254
|
+
// ../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js
|
|
255
255
|
var require_jsx_dev_runtime = __commonJS({
|
|
256
|
-
"../node_modules/.pnpm/react@19.2.
|
|
256
|
+
"../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js"(exports, module) {
|
|
257
257
|
if (false) {
|
|
258
258
|
module.exports = null;
|
|
259
259
|
} else {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../node_modules/.pnpm/react@19.2.
|
|
3
|
+
"sources": ["../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-dev-runtime.development.js", "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-dev-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,yBAAyB,MAAM;AACtC,YAAI,QAAQ,KAAM,QAAO;AACzB,YAAI,eAAe,OAAO;AACxB,iBAAO,KAAK,aAAa,yBACrB,OACA,KAAK,eAAe,KAAK,QAAQ;AACvC,YAAI,aAAa,OAAO,KAAM,QAAO;AACrC,gBAAQ,MAAM;AAAA,UACZ,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,QACX;AACA,YAAI,aAAa,OAAO;AACtB,kBACG,aAAa,OAAO,KAAK,OACxB,QAAQ;AAAA,YACN;AAAA,UACF,GACF,KAAK,UACL;AAAA,YACA,KAAK;AACH,qBAAO;AAAA,YACT,KAAK;AACH,qBAAO,KAAK,eAAe;AAAA,YAC7B,KAAK;AACH,sBAAQ,K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AkB,OAAO,IAAI,YAAY,GACzC,kBAAkB,OAAO,IAAI,YAAY,GACzC,sBAAsB,OAAO,IAAI,gBAAgB,GACjD,yBAAyB,OAAO,IAAI,wBAAwB,GAC5D,uBACE,MAAM,iEACR,iBAAiB,OAAO,UAAU,gBAClC,cAAc,MAAM,SACpB,aAAa,QAAQ,aACjB,QAAQ,aACR,WAAY;AACV,eAAO;AAAA,MACT;AACN,cAAQ;AAAA,QACN,0BAA0B,SAAU,mBAAmB;AACrD,iBAAO,kBAAkB;AAAA,QAC3B;AAAA,MACF;AACA,UAAI;AACJ,UAAI,yBAAyB,CAAC;AAC9B,UAAI,yBAAyB,MAAM,yBAAyB;AAAA,QAC1D;AAAA,QACA;AAAA,MACF,EAAE;AACF,UAAI,wBAAwB,WAAW,YAAY,YAAY,CAAC;AAChE,UAAI,wBAAwB,CAAC;AAC7B,cAAQ,WAAW;AACnB,cAAQ,SAAS,SAAU,MAAM,QAAQ,UAAU,kBAAkB;AACnE,YAAI,mBACF,MAAM,qBAAqB;AAC7B,eAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,mBACI,MAAM,uBAAuB,IAC7B;AAAA,UACJ,mBAAmB,WAAW,YAAY,IAAI,CAAC,IAAI;AAAA,QACrD;AAAA,MACF;AAAA,IACF,GAAG;AAAA;AAAA;;;ACjVL;AAAA;AAEA,QAAI,OAAuC;AACzC,aAAO,UAAU;AAAA,IACnB,OAAO;AACL,aAAO,UAAU;AAAA,IACnB;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_jsx_runtime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-JGVISENQ.js";
|
|
4
|
+
import "./chunk-BUOVMFCD.js";
|
|
5
5
|
import "./chunk-ILHRZGIS.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.
|
|
1
|
+
{"version":"4.0.16","results":[[":src/components/album/albums.test.tsx",{"duration":369.608344,"failed":false}],[":src/resources/counter-resource.test.tsx",{"duration":298.88052300000027,"failed":false}],[":src/resources/carousel-resource.test.tsx",{"duration":229.87382100000013,"failed":false}],[":src/components/map/map-view.test.tsx",{"duration":74.3784169999999,"failed":false}],[":src/components/map/place-inspector.test.tsx",{"duration":396.6914099999999,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":235.851359,"failed":false}],[":src/components/map/place-list.test.tsx",{"duration":129.307685,"failed":false}],[":src/components/map/place-card.test.tsx",{"duration":346.68555300000025,"failed":false}],[":src/components/map/place-carousel.test.tsx",{"duration":392.8754509999999,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":79.79719499999987,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":75.20614599999999,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":235.289847,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":426.67748099999994,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":337.8234279999999,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":65.62471800000003,"failed":false}]]}
|
package/template/package.json
CHANGED
|
@@ -10,31 +10,31 @@
|
|
|
10
10
|
"test": "vitest run"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@openai/apps-sdk-ui": "^0.2.
|
|
13
|
+
"@openai/apps-sdk-ui": "^0.2.1",
|
|
14
14
|
"clsx": "^2.1.1",
|
|
15
15
|
"embla-carousel-react": "^8.6.0",
|
|
16
16
|
"embla-carousel-wheel-gestures": "^8.1.0",
|
|
17
|
-
"mapbox-gl": "^3.
|
|
17
|
+
"mapbox-gl": "^3.17.0",
|
|
18
18
|
"sunpeak": "workspace:*",
|
|
19
19
|
"tailwind-merge": "^3.4.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@tailwindcss/vite": "^4.1.
|
|
22
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
23
23
|
"@testing-library/jest-dom": "^6.9.1",
|
|
24
|
-
"@testing-library/react": "^16.3.
|
|
24
|
+
"@testing-library/react": "^16.3.1",
|
|
25
25
|
"@testing-library/user-event": "^14.6.1",
|
|
26
|
-
"@types/node": "^
|
|
26
|
+
"@types/node": "^22.15.3",
|
|
27
27
|
"@types/react": "^19.0.0",
|
|
28
28
|
"@types/react-dom": "^19.0.0",
|
|
29
|
-
"@vitejs/plugin-react": "^4.
|
|
30
|
-
"jsdom": "^27.
|
|
29
|
+
"@vitejs/plugin-react": "^4.5.2",
|
|
30
|
+
"jsdom": "^27.3.0",
|
|
31
31
|
"nodemon": "^3.1.11",
|
|
32
|
-
"postcss": "^8.
|
|
32
|
+
"postcss": "^8.5.6",
|
|
33
33
|
"react": "^19.0.0",
|
|
34
34
|
"react-dom": "^19.0.0",
|
|
35
|
-
"tailwindcss": "^4.1.
|
|
36
|
-
"tsx": "^4.
|
|
37
|
-
"typescript": "^5.
|
|
35
|
+
"tailwindcss": "^4.1.18",
|
|
36
|
+
"tsx": "^4.21.0",
|
|
37
|
+
"typescript": "^5.9.3",
|
|
38
38
|
"vite": "^5.4.21",
|
|
39
39
|
"vitest": "^4.0.12"
|
|
40
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render } from '@testing-library/react';
|
|
2
2
|
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
3
3
|
import { MapView } from './map-view';
|
|
4
|
-
import type { Place } from '
|
|
4
|
+
import type { Place } from './types';
|
|
5
5
|
|
|
6
6
|
// Mock mapbox-gl
|
|
7
7
|
vi.mock('mapbox-gl', () => ({
|
|
@@ -3,7 +3,7 @@ import mapboxgl from 'mapbox-gl';
|
|
|
3
3
|
import 'mapbox-gl/dist/mapbox-gl.css';
|
|
4
4
|
import { useMaxHeight } from 'sunpeak';
|
|
5
5
|
import { cn } from '../../lib/index';
|
|
6
|
-
import type { Place } from '
|
|
6
|
+
import type { Place } from './types';
|
|
7
7
|
|
|
8
8
|
// Public Mapbox token for demo purposes
|
|
9
9
|
mapboxgl.accessToken =
|
|
@@ -13,7 +13,7 @@ import { PlaceList } from './place-list';
|
|
|
13
13
|
import { PlaceCarousel } from './place-carousel';
|
|
14
14
|
import { PlaceInspector } from './place-inspector';
|
|
15
15
|
import { MapView } from './map-view';
|
|
16
|
-
import type { Place, MapData } from '
|
|
16
|
+
import type { Place, MapData } from './types';
|
|
17
17
|
|
|
18
18
|
export interface MapState extends Record<string, unknown> {
|
|
19
19
|
selectedPlaceId?: string | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
2
2
|
import { describe, it, expect, vi } from 'vitest';
|
|
3
3
|
import { PlaceCard } from './place-card';
|
|
4
|
-
import type { Place } from '
|
|
4
|
+
import type { Place } from './types';
|
|
5
5
|
|
|
6
6
|
describe('PlaceCard', () => {
|
|
7
7
|
const mockPlace: Place = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Star } from '@openai/apps-sdk-ui/components/Icon';
|
|
3
3
|
import { cn } from '../../lib/index';
|
|
4
|
-
import type { Place } from '
|
|
4
|
+
import type { Place } from './types';
|
|
5
5
|
|
|
6
6
|
export type PlaceCardProps = {
|
|
7
7
|
place: Place;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
2
2
|
import { describe, it, expect, vi } from 'vitest';
|
|
3
3
|
import { PlaceCarousel } from './place-carousel';
|
|
4
|
-
import type { Place } from '
|
|
4
|
+
import type { Place } from './types';
|
|
5
5
|
|
|
6
6
|
describe('PlaceCarousel', () => {
|
|
7
7
|
const mockPlaces: Place[] = [
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
3
3
|
import { cn } from '../../lib/index';
|
|
4
4
|
import { PlaceCard } from './place-card';
|
|
5
|
-
import type { Place } from '
|
|
5
|
+
import type { Place } from './types';
|
|
6
6
|
|
|
7
7
|
export type PlaceCarouselProps = {
|
|
8
8
|
places: Place[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
2
2
|
import { describe, it, expect, vi } from 'vitest';
|
|
3
3
|
import { PlaceInspector } from './place-inspector';
|
|
4
|
-
import type { Place } from '
|
|
4
|
+
import type { Place } from './types';
|
|
5
5
|
|
|
6
6
|
describe('PlaceInspector', () => {
|
|
7
7
|
const mockPlace: Place = {
|
|
@@ -3,7 +3,7 @@ import { Button } from '@openai/apps-sdk-ui/components/Button';
|
|
|
3
3
|
import { Avatar } from '@openai/apps-sdk-ui/components/Avatar';
|
|
4
4
|
import { X, Star } from '@openai/apps-sdk-ui/components/Icon';
|
|
5
5
|
import { cn } from '../../lib/index';
|
|
6
|
-
import type { Place } from '
|
|
6
|
+
import type { Place } from './types';
|
|
7
7
|
|
|
8
8
|
export type PlaceInspectorProps = {
|
|
9
9
|
place: Place;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
2
2
|
import { describe, it, expect, vi } from 'vitest';
|
|
3
3
|
import { PlaceList } from './place-list';
|
|
4
|
-
import type { Place } from '
|
|
4
|
+
import type { Place } from './types';
|
|
5
5
|
|
|
6
6
|
describe('PlaceList', () => {
|
|
7
7
|
const mockPlaces: Place[] = [
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Settings } from '@openai/apps-sdk-ui/components/Icon';
|
|
3
3
|
import { cn } from '../../lib/index';
|
|
4
4
|
import { PlaceCard } from './place-card';
|
|
5
|
-
import type { Place } from '
|
|
5
|
+
import type { Place } from './types';
|
|
6
6
|
|
|
7
7
|
export type PlaceListProps = {
|
|
8
8
|
places: Place[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for map components
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface Place {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
coords: [number, number];
|
|
9
|
+
description: string;
|
|
10
|
+
city: string;
|
|
11
|
+
rating: number;
|
|
12
|
+
price: string;
|
|
13
|
+
thumbnail: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface MapData extends Record<string, unknown> {
|
|
17
|
+
places: Place[];
|
|
18
|
+
}
|
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Auto-discovers and re-exports all resource components.
|
|
3
|
+
*
|
|
4
|
+
* Discovers all *-resource.tsx files and exports their component
|
|
5
|
+
* with a PascalCase name (e.g., counter-resource.tsx -> CounterResource).
|
|
6
|
+
*
|
|
7
|
+
* Supports both export styles:
|
|
8
|
+
* - Default export: export default MyComponent
|
|
9
|
+
* - Named export: export const CounterResource = ...
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// Auto-discover all resource component files
|
|
13
|
+
const resourceModules = import.meta.glob('./*-resource.tsx', { eager: true });
|
|
14
|
+
|
|
15
|
+
// Build exports object from discovered files
|
|
16
|
+
const resources: Record<string, React.ComponentType> = {};
|
|
17
|
+
|
|
18
|
+
for (const [path, module] of Object.entries(resourceModules)) {
|
|
19
|
+
// Extract key from path: './counter-resource.tsx' -> 'counter'
|
|
20
|
+
const match = path.match(/\.\/(.+)-resource\.tsx$/);
|
|
21
|
+
const key = match?.[1];
|
|
22
|
+
if (!key) continue;
|
|
23
|
+
|
|
24
|
+
// Convert to PascalCase and append 'Resource': 'counter' -> 'CounterResource'
|
|
25
|
+
const pascalKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
26
|
+
const exportName = `${pascalKey}Resource`;
|
|
27
|
+
|
|
28
|
+
const mod = module as Record<string, unknown>;
|
|
29
|
+
|
|
30
|
+
// Try default export first, then named export matching the expected name
|
|
31
|
+
const component = mod.default ?? mod[exportName];
|
|
32
|
+
|
|
33
|
+
// Accept functions (regular components) or objects (forwardRef/memo components)
|
|
34
|
+
if (component && (typeof component === 'function' || typeof component === 'object')) {
|
|
35
|
+
resources[exportName] = component as React.ComponentType;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default resources;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"userMessage": "Pizza time",
|
|
3
|
+
"tool": {
|
|
4
|
+
"name": "show-albums",
|
|
5
|
+
"description": "Show photo albums",
|
|
6
|
+
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
|
|
7
|
+
"title": "Show Albums",
|
|
8
|
+
"annotations": { "readOnlyHint": true },
|
|
9
|
+
"_meta": {
|
|
10
|
+
"openai/toolInvocation/invoking": "Loading albums",
|
|
11
|
+
"openai/toolInvocation/invoked": "Album loaded",
|
|
12
|
+
"openai/widgetAccessible": true,
|
|
13
|
+
"openai/resultCanProduceWidget": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"toolCall": {
|
|
17
|
+
"structuredContent": {
|
|
18
|
+
"albums": [
|
|
19
|
+
{
|
|
20
|
+
"id": "summer-escape",
|
|
21
|
+
"title": "Summer Slice",
|
|
22
|
+
"cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png",
|
|
23
|
+
"photos": [
|
|
24
|
+
{
|
|
25
|
+
"id": "s1",
|
|
26
|
+
"title": "Waves",
|
|
27
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "s2",
|
|
31
|
+
"title": "Palm trees",
|
|
32
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "s3",
|
|
36
|
+
"title": "Sunset",
|
|
37
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "city-lights",
|
|
43
|
+
"title": "Pepperoni Nights",
|
|
44
|
+
"cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-4.png",
|
|
45
|
+
"photos": [
|
|
46
|
+
{
|
|
47
|
+
"id": "c1",
|
|
48
|
+
"title": "Downtown",
|
|
49
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-5.png"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "c2",
|
|
53
|
+
"title": "Neon",
|
|
54
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "c3",
|
|
58
|
+
"title": "Streets",
|
|
59
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "into-the-woods",
|
|
65
|
+
"title": "Truffle Forest",
|
|
66
|
+
"cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png",
|
|
67
|
+
"photos": [
|
|
68
|
+
{
|
|
69
|
+
"id": "n1",
|
|
70
|
+
"title": "Forest path",
|
|
71
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "n2",
|
|
75
|
+
"title": "Misty",
|
|
76
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-4.png"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "n3",
|
|
80
|
+
"title": "Waterfall",
|
|
81
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-5.png"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "pizza-tour",
|
|
87
|
+
"title": "Pizza tour",
|
|
88
|
+
"cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png",
|
|
89
|
+
"photos": [
|
|
90
|
+
{
|
|
91
|
+
"id": "tonys-pizza-napoletana",
|
|
92
|
+
"title": "Tony's Pizza Napoletana",
|
|
93
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "golden-boy-pizza",
|
|
97
|
+
"title": "Golden Boy Pizza",
|
|
98
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "pizzeria-delfina-mission",
|
|
102
|
+
"title": "Pizzeria Delfina (Mission)",
|
|
103
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "ragazza",
|
|
107
|
+
"title": "Ragazza",
|
|
108
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-4.png"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "del-popolo",
|
|
112
|
+
"title": "Del Popolo",
|
|
113
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-5.png"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "square-pie-guys",
|
|
117
|
+
"title": "Square Pie Guys",
|
|
118
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "zero-zero",
|
|
122
|
+
"title": "Zero Zero",
|
|
123
|
+
"url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"_meta": {}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"userMessage": "Show me popular places to visit in Austin Texas",
|
|
3
|
+
"tool": {
|
|
4
|
+
"name": "show-carousel",
|
|
5
|
+
"description": "Show popular places to visit",
|
|
6
|
+
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
|
|
7
|
+
"title": "Show Carousel",
|
|
8
|
+
"annotations": { "readOnlyHint": true },
|
|
9
|
+
"_meta": {
|
|
10
|
+
"openai/toolInvocation/invoking": "Loading carousel",
|
|
11
|
+
"openai/toolInvocation/invoked": "Carousel loaded",
|
|
12
|
+
"openai/widgetAccessible": true,
|
|
13
|
+
"openai/resultCanProduceWidget": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"toolCall": {
|
|
17
|
+
"structuredContent": {
|
|
18
|
+
"places": [
|
|
19
|
+
{
|
|
20
|
+
"id": "1",
|
|
21
|
+
"name": "Lady Bird Lake",
|
|
22
|
+
"rating": 4.5,
|
|
23
|
+
"category": "Waterfront",
|
|
24
|
+
"location": "Austin",
|
|
25
|
+
"image": "https://images.unsplash.com/photo-1520950237264-dfe336995c34?w=400&h=400&fit=crop",
|
|
26
|
+
"description": "Scenic lake perfect for kayaking, paddleboarding, and trails."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "2",
|
|
30
|
+
"name": "Texas State Capitol",
|
|
31
|
+
"rating": 4.8,
|
|
32
|
+
"category": "Historic Site",
|
|
33
|
+
"location": "Austin",
|
|
34
|
+
"image": "https://images.unsplash.com/photo-1664231978322-4d0b45c7027b?w=400&h=400&fit=crop",
|
|
35
|
+
"description": "Stunning capitol building with free tours and beautiful grounds."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "3",
|
|
39
|
+
"name": "The Paramount Theatre",
|
|
40
|
+
"rating": 4.7,
|
|
41
|
+
"category": "Architecture",
|
|
42
|
+
"location": "Austin",
|
|
43
|
+
"image": "https://images.unsplash.com/photo-1583097090970-4d3b940ea1a0?w=400&h=400&fit=crop",
|
|
44
|
+
"description": "Century-old performance and movie theatre in the heart of downtown Austin."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "4",
|
|
48
|
+
"name": "Zilker Park",
|
|
49
|
+
"rating": 4.7,
|
|
50
|
+
"category": "Park",
|
|
51
|
+
"location": "Austin",
|
|
52
|
+
"image": "https://images.unsplash.com/photo-1563828568124-f800803ba13c?w=400&h=400&fit=crop",
|
|
53
|
+
"description": "Popular park with trails, sports fields, and Barton Springs Pool."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "5",
|
|
57
|
+
"name": "South Congress Avenue",
|
|
58
|
+
"rating": 4.6,
|
|
59
|
+
"category": "Landmark",
|
|
60
|
+
"location": "Austin",
|
|
61
|
+
"image": "https://images.unsplash.com/photo-1588993608283-7f0eda4438be?w=400&h=400&fit=crop",
|
|
62
|
+
"description": "Vibrant street with unique shops, restaurants, and live music."
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"_meta": {}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"userMessage": "Help me count something",
|
|
3
|
+
"tool": {
|
|
4
|
+
"name": "show-counter",
|
|
5
|
+
"description": "Show a simple counter tool",
|
|
6
|
+
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
|
|
7
|
+
"title": "Show Counter",
|
|
8
|
+
"annotations": { "readOnlyHint": true },
|
|
9
|
+
"_meta": {
|
|
10
|
+
"openai/toolInvocation/invoking": "Counting beans",
|
|
11
|
+
"openai/toolInvocation/invoked": "Beans counted",
|
|
12
|
+
"openai/widgetAccessible": true,
|
|
13
|
+
"openai/resultCanProduceWidget": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"toolCall": {
|
|
17
|
+
"structuredContent": null,
|
|
18
|
+
"_meta": {}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server-safe simulation configurations
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Auto-discovers all *-simulation.json files in this directory.
|
|
5
|
+
* File naming: {resource}-{tool}-simulation.json (e.g., albums-show-simulation.json)
|
|
6
|
+
*
|
|
7
|
+
* This file can be safely imported in Node.js contexts (like MCP servers)
|
|
8
|
+
* without causing issues with CSS imports or React components.
|
|
6
9
|
*/
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { carouselSimulation } from './carousel-simulation.js';
|
|
11
|
-
import { mapSimulation } from './map-simulation.js';
|
|
11
|
+
// Auto-discover all simulation JSON files
|
|
12
|
+
const simulationModules = import.meta.glob('./*-simulation.json', { eager: true });
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
// Build SIMULATIONS object from discovered files
|
|
15
|
+
// Key is the full name without -simulation.json suffix (e.g., 'albums-show')
|
|
16
|
+
export const SIMULATIONS = Object.fromEntries(
|
|
17
|
+
Object.entries(simulationModules).map(([path, module]) => {
|
|
18
|
+
// Extract simulation key from path: './albums-show-simulation.json' -> 'albums-show'
|
|
19
|
+
const match = path.match(/\.\/(.+)-simulation\.json$/);
|
|
20
|
+
const key = match?.[1] ?? path;
|
|
21
|
+
return [key, (module as { default: unknown }).default];
|
|
22
|
+
})
|
|
23
|
+
) as Record<string, unknown>;
|