@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.
- package/NOTICE +2 -2
- package/README.md +2 -3
- package/dist/acknowledgements/inventory.json +5 -5
- package/dist/actions/RowActions.d.ts +4 -4
- package/dist/actions/RowActions.js +93 -27
- package/dist/actions/fullSwipeContact.d.ts +73 -0
- package/dist/actions/fullSwipeContact.js +186 -0
- package/dist/actions/rowScrub.d.ts +7 -4
- package/dist/actions/rowScrub.js +39 -37
- package/dist/actions/types.d.ts +13 -7
- package/dist/app/InstallComponents.d.ts +4 -7
- package/dist/app/InstallComponents.js +7 -7
- package/dist/app/InstallationDiagnostics.d.ts +2 -1
- package/dist/app/InstallationDiagnostics.js +2 -1
- package/dist/app/appearance.d.ts +5 -3
- package/dist/app/appearance.js +5 -3
- package/dist/app/appearanceStore.d.ts +3 -2
- package/dist/app/buildInfo.d.ts +4 -4
- package/dist/app/buildInfo.js +2 -2
- package/dist/app/definition.d.ts +11 -3
- package/dist/app/definition.js +2 -0
- package/dist/app/head.d.ts +2 -1
- package/dist/app/head.js +13 -16
- package/dist/app/inlineCSP.d.ts +6 -0
- package/dist/app/inlineCSP.js +25 -0
- package/dist/app/install.d.ts +1 -0
- package/dist/app/install.js +5 -2
- package/dist/app/installCheck.js +32 -86
- package/dist/app/installContext.d.ts +10 -5
- package/dist/app/installContext.js +2 -0
- package/dist/app/installCustom.js +1 -0
- package/dist/app/installExperience.js +0 -60
- package/dist/app/installationFailure.d.ts +3 -2
- package/dist/app/installationFailure.js +1 -1
- package/dist/app/launchScreen.d.ts +6 -2
- package/dist/app/launchScreen.js +104 -1
- package/dist/app/launchScreenRuntime.d.ts +31 -4
- package/dist/app/launchScreenRuntime.js +150 -22
- package/dist/app/launchWatchdog.js +25 -65
- package/dist/app/platformScripts.js +11 -0
- package/dist/app/styles.d.ts +3 -0
- package/dist/app/styles.js +42 -0
- package/dist/app/viewportValue.d.ts +2 -1
- package/dist/app/vite.d.ts +4 -0
- package/dist/app/vite.js +22 -24
- package/dist/content/content.d.ts +35 -30
- package/dist/content/content.js +19 -16
- package/dist/content/layout.d.ts +10 -2
- package/dist/content/layout.js +4 -2
- package/dist/content/scaledMetric.d.ts +2 -1
- package/dist/content/scaledMetric.js +2 -1
- package/dist/controls/ColorPicker.d.ts +2 -4
- package/dist/controls/ColorPicker.js +2 -4
- package/dist/controls/DatePicker.d.ts +4 -4
- package/dist/controls/DatePicker.js +2 -2
- package/dist/controls/ProgressView.d.ts +4 -4
- package/dist/controls/ProgressView.js +1 -2
- package/dist/controls/civilDate.d.ts +1 -1
- package/dist/controls/civilDate.js +1 -1
- package/dist/data/database.d.ts +9 -8
- package/dist/data/database.js +4 -4
- package/dist/docs/components/file-importer.md +1 -1
- package/dist/docs/components/paste-button.md +1 -1
- package/dist/docs/components/photos-picker.md +1 -1
- package/dist/docs/components/share-link.md +1 -1
- package/dist/docs/limitations.md +1 -1
- package/dist/docs/push.md +3 -3
- package/dist/docs/reference.md +1888 -0
- package/dist/docs/tailwind.md +76 -0
- package/dist/docs/tokens.md +1 -1
- package/dist/gestures/GestureView.d.ts +3 -1
- package/dist/gestures/GestureView.js +2 -1
- package/dist/gestures/gesture.d.ts +22 -2
- package/dist/gestures/gesture.js +7 -2
- package/dist/glass/GlassEffect.d.ts +2 -1
- package/dist/glass/GlassEffect.js +2 -1
- package/dist/glass/GlassPresentation.d.ts +1 -0
- package/dist/glass/GlassPresentation.js +21 -4
- package/dist/glass/TabBar.js +23 -1
- package/dist/glass/errorAlert.js +2 -1
- package/dist/glass/errors.d.ts +3 -1
- package/dist/glass/fallback/runtime.d.ts +1 -0
- package/dist/glass/fallback/runtime.js +8 -1
- package/dist/glass/lens/controlLift.d.ts +1 -1
- package/dist/glass/lens/controlLift.js +1 -1
- package/dist/glass/lens/interactivePress.d.ts +2 -2
- package/dist/glass/lens/interactivePress.js +2 -2
- package/dist/glass/lens/menu-opening-native-fits.json +1 -1
- package/dist/glass/lens/menuContextFit.json +1 -1
- package/dist/glass/lens/menuDropFit.json +1 -1
- package/dist/glass/lens/menuField.d.ts +2 -2
- package/dist/glass/lens/menuField.js +3 -3
- package/dist/glass/lens/menuGlyphDropFit.json +1 -1
- package/dist/glass/lens/menuMorphFit.json +1 -1
- package/dist/glass/lens/menuMorphPhoneFit.json +1 -1
- package/dist/glass/lens/tabAccessoryMotion.d.ts +1 -1
- package/dist/glass/lens/tabSearchMember.d.ts +1 -1
- package/dist/glass/lens/tabSearchMember.js +1 -1
- package/dist/glass/liquidContext.d.ts +2 -0
- package/dist/glass/menuPresenter.d.ts +2 -0
- package/dist/glass/menuPresenter.js +1 -1
- package/dist/glass/regions.d.ts +3 -2
- package/dist/glass/regions.js +1 -1
- package/dist/glass/renderSpecs.d.ts +1 -0
- package/dist/glass/renderSpecs.js +1 -0
- package/dist/glass/shapeTrack.d.ts +1 -1
- package/dist/glass/submenuMotion.d.ts +1 -1
- package/dist/glass/submenuMotion.js +1 -1
- package/dist/glass/webgpu/controlRim.d.ts +29 -0
- package/dist/glass/webgpu/controlRim.js +68 -0
- package/dist/glass/webgpu/entry.worker.js +3 -6
- package/dist/glass/webgpu/frameClock.d.ts +6 -2
- package/dist/glass/webgpu/frameClock.js +9 -2
- package/dist/glass/webgpu/frameProbe.d.ts +1 -1
- package/dist/glass/webgpu/frameProbe.js +3 -3
- package/dist/glass/webgpu/passes.d.ts +2 -2
- package/dist/glass/webgpu/production.d.ts +1 -0
- package/dist/glass/webgpu/production.js +31 -1
- package/dist/glass/webgpu/raster.d.ts +18 -0
- package/dist/glass/webgpu/raster.js +105 -15
- package/dist/glass/webgpu/rasterMaterial.d.ts +4 -0
- package/dist/glass/webgpu/rasterMaterial.js +17 -1
- package/dist/glass/webgpu/rasterUniforms.js +9 -0
- package/dist/glass/webgpu/regionScene.d.ts +4 -1
- package/dist/glass/webgpu/regionScene.js +30 -1
- package/dist/glass/webgpu/renderer.js +23 -7
- package/dist/glass/webgpu/shaders.d.ts +2 -2
- package/dist/glass/webgpu/shaders.js +5 -1
- package/dist/haptics/SensoryButton.d.ts +4 -4
- package/dist/haptics/SensoryButton.js +3 -3
- package/dist/image/Image.d.ts +6 -3
- package/dist/image/Image.js +4 -3
- package/dist/image/asset.d.ts +2 -1
- package/dist/keyboard/adapter.d.ts +3 -4
- package/dist/keyboard/adapter.js +2 -2
- package/dist/keyboard/avoidance.d.ts +1 -1
- package/dist/keyboard/avoidance.js +1 -1
- package/dist/keyboard/geometry.d.ts +1 -1
- package/dist/keyboard/motion.d.ts +1 -1
- package/dist/keyboard/motion.js +1 -1
- package/dist/list-form/ListForm.d.ts +10 -9
- package/dist/list-form/ListForm.js +3 -3
- package/dist/list-form/ListItem.js +1 -1
- package/dist/list-form/RowLabel.d.ts +1 -1
- package/dist/list-form/RowLabel.js +1 -1
- package/dist/list-form/Slider.js +1 -1
- package/dist/list-form/editMotion.js +1 -1
- package/dist/list-form/editing.d.ts +10 -11
- package/dist/list-form/editing.js +5 -6
- package/dist/list-form/offsets.d.ts +2 -2
- package/dist/list-form/offsets.js +2 -2
- package/dist/media/react.d.ts +2 -1
- package/dist/media/react.js +2 -1
- package/dist/media/types.d.ts +6 -3
- package/dist/motion/TransitionView.d.ts +4 -2
- package/dist/motion/TransitionView.js +3 -2
- package/dist/motion/animationValue.d.ts +2 -2
- package/dist/motion/animationValue.js +9 -10
- package/dist/motion/matchedGeometry.d.ts +10 -9
- package/dist/motion/matchedGeometry.js +9 -9
- package/dist/motion/springTrack.d.ts +1 -2
- package/dist/motion/springTrack.js +10 -5
- package/dist/motion/transition.d.ts +4 -1
- package/dist/motion/transition.js +2 -0
- package/dist/navigation/DetailList.d.ts +1 -1
- package/dist/navigation/DetailList.js +1 -1
- package/dist/navigation/ScreenContainer.js +1 -1
- package/dist/navigation/Sidebar.d.ts +3 -1
- package/dist/navigation/Sidebar.js +1 -1
- package/dist/navigation/SidebarSymbol.d.ts +2 -1
- package/dist/navigation/SidebarSymbol.js +2 -1
- package/dist/navigation/chromeCurves.js +1 -1
- package/dist/navigation/navigationContext.d.ts +2 -1
- package/dist/navigation/navigationContext.js +2 -1
- package/dist/navigation/splitContext.d.ts +2 -1
- package/dist/navigation/splitContext.js +2 -1
- package/dist/navigation/toolbarMinimization.d.ts +4 -3
- package/dist/navigation/types.d.ts +8 -6
- package/dist/navigation/zoomGeometry.js +1 -1
- package/dist/navigation/zoomMotion.d.ts +1 -1
- package/dist/navigation/zoomMotion.js +2 -2
- package/dist/navigation/zoomTransition.js +3 -4
- package/dist/presentation/Presentation.d.ts +10 -9
- package/dist/presentation/Presentation.js +4 -3
- package/dist/presentation/model.d.ts +2 -1
- package/dist/presentation/presentationSource.js +1 -1
- package/dist/press/Pressable.d.ts +5 -1
- package/dist/press/Pressable.js +2 -0
- package/dist/press/stateMachine.d.ts +1 -1
- package/dist/public/Label.d.ts +2 -1
- package/dist/public/Label.js +2 -1
- package/dist/public/Screen.d.ts +4 -6
- package/dist/public/actions.d.ts +2 -1
- package/dist/public/actions.js +2 -1
- package/dist/public/buttonBorderShape.d.ts +2 -1
- package/dist/public/colors.d.ts +7 -4
- package/dist/public/colors.js +3 -2
- package/dist/public/controlStyle.d.ts +17 -14
- package/dist/public/controls.d.ts +29 -28
- package/dist/public/controls.js +25 -24
- package/dist/public/deviceActions.d.ts +6 -4
- package/dist/public/deviceActions.js +4 -2
- package/dist/public/environment.d.ts +16 -13
- package/dist/public/environment.js +11 -9
- package/dist/public/filePickers.d.ts +6 -4
- package/dist/public/filePickers.js +3 -2
- package/dist/public/glass.d.ts +8 -6
- package/dist/public/glass.js +2 -2
- package/dist/public/glassValue.d.ts +3 -4
- package/dist/public/glassValue.js +3 -4
- package/dist/public/keyboard.d.ts +4 -1
- package/dist/public/keyboard.js +2 -1
- package/dist/public/navigationTransition.d.ts +6 -6
- package/dist/public/navigationTransition.js +3 -3
- package/dist/public/presentation.d.ts +8 -7
- package/dist/public/presentation.js +5 -5
- package/dist/public/runtime.d.ts +9 -8
- package/dist/public/runtime.js +7 -7
- package/dist/public/scroll.d.ts +6 -3
- package/dist/public/scroll.js +3 -1
- package/dist/public/structure.d.ts +2 -2
- package/dist/public/toolbar.d.ts +15 -11
- package/dist/public/toolbar.js +13 -8
- package/dist/reachability/model.d.ts +4 -3
- package/dist/reachability/react.d.ts +4 -1
- package/dist/reachability/react.js +2 -1
- package/dist/root/SatinRoot.d.ts +3 -3
- package/dist/root/SatinRoot.js +12 -36
- package/dist/root/mountSatin.d.ts +1 -1
- package/dist/root/mountSatin.js +26 -35
- package/dist/root/runtimeContext.d.ts +2 -1
- package/dist/root/runtimeContext.js +2 -1
- package/dist/safe-area/Overlay.d.ts +3 -2
- package/dist/safe-area/Overlay.js +2 -1
- package/dist/safe-area/SafeAreaInset.d.ts +11 -7
- package/dist/safe-area/SafeAreaInset.js +10 -9
- package/dist/safe-area/context.d.ts +3 -3
- package/dist/safe-area/context.js +1 -1
- package/dist/safe-area/displayCorners.d.ts +4 -2
- package/dist/safe-area/displayCorners.js +4 -2
- package/dist/safe-area/modifiers.d.ts +14 -10
- package/dist/safe-area/modifiers.js +10 -6
- package/dist/safe-area/useSafeAreaMetrics.js +2 -2
- package/dist/scroll/ScrollSurface.d.ts +5 -5
- package/dist/scroll/ScrollSurface.js +6 -2
- package/dist/scroll/ScrollTarget.d.ts +1 -1
- package/dist/scroll/ScrollTarget.js +1 -1
- package/dist/scroll/edgePolicy.d.ts +2 -2
- package/dist/scroll/position.d.ts +5 -3
- package/dist/scroll/position.js +1 -1
- package/dist/scroll/screenGeometry.d.ts +1 -1
- package/dist/scroll/screenGeometry.js +1 -1
- package/dist/scroll/types.d.ts +1 -1
- package/dist/search/PadSearchDrawer.d.ts +7 -0
- package/dist/search/PadSearchDrawer.js +8 -0
- package/dist/search/PadSearchPresentationContext.d.ts +6 -0
- package/dist/search/PadSearchPresentationContext.js +4 -0
- package/dist/search/SearchDrawer.d.ts +1 -1
- package/dist/search/SearchDrawer.js +7 -2
- package/dist/search/SearchSuggestionsPopover.d.ts +6 -0
- package/dist/search/SearchSuggestionsPopover.js +42 -0
- package/dist/search/SearchToolbarField.d.ts +2 -1
- package/dist/search/SearchToolbarField.js +28 -7
- package/dist/search/padSearchBarMotion.d.ts +69 -0
- package/dist/search/padSearchBarMotion.js +73 -0
- package/dist/search/padSearchFieldSamples.json +491 -0
- package/dist/search/searchMotion.d.ts +1 -1
- package/dist/search/searchMotion.js +1 -1
- package/dist/search/searchPlacement.d.ts +3 -0
- package/dist/search/searchPlacement.js +7 -0
- package/dist/search/searchable.d.ts +14 -12
- package/dist/search/usePadSearchFieldMotion.d.ts +4 -0
- package/dist/search/usePadSearchFieldMotion.js +100 -0
- package/dist/search/useSearchPresentation.d.ts +2 -1
- package/dist/search/useSearchPresentation.js +24 -6
- package/dist/server.d.ts +4 -4
- package/dist/server.js +4 -4
- package/dist/shapes/corners.d.ts +3 -3
- package/dist/shapes/corners.js +2 -3
- package/dist/styles.css +8302 -8236
- package/dist/sw/vite.d.ts +4 -0
- package/dist/sw/vite.js +2 -0
- package/dist/symbols/Symbol.d.ts +7 -5
- package/dist/symbols/Symbol.js +5 -3
- package/dist/symbols/catalogue.d.ts +1 -1
- package/dist/symbols/types.d.ts +6 -4
- package/dist/tabs/TabSection.d.ts +3 -2
- package/dist/tabs/TabSection.js +2 -1
- package/dist/tabs/TabView.js +54 -51
- package/dist/tasks/useTask.d.ts +5 -4
- package/dist/tasks/useTask.js +4 -3
- package/dist/testing.d.ts +3 -2
- package/dist/testing.js +3 -2
- package/dist/text-input/TextEditor.js +7 -3
- package/dist/text-input/focusChain.d.ts +4 -3
- package/dist/text-input/focusChain.js +3 -2
- package/dist/text-input/kinds.d.ts +1 -1
- package/dist/web/WebView.d.ts +10 -3
- package/dist/web/WebView.js +3 -2
- package/dist/web/authentication.d.ts +12 -1
- package/dist/web/authentication.js +2 -1
- package/dist/web/openURL.d.ts +10 -4
- package/dist/web/openURL.js +4 -2
- package/dist/web/useWebAuthentication.d.ts +2 -1
- package/dist/web/useWebAuthentication.js +2 -1
- package/dist/zoom/Zoomable.d.ts +3 -3
- package/dist/zoom/Zoomable.js +2 -2
- package/package.json +4 -4
- package/dist/docs/swiftui-reference.md +0 -1895
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type CSSProperties, type HTMLAttributes } from 'react';
|
|
2
|
-
/**
|
|
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
|
-
/** `
|
|
4
|
+
/** A font weight, from `ultraLight` to `black`. */
|
|
5
5
|
export type FontWeight = 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
|
|
6
|
-
/**
|
|
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
|
-
/**
|
|
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
|
|
20
|
-
* object pads
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
49
|
-
*
|
|
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
|
-
*
|
|
67
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
81
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
90
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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 {};
|
package/dist/content/content.js
CHANGED
|
@@ -60,8 +60,8 @@ function ContentFrameBox({ frame, background, style, inline = false, children, }
|
|
|
60
60
|
}, children: children }));
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
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
|
-
*
|
|
145
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
159
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
177
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
}
|
package/dist/content/layout.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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;
|
package/dist/content/layout.js
CHANGED
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
13
|
-
*
|
|
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
|
-
*
|
|
40
|
-
*
|
|
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
|
-
/** `
|
|
2
|
+
/** A part of the value a `DatePicker` edits: the `date`, or the `hourAndMinute`. */
|
|
3
3
|
export type DatePickerComponent = 'date' | 'hourAndMinute';
|
|
4
|
-
/** `
|
|
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
|
-
*
|
|
33
|
-
*
|
|
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
|
-
*
|
|
86
|
-
*
|
|
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
|
-
/** `
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Calendar fields for DatePicker, kept apart from instants.
|
|
3
3
|
*
|
|
4
4
|
* A DatePicker edits calendar fields: a day, a time of day, or both. A `Date` selection reads and
|
|
5
|
-
* writes those fields in the device's time zone
|
|
5
|
+
* writes those fields in the device's time zone. A string selection is a civil
|
|
6
6
|
* value with no time zone at all ('2026-10-14', '09:41', '2026-10-14T09:41'), so a due date
|
|
7
7
|
* chosen in New York is still October 14 when the app is opened in Tokyo.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Calendar fields for DatePicker, kept apart from instants.
|
|
3
3
|
*
|
|
4
4
|
* A DatePicker edits calendar fields: a day, a time of day, or both. A `Date` selection reads and
|
|
5
|
-
* writes those fields in the device's time zone
|
|
5
|
+
* writes those fields in the device's time zone. A string selection is a civil
|
|
6
6
|
* value with no time zone at all ('2026-10-14', '09:41', '2026-10-14T09:41'), so a due date
|
|
7
7
|
* chosen in New York is still October 14 when the app is opened in Tokyo.
|
|
8
8
|
*
|
package/dist/data/database.d.ts
CHANGED
|
@@ -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
|
|
19
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
|
103
|
-
*
|
|
104
|
-
*
|
|
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
|
-
*
|
|
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
|
package/dist/data/database.js
CHANGED
|
@@ -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
|
|
159
|
-
*
|
|
160
|
-
*
|
|
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
|
-
*
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FileImporter
|
|
2
2
|
|
|
3
|
-
Imports file bytes through the system file chooser. `FileImporter`
|
|
3
|
+
Imports file bytes through the system file chooser. `FileImporter` opens the system chooser from a press. It does not expose a presentation flag that would open a chooser outside a user gesture.
|
|
4
4
|
|
|
5
5
|
Pass `selection` as the accepted File array and update it in `onSelectionChange`. `allowedContentTypes` accepts MIME strings or file extensions, for example `['application/pdf', '.txt']`. These are chooser hints, not content validation or Swift uniform type identifiers. `allowsMultipleSelection` defaults to false.
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@ Reads plain text with the async Clipboard API inside the user's press. `onPaste`
|
|
|
4
4
|
|
|
5
5
|
WebKit may show its own Paste confirmation before returning text. Dismissal and denial cannot be reliably distinguished. The component never reads clipboard contents during render or probes whether a paste is available. It cannot pre-disable itself based on clipboard contents.
|
|
6
6
|
|
|
7
|
-
This version supports plain text only
|
|
7
|
+
This version supports plain text only. Structured clipboard objects and images are unsupported. No hidden editable field, synthetic paste, permission polling or clipboard cache bypasses WebKit's prompt.
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ Selects one photo or video using a real file input. The browser chooses the sour
|
|
|
4
4
|
|
|
5
5
|
`selection` is the accepted `File | null`; `onSelectionChange` receives a new File. `matching` accepts `images`, `videos`, or `imagesAndVideos`. `capture="user"` or `"environment"` supplies a browser camera preference, not a camera guarantee. No photo-library permission probe runs.
|
|
6
6
|
|
|
7
|
-
The browser may offer Photo Library, camera or Files. The control does not expose PhotosPickerItem identifiers, ordered multi-selection, persistent library access, or
|
|
7
|
+
The browser may offer Photo Library, camera or Files. The control does not expose PhotosPickerItem identifiers, ordered multi-selection, persistent library access, or library-specific content filters. File decoding, object URLs, storage and validation belong to the app.
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ Opens the platform share sheet using Web Share. Pass prepared `item` data contai
|
|
|
4
4
|
|
|
5
5
|
`onCompletion` reports the browser's completed handoff, not delivery to a recipient. `onError` is required. An AbortError can mean dismissal or no suitable target; it is not proof of a user cancellation. Unsupported sharing or files report NotSupportedError. Other browser errors retain their names.
|
|
6
6
|
|
|
7
|
-
The operating system chooses share targets and previews.
|
|
7
|
+
The operating system chooses share targets and previews. Structured transfer objects, custom previews and custom activity lists are unsupported. Keep `item` stable while sharing; changing its identity invalidates delivery to the old owner.
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
package/dist/docs/limitations.md
CHANGED
|
@@ -37,4 +37,4 @@ What each part of Satin does today, and where it stops. Limits that come from iO
|
|
|
37
37
|
- **Video player.** There's no general video player control.
|
|
38
38
|
- **Full search tab.** `searchable` gives a search field and results, but not the full search tab.
|
|
39
39
|
|
|
40
|
-
`@satinhq/kit/unstable` exports are experimental and may change. The [API reference](https://github.com/satinhq/satin/blob/main/packages/
|
|
40
|
+
`@satinhq/kit/unstable` exports are experimental and may change. The [API reference](https://github.com/satinhq/satin/blob/main/packages/kit/api/reference.md) lists every export.
|
package/dist/docs/push.md
CHANGED
|
@@ -7,13 +7,13 @@ Node 22.12+ sender and private relay for an installed iPhone Home Screen app. Th
|
|
|
7
7
|
Run from this workspace after `pnpm install && pnpm --filter @satinhq/kit build`. Replace the URLs with your installed app scope and trusted HTTPS relay URL.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
node packages/
|
|
10
|
+
node packages/push/src/cli.mjs init --out "$HOME/.config/satin-push/push.json" --app-url https://your-app.example/app/ --relay-url https://your-app.example/push/ --subject https://example.com/contact
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
`init` generates a detail/title route at version 1, matching the starter, and writes the private configuration and owner token with mode 0600. Custom apps must align both the rule and notification route versions with their screen schema. It never prints secrets. Copy the generated public `client.env` into the starter's `.env.local`, then build and deploy the app. Supply the owner token at runtime through the app's authenticated session or token field; never bundle it.
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
node packages/
|
|
16
|
+
node packages/push/src/cli.mjs relay --config "$HOME/.config/satin-push/push.json" --port 5466
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
The default bind address is loopback. Forward the trusted HTTPS `/push/` path to this listener, stripping `/push` before forwarding. Keep the private Node listener on loopback or a permitted Tailscale address. A phone cannot call an HTTP relay from an HTTPS app. Keep CORS restricted to the configured app origin, as the relay does by default. Never create a public tunnel.
|
|
@@ -23,7 +23,7 @@ Open the installed app's Notifications screen, supply its owner token, read the
|
|
|
23
23
|
## Send in one line
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
node packages/
|
|
26
|
+
node packages/push/src/cli.mjs send --config "$HOME/.config/satin-push/push.json" --title 'Reminder' --body 'Review your list' --route '{"screen":"detail","version":1,"params":{"title":"Welcome"}}' --badge 3
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Once published, the equivalent entry is `npm exec --package @satinhq/push -- satin-push send` with those same options. Use the workspace command above when working from source.
|