@satinhq/kit 0.1.0-beta.2 → 0.1.0-beta.4

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 (309) hide show
  1. package/NOTICE +2 -2
  2. package/README.md +2 -3
  3. package/dist/acknowledgements/inventory.json +5 -5
  4. package/dist/actions/RowActions.d.ts +4 -4
  5. package/dist/actions/RowActions.js +93 -27
  6. package/dist/actions/fullSwipeContact.d.ts +73 -0
  7. package/dist/actions/fullSwipeContact.js +186 -0
  8. package/dist/actions/rowScrub.d.ts +7 -4
  9. package/dist/actions/rowScrub.js +39 -37
  10. package/dist/actions/types.d.ts +13 -7
  11. package/dist/app/InstallComponents.d.ts +4 -7
  12. package/dist/app/InstallComponents.js +7 -7
  13. package/dist/app/InstallationDiagnostics.d.ts +2 -1
  14. package/dist/app/InstallationDiagnostics.js +2 -1
  15. package/dist/app/appearance.d.ts +5 -3
  16. package/dist/app/appearance.js +5 -3
  17. package/dist/app/appearanceStore.d.ts +3 -2
  18. package/dist/app/buildInfo.d.ts +4 -4
  19. package/dist/app/buildInfo.js +2 -2
  20. package/dist/app/definition.d.ts +11 -3
  21. package/dist/app/definition.js +2 -0
  22. package/dist/app/head.d.ts +2 -1
  23. package/dist/app/head.js +13 -16
  24. package/dist/app/inlineCSP.d.ts +6 -0
  25. package/dist/app/inlineCSP.js +25 -0
  26. package/dist/app/install.d.ts +1 -0
  27. package/dist/app/install.js +5 -2
  28. package/dist/app/installCheck.js +32 -86
  29. package/dist/app/installContext.d.ts +10 -5
  30. package/dist/app/installContext.js +2 -0
  31. package/dist/app/installCustom.js +1 -0
  32. package/dist/app/installExperience.js +0 -60
  33. package/dist/app/installationFailure.d.ts +3 -2
  34. package/dist/app/installationFailure.js +1 -1
  35. package/dist/app/launchScreen.d.ts +6 -2
  36. package/dist/app/launchScreen.js +104 -1
  37. package/dist/app/launchScreenRuntime.d.ts +31 -4
  38. package/dist/app/launchScreenRuntime.js +150 -22
  39. package/dist/app/launchWatchdog.js +25 -65
  40. package/dist/app/platformScripts.js +11 -0
  41. package/dist/app/styles.d.ts +3 -0
  42. package/dist/app/styles.js +42 -0
  43. package/dist/app/viewportValue.d.ts +2 -1
  44. package/dist/app/vite.d.ts +4 -0
  45. package/dist/app/vite.js +22 -24
  46. package/dist/content/content.d.ts +35 -30
  47. package/dist/content/content.js +19 -16
  48. package/dist/content/layout.d.ts +10 -2
  49. package/dist/content/layout.js +4 -2
  50. package/dist/content/scaledMetric.d.ts +2 -1
  51. package/dist/content/scaledMetric.js +2 -1
  52. package/dist/controls/ColorPicker.d.ts +2 -4
  53. package/dist/controls/ColorPicker.js +2 -4
  54. package/dist/controls/DatePicker.d.ts +4 -4
  55. package/dist/controls/DatePicker.js +2 -2
  56. package/dist/controls/ProgressView.d.ts +4 -4
  57. package/dist/controls/ProgressView.js +1 -2
  58. package/dist/controls/civilDate.d.ts +1 -1
  59. package/dist/controls/civilDate.js +1 -1
  60. package/dist/data/database.d.ts +9 -8
  61. package/dist/data/database.js +4 -4
  62. package/dist/docs/components/file-importer.md +1 -1
  63. package/dist/docs/components/paste-button.md +1 -1
  64. package/dist/docs/components/photos-picker.md +1 -1
  65. package/dist/docs/components/share-link.md +1 -1
  66. package/dist/docs/limitations.md +1 -1
  67. package/dist/docs/push.md +3 -3
  68. package/dist/docs/reference.md +1888 -0
  69. package/dist/docs/tailwind.md +76 -0
  70. package/dist/docs/tokens.md +1 -1
  71. package/dist/gestures/GestureView.d.ts +3 -1
  72. package/dist/gestures/GestureView.js +2 -1
  73. package/dist/gestures/gesture.d.ts +22 -2
  74. package/dist/gestures/gesture.js +7 -2
  75. package/dist/glass/GlassEffect.d.ts +2 -1
  76. package/dist/glass/GlassEffect.js +2 -1
  77. package/dist/glass/GlassPresentation.d.ts +1 -0
  78. package/dist/glass/GlassPresentation.js +21 -4
  79. package/dist/glass/TabBar.js +23 -1
  80. package/dist/glass/errorAlert.js +2 -1
  81. package/dist/glass/errors.d.ts +3 -1
  82. package/dist/glass/fallback/runtime.d.ts +1 -0
  83. package/dist/glass/fallback/runtime.js +8 -1
  84. package/dist/glass/lens/controlLift.d.ts +1 -1
  85. package/dist/glass/lens/controlLift.js +1 -1
  86. package/dist/glass/lens/interactivePress.d.ts +2 -2
  87. package/dist/glass/lens/interactivePress.js +2 -2
  88. package/dist/glass/lens/menu-opening-native-fits.json +1 -1
  89. package/dist/glass/lens/menuContextFit.json +1 -1
  90. package/dist/glass/lens/menuDropFit.json +1 -1
  91. package/dist/glass/lens/menuField.d.ts +2 -2
  92. package/dist/glass/lens/menuField.js +3 -3
  93. package/dist/glass/lens/menuGlyphDropFit.json +1 -1
  94. package/dist/glass/lens/menuMorphFit.json +1 -1
  95. package/dist/glass/lens/menuMorphPhoneFit.json +1 -1
  96. package/dist/glass/lens/tabAccessoryMotion.d.ts +1 -1
  97. package/dist/glass/lens/tabSearchMember.d.ts +1 -1
  98. package/dist/glass/lens/tabSearchMember.js +1 -1
  99. package/dist/glass/liquidContext.d.ts +2 -0
  100. package/dist/glass/menuPresenter.d.ts +2 -0
  101. package/dist/glass/menuPresenter.js +1 -1
  102. package/dist/glass/regions.d.ts +3 -2
  103. package/dist/glass/regions.js +1 -1
  104. package/dist/glass/renderSpecs.d.ts +1 -0
  105. package/dist/glass/renderSpecs.js +1 -0
  106. package/dist/glass/shapeTrack.d.ts +1 -1
  107. package/dist/glass/submenuMotion.d.ts +1 -1
  108. package/dist/glass/submenuMotion.js +1 -1
  109. package/dist/glass/webgpu/controlRim.d.ts +29 -0
  110. package/dist/glass/webgpu/controlRim.js +68 -0
  111. package/dist/glass/webgpu/entry.worker.js +3 -6
  112. package/dist/glass/webgpu/frameClock.d.ts +6 -2
  113. package/dist/glass/webgpu/frameClock.js +9 -2
  114. package/dist/glass/webgpu/frameProbe.d.ts +1 -1
  115. package/dist/glass/webgpu/frameProbe.js +3 -3
  116. package/dist/glass/webgpu/passes.d.ts +2 -2
  117. package/dist/glass/webgpu/production.d.ts +1 -0
  118. package/dist/glass/webgpu/production.js +31 -1
  119. package/dist/glass/webgpu/raster.d.ts +18 -0
  120. package/dist/glass/webgpu/raster.js +105 -15
  121. package/dist/glass/webgpu/rasterMaterial.d.ts +4 -0
  122. package/dist/glass/webgpu/rasterMaterial.js +17 -1
  123. package/dist/glass/webgpu/rasterUniforms.js +9 -0
  124. package/dist/glass/webgpu/regionScene.d.ts +4 -1
  125. package/dist/glass/webgpu/regionScene.js +30 -1
  126. package/dist/glass/webgpu/renderer.js +23 -7
  127. package/dist/glass/webgpu/shaders.d.ts +2 -2
  128. package/dist/glass/webgpu/shaders.js +5 -1
  129. package/dist/haptics/SensoryButton.d.ts +4 -4
  130. package/dist/haptics/SensoryButton.js +3 -3
  131. package/dist/image/Image.d.ts +6 -3
  132. package/dist/image/Image.js +4 -3
  133. package/dist/image/asset.d.ts +2 -1
  134. package/dist/keyboard/adapter.d.ts +3 -4
  135. package/dist/keyboard/adapter.js +2 -2
  136. package/dist/keyboard/avoidance.d.ts +1 -1
  137. package/dist/keyboard/avoidance.js +1 -1
  138. package/dist/keyboard/geometry.d.ts +1 -1
  139. package/dist/keyboard/motion.d.ts +1 -1
  140. package/dist/keyboard/motion.js +1 -1
  141. package/dist/list-form/ListForm.d.ts +10 -9
  142. package/dist/list-form/ListForm.js +3 -3
  143. package/dist/list-form/ListItem.js +1 -1
  144. package/dist/list-form/RowLabel.d.ts +1 -1
  145. package/dist/list-form/RowLabel.js +1 -1
  146. package/dist/list-form/Slider.js +1 -1
  147. package/dist/list-form/editMotion.js +1 -1
  148. package/dist/list-form/editing.d.ts +10 -11
  149. package/dist/list-form/editing.js +5 -6
  150. package/dist/list-form/offsets.d.ts +2 -2
  151. package/dist/list-form/offsets.js +2 -2
  152. package/dist/media/react.d.ts +2 -1
  153. package/dist/media/react.js +2 -1
  154. package/dist/media/types.d.ts +6 -3
  155. package/dist/motion/TransitionView.d.ts +4 -2
  156. package/dist/motion/TransitionView.js +3 -2
  157. package/dist/motion/animationValue.d.ts +2 -2
  158. package/dist/motion/animationValue.js +9 -10
  159. package/dist/motion/matchedGeometry.d.ts +10 -9
  160. package/dist/motion/matchedGeometry.js +9 -9
  161. package/dist/motion/springTrack.d.ts +1 -2
  162. package/dist/motion/springTrack.js +10 -5
  163. package/dist/motion/transition.d.ts +4 -1
  164. package/dist/motion/transition.js +2 -0
  165. package/dist/navigation/DetailList.d.ts +1 -1
  166. package/dist/navigation/DetailList.js +1 -1
  167. package/dist/navigation/ScreenContainer.js +1 -1
  168. package/dist/navigation/Sidebar.d.ts +3 -1
  169. package/dist/navigation/Sidebar.js +1 -1
  170. package/dist/navigation/SidebarSymbol.d.ts +2 -1
  171. package/dist/navigation/SidebarSymbol.js +2 -1
  172. package/dist/navigation/chromeCurves.js +1 -1
  173. package/dist/navigation/navigationContext.d.ts +2 -1
  174. package/dist/navigation/navigationContext.js +2 -1
  175. package/dist/navigation/splitContext.d.ts +2 -1
  176. package/dist/navigation/splitContext.js +2 -1
  177. package/dist/navigation/toolbarMinimization.d.ts +4 -3
  178. package/dist/navigation/types.d.ts +8 -6
  179. package/dist/navigation/zoomGeometry.js +1 -1
  180. package/dist/navigation/zoomMotion.d.ts +1 -1
  181. package/dist/navigation/zoomMotion.js +2 -2
  182. package/dist/navigation/zoomTransition.js +3 -4
  183. package/dist/presentation/Presentation.d.ts +10 -9
  184. package/dist/presentation/Presentation.js +4 -3
  185. package/dist/presentation/model.d.ts +2 -1
  186. package/dist/presentation/presentationSource.js +1 -1
  187. package/dist/press/Pressable.d.ts +5 -1
  188. package/dist/press/Pressable.js +2 -0
  189. package/dist/press/stateMachine.d.ts +1 -1
  190. package/dist/public/Label.d.ts +2 -1
  191. package/dist/public/Label.js +2 -1
  192. package/dist/public/Screen.d.ts +4 -6
  193. package/dist/public/actions.d.ts +2 -1
  194. package/dist/public/actions.js +2 -1
  195. package/dist/public/buttonBorderShape.d.ts +2 -1
  196. package/dist/public/colors.d.ts +7 -4
  197. package/dist/public/colors.js +3 -2
  198. package/dist/public/controlStyle.d.ts +17 -14
  199. package/dist/public/controls.d.ts +29 -28
  200. package/dist/public/controls.js +25 -24
  201. package/dist/public/deviceActions.d.ts +6 -4
  202. package/dist/public/deviceActions.js +4 -2
  203. package/dist/public/environment.d.ts +16 -13
  204. package/dist/public/environment.js +11 -9
  205. package/dist/public/filePickers.d.ts +6 -4
  206. package/dist/public/filePickers.js +3 -2
  207. package/dist/public/glass.d.ts +8 -6
  208. package/dist/public/glass.js +2 -2
  209. package/dist/public/glassValue.d.ts +3 -4
  210. package/dist/public/glassValue.js +3 -4
  211. package/dist/public/keyboard.d.ts +4 -1
  212. package/dist/public/keyboard.js +2 -1
  213. package/dist/public/navigationTransition.d.ts +6 -6
  214. package/dist/public/navigationTransition.js +3 -3
  215. package/dist/public/presentation.d.ts +8 -7
  216. package/dist/public/presentation.js +5 -5
  217. package/dist/public/runtime.d.ts +9 -8
  218. package/dist/public/runtime.js +7 -7
  219. package/dist/public/scroll.d.ts +6 -3
  220. package/dist/public/scroll.js +3 -1
  221. package/dist/public/structure.d.ts +2 -2
  222. package/dist/public/toolbar.d.ts +15 -11
  223. package/dist/public/toolbar.js +13 -8
  224. package/dist/reachability/model.d.ts +4 -3
  225. package/dist/reachability/react.d.ts +4 -1
  226. package/dist/reachability/react.js +2 -1
  227. package/dist/root/SatinRoot.d.ts +3 -3
  228. package/dist/root/SatinRoot.js +12 -36
  229. package/dist/root/mountSatin.d.ts +1 -1
  230. package/dist/root/mountSatin.js +26 -35
  231. package/dist/root/runtimeContext.d.ts +2 -1
  232. package/dist/root/runtimeContext.js +2 -1
  233. package/dist/safe-area/Overlay.d.ts +3 -2
  234. package/dist/safe-area/Overlay.js +2 -1
  235. package/dist/safe-area/SafeAreaInset.d.ts +11 -7
  236. package/dist/safe-area/SafeAreaInset.js +10 -9
  237. package/dist/safe-area/context.d.ts +3 -3
  238. package/dist/safe-area/context.js +1 -1
  239. package/dist/safe-area/displayCorners.d.ts +4 -2
  240. package/dist/safe-area/displayCorners.js +4 -2
  241. package/dist/safe-area/modifiers.d.ts +14 -10
  242. package/dist/safe-area/modifiers.js +10 -6
  243. package/dist/safe-area/useSafeAreaMetrics.js +2 -2
  244. package/dist/scroll/ScrollSurface.d.ts +5 -5
  245. package/dist/scroll/ScrollSurface.js +6 -2
  246. package/dist/scroll/ScrollTarget.d.ts +1 -1
  247. package/dist/scroll/ScrollTarget.js +1 -1
  248. package/dist/scroll/edgePolicy.d.ts +2 -2
  249. package/dist/scroll/position.d.ts +5 -3
  250. package/dist/scroll/position.js +1 -1
  251. package/dist/scroll/screenGeometry.d.ts +1 -1
  252. package/dist/scroll/screenGeometry.js +1 -1
  253. package/dist/scroll/types.d.ts +1 -1
  254. package/dist/search/PadSearchDrawer.d.ts +7 -0
  255. package/dist/search/PadSearchDrawer.js +8 -0
  256. package/dist/search/PadSearchPresentationContext.d.ts +6 -0
  257. package/dist/search/PadSearchPresentationContext.js +4 -0
  258. package/dist/search/SearchDrawer.d.ts +1 -1
  259. package/dist/search/SearchDrawer.js +7 -2
  260. package/dist/search/SearchSuggestionsPopover.d.ts +6 -0
  261. package/dist/search/SearchSuggestionsPopover.js +42 -0
  262. package/dist/search/SearchToolbarField.d.ts +2 -1
  263. package/dist/search/SearchToolbarField.js +28 -7
  264. package/dist/search/padSearchBarMotion.d.ts +69 -0
  265. package/dist/search/padSearchBarMotion.js +73 -0
  266. package/dist/search/padSearchFieldSamples.json +491 -0
  267. package/dist/search/searchMotion.d.ts +1 -1
  268. package/dist/search/searchMotion.js +1 -1
  269. package/dist/search/searchPlacement.d.ts +3 -0
  270. package/dist/search/searchPlacement.js +7 -0
  271. package/dist/search/searchable.d.ts +14 -12
  272. package/dist/search/usePadSearchFieldMotion.d.ts +4 -0
  273. package/dist/search/usePadSearchFieldMotion.js +100 -0
  274. package/dist/search/useSearchPresentation.d.ts +2 -1
  275. package/dist/search/useSearchPresentation.js +24 -6
  276. package/dist/server.d.ts +4 -4
  277. package/dist/server.js +4 -4
  278. package/dist/shapes/corners.d.ts +3 -3
  279. package/dist/shapes/corners.js +2 -3
  280. package/dist/styles.css +8302 -8236
  281. package/dist/sw/vite.d.ts +4 -0
  282. package/dist/sw/vite.js +2 -0
  283. package/dist/symbols/Symbol.d.ts +7 -5
  284. package/dist/symbols/Symbol.js +5 -3
  285. package/dist/symbols/catalogue.d.ts +1 -1
  286. package/dist/symbols/types.d.ts +6 -4
  287. package/dist/tabs/TabSection.d.ts +3 -2
  288. package/dist/tabs/TabSection.js +2 -1
  289. package/dist/tabs/TabView.js +54 -51
  290. package/dist/tasks/useTask.d.ts +5 -4
  291. package/dist/tasks/useTask.js +4 -3
  292. package/dist/testing.d.ts +3 -2
  293. package/dist/testing.js +3 -2
  294. package/dist/text-input/TextEditor.js +7 -3
  295. package/dist/text-input/focusChain.d.ts +4 -3
  296. package/dist/text-input/focusChain.js +3 -2
  297. package/dist/text-input/kinds.d.ts +1 -1
  298. package/dist/web/WebView.d.ts +10 -3
  299. package/dist/web/WebView.js +3 -2
  300. package/dist/web/authentication.d.ts +12 -1
  301. package/dist/web/authentication.js +2 -1
  302. package/dist/web/openURL.d.ts +10 -4
  303. package/dist/web/openURL.js +4 -2
  304. package/dist/web/useWebAuthentication.d.ts +2 -1
  305. package/dist/web/useWebAuthentication.js +2 -1
  306. package/dist/zoom/Zoomable.d.ts +3 -3
  307. package/dist/zoom/Zoomable.js +2 -2
  308. package/package.json +4 -4
  309. package/dist/docs/swiftui-reference.md +0 -1895
@@ -3,20 +3,22 @@ import type { ComponentType } from 'react';
3
3
  import type { ScrollSnapshot } from '../scroll/types.js';
4
4
  declare const screenParamsType: unique symbol;
5
5
  export type PresentationKind = 'push';
6
- /** The progress phase of a navigation transition. */
6
+ /** Where a screen is in a navigation transition: `entering`, `exiting` or `settled`. */
7
7
  export type TransitionPhase = 'settled' | 'entering' | 'exiting';
8
8
  export type TransitionOperation = 'pop' | 'popToRoot' | 'push' | 'replace';
9
+ /** Whether a pushed screen shows its back button. `automatic` shows it; `hidden` removes it. */
9
10
  export type NavigationBackButtonBehavior = 'automatic' | 'hidden';
10
- /** `toolbarTitleDisplayMode`; `inlineLarge` draws the large title inside the bar row. */
11
+ /** How a screen title is drawn: `inline` in the bar, `large` below it, `inlineLarge` large inside
12
+ * the bar row, or `none`. */
11
13
  export type TitleDisplayMode = 'inline' | 'large' | 'inlineLarge' | 'none';
12
- /** `toolbarVisibility(_:for: .navigationBar)`: a hidden bar reserves no row. */
14
+ /** Whether the navigation bar shows. A hidden bar reserves no row. */
13
15
  export type Visibility = 'automatic' | 'visible' | 'hidden';
14
16
  export type NavigationBarDefinition<Params = unknown> = Readonly<{
15
17
  backButton?: NavigationBackButtonBehavior;
16
18
  display?: TitleDisplayMode;
17
19
  visibility?: Visibility;
18
20
  title: string | ((params: Params) => string);
19
- /** SwiftUI `navigationSubtitle`: a line under the title, inline or large. */
21
+ /** A line under the title, inline or large. */
20
22
  subtitle?: string;
21
23
  }>;
22
24
  export type TransitionControllerContext = Readonly<{
@@ -120,12 +122,12 @@ export type ScreenEntry<Id extends string = string, Params = unknown> = Readonly
120
122
  export type NavigatorState<Entry extends ScreenEntry = ScreenEntry> = Readonly<{
121
123
  entries: readonly Entry[];
122
124
  }>;
123
- /** The lifecycle state of a retained navigation entry. */
125
+ /** Whether a screen is covered by another, and the phase of its current transition. */
124
126
  export type ScreenLifecycle = Readonly<{
125
127
  isCovered: boolean;
126
128
  phase: TransitionPhase;
127
129
  }>;
128
- /** Callbacks for a retained navigation entry appearing, being covered or disappearing. */
130
+ /** The `appear` and `disappear` callbacks for `useScreenLifecycle`. */
129
131
  export type ScreenLifecycleCallbacks = Readonly<{
130
132
  appear?: () => void;
131
133
  disappear?: () => void;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * The geometry of SwiftUI's zoom navigation transition, as pure functions of a rectangle.
2
+ * Zoom navigation geometry, as pure functions of a rectangle.
3
3
  *
4
4
  * At every moment the pushed screen is shown inside a rounded "window" rectangle that moves between
5
5
  * the source view's frame and the full screen. As natively, the screen's content is scaled so its
@@ -9,7 +9,7 @@ export type ZoomSprings = Readonly<{
9
9
  size: ZoomSpring;
10
10
  }>;
11
11
  /**
12
- * Push: the centre and the width move together, critically damped (half way at 88 ms; SwiftUI's
12
+ * Push: the centre and the width move together, critically damped (half way at 88 ms; the measured
13
13
  * duration 0.33 s); the height lags slightly. Native moves the width with the centre, so the
14
14
  * width shares the centre's spring here and the height takes the size spring (rms 0.002, 51 ticks).
15
15
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Measured values of SwiftUI's `.navigationTransition(.zoom(sourceID:in:))` on iOS 27.
2
+ * Measured spring values for the zoom navigation transition on iOS 27.
3
3
  *
4
4
  * native reference: a stock native fixture (a 180 pt tile with a 10 pt corner in a
5
5
  * NavigationStack grid, pushed to a full-screen page), iPhone 17 Pro Max Simulator, iOS 27.0.
@@ -10,7 +10,7 @@
10
10
  * (the measured reference, October 11).
11
11
  */
12
12
  /**
13
- * Push: the centre and the width move together, critically damped (half way at 88 ms; SwiftUI's
13
+ * Push: the centre and the width move together, critically damped (half way at 88 ms; the measured
14
14
  * duration 0.33 s); the height lags slightly. Native moves the width with the centre, so the
15
15
  * width shares the centre's spring here and the height takes the size spring (rms 0.002, 51 ticks).
16
16
  */
@@ -1,6 +1,5 @@
1
1
  /*
2
- * SwiftUI's zoom navigation transition: `matchedTransitionSource(id:in:)` on the view a push starts
3
- * from, and `.navigationTransition(.zoom(sourceID:in:))` on the pushed screen.
2
+ * Zoom navigation connects a MatchedTransitionSource to a screen configured with a zoom transition.
4
3
  *
5
4
  * A push whose screen asks for a zoom, and whose source is on screen in the screen it covers, grows
6
5
  * out of the source instead of sliding in. Its pop (the back button) and a downward drag on the
@@ -116,7 +115,7 @@ export function visibleZoomSource(entryKey, rear, excluded) {
116
115
  }
117
116
  return chosen?.view;
118
117
  }
119
- /** SwiftUI zooms only from a source the user can see: at least part of it in the viewport. */
118
+ /** Zoom transitions require a visible source: at least part of it in the viewport. */
120
119
  function isOnScreen(view) {
121
120
  const bounds = view.getBoundingClientRect();
122
121
  if (!(bounds.width > 0 && bounds.height > 0))
@@ -950,7 +949,7 @@ export function windowKeyframes(from, to, springs, velocity) {
950
949
  frames.push({ ms: frames.at(-1).ms + FRAME_MS, rect: to });
951
950
  return frames;
952
951
  }
953
- /** A measured Core Animation spring as Satin's `Animation` (SwiftUI's duration/bounce mapping is
952
+ /** A measured Core Animation spring as Satin's `Animation` (the duration/bounce representation is
954
953
  * exact: omega = 2π / duration, damping ratio = 1 − bounce). */
955
954
  function animationOf(spring) {
956
955
  return SpringAnimation.spring({
@@ -19,7 +19,7 @@ export type SheetProps = PresentationProps & {
19
19
  * content that fills the card (Now Playing). A modal NavigationStack root's title is drawn by
20
20
  * its navigation bar either way. */
21
21
  titleVisibility?: 'visible' | 'hidden';
22
- /** SwiftUI's `presentationDragIndicator`. `automatic` shows it only when there is more than one
22
+ /** Control the sheet drag indicator. `automatic` shows it only when there is more than one
23
23
  * detent to drag between, as native does. */
24
24
  dragIndicator?: 'automatic' | 'visible' | 'hidden';
25
25
  };
@@ -27,11 +27,11 @@ export declare function Sheet(props: SheetProps): import("react").JSX.Element |
27
27
  export type FullScreenCoverProps = PresentationProps & {
28
28
  children: ReactNode;
29
29
  };
30
- /** SwiftUI's `fullScreenCover`: an opaque presentation over the whole screen that slides up from
30
+ /** An opaque presentation over the whole screen that slides up from
31
31
  * the bottom edge. It has no grabber and no interactive dismissal; close it with its binding or
32
32
  * `useDismiss()`. Its title labels the dialog for assistive technology and is not drawn. */
33
33
  export declare function FullScreenCover({ children, ...props }: FullScreenCoverProps): import("react").JSX.Element | null;
34
- /** The controlled text and keyboard intent of an alert's embedded field. */
34
+ /** The text field inside an alert: its label, controlled text, prompt and keyboard intent. */
35
35
  export type AlertTextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'onSubmit' | 'size' | 'placeholder'> & {
36
36
  label: string;
37
37
  value: string;
@@ -42,20 +42,21 @@ export type AlertTextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'v
42
42
  labelPlacement?: 'leading' | 'above';
43
43
  prompt?: string;
44
44
  };
45
- /** An alert's presentation binding, message and leaf actions. */
45
+ /** An alert's presentation binding, title, message, actions and optional text field. */
46
46
  export type AlertProps = PresentationProps & {
47
47
  message?: string;
48
48
  actions: readonly ActionItem[];
49
49
  textField?: AlertTextFieldProps;
50
50
  };
51
- /** A confirmation dialog's presentation binding, leaf actions and optional anchor. */
51
+ /** A confirmation dialog's presentation binding, title, message, actions and optional anchor. */
52
52
  export type ConfirmationDialogProps = Omit<AlertProps, 'textField'> & {
53
53
  /** The view the popover points at. Defaults to the control that was pressed to open it (a swipe
54
- * action's row). Native draws no Cancel
55
- * button in the popover: a tap outside cancels, and the Cancel action stays for assistive technology. */
54
+ * action's row). The popover draws no Cancel button: a tap outside cancels, and the Cancel
55
+ * action stays for assistive technology. */
56
56
  anchor?: RefObject<HTMLElement | null>;
57
57
  };
58
- /** `alert`: a titled presentation with up to three leaf actions and an optional text field. */
58
+ /** A centred alert with a title, an optional message, up to three actions and an optional text
59
+ * field. */
59
60
  export declare function Alert({ message, actions, textField, ...props }: AlertProps): import("react").JSX.Element;
60
- /** `confirmationDialog`: a titled action presentation anchored to its initiating control. */
61
+ /** A titled set of actions, such as Delete and Cancel, shown next to the control that opened it. */
61
62
  export declare function ConfirmationDialog({ message, actions, anchor, ...props }: ConfirmationDialogProps): import("react").JSX.Element;
@@ -23,7 +23,7 @@ export function Sheet(props) {
23
23
  props.onDismiss?.();
24
24
  } })) : null;
25
25
  }
26
- /** SwiftUI's `fullScreenCover`: an opaque presentation over the whole screen that slides up from
26
+ /** An opaque presentation over the whole screen that slides up from
27
27
  * the bottom edge. It has no grabber and no interactive dismissal; close it with its binding or
28
28
  * `useDismiss()`. Its title labels the dialog for assistive technology and is not drawn. */
29
29
  export function FullScreenCover({ children, ...props }) {
@@ -70,7 +70,8 @@ function validateActions(actions, alert) {
70
70
  if (actions.filter(action => action.role === 'cancel').length > 1)
71
71
  throw new Error('Presentation accepts at most one Cancel action.');
72
72
  }
73
- /** `alert`: a titled presentation with up to three leaf actions and an optional text field. */
73
+ /** A centred alert with a title, an optional message, up to three actions and an optional text
74
+ * field. */
74
75
  export function Alert({ message, actions, textField, ...props }) {
75
76
  const isPresented = useColdLaunchPresentation(props.isPresented, props.onPresentedChange);
76
77
  props = { ...props, isPresented };
@@ -80,7 +81,7 @@ export function Alert({ message, actions, textField, ...props }) {
80
81
  // Input alerts retain the description while their editing target owns focus.
81
82
  return (_jsxs(Surface, { ...props, kind: "alert", describedBy: textField && message ? messageId : undefined, children: [message && (_jsx("p", { id: messageId, className: "satin-presentation-message", children: message })), textField && _jsx(AlertTextField, { ...textField }), _jsx(Actions, { actions: actions, active: props.isPresented, dismiss: () => props.onPresentedChange(false) })] }));
82
83
  }
83
- /** `confirmationDialog`: a titled action presentation anchored to its initiating control. */
84
+ /** A titled set of actions, such as Delete and Cancel, shown next to the control that opened it. */
84
85
  export function ConfirmationDialog({ message, actions, anchor, ...props }) {
85
86
  const isPresented = useColdLaunchPresentation(props.isPresented, props.onPresentedChange);
86
87
  props = { ...props, isPresented };
@@ -41,7 +41,8 @@ export declare function sheetCornerShape(frame: ReturnType<typeof sheetFrame>, p
41
41
  bottomCornerRadius?: number | undefined;
42
42
  cornerStyle: 'continuous';
43
43
  };
44
- /** `PresentationDetent`: a sheet's supported resting height. */
44
+ /** A height a sheet can rest at: `medium`, `large`, a fixed `height` in points or a `fraction` of
45
+ * the available height. */
45
46
  export type PresentationDetent = 'medium' | 'large' | Readonly<{
46
47
  height: number;
47
48
  }> | Readonly<{
@@ -1,7 +1,7 @@
1
1
  /** The control a presentation grows from when the app names no anchor. Native iOS 27 presents
2
2
  * `confirmationDialog` as a popover from the view that asked for it: a swipe action's dialog points
3
3
  * at its row, a toolbar button's dialog grows out of the button. Satin's natural structure attaches
4
- * the dialog at screen level, so the pressed control stands in for SwiftUI's attachment point. */
4
+ * the dialog at screen level, so the pressed control supplies the attachment point. */
5
5
  const lastPress = new WeakMap();
6
6
  const tracked = new WeakSet();
7
7
  // A press older than this did not open the dialog (a timer or a data change did).
@@ -1,7 +1,9 @@
1
1
  import { type ButtonHTMLAttributes, type CSSProperties, type ReactNode } from 'react';
2
2
  import type { PressState } from './stateMachine.js';
3
- /** DOM activation handlers reserved for the Pressable interaction policy. */
3
+ /** The DOM event handlers `Pressable` owns. Use `onPress` and `onPressStateChange` instead. */
4
4
  export type PressableOwnedHandlers = 'children' | 'disabled' | 'onBlur' | 'onClick' | 'onKeyDown' | 'onKeyUp' | 'onLostPointerCapture' | 'onPointerCancel' | 'onPointerDown' | 'onPointerMove' | 'onPointerUp';
5
+ /** A pressable's `onPress` action, content and press feedback. An `iconOnly` pressable needs an
6
+ * `aria-label`. */
5
7
  export type PressableProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, PressableOwnedHandlers> & Readonly<{
6
8
  children?: ReactNode;
7
9
  disabled?: boolean;
@@ -16,4 +18,6 @@ export type PressableProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, Press
16
18
  }> | Readonly<{
17
19
  iconOnly?: false;
18
20
  }>);
21
+ /** A plain tap target with no button chrome. It dims while pressed, and a touch that turns into a
22
+ * scroll does not fire `onPress`. Use it for custom tappable content. */
19
23
  export declare const Pressable: import("react").ForwardRefExoticComponent<PressableProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import { usePressInteraction } from './usePressInteraction.js';
4
+ /** A plain tap target with no button chrome. It dims while pressed, and a touch that turns into a
5
+ * scroll does not fire `onPress`. Use it for custom tappable content. */
4
6
  export const Pressable = forwardRef(function Pressable({ children, disabled = false, onPress, onPressStateChange, pressedStyle, feedback = 'opacity', iconOnly = false, style, type = 'button', ...props }, forwardedRef) {
5
7
  if (iconOnly && !props['aria-label']?.trim())
6
8
  throw new Error('An icon-only Pressable requires a meaningful aria-label.');
@@ -1,4 +1,4 @@
1
- /** Whether a press is idle, held or cancelled. */
1
+ /** Whether a press is `idle`, held down (`pressed`) or cancelled (`deactivated`). */
2
2
  export type PressState = 'idle' | 'pressed' | 'deactivated';
3
3
  export interface PressBounds {
4
4
  readonly bottom: number;
@@ -9,7 +9,8 @@ export type LabelProps = {
9
9
  labelStyle?: BuiltInLabelStyle | LabelStyle;
10
10
  style?: CSSProperties;
11
11
  };
12
- /** Combines a semantic title and icon. Hidden titles remain available to assistive technology; toolbar labels with icons show the icon alone. */
12
+ /** A title with an icon. In a toolbar a label with an icon shows the icon alone; a hidden title
13
+ * stays available to assistive technology. */
13
14
  export declare function Label({ children, icon, symbol, labelStyle: requestedStyle, style: cssStyle, }: LabelProps): import("react").JSX.Element;
14
15
  /** The accessible name of a toolbar label that draws only an icon: a `Label` with an icon, or a
15
16
  * `SymbolImage`. A toolbar button or menu with such a label is a glass circle. */
@@ -3,7 +3,8 @@ import { isValidElement, useContext } from 'react';
3
3
  import { SymbolImage } from '../symbols/Symbol.js';
4
4
  import { ToolbarContext } from './toolbar.js';
5
5
  import { useControlStyle } from './controlStyle.js';
6
- /** Combines a semantic title and icon. Hidden titles remain available to assistive technology; toolbar labels with icons show the icon alone. */
6
+ /** A title with an icon. In a toolbar a label with an icon shows the icon alone; a hidden title
7
+ * stays available to assistive technology. */
7
8
  export function Label({ children, icon, symbol, labelStyle: requestedStyle, style: cssStyle, }) {
8
9
  const environment = useControlStyle({ labelStyle: requestedStyle });
9
10
  const toolbar = useContext(ToolbarContext) !== false;
@@ -7,8 +7,7 @@ import { type NavigationTransition } from './navigationTransition.js';
7
7
  export type ScreenProps = {
8
8
  children: ReactNode;
9
9
  title?: string;
10
- /** `navigationSubtitle`: inline, a 12 pt line under a 15 pt title; large, an 11 pt line
11
- * under the large title. */
10
+ /** A line under the title: 12 pt under an inline 15 pt title, 11 pt under a large title. */
12
11
  subtitle?: string;
13
12
  titleDisplay?: 'large' | 'inline' | 'inlineLarge' | 'none';
14
13
  backButton?: 'automatic' | 'hidden';
@@ -18,12 +17,11 @@ export type ScreenProps = {
18
17
  toolbarMinimizationBehavior?: ToolbarMinimizationBehavior;
19
18
  toolbarMinimizationRestoration?: ToolbarMinimizationRestoration;
20
19
  toolbarMinimizationSafeAreaAdjustment?: ToolbarMinimizationSafeAreaAdjustment;
21
- /** `toolbar`: `ToolbarItem`, `ToolbarItemGroup` and `ToolbarSpacer` elements. */
20
+ /** The screen's `ToolbarItem`, `ToolbarItemGroup` and `ToolbarSpacer` elements. */
22
21
  toolbar?: ReactNode;
23
- /** `searchable`: a search field in the navigation bar drawer of this screen's primary
24
- * scroll view. */
22
+ /** A search field for this screen, placed in the navigation bar drawer or the bottom toolbar. */
25
23
  searchable?: Searchable;
26
- /** `navigationTransition`: how this screen arrives when pushed and leaves when popped.
24
+ /** How this screen arrives when pushed and leaves when popped.
27
25
  * `NavigationTransition.zoom(...)` grows it out of a `MatchedTransitionSource`. */
28
26
  navigationTransition?: NavigationTransition;
29
27
  };
@@ -12,5 +12,6 @@ export type MenuProps = Readonly<{
12
12
  * @experimental Custom menu triggers may change. */
13
13
  trigger?: (props: MenuTriggerProps) => ReactNode;
14
14
  }>;
15
- /** Opens a menu of actions. Toolbar labels with symbols render as icon buttons; text labels render as capsules. */
15
+ /** A button that opens a menu of actions. In a toolbar a symbol label draws an icon button and a
16
+ * text label draws a capsule. */
16
17
  export declare function Menu(props: MenuProps): import("react").JSX.Element;
@@ -4,7 +4,8 @@ import { Menu as EngineMenu } from '../glass/Menu.js';
4
4
  import { ToolbarContext } from './toolbar.js';
5
5
  import { Button } from './controls.js';
6
6
  export { ContextMenu } from '../actions/RowActions.js';
7
- /** Opens a menu of actions. Toolbar labels with symbols render as icon buttons; text labels render as capsules. */
7
+ /** A button that opens a menu of actions. In a toolbar a symbol label draws an icon button and a
8
+ * text label draws a capsule. */
8
9
  export function Menu(props) {
9
10
  const toolbar = useContext(ToolbarContext);
10
11
  const trigger = props.trigger ??
@@ -1,5 +1,6 @@
1
1
  import { type GlassShape } from '../glass/regions.js';
2
- /** `buttonBorderShape`. Fixed radii are measured in points. */
2
+ /** The outline of a bordered button: `automatic`, `capsule`, or a rounded rectangle with a fixed
3
+ * corner radius in points. */
3
4
  export type ButtonBorderShape = 'automatic' | 'capsule' | Readonly<{
4
5
  kind: 'roundedRectangle';
5
6
  cornerRadius: number;
@@ -1,6 +1,7 @@
1
- /** Appearance-aware UIKit system palette. Explicit CSS colors remain supported. */
1
+ /** The names of the iOS system colours. Each has a light and a dark value. Plain CSS colours work
2
+ * too. */
2
3
  export type SystemColorName = 'blue' | 'brown' | 'cyan' | 'gray' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'green' | 'indigo' | 'mint' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow';
3
- /** A named system color as a CSS color that follows the appearance.
4
+ /** Returns a system colour as a CSS colour that follows light and dark appearance.
4
5
  * @example <Button tint={systemColor('orange')} onPress={start}>Start</Button> */
5
6
  export declare function systemColor(name: SystemColorName): string;
6
7
  declare const semanticColors: {
@@ -22,8 +23,10 @@ declare const semanticColors: {
22
23
  readonly tertiarySystemGroupedBackground: '--satin-tertiary-system-grouped-background';
23
24
  readonly tint: '--satin-tint';
24
25
  };
25
- /** UIKit's semantic colour names (`label`, `secondarySystemBackground`, …). */
26
+ /** The names of the iOS semantic colours for text, fills, backgrounds, separators and tint
27
+ * (`label`, `secondarySystemBackground`, …). */
26
28
  export type SemanticColorName = keyof typeof semanticColors;
27
- /** UIKit semantic content colors, inherited by app content and portals. */
29
+ /** Returns a semantic colour, such as `label` or `systemGroupedBackground`, as a CSS colour that
30
+ * follows light and dark appearance. It also resolves inside portals. */
28
31
  export declare function semanticColor(name: SemanticColorName): string;
29
32
  export {};
@@ -1,4 +1,4 @@
1
- /** A named system color as a CSS color that follows the appearance.
1
+ /** Returns a system colour as a CSS colour that follows light and dark appearance.
2
2
  * @example <Button tint={systemColor('orange')} onPress={start}>Start</Button> */
3
3
  export function systemColor(name) {
4
4
  return `var(--satin-system-${name})`;
@@ -22,7 +22,8 @@ const semanticColors = {
22
22
  tertiarySystemGroupedBackground: '--satin-tertiary-system-grouped-background',
23
23
  tint: '--satin-tint',
24
24
  };
25
- /** UIKit semantic content colors, inherited by app content and portals. */
25
+ /** Returns a semantic colour, such as `label` or `systemGroupedBackground`, as a CSS colour that
26
+ * follows light and dark appearance. It also resolves inside portals. */
26
27
  export function semanticColor(name) {
27
28
  return `var(${semanticColors[name]})`;
28
29
  }
@@ -1,51 +1,54 @@
1
1
  import { type CSSProperties, type ReactNode } from 'react';
2
- /** `ControlSize`. */
2
+ /** A control's size, from `mini` to `extraLarge`. `regular` is the default. */
3
3
  export type ControlSize = 'mini' | 'small' | 'regular' | 'large' | 'extraLarge';
4
- /** `ButtonRole`. */
4
+ /** A button's role. `destructive` draws it in red; `cancel` marks the action that backs out. */
5
5
  export type ButtonRole = 'destructive' | 'cancel';
6
- /** Built-in button styles, by their `buttonStyle` names. */
6
+ /** The built-in button styles, by their `buttonStyle` names. `automatic` picks one for the
7
+ * context. */
7
8
  export type BuiltInButtonStyle = 'automatic' | 'bordered' | 'borderedProminent' | 'borderless' | 'plain' | 'glass' | 'glassProminent';
8
- /** The environment every custom control style receives. */
9
+ /** What every custom control style receives: enabled state, control size and tint. */
9
10
  export type ControlConfiguration = Readonly<{
10
11
  isEnabled: boolean;
11
12
  controlSize: ControlSize;
12
13
  tint: string | undefined;
13
14
  }>;
14
- /** `ButtonStyleConfiguration`: what a custom `ButtonStyle` draws from. */
15
+ /** What a custom `ButtonStyle` draws from: the label, the pressed state and the role, plus the
16
+ * shared control values. */
15
17
  export type ButtonStyleConfiguration = ControlConfiguration & Readonly<{
16
18
  label: ReactNode;
17
19
  isPressed: boolean;
18
20
  role: ButtonRole | undefined;
19
21
  }>;
20
- /** A custom framework `ButtonStyle`. Appearance only: return noninteractive content; Satin
21
- * owns the button. */
22
+ /** A custom look for `Button`. `makeBody` returns noninteractive content; Satin still owns the
23
+ * button's press handling and accessibility. */
22
24
  export type ButtonStyle = Readonly<{
23
25
  makeBody(configuration: ButtonStyleConfiguration): ReactNode;
24
26
  }>;
25
- /** `LabelStyleConfiguration`: the label's title and icon. */
27
+ /** What a custom `LabelStyle` draws from: the label's title and icon. */
26
28
  export type LabelStyleConfiguration = Readonly<{
27
29
  title: ReactNode;
28
30
  icon: ReactNode;
29
31
  }>;
30
- /** A custom framework `LabelStyle` that arranges a label's title and icon. */
32
+ /** A custom arrangement of a label's title and icon. */
31
33
  export type LabelStyle = Readonly<{
32
34
  makeBody(configuration: LabelStyleConfiguration): ReactNode;
33
35
  }>;
34
- /** Built-in label styles. */
36
+ /** The built-in label styles: the title, the icon or both. `automatic` picks for the context. */
35
37
  export type BuiltInLabelStyle = 'automatic' | 'titleAndIcon' | 'titleOnly' | 'iconOnly';
36
- /** `ToggleStyleConfiguration`: what a custom `ToggleStyle` draws from. */
38
+ /** What a custom `ToggleStyle` draws from: the label, the on state and the pressed state, plus
39
+ * the shared control values. */
37
40
  export type ToggleStyleConfiguration = ControlConfiguration & Readonly<{
38
41
  label: ReactNode;
39
42
  isOn: boolean;
40
43
  isPressed: boolean;
41
44
  }>;
42
- /** A custom framework `ToggleStyle`. Its declared semantics are applied to the
43
- * framework-owned interactive element. */
45
+ /** A custom look for `Toggle`. Satin applies the declared `semantics` (switch, checkbox or button)
46
+ * to the element it owns; `makeBody` draws the appearance. */
44
47
  export type ToggleStyle = Readonly<{
45
48
  semantics: 'switch' | 'checkbox' | 'button';
46
49
  makeBody(configuration: ToggleStyleConfiguration): ReactNode;
47
50
  }>;
48
- /** Built-in toggle styles. */
51
+ /** The built-in toggle styles: `switch` or `button`. `automatic` picks for the context. */
49
52
  export type BuiltInToggleStyle = 'automatic' | 'switch' | 'button';
50
53
  /** The control environment a `ControlStyleProvider` sets for its subtree. */
51
54
  export type ControlStyleValues = Readonly<{