@satinhq/kit 0.1.0-beta.3 → 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 (240) hide show
  1. package/NOTICE +1 -1
  2. package/README.md +1 -2
  3. package/dist/acknowledgements/inventory.json +1 -1
  4. package/dist/actions/RowActions.d.ts +2 -2
  5. package/dist/actions/RowActions.js +91 -25
  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/data/database.d.ts +9 -8
  59. package/dist/data/database.js +4 -4
  60. package/dist/docs/reference.md +982 -964
  61. package/dist/docs/tailwind.md +76 -0
  62. package/dist/docs/tokens.md +1 -1
  63. package/dist/gestures/GestureView.d.ts +3 -1
  64. package/dist/gestures/GestureView.js +2 -1
  65. package/dist/gestures/gesture.d.ts +22 -2
  66. package/dist/gestures/gesture.js +7 -2
  67. package/dist/glass/GlassEffect.d.ts +2 -1
  68. package/dist/glass/GlassEffect.js +2 -1
  69. package/dist/glass/GlassPresentation.d.ts +1 -0
  70. package/dist/glass/GlassPresentation.js +21 -4
  71. package/dist/glass/TabBar.js +23 -1
  72. package/dist/glass/errorAlert.js +2 -1
  73. package/dist/glass/errors.d.ts +3 -1
  74. package/dist/glass/fallback/runtime.d.ts +1 -0
  75. package/dist/glass/fallback/runtime.js +8 -1
  76. package/dist/glass/liquidContext.d.ts +2 -0
  77. package/dist/glass/menuPresenter.d.ts +2 -0
  78. package/dist/glass/regions.d.ts +2 -1
  79. package/dist/glass/renderSpecs.d.ts +1 -0
  80. package/dist/glass/renderSpecs.js +1 -0
  81. package/dist/glass/webgpu/controlRim.d.ts +29 -0
  82. package/dist/glass/webgpu/controlRim.js +68 -0
  83. package/dist/glass/webgpu/passes.d.ts +2 -2
  84. package/dist/glass/webgpu/production.d.ts +1 -0
  85. package/dist/glass/webgpu/production.js +27 -1
  86. package/dist/glass/webgpu/rasterUniforms.js +9 -0
  87. package/dist/glass/webgpu/shaders.d.ts +2 -2
  88. package/dist/glass/webgpu/shaders.js +5 -1
  89. package/dist/haptics/SensoryButton.d.ts +4 -4
  90. package/dist/haptics/SensoryButton.js +3 -3
  91. package/dist/image/Image.d.ts +6 -3
  92. package/dist/image/Image.js +4 -3
  93. package/dist/image/asset.d.ts +2 -1
  94. package/dist/keyboard/adapter.d.ts +3 -4
  95. package/dist/keyboard/geometry.d.ts +1 -1
  96. package/dist/list-form/ListForm.d.ts +8 -7
  97. package/dist/list-form/ListForm.js +2 -2
  98. package/dist/list-form/editing.d.ts +5 -6
  99. package/dist/list-form/editing.js +4 -5
  100. package/dist/list-form/offsets.d.ts +2 -2
  101. package/dist/list-form/offsets.js +2 -2
  102. package/dist/media/react.d.ts +2 -1
  103. package/dist/media/react.js +2 -1
  104. package/dist/media/types.d.ts +6 -3
  105. package/dist/motion/TransitionView.d.ts +4 -2
  106. package/dist/motion/TransitionView.js +3 -2
  107. package/dist/motion/animationValue.d.ts +1 -1
  108. package/dist/motion/matchedGeometry.d.ts +6 -5
  109. package/dist/motion/matchedGeometry.js +2 -1
  110. package/dist/motion/transition.d.ts +4 -1
  111. package/dist/motion/transition.js +2 -0
  112. package/dist/navigation/DetailList.d.ts +1 -1
  113. package/dist/navigation/DetailList.js +1 -1
  114. package/dist/navigation/Sidebar.d.ts +3 -1
  115. package/dist/navigation/Sidebar.js +1 -1
  116. package/dist/navigation/SidebarSymbol.d.ts +2 -1
  117. package/dist/navigation/SidebarSymbol.js +2 -1
  118. package/dist/navigation/navigationContext.d.ts +2 -1
  119. package/dist/navigation/navigationContext.js +2 -1
  120. package/dist/navigation/splitContext.d.ts +2 -1
  121. package/dist/navigation/splitContext.js +2 -1
  122. package/dist/navigation/toolbarMinimization.d.ts +4 -3
  123. package/dist/navigation/types.d.ts +7 -5
  124. package/dist/presentation/Presentation.d.ts +8 -7
  125. package/dist/presentation/Presentation.js +3 -2
  126. package/dist/presentation/model.d.ts +2 -1
  127. package/dist/press/Pressable.d.ts +5 -1
  128. package/dist/press/Pressable.js +2 -0
  129. package/dist/press/stateMachine.d.ts +1 -1
  130. package/dist/public/Label.d.ts +2 -1
  131. package/dist/public/Label.js +2 -1
  132. package/dist/public/Screen.d.ts +4 -6
  133. package/dist/public/actions.d.ts +2 -1
  134. package/dist/public/actions.js +2 -1
  135. package/dist/public/buttonBorderShape.d.ts +2 -1
  136. package/dist/public/colors.d.ts +7 -4
  137. package/dist/public/colors.js +3 -2
  138. package/dist/public/controlStyle.d.ts +17 -14
  139. package/dist/public/controls.d.ts +27 -26
  140. package/dist/public/controls.js +20 -19
  141. package/dist/public/deviceActions.d.ts +6 -4
  142. package/dist/public/deviceActions.js +4 -2
  143. package/dist/public/environment.d.ts +16 -13
  144. package/dist/public/environment.js +11 -9
  145. package/dist/public/filePickers.d.ts +6 -4
  146. package/dist/public/filePickers.js +3 -2
  147. package/dist/public/glass.d.ts +6 -3
  148. package/dist/public/glass.js +2 -1
  149. package/dist/public/glassValue.d.ts +3 -4
  150. package/dist/public/glassValue.js +3 -4
  151. package/dist/public/keyboard.d.ts +4 -1
  152. package/dist/public/keyboard.js +2 -1
  153. package/dist/public/navigationTransition.d.ts +5 -5
  154. package/dist/public/navigationTransition.js +2 -2
  155. package/dist/public/presentation.d.ts +8 -7
  156. package/dist/public/presentation.js +5 -5
  157. package/dist/public/runtime.d.ts +9 -8
  158. package/dist/public/runtime.js +7 -7
  159. package/dist/public/scroll.d.ts +6 -3
  160. package/dist/public/scroll.js +3 -1
  161. package/dist/public/structure.d.ts +2 -2
  162. package/dist/public/toolbar.d.ts +15 -11
  163. package/dist/public/toolbar.js +12 -7
  164. package/dist/reachability/model.d.ts +4 -3
  165. package/dist/reachability/react.d.ts +4 -1
  166. package/dist/reachability/react.js +2 -1
  167. package/dist/root/SatinRoot.d.ts +3 -3
  168. package/dist/root/SatinRoot.js +12 -36
  169. package/dist/root/mountSatin.d.ts +1 -1
  170. package/dist/root/mountSatin.js +26 -35
  171. package/dist/root/runtimeContext.d.ts +2 -1
  172. package/dist/root/runtimeContext.js +2 -1
  173. package/dist/safe-area/Overlay.d.ts +3 -2
  174. package/dist/safe-area/Overlay.js +2 -1
  175. package/dist/safe-area/SafeAreaInset.d.ts +11 -7
  176. package/dist/safe-area/SafeAreaInset.js +7 -6
  177. package/dist/safe-area/context.d.ts +3 -3
  178. package/dist/safe-area/context.js +1 -1
  179. package/dist/safe-area/displayCorners.d.ts +4 -2
  180. package/dist/safe-area/displayCorners.js +4 -2
  181. package/dist/safe-area/modifiers.d.ts +14 -10
  182. package/dist/safe-area/modifiers.js +8 -4
  183. package/dist/scroll/ScrollSurface.js +5 -1
  184. package/dist/scroll/ScrollTarget.d.ts +1 -1
  185. package/dist/scroll/ScrollTarget.js +1 -1
  186. package/dist/scroll/edgePolicy.d.ts +2 -2
  187. package/dist/scroll/position.d.ts +5 -3
  188. package/dist/scroll/types.d.ts +1 -1
  189. package/dist/search/PadSearchDrawer.d.ts +7 -0
  190. package/dist/search/PadSearchDrawer.js +8 -0
  191. package/dist/search/PadSearchPresentationContext.d.ts +6 -0
  192. package/dist/search/PadSearchPresentationContext.js +4 -0
  193. package/dist/search/SearchDrawer.d.ts +1 -1
  194. package/dist/search/SearchDrawer.js +6 -1
  195. package/dist/search/SearchSuggestionsPopover.d.ts +6 -0
  196. package/dist/search/SearchSuggestionsPopover.js +42 -0
  197. package/dist/search/SearchToolbarField.d.ts +2 -1
  198. package/dist/search/SearchToolbarField.js +28 -7
  199. package/dist/search/padSearchBarMotion.d.ts +69 -0
  200. package/dist/search/padSearchBarMotion.js +73 -0
  201. package/dist/search/padSearchFieldSamples.json +491 -0
  202. package/dist/search/searchPlacement.d.ts +3 -0
  203. package/dist/search/searchPlacement.js +7 -0
  204. package/dist/search/searchable.d.ts +14 -12
  205. package/dist/search/usePadSearchFieldMotion.d.ts +4 -0
  206. package/dist/search/usePadSearchFieldMotion.js +100 -0
  207. package/dist/search/useSearchPresentation.d.ts +2 -1
  208. package/dist/search/useSearchPresentation.js +23 -5
  209. package/dist/server.d.ts +4 -4
  210. package/dist/server.js +4 -4
  211. package/dist/shapes/corners.d.ts +3 -3
  212. package/dist/shapes/corners.js +1 -2
  213. package/dist/styles.css +8289 -8244
  214. package/dist/sw/vite.d.ts +4 -0
  215. package/dist/sw/vite.js +2 -0
  216. package/dist/symbols/Symbol.d.ts +7 -5
  217. package/dist/symbols/Symbol.js +5 -3
  218. package/dist/symbols/catalogue.d.ts +1 -1
  219. package/dist/symbols/types.d.ts +6 -4
  220. package/dist/tabs/TabSection.d.ts +3 -2
  221. package/dist/tabs/TabSection.js +2 -1
  222. package/dist/tabs/TabView.js +54 -51
  223. package/dist/tasks/useTask.d.ts +5 -4
  224. package/dist/tasks/useTask.js +4 -3
  225. package/dist/testing.d.ts +3 -2
  226. package/dist/testing.js +3 -2
  227. package/dist/text-input/focusChain.d.ts +4 -3
  228. package/dist/text-input/focusChain.js +3 -2
  229. package/dist/text-input/kinds.d.ts +1 -1
  230. package/dist/web/WebView.d.ts +10 -3
  231. package/dist/web/WebView.js +3 -2
  232. package/dist/web/authentication.d.ts +12 -1
  233. package/dist/web/authentication.js +2 -1
  234. package/dist/web/openURL.d.ts +10 -4
  235. package/dist/web/openURL.js +4 -2
  236. package/dist/web/useWebAuthentication.d.ts +2 -1
  237. package/dist/web/useWebAuthentication.js +2 -1
  238. package/dist/zoom/Zoomable.d.ts +3 -3
  239. package/dist/zoom/Zoomable.js +2 -2
  240. package/package.json +1 -1
@@ -1,11 +1,12 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { Animation } from './animationValue.js';
3
3
  declare const namespaceBrand: unique symbol;
4
- /** `Namespace.ID`: the scope `MatchedGeometryEffect` ids are matched within. */
4
+ /** A scope for matched-geometry ids. Two views match only if they share an id and a namespace. */
5
5
  export type NamespaceID = Readonly<{
6
6
  [namespaceBrand]: true;
7
7
  }>;
8
- /** `@Namespace`: a stable id scope for `MatchedGeometryEffect`, one per component. */
8
+ /** Returns a namespace that stays the same for the life of the component. Pass it to
9
+ * `MatchedGeometryEffect` and `MatchedTransitionSource`. */
9
10
  export declare function useNamespace(): NamespaceID;
10
11
  /**
11
12
  * A namespace declared once at module scope, for views that share no parent component: a
@@ -16,7 +17,7 @@ export declare function useNamespace(): NamespaceID;
16
17
  * @experimental Shared by the zoom navigation transition.
17
18
  */
18
19
  export declare function defineNamespace(): NamespaceID;
19
- /** Props of `MatchedGeometryEffect`. */
20
+ /** The effect's id and namespace, whether it is the source, and the one element it wraps. */
20
21
  export type MatchedGeometryEffectProps = Readonly<{
21
22
  /** Views with the same id in the same namespace are one view in two places. */
22
23
  id: string;
@@ -45,8 +46,8 @@ export declare function MatchedGeometryEffect({ id, in: namespace, isSource, chi
45
46
  * Applies the state changes in `update`, then animates the
46
47
  * `MatchedGeometryEffect` views they move, insert or remove. Call it from an event handler.
47
48
  * Keyed List rows also move to their new positions. Other views take their new layout at once.
48
- * Returns the callback result and propagates errors. Only synchronous updates participate.
49
- * Nested calls share the outer List transaction; per-update nested timing is not supported.
49
+ * Returns the callback result and passes errors through. Only synchronous updates take part,
50
+ * and nested calls join the outer one.
50
51
  * @example
51
52
  * <Button onPress={() => withAnimation(() => setShowQueue(!showQueue))}>Playing Next</Button>
52
53
  */
@@ -22,7 +22,8 @@ import { fadeSettleMs, runFrameTimes, sampleChannel, sampleProgress, } from './s
22
22
  */
23
23
  const namespaceBrand = Symbol('satin.namespace');
24
24
  const entries = new Set();
25
- /** `@Namespace`: a stable id scope for `MatchedGeometryEffect`, one per component. */
25
+ /** Returns a namespace that stays the same for the life of the component. Pass it to
26
+ * `MatchedGeometryEffect` and `MatchedTransitionSource`. */
26
27
  export function useNamespace() {
27
28
  const [namespace] = useState(defineNamespace);
28
29
  return namespace;
@@ -9,7 +9,8 @@ type Effect = Readonly<{
9
9
  kind: 'move';
10
10
  edge: TransitionEdge;
11
11
  }>;
12
- /** Immutable insertion and removal effects. Timing belongs to withAnimation. */
12
+ /** How a view enters and leaves: opacity, scale and move effects. `withAnimation` sets the
13
+ * timing. */
13
14
  export type Transition = Readonly<{
14
15
  insertion: readonly Effect[];
15
16
  removal: readonly Effect[];
@@ -18,6 +19,8 @@ declare function move(edge: TransitionEdge): Transition;
18
19
  declare function scale(value?: number): Transition;
19
20
  declare function asymmetric(insertion: Transition, removal: Transition): Transition;
20
21
  declare function combined(...transitions: readonly Transition[]): Transition;
22
+ /** Builds transitions: `identity`, `opacity`, `move`, `scale`, `slide`, `push` and their
23
+ * combinations. Each returns a new value. */
21
24
  export declare const Transition: Readonly<{
22
25
  identity: Readonly<{
23
26
  insertion: readonly Effect[];
@@ -19,6 +19,8 @@ function combined(...transitions) {
19
19
  return effects(transitions.flatMap(value => value.insertion), transitions.flatMap(value => value.removal));
20
20
  }
21
21
  const opacity = effects([{ kind: 'opacity' }]);
22
+ /** Builds transitions: `identity`, `opacity`, `move`, `scale`, `slide`, `push` and their
23
+ * combinations. Each returns a new value. */
22
24
  export const Transition = Object.freeze({
23
25
  identity: effects([]),
24
26
  opacity,
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- /** Regular-width grouped detail content beneath NavigatorHost's inline title. */
2
+ /** A grouped list of rows for a split view's detail column at regular width. */
3
3
  export declare function DetailList({ items, }: {
4
4
  items: readonly {
5
5
  id: string;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ScrollSurface } from '../scroll/ScrollSurface.js';
3
3
  import { Pressable } from '../press/Pressable.js';
4
- /** Regular-width grouped detail content beneath NavigatorHost's inline title. */
4
+ /** A grouped list of rows for a split view's detail column at regular width. */
5
5
  export function DetailList({ items, }) {
6
6
  return (_jsx(ScrollSurface, { id: "detail", axis: "vertical", primary: true, "data-satin-detail-list": "true", children: _jsx("div", { "data-satin-detail-group": "true", children: items.map(item => item.onPress ? (_jsx(Pressable, { feedback: "row", "data-satin-detail-row": "true", onPress: item.onPress, children: item.label }, item.id)) : (_jsx("div", { "data-satin-detail-row": "true", children: item.label }, item.id))) }) }));
7
7
  }
@@ -1,10 +1,12 @@
1
1
  import { type ReactNode } from 'react';
2
+ /** One sidebar destination: its id, label, optional icon and disabled state. */
2
3
  export type SidebarEntry = Readonly<{
3
4
  id: string;
4
5
  label: string;
5
6
  icon?: ReactNode;
6
7
  disabled?: boolean;
7
8
  }>;
9
+ /** The sidebar's entries, the selection callback and which entry starts selected. */
8
10
  export type SidebarProps = Readonly<{
9
11
  entries: readonly SidebarEntry[];
10
12
  onSelect: (id: string) => void;
@@ -12,5 +14,5 @@ export type SidebarProps = Readonly<{
12
14
  /** First enabled entry by default, false for an empty detail, or an explicit entry id. */
13
15
  initialSelection?: 'first' | false | string;
14
16
  }>;
15
- /** Ordered sidebar destinations, sharing NavigatorHost's canonical detail selection. */
17
+ /** A list of sidebar destinations. Selecting one shows it in the split view's detail column. */
16
18
  export declare function Sidebar({ entries, onSelect, section, initialSelection }: SidebarProps): import("react").JSX.Element;
@@ -4,7 +4,7 @@ import { Pressable } from '../press/Pressable.js';
4
4
  import { ScrollSurface } from '../scroll/ScrollSurface.js';
5
5
  import { SplitContext } from './splitContext.js';
6
6
  import { chooseSidebarInitialEntry } from './sidebarSelection.js';
7
- /** Ordered sidebar destinations, sharing NavigatorHost's canonical detail selection. */
7
+ /** A list of sidebar destinations. Selecting one shows it in the split view's detail column. */
8
8
  export function Sidebar({ entries, onSelect, section, initialSelection = 'first' }) {
9
9
  const split = useContext(SplitContext);
10
10
  useLayoutEffect(() => {
@@ -1,4 +1,5 @@
1
- /** Framework7 Icons (MIT), through the shared SymbolImage renderer. */
1
+ /** Draws the sidebar's `gearshape` or `sidebar.left` icon with `SymbolImage`. The artwork is from
2
+ * Framework7 Icons (MIT). */
2
3
  export declare function SidebarSymbol({ name }: {
3
4
  name: 'gearshape' | 'sidebar.left';
4
5
  }): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SymbolImage } from '../symbols/Symbol.js';
3
- /** Framework7 Icons (MIT), through the shared SymbolImage renderer. */
3
+ /** Draws the sidebar's `gearshape` or `sidebar.left` icon with `SymbolImage`. The artwork is from
4
+ * Framework7 Icons (MIT). */
4
5
  export function SidebarSymbol({ name }) {
5
6
  return _jsx(SymbolImage, { name: name, "data-satin-sidebar-symbol": name });
6
7
  }
@@ -17,6 +17,7 @@ export declare function useNavigator<Registry extends ScreenRegistry = ScreenReg
17
17
  export declare function useNavigatorState<Registry extends ScreenRegistry = ScreenRegistry>(): NavigatorState<RegistryScreenEntry<Registry>>;
18
18
  export declare function useParams<Params = unknown>(): Params;
19
19
  export declare function useScreenScrollRegistry(): ScrollSurfaceRegistry;
20
- /** `onAppear` and `onDisappear`: callbacks for a retained navigation entry's visible lifecycle. */
20
+ /** Runs `appear` and `disappear` callbacks as the screen is shown and covered or removed, and
21
+ * returns whether it is covered and its transition phase. */
21
22
  export declare function useScreenLifecycle(callbacks?: ScreenLifecycleCallbacks): ScreenLifecycle;
22
23
  export {};
@@ -44,7 +44,8 @@ export function useScreenScrollRegistry() {
44
44
  }
45
45
  return standalone.current;
46
46
  }
47
- /** `onAppear` and `onDisappear`: callbacks for a retained navigation entry's visible lifecycle. */
47
+ /** Runs `appear` and `disappear` callbacks as the screen is shown and covered or removed, and
48
+ * returns whether it is covered and its transition phase. */
48
49
  export function useScreenLifecycle(callbacks = EMPTY_LIFECYCLE_CALLBACKS) {
49
50
  const screen = useContext(ScreenContext);
50
51
  if (!screen) {
@@ -13,5 +13,6 @@ export declare const SplitContext: import("react").Context<Readonly<{
13
13
  entry: ScreenEntry | undefined;
14
14
  identity: string | undefined;
15
15
  }> | undefined>;
16
- /** Entry identity owns navigation/scroll; identity is the registry's semantic row key. */
16
+ /** Returns the split view's mode and the entry shown in its detail column. It throws outside a
17
+ * split view. */
17
18
  export declare function useSplitSelection(): SplitSelection;
@@ -1,6 +1,7 @@
1
1
  import { createContext, useContext } from 'react';
2
2
  export const SplitContext = createContext(undefined);
3
- /** Entry identity owns navigation/scroll; identity is the registry's semantic row key. */
3
+ /** Returns the split view's mode and the entry shown in its detail column. It throws outside a
4
+ * split view. */
4
5
  export function useSplitSelection() {
5
6
  const selection = useContext(SplitContext);
6
7
  if (!selection)
@@ -1,8 +1,9 @@
1
- /** `ToolbarMinimizationBehavior`: when a toolbar may minimize. */
1
+ /** When the navigation bar minimizes: `onScrollDown`, `onScrollUp` or `never`. */
2
2
  export type ToolbarMinimizationBehavior = 'onScrollDown' | 'onScrollUp' | 'never';
3
- /** The interaction that restores a minimized toolbar. */
3
+ /** What brings back a minimized bar: `automatic`, or only reaching the scroll edge
4
+ * (`atScrollEdge`). */
4
5
  export type ToolbarMinimizationRestoration = 'automatic' | 'atScrollEdge';
5
- /** Whether toolbar minimization changes its reserved content inset. */
6
+ /** Whether the content inset shrinks when the bar minimizes. */
6
7
  export type ToolbarMinimizationSafeAreaAdjustment = 'automatic' | 'enabled' | 'disabled';
7
8
  export declare function nextToolbarMinimization(minimized: boolean, previousOffset: number, offset: number, behavior: ToolbarMinimizationBehavior, restoration?: ToolbarMinimizationRestoration): boolean;
8
9
  /** Bind only an elected primary. Compensate released inset so its content does not jump. */
@@ -3,13 +3,15 @@ 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;
@@ -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;
@@ -31,7 +31,7 @@ export type FullScreenCoverProps = PresentationProps & {
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;
@@ -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,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<{