@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.
- package/NOTICE +1 -1
- package/README.md +1 -2
- package/dist/acknowledgements/inventory.json +1 -1
- package/dist/actions/RowActions.d.ts +2 -2
- package/dist/actions/RowActions.js +91 -25
- 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/data/database.d.ts +9 -8
- package/dist/data/database.js +4 -4
- package/dist/docs/reference.md +982 -964
- 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/liquidContext.d.ts +2 -0
- package/dist/glass/menuPresenter.d.ts +2 -0
- package/dist/glass/regions.d.ts +2 -1
- package/dist/glass/renderSpecs.d.ts +1 -0
- package/dist/glass/renderSpecs.js +1 -0
- package/dist/glass/webgpu/controlRim.d.ts +29 -0
- package/dist/glass/webgpu/controlRim.js +68 -0
- package/dist/glass/webgpu/passes.d.ts +2 -2
- package/dist/glass/webgpu/production.d.ts +1 -0
- package/dist/glass/webgpu/production.js +27 -1
- package/dist/glass/webgpu/rasterUniforms.js +9 -0
- 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/geometry.d.ts +1 -1
- package/dist/list-form/ListForm.d.ts +8 -7
- package/dist/list-form/ListForm.js +2 -2
- package/dist/list-form/editing.d.ts +5 -6
- package/dist/list-form/editing.js +4 -5
- 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 +1 -1
- package/dist/motion/matchedGeometry.d.ts +6 -5
- package/dist/motion/matchedGeometry.js +2 -1
- 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/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/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 +7 -5
- package/dist/presentation/Presentation.d.ts +8 -7
- package/dist/presentation/Presentation.js +3 -2
- package/dist/presentation/model.d.ts +2 -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 +27 -26
- package/dist/public/controls.js +20 -19
- 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 +6 -3
- package/dist/public/glass.js +2 -1
- 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 +5 -5
- package/dist/public/navigationTransition.js +2 -2
- 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 +12 -7
- 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 +7 -6
- 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 +8 -4
- package/dist/scroll/ScrollSurface.js +5 -1
- 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/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 +6 -1
- 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/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 +23 -5
- 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 +1 -2
- package/dist/styles.css +8289 -8244
- 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/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 +1 -1
|
@@ -7,9 +7,10 @@ import { validateSearchPresentation } from './searchable.js';
|
|
|
7
7
|
* controller. The bottom toolbar field uses it (SearchToolbarField.tsx); the navigation bar drawer
|
|
8
8
|
* keeps its own copy until reference adopts this hook (spec notes, reference construction update).
|
|
9
9
|
*/
|
|
10
|
-
export function useSearchPresentation(configuration, input) {
|
|
10
|
+
export function useSearchPresentation(configuration, input, pad = false) {
|
|
11
11
|
validateSearchPresentation(configuration);
|
|
12
12
|
const [ownPresented, setOwnPresented] = useState(false);
|
|
13
|
+
const [focused, setFocused] = useState(false);
|
|
13
14
|
const presented = configuration.isPresented ?? ownPresented;
|
|
14
15
|
const [submittedText, setSubmittedText] = useState(null);
|
|
15
16
|
const configurationRef = useRef(configuration);
|
|
@@ -17,6 +18,7 @@ export function useSearchPresentation(configuration, input) {
|
|
|
17
18
|
configurationRef.current = configuration;
|
|
18
19
|
});
|
|
19
20
|
const mounted = useRef(false);
|
|
21
|
+
const dismissing = useRef(false);
|
|
20
22
|
const setPresented = useCallback((next) => {
|
|
21
23
|
const current = configurationRef.current;
|
|
22
24
|
if (current.isPresented === undefined)
|
|
@@ -24,11 +26,15 @@ export function useSearchPresentation(configuration, input) {
|
|
|
24
26
|
current.onPresentedChange?.(next);
|
|
25
27
|
}, []);
|
|
26
28
|
const present = () => {
|
|
29
|
+
if (pad)
|
|
30
|
+
setFocused(true);
|
|
27
31
|
if (!presented)
|
|
28
32
|
setPresented(true);
|
|
29
33
|
};
|
|
30
34
|
const dismiss = () => {
|
|
35
|
+
dismissing.current = true;
|
|
31
36
|
input.current?.blur();
|
|
37
|
+
dismissing.current = false;
|
|
32
38
|
setSubmittedText(null);
|
|
33
39
|
if (configurationRef.current.text)
|
|
34
40
|
configurationRef.current.onTextChange('');
|
|
@@ -43,6 +49,14 @@ export function useSearchPresentation(configuration, input) {
|
|
|
43
49
|
input.current?.blur();
|
|
44
50
|
configuration.onSubmit?.();
|
|
45
51
|
};
|
|
52
|
+
// An empty iPad field collapses on resigning focus. Submitted text stays
|
|
53
|
+
// visible and expanded; clearing is a separate action from keyboard dismissal.
|
|
54
|
+
const resign = () => {
|
|
55
|
+
if (pad)
|
|
56
|
+
setFocused(false);
|
|
57
|
+
if (pad && !dismissing.current && presented && !configurationRef.current.text)
|
|
58
|
+
setPresented(false);
|
|
59
|
+
};
|
|
46
60
|
const complete = (suggestion) => {
|
|
47
61
|
change(suggestion.text);
|
|
48
62
|
if (input.current)
|
|
@@ -51,11 +65,15 @@ export function useSearchPresentation(configuration, input) {
|
|
|
51
65
|
// Native presents the field focused, including a programmatic `isPresented`.
|
|
52
66
|
useEffect(() => {
|
|
53
67
|
const element = input.current;
|
|
54
|
-
if (presented && element && document.activeElement !== element && mounted.current) {
|
|
68
|
+
if (presented && element && document.activeElement !== element && (pad || mounted.current)) {
|
|
55
69
|
focusFromFramework(element, { preventScroll: true });
|
|
56
70
|
}
|
|
71
|
+
if (pad && !presented && element === document.activeElement)
|
|
72
|
+
element?.blur();
|
|
57
73
|
mounted.current = true;
|
|
58
|
-
}, [presented, input]);
|
|
59
|
-
const suggestions = presented && submittedText !== configuration.text
|
|
60
|
-
|
|
74
|
+
}, [presented, input, pad]);
|
|
75
|
+
const suggestions = presented && (!pad || focused) && submittedText !== configuration.text
|
|
76
|
+
? (configuration.suggestions ?? [])
|
|
77
|
+
: [];
|
|
78
|
+
return { presented, present, dismiss, change, submit, complete, suggestions, resign };
|
|
61
79
|
}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
/**
|
|
3
|
-
* compression.
|
|
4
|
-
*
|
|
5
|
-
* inside the same real directory
|
|
2
|
+
/** Serves a built app's static files from Node. It streams GET and HEAD requests and supports
|
|
3
|
+
* single byte ranges, with no caching or compression. The `fallback` file answers only missing
|
|
4
|
+
* extensionless routes; other methods are left to the caller. The root and every file, symlink
|
|
5
|
+
* targets included, must resolve inside the same real directory.
|
|
6
6
|
*/
|
|
7
7
|
export declare function serveStaticFile(request: IncomingMessage, response: ServerResponse, root: string, fallback?: string): Promise<void>;
|
package/dist/server.js
CHANGED
|
@@ -44,10 +44,10 @@ function singleRange(header, size) {
|
|
|
44
44
|
end: Number(last === undefined || last >= length ? length - 1n : last),
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
48
|
-
* compression.
|
|
49
|
-
*
|
|
50
|
-
* inside the same real directory
|
|
47
|
+
/** Serves a built app's static files from Node. It streams GET and HEAD requests and supports
|
|
48
|
+
* single byte ranges, with no caching or compression. The `fallback` file answers only missing
|
|
49
|
+
* extensionless routes; other methods are left to the caller. The root and every file, symlink
|
|
50
|
+
* targets included, must resolve inside the same real directory.
|
|
51
51
|
*/
|
|
52
52
|
export async function serveStaticFile(request, response, root, fallback) {
|
|
53
53
|
const end = (status) => {
|
package/dist/shapes/corners.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/** A
|
|
1
|
+
/** A shape for `cornerClipPath` and swipe action faces: a capsule, an ellipse, a rounded rectangle
|
|
2
|
+
* or a custom clip path. Choosing one overrides the framework's default shape. */
|
|
2
3
|
export type CornerShape = 'capsule' | 'ellipse' | Readonly<{
|
|
3
4
|
kind: 'custom';
|
|
4
5
|
clipPath: string;
|
|
@@ -9,6 +10,5 @@ export type CornerShape = 'capsule' | 'ellipse' | Readonly<{
|
|
|
9
10
|
}>;
|
|
10
11
|
/** SVG geometry shared by DOM clips and shape consumers. No layout reads. */
|
|
11
12
|
export declare function roundedCornerPath(width: number, height: number, radii: readonly number[], style?: 'continuous' | 'circular'): string;
|
|
12
|
-
/** CSS clip for an
|
|
13
|
-
* capsule are intentional alternatives, not native-default validation errors. */
|
|
13
|
+
/** Returns a CSS `clip-path` for a shape at an explicit width and height. Radii are in points. */
|
|
14
14
|
export declare function cornerClipPath(shape: CornerShape, width: number, height: number): string;
|
package/dist/shapes/corners.js
CHANGED
|
@@ -67,8 +67,7 @@ export function roundedCornerPath(width, height, radii, style = 'continuous') {
|
|
|
67
67
|
corner(corners[0], false, false, true);
|
|
68
68
|
return `${commands.join(' ')} Z`;
|
|
69
69
|
}
|
|
70
|
-
/** CSS clip for an
|
|
71
|
-
* capsule are intentional alternatives, not native-default validation errors. */
|
|
70
|
+
/** Returns a CSS `clip-path` for a shape at an explicit width and height. Radii are in points. */
|
|
72
71
|
export function cornerClipPath(shape, width, height) {
|
|
73
72
|
if (shape === 'ellipse')
|
|
74
73
|
return 'ellipse(50% 50% at 50% 50%)';
|