sunpeak 0.9.6 → 0.9.10

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.
@@ -12,5 +12,5 @@
12
12
  ]
13
13
  }
14
14
  },
15
- "uri": "ui://review-mk8u79b0"
15
+ "uri": "ui://review-mka2vgl6"
16
16
  }
@@ -1,3 +1,7 @@
1
+ import {
2
+ dist_exports4 as dist_exports
3
+ } from "./chunk-TSEQUROC.js";
4
+ import "./chunk-XZTIOEPG.js";
1
5
  import {
2
6
  useResizeObserver
3
7
  } from "./chunk-JAGHY6H6.js";
@@ -6,10 +10,6 @@ import {
6
10
  waitForAnimationFrame
7
11
  } from "./chunk-DYQDWJMS.js";
8
12
  import "./chunk-EGRHWZRV.js";
9
- import {
10
- dist_exports4 as dist_exports
11
- } from "./chunk-TSEQUROC.js";
12
- import "./chunk-XZTIOEPG.js";
13
13
  import {
14
14
  clsx_default
15
15
  } from "./chunk-CNYJBM5F.js";
@@ -1,6 +1,12 @@
1
1
  import {
2
2
  Input
3
3
  } from "./chunk-2DZGWGIP.js";
4
+ import {
5
+ dist_exports,
6
+ dist_exports3 as dist_exports2,
7
+ dist_exports5 as dist_exports3
8
+ } from "./chunk-TSEQUROC.js";
9
+ import "./chunk-XZTIOEPG.js";
4
10
  import {
5
11
  Button,
6
12
  LoadingIndicator,
@@ -19,12 +25,6 @@ import {
19
25
  waitForAnimationFrame
20
26
  } from "./chunk-DYQDWJMS.js";
21
27
  import "./chunk-EGRHWZRV.js";
22
- import {
23
- dist_exports,
24
- dist_exports3 as dist_exports2,
25
- dist_exports5 as dist_exports3
26
- } from "./chunk-TSEQUROC.js";
27
- import "./chunk-XZTIOEPG.js";
28
28
  import {
29
29
  clsx_default
30
30
  } from "./chunk-CNYJBM5F.js";
@@ -7,115 +7,115 @@
7
7
  "react": {
8
8
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/index.js",
9
9
  "file": "react.js",
10
- "fileHash": "5dce5a83",
10
+ "fileHash": "e9d7bd7c",
11
11
  "needsInterop": true
12
12
  },
13
13
  "react-dom": {
14
14
  "src": "../../../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js",
15
15
  "file": "react-dom.js",
16
- "fileHash": "f1f9ceb7",
16
+ "fileHash": "6077638f",
17
17
  "needsInterop": true
18
18
  },
19
19
  "react/jsx-dev-runtime": {
20
20
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js",
21
21
  "file": "react_jsx-dev-runtime.js",
22
- "fileHash": "6d41e9e9",
22
+ "fileHash": "d1b53763",
23
23
  "needsInterop": true
24
24
  },
25
25
  "react/jsx-runtime": {
26
26
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js",
27
27
  "file": "react_jsx-runtime.js",
28
- "fileHash": "76d0ee1e",
28
+ "fileHash": "7220a079",
29
29
  "needsInterop": true
30
30
  },
31
31
  "@openai/apps-sdk-ui/components/Avatar": {
32
32
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Avatar/index.js",
33
33
  "file": "@openai_apps-sdk-ui_components_Avatar.js",
34
- "fileHash": "cc1e3682",
34
+ "fileHash": "a4018122",
35
35
  "needsInterop": false
36
36
  },
37
37
  "@openai/apps-sdk-ui/components/Button": {
38
38
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Button/index.js",
39
39
  "file": "@openai_apps-sdk-ui_components_Button.js",
40
- "fileHash": "ae4fe364",
40
+ "fileHash": "a08e5fc7",
41
41
  "needsInterop": false
42
42
  },
43
43
  "@openai/apps-sdk-ui/components/Checkbox": {
44
44
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Checkbox/index.js",
45
45
  "file": "@openai_apps-sdk-ui_components_Checkbox.js",
46
- "fileHash": "1db3db7f",
46
+ "fileHash": "568a2156",
47
47
  "needsInterop": false
48
48
  },
49
49
  "@openai/apps-sdk-ui/components/Icon": {
50
50
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Icon/index.js",
51
51
  "file": "@openai_apps-sdk-ui_components_Icon.js",
52
- "fileHash": "837c2737",
52
+ "fileHash": "870168af",
53
53
  "needsInterop": false
54
54
  },
55
55
  "@openai/apps-sdk-ui/components/Input": {
56
56
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Input/index.js",
57
57
  "file": "@openai_apps-sdk-ui_components_Input.js",
58
- "fileHash": "062e2a54",
58
+ "fileHash": "f6d4ad60",
59
59
  "needsInterop": false
60
60
  },
61
61
  "@openai/apps-sdk-ui/components/SegmentedControl": {
62
62
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/SegmentedControl/index.js",
63
63
  "file": "@openai_apps-sdk-ui_components_SegmentedControl.js",
64
- "fileHash": "6e036e2c",
64
+ "fileHash": "99bd53a9",
65
65
  "needsInterop": false
66
66
  },
67
67
  "@openai/apps-sdk-ui/components/Select": {
68
68
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Select/index.js",
69
69
  "file": "@openai_apps-sdk-ui_components_Select.js",
70
- "fileHash": "6ca9ce17",
70
+ "fileHash": "849b8549",
71
71
  "needsInterop": false
72
72
  },
73
73
  "@openai/apps-sdk-ui/components/Textarea": {
74
74
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Textarea/index.js",
75
75
  "file": "@openai_apps-sdk-ui_components_Textarea.js",
76
- "fileHash": "6bbf0e0f",
76
+ "fileHash": "1655679b",
77
77
  "needsInterop": false
78
78
  },
79
79
  "@openai/apps-sdk-ui/theme": {
80
80
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/lib/theme.js",
81
81
  "file": "@openai_apps-sdk-ui_theme.js",
82
- "fileHash": "125dd763",
82
+ "fileHash": "2d1cd0a4",
83
83
  "needsInterop": false
84
84
  },
85
85
  "clsx": {
86
86
  "src": "../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs",
87
87
  "file": "clsx.js",
88
- "fileHash": "adae7188",
88
+ "fileHash": "3c893bd9",
89
89
  "needsInterop": false
90
90
  },
91
91
  "embla-carousel-react": {
92
92
  "src": "../../../../node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.3/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js",
93
93
  "file": "embla-carousel-react.js",
94
- "fileHash": "27e70439",
94
+ "fileHash": "177240f7",
95
95
  "needsInterop": false
96
96
  },
97
97
  "embla-carousel-wheel-gestures": {
98
98
  "src": "../../../../node_modules/.pnpm/embla-carousel-wheel-gestures@8.1.0_embla-carousel@8.6.0/node_modules/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.esm.js",
99
99
  "file": "embla-carousel-wheel-gestures.js",
100
- "fileHash": "03d5e96c",
100
+ "fileHash": "1a9092e3",
101
101
  "needsInterop": false
102
102
  },
103
103
  "mapbox-gl": {
104
104
  "src": "../../../../node_modules/.pnpm/mapbox-gl@3.17.0/node_modules/mapbox-gl/dist/mapbox-gl.js",
105
105
  "file": "mapbox-gl.js",
106
- "fileHash": "af8061a4",
106
+ "fileHash": "4acc5784",
107
107
  "needsInterop": true
108
108
  },
109
109
  "react-dom/client": {
110
110
  "src": "../../../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/client.js",
111
111
  "file": "react-dom_client.js",
112
- "fileHash": "9add8d51",
112
+ "fileHash": "0d690983",
113
113
  "needsInterop": true
114
114
  },
115
115
  "tailwind-merge": {
116
116
  "src": "../../../../node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs",
117
117
  "file": "tailwind-merge.js",
118
- "fileHash": "eaf80d9a",
118
+ "fileHash": "600e9867",
119
119
  "needsInterop": false
120
120
  }
121
121
  },
@@ -123,6 +123,12 @@
123
123
  "chunk-2DZGWGIP": {
124
124
  "file": "chunk-2DZGWGIP.js"
125
125
  },
126
+ "chunk-TSEQUROC": {
127
+ "file": "chunk-TSEQUROC.js"
128
+ },
129
+ "chunk-XZTIOEPG": {
130
+ "file": "chunk-XZTIOEPG.js"
131
+ },
126
132
  "chunk-N6DVYEXK": {
127
133
  "file": "chunk-N6DVYEXK.js"
128
134
  },
@@ -138,12 +144,6 @@
138
144
  "chunk-EGRHWZRV": {
139
145
  "file": "chunk-EGRHWZRV.js"
140
146
  },
141
- "chunk-TSEQUROC": {
142
- "file": "chunk-TSEQUROC.js"
143
- },
144
- "chunk-XZTIOEPG": {
145
- "file": "chunk-XZTIOEPG.js"
146
- },
147
147
  "chunk-CNYJBM5F": {
148
148
  "file": "chunk-CNYJBM5F.js"
149
149
  },
@@ -1 +1 @@
1
- {"version":"4.0.16","results":[[":src/resources/review-resource.test.tsx",{"duration":559.5211790000001,"failed":false}],[":src/resources/carousel-resource.test.tsx",{"duration":274.45098800000005,"failed":false}],[":src/components/album/albums.test.tsx",{"duration":293.8420480000002,"failed":false}],[":src/components/map/place-inspector.test.tsx",{"duration":419.9698040000003,"failed":false}],[":src/components/map/map-view.test.tsx",{"duration":74.87890800000014,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":268.03875199999993,"failed":false}],[":src/components/map/place-list.test.tsx",{"duration":144.34349999999995,"failed":false}],[":src/components/map/place-card.test.tsx",{"duration":357.63647600000013,"failed":false}],[":src/components/map/place-carousel.test.tsx",{"duration":430.33475,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":88.78069400000004,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":88.54834000000005,"failed":false}],[":src/resources/map-resource.test.tsx",{"duration":280.1168210000001,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":286.3251439999999,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":479.77164000000016,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":331.31021499999997,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":85.36528099999987,"failed":false}]]}
1
+ {"version":"4.0.16","results":[[":src/components/album/albums.test.tsx",{"duration":324.77866399999994,"failed":false}],[":src/resources/review-resource.test.tsx",{"duration":529.694369,"failed":false}],[":src/resources/carousel-resource.test.tsx",{"duration":263.42517499999985,"failed":false}],[":src/components/map/map-view.test.tsx",{"duration":85.665119,"failed":false}],[":src/components/map/place-inspector.test.tsx",{"duration":409.3448330000001,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":228.8939330000003,"failed":false}],[":src/components/map/place-list.test.tsx",{"duration":147.47323099999994,"failed":false}],[":src/components/map/place-card.test.tsx",{"duration":355.5575329999999,"failed":false}],[":src/components/map/place-carousel.test.tsx",{"duration":429.1329959999998,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":79.22797600000013,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":73.47246699999982,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":289.68861300000003,"failed":false}],[":src/resources/map-resource.test.tsx",{"duration":255.71324299999992,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":408.4503480000001,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":321.1045839999997,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":76.67339900000002,"failed":false}]]}
@@ -49,6 +49,9 @@ export const AlbumCarousel = React.forwardRef<HTMLDivElement, AlbumCarouselProps
49
49
  if (emblaApi) emblaApi.scrollNext();
50
50
  }, [emblaApi]);
51
51
 
52
+ // Track the last index we synced to widget state to avoid redundant updates
53
+ const lastSyncedIndexRef = React.useRef<number | null>(null);
54
+
52
55
  const onSelect = React.useCallback(() => {
53
56
  if (!emblaApi) return;
54
57
 
@@ -56,15 +59,22 @@ export const AlbumCarousel = React.forwardRef<HTMLDivElement, AlbumCarouselProps
56
59
  setCanScrollNext(emblaApi.canScrollNext());
57
60
 
58
61
  const currentIndex = emblaApi.selectedScrollSnap();
59
- if (widgetState?.currentIndex !== currentIndex) {
62
+
63
+ // Only update widget state if the index actually changed from user interaction
64
+ if (lastSyncedIndexRef.current !== currentIndex) {
65
+ lastSyncedIndexRef.current = currentIndex;
60
66
  setWidgetState((prev) => ({ ...prev, currentIndex }));
61
67
  }
62
- }, [emblaApi, widgetState?.currentIndex, setWidgetState]);
68
+ }, [emblaApi, setWidgetState]);
63
69
 
64
70
  React.useEffect(() => {
65
71
  if (!emblaApi) return;
66
72
 
67
- onSelect();
73
+ // Initialize scroll state without updating widget state
74
+ setCanScrollPrev(emblaApi.canScrollPrev());
75
+ setCanScrollNext(emblaApi.canScrollNext());
76
+ lastSyncedIndexRef.current = emblaApi.selectedScrollSnap();
77
+
68
78
  emblaApi.on('select', onSelect);
69
79
  emblaApi.on('reInit', onSelect);
70
80
 
@@ -74,6 +84,21 @@ export const AlbumCarousel = React.forwardRef<HTMLDivElement, AlbumCarouselProps
74
84
  };
75
85
  }, [emblaApi, onSelect]);
76
86
 
87
+ // Sync external widget state changes to carousel scroll position
88
+ React.useEffect(() => {
89
+ if (!emblaApi) return;
90
+
91
+ const targetIndex = widgetState?.currentIndex ?? 0;
92
+ const currentIndex = emblaApi.selectedScrollSnap();
93
+
94
+ // Only scroll if the external state differs from carousel position
95
+ // AND it's not a state we just synced from the carousel
96
+ if (targetIndex !== currentIndex && lastSyncedIndexRef.current !== targetIndex) {
97
+ lastSyncedIndexRef.current = targetIndex;
98
+ emblaApi.scrollTo(targetIndex);
99
+ }
100
+ }, [emblaApi, widgetState?.currentIndex]);
101
+
77
102
  const childArray = React.Children.toArray(children);
78
103
 
79
104
  const getCardWidth = () => {
@@ -49,6 +49,9 @@ export const Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(
49
49
  if (emblaApi) emblaApi.scrollNext();
50
50
  }, [emblaApi]);
51
51
 
52
+ // Track the last index we synced to widget state to avoid redundant updates
53
+ const lastSyncedIndexRef = React.useRef<number | null>(null);
54
+
52
55
  const onSelect = React.useCallback(() => {
53
56
  if (!emblaApi) return;
54
57
 
@@ -56,15 +59,22 @@ export const Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(
56
59
  setCanScrollNext(emblaApi.canScrollNext());
57
60
 
58
61
  const currentIndex = emblaApi.selectedScrollSnap();
59
- if (widgetState?.currentIndex !== currentIndex) {
62
+
63
+ // Only update widget state if the index actually changed from user interaction
64
+ if (lastSyncedIndexRef.current !== currentIndex) {
65
+ lastSyncedIndexRef.current = currentIndex;
60
66
  setWidgetState((prev) => ({ ...prev, currentIndex }));
61
67
  }
62
- }, [emblaApi, widgetState?.currentIndex, setWidgetState]);
68
+ }, [emblaApi, setWidgetState]);
63
69
 
64
70
  React.useEffect(() => {
65
71
  if (!emblaApi) return;
66
72
 
67
- onSelect();
73
+ // Initialize scroll state without updating widget state
74
+ setCanScrollPrev(emblaApi.canScrollPrev());
75
+ setCanScrollNext(emblaApi.canScrollNext());
76
+ lastSyncedIndexRef.current = emblaApi.selectedScrollSnap();
77
+
68
78
  emblaApi.on('select', onSelect);
69
79
  emblaApi.on('reInit', onSelect);
70
80
 
@@ -74,6 +84,21 @@ export const Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(
74
84
  };
75
85
  }, [emblaApi, onSelect]);
76
86
 
87
+ // Sync external widget state changes to carousel scroll position
88
+ React.useEffect(() => {
89
+ if (!emblaApi) return;
90
+
91
+ const targetIndex = widgetState?.currentIndex ?? 0;
92
+ const currentIndex = emblaApi.selectedScrollSnap();
93
+
94
+ // Only scroll if the external state differs from carousel position
95
+ // AND it's not a state we just synced from the carousel
96
+ if (targetIndex !== currentIndex && lastSyncedIndexRef.current !== targetIndex) {
97
+ lastSyncedIndexRef.current = targetIndex;
98
+ emblaApi.scrollTo(targetIndex);
99
+ }
100
+ }, [emblaApi, widgetState?.currentIndex]);
101
+
77
102
  const childArray = React.Children.toArray(children);
78
103
 
79
104
  const getCardWidth = () => {