@ankhorage/zora 27.7.1 → 27.9.0

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 (300) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -2
  3. package/dist/capabilities/index.js +50 -1
  4. package/dist/capabilities/index.js.map +6 -5
  5. package/dist/constants/authoring.d.ts +4 -3
  6. package/dist/constants/authoring.d.ts.map +1 -1
  7. package/dist/constants/authoring.js +2 -0
  8. package/dist/constants/authoring.js.map +1 -1
  9. package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
  10. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  11. package/dist/features/card/cardMeta.d.ts +1 -1
  12. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  13. package/dist/features/card/postCardMeta.d.ts +1 -1
  14. package/dist/features/carousel/Carousel.d.ts +8 -0
  15. package/dist/features/carousel/Carousel.d.ts.map +1 -0
  16. package/dist/features/carousel/Carousel.js +203 -0
  17. package/dist/features/carousel/Carousel.js.map +1 -0
  18. package/dist/features/carousel/public.d.ts +3 -0
  19. package/dist/features/carousel/public.d.ts.map +1 -0
  20. package/dist/features/carousel/public.js +2 -0
  21. package/dist/features/carousel/public.js.map +1 -0
  22. package/dist/features/carousel/useCarouselPlayback.d.ts +15 -0
  23. package/dist/features/carousel/useCarouselPlayback.d.ts.map +1 -0
  24. package/dist/features/carousel/useCarouselPlayback.js +74 -0
  25. package/dist/features/carousel/useCarouselPlayback.js.map +1 -0
  26. package/dist/features/chat/messageBubbleMeta.d.ts +1 -1
  27. package/dist/features/dialog/dialogMeta.d.ts +2 -2
  28. package/dist/features/gradient/gradientMeta.d.ts +1 -1
  29. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
  30. package/dist/features/layout/adapters/inbound/Screen.d.ts.map +1 -1
  31. package/dist/features/layout/adapters/inbound/Screen.js +1 -1
  32. package/dist/features/layout/adapters/inbound/Screen.js.map +1 -1
  33. package/dist/features/layout/gridMeta.d.ts +1 -1
  34. package/dist/features/layout/screenMeta.d.ts +1 -1
  35. package/dist/features/layout/scrollViewMeta.d.ts +1 -1
  36. package/dist/features/layout/viewMeta.d.ts +1 -1
  37. package/dist/features/list/flatListMeta.d.ts +1 -1
  38. package/dist/features/list/sectionListMeta.d.ts +1 -1
  39. package/dist/features/master-detail/adapters/inbound/MasterDetail.d.ts +5 -0
  40. package/dist/features/master-detail/adapters/inbound/MasterDetail.d.ts.map +1 -0
  41. package/dist/features/master-detail/adapters/inbound/MasterDetail.js +39 -0
  42. package/dist/features/master-detail/adapters/inbound/MasterDetail.js.map +1 -0
  43. package/dist/features/master-detail/application/resolveMasterDetailPresentation.d.ts +6 -0
  44. package/dist/features/master-detail/application/resolveMasterDetailPresentation.d.ts.map +1 -0
  45. package/dist/features/master-detail/application/resolveMasterDetailPresentation.js +7 -0
  46. package/dist/features/master-detail/application/resolveMasterDetailPresentation.js.map +1 -0
  47. package/dist/features/master-detail/masterDetailMeta.d.ts +52 -0
  48. package/dist/features/master-detail/masterDetailMeta.d.ts.map +1 -0
  49. package/dist/features/master-detail/masterDetailMeta.js +47 -0
  50. package/dist/features/master-detail/masterDetailMeta.js.map +1 -0
  51. package/dist/features/master-detail/public.d.ts +3 -0
  52. package/dist/features/master-detail/public.d.ts.map +1 -0
  53. package/dist/features/master-detail/public.js +2 -0
  54. package/dist/features/master-detail/public.js.map +1 -0
  55. package/dist/features/reader/meta.d.ts +2 -2
  56. package/dist/features/registry/ZORA_BASE_COMPONENT_REGISTRY.d.ts.map +1 -1
  57. package/dist/features/registry/ZORA_BASE_COMPONENT_REGISTRY.js +2 -0
  58. package/dist/features/registry/ZORA_BASE_COMPONENT_REGISTRY.js.map +1 -1
  59. package/dist/features/registry/bindableComponentMeta.d.ts +2 -2
  60. package/dist/features/registry/componentMeta.d.ts.map +1 -1
  61. package/dist/features/registry/componentMeta.js +2 -0
  62. package/dist/features/registry/componentMeta.js.map +1 -1
  63. package/dist/features/scanner/meta.d.ts +2 -2
  64. package/dist/features/section/screenSectionMeta.d.ts +1 -1
  65. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  66. package/dist/features/tabs/tabPanelMeta.d.ts +1 -1
  67. package/dist/index.d.ts +4 -0
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +2 -0
  70. package/dist/index.js.map +1 -1
  71. package/dist/readerFree.d.ts +2 -0
  72. package/dist/readerFree.d.ts.map +1 -1
  73. package/dist/readerFree.js +1 -0
  74. package/dist/readerFree.js.map +1 -1
  75. package/dist/types/carousel.d.ts +52 -0
  76. package/dist/types/carousel.d.ts.map +1 -0
  77. package/dist/types/carousel.js +2 -0
  78. package/dist/types/carousel.js.map +1 -0
  79. package/dist/types/master-detail.d.ts +21 -0
  80. package/dist/types/master-detail.d.ts.map +1 -0
  81. package/dist/types/master-detail.js +2 -0
  82. package/dist/types/master-detail.js.map +1 -0
  83. package/package.json +1 -1
  84. package/src/constants/authoring.ts +2 -0
  85. package/src/features/carousel/Carousel.test.ts +66 -0
  86. package/src/features/carousel/Carousel.tsx +470 -0
  87. package/src/features/carousel/public.ts +2 -0
  88. package/src/features/carousel/useCarouselPlayback.ts +103 -0
  89. package/src/features/layout/adapters/inbound/Screen.tsx +3 -0
  90. package/src/features/master-detail/adapters/inbound/MasterDetail.runtime.test.tsx +121 -0
  91. package/src/features/master-detail/adapters/inbound/MasterDetail.tsx +75 -0
  92. package/src/features/master-detail/application/resolveMasterDetailPresentation.test.ts +18 -0
  93. package/src/features/master-detail/application/resolveMasterDetailPresentation.ts +15 -0
  94. package/src/features/master-detail/masterDetailMeta.ts +49 -0
  95. package/src/features/master-detail/public.ts +7 -0
  96. package/src/features/registry/ZORA_BASE_COMPONENT_REGISTRY.ts +2 -0
  97. package/src/features/registry/componentMeta.test.ts +16 -0
  98. package/src/features/registry/componentMeta.ts +2 -0
  99. package/src/features/registry/featureManifest.test.ts +2 -0
  100. package/src/index.ts +9 -0
  101. package/src/readerFree.ts +7 -0
  102. package/src/types/carousel.ts +60 -0
  103. package/src/types/master-detail.ts +25 -0
  104. package/web-dist/chunks/{Accordion-p2f0e4pn.js → Accordion-0bgzetnd.js} +6 -6
  105. package/web-dist/chunks/{Accordion-wvghkwxx.js → Accordion-0yn2b3ha.js} +9 -9
  106. package/web-dist/chunks/{Accordion-9d3rd7ne.js → Accordion-19zt3dyq.js} +1 -1
  107. package/web-dist/chunks/{Accordion-sxzts6bj.js → Accordion-1k7pyxdd.js} +2 -2
  108. package/web-dist/chunks/{Accordion-ew2cebyd.js → Accordion-1mjn0atk.js} +4 -4
  109. package/web-dist/chunks/{Accordion-ms1y70gq.js → Accordion-6qesggn9.js} +4 -4
  110. package/web-dist/chunks/{Accordion-e8dg1z2s.js → Accordion-6y42ws4p.js} +2 -2
  111. package/web-dist/chunks/{Accordion-jh94mg56.js → Accordion-70hh6g1f.js} +9 -9
  112. package/web-dist/chunks/{Accordion-wx0jp5cn.js → Accordion-7qb7741m.js} +7 -7
  113. package/web-dist/chunks/{Accordion-rwc34cn2.js → Accordion-818avkay.js} +5 -5
  114. package/web-dist/chunks/{Accordion-t2cvrn0r.js → Accordion-8ahdjt13.js} +8 -8
  115. package/web-dist/chunks/{Accordion-j6bs1yfn.js → Accordion-8vw4k0s6.js} +2 -2
  116. package/web-dist/chunks/{Accordion-m3xb7z7j.js → Accordion-8y13469y.js} +8 -8
  117. package/web-dist/chunks/{Accordion-4kmh6s2k.js → Accordion-91v243pz.js} +2 -2
  118. package/web-dist/chunks/{Accordion-8vcs6nz6.js → Accordion-9cpm8x92.js} +1 -1
  119. package/web-dist/chunks/{Accordion-vq8zrnwh.js → Accordion-9kkfz7s8.js} +4 -4
  120. package/web-dist/chunks/{Accordion-6jsea4e0.js → Accordion-ajgffs75.js} +8 -8
  121. package/web-dist/chunks/{Accordion-hf4nfkn0.js → Accordion-bednnpzh.js} +13 -13
  122. package/web-dist/chunks/{Accordion-c44m1q0m.js → Accordion-ctcxh9pk.js} +3 -3
  123. package/web-dist/chunks/{Accordion-fbehwpr1.js → Accordion-dnfrzbpb.js} +7 -7
  124. package/web-dist/chunks/{Accordion-f2n2zz1x.js → Accordion-ea0ag7wf.js} +6 -6
  125. package/web-dist/chunks/{Accordion-260pyaxy.js → Accordion-g45xga4b.js} +5 -5
  126. package/web-dist/chunks/{Accordion-yb4as6wc.js → Accordion-gjeaevge.js} +5 -5
  127. package/web-dist/chunks/{Accordion-7788ybcs.js → Accordion-grtf75xt.js} +4 -4
  128. package/web-dist/chunks/{Accordion-9hcbf56f.js → Accordion-h4928ex8.js} +2 -2
  129. package/web-dist/chunks/{Accordion-mrhkw8n6.js → Accordion-hqg1zbxk.js} +6 -4
  130. package/web-dist/chunks/{Accordion-gysa24fk.js → Accordion-j5wsx41j.js} +1 -1
  131. package/web-dist/chunks/{Accordion-yrzm02g2.js → Accordion-jmhn8mm5.js} +5 -5
  132. package/web-dist/chunks/{Accordion-252dr90x.js → Accordion-jsapannb.js} +4 -4
  133. package/web-dist/chunks/{Accordion-b4yr6yq3.js → Accordion-jsdjgfn2.js} +2 -2
  134. package/web-dist/chunks/{Accordion-8ac6dkcs.js → Accordion-k058095e.js} +1 -1
  135. package/web-dist/chunks/Accordion-kcx57mk5.js +39 -0
  136. package/web-dist/chunks/{Accordion-5z8pbn4z.js → Accordion-nbje2ywp.js} +3 -3
  137. package/web-dist/chunks/{Accordion-tpd1vvy9.js → Accordion-ng79nxzz.js} +1 -38
  138. package/web-dist/chunks/{Accordion-7mnan4q4.js → Accordion-qw6tzn3f.js} +6 -6
  139. package/web-dist/chunks/{Accordion-w0prbwy0.js → Accordion-qx45gtx9.js} +8 -8
  140. package/web-dist/chunks/{Accordion-rcs75kj4.js → Accordion-r6gwemh9.js} +3 -3
  141. package/web-dist/chunks/{Accordion-s9nbkzky.js → Accordion-rt4jfq2r.js} +2 -2
  142. package/web-dist/chunks/{Accordion-r86ce0wj.js → Accordion-t11cptjk.js} +4 -4
  143. package/web-dist/chunks/{Accordion-jx9tc6p1.js → Accordion-th8pkeqc.js} +4 -4
  144. package/web-dist/chunks/{Accordion-tnt1txfq.js → Accordion-tkxddb2c.js} +4 -4
  145. package/web-dist/chunks/{Accordion-5pbvgvqc.js → Accordion-tnq8bt8v.js} +2 -2
  146. package/web-dist/chunks/{Accordion-nnhznqgf.js → Accordion-ttjyk97v.js} +2 -2
  147. package/web-dist/chunks/{Accordion-r6zvzrkd.js → Accordion-v21vz0cg.js} +7 -4
  148. package/web-dist/chunks/{Accordion-0j4xzcwz.js → Accordion-vdqc8rxv.js} +3 -3
  149. package/web-dist/chunks/{Accordion-a8k3cvj0.js → Accordion-w1ag7sr4.js} +2 -2
  150. package/web-dist/chunks/{Accordion-vzgpdtr2.js → Accordion-wdby2v5r.js} +1 -1
  151. package/web-dist/chunks/{Accordion-zj4wnm3e.js → Accordion-wgc67k1g.js} +1 -1
  152. package/web-dist/chunks/{Accordion-p7mxkxhs.js → Accordion-x3em7tpd.js} +9 -9
  153. package/web-dist/chunks/{Accordion-mpebzjby.js → Accordion-xb2nj0q6.js} +4 -4
  154. package/web-dist/chunks/{Accordion-001ymezm.js → Accordion-y524ph0g.js} +1 -1
  155. package/web-dist/chunks/{Accordion-np16p9mh.js → Accordion-zexve9d3.js} +4 -4
  156. package/web-dist/chunks/{Accordion-4c7hqeg3.js → Accordion-zvpkhqb7.js} +2 -2
  157. package/web-dist/chunks/{Accordion-kcca65d8.js → Accordion-zxergnck.js} +5 -5
  158. package/web-dist/chunks/{Accordion-hh48jjhk.js → Accordion-zyah4pvq.js} +7 -7
  159. package/web-dist/chunks/{Accordion-8j7t77tf.js → Accordion-zymf1mp8.js} +5 -5
  160. package/web-dist/components/accordion/Accordion.js +12 -11
  161. package/web-dist/components/accordion-item/AccordionItem.js +12 -11
  162. package/web-dist/components/activity-indicator/ActivityIndicator.js +4 -3
  163. package/web-dist/components/app-bar/AppBar.js +18 -17
  164. package/web-dist/components/app-header/AppHeader.js +18 -17
  165. package/web-dist/components/app-shell/AppShell.js +6 -5
  166. package/web-dist/components/auth-screen/AuthScreen.js +23 -22
  167. package/web-dist/components/avatar/Avatar.js +12 -11
  168. package/web-dist/components/avatar-group/AvatarGroup.js +12 -11
  169. package/web-dist/components/badge/Badge.js +7 -6
  170. package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +21 -20
  171. package/web-dist/components/bottom-sheet/BottomSheet.js +8 -7
  172. package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +8 -7
  173. package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +8 -7
  174. package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +8 -7
  175. package/web-dist/components/bottom-sheet-view/BottomSheetView.js +8 -7
  176. package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +8 -7
  177. package/web-dist/components/breadcrumbs/Breadcrumbs.js +15 -14
  178. package/web-dist/components/button/Button.js +13 -12
  179. package/web-dist/components/button-group/ButtonGroup.js +13 -12
  180. package/web-dist/components/calendar/Calendar.js +15 -14
  181. package/web-dist/components/camera-permission-view/CameraPermissionView.js +21 -20
  182. package/web-dist/components/card/Card.js +20 -19
  183. package/web-dist/components/card-back/CardBack.js +5 -4
  184. package/web-dist/components/card-hand/CardHand.js +5 -4
  185. package/web-dist/components/carousel/Carousel.d.ts +10 -0
  186. package/web-dist/components/carousel/Carousel.js +483 -0
  187. package/web-dist/components/carousel/Carousel.types-0.d.ts +55 -0
  188. package/web-dist/components/carousel/index.d.ts +2 -0
  189. package/web-dist/components/carousel/index.js +2 -0
  190. package/web-dist/components/chat-list-item/ChatListItem.js +16 -15
  191. package/web-dist/components/checkbox/Checkbox.js +12 -11
  192. package/web-dist/components/checkbox-group/CheckboxGroup.js +12 -11
  193. package/web-dist/components/chess-board/ChessBoard.js +5 -4
  194. package/web-dist/components/chip/Chip.js +13 -12
  195. package/web-dist/components/chip-group/ChipGroup.js +13 -12
  196. package/web-dist/components/collection-editor/CollectionEditor.js +20 -19
  197. package/web-dist/components/color-hue-scale/ColorHueScale.js +16 -15
  198. package/web-dist/components/color-picker/ColorPicker.js +16 -15
  199. package/web-dist/components/color-tone/ColorTone.js +16 -15
  200. package/web-dist/components/color-wheel/ColorWheel.js +16 -15
  201. package/web-dist/components/content-rail/ContentRail.js +14 -13
  202. package/web-dist/components/data-table/DataTable.js +26 -25
  203. package/web-dist/components/date-picker/DatePicker.js +19 -18
  204. package/web-dist/components/dialog/Dialog.js +11 -10
  205. package/web-dist/components/divider/Divider.js +6 -5
  206. package/web-dist/components/empty-state/EmptyState.js +21 -20
  207. package/web-dist/components/explorer/Explorer.js +13 -12
  208. package/web-dist/components/field/Field.js +12 -11
  209. package/web-dist/components/file-explorer/FileExplorer.js +13 -12
  210. package/web-dist/components/flat-list/FlatList.js +13 -12
  211. package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +23 -22
  212. package/web-dist/components/form/Form.js +17 -16
  213. package/web-dist/components/form-actions/FormActions.js +17 -16
  214. package/web-dist/components/form-error/FormError.js +17 -16
  215. package/web-dist/components/game/Game.js +7 -6
  216. package/web-dist/components/game-entity/GameEntity.js +7 -6
  217. package/web-dist/components/game-field/GameField.js +7 -6
  218. package/web-dist/components/game-input-zone/GameInputZone.js +7 -6
  219. package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +7 -6
  220. package/web-dist/components/game-overlay/GameOverlay.js +7 -6
  221. package/web-dist/components/gradient/Gradient.js +7 -6
  222. package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +7 -6
  223. package/web-dist/components/grid/Grid.js +6 -5
  224. package/web-dist/components/grid-line-overlay/GridLineOverlay.js +5 -4
  225. package/web-dist/components/grid-ruler/GridRuler.js +5 -4
  226. package/web-dist/components/heading/Heading.js +7 -6
  227. package/web-dist/components/hero/Hero.js +20 -19
  228. package/web-dist/components/icon/Icon.js +5 -4
  229. package/web-dist/components/icon-button/IconButton.js +13 -12
  230. package/web-dist/components/image/Image.js +10 -9
  231. package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +4 -3
  232. package/web-dist/components/list/List.js +13 -12
  233. package/web-dist/components/list-item/ListItem.js +13 -12
  234. package/web-dist/components/list-section/ListSection.js +13 -12
  235. package/web-dist/components/master-detail/MasterDetail.d.ts +7 -0
  236. package/web-dist/components/master-detail/MasterDetail.dependency-0.d.ts +27 -0
  237. package/web-dist/components/master-detail/MasterDetail.dependency-1.d.ts +3 -0
  238. package/web-dist/components/master-detail/MasterDetail.js +110 -0
  239. package/web-dist/components/master-detail/MasterDetail.types-0.d.ts +25 -0
  240. package/web-dist/components/master-detail/index.d.ts +2 -0
  241. package/web-dist/components/master-detail/index.js +2 -0
  242. package/web-dist/components/matrix-grid/MatrixGrid.js +5 -4
  243. package/web-dist/components/media-card/MediaCard.js +20 -19
  244. package/web-dist/components/media-explorer/MediaExplorer.js +13 -12
  245. package/web-dist/components/message-bubble/MessageBubble.js +16 -15
  246. package/web-dist/components/metric-card/MetricCard.js +20 -19
  247. package/web-dist/components/missing-element/MissingElement.js +11 -10
  248. package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +23 -22
  249. package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +23 -22
  250. package/web-dist/components/opening-book/OpeningBook.js +5 -4
  251. package/web-dist/components/otp-form/OtpForm.js +23 -22
  252. package/web-dist/components/pagination/Pagination.js +14 -13
  253. package/web-dist/components/palette-item/PaletteItem.js +20 -19
  254. package/web-dist/components/playing-card/PlayingCard.js +5 -4
  255. package/web-dist/components/poker-training-table/PokerTrainingTable.js +5 -4
  256. package/web-dist/components/popover-menu/PopoverMenu.js +12 -11
  257. package/web-dist/components/post-card/PostCard.js +20 -19
  258. package/web-dist/components/product-card/ProductCard.js +20 -19
  259. package/web-dist/components/progress/Progress.js +10 -9
  260. package/web-dist/components/progress-ring/ProgressRing.js +10 -9
  261. package/web-dist/components/radio/Radio.js +14 -13
  262. package/web-dist/components/radio-group/RadioGroup.js +14 -13
  263. package/web-dist/components/rating/Rating.js +9 -8
  264. package/web-dist/components/reader/Reader.js +21 -20
  265. package/web-dist/components/scan-overlay/ScanOverlay.js +21 -20
  266. package/web-dist/components/screen/Screen.js +6 -5
  267. package/web-dist/components/screen-section/ScreenSection.js +10 -9
  268. package/web-dist/components/scroll-view/ScrollView.js +6 -5
  269. package/web-dist/components/search-input/SearchInput.js +15 -14
  270. package/web-dist/components/section-header/SectionHeader.js +10 -9
  271. package/web-dist/components/section-list/SectionList.js +13 -12
  272. package/web-dist/components/select/Select.js +16 -15
  273. package/web-dist/components/selectable-item/SelectableItem.js +4 -3
  274. package/web-dist/components/selection-provider/SelectionProvider.js +4 -3
  275. package/web-dist/components/sign-in-form/SignInForm.js +23 -22
  276. package/web-dist/components/sign-up-form/SignUpForm.js +23 -22
  277. package/web-dist/components/skeleton/Skeleton.js +23 -22
  278. package/web-dist/components/skeleton-card/SkeletonCard.js +23 -22
  279. package/web-dist/components/skeleton-list/SkeletonList.js +23 -22
  280. package/web-dist/components/skeleton-text/SkeletonText.js +23 -22
  281. package/web-dist/components/surface/Surface.js +7 -6
  282. package/web-dist/components/switch/Switch.js +7 -6
  283. package/web-dist/components/tab/Tab.js +7 -6
  284. package/web-dist/components/tab-list/TabList.js +7 -6
  285. package/web-dist/components/tab-panel/TabPanel.js +7 -6
  286. package/web-dist/components/tabletop-table/TabletopTable.js +5 -4
  287. package/web-dist/components/tabs/Tabs.js +7 -6
  288. package/web-dist/components/text/Text.js +7 -6
  289. package/web-dist/components/text-input/TextInput.js +15 -14
  290. package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +13 -12
  291. package/web-dist/components/time-picker/TimePicker.js +18 -17
  292. package/web-dist/components/timeline/Timeline.js +12 -11
  293. package/web-dist/components/toast/Toast.js +9 -8
  294. package/web-dist/components/toast-provider/ToastProvider.js +9 -8
  295. package/web-dist/components/toolbar/Toolbar.js +20 -19
  296. package/web-dist/components/tree-item/TreeItem.js +18 -17
  297. package/web-dist/components/uploader/Uploader.js +23 -22
  298. package/web-dist/components/view/View.js +6 -5
  299. package/web-dist/manifest.json +1787 -1617
  300. package/web-dist/runtime/ZoraProvider.js +12 -10
@@ -28,6 +28,7 @@ export declare const FEATURE_MANIFEST_ELEMENTS: {
28
28
  readonly icon: readonly ["Icon"];
29
29
  readonly image: readonly ["Image"];
30
30
  readonly 'keyboard-avoiding-view': readonly ["KeyboardAvoidingView"];
31
+ readonly 'master-detail': readonly ["MasterDetail"];
31
32
  readonly 'content-rail': readonly ["ContentRail"];
32
33
  readonly layout: readonly ["Divider", "Grid", "Screen", "ScrollView", "View"];
33
34
  readonly section: readonly ["ScreenSection", "SectionHeader"];
@@ -46,12 +47,12 @@ export declare const FEATURE_MANIFEST_ELEMENTS: {
46
47
  readonly game: readonly ["Game", "GameField", "GameEntity", "GameInputZone", "GameMeasurementProbe", "GameOverlay"];
47
48
  readonly tabletop: readonly ["TabletopTable", "PokerTrainingTable"];
48
49
  };
49
- export declare const CONTAINER_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
50
+ export declare const CONTAINER_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
50
51
  export declare const GAME_ALLOWED_CHILDREN: readonly ["Game", "GameField"];
51
52
  export declare const CHESS_ALLOWED_CHILDREN: readonly ["ChessBoard", "OpeningBook"];
52
53
  export declare const TABLETOP_ALLOWED_CHILDREN: readonly ["TabletopTable", "PokerTrainingTable"];
53
54
  export declare const CONTENT_RAIL_ALLOWED_CHILDREN: readonly ["Chip", "ChipGroup", "MediaCard", "MetricCard", "Avatar", "AvatarGroup", "Badge", "Button", "IconButton", "View", "ScrollView", "Card", "Image", "ProductCard", "PostCard", "ChatListItem", "MessageBubble", "MissingElement"];
54
- export declare const SCREEN_SECTION_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
55
- export declare const SCREEN_ALLOWED_CHILDREN: readonly ["ScreenSection", "ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
55
+ export declare const SCREEN_SECTION_ALLOWED_CHILDREN: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
56
+ export declare const SCREEN_ALLOWED_CHILDREN: readonly ["ScreenSection", "ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
56
57
  export declare const ZORA_THEME_TOKEN_FAMILIES: readonly ["colors", "spacing", "radii", "typography", "shadows"];
57
58
  //# sourceMappingURL=authoring.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../../src/constants/authoring.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;CAKzB,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C5B,CAAC;AAEX,eAAO,MAAM,0BAA0B,i4BAmE7B,CAAC;AAEX,eAAO,MAAM,qBAAqB,gCAAiC,CAAC;AAEpE,eAAO,MAAM,sBAAsB,wCAAyC,CAAC;AAC7E,eAAO,MAAM,yBAAyB,kDAAmD,CAAC;AAE1F,eAAO,MAAM,6BAA6B,0OAmBhC,CAAC;AAEX,eAAO,MAAM,+BAA+B,09BAKlC,CAAC;AAEX,eAAO,MAAM,uBAAuB,2+BAG1B,CAAC;AAEX,eAAO,MAAM,yBAAyB,kEAM5B,CAAC"}
1
+ {"version":3,"file":"authoring.d.ts","sourceRoot":"","sources":["../../src/constants/authoring.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;CAKzB,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C5B,CAAC;AAEX,eAAO,MAAM,0BAA0B,i5BAoE7B,CAAC;AAEX,eAAO,MAAM,qBAAqB,gCAAiC,CAAC;AAEpE,eAAO,MAAM,sBAAsB,wCAAyC,CAAC;AAC7E,eAAO,MAAM,yBAAyB,kDAAmD,CAAC;AAE1F,eAAO,MAAM,6BAA6B,0OAmBhC,CAAC;AAEX,eAAO,MAAM,+BAA+B,0+BAKlC,CAAC;AAEX,eAAO,MAAM,uBAAuB,2/BAG1B,CAAC;AAEX,eAAO,MAAM,yBAAyB,kEAM5B,CAAC"}
@@ -34,6 +34,7 @@ export const FEATURE_MANIFEST_ELEMENTS = {
34
34
  icon: ['Icon'],
35
35
  image: ['Image'],
36
36
  'keyboard-avoiding-view': ['KeyboardAvoidingView'],
37
+ 'master-detail': ['MasterDetail'],
37
38
  'content-rail': ['ContentRail'],
38
39
  layout: ['Divider', 'Grid', 'Screen', 'ScrollView', 'View'],
39
40
  section: ['ScreenSection', 'SectionHeader'],
@@ -101,6 +102,7 @@ export const CONTAINER_ALLOWED_CHILDREN = [
101
102
  'Image',
102
103
  'Hero',
103
104
  'KeyboardAvoidingView',
105
+ 'MasterDetail',
104
106
  'Button',
105
107
  'ButtonGroup',
106
108
  'RadioGroup',
@@ -1 +1 @@
1
- {"version":3,"file":"authoring.js","sourceRoot":"","sources":["../../src/constants/authoring.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,WAAW;IAClB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,iEAAiE;IACxE,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;CAC5B,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE;QACJ,YAAY;QACZ,oBAAoB;QACpB,qBAAqB;QACrB,mBAAmB;QACnB,SAAS;QACT,YAAY;QACZ,YAAY;KACb;IACD,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,CAAC;IACpE,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;IAC3B,YAAY,EAAE,CAAC,WAAW,CAAC;IAC3B,aAAa,EAAE,CAAC,YAAY,CAAC;IAC7B,QAAQ,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC;IAC3C,MAAM,EAAE,CAAC,QAAQ,CAAC;IAClB,IAAI,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,+BAA+B,GAAG;IAC7C,GAAG,0BAA0B;IAC7B,GAAG,sBAAsB;IACzB,GAAG,qBAAqB;IACxB,GAAG,yBAAyB;CACpB,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,eAAe;IACf,GAAG,+BAA+B;CAC1B,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,QAAQ;IACR,SAAS;IACT,OAAO;IACP,YAAY;IACZ,SAAS;CACD,CAAC","sourcesContent":["export const COMPONENT_THEME_AUTHORING = {\n authority: 'theme',\n scope: 'component',\n allowInstanceOverride: true,\n} as const;\n\nexport const INVERTED_POLARITY_PROP = {\n type: 'boolean',\n category: 'Theme',\n label: 'Inverted surface polarity (inherits when omitted; false resets)',\n authoring: { authority: 'instance' },\n} as const;\n\nexport const FEATURE_MANIFEST_ELEMENTS = {\n auth: [\n 'AuthScreen',\n 'ForgotPasswordForm',\n 'OAuthProviderButton',\n 'OAuthProviderList',\n 'OtpForm',\n 'SignInForm',\n 'SignUpForm',\n ],\n surface: ['Surface'],\n avatar: ['Avatar', 'AvatarGroup'],\n badge: ['Badge'],\n card: ['Card', 'MediaCard', 'MetricCard', 'PostCard', 'ProductCard'],\n chip: ['Chip', 'ChipGroup'],\n 'data-table': ['DataTable'],\n 'date-picker': ['DatePicker'],\n explorer: ['MediaExplorer', 'FileExplorer'],\n dialog: ['Dialog'],\n form: ['Form', 'FormError', 'Field'],\n gradient: ['Gradient'],\n button: ['Button', 'IconButton', 'ButtonGroup'],\n icon: ['Icon'],\n image: ['Image'],\n 'keyboard-avoiding-view': ['KeyboardAvoidingView'],\n 'content-rail': ['ContentRail'],\n layout: ['Divider', 'Grid', 'Screen', 'ScrollView', 'View'],\n section: ['ScreenSection', 'SectionHeader'],\n list: ['FlatList', 'SectionList'],\n pagination: ['Pagination'],\n rating: ['Rating'],\n skeleton: ['Skeleton', 'SkeletonCard', 'SkeletonList', 'SkeletonText'],\n tabs: ['Tabs', 'TabList', 'Tab', 'TabPanel'],\n toolbar: ['Toolbar'],\n typography: ['Heading', 'Text'],\n 'time-picker': ['TimePicker'],\n timeline: ['Timeline'],\n uploader: ['Uploader'],\n 'bottom-sheet': ['BottomSheet'],\n chess: ['ChessBoard', 'OpeningBook'],\n game: ['Game', 'GameField', 'GameEntity', 'GameInputZone', 'GameMeasurementProbe', 'GameOverlay'],\n tabletop: ['TabletopTable', 'PokerTrainingTable'],\n} as const;\n\nexport const CONTAINER_ALLOWED_CHILDREN = [\n 'ActivityIndicator',\n 'AuthScreen',\n 'ForgotPasswordForm',\n 'OAuthProviderButton',\n 'OAuthProviderList',\n 'OtpForm',\n 'SignInForm',\n 'SignUpForm',\n 'Accordion',\n 'Surface',\n 'Avatar',\n 'AvatarGroup',\n 'Badge',\n 'MediaCard',\n 'MetricCard',\n 'Chip',\n 'ChipGroup',\n 'DataTable',\n 'DatePicker',\n 'Dialog',\n 'Pagination',\n 'Rating',\n 'SearchInput',\n 'Tabs',\n 'Toolbar',\n 'Skeleton',\n 'SkeletonCard',\n 'SkeletonList',\n 'SkeletonText',\n 'IconButton',\n 'Uploader',\n 'MediaExplorer',\n 'FileExplorer',\n 'FlatList',\n 'SectionList',\n 'BottomSheet',\n 'ProductCard',\n 'View',\n 'ScrollView',\n 'Grid',\n 'Gradient',\n 'Divider',\n 'Text',\n 'Heading',\n 'Icon',\n 'Image',\n 'Hero',\n 'KeyboardAvoidingView',\n 'Button',\n 'ButtonGroup',\n 'RadioGroup',\n 'ThemeModeToggle',\n 'TextInput',\n 'TimePicker',\n 'Timeline',\n 'Form',\n 'Card',\n 'EmptyState',\n 'SectionHeader',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'ProgressRing',\n 'Reader',\n 'ContentRail',\n 'MissingElement',\n] as const;\n\nexport const GAME_ALLOWED_CHILDREN = ['Game', 'GameField'] as const;\n\nexport const CHESS_ALLOWED_CHILDREN = ['ChessBoard', 'OpeningBook'] as const;\nexport const TABLETOP_ALLOWED_CHILDREN = ['TabletopTable', 'PokerTrainingTable'] as const;\n\nexport const CONTENT_RAIL_ALLOWED_CHILDREN = [\n 'Chip',\n 'ChipGroup',\n 'MediaCard',\n 'MetricCard',\n 'Avatar',\n 'AvatarGroup',\n 'Badge',\n 'Button',\n 'IconButton',\n 'View',\n 'ScrollView',\n 'Card',\n 'Image',\n 'ProductCard',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'MissingElement',\n] as const;\n\nexport const SCREEN_SECTION_ALLOWED_CHILDREN = [\n ...CONTAINER_ALLOWED_CHILDREN,\n ...CHESS_ALLOWED_CHILDREN,\n ...GAME_ALLOWED_CHILDREN,\n ...TABLETOP_ALLOWED_CHILDREN,\n] as const;\n\nexport const SCREEN_ALLOWED_CHILDREN = [\n 'ScreenSection',\n ...SCREEN_SECTION_ALLOWED_CHILDREN,\n] as const;\n\nexport const ZORA_THEME_TOKEN_FAMILIES = [\n 'colors',\n 'spacing',\n 'radii',\n 'typography',\n 'shadows',\n] as const;\n"]}
1
+ {"version":3,"file":"authoring.js","sourceRoot":"","sources":["../../src/constants/authoring.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,WAAW;IAClB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,iEAAiE;IACxE,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;CAC5B,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE;QACJ,YAAY;QACZ,oBAAoB;QACpB,qBAAqB;QACrB,mBAAmB;QACnB,SAAS;QACT,YAAY;QACZ,YAAY;KACb;IACD,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;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AC,YAAY,EAAE,aAAa,CAAU,CAAC;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,eAAe,EAAE,oBAAoB,CAAU,CAAC;AAE1F,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,MAAM;IACN,WAAW;IACX,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,MAAM;IACN,YAAY;IACZ,MAAM;IACN,OAAO;IACP,aAAa;IACb,UAAU;IACV,cAAc;IACd,eAAe;IACf,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,GAAG,0BAA0B;IAC7B,GAAG,sBAAsB;IACzB,GAAG,qBAAqB;IACxB,GAAG,yBAAyB;CACpB,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,eAAe;IACf,GAAG,+BAA+B;CAC1B,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,QAAQ;IACR,SAAS;IACT,OAAO;IACP,YAAY;IACZ,SAAS;CACD,CAAC","sourcesContent":["export const COMPONENT_THEME_AUTHORING = {\n authority: 'theme',\n scope: 'component',\n allowInstanceOverride: true,\n} as const;\n\nexport const INVERTED_POLARITY_PROP = {\n type: 'boolean',\n category: 'Theme',\n label: 'Inverted surface polarity (inherits when omitted; false resets)',\n authoring: { authority: 'instance' },\n} as const;\n\nexport const FEATURE_MANIFEST_ELEMENTS = {\n auth: [\n 'AuthScreen',\n 'ForgotPasswordForm',\n 'OAuthProviderButton',\n 'OAuthProviderList',\n 'OtpForm',\n 'SignInForm',\n 'SignUpForm',\n ],\n surface: ['Surface'],\n avatar: ['Avatar', 'AvatarGroup'],\n badge: ['Badge'],\n card: ['Card', 'MediaCard', 'MetricCard', 'PostCard', 'ProductCard'],\n chip: ['Chip', 'ChipGroup'],\n 'data-table': ['DataTable'],\n 'date-picker': ['DatePicker'],\n explorer: ['MediaExplorer', 'FileExplorer'],\n dialog: ['Dialog'],\n form: ['Form', 'FormError', 'Field'],\n gradient: ['Gradient'],\n button: ['Button', 'IconButton', 'ButtonGroup'],\n icon: ['Icon'],\n image: ['Image'],\n 'keyboard-avoiding-view': ['KeyboardAvoidingView'],\n 'master-detail': ['MasterDetail'],\n 'content-rail': ['ContentRail'],\n layout: ['Divider', 'Grid', 'Screen', 'ScrollView', 'View'],\n section: ['ScreenSection', 'SectionHeader'],\n list: ['FlatList', 'SectionList'],\n pagination: ['Pagination'],\n rating: ['Rating'],\n skeleton: ['Skeleton', 'SkeletonCard', 'SkeletonList', 'SkeletonText'],\n tabs: ['Tabs', 'TabList', 'Tab', 'TabPanel'],\n toolbar: ['Toolbar'],\n typography: ['Heading', 'Text'],\n 'time-picker': ['TimePicker'],\n timeline: ['Timeline'],\n uploader: ['Uploader'],\n 'bottom-sheet': ['BottomSheet'],\n chess: ['ChessBoard', 'OpeningBook'],\n game: ['Game', 'GameField', 'GameEntity', 'GameInputZone', 'GameMeasurementProbe', 'GameOverlay'],\n tabletop: ['TabletopTable', 'PokerTrainingTable'],\n} as const;\n\nexport const CONTAINER_ALLOWED_CHILDREN = [\n 'ActivityIndicator',\n 'AuthScreen',\n 'ForgotPasswordForm',\n 'OAuthProviderButton',\n 'OAuthProviderList',\n 'OtpForm',\n 'SignInForm',\n 'SignUpForm',\n 'Accordion',\n 'Surface',\n 'Avatar',\n 'AvatarGroup',\n 'Badge',\n 'MediaCard',\n 'MetricCard',\n 'Chip',\n 'ChipGroup',\n 'DataTable',\n 'DatePicker',\n 'Dialog',\n 'Pagination',\n 'Rating',\n 'SearchInput',\n 'Tabs',\n 'Toolbar',\n 'Skeleton',\n 'SkeletonCard',\n 'SkeletonList',\n 'SkeletonText',\n 'IconButton',\n 'Uploader',\n 'MediaExplorer',\n 'FileExplorer',\n 'FlatList',\n 'SectionList',\n 'BottomSheet',\n 'ProductCard',\n 'View',\n 'ScrollView',\n 'Grid',\n 'Gradient',\n 'Divider',\n 'Text',\n 'Heading',\n 'Icon',\n 'Image',\n 'Hero',\n 'KeyboardAvoidingView',\n 'MasterDetail',\n 'Button',\n 'ButtonGroup',\n 'RadioGroup',\n 'ThemeModeToggle',\n 'TextInput',\n 'TimePicker',\n 'Timeline',\n 'Form',\n 'Card',\n 'EmptyState',\n 'SectionHeader',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'ProgressRing',\n 'Reader',\n 'ContentRail',\n 'MissingElement',\n] as const;\n\nexport const GAME_ALLOWED_CHILDREN = ['Game', 'GameField'] as const;\n\nexport const CHESS_ALLOWED_CHILDREN = ['ChessBoard', 'OpeningBook'] as const;\nexport const TABLETOP_ALLOWED_CHILDREN = ['TabletopTable', 'PokerTrainingTable'] as const;\n\nexport const CONTENT_RAIL_ALLOWED_CHILDREN = [\n 'Chip',\n 'ChipGroup',\n 'MediaCard',\n 'MetricCard',\n 'Avatar',\n 'AvatarGroup',\n 'Badge',\n 'Button',\n 'IconButton',\n 'View',\n 'ScrollView',\n 'Card',\n 'Image',\n 'ProductCard',\n 'PostCard',\n 'ChatListItem',\n 'MessageBubble',\n 'MissingElement',\n] as const;\n\nexport const SCREEN_SECTION_ALLOWED_CHILDREN = [\n ...CONTAINER_ALLOWED_CHILDREN,\n ...CHESS_ALLOWED_CHILDREN,\n ...GAME_ALLOWED_CHILDREN,\n ...TABLETOP_ALLOWED_CHILDREN,\n] as const;\n\nexport const SCREEN_ALLOWED_CHILDREN = [\n 'ScreenSection',\n ...SCREEN_SECTION_ALLOWED_CHILDREN,\n] as const;\n\nexport const ZORA_THEME_TOKEN_FAMILIES = [\n 'colors',\n 'spacing',\n 'radii',\n 'typography',\n 'shadows',\n] as const;\n"]}
@@ -3,7 +3,7 @@ export declare const accordionItemMeta: {
3
3
  readonly category: "component";
4
4
  readonly description: "One expandable accordion item with authored content and optional actions.";
5
5
  readonly directManifestNode: true;
6
- readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
6
+ readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
7
7
  readonly blueprint: {
8
8
  readonly label: "Accordion item";
9
9
  readonly defaultProps: {
@@ -2,7 +2,7 @@ export declare const bottomSheetMeta: {
2
2
  readonly name: "BottomSheet";
3
3
  readonly category: "layout";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
6
6
  readonly description: "Controlled presentation through the shared single-sheet host. Bind dismiss to clear open.";
7
7
  readonly events: {
8
8
  readonly dismiss: {
@@ -2,7 +2,7 @@ export declare const cardMeta: {
2
2
  readonly name: "Card";
3
3
  readonly category: "component";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement", "ChessBoard", "OpeningBook", "Game", "GameField", "TabletopTable", "PokerTrainingTable"];
6
6
  readonly blueprint: {
7
7
  readonly label: "Card";
8
8
  readonly defaultProps: {
@@ -2,7 +2,7 @@ export declare const mediaCardMeta: {
2
2
  readonly name: "MediaCard";
3
3
  readonly category: "component";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
6
6
  readonly events: {
7
7
  readonly press: {
8
8
  readonly label: "Press";
@@ -3,7 +3,7 @@ export declare const postCardMeta: {
3
3
  readonly category: "pattern";
4
4
  readonly description: "Social/content post card with author identity, body, media, actions, and comment previews.";
5
5
  readonly directManifestNode: true;
6
- readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
6
+ readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "MasterDetail", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Timeline", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
7
7
  readonly blueprint: {
8
8
  readonly label: "Post card";
9
9
  readonly icon: {
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { CarouselProps } from '../../types/carousel';
3
+ /***
4
+ * Present images, arbitrary React content, or both as a cross-platform slideshow.
5
+ * A published web artifact exposes the same API without consumer source imports.
6
+ */
7
+ export declare function Carousel({ slides, index, defaultIndex, onIndexChange, autoPlay, paused, loop, intervalMs, transition, enterDurationMs, exitDurationMs, initialScale, animateOnMount, reducedMotion, showProgress, progressHeight, progressTrackColor, progressIndicatorColor, progressTrackStyle, progressIndicatorStyle, showArrows, showIndicators, previousLabel, nextLabel, controlColor, controlBackgroundColor, controlsStyle, activeIndicatorColor, inactiveIndicatorColor, indicatorsStyle, resizeMode, imageStyle, style, renderImage, testID, }: CarouselProps): React.JSX.Element | null;
8
+ //# sourceMappingURL=Carousel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/features/carousel/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAqC,MAAM,sBAAsB,CAAC;AAI7F;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,UAAU,EACV,UAAmB,EACnB,eAAsB,EACtB,cAAoB,EACpB,YAAmB,EACnB,cAAsB,EACtB,aAAa,EACb,YAAmB,EACnB,cAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,UAAkB,EAClB,cAAsB,EACtB,aAAgC,EAChC,SAAwB,EACxB,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,UAAoB,EACpB,UAAU,EACV,KAAK,EACL,WAAW,EACX,MAAM,GACP,EAAE,aAAa,4BA6Ff"}
@@ -0,0 +1,203 @@
1
+ import React from 'react';
2
+ import { Animated, Easing, Image, Pressable, StyleSheet, Text, View } from 'react-native';
3
+ import { useZoraTheme } from '../theme/composition/useZoraTheme';
4
+ import { useCarouselPlayback } from './useCarouselPlayback';
5
+ /***
6
+ * Present images, arbitrary React content, or both as a cross-platform slideshow.
7
+ * A published web artifact exposes the same API without consumer source imports.
8
+ */
9
+ export function Carousel({ slides, index, defaultIndex, onIndexChange, autoPlay, paused, loop, intervalMs, transition = 'fade', enterDurationMs = 1200, exitDurationMs = 800, initialScale = 1.06, animateOnMount = false, reducedMotion, showProgress = true, progressHeight = 4, progressTrackColor, progressIndicatorColor, progressTrackStyle, progressIndicatorStyle, showArrows = false, showIndicators = false, previousLabel = 'Previous slide', nextLabel = 'Next slide', controlColor, controlBackgroundColor, controlsStyle, activeIndicatorColor, inactiveIndicatorColor, indicatorsStyle, resizeMode = 'cover', imageStyle, style, renderImage, testID, }) {
10
+ const { theme } = useZoraTheme();
11
+ const [width, setWidth] = React.useState(0);
12
+ const { activeIndex, controlledWithoutHandler, direction, loop: enabledLoop, navigate, progress, shouldReduceMotion, } = useCarouselPlayback({
13
+ slides,
14
+ index,
15
+ defaultIndex,
16
+ onIndexChange,
17
+ autoPlay,
18
+ paused,
19
+ loop,
20
+ intervalMs,
21
+ reducedMotion,
22
+ });
23
+ if (slides.length === 0)
24
+ return null;
25
+ const canPrevious = enabledLoop || activeIndex > 0;
26
+ const canNext = enabledLoop || activeIndex < slides.length - 1;
27
+ const markerColor = activeIndicatorColor ?? theme.colors.primary;
28
+ const idleMarkerColor = inactiveIndicatorColor ?? theme.semantics.neutral.divider;
29
+ return (<View onLayout={(event) => setWidth(event.nativeEvent.layout.width)} testID={testID} style={[{ position: 'relative', overflow: 'hidden', width: '100%', height: '100%' }, style]}>
30
+ {slides.map((slide, slideIndex) => (<CarouselLayer key={slide.key} active={activeIndex === slideIndex} animate={slides.length > 1} animateOnMount={animateOnMount} direction={direction} enterDurationMs={enterDurationMs} exitDurationMs={exitDurationMs} imageStyle={imageStyle} initialScale={initialScale} reducedMotion={shouldReduceMotion} renderImage={renderImage} resizeMode={resizeMode} slide={slide} slideIndex={slideIndex} transition={transition} width={width}/>))}
31
+ <CarouselControls activeIndex={activeIndex} canNext={canNext} canPrevious={canPrevious} controlBackgroundColor={controlBackgroundColor ?? theme.semantics.surface.raised} controlColor={controlColor ?? theme.semantics.content.default} controlledWithoutHandler={controlledWithoutHandler} controlsStyle={controlsStyle} navigate={navigate} nextLabel={nextLabel} previousLabel={previousLabel} show={showArrows && slides.length > 1} testID={testID}/>
32
+ <CarouselIndicators activeIndex={activeIndex} activeColor={markerColor} controlledWithoutHandler={controlledWithoutHandler} idleColor={idleMarkerColor} indicatorsStyle={indicatorsStyle} navigate={navigate} show={showIndicators && slides.length > 1} slides={slides} testID={testID}/>
33
+ <CarouselProgress height={progressHeight} indicatorColor={progressIndicatorColor ?? theme.colors.primary} indicatorStyle={progressIndicatorStyle} progress={progress} show={showProgress && slides.length > 1} testID={testID} trackColor={progressTrackColor ?? theme.semantics.neutral.divider} trackStyle={progressTrackStyle}/>
34
+ </View>);
35
+ }
36
+ /*** Keep departing slides mounted for an animated overlap without unmounting content. */
37
+ function CarouselLayer({ slide, slideIndex, active, animate, animateOnMount, direction, enterDurationMs = 1200, exitDurationMs = 800, initialScale = 1.06, reducedMotion, renderImage, resizeMode, imageStyle, transition, width, }) {
38
+ const [opacity] = React.useState(() => new Animated.Value(active && !animateOnMount ? 1 : 0));
39
+ const [scale] = React.useState(() => new Animated.Value(active && animateOnMount ? initialScale : 1));
40
+ const [offset] = React.useState(() => new Animated.Value(0));
41
+ const hasMounted = React.useRef(false);
42
+ React.useEffect(() => {
43
+ const firstRender = !hasMounted.current;
44
+ hasMounted.current = true;
45
+ if (firstRender && !animateOnMount)
46
+ return;
47
+ opacity.stopAnimation();
48
+ scale.stopAnimation();
49
+ offset.stopAnimation();
50
+ if (!animate || reducedMotion || transition === 'none') {
51
+ opacity.setValue(active ? 1 : 0);
52
+ scale.setValue(1);
53
+ offset.setValue(0);
54
+ return;
55
+ }
56
+ if (transition === 'slide') {
57
+ scale.setValue(1);
58
+ if (active) {
59
+ offset.setValue(direction * width);
60
+ opacity.setValue(1);
61
+ }
62
+ Animated.parallel([
63
+ Animated.timing(offset, {
64
+ toValue: active ? 0 : -direction * width,
65
+ duration: Math.max(0, active ? enterDurationMs : exitDurationMs),
66
+ easing: Easing.bezier(0.4, 0, 0.2, 1),
67
+ useNativeDriver: true,
68
+ }),
69
+ Animated.timing(opacity, {
70
+ toValue: active ? 1 : 0,
71
+ duration: Math.max(0, active ? enterDurationMs : exitDurationMs),
72
+ easing: Easing.linear,
73
+ useNativeDriver: true,
74
+ }),
75
+ ]).start();
76
+ }
77
+ else if (active) {
78
+ opacity.setValue(0);
79
+ scale.setValue(initialScale);
80
+ Animated.parallel([
81
+ Animated.timing(opacity, {
82
+ toValue: 1,
83
+ duration: Math.max(0, enterDurationMs),
84
+ easing: Easing.bezier(0.4, 0, 0.2, 1),
85
+ useNativeDriver: true,
86
+ }),
87
+ Animated.timing(scale, {
88
+ toValue: 1,
89
+ duration: Math.max(0, enterDurationMs),
90
+ easing: Easing.bezier(0.4, 0, 0.2, 1),
91
+ useNativeDriver: true,
92
+ }),
93
+ ]).start();
94
+ }
95
+ else {
96
+ Animated.timing(opacity, {
97
+ toValue: 0,
98
+ duration: Math.max(0, exitDurationMs),
99
+ easing: Easing.bezier(0.4, 0, 0.2, 1),
100
+ useNativeDriver: true,
101
+ }).start();
102
+ }
103
+ return () => {
104
+ opacity.stopAnimation();
105
+ scale.stopAnimation();
106
+ offset.stopAnimation();
107
+ };
108
+ }, [
109
+ active,
110
+ animate,
111
+ animateOnMount,
112
+ direction,
113
+ enterDurationMs,
114
+ exitDurationMs,
115
+ initialScale,
116
+ offset,
117
+ opacity,
118
+ reducedMotion,
119
+ scale,
120
+ transition,
121
+ width,
122
+ ]);
123
+ return (<Animated.View accessibilityElementsHidden={!active} importantForAccessibility={active ? 'auto' : 'no-hide-descendants'} pointerEvents={active ? 'auto' : 'none'} style={[StyleSheet.absoluteFill, { opacity, transform: [{ scale }, { translateX: offset }] }]}>
124
+ {slide.source !== undefined ? (renderImage ? (renderImage(slide, slideIndex)) : (<Image accessibilityLabel={slide.alt} accessible={Boolean(slide.alt)} resizeMode={resizeMode} source={typeof slide.source === 'string' ? { uri: slide.source } : slide.source} style={[StyleSheet.absoluteFill, imageStyle]}/>)) : null}
125
+ {slide.content}
126
+ </Animated.View>);
127
+ }
128
+ /*** Render optional previous/next buttons without coupling the slide content to navigation. */
129
+ function CarouselControls({ activeIndex, canNext, canPrevious, controlBackgroundColor, controlColor, controlledWithoutHandler, controlsStyle, navigate, nextLabel, previousLabel, show, testID, }) {
130
+ if (!show)
131
+ return null;
132
+ const buttonStyle = [styles.control, { backgroundColor: controlBackgroundColor }];
133
+ const labelStyle = { color: controlColor, fontSize: 30 };
134
+ return (<View pointerEvents="box-none" style={[styles.controls, controlsStyle]}>
135
+ <Pressable accessibilityLabel={previousLabel} accessibilityRole="button" disabled={!canPrevious || controlledWithoutHandler} onPress={() => navigate(activeIndex - 1, -1)} style={buttonStyle} testID={testID ? `${testID}-previous` : undefined}>
136
+ <Text style={labelStyle}>{'‹'}</Text>
137
+ </Pressable>
138
+ <Pressable accessibilityLabel={nextLabel} accessibilityRole="button" disabled={!canNext || controlledWithoutHandler} onPress={() => navigate(activeIndex + 1, 1)} style={buttonStyle} testID={testID ? `${testID}-next` : undefined}>
139
+ <Text style={labelStyle}>{'›'}</Text>
140
+ </Pressable>
141
+ </View>);
142
+ }
143
+ /*** Render accessible selection dots for the currently controlled slide. */
144
+ function CarouselIndicators({ activeIndex, activeColor, controlledWithoutHandler, idleColor, indicatorsStyle, navigate, show, slides, testID, }) {
145
+ if (!show)
146
+ return null;
147
+ return (<View pointerEvents="box-none" style={[styles.indicators, indicatorsStyle]}>
148
+ {slides.map((slide, slideIndex) => (<Pressable key={slide.key} accessibilityLabel={`Go to slide ${slideIndex + 1} of ${slides.length}`} accessibilityRole="button" accessibilityState={{ selected: slideIndex === activeIndex }} disabled={controlledWithoutHandler} onPress={() => navigate(slideIndex, slideIndex < activeIndex ? -1 : 1)} style={[
149
+ styles.indicator,
150
+ {
151
+ backgroundColor: slideIndex === activeIndex ? activeColor : idleColor,
152
+ width: slideIndex === activeIndex ? 24 : 8,
153
+ },
154
+ ]} testID={testID ? `${testID}-indicator-${slideIndex}` : undefined}/>))}
155
+ </View>);
156
+ }
157
+ /*** Render an optional linear autoplay timer without adding any required UI to slides. */
158
+ function CarouselProgress({ height, indicatorColor, indicatorStyle, progress, show, testID, trackColor, trackStyle, }) {
159
+ if (!show)
160
+ return null;
161
+ return (<View pointerEvents="none" style={[styles.progress, { height, backgroundColor: trackColor }, trackStyle]} testID={testID ? `${testID}-progress` : undefined}>
162
+ <Animated.View style={[
163
+ {
164
+ height: '100%',
165
+ width: progress.interpolate({ inputRange: [0, 1], outputRange: ['0%', '100%'] }),
166
+ backgroundColor: indicatorColor,
167
+ },
168
+ indicatorStyle,
169
+ ]}/>
170
+ </View>);
171
+ }
172
+ const styles = StyleSheet.create({
173
+ controls: {
174
+ position: 'absolute',
175
+ top: 0,
176
+ bottom: 0,
177
+ left: 14,
178
+ right: 14,
179
+ flexDirection: 'row',
180
+ justifyContent: 'space-between',
181
+ alignItems: 'center',
182
+ },
183
+ control: {
184
+ width: 44,
185
+ height: 44,
186
+ borderRadius: 22,
187
+ justifyContent: 'center',
188
+ alignItems: 'center',
189
+ },
190
+ indicators: {
191
+ position: 'absolute',
192
+ bottom: 24,
193
+ left: 0,
194
+ right: 0,
195
+ flexDirection: 'row',
196
+ gap: 10,
197
+ justifyContent: 'center',
198
+ alignItems: 'center',
199
+ },
200
+ indicator: { height: 8, borderRadius: 8 },
201
+ progress: { position: 'absolute', bottom: 0, left: 0, right: 0, overflow: 'hidden' },
202
+ });
203
+ //# sourceMappingURL=Carousel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/features/carousel/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAG1F,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,MAAM,EACN,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,UAAU,EACV,UAAU,GAAG,MAAM,EACnB,eAAe,GAAG,IAAI,EACtB,cAAc,GAAG,GAAG,EACpB,YAAY,GAAG,IAAI,EACnB,cAAc,GAAG,KAAK,EACtB,aAAa,EACb,YAAY,GAAG,IAAI,EACnB,cAAc,GAAG,CAAC,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,GAAG,KAAK,EAClB,cAAc,GAAG,KAAK,EACtB,aAAa,GAAG,gBAAgB,EAChC,SAAS,GAAG,YAAY,EACxB,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,UAAU,GAAG,OAAO,EACpB,UAAU,EACV,KAAK,EACL,WAA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rB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,EAAE;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE;IACzC,QAAQ,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE;CACrF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Animated, Easing, Image, Pressable, StyleSheet, Text, View } from 'react-native';\n\nimport type { CarouselProps, CarouselSlide, CarouselTransition } from '../../types/carousel';\nimport { useZoraTheme } from '../theme/composition/useZoraTheme';\nimport { useCarouselPlayback } from './useCarouselPlayback';\n\n/***\n * Present images, arbitrary React content, or both as a cross-platform slideshow.\n * A published web artifact exposes the same API without consumer source imports.\n */\nexport function Carousel({\n slides,\n index,\n defaultIndex,\n onIndexChange,\n autoPlay,\n paused,\n loop,\n intervalMs,\n transition = 'fade',\n enterDurationMs = 1200,\n exitDurationMs = 800,\n initialScale = 1.06,\n animateOnMount = false,\n reducedMotion,\n showProgress = true,\n progressHeight = 4,\n progressTrackColor,\n progressIndicatorColor,\n progressTrackStyle,\n progressIndicatorStyle,\n showArrows = false,\n showIndicators = false,\n previousLabel = 'Previous slide',\n nextLabel = 'Next slide',\n controlColor,\n controlBackgroundColor,\n controlsStyle,\n activeIndicatorColor,\n inactiveIndicatorColor,\n indicatorsStyle,\n resizeMode = 'cover',\n imageStyle,\n style,\n renderImage,\n testID,\n}: CarouselProps) {\n const { theme } = useZoraTheme();\n const [width, setWidth] = React.useState(0);\n const {\n activeIndex,\n controlledWithoutHandler,\n direction,\n loop: enabledLoop,\n navigate,\n progress,\n shouldReduceMotion,\n } = useCarouselPlayback({\n slides,\n index,\n defaultIndex,\n onIndexChange,\n autoPlay,\n paused,\n loop,\n intervalMs,\n reducedMotion,\n });\n\n if (slides.length === 0) return null;\n\n const canPrevious = enabledLoop || activeIndex > 0;\n const canNext = enabledLoop || activeIndex < slides.length - 1;\n const markerColor = activeIndicatorColor ?? theme.colors.primary;\n const idleMarkerColor = inactiveIndicatorColor ?? theme.semantics.neutral.divider;\n\n return (\n <View\n onLayout={(event) => setWidth(event.nativeEvent.layout.width)}\n testID={testID}\n style={[{ position: 'relative', overflow: 'hidden', width: '100%', height: '100%' }, style]}\n >\n {slides.map((slide, slideIndex) => (\n <CarouselLayer\n key={slide.key}\n active={activeIndex === slideIndex}\n animate={slides.length > 1}\n animateOnMount={animateOnMount}\n direction={direction}\n enterDurationMs={enterDurationMs}\n exitDurationMs={exitDurationMs}\n imageStyle={imageStyle}\n initialScale={initialScale}\n reducedMotion={shouldReduceMotion}\n renderImage={renderImage}\n resizeMode={resizeMode}\n slide={slide}\n slideIndex={slideIndex}\n transition={transition}\n width={width}\n />\n ))}\n <CarouselControls\n activeIndex={activeIndex}\n canNext={canNext}\n canPrevious={canPrevious}\n controlBackgroundColor={controlBackgroundColor ?? theme.semantics.surface.raised}\n controlColor={controlColor ?? theme.semantics.content.default}\n controlledWithoutHandler={controlledWithoutHandler}\n controlsStyle={controlsStyle}\n navigate={navigate}\n nextLabel={nextLabel}\n previousLabel={previousLabel}\n show={showArrows && slides.length > 1}\n testID={testID}\n />\n <CarouselIndicators\n activeIndex={activeIndex}\n activeColor={markerColor}\n controlledWithoutHandler={controlledWithoutHandler}\n idleColor={idleMarkerColor}\n indicatorsStyle={indicatorsStyle}\n navigate={navigate}\n show={showIndicators && slides.length > 1}\n slides={slides}\n testID={testID}\n />\n <CarouselProgress\n height={progressHeight}\n indicatorColor={progressIndicatorColor ?? theme.colors.primary}\n indicatorStyle={progressIndicatorStyle}\n progress={progress}\n show={showProgress && slides.length > 1}\n testID={testID}\n trackColor={progressTrackColor ?? theme.semantics.neutral.divider}\n trackStyle={progressTrackStyle}\n />\n </View>\n );\n}\n\ninterface CarouselLayerProps {\n readonly enterDurationMs?: CarouselProps['enterDurationMs'];\n readonly exitDurationMs?: CarouselProps['exitDurationMs'];\n readonly imageStyle: CarouselProps['imageStyle'];\n readonly initialScale?: CarouselProps['initialScale'];\n readonly renderImage: CarouselProps['renderImage'];\n readonly resizeMode: CarouselProps['resizeMode'];\n readonly slide: CarouselSlide;\n readonly slideIndex: number;\n readonly active: boolean;\n readonly animate: boolean;\n readonly animateOnMount: boolean;\n readonly direction: 1 | -1;\n readonly width: number;\n readonly transition: CarouselTransition;\n readonly reducedMotion: boolean;\n}\n\n/*** Keep departing slides mounted for an animated overlap without unmounting content. */\nfunction CarouselLayer({\n slide,\n slideIndex,\n active,\n animate,\n animateOnMount,\n direction,\n enterDurationMs = 1200,\n exitDurationMs = 800,\n initialScale = 1.06,\n reducedMotion,\n renderImage,\n resizeMode,\n imageStyle,\n transition,\n width,\n}: CarouselLayerProps) {\n const [opacity] = React.useState(() => new Animated.Value(active && !animateOnMount ? 1 : 0));\n const [scale] = React.useState(\n () => new Animated.Value(active && animateOnMount ? initialScale : 1),\n );\n const [offset] = React.useState(() => new Animated.Value(0));\n const hasMounted = React.useRef(false);\n\n React.useEffect(() => {\n const firstRender = !hasMounted.current;\n hasMounted.current = true;\n if (firstRender && !animateOnMount) return;\n opacity.stopAnimation();\n scale.stopAnimation();\n offset.stopAnimation();\n if (!animate || reducedMotion || transition === 'none') {\n opacity.setValue(active ? 1 : 0);\n scale.setValue(1);\n offset.setValue(0);\n return;\n }\n if (transition === 'slide') {\n scale.setValue(1);\n if (active) {\n offset.setValue(direction * width);\n opacity.setValue(1);\n }\n Animated.parallel([\n Animated.timing(offset, {\n toValue: active ? 0 : -direction * width,\n duration: Math.max(0, active ? enterDurationMs : exitDurationMs),\n easing: Easing.bezier(0.4, 0, 0.2, 1),\n useNativeDriver: true,\n }),\n Animated.timing(opacity, {\n toValue: active ? 1 : 0,\n duration: Math.max(0, active ? enterDurationMs : exitDurationMs),\n easing: Easing.linear,\n useNativeDriver: true,\n }),\n ]).start();\n } else if (active) {\n opacity.setValue(0);\n scale.setValue(initialScale);\n Animated.parallel([\n Animated.timing(opacity, {\n toValue: 1,\n duration: Math.max(0, enterDurationMs),\n easing: Easing.bezier(0.4, 0, 0.2, 1),\n useNativeDriver: true,\n }),\n Animated.timing(scale, {\n toValue: 1,\n duration: Math.max(0, enterDurationMs),\n easing: Easing.bezier(0.4, 0, 0.2, 1),\n useNativeDriver: true,\n }),\n ]).start();\n } else {\n Animated.timing(opacity, {\n toValue: 0,\n duration: Math.max(0, exitDurationMs),\n easing: Easing.bezier(0.4, 0, 0.2, 1),\n useNativeDriver: true,\n }).start();\n }\n return () => {\n opacity.stopAnimation();\n scale.stopAnimation();\n offset.stopAnimation();\n };\n }, [\n active,\n animate,\n animateOnMount,\n direction,\n enterDurationMs,\n exitDurationMs,\n initialScale,\n offset,\n opacity,\n reducedMotion,\n scale,\n transition,\n width,\n ]);\n\n return (\n <Animated.View\n accessibilityElementsHidden={!active}\n importantForAccessibility={active ? 'auto' : 'no-hide-descendants'}\n pointerEvents={active ? 'auto' : 'none'}\n style={[StyleSheet.absoluteFill, { opacity, transform: [{ scale }, { translateX: offset }] }]}\n >\n {slide.source !== undefined ? (\n renderImage ? (\n renderImage(slide, slideIndex)\n ) : (\n <Image\n accessibilityLabel={slide.alt}\n accessible={Boolean(slide.alt)}\n resizeMode={resizeMode}\n source={typeof slide.source === 'string' ? { uri: slide.source } : slide.source}\n style={[StyleSheet.absoluteFill, imageStyle]}\n />\n )\n ) : null}\n {slide.content}\n </Animated.View>\n );\n}\n\ninterface CarouselNavigationProps {\n readonly activeIndex: number;\n readonly navigate: (index: number, direction: 1 | -1) => void;\n readonly controlledWithoutHandler: boolean;\n readonly testID: CarouselProps['testID'];\n}\n\ninterface CarouselControlsProps extends CarouselNavigationProps {\n readonly show: boolean;\n readonly canPrevious: boolean;\n readonly canNext: boolean;\n readonly previousLabel: string;\n readonly nextLabel: string;\n readonly controlColor: string;\n readonly controlBackgroundColor: string;\n readonly controlsStyle: CarouselProps['controlsStyle'];\n}\n\n/*** Render optional previous/next buttons without coupling the slide content to navigation. */\nfunction CarouselControls({\n activeIndex,\n canNext,\n canPrevious,\n controlBackgroundColor,\n controlColor,\n controlledWithoutHandler,\n controlsStyle,\n navigate,\n nextLabel,\n previousLabel,\n show,\n testID,\n}: CarouselControlsProps) {\n if (!show) return null;\n const buttonStyle = [styles.control, { backgroundColor: controlBackgroundColor }];\n const labelStyle = { color: controlColor, fontSize: 30 };\n return (\n <View pointerEvents=\"box-none\" style={[styles.controls, controlsStyle]}>\n <Pressable\n accessibilityLabel={previousLabel}\n accessibilityRole=\"button\"\n disabled={!canPrevious || controlledWithoutHandler}\n onPress={() => navigate(activeIndex - 1, -1)}\n style={buttonStyle}\n testID={testID ? `${testID}-previous` : undefined}\n >\n <Text style={labelStyle}>{'‹'}</Text>\n </Pressable>\n <Pressable\n accessibilityLabel={nextLabel}\n accessibilityRole=\"button\"\n disabled={!canNext || controlledWithoutHandler}\n onPress={() => navigate(activeIndex + 1, 1)}\n style={buttonStyle}\n testID={testID ? `${testID}-next` : undefined}\n >\n <Text style={labelStyle}>{'›'}</Text>\n </Pressable>\n </View>\n );\n}\n\ninterface CarouselIndicatorsProps extends CarouselNavigationProps {\n readonly show: boolean;\n readonly slides: CarouselProps['slides'];\n readonly activeColor: string;\n readonly idleColor: string;\n readonly indicatorsStyle: CarouselProps['indicatorsStyle'];\n}\n\n/*** Render accessible selection dots for the currently controlled slide. */\nfunction CarouselIndicators({\n activeIndex,\n activeColor,\n controlledWithoutHandler,\n idleColor,\n indicatorsStyle,\n navigate,\n show,\n slides,\n testID,\n}: CarouselIndicatorsProps) {\n if (!show) return null;\n return (\n <View pointerEvents=\"box-none\" style={[styles.indicators, indicatorsStyle]}>\n {slides.map((slide, slideIndex) => (\n <Pressable\n key={slide.key}\n accessibilityLabel={`Go to slide ${slideIndex + 1} of ${slides.length}`}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: slideIndex === activeIndex }}\n disabled={controlledWithoutHandler}\n onPress={() => navigate(slideIndex, slideIndex < activeIndex ? -1 : 1)}\n style={[\n styles.indicator,\n {\n backgroundColor: slideIndex === activeIndex ? activeColor : idleColor,\n width: slideIndex === activeIndex ? 24 : 8,\n },\n ]}\n testID={testID ? `${testID}-indicator-${slideIndex}` : undefined}\n />\n ))}\n </View>\n );\n}\n\ninterface CarouselProgressProps {\n readonly show: boolean;\n readonly height: number;\n readonly trackColor: string;\n readonly indicatorColor: string;\n readonly trackStyle: CarouselProps['progressTrackStyle'];\n readonly indicatorStyle: CarouselProps['progressIndicatorStyle'];\n readonly progress: Animated.Value;\n readonly testID: CarouselProps['testID'];\n}\n\n/*** Render an optional linear autoplay timer without adding any required UI to slides. */\nfunction CarouselProgress({\n height,\n indicatorColor,\n indicatorStyle,\n progress,\n show,\n testID,\n trackColor,\n trackStyle,\n}: CarouselProgressProps) {\n if (!show) return null;\n return (\n <View\n pointerEvents=\"none\"\n style={[styles.progress, { height, backgroundColor: trackColor }, trackStyle]}\n testID={testID ? `${testID}-progress` : undefined}\n >\n <Animated.View\n style={[\n {\n height: '100%',\n width: progress.interpolate({ inputRange: [0, 1], outputRange: ['0%', '100%'] }),\n backgroundColor: indicatorColor,\n },\n indicatorStyle,\n ]}\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n controls: {\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 14,\n right: 14,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n control: {\n width: 44,\n height: 44,\n borderRadius: 22,\n justifyContent: 'center',\n alignItems: 'center',\n },\n indicators: {\n position: 'absolute',\n bottom: 24,\n left: 0,\n right: 0,\n flexDirection: 'row',\n gap: 10,\n justifyContent: 'center',\n alignItems: 'center',\n },\n indicator: { height: 8, borderRadius: 8 },\n progress: { position: 'absolute', bottom: 0, left: 0, right: 0, overflow: 'hidden' },\n});\n"]}
@@ -0,0 +1,3 @@
1
+ export type { CarouselProps, CarouselSlide, CarouselTransition } from '../../types/carousel';
2
+ export { Carousel } from './Carousel';
3
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/carousel/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Carousel } from './Carousel';
2
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/carousel/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export type { CarouselProps, CarouselSlide, CarouselTransition } from '../../types/carousel';\nexport { Carousel } from './Carousel';\n"]}
@@ -0,0 +1,15 @@
1
+ import { Animated } from 'react-native';
2
+ import type { CarouselProps } from '../../types/carousel';
3
+ /*** Own controlled/uncontrolled slide navigation, autoplay, and progress lifecycle. */
4
+ export declare function useCarouselPlayback({ slides, index, defaultIndex, onIndexChange, autoPlay, paused, loop, intervalMs, reducedMotion, }: CarouselPlaybackOptions): {
5
+ readonly activeIndex: number;
6
+ readonly controlledWithoutHandler: boolean;
7
+ readonly direction: 1 | -1;
8
+ readonly loop: boolean;
9
+ readonly navigate: (target: number, nextDirection: 1 | -1) => void;
10
+ readonly progress: Animated.Value;
11
+ readonly shouldReduceMotion: boolean;
12
+ };
13
+ type CarouselPlaybackOptions = Pick<CarouselProps, 'slides' | 'index' | 'defaultIndex' | 'onIndexChange' | 'autoPlay' | 'paused' | 'loop' | 'intervalMs' | 'reducedMotion'>;
14
+ export {};
15
+ //# sourceMappingURL=useCarouselPlayback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCarouselPlayback.d.ts","sourceRoot":"","sources":["../../../src/features/carousel/useCarouselPlayback.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,QAAQ,EAAU,MAAM,cAAc,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,KAAK,EACL,YAAgB,EAChB,aAAa,EACb,QAAe,EACf,MAAc,EACd,IAAW,EACX,UAAiB,EACjB,aAAa,GACd,EAAE,uBAAuB;;;;;gCAcb,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC;;;EA0CzC;AAED,KAAK,uBAAuB,GAAG,IAAI,CACjC,aAAa,EACX,QAAQ,GACR,OAAO,GACP,cAAc,GACd,eAAe,GACf,UAAU,GACV,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,eAAe,CAClB,CAAC"}
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import { AccessibilityInfo, Animated, Easing } from 'react-native';
3
+ /*** Own controlled/uncontrolled slide navigation, autoplay, and progress lifecycle. */
4
+ export function useCarouselPlayback({ slides, index, defaultIndex = 0, onIndexChange, autoPlay = true, paused = false, loop = true, intervalMs = 6000, reducedMotion, }) {
5
+ const [uncontrolledIndex, setUncontrolledIndex] = React.useState(defaultIndex);
6
+ const [direction, setDirection] = React.useState(1);
7
+ const [progress] = React.useState(() => new Animated.Value(0));
8
+ const systemReducedMotion = useSystemReducedMotion();
9
+ const shouldReduceMotion = reducedMotion ?? systemReducedMotion;
10
+ const activeIndex = normalizeIndex(index ?? uncontrolledIndex, slides.length);
11
+ const duration = Math.max(1, intervalMs);
12
+ const controlledWithoutHandler = index !== undefined && onIndexChange === undefined;
13
+ const canAdvance = loop || activeIndex < slides.length - 1;
14
+ const shouldPlay = autoPlay && !paused && slides.length > 1 && canAdvance && !controlledWithoutHandler;
15
+ const navigate = React.useCallback((target, nextDirection) => {
16
+ if (slides.length < 2 || controlledWithoutHandler)
17
+ return;
18
+ const next = loop
19
+ ? (target + slides.length) % slides.length
20
+ : normalizeIndex(target, slides.length);
21
+ if (next === activeIndex)
22
+ return;
23
+ setDirection(nextDirection);
24
+ if (index === undefined)
25
+ setUncontrolledIndex(next);
26
+ onIndexChange?.(next);
27
+ }, [activeIndex, controlledWithoutHandler, index, loop, onIndexChange, slides.length]);
28
+ React.useEffect(() => {
29
+ if (!shouldPlay)
30
+ return;
31
+ const timeout = setTimeout(() => navigate(activeIndex + 1, 1), duration);
32
+ return () => clearTimeout(timeout);
33
+ }, [activeIndex, duration, navigate, shouldPlay]);
34
+ React.useEffect(() => {
35
+ progress.stopAnimation();
36
+ progress.setValue(0);
37
+ if (!shouldPlay || shouldReduceMotion)
38
+ return;
39
+ const animation = Animated.timing(progress, {
40
+ toValue: 1,
41
+ duration,
42
+ easing: Easing.linear,
43
+ useNativeDriver: false,
44
+ });
45
+ animation.start();
46
+ return () => animation.stop();
47
+ }, [activeIndex, duration, progress, shouldPlay, shouldReduceMotion]);
48
+ return {
49
+ activeIndex,
50
+ controlledWithoutHandler,
51
+ direction,
52
+ loop,
53
+ navigate,
54
+ progress,
55
+ shouldReduceMotion,
56
+ };
57
+ }
58
+ /*** Clamp a controlled index whenever the consumer changes the slide collection. */
59
+ function normalizeIndex(value, count) {
60
+ if (count <= 0 || !Number.isFinite(value))
61
+ return 0;
62
+ return Math.min(Math.max(Math.trunc(value), 0), count - 1);
63
+ }
64
+ /*** Observe reduced-motion preferences without adding browser-only imports. */
65
+ function useSystemReducedMotion() {
66
+ const [reduced, setReduced] = React.useState(false);
67
+ React.useEffect(() => {
68
+ void AccessibilityInfo.isReduceMotionEnabled().then(setReduced);
69
+ const listener = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduced);
70
+ return () => listener.remove();
71
+ }, []);
72
+ return reduced;
73
+ }
74
+ //# sourceMappingURL=useCarouselPlayback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCarouselPlayback.js","sourceRoot":"","sources":["../../../src/features/carousel/useCarouselPlayback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAInE,uFAAuF;AACvF,MAAM,UAAU,mBAAmB,CAAC,EAClC,MAAM,EACN,KAAK,EACL,YAAY,GAAG,CAAC,EAChB,aAAa,EACb,QAAQ,GAAG,IAAI,EACf,MAAM,GAAG,KAAK,EACd,IAAI,GAAG,IAAI,EACX,UAAU,GAAG,IAAI,EACjB,aAAa,GACW;IACxB,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC/E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,kBAAkB,GAAG,aAAa,IAAI,mBAAmB,CAAC;IAChE,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,IAAI,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9E,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IACzC,MAAM,wBAAwB,GAAG,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AAqB,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAChE,MAAM,QAAQ,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;QACvF,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import React from 'react';\nimport { AccessibilityInfo, Animated, Easing } from 'react-native';\n\nimport type { CarouselProps } from '../../types/carousel';\n\n/*** Own controlled/uncontrolled slide navigation, autoplay, and progress lifecycle. */\nexport function useCarouselPlayback({\n slides,\n index,\n defaultIndex = 0,\n onIndexChange,\n autoPlay = true,\n paused = false,\n loop = true,\n intervalMs = 6000,\n reducedMotion,\n}: CarouselPlaybackOptions) {\n const [uncontrolledIndex, setUncontrolledIndex] = React.useState(defaultIndex);\n const [direction, setDirection] = React.useState<1 | -1>(1);\n const [progress] = React.useState(() => new Animated.Value(0));\n const systemReducedMotion = useSystemReducedMotion();\n const shouldReduceMotion = reducedMotion ?? systemReducedMotion;\n const activeIndex = normalizeIndex(index ?? uncontrolledIndex, slides.length);\n const duration = Math.max(1, intervalMs);\n const controlledWithoutHandler = index !== undefined && onIndexChange === undefined;\n const canAdvance = loop || activeIndex < slides.length - 1;\n const shouldPlay =\n autoPlay && !paused && slides.length > 1 && canAdvance && !controlledWithoutHandler;\n\n const navigate = React.useCallback(\n (target: number, nextDirection: 1 | -1) => {\n if (slides.length < 2 || controlledWithoutHandler) return;\n const next = loop\n ? (target + slides.length) % slides.length\n : normalizeIndex(target, slides.length);\n if (next === activeIndex) return;\n setDirection(nextDirection);\n if (index === undefined) setUncontrolledIndex(next);\n onIndexChange?.(next);\n },\n [activeIndex, controlledWithoutHandler, index, loop, onIndexChange, slides.length],\n );\n\n React.useEffect(() => {\n if (!shouldPlay) return;\n const timeout = setTimeout(() => navigate(activeIndex + 1, 1), duration);\n return () => clearTimeout(timeout);\n }, [activeIndex, duration, navigate, shouldPlay]);\n\n React.useEffect(() => {\n progress.stopAnimation();\n progress.setValue(0);\n if (!shouldPlay || shouldReduceMotion) return;\n const animation = Animated.timing(progress, {\n toValue: 1,\n duration,\n easing: Easing.linear,\n useNativeDriver: false,\n });\n animation.start();\n return () => animation.stop();\n }, [activeIndex, duration, progress, shouldPlay, shouldReduceMotion]);\n\n return {\n activeIndex,\n controlledWithoutHandler,\n direction,\n loop,\n navigate,\n progress,\n shouldReduceMotion,\n } as const;\n}\n\ntype CarouselPlaybackOptions = Pick<\n CarouselProps,\n | 'slides'\n | 'index'\n | 'defaultIndex'\n | 'onIndexChange'\n | 'autoPlay'\n | 'paused'\n | 'loop'\n | 'intervalMs'\n | 'reducedMotion'\n>;\n\n/*** Clamp a controlled index whenever the consumer changes the slide collection. */\nfunction normalizeIndex(value: number, count: number): number {\n if (count <= 0 || !Number.isFinite(value)) return 0;\n return Math.min(Math.max(Math.trunc(value), 0), count - 1);\n}\n\n/*** Observe reduced-motion preferences without adding browser-only imports. */\nfunction useSystemReducedMotion(): boolean {\n const [reduced, setReduced] = React.useState(false);\n React.useEffect(() => {\n void AccessibilityInfo.isReduceMotionEnabled().then(setReduced);\n const listener = AccessibilityInfo.addEventListener('reduceMotionChanged', setReduced);\n return () => listener.remove();\n }, []);\n return reduced;\n}\n"]}