zabi-components 7.0.2 → 8.1.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 (433) hide show
  1. package/CHANGELOG.md +1924 -0
  2. package/README.md +287 -11
  3. package/THEME.md +149 -332
  4. package/THEMING.md +1329 -163
  5. package/dist/atoms/ActionPanel.svelte +24 -9
  6. package/dist/atoms/ActionPanel.svelte.d.ts +2 -0
  7. package/dist/atoms/Avatar.svelte +104 -0
  8. package/dist/atoms/Avatar.svelte.d.ts +34 -0
  9. package/dist/atoms/Badge.svelte +124 -58
  10. package/dist/atoms/Badge.svelte.d.ts +17 -5
  11. package/dist/atoms/Button.svelte +212 -62
  12. package/dist/atoms/Button.svelte.d.ts +33 -2
  13. package/dist/atoms/Card.svelte +31 -28
  14. package/dist/atoms/Card.svelte.d.ts +5 -2
  15. package/dist/atoms/CardContent.svelte +10 -2
  16. package/dist/atoms/CardContent.svelte.d.ts +2 -0
  17. package/dist/atoms/CardFooter.svelte +10 -2
  18. package/dist/atoms/CardFooter.svelte.d.ts +2 -0
  19. package/dist/atoms/CardHeader.svelte +26 -6
  20. package/dist/atoms/CardHeader.svelte.d.ts +2 -0
  21. package/dist/atoms/Checkbox.svelte +52 -21
  22. package/dist/atoms/Checkbox.svelte.d.ts +6 -2
  23. package/dist/atoms/CodeBlock.svelte +35 -9
  24. package/dist/atoms/CodeBlock.svelte.d.ts +13 -3
  25. package/dist/atoms/ColorPicker.svelte +272 -52
  26. package/dist/atoms/ColorPicker.svelte.d.ts +6 -1
  27. package/dist/atoms/Container.svelte +17 -10
  28. package/dist/atoms/DateField.svelte +107 -0
  29. package/dist/atoms/DateField.svelte.d.ts +53 -0
  30. package/dist/atoms/Divider.svelte +4 -4
  31. package/dist/atoms/FeatureCard.svelte +4 -3
  32. package/dist/atoms/FieldMessages.svelte +69 -0
  33. package/dist/atoms/FieldMessages.svelte.d.ts +23 -0
  34. package/dist/atoms/FloatingActionButton.svelte +174 -0
  35. package/dist/atoms/FloatingActionButton.svelte.d.ts +51 -0
  36. package/dist/atoms/Heading.svelte +93 -32
  37. package/dist/atoms/Heading.svelte.d.ts +24 -4
  38. package/dist/atoms/IconButton.svelte +242 -53
  39. package/dist/atoms/IconButton.svelte.d.ts +49 -4
  40. package/dist/atoms/Input.svelte +267 -74
  41. package/dist/atoms/Input.svelte.d.ts +32 -2
  42. package/dist/atoms/List.svelte +13 -2
  43. package/dist/atoms/List.svelte.d.ts +2 -0
  44. package/dist/atoms/ListItem.svelte +44 -11
  45. package/dist/atoms/ListItem.svelte.d.ts +5 -0
  46. package/dist/atoms/ListItemLeading.svelte +4 -2
  47. package/dist/atoms/ListItemLeading.svelte.d.ts +1 -1
  48. package/dist/atoms/OptimizedImage.svelte +11 -2
  49. package/dist/atoms/OptimizedImage.svelte.d.ts +2 -0
  50. package/dist/atoms/Progress.svelte +31 -9
  51. package/dist/atoms/Progress.svelte.d.ts +6 -0
  52. package/dist/atoms/Radio.svelte +23 -3
  53. package/dist/atoms/Radio.svelte.d.ts +6 -2
  54. package/dist/atoms/Rating.svelte +494 -0
  55. package/dist/atoms/Rating.svelte.d.ts +56 -0
  56. package/dist/atoms/Select.svelte +475 -135
  57. package/dist/atoms/Select.svelte.d.ts +52 -2
  58. package/dist/atoms/SelectionControl.svelte +99 -18
  59. package/dist/atoms/SelectionControl.svelte.d.ts +6 -3
  60. package/dist/atoms/Skeleton.svelte +5 -3
  61. package/dist/atoms/Slider.svelte +309 -0
  62. package/dist/atoms/Slider.svelte.d.ts +40 -0
  63. package/dist/atoms/Spinner.svelte +57 -0
  64. package/dist/atoms/Spinner.svelte.d.ts +19 -0
  65. package/dist/atoms/Table.svelte +152 -6
  66. package/dist/atoms/Table.svelte.d.ts +15 -3
  67. package/dist/atoms/TemporalField.svelte +140 -0
  68. package/dist/atoms/TemporalField.svelte.d.ts +32 -0
  69. package/dist/atoms/Text.svelte +56 -15
  70. package/dist/atoms/Text.svelte.d.ts +13 -4
  71. package/dist/atoms/Textarea.svelte +57 -45
  72. package/dist/atoms/Textarea.svelte.d.ts +14 -2
  73. package/dist/atoms/ThemeToggle.svelte +238 -56
  74. package/dist/atoms/ThemeToggle.svelte.d.ts +28 -3
  75. package/dist/atoms/TimeField.svelte +108 -0
  76. package/dist/atoms/TimeField.svelte.d.ts +54 -0
  77. package/dist/atoms/Toast.svelte +25 -10
  78. package/dist/atoms/Toast.svelte.d.ts +2 -0
  79. package/dist/atoms/Toggle.svelte +60 -19
  80. package/dist/atoms/Toggle.svelte.d.ts +18 -2
  81. package/dist/atoms/Tooltip.svelte +583 -40
  82. package/dist/atoms/Tooltip.svelte.d.ts +26 -0
  83. package/dist/atoms/ZabiStringsProvider.svelte +45 -0
  84. package/dist/atoms/ZabiStringsProvider.svelte.d.ts +27 -0
  85. package/dist/atoms/index.d.ts +17 -0
  86. package/dist/atoms/index.js +12 -0
  87. package/dist/atoms/selection-control.styles.d.ts +36 -5
  88. package/dist/atoms/selection-control.styles.js +40 -9
  89. package/dist/components/atoms/index.d.ts +17 -0
  90. package/dist/components/atoms/index.d.ts.map +1 -1
  91. package/dist/components/atoms/selection-control.styles.d.ts +36 -5
  92. package/dist/components/atoms/selection-control.styles.d.ts.map +1 -1
  93. package/dist/components/index.d.ts +83 -3
  94. package/dist/components/index.d.ts.map +1 -1
  95. package/dist/components/molecules/index.d.ts +46 -0
  96. package/dist/components/molecules/index.d.ts.map +1 -1
  97. package/dist/components/molecules/toast-store.d.ts +53 -7
  98. package/dist/components/molecules/toast-store.d.ts.map +1 -1
  99. package/dist/components/organisms/index.d.ts +6 -0
  100. package/dist/components/organisms/index.d.ts.map +1 -1
  101. package/dist/components/types/variants.d.ts +15 -1
  102. package/dist/components/types/variants.d.ts.map +1 -1
  103. package/dist/components/util/app-shell.d.ts +28 -0
  104. package/dist/components/util/app-shell.d.ts.map +1 -0
  105. package/dist/components/util/avatar.d.ts +36 -0
  106. package/dist/components/util/avatar.d.ts.map +1 -0
  107. package/dist/components/util/bottom-sheet.d.ts +30 -0
  108. package/dist/components/util/bottom-sheet.d.ts.map +1 -0
  109. package/dist/components/util/bottom-tab-bar.d.ts +35 -0
  110. package/dist/components/util/bottom-tab-bar.d.ts.map +1 -0
  111. package/dist/components/util/calendar.d.ts +56 -0
  112. package/dist/components/util/calendar.d.ts.map +1 -0
  113. package/dist/components/util/cn.d.ts +8 -0
  114. package/dist/components/util/cn.d.ts.map +1 -0
  115. package/dist/components/util/collapsible.d.ts +58 -0
  116. package/dist/components/util/collapsible.d.ts.map +1 -0
  117. package/dist/components/util/confirm-dialog.d.ts +12 -0
  118. package/dist/components/util/confirm-dialog.d.ts.map +1 -0
  119. package/dist/components/util/date.d.ts +96 -0
  120. package/dist/components/util/date.d.ts.map +1 -0
  121. package/dist/components/util/drawer.d.ts +13 -0
  122. package/dist/components/util/drawer.d.ts.map +1 -0
  123. package/dist/components/util/dropdown.d.ts +47 -0
  124. package/dist/components/util/dropdown.d.ts.map +1 -0
  125. package/dist/components/util/field.d.ts +39 -0
  126. package/dist/components/util/field.d.ts.map +1 -0
  127. package/dist/components/util/fit-in-viewport.d.ts +201 -0
  128. package/dist/components/util/fit-in-viewport.d.ts.map +1 -0
  129. package/dist/components/util/focus-utils.d.ts +75 -2
  130. package/dist/components/util/focus-utils.d.ts.map +1 -1
  131. package/dist/components/util/hydration.d.ts +45 -0
  132. package/dist/components/util/hydration.d.ts.map +1 -0
  133. package/dist/components/util/keyboard-inset.d.ts +18 -0
  134. package/dist/components/util/keyboard-inset.d.ts.map +1 -0
  135. package/dist/components/util/media-grid.d.ts +51 -0
  136. package/dist/components/util/media-grid.d.ts.map +1 -0
  137. package/dist/components/util/media.d.ts +6 -0
  138. package/dist/components/util/media.d.ts.map +1 -0
  139. package/dist/components/util/overlay-chrome.d.ts +53 -0
  140. package/dist/components/util/overlay-chrome.d.ts.map +1 -0
  141. package/dist/components/util/overlay.d.ts +72 -0
  142. package/dist/components/util/overlay.d.ts.map +1 -0
  143. package/dist/components/util/photo.d.ts +215 -0
  144. package/dist/components/util/photo.d.ts.map +1 -0
  145. package/dist/components/util/portal.d.ts +23 -0
  146. package/dist/components/util/portal.d.ts.map +1 -0
  147. package/dist/components/util/pull-to-refresh.d.ts +27 -0
  148. package/dist/components/util/pull-to-refresh.d.ts.map +1 -0
  149. package/dist/components/util/radio-keys.d.ts +25 -0
  150. package/dist/components/util/radio-keys.d.ts.map +1 -0
  151. package/dist/components/util/rating.d.ts +23 -0
  152. package/dist/components/util/rating.d.ts.map +1 -0
  153. package/dist/components/util/ready-made-strings.d.ts +77 -0
  154. package/dist/components/util/ready-made-strings.d.ts.map +1 -0
  155. package/dist/components/util/scroll-padding.d.ts +20 -0
  156. package/dist/components/util/scroll-padding.d.ts.map +1 -0
  157. package/dist/components/util/segmented-control.d.ts +16 -0
  158. package/dist/components/util/segmented-control.d.ts.map +1 -0
  159. package/dist/components/util/select.d.ts +41 -0
  160. package/dist/components/util/select.d.ts.map +1 -0
  161. package/dist/components/util/sheet-drag.d.ts +60 -0
  162. package/dist/components/util/sheet-drag.d.ts.map +1 -0
  163. package/dist/components/util/sidebar.d.ts +63 -0
  164. package/dist/components/util/sidebar.d.ts.map +1 -0
  165. package/dist/components/util/sortable-list.d.ts +65 -0
  166. package/dist/components/util/sortable-list.d.ts.map +1 -0
  167. package/dist/components/util/ssr-safe.d.ts +4 -4
  168. package/dist/components/util/ssr-safe.d.ts.map +1 -1
  169. package/dist/components/util/stepper.d.ts +40 -0
  170. package/dist/components/util/stepper.d.ts.map +1 -0
  171. package/dist/components/util/swipeable-list-item.d.ts +36 -0
  172. package/dist/components/util/swipeable-list-item.d.ts.map +1 -0
  173. package/dist/components/util/theme-mode.d.ts +80 -0
  174. package/dist/components/util/theme-mode.d.ts.map +1 -0
  175. package/dist/components/util/toaster.d.ts +93 -0
  176. package/dist/components/util/toaster.d.ts.map +1 -0
  177. package/dist/components/util/tooltip.d.ts +10 -0
  178. package/dist/components/util/tooltip.d.ts.map +1 -0
  179. package/dist/components/util/top-navbar.d.ts +11 -0
  180. package/dist/components/util/top-navbar.d.ts.map +1 -0
  181. package/dist/components/util/touch-target.d.ts +31 -0
  182. package/dist/components/util/touch-target.d.ts.map +1 -0
  183. package/dist/components/util/zabi-strings.d.ts +133 -0
  184. package/dist/components/util/zabi-strings.d.ts.map +1 -0
  185. package/dist/create-theme/cli.js +169 -0
  186. package/dist/create-theme/index.d.ts +176 -0
  187. package/dist/create-theme/index.js +817 -0
  188. package/dist/create-theme/lib/ramp-math.js +128 -0
  189. package/dist/create-theme/lib/resolve.js +141 -0
  190. package/dist/create-theme/theme-data.js +1116 -0
  191. package/dist/index.d.ts +83 -3
  192. package/dist/index.js +60 -8
  193. package/dist/molecules/Alert.svelte +73 -66
  194. package/dist/molecules/Alert.svelte.d.ts +9 -1
  195. package/dist/molecules/AppBar.svelte +415 -0
  196. package/dist/molecules/AppBar.svelte.d.ts +69 -0
  197. package/dist/molecules/AvatarGroup.svelte +116 -0
  198. package/dist/molecules/AvatarGroup.svelte.d.ts +40 -0
  199. package/dist/molecules/BottomSheet.svelte +540 -0
  200. package/dist/molecules/BottomSheet.svelte.d.ts +93 -0
  201. package/dist/molecules/BottomTabBar.svelte +297 -0
  202. package/dist/molecules/BottomTabBar.svelte.d.ts +64 -0
  203. package/dist/molecules/Calendar.svelte +597 -0
  204. package/dist/molecules/Calendar.svelte.d.ts +72 -0
  205. package/dist/molecules/Collapsible.svelte +243 -0
  206. package/dist/molecules/Collapsible.svelte.d.ts +44 -0
  207. package/dist/molecules/CollapsibleGroup.svelte +126 -0
  208. package/dist/molecules/CollapsibleGroup.svelte.d.ts +14 -0
  209. package/dist/molecules/ComponentDemo.svelte +25 -5
  210. package/dist/molecules/ComponentDemo.svelte.d.ts +5 -0
  211. package/dist/molecules/ConfirmDialog.svelte +253 -0
  212. package/dist/molecules/ConfirmDialog.svelte.d.ts +55 -0
  213. package/dist/molecules/ContactForm.svelte +46 -19
  214. package/dist/molecules/ContactForm.svelte.d.ts +10 -0
  215. package/dist/molecules/Drawer.svelte +394 -0
  216. package/dist/molecules/Drawer.svelte.d.ts +55 -0
  217. package/dist/molecules/Dropdown.svelte +540 -50
  218. package/dist/molecules/Dropdown.svelte.d.ts +49 -6
  219. package/dist/molecules/DropdownItem.svelte +122 -0
  220. package/dist/molecules/DropdownItem.svelte.d.ts +28 -0
  221. package/dist/molecules/EmptyState.svelte +56 -10
  222. package/dist/molecules/EmptyState.svelte.d.ts +8 -0
  223. package/dist/molecules/Form.svelte +25 -14
  224. package/dist/molecules/Form.svelte.d.ts +13 -5
  225. package/dist/molecules/FormField.svelte +11 -2
  226. package/dist/molecules/FormField.svelte.d.ts +2 -0
  227. package/dist/molecules/Header.svelte +13 -3
  228. package/dist/molecules/Header.svelte.d.ts +2 -0
  229. package/dist/molecules/ImageUpload.svelte +422 -70
  230. package/dist/molecules/ImageUpload.svelte.d.ts +61 -5
  231. package/dist/molecules/MediaGrid.svelte +527 -0
  232. package/dist/molecules/MediaGrid.svelte.d.ts +77 -0
  233. package/dist/molecules/Modal.svelte +340 -45
  234. package/dist/molecules/Modal.svelte.d.ts +59 -7
  235. package/dist/molecules/NavigationMenu.svelte +15 -3
  236. package/dist/molecules/NavigationMenu.svelte.d.ts +4 -0
  237. package/dist/molecules/NavigationMenuContent.svelte +91 -36
  238. package/dist/molecules/NavigationMenuContent.svelte.d.ts +2 -0
  239. package/dist/molecules/NavigationMenuItem.svelte +10 -3
  240. package/dist/molecules/NavigationMenuItem.svelte.d.ts +2 -0
  241. package/dist/molecules/NavigationMenuLink.svelte +10 -2
  242. package/dist/molecules/NavigationMenuLink.svelte.d.ts +2 -0
  243. package/dist/molecules/NavigationMenuList.svelte +19 -4
  244. package/dist/molecules/NavigationMenuList.svelte.d.ts +2 -0
  245. package/dist/molecules/NavigationMenuTrigger.svelte +16 -3
  246. package/dist/molecules/NavigationMenuTrigger.svelte.d.ts +2 -0
  247. package/dist/molecules/Page.svelte +38 -2
  248. package/dist/molecules/Page.svelte.d.ts +13 -0
  249. package/dist/molecules/PhotoGrid.svelte +433 -0
  250. package/dist/molecules/PhotoGrid.svelte.d.ts +62 -0
  251. package/dist/molecules/PhotoViewer.svelte +1116 -0
  252. package/dist/molecules/PhotoViewer.svelte.d.ts +56 -0
  253. package/dist/molecules/PropsTable.svelte +26 -11
  254. package/dist/molecules/PropsTable.svelte.d.ts +5 -0
  255. package/dist/molecules/PullToRefresh.svelte +263 -0
  256. package/dist/molecules/PullToRefresh.svelte.d.ts +52 -0
  257. package/dist/molecules/RadioGroup.svelte +57 -15
  258. package/dist/molecules/RadioGroup.svelte.d.ts +16 -3
  259. package/dist/molecules/Section.svelte +13 -5
  260. package/dist/molecules/Section.svelte.d.ts +3 -1
  261. package/dist/molecules/SegmentedControl.svelte +323 -0
  262. package/dist/molecules/SegmentedControl.svelte.d.ts +34 -0
  263. package/dist/molecules/SidebarBrandHeader.svelte +24 -5
  264. package/dist/molecules/SidebarBrandHeader.svelte.d.ts +5 -0
  265. package/dist/molecules/SidebarFooter.svelte +39 -8
  266. package/dist/molecules/SidebarFooter.svelte.d.ts +5 -0
  267. package/dist/molecules/SidebarNavSection.svelte +12 -4
  268. package/dist/molecules/SidebarNavSection.svelte.d.ts +2 -0
  269. package/dist/molecules/SlideUp.svelte +253 -30
  270. package/dist/molecules/SlideUp.svelte.d.ts +31 -4
  271. package/dist/molecules/SortableList.svelte +632 -0
  272. package/dist/molecules/SortableList.svelte.d.ts +69 -0
  273. package/dist/molecules/Stepper.svelte +548 -0
  274. package/dist/molecules/Stepper.svelte.d.ts +39 -0
  275. package/dist/molecules/StickyActionBar.svelte +191 -0
  276. package/dist/molecules/StickyActionBar.svelte.d.ts +65 -0
  277. package/dist/molecules/SwipeableListItem.svelte +334 -0
  278. package/dist/molecules/SwipeableListItem.svelte.d.ts +54 -0
  279. package/dist/molecules/Tabs.svelte +254 -24
  280. package/dist/molecules/Tabs.svelte.d.ts +15 -4
  281. package/dist/molecules/Toaster.svelte +352 -6
  282. package/dist/molecules/Toaster.svelte.d.ts +95 -2
  283. package/dist/molecules/ToasterToast.svelte +279 -62
  284. package/dist/molecules/ToasterToast.svelte.d.ts +11 -0
  285. package/dist/molecules/UnsavedChangesBar.svelte +212 -0
  286. package/dist/molecules/UnsavedChangesBar.svelte.d.ts +43 -0
  287. package/dist/molecules/index.d.ts +46 -0
  288. package/dist/molecules/index.js +27 -0
  289. package/dist/molecules/toast-store.d.ts +53 -7
  290. package/dist/molecules/toast-store.js +21 -0
  291. package/dist/organisms/AppShell.svelte +196 -0
  292. package/dist/organisms/AppShell.svelte.d.ts +61 -0
  293. package/dist/organisms/SidebarAccountPanel.svelte +111 -12
  294. package/dist/organisms/SidebarAccountPanel.svelte.d.ts +21 -0
  295. package/dist/organisms/SidebarNavigation.svelte +193 -69
  296. package/dist/organisms/SidebarNavigation.svelte.d.ts +31 -1
  297. package/dist/organisms/SidebarPanel.svelte +45 -16
  298. package/dist/organisms/SidebarPanel.svelte.d.ts +2 -0
  299. package/dist/organisms/SidebarShell.svelte +263 -0
  300. package/dist/organisms/SidebarShell.svelte.d.ts +106 -0
  301. package/dist/organisms/TopNavbar.svelte +329 -33
  302. package/dist/organisms/TopNavbar.svelte.d.ts +28 -0
  303. package/dist/organisms/index.d.ts +6 -0
  304. package/dist/organisms/index.js +4 -0
  305. package/dist/routes/lib/variant-utils.d.ts +26 -0
  306. package/dist/routes/lib/{variant-utils.ts → variant-utils.js} +15 -46
  307. package/dist/types/components.d.ts +4 -0
  308. package/dist/types/components.d.ts.map +1 -1
  309. package/dist/types/events.js +1 -0
  310. package/dist/types/index.d.ts +605 -25
  311. package/dist/types/index.d.ts.map +1 -1
  312. package/dist/types/index.js +3 -0
  313. package/dist/types/variants.ts +17 -1
  314. package/dist/util/app-shell.d.ts +27 -0
  315. package/dist/util/app-shell.js +72 -0
  316. package/dist/util/avatar.d.ts +35 -0
  317. package/dist/util/avatar.js +52 -0
  318. package/dist/util/bottom-sheet.d.ts +29 -0
  319. package/dist/util/bottom-sheet.js +43 -0
  320. package/dist/util/bottom-tab-bar.d.ts +34 -0
  321. package/dist/util/bottom-tab-bar.js +54 -0
  322. package/dist/util/calendar.d.ts +55 -0
  323. package/dist/util/calendar.js +74 -0
  324. package/dist/util/cn.d.ts +7 -0
  325. package/dist/util/cn.js +48 -0
  326. package/dist/util/collapsible.d.ts +57 -0
  327. package/dist/util/collapsible.js +23 -0
  328. package/dist/util/confirm-dialog.d.ts +11 -0
  329. package/dist/util/confirm-dialog.js +2 -0
  330. package/dist/util/date.d.ts +95 -0
  331. package/dist/util/date.js +237 -0
  332. package/dist/util/drawer.d.ts +12 -0
  333. package/dist/util/drawer.js +7 -0
  334. package/dist/util/dropdown.d.ts +46 -0
  335. package/dist/util/dropdown.js +21 -0
  336. package/dist/util/field.d.ts +38 -0
  337. package/dist/util/field.js +38 -0
  338. package/dist/util/fit-in-viewport.d.ts +200 -0
  339. package/dist/util/fit-in-viewport.js +399 -0
  340. package/dist/util/focus-utils.d.ts +75 -2
  341. package/dist/util/focus-utils.js +182 -9
  342. package/dist/util/hydration.d.ts +44 -0
  343. package/dist/util/hydration.js +58 -0
  344. package/dist/util/keyboard-inset.d.ts +17 -0
  345. package/dist/util/keyboard-inset.js +53 -0
  346. package/dist/util/media-grid.d.ts +50 -0
  347. package/dist/util/media-grid.js +81 -0
  348. package/dist/util/media.d.ts +5 -0
  349. package/dist/util/media.js +10 -0
  350. package/dist/util/overlay-chrome.d.ts +52 -0
  351. package/dist/util/overlay-chrome.js +56 -0
  352. package/dist/util/overlay.d.ts +71 -0
  353. package/dist/util/overlay.js +240 -0
  354. package/dist/util/photo.d.ts +214 -0
  355. package/dist/util/photo.js +206 -0
  356. package/dist/util/portal.d.ts +22 -0
  357. package/dist/util/portal.js +50 -0
  358. package/dist/util/pull-to-refresh.d.ts +26 -0
  359. package/dist/util/pull-to-refresh.js +30 -0
  360. package/dist/util/radio-keys.d.ts +24 -0
  361. package/dist/util/radio-keys.js +49 -0
  362. package/dist/util/rating.d.ts +22 -0
  363. package/dist/util/rating.js +26 -0
  364. package/dist/util/ready-made-strings.d.ts +76 -0
  365. package/dist/util/ready-made-strings.js +67 -0
  366. package/dist/util/scroll-padding.d.ts +19 -0
  367. package/dist/util/scroll-padding.js +44 -0
  368. package/dist/util/segmented-control.d.ts +15 -0
  369. package/dist/util/segmented-control.js +1 -0
  370. package/dist/util/select.d.ts +40 -0
  371. package/dist/util/select.js +63 -0
  372. package/dist/util/sheet-drag.d.ts +59 -0
  373. package/dist/util/sheet-drag.js +241 -0
  374. package/dist/util/sidebar.d.ts +62 -0
  375. package/dist/util/sidebar.js +38 -0
  376. package/dist/util/sortable-list.d.ts +64 -0
  377. package/dist/util/sortable-list.js +53 -0
  378. package/dist/util/ssr-safe.d.ts +4 -4
  379. package/dist/util/stepper.d.ts +39 -0
  380. package/dist/util/stepper.js +38 -0
  381. package/dist/util/swipeable-list-item.d.ts +35 -0
  382. package/dist/util/swipeable-list-item.js +32 -0
  383. package/dist/util/theme-mode.d.ts +79 -0
  384. package/dist/util/theme-mode.js +121 -0
  385. package/dist/util/toaster.d.ts +92 -0
  386. package/dist/util/toaster.js +75 -0
  387. package/dist/util/tooltip.d.ts +9 -0
  388. package/dist/util/tooltip.js +18 -0
  389. package/dist/util/top-navbar.d.ts +10 -0
  390. package/dist/util/top-navbar.js +5 -0
  391. package/dist/util/touch-target.d.ts +30 -0
  392. package/dist/util/touch-target.js +30 -0
  393. package/dist/util/zabi-strings.d.ts +132 -0
  394. package/dist/util/zabi-strings.js +105 -0
  395. package/dist/zabi-components-colors.css +5 -2
  396. package/dist/zabi-components-theme-dark-only.css +574 -225
  397. package/dist/zabi-components-theme-dark.css +574 -225
  398. package/dist/zabi-components-theme-only.css +1680 -317
  399. package/dist/zabi-components-theme.css +1680 -317
  400. package/dist/zabi-components.css +4473 -1158
  401. package/docs/lucide-icons.md +41 -16
  402. package/docs/theme-imports.md +81 -11
  403. package/package.json +51 -29
  404. package/dist/lib/layout-width-tokens.d.ts +0 -17
  405. package/dist/lib/layout-width-tokens.d.ts.map +0 -1
  406. package/dist/lib/showcase/component-docs/Button.d.ts +0 -3
  407. package/dist/lib/showcase/component-docs/Button.d.ts.map +0 -1
  408. package/dist/lib/showcase/component-docs/Input.d.ts +0 -3
  409. package/dist/lib/showcase/component-docs/Input.d.ts.map +0 -1
  410. package/dist/lib/showcase/component-docs/List.d.ts +0 -3
  411. package/dist/lib/showcase/component-docs/List.d.ts.map +0 -1
  412. package/dist/lib/showcase/component-docs/Modal.d.ts +0 -3
  413. package/dist/lib/showcase/component-docs/Modal.d.ts.map +0 -1
  414. package/dist/lib/showcase/component-docs/Radio.d.ts +0 -3
  415. package/dist/lib/showcase/component-docs/Radio.d.ts.map +0 -1
  416. package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts +0 -3
  417. package/dist/lib/showcase/component-docs/SidebarNavigation.d.ts.map +0 -1
  418. package/dist/lib/showcase/component-docs/Skeleton.d.ts +0 -3
  419. package/dist/lib/showcase/component-docs/Skeleton.d.ts.map +0 -1
  420. package/dist/lib/showcase/component-docs/_shared.d.ts +0 -12
  421. package/dist/lib/showcase/component-docs/_shared.d.ts.map +0 -1
  422. package/dist/lib/showcase/component-docs/index.d.ts +0 -4
  423. package/dist/lib/showcase/component-docs/index.d.ts.map +0 -1
  424. package/dist/lib/showcase/components-catalog.d.ts +0 -3
  425. package/dist/lib/showcase/components-catalog.d.ts.map +0 -1
  426. package/dist/lib/showcase/components-showcase-constants.d.ts +0 -89
  427. package/dist/lib/showcase/components-showcase-constants.d.ts.map +0 -1
  428. package/dist/lib/showcase/docs-sidebar-helpers.d.ts +0 -15
  429. package/dist/lib/showcase/docs-sidebar-helpers.d.ts.map +0 -1
  430. package/dist/routes/lib/focus-utils.d.ts +0 -12
  431. package/dist/routes/lib/focus-utils.ts +0 -110
  432. package/dist/routes/lib/ssr-safe.ts +0 -58
  433. package/scripts/fix-lucide-svelte-icon-dts.js +0 -35
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-grid.d.ts","s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AAa,EAAE,KAAK,GAAG,SAAS,CAAC,EAC7C,GAAG,EAAE,OAAO,GACb,aAAa,GAAG,SAAS,CAQ3B"}
@@ -0,0 +1,6 @@
1
+ /** How the library tells a video from an image by its address. Shared by `ImageUpload` and `MediaGrid`. */
2
+ /** True for a path or file name with a video extension, before any query or hash. */
3
+ export declare function isVideoPath(path: string): boolean;
4
+ /** True for a video data URL, or a URL whose path has a video extension. */
5
+ export declare function isVideoUrl(url: string): boolean;
6
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../src/components/util/media.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAI3G,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/C"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The chrome of an overlay at large text: the header of a BottomSheet, Drawer,
3
+ * Modal or SlideUp, and the padding of its footer.
4
+ *
5
+ * Tailwind's spacing is in rem, so at `html { font-size: 200% }` the gutters,
6
+ * the gap above the title, the title and the close button all doubled. On a
7
+ * phone that left a third of a half-height sheet to what the sheet was opened
8
+ * for. This is navigation chrome, as the app bar is (see AppBar): it says
9
+ * where you are and how to leave, and it is not what the user enlarged the
10
+ * text to read. So it is laid out in px, and its title grows to 1.3 times its
11
+ * size and stops. The content, and whatever the app puts in the footer, scale
12
+ * in full. docs/ACCESSIBILITY.md has the reasoning against WCAG 1.4.4.
13
+ */
14
+ /**
15
+ * On the header box: the spacing scale in px for everything inside it, so
16
+ * `px-6`, `gap-4`, `size-8` and the 44px of `TOUCH_HIT_AREA` are the sizes
17
+ * they are at 100% text. Only for a box that holds chrome alone: an app's
18
+ * Button inside it would stop growing too, which is why a footer spells its
19
+ * padding out in px instead.
20
+ */
21
+ export declare const OVERLAY_CHROME = "[--spacing:4px]";
22
+ /**
23
+ * How a title wraps: onto as many lines as it needs, between words, and a
24
+ * word wider than the whole line is cut rather than left sticking out.
25
+ */
26
+ export declare const OVERLAY_TITLE_WRAP = "[overflow-wrap:break-word]";
27
+ /**
28
+ * On the title while the text is enlarged (`textIsEnlarged`): a word that does
29
+ * not fit at the end of a line is hyphenated by the rules of the page's
30
+ * `lang`, where the browser has them, before it is cut.
31
+ *
32
+ * Not at the default text size, and not narrowed with `hyphenate-limit-chars`:
33
+ * `hyphens: auto` hyphenates at the end of every line, not only where a word
34
+ * is too wide, and what a browser offers as a hyphenation point is the
35
+ * platform's ("sett-ings", "histor-y" in Chromium on macOS). A title that
36
+ * wraps between words today would get those. A limit, where it is supported
37
+ * at all (not in Safari), turns a hyphenated break of a shorter word into a
38
+ * plain cut.
39
+ */
40
+ export declare const OVERLAY_TITLE_HYPHENS = "hyphens-auto";
41
+ /**
42
+ * Whether the reader has enlarged the text: the root font size is above the
43
+ * 16px every browser starts from. Read when an overlay opens. False on the
44
+ * server and until then, which is the layout at the default size.
45
+ */
46
+ export declare function textIsEnlarged(): boolean;
47
+ /** A title of 20px (`text-xl`): up to 26px, on the same 1.4 line. */
48
+ export declare const OVERLAY_TITLE_XL = "text-[length:min(1.25rem,26px)] leading-[1.4]";
49
+ /** A title of 24px (`text-2xl`): up to 31.2px, on the same 4/3 line. */
50
+ export declare const OVERLAY_TITLE_2XL = "text-[length:min(1.5rem,31.2px)] leading-[calc(4/3)]";
51
+ /** The "×" of a close button: a control, so the size it is at 100%. */
52
+ export declare const OVERLAY_CLOSE_GLYPH = "text-[24px] leading-[32px]";
53
+ //# sourceMappingURL=overlay-chrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay-chrome.d.ts","sourceRoot":"","sources":["../../../src/components/util/overlay-chrome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAGxC;AAED,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,kDAAkD,CAAC;AAEhF,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,yDAAyD,CAAC;AAExF,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * What Modal, SlideUp and Drawer share beyond `focus-utils.ts`: the scroll
3
+ * lock on `<body>` and the Tab cycle inside the panel. One copy, so the
4
+ * overlays cannot drift apart and keep working when nested in any order.
5
+ */
6
+ /**
7
+ * Stops the page behind an overlay from scrolling. Ref-counted on `<body>`
8
+ * (`data-zabi-scroll-lock`), so nested overlays share one lock and the page
9
+ * scrolls again only when the last one has released it.
10
+ *
11
+ * Call it when the overlay opens, in the browser, and call the returned
12
+ * function when it closes.
13
+ */
14
+ export declare function lockBodyScroll(): () => void;
15
+ /**
16
+ * Keeps Tab inside `container`: call it from the panel's `keydown` handler.
17
+ * Focusables are re-queried on every Tab, so content added while the overlay
18
+ * is open stays inside the cycle. A Tab that comes from a dialog nested in the
19
+ * container is left to that dialog. The toasts on screen are in the cycle too,
20
+ * after the container's own controls: see `getToastFocusables`.
21
+ */
22
+ export declare function trapTabKey(container: HTMLElement | undefined, event: KeyboardEvent): void;
23
+ /**
24
+ * Watches a scrolling box in an overlay and reports whether it has to be a
25
+ * Tab stop itself: true when its content is taller than it and holds nothing
26
+ * that can take focus, so the keyboard would otherwise have no way to scroll
27
+ * it. The answer changes with the viewport and with the content, so it is
28
+ * reported again whenever either does.
29
+ *
30
+ * Call it when the overlay opens, in the browser; the returned function stops it.
31
+ */
32
+ export declare function watchScrollerNeedsFocus(box: HTMLElement, onChange: (needsFocus: boolean) => void): () => void;
33
+ /**
34
+ * Keeps an overlay on the part of the screen the on-screen keyboard leaves.
35
+ *
36
+ * Where the keyboard covers the page instead of shrinking it (iOS Safari,
37
+ * Chrome on Android), a panel at the bottom of a `fixed inset-0` root ends up
38
+ * behind it, footer and all. This moves the root's bottom edge up to the top
39
+ * of the keyboard (and its top edge down, if the browser has panned the
40
+ * screen), so everything laid out against the root follows: a sheet's height,
41
+ * a pinned footer, a drawer's end. `data-keyboard-open` is set on the root
42
+ * meanwhile. The field that has focus is scrolled back into view once the
43
+ * root has its new size. Where the page shrinks by itself, nothing is done.
44
+ *
45
+ * The root is usually the backdrop as well: while it is moved, its dimming is
46
+ * carried on past its edges, so the page does not show undimmed where the
47
+ * keyboard was while that slides away.
48
+ *
49
+ * `root` is the overlay's outermost, fixed element. Call it when the overlay
50
+ * opens, in the browser; the returned function stops it and puts the root back.
51
+ */
52
+ export declare function followKeyboard(root: HTMLElement): () => void;
53
+ /**
54
+ * Says that `footer` is pinned to the bottom of an open overlay, so what is
55
+ * drawn over the overlays (the toast stack) can stay off it. Call it when the
56
+ * footer is rendered, in the browser; the returned function withdraws it.
57
+ */
58
+ export declare function registerOverlayFooter(footer: HTMLElement): () => void;
59
+ /**
60
+ * Says that `header` is the top of an open overlay and holds its close
61
+ * button, so the toast stack starts below it and never lies over the one
62
+ * control that always closes the overlay. Call it when the header is
63
+ * rendered, in the browser; the returned function withdraws it.
64
+ */
65
+ export declare function registerOverlayHeader(header: HTMLElement): () => void;
66
+ /** The footer of the overlay on top, if it has one. */
67
+ export declare function topOverlayFooter(): HTMLElement | null;
68
+ /** The header of the overlay on top, if it has one. */
69
+ export declare function topOverlayHeader(): HTMLElement | null;
70
+ /** Calls `listener` whenever a registered header or footer appears, goes, moves or changes size. */
71
+ export declare function watchOverlayFooters(listener: () => void): () => void;
72
+ //# sourceMappingURL=overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/components/util/overlay.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,MAAM,IAAI,CAkB3C;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,WAAW,GAAG,SAAS,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAMzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACnC,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,GACxC,MAAM,IAAI,CAaZ;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,IAAI,CAuD5D;AAyDD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,CAErE;AAWD,uDAAuD;AACvD,wBAAgB,gBAAgB,IAAI,WAAW,GAAG,IAAI,CAGrD;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,IAAI,WAAW,GAAG,IAAI,CAGrD;AAED,oGAAoG;AACpG,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAKpE"}
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Public types and pure helpers for `PhotoGrid` and `PhotoViewer`.
3
+ *
4
+ * Everything a gesture means is worked out here, on numbers: where a pinch
5
+ * leaves the photo, how far it may be panned, whether a swipe turns the page.
6
+ * The components only feed pointers in and apply the result, so the
7
+ * arithmetic can be tested without a browser.
8
+ */
9
+ import type { Component } from "svelte";
10
+ export type PhotoKey = string | number;
11
+ /** One photo. `PhotoGrid` and `PhotoViewer` take the same array. */
12
+ export interface Photo {
13
+ /** Stable identity, when the same `src` may appear twice or may change. Without it, `src` is the identity. */
14
+ id?: PhotoKey;
15
+ /** The full image, shown in the viewer. */
16
+ src: string;
17
+ /** A small version for the grid, and for the viewer while the full image loads. Without it, `src`. */
18
+ thumbSrc?: string;
19
+ /** What the photo shows, for those who cannot see it. */
20
+ alt: string;
21
+ /** Width of the full image in px. With `height` it reserves the photo's box before it has loaded. */
22
+ width: number;
23
+ /** Height of the full image in px. */
24
+ height: number;
25
+ /** Shown under the photo in the viewer. */
26
+ caption?: string;
27
+ }
28
+ export declare function photoKey(photo: Photo): PhotoKey;
29
+ /** Payload of PhotoGrid's `onselect`. */
30
+ export interface PhotoGridSelectDetail {
31
+ photo: Photo;
32
+ index: number;
33
+ /** False when the press cleared the photo's selection (only in `multiple`). */
34
+ selected: boolean;
35
+ /** Every selected key after the change: one or none in `single`. */
36
+ keys: PhotoKey[];
37
+ }
38
+ /** Every built-in string of PhotoGrid. Pass a partial object to `strings` to translate. */
39
+ export interface PhotoGridStrings {
40
+ /** Visible label and name of the tile that adds a photo. */
41
+ addPhoto: string;
42
+ /** Name of a photo that has no `alt`. */
43
+ photoName: (position: number, total: number) => string;
44
+ /** Name of the last tile when it stands for the photos not shown. */
45
+ morePhotos: (count: number) => string;
46
+ /** Name of the button that opens a photo, in a grid where a press selects. */
47
+ openPhoto: (name: string) => string;
48
+ /** How to get around by keyboard. Read once when focus enters the grid, and shown while it has keyboard focus. */
49
+ keyboardHint: string;
50
+ }
51
+ export declare const PHOTO_GRID_STRINGS: PhotoGridStrings;
52
+ /** What the user did to close the viewer. `swipe` is a swipe down on the photo. */
53
+ export type PhotoViewerCloseReason = "escape" | "close-button" | "swipe";
54
+ /** Something to do with the photo that is showing: share it, delete it. */
55
+ export interface PhotoViewerAction {
56
+ id: string;
57
+ label: string;
58
+ /** An icon component, as `@lucide/svelte` icons are. */
59
+ icon?: Component<{
60
+ size?: number;
61
+ class?: string;
62
+ }>;
63
+ /** `danger` for a destructive action such as Delete. */
64
+ tone?: "danger";
65
+ disabled?: boolean;
66
+ onclick: (photo: Photo, index: number) => void;
67
+ }
68
+ /** Every built-in string of PhotoViewer. Pass a partial object to `strings` to translate. */
69
+ export interface PhotoViewerStrings {
70
+ close: string;
71
+ previous: string;
72
+ next: string;
73
+ /** The counter that is shown: "3 / 12". */
74
+ counter: (position: number, total: number) => string;
75
+ /** The same for a screen reader, read out after the photo's `alt`: "3 of 12". */
76
+ position: (position: number, total: number) => string;
77
+ /** Announced, with a spinner, when a photo takes a while to load. */
78
+ loading: string;
79
+ /** Shown when a photo cannot be loaded. */
80
+ loadError: string;
81
+ retry: string;
82
+ /** Name of the menu that holds the actions that do not fit in the bar. */
83
+ moreActions: string;
84
+ /** The button that shows all of a long caption, and the one that folds it again. */
85
+ showMore: string;
86
+ showLess: string;
87
+ /** Name of a photo that has no `alt`. */
88
+ photoName: (position: number, total: number) => string;
89
+ }
90
+ export declare const PHOTO_VIEWER_STRINGS: PhotoViewerStrings;
91
+ /** How many actions the viewer's bar shows before the rest go into a menu. */
92
+ export declare const MAX_BAR_ACTIONS = 3;
93
+ /** The actions shown in the bar, and those that go into the menu. */
94
+ export declare function splitActions<T>(actions: readonly T[], max?: number): {
95
+ bar: T[];
96
+ menu: T[];
97
+ };
98
+ /** An index held inside a list of `count` photos; -1 for an empty list. */
99
+ export declare function clampIndex(index: number, count: number): number;
100
+ /** What the grid shows of `total` photos under `max`, and how many the last tile stands for. */
101
+ export declare function visibleCount(total: number, max: number | undefined): {
102
+ shown: number;
103
+ hidden: number;
104
+ };
105
+ export interface Size {
106
+ width: number;
107
+ height: number;
108
+ }
109
+ export interface Point {
110
+ x: number;
111
+ y: number;
112
+ }
113
+ /**
114
+ * Where the photo is. `scale` 1 is the photo fitted to the screen. `x` and
115
+ * `y` are how far its centre is from the centre of the screen, in px.
116
+ */
117
+ export interface PhotoTransform {
118
+ scale: number;
119
+ x: number;
120
+ y: number;
121
+ }
122
+ export declare const REST: PhotoTransform;
123
+ export declare const MIN_SCALE = 1;
124
+ export declare const MAX_SCALE = 4;
125
+ /** What a double tap zooms to. */
126
+ export declare const DOUBLE_TAP_SCALE = 2.5;
127
+ export declare const isZoomed: (transform: PhotoTransform) => boolean;
128
+ /** The largest size a photo of `photo` px takes inside `view` without being cropped. */
129
+ export declare function fitSize(photo: Size, view: Size): Size;
130
+ /**
131
+ * The transform with its pan held to the photo's edges: an edge of the photo
132
+ * never comes further in than the edge of the screen, and a side that is
133
+ * narrower than the screen stays centred. `fit` is the photo's size at scale 1.
134
+ */
135
+ export declare function clampPan(transform: PhotoTransform, fit: Size, view: Size): PhotoTransform;
136
+ /**
137
+ * Zooms to `scale` so that the point of the photo under `point` stays under
138
+ * it. `point` is measured from the centre of the screen.
139
+ */
140
+ export declare function zoomAbout(transform: PhotoTransform, scale: number, point: Point, fit: Size, view: Size): PhotoTransform;
141
+ /** Two fingers on the glass: the point between them, and how far apart they are. */
142
+ export interface PinchSample {
143
+ centre: Point;
144
+ distance: number;
145
+ }
146
+ export declare function pinchSample(first: Point, second: Point): PinchSample;
147
+ /**
148
+ * Where a pinch has taken the photo: scaled by how much the fingers have
149
+ * spread, about the point that was between them when it began, and moved with
150
+ * that point. Points are measured from the centre of the screen.
151
+ */
152
+ export declare function pinchTransform(start: PhotoTransform, from: PinchSample, now: PinchSample, fit: Size, view: Size): PhotoTransform;
153
+ /** A pinch let go a hair above the fitted size is the fitted size. */
154
+ export declare function settleZoom(transform: PhotoTransform, fit: Size, view: Size): PhotoTransform;
155
+ /** A double tap: in to 2.5 times about the tap from the fitted photo, and back to fitted from any zoom. */
156
+ export declare function doubleTapTransform(transform: PhotoTransform, point: Point, fit: Size, view: Size): PhotoTransform;
157
+ /** The photo moved by `delta` px, held to its edges. */
158
+ export declare function panBy(transform: PhotoTransform, delta: Point, fit: Size, view: Size): PhotoTransform;
159
+ /** One step of the keyboard or the wheel: in or out by half again, about the centre. */
160
+ export declare const ZOOM_STEP = 1.5;
161
+ /** Movement under this many px is a press, not a drag. */
162
+ export declare const TAP_SLOP = 8;
163
+ /** A press shorter than this is a tap, and two taps closer together than this are a double tap. */
164
+ export declare const TAP_MS = 300;
165
+ /** Two taps further apart than this are two taps. */
166
+ export declare const DOUBLE_TAP_RADIUS = 32;
167
+ export declare function isDoubleTap(previous: {
168
+ time: number;
169
+ point: Point;
170
+ } | null, now: {
171
+ time: number;
172
+ point: Point;
173
+ }): boolean;
174
+ /**
175
+ * Which way a drag on the fitted photo is going, once it has gone far enough
176
+ * to tell: `x` turns the page, `down` closes, and null is not yet known. A
177
+ * drag upwards is neither, and stays null.
178
+ */
179
+ export declare function dragAxis(delta: Point, slop?: number): "x" | "down" | null;
180
+ /** Part of the screen's width a slow swipe has to cross to turn the page. */
181
+ export declare const TURN_DISTANCE = 0.25;
182
+ /** Part of the screen's height a slow swipe down has to cross to close. */
183
+ export declare const CLOSE_DISTANCE = 0.2;
184
+ /**
185
+ * What a horizontal swipe does when the finger lifts. A flick decides by its
186
+ * direction; a slow one by how far it went. Swiping left shows the next
187
+ * photo, and the previous one in a right-to-left layout. At either end there
188
+ * is nothing to turn to.
189
+ */
190
+ export declare function swipeTurn(options: {
191
+ /** px moved; negative is to the left. */
192
+ distance: number;
193
+ /** px per ms at release; negative is to the left. */
194
+ velocity: number;
195
+ width: number;
196
+ index: number;
197
+ count: number;
198
+ rtl?: boolean;
199
+ flick: number;
200
+ }): -1 | 0 | 1;
201
+ /** Whether a swipe down closes the viewer when the finger lifts. */
202
+ export declare function swipeCloses(options: {
203
+ /** px moved down. */
204
+ distance: number;
205
+ /** px per ms at release; positive is down. */
206
+ velocity: number;
207
+ height: number;
208
+ flick: number;
209
+ }): boolean;
210
+ /**
211
+ * How far a drag past the first or last photo moves it: a third of the
212
+ * finger's travel, so it gives but does not come away.
213
+ */
214
+ export declare function resist(distance: number): number;
215
+ //# sourceMappingURL=photo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"photo.d.ts","sourceRoot":"","sources":["../../../src/components/util/photo.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,M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KAAK,CAAA;CAAE,GAAG,IAAI,EAC/C,GAAG,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GACpC,OAAO,CAMT;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,SAAW,GAAG,GAAG,GAAG,MAAM,GAAG,IAAI,CAM3E;AAED,6EAA6E;AAC7E,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,2EAA2E;AAC3E,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE;IAC/B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAUb;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,OAAO,EAAE;IACjC,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAIV;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE/C"}
@@ -0,0 +1,23 @@
1
+ import type { Action } from "svelte/action";
2
+ /**
3
+ * Where to render the node: `true` for `document.body`, an element, or a
4
+ * selector. `false` leaves the node where the template put it.
5
+ */
6
+ export type PortalTarget = boolean | HTMLElement | string;
7
+ /**
8
+ * Moves an overlay out of its ancestors so none of them can trap it: a
9
+ * `transform`, `filter` or `contain` ancestor becomes the containing block of a
10
+ * `position: fixed` child, and an `overflow: hidden` one then clips it.
11
+ *
12
+ * SSR-safe by construction: actions never run on the server, so the markup is
13
+ * rendered in place and moved on mount. The node is removed on destroy, and
14
+ * Svelte's own teardown of a node that has already gone is a no-op.
15
+ *
16
+ * Put it on the single root element of an `{#if}` block. The theme is a `.dark`
17
+ * class on an ancestor, so a node portalled to `body` keeps it only when the
18
+ * class sits on `<html>` or `<body>`.
19
+ *
20
+ * Usage: `<div use:portal>` or `<div use:portal={enabled}>`.
21
+ */
22
+ export declare const portal: Action<HTMLElement, PortalTarget | undefined>;
23
+ //# sourceMappingURL=portal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../../src/components/util/portal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAW1D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,YAAY,GAAG,SAAS,CA8BhE,CAAC"}
@@ -0,0 +1,27 @@
1
+ /** Public types and pure helpers for `PullToRefresh`. */
2
+ /** The words a `PullToRefresh` says by itself. */
3
+ export interface PullToRefreshStrings {
4
+ /** Shown while the list is being pulled, short of the threshold. */
5
+ pull: string;
6
+ /** Shown once letting go would refresh. */
7
+ release: string;
8
+ /** Shown, and announced, while the refresh runs. */
9
+ refreshing: string;
10
+ /** Announced when it has finished. */
11
+ done: string;
12
+ /** The button that refreshes without the gesture. */
13
+ refresh: string;
14
+ }
15
+ export declare const DEFAULT_PULL_TO_REFRESH_STRINGS: PullToRefreshStrings;
16
+ /**
17
+ * How far the indicator has come out for a finger that has travelled
18
+ * `distance` px: half as far, so the list feels held, and never more than one
19
+ * and a half times the threshold.
20
+ */
21
+ export declare function pullDistance(distance: number, threshold: number): number;
22
+ /**
23
+ * What scrolls the element: its nearest ancestor that scrolls on the block
24
+ * axis, or the page.
25
+ */
26
+ export declare function scrollContainerOf(element: HTMLElement): HTMLElement;
27
+ //# sourceMappingURL=pull-to-refresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull-to-refresh.d.ts","sourceRoot":"","sources":["../../../src/components/util/pull-to-refresh.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,kDAAkD;AAClD,MAAM,WAAW,oBAAoB;IACjC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,+BAA+B,EAAE,oBAM7C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAOnE"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Where a key moves the selection in a radio group laid out in a row, as
3
+ * Rating and SegmentedControl are. Kept out of the components so it can be
4
+ * tested without a DOM.
5
+ *
6
+ * It is the native radio contract: Right and Down go to the next option, Left
7
+ * and Up to the previous one, both wrap, and Left and Right swap in a
8
+ * right-to-left layout.
9
+ *
10
+ * `current` is the option that has focus, which is not always the selected
11
+ * one: a screen reader's cursor can put focus on any radio, and the keys then
12
+ * move from where the user is. It is -1 when focus is on none of them: the
13
+ * next option is then the first, and the previous one the last.
14
+ *
15
+ * `hasSelection` is false while the group is empty. A forward key then selects
16
+ * the focused option itself instead of stepping over it, so Right on an empty
17
+ * rating gives one star, not two.
18
+ *
19
+ * Returns -1 for a key that is not a navigation key, or when there is nothing
20
+ * to move to.
21
+ */
22
+ export declare function radioKeyIndex(key: string, current: number, count: number, rtl?: boolean, hasSelection?: boolean): number;
23
+ /** Whether `node` is laid out right to left. */
24
+ export declare function isRtl(node: Element): boolean;
25
+ //# sourceMappingURL=radio-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-keys.d.ts","sourceRoot":"","sources":["../../../src/components/util/radio-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CACzB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,GAAG,UAAQ,EACX,YAAY,UAAO,GACpB,MAAM,CAeR;AAED,gDAAgD;AAChD,wBAAgB,KAAK,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAE5C"}
@@ -0,0 +1,23 @@
1
+ /** Types and pure helpers for `Rating`. Kept out of the component so they can be tested without a DOM. */
2
+ /** Every built-in string. Pass a partial object to `strings` to translate. */
3
+ export interface RatingStrings {
4
+ /**
5
+ * Accessible name of one star ("4 of 5 stars"), and of a read-only
6
+ * rating as a whole ("3.5 of 5 stars"). `value` is already formatted.
7
+ */
8
+ starLabel: (value: string, max: number) => string;
9
+ /** Accessible name of the clear button that `clearable` adds. */
10
+ clearLabel: string;
11
+ /** Shown, and read, for a read-only rating without a value. */
12
+ noRating: string;
13
+ }
14
+ export declare const RATING_STRINGS: RatingStrings;
15
+ /** Number of stars: a whole number, at least one. */
16
+ export declare function starCount(max: number): number;
17
+ /** `value` held within 0..max; `null` for no rating or a value that is not a number. */
18
+ export declare function clampRating(value: number | null | undefined, max: number): number | null;
19
+ /** How much of star `star` (counted from 1) is filled, 0 to 1. */
20
+ export declare function starFill(value: number | null, star: number): number;
21
+ /** The value with at most one decimal: 4, 3.5, 3.7. */
22
+ export declare function defaultRatingFormat(value: number): string;
23
+ //# sourceMappingURL=rating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../../src/components/util/rating.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC1B;;;OAGG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,aAI5B,CAAC;AAEF,qDAAqD;AACrD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGxF;AAED,kEAAkE;AAClE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED,uDAAuD;AACvD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * The words of the components that come with text of their own: the colour
3
+ * picker, the ready-made contact form, and the two the docs site is built
4
+ * from. Each takes its own as `strings`; what is left out stays as it is here.
5
+ */
6
+ /** `ColorPicker`. */
7
+ export interface ColorPickerStrings {
8
+ /** Accessible name of the field the hex value is typed in. */
9
+ hexInput: string;
10
+ /** Accessible name of the swatch button that opens the picker. */
11
+ open: string;
12
+ /** Accessible name of the picker that opens. */
13
+ picker: string;
14
+ /** Accessible name of the hue slider in it. */
15
+ hue: string;
16
+ /** Accessible name of the colour map: the two sliders below, on one surface. */
17
+ area: string;
18
+ /** Accessible name of the map's slider that goes across. */
19
+ saturation: string;
20
+ /** Accessible name of the map's slider that goes up and down. */
21
+ lightness: string;
22
+ /** The message under the field while what is typed is not a hex colour. */
23
+ invalidHex: string;
24
+ }
25
+ export declare const DEFAULT_COLOR_PICKER_STRINGS: ColorPickerStrings;
26
+ /** `ContactForm`: every label, placeholder and message of the form. */
27
+ export interface ContactFormStrings {
28
+ heading: string;
29
+ nameLabel: string;
30
+ namePlaceholder: string;
31
+ emailLabel: string;
32
+ emailPlaceholder: string;
33
+ messageLabel: string;
34
+ messagePlaceholder: string;
35
+ subscribeLabel: string;
36
+ submit: string;
37
+ /** Under a field left empty or filled in wrongly. */
38
+ nameRequired: string;
39
+ emailRequired: string;
40
+ emailInvalid: string;
41
+ messageRequired: string;
42
+ /** The box above the fields when the form could not be sent: its three lines. */
43
+ errorTitle: string;
44
+ errorMessage: string;
45
+ errorRecovery: string;
46
+ }
47
+ export declare const DEFAULT_CONTACT_FORM_STRINGS: ContactFormStrings;
48
+ /** `PropsTable`. The caption is the `caption` prop. */
49
+ export interface PropsTableStrings {
50
+ name: string;
51
+ type: string;
52
+ required: string;
53
+ default: string;
54
+ description: string;
55
+ yes: string;
56
+ no: string;
57
+ /** Shown instead of the table when there are no props. */
58
+ empty: string;
59
+ }
60
+ export declare const DEFAULT_PROPS_TABLE_STRINGS: PropsTableStrings;
61
+ /** `ComponentDemo`. */
62
+ export interface ComponentDemoStrings {
63
+ /** The two tabs, and what the switch between them is called. */
64
+ preview: string;
65
+ code: string;
66
+ showPreview: string;
67
+ showCode: string;
68
+ }
69
+ export declare const DEFAULT_COMPONENT_DEMO_STRINGS: ComponentDemoStrings;
70
+ /**
71
+ * Lays `strings` layers over a component's defaults, later layers winning. A
72
+ * key whose value is `undefined` is skipped, so `strings={{ close: t.close }}`
73
+ * with `t.close` missing keeps the default instead of blanking it. `null` and
74
+ * the empty string are kept: those are choices.
75
+ */
76
+ export declare function mergeStrings<T extends object>(defaults: T, ...layers: Array<Partial<T> | null | undefined>): T;
77
+ //# sourceMappingURL=ready-made-strings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ready-made-strings.d.ts","sourceRoot":"","sources":["../../../src/components/util/ready-made-strings.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qBAAqB;AACrB,MAAM,WAAW,kBAAkB;IAC/B,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,4BAA4B,EAAE,kBAS1C,CAAC;AAEF,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,4BAA4B,EAAE,kBAiB1C,CAAC;AAEF,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,2BAA2B,EAAE,iBASzC,CAAC;AAEF,uBAAuB;AACvB,MAAM,WAAW,oBAAoB;IACjC,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,8BAA8B,EAAE,oBAK5C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EACzC,QAAQ,EAAE,CAAC,EACX,GAAG,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAChD,CAAC,CASH"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * `scroll-padding-bottom` on a scrolling box, shared between the things that
3
+ * lie over its bottom edge.
4
+ *
5
+ * Each of them saves what was there and puts it back when it leaves. Done one
6
+ * by one that goes wrong as soon as two overlap in time: the second saves the
7
+ * first one's value as "what was there", and if the first leaves first, the
8
+ * second later restores a value nobody owns any more. Here the box's own
9
+ * value is saved once, the largest request is what is set, and the box gets
10
+ * its own value back when the last request is released.
11
+ */
12
+ /**
13
+ * Asks for room at the bottom of `container`. `set` gives or changes the
14
+ * amount in px; `release` withdraws the request. Call it in the browser.
15
+ */
16
+ export declare function reserveScrollPaddingBottom(container: HTMLElement): {
17
+ set: (px: number) => void;
18
+ release: () => void;
19
+ };
20
+ //# sourceMappingURL=scroll-padding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-padding.d.ts","sourceRoot":"","sources":["../../../src/components/util/scroll-padding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,WAAW,GAAG;IAChE,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAuBA"}
@@ -0,0 +1,16 @@
1
+ import type { Component } from "svelte";
2
+ /** An icon component, as `@lucide/svelte` icons are. */
3
+ export type SegmentedControlIcon = Component<{
4
+ size?: number;
5
+ class?: string;
6
+ }>;
7
+ /** One entry of SegmentedControl's `options`. */
8
+ export interface SegmentedControlOption {
9
+ value: string;
10
+ label: string;
11
+ /** Rendered before the label. Decorative: the label names the segment. */
12
+ icon?: SegmentedControlIcon;
13
+ /** A disabled segment cannot be chosen, and the arrow keys skip it. */
14
+ disabled?: boolean;
15
+ }
16
+ //# sourceMappingURL=segmented-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../../src/components/util/segmented-control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,wDAAwD;AACxD,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEhF,iDAAiD;AACjD,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}