@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,11 @@
1
1
  import { type CSSProperties, type HTMLAttributes } from 'react';
2
- /** iOS text styles at the measured default Dynamic Type size. */
2
+ /** The system text styles, sized as iOS draws them at the default text size. */
3
3
  export type TextStyle = 'largeTitle' | 'title' | 'title2' | 'title3' | 'headline' | 'subheadline' | 'body' | 'callout' | 'footnote' | 'caption' | 'caption2';
4
- /** `Font.Weight`. */
4
+ /** A font weight, from `ultraLight` to `black`. */
5
5
  export type FontWeight = 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
6
- /** `Alignment`, for `frame` and `ZStack`. */
6
+ /** Where content sits inside a larger frame. Used by `frame` and `ZStack`. */
7
7
  export type ContentAlignment = 'center' | 'leading' | 'trailing' | 'top' | 'bottom' | 'topLeading' | 'topTrailing' | 'bottomLeading' | 'bottomTrailing';
8
- /** `frame(width:height:alignment:)` and `frame(minWidth:maxWidth:…)`, in points.
8
+ /** A fixed size or size bounds for a view, in points, and how its content aligns inside.
9
9
  * `'infinity'` fills the available space. */
10
10
  export interface ContentFrame {
11
11
  width?: number;
@@ -16,8 +16,8 @@ export interface ContentFrame {
16
16
  maxHeight?: number | 'infinity';
17
17
  alignment?: ContentAlignment;
18
18
  }
19
- /** `padding`: `true` is the default 16 pt on every edge, a number pads every edge, and an
20
- * object pads chosen edges. */
19
+ /** The `padding` prop. `true` adds the default 16 pt on every edge, a number pads every edge,
20
+ * and an object pads the edges it names. */
21
21
  export type ContentPadding = boolean | number | {
22
22
  top?: number;
23
23
  bottom?: number;
@@ -26,8 +26,8 @@ export type ContentPadding = boolean | number | {
26
26
  horizontal?: number;
27
27
  vertical?: number;
28
28
  };
29
- /** Shared content properties for the framework components. Plain HTML attributes, `style`
30
- * included, still apply. */
29
+ /** The padding, frame and background props shared by text and stacks. Plain HTML attributes,
30
+ * `style` included, still apply. */
31
31
  export interface ContentProps extends HTMLAttributes<HTMLElement> {
32
32
  padding?: ContentPadding;
33
33
  frame?: ContentFrame;
@@ -45,8 +45,8 @@ export interface TextProps extends ContentProps {
45
45
  truncationMode?: 'tail';
46
46
  }
47
47
  /**
48
- * `Text`: inline text in a system text style. Nested Text inherits its enclosing style
49
- * unless explicitly overridden. A `lineLimit` truncates with an ellipsis.
48
+ * Inline text in a system text style. Nested Text inherits its enclosing style unless it sets
49
+ * its own. A `lineLimit` truncates with an ellipsis.
50
50
  *
51
51
  * @example
52
52
  * <Text font="headline" lineLimit={1}>{note.title}</Text>
@@ -63,46 +63,47 @@ export interface HStackProps extends ContentProps {
63
63
  spacing?: number;
64
64
  }
65
65
  /**
66
- * `VStack`: arranges its children vertically. Give `spacing` explicitly where it matters;
67
- * wrappers and custom controls do not propagate measured child spacing preferences.
66
+ * Arranges its children in a column. Set `spacing` where it matters: wrappers and custom
67
+ * controls do not pass their children's preferred spacing up to the stack.
68
68
  *
69
69
  * @example
70
70
  * <VStack alignment="leading" spacing={4}><Text font="headline">{title}</Text></VStack>
71
71
  */
72
72
  export declare function VStack(props: VStackProps): import("react").JSX.Element;
73
- /** `HStack`: arranges its children horizontally. Pair it with `Spacer` to push content to
74
- * the edges. */
73
+ /** Arranges its children in a row. Add a `Spacer` to push content to the edges. */
75
74
  export declare function HStack(props: HStackProps): import("react").JSX.Element;
76
75
  /** How ZStack aligns its layers. */
77
76
  export interface ZStackProps extends ContentProps {
78
77
  alignment?: ContentAlignment;
79
78
  }
80
- /** `ZStack`: overlays its children in one cell, later children on top, keeping source order
81
- * for assistive technology. */
79
+ /** Layers its children in one cell, later children on top. Assistive technology reads them in
80
+ * source order. */
82
81
  export declare function ZStack({ alignment, padding, frame, background, foregroundStyle, style, ...props }: ZStackProps): import("react").JSX.Element;
83
82
  /** Spacer's minimum length in points. */
84
83
  export interface SpacerProps extends HTMLAttributes<HTMLDivElement> {
85
84
  minLength?: number;
86
85
  }
87
- /** `Spacer`: takes the free space along its parent stack's axis. */
86
+ /** Takes up the free space along its parent stack's axis. */
88
87
  export declare function Spacer({ minLength, style, ...props }: SpacerProps): import("react").JSX.Element;
89
- /** `Divider`: a hairline across its parent stack's axis. Decorative, so hidden from
90
- * assistive technology. */
88
+ /** A hairline across its parent stack's axis. It is decorative, so assistive technology skips
89
+ * it. */
91
90
  export declare function Divider({ style, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
92
91
  /** LazyVStack's layout props. Every child mounts eagerly; use List for long data. */
93
92
  export type LazyVStackProps = VStackProps;
94
93
  /** LazyHStack's layout props. Every child mounts eagerly; use List for long data. */
95
94
  export type LazyHStackProps = HStackProps;
96
- /** Vertical stack with eager mounting and retained child state. No viewport virtualization. */
95
+ /** Lays out its children like `VStack`. Every child mounts at once and keeps its state, so use
96
+ * `List` for long data. */
97
97
  export declare function LazyVStack(props: LazyVStackProps): import("react").JSX.Element;
98
- /** Horizontal stack with eager mounting and retained child state. No viewport virtualization. */
98
+ /** Lays out its children like `HStack`. Every child mounts at once and keeps its state. */
99
99
  export declare function LazyHStack(props: LazyHStackProps): import("react").JSX.Element;
100
- /** Track spacing follows this track; alignment places content within each cell. */
100
+ /** Options every grid track takes. `spacing` is the gap after this track; `alignment` places
101
+ * content within each cell. */
101
102
  export interface GridItemOptions {
102
103
  spacing?: number;
103
104
  alignment?: ContentAlignment;
104
105
  }
105
- /** A fixed track's dimension in points. */
106
+ /** A fixed track's size in points. */
106
107
  export interface FixedGridItemOptions extends GridItemOptions {
107
108
  size: number;
108
109
  }
@@ -111,13 +112,14 @@ export interface FlexibleGridItemOptions extends GridItemOptions {
111
112
  minimum?: number;
112
113
  maximum?: number;
113
114
  }
114
- /** Bounds for repeated adaptive tracks. Only one adaptive descriptor is supported. */
115
+ /** Bounds for an adaptive track, which repeats to fit as many columns or rows as the space
116
+ * allows. A grid with an adaptive track can have no other track. */
115
117
  export interface AdaptiveGridItemOptions extends GridItemOptions {
116
118
  minimum: number;
117
119
  maximum?: number;
118
120
  }
119
121
  declare const gridItemBrand: unique symbol;
120
- /** A frozen validated grid track, constructed through GridItem. */
122
+ /** A validated grid track. Make one with `GridItem.fixed`, `.flexible` or `.adaptive`. */
121
123
  export type GridItemValue = Readonly<{
122
124
  [gridItemBrand]: true;
123
125
  } & GridItemOptions & ({
@@ -128,26 +130,29 @@ export type GridItemValue = Readonly<{
128
130
  minimum: number;
129
131
  maximum?: number;
130
132
  })>;
131
- /** Validated grid tracks. The numeric fixed constructor remains compatible with older apps. */
133
+ /** Makes grid tracks for `LazyVGrid` and `LazyHGrid`: `fixed`, `flexible` or `adaptive`. Each
134
+ * call validates its options and throws a `RangeError` for bad bounds or spacing. */
132
135
  export declare const GridItem: Readonly<{
133
136
  fixed(options: number | FixedGridItemOptions): GridItemValue;
134
137
  flexible(options?: FlexibleGridItemOptions): GridItemValue;
135
138
  adaptive(options: AdaptiveGridItemOptions): GridItemValue;
136
139
  }>;
137
- /** Columns define column spacing; spacing here is the distance between rows. */
140
+ /** The grid's columns and the spacing between rows. Each column sets the gap after itself. */
138
141
  export interface LazyVGridProps extends ContentProps {
139
142
  columns: readonly GridItemValue[];
140
143
  alignment?: VStackProps['alignment'];
141
144
  spacing?: number;
142
145
  }
143
- /** Rows define row spacing; spacing here is the distance between columns. */
146
+ /** The grid's rows and the spacing between columns. Each row sets the gap after itself. */
144
147
  export interface LazyHGridProps extends ContentProps {
145
148
  rows: readonly GridItemValue[];
146
149
  alignment?: 'top' | 'center' | 'bottom';
147
150
  spacing?: number;
148
151
  }
149
- /** Columns growing vertically. Renders every child eagerly; use List for long data. */
152
+ /** A grid with fixed columns that grows downward. Every child renders at once; use `List` for
153
+ * long data. */
150
154
  export declare function LazyVGrid({ columns, ...props }: LazyVGridProps): import("react").JSX.Element;
151
- /** Rows growing horizontally. Renders every child eagerly; use List for long data. */
155
+ /** A grid with fixed rows that grows sideways. Every child renders at once; use `List` for long
156
+ * data. */
152
157
  export declare function LazyHGrid({ rows, ...props }: LazyHGridProps): import("react").JSX.Element;
153
158
  export {};
@@ -60,8 +60,8 @@ function ContentFrameBox({ frame, background, style, inline = false, children, }
60
60
  }, children: children }));
61
61
  }
62
62
  /**
63
- * `Text`: inline text in a system text style. Nested Text inherits its enclosing style
64
- * unless explicitly overridden. A `lineLimit` truncates with an ellipsis.
63
+ * Inline text in a system text style. Nested Text inherits its enclosing style unless it sets
64
+ * its own. A `lineLimit` truncates with an ellipsis.
65
65
  *
66
66
  * @example
67
67
  * <Text font="headline" lineLimit={1}>{note.title}</Text>
@@ -141,8 +141,8 @@ function Stack({ axis, alignment = 'center', spacing, padding, frame, background
141
141
  return frame ? (_jsx(ContentFrameBox, { frame: frame, background: background, style: style, children: content })) : (content);
142
142
  }
143
143
  /**
144
- * `VStack`: arranges its children vertically. Give `spacing` explicitly where it matters;
145
- * wrappers and custom controls do not propagate measured child spacing preferences.
144
+ * Arranges its children in a column. Set `spacing` where it matters: wrappers and custom
145
+ * controls do not pass their children's preferred spacing up to the stack.
146
146
  *
147
147
  * @example
148
148
  * <VStack alignment="leading" spacing={4}><Text font="headline">{title}</Text></VStack>
@@ -150,13 +150,12 @@ function Stack({ axis, alignment = 'center', spacing, padding, frame, background
150
150
  export function VStack(props) {
151
151
  return _jsx(Stack, { ...props, axis: "vertical" });
152
152
  }
153
- /** `HStack`: arranges its children horizontally. Pair it with `Spacer` to push content to
154
- * the edges. */
153
+ /** Arranges its children in a row. Add a `Spacer` to push content to the edges. */
155
154
  export function HStack(props) {
156
155
  return _jsx(Stack, { ...props, axis: "horizontal" });
157
156
  }
158
- /** `ZStack`: overlays its children in one cell, later children on top, keeping source order
159
- * for assistive technology. */
157
+ /** Layers its children in one cell, later children on top. Assistive technology reads them in
158
+ * source order. */
160
159
  export function ZStack({ alignment = 'center', padding, frame, background, foregroundStyle, style, ...props }) {
161
160
  const content = (_jsx("div", { ...props, "data-satin-content": "zstack", style: {
162
161
  display: 'grid',
@@ -166,23 +165,24 @@ export function ZStack({ alignment = 'center', padding, frame, background, foreg
166
165
  } }));
167
166
  return frame ? (_jsx(ContentFrameBox, { frame: frame, background: background, style: style, children: content })) : (content);
168
167
  }
169
- /** `Spacer`: takes the free space along its parent stack's axis. */
168
+ /** Takes up the free space along its parent stack's axis. */
170
169
  export function Spacer({ minLength, style, ...props }) {
171
170
  return (_jsx("div", { ...props, "aria-hidden": "true", "data-satin-content": "spacer", style: {
172
171
  ...(minLength === undefined ? {} : { '--satin-spacer-min': `${minLength}px` }),
173
172
  ...style,
174
173
  } }));
175
174
  }
176
- /** `Divider`: a hairline across its parent stack's axis. Decorative, so hidden from
177
- * assistive technology. */
175
+ /** A hairline across its parent stack's axis. It is decorative, so assistive technology skips
176
+ * it. */
178
177
  export function Divider({ style, ...props }) {
179
178
  return _jsx("div", { ...props, "aria-hidden": "true", "data-satin-content": "divider", style: style });
180
179
  }
181
- /** Vertical stack with eager mounting and retained child state. No viewport virtualization. */
180
+ /** Lays out its children like `VStack`. Every child mounts at once and keeps its state, so use
181
+ * `List` for long data. */
182
182
  export function LazyVStack(props) {
183
183
  return _jsx(VStack, { ...props, "data-satin-lazy-stack": "vertical" });
184
184
  }
185
- /** Horizontal stack with eager mounting and retained child state. No viewport virtualization. */
185
+ /** Lays out its children like `HStack`. Every child mounts at once and keeps its state. */
186
186
  export function LazyHStack(props) {
187
187
  return _jsx(HStack, { ...props, "data-satin-lazy-stack": "horizontal" });
188
188
  }
@@ -223,7 +223,8 @@ function boundedGridItem(kind, options) {
223
223
  gridItems.add(item);
224
224
  return item;
225
225
  }
226
- /** Validated grid tracks. The numeric fixed constructor remains compatible with older apps. */
226
+ /** Makes grid tracks for `LazyVGrid` and `LazyHGrid`: `fixed`, `flexible` or `adaptive`. Each
227
+ * call validates its options and throws a `RangeError` for bad bounds or spacing. */
227
228
  export const GridItem = Object.freeze({
228
229
  fixed(options) {
229
230
  const { size, spacing, alignment } = typeof options === 'number' ? { size: options } : options;
@@ -305,11 +306,13 @@ function LazyGrid({ axis, items, alignment = 'center', spacing = 8, padding, fra
305
306
  }) }));
306
307
  return frame ? (_jsx(ContentFrameBox, { frame: frame, background: background, style: style, children: content })) : (content);
307
308
  }
308
- /** Columns growing vertically. Renders every child eagerly; use List for long data. */
309
+ /** A grid with fixed columns that grows downward. Every child renders at once; use `List` for
310
+ * long data. */
309
311
  export function LazyVGrid({ columns, ...props }) {
310
312
  return _jsx(LazyGrid, { ...props, axis: "vertical", items: columns });
311
313
  }
312
- /** Rows growing horizontally. Renders every child eagerly; use List for long data. */
314
+ /** A grid with fixed rows that grows sideways. Every child renders at once; use `List` for long
315
+ * data. */
313
316
  export function LazyHGrid({ rows, ...props }) {
314
317
  return _jsx(LazyGrid, { ...props, axis: "horizontal", items: rows });
315
318
  }
@@ -1,26 +1,34 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
+ /** A width and height in points. */
2
3
  export interface GeometrySize {
3
4
  width: number;
4
5
  height: number;
5
6
  }
7
+ /** A rectangle in points: origin `x` and `y` plus a size. */
6
8
  export interface GeometryFrame extends GeometrySize {
7
9
  x: number;
8
10
  y: number;
9
11
  }
12
+ /** What a `GeometryReader` passes to its children: its size and a way to read its frame. */
10
13
  export interface GeometryProxy {
11
14
  /** The reader's allocated CSS space, in points on the target runtime. */
12
15
  size: GeometrySize;
13
16
  /** Global means layout-viewport coordinates. Pass an element for a named local space. */
14
17
  frame(inSpace: 'local' | 'global' | HTMLElement): GeometryFrame;
15
18
  }
19
+ /** A `GeometryReader`'s render function, plus plain div attributes. */
16
20
  export interface GeometryReaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
17
21
  children(proxy: GeometryProxy): ReactNode;
18
22
  }
19
- /** A greedy layout container. Give a reader in a scroll view a definite height. */
23
+ /** Fills the space it is offered and calls its children with that size. Its content renders
24
+ * once the first measurement is in. */
20
25
  export declare function GeometryReader({ children, style, ...props }: GeometryReaderProps): import("react").JSX.Element;
26
+ /** The axes a `ViewThatFits` candidate must fit along. */
21
27
  export type ViewThatFitsAxis = 'horizontal' | 'vertical' | 'both';
28
+ /** The axes to check, `both` by default, plus plain div attributes. */
22
29
  export interface ViewThatFitsProps extends HTMLAttributes<HTMLDivElement> {
23
30
  in?: ViewThatFitsAxis;
24
31
  }
25
- /** Select the first ideal size that fits, or the last candidate when none does. */
32
+ /** Shows the first child whose natural size fits the space, or the last child when none fits.
33
+ * It measures again when the space or a child resizes. */
26
34
  export declare function ViewThatFits({ in: axis, children, style, ...props }: ViewThatFitsProps): import("react").JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Children, useContext, useLayoutEffect, useRef, useState, } from 'react';
3
3
  import { TabActivityContext } from '../tabs/context.js';
4
- /** A greedy layout container. Give a reader in a scroll view a definite height. */
4
+ /** Fills the space it is offered and calls its children with that size. Its content renders
5
+ * once the first measurement is in. */
5
6
  export function GeometryReader({ children, style, ...props }) {
6
7
  const host = useRef(null);
7
8
  const active = useContext(TabActivityContext);
@@ -60,7 +61,8 @@ function idealSize(element, axis) {
60
61
  element.style.cssText = previous;
61
62
  return { width: bounds.width, height: bounds.height };
62
63
  }
63
- /** Select the first ideal size that fits, or the last candidate when none does. */
64
+ /** Shows the first child whose natural size fits the space, or the last child when none fits.
65
+ * It measures again when the space or a child resizes. */
64
66
  export function ViewThatFits({ in: axis = 'both', children, style, ...props }) {
65
67
  const host = useRef(null);
66
68
  const parentActive = useContext(TabActivityContext);
@@ -1,3 +1,4 @@
1
1
  import type { TextStyle } from './content.js';
2
- /** Scale a dimension by the target WebKit system text style's Dynamic Type ratio. */
2
+ /** Scales a dimension with the user's text size, relative to a text style (`body` by default).
3
+ * Use it for spacing or icon sizes that should grow with text. */
3
4
  export declare function useScaledMetric(value: number, relativeTo?: TextStyle): number;
@@ -54,7 +54,8 @@ function createMetricStore(style) {
54
54
  };
55
55
  }
56
56
  const stores = new Map();
57
- /** Scale a dimension by the target WebKit system text style's Dynamic Type ratio. */
57
+ /** Scales a dimension with the user's text size, relative to a text style (`body` by default).
58
+ * Use it for spacing or icon sizes that should grow with text. */
58
59
  export function useScaledMetric(value, relativeTo = 'body') {
59
60
  if (!Number.isFinite(value))
60
61
  throw new Error('useScaledMetric requires a finite value.');
@@ -9,10 +9,8 @@ export type ColorPickerProps = {
9
9
  disabled?: boolean;
10
10
  };
11
11
  /**
12
- * `ColorPicker`: a row with a colour well that opens the system colour picker (grid,
13
- * spectrum, sliders, eyedropper and, with `supportsOpacity`, opacity).
14
- *
15
- * The system picker is titled "Colors", not with the label.
12
+ * A row with a colour well that opens the system colour picker: grid, spectrum, sliders,
13
+ * eyedropper and, with `supportsOpacity`, opacity.
16
14
  *
17
15
  * @example
18
16
  * <ColorPicker label="List Colour" selection={color} onSelectionChange={setColor} supportsOpacity={false} />
@@ -36,10 +36,8 @@ function writeHex(channels, withAlpha) {
36
36
  return '#' + values.map(value => value.toString(16).padStart(2, '0')).join('');
37
37
  }
38
38
  /**
39
- * `ColorPicker`: a row with a colour well that opens the system colour picker (grid,
40
- * spectrum, sliders, eyedropper and, with `supportsOpacity`, opacity).
41
- *
42
- * The system picker is titled "Colors", not with the label.
39
+ * A row with a colour well that opens the system colour picker: grid, spectrum, sliders,
40
+ * eyedropper and, with `supportsOpacity`, opacity.
43
41
  *
44
42
  * @example
45
43
  * <ColorPicker label="List Colour" selection={color} onSelectionChange={setColor} supportsOpacity={false} />
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
- /** `DatePickerComponents`. */
2
+ /** A part of the value a `DatePicker` edits: the `date`, or the `hourAndMinute`. */
3
3
  export type DatePickerComponent = 'date' | 'hourAndMinute';
4
- /** `DatePickerStyle`. `automatic` is `compact`. */
4
+ /** How a `DatePicker` draws. Only the compact style exists; `automatic` is `compact`. */
5
5
  export type DatePickerStyle = 'automatic' | 'compact';
6
6
  /**
7
7
  * A DatePicker's selectable range. Omit a bound for a one-sided range
@@ -29,8 +29,8 @@ export type DatePickerProps<Selection extends Date | string = Date> = {
29
29
  'aria-label'?: string;
30
30
  };
31
31
  /**
32
- * `DatePicker` in its compact style: the row's grey value capsules open the system date
33
- * or time picker.
32
+ * A row for picking a date, a time or both. Its grey value capsules open the system date or
33
+ * time picker.
34
34
  *
35
35
  * Use a civil string selection (`'2026-10-14'`) for a day that must stay the same day in every
36
36
  * time zone, such as a due date; use a `Date` for a moment in time.
@@ -82,8 +82,8 @@ function displayText(field, fields) {
82
82
  .join('');
83
83
  }
84
84
  /**
85
- * `DatePicker` in its compact style: the row's grey value capsules open the system date
86
- * or time picker.
85
+ * A row for picking a date, a time or both. Its grey value capsules open the system date or
86
+ * time picker.
87
87
  *
88
88
  * Use a civil string selection (`'2026-10-14'`) for a day that must stay the same day in every
89
89
  * time zone, such as a due date; use a `Date` for a moment in time.
@@ -1,9 +1,10 @@
1
1
  import { type ReactNode } from 'react';
2
- /** `ProgressViewStyle`: `automatic` is linear with a value, circular without. */
2
+ /** How a `ProgressView` draws: `linear`, `circular` or `automatic`, which is linear with a value
3
+ * and circular without. */
3
4
  export type ProgressViewStyle = 'automatic' | 'linear' | 'circular';
4
5
  /** ProgressView's optional label and progress; without `value` it is indeterminate. */
5
6
  export type ProgressViewProps = {
6
- /** The iOS style. Automatic preserves the value-dependent default. */
7
+ /** `automatic` is linear with a value and circular without. */
7
8
  progressViewStyle?: ProgressViewStyle;
8
9
  label?: ReactNode;
9
10
  /** Omit value for an indeterminate activity indicator. */
@@ -12,6 +13,5 @@ export type ProgressViewProps = {
12
13
  tint?: string;
13
14
  'aria-label'?: string;
14
15
  };
15
- /** `ProgressView`: a spinning activity indicator, or a linear bar for `value` of
16
- * `total` (default 1). */
16
+ /** A spinning activity indicator, or a linear bar showing `value` out of `total` (1 by default). */
17
17
  export declare function ProgressView({ label, progressViewStyle, value, total, tint, 'aria-label': accessibleLabel, }: ProgressViewProps): import("react").JSX.Element;
@@ -5,8 +5,7 @@ import { TabActivityContext } from '../tabs/context.js';
5
5
  import { controlTintStyle, useControlStyle } from '../public/controlStyle.js';
6
6
  import { ControlRow } from './ControlRow.js';
7
7
  import { ActivityIndicatorSegments } from './ActivityIndicatorSegments.js';
8
- /** `ProgressView`: a spinning activity indicator, or a linear bar for `value` of
9
- * `total` (default 1). */
8
+ /** A spinning activity indicator, or a linear bar showing `value` out of `total` (1 by default). */
10
9
  export function ProgressView({ label, progressViewStyle = 'automatic', value, total = 1, tint, 'aria-label': accessibleLabel, }) {
11
10
  const labelId = useId();
12
11
  const screen = useContext(ScreenContext);
@@ -15,8 +15,8 @@ export interface CollectionDefinition<T extends object, K extends StringProperty
15
15
  readonly __row?: T;
16
16
  }
17
17
  /**
18
- * Declares a collection of records keyed by one string field, like a SwiftData `@Model` with a
19
- * unique attribute. The curried form, `collection<Note>()({ key, indexes })`, infers index names.
18
+ * Declares a collection of records keyed by one unique string field. The curried form,
19
+ * `collection<Note>()({ key, indexes })`, infers index names.
20
20
  *
21
21
  * @example
22
22
  * notes: collection<Note>()({ key: 'id', indexes: { byDate: 'createdAt' } })
@@ -43,7 +43,8 @@ export type CollectionSchema = Record<string, {
43
43
  readonly indexes: Record<string, string>;
44
44
  readonly __row?: object;
45
45
  }>;
46
- /** The accepted record updates for a collection. */
46
+ /** A collection's `update` method: a partial record to merge, or a function that returns the
47
+ * new record. */
47
48
  export type CollectionUpdateMethods<T extends object> = {
48
49
  update(key: string, update: Partial<T> | ((row: T) => T)): Promise<void>;
49
50
  };
@@ -51,7 +52,7 @@ export type CollectionUpdateMethods<T extends object> = {
51
52
  export type TransactionCollections<S extends CollectionSchema> = {
52
53
  [N in keyof S]: TransactionCollection<RecordOfCollection<S[N]>> & CollectionUpdateMethods<RecordOfCollection<S[N]>>;
53
54
  };
54
- /** An awaited migration over the database transaction collections. */
55
+ /** A schema migration. It runs inside one transaction and may be async. */
55
56
  export type DatabaseMigration<S extends CollectionSchema> = (tx: TransactionCollections<S>) => void | Promise<void>;
56
57
  /** An immutable query over a collection: `index`, `keyRange`, `reverse`, `limit` and `filter` each
57
58
  * return a new query. `useQuery` hands one to its configure callback. */
@@ -99,9 +100,9 @@ export interface ExportDocument {
99
100
  collections: Record<string, DatabaseRecord[]>;
100
101
  }
101
102
  /**
102
- * Opens the app's local database (IndexedDB), like a SwiftData `ModelContainer`. Each collection
103
- * becomes a property of the result. Bump `version` with a migration whenever the schema changes.
104
- * Export and import are built in, so offer them to the user.
103
+ * Opens the app's local database, stored in IndexedDB. Each collection becomes a property of the
104
+ * result. Bump `version` with a migration whenever the schema changes. Export and import are
105
+ * built in, so offer them to the user.
105
106
  *
106
107
  * @example
107
108
  * export const db = defineDatabase({
@@ -126,7 +127,7 @@ export declare function defineDatabase<const S extends CollectionSchema>(config:
126
127
  close(): void;
127
128
  };
128
129
  /**
129
- * SwiftData `@Query`: a collection's records as `{ data, loading, error }`, kept live. Local writes
130
+ * Reads a collection's records as `{ data, loading, error }` and keeps them live. Local writes
130
131
  * show up synchronously, before they persist.
131
132
  *
132
133
  * @example
@@ -155,9 +155,9 @@ function select(rows, definition, query) {
155
155
  }
156
156
  const snapshots = new WeakMap();
157
157
  /**
158
- * Opens the app's local database (IndexedDB), like a SwiftData `ModelContainer`. Each collection
159
- * becomes a property of the result. Bump `version` with a migration whenever the schema changes.
160
- * Export and import are built in, so offer them to the user.
158
+ * Opens the app's local database, stored in IndexedDB. Each collection becomes a property of the
159
+ * result. Bump `version` with a migration whenever the schema changes. Export and import are
160
+ * built in, so offer them to the user.
161
161
  *
162
162
  * @example
163
163
  * export const db = defineDatabase({
@@ -663,7 +663,7 @@ function createDataObserver(source, empty, readCached, load, initial, reconcile
663
663
  return { getSnapshot, subscribe, getServerSnapshot: () => serverSnapshot };
664
664
  }
665
665
  /**
666
- * SwiftData `@Query`: a collection's records as `{ data, loading, error }`, kept live. Local writes
666
+ * Reads a collection's records as `{ data, loading, error }` and keeps them live. Local writes
667
667
  * show up synchronously, before they persist.
668
668
  *
669
669
  * @example