sunpeak 0.5.36 → 0.5.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/chatgpt/mock-openai.d.ts +2 -2
  2. package/dist/chatgpt/simple-sidebar.d.ts +2 -1
  3. package/dist/hooks/use-max-height.d.ts +1 -1
  4. package/dist/index.cjs +176 -121
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.js +176 -121
  7. package/dist/index.js.map +1 -1
  8. package/dist/providers/openai/types.d.ts +1 -1
  9. package/dist/providers/types.d.ts +1 -1
  10. package/dist/style.css +155 -36
  11. package/package.json +1 -1
  12. package/template/dist/chatgpt/albums.js +10 -10
  13. package/template/dist/chatgpt/carousel.js +2 -2
  14. package/template/dist/chatgpt/counter.js +7 -7
  15. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +3 -3
  16. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +4 -4
  17. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +19 -19
  18. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
  19. package/template/node_modules/.vite/deps/_metadata.json +30 -30
  20. package/template/node_modules/.vite/deps/{chunk-675LFNY2.js → chunk-EVJ3DVH5.js} +8 -8
  21. package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  22. package/template/src/components/album/albums.test.tsx +7 -2
  23. package/template/src/components/album/albums.tsx +1 -1
  24. package/template/src/components/album/fullscreen-viewer.test.tsx +12 -24
  25. package/template/src/components/album/fullscreen-viewer.tsx +55 -34
  26. package/template/src/components/carousel/carousel.tsx +1 -1
  27. package/template/src/components/resources/albums-resource.tsx +1 -0
  28. package/template/src/components/resources/counter-resource.tsx +8 -0
  29. package/template/src/simulations/albums-simulation.ts +5 -1
  30. package/template/src/simulations/carousel-simulation.ts +5 -1
  31. package/template/src/simulations/counter-simulation.ts +6 -1
  32. package/template/src/simulations/widget-config.ts +42 -0
  33. /package/template/node_modules/.vite/deps/{chunk-675LFNY2.js.map → chunk-EVJ3DVH5.js.map} +0 -0
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Default widget configuration for all simulations.
3
+ * Individual simulations can override these values as needed.
4
+ */
5
+
6
+ export interface WidgetCSP {
7
+ connect_domains: string[];
8
+ resource_domains: string[];
9
+ }
10
+
11
+ export interface WidgetMeta {
12
+ 'openai/widgetDomain': string;
13
+ 'openai/widgetCSP': WidgetCSP;
14
+ }
15
+
16
+ /**
17
+ * Default widget metadata that can be spread into resource._meta
18
+ *
19
+ * @example
20
+ * // Use default configuration
21
+ * resource: {
22
+ * _meta: {
23
+ * ...defaultWidgetMeta,
24
+ * }
25
+ * }
26
+ *
27
+ * @example
28
+ * // Override specific values
29
+ * resource: {
30
+ * _meta: {
31
+ * ...defaultWidgetMeta,
32
+ * 'openai/widgetDomain': 'https://custom.domain.com',
33
+ * }
34
+ * }
35
+ */
36
+ export const defaultWidgetMeta: WidgetMeta = {
37
+ 'openai/widgetDomain': 'https://sunpeak.ai', // YOUR DOMAIN HERE.
38
+ 'openai/widgetCSP': {
39
+ connect_domains: ['https://sunpeak.ai'], // YOUR API HERE.
40
+ resource_domains: ['https://*.oaistatic.com', 'https://images.unsplash.com'], // YOUR CDN HERE (if any).
41
+ },
42
+ };